@opencode-ai/protocol 0.0.0-next-15174 → 0.0.0-next-15180

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.
@@ -915,99 +915,91 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
915
915
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
916
916
  };
917
917
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
918
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
919
+ readonly delivery: Schema.optional<Schema.Literals<readonly ["steer", "queue"]>>;
920
+ readonly resume: Schema.optional<Schema.Boolean>;
921
+ readonly text: Schema.String;
922
+ readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
923
+ readonly uri: Schema.String;
924
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
925
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
926
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
927
+ readonly start: Schema.Finite;
928
+ readonly end: Schema.Finite;
929
+ readonly text: Schema.String;
930
+ }>>>, Schema.optionalKey<Schema.Struct<{
931
+ readonly start: Schema.Finite;
932
+ readonly end: Schema.Finite;
933
+ readonly text: Schema.String;
934
+ }>>, never, never>;
935
+ }> & {
936
+ create: (input: PromptInput.FileAttachment) => {
937
+ readonly uri: string;
938
+ readonly name?: string | undefined;
939
+ readonly description?: string | undefined;
940
+ readonly mention?: {
941
+ readonly start: number;
942
+ readonly end: number;
943
+ readonly text: string;
944
+ } | undefined;
945
+ };
946
+ }>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
947
+ readonly uri: Schema.String;
948
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
949
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
950
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
951
+ readonly start: Schema.Finite;
952
+ readonly end: Schema.Finite;
953
+ readonly text: Schema.String;
954
+ }>>>, Schema.optionalKey<Schema.Struct<{
955
+ readonly start: Schema.Finite;
956
+ readonly end: Schema.Finite;
957
+ readonly text: Schema.String;
958
+ }>>, never, never>;
959
+ }> & {
960
+ create: (input: PromptInput.FileAttachment) => {
961
+ readonly uri: string;
962
+ readonly name?: string | undefined;
963
+ readonly description?: string | undefined;
964
+ readonly mention?: {
965
+ readonly start: number;
966
+ readonly end: number;
967
+ readonly text: string;
968
+ } | undefined;
969
+ };
970
+ }>>, never, never>;
971
+ readonly agents: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
972
+ readonly name: Schema.String;
973
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
974
+ readonly start: Schema.Finite;
975
+ readonly end: Schema.Finite;
976
+ readonly text: Schema.String;
977
+ }>>>, Schema.optionalKey<Schema.Struct<{
978
+ readonly start: Schema.Finite;
979
+ readonly end: Schema.Finite;
980
+ readonly text: Schema.String;
981
+ }>>, never, never>;
982
+ }>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
983
+ readonly name: Schema.String;
984
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
985
+ readonly start: Schema.Finite;
986
+ readonly end: Schema.Finite;
987
+ readonly text: Schema.String;
988
+ }>>>, Schema.optionalKey<Schema.Struct<{
989
+ readonly start: Schema.Finite;
990
+ readonly end: Schema.Finite;
991
+ readonly text: Schema.String;
992
+ }>>, never, never>;
993
+ }>>>, never, never>;
918
994
  readonly id: Schema.optional<Schema.brand<Schema.String, "Session.Message.ID"> & {
919
995
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
920
996
  fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
921
997
  }>;
922
- readonly prompt: Schema.Struct<{
923
- readonly text: Schema.String;
924
- readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
925
- readonly uri: Schema.String;
926
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
927
- readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
928
- readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
929
- readonly start: Schema.Finite;
930
- readonly end: Schema.Finite;
931
- readonly text: Schema.String;
932
- }>>>, Schema.optionalKey<Schema.Struct<{
933
- readonly start: Schema.Finite;
934
- readonly end: Schema.Finite;
935
- readonly text: Schema.String;
936
- }>>, never, never>;
937
- }> & {
938
- create: (input: PromptInput.FileAttachment) => {
939
- readonly uri: string;
940
- readonly name?: string | undefined;
941
- readonly description?: string | undefined;
942
- readonly mention?: {
943
- readonly start: number;
944
- readonly end: number;
945
- readonly text: string;
946
- } | undefined;
947
- };
948
- }>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
949
- readonly uri: Schema.String;
950
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
951
- readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
952
- readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
953
- readonly start: Schema.Finite;
954
- readonly end: Schema.Finite;
955
- readonly text: Schema.String;
956
- }>>>, Schema.optionalKey<Schema.Struct<{
957
- readonly start: Schema.Finite;
958
- readonly end: Schema.Finite;
959
- readonly text: Schema.String;
960
- }>>, never, never>;
961
- }> & {
962
- create: (input: PromptInput.FileAttachment) => {
963
- readonly uri: string;
964
- readonly name?: string | undefined;
965
- readonly description?: string | undefined;
966
- readonly mention?: {
967
- readonly start: number;
968
- readonly end: number;
969
- readonly text: string;
970
- } | undefined;
971
- };
972
- }>>, never, never>;
973
- readonly agents: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
974
- readonly name: Schema.String;
975
- readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
976
- readonly start: Schema.Finite;
977
- readonly end: Schema.Finite;
978
- readonly text: Schema.String;
979
- }>>>, Schema.optionalKey<Schema.Struct<{
980
- readonly start: Schema.Finite;
981
- readonly end: Schema.Finite;
982
- readonly text: Schema.String;
983
- }>>, never, never>;
984
- }>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
985
- readonly name: Schema.String;
986
- readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
987
- readonly start: Schema.Finite;
988
- readonly end: Schema.Finite;
989
- readonly text: Schema.String;
990
- }>>>, Schema.optionalKey<Schema.Struct<{
991
- readonly start: Schema.Finite;
992
- readonly end: Schema.Finite;
993
- readonly text: Schema.String;
994
- }>>, never, never>;
995
- }>>>, never, never>;
996
- }>;
997
- readonly delivery: Schema.optional<Schema.Literals<readonly ["steer", "queue"]>>;
998
- readonly resume: Schema.optional<Schema.Boolean>;
999
998
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
1000
999
  readonly data: Schema.Struct<{
1001
- readonly admittedSeq: Schema.Int;
1002
- readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1003
- create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1004
- fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1005
- };
1006
- readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
1007
- create: () => string & import("effect/Brand").Brand<"SessionID">;
1008
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
1009
- };
1010
- readonly prompt: Schema.Struct<{
1000
+ readonly type: Schema.tag<"user">;
1001
+ readonly data: Schema.Struct<{
1002
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1011
1003
  readonly text: Schema.String;
1012
1004
  readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
1013
1005
  readonly data: Schema.String;
@@ -1109,67 +1101,19 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
1109
1101
  readonly text: Schema.String;
1110
1102
  }>>, never, never>;
1111
1103
  }>>>, never, never>;
