@desplega.ai/agent-swarm 1.162.0 → 1.164.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 (240) hide show
  1. package/README.md +2 -1
  2. package/dist/{acp-adapter-74m73ae9.js → acp-adapter-8t22d18g.js} +2 -2
  3. package/dist/{actions-4sr14gnt.js → actions-49xrhww7.js} +32 -29
  4. package/dist/amp-adapter-p230tajt.js +34 -0
  5. package/dist/{anthropic-messages-8xxrzky9.js → anthropic-messages-hst62ws9.js} +3 -3
  6. package/dist/{app-pt68fbwp.js → app-tgzw3f3d.js} +11 -10
  7. package/dist/{assistant-cv3jytks.js → assistant-dgfjm07j.js} +33 -30
  8. package/dist/{azure-openai-responses-f5cqsyj8.js → azure-openai-responses-mh8tvf78.js} +9 -68
  9. package/dist/{boot-reembed-4ht4gqth.js → boot-reembed-0qzs614r.js} +13 -12
  10. package/dist/{boot-reembed-nxpcvpj9.js → boot-reembed-dgp6peyx.js} +12 -11
  11. package/dist/{boot-scrub-logs-k93kyw8k.js → boot-scrub-logs-fxnk021a.js} +10 -9
  12. package/dist/{boot-seeds-1skcrs0e.js → boot-seeds-xe7adjvm.js} +14 -13
  13. package/dist/{claude-adapter-r5g0tzge.js → claude-adapter-hx0n8a31.js} +22 -20
  14. package/dist/{claude-managed-adapter-yxkfxg8j.js → claude-managed-adapter-hskapeen.js} +3 -3
  15. package/dist/{claude-managed-setup-pkyrgshb.js → claude-managed-setup-p7mt6dfq.js} +1 -1
  16. package/dist/{claude-sdk-session-jxyxnrwd.js → claude-sdk-session-d61a9c8x.js} +22 -20
  17. package/dist/{cli-twrh04ap.js → cli-0y30kqz4.js} +3 -3
  18. package/dist/{cli-5xhpb3kv.js → cli-0z9dj97t.js} +9 -9
  19. package/dist/{cli-t845n9xk.js → cli-1nzb8ftr.js} +2 -2
  20. package/dist/{cli-kdkwd3yr.js → cli-1wd1n2ya.js} +38 -10
  21. package/dist/{cli-vxe6qa4h.js → cli-23az412e.js} +1 -1
  22. package/dist/{cli-bsky8g7w.js → cli-26x4d89j.js} +1 -1
  23. package/dist/{cli-swfmp1fx.js → cli-2ar0x7cz.js} +9 -9
  24. package/dist/cli-2ksgp01n.js +933 -0
  25. package/dist/{cli-rnyzn44p.js → cli-2zhhnz2h.js} +1 -1
  26. package/dist/{cli-vc9bp061.js → cli-3qaw32we.js} +5 -5
  27. package/dist/{cli-vy3ed88x.js → cli-402m8btc.js} +31 -3
  28. package/dist/{cli-5bcd7sfy.js → cli-43fh8fzw.js} +3 -3
  29. package/dist/{cli-5k6k8ta3.js → cli-4f7s6k3q.js} +13 -5
  30. package/dist/{cli-sqvfa090.js → cli-4ntg6tkp.js} +6 -5
  31. package/dist/{cli-kh04eqwe.js → cli-4y9bnpvy.js} +1 -1
  32. package/dist/{cli-qjjvzwzd.js → cli-5c2j5yvx.js} +1 -1
  33. package/dist/{cli-2zy95vhm.js → cli-6891ft0y.js} +2 -2
  34. package/dist/{cli-tre4bdgq.js → cli-6behs2bt.js} +1 -1
  35. package/dist/cli-7mm2r1kp.js +17 -0
  36. package/dist/cli-7xcgj20z.js +68 -0
  37. package/dist/{cli-4cwxn7gp.js → cli-812vt3ht.js} +2 -2
  38. package/dist/{cli-mbssg1xv.js → cli-8kt0bmgx.js} +1 -1
  39. package/dist/{cli-wjgs5wxe.js → cli-8rpq35c0.js} +7 -7
  40. package/dist/{cli-jxs2ygaw.js → cli-9m8fk2v7.js} +74 -29
  41. package/dist/{cli-pkd6s2wy.js → cli-9q3wt23f.js} +2 -2
  42. package/dist/{cli-s3hwpt9v.js → cli-9s6fsg07.js} +30 -10
  43. package/dist/{cli-xqpk3rp7.js → cli-9x3bwfd3.js} +28 -5
  44. package/dist/{cli-qrgt5bqf.js → cli-agamgm0p.js} +1 -1
  45. package/dist/{cli-13hw4z91.js → cli-b0f70z24.js} +1 -1
  46. package/dist/{cli-gpqpmns7.js → cli-cgrvsz2t.js} +2 -2
  47. package/dist/{cli-2hhfhfq5.js → cli-cn53e7vc.js} +8 -1
  48. package/dist/{cli-p0r8sxj5.js → cli-crjazzsg.js} +222 -4
  49. package/dist/{cli-tcen9p5w.js → cli-d37n8b7c.js} +5 -5
  50. package/dist/{cli-wxkkd0e0.js → cli-dgh781z9.js} +3 -3
  51. package/dist/cli-dsdg2wrk.js +516 -0
  52. package/dist/{cli-q24re23n.js → cli-e2xnc4m5.js} +4 -4
  53. package/dist/{cli-f7kvq46p.js → cli-erxeg64j.js} +20 -0
  54. package/dist/{cli-8ev9xqnx.js → cli-fajbc7sa.js} +17 -219
  55. package/dist/{cli-g739zqzt.js → cli-fj86xr3c.js} +2 -2
  56. package/dist/{cli-zvhd3f64.js → cli-fpbvcf55.js} +3 -3
  57. package/dist/{cli-kp42yek0.js → cli-fyra5y8k.js} +424 -71
  58. package/dist/{cli-jyy6pm2f.js → cli-g3qgrzck.js} +15 -3
  59. package/dist/{cli-eg0b3p0k.js → cli-g5erf0zt.js} +23 -14
  60. package/dist/{cli-cvatsam7.js → cli-gcvzvq3e.js} +4 -4
  61. package/dist/{cli-89s4ngw3.js → cli-gvcgmx69.js} +1 -1
  62. package/dist/{cli-7tre70zp.js → cli-j261c831.js} +138 -128
  63. package/dist/{cli-sptrj5f5.js → cli-j3me0jw2.js} +2 -2
  64. package/dist/{cli-zxqx25nz.js → cli-k6w44yvq.js} +6 -6
  65. package/dist/cli-ndx5yz5n.js +3299 -0
  66. package/dist/{cli-ykk5jaax.js → cli-nexwh8zg.js} +34 -29
  67. package/dist/{cli-rfjw9jw2.js → cli-ng97fjq7.js} +2 -2
  68. package/dist/{cli-4x0csdjq.js → cli-ngne1dng.js} +2 -2
  69. package/dist/{cli-4dcpaefp.js → cli-pfzrhb8n.js} +2 -2
  70. package/dist/{cli-hb5c2x5y.js → cli-q38n4bq0.js} +2 -2
  71. package/dist/{cli-cebmgwsc.js → cli-r109nq7n.js} +4 -4
  72. package/dist/{cli-nq7yqw7b.js → cli-t7g0vmtc.js} +4 -4
  73. package/dist/{cli-jf7wmv1r.js → cli-tsvj33y0.js} +58 -19
  74. package/dist/{cli-7af8yhav.js → cli-vbr859rz.js} +7 -4
  75. package/dist/{cli-nt8hecg9.js → cli-wk3v6h55.js} +67 -38
  76. package/dist/{cli-vyqs9ya8.js → cli-wwvk0tsy.js} +7 -7
  77. package/dist/{cli-rj0gqwwp.js → cli-y2de3bzp.js} +1 -1
  78. package/dist/{cli-hmsw1gpy.js → cli-y74170pb.js} +4 -4
  79. package/dist/cli-ydt3zkwv.js +70 -0
  80. package/dist/{cli-xk79303e.js → cli-yj790e19.js} +9 -1
  81. package/dist/cli-zt3w1cn1.js +137 -0
  82. package/dist/{cli-trc24wk2.js → cli-zxg80zs9.js} +1 -1
  83. package/dist/cli.js +23 -22
  84. package/dist/{cloudflare-workers-ai-system-one-k8ddqjkq.js → cloudflare-workers-ai-system-one-tt484t61.js} +2 -2
  85. package/dist/{codex-adapter-esvmnhn7.js → codex-adapter-e3pky8aj.js} +14 -13
  86. package/dist/{codex-hook-m73jmqgx.js → codex-hook-b1fb7c2k.js} +4 -3
  87. package/dist/{codex-session-runner-ban9excr.js → codex-session-runner-1gq27w2t.js} +14 -13
  88. package/dist/{commands-75413p2n.js → commands-q07ezjzn.js} +10 -9
  89. package/dist/cursor-adapter-50cz7yba.js +32 -0
  90. package/dist/{db-7f5pecwg.js → db-wwt0sq9q.js} +18 -9
  91. package/dist/{dispatcher-fh9at8nz.js → dispatcher-wrg35vdd.js} +31 -28
  92. package/dist/{dsh-adapter-wpze65d4.js → dsh-adapter-sa6rxfpc.js} +6 -6
  93. package/dist/{e2b-gjgdjp91.js → e2b-v5np73yj.js} +4 -4
  94. package/dist/{easter-egg-3d-3w5c2n4c.js → easter-egg-3d-h2hx9b64.js} +2 -2
  95. package/dist/{event-bus-sfx8dx3t.js → event-bus-vkbhzt4n.js} +1 -1
  96. package/dist/{execute-f50wg9nh.js → execute-6gczxy8v.js} +42 -13
  97. package/dist/{google-generative-ai-jxxpnegy.js → google-generative-ai-d6nphg3q.js} +3 -3
  98. package/dist/{google-vertex-x7q1angm.js → google-vertex-cpshkref.js} +3 -3
  99. package/dist/{handlers-w13787bb.js → handlers-rv3gxvsp.js} +34 -31
  100. package/dist/{hook-46g1jrvx.js → hook-bcf5m80y.js} +15 -13
  101. package/dist/{hook-4tpts2ry.js → hook-z8b1jm2d.js} +16 -14
  102. package/dist/{http-19pzbfrt.js → http-56f7yt97.js} +932 -134
  103. package/dist/{index-scptvdxg.js → index-0kncjnrm.js} +30 -23
  104. package/dist/{index-dqmp15bq.js → index-1e6cg96n.js} +31 -28
  105. package/dist/{index-qb4q1y3e.js → index-8xgdb3k8.js} +31 -28
  106. package/dist/index-adw4zr9j.js +1020 -0
  107. package/dist/{index-h5gs261z.js → index-etdrp7yp.js} +140 -140
  108. package/dist/{index-8fd4dm4h.js → index-f9zscmft.js} +32 -29
  109. package/dist/index-fdk1t4d6.js +91297 -0
  110. package/dist/{index-s75wc4wd.js → index-jvb37h77.js} +12 -11
  111. package/dist/{keepalive-xa5ts9cd.js → keepalive-rp8daj4s.js} +12 -11
  112. package/dist/{lead-qp4xkvjq.js → lead-dfp77erc.js} +45 -40
  113. package/dist/{maintenance-rm5885hm.js → maintenance-wtmw3jqv.js} +13 -12
  114. package/dist/{mistral-conversations-rw7fbt22.js → mistral-conversations-8445ddjn.js} +2 -2
  115. package/dist/{oauth-refresh-sweep-1csdfebf.js → oauth-refresh-sweep-yhzqt95v.js} +11 -10
  116. package/dist/{onboard-r6b78cs4.js → onboard-9z8rwbcy.js} +2 -2
  117. package/dist/{openai-codex-responses-efvrgrq3.js → openai-codex-responses-9ynm88zy.js} +3 -3
  118. package/dist/{openai-completions-bbbrrz4z.js → openai-completions-nhqwjmaw.js} +2 -2
  119. package/dist/{openai-responses-9jjyrcm1.js → openai-responses-xx1c4kgm.js} +3 -3
  120. package/dist/{opencode-adapter-kb3g6pkf.js → opencode-adapter-1nxb6555.js} +5 -5
  121. package/dist/{otel-impl-0y9knpky.js → otel-impl-b83gaxw2.js} +1 -1
  122. package/dist/{pi-mono-adapter-z6s1bme2.js → pi-mono-adapter-ddxz8pjp.js} +18 -17
  123. package/dist/{pricing-refresh-mth26tgp.js → pricing-refresh-tmjvazb6.js} +12 -11
  124. package/dist/{rbac-roles-kwntb23q.js → rbac-roles-pa0gzjws.js} +11 -10
  125. package/dist/{rbac-roles-vpk4ebm8.js → rbac-roles-rhexa9s2.js} +12 -11
  126. package/dist/{render-v2-hcm7h00y.js → render-v2-ask84n8y.js} +11 -10
  127. package/dist/{runtime-vfjsfsc5.js → runtime-ckjnj3vf.js} +4 -4
  128. package/dist/{setup-hbyzd65h.js → setup-5ga5gdsy.js} +2 -2
  129. package/dist/{typesafe-system-one-2ef30pec.js → typesafe-system-one-datfr82p.js} +2 -2
  130. package/dist/{virtual-modules-9bv7ry91.js → virtual-modules-bmp3zwjf.js} +12 -11
  131. package/dist/{work-objects-m09sxnhe.js → work-objects-snnh0t7j.js} +34 -31
  132. package/dist/{worker-0h35rvk4.js → worker-rxyymrhb.js} +45 -40
  133. package/openapi.json +997 -39
  134. package/package.json +6 -5
  135. package/src/be/db/active-sessions.ts +30 -0
  136. package/src/be/db/approvals.ts +54 -0
  137. package/src/be/db.ts +25 -4
  138. package/src/be/mcp-server-checked-update.ts +34 -0
  139. package/src/be/mcp-server-stdio-gate.ts +34 -0
  140. package/src/be/memory/key-browser.ts +304 -0
  141. package/src/be/memory/providers/sqlite-store.ts +16 -3
  142. package/src/be/migrations/194_memory_orphan_chunks.sql +15 -0
  143. package/src/be/migrations/195_approval_request_approvals.sql +6 -0
  144. package/src/be/model-validation.ts +12 -2
  145. package/src/be/multi-runtime.ts +4 -3
  146. package/src/be/pricing-normalize.ts +11 -0
  147. package/src/be/repo-checked-update.ts +37 -0
  148. package/src/be/repo-merge-policy.ts +15 -0
  149. package/src/be/seed-pricing.ts +48 -1
  150. package/src/be/swarm-config-guard.ts +1 -0
  151. package/src/commands/provider-credentials.ts +44 -2
  152. package/src/extensions/contract-types.generated.ts +1 -1
  153. package/src/extensions/contract.ts +100 -0
  154. package/src/extensions/dispatcher.ts +19 -0
  155. package/src/extensions/post-bridge.ts +191 -0
  156. package/src/github/handlers.ts +128 -2
  157. package/src/gitlab/workflow-action-name.ts +15 -0
  158. package/src/heartbeat/heartbeat.ts +4 -3
  159. package/src/http/active-sessions.ts +6 -5
  160. package/src/http/agents.ts +10 -1
  161. package/src/http/approval-requests.ts +271 -35
  162. package/src/http/index.ts +1 -1
  163. package/src/http/mcp-servers.ts +74 -50
  164. package/src/http/memory.ts +275 -6
  165. package/src/http/repos.ts +58 -18
  166. package/src/http/request-principal.ts +19 -0
  167. package/src/http/session-cost-recompute.ts +64 -0
  168. package/src/http/session-data.ts +11 -0
  169. package/src/http/tasks.ts +9 -1
  170. package/src/http/webhooks.ts +17 -5
  171. package/src/prompts/base-prompt.ts +9 -4
  172. package/src/prompts/resolver.ts +1 -1
  173. package/src/prompts/session-templates.ts +28 -0
  174. package/src/providers/amp-adapter.ts +1232 -0
  175. package/src/providers/cursor-adapter.ts +638 -0
  176. package/src/providers/index.ts +9 -1
  177. package/src/providers/pricing-sources.md +39 -0
  178. package/src/providers/reasoning-effort.ts +15 -1
  179. package/src/providers/types.ts +11 -1
  180. package/src/rbac/legacy-policy.ts +23 -8
  181. package/src/rbac/permissions.ts +27 -1
  182. package/src/scripts-runtime/types/swarm-extension.d.ts +119 -0
  183. package/src/tests/amp-adapter.test.ts +822 -0
  184. package/src/tests/amp-budget-export-failed.test.ts +133 -0
  185. package/src/tests/amp-pricing-helpers.ts +16 -0
  186. package/src/tests/amp-pricing.test.ts +218 -0
  187. package/src/tests/api-drain-worker-e2e.test.ts +18 -7
  188. package/src/tests/approval-respond-auth.test.ts +371 -0
  189. package/src/tests/base-prompt.test.ts +13 -0
  190. package/src/tests/claude-adapter-binary.test.ts +24 -0
  191. package/src/tests/claude-adapter.test.ts +8 -0
  192. package/src/tests/cursor-adapter.test.ts +690 -0
  193. package/src/tests/db-task-read-contract.test.ts +5 -0
  194. package/src/tests/db-task-write-contract.test.ts +5 -0
  195. package/src/tests/docs-index-footprint.test.js +3 -3
  196. package/src/tests/extensions-post-bridge.test.ts +669 -0
  197. package/src/tests/extensions-run-context.test.ts +61 -0
  198. package/src/tests/fixtures/fake-amp.ts +304 -0
  199. package/src/tests/github-handlers-inline-comments.test.ts +147 -1
  200. package/src/tests/gitlab-workflow-event-names.test.ts +136 -0
  201. package/src/tests/mcp-input-ergonomics.test.ts +15 -10
  202. package/src/tests/mcp-server-stdio-gate.test.ts +438 -0
  203. package/src/tests/memory-http-access.test.ts +221 -0
  204. package/src/tests/memory-keys-endpoint.test.ts +406 -0
  205. package/src/tests/memory-store.test.ts +166 -0
  206. package/src/tests/model-tier-resolution.test.ts +3 -3
  207. package/src/tests/pricing-refresh.test.ts +5 -4
  208. package/src/tests/prompt-template-session.test.ts +5 -3
  209. package/src/tests/provider-process-group.test.ts +41 -0
  210. package/src/tests/provider-registration.test.ts +3 -1
  211. package/src/tests/rbac-charact-misc-tools.test.ts +18 -3
  212. package/src/tests/rbac-engine.test.ts +15 -11
  213. package/src/tests/rbac-wire-e2e.test.ts +4 -9
  214. package/src/tests/repo-allow-merge-gate.test.ts +382 -0
  215. package/src/tests/script-connections.test.ts +4 -0
  216. package/src/tests/send-task-requester-gate.test.ts +260 -0
  217. package/src/tests/session-activity-liveness.test.ts +248 -0
  218. package/src/tests/session-costs-golden.test.ts +28 -0
  219. package/src/tests/webhooks-task-blocked.test.ts +4 -4
  220. package/src/tests/write-gate.ts +68 -0
  221. package/src/tests/x402-client.test.ts +124 -0
  222. package/src/tests/x402-spending-tracker.test.ts +66 -0
  223. package/src/tools/mcp-servers/mcp-server-create.ts +23 -1
  224. package/src/tools/mcp-servers/mcp-server-update.ts +46 -28
  225. package/src/tools/memory-delete.ts +3 -3
  226. package/src/tools/repos/update-repo.ts +26 -5
  227. package/src/tools/send-task.ts +24 -1
  228. package/src/tools/steer-task.ts +1 -1
  229. package/src/types.ts +37 -2
  230. package/src/utils/amp-models.ts +114 -0
  231. package/src/utils/credentials.ts +8 -0
  232. package/src/utils/process-group.ts +79 -0
  233. package/src/workflows/event-bus.ts +28 -0
  234. package/src/x402/client.ts +36 -14
  235. package/src/x402/spending-tracker.ts +64 -3
  236. package/templates/skills/agent-browser/SKILL.md +5 -0
  237. package/templates/skills/agent-browser/content.md +5 -0
  238. package/templates/skills/heartbeat-runbook/content.md +1 -0
  239. package/templates/skills/swarm-extensions/content.md +4 -0
  240. package/dist/cli-y89t4nca.js +0 -67
