@opencode-ai/schema 0.0.0-next-15174 → 0.0.0-next-15180

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.
@@ -4,10 +4,9 @@ import { optional } from "./schema.js";
4
4
  import { Event } from "./event.js";
5
5
  import { ToolContent } from "./llm.js";
6
6
  import { FinishReason } from "./llm.js";
7
- import { Delivery } from "./session-delivery.js";
8
7
  import { Model } from "./model.js";
9
8
  import { NonNegativeInt, PositiveInt, RelativePath } from "./schema.js";
10
- import { FileAttachment, Prompt } from "./prompt.js";
9
+ import { FileAttachment } from "./prompt.js";
11
10
  import { SessionID } from "./session-id.js";
12
11
  import { Location } from "./location.js";
13
12
  import { SessionMessage } from "./session-message.js";
@@ -19,6 +18,7 @@ import { Skill as SkillSchema } from "./skill.js";
19
18
  import { Money } from "./money.js";
20
19
  import { Snapshot } from "./snapshot.js";
21
20
  import { TokenUsage } from "./token-usage.js";
21
+ import { SessionInput } from "./session-input.js";
22
22
  export { FileAttachment };
23
23
  export const Source = Schema.Struct({
24
24
  start: NonNegativeInt,
@@ -30,12 +30,6 @@ export const Source = Schema.Struct({
30
30
  const Base = {
31
31
  sessionID: SessionID,
32
32
  };
33
- const PromptFields = {
34
- ...Base,
35
- inputID: SessionMessage.ID,
36
- prompt: Prompt,
37
- delivery: Delivery,
38
- };
39
33
  const options = {
40
34
  durable: {
41
35
  aggregate: "sessionID",
@@ -100,18 +94,22 @@ export const Forked = Event.durable({
100
94
  from: SessionMessage.ID.pipe(optional),
101
95
  },
102
96
  });
103
- export const PromptPromoted = Event.durable({
104
- type: "session.prompt.promoted",
97
+ export const InputPromoted = Event.durable({
98
+ type: "session.input.promoted",
105
99
  ...options,
106
100
  schema: {
107
101
  sessionID: SessionID,
108
102
  inputID: SessionMessage.ID,
109
103
  },
110
104
  });
111
- export const PromptAdmitted = Event.durable({
112
- type: "session.prompt.admitted",
105
+ export const InputAdmitted = Event.durable({
106
+ type: "session.input.admitted",
113
107
  ...options,
114
- schema: PromptFields,
108
+ schema: {
109
+ ...Base,
110
+ inputID: SessionMessage.ID,
111
+ input: SessionInput.Message,
112
+ },
115
113
  });
116
114
  export var Execution;
117
115
  (function (Execution) {
@@ -437,7 +435,7 @@ export var RevertEvent;
437
435
  schema: { ...Base, to: SessionMessage.ID },
438
436
  });
439
437
  })(RevertEvent || (RevertEvent = {}));
440
- export const Definitions = Event.inventory(AgentSelected, ModelSelected, Moved, Renamed, UsageUpdated, Deleted, Forked, PromptPromoted, PromptAdmitted, Execution.Started, Execution.Succeeded, Execution.Failed, Execution.Interrupted, InstructionsUpdated, 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, RetryScheduled, Compaction.Admitted, Compaction.Started, Compaction.Delta, Compaction.Ended, Compaction.Failed, RevertEvent.Staged, RevertEvent.Cleared, RevertEvent.Committed);
438
+ export const Definitions = Event.inventory(AgentSelected, ModelSelected, Moved, Renamed, UsageUpdated, Deleted, Forked, InputPromoted, InputAdmitted, Execution.Started, Execution.Succeeded, Execution.Failed, Execution.Interrupted, InstructionsUpdated, 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, RetryScheduled, Compaction.Admitted, Compaction.Started, Compaction.Delta, Compaction.Ended, Compaction.Failed, RevertEvent.Staged, RevertEvent.Cleared, RevertEvent.Committed);
441
439
  export const DurableDefinitions = Event.inventory(...Definitions.filter((definition) => definition.durability === "durable"));
442
440
  export const Durable = Schema.Union(DurableDefinitions, { mode: "oneOf" })
443
441
  .pipe(Schema.toTaggedUnion("type"))
@@ -1,22 +1,127 @@
1
1
  export * as SessionInput from "./session-input.js";
2
2
  import { Schema } from "effect";
3
- import { Prompt } from "./prompt.js";
4
3
  import { SessionDelivery } from "./session-delivery.js";
5
4
  export declare const Delivery: Schema.Literals<readonly ["steer", "queue"]>;
6
5
  export type Delivery = SessionDelivery.Delivery;
7
- export interface Admitted extends Schema.Schema.Type<typeof Admitted> {
6
+ export interface UserData extends Schema.Schema.Type<typeof UserData> {
8
7
  }
9
- export declare const Admitted: Schema.Struct<{
10
- readonly admittedSeq: Schema.Int;
11
- readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
12
- create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
13
- fromEvent: (eventID: import("./event.js").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
14
- };
15
- readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
16
- create: () => string & import("effect/Brand").Brand<"SessionID">;
17
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
18
- };
19
- readonly prompt: Schema.Struct<{
8
+ export declare const UserData: Schema.Struct<{
9
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
10
+ readonly text: Schema.String;
11
+ readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
12
+ readonly data: Schema.String;
13
+ readonly mime: Schema.String;
14
+ readonly source: Schema.Union<readonly [Schema.Struct<{
15
+ readonly type: Schema.Literal<"inline">;
16
+ }>, Schema.Struct<{
17
+ readonly type: Schema.Literal<"uri">;
18
+ readonly uri: Schema.String;
19
+ }>]>;
20
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
21
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
22
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
23
+ readonly start: Schema.Finite;
24
+ readonly end: Schema.Finite;
25
+ readonly text: Schema.String;
26
+ }>>>, Schema.optionalKey<Schema.Struct<{
27
+ readonly start: Schema.Finite;
28
+ readonly end: Schema.Finite;
29
+ readonly text: Schema.String;
30
+ }>>, never, never>;
31
+ }> & {
32
+ create: (input: import("./prompt.js").FileAttachment) => {
33
+ readonly data: string;
34
+ readonly mime: string;
35
+ readonly source: {
36
+ readonly type: "inline";
37
+ } | {
38
+ readonly type: "uri";
39
+ readonly uri: string;
40
+ };
41
+ readonly name?: string | undefined;
42
+ readonly description?: string | undefined;
43
+ readonly mention?: {
44
+ readonly start: number;
45
+ readonly end: number;
46
+ readonly text: string;
47
+ } | undefined;
48
+ };
49
+ }>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
50
+ readonly data: Schema.String;
51
+ readonly mime: Schema.String;
52
+ readonly source: Schema.Union<readonly [Schema.Struct<{
53
+ readonly type: Schema.Literal<"inline">;
54
+ }>, Schema.Struct<{
55
+ readonly type: Schema.Literal<"uri">;
56
+ readonly uri: Schema.String;
57
+ }>]>;
58
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
59
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
60
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
61
+ readonly start: Schema.Finite;
62
+ readonly end: Schema.Finite;
63
+ readonly text: Schema.String;
64
+ }>>>, Schema.optionalKey<Schema.Struct<{
65
+ readonly start: Schema.Finite;
66
+ readonly end: Schema.Finite;
67
+ readonly text: Schema.String;
68
+ }>>, never, never>;
69
+ }> & {
70
+ create: (input: import("./prompt.js").FileAttachment) => {
71
+ readonly data: string;
72
+ readonly mime: string;
73
+ readonly source: {
74
+ readonly type: "inline";
75
+ } | {
76
+ readonly type: "uri";
77
+ readonly uri: string;
78
+ };
79
+ readonly name?: string | undefined;
80
+ readonly description?: string | undefined;
81
+ readonly mention?: {
82
+ readonly start: number;
83
+ readonly end: number;
84
+ readonly text: string;
85
+ } | undefined;
86
+ };
87
+ }>>, never, never>;
88
+ readonly agents: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
89
+ readonly name: Schema.String;
90
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
91
+ readonly start: Schema.Finite;
92
+ readonly end: Schema.Finite;
93
+ readonly text: Schema.String;
94
+ }>>>, Schema.optionalKey<Schema.Struct<{
95
+ readonly start: Schema.Finite;
96
+ readonly end: Schema.Finite;
97
+ readonly text: Schema.String;
98
+ }>>, never, never>;
99
+ }>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
100
+ readonly name: Schema.String;
101
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
102
+ readonly start: Schema.Finite;
103
+ readonly end: Schema.Finite;
104
+ readonly text: Schema.String;
105
+ }>>>, Schema.optionalKey<Schema.Struct<{
106
+ readonly start: Schema.Finite;
107
+ readonly end: Schema.Finite;
108
+ readonly text: Schema.String;
109
+ }>>, never, never>;
110
+ }>>>, never, never>;
111
+ }>;
112
+ export interface SyntheticData extends Schema.Schema.Type<typeof SyntheticData> {
113
+ }
114
+ export declare const SyntheticData: Schema.Struct<{
115
+ readonly text: Schema.String;
116
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
117
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
118
+ }>;
119
+ export interface UserMessage extends Schema.Schema.Type<typeof UserMessage> {
120
+ }
121
+ export declare const UserMessage: Schema.Struct<{
122
+ readonly type: Schema.tag<"user">;
123
+ readonly data: Schema.Struct<{
124
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
20
125
  readonly text: Schema.String;
21
126
  readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
22
127
  readonly data: Schema.String;
@@ -118,81 +223,24 @@ export declare const Admitted: Schema.Struct<{
118
223
  readonly text: Schema.String;
119
224
  }>>, never, never>;
120
225
  }>>>, never, never>;
121
- }> & {
122
- equivalence: import("effect/Equivalence").Equivalence<{
123
- readonly text: string;
124
- readonly files?: readonly {
125
- readonly data: string;
126
- readonly mime: string;
127
- readonly source: {
128
- readonly type: "inline";
129
- } | {
130
- readonly type: "uri";
131
- readonly uri: string;
132
- };
133
- readonly name?: string | undefined;
134
- readonly description?: string | undefined;
135
- readonly mention?: {
136
- readonly start: number;
137
- readonly end: number;
138
- readonly text: string;
139
- } | undefined;
140
- }[] | undefined;
141
- readonly agents?: readonly {
142
- readonly name: string;
143
- readonly mention?: {
144
- readonly start: number;
145
- readonly end: number;
146
- readonly text: string;
147
- } | undefined;
148
- }[] | undefined;
149
- }>;
150
- fromUserMessage: (input: Pick<Prompt, "text" | "files" | "agents">) => {
151
- readonly text: string;
152
- readonly files?: readonly {
153
- readonly data: string;
154
- readonly mime: string;
155
- readonly source: {
156
- readonly type: "inline";
157
- } | {
158
- readonly type: "uri";
159
- readonly uri: string;
160
- };
161
- readonly name?: string | undefined;
162
- readonly description?: string | undefined;
163
- readonly mention?: {
164
- readonly start: number;
165
- readonly end: number;
166
- readonly text: string;
167
- } | undefined;
168
- }[] | undefined;
169
- readonly agents?: readonly {
170
- readonly name: string;
171
- readonly mention?: {
172
- readonly start: number;
173
- readonly end: number;
174
- readonly text: string;
175
- } | undefined;
176
- }[] | undefined;
177
- };
178
- };
226
+ }>;
179
227
  readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
