@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.
Files changed (157) hide show
  1. package/dist/{adapter-context-BhKpjpGD.js → adapter-context-BRjEWRy1.js} +2 -2
  2. package/dist/adapter-iIq7ihf7.js +259 -0
  3. package/dist/{admin-tgZEZAk2.js → admin-DhInw5K9.js} +1 -2
  4. package/dist/{agent-runner-D9cvNlQl.js → agent-runner-C9iDurwX.js} +6507 -7721
  5. package/dist/api/schema.d.ts +2 -2
  6. package/dist/api/schema.js +7 -6
  7. package/dist/api.d.ts +21 -3
  8. package/dist/api.js +1625 -535
  9. package/dist/{app-B_7Wn0en.d.ts → app-DRFrC8Mw.d.ts} +14 -10
  10. package/dist/app.d.ts +2 -2
  11. package/dist/app.js +454 -994
  12. package/dist/{background-compaction-queue-BGHqkhkY.js → background-compaction-queue-DrKi7w3d.js} +10 -85
  13. package/dist/callback-mFlTUWWx.js +75 -0
  14. package/dist/{catalog-runtime-BxwzbLKY.js → catalog-runtime-D7xapBAX.js} +1 -1
  15. package/dist/channel-access-CJGfNTdn.js +221 -0
  16. package/dist/child-message-DcsritGf.js +179 -0
  17. package/dist/cli/chat.js +18 -19
  18. package/dist/cli/check.js +23 -29
  19. package/dist/cli/init.js +1 -7
  20. package/dist/cli/main.js +3 -7
  21. package/dist/cli/plugins.js +8 -7
  22. package/dist/cli/run.d.ts +1 -2
  23. package/dist/cli/run.js +1 -2
  24. package/dist/cli/snapshot-create.js +5 -5
  25. package/dist/cli/upgrade.d.ts +1 -1
  26. package/dist/cli/upgrade.js +3 -3
  27. package/dist/{config-Dkt2Le2b.js → config-kXB2Y5tl.js} +294 -28
  28. package/dist/{continue-in-slack-BWVwePKD.js → continue-in-slack-O6pV5004.js} +7 -7
  29. package/dist/{conversation-feed-Ci6YD1N-.js → conversation-feed-uNOv_x68.js} +87 -24
  30. package/dist/{conversation-privacy-C39g8BY4.js → conversation-privacy-L4ja1_W6.js} +1 -1
  31. package/dist/{conversation-turn-CBlZIH02.js → conversation-turn-CeLbHqdw.js} +56 -49
  32. package/dist/{credential-sync-vGnrB0BY.js → credential-sync-I8VBGk05.js} +16 -16
  33. package/dist/{projection-jZSlEAXG.js → credentialed-Cb6E2phL.js} +16268 -16821
  34. package/dist/{db-B4Hjxr-u.d.ts → db-BbC5stfa.d.ts} +13 -6
  35. package/dist/{db-CFZggNoy.js → db-LAyyX8tk.js} +1698 -1046
  36. package/dist/{executor-BPkZDx5-.js → executor-SCub-fAq.js} +552 -181
  37. package/dist/{html-2r2KmLwi.js → html-BCZ3Xtb_.js} +6 -6
  38. package/dist/{session-stop-BfY4rhJs.js → ingest-BDf3D50j.js} +2134 -2553
  39. package/dist/{install-C-oE6C_u.js → install-DCFJFkC0.js} +2 -2
  40. package/dist/instrumentation.js +4 -4
  41. package/dist/{lineage-CsvrEFQe.js → lineage-B_m-4TJw.js} +2 -2
  42. package/dist/{stop-DYzjRf2U.js → list-CN2QA2R9.js} +1656 -685
  43. package/dist/{logging-D5gkyvnK.js → logging-dQ9ZRGQ8.js} +47 -9
  44. package/dist/media-CYm1QD8T.js +2356 -0
  45. package/dist/{message-DwvJ-I3w.js → message-DSXGj1hM.js} +19 -29
  46. package/dist/{model-input-MAq2881y.js → model-input--TrP9hYV.js} +3 -3
  47. package/dist/nitro.d.ts +1 -1
  48. package/dist/nitro.js +4 -3
  49. package/dist/{oauth-callback-server-DIF6Li06.js → oauth-callback-server-DHCZC6B4.js} +2 -2
  50. package/dist/{oauth-relay-DPE-wrwO.js → oauth-relay-pPMGnDZt.js} +1 -1
  51. package/dist/{registry-BBkWFCl8.js → registry-CZOzddwu.js} +5 -8
  52. package/dist/{resolve-B38MkHXE.js → resolve-cKOQ14Dh.js} +3 -3
  53. package/dist/{result-BaqSZcJb.js → result-DcvEOe1r.js} +119 -93
  54. package/dist/result-event-type-BdIJuZxg.js +48 -0
  55. package/dist/rule-DAxQY-1h.js +20 -0
  56. package/dist/{runner-11h8PrHh.js → runner-DBfUW44l.js} +14 -16
  57. package/dist/{sandbox-egress-signals-CTcACAtJ.js → sandbox-egress-signals-BVF_xAm1.js} +1 -1
  58. package/dist/{schema-DriSvB40.d.ts → schema-BEHKxr4I.d.ts} +861 -298
  59. package/dist/{schema-obw5jvR4.js → schema-Bk9Nm2E8.js} +344 -153
  60. package/dist/{service-account-Bx93N1n1.js → service-account-CVYsFjty.js} +3 -3
  61. package/dist/{service-account-Zc5bUcIJ.js → service-account-Ts4ulcrV.js} +68 -68
  62. package/dist/{skills-C8Npu5zO.js → skills-VTnhAJWm.js} +2 -2
  63. package/dist/{slack-conversation-unfurl-DlRVA02H.js → slack-conversation-unfurl-fuLnF1jE.js} +9 -11
  64. package/dist/{spawn-CXr58R0x.js → spawn-vxAarlX5.js} +6 -6
  65. package/dist/start-conversation-CEn2KH1A.js +941 -0
  66. package/dist/{state-CGrGVeQC.js → state-C1P3_Ywk.js} +4 -4
  67. package/dist/statuses-_cRJHXK7.js +150 -0
  68. package/dist/store-DFZaN-Ix.js +492 -0
  69. package/dist/task-queue-Cx4Lmjyk.js +90 -0
  70. package/dist/task-runner-CbTwFA6k.js +1432 -0
  71. package/dist/{thread-context-Dyj1KWaY.js → thread-context-BkAZDTX2.js} +13 -11
  72. package/dist/thread-state-DhPndWi1.js +5625 -0
  73. package/dist/{validation-DxVNIxA0.js → validation-nIzMtAVJ.js} +1 -1
  74. package/dist/{task-queue-CaZffYaH.js → vercel-queue-hW90XzbG.js} +93 -172
  75. package/dist/{version-Cr7Z71yG.js → version-Brbtz4Qf.js} +1 -1
  76. package/dist/version.js +1 -1
  77. package/dist/{warmup-C6LOZ2d2.js → warmup-BDA5myRK.js} +5832 -4567
  78. package/dist/web-message-id-C6P83ans.js +10 -0
  79. package/dist/{worker-CUBtu1Li.js → worker-D63RcaVD.js} +20 -8
  80. package/migrations/0126_artifact_drop_public.sql +8 -0
  81. package/migrations/0127_artifact_path.sql +4 -0
  82. package/migrations/0128_artifact_path_index.sql +1 -0
  83. package/migrations/0129_review_item_answered_index.sql +1 -0
  84. package/migrations/0130_review_item_status_index.sql +1 -0
  85. package/migrations/0131_brief_outcome_status.sql +1 -0
  86. package/migrations/0132_brief_outcome_status_backfill.sql +7 -0
  87. package/migrations/0133_brief_created_at_index.sql +1 -0
  88. package/migrations/0134_slack_person_search_index.sql +1 -0
  89. package/migrations/0135_code_change_size.sql +3 -0
  90. package/migrations/0136_merge_conflict_notice_dismiss.sql +16 -0
  91. package/migrations/0137_inbox_snoozes.sql +27 -0
  92. package/migrations/0138_code_change_search_index.sql +2 -0
  93. package/migrations/0139_review_item_owner.sql +22 -0
  94. package/migrations/0140_review_item_owner_index.sql +1 -0
  95. package/migrations/0141_memory_core_adoption.sql +89 -0
  96. package/migrations/0142_memory_core_indexes.sql +17 -0
  97. package/migrations/0143_todos.sql +14 -0
  98. package/migrations/0144_inbox_items.sql +32 -0
  99. package/migrations/0145_todo_changed_by_agent.sql +1 -0
  100. package/migrations/0146_inbox_item_subject_title_parts.sql +1 -0
  101. package/migrations/0147_inbox_snooze_wake_reason.sql +1 -0
  102. package/migrations/0148_authorization_request_index.sql +1 -0
  103. package/migrations/0149_conversation_metadata.sql +10 -0
  104. package/migrations/0150_conversation_metadata_fill.sql +39 -0
  105. package/migrations/0151_conversation_search_index.sql +1 -0
  106. package/migrations/0152_inbox_item_legacy_automation_keys.sql +21 -0
  107. package/migrations/0153_artifact_expiry.sql +1 -0
  108. package/migrations/0154_artifact_permanent_sha_index.sql +1 -0
  109. package/migrations/0155_artifact_drop_public_sha_index.sql +3 -0
  110. package/migrations/0156_conversation_kind_lead.sql +6 -0
  111. package/migrations/0157_conversation_lead_actor_index.sql +1 -0
  112. package/migrations/meta/0126_snapshot.json +5488 -0
  113. package/migrations/meta/0127_snapshot.json +5519 -0
  114. package/migrations/meta/0128_snapshot.json +5519 -0
  115. package/migrations/meta/0129_snapshot.json +5547 -0
  116. package/migrations/meta/0130_snapshot.json +5563 -0
  117. package/migrations/meta/0131_snapshot.json +5569 -0
  118. package/migrations/meta/0132_snapshot.json +5569 -0
  119. package/migrations/meta/0133_snapshot.json +5590 -0
  120. package/migrations/meta/0134_snapshot.json +5606 -0
  121. package/migrations/meta/0135_snapshot.json +5624 -0
  122. package/migrations/meta/0136_snapshot.json +5624 -0
  123. package/migrations/meta/0137_snapshot.json +5864 -0
  124. package/migrations/meta/0138_snapshot.json +5894 -0
  125. package/migrations/meta/0139_snapshot.json +5898 -0
  126. package/migrations/meta/0140_snapshot.json +5919 -0
  127. package/migrations/meta/0141_snapshot.json +6429 -0
  128. package/migrations/meta/0142_snapshot.json +6457 -0
  129. package/migrations/meta/0143_snapshot.json +6434 -0
  130. package/migrations/meta/0144_snapshot.json +6434 -0
  131. package/migrations/meta/0145_snapshot.json +6440 -0
  132. package/migrations/meta/0146_snapshot.json +6446 -0
  133. package/migrations/meta/0147_snapshot.json +6452 -0
  134. package/migrations/meta/0148_snapshot.json +6474 -0
  135. package/migrations/meta/0149_snapshot.json +6490 -0
  136. package/migrations/meta/0150_snapshot.json +6490 -0
  137. package/migrations/meta/0151_snapshot.json +6505 -0
  138. package/migrations/meta/0152_snapshot.json +6505 -0
  139. package/migrations/meta/0153_snapshot.json +6511 -0
  140. package/migrations/meta/0154_snapshot.json +6533 -0
  141. package/migrations/meta/0155_snapshot.json +6511 -0
  142. package/migrations/meta/0156_snapshot.json +6511 -0
  143. package/migrations/meta/0157_snapshot.json +6527 -0
  144. package/migrations/meta/_journal.json +224 -0
  145. package/package.json +7 -8
  146. package/skills/design-automation-skill/SKILL.md +108 -0
  147. package/dist/briefs-DKxkoruh.js +0 -395
  148. package/dist/conversation-M9KZ5JxF.js +0 -1024
  149. package/dist/prompt-CaMyeCpA.js +0 -910
  150. package/dist/schedule-DWxZ3kja.js +0 -1146
  151. package/dist/store-D4FQ1Nml.js +0 -335
  152. package/dist/task-runner-Dm7BHbGp.js +0 -287
  153. package/dist/turn-session-routing-CD0BRCex.js +0 -263
  154. package/dist/turn-user-message-9IxeEv5v.js +0 -364
  155. package/dist/users-CaUAYMb3.js +0 -181
  156. package/dist/viewer-AHldghAD.js +0 -212
  157. 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-D9cvNlQl.js";
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("../projection-jZSlEAXG.js").then((n) => n.Tn),
103
- import("../catalog-runtime-BxwzbLKY.js").then((n) => n.t),
104
- import("../validation-DxVNIxA0.js").then((n) => n.r),
105
- import("../db-CFZggNoy.js").then((n) => n.n)
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 { setBriefsConfig, setEventEmbeddingsConfig } = await import("../projection-jZSlEAXG.js").then((n) => n.Hn);
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-11h8PrHh.js");
159
- const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-DIF6Li06.js");
160
- const { createLocalOAuthState } = await import("../oauth-relay-DPE-wrwO.js").then((n) => n.t);
161
- const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-CTcACAtJ.js");
162
- const { bindSpawnAgent } = await import("../spawn-CXr58R0x.js").then((n) => n.n);
163
- const { bindMessageAgent } = await import("../message-DwvJ-I3w.js").then((n) => n.n);
164
- const { createChildConversationWorker, createDeliverToParent } = await import("../result-BaqSZcJb.js").then((n) => n.o);
165
- const { createConversationTurnWorker } = await import("../conversation-turn-CBlZIH02.js").then((n) => n.t);
166
- const { skipInputAfterConversationStop } = await import("../session-stop-BfY4rhJs.js").then((n) => n.a);
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-CUBtu1Li.js").then((n) => n.n);
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
- const stopped = await skipInputAfterConversationStop(context);
180
- return "skipped" in stopped ? stopped.skipped : await childWorker(stopped.context);
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-C8Npu5zO.js";
3
- import { N as JUNIOR_HEARTBEAT_ROUTE, R as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, j as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-D5gkyvnK.js";
4
- import { b as parsePluginManifest, y as parseInlinePluginManifest } from "../registry-BBkWFCl8.js";
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 (!isRecord(exportsValue)) return;
185
- const rootExport = exportsValue["."] ?? exportsValue;
186
- if (typeof rootExport === "string") return rootExport;
187
- if (!isRecord(rootExport)) return;
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
- function isPluginRegistrationLike(value) {
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
- if (!isPluginRegistrationLike(registration)) continue;
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(registration.manifest, packageDir)
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
- if (isRecord(vercelConfig.functions)) {
425
- if (vercelConfig.functions["api/internal/agent/continue.ts"] !== void 0) {
426
- checked = true;
427
- 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.`);
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) => isRecord(cron) && cron["path"] === "/api/internal/heartbeat")) {
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-tgZEZAk2.js")).runAdmin(argv);
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-Bx93N1n1.js")).runServiceAccount(argv);
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 !== "briefs" && command !== "admin" ? await import("./plugins.js") : void 0;
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,
@@ -1,12 +1,12 @@
1
- import { o as getDb } from "../db-CFZggNoy.js";
2
- import { Ka as createPluginLogger, Ln as setPlugins, Rn as validatePlugins } from "../projection-jZSlEAXG.js";
3
- import { n as pluginCatalogRuntime } from "../catalog-runtime-BxwzbLKY.js";
4
- import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-DxVNIxA0.js";
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>\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>";
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>\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>]";
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 { i as getChatConfig } from "../config-Dkt2Le2b.js";
2
- import { n as pluginCatalogRuntime } from "../catalog-runtime-BxwzbLKY.js";
3
- import { n as resolve } from "../resolve-B38MkHXE.js";
4
- import { Da as SANDBOX_RUNTIME, Yi as create } from "../projection-jZSlEAXG.js";
5
- import { $ as disconnectStateAdapter } from "../db-CFZggNoy.js";
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) {
@@ -1,5 +1,5 @@
1
1
  import { n as JuniorPluginSet } from "../plugins-fBrz8PCV.js";
2
- import "../db-B4Hjxr-u.js";
2
+ import "../db-BbC5stfa.js";
3
3
  interface UpgradeIo {
4
4
  info: (line: string) => void;
5
5
  }
@@ -1,7 +1,7 @@
1
- import { i as getChatConfig } from "../config-Dkt2Le2b.js";
2
- import { n as isPostgresErrorCode, t as createJuniorSqlExecutor } from "../executor-BPkZDx5-.js";
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-BBkWFCl8.js";
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";