@sentry/junior 0.113.0 → 0.115.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 (98) hide show
  1. package/dist/{agent-hooks-BKEMWR3Z.js → agent-hooks-4EUUXP2F.js} +12 -11
  2. package/dist/api/conversations/detail.d.ts +26 -0
  3. package/dist/api/conversations/event-list.d.ts +26 -0
  4. package/dist/api/conversations/events.d.ts +1 -1
  5. package/dist/api/health.d.ts +7 -0
  6. package/dist/api/plugin-reports.d.ts +62 -0
  7. package/dist/api/plugins.d.ts +9 -0
  8. package/dist/api/runtime.d.ts +24 -0
  9. package/dist/api/schema/conversation.d.ts +104 -0
  10. package/dist/api/schema.d.ts +2 -2
  11. package/dist/api/schema.js +6 -6
  12. package/dist/api/skills.d.ts +6 -0
  13. package/dist/api.js +140 -100
  14. package/dist/app.d.ts +2 -0
  15. package/dist/app.js +1117 -5010
  16. package/dist/catalog-runtime-Y32UEQLB.js +18 -0
  17. package/dist/chat/agent/request.d.ts +6 -0
  18. package/dist/chat/agent/sandbox.d.ts +2 -0
  19. package/dist/chat/agent/tools.d.ts +2 -0
  20. package/dist/chat/config.d.ts +3 -1
  21. package/dist/chat/conversations/history.d.ts +92 -0
  22. package/dist/chat/conversations/projection.d.ts +20 -1
  23. package/dist/chat/local/credential-sync.d.ts +5 -0
  24. package/dist/chat/local/oauth-relay.d.ts +4 -0
  25. package/dist/chat/mcp/oauth.d.ts +1 -0
  26. package/dist/chat/oauth-authorization.d.ts +17 -0
  27. package/dist/chat/oauth-flow.d.ts +9 -0
  28. package/dist/chat/sandbox/egress/schemas.d.ts +46 -0
  29. package/dist/chat/sandbox/egress/signals.d.ts +9 -0
  30. package/dist/chat/sandbox/sandbox.d.ts +2 -0
  31. package/dist/chat/sentry-payload-filter.d.ts +4 -4
  32. package/dist/chat/services/context-budget.d.ts +7 -2
  33. package/dist/chat/services/context-compaction.d.ts +28 -1
  34. package/dist/chat/services/conversation-memory.d.ts +1 -0
  35. package/dist/chat/services/mcp-auth-orchestration.d.ts +5 -3
  36. package/dist/chat/services/plugin-auth-orchestration.d.ts +2 -0
  37. package/dist/chat/services/provider-error.d.ts +1 -0
  38. package/dist/chat/services/turn-router.d.ts +1 -0
  39. package/dist/chat/slack/message-control.d.ts +2 -0
  40. package/dist/chat/slack/oauth-authorization-message.d.ts +3 -0
  41. package/dist/chat/task-execution/slack-work.d.ts +2 -0
  42. package/dist/chat/tool-support/zod-tool.d.ts +1 -1
  43. package/dist/chat/tools/definition.d.ts +5 -0
  44. package/dist/chat/tools/sandbox/edit-file.d.ts +1 -1
  45. package/dist/chat/tools/sandbox/text-edits.d.ts +1 -0
  46. package/dist/{chunk-4WZ7YKDF.js → chunk-2QG4MZQ7.js} +2 -2
  47. package/dist/{chunk-H5ON7XTE.js → chunk-43RYMWJ2.js} +954 -2514
  48. package/dist/chunk-4CODA7P5.js +43 -0
  49. package/dist/{chunk-HMRVILWZ.js → chunk-67CVNDJ7.js} +1 -1
  50. package/dist/{chunk-LR2SKL5Y.js → chunk-6FKLPVF3.js} +1 -1
  51. package/dist/{chunk-2ZTTXTSZ.js → chunk-6OPTF4BQ.js} +10 -4
  52. package/dist/{chunk-3CTIAKSS.js → chunk-6V762AB4.js} +1 -1
  53. package/dist/{chunk-WBB22ANL.js → chunk-AGLQYELI.js} +77 -8
  54. package/dist/{chunk-DXRPHBOU.js → chunk-CEYOL62C.js} +77 -36
  55. package/dist/{chunk-QTS66GMR.js → chunk-CWEZEPD4.js} +3 -3
  56. package/dist/chunk-DIB4GX3G.js +8 -0
  57. package/dist/{chunk-OXE5ZUTS.js → chunk-EW5MLKT5.js} +10 -75
  58. package/dist/{chunk-42WRQLJ6.js → chunk-F3B2YJ76.js} +0 -14
  59. package/dist/chunk-FA6POGLH.js +70 -0
  60. package/dist/{chunk-ZRSUCJGA.js → chunk-FHC4JUSF.js} +1 -1
  61. package/dist/{chunk-6Y5L4BOM.js → chunk-FXOYURO4.js} +5 -3
  62. package/dist/{chunk-UKGNSJQQ.js → chunk-G36V2YGB.js} +108 -82
  63. package/dist/{chunk-K5BXPM74.js → chunk-G5SX4UPR.js} +3 -43
  64. package/dist/chunk-HDSDCEPK.js +80 -0
  65. package/dist/{chunk-LLKDNPYV.js → chunk-HWCQRGLL.js} +37 -3
  66. package/dist/{chunk-C4MZ3GP5.js → chunk-HZF5P5UN.js} +1 -1
  67. package/dist/chunk-LYA2AB5G.js +1914 -0
  68. package/dist/{chunk-36UJA3OD.js → chunk-NVUQSFWX.js} +2 -2
  69. package/dist/chunk-OB42YVAE.js +16 -0
  70. package/dist/{chunk-4VKFQPCW.js → chunk-PVZHG2XZ.js} +4 -4
  71. package/dist/{chunk-YJ44UT7D.js → chunk-RAVKCKXA.js} +7 -7
  72. package/dist/{chunk-RCBUZGIT.js → chunk-SYJT7AKB.js} +23 -20
  73. package/dist/{chunk-NP7TYFYR.js → chunk-TVE25LPW.js} +1 -1
  74. package/dist/chunk-W3U3YQYI.js +71 -0
  75. package/dist/chunk-YCLO7D7M.js +4267 -0
  76. package/dist/cli/chat.js +72 -40
  77. package/dist/cli/check.js +10 -8
  78. package/dist/cli/init.js +1 -0
  79. package/dist/cli/plugins.js +16 -14
  80. package/dist/cli/snapshot-warmup.js +13 -11
  81. package/dist/cli/upgrade.js +10 -8
  82. package/dist/{db-2ASK6MV6.js → db-KBSJHAZU.js} +8 -7
  83. package/dist/handlers/sandbox-egress-signals.d.ts +4 -0
  84. package/dist/instrumentation.js +72 -4
  85. package/dist/nitro.js +2 -2
  86. package/dist/oauth-callback-server-EYRMJTCS.js +231 -0
  87. package/dist/oauth-relay-3ZU72UGL.js +9 -0
  88. package/dist/reporting-schema.d.ts +12 -4
  89. package/dist/reporting.d.ts +5 -5
  90. package/dist/{runner-L363K62Z.js → runner-RQGZ5Z2S.js} +139 -72
  91. package/dist/sandbox-egress-signals-CDFAP67O.js +75 -0
  92. package/dist/{skills-VCPG3NOO.js → skills-JJQIE3BT.js} +10 -8
  93. package/dist/validation-MZ47PZP5.js +21 -0
  94. package/dist/version.js +1 -1
  95. package/package.json +5 -5
  96. package/dist/catalog-runtime-6XYOUVRZ.js +0 -16
  97. package/dist/chat/oauth-authorization-message.d.ts +0 -6
  98. package/dist/validation-GY7AJBLC.js +0 -19
