@sentry/junior 0.74.1 → 0.76.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/README.md +1 -1
- package/bin/junior.mjs +4 -66
- package/dist/agent-hooks-ZOE7RIED.js +37 -0
- package/dist/api-reference.d.ts +3 -1
- package/dist/app.js +5516 -5422
- package/dist/build/copy-build-content.d.ts +1 -1
- package/dist/build/virtual-config.d.ts +2 -2
- package/dist/chat/agent-dispatch/context.d.ts +2 -3
- package/dist/chat/agent-dispatch/runner.d.ts +2 -0
- package/dist/chat/agent-dispatch/types.d.ts +2 -1
- package/dist/chat/config.d.ts +3 -0
- package/dist/chat/credentials/state-adapter-token-store.d.ts +2 -0
- package/dist/chat/credentials/subject.d.ts +3 -3
- package/dist/chat/credentials/user-token-store.d.ts +17 -12
- package/dist/chat/db.d.ts +8 -0
- package/dist/chat/mcp/auth-store.d.ts +2 -1
- package/dist/chat/mcp/oauth.d.ts +2 -1
- package/dist/chat/oauth-flow.d.ts +3 -1
- package/dist/chat/pi/client.d.ts +15 -7
- package/dist/chat/plugins/agent-hooks.d.ts +20 -13
- package/dist/chat/plugins/auth/oauth-request.d.ts +11 -7
- package/dist/chat/plugins/credential-hooks.d.ts +6 -6
- package/dist/chat/plugins/logging.d.ts +2 -2
- package/dist/chat/plugins/model.d.ts +9 -0
- package/dist/chat/plugins/package-discovery.d.ts +2 -1
- package/dist/chat/plugins/prompt.d.ts +5 -0
- package/dist/chat/plugins/registry.d.ts +4 -0
- package/dist/chat/plugins/state.d.ts +3 -5
- package/dist/chat/plugins/task-callback.d.ts +5 -0
- package/dist/chat/plugins/task-message.d.ts +23 -0
- package/dist/chat/plugins/task-queue.d.ts +5 -0
- package/dist/chat/plugins/task-runner.d.ts +12 -0
- package/dist/chat/plugins/task-signing.d.ts +31 -0
- package/dist/chat/plugins/types.d.ts +1 -0
- package/dist/chat/plugins/validation.d.ts +5 -0
- package/dist/chat/prompt.d.ts +15 -1
- package/dist/chat/requester.d.ts +6 -5
- package/dist/chat/respond-helpers.d.ts +2 -0
- package/dist/chat/respond.d.ts +13 -2
- package/dist/chat/runtime/agent-continue-runner.d.ts +4 -0
- package/dist/chat/runtime/reply-executor.d.ts +5 -1
- package/dist/chat/runtime/slack-resume.d.ts +10 -2
- package/dist/chat/runtime/slack-runtime.d.ts +6 -1
- package/dist/chat/sandbox/egress-credentials.d.ts +8 -8
- package/dist/chat/sandbox/sandbox.d.ts +2 -2
- package/dist/chat/sentry.d.ts +1 -0
- package/dist/chat/services/mcp-auth-orchestration.d.ts +2 -1
- package/dist/chat/services/plugin-auth-orchestration.d.ts +2 -1
- package/dist/chat/services/subscribed-decision.d.ts +2 -2
- package/dist/chat/services/turn-session-record.d.ts +11 -7
- package/dist/chat/sql/db.d.ts +3 -0
- package/dist/chat/sql/executor.d.ts +7 -0
- package/dist/chat/sql/neon.d.ts +2 -4
- package/dist/chat/sql/postgres.d.ts +6 -0
- package/dist/chat/state/turn-session.d.ts +8 -5
- package/dist/chat/task-execution/state.d.ts +7 -2
- package/dist/chat/task-execution/worker.d.ts +1 -1
- package/dist/chat/tools/agent-tools.d.ts +9 -2
- package/dist/chat/tools/slack/context.d.ts +2 -2
- package/dist/chat/tools/types.d.ts +7 -4
- package/dist/chat/vercel-queue-client.d.ts +3 -0
- package/dist/{chunk-YOHFWWBV.js → chunk-2ECJXSVQ.js} +5 -107
- package/dist/{chunk-OR6NQJ5E.js → chunk-4SCWV7TJ.js} +3 -3
- package/dist/chunk-4UO6FK4G.js +64 -0
- package/dist/chunk-56TBVRJG.js +115 -0
- package/dist/{chunk-3BYAPS6B.js → chunk-EJN6G5A2.js} +17 -11
- package/dist/{chunk-SQGMG7OD.js → chunk-HHDUKWVG.js} +508 -149
- package/dist/{chunk-6UP2Z2RZ.js → chunk-JBASI5VV.js} +7 -7
- package/dist/chunk-KNFROR7R.js +127 -0
- package/dist/{chunk-HYHKTFG2.js → chunk-KOIMO7S3.js} +186 -910
- package/dist/chunk-MLKGABMK.js +9 -0
- package/dist/chunk-NFTMTIP3.js +964 -0
- package/dist/chunk-NYKJ3KON.js +1082 -0
- package/dist/{chunk-SJHUF3DP.js → chunk-OJ53FYVG.js} +2 -10
- package/dist/{chunk-KVZL5NZS.js → chunk-Q3XNY442.js} +17 -7
- package/dist/{chunk-YRDS7VKO.js → chunk-Q6XFTRV5.js} +2 -2
- package/dist/chunk-R6Z5XWY3.js +1076 -0
- package/dist/chunk-RV5RYIJW.js +56 -0
- package/dist/chunk-SG5WAA7H.js +132 -0
- package/dist/chunk-ST6YNAXG.js +54 -0
- package/dist/{chunk-GM7HTXYC.js → chunk-T77LUIX3.js} +148 -151
- package/dist/{chunk-CYUI7JU5.js → chunk-VALUBQ7R.js} +22 -30
- package/dist/chunk-XBBC6W45.js +71 -0
- package/dist/chunk-Y2CM7HXH.js +111 -0
- package/dist/{chunk-F6HWCPOC.js → chunk-Y5OFBCBZ.js} +1 -1
- package/dist/{chunk-M4FLLXXD.js → chunk-Z4CIQ3EB.js} +5 -1
- package/dist/{chunk-7Q5YOUUT.js → chunk-ZLMBNBUG.js} +146 -52
- package/dist/{chunk-2LUZA3LY.js → chunk-ZQB37HUX.js} +11 -11
- package/dist/cli/chat.js +87 -8
- package/dist/cli/check.js +8 -7
- package/dist/cli/env.js +4 -53
- package/dist/cli/init.js +6 -1
- package/dist/cli/main.js +84 -0
- package/dist/cli/plugins.js +244 -0
- package/dist/cli/run.js +5 -52
- package/dist/cli/snapshot-warmup.js +12 -11
- package/dist/cli/upgrade.js +385 -26
- package/dist/db-7A7PFRGL.js +17 -0
- package/dist/deployment.d.ts +1 -0
- package/dist/handlers/sandbox-egress-route.d.ts +4 -0
- package/dist/handlers/slack-webhook.d.ts +4 -0
- package/dist/handlers/webhooks.d.ts +6 -13
- package/dist/instrumentation.js +14 -18
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +67 -101
- package/dist/plugin-module.d.ts +21 -0
- package/dist/plugins-PZMDS7AT.js +15 -0
- package/dist/plugins.d.ts +9 -5
- package/dist/registry-OIPAJU2O.js +46 -0
- package/dist/reporting/conversations.d.ts +3 -3
- package/dist/reporting.d.ts +6 -5
- package/dist/reporting.js +42 -28
- package/dist/{runner-27NP2TEO.js → runner-KPLNHDCV.js} +77 -19
- package/dist/sentry-4CP5NNQ5.js +31 -0
- package/dist/validation-SLA6IGF7.js +15 -0
- package/dist/vercel.js +1 -1
- package/package.json +14 -11
- package/dist/chat/conversations/configured.d.ts +0 -5
- package/dist/chat/conversations/state.d.ts +0 -4
- package/dist/chunk-2KG3PWR4.js +0 -17
- package/dist/chunk-JL2SLRAT.js +0 -1970
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__reExport
|
|
3
|
-
} from "./chunk-2KG3PWR4.js";
|
|
4
|
-
|
|
5
|
-
// src/chat/sentry.ts
|
|
6
|
-
var sentry_exports = {};
|
|
7
|
-
__reExport(sentry_exports, node_star);
|
|
8
|
-
import * as node_star from "@sentry/node";
|
|
9
|
-
|
|
10
1
|
// src/deployment.ts
|
|
11
2
|
var JUNIOR_HEARTBEAT_ROUTE = "/api/internal/heartbeat";
|
|
12
3
|
var JUNIOR_HEARTBEAT_CRON_SCHEDULE = "* * * * *";
|
|
13
4
|
var JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE = "/api/internal/agent/continue";
|
|
5
|
+
var JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE = "/api/internal/plugin/tasks";
|
|
14
6
|
var LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION = "api/internal/agent/continue.ts";
|
|
15
7
|
function toOptionalTrimmed(value) {
|
|
16
8
|
const trimmed = value?.trim();
|
|
@@ -33,10 +25,10 @@ function getDeploymentTelemetryAttributes() {
|
|
|
33
25
|
}
|
|
34
26
|
|
|
35
27
|
export {
|
|
36
|
-
sentry_exports,
|
|
37
28
|
JUNIOR_HEARTBEAT_ROUTE,
|
|
38
29
|
JUNIOR_HEARTBEAT_CRON_SCHEDULE,
|
|
39
30
|
JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE,
|
|
31
|
+
JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE,
|
|
40
32
|
LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION,
|
|
41
33
|
getDeploymentServiceVersion,
|
|
42
34
|
getDeploymentTelemetryAttributes
|
|
@@ -217,6 +217,9 @@ function listReferenceFiles() {
|
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
+
// src/chat/plugins/package-discovery.ts
|
|
221
|
+
import path3 from "path";
|
|
222
|
+
|
|
220
223
|
// src/package-resolution.ts
|
|
221
224
|
import { statSync as statSync2 } from "fs";
|
|
222
225
|
import { createRequire } from "module";
|
|
@@ -354,7 +357,6 @@ function resolvePackageDir(cwd, packageName) {
|
|
|
354
357
|
}
|
|
355
358
|
|
|
356
359
|
// src/chat/plugins/package-discovery.ts
|
|
357
|
-
import path3 from "path";
|
|
358
360
|
function normalizeForGlob(targetPath) {
|
|
359
361
|
return targetPath.split(path3.sep).join("/");
|
|
360
362
|
}
|
|
@@ -410,13 +412,15 @@ function resolvePackageDirFromName(cwd, packageName, candidateNodeModulesDirs) {
|
|
|
410
412
|
}
|
|
411
413
|
function readPluginPackageFlags(dir) {
|
|
412
414
|
const hasRootPluginManifest = isFile(path3.join(dir, "plugin.yaml"));
|
|
415
|
+
const hasMigrationsDir = isDirectory(path3.join(dir, "migrations"));
|
|
413
416
|
const hasPluginsDir = isDirectory(path3.join(dir, "plugins"));
|
|
414
417
|
const hasSkillsDir = isDirectory(path3.join(dir, "skills"));
|
|
415
|
-
if (!hasRootPluginManifest && !hasPluginsDir && !hasSkillsDir) {
|
|
418
|
+
if (!hasRootPluginManifest && !hasMigrationsDir && !hasPluginsDir && !hasSkillsDir) {
|
|
416
419
|
return null;
|
|
417
420
|
}
|
|
418
421
|
return {
|
|
419
422
|
hasRootPluginManifest,
|
|
423
|
+
hasMigrationsDir,
|
|
420
424
|
hasPluginsDir,
|
|
421
425
|
hasSkillsDir
|
|
422
426
|
};
|
|
@@ -441,14 +445,14 @@ function discoverDeclaredPackages(packageNames, candidateNodeModulesDirs, cwd) {
|
|
|
441
445
|
const pluginFlags = readPluginPackageFlags(resolved.dir);
|
|
442
446
|
if (!pluginFlags) {
|
|
443
447
|
throw new Error(
|
|
444
|
-
`Plugin package "${packageName}" was configured but does not contain plugin content; expected plugin.yaml, plugins/, or skills/ in ${resolved.dir}`
|
|
448
|
+
`Plugin package "${packageName}" was configured but does not contain plugin content; expected plugin.yaml, migrations/, plugins/, or skills/ in ${resolved.dir}`
|
|
445
449
|
);
|
|
446
450
|
}
|
|
447
451
|
seenPackageDirs.add(resolved.dir);
|
|
448
452
|
discovered.push({
|
|
449
|
-
name: packageName,
|
|
450
453
|
dir: resolved.dir,
|
|
451
454
|
nodeModulesDir: resolved.nodeModulesDir,
|
|
455
|
+
packageName,
|
|
452
456
|
...pluginFlags
|
|
453
457
|
});
|
|
454
458
|
}
|
|
@@ -469,7 +473,7 @@ function discoverInstalledPluginPackageContent(cwd = process.cwd(), options) {
|
|
|
469
473
|
for (const pkg of discoveredPackages) {
|
|
470
474
|
const tracingBasePath = pkg.nodeModulesDir ? pathForTracingInclude(
|
|
471
475
|
resolvedCwd,
|
|
472
|
-
path3.join(pkg.nodeModulesDir, ...pkg.
|
|
476
|
+
path3.join(pkg.nodeModulesDir, ...pkg.packageName.split("/"))
|
|
473
477
|
) : pathForTracingInclude(resolvedCwd, pkg.dir);
|
|
474
478
|
if (pkg.hasRootPluginManifest) {
|
|
475
479
|
manifestRoots.push(pkg.dir);
|
|
@@ -477,6 +481,11 @@ function discoverInstalledPluginPackageContent(cwd = process.cwd(), options) {
|
|
|
477
481
|
tracingIncludes.push(`${tracingBasePath}/plugin.yaml`);
|
|
478
482
|
}
|
|
479
483
|
}
|
|
484
|
+
if (pkg.hasMigrationsDir) {
|
|
485
|
+
if (tracingBasePath) {
|
|
486
|
+
tracingIncludes.push(`${tracingBasePath}/migrations/**/*`);
|
|
487
|
+
}
|
|
488
|
+
}
|
|
480
489
|
if (pkg.hasPluginsDir) {
|
|
481
490
|
manifestRoots.push(path3.join(pkg.dir, "plugins"));
|
|
482
491
|
if (tracingBasePath) {
|
|
@@ -492,12 +501,13 @@ function discoverInstalledPluginPackageContent(cwd = process.cwd(), options) {
|
|
|
492
501
|
}
|
|
493
502
|
return {
|
|
494
503
|
packageNames: uniqueStringsInOrder(
|
|
495
|
-
discoveredPackages.map((pkg) => pkg.
|
|
504
|
+
discoveredPackages.map((pkg) => pkg.packageName)
|
|
496
505
|
),
|
|
497
506
|
packages: discoveredPackages.map((pkg) => ({
|
|
498
507
|
dir: pkg.dir,
|
|
508
|
+
hasMigrationsDir: pkg.hasMigrationsDir,
|
|
499
509
|
hasSkillsDir: pkg.hasSkillsDir,
|
|
500
|
-
|
|
510
|
+
packageName: pkg.packageName
|
|
501
511
|
})),
|
|
502
512
|
manifestRoots: uniqueStringsInOrder(manifestRoots),
|
|
503
513
|
skillRoots: uniqueStringsInOrder(skillRoots2),
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getSlackBotToken
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-T77LUIX3.js";
|
|
4
4
|
import {
|
|
5
5
|
isSlackConversationId,
|
|
6
6
|
isSlackTeamId,
|
|
7
7
|
logWarn
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-EJN6G5A2.js";
|
|
9
9
|
|
|
10
10
|
// src/chat/slack/client.ts
|
|
11
11
|
import { WebClient } from "@slack/web-api";
|