agent-afk 5.282.4 → 5.282.6
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.
- package/dist/agent/providers/anthropic-direct/loop/network-termination.d.ts +1 -1
- package/dist/agent/providers/openai-compatible/query/stream-drive.stream-error.d.ts +7 -3
- package/dist/agent/providers/openai-compatible/query/turn-driver.context-window.d.ts +2 -0
- package/dist/agent/providers/shared/network-termination.d.ts +1 -0
- package/dist/agent/trace/events.d.ts +2 -0
- package/dist/agent/trace/events.session-phase.d.ts +2 -0
- package/dist/agent/trace/types.d.ts +1 -1
- package/dist/cli.mjs +306 -306
- package/dist/index.mjs +127 -127
- package/dist/telegram.mjs +149 -149
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { isMidStreamNetworkTermination } from '../../shared/network-termination.js';
|
|
2
2
|
export declare function isMidStreamCut(err: unknown): boolean;
|
|
@@ -2,19 +2,23 @@ export interface RetryAction {
|
|
|
2
2
|
kind: 'retry';
|
|
3
3
|
delay: number;
|
|
4
4
|
source: 'stream';
|
|
5
|
-
reason: 'stall_timeout' | 'ttfb_timeout' | 'retry-after' | 'backoff';
|
|
5
|
+
reason: 'stall_timeout' | 'ttfb_timeout' | 'retry-after' | 'backoff' | 'network_termination';
|
|
6
6
|
attempt: number;
|
|
7
|
+
errorCode?: string;
|
|
7
8
|
}
|
|
8
9
|
export interface FatalAction {
|
|
9
10
|
kind: 'fatal';
|
|
10
11
|
error: Error;
|
|
11
12
|
}
|
|
13
|
+
export interface AcceptAction {
|
|
14
|
+
kind: 'accept';
|
|
15
|
+
}
|
|
12
16
|
export interface FallThroughAction {
|
|
13
17
|
kind: 'fall-through';
|
|
14
18
|
error: unknown;
|
|
15
19
|
}
|
|
16
|
-
export type StreamErrorAction = RetryAction | FatalAction | FallThroughAction;
|
|
17
|
-
export declare function classifyStreamError(err: unknown, contentYieldedThisAttempt: boolean, streamRetries: number, stallMs: number): {
|
|
20
|
+
export type StreamErrorAction = RetryAction | FatalAction | AcceptAction | FallThroughAction;
|
|
21
|
+
export declare function classifyStreamError(err: unknown, contentYieldedThisAttempt: boolean, streamRetries: number, stallMs: number, stallTimedOut?: boolean, ttfbTimedOut?: boolean, terminalFinishReason?: string | null, usageReceived?: boolean): {
|
|
18
22
|
action: StreamErrorAction;
|
|
19
23
|
newStreamRetries: number;
|
|
20
24
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isMidStreamNetworkTermination(err: unknown): boolean;
|
|
@@ -724,6 +724,7 @@ export declare const TraceEventInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
724
724
|
gate_shape: "gate_shape";
|
|
725
725
|
session_id_assigned: "session_id_assigned";
|
|
726
726
|
many_image_degraded: "many_image_degraded";
|
|
727
|
+
stream_accepted_after_drop: "stream_accepted_after_drop";
|
|
727
728
|
}>;
|
|
728
729
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
729
730
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -1102,6 +1103,7 @@ export declare const TraceEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1102
1103
|
gate_shape: "gate_shape";
|
|
1103
1104
|
session_id_assigned: "session_id_assigned";
|
|
1104
1105
|
many_image_degraded: "many_image_degraded";
|
|
1106
|
+
stream_accepted_after_drop: "stream_accepted_after_drop";
|
|
1105
1107
|
}>;
|
|
1106
1108
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
1107
1109
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -28,6 +28,7 @@ export declare const SessionPhaseNameSchema: z.ZodEnum<{
|
|
|
28
28
|
gate_shape: "gate_shape";
|
|
29
29
|
session_id_assigned: "session_id_assigned";
|
|
30
30
|
many_image_degraded: "many_image_degraded";
|
|
31
|
+
stream_accepted_after_drop: "stream_accepted_after_drop";
|
|
31
32
|
}>;
|
|
32
33
|
export declare const SessionPhasePayloadSchema: z.ZodObject<{
|
|
33
34
|
phase: z.ZodEnum<{
|
|
@@ -59,6 +60,7 @@ export declare const SessionPhasePayloadSchema: z.ZodObject<{
|
|
|
59
60
|
gate_shape: "gate_shape";
|
|
60
61
|
session_id_assigned: "session_id_assigned";
|
|
61
62
|
many_image_degraded: "many_image_degraded";
|
|
63
|
+
stream_accepted_after_drop: "stream_accepted_after_drop";
|
|
62
64
|
}>;
|
|
63
65
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
64
66
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -178,7 +178,7 @@ export interface BrowserEventPayload {
|
|
|
178
178
|
};
|
|
179
179
|
durationMs: number;
|
|
180
180
|
}
|
|
181
|
-
export type SessionPhaseName = 'bootstrap_start' | 'bootstrap_done' | 'session_init_start' | 'session_init_done' | 'mcp_connect_start' | 'mcp_connect_done' | 'mcp_server_start' | 'mcp_server_done' | 'loop_start' | 'loop_end' | 'model_ttfb' | 'interrupt_halt' | 'rate_limit' | 'ttfb_timeout' | 'usage_limit_pause' | 'usage_limit_resume' | 'overload_pause' | 'overload_resume' | 'idle_watchdog_fired' | 'pause_extension_granted' | 'suspected_loop' | 'compaction_disabled' | 'boot_warning' | 'workspace_subscribed' | 'workspace_delivery' | 'gate_shape' | 'session_id_assigned' | 'many_image_degraded';
|
|
181
|
+
export type SessionPhaseName = 'bootstrap_start' | 'bootstrap_done' | 'session_init_start' | 'session_init_done' | 'mcp_connect_start' | 'mcp_connect_done' | 'mcp_server_start' | 'mcp_server_done' | 'loop_start' | 'loop_end' | 'model_ttfb' | 'interrupt_halt' | 'rate_limit' | 'ttfb_timeout' | 'usage_limit_pause' | 'usage_limit_resume' | 'overload_pause' | 'overload_resume' | 'idle_watchdog_fired' | 'pause_extension_granted' | 'suspected_loop' | 'compaction_disabled' | 'boot_warning' | 'workspace_subscribed' | 'workspace_delivery' | 'gate_shape' | 'session_id_assigned' | 'many_image_degraded' | 'stream_accepted_after_drop';
|
|
182
182
|
export interface SessionPhasePayload {
|
|
183
183
|
phase: SessionPhaseName;
|
|
184
184
|
durationMs?: number;
|