@@ -13,7 +13,7 @@ import {
13
13
  parseClaudeMdPendingRecord,
14
14
  planClaudeMdSync,
15
15
  withFileLock
16
- } from "./cli-cebmgwsc.js";
16
+ } from "./cli-r109nq7n.js";
17
17
  import {
18
18
  init_secret_scrubber,
19
19
  scrubSecrets
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  resolveSlackUserId,
3
3
  rewriteSlackMentions
4
- } from "./cli-gpqpmns7.js";
4
+ } from "./cli-cgrvsz2t.js";
5
5
  import {
6
6
  bufferedFileFailures,
7
7
  buildEffectiveText,
@@ -11,7 +11,7 @@ import {
11
11
  fetchSlackFiles,
12
12
  findUserByExternalId,
13
13
  notifySlackFileFailures
14
- } from "./cli-kp42yek0.js";
14
+ } from "./cli-fyra5y8k.js";
15
15
  import {
16
16
  buildBufferFlushBlocks,
17
17
  ensureSlackThreadTree,
@@ -20,7 +20,7 @@ import {
20
20
  getSlackApp,
21
21
  isSlackRenderV2Enabled,
22
22
  registerTreeMessage
23
- } from "./cli-swfmp1fx.js";
23
+ } from "./cli-2ar0x7cz.js";
24
24
  import {
25
25
  createLogEntry,
26
26
  getAgentById,
@@ -33,11 +33,11 @@ import {
33
33
  init_steering,
34
34
  requestSteering,
35
35
  slackContextKey
36
- } from "./cli-jf7wmv1r.js";
36
+ } from "./cli-tsvj33y0.js";
37
37
  import {
38
38
  init_steering_enabled,
39
39
  isSteeringEnabled
40
- } from "./cli-eg0b3p0k.js";
40
+ } from "./cli-7mm2r1kp.js";
41
41
  import {
42
42
  __callDispose,
43
43
  __using
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getDb,
3
3
  init_db
4
- } from "./cli-jf7wmv1r.js";
4
+ } from "./cli-tsvj33y0.js";
5
5
 
