@sentry/junior 0.194.0 → 0.196.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 (97) hide show
  1. package/dist/{agent-hooks-IDX764FD.js → agent-hooks-IQLRR4RC.js} +13 -13
  2. package/dist/api/activity.d.ts +9 -1
  3. package/dist/api/code/overview.d.ts +12 -0
  4. package/dist/api/locations/detail.d.ts +8 -0
  5. package/dist/api/locations/list.d.ts +5 -0
  6. package/dist/api/people/code.d.ts +6 -0
  7. package/dist/api/people/shared.d.ts +9 -1
  8. package/dist/api/reporting-window.d.ts +39 -1
  9. package/dist/api/schema/code.d.ts +12 -0
  10. package/dist/api/schema/conversation.d.ts +25 -0
  11. package/dist/api/schema/location.d.ts +13 -0
  12. package/dist/api/schema/person.d.ts +14 -0
  13. package/dist/api/schema/task.d.ts +12 -0
  14. package/dist/api/schema.js +3 -3
  15. package/dist/api.js +244 -65
  16. package/dist/app.d.ts +8 -2
  17. package/dist/app.js +166 -70
  18. package/dist/{catalog-runtime-MICXEBLK.js → catalog-runtime-EM7V2F4I.js} +4 -4
  19. package/dist/chat/agent/handoff.d.ts +73 -0
  20. package/dist/chat/config.d.ts +3 -2
  21. package/dist/chat/event-tasks/store.d.ts +27 -17
  22. package/dist/chat/model-profile.d.ts +12 -0
  23. package/dist/chat/no-reply.d.ts +4 -3
  24. package/dist/chat/resource-events/notification.d.ts +2 -1
  25. package/dist/chat/services/automated-turn-limit.d.ts +110 -0
  26. package/dist/chat/services/subscribed-decision.d.ts +8 -0
  27. package/dist/chat/slack/automated-turn-limit-notice.d.ts +38 -0
  28. package/dist/chat/tasks/execution-stats.d.ts +2 -1
  29. package/dist/chat/tasks/read.d.ts +5 -2
  30. package/dist/chat/tools/types.d.ts +6 -2
  31. package/dist/{chunk-U76RWMFR.js → chunk-5XSEOJPC.js} +87 -14
  32. package/dist/{chunk-OEQOAONV.js → chunk-6LQNW2CJ.js} +7 -7
  33. package/dist/{chunk-GFBR4S3Q.js → chunk-7NL7T6VU.js} +1 -1
  34. package/dist/{chunk-CFGBKPWQ.js → chunk-7TUDDW3Y.js} +3 -3
  35. package/dist/{chunk-RFE7DCZK.js → chunk-B5WJBVHY.js} +2 -2
  36. package/dist/{chunk-S7GX44BU.js → chunk-BXIVMNLR.js} +1 -1
  37. package/dist/{chunk-QMEF4Z7R.js → chunk-CNI74T7U.js} +6 -6
  38. package/dist/{chunk-X76JVHQ4.js → chunk-CTS72G4B.js} +1 -1
  39. package/dist/{chunk-G35QGPO2.js → chunk-DFWJJOW3.js} +2 -6
  40. package/dist/{chunk-INTBMGNX.js → chunk-EEUFKVCD.js} +22 -22
  41. package/dist/{chunk-H4DCWLTR.js → chunk-EFNUCRB5.js} +8 -8
  42. package/dist/{chunk-V4HXV5MY.js → chunk-EQBHN4JK.js} +1 -1
  43. package/dist/{chunk-JOI3DHML.js → chunk-ES7KCEND.js} +1 -1
  44. package/dist/{chunk-WWXJUURQ.js → chunk-G6YRPYDC.js} +1 -1
  45. package/dist/{chunk-WMJS5DDV.js → chunk-GZ336GZ5.js} +148 -19
  46. package/dist/{chunk-IME5OW4Y.js → chunk-I7GEGEHZ.js} +1 -1
  47. package/dist/{chunk-2NL3Y47F.js → chunk-J357NJQ5.js} +5 -5
  48. package/dist/{chunk-53IEEFFP.js → chunk-KJGH3KWA.js} +3 -3
  49. package/dist/{chunk-ELCYG6UU.js → chunk-KZX7LORG.js} +3 -3
  50. package/dist/{chunk-YSLIB7ER.js → chunk-LBN67OZR.js} +83 -7
  51. package/dist/{chunk-73JEAQRT.js → chunk-LCAM2P7H.js} +4 -4
  52. package/dist/{chunk-VOB2DKO6.js → chunk-LGXI6PWX.js} +24 -13
  53. package/dist/{chunk-P2P6MUQ4.js → chunk-LSPUMNZK.js} +2 -2
  54. package/dist/{chunk-AWZS5SVX.js → chunk-N2MSPOGG.js} +8 -8
  55. package/dist/{chunk-CCTYK5RH.js → chunk-NE2UQMC7.js} +10 -7
  56. package/dist/{chunk-D4YV5TDV.js → chunk-NHJU2ZAL.js} +11 -0
  57. package/dist/{chunk-G4RARFNT.js → chunk-OVWAO5KY.js} +1194 -726
  58. package/dist/{chunk-XRDSML3K.js → chunk-P3LE2CSJ.js} +2 -2
  59. package/dist/{chunk-KNIAWMBU.js → chunk-PI6VXVBK.js} +1 -1
  60. package/dist/{chunk-XLWZRHX5.js → chunk-PIZJBSGZ.js} +23 -29
  61. package/dist/{chunk-GY5SEFVL.js → chunk-QAINJHI4.js} +5 -5
  62. package/dist/{chunk-XND3J6AT.js → chunk-RAWYH7TW.js} +1 -1
  63. package/dist/{chunk-ENWIHU54.js → chunk-RFNMWONZ.js} +6 -6
  64. package/dist/{chunk-E53C73ML.js → chunk-S74KAE77.js} +4 -4
  65. package/dist/{chunk-7ANA7PBB.js → chunk-SR5FS2JP.js} +3 -3
  66. package/dist/{chunk-F2KSURTJ.js → chunk-VKLQ2M7V.js} +9 -9
  67. package/dist/{chunk-NWWDFHXP.js → chunk-VRHZXY5X.js} +1 -1
  68. package/dist/{chunk-6H2MKVV5.js → chunk-VSOO3Y6M.js} +1 -1
  69. package/dist/{chunk-NPO24LAN.js → chunk-VVU7GHIZ.js} +9 -9
  70. package/dist/{chunk-IOGDKPVU.js → chunk-VXAQTJSR.js} +1 -1
  71. package/dist/{chunk-ADEACKAH.js → chunk-XNXKRWWI.js} +11 -4
  72. package/dist/cli/chat.js +35 -35
  73. package/dist/cli/check.js +5 -5
  74. package/dist/cli/plugins.js +14 -14
  75. package/dist/cli/snapshot-create.js +10 -10
  76. package/dist/cli/upgrade.js +7 -7
  77. package/dist/db/schema/event-tasks.d.ts +21 -0
  78. package/dist/db/schema.d.ts +19 -0
  79. package/dist/{db-3IEVINAY.js → db-YTM7ZXPK.js} +8 -8
  80. package/dist/instrumentation.js +3 -3
  81. package/dist/nitro.js +7 -7
  82. package/dist/{oauth-callback-server-N7L2BB4L.js → oauth-callback-server-OXW4KQLQ.js} +31 -31
  83. package/dist/{runner-PTTZV3WU.js → runner-RJY5RNJO.js} +23 -23
  84. package/dist/{skills-POMWS2RR.js → skills-WZV6NLFY.js} +5 -5
  85. package/dist/spawn-J7SQJLYF.js +42 -0
  86. package/dist/task-runner-SMUQ5464.js +36 -0
  87. package/dist/{validation-U6LOMXR7.js → validation-XS5ZHV3W.js} +5 -5
  88. package/dist/version.js +1 -1
  89. package/dist/{work-FHA3BS4L.js → work-LJMSDEY3.js} +23 -23
  90. package/dist/worker-NMFZ7A2N.js +24 -0
  91. package/migrations/0038_event_task_status.sql +5 -0
  92. package/migrations/meta/0038_snapshot.json +3323 -0
  93. package/migrations/meta/_journal.json +8 -1
  94. package/package.json +4 -4
  95. package/dist/spawn-R75MXXKE.js +0 -42
  96. package/dist/task-runner-OQLRHADB.js +0 -36
  97. package/dist/worker-GR4UNVVP.js +0 -24
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createAndEnqueueAgentInvocation
3
- } from "./chunk-F2KSURTJ.js";
3
+ } from "./chunk-VKLQ2M7V.js";
4
4
  import {
5
5
  actorFromRun,
6
6
  toolInvocationDestination
7
- } from "./chunk-ENWIHU54.js";
7
+ } from "./chunk-RFNMWONZ.js";
8
8
 
