@opencode-ai/protocol 0.0.0-next-15020 → 0.0.0-next-15026
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 +119 -0
- package/dist/groups/session.d.ts +175 -1
- package/dist/groups/session.js +11 -0
- package/dist/groups/shell.d.ts +33 -1
- package/dist/groups/shell.js +17 -0
- package/package.json +2 -2
package/dist/groups/event.d.ts
CHANGED
|
@@ -737,6 +737,56 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
737
737
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
738
738
|
};
|
|
739
739
|
}>;
|
|
740
|
+
}) | (Schema.Struct<{
|
|
741
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
742
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
743
|
+
};
|
|
744
|
+
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
745
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
746
|
+
readonly type: Schema.Literal<"session.deleted">;
|
|
747
|
+
readonly durable: Schema.Struct<{
|
|
748
|
+
readonly aggregateID: Schema.String;
|
|
749
|
+
readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
|
|
750
|
+
readonly version: Schema.brand<Schema.Int, "Event.Version">;
|
|
751
|
+
}>;
|
|
752
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
753
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
754
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
755
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
756
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
757
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
758
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
759
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
760
|
+
}>, never, never>;
|
|
761
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
762
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
763
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
764
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
765
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
766
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
767
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
768
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
769
|
+
}>, never, never>;
|
|
770
|
+
}>>, never, never>;
|
|
771
|
+
readonly data: Schema.Struct<{
|
|
772
|
+
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
773
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
774
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
775
|
+
};
|
|
776
|
+
}>;
|
|
777
|
+
}> & {
|
|
778
|
+
type: "session.deleted";
|
|
779
|
+
durability: "durable";
|
|
780
|
+
durable: {
|
|
781
|
+
readonly version: number;
|
|
782
|
+
readonly aggregate: string;
|
|
783
|
+
};
|
|
784
|
+
data: Schema.Struct<{
|
|
785
|
+
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
786
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
787
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
788
|
+
};
|
|
789
|
+
}>;
|
|
740
790
|
}) | (Schema.Struct<{
|
|
741
791
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
742
792
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
@@ -7826,6 +7876,25 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
7826
7876
|
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
7827
7877
|
readonly workspaceID?: (string & import("effect/Brand").Brand<"WorkspaceV2.ID">) | undefined;
|
|
7828
7878
|
} | undefined;
|
|
7879
|
+
} | {
|
|
7880
|
+
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
7881
|
+
readonly created: import("effect/DateTime").Utc;
|
|
7882
|
+
readonly type: "session.deleted";
|
|
7883
|
+
readonly durable: {
|
|
7884
|
+
readonly aggregateID: string;
|
|
7885
|
+
readonly seq: number & import("effect/Brand").Brand<"Event.Seq">;
|
|
7886
|
+
readonly version: number & import("effect/Brand").Brand<"Event.Version">;
|
|
7887
|
+
};
|
|
7888
|
+
readonly data: {
|
|
7889
|
+
readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
|
|
7890
|
+
};
|
|
7891
|
+
readonly metadata?: {
|
|
7892
|
+
readonly [x: string]: unknown;
|
|
7893
|
+
} | undefined;
|
|
7894
|
+
readonly location?: {
|
|
7895
|
+
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
7896
|
+
readonly workspaceID?: (string & import("effect/Brand").Brand<"WorkspaceV2.ID">) | undefined;
|
|
7897
|
+
} | undefined;
|
|
7829
7898
|
} | {
|
|
7830
7899
|
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
7831
7900
|
readonly created: import("effect/DateTime").Utc;
|
|
@@ -10879,6 +10948,56 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
10879
10948
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
10880
10949
|
};
|
|
10881
10950
|
}>;
|
|
10951
|
+
}) | (Schema.Struct<{
|
|
10952
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
10953
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
10954
|
+
};
|
|
10955
|
+
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
10956
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
10957
|
+
readonly type: Schema.Literal<"session.deleted">;
|
|
10958
|
+
readonly durable: Schema.Struct<{
|
|
10959
|
+
readonly aggregateID: Schema.String;
|
|
10960
|
+
readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
|
|
10961
|
+
readonly version: Schema.brand<Schema.Int, "Event.Version">;
|
|
10962
|
+
}>;
|
|
10963
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
10964
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
10965
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
10966
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
10967
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
10968
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
10969
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
10970
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
10971
|
+
}>, never, never>;
|
|
10972
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
10973
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
10974
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
10975
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
10976
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
10977
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
10978
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
10979
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
10980
|
+
}>, never, never>;
|
|
10981
|
+
}>>, never, never>;
|
|
10982
|
+
readonly data: Schema.Struct<{
|
|
10983
|
+
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
10984
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
10985
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
10986
|
+
};
|
|
10987
|
+
}>;
|
|
10988
|
+
}> & {
|
|
10989
|
+
type: "session.deleted";
|
|
10990
|
+
durability: "durable";
|
|
10991
|
+
durable: {
|
|
10992
|
+
readonly version: number;
|
|
10993
|
+
readonly aggregate: string;
|
|
10994
|
+
};
|
|
10995
|
+
data: Schema.Struct<{
|
|
10996
|
+
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
10997
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
10998
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
10999
|
+
};
|
|
11000
|
+
}>;
|
|
10882
11001
|
}) | (Schema.Struct<{
|
|
10883
11002
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
10884
11003
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
package/dist/groups/session.d.ts
CHANGED
|
@@ -155,6 +155,31 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
155
155
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
156
156
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
157
157
|
}>, never, never>;
|
|
158
|
+
readonly fork: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
159
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
160
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
161
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
162
|
+
};
|
|
163
|
+
readonly messageID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
164
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
165
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
166
|
+
}>>, Schema.optionalKey<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
|
+
}>, never, never>;
|
|
170
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
171
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
172
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
173
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
174
|
+
};
|
|
175
|
+
readonly messageID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
176
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
177
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
178
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
179
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
180
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
181
|
+
}>, never, never>;
|
|
182
|
+
}>>, never, never>;
|
|
158
183
|
readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
|
|
159
184
|
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
160
185
|
};
|
|
@@ -385,6 +410,31 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
385
410
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
386
411
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
387
412
|
}>, never, never>;
|
|
413
|
+
readonly fork: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
414
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
415
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
416
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
417
|
+
};
|
|
418
|
+
readonly messageID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
419
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
420
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
421
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
422
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
423
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
424
|
+
}>, never, never>;
|
|
425
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
426
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
427
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
428
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
429
|
+
};
|
|
430
|
+
readonly messageID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
431
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
432
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
433
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
434
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
435
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
436
|
+
}>, never, never>;
|
|
437
|
+
}>>, never, never>;
|
|
388
438
|
readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
|
|
389
439
|
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
390
440
|
};
|
|
@@ -518,6 +568,31 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
518
568
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
519
569
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
520
570
|
}>, never, never>;
|
|
571
|
+
readonly fork: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
572
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
573
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
574
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
575
|
+
};
|
|
576
|
+
readonly messageID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
577
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
578
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
579
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
580
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
581
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
582
|
+
}>, never, never>;
|
|
583
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
584
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
585
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
586
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
587
|
+
};
|
|
588
|
+
readonly messageID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
589
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
590
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
591
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
592
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
593
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
594
|
+
}>, never, never>;
|
|
595
|
+
}>>, never, never>;
|
|
521
596
|
readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
|
|
522
597
|
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
523
598
|
};
|
|
@@ -626,7 +701,12 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
626
701
|
}>>>, never, never>;
|
|
627
702
|
}>>, never, never>;
|
|
628
703
|
}>;
|
|
629
|
-
}>>, HttpApiEndpoint.Json<typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.
|
|
704
|
+
}>>, HttpApiEndpoint.Json<typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.remove", "DELETE", "/api/session/:sessionID", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
705
|
+
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
706
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
707
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
708
|
+
};
|
|
709
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<HttpApiSchema.NoContent>, HttpApiEndpoint.Json<typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.fork", "POST", "/api/session/:sessionID/fork", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
630
710
|
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
631
711
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
632
712
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
@@ -649,6 +729,31 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
649
729
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
650
730
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
651
731
|
}>, never, never>;
|
|
732
|
+
readonly fork: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
733
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
734
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
735
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
736
|
+
};
|
|
737
|
+
readonly messageID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
738
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
739
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
740
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
741
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
742
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
743
|
+
}>, never, never>;
|
|
744
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
745
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
746
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
747
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
748
|
+
};
|
|
749
|
+
readonly messageID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
750
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
751
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
752
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
753
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
754
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
755
|
+
}>, never, never>;
|
|
756
|
+
}>>, never, never>;
|
|
652
757
|
readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
|
|
653
758
|
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
654
759
|
};
|
|
@@ -2227,6 +2332,56 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
2227
2332
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
2228
2333
|
};
|
|
2229
2334
|
}>;
|
|
2335
|
+
}) | (Schema.Struct<{
|
|
2336
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
2337
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
2338
|
+
};
|
|
2339
|
+
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
2340
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
2341
|
+
readonly type: Schema.Literal<"session.deleted">;
|
|
2342
|
+
readonly durable: Schema.Struct<{
|
|
2343
|
+
readonly aggregateID: Schema.String;
|
|
2344
|
+
readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
|
|
2345
|
+
readonly version: Schema.brand<Schema.Int, "Event.Version">;
|
|
2346
|
+
}>;
|
|
2347
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
2348
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
2349
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
2350
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
2351
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
2352
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
2353
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
2354
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
2355
|
+
}>, never, never>;
|
|
2356
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
2357
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
2358
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
2359
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
2360
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
2361
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
2362
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
2363
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
2364
|
+
}>, never, never>;
|
|
2365
|
+
}>>, never, never>;
|
|
2366
|
+
readonly data: Schema.Struct<{
|
|
2367
|
+
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
2368
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
2369
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
2370
|
+
};
|
|
2371
|
+
}>;
|
|
2372
|
+
}> & {
|
|
2373
|
+
type: "session.deleted";
|
|
2374
|
+
durability: "durable";
|
|
2375
|
+
durable: {
|
|
2376
|
+
readonly version: number;
|
|
2377
|
+
readonly aggregate: string;
|
|
2378
|
+
};
|
|
2379
|
+
data: Schema.Struct<{
|
|
2380
|
+
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
2381
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
2382
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
2383
|
+
};
|
|
2384
|
+
}>;
|
|
2230
2385
|
}) | (Schema.Struct<{
|
|
2231
2386
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
2232
2387
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
@@ -4691,6 +4846,25 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
|
|
|
4691
4846
|
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
4692
4847
|
readonly workspaceID?: (string & import("effect/Brand").Brand<"WorkspaceV2.ID">) | undefined;
|
|
4693
4848
|
} | undefined;
|
|
4849
|
+
} | {
|
|
4850
|
+
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
4851
|
+
readonly created: import("effect/DateTime").Utc;
|
|
4852
|
+
readonly type: "session.deleted";
|
|
4853
|
+
readonly durable: {
|
|
4854
|
+
readonly aggregateID: string;
|
|
4855
|
+
readonly seq: number & import("effect/Brand").Brand<"Event.Seq">;
|
|
4856
|
+
readonly version: number & import("effect/Brand").Brand<"Event.Version">;
|
|
4857
|
+
};
|
|
4858
|
+
readonly data: {
|
|
4859
|
+
readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
|
|
4860
|
+
};
|
|
4861
|
+
readonly metadata?: {
|
|
4862
|
+
readonly [x: string]: unknown;
|
|
4863
|
+
} | undefined;
|
|
4864
|
+
readonly location?: {
|
|
4865
|
+
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
4866
|
+
readonly workspaceID?: (string & import("effect/Brand").Brand<"WorkspaceV2.ID">) | undefined;
|
|
4867
|
+
} | undefined;
|
|
4694
4868
|
} | {
|
|
4695
4869
|
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
4696
4870
|
readonly created: import("effect/DateTime").Utc;
|
package/dist/groups/session.js
CHANGED
|
@@ -134,6 +134,17 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
134
134
|
identifier: "v2.session.get",
|
|
135
135
|
summary: "Get session",
|
|
136
136
|
description: "Retrieve a session by ID.",
|
|
137
|
+
})))
|
|
138
|
+
.add(HttpApiEndpoint.delete("session.remove", "/api/session/:sessionID", {
|
|
139
|
+
params: { sessionID: Session.ID },
|
|
140
|
+
success: HttpApiSchema.NoContent,
|
|
141
|
+
error: SessionNotFoundError,
|
|
142
|
+
})
|
|
143
|
+
.middleware(sessionLocationMiddleware)
|
|
144
|
+
.annotateMerge(OpenApi.annotations({
|
|
145
|
+
identifier: "v2.session.remove",
|
|
146
|
+
summary: "Delete session",
|
|
147
|
+
description: "Delete a session and its child sessions.",
|
|
137
148
|
})))
|
|
138
149
|
.add(HttpApiEndpoint.post("session.fork", "/api/session/:sessionID/fork", {
|
|
139
150
|
params: { sessionID: Session.ID },
|
package/dist/groups/shell.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpA
|
|
|
35
35
|
}>>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
36
36
|
readonly command: Schema.String;
|
|
37
37
|
readonly cwd: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
38
|
-
readonly timeout: Schema.
|
|
38
|
+
readonly timeout: Schema.Int;
|
|
39
39
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
40
40
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
41
41
|
readonly location: typeof Location.Info;
|
|
@@ -87,6 +87,38 @@ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpA
|
|
|
87
87
|
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>;
|
|
88
88
|
}>;
|
|
89
89
|
}>;
|
|
90
|
+
}>>, HttpApiEndpoint.Json<typeof ShellNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.timeout", "PATCH", "/api/shell/:id/timeout", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
91
|
+
id: Schema.brand<Schema.String, "ShellID"> & {
|
|
92
|
+
create: () => string & import("effect/Brand").Brand<"ShellID">;
|
|
93
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"ShellID">;
|
|
94
|
+
};
|
|
95
|
+
}>>, HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
96
|
+
readonly location: Schema.optional<Schema.Struct<{
|
|
97
|
+
readonly directory: Schema.optional<Schema.String>;
|
|
98
|
+
readonly workspace: Schema.optional<Schema.String>;
|
|
99
|
+
}>>;
|
|
100
|
+
}>>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
101
|
+
readonly timeout: Schema.Int;
|
|
102
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
103
|
+
readonly location: typeof Location.Info;
|
|
104
|
+
readonly data: Schema.Struct<{
|
|
105
|
+
readonly id: Schema.brand<Schema.String, "ShellID"> & {
|
|
106
|
+
create: () => string & import("effect/Brand").Brand<"ShellID">;
|
|
107
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"ShellID">;
|
|
108
|
+
};
|
|
109
|
+
readonly status: Schema.Literals<readonly ["running", "exited", "timeout", "killed"]>;
|
|
110
|
+
readonly command: Schema.String;
|
|
111
|
+
readonly cwd: Schema.String;
|
|
112
|
+
readonly shell: Schema.String;
|
|
113
|
+
readonly file: Schema.String;
|
|
114
|
+
readonly pid: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
115
|
+
readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>;
|
|
116
|
+
readonly metadata: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
117
|
+
readonly time: Schema.Struct<{
|
|
118
|
+
readonly started: Schema.Number;
|
|
119
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>;
|
|
120
|
+
}>;
|
|
121
|
+
}>;
|
|
90
122
|
}>>, HttpApiEndpoint.Json<typeof ShellNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.output", "GET", "/api/shell/:id/output", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
91
123
|
id: Schema.brand<Schema.String, "ShellID"> & {
|
|
92
124
|
create: () => string & import("effect/Brand").Brand<"ShellID">;
|
package/dist/groups/shell.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { Shell } from "@opencode-ai/schema/shell";
|
|
2
2
|
import { Location } from "@opencode-ai/schema/location";
|
|
3
|
+
import { NonNegativeInt } from "@opencode-ai/schema/schema";
|
|
3
4
|
import { Schema } from "effect";
|
|
4
5
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi";
|
|
5
6
|
import { ShellNotFoundError } from "../errors.js";
|
|
6
7
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
8
|
+
const TimeoutInput = Schema.Struct({
|
|
9
|
+
timeout: NonNegativeInt,
|
|
10
|
+
});
|
|
7
11
|
export const ShellGroup = HttpApiGroup.make("server.shell")
|
|
8
12
|
.add(HttpApiEndpoint.get("shell.list", "/api/shell", {
|
|
9
13
|
query: LocationQuery,
|
|
@@ -37,6 +41,19 @@ export const ShellGroup = HttpApiGroup.make("server.shell")
|
|
|
37
41
|
identifier: "v2.shell.get",
|
|
38
42
|
summary: "Get shell command",
|
|
39
43
|
description: "Get one shell command, including its status and exit code once exited.",
|
|
44
|
+
})))
|
|
45
|
+
.add(HttpApiEndpoint.patch("shell.timeout", "/api/shell/:id/timeout", {
|
|
46
|
+
params: { id: Shell.ID },
|
|
47
|
+
query: LocationQuery,
|
|
48
|
+
payload: TimeoutInput,
|
|
49
|
+
success: Location.response(Shell.Info),
|
|
50
|
+
error: ShellNotFoundError,
|
|
51
|
+
})
|
|
52
|
+
.annotateMerge(locationQueryOpenApi)
|
|
53
|
+
.annotateMerge(OpenApi.annotations({
|
|
54
|
+
identifier: "v2.shell.timeout",
|
|
55
|
+
summary: "Update shell timeout",
|
|
56
|
+
description: "Replace a running shell command's timeout from now, or clear it with zero.",
|
|
40
57
|
})))
|
|
41
58
|
.add(HttpApiEndpoint.get("shell.output", "/api/shell/:id/output", {
|
|
42
59
|
params: { id: Shell.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-15026",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"typecheck": "tsgo --noEmit"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@opencode-ai/schema": "0.0.0-next-
|
|
29
|
+
"@opencode-ai/schema": "0.0.0-next-15026",
|
|
30
30
|
"effect": "4.0.0-beta.83"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|