@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
package/dist/shell.d.ts CHANGED
@@ -42,15 +42,6 @@ export declare const Event: {
42
42
  };
43
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>;
44
44
  readonly type: Schema.Literal<"shell.created">;
45
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
46
- readonly aggregateID: Schema.String;
47
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
48
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
49
- }>>>, Schema.optionalKey<Schema.Struct<{
50
- readonly aggregateID: Schema.String;
51
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
52
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
53
- }>>, never, never>;
54
45
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
55
46
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
56
47
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -91,6 +82,9 @@ export declare const Event: {
91
82
  }>;
92
83
  }>;
93
84
  }> & {
85
+ type: "shell.created";
86
+ durability: "ephemeral";
87
+ durable: undefined;
94
88
  data: Schema.Struct<{
95
89
  readonly info: Schema.Struct<{
96
90
  readonly id: Schema.brand<Schema.String, "ShellID"> & {
@@ -111,11 +105,6 @@ export declare const Event: {
111
105
  }>;
112
106
  }>;
113
107
  }>;
114
- durable?: {
115
- readonly version: number;
116
- readonly aggregate: string;
117
- } | undefined;
118
- type: "shell.created";
119
108
  };
120
109
  Exited: Schema.Struct<{
121
110
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
@@ -123,15 +112,6 @@ export declare const Event: {
123
112
  };
124
113
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
125
114
  readonly type: Schema.Literal<"shell.exited">;
126
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
127
- readonly aggregateID: Schema.String;
128
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
129
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
130
- }>>>, Schema.optionalKey<Schema.Struct<{
131
- readonly aggregateID: Schema.String;
132
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
133
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
134
- }>>, never, never>;
135
115
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
136
116
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
137
117
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -160,6 +140,9 @@ export declare const Event: {
160
140
  readonly status: Schema.Literals<readonly ["running", "exited", "timeout", "killed"]>;
161
141
  }>;
162
142
  }> & {
143
+ type: "shell.exited";
144
+ durability: "ephemeral";
145
+ durable: undefined;
163
146
  data: Schema.Struct<{
164
147
  readonly id: Schema.brand<Schema.String, "ShellID"> & {
165
148
  create: () => string & import("effect/Brand").Brand<"ShellID">;
@@ -168,11 +151,6 @@ export declare const Event: {
168
151
  readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>;
169
152
  readonly status: Schema.Literals<readonly ["running", "exited", "timeout", "killed"]>;
170
153
  }>;
171
- durable?: {
172
- readonly version: number;
173
- readonly aggregate: string;
174
- } | undefined;
175
- type: "shell.exited";
176
154
  };
177
155
  Deleted: Schema.Struct<{
178
156
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
@@ -180,15 +158,6 @@ export declare const Event: {
180
158
  };
181
159
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
182
160
  readonly type: Schema.Literal<"shell.deleted">;
183
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
184
- readonly aggregateID: Schema.String;
185
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
186
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
187
- }>>>, Schema.optionalKey<Schema.Struct<{
188
- readonly aggregateID: Schema.String;
189
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
190
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
191
- }>>, never, never>;
192
161
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
193
162
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
194
163
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -215,17 +184,15 @@ export declare const Event: {
215
184
  };
216
185
  }>;
217
186
  }> & {
187
+ type: "shell.deleted";
188
+ durability: "ephemeral";
189
+ durable: undefined;
218
190
  data: Schema.Struct<{
219
191
  readonly id: Schema.brand<Schema.String, "ShellID"> & {
220
192
  create: () => string & import("effect/Brand").Brand<"ShellID">;
221
193
  ascending: (id?: string) => string & import("effect/Brand").Brand<"ShellID">;
222
194
  };
223
195
  }>;
224
- durable?: {
225
- readonly version: number;
226
- readonly aggregate: string;
227
- } | undefined;
228
- type: "shell.deleted";
229
196
  };