9
9
  // src/chat/agent-invocations/spawn.ts
10
10
  function bindSpawnAgent(run, options) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-WWXJUURQ.js";
3
+ } from "./chunk-G6YRPYDC.js";
4
4
 
5
5
  // src/chat/plugins/validation.ts
6
6
  import { isDeepStrictEqual } from "util";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-VFUK3X5B.js";
5
5
  import {
6
6
  DEFAULT_SQL_STATEMENT_TIMEOUT_MS
7
- } from "./chunk-U76RWMFR.js";
7
+ } from "./chunk-5XSEOJPC.js";
8
8
 
9
9
  // src/db/neon.ts
10
10
  import { AsyncLocalStorage } from "async_hooks";
@@ -560,6 +560,7 @@ var juniorLocationConfigurations = pgTable13(
560
560
  );
561
561
 
562
562
  // src/db/schema/event-tasks.ts
563
+ import { sql as sql5 } from "drizzle-orm";
563
564
  import { bigint, index as index11, jsonb as jsonb6, pgTable as pgTable14, text as text14 } from "drizzle-orm/pg-core";
564
565
  var juniorEventTasks = pgTable14(
565
566
  "junior_event_tasks",
@@ -569,22 +570,15 @@ var juniorEventTasks = pgTable14(
569
570
  namespace: text14("namespace").notNull(),
570
571
  identifier: text14("identifier").notNull(),
571
572
  createdAtMs: bigint("created_at_ms", { mode: "number" }).notNull(),
573
+ /** Retained row status. Deleted tasks keep history but stop matching. */
574
+ status: text14("status").$type().notNull().default("active"),
572
575
  /** Short display title generated from the task instruction. */
573
576
  title: text14("title"),
574
577
  task: jsonb6("task_json").$type().notNull()
575
578
  },
576
579
  (table) => [
577
- index11("junior_event_tasks_team_idx").on(
578
- table.teamId,
579
- table.createdAtMs,
580
- table.id
581
- ),
582
- index11("junior_event_tasks_match_idx").on(
583
- table.namespace,
584
- table.identifier,
585
- table.createdAtMs,
586
- table.id
587
- )
580
+ index11("junior_event_tasks_team_idx").on(table.teamId, table.createdAtMs, table.id).where(sql5`${table.status} <> 'deleted'`),
581
+ index11("junior_event_tasks_match_idx").on(table.namespace, table.identifier, table.createdAtMs, table.id).where(sql5`${table.status} <> 'deleted'`)
588
582
  ]
589
583
  );