180
- readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
181
- readonly promotedSeq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
182
228
  }>;
183
- export interface PromptEntry extends Schema.Schema.Type<typeof PromptEntry> {
229
+ export interface SyntheticMessage extends Schema.Schema.Type<typeof SyntheticMessage> {
184
230
  }
185
- export declare const PromptEntry: Schema.Struct<{
186
- readonly admittedSeq: Schema.Int;
187
- readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
188
- create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
189
- fromEvent: (eventID: import("./event.js").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
190
- };
191
- readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
192
- create: () => string & import("effect/Brand").Brand<"SessionID">;
193
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
194
- };
195
- readonly prompt: Schema.Struct<{
231
+ export declare const SyntheticMessage: Schema.Struct<{
232
+ readonly type: Schema.tag<"synthetic">;
233
+ readonly data: Schema.Struct<{
234
+ readonly text: Schema.String;
235
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
236
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
237
+ }>;
238
+ readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
239
+ }>;
240
+ export declare const Message: Schema.Union<readonly [Schema.Struct<{
241
+ readonly type: Schema.tag<"user">;
242
+ readonly data: Schema.Struct<{
243
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
196
244
  readonly text: Schema.String;
197
245
  readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
198
246
  readonly data: Schema.String;
@@ -294,10 +342,47 @@ export declare const PromptEntry: Schema.Struct<{
294
342
  readonly text: Schema.String;
295
343
  }>>, never, never>;
296
344
  }>>>, never, never>;
297
- }> & {
298
- equivalence: import("effect/Equivalence").Equivalence<{
299
- readonly text: string;
300
- readonly files?: readonly {
345
+ }>;
346
+ readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
347
+ }>, Schema.Struct<{
348
+ readonly type: Schema.tag<"synthetic">;
349
+ readonly data: Schema.Struct<{
350
+ readonly text: Schema.String;
351
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
352
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
353
+ }>;
354
+ readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
355
+ }>]>;
356
+ export type Message = typeof Message.Type;
357
+ export interface User extends Schema.Schema.Type<typeof User> {
358
+ }
359
+ export declare const User: Schema.Struct<{
360
+ readonly type: Schema.tag<"user">;
361
+ readonly data: Schema.Struct<{
362
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
363
+ readonly text: Schema.String;
364
+ readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
365
+ readonly data: Schema.String;
366
+ readonly mime: Schema.String;
367
+ readonly source: Schema.Union<readonly [Schema.Struct<{
368
+ readonly type: Schema.Literal<"inline">;
369
+ }>, Schema.Struct<{
370
+ readonly type: Schema.Literal<"uri">;
371
+ readonly uri: Schema.String;
372
+ }>]>;
373
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
374
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
375
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
376
+ readonly start: Schema.Finite;
377
+ readonly end: Schema.Finite;
378
+ readonly text: Schema.String;
379
+ }>>>, Schema.optionalKey<Schema.Struct<{
380
+ readonly start: Schema.Finite;
381
+ readonly end: Schema.Finite;
382
+ readonly text: Schema.String;
383
+ }>>, never, never>;
384
+ }> & {
385
+ create: (input: import("./prompt.js").FileAttachment) => {
301
386
  readonly data: string;
302
387
  readonly mime: string;
303
388
  readonly source: {
@@ -313,19 +398,29 @@ export declare const PromptEntry: Schema.Struct<{
313
398
  readonly end: number;
314
399
  readonly text: string;
315
400
  } | undefined;
316
- }[] | undefined;
317
- readonly agents?: readonly {
318
- readonly name: string;
319
- readonly mention?: {
320
- readonly start: number;
321
- readonly end: number;
322
- readonly text: string;
323
- } | undefined;
324
- }[] | undefined;
325
- }>;
326
- fromUserMessage: (input: Pick<Prompt, "text" | "files" | "agents">) => {
327
- readonly text: string;
328
- readonly files?: readonly {
401
+ };
402
+ }>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
403
+ readonly data: Schema.String;
404
+ readonly mime: Schema.String;
405
+ readonly source: Schema.Union<readonly [Schema.Struct<{
406
+ readonly type: Schema.Literal<"inline">;
407
+ }>, Schema.Struct<{
408
+ readonly type: Schema.Literal<"uri">;
409
+ readonly uri: Schema.String;
410
+ }>]>;
411
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
412
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
413
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
414
+ readonly start: Schema.Finite;
415
+ readonly end: Schema.Finite;
416
+ readonly text: Schema.String;
417
+ }>>>, Schema.optionalKey<Schema.Struct<{
418
+ readonly start: Schema.Finite;
419
+ readonly end: Schema.Finite;
420
+ readonly text: Schema.String;
421
+ }>>, never, never>;
422
+ }> & {
423
+ create: (input: import("./prompt.js").FileAttachment) => {
329
424
  readonly data: string;
330
425
  readonly mime: string;
331
426
  readonly source: {
@@ -341,26 +436,56 @@ export declare const PromptEntry: Schema.Struct<{
341
436
  readonly end: number;
342
437
  readonly text: string;
343
438
  } | undefined;
344
- }[] | undefined;
345
- readonly agents?: readonly {
346
- readonly name: string;
347
- readonly mention?: {
348
- readonly start: number;
349
- readonly end: number;
350
- readonly text: string;
351
- } | undefined;
352
- }[] | undefined;
353
- };
354
- };
439
+ };
440
+ }>>, never, never>;
441
+ readonly agents: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
442
+ readonly name: Schema.String;
443
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
444
+ readonly start: Schema.Finite;
445
+ readonly end: Schema.Finite;
446
+ readonly text: Schema.String;
447
+ }>>>, Schema.optionalKey<Schema.Struct<{
448
+ readonly start: Schema.Finite;
449
+ readonly end: Schema.Finite;
450
+ readonly text: Schema.String;
451
+ }>>, never, never>;
452
+ }>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
453
+ readonly name: Schema.String;
454
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
455
+ readonly start: Schema.Finite;
456
+ readonly end: Schema.Finite;
457
+ readonly text: Schema.String;
458
+ }>>>, Schema.optionalKey<Schema.Struct<{
459
+ readonly start: Schema.Finite;
460
+ readonly end: Schema.Finite;
461
+ readonly text: Schema.String;
462
+ }>>, never, never>;
463
+ }>>>, never, never>;
464
+ }>;
355
465
  readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
