@ai-sdk/harness-opencode 1.0.134 → 1.0.136

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/dist/index.d.ts CHANGED
@@ -1,875 +1,877 @@
1
- import * as _ai_sdk_harness from '@ai-sdk/harness';
2
- import { HarnessV1Authentication, HarnessV1CredentialForwarding, HarnessV1PortEndpoint, HarnessV1MintBridgeTokenCallback, HarnessV1, HarnessV1BuiltinTool } from '@ai-sdk/harness';
3
- import * as _ai_sdk_provider from '@ai-sdk/provider';
4
- import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
5
- import { Experimental_SandboxSession } from '@ai-sdk/provider-utils';
6
- import { SandboxChannelReconnectOptions } from '@ai-sdk/harness/utils';
7
-
1
+ import { HarnessV1, HarnessV1Authentication, HarnessV1BuiltinTool, HarnessV1CredentialForwarding, HarnessV1MintBridgeTokenCallback, HarnessV1PortEndpoint } from "@ai-sdk/harness";
2
+ import { SandboxChannelReconnectOptions } from "@ai-sdk/harness/utils";
3
+ import { Experimental_SandboxSession } from "@ai-sdk/provider-utils";
4
+ import { JSONObject } from "@ai-sdk/provider";
5
+ //#region src/opencode-auth.d.ts
8
6
  type OpenCodeAuthenticationMode = HarnessV1Authentication<'anthropic' | 'openai'>;
9
-
7
+ //#endregion
8
+ //#region src/opencode-harness.d.ts
10
9
  type OpenCodeHarnessSettings = {
11
- readonly auth?: OpenCodeAuthenticationMode;
12
- /**
13
- * Customizes each credential value before it is forwarded into a sandbox
14
- * process. This does not restrict which credentials the harness adapter can
15
- * discover, read, or otherwise access in the host process.
16
- */
17
- readonly credentialForwarding?: HarnessV1CredentialForwarding;
18
- /**
19
- * Additional configuration passed through to OpenCode as-is. OpenCode
20
- * config keys must use their native names. Values managed by this adapter
21
- * take precedence over conflicting entries.
22
- */
23
- readonly openCodeConfig?: Record<string, unknown>;
24
- /**
25
- * MCP server definitions keyed by server name. Each definition uses the
26
- * underlying runtime's native MCP server configuration format.
27
- */
28
- readonly mcpServers?: Record<string, unknown>;
29
- readonly provider?: string;
30
- /**
31
- * OpenCode reasoning/thinking variant for reasoning-capable models, e.g.
32
- * `'low'`, `'medium'`, `'high'`, or another model-supported OpenCode
33
- * variant.
34
- */
35
- readonly reasoningVariant?: string;
36
- readonly port?: number;
37
- /**
38
- * Override the host endpoint used to connect to the sandbox bridge. Required
39
- * together with `port` when using a basic sandbox session.
40
- */
41
- readonly portEndpoint?: HarnessV1PortEndpoint;
42
- readonly startupTimeoutMs?: number;
43
- /**
44
- * Configures reconnection attempts after an established bridge connection
45
- * drops. The reconnect window includes connection establishment and
46
- * backoff delays. Defaults to 30 seconds with exponential backoff from 50
47
- * milliseconds up to 2 seconds.
48
- */
49
- readonly reconnect?: SandboxChannelReconnectOptions;
50
- /**
51
- * Creates the authentication token used by the sandbox bridge. Defaults to
52
- * a random 32-byte hexadecimal token.
53
- */
54
- readonly mintBridgeToken?: HarnessV1MintBridgeTokenCallback;
10
+ readonly auth?: OpenCodeAuthenticationMode;
11
+ /**
12
+ * Customizes each credential value before it is forwarded into a sandbox
13
+ * process. This does not restrict which credentials the harness adapter can
14
+ * discover, read, or otherwise access in the host process.
15
+ */
16
+ readonly credentialForwarding?: HarnessV1CredentialForwarding;
17
+ /**
18
+ * Additional configuration passed through to OpenCode as-is. OpenCode
19
+ * config keys must use their native names. Values managed by this adapter
20
+ * take precedence over conflicting entries.
21
+ */
22
+ readonly openCodeConfig?: Record<string, unknown>;
23
+ /**
24
+ * MCP server definitions keyed by server name. Each definition uses the
25
+ * underlying runtime's native MCP server configuration format.
26
+ */
27
+ readonly mcpServers?: Record<string, unknown>;
28
+ readonly provider?: string;
29
+ /**
30
+ * OpenCode reasoning/thinking variant for reasoning-capable models, e.g.
31
+ * `'low'`, `'medium'`, `'high'`, or another model-supported OpenCode
32
+ * variant.
33
+ */
34
+ readonly reasoningVariant?: string;
35
+ readonly port?: number;
36
+ /**
37
+ * Override the host endpoint used to connect to the sandbox bridge. Required
38
+ * together with `port` when using a basic sandbox session.
39
+ */
40
+ readonly portEndpoint?: HarnessV1PortEndpoint;
41
+ readonly startupTimeoutMs?: number;
42
+ /**
43
+ * Configures reconnection attempts after an established bridge connection
44
+ * drops. The reconnect window includes connection establishment and
45
+ * backoff delays. Defaults to 30 seconds with exponential backoff from 50
46
+ * milliseconds up to 2 seconds.
47
+ */
48
+ readonly reconnect?: SandboxChannelReconnectOptions;
49
+ /**
50
+ * Creates the authentication token used by the sandbox bridge. Defaults to
51
+ * a random 32-byte hexadecimal token.
52
+ */
53
+ readonly mintBridgeToken?: HarnessV1MintBridgeTokenCallback;
55
54
  };