package/dist/api.js CHANGED
@@ -18,31 +18,33 @@ import {
18
18
  locationDirectoryReportSchema,
19
19
  locationParamsSchema,
20
20
  personParamsSchema
21
- } from "./chunk-UKGNSJQQ.js";
21
+ } from "./chunk-G36V2YGB.js";
22
22
  import {
23
- buildSentryConversationUrl,
24
23
  formatSlackConversationRedactedLabel,
25
24
  readHealthReport,
26
25
  resolveSlackConversationContextFromThreadId
27
- } from "./chunk-K5BXPM74.js";
26
+ } from "./chunk-G5SX4UPR.js";
27
+ import {
28
+ buildSentryConversationUrl
29
+ } from "./chunk-4CODA7P5.js";
28
30
  import {
29
31
  healthReportSchema,
30
32
  pluginOperationalReportFeedSchema,
31
- pluginReportsSchema,
33
+ pluginsSchema,
32
34
  runtimeInfoReportSchema,
33
35
  skillReportsSchema
34
- } from "./chunk-2ZTTXTSZ.js";
36
+ } from "./chunk-6OPTF4BQ.js";
35
37
  import {
36
38
  agentTurnUsageSchema,
37
39
  hasAgentTurnUsage
38
40
  } from "./chunk-MU6HHZEN.js";
