@sentry/junior 0.286.0 → 0.288.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 (78) hide show
  1. package/dist/{adapter-JQZaJ-B_.js → adapter-Cikcqdty.js} +1 -1
  2. package/dist/{admin-Dm2bimJ-.js → admin-BcSxHuTB.js} +2 -1
  3. package/dist/{agent-runner-DGCwOEyL.js → agent-runner-9MXyWUL8.js} +784 -368
  4. package/dist/api/schema.d.ts +2 -2
  5. package/dist/api/schema.js +9 -8
  6. package/dist/api.d.ts +1 -1
  7. package/dist/api.js +411 -65
  8. package/dist/{app-BKq0JzWx.d.ts → app-BUklJVBe.d.ts} +4 -2
  9. package/dist/app.d.ts +1 -1
  10. package/dist/app.js +555 -71
  11. package/dist/{assistant-reply-CAPafcUY.js → assistant-reply-mj47jMRV.js} +1 -1
  12. package/dist/{automation-B-jJN_gM.js → automation-DDXwHQs5.js} +4 -7
  13. package/dist/{background-compaction-queue-Btu2oab_.js → background-compaction-queue-CjllSPir.js} +161 -90
  14. package/dist/{briefs-UMeYehUe.js → briefs-DW9iuolG.js} +7 -5
  15. package/dist/{catalog-runtime-Bym8GVdh.js → catalog-runtime-B3gfH58M.js} +1 -1
  16. package/dist/cli/chat.js +14 -14
  17. package/dist/cli/check.js +3 -3
  18. package/dist/cli/main.js +3 -3
  19. package/dist/cli/plugins.js +4 -4
  20. package/dist/cli/snapshot-create.js +4 -4
  21. package/dist/cli/upgrade.d.ts +1 -1
  22. package/dist/cli/upgrade.js +3 -3
  23. package/dist/config-CLJcyYEF.js +1762 -0
  24. package/dist/{connections-CQ7p0aNJ.js → connections-BtdJftow.js} +9 -9
  25. package/dist/{conversation-BusI2uzj.js → conversation-DhoqHtQ7.js} +30 -6
  26. package/dist/{conversation-pending-messages-DwehU0Fd.js → conversation-pending-messages-DHV0S4uF.js} +2 -5
  27. package/dist/{conversation-privacy-Cd_nZZBM.js → conversation-privacy-BPirIVlX.js} +1 -1
  28. package/dist/core-model-BTt5E5b0.js +182 -0
  29. package/dist/{credential-sync-DmiJi_At.js → credential-sync-Co8Q2xRW.js} +28 -20
  30. package/dist/{viewer-CH-ASQzh.js → db-Co7DTYYh.js} +62 -358
  31. package/dist/{db-C5zi4ecs.d.ts → db-zIs8-Ba3.d.ts} +6 -2
  32. package/dist/{executor-Dipi2Ixl.js → executor-m0kIN71Q.js} +102 -14
  33. package/dist/{media-B-BpXo41.js → history-IjdmO_r6.js} +8 -88
  34. package/dist/instrumentation.js +2 -2
  35. package/dist/{logging-CMFhLLj4.js → logging-DbD-dErY.js} +3 -2
  36. package/dist/media-BAHvgkok.js +85 -0
  37. package/dist/{message-D1xLljUF.js → message-DKTdTYm-.js} +10 -10
  38. package/dist/nitro.d.ts +1 -1
  39. package/dist/nitro.js +19 -41
  40. package/dist/{oauth-callback-server-DCAFIUQr.js → oauth-callback-server-CpbepSbp.js} +2 -2
  41. package/dist/{projection-CoeMNxJ4.js → projection-BViECfYu.js} +361 -746
  42. package/dist/{prompt-C9OQEfan.js → prompt-KT6MaDHN.js} +1 -1
  43. package/dist/{registry-u-sFYtx_.js → registry-D-Acyjhh.js} +1 -1
  44. package/dist/{reporting-window-B4TwyuJo.js → reporting-window-B3Ze-Qnt.js} +4 -1
  45. package/dist/{resolve-DYqgL3Eo.js → resolve-gkT2R66z.js} +3 -3
  46. package/dist/{result-CescSwAw.js → result-DHmCFEt8.js} +8 -8
  47. package/dist/{runner-Cr67a8TB.js → runner-DBKjGjH-.js} +8 -8
  48. package/dist/{sandbox-egress-signals-DLOazy5W.js → sandbox-egress-signals-9n8hqx29.js} +1 -1
  49. package/dist/{schedule-BTp__wrw.js → schedule-cP0AACm1.js} +11 -2
  50. package/dist/{schema-Ih60j59-.d.ts → schema-B_6aOcx5.d.ts} +159 -3
  51. package/dist/{schema-BUSi3sgv.js → schema-DxicIQbc.js} +79 -14
  52. package/dist/{service-account-CsKxktLk.js → service-account-Bi0HsY6w.js} +3 -3
  53. package/dist/{service-account-CGEqz9wG.js → service-account-CDlC9ssy.js} +3 -3
  54. package/dist/{session-stop-CGz5DByb.js → session-stop-BWOsuo8p.js} +62 -20
  55. package/dist/{skills-COCqf61f.js → skills-DO5K68Rq.js} +2 -2
  56. package/dist/spawn-BBqZDcPa.js +79 -0
  57. package/dist/{stop-GyFZkHuQ.js → stop-WC97cmHz.js} +832 -552
  58. package/dist/{store-D0-8plWp.js → store-ByR1Lr7e.js} +4 -16
  59. package/dist/{task-runner-xPuQmEot.js → task-runner-B-Ewf8TX.js} +30 -21
  60. package/dist/{turn-failure-response-BOviBdT-.js → turn-failure-response-CpdPoZSl.js} +25 -11
  61. package/dist/{validation-DZDKorGz.js → validation-B4sbIoES.js} +1 -1
  62. package/dist/{version-BTIz7fGi.js → version-D6lpuAgL.js} +1 -1
  63. package/dist/version.js +1 -1
  64. package/dist/viewer-CeP27tC3.js +337 -0
  65. package/dist/warmup-P_GJCL1c.js +767 -0
  66. package/dist/{work-C75_IM5e.js → work-DI7x1Slm.js} +32 -20
  67. package/dist/{worker-Dl47I729.js → worker-CYPTOT4j.js} +6 -7
  68. package/migrations/0088_conversation_unsubscribe.sql +1 -0
  69. package/migrations/0089_conversation_paused_status.sql +3 -0
  70. package/migrations/0090_guardian_review_time_index.sql +20 -0
  71. package/migrations/meta/0088_snapshot.json +4372 -0
  72. package/migrations/meta/0089_snapshot.json +4372 -0
  73. package/migrations/meta/0090_snapshot.json +4388 -0
  74. package/migrations/meta/_journal.json +21 -0
  75. package/package.json +5 -4
  76. package/dist/client-B0aAs7wC.js +0 -793
  77. package/dist/config-B9f9Lqo5.js +0 -579
  78. package/dist/spawn-C8F_iXWO.js +0 -42
