@sentry/junior 0.268.0 → 0.270.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 (83) hide show
  1. package/README.md +2 -9
  2. package/dist/{adapter-04AcD2SO.js → adapter-BQNTKVTF.js} +3 -49
  3. package/dist/{admin-DIU1QyG3.js → admin-CKVEoXa4.js} +1 -1
  4. package/dist/{agent-runner-CAYfFmU7.js → agent-runner-MSQSMFkq.js} +4538 -3251
  5. package/dist/api/schema.d.ts +2 -3
  6. package/dist/api/schema.js +7 -7
  7. package/dist/api.d.ts +3 -1
  8. package/dist/api.js +190 -301
  9. package/dist/{app-z6Uuyq3j.d.ts → app-Bz8t4P8p.d.ts} +9 -3
  10. package/dist/app.d.ts +1 -1
  11. package/dist/app.js +129 -209
  12. package/dist/{automation-CmeFBSEh.js → automation-Dwh_xcqM.js} +74 -74
  13. package/dist/{briefs-DQbV2jNr.js → briefs-DNFzFFVx.js} +5 -5
  14. package/dist/{catalog-runtime-BD9GSpc6.js → catalog-runtime-Bdym_wKy.js} +1 -1
  15. package/dist/cli/chat.js +16 -26
  16. package/dist/cli/check.js +3 -3
  17. package/dist/cli/main.js +5 -3
  18. package/dist/cli/plugins.js +4 -4
  19. package/dist/cli/snapshot-create.js +4 -4
  20. package/dist/cli/upgrade.d.ts +1 -1
  21. package/dist/cli/upgrade.js +3 -3
  22. package/dist/{client-C1yDYjoS.js → client-B2MjENki.js} +31 -16
  23. package/dist/{config-DrTeF80T.js → config-Dm3pWRqY.js} +3 -3
  24. package/dist/{connections-D46f8vvi.js → connections-0BBhiD-p.js} +10 -10
  25. package/dist/{conversation-DSo310Ps.js → conversation-AhOVzN_k.js} +11 -86
  26. package/dist/{conversation-privacy-CxlOCiUo.js → conversation-privacy-C1pJ89rs.js} +1 -1
  27. package/dist/{credential-sync-sm9fegLY.js → credential-sync-BRiWYs6_.js} +15 -14
  28. package/dist/{credentialed-lukuD-cc.js → credentialed-BeBaJMZ_.js} +565 -83
  29. package/dist/{store-xMuuXRE0.d.ts → db-BYOuu6v2.d.ts} +4 -0
  30. package/dist/{executor-4vhvsMZJ.js → executor-BB6eJkD4.js} +6 -6
  31. package/dist/instrumentation.js +2 -2
  32. package/dist/{interruption-marker-CkncDT8d.js → interruption-marker-CdblrIQK.js} +1 -1
  33. package/dist/{job-queue-In9QKz-I.js → job-queue-DiaXoSDg.js} +2 -2
  34. package/dist/{list-BkgnXEEB.js → list-BTDRxkOg.js} +331 -662
  35. package/dist/locks-D-0h111u.js +48 -0
  36. package/dist/{logging-DLSpkSSr.js → logging-C6EdT6PP.js} +1 -1
  37. package/dist/{history-C84mlAwO.js → media-U6Tuz6Mi.js} +84 -2
  38. package/dist/{message-BObyg59s.js → message-DsjiWRVg.js} +4 -4
  39. package/dist/{model-profile-Bg8EoCKD.js → model-profile-B998sjVd.js} +9 -2
  40. package/dist/nitro.d.ts +1 -1
  41. package/dist/nitro.js +5 -3
  42. package/dist/{oauth-callback-server-B-WbSdoH.js → oauth-callback-server-CjFFVGqa.js} +2 -2
  43. package/dist/{prompt-BW9jFsqZ.js → prompt-BPSdXYXV.js} +1 -1
  44. package/dist/{registry-BgecKva0.js → registry-CndmkP2P.js} +1 -1
  45. package/dist/reporting-schema-CZREhYc-.js +104 -0
  46. package/dist/{web-message-id-DlHNANtd.js → reporting-window-DRCi1Ls_.js} +139 -7
  47. package/dist/{resolve-Cpa4Bu1O.js → resolve-BkAA1wH7.js} +3 -3
  48. package/dist/{result-D3TSmZZ8.js → result-9TJTpuYP.js} +30 -11
  49. package/dist/{runner-DS5OKhEp.js → runner-BmKLSyJm.js} +12 -11
  50. package/dist/{sandbox-egress-signals-CnDjY5rx.js → sandbox-egress-signals-CjLaogMo.js} +1 -1
  51. package/dist/{schema-0050HFnB.js → schema-DNLJ_MzW.js} +36 -20
  52. package/dist/{schema-ZngqcOWM.d.ts → schema-WayPSHFu.d.ts} +149 -12
  53. package/dist/{service-account-CKV2WTY7.js → service-account-D6e9cVmH.js} +4 -3
  54. package/dist/{service-account-DGjnDw9y.js → service-account-DlhYl-Mu.js} +3 -3
  55. package/dist/{session-stop-Dam1EI7B.js → session-stop-MZRgYqYH.js} +24 -16
  56. package/dist/{skills-CfAnfImD.js → skills-BggTR_ue.js} +2 -2
  57. package/dist/{spawn-cmq9p4Ly.js → spawn-DmtlcAT_.js} +2 -2
  58. package/dist/{store-zPEoJPBB.js → store-BeWGgaMA.js} +3 -3
  59. package/dist/{store-C5PN02QO.js → store-Byarin7b.js} +4 -4
  60. package/dist/{task-queue-_mf28dSu.js → task-queue-Dt1_ZoI_.js} +3 -3
  61. package/dist/task-runner-DyKqAPpm.js +269 -0
  62. package/dist/{thread-state-BbbPh0Sn.js → thread-state-BHBLMvgb.js} +5 -5
  63. package/dist/{turn-failure-response-BKKmnMB5.js → turn-failure-response-DWXy_0oJ.js} +9 -9
  64. package/dist/{turn-lifecycle-oP0kVeGz.js → turn-lifecycle-AiXkVqCB.js} +1 -1
  65. package/dist/{tasks-SB9z-VTU.js → turn-session-routing-B9KLBhaT.js} +939 -120
  66. package/dist/{validation--JsAGLwc.js → validation-BW60Vtx_.js} +1 -1
  67. package/dist/{version-jHwJp4hC.js → version-CivPYmkH.js} +1 -1
  68. package/dist/version.js +1 -1
  69. package/dist/{viewer-CpXTGlep.js → viewer-BTgAfdUg.js} +216 -27
  70. package/dist/{work-3N-GHY9m.js → work-Bjm52fHo.js} +17 -36
  71. package/dist/{worker-CCdbcItd.js → worker-CMbgtHLu.js} +15 -7
  72. package/migrations/0069_system_identity.sql +25 -0
  73. package/migrations/0070_review_item_foreign_keys.sql +5 -0
  74. package/migrations/AGENTS.md +17 -0
  75. package/migrations/meta/0069_snapshot.json +3979 -0
  76. package/migrations/meta/0070_snapshot.json +3997 -0
  77. package/migrations/meta/_journal.json +15 -1
  78. package/package.json +5 -4
  79. package/dist/db-BU4LQD8s.d.ts +0 -6
  80. package/dist/history-BgI33Kie.d.ts +0 -78
  81. package/dist/reporting-window-DVCD_10C.js +0 -227
  82. package/dist/task-runner-DMI2prDO.js +0 -1073
  83. package/migrations/README.md +0 -30
