agent-afk 5.78.1 → 5.79.0
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/bg-job-log.d.ts +1 -0
- package/dist/agent/hooks.d.ts +2 -0
- package/dist/agent/provider.d.ts +2 -0
- package/dist/agent/providers/anthropic-direct/types.d.ts +2 -0
- package/dist/agent/routing-telemetry.d.ts +1 -0
- package/dist/agent/subagent/result.d.ts +4 -0
- package/dist/agent/tools/dispatcher.d.ts +3 -0
- package/dist/agent/trace/events.d.ts +11 -0
- package/dist/agent/trace/types.d.ts +3 -0
- package/dist/cli.mjs +482 -482
- package/dist/index.mjs +141 -141
- package/dist/telegram.mjs +211 -211
- package/package.json +1 -1
package/dist/agent/hooks.d.ts
CHANGED
package/dist/agent/provider.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export interface RoutingDecisionEntry {
|
|
|
10
10
|
status?: string | undefined;
|
|
11
11
|
duration_ms?: number | undefined;
|
|
12
12
|
content_chars?: number | undefined;
|
|
13
|
+
stop_reason?: string | undefined;
|
|
13
14
|
error_message?: string | undefined;
|
|
14
15
|
schema_error?: string | undefined;
|
|
15
16
|
partial_output_chars?: number | undefined;
|
|
@@ -5,6 +5,10 @@ export type SubagentStatus = 'idle' | 'running' | 'succeeded' | 'failed' | 'canc
|
|
|
5
5
|
export declare const STREAM_INCOMPLETE = "stream_incomplete";
|
|
6
6
|
export declare function isIncompleteStopReason(stopReason: string | undefined): boolean;
|
|
7
7
|
export declare function annotateIfIncomplete(content: string, stopReason: string | undefined): string;
|
|
8
|
+
export declare function incompleteToolResultFields(stopReason: string | undefined): {
|
|
9
|
+
incomplete?: true;
|
|
10
|
+
incompleteReason?: string;
|
|
11
|
+
};
|
|
8
12
|
export interface SubagentToolCall {
|
|
9
13
|
id: string;
|
|
10
14
|
name: string;
|
|
@@ -32,6 +32,7 @@ export interface SessionToolDispatcherOptions {
|
|
|
32
32
|
env?: Record<string, string>;
|
|
33
33
|
sessionId?: string;
|
|
34
34
|
parentSessionId?: string;
|
|
35
|
+
subagentId?: string;
|
|
35
36
|
sessionGrantManager?: GrantManager;
|
|
36
37
|
traceWriter?: TraceWriter;
|
|
37
38
|
readOnlyBash?: boolean;
|
|
@@ -55,6 +56,7 @@ export declare class SessionToolDispatcher implements ToolDispatcher {
|
|
|
55
56
|
private readonly _env;
|
|
56
57
|
private readonly sessionId;
|
|
57
58
|
private readonly parentSessionId;
|
|
59
|
+
private readonly subagentId;
|
|
58
60
|
private readonly sessionGrantManager;
|
|
59
61
|
private readonly traceWriter;
|
|
60
62
|
private readonly readOnlyBash;
|
|
@@ -74,6 +76,7 @@ export declare class SessionToolDispatcher implements ToolDispatcher {
|
|
|
74
76
|
setResolveBase(newCwd: string): void;
|
|
75
77
|
get toolDefs(): readonly AnthropicToolDef[];
|
|
76
78
|
private checkReadOnlyBash;
|
|
79
|
+
private emitPreToolUseBlock;
|
|
77
80
|
private checkRepeatCircuitBreaker;
|
|
78
81
|
private observeSuspectedLoop;
|
|
79
82
|
private recordForkReadDenial;
|
|
@@ -23,6 +23,8 @@ export declare const ToolCallCompletedPayloadSchema: z.ZodObject<{
|
|
|
23
23
|
isError: z.ZodBoolean;
|
|
24
24
|
truncated: z.ZodBoolean;
|
|
25
25
|
durationMs: z.ZodNumber;
|
|
26
|
+
incomplete: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
incompleteReason: z.ZodOptional<z.ZodString>;
|
|
26
28
|
circuitBreaker: z.ZodOptional<z.ZodBoolean>;
|
|
27
29
|
failureClass: z.ZodOptional<z.ZodEnum<{
|
|
28
30
|
abort: "abort";
|
|
@@ -51,6 +53,8 @@ export declare const ToolCallPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
51
53
|
isError: z.ZodBoolean;
|
|
52
54
|
truncated: z.ZodBoolean;
|
|
53
55
|
durationMs: z.ZodNumber;
|
|
56
|
+
incomplete: z.ZodOptional<z.ZodBoolean>;
|
|
57
|
+
incompleteReason: z.ZodOptional<z.ZodString>;
|
|
54
58
|
circuitBreaker: z.ZodOptional<z.ZodBoolean>;
|
|
55
59
|
failureClass: z.ZodOptional<z.ZodEnum<{
|
|
56
60
|
abort: "abort";
|
|
@@ -87,6 +91,7 @@ export declare const HookDecisionPayloadSchema: z.ZodObject<{
|
|
|
87
91
|
decision: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"block">, z.ZodLiteral<"approve">]>>;
|
|
88
92
|
reason: z.ZodOptional<z.ZodString>;
|
|
89
93
|
blockedTool: z.ZodOptional<z.ZodString>;
|
|
94
|
+
subagentId: z.ZodOptional<z.ZodString>;
|
|
90
95
|
injectedContextBytes: z.ZodOptional<z.ZodNumber>;
|
|
91
96
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
92
97
|
approvalOutcome: z.ZodOptional<z.ZodEnum<{
|
|
@@ -561,6 +566,8 @@ export declare const TraceEventInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
561
566
|
isError: z.ZodBoolean;
|
|
562
567
|
truncated: z.ZodBoolean;
|
|
563
568
|
durationMs: z.ZodNumber;
|
|
569
|
+
incomplete: z.ZodOptional<z.ZodBoolean>;
|
|
570
|
+
incompleteReason: z.ZodOptional<z.ZodString>;
|
|
564
571
|
circuitBreaker: z.ZodOptional<z.ZodBoolean>;
|
|
565
572
|
failureClass: z.ZodOptional<z.ZodEnum<{
|
|
566
573
|
abort: "abort";
|
|
@@ -590,6 +597,7 @@ export declare const TraceEventInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
590
597
|
decision: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"block">, z.ZodLiteral<"approve">]>>;
|
|
591
598
|
reason: z.ZodOptional<z.ZodString>;
|
|
592
599
|
blockedTool: z.ZodOptional<z.ZodString>;
|
|
600
|
+
subagentId: z.ZodOptional<z.ZodString>;
|
|
593
601
|
injectedContextBytes: z.ZodOptional<z.ZodNumber>;
|
|
594
602
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
595
603
|
approvalOutcome: z.ZodOptional<z.ZodEnum<{
|
|
@@ -873,6 +881,8 @@ export declare const TraceEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
873
881
|
isError: z.ZodBoolean;
|
|
874
882
|
truncated: z.ZodBoolean;
|
|
875
883
|
durationMs: z.ZodNumber;
|
|
884
|
+
incomplete: z.ZodOptional<z.ZodBoolean>;
|
|
885
|
+
incompleteReason: z.ZodOptional<z.ZodString>;
|
|
876
886
|
circuitBreaker: z.ZodOptional<z.ZodBoolean>;
|
|
877
887
|
failureClass: z.ZodOptional<z.ZodEnum<{
|
|
878
888
|
abort: "abort";
|
|
@@ -904,6 +914,7 @@ export declare const TraceEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
904
914
|
decision: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"block">, z.ZodLiteral<"approve">]>>;
|
|
905
915
|
reason: z.ZodOptional<z.ZodString>;
|
|
906
916
|
blockedTool: z.ZodOptional<z.ZodString>;
|
|
917
|
+
subagentId: z.ZodOptional<z.ZodString>;
|
|
907
918
|
injectedContextBytes: z.ZodOptional<z.ZodNumber>;
|
|
908
919
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
909
920
|
approvalOutcome: z.ZodOptional<z.ZodEnum<{
|
|
@@ -16,6 +16,8 @@ export interface ToolCallCompletedPayload {
|
|
|
16
16
|
isError: boolean;
|
|
17
17
|
truncated: boolean;
|
|
18
18
|
durationMs: number;
|
|
19
|
+
incomplete?: boolean;
|
|
20
|
+
incompleteReason?: string;
|
|
19
21
|
circuitBreaker?: boolean;
|
|
20
22
|
failureClass?: ToolFailureClass;
|
|
21
23
|
batchIndex?: number;
|
|
@@ -30,6 +32,7 @@ export interface HookDecisionPayload {
|
|
|
30
32
|
decision?: 'block' | 'approve';
|
|
31
33
|
reason?: string;
|
|
32
34
|
blockedTool?: string;
|
|
35
|
+
subagentId?: string;
|
|
33
36
|
injectedContextBytes?: number;
|
|
34
37
|
durationMs?: number;
|
|
35
38
|
approvalOutcome?: AfkApprovalOutcome;
|