@smithers-orchestrator/agents 0.21.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.
Files changed (34) hide show
  1. package/package.json +6 -5
  2. package/src/AmpAgent.js +26 -19
  3. package/src/AntigravityAgent.js +53 -18
  4. package/src/AntigravityAgentOptions.ts +45 -4
  5. package/src/BaseCliAgent/AgentGenerateOptions.ts +12 -0
  6. package/src/BaseCliAgent/BaseCliAgent.js +19 -1
  7. package/src/BaseCliAgent/runRpcCommandEffect.js +7 -3
  8. package/src/BaseCliAgent/taskContextEnv.js +31 -0
  9. package/src/BaseCliAgent/truncateToBytes.js +18 -1
  10. package/src/ClaudeCodeAgent.js +19 -1
  11. package/src/CodexAgent.js +15 -8
  12. package/src/ForgeAgent.js +26 -19
  13. package/src/HermesAgent.js +41 -0
  14. package/src/HermesAgentOptions.ts +41 -0
  15. package/src/VibeAgent.js +214 -0
  16. package/src/VibeAgentOptions.ts +11 -0
  17. package/src/agent-contract/createSmithersAgentContract.js +1 -0
  18. package/src/agent-contract/renderSmithersAgentPromptGuidance.js +4 -0
  19. package/src/capability-registry/AgentCapabilityRegistry.ts +1 -1
  20. package/src/cli-capabilities/CliAgentCapabilityAdapterId.ts +4 -1
  21. package/src/cli-capabilities/CliAgentCapabilityReportEntry.ts +2 -0
  22. package/src/cli-capabilities/getCliAgentCapabilityDoctorReport.js +48 -1
  23. package/src/cli-capabilities/getCliAgentCapabilityReport.js +24 -0
  24. package/src/cli-capabilities/index.js +5 -0
  25. package/src/cli-surface/CliAgentSurfaceTypes.ts +34 -0
  26. package/src/cli-surface/cliAgentSurfaceManifest.js +490 -0
  27. package/src/cli-surface/index.js +5 -0
  28. package/src/diagnostics/runDiagnostics.js +9 -1
  29. package/src/index.d.ts +715 -380
  30. package/src/index.js +27 -0
  31. package/src/mcp/McpServerConfig.ts +19 -0
  32. package/src/mcp/McpToolset.ts +17 -0
  33. package/src/mcp/createMcpToolset.js +94 -0
  34. 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 BaseCliAgentOptions$1 = {
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
- type PiAgentOptions$2 = BaseCliAgentOptions$1 & {
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$1;
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,128 +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
523
  /**
368
- * Configuration options for the AmpAgent.
524
+ * @template [CALL_OPTIONS=never], [TOOLS=import("ai").ToolSet]
525
+ * @typedef {import("./HermesAgentOptions.ts").HermesAgentOptions<CALL_OPTIONS, TOOLS>} HermesAgentOptions
369
526
  */
370
- type AmpAgentOptions$1 = BaseCliAgentOptions$1 & {
371
- /** Visibility setting for the new thread (e.g., private, public) */
372
- visibility?: "private" | "public" | "workspace" | "group";
373
- /** Path to a specific MCP configuration file */
374
- mcpConfig?: string;
375
- /** Path to a specific settings file */
376
- settingsFile?: string;
377
- /** Logging severity level */
378
- logLevel?: "error" | "warn" | "info" | "debug" | "audit";
379
- /** File path to write logs to */
380
- logFile?: string;
381
- /**
382
- * If true, dangerously allows all commands without asking for permission.
383
- * Equivalent to yolo mode but explicit.
384
- */
385
- dangerouslyAllowAll?: boolean;
386
- /** Whether to enable IDE integrations (disabled by default in AmpAgent) */
387
- ide?: boolean;
388
- /** Whether to enable JetBrains IDE integration */
389
- jetbrains?: boolean;
390
- };
391
-
392
- /** @typedef {import("./BaseCliAgent/CliOutputInterpreter.ts").CliOutputInterpreter} CliOutputInterpreter */
393
527
  /**
394
- * Agent implementation that wraps the 'amp' CLI executable.
395
- * It translates generation requests into CLI arguments and executes the process.
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]
396
537
  */
397
- declare class AmpAgent extends BaseCliAgent {
538
+ declare class HermesAgent<CALL_OPTIONS = never, TOOLS = ai.ToolSet> extends OpenAIAgent {
398
539
  /**
399
- * Initializes a new AmpAgent with the given options.
400
- *
401
- * @param {AmpAgentOptions} [opts] - Configuration options for the agent
540
+ * @param {HermesAgentOptions<CALL_OPTIONS, TOOLS>} [opts]
402
541
  */
403
- constructor(opts?: AmpAgentOptions);
404
- opts: AmpAgentOptions$1;
405
- capabilities: AgentCapabilityRegistry$3;
406
- cliEngine: string;
407
- /**
408
- * @returns {CliOutputInterpreter}
409
- */
410
- createOutputInterpreter(): CliOutputInterpreter$6;
411
- /**
412
- * @param {{ prompt: string; systemPrompt?: string; cwd: string; options: any; }} params
413
- */
414
- buildCommand(params: {
415
- prompt: string;
416
- systemPrompt?: string;
417
- cwd: string;
418
- options: any;
419
- }): Promise<{
420
- command: string;
421
- args: string[];
422
- outputFormat: string;
423
- }>;
424
- }
425
- type AmpAgentOptions = AmpAgentOptions$1;
426
- type CliOutputInterpreter$6 = CliOutputInterpreter$8;
427
-
428
- type AntigravityAgentOptions$1 = BaseCliAgentOptions$1 & {
429
- debug?: boolean;
430
- model?: string;
431
- sandbox?: boolean;
432
- yolo?: boolean;
433
- dangerouslySkipPermissions?: boolean;
434
- allowedMcpServerNames?: string[];
435
- allowedTools?: string[];
436
- extensions?: string[];
437
- listExtensions?: boolean;
438
- resume?: string;
439
- listSessions?: boolean;
440
- deleteSession?: string;
441
- includeDirectories?: string[];
442
- screenReader?: boolean;
443
- outputFormat?: "text" | "json" | "stream-json";
444
- binary?: string;
445
- configDir?: string;
446
- geminiDir?: string;
447
- apiKey?: string;
448
- };
449
- declare function createAntigravityCapabilityRegistry(opts?: AntigravityAgentOptions): AgentCapabilityRegistry$3;
450
- declare class AntigravityAgent extends BaseCliAgent {
451
- /**
452
- * @param {AntigravityAgentOptions} [opts]
453
- */
454
- constructor(opts?: AntigravityAgentOptions);
455
- opts: AntigravityAgentOptions$1;
456
- capabilities: AgentCapabilityRegistry$3;
457
- cliEngine: string;
458
- /**
459
- * @returns {CliOutputInterpreter}
460
- */
461
- createOutputInterpreter(): CliOutputInterpreter$6;
462
- /**
463
- * @param {{ prompt: string; systemPrompt?: string; cwd: string; options: any; }} params
464
- */
465
- buildCommand(params: {
466
- prompt: string;
467
- systemPrompt?: string;
468
- cwd: string;
469
- options: any;
470
- }): Promise<{
471
- command: string;
472
- args: string[];
473
- outputFormat: "text" | "json" | "stream-json";
474
- env: Record<string, string> | undefined;
475
- }>;
542
+ constructor(opts?: HermesAgentOptions$1<CALL_OPTIONS, TOOLS>);
476
543
  }
477
- type AntigravityAgentOptions = AntigravityAgentOptions$1;
544
+ type HermesAgentOptions$1<CALL_OPTIONS = never, TOOLS = ai.ToolSet> = HermesAgentOptions$2<CALL_OPTIONS, TOOLS>;
478
545
 
479
- type ClaudeCodeAgentOptions$1 = BaseCliAgentOptions$1 & {
546
+ type ClaudeCodeAgentOptions$1 = BaseCliAgentOptions$2 & {
480
547
  addDir?: string[];
481
548
  agent?: string;
482
549
  agents?: Record<string, {
@@ -486,6 +553,22 @@ type ClaudeCodeAgentOptions$1 = BaseCliAgentOptions$1 & {
486
553
  allowDangerouslySkipPermissions?: boolean;
487
554
  allowedTools?: string[];
488
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;
489
572
  betas?: string[];
490
573
  chrome?: boolean;
491
574
  continue?: boolean;
@@ -528,12 +611,12 @@ declare class ClaudeCodeAgent extends BaseCliAgent {
528
611
  */
529
612
  constructor(opts?: ClaudeCodeAgentOptions);
530
613
  opts: ClaudeCodeAgentOptions$1;
531
- capabilities: AgentCapabilityRegistry$3;
614
+ capabilities: AgentCapabilityRegistry$6;
532
615
  cliEngine: string;
533
616
  /**
534
617
  * @returns {CliOutputInterpreter}
535
618
  */
536
- createOutputInterpreter(): CliOutputInterpreter$5;
619
+ createOutputInterpreter(): CliOutputInterpreter$7;
537
620
  /**
538
621
  * @param {{ prompt: string; systemPrompt?: string; cwd: string; options: any; }} params
539
622
  */
@@ -546,12 +629,16 @@ declare class ClaudeCodeAgent extends BaseCliAgent {
546
629
  command: string;
547
630
  args: string[];
548
631
  outputFormat: "stream-json" | "text" | "json";
632
+ env: {
633
+ CLAUDE_CONFIG_DIR: string;
634
+ ANTHROPIC_API_KEY: string;
635
+ } | undefined;
549
636
  }>;
550
637
  }
551
638
  type ClaudeCodeAgentOptions = ClaudeCodeAgentOptions$1;
552
- type CliOutputInterpreter$5 = CliOutputInterpreter$8;
639
+ type CliOutputInterpreter$7 = CliOutputInterpreter$a;
553
640
 
554
- type CodexAgentOptions$1 = BaseCliAgentOptions$1 & {
641
+ type CodexAgentOptions$1 = BaseCliAgentOptions$2 & {
555
642
  config?: CodexConfigOverrides;
556
643
  enable?: string[];
557
644
  disable?: string[];
@@ -593,12 +680,12 @@ declare class CodexAgent extends BaseCliAgent {
593
680
  */
594
681
  constructor(opts?: CodexAgentOptions);
595
682
  opts: CodexAgentOptions$1;
596
- capabilities: AgentCapabilityRegistry$3;
683
+ capabilities: AgentCapabilityRegistry$6;
597
684
  cliEngine: string;
598
685
  /**
599
686
  * @returns {CliOutputInterpreter}
600
687
  */
601
- createOutputInterpreter(): CliOutputInterpreter$4;
688
+ createOutputInterpreter(): CliOutputInterpreter$6;
602
689
  /**
603
690
  * @param {{ prompt: string; systemPrompt?: string; cwd: string; options: any; }} params
604
691
  */
@@ -609,18 +696,27 @@ declare class CodexAgent extends BaseCliAgent {
609
696
  options: any;
610
697
  }): Promise<{
611
698
  command: string;
612
- args: any[];
699
+ args: string[];
613
700
  stdin: string;
614
701
  outputFile: string;
615
702
  outputFormat: string;
703
+ env: {
704
+ CODEX_HOME: string;
705
+ OPENAI_API_KEY: string;
706
+ } | undefined;
616
707
  stdoutBannerPatterns: RegExp[];
617
708
  cleanup: () => Promise<void>;
618
709
  }>;
619
710
  }
620
- type CliOutputInterpreter$4 = CliOutputInterpreter$8;
711
+ type CliOutputInterpreter$6 = CliOutputInterpreter$a;
621
712
  type CodexAgentOptions = CodexAgentOptions$1;
622
713
 
623
- type GeminiAgentOptions$1 = BaseCliAgentOptions$1 & {
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 & {
624
720
  debug?: boolean;
625
721
  model?: string;
626
722
  sandbox?: boolean;
@@ -637,20 +733,36 @@ type GeminiAgentOptions$1 = BaseCliAgentOptions$1 & {
637
733
  includeDirectories?: string[];
638
734
  screenReader?: boolean;
639
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;
640
748
  };
641
749
 
750
+ /**
751
+ * @deprecated Use AntigravityAgent for new Google CLI integrations. GeminiAgent
752
+ * remains for legacy and enterprise Gemini CLI setups.
753
+ */
642
754
  declare class GeminiAgent extends BaseCliAgent {
643
755
  /**
644
756
  * @param {GeminiAgentOptions} [opts]
645
757
  */
646
758
  constructor(opts?: GeminiAgentOptions);
647
759
  opts: GeminiAgentOptions$1;
648
- capabilities: AgentCapabilityRegistry$3;
760
+ capabilities: AgentCapabilityRegistry$6;
649
761
  cliEngine: string;
650
762
  /**
651
763
  * @returns {CliOutputInterpreter}
652
764
  */
653
- createOutputInterpreter(): CliOutputInterpreter$3;
765
+ createOutputInterpreter(): CliOutputInterpreter$5;
654
766
  /**
655
767
  * @param {{ prompt: string; systemPrompt?: string; cwd: string; options: any; }} params
656
768
  */
@@ -663,9 +775,13 @@ declare class GeminiAgent extends BaseCliAgent {
663
775
  command: string;
664
776
  args: string[];
665
777
  outputFormat: "stream-json" | "text" | "json";
778
+ env: {
779
+ GEMINI_DIR: string;
780
+ GEMINI_API_KEY: string;
781
+ } | undefined;
666
782
  }>;
667
783
  }
668
- type CliOutputInterpreter$3 = CliOutputInterpreter$8;
784
+ type CliOutputInterpreter$5 = CliOutputInterpreter$a;
669
785
  type GeminiAgentOptions = GeminiAgentOptions$1;
670
786
 
671
787
  declare class PiAgent extends BaseCliAgent {
@@ -674,7 +790,7 @@ declare class PiAgent extends BaseCliAgent {
674
790
  */
675
791
  constructor(opts?: PiAgentOptions$1);
676
792
  opts: PiAgentOptions$2;
677
- capabilities: AgentCapabilityRegistry$3;
793
+ capabilities: AgentCapabilityRegistry$6;
678
794
  cliEngine: string;
679
795
  issuedSessionRef: any;
680
796
  /**
@@ -695,7 +811,7 @@ declare class PiAgent extends BaseCliAgent {
695
811
  /**
696
812
  * @returns {CliOutputInterpreter}
697
813
  */
698
- createOutputInterpreter(): CliOutputInterpreter$2;
814
+ createOutputInterpreter(): CliOutputInterpreter$4;
699
815
  /**
700
816
  * @param {PiGenerateOptions} [options]
701
817
  * @returns {Promise<GenerateTextResult>}
@@ -719,8 +835,8 @@ declare class PiAgent extends BaseCliAgent {
719
835
  cleanup?: () => Promise<void>;
720
836
  }>;
721
837
  }
722
- type CliOutputInterpreter$2 = CliOutputInterpreter$8;
723
- type AgentCliEvent = AgentCliEvent$2;
838
+ type CliOutputInterpreter$4 = CliOutputInterpreter$a;
839
+ type AgentCliEvent = AgentCliEvent$1;
724
840
  type GenerateTextResult = ai.GenerateTextResult<Record<string, never>, unknown>;
725
841
  type PiAgentOptions$1 = PiAgentOptions$2;
726
842
  type PiMode = "text" | "json" | "stream-json" | "rpc";
@@ -738,7 +854,7 @@ type PiGenerateOptions = {
738
854
  [key: string]: unknown;
739
855
  };
740
856
 
741
- type KimiAgentOptions$1 = BaseCliAgentOptions$1 & {
857
+ type KimiAgentOptions$1 = BaseCliAgentOptions$2 & {
742
858
  workDir?: string;
743
859
  session?: string;
744
860
  continue?: boolean;
@@ -756,6 +872,14 @@ type KimiAgentOptions$1 = BaseCliAgentOptions$1 & {
756
872
  maxRalphIterations?: number;
757
873
  verbose?: boolean;
758
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;
759
883
  };
760
884
 
761
885
  declare class KimiAgent extends BaseCliAgent {
@@ -764,13 +888,13 @@ declare class KimiAgent extends BaseCliAgent {
764
888
  */
765
889
  constructor(opts?: KimiAgentOptions);
766
890
  opts: KimiAgentOptions$1;
767
- capabilities: AgentCapabilityRegistry$3;
891
+ capabilities: AgentCapabilityRegistry$6;
768
892
  cliEngine: string;
769
893
  issuedSessionId: any;
770
894
  /**
771
895
  * @returns {CliOutputInterpreter}
772
896
  */
773
- createOutputInterpreter(): CliOutputInterpreter$1;
897
+ createOutputInterpreter(): CliOutputInterpreter$3;
774
898
  /**
775
899
  * @param {{ prompt: string; systemPrompt?: string; cwd: string; options: any; }} params
776
900
  */
@@ -789,41 +913,115 @@ declare class KimiAgent extends BaseCliAgent {
789
913
  cleanup: (() => Promise<void>) | undefined;
790
914
  stdoutBannerPatterns: RegExp[];
791
915
  stdoutErrorPatterns: RegExp[];
916
+ benignStderrPatterns: RegExp[];
792
917
  errorOnBannerOnly: boolean;
793
918
  }>;
794
919
  }
795
- type CliOutputInterpreter$1 = CliOutputInterpreter$8;
920
+ type CliOutputInterpreter$3 = CliOutputInterpreter$a;
796
921
  type KimiAgentOptions = KimiAgentOptions$1;
797
922
 
798
- type ForgeAgentOptions$1 = BaseCliAgentOptions$1 & {
799
- directory?: string;
800
- provider?: string;
801
- agent?: string;
802
- conversationId?: string;
803
- sandbox?: string;
804
- restricted?: boolean;
805
- verbose?: boolean;
806
- workflow?: string;
807
- event?: string;
808
- conversation?: string;
809
- };
810
-
811
- /** @typedef {import("./BaseCliAgent/BaseCliAgentOptions.ts").BaseCliAgentOptions} BaseCliAgentOptions */
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 */
812
1001
  /** @typedef {import("./BaseCliAgent/CliOutputInterpreter.ts").CliOutputInterpreter} CliOutputInterpreter */
813
- /** @typedef {import("./ForgeAgentOptions.ts").ForgeAgentOptions} ForgeAgentOptions */
814
- declare class ForgeAgent extends BaseCliAgent {
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 {
815
1011
  /**
816
- * @param {ForgeAgentOptions} [opts]
817
- */
818
- constructor(opts?: ForgeAgentOptions);
819
- opts: ForgeAgentOptions$1;
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} */
820
1019
  capabilities: AgentCapabilityRegistry$3;
821
1020
  cliEngine: string;
822
- issuedConversationId: any;
823
1021
  /**
824
1022
  * @returns {CliOutputInterpreter}
825
1023
  */
826
- createOutputInterpreter(): CliOutputInterpreter;
1024
+ createOutputInterpreter(): CliOutputInterpreter$2;
827
1025
  /**
828
1026
  * @param {{ prompt: string; systemPrompt?: string; cwd: string; options: any; }} params
829
1027
  */
@@ -838,30 +1036,165 @@ declare class ForgeAgent extends BaseCliAgent {
838
1036
  outputFormat: string;
839
1037
  }>;
840
1038
  }
841
- type CliOutputInterpreter = CliOutputInterpreter$8;
842
- type ForgeAgentOptions = ForgeAgentOptions$1;
1039
+ type AgentCapabilityRegistry$3 = AgentCapabilityRegistry$6;
1040
+ type CliOutputInterpreter$2 = CliOutputInterpreter$a;
1041
+ type AmpAgentOptions = AmpAgentOptions$1;
843
1042
 
844
- type OpenCodeAgentOptions$1 = BaseCliAgentOptions$1 & {
845
- /** Model identifier (e.g., "anthropic/claude-opus-4-20250514", "openai/gpt-5.4") */
1043
+ type AntigravityAgentOptions$1 = BaseCliAgentOptions$2 & {
846
1044
  model?: string;
847
- /** OpenCode agent name (maps to --agent flag, selects predefined agent config) */
848
- agentName?: string;
849
- /** Files to attach to the prompt via -f flags */
850
- attachFiles?: string[];
851
- /** Continue a previous session */
852
- continueSession?: boolean;
853
- /** Resume a specific session by ID */
854
- sessionId?: string;
855
- /** Provider-specific model variant/reasoning effort level */
856
- variant?: 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;
857
1119
  };
858
1120
 
859
- declare class OpenCodeAgent extends BaseCliAgent {
860
- constructor(opts?: OpenCodeAgentOptions);
861
- opts: OpenCodeAgentOptions$1;
862
- capabilities: AgentCapabilityRegistry$3;
863
- cliEngine: "opencode";
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 & {
1161
+ directory?: string;
1162
+ provider?: string;
1163
+ agent?: string;
1164
+ conversationId?: string;
1165
+ sandbox?: string;
1166
+ restricted?: boolean;
1167
+ verbose?: boolean;
1168
+ workflow?: string;
1169
+ event?: string;
1170
+ conversation?: string;
1171
+ };
1172
+
1173
+ /** @typedef {import("./capability-registry/AgentCapabilityRegistry.ts").AgentCapabilityRegistry} AgentCapabilityRegistry */
1174
+ /** @typedef {import("./BaseCliAgent/BaseCliAgentOptions.ts").BaseCliAgentOptions} BaseCliAgentOptions */
1175
+ /** @typedef {import("./BaseCliAgent/CliOutputInterpreter.ts").CliOutputInterpreter} CliOutputInterpreter */
1176
+ /** @typedef {import("./ForgeAgentOptions.ts").ForgeAgentOptions} ForgeAgentOptions */
1177
+ /**
1178
+ * @returns {AgentCapabilityRegistry}
1179
+ */
1180
+ declare function createForgeCapabilityRegistry(): AgentCapabilityRegistry$1;
1181
+ declare class ForgeAgent extends BaseCliAgent {
1182
+ /**
1183
+ * @param {ForgeAgentOptions} [opts]
1184
+ */
1185
+ constructor(opts?: ForgeAgentOptions);
1186
+ opts: ForgeAgentOptions$1;
1187
+ /** @type {AgentCapabilityRegistry} */
1188
+ capabilities: AgentCapabilityRegistry$1;
1189
+ cliEngine: string;
1190
+ issuedConversationId: any;
1191
+ /**
1192
+ * @returns {CliOutputInterpreter}
1193
+ */
864
1194
  createOutputInterpreter(): CliOutputInterpreter;
1195
+ /**
1196
+ * @param {{ prompt: string; systemPrompt?: string; cwd: string; options: any; }} params
1197
+ */
865
1198
  buildCommand(params: {
866
1199
  prompt: string;
867
1200
  systemPrompt?: string;
@@ -870,81 +1203,83 @@ declare class OpenCodeAgent extends BaseCliAgent {
870
1203
  }): Promise<{
871
1204
  command: string;
872
1205
  args: string[];
873
- outputFormat: "stream-json";
874
- env?: Record<string, string>;
875
- stdoutBannerPatterns: RegExp[];
876
- stdoutErrorPatterns: RegExp[];
1206
+ outputFormat: string;
877
1207
  }>;
878
1208
  }
1209
+ type AgentCapabilityRegistry$1 = AgentCapabilityRegistry$6;
1210
+ type CliOutputInterpreter = CliOutputInterpreter$a;
1211
+ type ForgeAgentOptions = ForgeAgentOptions$1;
879
1212
 
880
1213
  /**
881
- * @param {CreateSmithersAgentContractOptions} options
882
- * @returns {SmithersAgentContract}
1214
+ * @returns {AgentCapabilityRegistry}
883
1215
  */
884
- declare function createSmithersAgentContract(options: CreateSmithersAgentContractOptions): SmithersAgentContract$2;
885
- type SmithersListedTool$1 = SmithersListedTool$2;
886
- type SmithersToolSurface$1 = SmithersToolSurface$2;
887
- type CreateSmithersAgentContractOptions = {
888
- toolSurface?: SmithersToolSurface$1;
889
- serverName?: string;
890
- tools: SmithersListedTool$1[];
891
- };
892
- type SmithersAgentContract$2 = SmithersAgentContract$3;
1216
+ declare function createVibeCapabilityRegistry(opts?: VibeAgentOptions$1): AgentCapabilityRegistry$6;
1217
+ type VibeAgentOptions = VibeAgentOptions$1;
893
1218
 
894
1219
  /**
895
- * @param {SmithersAgentContract} contract
896
- * @param {RenderGuidanceOptions} [options]
1220
+ * @returns {CliAgentCapabilityReportEntry[]}
897
1221
  */
898
- declare function renderSmithersAgentPromptGuidance(contract: SmithersAgentContract$1, options?: RenderGuidanceOptions): string;
899
- type RenderGuidanceOptions = {
900
- available?: boolean;
901
- toolNamePrefix?: string;
902
- };
903
- type SmithersAgentContract$1 = SmithersAgentContract$3;
1222
+ declare function getCliAgentCapabilityReport(): CliAgentCapabilityReportEntry$1[];
1223
+ type CliAgentCapabilityReportEntry$1 = CliAgentCapabilityReportEntry$2;
904
1224
 
905
1225
  /**
906
- * Convert a Zod schema to an OpenAI-safe JSON Schema object.
907
- *
908
- * Usage:
909
- * ```ts
910
- * import { zodToOpenAISchema } from "./zodToOpenAISchema";
911
- * const jsonSchema = zodToOpenAISchema(myZodSchema);
912
- * ```
1226
+ * @returns {CliAgentCapabilityDoctorReport}
913
1227
  */
914
- declare function zodToOpenAISchema(zodSchema: any): Promise<zod_v4_core.ZodStandardJSONSchemaPayload<any>>;
1228
+ declare function getCliAgentCapabilityDoctorReport(): CliAgentCapabilityDoctorReport$2;
1229
+ type CliAgentCapabilityDoctorReport$2 = CliAgentCapabilityDoctorReport$3;
915
1230
 
1231
+ /** @typedef {import("./CliAgentCapabilityDoctorReport.ts").CliAgentCapabilityDoctorReport} CliAgentCapabilityDoctorReport */
916
1232
  /**
917
- * Sanitize a JSON Schema for OpenAI's structured-output API.
918
- *
919
- * OpenAI's `response_format` imposes constraints beyond standard JSON Schema:
920
- *
921
- * 1. Every object node **must** include `"type": "object"`.
922
- * 2. `additionalProperties` must be a boolean or a valid sub-schema with a
923
- * `type` key -- bare `{}` is rejected.
924
- * 3. `additionalProperties: true` is accepted but tells the model it can
925
- * return extra keys -- set to `false` if you want strict conformance.
926
- *
927
- * Zod v4's `toJSONSchema()` can violate (1) when `z.looseObject()` is used:
928
- * it emits `{ additionalProperties: true }` without `"type": "object"`.
1233
+ * @param {CliAgentCapabilityDoctorReport} report
1234
+ * @returns {string}
1235
+ */
1236
+ declare function formatCliAgentCapabilityDoctorReport(report: CliAgentCapabilityDoctorReport$1): string;
1237
+ type CliAgentCapabilityDoctorReport$1 = CliAgentCapabilityDoctorReport$3;
1238
+
1239
+ /**
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.
929
1253
  *
930
- * This function fixes these issues in-place so any agent (Codex, future
931
- * OpenAI-backed agents, etc.) can safely use a JSON Schema for OpenAI.
1254
+ * @type {readonly CliAgentSurfaceManifestEntry[]}
932
1255
  */
933
- declare function sanitizeForOpenAI(node: any): void;
1256
+ declare const CLI_AGENT_SURFACE_MANIFEST: readonly CliAgentSurfaceManifestEntry$1[];
1257
+ type CliAgentSurfaceManifestEntry$1 = CliAgentSurfaceManifestEntry$2;
934
1258
 
935
- type AgentCapabilityRegistry = AgentCapabilityRegistry$3;
1259
+ type AgentCapabilityRegistry = AgentCapabilityRegistry$6;
1260
+ type AgentGenerateOptions = AgentGenerateOptions$4;
936
1261
  type AgentLike = AgentLike$1;
937
1262
  type AgentToolDescriptor = AgentToolDescriptor$1;
938
1263
  type AnthropicAgentOptions<CALL_OPTIONS = never, TOOLS = ai.ToolSet> = AnthropicAgentOptions$2<CALL_OPTIONS, TOOLS>;
939
- type OpenCodeAgentOptions = OpenCodeAgentOptions$1;
940
1264
  type OpenAIAgentOptions<CALL_OPTIONS = never, TOOLS = ai.ToolSet> = OpenAIAgentOptions$2<CALL_OPTIONS, TOOLS>;
1265
+ type HermesAgentOptions<CALL_OPTIONS = never, TOOLS = ai.ToolSet> = HermesAgentOptions$2<CALL_OPTIONS, TOOLS>;
941
1266
  type PiAgentOptions = PiAgentOptions$2;
942
1267
  type PiExtensionUiRequest = PiExtensionUiRequest$1;
943
1268
  type PiExtensionUiResponse = PiExtensionUiResponse$1;
1269
+ type OpenCodeAgentOptions = OpenCodeAgentOptions$1;
944
1270
  type SmithersAgentContract = SmithersAgentContract$3;
945
1271
  type SmithersAgentContractTool = SmithersAgentContractTool$1;
946
1272
  type SmithersAgentToolCategory = SmithersAgentToolCategory$1;
947
1273
  type SmithersListedTool = SmithersListedTool$2;
948
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;
949
1284
 
950
- export { type AgentCapabilityRegistry, type AgentGenerateOptions, type AgentLike, type AgentToolDescriptor, AmpAgent, AnthropicAgent, type AnthropicAgentOptions, AntigravityAgent, BaseCliAgent, ClaudeCodeAgent, CodexAgent, ForgeAgent, GeminiAgent, 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 };