@opencode-ai/schema 0.0.0-next-14798 → 0.0.0-next-14801

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 (75) hide show
  1. package/dist/agent.d.ts +6 -28
  2. package/dist/agent.js +2 -2
  3. package/dist/catalog.d.ts +6 -28
  4. package/dist/catalog.js +2 -2
  5. package/dist/command.d.ts +6 -28
  6. package/dist/command.js +2 -2
  7. package/dist/durable-event-manifest.d.ts +254 -8301
  8. package/dist/durable-event-manifest.js +2 -5
  9. package/dist/event-manifest.d.ts +994 -2747
  10. package/dist/event-manifest.js +2 -2
  11. package/dist/event.d.ts +65 -19
  12. package/dist/event.js +24 -5
  13. package/dist/filesystem-watcher.d.ts +6 -28
  14. package/dist/filesystem-watcher.js +2 -2
  15. package/dist/filesystem.d.ts +6 -28
  16. package/dist/filesystem.js +2 -2
  17. package/dist/form.d.ts +18 -84
  18. package/dist/form.js +4 -4
  19. package/dist/ide-event.d.ts +6 -28
  20. package/dist/ide-event.js +1 -1
  21. package/dist/installation-event.d.ts +12 -56
  22. package/dist/installation-event.js +2 -2
  23. package/dist/integration.d.ts +12 -56
  24. package/dist/integration.js +3 -3
  25. package/dist/lsp-event.d.ts +6 -28
  26. package/dist/lsp-event.js +1 -1
  27. package/dist/mcp-event.d.ts +18 -84
  28. package/dist/mcp-event.js +3 -3
  29. package/dist/models-dev.d.ts +6 -28
  30. package/dist/models-dev.js +2 -2
  31. package/dist/permission.d.ts +12 -56
  32. package/dist/permission.js +3 -3
  33. package/dist/plugin.d.ts +6 -28
  34. package/dist/plugin.js +2 -2
  35. package/dist/project-directories.d.ts +6 -28
  36. package/dist/project-directories.js +2 -2
  37. package/dist/project.d.ts +6 -28
  38. package/dist/project.js +2 -2
  39. package/dist/pty.d.ts +24 -112
  40. package/dist/pty.js +5 -5
  41. package/dist/question.d.ts +18 -84
  42. package/dist/question.js +4 -4
  43. package/dist/reference.d.ts +6 -28
  44. package/dist/reference.js +2 -2
  45. package/dist/server-event.d.ts +12 -56
  46. package/dist/server-event.js +2 -2
  47. package/dist/session-compaction-event.d.ts +6 -28
  48. package/dist/session-compaction-event.js +1 -1
  49. package/dist/session-event.d.ts +1900 -2530
  50. package/dist/session-event.js +37 -37
  51. package/dist/session-status-event.d.ts +12 -56
  52. package/dist/session-status-event.js +2 -2
  53. package/dist/session-todo.d.ts +6 -28
  54. package/dist/session-todo.js +2 -2
  55. package/dist/shell.d.ts +18 -84
  56. package/dist/shell.js +4 -4
  57. package/dist/skill.d.ts +6 -28
  58. package/dist/skill.js +2 -2
  59. package/dist/tui-event.d.ts +24 -112
  60. package/dist/tui-event.js +4 -4
  61. package/dist/v1/legacy-event.d.ts +6 -28
  62. package/dist/v1/legacy-event.js +2 -2
  63. package/dist/v1/permission.d.ts +12 -56
  64. package/dist/v1/permission.js +3 -3
  65. package/dist/v1/question.d.ts +18 -84
  66. package/dist/v1/question.js +4 -4
  67. package/dist/v1/session.d.ts +139 -280
  68. package/dist/v1/session.js +11 -11
  69. package/dist/vcs-event.d.ts +6 -28
  70. package/dist/vcs-event.js +1 -1
  71. package/dist/workspace-event.d.ts +18 -84
  72. package/dist/workspace-event.js +3 -3
  73. package/dist/worktree-event.d.ts +12 -56
  74. package/dist/worktree-event.js +2 -2
  75. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  export * as SessionV1 from "./session.js";
2
2
  import { Effect, Schema, Types } from "effect";
3
- import { define, inventory } from "../event.js";
3
+ import { durable, ephemeral, inventory } from "../event.js";
4
4
  import { FileDiff } from "../file-diff.js";
5
5
  import { Project } from "../project.js";
6
6
  import { Provider } from "../provider.js";
@@ -443,7 +443,7 @@ export const SessionInfo = Schema.Struct({
443
443
  revert: optional(SessionRevert),
444
444
  }).annotate({ identifier: "Session" });
