@segmentstream/agent 0.90.0 → 0.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/_chunks/{build-metadata-9DTiYNuw.mjs → build-metadata-BisjjIh6.mjs} +1 -1
- package/dist/_chunks/{chat-archive-W-lFIyyA.mjs → chat-archive-Btd3gajb.mjs} +1 -1
- package/dist/_chunks/{principal-DN2OIjo3.mjs → principal-CY72xYFi.mjs} +9 -0
- package/dist/_chunks/{silent-CoyadQMP.mjs → silent-DK7m_iab.mjs} +1 -1
- package/dist/extension/channels/slack.mjs +1 -0
- package/dist/extension/config.d.ts +8 -2
- package/dist/extension/connections/ontology.mjs +1 -1
- package/dist/extension/conventions.mjs +6 -1
- package/dist/extension/hooks/authorization.mjs +1 -1
- package/dist/extension/instructions/persona.d.ts +1 -6
- package/dist/extension/instructions/persona.mjs +7 -4
- package/dist/extension/lib/actor.mjs +1 -1
- package/dist/extension/lib/attachment-tools.mjs +1 -1
- package/dist/extension/lib/attachments-dispatch.mjs +2 -2
- package/dist/extension/lib/attachments-send.mjs +1 -1
- package/dist/extension/lib/attachments.mjs +1 -1
- package/dist/extension/lib/build-metadata.mjs +1 -1
- package/dist/extension/lib/chat-address.mjs +1 -1
- package/dist/extension/lib/chat-context.mjs +1 -1
- package/dist/extension/lib/chat-persona.d.ts +15 -0
- package/dist/extension/lib/chat-persona.mjs +75 -0
- package/dist/extension/lib/chat-recorder.mjs +2 -2
- package/dist/extension/lib/confirmations.d.ts +8 -0
- package/dist/extension/lib/confirmations.mjs +1 -1
- package/dist/extension/lib/email/attachments-send.mjs +1 -1
- package/dist/extension/lib/email/channel.mjs +2 -2
- package/dist/extension/lib/guest-usage.mjs +1 -1
- package/dist/extension/lib/inbound-media/files.mjs +1 -1
- package/dist/extension/lib/inbound-media/index.mjs +1 -1
- package/dist/extension/lib/ontology-connection.mjs +1 -1
- package/dist/extension/lib/ontology-file-call.mjs +1 -1
- package/dist/extension/lib/ontology-recall.mjs +1 -1
- package/dist/extension/lib/ontology-tools.mjs +1 -1
- package/dist/extension/lib/review/files.mjs +1 -1
- package/dist/extension/lib/review/hold.mjs +1 -1
- package/dist/extension/lib/review/reply.mjs +2 -2
- 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.d.ts +2 -0
- package/dist/extension/lib/slack/adapter.mjs +32 -7
- package/dist/extension/lib/slack/attachments-send.mjs +1 -1
- package/dist/extension/lib/slack/callbacks.mjs +1 -1
- package/dist/extension/lib/slack/confirmation-card.d.ts +6 -0
- package/dist/extension/lib/slack/confirmation-card.mjs +177 -0
- package/dist/extension/lib/stored-files.mjs +1 -1
- package/dist/extension/lib/telegram/adapter.mjs +4 -4
- package/dist/extension/lib/telegram/attachment-description.mjs +1 -1
- package/dist/extension/lib/telegram/attachments-send.mjs +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 +23 -3
- package/dist/extension/lib/telegram/lifecycle.mjs +2 -2
- package/dist/extension/lib/telegram/principal.mjs +1 -1
- package/dist/extension/lib/telegram/routing-context.mjs +1 -1
- package/dist/extension/lib/telegram/session-recovery.mjs +1 -1
- package/dist/extension/lib/telegram/silent.mjs +1 -1
- package/dist/extension/lib/telegram/store-capture.mjs +1 -1
- package/dist/extension/lib/telegram/structured.mjs +1 -1
- package/dist/extension/lib/telegram/turn-errors.mjs +2 -2
- 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 +4 -3
- package/dist/extension/lib/whatsapp/attachments-send.mjs +1 -1
- package/dist/extension/lib/whatsapp/callbacks.mjs +1 -1
- package/dist/extension/lib/whatsapp/files.mjs +1 -1
- package/dist/extension/lib/workspace-action.mjs +1 -1
- package/dist/extension/lib/workspace-channel/attachments-send.mjs +1 -1
- package/dist/extension/lib/workspace-channel/channel.mjs +2 -2
- package/dist/extension/lib/workspace-source.mjs +1 -1
- package/dist/extension/model.mjs +1 -1
- package/dist/extension/personas.d.ts +9 -8
- package/dist/extension/personas.mjs +79 -3
- 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 +2 -2
- package/dist/extension/tools/attachments_stage.mjs +1 -1
- package/dist/extension/tools/attachments_table.mjs +1 -1
- package/dist/extension/tools/handoff.mjs +1 -1
- package/dist/extension/tools/questions_ask.mjs +1 -1
- package/dist/extension/tools/workspace_source.mjs +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.91.0
|
|
4
|
+
|
|
5
|
+
Route the agent's persona by chat assignment, channel rules and workspace default.
|
|
6
|
+
|
|
7
|
+
Pins @segmentstream/ontology 0.172.0.
|
|
8
|
+
|
|
9
|
+
## 0.90.1
|
|
10
|
+
|
|
11
|
+
Slack action confirmations show the full confirmation facts, document links and workspace button labels. The clicked message shows the result when the action finishes.
|
|
12
|
+
|
|
3
13
|
## 0.90.0
|
|
4
14
|
|
|
5
15
|
The agent and web chat now use Eve 1.5.0. Telegram uses Eve's per-message turn policy.
|
|
@@ -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.
|
|
7
|
+
var version = "0.91.0";
|
|
8
8
|
function agentBuild(environment = process.env) {
|
|
9
9
|
return {
|
|
10
10
|
agent: version,
|
|
@@ -11,7 +11,7 @@ import { n as contentText, t as CONTENT_CAPS } from "./content-cDtVnr8Y.mjs";
|
|
|
11
11
|
import { C as sendFingerprint, S as reasonCode, _ as boundedMeta, a as chatEvent, b as messageInput, f as sessionFailureEventId, p as storeOf, v as cutText, w as storedFiles, x as metaOf } from "./chat-archive-DavfKJDI.mjs";
|
|
12
12
|
import { applyChatChange } from "../extension/lib/chat-messages.mjs";
|
|
13
13
|
import { ChatStoreError } from "../extension/lib/chat-store.mjs";
|
|
14
|
-
import { c as currentInboundRequest, ht as currentThreadId, xt as reportTelegramError } from "./principal-
|
|
14
|
+
import { c as currentInboundRequest, ht as currentThreadId, xt as reportTelegramError } from "./principal-CY72xYFi.mjs";
|
|
15
15
|
import { telegramReaction } from "../extension/lib/telegram/reactions.mjs";
|
|
16
16
|
import { currentConfirmationPrompt } from "../extension/lib/group-routing/messages.mjs";
|
|
17
17
|
import { messageMetadata } from "../extension/lib/telegram/message-metadata.mjs";
|
|
@@ -930,6 +930,7 @@ function actionApproval(options) {
|
|
|
930
930
|
status: "pending",
|
|
931
931
|
...copy === void 0 ? {} : { copy },
|
|
932
932
|
...description === void 0 ? {} : { description },
|
|
933
|
+
...ctx.session.auth.current?.attributes.identityProvider === "slack" ? { locale: confirmationLocale(ctx.session.auth.current) } : {},
|
|
933
934
|
...prompt === void 0 ? {} : { prompt },
|
|
934
935
|
...posting && chat !== void 0 ? { source: chat } : {}
|
|
935
936
|
}
|
|
@@ -948,10 +949,18 @@ function actionApproval(options) {
|
|
|
948
949
|
if (!ownedBy(saved, responder) || !ownedBy(saved, actorOf(ctx.request.principal)) || responder?.kind === "guest" && !guestConfirms(ctx.response.principal)) return reject("Only the requesting member can confirm or cancel this action.");
|
|
949
950
|
if (saved.action !== ctx.request.toolName || saved.inputHash !== inputHash(ctx.request.toolInput ?? {})) return reject("The action or input changed. Make a new call.");
|
|
950
951
|
if (ctx.response.decision === "approve" && saved.expiresAt <= now()) return reject("This confirmation expired.");
|
|
952
|
+
const { slackConfirmationTs, slackConfirmationChannel, slackConfirmationCalls } = ctx.response.principal.attributes;
|
|
953
|
+
const slackMessage = ctx.response.principal.authenticator === "segmentstream-slack" && typeof ctx.response.principal.subject === "string" && typeof slackConfirmationTs === "string" && typeof slackConfirmationChannel === "string" && Array.isArray(slackConfirmationCalls) && slackConfirmationCalls.every((id) => typeof id === "string") && (!slackConfirmationCalls.length || slackConfirmationCalls.includes(ctx.request.callId)) ? {
|
|
954
|
+
ts: slackConfirmationTs,
|
|
955
|
+
channel: slackConfirmationChannel,
|
|
956
|
+
calls: slackConfirmationCalls,
|
|
957
|
+
user: ctx.response.principal.subject
|
|
958
|
+
} : void 0;
|
|
951
959
|
state.update((all) => ({
|
|
952
960
|
...all,
|
|
953
961
|
[ctx.request.callId]: {
|
|
954
962
|
...saved,
|
|
963
|
+
...slackMessage ? { slackMessage } : {},
|
|
955
964
|
status: ctx.response.decision === "approve" ? "approved" : "cancelled",
|
|
956
965
|
...ctx.response.decision === "deny" && ["edit", "expired"].includes(String(ctx.response.principal.attributes.confirmationReason)) ? { cancellationReason: ctx.response.principal.attributes.confirmationReason } : {}
|
|
957
966
|
}
|
|
@@ -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 "../extension/lib/telegram/confirmation-text.mjs";
|
|
8
|
-
import { Ft as chatAddressOf, _t as customerMessage, i as memberIdOf, mt as currentLocale, pt as TelegramDeliveryError, xt as reportTelegramError, yt as failureText } from "./principal-
|
|
8
|
+
import { Ft as chatAddressOf, _t as customerMessage, i as memberIdOf, mt as currentLocale, pt as TelegramDeliveryError, xt as reportTelegramError, yt as failureText } from "./principal-CY72xYFi.mjs";
|
|
9
9
|
import { splitTelegramText } from "../extension/lib/telegram/format.mjs";
|
|
10
10
|
import { inTelegramSendQueue } from "../extension/lib/telegram/send-queue.mjs";
|
|
11
11
|
import { redactDiagnostic } from "../extension/lib/diagnostics.mjs";
|
|
@@ -12,6 +12,7 @@ import { decide } from "eve/ai";
|
|
|
12
12
|
var slack_default = segmentstreamSlack({
|
|
13
13
|
settings: (name) => channelOf(segmentstream.config.channels, "slack", name),
|
|
14
14
|
buttons: () => segmentstream.config.buttons,
|
|
15
|
+
texts: () => segmentstream.config.texts ?? {},
|
|
15
16
|
admission: () => segmentstream.config,
|
|
16
17
|
groups: () => segmentstream.config.groups,
|
|
17
18
|
models: () => segmentstream.config.models,
|
|
@@ -75,6 +75,7 @@ export interface FirstContactSettings {
|
|
|
75
75
|
export declare const ADMISSION_REPLY_KEYS: readonly ["pairingRequired", "pairingButton", "groupPairingButton", "limited", "perSenderLimited", "workspaceLimited", "registrationsLimited", "groupPairingRequired", "refused"];
|
|
76
76
|
export type AdmissionReplies = Partial<Record<(typeof ADMISSION_REPLY_KEYS)[number], LocalizedText>>;
|
|
77
77
|
export interface AdmissionSettings {
|
|
78
|
+
readonly personas?: PersonaSettings;
|
|
78
79
|
readonly firstContact: FirstContactSettings | null;
|
|
79
80
|
readonly limits: AdmissionLimits;
|
|
80
81
|
readonly replies: AdmissionReplies;
|
|
@@ -205,13 +206,18 @@ export interface SegmentStreamAgentConfigInput {
|
|
|
205
206
|
readonly idleResetHours?: unknown;
|
|
206
207
|
};
|
|
207
208
|
/**
|
|
208
|
-
*
|
|
209
|
-
* who started the session holds winning in the order written, and a `default` for everyone else.
|
|
209
|
+
* Choose by chat assignment and ordered rules, or by the session initiator’s roles.
|
|
210
210
|
* Each persona's text is `agent/personas/<name>.md`; the SDK and the platform put it in
|
|
211
211
|
* `texts`, which is not written by hand.
|
|
212
212
|
*/
|
|
213
213
|
readonly personas?: {
|
|
214
214
|
readonly byRole?: Readonly<Record<string, string>>;
|
|
215
|
+
readonly rules?: readonly {
|
|
216
|
+
readonly when: Readonly<Partial<Record<string, string>>>;
|
|
217
|
+
readonly use: string;
|
|
218
|
+
}[];
|
|
219
|
+
readonly available?: readonly string[];
|
|
220
|
+
readonly notice?: LocalizedText;
|
|
215
221
|
readonly default?: string;
|
|
216
222
|
readonly texts?: Readonly<Record<string, string>>;
|
|
217
223
|
};
|
|
@@ -5,7 +5,7 @@ const __filename = __eveFileURLToPath(import.meta.url);
|
|
|
5
5
|
__eveDirname(__filename);
|
|
6
6
|
__eveCreateRequire(import.meta.url);
|
|
7
7
|
import segmentstream from "../extension.mjs";
|
|
8
|
-
import { T as ontologyConnection } from "../../_chunks/principal-
|
|
8
|
+
import { T as ontologyConnection } from "../../_chunks/principal-CY72xYFi.mjs";
|
|
9
9
|
import { defineDynamic } from "eve/connections";
|
|
10
10
|
var ontology_default = defineDynamic(async (context) => {
|
|
11
11
|
if (!segmentstream.config.ontology.connection) return null;
|
|
@@ -30,7 +30,12 @@ function inlineConventionFiles(input, read) {
|
|
|
30
30
|
}
|
|
31
31
|
if (isRecord(input.personas)) {
|
|
32
32
|
const personas = input.personas;
|
|
33
|
-
const named = [
|
|
33
|
+
const named = [
|
|
34
|
+
...isRecord(personas.byRole) ? Object.values(personas.byRole) : [],
|
|
35
|
+
...Array.isArray(personas.available) ? personas.available : [],
|
|
36
|
+
...Array.isArray(personas.rules) ? personas.rules.map((rule) => isRecord(rule) ? rule.use : void 0) : [],
|
|
37
|
+
personas.default
|
|
38
|
+
].filter(isPersonaName);
|
|
34
39
|
const texts = isRecord(personas.texts) ? { ...personas.texts } : {};
|
|
35
40
|
for (const name of new Set(named)) {
|
|
36
41
|
const text = read(personaFile(name));
|
|
@@ -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-
|
|
10
|
+
import "../../_chunks/principal-CY72xYFi.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;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The persona of the session: a system instruction after the workspace's own, chosen from the
|
|
3
|
-
* roles of the person who started the session (the workflow's user for a workflow task), so it
|
|
4
|
-
* stays the same for the whole session and keeps the prompt prefix cached. Nothing without
|
|
5
|
-
* `personas` in `agent/segmentstream.json`, or when no role matches and there is no `default`.
|
|
6
|
-
*/
|
|
1
|
+
/** Resolve the active chat's persona for this turn, or the initiator's in role-based mode. */
|
|
7
2
|
declare const _default: import("eve").DynamicSentinel<import("eve/instructions").DynamicInstructionsResult, import("eve").DynamicContext>;
|
|
8
3
|
export default _default;
|
|
@@ -5,14 +5,17 @@ const __filename = __eveFileURLToPath(import.meta.url);
|
|
|
5
5
|
__eveDirname(__filename);
|
|
6
6
|
__eveCreateRequire(import.meta.url);
|
|
7
7
|
import segmentstream from "../extension.mjs";
|
|
8
|
-
import { a as rolesOf } from "../../_chunks/principal-
|
|
8
|
+
import { a as rolesOf } from "../../_chunks/principal-CY72xYFi.mjs";
|
|
9
|
+
import { resolveChatPersona } from "../lib/chat-persona.mjs";
|
|
9
10
|
import { personaFor } from "../personas.mjs";
|
|
10
11
|
import { defineDynamic, defineInstructions } from "eve/instructions";
|
|
11
|
-
var persona_default = defineDynamic((context) => {
|
|
12
|
+
var persona_default = defineDynamic(async (context) => {
|
|
12
13
|
const { personas } = segmentstream.config;
|
|
13
14
|
if (personas === void 0) return null;
|
|
14
|
-
const
|
|
15
|
-
const
|
|
15
|
+
const current = context.session.auth.current;
|
|
16
|
+
const routed = current?.attributes.segmentstreamChatPersona;
|
|
17
|
+
const persona = personas.rules !== void 0 ? typeof routed === "string" && Object.hasOwn(personas.texts ?? {}, routed) ? routed : await context.memo([context.turn?.id ?? null, current?.principalId ?? null], async () => (await resolveChatPersona(personas, current)).name ?? null) : personaFor(personas, rolesOf(context.session.auth.initiator ?? context.session.auth.current));
|
|
18
|
+
const content = persona == null ? void 0 : personas.texts?.[persona];
|
|
16
19
|
return content === void 0 ? null : defineInstructions({
|
|
17
20
|
role: "system",
|
|
18
21
|
content
|
|
@@ -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 { R as ACT_AS_HEADER, z as ActorRequiredError, B as actorHeaders, V as actorKey, H as actorOf, U as isGuestSession, W as member, G as memberTool, K as notForGuests } from "../../_chunks/principal-
|
|
7
|
+
export { R as ACT_AS_HEADER, z as ActorRequiredError, B as actorHeaders, V as actorKey, H as actorOf, U as isGuestSession, W as member, G as memberTool, K as notForGuests } from "../../_chunks/principal-CY72xYFi.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 { Ft as chatAddressOf, It as chatChannel, b as agentAttachments, i as memberIdOf } from "../../_chunks/principal-
|
|
7
|
+
import { Ft as chatAddressOf, It as chatChannel, b as agentAttachments, i as memberIdOf } from "../../_chunks/principal-CY72xYFi.mjs";
|
|
8
8
|
import { detectFile, documentText } from "./attachment-formats.mjs";
|
|
9
9
|
import { readSheets, typedTable } from "./attachment-tables.mjs";
|
|
10
10
|
import { appOrigin } from "./environment.mjs";
|
|
@@ -5,8 +5,8 @@ const __filename = __eveFileURLToPath(import.meta.url);
|
|
|
5
5
|
__eveDirname(__filename);
|
|
6
6
|
__eveCreateRequire(import.meta.url);
|
|
7
7
|
import { channelOf } from "../config.mjs";
|
|
8
|
-
import { Ft as chatAddressOf, It as chatChannel } from "../../_chunks/principal-
|
|
9
|
-
import "../../_chunks/silent-
|
|
8
|
+
import { Ft as chatAddressOf, It as chatChannel } from "../../_chunks/principal-CY72xYFi.mjs";
|
|
9
|
+
import "../../_chunks/silent-DK7m_iab.mjs";
|
|
10
10
|
import { sendEmailAttachments } from "./email/attachments-send.mjs";
|
|
11
11
|
import { replyCopies } from "./email/channel.mjs";
|
|
12
12
|
import { sendSlackAttachments } from "./slack/attachments-send.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 { Ft as chatAddressOf, _ as AttachmentError, yt as failureText } from "../../_chunks/principal-
|
|
8
|
+
import { Ft as chatAddressOf, _ as AttachmentError, yt as failureText } from "../../_chunks/principal-CY72xYFi.mjs";
|
|
9
9
|
import { appOrigin, channelsEnabled } from "./environment.mjs";
|
|
10
10
|
import { transientFileStatus } from "./file-grant.mjs";
|
|
11
11
|
import { runtimeToken } from "./runtime-token.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 { h as ATTACHMENT_TTL_HOURS, g as ATTACHMENT_URL_PROTOCOL, _ as AttachmentError, jt as CHAT_HEADER, v as EARLIER_CHAT_HEADER, y as MAXIMUM_ATTACHMENT_BYTES, Pt as SESSION_HEADER, b as agentAttachments, x as attachmentUrl, S as fetchStoredAttachment, C as parseAttachmentUrl } from "../../_chunks/principal-
|
|
7
|
+
export { h as ATTACHMENT_TTL_HOURS, g as ATTACHMENT_URL_PROTOCOL, _ as AttachmentError, jt as CHAT_HEADER, v as EARLIER_CHAT_HEADER, y as MAXIMUM_ATTACHMENT_BYTES, Pt as SESSION_HEADER, b as agentAttachments, x as attachmentUrl, S as fetchStoredAttachment, C as parseAttachmentUrl } from "../../_chunks/principal-CY72xYFi.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 { t as agentBuild } from "../../_chunks/build-metadata-
|
|
7
|
+
export { t as agentBuild } from "../../_chunks/build-metadata-BisjjIh6.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 { At as CHAT_ATTRIBUTE, jt as CHAT_HEADER, Mt as PARTICIPANTS_ATTRIBUTE, Nt as RUNTIME_SOURCE_ATTRIBUTE, Pt as SESSION_HEADER, Ft as chatAddressOf, It as chatChannel, Lt as chatHeaders, Rt as chatRuntimeSource, zt as isSameChat, Bt as participantsOf, Vt as withChatAddress, Ht as workspaceIdentityProvider } from "../../_chunks/principal-
|
|
7
|
+
export { At as CHAT_ATTRIBUTE, jt as CHAT_HEADER, Mt as PARTICIPANTS_ATTRIBUTE, Nt as RUNTIME_SOURCE_ATTRIBUTE, Pt as SESSION_HEADER, Ft as chatAddressOf, It as chatChannel, Lt as chatHeaders, Rt as chatRuntimeSource, zt as isSameChat, Bt as participantsOf, Vt as withChatAddress, Ht as workspaceIdentityProvider } from "../../_chunks/principal-CY72xYFi.mjs";
|
|
@@ -7,7 +7,7 @@ __eveCreateRequire(import.meta.url);
|
|
|
7
7
|
import { agentTaskIdOf } from "./agent-task.mjs";
|
|
8
8
|
import { chatCoordinates, sessionKind } from "./chat-recorder.mjs";
|
|
9
9
|
import { h as topicContext, i as chatAuthor, n as archiveSequence, p as storeOf, r as chatArchive, s as collapseChatEvents } from "../../_chunks/chat-archive-DavfKJDI.mjs";
|
|
10
|
-
import { xt as reportTelegramError } from "../../_chunks/principal-
|
|
10
|
+
import { xt as reportTelegramError } from "../../_chunks/principal-CY72xYFi.mjs";
|
|
11
11
|
import { createHash } from "node:crypto";
|
|
12
12
|
import { deliveries, runs, turns } from "eve/events";
|
|
13
13
|
import { defineState } from "eve/context";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { SessionAuthContext } from "eve/context";
|
|
2
|
+
import { chatPersona, type PersonaSettings } from "../personas.js";
|
|
3
|
+
export declare function resolveChatPersona(settings: PersonaSettings, principal: SessionAuthContext | null | undefined, read?: (key: string) => Promise<string | null>): Promise<{
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly source: "chat";
|
|
6
|
+
} | {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly source: "rule";
|
|
9
|
+
} | {
|
|
10
|
+
readonly name: string | undefined;
|
|
11
|
+
readonly source: "default";
|
|
12
|
+
}>;
|
|
13
|
+
/** A provider-specific private delivery, claimed once by the ontology as this member. */
|
|
14
|
+
export declare function offerPersona(settings: PersonaSettings | undefined, selection: ReturnType<typeof chatPersona> | undefined, principal: SessionAuthContext, deliver: (text: string) => Promise<unknown>, locale?: string): Promise<void>;
|
|
15
|
+
export declare function personaPrincipal(settings: PersonaSettings | undefined, principal: SessionAuthContext, deliver?: (text: string) => Promise<unknown>): Promise<SessionAuthContext>;
|
|
@@ -0,0 +1,75 @@
|
|
|
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 { chatPersona } from "../personas.mjs";
|
|
8
|
+
import { Ft as chatAddressOf, It as chatChannel, i as memberIdOf, ot as guestIdOf } from "../../_chunks/principal-CY72xYFi.mjs";
|
|
9
|
+
import { appOrigin, ontologyDeploymentHeaders } from "./environment.mjs";
|
|
10
|
+
import { localizedText } from "./admission.mjs";
|
|
11
|
+
import { runtimeToken } from "./runtime-token.mjs";
|
|
12
|
+
async function request(operation, data) {
|
|
13
|
+
const response = await fetch(`${appOrigin()}/api/ontology/agent/chats/${operation}`, {
|
|
14
|
+
method: "POST",
|
|
15
|
+
redirect: "error",
|
|
16
|
+
headers: {
|
|
17
|
+
...ontologyDeploymentHeaders(),
|
|
18
|
+
authorization: `Bearer ${await runtimeToken()}`,
|
|
19
|
+
"content-type": "application/json"
|
|
20
|
+
},
|
|
21
|
+
body: JSON.stringify(data),
|
|
22
|
+
signal: AbortSignal.timeout(5e3)
|
|
23
|
+
});
|
|
24
|
+
if (!response.ok) throw new Error(`Reading the chat persona failed (HTTP ${response.status}).`);
|
|
25
|
+
return response.json();
|
|
26
|
+
}
|
|
27
|
+
async function readAssignment(key) {
|
|
28
|
+
const body = await request("persona", { key });
|
|
29
|
+
if (body?.persona !== null && typeof body?.persona !== "string") throw new Error("Invalid chat persona response.");
|
|
30
|
+
return body.persona;
|
|
31
|
+
}
|
|
32
|
+
async function resolveChatPersona(settings, principal, read = readAssignment) {
|
|
33
|
+
const chat = chatAddressOf(principal);
|
|
34
|
+
if (!chat) return chatPersona(settings, void 0);
|
|
35
|
+
const channel = chatChannel(chat);
|
|
36
|
+
return chatPersona(settings, {
|
|
37
|
+
provider: chat.provider,
|
|
38
|
+
channel,
|
|
39
|
+
kind: chat.kind,
|
|
40
|
+
audience: guestIdOf(principal) ? "guest" : "member"
|
|
41
|
+
}, await read(`${channel}:${chat.chatId}`));
|
|
42
|
+
}
|
|
43
|
+
async function offerPersona(settings, selection, principal, deliver, locale) {
|
|
44
|
+
const language = locale ?? principal.attributes.locale;
|
|
45
|
+
const text = localizedText(settings?.notice, typeof language === "string" ? language : void 0);
|
|
46
|
+
const chat = chatAddressOf(principal);
|
|
47
|
+
const memberId = memberIdOf(principal);
|
|
48
|
+
if (!text || !chat || !memberId || selection?.source !== "default" || !selection.name) return;
|
|
49
|
+
try {
|
|
50
|
+
const receipt = await request("persona-notice", {
|
|
51
|
+
key: `${chatChannel(chat)}:${chat.chatId}`,
|
|
52
|
+
memberId,
|
|
53
|
+
provider: chat.provider
|
|
54
|
+
});
|
|
55
|
+
if (typeof receipt?.chat !== "string") return;
|
|
56
|
+
const url = new URL("/agent/persona", appOrigin());
|
|
57
|
+
url.searchParams.set("chat", receipt.chat);
|
|
58
|
+
await deliver(text.replaceAll("{persona}", selection.name).replaceAll("{url}", url.href));
|
|
59
|
+
} catch {
|
|
60
|
+
console.warn("[segmentstream] Private persona notice unavailable");
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
async function personaPrincipal(settings, principal, deliver) {
|
|
64
|
+
if (settings?.rules === void 0) return principal;
|
|
65
|
+
const selection = await resolveChatPersona(settings, principal);
|
|
66
|
+
if (deliver) await offerPersona(settings, selection, principal, deliver);
|
|
67
|
+
return selection.name ? {
|
|
68
|
+
...principal,
|
|
69
|
+
attributes: {
|
|
70
|
+
...principal.attributes,
|
|
71
|
+
segmentstreamChatPersona: selection.name
|
|
72
|
+
}
|
|
73
|
+
} : principal;
|
|
74
|
+
}
|
|
75
|
+
export { offerPersona, personaPrincipal, resolveChatPersona };
|
|
@@ -8,10 +8,10 @@ import { n as contentText, t as CONTENT_CAPS } from "../../_chunks/content-cDtVn
|
|
|
8
8
|
import { a as chatEvent, f as sessionFailureEventId, m as summarizeArguments, p as storeOf, r as chatArchive } from "../../_chunks/chat-archive-DavfKJDI.mjs";
|
|
9
9
|
import { agentTaskIdOf } from "./agent-task.mjs";
|
|
10
10
|
import { revisionOf } from "./review/revision.mjs";
|
|
11
|
-
import { Bt as participantsOf, Ft as chatAddressOf, It as chatChannel, i as memberIdOf, ot as guestIdOf } from "../../_chunks/principal-
|
|
11
|
+
import { Bt as participantsOf, Ft as chatAddressOf, It as chatChannel, i as memberIdOf, ot as guestIdOf } from "../../_chunks/principal-CY72xYFi.mjs";
|
|
12
12
|
import { keyChannel, principalChannel } from "./channel-scope.mjs";
|
|
13
13
|
import { parseAddress } from "./telegram/sessions.mjs";
|
|
14
|
-
import { n as completionKind } from "../../_chunks/silent-
|
|
14
|
+
import { n as completionKind } from "../../_chunks/silent-DK7m_iab.mjs";
|
|
15
15
|
import { recordModelServiceAlert } from "./model-service-alert.mjs";
|
|
16
16
|
import { call, deliveries } from "eve/events";
|
|
17
17
|
function isTelegram(context) {
|
|
@@ -34,6 +34,14 @@ export interface Confirmation {
|
|
|
34
34
|
readonly copy?: ConfirmationCopy;
|
|
35
35
|
/** The card's text, which channels that show eve's own approval card show as its prompt. */
|
|
36
36
|
readonly prompt?: string;
|
|
37
|
+
readonly locale?: string;
|
|
38
|
+
/** The verified button's Slack message, including any sibling confirmations Eve posted with it. */
|
|
39
|
+
readonly slackMessage?: {
|
|
40
|
+
channel: string;
|
|
41
|
+
ts: string;
|
|
42
|
+
calls: string[];
|
|
43
|
+
user: string;
|
|
44
|
+
};
|
|
37
45
|
/** A chat post's source chat, pinned from the request to its execution. */
|
|
38
46
|
readonly source?: ChatAddress;
|
|
39
47
|
readonly cancellationReason?: "edit" | "expired";
|
|
@@ -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 { N as CONFIRMATION_TTL_MS, P as actionApproval, F as confirmations, I as inputHash, L as needsConfirmation } from "../../_chunks/principal-
|
|
7
|
+
export { N as CONFIRMATION_TTL_MS, P as actionApproval, F as confirmations, I as inputHash, L as needsConfirmation } from "../../_chunks/principal-CY72xYFi.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-
|
|
7
|
+
import { _ as AttachmentError } from "../../../_chunks/principal-CY72xYFi.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, reportUnadmittedChat } from "../admission.mjs";
|
|
9
9
|
import { agentToolsAttribute } from "../agent-tools.mjs";
|
|
10
10
|
import { providerChat } from "../attachment-tools.mjs";
|
|
11
|
-
import { Bt as participantsOf, Ft as chatAddressOf, Mt as PARTICIPANTS_ATTRIBUTE, S as fetchStoredAttachment, Vt as withChatAddress, b as agentAttachments, d as prepareInboundMedia, i as memberIdOf, m as turnContent } from "../../../_chunks/principal-
|
|
11
|
+
import { Bt as participantsOf, Ft as chatAddressOf, Mt as PARTICIPANTS_ATTRIBUTE, S as fetchStoredAttachment, Vt as withChatAddress, b as agentAttachments, d as prepareInboundMedia, i as memberIdOf, m as turnContent } from "../../../_chunks/principal-CY72xYFi.mjs";
|
|
12
12
|
import { channelAttributes, currentChannel, currentKey, inHandlerChannels, withNamedRoutes } from "../channel-scope.mjs";
|
|
13
13
|
import { a as chatEvent, b as messageInput, d as replyRecipients, g as UNVERIFIED, l as replyEvent, p as storeOf, r as chatArchive, t as AGENT_SENDER } from "../../../_chunks/chat-archive-DavfKJDI.mjs";
|
|
14
14
|
import { ChatStoreError } from "../chat-store.mjs";
|
|
@@ -21,7 +21,7 @@ import { gatewayMediaCapabilities, turnMediaPlan } from "../inbound-media/plan.m
|
|
|
21
21
|
import { gatewayImageDescriber } from "../inbound-media/images.mjs";
|
|
22
22
|
import { gatewayTranscriber } from "../inbound-media/speech.mjs";
|
|
23
23
|
import { channelReview } from "../review/reply.mjs";
|
|
24
|
-
import { g as turnFiles, n as completionKind } from "../../../_chunks/silent-
|
|
24
|
+
import { g as turnFiles, n as completionKind } from "../../../_chunks/silent-DK7m_iab.mjs";
|
|
25
25
|
import { runtimeToken } from "../runtime-token.mjs";
|
|
26
26
|
import { GMAIL_ID, GmailError, gmail, replyKeyOf } from "./gmail.mjs";
|
|
27
27
|
import { inboundMail, parseMail, sentMail } from "./message.mjs";
|
|
@@ -6,7 +6,7 @@ __eveDirname(__filename);
|
|
|
6
6
|
__eveCreateRequire(import.meta.url);
|
|
7
7
|
import { appOrigin, ontologyDeploymentHeaders } from "./environment.mjs";
|
|
8
8
|
import { runtimeToken } from "./runtime-token.mjs";
|
|
9
|
-
import { ot as guestIdOf } from "../../_chunks/principal-
|
|
9
|
+
import { ot as guestIdOf } from "../../_chunks/principal-CY72xYFi.mjs";
|
|
10
10
|
const GUEST_USAGE_PATH = "/api/ontology/agent/guests/usage";
|
|
11
11
|
const REPORT_TIMEOUT_MS = 5e3;
|
|
12
12
|
function ontologyGuestUsage(options = {}) {
|
|
@@ -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-CY72xYFi.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-CY72xYFi.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 { R as ACT_AS_HEADER, w as actAsHeaders, T as ontologyConnection } from "../../_chunks/principal-
|
|
7
|
+
export { R as ACT_AS_HEADER, w as actAsHeaders, T as ontologyConnection } from "../../_chunks/principal-CY72xYFi.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 { F as confirmations, H as actorOf, I as inputHash, Ot as runtimeEnvelope, P as actionApproval, V as actorKey, j as ontologyTools } from "../../_chunks/principal-
|
|
7
|
+
import { F as confirmations, H as actorOf, I as inputHash, Ot as runtimeEnvelope, P as actionApproval, V as actorKey, j as ontologyTools } from "../../_chunks/principal-CY72xYFi.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,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 { H as actorOf, a as rolesOf, j as ontologyTools, k as actionToolName } from "../../_chunks/principal-
|
|
7
|
+
import { H as actorOf, a as rolesOf, j as ontologyTools, k as actionToolName } from "../../_chunks/principal-CY72xYFi.mjs";
|
|
8
8
|
import { object } from "./confirmation-description.mjs";
|
|
9
9
|
import { redactDiagnostic } from "./diagnostics.mjs";
|
|
10
10
|
import { defineMemoryProvider } from "eve/memory";
|
|
@@ -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 { E as OntologyActionNotPermitted, D as OntologyFileUnavailable, O as OntologyToolRejected, k as actionToolName, A as ontologyToolLabels, j as ontologyTools, M as promotionTarget } from "../../_chunks/principal-
|
|
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-CY72xYFi.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 { c as CAPTION_LIMIT, l as DRAFT_FILES_LIMIT, u as ReplyFilesRefused, d as attachToReply, f as checkReplyFiles, p as fileGroups, m as filesAfterReply, h as partFiles, g as turnFiles, _ as withCaptions } from "../../../_chunks/silent-
|
|
7
|
+
export { c as CAPTION_LIMIT, l as DRAFT_FILES_LIMIT, u as ReplyFilesRefused, d as attachToReply, f as checkReplyFiles, p as fileGroups, m as filesAfterReply, h as partFiles, g as turnFiles, _ as withCaptions } from "../../../_chunks/silent-DK7m_iab.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 { Bt as participantsOf, Ft as chatAddressOf, a as rolesOf, i as memberIdOf } from "../../../_chunks/principal-
|
|
8
|
+
import { Bt as participantsOf, Ft as chatAddressOf, a as rolesOf, i as memberIdOf } from "../../../_chunks/principal-CY72xYFi.mjs";
|
|
9
9
|
function reviewOf(settings, principal) {
|
|
10
10
|
return reviewFor(settings, rolesOf(principal));
|
|
11
11
|
}
|
|
@@ -4,12 +4,12 @@ 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 { Ft as chatAddressOf, It as chatChannel, i as memberIdOf } from "../../../_chunks/principal-
|
|
7
|
+
import { Ft as chatAddressOf, It as chatChannel, i as memberIdOf } from "../../../_chunks/principal-CY72xYFi.mjs";
|
|
8
8
|
import { a as chatEvent, r as chatArchive } from "../../../_chunks/chat-archive-DavfKJDI.mjs";
|
|
9
9
|
import { stampedChat } from "../chat-recorder.mjs";
|
|
10
10
|
import { appOrigin } from "../environment.mjs";
|
|
11
11
|
import { agentReviews } from "./client.mjs";
|
|
12
|
-
import { _ as withCaptions, h as partFiles, m as filesAfterReply, n as completionKind, p as fileGroups } from "../../../_chunks/silent-
|
|
12
|
+
import { _ as withCaptions, h as partFiles, m as filesAfterReply, n as completionKind, p as fileGroups } from "../../../_chunks/silent-DK7m_iab.mjs";
|
|
13
13
|
import { heldReply, repliesReviewed, reviewOf, reviewOutcome } from "./hold.mjs";
|
|
14
14
|
import { judgeReply, readChat } from "./judge.mjs";
|
|
15
15
|
const VERDICTS_REMEMBERED = 512;
|
|
@@ -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-CY72xYFi.mjs";
|
|
8
8
|
import { defineDynamic, defineSkill } from "eve/skills";
|
|
9
9
|
function forRoles(roles, skill) {
|
|
10
10
|
if (!Array.isArray(roles) || roles.length === 0 || !roles.every((role) => typeof role === "string" && role.trim() !== "")) throw new TypeError("forRoles() needs at least one role name; a skill for everyone is an ordinary skill file.");
|
|
@@ -4,4 +4,4 @@ import { createRequire as __eveCreateRequire } from "node:module";
|
|
|
4
4
|
const __filename = __eveFileURLToPath(import.meta.url);
|
|
5
5
|
__eveDirname(__filename);
|
|
6
6
|
__eveCreateRequire(import.meta.url);
|
|
7
|
-
export { wt as RUNTIME_SOURCE_PROTOCOL, Tt as compatibleRuntimeEnvelope, Et as principalRuntimeSource, Dt as readableRuntimeEnvelope, Ot as runtimeEnvelope, kt as telegramRuntimeSource } from "../../_chunks/principal-
|
|
7
|
+
export { wt as RUNTIME_SOURCE_PROTOCOL, Tt as compatibleRuntimeEnvelope, Et as principalRuntimeSource, Dt as readableRuntimeEnvelope, Ot as runtimeEnvelope, kt as telegramRuntimeSource } from "../../_chunks/principal-CY72xYFi.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 { Pt as SESSION_HEADER, R as ACT_AS_HEADER, _ as AttachmentError, jt as CHAT_HEADER, v as EARLIER_CHAT_HEADER } from "../../_chunks/principal-
|
|
7
|
+
import { Pt as SESSION_HEADER, R as ACT_AS_HEADER, _ as AttachmentError, jt as CHAT_HEADER, v as EARLIER_CHAT_HEADER } from "../../_chunks/principal-CY72xYFi.mjs";
|
|
8
8
|
import { fetchFileGrant, transientFileStatus } from "./file-grant.mjs";
|
|
9
9
|
import { ontologyDeploymentHeaders } from "./environment.mjs";
|
|
10
10
|
var StoredFileError = class extends AttachmentError {
|
|
@@ -14,6 +14,7 @@ import { type ImageDescriber } from "../inbound-media/images.js";
|
|
|
14
14
|
import { type CapabilityLookup, type MediaPlan } from "../inbound-media/plan.js";
|
|
15
15
|
import { type Transcriber } from "../inbound-media/speech.js";
|
|
16
16
|
import { type SlackFileDownload } from "./files.js";
|
|
17
|
+
import type { TelegramTexts } from "../telegram/texts.js";
|
|
17
18
|
import type { WorkspaceActionHook } from "../workspace-action.js";
|
|
18
19
|
import { type ChannelReviewOptions } from "../review/reply.js";
|
|
19
20
|
import { type RuntimeToken } from "../runtime-token.js";
|
|
@@ -58,6 +59,7 @@ export declare class SlackProxyRouteError extends Error {
|
|
|
58
59
|
readonly name = "SlackProxyRouteError";
|
|
59
60
|
}
|
|
60
61
|
export interface SlackChannelOptions {
|
|
62
|
+
readonly texts?: () => TelegramTexts;
|
|
61
63
|
/** The Slack channel `name` the mount declares, or `null` when it declares no such channel. */
|
|
62
64
|
readonly settings: (name: string) => SlackSettings | null;
|
|
63
65
|
readonly admission: () => AdmissionSettings;
|