@spectrum-ts/core 9.0.0 → 9.1.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.
@@ -426,6 +426,16 @@ interface Space<_Def = unknown> {
426
426
  * no implementation.
427
427
  */
428
428
  getAvatar(): Promise<AvatarData | undefined>;
429
+ /**
430
+ * Read the current chat's display name (group/chat title). Resolves
431
+ * `undefined` when the chat has none — an unnamed group, or a 1:1 chat on a
432
+ * platform that stores no title for DMs. Round-trips into `space.rename()`.
433
+ *
434
+ * Universal API; unlike `rename` the read is not group-only. Per-platform
435
+ * constraints (e.g. iMessage: remote only) surface as `UnsupportedError`, as
436
+ * do platforms with no implementation.
437
+ */
438
+ getDisplayName(): Promise<string | undefined>;
429
439
  /**
430
440
  * List the chat's current participants, excluding the agent's own account
431
441
  * where the platform can identify it. Each entry is a `User` tagged with
@@ -577,6 +587,12 @@ declare const editSchema: z.ZodObject<{
577
587
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
578
588
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
579
589
  size?: number | undefined;
590
+ } | {
591
+ type: "text";
592
+ text: string;
593
+ } | {
594
+ type: "markdown";
595
+ markdown: string;
580
596
  } | {
581
597
  type: "contact";
582
598
  user?: {
@@ -620,18 +636,9 @@ declare const editSchema: z.ZodObject<{
620
636
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
621
637
  } | undefined;
622
638
  raw?: unknown;
623
- } | {
624
- type: "text";
625
- text: string;
626
- } | {
627
- type: "markdown";
628
- markdown: string;
629
639
  } | {
630
640
  type: "custom";
631
641
  raw: unknown;
632
- } | {
633
- type: "group";
634
- items: Message<string, User, Space<unknown>>[];
635
642
  } | {
636
643
  type: "poll";
637
644
  title: string;
@@ -656,6 +663,9 @@ declare const editSchema: z.ZodObject<{
656
663
  type: "reaction";
657
664
  emoji: string;
658
665
  target: Message<string, User, Space<unknown>>;
666
+ } | {
667
+ type: "group";
668
+ items: Message<string, User, Space<unknown>>[];
659
669
  } | {
660
670
  type: "richlink";
661
671
  url: string;
@@ -733,6 +743,12 @@ declare const editSchema: z.ZodObject<{
733
743
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
734
744
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
735
745
  size?: number | undefined;
746
+ } | {
747
+ type: "text";
748
+ text: string;
749
+ } | {
750
+ type: "markdown";
751
+ markdown: string;
736
752
  } | {
737
753
  type: "contact";
738
754
  user?: {
@@ -776,18 +792,9 @@ declare const editSchema: z.ZodObject<{
776
792
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
777
793
  } | undefined;
778
794
  raw?: unknown;
779
- } | {
780
- type: "text";
781
- text: string;
782
- } | {
783
- type: "markdown";
784
- markdown: string;
785
795
  } | {
786
796
  type: "custom";
787
797
  raw: unknown;
788
- } | {
789
- type: "group";
790
- items: Message<string, User, Space<unknown>>[];
791
798
  } | {
792
799
  type: "poll";
793
800
  title: string;
@@ -812,6 +819,9 @@ declare const editSchema: z.ZodObject<{
812
819
  type: "reaction";
813
820
  emoji: string;
814
821
  target: Message<string, User, Space<unknown>>;
822
+ } | {
823
+ type: "group";
824
+ items: Message<string, User, Space<unknown>>[];
815
825
  } | {
816
826
  type: "richlink";
817
827
  url: string;
@@ -1119,6 +1129,12 @@ declare const replySchema: z.ZodObject<{
1119
1129
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1120
1130
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1121
1131
  size?: number | undefined;
1132
+ } | {
1133
+ type: "text";
1134
+ text: string;
1135
+ } | {
1136
+ type: "markdown";
1137
+ markdown: string;
1122
1138
  } | {
1123
1139
  type: "contact";
1124
1140
  user?: {
@@ -1162,18 +1178,9 @@ declare const replySchema: z.ZodObject<{
1162
1178
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1163
1179
  } | undefined;
1164
1180
  raw?: unknown;
1165
- } | {
1166
- type: "text";
1167
- text: string;
1168
- } | {
1169
- type: "markdown";
1170
- markdown: string;
1171
1181
  } | {
1172
1182
  type: "custom";
1173
1183
  raw: unknown;
1174
- } | {
1175
- type: "group";
1176
- items: Message<string, User, Space<unknown>>[];
1177
1184
  } | {
1178
1185
  type: "poll";
1179
1186
  title: string;
@@ -1198,6 +1205,9 @@ declare const replySchema: z.ZodObject<{
1198
1205
  type: "reaction";
1199
1206
  emoji: string;
1200
1207
  target: Message<string, User, Space<unknown>>;
1208
+ } | {
1209
+ type: "group";
1210
+ items: Message<string, User, Space<unknown>>[];
1201
1211
  } | {
1202
1212
  type: "richlink";
1203
1213
  url: string;
@@ -1275,6 +1285,12 @@ declare const replySchema: z.ZodObject<{
1275
1285
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1276
1286
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1277
1287
  size?: number | undefined;
1288
+ } | {
1289
+ type: "text";
1290
+ text: string;
1291
+ } | {
1292
+ type: "markdown";
1293
+ markdown: string;
1278
1294
  } | {
1279
1295
  type: "contact";
1280
1296
  user?: {
@@ -1318,18 +1334,9 @@ declare const replySchema: z.ZodObject<{
1318
1334
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1319
1335
  } | undefined;
1320
1336
  raw?: unknown;
1321
- } | {
1322
- type: "text";
1323
- text: string;
1324
- } | {
1325
- type: "markdown";
1326
- markdown: string;
1327
1337
  } | {
1328
1338
  type: "custom";
1329
1339
  raw: unknown;
1330
- } | {
1331
- type: "group";
1332
- items: Message<string, User, Space<unknown>>[];
1333
1340
  } | {
1334
1341
  type: "poll";
1335
1342
  title: string;
@@ -1354,6 +1361,9 @@ declare const replySchema: z.ZodObject<{
1354
1361
  type: "reaction";
1355
1362
  emoji: string;
1356
1363
  target: Message<string, User, Space<unknown>>;
1364
+ } | {
1365
+ type: "group";
1366
+ items: Message<string, User, Space<unknown>>[];
1357
1367
  } | {
1358
1368
  type: "richlink";
1359
1369
  url: string;
@@ -6224,6 +6234,14 @@ interface PlatformWiseActions<_ResolvedSpace extends {
6224
6234
  id: string;
6225
6235
  __platform: string;
6226
6236
  }) => Promise<AvatarData | undefined>;
6237
+ getDisplayName: (ctx: {
6238
+ client: _Client;
6239
+ config: _Config;
6240
+ store: Store;
6241
+ }, space: _ResolvedSpace & {
6242
+ id: string;
6243
+ __platform: string;
6244
+ }) => Promise<string | undefined>;
6227
6245
  getMembers: (ctx: {
6228
6246
  client: _Client;
6229
6247
  config: _Config;
@@ -6605,6 +6623,7 @@ type ReservedInstanceKeys<Def extends AnyPlatformDef> = "user" | "space" | "mess
6605
6623
  type InstanceActionMethods<Def extends AnyPlatformDef> = { [K in Exclude<keyof InstanceActionFns<Def>, ReservedInstanceKeys<Def> | symbol | number>]: (...args: TailArgs<Parameters<InstanceActionFns<Def>[K]>>) => ReturnType<InstanceActionFns<Def>[K]> };
6606
6624
  interface PlatformWiseInstanceMethods<Def extends AnyPlatformDef> {
6607
6625
  getAvatar: (space: PlatformSpace<Def>) => Promise<AvatarData | undefined>;
6626
+ getDisplayName: (space: PlatformSpace<Def>) => Promise<string | undefined>;
6608
6627
  getMembers: (space: PlatformSpace<Def>) => Promise<PlatformUser<Def>[]>;
6609
6628
  getMessage: (space: PlatformSpace<Def>, messageId: string) => Promise<PlatformMessage<Def> | undefined>;
6610
6629
  }
@@ -7243,6 +7262,12 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7243
7262
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7244
7263
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7245
7264
  size?: number | undefined;
7265
+ } | {
7266
+ type: "text";
7267
+ text: string;
7268
+ } | {
7269
+ type: "markdown";
7270
+ markdown: string;
7246
7271
  } | {
7247
7272
  type: "contact";
7248
7273
  user?: {
@@ -7286,18 +7311,9 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7286
7311
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7287
7312
  } | undefined;
7288
7313
  raw?: unknown;
7289
- } | {
7290
- type: "text";
7291
- text: string;
7292
- } | {
7293
- type: "markdown";
7294
- markdown: string;
7295
7314
  } | {
7296
7315
  type: "custom";
7297
7316
  raw: unknown;
7298
- } | {
7299
- type: "group";
7300
- items: Message<string, User, Space<unknown>>[];
7301
7317
  } | {
7302
7318
  type: "poll";
7303
7319
  title: string;
@@ -7322,6 +7338,9 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7322
7338
  type: "reaction";
7323
7339
  emoji: string;
7324
7340
  target: Message<string, User, Space<unknown>>;
7341
+ } | {
7342
+ type: "group";
7343
+ items: Message<string, User, Space<unknown>>[];
7325
7344
  } | {
7326
7345
  type: "richlink";
7327
7346
  url: string;
@@ -7399,6 +7418,12 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7399
7418
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7400
7419
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7401
7420
  size?: number | undefined;
7421
+ } | {
7422
+ type: "text";
7423
+ text: string;
7424
+ } | {
7425
+ type: "markdown";
7426
+ markdown: string;
7402
7427
  } | {
7403
7428
  type: "contact";
7404
7429
  user?: {
@@ -7442,18 +7467,9 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7442
7467
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7443
7468
  } | undefined;
7444
7469
  raw?: unknown;
7445
- } | {
7446
- type: "text";
7447
- text: string;
7448
- } | {
7449
- type: "markdown";
7450
- markdown: string;
7451
7470
  } | {
7452
7471
  type: "custom";
7453
7472
  raw: unknown;
7454
- } | {
7455
- type: "group";
7456
- items: Message<string, User, Space<unknown>>[];
7457
7473
  } | {
7458
7474
  type: "poll";
7459
7475
  title: string;
@@ -7478,6 +7494,9 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7478
7494
  type: "reaction";
7479
7495
  emoji: string;
7480
7496
  target: Message<string, User, Space<unknown>>;
7497
+ } | {
7498
+ type: "group";
7499
+ items: Message<string, User, Space<unknown>>[];
7481
7500
  } | {
7482
7501
  type: "richlink";
7483
7502
  url: string;
@@ -7559,6 +7578,12 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7559
7578
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7560
7579
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7561
7580
  size?: number | undefined;
7581
+ } | {
7582
+ type: "text";
7583
+ text: string;
7584
+ } | {
7585
+ type: "markdown";
7586
+ markdown: string;
7562
7587
  } | {
7563
7588
  type: "contact";
7564
7589
  user?: {
@@ -7602,18 +7627,9 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7602
7627
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7603
7628
  } | undefined;
7604
7629
  raw?: unknown;
7605
- } | {
7606
- type: "text";
7607
- text: string;
7608
- } | {
7609
- type: "markdown";
7610
- markdown: string;
7611
7630
  } | {
7612
7631
  type: "custom";
7613
7632
  raw: unknown;
7614
- } | {
7615
- type: "group";
7616
- items: Message<string, User, Space<unknown>>[];
7617
7633
  } | {
7618
7634
  type: "poll";
7619
7635
  title: string;
@@ -7638,6 +7654,9 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7638
7654
  type: "reaction";
7639
7655
  emoji: string;
7640
7656
  target: Message<string, User, Space<unknown>>;
7657
+ } | {
7658
+ type: "group";
7659
+ items: Message<string, User, Space<unknown>>[];
7641
7660
  } | {
7642
7661
  type: "richlink";
7643
7662
  url: string;
@@ -7715,6 +7734,12 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7715
7734
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7716
7735
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7717
7736
  size?: number | undefined;
7737
+ } | {
7738
+ type: "text";
7739
+ text: string;
7740
+ } | {
7741
+ type: "markdown";
7742
+ markdown: string;
7718
7743
  } | {
7719
7744
  type: "contact";
7720
7745
  user?: {
@@ -7758,18 +7783,9 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7758
7783
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7759
7784
  } | undefined;
7760
7785
  raw?: unknown;
7761
- } | {
7762
- type: "text";
7763
- text: string;
7764
- } | {
7765
- type: "markdown";
7766
- markdown: string;
7767
7786
  } | {
7768
7787
  type: "custom";
7769
7788
  raw: unknown;
7770
- } | {
7771
- type: "group";
7772
- items: Message<string, User, Space<unknown>>[];
7773
7789
  } | {
7774
7790
  type: "poll";
7775
7791
  title: string;
@@ -7794,6 +7810,9 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7794
7810
  type: "reaction";
7795
7811
  emoji: string;
7796
7812
  target: Message<string, User, Space<unknown>>;
7813
+ } | {
7814
+ type: "group";
7815
+ items: Message<string, User, Space<unknown>>[];
7797
7816
  } | {
7798
7817
  type: "richlink";
7799
7818
  url: string;
@@ -1,4 +1,4 @@
1
- import { At as asReply, Cn as asCustom, Ct as asText, Et as asRichlink, Ft as renameSchema, H as ProviderMessageRecord, Hn as PhotoInput, Jt as asMarkdown, Lt as asRead, Mt as replySchema, Nn as asContact, Sn as reactionSchema, U as ProviderUserRecord, Un as buildPhotoAction, Ut as asPoll, Vn as avatarSchema, Wn as photoActionSchema, Wt as asPollOption, _n as removeMemberSchema, _t as asVoice, bn as asReaction, hn as leaveSpaceSchema, pn as addMemberSchema, q as ManagedStream, r as asAttachment, rn as groupSchema, tn as asGroup } from "./attachment-Bn3rw5jW.js";
1
+ import { At as asReply, Cn as asCustom, Ct as asText, Et as asRichlink, Ft as renameSchema, H as ProviderMessageRecord, Hn as PhotoInput, Jt as asMarkdown, Lt as asRead, Mt as replySchema, Nn as asContact, Sn as reactionSchema, U as ProviderUserRecord, Un as buildPhotoAction, Ut as asPoll, Vn as avatarSchema, Wn as photoActionSchema, Wt as asPollOption, _n as removeMemberSchema, _t as asVoice, bn as asReaction, hn as leaveSpaceSchema, pn as addMemberSchema, q as ManagedStream, r as asAttachment, rn as groupSchema, tn as asGroup } from "./attachment-B4H1Q8xO.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 TextStreamOptions, A as isFusorEvent, An as ContactName, B as PlatformUser, Bn as avatar, Bt as PollChoice, C as FusorVerify, D as WebhookRawResult, Dn as ContactDetails, Dt as richlink, E as WebhookRawRequest, En as ContactAddress, F as PlatformInstance, Fn as AgentSender, G as SpaceNamespace, Gn as App, Gt as option, Ht as PollOption, I as PlatformMessage, In as User, It as Read, J as broadcast, Jn as app, K as Broadcaster, Kn as AppLayout, Kt as poll, L as PlatformProviderConfig, Ln as Avatar, M as EventProducer, Mn as ContactPhone, N as Platform, Nt as Rename, O as FusorEvent, On as ContactEmail, Ot as resolveContents, P as PlatformDef, Pn as contact, Pt as rename, Q as CloudPlatform, Qt as StreamTextSource, R as PlatformRuntime, Rn as AvatarData, Rt as read, S as FusorRespond, St as typing, T as WebhookHandler, Tn as Contact, Tt as Richlink, V as ProviderMessage, Vt as PollChoiceInput, W as SchemaMessage, X as stream, Xt as DeltaExtractor, Y as mergeStreams, Yn as appLayoutSchema, Yt as markdown, Z as Store, Zt as StreamText, _ as FusorClient, a as Content, an as edit, at as ProjectProfile, b as FusorMessagesReturn, bt as unsend, c as fromVCard, cn as AddMember, ct as SlackTokenData, d as UnsupportedKind, dn as RemoveMember, dt as SubscriptionStatus, en as Group, et as FusorTokenData, f as Spectrum, fn as addMember, ft as TokenData, g as isFusorClient, gn as removeMember, gt as Voice, h as fusor, ht as EmojiKey, i as attachment, in as Edit, it as ProjectData, j as AnyPlatformDef, jn as ContactOrg, jt as reply, k as fusorEvent, kn as ContactInput, kt as Reply, l as toVCard, ln as LeaveSpace, lt as SpectrumCloudError, m as definePlatform, mn as leaveSpace, mt as Emoji, n as AttachmentInput, nn as group, nt as PlatformStatus, o as ContentBuilder, on as Message, ot as SharedTokenData, p as SpectrumInstance, pt as cloud, q as ManagedStream, qn as AppUrl, qt as Markdown, rt as PlatformsData, s as ContentInput, sn as Space, st as SlackTeamMeta, t as Attachment, tt as ImessageInfoData, u as UnsupportedError, un as MemberInput, ut as SubscriptionData, v as FusorMessages, vn as Reaction, vt as voice, w as FusorVerifyRequest, wn as custom, wt as text, x as FusorReply, xn as reaction, xt as Typing, y as FusorMessagesCtx, yn as ReactionBuilder, yt as Unsend, z as PlatformSpace, zn as AvatarInput, zt as Poll } from "./attachment-Bn3rw5jW.js";
1
+ import { $ as DedicatedTokenData, $t as TextStreamOptions, A as isFusorEvent, An as ContactName, B as PlatformUser, Bn as avatar, Bt as PollChoice, C as FusorVerify, D as WebhookRawResult, Dn as ContactDetails, Dt as richlink, E as WebhookRawRequest, En as ContactAddress, F as PlatformInstance, Fn as AgentSender, G as SpaceNamespace, Gn as App, Gt as option, Ht as PollOption, I as PlatformMessage, In as User, It as Read, J as broadcast, Jn as app, K as Broadcaster, Kn as AppLayout, Kt as poll, L as PlatformProviderConfig, Ln as Avatar, M as EventProducer, Mn as ContactPhone, N as Platform, Nt as Rename, O as FusorEvent, On as ContactEmail, Ot as resolveContents, P as PlatformDef, Pn as contact, Pt as rename, Q as CloudPlatform, Qt as StreamTextSource, R as PlatformRuntime, Rn as AvatarData, Rt as read, S as FusorRespond, St as typing, T as WebhookHandler, Tn as Contact, Tt as Richlink, V as ProviderMessage, Vt as PollChoiceInput, W as SchemaMessage, X as stream, Xt as DeltaExtractor, Y as mergeStreams, Yn as appLayoutSchema, Yt as markdown, Z as Store, Zt as StreamText, _ as FusorClient, a as Content, an as edit, at as ProjectProfile, b as FusorMessagesReturn, bt as unsend, c as fromVCard, cn as AddMember, ct as SlackTokenData, d as UnsupportedKind, dn as RemoveMember, dt as SubscriptionStatus, en as Group, et as FusorTokenData, f as Spectrum, fn as addMember, ft as TokenData, g as isFusorClient, gn as removeMember, gt as Voice, h as fusor, ht as EmojiKey, i as attachment, in as Edit, it as ProjectData, j as AnyPlatformDef, jn as ContactOrg, jt as reply, k as fusorEvent, kn as ContactInput, kt as Reply, l as toVCard, ln as LeaveSpace, lt as SpectrumCloudError, m as definePlatform, mn as leaveSpace, mt as Emoji, n as AttachmentInput, nn as group, nt as PlatformStatus, o as ContentBuilder, on as Message, ot as SharedTokenData, p as SpectrumInstance, pt as cloud, q as ManagedStream, qn as AppUrl, qt as Markdown, rt as PlatformsData, s as ContentInput, sn as Space, st as SlackTeamMeta, t as Attachment, tt as ImessageInfoData, u as UnsupportedError, un as MemberInput, ut as SubscriptionData, v as FusorMessages, vn as Reaction, vt as voice, w as FusorVerifyRequest, wn as custom, wt as text, x as FusorReply, xn as reaction, xt as Typing, y as FusorMessagesCtx, yn as ReactionBuilder, yt as Unsend, z as PlatformSpace, zn as AvatarInput, zt as Poll } from "./attachment-B4H1Q8xO.js";
2
2
  export { type AddMember, type AgentSender, type AnyPlatformDef, type App, type AppLayout, 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
@@ -2313,6 +2313,7 @@ const RESERVED_SPACE_KEYS = new Set([
2313
2313
  "getMessage",
2314
2314
  "getMembers",
2315
2315
  "getAvatar",
2316
+ "getDisplayName",
2316
2317
  "rename",
2317
2318
  "avatar",
2318
2319
  "add",
@@ -2325,7 +2326,8 @@ const RESERVED_SPACE_KEYS = new Set([
2325
2326
  const PLATFORM_WISE_ACTION_KEYS = new Set([
2326
2327
  "getMessage",
2327
2328
  "getMembers",
2328
- "getAvatar"
2329
+ "getAvatar",
2330
+ "getDisplayName"
2329
2331
  ]);
2330
2332
  const RESERVED_MESSAGE_KEYS = new Set([
2331
2333
  "content",
@@ -2687,6 +2689,18 @@ function buildSpace(params) {
2687
2689
  store
2688
2690
  }, spaceRef));
2689
2691
  }
2692
+ async function getDisplayNameImpl() {
2693
+ const getDisplayName = definition.actions?.getDisplayName;
2694
+ if (!getDisplayName) throw UnsupportedError.action("getDisplayName", definition.name);
2695
+ return withSpan("spectrum.space.displayName.get", {
2696
+ "spectrum.provider": definition.name,
2697
+ "spectrum.space.id": spaceRef.id
2698
+ }, async () => await getDisplayName({
2699
+ client,
2700
+ config,
2701
+ store
2702
+ }, spaceRef));
2703
+ }
2690
2704
  const platformActions = {};
2691
2705
  const declaredActions = definition.space.actions;
2692
2706
  if (declaredActions) for (const [name, factory] of Object.entries(declaredActions)) {
@@ -2715,6 +2729,7 @@ function buildSpace(params) {
2715
2729
  getMessage: getMessageImpl,
2716
2730
  getMembers: getMembersImpl,
2717
2731
  getAvatar: getAvatarImpl,
2732
+ getDisplayName: getDisplayNameImpl,
2718
2733
  rename: async (displayName) => {
2719
2734
  await space.send(rename(displayName));
2720
2735
  },
@@ -3027,7 +3042,7 @@ function definePlatform(name, rawDef) {
3027
3042
  }
3028
3043
  //#endregion
3029
3044
  //#region src/build-env.ts
3030
- const SPECTRUM_SDK_VERSION = "9.0.0";
3045
+ const SPECTRUM_SDK_VERSION = "9.1.0";
3031
3046
  //#endregion
3032
3047
  //#region src/utils/provider-packages.ts
3033
3048
  const OFFICIAL_PROVIDER_PACKAGES = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-ts/core",
3
- "version": "9.0.0",
3
+ "version": "9.1.0",
4
4
  "description": "The spectrum-ts runtime — Spectrum, content builders, fusor, and the provider authoring API.",
5
5
  "repository": {
6
6
  "type": "git",