refactor(agents): narrow embedded runner helper exports · openclaw/openclaw@e62b012
vincentkoc
·
2026-06-17
·
via Recent Commits to openclaw:main
File tree
src/agents/embedded-agent-runner
| Original file line number | Diff line number | Diff line change |
|---|
@@ -16,7 +16,7 @@
|
16 | 16 | export const MAX_CONSECUTIVE_IDLE_TIMEOUTS_BEFORE_OUTPUT = 5; |
17 | 17 | |
18 | 18 | /** Mutable outer-loop state that survives across retry/profile attempts. */ |
19 | | -export type IdleTimeoutBreakerState = { |
| 19 | +type IdleTimeoutBreakerState = { |
20 | 20 | consecutiveIdleTimeoutsBeforeOutput: number; |
21 | 21 | }; |
22 | 22 | |
@@ -30,14 +30,14 @@ export function createIdleTimeoutBreakerState(): IdleTimeoutBreakerState {
|
30 | 30 | * model progress means durable text/tool-call progress, not merely billed token |
31 | 31 | * deltas from a partial stream. |
32 | 32 | */ |
33 | | -export type IdleTimeoutBreakerInput = { |
| 33 | +type IdleTimeoutBreakerInput = { |
34 | 34 | idleTimedOut: boolean; |
35 | 35 | completedModelProgress: boolean; |
36 | 36 | outputTokens?: number; |
37 | 37 | }; |
38 | 38 | |
39 | 39 | /** Result of applying one attempt outcome to the breaker state. */ |
40 | | -export type IdleTimeoutBreakerStep = { |
| 40 | +type IdleTimeoutBreakerStep = { |
41 | 41 | consecutive: number; |
42 | 42 | tripped: boolean; |
43 | 43 | }; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -83,7 +83,7 @@ const MEDIA_URI_REGEX = /\bmedia:\/\/inbound\/([^\]\s/\\]+)/;
|
83 | 83 | /** |
84 | 84 | * Result of detecting an image reference in text. |
85 | 85 | */ |
86 | | -export interface DetectedImageRef { |
| 86 | +interface DetectedImageRef { |
87 | 87 | /** The raw matched string from the prompt */ |
88 | 88 | raw: string; |
89 | 89 | /** The type of reference */ |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -45,8 +45,8 @@ const MAX_TOOL_RESULT_CONTEXT_SHARE = 0.3;
|
45 | 45 | * request-local ceiling so oversized tool output cannot dominate the next turn. |
46 | 46 | */ |
47 | 47 | export const DEFAULT_MAX_LIVE_TOOL_RESULT_CHARS = 16_000; |
48 | | -export const LARGE_CONTEXT_MAX_LIVE_TOOL_RESULT_CHARS = 32_000; |
49 | | -export const XL_CONTEXT_MAX_LIVE_TOOL_RESULT_CHARS = 64_000; |
| 48 | +const LARGE_CONTEXT_MAX_LIVE_TOOL_RESULT_CHARS = 32_000; |
| 49 | +const XL_CONTEXT_MAX_LIVE_TOOL_RESULT_CHARS = 64_000; |
50 | 50 | const LARGE_CONTEXT_TOOL_RESULT_TOKENS = 100_000; |
51 | 51 | const XL_CONTEXT_TOOL_RESULT_TOKENS = 200_000; |
52 | 52 | |
@@ -389,7 +389,7 @@ function calculateRecoveryAggregateToolResultChars(
|
389 | 389 | ); |
390 | 390 | } |
391 | 391 | |
392 | | -export type ToolResultReductionPotential = { |
| 392 | +type ToolResultReductionPotential = { |
393 | 393 | maxChars: number; |
394 | 394 | aggregateBudgetChars: number; |
395 | 395 | toolResultCount: number; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。