@sentry/junior 0.310.0 → 0.312.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-BhKpjpGD.js → adapter-context-BRjEWRy1.js} +2 -2
- package/dist/adapter-iIq7ihf7.js +259 -0
- package/dist/{admin-tgZEZAk2.js → admin-DhInw5K9.js} +1 -2
- package/dist/{agent-runner-D9cvNlQl.js → agent-runner-C9iDurwX.js} +6507 -7721
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +7 -6
- package/dist/api.d.ts +21 -3
- package/dist/api.js +1625 -535
- package/dist/{app-B_7Wn0en.d.ts → app-DRFrC8Mw.d.ts} +14 -10
- package/dist/app.d.ts +2 -2
- package/dist/app.js +454 -994
- package/dist/{background-compaction-queue-BGHqkhkY.js → background-compaction-queue-DrKi7w3d.js} +10 -85
- package/dist/callback-mFlTUWWx.js +75 -0
- package/dist/{catalog-runtime-BxwzbLKY.js → catalog-runtime-D7xapBAX.js} +1 -1
- package/dist/channel-access-CJGfNTdn.js +221 -0
- package/dist/child-message-DcsritGf.js +179 -0
- package/dist/cli/chat.js +18 -19
- package/dist/cli/check.js +23 -29
- package/dist/cli/init.js +1 -7
- package/dist/cli/main.js +3 -7
- package/dist/cli/plugins.js +8 -7
- package/dist/cli/run.d.ts +1 -2
- package/dist/cli/run.js +1 -2
- package/dist/cli/snapshot-create.js +5 -5
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -3
- package/dist/{config-Dkt2Le2b.js → config-kXB2Y5tl.js} +294 -28
- package/dist/{continue-in-slack-BWVwePKD.js → continue-in-slack-O6pV5004.js} +7 -7
- package/dist/{conversation-feed-Ci6YD1N-.js → conversation-feed-uNOv_x68.js} +87 -24
- package/dist/{conversation-privacy-C39g8BY4.js → conversation-privacy-L4ja1_W6.js} +1 -1
- package/dist/{conversation-turn-CBlZIH02.js → conversation-turn-CeLbHqdw.js} +56 -49
- package/dist/{credential-sync-vGnrB0BY.js → credential-sync-I8VBGk05.js} +16 -16
- package/dist/{projection-jZSlEAXG.js → credentialed-Cb6E2phL.js} +16268 -16821
- package/dist/{db-B4Hjxr-u.d.ts → db-BbC5stfa.d.ts} +13 -6
- package/dist/{db-CFZggNoy.js → db-LAyyX8tk.js} +1698 -1046
- package/dist/{executor-BPkZDx5-.js → executor-SCub-fAq.js} +552 -181
- package/dist/{html-2r2KmLwi.js → html-BCZ3Xtb_.js} +6 -6
- package/dist/{session-stop-BfY4rhJs.js → ingest-BDf3D50j.js} +2134 -2553
- package/dist/{install-C-oE6C_u.js → install-DCFJFkC0.js} +2 -2
- package/dist/instrumentation.js +4 -4
- package/dist/{lineage-CsvrEFQe.js → lineage-B_m-4TJw.js} +2 -2
- package/dist/{stop-DYzjRf2U.js → list-CN2QA2R9.js} +1656 -685
- package/dist/{logging-D5gkyvnK.js → logging-dQ9ZRGQ8.js} +47 -9
- package/dist/media-CYm1QD8T.js +2356 -0
- package/dist/{message-DwvJ-I3w.js → message-DSXGj1hM.js} +19 -29
- package/dist/{model-input-MAq2881y.js → model-input--TrP9hYV.js} +3 -3
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +4 -3
- package/dist/{oauth-callback-server-DIF6Li06.js → oauth-callback-server-DHCZC6B4.js} +2 -2
- package/dist/{oauth-relay-DPE-wrwO.js → oauth-relay-pPMGnDZt.js} +1 -1
- package/dist/{registry-BBkWFCl8.js → registry-CZOzddwu.js} +5 -8
- package/dist/{resolve-B38MkHXE.js → resolve-cKOQ14Dh.js} +3 -3
- package/dist/{result-BaqSZcJb.js → result-DcvEOe1r.js} +119 -93
- package/dist/result-event-type-BdIJuZxg.js +48 -0
- package/dist/rule-DAxQY-1h.js +20 -0
- package/dist/{runner-11h8PrHh.js → runner-DBfUW44l.js} +14 -16
- package/dist/{sandbox-egress-signals-CTcACAtJ.js → sandbox-egress-signals-BVF_xAm1.js} +1 -1
- package/dist/{schema-DriSvB40.d.ts → schema-BEHKxr4I.d.ts} +861 -298
- package/dist/{schema-obw5jvR4.js → schema-Bk9Nm2E8.js} +344 -153
- package/dist/{service-account-Bx93N1n1.js → service-account-CVYsFjty.js} +3 -3
- package/dist/{service-account-Zc5bUcIJ.js → service-account-Ts4ulcrV.js} +68 -68
- package/dist/{skills-C8Npu5zO.js → skills-VTnhAJWm.js} +2 -2
- package/dist/{slack-conversation-unfurl-DlRVA02H.js → slack-conversation-unfurl-fuLnF1jE.js} +9 -11
- package/dist/{spawn-CXr58R0x.js → spawn-vxAarlX5.js} +6 -6
- package/dist/start-conversation-CEn2KH1A.js +941 -0
- package/dist/{state-CGrGVeQC.js → state-C1P3_Ywk.js} +4 -4
- package/dist/statuses-_cRJHXK7.js +150 -0
- package/dist/store-DFZaN-Ix.js +492 -0
- package/dist/task-queue-Cx4Lmjyk.js +90 -0
- package/dist/task-runner-CbTwFA6k.js +1432 -0
- package/dist/{thread-context-Dyj1KWaY.js → thread-context-BkAZDTX2.js} +13 -11
- package/dist/thread-state-DhPndWi1.js +5625 -0
- package/dist/{validation-DxVNIxA0.js → validation-nIzMtAVJ.js} +1 -1
- package/dist/{task-queue-CaZffYaH.js → vercel-queue-hW90XzbG.js} +93 -172
- package/dist/{version-Cr7Z71yG.js → version-Brbtz4Qf.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{warmup-C6LOZ2d2.js → warmup-BDA5myRK.js} +5832 -4567
- package/dist/web-message-id-C6P83ans.js +10 -0
- package/dist/{worker-CUBtu1Li.js → worker-D63RcaVD.js} +20 -8
- package/migrations/0126_artifact_drop_public.sql +8 -0
- package/migrations/0127_artifact_path.sql +4 -0
- package/migrations/0128_artifact_path_index.sql +1 -0
- package/migrations/0129_review_item_answered_index.sql +1 -0
- package/migrations/0130_review_item_status_index.sql +1 -0
- package/migrations/0131_brief_outcome_status.sql +1 -0
- package/migrations/0132_brief_outcome_status_backfill.sql +7 -0
- package/migrations/0133_brief_created_at_index.sql +1 -0
- package/migrations/0134_slack_person_search_index.sql +1 -0
- package/migrations/0135_code_change_size.sql +3 -0
- package/migrations/0136_merge_conflict_notice_dismiss.sql +16 -0
- package/migrations/0137_inbox_snoozes.sql +27 -0
- package/migrations/0138_code_change_search_index.sql +2 -0
- package/migrations/0139_review_item_owner.sql +22 -0
- package/migrations/0140_review_item_owner_index.sql +1 -0
- package/migrations/0141_memory_core_adoption.sql +89 -0
- package/migrations/0142_memory_core_indexes.sql +17 -0
- package/migrations/0143_todos.sql +14 -0
- package/migrations/0144_inbox_items.sql +32 -0
- package/migrations/0145_todo_changed_by_agent.sql +1 -0
- package/migrations/0146_inbox_item_subject_title_parts.sql +1 -0
- package/migrations/0147_inbox_snooze_wake_reason.sql +1 -0
- package/migrations/0148_authorization_request_index.sql +1 -0
- package/migrations/0149_conversation_metadata.sql +10 -0
- package/migrations/0150_conversation_metadata_fill.sql +39 -0
- package/migrations/0151_conversation_search_index.sql +1 -0
- package/migrations/0152_inbox_item_legacy_automation_keys.sql +21 -0
- package/migrations/0153_artifact_expiry.sql +1 -0
- package/migrations/0154_artifact_permanent_sha_index.sql +1 -0
- package/migrations/0155_artifact_drop_public_sha_index.sql +3 -0
- package/migrations/0156_conversation_kind_lead.sql +6 -0
- package/migrations/0157_conversation_lead_actor_index.sql +1 -0
- package/migrations/meta/0126_snapshot.json +5488 -0
- package/migrations/meta/0127_snapshot.json +5519 -0
- package/migrations/meta/0128_snapshot.json +5519 -0
- package/migrations/meta/0129_snapshot.json +5547 -0
- package/migrations/meta/0130_snapshot.json +5563 -0
- package/migrations/meta/0131_snapshot.json +5569 -0
- package/migrations/meta/0132_snapshot.json +5569 -0
- package/migrations/meta/0133_snapshot.json +5590 -0
- package/migrations/meta/0134_snapshot.json +5606 -0
- package/migrations/meta/0135_snapshot.json +5624 -0
- package/migrations/meta/0136_snapshot.json +5624 -0
- package/migrations/meta/0137_snapshot.json +5864 -0
- package/migrations/meta/0138_snapshot.json +5894 -0
- package/migrations/meta/0139_snapshot.json +5898 -0
- package/migrations/meta/0140_snapshot.json +5919 -0
- package/migrations/meta/0141_snapshot.json +6429 -0
- package/migrations/meta/0142_snapshot.json +6457 -0
- package/migrations/meta/0143_snapshot.json +6434 -0
- package/migrations/meta/0144_snapshot.json +6434 -0
- package/migrations/meta/0145_snapshot.json +6440 -0
- package/migrations/meta/0146_snapshot.json +6446 -0
- package/migrations/meta/0147_snapshot.json +6452 -0
- package/migrations/meta/0148_snapshot.json +6474 -0
- package/migrations/meta/0149_snapshot.json +6490 -0
- package/migrations/meta/0150_snapshot.json +6490 -0
- package/migrations/meta/0151_snapshot.json +6505 -0
- package/migrations/meta/0152_snapshot.json +6505 -0
- package/migrations/meta/0153_snapshot.json +6511 -0
- package/migrations/meta/0154_snapshot.json +6533 -0
- package/migrations/meta/0155_snapshot.json +6511 -0
- package/migrations/meta/0156_snapshot.json +6511 -0
- package/migrations/meta/0157_snapshot.json +6527 -0
- package/migrations/meta/_journal.json +224 -0
- package/package.json +7 -8
- package/skills/design-automation-skill/SKILL.md +108 -0
- package/dist/briefs-DKxkoruh.js +0 -395
- package/dist/conversation-M9KZ5JxF.js +0 -1024
- package/dist/prompt-CaMyeCpA.js +0 -910
- package/dist/schedule-DWxZ3kja.js +0 -1146
- package/dist/store-D4FQ1Nml.js +0 -335
- package/dist/task-runner-Dm7BHbGp.js +0 -287
- package/dist/turn-session-routing-CD0BRCex.js +0 -263
- package/dist/turn-user-message-9IxeEv5v.js +0 -364
- package/dist/users-CaUAYMb3.js +0 -181
- package/dist/viewer-AHldghAD.js +0 -212
- package/dist/web-message-id-BT8Mg8LL.js +0 -418
package/dist/cli/chat.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as loadAppPluginSet } from "../plugin-module-Cv2ETe8Y.js";
|
|
2
|
-
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-
|
|
2
|
+
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-C9iDurwX.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
5
5
|
import { stderr, stdin, stdout } from "node:process";
|
|
@@ -99,10 +99,10 @@ async function loadLocalPluginSet() {
|
|
|
99
99
|
async function configureLocalChatPlugins(pluginSet) {
|
|
100
100
|
const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
|
|
101
101
|
import("../plugins-Bkk0XRo2.js").then((n) => n.o),
|
|
102
|
-
import("../
|
|
103
|
-
import("../catalog-runtime-
|
|
104
|
-
import("../validation-
|
|
105
|
-
import("../db-
|
|
102
|
+
import("../credentialed-Cb6E2phL.js").then((n) => n.a),
|
|
103
|
+
import("../catalog-runtime-D7xapBAX.js").then((n) => n.t),
|
|
104
|
+
import("../validation-nIzMtAVJ.js").then((n) => n.r),
|
|
105
|
+
import("../db-LAyyX8tk.js").then((n) => n.n)
|
|
106
106
|
]);
|
|
107
107
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
108
108
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -152,20 +152,19 @@ function localDevServerUrl() {
|
|
|
152
152
|
async function prepareLocalChatRun(io, pluginSet) {
|
|
153
153
|
defaultStateAdapterForLocalChat();
|
|
154
154
|
await configureLocalChatPlugins(pluginSet);
|
|
155
|
-
const {
|
|
156
|
-
setBriefsConfig({ enabled: true });
|
|
155
|
+
const { setEventEmbeddingsConfig } = await import("../credentialed-Cb6E2phL.js").then((n) => n.U);
|
|
157
156
|
setEventEmbeddingsConfig({ enabled: true });
|
|
158
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
159
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
160
|
-
const { createLocalOAuthState } = await import("../oauth-relay-
|
|
161
|
-
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-
|
|
162
|
-
const { bindSpawnAgent } = await import("../spawn-
|
|
163
|
-
const { bindMessageAgent } = await import("../message-
|
|
164
|
-
const { createChildConversationWorker, createDeliverToParent } = await import("../result-
|
|
165
|
-
const { createConversationTurnWorker } = await import("../conversation-turn-
|
|
166
|
-
const {
|
|
157
|
+
const { runLocalAgentTurn } = await import("../runner-DBfUW44l.js");
|
|
158
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-DHCZC6B4.js");
|
|
159
|
+
const { createLocalOAuthState } = await import("../oauth-relay-pPMGnDZt.js").then((n) => n.t);
|
|
160
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-BVF_xAm1.js");
|
|
161
|
+
const { bindSpawnAgent } = await import("../spawn-vxAarlX5.js").then((n) => n.n);
|
|
162
|
+
const { bindMessageAgent } = await import("../message-DSXGj1hM.js").then((n) => n.n);
|
|
163
|
+
const { createChildConversationWorker, createDeliverToParent } = await import("../result-DcvEOe1r.js").then((n) => n.o);
|
|
164
|
+
const { createConversationTurnWorker } = await import("../conversation-turn-CeLbHqdw.js").then((n) => n.t);
|
|
165
|
+
const { resumeForPersonInput } = await import("../ingest-BDf3D50j.js").then((n) => n.j);
|
|
167
166
|
const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
|
|
168
|
-
const { processConversationWork } = await import("../worker-
|
|
167
|
+
const { processConversationWork } = await import("../worker-D63RcaVD.js").then((n) => n.n);
|
|
169
168
|
let agentRunner;
|
|
170
169
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
171
170
|
if (!agentRunner) throw new Error("Local agent runner is not ready");
|
|
@@ -176,8 +175,8 @@ async function prepareLocalChatRun(io, pluginSet) {
|
|
|
176
175
|
await processConversationWork(message, {
|
|
177
176
|
queue: localConversationWork.queue,
|
|
178
177
|
run: async (context) => {
|
|
179
|
-
|
|
180
|
-
return
|
|
178
|
+
await resumeForPersonInput(context.conversationId, context.attempt.messages);
|
|
179
|
+
return await childWorker(context);
|
|
181
180
|
}
|
|
182
181
|
});
|
|
183
182
|
});
|
package/dist/cli/check.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { t as mapBounded } from "../fan-out-Cod-yEHG.js";
|
|
2
|
-
import { a as parseSkillFile } from "../skills-
|
|
3
|
-
import { N as JUNIOR_HEARTBEAT_ROUTE, R as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, j as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-
|
|
4
|
-
import { b as parsePluginManifest, y as parseInlinePluginManifest } from "../registry-
|
|
2
|
+
import { a as parseSkillFile } from "../skills-VTnhAJWm.js";
|
|
3
|
+
import { N as JUNIOR_HEARTBEAT_ROUTE, R as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, j as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-dQ9ZRGQ8.js";
|
|
4
|
+
import { b as parsePluginManifest, y as parseInlinePluginManifest } from "../registry-CZOzddwu.js";
|
|
5
|
+
import * as z from "zod";
|
|
5
6
|
import pLimit from "p-limit";
|
|
6
7
|
import path from "node:path";
|
|
7
8
|
import { mentionsTag } from "@sentry/junior-plugin-api";
|
|
@@ -179,20 +180,18 @@ function validatePluginManifest(manifestPath, manifest, duplicatePluginNames, du
|
|
|
179
180
|
errors: []
|
|
180
181
|
};
|
|
181
182
|
}
|
|
183
|
+
const exportConditionTargetSchema = z.string().optional().catch(void 0);
|
|
184
|
+
const packageExportTargetSchema = z.union([z.string(), z.object({
|
|
185
|
+
default: exportConditionTargetSchema,
|
|
186
|
+
import: exportConditionTargetSchema,
|
|
187
|
+
node: exportConditionTargetSchema
|
|
188
|
+
}).transform((conditions) => conditions.default ?? conditions.import ?? conditions.node)]);
|
|
182
189
|
function packageExportsEntryPath(exportsValue) {
|
|
183
190
|
if (typeof exportsValue === "string") return exportsValue;
|
|
184
|
-
if (
|
|
185
|
-
const rootExport = exportsValue["."] ?? exportsValue;
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
for (const condition of [
|
|
189
|
-
"default",
|
|
190
|
-
"import",
|
|
191
|
-
"node"
|
|
192
|
-
]) {
|
|
193
|
-
const target = rootExport[condition];
|
|
194
|
-
if (typeof target === "string") return target;
|
|
195
|
-
}
|
|
191
|
+
if (typeof exportsValue !== "object" || exportsValue === null || Array.isArray(exportsValue)) return;
|
|
192
|
+
const rootExport = ("." in exportsValue ? exportsValue["."] : void 0) ?? exportsValue;
|
|
193
|
+
const target = packageExportTargetSchema.safeParse(rootExport);
|
|
194
|
+
return target.success ? target.data : void 0;
|
|
196
195
|
}
|
|
197
196
|
async function resolvePackageEntryPath(packageDir) {
|
|
198
197
|
const packageJson = await readJsonFile(path.join(packageDir, "package.json"));
|
|
@@ -212,9 +211,7 @@ async function resolvePackageEntryPath(packageDir) {
|
|
|
212
211
|
function isPluginFactoryExport(name, value) {
|
|
213
212
|
return typeof value === "function" && (name === "default" || name.endsWith("Plugin"));
|
|
214
213
|
}
|
|
215
|
-
|
|
216
|
-
return isRecord(value) && isRecord(value["manifest"]);
|
|
217
|
-
}
|
|
214
|
+
const pluginRegistrationLikeSchema = z.object({ manifest: z.custom((value) => typeof value === "object" && value !== null && !Array.isArray(value)) });
|
|
218
215
|
async function collectPackageJsPluginSources(packageDir, packageName) {
|
|
219
216
|
if (packageName === "@sentry/junior") return [];
|
|
220
217
|
const entryPath = await resolvePackageEntryPath(packageDir);
|
|
@@ -242,13 +239,14 @@ async function collectPackageJsPluginSources(packageDir, packageName) {
|
|
|
242
239
|
pluginSources.push(errorSource(manifestPath, error));
|
|
243
240
|
continue;
|
|
244
241
|
}
|
|
245
|
-
|
|
242
|
+
const pluginRegistration = pluginRegistrationLikeSchema.safeParse(registration);
|
|
243
|
+
if (!pluginRegistration.success) continue;
|
|
246
244
|
try {
|
|
247
245
|
pluginSources.push({
|
|
248
246
|
pluginDir: packageDir,
|
|
249
247
|
packageName,
|
|
250
248
|
manifestPath,
|
|
251
|
-
manifest: parseInlinePluginManifest(
|
|
249
|
+
manifest: parseInlinePluginManifest(pluginRegistration.data.manifest, packageDir)
|
|
252
250
|
});
|
|
253
251
|
} catch (error) {
|
|
254
252
|
pluginSources.push(errorSource(manifestPath, error));
|
|
@@ -369,9 +367,6 @@ function reportSkillGroup(label, skillResults, io) {
|
|
|
369
367
|
function reportAppSkills(skillResults, io) {
|
|
370
368
|
reportSkillGroup("app skills", skillResults, io);
|
|
371
369
|
}
|
|
372
|
-
function isRecord(value) {
|
|
373
|
-
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
374
|
-
}
|
|
375
370
|
async function hasJuniorDeploymentMarkers(rootDir, packages, nitroConfig) {
|
|
376
371
|
if (packages.some((declaredPackage) => declaredPackage.name === "@sentry/junior")) return true;
|
|
377
372
|
for (const source of [
|
|
@@ -421,14 +416,13 @@ async function validateDeploymentConfig(rootDir, packages) {
|
|
|
421
416
|
checked = true;
|
|
422
417
|
errors.push(`${vercelConfigPath}: framework must be "nitro" for the Vercel deployment wiring.`);
|
|
423
418
|
}
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
}
|
|
419
|
+
const { functions } = vercelConfig;
|
|
420
|
+
if (typeof functions === "object" && functions !== null && "api/internal/agent/continue.ts" in functions) {
|
|
421
|
+
checked = true;
|
|
422
|
+
errors.push(`${vercelConfigPath}: functions.${LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION} targets a source file that Nitro does not deploy. Remove it; juniorNitro() emits the ${JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE} queue trigger through Nitro functionRules.`);
|
|
429
423
|
}
|
|
430
424
|
if (hasJuniorMarkers && Array.isArray(vercelConfig.crons)) {
|
|
431
|
-
if (vercelConfig.crons.some((cron) =>
|
|
425
|
+
if (vercelConfig.crons.some((cron) => typeof cron === "object" && cron !== null && "path" in cron && cron.path === "/api/internal/heartbeat")) {
|
|
432
426
|
checked = true;
|
|
433
427
|
warnings.push(`${vercelConfigPath}: ${JUNIOR_HEARTBEAT_ROUTE} cron is now emitted by juniorNitro() into Nitro's Vercel Build Output config. Remove the root cron entry to avoid deployment drift.`);
|
|
434
428
|
}
|
package/dist/cli/init.js
CHANGED
|
@@ -17,7 +17,6 @@ const [
|
|
|
17
17
|
|
|
18
18
|
const app = await createApp({
|
|
19
19
|
allowedDomains: ["example.com"],
|
|
20
|
-
briefs: { enabled: true },
|
|
21
20
|
plugins,
|
|
22
21
|
});
|
|
23
22
|
|
|
@@ -26,12 +25,8 @@ export default app;
|
|
|
26
25
|
}
|
|
27
26
|
function writePluginsFile(targetDir) {
|
|
28
27
|
fs.writeFileSync(path.join(targetDir, "plugins.ts"), `import { defineJuniorPlugins } from "@sentry/junior";
|
|
29
|
-
import { memoryPlugin } from "@sentry/junior-memory";
|
|
30
28
|
|
|
31
|
-
export const plugins = defineJuniorPlugins([
|
|
32
|
-
memoryPlugin(),
|
|
33
|
-
"@sentry/junior-maintenance",
|
|
34
|
-
]);
|
|
29
|
+
export const plugins = defineJuniorPlugins(["@sentry/junior-maintenance"]);
|
|
35
30
|
`);
|
|
36
31
|
}
|
|
37
32
|
function writeNitroConfig(targetDir) {
|
|
@@ -134,7 +129,6 @@ async function runInit(dir, log = console.log) {
|
|
|
134
129
|
},
|
|
135
130
|
dependencies: {
|
|
136
131
|
"@sentry/junior": "latest",
|
|
137
|
-
"@sentry/junior-memory": "latest",
|
|
138
132
|
"@sentry/junior-maintenance": "latest",
|
|
139
133
|
hono: "^4.13.11"
|
|
140
134
|
},
|
package/dist/cli/main.js
CHANGED
|
@@ -45,13 +45,10 @@ async function runChat(argv, pluginSet) {
|
|
|
45
45
|
return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
|
|
46
46
|
}
|
|
47
47
|
async function runAdmin(argv) {
|
|
48
|
-
return await (await import("../admin-
|
|
48
|
+
return await (await import("../admin-DhInw5K9.js")).runAdmin(argv);
|
|
49
49
|
}
|
|
50
50
|
async function runServiceAccount(argv) {
|
|
51
|
-
return await (await import("../service-account-
|
|
52
|
-
}
|
|
53
|
-
async function runBriefs(argv) {
|
|
54
|
-
return await (await import("../briefs-DKxkoruh.js")).runBriefs(argv);
|
|
51
|
+
return await (await import("../service-account-CVYsFjty.js")).runServiceAccount(argv);
|
|
55
52
|
}
|
|
56
53
|
function topLevelCommand(argv) {
|
|
57
54
|
return (argv[0] === "--" ? argv.slice(1) : argv)[0];
|
|
@@ -64,12 +61,11 @@ async function runMain(argv, options = {}) {
|
|
|
64
61
|
const instrument = options.instrument ?? true;
|
|
65
62
|
if (instrument) await initSentry();
|
|
66
63
|
const command = topLevelCommand(argv);
|
|
67
|
-
const cliPluginsModule = command && command !== "init" && command !== "
|
|
64
|
+
const cliPluginsModule = command && command !== "init" && command !== "admin" ? await import("./plugins.js") : void 0;
|
|
68
65
|
const pluginSet = cliPluginsModule ? await cliPluginsModule.loadCliPluginSet() ?? null : void 0;
|
|
69
66
|
const pluginCommands = cliPluginsModule ? await cliPluginsModule.loadCliPluginCommands(pluginSet) : void 0;
|
|
70
67
|
const exitCode = await runCli(argv, {
|
|
71
68
|
runAdmin,
|
|
72
|
-
runBriefs,
|
|
73
69
|
runServiceAccount,
|
|
74
70
|
runChat: async (chatArgv) => await runChat(chatArgv, pluginSet),
|
|
75
71
|
runInit,
|
package/dist/cli/plugins.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { o as getDb } from "../db-
|
|
2
|
-
import {
|
|
3
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
4
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-
|
|
1
|
+
import { o as getDb } from "../db-LAyyX8tk.js";
|
|
2
|
+
import { E as coreRegistrations, v as setPlugins, wr as createPluginLogger, y as validatePlugins } from "../credentialed-Cb6E2phL.js";
|
|
3
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-D7xapBAX.js";
|
|
4
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-nIzMtAVJ.js";
|
|
5
5
|
import { t as loadAppPluginSet } from "../plugin-module-Cv2ETe8Y.js";
|
|
6
6
|
import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-Bkk0XRo2.js";
|
|
7
|
+
import { Command, CommanderError } from "commander";
|
|
7
8
|
import { stderr, stdout } from "node:process";
|
|
8
9
|
import { createJiti } from "jiti";
|
|
9
|
-
import { Command, CommanderError } from "commander";
|
|
10
10
|
// src/cli/plugins.ts
|
|
11
11
|
/**
|
|
12
12
|
* Plugin CLI bootstrap for the local/package command line.
|
|
@@ -115,11 +115,12 @@ function validateConfiguredPluginCommands(plugins) {
|
|
|
115
115
|
}
|
|
116
116
|
async function loadPluginRegistrations(args) {
|
|
117
117
|
const pluginSet = args.pluginSet;
|
|
118
|
+
const coreCliPlugins = coreRegistrations().filter((plugin) => plugin.cli);
|
|
118
119
|
if (!pluginSet) return {
|
|
119
|
-
cliPlugins:
|
|
120
|
+
cliPlugins: coreCliPlugins,
|
|
120
121
|
runtimePlugins: []
|
|
121
122
|
};
|
|
122
|
-
const cliPlugins = pluginCliRegistrationsFromPluginSet(pluginSet);
|
|
123
|
+
const cliPlugins = [...pluginCliRegistrationsFromPluginSet(pluginSet), ...coreCliPlugins];
|
|
123
124
|
const runtimePlugins = pluginRuntimeRegistrationsFromPluginSet(pluginSet);
|
|
124
125
|
const pluginConfig = pluginCatalogConfigFromPluginSet(pluginSet);
|
|
125
126
|
validatePlugins(runtimePlugins);
|
package/dist/cli/run.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
export declare const CLI_USAGE = "usage: junior init <dir>\n junior admin list|grant <email>|revoke <email>\n junior service-account connect|status|disconnect <plugin>\n junior snapshot create\n junior check [dir]\n junior upgrade\n junior chat\n junior chat -p <message
|
|
1
|
+
export declare const CLI_USAGE = "usage: junior init <dir>\n junior admin list|grant <email>|revoke <email>\n junior service-account connect|status|disconnect <plugin>\n junior snapshot create\n junior check [dir]\n junior upgrade\n junior chat\n junior chat -p <message>";
|
|
2
2
|
interface CliHandlers {
|
|
3
3
|
runAdmin: (argv: string[]) => Promise<number>;
|
|
4
|
-
runBriefs: (argv: string[]) => Promise<number>;
|
|
5
4
|
runServiceAccount: (argv: string[]) => Promise<number>;
|
|
6
5
|
runChat: (argv: string[]) => Promise<number>;
|
|
7
6
|
runInit: (dir: string) => Promise<void>;
|
package/dist/cli/run.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/cli/run.ts
|
|
2
|
-
const CLI_USAGE = "usage: junior init <dir>\n junior admin list|grant <email>|revoke <email>\n junior service-account connect|status|disconnect <plugin>\n junior snapshot create\n junior check [dir]\n junior upgrade\n junior chat\n junior chat -p <message
|
|
2
|
+
const CLI_USAGE = "usage: junior init <dir>\n junior admin list|grant <email>|revoke <email>\n junior service-account connect|status|disconnect <plugin>\n junior snapshot create\n junior check [dir]\n junior upgrade\n junior chat\n junior chat -p <message>";
|
|
3
3
|
const DEFAULT_IO = { error: console.error };
|
|
4
4
|
/** Strip Node's leading argv separator while preserving command-level flags. */
|
|
5
5
|
function normalizeCliArgv(argv) {
|
|
@@ -11,7 +11,6 @@ async function runCli(argv, handlers, io = DEFAULT_IO) {
|
|
|
11
11
|
if (command === "chat") return await handlers.runChat(subcommand === void 0 ? [] : [subcommand, ...rest]);
|
|
12
12
|
if (command === "admin") return await handlers.runAdmin(subcommand === void 0 ? [] : [subcommand, ...rest]);
|
|
13
13
|
if (command === "service-account") return await handlers.runServiceAccount(subcommand === void 0 ? [] : [subcommand, ...rest]);
|
|
14
|
-
if (command === "briefs") return await handlers.runBriefs(subcommand === void 0 ? [] : [subcommand, ...rest]);
|
|
15
14
|
if (command === "init") {
|
|
16
15
|
if (!subcommand || rest.length > 0) {
|
|
17
16
|
io.error(CLI_USAGE);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
3
|
-
import { n as resolve } from "../resolve-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { r as getChatConfig } from "../config-kXB2Y5tl.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-D7xapBAX.js";
|
|
3
|
+
import { n as resolve } from "../resolve-cKOQ14Dh.js";
|
|
4
|
+
import { Jt as create, On as SANDBOX_RUNTIME } from "../credentialed-Cb6E2phL.js";
|
|
5
|
+
import { n as disconnectStateAdapter } from "../adapter-iIq7ihf7.js";
|
|
6
6
|
// src/cli/snapshot-create.ts
|
|
7
7
|
const DEFAULT_TIMEOUT_MS = 6e5;
|
|
8
8
|
function progressMessage(phase) {
|
package/dist/cli/upgrade.d.ts
CHANGED
package/dist/cli/upgrade.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as isPostgresErrorCode, t as createJuniorSqlExecutor } from "../executor-
|
|
1
|
+
import { r as getChatConfig } from "../config-kXB2Y5tl.js";
|
|
2
|
+
import { n as isPostgresErrorCode, t as createJuniorSqlExecutor } from "../executor-SCub-fAq.js";
|
|
3
3
|
import { t as loadAppPluginSet } from "../plugin-module-Cv2ETe8Y.js";
|
|
4
|
-
import { t as createPluginCatalogRuntime } from "../registry-
|
|
4
|
+
import { t as createPluginCatalogRuntime } from "../registry-CZOzddwu.js";
|
|
5
5
|
import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-Bkk0XRo2.js";
|
|
6
6
|
import { basename, dirname, join, resolve } from "node:path";
|
|
7
7
|
import { createHash } from "node:crypto";
|