@sentry/junior 0.251.0 → 0.253.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 (59) hide show
  1. package/dist/{admin-Dth5-1lw.js → admin-CZnlnlg9.js} +1 -1
  2. package/dist/{agent-hooks-Ctw_jKaS.js → agent-hooks-CvcbAtJH.js} +8 -8
  3. package/dist/{agent-runner-dgQdPoGH.js → agent-runner-B4FMVbCs.js} +20 -20
  4. package/dist/api/schema.d.ts +32 -32
  5. package/dist/api.js +22 -22
  6. package/dist/app.js +122 -84
  7. package/dist/{assistant-reply-DBFRnZRx.js → assistant-reply-BU05IECs.js} +1 -1
  8. package/dist/{briefs-SDwPKduW.js → briefs-DyspoG90.js} +2 -2
  9. package/dist/{catalog-runtime-ulFceOA-.js → catalog-runtime-Br8s-TYx.js} +1 -1
  10. package/dist/cli/chat.js +15 -15
  11. package/dist/cli/check.js +3 -3
  12. package/dist/cli/main.js +2 -2
  13. package/dist/cli/plugins.js +4 -4
  14. package/dist/cli/snapshot-create.js +3 -3
  15. package/dist/cli/upgrade.js +3 -3
  16. package/dist/{client-DMt9kArs.js → client-CRVXpEWi.js} +2 -2
  17. package/dist/{config-iEOq080E.js → config-B7joRWt7.js} +2 -2
  18. package/dist/{connections-BFU6GarA.js → connections-CGPYNw2B.js} +9 -9
  19. package/dist/{conversation-privacy-yZhQHnBe.js → conversation-privacy-0JuTT_OJ.js} +1 -1
  20. package/dist/{credential-sync-GW0Rj57H.js → credential-sync-C-k3fnY5.js} +14 -14
  21. package/dist/{executor-BeH9LDKI.js → executor-YL577nNt.js} +88 -20
  22. package/dist/{images-hIXWwpRg.js → images-DopOctPc.js} +2 -2
  23. package/dist/instrumentation.js +2 -2
  24. package/dist/{job-queue-Bxlao6zL.js → job-queue-CIhKXUE3.js} +1 -1
  25. package/dist/{logging-BkI10z0D.js → logging-B0QxCh3D.js} +1 -1
  26. package/dist/{message-BUcVfXmK.js → message-DQvor8lM.js} +3 -3
  27. package/dist/nitro.js +3 -3
  28. package/dist/{oauth-callback-server-CYSEV35l.js → oauth-callback-server-BT7cSxBm.js} +2 -2
  29. package/dist/{pending-auth-h0B3FQEo.js → pending-auth-CwA1uLA9.js} +2 -2
  30. package/dist/{profile-AsD2uz0m.js → profile-p1oiViVs.js} +4 -4
  31. package/dist/{registry-CN2Nie72.js → registry-BO2LM2oW.js} +1 -1
  32. package/dist/{resolve-CrgwPWTS.js → resolve-CtWKGuKE.js} +2 -2
  33. package/dist/{result-Cokw_MYC.js → result-DR5JTBcb.js} +6 -6
  34. package/dist/{runner-D-VZlBb_.js → runner-BIxTJF9a.js} +9 -9
  35. package/dist/{sandbox-egress-signals-Sie51RW0.js → sandbox-egress-signals-DF3Pu813.js} +1 -1
  36. package/dist/{session-stop-DD0k0BXI.js → session-stop-BRq8Vxrr.js} +10 -10
  37. package/dist/{skills-CpyJJyqH.js → skills-DitcC3Vw.js} +2 -2
  38. package/dist/{spawn-DX3YjDtm.js → spawn-CHQ42PAo.js} +2 -2
  39. package/dist/{store-D-n2b2cI.js → store-DIFp9K52.js} +6 -6
  40. package/dist/{task-queue-Bj2hFpjr.js → task-queue-UAeJGLYM.js} +3 -3
  41. package/dist/{task-runner-B3g16wjr.js → task-runner-DwD-i2ta.js} +147 -131
  42. package/dist/{tasks-DDzBxMio.js → tasks-DThIG7F-.js} +136 -218
  43. package/dist/{thread-state-BlD6loX7.js → thread-state-BQxkL7Xm.js} +6 -6
  44. package/dist/{turn-failure-response-BRlfATgu.js → turn-failure-response-OAIxgzNh.js} +7 -7
  45. package/dist/{turn-lifecycle-hMCbr_Ah.js → turn-lifecycle-BAEJpjDI.js} +1 -1
  46. package/dist/{turn-session-routing-DLb6eQMT.js → turn-session-routing-F5s728f0.js} +1 -1
  47. package/dist/{validation-C2lG6yVH.js → validation-DFM4-vDr.js} +1 -1
  48. package/dist/{version-CyJ_kMe8.js → version-B80CD9sN.js} +1 -1
  49. package/dist/version.js +1 -1
  50. package/dist/{viewer-C8u1HAdN.js → viewer-CPxNfHWa.js} +3 -3
  51. package/dist/{web-input-DHgIfSwj.js → web-input-DIO177R0.js} +80 -121
  52. package/dist/{work-hoPN8qjl.js → work-Dl5KPKjW.js} +9 -9
  53. package/dist/{worker-CavJZxi8.js → worker-CJkE86Co.js} +5 -5
  54. package/migrations/0055_automations.sql +125 -0
  55. package/migrations/0056_automation_runs.sql +69 -0
  56. package/migrations/meta/0055_snapshot.json +3948 -0
  57. package/migrations/meta/0056_snapshot.json +4280 -0
  58. package/migrations/meta/_journal.json +14 -0
  59. package/package.json +4 -4
