@sentry/junior 0.71.3 → 0.73.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 (103) hide show
  1. package/bin/junior.mjs +22 -10
  2. package/dist/api-reference.d.ts +2 -0
  3. package/dist/app.d.ts +12 -3
  4. package/dist/app.js +2522 -15560
  5. package/dist/chat/agent-dispatch/heartbeat.d.ts +0 -6
  6. package/dist/chat/agent-dispatch/runner.d.ts +2 -0
  7. package/dist/chat/agent-dispatch/store.d.ts +2 -2
  8. package/dist/chat/agent-dispatch/types.d.ts +6 -3
  9. package/dist/chat/agent-dispatch/validation.d.ts +2 -3
  10. package/dist/chat/app/production.d.ts +8 -1
  11. package/dist/chat/app/services.d.ts +7 -0
  12. package/dist/chat/destination.d.ts +3 -1
  13. package/dist/chat/logging.d.ts +3 -0
  14. package/dist/chat/mcp/errors.d.ts +3 -0
  15. package/dist/chat/mcp/tool-manager.d.ts +5 -1
  16. package/dist/chat/oauth-flow.d.ts +1 -1
  17. package/dist/chat/plugins/agent-hooks.d.ts +3 -2
  18. package/dist/chat/plugins/registry.d.ts +2 -0
  19. package/dist/chat/plugins/types.d.ts +2 -0
  20. package/dist/chat/prompt.d.ts +4 -1
  21. package/dist/chat/requester.d.ts +67 -0
  22. package/dist/chat/respond.d.ts +8 -8
  23. package/dist/chat/runtime/agent-continue-runner.d.ts +25 -0
  24. package/dist/chat/runtime/reply-executor.d.ts +7 -5
  25. package/dist/chat/runtime/slack-resume.d.ts +3 -3
  26. package/dist/chat/runtime/slack-runtime.d.ts +13 -3
  27. package/dist/chat/runtime/turn.d.ts +17 -3
  28. package/dist/chat/sandbox/egress-credentials.d.ts +5 -2
  29. package/dist/chat/sandbox/egress-policy.d.ts +5 -1
  30. package/dist/chat/sandbox/egress-proxy.d.ts +2 -0
  31. package/dist/chat/sandbox/egress-schemas.d.ts +4 -0
  32. package/dist/chat/sandbox/egress-session.d.ts +3 -1
  33. package/dist/chat/sandbox/egress-tracing.d.ts +7 -0
  34. package/dist/chat/sandbox/sandbox.d.ts +2 -0
  35. package/dist/chat/sandbox/session.d.ts +3 -2
  36. package/dist/chat/services/agent-continue.d.ts +27 -0
  37. package/dist/chat/services/auth-pause-response.d.ts +1 -1
  38. package/dist/chat/services/auth-pause.d.ts +2 -1
  39. package/dist/chat/services/mcp-auth-orchestration.d.ts +1 -1
  40. package/dist/chat/services/message-actor-identity.d.ts +12 -4
  41. package/dist/chat/services/plugin-auth-orchestration.d.ts +9 -8
  42. package/dist/chat/services/turn-result.d.ts +3 -0
  43. package/dist/chat/services/turn-session-record.d.ts +10 -7
  44. package/dist/chat/slack/user.d.ts +4 -4
  45. package/dist/chat/state/adapter.d.ts +2 -0
  46. package/dist/chat/state/conversation-details.d.ts +4 -3
  47. package/dist/chat/state/session-log.d.ts +43 -0
  48. package/dist/chat/state/turn-session.d.ts +7 -10
  49. package/dist/chat/task-execution/slack-work.d.ts +5 -5
  50. package/dist/chat/task-execution/store.d.ts +83 -48
  51. package/dist/chat/task-execution/worker.d.ts +3 -3
  52. package/dist/chat/tools/definition.d.ts +3 -0
  53. package/dist/chat/tools/execution/tool-error-handler.d.ts +2 -1
  54. package/dist/chat/tools/slack/canvas-tools.d.ts +3 -2
  55. package/dist/chat/tools/slack/channel-list-messages.d.ts +2 -2
  56. package/dist/chat/tools/slack/channel-post-message.d.ts +3 -2
  57. package/dist/chat/tools/slack/context.d.ts +15 -2
  58. package/dist/chat/tools/slack/message-add-reaction.d.ts +3 -2
  59. package/dist/chat/tools/slack/thread-read.d.ts +2 -2
  60. package/dist/chat/tools/types.d.ts +20 -23
  61. package/dist/{chunk-BBXYXOJW.js → chunk-3BYAPS6B.js} +48 -529
  62. package/dist/{chunk-UXG6TU2U.js → chunk-7Q5YOUUT.js} +16 -93
  63. package/dist/chunk-AL5T52ZD.js +1119 -0
  64. package/dist/chunk-CYUI7JU5.js +195 -0
  65. package/dist/{chunk-R62YWUNO.js → chunk-DIMX5F3T.js} +10 -28
  66. package/dist/chunk-G3E7SCME.js +28 -0
  67. package/dist/chunk-KVZL5NZS.js +519 -0
  68. package/dist/chunk-M4FLLXXD.js +212 -0
  69. package/dist/chunk-OQSYYOLM.js +12787 -0
  70. package/dist/{chunk-GT67ZWZQ.js → chunk-OR6NQJ5E.js} +5 -3
  71. package/dist/{chunk-B5HKWWQB.js → chunk-RY6AL5C7.js} +8 -6
  72. package/dist/chunk-SJHUF3DP.js +43 -0
  73. package/dist/{chunk-XE2VFQQN.js → chunk-UOTZ3EEQ.js} +1 -1
  74. package/dist/{chunk-HOGQL2H6.js → chunk-UZVHXZ7V.js} +1357 -1486
  75. package/dist/{chunk-76YMBKW7.js → chunk-V4VYUY4A.js} +27 -14
  76. package/dist/{chunk-JS4HURDT.js → chunk-WS2EG3GW.js} +224 -224
  77. package/dist/chunk-ZDA2HYX5.js +275 -0
  78. package/dist/cli/chat.js +205 -0
  79. package/dist/cli/check.js +6 -5
  80. package/dist/cli/run.js +18 -2
  81. package/dist/cli/snapshot-warmup.js +11 -8
  82. package/dist/cli/upgrade.js +599 -0
  83. package/dist/deployment.d.ts +4 -0
  84. package/dist/handlers/agent-dispatch.d.ts +6 -1
  85. package/dist/handlers/mcp-oauth-callback.d.ts +6 -1
  86. package/dist/handlers/oauth-callback.d.ts +6 -1
  87. package/dist/handlers/sandbox-egress-proxy.d.ts +2 -0
  88. package/dist/handlers/webhooks.d.ts +4 -2
  89. package/dist/instrumentation.js +17 -2
  90. package/dist/nitro.d.ts +1 -1
  91. package/dist/nitro.js +10 -10
  92. package/dist/plugins.d.ts +1 -1
  93. package/dist/reporting/conversations.d.ts +116 -0
  94. package/dist/reporting.d.ts +24 -129
  95. package/dist/reporting.js +320 -166
  96. package/dist/runner-LMAM4OGD.js +259 -0
  97. package/package.json +3 -3
  98. package/dist/chat/runtime/timeout-resume-runner.d.ts +0 -19
  99. package/dist/chat/services/requester-identity.d.ts +0 -19
  100. package/dist/chat/services/timeout-resume.d.ts +0 -23
  101. package/dist/chunk-6YY4Q3D4.js +0 -12
  102. package/dist/chunk-Z3YD6NHK.js +0 -12
  103. package/dist/handlers/turn-resume.d.ts +0 -4
