@opencode/protocol 2.0.13 → 2.0.15

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.
@@ -893,6 +893,58 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
893
893
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
894
894
  };
895
895
  }>;
896
+ }, Schema.Struct<{
897
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
898
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
899
+ };
900
+ readonly created: Schema.Finite;
901
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
902
+ readonly type: Schema.Literal<"session.metadata.updated">;
903
+ readonly durable: Schema.Struct<{
904
+ readonly aggregateID: Schema.String;
905
+ readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
906
+ readonly version: Schema.decodeTo<Schema.toType<Schema.brand<Schema.Int, "Event.Version">>, Schema.Literal<number>, never, never>;
907
+ }>;
908
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
909
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
910
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
911
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
912
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
913
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
914
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
915
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
916
+ }>, never, never>;
917
+ }>>>, Schema.optionalKey<Schema.Struct<{
918
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
919
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
920
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
921
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
922
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
923
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
924
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
925
+ }>, never, never>;
926
+ }>>, never, never>;
927
+ readonly data: Schema.Struct<{
928
+ readonly metadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
929
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
930
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
931
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
932
+ };
933
+ }>;
934
+ }> & {
935
+ type: "session.metadata.updated";
936
+ durability: "durable";
937
+ durable: {
938
+ readonly version: number;
939
+ readonly aggregate: string;
940
+ };
941
+ data: Schema.Struct<{
942
+ readonly metadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
943
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
944
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
945
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
946
+ };
947
+ }>;
896
948
  }, Schema.Struct<{
897
949
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
898
950
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -4653,6 +4705,7 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
4653
4705
  readonly time: Schema.Struct<{
4654
4706
  readonly created: Schema.Int;
4655
4707
  readonly updated: Schema.Int;
4708
+ readonly active: Schema.Int;
4656
4709
  }>;
4657
4710
  readonly sandboxes: Schema.$Array<Schema.String>;
4658
4711
  }>;
@@ -4684,6 +4737,7 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
4684
4737
  readonly time: Schema.Struct<{
4685
4738
  readonly created: Schema.Int;
4686
4739
  readonly updated: Schema.Int;
4740
+ readonly active: Schema.Int;
4687
4741
  }>;
4688
4742
  readonly sandboxes: Schema.$Array<Schema.String>;
4689
4743
  }>;
@@ -6669,6 +6723,7 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
6669
6723
  readonly time: {
6670
6724
  readonly created: number;
6671
6725
  readonly updated: number;
6726
+ readonly active: number;
6672
6727
  };
6673
6728
  readonly sandboxes: readonly string[];
6674
6729
  readonly name?: string | undefined;
@@ -6889,6 +6944,28 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
6889
6944
  readonly metadata?: {
6890
6945
  readonly [x: string]: unknown;
6891
6946
  } | undefined;
6947
+ } | {
6948
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
6949
+ readonly data: {
6950
+ readonly metadata: {
6951
+ readonly [x: string]: Schema.Json;
6952
+ };
6953
+ readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
6954
+ };
6955
+ readonly durable: {
6956
+ readonly aggregateID: string;
6957
+ readonly seq: number & import("effect/Brand").Brand<"Event.Seq">;
6958
+ readonly version: number & import("effect/Brand").Brand<"Event.Version">;
6959
+ };
6960
+ readonly type: "session.metadata.updated";
6961
+ readonly created: number;
6962
+ readonly location?: {
6963
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
6964
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
6965
+ } | undefined;
6966
+ readonly metadata?: {
6967
+ readonly [x: string]: unknown;
6968
+ } | undefined;
6892
6969
  } | {
6893
6970
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
6894
6971
  readonly data: {
@@ -9376,6 +9453,58 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
9376
9453
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
9377
9454
  };
9378
9455
  }>;
9456
+ }, Schema.Struct<{
9457
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
9458
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
9459
+ };
9460
+ readonly created: Schema.Finite;
9461
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
9462
+ readonly type: Schema.Literal<"session.metadata.updated">;
9463
+ readonly durable: Schema.Struct<{
9464
+ readonly aggregateID: Schema.String;
9465
+ readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
9466
+ readonly version: Schema.decodeTo<Schema.toType<Schema.brand<Schema.Int, "Event.Version">>, Schema.Literal<number>, never, never>;
9467
+ }>;
9468
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
9469
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
9470
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
9471
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
9472
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
9473
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
9474
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
9475
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
9476
+ }>, never, never>;
9477
+ }>>>, Schema.optionalKey<Schema.Struct<{
9478
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
9479
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
9480
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
9481
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
9482
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
9483
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
9484
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
9485
+ }>, never, never>;
9486
+ }>>, never, never>;
9487
+ readonly data: Schema.Struct<{
9488
+ readonly metadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
9489
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
9490
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
9491
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
9492
+ };
9493
+ }>;
9494
+ }> & {
9495
+ type: "session.metadata.updated";
9496
+ durability: "durable";
9497
+ durable: {
9498
+ readonly version: number;
9499
+ readonly aggregate: string;
9500
+ };
9501
+ data: Schema.Struct<{
9502
+ readonly metadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
9503
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
9504
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
9505
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
9506
+ };
9507
+ }>;
9379
9508
  }, Schema.Struct<{
9380
9509
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
9381
9510
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -13136,6 +13265,7 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
13136
13265
  readonly time: Schema.Struct<{
13137
13266
  readonly created: Schema.Int;
13138
13267
  readonly updated: Schema.Int;
13268
+ readonly active: Schema.Int;
13139
13269
  }>;
13140
13270
  readonly sandboxes: Schema.$Array<Schema.String>;
13141
13271
  }>;
