@segmentstream/agent 0.34.0 → 0.35.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 (47) hide show
  1. package/README.md +1 -1
  2. package/dist/_chunks/{build-metadata-rvx1ljR5.mjs → build-metadata-Dk0pEJxW.mjs} +1 -1
  3. package/dist/_chunks/{inbound-request-BQQWCrWl.mjs → inbound-request-DgQB4g1J.mjs} +1 -1
  4. package/dist/_chunks/{principal-VsmaJp1x.mjs → principal-UlkbLrgQ.mjs} +1 -1
  5. package/dist/extension/config.d.ts +10 -2
  6. package/dist/extension/config.mjs +33 -9
  7. package/dist/extension/hooks/authorization.mjs +1 -1
  8. package/dist/extension/lib/actor.mjs +1 -1
  9. package/dist/extension/lib/attachment-tools.mjs +1 -1
  10. package/dist/extension/lib/build-metadata.mjs +1 -1
  11. package/dist/extension/lib/chat-context.mjs +1 -1
  12. package/dist/extension/lib/confirmations.mjs +1 -1
  13. package/dist/extension/lib/conversation-runtime.mjs +1 -1
  14. package/dist/extension/lib/group-routing/policy.d.ts +11 -2
  15. package/dist/extension/lib/group-routing/policy.mjs +56 -1
  16. package/dist/extension/lib/ontology-connection.mjs +1 -1
  17. package/dist/extension/lib/ontology-file-call.mjs +1 -1
  18. package/dist/extension/lib/ontology-tools.mjs +1 -1
  19. package/dist/extension/lib/runtime-envelope.d.ts +1 -1
  20. package/dist/extension/lib/runtime-envelope.mjs +1 -1
  21. package/dist/extension/lib/stored-files.mjs +1 -1
  22. package/dist/extension/lib/telegram/adapter.mjs +4 -4
  23. package/dist/extension/lib/telegram/attachment-description.mjs +1 -1
  24. package/dist/extension/lib/telegram/attachments-send.mjs +2 -2
  25. package/dist/extension/lib/telegram/callbacks.mjs +2 -2
  26. package/dist/extension/lib/telegram/chat-post-card.mjs +1 -1
  27. package/dist/extension/lib/telegram/confirmations.mjs +3 -3
  28. package/dist/extension/lib/telegram/conversations.mjs +1 -1
  29. package/dist/extension/lib/telegram/customer-text.d.ts +1 -1
  30. package/dist/extension/lib/telegram/customer-text.mjs +1 -1
  31. package/dist/extension/lib/telegram/files.mjs +2 -2
  32. package/dist/extension/lib/telegram/health.mjs +1 -1
  33. package/dist/extension/lib/telegram/images.mjs +1 -1
  34. package/dist/extension/lib/telegram/inbound-request.mjs +1 -1
  35. package/dist/extension/lib/telegram/inbound.mjs +2 -2
  36. package/dist/extension/lib/telegram/lifecycle.mjs +3 -3
  37. package/dist/extension/lib/telegram/media-policy.mjs +1 -1
  38. package/dist/extension/lib/telegram/principal.mjs +1 -1
  39. package/dist/extension/lib/telegram/session-recovery.mjs +1 -1
  40. package/dist/extension/lib/telegram/silent.mjs +1 -1
  41. package/dist/extension/lib/telegram/structured.mjs +1 -1
  42. package/dist/extension/lib/telegram/turn-errors.mjs +2 -2
  43. package/dist/extension/lib/telegram/voice.mjs +1 -1
  44. package/dist/extension/model.mjs +1 -1
  45. package/dist/extension/tools/attachments_promote.mjs +1 -1
  46. package/dist/extension/tools/questions_ask.mjs +1 -1
  47. package/package.json +2 -2
package/README.md CHANGED
@@ -327,7 +327,7 @@ client with a member, and it negotiates neither chat posting nor the chat's runt
327
327
  ### Workflow tasks
328
328
 
329
329
  A workflow hands the workspace's agent a prompt with `agentTask` from
330
- `@segmentstream-cloud/ontology/workflows` and waits for its answer
330
+ `@segmentstream/ontology/workflows` and waits for its answer
331
331
  ([the specification](../../docs/agent-tasks-spec.md)). The task runs in an ordinary session of the
332
332
  same agent: its instructions, model choice from the principal's roles, tools, guides and sandbox.
333
333
  The SDK adds no text to the prompt.