39
41
  import "./chunk-PDO5BLNM.js";
40
- import "./chunk-QTS66GMR.js";
42
+ import "./chunk-CWEZEPD4.js";
41
43
  import {
42
44
  decodeStoredConversationEvent,
43
45
  getDb,
44
46
  getSqlExecutor
45
- } from "./chunk-LLKDNPYV.js";
47
+ } from "./chunk-HWCQRGLL.js";
46
48
  import {
47
49
  juniorConversationEvents,
48
50
  juniorConversations,
@@ -50,19 +52,20 @@ import {
50
52
  juniorUsers
51
53
  } from "./chunk-JQFJO5WH.js";
52
54
  import "./chunk-4ZNGQH7C.js";
53
- import "./chunk-RCBUZGIT.js";
55
+ import "./chunk-SYJT7AKB.js";
54
56
  import {
55
57
  juniorDestinations
56
58
  } from "./chunk-VFUK3X5B.js";
57
59
  import {
58
60
  canExposeConversationPayload,
59
61
  parseSlackThreadId
60
- } from "./chunk-6Y5L4BOM.js";
61
- import "./chunk-36UJA3OD.js";
62
- import "./chunk-42WRQLJ6.js";
62
+ } from "./chunk-FXOYURO4.js";
63
+ import "./chunk-NVUQSFWX.js";
64
+ import "./chunk-OB42YVAE.js";
65
+ import "./chunk-F3B2YJ76.js";
63
66
  import "./chunk-6GWA276C.js";
64
- import "./chunk-NP7TYFYR.js";
65
- import "./chunk-ZRSUCJGA.js";
67
+ import "./chunk-TVE25LPW.js";
68
+ import "./chunk-FHC4JUSF.js";
66
69
  import "./chunk-MLKGABMK.js";
67
70
 
68
71
  // src/api.ts
