@opencode/protocol 0.0.0-dev-21173 → 0.0.0-dev-21177

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.
@@ -1057,6 +1057,106 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
1057
1057
  };
1058
1058
  readonly idle: Schema.Finite;
1059
1059
  }>;
1060
+ }, Schema.Struct<{
1061
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
1062
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
1063
+ };
1064
+ readonly created: Schema.Finite;
1065
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1066
+ readonly type: Schema.Literal<"session.archived">;
1067
+ readonly durable: Schema.Struct<{
1068
+ readonly aggregateID: Schema.String;
1069
+ readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
1070
+ readonly version: Schema.decodeTo<Schema.toType<Schema.brand<Schema.Int, "Event.Version">>, Schema.Literal<number>, never, never>;
1071
+ }>;
1072
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1073
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
1074
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
1075
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
1076
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
1077
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
1078
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
1079
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
1080
+ }>, never, never>;
1081
+ }>>>, Schema.optionalKey<Schema.Struct<{
1082
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
1083
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
1084
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
1085
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
1086
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
1087
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
1088
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
1089
+ }>, never, never>;
1090
+ }>>, never, never>;
1091
+ readonly data: Schema.Struct<{
1092
+ sessionID: Schema.brand<Schema.String, "SessionID"> & {
1093
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
1094
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
1095
+ };
1096
+ }>;
1097
+ }> & {
1098
+ type: "session.archived";
1099
+ durability: "durable";
1100
+ durable: {
1101
+ readonly version: number;
1102
+ readonly aggregate: string;
1103
+ };
1104
+ data: Schema.Struct<{
1105
+ sessionID: Schema.brand<Schema.String, "SessionID"> & {
1106
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
1107
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
1108
+ };
1109
+ }>;
1110
+ }, Schema.Struct<{
1111
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
1112
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
1113
+ };
1114
+ readonly created: Schema.Finite;
1115
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1116
+ readonly type: Schema.Literal<"session.unarchived">;
1117
+ readonly durable: Schema.Struct<{
1118
+ readonly aggregateID: Schema.String;
1119
+ readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
1120
+ readonly version: Schema.decodeTo<Schema.toType<Schema.brand<Schema.Int, "Event.Version">>, Schema.Literal<number>, never, never>;
1121
+ }>;
1122
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1123
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
1124
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
1125
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
1126
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
1127
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
1128
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
1129
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
1130
+ }>, never, never>;
1131
+ }>>>, Schema.optionalKey<Schema.Struct<{
1132
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
1133
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
1134
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
1135
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
1136
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
1137
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
1138
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
1139
+ }>, never, never>;
1140
+ }>>, never, never>;
1141
+ readonly data: Schema.Struct<{
1142
+ sessionID: Schema.brand<Schema.String, "SessionID"> & {
1143
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
1144
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
1145
+ };
1146
+ }>;
1147
+ }> & {
1148
+ type: "session.unarchived";
1149
+ durability: "durable";
1150
+ durable: {
1151
+ readonly version: number;
1152
+ readonly aggregate: string;
1153
+ };
1154
+ data: Schema.Struct<{
1155
+ sessionID: Schema.brand<Schema.String, "SessionID"> & {
1156
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
1157
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
1158
+ };
1159
+ }>;
1060
1160
  }, Schema.Struct<{
1061
1161
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
1062
1162
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -6433,6 +6533,25 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
6433
6533
  readonly agent: string & import("effect/Brand").Brand<"Agent.ID">;
6434
6534
  readonly previous?: (string & import("effect/Brand").Brand<"Agent.ID">) | undefined;
6435
6535
  };
6536
+ } | {
6537
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
6538
+ readonly created: number;
6539
+ readonly metadata?: {
6540
+ readonly [x: string]: unknown;
6541
+ } | undefined;
6542
+ readonly type: "session.archived";
6543
+ readonly durable: {
6544
+ readonly aggregateID: string;
6545
+ readonly seq: number & import("effect/Brand").Brand<"Event.Seq">;
6546
+ readonly version: number & import("effect/Brand").Brand<"Event.Version">;
6547
+ };
6548
+ readonly location?: {
6549
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
6550
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
6551
+ } | undefined;
6552
+ readonly data: {
6553
+ readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
6554
+ };
6436
6555
  } | {
6437
6556
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
6438
6557
  readonly created: number;
@@ -7643,6 +7762,25 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
7643
7762
  readonly [x: string]: unknown;
7644
7763
  } | undefined;
7645
7764
  };