6
6
  // src/be/seed-pricing.ts
7
7
  init_db();
@@ -42,8 +42,11 @@ var ROUTING_PREFIXES_BY_PROVIDER = {
42
42
  devin: [],
43
43
  gemini: [],
44
44
  acp: [],
45
- dsh: ["openrouter/"]
45
+ dsh: ["openrouter/"],
46
+ amp: ["anthropic/", "openai/", "google-vertex/", "google/"],
47
+ cursor: []
46
48
  };
49
+ var AMP_DATED_SUFFIX = /-\d{4}-\d{2}-\d{2}$/;
47
50
  function normalizeModelKey(provider, model) {
48
51
  if (!model)
49
52
  return model;
@@ -55,6 +58,8 @@ function normalizeModelKey(provider, model) {
55
58
  break;
56
59
  }
57
60
  }
61
+ if (provider === "amp")
62
+ key = key.replace(AMP_DATED_SUFFIX, "");
58
63
  return key;
59
64
  }
60
65
 
@@ -106,6 +111,10 @@ var ANTHROPIC_SHORTNAME_PRICING_FALLBACKS = {
106
111
  "claude-fable-5-1": { input: 10, output: 50, cache_read: 0.25, cache_write: 12.5 },
107
112
  "claude-mythos-5-1": { input: 10, output: 50, cache_read: 0.25, cache_write: 12.5 }
108
113
  };