@@ -342,6 +345,7 @@ var conversationReportSourceEventTypes = [
342
345
  "agent_step",
343
346
  "tool_execution_started",
344
347
  "turn_started",
348
+ "turn_routed",
345
349
  "turn_completed",
346
350
  "turn_failed",
347
351
  "compaction",
@@ -474,6 +478,16 @@ function reportEventData(args) {
474
478
  turnId: data.turnId,
475
479
  state: "started"
476
480
  };
481
+ case "turn_routed":
482
+ return {
483
+ type: "turn_routed",
484
+ turnId: data.turnId,
485
+ modelProfile: data.modelProfile,
486
+ modelId: data.modelId,
487
+ reasoningLevel: data.reasoningLevel,
488
+ ...data.confidence !== void 0 ? { confidence: data.confidence } : {},
489
+ source: data.source
490
+ };
477
491
  case "turn_completed":
478
492
  return {
479
493
  type: "turn_lifecycle",
@@ -488,7 +502,13 @@ function reportEventData(args) {
488
502
  failureKind: data.failureCode === "delivery_failed" ? "delivery" : "agent"
489
503
  };
490
504
  case "compaction":
491
- return { type: "compaction" };
505
+ return {
506
+ type: "compaction",
507
+ modelProfile: data.modelProfile,
508
+ modelId: data.modelId,
509
+ ...args.canExposePayload && data.summary ? { summary: data.summary } : {},
510
+ ...data.details ? { details: data.details } : {}
511
+ };
492
512
  default:
493
513
  return void 0;
494
514
  }
@@ -589,7 +609,8 @@ function projectConversationReportEventPage(args) {
589
609
  modelProfile: event.data.modelProfile,
590
610
  modelId: event.data.modelId,
591
611
  ...event.data.reasoningLevel ? { reasoningLevel: event.data.reasoningLevel } : {},
592
- ...event.data.triggeringToolCallId ? { triggeringToolCallId: event.data.triggeringToolCallId } : {}
612
+ ...event.data.triggeringToolCallId ? { triggeringToolCallId: event.data.triggeringToolCallId } : {},
613
+ ...args.canExposePayload && event.data.summary ? { summary: event.data.summary } : {}
593
614
  };
594
615
  } else {
595
616
  data = reportEventData({
@@ -1638,6 +1659,74 @@ function createConversationRoutes() {
1638
1659
  return app;
1639
1660
  }
1640
1661
 
1662
+ // src/reporting.ts
1663
+ import { readFileSync } from "fs";
1664
+ import path from "path";
1665
+ function readDescriptionText(home) {
1666
+ try {
1667
+ const raw = readFileSync(path.join(home, "DESCRIPTION.md"), "utf8").trim();
1668
+ return raw || void 0;
1669
+ } catch {
1670
+ return void 0;
1671
+ }
1672
+ }
1673
+ async function readSkillReports() {
1674
+ const { discoverSkills } = await import("./skills-JJQIE3BT.js");
1675
+ const skills = await discoverSkills();
1676
+ return skillReportsSchema.parse(
1677
+ skills.map((skill) => ({
1678
+ name: skill.name,
1679
+ pluginProvider: skill.pluginProvider
1680
+ }))
1681
+ );
1682
+ }
1683
+ async function readPlugins() {
1684
+ const { pluginCatalogRuntime } = await import("./catalog-runtime-Y32UEQLB.js");
1685
+ return pluginsSchema.parse(
1686
+ pluginCatalogRuntime.getProviders().map((plugin) => ({
1687
+ capabilities: plugin.manifest.capabilities ?? [],
1688
+ configKeys: plugin.manifest.configKeys ?? [],
1689
+ description: plugin.manifest.description,
1690
+ displayName: plugin.manifest.displayName,
1691
+ name: plugin.manifest.name
1692
+ }))
1693
+ );
1694
+ }
1695
+ async function readRuntimeInfoReport() {
1696
+ const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
1697
+ import("./discovery-RMHYSRL7.js"),
1698
+ import("./catalog-runtime-Y32UEQLB.js"),
1699
+ readPlugins(),
1700
+ readSkillReports()
1701
+ ]);
1702
+ const home = homeDir();
1703
+ return runtimeInfoReportSchema.parse({
1704
+ cwd: process.cwd(),
1705
+ homeDir: home,
1706
+ descriptionText: readDescriptionText(home),
1707
+ providers: plugins.map((plugin) => plugin.name),
1708
+ skills,
1709
+ packagedContent: pluginCatalogRuntime.getPackageContent()
1710
+ });
1711
+ }
1712
+ async function readPluginOperationalReportFeed() {
1713
+ const nowMs = Date.now();
1714
+ const { getPluginOperationalReports } = await import("./agent-hooks-4EUUXP2F.js");
1715
+ return pluginOperationalReportFeedSchema.parse({
1716
+ source: "plugins",
1717
+ generatedAt: new Date(nowMs).toISOString(),
1718
+ reports: await getPluginOperationalReports(nowMs)
1719
+ });
1720
+ }
1721
+
1722
+ // src/api/health.ts
1723
+ var health_default = defineApiRoute({
1724
+ method: "get",
1725
+ path: "/api/health",
1726
+ responseSchema: healthReportSchema,
1727
+ handler: readHealthReport
1728
+ });
1729
+
1641
1730
  // src/api/locations/routes.ts
1642
1731
  import { Hono as Hono2 } from "hono";
1643
1732
 
@@ -2551,94 +2640,45 @@ function createPeopleRoutes() {
2551
2640
  return app;
2552
2641
  }
2553
2642
 
2554
- // src/reporting.ts
2555
- import { readFileSync } from "fs";
2556
- import path from "path";
2557
- function readDescriptionText(home) {
2558
- try {
2559
- const raw = readFileSync(path.join(home, "DESCRIPTION.md"), "utf8").trim();
2560
- return raw || void 0;
2561
- } catch {
2562
- return void 0;
2563
- }
2564
- }
2565
- async function readSkillReports() {
2566
- const { discoverSkills } = await import("./skills-VCPG3NOO.js");
2567
- const skills = await discoverSkills();
2568
- return skillReportsSchema.parse(
2569
- skills.map((skill) => ({
2570
- name: skill.name,
2571
- pluginProvider: skill.pluginProvider
2572
- }))
2573
- );
2574
- }
2575
- async function readPluginReports() {
2576
- const { pluginCatalogRuntime } = await import("./catalog-runtime-6XYOUVRZ.js");
2577
- return pluginReportsSchema.parse(
2578
- pluginCatalogRuntime.getProviders().map((plugin) => ({
2579
- name: plugin.manifest.name
2580
- }))
2581
- );
2582
- }
2583
- async function readRuntimeInfoReport() {
2584
- const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
2585
- import("./discovery-RMHYSRL7.js"),
2586
- import("./catalog-runtime-6XYOUVRZ.js"),
2587
- readPluginReports(),
2588
- readSkillReports()
2589
- ]);
2590
- const home = homeDir();
2591
- return runtimeInfoReportSchema.parse({
2592
- cwd: process.cwd(),
2593
- homeDir: home,
2594
- descriptionText: readDescriptionText(home),
2595
- providers: plugins.map((plugin) => plugin.name),
2596
- skills,
2597
- packagedContent: pluginCatalogRuntime.getPackageContent()
2598
- });
2599
- }
2600
- async function readPluginOperationalReportFeed() {
2601
- const nowMs = Date.now();
2602
- const { getPluginOperationalReports } = await import("./agent-hooks-BKEMWR3Z.js");
2603
- return pluginOperationalReportFeedSchema.parse({
2604
- source: "plugins",
2605
- generatedAt: new Date(nowMs).toISOString(),
2606
- reports: await getPluginOperationalReports(nowMs)
2607
- });
2608
- }
2643
+ // src/api/plugin-reports.ts
2644
+ var plugin_reports_default = defineApiRoute({
2645
+ method: "get",
2646
+ path: "/api/plugin-reports",
2647
+ responseSchema: pluginOperationalReportFeedSchema,
2648
+ handler: readPluginOperationalReportFeed
2649
+ });
2650
+
2651
+ // src/api/plugins.ts
2652
+ var plugins_default = defineApiRoute({
2653
+ method: "get",
2654
+ path: "/api/plugins",
2655
+ responseSchema: pluginsSchema,
2656
+ handler: readPlugins
2657
+ });
2658
+
2659
+ // src/api/runtime.ts
2660
+ var runtime_default = defineApiRoute({
2661
+ method: "get",
2662
+ path: "/api/runtime",
2663
+ responseSchema: runtimeInfoReportSchema,
2664
+ handler: readRuntimeInfoReport
2665
+ });
2666
+
2667
+ // src/api/skills.ts
2668
+ var skills_default = defineApiRoute({
2669
+ method: "get",
2670
+ path: "/api/skills",
2671
+ responseSchema: skillReportsSchema,
2672
+ handler: readSkillReports
2673
+ });
2609
2674
 
