@robota-sdk/agent-cli 3.0.0-beta.62 → 3.0.0-beta.64

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.
@@ -1,93 +1,42 @@
1
- import { IProviderDefinition, IProviderConfig } from '@robota-sdk/agent-core';
2
- import { ICommandModule, IBackgroundTaskRunner, ISubagentRunner, IInProcessSubagentRunnerDeps, ISubagentWorktreeAdapter, ISubagentJobStart, ISubagentJobHandle, TSubagentRunnerFactory, ISubagentWorktreePrepareRequest, IPreparedSubagentWorktree } from '@robota-sdk/agent-sdk';
3
-
4
- /**
5
- * CLI entry point — parses arguments, creates provider, and starts the Ink TUI.
6
- *
7
- * CLI composes provider definitions. SDK owns everything else
8
- * (config, context, session, tools).
9
- */
1
+ import { ICommandModule, IInProcessSubagentRunnerDeps, IProviderDefinition, TSubagentRunnerFactory } from "@robota-sdk/agent-framework";
2
+ import { GitWorktreeIsolationAdapter, IGitWorktreeIsolationAdapterOptions, ISubagentJobHandle, ISubagentJobStart, ISubagentRunner, ISubagentWorktreeAdapter, createGitWorktreeIsolationAdapter } from "@robota-sdk/agent-executor";
3
+ import { IProviderConfig, ISpinner, ITerminalOutput } from "@robota-sdk/agent-core";
10
4
 
5
+ //#region src/cli.d.ts
11
6
  /**
12
7
  * Main CLI orchestration function.
13
8
  */
14
9
  interface IStartCliOptions {
15
- commandModules?: readonly ICommandModule[];
16
- providerDefinitions?: readonly IProviderDefinition[];
10
+ commandModules?: readonly ICommandModule[];
11
+ providerDefinitions?: readonly IProviderDefinition[];
17
12
  }
18
13
  declare function startCli(options?: IStartCliOptions): Promise<void>;
19
-
20
- interface IManagedShellProcessRunnerOptions {
21
- killGraceMs?: number;
22
- }
23
- declare function createManagedShellProcessRunner(options?: IManagedShellProcessRunnerOptions): IBackgroundTaskRunner;
24
-
14
+ //#endregion
15
+ //#region src/subagents/child-process-subagent-runner.d.ts
25
16
  interface IChildProcessSubagentRunnerOptions {
26
- providerConfig?: IProviderConfig;
27
- workerPath?: string;
28
- execArgv?: string[];
29
- killGraceMs?: number;
30
- env?: NodeJS.ProcessEnv;
31
- worktreeIsolation?: boolean;
32
- worktreeAdapter?: ISubagentWorktreeAdapter;
33
- logsDir?: string;
17
+ providerConfig?: IProviderConfig;
18
+ workerPath?: string;
19
+ execArgv?: string[];
20
+ killGraceMs?: number;
21
+ env?: NodeJS.ProcessEnv;
22
+ worktreeIsolation?: boolean;
23
+ worktreeAdapter?: ISubagentWorktreeAdapter;
24
+ logsDir?: string;
34
25
  }
35
26
  declare function createChildProcessSubagentRunnerFactory(options?: IChildProcessSubagentRunnerOptions): TSubagentRunnerFactory;
