@segmentstream/agent 0.69.2 → 0.71.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.
Files changed (86) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/_chunks/{build-metadata-B1FvLdht.mjs → build-metadata-DliB5P2p.mjs} +1 -1
  3. package/dist/_chunks/{principal-DYl7vqOp.mjs → principal-BWTq_zuf.mjs} +106 -74
  4. package/dist/extension/channels/slack.mjs +1 -0
  5. package/dist/extension/channels/telegram.mjs +1 -0
  6. package/dist/extension/channels/whatsapp.mjs +1 -0
  7. package/dist/extension/config.d.ts +13 -5
  8. package/dist/extension/config.mjs +14 -0
  9. package/dist/extension/connections/ontology.mjs +1 -1
  10. package/dist/extension/hooks/authorization.mjs +1 -1
  11. package/dist/extension/instructions/persona.mjs +1 -1
  12. package/dist/extension/lib/actor.mjs +1 -1
  13. package/dist/extension/lib/attachment-tools.mjs +1 -1
  14. package/dist/extension/lib/attachments-send.mjs +1 -1
  15. package/dist/extension/lib/attachments.mjs +1 -1
  16. package/dist/extension/lib/build-metadata.mjs +1 -1
  17. package/dist/extension/lib/chat-address.d.ts +19 -2
  18. package/dist/extension/lib/chat-address.mjs +1 -1
  19. package/dist/extension/lib/chat-context.mjs +1 -1
  20. package/dist/extension/lib/chat-recorder.mjs +1 -1
  21. package/dist/extension/lib/confirmations.mjs +1 -1
  22. package/dist/extension/lib/email/attachments-send.mjs +1 -1
  23. package/dist/extension/lib/email/channel.mjs +1 -1
  24. package/dist/extension/lib/guest-usage.mjs +1 -1
  25. package/dist/extension/lib/inbound-media/files.mjs +1 -1
  26. package/dist/extension/lib/inbound-media/index.mjs +1 -1
  27. package/dist/extension/lib/ontology-connection.mjs +1 -1
  28. package/dist/extension/lib/ontology-file-call.mjs +1 -1
  29. package/dist/extension/lib/ontology-tools.d.ts +1 -0
  30. package/dist/extension/lib/ontology-tools.mjs +1 -1
  31. package/dist/extension/lib/review/hold.mjs +1 -1
  32. package/dist/extension/lib/review/reply.mjs +1 -1
  33. package/dist/extension/lib/role-skill.mjs +1 -1
  34. package/dist/extension/lib/runtime-envelope.d.ts +10 -1
  35. package/dist/extension/lib/runtime-envelope.mjs +1 -1
  36. package/dist/extension/lib/sent-files.mjs +1 -1
  37. package/dist/extension/lib/slack/adapter.d.ts +6 -0
  38. package/dist/extension/lib/slack/adapter.mjs +5 -2
  39. package/dist/extension/lib/slack/attachments-send.mjs +1 -1
  40. package/dist/extension/lib/slack/callbacks.d.ts +4 -4
  41. package/dist/extension/lib/slack/callbacks.mjs +21 -44
  42. package/dist/extension/lib/stored-files.mjs +1 -1
  43. package/dist/extension/lib/telegram/adapter.d.ts +6 -0
  44. package/dist/extension/lib/telegram/adapter.mjs +3 -3
  45. package/dist/extension/lib/telegram/attachment-description.mjs +1 -1
  46. package/dist/extension/lib/telegram/attachments-send.mjs +1 -1
  47. package/dist/extension/lib/telegram/callbacks.mjs +43 -50
  48. package/dist/extension/lib/telegram/chat-archive.mjs +1 -1
  49. package/dist/extension/lib/telegram/confirmations.mjs +1 -1
  50. package/dist/extension/lib/telegram/customer-text.mjs +1 -1
  51. package/dist/extension/lib/telegram/files.mjs +1 -1
  52. package/dist/extension/lib/telegram/health.mjs +1 -1
  53. package/dist/extension/lib/telegram/held-approvals.mjs +1 -1
  54. package/dist/extension/lib/telegram/inbound-request.mjs +1 -1
  55. package/dist/extension/lib/telegram/inbound.mjs +1 -1
  56. package/dist/extension/lib/telegram/lifecycle.mjs +2 -2
  57. package/dist/extension/lib/telegram/principal.mjs +1 -1
  58. package/dist/extension/lib/telegram/session-recovery.mjs +1 -1
  59. package/dist/extension/lib/telegram/silent.mjs +1 -1
  60. package/dist/extension/lib/telegram/structured.mjs +1 -1
  61. package/dist/extension/lib/telegram/turn-errors.mjs +1 -1
  62. package/dist/extension/lib/web/auth.mjs +1 -1
  63. package/dist/extension/lib/web/channel.mjs +1 -1
  64. package/dist/extension/lib/whatsapp/adapter.d.ts +3 -0
  65. package/dist/extension/lib/whatsapp/adapter.mjs +48 -1
  66. package/dist/extension/lib/whatsapp/attachments-send.mjs +1 -1
  67. package/dist/extension/lib/whatsapp/callbacks.d.ts +55 -0
  68. package/dist/extension/lib/whatsapp/callbacks.mjs +132 -0
  69. package/dist/extension/lib/whatsapp/files.mjs +1 -1
  70. package/dist/extension/lib/workspace-action.d.ts +30 -0
  71. package/dist/extension/lib/workspace-action.mjs +36 -2
  72. package/dist/extension/lib/workspace-channel/attachments-send.mjs +1 -1
  73. package/dist/extension/lib/workspace-channel/channel.mjs +1 -1
  74. package/dist/extension/lib/workspace-source.mjs +1 -1
  75. package/dist/extension/model.mjs +1 -1
  76. package/dist/extension/tools/attachments_discard.mjs +1 -1
  77. package/dist/extension/tools/attachments_list.mjs +1 -1
  78. package/dist/extension/tools/attachments_promote.mjs +4 -3
  79. package/dist/extension/tools/attachments_read.mjs +1 -1
  80. package/dist/extension/tools/attachments_send.mjs +1 -1
  81. package/dist/extension/tools/attachments_stage.mjs +1 -1
  82. package/dist/extension/tools/attachments_table.mjs +1 -1
  83. package/dist/extension/tools/handoff.mjs +1 -1
  84. package/dist/extension/tools/questions_ask.mjs +1 -1
  85. package/dist/extension/tools/workspace_source.mjs +1 -1
  86. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.71.0
