agent-afk 5.288.1 → 5.288.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.
- package/dist/agent/providers/anthropic-direct/loop/connection-error.d.ts +4 -0
- package/dist/agent/providers/anthropic-direct/loop/round-request.d.ts +10 -0
- package/dist/agent/providers/anthropic-direct/provider-runtime.d.ts +4 -2
- package/dist/agent/providers/openai-compatible/index.d.ts +2 -2
- package/dist/agent/providers/shared/connection-error.d.ts +3 -0
- package/dist/agent/providers/shared/provider-stores.d.ts +4 -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 +312 -312
- package/dist/index.mjs +129 -129
- package/dist/telegram.mjs +151 -151
- package/package.json +1 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { isConnectionPhaseNetworkError, isRetryableConnectionStatus, } from '../../shared/connection-error.js';
|
|
2
|
+
export declare const CONNECTION_ERROR_MAX_RETRIES = 2;
|
|
3
|
+
export declare const CONNECTION_ERROR_BASE_DELAY_MS = 1000;
|
|
4
|
+
export declare function connectionErrorCode(err: unknown): string | undefined;
|
|
@@ -5,6 +5,16 @@ import { type StreamStallHandle } from '../../shared/stream-stall-timeout.js';
|
|
|
5
5
|
import { type RoundRetryBudget } from './retry-budget.js';
|
|
6
6
|
import type { TurnAccumulator } from './turn-accumulator.js';
|
|
7
7
|
export declare function toWireTool(tool: AnthropicToolDef): WireToolDef;
|
|
8
|
+
export declare function createWithRetry(client: {
|
|
9
|
+
messages: {
|
|
10
|
+
create(params: unknown, opts: unknown): unknown;
|
|
11
|
+
};
|
|
12
|
+
}, params: AnthropicMessagesCreateParams, headers: Record<string, string>, requestSignal: AbortSignal, turnSignal: AbortSignal, onConnectionRetry?: (info: ConnectionRetryInfo) => void): Promise<AsyncIterable<unknown>>;
|
|
13
|
+
export interface ConnectionRetryInfo {
|
|
14
|
+
attempt: number;
|
|
15
|
+
delayMs: number;
|
|
16
|
+
error: Error;
|
|
17
|
+
}
|
|
8
18
|
export interface OpenRoundTransport {
|
|
9
19
|
kind: 'opened';
|
|
10
20
|
events: AsyncIterable<unknown>;
|
|
@@ -7,10 +7,10 @@ export declare const DEFAULT_MODEL = "claude-sonnet-4-6";
|
|
|
7
7
|
export declare class AnthropicDirectProvider implements ModelProvider {
|
|
8
8
|
readonly name = "anthropic-direct";
|
|
9
9
|
private readonly externalTools;
|
|
10
|
-
private
|
|
10
|
+
private _memoryStore;
|
|
11
11
|
private readonly workspaceStore;
|
|
12
12
|
private subscribeHandler;
|
|
13
|
-
private
|
|
13
|
+
private _stateStore;
|
|
14
14
|
private readonly providerFactory?;
|
|
15
15
|
private readonly skillExecutor?;
|
|
16
16
|
private readonly schemas;
|
|
@@ -33,6 +33,8 @@ export declare class AnthropicDirectProvider implements ModelProvider {
|
|
|
33
33
|
private _presenceSessionId;
|
|
34
34
|
private _mintedSessionId;
|
|
35
35
|
private readonly _spawnedPidRegistry;
|
|
36
|
+
private get memoryStore();
|
|
37
|
+
private get stateStore();
|
|
36
38
|
constructor(opts?: AnthropicDirectProviderOptions);
|
|
37
39
|
private buildDispatcher;
|
|
38
40
|
setSubscribeHandler(handler: import('../../tools/types.js').ToolHandler): void;
|
|
@@ -33,9 +33,9 @@ export interface OpenAICompatibleProviderOptions extends ChildSessionOptions {
|
|
|
33
33
|
export declare class OpenAICompatibleProvider implements ModelProvider {
|
|
34
34
|
readonly name = "openai-compatible";
|
|
35
35
|
private readonly providerOpts;
|
|
36
|
-
private
|
|
36
|
+
private _memoryStore;
|
|
37
37
|
private readonly workspaceStore;
|
|
38
|
-
private
|
|
38
|
+
private _stateStore;
|
|
39
39
|
private readonly schemas;
|
|
40
40
|
private _defaultHeaders;
|
|
41
41
|
private _sharedReadRoots;
|
|
@@ -756,6 +756,7 @@ export declare const TraceEventInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
756
756
|
session_id_assigned: "session_id_assigned";
|
|
757
757
|
many_image_degraded: "many_image_degraded";
|
|
758
758
|
stream_accepted_after_drop: "stream_accepted_after_drop";
|
|
759
|
+
connection_retry: "connection_retry";
|
|
759
760
|
}>;
|
|
760
761
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
761
762
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -1153,6 +1154,7 @@ export declare const TraceEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1153
1154
|
session_id_assigned: "session_id_assigned";
|
|
1154
1155
|
many_image_degraded: "many_image_degraded";
|
|
1155
1156
|
stream_accepted_after_drop: "stream_accepted_after_drop";
|
|
1157
|
+
connection_retry: "connection_retry";
|
|
1156
1158
|
}>;
|
|
1157
1159
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
1158
1160
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -29,6 +29,7 @@ export declare const SessionPhaseNameSchema: z.ZodEnum<{
|
|
|
29
29
|
session_id_assigned: "session_id_assigned";
|
|
30
30
|
many_image_degraded: "many_image_degraded";
|
|
31
31
|
stream_accepted_after_drop: "stream_accepted_after_drop";
|
|
32
|
+
connection_retry: "connection_retry";
|
|
32
33
|
}>;
|
|
33
34
|
export declare const SessionPhasePayloadSchema: z.ZodObject<{
|
|
34
35
|
phase: z.ZodEnum<{
|
|
@@ -61,6 +62,7 @@ export declare const SessionPhasePayloadSchema: z.ZodObject<{
|
|
|
61
62
|
session_id_assigned: "session_id_assigned";
|
|
62
63
|
many_image_degraded: "many_image_degraded";
|
|
63
64
|
stream_accepted_after_drop: "stream_accepted_after_drop";
|
|
65
|
+
connection_retry: "connection_retry";
|
|
64
66
|
}>;
|
|
65
67
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
66
68
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -186,7 +186,7 @@ export interface BrowserEventPayload {
|
|
|
186
186
|
};
|
|
187
187
|
durationMs: number;
|
|
188
188
|
}
|
|
189
|
-
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';
|
|
189
|
+
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' | 'connection_retry';
|
|
190
190
|
export interface SessionPhasePayload {
|
|
191
191
|
phase: SessionPhaseName;
|
|
192
192
|
durationMs?: number;
|