@segmentstream/agent 0.53.0 → 0.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +11 -2
  3. package/dist/_chunks/{build-metadata-Bc9qfC4D.mjs → build-metadata-2TyBXJEt.mjs} +1 -1
  4. package/dist/_chunks/{principal-JoaOmdFL.mjs → principal-DUla0Xge.mjs} +53 -23
  5. package/dist/extension/config.d.ts +23 -1
  6. package/dist/extension/config.mjs +37 -3
  7. package/dist/extension/connections/ontology.mjs +1 -1
  8. package/dist/extension/hooks/authorization.mjs +1 -1
  9. package/dist/extension/hooks/guest-usage.d.ts +3 -0
  10. package/dist/extension/hooks/guest-usage.mjs +11 -0
  11. package/dist/extension/instructions/persona.mjs +1 -1
  12. package/dist/extension/lib/actor.mjs +1 -1
  13. package/dist/extension/lib/attachment-tools.mjs +1 -1
  14. package/dist/extension/lib/attachments-send.mjs +1 -1
  15. package/dist/extension/lib/attachments.d.ts +1 -2
  16. package/dist/extension/lib/attachments.mjs +1 -1
  17. package/dist/extension/lib/build-metadata.mjs +1 -1
  18. package/dist/extension/lib/chat-address.d.ts +11 -0
  19. package/dist/extension/lib/chat-address.mjs +1 -1
  20. package/dist/extension/lib/chat-context.mjs +1 -1
  21. package/dist/extension/lib/chat-recorder.mjs +1 -1
  22. package/dist/extension/lib/confirmations.d.ts +6 -1
  23. package/dist/extension/lib/confirmations.mjs +1 -1
  24. package/dist/extension/lib/email/attachments-send.mjs +1 -1
  25. package/dist/extension/lib/email/channel.mjs +1 -1
  26. package/dist/extension/lib/guest-usage.d.ts +53 -0
  27. package/dist/extension/lib/guest-usage.mjs +52 -0
  28. package/dist/extension/lib/inbound-media/files.mjs +1 -1
  29. package/dist/extension/lib/inbound-media/index.mjs +1 -1
  30. package/dist/extension/lib/ontology-connection.mjs +1 -1
  31. package/dist/extension/lib/ontology-file-call.mjs +2 -1
  32. package/dist/extension/lib/ontology-tools.d.ts +2 -0
  33. package/dist/extension/lib/ontology-tools.mjs +1 -1
  34. package/dist/extension/lib/review/hold.mjs +1 -1
  35. package/dist/extension/lib/review/reply.mjs +1 -1
  36. package/dist/extension/lib/role-skill.mjs +1 -1
  37. package/dist/extension/lib/runtime-envelope.mjs +1 -1
  38. package/dist/extension/lib/sent-files.mjs +1 -1
  39. package/dist/extension/lib/slack/adapter.mjs +1 -1
  40. package/dist/extension/lib/slack/attachments-send.mjs +1 -1
  41. package/dist/extension/lib/stored-files.mjs +1 -1
  42. package/dist/extension/lib/telegram/adapter.mjs +2 -2
  43. package/dist/extension/lib/telegram/attachment-description.mjs +1 -1
  44. package/dist/extension/lib/telegram/attachments-send.mjs +1 -1
  45. package/dist/extension/lib/telegram/callbacks.mjs +1 -1
  46. package/dist/extension/lib/telegram/chat-archive.mjs +1 -1
  47. package/dist/extension/lib/telegram/confirmations.mjs +2 -2
  48. package/dist/extension/lib/telegram/customer-text.mjs +1 -1
  49. package/dist/extension/lib/telegram/files.mjs +1 -1
  50. package/dist/extension/lib/telegram/health.mjs +1 -1
  51. package/dist/extension/lib/telegram/held-approvals.mjs +1 -1
  52. package/dist/extension/lib/telegram/inbound-request.mjs +1 -1
  53. package/dist/extension/lib/telegram/inbound.mjs +1 -1
  54. package/dist/extension/lib/telegram/lifecycle.mjs +2 -2
  55. package/dist/extension/lib/telegram/principal.mjs +1 -1
  56. package/dist/extension/lib/telegram/session-recovery.mjs +1 -1
  57. package/dist/extension/lib/telegram/silent.mjs +1 -1
  58. package/dist/extension/lib/telegram/structured.mjs +1 -1
  59. package/dist/extension/lib/telegram/turn-errors.mjs +1 -1
  60. package/dist/extension/lib/telegram/workspace-action.mjs +1 -1
  61. package/dist/extension/lib/web/auth.d.ts +18 -4
  62. package/dist/extension/lib/web/auth.mjs +1 -1
  63. package/dist/extension/lib/web/channel.mjs +1 -1
  64. package/dist/extension/lib/whatsapp/adapter.mjs +1 -1
  65. package/dist/extension/lib/whatsapp/attachments-send.mjs +1 -1
  66. package/dist/extension/lib/whatsapp/files.mjs +1 -1
  67. package/dist/extension/lib/workspace-source.mjs +1 -1
  68. package/dist/extension/model.mjs +1 -1
  69. package/dist/extension/tools/attachments_discard.mjs +1 -1
  70. package/dist/extension/tools/attachments_list.mjs +1 -1
  71. package/dist/extension/tools/attachments_promote.mjs +1 -1
  72. package/dist/extension/tools/attachments_read.mjs +1 -1
  73. package/dist/extension/tools/attachments_send.mjs +1 -1
  74. package/dist/extension/tools/attachments_stage.mjs +1 -1
  75. package/dist/extension/tools/attachments_table.mjs +1 -1
  76. package/dist/extension/tools/questions_ask.mjs +1 -1
  77. package/dist/extension/tools/unanswered.d.ts +2 -0
  78. package/dist/extension/tools/unanswered.mjs +39 -0
  79. package/dist/extension/tools/workspace_source.mjs +1 -1
  80. package/dist/tools/index.d.ts +1 -0
  81. package/dist/tools/index.mjs +2 -1
  82. package/package.json +2 -2