1112
- }> & {
1113
- equivalence: import("effect/Equivalence").Equivalence<{
1114
- readonly text: string;
1115
- readonly files?: readonly {
1116
- readonly data: string;
1117
- readonly mime: string;
1118
- readonly source: {
1119
- readonly type: "inline";
1120
- } | {
1121
- readonly type: "uri";
1122
- readonly uri: string;
1123
- };
1124
- readonly name?: string | undefined;
1125
- readonly description?: string | undefined;
1126
- readonly mention?: {
1127
- readonly start: number;
1128
- readonly end: number;
1129
- readonly text: string;
1130
- } | undefined;
1131
- }[] | undefined;
1132
- readonly agents?: readonly {
1133
- readonly name: string;
1134
- readonly mention?: {
1135
- readonly start: number;
1136
- readonly end: number;
1137
- readonly text: string;
1138
- } | undefined;
1139
- }[] | undefined;
1140
- }>;
1141
- fromUserMessage: (input: Pick<import("@opencode-ai/schema/prompt").Prompt, "text" | "files" | "agents">) => {
1142
- readonly text: string;
1143
- readonly files?: readonly {
1144
- readonly data: string;
1145
- readonly mime: string;
1146
- readonly source: {
1147
- readonly type: "inline";
1148
- } | {
1149
- readonly type: "uri";
1150
- readonly uri: string;
1151
- };
1152
- readonly name?: string | undefined;
1153
- readonly description?: string | undefined;
1154
- readonly mention?: {
1155
- readonly start: number;
1156
- readonly end: number;
1157
- readonly text: string;
1158
- } | undefined;
1159
- }[] | undefined;
1160
- readonly agents?: readonly {
1161
- readonly name: string;
1162
- readonly mention?: {
1163
- readonly start: number;
1164
- readonly end: number;
1165
- readonly text: string;
1166
- } | undefined;
1167
- }[] | undefined;
1168
- };
1169
- };
1104
+ }>;
1170
1105
  readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
1171
- readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1172
1106
  readonly promotedSeq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1107
+ readonly admittedSeq: Schema.Int;
1108
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1109
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1110
+ fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1111
+ };
1112
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
1113
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
1114
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
1115
+ };
1116
+ readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1173
1117
  }>;
1174
1118
  }>>, HttpApiEndpoint.Json<typeof InvalidRequestError | typeof ConflictError | typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.command", "POST", "/api/session/:sessionID/command", HttpApiEndpoint.StringTree<Schema.Struct<{
1175
1119
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
@@ -1277,16 +1221,9 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
1277
1221
  readonly resume: Schema.optional<Schema.Boolean>;
1278
1222
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
1279
1223
  readonly data: Schema.Struct<{
1280
- readonly admittedSeq: Schema.Int;
1281
- readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1282
- create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1283
- fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1284
- };
1285
- readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
1286
- create: () => string & import("effect/Brand").Brand<"SessionID">;
1287
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
1288
- };
1289
- readonly prompt: Schema.Struct<{
1224
+ readonly type: Schema.tag<"user">;
1225
+ readonly data: Schema.Struct<{
1226
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1290
1227
  readonly text: Schema.String;
1291
1228
  readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
1292
1229
  readonly data: Schema.String;
@@ -1388,67 +1325,19 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
1388
1325
  readonly text: Schema.String;
1389
1326
  }>>, never, never>;
1390
1327
  }>>>, never, never>;