package/bin/junior.mjs CHANGED
@@ -1,14 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import path from "node:path";
4
- import { parseArgs } from "node:util";
5
4
  import { fileURLToPath, pathToFileURL } from "node:url";
6
5
 
7
- const { positionals } = parseArgs({
8
- allowPositionals: true,
9
- strict: false,
10
- });
11
-
12
6
  async function loadCliFunction(moduleName, exportName, unavailableMessage) {
13
7
  const currentFile = fileURLToPath(import.meta.url);
14
8
  const modulePath = path.join(
@@ -62,6 +56,24 @@ async function runCheck(dir) {
62
56
  await runCheckFn(dir);
63
57
  }
64
58
 
59
+ async function runUpgrade() {
60
+ const runUpgradeFn = await loadCliFunction(
61
+ "upgrade",
62
+ "runUpgrade",
63
+ "Upgrade module is unavailable; reinstall @sentry/junior and retry.",
64
+ );
65
+ await runUpgradeFn();
66
+ }
67
+
68
+ async function runChat(argv) {
69
+ const runChatFn = await loadCliFunction(
70
+ "chat",
71
+ "runChat",
72
+ "Chat module is unavailable; reinstall @sentry/junior and retry.",
73
+ );
74
+ return await runChatFn(argv);
75
+ }
76
+
65
77
  async function main() {
66
78
  await loadCliEnvFiles();
67
79
  const runCli = await loadCliFunction(
@@ -69,14 +81,14 @@ async function main() {
69
81
  "runCli",
70
82
  "CLI dispatcher module is unavailable; reinstall @sentry/junior and retry.",
71
83
  );
72
- const exitCode = await runCli(positionals, {
84
+ const exitCode = await runCli(process.argv.slice(2), {
85
+ runChat,
73
86
  runInit,
74
87
  runSnapshotCreate,
75
88
  runCheck,
89
+ runUpgrade,
76
90
  });
77
- if (exitCode !== 0) {
78
- process.exit(exitCode);
79
- }
91
+ process.exit(exitCode);
80
92
  }
81
93
 
82
94
  main().catch((error) => {
@@ -5,5 +5,7 @@ export { juniorNitro } from "./nitro";
5
5
  export type { JuniorNitroOptions } from "./nitro";
6
6
  export { defineJuniorPlugins } from "./plugins";
7
7
  export type { JuniorPluginInput, JuniorPluginSet, JuniorPluginSetOptions, } from "./plugins";
8
+ export { createJuniorReporting } from "./reporting";
9
+ export type { ConversationFeed, ConversationReport, ConversationReportStatus, ConversationRunReport, ConversationStatsItem, ConversationStatsReport, ConversationSummaryReport, ConversationSurface, ConversationUsage, HealthReport, JuniorReporting, PluginOperationalReport, PluginOperationalReportFeed, PluginPackageContentItemReport, PluginPackageContentReport, PluginReport, RequesterIdentity, RuntimeInfoReport, SkillReport, TranscriptMessage, TranscriptPart, TranscriptPartType, TranscriptRole, } from "./reporting";
8
10
  export { juniorVercelConfig } from "./vercel";
9
11
  export type { JuniorVercelConfigOptions } from "./vercel";
package/dist/app.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { Hono } from "hono";
2
- import { type JuniorPluginSet } from "@/plugins";
2
+ import { type JuniorPluginSet } from "./plugins";
3
3
  import { type VercelConversationWorkCallbackOptions } from "@/chat/task-execution/vercel-callback";
4
4
  import type { WaitUntilFn } from "@/handlers/types";
5
- export { defineJuniorPlugins } from "@/plugins";
6
- export type { JuniorPluginInput, JuniorPluginSet, JuniorPluginSetOptions, } from "@/plugins";
5
+ export { defineJuniorPlugins } from "./plugins";
6
+ export type { JuniorPluginInput, JuniorPluginSet, JuniorPluginSetOptions, } from "./plugins";
7
7
  export interface JuniorAppOptions {
8
8
  /** Slack-specific overrides applied after env parsing. */
9
9
  slack?: {
@@ -18,6 +18,15 @@ export interface JuniorAppOptions {
18
18
  conversationWork?: VercelConversationWorkCallbackOptions;
19
19
  /** Direct plugin set override. Usually omitted when `juniorNitro()` uses a plugin module. */
20
20
  plugins?: JuniorPluginSet;
21
+ /** Sandbox execution options. */
22
+ sandbox?: {
23
+ /**
24
+ * Egress domains allowed to carry Sentry trace propagation headers.
25
+ * Entries may be exact domains or leading wildcard domains such as
26
+ * `*.sentry.io`; wildcard entries match subdomains, not the apex domain.
27
+ */
28
+ egressTracePropagationDomains?: string[];
29
+ };
21
30
  waitUntil?: WaitUntilFn;
22
31
  }
23
32
  /** Create a Hono app with all Junior routes. */