590
584
 
@@ -608,7 +602,7 @@ var juniorStats = pgTable15(
608
602
  );
609
603
 
610
604
  // src/db/schema/task-executions.ts
611
- import { sql as sql5 } from "drizzle-orm";
605
+ import { sql as sql6 } from "drizzle-orm";
612
606
  import {
613
607
  bigint as bigint2,
614
608
  check,
@@ -632,11 +626,11 @@ var juniorTaskExecutions = pgTable16(
632
626
  (table) => [
633
627
  check(
634
628
  "junior_task_executions_kind_check",
635
- sql5`${table.kind} in ('scheduled', 'event')`
629
+ sql6`${table.kind} in ('scheduled', 'event')`
636
630
  ),
637
631
  check(
638
632
  "junior_task_executions_status_check",
639
- sql5`${table.status} in ('blocked', 'completed', 'failed')`
633
+ sql6`${table.status} in ('blocked', 'completed', 'failed')`
640
634
  ),
641
635
  primaryKey8({
642
636
  name: "junior_task_executions_kind_namespace_execution_id_pk",
@@ -665,7 +659,7 @@ var juniorTaskExecutions = pgTable16(
665
659
  );
666
660
 
667
661
  // src/db/schema/scheduled-tasks.ts
668
- import { sql as sql6 } from "drizzle-orm";
662
+ import { sql as sql7 } from "drizzle-orm";
669
663
  import { bigint as bigint3, index as index13, jsonb as jsonb7, pgTable as pgTable17, text as text17 } from "drizzle-orm/pg-core";
670
664
  var juniorSchedulerTasks = pgTable17(
671
665
  "junior_scheduler_tasks",
@@ -687,16 +681,16 @@ var juniorSchedulerTasks = pgTable17(
687
681
  (table) => [
688
682
  // TODO(dcramer): Remove after no supported runtime reads or writes the
689
683
  // legacy creatorSlackUserId column.
690
- index13("junior_scheduler_tasks_creator_idx").on(table.teamId, table.creatorSlackUserId, table.createdAtMs, table.id).where(sql6`${table.status} <> 'deleted'`),
684
+ index13("junior_scheduler_tasks_creator_idx").on(table.teamId, table.creatorSlackUserId, table.createdAtMs, table.id).where(sql7`${table.status} <> 'deleted'`),
691
685
  index13("junior_scheduler_tasks_creator_identity_idx").on(table.creatorIdentityId, table.createdAtMs, table.id).where(
692
- sql6`${table.status} <> 'deleted' AND ${table.creatorIdentityId} IS NOT NULL`
686
+ sql7`${table.status} <> 'deleted' AND ${table.creatorIdentityId} IS NOT NULL`
693
687
  ),
694
- index13("junior_scheduler_tasks_team_status_idx").on(table.teamId, table.createdAtMs, table.id).where(sql6`${table.status} <> 'deleted'`),
688
+ index13("junior_scheduler_tasks_team_status_idx").on(table.teamId, table.createdAtMs, table.id).where(sql7`${table.status} <> 'deleted'`),
695
689
  index13("junior_scheduler_tasks_run_now_due_idx").on(table.runNowAtMs, table.createdAtMs, table.id).where(
696
- sql6`${table.status} = 'active' AND ${table.runNowAtMs} IS NOT NULL`
690
+ sql7`${table.status} = 'active' AND ${table.runNowAtMs} IS NOT NULL`
697
691
  ),
698
692
  index13("junior_scheduler_tasks_next_run_due_idx").on(table.nextRunAtMs, table.createdAtMs, table.id).where(
699
- sql6`${table.status} = 'active' AND ${table.nextRunAtMs} IS NOT NULL`
693
+ sql7`${table.status} = 'active' AND ${table.nextRunAtMs} IS NOT NULL`
700
694
  )
701
695
  ]
702
696
  );
@@ -723,7 +717,7 @@ var juniorSchedulerRuns = pgTable17(
723
717
  );
724
718
 
725
719
  // src/db/schema/snapshots.ts
726
- import { sql as sql7 } from "drizzle-orm";
720
+ import { sql as sql8 } from "drizzle-orm";
727
721
  import {
728
722
  bigint as bigint4,
729
723
  check as check2,
@@ -785,27 +779,27 @@ var juniorSnapshots = pgTable19(
785
779
  (table) => [
786
780
  check2(
787
781
  "junior_snapshots_status_check",
788
- sql7`${table.status} in ('building', 'failed', 'ready')`
782
+ sql8`${table.status} in ('building', 'failed', 'ready')`
789
783
  ),
790
784
  check2(
791
785
  "junior_snapshots_build_phase_check",
792
- sql7`${table.buildPhase} is null or ${table.buildPhase} in ('created', 'dependencies_installed', 'repositories_prepared')`
786
+ sql8`${table.buildPhase} is null or ${table.buildPhase} in ('created', 'dependencies_installed', 'repositories_prepared')`
793
787
  ),
794
788
  check2(
795
789
  "junior_snapshots_ready_fields_check",
796
- sql7`${table.status} <> 'ready' or (${table.snapshotId} is not null and ${table.buildDurationMs} is not null and ${table.generatedAt} is not null)`
790
+ sql8`${table.status} <> 'ready' or (${table.snapshotId} is not null and ${table.buildDurationMs} is not null and ${table.generatedAt} is not null)`
797
791
  ),
798
792
  check2(
799
793
  "junior_snapshots_build_fields_check",
800
- sql7`${table.status} = 'ready' or (${table.buildStartedAt} is not null and ${table.buildPhase} is not null)`
794
+ sql8`${table.status} = 'ready' or (${table.buildStartedAt} is not null and ${table.buildPhase} is not null)`
801
795
  ),
802
796
  check2(
803
797
  "junior_snapshots_build_duration_check",
804
- sql7`${table.buildDurationMs} is null or ${table.buildDurationMs} >= 0`
798
+ sql8`${table.buildDurationMs} is null or ${table.buildDurationMs} >= 0`
805
799
  ),
806
800
  check2(
807
801
  "junior_snapshots_size_bytes_check",
808
- sql7`${table.sizeBytes} is null or ${table.sizeBytes} >= 0`
802
+ sql8`${table.sizeBytes} is null or ${table.sizeBytes} >= 0`
809
803
  ),
810
804
  // Provider snapshot ids are unique. Nulls stay allowed for in-flight rows.
811
805
  uniqueIndex9("junior_snapshots_snapshot_id_uidx").on(table.snapshotId),
@@ -815,7 +809,7 @@ var juniorSnapshots = pgTable19(
815
809
  table.profileHash,
816
810
  table.status
817
811
  ),
818
- uniqueIndex9("junior_snapshots_active_build_uidx").on(table.workspaceId, table.profileHash).where(sql7`${table.status} = 'building'`),
812
+ uniqueIndex9("junior_snapshots_active_build_uidx").on(table.workspaceId, table.profileHash).where(sql8`${table.status} = 'building'`),
819
813
  index14("junior_snapshots_workspace_status_idx").on(
820
814
  table.workspaceId,
821
815
  table.status
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  persistConversationMessages
3
- } from "./chunk-OEQOAONV.js";
3
+ } from "./chunk-6LQNW2CJ.js";
4
4
  import {
5
5
  JUNIOR_THREAD_STATE_TTL_MS
6
6
  } from "./chunk-3Y47VMHV.js";
7
7
  import {
8
8
  getDb
9
- } from "./chunk-ADEACKAH.js";
9
+ } from "./chunk-XNXKRWWI.js";
10
10
  import {
11
11
  juniorLocationConfigurations
12
- } from "./chunk-XLWZRHX5.js";
12
+ } from "./chunk-PIZJBSGZ.js";
13
13
  import {
14
14
  getStateAdapter
15
- } from "./chunk-V4HXV5MY.js";
15
+ } from "./chunk-EQBHN4JK.js";
16
16
  import {
17
17
  juniorDestinations
18
18
  } from "./chunk-VFUK3X5B.js";
@@ -20,7 +20,7 @@ import {
20
20
  isRecord,
21
21
  toOptionalNumber,
22
22
  toOptionalString
23
- } from "./chunk-X76JVHQ4.js";
23
+ } from "./chunk-CTS72G4B.js";
24
24
 
25
25
  // src/chat/state/conversation.ts
26
26
  function defaultConversationState() {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getStateAdapter
3
- } from "./chunk-V4HXV5MY.js";
3
+ } from "./chunk-EQBHN4JK.js";
4
4
  import {
5
5
  getClient
6
6
  } from "./chunk-PEQXYSSE.js";
@@ -8,19 +8,19 @@ import {
8
8
  isDmChannel,
9
9
  normalizeSlackConversationId,
10
10
  withSlackRetries
11
- } from "./chunk-CCTYK5RH.js";
11
+ } from "./chunk-NE2UQMC7.js";
12
12
  import {
13
13
  parseDestination
14
- } from "./chunk-ADEACKAH.js";
14
+ } from "./chunk-XNXKRWWI.js";
15
15
  import {
16
16
  getStateAdapter
17
- } from "./chunk-V4HXV5MY.js";
17
+ } from "./chunk-EQBHN4JK.js";
18
18
  import {
19
19
  normalizeSlackEmojiName
20
- } from "./chunk-U76RWMFR.js";
20
+ } from "./chunk-5XSEOJPC.js";
21
21
  import {
22
22
  pluginCatalogRuntime
23
- } from "./chunk-WWXJUURQ.js";
23
+ } from "./chunk-G6YRPYDC.js";
24
24
  import {
25
25
  parseSlackMessageTs,
26
26
  parseSlackUserId
@@ -29,7 +29,7 @@ import {
29
29
  isRecord,
30
30
  logInfo,
31
31
  logWarn
32
- } from "./chunk-X76JVHQ4.js";
32
+ } from "./chunk-CTS72G4B.js";
33
33
 
