@opencode/protocol 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.
Files changed (69) hide show
  1. package/dist/api.d.ts +4 -6
  2. package/dist/api.js +4 -8
  3. package/dist/client.d.ts +0 -2
  4. package/dist/client.js +0 -2
  5. package/dist/errors.d.ts +20 -0
  6. package/dist/errors.js +17 -0
  7. package/dist/groups/agent.d.ts +6 -5
  8. package/dist/groups/agent.js +2 -2
  9. package/dist/groups/command.d.ts +3 -3
  10. package/dist/groups/command.js +1 -1
  11. package/dist/groups/config.d.ts +5 -13
  12. package/dist/groups/config.js +11 -18
  13. package/dist/groups/credential.d.ts +3 -18
  14. package/dist/groups/credential.js +3 -10
  15. package/dist/groups/debug.d.ts +0 -8
  16. package/dist/groups/debug.js +3 -3
  17. package/dist/groups/event.d.ts +99 -74
  18. package/dist/groups/event.js +3 -3
  19. package/dist/groups/form.d.ts +6 -654
  20. package/dist/groups/form.js +6 -83
  21. package/dist/groups/fs.d.ts +6 -6
  22. package/dist/groups/fs.js +3 -3
  23. package/dist/groups/generate.d.ts +1 -1
  24. package/dist/groups/generate.js +2 -2
  25. package/dist/groups/integration.d.ts +27 -27
  26. package/dist/groups/integration.js +19 -16
  27. package/dist/groups/location.d.ts +10 -4
  28. package/dist/groups/location.js +2 -3
  29. package/dist/groups/mcp.d.ts +11 -13
  30. package/dist/groups/mcp.js +10 -10
  31. package/dist/groups/message.d.ts +710 -41
  32. package/dist/groups/message.js +26 -3
  33. package/dist/groups/migration.js +1 -1
  34. package/dist/groups/model.d.ts +12 -9
  35. package/dist/groups/model.js +2 -2
  36. package/dist/groups/permission.d.ts +9 -16
  37. package/dist/groups/permission.js +8 -20
  38. package/dist/groups/persistent-pty.js +1 -1
  39. package/dist/groups/plugin.d.ts +7 -12
  40. package/dist/groups/plugin.js +3 -13
  41. package/dist/groups/project.d.ts +1 -14
  42. package/dist/groups/project.js +2 -13
  43. package/dist/groups/provider.d.ts +8 -7
  44. package/dist/groups/provider.js +2 -2
  45. package/dist/groups/pty.d.ts +15 -12
  46. package/dist/groups/pty.js +8 -8
  47. package/dist/groups/reference.d.ts +8 -12
  48. package/dist/groups/reference.js +16 -3
  49. package/dist/groups/rpc.d.ts +0 -1
  50. package/dist/groups/rpc.js +1 -1
  51. package/dist/groups/server.d.ts +9 -1
  52. package/dist/groups/server.js +11 -5
  53. package/dist/groups/session.d.ts +1146 -787
  54. package/dist/groups/session.js +192 -93
  55. package/dist/groups/shell.d.ts +13 -43
  56. package/dist/groups/shell.js +6 -24
  57. package/dist/groups/skill.d.ts +4 -5
  58. package/dist/groups/skill.js +1 -1
  59. package/dist/groups/vcs.d.ts +17 -12
  60. package/dist/groups/vcs.js +6 -6
  61. package/dist/groups/websearch.d.ts +6 -5
  62. package/dist/groups/websearch.js +2 -2
  63. package/dist/groups/worktree.d.ts +17 -23
  64. package/dist/groups/worktree.js +21 -30
  65. package/package.json +2 -2
  66. package/dist/groups/health.d.ts +0 -15
  67. package/dist/groups/health.js +0 -20
  68. package/dist/groups/workspace.d.ts +0 -22
  69. package/dist/groups/workspace.js +0 -27
@@ -11,13 +11,6 @@ export declare const makeEventGroup: <const Definitions extends ReadonlyArray<De
11
11
  readonly type: Schema.TemplateLiteral<readonly ["rpc.", Schema.String]>;
12
12
  readonly location: Schema.Struct<{
13
13
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
14
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
15
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
16
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
17
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
18
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
19
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
20
- }>, never, never>;
21
14
  }>;
22
15
  readonly data: Schema.$Record<Schema.String, Schema.Unknown>;