356
- readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
357
466
  readonly promotedSeq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
358
- readonly type: Schema.tag<"prompt">;
467
+ readonly admittedSeq: Schema.Int;
468
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
469
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
470
+ fromEvent: (eventID: import("./event.js").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
471
+ };
472
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
473
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
474
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
475
+ };
476
+ readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
359
477
  }>;
360
- export interface Compaction extends Schema.Schema.Type<typeof Compaction> {
478
+ export interface Synthetic extends Schema.Schema.Type<typeof Synthetic> {
361
479
  }
362
- export declare const Compaction: Schema.Struct<{
363
- readonly type: Schema.tag<"compaction">;
480
+ export declare const Synthetic: Schema.Struct<{
481
+ readonly type: Schema.tag<"synthetic">;
482
+ readonly data: Schema.Struct<{
483
+ readonly text: Schema.String;
484
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
485
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
486
+ }>;
487
+ readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
488
+ readonly promotedSeq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
364
489
  readonly admittedSeq: Schema.Int;
365
490
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
366
491
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -371,9 +496,12 @@ export declare const Compaction: Schema.Struct<{
371
496
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
372
497
  };
373
498
  readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
374
- readonly handledSeq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
375
499
  }>;
376
- export declare const Info: Schema.Union<readonly [Schema.Struct<{
500
+ export interface Compaction extends Schema.Schema.Type<typeof Compaction> {
501
+ }
502
+ export declare const Compaction: Schema.Struct<{
503
+ readonly type: Schema.tag<"compaction">;
504
+ readonly handledSeq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
377
505
  readonly admittedSeq: Schema.Int;
378
506
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
379
507
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -383,7 +511,12 @@ export declare const Info: Schema.Union<readonly [Schema.Struct<{
383
511
  create: () => string & import("effect/Brand").Brand<"SessionID">;
384
512
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
385
513
  };
386
- readonly prompt: Schema.Struct<{
514
+ readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
515
+ }>;
516
+ export declare const Info: Schema.Union<readonly [Schema.Struct<{
517
+ readonly type: Schema.tag<"user">;
518
+ readonly data: Schema.Struct<{
519
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
387
520
  readonly text: Schema.String;
388
521
  readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
389
522
  readonly data: Schema.String;
@@ -485,70 +618,41 @@ export declare const Info: Schema.Union<readonly [Schema.Struct<{
485
618
  readonly text: Schema.String;
486
619
  }>>, never, never>;
487
620
  }>>>, never, never>;
488
- }> & {
489
- equivalence: import("effect/Equivalence").Equivalence<{
490
- readonly text: string;
491
- readonly files?: readonly {
492
- readonly data: string;
493
- readonly mime: string;
494
- readonly source: {
495
- readonly type: "inline";
496
- } | {
497
- readonly type: "uri";
498
- readonly uri: string;
499
- };
500
- readonly name?: string | undefined;
501
- readonly description?: string | undefined;
502
- readonly mention?: {
503
- readonly start: number;
504
- readonly end: number;
505
- readonly text: string;
506
- } | undefined;
507
- }[] | undefined;
508
- readonly agents?: readonly {
509
- readonly name: string;
510
- readonly mention?: {
511
- readonly start: number;
512
- readonly end: number;
513
- readonly text: string;
514
- } | undefined;
515
- }[] | undefined;
516
- }>;
517
- fromUserMessage: (input: Pick<Prompt, "text" | "files" | "agents">) => {
518
- readonly text: string;
519
- readonly files?: readonly {
520
- readonly data: string;
521
- readonly mime: string;
522
- readonly source: {
523
- readonly type: "inline";
524
- } | {
525
- readonly type: "uri";
526
- readonly uri: string;
527
- };
528
- readonly name?: string | undefined;
529
- readonly description?: string | undefined;
530
- readonly mention?: {
531
- readonly start: number;
532
- readonly end: number;
533
- readonly text: string;
534
- } | undefined;
535
- }[] | undefined;
536
- readonly agents?: readonly {
537
- readonly name: string;
538
- readonly mention?: {
539
- readonly start: number;
540
- readonly end: number;
541
- readonly text: string;
542
- } | undefined;
543
- }[] | undefined;
544
- };
545
- };
621
+ }>;
546
622
  readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
623
+ readonly promotedSeq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
624
+ readonly admittedSeq: Schema.Int;
625
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
626
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
627
+ fromEvent: (eventID: import("./event.js").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
628
+ };
629
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
630
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
631
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
632
+ };
547
633
  readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
634
+ }>, Schema.Struct<{
635
+ readonly type: Schema.tag<"synthetic">;
636
+ readonly data: Schema.Struct<{
637
+ readonly text: Schema.String;
638
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
639
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
640
+ }>;
641
+ readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
548
642
  readonly promotedSeq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
549
- readonly type: Schema.tag<"prompt">;
643
+ readonly admittedSeq: Schema.Int;
644
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
645
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
646
+ fromEvent: (eventID: import("./event.js").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
647
+ };
648
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
649
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
650
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
651
+ };
652
+ readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
550
653
  }>, Schema.Struct<{
551
654
  readonly type: Schema.tag<"compaction">;
655
+ readonly handledSeq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
552
656
  readonly admittedSeq: Schema.Int;
553
657
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
554
658
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -559,6 +663,5 @@ export declare const Info: Schema.Union<readonly [Schema.Struct<{
559
663
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
560
664
  };
561
665
  readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
562
- readonly handledSeq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
563
666
  }>]>;
564
667
  export type Info = typeof Info.Type;