@@ -1,6 +1,6 @@
1
- import { d as logException } from "./logging-BkI10z0D.js";
1
+ import { d as logException } from "./logging-B0QxCh3D.js";
2
2
  import { g as startSpanManual } from "./sentry-CgWZM_kV.js";
3
- import "./config-iEOq080E.js";
3
+ import "./config-B7joRWt7.js";
4
4
  import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, f as timestamptz, i as juniorAgentBindings, l as juniorUsers, s as juniorConversations } from "./agent-invocations-D_YoNnAn.js";
5
5
  import { AsyncLocalStorage } from "node:async_hooks";
6
6
  import { sql } from "drizzle-orm";
@@ -285,13 +285,10 @@ const juniorEventAutomations = pgTable("junior_event_tasks", {
285
285
  namespace: text("namespace").notNull(),
286
286
  identifier: text("identifier").notNull(),
287
287
  createdAtMs: bigint("created_at_ms", { mode: "number" }).notNull(),
288
- /** Retained row status. Deleted tasks keep history but stop matching. */
289
- status: text("status").$type().notNull().default("active"),
290
- /** Why a run blocked this automation. Kept while paused; cleared on resume. */
288
+ status: text("status").notNull().default("active"),
291
289
  statusReason: text("status_reason"),
292
- /** Short display title generated from the task instruction. */
293
290
  title: text("title"),
294
- task: jsonb("task_json").$type().notNull()
291
+ task: jsonb("task_json").notNull()
295
292
  }, (table) => [index("junior_event_tasks_team_idx").on(table.teamId, table.createdAtMs, table.id).where(sql`${table.status} <> 'deleted'`), index("junior_event_tasks_match_idx").on(table.namespace, table.identifier, table.createdAtMs, table.id).where(sql`${table.status} <> 'deleted'`)]);
296
293
  //#endregion
297
294
  //#region src/db/schema/stats.ts
@@ -317,7 +314,6 @@ const juniorStats = pgTable("junior_stats", {
317
314
  })]);
318
315
  //#endregion
319
316
  //#region src/db/schema/automation-executions.ts