1391
- }> & {
1392
- equivalence: import("effect/Equivalence").Equivalence<{
1393
- readonly text: string;
1394
- readonly files?: readonly {
1395
- readonly data: string;
1396
- readonly mime: string;
1397
- readonly source: {
1398
- readonly type: "inline";
1399
- } | {
1400
- readonly type: "uri";
1401
- readonly uri: string;
1402
- };
1403
- readonly name?: string | undefined;
1404
- readonly description?: string | undefined;
1405
- readonly mention?: {
1406
- readonly start: number;
1407
- readonly end: number;
1408
- readonly text: string;
1409
- } | undefined;
1410
- }[] | undefined;
1411
- readonly agents?: readonly {
1412
- readonly name: string;
1413
- readonly mention?: {
1414
- readonly start: number;
1415
- readonly end: number;
1416
- readonly text: string;
1417
- } | undefined;
1418
- }[] | undefined;
1419
- }>;
1420
- fromUserMessage: (input: Pick<import("@opencode-ai/schema/prompt").Prompt, "text" | "files" | "agents">) => {
1421
- readonly text: string;
1422
- readonly files?: readonly {
1423
- readonly data: string;
1424
- readonly mime: string;
1425
- readonly source: {
1426
- readonly type: "inline";
1427
- } | {
1428
- readonly type: "uri";
1429
- readonly uri: string;
1430
- };
1431
- readonly name?: string | undefined;
1432
- readonly description?: string | undefined;
1433
- readonly mention?: {
1434
- readonly start: number;
1435
- readonly end: number;
1436
- readonly text: string;
1437
- } | undefined;
1438
- }[] | undefined;
1439
- readonly agents?: readonly {
1440
- readonly name: string;
1441
- readonly mention?: {
1442
- readonly start: number;
1443
- readonly end: number;
1444
- readonly text: string;
1445
- } | undefined;
1446
- }[] | undefined;
1447
- };
1448
- };
1328
+ }>;
1449
1329
  readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
1450
- readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1451
1330
  readonly promotedSeq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1331
+ readonly admittedSeq: Schema.Int;
1332
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1333
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1334
+ fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1335
+ };
1336
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
1337
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
1338
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
1339
+ };
1340
+ readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1452
1341
  }>;
1453
1342
  }>>, HttpApiEndpoint.Json<typeof InvalidRequestError | typeof ConflictError | typeof SessionNotFoundError | typeof CommandNotFoundError | typeof CommandEvaluationError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.skill", "POST", "/api/session/:sessionID/skill", HttpApiEndpoint.StringTree<Schema.Struct<{
1454
1343
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
@@ -1468,11 +1357,37 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
1468
1357
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
1469
1358
  };
1470
1359
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
1360
+ readonly id: Schema.optional<Schema.brand<Schema.String, "Session.Message.ID"> & {
1361
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1362
+ fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1363
+ }>;
1471
1364
  readonly text: Schema.String;
1472
1365
  readonly description: Schema.optional<Schema.String>;
1473
1366
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1367
+ readonly delivery: Schema.optional<Schema.Literals<readonly ["steer", "queue"]>>;
1474
1368
  readonly resume: Schema.optional<Schema.Boolean>;
1475
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<HttpApiSchema.NoContent>, HttpApiEndpoint.Json<typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.shell", "POST", "/api/session/:sessionID/shell", HttpApiEndpoint.StringTree<Schema.Struct<{
1369
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
1370
+ readonly data: Schema.Struct<{
1371
+ readonly type: Schema.tag<"synthetic">;
1372
+ readonly data: Schema.Struct<{
1373
+ readonly text: Schema.String;
1374
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1375
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1376
+ }>;
1377
+ readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
1378
+ readonly promotedSeq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1379
+ readonly admittedSeq: Schema.Int;
1380
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1381
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1382
+ fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1383
+ };
1384
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
1385
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
1386
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
1387
+ };
1388
+ readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1389
+ }>;
1390
+ }>>, HttpApiEndpoint.Json<typeof ConflictError | typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.shell", "POST", "/api/session/:sessionID/shell", HttpApiEndpoint.StringTree<Schema.Struct<{
1476
1391
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
1477
1392
  create: () => string & import("effect/Brand").Brand<"SessionID">;
1478
1393
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -1495,6 +1410,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
1495
1410
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
1496
1411
  readonly data: Schema.Struct<{
1497
1412
  readonly type: Schema.tag<"compaction">;
1413
+ readonly handledSeq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1498
1414
  readonly admittedSeq: Schema.Int;
1499
1415
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1500
1416
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -1505,7 +1421,6 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
1505
1421
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
1506
1422
  };
1507
1423
  readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1508
- readonly handledSeq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1509
1424
  }>;
1510
1425
  }>>, HttpApiEndpoint.Json<typeof ConflictError | typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.wait", "POST", "/api/session/:sessionID/wait", HttpApiEndpoint.StringTree<Schema.Struct<{
1511
1426
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
@@ -2432,7 +2347,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
2432
2347
  };
2433
2348
  readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2434
2349
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2435
- readonly type: Schema.Literal<"session.prompt.promoted">;
2350
+ readonly type: Schema.Literal<"session.input.promoted">;
2436
2351
  readonly durable: Schema.Struct<{
2437
2352
  readonly aggregateID: Schema.String;
2438
2353
  readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
@@ -2468,7 +2383,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
2468
2383
  };
2469
2384
  }>;
