@opencode-ai/protocol 0.0.0-next-16420 → 0.0.0-next-16474
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.
- package/dist/groups/event.d.ts +66 -34
- package/dist/groups/session.d.ts +152 -86
- package/dist/groups/session.js +3 -3
- package/package.json +2 -2
package/dist/groups/event.d.ts
CHANGED
|
@@ -943,14 +943,20 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
943
943
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
944
944
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
945
945
|
};
|
|
946
|
-
readonly
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
946
|
+
readonly boundary: Schema.Union<readonly [Schema.Struct<{
|
|
947
|
+
readonly type: Schema.Literal<"before">;
|
|
948
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
949
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
950
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
951
|
+
};
|
|
952
|
+
}>, Schema.Struct<{
|
|
953
|
+
readonly type: Schema.Literal<"through">;
|
|
954
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
955
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
956
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
957
|
+
};
|
|
958
|
+
}>]>;
|
|
959
|
+
readonly instructions: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.brand<Schema.String, "Instruction.Key">, Schema.brand<Schema.String, "Instruction.Hash">>>>, Schema.optionalKey<Schema.$Record<Schema.brand<Schema.String, "Instruction.Key">, Schema.brand<Schema.String, "Instruction.Hash">>>, never, never>;
|
|
954
960
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
955
961
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
956
962
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
@@ -968,14 +974,20 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
968
974
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
969
975
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
970
976
|
};
|
|
971
|
-
readonly
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
977
|
+
readonly boundary: Schema.Union<readonly [Schema.Struct<{
|
|
978
|
+
readonly type: Schema.Literal<"before">;
|
|
979
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
980
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
981
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
982
|
+
};
|
|
983
|
+
}>, Schema.Struct<{
|
|
984
|
+
readonly type: Schema.Literal<"through">;
|
|
985
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
986
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
987
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
988
|
+
};
|
|
989
|
+
}>]>;
|
|
990
|
+
readonly instructions: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.brand<Schema.String, "Instruction.Key">, Schema.brand<Schema.String, "Instruction.Hash">>>>, Schema.optionalKey<Schema.$Record<Schema.brand<Schema.String, "Instruction.Key">, Schema.brand<Schema.String, "Instruction.Hash">>>, never, never>;
|
|
979
991
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
980
992
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
981
993
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
@@ -7871,8 +7883,16 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
7871
7883
|
readonly data: {
|
|
7872
7884
|
readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
|
|
7873
7885
|
readonly parentID: string & import("effect/Brand").Brand<"SessionID">;
|
|
7874
|
-
readonly
|
|
7875
|
-
|
|
7886
|
+
readonly boundary: {
|
|
7887
|
+
readonly type: "before";
|
|
7888
|
+
readonly messageID: string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
7889
|
+
} | {
|
|
7890
|
+
readonly type: "through";
|
|
7891
|
+
readonly messageID: string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
7892
|
+
};
|
|
7893
|
+
readonly instructions?: {
|
|
7894
|
+
readonly [x: string & import("effect/Brand").Brand<"Instruction.Key">]: string & import("effect/Brand").Brand<"Instruction.Hash">;
|
|
7895
|
+
} | undefined;
|
|
7876
7896
|
};
|
|
7877
7897
|
readonly durable: {
|
|
7878
7898
|
readonly aggregateID: string;
|
|
@@ -11196,14 +11216,20 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
11196
11216
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
11197
11217
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
11198
11218
|
};
|
|
11199
|
-
readonly
|
|
11200
|
-
|
|
11201
|
-
|
|
11202
|
-
|
|
11203
|
-
|
|
11204
|
-
|
|
11205
|
-
|
|
11206
|
-
|
|
11219
|
+
readonly boundary: Schema.Union<readonly [Schema.Struct<{
|
|
11220
|
+
readonly type: Schema.Literal<"before">;
|
|
11221
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
11222
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
11223
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
11224
|
+
};
|
|
11225
|
+
}>, Schema.Struct<{
|
|
11226
|
+
readonly type: Schema.Literal<"through">;
|
|
11227
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
11228
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
11229
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
11230
|
+
};
|
|
11231
|
+
}>]>;
|
|
11232
|
+
readonly instructions: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.brand<Schema.String, "Instruction.Key">, Schema.brand<Schema.String, "Instruction.Hash">>>>, Schema.optionalKey<Schema.$Record<Schema.brand<Schema.String, "Instruction.Key">, Schema.brand<Schema.String, "Instruction.Hash">>>, never, never>;
|
|
11207
11233
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
11208
11234
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
11209
11235
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
@@ -11221,14 +11247,20 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
11221
11247
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
11222
11248
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
11223
11249
|
};
|
|
11224
|
-
readonly
|
|
11225
|
-
|
|
11226
|
-
|
|
11227
|
-
|
|
11228
|
-
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
|
|
11250
|
+
readonly boundary: Schema.Union<readonly [Schema.Struct<{
|
|
11251
|
+
readonly type: Schema.Literal<"before">;
|
|
11252
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
11253
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
11254
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
11255
|
+
};
|
|
11256
|
+
}>, Schema.Struct<{
|
|
11257
|
+
readonly type: Schema.Literal<"through">;
|
|
11258
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
11259
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
11260
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
11261
|
+
};
|
|
11262
|
+
}>]>;
|
|
11263
|
+
readonly instructions: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.brand<Schema.String, "Instruction.Key">, Schema.brand<Schema.String, "Instruction.Hash">>>>, Schema.optionalKey<Schema.$Record<Schema.brand<Schema.String, "Instruction.Key">, Schema.brand<Schema.String, "Instruction.Hash">>>, never, never>;
|
|
11232
11264
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
11233
11265
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
11234
11266
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
package/dist/groups/session.d.ts
CHANGED
|
@@ -161,25 +161,37 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
161
161
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
162
162
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
163
163
|
};
|
|
164
|
-
readonly
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}>,
|
|
164
|
+
readonly boundary: Schema.Union<readonly [Schema.Struct<{
|
|
165
|
+
readonly type: Schema.Literal<"before">;
|
|
166
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
167
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
168
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
169
|
+
};
|
|
170
|
+
}>, Schema.Struct<{
|
|
171
|
+
readonly type: Schema.Literal<"through">;
|
|
172
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
173
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
174
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
175
|
+
};
|
|
176
|
+
}>]>;
|
|
171
177
|
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
172
178
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
173
179
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
174
180
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
175
181
|
};
|
|
176
|
-
readonly
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
}>,
|
|
182
|
+
readonly boundary: Schema.Union<readonly [Schema.Struct<{
|
|
183
|
+
readonly type: Schema.Literal<"before">;
|
|
184
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
185
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
186
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
187
|
+
};
|
|
188
|
+
}>, Schema.Struct<{
|
|
189
|
+
readonly type: Schema.Literal<"through">;
|
|
190
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
191
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
192
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
193
|
+
};
|
|
194
|
+
}>]>;
|
|
183
195
|
}>>, never, never>;
|
|
184
196
|
readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
|
|
185
197
|
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
@@ -434,25 +446,37 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
434
446
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
435
447
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
436
448
|
};
|
|
437
|
-
readonly
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
}>,
|
|
449
|
+
readonly boundary: Schema.Union<readonly [Schema.Struct<{
|
|
450
|
+
readonly type: Schema.Literal<"before">;
|
|
451
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
452
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
453
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
454
|
+
};
|
|
455
|
+
}>, Schema.Struct<{
|
|
456
|
+
readonly type: Schema.Literal<"through">;
|
|
457
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
458
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
459
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
460
|
+
};
|
|
461
|
+
}>]>;
|
|
444
462
|
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
445
463
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
446
464
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
447
465
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
448
466
|
};
|
|
449
|
-
readonly
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
}>,
|
|
467
|
+
readonly boundary: Schema.Union<readonly [Schema.Struct<{
|
|
468
|
+
readonly type: Schema.Literal<"before">;
|
|
469
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
470
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
471
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
472
|
+
};
|
|
473
|
+
}>, Schema.Struct<{
|
|
474
|
+
readonly type: Schema.Literal<"through">;
|
|
475
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
476
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
477
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
478
|
+
};
|
|
479
|
+
}>]>;
|
|
456
480
|
}>>, never, never>;
|
|
457
481
|
readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
|
|
458
482
|
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
@@ -604,25 +628,37 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
604
628
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
605
629
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
606
630
|
};
|
|
607
|
-
readonly
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
}>,
|
|
631
|
+
readonly boundary: Schema.Union<readonly [Schema.Struct<{
|
|
632
|
+
readonly type: Schema.Literal<"before">;
|
|
633
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
634
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
635
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
636
|
+
};
|
|
637
|
+
}>, Schema.Struct<{
|
|
638
|
+
readonly type: Schema.Literal<"through">;
|
|
639
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
640
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
641
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
642
|
+
};
|
|
643
|
+
}>]>;
|
|
614
644
|
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
615
645
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
616
646
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
617
647
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
618
648
|
};
|
|
619
|
-
readonly
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
}>,
|
|
649
|
+
readonly boundary: Schema.Union<readonly [Schema.Struct<{
|
|
650
|
+
readonly type: Schema.Literal<"before">;
|
|
651
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
652
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
653
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
654
|
+
};
|
|
655
|
+
}>, Schema.Struct<{
|
|
656
|
+
readonly type: Schema.Literal<"through">;
|
|
657
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
658
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
659
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
660
|
+
};
|
|
661
|
+
}>]>;
|
|
626
662
|
}>>, never, never>;
|
|
627
663
|
readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
|
|
628
664
|
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
@@ -755,10 +791,15 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
755
791
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
756
792
|
};
|
|
757
793
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
758
|
-
readonly
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
794
|
+
readonly boundary: Schema.Union<readonly [Schema.Struct<{
|
|
795
|
+
readonly type: Schema.Literal<"before">;
|
|
796
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
797
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
798
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
799
|
+
};
|
|
800
|
+
}>, Schema.Struct<{
|
|
801
|
+
readonly type: Schema.Literal<"through">;
|
|
802
|
+
}>]>;
|
|
762
803
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
763
804
|
readonly data: Schema.Struct<{
|
|
764
805
|
readonly id: Schema.brand<Schema.String, "SessionID"> & {
|
|
@@ -777,25 +818,37 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
777
818
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
778
819
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
779
820
|
};
|
|
780
|
-
readonly
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
}>,
|
|
821
|
+
readonly boundary: Schema.Union<readonly [Schema.Struct<{
|
|
822
|
+
readonly type: Schema.Literal<"before">;
|
|
823
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
824
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
825
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
826
|
+
};
|
|
827
|
+
}>, Schema.Struct<{
|
|
828
|
+
readonly type: Schema.Literal<"through">;
|
|
829
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
830
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
831
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
832
|
+
};
|
|
833
|
+
}>]>;
|
|
787
834
|
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
788
835
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
789
836
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
790
837
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
791
838
|
};
|
|
792
|
-
readonly
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
}>,
|
|
839
|
+
readonly boundary: Schema.Union<readonly [Schema.Struct<{
|
|
840
|
+
readonly type: Schema.Literal<"before">;
|
|
841
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
842
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
843
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
844
|
+
};
|
|
845
|
+
}>, Schema.Struct<{
|
|
846
|
+
readonly type: Schema.Literal<"through">;
|
|
847
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
848
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
849
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
850
|
+
};
|
|
851
|
+
}>]>;
|
|
799
852
|
}>>, never, never>;
|
|
800
853
|
readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
|
|
801
854
|
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
@@ -917,7 +970,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
917
970
|
}>>>, never, never>;
|
|
918
971
|
}>>, never, never>;
|
|
919
972
|
}>;
|
|
920
|
-
}>>, Schema.toCodecJson<typeof SessionNotFoundError | typeof MessageNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.switchAgent", "POST", "/api/session/:sessionID/agent", Schema.toCodecStringTree<Schema.Struct<{
|
|
973
|
+
}>>, Schema.toCodecJson<typeof InvalidRequestError | typeof SessionNotFoundError | typeof MessageNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.switchAgent", "POST", "/api/session/:sessionID/agent", Schema.toCodecStringTree<Schema.Struct<{
|
|
921
974
|
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
922
975
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
923
976
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
@@ -1168,7 +1221,6 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
1168
1221
|
}>>>, never, never>;
|
|
1169
1222
|
}>;
|
|
1170
1223
|
readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
|
|
1171
|
-
readonly admittedSeq: Schema.Int;
|
|
1172
1224
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
1173
1225
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
1174
1226
|
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
@@ -1397,7 +1449,6 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
1397
1449
|
}>>>, never, never>;
|
|
1398
1450
|
}>;
|
|
1399
1451
|
readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
|
|
1400
|
-
readonly admittedSeq: Schema.Int;
|
|
1401
1452
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
1402
1453
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
1403
1454
|
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
@@ -1444,7 +1495,6 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
1444
1495
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
1445
1496
|
}>;
|
|
1446
1497
|
readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
|
|
1447
|
-
readonly admittedSeq: Schema.Int;
|
|
1448
1498
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
1449
1499
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
1450
1500
|
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
@@ -1478,7 +1528,6 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
1478
1528
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1479
1529
|
readonly data: Schema.Struct<{
|
|
1480
1530
|
readonly type: Schema.tag<"compaction">;
|
|
1481
|
-
readonly admittedSeq: Schema.Int;
|
|
1482
1531
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
1483
1532
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
1484
1533
|
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
@@ -2129,7 +2178,6 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
2129
2178
|
}>>>, never, never>;
|
|
2130
2179
|
}>;
|
|
2131
2180
|
readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
|
|
2132
|
-
readonly admittedSeq: Schema.Int;
|
|
2133
2181
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
2134
2182
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
2135
2183
|
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
@@ -2147,7 +2195,6 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
2147
2195
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
2148
2196
|
}>;
|
|
2149
2197
|
readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
|
|
2150
|
-
readonly admittedSeq: Schema.Int;
|
|
2151
2198
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
2152
2199
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
2153
2200
|
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
@@ -2159,7 +2206,6 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
2159
2206
|
readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
2160
2207
|
}>, Schema.Struct<{
|
|
2161
2208
|
readonly type: Schema.tag<"compaction">;
|
|
2162
|
-
readonly admittedSeq: Schema.Int;
|
|
2163
2209
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
2164
2210
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
2165
2211
|
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
@@ -2581,14 +2627,20 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
2581
2627
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
2582
2628
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
2583
2629
|
};
|
|
2584
|
-
readonly
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2630
|
+
readonly boundary: Schema.Union<readonly [Schema.Struct<{
|
|
2631
|
+
readonly type: Schema.Literal<"before">;
|
|
2632
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
2633
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
2634
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
2635
|
+
};
|
|
2636
|
+
}>, Schema.Struct<{
|
|
2637
|
+
readonly type: Schema.Literal<"through">;
|
|
2638
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
2639
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
2640
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
2641
|
+
};
|
|
2642
|
+
}>]>;
|
|
2643
|
+
readonly instructions: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.brand<Schema.String, "Instruction.Key">, Schema.brand<Schema.String, "Instruction.Hash">>>>, Schema.optionalKey<Schema.$Record<Schema.brand<Schema.String, "Instruction.Key">, Schema.brand<Schema.String, "Instruction.Hash">>>, never, never>;
|
|
2592
2644
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
2593
2645
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
2594
2646
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
@@ -2606,14 +2658,20 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
2606
2658
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
2607
2659
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
2608
2660
|
};
|
|
2609
|
-
readonly
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2661
|
+
readonly boundary: Schema.Union<readonly [Schema.Struct<{
|
|
2662
|
+
readonly type: Schema.Literal<"before">;
|
|
2663
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
2664
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
2665
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
2666
|
+
};
|
|
2667
|
+
}>, Schema.Struct<{
|
|
2668
|
+
readonly type: Schema.Literal<"through">;
|
|
2669
|
+
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
2670
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
2671
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
2672
|
+
};
|
|
2673
|
+
}>]>;
|
|
2674
|
+
readonly instructions: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.brand<Schema.String, "Instruction.Key">, Schema.brand<Schema.String, "Instruction.Hash">>>>, Schema.optionalKey<Schema.$Record<Schema.brand<Schema.String, "Instruction.Key">, Schema.brand<Schema.String, "Instruction.Hash">>>, never, never>;
|
|
2617
2675
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
2618
2676
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
2619
2677
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
@@ -5216,8 +5274,16 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
5216
5274
|
readonly data: {
|
|
5217
5275
|
readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
|
|
5218
5276
|
readonly parentID: string & import("effect/Brand").Brand<"SessionID">;
|
|
5219
|
-
readonly
|
|
5220
|
-
|
|
5277
|
+
readonly boundary: {
|
|
5278
|
+
readonly type: "before";
|
|
5279
|
+
readonly messageID: string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
5280
|
+
} | {
|
|
5281
|
+
readonly type: "through";
|
|
5282
|
+
readonly messageID: string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
5283
|
+
};
|
|
5284
|
+
readonly instructions?: {
|
|
5285
|
+
readonly [x: string & import("effect/Brand").Brand<"Instruction.Key">]: string & import("effect/Brand").Brand<"Instruction.Hash">;
|
|
5286
|
+
} | undefined;
|
|
5221
5287
|
};
|
|
5222
5288
|
readonly durable: {
|
|
5223
5289
|
readonly aggregateID: string;
|
package/dist/groups/session.js
CHANGED
|
@@ -148,15 +148,15 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
148
148
|
})))
|
|
149
149
|
.add(HttpApiEndpoint.post("session.fork", "/api/session/:sessionID/fork", {
|
|
150
150
|
params: { sessionID: Session.ID },
|
|
151
|
-
payload: Schema.Struct({
|
|
151
|
+
payload: Schema.Struct({ boundary: Session.ForkRequestBoundary }),
|
|
152
152
|
success: Schema.Struct({ data: Session.Info }),
|
|
153
|
-
error: [SessionNotFoundError, MessageNotFoundError],
|
|
153
|
+
error: [SessionNotFoundError, MessageNotFoundError, InvalidRequestError],
|
|
154
154
|
})
|
|
155
155
|
.middleware(sessionLocationMiddleware)
|
|
156
156
|
.annotateMerge(OpenApi.annotations({
|
|
157
157
|
identifier: "v2.session.fork",
|
|
158
158
|
summary: "Fork session",
|
|
159
|
-
description: "Create a child session by copying projected history
|
|
159
|
+
description: "Create a child session by copying projected history through or before a message boundary.",
|
|
160
160
|
})))
|
|
161
161
|
.add(HttpApiEndpoint.post("session.switchAgent", "/api/session/:sessionID/agent", {
|
|
162
162
|
params: { sessionID: Session.ID },
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@opencode-ai/protocol",
|
|
4
|
-
"version": "0.0.0-next-
|
|
4
|
+
"version": "0.0.0-next-16474",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"typecheck": "tsgo --noEmit"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@opencode-ai/schema": "0.0.0-next-
|
|
31
|
+
"@opencode-ai/schema": "0.0.0-next-16474",
|
|
32
32
|
"effect": "4.0.0-beta.101"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|