@desplega.ai/agent-swarm 2.13.1 → 2.13.2

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 (183) hide show
  1. package/README.md +1 -1
  2. package/dist/{acp-adapter-xtj40wd8.js → acp-adapter-x1qqgzwx.js} +5 -5
  3. package/dist/{acp-targets-n7vm5atw.js → acp-targets-mz8c5dnt.js} +4 -4
  4. package/dist/{actions-hq6wp9xv.js → actions-5ft3qp5a.js} +25 -25
  5. package/dist/{agent-fs-provision-y0qc1rdd.js → agent-fs-provision-6fgz7wvz.js} +4 -4
  6. package/dist/{amp-adapter-1qqs6h91.js → amp-adapter-nthn8ezm.js} +1 -1
  7. package/dist/{app-7m4z44rv.js → app-535m78qw.js} +8 -8
  8. package/dist/{approval-notifications-8sr41gjx.js → approval-notifications-dewbk403.js} +9 -9
  9. package/dist/{assistant-hkczwfv6.js → assistant-39zyabv2.js} +25 -25
  10. package/dist/{boot-args-schema-8025snev.js → boot-args-schema-bqv5bf77.js} +1 -1
  11. package/dist/{boot-reembed-4bbpxjh1.js → boot-reembed-157c0gcz.js} +1 -1
  12. package/dist/{boot-reembed-15m87nr1.js → boot-reembed-fas7z3zn.js} +1 -1
  13. package/dist/{boot-scrub-sweep-eajr97e9.js → boot-scrub-sweep-tmec0be2.js} +2 -2
  14. package/dist/{boot-seeds-9cwy39jx.js → boot-seeds-32zm50x2.js} +4 -4
  15. package/dist/{claude-adapter-g61wa4rt.js → claude-adapter-gwq7x2nj.js} +2 -2
  16. package/dist/{claude-managed-adapter-znkk0prm.js → claude-managed-adapter-rkvw6fvq.js} +2 -2
  17. package/dist/{claude-managed-setup-f1wndkr2.js → claude-managed-setup-0vgz4d1j.js} +4 -4
  18. package/dist/{claude-sdk-session-687xzf21.js → claude-sdk-session-5wbwxy8c.js} +11964 -11769
  19. package/dist/{cli-snypfjgj.js → cli-0f7n3td3.js} +1 -1
  20. package/dist/{cli-0m77n7ej.js → cli-1f48qdnb.js} +54 -12
  21. package/dist/{cli-04103ryh.js → cli-1gevjrc1.js} +1 -1
  22. package/dist/{cli-a8ts6x1n.js → cli-2wde56gv.js} +5 -5
  23. package/dist/{cli-aebswqmz.js → cli-31vt7baf.js} +14 -14
  24. package/dist/{cli-cn6fpa1p.js → cli-4djg31jh.js} +1 -1
  25. package/dist/{cli-bjmq14k9.js → cli-5k1hvycs.js} +3 -3
  26. package/dist/{cli-mmw2sjaf.js → cli-62fjschk.js} +1 -1
  27. package/dist/{cli-t90k0phh.js → cli-69eq6gdk.js} +15 -15
  28. package/dist/{cli-dd57p1gd.js → cli-6rmryz03.js} +2 -2
  29. package/dist/{cli-byxsctca.js → cli-7m6bbtab.js} +6 -6
  30. package/dist/{cli-c8kqmzzf.js → cli-8a4qg44m.js} +1 -1
  31. package/dist/{cli-8rbkw18r.js → cli-8qvte9hn.js} +2 -2
  32. package/dist/{cli-h03j6je3.js → cli-a6rzw649.js} +2 -2
  33. package/dist/{cli-w41bvvms.js → cli-b0kqw55g.js} +1 -1
  34. package/dist/{cli-84xtgbn6.js → cli-b0m3bg0f.js} +100 -2
  35. package/dist/{cli-zaate0rd.js → cli-c9bwawf9.js} +2 -2
  36. package/dist/{cli-4mj5g29m.js → cli-cs26ed89.js} +6 -6
  37. package/dist/{cli-yeh3g1q6.js → cli-d0jb2qnt.js} +23 -23
  38. package/dist/{cli-cp0m07wb.js → cli-d528acsw.js} +1 -1
  39. package/dist/{cli-fn8aj7gb.js → cli-dnvmwsvc.js} +95 -68
  40. package/dist/{cli-w6c6dj91.js → cli-e87fg3en.js} +1 -1
  41. package/dist/{cli-h9bejmkf.js → cli-erh1rgh4.js} +49 -26
  42. package/dist/{cli-9xx36trj.js → cli-ewb028rs.js} +2 -2
  43. package/dist/{cli-hs3mqswp.js → cli-f1sdh8ca.js} +4 -4
  44. package/dist/{cli-zvpkrgsc.js → cli-fcwrd7bh.js} +3 -3
  45. package/dist/{cli-sfajkbd7.js → cli-fgm2mad9.js} +2 -2
  46. package/dist/{cli-32xndx6b.js → cli-g0b3ma7r.js} +1 -1
  47. package/dist/{cli-nk8swfpx.js → cli-gc7jkf4a.js} +3 -3
  48. package/dist/{cli-z6m6xzxt.js → cli-getrvmtx.js} +26 -5
  49. package/dist/{cli-y6qqbpwc.js → cli-j2ybkdk2.js} +1 -1
  50. package/dist/{cli-1dr5at77.js → cli-jkkcm72j.js} +10 -10
  51. package/dist/{cli-cqxwjb93.js → cli-ka13xx6b.js} +1 -1
  52. package/dist/{cli-4h90xaet.js → cli-m1wddksc.js} +1 -1
  53. package/dist/{cli-qx1dwrr5.js → cli-n14r8h4n.js} +2 -2
  54. package/dist/{cli-jhtvt7gn.js → cli-n46d87mj.js} +3 -3
  55. package/dist/{cli-13t0smbk.js → cli-nkfv398a.js} +185 -58
  56. package/dist/{cli-p7g7wd9n.js → cli-nvqq3232.js} +7 -7
  57. package/dist/{cli-0a336ze7.js → cli-r4fphq38.js} +3 -3
  58. package/dist/{cli-4tbvndmm.js → cli-r8ddn0hf.js} +1 -1
  59. package/dist/{cli-3m8vqehw.js → cli-rvhaahfv.js} +2 -2
  60. package/dist/{cli-cd9acnvd.js → cli-s08zsqva.js} +2 -2
  61. package/dist/{cli-w24f3j49.js → cli-sjk85d7v.js} +6 -5
  62. package/dist/{cli-grcc2h2g.js → cli-t9nxq30h.js} +6 -6
  63. package/dist/{cli-6r1dwegd.js → cli-tbdw3f92.js} +2 -2
  64. package/dist/{cli-0fx95c06.js → cli-tceqvv6h.js} +2 -2
  65. package/dist/{cli-tzzas8rb.js → cli-tgmate57.js} +2 -2
  66. package/dist/{cli-3zyme1wt.js → cli-wdtqkqnq.js} +3 -3
  67. package/dist/{cli-8cmjkbvj.js → cli-x7aqhxj5.js} +1 -1
  68. package/dist/{cli-7ewre3dm.js → cli-xerdrnqs.js} +2 -2
  69. package/dist/{cli-c0tyzt73.js → cli-xysy1g8x.js} +1 -1
  70. package/dist/{cli-1b5axkt1.js → cli-zm6bkx3e.js} +2 -2
  71. package/dist/{cli-1carhg8g.js → cli-zqy28rwx.js} +2 -2
  72. package/dist/cli.js +17 -16
  73. package/dist/{codex-adapter-ysfg6ty3.js → codex-adapter-x25xfbnh.js} +2 -2
  74. package/dist/{codex-session-runner-823scr6g.js → codex-session-runner-kn5xnrvp.js} +2 -2
  75. package/dist/{commands-5rbm07fz.js → commands-8n59gxmy.js} +3 -3
  76. package/dist/{controllers-connect-34jzhfft.js → controllers-connect-09gvkrhc.js} +24 -24
  77. package/dist/core-2b8bv6ny.js +42 -0
  78. package/dist/{db-6bkgbfwk.js → db-e71keqxk.js} +3 -3
  79. package/dist/{db-hcj16x7z.js → db-spg81qtr.js} +1 -1
  80. package/dist/{dispatcher-jgjqrfzv.js → dispatcher-fr4vawwb.js} +23 -23
  81. package/dist/{easter-egg-3d-w17nsny6.js → easter-egg-3d-ac9tv9a6.js} +1 -1
  82. package/dist/{embedding-space-v06fwy7b.js → embedding-space-an77f45k.js} +6 -6
  83. package/dist/{embeddings-g50dxea4.js → embeddings-jkrehejr.js} +1 -1
  84. package/dist/{execute-1n36haw1.js → execute-3mys4nta.js} +1 -1
  85. package/dist/{external-channel-43tv8pg6.js → external-channel-s6zxpts9.js} +2 -2
  86. package/dist/{fx-adapter-bvh05t4a.js → fx-adapter-4yet1c4f.js} +6 -6
  87. package/dist/{grok-adapter-my5j8mdf.js → grok-adapter-8ge6tw7m.js} +6 -6
  88. package/dist/handlers-0r9evrdj.js +41 -0
  89. package/dist/{heartbeat-sf3nk937.js → heartbeat-jjpb44e5.js} +25 -25
  90. package/dist/{hook-m1m9dm6w.js → hook-68gbs87k.js} +1 -1
  91. package/dist/{hook-dqph1e05.js → hook-y6n23zzj.js} +1 -1
  92. package/dist/{http-w0th1cz9.js → http-8c6y008s.js} +297 -97
  93. package/dist/{index-ffba0z8q.js → index-0vthtbc2.js} +20 -18
  94. package/dist/index-1v23363p.js +39 -0
  95. package/dist/index-30qw6vyw.js +44 -0
  96. package/dist/index-6bm3w6cn.js +40 -0
  97. package/dist/{index-gkpfgpg7.js → index-6h3r0vpe.js} +1 -1
  98. package/dist/{index-e8pz8qdg.js → index-7dgxveck.js} +2 -2
  99. package/dist/{index-k8ajc0g0.js → index-maddg9ys.js} +1 -1
  100. package/dist/{index-y4vd4mhn.js → index-mbpxhc4w.js} +1 -1
  101. package/dist/index-rz8ve510.js +569 -0
  102. package/dist/{index-c0e8en64.js → index-we3nd2t0.js} +1 -1
  103. package/dist/{index-pb03vans.js → index-xcw7hjt5.js} +25 -25
  104. package/dist/{index-ez823q84.js → index-ym9fgxad.js} +1 -1
  105. package/dist/{keepalive-2v06q2e8.js → keepalive-7e9r5dvp.js} +4 -4
  106. package/dist/lead-3jpc7kcr.js +79 -0
  107. package/dist/{maintenance-vx7vjhhy.js → maintenance-d3erjvcg.js} +1 -1
  108. package/dist/{oauth-refresh-sweep-g06k4bza.js → oauth-refresh-sweep-0qh70988.js} +3 -3
  109. package/dist/{object-webhooks-3dzdq4fm.js → object-webhooks-ac7v2q5p.js} +7 -7
  110. package/dist/{onboard-232pazny.js → onboard-5yphtken.js} +3 -3
  111. package/dist/{opencode-adapter-t0paqbh8.js → opencode-adapter-0xvyba4m.js} +3 -3
  112. package/dist/{otel-impl-kmpkyp4y.js → otel-impl-svqp691q.js} +1 -1
  113. package/dist/{pending-x0z3vx1x.js → pending-bn4xe5br.js} +24 -24
  114. package/dist/{pi-mono-adapter-7pmypn6d.js → pi-mono-adapter-763s8a3w.js} +6 -6
  115. package/dist/{pricing-refresh-ytjmtyd7.js → pricing-refresh-kfc215mf.js} +2 -2
  116. package/dist/{rbac-roles-fgm5mxr2.js → rbac-roles-3bznvkpt.js} +3 -3
  117. package/dist/{rbac-roles-xyaxekh3.js → rbac-roles-6r4h2ghj.js} +2 -2
  118. package/dist/{render-v2-ws972g4r.js → render-v2-f3qedbpy.js} +8 -8
  119. package/dist/{resume-m6mjzhkp.js → resume-vcag4ann.js} +11 -11
  120. package/dist/{runtime-zzpc0c8a.js → runtime-x0s55z2t.js} +1 -1
  121. package/dist/{session-access-vp35xs91.js → session-access-nwzve8q2.js} +5 -5
  122. package/dist/{session-source-backfill-p73e8zbe.js → session-source-backfill-jpqfzmgz.js} +1 -1
  123. package/dist/{setup-r4kd7rxg.js → setup-d2smwaem.js} +1 -1
  124. package/dist/thread-buffer-8fc703jc.js +42 -0
  125. package/dist/{tree-visibility-07h2tbs2.js → tree-visibility-dwzc8en0.js} +2 -2
  126. package/dist/{user-merge-jobs-96vg9rpe.js → user-merge-jobs-4ce7kma2.js} +3 -3
  127. package/dist/{virtual-modules-vgn3f2x4.js → virtual-modules-78a6yw71.js} +1 -1
  128. package/dist/{work-objects-74hbcx3e.js → work-objects-m0w1e7q8.js} +26 -26
  129. package/dist/worker-3p2vq107.js +79 -0
  130. package/dist/{worker-follow-up-ezavwn5d.js → worker-follow-up-e3t6f895.js} +23 -23
  131. package/openapi.json +3 -2
  132. package/package.json +6 -5
  133. package/src/be/migrations/341_user_token_expiry.sql +4 -0
  134. package/src/be/scripts/run-credential.ts +55 -1
  135. package/src/be/scripts/typecheck.ts +4 -4
  136. package/src/be/scripts/user-code-mode.ts +160 -0
  137. package/src/be/users.ts +48 -7
  138. package/src/commands/onboard/agent-fs-version.ts +1 -1
  139. package/src/http/script-connection-proxy.ts +18 -6
  140. package/src/http/scripts.ts +2 -11
  141. package/src/http/users.ts +1 -0
  142. package/src/integrations/chat-sdk/adapters.ts +29 -0
  143. package/src/integrations/chat-sdk/limits.ts +3 -0
  144. package/src/integrations/chat-sdk/rocketchat/README.md +8 -0
  145. package/src/integrations/chat-sdk/rocketchat/index.ts +790 -0
  146. package/src/integrations/chat-sdk/rocketchat/markdown.ts +210 -0
  147. package/src/integrations/chat-sdk/rocketchat/types.ts +249 -0
  148. package/src/integrations/chat-sdk/runtime.ts +11 -5
  149. package/src/integrations/chat-sdk/schema.ts +37 -3
  150. package/src/integrations/chat-sdk/status.ts +9 -0
  151. package/src/providers/amp-adapter.ts +1 -1
  152. package/src/rbac/legacy-policy.ts +1 -0
  153. package/src/rbac/permissions.ts +4 -0
  154. package/src/scripts-runtime/executors/native.ts +225 -67
  155. package/src/scripts-runtime/mcp-client.ts +2 -1
  156. package/src/scripts-runtime/swarm-sdk.ts +2 -1
  157. package/src/scripts-runtime/types/stdlib.d.ts +4 -4
  158. package/src/scripts-runtime/types/swarm-sdk.d.ts +4 -4
  159. package/src/server-user.ts +98 -0
  160. package/src/tests/chat-sdk-rocketchat-vendored.test.ts +67 -0
  161. package/src/tests/chat-sdk-status-route.test.ts +13 -1
  162. package/src/tests/codex-app-server.test.ts +4 -6
  163. package/src/tests/mcp-user-route.test.ts +10 -1
  164. package/src/tests/script-connections-mcp.test.ts +14 -10
  165. package/src/tests/script-connections-sql.test.ts +6 -2
  166. package/src/tests/script-connections.test.ts +2 -0
  167. package/src/tools/script-common.ts +37 -22
  168. package/src/tools/script-query-types.ts +1 -1
  169. package/src/tools/script-run.ts +1 -1
  170. package/src/tools/script-search.ts +12 -10
  171. package/src/tools/utils.ts +7 -1
  172. package/templates/skills/chat-sdk/content.md +2 -2
  173. package/templates/skills/swarm-docs/content.md +2 -0
  174. package/dist/core-kdehq26g.js +0 -42
  175. package/dist/handlers-wyymeeqh.js +0 -41
  176. package/dist/index-22khdtby.js +0 -44
  177. package/dist/index-np0582ac.js +0 -40
  178. package/dist/index-vgkrj1jt.js +0 -39
  179. package/dist/lead-55z813ng.js +0 -79
  180. package/dist/thread-buffer-cm2nzq6t.js +0 -42
  181. package/dist/worker-5pn2vzx6.js +0 -79
  182. package/dist/{cli-5v6b2am8.js → cli-bp2rt28p.js} +4 -4
  183. /package/dist/{cli-m4ejz4nj.js → cli-cah298e5.js} +0 -0
