@segmentstream/agent 0.42.0 → 0.43.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 (115) hide show
  1. package/README.md +24 -24
  2. package/dist/_chunks/{build-metadata-CUyA2hlu.mjs → build-metadata-CkBdh-TE.mjs} +1 -1
  3. package/dist/_chunks/{principal-BIX7T6Hh.mjs → principal-nQ_gwLJs.mjs} +4 -4
  4. package/dist/extension/channels/telegram.mjs +1 -1
  5. package/dist/extension/channels/whatsapp.mjs +1 -1
  6. package/dist/extension/config.d.ts +14 -16
  7. package/dist/extension/config.mjs +57 -12
  8. package/dist/extension/conventions.d.ts +1 -1
  9. package/dist/extension/conventions.mjs +22 -19
  10. package/dist/extension/extension.d.ts +2 -2
  11. package/dist/extension/extension.mjs +3 -3
  12. package/dist/extension/hooks/authorization.mjs +1 -1
  13. package/dist/extension/hooks/{conversations.mjs → chat-recorder.mjs} +4 -4
  14. package/dist/extension/hooks/sandbox.d.ts +2 -2
  15. package/dist/extension/instructions/{conversations.mjs → chat-context.mjs} +2 -2
  16. package/dist/extension/instructions/persona.mjs +1 -1
  17. package/dist/extension/instructions/sandbox.mjs +2 -2
  18. package/dist/extension/instructions.md +10 -10
  19. package/dist/extension/lib/actor.mjs +1 -1
  20. package/dist/extension/lib/attachment-tools.d.ts +1 -1
  21. package/dist/extension/lib/attachment-tools.mjs +7 -7
  22. package/dist/extension/lib/attachments.d.ts +9 -4
  23. package/dist/extension/lib/attachments.mjs +9 -7
  24. package/dist/extension/lib/build-metadata.mjs +1 -1
  25. package/dist/extension/lib/chat-address.d.ts +33 -0
  26. package/dist/extension/lib/{conversation.mjs → chat-address.mjs} +13 -12
  27. package/dist/extension/lib/{conversations.d.ts → chat-archive.d.ts} +12 -12
  28. package/dist/extension/lib/{conversations.mjs → chat-archive.mjs} +9 -9
  29. package/dist/extension/lib/chat-context.d.ts +5 -5
  30. package/dist/extension/lib/chat-context.mjs +6 -6
  31. package/dist/extension/lib/{conversation-runtime.d.ts → chat-recorder.d.ts} +3 -3
  32. package/dist/extension/lib/{conversation-runtime.mjs → chat-recorder.mjs} +13 -13
  33. package/dist/extension/lib/confirmations.d.ts +3 -3
  34. package/dist/extension/lib/confirmations.mjs +8 -8
  35. package/dist/extension/lib/group-routing/addressing.d.ts +1 -1
  36. package/dist/extension/lib/group-routing/addressing.mjs +2 -2
  37. package/dist/extension/lib/group-routing/burst.mjs +2 -2
  38. package/dist/extension/lib/group-routing/{conversation-prompt.d.ts → chat-prompt.d.ts} +2 -2
  39. package/dist/extension/lib/group-routing/{conversation-prompt.mjs → chat-prompt.mjs} +3 -3
  40. package/dist/extension/lib/group-routing/{conversation-router.d.ts → chat-router.d.ts} +6 -6
  41. package/dist/extension/lib/group-routing/{conversation-router.mjs → chat-router.mjs} +9 -9
  42. package/dist/extension/lib/group-routing/engagement.mjs +2 -2
  43. package/dist/extension/lib/group-routing/messages.d.ts +1 -1
  44. package/dist/extension/lib/group-routing/policy.d.ts +6 -6
  45. package/dist/extension/lib/group-routing/policy.mjs +16 -16
  46. package/dist/extension/lib/group-routing/replay.mjs +36 -9
  47. package/dist/extension/lib/group-routing/router.d.ts +3 -3
  48. package/dist/extension/lib/group-routing/router.mjs +16 -16
  49. package/dist/extension/lib/group-routing/routing-context.d.ts +2 -2
  50. package/dist/extension/lib/group-routing/routing-context.mjs +2 -2
  51. package/dist/extension/lib/group-routing/signals.d.ts +3 -3
  52. package/dist/extension/lib/group-routing/signals.mjs +5 -5
  53. package/dist/extension/lib/model-service-alert.d.ts +2 -2
  54. package/dist/extension/lib/model-service-alert.mjs +2 -2
  55. package/dist/extension/lib/ontology-connection.mjs +1 -1
  56. package/dist/extension/lib/ontology-file-call.mjs +1 -1
  57. package/dist/extension/lib/ontology-tools.mjs +1 -1
  58. package/dist/extension/lib/review/hold.d.ts +7 -7
  59. package/dist/extension/lib/review/hold.mjs +12 -12
  60. package/dist/extension/lib/review/judge.d.ts +9 -9
  61. package/dist/extension/lib/review/judge.mjs +12 -12
  62. package/dist/extension/lib/review/reply.d.ts +13 -13
  63. package/dist/extension/lib/review/reply.mjs +20 -20
  64. package/dist/extension/lib/role-skill.mjs +1 -1
  65. package/dist/extension/lib/runtime-envelope.mjs +1 -1
  66. package/dist/extension/lib/sent-files.mjs +3 -2
  67. package/dist/extension/lib/slack/adapter.mjs +2 -2
  68. package/dist/extension/lib/slack/attachments-send.d.ts +2 -2
  69. package/dist/extension/lib/slack/attachments-send.mjs +5 -5
  70. package/dist/extension/lib/slack/files.mjs +4 -4
  71. package/dist/extension/lib/stored-files.mjs +1 -1
  72. package/dist/extension/lib/telegram/adapter.d.ts +4 -3
  73. package/dist/extension/lib/telegram/adapter.mjs +10 -10
  74. package/dist/extension/lib/telegram/attachments-send.mjs +1 -1
  75. package/dist/extension/lib/telegram/callbacks.mjs +1 -1
  76. package/dist/extension/lib/telegram/{conversations.d.ts → chat-archive.d.ts} +7 -7
  77. package/dist/extension/lib/telegram/{conversations.mjs → chat-archive.mjs} +10 -10
  78. package/dist/extension/lib/telegram/confirmation-text.mjs +1 -0
  79. package/dist/extension/lib/telegram/confirmations.d.ts +2 -2
  80. package/dist/extension/lib/telegram/confirmations.mjs +3 -3
  81. package/dist/extension/lib/telegram/delivery-diagnostics.d.ts +3 -3
  82. package/dist/extension/lib/telegram/delivery-diagnostics.mjs +2 -2
  83. package/dist/extension/lib/telegram/files.d.ts +1 -1
  84. package/dist/extension/lib/telegram/files.mjs +8 -8
  85. package/dist/extension/lib/telegram/health.mjs +1 -1
  86. package/dist/extension/lib/telegram/inbound-request.d.ts +1 -1
  87. package/dist/extension/lib/telegram/inbound.d.ts +3 -3
  88. package/dist/extension/lib/telegram/inbound.mjs +36 -36
  89. package/dist/extension/lib/telegram/lifecycle.mjs +3 -3
  90. package/dist/extension/lib/telegram/principal.d.ts +2 -2
  91. package/dist/extension/lib/telegram/principal.mjs +1 -1
  92. package/dist/extension/lib/telegram/router.mjs +2 -2
  93. package/dist/extension/lib/telegram/sessions.d.ts +1 -1
  94. package/dist/extension/lib/telegram/signals.mjs +1 -1
  95. package/dist/extension/lib/telegram/silent.d.ts +2 -2
  96. package/dist/extension/lib/telegram/structured.mjs +1 -1
  97. package/dist/extension/lib/telegram/turn-errors.d.ts +2 -2
  98. package/dist/extension/lib/telegram/turn-errors.mjs +2 -2
  99. package/dist/extension/lib/telegram/voice.d.ts +1 -1
  100. package/dist/extension/lib/whatsapp/adapter.d.ts +2 -2
  101. package/dist/extension/lib/whatsapp/adapter.mjs +2 -2
  102. package/dist/extension/lib/workflow-serializable.d.ts +1 -1
  103. package/dist/extension/model.mjs +1 -1
  104. package/dist/extension/personas.d.ts +1 -1
  105. package/dist/extension/review.d.ts +23 -20
  106. package/dist/extension/review.mjs +21 -34
  107. package/dist/extension/tools/attachments_promote.mjs +1 -1
  108. package/dist/extension/tools/attachments_send.mjs +3 -3
  109. package/dist/extension/tools/no_reply.d.ts +1 -1
  110. package/dist/extension/tools/questions_ask.mjs +4 -4
  111. package/dist/extension/tools/sandbox.mjs +2 -2
  112. package/package.json +2 -2
  113. package/dist/extension/lib/conversation.d.ts +0 -33
  114. /package/dist/extension/hooks/{conversations.d.ts → chat-recorder.d.ts} +0 -0
  115. /package/dist/extension/instructions/{conversations.d.ts → chat-context.d.ts} +0 -0