7765
+ } | {
7766
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
7767
+ readonly created: number;
7768
+ readonly metadata?: {
7769
+ readonly [x: string]: unknown;
7770
+ } | undefined;
7771
+ readonly type: "session.unarchived";
7772
+ readonly durable: {
7773
+ readonly aggregateID: string;
7774
+ readonly seq: number & import("effect/Brand").Brand<"Event.Seq">;
7775
+ readonly version: number & import("effect/Brand").Brand<"Event.Version">;
7776
+ };
7777
+ readonly location?: {
7778
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
7779
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
7780
+ } | undefined;
7781
+ readonly data: {
7782
+ readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
7783
+ };
7646
7784
  } | {
7647
7785
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
7648
7786
  readonly created: number;
@@ -9694,6 +9832,106 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
9694
9832
  };
9695
9833
  readonly idle: Schema.Finite;
9696
9834
  }>;
9835
+ }, Schema.Struct<{
9836
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
9837
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
9838
+ };
9839
+ readonly created: Schema.Finite;
9840
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
9841
+ readonly type: Schema.Literal<"session.archived">;
9842
+ readonly durable: Schema.Struct<{
9843
+ readonly aggregateID: Schema.String;
9844
+ readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
9845
+ readonly version: Schema.decodeTo<Schema.toType<Schema.brand<Schema.Int, "Event.Version">>, Schema.Literal<number>, never, never>;
9846
+ }>;
9847
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
9848
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
9849
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
9850
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
9851
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
9852
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
9853
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
9854
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
9855
+ }>, never, never>;
9856
+ }>>>, Schema.optionalKey<Schema.Struct<{
9857
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
9858
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
9859
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
9860
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
9861
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
9862
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
9863
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
9864
+ }>, never, never>;
9865
+ }>>, never, never>;
9866
+ readonly data: Schema.Struct<{
9867
+ sessionID: Schema.brand<Schema.String, "SessionID"> & {
9868
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
9869
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
9870
+ };
9871
+ }>;
9872
+ }> & {
9873
+ type: "session.archived";
9874
+ durability: "durable";
9875
+ durable: {
9876
+ readonly version: number;
9877
+ readonly aggregate: string;
9878
+ };
9879
+ data: Schema.Struct<{
9880
+ sessionID: Schema.brand<Schema.String, "SessionID"> & {
9881
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
9882
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
9883
+ };
9884
+ }>;
9885
+ }, Schema.Struct<{
9886
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
9887
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
9888
+ };
9889
+ readonly created: Schema.Finite;
9890
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
9891
+ readonly type: Schema.Literal<"session.unarchived">;
9892
+ readonly durable: Schema.Struct<{
9893
+ readonly aggregateID: Schema.String;
9894
+ readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
9895
+ readonly version: Schema.decodeTo<Schema.toType<Schema.brand<Schema.Int, "Event.Version">>, Schema.Literal<number>, never, never>;
9896
+ }>;
9897
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
9898
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
9899
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
9900
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
9901
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
9902
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
9903
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
9904
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
9905
+ }>, never, never>;
9906
+ }>>>, Schema.optionalKey<Schema.Struct<{
9907
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
9908
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
9909
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
9910
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
9911
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
9912
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
9913
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
9914
+ }>, never, never>;
9915
+ }>>, never, never>;
9916
+ readonly data: Schema.Struct<{
9917
+ sessionID: Schema.brand<Schema.String, "SessionID"> & {
9918
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
9919
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
9920
+ };
9921
+ }>;
9922
+ }> & {
9923
+ type: "session.unarchived";
9924
+ durability: "durable";
9925
+ durable: {
9926
+ readonly version: number;
9927
+ readonly aggregate: string;
9928
+ };
9929
+ data: Schema.Struct<{
9930
+ sessionID: Schema.brand<Schema.String, "SessionID"> & {
9931
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
9932
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
9933
+ };
9934
+ }>;
9697
9935
  }, Schema.Struct<{
9698
9936
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
9699
9937
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -1,7 +1,11 @@
1
1
  import { Context, Schema } from "effect";
2
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/http-api";
3
3
  import { ConflictError, LocationNotFoundError, PermissionNotFoundError, PermissionSavedNotFoundError, SessionNotFoundError } from "../errors.js";
4
- export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.AnyId, LocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService>(locationMiddleware: Context.Key<LocationId, LocationService>, sessionLocationMiddleware: Context.Key<SessionLocationId, SessionLocationService>) => HttpApiGroup.HttpApiGroup<"server.permission", HttpApiEndpoint.HttpApiEndpoint<"permission.request.list", "GET", "/api/permission/request", never, Schema.toCodecStringTree<Schema.Struct<{
4
+ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.AnyId, LocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService>(locationMiddleware: Context.Key<LocationId, LocationService>, sessionLocationMiddleware: Context.Key<SessionLocationId, SessionLocationService>) => HttpApiGroup.HttpApiGroup<"server.permission", HttpApiEndpoint.HttpApiEndpoint<"permission.saved.remove", "DELETE", "/api/permission/saved/:id", Schema.toCodecStringTree<Schema.Struct<{
5
+ id: Schema.brand<Schema.String, "PermissionSaved.ID"> & {
6
+ create: () => string & import("effect/Brand").Brand<"PermissionSaved.ID">;
7
+ };
8
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"permission.request.list", "GET", "/api/permission/request", never, Schema.toCodecStringTree<Schema.Struct<{
5
9
  readonly location: Schema.optional<Schema.Struct<{
6
10
  readonly directory: Schema.optional<Schema.String>;
7
11
  }>>;
@@ -51,11 +55,7 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
51
55
  readonly updated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
52
56
  }>;
53
57
  }>>;
54
- }>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"permission.saved.remove", "DELETE", "/api/permission/saved/:id", Schema.toCodecStringTree<Schema.Struct<{
55
- id: Schema.brand<Schema.String, "PermissionSaved.ID"> & {
56
- create: () => string & import("effect/Brand").Brand<"PermissionSaved.ID">;
57
- };
58
- }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"permission.saved.update", "PATCH", "/api/permission/saved/:id", Schema.toCodecStringTree<Schema.Struct<{
58
+ }>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"permission.saved.update", "PATCH", "/api/permission/saved/:id", Schema.toCodecStringTree<Schema.Struct<{
59
59
  id: Schema.brand<Schema.String, "PermissionSaved.ID"> & {
60
60
  create: () => string & import("effect/Brand").Brand<"PermissionSaved.ID">;
61
61
  };
@@ -6,7 +6,7 @@ export declare const PTY_CONNECT_TOKEN_HEADER = "x-opencode-ticket";
6
6
  export declare const PTY_CONNECT_TOKEN_HEADER_VALUE = "1";
7
7
  export declare const PTY_CONNECT_PATH = "/api/pty/:ptyID/connect";
8
8
  export declare function hasPtyConnectTicketURL(url: URL): boolean;
9
- export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId, LocationService>(locationMiddleware: Context.Key<LocationId, LocationService>) => HttpApiGroup.HttpApiGroup<"server.pty", HttpApiEndpoint.HttpApiEndpoint<"pty.connectToken", "POST", "/api/pty/:ptyID/connect-token", Schema.toCodecStringTree<Schema.Struct<{
9
+ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId, LocationService>(locationMiddleware: Context.Key<LocationId, LocationService>) => HttpApiGroup.HttpApiGroup<"server.pty", HttpApiEndpoint.HttpApiEndpoint<"pty.remove", "DELETE", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
10
10
  ptyID: Schema.brand<Schema.String, "PtyID"> & {
11
11
  create: () => string & import("effect/Brand").Brand<"PtyID">;
12
12
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
@@ -15,31 +15,15 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
15
15
  readonly location: Schema.optional<Schema.Struct<{
16
16
  readonly directory: Schema.optional<Schema.String>;
17
17
  }>>;
18
- }>>, never, Schema.toCodecStringTree<Schema.Struct<{
19
- readonly "x-opencode-ticket": Schema.optional<Schema.String>;
20
- }>>, Schema.toCodecJson<Schema.Struct<{
21
- readonly location: Schema.Struct<{
22
- readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
23
- }>;
24
- readonly data: Schema.Struct<{
25
- readonly ticket: Schema.String;
26
- readonly expires_in: Schema.Int;
27
- }>;
28
- }>>, Schema.toCodecJson<typeof ForbiddenError | typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.create", "POST", "/api/pty", never, Schema.toCodecStringTree<Schema.Struct<{
18
+ }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.list", "GET", "/api/pty", never, Schema.toCodecStringTree<Schema.Struct<{
29
19
  readonly location: Schema.optional<Schema.Struct<{
30
20
  readonly directory: Schema.optional<Schema.String>;
31
21
  }>>;
32
- }>>, Schema.toCodecJson<Schema.Struct<{
33
- readonly command: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
34
- readonly args: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
35
- readonly cwd: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
36
- readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
37
- readonly env: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
38
- }>>, never, Schema.toCodecJson<Schema.Struct<{
22
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
39
23
  readonly location: Schema.Struct<{
40
24
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
41
25
  }>;
42
- readonly data: Schema.Struct<{
26
+ readonly data: Schema.$Array<Schema.Struct<{
43
27
  readonly id: Schema.brand<Schema.String, "PtyID"> & {
44
28
  create: () => string & import("effect/Brand").Brand<"PtyID">;
45
29
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
@@ -51,7 +35,7 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
51
35
  readonly status: Schema.Literals<readonly ["running", "exited"]>;
52
36
  readonly pid: Schema.Int;
53
37
  readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
54
- }>;
38
+ }>>;
55
39
  }>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.get", "GET", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
56
40
  ptyID: Schema.brand<Schema.String, "PtyID"> & {
57
41
  create: () => string & import("effect/Brand").Brand<"PtyID">;
@@ -78,15 +62,21 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
78
62
  readonly pid: Schema.Int;
79
63
  readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
80
64
  }>;
81
- }>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.list", "GET", "/api/pty", never, Schema.toCodecStringTree<Schema.Struct<{
65
+ }>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.create", "POST", "/api/pty", never, Schema.toCodecStringTree<Schema.Struct<{
82
66
  readonly location: Schema.optional<Schema.Struct<{
83
67
  readonly directory: Schema.optional<Schema.String>;
84
68
  }>>;