23
16
  }>, ...Schema.Struct<{
@@ -29,19 +22,11 @@ export declare const makeEventGroup: <const Definitions extends ReadonlyArray<De
29
22
  readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
30
23
  readonly location: Schema.optional<Schema.Struct<{
31
24
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
32
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
33
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
34
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
35
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
36
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
37
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
38
- }>, never, never>;
39
25
  }>>;
40
26
  }>[]]>>, Schema.Never, (readonly [...{ [K in keyof Definitions]: Definitions[K]["Type"]; }, {
41
27
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
42
28
  readonly location: {
43
29
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
44
- readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
45
30
  };
46
31
  readonly data: {
47
32
  readonly [x: string]: unknown;
@@ -57,7 +42,6 @@ export declare const makeEventGroup: <const Definitions extends ReadonlyArray<De
57
42
  readonly type: "server.connected";
58
43
  readonly location?: {
59
44
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
60
- readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
61
45
  } | undefined;
62
46
  readonly metadata?: {
63
47
  readonly [x: string]: unknown;
@@ -207,7 +191,39 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
207
191
  };
208
192
  readonly created: Schema.Finite;
209
193
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
210
- readonly type: Schema.Literal<"catalog.updated">;
194
+ readonly type: Schema.Literal<"provider.updated">;
195
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
196
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
197
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
198
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
199
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
200
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
201
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
202
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
203
+ }>, never, never>;
204
+ }>>>, Schema.optionalKey<Schema.Struct<{
205
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
206
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
207
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
208
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
209
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
210
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
211
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
212
+ }>, never, never>;
213
+ }>>, never, never>;
214
+ readonly data: Schema.Struct<{}>;
215
+ }> & {
216
+ type: "provider.updated";
217
+ durability: "ephemeral";
218
+ durable: undefined;
219
+ data: Schema.Struct<{}>;
220
+ }, Schema.Struct<{
221
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
222
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
223
+ };
224
+ readonly created: Schema.Finite;
225
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
226
+ readonly type: Schema.Literal<"model.updated">;
211
227
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
212
228
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
213
229
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
@@ -229,7 +245,7 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
229
245
  }>>, never, never>;
230
246
  readonly data: Schema.Struct<{}>;
231
247
  }> & {
232
- type: "catalog.updated";
248
+ type: "model.updated";
233
249
  durability: "ephemeral";
234
250
  durable: undefined;
235
251
  data: Schema.Struct<{}>;
@@ -851,7 +867,7 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
851
867
  };
852
868
  readonly created: Schema.Finite;
853
869
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
854
- readonly type: Schema.Literal<"session.permissions.updated">;
870
+ readonly type: Schema.Literal<"session.permissions">;
855
871
  readonly durable: Schema.Struct<{
856
872
  readonly aggregateID: Schema.String;
857
873
  readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
@@ -888,7 +904,7 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
888
904
  };
889
905
  }>;
890
906
  }> & {
891
- type: "session.permissions.updated";
907
+ type: "session.permissions";
892
908
  durability: "durable";
893
909
  durable: {
894
910
  readonly version: number;
@@ -4603,7 +4619,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
4603
4619
  readonly time: Schema.Struct<{
4604
4620
  readonly created: Schema.Int;
4605
4621
  readonly updated: Schema.Int;
4606
- readonly initialized: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
4607
4622
  }>;
4608
4623
  readonly sandboxes: Schema.$Array<Schema.String>;
4609
4624
  }>;
@@ -4635,7 +4650,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
4635
4650
  readonly time: Schema.Struct<{
4636
4651
  readonly created: Schema.Int;
4637
4652
  readonly updated: Schema.Int;
4638
- readonly initialized: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
4639
4653
  }>;
4640
4654
  readonly sandboxes: Schema.$Array<Schema.String>;
4641
4655
  }>;
@@ -6218,13 +6232,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
6218
6232
  readonly type: Schema.TemplateLiteral<readonly ["rpc.", Schema.String]>;
6219
6233
  readonly location: Schema.Struct<{
6220
6234
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
6221
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
6222
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6223
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6224
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
6225
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6226
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6227
- }>, never, never>;
6228
6235
  }>;
6229
6236
  readonly data: Schema.$Record<Schema.String, Schema.Unknown>;
6230
6237
  }>, ...Schema.Struct<{
@@ -6236,13 +6243,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
6236
6243
  readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
6237
6244
  readonly location: Schema.optional<Schema.Struct<{
6238
6245
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
6239
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
6240
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6241
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6242
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
6243
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6244
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6245
- }>, never, never>;
6246
6246
  }>>;