4
+
5
+ Tool calls an agent makes in a Slack or WhatsApp chat carry `context.runtime.source`, as Telegram's
6
+ do: the chat, its thread, the message the turn answers and its sender. An action can then answer in
7
+ the Slack thread the member is talking in rather than at the top of the chat. Every Slack or WhatsApp
8
+ source, a workspace button press's and a file call's too, goes only to an ontology whose
9
+ `initialize` lists the channel among those it reads; an older one, which would refuse the whole
10
+ call, gets it without the source. Upgrade the ontology SDK with the agent SDK to keep a press's
11
+ source.
12
+
13
+ Pins @segmentstream/ontology 0.146.0.
14
+
15
+ ## 0.70.0
16
+
17
+ One action answers the workspace's buttons in every channel: `buttons: { entity, action,
18
+ contextVersion: 2 }` in `agent/segmentstream.json` names the routine action a press of a button
19
+ whose data is `ws:<token>` calls, as the member who pressed it, with `{ token }`. A channel's own
20
+ `callbacks` (`channels.telegram.callbacks`, or a Slack channel's) is its earlier name, still read
21
+ where `buttons` is absent until 2027-01-19; beside `buttons` it must name the same action.
22
+
23
+ WhatsApp now answers such presses too: a reply button `agent_chat.send` put under a message, and an
24
+ approved template's quick reply whose payload is `ws:<token>`, which reaches a person outside the 24
25
+ hours. The action's runtime source names the message the button was under. The press, which the
26
+ person sees as their message, and the action's acknowledgement, sent as a message, are kept in the
27
+ chat's history; `context` queues a turn. The press's record claims it: a press WhatsApp delivers
28
+ again runs nothing again, and one the history cannot record runs nothing.
29
+ WhatsApp cannot edit a message, so `edit` is not applied.
30
+
3
31
  ## 0.69.2
4
32
 
5
33
  Pins @segmentstream/ontology 0.145.0.
@@ -4,7 +4,7 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- var version = "0.69.2";
7
+ var version = "0.71.0";
8
8
  function agentBuild(environment = process.env) {
9
9
  return {
10
10
  agent: version,
@@ -34,6 +34,87 @@ import { defineMcpClientConnection } from "eve/connections";
34
34
  import { defineState } from "eve/context";
35
35
  import { defineDynamic as defineDynamic$1 } from "eve/tools";
36
36
  import { ForbiddenError, UnauthenticatedError } from "eve/channels/auth";
37
+ const CHAT_HEADER = "X-SegmentStream-Agent-Chat";
38
+ const SESSION_HEADER = "X-SegmentStream-Agent-Session";
39
+ const CHAT_ATTRIBUTE = "segmentstreamChat";
40
+ const EARLIER_CHAT_ATTRIBUTE = "segmentstreamConversation";
41
+ const RUNTIME_SOURCE_ATTRIBUTE = "segmentstreamRuntimeSource";
42
+ function chatRuntimeSource(chat, message = {}) {
43
+ if (chat.provider !== "slack" && chat.provider !== "whatsapp") return;
44
+ return {
45
+ provider: chat.provider,
46
+ ...chat.channel === void 0 ? {} : { channel: chat.channel },
47
+ chat_id: chat.chatId,
48
+ thread_id: chat.threadId,
49
+ kind: chat.kind,
50
+ ...chat.peer === void 0 ? {} : { peer: chat.peer },
51
+ ...message.id === void 0 ? {} : { message_id: message.id },
52
+ ...message.sender === void 0 ? {} : { sender: message.sender }
53
+ };
54
+ }
55
+ function withChatAddress(principal, chat, message) {
56
+ const source = message === void 0 ? void 0 : chatRuntimeSource(chat, message);
57
+ return {
58
+ ...principal,
59
+ attributes: {
60
+ ...principal.attributes,
61
+ [CHAT_ATTRIBUTE]: JSON.stringify(chat),
62
+ ...source === void 0 ? {} : { [RUNTIME_SOURCE_ATTRIBUTE]: JSON.stringify(source) }
63
+ }
64
+ };
65
+ }
66
+ function chatAddressOf(principal) {
67
+ if (principal === void 0 || principal === null) return;
68
+ const attributes = principal.attributes;
69
+ if (principal.authenticator === "segmentstream-telegram") {
70
+ const chatId = attributes.chatId;
71
+ return typeof chatId !== "string" || chatId === "" ? void 0 : {
72
+ provider: "telegram",
73
+ ...principalChannel(principal) === void 0 ? {} : { channel: principalChannel(principal) },
74
+ chatId,
75
+ threadId: String(attributes.messageThreadId ?? ""),
76
+ kind: chatId.startsWith("-") ? "group" : "private"
77
+ };
78
+ }
79
+ const value = attributes["segmentstreamChat"] ?? attributes[EARLIER_CHAT_ATTRIBUTE];
80
+ if (typeof value !== "string") return;
81
+ try {
82
+ return parsedChatAddress(JSON.parse(value), attributes.identityProvider);
83
+ } catch {
84
+ return;
85
+ }
86
+ }
87
+ function chatHeaders(principal, sessionId) {
88
+ const chat = chatAddressOf(principal);
89
+ return chat === void 0 ? {} : {
90
+ [CHAT_HEADER]: `${chatChannel(chat)}:${chat.chatId}`,
91
+ ...sessionId === void 0 || sessionId === "" ? {} : { [SESSION_HEADER]: sessionId }
92
+ };
93
+ }
94
+ function parsedChatAddress(value, provider) {
95
+ if (typeof value !== "object" || value === null || Array.isArray(value)) return;
96
+ const item = value;
97
+ const text = (field, empty = false) => typeof field === "string" && (empty || field !== "") && field.length <= 512;
98
+ if (item.provider !== "slack" && item.provider !== "whatsapp" && item.provider !== "web" && item.provider !== "email" && item.provider !== "custom" || (item.provider === "custom" ? typeof item.channel !== "string" || provider !== workspaceIdentityProvider(item.channel) : item.provider !== provider) || !text(item.chatId) || !text(item.threadId, true) || item.kind !== "private" && item.kind !== "group" || item.peer !== void 0 && !text(item.peer) || item.channel !== void 0 && (typeof item.channel !== "string" || !CHANNEL_NAME.test(item.channel) || item.channel === item.provider)) return;
99
+ return {
100
+ provider: item.provider,
101
+ ...item.channel === void 0 ? {} : { channel: item.channel },
102
+ chatId: item.chatId,
103
+ threadId: item.threadId,
104
+ kind: item.kind,
105
+ ...item.peer === void 0 ? {} : { peer: item.peer }
106
+ };
107
+ }
108
+ function workspaceIdentityProvider(channel) {
109
+ return `channel:${channel}`;
110
+ }
111
+ function chatChannel(chat) {
112
+ return chat.channel ?? chat.provider;
113
+ }
114
+ function isSameChat(chat, destination) {
115
+ if (chatChannel(chat) !== destination.provider) return false;
116
+ return chat.chatId === destination.externalId || chat.provider !== "telegram" && chat.kind === "private" && chat.peer === destination.externalId;
117
+ }
37
118
  function telegramRuntimeSource(message, files, callbackQueryId) {
38
119
  const attachments = [];
39
120
  for (const file of message.attachments) {
@@ -73,8 +154,7 @@ function telegramRuntimeSource(message, files, callbackQueryId) {
73
154
  };
74
155
  }
75
156
  function principalRuntimeSource(principal) {
76
- if (principal?.authenticator !== "segmentstream-telegram") return;
77
- const value = principal.attributes.segmentstreamRuntimeSource;
157
+ const value = principal?.attributes[RUNTIME_SOURCE_ATTRIBUTE];
78
158
  if (typeof value !== "string") return;
79
159
  try {
80
160
  return JSON.parse(value);
@@ -91,6 +171,17 @@ function runtimeEnvelope(input = {}) {
91
171
  ...source === void 0 ? {} : { source }
92
172
  };
93
173
  }
174
+ async function readableRuntimeEnvelope(envelope, providers) {
175
+ const provider = envelope.source?.provider;
176
+ if (provider === void 0 || provider === "telegram" || (await providers()).has(provider)) return envelope;
177
+ return {
178
+ version: envelope.version,
179
+ session_id: envelope.session_id,
180
+ call_id: envelope.call_id,
181
+ ...envelope.operation_id === void 0 ? {} : { operation_id: envelope.operation_id },
182
+ ...envelope.expected === void 0 ? {} : { expected: envelope.expected }
183
+ };
184
+ }
94
185
  function compatibleRuntimeEnvelope(envelope, extended) {
95
186
  const source = envelope.source;
96
187
  return extended || source === void 0 || source.provider !== "telegram" ? envelope : {
@@ -357,71 +448,6 @@ function safeTelegramFetch(fetchImpl, scope = "telegram", previews = {}, appLink
357
448
  return typeof body.chat_id === "string" || typeof body.chat_id === "number" ? inTelegramSendQueue(scope, String(body.chat_id), send) : send();
358
449
  };
359
450
  }
360
- const CHAT_HEADER = "X-SegmentStream-Agent-Chat";
361
- const SESSION_HEADER = "X-SegmentStream-Agent-Session";
362
- const CHAT_ATTRIBUTE = "segmentstreamChat";
363
- const EARLIER_CHAT_ATTRIBUTE = "segmentstreamConversation";
364
- function withChatAddress(principal, chat) {
365
- return {
366
- ...principal,
367
- attributes: {
368
- ...principal.attributes,
369
- [CHAT_ATTRIBUTE]: JSON.stringify(chat)
370
- }
371
- };
372
- }
373
- function chatAddressOf(principal) {
374
- if (principal === void 0 || principal === null) return;
375
- const attributes = principal.attributes;
376
- if (principal.authenticator === "segmentstream-telegram") {
377
- const chatId = attributes.chatId;
378
- return typeof chatId !== "string" || chatId === "" ? void 0 : {
379
- provider: "telegram",
380
- ...principalChannel(principal) === void 0 ? {} : { channel: principalChannel(principal) },
381
- chatId,
382
- threadId: String(attributes.messageThreadId ?? ""),
383
- kind: chatId.startsWith("-") ? "group" : "private"
384
- };
385
- }
386
- const value = attributes["segmentstreamChat"] ?? attributes[EARLIER_CHAT_ATTRIBUTE];
387
- if (typeof value !== "string") return;
388
- try {
389
- return parsedChatAddress(JSON.parse(value), attributes.identityProvider);
390
- } catch {
391
- return;
392
- }
393
- }
394
- function chatHeaders(principal, sessionId) {
395
- const chat = chatAddressOf(principal);
396
- return chat === void 0 ? {} : {
397
- [CHAT_HEADER]: `${chatChannel(chat)}:${chat.chatId}`,
398
- ...sessionId === void 0 || sessionId === "" ? {} : { [SESSION_HEADER]: sessionId }
399
- };
400
- }
401
- function parsedChatAddress(value, provider) {
402
- if (typeof value !== "object" || value === null || Array.isArray(value)) return;
403
- const item = value;
404
- const text = (field, empty = false) => typeof field === "string" && (empty || field !== "") && field.length <= 512;
405
- if (item.provider !== "slack" && item.provider !== "whatsapp" && item.provider !== "web" && item.provider !== "email" && item.provider !== "custom" || (item.provider === "custom" ? typeof item.channel !== "string" || provider !== workspaceIdentityProvider(item.channel) : item.provider !== provider) || !text(item.chatId) || !text(item.threadId, true) || item.kind !== "private" && item.kind !== "group" || item.peer !== void 0 && !text(item.peer) || item.channel !== void 0 && (typeof item.channel !== "string" || !CHANNEL_NAME.test(item.channel) || item.channel === item.provider)) return;
406
- return {
407
- provider: item.provider,
408
- ...item.channel === void 0 ? {} : { channel: item.channel },
409
- chatId: item.chatId,
410
- threadId: item.threadId,
411
- kind: item.kind,
412
- ...item.peer === void 0 ? {} : { peer: item.peer }
413
- };
414
- }
415
- function workspaceIdentityProvider(channel) {
416
- return `channel:${channel}`;
417
- }
418
- function chatChannel(chat) {
419
- return chat.channel ?? chat.provider;
420
- }
421
- function isSameChat(chat, destination) {
422
- if (chatChannel(chat) !== destination.provider) return false;
423
- return chat.chatId === destination.externalId || chat.provider !== "telegram" && chat.kind === "private" && chat.peer === destination.externalId;
424
- }
425
451
  const WEB_AUTHENTICATOR = "segmentstream-web";
426
452
  const WEB_PROVIDER = "web";
427
453
  const AGENT_GRANT_HEADER = "X-SegmentStream-Agent-Grant";
@@ -1011,7 +1037,7 @@ function ontologyTools(options = {}) {
1011
1037
  const current = actorOf(options.principal);
1012
1038
  const own = current !== void 0 && actorKey(current) === key ? options.principal : null;
1013
1039
  if (method === "tools/call") {
1014
- const envelope = options.envelope ?? runtimeEnvelope({ principal: own });
1040
+ const envelope = await readableRuntimeEnvelope(options.envelope ?? runtimeEnvelope({ principal: own }), () => sourceProviders(actor, signal));
1015
1041
  const extended = envelope.source !== void 0 && await runtimeSource(actor, signal);
1016
1042
  params = {
1017
1043
  ...params,
@@ -1081,6 +1107,10 @@ function ontologyTools(options = {}) {
1081
1107
  const result = await initialize(actor, signal);
1082
1108
  return object(object(result?.capabilities).experimental)[capability] !== void 0;
1083
1109
  }
1110
+ async function sourceProviders(actor, signal) {
1111
+ const advertised = object(object(object((await initialize(actor, signal))?.capabilities).experimental)[RUNTIME_SOURCE_PROTOCOL]).providers;
1112
+ return new Set(Array.isArray(advertised) ? advertised.filter((provider) => typeof provider === "string") : ["telegram"]);
1113
+ }
1084
1114
  async function runtimeSource(actor, signal) {
1085
1115
  const key = actorKey(actor);
1086
1116
  if (!runtimeSources.has(key)) {
@@ -1188,6 +1218,7 @@ function ontologyTools(options = {}) {
1188
1218
  async supportsRuntimeSource(actor, signal) {
1189
1219
  return runtimeSource(actor, signal);
1190
1220
  },
1221
+ sourceProviders,
1191
1222
  async labels(actor, action, input = {}, signal, hints) {
1192
1223
  const { tool } = await resolve(actor, action, input, signal, hints);
1193
1224
  const annotations = object(tool.annotations);
@@ -1307,6 +1338,7 @@ function ontologyConnection(input) {
1307
1338
  if (actor === void 0) return null;
1308
1339
  const origin = appOrigin(input.environment ?? process.env);
1309
1340
  const token = input.token ?? runtimeToken;
1341
+ const tools = ontologyTools(input);
1310
1342
  const headers = (context) => ({
1311
1343
  ...actAsHeaders({
1312
1344
  principal: context.session.auth.current,
@@ -1320,7 +1352,7 @@ function ontologyConnection(input) {
1320
1352
  protocolVersionDiscovery: false,
1321
1353
  description: DESCRIPTION,
1322
1354
  approval: actionApproval({
1323
- ...ontologyTools(input),
1355
+ ...tools,
1324
1356
  texts: input.texts
1325
1357
  }),
1326
1358
  auth: {
@@ -1360,13 +1392,13 @@ function ontologyConnection(input) {
1360
1392
  ...common,
1361
1393
  instanceKey: `${origin}/mcp#member:${memberId}${web ? ":web" : ""}${chatProtocol}${sourceProtocol}`,