34
34
  // src/chat/agent/types.ts
35
35
  var RetryableDeliveryError = class extends Error {
@@ -8,14 +8,14 @@ import {
8
8
  getConversationStore,
9
9
  parseDestination,
10
10
  sameDestination
11
- } from "./chunk-ADEACKAH.js";
11
+ } from "./chunk-XNXKRWWI.js";
12
12
  import {
13
13
  getDefaultRedisStateAdapterFor,
14
14
  getStateAdapter
15
- } from "./chunk-V4HXV5MY.js";
15
+ } from "./chunk-EQBHN4JK.js";
16
16
  import {
17
17
  getChatConfig
18
- } from "./chunk-U76RWMFR.js";
18
+ } from "./chunk-5XSEOJPC.js";
19
19
  import {
20
20
  parseStoredSlackActor
21
21
  } from "./chunk-N7TMSOZH.js";
@@ -23,7 +23,7 @@ import {
23
23
  isRecord,
24
24
  toOptionalNumber,
25
25
  toOptionalString
26
- } from "./chunk-X76JVHQ4.js";
26
+ } from "./chunk-CTS72G4B.js";
27
27
 
28
28
  // src/chat/task-execution/state.ts
29
29
  import { randomUUID } from "crypto";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  toOptionalTrimmed