114
+ var CURSOR_FIRST_PARTY_PRICING = {
115
+ "composer-2.5": { input: 3, output: 15, cache_read: 0.5 },
116
+ "composer-2": { input: 3, output: 15, cache_read: 0.5 }
117
+ };
109
118
  function projectCostBlock(provider, model, cost, opts = {}) {
110
119
  const key = normalizeModelKey(provider, model);
111
120
  const rows = [];
@@ -172,6 +181,15 @@ function buildModelsDevSeedRows(cache) {
172
181
  rows.push(row);
173
182
  }
174
183
  }
184
+ for (const section of ["anthropic", "openai", "google", "fireworks-ai"]) {
185
+ for (const [id, model] of Object.entries(cache[section]?.models ?? {})) {
186
+ if (!model?.cost)
187
+ continue;
188
+ for (const row of projectCostBlock("amp", id, model.cost)) {
189
+ rows.push(row);
190
+ }
191
+ }
192
+ }
175
193
  const openai = cache.openai?.models ?? {};
176
194
  for (const [id, model] of Object.entries(openai)) {
177
195
  if (!model?.cost)
@@ -183,6 +201,15 @@ function buildModelsDevSeedRows(cache) {
183
201
  rows.push(row);
184
202
  }
185
203
  }
204
+ for (const vendor of ["openai", "anthropic", "google", "xai"]) {
205
+ for (const [id, model] of Object.entries(cache[vendor]?.models ?? {})) {
206
+ if (!model?.cost)
207
+ continue;
208
+ for (const row of projectCostBlock("cursor", id, model.cost, { anthropicBilled: false })) {
209
+ rows.push(row);
210
+ }
211
+ }
212
+ }
186
213
  const deepseek = cache.deepseek?.models ?? {};
