@desplega.ai/agent-swarm 1.152.2 → 1.153.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 (224) hide show
  1. package/README.md +1 -1
  2. package/dist/{acp-adapter-pfeje2v5.js → acp-adapter-ahmjxhek.js} +4 -4
  3. package/dist/{actions-0sttc7f5.js → actions-jzrfpkmn.js} +30 -26
  4. package/dist/{anthropic-messages-2y8nktar.js → anthropic-messages-9vqsbznt.js} +112 -84
  5. package/dist/{app-p8teva95.js → app-03na2vwb.js} +9 -6
  6. package/dist/{assistant-r45jnsrt.js → assistant-hfkxvhgt.js} +31 -27
  7. package/dist/{azure-openai-responses-f38x2avq.js → azure-openai-responses-04qwdwfq.js} +27 -13
  8. package/dist/{boot-reembed-je26h5y7.js → boot-reembed-c98xrad3.js} +8 -6
  9. package/dist/{boot-reembed-1qmybsd4.js → boot-reembed-zt3qm9xn.js} +9 -7
  10. package/dist/{boot-scrub-logs-gte3h1mm.js → boot-scrub-logs-jcqd8ksj.js} +6 -4
  11. package/dist/{claude-adapter-csc1mzka.js → claude-adapter-mgryg8g3.js} +17 -15
  12. package/dist/{claude-managed-adapter-dsmkcrjy.js → claude-managed-adapter-ea2aga6w.js} +3 -3
  13. package/dist/{claude-sdk-session-fcd6f078.js → claude-sdk-session-jjf4zss1.js} +17 -15
  14. package/dist/{cli-r2fpe7cx.js → cli-00w2c66p.js} +61 -55
  15. package/dist/{cli-fm4ytsdk.js → cli-0d9nbqxf.js} +1 -1
  16. package/dist/cli-0x5qzvkg.js +4279 -0
  17. package/dist/{cli-d3p82erb.js → cli-18amys3y.js} +9 -9
  18. package/dist/{cli-wbyk465z.js → cli-1hwnb4hc.js} +1 -1
  19. package/dist/{cli-xw7vak96.js → cli-3bcmp015.js} +5 -5
  20. package/dist/cli-3er6gcsn.js +1849 -0
  21. package/dist/{cli-c4eeb5q2.js → cli-5b6b62tz.js} +1 -1
  22. package/dist/{cli-4ahpr4sw.js → cli-5mbmvxnn.js} +5 -5
  23. package/dist/{cli-xy1cchaf.js → cli-5taqtpze.js} +235 -8
  24. package/dist/{cli-fmy65jdn.js → cli-6ks9xf1n.js} +7 -5
  25. package/dist/cli-7g9s78jf.js +2827 -0
  26. package/dist/{cli-jew3jda5.js → cli-7pnz2v6s.js} +2 -2
  27. package/dist/{cli-r84ctdxn.js → cli-83wkg402.js} +2 -2
  28. package/dist/{cli-jvy9qgjs.js → cli-a9scg8sv.js} +4 -4
  29. package/dist/{cli-4yc5d8fk.js → cli-avkd6mqv.js} +50 -0
  30. package/dist/{cli-ht5rs63n.js → cli-b2g6mzjc.js} +15 -6
  31. package/dist/{cli-jbmc0r7r.js → cli-bw0dfwkr.js} +1 -1
  32. package/dist/{cli-8wrympd7.js → cli-bzr0ftht.js} +26 -7
  33. package/dist/{cli-wpv5rgg2.js → cli-cdq08v3r.js} +2 -2
  34. package/dist/cli-cgj4hc12.js +18902 -0
  35. package/dist/cli-d6hk10xx.js +14075 -0
  36. package/dist/{cli-zvgj5zg8.js → cli-djvxhnc4.js} +31 -3324
  37. package/dist/{cli-s25avqg9.js → cli-e781c6f9.js} +1 -0
  38. package/dist/{cli-3bpzj8me.js → cli-eazstkad.js} +2 -2
  39. package/dist/{cli-s2qjdd6z.js → cli-eetrvv91.js} +1 -1
  40. package/dist/cli-h38x0qhg.js +6912 -0
  41. package/dist/{cli-9xvdm3bx.js → cli-h60qfasa.js} +742 -278
  42. package/dist/{pi-mono-adapter-jcqt71cg.js → cli-ja7mrygn.js} +67343 -101083
  43. package/dist/{cli-j8dggbcr.js → cli-k0g1sjzm.js} +23 -31
  44. package/dist/{cli-gphgnvpf.js → cli-m04pt18h.js} +2 -2
  45. package/dist/{cli-rgvp6r2x.js → cli-mcnhgnn1.js} +193 -4
  46. package/dist/{cli-j4nv2wqy.js → cli-mzgyhxbe.js} +10 -4
  47. package/dist/{cli-qn042eh7.js → cli-n0q9b7j4.js} +46 -1870
  48. package/dist/cli-n7h1kqpf.js +29 -0
  49. package/dist/{cli-ckz5t2hb.js → cli-nq0kgyxe.js} +5 -5
  50. package/dist/{cli-z3wkng35.js → cli-qrqhc31j.js} +151 -125
  51. package/dist/{cli-56h18ng2.js → cli-r8tdds6s.js} +1 -1
  52. package/dist/{cli-ch38q5z4.js → cli-rj7de4b2.js} +6788 -2541
  53. package/dist/{cli-qd65dvr6.js → cli-s5s1f2yn.js} +56 -40
  54. package/dist/{cli-kj76p1ez.js → cli-scwq51gn.js} +13 -7
  55. package/dist/{cli-2nnd56zt.js → cli-tdh4hjr2.js} +3 -2
  56. package/dist/{cli-c2mk1kgf.js → cli-v4en75c5.js} +8 -1
  57. package/dist/{cli-b9dd0h3k.js → cli-vw03hg5t.js} +3 -2
  58. package/dist/{cli-zvkq5csn.js → cli-ybpp1srm.js} +6 -6
  59. package/dist/cli-yn0a417a.js +4069 -0
  60. package/dist/{cli-gpqcs935.js → cli-ysc1kbet.js} +2 -2
  61. package/dist/{cli-zfzznn7c.js → cli-ytxs7mn1.js} +26 -2
  62. package/dist/cli-zcsyfw2z.js +3335 -0
  63. package/dist/{cli-4j8k1m4w.js → cli-zt1227k1.js} +1162 -192
  64. package/dist/cli-zy5w9gpt.js +230 -0
  65. package/dist/cli.js +26 -34
  66. package/dist/{codex-adapter-fxmpsabw.js → codex-adapter-8548daap.js} +12 -11
  67. package/dist/{codex-session-runner-rr1e47ea.js → codex-session-runner-2dad8p4x.js} +12 -11
  68. package/dist/{commands-0f5rxz51.js → commands-355dbpa8.js} +6 -4
  69. package/dist/{db-r3jxf3wy.js → db-4jjvwz1s.js} +6 -4
  70. package/dist/{dispatcher-06vph6q4.js → dispatcher-ca590nkz.js} +29 -25
  71. package/dist/dsh-adapter-rgvj6ykp.js +19 -0
  72. package/dist/{e2b-413b8t4v.js → e2b-93x1k0j5.js} +6 -7
  73. package/dist/{google-generative-ai-ndjmj5fa.js → google-generative-ai-xtw7tggr.js} +33 -73
  74. package/dist/{google-vertex-fr665tqs.js → google-vertex-zdqpms6n.js} +38 -68
  75. package/dist/{handlers-0hgtc910.js → handlers-2y6dqpvf.js} +32 -28
  76. package/dist/{hook-9kvrv1er.js → hook-0s8knepr.js} +11 -9
  77. package/dist/{hook-fbfhkat3.js → hook-k0gec254.js} +12 -10
  78. package/dist/{http-xbyx8k5j.js → http-jp2nb4zw.js} +300 -237
  79. package/dist/{index-tfsdxyv6.js → index-0wzg3sp3.js} +39 -24
  80. package/dist/{index-rnyahfn5.js → index-3mq6ce93.js} +29 -25
  81. package/dist/{index-jsw3aynb.js → index-42s7eezq.js} +29 -25
  82. package/dist/{cli-pdz9qde4.js → index-9ch1n761.js} +10 -11
  83. package/dist/{index-gpfn1741.js → index-b56xkbc7.js} +8 -6
  84. package/dist/{index-66xz5e9j.js → index-h5gs261z.js} +521 -9
  85. package/dist/{index-2sp0384z.js → index-kkeftv5h.js} +738 -21
  86. package/dist/{index-sgk50mbg.js → index-s37dbevy.js} +30 -26
  87. package/dist/index-w097eg0x.js +5 -0
  88. package/dist/jiti-loader-b4837mtm.js +34 -0
  89. package/dist/jiti-static-loader-q2g5ds0y.js +31267 -0
  90. package/dist/{keepalive-s3xpr7sw.js → keepalive-9pfw7t02.js} +8 -6
  91. package/dist/{lead-rq4n5r16.js → lead-7vcmcdq4.js} +44 -39
  92. package/dist/{maintenance-f0atj1ab.js → maintenance-x277jbpd.js} +9 -7
  93. package/dist/{mistral-conversations-qhr84ph3.js → mistral-conversations-zx0kn554.js} +24 -18
  94. package/dist/{node-x1g4v0pq.js → node-5qtycf6a.js} +16 -11
  95. package/dist/{oauth-refresh-sweep-q0t3bxre.js → oauth-refresh-sweep-5fwa7th2.js} +7 -5
  96. package/dist/{onboard-br5j1kch.js → onboard-17sv0f51.js} +103 -35
  97. package/dist/{openai-codex-responses-wy6a43wd.js → openai-codex-responses-4vjqzvjp.js} +33 -27
  98. package/dist/{openai-completions-32rdwmze.js → openai-completions-pxsmym7g.js} +52 -64
  99. package/dist/{openai-responses-6xwf7bzg.js → openai-responses-tmn0rqp0.js} +23 -24
  100. package/dist/{opencode-adapter-28axqa09.js → opencode-adapter-qbmv4tpy.js} +6 -6
  101. package/dist/{otel-impl-vdqge2nt.js → otel-impl-srjy4be4.js} +4 -4
  102. package/dist/{pi-messages-b1mbr6gp.js → pi-messages-txpjj39q.js} +3 -3
  103. package/dist/pi-mono-adapter-946a0sdd.js +1316 -0
  104. package/dist/{pricing-refresh-hb3691fd.js → pricing-refresh-vetcm563.js} +8 -6
  105. package/dist/{rbac-roles-jh280k9g.js → rbac-roles-cfzgr6r1.js} +8 -6
  106. package/dist/{rbac-roles-t78xt39b.js → rbac-roles-cmxaddmy.js} +7 -5
  107. package/dist/{render-v2-7p8r2ymg.js → render-v2-f9hzff72.js} +9 -6
  108. package/dist/{seed-pricing-hf889enh.js → seed-pricing-jggk6rsy.js} +7 -5
  109. package/dist/{setup-w6mb03jv.js → setup-8mfceb9t.js} +4 -5
  110. package/dist/virtual-modules-ax661xp0.js +54 -0
  111. package/dist/{work-objects-nt8gy1kj.js → work-objects-vdsdcczj.js} +32 -28
  112. package/dist/{worker-dwy617t0.js → worker-cd0nhyv1.js} +44 -39
  113. package/openapi.json +36 -14
  114. package/package.json +6 -6
  115. package/src/be/automation-preflight.ts +6 -4
  116. package/src/be/extensions/db.ts +35 -4
  117. package/src/be/models-catalog.ts +2 -0
  118. package/src/be/modelsdev-cache.json +213 -0
  119. package/src/be/rbac-audit.ts +2 -0
  120. package/src/be/seed-pricing.ts +3 -1
  121. package/src/be/swarm-config-guard.ts +1 -0
  122. package/src/commands/onboard/compose-generator.ts +6 -1
  123. package/src/commands/onboard/env-generator.ts +6 -1
  124. package/src/commands/onboard/manifest.ts +1 -0
  125. package/src/commands/onboard/steps/integration-slack.tsx +56 -16
  126. package/src/commands/onboard/steps/review.tsx +5 -0
  127. package/src/commands/onboard/types.ts +6 -0
  128. package/src/commands/onboard.tsx +5 -1
  129. package/src/commands/provider-credentials.ts +14 -2
  130. package/src/extensions/lifecycle.ts +15 -21
  131. package/src/http/agents.ts +2 -2
  132. package/src/http/config.ts +1 -1
  133. package/src/http/core.ts +5 -3
  134. package/src/http/extensions.ts +108 -34
  135. package/src/http/status.ts +22 -10
  136. package/src/prompts/base-prompt.ts +15 -7
  137. package/src/providers/claude-managed-models.ts +8 -0
  138. package/src/providers/codex-models.ts +15 -1
  139. package/src/providers/dsh-adapter.ts +248 -0
  140. package/src/providers/index.ts +5 -1
  141. package/src/providers/modelsdev-reasoning.json +50 -0
  142. package/src/rbac/legacy-policy.ts +15 -1
  143. package/src/rbac/types.ts +2 -0
  144. package/src/server.ts +7 -1
  145. package/src/slack/app.ts +32 -10
  146. package/src/slack/config.ts +29 -0
  147. package/src/telemetry.ts +2 -3
  148. package/src/tests/agents-harness-provider.test.ts +19 -0
  149. package/src/tests/agents-list-model-display.test.ts +60 -1
  150. package/src/tests/base-prompt.test.ts +25 -0
  151. package/src/tests/claude-managed-adapter.test.ts +6 -0
  152. package/src/tests/codex-gpt6-release.test.ts +97 -0
  153. package/src/tests/config-api-only-keys.test.ts +9 -0
  154. package/src/tests/context-window.test.ts +1 -0
  155. package/src/tests/dsh-adapter.test.ts +276 -0
  156. package/src/tests/e2e-nightly-report.test.ts +3 -3
  157. package/src/tests/e2e-redact.test.ts +2 -0
  158. package/src/tests/env-flag.test.ts +6 -0
  159. package/src/tests/extensions-db.test.ts +41 -0
  160. package/src/tests/extensions-http.test.ts +148 -4
  161. package/src/tests/extensions-lifecycle.test.ts +18 -0
  162. package/src/tests/extensions-mcp-tools.test.ts +9 -5
  163. package/src/tests/internal-ai/complete-structured.test.ts +32 -9
  164. package/src/tests/internal-ai/credentials.test.ts +4 -4
  165. package/src/tests/internal-ai/models.test.ts +20 -0
  166. package/src/tests/migration-046-budgets.test.ts +2 -0
  167. package/src/tests/model-control.test.ts +2 -2
  168. package/src/tests/onboard-compose.test.ts +14 -0
  169. package/src/tests/onboard-env.test.ts +17 -0
  170. package/src/tests/onboard-manifest.test.ts +12 -0
  171. package/src/tests/opus-5-5-registry.test.ts +48 -0
  172. package/src/tests/pricing-refresh.test.ts +1 -1
  173. package/src/tests/pricing-routes.test.ts +15 -3
  174. package/src/tests/provider-registration.test.ts +5 -2
  175. package/src/tests/rbac-admission-e2e.test.ts +54 -0
  176. package/src/tests/rbac-e2e-helpers.ts +2 -0
  177. package/src/tests/rbac-engine.test.ts +32 -0
  178. package/src/tests/rbac-wire-e2e.test.ts +33 -0
  179. package/src/tests/reasoning-effort.test.ts +8 -0
  180. package/src/tests/reload-config.test.ts +33 -0
  181. package/src/tests/session-costs-model-key-normalize.test.ts +1 -0
  182. package/src/tests/slack-config.test.ts +136 -0
  183. package/src/tests/slack-mode-lifecycle.test.ts +69 -0
  184. package/src/tests/status.test.ts +22 -2
  185. package/src/tests/task-tool-preload-mcp.test.ts +3 -1
  186. package/src/tests/telemetry-init.test.ts +18 -0
  187. package/src/tests/workflow-llm.test.ts +3 -3
  188. package/src/tools/extension-common.ts +4 -0
  189. package/src/tools/extension-install.ts +1 -1
  190. package/src/tools/extension-list.ts +4 -3
  191. package/src/types.ts +17 -8
  192. package/src/utils/context-window.ts +1 -0
  193. package/src/utils/credentials.ts +8 -0
  194. package/src/utils/internal-ai/complete-structured.ts +8 -0
  195. package/src/utils/internal-ai/models.ts +5 -5
  196. package/templates/schedules/daily-status-report/content.md +25 -12
  197. package/templates/schedules/daily-workflow-health-audit/content.md +1 -1
  198. package/templates/skills/swarm-extensions/content.md +9 -5
  199. package/dist/cli-4wppfkcm.js +0 -16384
  200. package/dist/cli-55qrx3q8.js +0 -6041
  201. package/dist/cli-cg4vnyh4.js +0 -305
  202. package/dist/cli-jyetr64j.js +0 -52
  203. package/dist/cli-pp9ax9pa.js +0 -520
  204. package/dist/cli-qa66qaf0.js +0 -6076
  205. package/dist/cli-qghpvca2.js +0 -590
  206. package/dist/cli-rembwgt8.js +0 -861
  207. package/dist/cli-tcvj7j2r.js +0 -1971
  208. package/dist/cli-vfcth11k.js +0 -36
  209. package/dist/cli-w1d1bgkk.js +0 -1422
  210. package/dist/cli-y6x0gqtg.js +0 -5977
  211. package/dist/es5-tj3tn4jj.js +0 -844
  212. package/dist/index-1kq5hw2p.js +0 -467
  213. package/dist/index-1p8wdstt.js +0 -7
  214. package/dist/index-8fdjzb2f.js +0 -100
  215. package/dist/index-bxmwzbgw.js +0 -365
  216. package/dist/index-nzerxd5z.js +0 -7
  217. package/dist/index-pyymnzat.js +0 -1168
  218. package/dist/index-qv6atbab.js +0 -619
  219. package/dist/index-rja32qa7.js +0 -801
  220. package/dist/index-tzg5srfp.js +0 -211
  221. package/dist/index-vhncw983.js +0 -90
  222. package/dist/index-xk036zsk.js +0 -859
  223. package/dist/index-zyazbzcb.js +0 -6
  224. package/dist/{claude-managed-setup-48dwg9bv.js → claude-managed-setup-f5pmsyrp.js} +3 -3
