@opencode/client 2.1.4 → 2.2.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.
Files changed (74) hide show
  1. package/dist/chunks/{contract-hg9t2gnm.js → mcp-0e9xp5b3.js} +6 -6
  2. package/dist/chunks/{contract-15p82y03.js → mcp-15p82y03.js} +2 -2
  3. package/dist/chunks/{contract-w10x3kfx.js → mcp-4z60zgnr.js} +245 -112
  4. package/dist/chunks/mcp-60xe5cbf.js +4 -0
  5. package/dist/chunks/mcp-6mq2wh8y.js +33 -0
  6. package/dist/chunks/{contract-vwtmm97t.js → mcp-6v8v0sqq.js} +5 -5
  7. package/dist/chunks/{contract-2ny4vxct.js → mcp-8ye1ye6f.js} +2 -2
  8. package/dist/chunks/{contract-1x65x4hv.js → mcp-csehnca4.js} +101 -56
  9. package/dist/chunks/{contract-c46qzyff.js → mcp-cvg5j6d1.js} +10 -5
  10. package/dist/chunks/{contract-8bbb028w.js → mcp-gecjxyvt.js} +5 -1
  11. package/dist/chunks/{contract-skhp7hxc.js → mcp-kdshn947.js} +1 -1
  12. package/dist/chunks/{contract-9kmsh4jj.js → mcp-qhd5h5hk.js} +2 -2
  13. package/dist/chunks/{contract-ryy6kscr.js → mcp-ryy6kscr.js} +1 -1
  14. package/dist/chunks/{contract-s2hya144.js → mcp-yn2a71yh.js} +523 -325
  15. package/dist/contract.d.ts +1 -1
  16. package/dist/contract.js +3 -1
  17. package/dist/effect/api/api.d.ts +704 -355
  18. package/dist/effect/api.d.ts +1 -0
  19. package/dist/effect/client.d.ts +439 -218
  20. package/dist/effect/client.js +8 -8
  21. package/dist/effect/generated/client-error.js +1 -1
  22. package/dist/effect/generated/client.d.ts +374 -123
  23. package/dist/effect/generated/client.js +3 -3
  24. package/dist/effect/generated/index.js +4 -4
  25. package/dist/effect/index.js +8 -8
  26. package/dist/effect/rpc.js +2 -2
  27. package/dist/effect/service.js +6 -6
  28. package/dist/promise/api.d.ts +4 -0
  29. package/dist/promise/client.d.ts +209 -133
  30. package/dist/promise/client.js +7 -7
  31. package/dist/promise/generated/client-error.js +1 -1
  32. package/dist/promise/generated/client.d.ts +245 -134
  33. package/dist/promise/generated/client.js +2 -2
  34. package/dist/promise/generated/index.js +22 -12
  35. package/dist/promise/generated/types.d.ts +1641 -3781
  36. package/dist/promise/generated/types.js +15 -5
  37. package/dist/promise/index.d.ts +1 -0
  38. package/dist/promise/index.js +24 -14
  39. package/dist/promise/rpc.js +2 -2
  40. package/dist/promise/service.d.ts +2 -2
  41. package/dist/promise/service.js +7 -6
  42. package/dist/pty-handoff.js +4 -4
  43. package/dist/rpc-runtime.js +1 -1
  44. package/dist/service-contender.js +1 -1
  45. package/dist/service-probe.js +3 -3
  46. package/dist/service-timing.js +1 -1
  47. package/dist/service-version.js +1 -1
  48. package/dist/service.js +1 -1
  49. package/dist/shared-events.d.ts +7 -2
  50. package/dist/shared-events.js +1 -1
  51. package/dist/solid/connection.js +1 -1
  52. package/dist/solid/data.d.ts +11 -1
  53. package/dist/solid/data.js +9 -9
  54. package/dist/solid/index.d.ts +1 -0
  55. package/dist/solid/index.js +16 -12
  56. package/dist/solid/pty.js +1 -1
  57. package/dist/solid/retention.d.ts +10 -0
  58. package/dist/solid/retention.js +6 -0
  59. package/dist/solid/usage.js +1 -1
  60. package/package.json +8 -7
  61. package/dist/chunks/contract-vmytr4q8.js +0 -4
  62. /package/dist/chunks/{contract-6mptkzbc.js → mcp-6mptkzbc.js} +0 -0
  63. /package/dist/chunks/{contract-8s2anffy.js → mcp-8s2anffy.js} +0 -0
  64. /package/dist/chunks/{contract-9rqn6x4v.js → mcp-9rqn6x4v.js} +0 -0
  65. /package/dist/chunks/{contract-gne7h7mq.js → mcp-gne7h7mq.js} +0 -0
  66. /package/dist/chunks/{contract-m2eywc8w.js → mcp-m2eywc8w.js} +0 -0
  67. /package/dist/chunks/{contract-nwcpakzx.js → mcp-nwcpakzx.js} +0 -0
  68. /package/dist/chunks/{contract-qav6mfdz.js → mcp-qav6mfdz.js} +0 -0
  69. /package/dist/chunks/{contract-sxt88q69.js → mcp-sxt88q69.js} +0 -0
  70. /package/dist/chunks/{contract-ve4aws36.js → mcp-ve4aws36.js} +0 -0
  71. /package/dist/chunks/{contract-vyas3vgt.js → mcp-vyas3vgt.js} +0 -0
  72. /package/dist/chunks/{contract-xgnj2w4v.js → mcp-xgnj2w4v.js} +0 -0
  73. /package/dist/chunks/{contract-y2etg5bs.js → mcp-y2etg5bs.js} +0 -0
  74. /package/dist/chunks/{contract-ydhz1zrh.js → mcp-ydhz1zrh.js} +0 -0
@@ -6,16 +6,17 @@ import type { Session } from "@opencode/schema/session";
6
6
  import type { AbsolutePath } from "@opencode/schema/schema";
7
7
  import type { Project } from "@opencode/schema/project";
8
8
  import type { RelativePath } from "@opencode/schema/schema";
9
- import type { Money } from "@opencode/schema/money";
10
9
  import type { Model } from "@opencode/schema/model";
11
- import type { DateTime } from "effect";
12
10
  import type { Permission } from "@opencode/schema/permission";
13
11
  import type { SessionMessage } from "@opencode/schema/session-message";
14
12
  import type { SessionInbox } from "@opencode/schema/session-inbox";
15
13
  import type { PromptInput } from "@opencode/schema/prompt-input";
16
14
  import type { AgentAttachment } from "@opencode/schema/prompt";
17
- import type { Skill } from "@opencode/schema/skill";
18
15
  import type { FileDiff } from "@opencode/schema/file-diff";
16
+ import type { Form } from "@opencode/schema/form";
17
+ import type { DateTime } from "effect";
18
+ import type { Money } from "@opencode/schema/money";
19
+ import type { Skill } from "@opencode/schema/skill";
19
20
  import type { InstructionEntry } from "@opencode/schema/instruction-entry";
20
21
  import type { Schema } from "effect";
21
22
  import type { Event } from "@opencode/schema/event";
@@ -24,7 +25,7 @@ import type { Workspace } from "@opencode/schema/workspace";
24
25
  import type { Instruction } from "@opencode/schema/instruction";
25
26
  import type { Snapshot } from "@opencode/schema/snapshot";
26
27
  import type { Shell } from "@opencode/schema/shell";
27
- import type { Form } from "@opencode/schema/form";
28
+ import type { Generate } from "@opencode/schema/generate";
28
29
  import type { Provider } from "@opencode/schema/provider";
29
30
  import type { Integration } from "@opencode/schema/integration";
30
31
  import type { Mcp } from "@opencode/schema/mcp";
@@ -35,14 +36,17 @@ import type { FileSystem } from "@opencode/schema/filesystem";
35
36
  import type { Command } from "@opencode/schema/command";
36
37
  import type { OpenCodeEvent } from "@opencode/protocol/groups/event";
37
38
  import type { Pty } from "@opencode/schema/pty";
39
+ import type { Schedule } from "@opencode/schema/schedule";
38
40
  import type { Reference } from "@opencode/schema/reference";
39
41
  import type { Worktree } from "@opencode/schema/worktree";
40
42
  import type { Vcs } from "@opencode/schema/vcs";
41
43
  import type { WebSearch } from "@opencode/schema/websearch";
44
+ import type { UsageLimits } from "@opencode/schema/usage-limits";
42
45
  import type { Config } from "@opencode/schema/config";
