agent-afk 5.303.2 → 5.303.4
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/dag-subagent.d.ts +0 -2
- package/dist/agent/facets/derive.d.ts +2 -0
- package/dist/agent/facets/derive.downgrade.d.ts +11 -0
- package/dist/agent/facets/derive.trace.d.ts +6 -0
- package/dist/agent/facets/schema.d.ts +9 -1
- package/dist/cli/commands/interactive/detached-tool-notifier.d.ts +3 -0
- package/dist/cli.mjs +349 -346
- package/dist/http-client/egress-guard.lookup.d.ts +1 -0
- package/dist/index.mjs +146 -144
- package/dist/telegram.mjs +170 -168
- package/package.json +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ZodType } from 'zod';
|
|
2
|
-
import type { ContentBlockParam } from '@anthropic-ai/sdk/resources';
|
|
3
2
|
import type { AgentModelInput, CanUseTool, IAgentSession } from './types.js';
|
|
4
3
|
import type { ModelProvider } from './provider.js';
|
|
5
4
|
import type { SubagentManager } from './subagent.js';
|
|
@@ -30,7 +29,6 @@ export interface SubagentDAGNode {
|
|
|
30
29
|
provider?: ModelProvider;
|
|
31
30
|
depth?: number;
|
|
32
31
|
maxDepth?: number;
|
|
33
|
-
buildPromptAsync?: (inputs: Record<string, unknown>) => Promise<string | ContentBlockParam[]>;
|
|
34
32
|
resolvedAttachments?: ImageBlockAttachment[];
|
|
35
33
|
}
|
|
36
34
|
export interface SubagentDAGOptions {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { type SessionFacet, type StoredSessionInput, type SubagentToolSummary, type ToolEventInput } from './schema.js';
|
|
2
|
+
import type { TraceSignals } from './derive.trace.js';
|
|
2
3
|
export interface DeriveOptions {
|
|
3
4
|
sourceSessionPath?: string;
|
|
4
5
|
sourceSessionMtimeMs?: number;
|
|
5
6
|
derivedAt?: Date;
|
|
6
7
|
journalEvents?: ToolEventInput[];
|
|
7
8
|
subagentBreakdown?: SubagentToolSummary[];
|
|
9
|
+
traceSignals?: TraceSignals;
|
|
8
10
|
}
|
|
9
11
|
export declare function dedupeToolEvents(events: ToolEventInput[]): ToolEventInput[];
|
|
10
12
|
export declare function deriveSessionFacet(session: StoredSessionInput, options?: DeriveOptions): SessionFacet;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FacetOutcomeDowngradeReason } from './schema.js';
|
|
2
|
+
import type { TraceSignals } from './derive.trace.js';
|
|
3
|
+
export declare function checkDowngradeSignals({ parsedDeferred, parsedEvidence, filesWritten, filesEdited, commits, composePartialNodes, traceSignals, }: {
|
|
4
|
+
parsedDeferred: string | undefined;
|
|
5
|
+
parsedEvidence: string | undefined;
|
|
6
|
+
filesWritten: number;
|
|
7
|
+
filesEdited: number;
|
|
8
|
+
commits: number;
|
|
9
|
+
composePartialNodes: number;
|
|
10
|
+
traceSignals: TraceSignals | undefined;
|
|
11
|
+
}): FacetOutcomeDowngradeReason | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type DowngradableClosureReason = 'budget_exceeded' | 'iteration_cap' | 'truncated';
|
|
2
|
+
export interface TraceSignals {
|
|
3
|
+
traceClosureReason: DowngradableClosureReason | undefined;
|
|
4
|
+
hasSubagentBudgetExhaustion: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function parseTraceSignals(content: string): TraceSignals;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const FACET_VERSION =
|
|
2
|
+
export declare const FACET_VERSION = 11;
|
|
3
3
|
export declare const ToolEventInputSchema: z.ZodObject<{
|
|
4
4
|
toolName: z.ZodString;
|
|
5
5
|
toolUseId: z.ZodOptional<z.ZodString>;
|
|
@@ -88,6 +88,10 @@ export declare const FacetOutcomeDowngradeReasonSchema: z.ZodEnum<{
|
|
|
88
88
|
deferred_items: "deferred_items";
|
|
89
89
|
no_corroborating_evidence: "no_corroborating_evidence";
|
|
90
90
|
compose_partial_nodes: "compose_partial_nodes";
|
|
91
|
+
budget_exceeded_closure: "budget_exceeded_closure";
|
|
92
|
+
iteration_cap_closure: "iteration_cap_closure";
|
|
93
|
+
truncated_closure: "truncated_closure";
|
|
94
|
+
subagent_budget_exhaustion: "subagent_budget_exhaustion";
|
|
91
95
|
}>;
|
|
92
96
|
export type FacetOutcomeDowngradeReason = z.infer<typeof FacetOutcomeDowngradeReasonSchema>;
|
|
93
97
|
export declare const SubagentPersistenceSchema: z.ZodEnum<{
|
|
@@ -198,6 +202,10 @@ export declare const SessionFacetSchema: z.ZodObject<{
|
|
|
198
202
|
deferred_items: "deferred_items";
|
|
199
203
|
no_corroborating_evidence: "no_corroborating_evidence";
|
|
200
204
|
compose_partial_nodes: "compose_partial_nodes";
|
|
205
|
+
budget_exceeded_closure: "budget_exceeded_closure";
|
|
206
|
+
iteration_cap_closure: "iteration_cap_closure";
|
|
207
|
+
truncated_closure: "truncated_closure";
|
|
208
|
+
subagent_budget_exhaustion: "subagent_budget_exhaustion";
|
|
201
209
|
}>>;
|
|
202
210
|
primary_success: z.ZodString;
|
|
203
211
|
world_changes: z.ZodObject<{
|
|
@@ -4,15 +4,18 @@ export declare function buildDetachedToolInjection(result: DetachedToolResult):
|
|
|
4
4
|
export declare class DetachedToolNotifier {
|
|
5
5
|
private readonly registry;
|
|
6
6
|
private readonly tracked;
|
|
7
|
+
private readonly earlySettled;
|
|
7
8
|
private injections;
|
|
8
9
|
private notices;
|
|
9
10
|
onInjectable: (() => void) | null;
|
|
10
11
|
private readonly onSettled;
|
|
12
|
+
private _deliver;
|
|
11
13
|
constructor(registry: DetachableToolRegistry);
|
|
12
14
|
observe(event: ToolEvent): void;
|
|
13
15
|
hasPendingInjections(): boolean;
|
|
14
16
|
drainInjections(): string;
|
|
15
17
|
drainNotices(): string[];
|
|
18
|
+
markDelivered(_toolUseId: string): void;
|
|
16
19
|
reset(): void;
|
|
17
20
|
dispose(): void;
|
|
18
21
|
}
|