230
197
  Definitions: readonly [Schema.Struct<{
231
198
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
@@ -233,15 +200,6 @@ export declare const Event: {
233
200
  };
234
201
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
235
202
  readonly type: Schema.Literal<"shell.created">;
236
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
237
- readonly aggregateID: Schema.String;
238
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
239
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
240
- }>>>, Schema.optionalKey<Schema.Struct<{
241
- readonly aggregateID: Schema.String;
242
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
243
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
244
- }>>, never, never>;
245
203
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
246
204
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
247
205
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -282,6 +240,9 @@ export declare const Event: {
282
240
  }>;
283
241
  }>;
284
242
  }> & {
243
+ type: "shell.created";
244
+ durability: "ephemeral";
245
+ durable: undefined;
285
246
  data: Schema.Struct<{
286
247
  readonly info: Schema.Struct<{
287
248
  readonly id: Schema.brand<Schema.String, "ShellID"> & {
@@ -302,26 +263,12 @@ export declare const Event: {
302
263
  }>;
303
264
  }>;
304
265
  }>;
305
- durable?: {
306
- readonly version: number;
307
- readonly aggregate: string;
308
- } | undefined;
309
- type: "shell.created";
310
266
  }, Schema.Struct<{
311
267
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
312
268
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
313
269
  };
314
270
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
315
271
  readonly type: Schema.Literal<"shell.exited">;
316
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
317
- readonly aggregateID: Schema.String;
318
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
319
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
320
- }>>>, Schema.optionalKey<Schema.Struct<{
321
- readonly aggregateID: Schema.String;
322
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
323
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
324
- }>>, never, never>;
325
272
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
326
273
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
327
274
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -350,6 +297,9 @@ export declare const Event: {
350
297
  readonly status: Schema.Literals<readonly ["running", "exited", "timeout", "killed"]>;
351
298
  }>;
352
299
  }> & {
300
+ type: "shell.exited";
301
+ durability: "ephemeral";
302
+ durable: undefined;
353
303
  data: Schema.Struct<{
354
304
  readonly id: Schema.brand<Schema.String, "ShellID"> & {
355
305
  create: () => string & import("effect/Brand").Brand<"ShellID">;
@@ -358,26 +308,12 @@ export declare const Event: {
358
308
  readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>;
359
309
  readonly status: Schema.Literals<readonly ["running", "exited", "timeout", "killed"]>;
360
310
  }>;
361
- durable?: {
362
- readonly version: number;
363
- readonly aggregate: string;
364
- } | undefined;
365
- type: "shell.exited";
366
311
  }, Schema.Struct<{
367
312
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
368
313
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
369
314
  };
370
315
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
371
316
  readonly type: Schema.Literal<"shell.deleted">;
372
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
373
- readonly aggregateID: Schema.String;
374
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
375
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
376
- }>>>, Schema.optionalKey<Schema.Struct<{
377
- readonly aggregateID: Schema.String;
378
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
379
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
380
- }>>, never, never>;
381
317
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
382
318
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
383
319
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -404,17 +340,15 @@ export declare const Event: {
404
340
  };
405
341
  }>;
406
342
  }> & {
343
+ type: "shell.deleted";
344
+ durability: "ephemeral";
345
+ durable: undefined;
407
346
  data: Schema.Struct<{
408
347
  readonly id: Schema.brand<Schema.String, "ShellID"> & {
409
348
  create: () => string & import("effect/Brand").Brand<"ShellID">;
410
349
  ascending: (id?: string) => string & import("effect/Brand").Brand<"ShellID">;
411
350
  };
412
351
  }>;
413
- durable?: {
414
- readonly version: number;
415
- readonly aggregate: string;
416
- } | undefined;
417
- type: "shell.deleted";
418
352
  }];
419
353
  };