2470
2385
  }> & {
2471
- type: "session.prompt.promoted";
2386
+ type: "session.input.promoted";
2472
2387
  durability: "durable";
2473
2388
  durable: {
2474
2389
  readonly version: number;
@@ -2490,376 +2405,286 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
2490
2405
  };
2491
2406
  readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2492
2407
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2493
- readonly type: Schema.Literal<"session.prompt.admitted">;
2408
+ readonly type: Schema.Literal<"session.input.admitted">;
2494
2409
  readonly durable: Schema.Struct<{
2495
2410
  readonly aggregateID: Schema.String;
2496
2411
  readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
2497
2412
  readonly version: Schema.decodeTo<Schema.toType<Schema.brand<Schema.Int, "Event.Version">>, Schema.Literal<number>, never, never>;
2498
2413
  }>;
2499
2414
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2500
- readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
2501
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
2502
- ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
2503
- create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
2504
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
2505
- ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
2506
- create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
2507
- }>, never, never>;
2508
- }>>>, Schema.optionalKey<Schema.Struct<{
2509
- readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
2510
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
2511
- ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
2512
- create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
2513
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
2514
- ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
2515
- create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
2516
- }>, never, never>;
2517
- }>>, never, never>;
2518
- readonly data: Schema.Struct<{
2519
- inputID: Schema.brand<Schema.String, "Session.Message.ID"> & {
2520
- create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2521
- fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2522
- };
2523
- prompt: Schema.Struct<{
2524
- readonly text: Schema.String;
2525
- readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
2526
- readonly data: Schema.String;
2527
- readonly mime: Schema.String;
2528
- readonly source: Schema.Union<readonly [Schema.Struct<{
2529
- readonly type: Schema.Literal<"inline">;
2530
- }>, Schema.Struct<{
2531
- readonly type: Schema.Literal<"uri">;
2532
- readonly uri: Schema.String;
2533
- }>]>;
2534
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2535
- readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2536
- readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2537
- readonly start: Schema.Finite;
2538
- readonly end: Schema.Finite;
2539
- readonly text: Schema.String;
2540
- }>>>, Schema.optionalKey<Schema.Struct<{
2541
- readonly start: Schema.Finite;
2542
- readonly end: Schema.Finite;
2543
- readonly text: Schema.String;
2544
- }>>, never, never>;
2545
- }> & {
2546
- create: (input: SessionEvent.FileAttachment) => {
2547
- readonly data: string;
2548
- readonly mime: string;
2549
- readonly source: {
2550
- readonly type: "inline";
2551
- } | {
2552
- readonly type: "uri";
2553
- readonly uri: string;
2554
- };
2555
- readonly name?: string | undefined;
2556
- readonly description?: string | undefined;
2557
- readonly mention?: {
2558
- readonly start: number;
2559
- readonly end: number;
2560
- readonly text: string;
2561
- } | undefined;
2562
- };
2563
- }>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
2564
- readonly data: Schema.String;
2565
- readonly mime: Schema.String;
2566
- readonly source: Schema.Union<readonly [Schema.Struct<{
2567
- readonly type: Schema.Literal<"inline">;
2568
- }>, Schema.Struct<{
2569
- readonly type: Schema.Literal<"uri">;
2570
- readonly uri: Schema.String;
2571
- }>]>;
2572
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2573
- readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2574
- readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2575
- readonly start: Schema.Finite;
2576
- readonly end: Schema.Finite;
2577
- readonly text: Schema.String;
2578
- }>>>, Schema.optionalKey<Schema.Struct<{
2579
- readonly start: Schema.Finite;
2580
- readonly end: Schema.Finite;
2581
- readonly text: Schema.String;
2582
- }>>, never, never>;
2583
- }> & {
2584
- create: (input: SessionEvent.FileAttachment) => {
2585
- readonly data: string;
2586
- readonly mime: string;
2587
- readonly source: {
2588
- readonly type: "inline";
2589
- } | {
2590
- readonly type: "uri";
2591
- readonly uri: string;
2592
- };
2593
- readonly name?: string | undefined;
2594
- readonly description?: string | undefined;
2595
- readonly mention?: {
2596
- readonly start: number;
2597
- readonly end: number;
2598
- readonly text: string;
2599
- } | undefined;
2600
- };
2601
- }>>, never, never>;
2602
- readonly agents: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
2603
- readonly name: Schema.String;
2604
- readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2605
- readonly start: Schema.Finite;
2606
- readonly end: Schema.Finite;
2607
- readonly text: Schema.String;
2608
- }>>>, Schema.optionalKey<Schema.Struct<{
2609
- readonly start: Schema.Finite;
2610
- readonly end: Schema.Finite;
2611
- readonly text: Schema.String;
2612
- }>>, never, never>;
2613
- }>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
2614
- readonly name: Schema.String;
2615
- readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2616
- readonly start: Schema.Finite;
2617
- readonly end: Schema.Finite;
2618
- readonly text: Schema.String;
2619
- }>>>, Schema.optionalKey<Schema.Struct<{
2620
- readonly start: Schema.Finite;
2621
- readonly end: Schema.Finite;
2622
- readonly text: Schema.String;
2623
- }>>, never, never>;
2624
- }>>>, never, never>;
2625
- }> & {
2626
- equivalence: import("effect/Equivalence").Equivalence<{
2627
- readonly text: string;
2628
- readonly files?: readonly {
2629
- readonly data: string;
2630
- readonly mime: string;
2631
- readonly source: {
2632
- readonly type: "inline";
2633
- } | {
2634
- readonly type: "uri";
2635
- readonly uri: string;
2636
- };
2637
- readonly name?: string | undefined;
2638
- readonly description?: string | undefined;
2639
- readonly mention?: {
2640
- readonly start: number;
2641
- readonly end: number;
2642
- readonly text: string;
2643
- } | undefined;
2644
- }[] | undefined;
2645
- readonly agents?: readonly {
2646
- readonly name: string;
2647
- readonly mention?: {
2648
- readonly start: number;
2649
- readonly end: number;
2650
- readonly text: string;
2651
- } | undefined;
2652
- }[] | undefined;
2653
- }>;
2654
- fromUserMessage: (input: Pick<import("@opencode-ai/schema/prompt").Prompt, "text" | "files" | "agents">) => {
2655
- readonly text: string;
2656
- readonly files?: readonly {
2657
- readonly data: string;
2658
- readonly mime: string;
2659
- readonly source: {
2660
- readonly type: "inline";
2661
- } | {
2662
- readonly type: "uri";
2663
- readonly uri: string;
2664
- };
2665
- readonly name?: string | undefined;
2666
- readonly description?: string | undefined;
2667
- readonly mention?: {
2668
- readonly start: number;
2669
- readonly end: number;
2670
- readonly text: string;
2671
- } | undefined;
2672
- }[] | undefined;
2673
- readonly agents?: readonly {
2674
- readonly name: string;
2675
- readonly mention?: {
2676
- readonly start: number;
2677
- readonly end: number;
2678
- readonly text: string;
2679
- } | undefined;
2680
- }[] | undefined;
2681
- };
2415
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
2416
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
2417
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
2418
+ create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
2419
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
2420
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
2421
+ create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
2422
+ }>, never, never>;
2423
+ }>>>, Schema.optionalKey<Schema.Struct<{
2424
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
2425
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
2426
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
2427
+ create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
2428
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
2429
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
2430
+ create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
2431
+ }>, never, never>;
2432
+ }>>, never, never>;
2433
+ readonly data: Schema.Struct<{
2434
+ readonly inputID: Schema.brand<Schema.String, "Session.Message.ID"> & {
2435
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2436
+ fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2682
2437
  };
2683
- delivery: Schema.Literals<readonly ["steer", "queue"]>;
2684
- sessionID: Schema.brand<Schema.String, "SessionID"> & {
2438
+ readonly input: Schema.Union<readonly [Schema.Struct<{
2439
+ readonly type: Schema.tag<"user">;
2440
+ readonly data: Schema.Struct<{
2441
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2442
+ readonly text: Schema.String;
2443
+ readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
2444
+ readonly data: Schema.String;
2445
+ readonly mime: Schema.String;
2446
+ readonly source: Schema.Union<readonly [Schema.Struct<{
2447
+ readonly type: Schema.Literal<"inline">;
2448
+ }>, Schema.Struct<{
2449
+ readonly type: Schema.Literal<"uri">;
2450
+ readonly uri: Schema.String;
2451
+ }>]>;
2452
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2453
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2454
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2455
+ readonly start: Schema.Finite;
2456
+ readonly end: Schema.Finite;
2457
+ readonly text: Schema.String;
2458
+ }>>>, Schema.optionalKey<Schema.Struct<{
2459
+ readonly start: Schema.Finite;
2460
+ readonly end: Schema.Finite;
2461
+ readonly text: Schema.String;
2462
+ }>>, never, never>;
2463
+ }> & {
2464
+ create: (input: SessionEvent.FileAttachment) => {
2465
+ readonly data: string;
2466
+ readonly mime: string;
2467
+ readonly source: {
2468
+ readonly type: "inline";
2469
+ } | {
2470
+ readonly type: "uri";
2471
+ readonly uri: string;
2472
+ };
2473
+ readonly name?: string | undefined;
2474
+ readonly description?: string | undefined;
2475
+ readonly mention?: {
2476
+ readonly start: number;
2477
+ readonly end: number;
2478
+ readonly text: string;
2479
+ } | undefined;
2480
+ };
2481
+ }>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
2482
+ readonly data: Schema.String;
2483
+ readonly mime: Schema.String;
2484
+ readonly source: Schema.Union<readonly [Schema.Struct<{
2485
+ readonly type: Schema.Literal<"inline">;
2486
+ }>, Schema.Struct<{
2487
+ readonly type: Schema.Literal<"uri">;
2488
+ readonly uri: Schema.String;
2489
+ }>]>;
2490
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2491
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2492
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2493
+ readonly start: Schema.Finite;
2494
+ readonly end: Schema.Finite;
2495
+ readonly text: Schema.String;
2496
+ }>>>, Schema.optionalKey<Schema.Struct<{
2497
+ readonly start: Schema.Finite;
2498
+ readonly end: Schema.Finite;
2499
+ readonly text: Schema.String;
2500
+ }>>, never, never>;
2501
+ }> & {
2502
+ create: (input: SessionEvent.FileAttachment) => {
2503
+ readonly data: string;
2504
+ readonly mime: string;
2505
+ readonly source: {
2506
+ readonly type: "inline";
2507
+ } | {
2508
+ readonly type: "uri";
2509
+ readonly uri: string;
2510
+ };
2511
+ readonly name?: string | undefined;
2512
+ readonly description?: string | undefined;
2513
+ readonly mention?: {
2514
+ readonly start: number;
2515
+ readonly end: number;
2516
+ readonly text: string;
2517
+ } | undefined;
2518
+ };
2519
+ }>>, never, never>;
2520
+ readonly agents: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
2521
+ readonly name: Schema.String;
2522
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2523
+ readonly start: Schema.Finite;
2524
+ readonly end: Schema.Finite;
2525
+ readonly text: Schema.String;
2526
+ }>>>, Schema.optionalKey<Schema.Struct<{
2527
+ readonly start: Schema.Finite;
2528
+ readonly end: Schema.Finite;
2529
+ readonly text: Schema.String;
2530
+ }>>, never, never>;
2531
+ }>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
2532
+ readonly name: Schema.String;
2533
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2534
+ readonly start: Schema.Finite;
2535
+ readonly end: Schema.Finite;
2536
+ readonly text: Schema.String;
2537
+ }>>>, Schema.optionalKey<Schema.Struct<{
2538
+ readonly start: Schema.Finite;
2539
+ readonly end: Schema.Finite;
2540
+ readonly text: Schema.String;
2541
+ }>>, never, never>;
2542
+ }>>>, never, never>;
2543
+ }>;
2544
+ readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
2545
+ }>, Schema.Struct<{
2546
+ readonly type: Schema.tag<"synthetic">;
2547
+ readonly data: Schema.Struct<{
2548
+ readonly text: Schema.String;
2549
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2550
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2551
+ }>;
2552
+ readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
2553
+ }>]>;
2554
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
2685
2555
  create: () => string & import("effect/Brand").Brand<"SessionID">;
