@opencode/protocol 0.0.0-dev-20012 → 0.0.0-dev-20013

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">;
@@ -6889,6 +6941,28 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
6889
6941
  readonly metadata?: {
6890
6942
  readonly [x: string]: unknown;
6891
6943
  } | undefined;
6944
+ } | {
6945
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
6946
+ readonly data: {
6947
+ readonly metadata: {
6948
+ readonly [x: string]: Schema.Json;
6949
+ };
6950
+ readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
6951
+ };
6952
+ readonly durable: {
6953
+ readonly aggregateID: string;
6954
+ readonly seq: number & import("effect/Brand").Brand<"Event.Seq">;
6955
+ readonly version: number & import("effect/Brand").Brand<"Event.Version">;
6956
+ };
6957
+ readonly type: "session.metadata.updated";
6958
+ readonly created: number;
6959
+ readonly location?: {
6960
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
6961
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
6962
+ } | undefined;
6963
+ readonly metadata?: {
6964
+ readonly [x: string]: unknown;
6965
+ } | undefined;
6892
6966
  } | {
6893
6967
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
6894
6968
  readonly data: {
@@ -9376,6 +9450,58 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
9376
9450
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
9377
9451
  };
9378
9452
  }>;
9453
+ }, Schema.Struct<{
9454
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
9455
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
9456
+ };
9457
+ readonly created: Schema.Finite;
9458
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
9459
+ readonly type: Schema.Literal<"session.metadata.updated">;
9460
+ readonly durable: Schema.Struct<{
9461
+ readonly aggregateID: Schema.String;
9462
+ readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
9463
+ readonly version: Schema.decodeTo<Schema.toType<Schema.brand<Schema.Int, "Event.Version">>, Schema.Literal<number>, never, never>;
9464
+ }>;
9465
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
9466
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
9467
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
9468
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
9469
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
9470
+ }>>, Schema.optionalKey<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
+ }>, never, never>;
9474
+ }>>>, Schema.optionalKey<Schema.Struct<{
9475
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
9476
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
9477
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
9478
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
9479
+ }>>, Schema.optionalKey<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
+ }>, never, never>;
9483
+ }>>, never, never>;
9484
+ readonly data: Schema.Struct<{
9485
+ readonly metadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
9486
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
9487
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
9488
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
9489
+ };
9490
+ }>;
9491
+ }> & {
9492
+ type: "session.metadata.updated";
9493
+ durability: "durable";
9494
+ durable: {
9495
+ readonly version: number;
9496
+ readonly aggregate: string;
9497
+ };
9498
+ data: Schema.Struct<{
9499
+ readonly metadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
9500
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
9501
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
9502
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
9503
+ };
9504
+ }>;
9379
9505
  }, Schema.Struct<{
9380
9506
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
9381
9507
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -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": "0.0.0-dev-20012",
4
+ "version": "0.0.0-dev-20013",
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": "0.0.0-dev-20012",
35
+ "@opencode/schema": "0.0.0-dev-20013",
36
36
  "effect": "4.0.0-rc.112"
37
37
  },
38
38
  "devDependencies": {