@spectrum-ts/core 12.2.0 → 12.3.0

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.
@@ -592,6 +592,23 @@ interface Message<TPlatform extends string = string, TSender extends User = User
592
592
  declare const editSchema: z.ZodObject<{
593
593
  type: z.ZodLiteral<"edit">;
594
594
  content: z.ZodCustom<{
595
+ type: "attachment";
596
+ id: string;
597
+ name: string;
598
+ mimeType: string;
599
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
600
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
601
+ size?: number | undefined;
602
+ } | {
603
+ type: "text";
604
+ text: string;
605
+ } | {
606
+ type: "markdown";
607
+ markdown: string;
608
+ } | {
609
+ type: "group";
610
+ items: Message<string, User, Space<unknown>>[];
611
+ } | {
595
612
  type: "contact";
596
613
  user?: {
597
614
  __platform: string;
@@ -634,50 +651,9 @@ declare const editSchema: z.ZodObject<{
634
651
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
635
652
  } | undefined;
636
653
  raw?: unknown;
637
- } | {
638
- type: "attachment";
639
- id: string;
640
- name: string;
641
- mimeType: string;
642
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
643
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
644
- size?: number | undefined;
645
- } | {
646
- type: "group";
647
- items: Message<string, User, Space<unknown>>[];
648
654
  } | {
649
655
  type: "custom";
650
656
  raw: unknown;
651
- } | {
652
- type: "text";
653
- text: string;
654
- } | {
655
- type: "markdown";
656
- markdown: string;
657
- } | {
658
- type: "reaction";
659
- emoji: string;
660
- target: Message<string, User, Space<unknown>>;
661
- } | {
662
- type: "poll";
663
- title: string;
664
- options: {
665
- title: string;
666
- }[];
667
- } | {
668
- type: "poll_option";
669
- option: {
670
- title: string;
671
- };
672
- poll: {
673
- type: "poll";
674
- title: string;
675
- options: {
676
- title: string;
677
- }[];
678
- };
679
- selected: boolean;
680
- title: string;
681
657
  } | {
682
658
  type: "streamText";
683
659
  stream: () => AsyncIterable<string>;
@@ -708,6 +684,30 @@ declare const editSchema: z.ZodObject<{
708
684
  summary: z.ZodOptional<z.ZodString>;
709
685
  }, z.core.$strip>>>;
710
686
  live?: boolean | undefined;
687
+ } | {
688
+ type: "reaction";
689
+ emoji: string;
690
+ target: Message<string, User, Space<unknown>>;
691
+ } | {
692
+ type: "poll";
693
+ title: string;
694
+ options: {
695
+ title: string;
696
+ }[];
697
+ } | {
698
+ type: "poll_option";
699
+ option: {
700
+ title: string;
701
+ };
702
+ poll: {
703
+ type: "poll";
704
+ title: string;
705
+ options: {
706
+ title: string;
707
+ }[];
708
+ };
709
+ selected: boolean;
710
+ title: string;
711
711
  } | {
712
712
  type: "effect";
713
713
  content: {
@@ -750,6 +750,23 @@ declare const editSchema: z.ZodObject<{
750
750
  } | {
751
751
  type: "leaveSpace";
752
752
  }, {
753
+ type: "attachment";
754
+ id: string;
755
+ name: string;
756
+ mimeType: string;
757
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
758
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
759
+ size?: number | undefined;
760
+ } | {
761
+ type: "text";
762
+ text: string;
763
+ } | {
764
+ type: "markdown";
765
+ markdown: string;
766
+ } | {
767
+ type: "group";
768
+ items: Message<string, User, Space<unknown>>[];
769
+ } | {
753
770
  type: "contact";
754
771
  user?: {
755
772
  __platform: string;
@@ -792,50 +809,9 @@ declare const editSchema: z.ZodObject<{
792
809
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
793
810
  } | undefined;
794
811
  raw?: unknown;
795
- } | {
796
- type: "attachment";
797
- id: string;
798
- name: string;
799
- mimeType: string;
800
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
801
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
802
- size?: number | undefined;
803
- } | {
804
- type: "group";
805
- items: Message<string, User, Space<unknown>>[];
806
812
  } | {
807
813
  type: "custom";
808
814
  raw: unknown;
809
- } | {
810
- type: "text";
811
- text: string;
812
- } | {
813
- type: "markdown";
814
- markdown: string;
815
- } | {
816
- type: "reaction";
817
- emoji: string;
818
- target: Message<string, User, Space<unknown>>;
819
- } | {
820
- type: "poll";
821
- title: string;
822
- options: {
823
- title: string;
824
- }[];
825
- } | {
826
- type: "poll_option";
827
- option: {
828
- title: string;
829
- };
830
- poll: {
831
- type: "poll";
832
- title: string;
833
- options: {
834
- title: string;
835
- }[];
836
- };
837
- selected: boolean;
838
- title: string;
839
815
  } | {
840
816
  type: "streamText";
841
817
  stream: () => AsyncIterable<string>;
@@ -866,6 +842,30 @@ declare const editSchema: z.ZodObject<{
866
842
  summary: z.ZodOptional<z.ZodString>;
867
843
  }, z.core.$strip>>>;
868
844
  live?: boolean | undefined;
845
+ } | {
846
+ type: "reaction";
847
+ emoji: string;
848
+ target: Message<string, User, Space<unknown>>;
849
+ } | {
850
+ type: "poll";
851
+ title: string;
852
+ options: {
853
+ title: string;
854
+ }[];
855
+ } | {
856
+ type: "poll_option";
857
+ option: {
858
+ title: string;
859
+ };
860
+ poll: {
861
+ type: "poll";
862
+ title: string;
863
+ options: {
864
+ title: string;
865
+ }[];
866
+ };
867
+ selected: boolean;
868
+ title: string;
869
869
  } | {
870
870
  type: "effect";
871
871
  content: {
@@ -1138,6 +1138,23 @@ declare function rename(displayName: string): ContentBuilder;
1138
1138
  declare const replySchema: z.ZodObject<{
1139
1139
  type: z.ZodLiteral<"reply">;
1140
1140
  content: z.ZodCustom<{
1141
+ type: "attachment";
1142
+ id: string;
1143
+ name: string;
1144
+ mimeType: string;
1145
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1146
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1147
+ size?: number | undefined;
1148
+ } | {
1149
+ type: "text";
1150
+ text: string;
1151
+ } | {
1152
+ type: "markdown";
1153
+ markdown: string;
1154
+ } | {
1155
+ type: "group";
1156
+ items: Message<string, User, Space<unknown>>[];
1157
+ } | {
1141
1158
  type: "contact";
1142
1159
  user?: {
1143
1160
  __platform: string;
@@ -1180,50 +1197,9 @@ declare const replySchema: z.ZodObject<{
1180
1197
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1181
1198
  } | undefined;
1182
1199
  raw?: unknown;
1183
- } | {
1184
- type: "attachment";
1185
- id: string;
1186
- name: string;
1187
- mimeType: string;
1188
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1189
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1190
- size?: number | undefined;
1191
- } | {
1192
- type: "group";
1193
- items: Message<string, User, Space<unknown>>[];
1194
1200
  } | {
1195
1201
  type: "custom";
1196
1202
  raw: unknown;
1197
- } | {
1198
- type: "text";
1199
- text: string;
1200
- } | {
1201
- type: "markdown";
1202
- markdown: string;
1203
- } | {
1204
- type: "reaction";
1205
- emoji: string;
1206
- target: Message<string, User, Space<unknown>>;
1207
- } | {
1208
- type: "poll";
1209
- title: string;
1210
- options: {
1211
- title: string;
1212
- }[];
1213
- } | {
1214
- type: "poll_option";
1215
- option: {
1216
- title: string;
1217
- };
1218
- poll: {
1219
- type: "poll";
1220
- title: string;
1221
- options: {
1222
- title: string;
1223
- }[];
1224
- };
1225
- selected: boolean;
1226
- title: string;
1227
1203
  } | {
1228
1204
  type: "streamText";
1229
1205
  stream: () => AsyncIterable<string>;
@@ -1254,6 +1230,30 @@ declare const replySchema: z.ZodObject<{
1254
1230
  summary: z.ZodOptional<z.ZodString>;
1255
1231
  }, z.core.$strip>>>;
1256
1232
  live?: boolean | undefined;
1233
+ } | {
1234
+ type: "reaction";
1235
+ emoji: string;
1236
+ target: Message<string, User, Space<unknown>>;
1237
+ } | {
1238
+ type: "poll";
1239
+ title: string;
1240
+ options: {
1241
+ title: string;
1242
+ }[];
1243
+ } | {
1244
+ type: "poll_option";
1245
+ option: {
1246
+ title: string;
1247
+ };
1248
+ poll: {
1249
+ type: "poll";
1250
+ title: string;
1251
+ options: {
1252
+ title: string;
1253
+ }[];
1254
+ };
1255
+ selected: boolean;
1256
+ title: string;
1257
1257
  } | {
1258
1258
  type: "effect";
1259
1259
  content: {
@@ -1296,16 +1296,33 @@ declare const replySchema: z.ZodObject<{
1296
1296
  } | {
1297
1297
  type: "leaveSpace";
1298
1298
  }, {
1299
- type: "contact";
1300
- user?: {
1301
- __platform: string;
1302
- id: string;
1303
- } | undefined;
1304
- name?: {
1305
- formatted?: string | undefined;
1306
- first?: string | undefined;
1307
- last?: string | undefined;
1308
- middle?: string | undefined;
1299
+ type: "attachment";
1300
+ id: string;
1301
+ name: string;
1302
+ mimeType: string;
1303
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1304
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1305
+ size?: number | undefined;
1306
+ } | {
1307
+ type: "text";
1308
+ text: string;
1309
+ } | {
1310
+ type: "markdown";
1311
+ markdown: string;
1312
+ } | {
1313
+ type: "group";
1314
+ items: Message<string, User, Space<unknown>>[];
1315
+ } | {
1316
+ type: "contact";
1317
+ user?: {
1318
+ __platform: string;
1319
+ id: string;
1320
+ } | undefined;
1321
+ name?: {
1322
+ formatted?: string | undefined;
1323
+ first?: string | undefined;
1324
+ last?: string | undefined;
1325
+ middle?: string | undefined;
1309
1326
  prefix?: string | undefined;
1310
1327
  suffix?: string | undefined;
1311
1328
  } | undefined;
@@ -1338,50 +1355,9 @@ declare const replySchema: z.ZodObject<{
1338
1355
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1339
1356
  } | undefined;
1340
1357
  raw?: unknown;
1341
- } | {
1342
- type: "attachment";
1343
- id: string;
1344
- name: string;
1345
- mimeType: string;
1346
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1347
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1348
- size?: number | undefined;
1349
- } | {
1350
- type: "group";
1351
- items: Message<string, User, Space<unknown>>[];
1352
1358
  } | {
1353
1359
  type: "custom";
1354
1360
  raw: unknown;
1355
- } | {
1356
- type: "text";
1357
- text: string;
1358
- } | {
1359
- type: "markdown";
1360
- markdown: string;
1361
- } | {
1362
- type: "reaction";
1363
- emoji: string;
1364
- target: Message<string, User, Space<unknown>>;
1365
- } | {
1366
- type: "poll";
1367
- title: string;
1368
- options: {
1369
- title: string;
1370
- }[];
1371
- } | {
1372
- type: "poll_option";
1373
- option: {
1374
- title: string;
1375
- };
1376
- poll: {
1377
- type: "poll";
1378
- title: string;
1379
- options: {
1380
- title: string;
1381
- }[];
1382
- };
1383
- selected: boolean;
1384
- title: string;
1385
1361
  } | {
1386
1362
  type: "streamText";
1387
1363
  stream: () => AsyncIterable<string>;
@@ -1412,6 +1388,30 @@ declare const replySchema: z.ZodObject<{
1412
1388
  summary: z.ZodOptional<z.ZodString>;
1413
1389
  }, z.core.$strip>>>;
1414
1390
  live?: boolean | undefined;
1391
+ } | {
1392
+ type: "reaction";
1393
+ emoji: string;
1394
+ target: Message<string, User, Space<unknown>>;
1395
+ } | {
1396
+ type: "poll";
1397
+ title: string;
1398
+ options: {
1399
+ title: string;
1400
+ }[];
1401
+ } | {
1402
+ type: "poll_option";
1403
+ option: {
1404
+ title: string;
1405
+ };
1406
+ poll: {
1407
+ type: "poll";
1408
+ title: string;
1409
+ options: {
1410
+ title: string;
1411
+ }[];
1412
+ };
1413
+ selected: boolean;
1414
+ title: string;
1415
1415
  } | {
1416
1416
  type: "effect";
1417
1417
  content: {
@@ -6874,10 +6874,10 @@ interface SpectrumOptions {
6874
6874
  flattenGroups?: boolean;
6875
6875
  /**
6876
6876
  * Minimum severity emitted by the SDK's structured logger (to both the
6877
- * console and, when telemetry is on, OTLP). Applies process-wide. The
6878
- * `LOG_LEVEL` environment variable still takes precedence.
6877
+ * console and, when telemetry is on, OTLP). Applies process-wide and takes
6878
+ * precedence over the `LOG_LEVEL` environment variable when provided.
6879
6879
  *
6880
- * @default "debug" in development, "info" otherwise (via `DEPLOYMENT_ENV`)
6880
+ * @default "info"
6881
6881
  */
6882
6882
  logLevel?: LogLevel;
6883
6883
  }
@@ -7283,6 +7283,23 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7283
7283
  }, z.core.$strip>, z.ZodObject<{
7284
7284
  type: z.ZodLiteral<"reply">;
7285
7285
  content: z.ZodCustom<{
7286
+ type: "attachment";
7287
+ id: string;
7288
+ name: string;
7289
+ mimeType: string;
7290
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7291
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7292
+ size?: number | undefined;
7293
+ } | {
7294
+ type: "text";
7295
+ text: string;
7296
+ } | {
7297
+ type: "markdown";
7298
+ markdown: string;
7299
+ } | {
7300
+ type: "group";
7301
+ items: Message<string, User, Space<unknown>>[];
7302
+ } | {
7286
7303
  type: "contact";
7287
7304
  user?: {
7288
7305
  __platform: string;
@@ -7325,50 +7342,9 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7325
7342
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7326
7343
  } | undefined;
7327
7344
  raw?: unknown;
7328
- } | {
7329
- type: "attachment";
7330
- id: string;
7331
- name: string;
7332
- mimeType: string;
7333
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7334
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7335
- size?: number | undefined;
7336
- } | {
7337
- type: "group";
7338
- items: Message<string, User, Space<unknown>>[];
7339
7345
  } | {
7340
7346
  type: "custom";
7341
7347
  raw: unknown;
7342
- } | {
7343
- type: "text";
7344
- text: string;
7345
- } | {
7346
- type: "markdown";
7347
- markdown: string;
7348
- } | {
7349
- type: "reaction";
7350
- emoji: string;
7351
- target: Message<string, User, Space<unknown>>;
7352
- } | {
7353
- type: "poll";
7354
- title: string;
7355
- options: {
7356
- title: string;
7357
- }[];
7358
- } | {
7359
- type: "poll_option";
7360
- option: {
7361
- title: string;
7362
- };
7363
- poll: {
7364
- type: "poll";
7365
- title: string;
7366
- options: {
7367
- title: string;
7368
- }[];
7369
- };
7370
- selected: boolean;
7371
- title: string;
7372
7348
  } | {
7373
7349
  type: "streamText";
7374
7350
  stream: () => AsyncIterable<string>;
@@ -7399,6 +7375,30 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7399
7375
  summary: z.ZodOptional<z.ZodString>;
7400
7376
  }, z.core.$strip>>>;
7401
7377
  live?: boolean | undefined;
7378
+ } | {
7379
+ type: "reaction";
7380
+ emoji: string;
7381
+ target: Message<string, User, Space<unknown>>;
7382
+ } | {
7383
+ type: "poll";
7384
+ title: string;
7385
+ options: {
7386
+ title: string;
7387
+ }[];
7388
+ } | {
7389
+ type: "poll_option";
7390
+ option: {
7391
+ title: string;
7392
+ };
7393
+ poll: {
7394
+ type: "poll";
7395
+ title: string;
7396
+ options: {
7397
+ title: string;
7398
+ }[];
7399
+ };
7400
+ selected: boolean;
7401
+ title: string;
7402
7402
  } | {
7403
7403
  type: "effect";
7404
7404
  content: {
@@ -7441,6 +7441,23 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7441
7441
  } | {
7442
7442
  type: "leaveSpace";
7443
7443
  }, {
7444
+ type: "attachment";
7445
+ id: string;
7446
+ name: string;
7447
+ mimeType: string;
7448
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7449
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7450
+ size?: number | undefined;
7451
+ } | {
7452
+ type: "text";
7453
+ text: string;
7454
+ } | {
7455
+ type: "markdown";
7456
+ markdown: string;
7457
+ } | {
7458
+ type: "group";
7459
+ items: Message<string, User, Space<unknown>>[];
7460
+ } | {
7444
7461
  type: "contact";
7445
7462
  user?: {
7446
7463
  __platform: string;
@@ -7483,50 +7500,9 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7483
7500
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7484
7501
  } | undefined;
7485
7502
  raw?: unknown;
7486
- } | {
7487
- type: "attachment";
7488
- id: string;
7489
- name: string;
7490
- mimeType: string;
7491
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7492
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7493
- size?: number | undefined;
7494
- } | {
7495
- type: "group";
7496
- items: Message<string, User, Space<unknown>>[];
7497
7503
  } | {
7498
7504
  type: "custom";
7499
7505
  raw: unknown;
7500
- } | {
7501
- type: "text";
7502
- text: string;
7503
- } | {
7504
- type: "markdown";
7505
- markdown: string;
7506
- } | {
7507
- type: "reaction";
7508
- emoji: string;
7509
- target: Message<string, User, Space<unknown>>;
7510
- } | {
7511
- type: "poll";
7512
- title: string;
7513
- options: {
7514
- title: string;
7515
- }[];
7516
- } | {
7517
- type: "poll_option";
7518
- option: {
7519
- title: string;
7520
- };
7521
- poll: {
7522
- type: "poll";
7523
- title: string;
7524
- options: {
7525
- title: string;
7526
- }[];
7527
- };
7528
- selected: boolean;
7529
- title: string;
7530
7506
  } | {
7531
7507
  type: "streamText";
7532
7508
  stream: () => AsyncIterable<string>;
@@ -7557,6 +7533,30 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7557
7533
  summary: z.ZodOptional<z.ZodString>;
7558
7534
  }, z.core.$strip>>>;
7559
7535
  live?: boolean | undefined;
7536
+ } | {
7537
+ type: "reaction";
7538
+ emoji: string;
7539
+ target: Message<string, User, Space<unknown>>;
7540
+ } | {
7541
+ type: "poll";
7542
+ title: string;
7543
+ options: {
7544
+ title: string;
7545
+ }[];
7546
+ } | {
7547
+ type: "poll_option";
7548
+ option: {
7549
+ title: string;
7550
+ };
7551
+ poll: {
7552
+ type: "poll";
7553
+ title: string;
7554
+ options: {
7555
+ title: string;
7556
+ }[];
7557
+ };
7558
+ selected: boolean;
7559
+ title: string;
7560
7560
  } | {
7561
7561
  type: "effect";
7562
7562
  content: {
@@ -7603,6 +7603,23 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7603
7603
  }, z.core.$strip>, z.ZodObject<{
7604
7604
  type: z.ZodLiteral<"edit">;
7605
7605
  content: z.ZodCustom<{
7606
+ type: "attachment";
7607
+ id: string;
7608
+ name: string;
7609
+ mimeType: string;
7610
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7611
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7612
+ size?: number | undefined;
7613
+ } | {
7614
+ type: "text";
7615
+ text: string;
7616
+ } | {
7617
+ type: "markdown";
7618
+ markdown: string;
7619
+ } | {
7620
+ type: "group";
7621
+ items: Message<string, User, Space<unknown>>[];
7622
+ } | {
7606
7623
  type: "contact";
7607
7624
  user?: {
7608
7625
  __platform: string;
@@ -7645,50 +7662,9 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7645
7662
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7646
7663
  } | undefined;
7647
7664
  raw?: unknown;
7648
- } | {
7649
- type: "attachment";
7650
- id: string;
7651
- name: string;
7652
- mimeType: string;
7653
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7654
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7655
- size?: number | undefined;
7656
- } | {
7657
- type: "group";
7658
- items: Message<string, User, Space<unknown>>[];
7659
7665
  } | {
7660
7666
  type: "custom";
7661
7667
  raw: unknown;
7662
- } | {
7663
- type: "text";
7664
- text: string;
7665
- } | {
7666
- type: "markdown";
7667
- markdown: string;
7668
- } | {
7669
- type: "reaction";
7670
- emoji: string;
7671
- target: Message<string, User, Space<unknown>>;
7672
- } | {
7673
- type: "poll";
7674
- title: string;
7675
- options: {
7676
- title: string;
7677
- }[];
7678
- } | {
7679
- type: "poll_option";
7680
- option: {
7681
- title: string;
7682
- };
7683
- poll: {
7684
- type: "poll";
7685
- title: string;
7686
- options: {
7687
- title: string;
7688
- }[];
7689
- };
7690
- selected: boolean;
7691
- title: string;
7692
7668
  } | {
7693
7669
  type: "streamText";
7694
7670
  stream: () => AsyncIterable<string>;
@@ -7719,6 +7695,30 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7719
7695
  summary: z.ZodOptional<z.ZodString>;
7720
7696
  }, z.core.$strip>>>;
7721
7697
  live?: boolean | undefined;
7698
+ } | {
7699
+ type: "reaction";
7700
+ emoji: string;
7701
+ target: Message<string, User, Space<unknown>>;
7702
+ } | {
7703
+ type: "poll";
7704
+ title: string;
7705
+ options: {
7706
+ title: string;
7707
+ }[];
7708
+ } | {
7709
+ type: "poll_option";
7710
+ option: {
7711
+ title: string;
7712
+ };
7713
+ poll: {
7714
+ type: "poll";
7715
+ title: string;
7716
+ options: {
7717
+ title: string;
7718
+ }[];
7719
+ };
7720
+ selected: boolean;
7721
+ title: string;
7722
7722
  } | {
7723
7723
  type: "effect";
7724
7724
  content: {
@@ -7761,6 +7761,23 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7761
7761
  } | {
7762
7762
  type: "leaveSpace";
7763
7763
  }, {
7764
+ type: "attachment";
7765
+ id: string;
7766
+ name: string;
7767
+ mimeType: string;
7768
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7769
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7770
+ size?: number | undefined;
7771
+ } | {
7772
+ type: "text";
7773
+ text: string;
7774
+ } | {
7775
+ type: "markdown";
7776
+ markdown: string;
7777
+ } | {
7778
+ type: "group";
7779
+ items: Message<string, User, Space<unknown>>[];
7780
+ } | {
7764
7781
  type: "contact";
7765
7782
  user?: {
7766
7783
  __platform: string;
@@ -7803,50 +7820,9 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7803
7820
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7804
7821
  } | undefined;
7805
7822
  raw?: unknown;
7806
- } | {
7807
- type: "attachment";
7808
- id: string;
7809
- name: string;
7810
- mimeType: string;
7811
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7812
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7813
- size?: number | undefined;
7814
- } | {
7815
- type: "group";
7816
- items: Message<string, User, Space<unknown>>[];
7817
7823
  } | {
7818
7824
  type: "custom";
7819
7825
  raw: unknown;
7820
- } | {
7821
- type: "text";
7822
- text: string;
7823
- } | {
7824
- type: "markdown";
7825
- markdown: string;
7826
- } | {
7827
- type: "reaction";
7828
- emoji: string;
7829
- target: Message<string, User, Space<unknown>>;
7830
- } | {
7831
- type: "poll";
7832
- title: string;
7833
- options: {
7834
- title: string;
7835
- }[];
7836
- } | {
7837
- type: "poll_option";
7838
- option: {
7839
- title: string;
7840
- };
7841
- poll: {
7842
- type: "poll";
7843
- title: string;
7844
- options: {
7845
- title: string;
7846
- }[];
7847
- };
7848
- selected: boolean;
7849
- title: string;
7850
7826
  } | {
7851
7827
  type: "streamText";
7852
7828
  stream: () => AsyncIterable<string>;
@@ -7877,6 +7853,30 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7877
7853
  summary: z.ZodOptional<z.ZodString>;
7878
7854
  }, z.core.$strip>>>;
7879
7855
  live?: boolean | undefined;
7856
+ } | {
7857
+ type: "reaction";
7858
+ emoji: string;
7859
+ target: Message<string, User, Space<unknown>>;
7860
+ } | {
7861
+ type: "poll";
7862
+ title: string;
7863
+ options: {
7864
+ title: string;
7865
+ }[];
7866
+ } | {
7867
+ type: "poll_option";
7868
+ option: {
7869
+ title: string;
7870
+ };
7871
+ poll: {
7872
+ type: "poll";
7873
+ title: string;
7874
+ options: {
7875
+ title: string;
7876
+ }[];
7877
+ };
7878
+ selected: boolean;
7879
+ title: string;
7880
7880
  } | {
7881
7881
  type: "effect";
7882
7882
  content: {
@@ -1,4 +1,4 @@
1
- import { Cn as reactionSchema, Dt as asRichlink, Gn as photoActionSchema, Gt as asPollOption, H as ProviderMessageRecord, Hn as avatarSchema, It as renameSchema, Nt as replySchema, Pn as asContact, Rt as asRead, U as ProviderUserRecord, Un as PhotoInput, Wn as buildPhotoAction, Wt as asPoll, Yt as asMarkdown, _t as asVoice, bt as asUnsend, gn as leaveSpaceSchema, in as groupSchema, jt as asReply, mn as addMemberSchema, nn as asGroup, q as ManagedStream, r as asAttachment, vn as removeMemberSchema, wn as asCustom, wt as asText, xn as asReaction } from "./attachment-Wgb7-di3.js";
1
+ import { Cn as reactionSchema, Dt as asRichlink, Gn as photoActionSchema, Gt as asPollOption, H as ProviderMessageRecord, Hn as avatarSchema, It as renameSchema, Nt as replySchema, Pn as asContact, Rt as asRead, U as ProviderUserRecord, Un as PhotoInput, Wn as buildPhotoAction, Wt as asPoll, Yt as asMarkdown, _t as asVoice, bt as asUnsend, gn as leaveSpaceSchema, in as groupSchema, jt as asReply, mn as addMemberSchema, nn as asGroup, q as ManagedStream, r as asAttachment, vn as removeMemberSchema, wn as asCustom, wt as asText, xn as asReaction } from "./attachment-X4ELx4B2.js";
2
2
  import z from "zod";
3
3
  import { FetchSpanOptions, LogAttrs, LogAttrs as LogAttrs$1, LogLevel, PhotonLogger, SanitizeUrlOptions, createLogger, sanitizeEmail, sanitizeErrorMessage, sanitizePhone, sanitizeUrl, setLogLevel } from "@photon-ai/otel";
4
4
  import { Token } from "marked";
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as DedicatedTokenData, $t as StreamTextSource, A as isFusorEvent, An as ContactInput, At as Reply, B as PlatformUser, Bn as AvatarInput, Bt as Poll, C as FusorVerify, Ct as typing, D as WebhookRawResult, Dn as ContactAddress, E as WebhookRawRequest, En as Contact, Et as Richlink, F as PlatformInstance, Fn as contact, Ft as rename, G as SpaceNamespace, Ht as PollChoiceInput, I as PlatformMessage, In as AgentSender, J as broadcast, Jn as AppOptions, Jt as Markdown, K as Broadcaster, Kn as App, Kt as option, L as PlatformProviderConfig, Ln as User, Lt as Read, M as EventProducer, Mn as ContactOrg, Mt as reply, N as Platform, Nn as ContactPhone, O as FusorEvent, On as ContactDetails, Ot as richlink, P as PlatformDef, Pt as Rename, Q as CloudPlatform, Qt as StreamText, R as PlatformRuntime, Rn as Avatar, S as FusorRespond, Sn as reaction, St as Typing, T as WebhookHandler, Tn as custom, Tt as text, Ut as PollOption, V as ProviderMessage, Vn as avatar, Vt as PollChoice, W as SchemaMessage, X as stream, Xn as app, Xt as markdown, Y as mergeStreams, Yn as AppUrl, Z as Store, Zn as appLayoutSchema, Zt as DeltaExtractor, _ as FusorClient, _n as removeMember, a as Content, an as Edit, at as ProjectProfile, b as FusorMessagesReturn, bn as ReactionBuilder, c as fromVCard, cn as Space, ct as SlackTokenData, d as UnsupportedKind, dn as MemberInput, dt as SubscriptionStatus, en as TextStreamOptions, et as FusorTokenData, f as Spectrum, fn as RemoveMember, ft as TokenData, g as isFusorClient, gt as Voice, h as fusor, hn as leaveSpace, ht as EmojiKey, i as attachment, it as ProjectData, j as AnyPlatformDef, jn as ContactName, k as fusorEvent, kn as ContactEmail, kt as resolveContents, l as toVCard, ln as AddMember, lt as SpectrumCloudError, m as definePlatform, mt as Emoji, n as AttachmentInput, nt as PlatformStatus, o as ContentBuilder, on as edit, ot as SharedTokenData, p as SpectrumInstance, pn as addMember, pt as cloud, q as ManagedStream, qn as AppLayout, qt as poll, rn as group, rt as PlatformsData, s as ContentInput, sn as Message, st as SlackTeamMeta, t as Attachment, tn as Group, tt as ImessageInfoData, u as UnsupportedError, un as LeaveSpace, ut as SubscriptionData, v as FusorMessages, vt as voice, w as FusorVerifyRequest, x as FusorReply, xt as unsend, y as FusorMessagesCtx, yn as Reaction, yt as Unsend, z as PlatformSpace, zn as AvatarData, zt as read } from "./attachment-Wgb7-di3.js";
1
+ import { $ as DedicatedTokenData, $t as StreamTextSource, A as isFusorEvent, An as ContactInput, At as Reply, B as PlatformUser, Bn as AvatarInput, Bt as Poll, C as FusorVerify, Ct as typing, D as WebhookRawResult, Dn as ContactAddress, E as WebhookRawRequest, En as Contact, Et as Richlink, F as PlatformInstance, Fn as contact, Ft as rename, G as SpaceNamespace, Ht as PollChoiceInput, I as PlatformMessage, In as AgentSender, J as broadcast, Jn as AppOptions, Jt as Markdown, K as Broadcaster, Kn as App, Kt as option, L as PlatformProviderConfig, Ln as User, Lt as Read, M as EventProducer, Mn as ContactOrg, Mt as reply, N as Platform, Nn as ContactPhone, O as FusorEvent, On as ContactDetails, Ot as richlink, P as PlatformDef, Pt as Rename, Q as CloudPlatform, Qt as StreamText, R as PlatformRuntime, Rn as Avatar, S as FusorRespond, Sn as reaction, St as Typing, T as WebhookHandler, Tn as custom, Tt as text, Ut as PollOption, V as ProviderMessage, Vn as avatar, Vt as PollChoice, W as SchemaMessage, X as stream, Xn as app, Xt as markdown, Y as mergeStreams, Yn as AppUrl, Z as Store, Zn as appLayoutSchema, Zt as DeltaExtractor, _ as FusorClient, _n as removeMember, a as Content, an as Edit, at as ProjectProfile, b as FusorMessagesReturn, bn as ReactionBuilder, c as fromVCard, cn as Space, ct as SlackTokenData, d as UnsupportedKind, dn as MemberInput, dt as SubscriptionStatus, en as TextStreamOptions, et as FusorTokenData, f as Spectrum, fn as RemoveMember, ft as TokenData, g as isFusorClient, gt as Voice, h as fusor, hn as leaveSpace, ht as EmojiKey, i as attachment, it as ProjectData, j as AnyPlatformDef, jn as ContactName, k as fusorEvent, kn as ContactEmail, kt as resolveContents, l as toVCard, ln as AddMember, lt as SpectrumCloudError, m as definePlatform, mt as Emoji, n as AttachmentInput, nt as PlatformStatus, o as ContentBuilder, on as edit, ot as SharedTokenData, p as SpectrumInstance, pn as addMember, pt as cloud, q as ManagedStream, qn as AppLayout, qt as poll, rn as group, rt as PlatformsData, s as ContentInput, sn as Message, st as SlackTeamMeta, t as Attachment, tn as Group, tt as ImessageInfoData, u as UnsupportedError, un as LeaveSpace, ut as SubscriptionData, v as FusorMessages, vt as voice, w as FusorVerifyRequest, x as FusorReply, xt as unsend, y as FusorMessagesCtx, yn as Reaction, yt as Unsend, z as PlatformSpace, zn as AvatarData, zt as read } from "./attachment-X4ELx4B2.js";
2
2
  export { type AddMember, type AgentSender, type AnyPlatformDef, type App, type AppLayout, type AppOptions, type AppUrl, type Attachment, type AttachmentInput, type Avatar, type AvatarData, type AvatarInput, type Broadcaster, type CloudPlatform, type Contact, type ContactAddress, type ContactDetails, type ContactEmail, type ContactInput, type ContactName, type ContactOrg, type ContactPhone, type Content, type ContentBuilder, type ContentInput, type DedicatedTokenData, type DeltaExtractor, type Edit, Emoji, type EmojiKey, type EventProducer, type FusorClient, type FusorEvent, type FusorMessages, type FusorMessagesCtx, type FusorMessagesReturn, type FusorReply, type FusorRespond, type FusorTokenData, type FusorVerify, type FusorVerifyRequest, type Group, type ImessageInfoData, type LeaveSpace, type ManagedStream, type Markdown, type MemberInput, type Message, type Platform, type PlatformDef, type PlatformInstance, type PlatformMessage, type PlatformProviderConfig, type PlatformRuntime, type PlatformSpace, type PlatformStatus, type PlatformUser, type PlatformsData, type Poll, type PollChoice, type PollChoiceInput, type PollOption, type ProjectData, type ProjectProfile, type ProviderMessage, type Reaction, type ReactionBuilder, type Read, type RemoveMember, type Rename, type Reply, type Richlink, type SchemaMessage, type SharedTokenData, type SlackTeamMeta, type SlackTokenData, type Space, type SpaceNamespace, Spectrum, SpectrumCloudError, type SpectrumInstance, type Store, type StreamText, type StreamTextSource, type SubscriptionData, type SubscriptionStatus, type TextStreamOptions, type TokenData, type Typing, type Unsend, UnsupportedError, type UnsupportedKind, type User, type Voice, type WebhookHandler, type WebhookRawRequest, type WebhookRawResult, addMember, app, appLayoutSchema, attachment, avatar, broadcast, cloud, contact, custom, definePlatform, edit, fromVCard, fusor, fusorEvent, group, isFusorClient, isFusorEvent, leaveSpace, markdown, mergeStreams, option, poll, reaction, read, removeMember, rename, reply, resolveContents, richlink, stream, text, toVCard, typing, unsend, voice };
package/dist/index.js CHANGED
@@ -3011,7 +3011,7 @@ function definePlatform(platformId, rawDef) {
3011
3011
  }
3012
3012
  //#endregion
3013
3013
  //#region src/build-env.ts
3014
- const SPECTRUM_SDK_VERSION = "12.2.0";
3014
+ const SPECTRUM_SDK_VERSION = "12.3.0";
3015
3015
  //#endregion
3016
3016
  //#region src/utils/provider-packages.ts
3017
3017
  const OFFICIAL_PROVIDER_PACKAGES = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-ts/core",
3
- "version": "12.2.0",
3
+ "version": "12.3.0",
4
4
  "description": "The spectrum-ts runtime — Spectrum, content builders, fusor, and the provider authoring API.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,7 +32,7 @@
32
32
  "access": "public"
33
33
  },
34
34
  "dependencies": {
35
- "@photon-ai/otel": "^3.1.0",
35
+ "@photon-ai/otel": "^3.3.0",
36
36
  "@photon-ai/proto": "^0.2.4",
37
37
  "@repeaterjs/repeater": "^3.0.6",
38
38
  "marked": "^18.0.5",