@sentry/junior 0.257.0 → 0.258.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 (101) hide show
  1. package/dist/{actor-BTtLaeWy.js → actor-tlxzqaRe.js} +3 -6
  2. package/dist/{admin-DgIkm6Vy.js → admin-My1SLGVO.js} +2 -3
  3. package/dist/{agent-hooks-BjtTzvru.js → agent-hooks-BJ_5mlRH.js} +69 -109
  4. package/dist/{agent-invocations-Bdu3ROfo.js → agent-invocations-Qfz7dWgU.js} +6 -12
  5. package/dist/{agent-runner-D7OboVb3.js → agent-runner-DGsFQw72.js} +261 -458
  6. package/dist/api/schema.d.ts +414 -448
  7. package/dist/api/schema.js +5 -5
  8. package/dist/api.d.ts +2 -12
  9. package/dist/api.js +94 -158
  10. package/dist/{app-BsU5QNBd.d.ts → app-PX2H1PxU.d.ts} +21 -44
  11. package/dist/app.d.ts +3 -3
  12. package/dist/app.js +204 -321
  13. package/dist/{assistant-reply-CbTPebzL.js → assistant-reply-H1M-91oF.js} +3 -5
  14. package/dist/{automation-CHdlHVZP.js → automation-DWBFBenG.js} +6 -11
  15. package/dist/{briefs-oLOldnDM.js → briefs-vYoK85rJ.js} +8 -11
  16. package/dist/{cadence-D00SCzT1.js → cadence-R7Em4RjE.js} +1 -2
  17. package/dist/{catalog-runtime-CZzhGQ7F.js → catalog-runtime-BN4DVxco.js} +3 -4
  18. package/dist/cli/chat.d.ts +2 -4
  19. package/dist/cli/chat.js +22 -24
  20. package/dist/cli/check.d.ts +1 -3
  21. package/dist/cli/check.js +4 -5
  22. package/dist/cli/env.d.ts +1 -3
  23. package/dist/cli/env.js +1 -2
  24. package/dist/cli/init.d.ts +1 -3
  25. package/dist/cli/init.js +3 -3
  26. package/dist/cli/main.d.ts +1 -3
  27. package/dist/cli/main.js +4 -5
  28. package/dist/cli/plugins.d.ts +2 -4
  29. package/dist/cli/plugins.js +7 -8
  30. package/dist/cli/run.d.ts +1 -2
  31. package/dist/cli/run.js +1 -2
  32. package/dist/cli/snapshot-create.d.ts +1 -3
  33. package/dist/cli/snapshot-create.js +4 -5
  34. package/dist/cli/upgrade.d.ts +3 -6
  35. package/dist/cli/upgrade.js +11 -17
  36. package/dist/{client-D8HnkOQX.js → client-DbyHuMFU.js} +9 -16
  37. package/dist/{config-CJRnWK9H.js → config-_WO_AjCB.js} +18 -15
  38. package/dist/{connections-ClYrKzpX.js → connections-ag_1JOhB.js} +14 -19
  39. package/dist/{conversation-CKNLYBJt.js → conversation-DjN3mlog.js} +8 -15
  40. package/dist/{conversation-privacy-C8b1nphZ.js → conversation-privacy-DHP_xnVj.js} +2 -3
  41. package/dist/{conversation-work-C6y3T5Hx.js → conversation-work-BaT_T6EB.js} +1 -2
  42. package/dist/{credential-sync-BXfohNmJ.js → credential-sync-B-CPX_ag.js} +23 -28
  43. package/dist/{db-Ca9Nt5ci.d.ts → db-BnRqQ7G5.d.ts} +1 -1
  44. package/dist/{executor-Do0THDRR.js → executor-RvG6kVe1.js} +30 -52
  45. package/dist/{experimental-CQIvMUO7.js → experimental-BNK1l1jv.js} +2 -4
  46. package/dist/{history-9pO1Zd4Y.js → history-AY8rs-FR.js} +5 -9
  47. package/dist/{history-DvqWZlYX.d.ts → history-BgI33Kie.d.ts} +12 -20
  48. package/dist/{images-BN_BiBXF.js → images-C2J_bj2g.js} +5 -6
  49. package/dist/instrumentation.d.ts +1 -3
  50. package/dist/instrumentation.js +6 -8
  51. package/dist/{job-queue-B6SV9uVa.js → job-queue-DVe37it2.js} +6 -12
  52. package/dist/{logging-CWxiIuCF.js → logging-DsHONhVm.js} +7 -12
  53. package/dist/{message-TUOdbSBW.js → message-DyitL8no.js} +5 -6
  54. package/dist/{model-profile-BwU8mqwD.js → model-profile-Bg8EoCKD.js} +2 -4
  55. package/dist/nitro.d.ts +3 -5
  56. package/dist/nitro.js +12 -17
  57. package/dist/{oauth-authorization-BA4Dt6a7.js → oauth-authorization-djQn5Nhy.js} +2 -4
  58. package/dist/{oauth-callback-server-Dj5UJODo.js → oauth-callback-server-CDby-pCn.js} +3 -4
  59. package/dist/{oauth-relay-CdCnu80W.js → oauth-relay-CTygMkNx.js} +2 -3
  60. package/dist/{package-discovery-BVvSnQBB.js → package-discovery-DJBompdd.js} +17 -21
  61. package/dist/{pending-auth-s_QFribU.js → pending-auth-D8J1uJUS.js} +37 -28
  62. package/dist/{plugin-module-CVvEUSMH.js → plugin-module-Cf5gVPWP.js} +1 -2
  63. package/dist/{plugins-CjfUP5gJ.d.ts → plugins-B11Mfkmv.d.ts} +0 -4
  64. package/dist/{plugins-egKWjgue.js → plugins-DOm9Y6qI.js} +2 -3
  65. package/dist/{private-trace-result-BLvBjy_e.js → private-trace-result-CE7_lEdq.js} +1 -2
  66. package/dist/{profile-h-72wM78.js → profile-DpYjfKke.js} +16 -28
  67. package/dist/{prompt-DyoEj9c2.js → prompt-xgpyMtg7.js} +5 -9
  68. package/dist/{queue-B5SnqRln.d.ts → queue-C37RbDVc.d.ts} +0 -2
  69. package/dist/{registry-sLTr-sV9.js → registry-Du566MtJ.js} +16 -29
  70. package/dist/{resolve-ncQPZROQ.js → resolve-ClCIgh8E.js} +7 -12
  71. package/dist/{result-C883vngT.js → result-BBbKA61B.js} +13 -17
  72. package/dist/{rolldown-runtime-B4FMCO8f.js → rolldown-runtime-nwUcYXjP.js} +1 -2
  73. package/dist/{runner-CzYImdOF.js → runner-CCuqFSqx.js} +12 -13
  74. package/dist/{sandbox-egress-signals-CZbMINHI.js → sandbox-egress-signals-DY1mbKF4.js} +2 -3
  75. package/dist/{schema-Dy69D4Ge.js → schema-DrMh3NtR.js} +15 -26
  76. package/dist/{sentry-CgWZM_kV.js → sentry-BBUlHih9.js} +2 -3
  77. package/dist/{session-stop-CQjKd4a2.js → session-stop-CIoFiwwe.js} +23 -33
  78. package/dist/{skills-C22SLruK.js → skills-DyQBLIrK.js} +9 -9
  79. package/dist/{spawn-DY9CLXDL.js → spawn-Dqfeo7XP.js} +4 -5
  80. package/dist/{store-DoewL5mG.d.ts → store-CG0VJyye.d.ts} +0 -14
  81. package/dist/{store-DXFIQy-G.js → store-DJLwq4x8.js} +13 -15
  82. package/dist/{task-queue-B17vV0La.js → task-queue-BzW4MaWU.js} +5 -7
  83. package/dist/{task-runner-DUjvzYXj.js → task-runner-D3qJh4fK.js} +22 -26
  84. package/dist/{tasks-D_WIJtvO.js → tasks-CEXKTASS.js} +62 -78
  85. package/dist/{thread-state-Ch4yuCqG.js → thread-state-W3f6kAtz.js} +13 -19
  86. package/dist/{turn-failure-response-C5nBKC4S.js → turn-failure-response-CWx7aNIh.js} +16 -22
  87. package/dist/{turn-lifecycle-CO-ylUmV.js → turn-lifecycle-C9JFst7-.js} +2 -3
  88. package/dist/{turn-session-routing-B3LWooK5.js → turn-session-routing-CUxtfpr7.js} +2 -3
  89. package/dist/{validation-CXYxaNYx.js → validation-BHRxa5G4.js} +3 -4
  90. package/dist/vercel.d.ts +1 -3
  91. package/dist/vercel.js +1 -2
  92. package/dist/{version-BcdZy2zg.js → version-C0U6rHg0.js} +3 -5
  93. package/dist/{version-CnXZ614E.d.ts → version-Cc2OFd9G.d.ts} +0 -2
  94. package/dist/version.d.ts +1 -1
  95. package/dist/version.js +1 -2
  96. package/dist/{viewer-DSZXygMU.js → viewer-CGvvRqKp.js} +26 -57
  97. package/dist/{web-input-B9Bv0_lR.js → web-input-Keb5GRWj.js} +98 -155
  98. package/dist/{web-message-id-xPI_EFSC.js → web-message-id-CJSUiksE.js} +3 -6
  99. package/dist/{work-nAfDSUFP.js → work-DRcsJ3hV.js} +14 -16
  100. package/dist/{worker-vGXZ6XFT.js → worker-Cjo-QqPq.js} +7 -8
  101. package/package.json +7 -6