2610
2675
  // src/api.ts
2611
2676
  var routes4 = [
2612
- defineApiRoute({
2613
- method: "get",
2614
- path: "/api/health",
2615
- responseSchema: healthReportSchema,
2616
- handler: readHealthReport
2617
- }),
2618
- defineApiRoute({
2619
- method: "get",
2620
- path: "/api/runtime",
2621
- responseSchema: runtimeInfoReportSchema,
2622
- handler: readRuntimeInfoReport
2623
- }),
2624
- defineApiRoute({
2625
- method: "get",
2626
- path: "/api/plugins",
2627
- responseSchema: pluginReportsSchema,
2628
- handler: readPluginReports
2629
- }),
2630
- defineApiRoute({
2631
- method: "get",
2632
- path: "/api/skills",
2633
- responseSchema: skillReportsSchema,
2634
- handler: readSkillReports
2635
- }),
2636
- defineApiRoute({
2637
- method: "get",
2638
- path: "/api/plugin-reports",
2639
- responseSchema: pluginOperationalReportFeedSchema,
2640
- handler: readPluginOperationalReportFeed
2641
- })
2677
+ health_default,
2678
+ runtime_default,
2679
+ plugins_default,
2680
+ skills_default,
2681
+ plugin_reports_default
2642
2682
  ];
2643
2683
  function createJuniorApi() {
2644
2684
  const app = new Hono4();
package/dist/app.d.ts CHANGED
@@ -45,6 +45,8 @@ export interface JuniorDashboardOptions {
45
45
  basePath?: string;
46
46
  /** Public deployment origin used for auth callbacks and external links. */
47
47
  baseURL?: string;
48
+ /** Expose the config-gated component gallery for local visual QA. */
49
+ componentGallery?: boolean;
48
50
  /** Disable dashboard route mounting while preserving serializable config shape. */
49
51
  disabled?: boolean;
50
52
  /** Replace conversation API responses with dashboard visual-QA fixtures. */