@@ -6,9 +6,9 @@ __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import { MAXIMUM_ATTACHMENT_BYTES, attachmentUrl } from "../attachments.mjs";
8
8
  import { d as failureText, p as reportTelegramError } from "../../../_chunks/inbound-request-DgQB4g1J.mjs";
9
- import { n as conversationLanguage } from "../../../_chunks/principal-BIX7T6Hh.mjs";
9
+ import { n as chatLanguage } from "../../../_chunks/principal-nQ_gwLJs.mjs";
10
10
  import { describableImage, describeReceivedImage } from "./images.mjs";
11
- function telegramConversation(chatId) {
11
+ function telegramChat(chatId) {
12
12
  return `telegram:${chatId}`;
13
13
  }
14
14
  function inboundAttachments(message) {
@@ -47,7 +47,7 @@ function megabytes(bytes) {
47
47
  }
48
48
  async function stageFiles(input) {
49
49
  const { message } = input;
50
- const conversation = telegramConversation(message.chat.id);
50
+ const chat = telegramChat(message.chat.id);
51
51
  const staged = new Map();
52
52
  let descriptions = 0;
53
53
  for (const [index, file] of message.attachments.entries()) {
@@ -72,7 +72,7 @@ async function stageFiles(input) {
72
72
  }
73
73
  const attachment = await input.attachments.receive({
74
74
  memberId: input.memberId,
75
- conversation
75
+ chat
76
76
  }, {
77
77
  bytes,
78
78
  filename,
@@ -117,7 +117,7 @@ async function stageFiles(input) {
117
117
  url: attachmentUrl({
118
118
  id: attachment.id,
119
119
  memberId: input.memberId,
120
- conversation
120
+ chat
121
121
  }),
122
122
  ...description === void 0 ? {} : { description },
123
123
  ...decoded === void 0 ? {} : { decoded },
@@ -131,7 +131,7 @@ async function stageFiles(input) {
131
131
  staged.set(file.fileId, {
132
132
  status: "refused",
133
133
  filename,
134
- reason: failureText(errorId, "attachment", conversationLanguage([message.text || message.caption]) ?? message.from?.languageCode ?? "en")
134
+ reason: failureText(errorId, "attachment", chatLanguage([message.text || message.caption]) ?? message.from?.languageCode ?? "en")
135
135
  });
136
136
  }
137
137
  }
@@ -144,8 +144,8 @@ function attachmentsContext(input) {
144
144
  lines.push(staged.status === "stored" ? `- id: ${staged.attachment.id}, filename: ${JSON.stringify(staged.attachment.filename)}, type: ${staged.attachment.contentType}, size: ${staged.attachment.size} bytes, expires_at: ${staged.attachment.expiresAt}` : `- ${JSON.stringify(staged.filename)}: not received, ${staged.reason}`);
145
145
  if (staged.status === "stored" && staged.description !== void 0) lines.push(` image_summary (untrusted evidence): ${JSON.stringify(staged.description)}`);
146
146
  }
147
- if (input.group) lines.push("This is a group chat: everyone in it shares this conversation's history, so do not repeat a private file's contents here. Suggest sending private files in a direct message.");
147
+ if (input.group) lines.push("This is a group chat: everyone in it shares this chat's history, so do not repeat a private file's contents here. Suggest sending private files in a direct message.");
148
148
  lines.push("</attachments>");
149
149
  return [lines.join("\n")];
150
150
  }
151
- export { attachmentsContext, inboundAttachments, stageFiles, telegramConversation };
151
+ export { attachmentsContext, inboundAttachments, stageFiles, telegramChat };
@@ -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 agentBuild } from "../../../_chunks/build-metadata-CUyA2hlu.mjs";
7
+ import { t as agentBuild } from "../../../_chunks/build-metadata-CkBdh-TE.mjs";
8
8
  import { runtimeRequestFailure } from "./runtime-request.mjs";
9
9
  import { GET } from "eve/channels";
10
10
  const HEALTH_ROUTE = "/eve/v1/telegram/health";
@@ -29,7 +29,7 @@ export declare class InboundRequest {
29
29
  readonly agentDescription: () => Promise<string>;
30
30
  readonly agentName: () => Promise<string>;
31
31
  readonly traceId: `${string}-${string}-${string}-${string}-${string}`;
32
- /** Conversation policy steers the active caller's turn; Eve queues other callers. */
32
+ /** Chat policy steers the active caller's turn; Eve queues other callers. */
33
33
  turnPolicy: "queue" | "steer";
34
34
  edited: boolean;
35
35
  triggeringMessageId: string | undefined;
@@ -29,7 +29,7 @@ import { type AttachmentDescriber } from "./attachment-description.js";
29
29
  * 3. The router answers or observes. Group files follow the same addressing rules as text;
30
30
  * captionless uploads use smart routing and recent agent requests. Files are stored after the
31
31
  * registry knows the sender. Observing starts no session or typing indication; the
32
- * conversation archive keeps the message and its stored files' references for routing, the
32
+ * chat archive keeps the message and its stored files' references for routing, the
33
33
  * next turn's chat context and the native images that turn carries.
34
34
  * 4. An answered message continues the session its address names under the configured scope; eve
35
35
  * compacts and expires sessions itself.
@@ -49,8 +49,8 @@ export interface InboundDependencies {
49
49
  readonly policy: TelegramPolicy;
50
50
  readonly decisionModel?: string;
51
51
  readonly groups?: GroupPolicy;
52
- /** The chat's or forum topic's recent messages from the conversation archive, oldest first. */
53
- readonly recentConversation?: (chatId: string, threadId?: string) => Promise<ReadonlyArray<RecentMessage>>;
52
+ /** The chat's or forum topic's recent messages from the chat archive, oldest first. */
53
+ readonly recentChat?: (chatId: string, threadId?: string) => Promise<ReadonlyArray<RecentMessage>>;
54
54
  readonly signalSettings?: TelegramSettings["groups"];
55
55
  readonly lifecycle?: (principal: import("eve/context").SessionAuthContext, memberId: string, message: TelegramMessage) => ReturnType<typeof attachmentLifecycle>;
56
56
  readonly admission: () => AdmissionSettings;
@@ -6,10 +6,10 @@ __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import { WorkspaceActionAlreadyDispatched } from "./workspace-action.mjs";
8
8
  import { structuredMessage } from "./structured.mjs";
9
- import { d as telegramRuntimeSource, n as conversationLanguage, o as telegramPrincipal, u as runtimeEnvelope } from "../../../_chunks/principal-BIX7T6Hh.mjs";
9
+ import { d as telegramRuntimeSource, n as chatLanguage, o as telegramPrincipal, u as runtimeEnvelope } from "../../../_chunks/principal-nQ_gwLJs.mjs";
10
10
  import { routingBurst } from "../group-routing/burst.mjs";
11
11
  import { telegramSignals } from "./signals.mjs";
12
- import { addressingReason, conversationKey, otherRecipient } from "../group-routing/signals.mjs";
12
+ import { addressingReason, chatKey, otherRecipient } from "../group-routing/signals.mjs";
13
13
  import { effectiveGroupPolicy, groupPolicy } from "../group-routing/policy.mjs";
14
14
  import { questionInvitation } from "../group-routing/engagement.mjs";
15
15
  import { AttachmentLifecycleNotPermitted } from "./lifecycle.mjs";
@@ -27,7 +27,7 @@ import { routingContext } from "./routing-context.mjs";
27
27
  import { formatAddress, messageAddress, scopedAddress } from "./sessions.mjs";
28
28
  import { voiceOf, voiceText } from "./voice.mjs";
29
29
  import { MAXIMUM_ROUTING_ATTACHMENT_BYTES, describeRoutingAttachment, routingAttachmentDeadline } from "./attachment-description.mjs";
30
- import { recordGateDecision, recordInboundContent, recordRouteDecision } from "./conversations.mjs";
30
+ import { recordGateDecision, recordInboundContent, recordRouteDecision } from "./chat-archive.mjs";
31
31
  import { contentShape, messageContent } from "./content.mjs";
32
32
  import { messageAudience } from "./audience.mjs";
33
33
  import { p as reportTelegramError } from "../../../_chunks/inbound-request-DgQB4g1J.mjs";
@@ -91,7 +91,7 @@ function speakerBlock(input) {
91
91
  if (isRecord(raw)) {
92
92
  const from = isRecord(raw.from) ? raw.from : {};
93
93
  const author = from.is_bot === true && bot !== void 0 && String(from.id) === bot.id ? "the agent" : typeof from.username === "string" ? `@${from.username}` : typeof from.first_name === "string" ? from.first_name : "unknown sender";
94
- const text = input.omitQuote ? "[confirmation; see conversation context]" : messageContent(raw).text;
94
+ const text = input.omitQuote ? "[confirmation; see chat context]" : messageContent(raw).text;
95
95
  const quoted = text.length > MAXIMUM_QUOTE_LENGTH ? `${text.slice(0, MAXIMUM_QUOTE_LENGTH)}…` : text;
96
96
  lines.push(`reply_to: ${author}: ${JSON.stringify(quoted)}`);
97
97
  }
@@ -298,16 +298,16 @@ async function handleInboundMessage(input) {
298
298
  const turn = structured === void 0 && input.request?.structuredContext === void 0 && addressed !== void 0 && hasContent && (addressed !== "reply-to-bot" || elsewhere === void 0);
299
299
  const lookup = await resolve(turn);
300
300
  const group = isGroupChat(sent);
301
- const freshConversation = async () => await dependencies.recentConversation?.(sent.chat.id, sent.messageThreadId === void 0 ? void 0 : String(sent.messageThreadId)) ?? [];
301
+ const freshChat = async () => await dependencies.recentChat?.(sent.chat.id, sent.messageThreadId === void 0 ? void 0 : String(sent.messageThreadId)) ?? [];
302
302
  let archived;
303
- const recentConversation = () => archived ??= freshConversation();
303
+ const recentChat = () => archived ??= freshChat();
304
304
  const languageOf = async (current) => {
305
- const own = conversationLanguage([current]);
305
+ const own = chatLanguage([current]);
306
306
  if (own !== void 0) return own;
307
307
  try {
308
- return conversationLanguage((await recentConversation()).map((message) => message.text).reverse());
308
+ return chatLanguage((await recentChat()).map((message) => message.text).reverse());
309
309
  } catch (error) {
310
- reportTelegramError("conversation_language_unavailable", error, { chatId: sent.chat.id });
310
+ reportTelegramError("chat_language_unavailable", error, { chatId: sent.chat.id });
311
311
  return;
312
312
  }
313
313
  };
@@ -439,7 +439,7 @@ async function handleInboundMessage(input) {
439
439
  const principal = telegramPrincipal({
440
440
  message: sent,
441
441
  member,
442
- conversationLanguage: await languageOf(sent.text || sent.caption)
442
+ chatLanguage: await languageOf(sent.text || sent.caption)
443
443
  });
444
444
  input.request.lifecycle = dependencies.lifecycle(principal, member.id, sent);
445
445
  await context.telegram.startTyping();
@@ -520,10 +520,10 @@ async function handleInboundMessage(input) {
520
520
  const groups = effectiveGroupPolicy(dependencies.groups ?? groupPolicy({}, {
521
521
  mode: dependencies.policy,
522
522
  model: dependencies.decisionModel
523
- }), conversationKey(policySignals));
524
- const conversationPolicy = group && groups.smart.engagement.policy === "conversation";
525
- let conversationRecent = conversationPolicy ? await recentConversation() : [];
526
- if (conversationPolicy && input.request && input.request.lifecycleKey === void 0 && input.request.structuredContext === void 0) {
523
+ }), chatKey(policySignals));
524
+ const chatPolicy = group && groups.smart.engagement.policy === "chat";
525
+ let chatRecent = chatPolicy ? await recentChat() : [];
526
+ if (chatPolicy && input.request && input.request.lifecycleKey === void 0 && input.request.structuredContext === void 0) {
527
527
  address = topicAddress;
528
528
  input.request.address = topicAddress;
529
529
  input.request.turnPolicy = "steer";
@@ -537,12 +537,12 @@ async function handleInboundMessage(input) {
537
537
  });
538
538
  const questionAge = Date.parse(sentAt(sent)) - Date.parse(asked?.meta.at ?? "");
539
539
  if (answering && addressed === void 0 && !questionInvitation(asked?.meta.at, sentAt(sent), groups.smart.engagement.openQuestionMinutes)) answering = false;
540
- const recipientAnswer = !conversationPolicy && answering && (groups.smart.engagement.policy === "engaged" || questionAge >= 0 && questionAge <= groups.smart.engagement.followUpMinutes * 6e4) && audience.replyTo?.kind === "bot" && isRecipientAnswer(audience);
541
- if (!conversationPolicy && answering && pending !== void 0 && input.request !== void 0) {
540
+ const recipientAnswer = !chatPolicy && answering && (groups.smart.engagement.policy === "engaged" || questionAge >= 0 && questionAge <= groups.smart.engagement.followUpMinutes * 6e4) && audience.replyTo?.kind === "bot" && isRecipientAnswer(audience);
541
+ if (!chatPolicy && answering && pending !== void 0 && input.request !== void 0) {
542
542
  address = pending.address || (questionSession === void 0 ? topicAddress : memberQuestionAddress);
543
543
  input.request.address = address;
544
544
  }
545
- if (input.request?.lifecycleKey === void 0 && input.request?.structuredContext === void 0 && group && (addressed === void 0 && !answering && groups.mode === "mention" || !conversationPolicy && elsewhere !== void 0 && (addressed === void 0 || addressed === "reply-to-bot" && !recipientAnswer))) {
545
+ if (input.request?.lifecycleKey === void 0 && input.request?.structuredContext === void 0 && group && (addressed === void 0 && !answering && groups.mode === "mention" || !chatPolicy && elsewhere !== void 0 && (addressed === void 0 || addressed === "reply-to-bot" && !recipientAnswer))) {
546
546
  await recordContent({
547
547
  text: text || (structured === void 0 ? text : `[${structured.kind}]`),
548
548
  decoded
@@ -553,7 +553,7 @@ async function handleInboundMessage(input) {
553
553
  });
554
554
  return null;
555
555
  }
556
- if (!conversationPolicy && hasContent && answering && !await admitTurn(true)) {
556
+ if (!chatPolicy && hasContent && answering && !await admitTurn(true)) {
557
557
  await observeRaw();
558
558
  return null;
559
559
  }
@@ -561,11 +561,11 @@ async function handleInboundMessage(input) {
561
561
  await observeRaw();
562
562
  return null;
563
563
  }
564
- if (group && !conversationPolicy) conversationRecent = (await recentConversation()).filter((message) => message.messageId !== sent.messageId).map(({ signedAuthor, ...message }) => signedAuthor === void 0 ? message : {
564
+ if (group && !chatPolicy) chatRecent = (await recentChat()).filter((message) => message.messageId !== sent.messageId).map(({ signedAuthor, ...message }) => signedAuthor === void 0 ? message : {
565
565
  ...message,
566
566
  author: signedAuthor
567
567
  });
568
- const carried = observedImages(conversationRecent, sent.messageId);
568
+ const carried = observedImages(chatRecent, sent.messageId);
569
569
  const mediaPlan = voice !== void 0 || sent.attachments.length > 0 || carried.length > 0 ? await dependencies.mediaPlan?.(member, owner?.id) : void 0;
570
570
  if (voice !== void 0 && !group) await transcribeVoice(false);
571
571
  if (voice !== void 0 && mediaPlan?.audio) notes.push("[The chat model supports audio, but this host cannot deliver native audio. The configured speech-to-text fallback was used if enabled.]");
@@ -602,7 +602,7 @@ async function handleInboundMessage(input) {
602
602
  let classified = false;
603
603
  let uncertain = false;
604
604
  let question;
605
- const conversation = async () => {
605
+ const routeQuestion = async () => {
606
606
  if (question !== void 0) return question;
607
607
  await report;
608
608
  const context = await routingContext({
@@ -611,7 +611,7 @@ async function handleInboundMessage(input) {
611
611
  address,
612
612
  operations,
613
613
  read: dependencies.history ?? dependencies.readHistory,
614
- remembered: conversationRecent,
614
+ remembered: chatRecent,
615
615
  at: sentAt(sent),
616
616
  questionHistory,
617
617
  questionSessionId: owner?.id
@@ -640,7 +640,7 @@ async function handleInboundMessage(input) {
640
640
  aliases
641
641
  },
642
642
  chat: group ? chatContext(dependencies.chats.chat(sent.chat.id)) : [],
643
- recent: conversationPolicy ? conversationRecent : context.recent,
643
+ recent: chatPolicy ? chatRecent : context.recent,
644
644
  pendingConfirmations: context.pendingConfirmations,
645
645
  pendingQuestions: context.pendingQuestions.filter((question) => question.chatId === sent.chat.id && question.messageThreadId === String(sent.messageThreadId ?? "")),
646
646
  message: observedMessage(sent, text, member, media, bot),
@@ -649,7 +649,7 @@ async function handleInboundMessage(input) {
649
649
  };
650
650
  return question;
651
651
  };
652
- if (conversationPolicy && input.request?.lifecycleKey === void 0 && input.request?.structuredContext === void 0) {
652
+ if (chatPolicy && input.request?.lifecycleKey === void 0 && input.request?.structuredContext === void 0) {
653
653
  if (voice !== void 0) await transcribeVoice(true);
654
654
  const routingSignals = {
655
655
  ...policySignals,
@@ -658,8 +658,8 @@ async function handleInboundMessage(input) {
658
658
  text
659
659
  }
660
660
  };
661
- const burst = routingBurst(routingSignals, conversationRecent, groups);
662
- const q = await conversation();
661
+ const burst = routingBurst(routingSignals, chatRecent, groups);
662
+ const q = await routeQuestion();
663
663
  question = {
664
664
  ...q,
665
665
  signals: routingSignals,
@@ -739,8 +739,8 @@ async function handleInboundMessage(input) {
739
739
  decoded,
740
740
  ...processedMedia === void 0 ? {} : { media: processedMedia }
741
741
  });
742
- if (conversationPolicy) {
743
- const current = await conversation();
742
+ if (chatPolicy) {
743
+ const current = await routeQuestion();
744
744
  const message = {
745
745
  ...current.message,
746
746
  text,
@@ -752,7 +752,7 @@ async function handleInboundMessage(input) {
752
752
  messagesToClassify: current.messagesToClassify?.map((m) => m.messageId === message.messageId ? message : m)
753
753
  };
754
754
  }
755
- return conversation();
755
+ return routeQuestion();
756
756
  }
757
757
  });
758
758
  if (route === "reply" && input.request !== void 0) input.request.engaged = true;
@@ -799,7 +799,7 @@ async function handleInboundMessage(input) {
799
799
  memberId: member.id
800
800
  };
801
801
  try {
802
- if (input.request?.recordStructuredContext === void 0) throw new Error("A structured continuation requires durable conversation capture.");
802
+ if (input.request?.recordStructuredContext === void 0) throw new Error("A structured continuation requires durable chat capture.");
803
803
  await input.request.recordStructuredContext(result.context, member.id);
804
804
  } catch (error) {
805
805
  reportTelegramError("workspace_structured_context_recording_failed", error);
@@ -880,7 +880,7 @@ async function handleInboundMessage(input) {
880
880
  try {
881
881
  outcome = { result: (await dependencies.attachments.promote({
882
882
  memberId: member.id,
883
- conversation: `telegram:${sent.chat.id}`
883
+ chat: `telegram:${sent.chat.id}`
884
884
  }, file.attachment.id, {
885
885
  ...stored.retain,
886
886
  runtime: runtimeEnvelope({ source: telegramRuntimeSource(sent, files) })
@@ -1001,7 +1001,7 @@ async function handleInboundMessage(input) {
1001
1001
  }
1002
1002
  if (voice !== void 0 && input.request !== void 0) input.request.text = text;
1003
1003
  else if (voice !== void 0) notes.push(text);
1004
- if (!conversationPolicy && answering && pending !== void 0 && input.request !== void 0) {
1004
+ if (!chatPolicy && answering && pending !== void 0 && input.request !== void 0) {
1005
1005
  input.request.replyTo = pending.replyToMessageId ?? input.request.replyTo;
1006
1006
  input.request.lifecycleKey = pending.taskId ?? input.request.lifecycleKey;
1007
1007
  input.request.text = `${answerMarker(pending.id)}\n${text}`;
@@ -1027,7 +1027,7 @@ async function handleInboundMessage(input) {
1027
1027
  data: attachmentUrl({
1028
1028
  id: image.id,
1029
1029
  memberId: member.id,
1030
- conversation: `telegram:${sent.chat.id}`
1030
+ chat: `telegram:${sent.chat.id}`
1031
1031
  }),
1032
1032
  mediaType: image.contentType,
1033
1033
  filename: image.filename
@@ -1035,7 +1035,7 @@ async function handleInboundMessage(input) {
1035
1035
  });
1036
1036
  }
1037
1037
  const language = await languageOf(text);
1038
- const confirmationReply = (group ? await conversation() : void 0)?.recent.some((entry) => "role" in entry && entry.confirmation !== void 0 && entry.messageId === audience.replyTo?.messageId) === true;
1038
+ const confirmationReply = (group ? await routeQuestion() : void 0)?.recent.some((entry) => "role" in entry && entry.confirmation !== void 0 && entry.messageId === audience.replyTo?.messageId) === true;
1039
1039
  const beginTurnDispatch = structuredDispatched ? input.request?.beginStructuredContinuation : input.request?.beginDispatch;
1040
1040
  if (beginTurnDispatch !== void 0 && !await beginTurnDispatch()) {
1041
1041
  recordGateDecision("message_already_handled");
@@ -1047,7 +1047,7 @@ async function handleInboundMessage(input) {
1047
1047
  text
1048
1048
  },
1049
1049
  member,
1050
- conversationLanguage: language
1050
+ chatLanguage: language
1051
1051
  });
1052
1052
  const [guidance] = group ? chatContext(dependencies.chats.chat(sent.chat.id)) : [];
1053
1053
  if (guidance !== void 0) principal = {
@@ -1095,7 +1095,7 @@ async function handleInboundMessage(input) {
1095
1095
  bot_tagged: audience.botTagged,
1096
1096
  reply_target: confirmationReply && audience.replyTo !== null ? Object.fromEntries(Object.entries(audience.replyTo).filter(([key]) => key !== "text")) : audience.replyTo,
1097
1097
  tagged_users: audience.mentions,
1098
- ...conversationPolicy ? { engagement_policy: "conversation" } : {},
1098
+ ...chatPolicy ? { engagement_policy: "chat" } : {},
1099
1099
  ...uncertain ? { routing: "uncertain" } : {}
1100
1100
  }) + "\n</message_audience>",
1101
1101
  ...attachmentsContext({
@@ -4,8 +4,8 @@ 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 { d as telegramRuntimeSource, l as principalRuntimeSource, u as runtimeEnvelope } from "../../../_chunks/principal-BIX7T6Hh.mjs";
8
- import { t as agentBuild } from "../../../_chunks/build-metadata-CUyA2hlu.mjs";
7
+ import { d as telegramRuntimeSource, l as principalRuntimeSource, u as runtimeEnvelope } from "../../../_chunks/principal-nQ_gwLJs.mjs";
8
+ import { t as agentBuild } from "../../../_chunks/build-metadata-CkBdh-TE.mjs";
9
9
  import { n as currentInboundRequest } from "../../../_chunks/inbound-request-DgQB4g1J.mjs";
10
10
  import { object } from "../confirmation-description.mjs";
11
11
  import { needsConfirmation } from "../confirmations.mjs";
@@ -39,7 +39,7 @@ function attachmentLifecycle(options) {
39
39
  topic: String(options.message.messageThreadId ?? ""),
40
40
  message: options.message.messageId,
41
41
  sender: options.message.from.id,
42
- locale: String(options.principal.attributes.conversationLanguage ?? options.principal.attributes.locale ?? "en")
42
+ locale: String(options.principal.attributes.chatLanguage ?? options.principal.attributes.conversationLanguage ?? options.principal.attributes.locale ?? "en")
43
43
  },
44
44
  data: {
45
45
  ...data,
@@ -13,11 +13,11 @@ export declare function telegramPrincipal(input: {
13
13
  readonly from: NonNullable<TelegramMessage["from"]>;
14
14
  };
15
15
  readonly member: PairedMember;
16
- readonly conversationLanguage?: string;
16
+ readonly chatLanguage?: string;
17
17
  readonly callbackQueryId?: string;
18
18
  }): SessionAuthContext;
19
19
  /** Short answers and attachment-only turns retain the recent chat language when known. */
20
- export declare function conversationLanguage(texts: readonly string[]): "ru" | "en" | undefined;
20
+ export declare function chatLanguage(texts: readonly string[]): "ru" | "en" | undefined;
21
21
  /**
22
22
  * The member a session principal acts for: `memberId` stamped by a SegmentStream channel. A task
23
23
  * session acts for no member; `actorOf` in `lib/actor.ts` names whom any session acts for.
@@ -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 TELEGRAM_AUTHENTICATOR, n as conversationLanguage, r as identityProviderOf, i as memberIdOf, a as rolesOf, o as telegramPrincipal } from "../../../_chunks/principal-BIX7T6Hh.mjs";
7
+ export { t as TELEGRAM_AUTHENTICATOR, n as chatLanguage, r as identityProviderOf, i as memberIdOf, a as rolesOf, o as telegramPrincipal } from "../../../_chunks/principal-nQ_gwLJs.mjs";
@@ -6,11 +6,11 @@ __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import { telegramSignals } from "./signals.mjs";
8
8
  import { addressingReason as addressingReason$1 } from "../group-routing/signals.mjs";
9
- import { FOLLOW_UP_WINDOW_MS, conversationContext, decisionRouter, routeMessage } from "../group-routing/router.mjs";
9
+ import { FOLLOW_UP_WINDOW_MS, decisionRouter, routeMessage, routingEvidence } from "../group-routing/router.mjs";
10
10
  function addressingReason(message, bot) {
11
11
  return addressingReason$1(telegramSignals(message, bot));
12
12
  }
13
13
  function isAddressed(message, bot) {
14
14
  return addressingReason(message, bot) !== void 0;
15
15
  }
16
- export { FOLLOW_UP_WINDOW_MS, addressingReason, conversationContext, decisionRouter, isAddressed, routeMessage };
16
+ export { FOLLOW_UP_WINDOW_MS, addressingReason, decisionRouter, isAddressed, routeMessage, routingEvidence };
@@ -7,7 +7,7 @@ import type { SessionSettings } from "../../config.js";
7
7
  * a group session spans. Compaction and idle expiry are eve's own: automatic compaction near the
8
8
  * context window and `limits.sessionTimeoutMs` in the workspace's `agent.ts`.
9
9
  */
10
- /** eve's Telegram continuation address: `chat:thread:conversation`, the last two possibly empty. */
10
+ /** eve's Telegram continuation address: `chat:thread:conversationId` (eve's names), the last two possibly empty. */
11
11
  export interface TelegramAddress {
12
12
  readonly chatId: string;
13
13
  readonly messageThreadId: string;
@@ -13,7 +13,7 @@ function telegramSignals(message, bot, settings) {
13
13
  const command = /^\/[A-Za-z0-9_]+(?:@(?<target>[A-Za-z0-9_]+))?(?:\s|$)/u.exec(message.text || message.caption);
14
14
  return {
15
15
  provider: "telegram",
16
- conversation: {
16
+ chat: {
17
17
  externalId: message.chat.id,
18
18
  kind: message.chat.type === "private" ? "direct" : "group",
19
19
  title: message.chat.title,
@@ -32,9 +32,9 @@ export interface InterimMessages {
32
32
  * The channel's final reply: formatted and split before Eve's plain-text splitter, with one
33
33
  * queue slot for the whole reply. Explicit silence markers have no delivery. Tool-call steps have
34
34
  * none either unless `interim` is enabled: then their text is delivered exactly like a reply. The
35
- * conversation archive records every delivery for routing and chat context. A text already
35
+ * chat archive records every delivery for routing and chat context. A text already
36
36
  * delivered as an interim message in the same turn, whether a repeat or the final reply, is not
37
- * delivered again. With `review`, a conversation whose replies are reviewed gets no interim
37
+ * delivered again. With `review`, a chat whose replies are reviewed gets no interim
38
38
  * messages, and its final reply is sent only when the review allows it.
39
39
  */
40
40
  export declare function replyDelivery(scope?: () => string, interim?: InterimMessages, review?: ReplyReview): MessageCompleted;
@@ -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 { d as telegramRuntimeSource, u as runtimeEnvelope } from "../../../_chunks/principal-BIX7T6Hh.mjs";
7
+ import { d as telegramRuntimeSource, u as runtimeEnvelope } from "../../../_chunks/principal-nQ_gwLJs.mjs";
8
8
  import { workspaceAction } from "./workspace-action.mjs";
9
9
  import { STRUCTURED_KINDS } from "./structured-settings.mjs";
10
10
  const record = (value) => {
@@ -1,8 +1,8 @@
1
1
  import type { TelegramChannelEvents } from "eve/channels/telegram";
2
- import type { Conversations } from "../conversations.js";
2
+ import type { ChatArchive } from "../chat-archive.js";
3
3
  import type { AgentIdentities } from "../identities.js";
4
4
  /** Failure notices for members; an unrecoverable session failure is also recorded to the archive. */
5
5
  export declare function telegramFailureEvents(input: {
6
- readonly archive: Conversations;
6
+ readonly archive: ChatArchive;
7
7
  readonly identities: () => AgentIdentities;
8
8
  }): Pick<TelegramChannelEvents, "turn.settled" | "session.ended" | "interaction.settled" | "interaction.opened">;
@@ -6,9 +6,9 @@ __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import { telegramText } from "./texts.mjs";
8
8
  import { confirmationLocale } from "./confirmation-text.mjs";
9
- import { recordSessionFailure } from "./conversations.mjs";
9
+ import { recordSessionFailure } from "./chat-archive.mjs";
10
10
  import { c as customerCopy, d as failureText, o as currentLocale, p as reportTelegramError, s as currentThreadId } from "../../../_chunks/inbound-request-DgQB4g1J.mjs";
11
- import { i as memberIdOf } from "../../../_chunks/principal-BIX7T6Hh.mjs";
11
+ import { i as memberIdOf } from "../../../_chunks/principal-nQ_gwLJs.mjs";
12
12
  import { modelServiceFailure } from "../model-service-failure.mjs";
13
13
  function telegramFailureEvents(input) {
14
14
  return {
@@ -3,7 +3,7 @@ import { type ConnectionProxy } from "../connection-proxy.js";
3
3
  * Voice, audio and video notes. eve's Telegram parser reads only photos and documents, so these
4
4
  * arrive as a message with no text; the adapter reads them from the raw update, downloads them
5
5
  * through the connection's `file` API and turns them into text with the configured speech-to-text
6
- * model before the conversation sees them, whatever the main model accepts.
6
+ * model before the session sees them, whatever the main model accepts.
7
7
  */
8
8
  export type VoiceKind = "voice" | "audio" | "video_note";
9
9
  export interface VoiceMessage {
@@ -37,7 +37,7 @@ export interface WhatsAppChannelOptions {
37
37
  readonly fetch?: typeof fetch;
38
38
  /** The ontology's pairing routes; tests pass a fake. */
39
39
  readonly identities?: AgentIdentities;
40
- /** Who sends the agent's replies, from `conversations`; without it every reply is sent. */
40
+ /** Who sends the agent's replies, from `review`; without it every reply is sent. */
41
41
  readonly review?: ChannelReviewOptions;
42
42
  }
43
43
  /** What the adapter reads per request: eve binds the mount after it loads the channel. */
@@ -74,7 +74,7 @@ export declare function segmentstreamWhatsApp(options: WhatsAppChannelOptions):
74
74
  * after answering anyone else with the workspace's reply, if it has one.
75
75
  */
76
76
  export declare function receive(input: {
77
- /** The Chat SDK thread: its id names the conversation, one person's chat with the number. */
77
+ /** The Chat SDK thread: its id names the chat, one person's chat with the number. */
78
78
  readonly thread: {
79
79
  readonly id: string;
80
80
  readonly post: (message: string | PostableCard) => Promise<unknown>;
@@ -6,7 +6,7 @@ __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import { admitMessage, localizedText } from "../admission.mjs";
8
8
  import { chatSdkButtonAnswer, withButtonDecision } from "../confirmation-buttons.mjs";
9
- import { withConversation } from "../conversation.mjs";
9
+ import { withChatAddress } from "../chat-address.mjs";
10
10
  import { channelReview, withReviewedReplies } from "../review/reply.mjs";
11
11
  import { redactDiagnostic } from "../diagnostics.mjs";
12
12
  import { MAXIMUM_DOWNLOAD_BYTES, connectionProxy } from "../connection-proxy.mjs";
@@ -209,7 +209,7 @@ async function receive(input) {
209
209
  });
210
210
  switch (resolution.status) {
211
211
  case "existing":
212
- case "created": return turn ? withConversation(whatsappPrincipal(resolution.member, sender), {
212
+ case "created": return turn ? withChatAddress(whatsappPrincipal(resolution.member, sender), {
213
213
  provider: "whatsapp",
214
214
  chatId: thread.id,
215
215
  threadId: "",
@@ -1,4 +1,4 @@
1
- /** JSON data produced by SDK tools and conversation archive events. */
1
+ /** JSON data produced by SDK tools and chat archive events. */
2
2
  export type WorkflowSerializable = null | boolean | number | string | WorkflowSerializable[] | {
3
3
  [key: string]: WorkflowSerializable;
4
4
  };
@@ -6,7 +6,7 @@ __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import { chatModelChoiceOf } from "./config.mjs";
8
8
  import { isPreview } from "./lib/environment.mjs";
9
- import { a as rolesOf } from "../_chunks/principal-BIX7T6Hh.mjs";
9
+ import { a as rolesOf } from "../_chunks/principal-nQ_gwLJs.mjs";
10
10
  import { defineDynamic } from "eve";
11
11
  import { runs } from "eve/events";
12
12
  function chooseModel(input) {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Personas: what the agent is to the person in a conversation. `agent/segmentstream.json` says
2
+ * Personas: what the agent is to the person in a chat. `agent/segmentstream.json` says
3
3
  * which roles get which persona; each persona's text is `agent/personas/<persona>.md`, which the
4
4
  * SDK reads when the agent is built and the platform puts inline (`personas.texts`) when it
5
5
  * deploys, so the running agent, which has no files, reads the same text. Selection reads only the
@@ -1,11 +1,11 @@
1
1
  /**
2
- * Review: who sends the agent's replies in a conversation. `conversations` in
3
- * `agent/segmentstream.json` sets it per role of the person the agent replies to, the first role
4
- * they hold winning in the order written, and a `default` for everyone else:
2
+ * Review: who sends the agent's replies. `review` in `agent/segmentstream.json` sets it per role of
3
+ * the person the agent replies to, the first role they hold winning in the order written, and a
4
+ * `default` for everyone else:
5
5
  *
6
6
  * - `never`: the agent sends its replies itself;
7
7
  * - `always`: every reply waits for a member to approve, edit or reject it;
8
- * - `whenUnsure`: a decision model judges each reply from the conversation and the criteria in
8
+ * - `whenUnsure`: a decision model judges each reply from the chat and the criteria in
9
9
  * `agent/review/<role>.md` (`default.md` for `default`); the agent sends it when the model gives
10
10
  * at least `minConfidence` that staff would send it as written, and holds it otherwise.
11
11
  *
@@ -17,8 +17,8 @@
17
17
  export declare const REVIEW_DIRECTORY = "review";
18
18
  /** The longest criteria the decision model reads; longer ones fail validation. */
19
19
  export declare const MAXIMUM_CRITERIA_LENGTH = 8000;
20
- /** The key of the settings for everyone no role matches, and the name of its criteria file. */
21
- export declare const DEFAULT_CONVERSATION = "default";
20
+ /** The key of the review for everyone no role matches, and the name of its criteria file. */
21
+ export declare const DEFAULT_REVIEW = "default";
22
22
  export declare const REVIEW_MODES: readonly ["never", "always", "whenUnsure"];
23
23
  export type ReviewMode = (typeof REVIEW_MODES)[number];
24
24
  export type Review = {
@@ -32,17 +32,14 @@ export type Review = {
32
32
  /** `agent/review/<role>.md`: what staff check a reply for. Put inline, not written by hand. */
33
33
  readonly criteria?: string;
34
34
  };
35
- export interface ConversationSettings {
36
- readonly review: Review;
37
- }
38
- export interface ConversationsSettings {
39
- /** Settings per role of the person the agent replies to; the first role they hold wins. */
40
- readonly byRole: Readonly<Record<string, ConversationSettings>>;
35
+ export interface ReviewSettings {
36
+ /** The review per role of the person the agent replies to; the first role they hold wins. */
37
+ readonly byRole: Readonly<Record<string, Review>>;
41
38
  /** Everyone no role matches, including a person with no roles. */
42
- readonly default: ConversationSettings;
39
+ readonly default: Review;
43
40
  }
44
- /** Without `conversations`, or for a key it leaves out: the agent sends its replies itself. */
45
- export declare const SEND_REPLIES: ConversationSettings;
41
+ /** Without `review`, or for a key it leaves out: the agent sends its replies itself. */
42
+ export declare const SEND_REPLIES: Review;
46
43
  /** One validation failure, in Standard Schema's issue shape. */
47
44
  interface Issue {
48
45
  readonly message: string;
@@ -50,12 +47,18 @@ interface Issue {
50
47
  }
51
48
  /** The path of a key's criteria, relative to the directory of `segmentstream.json`. */
52
49
  export declare function reviewFile(key: string): string | undefined;
53
- /** The settings for a person with `roles`: the first `byRole` entry they hold, or the default. */
54
- export declare function conversationFor(settings: ConversationsSettings | undefined, roles: ReadonlyArray<string>): ConversationSettings;
55
- /** Validates `conversations` of `agent/segmentstream.json`; `undefined` when absent. */
56
- export declare function conversationsSettings(value: unknown, issues: Issue[]): ConversationsSettings | undefined;
50
+ /** The review for a person with `roles`: the first `byRole` entry they hold, or the default. */
51
+ export declare function reviewFor(settings: ReviewSettings | undefined, roles: ReadonlyArray<string>): Review;
52
+ /** Validates `review` of `agent/segmentstream.json`; `undefined` when absent. */
53
+ export declare function reviewSettings(value: unknown, issues: Issue[]): ReviewSettings | undefined;
54
+ /**
55
+ * @legacy agent.conversations-review-settings
56
+ * `review` as the first SDK release with it wrote it: `conversations`, with each role's and the
57
+ * default's review one level deeper, under `review`. Anything else is returned as it is.
58
+ */
59
+ export declare function earlierReviewInput(value: unknown): unknown;
57
60
  /**
58
- * The keys `conversations` names whose reply a model judges, with each one's criteria file:
61
+ * The keys `review` names whose reply a model judges, with each one's criteria file:
59
62
  * `byRole`'s roles, then `default`.
60
63
  */
61
64
  export declare function criteriaFiles(value: unknown): ReadonlyArray<{