@sentry/junior 0.265.0 → 0.267.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/dist/{actor-tlxzqaRe.js → actor-DZSokpwj.js} +8 -1
- package/dist/{adapter-cUkPH3Om.js → adapter-BybMEezj.js} +2 -2
- package/dist/{admin-Cf0rDmWV.js → admin-DOs1_EiW.js} +1 -1
- package/dist/{agent-runner-C6MwHJEs.js → agent-runner-DgNATN4D.js} +874 -228
- package/dist/api/schema.d.ts +202 -23
- package/dist/api/schema.js +6 -5
- package/dist/api.d.ts +6 -1
- package/dist/api.js +130 -1205
- package/dist/{app-Csbi9dW7.d.ts → app-DAB3fzyp.d.ts} +21 -3
- package/dist/app.d.ts +2 -2
- package/dist/app.js +1611 -353
- package/dist/{assistant-reply-UPA8vKlC.js → assistant-reply-CT7VcXQe.js} +1 -1
- package/dist/{automation-2RbKzpMT.js → automation-CmeFBSEh.js} +42 -14
- package/dist/{briefs-DRjx8kQ9.js → briefs-CWKjka7v.js} +5 -5
- package/dist/{catalog-runtime-D3qbJlYz.js → catalog-runtime-cMlAI5LY.js} +1 -1
- package/dist/cli/chat.js +15 -15
- package/dist/cli/check.js +3 -3
- package/dist/cli/init.js +0 -1
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-DX34VNtH.js → client-BjgbMawj.js} +2 -2
- package/dist/{config-BayQ9hHH.js → config-CdB6yJj5.js} +32 -10
- package/dist/{connections-mpN5Lsnj.js → connections-RE_65jzK.js} +13 -12
- package/dist/{conversation-B0baEwoA.js → conversation-DSo310Ps.js} +14 -3
- package/dist/{conversation-privacy-frjQCJa9.js → conversation-privacy-BzgJC5k0.js} +1 -1
- package/dist/{credential-sync-CZmyDNdR.js → credential-sync-DhEGEpgq.js} +15 -15
- package/dist/{credentialed-C6pKlB1p.js → credentialed-CIGwoLU2.js} +2913 -1026
- package/dist/{db-BnRqQ7G5.d.ts → db-Bg-zC3r5.d.ts} +1 -1
- package/dist/{executor-CAr7xQr2.js → executor-VYrx_K4w.js} +7 -4
- package/dist/{history-AY8rs-FR.js → history-C84mlAwO.js} +2 -1
- package/dist/{images-B2yA3HWE.js → images-CecjXAAz.js} +3 -3
- package/dist/instrumentation.js +6 -2
- package/dist/{job-queue-Cjo6Yg_b.js → job-queue-C0BZSa7r.js} +128 -3
- package/dist/{web-input-Y6aXvmfa.js → list-1XQP-o6K.js} +1374 -71
- package/dist/{logging-D2QBriUo.js → logging-DuZ1A4ab.js} +11 -3
- package/dist/{message-C9ymnpBS.js → message-NKSbbnA6.js} +4 -4
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-BtMf3TPZ.js → oauth-callback-server-qAHLPtml.js} +2 -2
- package/dist/{prompt-CvaDdSX3.js → prompt-BW9jFsqZ.js} +1 -1
- package/dist/{registry-COTeZ2cV.js → registry-FQutO926.js} +2 -2
- package/dist/{resolve-g9PKz9pH.js → resolve-Bk4yeuHy.js} +3 -3
- package/dist/{result-COnC42GR.js → result-B9e9ATOU.js} +9 -9
- package/dist/{runner-BnTNS7x_.js → runner-C3S2ObH-.js} +11 -11
- package/dist/{sandbox-egress-signals-C_IIdLFk.js → sandbox-egress-signals-DqpGzzMB.js} +1 -1
- package/dist/{schema-D5Amlzkp.js → schema-X7Fj4fv1.js} +3 -2
- package/dist/{service-account-CwvToidT.js → service-account-BQasl-qq.js} +3 -3
- package/dist/{service-account-YdYftwV2.js → service-account-Do30HUNv.js} +3 -3
- package/dist/{session-stop-CpCUy1ZJ.js → session-stop-DkOjt46_.js} +45 -128
- package/dist/{skills-Bb2KaJ3m.js → skills-CQHrwfOa.js} +2 -2
- package/dist/{spawn-mbTcrLb3.js → spawn-BHuqN14f.js} +2 -2
- package/dist/{store-CqRnaZSq.js → store-6EetVP-m.js} +3 -3
- package/dist/{store-CG0VJyye.d.ts → store-B8CABbmR.d.ts} +10 -2
- package/dist/store-DvNZIsCr.js +295 -0
- package/dist/{task-queue-8XjDIORF.js → task-queue-B0DLgd2P.js} +10 -5
- package/dist/{task-runner-6mLmG6g_.js → task-runner-B-PD_JOj.js} +26 -14
- package/dist/{tasks-DGbrur6x.js → tasks-0ilmuCux.js} +1440 -46
- package/dist/{thread-state-D45lz-oC.js → thread-state-DRmdJ2QN.js} +5 -5
- package/dist/{turn-failure-response-CaEPLSBn.js → turn-failure-response-G11cs2gE.js} +9 -9
- package/dist/{turn-lifecycle-C35IyRGp.js → turn-lifecycle-OzLIwvi1.js} +2 -2
- package/dist/{turn-session-routing-BKx6rfVd.js → turn-session-routing-Dyut9l7Y.js} +1 -1
- package/dist/user-input-request-BDFBdF8r.js +116 -0
- package/dist/{validation-C0X3CX51.js → validation-CxEmt1id.js} +1 -1
- package/dist/{version-BPHgJwnm.js → version-Bapedn4A.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-B2wXNspU.js → viewer-DrN3oC2X.js} +22 -11
- package/dist/{work-DMbqK0kT.js → work-DUQoNcqP.js} +52 -51
- package/dist/{worker-B-rDJ3XN.js → worker-D1l4Ugk0.js} +30 -19
- package/migrations/0064_any_resource_event_triggers.sql +2 -0
- package/migrations/meta/0064_snapshot.json +3505 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +20 -5
- package/dist/store-DdT74Lvq.js +0 -1424
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as withScope, d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException } from "./sentry-MDkYAVPV.js";
|
|
2
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { t as JUNIOR_VERSION } from "./version-Bapedn4A.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { styleText } from "node:util";
|
|
5
5
|
import { ConfigError, configureSync, getConfig, getLogger } from "@logtape/logtape";
|
|
@@ -568,7 +568,7 @@ function formatConsoleValue(value) {
|
|
|
568
568
|
return quoteConsoleValue(value);
|
|
569
569
|
}
|
|
570
570
|
function shouldShowConsoleDestinationName(eventName) {
|
|
571
|
-
return /^(app_home|oauth|queue|
|
|
571
|
+
return /^(app_home|oauth|queue|slack|webhook)\./.test(eventName);
|
|
572
572
|
}
|
|
573
573
|
function shouldShowConsoleModel(level, eventName) {
|
|
574
574
|
if (level === "warn" || level === "error") return true;
|
|
@@ -1050,6 +1050,14 @@ function getTracePropagationHeaders() {
|
|
|
1050
1050
|
}
|
|
1051
1051
|
return headers;
|
|
1052
1052
|
}
|
|
1053
|
+
/** Return the active trace as a durable trace context, if there is one. */
|
|
1054
|
+
function getActiveTraceContext() {
|
|
1055
|
+
const { "sentry-trace": sentryTrace, baggage } = getTracePropagationHeaders();
|
|
1056
|
+
return sentryTrace ? {
|
|
1057
|
+
baggage,
|
|
1058
|
+
sentryTrace
|
|
1059
|
+
} : void 0;
|
|
1060
|
+
}
|
|
1053
1061
|
/** Set attributes on the currently active Sentry span. */
|
|
1054
1062
|
function setSpanAttributes(attributes) {
|
|
1055
1063
|
const span = getActiveSpan();
|
|
@@ -1224,4 +1232,4 @@ function extractGenAiUsageAttributes(...sources) {
|
|
|
1224
1232
|
...cost?.total !== void 0 ? { "app.cost.total_usd": cost.total } : void 0
|
|
1225
1233
|
};
|
|
1226
1234
|
}
|
|
1227
|
-
export {
|
|
1235
|
+
export { JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE as A, isRecord as B, summarizeMessageText as C, JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE as D, withSpan as E, getDeploymentServiceVersion as F, toOptionalString as H, getDeploymentTelemetryAttributes as I, GOOGLE_IDENTITY_PROVIDER as L, JUNIOR_RETENTION_ROUTE as M, JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE as N, JUNIOR_HEARTBEAT_CRON_SCHEDULE as O, LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION as P, isNativeIdentityProvider as R, setTags as S, withLogContext as T, toOptionalNumber as V, runBestEffort as _, extractGenAiUsageSummary as a, setSpanAttributes as b, getLogContextAttributes as c, logAudit as d, logError as f, normalizeGenAiFinishReason as g, logWarn as h, extractGenAiUsageAttributes as i, JUNIOR_RETENTION_CRON_SCHEDULE as j, JUNIOR_HEARTBEAT_ROUTE as k, getLogContextAttributesForSpan as l, logInfo as m, createChatSdkLogger as n, getActiveTraceContext as o, logException as p, createRequestContext as r, getActiveTraceId as s, buildTurnFailureResponse as t, getTracePropagationHeaders as u, serializeGenAiAttribute as v, withContext as w, setSpanStatus as x, setSentryUser as y, normalizeIdentityEmail as z };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import {
|
|
3
|
-
import { P as PARENT_AGENT_TARGET, i as createAgentInvocationForMessage, j as AgentMessageTargetError, o as findChildAgentConversationId, s as getActiveAgentInvocationForConversation } from "./store-
|
|
4
|
-
import { n as enqueueAgentMessageToParent } from "./result-
|
|
5
|
-
import { r as enqueueAgentInvocation } from "./work-
|
|
2
|
+
import { dt as actorFromRun, ft as toolInvocationDestination } from "./agent-runner-DgNATN4D.js";
|
|
3
|
+
import { P as PARENT_AGENT_TARGET, i as createAgentInvocationForMessage, j as AgentMessageTargetError, o as findChildAgentConversationId, s as getActiveAgentInvocationForConversation } from "./store-6EetVP-m.js";
|
|
4
|
+
import { n as enqueueAgentMessageToParent } from "./result-B9e9ATOU.js";
|
|
5
|
+
import { r as enqueueAgentInvocation } from "./work-DUQoNcqP.js";
|
|
6
6
|
// src/chat/agent-invocations/message.ts
|
|
7
7
|
var message_exports = /* @__PURE__ */ __exportAll({ bindMessageAgent: () => bindMessageAgent });
|
|
8
8
|
/**
|
package/dist/nitro.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as JuniorDashboardOptions } from "./app-DAB3fzyp.js";
|
|
2
2
|
import { n as JuniorPluginSet } from "./plugins-B_0Cr0MO.js";
|
|
3
3
|
import { withSentryConfig as withSentryConfig$1 } from "@sentry/nitro";
|
|
4
4
|
type SentryNitroConfig = Parameters<typeof withSentryConfig$1>[0];
|
package/dist/nitro.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, D as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, F as getDeploymentServiceVersion, M as JUNIOR_RETENTION_ROUTE, N as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_HEARTBEAT_CRON_SCHEDULE, j as JUNIOR_RETENTION_CRON_SCHEDULE, k as JUNIOR_HEARTBEAT_ROUTE } from "./logging-DuZ1A4ab.js";
|
|
2
2
|
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DJBompdd.js";
|
|
3
|
-
import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-
|
|
3
|
+
import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-C0BZSa7r.js";
|
|
4
4
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-DOm9Y6qI.js";
|
|
5
|
-
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-
|
|
5
|
+
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-B0DLgd2P.js";
|
|
6
6
|
import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-Cf5gVPWP.js";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as createUserTokenStore } from "./credentialed-
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
1
|
+
import { n as createUserTokenStore } from "./credentialed-CIGwoLU2.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-DhEGEpgq.js";
|
|
3
3
|
import { createServer } from "node:http";
|
|
4
4
|
// src/chat/local/oauth-callback-server.ts
|
|
5
5
|
const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Q as parseBriefInput, X as briefOutcomeStatusSchema, Z as conversationBriefSchema } from "./conversation-DSo310Ps.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
// src/chat/briefs/generate.ts
|
|
4
4
|
const MAX_INPUT_CHARS = 6e4;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as isUserActor, o as parseActorUserId } from "./actor-
|
|
1
|
+
import { b as setSpanAttributes, h as logWarn, m as logInfo } from "./logging-DuZ1A4ab.js";
|
|
2
|
+
import { a as isUserActor, o as parseActorUserId } from "./actor-DZSokpwj.js";
|
|
3
3
|
import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-DJBompdd.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { z } from "zod";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { E as withSpan, b as setSpanAttributes } from "./logging-DuZ1A4ab.js";
|
|
2
|
+
import { En as SANDBOX_WORKSPACE_ROOT, F as getSandboxProvider, N as isStale, bn as runNonInteractiveCommand, cn as sleep, j as create, xn as SANDBOX_COMMAND_PATH } from "./credentialed-CIGwoLU2.js";
|
|
3
|
+
import { i as getStateAdapter } from "./adapter-BybMEezj.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
// src/chat/sandbox/resources.ts
|
|
6
6
|
let configuredResources;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import {
|
|
3
|
-
import { t as createActor } from "./actor-
|
|
4
|
-
import { f as credentialContextForActor } from "./registry-
|
|
5
|
-
import {
|
|
6
|
-
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-
|
|
7
|
-
import { C as markAgentInvocationParentMailboxAppended, _ as getLatestAgentInvocationForConversation, a as createAgentInvocationFromLatest, c as getAgentInvocation, d as getAgentInvocationIdForResult, l as getAgentInvocationIdForEvents, p as getAgentInvocationResultMessageId, u as getAgentInvocationIdForMessage, y as isTerminalAgentInvocation } from "./store-
|
|
8
|
-
import { a as EVENT_WAIT_MS, c as isEventMailboxMetadata, l as renderEventBatchText, u as timerWatchCredentialSubject } from "./session-stop-
|
|
9
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
10
|
-
import { r as enqueueAgentInvocation } from "./work-
|
|
2
|
+
import { Jt as listTurnSummaries, qt as getTurnRecord } from "./tasks-0ilmuCux.js";
|
|
3
|
+
import { t as createActor } from "./actor-DZSokpwj.js";
|
|
4
|
+
import { f as credentialContextForActor } from "./registry-FQutO926.js";
|
|
5
|
+
import { rt as listUnreportedSiblingAgents } from "./agent-runner-DgNATN4D.js";
|
|
6
|
+
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-BW9jFsqZ.js";
|
|
7
|
+
import { C as markAgentInvocationParentMailboxAppended, _ as getLatestAgentInvocationForConversation, a as createAgentInvocationFromLatest, c as getAgentInvocation, d as getAgentInvocationIdForResult, l as getAgentInvocationIdForEvents, p as getAgentInvocationResultMessageId, u as getAgentInvocationIdForMessage, y as isTerminalAgentInvocation } from "./store-6EetVP-m.js";
|
|
8
|
+
import { a as EVENT_WAIT_MS, c as isEventMailboxMetadata, l as renderEventBatchText, u as timerWatchCredentialSubject } from "./session-stop-DkOjt46_.js";
|
|
9
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-DvNZIsCr.js";
|
|
10
|
+
import { r as enqueueAgentInvocation } from "./work-DUQoNcqP.js";
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
import { createEventSource, createLocalSource, createWebSource } from "@sentry/junior-plugin-api";
|
|
13
13
|
// src/chat/conversations/web-mailbox.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { f as credentialContextForActor } from "./registry-
|
|
5
|
-
import {
|
|
6
|
-
import { X as markTurnFailed, Z as startActiveTurn } from "./store-
|
|
7
|
-
import { n as getAssistantReplyText } from "./assistant-reply-
|
|
8
|
-
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-
|
|
9
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
10
|
-
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
11
|
-
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-
|
|
1
|
+
import { Et as recordDeliveredAssistantMessage, Mt as authorizationId, Ot as upsertConversationMessage, Pn as persistWithRetry, Tt as normalizeConversationText, Ut as saveTurnCheckpoint, W as commitAcceptedReply, Y as loadProjection, dt as persistConversationMessages, nt as recordAuthorizationCompleted, ut as hydrateConversationMessages, wt as markConversationMessage, yt as buildConversationContext } from "./tasks-0ilmuCux.js";
|
|
2
|
+
import { S as setTags, T as withLogContext, p as logException } from "./logging-DuZ1A4ab.js";
|
|
3
|
+
import { f as getConversationStore, u as getConversationEventStore } from "./viewer-DrN3oC2X.js";
|
|
4
|
+
import { f as credentialContextForActor } from "./registry-FQutO926.js";
|
|
5
|
+
import { R as messageCardText } from "./conversation-DSo310Ps.js";
|
|
6
|
+
import { X as markTurnFailed, Z as startActiveTurn } from "./store-6EetVP-m.js";
|
|
7
|
+
import { n as getAssistantReplyText } from "./assistant-reply-CT7VcXQe.js";
|
|
8
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-B-PD_JOj.js";
|
|
9
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-OzLIwvi1.js";
|
|
10
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-DRmdJ2QN.js";
|
|
11
|
+
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-G11cs2gE.js";
|
|
12
12
|
import { randomUUID } from "node:crypto";
|
|
13
13
|
import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
|
|
14
14
|
// src/chat/local/runner.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { yt as sandboxEgressSignalsResponseSchema } from "./credentialed-CIGwoLU2.js";
|
|
2
2
|
// src/chat/local/sandbox-egress-signals.ts
|
|
3
3
|
const SANDBOX_EGRESS_SIGNALS_PATH = "/api/internal/sandbox-egress/signals";
|
|
4
4
|
const LOCAL_DEV_SERVER_TIMEOUT_MS = 1e3;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { r as AGENT_INVOCATION_STATUSES, u as juniorDestinationKindSchema } from "./agent-invocations-CxKldAeB.js";
|
|
2
|
-
import { E as
|
|
3
|
-
import "./
|
|
2
|
+
import { E as conversationSummaryReportSchema, F as conversationChildAgentTotalsSchema, O as conversationUsageSchema, l as conversationAuxiliaryCostsSchema, n as actorIdentitySchema } from "./conversation-DSo310Ps.js";
|
|
3
|
+
import "./user-input-request-BDFBdF8r.js";
|
|
4
|
+
import "./automation-CmeFBSEh.js";
|
|
4
5
|
import { a as fillUtcHours, c as sumUtcHoursIntoSixHours, i as fillUtcDays } from "./web-message-id-CJSUiksE.js";
|
|
5
6
|
import { z } from "zod";
|
|
6
7
|
import { codeChangeStateSchema, eventMatchSchema } from "@sentry/junior-plugin-api";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
2
|
-
import { t as disconnectStateAdapter } from "./adapter-
|
|
3
|
-
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-
|
|
1
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-cMlAI5LY.js";
|
|
2
|
+
import { t as disconnectStateAdapter } from "./adapter-BybMEezj.js";
|
|
3
|
+
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-Do30HUNv.js";
|
|
4
4
|
import { CLI_USAGE } from "./cli/run.js";
|
|
5
5
|
import { createServer } from "node:http";
|
|
6
6
|
// src/cli/service-account.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-
|
|
3
|
-
import {
|
|
1
|
+
import { B as isRecord, b as setSpanAttributes, h as logWarn } from "./logging-DuZ1A4ab.js";
|
|
2
|
+
import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-FQutO926.js";
|
|
3
|
+
import { a as MUTATION_LOCK_TTL_MS, c as withLock, i as getStateAdapter, s as fenceLock } from "./adapter-BybMEezj.js";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
6
|
import { UnauthorizedError, auth } from "@modelcontextprotocol/sdk/client/auth.js";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { A as CORE_EVENT_NAMESPACE, Gn as normalizeToolNameFromResult, N as eventCatalogEntry, P as eventGuidance, Un as isToolResultError, Vn as isAssistantMessage, Wn as isToolResultMessage } from "./tasks-0ilmuCux.js";
|
|
3
|
+
import { n as botConfig } from "./config-CdB6yJj5.js";
|
|
4
|
+
import { h as logWarn, m as logInfo, p as logException } from "./logging-DuZ1A4ab.js";
|
|
5
|
+
import { f as getConversationStore, m as getSqlExecutor } from "./viewer-DrN3oC2X.js";
|
|
6
6
|
import { s as juniorConversations } from "./agent-invocations-CxKldAeB.js";
|
|
7
|
-
import "./executor-
|
|
8
|
-
import { h as credentialSubjectSchema } from "./registry-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { r as EVENT_AUTHOR_ID } from "./prompt-
|
|
12
|
-
import { r as sanitizeAssistantText } from "./assistant-reply-
|
|
13
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
7
|
+
import "./executor-VYrx_K4w.js";
|
|
8
|
+
import { h as credentialSubjectSchema } from "./registry-FQutO926.js";
|
|
9
|
+
import { $ as postSlackMessage, Zt as verifyTimerWatchCredentialSubject, dn as JUNIOR_THREAD_STATE_TTL_MS, gn as ToolInputError, p as getPlugins } from "./credentialed-CIGwoLU2.js";
|
|
10
|
+
import { i as getStateAdapter } from "./adapter-BybMEezj.js";
|
|
11
|
+
import { r as EVENT_AUTHOR_ID } from "./prompt-BW9jFsqZ.js";
|
|
12
|
+
import { r as sanitizeAssistantText } from "./assistant-reply-CT7VcXQe.js";
|
|
13
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-DvNZIsCr.js";
|
|
14
14
|
import { z } from "zod";
|
|
15
15
|
import { eq, inArray } from "drizzle-orm";
|
|
16
|
-
import {
|
|
16
|
+
import { eventMatchFieldsSchema, objectTypeSchema } from "@sentry/junior-plugin-api";
|
|
17
17
|
// src/chat/automation-result.ts
|
|
18
18
|
/**
|
|
19
19
|
* Automation run result.
|
|
@@ -373,7 +373,7 @@ function renderTaskInput(args) {
|
|
|
373
373
|
"This is a task, not a message from a person.",
|
|
374
374
|
"",
|
|
375
375
|
...about ? [`About: ${oneLine(about)}`] : [],
|
|
376
|
-
...creator ? [`Created by: ${oneLine(creator)}. "
|
|
376
|
+
...creator ? [`Created by: ${oneLine(creator)}. This person is the Automation creator. "The Automation creator", "me", and "my" in the instructions mean this person. Where the instructions refer to this person, write this mention in the message. If they do not, do not mention this person.`] : [],
|
|
377
377
|
...people.length > 0 ? [`People involved: ${people.join(", ")}`] : [],
|
|
378
378
|
...args.doneBy ? [doneByLine(args.doneBy, people)] : [],
|
|
379
379
|
`Instructions: ${instructions}`
|
|
@@ -439,106 +439,6 @@ function renderTaskBatchInput(args) {
|
|
|
439
439
|
function joinMailboxText(messages) {
|
|
440
440
|
return messages.map((message) => message.input.text.trim()).filter(Boolean).join("\n\n");
|
|
441
441
|
}
|
|
442
|
-
// src/chat/events/catalog.ts
|
|
443
|
-
/** Core-owned event namespace. Not a plugin publisher. */
|
|
444
|
-
const CORE_EVENT_NAMESPACE = "junior";
|
|
445
|
-
/** True when the catalog has any enabled registration. */
|
|
446
|
-
function hasEventCatalogEntries(catalog) {
|
|
447
|
-
return Object.keys(catalog).length > 0;
|
|
448
|
-
}
|
|
449
|
-
/**
|
|
450
|
-
* Catalog entries that durable event automations may select.
|
|
451
|
-
*
|
|
452
|
-
* Resource types with `automation: false` stay out of create/update schemas
|
|
453
|
-
* and trigger availability. A namespace with no such resource type left is
|
|
454
|
-
* removed.
|
|
455
|
-
*/
|
|
456
|
-
function automationEventCatalog(catalog) {
|
|
457
|
-
return Object.fromEntries(Object.entries(catalog).flatMap(([namespace, registration]) => {
|
|
458
|
-
const resourceTypes = registration.resourceTypes.filter((resourceType) => registration.limits?.[resourceType.type]?.automation !== false);
|
|
459
|
-
return resourceTypes.length > 0 ? [[namespace, {
|
|
460
|
-
...registration,
|
|
461
|
-
resourceTypes
|
|
462
|
-
}]] : [];
|
|
463
|
-
}));
|
|
464
|
-
}
|
|
465
|
-
/** Return why watchEvents cannot watch one resource type, if it cannot. */
|
|
466
|
-
function eventWatchUnavailable(catalog, namespace, resourceType) {
|
|
467
|
-
const limits = catalog[namespace]?.limits?.[resourceType];
|
|
468
|
-
return limits?.watch === false ? limits.watchUnavailableMessage : void 0;
|
|
469
|
-
}
|
|
470
|
-
function enumSchema(values, unavailableMessage) {
|
|
471
|
-
if (values.length === 0) return z.string().refine(() => false, unavailableMessage);
|
|
472
|
-
return z.enum(values);
|
|
473
|
-
}
|
|
474
|
-
/** Build the model-facing namespace enum from enabled event plugins. */
|
|
475
|
-
function eventNamespaceSchema(catalog) {
|
|
476
|
-
return enumSchema(Object.keys(catalog).sort(), "No event namespaces are enabled.");
|
|
477
|
-
}
|
|
478
|
-
/** Build the model-facing event enum from enabled plugin registrations. */
|
|
479
|
-
function registeredEventTypeSchema(catalog) {
|
|
480
|
-
return enumSchema([...new Set(Object.values(catalog).flatMap((registration) => registration.resourceTypes.flatMap((resourceType) => resourceType.supportedEvents)))].sort(), "No event types are enabled.");
|
|
481
|
-
}
|
|
482
|
-
/** Build the model-facing resource type enum from enabled plugin registrations. */
|
|
483
|
-
function registeredResourceTypeSchema(catalog) {
|
|
484
|
-
return enumSchema([...new Set(Object.values(catalog).flatMap((registration) => registration.resourceTypes.map((resourceType) => resourceType.type)))].sort(), "No resource types are enabled.");
|
|
485
|
-
}
|
|
486
|
-
/** Return app guidance for one registered resource type and event type. */
|
|
487
|
-
function eventGuidance(catalog, namespace, resourceType, eventType) {
|
|
488
|
-
return catalog[namespace]?.resourceTypes.find((candidate) => candidate.type === resourceType)?.guidance?.[eventType];
|
|
489
|
-
}
|
|
490
|
-
/** Build the match object the tools accept for one resource type. */
|
|
491
|
-
function registeredEventMatchSchema() {
|
|
492
|
-
return eventMatchSchema.optional().describe("Optional filters: exact values for the resource type matchFields. A single value must equal the event data. A list means the event value may be any one entry. For a field with list: true, the event value is a list, and it matches when it includes the value or any entry. A field with events is set only on those events, so every selected event must be in that list. Omit a key to ignore it. Unmatched events are dropped with no agent turn.");
|
|
493
|
-
}
|
|
494
|
-
/**
|
|
495
|
-
* List why a selection cannot work with the enabled plugins. Use it for new
|
|
496
|
-
* selections and for saved triggers, which can go stale after a plugin renames
|
|
497
|
-
* or removes a resource type, event, or filter.
|
|
498
|
-
*/
|
|
499
|
-
function registeredEventTriggerProblems(catalog, selection, options) {
|
|
500
|
-
return eventTriggerProblems(catalog[selection.namespace]?.resourceTypes ?? [], selection, options);
|
|
501
|
-
}
|
|
502
|
-
/**
|
|
503
|
-
* Describe a selection with the enabled plugins, for the dashboard and Slack.
|
|
504
|
-
* Its problems are the same as `registeredEventTriggerProblems`.
|
|
505
|
-
*/
|
|
506
|
-
function describeRegisteredEventTrigger(catalog, selection) {
|
|
507
|
-
return describeEventTrigger(catalog[selection.namespace]?.resourceTypes ?? [], selection);
|
|
508
|
-
}
|
|
509
|
-
function uniqueMatchValues(match) {
|
|
510
|
-
if (!match || Object.keys(match).length === 0) return void 0;
|
|
511
|
-
return Object.fromEntries(Object.entries(match).map(([key, value]) => [key, Array.isArray(value) ? [...new Set(value)] : value]));
|
|
512
|
-
}
|
|
513
|
-
/**
|
|
514
|
-
* Reject an event automation trigger or a Watch that cannot work, with every
|
|
515
|
-
* problem in one message for the agent. Return its match without repeated
|
|
516
|
-
* list values.
|
|
517
|
-
*/
|
|
518
|
-
function requireValidEventTrigger(catalog, selection, target) {
|
|
519
|
-
const problems = registeredEventTriggerProblems(catalog, selection, { inputKeys: true });
|
|
520
|
-
if (problems.length > 0) {
|
|
521
|
-
const resource = `${catalog[selection.namespace]?.displayName ?? selection.namespace} ${selection.resourceType.replaceAll("_", " ")}`;
|
|
522
|
-
throw new ToolInputError([target === "watch" ? `This ${resource} watch cannot be created.` : `This ${resource} trigger cannot be saved.`, ...problems.map((problem) => problem.message)].join(" "));
|
|
523
|
-
}
|
|
524
|
-
return uniqueMatchValues(selection.match);
|
|
525
|
-
}
|
|
526
|
-
/**
|
|
527
|
-
* Normalize one selector with the convention declared by its plugin.
|
|
528
|
-
*
|
|
529
|
-
* Reject a selector that does not fit its resource type. Resource types can
|
|
530
|
-
* share event types, so only the identifier shows which one a selector names.
|
|
531
|
-
*/
|
|
532
|
-
function requireEventIdentifier(catalog, input) {
|
|
533
|
-
const registration = catalog[input.namespace];
|
|
534
|
-
const identifier = normalizeEventIdentifier(registration, input.identifier);
|
|
535
|
-
const resourceTypes = registration?.resourceTypes ?? [];
|
|
536
|
-
const fits = (resourceType) => resourceType.identifier !== void 0 && new RegExp(resourceType.identifier.pattern).test(identifier);
|
|
537
|
-
const resourceType = resourceTypes.find((candidate) => candidate.type === input.resourceType);
|
|
538
|
-
if (!resourceType?.identifier || fits(resourceType)) return identifier;
|
|
539
|
-
const fitting = resourceTypes.filter(fits).map((candidate) => candidate.type);
|
|
540
|
-
throw new ToolInputError([`Identifier "${identifier}" does not fit resourceType "${input.resourceType}" in namespace "${input.namespace}". Expected format: "${resourceType.identifier.format}".`, ...fitting.length > 0 ? [`If the identifier is correct, use one of these resourceType values: ${fitting.map((type) => `"${type}"`).join(", ")}.`] : []].join(" "));
|
|
541
|
-
}
|
|
542
442
|
// src/chat/sandbox/snapshot/events.ts
|
|
543
443
|
const WORKSPACE_SNAPSHOT_NAMESPACE = CORE_EVENT_NAMESPACE;
|
|
544
444
|
const WORKSPACE_SNAPSHOT_RESOURCE_TYPE = "workspace_snapshot";
|
|
@@ -556,12 +456,18 @@ function workspaceSnapshotEvents() {
|
|
|
556
456
|
resourceTypes: [{
|
|
557
457
|
type: WORKSPACE_SNAPSHOT_RESOURCE_TYPE,
|
|
558
458
|
supportedEvents: [WORKSPACE_SNAPSHOT_READY_EVENT, WORKSPACE_SNAPSHOT_FAILED_EVENT],
|
|
559
|
-
suggestedEvents: []
|
|
560
|
-
guidance: {
|
|
561
|
-
[WORKSPACE_SNAPSHOT_READY_EVENT]: "Call switchWorkspace again with the same Workspace name. Do not create another watch when switchWorkspace already returned a subscription.",
|
|
562
|
-
[WORKSPACE_SNAPSHOT_FAILED_EVENT]: "Report the snapshot failure. Do not keep waiting for this Workspace unless the user asks to retry."
|
|
563
|
-
}
|
|
459
|
+
suggestedEvents: []
|
|
564
460
|
}],
|
|
461
|
+
events: {
|
|
462
|
+
[WORKSPACE_SNAPSHOT_READY_EVENT]: {
|
|
463
|
+
reach: "resource",
|
|
464
|
+
guidance: "Call switchWorkspace again with the same Workspace name. Do not create another watch when switchWorkspace already returned a subscription."
|
|
465
|
+
},
|
|
466
|
+
[WORKSPACE_SNAPSHOT_FAILED_EVENT]: {
|
|
467
|
+
reach: "resource",
|
|
468
|
+
guidance: "Report the snapshot failure. Do not keep waiting for this Workspace unless the user asks to retry."
|
|
469
|
+
}
|
|
470
|
+
},
|
|
565
471
|
limits: { [WORKSPACE_SNAPSHOT_RESOURCE_TYPE]: { automation: false } }
|
|
566
472
|
};
|
|
567
473
|
}
|
|
@@ -630,9 +536,12 @@ function slackChannelMessageEvents() {
|
|
|
630
536
|
},
|
|
631
537
|
supportedEvents: [MESSAGE_POSTED_EVENT],
|
|
632
538
|
suggestedEvents: [],
|
|
633
|
-
matchFields: CHANNEL_MESSAGE_MATCH_FIELDS
|
|
634
|
-
guidance: { [MESSAGE_POSTED_EVENT]: "A person or bot posted a new top-level message in this channel. A bot post runs the automation only when match names the bot in userId. A reply goes in that message's thread. If the instructions do not apply to this message, end with no action." }
|
|
539
|
+
matchFields: CHANNEL_MESSAGE_MATCH_FIELDS
|
|
635
540
|
}],
|
|
541
|
+
events: { [MESSAGE_POSTED_EVENT]: {
|
|
542
|
+
reach: "resource",
|
|
543
|
+
guidance: "A person or bot posted a new top-level message in this channel. A bot post runs the automation only when match names the bot in userId. A reply goes in that message's thread. If the instructions do not apply to this message, end with no action."
|
|
544
|
+
} },
|
|
636
545
|
limits: { [CHANNEL_RESOURCE_TYPE]: {
|
|
637
546
|
watch: false,
|
|
638
547
|
watchUnavailableMessage: "Slack channel messages can trigger only an event automation in that channel. Use createEventAutomation."
|
|
@@ -689,12 +598,16 @@ function slackChannelMessageEvent(input) {
|
|
|
689
598
|
/**
|
|
690
599
|
* Decide whether a channel-message Event may run one automation.
|
|
691
600
|
*
|
|
601
|
+
* A message runs only automations that post in its own channel, so private
|
|
602
|
+
* channel text cannot reach another channel. The trigger identifier already
|
|
603
|
+
* names that channel, and this check keeps the rule when it does not.
|
|
692
604
|
* A bot post runs only automations whose match names its author in `userId`.
|
|
693
605
|
* Bots can post often and would use up the run limit of every other
|
|
694
606
|
* automation in the channel.
|
|
695
607
|
*/
|
|
696
608
|
function slackChannelMessageRunsAutomation(event, automation) {
|
|
697
609
|
if (event.namespace !== "slack") return true;
|
|
610
|
+
if (event.data?.channelId !== automation.destination.channelId) return false;
|
|
698
611
|
if (event.data?.postedByBot !== true) return true;
|
|
699
612
|
return automation.trigger.match?.userId !== void 0;
|
|
700
613
|
}
|
|
@@ -715,13 +628,17 @@ function slackChannelMessageReplyThreadTs(event) {
|
|
|
715
628
|
function getEventCatalog() {
|
|
716
629
|
const snapshot = workspaceSnapshotEvents();
|
|
717
630
|
const catalog = {
|
|
718
|
-
[CORE_EVENT_NAMESPACE]: {
|
|
631
|
+
[CORE_EVENT_NAMESPACE]: eventCatalogEntry({
|
|
719
632
|
displayName: botConfig.userName,
|
|
720
633
|
resourceTypes: [...snapshot.resourceTypes, {
|
|
721
634
|
type: "timer",
|
|
722
635
|
supportedEvents: ["timer.fired"],
|
|
723
636
|
suggestedEvents: []
|
|
724
637
|
}],
|
|
638
|
+
events: {
|
|
639
|
+
...snapshot.events,
|
|
640
|
+
"timer.fired": { reach: "resource" }
|
|
641
|
+
},
|
|
725
642
|
limits: {
|
|
726
643
|
...snapshot.limits,
|
|
727
644
|
timer: {
|
|
@@ -730,20 +647,20 @@ function getEventCatalog() {
|
|
|
730
647
|
watchUnavailableMessage: "Use watchTimer to create a timer Watch."
|
|
731
648
|
}
|
|
732
649
|
}
|
|
733
|
-
},
|
|
734
|
-
[SLACK_EVENT_NAMESPACE]: {
|
|
650
|
+
}),
|
|
651
|
+
[SLACK_EVENT_NAMESPACE]: eventCatalogEntry({
|
|
735
652
|
...slackChannelMessageEvents(),
|
|
736
653
|
displayName: "Slack"
|
|
737
|
-
}
|
|
654
|
+
})
|
|
738
655
|
};
|
|
739
656
|
for (const plugin of getPlugins()) {
|
|
740
657
|
const registration = plugin.events;
|
|
741
658
|
if (!registration || registration.isEnabled?.() === false) continue;
|
|
742
659
|
if (plugin.manifest.name === "junior" || plugin.manifest.name === "slack") throw new Error(`Plugin "${plugin.manifest.name}" cannot register events; that namespace is reserved for core events`);
|
|
743
|
-
catalog[plugin.manifest.name] = {
|
|
660
|
+
catalog[plugin.manifest.name] = eventCatalogEntry({
|
|
744
661
|
...registration,
|
|
745
662
|
displayName: plugin.manifest.displayName
|
|
746
|
-
};
|
|
663
|
+
});
|
|
747
664
|
}
|
|
748
665
|
return catalog;
|
|
749
666
|
}
|
|
@@ -769,7 +686,7 @@ const eventTaskFactsSchema = z.object({
|
|
|
769
686
|
* contract. Stable delivery rules live in runtime and docs, not this prompt.
|
|
770
687
|
*/
|
|
771
688
|
function eventTaskFacts(subscription, event, people = [], doneBy) {
|
|
772
|
-
const guidance = [eventGuidance(getEventCatalog(), event.namespace,
|
|
689
|
+
const guidance = [eventGuidance(getEventCatalog(), event.namespace, event.eventType), subscription.guidance?.[event.eventType]].filter((text) => Boolean(text?.trim())).join(" ");
|
|
773
690
|
return {
|
|
774
691
|
about: subscription.label,
|
|
775
692
|
instructions: subscription.intent,
|
|
@@ -996,4 +913,4 @@ async function skipInputBeforeConversationStop(context) {
|
|
|
996
913
|
await context.attempt.ack();
|
|
997
914
|
return { status: "completed" };
|
|
998
915
|
}
|
|
999
|
-
export {
|
|
916
|
+
export { readAutomationResult as A, maybePostAutomatedTurnLimitNotice as C, automationResultSchema as D, FINISH_AUTOMATION_RUN_TOOL_NAME as E, runDispatchOutcome as M, deliversFinalText as O, renderTaskInput as S, resetAutomatedTurnLimit as T, WORKSPACE_SNAPSHOT_FAILED_EVENT as _, EVENT_WAIT_MS as a, workspaceSnapshotWatch as b, isEventMailboxMetadata as c, getEventCatalog as d, SLACK_EVENT_NAMESPACE as f, slackChannelMessageRunsAutomation as g, slackChannelMessageReplyThreadTs as h, skipInputBeforeConversationStop as i, remindMissingAutomationResult as j, finishedRunReply as k, renderEventBatchText as l, slackChannelMessageEvent as m, markConversationsStopped as n, enqueueEventNotification as o, requireSlackChannelMessageScope as p, session_stop_exports as r, eventBatchMessageEvents as s, getConversationStoppedAtMs as t, timerWatchCredentialSubject as u, WORKSPACE_SNAPSHOT_READY_EVENT as v, recordFinishedTurnForAutomatedLimit as w, joinMailboxText as x, workspaceSnapshotFinishedEvent as y };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import {
|
|
2
|
+
import { h as logWarn } from "./logging-DuZ1A4ab.js";
|
|
3
3
|
import { s as skillRoots } from "./package-discovery-DJBompdd.js";
|
|
4
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-cMlAI5LY.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import fs from "node:fs/promises";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as createAndEnqueueAgentInvocation } from "./work-
|
|
2
|
+
import { dt as actorFromRun, ft as toolInvocationDestination } from "./agent-runner-DgNATN4D.js";
|
|
3
|
+
import { n as createAndEnqueueAgentInvocation } from "./work-DUQoNcqP.js";
|
|
4
4
|
// src/chat/agent-invocations/spawn.ts
|
|
5
5
|
var spawn_exports = /* @__PURE__ */ __exportAll({ bindSpawnAgent: () => bindSpawnAgent });
|
|
6
6
|
/** Bind a Run's Actor and credentials to new Agent invocations. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { l as TURN_REASONING_LEVELS, s as modelProfileSchema } from "./model-profile-Bg8EoCKD.js";
|
|
2
|
-
import {
|
|
2
|
+
import { f as getConversationStore, m as getSqlExecutor } from "./viewer-DrN3oC2X.js";
|
|
3
3
|
import { a as juniorAgentInvocations, i as juniorAgentBindings, n as AGENT_INVOCATION_PARENT_MAILBOX_STATUSES, t as AGENT_INVOCATION_MAILBOX_STATUSES } from "./agent-invocations-CxKldAeB.js";
|
|
4
|
-
import "./executor-
|
|
5
|
-
import { p as credentialContextSchema } from "./registry-
|
|
4
|
+
import "./executor-VYrx_K4w.js";
|
|
5
|
+
import { p as credentialContextSchema } from "./registry-FQutO926.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
8
8
|
import { and, asc, count, countDistinct, desc, eq, inArray, lt, ne, or, sql } from "drizzle-orm";
|
|
@@ -161,7 +161,11 @@ interface ConversationStore {
|
|
|
161
161
|
/** Source normalized to a stable session locator; set-once when absent. */
|
|
162
162
|
sessionSource?: Source;
|
|
163
163
|
title?: string;
|
|
164
|
-
/**
|
|
164
|
+
/**
|
|
165
|
+
* Current visibility from its owner, such as a Slack event channel type. It
|
|
166
|
+
* replaces the visibility of the shared Destination row. Omit it for saved
|
|
167
|
+
* values, such as visibility captured when an Automation was created.
|
|
168
|
+
*/
|
|
165
169
|
visibility?: ConversationPrivacy;
|
|
166
170
|
}): Promise<void>;
|
|
167
171
|
/**
|
|
@@ -184,7 +188,11 @@ interface ConversationStore {
|
|
|
184
188
|
source?: ConversationSource;
|
|
185
189
|
title?: string;
|
|
186
190
|
updatedAtMs: number;
|
|
187
|
-
/**
|
|
191
|
+
/**
|
|
192
|
+
* Current visibility from its owner, such as a Slack event channel type. It
|
|
193
|
+
* replaces the visibility of the shared Destination row. Omit it for saved
|
|
194
|
+
* values, such as visibility captured when an Automation was created.
|
|
195
|
+
*/
|
|
188
196
|
visibility?: ConversationPrivacy;
|
|
189
197
|
}): Promise<void>;
|
|
190
198
|
listByActivity(args?: {
|