@sentry/junior 0.302.0 → 0.303.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-context-Cx9fn9B3.js → adapter-context-BdVnSuY5.js} +2 -2
- package/dist/{admin-_poE5NKL.js → admin-AfeAdS3J.js} +2 -2
- package/dist/{agent-runner-CY9RvsTX.js → agent-runner-BP8_DLUv.js} +2987 -2948
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +6 -6
- package/dist/api.d.ts +13 -12
- package/dist/api.js +207 -80
- package/dist/{app-BpY3wtRP.d.ts → app-Dd9v1mNx.d.ts} +15 -15
- package/dist/app.d.ts +1 -1
- package/dist/app.js +63 -64
- package/dist/{automation-Cva5ZOwW.js → automation-D9MvhOWY.js} +3 -1
- package/dist/{background-compaction-queue-CXFq1_Cz.js → background-compaction-queue-xaE05jxH.js} +6 -6
- package/dist/{briefs-B3NG-pid.js → briefs-D8i-dKTp.js} +4 -4
- package/dist/{catalog-runtime-Dss0lSV6.js → catalog-runtime-d1EM6Z0V.js} +2 -2
- package/dist/cli/chat.d.ts +1 -1
- package/dist/cli/chat.js +21 -21
- package/dist/cli/check.js +8 -8
- package/dist/cli/env.d.ts +1 -0
- package/dist/cli/env.js +8 -7
- package/dist/cli/init.js +13 -4
- package/dist/cli/main.js +4 -4
- package/dist/cli/plugins.js +6 -6
- package/dist/cli/snapshot-create.js +7 -5
- package/dist/cli/upgrade.d.ts +2 -2
- package/dist/cli/upgrade.js +5 -5
- package/dist/{config-CzeZiMKs.js → config-oGM7KA9M.js} +44 -63
- package/dist/{connections-CDYhMfrs.js → connections-BlikzEJv.js} +6 -6
- package/dist/{continue-in-slack-7Uf05ndC.js → continue-in-slack-BZnYifiG.js} +5 -5
- package/dist/{conversation-BNXfq6Lb.js → conversation-CY1jnBiC.js} +1 -1
- package/dist/{conversation-feed-Clf_cv0n.js → conversation-feed-BZJRk6UV.js} +1 -1
- package/dist/{conversation-privacy-D9xnM5mK.js → conversation-privacy-Cx515ddM.js} +7 -7
- package/dist/{conversation-turn-D7SEZgTG.js → conversation-turn-DAhRdX4m.js} +20 -23
- package/dist/{credential-sync-DoD0gW-j.js → credential-sync-DfhmWFeo.js} +18 -18
- package/dist/{db-B-gtnNjr.js → db-C-2tFxk3.js} +15 -15
- package/dist/{db-BdsCzytP.d.ts → db-DPqcEM9_.d.ts} +25 -25
- package/dist/{executor-DZg20EqU.js → executor-NVfS8aQ2.js} +14 -8
- package/dist/{history-IjdmO_r6.js → history-UZ3M2M9r.js} +13 -10
- package/dist/{install-t1KQyTUs.js → install-CHLrpRZc.js} +3 -3
- package/dist/instrumentation.d.ts +4 -4
- package/dist/instrumentation.js +10 -10
- package/dist/{lineage-C79GjoQr.js → lineage-HGLhd_-N.js} +2 -2
- package/dist/{logging-C9oDAg4M.js → logging-DiyqRLBx.js} +19 -19
- package/dist/{message-BLUCzJXN.js → message-CkCOcbFH.js} +9 -9
- package/dist/{model-input-5jwNC45G.js → model-input-DmoPPtPE.js} +4 -9
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +7 -7
- package/dist/{oauth-callback-server-BBl66vCb.js → oauth-callback-server-CIf_6YmA.js} +5 -4
- package/dist/{oauth-relay-DRzq73b6.js → oauth-relay-DAmfVmJu.js} +3 -6
- package/dist/{package-discovery-DJhGdS4c.js → package-discovery-x4AvVhMj.js} +1 -1
- package/dist/{plugin-module-Cf5gVPWP.js → plugin-module-Cv2ETe8Y.js} +1 -1
- package/dist/{plugins-BBX07Jzt.js → plugins-Bkk0XRo2.js} +3 -3
- package/dist/{projection-CIBwgD3s.js → projection-DBq8tsA5.js} +221 -173
- package/dist/{prompt-CRQbzp5e.js → prompt-D2KlJopL.js} +4 -4
- package/dist/{queue-CZyYgPF0.d.ts → queue-CbEHUO0l.d.ts} +1 -1
- package/dist/{queue-DtCDaIct.js → queue-DFaOscp5.js} +4 -4
- package/dist/{registry-DdFQHZ_d.js → registry-Bu0Z9BEO.js} +37 -37
- package/dist/{resolve-CdW4BdrK.js → resolve-DXuA3G0g.js} +3 -3
- package/dist/{result-oOMv1t4O.js → result-DpiNseDA.js} +10 -15
- package/dist/rolldown-runtime-BKpuH2hG.js +26 -0
- package/dist/{runner-DqitLtm-.js → runner-iu1heRFv.js} +10 -10
- package/dist/{sandbox-egress-signals-Bw9I0yfJ.js → sandbox-egress-signals-2HFYDcQf.js} +1 -1
- package/dist/{schema-BIFM-U1a.d.ts → schema-DHMOaRzC.d.ts} +520 -13
- package/dist/{schema-DnVQepWP.js → schema-DvfX3Gq_.js} +77 -13
- package/dist/{secrets-DebYU866.js → secrets-DHaJ5TTn.js} +4 -4
- package/dist/{sentry-BRTJqumy.js → sentry-CPbZjomA.js} +3 -28
- package/dist/{sentry-route-name-BhwWnfqj.js → sentry-route-name-C6EIzAGP.js} +1 -1
- package/dist/{service-account-CrZftRTb.js → service-account-BcT5LR7V.js} +47 -47
- package/dist/{service-account-B6mKAPVo.js → service-account-xYkaQTrw.js} +3 -3
- package/dist/{session-stop-DW63Z3kj.js → session-stop-BLLp1IP_.js} +28 -35
- package/dist/{skills-C16fz60Z.js → skills-CNAGH4ju.js} +6 -9
- package/dist/{slack-conversation-unfurl-BHhefEb7.js → slack-conversation-unfurl-DYnqe5ci.js} +10 -15
- package/dist/{spawn-D_RnFYfy.js → spawn-cGasWW33.js} +7 -7
- package/dist/{legacy-web-actor-id-C-cEeWqL.js → state-CDS6h_Wv.js} +32 -32
- package/dist/{stop-7p1i08CY.js → stop-DMMA67yT.js} +221 -139
- package/dist/{store-C28I0CVW.js → store-Dgs7Oe44.js} +5 -5
- package/dist/{task-queue-BVUJbQ28.js → task-queue-DcF0nhhz.js} +3 -3
- package/dist/{task-runner-CWi8j7Z6.js → task-runner-BGXF7Fo7.js} +15 -18
- package/dist/{thread-context-D3-yYUd0.js → thread-context-BPky1KBe.js} +12 -12
- package/dist/{turn-session-routing-BFMS9ATF.js → turn-session-routing-DGvn9MSl.js} +32 -32
- package/dist/{turn-user-message-C3-O8Omt.js → turn-user-message-19CkuUvM.js} +3 -3
- package/dist/{validation-BSFKUIb4.js → validation-lu1DgjNQ.js} +2 -2
- package/dist/vercel.js +1 -1
- package/dist/{version-BHHXNi-0.js → version-Uo3c94Dx.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-B1SO21Qa.js → viewer-BPQHMx3-.js} +3 -3
- package/dist/{warmup-Bz9bzkzN.js → warmup-H8uLvW9e.js} +149 -130
- package/dist/{worker-BspReIIK.js → worker-B-pM_-3K.js} +9 -12
- package/migrations/0109_user_preferences.sql +1 -0
- package/migrations/0110_code_change_repository_state_index.sql +1 -0
- package/migrations/meta/0109_snapshot.json +4925 -0
- package/migrations/meta/0110_snapshot.json +4952 -0
- package/migrations/meta/_journal.json +15 -1
- package/package.json +16 -19
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as completeObject$1, S as completeDecision$1, T as embedTexts$1, w as completeText$1 } from "./config-
|
|
2
|
-
import { _ as runBestEffort, a as extractGenAiUsageSummary } from "./logging-
|
|
3
|
-
import { at as agentTurnCostUsd, r as getConversationEventStore } from "./db-
|
|
4
|
-
import { Q as briefOutcomeStatusSchema, et as conversationBriefSchema, tt as parseBriefInput } from "./conversation-
|
|
1
|
+
import { C as completeObject$1, S as completeDecision$1, T as embedTexts$1, w as completeText$1 } from "./config-oGM7KA9M.js";
|
|
2
|
+
import { _ as runBestEffort, a as extractGenAiUsageSummary } from "./logging-DiyqRLBx.js";
|
|
3
|
+
import { at as agentTurnCostUsd, r as getConversationEventStore } from "./db-C-2tFxk3.js";
|
|
4
|
+
import { Q as briefOutcomeStatusSchema, et as conversationBriefSchema, tt as parseBriefInput } from "./conversation-CY1jnBiC.js";
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { conversationEventPresentationSchema, defineConversationEvent } from "@sentry/junior-plugin-api";
|
|
7
7
|
// src/chat/conversations/structured-events.ts
|
|
@@ -7,7 +7,7 @@ declare const conversationQueueMessageSchema: z.ZodObject<{
|
|
|
7
7
|
/** Conversation work hint accepted by the queue callback and worker. */
|
|
8
8
|
type ConversationQueueMessage = z.output<typeof conversationQueueMessageSchema>;
|
|
9
9
|
interface ConversationQueueSendOptions {
|
|
10
|
-
delayMs?: number;
|
|
10
|
+
delayMs?: number | undefined;
|
|
11
11
|
idempotencyKey?: string;
|
|
12
12
|
}
|
|
13
13
|
interface ConversationQueueSendResult {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
2
|
-
import { h as logWarn } from "./logging-
|
|
3
|
-
import { a as queueCallback, d as verifyQueueMessage, f as getQueueProvider, l as QUEUE_SIGNATURE_MAX_AGE_MS, u as signQueueMessage } from "./background-compaction-queue-
|
|
1
|
+
import { i as getChatConfig } from "./config-oGM7KA9M.js";
|
|
2
|
+
import { h as logWarn } from "./logging-DiyqRLBx.js";
|
|
3
|
+
import { a as queueCallback, d as verifyQueueMessage, f as getQueueProvider, l as QUEUE_SIGNATURE_MAX_AGE_MS, u as signQueueMessage } from "./background-compaction-queue-xaE05jxH.js";
|
|
4
4
|
import * as z from "zod";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
// src/chat/sandbox/snapshot/job-queue.ts
|
|
@@ -92,7 +92,7 @@ function cacheWarmupCallback() {
|
|
|
92
92
|
maxDeliveries: 1,
|
|
93
93
|
onRejected: logCacheWarmupRejected,
|
|
94
94
|
run: async (message) => {
|
|
95
|
-
const { runCacheWarmup } = await import("./warmup-
|
|
95
|
+
const { runCacheWarmup } = await import("./warmup-H8uLvW9e.js").then((n) => n.s);
|
|
96
96
|
await runCacheWarmup(message);
|
|
97
97
|
},
|
|
98
98
|
skip: () => !getChatConfig().cacheWarmingEnabled,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-x4AvVhMj.js";
|
|
2
|
+
import { b as setSpanAttributes, h as logWarn, m as logInfo } from "./logging-DiyqRLBx.js";
|
|
2
3
|
import { o as isUserActor, s as parseActorUserId } from "./actor-D2iXzvlN.js";
|
|
3
|
-
import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-DJhGdS4c.js";
|
|
4
4
|
import * as z from "zod";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
|
@@ -305,7 +305,7 @@ function manifestConfigPatch(config) {
|
|
|
305
305
|
setDefined(result, "command-env", config.commandEnv);
|
|
306
306
|
setDefined(result, "env-vars", config.envVars);
|
|
307
307
|
if (config.credentials !== void 0) {
|
|
308
|
-
if (!config.credentials) result
|
|
308
|
+
if (!config.credentials) result["credentials"] = null;
|
|
309
309
|
else {
|
|
310
310
|
const credentials = {};
|
|
311
311
|
setDefined(credentials, "type", config.credentials.type);
|
|
@@ -313,13 +313,13 @@ function manifestConfigPatch(config) {
|
|
|
313
313
|
setDefined(credentials, "api-headers", config.credentials.apiHeaders);
|
|
314
314
|
setDefined(credentials, "auth-token-env", config.credentials.authTokenEnv);
|
|
315
315
|
setDefined(credentials, "auth-token-placeholder", config.credentials.authTokenPlaceholder);
|
|
316
|
-
result
|
|
316
|
+
result["credentials"] = credentials;
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
319
|
setDefined(result, "runtime-dependencies", config.runtimeDependencies);
|
|
320
320
|
setDefined(result, "runtime-postinstall", config.runtimePostinstall);
|
|
321
321
|
if (config.mcp !== void 0) {
|
|
322
|
-
if (!config.mcp) result
|
|
322
|
+
if (!config.mcp) result["mcp"] = null;
|
|
323
323
|
else {
|
|
324
324
|
const mcp = {};
|
|
325
325
|
setDefined(mcp, "transport", config.mcp.transport);
|
|
@@ -329,11 +329,11 @@ function manifestConfigPatch(config) {
|
|
|
329
329
|
setDefined(mcp, "oauth-client", config.mcp.oauthClient && mcpOauthClientSource(config.mcp.oauthClient));
|
|
330
330
|
setDefined(mcp, "allowed-tools", config.mcp.allowedTools);
|
|
331
331
|
setDefined(mcp, "wrapped-tools", config.mcp.wrappedTools);
|
|
332
|
-
result
|
|
332
|
+
result["mcp"] = mcp;
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
if (config.oauth !== void 0) {
|
|
336
|
-
if (!config.oauth) result
|
|
336
|
+
if (!config.oauth) result["oauth"] = null;
|
|
337
337
|
else {
|
|
338
338
|
const oauth = {};
|
|
339
339
|
setDefined(oauth, "client-id-env", config.oauth.clientIdEnv);
|
|
@@ -345,18 +345,18 @@ function manifestConfigPatch(config) {
|
|
|
345
345
|
setDefined(oauth, "token-auth-method", config.oauth.tokenAuthMethod);
|
|
346
346
|
setDefined(oauth, "token-extra-headers", config.oauth.tokenExtraHeaders);
|
|
347
347
|
setDefined(oauth, "treat-empty-scope-as-unreported", config.oauth.treatEmptyScopeAsUnreported);
|
|
348
|
-
result
|
|
348
|
+
result["oauth"] = oauth;
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
|
-
if (config.accounts !== void 0) result
|
|
351
|
+
if (config.accounts !== void 0) result["accounts"] = config.accounts && accountsSource(config.accounts);
|
|
352
352
|
if (config.target !== void 0) {
|
|
353
|
-
if (!config.target) result
|
|
353
|
+
if (!config.target) result["target"] = null;
|
|
354
354
|
else {
|
|
355
355
|
const target = {};
|
|
356
356
|
setDefined(target, "type", config.target.type);
|
|
357
357
|
setDefined(target, "config-key", config.target.configKey);
|
|
358
358
|
setDefined(target, "command-flags", config.target.commandFlags);
|
|
359
|
-
result
|
|
359
|
+
result["target"] = target;
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
362
|
return result;
|
|
@@ -382,7 +382,7 @@ function mergeManifestConfig(base, patch, options = {}) {
|
|
|
382
382
|
return merged;
|
|
383
383
|
}
|
|
384
384
|
function applyManifestConfig(source, config) {
|
|
385
|
-
const name = source
|
|
385
|
+
const name = source["name"];
|
|
386
386
|
if (typeof name !== "string") return source;
|
|
387
387
|
const manifestConfig = config?.manifests?.[name];
|
|
388
388
|
if (manifestConfig && "name" in manifestConfig) throw new Error("plugins.manifests cannot change plugin names");
|
|
@@ -478,7 +478,7 @@ function assertCommandEnvHostRefsAreExplicitlyExposed(commandEnv, envVars, plugi
|
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
function normalizeCredentials(data, name) {
|
|
481
|
-
if (data
|
|
481
|
+
if (data["type"] !== "oauth-bearer") throw new Error(`Plugin ${name} has unsupported credentials.type: "${String(data["type"])}"`);
|
|
482
482
|
const result = oauthBearerCredentialsSchema.safeParse(data);
|
|
483
483
|
if (!result.success) throw new Error(issueMessage(result.error, `Plugin ${name} credentials`));
|
|
484
484
|
if (!result.data.domains) throw new Error(`Plugin ${name} credentials requires domains`);
|
|
@@ -602,7 +602,7 @@ function expandEnvPlaceholders(template, envVars, context) {
|
|
|
602
602
|
}
|
|
603
603
|
function normalizeMcp(data, envVars, name) {
|
|
604
604
|
const prepared = { ...data };
|
|
605
|
-
if (typeof prepared
|
|
605
|
+
if (typeof prepared["url"] === "string") prepared["url"] = expandEnvPlaceholders(prepared["url"], envVars, `Plugin ${name} mcp.url`);
|
|
606
606
|
const result = mcpSourceSchema.safeParse(prepared);
|
|
607
607
|
if (!result.success) throw new Error(issueMessage(result.error, `Plugin ${name} mcp`));
|
|
608
608
|
const headers = result.data.headers ? normalizeStringMap(result.data.headers, `Plugin ${name} mcp.headers`, { forbiddenKeys: FORBIDDEN_API_HEADER_NAMES }) : void 0;
|
|
@@ -668,20 +668,20 @@ function parseManifestSource(parsedSource, dir, config, options) {
|
|
|
668
668
|
if (!sourceResult.success) {
|
|
669
669
|
const issue = sourceResult.error.issues[0];
|
|
670
670
|
const path = formatPath(issue?.path ?? []);
|
|
671
|
-
if (path === "name") throw new Error(`Invalid plugin name in ${dir}: "${parsedSource
|
|
671
|
+
if (path === "name") throw new Error(`Invalid plugin name in ${dir}: "${String(parsedSource["name"])}"`);
|
|
672
672
|
if (path === "description") throw new Error(`Invalid plugin description in ${dir}`);
|
|
673
|
-
if (path === "config-keys") throw new Error(`Plugin ${String(parsedSource
|
|
674
|
-
if (path === "domains") throw new Error(`Plugin ${String(parsedSource
|
|
675
|
-
if (path === "api-headers") throw new Error(`Plugin ${String(parsedSource
|
|
676
|
-
if (path === "command-env") throw new Error(`Plugin ${String(parsedSource
|
|
677
|
-
if (path === "credentials") throw new Error(`Plugin ${String(parsedSource
|
|
678
|
-
if (path === "runtime-dependencies") throw new Error(`Plugin ${String(parsedSource
|
|
679
|
-
if (path === "runtime-postinstall") throw new Error(`Plugin ${String(parsedSource
|
|
680
|
-
if (path === "env-vars") throw new Error(`Plugin ${String(parsedSource
|
|
681
|
-
if (path === "mcp") throw new Error(`Plugin ${String(parsedSource
|
|
682
|
-
if (path === "oauth") throw new Error(`Plugin ${String(parsedSource
|
|
683
|
-
if (path === "accounts") throw new Error(`Plugin ${String(parsedSource
|
|
684
|
-
if (path === "target") throw new Error(`Plugin ${String(parsedSource
|
|
673
|
+
if (path === "config-keys") throw new Error(`Plugin ${String(parsedSource["name"] ?? "unknown")} config-keys must be an array when provided`);
|
|
674
|
+
if (path === "domains") throw new Error(`Plugin ${String(parsedSource["name"] ?? "unknown")} ${path} must be a non-empty array of domains`);
|
|
675
|
+
if (path === "api-headers") throw new Error(`Plugin ${String(parsedSource["name"] ?? "unknown")} api-headers must be an object when provided`);
|
|
676
|
+
if (path === "command-env") throw new Error(`Plugin ${String(parsedSource["name"] ?? "unknown")} command-env must be an object when provided`);
|
|
677
|
+
if (path === "credentials") throw new Error(`Plugin ${String(parsedSource["name"] ?? "unknown")} credentials must be an object when provided`);
|
|
678
|
+
if (path === "runtime-dependencies") throw new Error(`Plugin ${String(parsedSource["name"] ?? "unknown")} runtime-dependencies must be an array`);
|
|
679
|
+
if (path === "runtime-postinstall") throw new Error(`Plugin ${String(parsedSource["name"] ?? "unknown")} runtime-postinstall must be an array`);
|
|
680
|
+
if (path === "env-vars") throw new Error(`Plugin ${String(parsedSource["name"] ?? "unknown")} env-vars must be an object`);
|
|
681
|
+
if (path === "mcp") throw new Error(`Plugin ${String(parsedSource["name"] ?? "unknown")} mcp must be an object`);
|
|
682
|
+
if (path === "oauth") throw new Error(`Plugin ${String(parsedSource["name"] ?? "unknown")} oauth must be an object`);
|
|
683
|
+
if (path === "accounts") throw new Error(`Plugin ${String(parsedSource["name"] ?? "unknown")} accounts must be an object`);
|
|
684
|
+
if (path === "target") throw new Error(`Plugin ${String(parsedSource["name"] ?? "unknown")} target must be an object`);
|
|
685
685
|
throw new Error(issue?.message ?? `Invalid plugin manifest in ${dir}`);
|
|
686
686
|
}
|
|
687
687
|
const data = sourceResult.data;
|
|
@@ -762,7 +762,7 @@ function parsePluginManifest(raw, dir, config) {
|
|
|
762
762
|
try {
|
|
763
763
|
parsedYaml = parse(raw);
|
|
764
764
|
} catch (error) {
|
|
765
|
-
throw new Error(`Invalid plugin manifest in ${dir}: ${error instanceof Error ? error.message : String(error)}
|
|
765
|
+
throw new Error(`Invalid plugin manifest in ${dir}: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
766
766
|
}
|
|
767
767
|
if (!parsedYaml || typeof parsedYaml !== "object" || Array.isArray(parsedYaml)) throw new Error(`Invalid plugin manifest in ${dir}: expected an object`);
|
|
768
768
|
return parseManifestSource(parsedYaml, dir, config);
|
|
@@ -1034,7 +1034,7 @@ async function readBoundedOAuthErrorBody(response) {
|
|
|
1034
1034
|
}
|
|
1035
1035
|
/** Preserve small OAuth error responses while bounding bodies before SDK parsing. */
|
|
1036
1036
|
function fetchWithBoundedOAuthErrorBodies(fetchFn = globalThis.fetch, onErrorResponseStatus) {
|
|
1037
|
-
return
|
|
1037
|
+
return async (input, init) => {
|
|
1038
1038
|
const response = await fetchFn(input, init);
|
|
1039
1039
|
if (response.ok) return response;
|
|
1040
1040
|
onErrorResponseStatus?.(response.status);
|
|
@@ -1050,7 +1050,7 @@ function fetchWithBoundedOAuthErrorBodies(fetchFn = globalThis.fetch, onErrorRes
|
|
|
1050
1050
|
status: response.status,
|
|
1051
1051
|
statusText: response.statusText
|
|
1052
1052
|
});
|
|
1053
|
-
}
|
|
1053
|
+
};
|
|
1054
1054
|
}
|
|
1055
1055
|
// src/chat/plugins/command-env.ts
|
|
1056
1056
|
const ENV_PLACEHOLDER_RE$1 = /\$\{([A-Z_][A-Z0-9_]*)\}/g;
|
|
@@ -1161,8 +1161,8 @@ function buildOAuthTokenRequest(input) {
|
|
|
1161
1161
|
const payload = { ...input.payload };
|
|
1162
1162
|
if (input.tokenAuthMethod === "basic") headers.set("Authorization", `Basic ${Buffer.from(`${input.clientId}:${input.clientSecret}`).toString("base64")}`);
|
|
1163
1163
|
else {
|
|
1164
|
-
payload
|
|
1165
|
-
payload
|
|
1164
|
+
payload["client_id"] = input.clientId;
|
|
1165
|
+
payload["client_secret"] = input.clientSecret;
|
|
1166
1166
|
}
|
|
1167
1167
|
const contentType = headers.get("Content-Type") ?? DEFAULT_TOKEN_CONTENT_TYPE;
|
|
1168
1168
|
const serializedHeaders = {};
|
|
@@ -1178,11 +1178,11 @@ function buildOAuthTokenRequest(input) {
|
|
|
1178
1178
|
function parseOAuthTokenResponse(data, requestedScope, options) {
|
|
1179
1179
|
const response = requireTokenResponseObject(data);
|
|
1180
1180
|
const accessToken = requireNonEmptyTokenField(response, "access_token");
|
|
1181
|
-
const resolvedRefreshToken = response
|
|
1181
|
+
const resolvedRefreshToken = response["refresh_token"] === void 0 ? options?.refreshToken : requireNonEmptyTokenField(response, "refresh_token");
|
|
1182
1182
|
if (!resolvedRefreshToken) throw new Error("OAuth token response missing refresh_token");
|
|
1183
|
-
const expiresIn = response
|
|
1184
|
-
const refreshTokenExpiresIn = response
|
|
1185
|
-
const responseScope = response
|
|
1183
|
+
const expiresIn = response["expires_in"];
|
|
1184
|
+
const refreshTokenExpiresIn = response["refresh_token_expires_in"];
|
|
1185
|
+
const responseScope = response["scope"];
|
|
1186
1186
|
let scope;
|
|
1187
1187
|
if (responseScope !== void 0) {
|
|
1188
1188
|
if (typeof responseScope !== "string") throw new Error("OAuth token response returned invalid scope");
|
|
@@ -1542,7 +1542,7 @@ function logLoadedPlugins(state) {
|
|
|
1542
1542
|
for (const plugin of [...state.pluginDefinitions].sort((left, right) => left.manifest.name.localeCompare(right.manifest.name))) {
|
|
1543
1543
|
if (loggedPluginNames.has(plugin.manifest.name)) continue;
|
|
1544
1544
|
loggedPluginNames.add(plugin.manifest.name);
|
|
1545
|
-
logInfo("plugin.loaded", {
|
|
1545
|
+
logInfo("plugin.manifest.loaded", {
|
|
1546
1546
|
"app.plugin.name": plugin.manifest.name,
|
|
1547
1547
|
"app.plugin.config_key_count": plugin.manifest.configKeys.length,
|
|
1548
1548
|
"app.plugin.has_mcp": Boolean(plugin.manifest.mcp),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { i as trace, n as postinstall, o as getSandboxResources, t as dependencies } from "./install-CHLrpRZc.js";
|
|
2
|
+
import { ia as isStale, na as create, oa as getSandboxProvider, os as sleep } from "./projection-DBq8tsA5.js";
|
|
3
|
+
import { J as getStateAdapter } from "./db-C-2tFxk3.js";
|
|
4
4
|
import * as z from "zod";
|
|
5
5
|
// src/chat/sandbox/snapshot/resolve.ts
|
|
6
6
|
const SNAPSHOT_CACHE_PREFIX = "junior:sandbox_snapshot_profile:v2";
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { C as
|
|
7
|
-
import {
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
+
import { D as turnBehavior, M as SYSTEM_IDENTITY_ID, a as getConversationStore } from "./db-C-2tFxk3.js";
|
|
3
|
+
import { C as listActiveMailboxTurns, N as renderEventBatchInputs, P as timerWatchCredentialSubject, T as resolveMailboxTurnWork, j as eventBatchMessageMeta, k as EVENT_WAIT_MS, s as eventReviewItemInputs, t as getConversationStoppedAtMs, w as parseEventMessages, x as getEventBatchDelayMs } from "./session-stop-BLLp1IP_.js";
|
|
4
|
+
import { a as EVENT_SYSTEM_ACTOR } from "./prompt-D2KlJopL.js";
|
|
5
|
+
import { f as credentialContextForActor } from "./registry-Bu0Z9BEO.js";
|
|
6
|
+
import { A as getAgentInvocationResultMessageId, C as ownAgentInvocation, D as getAgentInvocationIdForMessage, E as getAgentInvocationIdForEvents, F as getTurnReplyKey, M as getAgentReplyMessageId, O as getAgentInvocationIdForResult, R as buildDeterministicTurnId, S as listChildMessages, b as hasAgentInvocationReply, j as getAgentInvocationTurnId, y as childMessageSenderMetadata } from "./turn-user-message-19CkuUvM.js";
|
|
7
|
+
import { _ as getConversationWorkState, r as appendAndEnqueueInboundMessage } from "./store-Dgs7Oe44.js";
|
|
8
|
+
import { $t as markAgentInvocationParentMailboxAppended, Ht as listUnreportedSiblingAgents, Jt as getLatestAgentInvocationForConversation, Ut as NON_TERMINAL_AGENT_INVOCATION_STATUSES, Wt as TERMINAL_AGENT_INVOCATION_STATUSES, Xt as listAgentInvocationsForConversation, Yt as isTerminalAgentInvocation, an as routeChildInput, cn as logDroppedParentMessage, dn as createAgentInvocationWorker, en as reportReplacedWithoutOpenWork, gn as resolveAgentInvocationId, hn as enqueueAgentInvocation, in as readChildConversationSender, ln as parentMessageText, mn as endAgentInvocationsOfStoppedWork, nn as childAgentInput, pn as endActiveAgentInvocations, rn as getChildAgentInputSender, tn as sendsResultToParent, un as readParentMessage, wn as createAgentInvocationFromLatest } from "./warmup-H8uLvW9e.js";
|
|
9
|
+
import { Jn as renderUntrustedTag } from "./projection-DBq8tsA5.js";
|
|
8
10
|
import { C as agentInvocationResultEventType, S as AGENT_REPLY_EVENT_TYPE, b as AGENT_MESSAGE_EVENT_TYPE, y as AGENT_INVOCATION_EVENT_NAMESPACE } from "./web-message-id-lNodcCOI.js";
|
|
9
|
-
import { A as getAgentInvocationResultMessageId, C as ownAgentInvocation, D as getAgentInvocationIdForMessage, E as getAgentInvocationIdForEvents, F as getTurnReplyKey, M as getAgentReplyMessageId, O as getAgentInvocationIdForResult, R as buildDeterministicTurnId, S as listChildMessages, b as hasAgentInvocationReply, j as getAgentInvocationTurnId, y as childMessageSenderMetadata } from "./turn-user-message-C3-O8Omt.js";
|
|
10
|
-
import { _ as getConversationWorkState, r as appendAndEnqueueInboundMessage } from "./store-C28I0CVW.js";
|
|
11
11
|
import { actorSchema } from "@sentry/junior-plugin-api";
|
|
12
12
|
// src/chat/agent-invocations/result.ts
|
|
13
13
|
var result_exports = /* @__PURE__ */ __exportAll({
|
|
14
14
|
createChildConversationWorker: () => createChildConversationWorker,
|
|
15
|
-
createDeliverToParent: () => createDeliverToParent
|
|
16
|
-
createEndStoppedChildWork: () => createEndStoppedChildWork,
|
|
17
|
-
enqueueAgentInvocationResult: () => enqueueAgentInvocationResult,
|
|
18
|
-
enqueueAgentMessageToParent: () => enqueueAgentMessageToParent,
|
|
19
|
-
enqueueChildResultToParent: () => enqueueChildResultToParent,
|
|
20
|
-
withAgentInvocationResultActors: () => withAgentInvocationResultActors
|
|
15
|
+
createDeliverToParent: () => createDeliverToParent
|
|
21
16
|
});
|
|
22
17
|
const AGENT_INVOCATION_RESULT_MAX_LENGTH = 12e3;
|
|
23
18
|
/**
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __exportAll = (all, flags) => {
|
|
7
|
+
let target = Object.setPrototypeOf({}, null);
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
if (!(flags & 1)) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
13
|
+
return flags & 2 ? target : Object.preventExtensions(target);
|
|
14
|
+
};
|
|
15
|
+
var __copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
17
|
+
key = keys[i];
|
|
18
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
19
|
+
get: ((k) => from[k]).bind(null, key),
|
|
20
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
26
|
+
export { __reExport as n, __exportAll as t };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { M as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { a as getPersistedThreadState, c as coerceThreadConversationState, i as getPersistedSandboxState, s as persistThreadStateById } from "./turn-session-routing-
|
|
7
|
-
import { _ as ConversationTurnLifecycleService, g as startActiveTurn, h as markTurnFailed } from "./turn-user-message-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { V as messageCardText } from "./conversation-CY1jnBiC.js";
|
|
2
|
+
import { c as buildDeliveredTurnStatePatch, l as loadPendingMessageCards, o as completeAuthPauseTurn, r as finalizeFailedTurnReplyWithEvent, t as buildTurnThreadContext } from "./thread-context-BPky1KBe.js";
|
|
3
|
+
import { A as latestConversationMessageSeq, I as upsertConversationMessage, M as normalizeConversationText, N as recordDeliveredAssistantMessage, W as authorizationId, a as loadProjection, b as persistConversationMessages, bn as persistWithRetry, d as recordAuthorizationCompleted, j as markConversationMessage, nt as saveTurnCheckpoint, t as commitAcceptedReply, un as getAssistantReplyText, v as hydrateConversationMessages } from "./projection-DBq8tsA5.js";
|
|
4
|
+
import { S as setTags, T as withLogContext, p as logException } from "./logging-DiyqRLBx.js";
|
|
5
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-BGXF7Fo7.js";
|
|
6
|
+
import { a as getPersistedThreadState, c as coerceThreadConversationState, i as getPersistedSandboxState, s as persistThreadStateById } from "./turn-session-routing-DGvn9MSl.js";
|
|
7
|
+
import { _ as ConversationTurnLifecycleService, g as startActiveTurn, h as markTurnFailed } from "./turn-user-message-19CkuUvM.js";
|
|
8
|
+
import { f as credentialContextForActor } from "./registry-Bu0Z9BEO.js";
|
|
9
|
+
import { M as SYSTEM_IDENTITY_ID, a as getConversationStore, r as getConversationEventStore } from "./db-C-2tFxk3.js";
|
|
10
10
|
import { randomUUID } from "node:crypto";
|
|
11
11
|
import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
|
|
12
12
|
// src/chat/local/runner.ts
|
|
@@ -317,7 +317,7 @@ async function runLocalAgentTurnInContext(input, deps) {
|
|
|
317
317
|
failureCode: "persistence_failed",
|
|
318
318
|
turnId
|
|
319
319
|
});
|
|
320
|
-
throw new AggregateError([error, persistenceError], "Local turn failure state could not be persisted");
|
|
320
|
+
throw new AggregateError([error, persistenceError], "Local turn failure state could not be persisted", { cause: persistenceError });
|
|
321
321
|
}
|
|
322
322
|
await lifecycle.fail({
|
|
323
323
|
conversationId: input.conversationId,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ya as sandboxEgressSignalsResponseSchema } from "./projection-DBq8tsA5.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;
|