@opencode/client 2.0.2 → 2.0.4

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.
@@ -2,7 +2,6 @@ import type { Effect, Stream } from "effect";
2
2
  import type { Location } from "@opencode/schema/location";
3
3
  import type { Agent } from "@opencode/schema/agent";
4
4
  import type { Plugin } from "@opencode/schema/plugin";
5
- import type { Workspace } from "@opencode/schema/workspace";
6
5
  import type { Session } from "@opencode/schema/session";
7
6
  import type { AbsolutePath } from "@opencode/schema/schema";
8
7
  import type { Project } from "@opencode/schema/project";
@@ -16,14 +15,15 @@ import type { SessionInbox } from "@opencode/schema/session-inbox";
16
15
  import type { PromptInput } from "@opencode/schema/prompt-input";
17
16
  import type { AgentAttachment } from "@opencode/schema/prompt";
18
17
  import type { Skill } from "@opencode/schema/skill";
19
- import type { Event } from "@opencode/schema/event";
18
+ import type { FileDiff } from "@opencode/schema/file-diff";
20
19
  import type { InstructionEntry } from "@opencode/schema/instruction-entry";
21
20
  import type { Schema } from "effect";
21
+ import type { Event } from "@opencode/schema/event";
22
22
  import type { EventLog } from "@opencode/schema/event-log";
23
23
  import type { Shell } from "@opencode/schema/shell";
24
24
  import type { Provider } from "@opencode/schema/provider";
25
- import type { Integration } from "@opencode/schema/integration";
26
25
  import type { Form } from "@opencode/schema/form";
26
+ import type { Integration } from "@opencode/schema/integration";
27
27
  import type { Mcp } from "@opencode/schema/mcp";
28
28
  import type { Credential } from "@opencode/schema/credential";
29
29
  import type { PermissionSaved } from "@opencode/schema/permission-saved";
@@ -35,32 +35,23 @@ import type { PtyTicket } from "@opencode/schema/pty-ticket";
35
35
  import type { Reference } from "@opencode/schema/reference";
36
36
  import type { Worktree } from "@opencode/schema/worktree";
37
37
  import type { Vcs } from "@opencode/schema/vcs";
38
- import type { FileDiff } from "@opencode/schema/file-diff";
39
38
  import type { WebSearch } from "@opencode/schema/websearch";
40
39
  import type { Config } from "@opencode/schema/config";