2686
2556
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
2687
2557
  };
2688
2558
  }>;
2689
2559
  }> & {
2690
- type: "session.prompt.admitted";
2560
+ type: "session.input.admitted";
2691
2561
  durability: "durable";
2692
2562
  durable: {
2693
2563
  readonly version: number;
2694
2564
  readonly aggregate: string;
2695
2565
  };
2696
2566
  data: Schema.Struct<{
2697
- inputID: Schema.brand<Schema.String, "Session.Message.ID"> & {
2567
+ readonly inputID: Schema.brand<Schema.String, "Session.Message.ID"> & {
2698
2568
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2699
2569
  fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2700
2570
  };
2701
- prompt: Schema.Struct<{
2702
- readonly text: Schema.String;
2703
- readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
2704
- readonly data: Schema.String;
2705
- readonly mime: Schema.String;
2706
- readonly source: Schema.Union<readonly [Schema.Struct<{
2707
- readonly type: Schema.Literal<"inline">;
2708
- }>, Schema.Struct<{
2709
- readonly type: Schema.Literal<"uri">;
2710
- readonly uri: Schema.String;
2711
- }>]>;
2712
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2713
- readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2714
- readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2715
- readonly start: Schema.Finite;
2716
- readonly end: Schema.Finite;
2717
- readonly text: Schema.String;
2718
- }>>>, Schema.optionalKey<Schema.Struct<{
2719
- readonly start: Schema.Finite;
2720
- readonly end: Schema.Finite;
2721
- readonly text: Schema.String;
2722
- }>>, never, never>;
2723
- }> & {
2724
- create: (input: SessionEvent.FileAttachment) => {
2725
- readonly data: string;
2726
- readonly mime: string;
2727
- readonly source: {
2728
- readonly type: "inline";
2729
- } | {
2730
- readonly type: "uri";
2731
- readonly uri: string;
2571
+ readonly input: Schema.Union<readonly [Schema.Struct<{
2572
+ readonly type: Schema.tag<"user">;
2573
+ readonly data: Schema.Struct<{
2574
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2575
+ readonly text: Schema.String;
2576
+ readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
2577
+ readonly data: Schema.String;
2578
+ readonly mime: Schema.String;
2579
+ readonly source: Schema.Union<readonly [Schema.Struct<{
2580
+ readonly type: Schema.Literal<"inline">;
2581
+ }>, Schema.Struct<{
2582
+ readonly type: Schema.Literal<"uri">;
2583
+ readonly uri: Schema.String;
2584
+ }>]>;
2585
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2586
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2587
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2588
+ readonly start: Schema.Finite;
2589
+ readonly end: Schema.Finite;
2590
+ readonly text: Schema.String;
2591
+ }>>>, Schema.optionalKey<Schema.Struct<{
2592
+ readonly start: Schema.Finite;
2593
+ readonly end: Schema.Finite;
2594
+ readonly text: Schema.String;
2595
+ }>>, never, never>;
2596
+ }> & {
2597
+ create: (input: SessionEvent.FileAttachment) => {
2598
+ readonly data: string;
2599
+ readonly mime: string;
2600
+ readonly source: {
2601
+ readonly type: "inline";
2602
+ } | {
2603
+ readonly type: "uri";
2604
+ readonly uri: string;
2605
+ };
2606
+ readonly name?: string | undefined;
2607
+ readonly description?: string | undefined;
2608
+ readonly mention?: {
2609
+ readonly start: number;
2610
+ readonly end: number;
2611
+ readonly text: string;
2612
+ } | undefined;
2732
2613
  };
2733
- readonly name?: string | undefined;
2734
- readonly description?: string | undefined;
2735
- readonly mention?: {
2736
- readonly start: number;
2737
- readonly end: number;
2738
- readonly text: string;
2739
- } | undefined;
2740
- };
2741
- }>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
2742
- readonly data: Schema.String;
2743
- readonly mime: Schema.String;
2744
- readonly source: Schema.Union<readonly [Schema.Struct<{
2745
- readonly type: Schema.Literal<"inline">;
2746
- }>, Schema.Struct<{
2747
- readonly type: Schema.Literal<"uri">;
2748
- readonly uri: Schema.String;
2749
- }>]>;
2750
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2751
- readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2752
- readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2753
- readonly start: Schema.Finite;
2754
- readonly end: Schema.Finite;
2755
- readonly text: Schema.String;
2756
- }>>>, Schema.optionalKey<Schema.Struct<{
2757
- readonly start: Schema.Finite;
2758
- readonly end: Schema.Finite;
2759
- readonly text: Schema.String;
2760
- }>>, never, never>;
2761
- }> & {
2762
- create: (input: SessionEvent.FileAttachment) => {
2763
- readonly data: string;
2764
- readonly mime: string;
2765
- readonly source: {
2766
- readonly type: "inline";
2767
- } | {
2768
- readonly type: "uri";
2769
- readonly uri: string;
2614
+ }>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
2615
+ readonly data: Schema.String;
2616
+ readonly mime: Schema.String;
2617
+ readonly source: Schema.Union<readonly [Schema.Struct<{
2618
+ readonly type: Schema.Literal<"inline">;
2619
+ }>, Schema.Struct<{
2620
+ readonly type: Schema.Literal<"uri">;
2621
+ readonly uri: Schema.String;
2622
+ }>]>;
2623
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2624
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2625
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2626
+ readonly start: Schema.Finite;
2627
+ readonly end: Schema.Finite;
2628
+ readonly text: Schema.String;
2629
+ }>>>, Schema.optionalKey<Schema.Struct<{
2630
+ readonly start: Schema.Finite;
2631
+ readonly end: Schema.Finite;
2632
+ readonly text: Schema.String;
2633
+ }>>, never, never>;
2634
+ }> & {
2635
+ create: (input: SessionEvent.FileAttachment) => {
2636
+ readonly data: string;
2637
+ readonly mime: string;
2638
+ readonly source: {
2639
+ readonly type: "inline";
2640
+ } | {
2641
+ readonly type: "uri";
2642
+ readonly uri: string;
2643
+ };
2644
+ readonly name?: string | undefined;
2645
+ readonly description?: string | undefined;
2646
+ readonly mention?: {
2647
+ readonly start: number;
2648
+ readonly end: number;
2649
+ readonly text: string;
2650
+ } | undefined;
2770
2651
  };
2771
- readonly name?: string | undefined;
2772
- readonly description?: string | undefined;
2773
- readonly mention?: {
2774
- readonly start: number;
2775
- readonly end: number;
2776
- readonly text: string;
2777
- } | undefined;
2778
- };
2779
- }>>, never, never>;
2780
- readonly agents: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
2781
- readonly name: Schema.String;
2782
- readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2783
- readonly start: Schema.Finite;
2784
- readonly end: Schema.Finite;
2785
- readonly text: Schema.String;
2786
- }>>>, Schema.optionalKey<Schema.Struct<{
2787
- readonly start: Schema.Finite;
2788
- readonly end: Schema.Finite;
2789
- readonly text: Schema.String;
2790
- }>>, never, never>;
2791
- }>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
2792
- readonly name: Schema.String;
2793
- readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2794
- readonly start: Schema.Finite;
2795
- readonly end: Schema.Finite;
2796
- readonly text: Schema.String;
2797
- }>>>, Schema.optionalKey<Schema.Struct<{
2798
- readonly start: Schema.Finite;
2799
- readonly end: Schema.Finite;
2800
- readonly text: Schema.String;
2801
2652
  }>>, never, never>;
