@sentry/junior 0.257.0 → 0.259.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.
Files changed (104) hide show
  1. package/dist/{actor-BTtLaeWy.js → actor-tlxzqaRe.js} +3 -6
  2. package/dist/adapter-Bn0gFVSF.js +270 -0
  3. package/dist/{admin-DgIkm6Vy.js → admin-C8xz2f10.js} +2 -3
  4. package/dist/{agent-hooks-BjtTzvru.js → agent-hooks-B00FaKdP.js} +70 -109
  5. package/dist/{agent-invocations-Bdu3ROfo.js → agent-invocations-Qfz7dWgU.js} +6 -12
  6. package/dist/{agent-runner-D7OboVb3.js → agent-runner-CPSd7rKm.js} +324 -742
  7. package/dist/api/schema.d.ts +442 -447
  8. package/dist/api/schema.js +6 -6
  9. package/dist/api.d.ts +2 -12
  10. package/dist/api.js +165 -158
  11. package/dist/{app-BsU5QNBd.d.ts → app-Bbxrehjf.d.ts} +25 -45
  12. package/dist/app.d.ts +3 -3
  13. package/dist/app.js +206 -321
  14. package/dist/{assistant-reply-CbTPebzL.js → assistant-reply-CqthTerd.js} +3 -5
  15. package/dist/{automation-CHdlHVZP.js → automation-DWBFBenG.js} +6 -11
  16. package/dist/{briefs-oLOldnDM.js → briefs-DNYbQ9cD.js} +8 -11
  17. package/dist/{cadence-D00SCzT1.js → cadence-R7Em4RjE.js} +1 -2
  18. package/dist/{catalog-runtime-CZzhGQ7F.js → catalog-runtime-B8SuFPGb.js} +3 -4
  19. package/dist/cli/chat.d.ts +2 -4
  20. package/dist/cli/chat.js +22 -24
  21. package/dist/cli/check.d.ts +1 -3
  22. package/dist/cli/check.js +4 -5
  23. package/dist/cli/env.d.ts +1 -3
  24. package/dist/cli/env.js +1 -2
  25. package/dist/cli/init.d.ts +1 -3
  26. package/dist/cli/init.js +3 -3
  27. package/dist/cli/main.d.ts +1 -3
  28. package/dist/cli/main.js +8 -5
  29. package/dist/cli/plugins.d.ts +2 -4
  30. package/dist/cli/plugins.js +7 -8
  31. package/dist/cli/run.d.ts +3 -3
  32. package/dist/cli/run.js +3 -3
  33. package/dist/cli/snapshot-create.d.ts +1 -3
  34. package/dist/cli/snapshot-create.js +5 -5
  35. package/dist/cli/upgrade.d.ts +3 -6
  36. package/dist/cli/upgrade.js +11 -17
  37. package/dist/{client-D8HnkOQX.js → client-BZdxgKyL.js} +64 -18
  38. package/dist/{config-CJRnWK9H.js → config-Deqpfpg9.js} +21 -15
  39. package/dist/{connections-ClYrKzpX.js → connections-9gJkfS85.js} +179 -20
  40. package/dist/{conversation-CKNLYBJt.js → conversation-DjN3mlog.js} +8 -15
  41. package/dist/{conversation-privacy-C8b1nphZ.js → conversation-privacy-CFhNKxp-.js} +2 -3
  42. package/dist/{conversation-work-C6y3T5Hx.js → conversation-work-BaT_T6EB.js} +1 -2
  43. package/dist/{credential-sync-BXfohNmJ.js → credential-sync-BABGymK3.js} +23 -190
  44. package/dist/{db-Ca9Nt5ci.d.ts → db-BnRqQ7G5.d.ts} +1 -1
  45. package/dist/{executor-Do0THDRR.js → executor-Bb3eQb8q.js} +30 -52
  46. package/dist/{experimental-CQIvMUO7.js → experimental-BNK1l1jv.js} +2 -4
  47. package/dist/{history-9pO1Zd4Y.js → history-AY8rs-FR.js} +5 -9
  48. package/dist/{history-DvqWZlYX.d.ts → history-BgI33Kie.d.ts} +12 -20
  49. package/dist/{images-BN_BiBXF.js → images-BbSdVHC6.js} +5 -6
  50. package/dist/instrumentation.d.ts +1 -3
  51. package/dist/instrumentation.js +6 -8
  52. package/dist/{job-queue-B6SV9uVa.js → job-queue-vdGU-5ge.js} +6 -12
  53. package/dist/{logging-CWxiIuCF.js → logging-BStXN56b.js} +7 -12
  54. package/dist/{message-TUOdbSBW.js → message-DRf6m4uO.js} +5 -6
  55. package/dist/{model-profile-BwU8mqwD.js → model-profile-Bg8EoCKD.js} +2 -4
  56. package/dist/nitro.d.ts +3 -5
  57. package/dist/nitro.js +12 -17
  58. package/dist/{oauth-authorization-BA4Dt6a7.js → oauth-authorization-djQn5Nhy.js} +2 -4
  59. package/dist/{oauth-callback-server-Dj5UJODo.js → oauth-callback-server-JmOgLcGl.js} +3 -4
  60. package/dist/{oauth-relay-CdCnu80W.js → oauth-relay-CTygMkNx.js} +2 -3
  61. package/dist/{package-discovery-BVvSnQBB.js → package-discovery-DJBompdd.js} +17 -21
  62. package/dist/{pending-auth-s_QFribU.js → pending-auth-rG5U_QS1.js} +92 -83
  63. package/dist/{plugin-module-CVvEUSMH.js → plugin-module-Cf5gVPWP.js} +1 -2
  64. package/dist/{plugins-CjfUP5gJ.d.ts → plugins-B_0Cr0MO.d.ts} +5 -5
  65. package/dist/{plugins-egKWjgue.js → plugins-DOm9Y6qI.js} +2 -3
  66. package/dist/{private-trace-result-BLvBjy_e.js → private-trace-result-CE7_lEdq.js} +1 -2
  67. package/dist/{profile-h-72wM78.js → profile-qBM6B_-V.js} +14 -295
  68. package/dist/{prompt-DyoEj9c2.js → prompt-xgpyMtg7.js} +5 -9
  69. package/dist/{queue-B5SnqRln.d.ts → queue-C37RbDVc.d.ts} +0 -2
  70. package/dist/{registry-sLTr-sV9.js → registry-B_M_x_iS.js} +56 -30
  71. package/dist/{resolve-ncQPZROQ.js → resolve-BzpuLh8c.js} +8 -12
  72. package/dist/{result-C883vngT.js → result-DEZH_AnZ.js} +13 -17
  73. package/dist/{rolldown-runtime-B4FMCO8f.js → rolldown-runtime-nwUcYXjP.js} +1 -2
  74. package/dist/{runner-CzYImdOF.js → runner-BqQlG10t.js} +12 -13
  75. package/dist/{sandbox-egress-signals-CZbMINHI.js → sandbox-egress-signals-DCq3WLs5.js} +2 -3
  76. package/dist/{schema-Dy69D4Ge.js → schema-CF9HqNRY.js} +30 -27
  77. package/dist/{sentry-CgWZM_kV.js → sentry-BBUlHih9.js} +2 -3
  78. package/dist/service-account-BqTBkyD7.js +120 -0
  79. package/dist/service-account-BzhW7kXu.js +661 -0
  80. package/dist/{session-stop-CQjKd4a2.js → session-stop-CV65ZlU3.js} +23 -33
  81. package/dist/{skills-C22SLruK.js → skills-CiWS5_Ub.js} +9 -9
  82. package/dist/{spawn-DY9CLXDL.js → spawn-BSAQ7UQZ.js} +4 -5
  83. package/dist/{store-DXFIQy-G.js → store-B1GES4gC.js} +13 -15
  84. package/dist/{store-DoewL5mG.d.ts → store-CG0VJyye.d.ts} +0 -14
  85. package/dist/{task-queue-B17vV0La.js → task-queue-BAeGEMjJ.js} +5 -7
  86. package/dist/{task-runner-DUjvzYXj.js → task-runner-BlGhcQPi.js} +22 -26
  87. package/dist/{tasks-D_WIJtvO.js → tasks-DieKX3d4.js} +63 -78
  88. package/dist/{thread-state-Ch4yuCqG.js → thread-state-DpSWS4Rr.js} +13 -19
  89. package/dist/{turn-failure-response-C5nBKC4S.js → turn-failure-response-DQljogGJ.js} +16 -22
  90. package/dist/{turn-lifecycle-CO-ylUmV.js → turn-lifecycle-BLgrkV_L.js} +2 -3
  91. package/dist/{turn-session-routing-B3LWooK5.js → turn-session-routing-BlajheOU.js} +2 -3
  92. package/dist/{validation-CXYxaNYx.js → validation-23d7K9tX.js} +3 -4
  93. package/dist/vercel.d.ts +1 -3
  94. package/dist/vercel.js +1 -2
  95. package/dist/{version-BcdZy2zg.js → version-B_XumRx-.js} +3 -5
  96. package/dist/{version-CnXZ614E.d.ts → version-Cc2OFd9G.d.ts} +0 -2
  97. package/dist/version.d.ts +1 -1
  98. package/dist/version.js +1 -2
  99. package/dist/{viewer-DSZXygMU.js → viewer-B2_ABsYi.js} +26 -57
  100. package/dist/{web-input-B9Bv0_lR.js → web-input-BZDyxpzR.js} +101 -158
  101. package/dist/{web-message-id-xPI_EFSC.js → web-message-id-CJSUiksE.js} +3 -6
  102. package/dist/{work-nAfDSUFP.js → work-D3QKiV0O.js} +14 -16
  103. package/dist/{worker-vGXZ6XFT.js → worker-C8mUjYf9.js} +7 -8
  104. package/package.json +10 -9
