@sentry/junior 0.261.0 → 0.262.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/{adapter-Bx_1B2De.js → adapter-t-Y9RHML.js} +2 -2
- package/dist/{admin-BAbbVgVc.js → admin-BCqeFndQ.js} +1 -1
- package/dist/{agent-hooks-ghyZZQqB.js → agent-hooks-9q2zdKHL.js} +63 -14
- package/dist/{agent-invocations-Qfz7dWgU.js → agent-invocations-CxKldAeB.js} +1 -0
- package/dist/{agent-runner-g110-xgg.js → agent-runner-Cx6NO5LE.js} +112 -35
- package/dist/api/schema.js +1 -1
- package/dist/api.js +31 -28
- package/dist/{app-VCiPQ65Q.d.ts → app-Bo0kB987.d.ts} +1 -1
- package/dist/app.d.ts +1 -1
- package/dist/app.js +52 -59
- package/dist/{assistant-reply-CQcMaWNL.js → assistant-reply-B2qUBAwL.js} +1 -1
- package/dist/{briefs-CKcfrIQL.js → briefs-DsGH2Vym.js} +2 -2
- package/dist/{catalog-runtime-cd60vzAB.js → catalog-runtime-CfwKT0sn.js} +1 -1
- package/dist/cli/chat.js +15 -17
- package/dist/cli/check.js +3 -3
- 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.js +3 -3
- package/dist/{client-2i0JJpoC.js → client-DpfjZgNk.js} +2 -2
- package/dist/{config-C9qM41O0.js → config-BiCtNiu5.js} +2 -2
- package/dist/{connections-DrtTrwkp.js → connections-D9IKbfk-.js} +10 -10
- package/dist/{conversation-privacy-1iTiFX1O.js → conversation-privacy-CBUI0frD.js} +1 -1
- package/dist/{credential-sync-wKNQ1dYc.js → credential-sync-Bu6ZOuOk.js} +14 -14
- package/dist/{executor-Rimyj8HZ.js → executor-O8xqLDN6.js} +4 -3
- package/dist/{images-D1JggcVY.js → images-AM1exvU0.js} +2 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-BjQdSqA3.js → job-queue-DmarAQGI.js} +1 -1
- package/dist/{logging-BLTa7R7f.js → logging-dZN1Bvtu.js} +1 -1
- package/dist/{message-DAeP5WWW.js → message-C_g2S8kv.js} +3 -3
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-BAy1hhF1.js → oauth-callback-server-DvvOvr4q.js} +2 -2
- package/dist/{profile-CthM2qFM.js → profile-BP2N5uDY.js} +13 -6
- package/dist/{registry-BnSaArNb.js → registry-BUje_knT.js} +1 -1
- package/dist/{resolve-B5eLRl0v.js → resolve-DftZiYNU.js} +4 -4
- package/dist/{result-Cvm0GZCv.js → result-CRMRT9CE.js} +16 -11
- package/dist/{runner-D-pUzHbU.js → runner-4mmL2Pt1.js} +10 -10
- package/dist/{sandbox-egress-signals-mvwGV7rl.js → sandbox-egress-signals-1ysv0z5A.js} +1 -1
- package/dist/{schema-OzL8Zw4H.js → schema-XuTZukI9.js} +1 -1
- package/dist/{service-account-DWxvpSfd.js → service-account-B1sH3P7d.js} +3 -3
- package/dist/{service-account-Ch1uIpnR.js → service-account-Del2I_x3.js} +3 -3
- package/dist/{session-stop-Boj_zpTa.js → session-stop-ZuyOHxdK.js} +11 -11
- package/dist/{skills-BpdYCfFt.js → skills-lPeepA2b.js} +2 -2
- package/dist/{spawn-h1DJMQTf.js → spawn-DovpdlrW.js} +3 -2
- package/dist/{store-B6KqcdCQ.js → store-dZynGGFW.js} +6 -6
- package/dist/{task-queue-BaDwKSYv.js → task-queue-CmMCtzHO.js} +3 -3
- package/dist/{task-runner-BAX5li9a.js → task-runner-BRgJ5e0s.js} +19 -11
- package/dist/{tasks-uCfmlWga.js → tasks-Bh2qYaed.js} +15 -24
- package/dist/{thread-state-BJHVIz8G.js → thread-state-DA37FsAT.js} +5 -5
- package/dist/{turn-failure-response-CCC76P6-.js → turn-failure-response-BLcscQ-f.js} +7 -7
- package/dist/{turn-lifecycle-pHSESVR9.js → turn-lifecycle-D0e887FM.js} +1 -1
- package/dist/{turn-session-routing-BIKJZaiw.js → turn-session-routing-DdbSbJS6.js} +1 -1
- package/dist/{validation-B9KL_5Wc.js → validation-DtcovXqq.js} +1 -1
- package/dist/{version-CN9BXMW_.js → version-JcDaJ75p.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-C5xFaYVi.js → viewer-oMTUVAcR.js} +4 -4
- package/dist/{web-input-D6eqfXYd.js → web-input-FQ5wgqYn.js} +26 -26
- package/dist/{work-C-ecZAme.js → work-BiIKfayl.js} +40 -10
- package/dist/{worker-BpYDqiOf.js → worker-BZ7l75NM.js} +5 -5
- package/migrations/0062_plugin_report_index.sql +20 -0
- package/migrations/0063_agent_invocation_type.sql +1 -0
- package/migrations/meta/0062_snapshot.json +3499 -0
- package/migrations/meta/0063_snapshot.json +3505 -0
- package/migrations/meta/_journal.json +14 -0
- package/package.json +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { f as logException } from "./logging-
|
|
1
|
+
import { f as logException } from "./logging-dZN1Bvtu.js";
|
|
2
2
|
import { g as startSpanManual } from "./sentry-BBUlHih9.js";
|
|
3
|
-
import "./config-
|
|
4
|
-
import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, f as timestamptz, i as juniorAgentBindings, l as juniorUsers, s as juniorConversations } from "./agent-invocations-
|
|
3
|
+
import "./config-BiCtNiu5.js";
|
|
4
|
+
import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, f as timestamptz, i as juniorAgentBindings, l as juniorUsers, s as juniorConversations } from "./agent-invocations-CxKldAeB.js";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { sql } from "drizzle-orm";
|
|
7
7
|
import { bigint, boolean, check, date, doublePrecision, foreignKey, index, integer, jsonb, pgTable, primaryKey, text, uniqueIndex, uuid } from "drizzle-orm/pg-core";
|
|
@@ -154,6 +154,7 @@ const juniorConversationEvents = pgTable("junior_conversation_events", {
|
|
|
154
154
|
}),
|
|
155
155
|
index("junior_conversation_events_history_version_idx").on(table.conversationId, table.historyVersion, table.seq),
|
|
156
156
|
index("junior_conversation_events_type_idx").on(table.conversationId, table.type, table.seq),
|
|
157
|
+
index("junior_conversation_events_plugin_report_idx").on(sql`(${table.payload}->>'namespace')`, sql`(${table.payload}->>'name')`, table.createdAt).where(sql`${table.type} = 'structured_event'`),
|
|
157
158
|
index("junior_conversation_events_actor_identity_idx").on(table.actorIdentityId, table.conversationId, table.seq),
|
|
158
159
|
index("junior_conversation_events_message_search_idx").using("gin", sql`to_tsvector('english', ${table.payload}->>'text')`).where(sql`${table.type} = 'message'`),
|
|
159
160
|
uniqueIndex("junior_conversation_events_idempotency_idx").on(table.conversationId, table.idempotencyKey)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { f as getSqlExecutor } from "./viewer-
|
|
3
|
-
import { S as readLiveAttachment, w as storeAttachment } from "./agent-runner-
|
|
2
|
+
import { f as getSqlExecutor } from "./viewer-oMTUVAcR.js";
|
|
3
|
+
import { S as readLiveAttachment, w as storeAttachment } from "./agent-runner-Cx6NO5LE.js";
|
|
4
4
|
import { H as detectImageMediaType } from "./conversation-CvuKJ3tA.js";
|
|
5
5
|
// src/chat/attachments/images.ts
|
|
6
6
|
var images_exports = /* @__PURE__ */ __exportAll({
|
package/dist/instrumentation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as getDeploymentTelemetryAttributes, P as getDeploymentServiceVersion } from "./logging-
|
|
1
|
+
import { F as getDeploymentTelemetryAttributes, P as getDeploymentServiceVersion } from "./logging-dZN1Bvtu.js";
|
|
2
2
|
import { _ as vercelAIIntegration, a as getClient, b as withStreamedSpan, c as init, o as getGlobalScope } from "./sentry-BBUlHih9.js";
|
|
3
|
-
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-
|
|
3
|
+
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-CBUI0frD.js";
|
|
4
4
|
import { t as consumePrivateTraceResultMarker } from "./private-trace-result-CE7_lEdq.js";
|
|
5
5
|
// src/chat/sentry-payload-filter.ts
|
|
6
6
|
const PAYLOAD_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
1
|
+
import { i as getChatConfig } from "./config-BiCtNiu5.js";
|
|
2
2
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { 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, y as withScope } from "./sentry-BBUlHih9.js";
|
|
2
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { t as JUNIOR_VERSION } from "./version-JcDaJ75p.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";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as enqueueAgentMessageToParent } from "./result-
|
|
4
|
-
import { r as enqueueAgentInvocation } from "./work-
|
|
2
|
+
import { Dt as toolInvocationDestination, Et as actorFromRun, X as getActiveAgentInvocationForConversation, Y as findChildAgentConversationId, gt as PARENT_AGENT_TARGET, ht as AgentMessageTargetError, q as createAgentInvocationForMessage } from "./agent-runner-Cx6NO5LE.js";
|
|
3
|
+
import { n as enqueueAgentMessageToParent } from "./result-CRMRT9CE.js";
|
|
4
|
+
import { r as enqueueAgentInvocation } from "./work-BiIKfayl.js";
|
|
5
5
|
// src/chat/agent-invocations/message.ts
|
|
6
6
|
var message_exports = /* @__PURE__ */ __exportAll({ bindMessageAgent: () => bindMessageAgent });
|
|
7
7
|
/**
|
package/dist/nitro.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as JuniorDashboardOptions } from "./app-
|
|
1
|
+
import { r as JuniorDashboardOptions } from "./app-Bo0kB987.js";
|
|
2
2
|
import { n as JuniorPluginSet } from "./plugins-B_0Cr0MO.js";
|
|
3
3
|
export type JuniorNitroDashboardOptions = JuniorDashboardOptions;
|
|
4
4
|
export interface JuniorPluginModuleReference {
|
package/dist/nitro.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as JUNIOR_RETENTION_CRON_SCHEDULE, D as JUNIOR_HEARTBEAT_CRON_SCHEDULE, E as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, M as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_HEARTBEAT_ROUTE, j as JUNIOR_RETENTION_ROUTE, k as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE } from "./logging-
|
|
1
|
+
import { A as JUNIOR_RETENTION_CRON_SCHEDULE, D as JUNIOR_HEARTBEAT_CRON_SCHEDULE, E as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, M as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_HEARTBEAT_ROUTE, j as JUNIOR_RETENTION_ROUTE, k as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE } from "./logging-dZN1Bvtu.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-DmarAQGI.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-CmMCtzHO.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 {
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
1
|
+
import { yn as createUserTokenStore } from "./tasks-Bh2qYaed.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-Bu6ZOuOk.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,6 +1,6 @@
|
|
|
1
|
-
import { C as toOptionalTrimmed } from "./client-
|
|
2
|
-
import { b as setSpanStatus, y as setSpanAttributes } from "./logging-
|
|
3
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
1
|
+
import { C as toOptionalTrimmed } from "./client-DpfjZgNk.js";
|
|
2
|
+
import { b as setSpanStatus, y as setSpanAttributes } from "./logging-dZN1Bvtu.js";
|
|
3
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-CfwKT0sn.js";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
// src/chat/sandbox/paths.ts
|
|
6
6
|
function normalizeWorkspaceRoot(input) {
|
|
@@ -13,6 +13,13 @@ const SANDBOX_WORKSPACE_ROOT = normalizeWorkspaceRoot(process.env.VERCEL_SANDBOX
|
|
|
13
13
|
const SANDBOX_REPOS_ROOT = `${SANDBOX_WORKSPACE_ROOT}/repos`;
|
|
14
14
|
const SANDBOX_SKILLS_ROOT = `${SANDBOX_WORKSPACE_ROOT}/skills`;
|
|
15
15
|
const SANDBOX_DATA_ROOT = `${SANDBOX_WORKSPACE_ROOT}/data`;
|
|
16
|
+
/**
|
|
17
|
+
* PATH for sandbox commands. Plugin runtime binaries come last so they never
|
|
18
|
+
* shadow repo or Workspace tools with the same name. Repo tools often start
|
|
19
|
+
* child processes through PATH, so only PATH order can protect them. Plugin
|
|
20
|
+
* binaries stay reachable by name or by absolute path.
|
|
21
|
+
*/
|
|
22
|
+
const SANDBOX_COMMAND_PATH = `$PATH:${`${SANDBOX_WORKSPACE_ROOT}/.junior/bin`}`;
|
|
16
23
|
function sandboxSkillDir(skillName) {
|
|
17
24
|
return `${SANDBOX_SKILLS_ROOT}/${skillName}`;
|
|
18
25
|
}
|
|
@@ -51,7 +58,7 @@ function shellQuote(value) {
|
|
|
51
58
|
}
|
|
52
59
|
function buildEnvExports(options) {
|
|
53
60
|
const lines = [];
|
|
54
|
-
if (options.
|
|
61
|
+
if (options.path) lines.push(`export PATH="${options.path}"`);
|
|
55
62
|
for (const [key, value] of Object.entries(NON_INTERACTIVE_ENV)) lines.push(`export ${key}=${shellQuote(value)}`);
|
|
56
63
|
for (const [key, value] of Object.entries(options.env ?? {})) lines.push(`export ${key}=${shellQuote(value)}`);
|
|
57
64
|
return lines;
|
|
@@ -74,7 +81,7 @@ function buildNonInteractiveCommand(input) {
|
|
|
74
81
|
cmd: "bash",
|
|
75
82
|
args: [input.login ? "-lc" : "-c", buildNonInteractiveShellScript(buildCommandScript(input), {
|
|
76
83
|
env: input.env,
|
|
77
|
-
|
|
84
|
+
path: input.path
|
|
78
85
|
})]
|
|
79
86
|
};
|
|
80
87
|
}
|
|
@@ -572,4 +579,4 @@ function isStale(profile, createdAtMs) {
|
|
|
572
579
|
const maxAgeMs = floatingMaxAgeMs();
|
|
573
580
|
return maxAgeMs === 0 || Date.now() - createdAtMs > maxAgeMs;
|
|
574
581
|
}
|
|
575
|
-
export {
|
|
582
|
+
export { sandboxSkillPathResolution as A, SANDBOX_COMMAND_PATH as C, SANDBOX_WORKSPACE_ROOT as D, SANDBOX_SKILLS_ROOT as E, sandboxSkillDir as O, runNonInteractiveCommand as S, SANDBOX_REPOS_ROOT as T, workspaceSnapshotNotReadyUserMessage as _, isAbortError as a, buildCommandScript as b, isSandboxCommandStreamInterruptedError as c, isSnapshottingError as d, throwSandboxOperationError as f, isWorkspaceSnapshotNotReadyError as g, getWorkspaceSnapshotNotReadyError as h, ensureDockerDaemon as i, sandboxSkillFile as k, isSandboxMissingError as l, WorkspaceSnapshotNotReadyError as m, hash as n, isAlreadyExistsError as o, wrapSandboxSetupError as p, isStale as r, isSandboxApiTransientError as s, create as t, isSandboxUnavailableError as u, getVercelSandboxCredentials as v, SANDBOX_DATA_ROOT as w, buildNonInteractiveShellScript as x, sleep as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-
|
|
1
|
+
import { m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-dZN1Bvtu.js";
|
|
2
2
|
import { a as isUserActor, o as parseActorUserId } from "./actor-tlxzqaRe.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";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as withSpan, y as setSpanAttributes } from "./logging-
|
|
2
|
-
import { r as getStateAdapter } from "./adapter-
|
|
3
|
-
import {
|
|
1
|
+
import { T as withSpan, y as setSpanAttributes } from "./logging-dZN1Bvtu.js";
|
|
2
|
+
import { r as getStateAdapter } from "./adapter-t-Y9RHML.js";
|
|
3
|
+
import { C as SANDBOX_COMMAND_PATH, D as SANDBOX_WORKSPACE_ROOT, S as runNonInteractiveCommand, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, y as sleep } from "./profile-BP2N5uDY.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { FileSystem, Sandbox } from "@vercel/sandbox";
|
|
6
6
|
// src/chat/sandbox/resources.ts
|
|
@@ -216,7 +216,7 @@ async function postinstall(sandbox, commands, signal, timeoutMs) {
|
|
|
216
216
|
cmd: command.cmd,
|
|
217
217
|
args: command.args,
|
|
218
218
|
login: true,
|
|
219
|
-
|
|
219
|
+
path: SANDBOX_COMMAND_PATH,
|
|
220
220
|
signal,
|
|
221
221
|
timeoutMs,
|
|
222
222
|
...command.sudo !== void 0 ? { sudo: command.sudo } : void 0
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { Ft as listTurnSummaries, Pt as getTurnRecord } from "./tasks-
|
|
2
|
+
import { Ft as listTurnSummaries, Pt as getTurnRecord } from "./tasks-Bh2qYaed.js";
|
|
3
3
|
import { t as createActor } from "./actor-tlxzqaRe.js";
|
|
4
|
-
import { f as credentialContextForActor } from "./registry-
|
|
5
|
-
import { $ as
|
|
4
|
+
import { f as credentialContextForActor } from "./registry-BUje_knT.js";
|
|
5
|
+
import { $ as getAgentInvocationIdForMessage, J as createAgentInvocationFromLatest, Q as getAgentInvocationIdForEvents, W as listUnreportedSiblingAgents, Z as getAgentInvocation, at as getLatestAgentInvocationForConversation, et as getAgentInvocationIdForResult, nt as getAgentInvocationResultMessageId, ot as isTerminalAgentInvocation, ut as markAgentInvocationParentMailboxAppended } from "./agent-runner-Cx6NO5LE.js";
|
|
6
6
|
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-DeVax2qO.js";
|
|
7
|
-
import { a as EVENT_WAIT_MS, c as isEventMailboxMetadata, l as renderEventBatchText, u as timerWatchCredentialSubject } from "./session-stop-
|
|
8
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
9
|
-
import { r as enqueueAgentInvocation } from "./work-
|
|
7
|
+
import { a as EVENT_WAIT_MS, c as isEventMailboxMetadata, l as renderEventBatchText, u as timerWatchCredentialSubject } from "./session-stop-ZuyOHxdK.js";
|
|
8
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-dZynGGFW.js";
|
|
9
|
+
import { r as enqueueAgentInvocation } from "./work-BiIKfayl.js";
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
import { createEventSource, createLocalSource, createWebSource } from "@sentry/junior-plugin-api";
|
|
12
12
|
// src/chat/conversations/web-mailbox.ts
|
|
@@ -223,7 +223,10 @@ const OUTPUT_LABEL = {
|
|
|
223
223
|
failed: "Error",
|
|
224
224
|
stopped: "Error"
|
|
225
225
|
};
|
|
226
|
-
function
|
|
226
|
+
function siblingLabel(sibling) {
|
|
227
|
+
return sibling.agentName ? `"${sibling.agentName}"` : sibling.title ?? sibling.childConversationId;
|
|
228
|
+
}
|
|
229
|
+
function renderResultInput(invocation, summary, openSiblings) {
|
|
227
230
|
const output = (invocation.status === "completed" ? invocation.result : invocation.errorMessage).trim().slice(0, AGENT_INVOCATION_RESULT_MAX_LENGTH);
|
|
228
231
|
const outputLabel = OUTPUT_LABEL[invocation.status];
|
|
229
232
|
return [
|
|
@@ -238,11 +241,12 @@ function renderResultInput(invocation, summary) {
|
|
|
238
241
|
`${outputLabel}:`,
|
|
239
242
|
output || "(empty)",
|
|
240
243
|
"",
|
|
241
|
-
RESULT_NEXT_STEP[invocation.status]
|
|
244
|
+
RESULT_NEXT_STEP[invocation.status],
|
|
245
|
+
...openSiblings.length > 0 ? ["", `Other child agents that you started have not reported yet: ${openSiblings.map(siblingLabel).join(", ")}. Their results arrive later. Unless this result is useful to the user alone, wait for them before you report.`] : []
|
|
242
246
|
].join("\n");
|
|
243
247
|
}
|
|
244
248
|
/** Build the parent Inbound message for one terminal agent invocation. */
|
|
245
|
-
function buildResultInboundMessage(invocation, nowMs) {
|
|
249
|
+
function buildResultInboundMessage(invocation, nowMs, openSiblings) {
|
|
246
250
|
const summary = trustedSummary(invocation, childAgentLabel(invocation));
|
|
247
251
|
const metadata = {
|
|
248
252
|
kind: "event",
|
|
@@ -262,7 +266,7 @@ function buildResultInboundMessage(invocation, nowMs) {
|
|
|
262
266
|
input: {
|
|
263
267
|
authorId: resultAuthorId(invocation.actor),
|
|
264
268
|
metadata,
|
|
265
|
-
text: renderResultInput(invocation, summary)
|
|
269
|
+
text: renderResultInput(invocation, summary, openSiblings)
|
|
266
270
|
},
|
|
267
271
|
receivedAtMs: nowMs,
|
|
268
272
|
source: "event"
|
|
@@ -280,8 +284,9 @@ function buildResultInboundMessage(invocation, nowMs) {
|
|
|
280
284
|
async function enqueueAgentInvocationResult(invocation, options) {
|
|
281
285
|
if (invocation.parentMailboxStatus !== "pending") return;
|
|
282
286
|
const nowMs = options.nowMs ?? Date.now();
|
|
287
|
+
const openSiblings = await listUnreportedSiblingAgents(invocation.parentConversationId, invocation.childConversationId);
|
|
283
288
|
await appendAndEnqueueInboundMessage({
|
|
284
|
-
message: buildResultInboundMessage(invocation, nowMs),
|
|
289
|
+
message: buildResultInboundMessage(invocation, nowMs, openSiblings),
|
|
285
290
|
queue: options.queue,
|
|
286
291
|
queueDelayMs: EVENT_WAIT_MS,
|
|
287
292
|
state: options.state
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { At as saveTurnCheckpoint, I as loadProjection, Q as persistConversationMessages, U as recordAuthorizationCompleted, Wt as persistWithRetry, Z as hydrateConversationMessages, dt as markConversationMessage, ft as normalizeConversationText, ht as upsertConversationMessage, j as commitAcceptedReply, ot as buildConversationContext, pt as recordDeliveredAssistantMessage, yt as authorizationId } from "./tasks-
|
|
2
|
-
import { f as logException, w as withLogContext, x as setTags } from "./logging-
|
|
3
|
-
import { c as getConversationEventStore, u as getConversationStore } from "./viewer-
|
|
4
|
-
import { f as credentialContextForActor } from "./registry-
|
|
5
|
-
import {
|
|
1
|
+
import { At as saveTurnCheckpoint, I as loadProjection, Q as persistConversationMessages, U as recordAuthorizationCompleted, Wt as persistWithRetry, Z as hydrateConversationMessages, dt as markConversationMessage, ft as normalizeConversationText, ht as upsertConversationMessage, j as commitAcceptedReply, ot as buildConversationContext, pt as recordDeliveredAssistantMessage, yt as authorizationId } from "./tasks-Bh2qYaed.js";
|
|
2
|
+
import { f as logException, w as withLogContext, x as setTags } from "./logging-dZN1Bvtu.js";
|
|
3
|
+
import { c as getConversationEventStore, u as getConversationStore } from "./viewer-oMTUVAcR.js";
|
|
4
|
+
import { f as credentialContextForActor } from "./registry-BUje_knT.js";
|
|
5
|
+
import { Bt as startActiveTurn, zt as markTurnFailed } from "./agent-runner-Cx6NO5LE.js";
|
|
6
6
|
import { P as messageCardText } from "./conversation-CvuKJ3tA.js";
|
|
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-
|
|
7
|
+
import { n as getAssistantReplyText } from "./assistant-reply-B2qUBAwL.js";
|
|
8
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-BRgJ5e0s.js";
|
|
9
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-D0e887FM.js";
|
|
10
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-DA37FsAT.js";
|
|
11
|
+
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-BLcscQ-f.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 { jn as sandboxEgressSignalsResponseSchema } from "./tasks-Bh2qYaed.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,4 +1,4 @@
|
|
|
1
|
-
import { r as AGENT_INVOCATION_STATUSES, u as juniorDestinationKindSchema } from "./agent-invocations-
|
|
1
|
+
import { r as AGENT_INVOCATION_STATUSES, u as juniorDestinationKindSchema } from "./agent-invocations-CxKldAeB.js";
|
|
2
2
|
import { E as conversationUsageSchema, T as conversationSummaryReportSchema, j as conversationChildAgentTotalsSchema, l as conversationAuxiliaryCostsSchema, n as actorIdentitySchema } from "./conversation-CvuKJ3tA.js";
|
|
3
3
|
import "./automation-DrpcA-SX.js";
|
|
4
4
|
import { a as fillUtcHours, c as sumUtcHoursIntoSixHours, i as fillUtcDays } from "./web-message-id-CJSUiksE.js";
|
|
@@ -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-CfwKT0sn.js";
|
|
2
|
+
import { t as disconnectStateAdapter } from "./adapter-t-Y9RHML.js";
|
|
3
|
+
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-Del2I_x3.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 { m as logWarn, y as setSpanAttributes, z as isRecord } from "./logging-
|
|
2
|
-
import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-
|
|
3
|
-
import { i as MUTATION_LOCK_TTL_MS, o as fenceLock, r as getStateAdapter, s as withLock } from "./adapter-
|
|
1
|
+
import { m as logWarn, y as setSpanAttributes, z as isRecord } from "./logging-dZN1Bvtu.js";
|
|
2
|
+
import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-BUje_knT.js";
|
|
3
|
+
import { i as MUTATION_LOCK_TTL_MS, o as fenceLock, r as getStateAdapter, s as withLock } from "./adapter-t-Y9RHML.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,16 +1,16 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { $t as isToolResultError, A as ToolInputError,
|
|
3
|
-
import { f as logException, m as logWarn, p as logInfo } from "./logging-
|
|
4
|
-
import { n as botConfig } from "./config-
|
|
5
|
-
import { f as getSqlExecutor, u as getConversationStore } from "./viewer-
|
|
6
|
-
import { s as juniorConversations } from "./agent-invocations-
|
|
7
|
-
import "./executor-
|
|
8
|
-
import { h as credentialSubjectSchema } from "./registry-
|
|
9
|
-
import { gt as JUNIOR_THREAD_STATE_TTL_MS, rt as verifyTimerWatchCredentialSubject, u as getPlugins } from "./agent-hooks-
|
|
2
|
+
import { $t as isToolResultError, A as ToolInputError, Kn as postSlackMessage, Zt as isAssistantMessage, en as isToolResultMessage, tn as normalizeToolNameFromResult } from "./tasks-Bh2qYaed.js";
|
|
3
|
+
import { f as logException, m as logWarn, p as logInfo } from "./logging-dZN1Bvtu.js";
|
|
4
|
+
import { n as botConfig } from "./config-BiCtNiu5.js";
|
|
5
|
+
import { f as getSqlExecutor, u as getConversationStore } from "./viewer-oMTUVAcR.js";
|
|
6
|
+
import { s as juniorConversations } from "./agent-invocations-CxKldAeB.js";
|
|
7
|
+
import "./executor-O8xqLDN6.js";
|
|
8
|
+
import { h as credentialSubjectSchema } from "./registry-BUje_knT.js";
|
|
9
|
+
import { gt as JUNIOR_THREAD_STATE_TTL_MS, rt as verifyTimerWatchCredentialSubject, u as getPlugins } from "./agent-hooks-9q2zdKHL.js";
|
|
10
|
+
import { r as getStateAdapter } from "./adapter-t-Y9RHML.js";
|
|
10
11
|
import { r as EVENT_AUTHOR_ID } from "./prompt-DeVax2qO.js";
|
|
11
|
-
import { r as
|
|
12
|
-
import { r as
|
|
13
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-B6KqcdCQ.js";
|
|
12
|
+
import { r as sanitizeAssistantText } from "./assistant-reply-B2qUBAwL.js";
|
|
13
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-dZynGGFW.js";
|
|
14
14
|
import { z } from "zod";
|
|
15
15
|
import { eq, inArray } from "drizzle-orm";
|
|
16
16
|
import { eventMatchFieldsSchema, eventMatchSchema, normalizeEventIdentifier, objectTypeSchema } from "@sentry/junior-plugin-api";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { m as logWarn } from "./logging-
|
|
2
|
+
import { m as logWarn } from "./logging-dZN1Bvtu.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-CfwKT0sn.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 toolInvocationDestination, Et as actorFromRun } from "./agent-runner-Cx6NO5LE.js";
|
|
3
|
+
import { n as createAndEnqueueAgentInvocation } from "./work-BiIKfayl.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. */
|
|
@@ -13,6 +13,7 @@ function bindSpawnAgent(run, options) {
|
|
|
13
13
|
return { childConversationId: (await createAndEnqueueAgentInvocation({
|
|
14
14
|
actor,
|
|
15
15
|
...input.name ? { agentName: input.name } : void 0,
|
|
16
|
+
...input.agentType ? { agentType: input.agentType } : void 0,
|
|
16
17
|
...run.credentialContext ? { credentialContext: run.credentialContext } : void 0,
|
|
17
18
|
destination: toolInvocationDestination(run),
|
|
18
19
|
idempotencyKey: `${run.turnId}:${call.toolCallId}`,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { B as toOptionalNumber, V as toOptionalString, z as isRecord } from "./logging-
|
|
2
|
-
import { i as getChatConfig } from "./config-
|
|
1
|
+
import { B as toOptionalNumber, V as toOptionalString, z as isRecord } from "./logging-dZN1Bvtu.js";
|
|
2
|
+
import { i as getChatConfig } from "./config-BiCtNiu5.js";
|
|
3
3
|
import { s as parseStoredSlackActor } from "./actor-tlxzqaRe.js";
|
|
4
|
-
import { B as sameDestination, R as parseDestination, u as getConversationStore } from "./viewer-
|
|
5
|
-
import { gt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-
|
|
6
|
-
import { n as getDefaultRedisStateAdapterFor, r as getStateAdapter } from "./adapter-
|
|
7
|
-
import "./job-queue-
|
|
4
|
+
import { B as sameDestination, R as parseDestination, u as getConversationStore } from "./viewer-oMTUVAcR.js";
|
|
5
|
+
import { gt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-9q2zdKHL.js";
|
|
6
|
+
import { n as getDefaultRedisStateAdapterFor, r as getStateAdapter } from "./adapter-t-Y9RHML.js";
|
|
7
|
+
import "./job-queue-DmarAQGI.js";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { randomUUID } from "node:crypto";
|
|
10
10
|
import { destinationSchema } from "@sentry/junior-plugin-api";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as logWarn } from "./logging-
|
|
2
|
-
import { c as QUEUE_SIGNATURE_MAX_AGE_MS, d as createVercelQueueClient, l as signQueueMessage, p as runWithTurnRequestDeadline, u as verifyQueueMessage } from "./job-queue-
|
|
1
|
+
import { m as logWarn } from "./logging-dZN1Bvtu.js";
|
|
2
|
+
import { c as QUEUE_SIGNATURE_MAX_AGE_MS, d as createVercelQueueClient, l as signQueueMessage, p as runWithTurnRequestDeadline, u as verifyQueueMessage } from "./job-queue-DmarAQGI.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
import { handleCallback, registerDevConsumer } from "@vercel/queue";
|
|
@@ -114,7 +114,7 @@ function pluginTaskCallback() {
|
|
|
114
114
|
maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
|
|
115
115
|
onRejected: logPluginTaskQueueMessageRejected,
|
|
116
116
|
run: async (message) => {
|
|
117
|
-
const { processPluginTask } = await import("./task-runner-
|
|
117
|
+
const { processPluginTask } = await import("./task-runner-BRgJ5e0s.js").then((n) => n.r);
|
|
118
118
|
await processPluginTask(message);
|
|
119
119
|
},
|
|
120
120
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { $t as isToolResultError,
|
|
3
|
-
import { g as runBestEffort, m as logWarn } from "./logging-
|
|
2
|
+
import { $t as isToolResultError, Gn as openSlackDirectMessage, Kn as postSlackMessage, Kt as getPiMessageRole, Ln as escapeSlackMrkdwnText, Pt as getTurnRecord, Rn as formatSlackLink, Xt as instructionTextForProjection, Z as hydrateConversationMessages, en as isToolResultMessage, i as readScheduledAutomation, l as blockEventAutomation, m as getEventAutomation, rn as stripRuntimeTurnContext, rt as fallbackShortTitle, tn as normalizeToolNameFromResult } from "./tasks-Bh2qYaed.js";
|
|
3
|
+
import { g as runBestEffort, m as logWarn } from "./logging-dZN1Bvtu.js";
|
|
4
4
|
import { g as parseSlackMessageTs } from "./actor-tlxzqaRe.js";
|
|
5
|
-
import { T as agentTurnTotalTokens, d as getDb, r as readActorIdentity, u as getConversationStore, w as agentTurnCostUsd } from "./viewer-
|
|
6
|
-
import { s as juniorConversations } from "./agent-invocations-
|
|
7
|
-
import { a as juniorAutomationRuns, s as juniorAutomations } from "./executor-
|
|
5
|
+
import { T as agentTurnTotalTokens, d as getDb, r as readActorIdentity, u as getConversationStore, w as agentTurnCostUsd } from "./viewer-oMTUVAcR.js";
|
|
6
|
+
import { s as juniorConversations } from "./agent-invocations-CxKldAeB.js";
|
|
7
|
+
import { a as juniorAutomationRuns, s as juniorAutomations } from "./executor-O8xqLDN6.js";
|
|
8
8
|
import { m as sameActorIdentity } from "./history-AY8rs-FR.js";
|
|
9
|
-
import { h as credentialSubjectSchema } from "./registry-
|
|
10
|
-
import { Ct as createPluginModel, Pt as createPluginConversationEvents, St as createPluginEmbedder, gt as JUNIOR_THREAD_STATE_TTL_MS, p as coreTaskRegistrations, u as getPlugins, wt as createPluginLogger, xt as createPluginState, yt as getDashboardTaskLink } from "./agent-hooks-
|
|
11
|
-
import { r as getStateAdapter } from "./adapter-
|
|
12
|
-
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
13
|
-
import { t as resolveConversationRouting } from "./turn-session-routing-
|
|
14
|
-
import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-
|
|
9
|
+
import { h as credentialSubjectSchema } from "./registry-BUje_knT.js";
|
|
10
|
+
import { Ct as createPluginModel, Pt as createPluginConversationEvents, St as createPluginEmbedder, Xt as createPluginCache, gt as JUNIOR_THREAD_STATE_TTL_MS, p as coreTaskRegistrations, u as getPlugins, wt as createPluginLogger, xt as createPluginState, yt as getDashboardTaskLink } from "./agent-hooks-9q2zdKHL.js";
|
|
11
|
+
import { r as getStateAdapter } from "./adapter-t-Y9RHML.js";
|
|
12
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-DA37FsAT.js";
|
|
13
|
+
import { t as resolveConversationRouting } from "./turn-session-routing-DdbSbJS6.js";
|
|
14
|
+
import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-CmMCtzHO.js";
|
|
15
15
|
import { z } from "zod";
|
|
16
16
|
import { createHash } from "node:crypto";
|
|
17
17
|
import { and, asc, count, desc, eq, gte, inArray, isNotNull, lte, max, sql } from "drizzle-orm";
|
|
@@ -784,6 +784,13 @@ async function getPluginDispatchProjection(args) {
|
|
|
784
784
|
return toDispatchProjection(record);
|
|
785
785
|
}
|
|
786
786
|
// src/chat/plugins/task-runner.ts
|
|
787
|
+
/**
|
|
788
|
+
* Plugin background-task orchestration.
|
|
789
|
+
*
|
|
790
|
+
* Core schedules tasks from completed sessions and exposes plugins only a
|
|
791
|
+
* bounded run projection rather than live runtime internals or queue
|
|
792
|
+
* payloads.
|
|
793
|
+
*/
|
|
787
794
|
var task_runner_exports = /* @__PURE__ */ __exportAll({
|
|
788
795
|
processPluginTask: () => processPluginTask,
|
|
789
796
|
scheduleSessionCompletedPluginTasks: () => scheduleSessionCompletedPluginTasks
|
|
@@ -991,6 +998,7 @@ function taskPluginContext(plugin, message, options = {}) {
|
|
|
991
998
|
model: createPluginModel(pluginName, plugin.model, { signal: options.signal }),
|
|
992
999
|
name: message.name,
|
|
993
1000
|
plugin: { name: pluginName },
|
|
1001
|
+
cache: createPluginCache(pluginName),
|
|
994
1002
|
run: { async load() {
|
|
995
1003
|
return await loadPluginRun(sessionParams);
|
|
996
1004
|
} },
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { V as toOptionalString, f as logException, m as logWarn, o as getActiveTraceId, p as logInfo, s as getLogContextAttributes, t as buildTurnFailureResponse, u as logAudit, y as setSpanAttributes, z as isRecord } from "./logging-BLTa7R7f.js";
|
|
1
|
+
import { a as completeText, f as unwrapCurrentInstruction, p as escapeXml, s as resolveGatewayModel, y as isProviderRetryError } from "./client-DpfjZgNk.js";
|
|
2
|
+
import { V as toOptionalString, f as logException, m as logWarn, o as getActiveTraceId, p as logInfo, s as getLogContextAttributes, t as buildTurnFailureResponse, u as logAudit, y as setSpanAttributes, z as isRecord } from "./logging-dZN1Bvtu.js";
|
|
4
3
|
import { n as captureMessage } from "./sentry-BBUlHih9.js";
|
|
5
|
-
import { n as botConfig, v as normalizeSlackEmojiName } from "./config-
|
|
4
|
+
import { n as botConfig, v as normalizeSlackEmojiName } from "./config-BiCtNiu5.js";
|
|
6
5
|
import { c as toStoredSlackActor, f as parseSlackUserId, g as parseSlackMessageTs } from "./actor-tlxzqaRe.js";
|
|
7
|
-
import { C as addAgentTurnUsage, R as parseDestination, c as getConversationEventStore, d as getDb, f as getSqlExecutor, m as withConversationEventLock, p as createSqlConversationEventStore, u as getConversationStore, x as bindProviderConversation, y as startLocationThread } from "./viewer-
|
|
8
|
-
import { d as juniorDestinations } from "./agent-invocations-
|
|
9
|
-
import { a as juniorAutomationRuns, l as juniorLocationConfigurations, o as juniorAutomationVersions, s as juniorAutomations } from "./executor-
|
|
6
|
+
import { C as addAgentTurnUsage, R as parseDestination, c as getConversationEventStore, d as getDb, f as getSqlExecutor, m as withConversationEventLock, p as createSqlConversationEventStore, u as getConversationStore, x as bindProviderConversation, y as startLocationThread } from "./viewer-oMTUVAcR.js";
|
|
7
|
+
import { d as juniorDestinations } from "./agent-invocations-CxKldAeB.js";
|
|
8
|
+
import { a as juniorAutomationRuns, l as juniorLocationConfigurations, o as juniorAutomationVersions, s as juniorAutomations } from "./executor-O8xqLDN6.js";
|
|
10
9
|
import { d as contextProvenance, f as instructionActors, n as agentHistoryItemSchema, p as instructionProvenanceFor } from "./history-AY8rs-FR.js";
|
|
11
|
-
import { _ as CredentialUnavailableError, a as resolveAuthTokenPlaceholder, f as credentialContextForActor, h as credentialSubjectSchema, o as resolvePluginCommandEnv, p as credentialContextSchema } from "./registry-
|
|
12
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
13
|
-
import { $t as
|
|
10
|
+
import { _ as CredentialUnavailableError, a as resolveAuthTokenPlaceholder, f as credentialContextForActor, h as credentialSubjectSchema, o as resolvePluginCommandEnv, p as credentialContextSchema } from "./registry-BUje_knT.js";
|
|
11
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-CfwKT0sn.js";
|
|
12
|
+
import { $t as agentsInstructionsUpdatedEvent, Qt as JUNIOR_NATIVE_EVENT_NAMESPACE, Xt as createPluginCache, ct as getSlackClient, dt as normalizeSlackConversationId, en as authenticationLinkedEvent, it as SlackActionError, n as applyPluginFormatMarkdown, pt as withSlackRetries, tn as authenticationUnlinkedEvent, u as getPlugins, ut as isDmChannel, wt as createPluginLogger } from "./agent-hooks-9q2zdKHL.js";
|
|
13
|
+
import { a as acquireActiveLock, i as MUTATION_LOCK_TTL_MS, o as fenceLock, r as getStateAdapter, s as withLock } from "./adapter-t-Y9RHML.js";
|
|
14
14
|
import { N as messageCardRef } from "./conversation-CvuKJ3tA.js";
|
|
15
|
-
import {
|
|
16
|
-
import { y as sleep } from "./profile-CthM2qFM.js";
|
|
15
|
+
import { y as sleep } from "./profile-BP2N5uDY.js";
|
|
17
16
|
import { A as eventAutomationSchema, E as scheduledAutomationSchema, S as automationVersionSchema } from "./automation-DrpcA-SX.js";
|
|
18
17
|
import { isDeepStrictEqual } from "node:util";
|
|
19
18
|
import { z } from "zod";
|
|
@@ -420,6 +419,7 @@ function basePluginContext(plugin) {
|
|
|
420
419
|
const pluginName = plugin.manifest.name;
|
|
421
420
|
return {
|
|
422
421
|
plugin: { name: pluginName },
|
|
422
|
+
cache: createPluginCache(pluginName),
|
|
423
423
|
log: createPluginLogger(pluginName),
|
|
424
424
|
db: getDb()
|
|
425
425
|
};
|
|
@@ -2477,22 +2477,12 @@ async function executeCredentialedEgressRequest(input) {
|
|
|
2477
2477
|
}
|
|
2478
2478
|
}
|
|
2479
2479
|
// src/chat/experimental.ts
|
|
2480
|
-
var experimental_exports = /* @__PURE__ */ __exportAll({
|
|
2481
|
-
EXPERIMENTAL_FEATURES: () => EXPERIMENTAL_FEATURES,
|
|
2482
|
-
getExperimentalFeatures: () => getExperimentalFeatures,
|
|
2483
|
-
isExperimentalFeatureEnabled: () => isExperimentalFeatureEnabled,
|
|
2484
|
-
setExperimentalFeatures: () => setExperimentalFeatures
|
|
2485
|
-
});
|
|
2486
2480
|
/**
|
|
2487
2481
|
* Known unstable product features that must be opted into explicitly.
|
|
2488
2482
|
* Add new keys here as features graduate from private experiments; remove them
|
|
2489
2483
|
* once they become stable defaults.
|
|
2490
2484
|
*/
|
|
2491
|
-
const EXPERIMENTAL_FEATURES = [
|
|
2492
|
-
"operator-tools",
|
|
2493
|
-
"passive-routing",
|
|
2494
|
-
"subagents"
|
|
2495
|
-
];
|
|
2485
|
+
const EXPERIMENTAL_FEATURES = ["operator-tools", "passive-routing"];
|
|
2496
2486
|
const EXPERIMENTAL_FEATURE_SET = new Set(EXPERIMENTAL_FEATURES);
|
|
2497
2487
|
let configuredExperimental = {};
|
|
2498
2488
|
function isExperimentalFeature(value) {
|
|
@@ -4186,6 +4176,7 @@ async function getPluginConversationTitleContext(args) {
|
|
|
4186
4176
|
egress,
|
|
4187
4177
|
log: createPluginLogger(plugin.manifest.name),
|
|
4188
4178
|
plugin: { name: plugin.manifest.name },
|
|
4179
|
+
cache: createPluginCache(plugin.manifest.name),
|
|
4189
4180
|
signal,
|
|
4190
4181
|
text: args.text
|
|
4191
4182
|
}), timedOut]);
|
|
@@ -5834,4 +5825,4 @@ async function saveScheduledAutomation(db, task, expectedRevision, editedBy) {
|
|
|
5834
5825
|
async function saveScheduledAutomationInLock(db, task, current) {
|
|
5835
5826
|
await writeScheduledAutomation(db, requireStoredTask(task), current);
|
|
5836
5827
|
}
|
|
5837
|
-
export { projectConversationMessages as $,
|
|
5828
|
+
export { projectConversationMessages as $, createDurableLocationConfigurationService as $n, isToolResultError as $t, ToolInputError as A, parseSandboxEgressCredentialToken as An, saveTurnCheckpoint as At, recordAgentsInstructionsUpdated as B, normalizeSlackStatusText as Bn, TurnToolCallLimitExceededError as Bt, automationVersionOf as C, normalizeSandboxEgressTracePropagationDomains as Cn, abandonReplacedPendingAuth as Ct, AutomationConflictError as D, consumeSandboxEgressAuthRequiredSignal as Dn, wasPendingAuthStopped as Dt, sameDefinitionValue as E, clearSandboxEgressSignals as En, getConversationPendingAuth as Et, loadLastModelProfile as F, resolveBaseUrl as Fn, listTurnSummaries as Ft, recordGuardianActionReviewed as G, openSlackDirectMessage as Gn, extractAssistantText as Gt, recordAuthenticationLinked as H, truncateStatusText as Hn, createTurnLimitGate as Ht, loadProjection as I, startOAuthFlow as In, recordTurnSummary as It, recordToolExecutionStarted as J, uploadFilesToConversation as Jn, getUserMessageInstructionText as Jt, recordMcpProviderConnected as K, postSlackMessage as Kn, getPiMessageRole as Kt, loadTurnProjection as L, escapeSlackMrkdwnText as Ln, TURN_LIMIT_DISABLED_REASON as Lt, commitMessages as M, deliverOAuthAuthorization as Mn, completeTurnRecord as Mt, loadConnectedMcpProviders as N, formatProviderLabel as Nn, failTurnRecord as Nt, automationRevision as O, consumeSandboxEgressPermissionDeniedSignal as On, continuableMessages as Ot, loadConversationProjection as P, parseOAuthStatePayload as Pn, getTurnRecord as Pt, persistConversationMessages as Q, resolvePluginOAuthAccount as Qn, isContinuablePiBoundary as Qt, loadTurnRoute as R, formatSlackLink as Rn, TurnBudgetExceededError as Rt, automationDefinition as S, resolveSandboxEgressProviderForHost as Sn, AuthorizationPauseError as St, readAutomationVersion as T, SANDBOX_EGRESS_PROXY_PATH as Tn, clearPendingAuth as Tt, recordAuthorizationCompleted as U, addReactionToMessage as Un, isTurnExecutionLimitExceededError as Ut, recordAttachmentsDelivered as V, slackMention as Vn, buildTurnErrorResponse as Vt, recordAuthorizationRequested as W, getSlackMessagePermalink as Wn, persistWithRetry as Wt, appendConversationMessages as X, slackExternalRefIdSchema as Xn, instructionTextForProjection as Xt, recordTurnRoute as Y, slackEntitySchema as Yn, hasRuntimeTurnContext as Yt, hydrateConversationMessages as Z, getOAuthAccountProviders as Zn, isAssistantMessage as Zt, parseEventAutomationRow as _, setExperimentalFeatures as _n, PluginCredentialFailureError as _t, saveScheduledAutomation as a, TURN_CONTEXT_TAG as an, appendThreadContextMessages as at, admitEventAutomationRun as b, buildSandboxEgressNetworkPolicy as bn, AuthPausePersistenceError as bt, withScheduledAutomationLock as c, SubscribedReplyReason as cn, estimateConversationContextTokens as ct, createEventAutomation as d, getThreadStopDecision as dn, markConversationMessage as dt, isToolResultMessage as en, configValueSchema as er, persistConversationMessageSummaries as et, deleteEventAutomation as f, estimateTextTokens as fn, normalizeConversationText as ft, listEventAutomationsForTeam as g, isExperimentalFeatureEnabled as gn, createPluginEgress as gt, listDeletedEventAutomationsCreatedBy as h, getExperimentalFeatures as hn, upsertConversationMessage as ht, readScheduledAutomation as i, trimTrailingAssistantMessages as in, setConfigDefaults as ir, resolveTaskTitle as it, commitAcceptedReply as j, sandboxEgressSignalsResponseSchema as jn, abandonTurnRecord as jt, requireAutomationRevision as k, createSandboxEgressCredentialToken as kn, loadTurnCheckpoint as kt, blockEventAutomation as l, decideSubscribedThreadReply as ln, getConversationMessageSlackTs as lt, getEventAutomation as m, getAgentContextInputLimitTokens as mn, turnHasReply as mt, listScheduledAutomationsForTeam as n, retainRuntimeTurnContext as nn, piMessageFromHistoryItem as nr, settleConversationTitleWork as nt, saveScheduledAutomationInLock as o, buildDeterministicAssistantMessageId as on, buildConversationContext as ot, findMatchingEventAutomations as p, getAgentContextCompactionTriggerTokens as pn, recordDeliveredAssistantMessage as pt, recordSubscribedReplyRoute as q, removeReactionFromMessage as qn, getTerminalAssistantMessages as qt, parseScheduledAutomationRow as r, stripRuntimeTurnContext as rn, getConfigDefaults as rr, fallbackShortTitle as rt, scheduledRunId as s, buildDeterministicTurnId as sn, createConversationMemoryService as st, createScheduledAutomation as t, normalizeToolNameFromResult as tn, historyItemFromPiMessage as tr, resolveConversationTitle as tt, collectEventAutomationMatchKeys as u, getSubscribedReplyPreflightDecision as un, isHumanConversationMessage as ut, saveEventAutomation as v, executeCredentialedEgressRequest as vn, createPluginAuthOrchestration as vt, listAutomationVersions as w, shouldPropagateSandboxEgressTrace as wn, canReusePendingAuthLink as wt, eventAutomationRunLimitReason as x, resolveSandboxCommandEnvironment as xn, AuthorizationFlowDisabledError as xt, setEventAutomationStatus as y, createUserTokenStore as yn, authorizationId as yt, openConversationProjection as z, normalizeSlackReplyMarkdown as zn, TurnSliceLimitExceededError as zt };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { B as toOptionalNumber, V as toOptionalString, z as isRecord } from "./logging-
|
|
3
|
-
import { d as getDb } from "./viewer-
|
|
4
|
-
import { gt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-
|
|
5
|
-
import { r as getStateAdapter } from "./adapter-
|
|
1
|
+
import { $n as createDurableLocationConfigurationService, Q as persistConversationMessages } from "./tasks-Bh2qYaed.js";
|
|
2
|
+
import { B as toOptionalNumber, V as toOptionalString, z as isRecord } from "./logging-dZN1Bvtu.js";
|
|
3
|
+
import { d as getDb } from "./viewer-oMTUVAcR.js";
|
|
4
|
+
import { gt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-9q2zdKHL.js";
|
|
5
|
+
import { r as getStateAdapter } from "./adapter-t-Y9RHML.js";
|
|
6
6
|
// src/chat/state/conversation.ts
|
|
7
7
|
function defaultConversationState() {
|
|
8
8
|
return {
|