agent-afk 5.83.2 → 5.83.3

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.
@@ -16,6 +16,7 @@ export interface SubagentDAGNode {
16
16
  readRoots?: string[];
17
17
  writeRoots?: string[];
18
18
  apiKey?: string;
19
+ maxToolUseIterations?: number;
19
20
  }
20
21
  export interface SubagentDAGOptions {
21
22
  manager: SubagentManager;
@@ -34,6 +34,9 @@ export type GuardedRemoveOutcome = {
34
34
  removed: false;
35
35
  reason: 'commits-ahead';
36
36
  commitsAhead: number;
37
+ } | {
38
+ removed: false;
39
+ reason: 'ignored-local-state';
37
40
  };
38
41
  export interface RemoveManagedWorktreeArgs {
39
42
  execFile: ExecFileFn;
@@ -54,8 +57,9 @@ export declare function createIsolatedWorktree(args: {
54
57
  export interface IsolatedTeardownResult {
55
58
  removed: boolean;
56
59
  preserved: boolean;
57
- reason?: 'dirty' | 'commits-ahead';
60
+ reason?: 'dirty' | 'commits-ahead' | 'ignored-local-state';
58
61
  }
62
+ export declare function describePreserveReason(reason: NonNullable<IsolatedTeardownResult['reason']>): string;
59
63
  export declare function teardownIsolatedWorktree(args: {
60
64
  execFile?: ExecFileFn;
61
65
  repoRoot: string;
@@ -0,0 +1,5 @@
1
+ export type IgnoredEntryClass = 'opaque' | 'inspectable' | 'protected';
2
+ export declare function normalizeIgnoredPath(relPath: string): string;
3
+ export declare function leafOf(normalizedPath: string): string;
4
+ export declare function isSensitiveLeaf(relPath: string): boolean;
5
+ export declare function classifyIgnoredEntry(relPath: string): IgnoredEntryClass;
@@ -0,0 +1,15 @@
1
+ import type { ExecFileFn } from './worktree-sweep.js';
2
+ export { classifyIgnoredEntry, isSensitiveLeaf, type IgnoredEntryClass, } from './worktree-ignored-patterns.js';
3
+ export type IgnoredProbeVerdict = {
4
+ protect: false;
5
+ } | {
6
+ protect: true;
7
+ because: 'non-rebuildable-entry';
8
+ } | {
9
+ protect: true;
10
+ because: 'git-failed';
11
+ detail: string;
12
+ };
13
+ export declare function isRebuildableIgnoredEntry(relPath: string): boolean;
14
+ export declare function probeNonRebuildableIgnoredFiles(execFile: ExecFileFn, worktreePath: string): Promise<IgnoredProbeVerdict>;
15
+ export declare function hasNonRebuildableIgnoredFiles(execFile: ExecFileFn, worktreePath: string): Promise<boolean>;
@@ -1,2 +1,4 @@
1
+ export declare const DEFAULT_HEARTBEAT_INTERVAL_MS = 600000;
1
2
  export declare function worktreeRootFor(cwd: string): string | undefined;
2
- export declare function touchWorktreeOccupancy(cwd: string): Promise<void>;
3
+ export declare function touchWorktreeOccupancy(cwd: string, isCancelled?: () => boolean): Promise<void>;
4
+ export declare function startWorktreeOccupancyHeartbeat(cwd: string, intervalMs?: number): () => void;
@@ -1,6 +1,8 @@
1
1
  import { type PresenceRecord } from './awareness/presence.js';
2
2
  export type ExecFileFn = (file: string, args: string[], opts?: {
3
3
  cwd?: string;
4
+ maxBuffer?: number;
5
+ timeout?: number;
4
6
  }) => Promise<{
5
7
  stdout: string;
6
8
  stderr: string;
@@ -30,5 +32,6 @@ export interface SweepResult {
30
32
  dryRun: boolean;
31
33
  candidates: SweepCandidateSummary[];
32
34
  }
35
+ export declare const MIN_EMPTY_AGE_MS = 3600000;
33
36
  export declare function runSweep(options: SweepOptions): Promise<SweepResult>;
34
37
  export {};