3
- } from "./chunk-U76RWMFR.js";
3
+ } from "./chunk-5XSEOJPC.js";
4
4
  import {
5
5
  pluginCatalogRuntime
6
- } from "./chunk-WWXJUURQ.js";
6
+ } from "./chunk-G6YRPYDC.js";
7
7
  import {
8
8
  setSpanAttributes,
9
9
  setSpanStatus
10
- } from "./chunk-X76JVHQ4.js";
10
+ } from "./chunk-CTS72G4B.js";
11
11
 
12
12
  // src/chat/sandbox/paths.ts
13
13
  function normalizeWorkspaceRoot(input) {
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  AgentRunError,
3
3
  executeTurn
4
- } from "./chunk-53IEEFFP.js";
4
+ } from "./chunk-KJGH3KWA.js";
5
5
  import {
6
6
  ConversationTurnLifecycleService
7
- } from "./chunk-6H2MKVV5.js";
7
+ } from "./chunk-VSOO3Y6M.js";
8
8
  import {
9
9
  getPersistedSandboxState,
10
10
  getPersistedThreadState,
11
11
  persistThreadStateById
12
- } from "./chunk-GY5SEFVL.js";
12
+ } from "./chunk-QAINJHI4.js";
13
13
  import {
14
14
  AgentInvocationBusyError,
15
15
  AgentInvocationLimitError,
@@ -18,32 +18,32 @@ import {
18
18
  agentBindingSchema,
19
19
  agentInvocationSchema,
20
20
  createAgentInvocationSchema
21
- } from "./chunk-QMEF4Z7R.js";
21
+ } from "./chunk-CNI74T7U.js";
22
22
  import {
23
23
  TurnInputCommitLostError,
24
24
  getAssistantReplyText,
25
25
  getConversationTurnBoundaryError,
26
26
  isTurnInputCommitLostError
27
- } from "./chunk-G35QGPO2.js";
27
+ } from "./chunk-DFWJJOW3.js";
28
28
  import {
29
29
  failTurnRecord,
30
30
  getTerminalAssistantMessages,
31
31
  getTurnRecord,
32
32
  openConversationProjection,
33
33
  saveTurnCheckpoint
34
- } from "./chunk-OEQOAONV.js";
34
+ } from "./chunk-6LQNW2CJ.js";
35
35
  import {
36
36
  appendAndEnqueueInboundMessage
37
- } from "./chunk-E53C73ML.js";
37
+ } from "./chunk-S74KAE77.js";
38
38
  import {
39
39
  getConversationEventStore,
40
40
  getConversationStore,
41
41
  getSqlExecutor
42
- } from "./chunk-ADEACKAH.js";
42
+ } from "./chunk-XNXKRWWI.js";
43
43
  import {
44
44
  juniorAgentBindings,
45
45
  juniorAgentInvocations
46
- } from "./chunk-XLWZRHX5.js";
46
+ } from "./chunk-PIZJBSGZ.js";
47
47
 
