@sentry/junior 0.234.0 → 0.236.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.
- package/dist/{agent-hooks-BcH6E48y.js → agent-hooks-Da_H0jHv.js} +17 -10
- package/dist/{agent-runner-DUkGlK89.js → agent-runner-uP7QRc4c.js} +484 -162
- package/dist/api/schema.d.ts +288 -2
- package/dist/api/schema.js +5 -4
- package/dist/api.d.ts +8 -2
- package/dist/api.js +524 -83
- package/dist/{app-xk2-Id1T.d.ts → app-MEd7wbF0.d.ts} +83 -49
- package/dist/app.d.ts +3 -3
- package/dist/app.js +164 -119
- package/dist/{types-Du-HbEun.js → automation-B9Kc1gcf.js} +304 -33
- package/dist/{briefs-lyAQbDxJ.js → briefs-DrjBPQFy.js} +4 -4
- package/dist/{catalog-runtime-BSgsPVnr.js → catalog-runtime-C7339Cfm.js} +1 -1
- package/dist/{checkpoint-BNfXlq_1.js → checkpoint-DaD7_Gsb.js} +16 -9
- package/dist/cli/chat.d.ts +1 -1
- package/dist/cli/chat.js +14 -14
- package/dist/cli/check.js +4 -4
- package/dist/cli/main.js +1 -1
- package/dist/cli/plugins.d.ts +1 -1
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +3 -3
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +5 -5
- package/dist/{client-BX5lJRqW.js → client-Ch9Hg9NU.js} +2 -2
- package/dist/{config-DuCzUoCo.js → config-JR9wke1W.js} +57 -17
- package/dist/{conversation-CPjHYOV5.js → conversation-9Fxa1Zbq.js} +14 -1
- package/dist/{conversation-privacy-CSxvdSoV.js → conversation-privacy-au02dyZK.js} +1 -1
- package/dist/{credential-sync-BO4DfH9a.js → credential-sync-BWTA3LnL.js} +14 -14
- package/dist/{executor--jWf-Nnm.js → executor-BW9XWgUQ.js} +70 -6
- package/dist/{images-BaL19wFC.js → images-BdG7zcNf.js} +3 -3
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-cwHVOwVZ.js → job-queue-BqXd0ZPV.js} +1 -1
- package/dist/{logging-Cox1Mgcv.js → logging-B4sKwmCG.js} +1 -1
- package/dist/nitro.d.ts +2 -2
- package/dist/nitro.js +5 -5
- package/dist/{oauth-authorization-CC8a1JKP.js → oauth-authorization-BjRN99dc.js} +1 -1
- package/dist/{oauth-callback-server-Z7QSt416.js → oauth-callback-server-B_1p98Mb.js} +2 -2
- package/dist/{pending-auth-DQhC3eSR.js → pending-auth-WqF4Gh8Z.js} +1 -1
- package/dist/{plugins-BT2l4We3.d.ts → plugins-CjfUP5gJ.d.ts} +1 -0
- package/dist/{profile-BdApelHS.js → profile-BamYnmhO.js} +4 -4
- package/dist/{prompt-3D0sSbTC.js → prompt-Ctwy6hSI.js} +1 -1
- package/dist/queue-B5SnqRln.d.ts +25 -0
- package/dist/{registry-DiY6B8CN.js → registry-CXNv9fDX.js} +38 -2
- package/dist/{resolve-VpJoiDpc.js → resolve-C9ETkt4T.js} +2 -2
- package/dist/{runner-BIMegnPE.js → runner-DnBGVRnW.js} +9 -9
- package/dist/{sandbox-egress-signals-Cbtxe492.js → sandbox-egress-signals-DwJ7Boi_.js} +1 -1
- package/dist/{schema-CxwnlTDN.js → schema-CJiqDc5r.js} +26 -3
- package/dist/{skills-WttpPJUy.js → skills-Dd8O9Aav.js} +3 -3
- package/dist/{spawn-DhfMKt4y.js → spawn-DFdRspSD.js} +2 -2
- package/dist/{task-queue-CZqUNJD0.js → task-queue-DGQEOk1A.js} +16 -10
- package/dist/{task-runner-BZaqoUCT.js → task-runner-C5XCIDSF.js} +9 -9
- package/dist/{thread-state-8tXZhu0y.js → thread-state-D3E29wZk.js} +5 -5
- package/dist/{turn-failure-response-DFJ9L9NQ.js → turn-failure-response-TDoj0aZz.js} +8 -8
- package/dist/{turn-lifecycle-WbpTUQ_r.js → turn-lifecycle-DOnU45p7.js} +1 -1
- package/dist/{turn-session-routing--EhI76rH.js → turn-session-routing-DbpZZoin.js} +1 -1
- package/dist/{validation-0F9IgG3b.js → validation-B9lMbisx.js} +1 -1
- package/dist/{version-A7-RRBOE.js → version-CWkIGcLU.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{web-authorization-BJggXofy.js → web-authorization-PPaoj2ns.js} +6 -6
- package/dist/{web-input-B-siN5Dr.js → web-input-CfNxXtHm.js} +86 -34
- package/dist/web-message-id-xPI_EFSC.js +239 -0
- package/dist/{work-CNc0ejGG.js → work-DNaoFrEe.js} +7 -7
- package/dist/{worker-BHbqpUAu.js → worker-xeJLxYwm.js} +5 -5
- package/migrations/0045_conversation_forks.sql +3 -0
- package/migrations/0046_automation_versions.sql +71 -0
- package/migrations/meta/0045_snapshot.json +3503 -0
- package/migrations/meta/0046_snapshot.json +3707 -0
- package/migrations/meta/_journal.json +15 -1
- package/package.json +5 -5
- package/dist/web-message-id-CVVCTWUb.js +0 -464
- package/dist/{package-discovery-7a9YqLhE.js → package-discovery-BVvSnQBB.js} +1 -1
- package/dist/{plugin-module-BKGOXca2.js → plugin-module-CVvEUSMH.js} +1 -1
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
import { n as ConversationWorkQueue, t as ConversationQueueMessage } from "./queue-B5SnqRln.js";
|
|
1
2
|
import { t as ConversationStore } from "./store-DoewL5mG.js";
|
|
2
3
|
import "./history-DvqWZlYX.js";
|
|
3
|
-
import { n as JuniorPluginSet } from "./plugins-
|
|
4
|
+
import { n as JuniorPluginSet } from "./plugins-CjfUP5gJ.js";
|
|
4
5
|
import { Hono } from "hono";
|
|
5
6
|
import "@earendil-works/pi-ai/compat";
|
|
6
7
|
import "@earendil-works/pi-ai/api/anthropic-messages";
|
|
7
8
|
import { z } from "zod";
|
|
8
|
-
import { Destination, OwnedObjectAnnotation, Source, User } from "@sentry/junior-plugin-api";
|
|
9
|
+
import { Destination, OwnedObjectAnnotation, PluginRegistration, Source, User } from "@sentry/junior-plugin-api";
|
|
9
10
|
import "@earendil-works/pi-agent-core";
|
|
10
11
|
import "@earendil-works/pi-ai";
|
|
11
12
|
import { Sandbox } from "@vercel/sandbox";
|
|
12
13
|
import { Client } from "@modelcontextprotocol/sdk/client";
|
|
13
14
|
import "@modelcontextprotocol/sdk/client/auth.js";
|
|
15
|
+
import "@sinclair/typebox";
|
|
14
16
|
import { Message, StateAdapter } from "chat";
|
|
15
17
|
import "@chat-adapter/slack";
|
|
16
18
|
//#region src/chat/reasoning-level.d.ts
|
|
@@ -47,6 +49,20 @@ interface BotModelConfig {
|
|
|
47
49
|
/** Model used for web search. */
|
|
48
50
|
webSearchModelId?: string;
|
|
49
51
|
}
|
|
52
|
+
type CrossActorMidRunMode = "follow_up" | "steer";
|
|
53
|
+
/** Limits a host can set with `createApp({ limits })`. */
|
|
54
|
+
interface RuntimeLimits {
|
|
55
|
+
/** Largest model context window used for compaction, in tokens. */
|
|
56
|
+
contextWindowTokens?: number;
|
|
57
|
+
/** Automated turns in a row before Junior stops answering automation. */
|
|
58
|
+
maxConsecutiveAutomatedTurns?: number;
|
|
59
|
+
/** Run slices one turn may use. */
|
|
60
|
+
maxSlicesPerTurn?: number;
|
|
61
|
+
/** Tool calls one turn may make. */
|
|
62
|
+
maxToolCallsPerTurn?: number;
|
|
63
|
+
/** Agent turn deadline in ms. The function duration still caps it. */
|
|
64
|
+
turnTimeoutMs?: number;
|
|
65
|
+
}
|
|
50
66
|
//#endregion
|
|
51
67
|
//#region src/chat/experimental.d.ts
|
|
52
68
|
/**
|
|
@@ -54,7 +70,7 @@ interface BotModelConfig {
|
|
|
54
70
|
* Add new keys here as features graduate from private experiments; remove them
|
|
55
71
|
* once they become stable defaults.
|
|
56
72
|
*/
|
|
57
|
-
declare const EXPERIMENTAL_FEATURES: readonly ["passive-routing", "subagents"];
|
|
73
|
+
declare const EXPERIMENTAL_FEATURES: readonly ["operator-tools", "passive-routing", "subagents"];
|
|
58
74
|
/** One known experimental feature name. */
|
|
59
75
|
type ExperimentalFeature = (typeof EXPERIMENTAL_FEATURES)[number];
|
|
60
76
|
/** App-level opt-ins for unstable product features. */
|
|
@@ -65,28 +81,16 @@ interface SandboxResourceConfig {
|
|
|
65
81
|
vcpus?: number;
|
|
66
82
|
}
|
|
67
83
|
//#endregion
|
|
68
|
-
//#region src/chat/task-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
84
|
+
//#region src/chat/plugins/task-queue.d.ts
|
|
85
|
+
declare const pluginTaskQueueMessageSchema: z.ZodObject<{
|
|
86
|
+
name: z.ZodString;
|
|
87
|
+
params: z.ZodObject<{
|
|
88
|
+
conversationId: z.ZodString;
|
|
89
|
+
sessionId: z.ZodString;
|
|
90
|
+
}, z.core.$strict>;
|
|
91
|
+
plugin: z.ZodString;
|
|
73
92
|
}, z.core.$strict>;
|
|
74
|
-
|
|
75
|
-
type ConversationQueueMessage = z.output<typeof conversationQueueMessageSchema>;
|
|
76
|
-
interface ConversationQueueSendOptions {
|
|
77
|
-
delayMs?: number;
|
|
78
|
-
idempotencyKey?: string;
|
|
79
|
-
}
|
|
80
|
-
interface ConversationQueueSendResult {
|
|
81
|
-
messageId?: string;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* External transport for wake-up hints. Durable work stays in the mailbox;
|
|
85
|
-
* transports only need to accept one hint and may return a provider message id.
|
|
86
|
-
*/
|
|
87
|
-
interface ConversationWorkQueue {
|
|
88
|
-
send(message: ConversationQueueMessage, options?: ConversationQueueSendOptions): Promise<ConversationQueueSendResult | void>;
|
|
89
|
-
}
|
|
93
|
+
type PluginTaskQueueMessage = z.output<typeof pluginTaskQueueMessageSchema>;
|
|
90
94
|
//#endregion
|
|
91
95
|
//#region src/chat/task-execution/state.d.ts
|
|
92
96
|
/** Canonical durable mailbox entry owned by task execution. */
|
|
@@ -164,6 +168,8 @@ interface ProcessConversationQueueMessageOptions {
|
|
|
164
168
|
run(context: ConversationWorkerContext): Promise<ConversationWorkerResult>;
|
|
165
169
|
softYieldAfterMs?: number;
|
|
166
170
|
state?: StateAdapter;
|
|
171
|
+
/** Keep background work started by a turn, such as titles, alive. */
|
|
172
|
+
waitUntil?: (task: Promise<unknown>) => void;
|
|
167
173
|
}
|
|
168
174
|
interface VercelConversationWorkCallbackOptions extends ProcessConversationQueueMessageOptions {
|
|
169
175
|
topic?: string;
|
|
@@ -177,6 +183,32 @@ type ConversationWorkCallbackOptions = VercelConversationWorkCallbackOptions;
|
|
|
177
183
|
/** Callback to schedule background work that must finish before the function exits. */
|
|
178
184
|
type WaitUntilFn = (task: Promise<unknown> | (() => Promise<unknown>)) => void;
|
|
179
185
|
//#endregion
|
|
186
|
+
//#region src/dashboard-routes.d.ts
|
|
187
|
+
interface JuniorDashboardOptions {
|
|
188
|
+
/** Browser auth route prefix used by Better Auth. */
|
|
189
|
+
authPath?: string;
|
|
190
|
+
/** Require a dashboard browser session before serving dashboard pages and APIs. */
|
|
191
|
+
authRequired?: boolean;
|
|
192
|
+
/** Exact Google account emails allowed to open the dashboard. */
|
|
193
|
+
allowedEmails?: string[];
|
|
194
|
+
/** Google Workspace domains allowed to open the dashboard. */
|
|
195
|
+
allowedGoogleDomains?: string[];
|
|
196
|
+
/** Browser route prefix for the dashboard shell. */
|
|
197
|
+
basePath?: string;
|
|
198
|
+
/** Public deployment origin used for auth callbacks and external links. */
|
|
199
|
+
baseURL?: string;
|
|
200
|
+
/** Expose the config-gated component gallery for local visual QA. */
|
|
201
|
+
componentGallery?: boolean;
|
|
202
|
+
/** Disable dashboard route mounting while preserving serializable config shape. */
|
|
203
|
+
disabled?: boolean;
|
|
204
|
+
/** Replace Conversation route responses with dashboard visual-QA fixtures. */
|
|
205
|
+
mockConversations?: boolean;
|
|
206
|
+
/** Browser session lifetime in seconds. */
|
|
207
|
+
sessionMaxAgeSeconds?: number;
|
|
208
|
+
/** Additional trusted origins accepted by Better Auth. */
|
|
209
|
+
trustedOrigins?: string[];
|
|
210
|
+
}
|
|
211
|
+
//#endregion
|
|
180
212
|
//#region src/app.d.ts
|
|
181
213
|
interface JuniorAppOptions extends BotModelConfig {
|
|
182
214
|
/**
|
|
@@ -202,17 +234,43 @@ interface JuniorAppOptions extends BotModelConfig {
|
|
|
202
234
|
* `modelId` and optional `description` and `reasoningLevel` settings.
|
|
203
235
|
*/
|
|
204
236
|
profiles?: Readonly<Record<string, ModelProfileInput>>;
|
|
237
|
+
/** Turn and conversation limits. Unset limits keep their defaults. */
|
|
238
|
+
limits?: RuntimeLimits;
|
|
205
239
|
/** Slack-specific overrides applied after env parsing. */
|
|
206
240
|
slack?: {
|
|
207
241
|
/** Slack emoji shown while Junior is processing. Defaults to `eyes`. */
|
|
208
242
|
processingReactionEmoji?: string;
|
|
209
243
|
/** Slack emoji shown after a turn completes. Defaults to `white_check_mark`. */
|
|
210
244
|
completedReactionEmoji?: string;
|
|
245
|
+
/**
|
|
246
|
+
* What a mention from another person does while a turn runs: `follow_up`
|
|
247
|
+
* waits for its own turn, `steer` joins the running turn. Defaults to
|
|
248
|
+
* `JUNIOR_CROSS_ACTOR_MID_RUN_MODE` or `follow_up`.
|
|
249
|
+
*/
|
|
250
|
+
crossActorMidRunMode?: CrossActorMidRunMode;
|
|
211
251
|
};
|
|
212
252
|
/** Install-wide provider defaults. Unregistered `provider.key` entries warn at startup. */
|
|
213
253
|
configDefaults?: Record<string, unknown>;
|
|
214
254
|
/** Queue consumer wiring for the durable conversation worker. */
|
|
215
255
|
conversationWork?: ConversationWorkCallbackOptions;
|
|
256
|
+
/**
|
|
257
|
+
* Replace the Vercel Queue transport for conversation work, for example
|
|
258
|
+
* with an in-process queue. `consume` runs one message through this app's
|
|
259
|
+
* worker. Every app route and worker sends to the returned queue.
|
|
260
|
+
*/
|
|
261
|
+
conversationWorkQueue?: (consume: (message: ConversationQueueMessage, delivery: {
|
|
262
|
+
messageId: string;
|
|
263
|
+
}) => Promise<void>) => ConversationWorkQueue;
|
|
264
|
+
/**
|
|
265
|
+
* Replace the Vercel Queue transport for plugin tasks, for example with an
|
|
266
|
+
* in-process queue. `consume` runs one task through this app's task runner.
|
|
267
|
+
* Completed Slack turns send their plugin tasks to the returned queue.
|
|
268
|
+
* Mailbox turns, such as web turns, run their plugin tasks in the worker
|
|
269
|
+
* and do not use this queue.
|
|
270
|
+
*/
|
|
271
|
+
pluginTaskQueue?: (consume: (message: PluginTaskQueueMessage) => Promise<void>) => {
|
|
272
|
+
send(message: PluginTaskQueueMessage): Promise<void>;
|
|
273
|
+
};
|
|
216
274
|
/** Direct plugin set override. Usually omitted when `juniorNitro()` uses a plugin module. */
|
|
217
275
|
plugins?: JuniorPluginSet;
|
|
218
276
|
/** Sandbox execution options. */
|
|
@@ -226,31 +284,7 @@ interface JuniorAppOptions extends BotModelConfig {
|
|
|
226
284
|
};
|
|
227
285
|
waitUntil?: WaitUntilFn;
|
|
228
286
|
}
|
|
229
|
-
interface JuniorDashboardOptions {
|
|
230
|
-
/** Browser auth route prefix used by Better Auth. */
|
|
231
|
-
authPath?: string;
|
|
232
|
-
/** Require a dashboard browser session before serving dashboard pages and APIs. */
|
|
233
|
-
authRequired?: boolean;
|
|
234
|
-
/** Exact Google account emails allowed to open the dashboard. */
|
|
235
|
-
allowedEmails?: string[];
|
|
236
|
-
/** Google Workspace domains allowed to open the dashboard. */
|
|
237
|
-
allowedGoogleDomains?: string[];
|
|
238
|
-
/** Browser route prefix for the dashboard shell. */
|
|
239
|
-
basePath?: string;
|
|
240
|
-
/** Public deployment origin used for auth callbacks and external links. */
|
|
241
|
-
baseURL?: string;
|
|
242
|
-
/** Expose the config-gated component gallery for local visual QA. */
|
|
243
|
-
componentGallery?: boolean;
|
|
244
|
-
/** Disable dashboard route mounting while preserving serializable config shape. */
|
|
245
|
-
disabled?: boolean;
|
|
246
|
-
/** Replace Conversation route responses with dashboard visual-QA fixtures. */
|
|
247
|
-
mockConversations?: boolean;
|
|
248
|
-
/** Browser session lifetime in seconds. */
|
|
249
|
-
sessionMaxAgeSeconds?: number;
|
|
250
|
-
/** Additional trusted origins accepted by Better Auth. */
|
|
251
|
-
trustedOrigins?: string[];
|
|
252
|
-
}
|
|
253
287
|
/** Create a Hono app with all Junior routes. */
|
|
254
288
|
declare function createApp(options?: JuniorAppOptions): Promise<Hono>;
|
|
255
289
|
//#endregion
|
|
256
|
-
export { ModelProfileInput as i,
|
|
290
|
+
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
|
|
2
|
-
import { i as defineJuniorPlugins, n as JuniorPluginSet, r as JuniorPluginSetOptions, t as JuniorPluginInput } from "./plugins-
|
|
1
|
+
import { i as ModelProfileInput, n as createApp, r as JuniorDashboardOptions, t as JuniorAppOptions } from "./app-MEd7wbF0.js";
|
|
2
|
+
import { i as defineJuniorPlugins, n as JuniorPluginSet, r as JuniorPluginSetOptions, t as JuniorPluginInput } from "./plugins-CjfUP5gJ.js";
|
|
3
3
|
import { t as JUNIOR_VERSION } from "./version-CnXZ614E.js";
|
|
4
|
-
export { JUNIOR_VERSION, JuniorAppOptions, JuniorDashboardOptions, type JuniorPluginInput, type JuniorPluginSet, type JuniorPluginSetOptions, type ModelProfileInput, createApp, defineJuniorPlugins };
|
|
4
|
+
export { JUNIOR_VERSION, JuniorAppOptions, type JuniorDashboardOptions, type JuniorPluginInput, type JuniorPluginSet, type JuniorPluginSetOptions, type ModelProfileInput, createApp, defineJuniorPlugins };
|