2802
- }>>>, never, never>;
2803
- }> & {
2804
- equivalence: import("effect/Equivalence").Equivalence<{
2805
- readonly text: string;
2806
- readonly files?: readonly {
2807
- readonly data: string;
2808
- readonly mime: string;
2809
- readonly source: {
2810
- readonly type: "inline";
2811
- } | {
2812
- readonly type: "uri";
2813
- readonly uri: string;
2814
- };
2815
- readonly name?: string | undefined;
2816
- readonly description?: string | undefined;
2817
- readonly mention?: {
2818
- readonly start: number;
2819
- readonly end: number;
2820
- readonly text: string;
2821
- } | undefined;
2822
- }[] | undefined;
2823
- readonly agents?: readonly {
2824
- readonly name: string;
2825
- readonly mention?: {
2826
- readonly start: number;
2827
- readonly end: number;
2828
- readonly text: string;
2829
- } | undefined;
2830
- }[] | undefined;
2653
+ readonly agents: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
2654
+ readonly name: Schema.String;
2655
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2656
+ readonly start: Schema.Finite;
2657
+ readonly end: Schema.Finite;
2658
+ readonly text: Schema.String;
2659
+ }>>>, Schema.optionalKey<Schema.Struct<{
2660
+ readonly start: Schema.Finite;
2661
+ readonly end: Schema.Finite;
2662
+ readonly text: Schema.String;
2663
+ }>>, never, never>;
2664
+ }>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
2665
+ readonly name: Schema.String;
2666
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2667
+ readonly start: Schema.Finite;
2668
+ readonly end: Schema.Finite;
2669
+ readonly text: Schema.String;
2670
+ }>>>, Schema.optionalKey<Schema.Struct<{
2671
+ readonly start: Schema.Finite;
2672
+ readonly end: Schema.Finite;
2673
+ readonly text: Schema.String;
2674
+ }>>, never, never>;
2675
+ }>>>, never, never>;
2831
2676
  }>;