48
48
  // src/chat/agent-invocations/work.ts
49
49
  import { z } from "zod";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FUNCTION_TIMEOUT_BUFFER_SECONDS,
3
3
  getChatConfig
4
- } from "./chunk-U76RWMFR.js";
4
+ } from "./chunk-5XSEOJPC.js";
5
5
 
6
6
  // src/chat/runtime/request-deadline.ts
7
7
  import { AsyncLocalStorage } from "async_hooks";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getConversationEventStore
3
- } from "./chunk-ADEACKAH.js";
3
+ } from "./chunk-XNXKRWWI.js";
4
4
 
5
5
  // src/chat/conversations/turn-lifecycle.ts
6
6
  var ConversationTurnLifecycleService = class {
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  coerceThreadConversationState,
3
3
  getPersistedThreadState
4
- } from "./chunk-GY5SEFVL.js";
4
+ } from "./chunk-QAINJHI4.js";
5
5
  import {
6
6
  recordTaskExecution
7
- } from "./chunk-VOB2DKO6.js";
7
+ } from "./chunk-LGXI6PWX.js";
8
8
  import {
9
9
  pluginTaskId,
10
10
  pluginTaskParamsSchema,
11
11
  sendVercelPluginTask
12
- } from "./chunk-CFGBKPWQ.js";
12
+ } from "./chunk-7TUDDW3Y.js";
13
13
  import {
14
14
  getPiMessageRole,
15
15
  getTurnRecord,
@@ -19,7 +19,7 @@ import {
19
19
  isToolResultMessage,
20
20
  normalizeToolNameFromResult,
21
21
  stripRuntimeTurnContext
22
- } from "./chunk-OEQOAONV.js";
22
+ } from "./chunk-6LQNW2CJ.js";
23
23
  import {
24
24
  createPluginConversationEvents,
25
25
  createPluginEmbedder,
@@ -28,20 +28,20 @@ import {
28
28
  createPluginState,
29
29
  getPlugins,
30
30
  readActorIdentity
31
- } from "./chunk-CCTYK5RH.js";
31
+ } from "./chunk-NE2UQMC7.js";
32
32
  import {
33
33
  JUNIOR_THREAD_STATE_TTL_MS
34
34
  } from "./chunk-3Y47VMHV.js";
35
35
  import {
36
36
  getConversationStore,
37
37
  getDb
38
- } from "./chunk-ADEACKAH.js";
38
+ } from "./chunk-XNXKRWWI.js";
39
39
  import {
40
40
  getStateAdapter
41
- } from "./chunk-V4HXV5MY.js";
41
+ } from "./chunk-EQBHN4JK.js";
42
42
  import {
43
43
  sameActorIdentity
44
- } from "./chunk-GFBR4S3Q.js";
44
+ } from "./chunk-7NL7T6VU.js";
45
45
  import {
46
46
  credentialSubjectSchema
47
47
  } from "./chunk-CEMMLV5L.js";
@@ -84,7 +84,7 @@ function slackSourceForDestination(args) {
84
84
  };
85
85
  }
86
86
  async function resolveConversationRouting(args) {
87
- const conversationStore = args.conversationStore ?? (await import("./db-3IEVINAY.js")).getConversationStore();
87
+ const conversationStore = args.conversationStore ?? (await import("./db-YTM7ZXPK.js")).getConversationStore();
88
88
  const chain = await loadConversationChain(
89
89
  args.conversationId,
90
90
  conversationStore
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-N7TMSOZH.js";
6
6
  import {
7
7
  toOptionalString
8
- } from "./chunk-X76JVHQ4.js";
8
+ } from "./chunk-CTS72G4B.js";
9
9
 
10
10
  // src/chat/slack/context.ts
11
11
  import { z } from "zod";
@@ -8,19 +8,19 @@ import {
8
8
  juniorConversations,
9
9
  juniorIdentities,
10
10
  juniorUsers
11
- } from "./chunk-XLWZRHX5.js";
11
+ } from "./chunk-PIZJBSGZ.js";
12
12
  import {
13
13
  conversationEventDataSchema,
14
14
  decodeStoredConversationEvent,
15
15
  historyReplacementSchema,
16
16
  newConversationEventSchema
17
- } from "./chunk-GFBR4S3Q.js";
17
+ } from "./chunk-7NL7T6VU.js";
18
18
  import {
19
19
  juniorDestinations
20
20
  } from "./chunk-VFUK3X5B.js";