445
445
  const events = {
446
- Created: define({
446
+ Created: durable({
447
447
  type: "session.created",
448
448
  ...options,
449
449
  schema: {
@@ -451,7 +451,7 @@ const events = {
451
451
  info: SessionInfo,
452
452
  },
453
453
  }),
454
- Updated: define({
454
+ Updated: durable({
455
455
  type: "session.updated",
456
456
  ...options,
457
457
  schema: {
@@ -459,7 +459,7 @@ const events = {
459
459
  info: SessionInfo,
460
460
  },
461
461
  }),
462
- Deleted: define({
462
+ Deleted: durable({
463
463
  type: "session.deleted",
464
464
  ...options,
465
465
  schema: {
@@ -467,7 +467,7 @@ const events = {
467
467
  info: SessionInfo,
468
468
  },
469
469
  }),
470
- MessageUpdated: define({
470
+ MessageUpdated: durable({
471
471
  type: "message.updated",
472
472
  ...options,
473
473
  schema: {
@@ -475,7 +475,7 @@ const events = {
475
475
  info: Info,
476
476
  },
477
477
  }),
478
- MessageRemoved: define({
478
+ MessageRemoved: durable({
479
479
  type: "message.removed",
480
480
  ...options,
481
481
  schema: {
@@ -483,7 +483,7 @@ const events = {
483
483
  messageID: MessageID,
484
484
  },
485
485
  }),
486
- PartUpdated: define({
486
+ PartUpdated: durable({
487
487
  type: "message.part.updated",
488
488
  ...options,
489
489
  schema: {
@@ -492,7 +492,7 @@ const events = {
492
492
  time: Schema.Finite,
493
493
  },
494
494
  }),
495
- PartRemoved: define({
495
+ PartRemoved: durable({
496
496
  type: "message.part.removed",
497
497
  ...options,
498
498
  schema: {
@@ -502,7 +502,7 @@ const events = {
502
502
  },
503
503
  }),
504
504
  };
505
- export const PartDelta = define({
505
+ export const PartDelta = ephemeral({
506
506
  type: "message.part.delta",
507
507
  schema: {
508
508
  sessionID: SessionID,
@@ -512,14 +512,14 @@ export const PartDelta = define({
512
512
  delta: Schema.String,
513
513
  },
514
514
  });
515
- export const Diff = define({
515
+ export const Diff = ephemeral({
516
516
  type: "session.diff",
517
517
  schema: {
518
518
  sessionID: SessionID,
519
519
  diff: Schema.Array(FileDiff.Info),
520
520
  },
521
521
  });
522
- export const Error = define({
522
+ export const Error = ephemeral({
523
523
  type: "session.error",
524
524
  schema: {
525
525
  sessionID: Schema.optional(SessionID),
@@ -6,15 +6,6 @@ export declare const BranchUpdated: Schema.Struct<{
6
6
  };
7
7
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
8
8
  readonly type: Schema.Literal<"vcs.branch.updated">;
9
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
10
- readonly aggregateID: Schema.String;
11
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
12
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
13
- }>>>, Schema.optionalKey<Schema.Struct<{
14
- readonly aggregateID: Schema.String;
15
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
16
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
17
- }>>, never, never>;
18
9
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
19
10
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
20
11
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -38,14 +29,12 @@ export declare const BranchUpdated: Schema.Struct<{
38
29
  readonly branch: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
39
30
  }>;
40
31
  }> & {
32
+ type: "vcs.branch.updated";
33
+ durability: "ephemeral";
34
+ durable: undefined;
41
35
  data: Schema.Struct<{
42
36
  readonly branch: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
43
37
  }>;
44
- durable?: {
45
- readonly version: number;
46
- readonly aggregate: string;
47
- } | undefined;
48
- type: "vcs.branch.updated";
49
38
  };
50
39
  export declare const Definitions: readonly [Schema.Struct<{
51
40
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
@@ -53,15 +42,6 @@ export declare const Definitions: readonly [Schema.Struct<{
53
42
  };
54
43
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
55
44
  readonly type: Schema.Literal<"vcs.branch.updated">;
56
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
57
- readonly aggregateID: Schema.String;
58
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
59
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
60
- }>>>, Schema.optionalKey<Schema.Struct<{
61
- readonly aggregateID: Schema.String;
62
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
63
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
64
- }>>, never, never>;
65
45
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
66
46
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
67
47
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -85,12 +65,10 @@ export declare const Definitions: readonly [Schema.Struct<{
85
65
  readonly branch: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
86
66
  }>;
87
67
  }> & {
68
+ type: "vcs.branch.updated";
69
+ durability: "ephemeral";
70
+ durable: undefined;
88
71
  data: Schema.Struct<{
89
72
  readonly branch: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
90
73
  }>;
91
- durable?: {
92
- readonly version: number;
93
- readonly aggregate: string;
94
- } | undefined;
95
- type: "vcs.branch.updated";
96
74
  }];
package/dist/vcs-event.js CHANGED
@@ -2,7 +2,7 @@ export * as VcsEvent from "./vcs-event.js";
2
2
  import { Schema } from "effect";
3
3
  import { optional } from "./schema.js";
4
4
  import { Event } from "./event.js";
5
- export const BranchUpdated = Event.define({
5
+ export const BranchUpdated = Event.ephemeral({
6
6
  type: "vcs.branch.updated",
7
7
  schema: {
8
8
  branch: optional(Schema.String),
@@ -15,15 +15,6 @@ export declare const Ready: Schema.Struct<{
15
15
  };
16
16
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
17
17
  readonly type: Schema.Literal<"workspace.ready">;
18
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
19
- readonly aggregateID: Schema.String;
20
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
21
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
22
- }>>>, Schema.optionalKey<Schema.Struct<{
23
- readonly aggregateID: Schema.String;
24
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
25
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
26
- }>>, never, never>;
27
18
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
28
19
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
29
20
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -47,14 +38,12 @@ export declare const Ready: Schema.Struct<{
47
38
  readonly name: Schema.String;
48
39
  }>;
49
40
  }> & {
41
+ type: "workspace.ready";
42
+ durability: "ephemeral";
43
+ durable: undefined;
50
44
  data: Schema.Struct<{
51
45
  readonly name: Schema.String;
52
46
  }>;
53
- durable?: {
54
- readonly version: number;
55
- readonly aggregate: string;
56
- } | undefined;
57
- type: "workspace.ready";
58
47
  };
59
48
  export declare const Failed: Schema.Struct<{
60
49
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
@@ -62,15 +51,6 @@ export declare const Failed: Schema.Struct<{
62
51
  };
63
52
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
64
53
  readonly type: Schema.Literal<"workspace.failed">;
65
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
66
- readonly aggregateID: Schema.String;
67
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
68
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
69
- }>>>, Schema.optionalKey<Schema.Struct<{
70
- readonly aggregateID: Schema.String;
71
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
72
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
73
- }>>, never, never>;
74
54
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
75
55
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
76
56
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -94,14 +74,12 @@ export declare const Failed: Schema.Struct<{
94
74
  readonly message: Schema.String;
95
75
  }>;
96
76
  }> & {
77
+ type: "workspace.failed";
78
+ durability: "ephemeral";
79
+ durable: undefined;
97
80
  data: Schema.Struct<{
98
81
  readonly message: Schema.String;
99
82
  }>;
100
- durable?: {
101
- readonly version: number;
102
- readonly aggregate: string;
103
- } | undefined;
104
- type: "workspace.failed";
105
83
  };
106
84
  export declare const Status: Schema.Struct<{
107
85
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
@@ -109,15 +87,6 @@ export declare const Status: Schema.Struct<{
109
87
  };
110
88
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
111
89
  readonly type: Schema.Literal<"workspace.status">;
112
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
113
- readonly aggregateID: Schema.String;
114
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
115
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
116
- }>>>, Schema.optionalKey<Schema.Struct<{
117
- readonly aggregateID: Schema.String;
118
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
119
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
120
- }>>, never, never>;
121
90
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
122
91
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
123
92
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -145,6 +114,9 @@ export declare const Status: Schema.Struct<{
145
114
  readonly status: Schema.Literals<readonly ["connected", "connecting", "disconnected", "error"]>;
146
115
  }>;
147
116
  }> & {
117
+ type: "workspace.status";
118
+ durability: "ephemeral";
119
+ durable: undefined;
148
120
  data: Schema.Struct<{
149
121
  readonly workspaceID: Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
150
122
  ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
@@ -152,11 +124,6 @@ export declare const Status: Schema.Struct<{
152
124
  };
153
125
  readonly status: Schema.Literals<readonly ["connected", "connecting", "disconnected", "error"]>;
154
126
  }>;
155
- durable?: {
156
- readonly version: number;
157
- readonly aggregate: string;
158
- } | undefined;
159
- type: "workspace.status";
160
127
  };
161
128
  export declare const Definitions: readonly [Schema.Struct<{
162
129
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
@@ -164,15 +131,6 @@ export declare const Definitions: readonly [Schema.Struct<{
164
131
  };
165
132
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
166
133
  readonly type: Schema.Literal<"workspace.ready">;
167
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
168
- readonly aggregateID: Schema.String;
169
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
170
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
171
- }>>>, Schema.optionalKey<Schema.Struct<{
172
- readonly aggregateID: Schema.String;
173
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
174
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
175
- }>>, never, never>;
176
134
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
177
135
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
178
136
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -196,29 +154,18 @@ export declare const Definitions: readonly [Schema.Struct<{
196
154
  readonly name: Schema.String;
197
155
  }>;
198
156
  }> & {
157
+ type: "workspace.ready";
158
+ durability: "ephemeral";
159
+ durable: undefined;
199
160
  data: Schema.Struct<{
200
161
  readonly name: Schema.String;
201
162
  }>;
202
- durable?: {
203
- readonly version: number;
204
- readonly aggregate: string;
205
- } | undefined;
206
- type: "workspace.ready";
207
163
  }, Schema.Struct<{
208
164
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
209
165
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
210
166
  };
211
167
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
212
168
  readonly type: Schema.Literal<"workspace.failed">;
213
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
214
- readonly aggregateID: Schema.String;
215
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
216
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
217
- }>>>, Schema.optionalKey<Schema.Struct<{
218
- readonly aggregateID: Schema.String;
219
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
220
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
221
- }>>, never, never>;
222
169
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
223
170
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
224
171
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -242,29 +189,18 @@ export declare const Definitions: readonly [Schema.Struct<{
242
189
  readonly message: Schema.String;
243
190
  }>;
244
191
  }> & {
192
+ type: "workspace.failed";
193
+ durability: "ephemeral";
194
+ durable: undefined;
245
195
  data: Schema.Struct<{
246
196
  readonly message: Schema.String;
247
197
  }>;
248
- durable?: {
249
- readonly version: number;
250
- readonly aggregate: string;
251
- } | undefined;
252
- type: "workspace.failed";
253
198
  }, Schema.Struct<{
254
199
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
255
200
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
256
201
  };
257
202
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
258
203
  readonly type: Schema.Literal<"workspace.status">;
259
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
260
- readonly aggregateID: Schema.String;
261
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
262
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
263
- }>>>, Schema.optionalKey<Schema.Struct<{
264
- readonly aggregateID: Schema.String;
265
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
266
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
267
- }>>, never, never>;
268
204
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
269
205
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
270
206
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -292,6 +228,9 @@ export declare const Definitions: readonly [Schema.Struct<{
292
228
  readonly status: Schema.Literals<readonly ["connected", "connecting", "disconnected", "error"]>;
293
229
  }>;
294
230
  }> & {
231
+ type: "workspace.status";
232
+ durability: "ephemeral";
233
+ durable: undefined;
295
234
  data: Schema.Struct<{
296
235
  readonly workspaceID: Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
297
236
  ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
@@ -299,9 +238,4 @@ export declare const Definitions: readonly [Schema.Struct<{
299
238
  };
300
239
  readonly status: Schema.Literals<readonly ["connected", "connecting", "disconnected", "error"]>;
301
240
  }>;
302
- durable?: {
303
- readonly version: number;
304
- readonly aggregate: string;
305
- } | undefined;
306
- type: "workspace.status";
307
241
  }];
@@ -6,19 +6,19 @@ export const ConnectionStatus = Schema.Struct({
6
6
  workspaceID: WorkspaceID,
7
7
  status: Schema.Literals(["connected", "connecting", "disconnected", "error"]),
8
8
  }).annotate({ identifier: "WorkspaceEvent.ConnectionStatus" });
9
- export const Ready = Event.define({
9
+ export const Ready = Event.ephemeral({
10
10
  type: "workspace.ready",
11
11
  schema: {
12
12
  name: Schema.String,
13
13
  },
14
14
  });
15
- export const Failed = Event.define({
15
+ export const Failed = Event.ephemeral({
16
16
  type: "workspace.failed",
17
17
  schema: {
18
18
  message: Schema.String,
19
19
  },
20
20
  });
21
- export const Status = Event.define({
21
+ export const Status = Event.ephemeral({
22
22
  type: "workspace.status",
23
23
  schema: ConnectionStatus.fields,
24
24
  });
@@ -6,15 +6,6 @@ export declare const Ready: Schema.Struct<{
6
6
  };
7
7
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
8
8
  readonly type: Schema.Literal<"worktree.ready">;
9
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
10
- readonly aggregateID: Schema.String;
11
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
12
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
13
- }>>>, Schema.optionalKey<Schema.Struct<{
14
- readonly aggregateID: Schema.String;
15
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
16
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
17
- }>>, never, never>;
18
9
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
19
10
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
20
11
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -39,15 +30,13 @@ export declare const Ready: Schema.Struct<{
39
30
  readonly branch: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
40
31
  }>;
41
32
  }> & {
33
+ type: "worktree.ready";
34
+ durability: "ephemeral";
35
+ durable: undefined;
42
36
  data: Schema.Struct<{
43
37
  readonly name: Schema.String;
44
38
  readonly branch: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
45
39
  }>;
46
- durable?: {
47
- readonly version: number;
48
- readonly aggregate: string;
49
- } | undefined;
50
- type: "worktree.ready";
51
40
  };
52
41
  export declare const Failed: Schema.Struct<{
53
42
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
@@ -55,15 +44,6 @@ export declare const Failed: Schema.Struct<{
55
44
  };
56
45
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
57
46
  readonly type: Schema.Literal<"worktree.failed">;
58
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
59
- readonly aggregateID: Schema.String;
60
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
61
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
62
- }>>>, Schema.optionalKey<Schema.Struct<{
63
- readonly aggregateID: Schema.String;
64
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
65
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
66
- }>>, never, never>;
67
47
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
68
48
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
69
49
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -87,14 +67,12 @@ export declare const Failed: Schema.Struct<{
87
67
  readonly message: Schema.String;
88
68
  }>;
89
69
  }> & {
70
+ type: "worktree.failed";
71
+ durability: "ephemeral";
72
+ durable: undefined;
90
73
  data: Schema.Struct<{
91
74
  readonly message: Schema.String;
92
75
  }>;
93
- durable?: {
94
- readonly version: number;
95
- readonly aggregate: string;
96
- } | undefined;
97
- type: "worktree.failed";
98
76
  };
99
77
  export declare const Definitions: readonly [Schema.Struct<{
100
78
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
@@ -102,15 +80,6 @@ export declare const Definitions: readonly [Schema.Struct<{
102
80
  };
103
81
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
104
82
  readonly type: Schema.Literal<"worktree.ready">;
105
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
106
- readonly aggregateID: Schema.String;
107
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
108
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
109
- }>>>, Schema.optionalKey<Schema.Struct<{
110
- readonly aggregateID: Schema.String;
111
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
112
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
113
- }>>, never, never>;
114
83
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
115
84
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
116
85
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -135,30 +104,19 @@ export declare const Definitions: readonly [Schema.Struct<{
135
104
  readonly branch: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
136
105
  }>;
137
106
  }> & {
107
+ type: "worktree.ready";
108
+ durability: "ephemeral";
109
+ durable: undefined;
138
110
  data: Schema.Struct<{
139
111
  readonly name: Schema.String;
140
112
  readonly branch: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
141
113
  }>;
142
- durable?: {
143
- readonly version: number;
144
- readonly aggregate: string;
145
- } | undefined;
146
- type: "worktree.ready";
147
114
  }, Schema.Struct<{
148
115
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
149
116
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
150
117
  };
151
118
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
152
119
  readonly type: Schema.Literal<"worktree.failed">;
153
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
154
- readonly aggregateID: Schema.String;
155
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
156
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
157
- }>>>, Schema.optionalKey<Schema.Struct<{
158
- readonly aggregateID: Schema.String;
159
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
160
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
161
- }>>, never, never>;
162
120
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
163
121
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
164
122
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -182,12 +140,10 @@ export declare const Definitions: readonly [Schema.Struct<{
182
140
  readonly message: Schema.String;
183
141
  }>;
184
142
  }> & {
143
+ type: "worktree.failed";
144
+ durability: "ephemeral";
145
+ durable: undefined;
185
146
  data: Schema.Struct<{
186
147
  readonly message: Schema.String;
187
148
  }>;
188
- durable?: {
189
- readonly version: number;
190
- readonly aggregate: string;
191
- } | undefined;
192
- type: "worktree.failed";
193
149
  }];
@@ -2,14 +2,14 @@ export * as WorktreeEvent from "./worktree-event.js";
2
2
  import { Schema } from "effect";
3
3
  import { optional } from "./schema.js";
4
4
  import { Event } from "./event.js";
5
- export const Ready = Event.define({
5
+ export const Ready = Event.ephemeral({
6
6
  type: "worktree.ready",
7
7
  schema: {
8
8
  name: Schema.String,
9
9
  branch: optional(Schema.String),
10
10
  },
11
11
  });
12
- export const Failed = Event.define({
12
+ export const Failed = Event.ephemeral({
13
13
  type: "worktree.failed",
14
14
  schema: {
15
15
  message: Schema.String,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/schema",
4
- "version": "0.0.0-next-14798",
4
+ "version": "0.0.0-next-14801",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {