@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
@@ -42,7 +42,7 @@ const stepSettlementOptions = {
42
42
  },
43
43
  };
44
44
  export const UnknownError = SessionMessage.UnknownError;
45
- export const AgentSwitched = Event.define({
45
+ export const AgentSwitched = Event.durable({
46
46
  type: "session.next.agent.switched",
47
47
  ...options,
48
48
  schema: {
@@ -51,7 +51,7 @@ export const AgentSwitched = Event.define({
51
51
  agent: Schema.String,
52
52
  },
53
53
  });
54
- export const ModelSwitched = Event.define({
54
+ export const ModelSwitched = Event.durable({
55
55
  type: "session.next.model.switched",
56
56
  ...options,
57
57
  schema: {
@@ -60,7 +60,7 @@ export const ModelSwitched = Event.define({
60
60
  model: Model.Ref,
61
61
  },
62
62
  });
63
- export const Moved = Event.define({
63
+ export const Moved = Event.durable({
64
64
  type: "session.next.moved",
65
65
  ...options,
66
66
  schema: {
@@ -69,7 +69,7 @@ export const Moved = Event.define({
69
69
  subdirectory: RelativePath.pipe(optional),
70
70
  },
71
71
  });
72
- export const Renamed = Event.define({
72
+ export const Renamed = Event.durable({
73
73
  type: "session.next.renamed",
74
74
  ...options,
75
75
  schema: {
@@ -77,7 +77,7 @@ export const Renamed = Event.define({
77
77
  title: Schema.String,
78
78
  },
79
79
  });
80
- export const Forked = Event.define({
80
+ export const Forked = Event.durable({
81
81
  type: "session.next.forked",
82
82
  ...options,
83
83
  schema: {
@@ -86,17 +86,17 @@ export const Forked = Event.define({
86
86
  messageID: SessionMessage.ID.pipe(optional),
87
87
  },
88
88
  });
89
- export const Prompted = Event.define({
89
+ export const Prompted = Event.durable({
90
90
  type: "session.next.prompted",
91
91
  ...options,
92
92
  schema: PromptFields,
93
93
  });
94
- export const PromptAdmitted = Event.define({
94
+ export const PromptAdmitted = Event.durable({
95
95
  type: "session.next.prompt.admitted",
96
96
  ...options,
97
97
  schema: PromptFields,
98
98
  });
99
- export const ExecutionSettled = Event.define({
99
+ export const ExecutionSettled = Event.ephemeral({
100
100
  type: "session.next.execution.settled",
101
101
  schema: {
102
102
  ...Base,
@@ -104,7 +104,7 @@ export const ExecutionSettled = Event.define({
104
104
  error: UnknownError.pipe(optional),
105
105
  },
106
106
  });
107
- export const ContextUpdated = Event.define({
107
+ export const ContextUpdated = Event.durable({
108
108
  type: "session.next.context.updated",
109
109
  ...options,
110
110
  schema: {
@@ -113,7 +113,7 @@ export const ContextUpdated = Event.define({
113
113
  text: Schema.String,
114
114
  },
115
115
  });
116
- export const Synthetic = Event.define({
116
+ export const Synthetic = Event.durable({
117
117
  type: "session.next.synthetic",
118
118
  ...options,
119
119
  schema: {
@@ -126,7 +126,7 @@ export const Synthetic = Event.define({
126
126
  });
127
127
  export var Skill;
128
128
  (function (Skill) {
129
- Skill.Activated = Event.define({
129
+ Skill.Activated = Event.durable({
130
130
  type: "session.next.skill.activated",
131
131
  ...options,
132
132
  schema: {
@@ -139,7 +139,7 @@ export var Skill;
139
139
  })(Skill || (Skill = {}));
140
140
  export var Shell;
141
141
  (function (Shell) {
142
- Shell.Started = Event.define({
142
+ Shell.Started = Event.durable({
143
143
  type: "session.next.shell.started",
144
144
  ...options,
145
145
  schema: {
@@ -149,7 +149,7 @@ export var Shell;
149
149
  command: Schema.String,
150
150
  },
151
151
  });
152
- Shell.Ended = Event.define({
152
+ Shell.Ended = Event.durable({
153
153
  type: "session.next.shell.ended",
154
154
  ...options,
155
155
  schema: {
@@ -161,7 +161,7 @@ export var Shell;
161
161
  })(Shell || (Shell = {}));
162
162
  export var Step;
163
163
  (function (Step) {
164
- Step.Started = Event.define({
164
+ Step.Started = Event.durable({
165
165
  type: "session.next.step.started",
166
166
  ...options,
167
167
  schema: {
@@ -172,7 +172,7 @@ export var Step;
172
172
  snapshot: Schema.String.pipe(optional),
173
173
  },
174
174
  });
175
- Step.Ended = Event.define({
175
+ Step.Ended = Event.durable({
176
176
  type: "session.next.step.ended",
177
177
  ...stepSettlementOptions,
178
178
  schema: {
@@ -193,7 +193,7 @@ export var Step;
193
193
  files: Schema.Array(RelativePath).pipe(optional),
194
194
  },
195
195
  });
196
- Step.Failed = Event.define({
196
+ Step.Failed = Event.durable({
197
197
  type: "session.next.step.failed",
198
198
  ...stepSettlementOptions,
199
199
  schema: {
@@ -205,7 +205,7 @@ export var Step;
205
205
  })(Step || (Step = {}));
206
206
  export var Text;
207
207
  (function (Text) {
208
- Text.Started = Event.define({
208
+ Text.Started = Event.durable({
209
209
  type: "session.next.text.started",
210
210
  ...options,
211
211
  schema: {
@@ -215,7 +215,7 @@ export var Text;
215
215
  },
216
216
  });
217
217
  // Stream fragments are live-only; Text.Ended is the replayable full-value boundary.
218
- Text.Delta = Event.define({
218
+ Text.Delta = Event.ephemeral({
219
219
  type: "session.next.text.delta",
220
220
  schema: {
221
221
  ...Base,
@@ -224,7 +224,7 @@ export var Text;
224
224
  delta: Schema.String,
225
225
  },
226
226
  });
227
- Text.Ended = Event.define({
227
+ Text.Ended = Event.durable({
228
228
  type: "session.next.text.ended",
229
229
  ...options,
230
230
  schema: {
@@ -237,7 +237,7 @@ export var Text;
237
237
  })(Text || (Text = {}));
238
238
  export var Reasoning;
239
239
  (function (Reasoning) {
240
- Reasoning.Started = Event.define({
240
+ Reasoning.Started = Event.durable({
241
241
  type: "session.next.reasoning.started",
242
242
  ...options,
243
243
  schema: {
@@ -248,7 +248,7 @@ export var Reasoning;
248
248
  },
249
249
  });
250
250
  // Stream fragments are live-only; Reasoning.Ended is the replayable full-value boundary.
251
- Reasoning.Delta = Event.define({
251
+ Reasoning.Delta = Event.ephemeral({
252
252
  type: "session.next.reasoning.delta",
253
253
  schema: {
254
254
  ...Base,
@@ -257,7 +257,7 @@ export var Reasoning;
257
257
  delta: Schema.String,
258
258
  },
259
259
  });
260
- Reasoning.Ended = Event.define({
260
+ Reasoning.Ended = Event.durable({
261
261
  type: "session.next.reasoning.ended",
262
262
  ...options,
263
263
  schema: {
@@ -278,7 +278,7 @@ export var Tool;
278
278
  };
279
279
  let Input;
280
280
  (function (Input) {
281
- Input.Started = Event.define({
281
+ Input.Started = Event.durable({
282
282
  type: "session.next.tool.input.started",
283
283
  ...options,
284
284
  schema: {
@@ -287,14 +287,14 @@ export var Tool;
287
287
  },
288
288
  });
289
289
  // Stream fragments are live-only; Input.Ended is the replayable raw-input boundary.
290
- Input.Delta = Event.define({
290
+ Input.Delta = Event.ephemeral({
291
291
  type: "session.next.tool.input.delta",
292
292
  schema: {
293
293
  ...ToolBase,
294
294
  delta: Schema.String,
295
295
  },
296
296
  });
297
- Input.Ended = Event.define({
297
+ Input.Ended = Event.durable({
298
298
  type: "session.next.tool.input.ended",
299
299
  ...options,
300
300
  schema: {
@@ -303,7 +303,7 @@ export var Tool;
303
303
  },
304
304
  });
305
305
  })(Input = Tool.Input || (Tool.Input = {}));
306
- Tool.Called = Event.define({
306
+ Tool.Called = Event.durable({
307
307
  type: "session.next.tool.called",
308
308
  ...options,
309
309
  schema: {
@@ -320,7 +320,7 @@ export var Tool;
320
320
  * Replayable bounded running-tool state. Tools should checkpoint semantic
321
321
  * transitions or at a bounded cadence, not persist every stdout/stderr chunk.
322
322
  */
323
- Tool.Progress = Event.define({
323
+ Tool.Progress = Event.durable({
324
324
  type: "session.next.tool.progress",
325
325
  ...options,
326
326
  schema: {
@@ -329,7 +329,7 @@ export var Tool;
329
329
  content: Schema.Array(ToolContent),
330
330
  },
331
331
  });
332
- Tool.Success = Event.define({
332
+ Tool.Success = Event.durable({
333
333
  type: "session.next.tool.success",
334
334
  ...options,
335
335
  schema: {
@@ -344,7 +344,7 @@ export var Tool;
344
344
  }),
345
345
  },
346
346
  });
347
- Tool.Failed = Event.define({
347
+ Tool.Failed = Event.durable({
348
348
  type: "session.next.tool.failed",
349
349
  ...options,
350
350
  schema: {
@@ -368,7 +368,7 @@ export const RetryError = Schema.Struct({
368
368
  }).annotate({
369
369
  identifier: "session.next.retry_error",
370
370
  });
371
- export const Retried = Event.define({
371
+ export const Retried = Event.durable({
372
372
  type: "session.next.retried",
373
373
  ...options,
374
374
  schema: {
@@ -379,7 +379,7 @@ export const Retried = Event.define({
379
379
  });
380
380
  export var Compaction;
381
381
  (function (Compaction) {
382
- Compaction.Started = Event.define({
382
+ Compaction.Started = Event.durable({
383
383
  type: "session.next.compaction.started",
384
384
  ...options,
385
385
  schema: {
@@ -388,7 +388,7 @@ export var Compaction;
388
388
  reason: Schema.Union([Schema.Literal("auto"), Schema.Literal("manual")]),
389
389
  },
390
390
  });
391
- Compaction.Delta = Event.define({
391
+ Compaction.Delta = Event.ephemeral({
392
392
  type: "session.next.compaction.delta",
393
393
  schema: {
394
394
  ...Base,
@@ -396,7 +396,7 @@ export var Compaction;
396
396
  text: Schema.String,
397
397
  },
398
398
  });
399
- Compaction.Ended = Event.define({
399
+ Compaction.Ended = Event.durable({
400
400
  type: "session.next.compaction.ended",
401
401
  ...options,
402
402
  schema: {
@@ -410,20 +410,20 @@ export var Compaction;
410
410
  })(Compaction || (Compaction = {}));
411
411
  export var RevertEvent;
412
412
  (function (RevertEvent) {
413
- RevertEvent.Staged = Event.define({
413
+ RevertEvent.Staged = Event.durable({
414
414
  type: "session.next.revert.staged",
415
415
  ...options,
416
416
  schema: { ...Base, revert: Revert.State },
417
417
  });
418
- RevertEvent.Cleared = Event.define({ type: "session.next.revert.cleared", ...options, schema: Base });
419
- RevertEvent.Committed = Event.define({
418
+ RevertEvent.Cleared = Event.durable({ type: "session.next.revert.cleared", ...options, schema: Base });
419
+ RevertEvent.Committed = Event.durable({
420
420
  type: "session.next.revert.committed",
421
421
  ...options,
422
422
  schema: { ...Base, messageID: SessionMessage.ID },
423
423
  });
424
424
  })(RevertEvent || (RevertEvent = {}));
425
- export const DurableDefinitions = Event.inventory(AgentSwitched, ModelSwitched, Moved, Renamed, Forked, Prompted, PromptAdmitted, ContextUpdated, Synthetic, Skill.Activated, Shell.Started, Shell.Ended, Step.Started, Step.Ended, Step.Failed, Text.Started, Text.Ended, Tool.Input.Started, Tool.Input.Ended, Tool.Called, Tool.Progress, Tool.Success, Tool.Failed, Reasoning.Started, Reasoning.Ended, Retried, Compaction.Started, Compaction.Ended, RevertEvent.Staged, RevertEvent.Cleared, RevertEvent.Committed);
426
425
  export const Definitions = Event.inventory(AgentSwitched, ModelSwitched, Moved, Renamed, Forked, Prompted, PromptAdmitted, ExecutionSettled, ContextUpdated, Synthetic, Skill.Activated, Shell.Started, Shell.Ended, Step.Started, Step.Ended, Step.Failed, Text.Started, Text.Delta, Text.Ended, Reasoning.Started, Reasoning.Delta, Reasoning.Ended, Tool.Input.Started, Tool.Input.Delta, Tool.Input.Ended, Tool.Called, Tool.Progress, Tool.Success, Tool.Failed, Retried, Compaction.Started, Compaction.Delta, Compaction.Ended, RevertEvent.Staged, RevertEvent.Cleared, RevertEvent.Committed);
426
+ export const DurableDefinitions = Event.inventory(...Definitions.filter((definition) => definition.durability === "durable"));
427
427
  export const Durable = Schema.Union(DurableDefinitions, { mode: "oneOf" })
428
428
  .pipe(Schema.toTaggedUnion("type"))
429
429
  .annotate({ identifier: "SessionDurableEvent" });
@@ -32,15 +32,6 @@ export declare const Status: Schema.Struct<{
32
32
  };
33
33
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
34
34
  readonly type: Schema.Literal<"session.status">;
35
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
36
- readonly aggregateID: Schema.String;
37
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
38
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
39
- }>>>, Schema.optionalKey<Schema.Struct<{
40
- readonly aggregateID: Schema.String;
41
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
42
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
43
- }>>, never, never>;
44
35
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
45
36
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
46
37
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -92,6 +83,9 @@ export declare const Status: Schema.Struct<{
92
83
  }>]>;
93
84
  }>;
94
85
  }> & {
86
+ type: "session.status";
87
+ durability: "ephemeral";
88
+ durable: undefined;
95
89
  data: Schema.Struct<{
96
90
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
97
91
  create: () => string & import("effect/Brand").Brand<"SessionID">;
@@ -123,11 +117,6 @@ export declare const Status: Schema.Struct<{
123
117
  readonly type: Schema.Literal<"busy">;
124
118
  }>]>;
125
119
  }>;
126
- durable?: {
127
- readonly version: number;
128
- readonly aggregate: string;
129
- } | undefined;
130
- type: "session.status";
131
120
  };
132
121
  export declare const Idle: Schema.Struct<{
133
122
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
@@ -135,15 +124,6 @@ export declare const Idle: Schema.Struct<{
135
124
  };
136
125
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
137
126
  readonly type: Schema.Literal<"session.idle">;
138
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
139
- readonly aggregateID: Schema.String;
140
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
141
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
142
- }>>>, Schema.optionalKey<Schema.Struct<{
143
- readonly aggregateID: Schema.String;
144
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
145
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
146
- }>>, never, never>;
147
127
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
148
128
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
149
129
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -170,17 +150,15 @@ export declare const Idle: Schema.Struct<{
170
150
  };
171
151
  }>;
172
152
  }> & {
153
+ type: "session.idle";
154
+ durability: "ephemeral";
155
+ durable: undefined;
173
156
  data: Schema.Struct<{
174
157
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
175
158
  create: () => string & import("effect/Brand").Brand<"SessionID">;
176
159
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
177
160
  };
178
161
  }>;
179
- durable?: {
180
- readonly version: number;
181
- readonly aggregate: string;
182
- } | undefined;
183
- type: "session.idle";
184
162
  };
185
163
  export declare const Definitions: readonly [Schema.Struct<{
186
164
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
@@ -188,15 +166,6 @@ export declare const Definitions: readonly [Schema.Struct<{
188
166
  };
189
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>;
190
168
  readonly type: Schema.Literal<"session.status">;
191
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
192
- readonly aggregateID: Schema.String;
193
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
194
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
195
- }>>>, Schema.optionalKey<Schema.Struct<{
196
- readonly aggregateID: Schema.String;
197
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
198
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
199
- }>>, never, never>;
200
169
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
201
170
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
202
171
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -248,6 +217,9 @@ export declare const Definitions: readonly [Schema.Struct<{
248
217
  }>]>;
249
218
  }>;
250
219
  }> & {
220
+ type: "session.status";
221
+ durability: "ephemeral";
222
+ durable: undefined;
251
223
  data: Schema.Struct<{
252
224
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
253
225
  create: () => string & import("effect/Brand").Brand<"SessionID">;
@@ -279,26 +251,12 @@ export declare const Definitions: readonly [Schema.Struct<{
279
251
  readonly type: Schema.Literal<"busy">;
280
252
  }>]>;
281
253
  }>;
282
- durable?: {
283
- readonly version: number;
284
- readonly aggregate: string;
285
- } | undefined;
286
- type: "session.status";
287
254
  }, Schema.Struct<{
288
255
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
289
256
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
290
257
  };
291
258
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
292
259
  readonly type: Schema.Literal<"session.idle">;
293
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
294
- readonly aggregateID: Schema.String;
295
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
296
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
297
- }>>>, Schema.optionalKey<Schema.Struct<{
298
- readonly aggregateID: Schema.String;
299
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
300
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
301
- }>>, never, never>;
302
260
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
303
261
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
304
262
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -325,15 +283,13 @@ export declare const Definitions: readonly [Schema.Struct<{
325
283
  };
326
284
  }>;
327
285
  }> & {
286
+ type: "session.idle";
287
+ durability: "ephemeral";
288
+ durable: undefined;
328
289
  data: Schema.Struct<{
329
290
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
330
291
  create: () => string & import("effect/Brand").Brand<"SessionID">;
331
292
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
332
293
  };
333
294
  }>;
334
- durable?: {
335
- readonly version: number;
336
- readonly aggregate: string;
337
- } | undefined;
338
- type: "session.idle";
339
295
  }];
@@ -26,7 +26,7 @@ export const Info = Schema.Union([
26
26
  type: Schema.Literal("busy"),
27
27
  }),
28
28
  ]).annotate({ identifier: "SessionStatus" });
29
- export const Status = Event.define({
29
+ export const Status = Event.ephemeral({
30
30
  type: "session.status",
31
31
  schema: {
32
32
  sessionID: SessionID,
@@ -34,7 +34,7 @@ export const Status = Event.define({
34
34
  },
35
35
  });
36
36
  // deprecated
37
- export const Idle = Event.define({
37
+ export const Idle = Event.ephemeral({
38
38
  type: "session.idle",
39
39
  schema: {
40
40
  sessionID: SessionID,
@@ -14,15 +14,6 @@ export declare const Event: {
14
14
  };
15
15
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
16
16
  readonly type: Schema.Literal<"todo.updated">;
17
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
18
- readonly aggregateID: Schema.String;
19
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
20
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
21
- }>>>, Schema.optionalKey<Schema.Struct<{
22
- readonly aggregateID: Schema.String;
23
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
24
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
25
- }>>, never, never>;
26
17
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
27
18
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
28
19
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -54,6 +45,9 @@ export declare const Event: {
54
45
  }>>;
55
46
  }>;
56
47
  }> & {
48
+ type: "todo.updated";
49
+ durability: "ephemeral";
50
+ durable: undefined;
57
51
  data: Schema.Struct<{
58
52
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
59
53
  create: () => string & import("effect/Brand").Brand<"SessionID">;
@@ -65,11 +59,6 @@ export declare const Event: {
65
59
  readonly priority: Schema.String;
66
60
  }>>;
67
61
  }>;
68
- durable?: {
69
- readonly version: number;
70
- readonly aggregate: string;
71
- } | undefined;
72
- type: "todo.updated";
73
62
  };
74
63
  Definitions: readonly [Schema.Struct<{
75
64
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
@@ -77,15 +66,6 @@ export declare const Event: {
77
66
  };
78
67
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
79
68
  readonly type: Schema.Literal<"todo.updated">;
80
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
81
- readonly aggregateID: Schema.String;
82
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
83
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
84
- }>>>, Schema.optionalKey<Schema.Struct<{
85
- readonly aggregateID: Schema.String;
86
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
87
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
88
- }>>, never, never>;
89
69
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
90
70
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
91
71
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -117,6 +97,9 @@ export declare const Event: {
117
97
  }>>;
118
98
  }>;
119
99
  }> & {
100
+ type: "todo.updated";
101
+ durability: "ephemeral";
102
+ durable: undefined;
120
103
  data: Schema.Struct<{
121
104
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
122
105
  create: () => string & import("effect/Brand").Brand<"SessionID">;
@@ -128,10 +111,5 @@ export declare const Event: {
128
111
  readonly priority: Schema.String;
129
112
  }>>;
130
113
  }>;
131
- durable?: {
132
- readonly version: number;
133
- readonly aggregate: string;
134
- } | undefined;
135
- type: "todo.updated";
136
114
  }];
137
115
  };
@@ -1,6 +1,6 @@
1
1
  export * as SessionTodo from "./session-todo.js";
2
2
  import { Schema } from "effect";
3
- import { define, inventory } from "./event.js";
3
+ import { ephemeral, inventory } from "./event.js";
4
4
  import { SessionID } from "./session-id.js";
5
5
  export const Info = Schema.Struct({
6
6
  content: Schema.String.annotate({ description: "Brief description of the task" }),
@@ -11,7 +11,7 @@ export const Info = Schema.Struct({
11
11
  description: "Priority level of the task: high, medium, low",
12
12
  }),
13
13
  }).annotate({ identifier: "Todo" });
14
- const Updated = define({
14
+ const Updated = ephemeral({
15
15
  type: "todo.updated",
16
16
  schema: {
17
17
  sessionID: SessionID,