36
27
  declare class ChildProcessSubagentRunner implements ISubagentRunner {
37
- private readonly deps;
38
- private readonly workerPath;
39
- private readonly execArgv?;
40
- private readonly killGraceMs;
41
- private readonly providerConfig?;
42
- private readonly env?;
43
- private readonly logsDir?;
44
- constructor(deps: IInProcessSubagentRunnerDeps, options?: IChildProcessSubagentRunnerOptions);
45
- start(job: ISubagentJobStart): ISubagentJobHandle;
46
- private createStartPayload;
47
- private resolveTranscriptPath;
48
- }
49
-
50
- interface IGitWorktreeIsolationAdapterOptions {
51
- worktreeDir?: string;
52
- branchPrefix?: string;
53
- idFactory?: () => string;
54
- maxCreateAttempts?: number;
55
- }
56
- declare function createGitWorktreeIsolationAdapter(options?: IGitWorktreeIsolationAdapterOptions): ISubagentWorktreeAdapter;
57
- declare class GitWorktreeIsolationAdapter implements ISubagentWorktreeAdapter {
58
- private readonly worktreeDir;
59
- private readonly branchPrefix;
60
- private readonly idFactory;
61
- private readonly maxCreateAttempts;
62
- constructor(options?: IGitWorktreeIsolationAdapterOptions);
63
- prepare(request: ISubagentWorktreePrepareRequest): IPreparedSubagentWorktree;
64
- isClean(worktree: IPreparedSubagentWorktree): boolean;
65
- getStatus(worktree: IPreparedSubagentWorktree): string;
66
- remove(worktree: IPreparedSubagentWorktree): void;
67
- }
68
-
69
- /**
70
- * CLI-specific types for terminal I/O abstraction.
71
- */
72
- /**
73
- * Spinner handle returned by ITerminalOutput.spinner()
74
- */
75
- interface ISpinner {
76
- stop(): void;
77
- update(message: string): void;
78
- }
79
- /**
80
- * Terminal output abstraction — injected into all components that need I/O
81
- */
82
- interface ITerminalOutput {
83
- write(text: string): void;
84
- writeLine(text: string): void;
85
- writeMarkdown(md: string): void;
86
- writeError(text: string): void;
87
- prompt(question: string): Promise<string>;
88
- /** Arrow-key selector. Returns the index of the chosen option. */
89
- select(options: string[], initialIndex?: number): Promise<number>;
90
- spinner(message: string): ISpinner;
91
- }
92
-
93
- export { ChildProcessSubagentRunner, GitWorktreeIsolationAdapter, type IChildProcessSubagentRunnerOptions, type IGitWorktreeIsolationAdapterOptions, type IManagedShellProcessRunnerOptions, type ISpinner, type ITerminalOutput, createChildProcessSubagentRunnerFactory, createGitWorktreeIsolationAdapter, createManagedShellProcessRunner, startCli };
28
+ private readonly deps;
29
+ private readonly workerPath;
30
+ private readonly execArgv?;
31
+ private readonly killGraceMs;
32
+ private readonly providerConfig?;
33
+ private readonly env?;
34
+ private readonly logsDir?;
35
+ constructor(deps: IInProcessSubagentRunnerDeps, options?: IChildProcessSubagentRunnerOptions);
36
+ start(job: ISubagentJobStart): ISubagentJobHandle;
37
+ private createStartPayload;
38
+ private resolveTranscriptPath;
39
+ }
40
+ //#endregion
41
+ export { ChildProcessSubagentRunner, GitWorktreeIsolationAdapter, type IChildProcessSubagentRunnerOptions, type IGitWorktreeIsolationAdapterOptions, type ISpinner, type ITerminalOutput, createChildProcessSubagentRunnerFactory, createGitWorktreeIsolationAdapter, startCli };
42
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/cli.ts","../../src/subagents/child-process-subagent-runner.ts"],"mappings":";;;;;;;;UA8LiB,gBAAA;EACf,cAAA,YAA0B,cAAA;EAC1B,mBAAA,YAA+B,mBAAmB;AAAA;AAAA,iBAyK9B,QAAA,CAAS,OAAA,GAAS,gBAAA,GAAwB,OAAO;;;UCrUtD,kCAAA;EACf,cAAA,GAAiB,eAAA;EACjB,UAAA;EACA,QAAA;EACA,WAAA;EACA,GAAA,GAAM,MAAA,CAAO,UAAA;EACb,iBAAA;EACA,eAAA,GAAkB,wBAAA;EAClB,OAAA;AAAA;AAAA,iBAGc,uCAAA,CACd,OAAA,GAAS,kCAAA,GACR,sBAAsB;AAAA,cAaZ,0BAAA,YAAsC,eAAA;EAAA,iBAS9B,IAAA;EAAA,iBARF,UAAA;EAAA,iBACA,QAAA;EAAA,iBACA,WAAA;EAAA,iBACA,cAAA;EAAA,iBACA,GAAA;EAAA,iBACA,OAAA;cAGE,IAAA,EAAM,4BAAA,EACvB,OAAA,GAAS,kCAAA;EAUX,KAAA,CAAM,GAAA,EAAK,iBAAA,GAAoB,kBAAA;EAAA,QA0CvB,kBAAA;EAAA,QAcA,qBAAA;AAAA"}