43
46
  export type ServerInfoOutput = {
44
47
  readonly version: string;
45
48
  readonly pid: number;
49
+ readonly hostname?: string | undefined;
46
50
  readonly urls: ReadonlyArray<string>;
47
51
  readonly paths: {
48
52
  readonly tmp: string;
@@ -117,6 +121,17 @@ export type PluginListOutput = {
117
121
  readonly data: ReadonlyArray<Plugin.Info>;
118
122
  };
119
123
  export type PluginListOperation<E = never> = (input?: PluginListInput) => Effect.Effect<PluginListOutput, E>;
124
+ export type PluginGuiInput = {
125
+ readonly location?: {
126
+ readonly directory?: string | undefined;
127
+ } | undefined;
128
+ readonly id: Plugin.ID;
129
+ };
130
+ export type PluginGuiOutput = {
131
+ readonly location: Location.PublicRef;
132
+ readonly data: Plugin.GuiBundle;
133
+ };
134
+ export type PluginGuiOperation<E = never> = (input: PluginGuiInput) => Effect.Effect<PluginGuiOutput, E>;
120
135
  export type PluginCheckInput = {
121
136
  readonly location?: {
122
137
  readonly directory?: string | undefined;
@@ -138,6 +153,7 @@ export type PluginUpdateOutput = void;
138
153
  export type PluginUpdateOperation<E = never> = (input: PluginUpdateInput) => Effect.Effect<PluginUpdateOutput, E>;
139
154
  export interface PluginApi<E = never> {
140
155
  readonly list: PluginListOperation<E>;
156
+ readonly gui: PluginGuiOperation<E>;
141
157
  readonly check: PluginCheckOperation<E>;
142
158
  readonly update: PluginUpdateOperation<E>;
143
159
  }
@@ -160,81 +176,6 @@ export type SessionListOutput = {
160
176
  };
161
177
  };
162
178
  export type SessionListOperation<E = never> = (input?: SessionListInput) => Effect.Effect<SessionListOutput, E>;
163
- export type SessionStatsInput = {
164
- readonly from?: number | undefined;
165
- readonly to?: number | undefined;
166
- readonly project?: Project.ID | undefined;
167
- readonly timezone?: string | undefined;
168
- readonly tools?: "none" | "summary" | "detail" | undefined;
169
- };
170
- export type SessionStatsOutput = {
171
- readonly range: {
172
- readonly from: DateTime.Utc;
173
- readonly to: DateTime.Utc;
174
- };
175
- readonly sessions: number;
176
- readonly subagents: number;
177
- readonly prompts: number;
178
- readonly steps: number;
179
- readonly tokens: {
180
- readonly input: number;
181
- readonly output: number;
182
- readonly reasoning: number;
183
- readonly cache: {
184
- readonly read: number;
185
- readonly write: number;
186
- };
187
- };
188
- readonly cost: Money.USD;
189
- readonly tools: {
190
- readonly mode: "none";
191
- } | {
192
- readonly mode: "summary";
193
- readonly totals: {
194
- readonly calls: number;
195
- readonly succeeded: number;
196
- readonly failed: number;
197
- readonly unfinished: number;
198
- };
199
- } | {
200
- readonly mode: "detail";
201
- readonly totals: {
202
- readonly calls: number;
203
- readonly succeeded: number;
204
- readonly failed: number;
205
- readonly unfinished: number;
206
- };
207
- readonly usage: ReadonlyArray<{
208
- readonly name: string;
209
- readonly calls: number;
210
- readonly succeeded: number;
211
- readonly failed: number;
212
- readonly unfinished: number;
213
- readonly durationP50?: number | undefined;
214
- }>;
215
- };
216
- readonly activeDays: number;
217
- readonly streak: number;
218
- readonly activity: ReadonlyArray<{
219
- readonly date: string;
220
- readonly steps: number;
221
- }>;
222
- readonly models: ReadonlyArray<{
223
- readonly model: Model.Ref;
224
- readonly steps: number;
225
- readonly tokens: {
226
- readonly input: number;
227
- readonly output: number;
228
- readonly reasoning: number;
229
- readonly cache: {
230
- readonly read: number;
231
- readonly write: number;
232
- };
233
- };
234
- readonly cost: Money.USD;
235
- }>;
236
- };
237
- export type SessionStatsOperation<E = never> = (input?: SessionStatsInput) => Effect.Effect<SessionStatsOutput, E>;
238
179
  export type SessionCreateInput = {
239
180
  readonly id?: Session.ID | undefined;
240
181
  readonly parentID?: Session.ID | undefined;
@@ -247,22 +188,6 @@ export type SessionCreateInput = {
247
188
  };
248
189
  export type SessionCreateOutput = Session.Info;
249
190
  export type SessionCreateOperation<E = never> = (input?: SessionCreateInput) => Effect.Effect<SessionCreateOutput, E>;
250
- export type SessionImportInput = {
251
- readonly info: Session.Info;
252
- readonly messages: ReadonlyArray<SessionMessage.Info>;
253
- readonly location?: Location.PublicRef | undefined;
254
- };
255
- export type SessionImportOutput = Session.Info;
256
- export type SessionImportOperation<E = never> = (input: SessionImportInput) => Effect.Effect<SessionImportOutput, E>;
257
- export type SessionExportInput = {
258
- readonly sessionID: Session.ID;
259
- readonly sanitize?: boolean | undefined;
260
- };
261
- export type SessionExportOutput = {
262
- readonly info: Session.Info;
263
- readonly messages: ReadonlyArray<SessionMessage.Info>;
264
- };
265
- export type SessionExportOperation<E = never> = (input: SessionExportInput) => Effect.Effect<SessionExportOutput, E>;
266
191
  export type SessionActiveOutput = {
267
192
  readonly [x: Session.ID]: {
268
193
  readonly type: "running";
@@ -339,13 +264,6 @@ export type SessionCommandInput = {
339
264
  };
340
265
  export type SessionCommandOutput = void;
341
266
  export type SessionCommandOperation<E = never> = (input: SessionCommandInput) => Effect.Effect<SessionCommandOutput, E>;
342
- export type SessionSkillInput = {
343
- readonly sessionID: Session.ID;
344
- readonly id: Skill.ID;
345
- readonly resume?: boolean | undefined;
346
- };
347
- export type SessionSkillOutput = void;
348
- export type SessionSkillOperation<E = never> = (input: SessionSkillInput) => Effect.Effect<SessionSkillOutput, E>;
349
267
  export type SessionSyntheticInput = {
350
268
  readonly sessionID: Session.ID;
351
269
  readonly id?: SessionMessage.ID | undefined;
@@ -373,11 +291,6 @@ export type SessionCompactInput = {
373
291
  };
374
292
  export type SessionCompactOutput = SessionInbox.Compaction;
375
293
  export type SessionCompactOperation<E = never> = (input: SessionCompactInput) => Effect.Effect<SessionCompactOutput, E>;
376
- export type SessionWaitInput = {
377
- readonly sessionID: Session.ID;
378
- };
379
- export type SessionWaitOutput = void;
380
- export type SessionWaitOperation<E = never> = (input: SessionWaitInput) => Effect.Effect<SessionWaitOutput, E>;
381
294
  export type SessionRevertStageInput = {
382
295
  readonly sessionID: Session.ID;
383
296
  readonly messageID: SessionMessage.ID;
@@ -393,71 +306,309 @@ export type SessionRevertClearOperation<E = never> = (input: SessionRevertClearI
393
306
  export type SessionRevertCommitInput = {
394
307
  readonly sessionID: Session.ID;
395
308
  };
396
- export type SessionRevertCommitOutput = void;
397
- export type SessionRevertCommitOperation<E = never> = (input: SessionRevertCommitInput) => Effect.Effect<SessionRevertCommitOutput, E>;
398
- export type SessionContextInput = {
399
- readonly sessionID: Session.ID;
309
+ export type SessionRevertCommitOutput = void;
310
+ export type SessionRevertCommitOperation<E = never> = (input: SessionRevertCommitInput) => Effect.Effect<SessionRevertCommitOutput, E>;
311
+ export type SessionContextInput = {
312
+ readonly sessionID: Session.ID;
313
+ };
314
+ export type SessionContextOutput = ReadonlyArray<SessionMessage.Info>;
315
+ export type SessionContextOperation<E = never> = (input: SessionContextInput) => Effect.Effect<SessionContextOutput, E>;
316
+ export type SessionDiffInput = {
317
+ readonly sessionID: Session.ID;
318
+ readonly from?: SessionMessage.ID | undefined;
319
+ readonly to?: SessionMessage.ID | undefined;
320
+ readonly context?: number | undefined;
321
+ };
322
+ export type SessionDiffOutput = ReadonlyArray<FileDiff.Info>;
323
+ export type SessionDiffOperation<E = never> = (input: SessionDiffInput) => Effect.Effect<SessionDiffOutput, E>;
324
+ export type SessionInboxListInput = {
325
+ readonly sessionID: Session.ID;
326
+ };
327
+ export type SessionInboxListOutput = ReadonlyArray<SessionInbox.Info>;
328
+ export type SessionInboxListOperation<E = never> = (input: SessionInboxListInput) => Effect.Effect<SessionInboxListOutput, E>;
329
+ export type SessionInboxCancelInput = {
330
+ readonly sessionID: Session.ID;
331
+ readonly inboxID: SessionMessage.ID;
332
+ };
333
+ export type SessionInboxCancelOutput = void;
334
+ export type SessionInboxCancelOperation<E = never> = (input: SessionInboxCancelInput) => Effect.Effect<SessionInboxCancelOutput, E>;
335
+ export type SessionInboxUpdateInput = {
336
+ readonly sessionID: Session.ID;
337
+ readonly inboxID: SessionMessage.ID;
338
+ readonly delivery: SessionInbox.Delivery;
339
+ };
340
+ export type SessionInboxUpdateOutput = void;
341
+ export type SessionInboxUpdateOperation<E = never> = (input: SessionInboxUpdateInput) => Effect.Effect<SessionInboxUpdateOutput, E>;
342
+ export type SessionGenerateInput = {
343
+ readonly sessionID: Session.ID;
344
+ readonly prompt: string;
345
+ };
346
+ export type SessionGenerateOutput = {
347
+ readonly text: string;
348
+ };
349
+ export type SessionGenerateOperation<E = never> = (input: SessionGenerateInput) => Effect.Effect<SessionGenerateOutput, E>;
350
+ export type SessionInterruptInput = {
351
+ readonly sessionID: Session.ID;
352
+ readonly resume?: boolean | undefined;
353
+ };
354
+ export type SessionInterruptOutput = {
355
+ readonly interrupted: boolean;
356
+ };
357
+ export type SessionInterruptOperation<E = never> = (input: SessionInterruptInput) => Effect.Effect<SessionInterruptOutput, E>;
358
+ export type SessionBackgroundInput = {
359
+ readonly sessionID: Session.ID;
360
+ };
361
+ export type SessionBackgroundOutput = void;
362
+ export type SessionBackgroundOperation<E = never> = (input: SessionBackgroundInput) => Effect.Effect<SessionBackgroundOutput, E>;
363
+ export type SessionMessageGetInput = {
364
+ readonly sessionID: Session.ID;
365
+ readonly messageID: SessionMessage.ID;
366
+ };
367
+ export type SessionMessageGetOutput = SessionMessage.Info;
368
+ export type SessionMessageGetOperation<E = never> = (input: SessionMessageGetInput) => Effect.Effect<SessionMessageGetOutput, E>;
369
+ export type SessionFormListInput = {
370
+ readonly sessionID: string;
371
+ };
372
+ export type SessionFormListOutput = ReadonlyArray<Form.Info>;
373
+ export type SessionFormListOperation<E = never> = (input: SessionFormListInput) => Effect.Effect<SessionFormListOutput, E>;
374
+ export type SessionFormCreateInput = {
375
+ readonly sessionID: string;
376
+ readonly id?: Form.ID | undefined;
377
+ readonly title: string;
378
+ readonly metadata?: Form.Metadata | undefined;
379
+ readonly fields: Form.Fields;
380
+ };
381
+ export type SessionFormCreateOutput = Form.Info;
382
+ export type SessionFormCreateOperation<E = never> = (input: SessionFormCreateInput) => Effect.Effect<SessionFormCreateOutput, E>;
383
+ export type SessionFormGetInput = {
384
+ readonly sessionID: string;
385
+ readonly formID: Form.ID;
386
+ };
387
+ export type SessionFormGetOutput = Form.Detail;
388
+ export type SessionFormGetOperation<E = never> = (input: SessionFormGetInput) => Effect.Effect<SessionFormGetOutput, E>;
389
+ export type SessionFormReplyInput = {
390
+ readonly sessionID: string;
391
+ readonly formID: Form.ID;
392
+ readonly answer: Form.Answer;
393
+ };
394
+ export type SessionFormReplyOutput = void;
395
+ export type SessionFormReplyOperation<E = never> = (input: SessionFormReplyInput) => Effect.Effect<SessionFormReplyOutput, E>;
396
+ export type SessionFormCancelInput = {
397
+ readonly sessionID: string;
398
+ readonly formID: Form.ID;
399
+ readonly message?: string | undefined;
400
+ };
401
+ export type SessionFormCancelOutput = void;
402
+ export type SessionFormCancelOperation<E = never> = (input: SessionFormCancelInput) => Effect.Effect<SessionFormCancelOutput, E>;
403
+ export type SessionEnvironmentInput = {
404
+ readonly sessionID: Session.ID;
405
+ readonly variables: {
406
+ readonly [x: string]: string;
407
+ };
408
+ };
409
+ export type SessionEnvironmentOutput = void;
410
+ export type SessionEnvironmentOperation<E = never> = (input: SessionEnvironmentInput) => Effect.Effect<SessionEnvironmentOutput, E>;
411
+ export type SessionViewInput = {
412
+ readonly sessionID: Session.ID;
413
+ readonly idle: DateTime.Utc;
414
+ };
415
+ export type SessionViewOutput = void;
416
+ export type SessionViewOperation<E = never> = (input: SessionViewInput) => Effect.Effect<SessionViewOutput, E>;
417
+ export interface SessionApi<E = never> {
418
+ readonly list: SessionListOperation<E>;
419
+ readonly create: SessionCreateOperation<E>;
420
+ readonly active: SessionActiveOperation<E>;
421
+ readonly get: SessionGetOperation<E>;
422
+ readonly remove: SessionRemoveOperation<E>;
423
+ readonly fork: SessionForkOperation<E>;
424
+ readonly switchAgent: SessionSwitchAgentOperation<E>;
425
+ readonly switchModel: SessionSwitchModelOperation<E>;
426
+ readonly update: SessionUpdateOperation<E>;
427
+ readonly move: SessionMoveOperation<E>;
428
+ readonly prompt: SessionPromptOperation<E>;
429
+ readonly command: SessionCommandOperation<E>;
430
+ readonly synthetic: SessionSyntheticOperation<E>;
431
+ readonly shell: SessionShellOperation<E>;
432
+ readonly compact: SessionCompactOperation<E>;
433
+ readonly revert: {
434
+ readonly stage: SessionRevertStageOperation<E>;
435
+ readonly clear: SessionRevertClearOperation<E>;
436
+ readonly commit: SessionRevertCommitOperation<E>;
437
+ };
438
+ readonly context: SessionContextOperation<E>;
439
+ readonly diff: SessionDiffOperation<E>;
440
+ readonly inbox: {
441
+ readonly list: SessionInboxListOperation<E>;
442
+ readonly cancel: SessionInboxCancelOperation<E>;
443
+ readonly update: SessionInboxUpdateOperation<E>;
444
+ };
445
+ readonly generate: SessionGenerateOperation<E>;
446
+ readonly interrupt: SessionInterruptOperation<E>;
447
+ readonly background: SessionBackgroundOperation<E>;
448
+ readonly message: {
449
+ readonly get: SessionMessageGetOperation<E>;
450
+ };
451
+ readonly form: {
452
+ readonly list: SessionFormListOperation<E>;
453
+ readonly create: SessionFormCreateOperation<E>;
454
+ readonly get: SessionFormGetOperation<E>;
455
+ readonly reply: SessionFormReplyOperation<E>;
456
+ readonly cancel: SessionFormCancelOperation<E>;
457
+ };
458
+ readonly environment: SessionEnvironmentOperation<E>;
459
+ readonly view: SessionViewOperation<E>;
460
+ /** @deprecated Use `client.experimental.session.stats`. Removed in the next minor. */
461
+ readonly stats: ExperimentalSessionStatsOperation<E>;
462
+ /** @deprecated Use `client.experimental.session.import`. Removed in the next minor. */
463
+ readonly import: ExperimentalSessionImportOperation<E>;
464
+ /** @deprecated Use `client.experimental.session.export`. Removed in the next minor. */
465
+ readonly export: ExperimentalSessionExportOperation<E>;
466
+ /** @deprecated Use `client.experimental.session.skill`. Removed in the next minor. */
467
+ readonly skill: ExperimentalSessionSkillOperation<E>;
468
+ /** @deprecated Use `client.experimental.session.wait`. Removed in the next minor. */
469
+ readonly wait: ExperimentalSessionWaitOperation<E>;
470
+ /** @deprecated Use `client.experimental.session.instructions`. Removed in the next minor. */
471
+ readonly instructions: {
472
+ /** @deprecated Use `client.experimental.session.instructions.entry`. Removed in the next minor. */
473
+ readonly entry: {
474
+ /** @deprecated Use `client.experimental.session.instructions.entry.list`. Removed in the next minor. */
475
+ readonly list: ExperimentalSessionInstructionsEntryListOperation<E>;
476
+ /** @deprecated Use `client.experimental.session.instructions.entry.put`. Removed in the next minor. */
477
+ readonly put: ExperimentalSessionInstructionsEntryPutOperation<E>;
478
+ /** @deprecated Use `client.experimental.session.instructions.entry.remove`. Removed in the next minor. */
479
+ readonly remove: ExperimentalSessionInstructionsEntryRemoveOperation<E>;
480
+ };
481
+ };
482
+ /** @deprecated Use `client.experimental.session.log`. Removed in the next minor. */
483
+ readonly log: ExperimentalSessionLogOperation<E>;
484
+ }
485
+ export type ExperimentalSessionStatsInput = {
486
+ readonly from?: number | undefined;
487
+ readonly to?: number | undefined;
488
+ readonly project?: Project.ID | undefined;
489
+ readonly timezone?: string | undefined;
490
+ readonly tools?: "none" | "summary" | "detail" | undefined;
491
+ };
492
+ export type ExperimentalSessionStatsOutput = {
493
+ readonly range: {
494
+ readonly from: DateTime.Utc;
495
+ readonly to: DateTime.Utc;
496
+ };
497
+ readonly sessions: number;
498
+ readonly subagents: number;
499
+ readonly prompts: number;
500
+ readonly steps: number;
501
+ readonly tokens: {
502
+ readonly input: number;
503
+ readonly output: number;
504
+ readonly reasoning: number;
505
+ readonly cache: {
506
+ readonly read: number;
507
+ readonly write: number;
508
+ };
509
+ };
510
+ readonly cost: Money.USD;
511
+ readonly tools: {
512
+ readonly mode: "none";
513
+ } | {
514
+ readonly mode: "summary";
515
+ readonly totals: {
516
+ readonly calls: number;
517
+ readonly succeeded: number;
518
+ readonly failed: number;
519
+ readonly unfinished: number;
520
+ };
521
+ } | {
522
+ readonly mode: "detail";
523
+ readonly totals: {
524
+ readonly calls: number;
525
+ readonly succeeded: number;
526
+ readonly failed: number;
527
+ readonly unfinished: number;
528
+ };
529
+ readonly usage: ReadonlyArray<{
530
+ readonly name: string;
531
+ readonly calls: number;
532
+ readonly succeeded: number;
533
+ readonly failed: number;
534
+ readonly unfinished: number;
535
+ readonly durationP50?: number | undefined;
536
+ }>;
537
+ };
538
+ readonly activeDays: number;
539
+ readonly streak: number;
540
+ readonly activity: ReadonlyArray<{
541
+ readonly date: string;
542
+ readonly steps: number;
543
+ }>;
544
+ readonly models: ReadonlyArray<{
545
+ readonly model: Model.Ref;
546
+ readonly steps: number;
547
+ readonly tokens: {
548
+ readonly input: number;
549
+ readonly output: number;
550
+ readonly reasoning: number;
551
+ readonly cache: {
552
+ readonly read: number;
553
+ readonly write: number;
554
+ };
555
+ };
556
+ readonly cost: Money.USD;
557
+ }>;
558
+ };
559
+ export type ExperimentalSessionStatsOperation<E = never> = (input?: ExperimentalSessionStatsInput) => Effect.Effect<ExperimentalSessionStatsOutput, E>;
560
+ export type ExperimentalSessionImportInput = {
561
+ readonly info: Session.Info;
562
+ readonly messages: ReadonlyArray<SessionMessage.Info>;
563
+ readonly location?: Location.PublicRef | undefined;
400
564
  };
401
- export type SessionContextOutput = ReadonlyArray<SessionMessage.Info>;
402
- export type SessionContextOperation<E = never> = (input: SessionContextInput) => Effect.Effect<SessionContextOutput, E>;
403
- export type SessionDiffInput = {
565
+ export type ExperimentalSessionImportOutput = Session.Info;
566
+ export type ExperimentalSessionImportOperation<E = never> = (input: ExperimentalSessionImportInput) => Effect.Effect<ExperimentalSessionImportOutput, E>;
567
+ export type ExperimentalSessionExportInput = {
404
568
  readonly sessionID: Session.ID;
405
- readonly from?: SessionMessage.ID | undefined;
406
- readonly to?: SessionMessage.ID | undefined;
407
- readonly context?: number | undefined;
569
+ readonly sanitize?: boolean | undefined;
408
570
  };
409
- export type SessionDiffOutput = ReadonlyArray<FileDiff.Info>;
410
- export type SessionDiffOperation<E = never> = (input: SessionDiffInput) => Effect.Effect<SessionDiffOutput, E>;
411
- export type SessionInboxListInput = {
412
- readonly sessionID: Session.ID;
571
+ export type ExperimentalSessionExportOutput = {
572
+ readonly info: Session.Info;
573
+ readonly messages: ReadonlyArray<SessionMessage.Info>;
413
574
  };
414
- export type SessionInboxListOutput = ReadonlyArray<SessionInbox.Info>;
415
- export type SessionInboxListOperation<E = never> = (input: SessionInboxListInput) => Effect.Effect<SessionInboxListOutput, E>;
416
- export type SessionInboxCancelInput = {
575
+ export type ExperimentalSessionExportOperation<E = never> = (input: ExperimentalSessionExportInput) => Effect.Effect<ExperimentalSessionExportOutput, E>;
576
+ export type ExperimentalSessionSkillInput = {
417
577
  readonly sessionID: Session.ID;
418
- readonly inboxID: SessionMessage.ID;
578
+ readonly id: Skill.ID;
579
+ readonly resume?: boolean | undefined;
419
580
  };
420
- export type SessionInboxCancelOutput = void;
421
- export type SessionInboxCancelOperation<E = never> = (input: SessionInboxCancelInput) => Effect.Effect<SessionInboxCancelOutput, E>;
422
- export type SessionInboxUpdateInput = {
581
+ export type ExperimentalSessionSkillOutput = void;
582
+ export type ExperimentalSessionSkillOperation<E = never> = (input: ExperimentalSessionSkillInput) => Effect.Effect<ExperimentalSessionSkillOutput, E>;
583
+ export type ExperimentalSessionWaitInput = {
423
584
  readonly sessionID: Session.ID;
424
- readonly inboxID: SessionMessage.ID;
425
- readonly delivery: SessionInbox.Delivery;
426
585
  };
427
- export type SessionInboxUpdateOutput = void;
428
- export type SessionInboxUpdateOperation<E = never> = (input: SessionInboxUpdateInput) => Effect.Effect<SessionInboxUpdateOutput, E>;
429
- export type SessionInstructionsEntryListInput = {
586
+ export type ExperimentalSessionWaitOutput = void;
587
+ export type ExperimentalSessionWaitOperation<E = never> = (input: ExperimentalSessionWaitInput) => Effect.Effect<ExperimentalSessionWaitOutput, E>;
588
+ export type ExperimentalSessionInstructionsEntryListInput = {
430
589
  readonly sessionID: Session.ID;
431
590
  };
432
- export type SessionInstructionsEntryListOutput = ReadonlyArray<InstructionEntry.Info>;
433
- export type SessionInstructionsEntryListOperation<E = never> = (input: SessionInstructionsEntryListInput) => Effect.Effect<SessionInstructionsEntryListOutput, E>;
434
- export type SessionInstructionsEntryPutInput = {
591
+ export type ExperimentalSessionInstructionsEntryListOutput = ReadonlyArray<InstructionEntry.Info>;
592
+ export type ExperimentalSessionInstructionsEntryListOperation<E = never> = (input: ExperimentalSessionInstructionsEntryListInput) => Effect.Effect<ExperimentalSessionInstructionsEntryListOutput, E>;
593
+ export type ExperimentalSessionInstructionsEntryPutInput = {
435
594
  readonly sessionID: Session.ID;
436
595
  readonly key: InstructionEntry.Key;
437
596
  readonly value: Schema.Json;
438
597
  };
439
- export type SessionInstructionsEntryPutOutput = void;
440
- export type SessionInstructionsEntryPutOperation<E = never> = (input: SessionInstructionsEntryPutInput) => Effect.Effect<SessionInstructionsEntryPutOutput, E>;
441
- export type SessionInstructionsEntryRemoveInput = {
598
+ export type ExperimentalSessionInstructionsEntryPutOutput = void;
599
+ export type ExperimentalSessionInstructionsEntryPutOperation<E = never> = (input: ExperimentalSessionInstructionsEntryPutInput) => Effect.Effect<ExperimentalSessionInstructionsEntryPutOutput, E>;
600
+ export type ExperimentalSessionInstructionsEntryRemoveInput = {
442
601
  readonly sessionID: Session.ID;
443
602
  readonly key: InstructionEntry.Key;
444
603
  };
445
- export type SessionInstructionsEntryRemoveOutput = void;
446
- export type SessionInstructionsEntryRemoveOperation<E = never> = (input: SessionInstructionsEntryRemoveInput) => Effect.Effect<SessionInstructionsEntryRemoveOutput, E>;
447
- export type SessionGenerateInput = {
448
- readonly sessionID: Session.ID;
449
- readonly prompt: string;
450
- };
451
- export type SessionGenerateOutput = {
452
- readonly text: string;
453
- };
454
- export type SessionGenerateOperation<E = never> = (input: SessionGenerateInput) => Effect.Effect<SessionGenerateOutput, E>;
455
- export type SessionLogInput = {
604
+ export type ExperimentalSessionInstructionsEntryRemoveOutput = void;
605
+ export type ExperimentalSessionInstructionsEntryRemoveOperation<E = never> = (input: ExperimentalSessionInstructionsEntryRemoveInput) => Effect.Effect<ExperimentalSessionInstructionsEntryRemoveOutput, E>;
606
+ export type ExperimentalSessionLogInput = {
456
607
  readonly sessionID: Session.ID;
457
608
  readonly after?: Event.Seq | undefined;
458
609
  readonly follow?: boolean | undefined;
459
610
  };
460
- export type SessionLogOutput = ({
611
+ export type ExperimentalSessionLogOutput = ({
461
612
  readonly id: Event.ID;
462
613
  readonly created: number;
463
614
  readonly metadata?: {
@@ -1621,130 +1772,21 @@ export type SessionLogOutput = ({
1621
1772
  readonly content: ReadonlyArray<SessionMessage.AssistantContentEncoded>;
1622
1773
  };
1623
1774
  }) | EventLog.Synced;
1624
- export type SessionLogOperation<E = never> = (input: SessionLogInput) => Stream.Stream<SessionLogOutput, E>;
1625
- export type SessionInterruptInput = {
1626
- readonly sessionID: Session.ID;
1627
- readonly resume?: boolean | undefined;
1628
- };
1629
- export type SessionInterruptOutput = {
1630
- readonly interrupted: boolean;
1631
- };
1632
- export type SessionInterruptOperation<E = never> = (input: SessionInterruptInput) => Effect.Effect<SessionInterruptOutput, E>;
1633
- export type SessionBackgroundInput = {
1634
- readonly sessionID: Session.ID;
1635
- };
1636
- export type SessionBackgroundOutput = void;
1637
- export type SessionBackgroundOperation<E = never> = (input: SessionBackgroundInput) => Effect.Effect<SessionBackgroundOutput, E>;
1638
- export type SessionMessageGetInput = {
1639
- readonly sessionID: Session.ID;
1640
- readonly messageID: SessionMessage.ID;
1641
- };
1642
- export type SessionMessageGetOutput = SessionMessage.Info;
1643
- export type SessionMessageGetOperation<E = never> = (input: SessionMessageGetInput) => Effect.Effect<SessionMessageGetOutput, E>;
1644
- export type SessionFormListInput = {
1645
- readonly sessionID: string;
1646
- };
1647
- export type SessionFormListOutput = ReadonlyArray<Form.Info>;
1648
- export type SessionFormListOperation<E = never> = (input: SessionFormListInput) => Effect.Effect<SessionFormListOutput, E>;
1649
- export type SessionFormCreateInput = {
1650
- readonly sessionID: string;
1651
- readonly id?: Form.ID | undefined;
1652
- readonly title: string;
1653
- readonly metadata?: Form.Metadata | undefined;
1654
- readonly fields: Form.Fields;
1655
- };
1656
- export type SessionFormCreateOutput = Form.Info;
1657
- export type SessionFormCreateOperation<E = never> = (input: SessionFormCreateInput) => Effect.Effect<SessionFormCreateOutput, E>;
1658
- export type SessionFormGetInput = {
1659
- readonly sessionID: string;
1660
- readonly formID: Form.ID;
1661
- };
1662
- export type SessionFormGetOutput = Form.Detail;
1663
- export type SessionFormGetOperation<E = never> = (input: SessionFormGetInput) => Effect.Effect<SessionFormGetOutput, E>;
1664
- export type SessionFormReplyInput = {
1665
- readonly sessionID: string;
1666
- readonly formID: Form.ID;
1667
- readonly answer: Form.Answer;
1668
- };
1669
- export type SessionFormReplyOutput = void;
1670
- export type SessionFormReplyOperation<E = never> = (input: SessionFormReplyInput) => Effect.Effect<SessionFormReplyOutput, E>;
1671
- export type SessionFormCancelInput = {
1672
- readonly sessionID: string;
1673
- readonly formID: Form.ID;
1674
- readonly message?: string | undefined;
1675
- };
1676
- export type SessionFormCancelOutput = void;
1677
- export type SessionFormCancelOperation<E = never> = (input: SessionFormCancelInput) => Effect.Effect<SessionFormCancelOutput, E>;
1678
- export type SessionEnvironmentInput = {
1679
- readonly sessionID: Session.ID;
1680
- readonly variables: {
1681
- readonly [x: string]: string;
1682
- };
1683
- };
1684
- export type SessionEnvironmentOutput = void;
1685
- export type SessionEnvironmentOperation<E = never> = (input: SessionEnvironmentInput) => Effect.Effect<SessionEnvironmentOutput, E>;
1686
- export type SessionViewInput = {
1687
- readonly sessionID: Session.ID;
1688
- readonly idle: DateTime.Utc;
1689
- };
1690
- export type SessionViewOutput = void;
1691
- export type SessionViewOperation<E = never> = (input: SessionViewInput) => Effect.Effect<SessionViewOutput, E>;
1692
- export interface SessionApi<E = never> {
1693
- readonly list: SessionListOperation<E>;
1694
- readonly stats: SessionStatsOperation<E>;
1695
- readonly create: SessionCreateOperation<E>;
1696
- readonly import: SessionImportOperation<E>;
1697
- readonly export: SessionExportOperation<E>;
1698
- readonly active: SessionActiveOperation<E>;
1699
- readonly get: SessionGetOperation<E>;
1700
- readonly remove: SessionRemoveOperation<E>;
1701
- readonly fork: SessionForkOperation<E>;
1702
- readonly switchAgent: SessionSwitchAgentOperation<E>;
1703
- readonly switchModel: SessionSwitchModelOperation<E>;
1704
- readonly update: SessionUpdateOperation<E>;
1705
- readonly move: SessionMoveOperation<E>;
1706
- readonly prompt: SessionPromptOperation<E>;
1707
- readonly command: SessionCommandOperation<E>;
1708
- readonly skill: SessionSkillOperation<E>;
1709
- readonly synthetic: SessionSyntheticOperation<E>;
1710
- readonly shell: SessionShellOperation<E>;
1711
- readonly compact: SessionCompactOperation<E>;
1712
- readonly wait: SessionWaitOperation<E>;
1713
- readonly revert: {
1714
- readonly stage: SessionRevertStageOperation<E>;
1715
- readonly clear: SessionRevertClearOperation<E>;
1716
- readonly commit: SessionRevertCommitOperation<E>;
1717
- };
1718
- readonly context: SessionContextOperation<E>;
1719
- readonly diff: SessionDiffOperation<E>;
1720
- readonly inbox: {
1721
- readonly list: SessionInboxListOperation<E>;
1722
- readonly cancel: SessionInboxCancelOperation<E>;
1723
- readonly update: SessionInboxUpdateOperation<E>;
1724
- };
1775
+ export type ExperimentalSessionLogOperation<E = never> = (input: ExperimentalSessionLogInput) => Stream.Stream<ExperimentalSessionLogOutput, E>;
1776
+ export interface ExperimentalSessionApi<E = never> {
1777
+ readonly stats: ExperimentalSessionStatsOperation<E>;
1778
+ readonly import: ExperimentalSessionImportOperation<E>;
1779
+ readonly export: ExperimentalSessionExportOperation<E>;
1780
+ readonly skill: ExperimentalSessionSkillOperation<E>;
1781
+ readonly wait: ExperimentalSessionWaitOperation<E>;
1725
1782
  readonly instructions: {
1726
1783
  readonly entry: {
1727
- readonly list: SessionInstructionsEntryListOperation<E>;
1728
- readonly put: SessionInstructionsEntryPutOperation<E>;
1729
- readonly remove: SessionInstructionsEntryRemoveOperation<E>;
1784
+ readonly list: ExperimentalSessionInstructionsEntryListOperation<E>;
1785
+ readonly put: ExperimentalSessionInstructionsEntryPutOperation<E>;
1786
+ readonly remove: ExperimentalSessionInstructionsEntryRemoveOperation<E>;
1730
1787
  };
1731
1788
  };
1732
- readonly generate: SessionGenerateOperation<E>;
1733
- readonly log: SessionLogOperation<E>;
1734
- readonly interrupt: SessionInterruptOperation<E>;
1735
- readonly background: SessionBackgroundOperation<E>;
1736
- readonly message: {
1737
- readonly get: SessionMessageGetOperation<E>;
1738
- };
1739
- readonly form: {
1740
- readonly list: SessionFormListOperation<E>;
1741
- readonly create: SessionFormCreateOperation<E>;
1742
- readonly get: SessionFormGetOperation<E>;
1743
- readonly reply: SessionFormReplyOperation<E>;
1744
- readonly cancel: SessionFormCancelOperation<E>;
1745
- };
1746
- readonly environment: SessionEnvironmentOperation<E>;
1747
- readonly view: SessionViewOperation<E>;
1789
+ readonly log: ExperimentalSessionLogOperation<E>;
1748
1790
  }
1749
1791
  export type MessageListInput = {
1750
1792
  readonly sessionID: Session.ID;
@@ -1768,6 +1810,7 @@ export type ModelListInput = {
1768
1810
  readonly location?: {
1769
1811
  readonly directory?: string | undefined;
1770
1812
  } | undefined;
1813
+ readonly types?: ReadonlyArray<Model.Type> | undefined;
1771
1814
  };
1772
1815
  export type ModelListOutput = {
1773
1816
  readonly location: Location.PublicRef;
@@ -1788,30 +1831,47 @@ export interface ModelApi<E = never> {
1788
1831
  readonly list: ModelListOperation<E>;
1789
1832
  readonly default: ModelDefaultOperation<E>;
1790
1833
  }
1791
- export type GenerateTextInput = {
1834
+ export type ExperimentalGenerateTextInput = {
1792
1835
  readonly prompt: string;
1793
1836
  readonly model?: Model.Ref | undefined;
1794
1837
  };
1795
- export type GenerateTextOutput = {
1838
+ export type ExperimentalGenerateTextOutput = {
1796
1839
  readonly text: string;
1797
1840
  };
1798
- export type GenerateTextOperation<E = never> = (input: GenerateTextInput) => Effect.Effect<GenerateTextOutput, E>;
1799
- export interface GenerateApi<E = never> {
1800
- readonly text: GenerateTextOperation<E>;
1841
+ export type ExperimentalGenerateTextOperation<E = never> = (input: ExperimentalGenerateTextInput) => Effect.Effect<ExperimentalGenerateTextOutput, E>;
1842
+ export type ExperimentalGenerateImageInput = {
1843
+ readonly model: Model.Ref;
1844
+ readonly prompt: string;
1845
+ readonly images?: ReadonlyArray<Generate.File> | undefined;
1846
+ readonly n?: number | undefined;
1847
+ readonly aspect?: Generate.ImageAspect | undefined;
1848
+ readonly resolution?: Generate.ImageResolution | undefined;
1849
+ };
1850
+ export type ExperimentalGenerateImageOutput = Generate.ImageResult;
1851
+ export type ExperimentalGenerateImageOperation<E = never> = (input: ExperimentalGenerateImageInput) => Effect.Effect<ExperimentalGenerateImageOutput, E>;
1852
+ export type ExperimentalGenerateDecisionsInput = {
1853
+ readonly model: Model.Ref;
1854
+ readonly input: ReadonlyArray<Generate.DecisionPart>;
1855
+ readonly questions: ReadonlyArray<Generate.DecisionQuestion>;
1856
+ };
1857
+ export type ExperimentalGenerateDecisionsOutput = Generate.DecisionResult;
1858
+ export type ExperimentalGenerateDecisionsOperation<E = never> = (input: ExperimentalGenerateDecisionsInput) => Effect.Effect<ExperimentalGenerateDecisionsOutput, E>;
1859
+ export interface ExperimentalGenerateApi<E = never> {
1860
+ readonly text: ExperimentalGenerateTextOperation<E>;
1861
+ readonly image: ExperimentalGenerateImageOperation<E>;
1862
+ readonly decisions: ExperimentalGenerateDecisionsOperation<E>;
1801
1863
  }
1802
- export type VoiceModelsOutput = {
1864
+ export type ExperimentalVoiceModelsOutput = {
1803
1865
  readonly models: ReadonlyArray<{
1804
1866
  readonly model: string;
1805
1867
  readonly provider: string;
1806
1868
  readonly transports: ReadonlyArray<"webrtc" | "websocket">;
1807
1869
  readonly available: boolean;
1808
- readonly integration?: string | undefined;
1809
- readonly workspace?: string | undefined;
1810
1870
  }>;
1811
1871
  readonly default?: string | undefined;
1812
1872
  };
1813
- export type VoiceModelsOperation<E = never> = () => Effect.Effect<VoiceModelsOutput, E>;
1814
- export type VoiceSessionInput = {
1873
+ export type ExperimentalVoiceModelsOperation<E = never> = () => Effect.Effect<ExperimentalVoiceModelsOutput, E>;
1874
+ export type ExperimentalVoiceSessionInput = {
1815
1875
  readonly model: string;
1816
1876
  readonly session?: {
1817
1877
  readonly [x: string]: unknown;
@@ -1824,7 +1884,7 @@ export type VoiceSessionInput = {
1824
1884
  readonly type: "websocket";
1825
1885
  };
1826
1886
  };
1827
- export type VoiceSessionOutput = {
1887
+ export type ExperimentalVoiceSessionOutput = {
1828
1888
  readonly transport: {
1829
1889
  readonly type: "webrtc";
1830
1890
  readonly sdp: string;
@@ -1834,21 +1894,11 @@ export type VoiceSessionOutput = {
1834
1894
  readonly token: string;
1835
1895
  readonly expiresAt: number;
1836
1896
  };
1837
- readonly session?: {
1838
- readonly id: string;
1839
- } | undefined;
1840
1897
  };
1841
- export type VoiceSessionOperation<E = never> = (input: VoiceSessionInput) => Effect.Effect<VoiceSessionOutput, E>;
1842
- export type VoiceInstructionsInput = {
1843
- readonly sessionID: string;
1844
- readonly instructions: string;
1845
- };
1846
- export type VoiceInstructionsOutput = void;
1847
- export type VoiceInstructionsOperation<E = never> = (input: VoiceInstructionsInput) => Effect.Effect<VoiceInstructionsOutput, E>;
1848
- export interface VoiceApi<E = never> {
1849
- readonly models: VoiceModelsOperation<E>;
1850
- readonly session: VoiceSessionOperation<E>;
1851
- readonly instructions: VoiceInstructionsOperation<E>;
1898
+ export type ExperimentalVoiceSessionOperation<E = never> = (input: ExperimentalVoiceSessionInput) => Effect.Effect<ExperimentalVoiceSessionOutput, E>;
1899
+ export interface ExperimentalVoiceApi<E = never> {
1900
+ readonly models: ExperimentalVoiceModelsOperation<E>;
1901
+ readonly session: ExperimentalVoiceSessionOperation<E>;
1852
1902
  }
1853
1903
  export type ProviderListInput = {
1854
1904
  readonly location?: {
@@ -1896,14 +1946,6 @@ export type IntegrationGetOutput = {
1896
1946
  readonly data: Integration.Info;
1897
1947
  };
1898
1948
  export type IntegrationGetOperation<E = never> = (input: IntegrationGetInput) => Effect.Effect<IntegrationGetOutput, E>;
1899
- export type IntegrationWellknownAddInput = {
1900
- readonly location?: {
1901
- readonly directory?: string | undefined;
1902
- } | undefined;
1903
- readonly url: string;
1904
- };
1905
- export type IntegrationWellknownAddOutput = void;
1906
- export type IntegrationWellknownAddOperation<E = never> = (input: IntegrationWellknownAddInput) => Effect.Effect<IntegrationWellknownAddOutput, E>;
1907
1949
  export type IntegrationConnectKeyInput = {
1908
1950
  readonly integrationID: Integration.ID;
1909
1951
  readonly location?: {
@@ -2008,9 +2050,6 @@ export type IntegrationCommandCancelOperation<E = never> = (input: IntegrationCo
2008
2050
  export interface IntegrationApi<E = never> {
2009
2051
  readonly list: IntegrationListOperation<E>;
2010
2052
  readonly get: IntegrationGetOperation<E>;
2011
- readonly wellknown: {
2012
- readonly add: IntegrationWellknownAddOperation<E>;
2013
- };
2014
2053
  readonly connect: {
2015
2054
  readonly key: IntegrationConnectKeyOperation<E>;
2016
2055
  readonly external: IntegrationConnectExternalOperation<E>;
@@ -2026,6 +2065,24 @@ export interface IntegrationApi<E = never> {
2026
2065
  readonly status: IntegrationCommandStatusOperation<E>;
2027
2066
  readonly cancel: IntegrationCommandCancelOperation<E>;
2028
2067
  };
2068
+ /** @deprecated Use `client.experimental.integration.wellknown`. Removed in the next minor. */
2069
+ readonly wellknown: {
2070
+ /** @deprecated Use `client.experimental.integration.wellknown.add`. Removed in the next minor. */
2071
+ readonly add: ExperimentalIntegrationWellknownAddOperation<E>;
2072
+ };
2073
+ }
2074
+ export type ExperimentalIntegrationWellknownAddInput = {
2075
+ readonly location?: {
2076
+ readonly directory?: string | undefined;
2077
+ } | undefined;
2078
+ readonly url: string;
2079
+ };
2080
+ export type ExperimentalIntegrationWellknownAddOutput = void;
2081
+ export type ExperimentalIntegrationWellknownAddOperation<E = never> = (input: ExperimentalIntegrationWellknownAddInput) => Effect.Effect<ExperimentalIntegrationWellknownAddOutput, E>;
2082
+ export interface ExperimentalIntegrationApi<E = never> {
2083
+ readonly wellknown: {
2084
+ readonly add: ExperimentalIntegrationWellknownAddOperation<E>;
2085
+ };
2029
2086
  }
2030
2087
  export type McpListInput = {
2031
2088
  readonly location?: {
@@ -2037,72 +2094,87 @@ export type McpListOutput = {
2037
2094
  readonly data: ReadonlyArray<Mcp.Server>;
2038
2095
  };
2039
2096
  export type McpListOperation<E = never> = (input?: McpListInput) => Effect.Effect<McpListOutput, E>;
2040
- export type McpAddInput = {
2041
- readonly server: string;
2097
+ export type McpResourceCatalogInput = {
2042
2098
  readonly location?: {
2043
2099
  readonly directory?: string | undefined;
2044
2100
  } | undefined;
2045
- readonly config: Mcp.LocalConfig | Mcp.RemoteConfig;
2046
2101
  };
2047
- export type McpAddOutput = void;
2048
- export type McpAddOperation<E = never> = (input: McpAddInput) => Effect.Effect<McpAddOutput, E>;
2049
- export type McpRemoveInput = {
2102
+ export type McpResourceCatalogOutput = {
2103
+ readonly location: Location.PublicRef;
2104
+ readonly data: Mcp.ResourceCatalog;
2105
+ };
2106
+ export type McpResourceCatalogOperation<E = never> = (input?: McpResourceCatalogInput) => Effect.Effect<McpResourceCatalogOutput, E>;
2107
+ export interface McpApi<E = never> {
2108
+ readonly list: McpListOperation<E>;
2109
+ readonly resource: {
2110
+ readonly catalog: McpResourceCatalogOperation<E>;
2111
+ };
2112
+ /** @deprecated Use `client.experimental.mcp.add`. Removed in the next minor. */
2113
+ readonly add: ExperimentalMcpAddOperation<E>;
2114
+ /** @deprecated Use `client.experimental.mcp.remove`. Removed in the next minor. */
2115
+ readonly remove: ExperimentalMcpRemoveOperation<E>;
2116
+ /** @deprecated Use `client.experimental.mcp.connect`. Removed in the next minor. */
2117
+ readonly connect: ExperimentalMcpConnectOperation<E>;
2118
+ /** @deprecated Use `client.experimental.mcp.disconnect`. Removed in the next minor. */
2119
+ readonly disconnect: ExperimentalMcpDisconnectOperation<E>;
2120
+ /** @deprecated Use `client.experimental.mcp.client`. Removed in the next minor. */
2121
+ readonly client: {
2122
+ /** @deprecated Use `client.experimental.mcp.client.token`. Removed in the next minor. */
2123
+ readonly token: ExperimentalMcpClientTokenOperation<E>;
2124
+ };
2125
+ }
2126
+ export type ExperimentalMcpAddInput = {
2050
2127
  readonly server: string;
2051
2128
  readonly location?: {
2052
2129
  readonly directory?: string | undefined;
2053
2130
  } | undefined;
2131
+ readonly config: Mcp.LocalConfig | Mcp.RemoteConfig;
2054
2132
  };
2055
- export type McpRemoveOutput = void;
2056
- export type McpRemoveOperation<E = never> = (input: McpRemoveInput) => Effect.Effect<McpRemoveOutput, E>;
2057
- export type McpConnectInput = {
2133
+ export type ExperimentalMcpAddOutput = void;
2134
+ export type ExperimentalMcpAddOperation<E = never> = (input: ExperimentalMcpAddInput) => Effect.Effect<ExperimentalMcpAddOutput, E>;
2135
+ export type ExperimentalMcpRemoveInput = {
2058
2136
  readonly server: string;
2059
2137
  readonly location?: {
2060
2138
  readonly directory?: string | undefined;
2061
2139
  } | undefined;
2062
2140
  };
2063
- export type McpConnectOutput = void;
2064
- export type McpConnectOperation<E = never> = (input: McpConnectInput) => Effect.Effect<McpConnectOutput, E>;
2065
- export type McpDisconnectInput = {
2141
+ export type ExperimentalMcpRemoveOutput = void;
2142
+ export type ExperimentalMcpRemoveOperation<E = never> = (input: ExperimentalMcpRemoveInput) => Effect.Effect<ExperimentalMcpRemoveOutput, E>;
2143
+ export type ExperimentalMcpConnectInput = {
2066
2144
  readonly server: string;
2067
2145
  readonly location?: {
2068
2146
  readonly directory?: string | undefined;
2069
2147
  } | undefined;
2070
2148
  };
2071
- export type McpDisconnectOutput = void;
2072
- export type McpDisconnectOperation<E = never> = (input: McpDisconnectInput) => Effect.Effect<McpDisconnectOutput, E>;
2073
- export type McpResourceCatalogInput = {
2149
+ export type ExperimentalMcpConnectOutput = void;
2150
+ export type ExperimentalMcpConnectOperation<E = never> = (input: ExperimentalMcpConnectInput) => Effect.Effect<ExperimentalMcpConnectOutput, E>;
2151
+ export type ExperimentalMcpDisconnectInput = {
2152
+ readonly server: string;
2074
2153
  readonly location?: {
2075
2154
  readonly directory?: string | undefined;
2076
2155
  } | undefined;
2077
2156
  };
2078
- export type McpResourceCatalogOutput = {
2079
- readonly location: Location.PublicRef;
2080
- readonly data: Mcp.ResourceCatalog;
2081
- };
2082
- export type McpResourceCatalogOperation<E = never> = (input?: McpResourceCatalogInput) => Effect.Effect<McpResourceCatalogOutput, E>;
2083
- export type McpClientTokenInput = {
2157
+ export type ExperimentalMcpDisconnectOutput = void;
2158
+ export type ExperimentalMcpDisconnectOperation<E = never> = (input: ExperimentalMcpDisconnectInput) => Effect.Effect<ExperimentalMcpDisconnectOutput, E>;
2159
+ export type ExperimentalMcpClientTokenInput = {
2084
2160
  readonly location?: {
2085
2161
  readonly directory?: string | undefined;
2086
2162
  } | undefined;
2087
2163
  readonly name: string;
2088
2164
  readonly "x-opencode-ticket"?: string | undefined;
2089
2165
  };
2090
- export type McpClientTokenOutput = {
2166
+ export type ExperimentalMcpClientTokenOutput = {
2091
2167
  readonly location: Location.PublicRef;
2092
2168
  readonly data: PtyTicket.ConnectToken;
2093
2169
  };
2094
- export type McpClientTokenOperation<E = never> = (input: McpClientTokenInput) => Effect.Effect<McpClientTokenOutput, E>;
2095
- export interface McpApi<E = never> {
2096
- readonly list: McpListOperation<E>;
2097
- readonly add: McpAddOperation<E>;
2098
- readonly remove: McpRemoveOperation<E>;
2099
- readonly connect: McpConnectOperation<E>;
2100
- readonly disconnect: McpDisconnectOperation<E>;
2101
- readonly resource: {
2102
- readonly catalog: McpResourceCatalogOperation<E>;
2103
- };
2170
+ export type ExperimentalMcpClientTokenOperation<E = never> = (input: ExperimentalMcpClientTokenInput) => Effect.Effect<ExperimentalMcpClientTokenOutput, E>;
2171
+ export interface ExperimentalMcpApi<E = never> {
2172
+ readonly add: ExperimentalMcpAddOperation<E>;
2173
+ readonly remove: ExperimentalMcpRemoveOperation<E>;
2174
+ readonly connect: ExperimentalMcpConnectOperation<E>;
2175
+ readonly disconnect: ExperimentalMcpDisconnectOperation<E>;
2104
2176
  readonly client: {
2105
- readonly token: McpClientTokenOperation<E>;
2177
+ readonly token: ExperimentalMcpClientTokenOperation<E>;
2106
2178
  };
2107
2179
  }
2108
2180
  export type CredentialListOutput = ReadonlyArray<Credential.Entry>;
@@ -2274,6 +2346,30 @@ export type FileFindOperation<E = never> = (input: FileFindInput) => Effect.Effe
2274
2346
  export interface FileApi<E = never> {
2275
2347
  readonly list: FileListOperation<E>;
2276
2348
  readonly find: FileFindOperation<E>;
2349
+ /** @deprecated Use `client.experimental.file.watch`. Removed in the next minor. */
2350
+ readonly watch: ExperimentalFileWatchOperation<E>;
2351
+ /** @deprecated Use `client.experimental.file.unwatch`. Removed in the next minor. */
2352
+ readonly unwatch: ExperimentalFileUnwatchOperation<E>;
2353
+ }
2354
+ export type ExperimentalFileWatchInput = {
2355
+ readonly location?: {
2356
+ readonly directory?: string | undefined;
2357
+ } | undefined;
2358
+ readonly path: string;
2359
+ };
2360
+ export type ExperimentalFileWatchOutput = void;
2361
+ export type ExperimentalFileWatchOperation<E = never> = (input: ExperimentalFileWatchInput) => Effect.Effect<ExperimentalFileWatchOutput, E>;
2362
+ export type ExperimentalFileUnwatchInput = {
2363
+ readonly location?: {
2364
+ readonly directory?: string | undefined;
2365
+ } | undefined;
2366
+ readonly path: string;
2367
+ };
2368
+ export type ExperimentalFileUnwatchOutput = void;
2369
+ export type ExperimentalFileUnwatchOperation<E = never> = (input: ExperimentalFileUnwatchInput) => Effect.Effect<ExperimentalFileUnwatchOutput, E>;
2370
+ export interface ExperimentalFileApi<E = never> {
2371
+ readonly watch: ExperimentalFileWatchOperation<E>;
2372
+ readonly unwatch: ExperimentalFileUnwatchOperation<E>;
2277
2373
  }
2278
2374
  export type CommandListInput = {
2279
2375
  readonly location?: {
@@ -2316,8 +2412,11 @@ export type RpcCallOperation<E = never> = (input: RpcCallInput) => Effect.Effect
2316
2412
  export interface RpcApi<E = never> {
2317
2413
  readonly call: RpcCallOperation<E>;
2318
2414
  }
2415
+ export type EventSubscribeInput = {
2416
+ readonly types?: ReadonlyArray<"location.shutdown" | "models-dev.refreshed" | "credential.updated" | "credential.switched" | "integration.updated" | "provider.updated" | "model.updated" | "agent.updated" | "session.created" | "session.agent.selected" | "session.model.selected" | "session.moved" | "session.renamed" | "session.metadata.updated" | "session.permissions" | "session.viewed" | "session.archived" | "session.unarchived" | "session.usage.updated" | "session.deleted" | "session.forked" | "session.inbox.delivered" | "session.inbox.enqueued" | "session.inbox.cancelled" | "session.inbox.delivery.changed" | "session.execution.started" | "session.execution.succeeded" | "session.execution.failed" | "session.execution.interrupted" | "session.instructions.updated" | "session.synthetic" | "session.skill.activated" | "session.shell.started" | "session.shell.ended" | "session.step.started" | "session.step.streamed" | "session.step.ended" | "session.step.failed" | "session.text.started" | "session.text.delta" | "session.text.ended" | "session.reasoning.started" | "session.reasoning.delta" | "session.reasoning.ended" | "session.tool.input.started" | "session.tool.input.delta" | "session.tool.input.ended" | "session.tool.called" | "session.tool.progress" | "session.tool.success" | "session.tool.failed" | "session.retry.scheduled" | "session.compaction.started" | "session.compaction.delta" | "session.compaction.ended" | "session.compaction.failed" | "session.revert.staged" | "session.revert.cleared" | "session.revert.committed" | "filesystem.changed" | "reference.updated" | "permission.asked" | "permission.replied" | "plugin.updated" | "project.updated" | "worktree.updated" | "worktree.resolved" | "command.updated" | "config.updated" | "skill.updated" | "pty.created" | "pty.updated" | "pty.exited" | "pty.deleted" | "persistent-pty.added" | "persistent-pty.removed" | "shell.created" | "shell.exited" | "shell.deleted" | "form.created" | "form.replied" | "form.cancelled" | "websearch.updated" | "session.status" | "session.idle" | "tui.prompt.append" | "tui.command.execute" | "tui.toast.show" | "tui.session.select" | "installation.updated" | "installation.update-available" | "vcs.branch.updated" | "mcp.status.changed" | "mcp.resources.changed" | `${"rpc."}${string}`> | undefined;
2417
+ };
2319
2418
  export type EventSubscribeOutput = OpenCodeEvent;
2320
- export type EventSubscribeOperation<E = never> = () => Stream.Stream<EventSubscribeOutput, E>;
2419
+ export type EventSubscribeOperation<E = never> = (input?: EventSubscribeInput) => Stream.Stream<EventSubscribeOutput, E>;
2321
2420
  export interface EventApi<E = never> {
2322
2421
  readonly subscribe: EventSubscribeOperation<E>;
2323
2422
  }
@@ -2591,6 +2690,40 @@ export type ExperimentalPersistentPtyConnectTokenInput = {
2591
2690
  };
2592
2691
  export type ExperimentalPersistentPtyConnectTokenOutput = PtyTicket.ConnectToken;
2593
2692
  export type ExperimentalPersistentPtyConnectTokenOperation<E = never> = (input: ExperimentalPersistentPtyConnectTokenInput) => Effect.Effect<ExperimentalPersistentPtyConnectTokenOutput, E>;
2693
+ export type ExperimentalScheduleCreateInput = {
2694
+ readonly sessionID: Session.ID;
2695
+ readonly name?: string | undefined;
2696
+ readonly when: Schedule.WhenInput;
2697
+ readonly ends?: Schedule.Ends | undefined;
2698
+ readonly prompt: string;
2699
+ };
2700
+ export type ExperimentalScheduleCreateOutput = Schedule.Info;
2701
+ export type ExperimentalScheduleCreateOperation<E = never> = (input: ExperimentalScheduleCreateInput) => Effect.Effect<ExperimentalScheduleCreateOutput, E>;
2702
+ export type ExperimentalScheduleListInput = {
2703
+ readonly sessionID: Session.ID;
2704
+ };
2705
+ export type ExperimentalScheduleListOutput = ReadonlyArray<Schedule.Info>;
2706
+ export type ExperimentalScheduleListOperation<E = never> = (input: ExperimentalScheduleListInput) => Effect.Effect<ExperimentalScheduleListOutput, E>;
2707
+ export type ExperimentalScheduleGetInput = {
2708
+ readonly scheduleID: Schedule.ID;
2709
+ };
2710
+ export type ExperimentalScheduleGetOutput = Schedule.Info;
2711
+ export type ExperimentalScheduleGetOperation<E = never> = (input: ExperimentalScheduleGetInput) => Effect.Effect<ExperimentalScheduleGetOutput, E>;
2712
+ export type ExperimentalSchedulePauseInput = {
2713
+ readonly scheduleID: Schedule.ID;
2714
+ };
2715
+ export type ExperimentalSchedulePauseOutput = Schedule.Info;
2716
+ export type ExperimentalSchedulePauseOperation<E = never> = (input: ExperimentalSchedulePauseInput) => Effect.Effect<ExperimentalSchedulePauseOutput, E>;
2717
+ export type ExperimentalScheduleResumeInput = {
2718
+ readonly scheduleID: Schedule.ID;
2719
+ };
2720
+ export type ExperimentalScheduleResumeOutput = Schedule.Info;
2721
+ export type ExperimentalScheduleResumeOperation<E = never> = (input: ExperimentalScheduleResumeInput) => Effect.Effect<ExperimentalScheduleResumeOutput, E>;
2722
+ export type ExperimentalScheduleDeleteInput = {
2723
+ readonly scheduleID: Schedule.ID;
2724
+ };
2725
+ export type ExperimentalScheduleDeleteOutput = void;
2726
+ export type ExperimentalScheduleDeleteOperation<E = never> = (input: ExperimentalScheduleDeleteInput) => Effect.Effect<ExperimentalScheduleDeleteOutput, E>;
2594
2727
  export interface ExperimentalApi<E = never> {
2595
2728
  readonly persistentPty: {
2596
2729
  readonly read: ExperimentalPersistentPtyReadOperation<E>;
@@ -2604,6 +2737,14 @@ export interface ExperimentalApi<E = never> {
2604
2737
  readonly remove: ExperimentalPersistentPtyRemoveOperation<E>;
2605
2738
  readonly connectToken: ExperimentalPersistentPtyConnectTokenOperation<E>;
2606
2739
  };
2740
+ readonly schedule: {
2741
+ readonly create: ExperimentalScheduleCreateOperation<E>;
2742
+ readonly list: ExperimentalScheduleListOperation<E>;
2743
+ readonly get: ExperimentalScheduleGetOperation<E>;
2744
+ readonly pause: ExperimentalSchedulePauseOperation<E>;
2745
+ readonly resume: ExperimentalScheduleResumeOperation<E>;
2746
+ readonly delete: ExperimentalScheduleDeleteOperation<E>;
2747
+ };
2607
2748
  }
2608
2749
  export type ShellListInput = {
2609
2750
  readonly location?: {
@@ -2777,6 +2918,7 @@ export type VcsDiffInput = {
2777
2918
  readonly mode: Vcs.Mode;
2778
2919
  readonly base?: string | undefined;
2779
2920
  readonly context?: number | undefined;
2921
+ readonly untracked?: Vcs.Untracked | undefined;
2780
2922
  };
2781
2923
  export type VcsDiffOutput = {
2782
2924
  readonly location: Location.PublicRef;
@@ -2824,7 +2966,7 @@ export interface DebugApi<E = never> {
2824
2966
  readonly evict: DebugLocationEvictOperation<E>;
2825
2967
  };
2826
2968
  }
2827
- export type MigrationV1StatusOutput = {
2969
+ export type ExperimentalMigrationV1StatusOutput = {
2828
2970
  readonly status: "required" | "completed";
2829
2971
  } | {
2830
2972
  readonly status: "running";
@@ -2837,10 +2979,10 @@ export type MigrationV1StatusOutput = {
2837
2979
  readonly status: "error";
2838
2980
  readonly error: string;
2839
2981
  };
2840
- export type MigrationV1StatusOperation<E = never> = () => Effect.Effect<MigrationV1StatusOutput, E>;
2841
- export interface MigrationApi<E = never> {
2982
+ export type ExperimentalMigrationV1StatusOperation<E = never> = () => Effect.Effect<ExperimentalMigrationV1StatusOutput, E>;
2983
+ export interface ExperimentalMigrationApi<E = never> {
2842
2984
  readonly v1: {
2843
- readonly status: MigrationV1StatusOperation<E>;
2985
+ readonly status: ExperimentalMigrationV1StatusOperation<E>;
2844
2986
  };
2845
2987
  }
2846
2988
  export type WebsearchProvidersInput = {
@@ -2869,6 +3011,19 @@ export interface WebsearchApi<E = never> {
2869
3011
  readonly providers: WebsearchProvidersOperation<E>;
2870
3012
  readonly query: WebsearchQueryOperation<E>;
2871
3013
  }
3014
+ export type ExperimentalUsageLimitsInput = {
3015
+ readonly location?: {
3016
+ readonly directory?: string | undefined;
3017
+ } | undefined;
3018
+ };
3019
+ export type ExperimentalUsageLimitsOutput = {
3020
+ readonly location: Location.PublicRef;
3021
+ readonly data: UsageLimits.Info | null;
3022
+ };
3023
+ export type ExperimentalUsageLimitsOperation<E = never> = (input?: ExperimentalUsageLimitsInput) => Effect.Effect<ExperimentalUsageLimitsOutput, E>;
3024
+ export interface ExperimentalUsageApi<E = never> {
3025
+ readonly limits: ExperimentalUsageLimitsOperation<E>;
3026
+ }
2872
3027
  export type ConfigGetInput = {
2873
3028
  readonly location?: {
2874
3029
  readonly directory?: string | undefined;
@@ -2882,26 +3037,193 @@ export type ConfigShellsOutput = ReadonlyArray<{
2882
3037
  readonly acceptable: boolean;
2883
3038
  }>;
2884
3039
  export type ConfigShellsOperation<E = never> = () => Effect.Effect<ConfigShellsOutput, E>;
2885
- export type ConfigUpdateInput = {
2886
- readonly shell: string | null;
2887
- };
2888
- export type ConfigUpdateOutput = void;
2889
- export type ConfigUpdateOperation<E = never> = (input: ConfigUpdateInput) => Effect.Effect<ConfigUpdateOutput, E>;
2890
3040
  export interface ConfigApi<E = never> {
2891
3041
  readonly get: ConfigGetOperation<E>;
2892
3042
  readonly shells: ConfigShellsOperation<E>;
2893
- readonly update: ConfigUpdateOperation<E>;
3043
+ /** @deprecated Use `client.experimental.config.update`. Removed in the next minor. */
3044
+ readonly update: ExperimentalConfigUpdateOperation<E>;
3045
+ }
3046
+ export type ExperimentalConfigUpdateInput = {
3047
+ readonly shell: string | null;
3048
+ };
3049
+ export type ExperimentalConfigUpdateOutput = void;
3050
+ export type ExperimentalConfigUpdateOperation<E = never> = (input: ExperimentalConfigUpdateInput) => Effect.Effect<ExperimentalConfigUpdateOutput, E>;
3051
+ export interface ExperimentalConfigApi<E = never> {
3052
+ readonly update: ExperimentalConfigUpdateOperation<E>;
2894
3053
  }
3054
+ /** @deprecated Use `ExperimentalSessionStatsInput`. Removed in the next minor. */
3055
+ export type SessionStatsInput = ExperimentalSessionStatsInput;
3056
+ /** @deprecated Use `ExperimentalSessionStatsOutput`. Removed in the next minor. */
3057
+ export type SessionStatsOutput = ExperimentalSessionStatsOutput;
3058
+ /** @deprecated Use `ExperimentalSessionStatsOperation`. Removed in the next minor. */
3059
+ export type SessionStatsOperation<E = never> = ExperimentalSessionStatsOperation<E>;
3060
+ /** @deprecated Use `ExperimentalSessionImportInput`. Removed in the next minor. */
3061
+ export type SessionImportInput = ExperimentalSessionImportInput;
3062
+ /** @deprecated Use `ExperimentalSessionImportOutput`. Removed in the next minor. */
3063
+ export type SessionImportOutput = ExperimentalSessionImportOutput;
3064
+ /** @deprecated Use `ExperimentalSessionImportOperation`. Removed in the next minor. */
3065
+ export type SessionImportOperation<E = never> = ExperimentalSessionImportOperation<E>;
3066
+ /** @deprecated Use `ExperimentalSessionExportInput`. Removed in the next minor. */
3067
+ export type SessionExportInput = ExperimentalSessionExportInput;
3068
+ /** @deprecated Use `ExperimentalSessionExportOutput`. Removed in the next minor. */
3069
+ export type SessionExportOutput = ExperimentalSessionExportOutput;
3070
+ /** @deprecated Use `ExperimentalSessionExportOperation`. Removed in the next minor. */
3071
+ export type SessionExportOperation<E = never> = ExperimentalSessionExportOperation<E>;
3072
+ /** @deprecated Use `ExperimentalSessionSkillInput`. Removed in the next minor. */
3073
+ export type SessionSkillInput = ExperimentalSessionSkillInput;
3074
+ /** @deprecated Use `ExperimentalSessionSkillOutput`. Removed in the next minor. */
3075
+ export type SessionSkillOutput = ExperimentalSessionSkillOutput;
3076
+ /** @deprecated Use `ExperimentalSessionSkillOperation`. Removed in the next minor. */
3077
+ export type SessionSkillOperation<E = never> = ExperimentalSessionSkillOperation<E>;
3078
+ /** @deprecated Use `ExperimentalSessionWaitInput`. Removed in the next minor. */
3079
+ export type SessionWaitInput = ExperimentalSessionWaitInput;
3080
+ /** @deprecated Use `ExperimentalSessionWaitOutput`. Removed in the next minor. */
3081
+ export type SessionWaitOutput = ExperimentalSessionWaitOutput;
3082
+ /** @deprecated Use `ExperimentalSessionWaitOperation`. Removed in the next minor. */
3083
+ export type SessionWaitOperation<E = never> = ExperimentalSessionWaitOperation<E>;
3084
+ /** @deprecated Use `ExperimentalSessionInstructionsEntryListInput`. Removed in the next minor. */
3085
+ export type SessionInstructionsEntryListInput = ExperimentalSessionInstructionsEntryListInput;
3086
+ /** @deprecated Use `ExperimentalSessionInstructionsEntryListOutput`. Removed in the next minor. */
3087
+ export type SessionInstructionsEntryListOutput = ExperimentalSessionInstructionsEntryListOutput;
3088
+ /** @deprecated Use `ExperimentalSessionInstructionsEntryListOperation`. Removed in the next minor. */
3089
+ export type SessionInstructionsEntryListOperation<E = never> = ExperimentalSessionInstructionsEntryListOperation<E>;
3090
+ /** @deprecated Use `ExperimentalSessionInstructionsEntryPutInput`. Removed in the next minor. */
3091
+ export type SessionInstructionsEntryPutInput = ExperimentalSessionInstructionsEntryPutInput;
3092
+ /** @deprecated Use `ExperimentalSessionInstructionsEntryPutOutput`. Removed in the next minor. */
3093
+ export type SessionInstructionsEntryPutOutput = ExperimentalSessionInstructionsEntryPutOutput;
3094
+ /** @deprecated Use `ExperimentalSessionInstructionsEntryPutOperation`. Removed in the next minor. */
3095
+ export type SessionInstructionsEntryPutOperation<E = never> = ExperimentalSessionInstructionsEntryPutOperation<E>;
3096
+ /** @deprecated Use `ExperimentalSessionInstructionsEntryRemoveInput`. Removed in the next minor. */
3097
+ export type SessionInstructionsEntryRemoveInput = ExperimentalSessionInstructionsEntryRemoveInput;
3098
+ /** @deprecated Use `ExperimentalSessionInstructionsEntryRemoveOutput`. Removed in the next minor. */
3099
+ export type SessionInstructionsEntryRemoveOutput = ExperimentalSessionInstructionsEntryRemoveOutput;
3100
+ /** @deprecated Use `ExperimentalSessionInstructionsEntryRemoveOperation`. Removed in the next minor. */
3101
+ export type SessionInstructionsEntryRemoveOperation<E = never> = ExperimentalSessionInstructionsEntryRemoveOperation<E>;
3102
+ /** @deprecated Use `ExperimentalSessionLogInput`. Removed in the next minor. */
3103
+ export type SessionLogInput = ExperimentalSessionLogInput;
3104
+ /** @deprecated Use `ExperimentalSessionLogOutput`. Removed in the next minor. */
3105
+ export type SessionLogOutput = ExperimentalSessionLogOutput;
3106
+ /** @deprecated Use `ExperimentalSessionLogOperation`. Removed in the next minor. */
3107
+ export type SessionLogOperation<E = never> = ExperimentalSessionLogOperation<E>;
3108
+ /** @deprecated Use `ExperimentalGenerateTextInput`. Removed in the next minor. */
3109
+ export type GenerateTextInput = ExperimentalGenerateTextInput;
3110
+ /** @deprecated Use `ExperimentalGenerateTextOutput`. Removed in the next minor. */
3111
+ export type GenerateTextOutput = ExperimentalGenerateTextOutput;
3112
+ /** @deprecated Use `ExperimentalGenerateTextOperation`. Removed in the next minor. */
3113
+ export type GenerateTextOperation<E = never> = ExperimentalGenerateTextOperation<E>;
3114
+ /** @deprecated Use `ExperimentalGenerateImageInput`. Removed in the next minor. */
3115
+ export type GenerateImageInput = ExperimentalGenerateImageInput;
3116
+ /** @deprecated Use `ExperimentalGenerateImageOutput`. Removed in the next minor. */
3117
+ export type GenerateImageOutput = ExperimentalGenerateImageOutput;
3118
+ /** @deprecated Use `ExperimentalGenerateImageOperation`. Removed in the next minor. */
3119
+ export type GenerateImageOperation<E = never> = ExperimentalGenerateImageOperation<E>;
3120
+ /** @deprecated Use `ExperimentalGenerateDecisionsInput`. Removed in the next minor. */
3121
+ export type GenerateDecisionsInput = ExperimentalGenerateDecisionsInput;
3122
+ /** @deprecated Use `ExperimentalGenerateDecisionsOutput`. Removed in the next minor. */
3123
+ export type GenerateDecisionsOutput = ExperimentalGenerateDecisionsOutput;
3124
+ /** @deprecated Use `ExperimentalGenerateDecisionsOperation`. Removed in the next minor. */
3125
+ export type GenerateDecisionsOperation<E = never> = ExperimentalGenerateDecisionsOperation<E>;
3126
+ /** @deprecated Use `ExperimentalVoiceModelsOutput`. Removed in the next minor. */
3127
+ export type VoiceModelsOutput = ExperimentalVoiceModelsOutput;
3128
+ /** @deprecated Use `ExperimentalVoiceModelsOperation`. Removed in the next minor. */
3129
+ export type VoiceModelsOperation<E = never> = ExperimentalVoiceModelsOperation<E>;
3130
+ /** @deprecated Use `ExperimentalVoiceSessionInput`. Removed in the next minor. */
3131
+ export type VoiceSessionInput = ExperimentalVoiceSessionInput;
3132
+ /** @deprecated Use `ExperimentalVoiceSessionOutput`. Removed in the next minor. */
3133
+ export type VoiceSessionOutput = ExperimentalVoiceSessionOutput;
3134
+ /** @deprecated Use `ExperimentalVoiceSessionOperation`. Removed in the next minor. */
3135
+ export type VoiceSessionOperation<E = never> = ExperimentalVoiceSessionOperation<E>;
3136
+ /** @deprecated Use `ExperimentalIntegrationWellknownAddInput`. Removed in the next minor. */
3137
+ export type IntegrationWellknownAddInput = ExperimentalIntegrationWellknownAddInput;
3138
+ /** @deprecated Use `ExperimentalIntegrationWellknownAddOutput`. Removed in the next minor. */
3139
+ export type IntegrationWellknownAddOutput = ExperimentalIntegrationWellknownAddOutput;
3140
+ /** @deprecated Use `ExperimentalIntegrationWellknownAddOperation`. Removed in the next minor. */
3141
+ export type IntegrationWellknownAddOperation<E = never> = ExperimentalIntegrationWellknownAddOperation<E>;
3142
+ /** @deprecated Use `ExperimentalMcpAddInput`. Removed in the next minor. */
3143
+ export type McpAddInput = ExperimentalMcpAddInput;
3144
+ /** @deprecated Use `ExperimentalMcpAddOutput`. Removed in the next minor. */
3145
+ export type McpAddOutput = ExperimentalMcpAddOutput;
3146
+ /** @deprecated Use `ExperimentalMcpAddOperation`. Removed in the next minor. */
3147
+ export type McpAddOperation<E = never> = ExperimentalMcpAddOperation<E>;
3148
+ /** @deprecated Use `ExperimentalMcpRemoveInput`. Removed in the next minor. */
3149
+ export type McpRemoveInput = ExperimentalMcpRemoveInput;
3150
+ /** @deprecated Use `ExperimentalMcpRemoveOutput`. Removed in the next minor. */
3151
+ export type McpRemoveOutput = ExperimentalMcpRemoveOutput;
3152
+ /** @deprecated Use `ExperimentalMcpRemoveOperation`. Removed in the next minor. */
3153
+ export type McpRemoveOperation<E = never> = ExperimentalMcpRemoveOperation<E>;
3154
+ /** @deprecated Use `ExperimentalMcpConnectInput`. Removed in the next minor. */
3155
+ export type McpConnectInput = ExperimentalMcpConnectInput;
3156
+ /** @deprecated Use `ExperimentalMcpConnectOutput`. Removed in the next minor. */
3157
+ export type McpConnectOutput = ExperimentalMcpConnectOutput;
3158
+ /** @deprecated Use `ExperimentalMcpConnectOperation`. Removed in the next minor. */
3159
+ export type McpConnectOperation<E = never> = ExperimentalMcpConnectOperation<E>;
3160
+ /** @deprecated Use `ExperimentalMcpDisconnectInput`. Removed in the next minor. */
3161
+ export type McpDisconnectInput = ExperimentalMcpDisconnectInput;
3162
+ /** @deprecated Use `ExperimentalMcpDisconnectOutput`. Removed in the next minor. */
3163
+ export type McpDisconnectOutput = ExperimentalMcpDisconnectOutput;
3164
+ /** @deprecated Use `ExperimentalMcpDisconnectOperation`. Removed in the next minor. */
3165
+ export type McpDisconnectOperation<E = never> = ExperimentalMcpDisconnectOperation<E>;
3166
+ /** @deprecated Use `ExperimentalMcpClientTokenInput`. Removed in the next minor. */
3167
+ export type McpClientTokenInput = ExperimentalMcpClientTokenInput;
3168
+ /** @deprecated Use `ExperimentalMcpClientTokenOutput`. Removed in the next minor. */
3169
+ export type McpClientTokenOutput = ExperimentalMcpClientTokenOutput;
3170
+ /** @deprecated Use `ExperimentalMcpClientTokenOperation`. Removed in the next minor. */
3171
+ export type McpClientTokenOperation<E = never> = ExperimentalMcpClientTokenOperation<E>;
3172
+ /** @deprecated Use `ExperimentalFileWatchInput`. Removed in the next minor. */
3173
+ export type FileWatchInput = ExperimentalFileWatchInput;
3174
+ /** @deprecated Use `ExperimentalFileWatchOutput`. Removed in the next minor. */
3175
+ export type FileWatchOutput = ExperimentalFileWatchOutput;
3176
+ /** @deprecated Use `ExperimentalFileWatchOperation`. Removed in the next minor. */
3177
+ export type FileWatchOperation<E = never> = ExperimentalFileWatchOperation<E>;
3178
+ /** @deprecated Use `ExperimentalFileUnwatchInput`. Removed in the next minor. */
3179
+ export type FileUnwatchInput = ExperimentalFileUnwatchInput;
3180
+ /** @deprecated Use `ExperimentalFileUnwatchOutput`. Removed in the next minor. */
3181
+ export type FileUnwatchOutput = ExperimentalFileUnwatchOutput;
3182
+ /** @deprecated Use `ExperimentalFileUnwatchOperation`. Removed in the next minor. */
3183
+ export type FileUnwatchOperation<E = never> = ExperimentalFileUnwatchOperation<E>;
3184
+ /** @deprecated Use `ExperimentalMigrationV1StatusOutput`. Removed in the next minor. */
3185
+ export type MigrationV1StatusOutput = ExperimentalMigrationV1StatusOutput;
3186
+ /** @deprecated Use `ExperimentalMigrationV1StatusOperation`. Removed in the next minor. */
3187
+ export type MigrationV1StatusOperation<E = never> = ExperimentalMigrationV1StatusOperation<E>;
3188
+ /** @deprecated Use `ExperimentalUsageLimitsInput`. Removed in the next minor. */
3189
+ export type UsageLimitsInput = ExperimentalUsageLimitsInput;
3190
+ /** @deprecated Use `ExperimentalUsageLimitsOutput`. Removed in the next minor. */
3191
+ export type UsageLimitsOutput = ExperimentalUsageLimitsOutput;
3192
+ /** @deprecated Use `ExperimentalUsageLimitsOperation`. Removed in the next minor. */
3193
+ export type UsageLimitsOperation<E = never> = ExperimentalUsageLimitsOperation<E>;
3194
+ /** @deprecated Use `ExperimentalConfigUpdateInput`. Removed in the next minor. */
3195
+ export type ConfigUpdateInput = ExperimentalConfigUpdateInput;
3196
+ /** @deprecated Use `ExperimentalConfigUpdateOutput`. Removed in the next minor. */
3197
+ export type ConfigUpdateOutput = ExperimentalConfigUpdateOutput;
3198
+ /** @deprecated Use `ExperimentalConfigUpdateOperation`. Removed in the next minor. */
3199
+ export type ConfigUpdateOperation<E = never> = ExperimentalConfigUpdateOperation<E>;
3200
+ /** @deprecated Use `ExperimentalGenerateApi`. Removed in the next minor. */
3201
+ export type GenerateApi<E = never> = ExperimentalGenerateApi<E>;
3202
+ /** @deprecated Use `ExperimentalVoiceApi`. Removed in the next minor. */
3203
+ export type VoiceApi<E = never> = ExperimentalVoiceApi<E>;
3204
+ /** @deprecated Use `ExperimentalMigrationApi`. Removed in the next minor. */
3205
+ export type MigrationApi<E = never> = ExperimentalMigrationApi<E>;
3206
+ /** @deprecated Use `ExperimentalUsageApi`. Removed in the next minor. */
3207
+ export type UsageApi<E = never> = ExperimentalUsageApi<E>;
2895
3208
  export interface AppApi<E = never> {
2896
3209
  readonly server: ServerApi<E>;
2897
3210
  readonly location: LocationApi<E>;
2898
3211
  readonly agent: AgentApi<E>;
2899
3212
  readonly plugin: PluginApi<E>;
2900
3213
  readonly session: SessionApi<E>;
3214
+ readonly experimental: ExperimentalApi<E> & {
3215
+ readonly session: ExperimentalSessionApi<E>;
3216
+ readonly generate: ExperimentalGenerateApi<E>;
3217
+ readonly voice: ExperimentalVoiceApi<E>;
3218
+ readonly integration: ExperimentalIntegrationApi<E>;
3219
+ readonly mcp: ExperimentalMcpApi<E>;
3220
+ readonly file: ExperimentalFileApi<E>;
3221
+ readonly migration: ExperimentalMigrationApi<E>;
3222
+ readonly usage: ExperimentalUsageApi<E>;
3223
+ readonly config: ExperimentalConfigApi<E>;
3224
+ };
2901
3225
  readonly message: MessageApi<E>;
2902
3226
  readonly model: ModelApi<E>;
2903
- readonly generate: GenerateApi<E>;
2904
- readonly voice: VoiceApi<E>;
2905
3227
  readonly provider: ProviderApi<E>;
2906
3228
  readonly integration: IntegrationApi<E>;
2907
3229
  readonly mcp: McpApi<E>;
@@ -2915,13 +3237,40 @@ export interface AppApi<E = never> {
2915
3237
  readonly rpc: RpcApi<E>;
2916
3238
  readonly event: EventApi<E>;
2917
3239
  readonly pty: PtyApi<E>;
2918
- readonly experimental: ExperimentalApi<E>;
2919
3240
  readonly shell: ShellApi<E>;
2920
3241
  readonly reference: ReferenceApi<E>;
2921
3242
  readonly worktree: WorktreeApi<E>;
2922
3243
  readonly vcs: VcsApi<E>;
2923
3244
  readonly debug: DebugApi<E>;
2924
- readonly migration: MigrationApi<E>;
2925
3245
  readonly websearch: WebsearchApi<E>;
2926
3246
  readonly config: ConfigApi<E>;
3247
+ /** @deprecated Use `client.experimental.generate`. Removed in the next minor. */
3248
+ readonly generate: {
3249
+ /** @deprecated Use `client.experimental.generate.text`. Removed in the next minor. */
3250
+ readonly text: ExperimentalGenerateTextOperation<E>;
3251
+ /** @deprecated Use `client.experimental.generate.image`. Removed in the next minor. */
3252
+ readonly image: ExperimentalGenerateImageOperation<E>;
3253
+ /** @deprecated Use `client.experimental.generate.decisions`. Removed in the next minor. */
3254
+ readonly decisions: ExperimentalGenerateDecisionsOperation<E>;
3255
+ };
3256
+ /** @deprecated Use `client.experimental.voice`. Removed in the next minor. */
3257
+ readonly voice: {
3258
+ /** @deprecated Use `client.experimental.voice.models`. Removed in the next minor. */
3259
+ readonly models: ExperimentalVoiceModelsOperation<E>;
3260
+ /** @deprecated Use `client.experimental.voice.session`. Removed in the next minor. */
3261
+ readonly session: ExperimentalVoiceSessionOperation<E>;
3262
+ };
3263
+ /** @deprecated Use `client.experimental.migration`. Removed in the next minor. */
3264
+ readonly migration: {
3265
+ /** @deprecated Use `client.experimental.migration.v1`. Removed in the next minor. */
3266
+ readonly v1: {
3267
+ /** @deprecated Use `client.experimental.migration.v1.status`. Removed in the next minor. */
3268
+ readonly status: ExperimentalMigrationV1StatusOperation<E>;
3269
+ };
3270
+ };
3271
+ /** @deprecated Use `client.experimental.usage`. Removed in the next minor. */
3272
+ readonly usage: {
3273
+ /** @deprecated Use `client.experimental.usage.limits`. Removed in the next minor. */
3274
+ readonly limits: ExperimentalUsageLimitsOperation<E>;
3275
+ };
2927
3276
  }