@smithers-orchestrator/agents 0.24.2 → 0.25.1
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 +15 -5
- package/src/AgentLike.ts +5 -0
- package/src/AmpAgent.js +15 -5
- package/src/AmpAgentOptions.ts +6 -0
- package/src/BaseCliAgent/BaseCliAgent.js +198 -10
- package/src/BaseCliAgent/createAgentStdoutTextEmitter.js +21 -3
- package/src/BaseCliAgent/index.d.ts +467 -0
- package/src/ClaudeCodeAgent.js +6 -2
- package/src/CodexAgent.js +4 -0
- package/src/GeminiAgent.js +34 -224
- package/src/GeminiAgentOptions.ts +4 -9
- package/src/OpenCodeAgent.js +2 -12
- package/src/OpenCodeAgentOptions.ts +19 -0
- package/src/PiAgent.js +4 -0
- package/src/cli-capabilities/CliAgentCapabilityAdapterId.ts +0 -1
- package/src/cli-capabilities/getCliAgentCapabilityDoctorReport.js +3 -2
- package/src/cli-capabilities/getCliAgentCapabilityReport.js +0 -6
- package/src/cli-surface/cliAgentSurfaceManifest.js +1 -40
- package/src/createElevenLabsTextToSpeechTool.js +128 -0
- package/src/createElevenLabsTextToSpeechTool.ts +33 -0
- package/src/diagnostics/getDiagnosticStrategy.js +163 -35
- package/src/document-parsing/DocumentParsingProvider.ts +13 -0
- package/src/document-parsing/DocumentParsingResult.ts +13 -0
- package/src/document-parsing/DocumentParsingToolset.ts +4 -0
- package/src/document-parsing/DocumentParsingToolsetOptions.ts +9 -0
- package/src/document-parsing/createDocumentParsingToolset.d.ts +9 -0
- package/src/document-parsing/createDocumentParsingToolset.js +416 -0
- package/src/http/CreateHttpToolOptions.ts +4 -0
- package/src/http/HttpToolAuth.ts +15 -0
- package/src/http/HttpToolInput.ts +11 -0
- package/src/http/HttpToolOutput.ts +7 -0
- package/src/http/createHttpTool.js +136 -0
- package/src/image-generation/ImageGenerationProvider.ts +7 -0
- package/src/image-generation/ImageGenerationRequest.ts +8 -0
- package/src/image-generation/ImageGenerationResult.ts +10 -0
- package/src/image-generation/ImageGenerationToolOptions.ts +10 -0
- package/src/image-generation/createImageGenerationTool.d.ts +18 -0
- package/src/image-generation/createImageGenerationTool.js +92 -0
- package/src/index.d.ts +490 -147
- package/src/index.js +23 -5
- package/src/streamResultToGenerateResult.js +55 -26
- package/src/transcription/createTranscriptionTool.js +182 -0
- package/src/transcription/createTranscriptionTool.ts +29 -0
- package/src/transcription/index.js +1 -0
- package/src/transcription/index.ts +6 -0
- package/src/web-search/GroundedWebSearchProvider.ts +21 -0
- package/src/web-search/GroundedWebSearchToolset.ts +6 -0
- package/src/web-search/createBraveSearchProvider.js +53 -0
- package/src/web-search/createExaSearchProvider.js +72 -0
- package/src/web-search/createGroundedWebSearchToolset.js +110 -0
- package/src/web-search/createSerperSearchProvider.js +63 -0
- package/src/web-search/createTavilySearchProvider.js +59 -0
- package/src/web-search/index.js +5 -0
- package/src/zodToOpenAISchema.js +4 -0
- package/src/OpenCodeAgent.ts +0 -43
package/src/index.d.ts
CHANGED
|
@@ -1,12 +1,156 @@
|
|
|
1
1
|
import * as ai from 'ai';
|
|
2
|
-
import { ToolLoopAgent, ToolSet, ToolLoopAgentSettings } from 'ai';
|
|
2
|
+
import { ToolLoopAgent, ToolSet, ToolLoopAgentSettings, Tool as Tool$1 } from 'ai';
|
|
3
3
|
import { Effect } from 'effect';
|
|
4
4
|
import { SmithersError } from '@smithers-orchestrator/errors/SmithersError';
|
|
5
5
|
import { openai } from '@ai-sdk/openai';
|
|
6
6
|
import { anthropic } from '@ai-sdk/anthropic';
|
|
7
7
|
import * as zod_v4_core from 'zod/v4/core';
|
|
8
8
|
|
|
9
|
-
type
|
|
9
|
+
type HttpToolOutput$1 = {
|
|
10
|
+
ok: boolean;
|
|
11
|
+
status: number;
|
|
12
|
+
statusText: string;
|
|
13
|
+
headers: Record<string, string>;
|
|
14
|
+
body: unknown;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
type HttpToolOutput$1 = {
|
|
18
|
+
ok: boolean;
|
|
19
|
+
status: number;
|
|
20
|
+
statusText: string;
|
|
21
|
+
headers: Record<string, string>;
|
|
22
|
+
body: unknown;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
type HttpToolAuth$1 = {
|
|
26
|
+
type: "bearer";
|
|
27
|
+
token: string;
|
|
28
|
+
} | {
|
|
29
|
+
type: "basic";
|
|
30
|
+
username: string;
|
|
31
|
+
password: string;
|
|
32
|
+
} | {
|
|
33
|
+
type: "header";
|
|
34
|
+
name: string;
|
|
35
|
+
value: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
type HttpToolAuth$1 = {
|
|
39
|
+
type: "bearer";
|
|
40
|
+
token: string;
|
|
41
|
+
} | {
|
|
42
|
+
type: "basic";
|
|
43
|
+
username: string;
|
|
44
|
+
password: string;
|
|
45
|
+
} | {
|
|
46
|
+
type: "header";
|
|
47
|
+
name: string;
|
|
48
|
+
value: string;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
type HttpToolInput$1 = {
|
|
52
|
+
method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
53
|
+
url: string;
|
|
54
|
+
headers?: Record<string, string>;
|
|
55
|
+
query?: Record<string, string | number | boolean | null | undefined>;
|
|
56
|
+
body?: unknown;
|
|
57
|
+
auth?: HttpToolAuth$1;
|
|
58
|
+
timeoutMs?: number;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
type HttpToolInput$1 = {
|
|
62
|
+
method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
63
|
+
url: string;
|
|
64
|
+
headers?: Record<string, string>;
|
|
65
|
+
query?: Record<string, string | number | boolean | null | undefined>;
|
|
66
|
+
body?: unknown;
|
|
67
|
+
auth?: HttpToolAuth$1;
|
|
68
|
+
timeoutMs?: number;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
type CreateHttpToolOptions$2 = {
|
|
72
|
+
description?: string;
|
|
73
|
+
defaultHeaders?: Record<string, string>;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
type CreateHttpToolOptions$2 = {
|
|
77
|
+
description?: string;
|
|
78
|
+
defaultHeaders?: Record<string, string>;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
type ImageGenerationToolOptions$1 = {
|
|
82
|
+
/** Tool name used when returning a toolset. */
|
|
83
|
+
name?: string;
|
|
84
|
+
/** Description shown to the model. */
|
|
85
|
+
description?: string;
|
|
86
|
+
/** Provider model to use when the agent does not specify one. */
|
|
87
|
+
model?: string;
|
|
88
|
+
/** Return `{ [name]: tool }` for direct mounting on an agent. */
|
|
89
|
+
asToolset?: boolean;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
type ImageGenerationToolOptions$1 = {
|
|
93
|
+
/** Tool name used when returning a toolset. */
|
|
94
|
+
name?: string;
|
|
95
|
+
/** Description shown to the model. */
|
|
96
|
+
description?: string;
|
|
97
|
+
/** Provider model to use when the agent does not specify one. */
|
|
98
|
+
model?: string;
|
|
99
|
+
/** Return `{ [name]: tool }` for direct mounting on an agent. */
|
|
100
|
+
asToolset?: boolean;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
type ImageGenerationResult$1 = {
|
|
104
|
+
provider?: string;
|
|
105
|
+
model?: string;
|
|
106
|
+
images: Array<{
|
|
107
|
+
url?: string;
|
|
108
|
+
base64?: string;
|
|
109
|
+
mimeType?: string;
|
|
110
|
+
revisedPrompt?: string;
|
|
111
|
+
}>;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
type ImageGenerationResult$1 = {
|
|
115
|
+
provider?: string;
|
|
116
|
+
model?: string;
|
|
117
|
+
images: Array<{
|
|
118
|
+
url?: string;
|
|
119
|
+
base64?: string;
|
|
120
|
+
mimeType?: string;
|
|
121
|
+
revisedPrompt?: string;
|
|
122
|
+
}>;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
type ImageGenerationRequest$1 = {
|
|
126
|
+
prompt: string;
|
|
127
|
+
model?: string;
|
|
128
|
+
size?: string;
|
|
129
|
+
count?: number;
|
|
130
|
+
seed?: number;
|
|
131
|
+
style?: string;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
type ImageGenerationRequest$1 = {
|
|
135
|
+
prompt: string;
|
|
136
|
+
model?: string;
|
|
137
|
+
size?: string;
|
|
138
|
+
count?: number;
|
|
139
|
+
seed?: number;
|
|
140
|
+
style?: string;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
type ImageGenerationProvider$1 = {
|
|
144
|
+
name?: string;
|
|
145
|
+
generateImage(request: ImageGenerationRequest$1): Promise<ImageGenerationResult$1> | ImageGenerationResult$1;
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
type ImageGenerationProvider$1 = {
|
|
149
|
+
name?: string;
|
|
150
|
+
generateImage(request: ImageGenerationRequest$1): Promise<ImageGenerationResult$1> | ImageGenerationResult$1;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
type CliAgentCapabilityAdapterId$1 = "claude" | "amp" | "antigravity" | "codex" | "forge" | "kimi" | "opencode" | "pi" | "vibe";
|
|
10
154
|
|
|
11
155
|
type CliAgentSurfaceOptionMapping$1 = {
|
|
12
156
|
option: string;
|
|
@@ -43,7 +187,7 @@ type AgentToolDescriptor$1 = {
|
|
|
43
187
|
source?: "builtin" | "mcp" | "extension" | "skill" | "runtime";
|
|
44
188
|
};
|
|
45
189
|
|
|
46
|
-
type AgentCapabilityRegistry$
|
|
190
|
+
type AgentCapabilityRegistry$7 = {
|
|
47
191
|
version: 1;
|
|
48
192
|
engine: "claude-code" | "codex" | "antigravity" | "gemini" | "kimi" | "pi" | "amp" | "forge" | "opencode" | "vibe";
|
|
49
193
|
runtimeTools: Record<string, AgentToolDescriptor$1>;
|
|
@@ -68,16 +212,16 @@ type AgentCapabilityRegistry$6 = {
|
|
|
68
212
|
* @param {AgentCapabilityRegistry | null | undefined} registry
|
|
69
213
|
* @returns {string}
|
|
70
214
|
*/
|
|
71
|
-
declare function hashCapabilityRegistry(registry: AgentCapabilityRegistry$
|
|
72
|
-
type AgentCapabilityRegistry$
|
|
215
|
+
declare function hashCapabilityRegistry(registry: AgentCapabilityRegistry$6 | null | undefined): string;
|
|
216
|
+
type AgentCapabilityRegistry$6 = AgentCapabilityRegistry$7;
|
|
73
217
|
|
|
74
|
-
type AgentCapabilityRegistry$
|
|
218
|
+
type AgentCapabilityRegistry$5 = AgentCapabilityRegistry$7;
|
|
75
219
|
|
|
76
|
-
type CliAgentCapabilityReportEntry$
|
|
220
|
+
type CliAgentCapabilityReportEntry$3 = {
|
|
77
221
|
id: CliAgentCapabilityAdapterId$1;
|
|
78
222
|
binary: string;
|
|
79
223
|
fingerprint: string;
|
|
80
|
-
capabilities: AgentCapabilityRegistry$
|
|
224
|
+
capabilities: AgentCapabilityRegistry$5;
|
|
81
225
|
surface: CliAgentSurfaceManifestEntry$2;
|
|
82
226
|
};
|
|
83
227
|
|
|
@@ -86,7 +230,7 @@ type CliAgentCapabilityIssue$1 = {
|
|
|
86
230
|
message: string;
|
|
87
231
|
severity: "error" | "warning";
|
|
88
232
|
};
|
|
89
|
-
type CliAgentCapabilityDoctorEntry$1 = CliAgentCapabilityReportEntry$
|
|
233
|
+
type CliAgentCapabilityDoctorEntry$1 = CliAgentCapabilityReportEntry$3 & {
|
|
90
234
|
ok: boolean;
|
|
91
235
|
issues: CliAgentCapabilityIssue$1[];
|
|
92
236
|
};
|
|
@@ -120,10 +264,38 @@ type SmithersAgentContract$3 = {
|
|
|
120
264
|
docsGuidance: string;
|
|
121
265
|
};
|
|
122
266
|
|
|
267
|
+
type BaseCliAgentOptions$3 = {
|
|
268
|
+
id?: string;
|
|
269
|
+
model?: string;
|
|
270
|
+
systemPrompt?: string;
|
|
271
|
+
instructions?: string;
|
|
272
|
+
cwd?: string;
|
|
273
|
+
env?: Record<string, string>;
|
|
274
|
+
yolo?: boolean;
|
|
275
|
+
timeoutMs?: number;
|
|
276
|
+
idleTimeoutMs?: number;
|
|
277
|
+
maxOutputBytes?: number;
|
|
278
|
+
extraArgs?: string[];
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
type VibeAgentOptions$2 = BaseCliAgentOptions$3 & {
|
|
282
|
+
agent?: string;
|
|
283
|
+
maxTurns?: number;
|
|
284
|
+
maxPrice?: number;
|
|
285
|
+
maxTokens?: number;
|
|
286
|
+
enabledTools?: string[];
|
|
287
|
+
sessionId?: string;
|
|
288
|
+
continueSession?: boolean;
|
|
289
|
+
};
|
|
290
|
+
|
|
123
291
|
type RunCommandResult = {
|
|
124
292
|
stdout: string;
|
|
125
293
|
stderr: string;
|
|
126
294
|
exitCode: number | null;
|
|
295
|
+
/** True when captured stdout exceeded maxOutputBytes and was truncated. */
|
|
296
|
+
stdoutTruncated?: boolean;
|
|
297
|
+
/** True when captured stderr exceeded maxOutputBytes and was truncated. */
|
|
298
|
+
stderrTruncated?: boolean;
|
|
127
299
|
};
|
|
128
300
|
|
|
129
301
|
type PiExtensionUiResponse$1 = {
|
|
@@ -182,26 +354,12 @@ type AgentCliCompletedEvent = {
|
|
|
182
354
|
};
|
|
183
355
|
type AgentCliEvent$1 = AgentCliStartedEvent | AgentCliActionEvent | AgentCliCompletedEvent;
|
|
184
356
|
|
|
185
|
-
type CliOutputInterpreter$
|
|
357
|
+
type CliOutputInterpreter$b = {
|
|
186
358
|
onStdoutLine?: (line: string) => AgentCliEvent$1[] | AgentCliEvent$1 | null | undefined;
|
|
187
359
|
onStderrLine?: (line: string) => AgentCliEvent$1[] | AgentCliEvent$1 | null | undefined;
|
|
188
360
|
onExit?: (result: RunCommandResult) => AgentCliEvent$1[] | AgentCliEvent$1 | null | undefined;
|
|
189
361
|
};
|
|
190
362
|
|
|
191
|
-
type BaseCliAgentOptions$2 = {
|
|
192
|
-
id?: string;
|
|
193
|
-
model?: string;
|
|
194
|
-
systemPrompt?: string;
|
|
195
|
-
instructions?: string;
|
|
196
|
-
cwd?: string;
|
|
197
|
-
env?: Record<string, string>;
|
|
198
|
-
yolo?: boolean;
|
|
199
|
-
timeoutMs?: number;
|
|
200
|
-
idleTimeoutMs?: number;
|
|
201
|
-
maxOutputBytes?: number;
|
|
202
|
-
extraArgs?: string[];
|
|
203
|
-
};
|
|
204
|
-
|
|
205
363
|
/**
|
|
206
364
|
* Loosely-typed generation options. The AI SDK passes a dynamic shape here
|
|
207
365
|
* (GenerateTextOptions / StreamTextOptions and provider-specific extensions)
|
|
@@ -222,6 +380,18 @@ type AgentGenerateOptions$4 = {
|
|
|
222
380
|
isRetry?: unknown;
|
|
223
381
|
retryAttempt?: unknown;
|
|
224
382
|
schemaRetry?: unknown;
|
|
383
|
+
/**
|
|
384
|
+
* Run context for the task this agent invocation belongs to. Surfaced to the
|
|
385
|
+
* spawned agent process (and its subprocesses) as SMITHERS_RUN_ID / NODE_ID /
|
|
386
|
+
* ITERATION / ATTEMPT so the agent can address its own run — e.g. to raise a
|
|
387
|
+
* blocking `smithers ask-human` request.
|
|
388
|
+
*/
|
|
389
|
+
taskContext?: {
|
|
390
|
+
runId?: string;
|
|
391
|
+
nodeId?: string;
|
|
392
|
+
iteration?: number;
|
|
393
|
+
attempt?: number;
|
|
394
|
+
};
|
|
225
395
|
[key: string]: unknown;
|
|
226
396
|
};
|
|
227
397
|
|
|
@@ -229,7 +399,7 @@ declare class BaseCliAgent {
|
|
|
229
399
|
/**
|
|
230
400
|
* @param {BaseCliAgentOptions} opts
|
|
231
401
|
*/
|
|
232
|
-
constructor(opts: BaseCliAgentOptions$
|
|
402
|
+
constructor(opts: BaseCliAgentOptions$2);
|
|
233
403
|
version: string;
|
|
234
404
|
tools: {};
|
|
235
405
|
capabilities: any;
|
|
@@ -251,6 +421,11 @@ declare class BaseCliAgent {
|
|
|
251
421
|
runGenerateEffect(options: AgentGenerateOptions$3 | undefined, operation: AgentInvocationOperation): Effect.Effect<GenerateTextResult$3<Record<string, never>, unknown>, SmithersError>;
|
|
252
422
|
/**
|
|
253
423
|
* @param {AgentGenerateOptions} [options]
|
|
424
|
+
* @returns {Promise<void>}
|
|
425
|
+
*/
|
|
426
|
+
preflight(options?: AgentGenerateOptions$3): Promise<void>;
|
|
427
|
+
/**
|
|
428
|
+
* @param {AgentGenerateOptions} [options]
|
|
254
429
|
* @returns {Promise<GenerateTextResult<Record<string, never>, unknown>>}
|
|
255
430
|
*/
|
|
256
431
|
generate(options?: AgentGenerateOptions$3): Promise<GenerateTextResult$3<Record<string, never>, unknown>>;
|
|
@@ -262,20 +437,27 @@ declare class BaseCliAgent {
|
|
|
262
437
|
/**
|
|
263
438
|
* @returns {CliOutputInterpreter | undefined}
|
|
264
439
|
*/
|
|
265
|
-
createOutputInterpreter(): CliOutputInterpreter$
|
|
440
|
+
createOutputInterpreter(): CliOutputInterpreter$a | undefined;
|
|
441
|
+
/**
|
|
442
|
+
* @returns {{ provider?: string; model?: string } | undefined}
|
|
443
|
+
*/
|
|
444
|
+
diagnosticHints(): {
|
|
445
|
+
provider?: string;
|
|
446
|
+
model?: string;
|
|
447
|
+
} | undefined;
|
|
266
448
|
}
|
|
267
449
|
type AgentGenerateOptions$3 = AgentGenerateOptions$4;
|
|
268
|
-
type BaseCliAgentOptions$
|
|
269
|
-
type CliOutputInterpreter$
|
|
450
|
+
type BaseCliAgentOptions$2 = BaseCliAgentOptions$3;
|
|
451
|
+
type CliOutputInterpreter$a = CliOutputInterpreter$b;
|
|
270
452
|
type GenerateTextResult$3 = ai.GenerateTextResult<any, any>;
|
|
271
453
|
type StreamTextResult = ai.StreamTextResult<any, any>;
|
|
272
454
|
type AgentInvocationOperation = "generate" | "stream";
|
|
273
455
|
|
|
274
|
-
type BaseCliAgentOptions = BaseCliAgentOptions$
|
|
275
|
-
type CliOutputInterpreter$
|
|
456
|
+
type BaseCliAgentOptions$1 = BaseCliAgentOptions$3;
|
|
457
|
+
type CliOutputInterpreter$9 = CliOutputInterpreter$b;
|
|
276
458
|
|
|
277
|
-
type OpenCodeAgentOptions$1 = BaseCliAgentOptions & {
|
|
278
|
-
/** Model identifier (e.g., "anthropic/claude-opus-4-
|
|
459
|
+
type OpenCodeAgentOptions$1 = BaseCliAgentOptions$1 & {
|
|
460
|
+
/** Model identifier (e.g., "anthropic/claude-opus-4-8", "openai/gpt-5.4") */
|
|
279
461
|
model?: string;
|
|
280
462
|
/** OpenCode agent name (maps to --agent flag, selects predefined agent config) */
|
|
281
463
|
agentName?: string;
|
|
@@ -290,10 +472,10 @@ type OpenCodeAgentOptions$1 = BaseCliAgentOptions & {
|
|
|
290
472
|
};
|
|
291
473
|
declare class OpenCodeAgent extends BaseCliAgent {
|
|
292
474
|
private readonly opts;
|
|
293
|
-
readonly capabilities: AgentCapabilityRegistry$
|
|
475
|
+
readonly capabilities: AgentCapabilityRegistry$5;
|
|
294
476
|
readonly cliEngine: "opencode";
|
|
295
477
|
constructor(opts?: OpenCodeAgentOptions$1);
|
|
296
|
-
createOutputInterpreter(): CliOutputInterpreter$
|
|
478
|
+
createOutputInterpreter(): CliOutputInterpreter$9;
|
|
297
479
|
buildCommand(params: {
|
|
298
480
|
prompt: string;
|
|
299
481
|
systemPrompt?: string;
|
|
@@ -309,34 +491,7 @@ declare class OpenCodeAgent extends BaseCliAgent {
|
|
|
309
491
|
}>;
|
|
310
492
|
}
|
|
311
493
|
|
|
312
|
-
type
|
|
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 & {
|
|
494
|
+
type PiAgentOptions$2 = BaseCliAgentOptions$3 & {
|
|
340
495
|
provider?: string;
|
|
341
496
|
model?: string;
|
|
342
497
|
apiKey?: string;
|
|
@@ -445,9 +600,14 @@ type AgentLike$1 = {
|
|
|
445
600
|
/** Available tools the agent can use */
|
|
446
601
|
tools?: Record<string, unknown>;
|
|
447
602
|
/** Optional structured capability registry for cache and diagnostics */
|
|
448
|
-
capabilities?: AgentCapabilityRegistry$
|
|
603
|
+
capabilities?: AgentCapabilityRegistry$5;
|
|
449
604
|
/** True when the agent consumes outputSchema through a native structured-output API. */
|
|
450
605
|
supportsNativeStructuredOutput?: boolean;
|
|
606
|
+
/**
|
|
607
|
+
* Performs deterministic startup checks before the first generation call in a
|
|
608
|
+
* workflow run. A rejected promise fails the task without retrying.
|
|
609
|
+
*/
|
|
610
|
+
preflight?: (args?: AgentGenerateOptions$4) => Promise<void>;
|
|
451
611
|
/**
|
|
452
612
|
* Generates a response or action based on the provided arguments.
|
|
453
613
|
*
|
|
@@ -543,7 +703,7 @@ declare class HermesAgent<CALL_OPTIONS = never, TOOLS = ai.ToolSet> extends Open
|
|
|
543
703
|
}
|
|
544
704
|
type HermesAgentOptions$1<CALL_OPTIONS = never, TOOLS = ai.ToolSet> = HermesAgentOptions$2<CALL_OPTIONS, TOOLS>;
|
|
545
705
|
|
|
546
|
-
type ClaudeCodeAgentOptions$1 = BaseCliAgentOptions$
|
|
706
|
+
type ClaudeCodeAgentOptions$1 = BaseCliAgentOptions$3 & {
|
|
547
707
|
addDir?: string[];
|
|
548
708
|
agent?: string;
|
|
549
709
|
agents?: Record<string, {
|
|
@@ -611,12 +771,12 @@ declare class ClaudeCodeAgent extends BaseCliAgent {
|
|
|
611
771
|
*/
|
|
612
772
|
constructor(opts?: ClaudeCodeAgentOptions);
|
|
613
773
|
opts: ClaudeCodeAgentOptions$1;
|
|
614
|
-
capabilities: AgentCapabilityRegistry$
|
|
774
|
+
capabilities: AgentCapabilityRegistry$7;
|
|
615
775
|
cliEngine: string;
|
|
616
776
|
/**
|
|
617
777
|
* @returns {CliOutputInterpreter}
|
|
618
778
|
*/
|
|
619
|
-
createOutputInterpreter(): CliOutputInterpreter$
|
|
779
|
+
createOutputInterpreter(): CliOutputInterpreter$8;
|
|
620
780
|
/**
|
|
621
781
|
* @param {{ prompt: string; systemPrompt?: string; cwd: string; options: any; }} params
|
|
622
782
|
*/
|
|
@@ -630,15 +790,16 @@ declare class ClaudeCodeAgent extends BaseCliAgent {
|
|
|
630
790
|
args: string[];
|
|
631
791
|
outputFormat: "stream-json" | "text" | "json";
|
|
632
792
|
env: {
|
|
793
|
+
SMITHERS_SNAPSHOT_SOCK: any;
|
|
633
794
|
CLAUDE_CONFIG_DIR: string;
|
|
634
795
|
ANTHROPIC_API_KEY: string;
|
|
635
796
|
} | undefined;
|
|
636
797
|
}>;
|
|
637
798
|
}
|
|
638
799
|
type ClaudeCodeAgentOptions = ClaudeCodeAgentOptions$1;
|
|
639
|
-
type CliOutputInterpreter$
|
|
800
|
+
type CliOutputInterpreter$8 = CliOutputInterpreter$b;
|
|
640
801
|
|
|
641
|
-
type CodexAgentOptions$1 = BaseCliAgentOptions$
|
|
802
|
+
type CodexAgentOptions$1 = BaseCliAgentOptions$3 & {
|
|
642
803
|
config?: CodexConfigOverrides;
|
|
643
804
|
enable?: string[];
|
|
644
805
|
disable?: string[];
|
|
@@ -654,6 +815,17 @@ type CodexAgentOptions$1 = BaseCliAgentOptions$2 & {
|
|
|
654
815
|
skipGitRepoCheck?: boolean;
|
|
655
816
|
addDir?: string[];
|
|
656
817
|
outputSchema?: string;
|
|
818
|
+
/**
|
|
819
|
+
* Opt in to Codex's native structured output (`codex exec --output-schema`).
|
|
820
|
+
*
|
|
821
|
+
* Defaults to `false`. Native structured output makes the model emit only the
|
|
822
|
+
* final JSON and refuse tool calls, so it BREAKS agentic tasks (read/edit/run) —
|
|
823
|
+
* Codex returns `blocked` with no changes. Left off, Smithers treats Codex like
|
|
824
|
+
* the other CLI engines: it prompt-injects the schema and extracts JSON from the
|
|
825
|
+
* agent's final message, so tool use stays intact. Enable only for pure, tool-free
|
|
826
|
+
* extraction tasks that need strict schema enforcement.
|
|
827
|
+
*/
|
|
828
|
+
nativeStructuredOutput?: boolean;
|
|
657
829
|
color?: "always" | "never" | "auto";
|
|
658
830
|
json?: boolean;
|
|
659
831
|
outputLastMessage?: string;
|
|
@@ -680,12 +852,13 @@ declare class CodexAgent extends BaseCliAgent {
|
|
|
680
852
|
*/
|
|
681
853
|
constructor(opts?: CodexAgentOptions);
|
|
682
854
|
opts: CodexAgentOptions$1;
|
|
683
|
-
capabilities: AgentCapabilityRegistry$
|
|
855
|
+
capabilities: AgentCapabilityRegistry$7;
|
|
684
856
|
cliEngine: string;
|
|
857
|
+
supportsNativeStructuredOutput: boolean;
|
|
685
858
|
/**
|
|
686
859
|
* @returns {CliOutputInterpreter}
|
|
687
860
|
*/
|
|
688
|
-
createOutputInterpreter(): CliOutputInterpreter$
|
|
861
|
+
createOutputInterpreter(): CliOutputInterpreter$7;
|
|
689
862
|
/**
|
|
690
863
|
* @param {{ prompt: string; systemPrompt?: string; cwd: string; options: any; }} params
|
|
691
864
|
*/
|
|
@@ -708,15 +881,14 @@ declare class CodexAgent extends BaseCliAgent {
|
|
|
708
881
|
cleanup: () => Promise<void>;
|
|
709
882
|
}>;
|
|
710
883
|
}
|
|
711
|
-
type CliOutputInterpreter$
|
|
884
|
+
type CliOutputInterpreter$7 = CliOutputInterpreter$b;
|
|
712
885
|
type CodexAgentOptions = CodexAgentOptions$1;
|
|
713
886
|
|
|
714
887
|
/**
|
|
715
|
-
* @deprecated
|
|
716
|
-
*
|
|
717
|
-
* enterprise Gemini CLI setups.
|
|
888
|
+
* @deprecated Gemini CLI support has been sunset. Use AntigravityAgentOptions
|
|
889
|
+
* with the Antigravity CLI (`agy`) for Google CLI integrations.
|
|
718
890
|
*/
|
|
719
|
-
type GeminiAgentOptions$1 = BaseCliAgentOptions$
|
|
891
|
+
type GeminiAgentOptions$1 = BaseCliAgentOptions$3 & {
|
|
720
892
|
debug?: boolean;
|
|
721
893
|
model?: string;
|
|
722
894
|
sandbox?: boolean;
|
|
@@ -734,22 +906,18 @@ type GeminiAgentOptions$1 = BaseCliAgentOptions$2 & {
|
|
|
734
906
|
screenReader?: boolean;
|
|
735
907
|
outputFormat?: "text" | "json" | "stream-json";
|
|
736
908
|
/**
|
|
737
|
-
*
|
|
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.
|
|
909
|
+
* Legacy option retained only so old constructor calls type-check.
|
|
741
910
|
*/
|
|
742
911
|
configDir?: string;
|
|
743
912
|
/**
|
|
744
|
-
*
|
|
745
|
-
* API-billed invocations.
|
|
913
|
+
* Legacy option retained only so old constructor calls type-check.
|
|
746
914
|
*/
|
|
747
915
|
apiKey?: string;
|
|
748
916
|
};
|
|
749
917
|
|
|
750
918
|
/**
|
|
751
|
-
* @deprecated
|
|
752
|
-
*
|
|
919
|
+
* @deprecated Gemini CLI support has been sunset. Use AntigravityAgent with
|
|
920
|
+
* Google's `agy` CLI instead.
|
|
753
921
|
*/
|
|
754
922
|
declare class GeminiAgent extends BaseCliAgent {
|
|
755
923
|
/**
|
|
@@ -757,31 +925,16 @@ declare class GeminiAgent extends BaseCliAgent {
|
|
|
757
925
|
*/
|
|
758
926
|
constructor(opts?: GeminiAgentOptions);
|
|
759
927
|
opts: GeminiAgentOptions$1;
|
|
760
|
-
capabilities: AgentCapabilityRegistry$
|
|
928
|
+
capabilities: AgentCapabilityRegistry$7;
|
|
761
929
|
cliEngine: string;
|
|
762
930
|
/**
|
|
763
931
|
* @returns {CliOutputInterpreter}
|
|
764
932
|
*/
|
|
765
|
-
createOutputInterpreter(): CliOutputInterpreter$
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
*/
|
|
769
|
-
buildCommand(params: {
|
|
770
|
-
prompt: string;
|
|
771
|
-
systemPrompt?: string;
|
|
772
|
-
cwd: string;
|
|
773
|
-
options: any;
|
|
774
|
-
}): Promise<{
|
|
775
|
-
command: string;
|
|
776
|
-
args: string[];
|
|
777
|
-
outputFormat: "stream-json" | "text" | "json";
|
|
778
|
-
env: {
|
|
779
|
-
GEMINI_DIR: string;
|
|
780
|
-
GEMINI_API_KEY: string;
|
|
781
|
-
} | undefined;
|
|
782
|
-
}>;
|
|
933
|
+
createOutputInterpreter(): CliOutputInterpreter$6;
|
|
934
|
+
generate(): Promise<never>;
|
|
935
|
+
buildCommand(): Promise<never>;
|
|
783
936
|
}
|
|
784
|
-
type CliOutputInterpreter$
|
|
937
|
+
type CliOutputInterpreter$6 = CliOutputInterpreter$b;
|
|
785
938
|
type GeminiAgentOptions = GeminiAgentOptions$1;
|
|
786
939
|
|
|
787
940
|
declare class PiAgent extends BaseCliAgent {
|
|
@@ -790,7 +943,7 @@ declare class PiAgent extends BaseCliAgent {
|
|
|
790
943
|
*/
|
|
791
944
|
constructor(opts?: PiAgentOptions$1);
|
|
792
945
|
opts: PiAgentOptions$2;
|
|
793
|
-
capabilities: AgentCapabilityRegistry$
|
|
946
|
+
capabilities: AgentCapabilityRegistry$7;
|
|
794
947
|
cliEngine: string;
|
|
795
948
|
issuedSessionRef: any;
|
|
796
949
|
/**
|
|
@@ -811,7 +964,7 @@ declare class PiAgent extends BaseCliAgent {
|
|
|
811
964
|
/**
|
|
812
965
|
* @returns {CliOutputInterpreter}
|
|
813
966
|
*/
|
|
814
|
-
createOutputInterpreter(): CliOutputInterpreter$
|
|
967
|
+
createOutputInterpreter(): CliOutputInterpreter$5;
|
|
815
968
|
/**
|
|
816
969
|
* @param {PiGenerateOptions} [options]
|
|
817
970
|
* @returns {Promise<GenerateTextResult>}
|
|
@@ -834,8 +987,16 @@ declare class PiAgent extends BaseCliAgent {
|
|
|
834
987
|
outputFile?: string;
|
|
835
988
|
cleanup?: () => Promise<void>;
|
|
836
989
|
}>;
|
|
990
|
+
/**
|
|
991
|
+
* @returns {{ provider?: string; model?: string; apiKey?: string }}
|
|
992
|
+
*/
|
|
993
|
+
diagnosticHints(): {
|
|
994
|
+
provider?: string;
|
|
995
|
+
model?: string;
|
|
996
|
+
apiKey?: string;
|
|
997
|
+
};
|
|
837
998
|
}
|
|
838
|
-
type CliOutputInterpreter$
|
|
999
|
+
type CliOutputInterpreter$5 = CliOutputInterpreter$b;
|
|
839
1000
|
type AgentCliEvent = AgentCliEvent$1;
|
|
840
1001
|
type GenerateTextResult = ai.GenerateTextResult<Record<string, never>, unknown>;
|
|
841
1002
|
type PiAgentOptions$1 = PiAgentOptions$2;
|
|
@@ -854,7 +1015,7 @@ type PiGenerateOptions = {
|
|
|
854
1015
|
[key: string]: unknown;
|
|
855
1016
|
};
|
|
856
1017
|
|
|
857
|
-
type KimiAgentOptions$1 = BaseCliAgentOptions$
|
|
1018
|
+
type KimiAgentOptions$1 = BaseCliAgentOptions$3 & {
|
|
858
1019
|
workDir?: string;
|
|
859
1020
|
session?: string;
|
|
860
1021
|
continue?: boolean;
|
|
@@ -888,13 +1049,13 @@ declare class KimiAgent extends BaseCliAgent {
|
|
|
888
1049
|
*/
|
|
889
1050
|
constructor(opts?: KimiAgentOptions);
|
|
890
1051
|
opts: KimiAgentOptions$1;
|
|
891
|
-
capabilities: AgentCapabilityRegistry$
|
|
1052
|
+
capabilities: AgentCapabilityRegistry$7;
|
|
892
1053
|
cliEngine: string;
|
|
893
1054
|
issuedSessionId: any;
|
|
894
1055
|
/**
|
|
895
1056
|
* @returns {CliOutputInterpreter}
|
|
896
1057
|
*/
|
|
897
|
-
createOutputInterpreter(): CliOutputInterpreter$
|
|
1058
|
+
createOutputInterpreter(): CliOutputInterpreter$4;
|
|
898
1059
|
/**
|
|
899
1060
|
* @param {{ prompt: string; systemPrompt?: string; cwd: string; options: any; }} params
|
|
900
1061
|
*/
|
|
@@ -917,7 +1078,7 @@ declare class KimiAgent extends BaseCliAgent {
|
|
|
917
1078
|
errorOnBannerOnly: boolean;
|
|
918
1079
|
}>;
|
|
919
1080
|
}
|
|
920
|
-
type CliOutputInterpreter$
|
|
1081
|
+
type CliOutputInterpreter$4 = CliOutputInterpreter$b;
|
|
921
1082
|
type KimiAgentOptions = KimiAgentOptions$1;
|
|
922
1083
|
|
|
923
1084
|
/**
|
|
@@ -945,6 +1106,26 @@ type RenderGuidanceOptions = {
|
|
|
945
1106
|
};
|
|
946
1107
|
type SmithersAgentContract$1 = SmithersAgentContract$3;
|
|
947
1108
|
|
|
1109
|
+
declare function createImageGenerationTool(
|
|
1110
|
+
provider: ImageGenerationProvider$1,
|
|
1111
|
+
options: ImageGenerationToolOptions$1 & { asToolset: true },
|
|
1112
|
+
): Record<string, Tool$1>;
|
|
1113
|
+
|
|
1114
|
+
declare function createImageGenerationTool(
|
|
1115
|
+
provider: ImageGenerationProvider$1,
|
|
1116
|
+
options?: ImageGenerationToolOptions$1,
|
|
1117
|
+
): Tool$1;
|
|
1118
|
+
|
|
1119
|
+
/**
|
|
1120
|
+
* Create an AI SDK tool that can call any REST API without an OpenAPI spec.
|
|
1121
|
+
*
|
|
1122
|
+
* @param {CreateHttpToolOptions} [options]
|
|
1123
|
+
* @returns {Tool}
|
|
1124
|
+
*/
|
|
1125
|
+
declare function createHttpTool(options?: CreateHttpToolOptions$1): Tool;
|
|
1126
|
+
type Tool = ai.Tool;
|
|
1127
|
+
type CreateHttpToolOptions$1 = CreateHttpToolOptions$2;
|
|
1128
|
+
|
|
948
1129
|
/**
|
|
949
1130
|
* Convert a Zod schema to an OpenAI-safe JSON Schema object.
|
|
950
1131
|
*
|
|
@@ -963,6 +1144,9 @@ declare function zodToOpenAISchema(zodSchema: any): Promise<zod_v4_core.ZodStand
|
|
|
963
1144
|
*
|
|
964
1145
|
* 1. Every object node **must** include `"type": "object"`.
|
|
965
1146
|
* 2. Structured output object nodes must set `additionalProperties: false`.
|
|
1147
|
+
* 3. When `additionalProperties: false`, every key in `properties` must also
|
|
1148
|
+
* appear in `required` (strict mode treats all listed properties as
|
|
1149
|
+
* required; truly-optional fields should be modeled as nullable).
|
|
966
1150
|
*
|
|
967
1151
|
* Zod v4's `toJSONSchema()` can violate these rules when loose/passthrough
|
|
968
1152
|
* objects are used. Codex rejects those schemas unless they are strict.
|
|
@@ -972,10 +1156,34 @@ declare function zodToOpenAISchema(zodSchema: any): Promise<zod_v4_core.ZodStand
|
|
|
972
1156
|
*/
|
|
973
1157
|
declare function sanitizeForOpenAI(node: any): void;
|
|
974
1158
|
|
|
1159
|
+
type TranscriptionProvider = "whisper" | "deepgram";
|
|
1160
|
+
type CreateTranscriptionToolOptions = {
|
|
1161
|
+
provider: TranscriptionProvider;
|
|
1162
|
+
apiKey: string;
|
|
1163
|
+
model?: string;
|
|
1164
|
+
baseUrl?: string;
|
|
1165
|
+
description?: string;
|
|
1166
|
+
fetch?: typeof fetch;
|
|
1167
|
+
};
|
|
1168
|
+
declare function createTranscriptionTool(options: CreateTranscriptionToolOptions): Tool$1;
|
|
1169
|
+
|
|
1170
|
+
type ElevenLabsTextToSpeechToolOptions = {
|
|
1171
|
+
apiKey: string;
|
|
1172
|
+
defaultVoiceId?: string;
|
|
1173
|
+
defaultModelId?: string;
|
|
1174
|
+
baseUrl?: string;
|
|
1175
|
+
fetch?: typeof fetch;
|
|
1176
|
+
};
|
|
1177
|
+
type ElevenLabsTextToSpeechToolset = {
|
|
1178
|
+
tools: Record<"elevenlabs_text_to_speech", Tool$1>;
|
|
1179
|
+
toolNames: ["elevenlabs_text_to_speech"];
|
|
1180
|
+
};
|
|
1181
|
+
declare function createElevenLabsTextToSpeechTool(options: ElevenLabsTextToSpeechToolOptions): ElevenLabsTextToSpeechToolset;
|
|
1182
|
+
|
|
975
1183
|
/**
|
|
976
1184
|
* Configuration options for the AmpAgent.
|
|
977
1185
|
*/
|
|
978
|
-
type AmpAgentOptions$1 = BaseCliAgentOptions$
|
|
1186
|
+
type AmpAgentOptions$1 = BaseCliAgentOptions$3 & {
|
|
979
1187
|
/** Visibility setting for the new thread (e.g., private, public) */
|
|
980
1188
|
visibility?: "private" | "public" | "workspace" | "group";
|
|
981
1189
|
/** Path to a specific MCP configuration file */
|
|
@@ -999,10 +1207,6 @@ type AmpAgentOptions$1 = BaseCliAgentOptions$2 & {
|
|
|
999
1207
|
|
|
1000
1208
|
/** @typedef {import("./capability-registry/AgentCapabilityRegistry.ts").AgentCapabilityRegistry} AgentCapabilityRegistry */
|
|
1001
1209
|
/** @typedef {import("./BaseCliAgent/CliOutputInterpreter.ts").CliOutputInterpreter} CliOutputInterpreter */
|
|
1002
|
-
/**
|
|
1003
|
-
* @returns {AgentCapabilityRegistry}
|
|
1004
|
-
*/
|
|
1005
|
-
declare function createAmpCapabilityRegistry(): AgentCapabilityRegistry$3;
|
|
1006
1210
|
/**
|
|
1007
1211
|
* Agent implementation that wraps the 'amp' CLI executable.
|
|
1008
1212
|
* It translates generation requests into CLI arguments and executes the process.
|
|
@@ -1016,12 +1220,12 @@ declare class AmpAgent extends BaseCliAgent {
|
|
|
1016
1220
|
constructor(opts?: AmpAgentOptions);
|
|
1017
1221
|
opts: AmpAgentOptions$1;
|
|
1018
1222
|
/** @type {AgentCapabilityRegistry} */
|
|
1019
|
-
capabilities: AgentCapabilityRegistry$
|
|
1223
|
+
capabilities: AgentCapabilityRegistry$4;
|
|
1020
1224
|
cliEngine: string;
|
|
1021
1225
|
/**
|
|
1022
1226
|
* @returns {CliOutputInterpreter}
|
|
1023
1227
|
*/
|
|
1024
|
-
createOutputInterpreter(): CliOutputInterpreter$
|
|
1228
|
+
createOutputInterpreter(): CliOutputInterpreter$3;
|
|
1025
1229
|
/**
|
|
1026
1230
|
* @param {{ prompt: string; systemPrompt?: string; cwd: string; options: any; }} params
|
|
1027
1231
|
*/
|
|
@@ -1036,11 +1240,11 @@ declare class AmpAgent extends BaseCliAgent {
|
|
|
1036
1240
|
outputFormat: string;
|
|
1037
1241
|
}>;
|
|
1038
1242
|
}
|
|
1039
|
-
type AgentCapabilityRegistry$
|
|
1040
|
-
type CliOutputInterpreter$
|
|
1243
|
+
type AgentCapabilityRegistry$4 = AgentCapabilityRegistry$7;
|
|
1244
|
+
type CliOutputInterpreter$3 = CliOutputInterpreter$b;
|
|
1041
1245
|
type AmpAgentOptions = AmpAgentOptions$1;
|
|
1042
1246
|
|
|
1043
|
-
type AntigravityAgentOptions$1 = BaseCliAgentOptions$
|
|
1247
|
+
type AntigravityAgentOptions$1 = BaseCliAgentOptions$3 & {
|
|
1044
1248
|
model?: string;
|
|
1045
1249
|
sandbox?: boolean;
|
|
1046
1250
|
yolo?: boolean;
|
|
@@ -1118,23 +1322,18 @@ type AntigravityAgentOptions$1 = BaseCliAgentOptions$2 & {
|
|
|
1118
1322
|
apiKey?: string;
|
|
1119
1323
|
};
|
|
1120
1324
|
|
|
1121
|
-
/**
|
|
1122
|
-
* @param {AntigravityAgentOptions} [opts]
|
|
1123
|
-
* @returns {AgentCapabilityRegistry}
|
|
1124
|
-
*/
|
|
1125
|
-
declare function createAntigravityCapabilityRegistry(opts?: AntigravityAgentOptions): AgentCapabilityRegistry$2;
|
|
1126
1325
|
declare class AntigravityAgent extends BaseCliAgent {
|
|
1127
1326
|
/**
|
|
1128
1327
|
* @param {AntigravityAgentOptions} [opts]
|
|
1129
1328
|
*/
|
|
1130
1329
|
constructor(opts?: AntigravityAgentOptions);
|
|
1131
1330
|
opts: AntigravityAgentOptions$1;
|
|
1132
|
-
capabilities: AgentCapabilityRegistry$
|
|
1331
|
+
capabilities: AgentCapabilityRegistry$7;
|
|
1133
1332
|
cliEngine: string;
|
|
1134
1333
|
/**
|
|
1135
1334
|
* @returns {CliOutputInterpreter}
|
|
1136
1335
|
*/
|
|
1137
|
-
createOutputInterpreter(): CliOutputInterpreter$
|
|
1336
|
+
createOutputInterpreter(): CliOutputInterpreter$2;
|
|
1138
1337
|
/**
|
|
1139
1338
|
* @param {{ prompt: string; systemPrompt?: string; cwd: string; options: any; }} params
|
|
1140
1339
|
*/
|
|
@@ -1153,11 +1352,10 @@ declare class AntigravityAgent extends BaseCliAgent {
|
|
|
1153
1352
|
} | undefined;
|
|
1154
1353
|
}>;
|
|
1155
1354
|
}
|
|
1156
|
-
type
|
|
1157
|
-
type CliOutputInterpreter$1 = CliOutputInterpreter$a;
|
|
1355
|
+
type CliOutputInterpreter$2 = CliOutputInterpreter$b;
|
|
1158
1356
|
type AntigravityAgentOptions = AntigravityAgentOptions$1;
|
|
1159
1357
|
|
|
1160
|
-
type ForgeAgentOptions$1 = BaseCliAgentOptions$
|
|
1358
|
+
type ForgeAgentOptions$1 = BaseCliAgentOptions$3 & {
|
|
1161
1359
|
directory?: string;
|
|
1162
1360
|
provider?: string;
|
|
1163
1361
|
agent?: string;
|
|
@@ -1174,10 +1372,6 @@ type ForgeAgentOptions$1 = BaseCliAgentOptions$2 & {
|
|
|
1174
1372
|
/** @typedef {import("./BaseCliAgent/BaseCliAgentOptions.ts").BaseCliAgentOptions} BaseCliAgentOptions */
|
|
1175
1373
|
/** @typedef {import("./BaseCliAgent/CliOutputInterpreter.ts").CliOutputInterpreter} CliOutputInterpreter */
|
|
1176
1374
|
/** @typedef {import("./ForgeAgentOptions.ts").ForgeAgentOptions} ForgeAgentOptions */
|
|
1177
|
-
/**
|
|
1178
|
-
* @returns {AgentCapabilityRegistry}
|
|
1179
|
-
*/
|
|
1180
|
-
declare function createForgeCapabilityRegistry(): AgentCapabilityRegistry$1;
|
|
1181
1375
|
declare class ForgeAgent extends BaseCliAgent {
|
|
1182
1376
|
/**
|
|
1183
1377
|
* @param {ForgeAgentOptions} [opts]
|
|
@@ -1185,13 +1379,13 @@ declare class ForgeAgent extends BaseCliAgent {
|
|
|
1185
1379
|
constructor(opts?: ForgeAgentOptions);
|
|
1186
1380
|
opts: ForgeAgentOptions$1;
|
|
1187
1381
|
/** @type {AgentCapabilityRegistry} */
|
|
1188
|
-
capabilities: AgentCapabilityRegistry$
|
|
1382
|
+
capabilities: AgentCapabilityRegistry$2;
|
|
1189
1383
|
cliEngine: string;
|
|
1190
1384
|
issuedConversationId: any;
|
|
1191
1385
|
/**
|
|
1192
1386
|
* @returns {CliOutputInterpreter}
|
|
1193
1387
|
*/
|
|
1194
|
-
createOutputInterpreter(): CliOutputInterpreter;
|
|
1388
|
+
createOutputInterpreter(): CliOutputInterpreter$1;
|
|
1195
1389
|
/**
|
|
1196
1390
|
* @param {{ prompt: string; systemPrompt?: string; cwd: string; options: any; }} params
|
|
1197
1391
|
*/
|
|
@@ -1206,27 +1400,81 @@ declare class ForgeAgent extends BaseCliAgent {
|
|
|
1206
1400
|
outputFormat: string;
|
|
1207
1401
|
}>;
|
|
1208
1402
|
}
|
|
1209
|
-
type AgentCapabilityRegistry$
|
|
1210
|
-
type CliOutputInterpreter = CliOutputInterpreter$
|
|
1403
|
+
type AgentCapabilityRegistry$2 = AgentCapabilityRegistry$7;
|
|
1404
|
+
type CliOutputInterpreter$1 = CliOutputInterpreter$b;
|
|
1211
1405
|
type ForgeAgentOptions = ForgeAgentOptions$1;
|
|
1212
1406
|
|
|
1407
|
+
/** @typedef {import("./BaseCliAgent/index.ts").BaseCliAgentOptions} BaseCliAgentOptions */
|
|
1408
|
+
/** @typedef {import("./capability-registry/index.ts").AgentCapabilityRegistry} AgentCapabilityRegistry */
|
|
1409
|
+
/** @typedef {import("./BaseCliAgent/index.ts").CliOutputInterpreter} CliOutputInterpreter */
|
|
1213
1410
|
/**
|
|
1214
|
-
* @
|
|
1411
|
+
* @typedef {BaseCliAgentOptions & {
|
|
1412
|
+
* agent?: string;
|
|
1413
|
+
* maxTurns?: number;
|
|
1414
|
+
* maxPrice?: number;
|
|
1415
|
+
* maxTokens?: number;
|
|
1416
|
+
* enabledTools?: string[];
|
|
1417
|
+
* sessionId?: string;
|
|
1418
|
+
* continueSession?: boolean;
|
|
1419
|
+
* }} VibeAgentOptions
|
|
1215
1420
|
*/
|
|
1216
|
-
declare
|
|
1217
|
-
|
|
1421
|
+
declare class VibeAgent extends BaseCliAgent {
|
|
1422
|
+
/**
|
|
1423
|
+
* @param {VibeAgentOptions} [opts]
|
|
1424
|
+
*/
|
|
1425
|
+
constructor(opts?: VibeAgentOptions$1);
|
|
1426
|
+
/** @type {VibeAgentOptions} */
|
|
1427
|
+
opts: VibeAgentOptions$1;
|
|
1428
|
+
/** @type {AgentCapabilityRegistry} */
|
|
1429
|
+
capabilities: AgentCapabilityRegistry$1;
|
|
1430
|
+
/** @type {"vibe"} */
|
|
1431
|
+
cliEngine: "vibe";
|
|
1432
|
+
/** @type {string | undefined} */
|
|
1433
|
+
issuedSessionId: string | undefined;
|
|
1434
|
+
/**
|
|
1435
|
+
* @returns {CliOutputInterpreter}
|
|
1436
|
+
*/
|
|
1437
|
+
createOutputInterpreter(): CliOutputInterpreter;
|
|
1438
|
+
/**
|
|
1439
|
+
* @param {{ prompt: string; systemPrompt?: string; cwd: string; options: any }} params
|
|
1440
|
+
*/
|
|
1441
|
+
buildCommand(params: {
|
|
1442
|
+
prompt: string;
|
|
1443
|
+
systemPrompt?: string;
|
|
1444
|
+
cwd: string;
|
|
1445
|
+
options: any;
|
|
1446
|
+
}): Promise<{
|
|
1447
|
+
command: string;
|
|
1448
|
+
args: string[];
|
|
1449
|
+
outputFormat: string;
|
|
1450
|
+
}>;
|
|
1451
|
+
}
|
|
1452
|
+
type BaseCliAgentOptions = BaseCliAgentOptions$1;
|
|
1453
|
+
type AgentCapabilityRegistry$1 = AgentCapabilityRegistry$5;
|
|
1454
|
+
type CliOutputInterpreter = CliOutputInterpreter$9;
|
|
1455
|
+
type VibeAgentOptions$1 = BaseCliAgentOptions & {
|
|
1456
|
+
agent?: string;
|
|
1457
|
+
maxTurns?: number;
|
|
1458
|
+
maxPrice?: number;
|
|
1459
|
+
maxTokens?: number;
|
|
1460
|
+
enabledTools?: string[];
|
|
1461
|
+
sessionId?: string;
|
|
1462
|
+
continueSession?: boolean;
|
|
1463
|
+
};
|
|
1218
1464
|
|
|
1219
1465
|
/**
|
|
1220
1466
|
* @returns {CliAgentCapabilityReportEntry[]}
|
|
1221
1467
|
*/
|
|
1222
|
-
declare function getCliAgentCapabilityReport(): CliAgentCapabilityReportEntry$
|
|
1223
|
-
type CliAgentCapabilityReportEntry$
|
|
1468
|
+
declare function getCliAgentCapabilityReport(): CliAgentCapabilityReportEntry$2[];
|
|
1469
|
+
type CliAgentCapabilityReportEntry$2 = CliAgentCapabilityReportEntry$3;
|
|
1224
1470
|
|
|
1225
1471
|
/**
|
|
1472
|
+
* @param {CliAgentCapabilityReportEntry[]} [entries]
|
|
1226
1473
|
* @returns {CliAgentCapabilityDoctorReport}
|
|
1227
1474
|
*/
|
|
1228
|
-
declare function getCliAgentCapabilityDoctorReport(): CliAgentCapabilityDoctorReport$2;
|
|
1475
|
+
declare function getCliAgentCapabilityDoctorReport(entries?: CliAgentCapabilityReportEntry$1[]): CliAgentCapabilityDoctorReport$2;
|
|
1229
1476
|
type CliAgentCapabilityDoctorReport$2 = CliAgentCapabilityDoctorReport$3;
|
|
1477
|
+
type CliAgentCapabilityReportEntry$1 = CliAgentCapabilityReportEntry$3;
|
|
1230
1478
|
|
|
1231
1479
|
/** @typedef {import("./CliAgentCapabilityDoctorReport.ts").CliAgentCapabilityDoctorReport} CliAgentCapabilityDoctorReport */
|
|
1232
1480
|
/**
|
|
@@ -1256,7 +1504,93 @@ declare function listCliAgentSurfaceManifests(): CliAgentSurfaceManifestEntry$1[
|
|
|
1256
1504
|
declare const CLI_AGENT_SURFACE_MANIFEST: readonly CliAgentSurfaceManifestEntry$1[];
|
|
1257
1505
|
type CliAgentSurfaceManifestEntry$1 = CliAgentSurfaceManifestEntry$2;
|
|
1258
1506
|
|
|
1259
|
-
type
|
|
1507
|
+
type GroundedWebSearchToolset$1 = {
|
|
1508
|
+
tools: Record<"grounded_web_search", Tool$1>;
|
|
1509
|
+
toolNames: ["grounded_web_search"];
|
|
1510
|
+
};
|
|
1511
|
+
|
|
1512
|
+
type GroundedWebSearchProviderKind = "semantic" | "fresh";
|
|
1513
|
+
type GroundedWebSearchProviderName = "exa" | "tavily" | "brave" | "serper";
|
|
1514
|
+
type GroundedWebSearchResult = {
|
|
1515
|
+
title: string;
|
|
1516
|
+
url: string;
|
|
1517
|
+
snippet?: string;
|
|
1518
|
+
publishedDate?: string;
|
|
1519
|
+
score?: number;
|
|
1520
|
+
};
|
|
1521
|
+
type GroundedWebSearchProvider$5 = {
|
|
1522
|
+
name: GroundedWebSearchProviderName;
|
|
1523
|
+
kind: GroundedWebSearchProviderKind;
|
|
1524
|
+
search(input: {
|
|
1525
|
+
query: string;
|
|
1526
|
+
maxResults: number;
|
|
1527
|
+
freshness?: "day" | "week" | "month" | "year";
|
|
1528
|
+
}): Promise<GroundedWebSearchResult[]>;
|
|
1529
|
+
};
|
|
1530
|
+
|
|
1531
|
+
/** @typedef {import("./GroundedWebSearchProvider.ts").GroundedWebSearchProvider} GroundedWebSearchProvider */
|
|
1532
|
+
/** @typedef {import("./GroundedWebSearchProvider.ts").GroundedWebSearchResult} GroundedWebSearchResult */
|
|
1533
|
+
/** @typedef {import("./GroundedWebSearchToolset.ts").GroundedWebSearchToolset} GroundedWebSearchToolset */
|
|
1534
|
+
/**
|
|
1535
|
+
* @param {{ providers: GroundedWebSearchProvider[]; maxResultsPerProvider?: number }} options
|
|
1536
|
+
* @returns {GroundedWebSearchToolset}
|
|
1537
|
+
*/
|
|
1538
|
+
declare function createGroundedWebSearchToolset(options: {
|
|
1539
|
+
providers: GroundedWebSearchProvider$4[];
|
|
1540
|
+
maxResultsPerProvider?: number;
|
|
1541
|
+
}): GroundedWebSearchToolset;
|
|
1542
|
+
type GroundedWebSearchProvider$4 = GroundedWebSearchProvider$5;
|
|
1543
|
+
type GroundedWebSearchToolset = GroundedWebSearchToolset$1;
|
|
1544
|
+
|
|
1545
|
+
/** @typedef {import("./GroundedWebSearchProvider.ts").GroundedWebSearchProvider} GroundedWebSearchProvider */
|
|
1546
|
+
/**
|
|
1547
|
+
* @param {{ apiKey: string; baseUrl?: string; fetch?: typeof fetch }} options
|
|
1548
|
+
* @returns {GroundedWebSearchProvider}
|
|
1549
|
+
*/
|
|
1550
|
+
declare function createExaSearchProvider(options: {
|
|
1551
|
+
apiKey: string;
|
|
1552
|
+
baseUrl?: string;
|
|
1553
|
+
fetch?: typeof fetch;
|
|
1554
|
+
}): GroundedWebSearchProvider$3;
|
|
1555
|
+
type GroundedWebSearchProvider$3 = GroundedWebSearchProvider$5;
|
|
1556
|
+
|
|
1557
|
+
/** @typedef {import("./GroundedWebSearchProvider.ts").GroundedWebSearchProvider} GroundedWebSearchProvider */
|
|
1558
|
+
/**
|
|
1559
|
+
* @param {{ apiKey: string; baseUrl?: string; fetch?: typeof fetch }} options
|
|
1560
|
+
* @returns {GroundedWebSearchProvider}
|
|
1561
|
+
*/
|
|
1562
|
+
declare function createTavilySearchProvider(options: {
|
|
1563
|
+
apiKey: string;
|
|
1564
|
+
baseUrl?: string;
|
|
1565
|
+
fetch?: typeof fetch;
|
|
1566
|
+
}): GroundedWebSearchProvider$2;
|
|
1567
|
+
type GroundedWebSearchProvider$2 = GroundedWebSearchProvider$5;
|
|
1568
|
+
|
|
1569
|
+
/** @typedef {import("./GroundedWebSearchProvider.ts").GroundedWebSearchProvider} GroundedWebSearchProvider */
|
|
1570
|
+
/**
|
|
1571
|
+
* @param {{ apiKey: string; baseUrl?: string; fetch?: typeof fetch }} options
|
|
1572
|
+
* @returns {GroundedWebSearchProvider}
|
|
1573
|
+
*/
|
|
1574
|
+
declare function createBraveSearchProvider(options: {
|
|
1575
|
+
apiKey: string;
|
|
1576
|
+
baseUrl?: string;
|
|
1577
|
+
fetch?: typeof fetch;
|
|
1578
|
+
}): GroundedWebSearchProvider$1;
|
|
1579
|
+
type GroundedWebSearchProvider$1 = GroundedWebSearchProvider$5;
|
|
1580
|
+
|
|
1581
|
+
/** @typedef {import("./GroundedWebSearchProvider.ts").GroundedWebSearchProvider} GroundedWebSearchProvider */
|
|
1582
|
+
/**
|
|
1583
|
+
* @param {{ apiKey: string; baseUrl?: string; fetch?: typeof fetch }} options
|
|
1584
|
+
* @returns {GroundedWebSearchProvider}
|
|
1585
|
+
*/
|
|
1586
|
+
declare function createSerperSearchProvider(options: {
|
|
1587
|
+
apiKey: string;
|
|
1588
|
+
baseUrl?: string;
|
|
1589
|
+
fetch?: typeof fetch;
|
|
1590
|
+
}): GroundedWebSearchProvider;
|
|
1591
|
+
type GroundedWebSearchProvider = GroundedWebSearchProvider$5;
|
|
1592
|
+
|
|
1593
|
+
type AgentCapabilityRegistry = AgentCapabilityRegistry$7;
|
|
1260
1594
|
type AgentGenerateOptions = AgentGenerateOptions$4;
|
|
1261
1595
|
type AgentLike = AgentLike$1;
|
|
1262
1596
|
type AgentToolDescriptor = AgentToolDescriptor$1;
|
|
@@ -1267,6 +1601,7 @@ type PiAgentOptions = PiAgentOptions$2;
|
|
|
1267
1601
|
type PiExtensionUiRequest = PiExtensionUiRequest$1;
|
|
1268
1602
|
type PiExtensionUiResponse = PiExtensionUiResponse$1;
|
|
1269
1603
|
type OpenCodeAgentOptions = OpenCodeAgentOptions$1;
|
|
1604
|
+
type VibeAgentOptions = VibeAgentOptions$2;
|
|
1270
1605
|
type SmithersAgentContract = SmithersAgentContract$3;
|
|
1271
1606
|
type SmithersAgentContractTool = SmithersAgentContractTool$1;
|
|
1272
1607
|
type SmithersAgentToolCategory = SmithersAgentToolCategory$1;
|
|
@@ -1276,10 +1611,18 @@ type CliAgentCapabilityAdapterId = CliAgentCapabilityAdapterId$1;
|
|
|
1276
1611
|
type CliAgentCapabilityDoctorEntry = CliAgentCapabilityDoctorEntry$1;
|
|
1277
1612
|
type CliAgentCapabilityDoctorReport = CliAgentCapabilityDoctorReport$3;
|
|
1278
1613
|
type CliAgentCapabilityIssue = CliAgentCapabilityIssue$1;
|
|
1279
|
-
type CliAgentCapabilityReportEntry = CliAgentCapabilityReportEntry$
|
|
1614
|
+
type CliAgentCapabilityReportEntry = CliAgentCapabilityReportEntry$3;
|
|
1280
1615
|
type CliAgentSurfaceManifestEntry = CliAgentSurfaceManifestEntry$2;
|
|
1281
1616
|
type CliAgentSurfaceOptionMapping = CliAgentSurfaceOptionMapping$1;
|
|
1282
1617
|
type CliAgentSurfaceResumeContract = CliAgentSurfaceResumeContract$1;
|
|
1283
1618
|
type CliAgentUnsupportedFlag = CliAgentUnsupportedFlag$1;
|
|
1619
|
+
type ImageGenerationProvider = ImageGenerationProvider$1;
|
|
1620
|
+
type ImageGenerationRequest = ImageGenerationRequest$1;
|
|
1621
|
+
type ImageGenerationResult = ImageGenerationResult$1;
|
|
1622
|
+
type ImageGenerationToolOptions = ImageGenerationToolOptions$1;
|
|
1623
|
+
type CreateHttpToolOptions = CreateHttpToolOptions$2;
|
|
1624
|
+
type HttpToolAuth = HttpToolAuth$1;
|
|
1625
|
+
type HttpToolInput = HttpToolInput$1;
|
|
1626
|
+
type HttpToolOutput = HttpToolOutput$1;
|
|
1284
1627
|
|
|
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,
|
|
1628
|
+
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, type CreateHttpToolOptions, ForgeAgent, GeminiAgent, HermesAgent, type HermesAgentOptions, type HttpToolAuth, type HttpToolInput, type HttpToolOutput, type ImageGenerationProvider, type ImageGenerationRequest, type ImageGenerationResult, type ImageGenerationToolOptions, 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, createBraveSearchProvider, createElevenLabsTextToSpeechTool, createExaSearchProvider, createGroundedWebSearchToolset, createHttpTool, createImageGenerationTool, createSerperSearchProvider, createSmithersAgentContract, createTavilySearchProvider, createTranscriptionTool, formatCliAgentCapabilityDoctorReport, getCliAgentCapabilityDoctorReport, getCliAgentCapabilityReport, getCliAgentSurfaceManifestEntry, hashCapabilityRegistry, listCliAgentSurfaceManifests, renderSmithersAgentPromptGuidance, sanitizeForOpenAI, zodToOpenAISchema };
|