85
- }>>, never, never, Schema.toCodecJson<Schema.Struct<{
69
+ }>>, Schema.toCodecJson<Schema.Struct<{
70
+ readonly command: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
71
+ readonly args: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
72
+ readonly cwd: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
73
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
74
+ readonly env: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
75
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
86
76
  readonly location: Schema.Struct<{
87
77
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
88
78
  }>;
89
- readonly data: Schema.$Array<Schema.Struct<{
79
+ readonly data: Schema.Struct<{
90
80
  readonly id: Schema.brand<Schema.String, "PtyID"> & {
91
81
  create: () => string & import("effect/Brand").Brand<"PtyID">;
92
82
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
@@ -98,8 +88,8 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
98
88
  readonly status: Schema.Literals<readonly ["running", "exited"]>;
99
89
  readonly pid: Schema.Int;
100
90
  readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
101
- }>>;
102
- }>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.remove", "DELETE", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
91
+ }>;
92
+ }>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.connectToken", "POST", "/api/pty/:ptyID/connect-token", Schema.toCodecStringTree<Schema.Struct<{
103
93
  ptyID: Schema.brand<Schema.String, "PtyID"> & {
104
94
  create: () => string & import("effect/Brand").Brand<"PtyID">;
105
95
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
@@ -108,7 +98,17 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
108
98
  readonly location: Schema.optional<Schema.Struct<{
109
99
  readonly directory: Schema.optional<Schema.String>;
110
100
  }>>;
111
- }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.update", "PUT", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
101
+ }>>, never, Schema.toCodecStringTree<Schema.Struct<{
102
+ readonly "x-opencode-ticket": Schema.optional<Schema.String>;
103
+ }>>, Schema.toCodecJson<Schema.Struct<{
104
+ readonly location: Schema.Struct<{
105
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
106
+ }>;
107
+ readonly data: Schema.Struct<{
108
+ readonly ticket: Schema.String;
109
+ readonly expires_in: Schema.Int;
110
+ }>;
111
+ }>>, Schema.toCodecJson<typeof ForbiddenError | typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.update", "PUT", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
112
112
  ptyID: Schema.brand<Schema.String, "PtyID"> & {
113
113
  create: () => string & import("effect/Brand").Brand<"PtyID">;
114
114
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
@@ -10,6 +10,7 @@ export declare const SessionsCursor: Schema.brand<Schema.String, "SessionsCursor
10
10
  readonly order?: "asc" | "desc" | undefined;
11
11
  readonly search?: string | undefined;
12
12
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
13
+ readonly archived?: boolean | undefined;
13
14
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
14
15
  readonly anchor: {
15
16
  readonly id: string & import("effect/Brand").Brand<"SessionID">;
@@ -20,6 +21,7 @@ export declare const SessionsCursor: Schema.brand<Schema.String, "SessionsCursor
20
21
  readonly order?: "asc" | "desc" | undefined;
21
22
  readonly search?: string | undefined;
22
23
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
24
+ readonly archived?: boolean | undefined;
23
25
  readonly project: string & import("effect/Brand").Brand<"Project.ID">;
24
26
  readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
25
27
  readonly anchor: {
@@ -31,6 +33,7 @@ export declare const SessionsCursor: Schema.brand<Schema.String, "SessionsCursor
31
33
  readonly order?: "asc" | "desc" | undefined;
32
34
  readonly search?: string | undefined;
33
35
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
36
+ readonly archived?: boolean | undefined;
34
37
  readonly anchor: {
35
38
  readonly id: string & import("effect/Brand").Brand<"SessionID">;
36
39
  readonly time: number;
@@ -41,6 +44,7 @@ export declare const SessionsCursor: Schema.brand<Schema.String, "SessionsCursor
41
44
  readonly order?: "asc" | "desc" | undefined;
42
45
  readonly search?: string | undefined;
43
46
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
47
+ readonly archived?: boolean | undefined;
44
48
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
45
49
  readonly anchor: {
46
50
  readonly id: string & import("effect/Brand").Brand<"SessionID">;
@@ -51,6 +55,7 @@ export declare const SessionsCursor: Schema.brand<Schema.String, "SessionsCursor
51
55
  readonly order?: "asc" | "desc" | undefined;
52
56
  readonly search?: string | undefined;
53
57
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
58
+ readonly archived?: boolean | undefined;
54
59
  readonly project: string & import("effect/Brand").Brand<"Project.ID">;
55
60
  readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
56
61
  readonly anchor: {
@@ -62,6 +67,7 @@ export declare const SessionsCursor: Schema.brand<Schema.String, "SessionsCursor
62
67
  readonly order?: "asc" | "desc" | undefined;
63
68
  readonly search?: string | undefined;
64
69
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
70
+ readonly archived?: boolean | undefined;
65
71
  readonly anchor: {
66
72
  readonly id: string & import("effect/Brand").Brand<"SessionID">;
67
73
  readonly time: number;
@@ -77,6 +83,7 @@ export declare const SessionsQuery: Schema.Struct<{
77
83
  create: () => string & import("effect/Brand").Brand<"SessionID">;
78
84
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
79
85
  }, Schema.decodeTo<Schema.Null, Schema.Literal<"null">, never, never>]>>;
86
+ readonly archived: Schema.optional<Schema.decodeTo<Schema.Boolean, Schema.Literals<readonly ["true", "false"]>, never, never>>;
80
87
  readonly directory: Schema.optional<Schema.brand<Schema.String, "AbsolutePath">>;
81
88
  readonly project: Schema.optional<Schema.brand<Schema.String, "Project.ID"> & {
82
89
  global: string & import("effect/Brand").Brand<"Project.ID">;
@@ -88,6 +95,7 @@ export declare const SessionsQuery: Schema.Struct<{
88
95
  readonly order?: "asc" | "desc" | undefined;
89
96
  readonly search?: string | undefined;
90
97
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
98
+ readonly archived?: boolean | undefined;
91
99
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
92
100
  readonly anchor: {
93
101
  readonly id: string & import("effect/Brand").Brand<"SessionID">;
@@ -98,6 +106,7 @@ export declare const SessionsQuery: Schema.Struct<{
98
106
  readonly order?: "asc" | "desc" | undefined;
99
107
  readonly search?: string | undefined;
100
108
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
109
+ readonly archived?: boolean | undefined;
101
110
  readonly project: string & import("effect/Brand").Brand<"Project.ID">;
102
111
  readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
103
112
  readonly anchor: {
@@ -109,6 +118,7 @@ export declare const SessionsQuery: Schema.Struct<{
109
118
  readonly order?: "asc" | "desc" | undefined;
110
119
  readonly search?: string | undefined;
111
120
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
121
+ readonly archived?: boolean | undefined;
112
122
  readonly anchor: {
113
123
  readonly id: string & import("effect/Brand").Brand<"SessionID">;
114
124
  readonly time: number;
@@ -119,6 +129,7 @@ export declare const SessionsQuery: Schema.Struct<{
119
129
  readonly order?: "asc" | "desc" | undefined;
120
130
  readonly search?: string | undefined;
121
131
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
132
+ readonly archived?: boolean | undefined;
122
133
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
123
134
  readonly anchor: {
124
135
  readonly id: string & import("effect/Brand").Brand<"SessionID">;
@@ -129,6 +140,7 @@ export declare const SessionsQuery: Schema.Struct<{
129
140
  readonly order?: "asc" | "desc" | undefined;
130
141
  readonly search?: string | undefined;
131
142
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
143
+ readonly archived?: boolean | undefined;
132
144
  readonly project: string & import("effect/Brand").Brand<"Project.ID">;
133
145
  readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
134
146
  readonly anchor: {
@@ -140,6 +152,7 @@ export declare const SessionsQuery: Schema.Struct<{
140
152
  readonly order?: "asc" | "desc" | undefined;
141
153
  readonly search?: string | undefined;
142
154
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
155
+ readonly archived?: boolean | undefined;
143
156
  readonly anchor: {
144
157
  readonly id: string & import("effect/Brand").Brand<"SessionID">;
145
158
  readonly time: number;
@@ -4489,6 +4502,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
4489
4502
  create: () => string & import("effect/Brand").Brand<"SessionID">;
4490
4503
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
4491
4504
  }, Schema.decodeTo<Schema.Null, Schema.Literal<"null">, never, never>]>>;
4505
+ readonly archived: Schema.optional<Schema.decodeTo<Schema.Boolean, Schema.Literals<readonly ["true", "false"]>, never, never>>;
4492
4506
  readonly directory: Schema.optional<Schema.brand<Schema.String, "AbsolutePath">>;
4493
4507
  readonly project: Schema.optional<Schema.brand<Schema.String, "Project.ID"> & {
4494
4508
  global: string & import("effect/Brand").Brand<"Project.ID">;
@@ -4500,6 +4514,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
4500
4514
  readonly order?: "asc" | "desc" | undefined;
4501
4515
  readonly search?: string | undefined;
4502
4516
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
4517
+ readonly archived?: boolean | undefined;
4503
4518
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
4504
4519
  readonly anchor: {
4505
4520
  readonly id: string & import("effect/Brand").Brand<"SessionID">;
@@ -4510,6 +4525,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
4510
4525
  readonly order?: "asc" | "desc" | undefined;
4511
4526
  readonly search?: string | undefined;
4512
4527
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
4528
+ readonly archived?: boolean | undefined;
4513
4529
  readonly project: string & import("effect/Brand").Brand<"Project.ID">;
4514
4530
  readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
4515
4531
  readonly anchor: {
@@ -4521,6 +4537,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
4521
4537
  readonly order?: "asc" | "desc" | undefined;
4522
4538
  readonly search?: string | undefined;
4523
4539
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
4540
+ readonly archived?: boolean | undefined;
4524
4541
  readonly anchor: {
4525
4542
  readonly id: string & import("effect/Brand").Brand<"SessionID">;
4526
4543
  readonly time: number;
@@ -4531,6 +4548,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
4531
4548
  readonly order?: "asc" | "desc" | undefined;
4532
4549
  readonly search?: string | undefined;
4533
4550
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
4551
+ readonly archived?: boolean | undefined;
4534
4552
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
4535
4553
  readonly anchor: {
4536
4554
  readonly id: string & import("effect/Brand").Brand<"SessionID">;
@@ -4541,6 +4559,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
4541
4559
  readonly order?: "asc" | "desc" | undefined;
4542
4560
  readonly search?: string | undefined;
4543
4561
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
4562
+ readonly archived?: boolean | undefined;
4544
4563
  readonly project: string & import("effect/Brand").Brand<"Project.ID">;
4545
4564
  readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
4546
4565
  readonly anchor: {
@@ -4552,6 +4571,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
4552
4571
  readonly order?: "asc" | "desc" | undefined;
4553
4572
  readonly search?: string | undefined;
4554
4573
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
4574
+ readonly archived?: boolean | undefined;
4555
4575
  readonly anchor: {
4556
4576
  readonly id: string & import("effect/Brand").Brand<"SessionID">;
4557
4577
  readonly time: number;
@@ -4741,6 +4761,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
4741
4761
  readonly order?: "asc" | "desc" | undefined;
4742
4762
  readonly search?: string | undefined;
4743
4763
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
4764
+ readonly archived?: boolean | undefined;
4744
4765
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
4745
4766
  readonly anchor: {
4746
4767
  readonly id: string & import("effect/Brand").Brand<"SessionID">;
@@ -4751,6 +4772,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
4751
4772
  readonly order?: "asc" | "desc" | undefined;
4752
4773
  readonly search?: string | undefined;
4753
4774
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
4775
+ readonly archived?: boolean | undefined;
4754
4776
  readonly project: string & import("effect/Brand").Brand<"Project.ID">;
4755
4777
  readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
4756
4778
  readonly anchor: {
@@ -4762,6 +4784,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
4762
4784
  readonly order?: "asc" | "desc" | undefined;
4763
4785
  readonly search?: string | undefined;
4764
4786
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
4787
+ readonly archived?: boolean | undefined;
4765
4788
  readonly anchor: {
4766
4789
  readonly id: string & import("effect/Brand").Brand<"SessionID">;
4767
4790
  readonly time: number;
@@ -4772,6 +4795,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
4772
4795
  readonly order?: "asc" | "desc" | undefined;
4773
4796
  readonly search?: string | undefined;
4774
4797
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
4798
+ readonly archived?: boolean | undefined;
4775
4799
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
4776
4800
  readonly anchor: {
4777
4801
  readonly id: string & import("effect/Brand").Brand<"SessionID">;
@@ -4782,6 +4806,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
4782
4806
  readonly order?: "asc" | "desc" | undefined;
4783
4807
  readonly search?: string | undefined;
4784
4808
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
4809
+ readonly archived?: boolean | undefined;
4785
4810
  readonly project: string & import("effect/Brand").Brand<"Project.ID">;
4786
4811
  readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
4787
4812
  readonly anchor: {
@@ -4793,6 +4818,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
4793
4818
  readonly order?: "asc" | "desc" | undefined;
4794
4819
  readonly search?: string | undefined;
4795
4820
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
4821
+ readonly archived?: boolean | undefined;
4796
4822
  readonly anchor: {
4797
4823
  readonly id: string & import("effect/Brand").Brand<"SessionID">;
4798
4824
  readonly time: number;
@@ -4805,6 +4831,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
4805
4831
  readonly order?: "asc" | "desc" | undefined;
4806
4832
  readonly search?: string | undefined;
4807
4833
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
4834
+ readonly archived?: boolean | undefined;
4808
4835
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
4809
4836
  readonly anchor: {
4810
4837
  readonly id: string & import("effect/Brand").Brand<"SessionID">;
@@ -4815,6 +4842,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
4815
4842
  readonly order?: "asc" | "desc" | undefined;
4816
4843
  readonly search?: string | undefined;
4817
4844
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
4845
+ readonly archived?: boolean | undefined;
4818
4846
  readonly project: string & import("effect/Brand").Brand<"Project.ID">;
4819
4847
  readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
4820
4848
  readonly anchor: {
@@ -4826,6 +4854,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
4826
4854
  readonly order?: "asc" | "desc" | undefined;
4827
4855
  readonly search?: string | undefined;
4828
4856
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
4857
+ readonly archived?: boolean | undefined;
4829
4858
  readonly anchor: {
4830
4859
  readonly id: string & import("effect/Brand").Brand<"SessionID">;
4831
4860
  readonly time: number;
@@ -4836,6 +4865,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
4836
4865
  readonly order?: "asc" | "desc" | undefined;
4837
4866
  readonly search?: string | undefined;
4838
4867
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
4868
+ readonly archived?: boolean | undefined;
4839
4869
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
4840
4870
  readonly anchor: {
4841
4871
  readonly id: string & import("effect/Brand").Brand<"SessionID">;
@@ -4846,6 +4876,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
4846
4876
  readonly order?: "asc" | "desc" | undefined;
4847
4877
  readonly search?: string | undefined;
4848
4878
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
4879
+ readonly archived?: boolean | undefined;
4849
4880
  readonly project: string & import("effect/Brand").Brand<"Project.ID">;
4850
4881
  readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
4851
4882
  readonly anchor: {
@@ -4857,6 +4888,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
4857
4888
  readonly order?: "asc" | "desc" | undefined;
4858
4889
  readonly search?: string | undefined;
4859
4890
  readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
4891
+ readonly archived?: boolean | undefined;
4860
4892
  readonly anchor: {
4861
4893
  readonly id: string & import("effect/Brand").Brand<"SessionID">;
4862
4894
  readonly time: number;
@@ -4927,6 +4959,56 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
4927
4959
  readonly agent: Schema.brand<Schema.String, "Agent.ID">;
4928
4960
  readonly previous: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Agent.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Agent.ID">>, never, never>;
4929
4961
  }>;
4962
+ }) | (Schema.Struct<{
4963
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
4964
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
4965
+ };
4966
+ readonly created: Schema.Finite;
4967
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
4968
+ readonly type: Schema.Literal<"session.archived">;
4969
+ readonly durable: Schema.Struct<{
4970
+ readonly aggregateID: Schema.String;
4971
+ readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
4972
+ readonly version: Schema.decodeTo<Schema.toType<Schema.brand<Schema.Int, "Event.Version">>, Schema.Literal<number>, never, never>;
4973
+ }>;
4974
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
4975
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
4976
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
4977
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
4978
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
4979
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
4980
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
4981
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
4982
+ }>, never, never>;
4983
+ }>>>, Schema.optionalKey<Schema.Struct<{
4984
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
4985
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
4986
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
4987
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
4988
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
4989
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
4990
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
4991
+ }>, never, never>;
4992
+ }>>, never, never>;
4993
+ readonly data: Schema.Struct<{
4994
+ sessionID: Schema.brand<Schema.String, "SessionID"> & {
4995
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
4996
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
4997
+ };
4998
+ }>;
4999
+ }> & {
5000
+ type: "session.archived";
5001
+ durability: "durable";
5002
+ durable: {
5003
+ readonly version: number;
5004
+ readonly aggregate: string;
5005
+ };
5006
+ data: Schema.Struct<{
5007
+ sessionID: Schema.brand<Schema.String, "SessionID"> & {
5008
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
5009
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
5010
+ };
5011
+ }>;
4930
5012
  }) | (Schema.Struct<{
4931
5013
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
4932
5014
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -8663,6 +8745,56 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
8663
8745
  readonly executed: Schema.Boolean;
8664
8746
  readonly resultState: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
8665
8747
  }>;
8748
+ }) | (Schema.Struct<{
8749
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
8750
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
8751
+ };
8752
+ readonly created: Schema.Finite;
8753
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
8754
+ readonly type: Schema.Literal<"session.unarchived">;
8755
+ readonly durable: Schema.Struct<{
8756
+ readonly aggregateID: Schema.String;
8757
+ readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
8758
+ readonly version: Schema.decodeTo<Schema.toType<Schema.brand<Schema.Int, "Event.Version">>, Schema.Literal<number>, never, never>;
8759
+ }>;
8760
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
8761
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
8762
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
8763
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
8764
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
8765
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
8766
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
8767
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
8768
+ }>, never, never>;
8769
+ }>>>, Schema.optionalKey<Schema.Struct<{
8770
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
8771
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
8772
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
8773
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
8774
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
8775
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
8776
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
8777
+ }>, never, never>;
8778
+ }>>, never, never>;
8779
+ readonly data: Schema.Struct<{
8780
+ sessionID: Schema.brand<Schema.String, "SessionID"> & {
8781
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
8782
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
8783
+ };
8784
+ }>;
8785
+ }> & {
8786
+ type: "session.unarchived";
8787
+ durability: "durable";
8788
+ durable: {
8789
+ readonly version: number;
8790
+ readonly aggregate: string;
8791
+ };
8792
+ data: Schema.Struct<{
8793
+ sessionID: Schema.brand<Schema.String, "SessionID"> & {
8794
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
8795
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
8796
+ };
8797
+ }>;
8666
8798
  }) | (Schema.Struct<{
8667
8799
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
8668
8800
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -9034,6 +9166,25 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
9034
9166
  readonly agent: string & import("effect/Brand").Brand<"Agent.ID">;
9035
9167
  readonly previous?: (string & import("effect/Brand").Brand<"Agent.ID">) | undefined;
9036
9168
  };
9169
+ } | {
9170
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
9171
+ readonly created: number;
9172
+ readonly metadata?: {
9173
+ readonly [x: string]: unknown;
9174
+ } | undefined;
9175
+ readonly type: "session.archived";
9176
+ readonly durable: {
9177
+ readonly aggregateID: string;
9178
+ readonly seq: number & import("effect/Brand").Brand<"Event.Seq">;
9179
+ readonly version: number & import("effect/Brand").Brand<"Event.Version">;
9180
+ };
9181
+ readonly location?: {
9182
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
9183
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
9184
+ } | undefined;
9185
+ readonly data: {
9186
+ readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
9187
+ };
9037
9188
  } | {
9038
9189
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
9039
9190
  readonly created: number;
@@ -10244,6 +10395,25 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
10244
10395
  readonly [x: string]: unknown;
10245
10396
  } | undefined;
10246
10397
  };
10398
+ } | {
10399
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
10400
+ readonly created: number;
10401
+ readonly metadata?: {
10402
+ readonly [x: string]: unknown;
10403
+ } | undefined;
10404
+ readonly type: "session.unarchived";
10405
+ readonly durable: {
10406
+ readonly aggregateID: string;
10407
+ readonly seq: number & import("effect/Brand").Brand<"Event.Seq">;
10408
+ readonly version: number & import("effect/Brand").Brand<"Event.Version">;
10409
+ };
10410
+ readonly location?: {
10411
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
10412
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
10413
+ } | undefined;
10414
+ readonly data: {
10415
+ readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
10416
+ };
10247
10417
  } | {
10248
10418
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
10249
10419
  readonly created: number;
@@ -11687,6 +11857,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
11687
11857
  readonly resource: Schema.String;
11688
11858
  readonly effect: Schema.Literals<readonly ["allow", "deny", "ask"]>;
11689
11859
  }>>>;
11860
+ readonly archived: Schema.optional<Schema.Boolean>;
11690
11861
  }>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.view", "POST", "/api/session/:sessionID/view", Schema.toCodecStringTree<Schema.Struct<{
11691
11862
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
11692
11863
  create: () => string & import("effect/Brand").Brand<"SessionID">;
@@ -202,6 +202,9 @@ export const makeSessionGroup = (sessionLocationMiddleware, formLocationMiddlewa
202
202
  title: Schema.String.pipe(Schema.optional),
203
203
  metadata: Session.Metadata.pipe(Schema.optional),
204
204
  permissions: Permission.Ruleset.pipe(Schema.optional),
205
+ archived: Schema.Boolean.pipe(Schema.optional).annotate({
206
+ description: "Archive the session with true or restore it with false. Repeating the current state is a no-op.",
207
+ }),
205
208
  }),
206
209
  success: HttpApiSchema.NoContent,
207
210
  error: SessionNotFoundError,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode/protocol",
4
- "version": "0.0.0-dev-21173",
4
+ "version": "0.0.0-dev-21177",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -33,7 +33,7 @@
33
33
  "typecheck": "tsc --noEmit"
34
34
  },
35
35
  "dependencies": {
36
- "@opencode/schema": "0.0.0-dev-21173",
36
+ "@opencode/schema": "0.0.0-dev-21177",
37
37
  "effect": "4.0.1"
38
38
  },
39
39
  "devDependencies": {