420
354
  export declare const CreateInput: Schema.Struct<{
package/dist/shell.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export * as Shell from "./shell.js";
2
2
  import { Schema } from "effect";
3
3
  import { optional } from "./schema.js";
4
- import { define, inventory } from "./event.js";
4
+ import { ephemeral, inventory } from "./event.js";
5
5
  import { ascending } from "./identifier.js";
6
6
  import { NonNegativeInt, statics } from "./schema.js";
7
7
  const IDSchema = Schema.String.check(Schema.isStartsWith("sh_")).pipe(Schema.brand("ShellID"));
@@ -34,9 +34,9 @@ export const Info = Schema.Struct({
34
34
  metadata: Metadata,
35
35
  time: Time,
36
36
  }).annotate({ identifier: "Shell" });
37
- const Created = define({ type: "shell.created", schema: { info: Info } });
38
- const Exited = define({ type: "shell.exited", schema: { id: ID, exit: optional(Schema.Number), status: Status } });
39
- const Deleted = define({ type: "shell.deleted", schema: { id: ID } });
37
+ const Created = ephemeral({ type: "shell.created", schema: { info: Info } });
38
+ const Exited = ephemeral({ type: "shell.exited", schema: { id: ID, exit: optional(Schema.Number), status: Status } });
39
+ const Deleted = ephemeral({ type: "shell.deleted", schema: { id: ID } });
40
40
  export const Event = { Created, Exited, Deleted, Definitions: inventory(Created, Exited, Deleted) };
41
41
  export const CreateInput = Schema.Struct({
42
42
  command: Schema.String,
package/dist/skill.d.ts CHANGED
@@ -29,15 +29,6 @@ export declare const Event: {
29
29
  };
30
30
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
31
31
  readonly type: Schema.Literal<"skill.updated">;
32
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
33
- readonly aggregateID: Schema.String;
34
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
35
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
36
- }>>>, Schema.optionalKey<Schema.Struct<{
37
- readonly aggregateID: Schema.String;
38
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
39
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
40
- }>>, never, never>;
41
32
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
42
33
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
43
34
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -59,12 +50,10 @@ export declare const Event: {
59
50
  }>>, never, never>;
60
51
  readonly data: Schema.Struct<{}>;
61
52
  }> & {
62
- data: Schema.Struct<{}>;
63
- durable?: {
64
- readonly version: number;
65
- readonly aggregate: string;
66
- } | undefined;
67
53
  type: "skill.updated";
54
+ durability: "ephemeral";
55
+ durable: undefined;
56
+ data: Schema.Struct<{}>;
68
57
  };
69
58
  Definitions: readonly [Schema.Struct<{
70
59
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
@@ -72,15 +61,6 @@ export declare const Event: {
72
61
  };
73
62
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
74
63
  readonly type: Schema.Literal<"skill.updated">;
75
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
76
- readonly aggregateID: Schema.String;
77
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
78
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
79
- }>>>, Schema.optionalKey<Schema.Struct<{
80
- readonly aggregateID: Schema.String;
81
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
82
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
83
- }>>, never, never>;
84
64
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
85
65
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
86
66
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -102,12 +82,10 @@ export declare const Event: {
102
82
  }>>, never, never>;
103
83
  readonly data: Schema.Struct<{}>;
104
84
  }> & {
105
- data: Schema.Struct<{}>;
106
- durable?: {
107
- readonly version: number;
108
- readonly aggregate: string;
109
- } | undefined;
110
85
  type: "skill.updated";
86
+ durability: "ephemeral";
87
+ durable: undefined;
88
+ data: Schema.Struct<{}>;
111
89
  }];
112
90
  };
