@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,25 +1,23 @@
1
- import { n as ConversationWorkQueue, t as ConversationQueueMessage } from "./queue-B5SnqRln.js";
2
- import { t as ConversationStore } from "./store-DoewL5mG.js";
3
- import "./history-DvqWZlYX.js";
4
- import { n as JuniorPluginSet } from "./plugins-CjfUP5gJ.js";
1
+ import { n as ConversationWorkQueue, t as ConversationQueueMessage } from "./queue-C37RbDVc.js";
2
+ import { t as ConversationStore } from "./store-CG0VJyye.js";
3
+ import "./history-BgI33Kie.js";
4
+ import { n as JuniorPluginSet } from "./plugins-B_0Cr0MO.js";
5
5
  import { Hono } from "hono";
6
6
  import "@earendil-works/pi-ai/compat";
7
7
  import "@earendil-works/pi-ai/api/anthropic-messages";
8
+ import "ai";
8
9
  import { z } from "zod";
9
10
  import { Destination, OwnedObjectAnnotation, PluginRegistration, Source, User } from "@sentry/junior-plugin-api";
10
11
  import "@earendil-works/pi-agent-core";
11
12
  import "@earendil-works/pi-ai";
12
13
  import "@sinclair/typebox";
13
14
  import { Sandbox } from "@vercel/sandbox";
14
- import { Client } from "@modelcontextprotocol/sdk/client";
15
15
  import "@modelcontextprotocol/sdk/client/auth.js";
16
+ import { Client } from "@modelcontextprotocol/sdk/client";
16
17
  import { Message, StateAdapter } from "chat";
17
18
  import "@chat-adapter/slack";
18
- //#region src/chat/reasoning-level.d.ts
19
19
  declare const TURN_REASONING_LEVELS: readonly ["none", "low", "medium", "high", "xhigh"];
20
20
  type TurnReasoningLevel = (typeof TURN_REASONING_LEVELS)[number];
21
- //#endregion
22
- //#region src/chat/model-profile.d.ts
23
21
  /** Runtime configuration for one named model profile. */