@@ -12,13 +12,18 @@ import {
12
12
  import {
13
13
  Anthropic
14
14
  } from "./cli-j490egb5.js";
15
+ import {
16
+ checkHeartbeatChecklist,
17
+ runHeartbeatSweep,
18
+ stopHeartbeat
19
+ } from "./cli-m04pt18h.js";
15
20
  import {
16
21
  isClaudeBridgeEffective,
17
22
  resolveClaudeTransport
18
23
  } from "./cli-eree7rnv.js";
19
24
  import {
20
25
  reasoningCapability
21
- } from "./cli-4yc5d8fk.js";
26
+ } from "./cli-avkd6mqv.js";
22
27
  import {
23
28
  SCRIPT_SDK_TYPES,
24
29
  SCRIPT_STDLIB_MODULE_TYPES,
@@ -31,12 +36,7 @@ import {
31
36
  scriptStdlibTypesWithGeneratedApis,
32
37
  typecheckScript,
33
38
  typecheckWithAmbient
34
- } from "./cli-wpv5rgg2.js";
35
- import {
36
- checkHeartbeatChecklist,
37
- runHeartbeatSweep,
38
- stopHeartbeat
39
- } from "./cli-gphgnvpf.js";
39
+ } from "./cli-cdq08v3r.js";
40
40
  import {
41
41
  AGENT_MAX_TASKS_CONFIG_KEY,
42
42
  ALL_CAPABILITIES,
@@ -46,6 +46,7 @@ import {
46
46
  ExplicitSelfDuplicateError,
47
47
  ExtensionConfigError,
48
48
  ExtensionLifecycleError,
49
+ ExtensionOwnershipError,
49
50
  JSONRPCMessageSchema,
50
51
  MAX_TASK_ATTACHMENT_BYTES,
51
52
  McpServer,
@@ -285,12 +286,12 @@ import {
285
286
  verifyWebhookSignature,
286
287
  warnIfCorsAllowsAnyOrigin,
287
288
  wireHttpSpanLifecycle
288
- } from "./cli-z3wkng35.js";
289
+ } from "./cli-qrqhc31j.js";
289
290
  import"./cli-0z2v4nhw.js";
290
291
  import {
291
292
  REFERENCES_SOURCE_MAX_LENGTH,
292
293
  sanitizeReferencesSource
293
- } from "./cli-4wppfkcm.js";
294
+ } from "./cli-7g9s78jf.js";
294
295
  import {
295
296
  deriveCodexKeySuffix,
296
297
  getValidCodexOAuth,
@@ -300,19 +301,24 @@ import {
300
301
  isMultiRuntimeEnabled
301
302
  } from "./cli-re8z5p8p.js";
302
303
  import"./cli-3dpj7atn.js";
304
+ import"./cli-d6hk10xx.js";
303
305
  import {
304
306
  getModelsCatalog
305
- } from "./cli-b9dd0h3k.js";
307
+ } from "./cli-vw03hg5t.js";
308
+ import {
309
+ normalizeModelKey
310
+ } from "./cli-tdh4hjr2.js";
306
311
  import {
307
312
  getUserGrant
308
- } from "./cli-r84ctdxn.js";
313
+ } from "./cli-83wkg402.js";
309
314
  import {
315
+ LEGACY_RULES,
310
316
  can,
311
317
  clearAuditSink,
312
318
  decideToolAdmission,
313
319
  isRbacEnabled,
314
320
  setAuditSink
315
- } from "./cli-zfzznn7c.js";
321
+ } from "./cli-ytxs7mn1.js";
316
322
  import {
317
323
  ConnectionAuthInputSchema,
318
324
  MAX_SCRIPT_WALL_CLOCK_MS,
@@ -395,7 +401,7 @@ import {
395
401
  upsertScriptByName,
396
402
  upsertScriptConnection,
397
403
  validateDefinition
398
- } from "./cli-fmy65jdn.js";
404
+ } from "./cli-6ks9xf1n.js";
399
405
  import"./cli-epan13p1.js";
