agent-afk 5.85.0 → 5.85.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.
@@ -0,0 +1,6 @@
1
+ export declare const MAX_ROOT_FAILURE_SUMMARY_CHARS = 500;
2
+ export interface RootFailure {
3
+ repoRoot: string;
4
+ reason: string;
5
+ }
6
+ export declare function summarizeRootFailures(failures: readonly RootFailure[]): string;
@@ -0,0 +1,14 @@
1
+ export interface PruneTickTotals {
2
+ removed: number;
3
+ warnings: number;
4
+ wouldRemove: number;
5
+ liveRoots: number;
6
+ previewRoots: number;
7
+ contestedRoots: number;
8
+ failedRoots: number;
9
+ totalRoots: number;
10
+ }
11
+ export declare function countPrunable(candidates: readonly {
12
+ verdict: string;
13
+ }[]): number;
14
+ export declare function formatWorktreePruneSummary(totals: PruneTickTotals): string;
@@ -1,5 +1,6 @@
1
1
  import type { ContentBlockParam } from '@anthropic-ai/sdk/resources';
2
2
  import type { AgentConfig } from './types/config-types.js';
3
+ import type { ToolFailureClass } from './trace/types.js';
3
4
  export interface ProviderSessionInfo {
4
5
  sessionId: string;
5
6
  model?: string;
@@ -91,6 +92,7 @@ export type ProviderEvent = {
91
92
  batchSize?: number;
92
93
  incomplete?: boolean;
93
94
  incompleteReason?: string;
95
+ failureClass?: ToolFailureClass;
94
96
  } | {
95
97
  type: 'tool.diff';
96
98
  toolUseId: string;
@@ -8,6 +8,7 @@ export interface ToolCallStartedPayload {
8
8
  }
9
9
  export declare const TOOL_FAILURE_CLASSES: readonly ["policy-refusal", "timeout", "permission-denied", "hook-block", "abort", "elicitation-declined", "denial-breaker", "repeat-failure"];
10
10
  export type ToolFailureClass = (typeof TOOL_FAILURE_CLASSES)[number];
11
+ export declare const BENIGN_FAILURE_CLASSES: ReadonlySet<ToolFailureClass>;
11
12
  export interface ToolCallCompletedPayload {
12
13
  phase: 'completed';
13
14
  toolUseId: string;
@@ -1,4 +1,5 @@
1
1
  import type { DiffPayload } from '../../utils/diff.js';
2
+ import type { ToolFailureClass } from '../trace/types.js';
2
3
  export type MessageRole = 'user' | 'assistant';
3
4
  export interface ResponseMetadata extends Record<string, unknown> {
4
5
  sessionId?: string;
@@ -57,6 +58,7 @@ export interface ToolResultChunk {
57
58
  display?: string;
58
59
  batchIndex?: number;
59
60
  batchSize?: number;
61
+ failureClass?: ToolFailureClass;
60
62
  metadata?: Record<string, unknown>;
61
63
  }
62
64
  export interface ToolDiffChunk {
@@ -0,0 +1 @@
1
+ export declare function normalizeRootPath(root: string): Promise<string>;
@@ -0,0 +1,8 @@
1
+ export interface RootLivenessResult<T> {
2
+ alive: T[];
3
+ dead: Set<string>;
4
+ duplicates: boolean;
5
+ }
6
+ export declare function classifyRootLiveness<T extends {
7
+ path: string;
8
+ }>(entries: readonly T[]): Promise<RootLivenessResult<T>>;
@@ -0,0 +1,3 @@
1
+ export declare function registerWorktreeRoot(repoRoot: string): Promise<void>;
2
+ export declare function readRegisteredWorktreeRoots(): Promise<string[]>;
3
+ export declare function sweepRootSet(primary: string | null): Promise<string[]>;
@@ -0,0 +1,3 @@
1
+ export declare const SOFT_LAUNCH_RUNS = 3;
2
+ export declare function readRootSweepCount(repoRoot: string): Promise<number | null>;
3
+ export declare function recordRootSweep(repoRoot: string): Promise<void>;
@@ -31,6 +31,7 @@ export interface SweepResult {
31
31
  warnings: string[];
32
32
  dryRun: boolean;
33
33
  candidates: SweepCandidateSummary[];
34
+ contested?: boolean;
34
35
  }
35
36
  export declare const MIN_EMPTY_AGE_MS = 3600000;
36
37
  export declare function runSweep(options: SweepOptions): Promise<SweepResult>;
@@ -1,9 +1,11 @@
1
1
  import type { ToolResultChunk } from '../../../agent/types/message-types.js';
2
+ import type { ToolFailureClass } from '../../../agent/trace/types.js';
2
3
  import { sanitizeLabel, sanitizeTextParagraph } from './tool-lane-format-sanitize.js';
3
4
  export { sanitizeLabel, sanitizeTextParagraph };
4
5
  export { shortenPaths, summarizeToolArgs, bracketPairAwareTruncate, formatToolLine, } from './tool-lane-format-args.js';
5
6
  export { MAX_OVERLAY_DIFF_LINES, FLUSH_DIFF_LINES_DEFAULT, formatDiffBlock, } from './tool-lane-format-diff.js';
6
- export declare function doneGlyph(isError: boolean | undefined): string;
7
+ export declare function doneGlyph(isError: boolean | undefined, failureClass?: ToolFailureClass): string;
8
+ export declare function isBenignFailure(failureClass: ToolFailureClass | undefined): boolean;
7
9
  export declare const MAX_VISIBLE_CHILDREN = 3;
8
10
  export declare const GROUP_THRESHOLD_DISPATCH = 2;
9
11
  export declare const GROUP_THRESHOLD_LEAF = 3;