mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-24 19:35:28 -06:00
refactor(agents): narrow embedded runner helper exports
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
export const MAX_CONSECUTIVE_IDLE_TIMEOUTS_BEFORE_OUTPUT = 5;
|
||||
|
||||
/** Mutable outer-loop state that survives across retry/profile attempts. */
|
||||
export type IdleTimeoutBreakerState = {
|
||||
type IdleTimeoutBreakerState = {
|
||||
consecutiveIdleTimeoutsBeforeOutput: number;
|
||||
};
|
||||
|
||||
@@ -30,14 +30,14 @@ export function createIdleTimeoutBreakerState(): IdleTimeoutBreakerState {
|
||||
* model progress means durable text/tool-call progress, not merely billed token
|
||||
* deltas from a partial stream.
|
||||
*/
|
||||
export type IdleTimeoutBreakerInput = {
|
||||
type IdleTimeoutBreakerInput = {
|
||||
idleTimedOut: boolean;
|
||||
completedModelProgress: boolean;
|
||||
outputTokens?: number;
|
||||
};
|
||||
|
||||
/** Result of applying one attempt outcome to the breaker state. */
|
||||
export type IdleTimeoutBreakerStep = {
|
||||
type IdleTimeoutBreakerStep = {
|
||||
consecutive: number;
|
||||
tripped: boolean;
|
||||
};
|
||||
|
||||
@@ -83,7 +83,7 @@ const MEDIA_URI_REGEX = /\bmedia:\/\/inbound\/([^\]\s/\\]+)/;
|
||||
/**
|
||||
* Result of detecting an image reference in text.
|
||||
*/
|
||||
export interface DetectedImageRef {
|
||||
interface DetectedImageRef {
|
||||
/** The raw matched string from the prompt */
|
||||
raw: string;
|
||||
/** The type of reference */
|
||||
|
||||
@@ -45,8 +45,8 @@ const MAX_TOOL_RESULT_CONTEXT_SHARE = 0.3;
|
||||
* request-local ceiling so oversized tool output cannot dominate the next turn.
|
||||
*/
|
||||
export const DEFAULT_MAX_LIVE_TOOL_RESULT_CHARS = 16_000;
|
||||
export const LARGE_CONTEXT_MAX_LIVE_TOOL_RESULT_CHARS = 32_000;
|
||||
export const XL_CONTEXT_MAX_LIVE_TOOL_RESULT_CHARS = 64_000;
|
||||
const LARGE_CONTEXT_MAX_LIVE_TOOL_RESULT_CHARS = 32_000;
|
||||
const XL_CONTEXT_MAX_LIVE_TOOL_RESULT_CHARS = 64_000;
|
||||
const LARGE_CONTEXT_TOOL_RESULT_TOKENS = 100_000;
|
||||
const XL_CONTEXT_TOOL_RESULT_TOKENS = 200_000;
|
||||
|
||||
@@ -389,7 +389,7 @@ function calculateRecoveryAggregateToolResultChars(
|
||||
);
|
||||
}
|
||||
|
||||
export type ToolResultReductionPotential = {
|
||||
type ToolResultReductionPotential = {
|
||||
maxChars: number;
|
||||
aggregateBudgetChars: number;
|
||||
toolResultCount: number;
|
||||
|
||||
Reference in New Issue
Block a user