6247
6247
  }>[]]>>, Schema.Never, {
6248
6248
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
@@ -6261,8 +6261,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
6261
6261
  readonly data: {
6262
6262
  readonly form: {
6263
6263
  readonly id: string & import("effect/Brand").Brand<"Form.ID">;
6264
- readonly sessionID: string;
6265
- readonly title: string;
6266
6264
  readonly fields: readonly [{
6267
6265
  readonly type: "string";
6268
6266
  readonly key: string;
@@ -6442,6 +6440,8 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
6442
6440
  readonly description?: string | undefined;
6443
6441
  readonly title?: string | undefined;
6444
6442
  })[]];
6443
+ readonly sessionID: string;
6444
+ readonly title: string;
6445
6445
  readonly metadata?: {
6446
6446
  readonly [x: string]: unknown;
6447
6447
  } | undefined;
@@ -6528,6 +6528,30 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
6528
6528
  readonly metadata?: {
6529
6529
  readonly [x: string]: unknown;
6530
6530
  } | undefined;
6531
+ } | {
6532
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
6533
+ readonly data: {};
6534
+ readonly type: "provider.updated";
6535
+ readonly created: number;
6536
+ readonly location?: {
6537
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
6538
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
6539
+ } | undefined;
6540
+ readonly metadata?: {
6541
+ readonly [x: string]: unknown;
6542
+ } | undefined;
6543
+ } | {
6544
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
6545
+ readonly data: {};
6546
+ readonly type: "model.updated";
6547
+ readonly created: number;
6548
+ readonly location?: {
6549
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
6550
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
6551
+ } | undefined;
6552
+ readonly metadata?: {
6553
+ readonly [x: string]: unknown;
6554
+ } | undefined;
6531
6555
  } | {
6532
6556
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
6533
6557
  readonly data: {
@@ -6591,7 +6615,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
6591
6615
  readonly time: {
6592
6616
  readonly created: number;
6593
6617
  readonly updated: number;
6594
- readonly initialized?: number | undefined;
6595
6618
  };
6596
6619
  readonly sandboxes: readonly string[];
6597
6620
  readonly name?: string | undefined;
@@ -6827,7 +6850,7 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
6827
6850
  readonly seq: number & import("effect/Brand").Brand<"Event.Seq">;
6828
6851
  readonly version: number & import("effect/Brand").Brand<"Event.Version">;
6829
6852
  };
6830
- readonly type: "session.permissions.updated";
6853
+ readonly type: "session.permissions";
6831
6854
  readonly created: number;
6832
6855
  readonly location?: {
6833
6856
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
@@ -8021,18 +8044,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
8021
8044
  readonly metadata?: {
8022
8045
  readonly [x: string]: unknown;
8023
8046
  } | undefined;
8024
- } | {
8025
- readonly id: string & import("effect/Brand").Brand<"Event.ID">;
8026
- readonly data: {};
8027
- readonly type: "catalog.updated";
8028
- readonly created: number;
8029
- readonly location?: {
8030
- readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
8031
- readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
8032
- } | undefined;
8033
- readonly metadata?: {
8034
- readonly [x: string]: unknown;
8035
- } | undefined;
8036
8047
  } | {
8037
8048
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
8038
8049
  readonly data: {};
@@ -8432,7 +8443,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
8432
8443
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
8433
8444
  readonly location: {
8434
8445
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
8435
- readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
8436
8446
  };
8437
8447
  readonly data: {
8438
8448
  readonly [x: string]: unknown;
@@ -8448,7 +8458,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
8448
8458
  readonly type: "server.connected";
8449
8459
  readonly location?: {
8450
8460
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
8451
- readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
8452
8461
  } | undefined;
8453
8462
  readonly metadata?: {
8454
8463
  readonly [x: string]: unknown;
@@ -8598,7 +8607,7 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
8598
8607
  };
8599
8608
  readonly created: Schema.Finite;
8600
8609
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
8601
- readonly type: Schema.Literal<"catalog.updated">;
8610
+ readonly type: Schema.Literal<"provider.updated">;
8602
8611
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
8603
8612
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
8604
8613
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
@@ -8620,7 +8629,39 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
8620
8629
  }>>, never, never>;
8621
8630
  readonly data: Schema.Struct<{}>;
8622
8631
  }> & {
8623
- type: "catalog.updated";
8632
+ type: "provider.updated";
8633
+ durability: "ephemeral";
8634
+ durable: undefined;
8635
+ data: Schema.Struct<{}>;
8636
+ }, Schema.Struct<{
8637
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
8638
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
8639
+ };
8640
+ readonly created: Schema.Finite;
8641
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
8642
+ readonly type: Schema.Literal<"model.updated">;
8643
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
8644
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
8645
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
8646
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
8647
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
8648
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
8649
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
8650
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
8651
+ }>, never, never>;
8652
+ }>>>, Schema.optionalKey<Schema.Struct<{
8653
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
8654
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
8655
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
8656
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
8657
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
8658
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
8659
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
8660
+ }>, never, never>;
8661
+ }>>, never, never>;
8662
+ readonly data: Schema.Struct<{}>;
8663
+ }> & {
8664
+ type: "model.updated";
8624
8665
  durability: "ephemeral";
8625
8666
  durable: undefined;
8626
8667
  data: Schema.Struct<{}>;
@@ -9242,7 +9283,7 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
9242
9283
  };