21
21
  import {
22
22
  getChatConfig
23
- } from "./chunk-U76RWMFR.js";
23
+ } from "./chunk-5XSEOJPC.js";
24
24
  import {
25
25
  parseActorUserId,
26
26
  parseSlackChannelReferenceId,
@@ -28,7 +28,7 @@ import {
28
28
  } from "./chunk-N7TMSOZH.js";
29
29
  import {
30
30
  normalizeIdentityEmail
31
- } from "./chunk-X76JVHQ4.js";
31
+ } from "./chunk-CTS72G4B.js";
32
32
 
33
33
  // src/chat/conversations/sql/store.ts
34
34
  import { randomUUID as randomUUID2 } from "crypto";
@@ -68,6 +68,12 @@ function sameDestination(left, right) {
68
68
  }
69
69
  return false;
70
70
  }
71
+ function destinationKey(destination) {
72
+ if (destination.platform === "local") {
73
+ return destination.conversationId;
74
+ }
75
+ return `slack:${destination.teamId}:${destination.channelId}`;
76
+ }
71
77
 
72
78
  // src/chat/identities/sql.ts
73
79
  import { randomUUID } from "crypto";
@@ -1836,6 +1842,7 @@ export {
1836
1842
  parseDestination,
1837
1843
  requireSlackDestination,
1838
1844
  sameDestination,
1845
+ destinationKey,
1839
1846
  upsertIdentity,
1840
1847
  upsertLinkedIdentity,
1841
1848
  deleteProviderIdentityForSlackUser,
package/dist/cli/chat.js CHANGED
@@ -1,53 +1,53 @@
1
1
  import {
2
2
  executeAgentRun
3
- } from "../chunk-G4RARFNT.js";
4
- import "../chunk-QMEF4Z7R.js";
3
+ } from "../chunk-OVWAO5KY.js";
4
+ import "../chunk-CNI74T7U.js";
5
5
  import "../chunk-6Y5B5PEX.js";
6
6
  import "../chunk-DIB4GX3G.js";
7
- import "../chunk-AWZS5SVX.js";
7
+ import "../chunk-N2MSPOGG.js";
8
8
  import {
9
9
  createAgentRunner
10
- } from "../chunk-ENWIHU54.js";
11
- import "../chunk-G35QGPO2.js";
12
- import "../chunk-OEQOAONV.js";
10
+ } from "../chunk-RFNMWONZ.js";
11
+ import "../chunk-DFWJJOW3.js";
12
+ import "../chunk-6LQNW2CJ.js";
13
13
  import "../chunk-2LYHWMR4.js";
14
- import "../chunk-WMJS5DDV.js";
15
- import "../chunk-IOGDKPVU.js";
16
- import "../chunk-E53C73ML.js";
14
+ import "../chunk-GZ336GZ5.js";
15
+ import "../chunk-VXAQTJSR.js";
16
+ import "../chunk-S74KAE77.js";
17
17
  import "../chunk-DA2KGZZI.js";
18
- import "../chunk-RFE7DCZK.js";
19
- import "../chunk-ELCYG6UU.js";
18
+ import "../chunk-B5WJBVHY.js";
19
+ import "../chunk-KZX7LORG.js";
20
20
  import "../chunk-PDO5BLNM.js";
21
21
  import "../chunk-UIE3R5XU.js";
22
22
  import "../chunk-X6GDDWQH.js";
23
- import "../chunk-NWWDFHXP.js";
23
+ import "../chunk-VRHZXY5X.js";
24
24
  import "../chunk-DKIJ2RP5.js";
25
25
  import "../chunk-JAL3CH4G.js";
26
26
  import "../chunk-7H2VZTWN.js";
27
27
  import {
28
28
  loadAppPluginSet
29
29
  } from "../chunk-Y2CM7HXH.js";
30
- import "../chunk-CCTYK5RH.js";
30
+ import "../chunk-NE2UQMC7.js";
31
31
  import "../chunk-3Y47VMHV.js";
32
- import "../chunk-ADEACKAH.js";
33
- import "../chunk-XLWZRHX5.js";
34
- import "../chunk-7ANA7PBB.js";
35
- import "../chunk-V4HXV5MY.js";
36
- import "../chunk-GFBR4S3Q.js";
32
+ import "../chunk-XNXKRWWI.js";
33
+ import "../chunk-PIZJBSGZ.js";
34
+ import "../chunk-SR5FS2JP.js";
35
+ import "../chunk-EQBHN4JK.js";
36
+ import "../chunk-7NL7T6VU.js";
37
37
  import "../chunk-VFUK3X5B.js";
