agent-afk 5.253.1 → 5.254.1
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/session/session-id-trace.d.ts +2 -0
- package/dist/agent/session/session-state.d.ts +4 -1
- package/dist/agent/trace/events.d.ts +10 -0
- package/dist/agent/trace/types.d.ts +3 -1
- package/dist/cli.mjs +251 -246
- package/dist/index.mjs +111 -111
- package/dist/telegram.mjs +131 -131
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SessionIdentity, SessionMetadata } from '../types.js';
|
|
2
|
+
export type OnSessionIdAssigned = (sessionId: string, priorSessionId: string | undefined) => void;
|
|
2
3
|
export declare class SessionStateManager {
|
|
3
4
|
private initializationPromise;
|
|
4
5
|
private resolveInitialization;
|
|
@@ -6,7 +7,9 @@ export declare class SessionStateManager {
|
|
|
6
7
|
private initializationSettled;
|
|
7
8
|
private sessionMetadata;
|
|
8
9
|
private sessionIdentity;
|
|
9
|
-
|
|
10
|
+
private onSessionIdAssigned?;
|
|
11
|
+
private lastEmittedSessionId;
|
|
12
|
+
constructor(sessionIdentity: SessionIdentity, initialMetadata: SessionMetadata, onSessionIdAssigned?: OnSessionIdAssigned);
|
|
10
13
|
waitForInitialization(): Promise<SessionMetadata>;
|
|
11
14
|
getSessionIdentity(): SessionIdentity;
|
|
12
15
|
getSessionMetadata(): SessionMetadata;
|
|
@@ -526,6 +526,7 @@ export declare const SessionPhaseNameSchema: z.ZodEnum<{
|
|
|
526
526
|
workspace_subscribed: "workspace_subscribed";
|
|
527
527
|
workspace_delivery: "workspace_delivery";
|
|
528
528
|
gate_shape: "gate_shape";
|
|
529
|
+
session_id_assigned: "session_id_assigned";
|
|
529
530
|
}>;
|
|
530
531
|
export declare const SessionPhasePayloadSchema: z.ZodObject<{
|
|
531
532
|
phase: z.ZodEnum<{
|
|
@@ -555,6 +556,7 @@ export declare const SessionPhasePayloadSchema: z.ZodObject<{
|
|
|
555
556
|
workspace_subscribed: "workspace_subscribed";
|
|
556
557
|
workspace_delivery: "workspace_delivery";
|
|
557
558
|
gate_shape: "gate_shape";
|
|
559
|
+
session_id_assigned: "session_id_assigned";
|
|
558
560
|
}>;
|
|
559
561
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
560
562
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -571,6 +573,8 @@ export declare const SessionPhasePayloadSchema: z.ZodObject<{
|
|
|
571
573
|
main: "main";
|
|
572
574
|
subagent: "subagent";
|
|
573
575
|
}>>;
|
|
576
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
577
|
+
priorSessionId: z.ZodOptional<z.ZodString>;
|
|
574
578
|
}, z.core.$strip>;
|
|
575
579
|
export declare const SessionSealedPayloadSchema: z.ZodObject<{
|
|
576
580
|
status: z.ZodEnum<{
|
|
@@ -918,6 +922,7 @@ export declare const TraceEventInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
918
922
|
workspace_subscribed: "workspace_subscribed";
|
|
919
923
|
workspace_delivery: "workspace_delivery";
|
|
920
924
|
gate_shape: "gate_shape";
|
|
925
|
+
session_id_assigned: "session_id_assigned";
|
|
921
926
|
}>;
|
|
922
927
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
923
928
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -934,6 +939,8 @@ export declare const TraceEventInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
934
939
|
main: "main";
|
|
935
940
|
subagent: "subagent";
|
|
936
941
|
}>>;
|
|
942
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
943
|
+
priorSessionId: z.ZodOptional<z.ZodString>;
|
|
937
944
|
}, z.core.$strip>;
|
|
938
945
|
}, z.core.$strip>], "kind">;
|
|
939
946
|
export declare const TraceEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1291,6 +1298,7 @@ export declare const TraceEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1291
1298
|
workspace_subscribed: "workspace_subscribed";
|
|
1292
1299
|
workspace_delivery: "workspace_delivery";
|
|
1293
1300
|
gate_shape: "gate_shape";
|
|
1301
|
+
session_id_assigned: "session_id_assigned";
|
|
1294
1302
|
}>;
|
|
1295
1303
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
1296
1304
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -1307,6 +1315,8 @@ export declare const TraceEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1307
1315
|
main: "main";
|
|
1308
1316
|
subagent: "subagent";
|
|
1309
1317
|
}>>;
|
|
1318
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1319
|
+
priorSessionId: z.ZodOptional<z.ZodString>;
|
|
1310
1320
|
}, z.core.$strip>;
|
|
1311
1321
|
}, z.core.$strip>, z.ZodObject<{
|
|
1312
1322
|
ts: z.ZodString;
|
|
@@ -177,7 +177,7 @@ export interface BrowserEventPayload {
|
|
|
177
177
|
};
|
|
178
178
|
durationMs: number;
|
|
179
179
|
}
|
|
180
|
-
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';
|
|
180
|
+
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';
|
|
181
181
|
export interface SessionPhasePayload {
|
|
182
182
|
phase: SessionPhaseName;
|
|
183
183
|
durationMs?: number;
|
|
@@ -186,6 +186,8 @@ export interface SessionPhasePayload {
|
|
|
186
186
|
resolvedModel?: string;
|
|
187
187
|
origin?: 'cli' | 'telegram' | 'daemon' | 'web' | 'unknown';
|
|
188
188
|
actor?: 'main' | 'subagent';
|
|
189
|
+
sessionId?: string;
|
|
190
|
+
priorSessionId?: string;
|
|
189
191
|
}
|
|
190
192
|
export interface SessionSealedPayload {
|
|
191
193
|
status: 'succeeded' | 'failed' | 'cancelled';
|