@@ -19,8 +19,13 @@ export interface ActionAnnotations {
19
19
  /** Safety comes from the authenticated ontology, never from the name or model prose. */
20
20
  export declare function needsConfirmation(labels: ActionAnnotations): boolean;
21
21
  export declare function inputHash(input: unknown): string;
22
+ /**
23
+ * A confirmation requested by a member, or by a guest whom the ontology lets confirm: only they
24
+ * may confirm or cancel it. A member's names `memberId`; a guest's names `guestId` alone.
25
+ */
22
26
  export interface Confirmation {
23
- readonly memberId: string;
27
+ readonly memberId?: string;
28
+ readonly guestId?: string;
24
29
  readonly action: string;
25
30
  readonly inputHash: string;
26
31
  readonly expiresAt: number;
@@ -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 CONFIRMATION_TTL_MS, I as actionApproval, L as confirmations, R as inputHash, z as needsConfirmation } from "../../_chunks/principal-JoaOmdFL.mjs";
7
+ export { N as CONFIRMATION_TTL_MS, P as actionApproval, F as confirmations, I as inputHash, L as needsConfirmation } from "../../_chunks/principal-DUla0Xge.mjs";
@@ -4,7 +4,7 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import { _ as AttachmentError } from "../../../_chunks/principal-JoaOmdFL.mjs";
7
+ import { _ as AttachmentError } from "../../../_chunks/principal-DUla0Xge.mjs";
8
8
  import { sendStoredAttachments } from "../attachments-send.mjs";
9
9
  import { ConnectionProxyError, connectionProxy } from "../connection-proxy.mjs";
10
10
  import { redactDiagnostic } from "../diagnostics.mjs";
@@ -8,7 +8,7 @@ import { PUBSUB_TOPIC } from "../../config.mjs";
8
8
  import { admitMessage, localizedText } from "../admission.mjs";
9
9
  import { agentToolsAttribute } from "../agent-tools.mjs";
10
10
  import { providerChat } from "../attachment-tools.mjs";
11
- import { S as agentAttachments, d as prepareInboundMedia, gt as withChatAddress, i as memberIdOf, m as turnContent, mt as chatAddressOf, w as fetchStoredAttachment } from "../../../_chunks/principal-JoaOmdFL.mjs";
11
+ import { S as fetchStoredAttachment, b as agentAttachments, d as prepareInboundMedia, gt as chatAddressOf, i as memberIdOf, m as turnContent, yt as withChatAddress } from "../../../_chunks/principal-DUla0Xge.mjs";
12
12
  import { chatArchive, chatEvent, replyEvent } from "../chat-archive.mjs";
13
13
  import { ConnectionProxyError, connectionProxy } from "../connection-proxy.mjs";
14
14
  import { redactDiagnostic } from "../diagnostics.mjs";
@@ -0,0 +1,53 @@
1
+ import type { SessionAuthContext } from "eve/context";
2
+ import type { AdmissionLimitsInput } from "../config.js";
3
+ import { type Environment } from "./environment.js";
4
+ import { type RuntimeToken } from "./runtime-token.js";
5
+ /**
6
+ * A guest's spend: the model cost of their turns, which the ontology holds against the agent's
7
+ * `limits.guest.usdPerDay` and `workspaceUsdPerDay` before their next turn. The agent reports each
8
+ * model answer's cost as the runtime records it (`usage.recorded`), so a turn's answers add up to
9
+ * the turn's cost, and a turn that fails or is cancelled is counted too, since the provider billed it.
10
+ */
11
+ /** Where the agent reports a guest's spend, with the deployment's runtime token. */
12
+ export declare const GUEST_USAGE_PATH = "/api/ontology/agent/guests/usage";
13
+ /** One report: the guest, what an answer cost, and a key that names the report once. */
14
+ export interface GuestUsage {
15
+ readonly guestId: string;
16
+ readonly costUsd: number;
17
+ readonly key: string;
18
+ }
19
+ export type GuestUsageReport = (usage: GuestUsage) => Promise<void>;
20
+ /** The ontology's spend route, called with the deployment's runtime token. Throws on a refusal. */
21
+ export declare function ontologyGuestUsage(options?: {
22
+ readonly environment?: Environment;
23
+ readonly token?: RuntimeToken;
24
+ readonly fetch?: typeof fetch;
25
+ }): GuestUsageReport;
26
+ /** Whether the agent's limits cap guests' spend, so that their turns' cost is worth reporting. */
27
+ export declare function capsGuestSpend(limits: AdmissionLimitsInput | undefined): boolean;
28
+ /**
29
+ * The handler of `usage.recorded` that reports a guest's model cost: only in a guest's session,
30
+ * only for an answer whose cost the provider reported, and only while the agent caps guests' spend.
31
+ * `key` is the event's place in the session's stream, so a handler run again reports nothing twice.
32
+ * A report that fails never fails the turn; the guest's next turns are still counted.
33
+ */
34
+ export declare function guestUsageHandler(options: {
35
+ readonly limits: () => AdmissionLimitsInput | undefined;
36
+ readonly report?: GuestUsageReport;
37
+ }): (event: {
38
+ readonly data: {
39
+ readonly usage: {
40
+ readonly costUsd?: number;
41
+ };
42
+ };
43
+ }, context: {
44
+ readonly session: {
45
+ readonly id: string;
46
+ readonly auth: {
47
+ readonly current: SessionAuthContext | null;
48
+ };
49
+ };
50
+ readonly occurrence: {
51
+ readonly idempotencyKey: string;
52
+ };
53
+ }) => Promise<void>;
@@ -0,0 +1,52 @@
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 { appOrigin } from "./environment.mjs";
8
+ import { runtimeToken } from "./runtime-token.mjs";
9
+ import { ot as guestIdOf } from "../../_chunks/principal-DUla0Xge.mjs";
10
+ const GUEST_USAGE_PATH = "/api/ontology/agent/guests/usage";
11
+ const REPORT_TIMEOUT_MS = 5e3;
12
+ function ontologyGuestUsage(options = {}) {
13
+ return async ({ guestId, costUsd, key }) => {
14
+ const response = await (options.fetch ?? fetch)(`${appOrigin(options.environment ?? process.env)}${GUEST_USAGE_PATH}`, {
15
+ method: "POST",
16
+ headers: {
17
+ authorization: `Bearer ${await (options.token ?? runtimeToken)()}`,
18
+ "content-type": "application/json"
19
+ },
20
+ body: JSON.stringify({
21
+ guest_id: guestId,
22
+ cost_usd: costUsd,
23
+ key
24
+ }),
25
+ signal: AbortSignal.timeout(REPORT_TIMEOUT_MS)
26
+ });
27
+ response.body?.cancel().catch(() => void 0);
28
+ if (!response.ok) throw new Error(`The ontology did not record a guest's spend (${response.status}).`);
29
+ };
30
+ }
31
+ function capsGuestSpend(limits) {
32
+ return limits?.guest?.usdPerDay !== void 0 || limits?.guest?.workspaceUsdPerDay !== void 0;
33
+ }
34
+ function guestUsageHandler(options) {
35
+ let report = options.report;
36
+ return async (event, context) => {
37
+ const guestId = guestIdOf(context.session.auth.current);
38
+ const costUsd = event.data.usage.costUsd;
39
+ if (guestId === void 0 || costUsd === void 0 || !Number.isFinite(costUsd) || costUsd <= 0 || !capsGuestSpend(options.limits())) return;
40
+ report ??= ontologyGuestUsage();
41
+ try {
42
+ await report({
43
+ guestId,
44
+ costUsd,
45
+ key: `${context.session.id}:${context.occurrence.idempotencyKey}`.slice(0, 256)
46
+ });
47
+ } catch (error) {
48
+ console.warn("A guest's spend could not be reported to the ontology.", error);
49
+ }
50
+ };
51
+ }
52
+ export { GUEST_USAGE_PATH, capsGuestSpend, guestUsageHandler, ontologyGuestUsage };
@@ -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-JoaOmdFL.mjs";
7
+ export { f as attachmentsContext, p as storeFiles, m as turnContent } from "../../../_chunks/principal-DUla0Xge.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-JoaOmdFL.mjs";
7
+ export { f as attachmentsContext, d as prepareInboundMedia, p as storeFiles, m as turnContent } from "../../../_chunks/principal-DUla0Xge.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 { B as ACT_AS_HEADER, E as actAsHeaders, D as ontologyConnection } from "../../_chunks/principal-JoaOmdFL.mjs";
7
+ export { R as ACT_AS_HEADER, w as actAsHeaders, T as ontologyConnection } from "../../_chunks/principal-DUla0Xge.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 { I as actionApproval, L as confirmations, N as ontologyTools, R as inputHash, U as actorKey, W as actorOf, jt as runtimeEnvelope } from "../../_chunks/principal-JoaOmdFL.mjs";
7
+ import { F as confirmations, H as actorOf, I as inputHash, P as actionApproval, Pt as runtimeEnvelope, V as actorKey, j as ontologyTools } from "../../_chunks/principal-DUla0Xge.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";
@@ -173,6 +173,7 @@ function ontologyFileCall(texts) {
173
173
  if (saved.saveResult && (await ontologyTools({ principal: ctx.session.auth.current }).labels(actor, saved.name, saved.arguments)).readOnlyHint !== true) throw new Error("Saving a result requires a permitted read-only ontology tool.");
174
174
  const result = await ontologyTools({
175
175
  principal: ctx.session.auth.current,
176
+ sessionId: ctx.session.id,
176
177
  envelope: runtimeEnvelope({
177
178
  principal: ctx.session.auth.current,
178
179
  sessionId: ctx.session.id,
@@ -46,6 +46,8 @@ export declare function ontologyTools(options?: {
46
46
  * by the clients of one caller.
47
47
  */
48
48
  readonly runtimeSources?: Map<string, boolean>;
49
+ /** The agent session the calls are made in, which the ontology keeps with their chat. */
50
+ readonly sessionId?: string;
49
51
  }): {
50
52
  rpc: (actor: OntologyActor, method: string, params: Record<string, unknown>, signal?: AbortSignal) => Promise<Record<string, unknown>>;
51
53
  supportsRuntimeSource(actor: OntologyActor, signal?: AbortSignal): Promise<boolean>;
@@ -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 { O as OntologyActionNotPermitted, k as OntologyFileUnavailable, A as OntologyToolRejected, j as actionToolName, M as ontologyToolLabels, N as ontologyTools, P as promotionTarget } from "../../_chunks/principal-JoaOmdFL.mjs";
7
+ export { E as OntologyActionNotPermitted, D as OntologyFileUnavailable, O as OntologyToolRejected, k as actionToolName, A as ontologyToolLabels, j as ontologyTools, M as promotionTarget } from "../../_chunks/principal-DUla0Xge.mjs";
@@ -5,7 +5,7 @@ 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, mt as chatAddressOf } from "../../../_chunks/principal-JoaOmdFL.mjs";
8
+ import { a as rolesOf, gt as chatAddressOf, i as memberIdOf } from "../../../_chunks/principal-DUla0Xge.mjs";
9
9
  function reviewOf(settings, principal) {
10
10
  return reviewFor(settings, rolesOf(principal));
11
11
  }
@@ -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, mt as chatAddressOf } from "../../../_chunks/principal-JoaOmdFL.mjs";
7
+ import { gt as chatAddressOf, i as memberIdOf } from "../../../_chunks/principal-DUla0Xge.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-JoaOmdFL.mjs";
7
+ import { a as rolesOf } from "../../_chunks/principal-DUla0Xge.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 { Ot as RUNTIME_SOURCE_PROTOCOL, kt as compatibleRuntimeEnvelope, At as principalRuntimeSource, jt as runtimeEnvelope, Mt as telegramRuntimeSource } from "../../_chunks/principal-JoaOmdFL.mjs";
7
+ export { jt as RUNTIME_SOURCE_PROTOCOL, Mt as compatibleRuntimeEnvelope, Nt as principalRuntimeSource, Pt as runtimeEnvelope, Ft as telegramRuntimeSource } from "../../_chunks/principal-DUla0Xge.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 { B as ACT_AS_HEADER, _ as AttachmentError, v as CHAT_HEADER, x as SESSION_HEADER, y as EARLIER_CHAT_HEADER } from "../../_chunks/principal-JoaOmdFL.mjs";
7
+ import { R as ACT_AS_HEADER, _ as AttachmentError, ht as SESSION_HEADER, mt as CHAT_HEADER, v as EARLIER_CHAT_HEADER } from "../../_chunks/principal-DUla0Xge.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 } from "../chats.mjs";
10
10
  import { withButtonDecision } from "../confirmation-buttons.mjs";
11
- import { S as agentAttachments, d as prepareInboundMedia, gt as withChatAddress, m as turnContent } from "../../../_chunks/principal-JoaOmdFL.mjs";
11
+ import { b as agentAttachments, d as prepareInboundMedia, m as turnContent, yt as withChatAddress } from "../../../_chunks/principal-DUla0Xge.mjs";
12
12
  import { redactDiagnostic } from "../diagnostics.mjs";
13
13
  import { MAXIMUM_DOWNLOAD_BYTES, connectionProxy } from "../connection-proxy.mjs";
14
14
  import { appOrigin, channelsEnabled, proxyEnvironment, webhookSecret } from "../environment.mjs";
@@ -4,7 +4,7 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import { _ as AttachmentError } from "../../../_chunks/principal-JoaOmdFL.mjs";
7
+ import { _ as AttachmentError } from "../../../_chunks/principal-DUla0Xge.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";
@@ -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 { K as member, N as ontologyTools, i as memberIdOf, k as OntologyFileUnavailable } from "../../_chunks/principal-JoaOmdFL.mjs";
8
+ import { D as OntologyFileUnavailable, W as member, i as memberIdOf, j as ontologyTools } from "../../_chunks/principal-DUla0Xge.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-Bc9qfC4D.mjs";
13
+ import { t as agentBuild } from "../../../_chunks/build-metadata-2TyBXJEt.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 failureText, Dt as withDeliveryLocale, Et as safeTelegramFetch, S as agentAttachments, Tt as reportTelegramError, c as currentInboundRequest, l as runInboundRequest, n as chatLanguage, o as telegramPrincipal, s as InboundRequest, u as withReplacedText, vt as currentLocale, w as fetchStoredAttachment } from "../../../_chunks/principal-JoaOmdFL.mjs";
18
+ import { At as withDeliveryLocale, Et as failureText, Ot as reportTelegramError, S as fetchStoredAttachment, b as agentAttachments, c as currentInboundRequest, kt as safeTelegramFetch, l as runInboundRequest, n as chatLanguage, o as telegramPrincipal, s as InboundRequest, u as withReplacedText, xt as currentLocale } from "../../../_chunks/principal-DUla0Xge.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";
@@ -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 { Tt as reportTelegramError } from "../../../_chunks/principal-JoaOmdFL.mjs";
8
+ import { Ot as reportTelegramError } from "../../../_chunks/principal-DUla0Xge.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 { Ct as failureText, Tt as reportTelegramError, _ as AttachmentError, wt as formattingRefused, xt as customerMessage } from "../../../_chunks/principal-JoaOmdFL.mjs";
8
+ import { Dt as formattingRefused, Et as failureText, Ot as reportTelegramError, _ as AttachmentError, wt as customerMessage } from "../../../_chunks/principal-DUla0Xge.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";
@@ -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 { Mt as telegramRuntimeSource, Tt as reportTelegramError, c as currentInboundRequest, i as memberIdOf, jt as runtimeEnvelope, o as telegramPrincipal } from "../../../_chunks/principal-JoaOmdFL.mjs";
8
+ import { Ft as telegramRuntimeSource, Ot as reportTelegramError, Pt as runtimeEnvelope, c as currentInboundRequest, i as memberIdOf, o as telegramPrincipal } from "../../../_chunks/principal-DUla0Xge.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 { Tt as reportTelegramError, c as currentInboundRequest, yt as currentThreadId } from "../../../_chunks/principal-JoaOmdFL.mjs";
12
+ import { Ot as reportTelegramError, St as currentThreadId, c as currentInboundRequest } from "../../../_chunks/principal-DUla0Xge.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 { L as confirmations, Tt as reportTelegramError, c as currentInboundRequest, i as memberIdOf, o as telegramPrincipal } from "../../../_chunks/principal-JoaOmdFL.mjs";
8
+ import { F as confirmations, Ot as reportTelegramError, c as currentInboundRequest, i as memberIdOf, o as telegramPrincipal } from "../../../_chunks/principal-DUla0Xge.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";
@@ -222,7 +222,7 @@ function telegramConfirmationEvents(archive, scope) {
222
222
  chatId: source.chatId,
223
223
  chatType: source.chatId.startsWith("-") ? "group" : "private",
224
224
  threadId: source.threadId || null,
225
- participantIds: [saved.memberId],
225
+ participantIds: saved.memberId === void 0 ? [] : [saved.memberId],
226
226
  kind: "tool_result",
227
227
  operationId,
228
228
  toolCallId: operationId,
@@ -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 { Ct as failureText, Dt as withDeliveryLocale, Et as safeTelegramFetch, St as customerText, Tt as reportTelegramError, _t as TelegramDeliveryError, bt as customerCopy, vt as currentLocale, wt as formattingRefused, xt as customerMessage, yt as currentThreadId } from "../../../_chunks/principal-JoaOmdFL.mjs";
8
+ import { At as withDeliveryLocale, Ct as customerCopy, Dt as formattingRefused, Et as failureText, Ot as reportTelegramError, St as currentThreadId, Tt as customerText, bt as TelegramDeliveryError, kt as safeTelegramFetch, wt as customerMessage, xt as currentLocale } from "../../../_chunks/principal-DUla0Xge.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 { Tt as reportTelegramError, p as storeFiles } from "../../../_chunks/principal-JoaOmdFL.mjs";
7
+ import { Ot as reportTelegramError, p as storeFiles } from "../../../_chunks/principal-DUla0Xge.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-Bc9qfC4D.mjs";
7
+ import { t as agentBuild } from "../../../_chunks/build-metadata-2TyBXJEt.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 { F as CONFIRMATION_TTL_MS } from "../../../_chunks/principal-JoaOmdFL.mjs";
7
+ import { N as CONFIRMATION_TTL_MS } from "../../../_chunks/principal-DUla0Xge.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-JoaOmdFL.mjs";
7
+ export { s as InboundRequest, c as currentInboundRequest, l as runInboundRequest, u as withReplacedText } from "../../../_chunks/principal-DUla0Xge.mjs";
@@ -6,7 +6,7 @@ __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 { C as attachmentUrl, Mt as telegramRuntimeSource, Tt as reportTelegramError, f as attachmentsContext, jt as runtimeEnvelope, n as chatLanguage, o as telegramPrincipal } from "../../../_chunks/principal-JoaOmdFL.mjs";
9
+ import { Ft as telegramRuntimeSource, Ot as reportTelegramError, Pt as runtimeEnvelope, f as attachmentsContext, n as chatLanguage, o as telegramPrincipal, x as attachmentUrl } from "../../../_chunks/principal-DUla0Xge.mjs";
10
10
  import { routingBurst } from "../group-routing/burst.mjs";
11
11
  import { telegramSignals } from "./signals.mjs";
12
12
  import { addressingReason, chatKey, otherRecipient } from "../group-routing/signals.mjs";
@@ -4,8 +4,8 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import { At as principalRuntimeSource, K as member, Mt as telegramRuntimeSource, N as ontologyTools, O as OntologyActionNotPermitted, c as currentInboundRequest, j as actionToolName, jt as runtimeEnvelope, z as needsConfirmation } from "../../../_chunks/principal-JoaOmdFL.mjs";
8
- import { t as agentBuild } from "../../../_chunks/build-metadata-Bc9qfC4D.mjs";
7
+ import { E as OntologyActionNotPermitted, Ft as telegramRuntimeSource, L as needsConfirmation, Nt as principalRuntimeSource, Pt as runtimeEnvelope, W as member, c as currentInboundRequest, j as ontologyTools, k as actionToolName } from "../../../_chunks/principal-DUla0Xge.mjs";
8
+ import { t as agentBuild } from "../../../_chunks/build-metadata-2TyBXJEt.mjs";
9
9
  import { object } from "../confirmation-description.mjs";
10
10
  var AttachmentLifecycleNotPermitted = class extends Error {
11
11
  code = "attachment_lifecycle_not_permitted";
@@ -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 chatLanguage, r as identityProviderOf, i as memberIdOf, a as rolesOf, o as telegramPrincipal } from "../../../_chunks/principal-JoaOmdFL.mjs";
7
+ export { t as TELEGRAM_AUTHENTICATOR, n as chatLanguage, r as identityProviderOf, i as memberIdOf, a as rolesOf, o as telegramPrincipal } from "../../../_chunks/principal-DUla0Xge.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 { Tt as reportTelegramError } from "../../../_chunks/principal-JoaOmdFL.mjs";
7
+ import { Ot as reportTelegramError } from "../../../_chunks/principal-DUla0Xge.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;
@@ -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 { Tt as reportTelegramError, _t as TelegramDeliveryError, vt as currentLocale, xt as customerMessage } from "../../../_chunks/principal-JoaOmdFL.mjs";
8
+ import { Ot as reportTelegramError, bt as TelegramDeliveryError, wt as customerMessage, xt as currentLocale } from "../../../_chunks/principal-DUla0Xge.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 { Mt as telegramRuntimeSource, jt as runtimeEnvelope } from "../../../_chunks/principal-JoaOmdFL.mjs";
7
+ import { Ft as telegramRuntimeSource, Pt as runtimeEnvelope } from "../../../_chunks/principal-DUla0Xge.mjs";
8
8
  import { workspaceAction } from "./workspace-action.mjs";
9
9
  import { STRUCTURED_KINDS } from "./structured-settings.mjs";
10
10
  const record = (value) => {
@@ -7,7 +7,7 @@ __eveCreateRequire(import.meta.url);
7
7
  import { telegramText } from "./texts.mjs";
8
8
  import { confirmationLocale } from "./confirmation-text.mjs";
9
9
  import { recordSessionFailure } from "./chat-archive.mjs";
10
- import { Ct as failureText, Tt as reportTelegramError, bt as customerCopy, i as memberIdOf, vt as currentLocale, yt as currentThreadId } from "../../../_chunks/principal-JoaOmdFL.mjs";
10
+ import { Ct as customerCopy, Et as failureText, Ot as reportTelegramError, St as currentThreadId, i as memberIdOf, xt as currentLocale } from "../../../_chunks/principal-DUla0Xge.mjs";
11
11
  import { modelServiceFailure } from "../model-service-failure.mjs";
12
12
  function telegramFailureEvents(input) {
13
13
  return {
@@ -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 { K as member, N as ontologyTools, j as actionToolName, z as needsConfirmation } from "../../../_chunks/principal-JoaOmdFL.mjs";
7
+ import { L as needsConfirmation, W as member, j as ontologyTools, k as actionToolName } from "../../../_chunks/principal-DUla0Xge.mjs";
8
8
  import { object } from "../confirmation-description.mjs";
9
9
  var WorkspaceActionAlreadyDispatched = class extends Error {};
10
10
  async function workspaceAction(input) {
@@ -24,6 +24,11 @@ export declare const WEB_GRANT_ATTRIBUTE = "webGrant";
24
24
  export declare const KIND_ATTRIBUTE = "kind";
25
25
  /** The principal attribute holding a guest's id, which names no user. */
26
26
  export declare const GUEST_ID_ATTRIBUTE = "guestId";
27
+ /**
28
+ * The principal attribute marking a guest who may confirm actions in the website's chat, as the
29
+ * ontology's `guest.confirmations` allows: `"true"`.
30
+ */
31
+ export declare const GUEST_CONFIRMATIONS_ATTRIBUTE = "guestConfirmations";
27
32
  /** The role every guest holds, and only guests. */
28
33
  export declare const GUEST_ROLE = "guest";
29
34
  /** How every access token of the ontology's OAuth server, agent tokens too, begins. */
@@ -65,6 +70,8 @@ export interface WebGuest {
65
70
  readonly roles: ReadonlyArray<string>;
66
71
  /** The verbs of the `agent_tool:<verb>` permissions guests hold. */
67
72
  readonly agentTools: ReadonlyArray<string>;
73
+ /** Whether the guest may confirm actions with the chat's buttons, as `guest.confirmations` says. */
74
+ readonly confirmations?: boolean;
68
75
  /** For a turn the guest starts: the agent's guest limit it exceeds, and when the next may run. */
69
76
  readonly limited?: {
70
77
  readonly scope: string;
@@ -83,14 +90,16 @@ export type WebIntrospection = (token: string, origin: string, turn?: boolean) =
83
90
  /** The code of the answer to a turn the agent's limits refuse, as the ontology's own refusals. */
84
91
  export declare const TURN_LIMITED_CODE = "rate_limited";
85
92
  /**
86
- * A turn the agent's limits for people who signed up refuse: answered `429 rate_limited` with
87
- * `Retry-After`, before the turn reaches the model. The answer carries no words: the app's chat
88
- * reports it by its code in the workspace's own.
93
+ * A turn the agent's limits refuse: answered `429 rate_limited` with `Retry-After`, before the turn
94
+ * reaches the model, and with the limit's `scope`, such as `guestTurnsPerDay` or
95
+ * `guestWorkspaceUsdPerDay`, when the ontology names it. The answer carries no words: the app's
96
+ * chat reports it by its code and scope in the workspace's own.
89
97
  */
90
98
  export declare class TurnLimitedError extends ForbiddenError {
91
99
  readonly retryAfterSeconds: number;
100
+ readonly scope?: string | undefined;
92
101
  readonly response: Response;
93
- constructor(retryAfterSeconds: number);
102
+ constructor(retryAfterSeconds: number, scope?: string | undefined);
94
103
  }
95
104
  /**
96
105
  * Whom an introspection answer names, when it is active: a member in their own chat, or a guest,
@@ -113,6 +122,11 @@ export declare function ontologyIntrospection(options?: {
113
122
  * has no `memberId`, so nothing that needs a member takes them for one.
114
123
  */
115
124
  export declare function guestPrincipal(guest: WebGuest): SessionAuthContext;
125
+ /**
126
+ * Whether a guest's web principal may confirm actions with the chat's buttons: only where the
127
+ * ontology's `guest.confirmations` allows it, as its answer for the guest's token said.
128
+ */
129
+ export declare function guestConfirms(principal: SessionAuthContext | null | undefined): boolean;
116
130
  /** The guest id a web principal of a guest carries; `undefined` for anyone else. */
117
131
  export declare function guestIdOf(principal: SessionAuthContext | null | undefined): string | undefined;
118
132
  /** The session principal of a member who wrote on the web, in their own chat. */
@@ -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 { Y as ACCESS_TOKEN_PREFIX, X as AGENT_GRANT_HEADER, Z as GUEST_ID_ATTRIBUTE, Q as GUEST_ROLE, $ as INTROSPECTION_PATH, et as KIND_ATTRIBUTE, tt as TURN_LIMITED_CODE, nt as TurnLimitedError, rt as WEB_AUTHENTICATOR, it as WEB_GRANT_ATTRIBUTE, at as WEB_PROVIDER, ot as guestIdOf, st as guestPrincipal, ct as ontologyIntrospection, lt as webAuth, ut as webGrantOf, dt as webMemberOf, ft as webPrincipal } from "../../../_chunks/principal-JoaOmdFL.mjs";
7
+ export { q as ACCESS_TOKEN_PREFIX, J as AGENT_GRANT_HEADER, Y as GUEST_CONFIRMATIONS_ATTRIBUTE, X as GUEST_ID_ATTRIBUTE, Z as GUEST_ROLE, Q as INTROSPECTION_PATH, $ as KIND_ATTRIBUTE, et as TURN_LIMITED_CODE, tt as TurnLimitedError, nt as WEB_AUTHENTICATOR, rt as WEB_GRANT_ATTRIBUTE, it as WEB_PROVIDER, at as guestConfirms, ot as guestIdOf, st as guestPrincipal, ct as ontologyIntrospection, lt as webAuth, ut as webGrantOf, dt as webMemberOf, ft as webPrincipal } from "../../../_chunks/principal-DUla0Xge.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 { at as WEB_PROVIDER, lt as webAuth } from "../../../_chunks/principal-JoaOmdFL.mjs";
7
+ import { it as WEB_PROVIDER, lt as webAuth } from "../../../_chunks/principal-DUla0Xge.mjs";
8
8
  import { localDev, placeholderAuth, vercelOidc } from "eve/channels/auth";
9
9
  import { eveChannel } from "eve/channels/eve";
10
10
  const WEB_EXPOSED_HEADERS = [
@@ -7,7 +7,7 @@ __eveCreateRequire(import.meta.url);
7
7
  import { admitMessage, localizedText } from "../admission.mjs";
8
8
  import { agentToolsAttribute } from "../agent-tools.mjs";
9
9
  import { providerChat } from "../attachment-tools.mjs";
10
- import { S as agentAttachments, d as prepareInboundMedia, gt as withChatAddress, i as memberIdOf } from "../../../_chunks/principal-JoaOmdFL.mjs";
10
+ import { b as agentAttachments, d as prepareInboundMedia, i as memberIdOf, yt as withChatAddress } from "../../../_chunks/principal-DUla0Xge.mjs";
11
11
  import { gatewayImageDescriber } from "../inbound-media/images.mjs";
12
12
  import { gatewayMediaCapabilities, turnMediaPlan } from "../inbound-media/plan.mjs";
13
13
  import { gatewayTranscriber } from "../inbound-media/speech.mjs";
@@ -4,7 +4,7 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import { _ as AttachmentError } from "../../../_chunks/principal-JoaOmdFL.mjs";
7
+ import { _ as AttachmentError } from "../../../_chunks/principal-DUla0Xge.mjs";
8
8
  import { sendStoredAttachments } from "../attachments-send.mjs";
9
9
  import { connectionProxy } from "../connection-proxy.mjs";
10
10
  import { redactDiagnostic } from "../diagnostics.mjs";