56
55
  declare const OPENCODE_BUILTIN_TOOLS: {
57
- readonly askUserQuestions: {
58
- readonly nativeName: "question";
59
- readonly toolUseKind: "readonly";
60
- readonly deferLoading?: boolean;
61
- readonly title?: string;
62
- readonly providerOptions?: _ai_sdk_provider_utils.ProviderOptions;
63
- readonly metadata?: _ai_sdk_provider.JSONObject;
64
- readonly inputSchema: _ai_sdk_provider_utils.FlexibleSchema<{
65
- allowPartialAnswers: boolean;
66
- questions: {
67
- id: string;
68
- question: string;
69
- header?: string | undefined;
70
- options?: {
71
- id: string;
72
- label: string;
73
- description?: string | undefined;
74
- preview?: string | undefined;
75
- }[] | undefined;
76
- allowMultiple?: boolean | undefined;
77
- allowFreeForm?: boolean | {
78
- secret: boolean;
79
- } | undefined;
80
- }[];
81
- }>;
82
- readonly contextSchema?: _ai_sdk_provider_utils.FlexibleSchema<any> | undefined;
83
- readonly needsApproval?: boolean | _ai_sdk_provider_utils.ToolNeedsApprovalFunction<{
84
- allowPartialAnswers: boolean;
85
- questions: {
86
- id: string;
87
- question: string;
88
- header?: string | undefined;
89
- options?: {
90
- id: string;
91
- label: string;
92
- description?: string | undefined;
93
- preview?: string | undefined;
94
- }[] | undefined;
95
- allowMultiple?: boolean | undefined;
96
- allowFreeForm?: boolean | {
97
- secret: boolean;
98
- } | undefined;
99
- }[];
100
- }, any> | undefined;
101
- readonly onInputStart?: ((options: _ai_sdk_provider_utils.ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
102
- readonly onInputDelta?: ((options: {
103
- inputTextDelta: string;
104
- } & _ai_sdk_provider_utils.ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
105
- readonly onInputAvailable?: ((options: {
106
- input: {
107
- allowPartialAnswers: boolean;
108
- questions: {
109
- id: string;
110
- question: string;
111
- header?: string | undefined;
112
- options?: {
113
- id: string;
114
- label: string;
115
- description?: string | undefined;
116
- preview?: string | undefined;
117
- }[] | undefined;
118
- allowMultiple?: boolean | undefined;
119
- allowFreeForm?: boolean | {
120
- secret: boolean;
121
- } | undefined;
122
- }[];
123
- };
124
- } & _ai_sdk_provider_utils.ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
125
- readonly toModelOutput?: ((options: {
126
- toolCallId: string;
127
- input: {
128
- allowPartialAnswers: boolean;
129
- questions: {
130
- id: string;
131
- question: string;
132
- header?: string | undefined;
133
- options?: {
134
- id: string;
135
- label: string;
136
- description?: string | undefined;
137
- preview?: string | undefined;
138
- }[] | undefined;
139
- allowMultiple?: boolean | undefined;
140
- allowFreeForm?: boolean | {
141
- secret: boolean;
142
- } | undefined;
143
- }[];
144
- };
145
- output: NoInfer<{
146
- action: "answered";
147
- answers: Record<string, {
148
- optionIds: string[];
149
- freeform?: string | undefined;
150
- }>;
151
- } | {
152
- action: "partially-answered";
153
- answers: Record<string, {
154
- optionIds: string[];
155
- freeform?: string | undefined;
156
- }>;
157
- } | {
158
- action: "declined";
159
- } | {
160
- action: "cancelled";
161
- }>;
162
- }) => _ai_sdk_provider_utils.ToolResultOutput | PromiseLike<_ai_sdk_provider_utils.ToolResultOutput>) | undefined;
163
- readonly outputSchema?: _ai_sdk_provider_utils.FlexibleSchema<{
164
- action: "answered";
165
- answers: Record<string, {
166
- optionIds: string[];
167
- freeform?: string | undefined;
168
- }>;
169
- } | {
170
- action: "partially-answered";
171
- answers: Record<string, {
172
- optionIds: string[];
173
- freeform?: string | undefined;
174
- }>;
175
- } | {
176
- action: "declined";
177
- } | {
178
- action: "cancelled";
179
- }> | undefined;
180
- readonly execute: _ai_sdk_provider_utils.ToolExecuteFunction<{
181
- allowPartialAnswers: boolean;
182
- questions: {
183
- id: string;
184
- question: string;
185
- header?: string | undefined;
186
- options?: {
187
- id: string;
188
- label: string;
189
- description?: string | undefined;
190
- preview?: string | undefined;
191
- }[] | undefined;
192
- allowMultiple?: boolean | undefined;
193
- allowFreeForm?: boolean | {
194
- secret: boolean;
195
- } | undefined;
196
- }[];
197
- }, {
198
- action: "answered";
199
- answers: Record<string, {
200
- optionIds: string[];
201
- freeform?: string | undefined;
202
- }>;
203
- } | {
204
- action: "partially-answered";
205
- answers: Record<string, {
206
- optionIds: string[];
207
- freeform?: string | undefined;
208
- }>;
209
- } | {
210
- action: "declined";
211
- } | {
212
- action: "cancelled";
213
- }, any>;
214
- readonly description?: string | ((options: {
215
- context: any;
216
- experimental_sandbox?: Experimental_SandboxSession;
217
- }) => string) | undefined;
218
- readonly strict?: boolean;
219
- readonly inputExamples?: {
220
- input: NoInfer<{
221
- allowPartialAnswers: boolean;
222
- questions: {
223
- id: string;
224
- question: string;
225
- header?: string | undefined;
226
- options?: {
227
- id: string;
228
- label: string;
229
- description?: string | undefined;
230
- preview?: string | undefined;
231
- }[] | undefined;
232
- allowMultiple?: boolean | undefined;
233
- allowFreeForm?: boolean | {
234
- secret: boolean;
235
- } | undefined;
236
- }[];
237
- }>;
56
+ readonly askUserQuestions: {
57
+ readonly nativeName: "question";
58
+ readonly toolUseKind: "readonly";
59
+ readonly deferLoading?: boolean;
60
+ readonly title?: string;
61
+ readonly providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
62
+ readonly metadata?: import("@ai-sdk/provider").JSONObject;
63
+ readonly inputSchema: import("@ai-sdk/provider-utils").FlexibleSchema<{
64
+ allowPartialAnswers: boolean;
65
+ questions: {
66
+ id: string;
67
+ question: string;
68
+ header?: string | undefined;
69
+ options?: {
70
+ id: string;
71
+ label: string;
72
+ description?: string | undefined;
73
+ preview?: string | undefined;
238
74
  }[] | undefined;
239
- readonly id?: never;
240
- readonly isProviderExecuted?: never;
241
- readonly args?: never;
242
- readonly supportsDeferredResults?: never;
243
- readonly type?: undefined | "function";
244
- } | {
245
- readonly nativeName: "question";
246
- readonly toolUseKind: "readonly";
247
- readonly deferLoading?: boolean;
248
- readonly title?: string;
249
- readonly providerOptions?: _ai_sdk_provider_utils.ProviderOptions;
250
- readonly metadata?: _ai_sdk_provider.JSONObject;
251
- readonly inputSchema: _ai_sdk_provider_utils.FlexibleSchema<{
252
- allowPartialAnswers: boolean;
253
- questions: {
254
- id: string;
255
- question: string;
256
- header?: string | undefined;
257
- options?: {
258
- id: string;
259
- label: string;
260
- description?: string | undefined;
261
- preview?: string | undefined;
262
- }[] | undefined;
263
- allowMultiple?: boolean | undefined;
264
- allowFreeForm?: boolean | {
265
- secret: boolean;
266
- } | undefined;
267
- }[];
75
+ allowMultiple?: boolean | undefined;
76
+ allowFreeForm?: boolean | {
77
+ secret: boolean;
78
+ } | undefined;
79
+ }[];
80
+ }>;
81
+ readonly contextSchema?: import("@ai-sdk/provider-utils").FlexibleSchema<any> | undefined;
82
+ readonly needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
83
+ allowPartialAnswers: boolean;
84
+ questions: {
85
+ id: string;
86
+ question: string;
87
+ header?: string | undefined;
88
+ options?: {
89
+ id: string;
90
+ label: string;
91
+ description?: string | undefined;
92
+ preview?: string | undefined;
93
+ }[] | undefined;
94
+ allowMultiple?: boolean | undefined;
95
+ allowFreeForm?: boolean | {
96
+ secret: boolean;
97
+ } | undefined;
98
+ }[];
99
+ }, any> | undefined;
100
+ readonly onInputStart?: ((options: import("@ai-sdk/provider-utils").ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
101
+ readonly onInputDelta?: ((options: {
102
+ inputTextDelta: string;
103
+ } & import("@ai-sdk/provider-utils").ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
104
+ readonly onInputAvailable?: ((options: {
105
+ input: {
106
+ allowPartialAnswers: boolean;
107
+ questions: {
108
+ id: string;
109
+ question: string;
110
+ header?: string | undefined;
111
+ options?: {
112
+ id: string;
113
+ label: string;
114
+ description?: string | undefined;
115
+ preview?: string | undefined;
116
+ }[] | undefined;
117
+ allowMultiple?: boolean | undefined;
118
+ allowFreeForm?: boolean | {
119
+ secret: boolean;
120
+ } | undefined;
121
+ }[];
122
+ };
123
+ } & import("@ai-sdk/provider-utils").ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
124
+ readonly toModelOutput?: ((options: {
125
+ toolCallId: string;
126
+ input: {
127
+ allowPartialAnswers: boolean;
128
+ questions: {
129
+ id: string;
130
+ question: string;
131
+ header?: string | undefined;
132
+ options?: {
133
+ id: string;
134
+ label: string;
135
+ description?: string | undefined;
136
+ preview?: string | undefined;
137
+ }[] | undefined;
138
+ allowMultiple?: boolean | undefined;
139
+ allowFreeForm?: boolean | {
140
+ secret: boolean;
141
+ } | undefined;
142
+ }[];
143
+ };
144
+ output: NoInfer<{
145
+ action: "answered";
146
+ answers: Record<string, {
147
+ optionIds: string[];
148
+ freeform?: string | undefined;
268
149
  }>;
269
- readonly contextSchema?: _ai_sdk_provider_utils.FlexibleSchema<any> | undefined;
270
- readonly needsApproval?: boolean | _ai_sdk_provider_utils.ToolNeedsApprovalFunction<{
271
- allowPartialAnswers: boolean;
272
- questions: {
273
- id: string;
274
- question: string;
275
- header?: string | undefined;
276
- options?: {
277
- id: string;
278
- label: string;
279
- description?: string | undefined;
280
- preview?: string | undefined;
281
- }[] | undefined;
282
- allowMultiple?: boolean | undefined;
283
- allowFreeForm?: boolean | {
284
- secret: boolean;
285
- } | undefined;
286
- }[];
287
- }, any> | undefined;
288
- readonly onInputStart?: ((options: _ai_sdk_provider_utils.ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
289
- readonly onInputDelta?: ((options: {
290
- inputTextDelta: string;
291
- } & _ai_sdk_provider_utils.ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
292
- readonly onInputAvailable?: ((options: {
293
- input: {
294
- allowPartialAnswers: boolean;
295
- questions: {
296
- id: string;
297
- question: string;
298
- header?: string | undefined;
299
- options?: {
300
- id: string;
301
- label: string;
302
- description?: string | undefined;
303
- preview?: string | undefined;
304
- }[] | undefined;
305
- allowMultiple?: boolean | undefined;
306
- allowFreeForm?: boolean | {
307
- secret: boolean;
308
- } | undefined;
309
- }[];
310
- };
311
- } & _ai_sdk_provider_utils.ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
312
- readonly toModelOutput?: ((options: {
313
- toolCallId: string;
314
- input: {
315
- allowPartialAnswers: boolean;
316
- questions: {
317
- id: string;
318
- question: string;
319
- header?: string | undefined;
320
- options?: {
321
- id: string;
322
- label: string;
323
- description?: string | undefined;
324
- preview?: string | undefined;
325
- }[] | undefined;
326
- allowMultiple?: boolean | undefined;
327
- allowFreeForm?: boolean | {
328
- secret: boolean;
329
- } | undefined;
330
- }[];
331
- };
332
- output: NoInfer<{
333
- action: "answered";
334
- answers: Record<string, {
335
- optionIds: string[];
336
- freeform?: string | undefined;
337
- }>;
338
- } | {
339
- action: "partially-answered";
340
- answers: Record<string, {
341
- optionIds: string[];
342
- freeform?: string | undefined;
343
- }>;
344
- } | {
345
- action: "declined";
346
- } | {
347
- action: "cancelled";
348
- }>;
349
- }) => _ai_sdk_provider_utils.ToolResultOutput | PromiseLike<_ai_sdk_provider_utils.ToolResultOutput>) | undefined;
350
- readonly outputSchema: _ai_sdk_provider_utils.FlexibleSchema<{
351
- action: "answered";
352
- answers: Record<string, {
353
- optionIds: string[];
354
- freeform?: string | undefined;
355
- }>;
356
- } | {
357
- action: "partially-answered";
358
- answers: Record<string, {
359
- optionIds: string[];
360
- freeform?: string | undefined;
361
- }>;
362
- } | {
363
- action: "declined";
364
- } | {
365
- action: "cancelled";
150
+ } | {
151
+ action: "partially-answered";
152
+ answers: Record<string, {
153
+ optionIds: string[];
154
+ freeform?: string | undefined;
366
155
  }>;
367
- readonly execute?: never;
368
- readonly description?: string | ((options: {
369
- context: any;
370
- experimental_sandbox?: Experimental_SandboxSession;
371
- }) => string) | undefined;
372
- readonly strict?: boolean;
373
- readonly inputExamples?: {
374
- input: NoInfer<{
375
- allowPartialAnswers: boolean;
376
- questions: {
377
- id: string;
378
- question: string;
379
- header?: string | undefined;
380
- options?: {
381
- id: string;
382
- label: string;
383
- description?: string | undefined;
384
- preview?: string | undefined;
385
- }[] | undefined;
386
- allowMultiple?: boolean | undefined;
387
- allowFreeForm?: boolean | {
388
- secret: boolean;
389
- } | undefined;
390
- }[];
391
- }>;
156
+ } | {
157
+ action: "declined";
158
+ } | {
159
+ action: "cancelled";
160
+ }>;
161
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
162
+ readonly outputSchema?: import("@ai-sdk/provider-utils").FlexibleSchema<{
163
+ action: "answered";
164
+ answers: Record<string, {
165
+ optionIds: string[];
166
+ freeform?: string | undefined;
167
+ }>;
168
+ } | {
169
+ action: "partially-answered";
170
+ answers: Record<string, {
171
+ optionIds: string[];
172
+ freeform?: string | undefined;
173
+ }>;
174
+ } | {
175
+ action: "declined";
176
+ } | {
177
+ action: "cancelled";
178
+ }> | undefined;
179
+ readonly execute: import("@ai-sdk/provider-utils").ToolExecuteFunction<{
180
+ allowPartialAnswers: boolean;
181
+ questions: {
182
+ id: string;
183
+ question: string;
184
+ header?: string | undefined;
185
+ options?: {
186
+ id: string;
187
+ label: string;
188
+ description?: string | undefined;
189
+ preview?: string | undefined;
392
190
  }[] | undefined;
393
- readonly id?: never;
394
- readonly isProviderExecuted?: never;
395
- readonly args?: never;
396
- readonly supportsDeferredResults?: never;
397
- readonly type?: undefined | "function";
398
- };
399
- readonly read: HarnessV1BuiltinTool<{
400
- [x: string]: unknown;
401
- file_path?: string | undefined;
402
- path?: string | undefined;
403
- }, unknown>;
404
- readonly write: HarnessV1BuiltinTool<{
405
- [x: string]: unknown;
406
- file_path?: string | undefined;
407
- path?: string | undefined;
408
- content?: string | undefined;
409
- }, unknown>;
410
- readonly edit: HarnessV1BuiltinTool<{
411
- [x: string]: unknown;
412
- file_path?: string | undefined;
413
- path?: string | undefined;
414
- old_string?: string | undefined;
415
- new_string?: string | undefined;
416
- }, unknown>;
417
- readonly bash: HarnessV1BuiltinTool<{
418
- [x: string]: unknown;
419
- command?: string | undefined;
420
- }, unknown>;
421
- readonly glob: HarnessV1BuiltinTool<{
422
- [x: string]: unknown;
423
- pattern?: string | undefined;
424
- path?: string | undefined;
425
- }, unknown>;
426
- readonly grep: HarnessV1BuiltinTool<{
427
- [x: string]: unknown;
428
- pattern?: string | undefined;
429
- path?: string | undefined;
430
- }, unknown>;
431
- readonly ls: _ai_sdk_provider_utils.Tool<{
432
- [x: string]: unknown;
433
- path?: string | undefined;
434
- }, any, any>;
435
- readonly webfetch: _ai_sdk_provider_utils.Tool<{
436
- [x: string]: unknown;
437
- url?: string | undefined;
438
- prompt?: string | undefined;
439
- }, any, any>;
440
- readonly skill: _ai_sdk_provider_utils.Tool<{
441
- [x: string]: unknown;
442
- name?: string | undefined;
443
- }, any, any>;
444
- readonly todowrite: _ai_sdk_provider_utils.Tool<{
445
- [x: string]: unknown;
446
- todos?: {
447
- [x: string]: unknown;
448
- content?: string | undefined;
449
- status?: string | undefined;
450
- priority?: string | undefined;
191
+ allowMultiple?: boolean | undefined;
192
+ allowFreeForm?: boolean | {
193
+ secret: boolean;
194
+ } | undefined;
195
+ }[];
196
+ }, {
197
+ action: "answered";
198
+ answers: Record<string, {
199
+ optionIds: string[];
200
+ freeform?: string | undefined;
201
+ }>;
202
+ } | {
203
+ action: "partially-answered";
204
+ answers: Record<string, {
205
+ optionIds: string[];
206
+ freeform?: string | undefined;
207
+ }>;
208
+ } | {
209
+ action: "declined";
210
+ } | {
211
+ action: "cancelled";
212
+ }, any>;
213
+ readonly description?: string | ((options: {
214
+ context: any;
215
+ experimental_sandbox?: Experimental_SandboxSession;
216
+ }) => string) | undefined;
217
+ readonly strict?: boolean;
218
+ readonly inputExamples?: {
219
+ input: NoInfer<{
220
+ allowPartialAnswers: boolean;
221
+ questions: {
222
+ id: string;
223
+ question: string;
224
+ header?: string | undefined;
225
+ options?: {
226
+ id: string;
227
+ label: string;
228
+ description?: string | undefined;
229
+ preview?: string | undefined;
230
+ }[] | undefined;
231
+ allowMultiple?: boolean | undefined;
232
+ allowFreeForm?: boolean | {
233
+ secret: boolean;
234
+ } | undefined;
235
+ }[];
236
+ }>;
237
+ }[] | undefined;
238
+ readonly id?: never;
239
+ readonly isProviderExecuted?: never;
240
+ readonly args?: never;
241
+ readonly supportsDeferredResults?: never;
242
+ readonly type?: undefined | "function";
243
+ } | {
244
+ readonly nativeName: "question";
245
+ readonly toolUseKind: "readonly";
246
+ readonly deferLoading?: boolean;
247
+ readonly title?: string;
248
+ readonly providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
249
+ readonly metadata?: import("@ai-sdk/provider").JSONObject;
250
+ readonly inputSchema: import("@ai-sdk/provider-utils").FlexibleSchema<{
251
+ allowPartialAnswers: boolean;
252
+ questions: {
253
+ id: string;
254
+ question: string;
255
+ header?: string | undefined;
256
+ options?: {
257
+ id: string;
258
+ label: string;
259
+ description?: string | undefined;
260
+ preview?: string | undefined;
261
+ }[] | undefined;
262
+ allowMultiple?: boolean | undefined;
263
+ allowFreeForm?: boolean | {
264
+ secret: boolean;
265
+ } | undefined;
266
+ }[];
267
+ }>;
268
+ readonly contextSchema?: import("@ai-sdk/provider-utils").FlexibleSchema<any> | undefined;
269
+ readonly needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
270
+ allowPartialAnswers: boolean;
271
+ questions: {
272
+ id: string;
273
+ question: string;
274
+ header?: string | undefined;
275
+ options?: {
276
+ id: string;
277
+ label: string;
278
+ description?: string | undefined;
279
+ preview?: string | undefined;
451
280
  }[] | undefined;
452
- }, any, any>;
453
- readonly agent: _ai_sdk_provider_utils.Tool<{
454
- [x: string]: unknown;
455
- agent?: string | undefined;
456
- prompt?: string | undefined;
457
- description?: string | undefined;
458
- metadata?: Record<string, unknown> | undefined;
459
- }, any, any>;
281
+ allowMultiple?: boolean | undefined;
282
+ allowFreeForm?: boolean | {
283
+ secret: boolean;
284
+ } | undefined;
285
+ }[];
286
+ }, any> | undefined;
287
+ readonly onInputStart?: ((options: import("@ai-sdk/provider-utils").ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
288
+ readonly onInputDelta?: ((options: {
289
+ inputTextDelta: string;
290
+ } & import("@ai-sdk/provider-utils").ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
291
+ readonly onInputAvailable?: ((options: {
292
+ input: {
293
+ allowPartialAnswers: boolean;
294
+ questions: {
295
+ id: string;
296
+ question: string;
297
+ header?: string | undefined;
298
+ options?: {
299
+ id: string;
300
+ label: string;
301
+ description?: string | undefined;
302
+ preview?: string | undefined;
303
+ }[] | undefined;
304
+ allowMultiple?: boolean | undefined;
305
+ allowFreeForm?: boolean | {
306
+ secret: boolean;
307
+ } | undefined;
308
+ }[];
309
+ };
310
+ } & import("@ai-sdk/provider-utils").ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
311
+ readonly toModelOutput?: ((options: {
312
+ toolCallId: string;
313
+ input: {
314
+ allowPartialAnswers: boolean;
315
+ questions: {
316
+ id: string;
317
+ question: string;
318
+ header?: string | undefined;
319
+ options?: {
320
+ id: string;
321
+ label: string;
322
+ description?: string | undefined;
323
+ preview?: string | undefined;
324
+ }[] | undefined;
325
+ allowMultiple?: boolean | undefined;
326
+ allowFreeForm?: boolean | {
327
+ secret: boolean;
328
+ } | undefined;
329
+ }[];
330
+ };
331
+ output: NoInfer<{
332
+ action: "answered";
333
+ answers: Record<string, {
334
+ optionIds: string[];
335
+ freeform?: string | undefined;
336
+ }>;
337
+ } | {
338
+ action: "partially-answered";
339
+ answers: Record<string, {
340
+ optionIds: string[];
341
+ freeform?: string | undefined;
342
+ }>;
343
+ } | {
344
+ action: "declined";
345
+ } | {
346
+ action: "cancelled";
347
+ }>;
348
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
349
+ readonly outputSchema: import("@ai-sdk/provider-utils").FlexibleSchema<{
350
+ action: "answered";
351
+ answers: Record<string, {
352
+ optionIds: string[];
353
+ freeform?: string | undefined;
354
+ }>;
355
+ } | {
356
+ action: "partially-answered";
357
+ answers: Record<string, {
358
+ optionIds: string[];
359
+ freeform?: string | undefined;
360
+ }>;
361
+ } | {
362
+ action: "declined";
363
+ } | {
364
+ action: "cancelled";
365
+ }>;
366
+ readonly execute?: never;
367
+ readonly description?: string | ((options: {
368
+ context: any;
369
+ experimental_sandbox?: Experimental_SandboxSession;
370
+ }) => string) | undefined;
371
+ readonly strict?: boolean;
372
+ readonly inputExamples?: {
373
+ input: NoInfer<{
374
+ allowPartialAnswers: boolean;
375
+ questions: {
376
+ id: string;
377
+ question: string;
378
+ header?: string | undefined;
379
+ options?: {
380
+ id: string;
381
+ label: string;
382
+ description?: string | undefined;
383
+ preview?: string | undefined;
384
+ }[] | undefined;
385
+ allowMultiple?: boolean | undefined;
386
+ allowFreeForm?: boolean | {
387
+ secret: boolean;
388
+ } | undefined;
389
+ }[];
390
+ }>;
391
+ }[] | undefined;
392
+ readonly id?: never;
393
+ readonly isProviderExecuted?: never;
394
+ readonly args?: never;
395
+ readonly supportsDeferredResults?: never;
396
+ readonly type?: undefined | "function";
397
+ };
398
+ readonly read: HarnessV1BuiltinTool<{
399
+ [x: string]: unknown;
400
+ file_path?: string | undefined;
401
+ path?: string | undefined;
402
+ }, unknown>;
403
+ readonly write: HarnessV1BuiltinTool<{
404
+ [x: string]: unknown;
405
+ file_path?: string | undefined;
406
+ path?: string | undefined;
407
+ content?: string | undefined;
408
+ }, unknown>;
409
+ readonly edit: HarnessV1BuiltinTool<{
410
+ [x: string]: unknown;
411
+ file_path?: string | undefined;
412
+ path?: string | undefined;
413
+ old_string?: string | undefined;
414
+ new_string?: string | undefined;
415
+ }, unknown>;
416
+ readonly bash: HarnessV1BuiltinTool<{
417
+ [x: string]: unknown;
418
+ command?: string | undefined;
419
+ }, unknown>;
420
+ readonly glob: HarnessV1BuiltinTool<{
421
+ [x: string]: unknown;
422
+ pattern?: string | undefined;
423
+ path?: string | undefined;
424
+ }, unknown>;
425
+ readonly grep: HarnessV1BuiltinTool<{
426
+ [x: string]: unknown;
427
+ pattern?: string | undefined;
428
+ path?: string | undefined;
429
+ }, unknown>;
430
+ readonly ls: import("@ai-sdk/provider-utils").Tool<{
431
+ [x: string]: unknown;
432
+ path?: string | undefined;
433
+ }, any, any>;
434
+ readonly webfetch: import("@ai-sdk/provider-utils").Tool<{
435
+ [x: string]: unknown;
436
+ url?: string | undefined;
437
+ prompt?: string | undefined;
438
+ }, any, any>;
439
+ readonly skill: import("@ai-sdk/provider-utils").Tool<{
440
+ [x: string]: unknown;
441
+ name?: string | undefined;
442
+ }, any, any>;
443
+ readonly todowrite: import("@ai-sdk/provider-utils").Tool<{
444
+ [x: string]: unknown;
445
+ todos?: {
446
+ [x: string]: unknown;
447
+ content?: string | undefined;
448
+ status?: string | undefined;
449
+ priority?: string | undefined;
450
+ }[] | undefined;
451
+ }, any, any>;
452
+ readonly agent: import("@ai-sdk/provider-utils").Tool<{
453
+ [x: string]: unknown;
454
+ agent?: string | undefined;
455
+ prompt?: string | undefined;
456
+ description?: string | undefined;
457
+ metadata?: Record<string, unknown> | undefined;
458
+ }, any, any>;
460
459
  };
461
- declare function createOpenCode(settings?: OpenCodeHarnessSettings): HarnessV1<typeof OPENCODE_BUILTIN_TOOLS>;
462
-
463
- declare const VERSION: string;
464
-
460
+ export declare function createOpenCode(settings?: OpenCodeHarnessSettings): HarnessV1<typeof OPENCODE_BUILTIN_TOOLS>;
461
+ //#endregion
462
+ //#region src/version.d.ts
463
+ export declare const VERSION: string;
464
+ //#endregion
465
+ //#region src/index.d.ts
465
466
  /**
466
467
  * Default `openCode` harness instance with no overrides. Equivalent to
467
468
  * `createOpenCode()`.
468
469
  */
469
- declare const openCode: _ai_sdk_harness.HarnessV1<{
470
- readonly askUserQuestions: {
471
- readonly nativeName: "question";
472
- readonly toolUseKind: "readonly";
473
- readonly deferLoading?: boolean;
474
- readonly title?: string;
475
- readonly providerOptions?: _ai_sdk_provider_utils.ProviderOptions;
476
- readonly metadata?: _ai_sdk_provider.JSONObject;
477
- readonly inputSchema: _ai_sdk_provider_utils.FlexibleSchema<{
478
- allowPartialAnswers: boolean;
479
- questions: {
480
- id: string;
481
- question: string;
482
- header?: string | undefined;
483
- options?: {
484
- id: string;
485
- label: string;
486
- description?: string | undefined;
487
- preview?: string | undefined;
488
- }[] | undefined;
489
- allowMultiple?: boolean | undefined;
490
- allowFreeForm?: boolean | {
491
- secret: boolean;
492
- } | undefined;
493
- }[];
494
- }>;
495
- readonly contextSchema?: _ai_sdk_provider_utils.FlexibleSchema<any> | undefined;
496
- readonly needsApproval?: boolean | _ai_sdk_provider_utils.ToolNeedsApprovalFunction<{
497
- allowPartialAnswers: boolean;
498
- questions: {
499
- id: string;
500
- question: string;
501
- header?: string | undefined;
502
- options?: {
503
- id: string;
504
- label: string;
505
- description?: string | undefined;
506
- preview?: string | undefined;
507
- }[] | undefined;
508
- allowMultiple?: boolean | undefined;
509
- allowFreeForm?: boolean | {
510
- secret: boolean;
511
- } | undefined;
512
- }[];
513
- }, any> | undefined;
514
- readonly onInputStart?: ((options: _ai_sdk_provider_utils.ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
515
- readonly onInputDelta?: ((options: {
516
- inputTextDelta: string;
517
- } & _ai_sdk_provider_utils.ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
518
- readonly onInputAvailable?: ((options: {
519
- input: {
520
- allowPartialAnswers: boolean;
521
- questions: {
522
- id: string;
523
- question: string;
524
- header?: string | undefined;
525
- options?: {
526
- id: string;
527
- label: string;
528
- description?: string | undefined;
529
- preview?: string | undefined;
530
- }[] | undefined;
531
- allowMultiple?: boolean | undefined;
532
- allowFreeForm?: boolean | {
533
- secret: boolean;
534
- } | undefined;
535
- }[];
536
- };
537
- } & _ai_sdk_provider_utils.ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
538
- readonly toModelOutput?: ((options: {
539
- toolCallId: string;
540
- input: {
541
- allowPartialAnswers: boolean;
542
- questions: {
543
- id: string;
544
- question: string;
545
- header?: string | undefined;
546
- options?: {
547
- id: string;
548
- label: string;
549
- description?: string | undefined;
550
- preview?: string | undefined;
551
- }[] | undefined;
552
- allowMultiple?: boolean | undefined;
553
- allowFreeForm?: boolean | {
554
- secret: boolean;
555
- } | undefined;
556
- }[];
557
- };
558
- output: NoInfer<{
559
- action: "answered";
560
- answers: Record<string, {
561
- optionIds: string[];
562
- freeform?: string | undefined;
563
- }>;
564
- } | {
565
- action: "partially-answered";
566
- answers: Record<string, {
567
- optionIds: string[];
568
- freeform?: string | undefined;
569
- }>;
570
- } | {
571
- action: "declined";
572
- } | {
573
- action: "cancelled";
574
- }>;
575
- }) => _ai_sdk_provider_utils.ToolResultOutput | PromiseLike<_ai_sdk_provider_utils.ToolResultOutput>) | undefined;
576
- readonly outputSchema?: _ai_sdk_provider_utils.FlexibleSchema<{
577
- action: "answered";
578
- answers: Record<string, {
579
- optionIds: string[];
580
- freeform?: string | undefined;
581
- }>;
582
- } | {
583
- action: "partially-answered";
584
- answers: Record<string, {
585
- optionIds: string[];
586
- freeform?: string | undefined;
587
- }>;
588
- } | {
589
- action: "declined";
590
- } | {
591
- action: "cancelled";
592
- }> | undefined;
593
- readonly execute: _ai_sdk_provider_utils.ToolExecuteFunction<{
594
- allowPartialAnswers: boolean;
595
- questions: {
596
- id: string;
597
- question: string;
598
- header?: string | undefined;
599
- options?: {
600
- id: string;
601
- label: string;
602
- description?: string | undefined;
603
- preview?: string | undefined;
604
- }[] | undefined;
605
- allowMultiple?: boolean | undefined;
606
- allowFreeForm?: boolean | {
607
- secret: boolean;
608
- } | undefined;
609
- }[];
610
- }, {
611
- action: "answered";
612
- answers: Record<string, {
613
- optionIds: string[];
614
- freeform?: string | undefined;
615
- }>;
616
- } | {
617
- action: "partially-answered";
618
- answers: Record<string, {
619
- optionIds: string[];
620
- freeform?: string | undefined;
621
- }>;
622
- } | {
623
- action: "declined";
624
- } | {
625
- action: "cancelled";
626
- }, any>;
627
- readonly description?: string | ((options: {
628
- context: any;
629
- experimental_sandbox?: _ai_sdk_provider_utils.Experimental_SandboxSession;
630
- }) => string) | undefined;
631
- readonly strict?: boolean;
632
- readonly inputExamples?: {
633
- input: NoInfer<{
634
- allowPartialAnswers: boolean;
635
- questions: {
636
- id: string;
637
- question: string;
638
- header?: string | undefined;
639
- options?: {
640
- id: string;
641
- label: string;
642
- description?: string | undefined;
643
- preview?: string | undefined;
644
- }[] | undefined;
645
- allowMultiple?: boolean | undefined;
646
- allowFreeForm?: boolean | {
647
- secret: boolean;
648
- } | undefined;
649
- }[];
650
- }>;
470
+ export declare const openCode: import("@ai-sdk/harness").HarnessV1<{
471
+ readonly askUserQuestions: {
472
+ readonly nativeName: "question";
473
+ readonly toolUseKind: "readonly";
474
+ readonly deferLoading?: boolean;
475
+ readonly title?: string;
476
+ readonly providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
477
+ readonly metadata?: import("@ai-sdk/provider").JSONObject;
478
+ readonly inputSchema: import("@ai-sdk/provider-utils").FlexibleSchema<{
479
+ allowPartialAnswers: boolean;
480
+ questions: {
481
+ id: string;
482
+ question: string;
483
+ header?: string | undefined;
484
+ options?: {
485
+ id: string;
486
+ label: string;
487
+ description?: string | undefined;
488
+ preview?: string | undefined;
651
489
  }[] | undefined;
652
- readonly id?: never;
653
- readonly isProviderExecuted?: never;
654
- readonly args?: never;
655
- readonly supportsDeferredResults?: never;
656
- readonly type?: undefined | "function";
657
- } | {
658
- readonly nativeName: "question";
659
- readonly toolUseKind: "readonly";
660
- readonly deferLoading?: boolean;
661
- readonly title?: string;
662
- readonly providerOptions?: _ai_sdk_provider_utils.ProviderOptions;
663
- readonly metadata?: _ai_sdk_provider.JSONObject;
664
- readonly inputSchema: _ai_sdk_provider_utils.FlexibleSchema<{
665
- allowPartialAnswers: boolean;
666
- questions: {
667
- id: string;
668
- question: string;
669
- header?: string | undefined;
670
- options?: {
671
- id: string;
672
- label: string;
673
- description?: string | undefined;
674
- preview?: string | undefined;
675
- }[] | undefined;
676
- allowMultiple?: boolean | undefined;
677
- allowFreeForm?: boolean | {
678
- secret: boolean;
679
- } | undefined;
680
- }[];
490
+ allowMultiple?: boolean | undefined;
491
+ allowFreeForm?: boolean | {
492
+ secret: boolean;
493
+ } | undefined;
494
+ }[];
495
+ }>;
496
+ readonly contextSchema?: import("@ai-sdk/provider-utils").FlexibleSchema<any> | undefined;
497
+ readonly needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
498
+ allowPartialAnswers: boolean;
499
+ questions: {
500
+ id: string;
501
+ question: string;
502
+ header?: string | undefined;
503
+ options?: {
504
+ id: string;
505
+ label: string;
506
+ description?: string | undefined;
507
+ preview?: string | undefined;
508
+ }[] | undefined;
509
+ allowMultiple?: boolean | undefined;
510
+ allowFreeForm?: boolean | {
511
+ secret: boolean;
512
+ } | undefined;
513
+ }[];
514
+ }, any> | undefined;
515
+ readonly onInputStart?: ((options: import("@ai-sdk/provider-utils").ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
516
+ readonly onInputDelta?: ((options: {
517
+ inputTextDelta: string;
518
+ } & import("@ai-sdk/provider-utils").ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
519
+ readonly onInputAvailable?: ((options: {
520
+ input: {
521
+ allowPartialAnswers: boolean;
522
+ questions: {
523
+ id: string;
524
+ question: string;
525
+ header?: string | undefined;
526
+ options?: {
527
+ id: string;
528
+ label: string;
529
+ description?: string | undefined;
530
+ preview?: string | undefined;
531
+ }[] | undefined;
532
+ allowMultiple?: boolean | undefined;
533
+ allowFreeForm?: boolean | {
534
+ secret: boolean;
535
+ } | undefined;
536
+ }[];
537
+ };
538
+ } & import("@ai-sdk/provider-utils").ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
539
+ readonly toModelOutput?: ((options: {
540
+ toolCallId: string;
541
+ input: {
542
+ allowPartialAnswers: boolean;
543
+ questions: {
544
+ id: string;
545
+ question: string;
546
+ header?: string | undefined;
547
+ options?: {
548
+ id: string;
549
+ label: string;
550
+ description?: string | undefined;
551
+ preview?: string | undefined;
552
+ }[] | undefined;
553
+ allowMultiple?: boolean | undefined;
554
+ allowFreeForm?: boolean | {
555
+ secret: boolean;
556
+ } | undefined;
557
+ }[];
558
+ };
559
+ output: NoInfer<{
560
+ action: "answered";
561
+ answers: Record<string, {
562
+ optionIds: string[];
563
+ freeform?: string | undefined;
681
564
  }>;
682
- readonly contextSchema?: _ai_sdk_provider_utils.FlexibleSchema<any> | undefined;
683
- readonly needsApproval?: boolean | _ai_sdk_provider_utils.ToolNeedsApprovalFunction<{
684
- allowPartialAnswers: boolean;
685
- questions: {
686
- id: string;
687
- question: string;
688
- header?: string | undefined;
689
- options?: {
690
- id: string;
691
- label: string;
692
- description?: string | undefined;
693
- preview?: string | undefined;
694
- }[] | undefined;
695
- allowMultiple?: boolean | undefined;
696
- allowFreeForm?: boolean | {
697
- secret: boolean;
698
- } | undefined;
699
- }[];
700
- }, any> | undefined;
701
- readonly onInputStart?: ((options: _ai_sdk_provider_utils.ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
702
- readonly onInputDelta?: ((options: {
703
- inputTextDelta: string;
704
- } & _ai_sdk_provider_utils.ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
705
- readonly onInputAvailable?: ((options: {
706
- input: {
707
- allowPartialAnswers: boolean;
708
- questions: {
709
- id: string;
710
- question: string;
711
- header?: string | undefined;
712
- options?: {
713
- id: string;
714
- label: string;
715
- description?: string | undefined;
716
- preview?: string | undefined;
717
- }[] | undefined;
718
- allowMultiple?: boolean | undefined;
719
- allowFreeForm?: boolean | {
720
- secret: boolean;
721
- } | undefined;
722
- }[];
723
- };
724
- } & _ai_sdk_provider_utils.ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
725
- readonly toModelOutput?: ((options: {
726
- toolCallId: string;
727
- input: {
728
- allowPartialAnswers: boolean;
729
- questions: {
730
- id: string;
731
- question: string;
732
- header?: string | undefined;
733
- options?: {
734
- id: string;
735
- label: string;
736
- description?: string | undefined;
737
- preview?: string | undefined;
738
- }[] | undefined;
739
- allowMultiple?: boolean | undefined;
740
- allowFreeForm?: boolean | {
741
- secret: boolean;
742
- } | undefined;
743
- }[];
744
- };
745
- output: NoInfer<{
746
- action: "answered";
747
- answers: Record<string, {
748
- optionIds: string[];
749
- freeform?: string | undefined;
750
- }>;
751
- } | {
752
- action: "partially-answered";
753
- answers: Record<string, {
754
- optionIds: string[];
755
- freeform?: string | undefined;
756
- }>;
757
- } | {
758
- action: "declined";
759
- } | {
760
- action: "cancelled";
761
- }>;
762
- }) => _ai_sdk_provider_utils.ToolResultOutput | PromiseLike<_ai_sdk_provider_utils.ToolResultOutput>) | undefined;
763
- readonly outputSchema: _ai_sdk_provider_utils.FlexibleSchema<{
764
- action: "answered";
765
- answers: Record<string, {
766
- optionIds: string[];
767
- freeform?: string | undefined;
768
- }>;
769
- } | {
770
- action: "partially-answered";
771
- answers: Record<string, {
772
- optionIds: string[];
773
- freeform?: string | undefined;
774
- }>;
775
- } | {
776
- action: "declined";
777
- } | {
778
- action: "cancelled";
565
+ } | {
566
+ action: "partially-answered";
567
+ answers: Record<string, {
568
+ optionIds: string[];
569
+ freeform?: string | undefined;
779
570
  }>;
780
- readonly execute?: never;
781
- readonly description?: string | ((options: {
782
- context: any;
783
- experimental_sandbox?: _ai_sdk_provider_utils.Experimental_SandboxSession;
784
- }) => string) | undefined;
785
- readonly strict?: boolean;
786
- readonly inputExamples?: {
787
- input: NoInfer<{
788
- allowPartialAnswers: boolean;
789
- questions: {
790
- id: string;
791
- question: string;
792
- header?: string | undefined;
793
- options?: {
794
- id: string;
795
- label: string;
796
- description?: string | undefined;
797
- preview?: string | undefined;
798
- }[] | undefined;
799
- allowMultiple?: boolean | undefined;
800
- allowFreeForm?: boolean | {
801
- secret: boolean;
802
- } | undefined;
803
- }[];
804
- }>;
571
+ } | {
572
+ action: "declined";
573
+ } | {
574
+ action: "cancelled";
575
+ }>;
576
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
577
+ readonly outputSchema?: import("@ai-sdk/provider-utils").FlexibleSchema<{
578
+ action: "answered";
579
+ answers: Record<string, {
580
+ optionIds: string[];
581
+ freeform?: string | undefined;
582
+ }>;
583
+ } | {
584
+ action: "partially-answered";
585
+ answers: Record<string, {
586
+ optionIds: string[];
587
+ freeform?: string | undefined;
588
+ }>;
589
+ } | {
590
+ action: "declined";
591
+ } | {
592
+ action: "cancelled";
593
+ }> | undefined;
594
+ readonly execute: import("@ai-sdk/provider-utils").ToolExecuteFunction<{
595
+ allowPartialAnswers: boolean;
596
+ questions: {
597
+ id: string;
598
+ question: string;
599
+ header?: string | undefined;
600
+ options?: {
601
+ id: string;
602
+ label: string;
603
+ description?: string | undefined;
604
+ preview?: string | undefined;
805
605
  }[] | undefined;
806
- readonly id?: never;
807
- readonly isProviderExecuted?: never;
808
- readonly args?: never;
809
- readonly supportsDeferredResults?: never;
810
- readonly type?: undefined | "function";
811
- };
812
- readonly read: _ai_sdk_harness.HarnessV1BuiltinTool<{
813
- [x: string]: unknown;
814
- file_path?: string | undefined;
815
- path?: string | undefined;
816
- }, unknown>;
817
- readonly write: _ai_sdk_harness.HarnessV1BuiltinTool<{
818
- [x: string]: unknown;
819
- file_path?: string | undefined;
820
- path?: string | undefined;
821
- content?: string | undefined;
822
- }, unknown>;
823
- readonly edit: _ai_sdk_harness.HarnessV1BuiltinTool<{
824
- [x: string]: unknown;
825
- file_path?: string | undefined;
826
- path?: string | undefined;
827
- old_string?: string | undefined;
828
- new_string?: string | undefined;
829
- }, unknown>;
830
- readonly bash: _ai_sdk_harness.HarnessV1BuiltinTool<{
831
- [x: string]: unknown;
832
- command?: string | undefined;
833
- }, unknown>;
834
- readonly glob: _ai_sdk_harness.HarnessV1BuiltinTool<{
835
- [x: string]: unknown;
836
- pattern?: string | undefined;
837
- path?: string | undefined;
838
- }, unknown>;
839
- readonly grep: _ai_sdk_harness.HarnessV1BuiltinTool<{
840
- [x: string]: unknown;
841
- pattern?: string | undefined;
842
- path?: string | undefined;
843
- }, unknown>;
844
- readonly ls: _ai_sdk_provider_utils.Tool<{
845
- [x: string]: unknown;
846
- path?: string | undefined;
847
- }, any, any>;
848
- readonly webfetch: _ai_sdk_provider_utils.Tool<{
849
- [x: string]: unknown;
850
- url?: string | undefined;
851
- prompt?: string | undefined;
852
- }, any, any>;
853
- readonly skill: _ai_sdk_provider_utils.Tool<{
854
- [x: string]: unknown;
855
- name?: string | undefined;
856
- }, any, any>;
857
- readonly todowrite: _ai_sdk_provider_utils.Tool<{
858
- [x: string]: unknown;
859
- todos?: {
860
- [x: string]: unknown;
861
- content?: string | undefined;
862
- status?: string | undefined;
863
- priority?: string | undefined;
606
+ allowMultiple?: boolean | undefined;
607
+ allowFreeForm?: boolean | {
608
+ secret: boolean;
609
+ } | undefined;
610
+ }[];
611
+ }, {
612
+ action: "answered";
613
+ answers: Record<string, {
614
+ optionIds: string[];
615
+ freeform?: string | undefined;
616
+ }>;
617
+ } | {
618
+ action: "partially-answered";
619
+ answers: Record<string, {
620
+ optionIds: string[];
621
+ freeform?: string | undefined;
622
+ }>;
623
+ } | {
624
+ action: "declined";
625
+ } | {
626
+ action: "cancelled";
627
+ }, any>;
628
+ readonly description?: string | ((options: {
629
+ context: any;
630
+ experimental_sandbox?: import("@ai-sdk/provider-utils").Experimental_SandboxSession;
631
+ }) => string) | undefined;
632
+ readonly strict?: boolean;
633
+ readonly inputExamples?: {
634
+ input: NoInfer<{
635
+ allowPartialAnswers: boolean;
636
+ questions: {
637
+ id: string;
638
+ question: string;
639
+ header?: string | undefined;
640
+ options?: {
641
+ id: string;
642
+ label: string;
643
+ description?: string | undefined;
644
+ preview?: string | undefined;
645
+ }[] | undefined;
646
+ allowMultiple?: boolean | undefined;
647
+ allowFreeForm?: boolean | {
648
+ secret: boolean;
649
+ } | undefined;
650
+ }[];
651
+ }>;
652
+ }[] | undefined;
653
+ readonly id?: never;
654
+ readonly isProviderExecuted?: never;
655
+ readonly args?: never;
656
+ readonly supportsDeferredResults?: never;
657
+ readonly type?: undefined | "function";
658
+ } | {
659
+ readonly nativeName: "question";
660
+ readonly toolUseKind: "readonly";
661
+ readonly deferLoading?: boolean;
662
+ readonly title?: string;
663
+ readonly providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
664
+ readonly metadata?: import("@ai-sdk/provider").JSONObject;
665
+ readonly inputSchema: import("@ai-sdk/provider-utils").FlexibleSchema<{
666
+ allowPartialAnswers: boolean;
667
+ questions: {
668
+ id: string;
669
+ question: string;
670
+ header?: string | undefined;
671
+ options?: {
672
+ id: string;
673
+ label: string;
674
+ description?: string | undefined;
675
+ preview?: string | undefined;
676
+ }[] | undefined;
677
+ allowMultiple?: boolean | undefined;
678
+ allowFreeForm?: boolean | {
679
+ secret: boolean;
680
+ } | undefined;
681
+ }[];
682
+ }>;
683
+ readonly contextSchema?: import("@ai-sdk/provider-utils").FlexibleSchema<any> | undefined;
684
+ readonly needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
685
+ allowPartialAnswers: boolean;
686
+ questions: {
687
+ id: string;
688
+ question: string;
689
+ header?: string | undefined;
690
+ options?: {
691
+ id: string;
692
+ label: string;
693
+ description?: string | undefined;
694
+ preview?: string | undefined;
864
695
  }[] | undefined;
865
- }, any, any>;
866
- readonly agent: _ai_sdk_provider_utils.Tool<{
867
- [x: string]: unknown;
868
- agent?: string | undefined;
869
- prompt?: string | undefined;
870
- description?: string | undefined;
871
- metadata?: Record<string, unknown> | undefined;
872
- }, any, any>;
696
+ allowMultiple?: boolean | undefined;
697
+ allowFreeForm?: boolean | {
698
+ secret: boolean;
699
+ } | undefined;
700
+ }[];
701
+ }, any> | undefined;
702
+ readonly onInputStart?: ((options: import("@ai-sdk/provider-utils").ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
703
+ readonly onInputDelta?: ((options: {
704
+ inputTextDelta: string;
705
+ } & import("@ai-sdk/provider-utils").ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
706
+ readonly onInputAvailable?: ((options: {
707
+ input: {
708
+ allowPartialAnswers: boolean;
709
+ questions: {
710
+ id: string;
711
+ question: string;
712
+ header?: string | undefined;
713
+ options?: {
714
+ id: string;
715
+ label: string;
716
+ description?: string | undefined;
717
+ preview?: string | undefined;
718
+ }[] | undefined;
719
+ allowMultiple?: boolean | undefined;
720
+ allowFreeForm?: boolean | {
721
+ secret: boolean;
722
+ } | undefined;
723
+ }[];
724
+ };
725
+ } & import("@ai-sdk/provider-utils").ToolExecutionOptions<any>) => void | PromiseLike<void>) | undefined;
726
+ readonly toModelOutput?: ((options: {
727
+ toolCallId: string;
728
+ input: {
729
+ allowPartialAnswers: boolean;
730
+ questions: {
731
+ id: string;
732
+ question: string;
733
+ header?: string | undefined;
734
+ options?: {
735
+ id: string;
736
+ label: string;
737
+ description?: string | undefined;
738
+ preview?: string | undefined;
739
+ }[] | undefined;
740
+ allowMultiple?: boolean | undefined;
741
+ allowFreeForm?: boolean | {
742
+ secret: boolean;
743
+ } | undefined;
744
+ }[];
745
+ };
746
+ output: NoInfer<{
747
+ action: "answered";
748
+ answers: Record<string, {
749
+ optionIds: string[];
750
+ freeform?: string | undefined;
751
+ }>;
752
+ } | {
753
+ action: "partially-answered";
754
+ answers: Record<string, {
755
+ optionIds: string[];
756
+ freeform?: string | undefined;
757
+ }>;
758
+ } | {
759
+ action: "declined";
760
+ } | {
761
+ action: "cancelled";
762
+ }>;
763
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
764
+ readonly outputSchema: import("@ai-sdk/provider-utils").FlexibleSchema<{
765
+ action: "answered";
766
+ answers: Record<string, {
767
+ optionIds: string[];
768
+ freeform?: string | undefined;
769
+ }>;
770
+ } | {
771
+ action: "partially-answered";
772
+ answers: Record<string, {
773
+ optionIds: string[];
774
+ freeform?: string | undefined;
775
+ }>;
776
+ } | {
777
+ action: "declined";
778
+ } | {
779
+ action: "cancelled";
780
+ }>;
781
+ readonly execute?: never;
782
+ readonly description?: string | ((options: {
783
+ context: any;
784
+ experimental_sandbox?: import("@ai-sdk/provider-utils").Experimental_SandboxSession;
785
+ }) => string) | undefined;
786
+ readonly strict?: boolean;
787
+ readonly inputExamples?: {
788
+ input: NoInfer<{
789
+ allowPartialAnswers: boolean;
790
+ questions: {
791
+ id: string;
792
+ question: string;
793
+ header?: string | undefined;
794
+ options?: {
795
+ id: string;
796
+ label: string;
797
+ description?: string | undefined;
798
+ preview?: string | undefined;
799
+ }[] | undefined;
800
+ allowMultiple?: boolean | undefined;
801
+ allowFreeForm?: boolean | {
802
+ secret: boolean;
803
+ } | undefined;
804
+ }[];
805
+ }>;
806
+ }[] | undefined;
807
+ readonly id?: never;
808
+ readonly isProviderExecuted?: never;
809
+ readonly args?: never;
810
+ readonly supportsDeferredResults?: never;
811
+ readonly type?: undefined | "function";
812
+ };
813
+ readonly read: import("@ai-sdk/harness").HarnessV1BuiltinTool<{
814
+ [x: string]: unknown;
815
+ file_path?: string | undefined;
816
+ path?: string | undefined;
817
+ }, unknown>;
818
+ readonly write: import("@ai-sdk/harness").HarnessV1BuiltinTool<{
819
+ [x: string]: unknown;
820
+ file_path?: string | undefined;
821
+ path?: string | undefined;
822
+ content?: string | undefined;
823
+ }, unknown>;
824
+ readonly edit: import("@ai-sdk/harness").HarnessV1BuiltinTool<{
825
+ [x: string]: unknown;
826
+ file_path?: string | undefined;
827
+ path?: string | undefined;
828
+ old_string?: string | undefined;
829
+ new_string?: string | undefined;
830
+ }, unknown>;
831
+ readonly bash: import("@ai-sdk/harness").HarnessV1BuiltinTool<{
832
+ [x: string]: unknown;
833
+ command?: string | undefined;
834
+ }, unknown>;
835
+ readonly glob: import("@ai-sdk/harness").HarnessV1BuiltinTool<{
836
+ [x: string]: unknown;
837
+ pattern?: string | undefined;
838
+ path?: string | undefined;
839
+ }, unknown>;
840
+ readonly grep: import("@ai-sdk/harness").HarnessV1BuiltinTool<{
841
+ [x: string]: unknown;
842
+ pattern?: string | undefined;
843
+ path?: string | undefined;
844
+ }, unknown>;
845
+ readonly ls: import("@ai-sdk/provider-utils").Tool<{
846
+ [x: string]: unknown;
847
+ path?: string | undefined;
848
+ }, any, any>;
849
+ readonly webfetch: import("@ai-sdk/provider-utils").Tool<{
850
+ [x: string]: unknown;
851
+ url?: string | undefined;
852
+ prompt?: string | undefined;
853
+ }, any, any>;
854
+ readonly skill: import("@ai-sdk/provider-utils").Tool<{
855
+ [x: string]: unknown;
856
+ name?: string | undefined;
857
+ }, any, any>;
858
+ readonly todowrite: import("@ai-sdk/provider-utils").Tool<{
859
+ [x: string]: unknown;
860
+ todos?: {
861
+ [x: string]: unknown;
862
+ content?: string | undefined;
863
+ status?: string | undefined;
864
+ priority?: string | undefined;
865
+ }[] | undefined;
866
+ }, any, any>;
867
+ readonly agent: import("@ai-sdk/provider-utils").Tool<{
868
+ [x: string]: unknown;
869
+ agent?: string | undefined;
870
+ prompt?: string | undefined;
871
+ description?: string | undefined;
872
+ metadata?: Record<string, unknown> | undefined;
873
+ }, any, any>;
873
874
  }>;
874
-
875
- export { type OpenCodeAuthenticationMode, type OpenCodeHarnessSettings, VERSION, createOpenCode, openCode };
875
+ //#endregion
876
+ export type { JSONObject, OpenCodeAuthenticationMode, OpenCodeHarnessSettings };
877
+ //# sourceMappingURL=index.d.ts.map