@opencode-ai/schema 0.0.0-next-15298 → 0.0.0-next-15305

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.
@@ -361,6 +361,7 @@ export declare const SessionDurable: {
361
361
  create: () => string & import("effect/Brand").Brand<"SessionID">;
362
362
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
363
363
  };
364
+ readonly parentSeq: import("effect/Schema").Int;
364
365
  readonly from: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Session.Message.ID"> & {
365
366
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
366
367
  fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -385,6 +386,7 @@ export declare const SessionDurable: {
385
386
  create: () => string & import("effect/Brand").Brand<"SessionID">;
386
387
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
387
388
  };
389
+ readonly parentSeq: import("effect/Schema").Int;
388
390
  readonly from: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Session.Message.ID"> & {
389
391
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
390
392
  fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -987,7 +989,7 @@ export declare const SessionDurable: {
987
989
  }>, never, never>;
988
990
  }>>, never, never>;
989
991
  readonly data: import("effect/Schema").Struct<{
990
- readonly text: import("effect/Schema").String;
992
+ readonly delta: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").brand<import("effect/Schema").String, "Instruction.Hash">, import("effect/Schema").Literal<"removed">]>>;
991
993
  readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
992
994
  create: () => string & import("effect/Brand").Brand<"SessionID">;
993
995
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -1001,7 +1003,7 @@ export declare const SessionDurable: {
1001
1003
  readonly aggregate: string;
1002
1004
  };
1003
1005
  data: import("effect/Schema").Struct<{
1004
- readonly text: import("effect/Schema").String;
1006
+ readonly delta: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").brand<import("effect/Schema").String, "Instruction.Hash">, import("effect/Schema").Literal<"removed">]>>;
1005
1007
  readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
1006
1008
  create: () => string & import("effect/Brand").Brand<"SessionID">;
1007
1009
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -3,7 +3,7 @@ import { Event } from "./event.js";
3
3
  import { SessionEvent } from "./session-event.js";
4
4
  import { SessionV1 } from "./session-v1.js";
5
5
  export const SessionDurable = {
6
- definitions: Event.durableMap(SessionEvent.Definitions),
6
+ definitions: Event.durableMap(SessionEvent.DurableDefinitions),
7
7
  schema: SessionEvent.Durable,
8
8
  };
9
- export const Durable = Event.durableMap([...SessionV1.Event.Definitions, ...SessionEvent.Definitions]);
9
+ export const Durable = Event.durableMap([...SessionV1.Event.Definitions, ...SessionEvent.DurableDefinitions]);
@@ -2910,6 +2910,7 @@ export declare const ServerDefinitions: readonly [Schema.Struct<{
2910
2910
  create: () => string & import("effect/Brand").Brand<"SessionID">;
2911
2911
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
2912
2912
  };
2913
+ readonly parentSeq: Schema.Int;
2913
2914
  readonly from: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Session.Message.ID"> & {
2914
2915
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2915
2916
  fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -2934,6 +2935,7 @@ export declare const ServerDefinitions: readonly [Schema.Struct<{
2934
2935
  create: () => string & import("effect/Brand").Brand<"SessionID">;
2935
2936
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
2936
2937
  };
2938
+ readonly parentSeq: Schema.Int;
2937
2939
  readonly from: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Session.Message.ID"> & {
2938
2940
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2939
2941
  fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -3536,7 +3538,7 @@ export declare const ServerDefinitions: readonly [Schema.Struct<{
3536
3538
  }>, never, never>;
3537
3539
  }>>, never, never>;
3538
3540
  readonly data: Schema.Struct<{
3539
- readonly text: Schema.String;
3541
+ readonly delta: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.brand<Schema.String, "Instruction.Hash">, Schema.Literal<"removed">]>>;
3540
3542
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
3541
3543
  create: () => string & import("effect/Brand").Brand<"SessionID">;
3542
3544
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -3550,7 +3552,7 @@ export declare const ServerDefinitions: readonly [Schema.Struct<{
3550
3552
  readonly aggregate: string;
3551
3553
  };
3552
3554
  data: Schema.Struct<{
3553
- readonly text: Schema.String;
3555
+ readonly delta: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.brand<Schema.String, "Instruction.Hash">, Schema.Literal<"removed">]>>;
3554
3556
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
3555
3557
  create: () => string & import("effect/Brand").Brand<"SessionID">;
3556
3558
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -8368,6 +8370,7 @@ export declare const Definitions: readonly [Schema.Struct<{
8368
8370
  create: () => string & import("effect/Brand").Brand<"SessionID">;
8369
8371
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
8370
8372
  };
8373
+ readonly parentSeq: Schema.Int;
8371
8374
  readonly from: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Session.Message.ID"> & {
8372
8375
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
8373
8376
  fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -8392,6 +8395,7 @@ export declare const Definitions: readonly [Schema.Struct<{
8392
8395
  create: () => string & import("effect/Brand").Brand<"SessionID">;
8393
8396
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
8394
8397
  };
8398
+ readonly parentSeq: Schema.Int;
8395
8399
  readonly from: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Session.Message.ID"> & {
8396
8400
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
8397
8401
  fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -8994,7 +8998,7 @@ export declare const Definitions: readonly [Schema.Struct<{
8994
8998
  }>, never, never>;
8995
8999
  }>>, never, never>;
8996
9000
  readonly data: Schema.Struct<{
8997
- readonly text: Schema.String;
9001
+ readonly delta: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.brand<Schema.String, "Instruction.Hash">, Schema.Literal<"removed">]>>;
8998
9002
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
8999
9003
  create: () => string & import("effect/Brand").Brand<"SessionID">;
9000
9004
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -9008,7 +9012,7 @@ export declare const Definitions: readonly [Schema.Struct<{
9008
9012
  readonly aggregate: string;
9009
9013
  };
9010
9014
  data: Schema.Struct<{
9011
- readonly text: Schema.String;
9015
+ readonly delta: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.brand<Schema.String, "Instruction.Hash">, Schema.Literal<"removed">]>>;
9012
9016
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
9013
9017
  create: () => string & import("effect/Brand").Brand<"SessionID">;
9014
9018
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -13,3 +13,11 @@ export declare const Info: Schema.Struct<{
13
13
  }>;
14
14
  export interface Info extends Schema.Schema.Type<typeof Info> {
15
15
  }
16
+ export declare const MaxValueBytes: number;
17
+ declare const ValueTooLargeError_base: Schema.Class<ValueTooLargeError, Schema.TaggedStruct<"InstructionEntryValueTooLargeError", {
18
+ readonly actualBytes: Schema.Int;
19
+ readonly maxBytes: Schema.Int;
20
+ readonly message: Schema.String;
21
+ }>, import("effect/Cause").YieldableError>;
22
+ export declare class ValueTooLargeError extends ValueTooLargeError_base {
23
+ }
@@ -13,3 +13,10 @@ export const Info = Schema.Struct({
13
13
  key: Key,
14
14
  value: Schema.Json.annotate({ description: "JSON value attached to the session's instructions" }),
15
15
  }).annotate({ identifier: "InstructionEntry.Info" });
16
+ export const MaxValueBytes = 8 * 1024;
17
+ export class ValueTooLargeError extends Schema.TaggedErrorClass()("InstructionEntryValueTooLargeError", {
18
+ actualBytes: Schema.Int,
19
+ maxBytes: Schema.Int,
20
+ message: Schema.String,
21
+ }, { httpApiStatus: 413 }) {
22
+ }
@@ -0,0 +1,13 @@
1
+ export * as Instruction from "./instruction.js";
2
+ import { Schema } from "effect";
3
+ export declare const Key: Schema.brand<Schema.String, "Instruction.Key">;
4
+ export type Key = typeof Key.Type;
5
+ export declare const Hash: Schema.brand<Schema.String, "Instruction.Hash">;
6
+ export type Hash = typeof Hash.Type;
7
+ export declare const Values: Schema.$Record<Schema.brand<Schema.String, "Instruction.Key">, Schema.brand<Schema.String, "Instruction.Hash">>;
8
+ export type Values = Readonly<Record<string, Hash>>;
9
+ export declare const Removed: Schema.Literal<"removed">;
10
+ export type Removed = typeof Removed.Type;
11
+ export declare const removed: "removed";
12
+ export declare const Delta: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.brand<Schema.String, "Instruction.Hash">, Schema.Literal<"removed">]>>;
13
+ export type Delta = typeof Delta.Type;
@@ -0,0 +1,8 @@
1
+ export * as Instruction from "./instruction.js";
2
+ import { Schema } from "effect";
3
+ export const Key = Schema.String.check(Schema.isPattern(/^[a-z0-9][a-z0-9._-]*\/[a-z0-9][a-z0-9._/-]*$/)).pipe(Schema.brand("Instruction.Key"));
4
+ export const Hash = Schema.String.check(Schema.isPattern(/^[a-f0-9]{64}$/)).pipe(Schema.brand("Instruction.Hash"));
5
+ export const Values = Schema.Record(Key, Hash);
6
+ export const Removed = Schema.Literal("removed");
7
+ export const removed = Removed.make("removed");
8
+ export const Delta = Schema.Record(Schema.String, Schema.Union([Hash, Removed]));
@@ -446,6 +446,7 @@ export declare const Forked: Schema.Struct<{
446
446
  create: () => string & import("effect/Brand").Brand<"SessionID">;
447
447
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
448
448
  };
449
+ readonly parentSeq: Schema.Int;
449
450
  readonly from: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Session.Message.ID"> & {
450
451
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
451
452
  fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -470,6 +471,7 @@ export declare const Forked: Schema.Struct<{
470
471
  create: () => string & import("effect/Brand").Brand<"SessionID">;
471
472
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
472
473
  };
474
+ readonly parentSeq: Schema.Int;
473
475
  readonly from: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Session.Message.ID"> & {
474
476
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
475
477
  fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -1088,7 +1090,7 @@ export declare const InstructionsUpdated: Schema.Struct<{
1088
1090
  }>, never, never>;
1089
1091
  }>>, never, never>;
1090
1092
  readonly data: Schema.Struct<{
1091
- readonly text: Schema.String;
1093
+ readonly delta: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.brand<Schema.String, "Instruction.Hash">, Schema.Literal<"removed">]>>;
1092
1094
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
1093
1095
  create: () => string & import("effect/Brand").Brand<"SessionID">;
1094
1096
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -1102,7 +1104,7 @@ export declare const InstructionsUpdated: Schema.Struct<{
1102
1104
  readonly aggregate: string;
1103
1105
  };
1104
1106
  data: Schema.Struct<{
1105
- readonly text: Schema.String;
1107
+ readonly delta: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.brand<Schema.String, "Instruction.Hash">, Schema.Literal<"removed">]>>;
1106
1108
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
1107
1109
  create: () => string & import("effect/Brand").Brand<"SessionID">;
1108
1110
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -3623,6 +3625,7 @@ export declare const Definitions: readonly [Schema.Struct<{
3623
3625
  create: () => string & import("effect/Brand").Brand<"SessionID">;
3624
3626
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
3625
3627
  };
3628
+ readonly parentSeq: Schema.Int;
3626
3629
  readonly from: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Session.Message.ID"> & {
3627
3630
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
3628
3631
  fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -3647,6 +3650,7 @@ export declare const Definitions: readonly [Schema.Struct<{
3647
3650
  create: () => string & import("effect/Brand").Brand<"SessionID">;
3648
3651
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
3649
3652
  };
3653
+ readonly parentSeq: Schema.Int;
3650
3654
  readonly from: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Session.Message.ID"> & {
3651
3655
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
3652
3656
  fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -4249,7 +4253,7 @@ export declare const Definitions: readonly [Schema.Struct<{
4249
4253
  }>, never, never>;
4250
4254
  }>>, never, never>;
4251
4255
  readonly data: Schema.Struct<{
4252
- readonly text: Schema.String;
4256
+ readonly delta: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.brand<Schema.String, "Instruction.Hash">, Schema.Literal<"removed">]>>;
4253
4257
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
4254
4258
  create: () => string & import("effect/Brand").Brand<"SessionID">;
4255
4259
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -4263,7 +4267,7 @@ export declare const Definitions: readonly [Schema.Struct<{
4263
4267
  readonly aggregate: string;
4264
4268
  };
4265
4269
  data: Schema.Struct<{
4266
- readonly text: Schema.String;
4270
+ readonly delta: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.brand<Schema.String, "Instruction.Hash">, Schema.Literal<"removed">]>>;
4267
4271
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
4268
4272
  create: () => string & import("effect/Brand").Brand<"SessionID">;
4269
4273
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -6640,6 +6644,7 @@ export declare const DurableDefinitions: readonly ((Schema.Struct<{
6640
6644
  create: () => string & import("effect/Brand").Brand<"SessionID">;
6641
6645
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
6642
6646
  };
6647
+ readonly parentSeq: Schema.Int;
6643
6648
  readonly from: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Session.Message.ID"> & {
6644
6649
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
6645
6650
  fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -6664,6 +6669,7 @@ export declare const DurableDefinitions: readonly ((Schema.Struct<{
6664
6669
  create: () => string & import("effect/Brand").Brand<"SessionID">;
6665
6670
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
6666
6671
  };
6672
+ readonly parentSeq: Schema.Int;
6667
6673
  readonly from: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Session.Message.ID"> & {
6668
6674
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
6669
6675
  fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -7266,7 +7272,7 @@ export declare const DurableDefinitions: readonly ((Schema.Struct<{
7266
7272
  }>, never, never>;
7267
7273
  }>>, never, never>;
7268
7274
  readonly data: Schema.Struct<{
7269
- readonly text: Schema.String;
7275
+ readonly delta: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.brand<Schema.String, "Instruction.Hash">, Schema.Literal<"removed">]>>;
7270
7276
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
7271
7277
  create: () => string & import("effect/Brand").Brand<"SessionID">;
7272
7278
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -7280,7 +7286,7 @@ export declare const DurableDefinitions: readonly ((Schema.Struct<{
7280
7286
  readonly aggregate: string;
7281
7287
  };
7282
7288
  data: Schema.Struct<{
7283
- readonly text: Schema.String;
7289
+ readonly delta: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.brand<Schema.String, "Instruction.Hash">, Schema.Literal<"removed">]>>;
7284
7290
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
7285
7291
  create: () => string & import("effect/Brand").Brand<"SessionID">;
7286
7292
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -9451,6 +9457,7 @@ export declare const Durable: Schema.Union<readonly ((Schema.Struct<{
9451
9457
  create: () => string & import("effect/Brand").Brand<"SessionID">;
9452
9458
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
9453
9459
  };
9460
+ readonly parentSeq: Schema.Int;
9454
9461
  readonly from: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Session.Message.ID"> & {
9455
9462
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
9456
9463
  fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -9475,6 +9482,7 @@ export declare const Durable: Schema.Union<readonly ((Schema.Struct<{
9475
9482
  create: () => string & import("effect/Brand").Brand<"SessionID">;
9476
9483
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
9477
9484
  };
9485
+ readonly parentSeq: Schema.Int;
9478
9486
  readonly from: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Session.Message.ID"> & {
9479
9487
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
9480
9488
  fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -10077,7 +10085,7 @@ export declare const Durable: Schema.Union<readonly ((Schema.Struct<{
10077
10085
  }>, never, never>;
10078
10086
  }>>, never, never>;
10079
10087
  readonly data: Schema.Struct<{
10080
- readonly text: Schema.String;
10088
+ readonly delta: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.brand<Schema.String, "Instruction.Hash">, Schema.Literal<"removed">]>>;
10081
10089
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
10082
10090
  create: () => string & import("effect/Brand").Brand<"SessionID">;
10083
10091
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -10091,7 +10099,7 @@ export declare const Durable: Schema.Union<readonly ((Schema.Struct<{
10091
10099
  readonly aggregate: string;
10092
10100
  };
10093
10101
  data: Schema.Struct<{
10094
- readonly text: Schema.String;
10102
+ readonly delta: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.brand<Schema.String, "Instruction.Hash">, Schema.Literal<"removed">]>>;
10095
10103
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
10096
10104
  create: () => string & import("effect/Brand").Brand<"SessionID">;
10097
10105
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -12329,6 +12337,7 @@ export declare const All: Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
12329
12337
  create: () => string & import("effect/Brand").Brand<"SessionID">;
12330
12338
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
12331
12339
  };
12340
+ readonly parentSeq: Schema.Int;
12332
12341
  readonly from: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Session.Message.ID"> & {
12333
12342
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
12334
12343
  fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -12353,6 +12362,7 @@ export declare const All: Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
12353
12362
  create: () => string & import("effect/Brand").Brand<"SessionID">;
12354
12363
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
12355
12364
  };
12365
+ readonly parentSeq: Schema.Int;
12356
12366
  readonly from: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Session.Message.ID"> & {
12357
12367
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
12358
12368
  fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -12955,7 +12965,7 @@ export declare const All: Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
12955
12965
  }>, never, never>;
12956
12966
  }>>, never, never>;
12957
12967
  readonly data: Schema.Struct<{
12958
- readonly text: Schema.String;
12968
+ readonly delta: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.brand<Schema.String, "Instruction.Hash">, Schema.Literal<"removed">]>>;
12959
12969
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
12960
12970
  create: () => string & import("effect/Brand").Brand<"SessionID">;
12961
12971
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -12969,7 +12979,7 @@ export declare const All: Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
12969
12979
  readonly aggregate: string;
12970
12980
  };
12971
12981
  data: Schema.Struct<{
12972
- readonly text: Schema.String;
12982
+ readonly delta: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.brand<Schema.String, "Instruction.Hash">, Schema.Literal<"removed">]>>;
12973
12983
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
12974
12984
  create: () => string & import("effect/Brand").Brand<"SessionID">;
12975
12985
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -13,6 +13,7 @@ import { SessionMessage } from "./session-message.js";
13
13
  import { Revert } from "./session-revert.js";
14
14
  import { Shell as ShellSchema } from "./shell.js";
15
15
  import { SessionError } from "./session-error.js";
16
+ import { Instruction } from "./instruction.js";
16
17
  import { Agent } from "./agent.js";
17
18
  import { Skill as SkillSchema } from "./skill.js";
18
19
  import { Money } from "./money.js";
@@ -87,10 +88,14 @@ export const Deleted = Event.durable({
87
88
  });
88
89
  export const Forked = Event.durable({
89
90
  type: "session.forked",
90
- ...options,
91
+ durable: {
92
+ aggregate: "sessionID",
93
+ version: 2,
94
+ },
91
95
  schema: {
92
96
  ...Base,
93
97
  parentID: SessionID,
98
+ parentSeq: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-1)),
94
99
  from: SessionMessage.ID.pipe(optional),
95
100
  },
96
101
  });
@@ -128,10 +133,13 @@ export var Execution;
128
133
  })(Execution || (Execution = {}));
129
134
  export const InstructionsUpdated = Event.durable({
130
135
  type: "session.instructions.updated",
131
- ...options,
136
+ durable: {
137
+ aggregate: "sessionID",
138
+ version: 2,
139
+ },
132
140
  schema: {
133
141
  ...Base,
134
- text: Schema.String,
142
+ delta: Instruction.Delta,
135
143
  },
136
144
  });
137
145
  export const Synthetic = Event.durable({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/schema",
4
- "version": "0.0.0-next-15298",
4
+ "version": "0.0.0-next-15305",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {