@sentry/junior 0.285.0 → 0.287.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/{adapter-DN5AB4VU.js → adapter-CL-HUKgd.js} +1 -1
  2. package/dist/{admin-DOITMKnn.js → admin-C9urXVfi.js} +2 -1
  3. package/dist/{agent-runner-BsWhHe4N.js → agent-runner-Bfnw551N.js} +2174 -1323
  4. package/dist/api/schema.d.ts +2 -2
  5. package/dist/api/schema.js +7 -7
  6. package/dist/api.d.ts +1 -1
  7. package/dist/api.js +73 -112
  8. package/dist/{app-DyMs9330.d.ts → app-DBY5TnfY.d.ts} +2 -3
  9. package/dist/app.d.ts +1 -1
  10. package/dist/app.js +72 -42
  11. package/dist/{assistant-reply-9Jip5bsr.js → assistant-reply-u_PRYzuz.js} +1 -1
  12. package/dist/{automation-Mk8aaHzy.js → automation-DksGNDRO.js} +3 -6
  13. package/dist/{background-compaction-queue-DXkLsWoH.js → background-compaction-queue-CYI909P5.js} +137 -3
  14. package/dist/{briefs-Cl8-nK9B.js → briefs-DaXiMWzT.js} +6 -5
  15. package/dist/{catalog-runtime-Bte6jRB2.js → catalog-runtime-BCIuBe4d.js} +1 -1
  16. package/dist/cli/chat.js +14 -14
  17. package/dist/cli/check.js +3 -3
  18. package/dist/cli/main.js +3 -3
  19. package/dist/cli/plugins.js +4 -4
  20. package/dist/cli/snapshot-create.js +5 -6
  21. package/dist/cli/upgrade.d.ts +1 -1
  22. package/dist/cli/upgrade.js +3 -3
  23. package/dist/{client-DDbBucBw.js → config-CkHcUMN7.js} +580 -3
  24. package/dist/{connections-DA4LT9LL.js → connections-BnIj0wtx.js} +16 -50
  25. package/dist/{conversation-D8kVoCrP.js → conversation-E7ZPJx2H.js} +22 -6
  26. package/dist/{conversation-pending-messages-BvROq1bq.js → conversation-pending-messages-DVch6YQw.js} +2 -5
  27. package/dist/{conversation-privacy-D0j_h70R.js → conversation-privacy-DF1hW0ja.js} +1 -1
  28. package/dist/{credential-sync-hcsYatw-.js → credential-sync-CzMar9hq.js} +13 -13
  29. package/dist/{viewer-1Ea81s0b.js → db-DJ11eZqq.js} +64 -367
  30. package/dist/{db-BhHZSuFw.d.ts → db-YDKKDxlh.d.ts} +4 -4
  31. package/dist/{executor-BLEMIgIZ.js → executor-BY9TB31g.js} +20 -19
  32. package/dist/instrumentation.js +2 -2
  33. package/dist/{logging-BfORLKoq.js → logging-BO5zU6Mt.js} +1 -1
  34. package/dist/{media-Bu9C6lz0.js → media-Cz1ZiV1U.js} +16 -4
  35. package/dist/{message-DqjuKzUx.js → message-CsUbuEc8.js} +10 -10
  36. package/dist/nitro.d.ts +1 -1
  37. package/dist/nitro.js +2 -3
  38. package/dist/{oauth-callback-server-CFSRzu1n.js → oauth-callback-server-hiDKK0_n.js} +2 -2
  39. package/dist/{projection-DliWYrnT.js → projection-CL_YWeGf.js} +352 -356
  40. package/dist/{prompt-BvIUzY4y.js → prompt-BHOEQSmf.js} +182 -2
  41. package/dist/{registry-rC7MCxu8.js → registry-BriFLnaJ.js} +1 -1
  42. package/dist/{reporting-window-B4TwyuJo.js → reporting-window-B3Ze-Qnt.js} +4 -1
  43. package/dist/{resolve-Biu8Qw3u.js → resolve-Bt6GgAiA.js} +3 -3
  44. package/dist/{result-DxJMCX47.js → result-Bo1TZu0Q.js} +8 -8
  45. package/dist/{runner-BQJSFLKg.js → runner-D3YeCQgt.js} +16 -12
  46. package/dist/{sandbox-egress-signals-6aMxJSDn.js → sandbox-egress-signals-CcnSPP4S.js} +1 -1
  47. package/dist/{schema-BasXTvi2.js → schema-BWE3RJEB.js} +19 -7
  48. package/dist/{schema-BUviRAs8.d.ts → schema-C6fsEwjo.d.ts} +90 -8
  49. package/dist/{service-account-BI5Wgx22.js → service-account-DiQQuuw7.js} +3 -3
  50. package/dist/{service-account-CAE-_1dR.js → service-account-r6fl0b-9.js} +3 -3
  51. package/dist/{session-stop-CA-jOJ84.js → session-stop-B2Nut40V.js} +27 -25
  52. package/dist/{skills-B22duVJU.js → skills-CD5aJdzg.js} +2 -2
  53. package/dist/spawn-CalgZQiu.js +79 -0
  54. package/dist/{stop-DioIcEAu.js → stop-kujZLbi0.js} +233 -1127
  55. package/dist/{store-Dn4W7qgH.js → store-DdIEUL1q.js} +3 -3
  56. package/dist/{turn-session-routing-CGMKrYOj.js → task-runner-D_RDr2Hu.js} +1440 -993
  57. package/dist/{store-B26LV6UP.js → turn-failure-response-B5nV1Er-.js} +337 -6
  58. package/dist/{validation-TzhfQABF.js → validation-K4pqwoVZ.js} +1 -1
  59. package/dist/{version-DSk8CFvA.js → version-DBvhk1X9.js} +1 -1
  60. package/dist/version.js +1 -1
  61. package/dist/viewer-DrMmFUul.js +337 -0
  62. package/dist/{work-ybG4_q5C.js → work-ljRoODGu.js} +110 -94
  63. package/dist/{worker-ccSyZRNz.js → worker-CYO1Q0Js.js} +5 -6
  64. package/migrations/0086_shared_archive.sql +31 -0
  65. package/migrations/0087_child_location.sql +64 -0
  66. package/migrations/0088_conversation_unsubscribe.sql +1 -0
  67. package/migrations/meta/0086_snapshot.json +4366 -0
  68. package/migrations/meta/0087_snapshot.json +4366 -0
  69. package/migrations/meta/0088_snapshot.json +4372 -0
  70. package/migrations/meta/_journal.json +21 -0
  71. package/package.json +5 -4
  72. package/dist/config-DqFnykQT.js +0 -579
  73. package/dist/spawn-BB2_4VYn.js +0 -31
  74. package/dist/task-queue-Bt0IoR2i.js +0 -139
  75. package/dist/task-runner-D8lddjzp.js +0 -290
  76. package/dist/thread-state-CrFk3K_7.js +0 -173
  77. package/dist/turn-failure-response-DaJ04qVj.js +0 -224
  78. package/dist/turn-lifecycle-C2mXS7AZ.js +0 -58
@@ -669,7 +669,6 @@ declare const conversationSummaryReportSchema: z.ZodObject<{
669
669
  thread: "thread";
670
670
  }>;
671
671
  parentConversationId: z.ZodOptional<z.ZodString>;
672
- childArchivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
673
672
  isParticipant: z.ZodBoolean;