187
214
  for (const [id, model] of Object.entries(deepseek)) {
188
215
  if (!model?.cost)
@@ -222,13 +249,14 @@ function buildModelsDevSeedRows(cache) {
222
249
  }
223
250
  function buildPricingSeedRows(cache) {
224
251
  const modelsdevRows = cache ? buildModelsDevSeedRows(cache) : [];
252
+ const cursorRows = Object.entries(CURSOR_FIRST_PARTY_PRICING).flatMap(([model, cost]) => projectCostBlock("cursor", model, cost, { anthropicBilled: false }));
225
253
  const manualRows = MANUAL_PRICING_OVERRIDES.map((override) => ({
226
254
  provider: override.provider,
227
255
  model: override.model,
228
256
  tokenClass: override.tokenClass,
229
257
  pricePerMillionUsd: override.pricePerMillionUsd
230
258
  }));
231
- return [...modelsdevRows, ...manualRows];
259
+ return [...modelsdevRows, ...cursorRows, ...manualRows];
232
260
  }
233
261
  function seedPricingFromModelsDev(opts) {
234
262
  const db = getDb();
@@ -11,13 +11,13 @@ import {
11
11
  builtinModels,
12
12
  normalizeRadiusGatewayUrl,
13
13
  registerBundledOAuthFlowLoaders
14
- } from "./cli-nt8hecg9.js";
14
+ } from "./cli-wk3v6h55.js";
15
15
  import {
16
16
  getEnvApiKey
17
- } from "./cli-trc24wk2.js";
17
+ } from "./cli-zxg80zs9.js";
18
18
  import {
19
19
  InMemoryCredentialStore
20
- } from "./cli-ykk5jaax.js";
20
+ } from "./cli-nexwh8zg.js";
21
21
  import {
22
22
  getProviderEnvValue
23
23
  } from "./cli-btbzvq95.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  contentSha256,