@@ -557,7 +557,7 @@ import {
557
557
  countScriptRunJournalSteps2,
558
558
  countScriptRunJournalAgentTaskSteps2,
559
559
  init_db4
560
- } from "./cli-h9bejmkf.js";
560
+ } from "./cli-erh1rgh4.js";
561
561
  import {
562
562
  PRIMARY_ROLE_NAMES2,
563
563
  OperatorGrantedTargetError2,
@@ -571,7 +571,7 @@ import {
571
571
  assertNotLastAdmin2,
572
572
  setUserRoles2,
573
573
  init_rbac_roles
574
- } from "./cli-qx1dwrr5.js";
574
+ } from "./cli-n14r8h4n.js";
575
575
  import {
576
576
  MAX_MODEL_GROUP_MEMBERS,
577
577
  listModelGroups,
@@ -581,19 +581,19 @@ import {
581
581
  modelGroupReferences,
582
582
  deleteModelGroup,
583
583
  init_model_groups
584
- } from "./cli-8rbkw18r.js";
584
+ } from "./cli-8qvte9hn.js";
585
585
  import {
586
586
  requestModelCatalogRefresh2,
587
587
  init_pricing_refresh
588
- } from "./cli-4h90xaet.js";
588
+ } from "./cli-m1wddksc.js";
589
589
  import {
590
590
  workflowEventBus2,
591
591
  init_event_bus
592
592
  } from "./cli-vx9acp12.js";