9243
9284
  readonly created: Schema.Finite;
9244
9285
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
9245
- readonly type: Schema.Literal<"session.permissions.updated">;
9286
+ readonly type: Schema.Literal<"session.permissions">;
9246
9287
  readonly durable: Schema.Struct<{
9247
9288
  readonly aggregateID: Schema.String;
9248
9289
  readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
@@ -9279,7 +9320,7 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
9279
9320
  };
9280
9321
  }>;
9281
9322
  }> & {
9282
- type: "session.permissions.updated";
9323
+ type: "session.permissions";
9283
9324
  durability: "durable";
9284
9325
  durable: {
9285
9326
  readonly version: number;
@@ -12994,7 +13035,6 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
12994
13035
  readonly time: Schema.Struct<{
12995
13036
  readonly created: Schema.Int;
12996
13037
  readonly updated: Schema.Int;
12997
- readonly initialized: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
12998
13038
  }>;
12999
13039
  readonly sandboxes: Schema.$Array<Schema.String>;
13000
13040
  }>;
@@ -13026,7 +13066,6 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
13026
13066
  readonly time: Schema.Struct<{
13027
13067
  readonly created: Schema.Int;
13028
13068
  readonly updated: Schema.Int;
13029
- readonly initialized: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
13030
13069
  }>;
13031
13070
  readonly sandboxes: Schema.$Array<Schema.String>;
13032
13071
  }>;
@@ -14609,13 +14648,6 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
14609
14648
  readonly type: Schema.TemplateLiteral<readonly ["rpc.", Schema.String]>;
14610
14649
  readonly location: Schema.Struct<{
14611
14650
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
14612
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
14613
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
14614
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
14615
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
14616
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
14617
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
14618
- }>, never, never>;
14619
14651
  }>;
14620
14652
  readonly data: Schema.$Record<Schema.String, Schema.Unknown>;
14621
14653
  }>, ...Schema.Struct<{
@@ -14627,13 +14659,6 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
14627
14659
  readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
14628
14660
  readonly location: Schema.optional<Schema.Struct<{
14629
14661
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
14630
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
14631
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
14632
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
14633
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
14634
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
14635
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
14636
- }>, never, never>;
14637
14662
  }>>;
14638
14663
  }>[]]>;
14639
14664
  export type OpenCodeEvent = typeof OpenCodeEvent.Type;
@@ -6,14 +6,14 @@ import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/un
6
6
  const fields = {
7
7
  id: Event.ID,
8
8
  metadata: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
9
- location: Schema.optional(Location.Ref),
9
+ location: Schema.optional(Location.PublicRef),
10
10
  };
11
11
  const rpcEvent = Schema.Struct({
12
12
  id: Event.ID,
13
13
  created: Schema.Finite,
14
14
  metadata: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
15
15
  type: Schema.TemplateLiteral(["rpc.", Schema.String]),
16
- location: Location.Ref,
16
+ location: Location.PublicRef,
17
17
  data: Schema.Record(Schema.String, Schema.Unknown),
18
18
  }).annotate({ identifier: "V2Event.rpc" });
19
19
  const schema = (definitions) => Schema.Union([
@@ -37,7 +37,7 @@ const make = (definitions) => {
37
37
  .add(HttpApiEndpoint.get("event.subscribe", "/api/event", {
38
38
  success: HttpApiSchema.StreamSse({ data: EventSchema }),
39
39
  }).annotateMerge(OpenApi.annotations({
40
- identifier: "v2.event.subscribe",
40
+ identifier: "event.subscribe",
41
41
  summary: "Subscribe to events",
42
42
  description: "Subscribe to native events and plugin RPC events across all server locations. Volatile by contract: a slow consumer overflows and fails the stream, and events during disconnection are missed.",
43
43
  })))