320
- /** One terminal automation execution linked to its durable conversation when present. */
321
317
  const juniorAutomationExecutions = pgTable("junior_task_executions", {
322
318
  executionId: text("execution_id").notNull(),
323
319
  kind: text("kind").notNull(),
@@ -347,10 +343,77 @@ const juniorAutomationExecutions = pgTable("junior_task_executions", {
347
343
  index("junior_task_executions_conversation_time_idx").on(table.conversationId, table.executedAtMs)
348
344
  ]);
349
345
  //#endregion
346
+ //#region src/db/schema/automations.ts
347
+ /**
348
+ * One row per Automation of either kind. `record` holds the fields that have
349
+ * no column. Each write also copies the nested fields that queries filter or
350
+ * search on into columns: `team_id`, `channel_id`, `creator_slack_user_id`,
351
+ * `instruction`, and the event trigger `namespace` and `identifier`.
352
+ */
353
+ const juniorAutomations = pgTable("junior_automations", {
354
+ id: text("id").primaryKey(),
355
+ kind: text("kind").$type().notNull(),
356
+ teamId: text("team_id").notNull(),
357
+ channelId: text("channel_id").notNull(),
358
+ creatorSlackUserId: text("creator_slack_user_id").notNull(),
359
+ /** Provider identity that created a Scheduled automation. */
360
+ creatorIdentityId: text("creator_identity_id"),
361
+ status: text("status").$type().notNull(),
362
+ /** Why a run blocked this Automation, until its creator resumes it. */
363
+ statusReason: text("status_reason"),
364
+ title: text("title"),
365
+ instruction: text("instruction").notNull(),
366
+ createdAtMs: bigint("created_at_ms", { mode: "number" }).notNull(),
367
+ nextRunAtMs: bigint("next_run_at_ms", { mode: "number" }),
368
+ runNowAtMs: bigint("run_now_at_ms", { mode: "number" }),
369
+ namespace: text("namespace"),
370
+ identifier: text("identifier"),
371
+ record: jsonb("record").$type().notNull()
372
+ }, (table) => [
373
+ check("junior_automations_kind_check", sql`${table.kind} in ('scheduled', 'event')`),
374
+ check("junior_automations_status_check", sql`${table.status} in ('active', 'blocked', 'paused', 'completed', 'deleted')`),
375
+ check("junior_automations_record_check", sql`jsonb_typeof(${table.record}) = 'object'`),
376
+ check("junior_automations_trigger_check", sql`(${table.kind} = 'scheduled' and ${table.namespace} is null and ${table.identifier} is null) or (${table.kind} = 'event' and ${table.namespace} is not null and ${table.identifier} is not null and ${table.nextRunAtMs} is null and ${table.runNowAtMs} is null and ${table.status} <> 'completed')`),
377
+ index("junior_automations_team_idx").on(table.teamId, table.createdAtMs, table.id).where(sql`${table.status} <> 'deleted'`),
378
+ index("junior_automations_creator_idx").on(table.teamId, table.creatorSlackUserId, table.createdAtMs, table.id),
379
+ index("junior_automations_creator_identity_idx").on(table.creatorIdentityId, table.createdAtMs, table.id).where(sql`${table.creatorIdentityId} IS NOT NULL`),
380
+ index("junior_automations_run_now_due_idx").on(table.runNowAtMs, table.createdAtMs, table.id).where(sql`${table.status} = 'active' AND ${table.runNowAtMs} IS NOT NULL`),
381
+ index("junior_automations_next_run_due_idx").on(table.nextRunAtMs, table.createdAtMs, table.id).where(sql`${table.status} = 'active' AND ${table.nextRunAtMs} IS NOT NULL`),
382
+ index("junior_automations_match_idx").on(table.namespace, table.identifier, table.createdAtMs, table.id).where(sql`${table.status} <> 'deleted'`)
383
+ ]);
384
+ //#endregion
385
+ //#region src/db/schema/automation-runs.ts
386
+ /**
387
+ * One dispatch of an Automation, from claim or dispatch to its outcome. A
388
+ * Scheduled automation run id is `<automation id>:<scheduled time>`. An event
389
+ * automation run id is its dispatch id. Automation code sets
390
+ * `conversation_id` when it dispatches the run. A run that was skipped, or
391
+ * that failed before dispatch, has no Conversation.
392
+ */
393
+ const juniorAutomationRuns = pgTable("junior_automation_runs", {
394
+ id: text("id").primaryKey(),
395
+ automationId: text("automation_id").notNull().references(() => juniorAutomations.id, { onDelete: "cascade" }),
396
+ conversationId: text("conversation_id").unique().references(() => juniorConversations.conversationId),
397
+ status: text("status").$type().notNull(),
398
+ scheduledForMs: bigint("scheduled_for_ms", { mode: "number" }),
399
+ attempt: integer("attempt"),
400
+ claimedAtMs: bigint("claimed_at_ms", { mode: "number" }),
401
+ dispatchId: text("dispatch_id"),
402
+ startedAtMs: bigint("started_at_ms", { mode: "number" }),
403
+ completedAtMs: bigint("completed_at_ms", { mode: "number" }),
404
+ errorMessage: text("error_message"),
405
+ resultMessageTs: text("result_message_ts")
406
+ }, (table) => [
407
+ check("junior_automation_runs_status_check", sql`${table.status} in ('pending', 'running', 'completed', 'failed', 'blocked', 'skipped')`),
408
+ index("junior_automation_runs_automation_idx").on(table.automationId, table.completedAtMs),
409
+ index("junior_automation_runs_completed_idx").on(table.completedAtMs),
410
+ index("junior_automation_runs_incomplete_idx").on(table.automationId, table.scheduledForMs).where(sql`${table.status} in ('pending', 'running')`)
411
+ ]);
412
+ //#endregion
350
413
  //#region src/db/schema/automation-versions.ts
351
414
  /** One saved Automation definition. Lifecycle and scheduler state are not versioned. */
352
415
  const juniorAutomationVersions = pgTable("junior_automation_versions", {
353
- kind: text("kind").$type().notNull(),
416
+ kind: text("kind").$type(),
354
417
  automationId: text("automation_id").notNull(),
355
418
  /** Starts at 1 and increases by 1 for each saved definition change. */
356
419
  version: integer("version").notNull(),
@@ -358,14 +421,18 @@ const juniorAutomationVersions = pgTable("junior_automation_versions", {
358
421
  /** Slack principal that saved this definition. Null when unknown. */
359
422
  editedBy: jsonb("edited_by"),
360
423
  definition: jsonb("definition").notNull()
361
- }, (table) => [check("junior_automation_versions_kind_check", sql`${table.kind} in ('scheduled', 'event')`), primaryKey({
362
- name: "junior_automation_versions_pk",
363
- columns: [
364
- table.kind,
365
- table.automationId,
366
- table.version
367
- ]
368
- })]);
424
+ }, (table) => [
425
+ check("junior_automation_versions_kind_check", sql`${table.kind} in ('scheduled', 'event')`),
426
+ primaryKey({
427
+ name: "junior_automation_versions_pk",
428
+ columns: [table.automationId, table.version]
429
+ }),
430
+ foreignKey({
431
+ name: "junior_automation_versions_automation_id_fk",
432
+ columns: [table.automationId],
433
+ foreignColumns: [juniorAutomations.id]
434
+ }).onDelete("cascade")
435
+ ]);
369
436
  //#endregion
370
437
  //#region src/db/schema/scheduled-automations.ts
371
438
  const juniorSchedulerTasks = pgTable("junior_scheduler_tasks", {
@@ -377,9 +444,8 @@ const juniorSchedulerTasks = pgTable("junior_scheduler_tasks", {
377
444
  nextRunAtMs: bigint("next_run_at_ms", { mode: "number" }),
378
445
  runNowAtMs: bigint("run_now_at_ms", { mode: "number" }),
379
446
  createdAtMs: bigint("created_at_ms", { mode: "number" }).notNull(),
380
- /** Short display title generated from the task instruction. */
381
447
  title: text("title"),
382
- record: jsonb("record").$type().notNull()
448
+ record: jsonb("record").notNull()
383
449
  }, (table) => [
384
450
  index("junior_scheduler_tasks_creator_idx").on(table.teamId, table.creatorSlackUserId, table.createdAtMs, table.id).where(sql`${table.status} <> 'deleted'`),
385
451
  index("junior_scheduler_tasks_creator_identity_idx").on(table.creatorIdentityId, table.createdAtMs, table.id).where(sql`${table.status} <> 'deleted' AND ${table.creatorIdentityId} IS NOT NULL`),
@@ -473,7 +539,9 @@ const juniorSqlSchema = {
473
539
  juniorSnapshots,
474
540
  juniorStats,
475
541
  juniorAutomationExecutions,
542
+ juniorAutomationRuns,
476
543
  juniorAutomationVersions,
544
+ juniorAutomations,
477
545
  juniorSchedulerRuns,
478
546
  juniorSchedulerTasks,
479
547
  juniorUsers,
@@ -1018,4 +1086,4 @@ function createJuniorSqlExecutor(args) {
1018
1086
  });
1019
1087
  }
1020
1088
  //#endregion
1021
- export { juniorArtifacts as C, juniorAttachments as S, juniorConversationEvents as _, juniorSchedulerRuns as a, juniorCodeChanges as b, juniorAutomationExecutions as c, juniorLocationConfigurations as d, juniorConversationParticipants as f, juniorConversationMetrics as g, CONVERSATION_METRICS as h, juniorWorkspaces as i, juniorStats as l, juniorConversationBriefs as m, juniorSnapshots as n, juniorSchedulerTasks as o, juniorConversationBindings as p, juniorWorkspaceRepos as r, juniorAutomationVersions as s, createJuniorSqlExecutor as t, juniorEventAutomations as u, juniorApiTokens as v, juniorCodeRepositories as x, juniorConversationAnnotations as y };
1089
+ export { juniorConversationAnnotations as _, juniorAutomationVersions as a, juniorAttachments as b, juniorStats as c, juniorConversationBindings as d, juniorConversationBriefs as f, juniorApiTokens as g, juniorConversationEvents as h, juniorWorkspaces as i, juniorLocationConfigurations as l, juniorConversationMetrics as m, juniorSnapshots as n, juniorAutomationRuns as o, CONVERSATION_METRICS as p, juniorWorkspaceRepos as r, juniorAutomations as s, createJuniorSqlExecutor as t, juniorConversationParticipants as u, juniorCodeChanges as v, juniorArtifacts as x, juniorCodeRepositories as y };
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { D as storeAttachment, T as readLiveAttachment } from "./agent-runner-dgQdPoGH.js";
3
- import { f as getSqlExecutor } from "./viewer-C8u1HAdN.js";
2
+ import { D as storeAttachment, T as readLiveAttachment } from "./agent-runner-B4FMVbCs.js";
3
+ import { f as getSqlExecutor } from "./viewer-CPxNfHWa.js";
4
4
  import { L as detectImageMediaType } from "./conversation-T18Xlkx9.js";
5
5
  //#region src/chat/attachments/images.ts
6
6
  var images_exports = /* @__PURE__ */ __exportAll({
@@ -1,6 +1,6 @@
1
- import { N as getDeploymentServiceVersion, P as getDeploymentTelemetryAttributes } from "./logging-BkI10z0D.js";
1
+ import { N as getDeploymentServiceVersion, P as getDeploymentTelemetryAttributes } from "./logging-B0QxCh3D.js";
2
2
  import { _ as vercelAIIntegration, a as getClient, b as withStreamedSpan, c as init, o as getGlobalScope } from "./sentry-CgWZM_kV.js";
3
- import { n as getCurrentConversationPrivacy } from "./conversation-privacy-yZhQHnBe.js";
3
+ import { n as getCurrentConversationPrivacy } from "./conversation-privacy-0JuTT_OJ.js";
4
4
  import { t as consumePrivateTraceResultMarker } from "./private-trace-result-BLvBjy_e.js";
5
5
  //#region src/chat/sentry-payload-filter.ts
6
6
  const PAYLOAD_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
@@ -1,4 +1,4 @@
1
- import { i as getChatConfig } from "./config-iEOq080E.js";
1
+ import { i as getChatConfig } from "./config-B7joRWt7.js";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  import { z } from "zod";
4
4
  import { createHash, createHmac, timingSafeEqual } from "node:crypto";
@@ -1,5 +1,5 @@
1
1
  import { d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException, y as withScope } from "./sentry-CgWZM_kV.js";
2
- import { t as JUNIOR_VERSION } from "./version-CyJ_kMe8.js";
2
+ import { t as JUNIOR_VERSION } from "./version-B80CD9sN.js";
3
3
  import path from "node:path";
4
4
  import { styleText } from "node:util";
5
5
  import { ConfigError, configureSync, getConfig, getLogger } from "@logtape/logtape";
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { Ht as toolInvocationDestination, Q as getActiveAgentInvocationForConversation, Vt as actorFromRun, Y as createAgentInvocationForMessage, Z as findChildAgentConversationId, _t as AgentMessageTargetError, vt as PARENT_AGENT_TARGET } from "./agent-runner-dgQdPoGH.js";
3
- import { n as enqueueAgentMessageToParent } from "./result-Cokw_MYC.js";
4
- import { r as enqueueAgentInvocation } from "./work-hoPN8qjl.js";
2
+ import { Ht as toolInvocationDestination, Q as getActiveAgentInvocationForConversation, Vt as actorFromRun, Y as createAgentInvocationForMessage, Z as findChildAgentConversationId, _t as AgentMessageTargetError, vt as PARENT_AGENT_TARGET } from "./agent-runner-B4FMVbCs.js";
3
+ import { n as enqueueAgentMessageToParent } from "./result-DR5JTBcb.js";
4
+ import { r as enqueueAgentInvocation } from "./work-Dl5KPKjW.js";
5
5
  //#region src/chat/agent-invocations/message.ts
6
6
  var message_exports = /* @__PURE__ */ __exportAll({ bindMessageAgent: () => bindMessageAgent });
7
7
  /**
package/dist/nitro.js CHANGED
@@ -1,8 +1,8 @@
1
- import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-BkI10z0D.js";
1
+ import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-B0QxCh3D.js";
2
2
  import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-BVvSnQBB.js";
3
- import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-Bxlao6zL.js";
3
+ import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-CIhKXUE3.js";
4
4
  import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-egKWjgue.js";
5
- import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-Bj2hFpjr.js";
5
+ import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-UAeJGLYM.js";
6
6
  import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-CVvEUSMH.js";
7
7
  import path from "node:path";
8
8
  import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
@@ -1,5 +1,5 @@
1
- import { Lt as createUserTokenStore } from "./agent-runner-dgQdPoGH.js";
2
- import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-GW0Rj57H.js";
1
+ import { Lt as createUserTokenStore } from "./agent-runner-B4FMVbCs.js";
2
+ import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-C-k3fnY5.js";
3
3
  import { createServer } from "node:http";
4
4
  //#region src/chat/local/oauth-callback-server.ts
5
5
  const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
@@ -1,5 +1,5 @@
1
- import { v as isProviderRetryError } from "./client-DMt9kArs.js";
2
- import { Y as abandonTurnRecord, un as estimateTextTokens } from "./tasks-DDzBxMio.js";
1
+ import { v as isProviderRetryError } from "./client-CRVXpEWi.js";
2
+ import { Y as abandonTurnRecord, un as estimateTextTokens } from "./tasks-DThIG7F-.js";
3
3
  import { r as isExperimentalFeatureEnabled } from "./experimental-Qn9rKLgx.js";
4
4
  import { z } from "zod";
5
5
  //#region src/chat/state/turn-id.ts
@@ -1,7 +1,7 @@
1
- import { S as toOptionalTrimmed } from "./client-DMt9kArs.js";
2
- import { v as setSpanAttributes, y as setSpanStatus } from "./logging-BkI10z0D.js";
3
- import { i as getChatConfig } from "./config-iEOq080E.js";
4
- import { n as pluginCatalogRuntime } from "./catalog-runtime-ulFceOA-.js";
1
+ import { S as toOptionalTrimmed } from "./client-CRVXpEWi.js";
2
+ import { v as setSpanAttributes, y as setSpanStatus } from "./logging-B0QxCh3D.js";
3
+ import { i as getChatConfig } from "./config-B7joRWt7.js";
4
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-Br8s-TYx.js";
5
5
  import { createHash } from "node:crypto";
6
6
  import { createMemoryState } from "@chat-adapter/state-memory";
7
7
  import { createRedisState } from "@chat-adapter/state-redis";
@@ -1,4 +1,4 @@
1
- import { f as logInfo, p as logWarn, v as setSpanAttributes } from "./logging-BkI10z0D.js";
1
+ import { f as logInfo, p as logWarn, v as setSpanAttributes } from "./logging-B0QxCh3D.js";
2
2
  import { o as parseActorUserId } from "./actor-BTtLaeWy.js";
3
3
  import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-BVvSnQBB.js";
4
4
  import path from "node:path";
@@ -1,5 +1,5 @@
1
- import { v as setSpanAttributes, w as withSpan } from "./logging-BkI10z0D.js";
2
- import { N as SANDBOX_WORKSPACE_ROOT, k as sleep, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-AsD2uz0m.js";
1
+ import { v as setSpanAttributes, w as withSpan } from "./logging-B0QxCh3D.js";
2
+ import { N as SANDBOX_WORKSPACE_ROOT, k as sleep, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-p1oiViVs.js";
3
3
  import { z } from "zod";
4
4
  import { FileSystem, Sandbox } from "@vercel/sandbox";
5
5
  //#region src/chat/sandbox/resources.ts
@@ -1,12 +1,12 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { $ as getAgentInvocation, X as createAgentInvocationFromLatest, ct as isTerminalAgentInvocation, et as getAgentInvocationIdForEvents, ft as markAgentInvocationParentMailboxAppended, it as getAgentInvocationResultMessageId, nt as getAgentInvocationIdForResult, st as getLatestAgentInvocationForConversation, tt as getAgentInvocationIdForMessage } from "./agent-runner-dgQdPoGH.js";
2
+ import { $ as getAgentInvocation, X as createAgentInvocationFromLatest, ct as isTerminalAgentInvocation, et as getAgentInvocationIdForEvents, ft as markAgentInvocationParentMailboxAppended, it as getAgentInvocationResultMessageId, nt as getAgentInvocationIdForResult, st as getLatestAgentInvocationForConversation, tt as getAgentInvocationIdForMessage } from "./agent-runner-B4FMVbCs.js";
3
3
  import { t as createActor } from "./actor-BTtLaeWy.js";
4
- import { d as credentialContextForActor } from "./registry-CN2Nie72.js";
5
- import { $ as listTurnSummaries, Q as getTurnRecord } from "./tasks-DDzBxMio.js";
6
- import { a as EVENT_WAIT_MS, c as timerWatchCredentialSubject, s as isEventMailboxMetadata } from "./session-stop-DD0k0BXI.js";
4
+ import { d as credentialContextForActor } from "./registry-BO2LM2oW.js";
5
+ import { $ as listTurnSummaries, Q as getTurnRecord } from "./tasks-DThIG7F-.js";
6
+ import { a as EVENT_WAIT_MS, c as timerWatchCredentialSubject, s as isEventMailboxMetadata } from "./session-stop-BRq8Vxrr.js";
7
7
  import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-C04mP1hu.js";
8
- import { r as appendAndEnqueueInboundMessage } from "./store-D-n2b2cI.js";
9
- import { r as enqueueAgentInvocation } from "./work-hoPN8qjl.js";
8
+ import { r as appendAndEnqueueInboundMessage } from "./store-DIFp9K52.js";
9
+ import { r as enqueueAgentInvocation } from "./work-Dl5KPKjW.js";
10
10
  import { z } from "zod";
11
11
  import { createEventSource, createLocalSource, createWebSource } from "@sentry/junior-plugin-api";
12
12
  //#region src/chat/task-execution/mailbox-input.ts
@@ -1,14 +1,14 @@
1
- import { C as withLogContext, b as setTags, d as logException } from "./logging-BkI10z0D.js";
2
- import { c as getConversationEventStore, u as getConversationStore } from "./viewer-C8u1HAdN.js";
3
- import { d as credentialContextForActor } from "./registry-CN2Nie72.js";
4
- import { At as loadProjection, Gt as hydrateConversationMessages, J as saveTurnCheckpoint, Kt as persistConversationMessages, Lt as recordAuthorizationCompleted, Tt as commitAcceptedReply, an as markConversationMessage, en as buildConversationContext, ln as upsertConversationMessage, on as normalizeConversationText, sn as recordDeliveredAssistantMessage, tt as persistWithRetry } from "./tasks-DDzBxMio.js";
1
+ import { C as withLogContext, b as setTags, d as logException } from "./logging-B0QxCh3D.js";
2
+ import { c as getConversationEventStore, u as getConversationStore } from "./viewer-CPxNfHWa.js";
3
+ import { d as credentialContextForActor } from "./registry-BO2LM2oW.js";
4
+ import { At as loadProjection, Gt as hydrateConversationMessages, J as saveTurnCheckpoint, Kt as persistConversationMessages, Lt as recordAuthorizationCompleted, Tt as commitAcceptedReply, an as markConversationMessage, en as buildConversationContext, ln as upsertConversationMessage, on as normalizeConversationText, sn as recordDeliveredAssistantMessage, tt as persistWithRetry } from "./tasks-DThIG7F-.js";
5
5
  import { K as messageCardText } from "./conversation-T18Xlkx9.js";
6
6
  import { f as markTurnFailed, p as startActiveTurn, t as authorizationId } from "./oauth-authorization-BA4Dt6a7.js";
7
- import { n as getAssistantReplyText } from "./assistant-reply-DBFRnZRx.js";
8
- import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-B3g16wjr.js";
9
- import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-hMCbr_Ah.js";
10
- import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BlD6loX7.js";
11
- import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-BRlfATgu.js";
7
+ import { n as getAssistantReplyText } from "./assistant-reply-BU05IECs.js";
8
+ import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-DwD-i2ta.js";
9
+ import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-BAEJpjDI.js";
10
+ import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BQxkL7Xm.js";
11
+ import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-OAIxgzNh.js";
12
12
  import { randomUUID } from "node:crypto";
13
13
  import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
14
14
  //#region src/chat/local/runner.ts
@@ -1,4 +1,4 @@
1
- import { Mt as sandboxEgressSignalsResponseSchema } from "./agent-runner-dgQdPoGH.js";
1
+ import { Mt as sandboxEgressSignalsResponseSchema } from "./agent-runner-B4FMVbCs.js";
2
2
  //#region src/chat/local/sandbox-egress-signals.ts
3
3
  const SANDBOX_EGRESS_SIGNALS_PATH = "/api/internal/sandbox-egress/signals";
4
4
  const LOCAL_DEV_SERVER_TIMEOUT_MS = 1e3;
@@ -1,16 +1,16 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { d as logException, f as logInfo, p as logWarn } from "./logging-BkI10z0D.js";
3
- import { n as botConfig } from "./config-iEOq080E.js";
4
- import { f as getSqlExecutor, u as getConversationStore } from "./viewer-C8u1HAdN.js";
2
+ import { d as logException, f as logInfo, p as logWarn } from "./logging-B0QxCh3D.js";
3
+ import { n as botConfig } from "./config-B7joRWt7.js";
4
+ import { f as getSqlExecutor, u as getConversationStore } from "./viewer-CPxNfHWa.js";
5
5
  import { s as juniorConversations } from "./agent-invocations-D_YoNnAn.js";
6
- import "./executor-BeH9LDKI.js";
7
- import { p as credentialSubjectSchema } from "./registry-CN2Nie72.js";
8
- import { V as postSlackMessage, _t as isToolResultError, ht as isAssistantMessage, vt as isToolResultMessage, wt as ToolInputError, yt as normalizeToolNameFromResult } from "./tasks-DDzBxMio.js";
9
- import { it as JUNIOR_THREAD_STATE_TTL_MS, rt as verifyTimerWatchCredentialSubject, u as getPlugins } from "./agent-hooks-Ctw_jKaS.js";
10
- import { w as getStateAdapter } from "./profile-AsD2uz0m.js";
11
- import { r as sanitizeAssistantText } from "./assistant-reply-DBFRnZRx.js";
6
+ import "./executor-YL577nNt.js";
7
+ import { p as credentialSubjectSchema } from "./registry-BO2LM2oW.js";
8
+ import { V as postSlackMessage, _t as isToolResultError, ht as isAssistantMessage, vt as isToolResultMessage, wt as ToolInputError, yt as normalizeToolNameFromResult } from "./tasks-DThIG7F-.js";
9
+ import { it as JUNIOR_THREAD_STATE_TTL_MS, rt as verifyTimerWatchCredentialSubject, u as getPlugins } from "./agent-hooks-CvcbAtJH.js";
10
+ import { w as getStateAdapter } from "./profile-p1oiViVs.js";
11
+ import { r as sanitizeAssistantText } from "./assistant-reply-BU05IECs.js";
12
12
  import { r as EVENT_AUTHOR_ID } from "./prompt-C04mP1hu.js";
13
- import { r as appendAndEnqueueInboundMessage } from "./store-D-n2b2cI.js";
13
+ import { r as appendAndEnqueueInboundMessage } from "./store-DIFp9K52.js";
14
14
  import { z } from "zod";
15
15
  import { eq, inArray } from "drizzle-orm";
16
16
  import { eventMatchSchema, normalizeEventIdentifier, objectTypeSchema } from "@sentry/junior-plugin-api";
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { p as logWarn } from "./logging-BkI10z0D.js";
2
+ import { p as logWarn } from "./logging-B0QxCh3D.js";
3
3
  import { s as skillRoots } from "./package-discovery-BVvSnQBB.js";
4
- import { n as pluginCatalogRuntime } from "./catalog-runtime-ulFceOA-.js";
4
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-Br8s-TYx.js";
5
5
  import path from "node:path";
6
6
  import { z } from "zod";
7
7
  import fs from "node:fs/promises";
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { Ht as toolInvocationDestination, Vt as actorFromRun } from "./agent-runner-dgQdPoGH.js";
3
- import { n as createAndEnqueueAgentInvocation } from "./work-hoPN8qjl.js";
2
+ import { Ht as toolInvocationDestination, Vt as actorFromRun } from "./agent-runner-B4FMVbCs.js";
3
+ import { n as createAndEnqueueAgentInvocation } from "./work-Dl5KPKjW.js";
4
4
  //#region src/chat/agent-invocations/spawn.ts
5
5
  var spawn_exports = /* @__PURE__ */ __exportAll({ bindSpawnAgent: () => bindSpawnAgent });
6
6
  /** Bind a Run's Actor and credentials to new Agent invocations. */
@@ -1,10 +1,10 @@
1
- import { I as isRecord, L as toOptionalNumber, R as toOptionalString } from "./logging-BkI10z0D.js";
2
- import { i as getChatConfig } from "./config-iEOq080E.js";
1
+ import { I as isRecord, L as toOptionalNumber, R as toOptionalString } from "./logging-B0QxCh3D.js";
2
+ import { i as getChatConfig } from "./config-B7joRWt7.js";
3
3
  import { s as parseStoredSlackActor } from "./actor-BTtLaeWy.js";
4
- import { F as sameDestination, N as parseDestination, u as getConversationStore } from "./viewer-C8u1HAdN.js";
5
- import { it as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-Ctw_jKaS.js";
6
- import { C as getDefaultRedisStateAdapterFor, w as getStateAdapter } from "./profile-AsD2uz0m.js";
7
- import "./job-queue-Bxlao6zL.js";
4
+ import { F as sameDestination, N as parseDestination, u as getConversationStore } from "./viewer-CPxNfHWa.js";
5
+ import { it as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-CvcbAtJH.js";
6
+ import { C as getDefaultRedisStateAdapterFor, w as getStateAdapter } from "./profile-p1oiViVs.js";
7
+ import "./job-queue-CIhKXUE3.js";
8
8
  import { z } from "zod";
9
9
  import { randomUUID } from "node:crypto";
10
10
  import { destinationSchema } from "@sentry/junior-plugin-api";
@@ -1,5 +1,5 @@
1
- import { p as logWarn } from "./logging-BkI10z0D.js";
2
- import { c as QUEUE_SIGNATURE_MAX_AGE_MS, d as createVercelQueueClient, l as signQueueMessage, p as runWithTurnRequestDeadline, u as verifyQueueMessage } from "./job-queue-Bxlao6zL.js";
1
+ import { p as logWarn } from "./logging-B0QxCh3D.js";
2
+ import { c as QUEUE_SIGNATURE_MAX_AGE_MS, d as createVercelQueueClient, l as signQueueMessage, p as runWithTurnRequestDeadline, u as verifyQueueMessage } from "./job-queue-CIhKXUE3.js";
3
3
  import { z } from "zod";
4
4
  import { createHash } from "node:crypto";
5
5
  import { handleCallback, registerDevConsumer } from "@vercel/queue";
@@ -115,7 +115,7 @@ function pluginTaskCallback() {
115
115
  maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
116
116
  onRejected: logPluginTaskQueueMessageRejected,
117
117
  run: async (message) => {
118
- const { processPluginTask } = await import("./task-runner-B3g16wjr.js").then((n) => n.r);
118
+ const { processPluginTask } = await import("./task-runner-DwD-i2ta.js").then((n) => n.r);
119
119
  await processPluginTask(message);
120
120
  },
121
121
  topic: PLUGIN_TASK_QUEUE_TOPIC,