24
22
  interface ModelProfileConfig {
25
23
  /**
@@ -33,9 +31,9 @@ interface ModelProfileConfig {
33
31
  }
34
32
  /** App-level profile input: a model id string or a full profile config. */
35
33
  type ModelProfileInput = string | ModelProfileConfig;
36
- //#endregion
37
- //#region src/chat/config.d.ts
38
34
  interface BotModelConfig {
35
+ /** Decision model used by the passive reply router. */
36
+ decisionModelId?: string;
39
37
  /** Model used for embeddings. */
40
38
  embeddingModelId?: string;
41
39
  /** Model used for low-cost structured and utility calls. */
@@ -61,8 +59,13 @@ interface RuntimeLimits {
61
59
  maxAgentDepth?: number;
62
60
  /** Automated turns in a row before Junior stops answering automation. */
63
61
  maxConsecutiveAutomatedTurns?: number;
64
- /** Runs one Event automation can start in a rolling hour. */
65
- maxEventAutomationRunsPerHour?: number;
62
+ /** Runs one Event automation can start in a rolling window. */
63
+ eventAutomationRunLimit?: {
64
+ /** Runs allowed in one window. The default is 10. */
65
+ maxRuns?: number;
66
+ /** Window length in ms. The default, 60000, is one minute. */
67
+ windowMs?: number;
68
+ };
66
69
  /** Run slices one turn may use. */
67
70
  maxSlicesPerTurn?: number;
68
71
  /** Tool calls one turn may make. */
@@ -72,25 +75,19 @@ interface RuntimeLimits {
72
75
  /** Agent turn deadline in ms. The function duration still caps it. */
73
76
  turnTimeoutMs?: number;
74
77
  }
75
- //#endregion
76
- //#region src/chat/experimental.d.ts
77
78
  /**
78
79
  * Known unstable product features that must be opted into explicitly.
79
80
  * Add new keys here as features graduate from private experiments; remove them
80
81
  * once they become stable defaults.
81
82
  */
82
- declare const EXPERIMENTAL_FEATURES: readonly ["operator-tools", "passive-routing", "slack-sign-in", "subagents"];
83
+ declare const EXPERIMENTAL_FEATURES: readonly ["operator-tools", "passive-routing", "subagents"];
83
84
  /** One known experimental feature name. */
84
85
  type ExperimentalFeature = (typeof EXPERIMENTAL_FEATURES)[number];
85
86
  /** App-level opt-ins for unstable product features. */
86
87
  type ExperimentalFeaturesConfig = Readonly<Partial<Record<ExperimentalFeature, boolean>>>;
87
- //#endregion
88
- //#region src/chat/sandbox/resources.d.ts
89
88
  interface SandboxResourceConfig {
90
89
  vcpus?: number;
91
90
  }
92
- //#endregion
93
- //#region src/chat/plugins/task-queue.d.ts
94
91
  declare const pluginTaskQueueMessageSchema: z.ZodObject<{
95
92
  name: z.ZodString;
96
93
  params: z.ZodObject<{
@@ -100,8 +97,6 @@ declare const pluginTaskQueueMessageSchema: z.ZodObject<{
100
97
  plugin: z.ZodString;
101
98
  }, z.core.$strict>;
102
99
  type PluginTaskQueueMessage = z.output<typeof pluginTaskQueueMessageSchema>;
103
- //#endregion
104
- //#region src/chat/task-execution/state.d.ts
105
100
  /** Canonical durable mailbox entry owned by task execution. */
106
101
  declare const inboundMessageSchema: z.ZodObject<{
107
102
  attemptCount: z.ZodOptional<z.ZodNumber>;
@@ -131,18 +126,16 @@ declare const inboundMessageSchema: z.ZodObject<{
131
126
  receivedAtMs: z.ZodNumber;
132
127
  source: z.ZodEnum<{
133
128
  api: "api";
129
+ event: "event";
134
130
  internal: "internal";
135
131
  local: "local";
136
132
  plugin: "plugin";
137
- event: "event";
138
133
  scheduler: "scheduler";
139
134
  slack: "slack";
140
135
  web: "web";
141
136
  }>;
142
137
  }, z.core.$strict>;
143
138
  type InboundMessage = z.output<typeof inboundMessageSchema>;
144
- //#endregion
145
- //#region src/chat/task-execution/worker.d.ts
146
139
  interface ConversationWorkerContext {
147
140
  attempt: InboxAttempt;
148
141
  checkIn(): Promise<boolean>;
@@ -174,8 +167,6 @@ interface ConversationWorkerResult {
174
167
  /** Wait before the next wake attempt. Only meaningful when `status` is `deferred`. */
175
168
  delayMs?: number;
176
169
  }
177
- //#endregion
178
- //#region src/chat/task-execution/vercel-callback.d.ts
179
170
  interface ProcessConversationQueueMessageOptions {
180
171
  checkInIntervalMs?: number;
181
172
  conversationStore?: ConversationStore;
@@ -191,24 +182,14 @@ interface VercelConversationWorkCallbackOptions extends ProcessConversationQueue
191
182
  topic?: string;
192
183
  visibilityTimeoutSeconds?: number;
193
184
  }
194
- //#endregion
195
- //#region src/chat/app/conversation-work.d.ts
196
185
  type ConversationWorkCallbackOptions = VercelConversationWorkCallbackOptions;
197
- //#endregion
198
- //#region src/handlers/types.d.ts
199
186
  /** Callback to schedule background work that must finish before the function exits. */
200
187
  type WaitUntilFn = (task: Promise<unknown> | (() => Promise<unknown>)) => void;
201
- //#endregion
202
- //#region src/dashboard-routes.d.ts
203
188
  interface JuniorDashboardOptions {
204
189
  /** Browser auth route prefix used by Better Auth. */
205
190
  authPath?: string;
206
191
  /** Require a dashboard browser session before serving dashboard pages and APIs. */
207
192
  authRequired?: boolean;
208
- /** Exact Google account emails allowed to open the dashboard. */
209
- allowedEmails?: string[];
210
- /** Google Workspace domains allowed to open the dashboard. */
211
- allowedGoogleDomains?: string[];
212
193
  /** Browser route prefix for the dashboard shell. */
213
194
  basePath?: string;
214
195
  /** Public deployment origin used for auth callbacks and external links. */
@@ -224,8 +205,6 @@ interface JuniorDashboardOptions {
224
205
  /** Additional trusted origins accepted by Better Auth. */
225
206
  trustedOrigins?: string[];
226
207
  }
227
- //#endregion
228
- //#region src/app.d.ts
229
208
  interface JuniorAppOptions extends BotModelConfig {
230
209
  /**
231
210
  * Generate a durable Brief after each completed Turn. This costs one
@@ -234,6 +213,14 @@ interface JuniorAppOptions extends BotModelConfig {
234
213
  briefs?: {
235
214
  enabled?: boolean;
236
215
  };
216
+ /**
217
+ * Domains that may use Junior. Slack checks the email domain of the
218
+ * author's Slack profile. Dashboard Google sign-in checks the `hd` claim of
219
+ * the Google Workspace account. Defaults to `JUNIOR_ALLOWED_DOMAINS`.
220
+ * Recommended. Dashboard auth requires at least one. Empty lets every
221
+ * Slack workspace member use Junior.
222
+ */
223
+ allowedDomains?: string[];
237
224
  /** Authenticated dashboard mounted by core when configured. */
238
225
  dashboard?: JuniorDashboardOptions;
239
226
  /**
@@ -264,12 +251,6 @@ interface JuniorAppOptions extends BotModelConfig {
264
251
  * `JUNIOR_CROSS_ACTOR_MID_RUN_MODE` or `follow_up`.
265
252
  */
266
253
  crossActorMidRunMode?: CrossActorMidRunMode;
267
- /**
268
- * With `experimental["slack-sign-in"]`, how many days a Google sign-in,
269
- * in Slack or the dashboard, lets a person use Junior in Slack.
270
- * Defaults to 7.
271
- */
272
- signInMaxAgeDays?: number;
273
254
  };
274
255
  /** Install-wide provider defaults. Unregistered `provider.key` entries warn at startup. */
275
256
  configDefaults?: Record<string, unknown>;
@@ -308,5 +289,4 @@ interface JuniorAppOptions extends BotModelConfig {
308
289
  }
309
290
  /** Create a Hono app with all Junior routes. */
310
291
  declare function createApp(options?: JuniorAppOptions): Promise<Hono>;
311
- //#endregion
312
292
  export { ModelProfileInput as i, createApp as n, JuniorDashboardOptions as r, JuniorAppOptions as t };
package/dist/app.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { i as ModelProfileInput, n as createApp, r as JuniorDashboardOptions, t as JuniorAppOptions } from "./app-BsU5QNBd.js";
2
- import { i as defineJuniorPlugins, n as JuniorPluginSet, r as JuniorPluginSetOptions, t as JuniorPluginInput } from "./plugins-CjfUP5gJ.js";
3
- import { t as JUNIOR_VERSION } from "./version-CnXZ614E.js";
1
+ import { i as ModelProfileInput, n as createApp, r as JuniorDashboardOptions, t as JuniorAppOptions } from "./app-Bbxrehjf.js";
2
+ import { i as defineJuniorPlugins, n as JuniorPluginSet, r as JuniorPluginSetOptions, t as JuniorPluginInput } from "./plugins-B_0Cr0MO.js";
3
+ import { t as JUNIOR_VERSION } from "./version-Cc2OFd9G.js";
4
4
  export { JUNIOR_VERSION, JuniorAppOptions, type JuniorDashboardOptions, type JuniorPluginInput, type JuniorPluginSet, type JuniorPluginSetOptions, type ModelProfileInput, createApp, defineJuniorPlugins };