@segmentstream/agent 0.50.3 → 0.51.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 +17 -0
- package/README.md +1 -0
- package/dist/_chunks/{build-metadata-CUHPCFCT.mjs → build-metadata-BDr_toej.mjs} +1 -1
- package/dist/_chunks/{principal-D5Tualrk.mjs → principal-ie0lHCpn.mjs} +19 -2
- package/dist/extension/channels/email.d.ts +7 -0
- package/dist/extension/channels/email.mjs +20 -0
- package/dist/extension/config.d.ts +36 -0
- package/dist/extension/config.mjs +64 -3
- package/dist/extension/connections/ontology.mjs +1 -1
- package/dist/extension/hooks/authorization.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.d.ts +11 -1
- package/dist/extension/lib/attachments.mjs +1 -1
- package/dist/extension/lib/build-metadata.mjs +1 -1
- package/dist/extension/lib/chat-address.d.ts +1 -1
- package/dist/extension/lib/chat-address.mjs +1 -1
- package/dist/extension/lib/chat-context.mjs +1 -1
- package/dist/extension/lib/chat-recorder.mjs +9 -1
- package/dist/extension/lib/confirmations.mjs +1 -1
- package/dist/extension/lib/email/channel.d.ts +80 -0
- package/dist/extension/lib/email/channel.mjs +524 -0
- package/dist/extension/lib/email/gmail.d.ts +68 -0
- package/dist/extension/lib/email/gmail.mjs +188 -0
- package/dist/extension/lib/email/message.d.ts +44 -0
- package/dist/extension/lib/email/message.mjs +78 -0
- package/dist/extension/lib/identities.d.ts +5 -0
- package/dist/extension/lib/identities.mjs +3 -2
- package/dist/extension/lib/inbound-media/files.mjs +1 -1
- package/dist/extension/lib/inbound-media/index.mjs +1 -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.d.ts +1 -1
- package/dist/extension/lib/review/hold.mjs +6 -2
- package/dist/extension/lib/review/reply.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 +1 -1
- package/dist/extension/lib/slack/attachments-send.mjs +1 -1
- package/dist/extension/lib/stored-files.mjs +1 -1
- package/dist/extension/lib/telegram/adapter.mjs +3 -19
- package/dist/extension/lib/telegram/attachment-description.mjs +1 -1
- package/dist/extension/lib/telegram/attachments-send.mjs +1 -1
- package/dist/extension/lib/telegram/callbacks.mjs +1 -1
- package/dist/extension/lib/telegram/chat-archive.mjs +1 -1
- package/dist/extension/lib/telegram/confirmations.mjs +1 -1
- package/dist/extension/lib/telegram/customer-text.mjs +1 -1
- package/dist/extension/lib/telegram/files.mjs +1 -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.mjs +1 -1
- package/dist/extension/lib/telegram/inbound.mjs +1 -1
- 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/structured.mjs +1 -1
- package/dist/extension/lib/telegram/turn-errors.mjs +1 -1
- package/dist/extension/lib/telegram/workspace-action.mjs +1 -1
- 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 +1 -1
- package/dist/extension/lib/whatsapp/files.mjs +1 -1
- 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/questions_ask.mjs +1 -1
- package/dist/extension/tools/workspace_source.mjs +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,188 @@
|
|
|
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 { REPLY_KEY_HEADER, emailReplyMessage, renderEmailHtml } from "@segmentstream/ontology/email";
|
|
8
|
+
const GMAIL_ID = /^[A-Za-z0-9_-]{1,512}$/;
|
|
9
|
+
const DETAIL_LIMIT = 1e3;
|
|
10
|
+
var GmailError = class extends Error {
|
|
11
|
+
operation;
|
|
12
|
+
status;
|
|
13
|
+
detail;
|
|
14
|
+
name = "GmailError";
|
|
15
|
+
constructor(operation, status, detail) {
|
|
16
|
+
super(`Gmail answered ${operation} with status ${status}` + (detail === void 0 ? "." : `: ${detail}`));
|
|
17
|
+
this.operation = operation;
|
|
18
|
+
this.status = status;
|
|
19
|
+
this.detail = detail;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
function explanation(reply) {
|
|
23
|
+
const error = json(reply).error ?? {};
|
|
24
|
+
const reasons = Array.isArray(error.errors) ? error.errors.flatMap((item) => {
|
|
25
|
+
const reason = item?.reason;
|
|
26
|
+
return typeof reason === "string" ? [reason] : [];
|
|
27
|
+
}) : [];
|
|
28
|
+
const text = [typeof error.message === "string" ? error.message : "", ...reasons].filter((part) => part !== "").join("; ");
|
|
29
|
+
return text === "" ? void 0 : text.slice(0, DETAIL_LIMIT);
|
|
30
|
+
}
|
|
31
|
+
const decoder = new TextDecoder();
|
|
32
|
+
function json(reply) {
|
|
33
|
+
try {
|
|
34
|
+
const value = JSON.parse(decoder.decode(reply.body));
|
|
35
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) ? value : {};
|
|
36
|
+
} catch {
|
|
37
|
+
return {};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function text(value) {
|
|
41
|
+
return typeof value === "string" && value !== "" ? value : void 0;
|
|
42
|
+
}
|
|
43
|
+
function gmail(proxy) {
|
|
44
|
+
async function call(method, path, body) {
|
|
45
|
+
return proxy().request({
|
|
46
|
+
api: "gmail",
|
|
47
|
+
method,
|
|
48
|
+
path: `/users/me${path}`,
|
|
49
|
+
headers: body === void 0 ? [] : [["content-type", "application/json"]],
|
|
50
|
+
body: body === void 0 ? new Uint8Array() : new TextEncoder().encode(JSON.stringify(body))
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
async function ok(operation, method, path, body) {
|
|
54
|
+
const reply = await call(method, path, body);
|
|
55
|
+
if (reply.status < 200 || reply.status >= 300) throw new GmailError(operation, reply.status, explanation(reply));
|
|
56
|
+
return json(reply);
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
async profile() {
|
|
60
|
+
const body = await ok("profile", "GET", "/profile");
|
|
61
|
+
const address = text(body.emailAddress)?.toLowerCase();
|
|
62
|
+
const historyId = text(body.historyId);
|
|
63
|
+
if (address === void 0 || historyId === void 0) throw new GmailError("profile", 502);
|
|
64
|
+
return {
|
|
65
|
+
address,
|
|
66
|
+
historyId
|
|
67
|
+
};
|
|
68
|
+
},
|
|
69
|
+
async added(startHistoryId, limit) {
|
|
70
|
+
const messages = [];
|
|
71
|
+
let pageToken;
|
|
72
|
+
let latest = startHistoryId;
|
|
73
|
+
let completed = startHistoryId;
|
|
74
|
+
for (;;) {
|
|
75
|
+
const reply = await call("GET", `/history?${new URLSearchParams({
|
|
76
|
+
startHistoryId,
|
|
77
|
+
historyTypes: "messageAdded",
|
|
78
|
+
maxResults: "100",
|
|
79
|
+
...pageToken === void 0 ? {} : { pageToken }
|
|
80
|
+
}).toString()}`);
|
|
81
|
+
if (reply.status === 404) return;
|
|
82
|
+
if (reply.status < 200 || reply.status >= 300) throw new GmailError("history", reply.status, explanation(reply));
|
|
83
|
+
const body = json(reply);
|
|
84
|
+
const records = Array.isArray(body.history) ? body.history : [];
|
|
85
|
+
latest = text(body.historyId) ?? latest;
|
|
86
|
+
for (const record of records) {
|
|
87
|
+
const historyId = text(record.id);
|
|
88
|
+
const added = Array.isArray(record.messagesAdded) ? record.messagesAdded : [];
|
|
89
|
+
if (historyId === void 0) continue;
|
|
90
|
+
if (messages.length >= limit) return {
|
|
91
|
+
messages,
|
|
92
|
+
historyId: completed,
|
|
93
|
+
more: true
|
|
94
|
+
};
|
|
95
|
+
for (const entry of added) {
|
|
96
|
+
const message = entry.message ?? {};
|
|
97
|
+
const id = text(message.id);
|
|
98
|
+
const threadId = text(message.threadId);
|
|
99
|
+
if (id === void 0 || threadId === void 0 || !GMAIL_ID.test(id)) continue;
|
|
100
|
+
messages.push({
|
|
101
|
+
id,
|
|
102
|
+
threadId,
|
|
103
|
+
labelIds: Array.isArray(message.labelIds) ? message.labelIds.filter((label) => typeof label === "string") : [],
|
|
104
|
+
historyId
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
completed = historyId;
|
|
108
|
+
}
|
|
109
|
+
pageToken = text(body.nextPageToken);
|
|
110
|
+
if (pageToken === void 0) return {
|
|
111
|
+
messages,
|
|
112
|
+
historyId: latest,
|
|
113
|
+
more: false
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
async search(query, limit) {
|
|
118
|
+
const body = await ok("messages.list", "GET", `/messages?${new URLSearchParams({
|
|
119
|
+
q: query,
|
|
120
|
+
maxResults: String(limit)
|
|
121
|
+
}).toString()}`);
|
|
122
|
+
return (Array.isArray(body.messages) ? body.messages : []).flatMap((item) => {
|
|
123
|
+
const id = text(item.id);
|
|
124
|
+
return id !== void 0 && GMAIL_ID.test(id) ? [id] : [];
|
|
125
|
+
});
|
|
126
|
+
},
|
|
127
|
+
async raw(id) {
|
|
128
|
+
if (!GMAIL_ID.test(id)) throw new GmailError("messages.get", 400);
|
|
129
|
+
const reply = await proxy().download({
|
|
130
|
+
api: "gmail",
|
|
131
|
+
method: "GET",
|
|
132
|
+
path: `/users/me/messages/${id}?format=raw`,
|
|
133
|
+
headers: [],
|
|
134
|
+
body: new Uint8Array()
|
|
135
|
+
});
|
|
136
|
+
if (reply.status < 200 || reply.status >= 300) throw new GmailError("messages.get", reply.status, explanation(reply));
|
|
137
|
+
const body = json(reply);
|
|
138
|
+
const raw = text(body.raw);
|
|
139
|
+
const threadId = text(body.threadId);
|
|
140
|
+
if (raw === void 0 || threadId === void 0) throw new GmailError("messages.get", 502);
|
|
141
|
+
return {
|
|
142
|
+
bytes: new Uint8Array(Buffer.from(raw, "base64url")),
|
|
143
|
+
threadId,
|
|
144
|
+
labelIds: Array.isArray(body.labelIds) ? body.labelIds.filter((label) => typeof label === "string") : []
|
|
145
|
+
};
|
|
146
|
+
},
|
|
147
|
+
async watch(topic) {
|
|
148
|
+
const body = await ok("watch", "POST", "/watch", {
|
|
149
|
+
topicName: topic,
|
|
150
|
+
labelIds: ["INBOX"],
|
|
151
|
+
labelFilterBehavior: "include"
|
|
152
|
+
});
|
|
153
|
+
const expiration = Number(text(body.expiration) ?? body.expiration);
|
|
154
|
+
if (!Number.isFinite(expiration)) throw new GmailError("watch", 502);
|
|
155
|
+
return expiration;
|
|
156
|
+
},
|
|
157
|
+
async reply(input) {
|
|
158
|
+
if (!GMAIL_ID.test(input.threadId)) throw new GmailError("threads.get", 400);
|
|
159
|
+
const thread = await ok("threads.get", "GET", `/threads/${input.threadId}?format=metadata&fields=messages(id,payload/headers)`);
|
|
160
|
+
const messages = Array.isArray(thread.messages) ? thread.messages : [];
|
|
161
|
+
const header = (message, name) => {
|
|
162
|
+
return text((message?.payload?.headers ?? []).find((item) => String(item.name).toLowerCase() === name.toLowerCase())?.value);
|
|
163
|
+
};
|
|
164
|
+
if (input.key !== void 0) {
|
|
165
|
+
const sent = messages.find((message) => header(message, REPLY_KEY_HEADER) === input.key);
|
|
166
|
+
const id = text(sent?.id);
|
|
167
|
+
if (sent !== void 0) return id ?? "";
|
|
168
|
+
}
|
|
169
|
+
const raw = emailReplyMessage({
|
|
170
|
+
to: input.to,
|
|
171
|
+
subject: header(messages[0], "Subject") ?? null,
|
|
172
|
+
inReplyTo: header(messages.at(-1), "Message-ID") ?? null,
|
|
173
|
+
references: header(messages.at(-1), "References") ?? null,
|
|
174
|
+
text: input.text,
|
|
175
|
+
html: renderEmailHtml(input.text),
|
|
176
|
+
autoSubmitted: true,
|
|
177
|
+
...input.key === void 0 ? {} : { replyKey: input.key }
|
|
178
|
+
});
|
|
179
|
+
const id = text((await ok("messages.send", "POST", "/messages/send", {
|
|
180
|
+
raw: Buffer.from(raw, "utf8").toString("base64url"),
|
|
181
|
+
threadId: input.threadId
|
|
182
|
+
})).id);
|
|
183
|
+
if (id === void 0) throw new GmailError("messages.send", 502);
|
|
184
|
+
return id;
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
export { GMAIL_ID, GmailError, gmail };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Email, Header } from "postal-mime";
|
|
2
|
+
/** At most this many characters of a message's text reach the agent. */
|
|
3
|
+
export declare const MAIL_TEXT_LIMIT = 20000;
|
|
4
|
+
/** Why the channel leaves a message to staff without the agent seeing it. */
|
|
5
|
+
export type SkipReason = "no_sender" | "own_address" | "automated" | "bulk" | "bounce" | "unproved";
|
|
6
|
+
export interface MailAttachment {
|
|
7
|
+
readonly filename: string;
|
|
8
|
+
readonly contentType: string;
|
|
9
|
+
readonly bytes: Uint8Array;
|
|
10
|
+
}
|
|
11
|
+
export interface InboundMail {
|
|
12
|
+
/** The sender's address, in lower case. */
|
|
13
|
+
readonly from: string;
|
|
14
|
+
readonly fromName: string | undefined;
|
|
15
|
+
readonly subject: string;
|
|
16
|
+
readonly messageId: string | undefined;
|
|
17
|
+
/** What the person wrote, without the history they quoted. */
|
|
18
|
+
readonly text: string;
|
|
19
|
+
readonly attachments: ReadonlyArray<MailAttachment>;
|
|
20
|
+
/**
|
|
21
|
+
* Whether Gmail's receiving server reported DMARC passing for the sender's own domain: the
|
|
22
|
+
* address is proved, as far as mail can prove it.
|
|
23
|
+
*/
|
|
24
|
+
readonly verified: boolean;
|
|
25
|
+
/** Why the agent does not see it, when it does not. */
|
|
26
|
+
readonly skip: SkipReason | undefined;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Whether DMARC passed for `from`'s domain, by the first `Authentication-Results` Gmail's own
|
|
30
|
+
* receiving server added. A sender may write such headers too, but below the receiver's: only
|
|
31
|
+
* the topmost header naming the receiver is read, and only its `dmarc` result for the domain
|
|
32
|
+
* the message's From names.
|
|
33
|
+
*/
|
|
34
|
+
export declare function dmarcPassed(headers: ReadonlyArray<Header>, from: string): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* What the person wrote above the history their mail program quoted: the text up to the first
|
|
37
|
+
* attribution line ("On … wrote:"), a forwarded or original-message marker, or a run of lines
|
|
38
|
+
* quoted with `>`. A message that is only a quote keeps its text.
|
|
39
|
+
*/
|
|
40
|
+
export declare function withoutQuotedHistory(text: string): string;
|
|
41
|
+
/** Reads a received message the mailbox `own` holds. */
|
|
42
|
+
export declare function inboundMail(email: Email, own: ReadonlySet<string>): InboundMail;
|
|
43
|
+
/** Parses RFC 5322 bytes with the bounds the attachment reader uses. */
|
|
44
|
+
export declare function parseMail(bytes: Uint8Array): Promise<Email>;
|
|
@@ -0,0 +1,78 @@
|
|
|
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
|
+
const RECEIVER = "mx.google.com";
|
|
8
|
+
const MAIL_TEXT_LIMIT = 2e4;
|
|
9
|
+
const ATTRIBUTION_LENGTH = 500;
|
|
10
|
+
function mailbox(address) {
|
|
11
|
+
if (address === void 0 || address.address === void 0) return;
|
|
12
|
+
return {
|
|
13
|
+
address: address.address.trim().toLowerCase(),
|
|
14
|
+
name: address.name.trim()
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function header(headers, key) {
|
|
18
|
+
return headers.find((item) => item.key === key)?.value.trim();
|
|
19
|
+
}
|
|
20
|
+
function domainOf(address) {
|
|
21
|
+
return address.slice(address.lastIndexOf("@") + 1).toLowerCase();
|
|
22
|
+
}
|
|
23
|
+
function dmarcPassed(headers, from) {
|
|
24
|
+
const results = headers.find((item) => item.key === "authentication-results" && item.value.trim().split(/[\s;]/u)[0]?.toLowerCase() === RECEIVER);
|
|
25
|
+
if (results === void 0) return false;
|
|
26
|
+
const dmarc = results.value.split(";").map((part) => part.trim()).find((part) => /^dmarc=/iu.test(part));
|
|
27
|
+
if (dmarc === void 0 || !/^dmarc=pass\b/iu.test(dmarc)) return false;
|
|
28
|
+
return /header\.from=([^\s;]+)/iu.exec(dmarc)?.[1]?.toLowerCase() === domainOf(from);
|
|
29
|
+
}
|
|
30
|
+
function automated(headers, from) {
|
|
31
|
+
const local = from.slice(0, from.lastIndexOf("@"));
|
|
32
|
+
const submitted = header(headers, "auto-submitted")?.toLowerCase();
|
|
33
|
+
const precedence = header(headers, "precedence")?.toLowerCase();
|
|
34
|
+
const contentType = header(headers, "content-type")?.toLowerCase() ?? "";
|
|
35
|
+
if (/^(mailer-daemon|postmaster)$/u.test(local) || contentType.startsWith("multipart/report") || header(headers, "x-failed-recipients") !== void 0) return "bounce";
|
|
36
|
+
if (submitted !== void 0 && submitted !== "no" || precedence === "auto_reply" || header(headers, "x-autoreply") !== void 0 || header(headers, "x-autorespond") !== void 0) return "automated";
|
|
37
|
+
if (header(headers, "list-id") !== void 0 || header(headers, "list-unsubscribe") !== void 0 || precedence === "bulk" || precedence === "list" || precedence === "junk") return "bulk";
|
|
38
|
+
}
|
|
39
|
+
function htmlText(html) {
|
|
40
|
+
return html.replace(/<(script|style)[^>]*>[\s\S]*?<\/\1>/giu, "").replace(/<br\s*\/?>/giu, "\n").replace(/<\/(p|div|li|tr|h[1-6])>/giu, "\n").replace(/<blockquote[\s\S]*?<\/blockquote>/giu, "").replace(/<[^>]+>/gu, "").replace(/ /gu, " ").replace(/</gu, "<").replace(/>/gu, ">").replace(/"/gu, "\"").replace(/'/gu, "'").replace(/&/gu, "&");
|
|
41
|
+
}
|
|
42
|
+
function withoutQuotedHistory(text) {
|
|
43
|
+
const lines = text.replace(/\r\n?/gu, "\n").split("\n");
|
|
44
|
+
let quoted = lines.length;
|
|
45
|
+
while (quoted > 0 && /^\s*(>|$)/u.test(lines[quoted - 1] ?? "")) quoted -= 1;
|
|
46
|
+
const cut = lines.findIndex((line, index) => line.length <= ATTRIBUTION_LENGTH && (/^\s*(On\s.+\swrote:|Le\s.+\sa écrit\s?:|Am\s.+\sschrieb\s.+:|El\s.+\sescribió:)\s*$/iu.test(line) || /^\s*-{2,}\s*(Original Message|Forwarded message)\s*-{2,}\s*$/iu.test(line) || /^\s*_{10,}\s*$/u.test(line)) || index >= quoted && /^\s*>/u.test(line));
|
|
47
|
+
const kept = (cut <= 0 ? lines : lines.slice(0, cut)).join("\n").trim();
|
|
48
|
+
return kept === "" ? text.trim() : kept;
|
|
49
|
+
}
|
|
50
|
+
function inboundMail(email, own) {
|
|
51
|
+
const sender = mailbox(email.from);
|
|
52
|
+
const from = sender?.address ?? "";
|
|
53
|
+
const text = withoutQuotedHistory(email.text !== void 0 && email.text.trim() !== "" ? email.text : email.html === void 0 ? "" : htmlText(email.html)).slice(0, MAIL_TEXT_LIMIT);
|
|
54
|
+
const verified = from !== "" && dmarcPassed(email.headers, from);
|
|
55
|
+
const skip = from === "" || !from.includes("@") ? "no_sender" : own.has(from) ? "own_address" : automated(email.headers, from) ?? (verified ? void 0 : "unproved");
|
|
56
|
+
return {
|
|
57
|
+
from,
|
|
58
|
+
fromName: sender?.name === "" ? void 0 : sender?.name,
|
|
59
|
+
subject: (email.subject ?? "").replace(/[\r\n]+/gu, " ").trim(),
|
|
60
|
+
messageId: email.messageId?.trim(),
|
|
61
|
+
text,
|
|
62
|
+
attachments: email.attachments.flatMap((attachment) => attachment.disposition === "inline" && attachment.mimeType.startsWith("image/") ? [] : [{
|
|
63
|
+
filename: attachment.filename ?? "attachment",
|
|
64
|
+
contentType: attachment.mimeType || "application/octet-stream",
|
|
65
|
+
bytes: typeof attachment.content === "string" ? new TextEncoder().encode(attachment.content) : new Uint8Array(attachment.content)
|
|
66
|
+
}]),
|
|
67
|
+
verified,
|
|
68
|
+
skip
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
async function parseMail(bytes) {
|
|
72
|
+
const { default: PostalMime } = await import("postal-mime");
|
|
73
|
+
return PostalMime.parse(bytes, {
|
|
74
|
+
maxNestingDepth: 20,
|
|
75
|
+
maxHeadersSize: 262144
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
export { MAIL_TEXT_LIMIT, dmarcPassed, inboundMail, parseMail, withoutQuotedHistory };
|
|
@@ -55,6 +55,11 @@ export interface ResolveIdentityInput extends ChatAccount {
|
|
|
55
55
|
readonly limits?: AdmissionLimitsInput;
|
|
56
56
|
readonly noticeVersion?: string;
|
|
57
57
|
readonly noticeSha256?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Whether the receiving server proved the sender's address, as DMARC does for mail. The
|
|
60
|
+
* ontology admits an `email` account only when it did.
|
|
61
|
+
*/
|
|
62
|
+
readonly addressVerified?: boolean;
|
|
58
63
|
}
|
|
59
64
|
/** A pairing code the member approves at `/agent/connect?code=<code>`. */
|
|
60
65
|
export interface Pairing {
|
|
@@ -180,12 +180,13 @@ function agentIdentities(input) {
|
|
|
180
180
|
return {
|
|
181
181
|
lookup,
|
|
182
182
|
async resolve(account) {
|
|
183
|
-
const { externalId, noticeVersion, noticeSha256, ...details } = account;
|
|
183
|
+
const { externalId, noticeVersion, noticeSha256, addressVerified, ...details } = account;
|
|
184
184
|
const response = await call("/identities/resolve", { body: {
|
|
185
185
|
...details,
|
|
186
186
|
external_id: externalId,
|
|
187
187
|
...noticeVersion === void 0 ? {} : { notice_version: noticeVersion },
|
|
188
|
-
...noticeSha256 === void 0 ? {} : { notice_sha256: noticeSha256 }
|
|
188
|
+
...noticeSha256 === void 0 ? {} : { notice_sha256: noticeSha256 },
|
|
189
|
+
...addressVerified === void 0 ? {} : { address_verified: addressVerified }
|
|
189
190
|
} });
|
|
190
191
|
if (response.status === 404) {
|
|
191
192
|
const existing = await lookup(account);
|
|
@@ -4,4 +4,4 @@ import { createRequire as __eveCreateRequire } from "node:module";
|
|
|
4
4
|
const __filename = __eveFileURLToPath(import.meta.url);
|
|
5
5
|
__eveDirname(__filename);
|
|
6
6
|
__eveCreateRequire(import.meta.url);
|
|
7
|
-
export { f as attachmentsContext, p as storeFiles, m as turnContent } from "../../../_chunks/principal-
|
|
7
|
+
export { f as attachmentsContext, p as storeFiles, m as turnContent } from "../../../_chunks/principal-ie0lHCpn.mjs";
|
|
@@ -4,4 +4,4 @@ import { createRequire as __eveCreateRequire } from "node:module";
|
|
|
4
4
|
const __filename = __eveFileURLToPath(import.meta.url);
|
|
5
5
|
__eveDirname(__filename);
|
|
6
6
|
__eveCreateRequire(import.meta.url);
|
|
7
|
-
export { f as attachmentsContext, d as prepareInboundMedia, p as storeFiles, m as turnContent } from "../../../_chunks/principal-
|
|
7
|
+
export { f as attachmentsContext, d as prepareInboundMedia, p as storeFiles, m as turnContent } from "../../../_chunks/principal-ie0lHCpn.mjs";
|
|
@@ -4,4 +4,4 @@ import { createRequire as __eveCreateRequire } from "node:module";
|
|
|
4
4
|
const __filename = __eveFileURLToPath(import.meta.url);
|
|
5
5
|
__eveDirname(__filename);
|
|
6
6
|
__eveCreateRequire(import.meta.url);
|
|
7
|
-
export {
|
|
7
|
+
export { B as ACT_AS_HEADER, E as actAsHeaders, D as ontologyConnection } from "../../_chunks/principal-ie0lHCpn.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 {
|
|
7
|
+
import { I as actionApproval, L as confirmations, N as ontologyTools, R as inputHash, U as actorKey, W as actorOf, wt as runtimeEnvelope } from "../../_chunks/principal-ie0lHCpn.mjs";
|
|
8
8
|
import { isChatPost } from "./chat-post-confirmation.mjs";
|
|
9
9
|
import { sandboxFile } from "./sandbox-session.mjs";
|
|
10
10
|
import { saveOntologyResult } from "./ontology-result-file.mjs";
|
|
@@ -4,4 +4,4 @@ import { createRequire as __eveCreateRequire } from "node:module";
|
|
|
4
4
|
const __filename = __eveFileURLToPath(import.meta.url);
|
|
5
5
|
__eveDirname(__filename);
|
|
6
6
|
__eveCreateRequire(import.meta.url);
|
|
7
|
-
export {
|
|
7
|
+
export { O as OntologyActionNotPermitted, k as OntologyFileUnavailable, A as OntologyToolRejected, j as actionToolName, M as ontologyToolLabels, N as ontologyTools, P as promotionTarget } from "../../_chunks/principal-ie0lHCpn.mjs";
|
|
@@ -8,7 +8,7 @@ import { type ReviewSettings, type Review } from "../../review.js";
|
|
|
8
8
|
export interface HeldReply {
|
|
9
9
|
/** Names the reply, so a report repeated after a failure creates one review. */
|
|
10
10
|
readonly key: string;
|
|
11
|
-
readonly provider: "telegram" | "slack" | "whatsapp";
|
|
11
|
+
readonly provider: "telegram" | "slack" | "whatsapp" | "email";
|
|
12
12
|
readonly chatId: string;
|
|
13
13
|
/**
|
|
14
14
|
* Whom the provider sends the reply to: the person's own id in their private chat, where
|
|
@@ -5,11 +5,15 @@ const __filename = __eveFileURLToPath(import.meta.url);
|
|
|
5
5
|
__eveDirname(__filename);
|
|
6
6
|
__eveCreateRequire(import.meta.url);
|
|
7
7
|
import { reviewFor } from "../../review.mjs";
|
|
8
|
-
import { a as rolesOf, i as memberIdOf,
|
|
8
|
+
import { a as rolesOf, i as memberIdOf, st as chatAddressOf } from "../../../_chunks/principal-ie0lHCpn.mjs";
|
|
9
9
|
function reviewOf(settings, principal) {
|
|
10
10
|
return reviewFor(settings, rolesOf(principal));
|
|
11
11
|
}
|
|
12
|
-
const REVIEWED_PROVIDERS = new Set([
|
|
12
|
+
const REVIEWED_PROVIDERS = new Set([
|
|
13
|
+
"telegram",
|
|
14
|
+
"whatsapp",
|
|
15
|
+
"email"
|
|
16
|
+
]);
|
|
13
17
|
function repliesReviewed(settings, principal) {
|
|
14
18
|
const provider = chatAddressOf(principal)?.provider;
|
|
15
19
|
return provider !== void 0 && REVIEWED_PROVIDERS.has(provider) && reviewOf(settings, principal).mode !== "never";
|
|
@@ -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 { i as memberIdOf,
|
|
7
|
+
import { i as memberIdOf, st as chatAddressOf } from "../../../_chunks/principal-ie0lHCpn.mjs";
|
|
8
8
|
import { chatArchive, chatEvent } from "../chat-archive.mjs";
|
|
9
9
|
import { appOrigin } from "../environment.mjs";
|
|
10
10
|
import { agentReviews } from "./client.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-ie0lHCpn.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 {
|
|
7
|
+
export { xt as RUNTIME_SOURCE_PROTOCOL, St as compatibleRuntimeEnvelope, Ct as principalRuntimeSource, wt as runtimeEnvelope, Tt as telegramRuntimeSource } from "../../_chunks/principal-ie0lHCpn.mjs";
|
|
@@ -4,7 +4,7 @@ import { createRequire as __eveCreateRequire } from "node:module";
|
|
|
4
4
|
const __filename = __eveFileURLToPath(import.meta.url);
|
|
5
5
|
__eveDirname(__filename);
|
|
6
6
|
__eveCreateRequire(import.meta.url);
|
|
7
|
-
import { _ as AttachmentError, v as CHAT_HEADER, x as SESSION_HEADER, y as EARLIER_CHAT_HEADER
|
|
7
|
+
import { B as ACT_AS_HEADER, _ as AttachmentError, v as CHAT_HEADER, x as SESSION_HEADER, y as EARLIER_CHAT_HEADER } from "../../_chunks/principal-ie0lHCpn.mjs";
|
|
8
8
|
import { fetchFileGrant, transientFileStatus } from "./file-grant.mjs";
|
|
9
9
|
var StoredFileError = class extends AttachmentError {
|
|
10
10
|
filename;
|
|
@@ -7,7 +7,7 @@ __eveCreateRequire(import.meta.url);
|
|
|
7
7
|
import { admitMessage, localizedText } from "../admission.mjs";
|
|
8
8
|
import { agentChats } from "../chats.mjs";
|
|
9
9
|
import { withButtonDecision } from "../confirmation-buttons.mjs";
|
|
10
|
-
import { S as agentAttachments,
|
|
10
|
+
import { S as agentAttachments, d as prepareInboundMedia, lt as withChatAddress, m as turnContent } from "../../../_chunks/principal-ie0lHCpn.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";
|
|
@@ -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,
|
|
8
|
+
import { _ as AttachmentError, gt as failureText, st as chatAddressOf } from "../../../_chunks/principal-ie0lHCpn.mjs";
|
|
9
9
|
import { MAXIMUM_PROXY_BODY_BYTES, connectionProxy } from "../connection-proxy.mjs";
|
|
10
10
|
import { redactDiagnostic } from "../diagnostics.mjs";
|
|
11
11
|
import { appOrigin, channelsEnabled, proxyEnvironment } from "../environment.mjs";
|
|
@@ -5,7 +5,7 @@ const __filename = __eveFileURLToPath(import.meta.url);
|
|
|
5
5
|
__eveDirname(__filename);
|
|
6
6
|
__eveCreateRequire(import.meta.url);
|
|
7
7
|
import { object } from "./confirmation-description.mjs";
|
|
8
|
-
import {
|
|
8
|
+
import { G as member, N as ontologyTools, i as memberIdOf, k as OntologyFileUnavailable } from "../../_chunks/principal-ie0lHCpn.mjs";
|
|
9
9
|
import { redactDiagnostic } from "./diagnostics.mjs";
|
|
10
10
|
import { createHash } from "node:crypto";
|
|
11
11
|
async function readStoredFile(input, principal, options = {}) {
|
|
@@ -10,12 +10,12 @@ import { groupRoutingHealth } from "../group-routing/health.mjs";
|
|
|
10
10
|
import { dispatchStructuredMessage, structuredMessage } from "./structured.mjs";
|
|
11
11
|
import { handleWorkspaceCallback, isWorkspaceCallback } 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-BDr_toej.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 { S as agentAttachments,
|
|
18
|
+
import { S as agentAttachments, bt as withDeliveryLocale, c as currentInboundRequest, dt as currentLocale, gt as failureText, l as runInboundRequest, n as chatLanguage, o as telegramPrincipal, s as InboundRequest, u as withReplacedText, vt as reportTelegramError, w as fetchStoredAttachment, yt as safeTelegramFetch } from "../../../_chunks/principal-ie0lHCpn.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";
|
|
@@ -444,19 +444,7 @@ function segmentstreamTelegram(options) {
|
|
|
444
444
|
const adapter = channel.adapter;
|
|
445
445
|
const fetchTelegramFile = adapter?.fetchFile;
|
|
446
446
|
async function fetchFile(url, context) {
|
|
447
|
-
|
|
448
|
-
if (reference === void 0) return fetchTelegramFile === void 0 ? null : fetchTelegramFile(url, context);
|
|
449
|
-
const sessionId = sessionIdOf(context);
|
|
450
|
-
const { attachment, bytes } = await attachments().read({
|
|
451
|
-
memberId: reference.memberId,
|
|
452
|
-
chat: reference.chat,
|
|
453
|
-
...sessionId === void 0 ? {} : { sessionId }
|
|
454
|
-
}, reference.id);
|
|
455
|
-
return {
|
|
456
|
-
bytes: Buffer.from(bytes),
|
|
457
|
-
mediaType: attachment.contentType,
|
|
458
|
-
filename: attachment.filename
|
|
459
|
-
};
|
|
447
|
+
return await fetchStoredAttachment(attachments(), url, context) ?? (fetchTelegramFile === void 0 ? null : fetchTelegramFile(url, context));
|
|
460
448
|
}
|
|
461
449
|
return {
|
|
462
450
|
...channel,
|
|
@@ -517,10 +505,6 @@ function segmentstreamTelegram(options) {
|
|
|
517
505
|
})]
|
|
518
506
|
};
|
|
519
507
|
}
|
|
520
|
-
function sessionIdOf(context) {
|
|
521
|
-
const session = typeof context === "object" && context !== null ? context.session : void 0;
|
|
522
|
-
return typeof session?.id === "string" && session.id !== "" ? session.id : void 0;
|
|
523
|
-
}
|
|
524
508
|
function gatedRoute(input) {
|
|
525
509
|
const { route, options, environment } = input;
|
|
526
510
|
if (route.transport === "websocket") return route;
|
|
@@ -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 {
|
|
8
|
+
import { vt as reportTelegramError } from "../../../_chunks/principal-ie0lHCpn.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
|
|
8
|
+
import { _ as AttachmentError, _t as formattingRefused, gt as failureText, mt as customerMessage, vt as reportTelegramError } from "../../../_chunks/principal-ie0lHCpn.mjs";
|
|
9
9
|
import { MAXIMUM_PROXY_BODY_BYTES, connectionProxy } from "../connection-proxy.mjs";
|
|
10
10
|
import { redactDiagnostic } from "../diagnostics.mjs";
|
|
11
11
|
import { transientFileStatus } from "../file-grant.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 {
|
|
8
|
+
import { Tt as telegramRuntimeSource, c as currentInboundRequest, i as memberIdOf, o as telegramPrincipal, vt as reportTelegramError, wt as runtimeEnvelope } from "../../../_chunks/principal-ie0lHCpn.mjs";
|
|
9
9
|
import { formatAddress, parseAddress, scopedAddress } from "./sessions.mjs";
|
|
10
10
|
import { telegramText } from "./texts.mjs";
|
|
11
11
|
import { workspaceAction } from "./workspace-action.mjs";
|
|
@@ -9,7 +9,7 @@ import { n as contentText, t as CONTENT_CAPS } from "../../../_chunks/content-cD
|
|
|
9
9
|
import { chatEvent, sessionFailureEventId } from "../chat-archive.mjs";
|
|
10
10
|
import { currentConfirmationPrompt } from "../group-routing/messages.mjs";
|
|
11
11
|
import { messageMetadata } from "./message-metadata.mjs";
|
|
12
|
-
import {
|
|
12
|
+
import { c as currentInboundRequest, ft as currentThreadId, vt as reportTelegramError } from "../../../_chunks/principal-ie0lHCpn.mjs";
|
|
13
13
|
import { reportMembership } from "./membership.mjs";
|
|
14
14
|
import { currentDeliveryScope } from "./delivery-diagnostics.mjs";
|
|
15
15
|
import { contentShape, messageContent } from "./content.mjs";
|
|
@@ -5,7 +5,7 @@ const __filename = __eveFileURLToPath(import.meta.url);
|
|
|
5
5
|
__eveDirname(__filename);
|
|
6
6
|
__eveCreateRequire(import.meta.url);
|
|
7
7
|
import { telegramText } from "./texts.mjs";
|
|
8
|
-
import {
|
|
8
|
+
import { L as confirmations, c as currentInboundRequest, i as memberIdOf, o as telegramPrincipal, vt as reportTelegramError } from "../../../_chunks/principal-ie0lHCpn.mjs";
|
|
9
9
|
import { humanText } from "../confirmation-description.mjs";
|
|
10
10
|
import { withConfirmationPrompt } from "../group-routing/messages.mjs";
|
|
11
11
|
import { chatPostOperationId, isChatPost } from "../chat-post-confirmation.mjs";
|
|
@@ -5,5 +5,5 @@ const __filename = __eveFileURLToPath(import.meta.url);
|
|
|
5
5
|
__eveDirname(__filename);
|
|
6
6
|
__eveCreateRequire(import.meta.url);
|
|
7
7
|
import { isTechnicalText } from "../customer-text-safety.mjs";
|
|
8
|
-
import { _t as
|
|
8
|
+
import { _t as formattingRefused, bt as withDeliveryLocale, dt as currentLocale, ft as currentThreadId, gt as failureText, ht as customerText, mt as customerMessage, pt as customerCopy, ut as TelegramDeliveryError, vt as reportTelegramError, yt as safeTelegramFetch } from "../../../_chunks/principal-ie0lHCpn.mjs";
|
|
9
9
|
export { TelegramDeliveryError, currentLocale, currentThreadId, customerCopy, customerMessage, customerText, failureText, formattingRefused, isTechnicalText, reportTelegramError, safeTelegramFetch, withDeliveryLocale };
|
|
@@ -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 {
|
|
7
|
+
import { p as storeFiles, vt as reportTelegramError } from "../../../_chunks/principal-ie0lHCpn.mjs";
|
|
8
8
|
function telegramChat(chatId) {
|
|
9
9
|
return `telegram:${chatId}`;
|
|
10
10
|
}
|
|
@@ -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-
|
|
7
|
+
import { t as agentBuild } from "../../../_chunks/build-metadata-BDr_toej.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";
|
|
@@ -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 {
|
|
7
|
+
import { F as CONFIRMATION_TTL_MS } from "../../../_chunks/principal-ie0lHCpn.mjs";
|
|
8
8
|
import { object } from "../confirmation-description.mjs";
|
|
9
9
|
import { SessionNotActiveError } from "eve/sessions";
|
|
10
10
|
function heldApprovals(events) {
|
|
@@ -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 { s as InboundRequest, c as currentInboundRequest, l as runInboundRequest, u as withReplacedText } from "../../../_chunks/principal-
|
|
7
|
+
export { s as InboundRequest, c as currentInboundRequest, l as runInboundRequest, u as withReplacedText } from "../../../_chunks/principal-ie0lHCpn.mjs";
|