agent-afk 5.83.0 → 5.83.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  export type { Surface, PhaseRole, SubagentStatusLite, SubagentStatusLiteValue, BgJobLite, BgJobStatus, McpServerSummary, RuntimeSelf, RuntimeTools, RuntimeSubagents, RuntimeWorkspace, RuntimeSnapshot, RuntimeView, RuntimeStateSource, } from './types.js';
2
- export { buildRuntimeSnapshot, parseView, formatEnvironmentFragment, } from './runtime-snapshot.js';
2
+ export { buildRuntimeSnapshot, parseView, formatEnvironmentFragment, formatEnvironmentDateLine, } from './runtime-snapshot.js';
3
3
  export { buildRuntimeStateSource, type RuntimeSourceDeps, } from './runtime-source.js';
4
4
  export { getRuntimeStateTool, AWARENESS_TOOL_NAMES, createGetRuntimeStateHandler, wrapDispatcherWithRuntimeState, } from './tool.js';
5
5
  export { gatherWorkspace } from './workspace-source.js';
@@ -11,3 +11,4 @@ export declare function formatEnvironmentFragment(args: {
11
11
  now?: Date;
12
12
  timeZone?: string;
13
13
  }): string;
14
+ export declare function formatEnvironmentDateLine(now: Date, timeZone?: string): string;
@@ -0,0 +1 @@
1
+ export declare function refreshEnvironmentDate(systemPrompt: string, now?: Date, timeZone?: string): string;
@@ -1,3 +1,3 @@
1
1
  import type { RawMessageStreamEvent } from '@anthropic-ai/sdk/resources';
2
2
  import type { TranslateCtx, TranslateOutput } from './types.js';
3
- export declare function translateMessageStream(events: AsyncIterable<RawMessageStreamEvent>, ctx: TranslateCtx): AsyncIterable<TranslateOutput>;
3
+ export declare function translateMessageStream(events: AsyncIterable<RawMessageStreamEvent>, ctx: TranslateCtx, onRawProgress?: () => void): AsyncIterable<TranslateOutput>;
@@ -0,0 +1,15 @@
1
+ export declare const DEFAULT_MODEL_STALL_TIMEOUT_MS = 1200000;
2
+ export declare function resolveStallTimeoutMs(): number;
3
+ export declare const STALL_TIMEOUT_MESSAGE = "model_stream_stall_timeout";
4
+ export declare function isStallTimeoutError(err: unknown): boolean;
5
+ export declare function stallTimeoutError(timeoutMs: number): Error;
6
+ export interface StreamStallHandle {
7
+ readonly signal: AbortSignal;
8
+ timedOut(): boolean;
9
+ progress(): void;
10
+ dispose(): void;
11
+ }
12
+ export declare function armStreamStallWatchdog(baseSignal: AbortSignal, timeoutMs: number, onFire?: (info: {
13
+ stallTimeoutMs: number;
14
+ elapsedSinceLastProgressMs: number;
15
+ }) => void): StreamStallHandle;
@@ -0,0 +1,2 @@
1
+ export declare const MAX_TIMER_DELAY_MS = 2147483647;
2
+ export declare function clampTimerDelayMs(ms: number): number;