@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
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
+
import { s as skillRoots } from "./package-discovery-x4AvVhMj.js";
|
|
3
|
+
import { h as logWarn } from "./logging-DiyqRLBx.js";
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-d1EM6Z0V.js";
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import fs from "node:fs/promises";
|
|
@@ -10,10 +10,7 @@ import { parse } from "yaml";
|
|
|
10
10
|
var skills_exports = /* @__PURE__ */ __exportAll({
|
|
11
11
|
discoverSkills: () => discoverSkills,
|
|
12
12
|
findSkillByName: () => findSkillByName,
|
|
13
|
-
|
|
14
|
-
parseSkillFile: () => parseSkillFile,
|
|
15
|
-
parseSkillInvocation: () => parseSkillInvocation,
|
|
16
|
-
stripFrontmatter: () => stripFrontmatter
|
|
13
|
+
parseSkillFile: () => parseSkillFile
|
|
17
14
|
});
|
|
18
15
|
const FRONTMATTER_RE = /^---\r?\n([\s\S]*?)\r?\n---\r?\n?/;
|
|
19
16
|
const SKILL_NAME_RE = /^[a-z0-9-]+$/;
|
|
@@ -136,7 +133,7 @@ const SKILL_CACHE_TTL_MS = 5e3;
|
|
|
136
133
|
let skillCache = null;
|
|
137
134
|
function resolveSkillRoots(options) {
|
|
138
135
|
const additionalRoots = options?.additionalRoots ?? [];
|
|
139
|
-
const envRoots = process.env
|
|
136
|
+
const envRoots = process.env["SKILL_DIRS"]?.split(path.delimiter).filter(Boolean) ?? [];
|
|
140
137
|
const defaults = skillRoots();
|
|
141
138
|
const pluginRoots = pluginCatalogRuntime.getSkillRoots();
|
|
142
139
|
const seen = /* @__PURE__ */ new Set();
|
package/dist/{slack-conversation-unfurl-Bty-DlHe.js → slack-conversation-unfurl-DYnqe5ci.js}
RENAMED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { E as withSpan } from "./logging-DcjLDDqi.js";
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
+
import { Co as readConversationAccessFromSql, Mo as readLatestConversationBrief, Oa as postSlackEphemeralMessage, Tt as deferConversationMove, ga as formatSlackLink, ha as escapeSlackMrkdwnText, ja as unfurlSlackLinks, ss as getWorkspaceTeamId, zi as parseDashboardConversationLink } from "./projection-DBq8tsA5.js";
|
|
4
3
|
import { _ as slackUserIdSchema, b as slackMessageTsSchema, f as parseSlackTeamId, g as slackTeamIdSchema, h as slackChannelIdSchema, m as slackBotIdSchema, n as createSlackActor, p as parseSlackUserId, s as parseActorUserId, u as parseSlackChannelId } from "./actor-D2iXzvlN.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import "./
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { G as createCache, a as getConversationStore, nt as getConversationIdByProviderConversation, o as getDb, s as getSqlExecutor } from "./db-C-2tFxk3.js";
|
|
5
|
+
import { I as lookupSlackBot, L as lookupSlackUserProfile, _r as checkSlackChannelReadAccess } from "./warmup-H8uLvW9e.js";
|
|
6
|
+
import { E as withSpan } from "./logging-DiyqRLBx.js";
|
|
7
|
+
import { i as readActorIdentity } from "./viewer-BPQHMx3-.js";
|
|
8
|
+
import { t as runWithSlackInstallation } from "./adapter-context-BdVnSuY5.js";
|
|
9
|
+
import { a as isMovableToSlack, i as continueConversationInSlack, n as alreadyContinuesInSlackMessage, t as BUSY } from "./continue-in-slack-BZnYifiG.js";
|
|
10
|
+
import "./store-Dgs7Oe44.js";
|
|
10
11
|
import * as z from "zod";
|
|
11
12
|
// src/chat/ingress/workspace-membership.ts
|
|
12
13
|
const MEMBER_TTL_MS = 3e5;
|
|
@@ -123,12 +124,7 @@ async function resolveSlackActingUser(args) {
|
|
|
123
124
|
};
|
|
124
125
|
}
|
|
125
126
|
// src/chat/ingress/slack-conversation-unfurl.ts
|
|
126
|
-
var slack_conversation_unfurl_exports = /* @__PURE__ */ __exportAll({
|
|
127
|
-
SLACK_CONTINUE_HERE_ACTION_ID: () => SLACK_CONTINUE_HERE_ACTION_ID,
|
|
128
|
-
continueDeferredSlackClick: () => continueDeferredSlackClick,
|
|
129
|
-
handleSlackContinueHereClick: () => handleSlackContinueHereClick,
|
|
130
|
-
unfurlDashboardConversationLinks: () => unfurlDashboardConversationLinks
|
|
131
|
-
});
|
|
127
|
+
var slack_conversation_unfurl_exports = /* @__PURE__ */ __exportAll({ continueDeferredSlackClick: () => continueDeferredSlackClick });
|
|
132
128
|
/** Action id of the "Continue here" button on a dashboard link preview. */
|
|
133
129
|
const SLACK_CONTINUE_HERE_ACTION_ID = "junior_continue_here";
|
|
134
130
|
const MAX_LINKS = 5;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
+
import { A as actorFromRun, j as toolInvocationDestination } from "./agent-runner-BP8_DLUv.js";
|
|
3
|
+
import { n as botConfig } from "./config-oGM7KA9M.js";
|
|
4
|
+
import { t as readConversationLineage } from "./lineage-HGLhd_-N.js";
|
|
5
|
+
import { _ as getConversationWorkState } from "./store-Dgs7Oe44.js";
|
|
6
|
+
import { Kt as getAgentInvocation, Tn as AgentDepthLimitError, fn as createAndEnqueueAgentInvocation, kn as getAgentBinding } from "./warmup-H8uLvW9e.js";
|
|
7
|
+
import { I as getUnnamedAgentConversationId, T as getAgentInvocationId, k as getAgentInvocationMessageId } from "./turn-user-message-19CkuUvM.js";
|
|
8
8
|
// src/chat/agent-invocations/spawn.ts
|
|
9
9
|
var spawn_exports = /* @__PURE__ */ __exportAll({ bindSpawnAgent: () => bindSpawnAgent });
|
|
10
10
|
/**
|
|
@@ -1,6 +1,35 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
2
|
-
import { h as logWarn } from "./logging-
|
|
3
|
-
import {
|
|
1
|
+
import { i as getChatConfig } from "./config-oGM7KA9M.js";
|
|
2
|
+
import { h as logWarn } from "./logging-DiyqRLBx.js";
|
|
3
|
+
import { o as getDb } from "./db-C-2tFxk3.js";
|
|
4
|
+
import { P as juniorUsers } from "./executor-NVfS8aQ2.js";
|
|
5
|
+
import { createCipheriv, createDecipheriv, createHash, randomBytes } from "node:crypto";
|
|
6
|
+
import { eq } from "drizzle-orm";
|
|
7
|
+
// src/chat/conversations/legacy-web-actor-id.ts
|
|
8
|
+
/**
|
|
9
|
+
* Web Actor ids that Junior stored before web Actors used the User id.
|
|
10
|
+
*
|
|
11
|
+
* Mailbox input, web authorizations, and OAuth credentials saved before that
|
|
12
|
+
* deploy still carry `dashboard:` and the first 24 hex characters of
|
|
13
|
+
* sha256(email).
|
|
14
|
+
*
|
|
15
|
+
* TODO(dcramer): Delete with its callers after that input and those
|
|
16
|
+
* authorizations expire and no `dashboard:` credential keys remain.
|
|
17
|
+
*/
|
|
18
|
+
const USER_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
19
|
+
/** Return the legacy web Actor id for one email. */
|
|
20
|
+
function legacyWebActorUserId(email) {
|
|
21
|
+
return `dashboard:${createHash("sha256").update(email.trim().toLowerCase()).digest("hex").slice(0, 24)}`;
|
|
22
|
+
}
|
|
23
|
+
/** Return every web Actor id that names this User, the User id first. */
|
|
24
|
+
function webActorUserIds(user) {
|
|
25
|
+
return [user.id, legacyWebActorUserId(user.email)];
|
|
26
|
+
}
|
|
27
|
+
/** Return the legacy web Actor id of a User id, when the User exists. */
|
|
28
|
+
async function findLegacyWebActorUserId(userId) {
|
|
29
|
+
if (!USER_ID_PATTERN.test(userId)) return void 0;
|
|
30
|
+
const rows = await getDb().select({ email: juniorUsers.primaryEmailNormalized }).from(juniorUsers).where(eq(juniorUsers.id, userId)).limit(1);
|
|
31
|
+
return rows[0] ? legacyWebActorUserId(rows[0].email) : void 0;
|
|
32
|
+
}
|
|
4
33
|
// src/chat/encryption/secret.ts
|
|
5
34
|
/**
|
|
6
35
|
* Encrypt secrets that Junior keeps at rest, such as provider credentials.
|
|
@@ -90,7 +119,7 @@ function decode(key, envelope) {
|
|
|
90
119
|
decrypted = decryptSecret(envelope, key);
|
|
91
120
|
} catch (error) {
|
|
92
121
|
if (!(error instanceof UnreadableSecretError)) throw error;
|
|
93
|
-
logWarn("encryption.
|
|
122
|
+
logWarn("encryption.secret.unreadable", { "error.type": error.reason });
|
|
94
123
|
return;
|
|
95
124
|
}
|
|
96
125
|
return {
|
|
@@ -129,4 +158,4 @@ async function readEncryptedState(state, key) {
|
|
|
129
158
|
};
|
|
130
159
|
return decode(key, stored);
|
|
131
160
|
}
|
|
132
|
-
export { readEncryptedState as n, createEncryptedState as t };
|
|
161
|
+
export { webActorUserIds as i, readEncryptedState as n, findLegacyWebActorUserId as r, createEncryptedState as t };
|