400
406
  import {
401
407
  detachedProcessGroup,
@@ -407,7 +413,6 @@ import {
407
413
  import {
408
414
  getApiKey
409
415
  } from "./cli-f14fvzag.js";
410
- import"./cli-fad8m16k.js";
411
416
  import {
412
417
  acquireOAuthRefreshLock,
413
418
  buildAuthorizationUrl,
@@ -431,14 +436,27 @@ import {
431
436
  updateAuthorizationIdentity,
432
437
  updateOAuthAppById,
433
438
  upsertAuthorization
434
- } from "./cli-56h18ng2.js";
435
- import {
436
- normalizeModelKey
437
- } from "./cli-2nnd56zt.js";
439
+ } from "./cli-r8tdds6s.js";
438
440
  import"./cli-bsakbbkm.js";
441
+ import"./cli-fad8m16k.js";
442
+ import {
443
+ FilesError,
444
+ getFileStorageProvider,
445
+ normalizeFilesError
446
+ } from "./cli-jsp14b6c.js";
439
447
  import {
440
448
  searchScripts
441
- } from "./cli-gpqcs935.js";
449
+ } from "./cli-ysc1kbet.js";
450
+ import {
451
+ CANDIDATE_SET_MULTIPLIER,
452
+ getEmbeddingProvider,
453
+ getMemoryStore,
454
+ init_constants as init_constants2,
455
+ init_reranker,
456
+ rerank
457
+ } from "./cli-7pnz2v6s.js";
458
+ import"./cli-0d9nbqxf.js";
459
+ import"./cli-aehm1rbq.js";
442
460
  import"./cli-51tf7ac3.js";
443
461
  import {
444
462
  ensure,
@@ -455,149 +473,18 @@ import {
455
473
  withRemoteContext,
456
474
  withSpan,
457
475
  withSpanContext
458
- } from "./cli-qn042eh7.js";
476
+ } from "./cli-n0q9b7j4.js";
459
477
  import"./cli-q51yprfq.js";
478
+ import"./cli-3er6gcsn.js";
460
479
  import"./cli-yatxqynm.js";
461
- import {
462
- CANDIDATE_SET_MULTIPLIER,
463
- getEmbeddingProvider,
464
- getMemoryStore,
465
- init_constants as init_constants2,
466
- init_reranker,
467
- rerank
468
- } from "./cli-jew3jda5.js";
469
- import"./cli-fm4ytsdk.js";
470
- import"./cli-aehm1rbq.js";
471
480
  import"./cli-2658f6at.js";
472
481
  import {
473
- FilesError,
474
- getFileStorageProvider,
475
- normalizeFilesError
476
- } from "./cli-jsp14b6c.js";
477
- import {
478
- ActiveSessionSchema,
479
- AgentAcpStatusSchema,
480
- AgentAvatarSchema,
481
- AgentCredStatusSchema,
482
- AgentLatestModelSchema,
483
- AgentLogSchema,
484
- AgentMcpServerSchema,
485
- AgentMemorySchema,
486
- AgentMemoryScopeSchema,
487
- AgentMemorySourceSchema,
488
- AgentSchema,
489
- AgentSkillSchema,
490
- AgentStatusSchema,
491
- AgentTaskSchema,
492
- AgentTaskSourceSchema,
493
- AgentTaskStatusSchema,
494
- AgentWithTasksSchema,
495
- AssetEntityTypeSchema,
496
- AssetKeyMappingSchema,
497
- AssetKeySchema,
498
- AssetSummarySchema,
499
- AutomationIntegrationIdSchema,
500
- BudgetRefusalNotificationSchema,
501
- BudgetRefusedTriggerSchema,
502
- BudgetSchema,
503
- BudgetScopeSchema,
504
- ContextFormulaSchema,
505
- ContextSnapshotEventTypeSchema,
506
- ContextSnapshotSchema,
507
- CooldownConfigSchema,
508
482
  CredentialBindingSchema,
509
483
  DB_RETENTION_TUNING_BOUNDS,
510
- EventCategorySchema,
511
- EventNameSchema,
512
- EventSourceSchema,
513
- EventStatusSchema,
514
- ExtensionInstallBodySchema,
515
- ExtensionManifestSchema,
516
- ExtensionRunSchema,
517
- ExtensionSchema,
518
- ExtensionVersionSchema,
519
- FavoriteItemTypeSchema,
520
484
  HeartbeatExpiryError,
521
- InboxItemStateSchema,
522
- InboxItemStatusSchema,
523
- InboxItemTypeSchema,
524
- InputValueSchema,
525
- KvEntrySchema,
526
- KvKeySchema,
527
- KvNamespaceSchema,
528
485
  KvTypeCollisionError,
529
- KvValueTypeSchema,
530
486
  MAX_DB_RETENTION_DAYS,
531
- McpAuthMethodSchema,
532
- McpServerSchema,
533
- McpServerWithInstallInfoSchema,
534
- MetricDefinitionSchema,
535
- MetricSchema,
536
- MetricVersionSchema,
537
- MetricWidgetSchema,
538
- ModelTierSchema,
539
- OnUnsupportedSchema,
540
- PageAuthModeSchema,
541
- PageContentTypeSchema,
542
- PageSchema,
543
- PageVersionSchema,
544
- PricingProviderSchema,
545
- PricingRowSchema,
546
- PricingTokenClassSchema,
547
- PromptTemplateHistorySchema,
548
- PromptTemplateSchema,
549
- ProviderNameSchema,
550
- ReasoningEffortSchema,
551
- RepoGuidelinesInputSchema,
552
- RepoHooksSchema,
553
- ResumeReasonSchema,
554
- RoutingReasonSchema,
555
- RuntimeInstanceSchema,
556
- ScheduledTaskSchema,
557
- ScheduledTaskTargetTypeSchema,
558
- ScriptApiAuthModeSchema,
559
- ScriptApiRecordSchema,
560
- ScriptFsModeSchema,
561
- ScriptRecordSchema,
562
- ScriptRunJournalEntrySchema,
563
- ScriptRunListItemSchema,
564
- ScriptRunSchema,
565
- ScriptRunStatusSchema,
566
- ScriptScopeSchema,
567
- ScriptVersionRecordSchema,
568
- ServiceSchema,
569
- SessionCostModelBreakdownSchema,
570
- SessionCostSchema,
571
- SessionLogSchema,
572
- SkillFileSchema,
573
- SkillSchema,
574
- SkillWithInstallInfoSchema,
575
- SteerModeSchema,
576
- SteerResultSchema,
577
- SteeringMessageSchema,
578
487
  SteeringRequestError,
579
- SteeringSourceSchema,
580
- SwarmConfigSchema,
581
- SwarmEventSchema,
582
- SwarmRepoSchema,
583
- TERMINAL_SCRIPT_RUN_STATUSES,
584
- TaskAttachmentSchema,
585
- TaskTemplateKindSchema,
586
- TaskTemplateSchema,
587
- TriggerConfigSchema,
588
- UserCommsPrefsSchema,
589
- UserFavoriteSchema,
590
- UserSchema,
591
- VersionableFieldSchema,
592
- WorkflowDefinitionSchema,
593
- WorkflowEdgeSchema,
594
- WorkflowNodePatchSchema,
595
- WorkflowPatchSchema,
596
- WorkflowRunSchema,
597
- WorkflowRunStatusSchema,
598
- WorkflowRunStepSchema,
599
- WorkflowSchema,
600
- WorkflowVersionSchema,
601
488
  _resolveIntegrationProvider,
602
489
  _resolveIntegrationType,
603
490
  agentContextKey,
@@ -768,7 +655,6 @@ import {
768
655
  incrementPageViewCount,
769
656
  initTelemetry,
770
657
  init_asset_key_audit,
771
- init_bundle_path,
772
658
  init_context_key,
773
659
  init_credential_broker,
774
660
  init_date_utils,
@@ -781,15 +667,12 @@ import {
781
667
  init_task_tool_manifest,
782
668
  init_telemetry,
783
669
  init_templates,
784
- init_types,
785
670
  insertActiveSession,
786
671
  insertPricingRow,
787
672
  installMcpServer,
788
673
  installSkill,
789
674
  isReservedConfigKey,
790
- isSafeBundlePath,
791
675
  isSteeringEnabled as isSteeringEnabled2,
792
- isTerminalTaskStatus,
793
676
  listAgentsWithCredStatusByProvider,
794
677
  listAllMetrics,
795
678
  listAllPages,
@@ -840,7 +723,6 @@ import {
840
723
  setApiKeyName,
841
724
  setFavorite,
842
725
  setRequestAuth,
843
- splitLegacyModelAlias,
844
726
  startTask,
845
727
  supersedeTask,
846
728
  sweepExpiredKv,
@@ -884,12 +766,136 @@ import {
884
766
  upsertSwarmConfig,
885
767
  validateConfigValue,
886
768
  withFavoriteFlags
887
- } from "./cli-zvgj5zg8.js";
769
+ } from "./cli-djvxhnc4.js";
770
+ import {
771
+ ActiveSessionSchema,
772
+ AgentAcpStatusSchema,
773
+ AgentAvatarSchema,
774
+ AgentCredStatusSchema,
775
+ AgentLatestModelSchema,
776
+ AgentLogSchema,
777
+ AgentMcpServerSchema,
778
+ AgentMemorySchema,
779
+ AgentMemoryScopeSchema,
780
+ AgentMemorySourceSchema,
781
+ AgentSchema,
782
+ AgentSkillSchema,
783
+ AgentStatusSchema,
784
+ AgentTaskSchema,
785
+ AgentTaskSourceSchema,
786
+ AgentTaskStatusSchema,
787
+ AgentWithTasksSchema,
788
+ AssetEntityTypeSchema,
789
+ AssetKeyMappingSchema,
790
+ AssetKeySchema,
791
+ AssetSummarySchema,
792
+ AutomationIntegrationIdSchema,
793
+ BudgetRefusalNotificationSchema,
794
+ BudgetRefusedTriggerSchema,
795
+ BudgetSchema,
796
+ BudgetScopeSchema,
797
+ ContextFormulaSchema,
798
+ ContextSnapshotEventTypeSchema,
799
+ ContextSnapshotSchema,
800
+ CooldownConfigSchema,
801
+ EventCategorySchema,
802
+ EventNameSchema,
803
+ EventSourceSchema,
804
+ EventStatusSchema,
805
+ ExtensionInstallBodySchema,
806
+ ExtensionManifestSchema,
807
+ ExtensionRunSchema,
808
+ ExtensionSchema,
809
+ ExtensionVersionSchema,
810
+ FavoriteItemTypeSchema,
811
+ InboxItemStateSchema,
812
+ InboxItemStatusSchema,
813
+ InboxItemTypeSchema,
814
+ InputValueSchema,
815
+ KvEntrySchema,
816
+ KvKeySchema,
817
+ KvNamespaceSchema,
818
+ KvValueTypeSchema,
819
+ McpAuthMethodSchema,
820
+ McpServerSchema,
821
+ McpServerWithInstallInfoSchema,
822
+ MetricDefinitionSchema,
823
+ MetricSchema,
824
+ MetricVersionSchema,
825
+ MetricWidgetSchema,
826
+ ModelTierSchema,
827
+ OnUnsupportedSchema,
828
+ PageAuthModeSchema,
829
+ PageContentTypeSchema,
830
+ PageSchema,
831
+ PageVersionSchema,
832
+ PricingProviderSchema,
833
+ PricingRowSchema,
834
+ PricingTokenClassSchema,
835
+ PromptTemplateHistorySchema,
836
+ PromptTemplateSchema,
837
+ ProviderNameSchema,
838
+ ReasoningEffortSchema,
839
+ RepoGuidelinesInputSchema,
840
+ RepoHooksSchema,
841
+ ResumeReasonSchema,
842
+ RoutingReasonSchema,
843
+ RuntimeInstanceSchema,
844
+ ScheduledTaskSchema,
845
+ ScheduledTaskTargetTypeSchema,
846
+ ScriptApiAuthModeSchema,
847
+ ScriptApiRecordSchema,
848
+ ScriptFsModeSchema,
849
+ ScriptRecordSchema,
850
+ ScriptRunJournalEntrySchema,
851
+ ScriptRunListItemSchema,
852
+ ScriptRunSchema,
853
+ ScriptRunStatusSchema,
854
+ ScriptScopeSchema,
855
+ ScriptVersionRecordSchema,
856
+ ServiceSchema,
857
+ SessionCostModelBreakdownSchema,
858
+ SessionCostSchema,
859
+ SessionLogSchema,
860
+ SkillFileSchema,
861
+ SkillSchema,
862
+ SkillWithInstallInfoSchema,
863
+ SteerModeSchema,
864
+ SteerResultSchema,
865
+ SteeringMessageSchema,
866
+ SteeringSourceSchema,
867
+ SwarmConfigSchema,
868
+ SwarmEventSchema,
869
+ SwarmRepoSchema,
870
+ TERMINAL_SCRIPT_RUN_STATUSES,
871
+ TaskAttachmentSchema,
872
+ TaskTemplateKindSchema,
873
+ TaskTemplateSchema,
874
+ TriggerConfigSchema,
875
+ UserCommsPrefsSchema,
876
+ UserFavoriteSchema,
877
+ UserSchema,
878
+ VersionableFieldSchema,
879
+ WorkflowDefinitionSchema,
880
+ WorkflowEdgeSchema,
881
+ WorkflowNodePatchSchema,
882
+ WorkflowPatchSchema,
883
+ WorkflowRunSchema,
884
+ WorkflowRunStatusSchema,
885
+ WorkflowRunStepSchema,
886
+ WorkflowSchema,
887
+ WorkflowVersionSchema,
888
+ init_bundle_path,
889
+ init_types,
890
+ isSafeBundlePath,
891
+ isTerminalTaskStatus,
892
+ splitLegacyModelAlias
893
+ } from "./cli-zcsyfw2z.js";
888
894
  import {
889
895
  IDENTITY_FIELD_BUDGETS,
890
896
  IdentityFieldBudgetError,
891
897
  init_identity_field_budget
892
- } from "./cli-ht5rs63n.js";
898
+ } from "./cli-b2g6mzjc.js";
893
899
  import {
894
900
  getAllTemplateDefinitions,
895
901
  getTemplateDefinition,
@@ -901,6 +907,7 @@ import {
901
907
  isSteeringEnabled,
902
908
  resolveTemplate
903
909
  } from "./cli-z61ykvam.js";
910
+ import"./cli-v4en75c5.js";
904
911
  import {
905
912
  MAX_PROFILE_FILE_LENGTH,
906
913
  getAppUrl,
@@ -909,7 +916,10 @@ import {
909
916
  getPublicMcpBaseUrl,
910
917
  init_constants
911
918
  } from "./cli-dv6cdjs2.js";
912
- import"./cli-c2mk1kgf.js";
919
+ import {
920
+ getSlackConfiguration,
921
+ init_config
922
+ } from "./cli-n7h1kqpf.js";
913
923
  import {
914
924
  init_env_flag,
915
925
  isEnvFlagEnabled,
@@ -930,13 +940,31 @@ import {
930
940
  import {
931
941
  init_package,
932
942
  package_default
933
- } from "./cli-zvkq5csn.js";
943
+ } from "./cli-ybpp1srm.js";
934
944
  import {
935
945
  init_secret_scrubber,
936
946
  registerVolatileSecret,
937
947
  scrubObject,
938
948
  scrubSecrets
939
949
  } from "./cli-r2ap2czm.js";
950
+ import {
951
+ bedrockProviderModule
952
+ } from "./cli-h38x0qhg.js";
953
+ import"./cli-yn0a417a.js";
954
+ import"./cli-cgj4hc12.js";
955
+ import"./cli-txgcknmy.js";
956
+ import"./cli-6map995v.js";
957
+ import"./cli-k0g1sjzm.js";
958
+ import"./cli-y2apkfe2.js";
959
+ import"./cli-vapyk8sw.js";
960
+ import {
961
+ setBedrockProviderModule
962
+ } from "./cli-5b6b62tz.js";
963
+ import"./cli-btbzvq95.js";
964
+ import"./cli-1m2e086m.js";
965
+ import"./cli-mcnhgnn1.js";
966
+ import"./cli-bzr0ftht.js";
967
+ import"./cli-bd957dgb.js";
940
968
  import {
941
969
  import_websocket,
942
970
  import_websocket_server
@@ -950,31 +978,6 @@ import {
950
978
  init_bus,
951
979
  realtimeBus
952
980
  } from "./cli-zf8jjwex.js";
953
- import {
954
- bedrockProviderModule
955
- } from "./cli-y6x0gqtg.js";
956
- import"./cli-cg4vnyh4.js";
957
- import"./cli-txgcknmy.js";
958
- import"./cli-6map995v.js";
959
- import"./cli-j8dggbcr.js";
960
- import"./cli-y2apkfe2.js";
961
- import"./cli-vapyk8sw.js";
962
- import"./cli-pdz9qde4.js";
963
- import {
964
- setBedrockProviderModule
965
- } from "./cli-c4eeb5q2.js";
966
- import"./cli-rgvp6r2x.js";
967
- import"./cli-btbzvq95.js";
968
- import"./cli-1m2e086m.js";
969
- import"./cli-8wrympd7.js";
970
- import"./cli-bd957dgb.js";
971
- import"./cli-jyetr64j.js";
972
- import"./cli-w1d1bgkk.js";
973
- import"./cli-qghpvca2.js";
974
- import"./cli-55qrx3q8.js";
975
- import"./cli-rembwgt8.js";
976
- import"./cli-tcvj7j2r.js";
977
- import"./cli-qa66qaf0.js";
978
981
  import {
979
982
  __require,
980
983
  __toESM
@@ -3350,7 +3353,7 @@ var setAgentHarnessProviderRoute = route({
3350
3353
  404: { description: "Agent not found" }
3351
3354
  }
3352
3355
  });
3353
- var LocalHarnessProviderSchema = exports_external.enum(["claude", "codex", "pi", "opencode", "acp"]);
3356
+ var LocalHarnessProviderSchema = exports_external.enum(["claude", "codex", "pi", "opencode", "acp", "dsh"]);
3354
3357
  var AcpRuntimeConfigSchema = exports_external.object({
3355
3358
  target: exports_external.enum(ACP_TARGET_IDS),
3356
3359
  command: exports_external.string().trim().min(1).nullable().optional(),
@@ -4007,7 +4010,7 @@ async function handleAgentsRest(req, res, pathSegments, queryParams, _myAgentId)
4007
4010
  scopeId: parsed.params.id,
4008
4011
  key: "MODEL_OVERRIDE"
4009
4012
  }))[0]?.value ?? "";
4010
- const allowedLevels = harness_provider === "acp" ? [] : reasoningCapability(harness_provider, modelForValidation ?? "").levels;
4013
+ const allowedLevels = harness_provider === "acp" || harness_provider === "dsh" ? [] : reasoningCapability(harness_provider, modelForValidation ?? "").levels;
4011
4014
  if (!allowedLevels.includes(reasoning_effort)) {
4012
4015
  json(res, {
4013
4016
  error: "Unsupported reasoning_effort for this harness/model",
@@ -5533,7 +5536,7 @@ init_request_auth_context();
5533
5536
  init_secret_scrubber();
5534
5537
  var MAX_ENV_PRESENCE_KEYS = 200;
5535
5538
  var SECRETS_FORCE_MASK_NOTE = " (secret values masked: reading unmasked secrets requires the lead agent)";
5536
- var API_ONLY_CONFIG_KEYS = new Set(["API_AGENT_FS_API_KEY"]);
5539
+ var API_ONLY_CONFIG_KEYS = new Set(["API_AGENT_FS_API_KEY", "SLACK_SIGNING_SECRET"]);
5537
5540
  function stripApiOnlyKeys(configs) {
5538
5541
  return configs.filter((config) => !API_ONLY_CONFIG_KEYS.has(config.key));
5539
5542
  }
@@ -6888,6 +6891,7 @@ var installRoute = route({
6888
6891
  pattern: ["api", "extensions", "install"],
6889
6892
  operationId: "extensions_install",
6890
6893
  summary: "Validate and install an extension bundle",
6894
+ description: "Any authenticated agent can install a disabled draft owned by its agent ID. Workers can update only their own bundles; activation remains lead/operator-only.",
6891
6895
  tags: ["Extensions"],
6892
6896
  body: ExtensionInstallBodySchema,
6893
6897
  responses: {
@@ -6991,6 +6995,7 @@ var patchRoute = route({
6991
6995
  pattern: ["api", "extensions", null],
6992
6996
  operationId: "extensions_update",
6993
6997
  summary: "Update extension priority, config, or description",
6998
+ description: "Workers may edit their own disabled extensions. Leads, operators, and dashboard users retain access to all extensions.",
6994
6999
  tags: ["Extensions"],
6995
7000
  params: idParamsSchema,
6996
7001
  body: exports_external.object({
@@ -7012,6 +7017,7 @@ var deleteRoute = route({
7012
7017
  pattern: ["api", "extensions", null],
7013
7018
  operationId: "extensions_delete",
7014
7019
  summary: "Uninstall a disabled extension",
7020
+ description: "Workers may uninstall their own disabled extensions. Leads, operators, and dashboard users retain access to all extensions.",
7015
7021
  tags: ["Extensions"],
7016
7022
  params: idParamsSchema,
7017
7023
  responses: {
@@ -7121,16 +7127,19 @@ async function extensionPrincipal(req, callerAgentId) {
7121
7127
  return { kind: "user", userId: auth.userId };
7122
7128
  return { kind: "agent", agentId: "", isLead: false };
7123
7129
  }
7124
- async function requirePermission(req, res, callerAgentId, verb) {
7130
+ function ownerOnlyAgentId(principal) {
7131
+ return principal.kind === "agent" && !LEGACY_RULES["lead-or-operator-or-user"].evaluate(principal, undefined) ? principal.agentId : undefined;
7132
+ }
7133
+ async function requirePermission(req, res, callerAgentId, verb, resource = { kind: "none" }) {
7125
7134
  const principal = await extensionPrincipal(req, callerAgentId);
7126
- const decision = can({ principal, verb, resource: { kind: "none" }, source: "http" });
7135
+ const decision = can({ principal, verb, resource, source: "http" });
7127
7136
  if (decision.allow)
7128
7137
  return principal;
7129
7138
  jsonError(res, `Forbidden: ${decision.reason}`, 403);
7130
7139
  return null;
7131
7140
  }
7132
7141
  function respondLifecycleError(res, error) {
7133
- const status = error instanceof ExtensionConfigError ? 400 : error instanceof ExtensionLifecycleError ? error.status : 500;
7142
+ const status = error instanceof ExtensionOwnershipError ? 403 : error instanceof ExtensionConfigError ? 400 : error instanceof ExtensionLifecycleError ? error.status : 500;
7134
7143
  jsonError(res, scrubSecrets(error instanceof Error ? error.message : String(error)), status);
7135
7144
  }
7136
7145
  async function handleExtensions(req, res, pathSegments, queryParams, agentId) {
@@ -7138,7 +7147,12 @@ async function handleExtensions(req, res, pathSegments, queryParams, agentId) {
7138
7147
  const parsed = await installRoute.parse(req, res, pathSegments, queryParams);
7139
7148
  if (!parsed)
7140
7149
  return true;
7141
- const principal = await requirePermission(req, res, agentId, "extension.write");
7150
+ const existing = await getExtensionByName(parsed.body.manifest.name);
7151
+ const principal = await requirePermission(req, res, agentId, "extension.write", {
7152
+ kind: "extension",
7153
+ extensionId: existing?.id,
7154
+ createdByAgentId: existing?.createdByAgentId
7155
+ });
7142
7156
  if (!principal)
7143
7157
  return true;
7144
7158
  const validation = await validateBundle(parsed.body);
@@ -7146,19 +7160,28 @@ async function handleExtensions(req, res, pathSegments, queryParams, agentId) {
7146
7160
  json(res, { error: "extension_validation_failed", diagnostics: validation.diagnostics }, 400);
7147
7161
  return true;
7148
7162
  }
7149
- const existing = await getExtensionByName(validation.manifest.name);
7150
7163
  const writerAgentId = principal.kind === "agent" ? principal.agentId : undefined;
7151
7164
  const updatedBy = await resolveHttpAuditUserId(req, writerAgentId);
7152
7165
  const shouldActivate = principal.kind !== "agent" && existing?.enabled === true;
7153
- const result = await installExtension({
7154
- manifest: validation.manifest,
7155
- files: parsed.body.files,
7156
- priority: parsed.body.priority,
7157
- config: parsed.body.config,
7158
- agentId: writerAgentId,
7159
- createdBy: updatedBy,
7160
- activate: shouldActivate
7161
- });
7166
+ const ownerOnly = ownerOnlyAgentId(principal);
7167
+ let result;
7168
+ try {
7169
+ result = await installExtension({
7170
+ manifest: validation.manifest,
7171
+ files: parsed.body.files,
7172
+ priority: parsed.body.priority,
7173
+ config: parsed.body.config,
7174
+ agentId: writerAgentId,
7175
+ createdBy: updatedBy,
7176
+ activate: shouldActivate,
7177
+ ownerOnly
7178
+ });
7179
+ } catch (error) {
7180
+ if (!(error instanceof ExtensionOwnershipError))
7181
+ throw error;
7182
+ jsonError(res, error.message, 403);
7183
+ return true;
7184
+ }
7162
7185
  let extension = result.extension;
7163
7186
  if (shouldActivate) {
7164
7187
  try {
@@ -7236,17 +7259,36 @@ async function handleExtensions(req, res, pathSegments, queryParams, agentId) {
7236
7259
  const parsed = await patchRoute.parse(req, res, pathSegments, queryParams);
7237
7260
  if (!parsed)
7238
7261
  return true;
7239
- const principal = await requirePermission(req, res, agentId, "extension.write");
7262
+ const stored = await getExtensionById(parsed.params.id);
7263
+ if (!stored) {
7264
+ jsonError(res, "Extension not found", 404);
7265
+ return true;
7266
+ }
7267
+ const principal = await requirePermission(req, res, agentId, "extension.write", {
7268
+ kind: "extension",
7269
+ extensionId: stored.id,
7270
+ createdByAgentId: stored.createdByAgentId
7271
+ });
7240
7272
  if (!principal)
7241
7273
  return true;
7242
7274
  const writerAgentId = principal.kind === "agent" ? principal.agentId : undefined;
7243
- const stored = parsed.body.config ? await getExtensionById(parsed.params.id) : null;
7244
- const config = parsed.body.config && stored ? preserveRedactedConfigValues(parsed.body.config, stored.configJson) : parsed.body.config;
7245
- let extension = await updateExtensionMeta(parsed.params.id, {
7246
- ...parsed.body,
7247
- ...config === undefined ? {} : { config },
7248
- updatedBy: await resolveHttpAuditUserId(req, writerAgentId)
7249
- });
7275
+ const ownerOnly = ownerOnlyAgentId(principal);
7276
+ if (stored.enabled && ownerOnly && !await requirePermission(req, res, agentId, "extension.activate")) {
7277
+ return true;
7278
+ }
7279
+ const config = parsed.body.config ? preserveRedactedConfigValues(parsed.body.config, stored.configJson) : parsed.body.config;
7280
+ let extension;
7281
+ try {
7282
+ extension = await updateExtensionMeta(parsed.params.id, {
7283
+ ...parsed.body,
7284
+ ...config === undefined ? {} : { config },
7285
+ updatedBy: await resolveHttpAuditUserId(req, writerAgentId),
7286
+ ownerOnly
7287
+ });
7288
+ } catch (error) {
7289
+ respondLifecycleError(res, error);
7290
+ return true;
7291
+ }
7250
7292
  if (!extension) {
7251
7293
  jsonError(res, "Extension not found", 404);
7252
7294
  return true;
@@ -7266,19 +7308,29 @@ async function handleExtensions(req, res, pathSegments, queryParams, agentId) {
7266
7308
  const parsed = await deleteRoute.parse(req, res, pathSegments, queryParams);
7267
7309
  if (!parsed)
7268
7310
  return true;
7269
- const principal = await requirePermission(req, res, agentId, "extension.write");
7270
- if (!principal)
7271
- return true;
7272
- const extension = await getExtensionById(parsed.params.id);
7273
- if (!extension) {
7311
+ const stored = await getExtensionById(parsed.params.id);
7312
+ if (!stored) {
7274
7313
  jsonError(res, "Extension not found", 404);
7275
7314
  return true;
7276
7315
  }
7316
+ const principal = await requirePermission(req, res, agentId, "extension.write", {
7317
+ kind: "extension",
7318
+ extensionId: stored.id,
7319
+ createdByAgentId: stored.createdByAgentId
7320
+ });
7321
+ if (!principal)
7322
+ return true;
7323
+ const extension = stored;
7277
7324
  if (extension.enabled) {
7278
7325
  jsonError(res, "Disable the extension before uninstalling it", 409);
7279
7326
  return true;
7280
7327
  }
7281
- await deleteExtension(extension.id);
7328
+ try {
7329
+ await deleteExtension(extension.id, ownerOnlyAgentId(principal));
7330
+ } catch (error) {
7331
+ respondLifecycleError(res, error);
7332
+ return true;
7333
+ }
7282
7334
  deleteRoute.respond(res, 200, { deleted: true });
7283
7335
  return true;
7284
7336
  }
@@ -22226,6 +22278,7 @@ async function handleStats(req, res, pathSegments, queryParams, myAgentId) {
22226
22278
  // src/http/status.ts
22227
22279
  init_zod();
22228
22280
  init_db();
22281
+ init_config();
22229
22282
  init_types();
22230
22283
  var SetupMilestoneStateSchema = exports_external.enum(["unverified", "configured", "verified"]);
22231
22284
  var SetupMilestoneIdSchema = exports_external.enum([
@@ -22442,21 +22495,31 @@ function embeddingsMilestone() {
22442
22495
  };
22443
22496
  }
22444
22497
  function slackMilestone(state) {
22445
- const disable = process.env.SLACK_DISABLE;
22446
- const disabled = disable === "true" || disable === "1";
22498
+ const config = getSlackConfiguration();
22447
22499
  if (state === "unverified") {
22500
+ let hint;
22501
+ if (config.disabled) {
22502
+ hint = "Slack is explicitly disabled (SLACK_DISABLE=true).";
22503
+ } else if (!config.mode) {
22504
+ hint = "Invalid SLACK_MODE. Use socket or http.";
22505
+ } else if (config.mode === "http" && config.missingCredentials.length === 0) {
22506
+ hint = "HTTP credentials are configured, but HTTP ingress is unavailable until the receiver is installed.";
22507
+ } else {
22508
+ hint = `Set ${config.missingCredentials.join(" + ")} for Slack ${config.mode} mode.`;
22509
+ }
22448
22510
  return {
22449
22511
  id: "slack",
22450
- label: "Slack connected",
22512
+ label: "Slack configured",
22451
22513
  state: "unverified",
22452
- hint: disabled ? "Slack is explicitly disabled (SLACK_DISABLE=true)." : "Set SLACK_BOT_TOKEN + SLACK_APP_TOKEN to connect Slack.",
22514
+ hint,
22453
22515
  action_url: automationIntegrationFixUrl("slack")
22454
22516
  };
22455
22517
  }
22456
22518
  return {
22457
22519
  id: "slack",
22458
- label: "Slack connected",
22459
- state: "verified",
22520
+ label: "Slack configured",
22521
+ state: "configured",
22522
+ hint: config.mode === "http" ? "HTTP credentials are configured, but HTTP ingress is unavailable until the receiver is installed." : "Socket Mode credentials are configured; a live connection has not been verified.",
22460
22523
  action_url: automationIntegrationFixUrl("slack")
22461
22524
  };
22462
22525
  }
@@ -27466,7 +27529,7 @@ async function shutdown() {
27466
27529
  sessionsProcessed: getServerSessionsProcessed()
27467
27530
  });
27468
27531
  if (hasCapability("scheduling")) {
27469
- const { stopScheduler } = await import("./index-rnyahfn5.js");
27532
+ const { stopScheduler } = await import("./index-3mq6ce93.js");
27470
27533
  stopScheduler();
27471
27534
  }
27472
27535
  stopHeartbeat();
@@ -27474,7 +27537,7 @@ async function shutdown() {
27474
27537
  await stopScriptRunSupervisor();
27475
27538
  await stopSlackApp();
27476
27539
  if (process.env.OAUTH_KEEPALIVE_DISABLE !== "true") {
27477
- const { stopOAuthKeepalive } = await import("./keepalive-s3xpr7sw.js");
27540
+ const { stopOAuthKeepalive } = await import("./keepalive-9pfw7t02.js");
27478
27541
  await stopOAuthKeepalive();
27479
27542
  }
27480
27543
  stopOAuthPendingGc();
@@ -27542,15 +27605,15 @@ try {
27542
27605
  console.warn("[startup] CAPABILITIES upgrade seed failed (non-fatal):", err);
27543
27606
  }
27544
27607
  try {
27545
- const { seedPricingFromModelsDev } = await import("./seed-pricing-hf889enh.js");
27608
+ const { seedPricingFromModelsDev } = await import("./seed-pricing-jggk6rsy.js");
27546
27609
  seedPricingFromModelsDev();
27547
- const { startPricingRefreshLoop } = await import("./pricing-refresh-hb3691fd.js");
27610
+ const { startPricingRefreshLoop } = await import("./pricing-refresh-vetcm563.js");
27548
27611
  startPricingRefreshLoop();
27549
27612
  } catch (err) {
27550
27613
  console.error("[startup] Failed to seed pricing rows:", err);
27551
27614
  }
27552
27615
  try {
27553
- const { ensureRbacSeedsSynced } = await import("./rbac-roles-jh280k9g.js");
27616
+ const { ensureRbacSeedsSynced } = await import("./rbac-roles-cfzgr6r1.js");
27554
27617
  ensureRbacSeedsSynced();
27555
27618
  } catch (err) {
27556
27619
  console.error("[startup] Failed to sync RBAC seed rows:", err);
@@ -27558,7 +27621,7 @@ try {
27558
27621
  throw err;
27559
27622
  }
27560
27623
  try {
27561
- const { runAllSeeders } = await import("./index-tfsdxyv6.js");
27624
+ const { runAllSeeders } = await import("./index-0wzg3sp3.js");
27562
27625
  await runAllSeeders({ scriptEmbeddingMode: "skip" });
27563
27626
  } catch (err) {
27564
27627
  console.error("[startup] Failed to seed built-in entities:", err);
@@ -27612,36 +27675,36 @@ httpServer.listen(port, async () => {
27612
27675
  await initWorkflows();
27613
27676
  await startScriptRunSupervisor(getMcpBaseUrl());
27614
27677
  if (hasCapability("scheduling")) {
27615
- const { startScheduler } = await import("./index-rnyahfn5.js");
27616
- const { getExecutorRegistry: getExecutorRegistry2 } = await import("./index-jsw3aynb.js");
27678
+ const { startScheduler } = await import("./index-3mq6ce93.js");
27679
+ const { getExecutorRegistry: getExecutorRegistry2 } = await import("./index-42s7eezq.js");
27617
27680
  const intervalMs = Number(process.env.SCHEDULER_INTERVAL_MS) || 1e4;
27618
27681
  startScheduler(getExecutorRegistry2(), intervalMs, {
27619
27682
  runId: globalState.__runId
27620
27683
  });
27621
27684
  }
27622
27685
  if (!isEnvFlagEnabled("HEARTBEAT_DISABLE", false)) {
27623
- const { startHeartbeat } = await import("./index-sgk50mbg.js");
27686
+ const { startHeartbeat } = await import("./index-s37dbevy.js");
27624
27687
  const heartbeatMs = Number(process.env.HEARTBEAT_INTERVAL_MS) || 90000;
27625
27688
  startHeartbeat(heartbeatMs);
27626
27689
  }
27627
27690
  if (process.env.OAUTH_KEEPALIVE_DISABLE !== "true") {
27628
- const { startOAuthKeepalive } = await import("./keepalive-s3xpr7sw.js");
27691
+ const { startOAuthKeepalive } = await import("./keepalive-9pfw7t02.js");
27629
27692
  startOAuthKeepalive();
27630
27693
  }
27631
27694
  if (process.env.OAUTH_REFRESH_SWEEP_DISABLE !== "true") {
27632
- const { startOAuthRefreshSweep } = await import("./oauth-refresh-sweep-q0t3bxre.js");
27695
+ const { startOAuthRefreshSweep } = await import("./oauth-refresh-sweep-5fwa7th2.js");
27633
27696
  startOAuthRefreshSweep();
27634
27697
  }
27635
27698
  startOAuthPendingGc();
27636
27699
  await startMemoryGc();
27637
27700
  await startDbRetention();
27638
- import("./boot-reembed-je26h5y7.js").then(({ runBootReembed }) => runBootReembed()).catch((err) => {
27701
+ import("./boot-reembed-c98xrad3.js").then(({ runBootReembed }) => runBootReembed()).catch((err) => {
27639
27702
  console.error("[boot-reembed] startup backfill failed (non-fatal):", err);
27640
27703
  });
27641
- import("./boot-reembed-1qmybsd4.js").then(({ runBootReembedScripts }) => runBootReembedScripts()).catch((err) => {
27704
+ import("./boot-reembed-zt3qm9xn.js").then(({ runBootReembedScripts }) => runBootReembedScripts()).catch((err) => {
27642
27705
  console.error("[boot-reembed-scripts] startup backfill failed (non-fatal):", err);
27643
27706
  });
27644
- import("./boot-scrub-logs-gte3h1mm.js").then(({ runBootScrubLogs }) => runBootScrubLogs()).catch((err) => {
27707
+ import("./boot-scrub-logs-jcqd8ksj.js").then(({ runBootScrubLogs }) => runBootScrubLogs()).catch((err) => {
27645
27708
  console.error("[boot-scrub-logs] startup scrub failed (non-fatal):", err);
27646
27709
  });
27647
27710
  }).on("error", (err) => {