@sentry/junior 0.216.0 → 0.218.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/{agent-BFKt9huN.js → agent-C-wRol8n.js} +181 -39
- package/dist/{agent-hooks-pyhfSnAL.js → agent-hooks-Au93EfEr.js} +6 -6
- package/dist/{agent-runner-CIiziOcz.js → agent-runner-skcXibgb.js} +5 -5
- package/dist/api.js +15 -15
- package/dist/{app-D4nNdzPG.d.ts → app-BYD2Nyji.d.ts} +1 -1
- package/dist/app.d.ts +2 -2
- package/dist/app.js +29 -29
- package/dist/{auth-pause-state-BKGc9Y8O.js → auth-pause-state-CU71X-6Z.js} +6 -6
- package/dist/{briefs-Bq5vouaO.js → briefs-Dcdrr46e.js} +2 -2
- package/dist/{catalog-runtime-D3hJdAMz.js → catalog-runtime-B9yDPVCR.js} +1 -1
- package/dist/{checkpoint-Ja5A32op.js → checkpoint-CQ6eQrJD.js} +6 -6
- package/dist/cli/chat.d.ts +1 -1
- package/dist/cli/chat.js +13 -13
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +1 -1
- package/dist/cli/plugins.d.ts +1 -1
- package/dist/cli/plugins.js +3 -3
- package/dist/cli/snapshot-create.js +3 -3
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-DqG_LDSH.js → client-BV3_abpr.js} +2 -2
- package/dist/{config-CdS5GQ7W.js → config-DceVK986.js} +2 -2
- package/dist/{conversation-privacy-B7844ly7.js → conversation-privacy-C_w2FAlM.js} +1 -1
- package/dist/{credential-sync-DLWVq50D.js → credential-sync-DKXGTID8.js} +22 -22
- package/dist/{execution-stats-BbYien1O.js → execution-stats-BIyGof8p.js} +3 -3
- package/dist/{executor-CIl9A6cO.js → executor-CxoH7xaY.js} +1 -1
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-CIz2Sij0.js → job-queue-DwA7xmCQ.js} +1 -1
- package/dist/{logging-dD_n9Ocp.js → logging-CtfUmyiN.js} +1 -1
- package/dist/nitro.d.ts +2 -2
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-CBfuGXP0.js → oauth-callback-server-RefMcYAD.js} +2 -2
- package/dist/{pending-auth-KOZWIp4m.js → pending-auth-B_nSqxpd.js} +2 -2
- package/dist/{plugins-BI9A1vKA.d.ts → plugins-BT2l4We3.d.ts} +2 -1
- package/dist/{profile-BfWuRDUF.js → profile-BRupCR8f.js} +4 -4
- package/dist/{registry-DYHLzGuO.js → registry-DiIwniX1.js} +62 -18
- package/dist/{resolve-CU8DArbR.js → resolve-0BvJroyG.js} +2 -2
- package/dist/{runner-BtHHH38l.js → runner-DDHI2RaU.js} +9 -9
- package/dist/{sandbox-egress-signals-BvZZ02w9.js → sandbox-egress-signals-CoVhGAih.js} +1 -1
- package/dist/{short-title-CKnmS3nO.js → short-title-BdpXj7eS.js} +2 -2
- package/dist/{skills-CLsaAMtU.js → skills-MlftIiVP.js} +2 -2
- package/dist/{spawn-C6Utdbzm.js → spawn-DLlXPelG.js} +2 -2
- package/dist/{stats-D4Ar_7MS.js → stats-BjipUP7p.js} +5 -5
- package/dist/{task-queue-BgOOj26_.js → task-queue-DyfnQ7ZM.js} +3 -3
- package/dist/{task-runner-BfOnhH3C.js → task-runner-BOuCBVgO.js} +7 -7
- package/dist/{thread-state-B-jR3Aa8.js → thread-state-DrGVG1E-.js} +5 -5
- package/dist/{turn-execution-_rlctc-2.js → turn-execution-CZKg5Fw9.js} +3 -3
- package/dist/{turn-lifecycle-CVRu8Hmm.js → turn-lifecycle-BV2Wp_qF.js} +1 -1
- package/dist/{validation-5255qF_p.js → validation-BXDSxuOX.js} +1 -1
- package/dist/{version-DS_6p6x1.js → version-DNJ6W0LC.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{web-authorization-TdkXi7XG.js → web-authorization-DhXHpeMK.js} +1 -1
- package/dist/{web-input-vHOAXVxj.js → web-input-BqFF7CQB.js} +4 -4
- package/dist/{work-NIWYQvh-.js → work-DEMP0L3f.js} +9 -9
- package/dist/{worker-BgY7599f.js → worker-DvK47zmH.js} +5 -5
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as setSpanAttributes, d as logInfo, f as logWarn } from "./logging-
|
|
1
|
+
import { _ as setSpanAttributes, d as logInfo, f as logWarn } from "./logging-CtfUmyiN.js";
|
|
2
2
|
import { i as credentialUserSubjectId } from "./context-Bplcgypl.js";
|
|
3
3
|
import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-7a9YqLhE.js";
|
|
4
4
|
import path from "node:path";
|
|
@@ -31,12 +31,21 @@ function inlineCredentialsSource(credentials) {
|
|
|
31
31
|
setDefined$1(result, "auth-token-placeholder", credentials.authTokenPlaceholder);
|
|
32
32
|
return result;
|
|
33
33
|
}
|
|
34
|
+
/** Convert a camelCase `mcp.auth` block to its plugin.yaml source keys. */
|
|
35
|
+
function mcpAuthSource(auth) {
|
|
36
|
+
return {
|
|
37
|
+
issuer: auth.issuer,
|
|
38
|
+
"key-id": auth.keyId,
|
|
39
|
+
"private-key-env": auth.privateKeyEnv
|
|
40
|
+
};
|
|
41
|
+
}
|
|
34
42
|
function inlineMcpSource(mcp) {
|
|
35
43
|
if (mcp === void 0 || !isRecord(mcp)) return mcp;
|
|
36
44
|
const result = {};
|
|
37
45
|
setDefined$1(result, "transport", mcp.transport);
|
|
38
46
|
setDefined$1(result, "url", mcp.url);
|
|
39
47
|
setDefined$1(result, "headers", mcp.headers);
|
|
48
|
+
setDefined$1(result, "auth", mcp.auth && mcpAuthSource(mcp.auth));
|
|
40
49
|
setDefined$1(result, "allowed-tools", mcp.allowedTools);
|
|
41
50
|
setDefined$1(result, "wrapped-tools", mcp.wrappedTools);
|
|
42
51
|
return result;
|
|
@@ -219,9 +228,15 @@ const oauthSourceSchema = z.object({
|
|
|
219
228
|
"token-auth-method": nonEmptyTrimmedString.refine((value) => value === "body" || value === "basic", { error: "must be \"body\" or \"basic\"" }).optional(),
|
|
220
229
|
"treat-empty-scope-as-unreported": z.boolean().optional()
|
|
221
230
|
}).passthrough();
|
|
231
|
+
const mcpAuthSourceSchema = z.object({
|
|
232
|
+
issuer: nonEmptyTrimmedString,
|
|
233
|
+
"key-id": nonEmptyTrimmedString,
|
|
234
|
+
"private-key-env": envVarString
|
|
235
|
+
}).passthrough();
|
|
222
236
|
const mcpSourceSchema = z.object({
|
|
223
237
|
transport: nonEmptyTrimmedString.refine((value) => value === "http", { error: "must be \"http\"" }).optional(),
|
|
224
238
|
url: httpsUrlString,
|
|
239
|
+
auth: mcpAuthSourceSchema.optional(),
|
|
225
240
|
headers: stringMapSchema.optional(),
|
|
226
241
|
"allowed-tools": nonEmptyStringArraySchema("allowed-tools").optional(),
|
|
227
242
|
"wrapped-tools": nonEmptyStringArraySchema("wrapped-tools").optional()
|
|
@@ -280,6 +295,7 @@ function manifestConfigPatch(config) {
|
|
|
280
295
|
setDefined(mcp, "transport", config.mcp.transport);
|
|
281
296
|
setDefined(mcp, "url", config.mcp.url);
|
|
282
297
|
setDefined(mcp, "headers", config.mcp.headers);
|
|
298
|
+
setDefined(mcp, "auth", config.mcp.auth && mcpAuthSource(config.mcp.auth));
|
|
283
299
|
setDefined(mcp, "allowed-tools", config.mcp.allowedTools);
|
|
284
300
|
setDefined(mcp, "wrapped-tools", config.mcp.wrappedTools);
|
|
285
301
|
result.mcp = mcp;
|
|
@@ -368,13 +384,20 @@ function envReferences(value) {
|
|
|
368
384
|
function assertDeclaredEnvReferences(value, envVars, context) {
|
|
369
385
|
for (const name of envReferences(value)) {
|
|
370
386
|
if (!Object.prototype.hasOwnProperty.call(envVars, name)) throw new Error(`${context} references env var ${name} which is not declared in env-vars`);
|
|
371
|
-
if (envVars[name]?.default !== void 0) throw new Error(`${context} references env var ${name}, but
|
|
387
|
+
if (envVars[name]?.default !== void 0) throw new Error(`${context} references env var ${name}, but header env vars must not declare defaults`);
|
|
372
388
|
}
|
|
373
389
|
}
|
|
390
|
+
function assertDeclaredHeaderEnvReferences(headers, envVars, prefix) {
|
|
391
|
+
for (const [key, headerValue] of Object.entries(headers ?? {})) assertDeclaredEnvReferences(headerValue, envVars, `${prefix}.${key}`);
|
|
392
|
+
}
|
|
393
|
+
function assertDeclaredHostSecretEnv(name, envVars, context) {
|
|
394
|
+
if (!Object.prototype.hasOwnProperty.call(envVars, name)) throw new Error(`${context} uses env var ${name} which is not declared in env-vars`);
|
|
395
|
+
if (envVars[name]?.default !== void 0) throw new Error(`${context} uses env var ${name}, but host secret env vars must not declare defaults`);
|
|
396
|
+
}
|
|
374
397
|
function normalizeRequiredApiHeaders(value, prefix, envVars) {
|
|
375
398
|
const apiHeaders = normalizeStringMap(value, prefix);
|
|
376
399
|
if (!apiHeaders) throw new Error(`${prefix} must contain at least one header`);
|
|
377
|
-
|
|
400
|
+
assertDeclaredHeaderEnvReferences(apiHeaders, envVars, prefix);
|
|
378
401
|
return apiHeaders;
|
|
379
402
|
}
|
|
380
403
|
function assertCommandEnvReferencesDeclared(value, envVars, context) {
|
|
@@ -395,17 +418,20 @@ function normalizeCommandEnv(value, prefix, envVars) {
|
|
|
395
418
|
}
|
|
396
419
|
return Object.fromEntries(Object.entries(env).map(([key, envValue]) => [key, expandCommandEnvPlaceholders(envValue, envVars, `${prefix}.${key}`)]));
|
|
397
420
|
}
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
const
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
hostOnlyRefs.add(oauth.clientSecretEnv);
|
|
421
|
+
/** Collect every env var that carries a host-only secret for one plugin. */
|
|
422
|
+
function hostOnlyEnvNames(manifest) {
|
|
423
|
+
const names = /* @__PURE__ */ new Set();
|
|
424
|
+
if (manifest.mcp?.auth) names.add(manifest.mcp.auth.privateKeyEnv);
|
|
425
|
+
for (const value of [...Object.values(manifest.apiHeaders ?? {}), ...Object.values(manifest.mcp?.headers ?? {})]) for (const name of envReferences(value)) names.add(name);
|
|
426
|
+
if (manifest.credentials?.authTokenEnv) names.add(manifest.credentials.authTokenEnv);
|
|
427
|
+
if (manifest.oauth) {
|
|
428
|
+
names.add(manifest.oauth.clientIdEnv);
|
|
429
|
+
names.add(manifest.oauth.clientSecretEnv);
|
|
408
430
|
}
|
|
431
|
+
return names;
|
|
432
|
+
}
|
|
433
|
+
function assertCommandEnvDoesNotExposeHostSecretRefs(commandEnv, hostOnlyRefs, pluginName) {
|
|
434
|
+
if (!commandEnv) return;
|
|
409
435
|
for (const [key, value] of Object.entries(commandEnv)) for (const name of envReferences(value)) if (hostOnlyRefs.has(name)) throw new Error(`Plugin ${pluginName} command-env.${key} references env var ${name}, but credential/API header env vars must stay host-only`);
|
|
410
436
|
}
|
|
411
437
|
function assertCommandEnvHostRefsAreExplicitlyExposed(commandEnv, envVars, pluginName) {
|
|
@@ -544,9 +570,16 @@ function normalizeMcp(data, envVars, name) {
|
|
|
544
570
|
const result = mcpSourceSchema.safeParse(prepared);
|
|
545
571
|
if (!result.success) throw new Error(issueMessage(result.error, `Plugin ${name} mcp`));
|
|
546
572
|
const headers = result.data.headers ? normalizeStringMap(result.data.headers, `Plugin ${name} mcp.headers`, { forbiddenKeys: FORBIDDEN_API_HEADER_NAMES }) : void 0;
|
|
573
|
+
assertDeclaredHeaderEnvReferences(headers, envVars, `Plugin ${name} mcp.headers`);
|
|
574
|
+
if (result.data.auth) assertDeclaredHostSecretEnv(result.data.auth["private-key-env"], envVars, `Plugin ${name} mcp.auth.private-key-env`);
|
|
547
575
|
return {
|
|
548
576
|
transport: "http",
|
|
549
577
|
url: result.data.url,
|
|
578
|
+
...result.data.auth ? { auth: {
|
|
579
|
+
issuer: result.data.auth.issuer,
|
|
580
|
+
keyId: result.data.auth["key-id"],
|
|
581
|
+
privateKeyEnv: result.data.auth["private-key-env"]
|
|
582
|
+
} } : void 0,
|
|
550
583
|
...headers ? { headers } : void 0,
|
|
551
584
|
...result.data["allowed-tools"] ? { allowedTools: result.data["allowed-tools"] } : void 0,
|
|
552
585
|
...result.data["wrapped-tools"] ? { wrappedTools: result.data["wrapped-tools"] } : void 0
|
|
@@ -620,7 +653,12 @@ function parseManifestSource(parsedSource, dir, config, options) {
|
|
|
620
653
|
...result.data["treat-empty-scope-as-unreported"] ? { treatEmptyScopeAsUnreported: true } : void 0
|
|
621
654
|
};
|
|
622
655
|
}
|
|
623
|
-
assertCommandEnvDoesNotExposeHostSecretRefs(data["command-env"],
|
|
656
|
+
assertCommandEnvDoesNotExposeHostSecretRefs(data["command-env"], hostOnlyEnvNames({
|
|
657
|
+
apiHeaders,
|
|
658
|
+
credentials,
|
|
659
|
+
oauth: manifest.oauth,
|
|
660
|
+
mcp
|
|
661
|
+
}), data.name);
|
|
624
662
|
assertCommandEnvHostRefsAreExplicitlyExposed(data["command-env"], envVars, data.name);
|
|
625
663
|
if (data.target) {
|
|
626
664
|
const result = targetSourceSchema.safeParse(data.target);
|
|
@@ -830,12 +868,18 @@ function resolveAuthTokenPlaceholder(credentials) {
|
|
|
830
868
|
//#region src/chat/plugins/auth/api-headers-broker.ts
|
|
831
869
|
const MAX_LEASE_MS$1 = 36e5;
|
|
832
870
|
const ENV_PLACEHOLDER_RE = /\$\{([A-Z_][A-Z0-9_]*)\}/g;
|
|
833
|
-
|
|
871
|
+
/**
|
|
872
|
+
* Fill `${NAME}` refs in plugin header values from the deployment env.
|
|
873
|
+
*
|
|
874
|
+
* Manifests keep the placeholder so secrets never reach build output, and the
|
|
875
|
+
* parser has already required each name to be declared without a default.
|
|
876
|
+
*/
|
|
877
|
+
function resolvePluginHeaderEnvRefs(provider, headers, kind = "API header") {
|
|
834
878
|
return Object.fromEntries(Object.entries(headers).map(([key, value]) => {
|
|
835
879
|
return [key, value.replace(ENV_PLACEHOLDER_RE, (_match, name) => {
|
|
836
880
|
const envName = name;
|
|
837
881
|
const envValue = process.env[envName]?.trim();
|
|
838
|
-
if (!envValue) throw new Error(`Missing ${envName} for
|
|
882
|
+
if (!envValue) throw new Error(`Missing ${envName} for ${kind} provider "${provider}"`);
|
|
839
883
|
return envValue;
|
|
840
884
|
})];
|
|
841
885
|
}));
|
|
@@ -844,7 +888,7 @@ function resolveHeaders(provider, headers) {
|
|
|
844
888
|
function resolveApiHeaderTransforms(manifest) {
|
|
845
889
|
const { domains, apiHeaders } = manifest;
|
|
846
890
|
if (!domains || !apiHeaders) return [];
|
|
847
|
-
const resolvedHeaders =
|
|
891
|
+
const resolvedHeaders = resolvePluginHeaderEnvRefs(manifest.name, apiHeaders);
|
|
848
892
|
return domains.map((domain) => ({
|
|
849
893
|
domain,
|
|
850
894
|
headers: resolvedHeaders
|
|
@@ -1416,4 +1460,4 @@ function createPluginCatalogRuntime() {
|
|
|
1416
1460
|
};
|
|
1417
1461
|
}
|
|
1418
1462
|
//#endregion
|
|
1419
|
-
export {
|
|
1463
|
+
export { resolveAuthTokenPlaceholder as a, fetchWithBoundedOAuthErrorBodies as c, CredentialUnavailableError as d, parseInlinePluginManifest as f, resolvePluginHeaderEnvRefs as i, getOAuthProviderErrorAttributes as l, buildOAuthTokenRequest as n, resolvePluginCommandEnv as o, parsePluginManifest as p, parseOAuthTokenResponse as r, OAuthProviderError as s, createPluginCatalogRuntime as t, hasRequiredOAuthScope as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as withSpan, _ as setSpanAttributes } from "./logging-
|
|
2
|
-
import { A as sleep, P as SANDBOX_WORKSPACE_ROOT, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-
|
|
1
|
+
import { C as withSpan, _ as setSpanAttributes } from "./logging-CtfUmyiN.js";
|
|
2
|
+
import { A as sleep, P as SANDBOX_WORKSPACE_ROOT, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-BRupCR8f.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { FileSystem, Sandbox } from "@vercel/sandbox";
|
|
5
5
|
//#region src/chat/sandbox/resources.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { p as authorizationId } from "./agent-
|
|
2
|
-
import { S as withLogContext, u as logException, y as setTags } from "./logging-
|
|
1
|
+
import { p as authorizationId } from "./agent-C-wRol8n.js";
|
|
2
|
+
import { S as withLogContext, u as logException, y as setTags } from "./logging-CtfUmyiN.js";
|
|
3
3
|
import { t as credentialContextForActor } from "./context-Bplcgypl.js";
|
|
4
|
-
import { Ht as getConversationEventStore, Wt as getConversationStore } from "./agent-hooks-
|
|
5
|
-
import { F as loadProjection, V as recordAuthorizationCompleted, X as persistConversationMessages, Y as hydrateConversationMessages, ct as recordDeliveredAssistantMessage, d as persistWithRetry, j as commitAcceptedReply, ot as markConversationMessage, r as saveTurnCheckpoint, st as normalizeConversationText, tt as buildConversationContext, ut as upsertConversationMessage } from "./checkpoint-
|
|
6
|
-
import { S as startActiveTurn, s as getAssistantReplyText, x as markTurnFailed } from "./pending-auth-
|
|
7
|
-
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-
|
|
8
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
9
|
-
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
10
|
-
import { d as buildDeliveredTurnStatePatch, r as finalizeFailedTurnReplyWithEvent, t as completeAuthPauseTurn } from "./auth-pause-state-
|
|
4
|
+
import { Ht as getConversationEventStore, Wt as getConversationStore } from "./agent-hooks-Au93EfEr.js";
|
|
5
|
+
import { F as loadProjection, V as recordAuthorizationCompleted, X as persistConversationMessages, Y as hydrateConversationMessages, ct as recordDeliveredAssistantMessage, d as persistWithRetry, j as commitAcceptedReply, ot as markConversationMessage, r as saveTurnCheckpoint, st as normalizeConversationText, tt as buildConversationContext, ut as upsertConversationMessage } from "./checkpoint-CQ6eQrJD.js";
|
|
6
|
+
import { S as startActiveTurn, s as getAssistantReplyText, x as markTurnFailed } from "./pending-auth-B_nSqxpd.js";
|
|
7
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-BOuCBVgO.js";
|
|
8
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-BV2Wp_qF.js";
|
|
9
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-DrGVG1E-.js";
|
|
10
|
+
import { d as buildDeliveredTurnStatePatch, r as finalizeFailedTurnReplyWithEvent, t as completeAuthPauseTurn } from "./auth-pause-state-CU71X-6Z.js";
|
|
11
11
|
import { randomUUID } from "node:crypto";
|
|
12
12
|
import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
|
|
13
13
|
//#region src/chat/local/runner.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Y as sandboxEgressSignalsResponseSchema } from "./agent-
|
|
1
|
+
import { Y as sandboxEgressSignalsResponseSchema } from "./agent-C-wRol8n.js";
|
|
2
2
|
//#region 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,5 +1,5 @@
|
|
|
1
|
-
import { f as logWarn } from "./logging-
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
1
|
+
import { f as logWarn } from "./logging-CtfUmyiN.js";
|
|
2
|
+
import { n as botConfig } from "./config-DceVK986.js";
|
|
3
3
|
const TITLE_PROMPTS = {
|
|
4
4
|
conversation: [
|
|
5
5
|
"Generate a concise 5-8 word conversation title from the first user message below.",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { f as logWarn } from "./logging-
|
|
2
|
+
import { f as logWarn } from "./logging-CtfUmyiN.js";
|
|
3
3
|
import { s as skillRoots } from "./package-discovery-7a9YqLhE.js";
|
|
4
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-B9yDPVCR.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-B4FMCO8f.js";
|
|
2
|
-
import { C as toolInvocationDestination, y as actorFromRun } from "./agent-runner-
|
|
3
|
-
import { n as createAndEnqueueAgentInvocation } from "./work-
|
|
2
|
+
import { C as toolInvocationDestination, y as actorFromRun } from "./agent-runner-skcXibgb.js";
|
|
3
|
+
import { n as createAndEnqueueAgentInvocation } from "./work-DEMP0L3f.js";
|
|
4
4
|
//#region 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,10 +1,10 @@
|
|
|
1
|
-
import { F as isRecord$1, I as toOptionalNumber, L as toOptionalString } from "./logging-
|
|
2
|
-
import { a as getChatConfig } from "./config-
|
|
1
|
+
import { F as isRecord$1, I as toOptionalNumber, L as toOptionalString } from "./logging-CtfUmyiN.js";
|
|
2
|
+
import { a as getChatConfig } from "./config-DceVK986.js";
|
|
3
3
|
import { _ as parseSlackMessageTs, d as parseStoredSlackActor, h as parseSlackTeamId, p as parseSlackChannelId } from "./context-Bplcgypl.js";
|
|
4
|
-
import { Gt as getDb, J as withSlackRetries, U as getSlackClient, Wt as getConversationStore, fn as sameDestination, pt as JUNIOR_THREAD_STATE_TTL_MS, u as getPlugins, un as parseDestination } from "./agent-hooks-
|
|
4
|
+
import { Gt as getDb, J as withSlackRetries, U as getSlackClient, Wt as getConversationStore, fn as sameDestination, pt as JUNIOR_THREAD_STATE_TTL_MS, u as getPlugins, un as parseDestination } from "./agent-hooks-Au93EfEr.js";
|
|
5
5
|
import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
|
|
6
|
-
import { E as juniorConversations, a as juniorSchedulerRuns, c as juniorStats, l as juniorEventAutomations, o as juniorSchedulerTasks, w as juniorAttachments } from "./executor-
|
|
7
|
-
import { C as getDefaultRedisStateAdapterFor, w as getStateAdapter } from "./profile-
|
|
6
|
+
import { E as juniorConversations, a as juniorSchedulerRuns, c as juniorStats, l as juniorEventAutomations, o as juniorSchedulerTasks, w as juniorAttachments } from "./executor-CxoH7xaY.js";
|
|
7
|
+
import { C as getDefaultRedisStateAdapterFor, w as getStateAdapter } from "./profile-BRupCR8f.js";
|
|
8
8
|
import "./vercel-queue-DIkVcfK4.js";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as logWarn } from "./logging-
|
|
1
|
+
import { f as logWarn } from "./logging-CtfUmyiN.js";
|
|
2
2
|
import { a as signQueueMessage, i as QUEUE_SIGNATURE_MAX_AGE_MS, o as verifyQueueMessage, s as createVercelQueueClient } from "./vercel-queue-DIkVcfK4.js";
|
|
3
|
-
import { o as runWithTurnRequestDeadline } from "./job-queue-
|
|
3
|
+
import { o as runWithTurnRequestDeadline } from "./job-queue-DwA7xmCQ.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { handleCallback, registerDevConsumer } from "@vercel/queue";
|
|
@@ -110,7 +110,7 @@ function pluginTaskCallback() {
|
|
|
110
110
|
maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
|
|
111
111
|
onRejected: logPluginTaskQueueMessageRejected,
|
|
112
112
|
run: async (message) => {
|
|
113
|
-
const { processPluginTask } = await import("./task-runner-
|
|
113
|
+
const { processPluginTask } = await import("./task-runner-BOuCBVgO.js").then((n) => n.r);
|
|
114
114
|
await processPluginTask(message);
|
|
115
115
|
},
|
|
116
116
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
2
|
import { _ as parseSlackMessageTs, r as credentialSubjectSchema } from "./context-Bplcgypl.js";
|
|
3
|
-
import { At as createPluginConversationEvents, Gt as getDb, Q as readActorIdentity, Wt as getConversationStore, _t as createPluginState, bt as createPluginLogger, p as coreTaskRegistrations, pt as JUNIOR_THREAD_STATE_TTL_MS, u as getPlugins, vt as createPluginEmbedder, yt as createPluginModel } from "./agent-hooks-
|
|
3
|
+
import { At as createPluginConversationEvents, Gt as getDb, Q as readActorIdentity, Wt as getConversationStore, _t as createPluginState, bt as createPluginLogger, p as coreTaskRegistrations, pt as JUNIOR_THREAD_STATE_TTL_MS, u as getPlugins, vt as createPluginEmbedder, yt as createPluginModel } from "./agent-hooks-Au93EfEr.js";
|
|
4
4
|
import { G as sameActorIdentity } from "./conversation-BpqLg4MM.js";
|
|
5
|
-
import { E as normalizeToolNameFromResult, O as stripRuntimeTurnContext, T as isToolResultMessage, Y as hydrateConversationMessages, _ as getPiMessageRole, s as getTurnRecord, w as isToolResultError, x as instructionTextForProjection } from "./checkpoint-
|
|
6
|
-
import { w as getStateAdapter } from "./profile-
|
|
7
|
-
import { u as recordAutomationExecution } from "./execution-stats-
|
|
8
|
-
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
9
|
-
import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-
|
|
5
|
+
import { E as normalizeToolNameFromResult, O as stripRuntimeTurnContext, T as isToolResultMessage, Y as hydrateConversationMessages, _ as getPiMessageRole, s as getTurnRecord, w as isToolResultError, x as instructionTextForProjection } from "./checkpoint-CQ6eQrJD.js";
|
|
6
|
+
import { w as getStateAdapter } from "./profile-BRupCR8f.js";
|
|
7
|
+
import { u as recordAutomationExecution } from "./execution-stats-BIyGof8p.js";
|
|
8
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-DrGVG1E-.js";
|
|
9
|
+
import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-DyfnQ7ZM.js";
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
import { createHash } from "node:crypto";
|
|
12
12
|
import { destinationSchema, destinationVisibilitySchema, isSlackDestination, pluginRunContextSchema, replyAttributionSchema, sourceSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
|
|
@@ -345,7 +345,7 @@ function slackSourceForDestination(args) {
|
|
|
345
345
|
* Reads parent Conversations when this Conversation has no Destination.
|
|
346
346
|
*/
|
|
347
347
|
async function resolveConversationRouting(args) {
|
|
348
|
-
const conversationStore = args.conversationStore ?? (await import("./agent-hooks-
|
|
348
|
+
const conversationStore = args.conversationStore ?? (await import("./agent-hooks-Au93EfEr.js").then((n) => n.Vt)).getConversationStore();
|
|
349
349
|
const chain = await loadConversationChain(args.conversationId, conversationStore);
|
|
350
350
|
let destination;
|
|
351
351
|
let source;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { F as isRecord, I as toOptionalNumber, L as toOptionalString } from "./logging-
|
|
2
|
-
import { Gt as getDb, pt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-
|
|
1
|
+
import { F as isRecord, I as toOptionalNumber, L as toOptionalString } from "./logging-CtfUmyiN.js";
|
|
2
|
+
import { Gt as getDb, pt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-Au93EfEr.js";
|
|
3
3
|
import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
|
|
4
|
-
import { u as juniorLocationConfigurations } from "./executor-
|
|
5
|
-
import { X as persistConversationMessages } from "./checkpoint-
|
|
6
|
-
import { w as getStateAdapter } from "./profile-
|
|
4
|
+
import { u as juniorLocationConfigurations } from "./executor-CxoH7xaY.js";
|
|
5
|
+
import { X as persistConversationMessages } from "./checkpoint-CQ6eQrJD.js";
|
|
6
|
+
import { w as getStateAdapter } from "./profile-BRupCR8f.js";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
9
9
|
import { and, eq, sql } from "drizzle-orm";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Ht as getConversationEventStore } from "./agent-hooks-
|
|
2
|
-
import { n as runAgentWithTimeout } from "./agent-runner-
|
|
3
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
1
|
+
import { Ht as getConversationEventStore } from "./agent-hooks-Au93EfEr.js";
|
|
2
|
+
import { n as runAgentWithTimeout } from "./agent-runner-skcXibgb.js";
|
|
3
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-BV2Wp_qF.js";
|
|
4
4
|
//#region src/chat/runtime/turn-execution.ts
|
|
5
5
|
/** An error thrown while the agent advances a Run. */
|
|
6
6
|
var AgentRunError = class extends Error {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ht as getConversationEventStore } from "./agent-hooks-
|
|
1
|
+
import { Ht as getConversationEventStore } from "./agent-hooks-Au93EfEr.js";
|
|
2
2
|
//#region src/chat/conversations/turn-lifecycle.ts
|
|
3
3
|
/** Persist correlated turn lifecycle facts with retry-safe terminal exclusion. */
|
|
4
4
|
var ConversationTurnLifecycleService = class {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
2
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-B9yDPVCR.js";
|
|
3
3
|
import { isDeepStrictEqual } from "node:util";
|
|
4
4
|
//#region src/chat/plugins/validation.ts
|
|
5
5
|
var validation_exports = /* @__PURE__ */ __exportAll({
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
1
|
+
import { t as JUNIOR_VERSION } from "./version-DNJ6W0LC.js";
|
|
2
2
|
export { JUNIOR_VERSION };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { w as getStateAdapter } from "./profile-
|
|
1
|
+
import { w as getStateAdapter } from "./profile-BRupCR8f.js";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
//#region src/chat/conversations/web-authorization.ts
|
|
4
4
|
const WEB_AUTHORIZATION_PREFIX = "junior:web_authorization:v1";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { f as logWarn } from "./logging-
|
|
2
|
-
import { s as getSlackBotToken } from "./config-
|
|
1
|
+
import { f as logWarn } from "./logging-CtfUmyiN.js";
|
|
2
|
+
import { s as getSlackBotToken } from "./config-DceVK986.js";
|
|
3
3
|
import "./context-Bplcgypl.js";
|
|
4
|
-
import { K as normalizeSlackConversationId, Wt as getConversationStore } from "./agent-hooks-
|
|
5
|
-
import { c as parseSlackThreadId, ft as appendAndEnqueueExclusiveInboundMessage, pt as appendAndEnqueueInboundMessage, qt as buildDeterministicTurnId } from "./stats-
|
|
4
|
+
import { K as normalizeSlackConversationId, Wt as getConversationStore } from "./agent-hooks-Au93EfEr.js";
|
|
5
|
+
import { c as parseSlackThreadId, ft as appendAndEnqueueExclusiveInboundMessage, pt as appendAndEnqueueInboundMessage, qt as buildDeterministicTurnId } from "./stats-BjipUP7p.js";
|
|
6
6
|
import { t as healthReportSchema } from "./reporting-schema-DosTN__Q.js";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import { createHash } from "node:crypto";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { $ as AuthorizationFlowDisabledError, A as createAgentInvocationSchema, M as AgentInvocationLimitError, O as agentBindingSchema, f as PluginCredentialFailureError, j as AgentInvocationBusyError, k as agentInvocationSchema } from "./agent-
|
|
3
|
-
import { Ht as getConversationEventStore, Kt as getSqlExecutor, Wt as getConversationStore } from "./agent-hooks-
|
|
4
|
-
import { f as juniorAgentBindings, p as juniorAgentInvocations } from "./executor-
|
|
5
|
-
import { L as openConversationProjection, o as failTurnRecord, r as saveTurnCheckpoint, s as getTurnRecord, v as getTerminalAssistantMessages } from "./checkpoint-
|
|
6
|
-
import { pt as appendAndEnqueueInboundMessage } from "./stats-
|
|
7
|
-
import { _ as isTurnInputCommitLostError, h as getConversationTurnBoundaryError, p as TurnInputCommitLostError, s as getAssistantReplyText } from "./pending-auth-
|
|
8
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
9
|
-
import { n as executeTurn, t as AgentRunError } from "./turn-execution-
|
|
10
|
-
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState } from "./thread-state-
|
|
2
|
+
import { $ as AuthorizationFlowDisabledError, A as createAgentInvocationSchema, M as AgentInvocationLimitError, O as agentBindingSchema, f as PluginCredentialFailureError, j as AgentInvocationBusyError, k as agentInvocationSchema } from "./agent-C-wRol8n.js";
|
|
3
|
+
import { Ht as getConversationEventStore, Kt as getSqlExecutor, Wt as getConversationStore } from "./agent-hooks-Au93EfEr.js";
|
|
4
|
+
import { f as juniorAgentBindings, p as juniorAgentInvocations } from "./executor-CxoH7xaY.js";
|
|
5
|
+
import { L as openConversationProjection, o as failTurnRecord, r as saveTurnCheckpoint, s as getTurnRecord, v as getTerminalAssistantMessages } from "./checkpoint-CQ6eQrJD.js";
|
|
6
|
+
import { pt as appendAndEnqueueInboundMessage } from "./stats-BjipUP7p.js";
|
|
7
|
+
import { _ as isTurnInputCommitLostError, h as getConversationTurnBoundaryError, p as TurnInputCommitLostError, s as getAssistantReplyText } from "./pending-auth-B_nSqxpd.js";
|
|
8
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-BV2Wp_qF.js";
|
|
9
|
+
import { n as executeTurn, t as AgentRunError } from "./turn-execution-CZKg5Fw9.js";
|
|
10
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState } from "./thread-state-DrGVG1E-.js";
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
import { createHash } from "node:crypto";
|
|
13
13
|
import { and, asc, count, eq, inArray } from "drizzle-orm";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { b as isProviderRetryError } from "./client-
|
|
3
|
-
import { S as withLogContext, d as logInfo, f as logWarn, u as logException } from "./logging-
|
|
4
|
-
import { a as getChatConfig } from "./config-
|
|
5
|
-
import { At as recordConversationRetry, Ct as drainConversationMailbox, Et as getConversationWorkState, Ft as startConversationWork, Ht as isInvalidConversationRecordError, Nt as requestAnotherSlice, St as deadLetterAttempt, Vt as isFinalAttempt, _t as clearConsumedConversationWake, bt as completeConversationWork, dt as ackMessages, gt as checkInConversationWork, jt as releaseConversationWork, kt as recordAttemptFailure, mt as beginConversationResume, wt as ensureConversationWake, xt as countPendingConversationMessages, yt as completeConversationStop, zt as hasConversationStop } from "./stats-
|
|
2
|
+
import { b as isProviderRetryError } from "./client-BV3_abpr.js";
|
|
3
|
+
import { S as withLogContext, d as logInfo, f as logWarn, u as logException } from "./logging-CtfUmyiN.js";
|
|
4
|
+
import { a as getChatConfig } from "./config-DceVK986.js";
|
|
5
|
+
import { At as recordConversationRetry, Ct as drainConversationMailbox, Et as getConversationWorkState, Ft as startConversationWork, Ht as isInvalidConversationRecordError, Nt as requestAnotherSlice, St as deadLetterAttempt, Vt as isFinalAttempt, _t as clearConsumedConversationWake, bt as completeConversationWork, dt as ackMessages, gt as checkInConversationWork, jt as releaseConversationWork, kt as recordAttemptFailure, mt as beginConversationResume, wt as ensureConversationWake, xt as countPendingConversationMessages, yt as completeConversationStop, zt as hasConversationStop } from "./stats-BjipUP7p.js";
|
|
6
6
|
import { c as ConversationQueueMessageRejectedError } from "./vercel-queue-DIkVcfK4.js";
|
|
7
|
-
import { a as getTurnRequestDeadline } from "./job-queue-
|
|
7
|
+
import { a as getTurnRequestDeadline } from "./job-queue-DwA7xmCQ.js";
|
|
8
8
|
//#region src/chat/task-execution/worker.ts
|
|
9
9
|
var worker_exports = /* @__PURE__ */ __exportAll({
|
|
10
10
|
CONVERSATION_WORK_DEFER_DELAY_MS: () => CONVERSATION_WORK_DEFER_DELAY_MS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.218.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"pg": "^8.16.3",
|
|
86
86
|
"yaml": "^2.9.0",
|
|
87
87
|
"zod": "^4.5.4",
|
|
88
|
-
"@sentry/junior-plugin-api": "0.
|
|
88
|
+
"@sentry/junior-plugin-api": "0.218.0"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
91
|
"@emnapi/core": "^1.10.0",
|
|
@@ -104,9 +104,9 @@
|
|
|
104
104
|
"typescript": "^6.0.3",
|
|
105
105
|
"vercel": "^54.4.0",
|
|
106
106
|
"vitest": "^4.1.7",
|
|
107
|
-
"@sentry/junior-
|
|
107
|
+
"@sentry/junior-github": "0.218.0",
|
|
108
108
|
"@sentry/junior-testing": "0.0.0",
|
|
109
|
-
"@sentry/junior-
|
|
109
|
+
"@sentry/junior-memory": "0.218.0"
|
|
110
110
|
},
|
|
111
111
|
"scripts": {
|
|
112
112
|
"build": "tsdown",
|