@@ -1,14 +1,7 @@
1
1
  import { a as resolveLocalScheduleAtMs, i as isValidTimeZone, r as getZonedDateTimeParts, t as getFirstRunAtMs } from "./cadence-R7Em4RjE.js";
2
- import { n as actorIdentitySchema } from "./conversation-DSo310Ps.js";
2
+ import { n as actorIdentitySchema } from "./conversation-AhOVzN_k.js";
3
3
  import { z } from "zod";
4
4
  import { actorUserIdSchema, destinationVisibilitySchema, eventMatchFieldsSchema, eventMatchSchema, eventReachSchema, eventTypeSchema, pluginEventTypeSchema, slackDestinationSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
5
- // src/chat/task-outcomes-schema.ts
6
- const taskMessageDestinationInputSchema = z.enum(["current_conversation", "task_creator"]).describe("Where to send the message. Use current_conversation for posts, digests, summaries, and channel reminders. Use task_creator only when the user asks for a direct reminder or notification.");
7
- /** Input accepted by task authoring tools before a user becomes a DM Destination. */
8
- const taskOutcomeInputSchema = z.object({
9
- action: z.literal("send_message"),
10
- destination: taskMessageDestinationInputSchema
11
- }).strict();
12
5
  // src/chat/scheduled-automations/schedule-intent.ts
13
6
  /**
14
7
  * Owns model-facing schedule intent and materializes it against the trusted
@@ -211,70 +204,6 @@ function compileScheduleIntent(args) {
211
204
  }
212
205
  };
213
206
  }
214
- /** Validate the persisted Slack creator identity for an event automation. */
215
- const eventAutomationPrincipalSchema = z.object({
216
- slackUserId: actorUserIdSchema,
217
- fullName: z.string().optional(),
218
- userName: z.string().optional()
219
- }).strict();
220
- /**
221
- * Validate one persisted event-automation selector and its presentation
222
- * metadata. A trigger names one resource with a resource type and an
223
- * identifier, or it names neither. With neither, it runs for every resource
224
- * of the namespace that its filters match.
225
- */
226
- const eventAutomationTriggerSchema = z.object({
227
- events: z.array(eventTypeSchema).min(1),
228
- label: z.string().min(1),
229
- match: eventMatchSchema.optional(),
230
- namespace: z.string().min(1),
231
- identifier: z.string().min(1).max(300).optional(),
232
- resourceType: z.string().min(1).optional()
233
- }).strict().refine((trigger) => trigger.identifier === void 0 === (trigger.resourceType === void 0), {
234
- message: "Set both a resource type and an identifier, or leave out both to run for every resource.",
235
- path: ["identifier"]
236
- });
237
- /** Event automations target a Slack channel or DM, never a message thread. */
238
- const eventAutomationDestinationSchema = slackDestinationSchema.omit({ threadTs: true });
239
- const eventAutomationOutcomeSchema = taskOutcomeSchema.extend({ destination: eventAutomationDestinationSchema });
240
- /** Validate one persisted event automation. */
241
- const eventAutomationSchema = z.object({
242
- id: z.string().min(1),
243
- createdAtMs: z.number().finite(),
244
- createdBy: eventAutomationPrincipalSchema,
245
- /** Junior identity that created the automation. It decides ownership. */
246
- creatorIdentityId: z.string().min(1),
247
- credentialMode: z.enum(["system", "creator"]),
248
- destination: eventAutomationDestinationSchema,
249
- destinationVisibility: destinationVisibilitySchema,
250
- /** Explicit visible effects after successful work. An empty list is silent. */
251
- outcomes: z.array(eventAutomationOutcomeSchema).max(5),
252
- task: z.object({ text: z.string().min(1) }).strict(),
253
- trigger: eventAutomationTriggerSchema
254
- }).strict();
255
- // src/chat/automations/edit-schema.ts
256
- const automationTitleSchema = z.string().trim().min(1).max(60);
257
- const automationInstructionSchema = z.string().trim().min(1).max(4e3);
258
- /**
259
- * Instruction input for agent tools. The run does not see the request, so the
260
- * instruction names exact targets. It calls the creator "the Automation
261
- * creator". It names every other person with their mention.
262
- */
263
- const automationInstructionToolSchema = automationInstructionSchema.describe("Work to perform when the Automation runs. The run does not see this conversation, so words like \"this channel\" or \"here\" will mean nothing then. Write the exact target instead, such as a channel mention or a link. Call the person who created the Automation \"the Automation creator\", not \"me\"; each run knows who that is. Name every other person with their Slack mention, such as <@U123>, including a requester who did not create the Automation. Preserve the user's scope, targets, and constraints. Do not add permissions or side effects the user did not request.");
264
- const automationEditFieldsSchema = z.object({
265
- title: automationTitleSchema.optional(),
266
- instruction: automationInstructionSchema.optional(),
267
- credentialMode: z.enum(["system", "creator"]).optional(),
268
- outcomes: z.array(z.union([taskOutcomeInputSchema, taskOutcomeSchema])).max(5).optional()
269
- });
270
- const scheduledAutomationEditSchema = automationEditFieldsSchema.extend({
271
- schedule: scheduleIntentSchema.optional(),
272
- status: z.enum(["active", "blocked"]).optional()
273
- }).strict();
274
- const eventAutomationEditSchema = automationEditFieldsSchema.extend({ trigger: eventAutomationTriggerSchema.safeExtend({
275
- identifier: z.string().trim().min(1).max(300).optional(),
276
- label: z.string().trim().min(1).max(500)
277
- }).optional() }).strict();
278
207
  // src/chat/scheduled-automations/types.ts
279
208
  /** Durable scheduled-automation domain types owned by Junior core. */
280
209
  const scheduledAutomationStatusSchema = z.enum([
@@ -382,6 +311,77 @@ const SCHEDULED_AUTOMATION_SYSTEM_ACTOR = Object.freeze({
382
311
  platform: "system",
383
312
  name: "scheduled-automation"
384
313
  });
314
+ /** Validate the persisted Slack creator identity for an event automation. */
315
+ const eventAutomationPrincipalSchema = z.object({
316
+ slackUserId: actorUserIdSchema,
317
+ fullName: z.string().optional(),
318
+ userName: z.string().optional()
319
+ }).strict();
320
+ /**
321
+ * Validate one persisted event-automation selector and its presentation
322
+ * metadata. A trigger names one resource with a resource type and an
323
+ * identifier, or it names neither. With neither, it runs for every resource
324
+ * of the namespace that its filters match.
325
+ */
326
+ const eventAutomationTriggerSchema = z.object({
327
+ events: z.array(eventTypeSchema).min(1),
328
+ label: z.string().min(1),
329
+ match: eventMatchSchema.optional(),
330
+ namespace: z.string().min(1),
331
+ identifier: z.string().min(1).max(300).optional(),
332
+ resourceType: z.string().min(1).optional()
333
+ }).strict().refine((trigger) => trigger.identifier === void 0 === (trigger.resourceType === void 0), {
334
+ message: "Set both a resource type and an identifier, or leave out both to run for every resource.",
335
+ path: ["identifier"]
336
+ });
337
+ /** Event automations target a Slack channel or DM, never a message thread. */
338
+ const eventAutomationDestinationSchema = slackDestinationSchema.omit({ threadTs: true });
339
+ const eventAutomationOutcomeSchema = taskOutcomeSchema.extend({ destination: eventAutomationDestinationSchema });
340
+ /** Validate one persisted event automation. */
341
+ const eventAutomationSchema = z.object({
342
+ id: z.string().min(1),
343
+ createdAtMs: z.number().finite(),
344
+ createdBy: eventAutomationPrincipalSchema,
345
+ /** Junior identity that created the automation. It decides ownership. */
346
+ creatorIdentityId: z.string().min(1),
347
+ credentialMode: z.enum(["system", "creator"]),
348
+ destination: eventAutomationDestinationSchema,
349
+ destinationVisibility: destinationVisibilitySchema,
350
+ /** Explicit visible effects after successful work. An empty list is silent. */
351
+ outcomes: z.array(eventAutomationOutcomeSchema).max(5),
352
+ task: z.object({ text: z.string().min(1) }).strict(),
353
+ trigger: eventAutomationTriggerSchema
354
+ }).strict();
355
+ // src/chat/task-outcomes-schema.ts
356
+ const taskMessageDestinationInputSchema = z.enum(["current_conversation", "task_creator"]).describe("Where to send the message. Use current_conversation for posts, digests, summaries, and channel reminders. Use task_creator only when the user asks for a direct reminder or notification.");
357
+ /** Input accepted by task authoring tools before a user becomes a DM Destination. */
358
+ const taskOutcomeInputSchema = z.object({
359
+ action: z.literal("send_message"),
360
+ destination: taskMessageDestinationInputSchema
361
+ }).strict();
362
+ // src/chat/automations/edit-schema.ts
363
+ const automationTitleSchema = z.string().trim().min(1).max(60);
364
+ const automationInstructionSchema = z.string().trim().min(1).max(4e3);
365
+ /**
366
+ * Instruction input for agent tools. The run does not see the request, so the
367
+ * instruction names exact targets. It calls the creator "the Automation
368
+ * creator". It names every other person with their mention.
369
+ */
370
+ const automationInstructionToolSchema = automationInstructionSchema.describe("Work to perform when the Automation runs. The run does not see this conversation, so words like \"this channel\" or \"here\" will mean nothing then. Write the exact target instead, such as a channel mention or a link. Call the person who created the Automation \"the Automation creator\", not \"me\"; each run knows who that is. Name every other person with their Slack mention, such as <@U123>, including a requester who did not create the Automation. Preserve the user's scope, targets, and constraints. Do not add permissions or side effects the user did not request.");
371
+ const automationEditFieldsSchema = z.object({
372
+ title: automationTitleSchema.optional(),
373
+ instruction: automationInstructionSchema.optional(),
374
+ credentialMode: z.enum(["system", "creator"]).optional(),
375
+ outcomes: z.array(z.union([taskOutcomeInputSchema, taskOutcomeSchema])).max(5).optional()
376
+ });
377
+ const scheduledAutomationEditSchema = automationEditFieldsSchema.extend({
378
+ schedule: scheduleIntentSchema.optional(),
379
+ status: z.enum(["active", "blocked"]).optional()
380
+ }).strict();
381
+ const eventAutomationEditSchema = automationEditFieldsSchema.extend({ trigger: eventAutomationTriggerSchema.safeExtend({
382
+ identifier: z.string().trim().min(1).max(300).optional(),
383
+ label: z.string().trim().min(1).max(500)
384
+ }).optional() }).strict();
385
385
  // src/api/schema/automation.ts
386
386
  const automationDestinationSchema = z.object({
387
387
  channelId: z.string().min(1),
@@ -408,7 +408,7 @@ const automationSummaryBaseSchema = z.object({
408
408
  credentialMode: z.enum(["creator", "system"]),
409
409
  createdAt: z.string().datetime(),
410
410
  createdBy: z.string().min(1),
411
- createdByAvatarUrl: z.string().url().optional(),
411
+ createdByAvatarUrl: z.string().optional(),
412
412
  createdByEmail: z.string().trim().email().optional(),
413
413
  destination: automationDestinationSchema,
414
414
  id: z.string().min(1),
@@ -694,4 +694,4 @@ const automationEventCatalogSchema = z.array(z.object({
694
694
  }).strict());
695
695
  const automationScheduleIntentSchema = scheduleIntentSchema;
696
696
  const automationSchedulePreviewSchema = scheduledAutomationSchema.pick({ schedule: true }).extend({ nextRunAtMs: z.number() }).strict();
697
- export { eventAutomationSchema as A, eventAutomationSummarySchema as C, scheduledRunSchema as D, scheduledAutomationSchema as E, weekdaySchema as F, taskOutcomeInputSchema as I, ScheduleIntentError as M, compileScheduleIntent as N, automationInstructionToolSchema as O, scheduleIntentSchema as P, automationVersionSchema as S, SCHEDULED_AUTOMATION_SYSTEM_ACTOR as T, automationSummarySchema as _, automationExecutionSchema as a, automationVersionListSchema as b, automationLifecycleSchema as c, automationParamsSchema as d, automationRunListSchema as f, automationSchedulePreviewSchema as g, automationScheduleIntentSchema as h, automationExecutionListSchema as i, eventAutomationTriggerSchema as j, automationTitleSchema as k, automationListQuerySchema as l, automationRunWindowsSchema as m, automationEditSchema as n, automationExecutionStatusDaySchema as o, automationRunSchema as p, automationEventCatalogSchema as r, automationExecutionStatusSchema as s, automationEditErrorSchema as t, automationListSchema as u, automationUpdateSchema as v, scheduledAutomationSummarySchema as w, automationVersionParamsSchema as x, automationVersionActivateSchema as y };
697
+ export { SCHEDULED_AUTOMATION_SYSTEM_ACTOR as A, eventAutomationSummarySchema as C, taskOutcomeInputSchema as D, automationTitleSchema as E, scheduleIntentSchema as F, weekdaySchema as I, scheduledRunSchema as M, ScheduleIntentError as N, eventAutomationSchema as O, compileScheduleIntent as P, automationVersionSchema as S, automationInstructionToolSchema as T, automationSummarySchema as _, automationExecutionSchema as a, automationVersionListSchema as b, automationLifecycleSchema as c, automationParamsSchema as d, automationRunListSchema as f, automationSchedulePreviewSchema as g, automationScheduleIntentSchema as h, automationExecutionListSchema as i, scheduledAutomationSchema as j, eventAutomationTriggerSchema as k, automationListQuerySchema as l, automationRunWindowsSchema as m, automationEditSchema as n, automationExecutionStatusDaySchema as o, automationRunSchema as p, automationEventCatalogSchema as r, automationExecutionStatusSchema as s, automationEditErrorSchema as t, automationListSchema as u, automationUpdateSchema as v, scheduledAutomationSummarySchema as w, automationVersionParamsSchema as x, automationVersionActivateSchema as y };
@@ -1,7 +1,7 @@
1
- import { i as completeObject } from "./client-C1yDYjoS.js";
2
- import { r as defaultModelId } from "./model-profile-Bg8EoCKD.js";
3
- import { J as briefCodeChangeSchema, Q as parseBriefInput, d as conversationDetailReportSchema, p as conversationEventPageSchema } from "./conversation-DSo310Ps.js";
4
- import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-BW9jFsqZ.js";
1
+ import { i as completeObject } from "./client-B2MjENki.js";
2
+ import { i as defaultModelId } from "./model-profile-B998sjVd.js";
3
+ import { G as briefCodeChangeSchema, Y as parseBriefInput, d as conversationDetailReportSchema, p as conversationEventPageSchema } from "./conversation-AhOVzN_k.js";
4
+ import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-BPSdXYXV.js";
5
5
  import { CLI_USAGE } from "./cli/run.js";
6
6
  import path from "node:path";
7
7
  import { z } from "zod";
@@ -267,7 +267,7 @@ async function parseRunOptions(argv) {
267
267
  * `DATABASE_URL` at import, and `briefs pull` must work with only a token.
268
268
  */
269
269
  async function configuredDefaultModelId() {
270
- const { botConfig } = await import("./config-DrTeF80T.js").then((n) => n.r);
270
+ const { botConfig } = await import("./config-Dm3pWRqY.js").then((n) => n.r);
271
271
  return defaultModelId(botConfig);
272
272
  }
273
273
  function apiUrl(baseUrl, pathname) {
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
- import { t as createPluginCatalogRuntime } from "./registry-BgecKva0.js";
2
+ import { t as createPluginCatalogRuntime } from "./registry-CndmkP2P.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-CAYfFmU7.js";
1
+ import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-MSQSMFkq.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-DOm9Y6qI.js").then((n) => n.o),
102
- import("../credentialed-lukuD-cc.js").then((n) => n.a),
103
- import("../catalog-runtime-BD9GSpc6.js").then((n) => n.t),
104
- import("../validation--JsAGLwc.js").then((n) => n.r),
105
- import("../viewer-CpXTGlep.js").then((n) => n.u)
102
+ import("../credentialed-BeBaJMZ_.js").then((n) => n.a),
103
+ import("../catalog-runtime-Bdym_wKy.js").then((n) => n.t),
104
+ import("../validation-BW60Vtx_.js").then((n) => n.r),
105
+ import("../viewer-BTgAfdUg.js").then((n) => n.v)
106
106
  ]);
107
107
  const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
108
108
  const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
@@ -152,35 +152,25 @@ function localDevServerUrl() {
152
152
  async function prepareLocalChatRun(io, pluginSet) {
153
153
  defaultStateAdapterForLocalChat();
154
154
  await configureLocalChatPlugins(pluginSet);
155
- const { setBriefsConfig } = await import("../credentialed-lukuD-cc.js").then((n) => n._);
155
+ const { setBriefsConfig } = await import("../credentialed-BeBaJMZ_.js").then((n) => n._);
156
156
  setBriefsConfig({ enabled: true });
157
- const { runLocalAgentTurn } = await import("../runner-DS5OKhEp.js");
158
- const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-B-WbSdoH.js");
157
+ const { runLocalAgentTurn } = await import("../runner-BmKLSyJm.js");
158
+ const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-CjFFVGqa.js");
159
159
  const { createLocalOAuthState } = await import("../oauth-relay-CTygMkNx.js").then((n) => n.t);
160
- const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-CnDjY5rx.js");
161
- const { bindSpawnAgent } = await import("../spawn-cmq9p4Ly.js").then((n) => n.n);
162
- const { bindMessageAgent } = await import("../message-BObyg59s.js").then((n) => n.n);
163
- const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-3N-GHY9m.js").then((n) => n.a);
164
- const { startAgentInvocationsForChildInput } = await import("../result-D3TSmZZ8.js").then((n) => n.r);
165
- const { skipInputBeforeConversationStop } = await import("../session-stop-Dam1EI7B.js").then((n) => n.r);
160
+ const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-CjLaogMo.js");
161
+ const { bindSpawnAgent } = await import("../spawn-DmtlcAT_.js").then((n) => n.n);
162
+ const { bindMessageAgent } = await import("../message-DsjiWRVg.js").then((n) => n.n);
163
+ const { createChildConversationWorker } = await import("../result-9TJTpuYP.js").then((n) => n.i);
164
+ const { skipInputBeforeConversationStop } = await import("../session-stop-MZRgYqYH.js").then((n) => n.r);
166
165
  const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
167
- const { processConversationWork } = await import("../worker-CCdbcItd.js").then((n) => n.n);
166
+ const { processConversationWork } = await import("../worker-CMbgtHLu.js").then((n) => n.n);
168
167
  let agentRunner;
169
168
  const localConversationWork = createLocalConversationWork(async (message) => {
170
169
  if (!agentRunner) throw new Error("Local agent runner is not ready");
171
- const run = routeAgentInvocationWork({
172
- fallbackWorker: async (context) => {
173
- const skipped = await skipInputBeforeConversationStop(context);
174
- if (skipped) return skipped;
175
- const started = await startAgentInvocationsForChildInput(context, { queue: localConversationWork.queue });
176
- if (!started) throw new Error("Local child queue received non-invocation work");
177
- return started;
178
- },
179
- invocationWorker: createAgentInvocationWorker(agentRunner)
180
- });
170
+ const childWorker = createChildConversationWorker(agentRunner, { queue: localConversationWork.queue });
181
171
  await processConversationWork(message, {
182
172
  queue: localConversationWork.queue,
183
- run
173
+ run: async (context) => await skipInputBeforeConversationStop(context) ?? await childWorker(context)
184
174
  });
185
175
  });
186
176
  agentRunner = createAgentRunner(executeAgentRun, {
package/dist/cli/check.js CHANGED
@@ -1,6 +1,6 @@
1
- import { D as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, P as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, k as JUNIOR_HEARTBEAT_ROUTE } from "../logging-DLSpkSSr.js";
2
- import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-BgecKva0.js";
3
- import { i as parseSkillFile } from "../skills-CfAnfImD.js";
1
+ import { D as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, P as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, k as JUNIOR_HEARTBEAT_ROUTE } from "../logging-C6EdT6PP.js";
2
+ import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-CndmkP2P.js";
3
+ import { i as parseSkillFile } from "../skills-BggTR_ue.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,19 +25,21 @@ 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-DIU1QyG3.js")).runAdmin(argv);
28
+ return await (await import("../admin-CKVEoXa4.js")).runAdmin(argv);
29
29
  }
30
30
  async function runServiceAccount(argv) {
31
- return await (await import("../service-account-DGjnDw9y.js")).runServiceAccount(argv);
31
+ return await (await import("../service-account-DlhYl-Mu.js")).runServiceAccount(argv);
32
32
  }
33
33
  async function runBriefs(argv) {
34
- return await (await import("../briefs-DQbV2jNr.js")).runBriefs(argv);
34
+ return await (await import("../briefs-DNFzFFVx.js")).runBriefs(argv);
35
35
  }
36
36
  function topLevelCommand(argv) {
37
37
  return (argv[0] === "--" ? argv.slice(1) : argv)[0];
38
38
  }
39
39
  /** Run the packaged CLI entrypoint with plugin command bootstrap enabled. */
40
40
  async function runMain(argv, options = {}) {
41
+ console.info = console.error;
42
+ console.debug = console.error;
41
43
  loadCliEnvFiles();
42
44
  const instrument = options.instrument ?? true;
43
45
  if (instrument) await initSentry();
@@ -1,7 +1,7 @@
1
- import { m as getDb } from "../viewer-CpXTGlep.js";
2
- import { n as pluginCatalogRuntime } from "../catalog-runtime-BD9GSpc6.js";
3
- import { In as createPluginLogger, h as validatePlugins, m as setPlugins } from "../credentialed-lukuD-cc.js";
4
- import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation--JsAGLwc.js";
1
+ import { S as getDb } from "../viewer-BTgAfdUg.js";
2
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-Bdym_wKy.js";
3
+ import { ar as createPluginLogger, h as validatePlugins, m as setPlugins } from "../credentialed-BeBaJMZ_.js";
4
+ import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-BW60Vtx_.js";
5
5
  import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-DOm9Y6qI.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 { n as pluginCatalogRuntime } from "../catalog-runtime-BD9GSpc6.js";
2
- import { j as create } from "../credentialed-lukuD-cc.js";
3
- import { t as disconnectStateAdapter } from "../adapter-04AcD2SO.js";
4
- import { n as resolve } from "../resolve-Cpa4Bu1O.js";
1
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-Bdym_wKy.js";
2
+ import { nt as create } from "../credentialed-BeBaJMZ_.js";
3
+ import { t as disconnectStateAdapter } from "../adapter-BQNTKVTF.js";
4
+ import { n as resolve } from "../resolve-BkAA1wH7.js";
5
5
  // src/cli/snapshot-create.ts
6
6
  const DEFAULT_RUNTIME = "node22";
7
7
  const DEFAULT_TIMEOUT_MS = 6e5;
@@ -1,4 +1,4 @@
1
- import "../db-BU4LQD8s.js";
1
+ import "../db-BYOuu6v2.js";
2
2
  import { n as JuniorPluginSet } from "../plugins-B_0Cr0MO.js";
3
3
  interface UpgradeIo {
4
4
  info: (line: string) => void;
@@ -1,6 +1,6 @@
1
- import { i as getChatConfig } from "../config-DrTeF80T.js";
2
- import { t as createJuniorSqlExecutor } from "../executor-4vhvsMZJ.js";
3
- import { t as createPluginCatalogRuntime } from "../registry-BgecKva0.js";
1
+ import { i as getChatConfig } from "../config-Dm3pWRqY.js";
2
+ import { t as createJuniorSqlExecutor } from "../executor-BB6eJkD4.js";
3
+ import { t as createPluginCatalogRuntime } from "../registry-CndmkP2P.js";
4
4
  import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-DOm9Y6qI.js";
5
5
  import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
6
6
  import { basename, dirname, join, resolve } from "node:path";
@@ -1,5 +1,5 @@
1
- import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-DLSpkSSr.js";
2
- import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-CxlOCiUo.js";
1
+ import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-C6EdT6PP.js";
2
+ import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-C1pJ89rs.js";
3
3
  import { calculateCost, completeSimple, getEnvApiKey, getModels, registerApiProvider } from "@earendil-works/pi-ai/compat";
4
4
  import { stream as streamAnthropic, streamSimple as streamSimpleAnthropic } from "@earendil-works/pi-ai/api/anthropic-messages";
5
5
  import { createGatewayProvider } from "@ai-sdk/gateway";
@@ -23,14 +23,15 @@ function toOptionalTrimmed(value) {
23
23
  * project. Fall back to AI_GATEWAY_API_KEY for local/CI and non-Vercel hosts.
24
24
  * Never cache resolved tokens: runtime OIDC rotates on each invocation.
25
25
  */
26
- const MISSING_GATEWAY_CREDENTIALS_ERROR = "Missing AI gateway credentials (enable Vercel OIDC or set AI_GATEWAY_API_KEY)";
26
+ const UNAUTHENTICATED_GATEWAY_TOKEN = "unauthenticated";
27
27
  /**
28
- * Resolve the preferred AI Gateway bearer credential.
28
+ * Resolve the AI Gateway bearer credential.
29
29
  *
30
30
  * Order:
31
31
  * 1. Vercel OIDC via `@vercel/oidc` (request header `x-vercel-oidc-token`,
32
32
  * then `VERCEL_OIDC_TOKEN`, with local refresh when needed)
33
33
  * 2. Explicit `AI_GATEWAY_API_KEY` / pi-ai env mapping for vercel-ai-gateway
34
+ * 3. A placeholder token (`mode: "none"`), so auth fails on the server side
34
35
  */
35
36
  async function resolveGatewayCredential() {
36
37
  try {
@@ -45,10 +46,14 @@ async function resolveGatewayCredential() {
45
46
  mode: "api_key",
46
47
  token: apiKey
47
48
  };
49
+ return {
50
+ mode: "none",
51
+ token: UNAUTHENTICATED_GATEWAY_TOKEN
52
+ };
48
53
  }
49
54
  /** Resolve the bearer token string for Authorization headers and Pi getApiKey. */
50
55
  async function getGatewayApiKey() {
51
- return (await resolveGatewayCredential())?.token;
56
+ return (await resolveGatewayCredential()).token;
52
57
  }
53
58
  // src/chat/services/provider-error.ts
54
59
  /** Structured failure produced at an AI provider boundary. */
@@ -410,7 +415,10 @@ const EMBEDDING_INPUT_COST_USD_PER_MILLION_TOKENS = {
410
415
  "openai/text-embedding-3-small": .02,
411
416
  "openai/text-embedding-ada-002": .1,
412
417
  "voyage/voyage-3.5": .06,
413
- "voyage/voyage-3.5-lite": .02
418
+ "voyage/voyage-3.5-lite": .02,
419
+ "voyage/voyage-4": .06,
420
+ "voyage/voyage-4-large": .12,
421
+ "voyage/voyage-4-lite": .02
414
422
  };
415
423
  const DECISION_INPUT_COST_USD_PER_MILLION_TOKENS = {
416
424
  "openai/gpt-6-luna-decisions": .1,
@@ -437,8 +445,8 @@ function resolveGatewayModel(modelId) {
437
445
  async function completeText(params) {
438
446
  const model = resolveGatewayModel(params.modelId);
439
447
  const credential = await resolveGatewayCredential();
440
- const apiKey = credential?.token;
441
- const authMode = credential?.mode ?? "api_key";
448
+ const apiKey = credential.token;
449
+ const authMode = credential.mode;
442
450
  const effectivePrivacy = getCurrentConversationPrivacy() ?? "private";
443
451
  const messageAttributeMode = params.messageAttributeMode ?? (effectivePrivacy === "public" ? "content" : "metadata");
444
452
  const requestMessagesAttribute = messageAttributeMode === "content" ? serializeGenAiAttribute(params.messages.map(toCanonicalInputMessage)) : void 0;
@@ -475,7 +483,7 @@ async function completeText(params) {
475
483
  systemPrompt: params.system,
476
484
  messages: params.messages
477
485
  }, {
478
- ...apiKey ? { apiKey } : void 0,
486
+ apiKey,
479
487
  temperature: params.temperature,
480
488
  maxTokens: params.maxTokens,
481
489
  reasoning: params.thinkingLevel,
@@ -566,7 +574,7 @@ function bestEffortObjectCompletionCost(modelId, usage) {
566
574
  /** Execute a schema-constrained completion using the AI SDK structured output path. */
567
575
  async function completeObject(params) {
568
576
  const credential = await resolveGatewayCredential();
569
- const provider = createGatewayProvider(credential ? { apiKey: credential.token } : {});
577
+ const provider = createGatewayProvider({ apiKey: credential.token });
570
578
  let result;
571
579
  try {
572
580
  result = await withSpan(`${GEN_AI_OPERATION_CHAT} ${params.modelId}`, "gen_ai.chat", logContextFromMetadata(params.modelId, params.metadata), async (setSpanAttributes) => {
@@ -592,7 +600,7 @@ async function completeObject(params) {
592
600
  ...params.promptName ? { "gen_ai.prompt.name": params.promptName } : void 0,
593
601
  "server.address": GEN_AI_SERVER_ADDRESS,
594
602
  "server.port": 443,
595
- "gen_ai.provider.auth_mode": credential?.mode ?? "api_key",
603
+ "gen_ai.provider.auth_mode": credential.mode,
596
604
  ...params.thinkingLevel ? { "gen_ai.request.reasoning.level": params.thinkingLevel } : void 0,
597
605
  ...params.temperature !== void 0 ? { "gen_ai.request.temperature": params.temperature } : void 0,
598
606
  ...params.maxTokens !== void 0 ? { "gen_ai.request.max_tokens": params.maxTokens } : void 0
@@ -612,7 +620,7 @@ async function completeObject(params) {
612
620
  /** Answer typed decision questions with an AI Gateway decision model, such as Jev. */
613
621
  async function completeDecision(params) {
614
622
  const credential = await resolveGatewayCredential();
615
- const provider = createGatewayProvider(credential ? { apiKey: credential.token } : {});
623
+ const provider = createGatewayProvider({ apiKey: credential.token });
616
624
  try {
617
625
  const result = await withSpan(`${GEN_AI_OPERATION_DECIDE} ${params.modelId}`, "gen_ai.decide", logContextFromMetadata(params.modelId, params.metadata), async (setSpanAttributes) => {
618
626
  const result = await experimental_decide({
@@ -640,7 +648,7 @@ async function completeDecision(params) {
640
648
  ...params.promptName ? { "gen_ai.prompt.name": params.promptName } : void 0,
641
649
  "server.address": GEN_AI_SERVER_ADDRESS,
642
650
  "server.port": 443,
643
- "gen_ai.provider.auth_mode": credential?.mode ?? "api_key"
651
+ "gen_ai.provider.auth_mode": credential.mode
644
652
  });
645
653
  return {
646
654
  answers: result.answers,
@@ -653,17 +661,24 @@ async function completeDecision(params) {
653
661
  });
654
662
  }
655
663
  }
664
+ /** Map the input type to the provider option for models that embed queries and documents differently. */
665
+ function embeddingProviderOptions(modelId, inputType) {
666
+ if (inputType === void 0 || !modelId.startsWith("voyage/")) return;
667
+ return { voyage: { inputType } };
668
+ }
656
669
  /** Generate text embeddings through the host-owned AI Gateway provider. */
657
670
  async function embedTexts(params) {
658
671
  const texts = params.texts.map((text) => text.trim());
659
672
  if (texts.length === 0 || texts.some((text) => text.length === 0)) throw new Error("Embedding text is required.");
660
673
  const credential = await resolveGatewayCredential();
661
- const provider = createGatewayProvider(credential ? { apiKey: credential.token } : {});
674
+ const provider = createGatewayProvider({ apiKey: credential.token });
675
+ const providerOptions = embeddingProviderOptions(params.modelId, params.inputType);
662
676
  try {
663
677
  const result = await withSpan(`${GEN_AI_OPERATION_EMBEDDINGS} ${params.modelId}`, "gen_ai.embeddings", logContextFromMetadata(params.modelId, params.metadata), async (setSpanAttributes) => {
664
678
  const result = await embedMany({
665
679
  model: provider.embeddingModel(params.modelId),
666
680
  values: texts,
681
+ ...providerOptions !== void 0 ? { providerOptions } : void 0,
667
682
  ...params.signal !== void 0 ? { abortSignal: params.signal } : void 0
668
683
  });
669
684
  const dimensions = result.embeddings[0]?.length;
@@ -693,7 +708,7 @@ async function embedTexts(params) {
693
708
  "gen_ai.request.model": params.modelId,
694
709
  "server.address": GEN_AI_SERVER_ADDRESS,
695
710
  "server.port": 443,
696
- "gen_ai.provider.auth_mode": credential?.mode ?? "api_key"
711
+ "gen_ai.provider.auth_mode": credential.mode
697
712
  });
698
713
  return {
699
714
  ...result.costUsd !== void 0 ? { costUsd: result.costUsd } : void 0,
@@ -713,4 +728,4 @@ async function embedTexts(params) {
713
728
  throw providerError;
714
729
  }
715
730
  }
716
- export { toOptionalTrimmed as C, resolveGatewayCredential as S, getProviderErrorAttributes as _, completeText as a, MISSING_GATEWAY_CREDENTIALS_ERROR as b, COMPACTION_SUMMARY_PREFIX as c, renderCurrentInstruction as d, unwrapCurrentInstruction as f, findProviderError as g, createProviderError as h, completeObject as i, hasCompactedConversationContext as l, ProviderError as m, GEN_AI_SERVER_ADDRESS as n, embedTexts as o, escapeXml as p, completeDecision as r, resolveGatewayModel as s, GEN_AI_PROVIDER_NAME as t, isCompactionSummaryText as u, getProviderErrorUserMessage as v, getGatewayApiKey as x, isProviderRetryError as y };
731
+ export { toOptionalTrimmed as S, getProviderErrorAttributes as _, completeText as a, getGatewayApiKey as b, COMPACTION_SUMMARY_PREFIX as c, renderCurrentInstruction as d, unwrapCurrentInstruction as f, findProviderError as g, createProviderError as h, completeObject as i, hasCompactedConversationContext as l, ProviderError as m, GEN_AI_SERVER_ADDRESS as n, embedTexts as o, escapeXml as p, completeDecision as r, resolveGatewayModel as s, GEN_AI_PROVIDER_NAME as t, isCompactionSummaryText as u, getProviderErrorUserMessage as v, resolveGatewayCredential as x, isProviderRetryError as y };
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
- import { C as toOptionalTrimmed, s as resolveGatewayModel } from "./client-C1yDYjoS.js";
3
- import { h as logWarn } from "./logging-DLSpkSSr.js";
4
- import { l as TURN_REASONING_LEVELS, s as modelProfileSchema, t as DEFAULT_MODEL_PROFILES, u as parseTurnReasoningLevel } from "./model-profile-Bg8EoCKD.js";
2
+ import { S as toOptionalTrimmed, s as resolveGatewayModel } from "./client-B2MjENki.js";
3
+ import { h as logWarn } from "./logging-C6EdT6PP.js";
4
+ import { c as modelProfileSchema, d as parseTurnReasoningLevel, t as DEFAULT_MODEL_PROFILES, u as TURN_REASONING_LEVELS } from "./model-profile-B998sjVd.js";
5
5
  import { AwsClient } from "aws4fetch";
6
6
  // src/chat/attachments/s3.ts
7
7
  function readRequiredSetting(env, name) {
@@ -1,13 +1,13 @@
1
- import { Jt as failTurnRecord, Wt as loadTurnCheckpoint, Yt as getTurnRecord, j as resolveTurnSessionRouting } from "./tasks-SB9z-VTU.js";
2
- import { n as botConfig } from "./config-DrTeF80T.js";
3
- import { T as deleteProviderIdentityForUser, d as getConversationEventStore, h as getSqlExecutor, w as deleteProviderIdentityForSlackUser } from "./viewer-CpXTGlep.js";
4
- import { u as hasRequiredOAuthScope } from "./registry-BgecKva0.js";
5
- import { n as pluginCatalogRuntime } from "./catalog-runtime-BD9GSpc6.js";
6
- import { c as deleteMcpServerSessionId, l as deleteMcpStoredOAuthCredentials, s as deleteMcpAuthSessionsForUserProvider } from "./agent-runner-CAYfFmU7.js";
7
- import { H as startOAuthFlow } from "./credentialed-lukuD-cc.js";
8
- import { i as getStateAdapter } from "./adapter-04AcD2SO.js";
9
- import { a as getVercelConversationWorkQueue } from "./job-queue-In9QKz-I.js";
10
- import { m as ensureConversationWake, w as requestConversationWork } from "./store-zPEoJPBB.js";
1
+ import { Cn as loadTurnCheckpoint, Dn as failTurnRecord, On as getTurnRecord, n as resolveTurnSessionRouting } from "./turn-session-routing-B9KLBhaT.js";
2
+ import { n as botConfig } from "./config-Dm3pWRqY.js";
3
+ import { C as getSqlExecutor, F as deleteProviderIdentityForUser, P as deleteProviderIdentityForSlackUser, y as getConversationEventStore } from "./viewer-BTgAfdUg.js";
4
+ import { u as hasRequiredOAuthScope } from "./registry-CndmkP2P.js";
5
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-Bdym_wKy.js";
6
+ import { c as deleteMcpServerSessionId, l as deleteMcpStoredOAuthCredentials, s as deleteMcpAuthSessionsForUserProvider } from "./agent-runner-MSQSMFkq.js";
7
+ import { pt as startOAuthFlow } from "./credentialed-BeBaJMZ_.js";
8
+ import { r as getStateAdapter } from "./adapter-BQNTKVTF.js";
9
+ import { a as getVercelConversationWorkQueue } from "./job-queue-DiaXoSDg.js";
10
+ import { m as ensureConversationWake, w as requestConversationWork } from "./store-BeWGgaMA.js";
11
11
  import { z } from "zod";
12
12
  import { randomBytes, randomUUID } from "node:crypto";
13
13
  // src/chat/task-execution/authorized-turn.ts