2832
- fromUserMessage: (input: Pick<import("@opencode-ai/schema/prompt").Prompt, "text" | "files" | "agents">) => {
2833
- readonly text: string;
2834
- readonly files?: readonly {
2835
- readonly data: string;
2836
- readonly mime: string;
2837
- readonly source: {
2838
- readonly type: "inline";
2839
- } | {
2840
- readonly type: "uri";
2841
- readonly uri: string;
2842
- };
2843
- readonly name?: string | undefined;
2844
- readonly description?: string | undefined;
2845
- readonly mention?: {
2846
- readonly start: number;
2847
- readonly end: number;
2848
- readonly text: string;
2849
- } | undefined;
2850
- }[] | undefined;
2851
- readonly agents?: readonly {
2852
- readonly name: string;
2853
- readonly mention?: {
2854
- readonly start: number;
2855
- readonly end: number;
2856
- readonly text: string;
2857
- } | undefined;
2858
- }[] | undefined;
2859
- };
2860
- };
2861
- delivery: Schema.Literals<readonly ["steer", "queue"]>;
2862
- sessionID: Schema.brand<Schema.String, "SessionID"> & {
2677
+ readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
2678
+ }>, Schema.Struct<{
2679
+ readonly type: Schema.tag<"synthetic">;
2680
+ readonly data: Schema.Struct<{
2681
+ readonly text: Schema.String;
2682
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2683
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2684
+ }>;
2685
+ readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
2686
+ }>]>;
2687
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
2863
2688
  create: () => string & import("effect/Brand").Brand<"SessionID">;
