agent-afk 5.83.2 → 5.83.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.
@@ -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;
@@ -1,6 +1,7 @@
1
1
  import type Anthropic from '@anthropic-ai/sdk';
2
2
  import type { ProviderEvent } from '../../../provider.js';
3
3
  import type { AuthMode, RunTurnInput } from '../types.js';
4
+ export declare const TWO_HOURS_MS: number;
4
5
  export declare const RATE_LIMIT_TRANSIENT_MAX_RETRIES = 3;
5
6
  export declare const RATE_LIMIT_RETRY_MAX_WAIT_MS = 120000;
6
7
  export interface RetryLayerOptions {
@@ -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 {};
@@ -11,5 +11,6 @@ export { loadCredential, normalizeOpenAIBaseUrl, _resetOpenAIBaseUrlWarnCache, }
11
11
  export declare function _resetConfigCache(): void;
12
12
  export declare function loadTelegramConfig(): NonNullable<CliConfig['telegram']>;
13
13
  export declare function resolveCliPermissionMode(): PermissionMode;
14
+ export declare function resolveAutoResumeOnUsageLimit(): boolean;
14
15
  export declare function loadConfig(overrides?: Partial<CliConfig>): CliConfig;
15
16
  export declare function resolvedProviderName(config: CliConfig): BundledProviderName;
@@ -1,6 +1,8 @@
1
1
  import { type QuotaWindows } from './quota-indicator.js';
2
2
  export type QuotaUsageTier = 'quiet' | 'caution' | 'near' | 'over';
3
- export declare function formatQuotaUsage(windows: QuotaWindows | undefined, now?: Date): {
3
+ export declare function formatQuotaUsage(windows: QuotaWindows | undefined, now?: Date, opts?: {
4
+ autoResume?: boolean;
5
+ }): {
4
6
  tier: QuotaUsageTier;
5
7
  text: string | null;
6
8
  };
@@ -18,11 +18,14 @@ interface StatusLineOpts {
18
18
  stream?: NodeJS.WriteStream;
19
19
  force?: boolean;
20
20
  throttleMs?: number;
21
+ tickMs?: number;
21
22
  }
22
23
  export declare class StatusLine {
23
24
  private readonly stream;
24
25
  private readonly force;
25
26
  private readonly throttleMs;
27
+ private readonly tickMs;
28
+ private tickTimer;
26
29
  private started;
27
30
  private lastRepaint;
28
31
  private lastFields;