@@ -13167,6 +13297,7 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
13167
13297
  readonly time: Schema.Struct<{
13168
13298
  readonly created: Schema.Int;
13169
13299
  readonly updated: Schema.Int;
13300
+ readonly active: Schema.Int;
13170
13301
  }>;
13171
13302
  readonly sandboxes: Schema.$Array<Schema.String>;
13172
13303
  }>;
@@ -25,6 +25,7 @@ export declare const ProjectGroup: HttpApiGroup.HttpApiGroup<"server.project", H
25
25
  readonly time: Schema.Struct<{
26
26
  readonly created: Schema.Int;
27
27
  readonly updated: Schema.Int;
28
+ readonly active: Schema.Int;
28
29
  }>;
29
30
  readonly sandboxes: Schema.$Array<Schema.String>;
30
31
  }>>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"project.update", "PATCH", "/api/project/:projectID", Schema.toCodecStringTree<Schema.Struct<{
@@ -72,6 +73,7 @@ export declare const ProjectGroup: HttpApiGroup.HttpApiGroup<"server.project", H
72
73
  readonly time: Schema.Struct<{
73
74
  readonly created: Schema.Int;
74
75
  readonly updated: Schema.Int;
76
+ readonly active: Schema.Int;
75
77
  }>;
76
78
  readonly sandboxes: Schema.$Array<Schema.String>;
77
79
  }>>, Schema.toCodecJson<typeof ProjectNotFoundError>, never, never>, false>;
@@ -3023,6 +3023,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
3023
3023
  };
3024
3024
  }>>, never, Schema.toCodecJson<Schema.Struct<{
3025
3025
  readonly title: Schema.optional<Schema.String>;
3026
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
3026
3027
  readonly permissions: Schema.optional<Schema.$Array<Schema.Struct<{
3027
3028
  readonly action: Schema.String;
3028
3029
  readonly resource: Schema.String;
@@ -5097,6 +5098,58 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
5097
5098
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
5098
5099
  };
5099
5100
  }>;
5101
+ }) | (Schema.Struct<{
5102
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
5103
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
5104
+ };
5105
+ readonly created: Schema.Finite;
5106
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
5107
+ readonly type: Schema.Literal<"session.metadata.updated">;
5108
+ readonly durable: Schema.Struct<{
5109
+ readonly aggregateID: Schema.String;
5110
+ readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
5111
+ readonly version: Schema.decodeTo<Schema.toType<Schema.brand<Schema.Int, "Event.Version">>, Schema.Literal<number>, never, never>;
5112
+ }>;
5113
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
5114
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
5115
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
5116
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5117
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5118
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
5119
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5120
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5121
+ }>, never, never>;
5122
+ }>>>, Schema.optionalKey<Schema.Struct<{
5123
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
5124
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
5125
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5126
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5127
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
5128
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5129
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5130
+ }>, never, never>;
5131
+ }>>, never, never>;
5132
+ readonly data: Schema.Struct<{
5133
+ readonly metadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
5134
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5135
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
5136
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
5137
+ };
5138
+ }>;
5139
+ }> & {
5140
+ type: "session.metadata.updated";
5141
+ durability: "durable";
5142
+ durable: {
5143
+ readonly version: number;
5144
+ readonly aggregate: string;
5145
+ };
5146
+ data: Schema.Struct<{
5147
+ readonly metadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
5148
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5149
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
5150
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
5151
+ };
5152
+ }>;
5100
5153
  }) | (Schema.Struct<{
5101
5154
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
5102
5155
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -8679,6 +8732,28 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
8679
8732
  readonly metadata?: {
8680
8733
  readonly [x: string]: unknown;
8681
8734
  } | undefined;
8735
+ } | {
8736
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
8737
+ readonly data: {
8738
+ readonly metadata: {
8739
+ readonly [x: string]: Schema.Json;
8740
+ };
8741
+ readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
8742
+ };
8743
+ readonly durable: {
8744
+ readonly aggregateID: string;
8745
+ readonly seq: number & import("effect/Brand").Brand<"Event.Seq">;
8746
+ readonly version: number & import("effect/Brand").Brand<"Event.Version">;
8747
+ };
8748
+ readonly type: "session.metadata.updated";
8749
+ readonly created: number;
8750
+ readonly location?: {
8751
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
8752
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
8753
+ } | undefined;
8754
+ readonly metadata?: {
8755
+ readonly [x: string]: unknown;
8756
+ } | undefined;
8682
8757
  } | {
8683
8758
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
8684
8759
  readonly data: {
@@ -253,6 +253,7 @@ export const makeSessionGroup = (sessionLocationMiddleware, formLocationMiddlewa
253
253
  params: { sessionID: Session.ID },
254
254
  payload: Schema.Struct({
255
255
  title: Schema.String.pipe(Schema.optional),
256
+ metadata: Session.Metadata.pipe(Schema.optional),
256
257
  permissions: Permission.Ruleset.pipe(Schema.optional),
257
258
  }),
258
259
  success: HttpApiSchema.NoContent,
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": "2.0.13",
4
+ "version": "2.0.15",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -32,7 +32,7 @@
32
32
  "typecheck": "tsgo --noEmit"
33
33
  },
34
34
  "dependencies": {
35
- "@opencode/schema": "2.0.13",
35
+ "@opencode/schema": "2.0.15",
36
36
  "effect": "4.0.0-rc.112"
37
37
  },
38
38
  "devDependencies": {