@segmentstream/agent 0.72.5 → 0.73.1
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 +61 -0
- package/dist/_chunks/{build-metadata-BBfrovia.mjs → build-metadata-B-1ohlK8.mjs} +1 -1
- package/dist/_chunks/chat-archive-BCPLSZeK.mjs +585 -0
- package/dist/_chunks/chat-archive-DK7uCgff.mjs +1337 -0
- package/dist/_chunks/{principal-Cw1NtCkj.mjs → principal-Zf42Yf4r.mjs} +1 -1
- package/dist/extension/config.d.ts +8 -0
- package/dist/extension/config.mjs +12 -0
- package/dist/extension/connections/ontology.mjs +1 -1
- package/dist/extension/hooks/authorization.mjs +1 -1
- package/dist/extension/hooks/chat-context.mjs +1 -1
- package/dist/extension/hooks/chat-recorder.mjs +1 -1
- package/dist/extension/instructions/persona.mjs +1 -1
- package/dist/extension/lib/actor.mjs +1 -1
- package/dist/extension/lib/attachment-tools.mjs +1 -1
- package/dist/extension/lib/attachments-send.mjs +1 -1
- package/dist/extension/lib/attachments.mjs +1 -1
- package/dist/extension/lib/build-metadata.mjs +1 -1
- package/dist/extension/lib/chat-address.mjs +1 -1
- package/dist/extension/lib/chat-archive.d.ts +50 -0
- package/dist/extension/lib/chat-archive.mjs +1 -188
- package/dist/extension/lib/chat-context.d.ts +10 -2
- package/dist/extension/lib/chat-context.mjs +48 -9
- package/dist/extension/lib/chat-messages.mjs +13 -1
- package/dist/extension/lib/chat-recorder.d.ts +2 -0
- package/dist/extension/lib/chat-recorder.mjs +105 -4
- package/dist/extension/lib/chat-store.d.ts +212 -0
- package/dist/extension/lib/chat-store.mjs +103 -0
- package/dist/extension/lib/confirmations.mjs +1 -1
- package/dist/extension/lib/email/attachments-send.mjs +1 -1
- package/dist/extension/lib/email/channel.mjs +2 -2
- package/dist/extension/lib/group-routing/routing-context.mjs +21 -11
- package/dist/extension/lib/guest-usage.mjs +1 -1
- package/dist/extension/lib/inbound-media/files.mjs +1 -1
- package/dist/extension/lib/inbound-media/index.mjs +1 -1
- package/dist/extension/lib/model-service-alert.mjs +14 -1
- 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.mjs +1 -1
- package/dist/extension/lib/review/judge.mjs +1 -1
- package/dist/extension/lib/review/reply.mjs +2 -2
- package/dist/extension/lib/review/revision-channel.mjs +1 -1
- 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 +1 -1
- package/dist/extension/lib/slack/adapter.mjs +2 -2
- package/dist/extension/lib/slack/attachments-send.mjs +1 -1
- package/dist/extension/lib/slack/callbacks.mjs +1 -1
- package/dist/extension/lib/stored-files.mjs +1 -1
- package/dist/extension/lib/telegram/adapter.mjs +4 -4
- package/dist/extension/lib/telegram/attachment-description.mjs +1 -1
- package/dist/extension/lib/telegram/attachments-send.mjs +5 -3
- package/dist/extension/lib/telegram/callbacks.mjs +1 -1
- package/dist/extension/lib/telegram/chat-archive.d.ts +32 -3
- package/dist/extension/lib/telegram/chat-archive.mjs +1 -703
- package/dist/extension/lib/telegram/confirmations.mjs +2 -2
- package/dist/extension/lib/telegram/customer-text.mjs +1 -1
- package/dist/extension/lib/telegram/delivery-diagnostics.mjs +1 -1
- package/dist/extension/lib/telegram/files.mjs +1 -1
- package/dist/extension/lib/telegram/format.d.ts +6 -0
- package/dist/extension/lib/telegram/format.mjs +29 -1
- package/dist/extension/lib/telegram/health.mjs +1 -1
- package/dist/extension/lib/telegram/held-approvals.mjs +1 -1
- package/dist/extension/lib/telegram/inbound-request.d.ts +2 -1
- package/dist/extension/lib/telegram/inbound-request.mjs +1 -1
- package/dist/extension/lib/telegram/inbound.mjs +2 -2
- package/dist/extension/lib/telegram/lifecycle.mjs +2 -2
- package/dist/extension/lib/telegram/principal.mjs +1 -1
- package/dist/extension/lib/telegram/session-recovery.mjs +1 -1
- package/dist/extension/lib/telegram/silent.mjs +1 -1
- package/dist/extension/lib/telegram/store-capture.d.ts +37 -0
- package/dist/extension/lib/telegram/store-capture.mjs +7 -0
- package/dist/extension/lib/telegram/structured.mjs +1 -1
- package/dist/extension/lib/telegram/turn-errors.mjs +2 -2
- package/dist/extension/lib/traces.d.ts +21 -0
- package/dist/extension/lib/traces.mjs +16 -0
- package/dist/extension/lib/web/auth.mjs +1 -1
- package/dist/extension/lib/web/channel.mjs +1 -1
- package/dist/extension/lib/whatsapp/adapter.mjs +2 -2
- package/dist/extension/lib/whatsapp/attachments-send.mjs +2 -2
- package/dist/extension/lib/whatsapp/callbacks.mjs +1 -1
- package/dist/extension/lib/whatsapp/files.mjs +1 -1
- package/dist/extension/lib/whatsapp/sent.mjs +1 -1
- package/dist/extension/lib/workspace-action.mjs +1 -1
- package/dist/extension/lib/workspace-channel/attachments-send.mjs +1 -1
- package/dist/extension/lib/workspace-channel/channel.mjs +2 -2
- package/dist/extension/lib/workspace-chat-archive.d.ts +41 -0
- package/dist/extension/lib/workspace-chat-archive.mjs +7 -0
- package/dist/extension/lib/workspace-source.mjs +1 -1
- package/dist/extension/model.mjs +1 -1
- package/dist/extension/tools/attachments_discard.mjs +1 -1
- package/dist/extension/tools/attachments_list.mjs +1 -1
- package/dist/extension/tools/attachments_promote.mjs +1 -1
- package/dist/extension/tools/attachments_read.mjs +1 -1
- package/dist/extension/tools/attachments_send.mjs +1 -1
- package/dist/extension/tools/attachments_stage.mjs +1 -1
- package/dist/extension/tools/attachments_table.mjs +1 -1
- package/dist/extension/tools/handoff.mjs +1 -1
- package/dist/extension/tools/questions_ask.mjs +1 -1
- package/dist/extension/tools/workspace_source.mjs +1 -1
- package/package.json +6 -2
|
@@ -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 { chatArchive } from "
|
|
7
|
+
import { r as chatArchive } from "../../../_chunks/chat-archive-BCPLSZeK.mjs";
|
|
8
8
|
import { appOrigin, channelsEnabled, runtimeIdentityEnvironment } from "../environment.mjs";
|
|
9
9
|
import { runtimeTokenVerifier } from "../runtime-identity.mjs";
|
|
10
10
|
import { runtimeToken } from "../runtime-token.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 { a as rolesOf } from "../../_chunks/principal-
|
|
7
|
+
import { a as rolesOf } from "../../_chunks/principal-Zf42Yf4r.mjs";
|
|
8
8
|
import { defineDynamic, defineSkill } from "eve/skills";
|
|
9
9
|
function forRoles(roles, skill) {
|
|
10
10
|
if (!Array.isArray(roles) || roles.length === 0 || !roles.every((role) => typeof role === "string" && role.trim() !== "")) throw new TypeError("forRoles() needs at least one role name; a skill for everyone is an ordinary skill file.");
|
|
@@ -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 { wt as RUNTIME_SOURCE_PROTOCOL, Tt as compatibleRuntimeEnvelope, Et as principalRuntimeSource, Dt as readableRuntimeEnvelope, Ot as runtimeEnvelope, kt as telegramRuntimeSource } from "../../_chunks/principal-
|
|
7
|
+
export { wt as RUNTIME_SOURCE_PROTOCOL, Tt as compatibleRuntimeEnvelope, Et as principalRuntimeSource, Dt as readableRuntimeEnvelope, Ot as runtimeEnvelope, kt as telegramRuntimeSource } from "../../_chunks/principal-Zf42Yf4r.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 { Nt as SESSION_HEADER, R as ACT_AS_HEADER, _ as AttachmentError, jt as CHAT_HEADER, v as EARLIER_CHAT_HEADER } from "../../_chunks/principal-
|
|
7
|
+
import { Nt as SESSION_HEADER, R as ACT_AS_HEADER, _ as AttachmentError, jt as CHAT_HEADER, v as EARLIER_CHAT_HEADER } from "../../_chunks/principal-Zf42Yf4r.mjs";
|
|
8
8
|
import { fetchFileGrant, transientFileStatus } from "./file-grant.mjs";
|
|
9
9
|
var StoredFileError = class extends AttachmentError {
|
|
10
10
|
filename;
|
|
@@ -8,7 +8,7 @@ import { admitMessage, localizedText } from "../admission.mjs";
|
|
|
8
8
|
import { agentToolsAttribute } from "../agent-tools.mjs";
|
|
9
9
|
import { agentChats, channelChats } from "../chats.mjs";
|
|
10
10
|
import { withButtonDecision } from "../confirmation-buttons.mjs";
|
|
11
|
-
import { b as agentAttachments, d as prepareInboundMedia, m as turnContent, zt as withChatAddress } from "../../../_chunks/principal-
|
|
11
|
+
import { b as agentAttachments, d as prepareInboundMedia, m as turnContent, zt as withChatAddress } from "../../../_chunks/principal-Zf42Yf4r.mjs";
|
|
12
12
|
import { channelAttributes, currentChannel, withNamedRoutes, withSessionChannels } from "../channel-scope.mjs";
|
|
13
13
|
import { redactDiagnostic } from "../diagnostics.mjs";
|
|
14
14
|
import { MAXIMUM_DOWNLOAD_BYTES, connectionProxy } from "../connection-proxy.mjs";
|
|
@@ -24,7 +24,7 @@ import { pairingNotice } from "./pairing.mjs";
|
|
|
24
24
|
import { recordThreadHistory } from "./thread-history.mjs";
|
|
25
25
|
import { channelReview, withReviewedReplies } from "../review/reply.mjs";
|
|
26
26
|
import { runtimeToken } from "../runtime-token.mjs";
|
|
27
|
-
import { chatArchive } from "
|
|
27
|
+
import { r as chatArchive } from "../../../_chunks/chat-archive-BCPLSZeK.mjs";
|
|
28
28
|
import { recordHandledMessage } from "../chat-messages.mjs";
|
|
29
29
|
import { createHash, createHmac, randomUUID, timingSafeEqual } from "node:crypto";
|
|
30
30
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
@@ -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-
|
|
7
|
+
import { _ as AttachmentError } from "../../../_chunks/principal-Zf42Yf4r.mjs";
|
|
8
8
|
import { sendStoredAttachments } from "../attachments-send.mjs";
|
|
9
9
|
import { MAXIMUM_PROXY_BODY_BYTES, connectionProxy } from "../connection-proxy.mjs";
|
|
10
10
|
import { redactDiagnostic } from "../diagnostics.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 { Lt as chatRuntimeSource, Ot as runtimeEnvelope, zt as withChatAddress } from "../../../_chunks/principal-
|
|
7
|
+
import { Lt as chatRuntimeSource, Ot as runtimeEnvelope, zt as withChatAddress } from "../../../_chunks/principal-Zf42Yf4r.mjs";
|
|
8
8
|
import { currentChannel } from "../channel-scope.mjs";
|
|
9
9
|
import { pressWorkspaceButton, queueWorkspaceButtonTurn, workspaceAction, workspaceButtonToken } from "../workspace-action.mjs";
|
|
10
10
|
import { pairingNotice } from "./pairing.mjs";
|
|
@@ -5,7 +5,7 @@ const __filename = __eveFileURLToPath(import.meta.url);
|
|
|
5
5
|
__eveDirname(__filename);
|
|
6
6
|
__eveCreateRequire(import.meta.url);
|
|
7
7
|
import { object } from "./confirmation-description.mjs";
|
|
8
|
-
import { D as OntologyFileUnavailable, W as member, i as memberIdOf, j as ontologyTools } from "../../_chunks/principal-
|
|
8
|
+
import { D as OntologyFileUnavailable, W as member, i as memberIdOf, j as ontologyTools } from "../../_chunks/principal-Zf42Yf4r.mjs";
|
|
9
9
|
import { redactDiagnostic } from "./diagnostics.mjs";
|
|
10
10
|
import { createHash } from "node:crypto";
|
|
11
11
|
async function readStoredFile(input, principal, options = {}) {
|
|
@@ -10,17 +10,17 @@ import { groupRoutingHealth } from "../group-routing/health.mjs";
|
|
|
10
10
|
import { dispatchStructuredMessage, structuredMessage } from "./structured.mjs";
|
|
11
11
|
import { handleWorkspaceCallback } from "./callbacks.mjs";
|
|
12
12
|
import { telegramText, withTelegramTexts } from "./texts.mjs";
|
|
13
|
-
import { t as agentBuild } from "../../../_chunks/build-metadata-
|
|
13
|
+
import { t as agentBuild } from "../../../_chunks/build-metadata-B-1ohlK8.mjs";
|
|
14
14
|
import { attachmentLifecycle } from "./lifecycle.mjs";
|
|
15
15
|
import { manifestOf } from "../../config.mjs";
|
|
16
16
|
import { gatewayAttachmentDescriber } from "./attachment-description.mjs";
|
|
17
17
|
import { chooseModel } from "../../model.mjs";
|
|
18
|
-
import { Ct as withDeliveryLocale, S as fetchStoredAttachment, St as safeTelegramFetch, b as agentAttachments, c as currentInboundRequest, l as runInboundRequest, mt as currentLocale, n as chatLanguage, o as telegramPrincipal, s as InboundRequest, u as withReplacedText, xt as reportTelegramError, yt as failureText } from "../../../_chunks/principal-
|
|
18
|
+
import { Ct as withDeliveryLocale, S as fetchStoredAttachment, St as safeTelegramFetch, b as agentAttachments, c as currentInboundRequest, l as runInboundRequest, mt as currentLocale, n as chatLanguage, o as telegramPrincipal, s as InboundRequest, u as withReplacedText, xt as reportTelegramError, yt as failureText } from "../../../_chunks/principal-Zf42Yf4r.mjs";
|
|
19
19
|
import { MAXIMUM_DOWNLOAD_BYTES, connectionProxy } from "../connection-proxy.mjs";
|
|
20
20
|
import { appOrigin, channelsEnabled, proxyEnvironment, runtimeIdentityEnvironment, webhookSecret } from "../environment.mjs";
|
|
21
21
|
import { agentIdentities } from "../identities.mjs";
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
22
|
+
import { m as topicContext, r as chatArchive } from "../../../_chunks/chat-archive-BCPLSZeK.mjs";
|
|
23
|
+
import { a as captureTelegramFetch, h as telegramChatCapture, i as captureRouteDecider, s as chatIdentities, u as recordGateDecision } from "../../../_chunks/chat-archive-DK7uCgff.mjs";
|
|
24
24
|
import { runtimeTokenVerifier } from "../runtime-identity.mjs";
|
|
25
25
|
import { runtimeToken } from "../runtime-token.mjs";
|
|
26
26
|
import { botIdentityCache, proxiedBotRequest, runtimeBotIdentity } from "./bot.mjs";
|
|
@@ -5,7 +5,7 @@ const __filename = __eveFileURLToPath(import.meta.url);
|
|
|
5
5
|
__eveDirname(__filename);
|
|
6
6
|
__eveCreateRequire(import.meta.url);
|
|
7
7
|
import { describableImage } from "../inbound-media/images.mjs";
|
|
8
|
-
import { xt as reportTelegramError } from "../../../_chunks/principal-
|
|
8
|
+
import { xt as reportTelegramError } from "../../../_chunks/principal-Zf42Yf4r.mjs";
|
|
9
9
|
import { gateway, generateText } from "ai";
|
|
10
10
|
const MAXIMUM_ROUTING_ATTACHMENT_BYTES = 5242880;
|
|
11
11
|
const ROUTING_ATTACHMENT_TIMEOUT_MS = 15e3;
|
|
@@ -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 { _ as AttachmentError, _t as customerMessage, bt as formattingRefused, xt as reportTelegramError, yt as failureText } from "../../../_chunks/principal-
|
|
8
|
+
import { _ as AttachmentError, _t as customerMessage, bt as formattingRefused, xt as reportTelegramError, yt as failureText } from "../../../_chunks/principal-Zf42Yf4r.mjs";
|
|
9
9
|
import { attachmentFailure } from "../attachments-send.mjs";
|
|
10
10
|
import { MAXIMUM_PROXY_BODY_BYTES, connectionProxy } from "../connection-proxy.mjs";
|
|
11
11
|
import { redactDiagnostic } from "../diagnostics.mjs";
|
|
@@ -14,6 +14,7 @@ import { appOrigin, channelsEnabled, proxyEnvironment } from "../environment.mjs
|
|
|
14
14
|
import { runtimeToken } from "../runtime-token.mjs";
|
|
15
15
|
import { confirmationLocale } from "./confirmation-text.mjs";
|
|
16
16
|
import { inTelegramSendQueue, telegramSendScope } from "./send-queue.mjs";
|
|
17
|
+
import { withCrlfLineBreaks } from "./format.mjs";
|
|
17
18
|
import { miniAppLinks, telegramAppLinkContext, withMiniAppLinks } from "./app-links.mjs";
|
|
18
19
|
import { proxiedBotRequest, runtimeBotIdentity } from "./bot.mjs";
|
|
19
20
|
import { TELEGRAM_PLACEHOLDER_TOKEN, TELEGRAM_PROXY_ORIGIN, telegramProxyFetch } from "./proxy-fetch.mjs";
|
|
@@ -165,8 +166,9 @@ async function sendAttachmentsInOrder(options) {
|
|
|
165
166
|
const file = files[0];
|
|
166
167
|
form.set(file.type, file.blob, file.filename);
|
|
167
168
|
if (caption !== void 0) {
|
|
168
|
-
|
|
169
|
-
|
|
169
|
+
const sent = withCrlfLineBreaks(caption);
|
|
170
|
+
form.set("caption", sent.text);
|
|
171
|
+
if (sent.entities.length > 0) form.set("caption_entities", JSON.stringify(sent.entities));
|
|
170
172
|
}
|
|
171
173
|
} else {
|
|
172
174
|
form.set("media", JSON.stringify(files.map((file, index) => ({
|
|
@@ -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 { Ot as runtimeEnvelope, c as currentInboundRequest, i as memberIdOf, kt as telegramRuntimeSource, o as telegramPrincipal, xt as reportTelegramError } from "../../../_chunks/principal-
|
|
7
|
+
import { Ot as runtimeEnvelope, c as currentInboundRequest, i as memberIdOf, kt as telegramRuntimeSource, o as telegramPrincipal, xt as reportTelegramError } from "../../../_chunks/principal-Zf42Yf4r.mjs";
|
|
8
8
|
import { formatAddress, parseAddress, scopedAddress } from "./sessions.mjs";
|
|
9
9
|
import { telegramText } from "./texts.mjs";
|
|
10
10
|
import { isWorkspaceCallback, pressWorkspaceButton, queueWorkspaceButtonTurn, workspaceAction, workspaceButtonToken } from "../workspace-action.mjs";
|
|
@@ -1,11 +1,40 @@
|
|
|
1
1
|
import type { StructuredMessage } from "./structured.js";
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
2
|
+
import type { TelegramMessage } from "eve/channels/telegram";
|
|
3
|
+
import type { AgentIdentities, IdentityLookup, IdentityResolution } from "../identities.js";
|
|
4
|
+
import { type ChatEvent, type ChatArchive } from "../chat-archive.js";
|
|
4
5
|
import type { AgentChats } from "../chats.js";
|
|
5
6
|
import type { DecodedAttachment } from "./attachment-description.js";
|
|
6
|
-
import type { AddressingReason, RouteDecider, RouteDecision } from "./router.js";
|
|
7
|
+
import type { AddressingReason, RouteDecider, RouteDecision, RouteDiagnostics } from "./router.js";
|
|
8
|
+
/** What one webhook request knows of its message while eve handles it. */
|
|
9
|
+
export interface Capture {
|
|
10
|
+
readonly message: TelegramMessage;
|
|
11
|
+
event: ChatEvent;
|
|
12
|
+
archive?: ChatArchive;
|
|
13
|
+
lookup?: IdentityLookup | IdentityResolution;
|
|
14
|
+
persist: () => Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Keeps what the message's turn read of it, such as a transcript, beside the message in the
|
|
17
|
+
* workspace chat store; absent for the chat archive in Cloud, which keeps it as a row.
|
|
18
|
+
*/
|
|
19
|
+
keepContent?: (content: Parameters<typeof recordInboundContent>[0]) => Promise<void>;
|
|
20
|
+
decision?: "reply" | "silent";
|
|
21
|
+
reason?: string;
|
|
22
|
+
note?: string;
|
|
23
|
+
diagnostics?: RouteDiagnostics;
|
|
24
|
+
routeReason?: string;
|
|
25
|
+
router?: Readonly<Record<string, unknown>>;
|
|
26
|
+
shadow?: Readonly<Record<string, unknown>>;
|
|
27
|
+
}
|
|
28
|
+
/** Registers what a webhook request captured of its message, for eve's hooks in the request. */
|
|
29
|
+
export declare function registerCapture(inbound: object, capture: Capture): void;
|
|
30
|
+
/** The current webhook request's capture, if any. */
|
|
31
|
+
export declare function currentCapture(): Capture | undefined;
|
|
7
32
|
/** A crashed routing attempt can be reclaimed; the per-message turn claim still fences dispatch. */
|
|
8
33
|
export declare const REVISION_CLAIM_TTL_MS: number;
|
|
34
|
+
export declare function attachmentRefs(message: TelegramMessage): ChatEvent["attachments"];
|
|
35
|
+
/** Provider identity, independent of caption edits; unique IDs survive Telegram file-ID rotation. */
|
|
36
|
+
export declare function attachmentIdentity(files: ChatEvent["attachments"]): string;
|
|
37
|
+
export declare function participants(message: TelegramMessage, identities: AgentIdentities, resolved: (lookup: IdentityLookup) => void): Promise<ReadonlyArray<string>>;
|
|
9
38
|
/** Runs after webhook verification, before eve drops bot/channel/service updates. */
|
|
10
39
|
export declare function captureTelegramWebhook(input: {
|
|
11
40
|
readonly answerCallback?: (id: string, locale?: string) => Promise<unknown>;
|