674
673
  visibility: z.ZodOptional<z.ZodEnum<{
675
674
  private: "private";
@@ -863,6 +862,7 @@ declare const conversationReportEventDataSchema: z.ZodDiscriminatedUnion<[z.ZodO
863
862
  actorIdentityId: z.ZodOptional<z.ZodString>;
864
863
  agentInvocationId: z.ZodOptional<z.ZodString>;
865
864
  eventType: z.ZodOptional<z.ZodString>;
865
+ eventNamespace: z.ZodOptional<z.ZodString>;
866
866
  eventObjectType: z.ZodOptional<z.ZodEnum<{
867
867
  automation: "automation";
868
868
  calendar_event: "calendar_event";
@@ -1028,6 +1028,11 @@ declare const conversationReportEventDataSchema: z.ZodDiscriminatedUnion<[z.ZodO
1028
1028
  contentType: z.ZodString;
1029
1029
  bytes: z.ZodNumber;
1030
1030
  }, z.core.$strict>>;
1031
+ }, z.core.$strict>, z.ZodObject<{
1032
+ type: z.ZodLiteral<"reply_posted">;
1033
+ plugin: z.ZodString;
1034
+ text: z.ZodString;
1035
+ url: z.ZodOptional<z.ZodString>;
1031
1036
  }, z.core.$strict>, z.ZodObject<{
1032
1037
  type: z.ZodLiteral<"guardian_action_reviewed">;
1033
1038
  turnId: z.ZodString;
@@ -1069,6 +1074,10 @@ declare const conversationReportEventDataSchema: z.ZodDiscriminatedUnion<[z.ZodO
1069
1074
  startedSeq: z.ZodNumber;
1070
1075
  startedAt: z.ZodString;
1071
1076
  childConversationId: z.ZodString;
1077
+ childKind: z.ZodEnum<{
1078
+ task: "task";
1079
+ thread: "thread";
1080
+ }>;
1072
1081
  subagentKind: z.ZodString;
1073
1082
  agentName: z.ZodOptional<z.ZodString>;
1074
1083
  task: z.ZodOptional<z.ZodString>;
@@ -1108,6 +1117,7 @@ declare const conversationReportEventSchema: z.ZodObject<{
1108
1117
  actorIdentityId: z.ZodOptional<z.ZodString>;
1109
1118
  agentInvocationId: z.ZodOptional<z.ZodString>;
1110
1119
  eventType: z.ZodOptional<z.ZodString>;
1120
+ eventNamespace: z.ZodOptional<z.ZodString>;
1111
1121
  eventObjectType: z.ZodOptional<z.ZodEnum<{
1112
1122
  automation: "automation";
1113
1123
  calendar_event: "calendar_event";
@@ -1273,6 +1283,11 @@ declare const conversationReportEventSchema: z.ZodObject<{
1273
1283
  contentType: z.ZodString;
1274
1284
  bytes: z.ZodNumber;
1275
1285
  }, z.core.$strict>>;
1286
+ }, z.core.$strict>, z.ZodObject<{
1287
+ type: z.ZodLiteral<"reply_posted">;
1288
+ plugin: z.ZodString;
1289
+ text: z.ZodString;
1290
+ url: z.ZodOptional<z.ZodString>;
1276
1291
  }, z.core.$strict>, z.ZodObject<{
1277
1292
  type: z.ZodLiteral<"guardian_action_reviewed">;
1278
1293
  turnId: z.ZodString;
@@ -1314,6 +1329,10 @@ declare const conversationReportEventSchema: z.ZodObject<{
1314
1329
  startedSeq: z.ZodNumber;
1315
1330
  startedAt: z.ZodString;
1316
1331
  childConversationId: z.ZodString;
1332
+ childKind: z.ZodEnum<{
1333
+ task: "task";
1334
+ thread: "thread";
1335
+ }>;
1317
1336
  subagentKind: z.ZodString;
1318
1337
  agentName: z.ZodOptional<z.ZodString>;
1319
1338
  task: z.ZodOptional<z.ZodString>;
@@ -1433,6 +1452,7 @@ declare const conversationEventPageSchema: z.ZodObject<{
1433
1452
  actorIdentityId: z.ZodOptional<z.ZodString>;
1434
1453
  agentInvocationId: z.ZodOptional<z.ZodString>;
1435
1454
  eventType: z.ZodOptional<z.ZodString>;
1455
+ eventNamespace: z.ZodOptional<z.ZodString>;
1436
1456
  eventObjectType: z.ZodOptional<z.ZodEnum<{
1437
1457
  automation: "automation";
1438
1458
  calendar_event: "calendar_event";
@@ -1598,6 +1618,11 @@ declare const conversationEventPageSchema: z.ZodObject<{
1598
1618
  contentType: z.ZodString;
1599
1619
  bytes: z.ZodNumber;
1600
1620
  }, z.core.$strict>>;
1621
+ }, z.core.$strict>, z.ZodObject<{
1622
+ type: z.ZodLiteral<"reply_posted">;
1623
+ plugin: z.ZodString;
1624
+ text: z.ZodString;
1625
+ url: z.ZodOptional<z.ZodString>;
1601
1626
  }, z.core.$strict>, z.ZodObject<{
1602
1627
  type: z.ZodLiteral<"guardian_action_reviewed">;
1603
1628
  turnId: z.ZodString;
@@ -1639,6 +1664,10 @@ declare const conversationEventPageSchema: z.ZodObject<{
1639
1664
  startedSeq: z.ZodNumber;
1640
1665
  startedAt: z.ZodString;
1641
1666
  childConversationId: z.ZodString;
1667
+ childKind: z.ZodEnum<{
1668
+ task: "task";
1669
+ thread: "thread";
1670
+ }>;
1642
1671
  subagentKind: z.ZodString;
1643
1672
  agentName: z.ZodOptional<z.ZodString>;
1644
1673
  task: z.ZodOptional<z.ZodString>;
@@ -1777,7 +1806,6 @@ declare const conversationDetailReportSchema: z.ZodObject<{
1777
1806
  thread: "thread";
1778
1807
  }>;
1779
1808
  parentConversationId: z.ZodOptional<z.ZodString>;
1780
- childArchivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1781
1809
  isParticipant: z.ZodBoolean;
1782
1810
  visibility: z.ZodOptional<z.ZodEnum<{
1783
1811
  private: "private";
@@ -1945,6 +1973,7 @@ declare const conversationDetailReportSchema: z.ZodObject<{
1945
1973
  autoArchive: z.ZodOptional<z.ZodBoolean>;
1946
1974
  canFork: z.ZodOptional<z.ZodBoolean>;
1947
1975
  canContinueInSlack: z.ZodOptional<z.ZodLiteral<true>>;
1976
+ subscribed: z.ZodOptional<z.ZodBoolean>;
1948
1977
  readPosition: z.ZodOptional<z.ZodObject<{
1949
1978
  lastReadSeq: z.ZodNumber;
1950
1979
  }, z.core.$strict>>;
@@ -1975,6 +2004,7 @@ declare const conversationDetailReportSchema: z.ZodObject<{
1975
2004
  actorIdentityId: z.ZodOptional<z.ZodString>;
1976
2005
  agentInvocationId: z.ZodOptional<z.ZodString>;
1977
2006
  eventType: z.ZodOptional<z.ZodString>;
2007
+ eventNamespace: z.ZodOptional<z.ZodString>;
1978
2008
  eventObjectType: z.ZodOptional<z.ZodEnum<{
1979
2009
  automation: "automation";
1980
2010
  calendar_event: "calendar_event";
@@ -2140,6 +2170,11 @@ declare const conversationDetailReportSchema: z.ZodObject<{
2140
2170
  contentType: z.ZodString;
2141
2171
  bytes: z.ZodNumber;
2142
2172
  }, z.core.$strict>>;
2173
+ }, z.core.$strict>, z.ZodObject<{
2174
+ type: z.ZodLiteral<"reply_posted">;
2175
+ plugin: z.ZodString;
2176
+ text: z.ZodString;
2177
+ url: z.ZodOptional<z.ZodString>;
2143
2178
  }, z.core.$strict>, z.ZodObject<{
2144
2179
  type: z.ZodLiteral<"guardian_action_reviewed">;
2145
2180
  turnId: z.ZodString;
@@ -2181,6 +2216,10 @@ declare const conversationDetailReportSchema: z.ZodObject<{
2181
2216
  startedSeq: z.ZodNumber;
2182
2217
  startedAt: z.ZodString;
2183
2218
  childConversationId: z.ZodString;
2219
+ childKind: z.ZodEnum<{
2220
+ task: "task";
2221
+ thread: "thread";
2222
+ }>;
2184
2223
  subagentKind: z.ZodString;
2185
2224
  agentName: z.ZodOptional<z.ZodString>;
2186
2225
  task: z.ZodOptional<z.ZodString>;
@@ -2371,6 +2410,7 @@ declare const conversationDetailReportSchema: z.ZodObject<{
2371
2410
  actorIdentityId: z.ZodOptional<z.ZodString>;
2372
2411
  agentInvocationId: z.ZodOptional<z.ZodString>;
2373
2412
  eventType: z.ZodOptional<z.ZodString>;
2413
+ eventNamespace: z.ZodOptional<z.ZodString>;
2374
2414
  eventObjectType: z.ZodOptional<z.ZodEnum<{
2375
2415
  automation: "automation";
2376
2416
  calendar_event: "calendar_event";
@@ -2536,6 +2576,11 @@ declare const conversationDetailReportSchema: z.ZodObject<{
2536
2576
  contentType: z.ZodString;
2537
2577
  bytes: z.ZodNumber;
2538
2578
  }, z.core.$strict>>;
2579
+ }, z.core.$strict>, z.ZodObject<{
2580
+ type: z.ZodLiteral<"reply_posted">;
2581
+ plugin: z.ZodString;
2582
+ text: z.ZodString;
2583
+ url: z.ZodOptional<z.ZodString>;
2539
2584
  }, z.core.$strict>, z.ZodObject<{
2540
2585
  type: z.ZodLiteral<"guardian_action_reviewed">;
2541
2586
  turnId: z.ZodString;
@@ -2577,6 +2622,10 @@ declare const conversationDetailReportSchema: z.ZodObject<{
2577
2622
  startedSeq: z.ZodNumber;
2578
2623
  startedAt: z.ZodString;
2579
2624
  childConversationId: z.ZodString;
2625
+ childKind: z.ZodEnum<{
2626
+ task: "task";
2627
+ thread: "thread";
2628
+ }>;
2580
2629
  subagentKind: z.ZodString;
2581
2630
  agentName: z.ZodOptional<z.ZodString>;
2582
2631
  task: z.ZodOptional<z.ZodString>;
@@ -2868,7 +2917,6 @@ declare const conversationDetailWithMailboxReportSchema: z.ZodObject<{
2868
2917
  thread: "thread";
2869
2918
  }>;
2870
2919
  parentConversationId: z.ZodOptional<z.ZodString>;
2871
- childArchivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2872
2920
  isParticipant: z.ZodBoolean;
2873
2921
  visibility: z.ZodOptional<z.ZodEnum<{
2874
2922
  private: "private";
@@ -3036,6 +3084,7 @@ declare const conversationDetailWithMailboxReportSchema: z.ZodObject<{
3036
3084
  autoArchive: z.ZodOptional<z.ZodBoolean>;
3037
3085
  canFork: z.ZodOptional<z.ZodBoolean>;
3038
3086
  canContinueInSlack: z.ZodOptional<z.ZodLiteral<true>>;
3087
+ subscribed: z.ZodOptional<z.ZodBoolean>;
3039
3088
  readPosition: z.ZodOptional<z.ZodObject<{
3040
3089
  lastReadSeq: z.ZodNumber;
3041
3090
  }, z.core.$strict>>;
@@ -3066,6 +3115,7 @@ declare const conversationDetailWithMailboxReportSchema: z.ZodObject<{
3066
3115
  actorIdentityId: z.ZodOptional<z.ZodString>;
3067
3116
  agentInvocationId: z.ZodOptional<z.ZodString>;
3068
3117
  eventType: z.ZodOptional<z.ZodString>;
3118
+ eventNamespace: z.ZodOptional<z.ZodString>;
3069
3119
  eventObjectType: z.ZodOptional<z.ZodEnum<{
3070
3120
  automation: "automation";
3071
3121
  calendar_event: "calendar_event";
@@ -3231,6 +3281,11 @@ declare const conversationDetailWithMailboxReportSchema: z.ZodObject<{
3231
3281
  contentType: z.ZodString;
3232
3282
  bytes: z.ZodNumber;
3233
3283
  }, z.core.$strict>>;
3284
+ }, z.core.$strict>, z.ZodObject<{
3285
+ type: z.ZodLiteral<"reply_posted">;
3286
+ plugin: z.ZodString;
3287
+ text: z.ZodString;
3288
+ url: z.ZodOptional<z.ZodString>;
3234
3289
  }, z.core.$strict>, z.ZodObject<{
3235
3290
  type: z.ZodLiteral<"guardian_action_reviewed">;
3236
3291
  turnId: z.ZodString;
@@ -3272,6 +3327,10 @@ declare const conversationDetailWithMailboxReportSchema: z.ZodObject<{
3272
3327
  startedSeq: z.ZodNumber;
3273
3328
  startedAt: z.ZodString;
3274
3329
  childConversationId: z.ZodString;
3330
+ childKind: z.ZodEnum<{
3331
+ task: "task";
3332
+ thread: "thread";
3333
+ }>;
3275
3334
  subagentKind: z.ZodString;
3276
3335
  agentName: z.ZodOptional<z.ZodString>;
3277
3336
  task: z.ZodOptional<z.ZodString>;
@@ -3462,6 +3521,7 @@ declare const conversationDetailWithMailboxReportSchema: z.ZodObject<{
3462
3521
  actorIdentityId: z.ZodOptional<z.ZodString>;
3463
3522
  agentInvocationId: z.ZodOptional<z.ZodString>;
3464
3523
  eventType: z.ZodOptional<z.ZodString>;
3524
+ eventNamespace: z.ZodOptional<z.ZodString>;
3465
3525
  eventObjectType: z.ZodOptional<z.ZodEnum<{
3466
3526
  automation: "automation";
3467
3527
  calendar_event: "calendar_event";
@@ -3627,6 +3687,11 @@ declare const conversationDetailWithMailboxReportSchema: z.ZodObject<{
3627
3687
  contentType: z.ZodString;
3628
3688
  bytes: z.ZodNumber;
3629
3689
  }, z.core.$strict>>;
3690
+ }, z.core.$strict>, z.ZodObject<{
3691
+ type: z.ZodLiteral<"reply_posted">;
3692
+ plugin: z.ZodString;
3693
+ text: z.ZodString;
3694
+ url: z.ZodOptional<z.ZodString>;
3630
3695
  }, z.core.$strict>, z.ZodObject<{
3631
3696
  type: z.ZodLiteral<"guardian_action_reviewed">;
3632
3697
  turnId: z.ZodString;
@@ -3668,6 +3733,10 @@ declare const conversationDetailWithMailboxReportSchema: z.ZodObject<{
3668
3733
  startedSeq: z.ZodNumber;
3669
3734
  startedAt: z.ZodString;
3670
3735
  childConversationId: z.ZodString;
3736
+ childKind: z.ZodEnum<{
3737
+ task: "task";
3738
+ thread: "thread";
3739
+ }>;
3671
3740
  subagentKind: z.ZodString;
3672
3741
  agentName: z.ZodOptional<z.ZodString>;
3673
3742
  task: z.ZodOptional<z.ZodString>;
@@ -4162,6 +4231,21 @@ declare const reorderPinnedConversationsResponseSchema: z.ZodObject<{
4162
4231
  }, z.core.$strict>;
4163
4232
  type ReorderPinnedConversationsBody = z.infer<typeof reorderPinnedConversationsBodySchema>;
4164
4233
  type ReorderPinnedConversationsResponse = z.infer<typeof reorderPinnedConversationsResponseSchema>;
4234
+ /** Subscribe to or unsubscribe from one Conversation for the viewer. */
4235
+ declare const conversationSubscriptionBodySchema: z.ZodObject<{
4236
+ subscribed: z.ZodBoolean;
4237
+ }, z.core.$strict>;
4238
+ /**
4239
+ * The viewer's subscription after the change. `archivedAt` is set when the
4240
+ * viewer was the last subscriber, so the unsubscribe archived the
4241
+ * Conversation for everyone.
4242
+ */
4243
+ declare const conversationSubscriptionResponseSchema: z.ZodObject<{
4244
+ archivedAt: z.ZodNullable<z.ZodString>;
4245
+ subscribed: z.ZodBoolean;
4246
+ }, z.core.$strict>;
4247
+ type ConversationSubscriptionBody = z.infer<typeof conversationSubscriptionBodySchema>;
4248
+ type ConversationSubscriptionResponse = z.infer<typeof conversationSubscriptionResponseSchema>;
4165
4249
  /** Mark one Conversation read or unread for the signed-in viewer. */
4166
4250
  declare const markConversationUnreadBodySchema: z.ZodObject<{
4167
4251
  unread: z.ZodBoolean;
@@ -4205,6 +4289,7 @@ declare const conversationChildAgentSchema: z.ZodObject<{
4205
4289
  namespace: z.ZodString;
4206
4290
  }, z.core.$strict>>;
4207
4291
  }, z.core.$strict>>;
4292
+ archivedAt: z.ZodNullable<z.ZodString>;
4208
4293
  childAgentTotals: z.ZodOptional<z.ZodObject<{
4209
4294
  auxiliaryCostUsd: z.ZodOptional<z.ZodNumber>;
4210
4295
  count: z.ZodNumber;
@@ -4259,7 +4344,6 @@ declare const conversationChildAgentSchema: z.ZodObject<{
4259
4344
  stopped: "stopped";
4260
4345
  }>;
4261
4346
  task: z.ZodOptional<z.ZodString>;
4262
- childArchivedAt: z.ZodNullable<z.ZodString>;
4263
4347
  title: z.ZodOptional<z.ZodString>;
4264
4348
  updatedAt: z.ZodString;
4265
4349
  }, z.core.$strict>;
@@ -4275,6 +4359,7 @@ declare const conversationChildAgentsReportSchema: z.ZodObject<{
4275
4359
  namespace: z.ZodString;
4276
4360
  }, z.core.$strict>>;
4277
4361
  }, z.core.$strict>>;
4362
+ archivedAt: z.ZodNullable<z.ZodString>;
4278
4363
  childAgentTotals: z.ZodOptional<z.ZodObject<{
4279
4364
  auxiliaryCostUsd: z.ZodOptional<z.ZodNumber>;
4280
4365
  count: z.ZodNumber;
@@ -4329,7 +4414,6 @@ declare const conversationChildAgentsReportSchema: z.ZodObject<{
4329
4414
  stopped: "stopped";
4330
4415
  }>;
4331
4416
  task: z.ZodOptional<z.ZodString>;
4332
- childArchivedAt: z.ZodNullable<z.ZodString>;
4333
4417
  title: z.ZodOptional<z.ZodString>;
4334
4418
  updatedAt: z.ZodString;
4335
4419
  }, z.core.$strict>>;
@@ -4658,7 +4742,6 @@ declare const actorProfileReportSchema: z.ZodObject<{
4658
4742
  thread: "thread";
4659
4743
  }>;
4660
4744
  parentConversationId: z.ZodOptional<z.ZodString>;
4661
- childArchivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4662
4745
  isParticipant: z.ZodBoolean;
4663
4746
  visibility: z.ZodOptional<z.ZodEnum<{
4664
4747
  private: "private";
@@ -5092,7 +5175,6 @@ declare const locationDetailReportSchema: z.ZodObject<{
5092
5175
  thread: "thread";
5093
5176
  }>;
5094
5177
  parentConversationId: z.ZodOptional<z.ZodString>;
5095
- childArchivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5096
5178
  isParticipant: z.ZodBoolean;
5097
5179
  visibility: z.ZodOptional<z.ZodEnum<{
5098
5180
  private: "private";
@@ -7371,4 +7453,4 @@ declare const versionsSchema: z.ZodObject<{
7371
7453
  spend: z.ZodString;
7372
7454
  }, z.core.$strict>;
7373
7455
  type Versions = z.output<typeof versionsSchema>;
7374
- export { automationEventCatalogSchema as $, dailyConversationActivitySchema as $i, ConversationCatchUp as $n, ConversationEventPage as $r, connectionSchema as $t, skillReportSchema as A, createConversationBodySchema as Ai, conversationWatchSchema as An, ConversationPendingMessagesReport as Ar, USER_CUSTOMIZATION_MAX_CHARS as At, AutomationExecutionStatusDay as B, CodeRepositoryReport as Bi, renameConversationResponseSchema as Bn, conversationUnchangedDetailWithMailboxSchema as Br, serviceAccountListSchema as Bt, pluginOperationalReportFeedSchema as C, conversationEventsQuerySchema as Ci, PersonalSpendReport as Cn, archiveConversationResponseSchema as Cr, baselineSnapshotSchema as Ct, pluginSchema as D, conversationReportEventDataSchema as Di, personalSpendReportSchema as Dn, CancelConversationPendingMessagesResponse as Dr, workspaceParamsSchema as Dt, pluginPackageContentReportSchema as E, conversationParamsSchema as Ei, personParamsSchema as En, CancelConversationPendingMessagesBody as Er, workspaceListSchema as Et, statsReportSchema as F, conversationTurnFailureReasonSchema as Fi, conversationChildAgentsReportSchema as Fn, conversationDetailWithMailboxReportSchema as Fr, personalTokenListSchema as Ft, AutomationRunWindows as G, codeOverviewReportSchema as Gi, PinConversationBody as Gn, CONVERSATION_DETAIL_VERSION_HEADER as Gr, notificationSettingsSchema as Gt, AutomationListQuery as H, codeActivityDaySchema as Hi, MarkConversationUnreadBody as Hn, steerConversationPendingMessagesResponseSchema as Hr, serviceAccountSchema as Ht, AutomationEdit as I, CodeActivityDay as Ii, CONVERSATION_TITLE_MAX_LENGTH as In, conversationPendingAuthorizationSchema as Ir, personalTokenMetadataSchema as It, AutomationUpdate as J, codeRepositoryReportSchema as Ji, ReorderPinnedConversationsResponse as Jn, ConversationAgentTreeNode as Jr, NotificationSchedule as Jt, AutomationScheduleIntent as K, codePersonReportSchema as Ki, PinConversationResponse as Kn, CONVERSATION_VERSION_HEADER as Kr, testNotificationResponseSchema as Kt, AutomationExecution as L, CodeChangeSummaryReport as Li, RenameConversationBody as Ln, conversationPendingMessageDeliverySchema as Lr, personalTokenParamsSchema as Lt, StatReport as M, forkConversationBodySchema as Mi, ConversationChildAgent as Mn, SteerConversationPendingMessagesResponse as Mr, PersonalTokenMetadata as Mt, StatsReport as N, forkConversationResponseSchema as Ni, ConversationChildAgentsReport as Nn, cancelConversationPendingMessagesBodySchema as Nr, createPersonalTokenBodySchema as Nt, pluginsSchema as O, conversationReportEventSchema as Oi, ConversationWatch as On, ConversationPendingMessage as Or, workspaceRepoSchema as Ot, statSchema as P, conversationTurnFailureCodeSchema as Pi, conversationChildAgentSchema as Pn, cancelConversationPendingMessagesResponseSchema as Pr, createdPersonalTokenSchema as Pt, automationEditSchema as Q, DailyConversationActivity as Qi, reorderPinnedConversationsResponseSchema as Qn, ConversationEventHistory as Qr, connectionParamsSchema as Qt, AutomationExecutionDay as R, CodeOverviewReport as Ri, RenameConversationResponse as Rn, conversationPendingMessageSchema as Rr, revokePersonalTokenResponseSchema as Rt, healthReportSchema as S, conversationEventPageSchema as Si, PersonParams as Sn, archiveConversationBodySchema as Sr, WorkspaceReport as St, pluginPackageContentItemReportSchema as T, conversationFeedSchema as Ti, actorProfileReportSchema as Tn, conversationAutoArchiveSchema as Tr, workspaceBodySchema as Tt, AutomationRun as U, codeChangeSummaryReportSchema as Ui, conversationUnreadSchema as Un, AcceptedConversationMessage as Ur, startServiceAccountSignInResponseSchema as Ut, AutomationList as V, CodeRepositorySummary as Vi, ConversationUnread as Vn, steerConversationPendingMessagesBodySchema as Vr, serviceAccountParamsSchema as Vt, AutomationRunList as W, codeChangeSummarySchema as Wi, markConversationUnreadBodySchema as Wn, ActorIdentity as Wr, NotificationSettings as Wt, ListedAutomationVersion as X, ConversationChildAgentTotals as Xi, pinConversationResponseSchema as Xn, ConversationCost as Xr, notificationScheduleSchema as Xt, AutomationVersionList as Y, codeRepositorySummarySchema as Yi, pinConversationBodySchema as Yn, ConversationAuxiliaryCosts as Yr, isWithinNotificationSchedule as Yt, automationEditErrorSchema as Z, conversationChildAgentTotalsSchema as Zi, reorderPinnedConversationsBodySchema as Zn, ConversationDetailReport as Zr, connectionListSchema as Zt, PluginPackageContentReport as _, INLINE_VIDEO_TYPES as _a, conversationActivityPreviewSchema as _i, ActorProfileReport as _n, GuardianStats as _r, automationVersionSchema as _t, ReviewItemPayload as a, UserInputAnswer as aa, ConversationReportEventData as ai, LocationActorSummaryReport as an, conversationReadPositionSchema as ar, automationListSchema as at, SkillReport as b, conversationDetailReportSchema as bi, ActorWindowMetrics as bn, ArchiveConversationResponse as br, BaselineSnapshotReport as bt, reviewItemListSchema as c, buttonUserInputField as ca, ConversationSourceTask as ci, LocationParams as cn, ContinueConversationInSlackResponse as cr, automationRunSchema as ct, ReviewItemChangeRecord as d, webMessageId as da, ConversationTurnFailureCode as di, locationDetailReportSchema as dn, StopConversationTurnResponse as dr, automationSchedulePreviewSchema as dt, MessageCard as ea, ConversationFeed as ei, disconnectConnectionResponseSchema as en, ConversationCatchUpBody as er, automationExecutionListSchema as et, HealthReport as f, isAgentInvocationResultEventType as fa, ConversationTurnFailureReason as fi, locationDirectoryReportSchema as fn, stopConversationTurnResponseSchema as fr, automationSummarySchema as ft, PluginPackageContentItemReport as g, MessageAttachment as ga, acceptedConversationMessageSchema as gi, ActorDirectoryWindows as gn, GuardianMetricDay as gr, automationVersionParamsSchema as gt, PluginOperationalReportFeed as h, MAX_INPUT_IMAGE_BYTES as ha, CreateConversationMessageBody as hi, ActorDirectoryReport as hn, ConversationStatsReport as hr, automationVersionListSchema as ht, ReviewItemActionBody as i, USER_INPUT_NOTE as ia, ConversationReportEvent as ii, LocationActivityDayReport as in, ConversationReadReport as ir, automationListQuerySchema as it, skillReportsSchema as j, createConversationMessageBodySchema as ji, conversationWatchesReportSchema as jn, SteerConversationPendingMessagesBody as jr, userCustomizationSchema as jt, runtimeInfoReportSchema as k, conversationSummaryReportSchema as ki, ConversationWatchesReport as kn, ConversationPendingMessageDelivery as kr, workspaceSchema as kt, reviewItemSchema as l, isEmptyUserInputAnswer as la, ConversationSummaryReport as li, LocationSummaryReport as ln, continueConversationInSlackBodySchema as lr, automationRunWindowsSchema as lt, PluginOperationalReport as m, MAX_INPUT_IMAGES as ma, CreateConversationBody as mi, ActorActivityDayReport as mn, ConversationStatsItem as mr, automationVersionActivateSchema as mt, Versions as n, resolveMessageCards as na, ConversationModelUsage as ni, ApiError as nn, conversationCatchUpSchema as nr, automationExecutionStatusDaySchema as nt, reviewItemActionSchema as o, UserInputField as oa, ConversationReportMessageEvent as oi, LocationDetailReport as on, conversationReadReportSchema as or, automationParamsSchema as ot, Plugin as p, InputImage as pa, ConversationUsage as pi, locationParamsSchema as pn, ConversationMetricDay as pr, automationUpdateSchema as pt, AutomationSummary as q, codeRepositoryParamsSchema as qi, ReorderPinnedConversationsBody as qn, ConversationActivityPreview as qr, DEFAULT_NOTIFICATION_SCHEDULE as qt, versionsSchema as r, AutomationCard as ra, ConversationParams as ri, apiErrorSchema as rn, ConversationReadPosition as rr, automationExecutionStatusSchema as rt, reviewItemCountSchema as s, UserInputRequest as sa, ConversationReportStatus as si, LocationDirectoryReport as sn, ContinueConversationInSlackBody as sr, automationRunListSchema as st, OwnedObjectAnnotation$1 as t, messageCardText as ta, ConversationFeedItem as ti, startConnectionResponseSchema as tn, conversationCatchUpBodySchema as tr, automationExecutionSchema as tt, reviewItemWaitingConversationsSchema as u, normalizeUserInputAnswer as ua, ConversationSurface as ui, locationActivityDayReportSchema as un, continueConversationInSlackResponseSchema as ur, automationScheduleIntentSchema as ut, Plugins as v, INPUT_IMAGE_TYPES as va, conversationAuxiliaryCostsSchema as vi, ActorSummaryReport as vn, conversationStatsReportSchema as vr, eventAutomationSummarySchema as vt, pluginOperationalReportSchema as w, conversationFeedQuerySchema as wi, actorDirectoryReportSchema as wn, archiveDoneConversationsResponseSchema as wr, deleteWorkspaceResponseSchema as wt, SkillReports as x, conversationEventHistorySchema as xi, PeopleActivityDayReport as xn, ConversationAutoArchive as xr, WorkspaceListReport as xt, RuntimeInfoReport as y, conversationDetailQuerySchema as yi, ActorTotalsReport as yn, ArchiveConversationBody as yr, scheduledAutomationSummarySchema as yt, AutomationExecutionList as z, CodePersonReport as zi, renameConversationBodySchema as zn, conversationPendingMessagesReportSchema as zr, disconnectServiceAccountResponseSchema as zt };
7456
+ export { automationEventCatalogSchema as $, codeRepositorySummarySchema as $i, pinConversationBodySchema as $n, ConversationAuxiliaryCosts as $r, connectionSchema as $t, skillReportSchema as A, conversationParamsSchema as Ai, conversationWatchSchema as An, CancelConversationPendingMessagesBody as Ar, USER_CUSTOMIZATION_MAX_CHARS as At, AutomationExecutionStatusDay as B, CodeActivityDay as Bi, renameConversationResponseSchema as Bn, conversationPendingAuthorizationSchema as Br, serviceAccountListSchema as Bt, pluginOperationalReportFeedSchema as C, conversationDetailQuerySchema as Ci, PersonalSpendReport as Cn, ArchiveConversationBody as Cr, baselineSnapshotSchema as Ct, pluginSchema as D, conversationEventsQuerySchema as Di, personalSpendReportSchema as Dn, archiveConversationResponseSchema as Dr, workspaceParamsSchema as Dt, pluginPackageContentReportSchema as E, conversationEventPageSchema as Ei, personParamsSchema as En, archiveConversationBodySchema as Er, workspaceListSchema as Et, statsReportSchema as F, createConversationMessageBodySchema as Fi, conversationChildAgentsReportSchema as Fn, SteerConversationPendingMessagesBody as Fr, personalTokenListSchema as Ft, AutomationRunWindows as G, CodeRepositorySummary as Gi, ConversationSubscriptionBody as Gn, steerConversationPendingMessagesBodySchema as Gr, notificationSettingsSchema as Gt, AutomationListQuery as H, CodeOverviewReport as Hi, MarkConversationUnreadBody as Hn, conversationPendingMessageSchema as Hr, serviceAccountSchema as Ht, AutomationEdit as I, forkConversationBodySchema as Ii, CONVERSATION_TITLE_MAX_LENGTH as In, SteerConversationPendingMessagesResponse as Ir, personalTokenMetadataSchema as It, AutomationUpdate as J, codeChangeSummarySchema as Ji, conversationSubscriptionResponseSchema as Jn, ActorIdentity as Jr, NotificationSchedule as Jt, AutomationScheduleIntent as K, codeActivityDaySchema as Ki, ConversationSubscriptionResponse as Kn, steerConversationPendingMessagesResponseSchema as Kr, testNotificationResponseSchema as Kt, AutomationExecution as L, forkConversationResponseSchema as Li, RenameConversationBody as Ln, cancelConversationPendingMessagesBodySchema as Lr, personalTokenParamsSchema as Lt, StatReport as M, conversationReportEventSchema as Mi, ConversationChildAgent as Mn, ConversationPendingMessage as Mr, PersonalTokenMetadata as Mt, StatsReport as N, conversationSummaryReportSchema as Ni, ConversationChildAgentsReport as Nn, ConversationPendingMessageDelivery as Nr, createPersonalTokenBodySchema as Nt, pluginsSchema as O, conversationFeedQuerySchema as Oi, ConversationWatch as On, archiveDoneConversationsResponseSchema as Or, workspaceRepoSchema as Ot, statSchema as P, createConversationBodySchema as Pi, conversationChildAgentSchema as Pn, ConversationPendingMessagesReport as Pr, createdPersonalTokenSchema as Pt, automationEditSchema as Q, codeRepositoryReportSchema as Qi, ReorderPinnedConversationsResponse as Qn, ConversationAgentTreeNode as Qr, connectionParamsSchema as Qt, AutomationExecutionDay as R, conversationTurnFailureCodeSchema as Ri, RenameConversationResponse as Rn, cancelConversationPendingMessagesResponseSchema as Rr, revokePersonalTokenResponseSchema as Rt, healthReportSchema as S, INPUT_IMAGE_TYPES as Sa, conversationAuxiliaryCostsSchema as Si, PersonParams as Sn, conversationStatsReportSchema as Sr, WorkspaceReport as St, pluginPackageContentItemReportSchema as T, conversationEventHistorySchema as Ti, actorProfileReportSchema as Tn, ConversationAutoArchive as Tr, workspaceBodySchema as Tt, AutomationRun as U, CodePersonReport as Ui, conversationUnreadSchema as Un, conversationPendingMessagesReportSchema as Ur, startServiceAccountSignInResponseSchema as Ut, AutomationList as V, CodeChangeSummaryReport as Vi, ConversationUnread as Vn, conversationPendingMessageDeliverySchema as Vr, serviceAccountParamsSchema as Vt, AutomationRunList as W, CodeRepositoryReport as Wi, markConversationUnreadBodySchema as Wn, conversationUnchangedDetailWithMailboxSchema as Wr, NotificationSettings as Wt, ListedAutomationVersion as X, codePersonReportSchema as Xi, PinConversationResponse as Xn, CONVERSATION_VERSION_HEADER as Xr, notificationScheduleSchema as Xt, AutomationVersionList as Y, codeOverviewReportSchema as Yi, PinConversationBody as Yn, CONVERSATION_DETAIL_VERSION_HEADER as Yr, isWithinNotificationSchedule as Yt, automationEditErrorSchema as Z, codeRepositoryParamsSchema as Zi, ReorderPinnedConversationsBody as Zn, ConversationActivityPreview as Zr, connectionListSchema as Zt, PluginPackageContentReport as _, InputImage as _a, ConversationUsage as _i, ActorProfileReport as _n, ConversationMetricDay as _r, automationVersionSchema as _t, ReviewItemPayload as a, messageCardText as aa, ConversationFeedItem as ai, LocationActorSummaryReport as an, conversationCatchUpBodySchema as ar, automationListSchema as at, SkillReport as b, MessageAttachment as ba, acceptedConversationMessageSchema as bi, ActorWindowMetrics as bn, GuardianMetricDay as br, BaselineSnapshotReport as bt, reviewItemListSchema as c, USER_INPUT_NOTE as ca, ConversationReportEvent as ci, LocationParams as cn, ConversationReadReport as cr, automationRunSchema as ct, ReviewItemChangeRecord as d, UserInputRequest as da, ConversationReportStatus as di, locationDetailReportSchema as dn, ContinueConversationInSlackBody as dr, automationSchedulePreviewSchema as dt, ConversationChildAgentTotals as ea, ConversationCost as ei, disconnectConnectionResponseSchema as en, pinConversationResponseSchema as er, automationExecutionListSchema as et, HealthReport as f, buttonUserInputField as fa, ConversationSourceTask as fi, locationDirectoryReportSchema as fn, ContinueConversationInSlackResponse as fr, automationSummarySchema as ft, PluginPackageContentItemReport as g, isAgentInvocationResultEventType as ga, ConversationTurnFailureReason as gi, ActorDirectoryWindows as gn, stopConversationTurnResponseSchema as gr, automationVersionParamsSchema as gt, PluginOperationalReportFeed as h, webMessageId as ha, ConversationTurnFailureCode as hi, ActorDirectoryReport as hn, StopConversationTurnResponse as hr, automationVersionListSchema as ht, ReviewItemActionBody as i, MessageCard as ia, ConversationFeed as ii, LocationActivityDayReport as in, ConversationCatchUpBody as ir, automationListQuerySchema as it, skillReportsSchema as j, conversationReportEventDataSchema as ji, conversationWatchesReportSchema as jn, CancelConversationPendingMessagesResponse as jr, userCustomizationSchema as jt, runtimeInfoReportSchema as k, conversationFeedSchema as ki, ConversationWatchesReport as kn, conversationAutoArchiveSchema as kr, workspaceSchema as kt, reviewItemSchema as l, UserInputAnswer as la, ConversationReportEventData as li, LocationSummaryReport as ln, conversationReadPositionSchema as lr, automationRunWindowsSchema as lt, PluginOperationalReport as m, normalizeUserInputAnswer as ma, ConversationSurface as mi, ActorActivityDayReport as mn, continueConversationInSlackResponseSchema as mr, automationVersionActivateSchema as mt, Versions as n, DailyConversationActivity as na, ConversationEventHistory as ni, ApiError as nn, reorderPinnedConversationsResponseSchema as nr, automationExecutionStatusDaySchema as nt, reviewItemActionSchema as o, resolveMessageCards as oa, ConversationModelUsage as oi, LocationDetailReport as on, conversationCatchUpSchema as or, automationParamsSchema as ot, Plugin as p, isEmptyUserInputAnswer as pa, ConversationSummaryReport as pi, locationParamsSchema as pn, continueConversationInSlackBodySchema as pr, automationUpdateSchema as pt, AutomationSummary as q, codeChangeSummaryReportSchema as qi, conversationSubscriptionBodySchema as qn, AcceptedConversationMessage as qr, DEFAULT_NOTIFICATION_SCHEDULE as qt, versionsSchema as r, dailyConversationActivitySchema as ra, ConversationEventPage as ri, apiErrorSchema as rn, ConversationCatchUp as rr, automationExecutionStatusSchema as rt, reviewItemCountSchema as s, AutomationCard as sa, ConversationParams as si, LocationDirectoryReport as sn, ConversationReadPosition as sr, automationRunListSchema as st, OwnedObjectAnnotation$1 as t, conversationChildAgentTotalsSchema as ta, ConversationDetailReport as ti, startConnectionResponseSchema as tn, reorderPinnedConversationsBodySchema as tr, automationExecutionSchema as tt, reviewItemWaitingConversationsSchema as u, UserInputField as ua, ConversationReportMessageEvent as ui, locationActivityDayReportSchema as un, conversationReadReportSchema as ur, automationScheduleIntentSchema as ut, Plugins as v, MAX_INPUT_IMAGES as va, CreateConversationBody as vi, ActorSummaryReport as vn, ConversationStatsItem as vr, eventAutomationSummarySchema as vt, pluginOperationalReportSchema as w, conversationDetailReportSchema as wi, actorDirectoryReportSchema as wn, ArchiveConversationResponse as wr, deleteWorkspaceResponseSchema as wt, SkillReports as x, INLINE_VIDEO_TYPES as xa, conversationActivityPreviewSchema as xi, PeopleActivityDayReport as xn, GuardianStats as xr, WorkspaceListReport as xt, RuntimeInfoReport as y, MAX_INPUT_IMAGE_BYTES as ya, CreateConversationMessageBody as yi, ActorTotalsReport as yn, ConversationStatsReport as yr, scheduledAutomationSummarySchema as yt, AutomationExecutionList as z, conversationTurnFailureReasonSchema as zi, renameConversationBodySchema as zn, conversationDetailWithMailboxReportSchema as zr, disconnectServiceAccountResponseSchema as zt };
@@ -1,7 +1,7 @@
1
- import { W as isRecord, b as setSpanAttributes, h as logWarn } from "./logging-BfORLKoq.js";
2
- import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-rC7MCxu8.js";
1
+ import { W as isRecord, b as setSpanAttributes, h as logWarn } from "./logging-BO5zU6Mt.js";
2
+ import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-BriFLnaJ.js";
3
3
  import { a as withLock, i as fenceLock, n as MUTATION_LOCK_TTL_MS } from "./locks-D-0h111u.js";
4
- import { r as getStateAdapter } from "./adapter-DN5AB4VU.js";
4
+ import { r as getStateAdapter } from "./adapter-CL-HUKgd.js";
5
5
  import { AsyncLocalStorage } from "node:async_hooks";
6
6
  import { randomUUID } from "node:crypto";
7
7
  import { UnauthorizedError, auth } from "@modelcontextprotocol/sdk/client/auth.js";
@@ -1,6 +1,6 @@
1
- import { n as pluginCatalogRuntime } from "./catalog-runtime-Bte6jRB2.js";
2
- import { t as disconnectStateAdapter } from "./adapter-DN5AB4VU.js";
3
- import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-BI5Wgx22.js";
1
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-BCIuBe4d.js";
2
+ import { t as disconnectStateAdapter } from "./adapter-CL-HUKgd.js";
3
+ import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-DiQQuuw7.js";
4
4
  import { CLI_USAGE } from "./cli/run.js";
5
5
  import { createServer } from "node:http";
6
6
  // src/cli/service-account.ts
@@ -1,20 +1,19 @@
1
1
  import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { Br as cancelSubscriptions, Ha as sandboxSkillDir, Kn as getPluginUserPromptContributions, Li as escapeSlackMrkdwnText, Lo as JUNIOR_NATIVE_EVENT_NAMESPACE, Mn as isExperimentalFeatureEnabled, P as normalizeConversationText, Qt as hasRuntimeTurnContext, Ra as SANDBOX_DATA_ROOT, Ri as formatSlackLink, Ro as conversationNoteEvent, Ua as sandboxSkillFile, Un as getPluginSlackConversationLink, Va as SANDBOX_WORKSPACE_ROOT, Wa as sandboxSkillPathResolution, Wn as getPluginSystemPromptContributions, Yi as postSlackMessage, _i as listWorkspaces, _n as renderUntrustedTag, ai as getDashboardObjectIconLink, an as isToolResultMessage, b as toStoredConversationMessage, cn as stripRuntimeTurnContext, dn as SESSION_CONTEXT_SECTION_TAG, fn as TURN_CONTEXT_TAG, fr as getReviewItem, gn as renderTag$1, hn as renderChildTag, ho as buildSentryConversationUrl, ii as getDashboardConversationLink, in as isToolResultError, mn as escapeTagText, ni as verifyTimerWatchCredentialSubject, nt as getTurnRecord, on as normalizeToolNameFromResult, pn as escapeClosingTags, qn as getPlugins, ri as JUNIOR_THREAD_STATE_TTL_MS, rt as listTurnSummaries, sn as retainRuntimeTurnContext, tn as isAssistantMessage, ui as ToolInputError, un as REQUEST_CONTEXT_SECTION_TAG, vn as tagJson, zi as normalizeSlackReplyMarkdown } from "./projection-DliWYrnT.js";
3
- import { f as renderCurrentInstruction, h as escapeXmlText, m as escapeXml } from "./client-DDbBucBw.js";
4
- import { n as botConfig } from "./config-DqFnykQT.js";
5
- import { h as logWarn, m as logInfo, p as logException, v as serializeGenAiAttribute } from "./logging-BfORLKoq.js";
2
+ import { $i as postSlackMessage, Ga as SANDBOX_WORKSPACE_ROOT, Ha as SANDBOX_DATA_ROOT, Hi as formatSlackLink, In as isExperimentalFeatureEnabled, Ja as sandboxSkillPathResolution, Jn as getPluginSystemPromptContributions, Ka as sandboxSkillDir, N as normalizeConversationText, Ui as normalizeSlackReplyMarkdown, Vi as escapeSlackMrkdwnText, Wr as cancelSubscriptions, Xn as getPluginUserPromptContributions, Zn as getPlugins, at as listTurnSummaries, bn as renderUntrustedTag, ci as getDashboardConversationLink, cn as normalizeToolNameFromResult, en as hasRuntimeTurnContext, fn as REQUEST_CONTEXT_SECTION_TAG, gn as escapeTagText, gr as getReviewItem, hn as escapeClosingTags, it as getTurnRecord, li as getDashboardObjectIconLink, ln as retainRuntimeTurnContext, mi as ToolInputError, mn as TURN_CONTEXT_TAG, oi as verifyTimerWatchCredentialSubject, on as isToolResultError, pn as SESSION_CONTEXT_SECTION_TAG, qa as sandboxSkillFile, qn as getPluginSlackConversationLink, rn as isAssistantMessage, si as JUNIOR_THREAD_STATE_TTL_MS, sn as isToolResultMessage, un as stripRuntimeTurnContext, vn as renderChildTag, vo as buildSentryConversationUrl, x as toStoredConversationMessage, xi as listWorkspaces, xn as tagJson, yn as renderTag$1 } from "./projection-CL_YWeGf.js";
3
+ import { A as renderCurrentInstruction, M as escapeXml, N as escapeXmlText, n as botConfig } from "./config-CkHcUMN7.js";
4
+ import { h as logWarn, m as logInfo, p as logException, v as serializeGenAiAttribute } from "./logging-BO5zU6Mt.js";
6
5
  import { o as isUserActor, t as createActor } from "./actor-6jsm_v96.js";
7
- import { C as getSqlExecutor, H as SYSTEM_IDENTITY_ID, S as getDb, tt as nextDetailVersion, x as getConversationStore, y as getConversationEventStore } from "./viewer-1Ea81s0b.js";
8
- import { N as juniorUsers, j as juniorConversations } from "./executor-BLEMIgIZ.js";
9
- import { i as isVisionImageMediaType } from "./media-Bu9C6lz0.js";
6
+ import { T as SYSTEM_IDENTITY_ID, a as getConversationStore, o as getDb, r as getConversationEventStore, s as getSqlExecutor, z as nextDetailVersion } from "./db-DJ11eZqq.js";
7
+ import { A as juniorConversations, M as juniorUsers } from "./executor-BY9TB31g.js";
8
+ import { i as isVisionImageMediaType } from "./media-Cz1ZiV1U.js";
10
9
  import { a as listReferenceFiles, c as soulPathCandidates, l as worldPathCandidates } from "./package-discovery-DJhGdS4c.js";
11
- import { h as credentialSubjectSchema } from "./registry-rC7MCxu8.js";
12
- import { r as getStateAdapter } from "./adapter-DN5AB4VU.js";
13
- import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage, r as EVENT_AUTHOR_ID } from "./prompt-BvIUzY4y.js";
14
- import { a as QUIET_MARKER, i as NO_REPLY_MARKER, r as sanitizeAssistantText } from "./assistant-reply-9Jip5bsr.js";
15
- import { E as userCustomizationTextSchema, _ as formatUserInputAnswer } from "./reporting-window-B4TwyuJo.js";
16
- import { r as appendAndEnqueueInboundMessage } from "./store-Dn4W7qgH.js";
17
- import { dt as CORE_EVENT_NAMESPACE, ht as eventGuidance, mt as eventCatalogEntry } from "./turn-session-routing-CGMKrYOj.js";
10
+ import { h as credentialSubjectSchema } from "./registry-BriFLnaJ.js";
11
+ import { a as EVENT_SYSTEM_ACTOR, d as JUNIOR_NATIVE_EVENT_NAMESPACE, h as conversationNoteEvent, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage, r as EVENT_AUTHOR_ID } from "./prompt-BHOEQSmf.js";
12
+ import { r as getStateAdapter } from "./adapter-CL-HUKgd.js";
13
+ import { a as QUIET_MARKER, i as NO_REPLY_MARKER, r as sanitizeAssistantText } from "./assistant-reply-u_PRYzuz.js";
14
+ import { D as userCustomizationTextSchema, v as formatUserInputAnswer } from "./reporting-window-B3Ze-Qnt.js";
15
+ import { r as appendAndEnqueueInboundMessage } from "./store-DdIEUL1q.js";
16
+ import { Tt as eventGuidance, wt as eventCatalogEntry, xt as CORE_EVENT_NAMESPACE } from "./task-runner-D_RDr2Hu.js";
18
17
  import path from "node:path";
19
18
  import { isDeepStrictEqual } from "node:util";
20
19
  import * as z from "zod";
@@ -160,7 +159,7 @@ const TASK_EXECUTION_RULES = [
160
159
  * input itself holds only facts.
161
160
  */
162
161
  const AGENT_INPUT_RULES = [
163
- "- An `<agent-result>` reports a child agent that you started. Act on its `status`. `completed`: use the result to continue the work in this conversation, and do not repeat work that the child agent already did. `failed`: if you still need this work, use messageAgent to ask the same child agent to try again, or tell the user what is blocked. `stopped`: the child agent was stopped on purpose; do not start this work again unless the user asks. `blocked`: the child agent did not finish because something is missing. If you can give it, send it to the child agent with messageAgent. If only a person can give it, such as user approval, your own text cannot give it. Do not ask in plain text: add one action item with `addReviewItem` that names the exact action. Make its `dedupe_key` from the child conversation and the blocked action, so a repeat block updates the same item. After the user answers in this conversation, tell the child agent with messageAgent to try again. The runtime shows the user's own messages to the child's action review. Otherwise tell the user what is missing.",
162
+ "- An `<agent-result>` reports a child agent that you started. Act on its `status`. `completed`: use the result to continue the work in this conversation, and do not repeat work that the child agent already did. `failed`: if you still need this work, use messageAgent to ask the same child agent to try again, or tell the user what is blocked. `stopped`: the child agent was stopped on purpose; do not start this work again unless the user asks. `blocked`: the child agent did not finish because something is missing. If you can give it, send it to the child agent with messageAgent. If only a person can give it, such as user approval, do not ask in plain text: add one action item with `addReviewItem` that names the exact action. Make its `dedupe_key` from the child conversation and the blocked action, so a repeat block updates the same item. After the user answers in this conversation, use messageAgent to pass the approval on to the child agent, name the exact action, and tell it to try again. Otherwise tell the user what is missing.",
164
163
  "- `waiting_on` on an `<agent-result>` names child agents that you started that have not reported yet. Their results arrive later. Unless this result is useful to the user alone, wait for them before you report.",
165
164
  "- An `<agent-message source=\"child_agent\">` comes from a child agent that can still be working; its result arrives later. If it needs an answer, use messageAgent.",
166
165
  "- A child agent calls people by their Slack mention. When your reply is to a person that a child agent names, write to them as \"you\", and do not also name them in the third person.",
@@ -803,8 +802,9 @@ function buildTurnContextPrompt(params) {
803
802
  * before it calls the model, so without this note the model cannot see it.
804
803
  * The note has the error reference, never the raw error.
805
804
  */
806
- function failedTurnNote(eventId) {
807
- return `Your previous turn failed before it finished. The person may have seen an error reply or no reply.${eventId ? ` Error reference: event_id=${eventId}.` : ""} Do not assume that request was completed.`;
805
+ function failedTurnNote(failureCode, eventId) {
806
+ const reference = eventId ? ` Error reference: event_id=${eventId}.` : "";
807
+ return `Your previous turn failed before it finished. ${failureCode === "delivery_failed" ? "Your reply was not delivered, so the person did not see it. They may have seen an error reply." : "The person may have seen an error reply or no reply."}${reference} Do not assume that request was completed.`;
808
808
  }
809
809
  /** Most notes that one Turn shows. Older notes in the window are dropped. */
810
810
  const MAX_CONVERSATION_NOTES_PER_TURN = 20;
@@ -854,7 +854,7 @@ async function loadTurnConversationNotes(input) {
854
854
  if (data.turnId !== input.turnId) return [];
855
855
  foundTurn = true;
856
856
  } else if (foundTurn && data.type === "turn_failed") {
857
- newestFirst.push(failedTurnNote(data.eventId));
857
+ newestFirst.push(failedTurnNote(data.failureCode, data.eventId));
858
858
  if (newestFirst.length === MAX_CONVERSATION_NOTES_PER_TURN) break scan;
859
859
  } else if (foundTurn && data.type === "structured_event" && data.namespace === "junior" && data.name === conversationNoteEvent.eventName && data.version === conversationNoteEvent.version) {
860
860
  newestFirst.push(conversationNoteEvent.parse(data.content).text);
@@ -898,7 +898,7 @@ const MAX_INLINE_ATTACHMENT_BASE64_CHARS = 12e4;
898
898
  * background text so ambient messages never look like more instruction.
899
899
  */
900
900
  function renderThreadContextForPrompt(context) {
901
- if (/^<(?:thread-context|thread-compactions|thread-transcript|thread-background|recent-thread-messages)(?:\s|>)/.test(context)) return context;
901
+ if (/^<(?:thread-context|thread-transcript|thread-background|recent-thread-messages)(?:\s|>)/.test(context)) return context;
902
902
  return [
903
903
  "<thread-context authority=\"evidence-only\">",
904
904
  context,
@@ -1030,14 +1030,13 @@ function buildUserTurnInput(args) {
1030
1030
  }
1031
1031
  /** Build the prompt-facing user input. */
1032
1032
  function buildPromptInput(args) {
1033
- const { instruction, history } = args;
1034
- const promptConversationContext = history && history.length > 0 && !instruction.includeConversationContextWithHistory ? void 0 : instruction.context;
1033
+ const { instruction } = args;
1035
1034
  const promptInput = buildUserTurnInput({
1036
1035
  omittedImageAttachmentCount: instruction.omittedImageAttachmentCount ?? 0,
1037
1036
  userAttachments: instruction.attachments ? [...instruction.attachments] : void 0,
1038
1037
  inputParts: renderInputParts(instruction)
1039
1038
  });
1040
- const trimmedContext = promptConversationContext?.trim();
1039
+ const trimmedContext = instruction.context?.trim();
1041
1040
  return {
1042
1041
  ...promptInput,
1043
1042
  contextContentParts: trimmedContext ? [{
@@ -1831,7 +1830,8 @@ async function releaseFailedNoticeClaim(args) {
1831
1830
  /** Post the pause notice for one Conversation Location when known. */
1832
1831
  async function postAutomatedTurnLimitNoticeForConversation(args) {
1833
1832
  try {
1834
- const location = (await getConversationStore().get({ conversationId: args.conversationId }))?.location;
1833
+ const conversation = await getConversationStore().get({ conversationId: args.conversationId });
1834
+ const location = conversation?.parentConversationId ? void 0 : conversation?.location;
1835
1835
  if (!location || location.provider !== "slack") {
1836
1836
  logWarn("automated_turn_limit.notice_skipped", {
1837
1837
  conversationId: args.conversationId,
@@ -2452,6 +2452,7 @@ function eventBatchMessageMeta(messages) {
2452
2452
  const events = watched.length > 1 ? watched.flatMap(messageEvent) : reviewItemChanges.length && primary ? messageEvent(primary) : [];
2453
2453
  return {
2454
2454
  eventType: metadata.event.eventType,
2455
+ eventNamespace: metadata.event.namespace,
2455
2456
  eventObjectType: metadata.event.objectType,
2456
2457
  ...metadata.event.trustedSummary ? { trustedSummary: metadata.event.trustedSummary } : void 0,
2457
2458
  ...events.length ? { events } : void 0,
@@ -2626,7 +2627,7 @@ async function getActiveConversationTurnId(conversationId) {
2626
2627
  /** Return the web and event mailbox Turns that are paused or running. */
2627
2628
  async function listActiveMailboxTurns(conversationId) {
2628
2629
  const summaries = await listTurnSummaries(conversationId);
2629
- return (await Promise.all(summaries.filter((summary) => !summary.dispatchId && (summary.state === "paused" || summary.state === "running")).map((summary) => getTurnRecord(conversationId, summary.turnId)))).filter((record) => record !== void 0 && !record.dispatchId && (record.source?.kind === "web" || record.source?.kind === "event" || !record.source && (record.surface === "api" || hasEventActor(record.actors))) && (record.state === "paused" || record.state === "running"));
2630
+ return (await Promise.all(summaries.filter((summary) => !summary.dispatchId && (summary.state === "paused" || summary.state === "running")).map((summary) => getTurnRecord(conversationId, summary.turnId)))).filter((record) => record !== void 0 && !record.dispatchId && record.surface !== "internal" && (record.source?.kind === "web" || record.source?.kind === "event" || !record.source && (record.surface === "api" || hasEventActor(record.actors))) && (record.state === "paused" || record.state === "running"));
2630
2631
  }
2631
2632
  /** Return the active web or event mailbox Turn. */
2632
2633
  async function getActiveMailboxTurnId(conversationId) {
@@ -2641,6 +2642,7 @@ async function getAuthPausedConversationTurnId(conversationId) {
2641
2642
  const record = await getTurnRecord(conversationId, turnId);
2642
2643
  return record?.state === "paused" && record.resumeReason === "auth" ? turnId : void 0;
2643
2644
  }
2645
+ /** Read one web input batch as Turn input. A batch with no web input gives []. */
2644
2646
  function parseWebMessages(messages) {
2645
2647
  if (messages.length === 0) return [];
2646
2648
  const parsed = messages.map((message) => ({
@@ -2921,4 +2923,4 @@ async function saveStoppedConversationEvents(conversationId, messages) {
2921
2923
  }
2922
2924
  }]);
2923
2925
  }
2924
- export { saveUserCustomization as $, slackChannelMessageReplyThreadTs as A, resolveSlackReplyTarget as B, isEventMailboxMetadata as C, SLACK_EVENT_NAMESPACE as D, getEventCatalog as E, workspaceSnapshotFinishedEvent as F, resetAutomatedTurnLimit as G, renderSlackObjectCard as H, workspaceSnapshotWatch as I, buildSteeringPiMessage as J, assemblePrompt as K, renderTaskInput as L, slackChannelMessageTrigger as M, WORKSPACE_SNAPSHOT_FAILED_EVENT as N, requireSlackChannelMessageScope as O, WORKSPACE_SNAPSHOT_READY_EVENT as P, readUserCustomization as Q, maybePostAutomatedTurnLimitNotice as R, eventBatchMessageMeta as S, timerWatchCredentialSubject as T, admitAutomatedTurn as U, sendSlackReply as V, recordFinishedTurnForAutomatedLimit as W, loadPromptTurnContext as X, instructionForInputs as Y, withoutSavedSteeringMessages as Z, legacyWebMailboxMetadataSchema as _, session_stop_exports as a, automationResultSchema as at, EVENT_WAIT_MS as b, loadReviewItemInput as c, postsRunNotices as ct, getEventBatchDelayMs as d, runDispatchOutcome as dt, addConversationNote as et, listActiveMailboxTurns as f, turnInputFactsFromConversationMessage as g, sourceFromTurnInput as h, resumeStoppedConversationTree as i, FINISH_AUTOMATION_RUN_TOOL_NAME as it, slackChannelMessageRunsAutomation as j, slackChannelMessageEvent as k, savedInputInstruction as l, readAutomationResult as lt, resolveMailboxTurnWork as m, isWatchEvent as n, REPORT_BLOCKED_TOOL_NAME as nt, skipInputAfterConversationStop as o, deliversFinalText as ot, parseEventMessages as p, buildPromptInput as q, markConversationsStopped as r, readBlockedReport as rt, eventReviewItemInputs as s, finishedRunReply as st, getConversationStoppedAtMs as t, JUNIOR_PERSONALITY as tt, getAuthPausedConversationTurnId as u, remindMissingAutomationResult as ut, conversationSubtree as v, renderEventBatchInputs as w, enqueueEventNotification as x, conversationSubtreeColumns as y, postAutomatedTurnLimitNoticeForConversation as z };
2926
+ export { withoutSavedSteeringMessages as $, requireSlackChannelMessageScope as A, maybePostAutomatedTurnLimitNotice as B, enqueueEventNotification as C, timerWatchCredentialSubject as D, renderEventBatchInputs as E, WORKSPACE_SNAPSHOT_FAILED_EVENT as F, admitAutomatedTurn as G, resolveSlackReplyTarget as H, WORKSPACE_SNAPSHOT_READY_EVENT as I, assemblePrompt as J, recordFinishedTurnForAutomatedLimit as K, workspaceSnapshotFinishedEvent as L, slackChannelMessageReplyThreadTs as M, slackChannelMessageRunsAutomation as N, getEventCatalog as O, slackChannelMessageTrigger as P, loadPromptTurnContext as Q, workspaceSnapshotWatch as R, EVENT_WAIT_MS as S, isEventMailboxMetadata as T, sendSlackReply as U, postAutomatedTurnLimitNoticeForConversation as V, renderSlackObjectCard as W, buildSteeringPiMessage as X, buildPromptInput as Y, instructionForInputs as Z, sourceFromTurnInput as _, session_stop_exports as a, readBlockedReport as at, conversationSubtree as b, loadReviewItemInput as c, deliversFinalText as ct, getAuthPausedConversationTurnId as d, readAutomationResult as dt, readUserCustomization as et, getEventBatchDelayMs as f, remindMissingAutomationResult as ft, resolveMailboxTurnWork as g, parseWebMessages as h, resumeStoppedConversationTree as i, REPORT_BLOCKED_TOOL_NAME as it, slackChannelMessageEvent as j, SLACK_EVENT_NAMESPACE as k, savedInputInstruction as l, finishedRunReply as lt, parseEventMessages as m, isWatchEvent as n, addConversationNote as nt, skipInputAfterConversationStop as o, FINISH_AUTOMATION_RUN_TOOL_NAME as ot, listActiveMailboxTurns as p, runDispatchOutcome as pt, resetAutomatedTurnLimit as q, markConversationsStopped as r, JUNIOR_PERSONALITY as rt, eventReviewItemInputs as s, automationResultSchema as st, getConversationStoppedAtMs as t, saveUserCustomization as tt, getActiveConversationTurnId as u, postsRunNotices as ut, turnInputFactsFromConversationMessage as v, eventBatchMessageMeta as w, conversationSubtreeColumns as x, legacyWebMailboxMetadataSchema as y, renderTaskInput as z };
@@ -1,7 +1,7 @@
1
1
  import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { h as logWarn } from "./logging-BfORLKoq.js";
2
+ import { h as logWarn } from "./logging-BO5zU6Mt.js";
3
3
  import { s as skillRoots } from "./package-discovery-DJhGdS4c.js";
4
- import { n as pluginCatalogRuntime } from "./catalog-runtime-Bte6jRB2.js";
4
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-BCIuBe4d.js";
5
5
  import path from "node:path";
6
6
  import * as z from "zod";
7
7
  import fs from "node:fs/promises";
@@ -0,0 +1,79 @@
1
+ import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
+ import { n as botConfig } from "./config-CkHcUMN7.js";
3
+ import { o as getDb, x as conversationKindFromRow } from "./db-DJ11eZqq.js";
4
+ import { A as juniorConversations } from "./executor-BY9TB31g.js";
5
+ import { $t as toolInvocationDestination, Qt as actorFromRun, Vt as AgentDepthLimitError } from "./agent-runner-Bfnw551N.js";
6
+ import { n as createAndEnqueueAgentInvocation } from "./work-ljRoODGu.js";
7
+ import { desc, eq, sql } from "drizzle-orm";
8
+ // src/chat/conversations/lineage.ts
9
+ /**
10
+ * Read the parent chain of a Conversation in one query, root first, with the
11
+ * Conversation last. Returns an empty list when the Conversation is missing.
12
+ *
13
+ * The chain stops at a parent that is missing or that is already in the
14
+ * chain. Then the first entry still has a `parentConversationId`, so callers
15
+ * can tell a broken chain from one that ends at a root.
16
+ */
17
+ async function readConversationLineage(conversationId) {
18
+ const lineage = sql`(
19
+ with recursive lineage(conversation_id, parent_conversation_id, depth, path) as (
20
+ select selected.conversation_id, selected.parent_conversation_id, 0, array[selected.conversation_id]
21
+ from junior_conversations selected
22
+ where selected.conversation_id = ${conversationId}
23
+ union all
24
+ select parent.conversation_id, parent.parent_conversation_id, lineage.depth + 1, lineage.path || parent.conversation_id
25
+ from junior_conversations parent
26
+ join lineage on parent.conversation_id = lineage.parent_conversation_id
27
+ where parent.conversation_id <> all(lineage.path)
28
+ )
29
+ select conversation_id, depth from lineage
30
+ ) conversation_lineage`;
31
+ return (await getDb().select({
32
+ conversationId: juniorConversations.conversationId,
33
+ kind: juniorConversations.kind,
34
+ parentConversationId: juniorConversations.parentConversationId
35
+ }).from(juniorConversations).innerJoin(lineage, eq(sql`conversation_lineage.conversation_id`, juniorConversations.conversationId)).orderBy(desc(sql`conversation_lineage.depth`))).map((row) => ({
36
+ conversationId: row.conversationId,
37
+ kind: conversationKindFromRow(row),
38
+ ...row.parentConversationId ? { parentConversationId: row.parentConversationId } : void 0
39
+ }));
40
+ }
41
+ // src/chat/agent-invocations/spawn.ts
42
+ var spawn_exports = /* @__PURE__ */ __exportAll({ bindSpawnAgent: () => bindSpawnAgent });
43
+ /**
44
+ * Count the parents of the Conversation that starts a child agent. A chain
45
+ * that does not end at a root, such as a cycle, cannot start one.
46
+ */
47
+ async function assertCanStartChildAgent(conversationId, maxAgentDepth) {
48
+ const lineage = await readConversationLineage(conversationId);
49
+ const root = lineage[0];
50
+ if (!root || root.parentConversationId || lineage.length - 1 > maxAgentDepth) throw new AgentDepthLimitError(maxAgentDepth);
51
+ }
52
+ /** Bind a Run's Actor and credentials to new Agent invocations. */
53
+ function bindSpawnAgent(run, options) {
54
+ const actor = actorFromRun(run);
55
+ if (!actor) return;
56
+ return async (input, call) => {
57
+ call.signal?.throwIfAborted();
58
+ await assertCanStartChildAgent(run.conversationId, options.maxAgentDepth ?? botConfig.maxAgentDepth);
59
+ const queue = typeof options.queue === "function" ? options.queue() : options.queue;
60
+ return { childConversationId: (await createAndEnqueueAgentInvocation({
61
+ actor,
62
+ ...input.name ? { agentName: input.name } : void 0,
63
+ ...input.agentType ? { agentType: input.agentType } : void 0,
64
+ ...run.credentialContext ? { credentialContext: run.credentialContext } : void 0,
65
+ destination: toolInvocationDestination(run),
66
+ idempotencyKey: `${run.turnId}:${call.toolCallId}`,
67
+ input: input.task,
68
+ ...input.kind ? { kind: input.kind } : void 0,
69
+ parentConversationId: run.conversationId,
70
+ parentToolCallId: call.toolCallId,
71
+ ...input.reasoningLevel ? { reasoningLevel: input.reasoningLevel } : void 0,
72
+ ...input.title ? { title: input.title } : void 0
73
+ }, {
74
+ ...options,
75
+ queue
76
+ })).childConversationId };
77
+ };
78
+ }
79
+ export { spawn_exports as n, readConversationLineage as r, bindSpawnAgent as t };