41
- export type HealthGetOutput = {
42
- readonly healthy: true;
40
+ export type ServerStatusOutput = {
43
41
  readonly version: string;
44
42
  readonly pid: number;
45
- };
46
- export type HealthGetOperation<E = never> = () => Effect.Effect<HealthGetOutput, E>;
47
- export interface HealthApi<E = never> {
48
- readonly get: HealthGetOperation<E>;
49
- }
50
- export type ServerGetOutput = {
51
43
  readonly urls: ReadonlyArray<string>;
52
44
  };
53
- export type ServerGetOperation<E = never> = () => Effect.Effect<ServerGetOutput, E>;
45
+ export type ServerStatusOperation<E = never> = () => Effect.Effect<ServerStatusOutput, E>;
54
46
  export interface ServerApi<E = never> {
55
- readonly get: ServerGetOperation<E>;
47
+ readonly status: ServerStatusOperation<E>;
56
48
  }
57
49
  export type LocationGetInput = {
58
50
  readonly location?: {
59
51
  readonly directory?: string | undefined;
60
- readonly workspace?: string | undefined;
61
52
  } | undefined;
62
53
  };
63
- export type LocationGetOutput = Location.Info;
54
+ export type LocationGetOutput = Location.PublicInfo;
64
55
  export type LocationGetOperation<E = never> = (input?: LocationGetInput) => Effect.Effect<LocationGetOutput, E>;
65
56
  export interface LocationApi<E = never> {
66
57
  readonly get: LocationGetOperation<E>;
@@ -68,11 +59,10 @@ export interface LocationApi<E = never> {
68
59
  export type AgentListInput = {
69
60
  readonly location?: {
70
61
  readonly directory?: string | undefined;
71
- readonly workspace?: string | undefined;
72
62
  } | undefined;
73
63
  };
74
64
  export type AgentListOutput = {
75
- readonly location: Location.Info;
65
+ readonly location: Location.PublicRef;
76
66
  readonly data: ReadonlyArray<Agent.Info>;
77
67
  };
78
68
  export type AgentListOperation<E = never> = (input?: AgentListInput) => Effect.Effect<AgentListOutput, E>;
@@ -80,11 +70,10 @@ export type AgentGetInput = {
80
70
  readonly agentID: Agent.ID;
81
71
  readonly location?: {
82
72
  readonly directory?: string | undefined;
83
- readonly workspace?: string | undefined;
84
73
  } | undefined;
85
74
  };
86
75
  export type AgentGetOutput = {
87
- readonly location: Location.Info;
76
+ readonly location: Location.PublicRef;
88
77
  readonly data: Agent.Info;
89
78
  };
90
79
  export type AgentGetOperation<E = never> = (input: AgentGetInput) => Effect.Effect<AgentGetOutput, E>;
@@ -95,38 +84,27 @@ export interface AgentApi<E = never> {
95
84
  export type PluginListInput = {
96
85
  readonly location?: {
97
86
  readonly directory?: string | undefined;
98
- readonly workspace?: string | undefined;
99
87
  } | undefined;
100
88
  };
101
89
  export type PluginListOutput = {
102
- readonly location: Location.Info;
90
+ readonly location: Location.PublicRef;
103
91
  readonly data: ReadonlyArray<Plugin.Info>;
104
92
  };
105
93
  export type PluginListOperation<E = never> = (input?: PluginListInput) => Effect.Effect<PluginListOutput, E>;
106
- export type PluginAwaitActivationInput = {
107
- readonly location?: {
108
- readonly directory?: string | undefined;
109
- readonly workspace?: string | undefined;
110
- } | undefined;
111
- };
112
- export type PluginAwaitActivationOutput = void;
113
- export type PluginAwaitActivationOperation<E = never> = (input?: PluginAwaitActivationInput) => Effect.Effect<PluginAwaitActivationOutput, E>;
114
94
  export type PluginCheckInput = {
115
95
  readonly location?: {
116
96
  readonly directory?: string | undefined;
117
- readonly workspace?: string | undefined;
118
97
  } | undefined;
119
98
  readonly target?: string | undefined;
120
99
  };
121
100
  export type PluginCheckOutput = {
122
- readonly location: Location.Info;
101
+ readonly location: Location.PublicRef;
123
102
  readonly data: ReadonlyArray<Plugin.Info>;
124
103
  };
125
104
  export type PluginCheckOperation<E = never> = (input?: PluginCheckInput) => Effect.Effect<PluginCheckOutput, E>;
126
105
  export type PluginUpdateInput = {
127
106
  readonly location?: {
128
107
  readonly directory?: string | undefined;
129
- readonly workspace?: string | undefined;
130
108
  } | undefined;
131
109
  readonly targets: ReadonlyArray<string>;
132
110
  };
@@ -134,12 +112,10 @@ export type PluginUpdateOutput = void;
134
112
  export type PluginUpdateOperation<E = never> = (input: PluginUpdateInput) => Effect.Effect<PluginUpdateOutput, E>;
135
113
  export interface PluginApi<E = never> {
136
114
  readonly list: PluginListOperation<E>;
137
- readonly awaitActivation: PluginAwaitActivationOperation<E>;
138
115
  readonly check: PluginCheckOperation<E>;
139
116
  readonly update: PluginUpdateOperation<E>;
140
117
  }
141
118
  export type SessionListInput = {
142
- readonly workspace?: Workspace.ID | undefined;
143
119
  readonly limit?: number | undefined;
144
120
  readonly order?: "asc" | "desc" | undefined;
145
121
  readonly search?: string | undefined;
@@ -237,7 +213,7 @@ export type SessionCreateInput = {
237
213
  readonly title?: string | undefined;
238
214
  readonly agent?: Agent.ID | undefined;
239
215
  readonly model?: Model.Ref | undefined;
240
- readonly location?: Location.Ref | undefined;
216
+ readonly location?: Location.PublicRef | undefined;
241
217
  readonly metadata?: Session.Metadata | undefined;
242
218
  readonly permissions?: Permission.Ruleset | undefined;
243
219
  };
@@ -246,7 +222,7 @@ export type SessionCreateOperation<E = never> = (input?: SessionCreateInput) =>
246
222
  export type SessionImportInput = {
247
223
  readonly info: Session.Info;
248
224
  readonly messages: ReadonlyArray<SessionMessage.Info>;
249
- readonly location?: Location.Ref | undefined;
225
+ readonly location?: Location.PublicRef | undefined;
250
226
  };
251
227
  export type SessionImportOutput = Session.Info;
252
228
  export type SessionImportOperation<E = never> = (input: SessionImportInput) => Effect.Effect<SessionImportOutput, E>;
@@ -277,7 +253,7 @@ export type SessionRemoveOutput = void;
277
253
  export type SessionRemoveOperation<E = never> = (input: SessionRemoveInput) => Effect.Effect<SessionRemoveOutput, E>;
278
254
  export type SessionForkInput = {
279
255
  readonly sessionID: Session.ID;
280
- readonly boundary: Session.ForkRequestBoundary;
256
+ readonly before?: SessionMessage.ID | undefined;
281
257
  };
282
258
  export type SessionForkOutput = Session.Info;
283
259
  export type SessionForkOperation<E = never> = (input: SessionForkInput) => Effect.Effect<SessionForkOutput, E>;
@@ -293,16 +269,16 @@ export type SessionSwitchModelInput = {
293
269
  };
294
270
  export type SessionSwitchModelOutput = void;
295
271
  export type SessionSwitchModelOperation<E = never> = (input: SessionSwitchModelInput) => Effect.Effect<SessionSwitchModelOutput, E>;
296
- export type SessionRenameInput = {
272
+ export type SessionUpdateInput = {
297
273
  readonly sessionID: Session.ID;
298
- readonly title: string;
274
+ readonly title?: string | undefined;
275
+ readonly permissions?: Permission.Ruleset | undefined;
299
276
  };
300
- export type SessionRenameOutput = void;
301
- export type SessionRenameOperation<E = never> = (input: SessionRenameInput) => Effect.Effect<SessionRenameOutput, E>;
277
+ export type SessionUpdateOutput = void;
278
+ export type SessionUpdateOperation<E = never> = (input: SessionUpdateInput) => Effect.Effect<SessionUpdateOutput, E>;
302
279
  export type SessionMoveInput = {
303
280
  readonly sessionID: Session.ID;
304
281
  readonly directory: AbsolutePath;
305
- readonly workspaceID?: Workspace.ID | undefined;
306
282
  readonly delivery?: SessionInbox.Delivery | undefined;
307
283
  };
308
284
  export type SessionMoveOutput = void;
@@ -324,7 +300,7 @@ export type SessionPromptOutput = SessionInbox.User;
324
300
  export type SessionPromptOperation<E = never> = (input: SessionPromptInput) => Effect.Effect<SessionPromptOutput, E>;
325
301
  export type SessionCommandInput = {
326
302
  readonly sessionID: Session.ID;
327
- readonly command: string;
303
+ readonly name: string;
328
304
  readonly text: string;
329
305
  readonly files?: ReadonlyArray<PromptInput.FileAttachment> | undefined;
330
306
  readonly agents?: ReadonlyArray<AgentAttachment> | undefined;
@@ -335,8 +311,7 @@ export type SessionCommandOutput = void;
335
311
  export type SessionCommandOperation<E = never> = (input: SessionCommandInput) => Effect.Effect<SessionCommandOutput, E>;
336
312
  export type SessionSkillInput = {
337
313
  readonly sessionID: Session.ID;
338
- readonly id?: SessionMessage.ID | undefined;
339
- readonly skill: Skill.ID;
314
+ readonly id: Skill.ID;
340
315
  readonly resume?: boolean | undefined;
341
316
  };
342
317
  export type SessionSkillOutput = void;
@@ -356,7 +331,7 @@ export type SessionSyntheticOutput = SessionInbox.Synthetic;
356
331
  export type SessionSyntheticOperation<E = never> = (input: SessionSyntheticInput) => Effect.Effect<SessionSyntheticOutput, E>;
357
332
  export type SessionShellInput = {
358
333
  readonly sessionID: Session.ID;
359
- readonly id?: Event.ID | undefined;
334
+ readonly id?: SessionMessage.ID | undefined;
360
335
  readonly command: string;
361
336
  };
362
337
  export type SessionShellOutput = void;
@@ -395,6 +370,14 @@ export type SessionContextInput = {
395
370
  };
396
371
  export type SessionContextOutput = ReadonlyArray<SessionMessage.Info>;
397
372
  export type SessionContextOperation<E = never> = (input: SessionContextInput) => Effect.Effect<SessionContextOutput, E>;
373
+ export type SessionDiffInput = {
374
+ readonly sessionID: Session.ID;
375
+ readonly from?: SessionMessage.ID | undefined;
376
+ readonly to?: SessionMessage.ID | undefined;
377
+ readonly context?: number | undefined;
378
+ };
379
+ export type SessionDiffOutput = ReadonlyArray<FileDiff.Info>;
380
+ export type SessionDiffOperation<E = never> = (input: SessionDiffInput) => Effect.Effect<SessionDiffOutput, E>;
398
381
  export type SessionInboxListInput = {
399
382
  readonly sessionID: Session.ID;
400
383
  };
@@ -406,18 +389,13 @@ export type SessionInboxCancelInput = {
406
389
  };
407
390
  export type SessionInboxCancelOutput = void;
408
391
  export type SessionInboxCancelOperation<E = never> = (input: SessionInboxCancelInput) => Effect.Effect<SessionInboxCancelOutput, E>;
409
- export type SessionInboxSteerInput = {
410
- readonly sessionID: Session.ID;
411
- readonly inboxID: SessionMessage.ID;
412
- };
413
- export type SessionInboxSteerOutput = void;
414
- export type SessionInboxSteerOperation<E = never> = (input: SessionInboxSteerInput) => Effect.Effect<SessionInboxSteerOutput, E>;
415
- export type SessionInboxQueueInput = {
392
+ export type SessionInboxUpdateInput = {
416
393
  readonly sessionID: Session.ID;
417
394
  readonly inboxID: SessionMessage.ID;
395
+ readonly delivery: SessionInbox.Delivery;
418
396
  };
419
- export type SessionInboxQueueOutput = void;
420
- export type SessionInboxQueueOperation<E = never> = (input: SessionInboxQueueInput) => Effect.Effect<SessionInboxQueueOutput, E>;
397
+ export type SessionInboxUpdateOutput = void;
398
+ export type SessionInboxUpdateOperation<E = never> = (input: SessionInboxUpdateInput) => Effect.Effect<SessionInboxUpdateOutput, E>;
421
399
  export type SessionInstructionsEntryListInput = {
422
400
  readonly sessionID: Session.ID;
423
401
  };
@@ -461,11 +439,17 @@ export type SessionLogOutput = ({
461
439
  readonly seq: Event.Seq;
462
440
  readonly version: Event.Version;
463
441
  };
464
- readonly location?: Location.Ref | undefined;
442
+ readonly location?: {
443
+ readonly directory: AbsolutePath;
444
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
445
+ } | undefined;
465
446
  readonly data: {
466
447
  readonly sessionID: Session.ID;
467
448
  readonly projectID: Project.ID;
468
- readonly location: Location.Ref;
449
+ readonly location: {
450
+ readonly directory: AbsolutePath;
451
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
452
+ };
469
453
  readonly subpath?: RelativePath | undefined;
470
454
  readonly parentID?: Session.ID | undefined;
471
455
  readonly slug: string;
@@ -488,7 +472,10 @@ export type SessionLogOutput = ({
488
472
  readonly seq: Event.Seq;
489
473
  readonly version: Event.Version;
490
474
  };
491
- readonly location?: Location.Ref | undefined;
475
+ readonly location?: {
476
+ readonly directory: AbsolutePath;
477
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
478
+ } | undefined;
492
479
  readonly data: {
493
480
  readonly sessionID: Session.ID;
494
481
  readonly agent: Agent.ID;
@@ -506,7 +493,10 @@ export type SessionLogOutput = ({
506
493
  readonly seq: Event.Seq;
507
494
  readonly version: Event.Version;
508
495
  };
509
- readonly location?: Location.Ref | undefined;
496
+ readonly location?: {
497
+ readonly directory: AbsolutePath;
498
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
499
+ } | undefined;
510
500
  readonly data: {
511
501
  readonly sessionID: Session.ID;
512
502
  readonly model: Model.Ref;
@@ -524,10 +514,16 @@ export type SessionLogOutput = ({
524
514
  readonly seq: Event.Seq;
525
515
  readonly version: Event.Version;
526
516
  };
527
- readonly location?: Location.Ref | undefined;
517
+ readonly location?: {
518
+ readonly directory: AbsolutePath;
519
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
520
+ } | undefined;
528
521
  readonly data: {
529
522
  readonly sessionID: Session.ID;
530
- readonly location: Location.Ref;
523
+ readonly location: {
524
+ readonly directory: AbsolutePath;
525
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
526
+ };
531
527
  readonly projectID: Project.ID;
532
528
  readonly subpath?: RelativePath | undefined;
533
529
  };
@@ -543,7 +539,10 @@ export type SessionLogOutput = ({
543
539
  readonly seq: Event.Seq;
544
540
  readonly version: Event.Version;
545
541
  };
546
- readonly location?: Location.Ref | undefined;
542
+ readonly location?: {
543
+ readonly directory: AbsolutePath;
544
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
545
+ } | undefined;
547
546
  readonly data: {
548
547
  readonly sessionID: Session.ID;
549
548
  readonly title: string;
@@ -554,13 +553,16 @@ export type SessionLogOutput = ({
554
553
  readonly metadata?: {
555
554
  readonly [x: string]: unknown;
556
555
  } | undefined;
557
- readonly type: "session.permissions.updated";
556
+ readonly type: "session.permissions";
558
557
  readonly durable: {
559
558
  readonly aggregateID: string;
560
559
  readonly seq: Event.Seq;
561
560
  readonly version: Event.Version;
562
561
  };
563
- readonly location?: Location.Ref | undefined;
562
+ readonly location?: {
563
+ readonly directory: AbsolutePath;
564
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
565
+ } | undefined;
564
566
  readonly data: {
565
567
  readonly sessionID: Session.ID;
566
568
  readonly permissions: Permission.Ruleset;
@@ -577,7 +579,10 @@ export type SessionLogOutput = ({
577
579
  readonly seq: Event.Seq;
578
580
  readonly version: Event.Version;
579
581
  };
580
- readonly location?: Location.Ref | undefined;
582
+ readonly location?: {
583
+ readonly directory: AbsolutePath;
584
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
585
+ } | undefined;
581
586
  readonly data: {
582
587
  readonly sessionID: Session.ID;
583
588
  readonly idle: number;
@@ -594,7 +599,10 @@ export type SessionLogOutput = ({
594
599
  readonly seq: Event.Seq;
595
600
  readonly version: Event.Version;
596
601
  };
597
- readonly location?: Location.Ref | undefined;
602
+ readonly location?: {
603
+ readonly directory: AbsolutePath;
604
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
605
+ } | undefined;
598
606
  readonly data: {
599
607
  readonly sessionID: Session.ID;
600
608
  };
@@ -610,7 +618,10 @@ export type SessionLogOutput = ({
610
618
  readonly seq: Event.Seq;
611
619
  readonly version: Event.Version;
612
620
  };
613
- readonly location?: Location.Ref | undefined;
621
+ readonly location?: {
622
+ readonly directory: AbsolutePath;
623
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
624
+ } | undefined;
614
625
  readonly data: {
615
626
  readonly sessionID: Session.ID;
616
627
  readonly parentID: Session.ID;
@@ -632,7 +643,10 @@ export type SessionLogOutput = ({
632
643
  readonly seq: Event.Seq;
633
644
  readonly version: Event.Version;
634
645
  };
635
- readonly location?: Location.Ref | undefined;
646
+ readonly location?: {
647
+ readonly directory: AbsolutePath;
648
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
649
+ } | undefined;
636
650
  readonly data: {
637
651
  readonly sessionID: Session.ID;
638
652
  readonly inboxID: SessionMessage.ID;
@@ -649,7 +663,10 @@ export type SessionLogOutput = ({
649
663
  readonly seq: Event.Seq;
650
664
  readonly version: Event.Version;
651
665
  };
652
- readonly location?: Location.Ref | undefined;
666
+ readonly location?: {
667
+ readonly directory: AbsolutePath;
668
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
669
+ } | undefined;
653
670
  readonly data: {
654
671
  readonly sessionID: Session.ID;
655
672
  readonly inboxID: SessionMessage.ID;
@@ -667,7 +684,10 @@ export type SessionLogOutput = ({
667
684
  readonly seq: Event.Seq;
668
685
  readonly version: Event.Version;
669
686
  };
670
- readonly location?: Location.Ref | undefined;
687
+ readonly location?: {
688
+ readonly directory: AbsolutePath;
689
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
690
+ } | undefined;
671
691
  readonly data: {
672
692
  readonly sessionID: Session.ID;
673
693
  readonly inboxID: SessionMessage.ID;
@@ -684,7 +704,10 @@ export type SessionLogOutput = ({
684
704
  readonly seq: Event.Seq;
685
705
  readonly version: Event.Version;
686
706
  };
687
- readonly location?: Location.Ref | undefined;
707
+ readonly location?: {
708
+ readonly directory: AbsolutePath;
709
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
710
+ } | undefined;
688
711
  readonly data: {
689
712
  readonly sessionID: Session.ID;
690
713
  readonly inboxID: SessionMessage.ID;
@@ -702,7 +725,10 @@ export type SessionLogOutput = ({
702
725
  readonly seq: Event.Seq;
703
726
  readonly version: Event.Version;
704
727
  };
705
- readonly location?: Location.Ref | undefined;
728
+ readonly location?: {
729
+ readonly directory: AbsolutePath;
730
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
731
+ } | undefined;
706
732
  readonly data: {
707
733
  readonly sessionID: Session.ID;
708
734
  };
@@ -718,7 +744,10 @@ export type SessionLogOutput = ({
718
744
  readonly seq: Event.Seq;
719
745
  readonly version: Event.Version;
720
746
  };
721
- readonly location?: Location.Ref | undefined;
747
+ readonly location?: {
748
+ readonly directory: AbsolutePath;
749
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
750
+ } | undefined;
722
751
  readonly data: {
723
752
  readonly sessionID: Session.ID;
724
753
  };
@@ -734,7 +763,10 @@ export type SessionLogOutput = ({
734
763
  readonly seq: Event.Seq;
735
764
  readonly version: Event.Version;
736
765
  };
737
- readonly location?: Location.Ref | undefined;
766
+ readonly location?: {
767
+ readonly directory: AbsolutePath;
768
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
769
+ } | undefined;
738
770
  readonly data: {
739
771
  readonly sessionID: Session.ID;
740
772
  readonly error: {
@@ -755,7 +787,10 @@ export type SessionLogOutput = ({
755
787
  readonly seq: Event.Seq;
756
788
  readonly version: Event.Version;
757
789
  };
758
- readonly location?: Location.Ref | undefined;
790
+ readonly location?: {
791
+ readonly directory: AbsolutePath;
792
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
793
+ } | undefined;
759
794
  readonly data: {
760
795
  readonly sessionID: Session.ID;
761
796
  readonly reason: "user" | "shutdown" | "superseded" | "inactivity";
@@ -772,7 +807,10 @@ export type SessionLogOutput = ({
772
807
  readonly seq: Event.Seq;
773
808
  readonly version: Event.Version;
774
809
  };
775
- readonly location?: Location.Ref | undefined;
810
+ readonly location?: {
811
+ readonly directory: AbsolutePath;
812
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
813
+ } | undefined;
776
814
  readonly data: {
777
815
  readonly sessionID: Session.ID;
778
816
  readonly delta: {
@@ -792,7 +830,10 @@ export type SessionLogOutput = ({
792
830
  readonly seq: Event.Seq;
793
831
  readonly version: Event.Version;
794
832
  };
795
- readonly location?: Location.Ref | undefined;
833
+ readonly location?: {
834
+ readonly directory: AbsolutePath;
835
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
836
+ } | undefined;
796
837
  readonly data: {
797
838
  readonly sessionID: Session.ID;
798
839
  readonly text: string;
@@ -813,7 +854,10 @@ export type SessionLogOutput = ({
813
854
  readonly seq: Event.Seq;
814
855
  readonly version: Event.Version;
815
856
  };
816
- readonly location?: Location.Ref | undefined;
857
+ readonly location?: {
858
+ readonly directory: AbsolutePath;
859
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
860
+ } | undefined;
817
861
  readonly data: {
818
862
  readonly sessionID: Session.ID;
819
863
  readonly id: Skill.ID;
@@ -832,7 +876,10 @@ export type SessionLogOutput = ({
832
876
  readonly seq: Event.Seq;
833
877
  readonly version: Event.Version;
834
878
  };
835
- readonly location?: Location.Ref | undefined;
879
+ readonly location?: {
880
+ readonly directory: AbsolutePath;
881
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
882
+ } | undefined;
836
883
  readonly data: {
837
884
  readonly sessionID: Session.ID;
838
885
  readonly shell: Shell.Info;
@@ -849,7 +896,10 @@ export type SessionLogOutput = ({
849
896
  readonly seq: Event.Seq;
850
897
  readonly version: Event.Version;
851
898
  };
852
- readonly location?: Location.Ref | undefined;
899
+ readonly location?: {
900
+ readonly directory: AbsolutePath;
901
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
902
+ } | undefined;
853
903
  readonly data: {
854
904
  readonly sessionID: Session.ID;
855
905
  readonly shell: Shell.Info;
@@ -872,7 +922,10 @@ export type SessionLogOutput = ({
872
922
  readonly seq: Event.Seq;
873
923
  readonly version: Event.Version;
874
924
  };
875
- readonly location?: Location.Ref | undefined;
925
+ readonly location?: {
926
+ readonly directory: AbsolutePath;
927
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
928
+ } | undefined;
876
929
  readonly data: {
877
930
  readonly sessionID: Session.ID;
878
931
  readonly assistantMessageID: SessionMessage.ID;
@@ -892,7 +945,10 @@ export type SessionLogOutput = ({
892
945
  readonly seq: Event.Seq;
893
946
  readonly version: Event.Version;
894
947
  };
895
- readonly location?: Location.Ref | undefined;
948
+ readonly location?: {
949
+ readonly directory: AbsolutePath;
950
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
951
+ } | undefined;
896
952
  readonly data: {
897
953
  readonly sessionID: Session.ID;
898
954
  readonly assistantMessageID: SessionMessage.ID;
@@ -909,7 +965,10 @@ export type SessionLogOutput = ({
909
965
  readonly seq: Event.Seq;
910
966
  readonly version: Event.Version;
911
967
  };
912
- readonly location?: Location.Ref | undefined;
968
+ readonly location?: {
969
+ readonly directory: AbsolutePath;
970
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
971
+ } | undefined;
913
972
  readonly data: {
914
973
  readonly sessionID: Session.ID;
915
974
  readonly assistantMessageID: SessionMessage.ID;
@@ -941,7 +1000,10 @@ export type SessionLogOutput = ({
941
1000
  readonly seq: Event.Seq;
942
1001
  readonly version: Event.Version;
943
1002
  };
944
- readonly location?: Location.Ref | undefined;
1003
+ readonly location?: {
1004
+ readonly directory: AbsolutePath;
1005
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
1006
+ } | undefined;
945
1007
  readonly data: {
946
1008
  readonly sessionID: Session.ID;
947
1009
  readonly assistantMessageID: SessionMessage.ID;
@@ -978,7 +1040,10 @@ export type SessionLogOutput = ({
978
1040
  readonly seq: Event.Seq;
979
1041
  readonly version: Event.Version;
980
1042
  };
981
- readonly location?: Location.Ref | undefined;
1043
+ readonly location?: {
1044
+ readonly directory: AbsolutePath;
1045
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
1046
+ } | undefined;
982
1047
  readonly data: {
983
1048
  readonly sessionID: Session.ID;
984
1049
  readonly assistantMessageID: SessionMessage.ID;
@@ -996,7 +1061,10 @@ export type SessionLogOutput = ({
996
1061
  readonly seq: Event.Seq;
997
1062
  readonly version: Event.Version;
998
1063
  };
999
- readonly location?: Location.Ref | undefined;
1064
+ readonly location?: {
1065
+ readonly directory: AbsolutePath;
1066
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
1067
+ } | undefined;
1000
1068
  readonly data: {
1001
1069
  readonly sessionID: Session.ID;
1002
1070
  readonly assistantMessageID: SessionMessage.ID;
@@ -1016,7 +1084,10 @@ export type SessionLogOutput = ({
1016
1084
  readonly seq: Event.Seq;
1017
1085
  readonly version: Event.Version;
1018
1086
  };
1019
- readonly location?: Location.Ref | undefined;
1087
+ readonly location?: {
1088
+ readonly directory: AbsolutePath;
1089
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
1090
+ } | undefined;
1020
1091
  readonly data: {
1021
1092
  readonly sessionID: Session.ID;
1022
1093
  readonly assistantMessageID: SessionMessage.ID;
@@ -1035,7 +1106,10 @@ export type SessionLogOutput = ({
1035
1106
  readonly seq: Event.Seq;
1036
1107
  readonly version: Event.Version;
1037
1108
  };
1038
- readonly location?: Location.Ref | undefined;
1109
+ readonly location?: {
1110
+ readonly directory: AbsolutePath;
1111
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
1112
+ } | undefined;
1039
1113
  readonly data: {
1040
1114
  readonly sessionID: Session.ID;
1041
1115
  readonly assistantMessageID: SessionMessage.ID;
@@ -1055,7 +1129,10 @@ export type SessionLogOutput = ({
1055
1129
  readonly seq: Event.Seq;
1056
1130
  readonly version: Event.Version;
1057
1131
  };
1058
- readonly location?: Location.Ref | undefined;
1132
+ readonly location?: {
1133
+ readonly directory: AbsolutePath;
1134
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
1135
+ } | undefined;
1059
1136
  readonly data: {
1060
1137
  readonly sessionID: Session.ID;
1061
1138
  readonly assistantMessageID: SessionMessage.ID;
@@ -1074,7 +1151,10 @@ export type SessionLogOutput = ({
1074
1151
  readonly seq: Event.Seq;
1075
1152
  readonly version: Event.Version;
1076
1153
  };
1077
- readonly location?: Location.Ref | undefined;
1154
+ readonly location?: {
1155
+ readonly directory: AbsolutePath;
1156
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
1157
+ } | undefined;
1078
1158
  readonly data: {
1079
1159
  readonly sessionID: Session.ID;
1080
1160
  readonly assistantMessageID: SessionMessage.ID;
@@ -1093,7 +1173,10 @@ export type SessionLogOutput = ({
1093
1173
  readonly seq: Event.Seq;
1094
1174
  readonly version: Event.Version;
1095
1175
  };
1096
- readonly location?: Location.Ref | undefined;
1176
+ readonly location?: {
1177
+ readonly directory: AbsolutePath;
1178
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
1179
+ } | undefined;
1097
1180
  readonly data: {
1098
1181
  readonly sessionID: Session.ID;
1099
1182
  readonly assistantMessageID: SessionMessage.ID;
@@ -1116,7 +1199,10 @@ export type SessionLogOutput = ({
1116
1199
  readonly seq: Event.Seq;
1117
1200
  readonly version: Event.Version;
1118
1201
  };
1119
- readonly location?: Location.Ref | undefined;
1202
+ readonly location?: {
1203
+ readonly directory: AbsolutePath;
1204
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
1205
+ } | undefined;
1120
1206
  readonly data: {
1121
1207
  readonly sessionID: Session.ID;
1122
1208
  readonly assistantMessageID: SessionMessage.ID;
@@ -1159,7 +1245,10 @@ export type SessionLogOutput = ({
1159
1245
  readonly seq: Event.Seq;
1160
1246
  readonly version: Event.Version;
1161
1247
  };
1162
- readonly location?: Location.Ref | undefined;
1248
+ readonly location?: {
1249
+ readonly directory: AbsolutePath;
1250
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
1251
+ } | undefined;
1163
1252
  readonly data: {
1164
1253
  readonly sessionID: Session.ID;
1165
1254
  readonly assistantMessageID: SessionMessage.ID;
@@ -1207,7 +1296,10 @@ export type SessionLogOutput = ({
1207
1296
  readonly seq: Event.Seq;
1208
1297
  readonly version: Event.Version;
1209
1298
  };
1210
- readonly location?: Location.Ref | undefined;
1299
+ readonly location?: {
1300
+ readonly directory: AbsolutePath;
1301
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
1302
+ } | undefined;
1211
1303
  readonly data: {
1212
1304
  readonly sessionID: Session.ID;
1213
1305
  readonly assistantMessageID: SessionMessage.ID;
@@ -1231,7 +1323,10 @@ export type SessionLogOutput = ({
1231
1323
  readonly seq: Event.Seq;
1232
1324
  readonly version: Event.Version;
1233
1325
  };
1234
- readonly location?: Location.Ref | undefined;
1326
+ readonly location?: {
1327
+ readonly directory: AbsolutePath;
1328
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
1329
+ } | undefined;
1235
1330
  readonly data: {
1236
1331
  readonly sessionID: Session.ID;
1237
1332
  readonly reason: "auto" | "manual";
@@ -1250,7 +1345,10 @@ export type SessionLogOutput = ({
1250
1345
  readonly seq: Event.Seq;
1251
1346
  readonly version: Event.Version;
1252
1347
  };
1253
- readonly location?: Location.Ref | undefined;
1348
+ readonly location?: {
1349
+ readonly directory: AbsolutePath;
1350
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
1351
+ } | undefined;
1254
1352
  readonly data: {
1255
1353
  readonly sessionID: Session.ID;
1256
1354
  readonly reason: "auto" | "manual";
@@ -1293,7 +1391,10 @@ export type SessionLogOutput = ({
1293
1391
  readonly seq: Event.Seq;
1294
1392
  readonly version: Event.Version;
1295
1393
  };
1296
- readonly location?: Location.Ref | undefined;
1394
+ readonly location?: {
1395
+ readonly directory: AbsolutePath;
1396
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
1397
+ } | undefined;
1297
1398
  readonly data: {
1298
1399
  readonly sessionID: Session.ID;
1299
1400
  readonly reason: "auto" | "manual";
@@ -1326,7 +1427,10 @@ export type SessionLogOutput = ({
1326
1427
  readonly seq: Event.Seq;
1327
1428
  readonly version: Event.Version;
1328
1429
  };
1329
- readonly location?: Location.Ref | undefined;
1430
+ readonly location?: {
1431
+ readonly directory: AbsolutePath;
1432
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
1433
+ } | undefined;
1330
1434
  readonly data: {
1331
1435
  readonly sessionID: Session.ID;
1332
1436
  readonly revert: Session.Revert;
@@ -1343,7 +1447,10 @@ export type SessionLogOutput = ({
1343
1447
  readonly seq: Event.Seq;
1344
1448
  readonly version: Event.Version;
1345
1449
  };
1346
- readonly location?: Location.Ref | undefined;
1450
+ readonly location?: {
1451
+ readonly directory: AbsolutePath;
1452
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
1453
+ } | undefined;
1347
1454
  readonly data: {
1348
1455
  readonly sessionID: Session.ID;
1349
1456
  };
@@ -1359,7 +1466,10 @@ export type SessionLogOutput = ({
1359
1466
  readonly seq: Event.Seq;
1360
1467
  readonly version: Event.Version;
1361
1468
  };
1362
- readonly location?: Location.Ref | undefined;
1469
+ readonly location?: {
1470
+ readonly directory: AbsolutePath;
1471
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
1472
+ } | undefined;
1363
1473
  readonly data: {
1364
1474
  readonly sessionID: Session.ID;
1365
1475
  readonly to: SessionMessage.ID;
@@ -1376,7 +1486,10 @@ export type SessionLogOutput = ({
1376
1486
  readonly seq: Event.Seq;
1377
1487
  readonly version: Event.Version;
1378
1488
  };
1379
- readonly location?: Location.Ref | undefined;
1489
+ readonly location?: {
1490
+ readonly directory: AbsolutePath;
1491
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
1492
+ } | undefined;
1380
1493
  readonly data: {
1381
1494
  readonly sessionID: Session.ID;
1382
1495
  readonly source: "title" | "compaction";
@@ -1403,7 +1516,10 @@ export type SessionLogOutput = ({
1403
1516
  readonly seq: Event.Seq;
1404
1517
  readonly version: Event.Version;
1405
1518
  };
1406
- readonly location?: Location.Ref | undefined;
1519
+ readonly location?: {
1520
+ readonly directory: AbsolutePath;
1521
+ readonly workspaceID?: (string & Brand.Brand<"Workspace.ID">) | undefined;
1522
+ } | undefined;
1407
1523
  readonly data: {
1408
1524
  readonly sessionID: Session.ID;
1409
1525
  readonly messageID: SessionMessage.ID;
@@ -1413,7 +1529,7 @@ export type SessionLogOutput = ({
1413
1529
  export type SessionLogOperation<E = never> = (input: SessionLogInput) => Stream.Stream<SessionLogOutput, E>;
1414
1530
  export type SessionInterruptInput = {
1415
1531
  readonly sessionID: Session.ID;
1416
- readonly continue?: boolean | undefined;
1532
+ readonly resume?: boolean | undefined;
1417
1533
  };
1418
1534
  export type SessionInterruptOutput = {
1419
1535
  readonly interrupted: boolean;
@@ -1424,12 +1540,45 @@ export type SessionBackgroundInput = {
1424
1540
  };
1425
1541
  export type SessionBackgroundOutput = void;
1426
1542
  export type SessionBackgroundOperation<E = never> = (input: SessionBackgroundInput) => Effect.Effect<SessionBackgroundOutput, E>;
1427
- export type SessionMessageInput = {
1543
+ export type SessionMessageGetInput = {
1428
1544
  readonly sessionID: Session.ID;
1429
1545
  readonly messageID: SessionMessage.ID;
1430
1546
  };
1431
- export type SessionMessageOutput = SessionMessage.Info;
1432
- export type SessionMessageOperation<E = never> = (input: SessionMessageInput) => Effect.Effect<SessionMessageOutput, E>;
1547
+ export type SessionMessageGetOutput = SessionMessage.Info;
1548
+ export type SessionMessageGetOperation<E = never> = (input: SessionMessageGetInput) => Effect.Effect<SessionMessageGetOutput, E>;
1549
+ export type SessionFormListInput = {
1550
+ readonly sessionID: string;
1551
+ };
1552
+ export type SessionFormListOutput = ReadonlyArray<Form.Info>;
1553
+ export type SessionFormListOperation<E = never> = (input: SessionFormListInput) => Effect.Effect<SessionFormListOutput, E>;
1554
+ export type SessionFormCreateInput = {
1555
+ readonly sessionID: string;
1556
+ readonly id?: Form.ID | undefined;
1557
+ readonly title: string;
1558
+ readonly metadata?: Form.Metadata | undefined;
1559
+ readonly fields: Form.Fields;
1560
+ };
1561
+ export type SessionFormCreateOutput = Form.Info;
1562
+ export type SessionFormCreateOperation<E = never> = (input: SessionFormCreateInput) => Effect.Effect<SessionFormCreateOutput, E>;
1563
+ export type SessionFormGetInput = {
1564
+ readonly sessionID: string;
1565
+ readonly formID: Form.ID;
1566
+ };
1567
+ export type SessionFormGetOutput = Form.Detail;
1568
+ export type SessionFormGetOperation<E = never> = (input: SessionFormGetInput) => Effect.Effect<SessionFormGetOutput, E>;
1569
+ export type SessionFormReplyInput = {
1570
+ readonly sessionID: string;
1571
+ readonly formID: Form.ID;
1572
+ readonly answer: Form.Answer;
1573
+ };
1574
+ export type SessionFormReplyOutput = void;
1575
+ export type SessionFormReplyOperation<E = never> = (input: SessionFormReplyInput) => Effect.Effect<SessionFormReplyOutput, E>;
1576
+ export type SessionFormCancelInput = {
1577
+ readonly sessionID: string;
1578
+ readonly formID: Form.ID;
1579
+ };
1580
+ export type SessionFormCancelOutput = void;
1581
+ export type SessionFormCancelOperation<E = never> = (input: SessionFormCancelInput) => Effect.Effect<SessionFormCancelOutput, E>;
1433
1582
  export type SessionEnvironmentInput = {
1434
1583
  readonly sessionID: Session.ID;
1435
1584
  readonly variables: {
@@ -1440,7 +1589,7 @@ export type SessionEnvironmentOutput = void;
1440
1589
  export type SessionEnvironmentOperation<E = never> = (input: SessionEnvironmentInput) => Effect.Effect<SessionEnvironmentOutput, E>;
1441
1590
  export type SessionViewInput = {
1442
1591
  readonly sessionID: Session.ID;
1443
- readonly idle: number;
1592
+ readonly idle: DateTime.Utc;
1444
1593
  };
1445
1594
  export type SessionViewOutput = void;
1446
1595
  export type SessionViewOperation<E = never> = (input: SessionViewInput) => Effect.Effect<SessionViewOutput, E>;
@@ -1456,7 +1605,7 @@ export interface SessionApi<E = never> {
1456
1605
  readonly fork: SessionForkOperation<E>;
1457
1606
  readonly switchAgent: SessionSwitchAgentOperation<E>;
1458
1607
  readonly switchModel: SessionSwitchModelOperation<E>;
1459
- readonly rename: SessionRenameOperation<E>;
1608
+ readonly update: SessionUpdateOperation<E>;
1460
1609
  readonly move: SessionMoveOperation<E>;
1461
1610
  readonly prompt: SessionPromptOperation<E>;
1462
1611
  readonly command: SessionCommandOperation<E>;
@@ -1471,11 +1620,11 @@ export interface SessionApi<E = never> {
1471
1620
  readonly commit: SessionRevertCommitOperation<E>;
1472
1621
  };
1473
1622
  readonly context: SessionContextOperation<E>;
1623
+ readonly diff: SessionDiffOperation<E>;
1474
1624
  readonly inbox: {
1475
1625
  readonly list: SessionInboxListOperation<E>;
1476
1626
  readonly cancel: SessionInboxCancelOperation<E>;
1477
- readonly steer: SessionInboxSteerOperation<E>;
1478
- readonly queue: SessionInboxQueueOperation<E>;
1627
+ readonly update: SessionInboxUpdateOperation<E>;
1479
1628
  };
1480
1629
  readonly instructions: {
1481
1630
  readonly entry: {
@@ -1488,7 +1637,16 @@ export interface SessionApi<E = never> {
1488
1637
  readonly log: SessionLogOperation<E>;
1489
1638
  readonly interrupt: SessionInterruptOperation<E>;
1490
1639
  readonly background: SessionBackgroundOperation<E>;
1491
- readonly message: SessionMessageOperation<E>;
1640
+ readonly message: {
1641
+ readonly get: SessionMessageGetOperation<E>;
1642
+ };
1643
+ readonly form: {
1644
+ readonly list: SessionFormListOperation<E>;
1645
+ readonly create: SessionFormCreateOperation<E>;
1646
+ readonly get: SessionFormGetOperation<E>;
1647
+ readonly reply: SessionFormReplyOperation<E>;
1648
+ readonly cancel: SessionFormCancelOperation<E>;
1649
+ };
1492
1650
  readonly environment: SessionEnvironmentOperation<E>;
1493
1651
  readonly view: SessionViewOperation<E>;
1494
1652
  }
@@ -1513,22 +1671,20 @@ export interface MessageApi<E = never> {
1513
1671
  export type ModelListInput = {
1514
1672
  readonly location?: {
1515
1673
  readonly directory?: string | undefined;
1516
- readonly workspace?: string | undefined;
1517
1674
  } | undefined;
1518
1675
  };
1519
1676
  export type ModelListOutput = {
1520
- readonly location: Location.Info;
1677
+ readonly location: Location.PublicRef;
1521
1678
  readonly data: ReadonlyArray<Model.Info>;
1522
1679
  };
1523
1680
  export type ModelListOperation<E = never> = (input?: ModelListInput) => Effect.Effect<ModelListOutput, E>;
1524
1681
  export type ModelDefaultInput = {
1525
1682
  readonly location?: {
1526
1683
  readonly directory?: string | undefined;
1527
- readonly workspace?: string | undefined;
1528
1684
  } | undefined;
1529
1685
  };
1530
1686
  export type ModelDefaultOutput = {
1531
- readonly location: Location.Info;
1687
+ readonly location: Location.PublicRef;
1532
1688
  readonly data: Model.Info | undefined;
1533
1689
  };
1534
1690
  export type ModelDefaultOperation<E = never> = (input?: ModelDefaultInput) => Effect.Effect<ModelDefaultOutput, E>;
@@ -1550,11 +1706,10 @@ export interface GenerateApi<E = never> {
1550
1706
  export type ProviderListInput = {
1551
1707
  readonly location?: {
1552
1708
  readonly directory?: string | undefined;
1553
- readonly workspace?: string | undefined;
1554
1709
  } | undefined;
1555
1710
  };
1556
1711
  export type ProviderListOutput = {
1557
- readonly location: Location.Info;
1712
+ readonly location: Location.PublicRef;
1558
1713
  readonly data: ReadonlyArray<Provider.Info>;
1559
1714
  };
1560
1715
  export type ProviderListOperation<E = never> = (input?: ProviderListInput) => Effect.Effect<ProviderListOutput, E>;
@@ -1562,11 +1717,10 @@ export type ProviderGetInput = {
1562
1717
  readonly providerID: Provider.ID;
1563
1718
  readonly location?: {
1564
1719
  readonly directory?: string | undefined;
1565
- readonly workspace?: string | undefined;
1566
1720
  } | undefined;
1567
1721
  };
1568
1722
  export type ProviderGetOutput = {
1569
- readonly location: Location.Info;
1723
+ readonly location: Location.PublicRef;
1570
1724
  readonly data: Provider.Info;
1571
1725
  };
1572
1726
  export type ProviderGetOperation<E = never> = (input: ProviderGetInput) => Effect.Effect<ProviderGetOutput, E>;
@@ -1577,11 +1731,10 @@ export interface ProviderApi<E = never> {
1577
1731
  export type IntegrationListInput = {
1578
1732
  readonly location?: {
1579
1733
  readonly directory?: string | undefined;
1580
- readonly workspace?: string | undefined;
1581
1734
  } | undefined;
1582
1735
  };
1583
1736
  export type IntegrationListOutput = {
1584
- readonly location: Location.Info;
1737
+ readonly location: Location.PublicRef;
1585
1738
  readonly data: ReadonlyArray<Integration.Info>;
1586
1739
  };
1587
1740
  export type IntegrationListOperation<E = never> = (input?: IntegrationListInput) => Effect.Effect<IntegrationListOutput, E>;
@@ -1589,18 +1742,16 @@ export type IntegrationGetInput = {
1589
1742
  readonly integrationID: Integration.ID;
1590
1743
  readonly location?: {
1591
1744
  readonly directory?: string | undefined;
1592
- readonly workspace?: string | undefined;
1593
1745
  } | undefined;
1594
1746
  };
1595
1747
  export type IntegrationGetOutput = {
1596
- readonly location: Location.Info;
1597
- readonly data: Integration.Info | undefined;
1748
+ readonly location: Location.PublicRef;
1749
+ readonly data: Integration.Info;
1598
1750
  };
1599
1751
  export type IntegrationGetOperation<E = never> = (input: IntegrationGetInput) => Effect.Effect<IntegrationGetOutput, E>;
1600
1752
  export type IntegrationWellknownAddInput = {
1601
1753
  readonly location?: {
1602
1754
  readonly directory?: string | undefined;
1603
- readonly workspace?: string | undefined;
1604
1755
  } | undefined;
1605
1756
  readonly url: string;
1606
1757
  };
@@ -1610,7 +1761,6 @@ export type IntegrationConnectKeyInput = {
1610
1761
  readonly integrationID: Integration.ID;
1611
1762
  readonly location?: {
1612
1763
  readonly directory?: string | undefined;
1613
- readonly workspace?: string | undefined;
1614
1764
  } | undefined;
1615
1765
  readonly key: string;
1616
1766
  readonly answer?: Form.Answer | undefined;
@@ -1622,14 +1772,13 @@ export type IntegrationOauthConnectInput = {
1622
1772
  readonly integrationID: Integration.ID;
1623
1773
  readonly location?: {
1624
1774
  readonly directory?: string | undefined;
1625
- readonly workspace?: string | undefined;
1626
1775
  } | undefined;
1627
1776
  readonly methodID: Integration.MethodID;
1628
1777
  readonly answer?: Form.Answer | undefined;
1629
1778
  readonly label?: string | undefined;
1630
1779
  };
1631
1780
  export type IntegrationOauthConnectOutput = {
1632
- readonly location: Location.Info;
1781
+ readonly location: Location.PublicRef;
1633
1782
  readonly data: Integration.Attempt;
1634
1783
  };
1635
1784
  export type IntegrationOauthConnectOperation<E = never> = (input: IntegrationOauthConnectInput) => Effect.Effect<IntegrationOauthConnectOutput, E>;
@@ -1638,11 +1787,10 @@ export type IntegrationOauthStatusInput = {
1638
1787
  readonly attemptID: Integration.AttemptID;
1639
1788
  readonly location?: {
1640
1789
  readonly directory?: string | undefined;
1641
- readonly workspace?: string | undefined;
1642
1790
  } | undefined;
1643
1791
  };
1644
1792
  export type IntegrationOauthStatusOutput = {
1645
- readonly location: Location.Info;
1793
+ readonly location: Location.PublicRef;
1646
1794
  readonly data: Integration.AttemptStatus;
1647
1795
  };
1648
1796
  export type IntegrationOauthStatusOperation<E = never> = (input: IntegrationOauthStatusInput) => Effect.Effect<IntegrationOauthStatusOutput, E>;
@@ -1651,7 +1799,6 @@ export type IntegrationOauthCompleteInput = {
1651
1799
  readonly attemptID: Integration.AttemptID;
1652
1800
  readonly location?: {
1653
1801
  readonly directory?: string | undefined;
1654
- readonly workspace?: string | undefined;
1655
1802
  } | undefined;
1656
1803
  readonly code?: string | undefined;
1657
1804
  };
@@ -1662,7 +1809,6 @@ export type IntegrationOauthCancelInput = {
1662
1809
  readonly attemptID: Integration.AttemptID;
1663
1810
  readonly location?: {
1664
1811
  readonly directory?: string | undefined;
1665
- readonly workspace?: string | undefined;
1666
1812
  } | undefined;
1667
1813
  };
1668
1814
  export type IntegrationOauthCancelOutput = void;
@@ -1671,13 +1817,12 @@ export type IntegrationCommandConnectInput = {
1671
1817
  readonly integrationID: Integration.ID;
1672
1818
  readonly location?: {
1673
1819
  readonly directory?: string | undefined;
1674
- readonly workspace?: string | undefined;
1675
1820
  } | undefined;
1676
1821
  readonly methodID: Integration.MethodID;
1677
1822
  readonly label?: string | undefined;
1678
1823
  };
1679
1824
  export type IntegrationCommandConnectOutput = {
1680
- readonly location: Location.Info;
1825
+ readonly location: Location.PublicRef;
1681
1826
  readonly data: Integration.CommandAttempt;
1682
1827
  };
1683
1828
  export type IntegrationCommandConnectOperation<E = never> = (input: IntegrationCommandConnectInput) => Effect.Effect<IntegrationCommandConnectOutput, E>;
@@ -1686,11 +1831,10 @@ export type IntegrationCommandStatusInput = {
1686
1831
  readonly attemptID: Integration.AttemptID;
1687
1832
  readonly location?: {
1688
1833
  readonly directory?: string | undefined;
1689
- readonly workspace?: string | undefined;
1690
1834
  } | undefined;
1691
1835
  };
1692
1836
  export type IntegrationCommandStatusOutput = {
1693
- readonly location: Location.Info;
1837
+ readonly location: Location.PublicRef;
1694
1838
  readonly data: Integration.CommandAttemptStatus;
1695
1839
  };
1696
1840
  export type IntegrationCommandStatusOperation<E = never> = (input: IntegrationCommandStatusInput) => Effect.Effect<IntegrationCommandStatusOutput, E>;
@@ -1699,7 +1843,6 @@ export type IntegrationCommandCancelInput = {
1699
1843
  readonly attemptID: Integration.AttemptID;
1700
1844
  readonly location?: {
1701
1845
  readonly directory?: string | undefined;
1702
- readonly workspace?: string | undefined;
1703
1846
  } | undefined;
1704
1847
  };
1705
1848
  export type IntegrationCommandCancelOutput = void;
@@ -1728,11 +1871,10 @@ export interface IntegrationApi<E = never> {
1728
1871
  export type McpListInput = {
1729
1872
  readonly location?: {
1730
1873
  readonly directory?: string | undefined;
1731
- readonly workspace?: string | undefined;
1732
1874
  } | undefined;
1733
1875
  };
1734
1876
  export type McpListOutput = {
1735
- readonly location: Location.Info;
1877
+ readonly location: Location.PublicRef;
1736
1878
  readonly data: ReadonlyArray<Mcp.Server>;
1737
1879
  };
1738
1880
  export type McpListOperation<E = never> = (input?: McpListInput) => Effect.Effect<McpListOutput, E>;
@@ -1740,7 +1882,6 @@ export type McpAddInput = {
1740
1882
  readonly server: string;
1741
1883
  readonly location?: {
1742
1884
  readonly directory?: string | undefined;
1743
- readonly workspace?: string | undefined;
1744
1885
  } | undefined;
1745
1886
  readonly config: Mcp.LocalConfig | Mcp.RemoteConfig;
1746
1887
  };
@@ -1750,7 +1891,6 @@ export type McpRemoveInput = {
1750
1891
  readonly server: string;
1751
1892
  readonly location?: {
1752
1893
  readonly directory?: string | undefined;
1753
- readonly workspace?: string | undefined;
1754
1894
  } | undefined;
1755
1895
  };
1756
1896
  export type McpRemoveOutput = void;
@@ -1759,7 +1899,6 @@ export type McpConnectInput = {
1759
1899
  readonly server: string;
1760
1900
  readonly location?: {
1761
1901
  readonly directory?: string | undefined;
1762
- readonly workspace?: string | undefined;
1763
1902
  } | undefined;
1764
1903
  };
1765
1904
  export type McpConnectOutput = void;
@@ -1768,7 +1907,6 @@ export type McpDisconnectInput = {
1768
1907
  readonly server: string;
1769
1908
  readonly location?: {
1770
1909
  readonly directory?: string | undefined;
1771
- readonly workspace?: string | undefined;
1772
1910
  } | undefined;
1773
1911
  };
1774
1912
  export type McpDisconnectOutput = void;
@@ -1776,11 +1914,10 @@ export type McpDisconnectOperation<E = never> = (input: McpDisconnectInput) => E
1776
1914
  export type McpResourceCatalogInput = {
1777
1915
  readonly location?: {
1778
1916
  readonly directory?: string | undefined;
1779
- readonly workspace?: string | undefined;
1780
1917
  } | undefined;
1781
1918
  };
1782
1919
  export type McpResourceCatalogOutput = {
1783
- readonly location: Location.Info;
1920
+ readonly location: Location.PublicRef;
1784
1921
  readonly data: Mcp.ResourceCatalog;
1785
1922
  };
1786
1923
  export type McpResourceCatalogOperation<E = never> = (input?: McpResourceCatalogInput) => Effect.Effect<McpResourceCatalogOutput, E>;
@@ -1796,29 +1933,17 @@ export interface McpApi<E = never> {
1796
1933
  }
1797
1934
  export type CredentialUpdateInput = {
1798
1935
  readonly credentialID: Credential.ID;
1799
- readonly location?: {
1800
- readonly directory?: string | undefined;
1801
- readonly workspace?: string | undefined;
1802
- } | undefined;
1803
1936
  readonly label: string;
1804
1937
  };
1805
1938
  export type CredentialUpdateOutput = void;
1806
1939
  export type CredentialUpdateOperation<E = never> = (input: CredentialUpdateInput) => Effect.Effect<CredentialUpdateOutput, E>;
1807
1940
  export type CredentialActivateInput = {
1808
1941
  readonly credentialID: Credential.ID;
1809
- readonly location?: {
1810
- readonly directory?: string | undefined;
1811
- readonly workspace?: string | undefined;
1812
- } | undefined;
1813
1942
  };
1814
1943
  export type CredentialActivateOutput = void;
1815
1944
  export type CredentialActivateOperation<E = never> = (input: CredentialActivateInput) => Effect.Effect<CredentialActivateOutput, E>;
1816
1945
  export type CredentialRemoveInput = {
1817
1946
  readonly credentialID: Credential.ID;
1818
- readonly location?: {
1819
- readonly directory?: string | undefined;
1820
- readonly workspace?: string | undefined;
1821
- } | undefined;
1822
1947
  };
1823
1948
  export type CredentialRemoveOutput = void;
1824
1949
  export type CredentialRemoveOperation<E = never> = (input: CredentialRemoveInput) => Effect.Effect<CredentialRemoveOutput, E>;
@@ -1838,88 +1963,30 @@ export type ProjectUpdateInput = {
1838
1963
  };
1839
1964
  export type ProjectUpdateOutput = Project.Info;
1840
1965
  export type ProjectUpdateOperation<E = never> = (input: ProjectUpdateInput) => Effect.Effect<ProjectUpdateOutput, E>;
1841
- export type ProjectCurrentInput = {
1842
- readonly location?: {
1843
- readonly directory?: string | undefined;
1844
- readonly workspace?: string | undefined;
1845
- } | undefined;
1846
- };
1847
- export type ProjectCurrentOutput = Project.Current;
1848
- export type ProjectCurrentOperation<E = never> = (input?: ProjectCurrentInput) => Effect.Effect<ProjectCurrentOutput, E>;
1849
1966
  export interface ProjectApi<E = never> {
1850
1967
  readonly list: ProjectListOperation<E>;
1851
1968
  readonly update: ProjectUpdateOperation<E>;
1852
- readonly current: ProjectCurrentOperation<E>;
1853
1969
  }
1854
- export type FormRequestListInput = {
1970
+ export type FormListInput = {
1855
1971
  readonly location?: {
1856
1972
  readonly directory?: string | undefined;
1857
- readonly workspace?: string | undefined;
1858
1973
  } | undefined;
1859
1974
  };
1860
- export type FormRequestListOutput = {
1861
- readonly location: Location.Info;
1975
+ export type FormListOutput = {
1976
+ readonly location: Location.PublicRef;
1862
1977
  readonly data: ReadonlyArray<Form.Info>;
1863
1978
  };
1864
- export type FormRequestListOperation<E = never> = (input?: FormRequestListInput) => Effect.Effect<FormRequestListOutput, E>;
1865
- export type FormListInput = {
1866
- readonly sessionID: string;
1867
- };
1868
- export type FormListOutput = ReadonlyArray<Form.Info>;
1869
- export type FormListOperation<E = never> = (input: FormListInput) => Effect.Effect<FormListOutput, E>;
1870
- export type FormCreateInput = {
1871
- readonly sessionID: string;
1872
- readonly id?: Form.ID | undefined;
1873
- readonly title: string;
1874
- readonly metadata?: Form.Metadata | undefined;
1875
- readonly fields: Form.Fields;
1876
- };
1877
- export type FormCreateOutput = Form.Info;
1878
- export type FormCreateOperation<E = never> = (input: FormCreateInput) => Effect.Effect<FormCreateOutput, E>;
1879
- export type FormGetInput = {
1880
- readonly sessionID: string;
1881
- readonly formID: Form.ID;
1882
- };
1883
- export type FormGetOutput = Form.Info;
1884
- export type FormGetOperation<E = never> = (input: FormGetInput) => Effect.Effect<FormGetOutput, E>;
1885
- export type FormStateInput = {
1886
- readonly sessionID: string;
1887
- readonly formID: Form.ID;
1888
- };
1889
- export type FormStateOutput = Form.State;
1890
- export type FormStateOperation<E = never> = (input: FormStateInput) => Effect.Effect<FormStateOutput, E>;
1891
- export type FormReplyInput = {
1892
- readonly sessionID: string;
1893
- readonly formID: Form.ID;
1894
- readonly answer: Form.Answer;
1895
- };
1896
- export type FormReplyOutput = void;
1897
- export type FormReplyOperation<E = never> = (input: FormReplyInput) => Effect.Effect<FormReplyOutput, E>;
1898
- export type FormCancelInput = {
1899
- readonly sessionID: string;
1900
- readonly formID: Form.ID;
1901
- };
1902
- export type FormCancelOutput = void;
1903
- export type FormCancelOperation<E = never> = (input: FormCancelInput) => Effect.Effect<FormCancelOutput, E>;
1979
+ export type FormListOperation<E = never> = (input?: FormListInput) => Effect.Effect<FormListOutput, E>;
1904
1980
  export interface FormApi<E = never> {
1905
- readonly request: {
1906
- readonly list: FormRequestListOperation<E>;
1907
- };
1908
1981
  readonly list: FormListOperation<E>;
1909
- readonly create: FormCreateOperation<E>;
1910
- readonly get: FormGetOperation<E>;
1911
- readonly state: FormStateOperation<E>;
1912
- readonly reply: FormReplyOperation<E>;
1913
- readonly cancel: FormCancelOperation<E>;
1914
1982
  }
1915
1983
  export type PermissionRequestListInput = {
1916
1984
  readonly location?: {
1917
1985
  readonly directory?: string | undefined;
1918
- readonly workspace?: string | undefined;
1919
1986
  } | undefined;
1920
1987
  };
1921
1988
  export type PermissionRequestListOutput = {
1922
- readonly location: Location.Info;
1989
+ readonly location: Location.PublicRef;
1923
1990
  readonly data: ReadonlyArray<Permission.Request>;
1924
1991
  };
1925
1992
  export type PermissionRequestListOperation<E = never> = (input?: PermissionRequestListInput) => Effect.Effect<PermissionRequestListOutput, E>;
@@ -1964,17 +2031,11 @@ export type PermissionGetOperation<E = never> = (input: PermissionGetInput) => E
1964
2031
  export type PermissionReplyInput = {
1965
2032
  readonly sessionID: Session.ID;
1966
2033
  readonly requestID: Permission.ID;
1967
- readonly reply: Permission.Reply;
2034
+ readonly decision: Permission.Reply;
1968
2035
  readonly message?: string | undefined;
1969
2036
  };
1970
2037
  export type PermissionReplyOutput = void;
1971
2038
  export type PermissionReplyOperation<E = never> = (input: PermissionReplyInput) => Effect.Effect<PermissionReplyOutput, E>;
1972
- export type PermissionRulesInput = {
1973
- readonly sessionID: Session.ID;
1974
- readonly permissions: Permission.Ruleset;
1975
- };
1976
- export type PermissionRulesOutput = void;
1977
- export type PermissionRulesOperation<E = never> = (input: PermissionRulesInput) => Effect.Effect<PermissionRulesOutput, E>;
1978
2039
  export interface PermissionApi<E = never> {
1979
2040
  readonly request: {
1980
2041
  readonly list: PermissionRequestListOperation<E>;
@@ -1987,31 +2048,28 @@ export interface PermissionApi<E = never> {
1987
2048
  readonly list: PermissionListOperation<E>;
1988
2049
  readonly get: PermissionGetOperation<E>;
1989
2050
  readonly reply: PermissionReplyOperation<E>;
1990
- readonly rules: PermissionRulesOperation<E>;
1991
2051
  }
1992
2052
  export type FileListInput = {
1993
2053
  readonly location?: {
1994
2054
  readonly directory?: string | undefined;
1995
- readonly workspace?: string | undefined;
1996
2055
  } | undefined;
1997
2056
  readonly path?: string | undefined;
1998
2057
  };
1999
2058
  export type FileListOutput = {
2000
- readonly location: Location.Info;
2059
+ readonly location: Location.PublicRef;
2001
2060
  readonly data: ReadonlyArray<FileSystem.Entry>;
2002
2061
  };
2003
2062
  export type FileListOperation<E = never> = (input?: FileListInput) => Effect.Effect<FileListOutput, E>;
2004
2063
  export type FileFindInput = {
2005
2064
  readonly location?: {
2006
2065
  readonly directory?: string | undefined;
2007
- readonly workspace?: string | undefined;
2008
2066
  } | undefined;
2009
2067
  readonly query: string;
2010
2068
  readonly type?: "file" | "directory" | undefined;
2011
2069
  readonly limit?: number | undefined;
2012
2070
  };
2013
2071
  export type FileFindOutput = {
2014
- readonly location: Location.Info;
2072
+ readonly location: Location.PublicRef;
2015
2073
  readonly data: ReadonlyArray<FileSystem.Entry>;
2016
2074
  };
2017
2075
  export type FileFindOperation<E = never> = (input: FileFindInput) => Effect.Effect<FileFindOutput, E>;
@@ -2022,11 +2080,10 @@ export interface FileApi<E = never> {
2022
2080
  export type CommandListInput = {
2023
2081
  readonly location?: {
2024
2082
  readonly directory?: string | undefined;
2025
- readonly workspace?: string | undefined;
2026
2083
  } | undefined;
2027
2084
  };
2028
2085
  export type CommandListOutput = {
2029
- readonly location: Location.Info;
2086
+ readonly location: Location.PublicRef;
2030
2087
  readonly data: ReadonlyArray<Command.Info>;
2031
2088
  };
2032
2089
  export type CommandListOperation<E = never> = (input?: CommandListInput) => Effect.Effect<CommandListOutput, E>;
@@ -2036,11 +2093,10 @@ export interface CommandApi<E = never> {
2036
2093
  export type SkillListInput = {
2037
2094
  readonly location?: {
2038
2095
  readonly directory?: string | undefined;
2039
- readonly workspace?: string | undefined;
2040
2096
  } | undefined;
2041
2097
  };
2042
2098
  export type SkillListOutput = {
2043
- readonly location: Location.Info;
2099
+ readonly location: Location.PublicRef;
2044
2100
  readonly data: ReadonlyArray<Skill.Info>;
2045
2101
  };
2046
2102
  export type SkillListOperation<E = never> = (input?: SkillListInput) => Effect.Effect<SkillListOutput, E>;
@@ -2052,7 +2108,6 @@ export type RpcCallInput = {
2052
2108
  readonly method: string;
2053
2109
  readonly location?: {
2054
2110
  readonly directory?: string | undefined;
2055
- readonly workspace?: string | undefined;
2056
2111
  } | undefined;
2057
2112
  readonly input?: unknown | undefined;
2058
2113
  };
@@ -2071,18 +2126,16 @@ export interface EventApi<E = never> {
2071
2126
  export type PtyListInput = {
2072
2127
  readonly location?: {
2073
2128
  readonly directory?: string | undefined;
2074
- readonly workspace?: string | undefined;
2075
2129
  } | undefined;
2076
2130
  };
2077
2131
  export type PtyListOutput = {
2078
- readonly location: Location.Info;
2132
+ readonly location: Location.PublicRef;
2079
2133
  readonly data: ReadonlyArray<Pty.Info>;
2080
2134
  };
2081
2135
  export type PtyListOperation<E = never> = (input?: PtyListInput) => Effect.Effect<PtyListOutput, E>;
2082
2136
  export type PtyCreateInput = {
2083
2137
  readonly location?: {
2084
2138
  readonly directory?: string | undefined;
2085
- readonly workspace?: string | undefined;
2086
2139
  } | undefined;
2087
2140
  readonly command?: string | undefined;
2088
2141
  readonly args?: ReadonlyArray<string> | undefined;
@@ -2093,7 +2146,7 @@ export type PtyCreateInput = {
2093
2146
  } | undefined;
2094
2147
  };
2095
2148
  export type PtyCreateOutput = {
2096
- readonly location: Location.Info;
2149
+ readonly location: Location.PublicRef;
2097
2150
  readonly data: Pty.Info;
2098
2151
  };
2099
2152
  export type PtyCreateOperation<E = never> = (input?: PtyCreateInput) => Effect.Effect<PtyCreateOutput, E>;
@@ -2101,11 +2154,10 @@ export type PtyGetInput = {
2101
2154
  readonly ptyID: Pty.ID;
2102
2155
  readonly location?: {
2103
2156
  readonly directory?: string | undefined;
2104
- readonly workspace?: string | undefined;
2105
2157
  } | undefined;
2106
2158
  };
2107
2159
  export type PtyGetOutput = {
2108
- readonly location: Location.Info;
2160
+ readonly location: Location.PublicRef;
2109
2161
  readonly data: Pty.Info;
2110
2162
  };
2111
2163
  export type PtyGetOperation<E = never> = (input: PtyGetInput) => Effect.Effect<PtyGetOutput, E>;
@@ -2113,7 +2165,6 @@ export type PtyUpdateInput = {
2113
2165
  readonly ptyID: Pty.ID;
2114
2166
  readonly location?: {
2115
2167
  readonly directory?: string | undefined;
2116
- readonly workspace?: string | undefined;
2117
2168
  } | undefined;
2118
2169
  readonly title?: string | undefined;
2119
2170
  readonly size?: {
@@ -2122,7 +2173,7 @@ export type PtyUpdateInput = {
2122
2173
  } | undefined;
2123
2174
  };
2124
2175
  export type PtyUpdateOutput = {
2125
- readonly location: Location.Info;
2176
+ readonly location: Location.PublicRef;
2126
2177
  readonly data: Pty.Info;
2127
2178
  };
2128
2179
  export type PtyUpdateOperation<E = never> = (input: PtyUpdateInput) => Effect.Effect<PtyUpdateOutput, E>;
@@ -2130,7 +2181,6 @@ export type PtyRemoveInput = {
2130
2181
  readonly ptyID: Pty.ID;
2131
2182
  readonly location?: {
2132
2183
  readonly directory?: string | undefined;
2133
- readonly workspace?: string | undefined;
2134
2184
  } | undefined;
2135
2185
  };
2136
2186
  export type PtyRemoveOutput = void;
@@ -2139,12 +2189,11 @@ export type PtyConnectTokenInput = {
2139
2189
  readonly ptyID: Pty.ID;
2140
2190
  readonly location?: {
2141
2191
  readonly directory?: string | undefined;
2142
- readonly workspace?: string | undefined;
2143
2192
  } | undefined;
2144
2193
  readonly "x-opencode-ticket"?: string | undefined;
2145
2194
  };
2146
2195
  export type PtyConnectTokenOutput = {
2147
- readonly location: Location.Info;
2196
+ readonly location: Location.PublicRef;
2148
2197
  readonly data: PtyTicket.ConnectToken;
2149
2198
  };
2150
2199
  export type PtyConnectTokenOperation<E = never> = (input: PtyConnectTokenInput) => Effect.Effect<PtyConnectTokenOutput, E>;
@@ -2361,28 +2410,26 @@ export interface ExperimentalApi<E = never> {
2361
2410
  export type ShellListInput = {
2362
2411
  readonly location?: {
2363
2412
  readonly directory?: string | undefined;
2364
- readonly workspace?: string | undefined;
2365
2413
  } | undefined;
2366
2414
  };
2367
2415
  export type ShellListOutput = {
2368
- readonly location: Location.Info;
2416
+ readonly location: Location.PublicRef;
2369
2417
  readonly data: ReadonlyArray<Shell.Info>;
2370
2418
  };
2371
2419
  export type ShellListOperation<E = never> = (input?: ShellListInput) => Effect.Effect<ShellListOutput, E>;
2372
2420
  export type ShellCreateInput = {
2373
2421
  readonly location?: {
2374
2422
  readonly directory?: string | undefined;
2375
- readonly workspace?: string | undefined;
2376
2423
  } | undefined;
2377
2424
  readonly command: string;
2378
2425
  readonly cwd?: string | undefined;
2379
- readonly timeout: number;
2426
+ readonly timeout?: number | undefined;
2380
2427
  readonly metadata?: {
2381
2428
  readonly [x: string]: unknown;
2382
2429
  } | undefined;
2383
2430
  };
2384
2431
  export type ShellCreateOutput = {
2385
- readonly location: Location.Info;
2432
+ readonly location: Location.PublicRef;
2386
2433
  readonly data: Shell.Info;
2387
2434
  };
2388
2435
  export type ShellCreateOperation<E = never> = (input: ShellCreateInput) => Effect.Effect<ShellCreateOutput, E>;
@@ -2390,38 +2437,23 @@ export type ShellGetInput = {
2390
2437
  readonly id: Shell.ID;
2391
2438
  readonly location?: {
2392
2439
  readonly directory?: string | undefined;
2393
- readonly workspace?: string | undefined;
2394
2440
  } | undefined;
2395
2441
  };
2396
2442
  export type ShellGetOutput = {
2397
- readonly location: Location.Info;
2443
+ readonly location: Location.PublicRef;
2398
2444
  readonly data: Shell.Info;
2399
2445
  };
2400
2446
  export type ShellGetOperation<E = never> = (input: ShellGetInput) => Effect.Effect<ShellGetOutput, E>;
2401
- export type ShellTimeoutInput = {
2402
- readonly id: Shell.ID;
2403
- readonly location?: {
2404
- readonly directory?: string | undefined;
2405
- readonly workspace?: string | undefined;
2406
- } | undefined;
2407
- readonly timeout: number;
2408
- };
2409
- export type ShellTimeoutOutput = {
2410
- readonly location: Location.Info;
2411
- readonly data: Shell.Info;
2412
- };
2413
- export type ShellTimeoutOperation<E = never> = (input: ShellTimeoutInput) => Effect.Effect<ShellTimeoutOutput, E>;
2414
2447
  export type ShellOutputInput = {
2415
2448
  readonly id: Shell.ID;
2416
2449
  readonly location?: {
2417
2450
  readonly directory?: string | undefined;
2418
- readonly workspace?: string | undefined;
2419
2451
  } | undefined;
2420
2452
  readonly cursor?: number | undefined;
2421
2453
  readonly limit?: number | undefined;
2422
2454
  };
2423
2455
  export type ShellOutputOutput = {
2424
- readonly location: Location.Info;
2456
+ readonly location: Location.PublicRef;
2425
2457
  readonly data: {
2426
2458
  readonly output: string;
2427
2459
  readonly cursor: number;
@@ -2434,7 +2466,6 @@ export type ShellRemoveInput = {
2434
2466
  readonly id: Shell.ID;
2435
2467
  readonly location?: {
2436
2468
  readonly directory?: string | undefined;
2437
- readonly workspace?: string | undefined;
2438
2469
  } | undefined;
2439
2470
  };
2440
2471
  export type ShellRemoveOutput = void;
@@ -2443,18 +2474,16 @@ export interface ShellApi<E = never> {
2443
2474
  readonly list: ShellListOperation<E>;
2444
2475
  readonly create: ShellCreateOperation<E>;
2445
2476
  readonly get: ShellGetOperation<E>;
2446
- readonly timeout: ShellTimeoutOperation<E>;
2447
2477
  readonly output: ShellOutputOperation<E>;
2448
2478
  readonly remove: ShellRemoveOperation<E>;
2449
2479
  }
2450
2480
  export type ReferenceListInput = {
2451
2481
  readonly location?: {
2452
2482
  readonly directory?: string | undefined;
2453
- readonly workspace?: string | undefined;
2454
2483
  } | undefined;
2455
2484
  };
2456
2485
  export type ReferenceListOutput = {
2457
- readonly location: Location.Info;
2486
+ readonly location: Location.PublicRef;
2458
2487
  readonly data: ReadonlyArray<Reference.Info>;
2459
2488
  };
2460
2489
  export type ReferenceListOperation<E = never> = (input?: ReferenceListInput) => Effect.Effect<ReferenceListOutput, E>;
@@ -2462,122 +2491,89 @@ export interface ReferenceApi<E = never> {
2462
2491
  readonly list: ReferenceListOperation<E>;
2463
2492
  }
2464
2493
  export type WorktreeListInput = {
2465
- readonly location?: {
2466
- readonly directory?: string | undefined;
2467
- readonly workspace?: string | undefined;
2468
- } | undefined;
2494
+ readonly projectID: Project.ID;
2469
2495
  };
2470
2496
  export type WorktreeListOutput = Worktree.List;
2471
- export type WorktreeListOperation<E = never> = (input?: WorktreeListInput) => Effect.Effect<WorktreeListOutput, E>;
2497
+ export type WorktreeListOperation<E = never> = (input: WorktreeListInput) => Effect.Effect<WorktreeListOutput, E>;
2472
2498
  export type WorktreeCreateInput = {
2473
- readonly location?: {
2474
- readonly directory?: string | undefined;
2475
- readonly workspace?: string | undefined;
2476
- } | undefined;
2477
- readonly strategy?: Worktree.StrategyID | undefined;
2499
+ readonly projectID: Project.ID;
2478
2500
  readonly from?: AbsolutePath | undefined;
2479
2501
  readonly branch?: string | undefined;
2480
2502
  readonly directory?: AbsolutePath | undefined;
2481
2503
  readonly name?: string | undefined;
2482
2504
  };
2483
2505
  export type WorktreeCreateOutput = Worktree.Info;
2484
- export type WorktreeCreateOperation<E = never> = (input?: WorktreeCreateInput) => Effect.Effect<WorktreeCreateOutput, E>;
2506
+ export type WorktreeCreateOperation<E = never> = (input: WorktreeCreateInput) => Effect.Effect<WorktreeCreateOutput, E>;
2485
2507
  export type WorktreeRemoveInput = {
2486
- readonly location?: {
2487
- readonly directory?: string | undefined;
2488
- readonly workspace?: string | undefined;
2489
- } | undefined;
2508
+ readonly projectID: Project.ID;
2490
2509
  readonly directory: AbsolutePath;
2491
2510
  readonly force: boolean;
2492
2511
  };
2493
2512
  export type WorktreeRemoveOutput = void;
2494
2513
  export type WorktreeRemoveOperation<E = never> = (input: WorktreeRemoveInput) => Effect.Effect<WorktreeRemoveOutput, E>;
2495
2514
  export type WorktreeRefreshInput = {
2496
- readonly location?: {
2497
- readonly directory?: string | undefined;
2498
- readonly workspace?: string | undefined;
2499
- } | undefined;
2515
+ readonly projectID: Project.ID;
2500
2516
  };
2501
2517
  export type WorktreeRefreshOutput = void;
2502
- export type WorktreeRefreshOperation<E = never> = (input?: WorktreeRefreshInput) => Effect.Effect<WorktreeRefreshOutput, E>;
2518
+ export type WorktreeRefreshOperation<E = never> = (input: WorktreeRefreshInput) => Effect.Effect<WorktreeRefreshOutput, E>;
2503
2519
  export interface WorktreeApi<E = never> {
2504
2520
  readonly list: WorktreeListOperation<E>;
2505
2521
  readonly create: WorktreeCreateOperation<E>;
2506
2522
  readonly remove: WorktreeRemoveOperation<E>;
2507
2523
  readonly refresh: WorktreeRefreshOperation<E>;
2508
2524
  }
2509
- export type WorkspaceCreateInput = {
2510
- readonly id?: Workspace.ID | undefined;
2511
- readonly provider: string;
2512
- };
2513
- export type WorkspaceCreateOutput = Workspace.ID;
2514
- export type WorkspaceCreateOperation<E = never> = (input: WorkspaceCreateInput) => Effect.Effect<WorkspaceCreateOutput, E>;
2515
- export type WorkspaceDestroyInput = {
2516
- readonly workspaceID: Workspace.ID;
2517
- };
2518
- export type WorkspaceDestroyOutput = Workspace.DestroyResult;
2519
- export type WorkspaceDestroyOperation<E = never> = (input: WorkspaceDestroyInput) => Effect.Effect<WorkspaceDestroyOutput, E>;
2520
- export interface WorkspaceApi<E = never> {
2521
- readonly create: WorkspaceCreateOperation<E>;
2522
- readonly destroy: WorkspaceDestroyOperation<E>;
2523
- }
2524
2525
  export type VcsGetInput = {
2525
2526
  readonly location?: {
2526
2527
  readonly directory?: string | undefined;
2527
- readonly workspace?: string | undefined;
2528
2528
  } | undefined;
2529
2529
  };
2530
2530
  export type VcsGetOutput = {
2531
- readonly location: Location.Info;
2531
+ readonly location: Location.PublicRef;
2532
2532
  readonly data: Vcs.Info;
2533
2533
  };
2534
2534
  export type VcsGetOperation<E = never> = (input?: VcsGetInput) => Effect.Effect<VcsGetOutput, E>;
2535
2535
  export type VcsBaseInput = {
2536
2536
  readonly location?: {
2537
2537
  readonly directory?: string | undefined;
2538
- readonly workspace?: string | undefined;
2539
2538
  } | undefined;
2540
2539
  };
2541
2540
  export type VcsBaseOutput = {
2542
- readonly location: Location.Info;
2541
+ readonly location: Location.PublicRef;
2543
2542
  readonly data: Vcs.Base | null;
2544
2543
  };
2545
2544
  export type VcsBaseOperation<E = never> = (input?: VcsBaseInput) => Effect.Effect<VcsBaseOutput, E>;
2546
2545
  export type VcsStatusInput = {
2547
2546
  readonly location?: {
2548
2547
  readonly directory?: string | undefined;
2549
- readonly workspace?: string | undefined;
2550
2548
  } | undefined;
2551
2549
  };
2552
2550
  export type VcsStatusOutput = {
2553
- readonly location: Location.Info;
2551
+ readonly location: Location.PublicRef;
2554
2552
  readonly data: ReadonlyArray<Vcs.FileStatus>;
2555
2553
  };
2556
2554
  export type VcsStatusOperation<E = never> = (input?: VcsStatusInput) => Effect.Effect<VcsStatusOutput, E>;
2557
- export type VcsBranchesInput = {
2555
+ export type VcsBranchListInput = {
2558
2556
  readonly location?: {
2559
2557
  readonly directory?: string | undefined;
2560
- readonly workspace?: string | undefined;
2561
2558
  } | undefined;
2562
2559
  readonly search?: string | undefined;
2563
2560
  readonly limit?: number | undefined;
2564
2561
  };
2565
- export type VcsBranchesOutput = {
2566
- readonly location: Location.Info;
2562
+ export type VcsBranchListOutput = {
2563
+ readonly location: Location.PublicRef;
2567
2564
  readonly data: Vcs.BranchList;
2568
2565
  };
2569
- export type VcsBranchesOperation<E = never> = (input?: VcsBranchesInput) => Effect.Effect<VcsBranchesOutput, E>;
2566
+ export type VcsBranchListOperation<E = never> = (input?: VcsBranchListInput) => Effect.Effect<VcsBranchListOutput, E>;
2570
2567
  export type VcsDiffInput = {
2571
2568
  readonly location?: {
2572
2569
  readonly directory?: string | undefined;
2573
- readonly workspace?: string | undefined;
2574
2570
  } | undefined;
2575
2571
  readonly mode: Vcs.Mode;
2576
2572
  readonly base?: string | undefined;
2577
2573
  readonly context?: number | undefined;
2578
2574
  };
2579
2575
  export type VcsDiffOutput = {
2580
- readonly location: Location.Info;
2576
+ readonly location: Location.PublicRef;
2581
2577
  readonly data: ReadonlyArray<FileDiff.Info>;
2582
2578
  };
2583
2579
  export type VcsDiffOperation<E = never> = (input: VcsDiffInput) => Effect.Effect<VcsDiffOutput, E>;
@@ -2585,15 +2581,16 @@ export interface VcsApi<E = never> {
2585
2581
  readonly get: VcsGetOperation<E>;
2586
2582
  readonly base: VcsBaseOperation<E>;
2587
2583
  readonly status: VcsStatusOperation<E>;
2588
- readonly branches: VcsBranchesOperation<E>;
2584
+ readonly branch: {
2585
+ readonly list: VcsBranchListOperation<E>;
2586
+ };
2589
2587
  readonly diff: VcsDiffOperation<E>;
2590
2588
  }
2591
- export type DebugLocationListOutput = ReadonlyArray<Location.Ref>;
2589
+ export type DebugLocationListOutput = ReadonlyArray<Location.PublicRef>;
2592
2590
  export type DebugLocationListOperation<E = never> = () => Effect.Effect<DebugLocationListOutput, E>;
2593
2591
  export type DebugLocationEvictInput = {
2594
2592
  readonly location?: {
2595
2593
  readonly directory?: string | undefined;
2596
- readonly workspace?: string | undefined;
2597
2594
  } | undefined;
2598
2595
  };
2599
2596
  export type DebugLocationEvictOutput = void;
@@ -2626,24 +2623,22 @@ export interface MigrationApi<E = never> {
2626
2623
  export type WebsearchProvidersInput = {
2627
2624
  readonly location?: {
2628
2625
  readonly directory?: string | undefined;
2629
- readonly workspace?: string | undefined;
2630
2626
  } | undefined;
2631
2627
  };
2632
2628
  export type WebsearchProvidersOutput = {
2633
- readonly location: Location.Info;
2629
+ readonly location: Location.PublicRef;
2634
2630
  readonly data: ReadonlyArray<WebSearch.Provider>;
2635
2631
  };
2636
2632
  export type WebsearchProvidersOperation<E = never> = (input?: WebsearchProvidersInput) => Effect.Effect<WebsearchProvidersOutput, E>;
2637
2633
  export type WebsearchQueryInput = {
2638
2634
  readonly location?: {
2639
2635
  readonly directory?: string | undefined;
2640
- readonly workspace?: string | undefined;
2641
2636
  } | undefined;
2642
2637
  readonly query: string;
2643
2638
  readonly providerID?: WebSearch.ID | undefined;
2644
2639
  };
2645
2640
  export type WebsearchQueryOutput = {
2646
- readonly location: Location.Info;
2641
+ readonly location: Location.PublicRef;
2647
2642
  readonly data: WebSearch.Response;
2648
2643
  };
2649
2644
  export type WebsearchQueryOperation<E = never> = (input: WebsearchQueryInput) => Effect.Effect<WebsearchQueryOutput, E>;
@@ -2654,35 +2649,27 @@ export interface WebsearchApi<E = never> {
2654
2649
  export type ConfigGetInput = {
2655
2650
  readonly location?: {
2656
2651
  readonly directory?: string | undefined;
2657
- readonly workspace?: string | undefined;
2658
2652
  } | undefined;
2659
2653
  };
2660
2654
  export type ConfigGetOutput = ReadonlyArray<Config.Entry>;
2661
2655
  export type ConfigGetOperation<E = never> = (input?: ConfigGetInput) => Effect.Effect<ConfigGetOutput, E>;
2662
- export type ConfigPreferencesOutput = Config.Preferences;
2663
- export type ConfigPreferencesOperation<E = never> = () => Effect.Effect<ConfigPreferencesOutput, E>;
2664
- export type ConfigUpdatePreferencesInput = {
2665
- readonly shell?: string | null | undefined;
2666
- readonly websearch?: false | {
2667
- readonly provider: "random" | WebSearch.ID;
2668
- } | null | undefined;
2669
- };
2670
- export type ConfigUpdatePreferencesOutput = Config.Preferences;
2671
- export type ConfigUpdatePreferencesOperation<E = never> = (input?: ConfigUpdatePreferencesInput) => Effect.Effect<ConfigUpdatePreferencesOutput, E>;
2672
2656
  export type ConfigShellsOutput = ReadonlyArray<{
2673
2657
  readonly path: string;
2674
2658
  readonly name: string;
2675
2659
  readonly acceptable: boolean;
2676
2660
  }>;
2677
2661
  export type ConfigShellsOperation<E = never> = () => Effect.Effect<ConfigShellsOutput, E>;
2662
+ export type ConfigUpdateInput = {
2663
+ readonly shell: string | null;
2664
+ };
2665
+ export type ConfigUpdateOutput = void;
2666
+ export type ConfigUpdateOperation<E = never> = (input: ConfigUpdateInput) => Effect.Effect<ConfigUpdateOutput, E>;
2678
2667
  export interface ConfigApi<E = never> {
2679
2668
  readonly get: ConfigGetOperation<E>;
2680
- readonly preferences: ConfigPreferencesOperation<E>;
2681
- readonly updatePreferences: ConfigUpdatePreferencesOperation<E>;
2682
2669
  readonly shells: ConfigShellsOperation<E>;
2670
+ readonly update: ConfigUpdateOperation<E>;
2683
2671
  }
2684
2672
  export interface AppApi<E = never> {
2685
- readonly health: HealthApi<E>;
2686
2673
  readonly server: ServerApi<E>;
2687
2674
  readonly location: LocationApi<E>;
2688
2675
  readonly agent: AgentApi<E>;
@@ -2708,7 +2695,6 @@ export interface AppApi<E = never> {
2708
2695
  readonly shell: ShellApi<E>;
2709
2696
  readonly reference: ReferenceApi<E>;
2710
2697
  readonly worktree: WorktreeApi<E>;
2711
- readonly workspace: WorkspaceApi<E>;
2712
2698
  readonly vcs: VcsApi<E>;
2713
2699
  readonly debug: DebugApi<E>;
2714
2700
  readonly migration: MigrationApi<E>;