@@ -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
- var version = "0.34.0";
7
+ var version = "0.35.0";
8
8
  function agentBuild(environment = process.env) {
9
9
  return {
10
10
  agent: version,
@@ -14,7 +14,7 @@ import { inTelegramSendQueue } from "../extension/lib/telegram/send-queue.mjs";
14
14
  import { retainDeliveryDiagnostic } from "../extension/lib/telegram/delivery-diagnostics.mjs";
15
15
  import { randomBytes, randomUUID } from "node:crypto";
16
16
  import { AsyncLocalStorage } from "node:async_hooks";
17
- import { telegramPreviewOptions, telegramTextLinks } from "@segmentstream-cloud/ontology/telegram";
17
+ import { telegramPreviewOptions, telegramTextLinks } from "@segmentstream/ontology/telegram";
18
18
  const deliveryLocale = new AsyncLocalStorage();
19
19
  function withDeliveryLocale(locale, run, threadId, replyTo, chatId) {
20
20
  return deliveryLocale.run({
@@ -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 { n as currentInboundRequest } from "./inbound-request-BQQWCrWl.mjs";
7
+ import { n as currentInboundRequest } from "./inbound-request-DgQB4g1J.mjs";
8
8
  import "../extension/lib/agent-task.mjs";
9
9
  import { randomUUID } from "node:crypto";
10
10
  function telegramRuntimeSource(message, files, callbackQueryId) {
@@ -1,10 +1,10 @@
1
- import { type GroupPolicyInput } from "@segmentstream-cloud/ontology/groups";
1
+ import { type GroupPolicyInput } from "@segmentstream/ontology/groups";
2
2
  import { type GroupPolicy } from "./lib/group-routing/policy.js";
3
3
  import { type StructuredInbound } from "./lib/telegram/structured-settings.js";
4
4
  import type { WorkspaceActionHook } from "./lib/telegram/workspace-action.js";
5
5
  import { type TelegramTexts } from "./lib/telegram/texts.js";
6
6
  import type { AttachmentLifecycle } from "./lib/telegram/lifecycle.js";
7
- import { type TelegramLinkPreviews } from "@segmentstream-cloud/ontology/telegram";
7
+ import { type TelegramLinkPreviews } from "@segmentstream/ontology/telegram";
8
8
  export declare const TELEGRAM_POLICIES: readonly ["mention", "smart"];
9
9
  /**
10
10
  * Smart routing classifies unaddressed group messages. Mention policy observes them
@@ -224,6 +224,14 @@ export interface ConfigIssue {
224
224
  readonly message: string;
225
225
  readonly path: ReadonlyArray<string>;
226
226
  }
227
+ /** A setting `agent/segmentstream.json` sets that configures nothing: accepted, and ignored. */
228
+ export type ConfigWarning = ConfigIssue;
229
+ /**
230
+ * Every setting the configuration sets that configures nothing, for the deploy output and the
231
+ * console, so the builder learns of it where they work: retired session and group keys, and the
232
+ * older policies' thresholds where the conversation policy applies. The agent also logs them.
233
+ */
234
+ export declare function configWarnings(value: unknown): ReadonlyArray<ConfigWarning>;
227
235
  type Validation = {
228
236
  readonly value: SegmentStreamAgentConfig;
229
237
  readonly issues?: undefined;
@@ -4,14 +4,14 @@ 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 { effectiveGroupPolicy, groupPolicy, ignoredGroupSettings } from "./lib/group-routing/policy.mjs";
7
+ import { effectiveGroupPolicy, groupPolicy, ignoredGroupSettings, inapplicableGroupThresholds } from "./lib/group-routing/policy.mjs";
8
8
  import { localizedText as localizedText$1 } from "./lib/admission.mjs";
9
9
  import { STRUCTURED_KINDS } from "./lib/telegram/structured-settings.mjs";
10
10
  import { TELEGRAM_TEXT_KEYS } from "./lib/telegram/texts.mjs";
11
11
  import { isTechnicalText } from "./lib/customer-text-safety.mjs";
12
12
  import { readFileSync, realpathSync } from "node:fs";
13
- import { expandGroupFiles, groupPolicyIssues } from "@segmentstream-cloud/ontology/groups";
14
- import { TELEGRAM_LINK_PREVIEWS, isHttpOrigin } from "@segmentstream-cloud/ontology/telegram";
13
+ import { expandGroupFiles, groupPolicyIssues } from "@segmentstream/ontology/groups";
14
+ import { TELEGRAM_LINK_PREVIEWS, isHttpOrigin } from "@segmentstream/ontology/telegram";
15
15
  const CONNECTION_KEY = /^[a-z][a-z0-9_]{0,63}$/;
16
16
  const TELEGRAM_POLICIES = ["mention", "smart"];
17
17
  const DEFAULT_STT_MODEL = "spacexai/grok-stt";
@@ -38,6 +38,29 @@ const ADMISSION_REPLY_KEYS = [
38
38
  "refused"
39
39
  ];
40
40
  const SESSION_SCOPES = ["chat", "thread"];
41
+ const IGNORED_SESSION_KEYS = [
42
+ "compactAt",
43
+ "timezone",
44
+ "idleResetHours"
45
+ ];
46
+ const INAPPLICABLE_THRESHOLD = "applies only to the legacy and engaged policies; the conversation policy reads thresholds.reply and thresholds.defer, so remove it";
47
+ function configWarnings(value) {
48
+ const root = value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
49
+ return [
50
+ ...(root?.sessions !== null && typeof root?.sessions === "object" && !Array.isArray(root.sessions) ? Object.keys(root.sessions) : []).filter((key) => IGNORED_SESSION_KEYS.includes(key)).map((key) => ({
51
+ path: ["sessions", key],
52
+ message: "no longer configures anything: eve compacts sessions and ends idle ones after limits.sessionTimeoutMs in agent.ts, so remove it"
53
+ })),
54
+ ...ignoredGroupSettings(root?.groups, ["groups"]).map((path) => ({
55
+ path: path.split("."),
56
+ message: "no longer configures anything: group routing reads the chat's recent messages and has no conversation timers, so remove it"
57
+ })),
58
+ ...inapplicableGroupThresholds(root?.groups).map((path) => ({
59
+ path: ["groups", ...path],
60
+ message: INAPPLICABLE_THRESHOLD
61
+ }))
62
+ ];
63
+ }
41
64
  var SegmentStreamAgentConfigError = class extends Error {
42
65
  issues;
43
66
  name = "SegmentStreamAgentConfigError";
@@ -326,12 +349,8 @@ function isSessionScope(value) {
326
349
  return SESSION_SCOPES.some((scope) => scope === value);
327
350
  }
328
351
  let ignoredGroupSettingsReported = false;
329
- const IGNORED_SESSION_KEYS = [
330
- "compactAt",
331
- "timezone",
332
- "idleResetHours"
333
- ];
334
352
  let ignoredSessionKeysReported = false;
353
+ let inapplicableThresholdsReported = false;
335
354
  function sessionSettings(value, issues) {
336
355
  const path = ["sessions"];
337
356
  const sessions = section({
@@ -595,6 +614,11 @@ function validateConfig(input, options = {}) {
595
614
  ignoredGroupSettingsReported = true;
596
615
  console.warn(`[segmentstream] agent/segmentstream.json: ${ignoredGroups.join(", ")} no longer configure anything and are ignored. Group routing has no conversation timers: the classifier reads the chat's last groups.smart.context.messages messages, however old; remove these keys.`);
597
616
  }
617
+ const inapplicable = inapplicableGroupThresholds(root?.groups);
618
+ if (inapplicable.length > 0 && !inapplicableThresholdsReported) {
619
+ inapplicableThresholdsReported = true;
620
+ console.warn(`[segmentstream] agent/segmentstream.json: ${inapplicable.map((path) => ["groups", ...path].join(".")).join(", ")} ${INAPPLICABLE_THRESHOLD}.`);
621
+ }
598
622
  let authoredGroups = root?.groups;
599
623
  if (authoredGroups !== void 0 && groupPolicyIssues(authoredGroups).length === 0) try {
600
624
  authoredGroups = expandGroupFiles(authoredGroups, (path) => {
@@ -750,4 +774,4 @@ function manifestOf(config) {
750
774
  if (validation.issues !== void 0) throw new SegmentStreamAgentConfigError(validation.issues);
751
775
  return validation.value;
752
776
  }
753
- export { ADMISSION_REPLY_KEYS, DEFAULT_ADMISSION_LIMITS, DEFAULT_ATTACHMENTS_MODEL, DEFAULT_DECISION_MODEL, DEFAULT_IMAGE_DESCRIPTION_MODEL, DEFAULT_STT_MODEL, SESSION_SCOPES, SegmentStreamAgentConfigError, TELEGRAM_POLICIES, chatModelChoiceOf, configSchema, isLegacyAgentArchive, manifestOf, validateConfig };
777
+ export { ADMISSION_REPLY_KEYS, DEFAULT_ADMISSION_LIMITS, DEFAULT_ATTACHMENTS_MODEL, DEFAULT_DECISION_MODEL, DEFAULT_IMAGE_DESCRIPTION_MODEL, DEFAULT_STT_MODEL, SESSION_SCOPES, SegmentStreamAgentConfigError, TELEGRAM_POLICIES, chatModelChoiceOf, configSchema, configWarnings, isLegacyAgentArchive, manifestOf, validateConfig };
@@ -7,7 +7,7 @@ __eveCreateRequire(import.meta.url);
7
7
  import segmentstream from "../extension.mjs";
8
8
  import { localizedText } from "../lib/admission.mjs";
9
9
  import { confirmationLocale } from "../lib/telegram/confirmation-text.mjs";
10
- import "../../_chunks/principal-VsmaJp1x.mjs";
10
+ import "../../_chunks/principal-UlkbLrgQ.mjs";
11
11
  import { defineHook } from "eve/hooks";
12
12
  var authorization_default = defineHook({ events: { "interaction.opened": (event, context) => {
13
13
  const principal = context.session.auth.current;
@@ -5,7 +5,7 @@ const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import { AGENT_TASK_HEADER, agentTaskIdOf, taskSecret } from "./agent-task.mjs";
8
- import { i as memberIdOf, r as identityProviderOf } from "../../_chunks/principal-VsmaJp1x.mjs";
8
+ import { i as memberIdOf, r as identityProviderOf } from "../../_chunks/principal-UlkbLrgQ.mjs";
9
9
  import { defineDynamic } from "eve/tools";
10
10
  const ACT_AS_HEADER = "X-SegmentStream-Act-As";
11
11
  function member(memberId) {
@@ -10,7 +10,7 @@ import { readSheets, typedTable } from "./attachment-tables.mjs";
10
10
  import { appOrigin } from "./environment.mjs";
11
11
  import { runtimeToken } from "./runtime-token.mjs";
12
12
  import { telegramConversation } from "./telegram/files.mjs";
13
- import { i as memberIdOf } from "../../_chunks/principal-VsmaJp1x.mjs";
13
+ import { i as memberIdOf } from "../../_chunks/principal-UlkbLrgQ.mjs";
14
14
  const MAXIMUM_TEXT_CHARACTERS = 5e4;
15
15
  const MAXIMUM_INLINE_BYTES = 5242880;
16
16
  var AttachmentOwnerError = class extends Error {
@@ -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 agentBuild } from "../../_chunks/build-metadata-rvx1ljR5.mjs";
7
+ export { t as agentBuild } from "../../_chunks/build-metadata-Dk0pEJxW.mjs";
@@ -7,7 +7,7 @@ __eveCreateRequire(import.meta.url);
7
7
  import { agentTaskIdOf } from "./agent-task.mjs";
8
8
  import { conversationCoordinates } from "./conversation-runtime.mjs";
9
9
  import { collapseConversationEvents, conversations, topicContext } from "./conversations.mjs";
10
- import { p as reportTelegramError } from "../../_chunks/inbound-request-BQQWCrWl.mjs";
10
+ import { p as reportTelegramError } from "../../_chunks/inbound-request-DgQB4g1J.mjs";
11
11
  import { deliveries, runs, turns } from "eve/events";
12
12
  import { createHash } from "node:crypto";
13
13
  import { defineState } from "eve/context";
@@ -5,7 +5,7 @@ const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import { actorOf, member } from "./actor.mjs";
8
- import { i as memberIdOf } from "../../_chunks/principal-VsmaJp1x.mjs";
8
+ import { i as memberIdOf } from "../../_chunks/principal-UlkbLrgQ.mjs";
9
9
  import { ConfirmationRefused, UnsafeConfirmationTarget } from "./confirmation-description.mjs";
10
10
  import { chatPostDigest, isChatPost } from "./chat-post-confirmation.mjs";
11
11
  import { confirmationCopy, confirmationCopyIssue, confirmationLocale, renderConfirmation } from "./telegram/confirmation-text.mjs";
@@ -7,7 +7,7 @@ __eveCreateRequire(import.meta.url);
7
7
  import { n as contentText, t as CONTENT_CAPS } from "../../_chunks/content-cDtVnr8Y.mjs";
8
8
  import { conversationEvent, conversations, sessionFailureEventId, summarizeArguments } from "./conversations.mjs";
9
9
  import { agentTaskIdOf } from "./agent-task.mjs";
10
- import { i as memberIdOf } from "../../_chunks/principal-VsmaJp1x.mjs";
10
+ import { i as memberIdOf } from "../../_chunks/principal-UlkbLrgQ.mjs";
11
11
  import { parseAddress } from "./telegram/sessions.mjs";
12
12
  import { completionKind } from "./telegram/silent.mjs";
13
13
  import { recordModelServiceAlert } from "./model-service-alert.mjs";
@@ -1,5 +1,5 @@
1
- import type { GroupPolicyInput, SmartPolicyInput, ChatOverrideInput, Participants } from "@segmentstream-cloud/ontology/groups";
2
- export type { GroupPolicyInput, SmartPolicyInput, ChatOverrideInput, Participants, } from "@segmentstream-cloud/ontology/groups";
1
+ import type { GroupPolicyInput, SmartPolicyInput, ChatOverrideInput, Participants } from "@segmentstream/ontology/groups";
2
+ export type { GroupPolicyInput, SmartPolicyInput, ChatOverrideInput, Participants, } from "@segmentstream/ontology/groups";
3
3
  export declare const LEGACY_INSTRUCTIONS: string;
4
4
  export declare const DEFAULT_CRITERIA: {
5
5
  observe: string;
@@ -78,6 +78,15 @@ export declare const IGNORED_GROUP_SETTINGS: {
78
78
  export declare function ignoredGroupSetting(path: ReadonlyArray<string>): boolean;
79
79
  /** The dotted paths of ignored settings an authored `groups` value sets, for a deploy warning. */
80
80
  export declare function ignoredGroupSettings(value: unknown, prefix?: ReadonlyArray<string>): string[];
81
+ /**
82
+ * Paths of `engaged`, `neutral` and `humanThread` thresholds an authored `groups` value sets
83
+ * where the conversation policy applies and nothing reads them. Chats inherit the top level and a
84
+ * chat scope its parent chat; the shadow policy overlays each chat's effective policy, and takes
85
+ * that policy when it names none. Switching policy keeps authored thresholds
86
+ * (`overlaySmartPolicy`), so a threshold stays applicable while any section on an older policy
87
+ * inherits it.
88
+ */
89
+ export declare function inapplicableGroupThresholds(value: unknown): string[][];
81
90
  export declare function groupPolicy(input?: GroupPolicyInput, aliases?: {
82
91
  readonly mode?: string;
83
92
  readonly model?: string;
@@ -106,6 +106,61 @@ function ignoredGroupSettings(value, prefix = []) {
106
106
  if (value === null || typeof value !== "object" || Array.isArray(value)) return ignoredGroupSetting(prefix) ? [prefix.join(".")] : [];
107
107
  return Object.entries(value).flatMap(([key, child]) => ignoredGroupSettings(child, [...prefix, key]));
108
108
  }
109
+ const PARTICIPANT_THRESHOLDS = [
110
+ "engaged",
111
+ "neutral",
112
+ "humanThread"
113
+ ];
114
+ function inapplicableGroupThresholds(value) {
115
+ const object = (v) => v !== null && typeof v === "object" && !Array.isArray(v) ? v : void 0;
116
+ const policyOf = (smart) => {
117
+ const policy = object(object(smart)?.engagement)?.policy;
118
+ return typeof policy === "string" ? policy : void 0;
119
+ };
120
+ const thresholdsOf = (smart) => object(object(smart)?.thresholds) ?? {};
121
+ const groups = object(value);
122
+ const chats = object(groups?.chats) ?? {};
123
+ const contexts = [{
124
+ path: ["smart"],
125
+ thresholds: thresholdsOf(groups?.smart),
126
+ parent: void 0,
127
+ policy: policyOf(groups?.smart) ?? "legacy"
128
+ }];
129
+ for (const key of Object.keys(chats).sort((a, b) => Number(a.includes("/")) - Number(b.includes("/")))) {
130
+ const parentKey = key.includes("/") ? key.slice(0, key.indexOf("/")) : void 0;
131
+ const found = contexts.findIndex((c) => c.path[1] === parentKey);
132
+ const parent = found === -1 ? 0 : found;
133
+ const smart = object(chats[key])?.smart;
134
+ contexts.push({
135
+ path: [
136
+ "chats",
137
+ key,
138
+ "smart"
139
+ ],
140
+ thresholds: thresholdsOf(smart),
141
+ parent,
142
+ policy: policyOf(smart) ?? contexts[parent].policy
143
+ });
144
+ }
145
+ const shadow = object(groups?.observability)?.shadow;
146
+ const shadowThresholds = thresholdsOf(shadow);
147
+ const shadowPolicy = policyOf(shadow);
148
+ const source = (index, key) => {
149
+ for (let i = index; i !== void 0; i = contexts[i].parent) if (key in contexts[i].thresholds) return i;
150
+ };
151
+ const shadowReads = (key) => shadow !== void 0 && shadowPolicy !== void 0 && shadowPolicy !== "conversation" && !(key in shadowThresholds);
152
+ const participant = (thresholds) => Object.keys(thresholds).filter((key) => PARTICIPANT_THRESHOLDS.includes(key));
153
+ return [...contexts.flatMap((context, index) => context.policy !== "conversation" ? [] : participant(context.thresholds).filter((key) => !shadowReads(key) && !contexts.some((other, i) => other.policy !== "conversation" && source(i, key) === index)).map((key) => [
154
+ ...context.path,
155
+ "thresholds",
156
+ key
157
+ ])), ...(shadowPolicy ?? (contexts.some((c) => c.policy !== "conversation") ? "" : "conversation")) === "conversation" ? participant(shadowThresholds).map((key) => [
158
+ "observability",
159
+ "shadow",
160
+ "thresholds",
161
+ key
162
+ ]) : []];
163
+ }
109
164
  function authored(value, source) {
110
165
  return Object.fromEntries(Object.entries(sources(value, source)).filter(([path]) => !ignoredGroupSetting(path.split("."))));
111
166
  }
@@ -188,4 +243,4 @@ function effectiveGroupPolicy(base, key) {
188
243
  if (thresholds.defer !== void 0 && thresholds.defer > thresholds.reply) throw new RangeError("Group thresholds must satisfy defer <= reply after inheritance.");
189
244
  return result;
190
245
  }
191
- export { DEFAULT_CRITERIA, DEFAULT_GROUP_POLICY, ENGAGED_CRITERIA, ENGAGED_INSTRUCTIONS, IGNORED_GROUP_SETTINGS, LEGACY_INSTRUCTIONS, effectiveGroupPolicy, groupPolicy, ignoredGroupSetting, ignoredGroupSettings, overlaySmartPolicy, smartPolicy };
246
+ export { DEFAULT_CRITERIA, DEFAULT_GROUP_POLICY, ENGAGED_CRITERIA, ENGAGED_INSTRUCTIONS, IGNORED_GROUP_SETTINGS, LEGACY_INSTRUCTIONS, effectiveGroupPolicy, groupPolicy, ignoredGroupSetting, ignoredGroupSettings, inapplicableGroupThresholds, overlaySmartPolicy, smartPolicy };
@@ -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 { c as compatibleRuntimeEnvelope, u as runtimeEnvelope } from "../../_chunks/principal-VsmaJp1x.mjs";
7
+ import { c as compatibleRuntimeEnvelope, u as runtimeEnvelope } from "../../_chunks/principal-UlkbLrgQ.mjs";
8
8
  import { appOrigin } from "./environment.mjs";
9
9
  import { actionApproval, confirmations } from "./confirmations.mjs";
10
10
  import { CHAT_POST_ENVELOPE, CHAT_POST_TOOL, chatPostDigest, chatPostOperationId, isChatPost } from "./chat-post-confirmation.mjs";
@@ -7,7 +7,7 @@ __eveCreateRequire(import.meta.url);
7
7
  import { actionApproval, confirmations, inputHash } from "./confirmations.mjs";
8
8
  import { isChatPost } from "./chat-post-confirmation.mjs";
9
9
  import { ontologyTools } from "./ontology-tools.mjs";
10
- import { u as runtimeEnvelope } from "../../_chunks/principal-VsmaJp1x.mjs";
10
+ import { u as runtimeEnvelope } from "../../_chunks/principal-UlkbLrgQ.mjs";
11
11
  import { sandboxFile } from "./sandbox-session.mjs";
12
12
  import { saveOntologyResult } from "./ontology-result-file.mjs";
13
13
  import { actorKey, actorOf } from "./actor.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 { c as compatibleRuntimeEnvelope, s as RUNTIME_SOURCE_PROTOCOL, u as runtimeEnvelope } from "../../_chunks/principal-VsmaJp1x.mjs";
7
+ import { c as compatibleRuntimeEnvelope, s as RUNTIME_SOURCE_PROTOCOL, u as runtimeEnvelope } from "../../_chunks/principal-UlkbLrgQ.mjs";
8
8
  import "./agent-task.mjs";
9
9
  import { actorHeaders, actorKey, actorOf } from "./actor.mjs";
10
10
  import { CONFIRMATION_FACTS, CONFIRMATION_PREVIEW_METHOD, ConfirmationRefused, confirmationCard, describeConfirmation, factsConfirmation, object } from "./confirmation-description.mjs";
@@ -1,4 +1,4 @@
1
- import type { RuntimeSource } from "@segmentstream-cloud/ontology";
1
+ import type { RuntimeSource } from "@segmentstream/ontology";
2
2
  import type { SessionAuthContext } from "eve/context";
3
3
  import type { TelegramMessage } from "eve/channels/telegram";
4
4
  import type { StagedFile } from "./telegram/inbound-request.js";
@@ -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 RUNTIME_SOURCE_PROTOCOL, c as compatibleRuntimeEnvelope, l as principalRuntimeSource, u as runtimeEnvelope, d as telegramRuntimeSource } from "../../_chunks/principal-VsmaJp1x.mjs";
7
+ export { s as RUNTIME_SOURCE_PROTOCOL, c as compatibleRuntimeEnvelope, l as principalRuntimeSource, u as runtimeEnvelope, d as telegramRuntimeSource } from "../../_chunks/principal-UlkbLrgQ.mjs";
@@ -6,7 +6,7 @@ __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import { object } from "./confirmation-description.mjs";
8
8
  import { OntologyFileUnavailable, ontologyTools } from "./ontology-tools.mjs";
9
- import { i as memberIdOf } from "../../_chunks/principal-VsmaJp1x.mjs";
9
+ import { i as memberIdOf } from "../../_chunks/principal-UlkbLrgQ.mjs";
10
10
  import { member } from "./actor.mjs";
11
11
  import { redactDiagnostic } from "./diagnostics.mjs";
12
12
  import { createHash } from "node:crypto";
@@ -10,7 +10,7 @@ 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-rvx1ljR5.mjs";
13
+ import { t as agentBuild } from "../../../_chunks/build-metadata-Dk0pEJxW.mjs";
14
14
  import { attachmentLifecycle } from "./lifecycle.mjs";
15
15
  import { manifestOf } from "../../config.mjs";
16
16
  import { gatewayAttachmentDescriber } from "./attachment-description.mjs";
@@ -26,8 +26,8 @@ import { runtimeToken } from "../runtime-token.mjs";
26
26
  import { botIdentityCache } from "./bot.mjs";
27
27
  import { handleConfirmationCallback, telegramConfirmationEvents } from "./confirmations.mjs";
28
28
  import { confirmationLocale } from "./confirmation-text.mjs";
29
- import { d as failureText, h as withDeliveryLocale, i as withReplacedText, m as safeTelegramFetch, n as currentInboundRequest, o as currentLocale, p as reportTelegramError, r as runInboundRequest, t as InboundRequest } from "../../../_chunks/inbound-request-BQQWCrWl.mjs";
30
- import { n as conversationLanguage, o as telegramPrincipal } from "../../../_chunks/principal-VsmaJp1x.mjs";
29
+ import { d as failureText, h as withDeliveryLocale, i as withReplacedText, m as safeTelegramFetch, n as currentInboundRequest, o as currentLocale, p as reportTelegramError, r as runInboundRequest, t as InboundRequest } from "../../../_chunks/inbound-request-DgQB4g1J.mjs";
30
+ import { n as conversationLanguage, o as telegramPrincipal } from "../../../_chunks/principal-UlkbLrgQ.mjs";
31
31
  import { gatewayImageDescriber } from "./images.mjs";
32
32
  import { gatewayMediaCapabilities, planMedia } from "./media-policy.mjs";
33
33
  import { agentChats } from "./chats.mjs";
@@ -43,7 +43,7 @@ import { telegramFailureEvents } from "./turn-errors.mjs";
43
43
  import { withDeliveryDiagnostics } from "./delivery-diagnostics.mjs";
44
44
  import { downloadTelegramFile, gatewayTranscriber } from "./voice.mjs";
45
45
  import { telegramWebhookVerifier } from "./webhook.mjs";
46
- import { telegramPreviewEnvironment } from "@segmentstream-cloud/ontology/telegram";
46
+ import { telegramPreviewEnvironment } from "@segmentstream/ontology/telegram";
47
47
  import { telegramChannel } from "eve/channels/telegram";
48
48
  const LEGACY_DEFERRED_CALLBACK = "ss-confirm:d:";
49
49
  async function typing(_event, ctx) {
@@ -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 "./images.mjs";
8
- import { p as reportTelegramError } from "../../../_chunks/inbound-request-BQQWCrWl.mjs";
8
+ import { p as reportTelegramError } from "../../../_chunks/inbound-request-DgQB4g1J.mjs";
9
9
  import { gateway, generateText } from "ai";
10
10
  const MAXIMUM_ROUTING_ATTACHMENT_BYTES = 5242880;
11
11
  const ROUTING_ATTACHMENT_TIMEOUT_MS = 15e3;
@@ -12,10 +12,10 @@ import { fetchFileGrant, transientFileStatus } from "../file-grant.mjs";
12
12
  import { appOrigin, channelsEnabled, proxyEnvironment } from "../environment.mjs";
13
13
  import { ACT_AS_HEADER } from "../actor.mjs";
14
14
  import { runtimeToken } from "../runtime-token.mjs";
15
- import "../../../_chunks/principal-VsmaJp1x.mjs";
15
+ import "../../../_chunks/principal-UlkbLrgQ.mjs";
16
16
  import { confirmationLocale } from "./confirmation-text.mjs";
17
17
  import { inTelegramSendQueue, telegramSendScope } from "./send-queue.mjs";
18
- import { d as failureText, f as formattingRefused, l as customerMessage, p as reportTelegramError } from "../../../_chunks/inbound-request-BQQWCrWl.mjs";
18
+ import { d as failureText, f as formattingRefused, l as customerMessage, p as reportTelegramError } from "../../../_chunks/inbound-request-DgQB4g1J.mjs";
19
19
  import { TELEGRAM_PLACEHOLDER_TOKEN, TELEGRAM_PROXY_ORIGIN, telegramProxyFetch } from "./proxy-fetch.mjs";
20
20
  const MAXIMUM_PHOTO_BYTES = 10485760;
21
21
  const MAXIMUM_DOCUMENT_BYTES = 52428800;
@@ -5,8 +5,8 @@ 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 telegramRuntimeSource, i as memberIdOf, o as telegramPrincipal, u as runtimeEnvelope } from "../../../_chunks/principal-VsmaJp1x.mjs";
9
- import { n as currentInboundRequest, p as reportTelegramError } from "../../../_chunks/inbound-request-BQQWCrWl.mjs";
8
+ import { d as telegramRuntimeSource, i as memberIdOf, o as telegramPrincipal, u as runtimeEnvelope } from "../../../_chunks/principal-UlkbLrgQ.mjs";
9
+ import { n as currentInboundRequest, p as reportTelegramError } from "../../../_chunks/inbound-request-DgQB4g1J.mjs";
10
10
  import { formatAddress, parseAddress, scopedAddress } from "./sessions.mjs";
11
11
  import { telegramText } from "./texts.mjs";
12
12
  import { workspaceAction } from "./workspace-action.mjs";
@@ -7,7 +7,7 @@ __eveCreateRequire(import.meta.url);
7
7
  import { telegramText } from "./texts.mjs";
8
8
  import { renderConfirmation } from "./confirmation-text.mjs";
9
9
  import { AsyncLocalStorage } from "node:async_hooks";
10
- import { telegramMarkdownLinks, telegramTextLinks } from "@segmentstream-cloud/ontology/telegram";
10
+ import { telegramMarkdownLinks, telegramTextLinks } from "@segmentstream/ontology/telegram";
11
11
  import { escapeMarkdownV2 } from "@chat-adapter/telegram";
12
12
  const RECEIPT_DATA_SPACE = 512;
13
13
  const exactText = new AsyncLocalStorage();
@@ -12,13 +12,13 @@ import { chatPostOperationId, isChatPost } from "../chat-post-confirmation.mjs";
12
12
  import { conversationEvent } from "../conversations.mjs";
13
13
  import { chatPostCard, chatPostCardStatus, chatPostReceipt, withChatPostCard } from "./chat-post-card.mjs";
14
14
  import { answerMarker, isPendingQuestion, pendingQuestions, questionKey } from "../questions.mjs";
15
- import { n as currentInboundRequest, p as reportTelegramError } from "../../../_chunks/inbound-request-BQQWCrWl.mjs";
15
+ import { n as currentInboundRequest, p as reportTelegramError } from "../../../_chunks/inbound-request-DgQB4g1J.mjs";
16
16
  import { confirmationStatus, renderConfirmation, withConfirmationText } from "./confirmation-text.mjs";
17
- import { i as memberIdOf, o as telegramPrincipal } from "../../../_chunks/principal-VsmaJp1x.mjs";
17
+ import { i as memberIdOf, o as telegramPrincipal } from "../../../_chunks/principal-UlkbLrgQ.mjs";
18
18
  import { formatAddress, scopedAddress } from "./sessions.mjs";
19
19
  import { call } from "eve/events";
20
20
  import { createHash } from "node:crypto";
21
- import { telegramTextLinks } from "@segmentstream-cloud/ontology/telegram";
21
+ import { telegramTextLinks } from "@segmentstream/ontology/telegram";
22
22
  const PREFIX = "ss-confirm:";
23
23
  const recoveredContinuation = (address) => address !== void 0 && /:recovery:[a-f0-9]{64}$/u.test(address);
24
24
  function aliasesPendingTopic(scope, token) {
@@ -9,7 +9,7 @@ import { n as contentText, t as CONTENT_CAPS } from "../../../_chunks/content-cD
9
9
  import { conversationEvent, sessionFailureEventId } from "../conversations.mjs";
10
10
  import { currentConfirmationPrompt } from "../group-routing/messages.mjs";
11
11
  import { messageMetadata } from "./message-metadata.mjs";
12
- import { n as currentInboundRequest, p as reportTelegramError, s as currentThreadId } from "../../../_chunks/inbound-request-BQQWCrWl.mjs";
12
+ import { n as currentInboundRequest, p as reportTelegramError, s as currentThreadId } from "../../../_chunks/inbound-request-DgQB4g1J.mjs";
13
13
  import { reportMembership } from "./membership.mjs";
14
14
  import { currentDeliveryScope } from "./delivery-diagnostics.mjs";
15
15
  import { contentShape, messageContent } from "./content.mjs";
@@ -1,4 +1,4 @@
1
- import { type TelegramPreviewContext } from "@segmentstream-cloud/ontology/telegram";
1
+ import { type TelegramPreviewContext } from "@segmentstream/ontology/telegram";
2
2
  import { type TelegramText } from "./format.js";
3
3
  export { isTechnicalText } from "../customer-text-safety.js";
4
4
  export declare function withDeliveryLocale<T>(locale: string, run: () => T, threadId?: string, replyTo?: string, chatId?: string): T;
@@ -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 { a as TelegramDeliveryError, c as customerCopy, d as failureText, f as formattingRefused, h as withDeliveryLocale, l as customerMessage, m as safeTelegramFetch, o as currentLocale, p as reportTelegramError, s as currentThreadId, u as customerText } from "../../../_chunks/inbound-request-BQQWCrWl.mjs";
8
+ import { a as TelegramDeliveryError, c as customerCopy, d as failureText, f as formattingRefused, h as withDeliveryLocale, l as customerMessage, m as safeTelegramFetch, o as currentLocale, p as reportTelegramError, s as currentThreadId, u as customerText } from "../../../_chunks/inbound-request-DgQB4g1J.mjs";
9
9
  export { TelegramDeliveryError, currentLocale, currentThreadId, customerCopy, customerMessage, customerText, failureText, formattingRefused, isTechnicalText, reportTelegramError, safeTelegramFetch, withDeliveryLocale };
@@ -5,8 +5,8 @@ const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import { MAXIMUM_ATTACHMENT_BYTES, attachmentUrl } from "../attachments.mjs";
8
- import { d as failureText, p as reportTelegramError } from "../../../_chunks/inbound-request-BQQWCrWl.mjs";
9
- import { n as conversationLanguage } from "../../../_chunks/principal-VsmaJp1x.mjs";
8
+ import { d as failureText, p as reportTelegramError } from "../../../_chunks/inbound-request-DgQB4g1J.mjs";
9
+ import { n as conversationLanguage } from "../../../_chunks/principal-UlkbLrgQ.mjs";
10
10
  import { describableImage, describeReceivedImage } from "./images.mjs";
11
11
  function telegramConversation(chatId) {
12
12
  return `telegram:${chatId}`;
@@ -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-rvx1ljR5.mjs";
7
+ import { t as agentBuild } from "../../../_chunks/build-metadata-Dk0pEJxW.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 { p as reportTelegramError } from "../../../_chunks/inbound-request-BQQWCrWl.mjs";
7
+ import { p as reportTelegramError } from "../../../_chunks/inbound-request-DgQB4g1J.mjs";
8
8
  import { gateway, generateText } from "ai";
9
9
  const MAXIMUM_IMAGE_DESCRIPTION_BYTES = 5242880;
10
10
  const MAXIMUM_NATIVE_IMAGE_BYTES = 3145728;
@@ -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 InboundRequest, n as currentInboundRequest, r as runInboundRequest, i as withReplacedText } from "../../../_chunks/inbound-request-BQQWCrWl.mjs";
7
+ export { t as InboundRequest, n as currentInboundRequest, r as runInboundRequest, i as withReplacedText } from "../../../_chunks/inbound-request-DgQB4g1J.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 { d as telegramRuntimeSource, n as conversationLanguage, o as telegramPrincipal, u as runtimeEnvelope } from "../../../_chunks/principal-VsmaJp1x.mjs";
9
+ import { d as telegramRuntimeSource, n as conversationLanguage, o as telegramPrincipal, u as runtimeEnvelope } from "../../../_chunks/principal-UlkbLrgQ.mjs";
10
10
  import { routingBurst } from "../group-routing/burst.mjs";
11
11
  import { telegramSignals } from "./signals.mjs";
12
12
  import { addressingReason, conversationKey, otherRecipient } from "../group-routing/signals.mjs";
@@ -30,7 +30,7 @@ import { MAXIMUM_ROUTING_ATTACHMENT_BYTES, describeRoutingAttachment, routingAtt
30
30
  import { recordGateDecision, recordInboundContent, recordRouteDecision } from "./conversations.mjs";
31
31
  import { contentShape, messageContent } from "./content.mjs";
32
32
  import { messageAudience } from "./audience.mjs";
33
- import { p as reportTelegramError } from "../../../_chunks/inbound-request-BQQWCrWl.mjs";
33
+ import { p as reportTelegramError } from "../../../_chunks/inbound-request-DgQB4g1J.mjs";
34
34
  const MAXIMUM_QUOTE_LENGTH = 500;
35
35
  function buttonTo(text, url) {
36
36
  return { inline_keyboard: [[{
@@ -4,9 +4,9 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import { d as telegramRuntimeSource, l as principalRuntimeSource, u as runtimeEnvelope } from "../../../_chunks/principal-VsmaJp1x.mjs";
8
- import { t as agentBuild } from "../../../_chunks/build-metadata-rvx1ljR5.mjs";
9
- import { n as currentInboundRequest } from "../../../_chunks/inbound-request-BQQWCrWl.mjs";
7
+ import { d as telegramRuntimeSource, l as principalRuntimeSource, u as runtimeEnvelope } from "../../../_chunks/principal-UlkbLrgQ.mjs";
8
+ import { t as agentBuild } from "../../../_chunks/build-metadata-Dk0pEJxW.mjs";
9
+ import { n as currentInboundRequest } from "../../../_chunks/inbound-request-DgQB4g1J.mjs";
10
10
  import { object } from "../confirmation-description.mjs";
11
11
  import { needsConfirmation } from "../confirmations.mjs";
12
12
  import { OntologyActionNotPermitted, actionToolName, ontologyTools } from "../ontology-tools.mjs";
@@ -5,7 +5,7 @@ const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import { DEFAULT_IMAGE_DESCRIPTION_MODEL } from "../../config.mjs";
8
- import { p as reportTelegramError } from "../../../_chunks/inbound-request-BQQWCrWl.mjs";
8
+ import { p as reportTelegramError } from "../../../_chunks/inbound-request-DgQB4g1J.mjs";
9
9
  function planMedia(capabilities, descriptionModel = null) {
10
10
  if (typeof descriptionModel === "string") return {
11
11
  images: "describe",
@@ -4,4 +4,4 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- export { t as TELEGRAM_AUTHENTICATOR, n as conversationLanguage, r as identityProviderOf, i as memberIdOf, a as rolesOf, o as telegramPrincipal } from "../../../_chunks/principal-VsmaJp1x.mjs";
7
+ export { t as TELEGRAM_AUTHENTICATOR, n as conversationLanguage, r as identityProviderOf, i as memberIdOf, a as rolesOf, o as telegramPrincipal } from "../../../_chunks/principal-UlkbLrgQ.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 { p as reportTelegramError } from "../../../_chunks/inbound-request-BQQWCrWl.mjs";
7
+ import { p as reportTelegramError } from "../../../_chunks/inbound-request-DgQB4g1J.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 { a as TelegramDeliveryError, l as customerMessage, o as currentLocale, p as reportTelegramError } from "../../../_chunks/inbound-request-BQQWCrWl.mjs";
8
+ import { a as TelegramDeliveryError, l as customerMessage, o as currentLocale, p as reportTelegramError } from "../../../_chunks/inbound-request-DgQB4g1J.mjs";
9
9
  import { splitTelegramText } from "./format.mjs";
10
10
  import { inTelegramSendQueue } from "./send-queue.mjs";
11
11
  const NO_REPLY_TOOL = "no_reply";
@@ -4,7 +4,7 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import { d as telegramRuntimeSource, u as runtimeEnvelope } from "../../../_chunks/principal-VsmaJp1x.mjs";
7
+ import { d as telegramRuntimeSource, u as runtimeEnvelope } from "../../../_chunks/principal-UlkbLrgQ.mjs";
8
8
  import { workspaceAction } from "./workspace-action.mjs";
9
9
  import { STRUCTURED_KINDS } from "./structured-settings.mjs";
10
10
  const record = (value) => {
@@ -7,8 +7,8 @@ __eveCreateRequire(import.meta.url);
7
7
  import { telegramText } from "./texts.mjs";
8
8
  import { confirmationLocale } from "./confirmation-text.mjs";
9
9
  import { recordSessionFailure } from "./conversations.mjs";
10
- import { c as customerCopy, d as failureText, o as currentLocale, p as reportTelegramError, s as currentThreadId } from "../../../_chunks/inbound-request-BQQWCrWl.mjs";
11
- import { i as memberIdOf } from "../../../_chunks/principal-VsmaJp1x.mjs";
10
+ import { c as customerCopy, d as failureText, o as currentLocale, p as reportTelegramError, s as currentThreadId } from "../../../_chunks/inbound-request-DgQB4g1J.mjs";
11
+ import { i as memberIdOf } from "../../../_chunks/principal-UlkbLrgQ.mjs";
12
12
  import { modelServiceFailure } from "../model-service-failure.mjs";
13
13
  function telegramFailureEvents(input) {
14
14
  return {
@@ -5,7 +5,7 @@ const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import "../connection-proxy.mjs";
8
- import { p as reportTelegramError } from "../../../_chunks/inbound-request-BQQWCrWl.mjs";
8
+ import { p as reportTelegramError } from "../../../_chunks/inbound-request-DgQB4g1J.mjs";
9
9
  import { gateway, transcribe } from "ai";
10
10
  const LABELS = {
11
11
  voice: "voice message",
@@ -6,7 +6,7 @@ __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import { chatModelChoiceOf } from "./config.mjs";
8
8
  import { isPreview } from "./lib/environment.mjs";
9
- import { a as rolesOf } from "../_chunks/principal-VsmaJp1x.mjs";
9
+ import { a as rolesOf } from "../_chunks/principal-UlkbLrgQ.mjs";
10
10
  import { runs } from "eve/events";
11
11
  import { defineDynamic } from "eve";
12
12
  function chooseModel(input) {
@@ -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 { u as runtimeEnvelope } from "../../_chunks/principal-VsmaJp1x.mjs";
7
+ import { u as runtimeEnvelope } from "../../_chunks/principal-UlkbLrgQ.mjs";
8
8
  import segmentstream from "../extension.mjs";
9
9
  import { n as workflowToolResult } from "../../_chunks/workflow-serializable-DU7WeCIW.mjs";
10
10
  import { actionApproval } from "../lib/confirmations.mjs";
@@ -8,7 +8,7 @@ import { n as workflowToolResult } from "../../_chunks/workflow-serializable-DU7
8
8
  import { agentTaskIdOf, agentTaskSessions } from "../lib/agent-task.mjs";
9
9
  import { stringArgument } from "../lib/attachment-tools.mjs";
10
10
  import { pendingQuestions, questionKey } from "../lib/questions.mjs";
11
- import { i as memberIdOf } from "../../_chunks/principal-VsmaJp1x.mjs";
11
+ import { i as memberIdOf } from "../../_chunks/principal-UlkbLrgQ.mjs";
12
12
  import { defineTool } from "eve/tools";
13
13
  var questions_ask_default = defineTool({
14
14
  availableInSubagents: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@segmentstream/agent",
3
- "version": "0.34.0",
3
+ "version": "0.35.0",
4
4
  "description": "Mount a SegmentStream workspace's agent on eve: the ontology as tools, acting as the member who writes, and Telegram through the workspace's connection.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "SegmentStream",
@@ -76,7 +76,7 @@
76
76
  "@chat-adapter/state-memory": "4.42.0",
77
77
  "@chat-adapter/telegram": "4.41.0",
78
78
  "@chat-adapter/whatsapp": "4.42.0",
79
- "@segmentstream-cloud/ontology": "0.91.0",
79
+ "@segmentstream/ontology": "0.92.0",
80
80
  "@vercel/oidc": "^3.8.4",
81
81
  "ai": "^7.0.137",
82
82
  "chat": "4.42.0",