113
91
  export interface EmbeddedSource extends Schema.Schema.Type<typeof EmbeddedSource> {
package/dist/skill.js CHANGED
@@ -2,7 +2,7 @@ export * as Skill from "./skill.js";
2
2
  import { Schema } from "effect";
3
3
  import { optional } from "./schema.js";
4
4
  import { AbsolutePath } from "./schema.js";
5
- import { define, inventory } from "./event.js";
5
+ import { ephemeral, inventory } from "./event.js";
6
6
  export const DirectorySource = Schema.Struct({
7
7
  type: Schema.Literal("directory"),
8
8
  path: AbsolutePath,
@@ -19,7 +19,7 @@ export const Info = Schema.Struct({
19
19
  location: AbsolutePath,
20
20
  content: Schema.String,
21
21
  }).annotate({ identifier: "SkillV2.Info" });
22
- const Updated = define({ type: "skill.updated", schema: {} });
22
+ const Updated = ephemeral({ type: "skill.updated", schema: {} });
23
23
  export const Event = { Updated, Definitions: inventory(Updated) };
24
24
  export const EmbeddedSource = Schema.Struct({
25
25
  type: Schema.Literal("embedded"),
@@ -6,15 +6,6 @@ export declare const PromptAppend: 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<"tui.prompt.append">;
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 PromptAppend: Schema.Struct<{
38
29
  readonly text: Schema.String;
39
30
  }>;
40
31
  }> & {
32
+ type: "tui.prompt.append";
33
+ durability: "ephemeral";
34
+ durable: undefined;
41
35
  data: Schema.Struct<{
42
36
  readonly text: Schema.String;
43
37
  }>;
44
- durable?: {
45
- readonly version: number;
46
- readonly aggregate: string;
47
- } | undefined;
48
- type: "tui.prompt.append";
49
38
  };
50
39
  export declare const CommandExecute: Schema.Struct<{
51
40
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
@@ -53,15 +42,6 @@ export declare const CommandExecute: 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<"tui.command.execute">;
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,14 +65,12 @@ export declare const CommandExecute: Schema.Struct<{
85
65
  readonly command: Schema.Union<readonly [Schema.Literals<readonly ["session.list", "session.new", "session.share", "session.interrupt", "session.background", "session.compact", "session.page.up", "session.page.down", "session.line.up", "session.line.down", "session.half.page.up", "session.half.page.down", "session.first", "session.last", "prompt.clear", "prompt.submit", "agent.cycle"]>, Schema.String]>;
86
66
  }>;
87
67
  }> & {
68
+ type: "tui.command.execute";
69
+ durability: "ephemeral";
70
+ durable: undefined;
88
71
  data: Schema.Struct<{
89
72
  readonly command: Schema.Union<readonly [Schema.Literals<readonly ["session.list", "session.new", "session.share", "session.interrupt", "session.background", "session.compact", "session.page.up", "session.page.down", "session.line.up", "session.line.down", "session.half.page.up", "session.half.page.down", "session.first", "session.last", "prompt.clear", "prompt.submit", "agent.cycle"]>, Schema.String]>;
90
73
  }>;
91
- durable?: {
92
- readonly version: number;
93
- readonly aggregate: string;
94
- } | undefined;
95
- type: "tui.command.execute";
96
74
  };
97
75
  export declare const ToastShow: Schema.Struct<{
98
76
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
@@ -100,15 +78,6 @@ export declare const ToastShow: Schema.Struct<{
100
78
  };
101
79
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
102
80
  readonly type: Schema.Literal<"tui.toast.show">;
103
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
104
- readonly aggregateID: Schema.String;
105
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
106
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
107
- }>>>, Schema.optionalKey<Schema.Struct<{
108
- readonly aggregateID: Schema.String;
109
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
110
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
111
- }>>, never, never>;
112
81
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
113
82
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
114
83
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -135,17 +104,15 @@ export declare const ToastShow: Schema.Struct<{
135
104
  readonly duration: Schema.withDecodingDefault<Schema.Int, never>;
136
105
  }>;
137
106
  }> & {
107
+ type: "tui.toast.show";
108
+ durability: "ephemeral";
109
+ durable: undefined;
138
110
  data: Schema.Struct<{
139
111
  readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
140
112
  readonly message: Schema.String;
141
113
  readonly variant: Schema.Literals<readonly ["info", "success", "warning", "error"]>;
142
114
  readonly duration: Schema.withDecodingDefault<Schema.Int, never>;
143
115
  }>;
144
- durable?: {
145
- readonly version: number;
146
- readonly aggregate: string;
147
- } | undefined;
148
- type: "tui.toast.show";
149
116
  };
150
117
  export declare const SessionSelect: Schema.Struct<{
151
118
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
@@ -153,15 +120,6 @@ export declare const SessionSelect: Schema.Struct<{
153
120
  };
154
121
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
155
122
  readonly type: Schema.Literal<"tui.session.select">;
156
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
157
- readonly aggregateID: Schema.String;
158
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
159
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
160
- }>>>, Schema.optionalKey<Schema.Struct<{
161
- readonly aggregateID: Schema.String;
162
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
163
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
164
- }>>, never, never>;
165
123
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
166
124
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
167
125
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -185,14 +143,12 @@ export declare const SessionSelect: Schema.Struct<{
185
143
  readonly sessionID: Schema.brand<Schema.String, "SessionID">;
186
144
  }>;
187
145
  }> & {
146
+ type: "tui.session.select";
147
+ durability: "ephemeral";
148
+ durable: undefined;
188
149
  data: Schema.Struct<{
189
150
  readonly sessionID: Schema.brand<Schema.String, "SessionID">;
190
151
  }>;
191
- durable?: {
192
- readonly version: number;
193
- readonly aggregate: string;
194
- } | undefined;
195
- type: "tui.session.select";
196
152
  };
197
153
  export declare const Definitions: readonly [Schema.Struct<{
198
154
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
@@ -200,15 +156,6 @@ export declare const Definitions: readonly [Schema.Struct<{
200
156
  };
201
157
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
202
158
  readonly type: Schema.Literal<"tui.prompt.append">;
203
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
204
- readonly aggregateID: Schema.String;
205
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
206
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
207
- }>>>, Schema.optionalKey<Schema.Struct<{
208
- readonly aggregateID: Schema.String;
209
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
210
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
211
- }>>, never, never>;
212
159
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
213
160
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
214
161
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -232,29 +179,18 @@ export declare const Definitions: readonly [Schema.Struct<{
232
179
  readonly text: Schema.String;
233
180
  }>;
234
181
  }> & {
182
+ type: "tui.prompt.append";
183
+ durability: "ephemeral";
184
+ durable: undefined;
235
185
  data: Schema.Struct<{
236
186
  readonly text: Schema.String;
237
187
  }>;
238
- durable?: {
239
- readonly version: number;
240
- readonly aggregate: string;
241
- } | undefined;
242
- type: "tui.prompt.append";
243
188
  }, Schema.Struct<{
244
189
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
245
190
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
246
191
  };
247
192
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
248
193
  readonly type: Schema.Literal<"tui.command.execute">;
249
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
250
- readonly aggregateID: Schema.String;
251
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
252
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
253
- }>>>, Schema.optionalKey<Schema.Struct<{
254
- readonly aggregateID: Schema.String;
255
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
256
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
257
- }>>, never, never>;
258
194
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
259
195
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
260
196
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -278,29 +214,18 @@ export declare const Definitions: readonly [Schema.Struct<{
278
214
  readonly command: Schema.Union<readonly [Schema.Literals<readonly ["session.list", "session.new", "session.share", "session.interrupt", "session.background", "session.compact", "session.page.up", "session.page.down", "session.line.up", "session.line.down", "session.half.page.up", "session.half.page.down", "session.first", "session.last", "prompt.clear", "prompt.submit", "agent.cycle"]>, Schema.String]>;
279
215
  }>;
280
216
  }> & {
217
+ type: "tui.command.execute";
218
+ durability: "ephemeral";
219
+ durable: undefined;
281
220
  data: Schema.Struct<{
282
221
  readonly command: Schema.Union<readonly [Schema.Literals<readonly ["session.list", "session.new", "session.share", "session.interrupt", "session.background", "session.compact", "session.page.up", "session.page.down", "session.line.up", "session.line.down", "session.half.page.up", "session.half.page.down", "session.first", "session.last", "prompt.clear", "prompt.submit", "agent.cycle"]>, Schema.String]>;
283
222
  }>;
284
- durable?: {
285
- readonly version: number;
286
- readonly aggregate: string;
287
- } | undefined;
288
- type: "tui.command.execute";
289
223
  }, Schema.Struct<{
290
224
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
291
225
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
292
226
  };
293
227
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
294
228
  readonly type: Schema.Literal<"tui.toast.show">;
295
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
296
- readonly aggregateID: Schema.String;
297
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
298
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
299
- }>>>, Schema.optionalKey<Schema.Struct<{
300
- readonly aggregateID: Schema.String;
301
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
302
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
303
- }>>, never, never>;
304
229
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
305
230
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
306
231
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -327,32 +252,21 @@ export declare const Definitions: readonly [Schema.Struct<{
327
252
  readonly duration: Schema.withDecodingDefault<Schema.Int, never>;
328
253
  }>;
329
254
  }> & {
255
+ type: "tui.toast.show";
256
+ durability: "ephemeral";
257
+ durable: undefined;
330
258
  data: Schema.Struct<{
331
259
  readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
332
260
  readonly message: Schema.String;
333
261
  readonly variant: Schema.Literals<readonly ["info", "success", "warning", "error"]>;
334
262
  readonly duration: Schema.withDecodingDefault<Schema.Int, never>;
335
263
  }>;
336
- durable?: {
337
- readonly version: number;
338
- readonly aggregate: string;
339
- } | undefined;
340
- type: "tui.toast.show";
341
264
  }, Schema.Struct<{
342
265
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
343
266
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
344
267
  };
345
268
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
346
269
  readonly type: Schema.Literal<"tui.session.select">;
347
- readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
348
- readonly aggregateID: Schema.String;
349
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
350
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
351
- }>>>, Schema.optionalKey<Schema.Struct<{
352
- readonly aggregateID: Schema.String;
353
- readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
354
- readonly version: Schema.brand<Schema.Int, "Event.Version">;
355
- }>>, never, never>;
356
270
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
357
271
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
358
272
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
@@ -376,12 +290,10 @@ export declare const Definitions: readonly [Schema.Struct<{
376
290
  readonly sessionID: Schema.brand<Schema.String, "SessionID">;
377
291
  }>;
378
292
  }> & {
293
+ type: "tui.session.select";
294
+ durability: "ephemeral";
295
+ durable: undefined;
379
296
  data: Schema.Struct<{
380
297
  readonly sessionID: Schema.brand<Schema.String, "SessionID">;
381
298
  }>;
382
- durable?: {
383
- readonly version: number;
384
- readonly aggregate: string;
385
- } | undefined;
386
- type: "tui.session.select";
387
299
  }];