@@ -1,5 +1,5 @@
1
- import { ct as extractAssistantText } from "./tasks-D_WIJtvO.js";
2
- //#region src/chat/no-reply.ts
1
+ import { ct as extractAssistantText } from "./tasks-DieKX3d4.js";
2
+ // src/chat/no-reply.ts
3
3
  const NO_REPLY_MARKER = "[[NO_REPLY]]";
4
4
  /**
5
5
  * True when one assistant message ends with the silence marker.
@@ -8,8 +8,7 @@ const NO_REPLY_MARKER = "[[NO_REPLY]]";
8
8
  function isNoReplyMarker(text) {
9
9
  return text.trimEnd().endsWith(NO_REPLY_MARKER);
10
10
  }
11
- //#endregion
12
- //#region src/chat/services/assistant-reply.ts
11
+ // src/chat/services/assistant-reply.ts
13
12
  const THINKING_XML_BLOCK_PATTERN = /[ \t]*<thinking\b[^>]*>[\s\S]*?<\/thinking>[ \t]*(?:\r?\n)?/gi;
14
13
  const FENCED_CODE_BLOCK_PATTERN = /```[\s\S]*?```/g;
15
14
  /** Remove provider reasoning wrappers while preserving fenced code examples. */
@@ -41,5 +40,4 @@ function getAssistantReplyText(message) {
41
40
  const decision = decideReply(message);
42
41
  return decision.kind === "deliver" ? decision.text : void 0;
43
42
  }
44
- //#endregion
45
43
  export { isNoReplyMarker as a, NO_REPLY_MARKER as i, getAssistantReplyText as n, sanitizeAssistantText as r, decideReply as t };
@@ -1,15 +1,14 @@
1
- import { a as resolveLocalScheduleAtMs, i as isValidTimeZone, r as getZonedDateTimeParts, t as getFirstRunAtMs } from "./cadence-D00SCzT1.js";
1
+ import { a as resolveLocalScheduleAtMs, i as isValidTimeZone, r as getZonedDateTimeParts, t as getFirstRunAtMs } from "./cadence-R7Em4RjE.js";
2
2
  import { z } from "zod";