3
3
  init_profile_sync
4
- } from "./cli-cebmgwsc.js";
4
+ } from "./cli-r109nq7n.js";
5
5
  import {
6
6
  getDb,
7
7
  getDbClient,
8
8
  init_db,
9
9
  isSqliteVecAvailable
10
- } from "./cli-jf7wmv1r.js";
10
+ } from "./cli-tsvj33y0.js";
11
11
  import {
12
12
  __esm,
13
13
  __export,
@@ -9107,9 +9107,17 @@ class SqliteMemoryStore {
9107
9107
  await this.deleteFtsRows(ids);
9108
9108
  }
9109
9109
  async delete(id) {
9110
- await this.purgeByIds([id]);
9111
- const result = await getDbClient().run("DELETE FROM agent_memory WHERE id = ?", [id]);
9112
- return result.changes > 0;
9110
+ return getDbClient().transaction(async (tx) => {
9111
+ const row = await tx.get("SELECT * FROM agent_memory WHERE id = ?", [id]);
9112
+ if (!row)
9113
+ return false;
9114
+ const rows = row.key ? await tx.query("SELECT id FROM agent_memory WHERE key = ? AND scope = ? AND COALESCE(agentId, '') = COALESCE(?, '')", [row.key, row.scope, row.agentId]) : [{ id }];
9115
+ const ids = rows.map((chunk) => chunk.id);
9116
+ await this.purgeByIds(ids);
9117
+ const placeholders = ids.map(() => "?").join(",");
9118
+ await tx.run(`DELETE FROM agent_memory WHERE id IN (${placeholders})`, ids);
9119
+ return true;
9120
+ });
9113
9121
  }
9114
9122
  async deleteBySourcePath(sourcePath, agentId) {
9115
9123
  const db = getDbClient();
@@ -7,7 +7,7 @@ var package_default;
7
7
  var init_package = __esm(() => {
8
8
  package_default = {
9
9
  name: "@desplega.ai/agent-swarm",
10
- version: "1.162.0",
10
+ version: "1.164.0",
11
11
  description: "agent-swarm.dev — an open-source operating system for AI work: a lead agent breaks goals into tasks, routes them to specialized workers such as Claude Code or Codex, runs each worker in an isolated container, and preserves shared memory, tools, schedules, and review gates so delegated work compounds across sessions.",
12
12
  keywords: [
13
13
  "agent-swarm.dev",
@@ -207,15 +207,16 @@ var init_package = __esm(() => {
207
207
  "@anthropic-ai/sdk": "^0.131.0",
208
208
  "@asteasolutions/zod-to-openapi": "^8.0.0",
209
209
  "@aws-sdk/client-bedrock": "3.1048.0",
210
+ "@cursor/sdk": "1.0.36",
210
211
  "@desplega.ai/business-use": "^0.4.2",
211
212
  "@desplega.ai/localtunnel": "^2.2.0",
212
- "@earendil-works/pi-agent-core": "^1.0.2",
213
- "@earendil-works/pi-ai": "^1.0.2",
214
- "@earendil-works/pi-coding-agent": "^1.0.2",
213
+ "@earendil-works/pi-agent-core": "^1.0.3",
214
+ "@earendil-works/pi-ai": "^1.0.3",
215
+ "@earendil-works/pi-coding-agent": "^1.0.3",
215
216
  "@inkjs/ui": "^2.0.0",
216
217
  "@linear/sdk": "^77.0.0",
217
218
  "@modelcontextprotocol/sdk": "1.29.0",
218
- "@openai/codex": "0.160.0",
219
+ "@openai/codex": "0.160.1",
219
220
  "@opencode-ai/sdk": "^1.18.34",
220
221
  "@openfort/openfort-node": "^0.9.1",
221
222
  "@opentelemetry/api": "^1.9.1",
@@ -7,7 +7,7 @@ import {
7
7
  init_date_utils,
8
8
  init_db,
9
9
  normalizeDateRequired
10
- } from "./cli-jf7wmv1r.js";
10
+ } from "./cli-tsvj33y0.js";
11
11
  import {
12
12
  init_secret_scrubber,
13
13
  registerVolatileSecret,
@@ -219,4 +219,4 @@ var init_resolver = __esm(() => {
219
219
  TEMPLATE_REF_REGEX = /\{\{@template\[([^\]]+)\]\}\}/g;
220
220
  });
221
221
 
222
- export { findInterpolationTokens, interpolate, deepInterpolate, init_template, registerTemplate, getTemplateDefinition, getAllTemplateDefinitions, init_registry, configureDbResolver, configureHttpResolver, resolveTemplate, resolveTemplateAsync, init_resolver };
222
+ export { findInterpolationTokens, interpolate, deepInterpolate, init_template, registerTemplate, getTemplateDefinition, getAllTemplateDefinitions, init_registry, configureDbResolver, configureHttpResolver, resolveTemplateFromCode, resolveTemplate, resolveTemplateAsync, init_resolver };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  PermissionVerbSchema,
3
3
  init_rbac
4
- } from "./cli-kdkwd3yr.js";
4
+ } from "./cli-1wd1n2ya.js";
5
5
  import {
6
6
  getDb,
7
7
  getDbClient,
8
8
  init_db
9
- } from "./cli-jf7wmv1r.js";
9
+ } from "./cli-tsvj33y0.js";
10
10
  import {
11
11
  init_env_flag,
12
12
  isEnvFlagEnabled
@@ -4,7 +4,7 @@ import {
4
4
  init_src,
5
5
  runtimeCatalogModel,
6
6
  runtimeCatalogSection
7
- } from "./cli-jyy6pm2f.js";
7
+ } from "./cli-g3qgrzck.js";
8
8
 
9
9
  // src/utils/context-window.ts
10
10
  init_src();
@@ -0,0 +1,17 @@
1
+ import {
2
+ init_env_flag,
3
+ parseEnvFlag
4
+ } from "./cli-ej6gbxfb.js";
5
+ import {
6
+ __esm
7
+ } from "./cli-bc05qbss.js";
8
+
9
+ // src/utils/steering-enabled.ts
10
+ function isSteeringEnabled(env = process.env) {
11
+ return parseEnvFlag(env.STEERING_ENABLED, true);
12
+ }
13
+ var init_steering_enabled = __esm(() => {
14
+ init_env_flag();
15
+ });
16
+
17
+ export { isSteeringEnabled, init_steering_enabled };
@@ -0,0 +1,68 @@
1
+ import {
2
+ DEFAULT_MODEL_TIER_MAP,
3
+ init_types
4
+ } from "./cli-9x3bwfd3.js";
5
+
6
+ // src/utils/amp-models.ts
7
+ init_types();
8
+ var AMP_MODES = ["low", "medium", "high", "ultra"];
9
+ var AMP_ESTIMATE_MODELS = {
10
+ low: "accounts/fireworks/models/glm-5p3-flash",
11
+ medium: "claude-opus-5-5",
12
+ high: "gpt-6-astra",
13
+ ultra: "claude-fable-5-1"
14
+ };
15
+ function ampBillsCacheWrites(model) {
16
+ return /^(anthropic\/)?claude/i.test(model);
17
+ }
18
+ var AMP_PIN_BASE_MODE = "medium";
19
+ var AMP_PIN_RE = /^[a-z0-9][a-z0-9._-]*\/[A-Za-z0-9][A-Za-z0-9._:/-]*$/;
20
+ var AMP_PIN_PROVIDERS = [
21
+ "anthropic",
22
+ "openai",
23
+ "vertexai",
24
+ "xai",
25
+ "fireworks",
26
+ "baseten"
27
+ ];
28
+ var AMP_CATALOG_CHECKED_PROVIDERS = new Set(["anthropic", "openai"]);
29
+ function splitPin(model) {
30
+ const value = model.trim();
31
+ const slash = value.indexOf("/");
32
+ return slash < 0 ? null : { value, provider: value.slice(0, slash), id: value.slice(slash + 1) };
33
+ }
34
+ function ampPinProviderError(model) {
35
+ const pin = splitPin(model);
36
+ if (!pin || AMP_PIN_PROVIDERS.includes(pin.provider))
37
+ return null;
38
+ return `Unknown amp model provider "${pin.provider}" in "${pin.value}". Amp runs pins from ${AMP_PIN_PROVIDERS.join(", ")}, or use a mode (${AMP_MODES.join(", ")}). If Amp has added this provider, set allowCustomModel: true.`;
39
+ }
40
+ function ampPinCatalogError(model, catalog) {
41
+ const pin = splitPin(model);
42
+ if (!pin || !AMP_CATALOG_CHECKED_PROVIDERS.has(pin.provider))
43
+ return null;
44
+ const models = catalog[pin.provider]?.models;
45
+ if (!models || Object.hasOwn(models, pin.id))
46
+ return null;
47
+ return `Unknown amp model "${pin.value}": ${pin.provider} has no model "${pin.id}" in the model catalog. To run it anyway, set allowCustomModel: true.`;
48
+ }
49
+ function ampModelError(model) {
50
+ const value = model.trim();
51
+ if (AMP_MODES.includes(value.toLowerCase()) || AMP_PIN_RE.test(value)) {
52
+ return null;
53
+ }
54
+ return `Unsupported amp model "${value}". Use a mode (${AMP_MODES.join(", ")}) or a provider/model id such as anthropic/claude-haiku-4-5-20251001.`;
55
+ }
56
+ function resolveAmpModel(model) {
57
+ const value = (model || DEFAULT_MODEL_TIER_MAP.amp.regular).trim();
58
+ const error = ampModelError(value);
59
+ if (error)
60
+ throw new Error(error);
61
+ const mode = value.toLowerCase();
62
+ if (AMP_MODES.includes(mode)) {
63
+ return { model: mode, baseMode: mode };
64
+ }
65
+ return { model: value, baseMode: AMP_PIN_BASE_MODE, pin: value };
66
+ }
67
+
68
+ export { AMP_ESTIMATE_MODELS, ampBillsCacheWrites, ampPinProviderError, ampPinCatalogError, ampModelError, resolveAmpModel };
@@ -2,13 +2,13 @@ import {
2
2
  mcpNamespace,
3
3
  require_proper_lockfile,
4
4
  validateMcpServerConfig
5
- } from "./cli-8ev9xqnx.js";
5
+ } from "./cli-fajbc7sa.js";
6
6
  import {
7
7
  CONFIG_DIR_NAME,
8
8
  canonicalizePath,
9
9
  resolvePath,
10
10
  stripBom
11
- } from "./cli-s3hwpt9v.js";
11
+ } from "./cli-9s6fsg07.js";
12
12
  import {
13
13
  __toESM
14
14
  } from "./cli-bc05qbss.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  clampThinkingLevel,
3
3
  getSystemMessageText
4
- } from "./cli-ykk5jaax.js";
4
+ } from "./cli-nexwh8zg.js";
5
5
 
