@segmentstream/agent 0.42.1 → 0.44.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.
- package/CHANGELOG.md +1033 -0
- package/README.md +25 -24
- package/dist/_chunks/{build-metadata-BPEZ5XVM.mjs → build-metadata-BnufKOxq.mjs} +1 -1
- package/dist/_chunks/{inbound-request-DgQB4g1J.mjs → inbound-request-CK0QqEOP.mjs} +36 -1
- package/dist/_chunks/{principal-BIX7T6Hh.mjs → principal-BXvelsZk.mjs} +5 -5
- package/dist/extension/channels/telegram.mjs +1 -1
- package/dist/extension/channels/whatsapp.mjs +1 -1
- package/dist/extension/config.d.ts +26 -18
- package/dist/extension/config.mjs +65 -12
- package/dist/extension/conventions.d.ts +1 -1
- package/dist/extension/conventions.mjs +22 -19
- package/dist/extension/extension.d.ts +2 -2
- package/dist/extension/extension.mjs +3 -3
- package/dist/extension/hooks/authorization.mjs +1 -1
- package/dist/extension/hooks/{conversations.mjs → chat-recorder.mjs} +4 -4
- package/dist/extension/hooks/sandbox.d.ts +2 -2
- package/dist/extension/instructions/{conversations.mjs → chat-context.mjs} +2 -2
- package/dist/extension/instructions/persona.mjs +1 -1
- package/dist/extension/instructions/sandbox.mjs +2 -2
- package/dist/extension/instructions.md +10 -10
- package/dist/extension/lib/actor.mjs +1 -1
- package/dist/extension/lib/attachment-tools.d.ts +1 -1
- package/dist/extension/lib/attachment-tools.mjs +7 -7
- package/dist/extension/lib/attachments.d.ts +9 -4
- package/dist/extension/lib/attachments.mjs +9 -7
- package/dist/extension/lib/build-metadata.mjs +1 -1
- package/dist/extension/lib/chat-address.d.ts +33 -0
- package/dist/extension/lib/{conversation.mjs → chat-address.mjs} +13 -12
- package/dist/extension/lib/{conversations.d.ts → chat-archive.d.ts} +12 -12
- package/dist/extension/lib/{conversations.mjs → chat-archive.mjs} +9 -9
- package/dist/extension/lib/chat-context.d.ts +5 -5
- package/dist/extension/lib/chat-context.mjs +7 -7
- package/dist/extension/lib/{conversation-runtime.d.ts → chat-recorder.d.ts} +3 -3
- package/dist/extension/lib/{conversation-runtime.mjs → chat-recorder.mjs} +13 -13
- package/dist/extension/lib/confirmations.d.ts +3 -3
- package/dist/extension/lib/confirmations.mjs +8 -8
- package/dist/extension/lib/group-routing/addressing.d.ts +1 -1
- package/dist/extension/lib/group-routing/addressing.mjs +2 -2
- package/dist/extension/lib/group-routing/burst.mjs +2 -2
- package/dist/extension/lib/group-routing/{conversation-prompt.d.ts → chat-prompt.d.ts} +2 -2
- package/dist/extension/lib/group-routing/{conversation-prompt.mjs → chat-prompt.mjs} +3 -3
- package/dist/extension/lib/group-routing/{conversation-router.d.ts → chat-router.d.ts} +6 -6
- package/dist/extension/lib/group-routing/{conversation-router.mjs → chat-router.mjs} +9 -9
- package/dist/extension/lib/group-routing/engagement.mjs +2 -2
- package/dist/extension/lib/group-routing/messages.d.ts +1 -1
- package/dist/extension/lib/group-routing/policy.d.ts +6 -6
- package/dist/extension/lib/group-routing/policy.mjs +16 -16
- package/dist/extension/lib/group-routing/replay.mjs +36 -9
- package/dist/extension/lib/group-routing/router.d.ts +3 -3
- package/dist/extension/lib/group-routing/router.mjs +16 -16
- package/dist/extension/lib/group-routing/routing-context.d.ts +2 -2
- package/dist/extension/lib/group-routing/routing-context.mjs +2 -2
- package/dist/extension/lib/group-routing/signals.d.ts +3 -3
- package/dist/extension/lib/group-routing/signals.mjs +5 -5
- package/dist/extension/lib/model-service-alert.d.ts +2 -2
- package/dist/extension/lib/model-service-alert.mjs +2 -2
- package/dist/extension/lib/ontology-connection.mjs +1 -1
- package/dist/extension/lib/ontology-file-call.mjs +1 -1
- package/dist/extension/lib/ontology-tools.mjs +1 -1
- package/dist/extension/lib/review/hold.d.ts +7 -7
- package/dist/extension/lib/review/hold.mjs +12 -12
- package/dist/extension/lib/review/judge.d.ts +9 -9
- package/dist/extension/lib/review/judge.mjs +12 -12
- package/dist/extension/lib/review/reply.d.ts +13 -13
- package/dist/extension/lib/review/reply.mjs +20 -20
- package/dist/extension/lib/role-skill.mjs +1 -1
- package/dist/extension/lib/runtime-envelope.mjs +1 -1
- package/dist/extension/lib/sent-files.mjs +3 -2
- package/dist/extension/lib/slack/adapter.mjs +2 -2
- package/dist/extension/lib/slack/attachments-send.d.ts +2 -2
- package/dist/extension/lib/slack/attachments-send.mjs +6 -6
- package/dist/extension/lib/slack/files.mjs +4 -4
- package/dist/extension/lib/stored-files.mjs +1 -1
- package/dist/extension/lib/telegram/adapter.d.ts +4 -3
- package/dist/extension/lib/telegram/adapter.mjs +35 -15
- package/dist/extension/lib/telegram/app-links.d.ts +39 -0
- package/dist/extension/lib/telegram/app-links.mjs +53 -0
- package/dist/extension/lib/telegram/attachment-description.mjs +1 -1
- package/dist/extension/lib/telegram/attachments-send.mjs +2 -2
- package/dist/extension/lib/telegram/callbacks.mjs +2 -2
- package/dist/extension/lib/telegram/{conversations.d.ts → chat-archive.d.ts} +7 -7
- package/dist/extension/lib/telegram/{conversations.mjs → chat-archive.mjs} +11 -11
- package/dist/extension/lib/telegram/confirmation-text.mjs +1 -0
- package/dist/extension/lib/telegram/confirmations.d.ts +2 -2
- package/dist/extension/lib/telegram/confirmations.mjs +4 -4
- package/dist/extension/lib/telegram/customer-text.d.ts +2 -1
- package/dist/extension/lib/telegram/customer-text.mjs +1 -1
- package/dist/extension/lib/telegram/delivery-diagnostics.d.ts +3 -3
- package/dist/extension/lib/telegram/delivery-diagnostics.mjs +2 -2
- package/dist/extension/lib/telegram/files.d.ts +1 -1
- package/dist/extension/lib/telegram/files.mjs +9 -9
- package/dist/extension/lib/telegram/health.mjs +1 -1
- package/dist/extension/lib/telegram/images.mjs +1 -1
- package/dist/extension/lib/telegram/inbound-request.d.ts +1 -1
- package/dist/extension/lib/telegram/inbound-request.mjs +1 -1
- package/dist/extension/lib/telegram/inbound.d.ts +3 -3
- package/dist/extension/lib/telegram/inbound.mjs +37 -37
- package/dist/extension/lib/telegram/lifecycle.mjs +4 -4
- package/dist/extension/lib/telegram/media-policy.mjs +1 -1
- package/dist/extension/lib/telegram/principal.d.ts +2 -2
- package/dist/extension/lib/telegram/principal.mjs +1 -1
- package/dist/extension/lib/telegram/router.mjs +2 -2
- package/dist/extension/lib/telegram/session-recovery.mjs +1 -1
- package/dist/extension/lib/telegram/sessions.d.ts +1 -1
- package/dist/extension/lib/telegram/signals.mjs +1 -1
- package/dist/extension/lib/telegram/silent.d.ts +2 -2
- package/dist/extension/lib/telegram/silent.mjs +1 -1
- package/dist/extension/lib/telegram/structured.mjs +1 -1
- package/dist/extension/lib/telegram/turn-errors.d.ts +2 -2
- package/dist/extension/lib/telegram/turn-errors.mjs +3 -3
- package/dist/extension/lib/telegram/voice.d.ts +1 -1
- package/dist/extension/lib/telegram/voice.mjs +1 -1
- package/dist/extension/lib/whatsapp/adapter.d.ts +2 -2
- package/dist/extension/lib/whatsapp/adapter.mjs +4 -2
- package/dist/extension/lib/whatsapp/links.d.ts +12 -0
- package/dist/extension/lib/whatsapp/links.mjs +34 -0
- package/dist/extension/lib/workflow-serializable.d.ts +1 -1
- package/dist/extension/model.mjs +1 -1
- package/dist/extension/personas.d.ts +1 -1
- package/dist/extension/review.d.ts +23 -20
- package/dist/extension/review.mjs +21 -34
- package/dist/extension/tools/attachments_promote.mjs +1 -1
- package/dist/extension/tools/attachments_send.mjs +3 -3
- package/dist/extension/tools/no_reply.d.ts +1 -1
- package/dist/extension/tools/questions_ask.mjs +4 -4
- package/dist/extension/tools/sandbox.mjs +2 -2
- package/package.json +3 -2
- package/dist/extension/lib/conversation.d.ts +0 -33
- /package/dist/extension/hooks/{conversations.d.ts → chat-recorder.d.ts} +0 -0
- /package/dist/extension/instructions/{conversations.d.ts → chat-context.d.ts} +0 -0
|
@@ -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
|
|
9
|
+
import { d as telegramRuntimeSource, n as chatLanguage, o as telegramPrincipal, u as runtimeEnvelope } from "../../../_chunks/principal-BXvelsZk.mjs";
|
|
10
10
|
import { routingBurst } from "../group-routing/burst.mjs";
|
|
11
11
|
import { telegramSignals } from "./signals.mjs";
|
|
12
|
-
import { addressingReason,
|
|
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,10 +27,10 @@ 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 "./
|
|
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
|
-
import { p as reportTelegramError } from "../../../_chunks/inbound-request-
|
|
33
|
+
import { p as reportTelegramError } from "../../../_chunks/inbound-request-CK0QqEOP.mjs";
|
|
34
34
|
const MAXIMUM_QUOTE_LENGTH = 500;
|
|
35
35
|
function buttonTo(text, url) {
|
|
36
36
|
return { inline_keyboard: [[{
|
|
@@ -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
|
|
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
|
|
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
|
|
303
|
+
const recentChat = () => archived ??= freshChat();
|
|
304
304
|
const languageOf = async (current) => {
|
|
305
|
-
const own =
|
|
305
|
+
const own = chatLanguage([current]);
|
|
306
306
|
if (own !== void 0) return own;
|
|
307
307
|
try {
|
|
308
|
-
return
|
|
308
|
+
return chatLanguage((await recentChat()).map((message) => message.text).reverse());
|
|
309
309
|
} catch (error) {
|
|
310
|
-
reportTelegramError("
|
|
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
|
-
|
|
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
|
-
}),
|
|
524
|
-
const
|
|
525
|
-
let
|
|
526
|
-
if (
|
|
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 = !
|
|
541
|
-
if (!
|
|
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" || !
|
|
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 (!
|
|
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 && !
|
|
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(
|
|
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
|
|
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:
|
|
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:
|
|
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 (
|
|
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,
|
|
662
|
-
const q = await
|
|
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 (
|
|
743
|
-
const current = await
|
|
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
|
|
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
|
|
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
|
-
|
|
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 (!
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
...
|
|
1098
|
+
...chatPolicy ? { engagement_policy: "chat" } : {},
|
|
1099
1099
|
...uncertain ? { routing: "uncertain" } : {}
|
|
1100
1100
|
}) + "\n</message_audience>",
|
|
1101
1101
|
...attachmentsContext({
|
|
@@ -4,9 +4,9 @@ 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-
|
|
8
|
-
import { t as agentBuild } from "../../../_chunks/build-metadata-
|
|
9
|
-
import { n as currentInboundRequest } from "../../../_chunks/inbound-request-
|
|
7
|
+
import { d as telegramRuntimeSource, l as principalRuntimeSource, u as runtimeEnvelope } from "../../../_chunks/principal-BXvelsZk.mjs";
|
|
8
|
+
import { t as agentBuild } from "../../../_chunks/build-metadata-BnufKOxq.mjs";
|
|
9
|
+
import { n as currentInboundRequest } from "../../../_chunks/inbound-request-CK0QqEOP.mjs";
|
|
10
10
|
import { object } from "../confirmation-description.mjs";
|
|
11
11
|
import { needsConfirmation } from "../confirmations.mjs";
|
|
12
12
|
import { OntologyActionNotPermitted, actionToolName, ontologyTools } from "../ontology-tools.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,
|
|
@@ -5,7 +5,7 @@ const __filename = __eveFileURLToPath(import.meta.url);
|
|
|
5
5
|
__eveDirname(__filename);
|
|
6
6
|
__eveCreateRequire(import.meta.url);
|
|
7
7
|
import { DEFAULT_IMAGE_DESCRIPTION_MODEL } from "../../config.mjs";
|
|
8
|
-
import { p as reportTelegramError } from "../../../_chunks/inbound-request-
|
|
8
|
+
import { p as reportTelegramError } from "../../../_chunks/inbound-request-CK0QqEOP.mjs";
|
|
9
9
|
function planMedia(capabilities, descriptionModel = null) {
|
|
10
10
|
if (typeof descriptionModel === "string") return {
|
|
11
11
|
images: "describe",
|
|
@@ -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
|
|
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
|
|
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
|
|
7
|
+
export { t as TELEGRAM_AUTHENTICATOR, n as chatLanguage, r as identityProviderOf, i as memberIdOf, a as rolesOf, o as telegramPrincipal } from "../../../_chunks/principal-BXvelsZk.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,
|
|
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,
|
|
16
|
+
export { FOLLOW_UP_WINDOW_MS, addressingReason, decisionRouter, isAddressed, routeMessage, routingEvidence };
|
|
@@ -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 { p as reportTelegramError } from "../../../_chunks/inbound-request-
|
|
7
|
+
import { p as reportTelegramError } from "../../../_chunks/inbound-request-CK0QqEOP.mjs";
|
|
8
8
|
import { createHash } from "node:crypto";
|
|
9
9
|
function strandedRun(error) {
|
|
10
10
|
if (!(error instanceof Error) || error.name !== "RunKeyFetchError" || !("status" in error) || error.status !== 404) return;
|
|
@@ -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:
|
|
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
|
-
|
|
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
|
-
*
|
|
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
|
|
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;
|
|
@@ -5,7 +5,7 @@ const __filename = __eveFileURLToPath(import.meta.url);
|
|
|
5
5
|
__eveDirname(__filename);
|
|
6
6
|
__eveCreateRequire(import.meta.url);
|
|
7
7
|
import { confirmationLocale } from "./confirmation-text.mjs";
|
|
8
|
-
import { a as TelegramDeliveryError, l as customerMessage, o as currentLocale, p as reportTelegramError } from "../../../_chunks/inbound-request-
|
|
8
|
+
import { a as TelegramDeliveryError, l as customerMessage, o as currentLocale, p as reportTelegramError } from "../../../_chunks/inbound-request-CK0QqEOP.mjs";
|
|
9
9
|
import { splitTelegramText } from "./format.mjs";
|
|
10
10
|
import { inTelegramSendQueue } from "./send-queue.mjs";
|
|
11
11
|
const NO_REPLY_TOOL = "no_reply";
|
|
@@ -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-
|
|
7
|
+
import { d as telegramRuntimeSource, u as runtimeEnvelope } from "../../../_chunks/principal-BXvelsZk.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 {
|
|
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:
|
|
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 "./
|
|
10
|
-
import { c as customerCopy, d as failureText, o as currentLocale, p as reportTelegramError, s as currentThreadId } from "../../../_chunks/inbound-request-
|
|
11
|
-
import { i as memberIdOf } from "../../../_chunks/principal-
|
|
9
|
+
import { recordSessionFailure } from "./chat-archive.mjs";
|
|
10
|
+
import { c as customerCopy, d as failureText, o as currentLocale, p as reportTelegramError, s as currentThreadId } from "../../../_chunks/inbound-request-CK0QqEOP.mjs";
|
|
11
|
+
import { i as memberIdOf } from "../../../_chunks/principal-BXvelsZk.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
|
|
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 {
|
|
@@ -5,7 +5,7 @@ const __filename = __eveFileURLToPath(import.meta.url);
|
|
|
5
5
|
__eveDirname(__filename);
|
|
6
6
|
__eveCreateRequire(import.meta.url);
|
|
7
7
|
import "../connection-proxy.mjs";
|
|
8
|
-
import { p as reportTelegramError } from "../../../_chunks/inbound-request-
|
|
8
|
+
import { p as reportTelegramError } from "../../../_chunks/inbound-request-CK0QqEOP.mjs";
|
|
9
9
|
import { gateway, transcribe } from "ai";
|
|
10
10
|
const LABELS = {
|
|
11
11
|
voice: "voice message",
|
|
@@ -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 `
|
|
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
|
|
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,13 +6,14 @@ __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 {
|
|
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";
|
|
13
13
|
import { appOrigin, channelsEnabled, proxyEnvironment, webhookSecret } from "../environment.mjs";
|
|
14
14
|
import { agentIdentities } from "../identities.mjs";
|
|
15
15
|
import { runtimeToken } from "../runtime-token.mjs";
|
|
16
|
+
import { withPlainLinks } from "./links.mjs";
|
|
16
17
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
17
18
|
import { createMemoryState } from "@chat-adapter/state-memory";
|
|
18
19
|
import { WhatsAppAdapter, WhatsAppApiError } from "@chat-adapter/whatsapp";
|
|
@@ -41,6 +42,7 @@ var ProxiedWhatsAppAdapter = class extends WhatsAppAdapter {
|
|
|
41
42
|
logger: new ConsoleLogger("warn", "whatsapp")
|
|
42
43
|
});
|
|
43
44
|
this.#runtime = runtime;
|
|
45
|
+
this.formatConverter = withPlainLinks(this.formatConverter);
|
|
44
46
|
}
|
|
45
47
|
async handleWebhook(request, options) {
|
|
46
48
|
if (!this.#runtime.enabled()) return new Response(null, { status: 404 });
|
|
@@ -209,7 +211,7 @@ async function receive(input) {
|
|
|
209
211
|
});
|
|
210
212
|
switch (resolution.status) {
|
|
211
213
|
case "existing":
|
|
212
|
-
case "created": return turn ?
|
|
214
|
+
case "created": return turn ? withChatAddress(whatsappPrincipal(resolution.member, sender), {
|
|
213
215
|
provider: "whatsapp",
|
|
214
216
|
chatId: thread.id,
|
|
215
217
|
threadId: "",
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Root } from "chat";
|
|
2
|
+
/** What this module needs of the Chat SDK adapter's Markdown converter. */
|
|
3
|
+
export interface AstRenderer {
|
|
4
|
+
fromAst(ast: Root): string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The converter with every link written as WhatsApp shows it. WhatsApp has no Markdown link, so a
|
|
8
|
+
* link written `[label](url)` reached the person as written, and a bare URL in angle brackets.
|
|
9
|
+
* Each link becomes `label: url`, or the URL alone when its label is the URL, which WhatsApp makes
|
|
10
|
+
* tappable. The links go in after the Markdown is written, so no character of a URL is escaped.
|
|
11
|
+
*/
|
|
12
|
+
export declare function withPlainLinks<T extends AstRenderer>(converter: T): T;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { fileURLToPath as __eveFileURLToPath } from "node:url";
|
|
2
|
+
import { dirname as __eveDirname } from "node:path";
|
|
3
|
+
import { createRequire as __eveCreateRequire } from "node:module";
|
|
4
|
+
const __filename = __eveFileURLToPath(import.meta.url);
|
|
5
|
+
__eveDirname(__filename);
|
|
6
|
+
__eveCreateRequire(import.meta.url);
|
|
7
|
+
import { isLinkNode, walkAst } from "chat";
|
|
8
|
+
const TOKEN = /(\d+)/gu;
|
|
9
|
+
function withPlainLinks(converter) {
|
|
10
|
+
const plain = Object.create(converter);
|
|
11
|
+
plain.fromAst = function fromAst(ast) {
|
|
12
|
+
const links = [];
|
|
13
|
+
const tokenized = walkAst(structuredClone(ast), (node) => {
|
|
14
|
+
if (!isLinkNode(node)) return node;
|
|
15
|
+
links.push(plainLink(textOf(node), node.url));
|
|
16
|
+
return {
|
|
17
|
+
type: "text",
|
|
18
|
+
value: `${links.length - 1}`
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
return converter.fromAst.call(this, tokenized).replace(TOKEN, (token, index) => links[Number(index)] ?? token);
|
|
22
|
+
};
|
|
23
|
+
return plain;
|
|
24
|
+
}
|
|
25
|
+
function plainLink(label, url) {
|
|
26
|
+
const text = label.trim();
|
|
27
|
+
const bare = url.replace(/^[a-z][a-z0-9+.-]*:(?:\/\/)?/iu, "");
|
|
28
|
+
return text === "" || text === url ? url : text === bare ? text : `${text}: ${url}`;
|
|
29
|
+
}
|
|
30
|
+
function textOf(node) {
|
|
31
|
+
if ("value" in node && typeof node.value === "string") return node.value;
|
|
32
|
+
return "children" in node && Array.isArray(node.children) ? node.children.map(textOf).join("") : "";
|
|
33
|
+
}
|
|
34
|
+
export { withPlainLinks };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** JSON data produced by SDK tools and
|
|
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
|
};
|
package/dist/extension/model.mjs
CHANGED
|
@@ -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-
|
|
9
|
+
import { a as rolesOf } from "../_chunks/principal-BXvelsZk.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
|
|
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
|