2864
2689
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
2865
2690
  };
@@ -5055,7 +4880,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
5055
4880
  } | {
5056
4881
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
5057
4882
  readonly created: import("effect/DateTime").Utc;
5058
- readonly type: "session.prompt.promoted";
4883
+ readonly type: "session.input.promoted";
5059
4884
  readonly durable: {
5060
4885
  readonly aggregateID: string;
5061
4886
  readonly seq: number & import("effect/Brand").Brand<"Event.Seq">;
@@ -5075,7 +4900,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
5075
4900
  } | {
5076
4901
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
5077
4902
  readonly created: import("effect/DateTime").Utc;
5078
- readonly type: "session.prompt.admitted";
4903
+ readonly type: "session.input.admitted";
5079
4904
  readonly durable: {
5080
4905
  readonly aggregateID: string;
5081
4906
  readonly seq: number & import("effect/Brand").Brand<"Event.Seq">;
@@ -5083,35 +4908,51 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
5083
4908
  };
5084
4909
  readonly data: {
5085
4910
  readonly inputID: string & import("effect/Brand").Brand<"Session.Message.ID">;
5086
- readonly prompt: {
5087
- readonly text: string;
5088
- readonly files?: readonly {
5089
- readonly data: string;
5090
- readonly mime: string;
5091
- readonly source: {
5092
- readonly type: "inline";
5093
- } | {
5094
- readonly type: "uri";
5095
- readonly uri: string;
5096
- };
5097
- readonly name?: string | undefined;
5098
- readonly description?: string | undefined;
5099
- readonly mention?: {
5100
- readonly start: number;
5101
- readonly end: number;
5102
- readonly text: string;
4911
+ readonly input: {
4912
+ readonly type: "user";
4913
+ readonly data: {
4914
+ readonly text: string;
4915
+ readonly metadata?: {
4916
+ readonly [x: string]: unknown;
5103
4917
  } | undefined;
5104
- }[] | undefined;
5105
- readonly agents?: readonly {
5106
- readonly name: string;
5107
- readonly mention?: {
5108
- readonly start: number;
5109
- readonly end: number;
5110
- readonly text: string;
4918
+ readonly files?: readonly {
4919
+ readonly data: string;
4920
+ readonly mime: string;
4921
+ readonly source: {
4922
+ readonly type: "inline";
4923
+ } | {
4924
+ readonly type: "uri";
4925
+ readonly uri: string;
4926
+ };
4927
+ readonly name?: string | undefined;
4928
+ readonly description?: string | undefined;
4929
+ readonly mention?: {
4930
+ readonly start: number;
4931
+ readonly end: number;
4932
+ readonly text: string;
4933
+ } | undefined;
4934
+ }[] | undefined;
4935
+ readonly agents?: readonly {
4936
+ readonly name: string;
4937
+ readonly mention?: {
4938
+ readonly start: number;
4939
+ readonly end: number;
4940
+ readonly text: string;
4941
+ } | undefined;
4942
+ }[] | undefined;
4943
+ };
4944
+ readonly delivery: "steer" | "queue";
4945
+ } | {
4946
+ readonly type: "synthetic";
4947
+ readonly data: {
4948
+ readonly text: string;
4949
+ readonly description?: string | undefined;
4950
+ readonly metadata?: {
4951
+ readonly [x: string]: unknown;
5111
4952
  } | undefined;
5112
- }[] | undefined;
4953
+ };
4954
+ readonly delivery: "steer" | "queue";
5113
4955
  };
5114
- readonly delivery: "steer" | "queue";
5115
4956
  readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
5116
4957
  };
5117
4958
  readonly metadata?: {