593
- import"./cli-cqxwjb93.js";
594
- import"./cli-w6c6dj91.js";
593
+ import"./cli-ka13xx6b.js";
594
+ import"./cli-e87fg3en.js";
595
595
  import"./cli-vr4eyq6p.js";
596
- import"./cli-4tbvndmm.js";
596
+ import"./cli-r8ddn0hf.js";
597
597
  import {
598
598
  require_dist4,
599
599
  getSlackConnectionState,
@@ -631,7 +631,7 @@ import {
631
631
  startSlackApp2,
632
632
  stopSlackApp2,
633
633
  init_app4
634
- } from "./cli-t90k0phh.js";
634
+ } from "./cli-69eq6gdk.js";
635
635
  import {
636
636
  AGENT_MAX_TASKS_CONFIG_KEY,
637
637
  reconcileAgentMaxTasksPolicy,
@@ -660,12 +660,12 @@ import {
660
660
  dispatchApprovalNotifications2,
661
661
  createApprovalFollowUpTask2,
662
662
  init_approval_notifications
663
- } from "./cli-hs3mqswp.js";
663
+ } from "./cli-f1sdh8ca.js";
664
664
  import {
665
665
  retryFailedRun2,
666
666
  cancelWorkflowRun2,
667
667
  init_resume
668
- } from "./cli-zvpkrgsc.js";
668
+ } from "./cli-fcwrd7bh.js";
669
669
  import {
670
670
  safeParse,
671
671
  getObjectShape,
@@ -1030,6 +1030,10 @@ import {
1030
1030
  init_automatic_task_gate,
1031
1031
  guardTerminalTaskResultWrite,
1032
1032
  init_terminal_result_guard,
1033
+ scriptNameSchema,
1034
+ scriptToolOutputSchema,
1035
+ scriptsApiToolResult,
1036
+ init_script_common,
1033
1037
  getTasksInputSchema,
1034
1038
  getTasksOutputSchema,
1035
1039
  getTasksHandler,
@@ -1106,6 +1110,13 @@ import {
1106
1110
  validateRecurringTiming,
1107
1111
  changesScheduleTarget,
1108
1112
  init_validate,
1113
+ renderTypeBlobs,
1114
+ init_script_query_types,
1115
+ renderRunOutput,
1116
+ init_script_run,
1117
+ renderSearchResults,
1118
+ searchSuccessMessage,
1119
+ init_script_search,
1109
1120
  followUpThreadForSourceTask,
1110
1121
  evaluateFollowUpRedelegation,
1111
1122
  init_follow_up_redelegation_guard,
@@ -1157,7 +1168,7 @@ import {
1157
1168
  getEnabledCapabilities,
1158
1169
  createServer,
1159
1170
  init_server
1160
- } from "./cli-fn8aj7gb.js";
1171
+ } from "./cli-dnvmwsvc.js";
1161
1172
  import {
1162
1173
  getFileStorageProvider2,
1163
1174
  init_registry2
@@ -1183,7 +1194,7 @@ import {
1183
1194
  resolvePoolDelivery2,
1184
1195
  createPoolAgent2,
1185
1196
  init_db2
1186
- } from "./cli-0fx95c06.js";
1197
+ } from "./cli-tceqvv6h.js";
1187
1198
  import {
1188
1199
  duplicateGuardedQueryKey,
1189
1200
  warnIfCorsAllowsAnyOrigin,
@@ -1234,7 +1245,7 @@ import {
1234
1245
  describeRequestRoute,
1235
1246
  route,
1236
1247
  init_route_def
1237
- } from "./cli-a8ts6x1n.js";
1248
+ } from "./cli-2wde56gv.js";
1238
1249
  import {
1239
1250
  startPoolRouting,
1240
1251
  stopPoolRouting,
@@ -1247,13 +1258,13 @@ import {
1247
1258
  checkHeartbeatChecklist2,
1248
1259
  runHeartbeatSweep2,
1249
1260
  stopHeartbeat2
1250
- } from "./cli-aebswqmz.js";
1261
+ } from "./cli-31vt7baf.js";
1251
1262
  import"./cli-50whymxq.js";
1252
1263
  import {
1253
1264
  runtimeSupervisorStatus,
1254
1265
  startRuntimeSupervisor,
1255
1266
  stopRuntimeSupervisor
1256
- } from "./cli-byxsctca.js";
1267
+ } from "./cli-7m6bbtab.js";
1257
1268
  import {
1258
1269
  TASK_TITLE_TIMEOUT_MS,
1259
1270
  generateTaskTitle
@@ -1279,7 +1290,7 @@ import {
1279
1290
  isUnknownModelError,
1280
1291
  checkProviderPoolKey,
1281
1292
  writeSkillsToFilesystem
1282
- } from "./cli-tzzas8rb.js";
1293
+ } from "./cli-tgmate57.js";
1283
1294
  import {
1284
1295
  AgentFsRequestError2,
1285
1296
  resolveAgentFsSharedContext2,
@@ -1290,16 +1301,16 @@ import {
1290
1301
  agentFsRequest2,
1291
1302
  resolveApiUrl2,
1292
1303
  init_agent_fs_provision
1293
- } from "./cli-h03j6je3.js";
1304
+ } from "./cli-a6rzw649.js";
1294
1305
  import {
1295
1306
  Anthropic
1296
- } from "./cli-m4ejz4nj.js";
1307
+ } from "./cli-cah298e5.js";
1297
1308
  import {
1298
1309
  objectWebhookSecret2,
1299
1310
  handleObjectWebhookEvent2,
1300
1311
  init_object_webhooks
1301
- } from "./cli-0a336ze7.js";
1302
- import"./cli-1carhg8g.js";
1312
+ } from "./cli-r4fphq38.js";
1313
+ import"./cli-zqy28rwx.js";
1303
1314
  import {
1304
1315
  createUserMergeJob2,
1305
1316
  getUserMergeJob2,
@@ -1308,7 +1319,7 @@ import {
1308
1319
  findFailedUserMergeJob2,
1309
1320
  requeueUserMergeJob2,
1310
1321
  runUserMergeJobs2
1311
- } from "./cli-6r1dwegd.js";
1322
+ } from "./cli-tbdw3f92.js";
1312
1323
  import {
1313
1324
  isCodexOAuthConfigKey
1314
1325
  } from "./cli-j4bwnpkm.js";