@@ -1,4 +1,4 @@
1
- import { Xt as extractAssistantText } from "./projection-CoeMNxJ4.js";
1
+ import { en as extractAssistantText } from "./projection-BViECfYu.js";
2
2
  // src/chat/no-reply.ts
3
3
  const NO_REPLY_MARKER = "[[NO_REPLY]]";
4
4
  /**
@@ -1,5 +1,5 @@
1
- import { c as resolveLocalScheduleAtMs, i as getFirstRunAtMs, o as getZonedDateTimeParts, s as isValidTimeZone } from "./schedule-BTp__wrw.js";
2
- import { i as actorIdentitySchema } from "./conversation-BusI2uzj.js";
1
+ import { c as resolveLocalScheduleAtMs, i as getFirstRunAtMs, o as getZonedDateTimeParts, s as isValidTimeZone } from "./schedule-cP0AACm1.js";
2
+ import { i as actorIdentitySchema } from "./conversation-DhoqHtQ7.js";
3
3
  import * as z from "zod";
4
4
  import { actorUserIdSchema, destinationVisibilitySchema, eventMatchFieldsSchema, eventMatchSchema, eventReachSchema, eventTypeSchema, pluginEventTypeSchema, slackDestinationSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
5
5
  // src/chat/scheduled-automations/schedule-intent.ts
@@ -403,10 +403,7 @@ const automationEditFieldsSchema = z.object({
403
403
  credentialMode: z.enum(["system", "creator"]).optional(),
404
404
  outcomes: z.array(z.union([taskOutcomeInputSchema, taskOutcomeSchema])).max(5).optional()
405
405
  });
406
- const scheduledAutomationEditSchema = automationEditFieldsSchema.extend({
407
- schedule: scheduleIntentSchema.optional(),
408
- status: z.enum(["active", "blocked"]).optional()
409
- }).strict();
406
+ const scheduledAutomationEditSchema = automationEditFieldsSchema.extend({ schedule: scheduleIntentSchema.optional() }).strict();
410
407
  const eventAutomationEditSchema = automationEditFieldsSchema.extend({ trigger: eventAutomationTriggerSchema.safeExtend({
411
408
  identifier: z.string().trim().min(1).max(300).optional(),
412
409
  label: z.string().trim().min(1).max(500)
@@ -692,7 +689,7 @@ const automationEditSchema = z.discriminatedUnion("kind", [automationEditBaseSch
692
689
  ])
693
690
  }).strict()]);
694
691
  /** Partial edits require the revision returned by the edit read. */
