@smithers-orchestrator/agents 0.22.0 → 0.23.0
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.
- package/package.json +5 -4
- package/src/AmpAgent.js +26 -19
- package/src/AntigravityAgent.js +53 -18
- package/src/AntigravityAgentOptions.ts +45 -4
- package/src/BaseCliAgent/AgentGenerateOptions.ts +12 -0
- package/src/BaseCliAgent/BaseCliAgent.js +6 -1
- package/src/BaseCliAgent/taskContextEnv.js +31 -0
- package/src/ClaudeCodeAgent.js +19 -1
- package/src/ForgeAgent.js +26 -19
- package/src/HermesAgent.js +1 -1
- package/src/VibeAgent.js +214 -0
- package/src/VibeAgentOptions.ts +11 -0
- package/src/agent-contract/createSmithersAgentContract.js +1 -0
- package/src/agent-contract/renderSmithersAgentPromptGuidance.js +4 -0
- package/src/capability-registry/AgentCapabilityRegistry.ts +1 -1
- package/src/cli-capabilities/CliAgentCapabilityAdapterId.ts +4 -1
- package/src/cli-capabilities/CliAgentCapabilityReportEntry.ts +2 -0
- package/src/cli-capabilities/getCliAgentCapabilityDoctorReport.js +48 -1
- package/src/cli-capabilities/getCliAgentCapabilityReport.js +24 -0
- package/src/cli-capabilities/index.js +5 -0
- package/src/cli-surface/CliAgentSurfaceTypes.ts +34 -0
- package/src/cli-surface/cliAgentSurfaceManifest.js +490 -0
- package/src/cli-surface/index.js +5 -0
- package/src/index.d.ts +707 -386
- package/src/index.js +21 -0
- package/src/mcp/McpServerConfig.ts +19 -0
- package/src/mcp/McpToolset.ts +17 -0
- package/src/mcp/createMcpToolset.js +94 -0
- package/src/sanitizeForOpenAI.js +20 -17
package/src/index.d.ts
CHANGED
|
@@ -1,11 +1,101 @@
|
|
|
1
|
-
import { openai } from '@ai-sdk/openai';
|
|
2
1
|
import * as ai from 'ai';
|
|
3
2
|
import { ToolLoopAgent, ToolSet, ToolLoopAgentSettings } from 'ai';
|
|
4
|
-
import { anthropic } from '@ai-sdk/anthropic';
|
|
5
3
|
import { Effect } from 'effect';
|
|
6
4
|
import { SmithersError } from '@smithers-orchestrator/errors/SmithersError';
|
|
5
|
+
import { openai } from '@ai-sdk/openai';
|
|
6
|
+
import { anthropic } from '@ai-sdk/anthropic';
|
|
7
7
|
import * as zod_v4_core from 'zod/v4/core';
|
|
8
8
|
|
|
9
|
+
type CliAgentCapabilityAdapterId$1 = "claude" | "amp" | "antigravity" | "codex" | "forge" | "gemini" | "kimi" | "opencode" | "pi" | "vibe";
|
|
10
|
+
|
|
11
|
+
type CliAgentSurfaceOptionMapping$1 = {
|
|
12
|
+
option: string;
|
|
13
|
+
flag?: string;
|
|
14
|
+
env?: string;
|
|
15
|
+
notes?: string;
|
|
16
|
+
};
|
|
17
|
+
type CliAgentUnsupportedFlag$1 = {
|
|
18
|
+
flag: string;
|
|
19
|
+
replacement?: string;
|
|
20
|
+
reason: string;
|
|
21
|
+
};
|
|
22
|
+
type CliAgentSurfaceResumeContract$1 = {
|
|
23
|
+
kind: "flag" | "subcommand" | "env" | "none";
|
|
24
|
+
emitted: string[];
|
|
25
|
+
notes: string;
|
|
26
|
+
};
|
|
27
|
+
type CliAgentSurfaceManifestEntry$2 = {
|
|
28
|
+
id: CliAgentCapabilityAdapterId$1;
|
|
29
|
+
displayName: string;
|
|
30
|
+
binary: string;
|
|
31
|
+
packageExport: string;
|
|
32
|
+
defaultOutputFormat: "text" | "json" | "stream-json" | "rpc";
|
|
33
|
+
docsUrls: string[];
|
|
34
|
+
emittedFlags: string[];
|
|
35
|
+
supportedFlags: string[];
|
|
36
|
+
unsupportedFlags: CliAgentUnsupportedFlag$1[];
|
|
37
|
+
optionMappings: CliAgentSurfaceOptionMapping$1[];
|
|
38
|
+
resume: CliAgentSurfaceResumeContract$1;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
type AgentToolDescriptor$1 = {
|
|
42
|
+
description?: string;
|
|
43
|
+
source?: "builtin" | "mcp" | "extension" | "skill" | "runtime";
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
type AgentCapabilityRegistry$6 = {
|
|
47
|
+
version: 1;
|
|
48
|
+
engine: "claude-code" | "codex" | "antigravity" | "gemini" | "kimi" | "pi" | "amp" | "forge" | "opencode" | "vibe";
|
|
49
|
+
runtimeTools: Record<string, AgentToolDescriptor$1>;
|
|
50
|
+
mcp: {
|
|
51
|
+
bootstrap: "inline-config" | "project-config" | "allow-list" | "unsupported";
|
|
52
|
+
supportsProjectScope: boolean;
|
|
53
|
+
supportsUserScope: boolean;
|
|
54
|
+
};
|
|
55
|
+
skills: {
|
|
56
|
+
supportsSkills: boolean;
|
|
57
|
+
installMode?: "files" | "dir" | "plugin";
|
|
58
|
+
smithersSkillIds: string[];
|
|
59
|
+
};
|
|
60
|
+
humanInteraction: {
|
|
61
|
+
supportsUiRequests: boolean;
|
|
62
|
+
methods: string[];
|
|
63
|
+
};
|
|
64
|
+
builtIns: string[];
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @param {AgentCapabilityRegistry | null | undefined} registry
|
|
69
|
+
* @returns {string}
|
|
70
|
+
*/
|
|
71
|
+
declare function hashCapabilityRegistry(registry: AgentCapabilityRegistry$5 | null | undefined): string;
|
|
72
|
+
type AgentCapabilityRegistry$5 = AgentCapabilityRegistry$6;
|
|
73
|
+
|
|
74
|
+
type AgentCapabilityRegistry$4 = AgentCapabilityRegistry$6;
|
|
75
|
+
|
|
76
|
+
type CliAgentCapabilityReportEntry$2 = {
|
|
77
|
+
id: CliAgentCapabilityAdapterId$1;
|
|
78
|
+
binary: string;
|
|
79
|
+
fingerprint: string;
|
|
80
|
+
capabilities: AgentCapabilityRegistry$4;
|
|
81
|
+
surface: CliAgentSurfaceManifestEntry$2;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
type CliAgentCapabilityIssue$1 = {
|
|
85
|
+
code: string;
|
|
86
|
+
message: string;
|
|
87
|
+
severity: "error" | "warning";
|
|
88
|
+
};
|
|
89
|
+
type CliAgentCapabilityDoctorEntry$1 = CliAgentCapabilityReportEntry$2 & {
|
|
90
|
+
ok: boolean;
|
|
91
|
+
issues: CliAgentCapabilityIssue$1[];
|
|
92
|
+
};
|
|
93
|
+
type CliAgentCapabilityDoctorReport$3 = {
|
|
94
|
+
ok: boolean;
|
|
95
|
+
issueCount: number;
|
|
96
|
+
agents: CliAgentCapabilityDoctorEntry$1[];
|
|
97
|
+
};
|
|
98
|
+
|
|
9
99
|
type SmithersToolSurface$2 = "raw" | "semantic";
|
|
10
100
|
|
|
11
101
|
type SmithersListedTool$2 = {
|
|
@@ -30,6 +120,12 @@ type SmithersAgentContract$3 = {
|
|
|
30
120
|
docsGuidance: string;
|
|
31
121
|
};
|
|
32
122
|
|
|
123
|
+
type RunCommandResult = {
|
|
124
|
+
stdout: string;
|
|
125
|
+
stderr: string;
|
|
126
|
+
exitCode: number | null;
|
|
127
|
+
};
|
|
128
|
+
|
|
33
129
|
type PiExtensionUiResponse$1 = {
|
|
34
130
|
type: "extension_ui_response";
|
|
35
131
|
id: string;
|
|
@@ -47,7 +143,52 @@ type PiExtensionUiRequest$1 = {
|
|
|
47
143
|
[key: string]: unknown;
|
|
48
144
|
};
|
|
49
145
|
|
|
50
|
-
type
|
|
146
|
+
type CodexConfigOverrides = Record<string, string | number | boolean | object | null> | string[];
|
|
147
|
+
|
|
148
|
+
type AgentCliActionKind = "turn" | "command" | "tool" | "file_change" | "web_search" | "todo_list" | "reasoning" | "warning" | "note";
|
|
149
|
+
|
|
150
|
+
type AgentCliActionPhase = "started" | "updated" | "completed";
|
|
151
|
+
type AgentCliEventLevel = "debug" | "info" | "warning" | "error";
|
|
152
|
+
type AgentCliStartedEvent = {
|
|
153
|
+
type: "started";
|
|
154
|
+
engine: string;
|
|
155
|
+
title: string;
|
|
156
|
+
resume?: string;
|
|
157
|
+
detail?: Record<string, unknown>;
|
|
158
|
+
};
|
|
159
|
+
type AgentCliActionEvent = {
|
|
160
|
+
type: "action";
|
|
161
|
+
engine: string;
|
|
162
|
+
phase: AgentCliActionPhase;
|
|
163
|
+
entryType?: "thought" | "message";
|
|
164
|
+
action: {
|
|
165
|
+
id: string;
|
|
166
|
+
kind: AgentCliActionKind;
|
|
167
|
+
title: string;
|
|
168
|
+
detail?: Record<string, unknown>;
|
|
169
|
+
};
|
|
170
|
+
message?: string;
|
|
171
|
+
ok?: boolean;
|
|
172
|
+
level?: AgentCliEventLevel;
|
|
173
|
+
};
|
|
174
|
+
type AgentCliCompletedEvent = {
|
|
175
|
+
type: "completed";
|
|
176
|
+
engine: string;
|
|
177
|
+
ok: boolean;
|
|
178
|
+
answer?: string;
|
|
179
|
+
error?: string;
|
|
180
|
+
resume?: string;
|
|
181
|
+
usage?: Record<string, unknown>;
|
|
182
|
+
};
|
|
183
|
+
type AgentCliEvent$1 = AgentCliStartedEvent | AgentCliActionEvent | AgentCliCompletedEvent;
|
|
184
|
+
|
|
185
|
+
type CliOutputInterpreter$a = {
|
|
186
|
+
onStdoutLine?: (line: string) => AgentCliEvent$1[] | AgentCliEvent$1 | null | undefined;
|
|
187
|
+
onStderrLine?: (line: string) => AgentCliEvent$1[] | AgentCliEvent$1 | null | undefined;
|
|
188
|
+
onExit?: (result: RunCommandResult) => AgentCliEvent$1[] | AgentCliEvent$1 | null | undefined;
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
type BaseCliAgentOptions$2 = {
|
|
51
192
|
id?: string;
|
|
52
193
|
model?: string;
|
|
53
194
|
systemPrompt?: string;
|
|
@@ -61,7 +202,141 @@ type BaseCliAgentOptions$1 = {
|
|
|
61
202
|
extraArgs?: string[];
|
|
62
203
|
};
|
|
63
204
|
|
|
64
|
-
|
|
205
|
+
/**
|
|
206
|
+
* Loosely-typed generation options. The AI SDK passes a dynamic shape here
|
|
207
|
+
* (GenerateTextOptions / StreamTextOptions and provider-specific extensions)
|
|
208
|
+
* so we keep this permissive but avoid raw `any`.
|
|
209
|
+
*/
|
|
210
|
+
type AgentGenerateOptions$4 = {
|
|
211
|
+
prompt?: unknown;
|
|
212
|
+
messages?: unknown;
|
|
213
|
+
timeout?: unknown;
|
|
214
|
+
abortSignal?: AbortSignal;
|
|
215
|
+
rootDir?: string;
|
|
216
|
+
resumeSession?: string;
|
|
217
|
+
maxOutputBytes?: number;
|
|
218
|
+
onStdout?: (text: string) => void;
|
|
219
|
+
onStderr?: (text: string) => void;
|
|
220
|
+
onEvent?: (event: AgentCliEvent$1) => unknown;
|
|
221
|
+
retry?: unknown;
|
|
222
|
+
isRetry?: unknown;
|
|
223
|
+
retryAttempt?: unknown;
|
|
224
|
+
schemaRetry?: unknown;
|
|
225
|
+
[key: string]: unknown;
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
declare class BaseCliAgent {
|
|
229
|
+
/**
|
|
230
|
+
* @param {BaseCliAgentOptions} opts
|
|
231
|
+
*/
|
|
232
|
+
constructor(opts: BaseCliAgentOptions$1);
|
|
233
|
+
version: string;
|
|
234
|
+
tools: {};
|
|
235
|
+
capabilities: any;
|
|
236
|
+
id: string;
|
|
237
|
+
model: string | undefined;
|
|
238
|
+
systemPrompt: string | undefined;
|
|
239
|
+
cwd: string | undefined;
|
|
240
|
+
env: Record<string, string> | undefined;
|
|
241
|
+
yolo: boolean;
|
|
242
|
+
timeoutMs: number | undefined;
|
|
243
|
+
idleTimeoutMs: number | undefined;
|
|
244
|
+
maxOutputBytes: number | undefined;
|
|
245
|
+
extraArgs: string[] | undefined;
|
|
246
|
+
/**
|
|
247
|
+
* @param {AgentGenerateOptions | undefined} options
|
|
248
|
+
* @param {AgentInvocationOperation} operation
|
|
249
|
+
* @returns {Effect.Effect<GenerateTextResult<Record<string, never>, unknown>, SmithersError>}
|
|
250
|
+
*/
|
|
251
|
+
runGenerateEffect(options: AgentGenerateOptions$3 | undefined, operation: AgentInvocationOperation): Effect.Effect<GenerateTextResult$3<Record<string, never>, unknown>, SmithersError>;
|
|
252
|
+
/**
|
|
253
|
+
* @param {AgentGenerateOptions} [options]
|
|
254
|
+
* @returns {Promise<GenerateTextResult<Record<string, never>, unknown>>}
|
|
255
|
+
*/
|
|
256
|
+
generate(options?: AgentGenerateOptions$3): Promise<GenerateTextResult$3<Record<string, never>, unknown>>;
|
|
257
|
+
/**
|
|
258
|
+
* @param {AgentGenerateOptions} [options]
|
|
259
|
+
* @returns {Promise<StreamTextResult<Record<string, never>, unknown>>}
|
|
260
|
+
*/
|
|
261
|
+
stream(options?: AgentGenerateOptions$3): Promise<StreamTextResult<Record<string, never>, unknown>>;
|
|
262
|
+
/**
|
|
263
|
+
* @returns {CliOutputInterpreter | undefined}
|
|
264
|
+
*/
|
|
265
|
+
createOutputInterpreter(): CliOutputInterpreter$9 | undefined;
|
|
266
|
+
}
|
|
267
|
+
type AgentGenerateOptions$3 = AgentGenerateOptions$4;
|
|
268
|
+
type BaseCliAgentOptions$1 = BaseCliAgentOptions$2;
|
|
269
|
+
type CliOutputInterpreter$9 = CliOutputInterpreter$a;
|
|
270
|
+
type GenerateTextResult$3 = ai.GenerateTextResult<any, any>;
|
|
271
|
+
type StreamTextResult = ai.StreamTextResult<any, any>;
|
|
272
|
+
type AgentInvocationOperation = "generate" | "stream";
|
|
273
|
+
|
|
274
|
+
type BaseCliAgentOptions = BaseCliAgentOptions$2;
|
|
275
|
+
type CliOutputInterpreter$8 = CliOutputInterpreter$a;
|
|
276
|
+
|
|
277
|
+
type OpenCodeAgentOptions$1 = BaseCliAgentOptions & {
|
|
278
|
+
/** Model identifier (e.g., "anthropic/claude-opus-4-20250514", "openai/gpt-5.4") */
|
|
279
|
+
model?: string;
|
|
280
|
+
/** OpenCode agent name (maps to --agent flag, selects predefined agent config) */
|
|
281
|
+
agentName?: string;
|
|
282
|
+
/** Files to attach to the prompt via -f flags */
|
|
283
|
+
attachFiles?: string[];
|
|
284
|
+
/** Continue a previous session */
|
|
285
|
+
continueSession?: boolean;
|
|
286
|
+
/** Resume a specific session by ID */
|
|
287
|
+
sessionId?: string;
|
|
288
|
+
/** Provider-specific model variant/reasoning effort level */
|
|
289
|
+
variant?: string;
|
|
290
|
+
};
|
|
291
|
+
declare class OpenCodeAgent extends BaseCliAgent {
|
|
292
|
+
private readonly opts;
|
|
293
|
+
readonly capabilities: AgentCapabilityRegistry$4;
|
|
294
|
+
readonly cliEngine: "opencode";
|
|
295
|
+
constructor(opts?: OpenCodeAgentOptions$1);
|
|
296
|
+
createOutputInterpreter(): CliOutputInterpreter$8;
|
|
297
|
+
buildCommand(params: {
|
|
298
|
+
prompt: string;
|
|
299
|
+
systemPrompt?: string;
|
|
300
|
+
cwd: string;
|
|
301
|
+
options: any;
|
|
302
|
+
}): Promise<{
|
|
303
|
+
command: string;
|
|
304
|
+
args: string[];
|
|
305
|
+
outputFormat: "stream-json";
|
|
306
|
+
env?: Record<string, string>;
|
|
307
|
+
stdoutBannerPatterns: RegExp[];
|
|
308
|
+
stdoutErrorPatterns: RegExp[];
|
|
309
|
+
}>;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
type VibeAgentOptions$1 = BaseCliAgentOptions$2 & {
|
|
313
|
+
agent?: string;
|
|
314
|
+
maxTurns?: number;
|
|
315
|
+
maxPrice?: number;
|
|
316
|
+
maxTokens?: number;
|
|
317
|
+
enabledTools?: string[];
|
|
318
|
+
sessionId?: string;
|
|
319
|
+
continueSession?: boolean;
|
|
320
|
+
};
|
|
321
|
+
declare class VibeAgent extends BaseCliAgent {
|
|
322
|
+
private readonly opts;
|
|
323
|
+
readonly capabilities: AgentCapabilityRegistry$4;
|
|
324
|
+
readonly cliEngine: "vibe";
|
|
325
|
+
constructor(opts?: VibeAgentOptions$1);
|
|
326
|
+
createOutputInterpreter(): CliOutputInterpreter$8;
|
|
327
|
+
buildCommand(params: {
|
|
328
|
+
prompt: string;
|
|
329
|
+
systemPrompt?: string;
|
|
330
|
+
cwd: string;
|
|
331
|
+
options: any;
|
|
332
|
+
}): Promise<{
|
|
333
|
+
command: string;
|
|
334
|
+
args: string[];
|
|
335
|
+
outputFormat: "stream-json";
|
|
336
|
+
}>;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
type PiAgentOptions$2 = BaseCliAgentOptions$2 & {
|
|
65
340
|
provider?: string;
|
|
66
341
|
model?: string;
|
|
67
342
|
apiKey?: string;
|
|
@@ -101,6 +376,38 @@ type SdkAgentOptions<CALL_OPTIONS = never, TOOLS extends ToolSet = {}, MODEL = a
|
|
|
101
376
|
model: string | MODEL;
|
|
102
377
|
};
|
|
103
378
|
|
|
379
|
+
/**
|
|
380
|
+
* Options for {@link HermesAgent}.
|
|
381
|
+
*
|
|
382
|
+
* Hermes (Nous Research) exposes an OpenAI-compatible HTTP API
|
|
383
|
+
* (`/v1/chat/completions`), so a Hermes agent is reached the same way as any
|
|
384
|
+
* OpenAI-compatible endpoint: point `baseURL` at the Hermes server. These mirror
|
|
385
|
+
* the string-model form of `OpenAIAgentOptions`.
|
|
386
|
+
*/
|
|
387
|
+
type HermesAgentOptions$2<CALL_OPTIONS = never, TOOLS extends ToolSet = {}> = Omit<SdkAgentOptions<CALL_OPTIONS, TOOLS, ReturnType<typeof openai>>, "model"> & {
|
|
388
|
+
/**
|
|
389
|
+
* Model name exposed by your Hermes server. Defaults to `"hermes"`; override
|
|
390
|
+
* with whatever model id the server advertises.
|
|
391
|
+
*/
|
|
392
|
+
model?: string;
|
|
393
|
+
/**
|
|
394
|
+
* Base URL of the Hermes OpenAI-compatible API, e.g. `http://127.0.0.1:5123/v1`.
|
|
395
|
+
* Falls back to the `HERMES_BASE_URL` environment variable.
|
|
396
|
+
*/
|
|
397
|
+
baseURL?: string;
|
|
398
|
+
/**
|
|
399
|
+
* API key sent to the Hermes server. Falls back to `HERMES_API_KEY`, then
|
|
400
|
+
* `"hermes"` (local servers commonly ignore the value).
|
|
401
|
+
*/
|
|
402
|
+
apiKey?: string;
|
|
403
|
+
/**
|
|
404
|
+
* Enable AI SDK native structured output. Off by default because a local
|
|
405
|
+
* Hermes server may not honor JSON-schema response formats — leaving it off
|
|
406
|
+
* makes Smithers fall back to prompt-based JSON extraction.
|
|
407
|
+
*/
|
|
408
|
+
nativeStructuredOutput?: boolean;
|
|
409
|
+
};
|
|
410
|
+
|
|
104
411
|
type OpenAIAgentCommonOptions<CALL_OPTIONS, TOOLS extends ToolSet> = Omit<SdkAgentOptions<CALL_OPTIONS, TOOLS, ReturnType<typeof openai>>, "model"> & {
|
|
105
412
|
/**
|
|
106
413
|
* Disable AI SDK native structured output and let Smithers use prompt-based JSON extraction.
|
|
@@ -108,7 +415,6 @@ type OpenAIAgentCommonOptions<CALL_OPTIONS, TOOLS extends ToolSet> = Omit<SdkAge
|
|
|
108
415
|
*/
|
|
109
416
|
nativeStructuredOutput?: boolean;
|
|
110
417
|
};
|
|
111
|
-
|
|
112
418
|
type OpenAIAgentStringModelOptions = {
|
|
113
419
|
model: string;
|
|
114
420
|
/**
|
|
@@ -120,52 +426,15 @@ type OpenAIAgentStringModelOptions = {
|
|
|
120
426
|
*/
|
|
121
427
|
apiKey?: string;
|
|
122
428
|
};
|
|
123
|
-
|
|
124
429
|
type OpenAIAgentPrebuiltModelOptions = {
|
|
125
430
|
model: ReturnType<typeof openai>;
|
|
126
431
|
baseURL?: never;
|
|
127
432
|
apiKey?: never;
|
|
128
433
|
};
|
|
129
|
-
|
|
130
434
|
type OpenAIAgentOptions$2<CALL_OPTIONS = never, TOOLS extends ToolSet = {}> = OpenAIAgentCommonOptions<CALL_OPTIONS, TOOLS> & (OpenAIAgentStringModelOptions | OpenAIAgentPrebuiltModelOptions);
|
|
131
435
|
|
|
132
436
|
type AnthropicAgentOptions$2<CALL_OPTIONS = never, TOOLS extends ToolSet = {}> = SdkAgentOptions<CALL_OPTIONS, TOOLS, ReturnType<typeof anthropic>>;
|
|
133
437
|
|
|
134
|
-
type AgentToolDescriptor$1 = {
|
|
135
|
-
description?: string;
|
|
136
|
-
source?: "builtin" | "mcp" | "extension" | "skill" | "runtime";
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
type AgentCapabilityRegistry$3 = {
|
|
140
|
-
version: 1;
|
|
141
|
-
engine: "claude-code" | "codex" | "antigravity" | "gemini" | "kimi" | "pi" | "amp" | "forge" | "opencode";
|
|
142
|
-
runtimeTools: Record<string, AgentToolDescriptor$1>;
|
|
143
|
-
mcp: {
|
|
144
|
-
bootstrap: "inline-config" | "project-config" | "allow-list" | "unsupported";
|
|
145
|
-
supportsProjectScope: boolean;
|
|
146
|
-
supportsUserScope: boolean;
|
|
147
|
-
};
|
|
148
|
-
skills: {
|
|
149
|
-
supportsSkills: boolean;
|
|
150
|
-
installMode?: "files" | "dir" | "plugin";
|
|
151
|
-
smithersSkillIds: string[];
|
|
152
|
-
};
|
|
153
|
-
humanInteraction: {
|
|
154
|
-
supportsUiRequests: boolean;
|
|
155
|
-
methods: string[];
|
|
156
|
-
};
|
|
157
|
-
builtIns: string[];
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* @param {AgentCapabilityRegistry | null | undefined} registry
|
|
162
|
-
* @returns {string}
|
|
163
|
-
*/
|
|
164
|
-
declare function hashCapabilityRegistry(registry: AgentCapabilityRegistry$2 | null | undefined): string;
|
|
165
|
-
type AgentCapabilityRegistry$2 = AgentCapabilityRegistry$3;
|
|
166
|
-
|
|
167
|
-
type AgentCapabilityRegistry$1 = AgentCapabilityRegistry$3;
|
|
168
|
-
|
|
169
438
|
/**
|
|
170
439
|
* Represents an entity capable of generating responses or actions based on prompts.
|
|
171
440
|
* This is typically an AI agent interface.
|
|
@@ -176,7 +445,7 @@ type AgentLike$1 = {
|
|
|
176
445
|
/** Available tools the agent can use */
|
|
177
446
|
tools?: Record<string, unknown>;
|
|
178
447
|
/** Optional structured capability registry for cache and diagnostics */
|
|
179
|
-
capabilities?: AgentCapabilityRegistry$
|
|
448
|
+
capabilities?: AgentCapabilityRegistry$4;
|
|
180
449
|
/** True when the agent consumes outputSchema through a native structured-output API. */
|
|
181
450
|
supportsNativeStructuredOutput?: boolean;
|
|
182
451
|
/**
|
|
@@ -192,129 +461,11 @@ type AgentLike$1 = {
|
|
|
192
461
|
* @param args.outputSchema - Optional Zod schema defining the expected structured output format
|
|
193
462
|
* @returns A promise resolving to the generated output
|
|
194
463
|
*/
|
|
195
|
-
generate: (args?: AgentGenerateOptions) => Promise<unknown>;
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
type RunCommandResult = {
|
|
199
|
-
stdout: string;
|
|
200
|
-
stderr: string;
|
|
201
|
-
exitCode: number | null;
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
type CodexConfigOverrides = Record<string, string | number | boolean | object | null> | string[];
|
|
205
|
-
|
|
206
|
-
type AgentCliActionKind = "turn" | "command" | "tool" | "file_change" | "web_search" | "todo_list" | "reasoning" | "warning" | "note";
|
|
207
|
-
|
|
208
|
-
type AgentCliActionPhase = "started" | "updated" | "completed";
|
|
209
|
-
type AgentCliEventLevel = "debug" | "info" | "warning" | "error";
|
|
210
|
-
type AgentCliStartedEvent = {
|
|
211
|
-
type: "started";
|
|
212
|
-
engine: string;
|
|
213
|
-
title: string;
|
|
214
|
-
resume?: string;
|
|
215
|
-
detail?: Record<string, unknown>;
|
|
216
|
-
};
|
|
217
|
-
type AgentCliActionEvent = {
|
|
218
|
-
type: "action";
|
|
219
|
-
engine: string;
|
|
220
|
-
phase: AgentCliActionPhase;
|
|
221
|
-
entryType?: "thought" | "message";
|
|
222
|
-
action: {
|
|
223
|
-
id: string;
|
|
224
|
-
kind: AgentCliActionKind;
|
|
225
|
-
title: string;
|
|
226
|
-
detail?: Record<string, unknown>;
|
|
227
|
-
};
|
|
228
|
-
message?: string;
|
|
229
|
-
ok?: boolean;
|
|
230
|
-
level?: AgentCliEventLevel;
|
|
231
|
-
};
|
|
232
|
-
type AgentCliCompletedEvent = {
|
|
233
|
-
type: "completed";
|
|
234
|
-
engine: string;
|
|
235
|
-
ok: boolean;
|
|
236
|
-
answer?: string;
|
|
237
|
-
error?: string;
|
|
238
|
-
resume?: string;
|
|
239
|
-
usage?: Record<string, unknown>;
|
|
240
|
-
};
|
|
241
|
-
type AgentCliEvent$2 = AgentCliStartedEvent | AgentCliActionEvent | AgentCliCompletedEvent;
|
|
242
|
-
|
|
243
|
-
type CliOutputInterpreter$8 = {
|
|
244
|
-
onStdoutLine?: (line: string) => AgentCliEvent$2[] | AgentCliEvent$2 | null | undefined;
|
|
245
|
-
onStderrLine?: (line: string) => AgentCliEvent$2[] | AgentCliEvent$2 | null | undefined;
|
|
246
|
-
onExit?: (result: RunCommandResult) => AgentCliEvent$2[] | AgentCliEvent$2 | null | undefined;
|
|
247
|
-
};
|
|
248
|
-
|
|
249
|
-
declare class BaseCliAgent {
|
|
250
|
-
/**
|
|
251
|
-
* @param {BaseCliAgentOptions} opts
|
|
252
|
-
*/
|
|
253
|
-
constructor(opts: BaseCliAgentOptions);
|
|
254
|
-
version: string;
|
|
255
|
-
tools: {};
|
|
256
|
-
capabilities: any;
|
|
257
|
-
id: string;
|
|
258
|
-
model: string | undefined;
|
|
259
|
-
systemPrompt: string | undefined;
|
|
260
|
-
cwd: string | undefined;
|
|
261
|
-
env: Record<string, string> | undefined;
|
|
262
|
-
yolo: boolean;
|
|
263
|
-
timeoutMs: number | undefined;
|
|
264
|
-
idleTimeoutMs: number | undefined;
|
|
265
|
-
maxOutputBytes: number | undefined;
|
|
266
|
-
extraArgs: string[] | undefined;
|
|
267
|
-
/**
|
|
268
|
-
* @param {AgentGenerateOptions | undefined} options
|
|
269
|
-
* @param {AgentInvocationOperation} operation
|
|
270
|
-
* @returns {Effect.Effect<GenerateTextResult<Record<string, never>, unknown>, SmithersError>}
|
|
271
|
-
*/
|
|
272
|
-
runGenerateEffect(options: AgentGenerateOptions | undefined, operation: AgentInvocationOperation): Effect.Effect<GenerateTextResult$3<Record<string, never>, unknown>, SmithersError>;
|
|
273
|
-
/**
|
|
274
|
-
* @param {AgentGenerateOptions} [options]
|
|
275
|
-
* @returns {Promise<GenerateTextResult<Record<string, never>, unknown>>}
|
|
276
|
-
*/
|
|
277
|
-
generate(options?: AgentGenerateOptions): Promise<GenerateTextResult$3<Record<string, never>, unknown>>;
|
|
278
|
-
/**
|
|
279
|
-
* @param {AgentGenerateOptions} [options]
|
|
280
|
-
* @returns {Promise<StreamTextResult<Record<string, never>, unknown>>}
|
|
281
|
-
*/
|
|
282
|
-
stream(options?: AgentGenerateOptions): Promise<StreamTextResult<Record<string, never>, unknown>>;
|
|
283
|
-
/**
|
|
284
|
-
* @returns {CliOutputInterpreter | undefined}
|
|
285
|
-
*/
|
|
286
|
-
createOutputInterpreter(): CliOutputInterpreter$7 | undefined;
|
|
287
|
-
}
|
|
288
|
-
type AgentCliEvent$1 = AgentCliEvent$2;
|
|
289
|
-
type BaseCliAgentOptions = BaseCliAgentOptions$1;
|
|
290
|
-
type CliOutputInterpreter$7 = CliOutputInterpreter$8;
|
|
291
|
-
type GenerateTextResult$3 = ai.GenerateTextResult<any, any>;
|
|
292
|
-
type StreamTextResult = ai.StreamTextResult<any, any>;
|
|
293
|
-
type AgentInvocationOperation = "generate" | "stream";
|
|
294
|
-
/**
|
|
295
|
-
* Loosely-typed generation options. The AI SDK passes a dynamic shape here
|
|
296
|
-
* (GenerateTextOptions / StreamTextOptions and provider-specific extensions)
|
|
297
|
-
* so we keep this permissive but avoid raw `any`.
|
|
298
|
-
*/
|
|
299
|
-
type AgentGenerateOptions = {
|
|
300
|
-
prompt?: unknown;
|
|
301
|
-
messages?: unknown;
|
|
302
|
-
timeout?: unknown;
|
|
303
|
-
abortSignal?: AbortSignal;
|
|
304
|
-
rootDir?: string;
|
|
305
|
-
resumeSession?: string;
|
|
306
|
-
maxOutputBytes?: number;
|
|
307
|
-
onStdout?: (text: string) => void;
|
|
308
|
-
onStderr?: (text: string) => void;
|
|
309
|
-
onEvent?: (event: AgentCliEvent$1) => unknown;
|
|
310
|
-
retry?: unknown;
|
|
311
|
-
isRetry?: unknown;
|
|
312
|
-
retryAttempt?: unknown;
|
|
313
|
-
schemaRetry?: unknown;
|
|
314
|
-
[key: string]: unknown;
|
|
464
|
+
generate: (args?: AgentGenerateOptions$4) => Promise<unknown>;
|
|
315
465
|
};
|
|
316
466
|
|
|
317
467
|
/** @typedef {import("ai").AgentCallParameters} AgentCallParameters */
|
|
468
|
+
/** @typedef {import("./BaseCliAgent/AgentGenerateOptions.ts").AgentGenerateOptions} AgentGenerateOptions */
|
|
318
469
|
/**
|
|
319
470
|
* @template [CALL_OPTIONS=never], [TOOLS=import("ai").ToolSet]
|
|
320
471
|
* @typedef {import("./AnthropicAgentOptions.ts").AnthropicAgentOptions<CALL_OPTIONS, TOOLS>} AnthropicAgentOptions
|
|
@@ -330,16 +481,19 @@ declare class AnthropicAgent extends ToolLoopAgent<never, any, never> {
|
|
|
330
481
|
*/
|
|
331
482
|
constructor(opts: AnthropicAgentOptions$1<CALL_OPTIONS, TOOLS>);
|
|
332
483
|
hijackEngine: string;
|
|
484
|
+
supportsNativeStructuredOutput: boolean;
|
|
333
485
|
/**
|
|
334
486
|
* @param {AgentGenerateOptions} [args]
|
|
335
487
|
* @returns {Promise<GenerateTextResult<TOOLS, never>>}
|
|
336
488
|
*/
|
|
337
|
-
generate(args?: AgentGenerateOptions): Promise<GenerateTextResult$2<TOOLS, never>>;
|
|
489
|
+
generate(args?: AgentGenerateOptions$2): Promise<GenerateTextResult$2<TOOLS, never>>;
|
|
338
490
|
}
|
|
491
|
+
type AgentGenerateOptions$2 = AgentGenerateOptions$4;
|
|
339
492
|
type AnthropicAgentOptions$1<CALL_OPTIONS = never, TOOLS = ai.ToolSet> = AnthropicAgentOptions$2<CALL_OPTIONS, TOOLS>;
|
|
340
493
|
type GenerateTextResult$2 = ai.GenerateTextResult<any, any>;
|
|
341
494
|
|
|
342
495
|
/** @typedef {import("ai").AgentCallParameters} AgentCallParameters */
|
|
496
|
+
/** @typedef {import("./BaseCliAgent/AgentGenerateOptions.ts").AgentGenerateOptions} AgentGenerateOptions */
|
|
343
497
|
/**
|
|
344
498
|
* @template CALL_OPTIONS, TOOLS
|
|
345
499
|
* @typedef {AgentCallParameters<CALL_OPTIONS, TOOLS> & { onStdout?: (text: string) => void; onStderr?: (text: string) => void; onEvent?: (event: unknown) => Promise<void> | void; outputSchema?: import("zod").ZodTypeAny; resumeSession?: string; }} ExtendedGenerateArgs
|
|
@@ -355,141 +509,41 @@ declare class OpenAIAgent extends ToolLoopAgent<never, any, never> {
|
|
|
355
509
|
*/
|
|
356
510
|
constructor(opts: OpenAIAgentOptions$1<CALL_OPTIONS, TOOLS>);
|
|
357
511
|
hijackEngine: string;
|
|
512
|
+
supportsNativeStructuredOutput: boolean;
|
|
358
513
|
/**
|
|
359
514
|
* @param {AgentGenerateOptions} [args]
|
|
360
515
|
* @returns {Promise<GenerateTextResult<TOOLS, never>>}
|
|
361
516
|
*/
|
|
362
|
-
generate(args?: AgentGenerateOptions): Promise<GenerateTextResult$1<TOOLS, never>>;
|
|
517
|
+
generate(args?: AgentGenerateOptions$1): Promise<GenerateTextResult$1<TOOLS, never>>;
|
|
363
518
|
}
|
|
519
|
+
type AgentGenerateOptions$1 = AgentGenerateOptions$4;
|
|
364
520
|
type GenerateTextResult$1 = ai.GenerateTextResult<any, any>;
|
|
365
521
|
type OpenAIAgentOptions$1<CALL_OPTIONS = never, TOOLS = ai.ToolSet> = OpenAIAgentOptions$2<CALL_OPTIONS, TOOLS>;
|
|
366
522
|
|
|
367
|
-
type HermesAgentOptions$2<CALL_OPTIONS = never, TOOLS extends ToolSet = {}> = Omit<SdkAgentOptions<CALL_OPTIONS, TOOLS, ReturnType<typeof openai>>, "model"> & {
|
|
368
|
-
model?: string;
|
|
369
|
-
baseURL?: string;
|
|
370
|
-
apiKey?: string;
|
|
371
|
-
nativeStructuredOutput?: boolean;
|
|
372
|
-
};
|
|
373
|
-
/**
|
|
374
|
-
* Hermes (Nous Research) agent, reached over its OpenAI-compatible HTTP API.
|
|
375
|
-
*/
|
|
376
|
-
declare class HermesAgent extends OpenAIAgent {
|
|
377
|
-
constructor(opts?: HermesAgentOptions$2);
|
|
378
|
-
}
|
|
379
|
-
|
|
380
523
|
/**
|
|
381
|
-
*
|
|
524
|
+
* @template [CALL_OPTIONS=never], [TOOLS=import("ai").ToolSet]
|
|
525
|
+
* @typedef {import("./HermesAgentOptions.ts").HermesAgentOptions<CALL_OPTIONS, TOOLS>} HermesAgentOptions
|
|
382
526
|
*/
|
|
383
|
-
type AmpAgentOptions$1 = BaseCliAgentOptions$1 & {
|
|
384
|
-
/** Visibility setting for the new thread (e.g., private, public) */
|
|
385
|
-
visibility?: "private" | "public" | "workspace" | "group";
|
|
386
|
-
/** Path to a specific MCP configuration file */
|
|
387
|
-
mcpConfig?: string;
|
|
388
|
-
/** Path to a specific settings file */
|
|
389
|
-
settingsFile?: string;
|
|
390
|
-
/** Logging severity level */
|
|
391
|
-
logLevel?: "error" | "warn" | "info" | "debug" | "audit";
|
|
392
|
-
/** File path to write logs to */
|
|
393
|
-
logFile?: string;
|
|
394
|
-
/**
|
|
395
|
-
* If true, dangerously allows all commands without asking for permission.
|
|
396
|
-
* Equivalent to yolo mode but explicit.
|
|
397
|
-
*/
|
|
398
|
-
dangerouslyAllowAll?: boolean;
|
|
399
|
-
/** Whether to enable IDE integrations (disabled by default in AmpAgent) */
|
|
400
|
-
ide?: boolean;
|
|
401
|
-
/** Whether to enable JetBrains IDE integration */
|
|
402
|
-
jetbrains?: boolean;
|
|
403
|
-
};
|
|
404
|
-
|
|
405
|
-
/** @typedef {import("./BaseCliAgent/CliOutputInterpreter.ts").CliOutputInterpreter} CliOutputInterpreter */
|
|
406
527
|
/**
|
|
407
|
-
*
|
|
408
|
-
*
|
|
528
|
+
* Hermes (Nous Research) agent, reached over its OpenAI-compatible HTTP API.
|
|
529
|
+
*
|
|
530
|
+
* A thin wrapper over {@link OpenAIAgent}: it points the OpenAI-compatible
|
|
531
|
+
* provider at the Hermes server (`baseURL` / `HERMES_BASE_URL`) and disables AI
|
|
532
|
+
* SDK native structured output by default, since a local Hermes server may not
|
|
533
|
+
* honor JSON-schema response formats. Everything else — tool loops, streaming,
|
|
534
|
+
* prompt-based structured output — comes from the shared OpenAI path.
|
|
535
|
+
*
|
|
536
|
+
* @template [CALL_OPTIONS=never], [TOOLS=import("ai").ToolSet]
|
|
409
537
|
*/
|
|
410
|
-
declare class
|
|
538
|
+
declare class HermesAgent<CALL_OPTIONS = never, TOOLS = ai.ToolSet> extends OpenAIAgent {
|
|
411
539
|
/**
|
|
412
|
-
*
|
|
413
|
-
*
|
|
414
|
-
* @param {AmpAgentOptions} [opts] - Configuration options for the agent
|
|
540
|
+
* @param {HermesAgentOptions<CALL_OPTIONS, TOOLS>} [opts]
|
|
415
541
|
*/
|
|
416
|
-
constructor(opts?:
|
|
417
|
-
opts: AmpAgentOptions$1;
|
|
418
|
-
capabilities: AgentCapabilityRegistry$3;
|
|
419
|
-
cliEngine: string;
|
|
420
|
-
/**
|
|
421
|
-
* @returns {CliOutputInterpreter}
|
|
422
|
-
*/
|
|
423
|
-
createOutputInterpreter(): CliOutputInterpreter$6;
|
|
424
|
-
/**
|
|
425
|
-
* @param {{ prompt: string; systemPrompt?: string; cwd: string; options: any; }} params
|
|
426
|
-
*/
|
|
427
|
-
buildCommand(params: {
|
|
428
|
-
prompt: string;
|
|
429
|
-
systemPrompt?: string;
|
|
430
|
-
cwd: string;
|
|
431
|
-
options: any;
|
|
432
|
-
}): Promise<{
|
|
433
|
-
command: string;
|
|
434
|
-
args: string[];
|
|
435
|
-
outputFormat: string;
|
|
436
|
-
}>;
|
|
437
|
-
}
|
|
438
|
-
type AmpAgentOptions = AmpAgentOptions$1;
|
|
439
|
-
type CliOutputInterpreter$6 = CliOutputInterpreter$8;
|
|
440
|
-
|
|
441
|
-
type AntigravityAgentOptions$1 = BaseCliAgentOptions$1 & {
|
|
442
|
-
debug?: boolean;
|
|
443
|
-
model?: string;
|
|
444
|
-
sandbox?: boolean;
|
|
445
|
-
yolo?: boolean;
|
|
446
|
-
dangerouslySkipPermissions?: boolean;
|
|
447
|
-
allowedMcpServerNames?: string[];
|
|
448
|
-
allowedTools?: string[];
|
|
449
|
-
extensions?: string[];
|
|
450
|
-
listExtensions?: boolean;
|
|
451
|
-
resume?: string;
|
|
452
|
-
listSessions?: boolean;
|
|
453
|
-
deleteSession?: string;
|
|
454
|
-
includeDirectories?: string[];
|
|
455
|
-
screenReader?: boolean;
|
|
456
|
-
outputFormat?: "text" | "json" | "stream-json";
|
|
457
|
-
binary?: string;
|
|
458
|
-
configDir?: string;
|
|
459
|
-
geminiDir?: string;
|
|
460
|
-
apiKey?: string;
|
|
461
|
-
};
|
|
462
|
-
declare function createAntigravityCapabilityRegistry(opts?: AntigravityAgentOptions): AgentCapabilityRegistry$3;
|
|
463
|
-
declare class AntigravityAgent extends BaseCliAgent {
|
|
464
|
-
/**
|
|
465
|
-
* @param {AntigravityAgentOptions} [opts]
|
|
466
|
-
*/
|
|
467
|
-
constructor(opts?: AntigravityAgentOptions);
|
|
468
|
-
opts: AntigravityAgentOptions$1;
|
|
469
|
-
capabilities: AgentCapabilityRegistry$3;
|
|
470
|
-
cliEngine: string;
|
|
471
|
-
/**
|
|
472
|
-
* @returns {CliOutputInterpreter}
|
|
473
|
-
*/
|
|
474
|
-
createOutputInterpreter(): CliOutputInterpreter$6;
|
|
475
|
-
/**
|
|
476
|
-
* @param {{ prompt: string; systemPrompt?: string; cwd: string; options: any; }} params
|
|
477
|
-
*/
|
|
478
|
-
buildCommand(params: {
|
|
479
|
-
prompt: string;
|
|
480
|
-
systemPrompt?: string;
|
|
481
|
-
cwd: string;
|
|
482
|
-
options: any;
|
|
483
|
-
}): Promise<{
|
|
484
|
-
command: string;
|
|
485
|
-
args: string[];
|
|
486
|
-
outputFormat: "text" | "json" | "stream-json";
|
|
487
|
-
env: Record<string, string> | undefined;
|
|
488
|
-
}>;
|
|
542
|
+
constructor(opts?: HermesAgentOptions$1<CALL_OPTIONS, TOOLS>);
|
|
489
543
|
}
|
|
490
|
-
type
|
|
544
|
+
type HermesAgentOptions$1<CALL_OPTIONS = never, TOOLS = ai.ToolSet> = HermesAgentOptions$2<CALL_OPTIONS, TOOLS>;
|
|
491
545
|
|
|
492
|
-
type ClaudeCodeAgentOptions$1 = BaseCliAgentOptions$
|
|
546
|
+
type ClaudeCodeAgentOptions$1 = BaseCliAgentOptions$2 & {
|
|
493
547
|
addDir?: string[];
|
|
494
548
|
agent?: string;
|
|
495
549
|
agents?: Record<string, {
|
|
@@ -499,6 +553,22 @@ type ClaudeCodeAgentOptions$1 = BaseCliAgentOptions$1 & {
|
|
|
499
553
|
allowDangerouslySkipPermissions?: boolean;
|
|
500
554
|
allowedTools?: string[];
|
|
501
555
|
appendSystemPrompt?: string;
|
|
556
|
+
/**
|
|
557
|
+
* Path to an isolated Claude Code config directory. Sets `CLAUDE_CONFIG_DIR`
|
|
558
|
+
* on the spawned process so this invocation uses the credentials stored at
|
|
559
|
+
* `<configDir>/.credentials.json` (instead of the user's default `~/.claude/`).
|
|
560
|
+
*
|
|
561
|
+
* Use this to run multiple Claude Code subscriptions side-by-side. Set up
|
|
562
|
+
* the directory by running `CLAUDE_CONFIG_DIR=<path> claude` once and
|
|
563
|
+
* completing `/login` interactively.
|
|
564
|
+
*/
|
|
565
|
+
configDir?: string;
|
|
566
|
+
/**
|
|
567
|
+
* Anthropic API key for billing this invocation against the API instead of
|
|
568
|
+
* a Claude Pro/Max subscription. When set, ClaudeCodeAgent stops unsetting
|
|
569
|
+
* `ANTHROPIC_API_KEY` (which it normally clears so subscription auth wins).
|
|
570
|
+
*/
|
|
571
|
+
apiKey?: string;
|
|
502
572
|
betas?: string[];
|
|
503
573
|
chrome?: boolean;
|
|
504
574
|
continue?: boolean;
|
|
@@ -541,12 +611,12 @@ declare class ClaudeCodeAgent extends BaseCliAgent {
|
|
|
541
611
|
*/
|
|
542
612
|
constructor(opts?: ClaudeCodeAgentOptions);
|
|
543
613
|
opts: ClaudeCodeAgentOptions$1;
|
|
544
|
-
capabilities: AgentCapabilityRegistry$
|
|
614
|
+
capabilities: AgentCapabilityRegistry$6;
|
|
545
615
|
cliEngine: string;
|
|
546
616
|
/**
|
|
547
617
|
* @returns {CliOutputInterpreter}
|
|
548
618
|
*/
|
|
549
|
-
createOutputInterpreter(): CliOutputInterpreter$
|
|
619
|
+
createOutputInterpreter(): CliOutputInterpreter$7;
|
|
550
620
|
/**
|
|
551
621
|
* @param {{ prompt: string; systemPrompt?: string; cwd: string; options: any; }} params
|
|
552
622
|
*/
|
|
@@ -559,12 +629,16 @@ declare class ClaudeCodeAgent extends BaseCliAgent {
|
|
|
559
629
|
command: string;
|
|
560
630
|
args: string[];
|
|
561
631
|
outputFormat: "stream-json" | "text" | "json";
|
|
632
|
+
env: {
|
|
633
|
+
CLAUDE_CONFIG_DIR: string;
|
|
634
|
+
ANTHROPIC_API_KEY: string;
|
|
635
|
+
} | undefined;
|
|
562
636
|
}>;
|
|
563
637
|
}
|
|
564
638
|
type ClaudeCodeAgentOptions = ClaudeCodeAgentOptions$1;
|
|
565
|
-
type CliOutputInterpreter$
|
|
639
|
+
type CliOutputInterpreter$7 = CliOutputInterpreter$a;
|
|
566
640
|
|
|
567
|
-
type CodexAgentOptions$1 = BaseCliAgentOptions$
|
|
641
|
+
type CodexAgentOptions$1 = BaseCliAgentOptions$2 & {
|
|
568
642
|
config?: CodexConfigOverrides;
|
|
569
643
|
enable?: string[];
|
|
570
644
|
disable?: string[];
|
|
@@ -606,12 +680,12 @@ declare class CodexAgent extends BaseCliAgent {
|
|
|
606
680
|
*/
|
|
607
681
|
constructor(opts?: CodexAgentOptions);
|
|
608
682
|
opts: CodexAgentOptions$1;
|
|
609
|
-
capabilities: AgentCapabilityRegistry$
|
|
683
|
+
capabilities: AgentCapabilityRegistry$6;
|
|
610
684
|
cliEngine: string;
|
|
611
685
|
/**
|
|
612
686
|
* @returns {CliOutputInterpreter}
|
|
613
687
|
*/
|
|
614
|
-
createOutputInterpreter(): CliOutputInterpreter$
|
|
688
|
+
createOutputInterpreter(): CliOutputInterpreter$6;
|
|
615
689
|
/**
|
|
616
690
|
* @param {{ prompt: string; systemPrompt?: string; cwd: string; options: any; }} params
|
|
617
691
|
*/
|
|
@@ -622,18 +696,27 @@ declare class CodexAgent extends BaseCliAgent {
|
|
|
622
696
|
options: any;
|
|
623
697
|
}): Promise<{
|
|
624
698
|
command: string;
|
|
625
|
-
args:
|
|
699
|
+
args: string[];
|
|
626
700
|
stdin: string;
|
|
627
701
|
outputFile: string;
|
|
628
702
|
outputFormat: string;
|
|
703
|
+
env: {
|
|
704
|
+
CODEX_HOME: string;
|
|
705
|
+
OPENAI_API_KEY: string;
|
|
706
|
+
} | undefined;
|
|
629
707
|
stdoutBannerPatterns: RegExp[];
|
|
630
708
|
cleanup: () => Promise<void>;
|
|
631
709
|
}>;
|
|
632
710
|
}
|
|
633
|
-
type CliOutputInterpreter$
|
|
711
|
+
type CliOutputInterpreter$6 = CliOutputInterpreter$a;
|
|
634
712
|
type CodexAgentOptions = CodexAgentOptions$1;
|
|
635
713
|
|
|
636
|
-
|
|
714
|
+
/**
|
|
715
|
+
* @deprecated Use AntigravityAgentOptions with the Antigravity CLI (`agy`) for
|
|
716
|
+
* new Google CLI integrations. GeminiAgentOptions remains for legacy and
|
|
717
|
+
* enterprise Gemini CLI setups.
|
|
718
|
+
*/
|
|
719
|
+
type GeminiAgentOptions$1 = BaseCliAgentOptions$2 & {
|
|
637
720
|
debug?: boolean;
|
|
638
721
|
model?: string;
|
|
639
722
|
sandbox?: boolean;
|
|
@@ -650,20 +733,36 @@ type GeminiAgentOptions$1 = BaseCliAgentOptions$1 & {
|
|
|
650
733
|
includeDirectories?: string[];
|
|
651
734
|
screenReader?: boolean;
|
|
652
735
|
outputFormat?: "text" | "json" | "stream-json";
|
|
736
|
+
/**
|
|
737
|
+
* Path to an isolated Gemini CLI config directory. Sets `GEMINI_DIR` on the
|
|
738
|
+
* spawned process so this invocation uses the credentials stored at
|
|
739
|
+
* `<configDir>/oauth_creds.json` (instead of the user's default
|
|
740
|
+
* `~/.gemini/`). Use this to run multiple Gemini accounts side-by-side.
|
|
741
|
+
*/
|
|
742
|
+
configDir?: string;
|
|
743
|
+
/**
|
|
744
|
+
* Gemini API key. Sets `GEMINI_API_KEY` on the spawned process for
|
|
745
|
+
* API-billed invocations.
|
|
746
|
+
*/
|
|
747
|
+
apiKey?: string;
|
|
653
748
|
};
|
|
654
749
|
|
|
750
|
+
/**
|
|
751
|
+
* @deprecated Use AntigravityAgent for new Google CLI integrations. GeminiAgent
|
|
752
|
+
* remains for legacy and enterprise Gemini CLI setups.
|
|
753
|
+
*/
|
|
655
754
|
declare class GeminiAgent extends BaseCliAgent {
|
|
656
755
|
/**
|
|
657
756
|
* @param {GeminiAgentOptions} [opts]
|
|
658
757
|
*/
|
|
659
758
|
constructor(opts?: GeminiAgentOptions);
|
|
660
759
|
opts: GeminiAgentOptions$1;
|
|
661
|
-
capabilities: AgentCapabilityRegistry$
|
|
760
|
+
capabilities: AgentCapabilityRegistry$6;
|
|
662
761
|
cliEngine: string;
|
|
663
762
|
/**
|
|
664
763
|
* @returns {CliOutputInterpreter}
|
|
665
764
|
*/
|
|
666
|
-
createOutputInterpreter(): CliOutputInterpreter$
|
|
765
|
+
createOutputInterpreter(): CliOutputInterpreter$5;
|
|
667
766
|
/**
|
|
668
767
|
* @param {{ prompt: string; systemPrompt?: string; cwd: string; options: any; }} params
|
|
669
768
|
*/
|
|
@@ -676,9 +775,13 @@ declare class GeminiAgent extends BaseCliAgent {
|
|
|
676
775
|
command: string;
|
|
677
776
|
args: string[];
|
|
678
777
|
outputFormat: "stream-json" | "text" | "json";
|
|
778
|
+
env: {
|
|
779
|
+
GEMINI_DIR: string;
|
|
780
|
+
GEMINI_API_KEY: string;
|
|
781
|
+
} | undefined;
|
|
679
782
|
}>;
|
|
680
783
|
}
|
|
681
|
-
type CliOutputInterpreter$
|
|
784
|
+
type CliOutputInterpreter$5 = CliOutputInterpreter$a;
|
|
682
785
|
type GeminiAgentOptions = GeminiAgentOptions$1;
|
|
683
786
|
|
|
684
787
|
declare class PiAgent extends BaseCliAgent {
|
|
@@ -687,7 +790,7 @@ declare class PiAgent extends BaseCliAgent {
|
|
|
687
790
|
*/
|
|
688
791
|
constructor(opts?: PiAgentOptions$1);
|
|
689
792
|
opts: PiAgentOptions$2;
|
|
690
|
-
capabilities: AgentCapabilityRegistry$
|
|
793
|
+
capabilities: AgentCapabilityRegistry$6;
|
|
691
794
|
cliEngine: string;
|
|
692
795
|
issuedSessionRef: any;
|
|
693
796
|
/**
|
|
@@ -708,7 +811,7 @@ declare class PiAgent extends BaseCliAgent {
|
|
|
708
811
|
/**
|
|
709
812
|
* @returns {CliOutputInterpreter}
|
|
710
813
|
*/
|
|
711
|
-
createOutputInterpreter(): CliOutputInterpreter$
|
|
814
|
+
createOutputInterpreter(): CliOutputInterpreter$4;
|
|
712
815
|
/**
|
|
713
816
|
* @param {PiGenerateOptions} [options]
|
|
714
817
|
* @returns {Promise<GenerateTextResult>}
|
|
@@ -732,8 +835,8 @@ declare class PiAgent extends BaseCliAgent {
|
|
|
732
835
|
cleanup?: () => Promise<void>;
|
|
733
836
|
}>;
|
|
734
837
|
}
|
|
735
|
-
type CliOutputInterpreter$
|
|
736
|
-
type AgentCliEvent = AgentCliEvent$
|
|
838
|
+
type CliOutputInterpreter$4 = CliOutputInterpreter$a;
|
|
839
|
+
type AgentCliEvent = AgentCliEvent$1;
|
|
737
840
|
type GenerateTextResult = ai.GenerateTextResult<Record<string, never>, unknown>;
|
|
738
841
|
type PiAgentOptions$1 = PiAgentOptions$2;
|
|
739
842
|
type PiMode = "text" | "json" | "stream-json" | "rpc";
|
|
@@ -751,7 +854,7 @@ type PiGenerateOptions = {
|
|
|
751
854
|
[key: string]: unknown;
|
|
752
855
|
};
|
|
753
856
|
|
|
754
|
-
type KimiAgentOptions$1 = BaseCliAgentOptions$
|
|
857
|
+
type KimiAgentOptions$1 = BaseCliAgentOptions$2 & {
|
|
755
858
|
workDir?: string;
|
|
756
859
|
session?: string;
|
|
757
860
|
continue?: boolean;
|
|
@@ -769,6 +872,14 @@ type KimiAgentOptions$1 = BaseCliAgentOptions$1 & {
|
|
|
769
872
|
maxRalphIterations?: number;
|
|
770
873
|
verbose?: boolean;
|
|
771
874
|
debug?: boolean;
|
|
875
|
+
/**
|
|
876
|
+
* Path to an isolated Kimi share directory. Sets `KIMI_SHARE_DIR` on the
|
|
877
|
+
* spawned process so this invocation reads/writes credentials at
|
|
878
|
+
* `<configDir>/credentials` (instead of the user's default `~/.kimi/`).
|
|
879
|
+
* Equivalent to passing `env: { KIMI_SHARE_DIR: <path> }` but uniform with
|
|
880
|
+
* the other agents' `configDir` option.
|
|
881
|
+
*/
|
|
882
|
+
configDir?: string;
|
|
772
883
|
};
|
|
773
884
|
|
|
774
885
|
declare class KimiAgent extends BaseCliAgent {
|
|
@@ -777,13 +888,13 @@ declare class KimiAgent extends BaseCliAgent {
|
|
|
777
888
|
*/
|
|
778
889
|
constructor(opts?: KimiAgentOptions);
|
|
779
890
|
opts: KimiAgentOptions$1;
|
|
780
|
-
capabilities: AgentCapabilityRegistry$
|
|
891
|
+
capabilities: AgentCapabilityRegistry$6;
|
|
781
892
|
cliEngine: string;
|
|
782
893
|
issuedSessionId: any;
|
|
783
894
|
/**
|
|
784
895
|
* @returns {CliOutputInterpreter}
|
|
785
896
|
*/
|
|
786
|
-
createOutputInterpreter(): CliOutputInterpreter$
|
|
897
|
+
createOutputInterpreter(): CliOutputInterpreter$3;
|
|
787
898
|
/**
|
|
788
899
|
* @param {{ prompt: string; systemPrompt?: string; cwd: string; options: any; }} params
|
|
789
900
|
*/
|
|
@@ -802,13 +913,251 @@ declare class KimiAgent extends BaseCliAgent {
|
|
|
802
913
|
cleanup: (() => Promise<void>) | undefined;
|
|
803
914
|
stdoutBannerPatterns: RegExp[];
|
|
804
915
|
stdoutErrorPatterns: RegExp[];
|
|
916
|
+
benignStderrPatterns: RegExp[];
|
|
805
917
|
errorOnBannerOnly: boolean;
|
|
806
918
|
}>;
|
|
807
919
|
}
|
|
808
|
-
type CliOutputInterpreter$
|
|
920
|
+
type CliOutputInterpreter$3 = CliOutputInterpreter$a;
|
|
809
921
|
type KimiAgentOptions = KimiAgentOptions$1;
|
|
810
922
|
|
|
811
|
-
|
|
923
|
+
/**
|
|
924
|
+
* @param {CreateSmithersAgentContractOptions} options
|
|
925
|
+
* @returns {SmithersAgentContract}
|
|
926
|
+
*/
|
|
927
|
+
declare function createSmithersAgentContract(options: CreateSmithersAgentContractOptions): SmithersAgentContract$2;
|
|
928
|
+
type SmithersListedTool$1 = SmithersListedTool$2;
|
|
929
|
+
type SmithersToolSurface$1 = SmithersToolSurface$2;
|
|
930
|
+
type CreateSmithersAgentContractOptions = {
|
|
931
|
+
toolSurface?: SmithersToolSurface$1;
|
|
932
|
+
serverName?: string;
|
|
933
|
+
tools: SmithersListedTool$1[];
|
|
934
|
+
};
|
|
935
|
+
type SmithersAgentContract$2 = SmithersAgentContract$3;
|
|
936
|
+
|
|
937
|
+
/**
|
|
938
|
+
* @param {SmithersAgentContract} contract
|
|
939
|
+
* @param {RenderGuidanceOptions} [options]
|
|
940
|
+
*/
|
|
941
|
+
declare function renderSmithersAgentPromptGuidance(contract: SmithersAgentContract$1, options?: RenderGuidanceOptions): string;
|
|
942
|
+
type RenderGuidanceOptions = {
|
|
943
|
+
available?: boolean;
|
|
944
|
+
toolNamePrefix?: string;
|
|
945
|
+
};
|
|
946
|
+
type SmithersAgentContract$1 = SmithersAgentContract$3;
|
|
947
|
+
|
|
948
|
+
/**
|
|
949
|
+
* Convert a Zod schema to an OpenAI-safe JSON Schema object.
|
|
950
|
+
*
|
|
951
|
+
* Usage:
|
|
952
|
+
* ```ts
|
|
953
|
+
* import { zodToOpenAISchema } from "./zodToOpenAISchema";
|
|
954
|
+
* const jsonSchema = zodToOpenAISchema(myZodSchema);
|
|
955
|
+
* ```
|
|
956
|
+
*/
|
|
957
|
+
declare function zodToOpenAISchema(zodSchema: any): Promise<zod_v4_core.ZodStandardJSONSchemaPayload<any>>;
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* Sanitize a JSON Schema for OpenAI's structured-output API.
|
|
961
|
+
*
|
|
962
|
+
* OpenAI's `response_format` imposes constraints beyond standard JSON Schema:
|
|
963
|
+
*
|
|
964
|
+
* 1. Every object node **must** include `"type": "object"`.
|
|
965
|
+
* 2. Structured output object nodes must set `additionalProperties: false`.
|
|
966
|
+
*
|
|
967
|
+
* Zod v4's `toJSONSchema()` can violate these rules when loose/passthrough
|
|
968
|
+
* objects are used. Codex rejects those schemas unless they are strict.
|
|
969
|
+
*
|
|
970
|
+
* This function fixes these issues in-place so any agent (Codex, future
|
|
971
|
+
* OpenAI-backed agents, etc.) can safely use a JSON Schema for OpenAI.
|
|
972
|
+
*/
|
|
973
|
+
declare function sanitizeForOpenAI(node: any): void;
|
|
974
|
+
|
|
975
|
+
/**
|
|
976
|
+
* Configuration options for the AmpAgent.
|
|
977
|
+
*/
|
|
978
|
+
type AmpAgentOptions$1 = BaseCliAgentOptions$2 & {
|
|
979
|
+
/** Visibility setting for the new thread (e.g., private, public) */
|
|
980
|
+
visibility?: "private" | "public" | "workspace" | "group";
|
|
981
|
+
/** Path to a specific MCP configuration file */
|
|
982
|
+
mcpConfig?: string;
|
|
983
|
+
/** Path to a specific settings file */
|
|
984
|
+
settingsFile?: string;
|
|
985
|
+
/** Logging severity level */
|
|
986
|
+
logLevel?: "error" | "warn" | "info" | "debug" | "audit";
|
|
987
|
+
/** File path to write logs to */
|
|
988
|
+
logFile?: string;
|
|
989
|
+
/**
|
|
990
|
+
* If true, dangerously allows all commands without asking for permission.
|
|
991
|
+
* Equivalent to yolo mode but explicit.
|
|
992
|
+
*/
|
|
993
|
+
dangerouslyAllowAll?: boolean;
|
|
994
|
+
/** Whether to enable IDE integrations (disabled by default in AmpAgent) */
|
|
995
|
+
ide?: boolean;
|
|
996
|
+
/** Whether to enable JetBrains IDE integration */
|
|
997
|
+
jetbrains?: boolean;
|
|
998
|
+
};
|
|
999
|
+
|
|
1000
|
+
/** @typedef {import("./capability-registry/AgentCapabilityRegistry.ts").AgentCapabilityRegistry} AgentCapabilityRegistry */
|
|
1001
|
+
/** @typedef {import("./BaseCliAgent/CliOutputInterpreter.ts").CliOutputInterpreter} CliOutputInterpreter */
|
|
1002
|
+
/**
|
|
1003
|
+
* @returns {AgentCapabilityRegistry}
|
|
1004
|
+
*/
|
|
1005
|
+
declare function createAmpCapabilityRegistry(): AgentCapabilityRegistry$3;
|
|
1006
|
+
/**
|
|
1007
|
+
* Agent implementation that wraps the 'amp' CLI executable.
|
|
1008
|
+
* It translates generation requests into CLI arguments and executes the process.
|
|
1009
|
+
*/
|
|
1010
|
+
declare class AmpAgent extends BaseCliAgent {
|
|
1011
|
+
/**
|
|
1012
|
+
* Initializes a new AmpAgent with the given options.
|
|
1013
|
+
*
|
|
1014
|
+
* @param {AmpAgentOptions} [opts] - Configuration options for the agent
|
|
1015
|
+
*/
|
|
1016
|
+
constructor(opts?: AmpAgentOptions);
|
|
1017
|
+
opts: AmpAgentOptions$1;
|
|
1018
|
+
/** @type {AgentCapabilityRegistry} */
|
|
1019
|
+
capabilities: AgentCapabilityRegistry$3;
|
|
1020
|
+
cliEngine: string;
|
|
1021
|
+
/**
|
|
1022
|
+
* @returns {CliOutputInterpreter}
|
|
1023
|
+
*/
|
|
1024
|
+
createOutputInterpreter(): CliOutputInterpreter$2;
|
|
1025
|
+
/**
|
|
1026
|
+
* @param {{ prompt: string; systemPrompt?: string; cwd: string; options: any; }} params
|
|
1027
|
+
*/
|
|
1028
|
+
buildCommand(params: {
|
|
1029
|
+
prompt: string;
|
|
1030
|
+
systemPrompt?: string;
|
|
1031
|
+
cwd: string;
|
|
1032
|
+
options: any;
|
|
1033
|
+
}): Promise<{
|
|
1034
|
+
command: string;
|
|
1035
|
+
args: string[];
|
|
1036
|
+
outputFormat: string;
|
|
1037
|
+
}>;
|
|
1038
|
+
}
|
|
1039
|
+
type AgentCapabilityRegistry$3 = AgentCapabilityRegistry$6;
|
|
1040
|
+
type CliOutputInterpreter$2 = CliOutputInterpreter$a;
|
|
1041
|
+
type AmpAgentOptions = AmpAgentOptions$1;
|
|
1042
|
+
|
|
1043
|
+
type AntigravityAgentOptions$1 = BaseCliAgentOptions$2 & {
|
|
1044
|
+
model?: string;
|
|
1045
|
+
sandbox?: boolean;
|
|
1046
|
+
yolo?: boolean;
|
|
1047
|
+
dangerouslySkipPermissions?: boolean;
|
|
1048
|
+
allowedMcpServerNames?: string[];
|
|
1049
|
+
allowedTools?: string[];
|
|
1050
|
+
/**
|
|
1051
|
+
* @deprecated Antigravity renamed extensions to plugins and manages them via
|
|
1052
|
+
* `agy plugin`; launch-time extension flags are rejected at runtime.
|
|
1053
|
+
*/
|
|
1054
|
+
extensions?: string[];
|
|
1055
|
+
/**
|
|
1056
|
+
* @deprecated Use `agy plugin list` outside Smithers. This option is rejected
|
|
1057
|
+
* at runtime because current `agy` builds no longer accept it during launch.
|
|
1058
|
+
*/
|
|
1059
|
+
listExtensions?: boolean;
|
|
1060
|
+
/**
|
|
1061
|
+
* Native Antigravity conversation id. Smithers emits `--conversation`.
|
|
1062
|
+
*/
|
|
1063
|
+
conversation?: string;
|
|
1064
|
+
/**
|
|
1065
|
+
* Continue the latest Antigravity conversation. Smithers emits `--continue`.
|
|
1066
|
+
*/
|
|
1067
|
+
continue?: boolean;
|
|
1068
|
+
/**
|
|
1069
|
+
* @deprecated Use `conversation`; Smithers still maps this to
|
|
1070
|
+
* `--conversation` for compatibility.
|
|
1071
|
+
*/
|
|
1072
|
+
resume?: string;
|
|
1073
|
+
/**
|
|
1074
|
+
* @deprecated Conversation listing is interactive via `/resume`; this option
|
|
1075
|
+
* is rejected at runtime.
|
|
1076
|
+
*/
|
|
1077
|
+
listSessions?: boolean;
|
|
1078
|
+
/**
|
|
1079
|
+
* @deprecated Conversation deletion is not a supported non-interactive
|
|
1080
|
+
* launch flag; this option is rejected at runtime.
|
|
1081
|
+
*/
|
|
1082
|
+
deleteSession?: string;
|
|
1083
|
+
includeDirectories?: string[];
|
|
1084
|
+
/**
|
|
1085
|
+
* @deprecated Current `agy` builds do not expose `--screen-reader`; this
|
|
1086
|
+
* option is rejected at runtime.
|
|
1087
|
+
*/
|
|
1088
|
+
screenReader?: boolean;
|
|
1089
|
+
/**
|
|
1090
|
+
* @deprecated Current `agy` builds do not expose `--output-format`; Smithers
|
|
1091
|
+
* reads Antigravity stdout as text.
|
|
1092
|
+
*/
|
|
1093
|
+
outputFormat?: "text" | "json" | "stream-json";
|
|
1094
|
+
/**
|
|
1095
|
+
* @deprecated Current `agy` builds do not expose `--debug`; this option is
|
|
1096
|
+
* rejected at runtime.
|
|
1097
|
+
*/
|
|
1098
|
+
debug?: boolean;
|
|
1099
|
+
/**
|
|
1100
|
+
* Antigravity CLI binary to execute. The official CLI currently installs
|
|
1101
|
+
* `agy`; this exists for test harnesses and future binary renames.
|
|
1102
|
+
*/
|
|
1103
|
+
binary?: string;
|
|
1104
|
+
/**
|
|
1105
|
+
* Path to an isolated Google CLI config root. Smithers passes it as
|
|
1106
|
+
* `--gemini_dir` and `GEMINI_DIR` so Antigravity reads/writes
|
|
1107
|
+
* `<configDir>/antigravity-cli/...` instead of the user's default
|
|
1108
|
+
* `~/.gemini/antigravity-cli/...`.
|
|
1109
|
+
*/
|
|
1110
|
+
configDir?: string;
|
|
1111
|
+
/**
|
|
1112
|
+
* Explicit alias for `configDir` when matching the Antigravity CLI flag name.
|
|
1113
|
+
*/
|
|
1114
|
+
geminiDir?: string;
|
|
1115
|
+
/**
|
|
1116
|
+
* Google API key for API-billed invocations when supported by the CLI.
|
|
1117
|
+
*/
|
|
1118
|
+
apiKey?: string;
|
|
1119
|
+
};
|
|
1120
|
+
|
|
1121
|
+
/**
|
|
1122
|
+
* @param {AntigravityAgentOptions} [opts]
|
|
1123
|
+
* @returns {AgentCapabilityRegistry}
|
|
1124
|
+
*/
|
|
1125
|
+
declare function createAntigravityCapabilityRegistry(opts?: AntigravityAgentOptions): AgentCapabilityRegistry$2;
|
|
1126
|
+
declare class AntigravityAgent extends BaseCliAgent {
|
|
1127
|
+
/**
|
|
1128
|
+
* @param {AntigravityAgentOptions} [opts]
|
|
1129
|
+
*/
|
|
1130
|
+
constructor(opts?: AntigravityAgentOptions);
|
|
1131
|
+
opts: AntigravityAgentOptions$1;
|
|
1132
|
+
capabilities: AgentCapabilityRegistry$6;
|
|
1133
|
+
cliEngine: string;
|
|
1134
|
+
/**
|
|
1135
|
+
* @returns {CliOutputInterpreter}
|
|
1136
|
+
*/
|
|
1137
|
+
createOutputInterpreter(): CliOutputInterpreter$1;
|
|
1138
|
+
/**
|
|
1139
|
+
* @param {{ prompt: string; systemPrompt?: string; cwd: string; options: any; }} params
|
|
1140
|
+
*/
|
|
1141
|
+
buildCommand(params: {
|
|
1142
|
+
prompt: string;
|
|
1143
|
+
systemPrompt?: string;
|
|
1144
|
+
cwd: string;
|
|
1145
|
+
options: any;
|
|
1146
|
+
}): Promise<{
|
|
1147
|
+
command: string;
|
|
1148
|
+
args: string[];
|
|
1149
|
+
outputFormat: string;
|
|
1150
|
+
env: {
|
|
1151
|
+
GEMINI_DIR: string | undefined;
|
|
1152
|
+
GEMINI_API_KEY: string;
|
|
1153
|
+
} | undefined;
|
|
1154
|
+
}>;
|
|
1155
|
+
}
|
|
1156
|
+
type AgentCapabilityRegistry$2 = AgentCapabilityRegistry$6;
|
|
1157
|
+
type CliOutputInterpreter$1 = CliOutputInterpreter$a;
|
|
1158
|
+
type AntigravityAgentOptions = AntigravityAgentOptions$1;
|
|
1159
|
+
|
|
1160
|
+
type ForgeAgentOptions$1 = BaseCliAgentOptions$2 & {
|
|
812
1161
|
directory?: string;
|
|
813
1162
|
provider?: string;
|
|
814
1163
|
agent?: string;
|
|
@@ -821,16 +1170,22 @@ type ForgeAgentOptions$1 = BaseCliAgentOptions$1 & {
|
|
|
821
1170
|
conversation?: string;
|
|
822
1171
|
};
|
|
823
1172
|
|
|
1173
|
+
/** @typedef {import("./capability-registry/AgentCapabilityRegistry.ts").AgentCapabilityRegistry} AgentCapabilityRegistry */
|
|
824
1174
|
/** @typedef {import("./BaseCliAgent/BaseCliAgentOptions.ts").BaseCliAgentOptions} BaseCliAgentOptions */
|
|
825
1175
|
/** @typedef {import("./BaseCliAgent/CliOutputInterpreter.ts").CliOutputInterpreter} CliOutputInterpreter */
|
|
826
1176
|
/** @typedef {import("./ForgeAgentOptions.ts").ForgeAgentOptions} ForgeAgentOptions */
|
|
1177
|
+
/**
|
|
1178
|
+
* @returns {AgentCapabilityRegistry}
|
|
1179
|
+
*/
|
|
1180
|
+
declare function createForgeCapabilityRegistry(): AgentCapabilityRegistry$1;
|
|
827
1181
|
declare class ForgeAgent extends BaseCliAgent {
|
|
828
1182
|
/**
|
|
829
1183
|
* @param {ForgeAgentOptions} [opts]
|
|
830
1184
|
*/
|
|
831
1185
|
constructor(opts?: ForgeAgentOptions);
|
|
832
1186
|
opts: ForgeAgentOptions$1;
|
|
833
|
-
|
|
1187
|
+
/** @type {AgentCapabilityRegistry} */
|
|
1188
|
+
capabilities: AgentCapabilityRegistry$1;
|
|
834
1189
|
cliEngine: string;
|
|
835
1190
|
issuedConversationId: any;
|
|
836
1191
|
/**
|
|
@@ -851,114 +1206,80 @@ declare class ForgeAgent extends BaseCliAgent {
|
|
|
851
1206
|
outputFormat: string;
|
|
852
1207
|
}>;
|
|
853
1208
|
}
|
|
854
|
-
type
|
|
1209
|
+
type AgentCapabilityRegistry$1 = AgentCapabilityRegistry$6;
|
|
1210
|
+
type CliOutputInterpreter = CliOutputInterpreter$a;
|
|
855
1211
|
type ForgeAgentOptions = ForgeAgentOptions$1;
|
|
856
1212
|
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
/** Files to attach to the prompt via -f flags */
|
|
863
|
-
attachFiles?: string[];
|
|
864
|
-
/** Continue a previous session */
|
|
865
|
-
continueSession?: boolean;
|
|
866
|
-
/** Resume a specific session by ID */
|
|
867
|
-
sessionId?: string;
|
|
868
|
-
/** Provider-specific model variant/reasoning effort level */
|
|
869
|
-
variant?: string;
|
|
870
|
-
};
|
|
871
|
-
|
|
872
|
-
declare class OpenCodeAgent extends BaseCliAgent {
|
|
873
|
-
constructor(opts?: OpenCodeAgentOptions);
|
|
874
|
-
opts: OpenCodeAgentOptions$1;
|
|
875
|
-
capabilities: AgentCapabilityRegistry$3;
|
|
876
|
-
cliEngine: "opencode";
|
|
877
|
-
createOutputInterpreter(): CliOutputInterpreter;
|
|
878
|
-
buildCommand(params: {
|
|
879
|
-
prompt: string;
|
|
880
|
-
systemPrompt?: string;
|
|
881
|
-
cwd: string;
|
|
882
|
-
options: any;
|
|
883
|
-
}): Promise<{
|
|
884
|
-
command: string;
|
|
885
|
-
args: string[];
|
|
886
|
-
outputFormat: "stream-json";
|
|
887
|
-
env?: Record<string, string>;
|
|
888
|
-
stdoutBannerPatterns: RegExp[];
|
|
889
|
-
stdoutErrorPatterns: RegExp[];
|
|
890
|
-
}>;
|
|
891
|
-
}
|
|
1213
|
+
/**
|
|
1214
|
+
* @returns {AgentCapabilityRegistry}
|
|
1215
|
+
*/
|
|
1216
|
+
declare function createVibeCapabilityRegistry(opts?: VibeAgentOptions$1): AgentCapabilityRegistry$6;
|
|
1217
|
+
type VibeAgentOptions = VibeAgentOptions$1;
|
|
892
1218
|
|
|
893
1219
|
/**
|
|
894
|
-
* @
|
|
895
|
-
* @returns {SmithersAgentContract}
|
|
1220
|
+
* @returns {CliAgentCapabilityReportEntry[]}
|
|
896
1221
|
*/
|
|
897
|
-
declare function
|
|
898
|
-
type
|
|
899
|
-
type SmithersToolSurface$1 = SmithersToolSurface$2;
|
|
900
|
-
type CreateSmithersAgentContractOptions = {
|
|
901
|
-
toolSurface?: SmithersToolSurface$1;
|
|
902
|
-
serverName?: string;
|
|
903
|
-
tools: SmithersListedTool$1[];
|
|
904
|
-
};
|
|
905
|
-
type SmithersAgentContract$2 = SmithersAgentContract$3;
|
|
1222
|
+
declare function getCliAgentCapabilityReport(): CliAgentCapabilityReportEntry$1[];
|
|
1223
|
+
type CliAgentCapabilityReportEntry$1 = CliAgentCapabilityReportEntry$2;
|
|
906
1224
|
|
|
907
1225
|
/**
|
|
908
|
-
* @
|
|
909
|
-
* @param {RenderGuidanceOptions} [options]
|
|
1226
|
+
* @returns {CliAgentCapabilityDoctorReport}
|
|
910
1227
|
*/
|
|
911
|
-
declare function
|
|
912
|
-
type
|
|
913
|
-
available?: boolean;
|
|
914
|
-
toolNamePrefix?: string;
|
|
915
|
-
};
|
|
916
|
-
type SmithersAgentContract$1 = SmithersAgentContract$3;
|
|
1228
|
+
declare function getCliAgentCapabilityDoctorReport(): CliAgentCapabilityDoctorReport$2;
|
|
1229
|
+
type CliAgentCapabilityDoctorReport$2 = CliAgentCapabilityDoctorReport$3;
|
|
917
1230
|
|
|
1231
|
+
/** @typedef {import("./CliAgentCapabilityDoctorReport.ts").CliAgentCapabilityDoctorReport} CliAgentCapabilityDoctorReport */
|
|
918
1232
|
/**
|
|
919
|
-
*
|
|
920
|
-
*
|
|
921
|
-
* Usage:
|
|
922
|
-
* ```ts
|
|
923
|
-
* import { zodToOpenAISchema } from "./zodToOpenAISchema";
|
|
924
|
-
* const jsonSchema = zodToOpenAISchema(myZodSchema);
|
|
925
|
-
* ```
|
|
1233
|
+
* @param {CliAgentCapabilityDoctorReport} report
|
|
1234
|
+
* @returns {string}
|
|
926
1235
|
*/
|
|
927
|
-
declare function
|
|
1236
|
+
declare function formatCliAgentCapabilityDoctorReport(report: CliAgentCapabilityDoctorReport$1): string;
|
|
1237
|
+
type CliAgentCapabilityDoctorReport$1 = CliAgentCapabilityDoctorReport$3;
|
|
928
1238
|
|
|
929
1239
|
/**
|
|
930
|
-
*
|
|
931
|
-
*
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
*
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
*
|
|
941
|
-
*
|
|
1240
|
+
* @param {string} id
|
|
1241
|
+
* @returns {CliAgentSurfaceManifestEntry | undefined}
|
|
1242
|
+
*/
|
|
1243
|
+
declare function getCliAgentSurfaceManifestEntry(id: string): CliAgentSurfaceManifestEntry$1 | undefined;
|
|
1244
|
+
/**
|
|
1245
|
+
* @returns {CliAgentSurfaceManifestEntry[]}
|
|
1246
|
+
*/
|
|
1247
|
+
declare function listCliAgentSurfaceManifests(): CliAgentSurfaceManifestEntry$1[];
|
|
1248
|
+
/** @typedef {import("./CliAgentSurfaceTypes.ts").CliAgentSurfaceManifestEntry} CliAgentSurfaceManifestEntry */
|
|
1249
|
+
/**
|
|
1250
|
+
* Compatibility contract for CLI-backed agents. Keep this list focused on the
|
|
1251
|
+
* command surface Smithers emits directly; user-supplied extraArgs remain an
|
|
1252
|
+
* escape hatch and are intentionally not modeled here.
|
|
942
1253
|
*
|
|
943
|
-
*
|
|
944
|
-
* OpenAI-backed agents, etc.) can safely use a JSON Schema for OpenAI.
|
|
1254
|
+
* @type {readonly CliAgentSurfaceManifestEntry[]}
|
|
945
1255
|
*/
|
|
946
|
-
declare
|
|
1256
|
+
declare const CLI_AGENT_SURFACE_MANIFEST: readonly CliAgentSurfaceManifestEntry$1[];
|
|
1257
|
+
type CliAgentSurfaceManifestEntry$1 = CliAgentSurfaceManifestEntry$2;
|
|
947
1258
|
|
|
948
|
-
type AgentCapabilityRegistry = AgentCapabilityRegistry$
|
|
1259
|
+
type AgentCapabilityRegistry = AgentCapabilityRegistry$6;
|
|
1260
|
+
type AgentGenerateOptions = AgentGenerateOptions$4;
|
|
949
1261
|
type AgentLike = AgentLike$1;
|
|
950
1262
|
type AgentToolDescriptor = AgentToolDescriptor$1;
|
|
951
1263
|
type AnthropicAgentOptions<CALL_OPTIONS = never, TOOLS = ai.ToolSet> = AnthropicAgentOptions$2<CALL_OPTIONS, TOOLS>;
|
|
952
|
-
type OpenCodeAgentOptions = OpenCodeAgentOptions$1;
|
|
953
1264
|
type OpenAIAgentOptions<CALL_OPTIONS = never, TOOLS = ai.ToolSet> = OpenAIAgentOptions$2<CALL_OPTIONS, TOOLS>;
|
|
954
1265
|
type HermesAgentOptions<CALL_OPTIONS = never, TOOLS = ai.ToolSet> = HermesAgentOptions$2<CALL_OPTIONS, TOOLS>;
|
|
955
1266
|
type PiAgentOptions = PiAgentOptions$2;
|
|
956
1267
|
type PiExtensionUiRequest = PiExtensionUiRequest$1;
|
|
957
1268
|
type PiExtensionUiResponse = PiExtensionUiResponse$1;
|
|
1269
|
+
type OpenCodeAgentOptions = OpenCodeAgentOptions$1;
|
|
958
1270
|
type SmithersAgentContract = SmithersAgentContract$3;
|
|
959
1271
|
type SmithersAgentContractTool = SmithersAgentContractTool$1;
|
|
960
1272
|
type SmithersAgentToolCategory = SmithersAgentToolCategory$1;
|
|
961
1273
|
type SmithersListedTool = SmithersListedTool$2;
|
|
962
1274
|
type SmithersToolSurface = SmithersToolSurface$2;
|
|
1275
|
+
type CliAgentCapabilityAdapterId = CliAgentCapabilityAdapterId$1;
|
|
1276
|
+
type CliAgentCapabilityDoctorEntry = CliAgentCapabilityDoctorEntry$1;
|
|
1277
|
+
type CliAgentCapabilityDoctorReport = CliAgentCapabilityDoctorReport$3;
|
|
1278
|
+
type CliAgentCapabilityIssue = CliAgentCapabilityIssue$1;
|
|
1279
|
+
type CliAgentCapabilityReportEntry = CliAgentCapabilityReportEntry$2;
|
|
1280
|
+
type CliAgentSurfaceManifestEntry = CliAgentSurfaceManifestEntry$2;
|
|
1281
|
+
type CliAgentSurfaceOptionMapping = CliAgentSurfaceOptionMapping$1;
|
|
1282
|
+
type CliAgentSurfaceResumeContract = CliAgentSurfaceResumeContract$1;
|
|
1283
|
+
type CliAgentUnsupportedFlag = CliAgentUnsupportedFlag$1;
|
|
963
1284
|
|
|
964
|
-
export { type AgentCapabilityRegistry, type AgentGenerateOptions, type AgentLike, type AgentToolDescriptor, AmpAgent, AnthropicAgent, type AnthropicAgentOptions, AntigravityAgent, BaseCliAgent, ClaudeCodeAgent, CodexAgent, ForgeAgent, GeminiAgent, HermesAgent, type HermesAgentOptions, KimiAgent, OpenAIAgent, type OpenAIAgentOptions, OpenCodeAgent, type OpenCodeAgentOptions, PiAgent, type PiAgentOptions, type PiExtensionUiRequest, type PiExtensionUiResponse, type SmithersAgentContract, type SmithersAgentContractTool, type SmithersAgentToolCategory, type SmithersListedTool, type SmithersToolSurface, createAntigravityCapabilityRegistry, createSmithersAgentContract, hashCapabilityRegistry, renderSmithersAgentPromptGuidance, sanitizeForOpenAI, zodToOpenAISchema };
|
|
1285
|
+
export { type AgentCapabilityRegistry, type AgentGenerateOptions, type AgentLike, type AgentToolDescriptor, AmpAgent, AnthropicAgent, type AnthropicAgentOptions, AntigravityAgent, BaseCliAgent, CLI_AGENT_SURFACE_MANIFEST, ClaudeCodeAgent, type CliAgentCapabilityAdapterId, type CliAgentCapabilityDoctorEntry, type CliAgentCapabilityDoctorReport, type CliAgentCapabilityIssue, type CliAgentCapabilityReportEntry, type CliAgentSurfaceManifestEntry, type CliAgentSurfaceOptionMapping, type CliAgentSurfaceResumeContract, type CliAgentUnsupportedFlag, CodexAgent, ForgeAgent, GeminiAgent, HermesAgent, type HermesAgentOptions, KimiAgent, OpenAIAgent, type OpenAIAgentOptions, OpenCodeAgent, type OpenCodeAgentOptions, PiAgent, type PiAgentOptions, type PiExtensionUiRequest, type PiExtensionUiResponse, type SmithersAgentContract, type SmithersAgentContractTool, type SmithersAgentToolCategory, type SmithersListedTool, type SmithersToolSurface, VibeAgent, type VibeAgentOptions, createAmpCapabilityRegistry, createAntigravityCapabilityRegistry, createForgeCapabilityRegistry, createSmithersAgentContract, createVibeCapabilityRegistry, formatCliAgentCapabilityDoctorReport, getCliAgentCapabilityDoctorReport, getCliAgentCapabilityReport, getCliAgentSurfaceManifestEntry, hashCapabilityRegistry, listCliAgentSurfaceManifests, renderSmithersAgentPromptGuidance, sanitizeForOpenAI, zodToOpenAISchema };
|