@sentry/junior 0.278.0 → 0.280.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-B4DYygOB.js → actor-6jsm_v96.js} +1 -1
- package/dist/{adapter-BXosqTMx.js → adapter-DVN3iwf9.js} +1 -1
- package/dist/{admin-Thn7NfOi.js → admin-Q_UI--9W.js} +1 -1
- package/dist/{agent-runner-DE-43MPb.js → agent-runner-_PYLv4Qo.js} +79 -39
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +7 -7
- package/dist/api.d.ts +3 -3
- package/dist/api.js +184 -418
- package/dist/{app-CHNS-AX2.d.ts → app-CL2zzzE0.d.ts} +5 -5
- package/dist/app.d.ts +1 -1
- package/dist/app.js +462 -80
- package/dist/{assistant-reply-pauL6qyn.js → assistant-reply-DbebsAxi.js} +1 -1
- package/dist/{automation-DphoTRYl.js → automation-CPqRFjIa.js} +2 -2
- package/dist/{background-compaction-queue-CAL4A2y7.js → background-compaction-queue-B9lmh8Ml.js} +3 -3
- package/dist/{briefs-4fyPJJEu.js → briefs-Dej7V0Bz.js} +11 -10
- package/dist/{catalog-runtime-BoOb5oUv.js → catalog-runtime-DpN0sWQ6.js} +2 -2
- package/dist/cli/chat.js +16 -16
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +4 -4
- package/dist/cli/plugins.js +5 -5
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +4 -4
- package/dist/{client-v_OVYuHZ.js → client-h2A2ZPzY.js} +7 -3
- package/dist/{config-o2jLRY5J.js → config-CusBFORe.js} +3 -3
- package/dist/{connections-RC4NXAx8.js → connections-C4h6mGha.js} +11 -11
- package/dist/{conversation-CZfyQvdm.js → conversation-DExTZw8B.js} +22 -7
- package/dist/conversation-pending-messages-Dgz6hrJs.js +173 -0
- package/dist/{conversation-privacy-C23M8KaD.js → conversation-privacy-2cm6OpNg.js} +1 -1
- package/dist/{credential-sync-Dd0WyNfF.js → credential-sync-DK06Jgt-.js} +17 -17
- package/dist/{db-BjLzDJCt.d.ts → db-Dsvk1Tp1.d.ts} +2 -2
- package/dist/{executor-CJfsD0VX.js → executor-Cmr0J8W3.js} +152 -7
- package/dist/instrumentation.d.ts +12 -0
- package/dist/instrumentation.js +56 -23
- package/dist/{logging-dFaXvBRK.js → logging-CGnh65_X.js} +2 -2
- package/dist/{media-DTAA8Qs_.js → media-Dq9_svfQ.js} +1 -1
- package/dist/{message-DSwxIZet.js → message-RpAnqHPY.js} +10 -10
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +18 -6
- package/dist/{oauth-callback-server-CDcuCp27.js → oauth-callback-server-BBnhVKuX.js} +2 -2
- package/dist/{oauth-relay-C6ZAyJgf.js → oauth-relay-D6xxVywK.js} +2 -2
- package/dist/{package-discovery-DJBompdd.js → package-discovery-DJhGdS4c.js} +1 -1
- package/dist/{plugins-DOm9Y6qI.js → plugins-HYh_JOdw.js} +1 -1
- package/dist/{projection-BTge9wrH.js → projection-C1MghKyI.js} +257 -137
- package/dist/{prompt-DDtCnlHP.js → prompt-BcHg-BMy.js} +2 -2
- package/dist/proxy-path-BHYoKZdq.js +15 -0
- package/dist/{queue-C37RbDVc.d.ts → queue-CZyYgPF0.d.ts} +1 -1
- package/dist/{registry-Cp6CNmtP.js → registry-DR7DjX9H.js} +4 -4
- package/dist/{reporting-window-DgHgwQB3.js → reporting-window-B-QP9zX1.js} +28 -2
- package/dist/{resolve-B_7h2cXx.js → resolve-0Ful4oDv.js} +4 -4
- package/dist/{result-5LBEfnLX.js → result-Dd9kCuQ-.js} +12 -12
- package/dist/{runner-C5-S4oq-.js → runner-yiY8gUUu.js} +11 -11
- package/dist/{sandbox-egress-signals-B4GehT1L.js → sandbox-egress-signals-BzQVHCMz.js} +1 -1
- package/dist/{schema-Tr484cCC.d.ts → schema-BkMmF552.d.ts} +1232 -222
- package/dist/{schema-B5fpczDw.js → schema-C5pEgfHc.js} +30 -70
- package/dist/sentry-BRTJqumy.js +51 -0
- package/dist/sentry-DrKC2NeM.d.ts +1 -0
- package/dist/sentry-route-name-BhwWnfqj.js +51 -0
- package/dist/{service-account-Cq_dLrZJ.js → service-account-Cu7HFLZQ.js} +3 -3
- package/dist/{service-account-BkEv20zf.js → service-account-PIMpWZHF.js} +3 -3
- package/dist/{session-stop-BsS4qFS2.js → session-stop-CDEMsNtv.js} +14 -15
- package/dist/{skills-M0BA0_s6.js → skills-B2xIoe0f.js} +5 -5
- package/dist/{spawn-BO3y7H4d.js → spawn-C0DySQRV.js} +3 -3
- package/dist/{stop-D5R82Wla.js → stop-Dj5-nrAo.js} +740 -285
- package/dist/{store-BGBzQWNf.js → store-Dlio-o6u.js} +6 -6
- package/dist/{store-CGJZTEVz.js → store-QzOfDwKA.js} +3 -3
- package/dist/{task-queue-UD27ei2U.js → task-queue-Cp1V_XW3.js} +4 -4
- package/dist/{task-runner-noxjOjkM.js → task-runner-CQkkUj3o.js} +23 -11
- package/dist/{thread-state-BSu6rM6p.js → thread-state-Bn87cfzE.js} +4 -4
- package/dist/{turn-failure-response-wahwyPrZ.js → turn-failure-response-CQebxByj.js} +8 -8
- package/dist/{turn-lifecycle-Bo4Trccw.js → turn-lifecycle-CJJsOhXB.js} +1 -1
- package/dist/{turn-session-routing-DnSaaEpn.js → turn-session-routing-bmG330Cf.js} +10 -11
- package/dist/{validation-B9-8iKyw.js → validation-D1wcf7hp.js} +2 -2
- package/dist/{version-C7HejFP2.js → version-BeHSXUK6.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-DLXajQZE.js → viewer-BZ0Hp5Nb.js} +6 -7
- package/dist/{work-DRGSlfia.js → work-BTcCIbWu.js} +12 -12
- package/dist/{worker-BGh5Dwc6.js → worker-D3fDK6zc.js} +7 -7
- package/migrations/0077_drop_agent_invocation_model_profile.sql +1 -0
- package/migrations/0078_plugin_conversation_index.sql +20 -0
- package/migrations/0079_conversation_event_author_index.sql +20 -0
- package/migrations/meta/0077_snapshot.json +4141 -0
- package/migrations/meta/0078_snapshot.json +4175 -0
- package/migrations/meta/0079_snapshot.json +4203 -0
- package/migrations/meta/_journal.json +21 -0
- package/package.json +4 -4
- package/dist/agent-invocations-D7c4BQGc.js +0 -182
- package/dist/common-Eu6sx09c.js +0 -107
- package/dist/rolldown-runtime-nwUcYXjP.js +0 -27
- package/dist/sentry-MDkYAVPV.js +0 -23
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as resolveLocalScheduleAtMs, i as isValidTimeZone, r as getZonedDateTimeParts, t as getFirstRunAtMs } from "./cadence-R7Em4RjE.js";
|
|
2
|
-
import { r as actorIdentitySchema } from "./conversation-
|
|
3
|
-
import
|
|
2
|
+
import { r as actorIdentitySchema } from "./conversation-DExTZw8B.js";
|
|
3
|
+
import * as z from "zod";
|
|
4
4
|
import { actorUserIdSchema, destinationVisibilitySchema, eventMatchFieldsSchema, eventMatchSchema, eventReachSchema, eventTypeSchema, pluginEventTypeSchema, slackDestinationSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
|
|
5
5
|
// src/chat/scheduled-automations/schedule-intent.ts
|
|
6
6
|
/**
|
package/dist/{background-compaction-queue-CAL4A2y7.js → background-compaction-queue-B9lmh8Ml.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
2
|
-
import { E as withSpan, m as logInfo, p as logException } from "./logging-
|
|
1
|
+
import { i as getChatConfig } from "./config-CusBFORe.js";
|
|
2
|
+
import { E as withSpan, m as logInfo, p as logException } from "./logging-CGnh65_X.js";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
5
|
-
import
|
|
5
|
+
import * as z from "zod";
|
|
6
6
|
import { QueueClient, handleCallback, registerDevConsumer } from "@vercel/queue";
|
|
7
7
|
/** Validate the v2 conversation work hint sent through Vercel Queue. */
|
|
8
8
|
const conversationQueueMessageSchema = z.object({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { i as completeObject } from "./client-
|
|
2
|
-
import { U as parseBriefInput, c as conversationDetailReportSchema, u as conversationEventPageSchema, z as briefCodeChangeSchema } from "./conversation-
|
|
3
|
-
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-
|
|
1
|
+
import { i as completeObject } from "./client-h2A2ZPzY.js";
|
|
2
|
+
import { U as parseBriefInput, c as conversationDetailReportSchema, u as conversationEventPageSchema, z as briefCodeChangeSchema } from "./conversation-DExTZw8B.js";
|
|
3
|
+
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-BcHg-BMy.js";
|
|
4
4
|
import { CLI_USAGE } from "./cli/run.js";
|
|
5
5
|
import path from "node:path";
|
|
6
|
-
import
|
|
6
|
+
import * as z from "zod";
|
|
7
7
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
8
8
|
// src/chat/briefs/render.ts
|
|
9
9
|
function list(items, empty) {
|
|
@@ -254,7 +254,7 @@ async function parseRunOptions(argv) {
|
|
|
254
254
|
}
|
|
255
255
|
if (snapshots.length === 0) throw new Error(CLI_USAGE);
|
|
256
256
|
return {
|
|
257
|
-
model: model ?? await
|
|
257
|
+
model: model ?? await configuredBriefModelId(),
|
|
258
258
|
out,
|
|
259
259
|
promptFile,
|
|
260
260
|
snapshots,
|
|
@@ -262,12 +262,13 @@ async function parseRunOptions(argv) {
|
|
|
262
262
|
};
|
|
263
263
|
}
|
|
264
264
|
/**
|
|
265
|
-
* Read the
|
|
266
|
-
* `DATABASE_URL` at import, and `briefs pull` must work with only a
|
|
265
|
+
* Read the production Brief model only when a run needs it. `chat/config`
|
|
266
|
+
* reads `DATABASE_URL` at import, and `briefs pull` must work with only a
|
|
267
|
+
* token.
|
|
267
268
|
*/
|
|
268
|
-
async function
|
|
269
|
-
const { botConfig } = await import("./config-
|
|
270
|
-
return botConfig.
|
|
269
|
+
async function configuredBriefModelId() {
|
|
270
|
+
const { botConfig } = await import("./config-CusBFORe.js").then((n) => n.r);
|
|
271
|
+
return botConfig.fastModelId;
|
|
271
272
|
}
|
|
272
273
|
function apiUrl(baseUrl, pathname) {
|
|
273
274
|
const base = new URL(baseUrl);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as createPluginCatalogRuntime } from "./registry-
|
|
1
|
+
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
+
import { t as createPluginCatalogRuntime } from "./registry-DR7DjX9H.js";
|
|
3
3
|
// src/chat/plugins/catalog-runtime.ts
|
|
4
4
|
var catalog_runtime_exports = /* @__PURE__ */ __exportAll({ pluginCatalogRuntime: () => pluginCatalogRuntime });
|
|
5
5
|
const pluginCatalogRuntime = createPluginCatalogRuntime();
|
package/dist/cli/chat.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-
|
|
1
|
+
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-_PYLv4Qo.js";
|
|
2
2
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -98,11 +98,11 @@ async function loadLocalPluginSet() {
|
|
|
98
98
|
/** Configure plugin hooks after local chat has selected its state adapter. */
|
|
99
99
|
async function configureLocalChatPlugins(pluginSet) {
|
|
100
100
|
const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
|
|
101
|
-
import("../plugins-
|
|
102
|
-
import("../projection-
|
|
103
|
-
import("../catalog-runtime-
|
|
104
|
-
import("../validation-
|
|
105
|
-
import("../viewer-
|
|
101
|
+
import("../plugins-HYh_JOdw.js").then((n) => n.o),
|
|
102
|
+
import("../projection-C1MghKyI.js").then((n) => n.kn),
|
|
103
|
+
import("../catalog-runtime-DpN0sWQ6.js").then((n) => n.t),
|
|
104
|
+
import("../validation-D1wcf7hp.js").then((n) => n.r),
|
|
105
|
+
import("../viewer-BZ0Hp5Nb.js").then((n) => n.v)
|
|
106
106
|
]);
|
|
107
107
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
108
108
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -152,18 +152,18 @@ function localDevServerUrl() {
|
|
|
152
152
|
async function prepareLocalChatRun(io, pluginSet) {
|
|
153
153
|
defaultStateAdapterForLocalChat();
|
|
154
154
|
await configureLocalChatPlugins(pluginSet);
|
|
155
|
-
const { setBriefsConfig } = await import("../projection-
|
|
155
|
+
const { setBriefsConfig } = await import("../projection-C1MghKyI.js").then((n) => n.Vn);
|
|
156
156
|
setBriefsConfig({ enabled: true });
|
|
157
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
158
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
159
|
-
const { createLocalOAuthState } = await import("../oauth-relay-
|
|
160
|
-
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-
|
|
161
|
-
const { bindSpawnAgent } = await import("../spawn-
|
|
162
|
-
const { bindMessageAgent } = await import("../message-
|
|
163
|
-
const { createChildConversationWorker } = await import("../result-
|
|
164
|
-
const { skipInputBeforeConversationStop } = await import("../session-stop-
|
|
157
|
+
const { runLocalAgentTurn } = await import("../runner-yiY8gUUu.js");
|
|
158
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-BBnhVKuX.js");
|
|
159
|
+
const { createLocalOAuthState } = await import("../oauth-relay-D6xxVywK.js").then((n) => n.t);
|
|
160
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-BzQVHCMz.js");
|
|
161
|
+
const { bindSpawnAgent } = await import("../spawn-C0DySQRV.js").then((n) => n.n);
|
|
162
|
+
const { bindMessageAgent } = await import("../message-RpAnqHPY.js").then((n) => n.n);
|
|
163
|
+
const { createChildConversationWorker } = await import("../result-Dd9kCuQ-.js").then((n) => n.i);
|
|
164
|
+
const { skipInputBeforeConversationStop } = await import("../session-stop-CDEMsNtv.js").then((n) => n.r);
|
|
165
165
|
const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
|
|
166
|
-
const { processConversationWork } = await import("../worker-
|
|
166
|
+
const { processConversationWork } = await import("../worker-D3fDK6zc.js").then((n) => n.n);
|
|
167
167
|
let agentRunner;
|
|
168
168
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
169
169
|
if (!agentRunner) throw new Error("Local agent runner is not ready");
|
package/dist/cli/check.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, L as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, M as JUNIOR_HEARTBEAT_ROUTE } from "../logging-
|
|
2
|
-
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-
|
|
3
|
-
import { i as parseSkillFile } from "../skills-
|
|
1
|
+
import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, L as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, M as JUNIOR_HEARTBEAT_ROUTE } from "../logging-CGnh65_X.js";
|
|
2
|
+
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-DR7DjX9H.js";
|
|
3
|
+
import { i as parseSkillFile } from "../skills-B2xIoe0f.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import fs from "node:fs/promises";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
package/dist/cli/main.js
CHANGED
|
@@ -4,7 +4,7 @@ import { pathToFileURL } from "node:url";
|
|
|
4
4
|
// src/cli/main.ts
|
|
5
5
|
const SENTRY_FLUSH_TIMEOUT_MS = 2e3;
|
|
6
6
|
async function flushSentry() {
|
|
7
|
-
await (await import("../sentry-
|
|
7
|
+
await (await import("../sentry-BRTJqumy.js").then((n) => n.u)).flush(SENTRY_FLUSH_TIMEOUT_MS);
|
|
8
8
|
}
|
|
9
9
|
async function initSentry() {
|
|
10
10
|
(await import("../instrumentation.js")).initSentry();
|
|
@@ -25,13 +25,13 @@ async function runChat(argv, pluginSet) {
|
|
|
25
25
|
return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
|
|
26
26
|
}
|
|
27
27
|
async function runAdmin(argv) {
|
|
28
|
-
return await (await import("../admin-
|
|
28
|
+
return await (await import("../admin-Q_UI--9W.js")).runAdmin(argv);
|
|
29
29
|
}
|
|
30
30
|
async function runServiceAccount(argv) {
|
|
31
|
-
return await (await import("../service-account-
|
|
31
|
+
return await (await import("../service-account-Cu7HFLZQ.js")).runServiceAccount(argv);
|
|
32
32
|
}
|
|
33
33
|
async function runBriefs(argv) {
|
|
34
|
-
return await (await import("../briefs-
|
|
34
|
+
return await (await import("../briefs-Dej7V0Bz.js")).runBriefs(argv);
|
|
35
35
|
}
|
|
36
36
|
function topLevelCommand(argv) {
|
|
37
37
|
return (argv[0] === "--" ? argv.slice(1) : argv)[0];
|
package/dist/cli/plugins.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S as getDb } from "../viewer-
|
|
3
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
4
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-
|
|
5
|
-
import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-
|
|
1
|
+
import { Aa as createPluginLogger, Rn as setPlugins, zn as validatePlugins } from "../projection-C1MghKyI.js";
|
|
2
|
+
import { S as getDb } from "../viewer-BZ0Hp5Nb.js";
|
|
3
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-DpN0sWQ6.js";
|
|
4
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-D1wcf7hp.js";
|
|
5
|
+
import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-HYh_JOdw.js";
|
|
6
6
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
7
7
|
import { stderr, stdout } from "node:process";
|
|
8
8
|
import { createJiti } from "jiti";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ai as create } from "../projection-
|
|
2
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
3
|
-
import { t as disconnectStateAdapter } from "../adapter-
|
|
4
|
-
import { n as resolve } from "../resolve-
|
|
1
|
+
import { ai as create } from "../projection-C1MghKyI.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-DpN0sWQ6.js";
|
|
3
|
+
import { t as disconnectStateAdapter } from "../adapter-DVN3iwf9.js";
|
|
4
|
+
import { n as resolve } from "../resolve-0Ful4oDv.js";
|
|
5
5
|
// src/cli/snapshot-create.ts
|
|
6
6
|
const DEFAULT_RUNTIME = "node22";
|
|
7
7
|
const DEFAULT_TIMEOUT_MS = 6e5;
|
package/dist/cli/upgrade.d.ts
CHANGED
package/dist/cli/upgrade.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as getChatConfig } from "../config-
|
|
2
|
-
import { t as createJuniorSqlExecutor } from "../executor-
|
|
3
|
-
import { t as createPluginCatalogRuntime } from "../registry-
|
|
4
|
-
import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-
|
|
1
|
+
import { i as getChatConfig } from "../config-CusBFORe.js";
|
|
2
|
+
import { t as createJuniorSqlExecutor } from "../executor-Cmr0J8W3.js";
|
|
3
|
+
import { t as createPluginCatalogRuntime } from "../registry-DR7DjX9H.js";
|
|
4
|
+
import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-HYh_JOdw.js";
|
|
5
5
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
6
6
|
import { basename, dirname, join, resolve } from "node:path";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-
|
|
2
|
-
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-
|
|
1
|
+
import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-CGnh65_X.js";
|
|
2
|
+
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-2cm6OpNg.js";
|
|
3
3
|
import { calculateCost, completeSimple, getEnvApiKey, getModels, registerApiProvider } from "@earendil-works/pi-ai/compat";
|
|
4
4
|
import { stream as streamAnthropic, streamSimple as streamSimpleAnthropic } from "@earendil-works/pi-ai/api/anthropic-messages";
|
|
5
5
|
import { createGatewayProvider } from "@ai-sdk/gateway";
|
|
@@ -231,6 +231,10 @@ function getProviderErrorAttributes(error) {
|
|
|
231
231
|
};
|
|
232
232
|
}
|
|
233
233
|
// src/chat/xml.ts
|
|
234
|
+
/** Escape untrusted body text for a prompt tag. Quotes stay as written. */
|
|
235
|
+
function escapeXmlText(value) {
|
|
236
|
+
return value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">");
|
|
237
|
+
}
|
|
234
238
|
function escapeXml(value) {
|
|
235
239
|
return value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """).replaceAll("'", "'");
|
|
236
240
|
}
|
|
@@ -786,4 +790,4 @@ async function rerankTexts(params) {
|
|
|
786
790
|
throw providerError;
|
|
787
791
|
}
|
|
788
792
|
}
|
|
789
|
-
export {
|
|
793
|
+
export { resolveGatewayCredential as C, getGatewayApiKey as S, createProviderError as _, completeText as a, getProviderErrorUserMessage as b, resolveGatewayModel as c, isCompactionSummaryText as d, renderCurrentInstruction as f, ProviderError as g, escapeXmlText as h, completeObject as i, COMPACTION_SUMMARY_PREFIX as l, escapeXml as m, GEN_AI_SERVER_ADDRESS as n, embedTexts as o, unwrapCurrentInstruction as p, completeDecision as r, rerankTexts as s, GEN_AI_PROVIDER_NAME as t, hasCompactedConversationContext as u, findProviderError as v, toOptionalTrimmed as w, isProviderRetryError as x, getProviderErrorAttributes as y };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
+
import { c as resolveGatewayModel, w as toOptionalTrimmed } from "./client-h2A2ZPzY.js";
|
|
3
3
|
import { AwsClient } from "aws4fetch";
|
|
4
|
-
import
|
|
4
|
+
import * as z from "zod";
|
|
5
5
|
// src/chat/attachments/s3.ts
|
|
6
6
|
function readRequiredSetting(env, name) {
|
|
7
7
|
const value = toOptionalTrimmed(env[name]);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { X as loadTurnCheckpoint, et as failTurnRecord, gi as startOAuthFlow, tt as getTurnRecord } from "./projection-
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { C as getSqlExecutor, R as deleteProviderIdentityForSlackUser, y as getConversationEventStore, z as deleteProviderIdentityForUser } from "./viewer-
|
|
4
|
-
import { u as hasRequiredOAuthScope } from "./registry-
|
|
5
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
6
|
-
import { c as deleteMcpAuthSessionsForUserProvider, l as deleteMcpServerSessionId, u as deleteMcpStoredOAuthCredentials } from "./agent-runner-
|
|
7
|
-
import { r as getStateAdapter } from "./adapter-
|
|
8
|
-
import { l as getVercelConversationWorkQueue } from "./background-compaction-queue-
|
|
9
|
-
import { m as ensureConversationWake, w as requestConversationWork } from "./store-
|
|
10
|
-
import { n as resolveTurnSessionRouting } from "./turn-session-routing-
|
|
1
|
+
import { X as loadTurnCheckpoint, et as failTurnRecord, gi as startOAuthFlow, tt as getTurnRecord } from "./projection-C1MghKyI.js";
|
|
2
|
+
import { n as botConfig } from "./config-CusBFORe.js";
|
|
3
|
+
import { C as getSqlExecutor, R as deleteProviderIdentityForSlackUser, y as getConversationEventStore, z as deleteProviderIdentityForUser } from "./viewer-BZ0Hp5Nb.js";
|
|
4
|
+
import { u as hasRequiredOAuthScope } from "./registry-DR7DjX9H.js";
|
|
5
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-DpN0sWQ6.js";
|
|
6
|
+
import { c as deleteMcpAuthSessionsForUserProvider, l as deleteMcpServerSessionId, u as deleteMcpStoredOAuthCredentials } from "./agent-runner-_PYLv4Qo.js";
|
|
7
|
+
import { r as getStateAdapter } from "./adapter-DVN3iwf9.js";
|
|
8
|
+
import { l as getVercelConversationWorkQueue } from "./background-compaction-queue-B9lmh8Ml.js";
|
|
9
|
+
import { m as ensureConversationWake, w as requestConversationWork } from "./store-QzOfDwKA.js";
|
|
10
|
+
import { n as resolveTurnSessionRouting } from "./turn-session-routing-bmG330Cf.js";
|
|
11
11
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
12
|
-
import
|
|
12
|
+
import * as z from "zod";
|
|
13
13
|
// src/chat/task-execution/authorized-turn.ts
|
|
14
14
|
/**
|
|
15
15
|
* OAuth callbacks save readiness, not agent history. The conversation worker
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as conversationTurnFailureReasonSchema, s as conversationTurnFailureCodeSchema, t as INPUT_IMAGE_TYPES, v as usageSchema } from "./media-
|
|
2
|
-
import
|
|
1
|
+
import { c as conversationTurnFailureReasonSchema, s as conversationTurnFailureCodeSchema, t as INPUT_IMAGE_TYPES, v as usageSchema } from "./media-Dq9_svfQ.js";
|
|
2
|
+
import * as z from "zod";
|
|
3
3
|
import { codeChangeStateSchema, conversationAnnotationInputSchema, conversationEventPresentationSchema, conversationSidebarAnnotationSchema, objectFactFields, objectTypeSchema } from "@sentry/junior-plugin-api";
|
|
4
4
|
// src/chat/briefs/schema.ts
|
|
5
5
|
/**
|
|
@@ -251,7 +251,7 @@ const reviewItemChangeRecordSchema = z.object({
|
|
|
251
251
|
*
|
|
252
252
|
* `lastReadSeq` is the event sequence of the last transcript row the viewer
|
|
253
253
|
* saw. The server keeps the highest value it receives, so it only moves
|
|
254
|
-
* forward.
|
|
254
|
+
* forward. It is never before the viewer's own latest Message.
|
|
255
255
|
*/
|
|
256
256
|
const conversationReadPositionSchema = z.object({ lastReadSeq: z.number().int().nonnegative() }).strict();
|
|
257
257
|
// src/api/schema/child-agent-totals.ts
|
|
@@ -285,14 +285,21 @@ const conversationAttachmentParamsSchema = z.object({
|
|
|
285
285
|
conversationId: z.string().min(1)
|
|
286
286
|
}).strict();
|
|
287
287
|
const conversationDetailQuerySchema = z.object({
|
|
288
|
-
limit
|
|
288
|
+
/** Omit to get the latest three Turns, up to the default page limit. */
|
|
289
|
+
limit: z.coerce.number().int().min(1).max(1e3).optional(),
|
|
289
290
|
/** Also return `unreadPage` when the detail has an `unreadCursor`. */
|
|
290
|
-
unreadPage: z.stringbool().optional()
|
|
291
|
+
unreadPage: z.stringbool().optional(),
|
|
292
|
+
/**
|
|
293
|
+
* Also return `mailbox`, read before history, and never answer 304. A
|
|
294
|
+
* first load gets both in one request.
|
|
295
|
+
*/
|
|
296
|
+
mailbox: z.stringbool().optional()
|
|
291
297
|
}).strict();
|
|
292
|
-
const conversationEventsLimitSchema = z.coerce.number().int().min(1).max(1e3).default(
|
|
298
|
+
const conversationEventsLimitSchema = z.coerce.number().int().min(1).max(1e3).default(150);
|
|
293
299
|
/**
|
|
294
300
|
* Page toward the start with `before`, toward the latest with `after`, or
|
|
295
|
-
* both ways from one event with `around`.
|
|
301
|
+
* both ways from one event with `around`. A link target asks for the page
|
|
302
|
+
* around one event by its `event` seq, or around the start of a `turn`.
|
|
296
303
|
*/
|
|
297
304
|
const conversationEventsQuerySchema = z.union([
|
|
298
305
|
z.object({
|
|
@@ -306,6 +313,14 @@ const conversationEventsQuerySchema = z.union([
|
|
|
306
313
|
z.object({
|
|
307
314
|
around: z.string().min(1),
|
|
308
315
|
limit: conversationEventsLimitSchema
|
|
316
|
+
}).strict(),
|
|
317
|
+
z.object({
|
|
318
|
+
event: z.coerce.number().int().min(0),
|
|
319
|
+
limit: conversationEventsLimitSchema
|
|
320
|
+
}).strict(),
|
|
321
|
+
z.object({
|
|
322
|
+
turn: z.string().min(1),
|
|
323
|
+
limit: conversationEventsLimitSchema
|
|
309
324
|
}).strict()
|
|
310
325
|
]);
|
|
311
326
|
const conversationFeedQuerySchema = z.object({
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { L as messageAttachmentSchema, O as reviewItemChangeRecordSchema, c as conversationDetailReportSchema, r as actorIdentitySchema } from "./conversation-DExTZw8B.js";
|
|
2
|
+
import * as z from "zod";
|
|
3
|
+
// src/reporting-schema.ts
|
|
4
|
+
const healthReportSchema = z.object({
|
|
5
|
+
status: z.literal("ok"),
|
|
6
|
+
service: z.string(),
|
|
7
|
+
timestamp: z.string()
|
|
8
|
+
}).strict();
|
|
9
|
+
const pluginSchema = z.object({
|
|
10
|
+
configKeys: z.array(z.string()),
|
|
11
|
+
description: z.string(),
|
|
12
|
+
displayName: z.string(),
|
|
13
|
+
name: z.string()
|
|
14
|
+
}).strict();
|
|
15
|
+
const pluginsSchema = z.array(pluginSchema);
|
|
16
|
+
const skillReportSchema = z.object({
|
|
17
|
+
name: z.string(),
|
|
18
|
+
pluginProvider: z.string().optional()
|
|
19
|
+
}).strict();
|
|
20
|
+
const skillReportsSchema = z.array(skillReportSchema);
|
|
21
|
+
const pluginPackageContentItemReportSchema = z.object({
|
|
22
|
+
dir: z.string(),
|
|
23
|
+
hasMigrationsDir: z.boolean(),
|
|
24
|
+
hasSkillsDir: z.boolean(),
|
|
25
|
+
packageName: z.string()
|
|
26
|
+
}).strict();
|
|
27
|
+
const pluginPackageContentReportSchema = z.object({
|
|
28
|
+
packageNames: z.array(z.string()),
|
|
29
|
+
packages: z.array(pluginPackageContentItemReportSchema),
|
|
30
|
+
manifestRoots: z.array(z.string()),
|
|
31
|
+
skillRoots: z.array(z.string()),
|
|
32
|
+
tracingIncludes: z.array(z.string())
|
|
33
|
+
}).strict();
|
|
34
|
+
const runtimeInfoReportSchema = z.object({
|
|
35
|
+
cwd: z.string(),
|
|
36
|
+
homeDir: z.string(),
|
|
37
|
+
descriptionText: z.string().optional(),
|
|
38
|
+
providers: z.array(z.string()),
|
|
39
|
+
skills: z.array(skillReportSchema),
|
|
40
|
+
packagedContent: pluginPackageContentReportSchema
|
|
41
|
+
}).strict();
|
|
42
|
+
const pluginOperationalToneSchema = z.enum([
|
|
43
|
+
"danger",
|
|
44
|
+
"good",
|
|
45
|
+
"neutral",
|
|
46
|
+
"warning"
|
|
47
|
+
]);
|
|
48
|
+
const pluginOperationalMetricSchema = z.object({
|
|
49
|
+
label: z.string(),
|
|
50
|
+
tone: pluginOperationalToneSchema.optional(),
|
|
51
|
+
value: z.string()
|
|
52
|
+
}).strict();
|
|
53
|
+
const pluginOperationalFieldSchema = z.object({
|
|
54
|
+
key: z.string(),
|
|
55
|
+
label: z.string()
|
|
56
|
+
}).strict();
|
|
57
|
+
const pluginOperationalRecordSchema = z.object({
|
|
58
|
+
id: z.string(),
|
|
59
|
+
tone: pluginOperationalToneSchema.optional(),
|
|
60
|
+
values: z.record(z.string(), z.string())
|
|
61
|
+
}).strict();
|
|
62
|
+
const pluginOperationalRecordSetSchema = z.object({
|
|
63
|
+
fields: z.array(pluginOperationalFieldSchema).optional(),
|
|
64
|
+
emptyText: z.string().optional(),
|
|
65
|
+
records: z.array(pluginOperationalRecordSchema).optional(),
|
|
66
|
+
title: z.string()
|
|
67
|
+
}).strict();
|
|
68
|
+
const pluginOperationalBarChartWidgetSchema = z.object({
|
|
69
|
+
categories: z.array(z.object({
|
|
70
|
+
id: z.string().min(1),
|
|
71
|
+
label: z.string().min(1),
|
|
72
|
+
values: z.record(z.string(), z.number().finite())
|
|
73
|
+
}).strict()).max(100),
|
|
74
|
+
description: z.string().optional(),
|
|
75
|
+
emptyText: z.string().optional(),
|
|
76
|
+
id: z.string().min(1),
|
|
77
|
+
series: z.array(z.object({
|
|
78
|
+
format: z.literal("usd").optional(),
|
|
79
|
+
key: z.string().min(1),
|
|
80
|
+
label: z.string().min(1),
|
|
81
|
+
tone: pluginOperationalToneSchema.optional()
|
|
82
|
+
}).strict()).min(1).max(8),
|
|
83
|
+
timeRangeDays: z.array(z.union([
|
|
84
|
+
z.literal(1),
|
|
85
|
+
z.literal(7),
|
|
86
|
+
z.literal(30),
|
|
87
|
+
z.literal(90)
|
|
88
|
+
])).min(1).max(4).optional(),
|
|
89
|
+
title: z.string().min(1),
|
|
90
|
+
type: z.literal("bar_chart")
|
|
91
|
+
}).strict();
|
|
92
|
+
const pluginOperationalReportSchema = z.object({
|
|
93
|
+
generatedAt: z.string().optional(),
|
|
94
|
+
metrics: z.array(pluginOperationalMetricSchema).optional(),
|
|
95
|
+
recordSets: z.array(pluginOperationalRecordSetSchema).optional(),
|
|
96
|
+
title: z.string().optional(),
|
|
97
|
+
pluginName: z.string(),
|
|
98
|
+
widgets: z.array(pluginOperationalBarChartWidgetSchema).max(12).optional()
|
|
99
|
+
}).strict();
|
|
100
|
+
const pluginOperationalReportFeedSchema = z.object({
|
|
101
|
+
generatedAt: z.string(),
|
|
102
|
+
reports: z.array(pluginOperationalReportSchema),
|
|
103
|
+
source: z.literal("plugins")
|
|
104
|
+
}).strict();
|
|
105
|
+
// src/api/schema/common.ts
|
|
106
|
+
/** Stable error body returned by Junior-owned REST endpoints. */
|
|
107
|
+
const apiErrorSchema = z.object({ error: z.string().min(1) }).strict();
|
|
108
|
+
// src/api/schema/conversation-pending-messages.ts
|
|
109
|
+
/** Mailbox delivery mode for one accepted inbound message. */
|
|
110
|
+
const conversationPendingMessageDeliverySchema = z.enum(["defer", "interrupt"]);
|
|
111
|
+
/** One accepted mailbox message that has not reached durable history yet. */
|
|
112
|
+
const conversationPendingMessageSchema = z.object({
|
|
113
|
+
actorIdentity: actorIdentitySchema.optional(),
|
|
114
|
+
/** Identity id of the author. Detail `authors` maps it to the person. */
|
|
115
|
+
actorIdentityId: z.string().min(1).optional(),
|
|
116
|
+
createdAt: z.string().datetime(),
|
|
117
|
+
delivery: conversationPendingMessageDeliverySchema,
|
|
118
|
+
inboundMessageId: z.string().min(1),
|
|
119
|
+
messageId: z.string().min(1),
|
|
120
|
+
receivedAt: z.string().datetime(),
|
|
121
|
+
role: z.literal("user"),
|
|
122
|
+
source: z.enum(["slack", "web"]),
|
|
123
|
+
text: z.string().optional(),
|
|
124
|
+
/** People mentioned in the text, resolved at read time. */
|
|
125
|
+
mentions: z.array(actorIdentitySchema).optional(),
|
|
126
|
+
attachments: z.array(messageAttachmentSchema).optional(),
|
|
127
|
+
/** Review item change that this Message records. */
|
|
128
|
+
reviewItemChange: reviewItemChangeRecordSchema.optional(),
|
|
129
|
+
redacted: z.literal(true).optional()
|
|
130
|
+
}).strict().superRefine((data, context) => {
|
|
131
|
+
if (data.text === void 0 === (data.redacted !== true)) context.addIssue({
|
|
132
|
+
code: "custom",
|
|
133
|
+
message: "pending message content must be text or explicitly redacted"
|
|
134
|
+
});
|
|
135
|
+
if (data.redacted && (data.actorIdentity || data.attachments || data.mentions || data.reviewItemChange)) context.addIssue({
|
|
136
|
+
code: "custom",
|
|
137
|
+
message: "redacted pending messages must not expose actor identity, attachments, mentions, or a review item"
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
/** Participant-only authorization prompt for a parked web turn. */
|
|
141
|
+
const conversationPendingAuthorizationSchema = z.object({
|
|
142
|
+
authorizationUrl: z.string().url(),
|
|
143
|
+
completionText: z.string().min(1),
|
|
144
|
+
label: z.string().min(1)
|
|
145
|
+
}).strict();
|
|
146
|
+
/** Bounded mailbox snapshot for one conversation transcript. */
|
|
147
|
+
const conversationPendingMessagesReportSchema = z.object({
|
|
148
|
+
authorization: conversationPendingAuthorizationSchema.optional(),
|
|
149
|
+
conversationId: z.string().min(1),
|
|
150
|
+
generatedAt: z.string().datetime(),
|
|
151
|
+
messages: z.array(conversationPendingMessageSchema)
|
|
152
|
+
}).strict();
|
|
153
|
+
/** Detail report with the mailbox that was read before its history. */
|
|
154
|
+
const conversationDetailWithMailboxReportSchema = conversationDetailReportSchema.extend({ mailbox: conversationPendingMessagesReportSchema });
|
|
155
|
+
/** Optional filters for cancelling accepted mailbox rows. */
|
|
156
|
+
const cancelConversationPendingMessagesBodySchema = z.object({
|
|
157
|
+
inboundMessageIds: z.array(z.string().min(1)).min(1).optional(),
|
|
158
|
+
receivedBefore: z.string().datetime().optional()
|
|
159
|
+
}).strict();
|
|
160
|
+
/** Result of cancelling accepted human-facing mailbox rows. */
|
|
161
|
+
const cancelConversationPendingMessagesResponseSchema = z.object({
|
|
162
|
+
cancelledCount: z.number().int().nonnegative(),
|
|
163
|
+
cancelledInboundMessageIds: z.array(z.string().min(1)),
|
|
164
|
+
conversationId: z.string().min(1)
|
|
165
|
+
}).strict();
|
|
166
|
+
/** Queued web messages that the viewer wants Junior to read now. */
|
|
167
|
+
const steerConversationPendingMessagesBodySchema = z.object({ inboundMessageIds: z.array(z.string().min(1)).min(1) }).strict();
|
|
168
|
+
/** Result of steering queued web messages into the conversation. */
|
|
169
|
+
const steerConversationPendingMessagesResponseSchema = z.object({
|
|
170
|
+
conversationId: z.string().min(1),
|
|
171
|
+
steeredInboundMessageIds: z.array(z.string().min(1))
|
|
172
|
+
}).strict();
|
|
173
|
+
export { pluginsSchema as _, conversationPendingMessageDeliverySchema as a, skillReportsSchema as b, steerConversationPendingMessagesBodySchema as c, healthReportSchema as d, pluginOperationalReportFeedSchema as f, pluginSchema as g, pluginPackageContentReportSchema as h, conversationPendingAuthorizationSchema as i, steerConversationPendingMessagesResponseSchema as l, pluginPackageContentItemReportSchema as m, cancelConversationPendingMessagesResponseSchema as n, conversationPendingMessageSchema as o, pluginOperationalReportSchema as p, conversationDetailWithMailboxReportSchema as r, conversationPendingMessagesReportSchema as s, cancelConversationPendingMessagesBodySchema as t, apiErrorSchema as u, runtimeInfoReportSchema as v, skillReportSchema as y };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { On as resolvePluginOAuthAccount, d as recordAuthorizationCompleted, hi as resolveBaseUrl, ki as postSlackMessage, mi as parseOAuthStatePayload, pi as formatProviderLabel, q as getConversationPendingAuth, tt as getTurnRecord, u as recordAuthenticationLinked, wn as createUserTokenStore, zi as getSlackClient } from "./projection-
|
|
2
|
-
import { m as escapeXml } from "./client-
|
|
3
|
-
import { a as getRuntimeMetadata, n as botConfig } from "./config-
|
|
4
|
-
import { H as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-
|
|
5
|
-
import { p as parseSlackUserId } from "./actor-
|
|
6
|
-
import { B as findUserByVerifiedEmails, C as getSqlExecutor, I as resolveActorIdentityId, W as upsertLinkedIdentity, o as readIdentityById } from "./viewer-
|
|
7
|
-
import { i as homeDir } from "./package-discovery-
|
|
8
|
-
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-
|
|
9
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
10
|
-
import { t as discoverSkills } from "./skills-
|
|
11
|
-
import { d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-
|
|
1
|
+
import { On as resolvePluginOAuthAccount, d as recordAuthorizationCompleted, hi as resolveBaseUrl, ki as postSlackMessage, mi as parseOAuthStatePayload, pi as formatProviderLabel, q as getConversationPendingAuth, tt as getTurnRecord, u as recordAuthenticationLinked, wn as createUserTokenStore, zi as getSlackClient } from "./projection-C1MghKyI.js";
|
|
2
|
+
import { m as escapeXml } from "./client-h2A2ZPzY.js";
|
|
3
|
+
import { a as getRuntimeMetadata, n as botConfig } from "./config-CusBFORe.js";
|
|
4
|
+
import { H as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-CGnh65_X.js";
|
|
5
|
+
import { p as parseSlackUserId } from "./actor-6jsm_v96.js";
|
|
6
|
+
import { B as findUserByVerifiedEmails, C as getSqlExecutor, I as resolveActorIdentityId, W as upsertLinkedIdentity, o as readIdentityById } from "./viewer-BZ0Hp5Nb.js";
|
|
7
|
+
import { i as homeDir } from "./package-discovery-DJhGdS4c.js";
|
|
8
|
+
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-DR7DjX9H.js";
|
|
9
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-DpN0sWQ6.js";
|
|
10
|
+
import { t as discoverSkills } from "./skills-B2xIoe0f.js";
|
|
11
|
+
import { d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-_PYLv4Qo.js";
|
|
12
12
|
import { r as acquireActiveLock } from "./locks-D-0h111u.js";
|
|
13
|
-
import { r as getStateAdapter } from "./adapter-
|
|
14
|
-
import { _ as getMcpProviderErrorAttributes } from "./service-account-
|
|
15
|
-
import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-
|
|
16
|
-
import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-
|
|
17
|
-
import { n as relayLocalOAuthCallback } from "./oauth-relay-
|
|
13
|
+
import { r as getStateAdapter } from "./adapter-DVN3iwf9.js";
|
|
14
|
+
import { _ as getMcpProviderErrorAttributes } from "./service-account-PIMpWZHF.js";
|
|
15
|
+
import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-Bn87cfzE.js";
|
|
16
|
+
import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-C4h6mGha.js";
|
|
17
|
+
import { n as relayLocalOAuthCallback } from "./oauth-relay-D6xxVywK.js";
|
|
18
18
|
import path from "node:path";
|
|
19
19
|
import { createHmac, createSecretKey, timingSafeEqual } from "node:crypto";
|
|
20
|
-
import
|
|
20
|
+
import * as z from "zod";
|
|
21
21
|
import { pluginStoredTokensSchema } from "@sentry/junior-plugin-api";
|
|
22
22
|
import fs from "node:fs";
|
|
23
23
|
// src/handlers/mcp-oauth-callback.ts
|