package/dist/tui-event.js CHANGED
@@ -5,8 +5,8 @@ import { Event } from "./event.js";
5
5
  import { PositiveInt } from "./schema.js";
6
6
  import { SessionID } from "./session-id.js";
7
7
  const DEFAULT_TOAST_DURATION = 5000;
8
- export const PromptAppend = Event.define({ type: "tui.prompt.append", schema: { text: Schema.String } });
9
- export const CommandExecute = Event.define({
8
+ export const PromptAppend = Event.ephemeral({ type: "tui.prompt.append", schema: { text: Schema.String } });
9
+ export const CommandExecute = Event.ephemeral({
10
10
  type: "tui.command.execute",
11
11
  schema: {
12
12
  command: Schema.Union([
@@ -33,7 +33,7 @@ export const CommandExecute = Event.define({
33
33
  ]),
34
34
  },
35
35
  });
36
- export const ToastShow = Event.define({
36
+ export const ToastShow = Event.ephemeral({
37
37
  type: "tui.toast.show",
38
38
  schema: {
39
39
  title: optional(Schema.String),
@@ -44,7 +44,7 @@ export const ToastShow = Event.define({
44
44
  }),
45
45
  },
46
46
  });
47
- export const SessionSelect = Event.define({
47
+ export const SessionSelect = Event.ephemeral({
48
48
  type: "tui.session.select",
49
49
  schema: {
50
50
  sessionID: SessionID.annotate({ description: "Session ID to navigate to" }),