@@ -1319,7 +1330,7 @@ import {
1319
1330
  import {
1320
1331
  runTaskUiAction,
1321
1332
  init_actions
1322
- } from "./cli-jhtvt7gn.js";
1333
+ } from "./cli-n46d87mj.js";
1323
1334
  import {
1324
1335
  RATING_MODEL_MAX_LENGTH,
1325
1336
  REFERENCES_SOURCE_MAX_LENGTH,
@@ -1390,6 +1401,7 @@ import {
1390
1401
  checkImportAllowlist,
1391
1402
  init_import_allowlist,
1392
1403
  runScriptWithRunCredential,
1404
+ runScriptAsUserWithRunCredential,
1393
1405
  init_run_credential,
1394
1406
  extractScriptSignature,
1395
1407
  init_extract_signature,
@@ -1414,7 +1426,7 @@ import {
1414
1426
  init_typecheck,
1415
1427
  parseSkillContent,
1416
1428
  init_skill_parser
1417
- } from "./cli-13t0smbk.js";
1429
+ } from "./cli-nkfv398a.js";
1418
1430
  import {
1419
1431
  signalProcessGroup,
1420
1432
  detachedProcessGroup,
@@ -1431,17 +1443,17 @@ import {
1431
1443
  forceRefreshAuthorizationOrThrow,
1432
1444
  forceRefreshTokenOrThrow,
1433
1445
  init_ensure_token
1434
- } from "./cli-7ewre3dm.js";
1446
+ } from "./cli-xerdrnqs.js";
1435
1447
  import {
1436
1448
  PRIMITIVE_KINDS,
1437
1449
  ObjectsError,
1438
1450
  recordObjectVersion,
1439
1451
  init_objects
1440
- } from "./cli-3zyme1wt.js";
1452
+ } from "./cli-wdtqkqnq.js";
1441
1453
  import {
1442
1454
  agentFsClientFor,
1443
1455
  init_agent_fs_identity
1444
- } from "./cli-y6qqbpwc.js";
1456
+ } from "./cli-j2ybkdk2.js";
1445
1457
  import {
1446
1458
  FilesError,
1447
1459
  normalizeFilesError,
@@ -1450,7 +1462,7 @@ import {
1450
1462
  AgentFsProvider,
1451
1463
  init_agent_fs_provider
1452
1464
  } from "./cli-skd2c4ej.js";
1453
- import"./cli-cn6fpa1p.js";
1465
+ import"./cli-4djg31jh.js";
1454
1466
  import {
1455
1467
  automationIntegrationFixUrl,
1456
1468
  preflightAutomation,
@@ -1472,7 +1484,7 @@ import {
1472
1484
  definitionNodeIds,
1473
1485
  validateDefinition,
1474
1486
  init_definition2
1475
- } from "./cli-1dr5at77.js";
1487
+ } from "./cli-jkkcm72j.js";
1476
1488
  import {
1477
1489
  _fetchHolder,
1478
1490
  CLIENT_ID,
@@ -1504,7 +1516,7 @@ import {
1504
1516
  import {
1505
1517
  require_content_type
1506
1518
  } from "./cli-1jx0srjt.js";
1507
- import"./cli-84xtgbn6.js";
1519
+ import"./cli-b0m3bg0f.js";
1508
1520
  import {
1509
1521
  hasSessionAccess,
1510
1522
  getSessionRoot,
@@ -1514,7 +1526,7 @@ import {
1514
1526
  toSessionSharesState,
1515
1527
  setSessionShares,
1516
1528
  init_session_shares
1517
- } from "./cli-w41bvvms.js";
1529
+ } from "./cli-b0kqw55g.js";
1518
1530
  import {
1519
1531
  isInvalidClientError,
1520
1532
  publicEndpointSsrfOptions,
@@ -1532,7 +1544,7 @@ import {
1532
1544
  revokeMcpToken,
1533
1545
  computeExpiresAt,
1534
1546
  init_mcp_wrapper
1535
- } from "./cli-c0tyzt73.js";
1547
+ } from "./cli-xysy1g8x.js";
1536
1548
  import"./cli-v41kn3cd.js";
1537
1549
  import {
1538
1550
  setBedrockProviderModule,
@@ -1572,7 +1584,7 @@ import {
1572
1584
  revokeAllAgentSessionTokens,
1573
1585
  fingerprintApiKey,
1574
1586
  init_users
1575
- } from "./cli-z6m6xzxt.js";
1587
+ } from "./cli-getrvmtx.js";
1576
1588
  import {
1577
1589
  CORE_TOOLS,
1578
1590
  init_tool_config
@@ -1629,10 +1641,6 @@ import {
1629
1641
  selectCredential,
1630
1642
  init_credentials2
1631
1643
  } from "./cli-5basv0e7.js";
1632
- import {
1633
- getOpenRouterAttributionHeaders,
1634
- init_openrouter_base_url
1635
- } from "./cli-dfyv0jdy.js";
1636
1644
  import {
1637
1645
  interpolate,
1638
1646
  init_template2,
@@ -1643,6 +1651,10 @@ import {
1643
1651
  init_resolver,
1644
1652
  init_session_templates
1645
1653
  } from "./cli-mwxez0pz.js";
1654
+ import {
1655
+ getOpenRouterAttributionHeaders,
1656
+ init_openrouter_base_url
1657
+ } from "./cli-dfyv0jdy.js";
1646
1658
  import {
1647
1659
  ASSET_KEY_MAX_LENGTH,
1648
1660
  AssetKeyError,
@@ -1870,7 +1882,7 @@ import {
1870
1882
  import {
1871
1883
  init_package,
1872
1884
  package_default
1873
- } from "./cli-w24f3j49.js";
1885
+ } from "./cli-sjk85d7v.js";
1874
1886
  import {
1875
1887
  realtimeBus,
1876
1888
  init_bus
@@ -12367,6 +12379,7 @@ var DEFAULT_MODES = {
12367
12379
  telegram: "webhook",
12368
12380
  slack: "webhook"
12369
12381
  };
12382
+ var ROCKETCHAT_NO_INSTANCE_URL = 'No instance URL. Set CHAT_SDK_API_URL_OVERRIDES to {"rocketchat":"https://chat.example.com"} in the deployment environment and restart the API.';
12370
12383
  var NOT_RUNNING = "The adapter is starting, or the last configuration save is still applying. Refresh in a few seconds.";
12371
12384
  var SLACK_CLASH_CAUSE = "the Slack adapter conflicts with the built-in Slack integration (set SLACK_DISABLE=true)";
12372
12385
  var MAX_STATUS_ERROR_CHARS = 300;
@@ -12438,6 +12451,9 @@ async function getChatSdkStatus() {
12438
12451
  } else if (config.enabled && configured) {
12439
12452
  error = blockedCause ? `Not started: ${blockedCause}` : NOT_RUNNING;
12440
12453
  }
12454
+ if (name === "rocketchat" && configured && enabled && resolveAdapterApiUrl(name) === "") {
12455
+ error = ROCKETCHAT_NO_INSTANCE_URL;
12456
+ }
12441
12457
  return {
12442
12458
  name,
12443
12459
  configured,
@@ -24791,11 +24807,148 @@ function registerUserEvents(server, user, tokenId, authorize) {
24791
24807
  // src/server-user.ts
24792
24808
  init_rbac_audit();
24793
24809
  init_rbac_roles();
24810
+
24811
+ // src/be/scripts/user-code-mode.ts
24812
+ init_registry();
24813
+ init_secret_scrubber();
24814
+ init_db4();
24815
+ init_db3();
24816
+ init_embeddings();
24817
+ init_run_credential();
24818
+
24819
+ // src/be/scripts/source-secrets.ts
24820
+ init_secret_scrubber();
24821
+ function refuseSourceWithSecrets(source) {
24822
+ const { knownValues, gitleaksRules } = findSecretsIn(source);
24823
+ if (knownValues.length === 0 && gitleaksRules.length === 0)
24824
+ return null;
24825
+ const findings = [
24826
+ ...knownValues.map((id) => ({ kind: "registered-secret", id })),
24827
+ ...gitleaksRules.map((id) => ({ kind: "gitleaks-rule", id }))
24828
+ ];
24829
+ const named = findings.map((f) => f.kind === "registered-secret" ? `registered secret ${f.id}` : `gitleaks rule ${f.id}`).join(", ");
24830
+ return {
24831
+ error: "source_contains_secret",
24832
+ message: `Script source contains a secret (${named}); nothing was saved or run. Source is stored and shown verbatim, so read secrets at run time instead: a credential binding (ctx.api.<slug> / ctx.mcp.<slug>) or ctx.swarm.config.get("<KEY>").`,
24833
+ findings
24834
+ };
24835
+ }
24836
+
24837
+ // src/be/scripts/user-code-mode.ts
24838
+ init_typecheck();
24839
+ var USER_SCRIPT_RUN_AGENT_ID = "user-mcp";
24840
+ function toScriptSearchResults(matches) {
24841
+ return matches.map(({ script, score }) => ({
24842
+ name: script.name,
24843
+ signature: JSON.parse(script.signatureJson),
24844
+ argsJsonSchema: script.argsJsonSchema ? JSON.parse(script.argsJsonSchema) : null,
24845
+ description: script.description,
24846
+ score
24847
+ }));
24848
+ }
24849
+ async function searchScriptsForUser(args) {
24850
+ const matches = await searchScripts2({ query: args.query, scope: "global", limit: args.limit });
24851
+ return { status: 200, body: { results: toScriptSearchResults(matches) } };
24852
+ }
24853
+ var EMPTY_API_TYPES = `export interface ScriptApiRegistry {}
24854
+ `;
24855
+ var EMPTY_MCP_TYPES = `export interface ScriptMcpRegistry {}
24856
+ `;
24857
+ async function scriptTypesForUser(name) {
24858
+ let script = null;
24859
+ if (name) {
24860
+ script = await getScript({ name, scope: "global" });
24861
+ if (!script)
24862
+ return { status: 404, body: { error: "Script not found" } };
24863
+ }
24864
+ const stdlibTypes = await scriptStdlibTypesWithGeneratedApis(EMPTY_API_TYPES, EMPTY_MCP_TYPES, "");
24865
+ if (!script)
24866
+ return { status: 200, body: { stdlibTypes } };
24867
+ return {
24868
+ status: 200,
24869
+ body: {
24870
+ signature: JSON.parse(script.signatureJson),
24871
+ argsJsonSchema: script.argsJsonSchema ? JSON.parse(script.argsJsonSchema) : null,
24872
+ stdlibTypes
24873
+ }
24874
+ };
24875
+ }
24876
+ async function runScriptForUser(args) {
24877
+ if (!args.name === !args.source) {
24878
+ return { status: 400, body: { error: "Pass exactly one of name or source" } };
24879
+ }
24880
+ let source = args.source;
24881
+ let fsMode = "none";
24882
+ let executor = null;
24883
+ if (args.name) {
24884
+ const script = await getScript({ name: args.name, scope: "global" });
24885
+ if (!script)
24886
+ return { status: 404, body: { error: "Script not found" } };
24887
+ ({ source, fsMode, executor } = script);
24888
+ } else {
24889
+ const refusal = refuseSourceWithSecrets(source);
24890
+ if (refusal)
24891
+ return { status: 400, body: refusal };
24892
+ }
24893
+ if (fsMode === "workspace-rw") {
24894
+ return { status: 501, body: { error: "workspace-rw scripts are not supported in v1" } };
24895
+ }
24896
+ if (executor && !isExecutorAllowedByDeployment(executor)) {
24897
+ return {
24898
+ status: 400,
24899
+ body: {
24900
+ error: 'Executor "native" is not permitted when deployment SCRIPT_EXECUTOR="quickjs"'
24901
+ }
24902
+ };
24903
+ }
24904
+ const startedAt = new Date().toISOString();
24905
+ const output = await runScriptAsUserWithRunCredential({ source, args: args.args, fsMode, executor }, args.userId);
24906
+ const ok = output.exitCode === 0 && !output.error && !output.runtimeError;
24907
+ try {
24908
+ await recordInlineScriptRun2({
24909
+ id: crypto.randomUUID(),
24910
+ agentId: USER_SCRIPT_RUN_AGENT_ID,
24911
+ requestedByUserId: args.userId,
24912
+ createdBy: args.userId,
24913
+ source,
24914
+ args: scrubObject(args.args ?? null),
24915
+ scriptName: args.name ?? "(inline source)",
24916
+ status: ok ? "completed" : "failed",
24917
+ output: scrubObject(output.result),
24918
+ error: ok ? undefined : scrubSecrets([
24919
+ output.error,
24920
+ output.stderr || undefined,
24921
+ output.runtimeError ? `${output.runtimeError.name}: ${output.runtimeError.message}` : undefined
24922
+ ].filter(Boolean).join(" — ") || `Script exited with code ${output.exitCode}`),
24923
+ startedAt,
24924
+ finishedAt: new Date().toISOString()
24925
+ });
24926
+ } catch {}
24927
+ return {
24928
+ status: 200,
24929
+ body: scrubObject({
24930
+ result: output.result,
24931
+ truncated: output.truncated,
24932
+ durationMs: output.durationMs,
24933
+ stdout: output.stdout,
24934
+ stderr: output.stderr,
24935
+ exitCode: output.exitCode,
24936
+ error: output.error,
24937
+ runtimeError: output.runtimeError
24938
+ })
24939
+ };
24940
+ }
24941
+
24942
+ // src/server-user.ts
24794
24943
  init_mcp_limits();
24795
24944
  init_rbac();
24796
24945
  init_cancel_task();
24797
24946
  init_get_task_details();
24798
24947
  init_get_tasks();
24948
+ init_script_common();
24949
+ init_script_query_types();
24950
+ init_script_run();
24951
+ init_script_search();
24799
24952
  init_send_task();
24800
24953
  init_steer_task();
24801
24954
  init_task_tool_ctx();
@@ -24811,6 +24964,11 @@ var userSendTaskInputSchema = object2({
24811
24964
  modelTier: ModelTierSchema.optional().describe("Portable model tier: 'smol', 'regular', 'smart', or 'ultra'. Resolved by the assignee's harness/provider."),
24812
24965
  outputSchema: record2(string2(), unknown()).optional().describe("Optional JSON Schema the assignee's final output must satisfy. store-progress rejects a completion that does not match. Supported keywords: type, required, properties, enum, const, items. An empty object {} means no schema.")
24813
24966
  }).superRefine((data, ctx) => checkOutputSchemaShape(data.outputSchema, ctx));
24967
+ var USER_CODE_MODE_SCOPE = "Runs as you: the script's swarm calls carry your permissions, no agent's credentials or connections, and no task is created. Only global scripts are visible.";
24968
+ function codeModeResult(response, rendering) {
24969
+ const ok = response.status >= 200 && response.status < 300;
24970
+ return scriptsApiToolResult(response.body, { ok, status: response.status }, rendering);
24971
+ }
24814
24972
  function permission(verb) {
24815
24973
  return { permission: verb };
24816
24974
  }
@@ -24915,6 +25073,68 @@ function createUserServer(user, tokenId) {
24915
25073
  return denied;
24916
25074
  return cancelTaskHandler(userCtx(user, info.sessionId), args);
24917
25075
  });
25076
+ const scriptSearchConfig = {
25077
+ title: "Script Search",
25078
+ description: `Search the swarm's reusable TypeScript scripts by intent. ${USER_CODE_MODE_SCOPE}`,
25079
+ annotations: { readOnlyHint: true, openWorldHint: false },
25080
+ rbac: permission("script.search"),
25081
+ inputSchema: object2({
25082
+ query: string2().default("").describe("What the script should do."),
25083
+ limit: number2().int().min(1).max(100).default(10).describe("Maximum results.")
25084
+ }),
25085
+ outputSchema: scriptToolOutputSchema
25086
+ };
25087
+ registerTool("script-search", scriptSearchConfig, async (args) => {
25088
+ const denied = await maybeDenyUserToolAdmission(user, "script-search", scriptSearchConfig);
25089
+ if (denied)
25090
+ return denied;
25091
+ return codeModeResult(await searchScriptsForUser(args), {
25092
+ successMessage: searchSuccessMessage,
25093
+ successDetails: renderSearchResults
25094
+ });
25095
+ });
25096
+ const scriptGetTypesConfig = {
25097
+ title: "Script Get Types",
25098
+ description: `Get the TypeScript declarations a script is written against: the \`swarm-sdk\` module (\`ScriptContext\`, \`ctx.swarm\`) and the \`stdlib\` module, about 12k tokens. Pass \`name\` to also get that script's signature and args schema. ${USER_CODE_MODE_SCOPE}`,
25099
+ annotations: { readOnlyHint: true, openWorldHint: false },
25100
+ inputSchema: object2({
25101
+ name: scriptNameSchema.optional().describe("Optional global script name.")
25102
+ }),
25103
+ outputSchema: scriptToolOutputSchema
25104
+ };
25105
+ registerTool("script-get-types", scriptGetTypesConfig, async ({ name }) => {
25106
+ const denied = await maybeDenyUserToolAdmission(user, "script-get-types", scriptGetTypesConfig);
25107
+ if (denied)
25108
+ return denied;
25109
+ const response = await scriptTypesForUser(name);
25110
+ const { stdlibTypes: _types, ...small } = response.body;
25111
+ return codeModeResult({ status: response.status, body: small }, {
25112
+ successMessage: () => name ? `Type definitions for script \`${name}\` fetched.` : "Script type definitions fetched.",
25113
+ successDetails: () => renderTypeBlobs(response.body),
25114
+ uncappedDetails: true
25115
+ });
25116
+ });
25117
+ const scriptRunConfig = {
25118
+ title: "Script Run",
25119
+ description: `Run a global script by \`name\`, or inline TypeScript \`source\` that does \`export default async function (args, ctx)\`. Inline source is not typechecked or saved. ${USER_CODE_MODE_SCOPE}`,
25120
+ annotations: { openWorldHint: true },
25121
+ rbac: permission("script.run"),
25122
+ inputSchema: object2({
25123
+ name: scriptNameSchema.optional().describe("Global script to run."),
25124
+ source: string2().min(1).optional().describe("Inline TypeScript source to run."),
25125
+ args: unknown().optional().describe("JSON-serializable script arguments.")
25126
+ }),
25127
+ outputSchema: scriptToolOutputSchema
25128
+ };
25129
+ registerTool("script-run", scriptRunConfig, async (args) => {
25130
+ const denied = await maybeDenyUserToolAdmission(user, "script-run", scriptRunConfig);
25131
+ if (denied)
25132
+ return denied;
25133
+ return codeModeResult(await runScriptForUser({ userId: user.id, ...args }), {
25134
+ successMessage: () => "Script run completed.",
25135
+ successDetails: renderRunOutput
25136
+ });
25137
+ });
24918
25138
  if (isSteeringEnabled2()) {
24919
25139
  const steerTaskConfig = {
24920
25140
  title: "Steer Task",
@@ -41389,13 +41609,19 @@ var sqlQueryRoute = route({
41389
41609
  404: { description: "Script connection or agent not found" }
41390
41610
  }
41391
41611
  });
41392
- function connectionScopeMatches(connection, agentId, syntheticPrincipal) {
41612
+ function connectionScopeMatches(connection, agentId, syntheticPrincipal, principal) {
41393
41613
  if (connection.scope === "global")
41394
41614
  return true;
41395
41615
  if (connection.scope === "agent")
41396
41616
  return !syntheticPrincipal && connection.scopeId === agentId;
41397
- if (connection.scope === "repo")
41398
- return true;
41617
+ if (connection.scope === "repo") {
41618
+ return !syntheticPrincipal && can({
41619
+ principal,
41620
+ verb: "config.read.secrets",
41621
+ resource: { kind: "none" },
41622
+ source: "http"
41623
+ }).allow;
41624
+ }
41399
41625
  return false;
41400
41626
  }
41401
41627
  function isSyntheticScriptPrincipal(agentId) {
@@ -41418,8 +41644,9 @@ async function handleScriptConnectionProxy(req, res, pathSegments, queryParams,
41418
41644
  jsonError(res, "Agent not found", 404);
41419
41645
  return true;
41420
41646
  }
41647
+ const principal = { kind: "agent", agentId, isLead: agent?.isLead ?? false };
41421
41648
  const decision = can({
41422
- principal: { kind: "agent", agentId, isLead: agent?.isLead ?? false },
41649
+ principal,
41423
41650
  verb: "script-connection.invoke",
41424
41651
  resource: { kind: "none" },
41425
41652
  source: "http"
@@ -41441,7 +41668,7 @@ async function handleScriptConnectionProxy(req, res, pathSegments, queryParams,
41441
41668
  jsonError(res, `Script connection is not ${isSql ? "a SQL" : "an MCP"} connection`, 400);
41442
41669
  return true;
41443
41670
  }
41444
- if (!connectionScopeMatches(connection, agentId, syntheticPrincipal)) {
41671
+ if (!connectionScopeMatches(connection, agentId, syntheticPrincipal, principal)) {
41445
41672
  jsonError(res, "Script connection is not available to this agent", 403);
41446
41673
  return true;
41447
41674
  }
@@ -43375,26 +43602,6 @@ async function handleScriptConnections(req, res, pathSegments, queryParams, agen
43375
43602
  init_zod();
43376
43603
  init_db4();
43377
43604
  init_model_validation2();
43378
-
43379
- // src/be/scripts/source-secrets.ts
43380
- init_secret_scrubber();
43381
- function refuseSourceWithSecrets(source) {
43382
- const { knownValues, gitleaksRules } = findSecretsIn(source);
43383
- if (knownValues.length === 0 && gitleaksRules.length === 0)
43384
- return null;
43385
- const findings = [
43386
- ...knownValues.map((id) => ({ kind: "registered-secret", id })),
43387
- ...gitleaksRules.map((id) => ({ kind: "gitleaks-rule", id }))
43388
- ];
43389
- const named = findings.map((f) => f.kind === "registered-secret" ? `registered secret ${f.id}` : `gitleaks rule ${f.id}`).join(", ");
43390
- return {
43391
- error: "source_contains_secret",
43392
- message: `Script source contains a secret (${named}); nothing was saved or run. Source is stored and shown verbatim, so read secrets at run time instead: a credential binding (ctx.api.<slug> / ctx.mcp.<slug>) or ctx.swarm.config.get("<KEY>").`,
43393
- findings
43394
- };
43395
- }
43396
-
43397
- // src/http/script-runs.ts
43398
43605
  init_rbac();
43399
43606
 
43400
43607
  // src/script-workflows/label-lint.ts
@@ -44167,9 +44374,9 @@ init_request_auth_context();
44167
44374
  init_secret_scrubber();
44168
44375
  init_route_def();
44169
44376
  init_utils2();
44170
- var scriptNameSchema = string2().min(1).max(200);
44377
+ var scriptNameSchema2 = string2().min(1).max(200);
44171
44378
  var upsertBodySchema = object2({
44172
- name: scriptNameSchema,
44379
+ name: scriptNameSchema2,
44173
44380
  source: string2().min(1),
44174
44381
  description: string2().default(""),
44175
44382
  intent: string2().default(""),
@@ -44178,7 +44385,7 @@ var upsertBodySchema = object2({
44178
44385
  executor: ScriptExecutorNameSchema.nullable().optional()
44179
44386
  });
44180
44387
  var runBodySchema = object2({
44181
- name: scriptNameSchema.optional(),
44388
+ name: scriptNameSchema2.optional(),
44182
44389
  source: string2().min(1).optional(),
44183
44390
  args: unknown().optional(),
44184
44391
  intent: string2().default(""),
@@ -44194,7 +44401,7 @@ var searchBodySchema = object2({
44194
44401
  scope: ScriptScopeSchema.optional(),
44195
44402
  limit: number2().int().min(1).max(100).default(10)
44196
44403
  });
44197
- var nameParamsSchema = object2({ name: scriptNameSchema });
44404
+ var nameParamsSchema = object2({ name: scriptNameSchema2 });
44198
44405
  var scopeQuerySchema = object2({ scope: ScriptScopeSchema.default("agent") });
44199
44406
  var optionalScopeQuerySchema = object2({ scope: ScriptScopeSchema.optional() });
44200
44407
  var idParamsSchema4 = object2({ id: string2().uuid() });
@@ -44838,15 +45045,7 @@ async function handleScripts(req, res, pathSegments, queryParams, agentId) {
44838
45045
  scopeId: agent.id,
44839
45046
  limit: parsed.body.limit
44840
45047
  });
44841
- searchRoute.respond(res, 200, {
44842
- results: matches.map(({ script, score }) => ({
44843
- name: script.name,
44844
- signature: JSON.parse(script.signatureJson),
44845
- argsJsonSchema: script.argsJsonSchema ? JSON.parse(script.argsJsonSchema) : null,
44846
- description: script.description,
44847
- score
44848
- }))
44849
- });
45048
+ searchRoute.respond(res, 200, { results: toScriptSearchResults(matches) });
44850
45049
  return true;
44851
45050
  }
44852
45051
  if (listScriptsRoute.match(req.method, pathSegments)) {
@@ -50082,7 +50281,8 @@ var UNMAPPED_KINDS = [
50082
50281
  "kapso",
50083
50282
  "telegram",
50084
50283
  "discord",
50085
- "teams"
50284
+ "teams",
50285
+ "rocketchat"
50086
50286
  ];
50087
50287
  async function collectUnmappedForKind(kind, limit) {
50088
50288
  const namespace = `integration:unmapped:${kind}`;
@@ -53524,7 +53724,7 @@ var httpServer = createHttpServer(async (req, res) => {
53524
53724
  });
53525
53725
  });
53526
53726
  var detachRealtime = attachRealtimeTransport(httpServer);
53527
- var { attachControllerTransport } = await import("./controllers-connect-34jzhfft.js");
53727
+ var { attachControllerTransport } = await import("./controllers-connect-09gvkrhc.js");
53528
53728
  var detachControllers = attachControllerTransport(httpServer);
53529
53729
  var stopWorkerNudges = startWorkerNudgeListener();
53530
53730
  var taskAutoTitles = startTaskAutoTitleListener();
@@ -53555,7 +53755,7 @@ async function shutdown() {
53555
53755
  sessionsProcessed: getServerSessionsProcessed()
53556
53756
  });
53557
53757
  if (hasCapability("scheduling")) {
53558
- const { stopScheduler } = await import("./index-np0582ac.js");
53758
+ const { stopScheduler } = await import("./index-6bm3w6cn.js");
53559
53759
  stopScheduler();
53560
53760
  }
53561
53761
  stopHeartbeat2();
@@ -53567,7 +53767,7 @@ async function shutdown() {
53567
53767
  await stopSlackApp2();
53568
53768
  await stopChatSdk();
53569
53769
  if (!isEnvFlagEnabled("OAUTH_KEEPALIVE_DISABLE", false)) {
53570
- const { stopOAuthKeepalive } = await import("./keepalive-2v06q2e8.js");
53770
+ const { stopOAuthKeepalive } = await import("./keepalive-7e9r5dvp.js");
53571
53771
  await stopOAuthKeepalive();
53572
53772
  }
53573
53773
  stopOAuthPendingGc();
@@ -53657,21 +53857,21 @@ try {
53657
53857
  console.warn("[startup] CAPABILITIES upgrade seed failed (non-fatal):", err);
53658
53858
  }
53659
53859
  try {
53660
- const { ensurePricingSeeded } = await import("./boot-seeds-9cwy39jx.js");
53860
+ const { ensurePricingSeeded } = await import("./boot-seeds-32zm50x2.js");
53661
53861
  ensurePricingSeeded();
53662
- const { startPricingRefreshLoop } = await import("./pricing-refresh-ytjmtyd7.js");
53862
+ const { startPricingRefreshLoop } = await import("./pricing-refresh-kfc215mf.js");
53663
53863
  startPricingRefreshLoop();
53664
53864
  } catch (err) {
53665
53865
  console.error("[startup] Failed to seed pricing rows:", err);
53666
53866
  }
53667
53867
  try {
53668
- const { ensureModelProfilesSeeded } = await import("./boot-seeds-9cwy39jx.js");
53868
+ const { ensureModelProfilesSeeded } = await import("./boot-seeds-32zm50x2.js");
53669
53869
  await ensureModelProfilesSeeded();
53670
53870
  } catch (err) {
53671
53871
  console.error("[startup] Failed to seed model profiles:", err);
53672
53872
  }
53673
53873
  try {
53674
- const { ensureRbacSeeded } = await import("./boot-seeds-9cwy39jx.js");
53874
+ const { ensureRbacSeeded } = await import("./boot-seeds-32zm50x2.js");
53675
53875
  ensureRbacSeeded();
53676
53876
  } catch (err) {
53677
53877
  console.error("[startup] Failed to sync RBAC seed rows:", err);
@@ -53679,13 +53879,13 @@ try {
53679
53879
  throw err;
53680
53880
  }
53681
53881
  try {
53682
- const { runAllSeeders } = await import("./index-ffba0z8q.js");
53882
+ const { runAllSeeders } = await import("./index-0vthtbc2.js");
53683
53883
  await runAllSeeders({ scriptEmbeddingMode: "skip" });
53684
53884
  } catch (err) {
53685
53885
  console.error("[startup] Failed to seed built-in entities:", err);
53686
53886
  }
53687
53887
  try {
53688
- const { runImports } = await import("./index-pb03vans.js");
53888
+ const { runImports } = await import("./index-xcw7hjt5.js");
53689
53889
  await runImports();
53690
53890
  } catch (err) {
53691
53891
  console.error("[startup] File import failed:", scrubSecrets(err instanceof Error ? err.message : String(err)));
@@ -53736,10 +53936,10 @@ httpServer.listen(port, async () => {
53736
53936
  startChatSdk().catch((err) => {
53737
53937
  console.error("[chat-sdk] Failed to start, continuing without Chat SDK:", scrubSecrets(err instanceof Error ? err.message : String(err)));
53738
53938
  });
53739
- import("./agent-fs-provision-y0qc1rdd.js").then(({ syncAgentFsOrgSwarmUrl }) => syncAgentFsOrgSwarmUrl(getConfiguredAppUrls()[0])).catch((err) => {
53939
+ import("./agent-fs-provision-6fgz7wvz.js").then(({ syncAgentFsOrgSwarmUrl }) => syncAgentFsOrgSwarmUrl(getConfiguredAppUrls()[0])).catch((err) => {
53740
53940
  console.warn("[agent-fs] Failed to set the org swarm URL:", scrubSecrets(err instanceof Error ? err.message : String(err)));
53741
53941
  });
53742
- import("./object-webhooks-3dzdq4fm.js").then(({ ensureObjectWebhooksForKnownDrives }) => ensureObjectWebhooksForKnownDrives()).catch((err) => {
53942
+ import("./object-webhooks-ac7v2q5p.js").then(({ ensureObjectWebhooksForKnownDrives }) => ensureObjectWebhooksForKnownDrives()).catch((err) => {
53743
53943
  console.warn("[objects] agent-fs webhook boot check failed:", scrubSecrets(err instanceof Error ? err.message : String(err)));
53744
53944
  });
53745
53945
  startQueueStallAlarm();
@@ -53755,25 +53955,25 @@ httpServer.listen(port, async () => {
53755
53955
  await initWorkflows2();
53756
53956
  await startScriptRunSupervisor(getMcpBaseUrl());
53757
53957
  if (hasCapability("scheduling")) {
53758
- const { startScheduler } = await import("./index-np0582ac.js");
53759
- const { getExecutorRegistry } = await import("./index-22khdtby.js");
53958
+ const { startScheduler } = await import("./index-6bm3w6cn.js");
53959
+ const { getExecutorRegistry } = await import("./index-30qw6vyw.js");
53760
53960
  const intervalMs = Number(process.env.SCHEDULER_INTERVAL_MS) || 1e4;
53761
53961
  startScheduler(getExecutorRegistry(), intervalMs, {
53762
53962
  runId: globalState.__runId
53763
53963
  });
53764
53964
  }
53765
53965
  if (!isEnvFlagEnabled("HEARTBEAT_DISABLE", false)) {
53766
- const { parseHeartbeatIntervalMs, startHeartbeat } = await import("./index-vgkrj1jt.js");
53966
+ const { parseHeartbeatIntervalMs, startHeartbeat } = await import("./index-1v23363p.js");
53767
53967
  startHeartbeat(parseHeartbeatIntervalMs(process.env.HEARTBEAT_INTERVAL_MS));
53768
53968
  }
53769
53969
  startPoolRouting();
53770
53970
  startRuntimeSupervisor();
53771
53971
  if (!isEnvFlagEnabled("OAUTH_KEEPALIVE_DISABLE", false)) {
53772
- const { startOAuthKeepalive } = await import("./keepalive-2v06q2e8.js");
53972
+ const { startOAuthKeepalive } = await import("./keepalive-7e9r5dvp.js");
53773
53973
  startOAuthKeepalive();
53774
53974
  }
53775
53975
  if (!isEnvFlagEnabled("OAUTH_REFRESH_SWEEP_DISABLE", false)) {
53776
- const { startOAuthRefreshSweep } = await import("./oauth-refresh-sweep-g06k4bza.js");
53976
+ const { startOAuthRefreshSweep } = await import("./oauth-refresh-sweep-0qh70988.js");
53777
53977
  startOAuthRefreshSweep();
53778
53978
  }
53779
53979
  startOAuthPendingGc();
@@ -53783,22 +53983,22 @@ httpServer.listen(port, async () => {
53783
53983
  startSavingsRollup(savingsRollupSql);
53784
53984
  startHumanFreeDrain();
53785
53985
  startTaskSearchBackfill();
53786
- import("./embedding-space-v06fwy7b.js").then(({ runEmbeddingMaintenance, setDeploymentEnvReader }) => {
53986
+ import("./embedding-space-an77f45k.js").then(({ runEmbeddingMaintenance, setDeploymentEnvReader }) => {
53787
53987
  setDeploymentEnvReader(getDeploymentEnvValue2);
53788
53988
  return runEmbeddingMaintenance({ backfill: true });
53789
53989
  }).catch((err) => {
53790
53990
  console.error("[embedding-space] startup maintenance failed (non-fatal):", err);
53791
53991
  });
53792
- import("./boot-args-schema-8025snev.js").then(({ runBootArgsSchemaBackfill }) => runBootArgsSchemaBackfill()).catch((err) => {
53992
+ import("./boot-args-schema-bqv5bf77.js").then(({ runBootArgsSchemaBackfill }) => runBootArgsSchemaBackfill()).catch((err) => {
53793
53993
  console.error("[boot-args-schema] startup backfill failed (non-fatal):", err);
53794
53994
  });
53795
- import("./boot-scrub-sweep-eajr97e9.js").then(({ runBootScrubSweep }) => runBootScrubSweep()).catch((err) => {
53995
+ import("./boot-scrub-sweep-tmec0be2.js").then(({ runBootScrubSweep }) => runBootScrubSweep()).catch((err) => {
53796
53996
  console.error("[boot-scrub-sweep] startup scrub failed (non-fatal):", err);
53797
53997
  });
53798
- import("./user-merge-jobs-96vg9rpe.js").then(({ resumeUserMergeJobs }) => resumeUserMergeJobs()).catch((err) => {
53998
+ import("./user-merge-jobs-4ce7kma2.js").then(({ resumeUserMergeJobs }) => resumeUserMergeJobs()).catch((err) => {
53799
53999
  console.error("[user-merge] startup resume failed (non-fatal):", err);
53800
54000
  });
53801
- import("./session-source-backfill-p73e8zbe.js").then(({ runSessionSourceBackfill }) => runSessionSourceBackfill()).catch((err) => {
54001
+ import("./session-source-backfill-jpqfzmgz.js").then(({ runSessionSourceBackfill }) => runSessionSourceBackfill()).catch((err) => {
53802
54002
  console.error("[session-source-backfill] startup run failed (non-fatal):", err);
53803
54003
  });
53804
54004
  }).on("error", (err) => {