@sentry/junior 0.256.0 → 0.258.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{actor-BTtLaeWy.js → actor-tlxzqaRe.js} +3 -6
- package/dist/{admin-BhucwVfy.js → admin-My1SLGVO.js} +2 -3
- package/dist/{agent-hooks-DlSK8PQQ.js → agent-hooks-BJ_5mlRH.js} +71 -111
- package/dist/{agent-invocations-BY60iNw-.js → agent-invocations-Qfz7dWgU.js} +8 -13
- package/dist/{agent-runner-C6_cd61V.js → agent-runner-DGsFQw72.js} +278 -467
- package/dist/api/schema.d.ts +454 -448
- package/dist/api/schema.js +5 -5
- package/dist/api.d.ts +2 -12
- package/dist/api.js +189 -165
- package/dist/{app-B0gT1Slp.d.ts → app-PX2H1PxU.d.ts} +20 -37
- package/dist/app.d.ts +3 -3
- package/dist/app.js +565 -305
- package/dist/{assistant-reply-yn5G-YEG.js → assistant-reply-H1M-91oF.js} +3 -5
- package/dist/{automation-CHdlHVZP.js → automation-DWBFBenG.js} +6 -11
- package/dist/{briefs-U6Bi3IYw.js → briefs-vYoK85rJ.js} +8 -11
- package/dist/{cadence-D00SCzT1.js → cadence-R7Em4RjE.js} +1 -2
- package/dist/{catalog-runtime-DF5OWqCc.js → catalog-runtime-BN4DVxco.js} +3 -4
- package/dist/cli/chat.d.ts +2 -4
- package/dist/cli/chat.js +22 -24
- package/dist/cli/check.d.ts +1 -3
- package/dist/cli/check.js +4 -5
- package/dist/cli/env.d.ts +1 -3
- package/dist/cli/env.js +1 -2
- package/dist/cli/init.d.ts +1 -3
- package/dist/cli/init.js +3 -3
- package/dist/cli/main.d.ts +1 -3
- package/dist/cli/main.js +4 -5
- package/dist/cli/plugins.d.ts +2 -4
- package/dist/cli/plugins.js +7 -8
- package/dist/cli/run.d.ts +1 -2
- package/dist/cli/run.js +1 -2
- package/dist/cli/snapshot-create.d.ts +1 -3
- package/dist/cli/snapshot-create.js +4 -5
- package/dist/cli/upgrade.d.ts +3 -6
- package/dist/cli/upgrade.js +11 -17
- package/dist/{client-BVrAp-pq.js → client-DbyHuMFU.js} +9 -16
- package/dist/{config-DdBiDanf.js → config-_WO_AjCB.js} +18 -15
- package/dist/{connections-CG04HdpC.js → connections-ag_1JOhB.js} +21 -21
- package/dist/{conversation-T18Xlkx9.js → conversation-DjN3mlog.js} +11 -17
- package/dist/{conversation-privacy-CpSYOWnP.js → conversation-privacy-DHP_xnVj.js} +2 -3
- package/dist/{conversation-work-C6y3T5Hx.js → conversation-work-BaT_T6EB.js} +1 -2
- package/dist/{credential-sync-DKWNdcgm.js → credential-sync-B-CPX_ag.js} +89 -52
- package/dist/{db-Ca9Nt5ci.d.ts → db-BnRqQ7G5.d.ts} +1 -1
- package/dist/{executor-BroK9oKy.js → executor-RvG6kVe1.js} +58 -70
- package/dist/{experimental-Qn9rKLgx.js → experimental-BNK1l1jv.js} +2 -3
- package/dist/{history-9pO1Zd4Y.js → history-AY8rs-FR.js} +5 -9
- package/dist/{history-DvqWZlYX.d.ts → history-BgI33Kie.d.ts} +12 -20
- package/dist/{images-D0VZ5nv0.js → images-C2J_bj2g.js} +5 -6
- package/dist/instrumentation.d.ts +1 -3
- package/dist/instrumentation.js +6 -8
- package/dist/{job-queue-BbGg3gvu.js → job-queue-DVe37it2.js} +6 -12
- package/dist/{logging-tPQeUe2i.js → logging-DsHONhVm.js} +54 -24
- package/dist/{message-DdPGRYQP.js → message-DyitL8no.js} +5 -6
- package/dist/{model-profile-BwU8mqwD.js → model-profile-Bg8EoCKD.js} +2 -4
- package/dist/nitro.d.ts +3 -5
- package/dist/nitro.js +12 -17
- package/dist/{oauth-authorization-BA4Dt6a7.js → oauth-authorization-djQn5Nhy.js} +2 -4
- package/dist/{oauth-callback-server-B-2errCX.js → oauth-callback-server-CDby-pCn.js} +3 -4
- package/dist/{oauth-relay-CdCnu80W.js → oauth-relay-CTygMkNx.js} +2 -3
- package/dist/{package-discovery-BVvSnQBB.js → package-discovery-DJBompdd.js} +17 -21
- package/dist/{pending-auth-DT3MRVW8.js → pending-auth-D8J1uJUS.js} +37 -28
- package/dist/{plugin-module-CVvEUSMH.js → plugin-module-Cf5gVPWP.js} +1 -2
- package/dist/{plugins-CjfUP5gJ.d.ts → plugins-B11Mfkmv.d.ts} +0 -4
- package/dist/{plugins-egKWjgue.js → plugins-DOm9Y6qI.js} +2 -3
- package/dist/{private-trace-result-BLvBjy_e.js → private-trace-result-CE7_lEdq.js} +1 -2
- package/dist/{profile-Bb1zCVGP.js → profile-DpYjfKke.js} +16 -28
- package/dist/{prompt-C04mP1hu.js → prompt-xgpyMtg7.js} +5 -9
- package/dist/{queue-B5SnqRln.d.ts → queue-C37RbDVc.d.ts} +0 -2
- package/dist/{registry-CsNavQ_Z.js → registry-Du566MtJ.js} +57 -30
- package/dist/{resolve-B6ZZ9duG.js → resolve-ClCIgh8E.js} +7 -12
- package/dist/{result-j9nS0se-.js → result-BBbKA61B.js} +13 -17
- package/dist/{rolldown-runtime-B4FMCO8f.js → rolldown-runtime-nwUcYXjP.js} +1 -2
- package/dist/{runner-Y331DoZ5.js → runner-CCuqFSqx.js} +12 -13
- package/dist/{sandbox-egress-signals-BUfjEdHY.js → sandbox-egress-signals-DY1mbKF4.js} +2 -3
- package/dist/{schema-BBgv0MNf.js → schema-DrMh3NtR.js} +17 -27
- package/dist/{sentry-CgWZM_kV.js → sentry-BBUlHih9.js} +2 -3
- package/dist/{session-stop-q-6GNHx6.js → session-stop-CIoFiwwe.js} +57 -41
- package/dist/{skills-CyvTsR9M.js → skills-DyQBLIrK.js} +9 -9
- package/dist/{spawn-Do5mX3d_.js → spawn-Dqfeo7XP.js} +4 -5
- package/dist/{store-DoewL5mG.d.ts → store-CG0VJyye.d.ts} +0 -14
- package/dist/{store-D2It0ozF.js → store-DJLwq4x8.js} +13 -15
- package/dist/{task-queue-ZMk9bLRT.js → task-queue-BzW4MaWU.js} +5 -7
- package/dist/{task-runner-cIGU5VwJ.js → task-runner-D3qJh4fK.js} +22 -26
- package/dist/{tasks-CODtRzvX.js → tasks-CEXKTASS.js} +78 -79
- package/dist/{thread-state-BPkwVmvK.js → thread-state-W3f6kAtz.js} +13 -19
- package/dist/{turn-failure-response-ChmMeKar.js → turn-failure-response-CWx7aNIh.js} +16 -22
- package/dist/{turn-lifecycle-BUP7ZOVa.js → turn-lifecycle-C9JFst7-.js} +2 -3
- package/dist/{turn-session-routing-BcWM3PLm.js → turn-session-routing-CUxtfpr7.js} +2 -3
- package/dist/{validation-DCd69-cP.js → validation-BHRxa5G4.js} +3 -4
- package/dist/vercel.d.ts +1 -3
- package/dist/vercel.js +1 -2
- package/dist/{version-DBc4Qt_P.js → version-C0U6rHg0.js} +3 -5
- package/dist/{version-CnXZ614E.d.ts → version-Cc2OFd9G.d.ts} +0 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -2
- package/dist/{viewer-C-9nFKYr.js → viewer-CGvvRqKp.js} +61 -44
- package/dist/{web-input-Cv42P3ni.js → web-input-Keb5GRWj.js} +139 -198
- package/dist/{web-message-id-xPI_EFSC.js → web-message-id-CJSUiksE.js} +3 -6
- package/dist/{work-6UmVQq1V.js → work-DRcsJ3hV.js} +14 -16
- package/dist/{worker-DAoBZuZn.js → worker-Cjo-QqPq.js} +7 -8
- package/migrations/0059_automation_run_version.sql +2 -0
- package/migrations/0060_identity_signed_in_at.sql +1 -0
- package/migrations/meta/0059_snapshot.json +3619 -0
- package/migrations/meta/0060_snapshot.json +3465 -0
- package/migrations/meta/_journal.json +15 -1
- package/package.json +8 -6
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PluginMcpConfig, PluginRegistration, PluginRuntimePostinstallCommand } from "@sentry/junior-plugin-api";
|
|
2
|
-
//#region src/chat/plugins/types.d.ts
|
|
3
2
|
interface PluginOAuthConfig {
|
|
4
3
|
clientIdEnv: string;
|
|
5
4
|
clientSecretEnv: string;
|
|
@@ -75,8 +74,6 @@ interface PluginManifestConfig {
|
|
|
75
74
|
commandFlags?: string[] | null;
|
|
76
75
|
} | null;
|
|
77
76
|
}
|
|
78
|
-
//#endregion
|
|
79
|
-
//#region src/plugins.d.ts
|
|
80
77
|
type JuniorPluginInput = PluginRegistration | string;
|
|
81
78
|
interface JuniorPluginSetOptions {
|
|
82
79
|
/** Install-level manifest overrides applied before validation. */
|
|
@@ -93,5 +90,4 @@ interface JuniorPluginSet {
|
|
|
93
90
|
}
|
|
94
91
|
/** Define package-name plugins and JS plugin definitions for one app. */
|
|
95
92
|
declare function defineJuniorPlugins(inputs: JuniorPluginInput[], options?: JuniorPluginSetOptions): JuniorPluginSet;
|
|
96
|
-
//#endregion
|
|
97
93
|
export { defineJuniorPlugins as i, JuniorPluginSet as n, JuniorPluginSetOptions as r, JuniorPluginInput as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
+
// src/plugins.ts
|
|
3
3
|
var plugins_exports = /* @__PURE__ */ __exportAll({
|
|
4
4
|
defineJuniorPlugins: () => defineJuniorPlugins,
|
|
5
5
|
pluginCatalogConfigFromEnv: () => pluginCatalogConfigFromEnv,
|
|
@@ -95,5 +95,4 @@ function pluginRuntimeRegistrationsFromPluginSet(pluginSet) {
|
|
|
95
95
|
function pluginCliRegistrationsFromPluginSet(pluginSet) {
|
|
96
96
|
return pluginSet?.registrations.filter((plugin) => plugin.cli) ?? [];
|
|
97
97
|
}
|
|
98
|
-
//#endregion
|
|
99
98
|
export { pluginRuntimeRegistrationsFromPluginSet as a, pluginCliRegistrationsFromPluginSet as i, pluginCatalogConfigFromEnv as n, plugins_exports as o, pluginCatalogConfigFromPluginSet as r, defineJuniorPlugins as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
|
-
|
|
2
|
+
// src/chat/tool-support/private-trace-result.ts
|
|
3
3
|
const PRIVATE_TRACE_RESULT_ATTRIBUTE = "gen_ai.tool.call.result.exposure";
|
|
4
4
|
const privateTraceResultToken = randomUUID();
|
|
5
5
|
/** Mark one tool result as an adapter-approved private trace projection. */
|
|
@@ -12,5 +12,4 @@ function consumePrivateTraceResultMarker(attributes) {
|
|
|
12
12
|
delete attributes[PRIVATE_TRACE_RESULT_ATTRIBUTE];
|
|
13
13
|
return projected;
|
|
14
14
|
}
|
|
15
|
-
//#endregion
|
|
16
15
|
export { privateTraceResultAttributes as n, consumePrivateTraceResultMarker as t };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { S as toOptionalTrimmed } from "./client-
|
|
2
|
-
import {
|
|
3
|
-
import { i as getChatConfig } from "./config-
|
|
4
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
1
|
+
import { S as toOptionalTrimmed } from "./client-DbyHuMFU.js";
|
|
2
|
+
import { b as setSpanStatus, y as setSpanAttributes } from "./logging-DsHONhVm.js";
|
|
3
|
+
import { i as getChatConfig } from "./config-_WO_AjCB.js";
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-BN4DVxco.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";
|
|
8
8
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
9
|
-
|
|
9
|
+
// src/chat/sandbox/paths.ts
|
|
10
10
|
function normalizeWorkspaceRoot(input) {
|
|
11
11
|
const candidate = (input ?? "").trim();
|
|
12
12
|
if (!candidate) return "/vercel/sandbox";
|
|
@@ -28,8 +28,7 @@ function sandboxSkillPathResolution(skillName) {
|
|
|
28
28
|
const skillDir = sandboxSkillDir(skillName);
|
|
29
29
|
return `Resolve relative paths in this skill against ${skillDir}. For bash commands from this skill, cd to ${skillDir} first or use absolute paths.`;
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
//#region src/chat/sleep.ts
|
|
31
|
+
// src/chat/sleep.ts
|
|
33
32
|
/** Wait for a duration, rejecting with the owning signal reason when cancelled. */
|
|
34
33
|
function sleep(ms, signal) {
|
|
35
34
|
if (!signal) return new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -49,8 +48,7 @@ function sleep(ms, signal) {
|
|
|
49
48
|
signal.addEventListener("abort", onAbort, { once: true });
|
|
50
49
|
});
|
|
51
50
|
}
|
|
52
|
-
|
|
53
|
-
//#region src/chat/state/locks.ts
|
|
51
|
+
// src/chat/state/locks.ts
|
|
54
52
|
const ACTIVE_LOCK_TTL_MS = 9e4;
|
|
55
53
|
const MUTATION_LOCK_TTL_MS = 1e4;
|
|
56
54
|
/**
|
|
@@ -98,8 +96,7 @@ async function withLock(state, key, run, options = {}) {
|
|
|
98
96
|
async function fenceLock(state, lock, ttlMs = MUTATION_LOCK_TTL_MS) {
|
|
99
97
|
if (!await state.extendLock(lock, ttlMs)) throw new Error(`Lock ownership was lost before write for ${lock.threadId}`);
|
|
100
98
|
}
|
|
101
|
-
|
|
102
|
-
//#region src/chat/state/adapter.ts
|
|
99
|
+
// src/chat/state/adapter.ts
|
|
103
100
|
const ACTIVE_LOCK_HEARTBEAT_MS = 3e4;
|
|
104
101
|
let stateAdapter;
|
|
105
102
|
let redisStateAdapter;
|
|
@@ -316,8 +313,7 @@ async function disconnectStateAdapter() {
|
|
|
316
313
|
redisStateAdapter = void 0;
|
|
317
314
|
}
|
|
318
315
|
}
|
|
319
|
-
|
|
320
|
-
//#region src/chat/sandbox/noninteractive-command.ts
|
|
316
|
+
// src/chat/sandbox/noninteractive-command.ts
|
|
321
317
|
const NON_INTERACTIVE_ENV = {
|
|
322
318
|
CI: "1",
|
|
323
319
|
TERM: "dumb",
|
|
@@ -382,8 +378,7 @@ async function runNonInteractiveCommand(sandbox, input) {
|
|
|
382
378
|
};
|
|
383
379
|
return await sandbox.runCommand(command);
|
|
384
380
|
}
|
|
385
|
-
|
|
386
|
-
//#region src/chat/sandbox/credentials.ts
|
|
381
|
+
// src/chat/sandbox/credentials.ts
|
|
387
382
|
/**
|
|
388
383
|
* Resolve explicit Vercel Sandbox credentials, or return undefined to let
|
|
389
384
|
* the SDK read ambient Vercel auth from its own environment detection.
|
|
@@ -398,8 +393,7 @@ function getVercelSandboxCredentials() {
|
|
|
398
393
|
projectId
|
|
399
394
|
};
|
|
400
395
|
}
|
|
401
|
-
|
|
402
|
-
//#region src/chat/sandbox/http-error-details.ts
|
|
396
|
+
// src/chat/sandbox/http-error-details.ts
|
|
403
397
|
const DEFAULT_PREVIEW_LIMIT = 512;
|
|
404
398
|
function toTrimmedString(value, maxChars) {
|
|
405
399
|
if (typeof value !== "string") return;
|
|
@@ -458,8 +452,7 @@ function extractHttpErrorDetails(error, options = {}) {
|
|
|
458
452
|
searchableText
|
|
459
453
|
};
|
|
460
454
|
}
|
|
461
|
-
|
|
462
|
-
//#region src/chat/sandbox/snapshot/not-ready-error.ts
|
|
455
|
+
// src/chat/sandbox/snapshot/not-ready-error.ts
|
|
463
456
|
/** Report that a Workspace snapshot is not ready to use. */
|
|
464
457
|
var WorkspaceSnapshotNotReadyError = class extends Error {
|
|
465
458
|
workspaceName;
|
|
@@ -487,8 +480,7 @@ function isWorkspaceSnapshotNotReadyError(error) {
|
|
|
487
480
|
function workspaceSnapshotNotReadyUserMessage(error) {
|
|
488
481
|
return `The ${error.workspaceName} workspace is still preparing its sandbox. Wait for that preparation to finish, then try again.`;
|
|
489
482
|
}
|
|
490
|
-
|
|
491
|
-
//#region src/chat/sandbox/errors.ts
|
|
483
|
+
// src/chat/sandbox/errors.ts
|
|
492
484
|
const SANDBOX_ERROR_FIELDS = [{
|
|
493
485
|
sourceKey: "sandboxId",
|
|
494
486
|
attributeKey: "sandbox_id",
|
|
@@ -617,8 +609,7 @@ function throwSandboxOperationError(action, error, includeMissingPath = false) {
|
|
|
617
609
|
setSpanStatus("error");
|
|
618
610
|
throw new Error(details.summary ? `${action} failed (${details.summary})` : `${action} failed`, { cause: error });
|
|
619
611
|
}
|
|
620
|
-
|
|
621
|
-
//#region src/chat/sandbox/docker.ts
|
|
612
|
+
// src/chat/sandbox/docker.ts
|
|
622
613
|
/** Docker daemon config for Vercel sandbox guests (nested containers). */
|
|
623
614
|
const DOCKER_DAEMON_JSON = `{
|
|
624
615
|
"storage-driver": "overlay2",
|
|
@@ -714,8 +705,7 @@ async function ensureDockerDaemon(sandbox, signal) {
|
|
|
714
705
|
signal
|
|
715
706
|
});
|
|
716
707
|
}
|
|
717
|
-
|
|
718
|
-
//#region src/chat/sandbox/runtime-dependencies.ts
|
|
708
|
+
// src/chat/sandbox/runtime-dependencies.ts
|
|
719
709
|
const GLOBAL_RUNTIME_DEPENDENCIES = [
|
|
720
710
|
{
|
|
721
711
|
type: "system",
|
|
@@ -762,8 +752,7 @@ const GLOBAL_RUNTIME_POSTINSTALL = [{
|
|
|
762
752
|
].join("\n")],
|
|
763
753
|
sudo: true
|
|
764
754
|
}];
|
|
765
|
-
|
|
766
|
-
//#region src/chat/sandbox/snapshot/profile.ts
|
|
755
|
+
// src/chat/sandbox/snapshot/profile.ts
|
|
767
756
|
const VERSION = 1;
|
|
768
757
|
const DEFAULT_FLOATING_MAX_AGE_MS = 6048e5;
|
|
769
758
|
function isExactNpmVersion(version) {
|
|
@@ -852,5 +841,4 @@ function isStale(profile, createdAtMs) {
|
|
|
852
841
|
const maxAgeMs = floatingMaxAgeMs();
|
|
853
842
|
return maxAgeMs === 0 || Date.now() - createdAtMs > maxAgeMs;
|
|
854
843
|
}
|
|
855
|
-
//#endregion
|
|
856
844
|
export { SANDBOX_DATA_ROOT as A, getDefaultRedisStateAdapterFor as C, fenceLock as D, acquireActiveLock as E, sandboxSkillFile as F, sandboxSkillPathResolution as I, SANDBOX_SKILLS_ROOT as M, SANDBOX_WORKSPACE_ROOT as N, withLock as O, sandboxSkillDir as P, disconnectStateAdapter as S, MUTATION_LOCK_TTL_MS as T, workspaceSnapshotNotReadyUserMessage as _, isAbortError as a, buildNonInteractiveShellScript as b, isSandboxCommandStreamInterruptedError as c, isSnapshottingError as d, throwSandboxOperationError as f, isWorkspaceSnapshotNotReadyError as g, getWorkspaceSnapshotNotReadyError as h, ensureDockerDaemon as i, SANDBOX_REPOS_ROOT as j, sleep as k, isSandboxMissingError as l, WorkspaceSnapshotNotReadyError as m, hash as n, isAlreadyExistsError as o, wrapSandboxSetupError as p, isStale as r, isSandboxApiTransientError as s, create as t, isSandboxUnavailableError as u, getVercelSandboxCredentials as v, getStateAdapter as w, runNonInteractiveCommand as x, buildCommandScript as y };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { H as conversationBriefSchema, U as parseBriefInput, V as briefOutcomeStatusSchema } from "./conversation-
|
|
1
|
+
import { H as conversationBriefSchema, U as parseBriefInput, V as briefOutcomeStatusSchema } from "./conversation-DjN3mlog.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
|
|
3
|
+
// src/chat/briefs/generate.ts
|
|
4
4
|
const MAX_INPUT_CHARS = 6e4;
|
|
5
5
|
const MAX_MESSAGE_TEXT_CHARS = 4e3;
|
|
6
6
|
const MAX_TOOL_TEXT_CHARS = 1500;
|
|
@@ -406,8 +406,7 @@ async function generateBrief(args) {
|
|
|
406
406
|
throughIndex: args.throughIndex
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
|
-
|
|
410
|
-
//#region src/chat/events/actor.ts
|
|
409
|
+
// src/chat/events/actor.ts
|
|
411
410
|
/**
|
|
412
411
|
* System author ID stamped on event mailbox messages.
|
|
413
412
|
*
|
|
@@ -439,8 +438,7 @@ const EVENT_SYSTEM_ACTOR = {
|
|
|
439
438
|
function isEventConversationMessage(message) {
|
|
440
439
|
return Boolean(message.meta?.eventType) || message.author?.userId === "UJRNEVENT";
|
|
441
440
|
}
|
|
442
|
-
|
|
443
|
-
//#region src/chat/briefs/event-entries.ts
|
|
441
|
+
// src/chat/briefs/event-entries.ts
|
|
444
442
|
const TOOL_TEXT_LIMIT = 1500;
|
|
445
443
|
function actorIdentityKey(actor) {
|
|
446
444
|
const slackUserId = actor?.slackUserId?.trim();
|
|
@@ -527,8 +525,7 @@ function briefEntriesFromReportEvents(events) {
|
|
|
527
525
|
}
|
|
528
526
|
return entries;
|
|
529
527
|
}
|
|
530
|
-
|
|
531
|
-
//#region src/chat/briefs/prompt.ts
|
|
528
|
+
// src/chat/briefs/prompt.ts
|
|
532
529
|
const BRIEF_PROMPT = `You write one durable Brief for a Junior Conversation.
|
|
533
530
|
|
|
534
531
|
Use only facts supported by the supplied entries, evidence, or previous Brief. Do not invent names, ids, numbers, outcomes, choices, owners, or links.
|
|
@@ -548,5 +545,4 @@ Rules:
|
|
|
548
545
|
- Cite a URL only when its exact full string occurs in an entry, evidence, or the previous Brief. Return cited URLs in urls. Core adds code changes and resources separately.
|
|
549
546
|
- Keep the summary under 600 characters, intent under 400 characters, outcome text under 600 characters, and each other string under 400 characters.
|
|
550
547
|
`;
|
|
551
|
-
//#endregion
|
|
552
548
|
export { EVENT_SYSTEM_ACTOR as a, EVENT_MESSAGE_AUTHOR as i, briefEntriesFromReportEvents as n, isEventConversationMessage as o, EVENT_AUTHOR_ID as r, generateBrief as s, BRIEF_PROMPT as t };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
//#region src/chat/task-execution/queue.d.ts
|
|
3
2
|
/** Validate the v2 conversation work hint sent through Vercel Queue. */
|
|
4
3
|
declare const conversationQueueMessageSchema: z.ZodObject<{
|
|
5
4
|
schemaVersion: z.ZodLiteral<2>;
|
|
@@ -21,5 +20,4 @@ interface ConversationQueueSendResult {
|
|
|
21
20
|
interface ConversationWorkQueue {
|
|
22
21
|
send(message: ConversationQueueMessage, options?: ConversationQueueSendOptions): Promise<ConversationQueueSendResult | void>;
|
|
23
22
|
}
|
|
24
|
-
//#endregion
|
|
25
23
|
export { ConversationWorkQueue as n, ConversationQueueMessage as t };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as parseActorUserId } from "./actor-
|
|
3
|
-
import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-
|
|
1
|
+
import { m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-DsHONhVm.js";
|
|
2
|
+
import { a as isUserActor, o as parseActorUserId } from "./actor-tlxzqaRe.js";
|
|
3
|
+
import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-DJBompdd.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
|
7
7
|
import { parse } from "yaml";
|
|
8
8
|
import { readFileSync, readdirSync, statSync } from "node:fs";
|
|
9
|
-
|
|
9
|
+
// src/chat/plugins/inline-manifest-source.ts
|
|
10
10
|
function setDefined$1(target, key, value) {
|
|
11
11
|
if (value !== void 0) target[key] = value;
|
|
12
12
|
}
|
|
@@ -102,8 +102,7 @@ function inlineManifestSource(manifest) {
|
|
|
102
102
|
setDefined$1(result, "target", inlineTargetSource(manifest.name, manifest.target));
|
|
103
103
|
return result;
|
|
104
104
|
}
|
|
105
|
-
|
|
106
|
-
//#region src/chat/plugins/manifest.ts
|
|
105
|
+
// src/chat/plugins/manifest.ts
|
|
107
106
|
const PLUGIN_NAME_RE = /^[a-z][a-z0-9-]*$/;
|
|
108
107
|
const SHORT_CONFIG_KEY_RE = /^[a-z0-9]+(\.[a-z0-9-]+)*$/;
|
|
109
108
|
const TARGET_FLAG_RE = /^-{1,2}[A-Za-z0-9][A-Za-z0-9-]*$/;
|
|
@@ -727,8 +726,7 @@ function parsePluginManifest(raw, dir, config) {
|
|
|
727
726
|
function parseInlinePluginManifest(manifest, dir, config) {
|
|
728
727
|
return parseManifestSource(inlineManifestSource(manifest), dir, config, { allowHookManagedEgress: true });
|
|
729
728
|
}
|
|
730
|
-
|
|
731
|
-
//#region src/chat/credentials/broker.ts
|
|
729
|
+
// src/chat/credentials/broker.ts
|
|
732
730
|
var CredentialUnavailableError = class extends Error {
|
|
733
731
|
provider;
|
|
734
732
|
constructor(provider, message) {
|
|
@@ -737,8 +735,7 @@ var CredentialUnavailableError = class extends Error {
|
|
|
737
735
|
this.provider = provider;
|
|
738
736
|
}
|
|
739
737
|
};
|
|
740
|
-
|
|
741
|
-
//#region src/chat/credentials/context.ts
|
|
738
|
+
// src/chat/credentials/context.ts
|
|
742
739
|
const exactActorIdSchema = z.string().refine((value) => parseActorUserId(value) === value);
|
|
743
740
|
const exactNonBlankStringSchema = z.string().min(1).refine((value) => value === value.trim());
|
|
744
741
|
const slackDirectCredentialSubjectBindingSchema = z.object({
|
|
@@ -840,13 +837,52 @@ function credentialContextForActor(actor, subject) {
|
|
|
840
837
|
userId: actor.userId
|
|
841
838
|
} };
|
|
842
839
|
}
|
|
840
|
+
/**
|
|
841
|
+
* Name the person accountable for credential authority in logs.
|
|
842
|
+
*
|
|
843
|
+
* `userId` is the user actor, or the owner of delegated credentials when the
|
|
844
|
+
* system acts for an Automation or Watch. `actorType` says who acted.
|
|
845
|
+
*/
|
|
846
|
+
function credentialLogContext(context) {
|
|
847
|
+
if ("type" in context.actor) return {
|
|
848
|
+
userId: context.actor.userId,
|
|
849
|
+
actorType: "user",
|
|
850
|
+
actorId: context.actor.userId
|
|
851
|
+
};
|
|
852
|
+
const subject = "subject" in context ? context.subject : void 0;
|
|
853
|
+
return {
|
|
854
|
+
actorType: "system",
|
|
855
|
+
actorId: context.actor.name,
|
|
856
|
+
...subject ? {
|
|
857
|
+
userId: subject.userId,
|
|
858
|
+
credentialAllowedWhen: subject.allowedWhen,
|
|
859
|
+
..."taskId" in subject ? { taskId: subject.taskId } : void 0
|
|
860
|
+
} : void 0
|
|
861
|
+
};
|
|
862
|
+
}
|
|
863
|
+
/**
|
|
864
|
+
* Name the run's people in logs: the accountable person and who acted.
|
|
865
|
+
*
|
|
866
|
+
* A user actor is the accountable person. A system actor names the owner of
|
|
867
|
+
* delegated credentials, when the run has them.
|
|
868
|
+
*/
|
|
869
|
+
function actorLogContext(actor, credentialContext) {
|
|
870
|
+
const credential = credentialContext ? credentialLogContext(credentialContext) : {};
|
|
871
|
+
if (!isUserActor(actor)) return credential;
|
|
872
|
+
return {
|
|
873
|
+
...credential,
|
|
874
|
+
userId: actor.userId,
|
|
875
|
+
userName: actor.userName,
|
|
876
|
+
userEmail: actor.email,
|
|
877
|
+
userFullName: actor.fullName
|
|
878
|
+
};
|
|
879
|
+
}
|
|
843
880
|
/** Return the user whose OAuth token may satisfy this credential request. */
|
|
844
881
|
function credentialUserSubjectId(context) {
|
|
845
882
|
if ("type" in context.actor) return context.actor.userId;
|
|
846
883
|
return "subject" in context ? context.subject?.userId : void 0;
|
|
847
884
|
}
|
|
848
|
-
|
|
849
|
-
//#region src/chat/credentials/header-transforms.ts
|
|
885
|
+
// src/chat/credentials/header-transforms.ts
|
|
850
886
|
/** Merge transforms by domain so later transforms override earlier headers. */
|
|
851
887
|
function mergeHeaderTransforms(transforms) {
|
|
852
888
|
const byDomain = /* @__PURE__ */ new Map();
|
|
@@ -859,8 +895,7 @@ function mergeHeaderTransforms(transforms) {
|
|
|
859
895
|
headers
|
|
860
896
|
}));
|
|
861
897
|
}
|
|
862
|
-
|
|
863
|
-
//#region src/chat/credentials/oauth-scope.ts
|
|
898
|
+
// src/chat/credentials/oauth-scope.ts
|
|
864
899
|
function parseScope(scope) {
|
|
865
900
|
if (!scope) return [];
|
|
866
901
|
return [...new Set(scope.split(/\s+/).filter(Boolean))].sort();
|
|
@@ -878,8 +913,7 @@ function hasRequiredOAuthScope(storedScope, requiredScope) {
|
|
|
878
913
|
if (stored.size === 0) return false;
|
|
879
914
|
return required.every((scope) => stored.has(scope));
|
|
880
915
|
}
|
|
881
|
-
|
|
882
|
-
//#region src/chat/oauth-response.ts
|
|
916
|
+
// src/chat/oauth-response.ts
|
|
883
917
|
const MAX_OAUTH_ERROR_BODY_BYTES = 16384;
|
|
884
918
|
const MAX_OAUTH_ERROR_BODY_READS = MAX_OAUTH_ERROR_BODY_BYTES;
|
|
885
919
|
const MAX_OAUTH_ERROR_BODY_READ_MS = 5e3;
|
|
@@ -973,8 +1007,7 @@ function fetchWithBoundedOAuthErrorBodies(fetchFn = globalThis.fetch, onErrorRes
|
|
|
973
1007
|
});
|
|
974
1008
|
});
|
|
975
1009
|
}
|
|
976
|
-
|
|
977
|
-
//#region src/chat/plugins/command-env.ts
|
|
1010
|
+
// src/chat/plugins/command-env.ts
|
|
978
1011
|
const ENV_PLACEHOLDER_RE$1 = /\$\{([A-Z_][A-Z0-9_]*)\}/g;
|
|
979
1012
|
function resolveValue(manifest, value) {
|
|
980
1013
|
let missing = false;
|
|
@@ -1001,15 +1034,13 @@ function resolvePluginCommandEnv(manifest) {
|
|
|
1001
1034
|
}
|
|
1002
1035
|
return env;
|
|
1003
1036
|
}
|
|
1004
|
-
|
|
1005
|
-
//#region src/chat/plugins/auth/auth-token-placeholder.ts
|
|
1037
|
+
// src/chat/plugins/auth/auth-token-placeholder.ts
|
|
1006
1038
|
const DEFAULT_PLACEHOLDERS = { "oauth-bearer": "host_managed_credential" };
|
|
1007
1039
|
/** Resolve the non-secret sandbox token placeholder for token-backed credentials. */
|
|
1008
1040
|
function resolveAuthTokenPlaceholder(credentials) {
|
|
1009
1041
|
return credentials.authTokenPlaceholder?.trim() || DEFAULT_PLACEHOLDERS[credentials.type];
|
|
1010
1042
|
}
|
|
1011
|
-
|
|
1012
|
-
//#region src/chat/plugins/auth/api-headers-broker.ts
|
|
1043
|
+
// src/chat/plugins/auth/api-headers-broker.ts
|
|
1013
1044
|
const MAX_LEASE_MS$1 = 36e5;
|
|
1014
1045
|
const ENV_PLACEHOLDER_RE = /\$\{([A-Z_][A-Z0-9_]*)\}/g;
|
|
1015
1046
|
/**
|
|
@@ -1054,8 +1085,7 @@ function createApiHeadersBroker(manifest) {
|
|
|
1054
1085
|
};
|
|
1055
1086
|
} };
|
|
1056
1087
|
}
|
|
1057
|
-
|
|
1058
|
-
//#region src/chat/plugins/auth/oauth-request.ts
|
|
1088
|
+
// src/chat/plugins/auth/oauth-request.ts
|
|
1059
1089
|
const DEFAULT_TOKEN_CONTENT_TYPE = "application/x-www-form-urlencoded";
|
|
1060
1090
|
function requireNonEmptyTokenField(data, field) {
|
|
1061
1091
|
const value = data[field];
|
|
@@ -1131,8 +1161,7 @@ function parseOAuthTokenResponse(data, requestedScope, options) {
|
|
|
1131
1161
|
}
|
|
1132
1162
|
return parsedOAuthTokenResponseSchema.parse(result);
|
|
1133
1163
|
}
|
|
1134
|
-
|
|
1135
|
-
//#region src/chat/plugins/auth/oauth-bearer-broker.ts
|
|
1164
|
+
// src/chat/plugins/auth/oauth-bearer-broker.ts
|
|
1136
1165
|
const MAX_LEASE_MS = 36e5;
|
|
1137
1166
|
const REFRESH_BUFFER_MS = 3e5;
|
|
1138
1167
|
const TOKEN_REFRESH_TIMEOUT_MS = 2e4;
|
|
@@ -1281,8 +1310,7 @@ function createOAuthBearerBroker(manifest, credentials, deps) {
|
|
|
1281
1310
|
throw new CredentialUnavailableError(provider, `No ${provider} credentials available.`);
|
|
1282
1311
|
} };
|
|
1283
1312
|
}
|
|
1284
|
-
|
|
1285
|
-
//#region src/chat/plugins/registry.ts
|
|
1313
|
+
// src/chat/plugins/registry.ts
|
|
1286
1314
|
function getLoggedPluginNames() {
|
|
1287
1315
|
const globalState = globalThis;
|
|
1288
1316
|
globalState.__juniorLoggedPluginNames ??= /* @__PURE__ */ new Set();
|
|
@@ -1603,5 +1631,4 @@ function createPluginCatalogRuntime() {
|
|
|
1603
1631
|
}
|
|
1604
1632
|
};
|
|
1605
1633
|
}
|
|
1606
|
-
|
|
1607
|
-
export { parsePluginManifest as _, resolveAuthTokenPlaceholder as a, fetchWithBoundedOAuthErrorBodies as c, credentialContextForActor as d, credentialContextSchema as f, parseInlinePluginManifest as g, CredentialUnavailableError as h, resolvePluginHeaderEnvRefs as i, getOAuthProviderErrorAttributes as l, credentialUserSubjectId as m, buildOAuthTokenRequest as n, resolvePluginCommandEnv as o, credentialSubjectSchema as p, parseOAuthTokenResponse as r, OAuthProviderError as s, createPluginCatalogRuntime as t, hasRequiredOAuthScope as u };
|
|
1634
|
+
export { CredentialUnavailableError as _, resolveAuthTokenPlaceholder as a, fetchWithBoundedOAuthErrorBodies as c, actorLogContext as d, credentialContextForActor as f, credentialUserSubjectId as g, credentialSubjectSchema as h, resolvePluginHeaderEnvRefs as i, getOAuthProviderErrorAttributes as l, credentialLogContext as m, buildOAuthTokenRequest as n, resolvePluginCommandEnv as o, credentialContextSchema as p, parseOAuthTokenResponse as r, OAuthProviderError as s, createPluginCatalogRuntime as t, hasRequiredOAuthScope as u, parseInlinePluginManifest as v, parsePluginManifest as y };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
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 { T as withSpan, y as setSpanAttributes } from "./logging-DsHONhVm.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-DpYjfKke.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { FileSystem, Sandbox } from "@vercel/sandbox";
|
|
5
|
-
|
|
5
|
+
// src/chat/sandbox/resources.ts
|
|
6
6
|
let configuredResources;
|
|
7
7
|
function resourcesFromEnv() {
|
|
8
8
|
const value = process.env.SANDBOX_VCPUS?.trim();
|
|
@@ -30,8 +30,7 @@ function setSandboxResourceConfig(config) {
|
|
|
30
30
|
function getSandboxResources() {
|
|
31
31
|
return configuredResources ?? resourcesFromEnv();
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
//#region src/chat/sandbox/snapshot/span.ts
|
|
33
|
+
// src/chat/sandbox/snapshot/span.ts
|
|
35
34
|
/** Record the reusable snapshot selected for a new Sandbox. */
|
|
36
35
|
function setSnapshotSpanAttributes(snapshot) {
|
|
37
36
|
setSpanAttributes({
|
|
@@ -47,8 +46,7 @@ function setSnapshotSpanAttributes(snapshot) {
|
|
|
47
46
|
async function trace(name, op, attributes, callback) {
|
|
48
47
|
return await withSpan(name, op, {}, callback, attributes);
|
|
49
48
|
}
|
|
50
|
-
|
|
51
|
-
//#region src/chat/sandbox/snapshot/install.ts
|
|
49
|
+
// src/chat/sandbox/snapshot/install.ts
|
|
52
50
|
async function runOrThrow(sandbox, params, label) {
|
|
53
51
|
const result = await runNonInteractiveCommand(sandbox, params);
|
|
54
52
|
if (result.exitCode === 0) return;
|
|
@@ -225,8 +223,7 @@ async function postinstall(sandbox, commands, signal, timeoutMs) {
|
|
|
225
223
|
}
|
|
226
224
|
});
|
|
227
225
|
}
|
|
228
|
-
|
|
229
|
-
//#region src/chat/sandbox/workspace.ts
|
|
226
|
+
// src/chat/sandbox/workspace.ts
|
|
230
227
|
/** Bind one tool call's cancellation to every sandbox filesystem operation. */
|
|
231
228
|
function bindSandboxFileSystem(fs, signal) {
|
|
232
229
|
if (!signal) return fs;
|
|
@@ -317,8 +314,7 @@ async function stopSession(session) {
|
|
|
317
314
|
await session.stop();
|
|
318
315
|
} catch {}
|
|
319
316
|
}
|
|
320
|
-
|
|
321
|
-
//#region src/chat/sandbox/snapshot/resolve.ts
|
|
317
|
+
// src/chat/sandbox/snapshot/resolve.ts
|
|
322
318
|
const SNAPSHOT_CACHE_PREFIX = "junior:sandbox_snapshot_profile:v2";
|
|
323
319
|
const SNAPSHOT_LOCK_PREFIX = "junior:sandbox_snapshot_lock";
|
|
324
320
|
const SNAPSHOT_CACHE_TTL_MS = 2592e6;
|
|
@@ -542,5 +538,4 @@ function isMissingError(error) {
|
|
|
542
538
|
const searchable = error instanceof Error ? error.message.toLowerCase() : String(error).toLowerCase();
|
|
543
539
|
return searchable.includes("snapshot") && (searchable.includes("not found") || searchable.includes("unknown") || searchable.includes("404"));
|
|
544
540
|
}
|
|
545
|
-
//#endregion
|
|
546
541
|
export { createSandboxSession as a, postinstall as c, getSandboxResources as d, setSandboxResourceConfig as f, bindSandboxFileSystem as i, setSnapshotSpanAttributes as l, isMissingError as n, stopSession as o, resolve as r, dependencies as s, getCachedSnapshot as t, getSandboxResourceConfig as u };
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { $ as getAgentInvocation, X as createAgentInvocationFromLatest, ct as isTerminalAgentInvocation, et as getAgentInvocationIdForEvents, ft as markAgentInvocationParentMailboxAppended, it as getAgentInvocationResultMessageId, nt as getAgentInvocationIdForResult, st as getLatestAgentInvocationForConversation, tt as getAgentInvocationIdForMessage } from "./agent-runner-
|
|
3
|
-
import { t as createActor } from "./actor-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { a as EVENT_WAIT_MS, c as timerWatchCredentialSubject, s as isEventMailboxMetadata } from "./session-stop-
|
|
7
|
-
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-
|
|
8
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
9
|
-
import { r as enqueueAgentInvocation } from "./work-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
+
import { $ as getAgentInvocation, X as createAgentInvocationFromLatest, ct as isTerminalAgentInvocation, et as getAgentInvocationIdForEvents, ft as markAgentInvocationParentMailboxAppended, it as getAgentInvocationResultMessageId, nt as getAgentInvocationIdForResult, st as getLatestAgentInvocationForConversation, tt as getAgentInvocationIdForMessage } from "./agent-runner-DGsFQw72.js";
|
|
3
|
+
import { t as createActor } from "./actor-tlxzqaRe.js";
|
|
4
|
+
import { f as credentialContextForActor } from "./registry-Du566MtJ.js";
|
|
5
|
+
import { Q as listTurnSummaries, Z as getTurnRecord } from "./tasks-CEXKTASS.js";
|
|
6
|
+
import { a as EVENT_WAIT_MS, c as timerWatchCredentialSubject, s as isEventMailboxMetadata } from "./session-stop-CIoFiwwe.js";
|
|
7
|
+
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-xgpyMtg7.js";
|
|
8
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-DJLwq4x8.js";
|
|
9
|
+
import { r as enqueueAgentInvocation } from "./work-DRcsJ3hV.js";
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
import { createEventSource, createLocalSource, createWebSource } from "@sentry/junior-plugin-api";
|
|
12
|
-
|
|
12
|
+
// src/chat/task-execution/mailbox-input.ts
|
|
13
13
|
/** Join non-empty mailbox Message text for one Turn. */
|
|
14
14
|
function joinMailboxText(messages) {
|
|
15
15
|
return messages.map((message) => message.input.text.trim()).filter(Boolean).join("\n\n");
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
//#region src/chat/conversations/web-mailbox.ts
|
|
17
|
+
// src/chat/conversations/web-mailbox.ts
|
|
19
18
|
/** Parse web mailbox metadata written before Source and Actor were complete. */
|
|
20
19
|
const legacyWebMailboxMetadataSchema = z.object({
|
|
21
20
|
authorEmail: z.string().email(),
|
|
@@ -25,8 +24,7 @@ const legacyWebMailboxMetadataSchema = z.object({
|
|
|
25
24
|
kind: z.literal("api_turn"),
|
|
26
25
|
messageId: z.string().min(1)
|
|
27
26
|
}).strict();
|
|
28
|
-
|
|
29
|
-
//#region src/chat/task-execution/mailbox-turn.ts
|
|
27
|
+
// src/chat/task-execution/mailbox-turn.ts
|
|
30
28
|
/**
|
|
31
29
|
* Restore Turn input facts, with saved Message fallback for legacy cursors.
|
|
32
30
|
*
|
|
@@ -171,8 +169,7 @@ async function resolveMailboxTurnWork(context) {
|
|
|
171
169
|
turnId
|
|
172
170
|
} : void 0;
|
|
173
171
|
}
|
|
174
|
-
|
|
175
|
-
//#region src/chat/agent-invocations/result.ts
|
|
172
|
+
// src/chat/agent-invocations/result.ts
|
|
176
173
|
var result_exports = /* @__PURE__ */ __exportAll({
|
|
177
174
|
enqueueAgentInvocationResult: () => enqueueAgentInvocationResult,
|
|
178
175
|
enqueueAgentMessageToParent: () => enqueueAgentMessageToParent,
|
|
@@ -459,5 +456,4 @@ async function withAgentInvocationResultActors(work) {
|
|
|
459
456
|
}))
|
|
460
457
|
};
|
|
461
458
|
}
|
|
462
|
-
//#endregion
|
|
463
459
|
export { withAgentInvocationResultActors as a, resolveMailboxTurnWork as c, legacyWebMailboxMetadataSchema as d, joinMailboxText as f, startAgentInvocationsForChildInput as i, sourceFromTurnInput as l, enqueueAgentMessageToParent as n, getAuthPausedConversationTurnId as o, result_exports as r, getEventBatchDelayMs as s, enqueueAgentInvocationResult as t, turnInputFactsFromConversationMessage as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
|
|
2
|
+
// \0rolldown/runtime.js
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -24,5 +24,4 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
24
24
|
return to;
|
|
25
25
|
};
|
|
26
26
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
27
|
-
//#endregion
|
|
28
27
|
export { __reExport as n, __exportAll as t };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as getConversationEventStore, u as getConversationStore } from "./viewer-
|
|
3
|
-
import {
|
|
4
|
-
import { $ as
|
|
5
|
-
import { K as messageCardText } from "./conversation-
|
|
6
|
-
import { f as markTurnFailed, p as startActiveTurn, t as authorizationId } from "./oauth-authorization-
|
|
7
|
-
import { n as getAssistantReplyText } from "./assistant-reply-
|
|
8
|
-
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-
|
|
9
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
10
|
-
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
11
|
-
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-
|
|
1
|
+
import { f as logException, w as withLogContext, x as setTags } from "./logging-DsHONhVm.js";
|
|
2
|
+
import { c as getConversationEventStore, u as getConversationStore } from "./viewer-CGvvRqKp.js";
|
|
3
|
+
import { f as credentialContextForActor } from "./registry-Du566MtJ.js";
|
|
4
|
+
import { $t as buildConversationContext, Gt as persistConversationMessages, It as recordAuthorizationCompleted, Wt as hydrateConversationMessages, an as normalizeConversationText, cn as upsertConversationMessage, et as persistWithRetry, in as markConversationMessage, kt as loadProjection, on as recordDeliveredAssistantMessage, q as saveTurnCheckpoint, wt as commitAcceptedReply } from "./tasks-CEXKTASS.js";
|
|
5
|
+
import { K as messageCardText } from "./conversation-DjN3mlog.js";
|
|
6
|
+
import { f as markTurnFailed, p as startActiveTurn, t as authorizationId } from "./oauth-authorization-djQn5Nhy.js";
|
|
7
|
+
import { n as getAssistantReplyText } from "./assistant-reply-H1M-91oF.js";
|
|
8
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-D3qJh4fK.js";
|
|
9
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-C9JFst7-.js";
|
|
10
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-W3f6kAtz.js";
|
|
11
|
+
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-CWx7aNIh.js";
|
|
12
12
|
import { randomUUID } from "node:crypto";
|
|
13
13
|
import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
|
|
14
|
-
|
|
14
|
+
// src/chat/local/runner.ts
|
|
15
15
|
/**
|
|
16
16
|
* Local agent turn runtime.
|
|
17
17
|
*
|
|
@@ -399,5 +399,4 @@ async function runLocalAgentTurnInContext(input, deps) {
|
|
|
399
399
|
outcome: reply.diagnostics.outcome
|
|
400
400
|
};
|
|
401
401
|
}
|
|
402
|
-
//#endregion
|
|
403
402
|
export { runLocalAgentTurn };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Mt as sandboxEgressSignalsResponseSchema } from "./agent-runner-
|
|
2
|
-
|
|
1
|
+
import { Mt as sandboxEgressSignalsResponseSchema } from "./agent-runner-DGsFQw72.js";
|
|
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;
|
|
5
5
|
function signalRequest(baseUrl, credentialToken) {
|
|
@@ -42,5 +42,4 @@ function createLocalSandboxEgressSignalTransport(baseUrl) {
|
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
//#endregion
|
|
46
45
|
export { createLocalSandboxEgressSignalTransport };
|