agent-afk 5.359.0 → 5.360.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.
@@ -7,9 +7,21 @@ export interface GithubPollerOptions {
7
7
  pollIntervalMs?: number;
8
8
  queueDir?: string;
9
9
  stateDir?: string;
10
+ telemetryPath?: string;
10
11
  ghRunner?: GhRunner;
11
12
  }
12
13
  export type GhRunner = (path: string, extraArgs?: string[]) => Promise<unknown>;
14
+ export interface GithubPollerTickRecord {
15
+ timestamp: string;
16
+ surface: 'github-event-poller';
17
+ repo: string;
18
+ events: GithubEventType[];
19
+ fetched: number;
20
+ enqueued: number;
21
+ skipped: number;
22
+ fetchError?: string;
23
+ tickError?: string;
24
+ }
13
25
  export declare const MAX_SEEN_FOR_TESTS = 10000;
14
26
  export declare function _pruneSeen(seen: Set<string>): Set<string>;
15
27
  export declare function renderCommand(template: string, eventType: GithubEventType, repo: string, eventId: string, payloadSummary: string): string;
@@ -20,6 +32,7 @@ export declare class GithubEventPoller {
20
32
  private readonly pollIntervalMs;
21
33
  private readonly queueDir;
22
34
  private readonly stateDir;
35
+ private readonly telemetryPath;
23
36
  private readonly run;
24
37
  private timer;
25
38
  private polling;
@@ -11,3 +11,4 @@ export interface PrepareDispatchModelResult extends ResolvedChildModel {
11
11
  apiKey: string | undefined;
12
12
  }
13
13
  export declare function prepareDispatchModel(input: DispatchModelPreparationInput): PrepareDispatchModelResult;
14
+ export declare function resolveChildMaxDepth(ctxMaxDepth: number | undefined): number;
@@ -42,7 +42,7 @@ export declare function emitPreToolUseBlock(blockedTool: string, reason: string,
42
42
  export declare function resetDenialBreaker(state: PreDispatchGateMutableState): void;
43
43
  export { applyHookBlockRepeatGate as applyHookBlockRepeat } from './dispatcher.hook-block-repeat-gate.js';
44
44
  export declare function resetProgressBreakers(state: PreDispatchGateMutableState): void;
45
- export declare function accountDenialBreakerPostGate(call: ToolCall, blockReason: string | undefined, blockResult: ToolResult, deps: PreDispatchGateDeps): ToolResult;
45
+ export declare function accountDenialBreakerPostGate(call: ToolCall, blockReason: string | undefined, blockResult: ToolResult, deps: PreDispatchGateDeps): Promise<ToolResult>;
46
46
  export declare function replayObserveSuspectedLoopPostGate(call: ToolCall, deps: PreDispatchGateDeps): void;
47
47
  export interface RunPreDispatchGatesOpts {
48
48
  parallelSafe?: boolean;
@@ -0,0 +1,7 @@
1
+ import type { ToolHandler } from '../types.js';
2
+ export interface ArtifactPublishHandlerOptions {
3
+ cwd?: string;
4
+ storeDir?: string;
5
+ indexPath?: string;
6
+ }
7
+ export declare function createArtifactPublishHandler(opts?: ArtifactPublishHandlerOptions): ToolHandler;
@@ -3,6 +3,6 @@ type Verdict = {
3
3
  destructive: boolean;
4
4
  reason?: string;
5
5
  };
6
- export declare function destructiveGitSegmentReason(argv: readonly string[], depth?: number): string | null;
7
- export declare function classifyDestructiveGit(command: string, depth?: number): Verdict;
6
+ export declare function destructiveGitSegmentReason(argv: readonly string[], depth?: number, literal?: boolean): string | null;
7
+ export declare function classifyDestructiveGit(command: string, depth?: number, literalParent?: boolean): Verdict;
8
8
  export {};
@@ -0,0 +1,14 @@
1
+ export type HereString = {
2
+ text: string | null;
3
+ io: string;
4
+ raw: string;
5
+ end: number;
6
+ position: number;
7
+ };
8
+ export declare function hereStringAt(command: string, start: number, position: number, io: string): HereString | null;
9
+ export declare function restoreHereStrings(header: string, words: readonly HereString[]): string;
10
+ export declare function continuedHereStringPipeline(words: readonly HereString[], preceding: string, header: string): boolean;
11
+ export declare function collectHereStrings(words: readonly HereString[], preceding: string, pipeline: (position: number) => {
12
+ context: string;
13
+ kind: string;
14
+ }, scripts: string[]): string | undefined;
@@ -0,0 +1 @@
1
+ export declare function isLiteralCommand(command: string): boolean;
@@ -2,4 +2,5 @@ import type { AnthropicToolDef } from './types.js';
2
2
  export declare const artifactGetTool: AnthropicToolDef;
3
3
  export declare const artifactListTool: AnthropicToolDef;
4
4
  export declare const artifactReadTool: AnthropicToolDef;
5
- export declare const artifactToolSchemas: readonly [AnthropicToolDef, AnthropicToolDef, AnthropicToolDef];
5
+ export declare const artifactPublishTool: AnthropicToolDef;
6
+ export declare const artifactToolSchemas: readonly [AnthropicToolDef, AnthropicToolDef, AnthropicToolDef, AnthropicToolDef];
@@ -764,6 +764,8 @@ export declare const TraceEventInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject
764
764
  compose_recovery_decision: "compose_recovery_decision";
765
765
  compose_leaf_tools_stripped: "compose_leaf_tools_stripped";
766
766
  hook_block_repeat_tripped: "hook_block_repeat_tripped";
767
+ denial_circuit_breaker_tripped: "denial_circuit_breaker_tripped";
768
+ endpoint_semaphore_wait: "endpoint_semaphore_wait";
767
769
  billing_settled: "billing_settled";
768
770
  subagent_model_fallback: "subagent_model_fallback";
769
771
  model_fallback: "model_fallback";
@@ -1260,6 +1262,8 @@ export declare const TraceEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1260
1262
  compose_recovery_decision: "compose_recovery_decision";
1261
1263
  compose_leaf_tools_stripped: "compose_leaf_tools_stripped";
1262
1264
  hook_block_repeat_tripped: "hook_block_repeat_tripped";
1265
+ denial_circuit_breaker_tripped: "denial_circuit_breaker_tripped";
1266
+ endpoint_semaphore_wait: "endpoint_semaphore_wait";
1263
1267
  billing_settled: "billing_settled";
1264
1268
  subagent_model_fallback: "subagent_model_fallback";
1265
1269
  model_fallback: "model_fallback";
@@ -50,6 +50,8 @@ export declare const SessionPhaseNameSchema: z.ZodEnum<{
50
50
  compose_recovery_decision: "compose_recovery_decision";
51
51
  compose_leaf_tools_stripped: "compose_leaf_tools_stripped";
52
52
  hook_block_repeat_tripped: "hook_block_repeat_tripped";
53
+ denial_circuit_breaker_tripped: "denial_circuit_breaker_tripped";
54
+ endpoint_semaphore_wait: "endpoint_semaphore_wait";
53
55
  billing_settled: "billing_settled";
54
56
  subagent_model_fallback: "subagent_model_fallback";
55
57
  model_fallback: "model_fallback";
@@ -111,6 +113,8 @@ export declare const SessionPhasePayloadSchema: z.ZodObject<{
111
113
  compose_recovery_decision: "compose_recovery_decision";
112
114
  compose_leaf_tools_stripped: "compose_leaf_tools_stripped";
113
115
  hook_block_repeat_tripped: "hook_block_repeat_tripped";
116
+ denial_circuit_breaker_tripped: "denial_circuit_breaker_tripped";
117
+ endpoint_semaphore_wait: "endpoint_semaphore_wait";
114
118
  billing_settled: "billing_settled";
115
119
  subagent_model_fallback: "subagent_model_fallback";
116
120
  model_fallback: "model_fallback";
@@ -1,4 +1,4 @@
1
- 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' | 'context_pressure_wind_down' | 'catalog_model_upgrade' | 'interrupt_halt' | 'rate_limit' | 'ttfb_timeout' | 'usage_limit_pause' | 'usage_limit_resume' | 'credential_swap' | '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' | 'connection_retry_exhausted' | 'connection_failure' | 'connection_recovered' | 'connection_budget_exhausted' | 'usage_notice' | 'tool_degraded' | 'strategy_nudge_fired' | 'stop_inject_dropped' | 'stop_hook_continuation' | 'stop_hook_cap_reached' | 'orphan_repair' | 'thinking_block_dropped' | 'background_process_started' | 'background_process_settled' | 'compose_recovery_decision' | 'compose_leaf_tools_stripped' | 'hook_block_repeat_tripped' | 'endpoint_semaphore_wait' | 'billing_settled' | 'subagent_model_fallback' | 'model_fallback' | 'round_cap_notice_dropped' | 'continuation_settle_degraded' | 'prompt_fragment_sizes' | 'ratelimit_unified_state' | 'auth_retry_outcome';
1
+ 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' | 'context_pressure_wind_down' | 'catalog_model_upgrade' | 'interrupt_halt' | 'rate_limit' | 'ttfb_timeout' | 'usage_limit_pause' | 'usage_limit_resume' | 'credential_swap' | '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' | 'connection_retry_exhausted' | 'connection_failure' | 'connection_recovered' | 'connection_budget_exhausted' | 'usage_notice' | 'tool_degraded' | 'strategy_nudge_fired' | 'stop_inject_dropped' | 'stop_hook_continuation' | 'stop_hook_cap_reached' | 'orphan_repair' | 'thinking_block_dropped' | 'background_process_started' | 'background_process_settled' | 'compose_recovery_decision' | 'compose_leaf_tools_stripped' | 'hook_block_repeat_tripped' | 'denial_circuit_breaker_tripped' | 'endpoint_semaphore_wait' | 'billing_settled' | 'subagent_model_fallback' | 'model_fallback' | 'round_cap_notice_dropped' | 'continuation_settle_degraded' | 'prompt_fragment_sizes' | 'ratelimit_unified_state' | 'auth_retry_outcome';
2
2
  export interface SessionPhasePayload {
3
3
  phase: SessionPhaseName;
4
4
  durationMs?: number;
@@ -99,7 +99,7 @@ Dispatch one sub-agent per site in this layer, all in parallel, each in a worktr
99
99
  - The `diff_applied` for that site
100
100
  - The `failure_reason`
101
101
  - The current layer number and which layers (if any) already completed successfully
102
- - Recommendation: "Revert layer N changes manually (e.g. `git diff > saved.patch` then `git checkout -- .` to discard, or `git switch -c rescue-<name>` to preserve), then diagnose with `/diagnose`."
102
+ - Recommendation: "Preserve layer N changes with `git diff > saved.patch` or `git switch -c rescue-<name>`, then diagnose with `/diagnose`. Child sessions must not use checkout/restore to discard changes. If restoring one file is intentional, use `git show <ref>:<path> > <path>` (quote paths and preserve local edits first; this overwrites the file), or report the requirement to the caller."
103
103
 
104
104
  ---
105
105