38
- import "../chunk-U76RWMFR.js";
39
- import "../chunk-D4YV5TDV.js";
40
- import "../chunk-JOI3DHML.js";
41
- import "../chunk-P2P6MUQ4.js";
42
- import "../chunk-WWXJUURQ.js";
43
- import "../chunk-S7GX44BU.js";
38
+ import "../chunk-5XSEOJPC.js";
39
+ import "../chunk-NHJU2ZAL.js";
40
+ import "../chunk-ES7KCEND.js";
41
+ import "../chunk-LSPUMNZK.js";
42
+ import "../chunk-G6YRPYDC.js";
43
+ import "../chunk-BXIVMNLR.js";
44
44
  import "../chunk-CEMMLV5L.js";
45
45
  import "../chunk-N7TMSOZH.js";
46
46
  import "../chunk-DWPN6SCH.js";
47
47
  import "../chunk-TXKUKMVO.js";
48
- import "../chunk-X76JVHQ4.js";
48
+ import "../chunk-CTS72G4B.js";
49
49
  import "../chunk-PEQXYSSE.js";
50
- import "../chunk-IME5OW4Y.js";
50
+ import "../chunk-I7GEGEHZ.js";
51
51
 
52
52
  // src/cli/chat.ts
53
53
  import {
@@ -169,10 +169,10 @@ async function configureLocalChatPlugins(pluginSet) {
169
169
  databaseModule
170
170
  ] = await Promise.all([
171
171
  import("../plugins-YTYJMMJF.js"),
172
- import("../agent-hooks-IDX764FD.js"),
173
- import("../catalog-runtime-MICXEBLK.js"),
174
- import("../validation-U6LOMXR7.js"),
175
- import("../db-3IEVINAY.js")
172
+ import("../agent-hooks-IQLRR4RC.js"),
173
+ import("../catalog-runtime-EM7V2F4I.js"),
174
+ import("../validation-XS5ZHV3W.js"),
175
+ import("../db-YTM7ZXPK.js")
176
176
  ]);
177
177
  const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
178
178
  const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
@@ -238,14 +238,14 @@ async function prepareLocalChatRun(io, pluginSet) {
238
238
  await configureLocalChatPlugins(pluginSet);
239
239
  const { setExperimentalFeatures } = await import("../experimental-P5FZM4CU.js");
240
240
  setExperimentalFeatures({ subagents: true });
241
- const { runLocalAgentTurn } = await import("../runner-PTTZV3WU.js");
242
- const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-N7L2BB4L.js");
241
+ const { runLocalAgentTurn } = await import("../runner-RJY5RNJO.js");
242
+ const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-OXW4KQLQ.js");
243
243
  const { createLocalOAuthState } = await import("../oauth-relay-5XPVRPYB.js");
244
244
  const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-FIL7EGPR.js");
245
- const { bindSpawnAgent } = await import("../spawn-R75MXXKE.js");
246
- const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-FHA3BS4L.js");
245
+ const { bindSpawnAgent } = await import("../spawn-J7SQJLYF.js");
246
+ const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-LJMSDEY3.js");
247
247
  const { createLocalConversationWork } = await import("../conversation-work-VIOQ5ZF3.js");
248
- const { processConversationWork } = await import("../worker-GR4UNVVP.js");
248
+ const { processConversationWork } = await import("../worker-NMFZ7A2N.js");
249
249
  let agentRunner;
250
250
  const localConversationWork = createLocalConversationWork(async (message) => {
251
251
  if (!agentRunner) {
package/dist/cli/check.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  parseSkillFile
3
- } from "../chunk-P2P6MUQ4.js";
4
- import "../chunk-WWXJUURQ.js";
3
+ } from "../chunk-LSPUMNZK.js";
4
+ import "../chunk-G6YRPYDC.js";
5
5
  import {
6
6
  parseInlinePluginManifest,
7
7
  parsePluginManifest
8
- } from "../chunk-S7GX44BU.js";
8
+ } from "../chunk-BXIVMNLR.js";
9
9
  import "../chunk-CEMMLV5L.js";
10
10
  import "../chunk-N7TMSOZH.js";
11
11
  import "../chunk-DWPN6SCH.js";
@@ -14,9 +14,9 @@ import {
14
14
  JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE,
15
15
  JUNIOR_HEARTBEAT_ROUTE,
16
16
  LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION
17
- } from "../chunk-X76JVHQ4.js";
17
+ } from "../chunk-CTS72G4B.js";
18
18
  import "../chunk-PEQXYSSE.js";
19
- import "../chunk-IME5OW4Y.js";
19
+ import "../chunk-I7GEGEHZ.js";
20
20
 
21
21
  // src/cli/check.ts
22
22
  import fs from "fs/promises";