6
6
  // node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.js
7
7
  class UnsupportedStrictJsonSchemaError extends Error {
@@ -5,12 +5,12 @@ import {
5
5
  instantFlush,
6
6
  requestSlackThreadSteering,
7
7
  wasEventSeen
8
- } from "./cli-vc9bp061.js";
8
+ } from "./cli-3qaw32we.js";
9
9
  import {
10
10
  enrichSlackUserEmail,
11
11
  resolveSlackUserId,
12
12
  rewriteSlackMentions
13
- } from "./cli-gpqpmns7.js";
13
+ } from "./cli-cgrvsz2t.js";
14
14
  import {
15
15
  TaskCreationBlockedError,
16
16
  broadcastMatches,
@@ -23,14 +23,14 @@ import {
23
23
  hasOtherUserMention,
24
24
  notifySlackFileFailures,
25
25
  routeMessage
26
- } from "./cli-kp42yek0.js";
26
+ } from "./cli-fyra5y8k.js";
27
27
  import {
28
28
  ackSlackMessage,
29
29
  buildTreeBlocks,
30
30
  ensureSlackThreadTree,
31
31
  isSlackRenderV2Enabled,
32
32
  registerTreeMessage
33
- } from "./cli-swfmp1fx.js";
33
+ } from "./cli-2ar0x7cz.js";
34
34
  import {
35
35
  getAgentById,
36
36
  getAgentWorkingOnThread,
@@ -43,11 +43,11 @@ import {
43
43
  isExtensionAgent,
44
44
  reactionName,
45
45
  slackContextKey
46
- } from "./cli-jf7wmv1r.js";
46
+ } from "./cli-tsvj33y0.js";
47
47
  import {
48
48
  init_resolver,
49
49
  resolveTemplate
50
- } from "./cli-qjjvzwzd.js";
50
+ } from "./cli-5c2j5yvx.js";
51
51
  import {
52
52
  init_env_flag,
53
53
  isEnvFlagEnabled
@@ -65,7 +65,7 @@ import {
65
65
  import {
66
66
  init_event_bus,
67
67
  workflowEventBus
68
- } from "./cli-f7kvq46p.js";
68
+ } from "./cli-erxeg64j.js";
69
69
  import {
70
70
  __callDispose,
71
71
  __using