@@ -1,7 +1,7 @@
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-B11Mfkmv.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";
@@ -15,11 +15,8 @@ import { Client } from "@modelcontextprotocol/sdk/client";
15
15
  import "@modelcontextprotocol/sdk/client/auth.js";
16
16
  import { Message, StateAdapter } from "chat";
17
17
  import "@chat-adapter/slack";
18
- //#region src/chat/reasoning-level.d.ts
19
18
  declare const TURN_REASONING_LEVELS: readonly ["none", "low", "medium", "high", "xhigh"];
20
19
  type TurnReasoningLevel = (typeof TURN_REASONING_LEVELS)[number];
21
- //#endregion
22
- //#region src/chat/model-profile.d.ts
23
20
  /** Runtime configuration for one named model profile. */
24
21
  interface ModelProfileConfig {
25
22
  /**
@@ -33,8 +30,6 @@ interface ModelProfileConfig {
33
30
  }
34
31
  /** App-level profile input: a model id string or a full profile config. */
35
32
  type ModelProfileInput = string | ModelProfileConfig;
36
- //#endregion
37
- //#region src/chat/config.d.ts
38
33
  interface BotModelConfig {
39
34
  /** Model used for embeddings. */
40
35
  embeddingModelId?: string;
@@ -61,8 +56,13 @@ interface RuntimeLimits {
61
56
  maxAgentDepth?: number;
62
57
  /** Automated turns in a row before Junior stops answering automation. */
63
58
  maxConsecutiveAutomatedTurns?: number;
64
- /** Runs one Event automation can start in a rolling hour. */
65
- maxEventAutomationRunsPerHour?: number;
59
+ /** Runs one Event automation can start in a rolling window. */
60
+ eventAutomationRunLimit?: {
61
+ /** Runs allowed in one window. The default is 10. */
62
+ maxRuns?: number;
63
+ /** Window length in ms. The default, 60000, is one minute. */
64
+ windowMs?: number;
65
+ };
66
66
  /** Run slices one turn may use. */
67
67
  maxSlicesPerTurn?: number;
68
68
  /** Tool calls one turn may make. */
@@ -72,25 +72,19 @@ interface RuntimeLimits {
72
72
  /** Agent turn deadline in ms. The function duration still caps it. */
73
73
  turnTimeoutMs?: number;
74
74
  }
75
- //#endregion
76
- //#region src/chat/experimental.d.ts
77
75
  /**
78
76
  * Known unstable product features that must be opted into explicitly.
79
77
  * Add new keys here as features graduate from private experiments; remove them
80
78
  * once they become stable defaults.
81
79
  */
82
- declare const EXPERIMENTAL_FEATURES: readonly ["operator-tools", "passive-routing", "slack-sign-in", "subagents"];
80
+ declare const EXPERIMENTAL_FEATURES: readonly ["operator-tools", "passive-routing", "subagents"];
83
81
  /** One known experimental feature name. */
84
82
  type ExperimentalFeature = (typeof EXPERIMENTAL_FEATURES)[number];
85
83
  /** App-level opt-ins for unstable product features. */
86
84
  type ExperimentalFeaturesConfig = Readonly<Partial<Record<ExperimentalFeature, boolean>>>;
87
- //#endregion
88
- //#region src/chat/sandbox/resources.d.ts
89
85
  interface SandboxResourceConfig {
90
86
  vcpus?: number;
91
87
  }
92
- //#endregion
93
- //#region src/chat/plugins/task-queue.d.ts
94
88
  declare const pluginTaskQueueMessageSchema: z.ZodObject<{
95
89
  name: z.ZodString;
96
90
  params: z.ZodObject<{
@@ -100,8 +94,6 @@ declare const pluginTaskQueueMessageSchema: z.ZodObject<{
100
94
  plugin: z.ZodString;
101
95
  }, z.core.$strict>;
102
96
  type PluginTaskQueueMessage = z.output<typeof pluginTaskQueueMessageSchema>;
103
- //#endregion
104
- //#region src/chat/task-execution/state.d.ts
105
97
  /** Canonical durable mailbox entry owned by task execution. */
106
98
  declare const inboundMessageSchema: z.ZodObject<{
107
99
  attemptCount: z.ZodOptional<z.ZodNumber>;
@@ -131,18 +123,16 @@ declare const inboundMessageSchema: z.ZodObject<{
131
123
  receivedAtMs: z.ZodNumber;
132
124
  source: z.ZodEnum<{
133
125
  api: "api";
126
+ event: "event";
134
127
  internal: "internal";
135
128
  local: "local";
136
129
  plugin: "plugin";
137
- event: "event";
138
130
  scheduler: "scheduler";
139
131
  slack: "slack";
140
132
  web: "web";
141
133
  }>;
142
134
  }, z.core.$strict>;
143
135
  type InboundMessage = z.output<typeof inboundMessageSchema>;
144
- //#endregion
145
- //#region src/chat/task-execution/worker.d.ts
146
136
  interface ConversationWorkerContext {
147
137
  attempt: InboxAttempt;
148
138
  checkIn(): Promise<boolean>;
@@ -174,8 +164,6 @@ interface ConversationWorkerResult {
174
164
  /** Wait before the next wake attempt. Only meaningful when `status` is `deferred`. */
175
165
  delayMs?: number;
176
166
  }
177
- //#endregion
178
- //#region src/chat/task-execution/vercel-callback.d.ts
179
167
  interface ProcessConversationQueueMessageOptions {
180
168
  checkInIntervalMs?: number;
181
169
  conversationStore?: ConversationStore;
@@ -191,24 +179,14 @@ interface VercelConversationWorkCallbackOptions extends ProcessConversationQueue
191
179
  topic?: string;
192
180
  visibilityTimeoutSeconds?: number;
193
181
  }
194
- //#endregion
195
- //#region src/chat/app/conversation-work.d.ts
196
182
  type ConversationWorkCallbackOptions = VercelConversationWorkCallbackOptions;
197
- //#endregion
198
- //#region src/handlers/types.d.ts
199
183
  /** Callback to schedule background work that must finish before the function exits. */
200
184
  type WaitUntilFn = (task: Promise<unknown> | (() => Promise<unknown>)) => void;
201
- //#endregion
202
- //#region src/dashboard-routes.d.ts
203
185
  interface JuniorDashboardOptions {
204
186
  /** Browser auth route prefix used by Better Auth. */
205
187
  authPath?: string;
206
188
  /** Require a dashboard browser session before serving dashboard pages and APIs. */
207
189
  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
190
  /** Browser route prefix for the dashboard shell. */
213
191
  basePath?: string;
214
192
  /** Public deployment origin used for auth callbacks and external links. */
@@ -224,8 +202,6 @@ interface JuniorDashboardOptions {
224
202
  /** Additional trusted origins accepted by Better Auth. */
225
203
  trustedOrigins?: string[];
226
204
  }
227
- //#endregion
228
- //#region src/app.d.ts
229
205
  interface JuniorAppOptions extends BotModelConfig {
230
206
  /**
231
207
  * Generate a durable Brief after each completed Turn. This costs one
@@ -234,6 +210,14 @@ interface JuniorAppOptions extends BotModelConfig {
234
210
  briefs?: {
235
211
  enabled?: boolean;
236
212
  };
213
+ /**
214
+ * Domains that may use Junior. Slack checks the email domain of the
215
+ * author's Slack profile. Dashboard Google sign-in checks the `hd` claim of
216
+ * the Google Workspace account. Defaults to `JUNIOR_ALLOWED_DOMAINS`.
217
+ * Recommended. Dashboard auth requires at least one. Empty lets every
218
+ * Slack workspace member use Junior.
219
+ */
220
+ allowedDomains?: string[];
237
221
  /** Authenticated dashboard mounted by core when configured. */
238
222
  dashboard?: JuniorDashboardOptions;
239
223
  /**
@@ -264,12 +248,6 @@ interface JuniorAppOptions extends BotModelConfig {
264
248
  * `JUNIOR_CROSS_ACTOR_MID_RUN_MODE` or `follow_up`.
265
249
  */
266
250
  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
251
  };
274
252
  /** Install-wide provider defaults. Unregistered `provider.key` entries warn at startup. */
275
253
  configDefaults?: Record<string, unknown>;
@@ -308,5 +286,4 @@ interface JuniorAppOptions extends BotModelConfig {
308
286
  }
309
287
  /** Create a Hono app with all Junior routes. */
310
288
  declare function createApp(options?: JuniorAppOptions): Promise<Hono>;
311
- //#endregion
312
289
  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-PX2H1PxU.js";
2
+ import { i as defineJuniorPlugins, n as JuniorPluginSet, r as JuniorPluginSetOptions, t as JuniorPluginInput } from "./plugins-B11Mfkmv.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 };