agent-afk 5.35.1 → 5.35.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.
@@ -0,0 +1,8 @@
1
+ export declare function readOpenRootFor(base: string | undefined): string;
2
+ export interface InheritedReadRootsArgs {
3
+ parentReadRoots: string[] | undefined;
4
+ parentCwd: string | undefined;
5
+ childCwd: string | undefined;
6
+ worktreeMainRoot?: string | undefined;
7
+ }
8
+ export declare function computeInheritedReadRoots(args: InheritedReadRootsArgs): string[] | undefined;
@@ -37,6 +37,7 @@ export interface SubagentManagerOptions {
37
37
  baseUrl?: string;
38
38
  parentModel?: string;
39
39
  cwd?: string;
40
+ parentReadRoots?: string[];
40
41
  traceWriter?: TraceWriter;
41
42
  surface?: Surface;
42
43
  onSubagentSucceeded?: (usage: import('./subagent/result.js').SubagentTrace['usage'], costUsd: number | undefined) => void;
@@ -50,6 +51,7 @@ export declare class SubagentManager {
50
51
  private readonly parentBaseUrl;
51
52
  private readonly parentProvider;
52
53
  private parentCwd;
54
+ private readonly parentReadRoots;
53
55
  private readonly worktreeMainRootCache;
54
56
  private readonly parentTraceWriter;
55
57
  private readonly parentSurface;
@@ -64,6 +66,10 @@ export declare class SubagentManager {
64
66
  onChildAborted(listener: ChildAbortedListener): () => void;
65
67
  setOnSubagentSucceeded(cb: (usage: import('./subagent/result.js').SubagentTrace['usage'], costUsd: number | undefined) => void): void;
66
68
  setCwd(cwd: string): void;
69
+ getReadScopeInputs(): {
70
+ parentReadRoots: string[] | undefined;
71
+ parentCwd: string | undefined;
72
+ };
67
73
  private resolveMainRootForCwd;
68
74
  abortAll(reason?: unknown, origin?: AbortOrigin): void;
69
75
  forkSubagent<T = unknown>(options: ForkSubagentOptions<T>): Promise<SubagentHandle<T>>;
@@ -19,6 +19,7 @@ export interface BuildChildConfigArgs {
19
19
  depth: number;
20
20
  maxDepth: number;
21
21
  currentCwd: string | undefined;
22
+ childInheritedReadRoots?: string[];
22
23
  signal: AbortSignal;
23
24
  defaultConfig: Pick<AgentConfig, 'apiKey' | 'systemPrompt' | 'baseUrl' | 'openaiBaseUrl'>;
24
25
  resolveApiKeyForModel?: (model: string) => string | undefined;
@@ -15,6 +15,7 @@ import { ContextSampler } from '../../context-sampler.js';
15
15
  import type { GitStatusSampler } from '../../git-status-sampler.js';
16
16
  export type { ResumeSwapResult } from '../../slash/types.js';
17
17
  export declare function reseedStatsFromStored(stats: SessionStats, stored: StoredSession, resumeId: string): void;
18
+ export declare function resolveResumeCwd(extrasCwd: string | undefined, storedCwd: string | undefined): string | undefined;
18
19
  export declare function printResumeBanner(stats: SessionStats, writer: CompletionWriter): void;
19
20
  export type { ThinkingUiMode } from '../../slash/types.js';
20
21
  export interface CliOptions {