refactor(agents): narrow embedded runner helper exports

This commit is contained in:
Vincent Koc
2026-06-17 08:34:37 +08:00
parent d1ea170c9b
commit e62b0122e7
3 changed files with 7 additions and 7 deletions
@@ -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;