@sentry/junior 0.301.0 → 0.303.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter-context-BdVnSuY5.js +43 -0
- package/dist/{admin-CRJHvCGg.js → admin-AfeAdS3J.js} +2 -2
- package/dist/{agent-runner-H4YhvNBj.js → agent-runner-BP8_DLUv.js} +4688 -13870
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +7 -8
- package/dist/api.d.ts +13 -12
- package/dist/api.js +268 -118
- package/dist/{app-HDZglaIu.d.ts → app-Dd9v1mNx.d.ts} +15 -15
- package/dist/app.d.ts +1 -1
- package/dist/app.js +99 -330
- package/dist/{automation-Cva5ZOwW.js → automation-D9MvhOWY.js} +3 -1
- package/dist/{background-compaction-queue-CNrZ3QcU.js → background-compaction-queue-xaE05jxH.js} +97 -206
- package/dist/{briefs-x6Mzwxmg.js → briefs-D8i-dKTp.js} +4 -4
- package/dist/{catalog-runtime-BEY6EGRi.js → catalog-runtime-d1EM6Z0V.js} +2 -2
- package/dist/cli/chat.d.ts +1 -1
- package/dist/cli/chat.js +21 -21
- package/dist/cli/check.js +8 -8
- package/dist/cli/env.d.ts +1 -0
- package/dist/cli/env.js +8 -7
- package/dist/cli/init.js +13 -4
- package/dist/cli/main.js +4 -4
- package/dist/cli/plugins.js +6 -6
- package/dist/cli/snapshot-create.js +7 -5
- package/dist/cli/upgrade.d.ts +2 -2
- package/dist/cli/upgrade.js +5 -5
- package/dist/{config-CmjhyqgB.js → config-oGM7KA9M.js} +44 -63
- package/dist/{connections-CfIRm0xv.js → connections-BlikzEJv.js} +6 -6
- package/dist/{continue-in-slack-DPoABVkB.js → continue-in-slack-BZnYifiG.js} +5 -6
- package/dist/{conversation-BNXfq6Lb.js → conversation-CY1jnBiC.js} +1 -1
- package/dist/{conversation-feed-CfpyFMHP.js → conversation-feed-BZJRk6UV.js} +2 -1
- package/dist/{conversation-privacy-0CM0V2qK.js → conversation-privacy-Cx515ddM.js} +7 -7
- package/dist/{conversation-turn-C0sxyvS-.js → conversation-turn-DAhRdX4m.js} +20 -24
- package/dist/{credential-sync-tEMKZ_8M.js → credential-sync-DfhmWFeo.js} +18 -20
- package/dist/{db-Czra10QW.js → db-C-2tFxk3.js} +326 -17
- package/dist/{db-BdUHQhrC.d.ts → db-DPqcEM9_.d.ts} +25 -25
- package/dist/{executor-D_023K0H.js → executor-NVfS8aQ2.js} +51 -10
- package/dist/{history-IjdmO_r6.js → history-UZ3M2M9r.js} +13 -10
- package/dist/install-CHLrpRZc.js +228 -0
- package/dist/instrumentation.d.ts +4 -4
- package/dist/instrumentation.js +10 -10
- package/dist/{lineage-DmMIE0VL.js → lineage-HGLhd_-N.js} +2 -2
- package/dist/{logging-DcjLDDqi.js → logging-DiyqRLBx.js} +24 -20
- package/dist/{message-C0JY9RJP.js → message-CkCOcbFH.js} +9 -9
- package/dist/{model-input-CBp-p24N.js → model-input-DmoPPtPE.js} +5 -10
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +7 -6
- package/dist/{oauth-callback-server-BRq9QNhU.js → oauth-callback-server-CIf_6YmA.js} +5 -4
- package/dist/{oauth-relay-DRzq73b6.js → oauth-relay-DAmfVmJu.js} +3 -6
- package/dist/{package-discovery-DJhGdS4c.js → package-discovery-x4AvVhMj.js} +1 -1
- package/dist/{plugin-module-Cf5gVPWP.js → plugin-module-Cv2ETe8Y.js} +1 -1
- package/dist/{plugins-BBX07Jzt.js → plugins-Bkk0XRo2.js} +3 -3
- package/dist/{projection-CQNDOi82.js → projection-DBq8tsA5.js} +489 -223
- package/dist/{prompt-DLUB5m72.js → prompt-D2KlJopL.js} +15 -5
- package/dist/{queue-CZyYgPF0.d.ts → queue-CbEHUO0l.d.ts} +1 -1
- package/dist/queue-DFaOscp5.js +115 -0
- package/dist/{registry-Dj377ADs.js → registry-Bu0Z9BEO.js} +37 -37
- package/dist/{resolve-DJkh9Fky.js → resolve-DXuA3G0g.js} +4 -229
- package/dist/{result-C8iIpDl1.js → result-DpiNseDA.js} +11 -16
- package/dist/rolldown-runtime-BKpuH2hG.js +26 -0
- package/dist/{runner-DZqrOy8C.js → runner-iu1heRFv.js} +10 -10
- package/dist/{sandbox-egress-signals-CGwH86S9.js → sandbox-egress-signals-2HFYDcQf.js} +1 -1
- package/dist/{schema-CdZFn7Qd.d.ts → schema-DHMOaRzC.d.ts} +959 -41
- package/dist/{schema-DyHXiQKI.js → schema-DvfX3Gq_.js} +141 -40
- package/dist/{secrets-DebYU866.js → secrets-DHaJ5TTn.js} +4 -4
- package/dist/{sentry-BRTJqumy.js → sentry-CPbZjomA.js} +3 -28
- package/dist/{sentry-route-name-BhwWnfqj.js → sentry-route-name-C6EIzAGP.js} +1 -1
- package/dist/{service-account-suY004dx.js → service-account-BcT5LR7V.js} +271 -20
- package/dist/{service-account-D6jGR4a1.js → service-account-xYkaQTrw.js} +3 -3
- package/dist/{session-stop-BLmfFI3d.js → session-stop-BLLp1IP_.js} +1098 -1110
- package/dist/{skills-CmNG0dHb.js → skills-CNAGH4ju.js} +6 -9
- package/dist/{slack-conversation-unfurl-Bty-DlHe.js → slack-conversation-unfurl-DYnqe5ci.js} +10 -14
- package/dist/{spawn-CNjkpXpk.js → spawn-cGasWW33.js} +7 -7
- package/dist/{state-CEbZuZD6.js → state-CDS6h_Wv.js} +34 -5
- package/dist/{stop-Bjy2-K4H.js → stop-DMMA67yT.js} +896 -196
- package/dist/{store-DmV4CoNr.js → store-Dgs7Oe44.js} +5 -5
- package/dist/{task-queue-AhG1tSXR.js → task-queue-DcF0nhhz.js} +3 -3
- package/dist/{task-runner-BMxZI3o7.js → task-runner-BGXF7Fo7.js} +15 -20
- package/dist/{thread-context-CXLnbg7g.js → thread-context-BPky1KBe.js} +12 -12
- package/dist/{store-Epv6t4vV.js → turn-session-routing-DGvn9MSl.js} +384 -13
- package/dist/{turn-user-message-DsUZi9gn.js → turn-user-message-19CkuUvM.js} +3 -3
- package/dist/{validation-DOz8X9BU.js → validation-lu1DgjNQ.js} +2 -2
- package/dist/vercel.js +1 -1
- package/dist/{version-CGMRmMPK.js → version-Uo3c94Dx.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-H3EsMWtJ.js → viewer-BPQHMx3-.js} +3 -3
- package/dist/warmup-H8uLvW9e.js +13946 -0
- package/dist/{statuses-Hn-HsOph.js → web-message-id-lNodcCOI.js} +136 -1
- package/dist/{worker-ClphajjD.js → worker-B-pM_-3K.js} +9 -12
- package/migrations/0108_conversation_embeddings.sql +13 -0
- package/migrations/0109_user_preferences.sql +1 -0
- package/migrations/0110_code_change_repository_state_index.sql +1 -0
- package/migrations/meta/0108_snapshot.json +4688 -0
- package/migrations/meta/0109_snapshot.json +4925 -0
- package/migrations/meta/0110_snapshot.json +4952 -0
- package/migrations/meta/_journal.json +22 -1
- package/package.json +16 -17
- package/dist/adapter-CNjGEJO9.js +0 -303
- package/dist/reporting-window-DopzcOHh.js +0 -137
- package/dist/turn-session-routing-BD3-jJl7.js +0 -380
- package/dist/users-BxvYclQg.js +0 -424
- package/dist/warmup-CdU5hR49.js +0 -3715
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { rs as runWithSlackInstallationToken } from "./projection-DBq8tsA5.js";
|
|
2
|
+
import { J as getStateAdapter } from "./db-C-2tFxk3.js";
|
|
3
|
+
// src/chat/slack/adapter-context.ts
|
|
4
|
+
const initializedAdapters = /* @__PURE__ */ new WeakSet();
|
|
5
|
+
async function getConnectedState(stateAdapter) {
|
|
6
|
+
const state = stateAdapter ?? getStateAdapter();
|
|
7
|
+
await state.connect();
|
|
8
|
+
return state;
|
|
9
|
+
}
|
|
10
|
+
/** Initialize the Slack adapter against the repository state adapter. */
|
|
11
|
+
async function ensureSlackAdapterInitialized(args) {
|
|
12
|
+
if (initializedAdapters.has(args.adapter)) return;
|
|
13
|
+
const state = await getConnectedState(args.state);
|
|
14
|
+
await args.adapter.initialize({ getState: () => state });
|
|
15
|
+
if (args.adapter.defaultBotTokenProvider && !args.adapter.botUserId) throw new Error("Slack adapter initialized without a resolved bot user id");
|
|
16
|
+
initializedAdapters.add(args.adapter);
|
|
17
|
+
}
|
|
18
|
+
/** Verify a Slack request using the adapter's configured signing secret. */
|
|
19
|
+
function verifySlackSignature(args) {
|
|
20
|
+
const verifySignature = args.adapter.verifySignature;
|
|
21
|
+
if (!verifySignature) throw new Error("Slack adapter does not expose signature verification");
|
|
22
|
+
return verifySignature.call(args.adapter, args.body, args.request.headers.get("x-slack-request-timestamp"), args.request.headers.get("x-slack-signature"));
|
|
23
|
+
}
|
|
24
|
+
/** Run Slack work with the installation token that matches the inbound event. */
|
|
25
|
+
async function runWithSlackInstallation(args) {
|
|
26
|
+
await ensureSlackAdapterInitialized({
|
|
27
|
+
adapter: args.adapter,
|
|
28
|
+
state: args.state
|
|
29
|
+
});
|
|
30
|
+
const internals = args.adapter;
|
|
31
|
+
if (internals.defaultBotTokenProvider) return await args.task();
|
|
32
|
+
const installationId = args.installation.isEnterpriseInstall ? args.installation.enterpriseId : args.installation.teamId;
|
|
33
|
+
if (!installationId) throw new Error("Slack installation context is missing team id");
|
|
34
|
+
if (!internals.resolveTokenForTeam || !internals.requestContext) throw new Error("Slack adapter cannot resolve workspace installations");
|
|
35
|
+
const tokenContext = await internals.resolveTokenForTeam.call(args.adapter, installationId, args.installation.isEnterpriseInstall);
|
|
36
|
+
if (!tokenContext) throw new Error(`Slack installation token was not found for ${installationId}`);
|
|
37
|
+
return await internals.requestContext.run({
|
|
38
|
+
...tokenContext,
|
|
39
|
+
enterpriseId: args.installation.enterpriseId,
|
|
40
|
+
isEnterpriseInstall: args.installation.isEnterpriseInstall
|
|
41
|
+
}, () => runWithSlackInstallationToken(tokenContext.token, args.task));
|
|
42
|
+
}
|
|
43
|
+
export { verifySlackSignature as n, runWithSlackInstallation as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as getDb } from "./db-
|
|
2
|
-
import { r as listAdminUsersFromSql, u as setUserAdminFromSql } from "./viewer-
|
|
1
|
+
import { o as getDb } from "./db-C-2tFxk3.js";
|
|
2
|
+
import { r as listAdminUsersFromSql, u as setUserAdminFromSql } from "./viewer-BPQHMx3-.js";
|
|
3
3
|
import { CLI_USAGE } from "./cli/run.js";
|
|
4
4
|
// src/cli/admin.ts
|
|
5
5
|
/**
|