@sentry/junior 0.225.0 → 0.226.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-hooks-CRuRcOg9.js → agent-hooks-FUetyyLe.js} +22 -15
- package/dist/{agent-runner-Cad1RtWn.js → agent-runner-DEF7auSj.js} +2946 -247
- package/dist/api/schema.d.ts +353 -10
- package/dist/api/schema.js +4 -4
- package/dist/api.js +22 -18
- package/dist/{app-BbSD6EtD.d.ts → app-TVL42pGL.d.ts} +1 -1
- package/dist/app.d.ts +1 -1
- package/dist/app.js +889 -7675
- package/dist/{briefs-BtnkPWT5.js → briefs-Cb4T2BUI.js} +4 -4
- package/dist/{catalog-runtime-pv4grNNb.js → catalog-runtime-BYGR3Dr4.js} +1 -1
- package/dist/{checkpoint-6fkAdB3g.js → checkpoint-CJe-dZFF.js} +76 -10
- 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.js +3 -3
- package/dist/cli/snapshot-create.js +3 -3
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-ihmkx60d.js → client-C2WBBx7m.js} +2 -2
- package/dist/{config-DMg679BW.js → config-Bws6Rpsh.js} +2 -2
- package/dist/{conversation-Bygi39Xj.js → conversation-DPbmIwjy.js} +66 -5
- package/dist/{conversation-privacy-ZYy05Y3q.js → conversation-privacy-pCcW0a5Y.js} +1 -1
- package/dist/{credential-sync-DCB2SwnQ.js → credential-sync-ibuNsMyl.js} +14 -134
- package/dist/{executor-B9R4cHte.js → executor-D36FWjcf.js} +1 -1
- package/dist/{history-yaSjGMD_.d.ts → history-DI9KJT3J.d.ts} +38 -1
- package/dist/instrumentation.js +2 -2
- package/dist/{vercel-queue-DIkVcfK4.js → job-queue-2mFFDMHB.js} +61 -2
- package/dist/{logging-CcTvYQ8A.js → logging-CvjMHRvg.js} +1 -1
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -4
- package/dist/{oauth-authorization-BS4vPJmu.js → oauth-authorization-l4O1rXsL.js} +1 -1
- package/dist/{oauth-callback-server-DnlQsGBJ.js → oauth-callback-server-Ds8M5FFX.js} +2 -2
- package/dist/pending-auth-DLNJbD8H.js +59 -0
- package/dist/{profile-CV97YuiL.js → profile-dvV7PB7u.js} +4 -4
- package/dist/{prompt-CL8zxsmm.js → prompt-DehgjkO5.js} +1 -1
- package/dist/{registry-C8I4IejN.js → registry-C6FHctIu.js} +1 -1
- package/dist/{resolve-DXVAzYa3.js → resolve-DqwGI9wq.js} +2 -2
- package/dist/{runner-Die1RJ_z.js → runner-CzYEcB73.js} +9 -9
- package/dist/{sandbox-egress-signals-BZepyVh1.js → sandbox-egress-signals-BZOv0fns.js} +1 -1
- package/dist/{schema-BE4uso4i.js → schema-BZg-xzfG.js} +2 -2
- package/dist/{skills-DUcDEgDI.js → skills-EhiVbjF4.js} +2 -2
- package/dist/{spawn-o15i3tJu.js → spawn-Ck3L0rEr.js} +2 -2
- package/dist/{task-queue-D3PLY59C.js → task-queue-TXhAWQwj.js} +3 -4
- package/dist/{task-runner-BMl2aM2v.js → task-runner-axUJS1No.js} +380 -11
- package/dist/{thread-state-CAR6gdAm.js → thread-state-CTuWhjru.js} +5 -5
- package/dist/{turn-failure-response-CZyoUMkD.js → turn-failure-response-csVoLOzx.js} +8 -9
- package/dist/{turn-lifecycle-DPDHKi2U.js → turn-lifecycle-C1S6vELh.js} +1 -1
- package/dist/{turn-session-routing-Jkmmxpp-.js → turn-session-routing-5RejBvit.js} +1 -1
- package/dist/{validation-BcGGxOa6.js → validation-q2PFxkTQ.js} +1 -1
- package/dist/{version-DYcuOFQb.js → version-ByLtIYyy.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/web-authorization-Biy8nsS7.js +162 -0
- package/dist/web-input-DM9LaEdn.js +7774 -0
- package/dist/{reporting-window-DbUqng0P.js → web-message-id-xPI_EFSC.js} +11 -1
- package/dist/{work-Bm90pR9P.js → work-QrbHdXTc.js} +7 -8
- package/dist/{worker-BvHr6JhE.js → worker-r17aopXW.js} +5 -6
- package/package.json +4 -4
- package/dist/execution-stats-CR9CYpyj.js +0 -373
- package/dist/job-queue-D2SiTrnt.js +0 -63
- package/dist/short-title-3wYH3ipl.js +0 -71
- package/dist/stats-DawHjcTw.js +0 -2758
- package/dist/web-authorization-B09B8A8R.js +0 -38
- package/dist/web-input-CGE58TpK.js +0 -899
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { a as getChatConfig } from "./config-Bws6Rpsh.js";
|
|
2
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
1
3
|
import { z } from "zod";
|
|
2
|
-
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
4
|
+
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
3
5
|
import { QueueClient } from "@vercel/queue";
|
|
4
6
|
/** Validate the v2 conversation work hint sent through Vercel Queue. */
|
|
5
7
|
const conversationQueueMessageSchema = z.object({
|
|
@@ -21,6 +23,24 @@ function isConversationQueueMessageRejectedError(error) {
|
|
|
21
23
|
return error instanceof ConversationQueueMessageRejectedError;
|
|
22
24
|
}
|
|
23
25
|
//#endregion
|
|
26
|
+
//#region src/chat/runtime/request-deadline.ts
|
|
27
|
+
const requestDeadlineStorage = new AsyncLocalStorage();
|
|
28
|
+
function createTurnRequestDeadline(startedAtMs) {
|
|
29
|
+
return {
|
|
30
|
+
startedAtMs,
|
|
31
|
+
deadlineAtMs: startedAtMs + Math.max(1, getChatConfig().functionMaxDurationSeconds * 1e3 - 2e4)
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/** Return the host request deadline inherited by the current async turn. */
|
|
35
|
+
function getTurnRequestDeadline() {
|
|
36
|
+
return requestDeadlineStorage.getStore();
|
|
37
|
+
}
|
|
38
|
+
/** Run work with one host request deadline shared by nested queued turns. */
|
|
39
|
+
function runWithTurnRequestDeadline(callback, startedAtMs = Date.now()) {
|
|
40
|
+
if (requestDeadlineStorage.getStore()) return callback();
|
|
41
|
+
return requestDeadlineStorage.run(createTurnRequestDeadline(startedAtMs), callback);
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
24
44
|
//#region src/chat/vercel-queue-client.ts
|
|
25
45
|
function defaultQueueClientOptions() {
|
|
26
46
|
if (process.env.VERCEL_DEPLOYMENT_ID?.trim()) return {};
|
|
@@ -164,4 +184,43 @@ function getVercelConversationWorkQueue() {
|
|
|
164
184
|
return defaultQueue;
|
|
165
185
|
}
|
|
166
186
|
//#endregion
|
|
167
|
-
|
|
187
|
+
//#region src/chat/sandbox/snapshot/job-queue.ts
|
|
188
|
+
/** Send Workspace snapshot build messages. */
|
|
189
|
+
const SIGNATURE_CONTEXT = "junior.workspace_snapshot_queue.v1";
|
|
190
|
+
const SIGNATURE_VERSION = "v1";
|
|
191
|
+
const WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC = "junior_workspace_snapshots";
|
|
192
|
+
const workspaceSnapshotJobSign = {
|
|
193
|
+
context: SIGNATURE_CONTEXT,
|
|
194
|
+
schema: z.object({
|
|
195
|
+
workspaceId: z.string().uuid(),
|
|
196
|
+
profileHash: z.string().min(1)
|
|
197
|
+
}).strict(),
|
|
198
|
+
signatureVersion: SIGNATURE_VERSION,
|
|
199
|
+
parts: (message) => [message.workspaceId, message.profileHash]
|
|
200
|
+
};
|
|
201
|
+
function jobId(message) {
|
|
202
|
+
return `workspace-snapshot_${createHash("sha256").update(message.workspaceId).update("\0").update(message.profileHash).digest("hex").slice(0, 32)}`;
|
|
203
|
+
}
|
|
204
|
+
/** Sign a Workspace snapshot job for tests and local checks. */
|
|
205
|
+
function signWorkspaceSnapshotJobMessage(message, nowMs = Date.now()) {
|
|
206
|
+
return signQueueMessage(workspaceSnapshotJobSign, message, nowMs);
|
|
207
|
+
}
|
|
208
|
+
/** Check that a recent queue message came from Junior. */
|
|
209
|
+
function verifyWorkspaceSnapshotJobMessage(value, nowMs = Date.now()) {
|
|
210
|
+
return verifyQueueMessage(workspaceSnapshotJobSign, value, nowMs);
|
|
211
|
+
}
|
|
212
|
+
async function send(message, idempotencyKey) {
|
|
213
|
+
const options = { retentionSeconds: QUEUE_SIGNATURE_MAX_AGE_MS / 1e3 };
|
|
214
|
+
if (idempotencyKey) options.idempotencyKey = idempotencyKey;
|
|
215
|
+
await createVercelQueueClient().send(WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, signWorkspaceSnapshotJobMessage(message), options);
|
|
216
|
+
}
|
|
217
|
+
/** Send a job unless the same Workspace build already has one. */
|
|
218
|
+
async function sendWorkspaceSnapshotJob(message) {
|
|
219
|
+
await send(message, jobId(message));
|
|
220
|
+
}
|
|
221
|
+
/** Send the next job for a Workspace build that is still running. */
|
|
222
|
+
async function sendNextWorkspaceSnapshotJob(message) {
|
|
223
|
+
await send(message);
|
|
224
|
+
}
|
|
225
|
+
//#endregion
|
|
226
|
+
export { getVercelConversationWorkQueue as a, QUEUE_SIGNATURE_MAX_AGE_MS as c, createVercelQueueClient as d, getTurnRequestDeadline as f, isConversationQueueMessageRejectedError as g, conversationQueueMessageSchema as h, verifyWorkspaceSnapshotJobMessage as i, signQueueMessage as l, ConversationQueueMessageRejectedError as m, sendNextWorkspaceSnapshotJob as n, resolveConversationWorkQueueTopic as o, runWithTurnRequestDeadline as p, sendWorkspaceSnapshotJob as r, verifyConversationQueueMessage as s, WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC as t, verifyQueueMessage as u };
|
|
@@ -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-CgWZM_kV.js";
|
|
2
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { t as JUNIOR_VERSION } from "./version-ByLtIYyy.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";
|
package/dist/nitro.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as JuniorDashboardOptions } from "./app-
|
|
1
|
+
import { n as JuniorDashboardOptions } from "./app-TVL42pGL.js";
|
|
2
2
|
import { n as JuniorPluginSet } from "./plugins-BT2l4We3.js";
|
|
3
3
|
//#region src/nitro.d.ts
|
|
4
4
|
export type JuniorNitroDashboardOptions = JuniorDashboardOptions;
|
package/dist/nitro.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-
|
|
1
|
+
import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-CvjMHRvg.js";
|
|
2
2
|
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-7a9YqLhE.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-D2SiTrnt.js";
|
|
3
|
+
import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-2mFFDMHB.js";
|
|
5
4
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-egKWjgue.js";
|
|
6
|
-
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-
|
|
5
|
+
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-TXhAWQwj.js";
|
|
7
6
|
import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-BKGOXca2.js";
|
|
8
7
|
import path from "node:path";
|
|
9
8
|
import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as extractAssistantText } from "./checkpoint-
|
|
1
|
+
import { h as extractAssistantText } from "./checkpoint-CJe-dZFF.js";
|
|
2
2
|
//#region src/chat/runtime/turn.ts
|
|
3
3
|
/** Classified Slack turn failure carrying the owning Sentry capture outward. */
|
|
4
4
|
var ConversationTurnBoundaryError = class extends Error {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
1
|
+
import { Tn as createUserTokenStore } from "./agent-runner-DEF7auSj.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-ibuNsMyl.js";
|
|
3
3
|
import { createServer } from "node:http";
|
|
4
4
|
//#region src/chat/local/oauth-callback-server.ts
|
|
5
5
|
const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { i as abandonTurnRecord } from "./checkpoint-CJe-dZFF.js";
|
|
2
|
+
//#region src/chat/state/turn-id.ts
|
|
3
|
+
/** Build a stable turn identifier from a message ID. */
|
|
4
|
+
function buildDeterministicTurnId(messageId) {
|
|
5
|
+
return `turn_${messageId.replace(/[^a-zA-Z0-9_-]/g, "_")}`;
|
|
6
|
+
}
|
|
7
|
+
/** Build the stable visible assistant-message identity for one logical turn. */
|
|
8
|
+
function buildDeterministicAssistantMessageId(turnId) {
|
|
9
|
+
return `${turnId}:assistant:1`;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/chat/services/pending-auth.ts
|
|
13
|
+
const AUTH_LINK_REUSE_WINDOW_MS = 6e5;
|
|
14
|
+
const NON_REQUEST_SKIPPED_REASON_PREFIXES = ["directed_to_other_party:", "side_conversation:"];
|
|
15
|
+
function isSkippedNonRequest(reason) {
|
|
16
|
+
return NON_REQUEST_SKIPPED_REASON_PREFIXES.some((prefix) => reason?.startsWith(prefix));
|
|
17
|
+
}
|
|
18
|
+
/** Decide whether the same agent-run session can reuse its fresh auth link. */
|
|
19
|
+
function canReusePendingAuthLink(args) {
|
|
20
|
+
const { pendingAuth } = args;
|
|
21
|
+
if (!pendingAuth) return false;
|
|
22
|
+
return pendingAuth.kind === args.kind && pendingAuth.provider === args.provider && pendingAuth.actorId === args.actorId && pendingAuth.scope === args.scope && pendingAuth.sessionId === args.sessionId && pendingAuth.linkSentAtMs + AUTH_LINK_REUSE_WINDOW_MS > (args.nowMs ?? Date.now());
|
|
23
|
+
}
|
|
24
|
+
function getConversationPendingAuth(args) {
|
|
25
|
+
const pendingAuth = args.conversation.processing.pendingAuth;
|
|
26
|
+
if (!pendingAuth) return;
|
|
27
|
+
if (pendingAuth.kind !== args.kind || pendingAuth.provider !== args.provider || pendingAuth.actorId !== args.actorId || pendingAuth.scope !== args.scope) return;
|
|
28
|
+
return pendingAuth;
|
|
29
|
+
}
|
|
30
|
+
function clearPendingAuth(conversation, sessionId) {
|
|
31
|
+
if (!conversation.processing.pendingAuth) return;
|
|
32
|
+
if (sessionId && conversation.processing.pendingAuth.sessionId !== sessionId) return;
|
|
33
|
+
conversation.processing.pendingAuth = void 0;
|
|
34
|
+
}
|
|
35
|
+
/** Mark the prior blocked turn abandoned after a new auth attempt replaces it. */
|
|
36
|
+
async function abandonReplacedPendingAuth(args) {
|
|
37
|
+
if (args.previousPendingAuth && args.previousPendingAuth.sessionId !== args.nextPendingAuth.sessionId && args.conversationId) await abandonTurnRecord({
|
|
38
|
+
conversationId: args.conversationId,
|
|
39
|
+
turnId: args.previousPendingAuth.sessionId,
|
|
40
|
+
errorMessage: "Abandoned by a newer auth-blocked request in the same conversation."
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Decide whether an auth callback still belongs to the latest real human
|
|
45
|
+
* request, ignoring bot-authored and passive bystander rows while treating
|
|
46
|
+
* failed human turns and opt-outs as newer freshness blockers.
|
|
47
|
+
*/
|
|
48
|
+
function isPendingAuthLatestRequest(conversation, pendingAuth) {
|
|
49
|
+
for (let index = conversation.messages.length - 1; index >= 0; index -= 1) {
|
|
50
|
+
const message = conversation.messages[index];
|
|
51
|
+
if (message?.role !== "user") continue;
|
|
52
|
+
if (message.author?.isBot) continue;
|
|
53
|
+
if (isSkippedNonRequest(message.meta?.skippedReason)) continue;
|
|
54
|
+
return buildDeterministicTurnId(message.id) === pendingAuth.sessionId;
|
|
55
|
+
}
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
export { isPendingAuthLatestRequest as a, getConversationPendingAuth as i, canReusePendingAuthLink as n, buildDeterministicAssistantMessageId as o, clearPendingAuth as r, buildDeterministicTurnId as s, abandonReplacedPendingAuth as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { w as toOptionalTrimmed } from "./client-
|
|
2
|
-
import { v as setSpanAttributes, y as setSpanStatus } from "./logging-
|
|
3
|
-
import { a as getChatConfig } from "./config-
|
|
4
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
1
|
+
import { w as toOptionalTrimmed } from "./client-C2WBBx7m.js";
|
|
2
|
+
import { v as setSpanAttributes, y as setSpanStatus } from "./logging-CvjMHRvg.js";
|
|
3
|
+
import { a as getChatConfig } from "./config-Bws6Rpsh.js";
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-BYGR3Dr4.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { createMemoryState } from "@chat-adapter/state-memory";
|
|
7
7
|
import { createRedisState } from "@chat-adapter/state-redis";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as briefOutcomeStatusSchema, L as conversationBriefSchema, R as parseBriefInput } from "./conversation-
|
|
1
|
+
import { I as briefOutcomeStatusSchema, L as conversationBriefSchema, R as parseBriefInput } from "./conversation-DPbmIwjy.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/chat/briefs/generate.ts
|
|
4
4
|
const MAX_INPUT_CHARS = 6e4;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as logInfo, p as logWarn, v as setSpanAttributes } from "./logging-
|
|
1
|
+
import { f as logInfo, p as logWarn, v as setSpanAttributes } from "./logging-CvjMHRvg.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";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { v as setSpanAttributes, w as withSpan } from "./logging-
|
|
2
|
-
import { N as SANDBOX_WORKSPACE_ROOT, k as sleep, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-
|
|
1
|
+
import { v as setSpanAttributes, w as withSpan } from "./logging-CvjMHRvg.js";
|
|
2
|
+
import { N as SANDBOX_WORKSPACE_ROOT, k as sleep, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-dvV7PB7u.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 { C as withLogContext, b as setTags, d as logException } from "./logging-
|
|
1
|
+
import { C as withLogContext, b as setTags, d as logException } from "./logging-CvjMHRvg.js";
|
|
2
2
|
import { t as credentialContextForActor } from "./context-Bplcgypl.js";
|
|
3
|
-
import { Kt as getConversationStore, Wt as getConversationEventStore } from "./agent-hooks-
|
|
4
|
-
import { M as messageCardText } from "./conversation-
|
|
5
|
-
import { A as commitAcceptedReply, B as recordAuthorizationCompleted, J as hydrateConversationMessages, P as loadProjection, Y as persistConversationMessages,
|
|
6
|
-
import { _ as markTurnFailed, r as getAssistantReplyText, t as authorizationId, v as startActiveTurn } from "./oauth-authorization-
|
|
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 loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-
|
|
3
|
+
import { Kt as getConversationStore, Wt as getConversationEventStore } from "./agent-hooks-FUetyyLe.js";
|
|
4
|
+
import { M as messageCardText } from "./conversation-DPbmIwjy.js";
|
|
5
|
+
import { A as commitAcceptedReply, B as recordAuthorizationCompleted, J as hydrateConversationMessages, P as loadProjection, Y as persistConversationMessages, ct as markConversationMessage, ft as upsertConversationMessage, lt as normalizeConversationText, r as saveTurnCheckpoint, rt as buildConversationContext, u as persistWithRetry, ut as recordDeliveredAssistantMessage } from "./checkpoint-CJe-dZFF.js";
|
|
6
|
+
import { _ as markTurnFailed, r as getAssistantReplyText, t as authorizationId, v as startActiveTurn } from "./oauth-authorization-l4O1rXsL.js";
|
|
7
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-axUJS1No.js";
|
|
8
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-C1S6vELh.js";
|
|
9
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-CTuWhjru.js";
|
|
10
|
+
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-csVoLOzx.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 {
|
|
1
|
+
import { un as sandboxEgressSignalsResponseSchema } from "./agent-runner-DEF7auSj.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,6 +1,6 @@
|
|
|
1
1
|
import { t as juniorDestinationKindSchema } from "./destinations-BeBiJeEM.js";
|
|
2
|
-
import { E as conversationSummaryReportSchema, n as actorIdentitySchema, w as conversationStatsItemSchema } from "./conversation-
|
|
3
|
-
import {
|
|
2
|
+
import { E as conversationSummaryReportSchema, n as actorIdentitySchema, w as conversationStatsItemSchema } from "./conversation-DPbmIwjy.js";
|
|
3
|
+
import { a as fillUtcHours, c as sumUtcHoursIntoSixHours, i as fillUtcDays } from "./web-message-id-xPI_EFSC.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { codeChangeStateSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
|
|
6
6
|
//#region src/api/schema/common.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { p as logWarn } from "./logging-
|
|
2
|
+
import { p as logWarn } from "./logging-CvjMHRvg.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-BYGR3Dr4.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 {
|
|
3
|
-
import { n as createAndEnqueueAgentInvocation } from "./work-
|
|
2
|
+
import { An as toolInvocationDestination, kn as actorFromRun } from "./agent-runner-DEF7auSj.js";
|
|
3
|
+
import { n as createAndEnqueueAgentInvocation } from "./work-QrbHdXTc.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,6 +1,5 @@
|
|
|
1
|
-
import { p as logWarn } from "./logging-
|
|
2
|
-
import {
|
|
3
|
-
import { o as runWithTurnRequestDeadline } from "./job-queue-D2SiTrnt.js";
|
|
1
|
+
import { p as logWarn } from "./logging-CvjMHRvg.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-2mFFDMHB.js";
|
|
4
3
|
import { z } from "zod";
|
|
5
4
|
import { createHash } from "node:crypto";
|
|
6
5
|
import { handleCallback, registerDevConsumer } from "@vercel/queue";
|
|
@@ -110,7 +109,7 @@ function pluginTaskCallback() {
|
|
|
110
109
|
maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
|
|
111
110
|
onRejected: logPluginTaskQueueMessageRejected,
|
|
112
111
|
run: async (message) => {
|
|
113
|
-
const { processPluginTask } = await import("./task-runner-
|
|
112
|
+
const { processPluginTask } = await import("./task-runner-axUJS1No.js").then((n) => n.r);
|
|
114
113
|
await processPluginTask(message);
|
|
115
114
|
},
|
|
116
115
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|