3
3
  import { actorUserIdSchema, destinationVisibilitySchema, eventMatchSchema, eventTypeSchema, pluginEventTypeSchema, slackDestinationSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
4
- //#region src/chat/task-outcomes-schema.ts
4
+ // src/chat/task-outcomes-schema.ts
5
5
  const taskMessageDestinationInputSchema = z.enum(["current_conversation", "task_creator"]).describe("Where to send the message. Use current_conversation for posts, digests, summaries, and channel reminders. Use task_creator only when the user asks for a direct reminder or notification.");
6
6
  /** Input accepted by task authoring tools before a user becomes a DM Destination. */
7
7
  const taskOutcomeInputSchema = z.object({
8
8
  action: z.literal("send_message"),
9
9
  destination: taskMessageDestinationInputSchema
10
10
  }).strict();
11
- //#endregion
12
- //#region src/chat/scheduled-automations/schedule-intent.ts
11
+ // src/chat/scheduled-automations/schedule-intent.ts
13
12
  /**
14
13
  * Owns model-facing schedule intent and materializes it against the trusted
15
14
  * server clock into the canonical schedule persisted by core.
@@ -244,8 +243,7 @@ const eventAutomationSchema = z.object({
244
243
  task: z.object({ text: z.string().min(1) }).strict(),
245
244
  trigger: eventAutomationTriggerSchema
246
245
  }).strict();
247
- //#endregion
248
- //#region src/chat/automations/edit-schema.ts
246
+ // src/chat/automations/edit-schema.ts
249
247
  const automationTitleSchema = z.string().trim().min(1).max(60);
250
248
  const automationInstructionSchema = z.string().trim().min(1).max(4e3);
251
249
  /**
@@ -267,8 +265,7 @@ const eventAutomationEditSchema = automationEditFieldsSchema.extend({ trigger: e
267
265
  identifier: z.string().trim().min(1).max(300),
268
266
  label: z.string().trim().min(1).max(500)
269
267
  }).optional() }).strict();
270
- //#endregion
271
- //#region src/chat/scheduled-automations/types.ts
268
+ // src/chat/scheduled-automations/types.ts
272
269
  /** Durable scheduled-automation domain types owned by Junior core. */
273
270
  const scheduledAutomationStatusSchema = z.enum([
274
271
  "active",
@@ -375,8 +372,7 @@ const SCHEDULED_AUTOMATION_SYSTEM_ACTOR = Object.freeze({
375
372
  platform: "system",
376
373
  name: "scheduled-automation"
377
374
  });
378
- //#endregion
379
- //#region src/api/schema/automation.ts
375
+ // src/api/schema/automation.ts
380
376
  const automationDestinationSchema = z.object({
381
377
  channelId: z.string().min(1),
382
378
  label: z.string().min(1),
@@ -646,5 +642,4 @@ const automationEditErrorSchema = z.object({
646
642
  const automationEventCatalogSchema = z.array(pluginEventTypeSchema.safeExtend({ namespace: z.string() }));
647
643
  const automationScheduleIntentSchema = scheduleIntentSchema;
648
644
  const automationSchedulePreviewSchema = scheduledAutomationSchema.pick({ schedule: true }).extend({ nextRunAtMs: z.number() }).strict();
649
- //#endregion
650
645
  export { eventAutomationSchema as A, eventAutomationSummarySchema as C, scheduledRunSchema as D, scheduledAutomationSchema as E, taskOutcomeInputSchema as F, compileScheduleIntent as M, scheduleIntentSchema as N, automationInstructionToolSchema as O, weekdaySchema as P, automationVersionSchema as S, SCHEDULED_AUTOMATION_SYSTEM_ACTOR as T, automationSummarySchema as _, automationExecutionSchema as a, automationVersionListSchema as b, automationLifecycleSchema as c, automationParamsSchema as d, automationRunListSchema as f, automationSchedulePreviewSchema as g, automationScheduleIntentSchema as h, automationExecutionListSchema as i, ScheduleIntentError as j, automationTitleSchema as k, automationListQuerySchema as l, automationRunWindowsSchema as m, automationEditSchema as n, automationExecutionStatusDaySchema as o, automationRunSchema as p, automationEventCatalogSchema as r, automationExecutionStatusSchema as s, automationEditErrorSchema as t, automationListSchema as u, automationUpdateSchema as v, scheduledAutomationSummarySchema as w, automationVersionParamsSchema as x, automationVersionActivateSchema as y };
@@ -1,12 +1,12 @@
1
- import { r as completeObject } from "./client-D8HnkOQX.js";
2
- import { r as defaultModelId } from "./model-profile-BwU8mqwD.js";
3
- import { U as parseBriefInput, d as conversationDetailReportSchema, p as conversationEventPageSchema, z as briefCodeChangeSchema } from "./conversation-CKNLYBJt.js";
4
- import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-DyoEj9c2.js";
1
+ import { i as completeObject } from "./client-BZdxgKyL.js";
2
+ import { r as defaultModelId } from "./model-profile-Bg8EoCKD.js";
3
+ import { U as parseBriefInput, d as conversationDetailReportSchema, p as conversationEventPageSchema, z as briefCodeChangeSchema } from "./conversation-DjN3mlog.js";
4
+ import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-xgpyMtg7.js";
5
5
  import { CLI_USAGE } from "./cli/run.js";
6
6
  import path from "node:path";
7
7
  import { z } from "zod";
8
8
  import { mkdir, readFile, writeFile } from "node:fs/promises";
9
- //#region src/chat/briefs/render.ts
9
+ // src/chat/briefs/render.ts
10
10
  function list(items, empty) {
11
11
  return items.length > 0 ? items.map((item) => `- ${item}`).join("\n") : empty;
12
12
  }
@@ -114,8 +114,7 @@ function renderBriefMarkdown(args) {
114
114
  ""
115
115
  ].join("\n");
116
116
  }
117
- //#endregion
118
- //#region src/chat/briefs/snapshot.ts
117
+ // src/chat/briefs/snapshot.ts
119
118
  const conversationSnapshotSchema = z.object({
120
119
  schemaVersion: z.literal(1),
121
120
  pulledAt: z.string().datetime(),
@@ -194,8 +193,7 @@ function throughIndexFromSnapshot(snapshot) {
194
193
  function completedTurnIndexesFromSnapshot(snapshot) {
195
194
  return allEvents(snapshot).filter((event) => event.data.type === "turn_lifecycle" && (event.data.state === "succeeded" || event.data.state === "no_reply")).map((event) => event.seq);
196
195
  }
197
- //#endregion
198
- //#region src/cli/briefs.ts
196
+ // src/cli/briefs.ts
199
197
  /**
200
198
  * Local Brief snapshot and replay CLI.
201
199
  *
@@ -269,7 +267,7 @@ async function parseRunOptions(argv) {
269
267
  * `DATABASE_URL` at import, and `briefs pull` must work with only a token.
270
268
  */
271
269
  async function configuredDefaultModelId() {
272
- const { botConfig } = await import("./config-CJRnWK9H.js").then((n) => n.r);
270
+ const { botConfig } = await import("./config-Deqpfpg9.js").then((n) => n.r);
273
271
  return defaultModelId(botConfig);
274
272
  }
275
273
  function apiUrl(baseUrl, pathname) {
@@ -394,5 +392,4 @@ async function runBriefs(argv) {
394
392
  return 1;
395
393
  }
396
394
  }
397
- //#endregion
398
395
  export { runBriefs };
@@ -1,4 +1,4 @@
1
- //#region src/chat/scheduled-automations/cadence.ts
1
+ // src/chat/scheduled-automations/cadence.ts
2
2
  const FORMATTERS = /* @__PURE__ */ new Map();
3
3
  function getFormatter(timezone) {
4
4
  const existing = FORMATTERS.get(timezone);
@@ -252,5 +252,4 @@ function getNextRunAtMs(task, scheduledForMs, afterMs = scheduledForMs) {
252
252
  timezone
253
253
  });
254
254
  }
255
- //#endregion
256
255
  export { resolveLocalScheduleAtMs as a, isValidTimeZone as i, getNextRunAtMs as n, getZonedDateTimeParts as r, getFirstRunAtMs as t };
@@ -1,7 +1,6 @@
1
- import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { t as createPluginCatalogRuntime } from "./registry-sLTr-sV9.js";
3
- //#region src/chat/plugins/catalog-runtime.ts
1
+ import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
+ import { t as createPluginCatalogRuntime } from "./registry-B_M_x_iS.js";
3
+ // src/chat/plugins/catalog-runtime.ts
4
4
  var catalog_runtime_exports = /* @__PURE__ */ __exportAll({ pluginCatalogRuntime: () => pluginCatalogRuntime });
5
5
  const pluginCatalogRuntime = createPluginCatalogRuntime();
6
- //#endregion
7
6
  export { pluginCatalogRuntime as n, catalog_runtime_exports as t };
@@ -1,5 +1,4 @@
1
- import { n as JuniorPluginSet } from "../plugins-CjfUP5gJ.js";
2
- //#region src/cli/chat.d.ts
1
+ import { n as JuniorPluginSet } from "../plugins-B_0Cr0MO.js";
3
2
  export declare const CHAT_USAGE = "usage: junior chat\n junior chat -p <message>";
4
3
  export type ChatCommandOptions = {
5
4
  mode: "interactive";
@@ -16,5 +15,4 @@ export interface ChatIo {
16
15
  /** Run the local Junior chat command. */
17
16
  export declare function runChat(argv: string[], io?: ChatIo, deps?: {
18
17
  pluginSet?: JuniorPluginSet | null;
19
- }): Promise<number>;
20
- //#endregion
18
+ }): Promise<number>;
package/dist/cli/chat.js CHANGED
@@ -1,11 +1,11 @@
1
- import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-D7OboVb3.js";
2
- import { t as loadAppPluginSet } from "../plugin-module-CVvEUSMH.js";
1
+ import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-CPSd7rKm.js";
2
+ import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.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";
6
6
  import { createJiti } from "jiti";
7
7
  import * as readline from "node:readline/promises";
8
- //#region src/chat/local/conversation.ts
8
+ // src/chat/local/conversation.ts
9
9
  const LOCAL_CONVERSATION_ALIAS_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;
10
10
  function slugifyConversationAlias(alias) {
11
11
  const trimmed = alias.trim();
@@ -22,8 +22,7 @@ function normalizeLocalConversationId(input) {
22
22
  if (!slug) return;
23
23
  return `local:${workspaceKey(input.cwd ?? process.cwd())}:${slug}`;
24
24
  }
25
- //#endregion
26
- //#region src/cli/chat.ts
25
+ // src/cli/chat.ts
27
26
  /**
28
27
  * Local chat CLI command.
29
28
  *
@@ -99,11 +98,11 @@ async function loadLocalPluginSet() {
99
98
  /** Configure plugin hooks after local chat has selected its state adapter. */
100
99
  async function configureLocalChatPlugins(pluginSet) {
101
100
  const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
102
- import("../plugins-egKWjgue.js").then((n) => n.o),
103
- import("../agent-hooks-BjtTzvru.js").then((n) => n.t),
104
- import("../catalog-runtime-CZzhGQ7F.js").then((n) => n.t),
105
- import("../validation-CXYxaNYx.js").then((n) => n.r),
106
- import("../viewer-DSZXygMU.js").then((n) => n.c)
101
+ import("../plugins-DOm9Y6qI.js").then((n) => n.o),
102
+ import("../agent-hooks-B00FaKdP.js").then((n) => n.t),
103
+ import("../catalog-runtime-B8SuFPGb.js").then((n) => n.t),
104
+ import("../validation-23d7K9tX.js").then((n) => n.r),
105
+ import("../viewer-B2_ABsYi.js").then((n) => n.s)
107
106
  ]);
108
107
  const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
109
108
  const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
@@ -153,21 +152,21 @@ function localDevServerUrl() {
153
152
  async function prepareLocalChatRun(io, pluginSet) {
154
153
  defaultStateAdapterForLocalChat();
155
154
  await configureLocalChatPlugins(pluginSet);
156
- const { setExperimentalFeatures } = await import("../experimental-CQIvMUO7.js").then((n) => n.t);
155
+ const { setExperimentalFeatures } = await import("../experimental-BNK1l1jv.js").then((n) => n.t);
157
156
  setExperimentalFeatures({ subagents: true });
158
- const { setBriefsConfig } = await import("../agent-hooks-BjtTzvru.js").then((n) => n.m);
157
+ const { setBriefsConfig } = await import("../agent-hooks-B00FaKdP.js").then((n) => n.m);
159
158
  setBriefsConfig({ enabled: true });
160
- const { runLocalAgentTurn } = await import("../runner-CzYImdOF.js");
161
- const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-Dj5UJODo.js");
162
- const { createLocalOAuthState } = await import("../oauth-relay-CdCnu80W.js").then((n) => n.t);
163
- const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-CZbMINHI.js");
164
- const { bindSpawnAgent } = await import("../spawn-DY9CLXDL.js").then((n) => n.n);
165
- const { bindMessageAgent } = await import("../message-TUOdbSBW.js").then((n) => n.n);
166
- const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-nAfDSUFP.js").then((n) => n.a);
167
- const { startAgentInvocationsForChildInput } = await import("../result-C883vngT.js").then((n) => n.r);
168
- const { skipInputBeforeConversationStop } = await import("../session-stop-CQjKd4a2.js").then((n) => n.r);
169
- const { createLocalConversationWork } = await import("../conversation-work-C6y3T5Hx.js");
170
- const { processConversationWork } = await import("../worker-vGXZ6XFT.js").then((n) => n.n);
159
+ const { runLocalAgentTurn } = await import("../runner-BqQlG10t.js");
160
+ const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-JmOgLcGl.js");
161
+ const { createLocalOAuthState } = await import("../oauth-relay-CTygMkNx.js").then((n) => n.t);
162
+ const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-DCq3WLs5.js");
163
+ const { bindSpawnAgent } = await import("../spawn-BSAQ7UQZ.js").then((n) => n.n);
164
+ const { bindMessageAgent } = await import("../message-DRf6m4uO.js").then((n) => n.n);
165
+ const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-D3QKiV0O.js").then((n) => n.a);
166
+ const { startAgentInvocationsForChildInput } = await import("../result-DEZH_AnZ.js").then((n) => n.r);
167
+ const { skipInputBeforeConversationStop } = await import("../session-stop-CV65ZlU3.js").then((n) => n.r);
168
+ const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
169
+ const { processConversationWork } = await import("../worker-C8mUjYf9.js").then((n) => n.n);
171
170
  let agentRunner;
172
171
  const localConversationWork = createLocalConversationWork(async (message) => {
173
172
  if (!agentRunner) throw new Error("Local agent runner is not ready");
@@ -280,5 +279,4 @@ async function runChat(argv, io = DEFAULT_IO, deps = {}) {
280
279
  return 1;
281
280
  }
282
281
  }
283
- //#endregion
284
282
  export { CHAT_USAGE, runChat };
@@ -1,8 +1,6 @@
1
- //#region src/cli/check.d.ts
2
1
  export interface ValidationIo {
3
2
  info: (line: string) => void;
4
3
  warn: (line: string) => void;
5
4
  error: (line: string) => void;
6
5
  }
7
- export declare function runCheck(rootDir?: string, io?: ValidationIo): Promise<void>;
8
- //#endregion
6
+ export declare function runCheck(rootDir?: string, io?: ValidationIo): Promise<void>;
package/dist/cli/check.js CHANGED
@@ -1,10 +1,10 @@
1
- import { E as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, N as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, O as JUNIOR_HEARTBEAT_ROUTE } from "../logging-CWxiIuCF.js";
2
- import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-sLTr-sV9.js";
3
- import { i as parseSkillFile } from "../skills-C22SLruK.js";
1
+ import { E as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, N as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, O as JUNIOR_HEARTBEAT_ROUTE } from "../logging-BStXN56b.js";
2
+ import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-B_M_x_iS.js";
3
+ import { i as parseSkillFile } from "../skills-CiWS5_Ub.js";
4
4
  import path from "node:path";
5
5
  import fs from "node:fs/promises";
6
6
  import { pathToFileURL } from "node:url";
7
- //#region src/cli/check.ts
7
+ // src/cli/check.ts
8
8
  const DEFAULT_IO = {
9
9
  info: console.log,
10
10
  warn: console.warn,
@@ -589,5 +589,4 @@ async function runCheck(rootDir = process.cwd(), io = DEFAULT_IO) {
589
589
  }
590
590
  io.info(`${formatHeading("ok", `Validation passed (${pluginSources.length} plugin manifest${pluginSources.length === 1 ? "" : "s"}, ${skillDirs.length} skill director${skillDirs.length === 1 ? "y" : "ies"} checked).`)}`);
591
591
  }
592
- //#endregion
593
592
  export { runCheck };
package/dist/cli/env.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/cli/env.d.ts
2
1
  export declare const JUNIOR_LOCAL_DEV_INTERNAL_SECRET = "junior-local-dev-internal";
3
2
  export declare const JUNIOR_LOCAL_DEV_HEARTBEAT_SECRET = "junior-local-dev-heartbeat";
4
3
  /** Apply global development defaults after env files have been loaded. */
@@ -9,5 +8,4 @@ export declare function applyJuniorDevelopmentDefaults(env: NodeJS.ProcessEnv, o
9
8
  * Load CLI env files from the nearest package root and workspace root so
10
9
  * `pnpm exec junior ...` sees the same credentials as local repo scripts.
11
10
  */
12
- export declare function loadCliEnvFiles(cwd?: string): void;
13
- //#endregion
11
+ export declare function loadCliEnvFiles(cwd?: string): void;
package/dist/cli/env.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import path from "node:path";
2
2
  import fs from "node:fs";
3
- //#region src/cli/env.ts
3
+ // src/cli/env.ts
4
4
  function envFileNames(nodeEnv) {
5
5
  return [
6
6
  `.env.${nodeEnv}.local`,
@@ -59,5 +59,4 @@ function loadCliEnvFiles(cwd = process.cwd()) {
59
59
  }
60
60
  applyJuniorDevelopmentDefaults(process.env);
61
61
  }
62
- //#endregion
63
62
  export { JUNIOR_LOCAL_DEV_HEARTBEAT_SECRET, JUNIOR_LOCAL_DEV_INTERNAL_SECRET, applyJuniorDevelopmentDefaults, loadCliEnvFiles };
@@ -1,3 +1 @@
1
- //#region src/cli/init.d.ts
2
- export declare function runInit(dir: string, log?: (line: string) => void): Promise<void>;
3
- //#endregion
1
+ export declare function runInit(dir: string, log?: (line: string) => void): Promise<void>;
package/dist/cli/init.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { juniorVercelConfig } from "../vercel.js";
2
2
  import path from "node:path";
3
3
  import fs from "node:fs";
4
- //#region src/cli/init.ts
4
+ // src/cli/init.ts
5
5
  function writeServerEntry(targetDir) {
6
6
  fs.writeFileSync(path.join(targetDir, "server.ts"), `import { initSentry } from "@sentry/junior/instrumentation";
7
7
 
@@ -16,6 +16,7 @@ const [
16
16
  ]);
17
17
 
18
18
  const app = await createApp({
19
+ allowedDomains: ["example.com"],
19
20
  briefs: { enabled: true },
20
21
  plugins,
21
22
  });
@@ -142,7 +143,7 @@ async function runInit(dir, log = console.log) {
142
143
  "cross-env": "^10.1.0",
143
144
  jiti: "^2.7.0",
144
145
  nitro: "3.0.260522-beta",
145
- typescript: "^6.0.3"
146
+ typescript: "^7.0.2"
146
147
  }
147
148
  };
148
149
  fs.writeFileSync(path.join(target, "package.json"), `${JSON.stringify(pkg, null, 2)}\n`);
@@ -205,5 +206,4 @@ SENTRY_AUTH_TOKEN=
205
206
  log(` cd ${targetDir} && pnpm install && pnpm dev`);
206
207
  log("");
207
208
  }
208
- //#endregion
209
209
  export { runInit };
@@ -1,6 +1,4 @@
1
- //#region src/cli/main.d.ts
2
1
  /** Run the packaged CLI entrypoint with plugin command bootstrap enabled. */
3
2
  export declare function runMain(argv: string[], options?: {
4
3
  instrument?: boolean;
5
- }): Promise<void>;
6
- //#endregion
4
+ }): Promise<void>;
package/dist/cli/main.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { loadCliEnvFiles } from "./env.js";
2
2
  import { runCli } from "./run.js";
3
3
  import { pathToFileURL } from "node:url";
4
- //#region src/cli/main.ts
4
+ // src/cli/main.ts
5
5
  const SENTRY_FLUSH_TIMEOUT_MS = 2e3;
6
6
  async function flushSentry() {
7
- await (await import("../sentry-CgWZM_kV.js").then((n) => n.u)).flush(SENTRY_FLUSH_TIMEOUT_MS);
7
+ await (await import("../sentry-BBUlHih9.js").then((n) => n.u)).flush(SENTRY_FLUSH_TIMEOUT_MS);
8
8
  }
9
9
  async function initSentry() {
10
10
  (await import("../instrumentation.js")).initSentry();
@@ -25,10 +25,13 @@ async function runChat(argv, pluginSet) {
25
25
  return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
26
26
  }
27
27
  async function runAdmin(argv) {
28
- return await (await import("../admin-DgIkm6Vy.js")).runAdmin(argv);
28
+ return await (await import("../admin-C8xz2f10.js")).runAdmin(argv);
29
+ }
30
+ async function runServiceAccount(argv) {
31
+ return await (await import("../service-account-BqTBkyD7.js")).runServiceAccount(argv);
29
32
  }
30
33
  async function runBriefs(argv) {
31
- return await (await import("../briefs-oLOldnDM.js")).runBriefs(argv);
34
+ return await (await import("../briefs-DNYbQ9cD.js")).runBriefs(argv);
32
35
  }
33
36
  function topLevelCommand(argv) {
34
37
  return (argv[0] === "--" ? argv.slice(1) : argv)[0];
@@ -45,6 +48,7 @@ async function runMain(argv, options = {}) {
45
48
  const exitCode = await runCli(argv, {
46
49
  runAdmin,
47
50
  runBriefs,
51
+ runServiceAccount,
48
52
  runChat: async (chatArgv) => await runChat(chatArgv, pluginSet),
49
53
  runInit,
50
54
  runSnapshotCreate,
@@ -66,5 +70,4 @@ if (isDirectCliEntry()) runMain(process.argv.slice(2)).catch((error) => {
66
70
  process.exit(1);
67
71
  })();
68
72
  });
69
- //#endregion
70
73
  export { runMain };
@@ -1,6 +1,5 @@
1
- import { n as JuniorPluginSet } from "../plugins-CjfUP5gJ.js";
1
+ import { n as JuniorPluginSet } from "../plugins-B_0Cr0MO.js";
2
2
  import { PluginCliIo } from "@sentry/junior-plugin-api";
3
- //#region src/cli/plugins.d.ts
4
3
  export type PluginCommandIo = PluginCliIo;
5
4
  export interface CliPluginCommandDispatcher {
6
5
  commandNames: string[];
@@ -9,5 +8,4 @@ export interface CliPluginCommandDispatcher {
9
8
  /** Load the app plugin set once for one CLI process. */
10
9
  export declare function loadCliPluginSet(): Promise<JuniorPluginSet | undefined>;
11
10
  /** Import configured app plugins and build the plugin CLI command dispatcher. */
12
- export declare function loadCliPluginCommands(pluginSet?: JuniorPluginSet | null): Promise<CliPluginCommandDispatcher>;
13
- //#endregion
11
+ export declare function loadCliPluginCommands(pluginSet?: JuniorPluginSet | null): Promise<CliPluginCommandDispatcher>;
@@ -1,13 +1,13 @@
1
- import { f as getDb } from "../viewer-DSZXygMU.js";
2
- import { n as pluginCatalogRuntime } from "../catalog-runtime-CZzhGQ7F.js";
3
- import { d as setPlugins, f as validatePlugins, ft as createPluginLogger } from "../agent-hooks-BjtTzvru.js";
4
- import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-CXYxaNYx.js";
5
- import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-egKWjgue.js";
6
- import { t as loadAppPluginSet } from "../plugin-module-CVvEUSMH.js";
1
+ import { d as getDb } from "../viewer-B2_ABsYi.js";
2
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-B8SuFPGb.js";
3
+ import { d as setPlugins, f as validatePlugins, ft as createPluginLogger } from "../agent-hooks-B00FaKdP.js";
4
+ import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-23d7K9tX.js";
5
+ import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-DOm9Y6qI.js";
6
+ import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
7
7
  import { stderr, stdout } from "node:process";
8
8
  import { createJiti } from "jiti";
9
9
  import { Command, CommanderError } from "commander";
10
- //#region src/cli/plugins.ts
10
+ // src/cli/plugins.ts
11
11
  /**
12
12
  * Plugin CLI bootstrap for the local/package command line.
13
13
  * This module imports app plugins, validates top-level namespaces before
@@ -168,5 +168,4 @@ async function loadCliPluginCommands(pluginSet) {
168
168
  }
169
169
  };
170
170
  }
171
- //#endregion
172
171
  export { loadCliPluginCommands, loadCliPluginSet };
package/dist/cli/run.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- //#region src/cli/run.d.ts
2
- export declare const CLI_USAGE = "usage: junior init <dir>\n junior admin list|grant <email>|revoke <email>\n junior snapshot create\n junior check [dir]\n junior upgrade\n junior chat\n junior chat -p <message>\n junior briefs pull <conversationId...> --base-url <url> [--token <token>] --out <dir>\n junior briefs run <snapshot...> [--model <id>] [--prompt <file>] [--turn-by-turn] [--out <dir>]";
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>\n junior briefs pull <conversationId...> --base-url <url> [--token <token>] --out <dir>\n junior briefs run <snapshot...> [--model <id>] [--prompt <file>] [--turn-by-turn] [--out <dir>]";
3
2
  interface CliHandlers {
4
3
  runAdmin: (argv: string[]) => Promise<number>;
5
4
  runBriefs: (argv: string[]) => Promise<number>;
5
+ runServiceAccount: (argv: string[]) => Promise<number>;
6
6
  runChat: (argv: string[]) => Promise<number>;
7
7
  runInit: (dir: string) => Promise<void>;
8
8
  runSnapshotCreate: () => Promise<void>;
@@ -15,4 +15,4 @@ interface CliIo {
15
15
  }
16
16
  /** Dispatch CLI arguments to command handlers and return a process exit code. */
17
17
  export declare function runCli(argv: string[], handlers: CliHandlers, io?: CliIo): Promise<number>;
18
- //#endregion
18
+ export {};
package/dist/cli/run.js CHANGED
@@ -1,5 +1,5 @@
1
- //#region src/cli/run.ts
2
- const CLI_USAGE = "usage: junior init <dir>\n junior admin list|grant <email>|revoke <email>\n junior snapshot create\n junior check [dir]\n junior upgrade\n junior chat\n junior chat -p <message>\n junior briefs pull <conversationId...> --base-url <url> [--token <token>] --out <dir>\n junior briefs run <snapshot...> [--model <id>] [--prompt <file>] [--turn-by-turn] [--out <dir>]";
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>\n junior briefs pull <conversationId...> --base-url <url> [--token <token>] --out <dir>\n junior briefs run <snapshot...> [--model <id>] [--prompt <file>] [--turn-by-turn] [--out <dir>]";
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) {
@@ -10,6 +10,7 @@ async function runCli(argv, handlers, io = DEFAULT_IO) {
10
10
  const [command, subcommand, ...rest] = normalizeCliArgv(argv);
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
+ if (command === "service-account") return await handlers.runServiceAccount(subcommand === void 0 ? [] : [subcommand, ...rest]);
13
14
  if (command === "briefs") return await handlers.runBriefs(subcommand === void 0 ? [] : [subcommand, ...rest]);
14
15
  if (command === "init") {
15
16
  if (!subcommand || rest.length > 0) {
@@ -50,5 +51,4 @@ async function runCli(argv, handlers, io = DEFAULT_IO) {
50
51
  io.error(CLI_USAGE);
51
52
  return 1;
52
53
  }
53
- //#endregion
54
54
  export { CLI_USAGE, runCli };
@@ -1,4 +1,2 @@
1
- //#region src/cli/snapshot-create.d.ts
2
1
  /** Resolve or create the default sandbox snapshot and report its progress. */
3
- export declare function runSnapshotCreate(log?: (line: string) => void): Promise<void>;
4
- //#endregion
2
+ export declare function runSnapshotCreate(log?: (line: string) => void): Promise<void>;
@@ -1,7 +1,8 @@
1
- import { n as pluginCatalogRuntime } from "../catalog-runtime-CZzhGQ7F.js";
2
- import { S as disconnectStateAdapter, t as create } from "../profile-h-72wM78.js";
3
- import { r as resolve } from "../resolve-ncQPZROQ.js";
4
- //#region src/cli/snapshot-create.ts
1
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-B8SuFPGb.js";
2
+ import { t as create } from "../profile-qBM6B_-V.js";
3
+ import { t as disconnectStateAdapter } from "../adapter-Bn0gFVSF.js";
4
+ import { r as resolve } from "../resolve-BzpuLh8c.js";
5
+ // src/cli/snapshot-create.ts
5
6
  const DEFAULT_RUNTIME = "node22";
6
7
  const DEFAULT_TIMEOUT_MS = 6e5;
7
8
  function progressMessage(phase) {
@@ -75,5 +76,4 @@ async function runSnapshotCreate(log = console.log) {
75
76
  await disconnectStateAdapter();
76
77
  }
77
78
  }
78
- //#endregion
79
79
  export { runSnapshotCreate };
@@ -1,15 +1,12 @@
1
- import "../db-Ca9Nt5ci.js";
2
- import { n as JuniorPluginSet } from "../plugins-CjfUP5gJ.js";
3
- //#region src/cli/upgrade/types.d.ts
1
+ import "../db-BnRqQ7G5.js";
2
+ import { n as JuniorPluginSet } from "../plugins-B_0Cr0MO.js";
4
3
  interface UpgradeIo {
5
4
  info: (line: string) => void;
6
5
  }
7
- //#endregion
8
- //#region src/cli/upgrade.d.ts
9
6
  /** Resolve the plugin set available to upgrade migrations in source and built CLI runs. */
10
7
  export declare function resolveUpgradePluginSet(): Promise<JuniorPluginSet | undefined>;
11
8
  /** Apply Junior and enabled-plugin database migrations. */
12
9
  export declare function runUpgrade(io?: UpgradeIo, options?: {
13
10
  pluginSet?: JuniorPluginSet | null;
14
11
  }): Promise<void>;
15
- //#endregion
12
+ export {};
@@ -1,20 +1,19 @@
1
- import { i as getChatConfig } from "../config-CJRnWK9H.js";
2
- import { t as createJuniorSqlExecutor } from "../executor-Do0THDRR.js";
3
- import { t as createPluginCatalogRuntime } from "../registry-sLTr-sV9.js";
4
- import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-egKWjgue.js";
5
- import { t as loadAppPluginSet } from "../plugin-module-CVvEUSMH.js";
1
+ import { i as getChatConfig } from "../config-Deqpfpg9.js";
2
+ import { t as createJuniorSqlExecutor } from "../executor-Bb3eQb8q.js";
3
+ import { t as createPluginCatalogRuntime } from "../registry-B_M_x_iS.js";
4
+ import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-DOm9Y6qI.js";
5
+ import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
6
6
  import { basename, dirname, join, resolve } from "node:path";
7
7
  import { createHash } from "node:crypto";
8
8
  import { fileURLToPath } from "node:url";
9
9
  import { createJiti } from "jiti";
10
10
  import { readMigrationFiles } from "drizzle-orm/migrator";
11
- //#region src/db/postgres-error.ts
11
+ // src/db/postgres-error.ts
12
12
  /** Return whether an unknown PostgreSQL failure has the requested SQLSTATE. */
13
13
  function isPostgresErrorCode(error, code) {
14
14
  return typeof error === "object" && error !== null && "code" in error && error.code === code;
15
15
  }
16
- //#endregion
17
- //#region src/chat/conversations/sql/migrations.ts
16
+ // src/chat/conversations/sql/migrations.ts
18
17
  /** SQL schema migrations for durable Junior records. */
19
18
  const CORE_MIGRATION_BRIDGE_VERSION = "0.107.1";
20
19
  const MIGRATIONS_TABLE = "__drizzle_junior_core";
@@ -87,8 +86,7 @@ async function migrateSchema(executor) {
87
86
  return migrationResult(migrations, lockedState);
88
87
  });
89
88
  }
90
- //#endregion
91
- //#region src/chat/plugins/migrations.ts
89
+ // src/chat/plugins/migrations.ts
92
90
  function migrationTable(pluginName) {
93
91
  return `__drizzle_${pluginName.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "").slice(0, 32)}_${createHash("sha256").update(pluginName).digest("hex").slice(0, 8)}`;
94
92
  }
@@ -192,8 +190,7 @@ async function migratePluginSchemas(executor, roots, options = {}) {
192
190
  }
193
191
  return result;
194
192
  }
195
- //#endregion
196
- //#region src/cli/upgrade/migrations/upgrade-plugins.ts
193
+ // src/cli/upgrade/migrations/upgrade-plugins.ts
197
194
  function unique(values) {
198
195
  return [...new Set(values)];
199
196
  }
@@ -238,16 +235,14 @@ async function resolveUpgradePluginCatalog(context) {
238
235
  const pluginSet = packageNames.length > 0 || registrations.length > 0 || context.pluginSet ? defineJuniorPlugins([...packageNames, ...registrations], manifests ? { manifests } : {}) : void 0;
239
236
  return mergeCatalogConfig(catalog, pluginCatalogConfigFromPluginSet(pluginSet));
240
237
  }
241
- //#endregion
242
- //#region src/cli/upgrade/migrations/plugin-sql.ts
238
+ // src/cli/upgrade/migrations/plugin-sql.ts
243
239
  /** Apply SQL schema migrations owned by explicitly enabled plugins. */
244
240
  async function migratePluginsToSql(context, options = {}) {
245
241
  const pluginCatalog = createPluginCatalogRuntime();
246
242
  pluginCatalog.setConfig(await resolveUpgradePluginCatalog(context));
247
243
  return await migratePluginSchemas(context.sqlExecutor, pluginCatalog.getMigrationRoots(), options);
248
244
  }
249
- //#endregion
250
- //#region src/cli/upgrade.ts
245
+ // src/cli/upgrade.ts
251
246
  /**
252
247
  * SQL-only upgrade entry point.
253
248
  *
@@ -309,5 +304,4 @@ async function runUpgrade(io = DEFAULT_IO, options = {}) {
309
304
  await sqlExecutor.close();
310
305
  }
311
306
  }
312
- //#endregion
313
307
  export { resolveUpgradePluginSet, runUpgrade };