1362
1394
  ...web ? { tools: { block: [CHAT_POST_TOOL] } } : {},
1363
- ...chatPosting || input.runtimeSource ? { toolCall: { providedArguments: { [CHAT_POST_ENVELOPE]: (ctx) => {
1395
+ ...chatPosting || input.runtimeSource ? { toolCall: { providedArguments: { [CHAT_POST_ENVELOPE]: async (ctx) => {
1364
1396
  headers(ctx);
1365
- const base = compatibleRuntimeEnvelope(runtimeEnvelope({
1397
+ const base = compatibleRuntimeEnvelope(await readableRuntimeEnvelope(runtimeEnvelope({
1366
1398
  principal: ctx.session.auth.current,
1367
1399
  sessionId: ctx.session.id,
1368
1400
  callId: ctx.callId
1369
- }), input.runtimeSource === true);
1401
+ }), () => tools.sourceProviders(actor)), input.runtimeSource === true);
1370
1402
  if (!isChatPost(ctx.toolName)) return base;
1371
1403
  const saved = confirmations.get()[ctx.callId];
1372
1404
  const preview = saved?.description?.chatPost;
@@ -1982,7 +2014,7 @@ function telegramPrincipal(input) {
1982
2014
  const sender = message.from.id;
1983
2015
  const attributes = {
1984
2016
  memberId: member.id,
1985
- segmentstreamRuntimeSource: JSON.stringify(telegramRuntimeSource(message, currentInboundRequest()?.files, input.callbackQueryId)),
2017
+ [RUNTIME_SOURCE_ATTRIBUTE]: JSON.stringify(telegramRuntimeSource(message, currentInboundRequest()?.files, input.callbackQueryId)),
1986
2018
  identityProvider: "telegram",
1987
2019
  roles: member.roles,
1988
2020
  ...agentToolsAttribute(member.agentTools),
@@ -2026,4 +2058,4 @@ function identityProviderOf(principal) {
2026
2058
  const provider = principal?.attributes.identityProvider;
2027
2059
  return typeof provider === "string" && provider !== "" ? provider : void 0;
2028
2060
  }
2029
- export { KIND_ATTRIBUTE as $, ontologyToolLabels as A, reportTelegramError as At, actorHeaders as B, parseAttachmentUrl as C, currentLocale as Ct, OntologyFileUnavailable as D, customerText as Dt, OntologyActionNotPermitted as E, customerMessage as Et, confirmations as F, principalRuntimeSource as Ft, memberTool as G, actorOf as H, inputHash as I, runtimeEnvelope as It, AGENT_GRANT_HEADER as J, notForGuests as K, needsConfirmation as L, telegramRuntimeSource as Lt, promotionTarget as M, withDeliveryLocale as Mt, CONFIRMATION_TTL_MS as N, RUNTIME_SOURCE_PROTOCOL as Nt, OntologyToolRejected as O, failureText as Ot, actionApproval as P, compatibleRuntimeEnvelope as Pt, INTROSPECTION_PATH as Q, ACT_AS_HEADER as R, fetchStoredAttachment as S, TelegramDeliveryError as St, ontologyConnection as T, customerCopy as Tt, isGuestSession as U, actorKey as V, member as W, GUEST_ID_ATTRIBUTE as X, GUEST_CONFIRMATIONS_ATTRIBUTE as Y, GUEST_ROLE as Z, AttachmentError as _, chatChannel as _t, rolesOf as a, guestConfirms as at, agentAttachments as b, withChatAddress as bt, currentInboundRequest as c, ontologyIntrospection as ct, prepareInboundMedia as d, webMemberOf as dt, TURN_LIMITED_CODE as et, attachmentsContext as f, webPrincipal as ft, ATTACHMENT_URL_PROTOCOL as g, chatAddressOf as gt, ATTACHMENT_TTL_HOURS as h, SESSION_HEADER as ht, memberIdOf as i, WEB_PROVIDER as it, ontologyTools as j, safeTelegramFetch as jt, actionToolName as k, formattingRefused as kt, runInboundRequest as l, webAuth as lt, turnContent as m, CHAT_HEADER as mt, chatLanguage as n, WEB_AUTHENTICATOR as nt, telegramPrincipal as o, guestIdOf as ot, storeFiles as p, CHAT_ATTRIBUTE as pt, ACCESS_TOKEN_PREFIX as q, identityProviderOf as r, WEB_GRANT_ATTRIBUTE as rt, InboundRequest as s, guestPrincipal as st, TELEGRAM_AUTHENTICATOR as t, TurnLimitedError as tt, withReplacedText as u, webGrantOf as ut, EARLIER_CHAT_HEADER as v, chatHeaders as vt, actAsHeaders as w, currentThreadId as wt, attachmentUrl as x, workspaceIdentityProvider as xt, MAXIMUM_ATTACHMENT_BYTES as y, isSameChat as yt, ActorRequiredError as z };
2061
+ export { KIND_ATTRIBUTE as $, ontologyToolLabels as A, CHAT_ATTRIBUTE as At, actorHeaders as B, workspaceIdentityProvider as Bt, parseAttachmentUrl as C, withDeliveryLocale as Ct, OntologyFileUnavailable as D, readableRuntimeEnvelope as Dt, OntologyActionNotPermitted as E, principalRuntimeSource as Et, confirmations as F, chatChannel as Ft, memberTool as G, actorOf as H, inputHash as I, chatHeaders as It, AGENT_GRANT_HEADER as J, notForGuests as K, needsConfirmation as L, chatRuntimeSource as Lt, promotionTarget as M, RUNTIME_SOURCE_ATTRIBUTE as Mt, CONFIRMATION_TTL_MS as N, SESSION_HEADER as Nt, OntologyToolRejected as O, runtimeEnvelope as Ot, actionApproval as P, chatAddressOf as Pt, INTROSPECTION_PATH as Q, ACT_AS_HEADER as R, isSameChat as Rt, fetchStoredAttachment as S, safeTelegramFetch as St, ontologyConnection as T, compatibleRuntimeEnvelope as Tt, isGuestSession as U, actorKey as V, member as W, GUEST_ID_ATTRIBUTE as X, GUEST_CONFIRMATIONS_ATTRIBUTE as Y, GUEST_ROLE as Z, AttachmentError as _, customerMessage as _t, rolesOf as a, guestConfirms as at, agentAttachments as b, formattingRefused as bt, currentInboundRequest as c, ontologyIntrospection as ct, prepareInboundMedia as d, webMemberOf as dt, TURN_LIMITED_CODE as et, attachmentsContext as f, webPrincipal as ft, ATTACHMENT_URL_PROTOCOL as g, customerCopy as gt, ATTACHMENT_TTL_HOURS as h, currentThreadId as ht, memberIdOf as i, WEB_PROVIDER as it, ontologyTools as j, CHAT_HEADER as jt, actionToolName as k, telegramRuntimeSource as kt, runInboundRequest as l, webAuth as lt, turnContent as m, currentLocale as mt, chatLanguage as n, WEB_AUTHENTICATOR as nt, telegramPrincipal as o, guestIdOf as ot, storeFiles as p, TelegramDeliveryError as pt, ACCESS_TOKEN_PREFIX as q, identityProviderOf as r, WEB_GRANT_ATTRIBUTE as rt, InboundRequest as s, guestPrincipal as st, TELEGRAM_AUTHENTICATOR as t, TurnLimitedError as tt, withReplacedText as u, webGrantOf as ut, EARLIER_CHAT_HEADER as v, customerText as vt, actAsHeaders as w, RUNTIME_SOURCE_PROTOCOL as wt, attachmentUrl as x, reportTelegramError as xt, MAXIMUM_ATTACHMENT_BYTES as y, failureText as yt, ActorRequiredError as z, withChatAddress as zt };
@@ -10,6 +10,7 @@ import { segmentstreamSlack } from "../lib/slack/adapter.mjs";
10
10
  import { decide } from "eve/ai";
11
11
  var slack_default = segmentstreamSlack({
12
12
  settings: (name) => channelOf(segmentstream.config.channels, "slack", name),
13
+ buttons: () => segmentstream.config.buttons,
13
14
  admission: () => segmentstream.config,
14
15
  groups: () => segmentstream.config.groups,
15
16
  models: () => segmentstream.config.models,
@@ -10,6 +10,7 @@ import { segmentstreamTelegram } from "../lib/telegram/adapter.mjs";
10
10
  import { decide } from "eve/ai";
11
11
  var telegram_default = segmentstreamTelegram({
12
12
  settings: (name) => channelOf(segmentstream.config.channels, "telegram", name),
13
+ buttons: () => segmentstream.config.buttons,
13
14
  groups: () => segmentstream.config.groups,
14
15
  models: () => segmentstream.config.models,
15
16
  confirmationMode: () => "native",
@@ -10,6 +10,7 @@ import { segmentstreamWhatsApp } from "../lib/whatsapp/adapter.mjs";
10
10
  import { decide } from "eve/ai";
11
11
  var whatsapp_default = segmentstreamWhatsApp({
12
12
  settings: (name) => channelOf(segmentstream.config.channels, "whatsapp", name),
13
+ buttons: () => segmentstream.config.buttons,
13
14
  admission: () => segmentstream.config,
14
15
  models: () => segmentstream.config.models,
15
16
  review: {
@@ -143,6 +143,15 @@ export interface SegmentStreamAgentConfigInput {
143
143
  * Off when absent.
144
144
  */
145
145
  readonly handoff?: boolean;
146
+ /**
147
+ * The routine ontology action a press of a workspace button calls, in every channel, as the
148
+ * member who pressed it: a button the workspace sent with `agent_chat.send` and its `buttons`,
149
+ * or one it sent itself whose data is `ws:<token>`. The action receives `{ token }`. See
150
+ * `docs/agent.md`, "Workspace callback actions". Without it such a press calls nothing.
151
+ */
152
+ readonly buttons?: Omit<WorkspaceActionHook, "contextVersion"> & {
153
+ readonly contextVersion: number;
154
+ };
146
155
  /**
147
156
  * The web the agent reaches: with `domains`, `segmentstream__web_fetch` fetches `https://` pages
148
157
  * of these domains, each also covering its subdomains, for callers who hold `agent_tool:web`;
@@ -253,6 +262,7 @@ export interface TelegramChannelInput {
253
262
  readonly kinds: ReadonlyArray<string>;
254
263
  readonly contextVersion: number;
255
264
  };
265
+ /** The earlier name of the top-level `buttons`, for Telegram's buttons alone. */
256
266
  readonly callbacks?: Omit<WorkspaceActionHook, "contextVersion"> & {
257
267
  readonly contextVersion: number;
258
268
  };
@@ -272,10 +282,7 @@ export interface WhatsAppChannelInput {
272
282
  export interface SlackChannelInput {
273
283
  /** The key of the workspace's `SlackConnection`, such as `slack`. */
274
284
  readonly connection: string;
275
- /**
276
- * The routine action a press of a button the workspace sent calls, as the member who pressed
277
- * it: a button whose `value` is `ws:<token>`. See `docs/agent.md`, "Workspace callback actions".
278
- */
285
+ /** The earlier name of the top-level `buttons`, for this Slack channel's buttons alone. */
279
286
  readonly callbacks?: Omit<WorkspaceActionHook, "contextVersion"> & {
280
287
  readonly contextVersion: number;
281
288
  };
@@ -508,6 +515,8 @@ export interface SegmentStreamAgentConfig extends AdmissionSettings {
508
515
  * {@link SegmentStreamAgentConfigInput.handoff}.
509
516
  */
510
517
  readonly handoff?: boolean;
518
+ /** The action a press of a workspace button calls, in every channel; absent without one. */
519
+ readonly buttons?: WorkspaceActionHook;
511
520
  /** The web tools' settings; absent without web tools. See {@link WebSettings}. */
512
521
  readonly web?: WebSettings;
513
522
  /** The agent's browser; absent without the browser tool. See {@link BrowserSettings}. */
@@ -559,7 +568,6 @@ export interface WhatsAppSettings {
559
568
  */
560
569
  export interface SlackSettings {
561
570
  readonly connection: string;
562
- /** The action a press of a workspace button calls; without it such a press calls nothing. */
563
571
  readonly callbacks?: WorkspaceActionHook;
564
572
  }
565
573
  /** The fewest and most minutes `checkAfterMinutes` may name, and its default. */
@@ -1052,6 +1052,7 @@ function validateConfig(input, options = {}) {
1052
1052
  "workspaceSource",
1053
1053
  "unanswered",
1054
1054
  "handoff",
1055
+ "buttons",
1055
1056
  "web",
1056
1057
  "browser",
1057
1058
  "sessions",
@@ -1258,6 +1259,18 @@ function validateConfig(input, options = {}) {
1258
1259
  message: "must be true or false",
1259
1260
  path: ["handoff"]
1260
1261
  });
1262
+ const buttons = workspaceHook(root?.buttons, ["buttons"], issues);
1263
+ for (const [name, channel] of Object.entries(declared)) {
1264
+ const own = channel !== null && "callbacks" in channel ? channel.callbacks : void 0;
1265
+ if (buttons !== void 0 && own !== void 0 && (own.entity !== buttons.entity || own.action !== buttons.action)) issues.push({
1266
+ message: "names another action than buttons, which answers every channel's buttons",
1267
+ path: [
1268
+ "channels",
1269
+ name,
1270
+ "callbacks"
1271
+ ]
1272
+ });
1273
+ }
1261
1274
  const web = webSettings(root?.web, issues);
1262
1275
  const browser = browserSettings(root?.browser, issues);
1263
1276
  if (root?.browser !== void 0 && sandbox !== true) issues.push({
@@ -1289,6 +1302,7 @@ function validateConfig(input, options = {}) {
1289
1302
  ...workspaceSource === true ? { workspaceSource: true } : {},
1290
1303
  ...unanswered === true ? { unanswered: true } : {},
1291
1304
  ...handoff === true ? { handoff: true } : {},
1305
+ ...buttons === void 0 ? {} : { buttons },
1292
1306
  ...web === null ? {} : { web },
1293
1307
  ...browser === null ? {} : { browser },
1294
1308
  sessions,
@@ -5,7 +5,7 @@ const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import segmentstream from "../extension.mjs";
8
- import { T as ontologyConnection } from "../../_chunks/principal-DYl7vqOp.mjs";
8
+ import { T as ontologyConnection } from "../../_chunks/principal-BWTq_zuf.mjs";
9
9
  import { defineDynamic } from "eve/connections";
10
10
  var ontology_default = defineDynamic(async (context) => {
11
11
  if (!segmentstream.config.ontology.connection) return null;
@@ -7,7 +7,7 @@ __eveCreateRequire(import.meta.url);
7
7
  import segmentstream from "../extension.mjs";
8
8
  import { localizedText } from "../lib/admission.mjs";
9
9
  import { confirmationLocale } from "../lib/telegram/confirmation-text.mjs";
10
- import "../../_chunks/principal-DYl7vqOp.mjs";
10
+ import "../../_chunks/principal-BWTq_zuf.mjs";
11
11
  import { defineHook } from "eve/hooks";
12
12
  var authorization_default = defineHook({ events: { "interaction.opened": (event, context) => {
13
13
  const principal = context.session.auth.current;
@@ -5,7 +5,7 @@ const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import segmentstream from "../extension.mjs";
8
- import { a as rolesOf } from "../../_chunks/principal-DYl7vqOp.mjs";
8
+ import { a as rolesOf } from "../../_chunks/principal-BWTq_zuf.mjs";
9
9
  import { personaFor } from "../personas.mjs";
10
10
  import { defineDynamic, defineInstructions } from "eve/instructions";
11
11
  var persona_default = defineDynamic((context) => {
@@ -4,4 +4,4 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- export { R as ACT_AS_HEADER, z as ActorRequiredError, B as actorHeaders, V as actorKey, H as actorOf, U as isGuestSession, W as member, G as memberTool, K as notForGuests } from "../../_chunks/principal-DYl7vqOp.mjs";
7
+ export { R as ACT_AS_HEADER, z as ActorRequiredError, B as actorHeaders, V as actorKey, H as actorOf, U as isGuestSession, W as member, G as memberTool, K as notForGuests } from "../../_chunks/principal-BWTq_zuf.mjs";
@@ -4,7 +4,7 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import { _t as chatChannel, b as agentAttachments, gt as chatAddressOf, i as memberIdOf } from "../../_chunks/principal-DYl7vqOp.mjs";
7
+ import { Ft as chatChannel, Pt as chatAddressOf, b as agentAttachments, i as memberIdOf } from "../../_chunks/principal-BWTq_zuf.mjs";
8
8
  import { detectFile, documentText } from "./attachment-formats.mjs";
9
9
  import { readSheets, typedTable } from "./attachment-tables.mjs";
10
10
  import { appOrigin } from "./environment.mjs";
@@ -5,7 +5,7 @@ const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import { attachmentOwner } from "./attachment-tools.mjs";
8
- import { Ot as failureText, _ as AttachmentError, gt as chatAddressOf } from "../../_chunks/principal-DYl7vqOp.mjs";
8
+ import { Pt as chatAddressOf, _ as AttachmentError, yt as failureText } from "../../_chunks/principal-BWTq_zuf.mjs";
9
9
  import { appOrigin, channelsEnabled } from "./environment.mjs";
10
10
  import { transientFileStatus } from "./file-grant.mjs";
11
11
  import { runtimeToken } from "./runtime-token.mjs";
@@ -4,4 +4,4 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- export { h as ATTACHMENT_TTL_HOURS, g as ATTACHMENT_URL_PROTOCOL, _ as AttachmentError, mt as CHAT_HEADER, v as EARLIER_CHAT_HEADER, y as MAXIMUM_ATTACHMENT_BYTES, ht as SESSION_HEADER, b as agentAttachments, x as attachmentUrl, S as fetchStoredAttachment, C as parseAttachmentUrl } from "../../_chunks/principal-DYl7vqOp.mjs";
7
+ export { h as ATTACHMENT_TTL_HOURS, g as ATTACHMENT_URL_PROTOCOL, _ as AttachmentError, jt as CHAT_HEADER, v as EARLIER_CHAT_HEADER, y as MAXIMUM_ATTACHMENT_BYTES, Nt as SESSION_HEADER, b as agentAttachments, x as attachmentUrl, S as fetchStoredAttachment, C as parseAttachmentUrl } from "../../_chunks/principal-BWTq_zuf.mjs";
@@ -4,4 +4,4 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- export { t as agentBuild } from "../../_chunks/build-metadata-B1FvLdht.mjs";
7
+ export { t as agentBuild } from "../../_chunks/build-metadata-DliB5P2p.mjs";
@@ -1,3 +1,4 @@
1
+ import type { RuntimeSource } from "@segmentstream/ontology";
1
2
  import type { SessionAuthContext } from "eve/context";
2
3
  /**
3
4
  * The chat a member's message came from, the same way for every channel: the provider,
@@ -30,8 +31,24 @@ export declare const CHAT_HEADER = "X-SegmentStream-Agent-Chat";
30
31
  export declare const SESSION_HEADER = "X-SegmentStream-Agent-Session";
31
32
  /** The session attribute that carries a non-Telegram channel's chat, as JSON. */
32
33
  export declare const CHAT_ATTRIBUTE = "segmentstreamChat";
33
- /** A channel's principal with the chat its message came from. */
34
- export declare function withChatAddress(principal: SessionAuthContext, chat: ChatAddress): SessionAuthContext;
34
+ /** The session attribute that carries, as JSON, the runtime source of the message a turn answers. */
35
+ export declare const RUNTIME_SOURCE_ATTRIBUTE = "segmentstreamRuntimeSource";
36
+ /** The message a channel's turn answers, beside its chat: its id and the account that wrote it. */
37
+ export interface ChatMessage {
38
+ readonly id?: string;
39
+ readonly sender?: string;
40
+ }
41
+ /**
42
+ * The runtime source a tool call names for a message in a Slack or WhatsApp chat: the chat, its
43
+ * thread, the message and its sender, as the ontology verifies them. Telegram builds its own, with
44
+ * the references only Telegram carries; another channel has none the ontology reads.
45
+ */
46
+ export declare function chatRuntimeSource(chat: ChatAddress, message?: ChatMessage): RuntimeSource | undefined;
47
+ /**
48
+ * A channel's principal with the chat its message came from and, given the message, the runtime
49
+ * source the turn's tool calls name.
50
+ */
51
+ export declare function withChatAddress(principal: SessionAuthContext, chat: ChatAddress, message?: ChatMessage): SessionAuthContext;
35
52
  /**
36
53
  * The chat a session's principal speaks from, or undefined for one without a channel
37
54
  * chat, such as a task. Telegram's comes from the chat attributes its principal always
@@ -4,4 +4,4 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- export { pt as CHAT_ATTRIBUTE, mt as CHAT_HEADER, ht as SESSION_HEADER, gt as chatAddressOf, _t as chatChannel, vt as chatHeaders, yt as isSameChat, bt as withChatAddress, xt as workspaceIdentityProvider } from "../../_chunks/principal-DYl7vqOp.mjs";
7
+ export { At as CHAT_ATTRIBUTE, jt as CHAT_HEADER, Mt as RUNTIME_SOURCE_ATTRIBUTE, Nt as SESSION_HEADER, Pt as chatAddressOf, Ft as chatChannel, It as chatHeaders, Lt as chatRuntimeSource, Rt as isSameChat, zt as withChatAddress, Bt as workspaceIdentityProvider } from "../../_chunks/principal-BWTq_zuf.mjs";
@@ -7,7 +7,7 @@ __eveCreateRequire(import.meta.url);
7
7
  import { agentTaskIdOf } from "./agent-task.mjs";
8
8
  import { chatCoordinates, sessionKind } from "./chat-recorder.mjs";
9
9
  import { archiveSequence, chatArchive, chatAuthor, collapseChatEvents, topicContext } from "./chat-archive.mjs";
10
- import { At as reportTelegramError } from "../../_chunks/principal-DYl7vqOp.mjs";
10
+ import { xt as reportTelegramError } from "../../_chunks/principal-BWTq_zuf.mjs";
11
11
  import { createHash } from "node:crypto";
12
12
  import { deliveries, runs, turns } from "eve/events";
13
13
  import { defineState } from "eve/context";
@@ -8,7 +8,7 @@ import { n as contentText, t as CONTENT_CAPS } from "../../_chunks/content-cDtVn
8
8
  import { chatArchive, chatEvent, sessionFailureEventId, summarizeArguments } from "./chat-archive.mjs";
9
9
  import { agentTaskIdOf } from "./agent-task.mjs";
10
10
  import { revisionOf } from "./review/revision.mjs";
11
- import { _t as chatChannel, gt as chatAddressOf, i as memberIdOf, ot as guestIdOf } from "../../_chunks/principal-DYl7vqOp.mjs";
11
+ import { Ft as chatChannel, Pt as chatAddressOf, i as memberIdOf, ot as guestIdOf } from "../../_chunks/principal-BWTq_zuf.mjs";
12
12
  import { keyChannel, principalChannel } from "./channel-scope.mjs";
13
13
  import { parseAddress } from "./telegram/sessions.mjs";
14
14
  import { completionKind } from "./telegram/silent.mjs";
@@ -4,4 +4,4 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- export { N as CONFIRMATION_TTL_MS, P as actionApproval, F as confirmations, I as inputHash, L as needsConfirmation } from "../../_chunks/principal-DYl7vqOp.mjs";
7
+ export { N as CONFIRMATION_TTL_MS, P as actionApproval, F as confirmations, I as inputHash, L as needsConfirmation } from "../../_chunks/principal-BWTq_zuf.mjs";
@@ -4,7 +4,7 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import { _ as AttachmentError } from "../../../_chunks/principal-DYl7vqOp.mjs";
7
+ import { _ as AttachmentError } from "../../../_chunks/principal-BWTq_zuf.mjs";
8
8
  import { sendStoredAttachments } from "../attachments-send.mjs";
9
9
  import { ConnectionProxyError, connectionProxy } from "../connection-proxy.mjs";
10
10
  import { redactDiagnostic } from "../diagnostics.mjs";
@@ -8,7 +8,7 @@ import { PUBSUB_TOPIC } from "../../config.mjs";
8
8
  import { admitMessage, localizedText } from "../admission.mjs";
9
9
  import { agentToolsAttribute } from "../agent-tools.mjs";
10
10
  import { providerChat } from "../attachment-tools.mjs";
11
- import { S as fetchStoredAttachment, b as agentAttachments, bt as withChatAddress, d as prepareInboundMedia, gt as chatAddressOf, i as memberIdOf, m as turnContent } from "../../../_chunks/principal-DYl7vqOp.mjs";
11
+ import { Pt as chatAddressOf, S as fetchStoredAttachment, b as agentAttachments, d as prepareInboundMedia, i as memberIdOf, m as turnContent, zt as withChatAddress } from "../../../_chunks/principal-BWTq_zuf.mjs";
12
12
  import { channelAttributes, currentChannel, currentKey, inHandlerChannels, withNamedRoutes } from "../channel-scope.mjs";
13
13
  import { chatArchive, replyEvent } from "../chat-archive.mjs";
14
14
  import { recordHandledMessage, recordSentOutside } from "../chat-messages.mjs";
@@ -6,7 +6,7 @@ __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import { appOrigin } from "./environment.mjs";
8
8
  import { runtimeToken } from "./runtime-token.mjs";
9
- import { ot as guestIdOf } from "../../_chunks/principal-DYl7vqOp.mjs";
9
+ import { ot as guestIdOf } from "../../_chunks/principal-BWTq_zuf.mjs";
10
10
  const GUEST_USAGE_PATH = "/api/ontology/agent/guests/usage";
11
11
  const REPORT_TIMEOUT_MS = 5e3;
12
12
  function ontologyGuestUsage(options = {}) {
@@ -4,4 +4,4 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- export { f as attachmentsContext, p as storeFiles, m as turnContent } from "../../../_chunks/principal-DYl7vqOp.mjs";
7
+ export { f as attachmentsContext, p as storeFiles, m as turnContent } from "../../../_chunks/principal-BWTq_zuf.mjs";
@@ -4,4 +4,4 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- export { f as attachmentsContext, d as prepareInboundMedia, p as storeFiles, m as turnContent } from "../../../_chunks/principal-DYl7vqOp.mjs";
7
+ export { f as attachmentsContext, d as prepareInboundMedia, p as storeFiles, m as turnContent } from "../../../_chunks/principal-BWTq_zuf.mjs";
@@ -4,4 +4,4 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- export { R as ACT_AS_HEADER, w as actAsHeaders, T as ontologyConnection } from "../../_chunks/principal-DYl7vqOp.mjs";
7
+ export { R as ACT_AS_HEADER, w as actAsHeaders, T as ontologyConnection } from "../../_chunks/principal-BWTq_zuf.mjs";