@sentry/junior 0.317.0 → 0.319.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter-8_S6Birm.js +1833 -0
- package/dist/{admin-CAugg87B.js → admin-EsbUON1j.js} +1 -1
- package/dist/{agent-runner-AjrEV6Qe.js → agent-CtzMl32d.js} +19953 -6727
- package/dist/{agent-status-BA5x3Xtp.js → agent-status-Bq_AIpyp.js} +105 -1
- package/dist/{agent-update-delivery-B_YIZcgf.js → agent-update-delivery-pAvsbuGL.js} +4 -5
- package/dist/api/schema.d.ts +85 -51
- package/dist/api/schema.js +4 -4
- package/dist/api.js +81 -94
- package/dist/{app-MoNAsVV5.d.ts → app-tACXxJPI.d.ts} +8 -13
- package/dist/app.d.ts +2 -2
- package/dist/app.js +246 -153
- package/dist/{change-record-BzJgLsv7.d.ts → change-record-K-KsqNhT.d.ts} +9 -5
- package/dist/{channel-access-j-YAVYK4.js → channel-access-DET5hzZM.js} +1 -1
- package/dist/{chat-core-engine-aH85nEHv.js → chat-core-engine-DpM3tMVi.js} +7 -7
- package/dist/cli/chat.d.ts +1 -1
- package/dist/cli/chat.js +38 -30
- package/dist/cli/check.js +5 -5
- package/dist/cli/main.js +2 -2
- package/dist/cli/plugins.d.ts +1 -1
- package/dist/cli/plugins.js +8 -8
- package/dist/cli/snapshot-create.js +5 -6
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -4
- package/dist/{continue-in-slack-D-FZ8Fin.js → continue-in-slack-CFzDyxkH.js} +3 -2
- package/dist/{conversation-feed--9S0_PXL.js → conversation-feed-DEUdD7mb.js} +2 -106
- package/dist/{conversation-privacy-B1uXn5sf.js → conversation-privacy-C2vYK55O.js} +1 -1
- package/dist/{create-DoDIYgtZ.js → create-Ta3SEIB5.js} +124 -16
- package/dist/{credential-sync-BJOqGnjV.js → credential-sync-DyRqDmY4.js} +17 -20
- package/dist/{db-BFmyYZtJ.js → db-BCaNWl9p.js} +6536 -1920
- package/dist/{deployment-DXq9ZLU4.js → deployment-CfOew1Tm.js} +3 -3
- package/dist/{engine-context-CgQ7mlHt.js → engine-context-CiExoy1B.js} +181 -155
- package/dist/{html-B3VKTGbJ.js → html-Bb2Si1bR.js} +6 -8
- package/dist/instrumentation.js +7 -23
- package/dist/list-wwDcROh9.js +5007 -0
- package/dist/{logging--smS7XRK.js → logging-BRPTXAdf.js} +10 -81
- package/dist/{mailbox-turn-uSXhUFc9.js → markers-9QoqW5ov.js} +1875 -1458
- package/dist/nitro.d.ts +2 -2
- package/dist/nitro.js +7 -8
- package/dist/{oauth-callback-server-CE4soEIY.js → oauth-callback-server-vhL9b-PZ.js} +2 -2
- package/dist/{oauth-relay-C36gX1gH.js → oauth-relay-CH2v7WiB.js} +1 -1
- package/dist/{plugins-fBrz8PCV.d.ts → plugins-DhGXZjlu.d.ts} +1 -0
- package/dist/{profile-BQ-iBDsZ.js → profile-D9LdwmZi.js} +17 -19
- package/dist/{prompt-Dv7gkpD6.js → prompt-3TqxEOtc.js} +10 -10
- package/dist/{reports-WKHfGTsU.js → reports-K-tbtEyx.js} +2 -2
- package/dist/{resolve-tony4ibz.js → resolve-BBV2qf8A.js} +5 -5
- package/dist/{result-Bta_dlWa.js → result-5IdGJP4M.js} +24 -13
- package/dist/{runner-BstDRbD9.js → runner-BK_joPlM.js} +9 -18
- package/dist/{sandbox-egress-signals-oSJMJOnn.js → sandbox-egress-signals-DXgWXXmm.js} +1 -1
- package/dist/{schema-DfqrHACA.js → schema-zWGG6VC1.js} +13 -7
- package/dist/{service-account-CTV_jaNu.js → service-account-CateFyhw.js} +4 -5
- package/dist/{skills-BCEU41zM.js → skills-Ccjw8h2P.js} +10 -9
- package/dist/{slack-conversation-unfurl-DxVmhbGP.js → slack-conversation-unfurl-ZC_TSpc4.js} +7 -7
- package/dist/storage-C9U7R5rM.js +273 -0
- package/dist/{system-prompt-table-CiXy0eNR.js → system-prompt-table-YBTHIFlP.js} +26 -84
- package/dist/topic-B2EWKKBT.js +6 -0
- package/dist/{package-discovery-DD9vencX.js → topics-DxuKurCX.js} +21 -1
- package/dist/{types-C4iC-IMC.js → types-BNHkJrOP.js} +79 -59
- package/dist/{users-ByG5RCEJ.js → users-CCRAqYb_.js} +1 -1
- package/dist/{validation-8gjfR91V.js → validation-BCUpJa8K.js} +4 -4
- package/dist/{version-BeZhWWBE.js → version-BNm0JYj3.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{worker-BqMQQNRk.js → worker-BhgpZ7_b.js} +5 -5
- package/migrations/20261127002500_turn_discarded_usage/migration.sql +2 -0
- package/migrations/20261127002500_turn_discarded_usage/snapshot.json +73 -0
- package/migrations/20261127052408_space_name_nullable/migration.sql +5 -0
- package/migrations/20261127052408_space_name_nullable/snapshot.json +29 -0
- package/migrations/20261127060000_annotation_object_id_index/migration.sql +1 -0
- package/migrations/20261127060000_annotation_object_id_index/snapshot.json +69 -0
- package/migrations/20261127060001_annotation_subjects/migration.sql +78 -0
- package/migrations/20261127060001_annotation_subjects/snapshot.json +104 -0
- package/migrations/20261127060002_annotation_subject_index/migration.sql +1 -0
- package/migrations/20261127060002_annotation_subject_index/snapshot.json +70 -0
- package/migrations/20261127060003_annotation_title_url/migration.sql +84 -0
- package/migrations/20261127060003_annotation_title_url/snapshot.json +73 -0
- package/package.json +9 -7
- package/dist/catalog-runtime-DfSpJZdY.js +0 -6
- package/dist/child-message-DHjQLEd1.js +0 -19
- package/dist/config-CHQ8X251.js +0 -2422
- package/dist/conversation-turn-BUE_7xaN.js +0 -1157
- package/dist/job-runner-A1lCkybD.js +0 -1506
- package/dist/lineage-Bktb0UcV.js +0 -36
- package/dist/list-Bxvg5wXf.js +0 -12623
- package/dist/message-BNenhsmB.js +0 -154
- package/dist/model-input-BReSnwHp.js +0 -82
- package/dist/parent-result-Ck1rFYRQ.js +0 -310
- package/dist/registry-iXMT5Jmh.js +0 -3279
- package/dist/run-conversation-DL6ru7iW.js +0 -336
- package/dist/sender-actors-CPglLd5R.js +0 -83
- package/dist/spawn-frczVPIr.js +0 -48
- package/dist/task-runner-C9Yc2_ae.js +0 -1526
- package/dist/thread-context-CqZDKErp.js +0 -166
- package/dist/topic-CRYYBYp-.js +0 -7
- package/dist/topics-SRN7IVX-.js +0 -24
- package/dist/turn-membership-CENFf3kI.js +0 -856
- package/dist/turn-wake-BhloiI2h.js +0 -151
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { t as discoverSkills } from "./skills-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { a as wakePausedTurn, i as wakeAuthorizedTurn } from "./turn-wake-BhloiI2h.js";
|
|
14
|
-
import { s as readConnectedOAuthTokens, t as escapeHtml, u as htmlCallbackResponse } from "./html-B3VKTGbJ.js";
|
|
15
|
-
import { n as relayLocalOAuthCallback } from "./oauth-relay-C36gX1gH.js";
|
|
1
|
+
import { l as homeDir } from "./topics-DxuKurCX.js";
|
|
2
|
+
import { L as botConfig, R as getChatConfig, c as acquireActiveLock, i as getStateAdapter, k as parseSlackUserId, z as getRuntimeMetadata } from "./adapter-8_S6Birm.js";
|
|
3
|
+
import { Ai as postSlackMessage, Ec as findUserByVerifiedEmails, Fd as getAppContext, Jd as buildOAuthTokenRequest, Oc as upsertLinkedIdentity, Xd as hasRequiredOAuthScope, Yd as parseOAuthTokenResponse, Zs as getSlackClient, af as getMcpAuthSession, bc as resolveActorIdentityId, df as putMcpStoredOAuthCredentials, o as getSqlExecutor, pc as readIdentityById, sf as getMcpStoredOAuthCredentials, tf as deleteMcpAuthSession, wf as getMcpProviderErrorAttributes } from "./db-BCaNWl9p.js";
|
|
4
|
+
import { O as isNativeIdentityProvider, f as logException, g as runBestEffort, m as logWarn } from "./logging-BRPTXAdf.js";
|
|
5
|
+
import { G as mapBounded } from "./prompt-3TqxEOtc.js";
|
|
6
|
+
import { Nn as recordAuthenticationLinked, Or as getTurnRecord, Pn as recordAuthorizationCompleted, Q as coerceThreadConversationState, Y as getPersistedThreadState, et as deleteWebAuthorization, fr as authorizationId, li as formatProviderLabel, ui as parseOAuthStatePayload, yr as getConversationPendingAuth } from "./markers-9QoqW5ov.js";
|
|
7
|
+
import { Zt as finalizeMcpAuthorization, nt as wakeAuthorizedTurn, rt as wakePausedTurn } from "./agent-CtzMl32d.js";
|
|
8
|
+
import { t as discoverSkills } from "./skills-Ccjw8h2P.js";
|
|
9
|
+
import { A as createUserTokenStore, I as resolvePluginOAuthAccount } from "./profile-D9LdwmZi.js";
|
|
10
|
+
import { i as lookupSlackUserProfile } from "./users-CCRAqYb_.js";
|
|
11
|
+
import { s as readConnectedOAuthTokens, t as escapeHtml, u as htmlCallbackResponse } from "./html-Bb2Si1bR.js";
|
|
12
|
+
import { n as relayLocalOAuthCallback } from "./oauth-relay-CH2v7WiB.js";
|
|
16
13
|
import * as z from "zod";
|
|
17
14
|
import path from "node:path";
|
|
18
|
-
import { createHmac, createSecretKey, timingSafeEqual } from "node:crypto";
|
|
19
15
|
import { pluginStoredTokensSchema } from "@sentry/junior-plugin-api";
|
|
20
16
|
import fs from "node:fs";
|
|
17
|
+
import { createHmac, createSecretKey, timingSafeEqual } from "node:crypto";
|
|
21
18
|
// src/handlers/mcp-oauth-callback.ts
|
|
22
19
|
/**
|
|
23
20
|
* MCP OAuth callback handler.
|
|
@@ -288,7 +285,7 @@ async function buildHomeView(userId, userTokenStore) {
|
|
|
288
285
|
const runtimeMetadata = getRuntimeMetadata();
|
|
289
286
|
const descriptionText = loadDescriptionText();
|
|
290
287
|
const skillsSummaryText = await buildSkillsSummaryText();
|
|
291
|
-
const providers =
|
|
288
|
+
const providers = getAppContext().catalog.getProviders();
|
|
292
289
|
const connections = await mapBounded(providers, async (plugin) => {
|
|
293
290
|
const tokens = await readConnectedOAuthTokens(userId, plugin, userTokenStore);
|
|
294
291
|
return {
|
|
@@ -478,7 +475,7 @@ async function wakeAuthorizedPluginTurn(stored, options) {
|
|
|
478
475
|
async function GET(request, provider, waitUntil, options) {
|
|
479
476
|
const localRelay = await relayLocalOAuthCallback(request);
|
|
480
477
|
if (localRelay) return localRelay;
|
|
481
|
-
const providerConfig =
|
|
478
|
+
const providerConfig = getAppContext().catalog.getOAuthConfig(provider);
|
|
482
479
|
if (!providerConfig) return htmlErrorResponse("Unknown provider", "The OAuth provider in this link is not recognized.", 404);
|
|
483
480
|
const providerLabel = formatProviderLabel(provider);
|
|
484
481
|
const url = new URL(request.url);
|
|
@@ -666,7 +663,7 @@ async function syncLocalOAuthCredential(provider, tokens) {
|
|
|
666
663
|
provider,
|
|
667
664
|
tokens
|
|
668
665
|
});
|
|
669
|
-
const port =
|
|
666
|
+
const { port } = getChatConfig().development;
|
|
670
667
|
const response = await fetch(`http://127.0.0.1:${port}/api/internal/local-oauth-credentials`, {
|
|
671
668
|
method: "POST",
|
|
672
669
|
headers: {
|
|
@@ -680,7 +677,7 @@ async function syncLocalOAuthCredential(provider, tokens) {
|
|
|
680
677
|
/** Verify and store one credential sent by the local CLI over loopback. */
|
|
681
678
|
async function receiveLocalOAuthCredential(request) {
|
|
682
679
|
const hostname = new URL(request.url).hostname;
|
|
683
|
-
if (
|
|
680
|
+
if (!getChatConfig().development.enabled || hostname !== "127.0.0.1" && hostname !== "localhost") return new Response(null, { status: 404 });
|
|
684
681
|
const body = await request.text();
|
|
685
682
|
const actualSignature = request.headers.get("x-junior-local-credential-signature");
|
|
686
683
|
if (!actualSignature || !signaturesMatch(signature(body), actualSignature)) return Response.json({ error: "Unauthorized" }, { status: 401 });
|