695
- const automationUpdateSchema = z.discriminatedUnion("kind", [scheduledAutomationEditSchema.omit({ status: true }).extend({
692
+ const automationUpdateSchema = z.discriminatedUnion("kind", [scheduledAutomationEditSchema.extend({
696
693
  kind: z.literal("scheduled"),
697
694
  revision: automationRevisionSchema
698
695
  }).strict(), eventAutomationEditSchema.extend({
@@ -1,45 +1,9 @@
1
- import { i as getChatConfig } from "./config-B9f9Lqo5.js";
2
- import { E as withSpan, h as logWarn, m as logInfo, p as logException } from "./logging-CMFhLLj4.js";
1
+ import { i as getChatConfig } from "./config-CLJcyYEF.js";
2
+ import { E as withSpan, h as logWarn, m as logInfo, p as logException } from "./logging-DbD-dErY.js";
3
3
  import { AsyncLocalStorage } from "node:async_hooks";
4
4
  import { createHash, createHmac, timingSafeEqual } from "node:crypto";
5
5
  import * as z from "zod";
6
6
  import { QueueClient, handleCallback, registerDevConsumer } from "@vercel/queue";
7
- /** Validate the v2 conversation work hint sent through Vercel Queue. */
8
- const conversationQueueMessageSchema = z.object({
9
- schemaVersion: z.literal(2),
10
- conversationId: z.string().trim().min(1)
11
- }).strict();
12
- var ConversationQueueMessageRejectedError = class extends Error {
13
- conversationId;
14
- reason;
15
- constructor(reason, message, options = {}) {
16
- super(message);
17
- this.name = "ConversationQueueMessageRejectedError";
18
- this.reason = reason;
19
- this.conversationId = options.conversationId;
20
- }
21
- };
22
- /** Return whether an error means the queue message was permanently rejected. */
23
- function isConversationQueueMessageRejectedError(error) {
24
- return error instanceof ConversationQueueMessageRejectedError;
25
- }
26
- // src/chat/runtime/request-deadline.ts
27
- const requestDeadlineStorage = new AsyncLocalStorage();
28
- function createTurnRequestDeadline(startedAtMs) {
29
- return {
30
- startedAtMs,
31
- deadlineAtMs: startedAtMs + Math.max(1, getChatConfig().functionMaxDurationSeconds * 1e3 - 2e4)
32
- };
33
- }
34
- /** Return the host request deadline inherited by the current async turn. */
35
- function getTurnRequestDeadline() {
36
- return requestDeadlineStorage.getStore();
37
- }
38
- /** Run work with one host request deadline shared by nested queued turns. */
39
- function runWithTurnRequestDeadline(callback, startedAtMs = Date.now()) {
40
- if (requestDeadlineStorage.getStore()) return callback();
41
- return requestDeadlineStorage.run(createTurnRequestDeadline(startedAtMs), callback);
42
- }
43
7
  // src/chat/queue/bullmq.ts
44
8
  const MAX_ATTEMPTS = 50;
45
9
  const MAX_BACKOFF_MS = 3e4;
@@ -203,6 +167,73 @@ const vercelQueueProvider = {
203
167
  function getQueueProvider() {
204
168
  return getChatConfig().queue.provider === "bullmq" ? bullmqQueueProvider : vercelQueueProvider;
205
169
  }
170
+ // src/chat/runtime/request-deadline.ts
171
+ const requestDeadlineStorage = new AsyncLocalStorage();
172
+ function createTurnRequestDeadline(startedAtMs) {
173
+ return {
174
+ startedAtMs,
175
+ deadlineAtMs: startedAtMs + Math.max(1, getChatConfig().functionMaxDurationSeconds * 1e3 - 2e4)
176
+ };
177
+ }
178
+ /** Return the host request deadline inherited by the current async turn. */
179
+ function getTurnRequestDeadline() {
180
+ return requestDeadlineStorage.getStore();
181
+ }
182
+ /** Run work with one host request deadline shared by nested queued turns. */
183
+ function runWithTurnRequestDeadline(callback, startedAtMs = Date.now()) {
184
+ if (requestDeadlineStorage.getStore()) return callback();
185
+ return requestDeadlineStorage.run(createTurnRequestDeadline(startedAtMs), callback);
186
+ }
187
+ // src/chat/queue/callback.ts
188
+ /** Shared queue callback wiring for signed messages. */
189
+ /** Build the HTTP callback and local-dev consumer for one signed queue. */
190
+ function queueCallback(options) {
191
+ const consume = async (message, metadata) => {
192
+ if (options.skip?.(metadata)) return;
193
+ try {
194
+ await runWithTurnRequestDeadline(() => options.run(message, metadata));
195
+ } catch (error) {
196
+ const reason = options.permanentError?.(error);
197
+ if (!reason) throw error;
198
+ options.onRejected(reason, metadata, error);
199
+ }
200
+ };
201
+ const handler = async (value, metadata) => {
202
+ if (options.skip?.(metadata)) return;
203
+ const checked = options.verify(value);
204
+ if (checked.status === "rejected") {
205
+ options.onRejected(checked.reason, metadata);
206
+ return;
207
+ }
208
+ if (checked.status === "unavailable") throw new Error(`Queue message verification unavailable: ${checked.reason}`);
209
+ await consume(checked.message, metadata);
210
+ };
211
+ const retry = (error, metadata) => {
212
+ const reason = options.permanentError?.(error);
213
+ if (reason) {
214
+ options.onRejected(reason, metadata, error);
215
+ return { acknowledge: true };
216
+ }
217
+ if (options.maxDeliveries !== null && metadata.deliveryCount >= options.maxDeliveries) return { acknowledge: true };
218
+ };
219
+ const consumer = {
220
+ consumerGroup: options.consumerGroup,
221
+ handler,
222
+ retry,
223
+ topic: options.topic,
224
+ visibilityTimeoutSeconds: options.visibilityTimeoutSeconds
225
+ };
226
+ return {
227
+ /** Run a message that an in-process queue already trusts. */
228
+ consume,
229
+ consumer,
230
+ create: () => getQueueProvider().createCallback(consumer),
231
+ registerDev: () => {
232
+ if (process.env.NODE_ENV !== "development") return;
233
+ return getQueueProvider().registerDevConsumer?.(consumer);
234
+ }
235
+ };
236
+ }
206
237
  // src/chat/queue/sign.ts
207
238
  /** Sign and check queue messages before public callbacks run them. */
208
239
  const QUEUE_SIGNATURE_MAX_AGE_MS = 36e5;
@@ -289,6 +320,96 @@ function verifyQueueMessage(config, value, nowMs = Date.now()) {
289
320
  message: message.data
290
321
  };
291
322
  }
323
+ // src/chat/cache-warming/queue.ts
324
+ /** Send and receive delayed cache warmup messages. */
325
+ /** Deploy topic name. Keep stable for Vercel queue wiring. */
326
+ const CACHE_WARMUP_QUEUE_TOPIC = "junior_cache_warmups";
327
+ const CACHE_WARMUP_DEV_CONSUMER_GROUP = "junior_cache_warmups_dev";
328
+ const cacheWarmupSign = {
329
+ context: "junior.cache_warmup_queue.v1",
330
+ schema: z.discriminatedUnion("kind", [z.object({
331
+ kind: z.literal("warmup"),
332
+ conversationId: z.string().min(1),
333
+ cycle: z.number().int().positive(),
334
+ generation: z.string().min(1),
335
+ cacheExpiresAtMs: z.number().int().positive()
336
+ }).strict(), z.object({
337
+ kind: z.literal("horizon"),
338
+ conversationId: z.string().min(1),
339
+ generation: z.string().min(1)
340
+ }).strict()]),
341
+ signatureVersion: "v1",
342
+ parts: (message) => [
343
+ message.kind,
344
+ message.conversationId,
345
+ message.generation,
346
+ message.kind === "warmup" ? String(message.cycle) : "",
347
+ message.kind === "warmup" ? String(message.cacheExpiresAtMs) : ""
348
+ ]
349
+ };
350
+ /** Send a cache warming message that is delivered after `delayMs`. */
351
+ async function sendCacheWarmup(message, delayMs) {
352
+ await getQueueProvider().send(CACHE_WARMUP_QUEUE_TOPIC, signQueueMessage(cacheWarmupSign, message), {
353
+ delaySeconds: Math.max(0, Math.floor(delayMs / 1e3)),
354
+ retentionSeconds: message.kind === "warmup" ? Math.min(QUEUE_SIGNATURE_MAX_AGE_MS / 1e3, Math.ceil(Math.max(0, delayMs) / 1e3) + 120) : QUEUE_SIGNATURE_MAX_AGE_MS / 1e3,
355
+ idempotencyKey: `cache-warmup_${message.generation}_${message.kind === "warmup" ? message.cycle : message.kind}`
356
+ });
357
+ }
358
+ function logCacheWarmupRejected(reason, metadata, error) {
359
+ logWarn("cache_warming.queue_message.rejected", {
360
+ "app.queue.consumer_group": metadata.consumerGroup,
361
+ "app.queue.delivery_count": metadata.deliveryCount,
362
+ "app.queue.message_id": metadata.messageId,
363
+ "app.queue.reject_reason": reason,
364
+ "app.queue.topic_name": metadata.topicName,
365
+ ...error instanceof Error ? { "exception.message": error.message } : void 0
366
+ });
367
+ }
368
+ function cacheWarmupCallback() {
369
+ return queueCallback({
370
+ consumerGroup: CACHE_WARMUP_DEV_CONSUMER_GROUP,
371
+ maxDeliveries: 1,
372
+ onRejected: logCacheWarmupRejected,
373
+ run: async (message) => {
374
+ const { runCacheWarmup } = await import("./warmup-P_GJCL1c.js").then((n) => n.o);
375
+ await runCacheWarmup(message);
376
+ },
377
+ skip: () => !getChatConfig().cacheWarmingEnabled,
378
+ topic: CACHE_WARMUP_QUEUE_TOPIC,
379
+ verify: (value) => verifyQueueMessage(cacheWarmupSign, value)
380
+ });
381
+ }
382
+ /** Create the HTTP route for cache warmup messages. */
383
+ function createVercelCacheWarmupCallback() {
384
+ return cacheWarmupCallback().create();
385
+ }
386
+ /** Return the queue consumer for cache warmups, for a pulling queue worker. */
387
+ function cacheWarmupQueueConsumer() {
388
+ return cacheWarmupCallback().consumer;
389
+ }
390
+ /** Receive cache warmup messages during local development. */
391
+ function registerVercelCacheWarmupDevConsumer() {
392
+ return cacheWarmupCallback().registerDev();
393
+ }
394
+ /** Validate the v2 conversation work hint sent through Vercel Queue. */
395
+ const conversationQueueMessageSchema = z.object({
396
+ schemaVersion: z.literal(2),
397
+ conversationId: z.string().trim().min(1)
398
+ }).strict();
399
+ var ConversationQueueMessageRejectedError = class extends Error {
400
+ conversationId;
401
+ reason;
402
+ constructor(reason, message, options = {}) {
403
+ super(message);
404
+ this.name = "ConversationQueueMessageRejectedError";
405
+ this.reason = reason;
406
+ this.conversationId = options.conversationId;
407
+ }
408
+ };
409
+ /** Return whether an error means the queue message was permanently rejected. */
410
+ function isConversationQueueMessageRejectedError(error) {
411
+ return error instanceof ConversationQueueMessageRejectedError;
412
+ }
292
413
  // src/chat/task-execution/queue-signing.ts
293
414
  const conversationQueueSign = {
294
415
  context: "junior.conversation_work_queue.v2",
@@ -381,56 +502,6 @@ async function sendWorkspaceSnapshotJob(message) {
381
502
  async function sendNextWorkspaceSnapshotJob(message) {
382
503
  await send(message);
383
504
  }
384
- // src/chat/queue/callback.ts
385
- /** Shared queue callback wiring for signed messages. */
386
- /** Build the HTTP callback and local-dev consumer for one signed queue. */
387
- function queueCallback(options) {
388
- const consume = async (message, metadata) => {
389
- if (options.skip?.(metadata)) return;
390
- try {
391
- await runWithTurnRequestDeadline(() => options.run(message, metadata));
392
- } catch (error) {
393
- const reason = options.permanentError?.(error);
394
- if (!reason) throw error;
395
- options.onRejected(reason, metadata, error);
396
- }
397
- };
398
- const handler = async (value, metadata) => {
399
- if (options.skip?.(metadata)) return;
400
- const checked = options.verify(value);
401
- if (checked.status === "rejected") {
402
- options.onRejected(checked.reason, metadata);
403
- return;
404
- }
405
- if (checked.status === "unavailable") throw new Error(`Queue message verification unavailable: ${checked.reason}`);
406
- await consume(checked.message, metadata);
407
- };
408
- const retry = (error, metadata) => {
409
- const reason = options.permanentError?.(error);
410
- if (reason) {
411
- options.onRejected(reason, metadata, error);
412
- return { acknowledge: true };
413
- }
414
- if (options.maxDeliveries !== null && metadata.deliveryCount >= options.maxDeliveries) return { acknowledge: true };
415
- };
416
- const consumer = {
417
- consumerGroup: options.consumerGroup,
418
- handler,
419
- retry,
420
- topic: options.topic,
421
- visibilityTimeoutSeconds: options.visibilityTimeoutSeconds
422
- };
423
- return {
424
- /** Run a message that an in-process queue already trusts. */
425
- consume,
426
- consumer,
427
- create: () => getQueueProvider().createCallback(consumer),
428
- registerDev: () => {
429
- if (process.env.NODE_ENV !== "development") return;
430
- return getQueueProvider().registerDevConsumer?.(consumer);
431
- }
432
- };
433
- }
434
505
  // src/chat/plugins/task-queue.ts
435
506
  /**
436
507
  * Delivery for plugin-registered tasks.
@@ -489,7 +560,7 @@ function pluginTaskCallback() {
489
560
  maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
490
561
  onRejected: logPluginTaskQueueMessageRejected,
491
562
  run: async (message) => {
492
- const { processPluginTask } = await import("./task-runner-xPuQmEot.js").then((n) => n.r);
563
+ const { processPluginTask } = await import("./task-runner-B-Ewf8TX.js").then((n) => n.r);
493
564
  await processPluginTask(message);
494
565
  },
495
566
  topic: PLUGIN_TASK_QUEUE_TOPIC,
@@ -554,4 +625,4 @@ const vercelBackgroundCompactionQueue = { send: async (message) => {
554
625
  retentionSeconds: QUEUE_SIGNATURE_MAX_AGE_MS / 1e3
555
626
  });
556
627
  } };
557
- export { ConversationQueueMessageRejectedError as C, getTurnRequestDeadline as S, isConversationQueueMessageRejectedError as T, getVercelConversationWorkQueue as _, PLUGIN_TASK_QUEUE_TOPIC as a, QUEUE_SIGNATURE_MAX_AGE_MS as b, pluginTaskParamsSchema as c, sendVercelPluginTask as d, queueCallback as f, verifyWorkspaceSnapshotJobMessage as g, sendWorkspaceSnapshotJob as h, verifyBackgroundCompactionMessage as i, pluginTaskQueueConsumer as l, sendNextWorkspaceSnapshotJob as m, backgroundCompactionId as n, createVercelPluginTaskCallback as o, WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC as p, vercelBackgroundCompactionQueue as r, pluginTaskId as s, BACKGROUND_COMPACTION_QUEUE_TOPIC as t, registerVercelPluginTaskDevConsumer as u, resolveConversationWorkQueueTopic as v, conversationQueueMessageSchema as w, getQueueProvider as x, verifyConversationQueueMessage as y };
628
+ export { getQueueProvider as A, cacheWarmupQueueConsumer as C, QUEUE_SIGNATURE_MAX_AGE_MS as D, sendCacheWarmup as E, queueCallback as O, CACHE_WARMUP_QUEUE_TOPIC as S, registerVercelCacheWarmupDevConsumer as T, resolveConversationWorkQueueTopic as _, PLUGIN_TASK_QUEUE_TOPIC as a, conversationQueueMessageSchema as b, pluginTaskParamsSchema as c, sendVercelPluginTask as d, WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC as f, getVercelConversationWorkQueue as g, verifyWorkspaceSnapshotJobMessage as h, verifyBackgroundCompactionMessage as i, getTurnRequestDeadline as k, pluginTaskQueueConsumer as l, sendWorkspaceSnapshotJob as m, backgroundCompactionId as n, createVercelPluginTaskCallback as o, sendNextWorkspaceSnapshotJob as p, vercelBackgroundCompactionQueue as r, pluginTaskId as s, BACKGROUND_COMPACTION_QUEUE_TOPIC as t, registerVercelPluginTaskDevConsumer as u, verifyConversationQueueMessage as v, createVercelCacheWarmupCallback as w, isConversationQueueMessageRejectedError as x, ConversationQueueMessageRejectedError as y };
@@ -1,6 +1,6 @@
1
- import { i as completeObject } from "./client-B0aAs7wC.js";
2
- import { K as parseBriefInput, V as briefCodeChangeSchema, W as briefResourceLabel, d as conversationEventPageSchema, l as conversationDetailReportSchema } from "./conversation-BusI2uzj.js";
3
- import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-C9OQEfan.js";
1
+ import { n as completeObject } from "./core-model-BTt5E5b0.js";
2
+ import { K as briefCodeChangeSchema, Y as briefResourceLabel, Z as parseBriefInput, d as conversationEventPageSchema, l as conversationDetailReportSchema } from "./conversation-DhoqHtQ7.js";
3
+ import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-KT6MaDHN.js";
4
4
  import { CLI_USAGE } from "./cli/run.js";
5
5
  import path from "node:path";
6
6
  import * as z from "zod";
@@ -263,7 +263,7 @@ async function parseRunOptions(argv) {
263
263
  * token.
264
264
  */
265
265
  async function configuredBriefModelId() {
266
- const { botConfig } = await import("./config-B9f9Lqo5.js").then((n) => n.r);
266
+ const { botConfig } = await import("./config-CLJcyYEF.js").then((n) => n.r);
267
267
  return botConfig.fastModelId;
268
268
  }
269
269
  function apiUrl(baseUrl, pathname) {
@@ -335,7 +335,9 @@ async function runSnapshot(snapshotPath, options, prompt) {
335
335
  for (const throughIndex of generationIndexes(snapshot, options.turnByTurn, finalThroughIndex)) versions.push(await generateBrief({
336
336
  completeObject: (request) => completeObject({
337
337
  ...request,
338
- modelId: options.model
338
+ modelId: options.model,
339
+ operation: "brief_update",
340
+ cost: { owner: "caller" }
339
341
  }),
340
342
  input: briefInputFromSnapshot(snapshot, throughIndex),
341
343
  previous: versions.at(-1)?.brief,
@@ -1,5 +1,5 @@
1
1
  import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { t as createPluginCatalogRuntime } from "./registry-u-sFYtx_.js";
2
+ import { t as createPluginCatalogRuntime } from "./registry-D-Acyjhh.js";
3
3
  // src/chat/plugins/catalog-runtime.ts
4
4
  var catalog_runtime_exports = /* @__PURE__ */ __exportAll({ pluginCatalogRuntime: () => pluginCatalogRuntime });
5
5
  const pluginCatalogRuntime = createPluginCatalogRuntime();
package/dist/cli/chat.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-DGCwOEyL.js";
1
+ import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-9MXyWUL8.js";
2
2
  import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
3
3
  import path from "node:path";
4
4
  import { createHash, randomUUID } from "node:crypto";
@@ -99,10 +99,10 @@ async function loadLocalPluginSet() {
99
99
  async function configureLocalChatPlugins(pluginSet) {
100
100
  const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
101
101
  import("../plugins-HYh_JOdw.js").then((n) => n.o),
102
- import("../projection-CoeMNxJ4.js").then((n) => n.Vn),
103
- import("../catalog-runtime-Bym8GVdh.js").then((n) => n.t),
104
- import("../validation-DZDKorGz.js").then((n) => n.r),
105
- import("../viewer-CH-ASQzh.js").then((n) => n.v)
102
+ import("../projection-BViECfYu.js").then((n) => n.Mn),
103
+ import("../catalog-runtime-B3gfH58M.js").then((n) => n.t),
104
+ import("../validation-B4sbIoES.js").then((n) => n.r),
105
+ import("../db-Co7DTYYh.js").then((n) => n.n)
106
106
  ]);
107
107
  const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
108
108
  const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
@@ -152,18 +152,18 @@ function localDevServerUrl() {
152
152
  async function prepareLocalChatRun(io, pluginSet) {
153
153
  defaultStateAdapterForLocalChat();
154
154
  await configureLocalChatPlugins(pluginSet);
155
- const { setBriefsConfig } = await import("../projection-CoeMNxJ4.js").then((n) => n.$n);
155
+ const { setBriefsConfig } = await import("../projection-BViECfYu.js").then((n) => n.Wn);
156
156
  setBriefsConfig({ enabled: true });
157
- const { runLocalAgentTurn } = await import("../runner-Cr67a8TB.js");
158
- const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-DCAFIUQr.js");
157
+ const { runLocalAgentTurn } = await import("../runner-DBKjGjH-.js");
158
+ const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-CpbepSbp.js");
159
159
  const { createLocalOAuthState } = await import("../oauth-relay-D6xxVywK.js").then((n) => n.t);
160
- const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-DLOazy5W.js");
161
- const { bindSpawnAgent } = await import("../spawn-C8F_iXWO.js").then((n) => n.n);
162
- const { bindMessageAgent } = await import("../message-D1xLljUF.js").then((n) => n.n);
163
- const { createChildConversationWorker } = await import("../result-CescSwAw.js").then((n) => n.i);
164
- const { skipInputAfterConversationStop } = await import("../session-stop-CGz5DByb.js").then((n) => n.a);
160
+ const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-9n8hqx29.js");
161
+ const { bindSpawnAgent } = await import("../spawn-BBqZDcPa.js").then((n) => n.n);
162
+ const { bindMessageAgent } = await import("../message-DKTdTYm-.js").then((n) => n.n);
163
+ const { createChildConversationWorker } = await import("../result-DHmCFEt8.js").then((n) => n.i);
164
+ const { skipInputAfterConversationStop } = await import("../session-stop-BWOsuo8p.js").then((n) => n.a);
165
165
  const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
166
- const { processConversationWork } = await import("../worker-Dl47I729.js").then((n) => n.n);
166
+ const { processConversationWork } = await import("../worker-CYPTOT4j.js").then((n) => n.n);
167
167
  let agentRunner;
168
168
  const localConversationWork = createLocalConversationWork(async (message) => {
169
169
  if (!agentRunner) throw new Error("Local agent runner is not ready");
package/dist/cli/check.js CHANGED
@@ -1,6 +1,6 @@
1
- import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, L as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, M as JUNIOR_HEARTBEAT_ROUTE } from "../logging-CMFhLLj4.js";
2
- import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-u-sFYtx_.js";
3
- import { i as parseSkillFile } from "../skills-COCqf61f.js";
1
+ import { N as JUNIOR_HEARTBEAT_ROUTE, R as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, j as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-DbD-dErY.js";
2
+ import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-D-Acyjhh.js";
3
+ import { i as parseSkillFile } from "../skills-DO5K68Rq.js";
4
4
  import path from "node:path";
5
5
  import fs from "node:fs/promises";
6
6
  import { pathToFileURL } from "node:url";
package/dist/cli/main.js CHANGED
@@ -25,13 +25,13 @@ async function runChat(argv, pluginSet) {
25
25
  return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
26
26
  }
27
27
  async function runAdmin(argv) {
28
- return await (await import("../admin-Dm2bimJ-.js")).runAdmin(argv);
28
+ return await (await import("../admin-BcSxHuTB.js")).runAdmin(argv);
29
29
  }
30
30
  async function runServiceAccount(argv) {
31
- return await (await import("../service-account-CsKxktLk.js")).runServiceAccount(argv);
31
+ return await (await import("../service-account-Bi0HsY6w.js")).runServiceAccount(argv);
32
32
  }
33
33
  async function runBriefs(argv) {
34
- return await (await import("../briefs-UMeYehUe.js")).runBriefs(argv);
34
+ return await (await import("../briefs-DW9iuolG.js")).runBriefs(argv);
35
35
  }
36
36
  function topLevelCommand(argv) {
37
37
  return (argv[0] === "--" ? argv.slice(1) : argv)[0];
@@ -1,7 +1,7 @@
1
- import { Xn as setPlugins, Za as createPluginLogger, Zn as validatePlugins } from "../projection-CoeMNxJ4.js";
2
- import { S as getDb } from "../viewer-CH-ASQzh.js";
3
- import { n as pluginCatalogRuntime } from "../catalog-runtime-Bym8GVdh.js";
4
- import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-DZDKorGz.js";
1
+ import { Hn as validatePlugins, Ka as createPluginLogger, Vn as setPlugins } from "../projection-BViECfYu.js";
2
+ import { o as getDb } from "../db-Co7DTYYh.js";
3
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-B3gfH58M.js";
4
+ import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-B4sbIoES.js";
5
5
  import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-HYh_JOdw.js";
6
6
  import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
7
7
  import { stderr, stdout } from "node:process";
@@ -1,7 +1,7 @@
1
- import { Di as create, Ma as SANDBOX_RUNTIME } from "../projection-CoeMNxJ4.js";
2
- import { n as pluginCatalogRuntime } from "../catalog-runtime-Bym8GVdh.js";
3
- import { t as disconnectStateAdapter } from "../adapter-JQZaJ-B_.js";
4
- import { n as resolve } from "../resolve-DYqgL3Eo.js";
1
+ import { Da as SANDBOX_RUNTIME, xi as create } from "../projection-BViECfYu.js";
2
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-B3gfH58M.js";
3
+ import { t as disconnectStateAdapter } from "../adapter-Cikcqdty.js";
4
+ import { n as resolve } from "../resolve-gkT2R66z.js";
5
5
  // src/cli/snapshot-create.ts
6
6
  const DEFAULT_TIMEOUT_MS = 6e5;
7
7
  function progressMessage(phase) {
@@ -1,4 +1,4 @@
1
- import "../db-C5zi4ecs.js";
1
+ import "../db-zIs8-Ba3.js";
2
2
  import { n as JuniorPluginSet } from "../plugins-DtmjkTza.js";
3
3
  interface UpgradeIo {
4
4
  info: (line: string) => void;
@@ -1,6 +1,6 @@
1
- import { i as getChatConfig } from "../config-B9f9Lqo5.js";
2
- import { t as createJuniorSqlExecutor } from "../executor-Dipi2Ixl.js";
3
- import { t as createPluginCatalogRuntime } from "../registry-u-sFYtx_.js";
1
+ import { i as getChatConfig } from "../config-CLJcyYEF.js";
2
+ import { t as createJuniorSqlExecutor } from "../executor-m0kIN71Q.js";
3
+ import { t as createPluginCatalogRuntime } from "../registry-D-Acyjhh.js";
4
4
  import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-HYh_JOdw.js";
5
5
  import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
6
6
  import { basename, dirname, join, resolve } from "node:path";