@desplega.ai/agent-swarm 2.7.5 → 2.7.7

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 (319) hide show
  1. package/dist/{acp-adapter-g3ads55s.js → acp-adapter-7b4vk3h5.js} +5 -4
  2. package/dist/{actions-zwfykqqk.js → actions-3tt153af.js} +18 -17
  3. package/dist/{amp-adapter-z3s0ssdt.js → amp-adapter-njpts0yr.js} +1 -1
  4. package/dist/{anthropic-messages-x4q6rfq5.js → anthropic-messages-xey2skwx.js} +7 -7
  5. package/dist/{app-vmp4fgep.js → app-nky4378f.js} +3 -3
  6. package/dist/{assistant-vwde653f.js → assistant-jnb669pa.js} +24 -22
  7. package/dist/{azure-openai-responses-s1w5n70z.js → azure-openai-responses-26t7j9ra.js} +5 -5
  8. package/dist/{boot-reembed-375t7tbk.js → boot-reembed-9mgvaztt.js} +1 -1
  9. package/dist/{boot-reembed-gq9rcpnj.js → boot-reembed-qs2djdej.js} +1 -1
  10. package/dist/{boot-scrub-sweep-nd938kyf.js → boot-scrub-sweep-yjpdj7s1.js} +3 -3
  11. package/dist/{boot-seeds-aykx51v3.js → boot-seeds-5cm6ambd.js} +4 -4
  12. package/dist/{boxd-k1j26g3h.js → boxd-nv507va8.js} +5 -5
  13. package/dist/{claude-adapter-8j4hm099.js → claude-adapter-fn287zmm.js} +5 -4
  14. package/dist/{claude-managed-setup-0wyynpn1.js → claude-managed-setup-wtdz2mj2.js} +1 -1
  15. package/dist/{claude-sdk-session-q6wj5hmy.js → claude-sdk-session-x91kqyhm.js} +9677 -9514
  16. package/dist/{cli-j3jvnpe8.js → cli-08bmz9z9.js} +1 -1
  17. package/dist/{cli-gjr2y2xk.js → cli-0agcv1v5.js} +4 -1
  18. package/dist/{cli-y24sc29k.js → cli-1c6tzt8g.js} +30 -8
  19. package/dist/{cli-mjzynrse.js → cli-35rsp8ye.js} +1 -1
  20. package/dist/{cli-rpm2sgv0.js → cli-3fg0bdcv.js} +19 -2
  21. package/dist/{cli-nn4d8dne.js → cli-5b456bpf.js} +2 -2
  22. package/dist/{cli-bhjt02p8.js → cli-5jnhv72d.js} +1 -1
  23. package/dist/{cli-fqzx7gwa.js → cli-5zx699j9.js} +2 -2
  24. package/dist/{cli-hf6zt5m6.js → cli-69szn7w7.js} +17 -1
  25. package/dist/{cli-vqypxzh4.js → cli-6g0hb4cp.js} +8 -8
  26. package/dist/{cli-tqgg40ek.js → cli-6pfd54vx.js} +9 -8
  27. package/dist/{cli-bsn8nhrq.js → cli-6vcp76qk.js} +3 -3
  28. package/dist/{cli-zppwg9p9.js → cli-72v799xn.js} +1 -1
  29. package/dist/cli-82j36f2m.js +45 -0
  30. package/dist/{cli-hn9hxmz9.js → cli-8305gbq0.js} +29 -16
  31. package/dist/{cli-z8eh3ex8.js → cli-8sckt74b.js} +8 -8
  32. package/dist/{cli-bnz7a7qf.js → cli-95jzxcp3.js} +1 -1
  33. package/dist/{cli-0bxqnvq9.js → cli-adeegh7d.js} +29 -7
  34. package/dist/{cli-g61qxmge.js → cli-afkqkrtw.js} +3 -3
  35. package/dist/{cli-7a42nfy0.js → cli-ayayvfg4.js} +24 -4
  36. package/dist/{cli-bqt1mptt.js → cli-az48n0nr.js} +4 -4
  37. package/dist/{cli-z6jkx23q.js → cli-bfv7vdg6.js} +9 -9
  38. package/dist/{cli-pywf3eh5.js → cli-caj33vcq.js} +5 -5
  39. package/dist/{cli-5pag6rmn.js → cli-cb2a8pna.js} +1 -1
  40. package/dist/{cli-wvaawacd.js → cli-cppkf404.js} +5236 -72
  41. package/dist/{cli-mry0qzym.js → cli-ddaanqkd.js} +123 -10
  42. package/dist/{cli-0gey5fzy.js → cli-e0kmphd6.js} +2 -2
  43. package/dist/{cli-zh3fp8v2.js → cli-e46hg0xw.js} +1 -1
  44. package/dist/{cli-jm2vfpfd.js → cli-e5bzrn01.js} +1 -1
  45. package/dist/{cli-qxnf8z2z.js → cli-excnnjg2.js} +165 -153
  46. package/dist/{cli-71ptav7x.js → cli-ferkkrg9.js} +1 -1
  47. package/dist/{cli-vpf89f34.js → cli-fmjd0t1y.js} +3 -3
  48. package/dist/{cli-rm6hqj3z.js → cli-fyt2g4wd.js} +33 -139
  49. package/dist/cli-g08zdaec.js +55 -0
  50. package/dist/{cli-ehq736cn.js → cli-g7s47cc5.js} +4 -4
  51. package/dist/{cli-82ae98pz.js → cli-gz6q4eve.js} +3 -3
  52. package/dist/{cli-82jg7fp9.js → cli-he5nxaa8.js} +1 -1
  53. package/dist/{cli-rqkxrmgw.js → cli-je518txm.js} +39 -14
  54. package/dist/{cli-8hs41zy2.js → cli-jtjtabxe.js} +1 -1
  55. package/dist/{cli-611a1294.js → cli-k0wwfqbg.js} +18 -1
  56. package/dist/{cli-nzxr556s.js → cli-k1nje3v3.js} +38 -43
  57. package/dist/{cli-3h4nhjn8.js → cli-k8196sh2.js} +9 -7
  58. package/dist/{cli-afrrppsw.js → cli-k899ehvh.js} +2 -2
  59. package/dist/{cli-0731hvbw.js → cli-m0da8j35.js} +23 -9
  60. package/dist/cli-m2z8jagn.js +12078 -0
  61. package/dist/{cli-8veytvbh.js → cli-mkk9rnzz.js} +5 -5
  62. package/dist/{cli-7wspm5gm.js → cli-n6bv12jn.js} +528 -6
  63. package/dist/{cli-spknvxbq.js → cli-nmzhp1b5.js} +14 -12
  64. package/dist/{cli-p599f1qm.js → cli-p82cnnjq.js} +1 -1
  65. package/dist/{cli-xtjhfmpc.js → cli-pc6n7fre.js} +1 -1
  66. package/dist/{cli-vbyfwh92.js → cli-pjctyea3.js} +2 -2
  67. package/dist/{cli-nmbmy64z.js → cli-pq73h5mz.js} +3 -3
  68. package/dist/{cli-aa6yxc7m.js → cli-pz4rk021.js} +1 -1
  69. package/dist/{cli-7wcyk2s5.js → cli-q3tkegby.js} +1 -1
  70. package/dist/cli-qghe0h66.js +67 -0
  71. package/dist/{cli-6s7vdcta.js → cli-qh4d4tvk.js} +4 -4
  72. package/dist/{cli-mmwm7zbf.js → cli-rtt8g4v9.js} +1 -1
  73. package/dist/{cli-kg8hchyg.js → cli-sa02jsqt.js} +1 -1
  74. package/dist/{cli-1h3wcpbw.js → cli-snpj5zbj.js} +2 -2
  75. package/dist/{cli-a7v854rf.js → cli-tgrv9cjx.js} +263 -12
  76. package/dist/{cli-a47xy8eq.js → cli-vz22fyqv.js} +186 -54
  77. package/dist/{cli-1ayk1eas.js → cli-wk5yrfwd.js} +285 -42
  78. package/dist/{cli-1338796d.js → cli-ws19768n.js} +1755 -119
  79. package/dist/{cli-70r77n04.js → cli-xae4g51r.js} +1 -1
  80. package/dist/{cli-gf5hbmdr.js → cli-yjdgea32.js} +3 -3
  81. package/dist/{cli-xbkdm710.js → cli-yndmfxb3.js} +3 -3
  82. package/dist/{cli-rhw40jgb.js → cli-yyj3j5m4.js} +2 -2
  83. package/dist/cli.js +26 -25
  84. package/dist/{cloudflare-workers-ai-system-one-bm60fjm0.js → cloudflare-workers-ai-system-one-ef2a980q.js} +2 -2
  85. package/dist/{codex-adapter-q6k3gnyg.js → codex-adapter-cf2yxe9m.js} +3 -2
  86. package/dist/{codex-hook-9efm2x1m.js → codex-hook-a0c6g6t6.js} +1 -1
  87. package/dist/{codex-session-runner-3mwmk3d9.js → codex-session-runner-6vfzdgbd.js} +3 -2
  88. package/dist/{commands-evrenjn9.js → commands-t3mfy7vn.js} +9 -3
  89. package/dist/{controller-xjp8vswh.js → controller-q7xrbaz0.js} +8 -3
  90. package/dist/{controllers-connect-pp5jnxvc.js → controllers-connect-c6nm70kg.js} +20 -19
  91. package/dist/{cursor-adapter-yf47w4t0.js → cursor-adapter-ftd81ga8.js} +1 -1
  92. package/dist/{db-zxpw6aht.js → db-dk572x25.js} +3 -3
  93. package/dist/{db-rgfsh91f.js → db-vemtpmcc.js} +14 -4
  94. package/dist/{devtools-82fzqra8.js → devtools-qxfgbsqz.js} +1 -1
  95. package/dist/{dispatcher-smasgws7.js → dispatcher-kh7ecxh9.js} +17 -16
  96. package/dist/{docker-rrjhaqt9.js → docker-c1a3gqmf.js} +89 -22
  97. package/dist/{dsh-adapter-ftyy8dnp.js → dsh-adapter-v8628r89.js} +1 -1
  98. package/dist/{e2b-w1p0bnpm.js → e2b-fr12yccx.js} +5 -5
  99. package/dist/{e2b-qcaj675y.js → e2b-x6ywzak3.js} +3 -3
  100. package/dist/{easter-egg-3d-yyts7p16.js → easter-egg-3d-nenw4x63.js} +1 -1
  101. package/dist/{embedding-space-1z0mbg95.js → embedding-space-0jepb239.js} +6 -6
  102. package/dist/{embeddings-ygeg7tm7.js → embeddings-xxt49yxg.js} +1 -1
  103. package/dist/{execute-14qhqp4d.js → execute-1mhw6e4x.js} +1 -1
  104. package/dist/{external-channel-ttgrs3sx.js → external-channel-55v12e60.js} +2 -2
  105. package/dist/{fx-adapter-gt6pncj2.js → fx-adapter-bs8wqrk5.js} +6 -5
  106. package/dist/{google-generative-ai-yvmdxyxa.js → google-generative-ai-v94hr7h0.js} +5 -5
  107. package/dist/{google-vertex-jrtdh9gs.js → google-vertex-g7vr6cf8.js} +5 -5
  108. package/dist/{grok-adapter-sm4m5k4g.js → grok-adapter-gpjqmkcq.js} +6 -5
  109. package/dist/handlers-zxmp1ta4.js +32 -0
  110. package/dist/{heartbeat-qahz4p62.js → heartbeat-k42svnr0.js} +20 -19
  111. package/dist/{hook-4fd5wq5w.js → hook-114m7hap.js} +4 -3
  112. package/dist/{hook-kj3d398m.js → hook-6nphweh0.js} +24 -9
  113. package/dist/{http-1ted0j1k.js → http-r8cc4wz7.js} +1196 -211
  114. package/dist/index-a8phxqnk.js +37 -0
  115. package/dist/{index-q4b917zs.js → index-e3s8wmxy.js} +1 -1
  116. package/dist/{index-6rq3r5zb.js → index-fpk4bcd9.js} +1 -1
  117. package/dist/{index-5rk6rfzr.js → index-fvzke5kx.js} +1 -1
  118. package/dist/index-k6h00t4c.js +30 -0
  119. package/dist/{index-7v51awbn.js → index-nh3wyqdt.js} +1027 -577
  120. package/dist/{index-yqhz88yy.js → index-pxn30mse.js} +8 -8
  121. package/dist/index-xrz7te8h.js +33 -0
  122. package/dist/{keepalive-6cf311t5.js → keepalive-x060nt9p.js} +3 -3
  123. package/dist/lead-956sd2yc.js +71 -0
  124. package/dist/{maintenance-a4bm1bmt.js → maintenance-2xxfexhf.js} +1 -1
  125. package/dist/{mistral-conversations-4pmwj1c0.js → mistral-conversations-3gjpdb4b.js} +4 -4
  126. package/dist/{oauth-refresh-sweep-3h0dfw1k.js → oauth-refresh-sweep-fckc4ar5.js} +2 -2
  127. package/dist/{onboard-myn5hraa.js → onboard-zc48j237.js} +5 -5
  128. package/dist/{openai-codex-responses-44j573nm.js → openai-codex-responses-8pbxq9h5.js} +5 -5
  129. package/dist/{openai-completions-a4gee2a8.js → openai-completions-rm00s912.js} +4 -4
  130. package/dist/{openai-decisions-w4qkrcar.js → openai-decisions-8v957r2r.js} +1 -1
  131. package/dist/{openai-responses-rbp6h5kr.js → openai-responses-agxpf96k.js} +5 -5
  132. package/dist/{opencode-adapter-p2nkb5am.js → opencode-adapter-r690h1cr.js} +4 -3
  133. package/dist/{otel-impl-a1a0ef6b.js → otel-impl-r5xbh81q.js} +4 -4
  134. package/dist/{pi-mono-adapter-rzmpb72a.js → pi-mono-adapter-c7v8sdec.js} +7 -6
  135. package/dist/{pricing-refresh-83drrnxj.js → pricing-refresh-3pmre11v.js} +3 -3
  136. package/dist/{rbac-roles-s8y6ecb5.js → rbac-roles-3vbshwsb.js} +1 -1
  137. package/dist/{rbac-roles-0fb6e7pj.js → rbac-roles-910mmkgz.js} +2 -2
  138. package/dist/{render-v2-twmbgrz4.js → render-v2-pxykkbab.js} +3 -3
  139. package/dist/{resume-zfqc36xj.js → resume-adda0bwy.js} +6 -6
  140. package/dist/{runtime-qwggdpqr.js → runtime-fnbm7stk.js} +1 -1
  141. package/dist/{session-access-sc9pn9da.js → session-access-2fvamrdc.js} +4 -4
  142. package/dist/{session-source-backfill-qh07xr8g.js → session-source-backfill-08xvv0sm.js} +2 -2
  143. package/dist/{setup-4fr0m7a1.js → setup-1aqmvmh1.js} +3 -3
  144. package/dist/{typesafe-system-one-5mavm259.js → typesafe-system-one-0bmqcxfg.js} +2 -2
  145. package/dist/{virtual-modules-fh4ha15b.js → virtual-modules-d2pjk9j1.js} +5 -5
  146. package/dist/{work-objects-0wr8zxct.js → work-objects-9s0yrm5j.js} +20 -19
  147. package/dist/{worker-follow-up-ktyyazyp.js → worker-follow-up-3q78fqmr.js} +17 -16
  148. package/dist/worker-y15hy08h.js +71 -0
  149. package/openapi.json +289 -4
  150. package/package.json +9 -8
  151. package/src/apps/definition.ts +6 -5
  152. package/src/be/db/page-theme-tokens.ts +12 -0
  153. package/src/be/db/script-runs.ts +23 -0
  154. package/src/be/db/tasks/read.ts +131 -4
  155. package/src/be/db/tasks/write.ts +19 -0
  156. package/src/be/db-client.ts +114 -11
  157. package/src/be/db.ts +49 -6
  158. package/src/be/memory/providers/sqlite-store.ts +49 -12
  159. package/src/be/migrations/260_runtime_pool_cache.sql +20 -0
  160. package/src/be/migrations/262_session_visibility_indexes.sql +18 -0
  161. package/src/be/migrations/263_task_list_filter_index.sql +11 -0
  162. package/src/be/migrations/264_slack_thread_cover_index.sql +9 -0
  163. package/src/be/migrations/266_script_runs_source_task.sql +11 -0
  164. package/src/be/migrations/269_pages_design_system.sql +23 -0
  165. package/src/be/runtime-pools/cache-cleanup.ts +109 -0
  166. package/src/be/runtime-pools/db.ts +65 -6
  167. package/src/be/runtime-pools/remote-controller.ts +5 -0
  168. package/src/be/runtime-pools/supervisor.ts +33 -2
  169. package/src/be/scripts/typecheck.ts +22 -0
  170. package/src/be/seed/schedules-seeder.ts +0 -10
  171. package/src/be/seed-scripts/catalog/catalog-report.inline.ts +2 -0
  172. package/src/be/seed-scripts/catalog/catalog-report.ts +2 -0
  173. package/src/be/seed-scripts/catalog/memory-eval.ts +2 -0
  174. package/src/be/seed-scripts/catalog/swarm-update-check.ts +150 -0
  175. package/src/be/seed-scripts/catalog/task-failure-audit.ts +5 -1
  176. package/src/be/seed-scripts/index.ts +9 -0
  177. package/src/be/seed-skills/bundled-files.generated.json +3 -3
  178. package/src/be/swarm-config-guard.ts +32 -0
  179. package/src/be/task-auto-title-listener.ts +127 -0
  180. package/src/commands/controller.ts +4 -0
  181. package/src/commands/entrypoint-api-readiness.ts +74 -0
  182. package/src/commands/onboard/agent-fs-version.ts +1 -1
  183. package/src/commands/profile-sync.ts +151 -16
  184. package/src/commands/runner.ts +15 -7
  185. package/src/hooks/hook.ts +20 -9
  186. package/src/http/index.ts +4 -1
  187. package/src/http/list-total-cache.ts +14 -7
  188. package/src/http/memory.ts +38 -9
  189. package/src/http/pages-public.ts +93 -129
  190. package/src/http/pages.ts +94 -21
  191. package/src/http/script-runs.ts +174 -5
  192. package/src/http/status.ts +10 -2
  193. package/src/http/tasks.ts +4 -2
  194. package/src/pages/browser-sdk.ts +48 -21
  195. package/src/pages/color-literals.ts +115 -0
  196. package/src/pages/page-head.ts +766 -0
  197. package/src/pages/version.ts +3 -0
  198. package/src/providers/amp-adapter.ts +1 -1
  199. package/src/providers/codex-adapter.ts +1 -0
  200. package/src/providers/codex-app-server.ts +27 -1
  201. package/src/providers/fx-adapter.ts +1 -1
  202. package/src/providers/pi-mono-extension.ts +30 -15
  203. package/src/runtime-providers/controller-protocol.ts +14 -1
  204. package/src/runtime-providers/controller.ts +5 -0
  205. package/src/runtime-providers/docker.ts +108 -23
  206. package/src/runtime-providers/types.ts +16 -0
  207. package/src/script-workflows/workflow-ctx.ts +8 -0
  208. package/src/scripts-runtime/types/stdlib.d.ts +22 -0
  209. package/src/scripts-runtime/types/swarm-sdk.d.ts +22 -0
  210. package/src/server-user.ts +1 -0
  211. package/src/slack/commands.ts +5 -1
  212. package/src/slack/handlers.ts +37 -2
  213. package/src/slack/left-threads.ts +27 -4
  214. package/src/tasks/follow-up-gate.ts +318 -0
  215. package/src/tasks/follow-up-redelegation-guard.ts +155 -0
  216. package/src/tasks/worker-follow-up.ts +21 -1
  217. package/src/tests/claude-artifacts-read-script.test.ts +209 -0
  218. package/src/tests/codex-app-server.test.ts +59 -0
  219. package/src/tests/codex-gateway-route.test.ts +50 -1
  220. package/src/tests/create-page-tool.test.ts +501 -0
  221. package/src/tests/db-client-busy-retry.test.ts +81 -0
  222. package/src/tests/db-client.test.ts +21 -0
  223. package/src/tests/db-task-read-contract.test.ts +9 -2
  224. package/src/tests/db-task-write-contract.test.ts +7 -1
  225. package/src/tests/db-tasks-read.test.ts +21 -0
  226. package/src/tests/entrypoint-api-readiness.test.ts +416 -210
  227. package/src/tests/explicit-model-validation.test.ts +14 -8
  228. package/src/tests/fixtures/pages/head-v1.html +56 -0
  229. package/src/tests/follow-up-gate-shadow.test.ts +513 -0
  230. package/src/tests/follow-up-redelivery-guard.test.ts +432 -202
  231. package/src/tests/identity-field-budget.test.ts +1 -1
  232. package/src/tests/internal-ai/credentials.test.ts +62 -0
  233. package/src/tests/internal-ai/task-title.test.ts +283 -0
  234. package/src/tests/list-total-cache.test.ts +27 -2
  235. package/src/tests/memory-fts-populate.test.ts +11 -9
  236. package/src/tests/memory-retrieval-purge.test.ts +80 -0
  237. package/src/tests/merge-gate-detect-changes.test.ts +145 -0
  238. package/src/tests/migration-260-runtime-pool-cache.test.ts +118 -0
  239. package/src/tests/page-proxy.test.ts +1 -1
  240. package/src/tests/page-session-dev-cookie.test.ts +188 -0
  241. package/src/tests/pages-frame-ancestors.test.ts +28 -1
  242. package/src/tests/pages-head-v2.test.ts +534 -0
  243. package/src/tests/pages-http.test.ts +330 -0
  244. package/src/tests/pages-public-html.test.ts +43 -0
  245. package/src/tests/pages-storage.test.ts +182 -0
  246. package/src/tests/pages-versioning.test.ts +72 -0
  247. package/src/tests/profile-sync-stale-writeback.test.ts +334 -0
  248. package/src/tests/profile-sync.test.ts +11 -15
  249. package/src/tests/query-audit-plans.test.ts +27 -0
  250. package/src/tests/runtime-cache-cleanup.test.ts +367 -0
  251. package/src/tests/runtime-e2b-pools.test.ts +41 -0
  252. package/src/tests/runtime-pools-db.test.ts +98 -0
  253. package/src/tests/runtime-pools-http.test.ts +29 -0
  254. package/src/tests/runtime-providers-docker.test.ts +253 -0
  255. package/src/tests/runtime-remote-controller.test.ts +66 -2
  256. package/src/tests/runtime-supervisor.test.ts +66 -2
  257. package/src/tests/scheduled-task-required-params-migration.test.ts +3 -1
  258. package/src/tests/script-connections.test.ts +13 -0
  259. package/src/tests/script-runs-http.test.ts +684 -2
  260. package/src/tests/seed-registry.test.ts +28 -6
  261. package/src/tests/seed-schedules.test.ts +61 -8
  262. package/src/tests/seed-scripts.test.ts +168 -2
  263. package/src/tests/slack-leave-thread.test.ts +145 -5
  264. package/src/tests/slack-render-v2-query-plans.test.ts +24 -2
  265. package/src/tests/status.test.ts +11 -0
  266. package/src/tests/swarm-diff.test.ts +121 -2
  267. package/src/tests/task-auto-title-config-guard.test.ts +37 -0
  268. package/src/tests/task-auto-title-listener.test.ts +165 -0
  269. package/src/tests/tasks-readable-row.test.ts +155 -0
  270. package/src/tests/theme-import.test.ts +758 -0
  271. package/src/tests/themes-page-theme.test.ts +155 -0
  272. package/src/tests/themes-presets.test.ts +172 -0
  273. package/src/tests/workflow-script-principal.test.ts +2 -1
  274. package/src/themes/classics.ts +949 -0
  275. package/src/themes/import.ts +420 -0
  276. package/src/themes/page-fields.ts +40 -0
  277. package/src/themes/page-theme.ts +102 -0
  278. package/src/themes/presets.ts +561 -0
  279. package/src/themes/tokens.ts +218 -0
  280. package/src/tools/app-upsert.ts +1 -1
  281. package/src/tools/create-page.ts +118 -12
  282. package/src/tools/send-task.ts +35 -47
  283. package/src/tools/slack-leave-thread.ts +1 -1
  284. package/src/tools/task-dedup.ts +45 -21
  285. package/src/tools/utils.ts +33 -0
  286. package/src/types.ts +83 -3
  287. package/src/utils/constants.ts +19 -0
  288. package/src/utils/follow-up-gate-schedule-ids.ts +13 -0
  289. package/src/utils/internal-ai/credentials.ts +146 -93
  290. package/src/utils/internal-ai/index.ts +10 -0
  291. package/src/utils/internal-ai/models.ts +18 -0
  292. package/src/utils/internal-ai/task-title.ts +282 -0
  293. package/src/utils/page-session.ts +37 -0
  294. package/templates/schedules/daily-status-report/content.md +88 -2
  295. package/templates/schedules/daily-swarm-update-check/content.md +16 -40
  296. package/templates/skills/apps/SKILL.md +1 -1
  297. package/templates/skills/apps/content.md +1 -1
  298. package/templates/skills/composio-google-docs/content.md +10 -0
  299. package/templates/skills/heartbeat-runbook/content.md +1 -1
  300. package/templates/skills/pages/config.json +1 -1
  301. package/templates/skills/pages/content.md +539 -86
  302. package/templates/skills/pages/files/examples/annotated-pr.html +21 -12
  303. package/templates/skills/pages/files/examples/multiplayer-board.html +41 -41
  304. package/templates/skills/pages/files/examples/report-page.html +125 -124
  305. package/templates/skills/script-workflows/content.md +19 -1
  306. package/templates/skills/swarm-docs/content.md +1 -0
  307. package/templates/skills/swarm-scripts/SKILL.md +2 -0
  308. package/templates/skills/swarm-scripts/content.md +2 -0
  309. package/dist/cli-2pnswgh8.js +0 -189
  310. package/dist/cli-dznrgaep.js +0 -30
  311. package/dist/cli-w3hcrxht.js +0 -6985
  312. package/dist/handlers-vwmba1m2.js +0 -31
  313. package/dist/index-5r71rf98.js +0 -32
  314. package/dist/index-anmwxs87.js +0 -29
  315. package/dist/index-spp0ra5c.js +0 -36
  316. package/dist/lead-fjy418cw.js +0 -69
  317. package/dist/worker-0c5tyzqe.js +0 -69
  318. package/templates/schedules/daily-workflow-health-audit/config.json +0 -19
  319. package/templates/schedules/daily-workflow-health-audit/content.md +0 -191
@@ -91,7 +91,9 @@ import {
91
91
  getAgentWorkingOnContextKey2,
92
92
  getLatestActiveTaskByContextKey2,
93
93
  getLatestLeadTaskByContextKey2,
94
- findCompletedTaskInThread2,
94
+ findCompletedTasksInThread2,
95
+ findRecentFailedTaskInThread2,
96
+ countAgentDispatchesInThread2,
95
97
  findRecentCancelledTaskInThread2,
96
98
  init_read,
97
99
  listModelProfiles,
@@ -113,6 +115,9 @@ import {
113
115
  init_api_drain2,
114
116
  parseEnabledTools,
115
117
  init_enabled_tools,
118
+ parseFollowUpGateScheduleIds,
119
+ isFollowUpGateScheduleId,
120
+ init_follow_up_gate_schedule_ids,
116
121
  tierConfigKey,
117
122
  init_model_tier_keys,
118
123
  isInternalConfigKey,
@@ -349,17 +354,17 @@ import {
349
354
  recordInlineScriptRun2,
350
355
  exports_db,
351
356
  init_db4
352
- } from "./cli-1ayk1eas.js";
357
+ } from "./cli-wk5yrfwd.js";
353
358
  import {
354
359
  getUserGrant2,
355
360
  init_rbac_roles
356
- } from "./cli-8hs41zy2.js";
361
+ } from "./cli-jtjtabxe.js";
357
362
  import {
358
363
  ensurePricingSeeded2,
359
364
  ensureRbacSeeded2,
360
365
  ensureModelProfilesSeeded2,
361
366
  init_boot_seeds
362
- } from "./cli-6s7vdcta.js";
367
+ } from "./cli-qh4d4tvk.js";
363
368
  import {
364
369
  buildCatalogEntries,
365
370
  listModelCatalog,
@@ -371,7 +376,7 @@ import {
371
376
  requestModelCatalogRefresh2,
372
377
  startPricingRefreshLoop2,
373
378
  init_pricing_refresh
374
- } from "./cli-nn4d8dne.js";
379
+ } from "./cli-5b456bpf.js";
375
380
  import {
376
381
  workflowEventBus2,
377
382
  init_event_bus
@@ -384,7 +389,7 @@ import {
384
389
  externalChannelToolError2,
385
390
  getChannelBlockReason2,
386
391
  init_external_channel
387
- } from "./cli-mmwm7zbf.js";
392
+ } from "./cli-rtt8g4v9.js";
388
393
  import {
389
394
  noteSlackInboundSideEffect,
390
395
  init_inbound_dispatch,
@@ -419,7 +424,7 @@ import {
419
424
  startSlackApp2,
420
425
  stopSlackApp2,
421
426
  init_app3
422
- } from "./cli-wvaawacd.js";
427
+ } from "./cli-cppkf404.js";
423
428
  import {
424
429
  shapeApprovalResolution,
425
430
  init_approval_resolution,
@@ -443,7 +448,7 @@ import {
443
448
  resumeFromChildRun2,
444
449
  initWaitBusSubscriptions2,
445
450
  init_resume
446
- } from "./cli-g61qxmge.js";
451
+ } from "./cli-afkqkrtw.js";
447
452
  import {
448
453
  FilesError,
449
454
  providerPath,
@@ -457,7 +462,7 @@ import {
457
462
  import {
458
463
  getRuntimePool2,
459
464
  init_db2
460
- } from "./cli-mry0qzym.js";
465
+ } from "./cli-ddaanqkd.js";
461
466
  import {
462
467
  duplicateGuardedQueryKey,
463
468
  parseQueryParams,
@@ -490,7 +495,7 @@ import {
490
495
  findRoute,
491
496
  route,
492
497
  init_route_def
493
- } from "./cli-z8eh3ex8.js";
498
+ } from "./cli-8sckt74b.js";
494
499
  import {
495
500
  COMPOSIO_HTTP_METHODS,
496
501
  executeComposioRequest,
@@ -502,7 +507,7 @@ import {
502
507
  ampPinCatalogError,
503
508
  ampModelError,
504
509
  init_amp_models
505
- } from "./cli-mjzynrse.js";
510
+ } from "./cli-35rsp8ye.js";
506
511
  import {
507
512
  object,
508
513
  init_v4_mini
@@ -523,7 +528,7 @@ import {
523
528
  import {
524
529
  loadModelsDevCache,
525
530
  init_modelsdev_cache
526
- } from "./cli-xtjhfmpc.js";
531
+ } from "./cli-pc6n7fre.js";
527
532
  import {
528
533
  require_dist2,
529
534
  ConnectionAuthInputSchema,
@@ -602,7 +607,7 @@ import {
602
607
  init_typecheck,
603
608
  parseSkillContent,
604
609
  init_skill_parser
605
- } from "./cli-0bxqnvq9.js";
610
+ } from "./cli-adeegh7d.js";
606
611
  import {
607
612
  detachedProcessGroup,
608
613
  registerProcessGroup,
@@ -617,7 +622,7 @@ import {
617
622
  ensureToken,
618
623
  ensureTokenOrThrow,
619
624
  init_ensure_token
620
- } from "./cli-7wcyk2s5.js";
625
+ } from "./cli-q3tkegby.js";
621
626
  import {
622
627
  require_fast_deep_equal
623
628
  } from "./cli-bhp11egn.js";
@@ -712,7 +717,7 @@ import {
712
717
  validateDefinition,
713
718
  applyDefinitionPatch,
714
719
  init_definition2
715
- } from "./cli-spknvxbq.js";
720
+ } from "./cli-nmzhp1b5.js";
716
721
  import {
717
722
  isMultiRuntimeEnabled,
718
723
  init_multi_runtime2
@@ -728,14 +733,20 @@ import {
728
733
  import {
729
734
  require_dist3
730
735
  } from "./cli-k28wkapa.js";
736
+ import {
737
+ SLACK_LEAVE_THREAD_DISABLE,
738
+ isSlackLeaveThreadDisabled,
739
+ leaveSlackThread,
740
+ init_left_threads
741
+ } from "./cli-g08zdaec.js";
731
742
  import {
732
743
  publicEndpointSsrfOptions,
733
744
  init_mcp_wrapper
734
- } from "./cli-pywf3eh5.js";
745
+ } from "./cli-caj33vcq.js";
735
746
  import {
736
747
  canProvisionKind,
737
748
  init_runtime_providers
738
- } from "./cli-xbkdm710.js";
749
+ } from "./cli-yndmfxb3.js";
739
750
  import {
740
751
  findUserById,
741
752
  findUserByExternalId,
@@ -750,7 +761,7 @@ import {
750
761
  resolveSessionToken,
751
762
  fingerprintApiKey,
752
763
  init_users
753
- } from "./cli-bhjt02p8.js";
764
+ } from "./cli-5jnhv72d.js";
754
765
  import {
755
766
  isRbacEnabled,
756
767
  decideAdmission,
@@ -768,6 +779,11 @@ import {
768
779
  init_key,
769
780
  isSafeBundlePath,
770
781
  init_bundle_path,
782
+ PAGE_THEME_COLOR_TOKENS,
783
+ init_tokens2,
784
+ ThemeImportError,
785
+ importThemeTokens,
786
+ init_import,
771
787
  $OpenAPIRegistry,
772
788
  $OpenApiGeneratorV31,
773
789
  init_dist6,
@@ -808,6 +824,7 @@ import {
808
824
  InputValueSchema,
809
825
  PageContentTypeSchema,
810
826
  PageAuthModeSchema,
827
+ PageThemeTokensInputSchema,
811
828
  MetricDefinitionSchema,
812
829
  WorkflowRunStatusSchema,
813
830
  ScriptRunStatusSchema,
@@ -821,7 +838,7 @@ import {
821
838
  KvNamespaceSchema,
822
839
  KvKeySchema,
823
840
  init_types4
824
- } from "./cli-7wspm5gm.js";
841
+ } from "./cli-n6bv12jn.js";
825
842
  import {
826
843
  generateDefaultClaudeMd2,
827
844
  generateDefaultSoulMd2,
@@ -832,7 +849,7 @@ import {
832
849
  init_task_attachment_links,
833
850
  contentSha256,
834
851
  init_profile_sync
835
- } from "./cli-a7v854rf.js";
852
+ } from "./cli-tgrv9cjx.js";
836
853
  import {
837
854
  getSlackConfiguration,
838
855
  init_config4
@@ -886,14 +903,10 @@ import {
886
903
  datetime,
887
904
  number3
888
905
  } from "./cli-agfm16v9.js";
889
- import {
890
- getNodeEnv,
891
- init_node_env
892
- } from "./cli-rgeadyvq.js";
893
906
  import {
894
907
  init_package,
895
908
  package_default
896
- } from "./cli-tqgg40ek.js";
909
+ } from "./cli-6pfd54vx.js";
897
910
  import {
898
911
  realtimeBus,
899
912
  init_bus
@@ -910,12 +923,17 @@ import {
910
923
  getCombState,
911
924
  isAgentFsProxyEnabled,
912
925
  init_constants3
913
- } from "./cli-611a1294.js";
926
+ } from "./cli-k0wwfqbg.js";
914
927
  import {
915
928
  parseEnvFlag,
916
929
  isEnvFlagEnabled,
917
930
  init_env_flag
918
931
  } from "./cli-cebvbc9t.js";
932
+ import {
933
+ getNodeEnv,
934
+ isDevOrTestNodeEnv,
935
+ init_node_env
936
+ } from "./cli-rgeadyvq.js";
919
937
  import {
920
938
  getApiKey,
921
939
  init_api_key
@@ -20871,7 +20889,7 @@ function startRetryPoller(registry, intervalMs = 5000) {
20871
20889
  if (!waiting)
20872
20890
  continue;
20873
20891
  if (result.waitFor === "workflow.child.finished") {
20874
- const { resumeFromChildRun } = await import("./resume-zfqc36xj.js");
20892
+ const { resumeFromChildRun } = await import("./resume-adda0bwy.js");
20875
20893
  await resumeFromChildRun(step.id, registry);
20876
20894
  }
20877
20895
  } else {
@@ -21584,7 +21602,7 @@ var init_notify = __esm(() => {
21584
21602
  }
21585
21603
  }
21586
21604
  case "slack": {
21587
- const { getSlackApp } = await import("./app-vmp4fgep.js");
21605
+ const { getSlackApp } = await import("./app-nky4378f.js");
21588
21606
  const app = getSlackApp();
21589
21607
  if (!app) {
21590
21608
  return {
@@ -24587,6 +24605,75 @@ function summarizeKvShape(root, maxEntries = 8, maxPathBytes = KV_SHAPE_PATH_BUD
24587
24605
  var KV_PATH_MAX_CHARS = 1024, KV_SHAPE_PATH_BUDGET_BYTES = 2048;
24588
24606
  var init_kv_view = () => {};
24589
24607
 
24608
+ // src/pages/color-literals.ts
24609
+ function attributeValues(html, attribute) {
24610
+ return Array.from(html.matchAll(attribute), (match) => match[1] ?? match[2] ?? "");
24611
+ }
24612
+ function classAttributeValues(html) {
24613
+ return attributeValues(html, CLASS_ATTRIBUTE);
24614
+ }
24615
+ function countMatches(regions, pattern) {
24616
+ return regions.reduce((total, region) => total + (region.match(pattern)?.length ?? 0), 0);
24617
+ }
24618
+ function countColorLiterals(html) {
24619
+ const styles = [
24620
+ ...Array.from(html.matchAll(STYLE_BLOCK), (match) => match[1] ?? ""),
24621
+ ...attributeValues(html, STYLE_ATTRIBUTE)
24622
+ ];
24623
+ return countMatches(styles, COLOR_LITERAL) + countMatches(styles, NAMED_COLOR) + countMatches(classAttributeValues(html), COLOR_CLASS);
24624
+ }
24625
+ var COLOR_LITERAL_THRESHOLD = 8, STYLE_BLOCK, STYLE_ATTRIBUTE, CLASS_ATTRIBUTE, COLOR_LITERAL, NAMED_COLOR, PALETTE_UTILITIES, TAILWIND_PALETTE, COLOR_CLASS;
24626
+ var init_color_literals = __esm(() => {
24627
+ STYLE_BLOCK = /<style\b[^>]{0,200}>([\s\S]*?)(?:<\/style\s*>|$)/gi;
24628
+ STYLE_ATTRIBUTE = /\sstyle\s*=\s*(?:"([^"]*)"|'([^']*)')/gi;
24629
+ CLASS_ATTRIBUTE = /\sclass\s*=\s*(?:"([^"]*)"|'([^']*)')/gi;
24630
+ COLOR_LITERAL = /#(?:[0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{3,4})\b|\b(?:rgba?|hsla?|oklch)\(/gi;
24631
+ NAMED_COLOR = /(?<![\w.#-])(?:white|black)(?![\w-])/g;
24632
+ PALETTE_UTILITIES = [
24633
+ "bg",
24634
+ "text",
24635
+ "border",
24636
+ "ring",
24637
+ "outline",
24638
+ "divide",
24639
+ "fill",
24640
+ "stroke",
24641
+ "from",
24642
+ "via",
24643
+ "to",
24644
+ "decoration",
24645
+ "accent",
24646
+ "caret",
24647
+ "placeholder",
24648
+ "shadow"
24649
+ ];
24650
+ TAILWIND_PALETTE = [
24651
+ "slate",
24652
+ "gray",
24653
+ "zinc",
24654
+ "neutral",
24655
+ "stone",
24656
+ "red",
24657
+ "orange",
24658
+ "amber",
24659
+ "yellow",
24660
+ "lime",
24661
+ "green",
24662
+ "emerald",
24663
+ "teal",
24664
+ "cyan",
24665
+ "sky",
24666
+ "blue",
24667
+ "indigo",
24668
+ "violet",
24669
+ "purple",
24670
+ "fuchsia",
24671
+ "pink",
24672
+ "rose"
24673
+ ];
24674
+ COLOR_CLASS = new RegExp(`(?<![\\w-])(?:(?:${PALETTE_UTILITIES.join("|")})-(?:${TAILWIND_PALETTE.join("|")})-\\d+|(?:bg|text)-(?:white|black))(?![\\w-])|-\\[(?:#|rgb|hsl|oklch)`, "g");
24675
+ });
24676
+
24590
24677
  // src/tools/utils.ts
24591
24678
  function markScriptSdkRequestOrigin(meta) {
24592
24679
  scriptSdkRequestOrigins.add(meta);
@@ -24908,7 +24995,7 @@ function setPreloadedTools(server, names) {
24908
24995
  async function applyPreToolCall(name, args, requestInfo, inputSchema) {
24909
24996
  if (requestInfo.callOrigin !== "mcp")
24910
24997
  return { args };
24911
- const dispatcher = await import("./dispatcher-smasgws7.js");
24998
+ const dispatcher = await import("./dispatcher-kh7ecxh9.js");
24912
24999
  const result = await dispatcher.dispatchPre("pre.tool.call", { tool: name, args, requestInfo }, inputSchema ? {
24913
25000
  validateModify: async (data) => {
24914
25001
  const schema = normalizeObjectSchema(inputSchema) ?? inputSchema;
@@ -25012,6 +25099,17 @@ var scriptSdkRequestOrigins, extensionRequestOrigins, getRequestInfo = (req) =>
25012
25099
  return;
25013
25100
  const hint = r.data?.longScriptTimeoutHint;
25014
25101
  return hint ? WORKFLOW_LONG_SCRIPT_TIMEOUT_NUDGE : undefined;
25102
+ }, createPageNudge = (r) => {
25103
+ if (!r.ok)
25104
+ return;
25105
+ const data = r.data;
25106
+ const count = data?.colorLiteralCount;
25107
+ const sentences = [
25108
+ data?.designVersion === 1 && data.usesDesignSystem === true ? "This page is on designVersion 1 (the original look), so design system classes, tokens and themes have no effect. Pass designVersion: 2." : undefined,
25109
+ data?.lightOnlyColors === true ? "Your themeTokens set colors for light mode only. Dark mode keeps the preset's dark colors; add a dark map (or a .dark block) to restyle it too." : undefined,
25110
+ typeof count === "number" && count >= COLOR_LITERAL_THRESHOLD ? `This page hardcodes ${count} color values. Use theme tokens (var(--color-primary), bg-primary, text-muted-foreground) so theme and dark-mode switches restyle it. Until then the page stays light in a dark dashboard.` : undefined
25111
+ ].filter((sentence) => sentence !== undefined);
25112
+ return sentences.length > 0 ? sentences.join(" ") : undefined;
25015
25113
  }, NUDGES, MCP_RESULT_WIRE_LIMIT_BYTES = 1e4, MCP_OVERFLOW_TTL_MS, MCP_PROSE_PREVIEW_FLOOR_CHARS = 1200, scrubMiddleware = (result) => result.allowSecretEgress ? result : scrubObject(result), nudgeMiddleware = (result, ctx) => {
25016
25114
  if (result.nudge)
25017
25115
  return result;
@@ -25133,6 +25231,7 @@ var init_utils = __esm(() => {
25133
25231
  init_kv_overflow();
25134
25232
  init_kv_view();
25135
25233
  init_otel();
25234
+ init_color_literals();
25136
25235
  init_types3();
25137
25236
  init_secret_scrubber();
25138
25237
  scriptSdkRequestOrigins = new WeakSet;
@@ -25170,6 +25269,7 @@ var init_utils = __esm(() => {
25170
25269
  "patch-workflow-node": workflowLongScriptTimeoutNudge,
25171
25270
  "slack-download-file": slackDownloadFileNudge,
25172
25271
  "slack-read": slackReadNudge,
25272
+ create_page: createPageNudge,
25173
25273
  "script-search": (r) => {
25174
25274
  if (!r.ok)
25175
25275
  return;
@@ -32386,7 +32486,7 @@ async function loadAdapter(name, config, logger) {
32386
32486
  });
32387
32487
  }
32388
32488
  case "slack": {
32389
- const { createSlackAdapter } = await import("./index-yqhz88yy.js");
32489
+ const { createSlackAdapter } = await import("./index-pxn30mse.js");
32390
32490
  return createSlackAdapter({
32391
32491
  ...base,
32392
32492
  signingSecret: config.signingSecret ?? "",
@@ -32405,7 +32505,7 @@ async function loadAdapter(name, config, logger) {
32405
32505
  });
32406
32506
  }
32407
32507
  case "teams": {
32408
- const { createTeamsAdapter } = await import("./index-5rk6rfzr.js");
32508
+ const { createTeamsAdapter } = await import("./index-fvzke5kx.js");
32409
32509
  const { teamsWebhookVerifier, teamsToken } = getChatSdkTestHooks();
32410
32510
  return createTeamsAdapter({
32411
32511
  ...base,
@@ -35873,7 +35973,7 @@ async function notifySlack(text) {
35873
35973
  return;
35874
35974
  }
35875
35975
  try {
35876
- const { getSlackApp } = await import("./app-vmp4fgep.js");
35976
+ const { getSlackApp } = await import("./app-nky4378f.js");
35877
35977
  const app = getSlackApp();
35878
35978
  if (!app) {
35879
35979
  console.warn("[Jira webhook keepalive] Slack not available, cannot send notification");
@@ -35944,7 +36044,7 @@ async function deleteJiraWebhook(webhookId) {
35944
36044
  console.log(`[Jira webhook keepalive] Deleted webhook id=${webhookId}`);
35945
36045
  }
35946
36046
  async function overwriteWebhookIds(next) {
35947
- const { getDbClient } = await import("./db-rgfsh91f.js");
36047
+ const { getDbClient } = await import("./db-vemtpmcc.js");
35948
36048
  await getDbClient().transaction(async (tx) => {
35949
36049
  const row = await tx.get("SELECT metadata FROM oauth_apps WHERE provider = 'jira'");
35950
36050
  if (!row) {
@@ -109139,6 +109239,25 @@ async function extractLegacyPageSession(req) {
109139
109239
  async function extractAndVerifyCookie(req, pageId) {
109140
109240
  return (await extractPageSession(req, pageId))?.payload ?? null;
109141
109241
  }
109242
+ function isLocalHttpUrl(value) {
109243
+ try {
109244
+ const url = new URL(value);
109245
+ return url.protocol === "http:" && LOCAL_DEV_HOSTNAMES.has(url.hostname);
109246
+ } catch {
109247
+ return false;
109248
+ }
109249
+ }
109250
+ function isLocalDevPageRequest(req) {
109251
+ if (!isDevOrTestNodeEnv())
109252
+ return false;
109253
+ const origin = req.headers.origin ?? "";
109254
+ if (origin !== "")
109255
+ return isLocalHttpUrl(origin);
109256
+ const host = req.headers.host;
109257
+ if (!host)
109258
+ return true;
109259
+ return isLocalHttpUrl(`http://${host}`);
109260
+ }
109142
109261
  async function issuePageSessionCookie(pageId, opts) {
109143
109262
  const exp = Math.floor(Date.now() / 1000) + PAGE_SESSION_TTL_SECONDS;
109144
109263
  const token = await signPageSession({
@@ -109182,9 +109301,11 @@ async function pageSessionSetCookies(req, pageId, opts) {
109182
109301
  evict.add(name);
109183
109302
  return [issued, ...[...evict].map((name) => buildCookie(name, "", 0, opts.dev))];
109184
109303
  }
109185
- var ENV_SECRET = "PAGE_SESSION_SECRET", ENV_SECRET_FILE = "PAGE_SESSION_SECRET_FILE", SECRET_FILENAME = ".page-session-secret", GENERATED_SECRET_BYTES = 32, LEGACY_PAGE_SESSION_COOKIE = "page_session", COOKIE_SAFE_PAGE_ID, PAGE_SESSION_TTL_SECONDS = 3600, MAX_PAGE_SESSION_COOKIES = 20, PAGE_SESSION_COOKIE_RE;
109304
+ var ENV_SECRET = "PAGE_SESSION_SECRET", ENV_SECRET_FILE = "PAGE_SESSION_SECRET_FILE", SECRET_FILENAME = ".page-session-secret", GENERATED_SECRET_BYTES = 32, LEGACY_PAGE_SESSION_COOKIE = "page_session", COOKIE_SAFE_PAGE_ID, PAGE_SESSION_TTL_SECONDS = 3600, LOCAL_DEV_HOSTNAMES, MAX_PAGE_SESSION_COOKIES = 20, PAGE_SESSION_COOKIE_RE;
109186
109305
  var init_page_session = __esm(() => {
109306
+ init_node_env();
109187
109307
  COOKIE_SAFE_PAGE_ID = /^[A-Za-z0-9_-]{1,64}$/;
109308
+ LOCAL_DEV_HOSTNAMES = new Set(["localhost", "127.0.0.1"]);
109188
109309
  PAGE_SESSION_COOKIE_RE = new RegExp(`(?:^|;\\s*)(${LEGACY_PAGE_SESSION_COOKIE}_[A-Za-z0-9_-]{1,64})=([^;]*)`, "g");
109189
109310
  });
109190
109311
 
@@ -109417,7 +109538,7 @@ async function reloadGlobalConfigsAndIntegrations() {
109417
109538
  return runWithoutRequestAuth(() => reloadGlobalConfigsAndIntegrationsInner());
109418
109539
  }
109419
109540
  async function reloadGlobalConfigsAndIntegrationsInner() {
109420
- const { getEmbeddingProvider, resetEmbeddingProvider } = await import("./index-q4b917zs.js");
109541
+ const { getEmbeddingProvider, resetEmbeddingProvider } = await import("./index-e3s8wmxy.js");
109421
109542
  const wasEmbeddingsConfigured = getEmbeddingProvider().isConfigured();
109422
109543
  const updated = await loadGlobalConfigsIntoEnv(true);
109423
109544
  await syncTelemetryEnabled("settings").catch((err) => {
@@ -109433,7 +109554,7 @@ async function reloadGlobalConfigsAndIntegrationsInner() {
109433
109554
  integrations.push("embeddings");
109434
109555
  }
109435
109556
  if (isEmbeddingsConfigured) {
109436
- import("./embedding-space-1z0mbg95.js").then(({ runEmbeddingMaintenance }) => runEmbeddingMaintenance({ backfill: !wasEmbeddingsConfigured })).catch((err) => {
109557
+ import("./embedding-space-0jepb239.js").then(({ runEmbeddingMaintenance }) => runEmbeddingMaintenance({ backfill: !wasEmbeddingsConfigured })).catch((err) => {
109437
109558
  console.error("[config-reload] embedding maintenance failed (non-fatal):", err);
109438
109559
  });
109439
109560
  }
@@ -109879,42 +110000,6 @@ var init_mcp_limits = __esm(() => {
109879
110000
  MCP_MAX_REQUEST_BODY_BYTES = 4 * 1024 * 1024;
109880
110001
  });
109881
110002
 
109882
- // src/slack/left-threads.ts
109883
- function isSlackLeaveThreadDisabled() {
109884
- return isEnvFlagEnabled(SLACK_LEAVE_THREAD_DISABLE, false);
109885
- }
109886
- function threadKey(channelId, threadTs) {
109887
- return `${channelId}:${threadTs}`;
109888
- }
109889
- async function leaveSlackThread(channelId, threadTs, agentId) {
109890
- await upsertKv2({
109891
- namespace: SLACK_LEFT_THREAD_KV_NAMESPACE,
109892
- key: threadKey(channelId, threadTs),
109893
- value: { agentId, leftAt: new Date().toISOString() },
109894
- valueType: "json"
109895
- });
109896
- }
109897
- async function isSlackThreadLeft(channelId, threadTs) {
109898
- return await getKv2(SLACK_LEFT_THREAD_KV_NAMESPACE, threadKey(channelId, threadTs)) !== null;
109899
- }
109900
- async function shouldSkipLeftSlackThread(channelId, threadTs, botMentioned) {
109901
- if (!threadTs)
109902
- return false;
109903
- const key = threadKey(channelId, threadTs);
109904
- if (botMentioned) {
109905
- if (await deleteKv2(SLACK_LEFT_THREAD_KV_NAMESPACE, key)) {
109906
- console.log(`[Slack] Rejoined left thread ${key}: bot mentioned`);
109907
- }
109908
- return false;
109909
- }
109910
- return isSlackThreadLeft(channelId, threadTs);
109911
- }
109912
- var SLACK_LEFT_THREAD_KV_NAMESPACE = "slack-left-thread", SLACK_LEAVE_THREAD_DISABLE = "SLACK_LEAVE_THREAD_DISABLE";
109913
- var init_left_threads = __esm(() => {
109914
- init_db4();
109915
- init_env_flag();
109916
- });
109917
-
109918
110003
  // src/tools/task-tool-ctx.ts
109919
110004
  function ownerCtx(info) {
109920
110005
  return {
@@ -114476,7 +114561,7 @@ var init_app_sync = __esm(() => {
114476
114561
  var registerAppUpsertTool = (server) => {
114477
114562
  createToolRegistrar(server)("app-upsert", {
114478
114563
  title: "Create or update an app",
114479
- description: "Stores a schema-backed app definition with models, queries/actions, pages, reusable elements, optional userConfig fields, and an optional top-level theme (a dashboard preset slug for the app's canvas — hive (stock; omit to inherit the viewer's theme), meadow, iris, rose, cobalt, ember, carbon, plus the classic presets github, vscode, material, solarized, tokyo, monokai, gruvbox, catppuccin; viewers can override it per-user; unknown slugs degrade to the viewer's dashboard theme), then returns its dashboard URL. userConfig is versioned schema only; each user's values are stored separately, survive rollback, and schema changes are always compatible. Pages may bind a declared field read-only at exactly /user/<field>; pure and bound reusable elements must receive that value through a prop. Elements are private by default: pure elements read declared props, allow $item/$index inside repeats, may expose one leaf ElementSlot, and cannot invoke actions; bound elements may use the defining app's queries/actions, while exported bound elements cannot navigate. Prop kinds include enum with a required non-empty enum values array. Pages or elements reuse them with literal ElementRef targets, and cross-app refs require export: true. Zero-model pure-UI apps are valid. Pass appId to update; breaking a referenced export is blocked by the compatibility gate unless forceElementBreak explicitly names it.",
114564
+ description: "Stores a schema-backed app definition with models, queries/actions, pages, reusable elements, optional userConfig fields, and an optional top-level theme (a dashboard preset slug for the app's canvas: hive (stock; omit to inherit the viewer's theme), meadow, iris, rose, cobalt, ember, carbon, paper (the warm editorial paper look), plus the classic presets github, vscode, material, solarized, tokyo, monokai, gruvbox, catppuccin; viewers can override it per-user; unknown slugs degrade to the viewer's dashboard theme), then returns its dashboard URL. userConfig is versioned schema only; each user's values are stored separately, survive rollback, and schema changes are always compatible. Pages may bind a declared field read-only at exactly /user/<field>; pure and bound reusable elements must receive that value through a prop. Elements are private by default: pure elements read declared props, allow $item/$index inside repeats, may expose one leaf ElementSlot, and cannot invoke actions; bound elements may use the defining app's queries/actions, while exported bound elements cannot navigate. Prop kinds include enum with a required non-empty enum values array. Pages or elements reuse them with literal ElementRef targets, and cross-app refs require export: true. Zero-model pure-UI apps are valid. Pass appId to update; breaking a referenced export is blocked by the compatibility gate unless forceElementBreak explicitly names it.",
114480
114565
  annotations: { destructiveHint: false },
114481
114566
  inputSchema: object2({
114482
114567
  name: string2().min(1).describe("Human-readable app name."),
@@ -116144,7 +116229,10 @@ async function snapshotPage(pageId, changedByAgentId) {
116144
116229
  authMode: page.authMode,
116145
116230
  passwordHash: page.passwordHash,
116146
116231
  body: page.body,
116147
- needsCredentials: page.needsCredentials
116232
+ needsCredentials: page.needsCredentials,
116233
+ theme: page.theme,
116234
+ themeTokens: page.themeTokens,
116235
+ designVersion: page.designVersion
116148
116236
  };
116149
116237
  return createPageVersion2({
116150
116238
  pageId,
@@ -116158,6 +116246,1245 @@ var init_version3 = __esm(() => {
116158
116246
  init_page_versions();
116159
116247
  });
116160
116248
 
116249
+ // src/themes/classics.ts
116250
+ var CLASSIC_THEME_PRESETS;
116251
+ var init_classics = __esm(() => {
116252
+ CLASSIC_THEME_PRESETS = [
116253
+ {
116254
+ id: "github",
116255
+ name: "GitHub",
116256
+ description: "Primer light / dark. Statuses from Primer's semantic fg colors.",
116257
+ accent: { light: "oklch(0.54 0.191 257.5)", dark: "oklch(0.663 0.169 255.9)" },
116258
+ field: { light: "oklch(1 0 0)", dark: "oklch(0.176 0.014 258.4)" },
116259
+ vars: {
116260
+ light: {
116261
+ "--color-background": "oklch(1 0 0)",
116262
+ "--color-foreground": "oklch(0.254 0.011 254)",
116263
+ "--color-card": "oklch(1 0 0)",
116264
+ "--color-card-foreground": "oklch(0.254 0.011 254)",
116265
+ "--color-surface": "oklch(0.978 0.003 247.9)",
116266
+ "--color-popover": "oklch(1 0 0)",
116267
+ "--color-popover-foreground": "oklch(0.254 0.011 254)",
116268
+ "--color-primary": "oklch(0.54 0.191 257.5)",
116269
+ "--color-primary-foreground": "oklch(1 0 0)",
116270
+ "--color-secondary": "oklch(0.978 0.003 247.9)",
116271
+ "--color-secondary-foreground": "oklch(0.254 0.011 254)",
116272
+ "--color-muted": "oklch(0.978 0.003 247.9)",
116273
+ "--color-muted-foreground": "oklch(0.495 0.022 250.8)",
116274
+ "--color-accent": "oklch(0.947 0.007 247.9)",
116275
+ "--color-accent-foreground": "oklch(0.254 0.011 254)",
116276
+ "--color-border": "oklch(0.876 0.012 248)",
116277
+ "--color-border-subtle": "oklch(0.898 0.01 247.9)",
116278
+ "--color-input": "oklch(0.876 0.012 248)",
116279
+ "--color-ring": "oklch(0.54 0.191 257.5)",
116280
+ "--color-chart-1": "oklch(0.54 0.191 257.5)",
116281
+ "--color-sidebar": "oklch(0.978 0.003 247.9)",
116282
+ "--color-sidebar-foreground": "oklch(0.254 0.011 254)",
116283
+ "--color-sidebar-primary": "oklch(0.54 0.191 257.5)",
116284
+ "--color-sidebar-primary-foreground": "oklch(1 0 0)",
116285
+ "--color-sidebar-accent": "oklch(0.947 0.007 247.9)",
116286
+ "--color-sidebar-accent-foreground": "oklch(0.254 0.011 254)",
116287
+ "--color-sidebar-border": "oklch(0.898 0.01 247.9)",
116288
+ "--color-sidebar-ring": "oklch(0.54 0.191 257.5)",
116289
+ "--color-status-success": "oklch(0.524 0.14 148)",
116290
+ "--color-status-success-strong": "oklch(0.524 0.14 148)",
116291
+ "--color-status-success-foreground": "oklch(0.985 0 0)",
116292
+ "--color-status-active": "oklch(0.662 0.137 79.3)",
116293
+ "--color-status-active-strong": "oklch(0.662 0.137 79.3)",
116294
+ "--color-status-active-foreground": "oklch(0.985 0 0)",
116295
+ "--color-status-error": "oklch(0.552 0.205 24.5)",
116296
+ "--color-status-error-strong": "oklch(0.552 0.205 24.5)",
116297
+ "--color-status-error-foreground": "oklch(0.985 0 0)",
116298
+ "--color-status-info": "oklch(0.54 0.191 257.5)",
116299
+ "--color-status-info-strong": "oklch(0.54 0.191 257.5)",
116300
+ "--color-status-info-foreground": "oklch(0.985 0 0)",
116301
+ "--color-status-pending": "oklch(0.554 0.117 75)",
116302
+ "--color-status-pending-strong": "oklch(0.554 0.117 75)",
116303
+ "--color-status-pending-foreground": "oklch(0.985 0 0)",
116304
+ "--color-status-warning": "oklch(0.557 0.16 44.7)",
116305
+ "--color-status-warning-strong": "oklch(0.557 0.16 44.7)",
116306
+ "--color-status-warning-foreground": "oklch(0.985 0 0)",
116307
+ "--color-status-paused": "oklch(0.563 0.207 295)",
116308
+ "--color-status-paused-strong": "oklch(0.563 0.207 295)",
116309
+ "--color-status-paused-foreground": "oklch(0.985 0 0)",
116310
+ "--color-status-neutral": "oklch(0.495 0.022 250.8)",
116311
+ "--color-status-neutral-foreground": "oklch(0.985 0 0)"
116312
+ },
116313
+ dark: {
116314
+ "--color-background": "oklch(0.176 0.014 258.4)",
116315
+ "--color-foreground": "oklch(0.97 0.01 247.9)",
116316
+ "--color-card": "oklch(0.22 0.018 255.7)",
116317
+ "--color-card-foreground": "oklch(0.97 0.01 247.9)",
116318
+ "--color-surface": "oklch(0.104 0.019 248.3)",
116319
+ "--color-popover": "oklch(0.22 0.018 255.7)",
116320
+ "--color-popover-foreground": "oklch(0.97 0.01 247.9)",
116321
+ "--color-primary": "oklch(0.663 0.169 255.9)",
116322
+ "--color-primary-foreground": "oklch(0.176 0.014 258.4)",
116323
+ "--color-secondary": "oklch(0.274 0.018 251.9)",
116324
+ "--color-secondary-foreground": "oklch(0.97 0.01 247.9)",
116325
+ "--color-muted": "oklch(0.274 0.018 251.9)",
116326
+ "--color-muted-foreground": "oklch(0.677 0.016 254.6)",
116327
+ "--color-accent": "oklch(0.292 0.02 260.6)",
116328
+ "--color-accent-foreground": "oklch(0.97 0.01 247.9)",
116329
+ "--color-border": "oklch(0.384 0.018 254.7)",
116330
+ "--color-border-subtle": "oklch(0.326 0.016 255.6)",
116331
+ "--color-input": "oklch(0.384 0.018 254.7)",
116332
+ "--color-ring": "oklch(0.663 0.169 255.9)",
116333
+ "--color-chart-1": "oklch(0.663 0.169 255.9)",
116334
+ "--color-sidebar": "oklch(0.104 0.019 248.3)",
116335
+ "--color-sidebar-foreground": "oklch(0.97 0.01 247.9)",
116336
+ "--color-sidebar-primary": "oklch(0.663 0.169 255.9)",
116337
+ "--color-sidebar-primary-foreground": "oklch(0.176 0.014 258.4)",
116338
+ "--color-sidebar-accent": "oklch(0.292 0.02 260.6)",
116339
+ "--color-sidebar-accent-foreground": "oklch(0.97 0.01 247.9)",
116340
+ "--color-sidebar-border": "oklch(0.326 0.016 255.6)",
116341
+ "--color-sidebar-ring": "oklch(0.663 0.169 255.9)",
116342
+ "--color-status-success": "oklch(0.695 0.181 145.6)",
116343
+ "--color-status-success-strong": "oklch(0.695 0.181 145.6)",
116344
+ "--color-status-success-foreground": "oklch(0.985 0 0)",
116345
+ "--color-status-active": "oklch(0.72 0.14 79.9)",
116346
+ "--color-status-active-strong": "oklch(0.72 0.14 79.9)",
116347
+ "--color-status-active-foreground": "oklch(0.985 0 0)",
116348
+ "--color-status-error": "oklch(0.665 0.205 27)",
116349
+ "--color-status-error-strong": "oklch(0.665 0.205 27)",
116350
+ "--color-status-error-foreground": "oklch(0.985 0 0)",
116351
+ "--color-status-info": "oklch(0.663 0.169 255.9)",
116352
+ "--color-status-info-strong": "oklch(0.663 0.169 255.9)",
116353
+ "--color-status-info-foreground": "oklch(0.985 0 0)",
116354
+ "--color-status-pending": "oklch(0.79 0.139 85.2)",
116355
+ "--color-status-pending-strong": "oklch(0.79 0.139 85.2)",
116356
+ "--color-status-pending-foreground": "oklch(0.21 0.006 285.885)",
116357
+ "--color-status-warning": "oklch(0.654 0.158 48.4)",
116358
+ "--color-status-warning-strong": "oklch(0.654 0.158 48.4)",
116359
+ "--color-status-warning-foreground": "oklch(0.985 0 0)",
116360
+ "--color-status-paused": "oklch(0.688 0.178 298.9)",
116361
+ "--color-status-paused-strong": "oklch(0.688 0.178 298.9)",
116362
+ "--color-status-paused-foreground": "oklch(0.985 0 0)",
116363
+ "--color-status-neutral": "oklch(0.677 0.016 254.6)",
116364
+ "--color-status-neutral-foreground": "oklch(0.985 0 0)"
116365
+ }
116366
+ }
116367
+ },
116368
+ {
116369
+ id: "vscode",
116370
+ name: "VS Code",
116371
+ description: "Light+ / Dark+ chrome; statuses from editor/git decoration colors.",
116372
+ accent: { light: "oklch(0.491 0.16 254.6)", dark: "oklch(0.568 0.167 251.3)" },
116373
+ field: { light: "oklch(1 0 0)", dark: "oklch(0.235 0 0)" },
116374
+ vars: {
116375
+ light: {
116376
+ "--color-background": "oklch(1 0 0)",
116377
+ "--color-foreground": "oklch(0.352 0 0)",
116378
+ "--color-card": "oklch(1 0 0)",
116379
+ "--color-card-foreground": "oklch(0.352 0 0)",
116380
+ "--color-surface": "oklch(0.964 0 0)",
116381
+ "--color-popover": "oklch(1 0 0)",
116382
+ "--color-popover-foreground": "oklch(0.352 0 0)",
116383
+ "--color-primary": "oklch(0.491 0.16 254.6)",
116384
+ "--color-primary-foreground": "oklch(1 0 0)",
116385
+ "--color-secondary": "oklch(0.964 0 0)",
116386
+ "--color-secondary-foreground": "oklch(0.352 0 0)",
116387
+ "--color-muted": "oklch(0.964 0 0)",
116388
+ "--color-muted-foreground": "oklch(0.493 0 0)",
116389
+ "--color-accent": "oklch(0.931 0 0)",
116390
+ "--color-accent-foreground": "oklch(0.352 0 0)",
116391
+ "--color-border": "oklch(0.922 0 0)",
116392
+ "--color-border-subtle": "oklch(0.949 0 0)",
116393
+ "--color-input": "oklch(0.922 0 0)",
116394
+ "--color-ring": "oklch(0.491 0.16 254.6)",
116395
+ "--color-chart-1": "oklch(0.491 0.16 254.6)",
116396
+ "--color-sidebar": "oklch(0.964 0 0)",
116397
+ "--color-sidebar-foreground": "oklch(0.352 0 0)",
116398
+ "--color-sidebar-primary": "oklch(0.491 0.16 254.6)",
116399
+ "--color-sidebar-primary-foreground": "oklch(1 0 0)",
116400
+ "--color-sidebar-accent": "oklch(0.931 0 0)",
116401
+ "--color-sidebar-accent-foreground": "oklch(0.352 0 0)",
116402
+ "--color-sidebar-border": "oklch(0.949 0 0)",
116403
+ "--color-sidebar-ring": "oklch(0.491 0.16 254.6)",
116404
+ "--color-status-success": "oklch(0.51 0.165 142.7)",
116405
+ "--color-status-success-strong": "oklch(0.51 0.165 142.7)",
116406
+ "--color-status-success-foreground": "oklch(0.985 0 0)",
116407
+ "--color-status-active": "oklch(0.497 0.107 68.9)",
116408
+ "--color-status-active-strong": "oklch(0.497 0.107 68.9)",
116409
+ "--color-status-active-foreground": "oklch(0.985 0 0)",
116410
+ "--color-status-error": "oklch(0.559 0.193 26.1)",
116411
+ "--color-status-error-strong": "oklch(0.559 0.193 26.1)",
116412
+ "--color-status-error-foreground": "oklch(0.985 0 0)",
116413
+ "--color-status-info": "oklch(0.491 0.16 254.6)",
116414
+ "--color-status-info-strong": "oklch(0.491 0.16 254.6)",
116415
+ "--color-status-info-foreground": "oklch(0.985 0 0)",
116416
+ "--color-status-pending": "oklch(0.589 0.119 80.7)",
116417
+ "--color-status-pending-strong": "oklch(0.589 0.119 80.7)",
116418
+ "--color-status-pending-foreground": "oklch(0.985 0 0)",
116419
+ "--color-status-warning": "oklch(0.664 0.137 79.8)",
116420
+ "--color-status-warning-strong": "oklch(0.664 0.137 79.8)",
116421
+ "--color-status-warning-foreground": "oklch(0.985 0 0)",
116422
+ "--color-status-paused": "oklch(0.424 0.158 306.8)",
116423
+ "--color-status-paused-strong": "oklch(0.424 0.158 306.8)",
116424
+ "--color-status-paused-foreground": "oklch(0.985 0 0)",
116425
+ "--color-status-neutral": "oklch(0.493 0 0)",
116426
+ "--color-status-neutral-foreground": "oklch(0.985 0 0)"
116427
+ },
116428
+ dark: {
116429
+ "--color-background": "oklch(0.235 0 0)",
116430
+ "--color-foreground": "oklch(0.845 0 0)",
116431
+ "--color-card": "oklch(0.265 0.002 286.3)",
116432
+ "--color-card-foreground": "oklch(0.845 0 0)",
116433
+ "--color-surface": "oklch(0.265 0.002 286.3)",
116434
+ "--color-popover": "oklch(0.265 0.002 286.3)",
116435
+ "--color-popover-foreground": "oklch(0.845 0 0)",
116436
+ "--color-primary": "oklch(0.568 0.167 251.3)",
116437
+ "--color-primary-foreground": "oklch(1 0 0)",
116438
+ "--color-secondary": "oklch(0.297 0 0)",
116439
+ "--color-secondary-foreground": "oklch(0.845 0 0)",
116440
+ "--color-muted": "oklch(0.297 0 0)",
116441
+ "--color-muted-foreground": "oklch(0.696 0 0)",
116442
+ "--color-accent": "oklch(0.339 0.01 285.8)",
116443
+ "--color-accent-foreground": "oklch(0.845 0 0)",
116444
+ "--color-border": "oklch(0.375 0 0)",
116445
+ "--color-border-subtle": "oklch(0.321 0 0)",
116446
+ "--color-input": "oklch(0.375 0 0)",
116447
+ "--color-ring": "oklch(0.568 0.167 251.3)",
116448
+ "--color-chart-1": "oklch(0.568 0.167 251.3)",
116449
+ "--color-sidebar": "oklch(0.265 0.002 286.3)",
116450
+ "--color-sidebar-foreground": "oklch(0.845 0 0)",
116451
+ "--color-sidebar-primary": "oklch(0.568 0.167 251.3)",
116452
+ "--color-sidebar-primary-foreground": "oklch(1 0 0)",
116453
+ "--color-sidebar-accent": "oklch(0.339 0.01 285.8)",
116454
+ "--color-sidebar-accent-foreground": "oklch(0.845 0 0)",
116455
+ "--color-sidebar-border": "oklch(0.321 0 0)",
116456
+ "--color-sidebar-ring": "oklch(0.568 0.167 251.3)",
116457
+ "--color-status-success": "oklch(0.794 0.128 143.1)",
116458
+ "--color-status-success-strong": "oklch(0.794 0.128 143.1)",
116459
+ "--color-status-success-foreground": "oklch(0.21 0.006 285.885)",
116460
+ "--color-status-active": "oklch(0.8 0.086 85.1)",
116461
+ "--color-status-active-strong": "oklch(0.8 0.086 85.1)",
116462
+ "--color-status-active-foreground": "oklch(0.21 0.006 285.885)",
116463
+ "--color-status-error": "oklch(0.738 0.138 32.5)",
116464
+ "--color-status-error-strong": "oklch(0.738 0.138 32.5)",
116465
+ "--color-status-error-foreground": "oklch(0.985 0 0)",
116466
+ "--color-status-info": "oklch(0.666 0.181 254.6)",
116467
+ "--color-status-info-strong": "oklch(0.666 0.181 254.6)",
116468
+ "--color-status-info-foreground": "oklch(0.985 0 0)",
116469
+ "--color-status-pending": "oklch(0.825 0.077 77.5)",
116470
+ "--color-status-pending-strong": "oklch(0.825 0.077 77.5)",
116471
+ "--color-status-pending-foreground": "oklch(0.21 0.006 285.885)",
116472
+ "--color-status-warning": "oklch(0.74 0.152 92.8)",
116473
+ "--color-status-warning-strong": "oklch(0.74 0.152 92.8)",
116474
+ "--color-status-warning-foreground": "oklch(0.21 0.006 285.885)",
116475
+ "--color-status-paused": "oklch(0.681 0.134 309.1)",
116476
+ "--color-status-paused-strong": "oklch(0.681 0.134 309.1)",
116477
+ "--color-status-paused-foreground": "oklch(0.985 0 0)",
116478
+ "--color-status-neutral": "oklch(0.64 0 0)",
116479
+ "--color-status-neutral-foreground": "oklch(0.985 0 0)"
116480
+ }
116481
+ }
116482
+ },
116483
+ {
116484
+ id: "material",
116485
+ name: "Material",
116486
+ description: "Material Theme palenight-adjacent default; statuses from its accent set.",
116487
+ accent: { light: "oklch(0.604 0.091 260)", dark: "oklch(0.744 0.131 264.3)" },
116488
+ field: { light: "oklch(0.985 0 0)", dark: "oklch(0.309 0.019 229.8)" },
116489
+ vars: {
116490
+ light: {
116491
+ "--color-background": "oklch(0.985 0 0)",
116492
+ "--color-foreground": "oklch(0.387 0.025 229.8)",
116493
+ "--color-card": "oklch(1 0 0)",
116494
+ "--color-card-foreground": "oklch(0.387 0.025 229.8)",
116495
+ "--color-surface": "oklch(0.97 0 0)",
116496
+ "--color-popover": "oklch(1 0 0)",
116497
+ "--color-popover-foreground": "oklch(0.387 0.025 229.8)",
116498
+ "--color-primary": "oklch(0.604 0.091 260)",
116499
+ "--color-primary-foreground": "oklch(1 0 0)",
116500
+ "--color-secondary": "oklch(0.949 0 0)",
116501
+ "--color-secondary-foreground": "oklch(0.387 0.025 229.8)",
116502
+ "--color-muted": "oklch(0.949 0 0)",
116503
+ "--color-muted-foreground": "oklch(0.706 0.027 229.3)",
116504
+ "--color-accent": "oklch(0.928 0.001 286.4)",
116505
+ "--color-accent-foreground": "oklch(0.387 0.025 229.8)",
116506
+ "--color-border": "oklch(0.907 0 0)",
116507
+ "--color-border-subtle": "oklch(0.94 0 0)",
116508
+ "--color-input": "oklch(0.907 0 0)",
116509
+ "--color-ring": "oklch(0.604 0.091 260)",
116510
+ "--color-chart-1": "oklch(0.604 0.091 260)",
116511
+ "--color-sidebar": "oklch(0.97 0 0)",
116512
+ "--color-sidebar-foreground": "oklch(0.387 0.025 229.8)",
116513
+ "--color-sidebar-primary": "oklch(0.604 0.091 260)",
116514
+ "--color-sidebar-primary-foreground": "oklch(1 0 0)",
116515
+ "--color-sidebar-accent": "oklch(0.928 0.001 286.4)",
116516
+ "--color-sidebar-accent-foreground": "oklch(0.387 0.025 229.8)",
116517
+ "--color-sidebar-border": "oklch(0.94 0 0)",
116518
+ "--color-sidebar-ring": "oklch(0.604 0.091 260)",
116519
+ "--color-status-success": "oklch(0.733 0.131 127.8)",
116520
+ "--color-status-success-strong": "oklch(0.733 0.131 127.8)",
116521
+ "--color-status-success-foreground": "oklch(0.21 0.006 285.885)",
116522
+ "--color-status-active": "oklch(0.825 0.161 77.4)",
116523
+ "--color-status-active-strong": "oklch(0.825 0.161 77.4)",
116524
+ "--color-status-active-foreground": "oklch(0.21 0.006 285.885)",
116525
+ "--color-status-error": "oklch(0.608 0.209 27)",
116526
+ "--color-status-error-strong": "oklch(0.608 0.209 27)",
116527
+ "--color-status-error-foreground": "oklch(0.985 0 0)",
116528
+ "--color-status-info": "oklch(0.604 0.091 260)",
116529
+ "--color-status-info-strong": "oklch(0.604 0.091 260)",
116530
+ "--color-status-info-foreground": "oklch(0.985 0 0)",
116531
+ "--color-status-pending": "oklch(0.762 0.135 76.6)",
116532
+ "--color-status-pending-strong": "oklch(0.762 0.135 76.6)",
116533
+ "--color-status-pending-foreground": "oklch(0.21 0.006 285.885)",
116534
+ "--color-status-warning": "oklch(0.697 0.178 36.3)",
116535
+ "--color-status-warning-strong": "oklch(0.697 0.178 36.3)",
116536
+ "--color-status-warning-foreground": "oklch(0.985 0 0)",
116537
+ "--color-status-paused": "oklch(0.579 0.247 288.2)",
116538
+ "--color-status-paused-strong": "oklch(0.579 0.247 288.2)",
116539
+ "--color-status-paused-foreground": "oklch(0.985 0 0)",
116540
+ "--color-status-neutral": "oklch(0.706 0.027 229.3)",
116541
+ "--color-status-neutral-foreground": "oklch(0.21 0.006 285.885)"
116542
+ },
116543
+ dark: {
116544
+ "--color-background": "oklch(0.309 0.019 229.8)",
116545
+ "--color-foreground": "oklch(0.988 0.018 196.9)",
116546
+ "--color-card": "oklch(0.375 0.026 211.3)",
116547
+ "--color-card-foreground": "oklch(0.988 0.018 196.9)",
116548
+ "--color-surface": "oklch(0.347 0.022 229.8)",
116549
+ "--color-popover": "oklch(0.375 0.026 211.3)",
116550
+ "--color-popover-foreground": "oklch(0.988 0.018 196.9)",
116551
+ "--color-primary": "oklch(0.744 0.131 264.3)",
116552
+ "--color-primary-foreground": "oklch(0.309 0.019 229.8)",
116553
+ "--color-secondary": "oklch(0.387 0.025 229.8)",
116554
+ "--color-secondary-foreground": "oklch(0.988 0.018 196.9)",
116555
+ "--color-muted": "oklch(0.387 0.025 229.8)",
116556
+ "--color-muted-foreground": "oklch(0.793 0.018 229.1)",
116557
+ "--color-accent": "oklch(0.418 0.02 225.7)",
116558
+ "--color-accent-foreground": "oklch(0.988 0.018 196.9)",
116559
+ "--color-border": "oklch(0.387 0.025 229.8)",
116560
+ "--color-border-subtle": "oklch(0.375 0.026 211.3)",
116561
+ "--color-input": "oklch(0.387 0.025 229.8)",
116562
+ "--color-ring": "oklch(0.744 0.131 264.3)",
116563
+ "--color-chart-1": "oklch(0.744 0.131 264.3)",
116564
+ "--color-sidebar": "oklch(0.347 0.022 229.8)",
116565
+ "--color-sidebar-foreground": "oklch(0.988 0.018 196.9)",
116566
+ "--color-sidebar-primary": "oklch(0.744 0.131 264.3)",
116567
+ "--color-sidebar-primary-foreground": "oklch(0.309 0.019 229.8)",
116568
+ "--color-sidebar-accent": "oklch(0.418 0.02 225.7)",
116569
+ "--color-sidebar-accent-foreground": "oklch(0.988 0.018 196.9)",
116570
+ "--color-sidebar-border": "oklch(0.375 0.026 211.3)",
116571
+ "--color-sidebar-ring": "oklch(0.744 0.131 264.3)",
116572
+ "--color-status-success": "oklch(0.884 0.124 126.8)",
116573
+ "--color-status-success-strong": "oklch(0.884 0.124 126.8)",
116574
+ "--color-status-success-foreground": "oklch(0.21 0.006 285.885)",
116575
+ "--color-status-active": "oklch(0.869 0.128 81.1)",
116576
+ "--color-status-active-strong": "oklch(0.869 0.128 81.1)",
116577
+ "--color-status-active-foreground": "oklch(0.21 0.006 285.885)",
116578
+ "--color-status-error": "oklch(0.701 0.157 18.6)",
116579
+ "--color-status-error-strong": "oklch(0.701 0.157 18.6)",
116580
+ "--color-status-error-foreground": "oklch(0.985 0 0)",
116581
+ "--color-status-info": "oklch(0.744 0.131 264.3)",
116582
+ "--color-status-info-strong": "oklch(0.744 0.131 264.3)",
116583
+ "--color-status-info-foreground": "oklch(0.21 0.006 285.885)",
116584
+ "--color-status-pending": "oklch(0.797 0.126 81.2)",
116585
+ "--color-status-pending-strong": "oklch(0.797 0.126 81.2)",
116586
+ "--color-status-pending-foreground": "oklch(0.21 0.006 285.885)",
116587
+ "--color-status-warning": "oklch(0.749 0.138 37.5)",
116588
+ "--color-status-warning-strong": "oklch(0.749 0.138 37.5)",
116589
+ "--color-status-warning-foreground": "oklch(0.21 0.006 285.885)",
116590
+ "--color-status-paused": "oklch(0.743 0.135 311.1)",
116591
+ "--color-status-paused-strong": "oklch(0.743 0.135 311.1)",
116592
+ "--color-status-paused-foreground": "oklch(0.21 0.006 285.885)",
116593
+ "--color-status-neutral": "oklch(0.793 0.018 229.1)",
116594
+ "--color-status-neutral-foreground": "oklch(0.21 0.006 285.885)"
116595
+ }
116596
+ }
116597
+ },
116598
+ {
116599
+ id: "solarized",
116600
+ name: "Solarized",
116601
+ description: "Ethan Schoonover's palette; accents are mode-invariant by design (narrow palette: active/pending/warning share stops).",
116602
+ accent: { light: "oklch(0.615 0.139 244.9)", dark: "oklch(0.615 0.139 244.9)" },
116603
+ field: { light: "oklch(0.974 0.026 90.1)", dark: "oklch(0.267 0.049 219.8)" },
116604
+ vars: {
116605
+ light: {
116606
+ "--color-background": "oklch(0.974 0.026 90.1)",
116607
+ "--color-foreground": "oklch(0.523 0.028 219.1)",
116608
+ "--color-card": "oklch(0.974 0.026 90.1)",
116609
+ "--color-card-foreground": "oklch(0.523 0.028 219.1)",
116610
+ "--color-surface": "oklch(0.931 0.026 92.4)",
116611
+ "--color-popover": "oklch(0.974 0.026 90.1)",
116612
+ "--color-popover-foreground": "oklch(0.523 0.028 219.1)",
116613
+ "--color-primary": "oklch(0.615 0.139 244.9)",
116614
+ "--color-primary-foreground": "oklch(0.974 0.026 90.1)",
116615
+ "--color-secondary": "oklch(0.931 0.026 92.4)",
116616
+ "--color-secondary-foreground": "oklch(0.523 0.028 219.1)",
116617
+ "--color-muted": "oklch(0.931 0.026 92.4)",
116618
+ "--color-muted-foreground": "oklch(0.698 0.016 196.8)",
116619
+ "--color-accent": "oklch(0.91 0.029 91.7)",
116620
+ "--color-accent-foreground": "oklch(0.523 0.028 219.1)",
116621
+ "--color-border": "oklch(0.863 0.031 92.3)",
116622
+ "--color-border-subtle": "oklch(0.901 0.028 90.9)",
116623
+ "--color-input": "oklch(0.863 0.031 92.3)",
116624
+ "--color-ring": "oklch(0.615 0.139 244.9)",
116625
+ "--color-chart-1": "oklch(0.615 0.139 244.9)",
116626
+ "--color-sidebar": "oklch(0.931 0.026 92.4)",
116627
+ "--color-sidebar-foreground": "oklch(0.523 0.028 219.1)",
116628
+ "--color-sidebar-primary": "oklch(0.615 0.139 244.9)",
116629
+ "--color-sidebar-primary-foreground": "oklch(0.974 0.026 90.1)",
116630
+ "--color-sidebar-accent": "oklch(0.91 0.029 91.7)",
116631
+ "--color-sidebar-accent-foreground": "oklch(0.523 0.028 219.1)",
116632
+ "--color-sidebar-border": "oklch(0.901 0.028 90.9)",
116633
+ "--color-sidebar-ring": "oklch(0.615 0.139 244.9)",
116634
+ "--color-status-success": "oklch(0.644 0.151 118.6)",
116635
+ "--color-status-success-strong": "oklch(0.644 0.151 118.6)",
116636
+ "--color-status-success-foreground": "oklch(0.985 0 0)",
116637
+ "--color-status-active": "oklch(0.654 0.134 85.7)",
116638
+ "--color-status-active-strong": "oklch(0.654 0.134 85.7)",
116639
+ "--color-status-active-foreground": "oklch(0.985 0 0)",
116640
+ "--color-status-error": "oklch(0.586 0.206 27.1)",
116641
+ "--color-status-error-strong": "oklch(0.586 0.206 27.1)",
116642
+ "--color-status-error-foreground": "oklch(0.985 0 0)",
116643
+ "--color-status-info": "oklch(0.615 0.139 244.9)",
116644
+ "--color-status-info-strong": "oklch(0.615 0.139 244.9)",
116645
+ "--color-status-info-foreground": "oklch(0.985 0 0)",
116646
+ "--color-status-pending": "oklch(0.654 0.134 85.7)",
116647
+ "--color-status-pending-strong": "oklch(0.654 0.134 85.7)",
116648
+ "--color-status-pending-foreground": "oklch(0.985 0 0)",
116649
+ "--color-status-warning": "oklch(0.581 0.173 39.5)",
116650
+ "--color-status-warning-strong": "oklch(0.581 0.173 39.5)",
116651
+ "--color-status-warning-foreground": "oklch(0.985 0 0)",
116652
+ "--color-status-paused": "oklch(0.582 0.126 279.1)",
116653
+ "--color-status-paused-strong": "oklch(0.582 0.126 279.1)",
116654
+ "--color-status-paused-foreground": "oklch(0.985 0 0)",
116655
+ "--color-status-neutral": "oklch(0.698 0.016 196.8)",
116656
+ "--color-status-neutral-foreground": "oklch(0.985 0 0)"
116657
+ },
116658
+ dark: {
116659
+ "--color-background": "oklch(0.267 0.049 219.8)",
116660
+ "--color-foreground": "oklch(0.698 0.016 196.8)",
116661
+ "--color-card": "oklch(0.309 0.052 219.7)",
116662
+ "--color-card-foreground": "oklch(0.698 0.016 196.8)",
116663
+ "--color-surface": "oklch(0.309 0.052 219.7)",
116664
+ "--color-popover": "oklch(0.309 0.052 219.7)",
116665
+ "--color-popover-foreground": "oklch(0.698 0.016 196.8)",
116666
+ "--color-primary": "oklch(0.615 0.139 244.9)",
116667
+ "--color-primary-foreground": "oklch(0.974 0.026 90.1)",
116668
+ "--color-secondary": "oklch(0.36 0.06 220.8)",
116669
+ "--color-secondary-foreground": "oklch(0.698 0.016 196.8)",
116670
+ "--color-muted": "oklch(0.36 0.06 220.8)",
116671
+ "--color-muted-foreground": "oklch(0.568 0.029 221.9)",
116672
+ "--color-accent": "oklch(0.409 0.066 220.7)",
116673
+ "--color-accent-foreground": "oklch(0.698 0.016 196.8)",
116674
+ "--color-border": "oklch(0.435 0.065 215.8)",
116675
+ "--color-border-subtle": "oklch(0.366 0.057 216.3)",
116676
+ "--color-input": "oklch(0.435 0.065 215.8)",
116677
+ "--color-ring": "oklch(0.615 0.139 244.9)",
116678
+ "--color-chart-1": "oklch(0.615 0.139 244.9)",
116679
+ "--color-sidebar": "oklch(0.309 0.052 219.7)",
116680
+ "--color-sidebar-foreground": "oklch(0.698 0.016 196.8)",
116681
+ "--color-sidebar-primary": "oklch(0.615 0.139 244.9)",
116682
+ "--color-sidebar-primary-foreground": "oklch(0.974 0.026 90.1)",
116683
+ "--color-sidebar-accent": "oklch(0.409 0.066 220.7)",
116684
+ "--color-sidebar-accent-foreground": "oklch(0.698 0.016 196.8)",
116685
+ "--color-sidebar-border": "oklch(0.366 0.057 216.3)",
116686
+ "--color-sidebar-ring": "oklch(0.615 0.139 244.9)",
116687
+ "--color-status-success": "oklch(0.644 0.151 118.6)",
116688
+ "--color-status-success-strong": "oklch(0.644 0.151 118.6)",
116689
+ "--color-status-success-foreground": "oklch(0.985 0 0)",
116690
+ "--color-status-active": "oklch(0.654 0.134 85.7)",
116691
+ "--color-status-active-strong": "oklch(0.654 0.134 85.7)",
116692
+ "--color-status-active-foreground": "oklch(0.985 0 0)",
116693
+ "--color-status-error": "oklch(0.586 0.206 27.1)",
116694
+ "--color-status-error-strong": "oklch(0.586 0.206 27.1)",
116695
+ "--color-status-error-foreground": "oklch(0.985 0 0)",
116696
+ "--color-status-info": "oklch(0.615 0.139 244.9)",
116697
+ "--color-status-info-strong": "oklch(0.615 0.139 244.9)",
116698
+ "--color-status-info-foreground": "oklch(0.985 0 0)",
116699
+ "--color-status-pending": "oklch(0.654 0.134 85.7)",
116700
+ "--color-status-pending-strong": "oklch(0.654 0.134 85.7)",
116701
+ "--color-status-pending-foreground": "oklch(0.985 0 0)",
116702
+ "--color-status-warning": "oklch(0.581 0.173 39.5)",
116703
+ "--color-status-warning-strong": "oklch(0.581 0.173 39.5)",
116704
+ "--color-status-warning-foreground": "oklch(0.985 0 0)",
116705
+ "--color-status-paused": "oklch(0.582 0.126 279.1)",
116706
+ "--color-status-paused-strong": "oklch(0.582 0.126 279.1)",
116707
+ "--color-status-paused-foreground": "oklch(0.985 0 0)",
116708
+ "--color-status-neutral": "oklch(0.523 0.028 219.1)",
116709
+ "--color-status-neutral-foreground": "oklch(0.985 0 0)"
116710
+ }
116711
+ }
116712
+ },
116713
+ {
116714
+ id: "tokyo",
116715
+ name: "Tokyo Night",
116716
+ description: "Storm/Night dark + Day light; statuses from the terminal accent set.",
116717
+ accent: { light: "oklch(0.6 0.18 257.5)", dark: "oklch(0.719 0.132 264.2)" },
116718
+ field: { light: "oklch(0.913 0.007 277.2)", dark: "oklch(0.226 0.021 280.5)" },
116719
+ vars: {
116720
+ light: {
116721
+ "--color-background": "oklch(0.913 0.007 277.2)",
116722
+ "--color-foreground": "oklch(0.359 0.051 273.2)",
116723
+ "--color-card": "oklch(0.935 0.004 286.3)",
116724
+ "--color-card-foreground": "oklch(0.359 0.051 273.2)",
116725
+ "--color-surface": "oklch(0.877 0.007 277.2)",
116726
+ "--color-popover": "oklch(0.935 0.004 286.3)",
116727
+ "--color-popover-foreground": "oklch(0.359 0.051 273.2)",
116728
+ "--color-primary": "oklch(0.6 0.18 257.5)",
116729
+ "--color-primary-foreground": "oklch(0.913 0.007 277.2)",
116730
+ "--color-secondary": "oklch(0.877 0.007 277.2)",
116731
+ "--color-secondary-foreground": "oklch(0.359 0.051 273.2)",
116732
+ "--color-muted": "oklch(0.877 0.007 277.2)",
116733
+ "--color-muted-foreground": "oklch(0.555 0.066 275.7)",
116734
+ "--color-accent": "oklch(0.84 0.013 276.1)",
116735
+ "--color-accent-foreground": "oklch(0.359 0.051 273.2)",
116736
+ "--color-border": "oklch(0.828 0.014 277)",
116737
+ "--color-border-subtle": "oklch(0.865 0.011 274.9)",
116738
+ "--color-input": "oklch(0.828 0.014 277)",
116739
+ "--color-ring": "oklch(0.6 0.18 257.5)",
116740
+ "--color-chart-1": "oklch(0.6 0.18 257.5)",
116741
+ "--color-sidebar": "oklch(0.877 0.007 277.2)",
116742
+ "--color-sidebar-foreground": "oklch(0.359 0.051 273.2)",
116743
+ "--color-sidebar-primary": "oklch(0.6 0.18 257.5)",
116744
+ "--color-sidebar-primary-foreground": "oklch(0.913 0.007 277.2)",
116745
+ "--color-sidebar-accent": "oklch(0.84 0.013 276.1)",
116746
+ "--color-sidebar-accent-foreground": "oklch(0.359 0.051 273.2)",
116747
+ "--color-sidebar-border": "oklch(0.865 0.011 274.9)",
116748
+ "--color-sidebar-ring": "oklch(0.6 0.18 257.5)",
116749
+ "--color-status-success": "oklch(0.525 0.093 130.3)",
116750
+ "--color-status-success-strong": "oklch(0.525 0.093 130.3)",
116751
+ "--color-status-success-foreground": "oklch(0.985 0 0)",
116752
+ "--color-status-active": "oklch(0.553 0.075 75.2)",
116753
+ "--color-status-active-strong": "oklch(0.553 0.075 75.2)",
116754
+ "--color-status-active-foreground": "oklch(0.985 0 0)",
116755
+ "--color-status-error": "oklch(0.634 0.233 11.6)",
116756
+ "--color-status-error-strong": "oklch(0.634 0.233 11.6)",
116757
+ "--color-status-error-foreground": "oklch(0.985 0 0)",
116758
+ "--color-status-info": "oklch(0.6 0.18 257.5)",
116759
+ "--color-status-info-strong": "oklch(0.6 0.18 257.5)",
116760
+ "--color-status-info-foreground": "oklch(0.985 0 0)",
116761
+ "--color-status-pending": "oklch(0.553 0.075 75.2)",
116762
+ "--color-status-pending-strong": "oklch(0.553 0.075 75.2)",
116763
+ "--color-status-pending-foreground": "oklch(0.985 0 0)",
116764
+ "--color-status-warning": "oklch(0.565 0.138 56.1)",
116765
+ "--color-status-warning-strong": "oklch(0.565 0.138 56.1)",
116766
+ "--color-status-warning-foreground": "oklch(0.985 0 0)",
116767
+ "--color-status-paused": "oklch(0.515 0.178 299.2)",
116768
+ "--color-status-paused-strong": "oklch(0.515 0.178 299.2)",
116769
+ "--color-status-paused-foreground": "oklch(0.985 0 0)",
116770
+ "--color-status-neutral": "oklch(0.555 0.066 275.7)",
116771
+ "--color-status-neutral-foreground": "oklch(0.985 0 0)"
116772
+ },
116773
+ dark: {
116774
+ "--color-background": "oklch(0.226 0.021 280.5)",
116775
+ "--color-foreground": "oklch(0.846 0.061 274.8)",
116776
+ "--color-card": "oklch(0.261 0.034 274.2)",
116777
+ "--color-card-foreground": "oklch(0.846 0.061 274.8)",
116778
+ "--color-surface": "oklch(0.204 0.016 284.9)",
116779
+ "--color-popover": "oklch(0.261 0.034 274.2)",
116780
+ "--color-popover-foreground": "oklch(0.846 0.061 274.8)",
116781
+ "--color-primary": "oklch(0.719 0.132 264.2)",
116782
+ "--color-primary-foreground": "oklch(0.226 0.021 280.5)",
116783
+ "--color-secondary": "oklch(0.306 0.037 273.2)",
116784
+ "--color-secondary-foreground": "oklch(0.846 0.061 274.8)",
116785
+ "--color-muted": "oklch(0.306 0.037 273.2)",
116786
+ "--color-muted-foreground": "oklch(0.593 0.044 278.8)",
116787
+ "--color-accent": "oklch(0.332 0.045 275)",
116788
+ "--color-accent-foreground": "oklch(0.846 0.061 274.8)",
116789
+ "--color-border": "oklch(0.387 0.054 273.9)",
116790
+ "--color-border-subtle": "oklch(0.309 0.033 272.3)",
116791
+ "--color-input": "oklch(0.387 0.054 273.9)",
116792
+ "--color-ring": "oklch(0.719 0.132 264.2)",
116793
+ "--color-chart-1": "oklch(0.719 0.132 264.2)",
116794
+ "--color-sidebar": "oklch(0.204 0.016 284.9)",
116795
+ "--color-sidebar-foreground": "oklch(0.846 0.061 274.8)",
116796
+ "--color-sidebar-primary": "oklch(0.719 0.132 264.2)",
116797
+ "--color-sidebar-primary-foreground": "oklch(0.226 0.021 280.5)",
116798
+ "--color-sidebar-accent": "oklch(0.332 0.045 275)",
116799
+ "--color-sidebar-accent-foreground": "oklch(0.846 0.061 274.8)",
116800
+ "--color-sidebar-border": "oklch(0.309 0.033 272.3)",
116801
+ "--color-sidebar-ring": "oklch(0.719 0.132 264.2)",
116802
+ "--color-status-success": "oklch(0.795 0.139 130.1)",
116803
+ "--color-status-success-strong": "oklch(0.795 0.139 130.1)",
116804
+ "--color-status-success-foreground": "oklch(0.21 0.006 285.885)",
116805
+ "--color-status-active": "oklch(0.784 0.106 75.4)",
116806
+ "--color-status-active-strong": "oklch(0.784 0.106 75.4)",
116807
+ "--color-status-active-foreground": "oklch(0.21 0.006 285.885)",
116808
+ "--color-status-error": "oklch(0.723 0.159 10.3)",
116809
+ "--color-status-error-strong": "oklch(0.723 0.159 10.3)",
116810
+ "--color-status-error-foreground": "oklch(0.985 0 0)",
116811
+ "--color-status-info": "oklch(0.82 0.105 235.7)",
116812
+ "--color-status-info-strong": "oklch(0.82 0.105 235.7)",
116813
+ "--color-status-info-foreground": "oklch(0.21 0.006 285.885)",
116814
+ "--color-status-pending": "oklch(0.783 0.1 81.4)",
116815
+ "--color-status-pending-strong": "oklch(0.783 0.1 81.4)",
116816
+ "--color-status-pending-foreground": "oklch(0.21 0.006 285.885)",
116817
+ "--color-status-warning": "oklch(0.787 0.137 50.6)",
116818
+ "--color-status-warning-strong": "oklch(0.787 0.137 50.6)",
116819
+ "--color-status-warning-foreground": "oklch(0.21 0.006 285.885)",
116820
+ "--color-status-paused": "oklch(0.751 0.134 299.5)",
116821
+ "--color-status-paused-strong": "oklch(0.751 0.134 299.5)",
116822
+ "--color-status-paused-foreground": "oklch(0.21 0.006 285.885)",
116823
+ "--color-status-neutral": "oklch(0.593 0.044 278.8)",
116824
+ "--color-status-neutral-foreground": "oklch(0.985 0 0)"
116825
+ }
116826
+ }
116827
+ },
116828
+ {
116829
+ id: "monokai",
116830
+ name: "Monokai",
116831
+ description: "Classic dark; light is an adapted sketch (no canonical light exists). Primary = the iconic pink.",
116832
+ accent: { light: "oklch(0.574 0.218 7.8)", dark: "oklch(0.642 0.24 7.5)" },
116833
+ field: { light: "oklch(0.985 0 0)", dark: "oklch(0.274 0.011 114.8)" },
116834
+ vars: {
116835
+ light: {
116836
+ "--color-background": "oklch(0.985 0 0)",
116837
+ "--color-foreground": "oklch(0.274 0.011 114.8)",
116838
+ "--color-card": "oklch(1 0 0)",
116839
+ "--color-card-foreground": "oklch(0.274 0.011 114.8)",
116840
+ "--color-surface": "oklch(0.961 0.003 106.4)",
116841
+ "--color-popover": "oklch(1 0 0)",
116842
+ "--color-popover-foreground": "oklch(0.274 0.011 114.8)",
116843
+ "--color-primary": "oklch(0.574 0.218 7.8)",
116844
+ "--color-primary-foreground": "oklch(1 0 0)",
116845
+ "--color-secondary": "oklch(0.943 0.003 106.5)",
116846
+ "--color-secondary-foreground": "oklch(0.274 0.011 114.8)",
116847
+ "--color-muted": "oklch(0.943 0.003 106.5)",
116848
+ "--color-muted-foreground": "oklch(0.547 0.029 97.4)",
116849
+ "--color-accent": "oklch(0.915 0.005 106.5)",
116850
+ "--color-accent-foreground": "oklch(0.274 0.011 114.8)",
116851
+ "--color-border": "oklch(0.893 0.007 106.5)",
116852
+ "--color-border-subtle": "oklch(0.93 0.005 106.5)",
116853
+ "--color-input": "oklch(0.893 0.007 106.5)",
116854
+ "--color-ring": "oklch(0.574 0.218 7.8)",
116855
+ "--color-chart-1": "oklch(0.574 0.218 7.8)",
116856
+ "--color-sidebar": "oklch(0.961 0.003 106.4)",
116857
+ "--color-sidebar-foreground": "oklch(0.274 0.011 114.8)",
116858
+ "--color-sidebar-primary": "oklch(0.574 0.218 7.8)",
116859
+ "--color-sidebar-primary-foreground": "oklch(1 0 0)",
116860
+ "--color-sidebar-accent": "oklch(0.915 0.005 106.5)",
116861
+ "--color-sidebar-accent-foreground": "oklch(0.274 0.011 114.8)",
116862
+ "--color-sidebar-border": "oklch(0.93 0.005 106.5)",
116863
+ "--color-sidebar-ring": "oklch(0.574 0.218 7.8)",
116864
+ "--color-status-success": "oklch(0.611 0.159 127.7)",
116865
+ "--color-status-success-strong": "oklch(0.611 0.159 127.7)",
116866
+ "--color-status-success-foreground": "oklch(0.985 0 0)",
116867
+ "--color-status-active": "oklch(0.651 0.133 89.1)",
116868
+ "--color-status-active-strong": "oklch(0.651 0.133 89.1)",
116869
+ "--color-status-active-foreground": "oklch(0.985 0 0)",
116870
+ "--color-status-error": "oklch(0.574 0.218 7.8)",
116871
+ "--color-status-error-strong": "oklch(0.574 0.218 7.8)",
116872
+ "--color-status-error-foreground": "oklch(0.985 0 0)",
116873
+ "--color-status-info": "oklch(0.626 0.111 219)",
116874
+ "--color-status-info-strong": "oklch(0.626 0.111 219)",
116875
+ "--color-status-info-foreground": "oklch(0.985 0 0)",
116876
+ "--color-status-pending": "oklch(0.651 0.133 89.1)",
116877
+ "--color-status-pending-strong": "oklch(0.651 0.133 89.1)",
116878
+ "--color-status-pending-foreground": "oklch(0.985 0 0)",
116879
+ "--color-status-warning": "oklch(0.654 0.147 65)",
116880
+ "--color-status-warning-strong": "oklch(0.654 0.147 65)",
116881
+ "--color-status-warning-foreground": "oklch(0.985 0 0)",
116882
+ "--color-status-paused": "oklch(0.554 0.15 296.1)",
116883
+ "--color-status-paused-strong": "oklch(0.554 0.15 296.1)",
116884
+ "--color-status-paused-foreground": "oklch(0.985 0 0)",
116885
+ "--color-status-neutral": "oklch(0.547 0.029 97.4)",
116886
+ "--color-status-neutral-foreground": "oklch(0.985 0 0)"
116887
+ },
116888
+ dark: {
116889
+ "--color-background": "oklch(0.274 0.011 114.8)",
116890
+ "--color-foreground": "oklch(0.977 0.008 106.5)",
116891
+ "--color-card": "oklch(0.298 0.011 114.7)",
116892
+ "--color-card-foreground": "oklch(0.977 0.008 106.5)",
116893
+ "--color-surface": "oklch(0.237 0.006 121.9)",
116894
+ "--color-popover": "oklch(0.298 0.011 114.7)",
116895
+ "--color-popover-foreground": "oklch(0.977 0.008 106.5)",
116896
+ "--color-primary": "oklch(0.642 0.24 7.5)",
116897
+ "--color-primary-foreground": "oklch(0.274 0.011 114.8)",
116898
+ "--color-secondary": "oklch(0.325 0.014 113)",
116899
+ "--color-secondary-foreground": "oklch(0.977 0.008 106.5)",
116900
+ "--color-muted": "oklch(0.325 0.014 113)",
116901
+ "--color-muted-foreground": "oklch(0.654 0.009 114.3)",
116902
+ "--color-accent": "oklch(0.364 0.015 112.3)",
116903
+ "--color-accent-foreground": "oklch(0.977 0.008 106.5)",
116904
+ "--color-border": "oklch(0.401 0.018 111.4)",
116905
+ "--color-border-subtle": "oklch(0.349 0.014 112.9)",
116906
+ "--color-input": "oklch(0.401 0.018 111.4)",
116907
+ "--color-ring": "oklch(0.642 0.24 7.5)",
116908
+ "--color-chart-1": "oklch(0.642 0.24 7.5)",
116909
+ "--color-sidebar": "oklch(0.237 0.006 121.9)",
116910
+ "--color-sidebar-foreground": "oklch(0.977 0.008 106.5)",
116911
+ "--color-sidebar-primary": "oklch(0.642 0.24 7.5)",
116912
+ "--color-sidebar-primary-foreground": "oklch(0.274 0.011 114.8)",
116913
+ "--color-sidebar-accent": "oklch(0.364 0.015 112.3)",
116914
+ "--color-sidebar-accent-foreground": "oklch(0.977 0.008 106.5)",
116915
+ "--color-sidebar-border": "oklch(0.349 0.014 112.9)",
116916
+ "--color-sidebar-ring": "oklch(0.642 0.24 7.5)",
116917
+ "--color-status-success": "oklch(0.841 0.204 127.3)",
116918
+ "--color-status-success-strong": "oklch(0.841 0.204 127.3)",
116919
+ "--color-status-success-foreground": "oklch(0.21 0.006 285.885)",
116920
+ "--color-status-active": "oklch(0.879 0.125 103.2)",
116921
+ "--color-status-active-strong": "oklch(0.879 0.125 103.2)",
116922
+ "--color-status-active-foreground": "oklch(0.21 0.006 285.885)",
116923
+ "--color-status-error": "oklch(0.642 0.24 7.5)",
116924
+ "--color-status-error-strong": "oklch(0.642 0.24 7.5)",
116925
+ "--color-status-error-foreground": "oklch(0.985 0 0)",
116926
+ "--color-status-info": "oklch(0.827 0.108 212)",
116927
+ "--color-status-info-strong": "oklch(0.827 0.108 212)",
116928
+ "--color-status-info-foreground": "oklch(0.21 0.006 285.885)",
116929
+ "--color-status-pending": "oklch(0.879 0.125 103.2)",
116930
+ "--color-status-pending-strong": "oklch(0.879 0.125 103.2)",
116931
+ "--color-status-pending-foreground": "oklch(0.21 0.006 285.885)",
116932
+ "--color-status-warning": "oklch(0.767 0.168 62.4)",
116933
+ "--color-status-warning-strong": "oklch(0.767 0.168 62.4)",
116934
+ "--color-status-warning-foreground": "oklch(0.21 0.006 285.885)",
116935
+ "--color-status-paused": "oklch(0.701 0.181 298.1)",
116936
+ "--color-status-paused-strong": "oklch(0.701 0.181 298.1)",
116937
+ "--color-status-paused-foreground": "oklch(0.985 0 0)",
116938
+ "--color-status-neutral": "oklch(0.654 0.009 114.3)",
116939
+ "--color-status-neutral-foreground": "oklch(0.985 0 0)"
116940
+ }
116941
+ }
116942
+ },
116943
+ {
116944
+ id: "gruvbox",
116945
+ name: "Gruvbox",
116946
+ description: "Dark uses the bright accent set, light the faded set. Primary = gruvbox orange.",
116947
+ accent: { light: "oklch(0.513 0.162 39.3)", dark: "oklch(0.731 0.182 51.7)" },
116948
+ field: { light: "oklch(0.956 0.055 96.2)", dark: "oklch(0.277 0 0)" },
116949
+ vars: {
116950
+ light: {
116951
+ "--color-background": "oklch(0.956 0.055 96.2)",
116952
+ "--color-foreground": "oklch(0.344 0.007 48.5)",
116953
+ "--color-card": "oklch(0.965 0.039 100.9)",
116954
+ "--color-card-foreground": "oklch(0.344 0.007 48.5)",
116955
+ "--color-surface": "oklch(0.922 0.055 92.5)",
116956
+ "--color-popover": "oklch(0.965 0.039 100.9)",
116957
+ "--color-popover-foreground": "oklch(0.344 0.007 48.5)",
116958
+ "--color-primary": "oklch(0.513 0.162 39.3)",
116959
+ "--color-primary-foreground": "oklch(0.956 0.055 96.2)",
116960
+ "--color-secondary": "oklch(0.894 0.057 89.2)",
116961
+ "--color-secondary-foreground": "oklch(0.344 0.007 48.5)",
116962
+ "--color-muted": "oklch(0.894 0.057 89.2)",
116963
+ "--color-muted-foreground": "oklch(0.55 0.023 62.6)",
116964
+ "--color-accent": "oklch(0.859 0.054 86.7)",
116965
+ "--color-accent-foreground": "oklch(0.344 0.007 48.5)",
116966
+ "--color-border": "oklch(0.825 0.051 85.1)",
116967
+ "--color-border-subtle": "oklch(0.88 0.051 86.9)",
116968
+ "--color-input": "oklch(0.825 0.051 85.1)",
116969
+ "--color-ring": "oklch(0.513 0.162 39.3)",
116970
+ "--color-chart-1": "oklch(0.513 0.162 39.3)",
116971
+ "--color-sidebar": "oklch(0.922 0.055 92.5)",
116972
+ "--color-sidebar-foreground": "oklch(0.344 0.007 48.5)",
116973
+ "--color-sidebar-primary": "oklch(0.513 0.162 39.3)",
116974
+ "--color-sidebar-primary-foreground": "oklch(0.956 0.055 96.2)",
116975
+ "--color-sidebar-accent": "oklch(0.859 0.054 86.7)",
116976
+ "--color-sidebar-accent-foreground": "oklch(0.344 0.007 48.5)",
116977
+ "--color-sidebar-border": "oklch(0.88 0.051 86.9)",
116978
+ "--color-sidebar-ring": "oklch(0.513 0.162 39.3)",
116979
+ "--color-status-success": "oklch(0.546 0.112 106.5)",
116980
+ "--color-status-success-strong": "oklch(0.546 0.112 106.5)",
116981
+ "--color-status-success-foreground": "oklch(0.985 0 0)",
116982
+ "--color-status-active": "oklch(0.618 0.128 70.7)",
116983
+ "--color-status-active-strong": "oklch(0.618 0.128 70.7)",
116984
+ "--color-status-active-foreground": "oklch(0.985 0 0)",
116985
+ "--color-status-error": "oklch(0.437 0.179 28.3)",
116986
+ "--color-status-error-strong": "oklch(0.437 0.179 28.3)",
116987
+ "--color-status-error-foreground": "oklch(0.985 0 0)",
116988
+ "--color-status-info": "oklch(0.471 0.082 215.8)",
116989
+ "--color-status-info-strong": "oklch(0.471 0.082 215.8)",
116990
+ "--color-status-info-foreground": "oklch(0.985 0 0)",
116991
+ "--color-status-pending": "oklch(0.618 0.128 70.7)",
116992
+ "--color-status-pending-strong": "oklch(0.618 0.128 70.7)",
116993
+ "--color-status-pending-foreground": "oklch(0.985 0 0)",
116994
+ "--color-status-warning": "oklch(0.513 0.162 39.3)",
116995
+ "--color-status-warning-strong": "oklch(0.513 0.162 39.3)",
116996
+ "--color-status-warning-foreground": "oklch(0.985 0 0)",
116997
+ "--color-status-paused": "oklch(0.489 0.124 344.3)",
116998
+ "--color-status-paused-strong": "oklch(0.489 0.124 344.3)",
116999
+ "--color-status-paused-foreground": "oklch(0.985 0 0)",
117000
+ "--color-status-neutral": "oklch(0.55 0.023 62.6)",
117001
+ "--color-status-neutral-foreground": "oklch(0.985 0 0)"
117002
+ },
117003
+ dark: {
117004
+ "--color-background": "oklch(0.277 0 0)",
117005
+ "--color-foreground": "oklch(0.894 0.057 89.2)",
117006
+ "--color-card": "oklch(0.311 0.003 48.6)",
117007
+ "--color-card-foreground": "oklch(0.894 0.057 89.2)",
117008
+ "--color-surface": "oklch(0.241 0.005 219.7)",
117009
+ "--color-popover": "oklch(0.311 0.003 48.6)",
117010
+ "--color-popover-foreground": "oklch(0.894 0.057 89.2)",
117011
+ "--color-primary": "oklch(0.731 0.182 51.7)",
117012
+ "--color-primary-foreground": "oklch(0.277 0 0)",
117013
+ "--color-secondary": "oklch(0.344 0.007 48.5)",
117014
+ "--color-secondary-foreground": "oklch(0.894 0.057 89.2)",
117015
+ "--color-muted": "oklch(0.344 0.007 48.5)",
117016
+ "--color-muted-foreground": "oklch(0.69 0.035 76.3)",
117017
+ "--color-accent": "oklch(0.375 0.009 53.2)",
117018
+ "--color-accent-foreground": "oklch(0.894 0.057 89.2)",
117019
+ "--color-border": "oklch(0.411 0.012 51.9)",
117020
+ "--color-border-subtle": "oklch(0.344 0.007 48.5)",
117021
+ "--color-input": "oklch(0.411 0.012 51.9)",
117022
+ "--color-ring": "oklch(0.731 0.182 51.7)",
117023
+ "--color-chart-1": "oklch(0.731 0.182 51.7)",
117024
+ "--color-sidebar": "oklch(0.241 0.005 219.7)",
117025
+ "--color-sidebar-foreground": "oklch(0.894 0.057 89.2)",
117026
+ "--color-sidebar-primary": "oklch(0.731 0.182 51.7)",
117027
+ "--color-sidebar-primary-foreground": "oklch(0.277 0 0)",
117028
+ "--color-sidebar-accent": "oklch(0.375 0.009 53.2)",
117029
+ "--color-sidebar-accent-foreground": "oklch(0.894 0.057 89.2)",
117030
+ "--color-sidebar-border": "oklch(0.344 0.007 48.5)",
117031
+ "--color-sidebar-ring": "oklch(0.731 0.182 51.7)",
117032
+ "--color-status-success": "oklch(0.765 0.158 110.8)",
117033
+ "--color-status-success-strong": "oklch(0.765 0.158 110.8)",
117034
+ "--color-status-success-foreground": "oklch(0.21 0.006 285.885)",
117035
+ "--color-status-active": "oklch(0.832 0.159 83)",
117036
+ "--color-status-active-strong": "oklch(0.832 0.159 83)",
117037
+ "--color-status-active-foreground": "oklch(0.21 0.006 285.885)",
117038
+ "--color-status-error": "oklch(0.66 0.218 30.4)",
117039
+ "--color-status-error-strong": "oklch(0.66 0.218 30.4)",
117040
+ "--color-status-error-foreground": "oklch(0.985 0 0)",
117041
+ "--color-status-info": "oklch(0.693 0.042 169.8)",
117042
+ "--color-status-info-strong": "oklch(0.693 0.042 169.8)",
117043
+ "--color-status-info-foreground": "oklch(0.985 0 0)",
117044
+ "--color-status-pending": "oklch(0.725 0.143 77.7)",
117045
+ "--color-status-pending-strong": "oklch(0.725 0.143 77.7)",
117046
+ "--color-status-pending-foreground": "oklch(0.985 0 0)",
117047
+ "--color-status-warning": "oklch(0.731 0.182 51.7)",
117048
+ "--color-status-warning-strong": "oklch(0.731 0.182 51.7)",
117049
+ "--color-status-warning-foreground": "oklch(0.985 0 0)",
117050
+ "--color-status-paused": "oklch(0.705 0.098 2.2)",
117051
+ "--color-status-paused-strong": "oklch(0.705 0.098 2.2)",
117052
+ "--color-status-paused-foreground": "oklch(0.985 0 0)",
117053
+ "--color-status-neutral": "oklch(0.69 0.035 76.3)",
117054
+ "--color-status-neutral-foreground": "oklch(0.985 0 0)"
117055
+ }
117056
+ }
117057
+ },
117058
+ {
117059
+ id: "catppuccin",
117060
+ name: "Catppuccin",
117061
+ description: "Latte light / Mocha dark. Primary = catppuccin mauve.",
117062
+ accent: { light: "oklch(0.555 0.25 297)", dark: "oklch(0.787 0.119 304.8)" },
117063
+ field: { light: "oklch(0.958 0.006 264.5)", dark: "oklch(0.243 0.03 283.9)" },
117064
+ vars: {
117065
+ light: {
117066
+ "--color-background": "oklch(0.958 0.006 264.5)",
117067
+ "--color-foreground": "oklch(0.435 0.043 279.3)",
117068
+ "--color-card": "oklch(0.958 0.006 264.5)",
117069
+ "--color-card-foreground": "oklch(0.435 0.043 279.3)",
117070
+ "--color-surface": "oklch(0.933 0.009 264.5)",
117071
+ "--color-popover": "oklch(0.958 0.006 264.5)",
117072
+ "--color-popover-foreground": "oklch(0.435 0.043 279.3)",
117073
+ "--color-primary": "oklch(0.555 0.25 297)",
117074
+ "--color-primary-foreground": "oklch(0.958 0.006 264.5)",
117075
+ "--color-secondary": "oklch(0.906 0.012 264.5)",
117076
+ "--color-secondary-foreground": "oklch(0.435 0.043 279.3)",
117077
+ "--color-muted": "oklch(0.906 0.012 264.5)",
117078
+ "--color-muted-foreground": "oklch(0.492 0.038 279.3)",
117079
+ "--color-accent": "oklch(0.857 0.014 268.5)",
117080
+ "--color-accent-foreground": "oklch(0.435 0.043 279.3)",
117081
+ "--color-border": "oklch(0.857 0.014 268.5)",
117082
+ "--color-border-subtle": "oklch(0.906 0.012 264.5)",
117083
+ "--color-input": "oklch(0.857 0.014 268.5)",
117084
+ "--color-ring": "oklch(0.555 0.25 297)",
117085
+ "--color-chart-1": "oklch(0.555 0.25 297)",
117086
+ "--color-sidebar": "oklch(0.933 0.009 264.5)",
117087
+ "--color-sidebar-foreground": "oklch(0.435 0.043 279.3)",
117088
+ "--color-sidebar-primary": "oklch(0.555 0.25 297)",
117089
+ "--color-sidebar-primary-foreground": "oklch(0.958 0.006 264.5)",
117090
+ "--color-sidebar-accent": "oklch(0.857 0.014 268.5)",
117091
+ "--color-sidebar-accent-foreground": "oklch(0.435 0.043 279.3)",
117092
+ "--color-sidebar-border": "oklch(0.906 0.012 264.5)",
117093
+ "--color-sidebar-ring": "oklch(0.555 0.25 297)",
117094
+ "--color-status-success": "oklch(0.625 0.177 140.4)",
117095
+ "--color-status-success-strong": "oklch(0.52 0.177 140.4)",
117096
+ "--color-status-success-foreground": "oklch(0.183 0.02 284.2)",
117097
+ "--color-status-active": "oklch(0.714 0.149 67.8)",
117098
+ "--color-status-active-strong": "oklch(0.544 0.149 67.8)",
117099
+ "--color-status-active-foreground": "oklch(0.183 0.02 284.2)",
117100
+ "--color-status-error": "oklch(0.55 0.216 19.8)",
117101
+ "--color-status-error-strong": "oklch(0.55 0.216 19.8)",
117102
+ "--color-status-error-foreground": "oklch(0.958 0.006 264.5)",
117103
+ "--color-status-info": "oklch(0.648 0.107 212.9)",
117104
+ "--color-status-info-strong": "oklch(0.523 0.107 212.9)",
117105
+ "--color-status-info-foreground": "oklch(0.183 0.02 284.2)",
117106
+ "--color-status-pending": "oklch(0.714 0.149 67.8)",
117107
+ "--color-status-pending-strong": "oklch(0.544 0.149 67.8)",
117108
+ "--color-status-pending-foreground": "oklch(0.183 0.02 284.2)",
117109
+ "--color-status-warning": "oklch(0.692 0.204 42.4)",
117110
+ "--color-status-warning-strong": "oklch(0.557 0.204 42.4)",
117111
+ "--color-status-warning-foreground": "oklch(0.183 0.02 284.2)",
117112
+ "--color-status-paused": "oklch(0.664 0.175 273.1)",
117113
+ "--color-status-paused-strong": "oklch(0.549 0.175 273.1)",
117114
+ "--color-status-paused-foreground": "oklch(0.183 0.02 284.2)",
117115
+ "--color-status-neutral": "oklch(0.492 0.038 279.3)",
117116
+ "--color-status-neutral-strong": "oklch(0.492 0.038 279.3)",
117117
+ "--color-status-neutral-foreground": "oklch(0.958 0.006 264.5)"
117118
+ },
117119
+ dark: {
117120
+ "--color-background": "oklch(0.243 0.03 283.9)",
117121
+ "--color-foreground": "oklch(0.879 0.043 272.3)",
117122
+ "--color-card": "oklch(0.324 0.032 282)",
117123
+ "--color-card-foreground": "oklch(0.879 0.043 272.3)",
117124
+ "--color-surface": "oklch(0.216 0.025 284.1)",
117125
+ "--color-popover": "oklch(0.324 0.032 282)",
117126
+ "--color-popover-foreground": "oklch(0.879 0.043 272.3)",
117127
+ "--color-primary": "oklch(0.787 0.119 304.8)",
117128
+ "--color-primary-foreground": "oklch(0.243 0.03 283.9)",
117129
+ "--color-secondary": "oklch(0.404 0.032 280.2)",
117130
+ "--color-secondary-foreground": "oklch(0.879 0.043 272.3)",
117131
+ "--color-muted": "oklch(0.404 0.032 280.2)",
117132
+ "--color-muted-foreground": "oklch(0.817 0.04 272.9)",
117133
+ "--color-accent": "oklch(0.404 0.032 280.2)",
117134
+ "--color-accent-foreground": "oklch(0.879 0.043 272.3)",
117135
+ "--color-border": "oklch(0.879 0.043 272.3 / 12%)",
117136
+ "--color-border-subtle": "oklch(0.879 0.043 272.3 / 8%)",
117137
+ "--color-input": "oklch(0.879 0.043 272.3 / 15%)",
117138
+ "--color-ring": "oklch(0.787 0.119 304.8)",
117139
+ "--color-chart-1": "oklch(0.787 0.119 304.8)",
117140
+ "--color-sidebar": "oklch(0.216 0.025 284.1)",
117141
+ "--color-sidebar-foreground": "oklch(0.879 0.043 272.3)",
117142
+ "--color-sidebar-primary": "oklch(0.787 0.119 304.8)",
117143
+ "--color-sidebar-primary-foreground": "oklch(0.243 0.03 283.9)",
117144
+ "--color-sidebar-accent": "oklch(0.324 0.032 282)",
117145
+ "--color-sidebar-accent-foreground": "oklch(0.879 0.043 272.3)",
117146
+ "--color-sidebar-border": "oklch(0.879 0.043 272.3 / 8%)",
117147
+ "--color-sidebar-ring": "oklch(0.787 0.119 304.8)",
117148
+ "--color-status-success": "oklch(0.858 0.109 142.7)",
117149
+ "--color-status-success-strong": "oklch(0.858 0.109 142.7)",
117150
+ "--color-status-success-foreground": "oklch(0.183 0.02 284.2)",
117151
+ "--color-status-active": "oklch(0.919 0.07 86.5)",
117152
+ "--color-status-active-strong": "oklch(0.919 0.07 86.5)",
117153
+ "--color-status-active-foreground": "oklch(0.183 0.02 284.2)",
117154
+ "--color-status-error": "oklch(0.756 0.13 2.8)",
117155
+ "--color-status-error-strong": "oklch(0.756 0.13 2.8)",
117156
+ "--color-status-error-foreground": "oklch(0.183 0.02 284.2)",
117157
+ "--color-status-info": "oklch(0.791 0.096 228.7)",
117158
+ "--color-status-info-strong": "oklch(0.791 0.096 228.7)",
117159
+ "--color-status-info-foreground": "oklch(0.183 0.02 284.2)",
117160
+ "--color-status-pending": "oklch(0.919 0.07 86.5)",
117161
+ "--color-status-pending-strong": "oklch(0.919 0.07 86.5)",
117162
+ "--color-status-pending-foreground": "oklch(0.183 0.02 284.2)",
117163
+ "--color-status-warning": "oklch(0.824 0.101 52.6)",
117164
+ "--color-status-warning-strong": "oklch(0.824 0.101 52.6)",
117165
+ "--color-status-warning-foreground": "oklch(0.183 0.02 284.2)",
117166
+ "--color-status-paused": "oklch(0.817 0.091 277.3)",
117167
+ "--color-status-paused-strong": "oklch(0.817 0.091 277.3)",
117168
+ "--color-status-paused-foreground": "oklch(0.183 0.02 284.2)",
117169
+ "--color-status-neutral": "oklch(0.751 0.04 273.9)",
117170
+ "--color-status-neutral-strong": "oklch(0.751 0.04 273.9)",
117171
+ "--color-status-neutral-foreground": "oklch(0.183 0.02 284.2)"
117172
+ }
117173
+ }
117174
+ }
117175
+ ];
117176
+ });
117177
+
117178
+ // src/themes/presets.ts
117179
+ function accentPreset(id, name, description, light, dark) {
117180
+ return {
117181
+ id,
117182
+ name,
117183
+ description,
117184
+ accent: { light: light.primary, dark: dark.primary },
117185
+ field: { light: "oklch(1 0 0)", dark: "oklch(0.141 0.005 285.823)" },
117186
+ vars: {
117187
+ light: {
117188
+ "--color-primary": light.primary,
117189
+ "--color-primary-foreground": light.primaryForeground,
117190
+ "--color-ring": light.primary,
117191
+ "--color-sidebar-primary": light.primary,
117192
+ "--color-sidebar-primary-foreground": light.primaryForeground,
117193
+ "--color-sidebar-ring": light.primary,
117194
+ "--color-chart-1": light.primary
117195
+ },
117196
+ dark: {
117197
+ "--color-primary": dark.primary,
117198
+ "--color-primary-foreground": dark.primaryForeground,
117199
+ "--color-ring": dark.primary,
117200
+ "--color-sidebar-primary": dark.primary,
117201
+ "--color-sidebar-primary-foreground": dark.primaryForeground,
117202
+ "--color-sidebar-ring": dark.primary,
117203
+ "--color-chart-1": dark.primary
117204
+ }
117205
+ }
117206
+ };
117207
+ }
117208
+ function getThemePreset(id) {
117209
+ if (!id)
117210
+ return null;
117211
+ return PRESETS_BY_ID.get(id) ?? null;
117212
+ }
117213
+ function isThemePresetId(id) {
117214
+ return PRESETS_BY_ID.has(id);
117215
+ }
117216
+ var DEFAULT_THEME_ID = "hive", NEAR_WHITE = "oklch(0.985 0 0)", ZINC_900 = "oklch(0.21 0.006 285.885)", THEME_PRESETS, PRESETS_BY_ID, THEME_PRESET_IDS;
117217
+ var init_presets = __esm(() => {
117218
+ init_classics();
117219
+ THEME_PRESETS = [
117220
+ {
117221
+ id: DEFAULT_THEME_ID,
117222
+ name: "Hive",
117223
+ description: "The stock Mission Control look: zinc field, one amber voice.",
117224
+ accent: { light: "oklch(0.555 0.163 48.998)", dark: "oklch(0.769 0.188 70.08)" },
117225
+ field: { light: "oklch(1 0 0)", dark: "oklch(0.141 0.005 285.823)" },
117226
+ vars: { light: {}, dark: {} }
117227
+ },
117228
+ accentPreset("meadow", "Meadow", "Zinc field with an emerald voice.", { primary: "oklch(0.596 0.145 163.225)", primaryForeground: NEAR_WHITE }, { primary: "oklch(0.765 0.177 163.223)", primaryForeground: ZINC_900 }),
117229
+ accentPreset("iris", "Iris", "Zinc field with a violet voice.", { primary: "oklch(0.541 0.281 293.009)", primaryForeground: NEAR_WHITE }, { primary: "oklch(0.702 0.183 293.541)", primaryForeground: ZINC_900 }),
117230
+ accentPreset("rose", "Rose", "Zinc field with a deep rose voice.", { primary: "oklch(0.586 0.253 17.585)", primaryForeground: NEAR_WHITE }, { primary: "oklch(0.712 0.194 13.428)", primaryForeground: ZINC_900 }),
117231
+ {
117232
+ id: "cobalt",
117233
+ name: "Cobalt",
117234
+ description: "Cool slate field with a saturated blue voice.",
117235
+ accent: { light: "oklch(0.546 0.245 262.881)", dark: "oklch(0.707 0.165 254.624)" },
117236
+ field: { light: "oklch(1 0 0)", dark: "oklch(0.129 0.042 264.695)" },
117237
+ vars: {
117238
+ light: {
117239
+ "--color-foreground": "oklch(0.129 0.042 264.695)",
117240
+ "--color-card-foreground": "oklch(0.129 0.042 264.695)",
117241
+ "--color-popover-foreground": "oklch(0.129 0.042 264.695)",
117242
+ "--color-surface": "oklch(0.984 0.003 247.858)",
117243
+ "--color-primary": "oklch(0.546 0.245 262.881)",
117244
+ "--color-primary-foreground": NEAR_WHITE,
117245
+ "--color-secondary": "oklch(0.968 0.007 247.896)",
117246
+ "--color-secondary-foreground": "oklch(0.208 0.042 265.755)",
117247
+ "--color-muted": "oklch(0.968 0.007 247.896)",
117248
+ "--color-muted-foreground": "oklch(0.554 0.046 257.417)",
117249
+ "--color-accent": "oklch(0.945 0.01 251.7)",
117250
+ "--color-accent-foreground": "oklch(0.208 0.042 265.755)",
117251
+ "--color-border": "oklch(0.929 0.013 255.508)",
117252
+ "--color-border-subtle": "oklch(0.948 0.01 252)",
117253
+ "--color-input": "oklch(0.929 0.013 255.508)",
117254
+ "--color-ring": "oklch(0.546 0.245 262.881)",
117255
+ "--color-chart-1": "oklch(0.546 0.245 262.881)",
117256
+ "--color-sidebar": "oklch(0.984 0.003 247.858)",
117257
+ "--color-sidebar-foreground": "oklch(0.129 0.042 264.695)",
117258
+ "--color-sidebar-primary": "oklch(0.546 0.245 262.881)",
117259
+ "--color-sidebar-primary-foreground": NEAR_WHITE,
117260
+ "--color-sidebar-accent": "oklch(0.945 0.01 251.7)",
117261
+ "--color-sidebar-accent-foreground": "oklch(0.208 0.042 265.755)",
117262
+ "--color-sidebar-border": "oklch(0.948 0.01 252)",
117263
+ "--color-sidebar-ring": "oklch(0.546 0.245 262.881)"
117264
+ },
117265
+ dark: {
117266
+ "--color-background": "oklch(0.129 0.042 264.695)",
117267
+ "--color-foreground": NEAR_WHITE,
117268
+ "--color-card": "oklch(0.208 0.042 265.755)",
117269
+ "--color-card-foreground": NEAR_WHITE,
117270
+ "--color-surface": "oklch(0.17 0.042 265)",
117271
+ "--color-popover": "oklch(0.208 0.042 265.755)",
117272
+ "--color-popover-foreground": NEAR_WHITE,
117273
+ "--color-primary": "oklch(0.707 0.165 254.624)",
117274
+ "--color-primary-foreground": "oklch(0.129 0.042 264.695)",
117275
+ "--color-secondary": "oklch(0.279 0.041 260.031)",
117276
+ "--color-secondary-foreground": NEAR_WHITE,
117277
+ "--color-muted": "oklch(0.279 0.041 260.031)",
117278
+ "--color-muted-foreground": "oklch(0.704 0.04 256.788)",
117279
+ "--color-accent": "oklch(0.279 0.041 260.031)",
117280
+ "--color-accent-foreground": NEAR_WHITE,
117281
+ "--color-border": "oklch(1 0 0 / 10%)",
117282
+ "--color-border-subtle": "oklch(1 0 0 / 8%)",
117283
+ "--color-input": "oklch(1 0 0 / 15%)",
117284
+ "--color-ring": "oklch(0.707 0.165 254.624)",
117285
+ "--color-chart-1": "oklch(0.707 0.165 254.624)",
117286
+ "--color-sidebar": "oklch(0.208 0.042 265.755)",
117287
+ "--color-sidebar-foreground": NEAR_WHITE,
117288
+ "--color-sidebar-primary": "oklch(0.707 0.165 254.624)",
117289
+ "--color-sidebar-primary-foreground": NEAR_WHITE,
117290
+ "--color-sidebar-accent": "oklch(0.279 0.041 260.031)",
117291
+ "--color-sidebar-accent-foreground": NEAR_WHITE,
117292
+ "--color-sidebar-border": "oklch(1 0 0 / 8%)",
117293
+ "--color-sidebar-ring": "oklch(0.707 0.165 254.624)"
117294
+ }
117295
+ }
117296
+ },
117297
+ {
117298
+ id: "ember",
117299
+ name: "Ember",
117300
+ description: "Warm stone field with a burnt orange voice.",
117301
+ accent: { light: "oklch(0.646 0.222 41.116)", dark: "oklch(0.75 0.183 55.934)" },
117302
+ field: { light: "oklch(0.985 0.001 106.423)", dark: "oklch(0.147 0.004 49.25)" },
117303
+ vars: {
117304
+ light: {
117305
+ "--color-background": "oklch(0.985 0.001 106.423)",
117306
+ "--color-foreground": "oklch(0.147 0.004 49.25)",
117307
+ "--color-card": "oklch(1 0 0)",
117308
+ "--color-card-foreground": "oklch(0.147 0.004 49.25)",
117309
+ "--color-surface": "oklch(0.97 0.001 106.424)",
117310
+ "--color-popover": "oklch(1 0 0)",
117311
+ "--color-popover-foreground": "oklch(0.147 0.004 49.25)",
117312
+ "--color-primary": "oklch(0.646 0.222 41.116)",
117313
+ "--color-primary-foreground": NEAR_WHITE,
117314
+ "--color-secondary": "oklch(0.97 0.001 106.424)",
117315
+ "--color-secondary-foreground": "oklch(0.216 0.006 56.043)",
117316
+ "--color-muted": "oklch(0.97 0.001 106.424)",
117317
+ "--color-muted-foreground": "oklch(0.553 0.013 58.071)",
117318
+ "--color-accent": "oklch(0.946 0.002 48.7)",
117319
+ "--color-accent-foreground": "oklch(0.216 0.006 56.043)",
117320
+ "--color-border": "oklch(0.923 0.003 48.717)",
117321
+ "--color-border-subtle": "oklch(0.947 0.002 48.717)",
117322
+ "--color-input": "oklch(0.923 0.003 48.717)",
117323
+ "--color-ring": "oklch(0.646 0.222 41.116)",
117324
+ "--color-chart-1": "oklch(0.646 0.222 41.116)",
117325
+ "--color-sidebar": "oklch(0.97 0.001 106.424)",
117326
+ "--color-sidebar-foreground": "oklch(0.147 0.004 49.25)",
117327
+ "--color-sidebar-primary": "oklch(0.646 0.222 41.116)",
117328
+ "--color-sidebar-primary-foreground": NEAR_WHITE,
117329
+ "--color-sidebar-accent": "oklch(0.923 0.003 48.717)",
117330
+ "--color-sidebar-accent-foreground": "oklch(0.216 0.006 56.043)",
117331
+ "--color-sidebar-border": "oklch(0.947 0.002 48.717)",
117332
+ "--color-sidebar-ring": "oklch(0.646 0.222 41.116)"
117333
+ },
117334
+ dark: {
117335
+ "--color-background": "oklch(0.147 0.004 49.25)",
117336
+ "--color-foreground": NEAR_WHITE,
117337
+ "--color-card": "oklch(0.216 0.006 56.043)",
117338
+ "--color-card-foreground": NEAR_WHITE,
117339
+ "--color-surface": "oklch(0.185 0.005 49)",
117340
+ "--color-popover": "oklch(0.216 0.006 56.043)",
117341
+ "--color-popover-foreground": NEAR_WHITE,
117342
+ "--color-primary": "oklch(0.75 0.183 55.934)",
117343
+ "--color-primary-foreground": "oklch(0.147 0.004 49.25)",
117344
+ "--color-secondary": "oklch(0.268 0.007 34.298)",
117345
+ "--color-secondary-foreground": NEAR_WHITE,
117346
+ "--color-muted": "oklch(0.268 0.007 34.298)",
117347
+ "--color-muted-foreground": "oklch(0.709 0.01 56.259)",
117348
+ "--color-accent": "oklch(0.268 0.007 34.298)",
117349
+ "--color-accent-foreground": NEAR_WHITE,
117350
+ "--color-border": "oklch(1 0 0 / 10%)",
117351
+ "--color-border-subtle": "oklch(1 0 0 / 8%)",
117352
+ "--color-input": "oklch(1 0 0 / 15%)",
117353
+ "--color-ring": "oklch(0.75 0.183 55.934)",
117354
+ "--color-chart-1": "oklch(0.75 0.183 55.934)",
117355
+ "--color-sidebar": "oklch(0.216 0.006 56.043)",
117356
+ "--color-sidebar-foreground": NEAR_WHITE,
117357
+ "--color-sidebar-primary": "oklch(0.75 0.183 55.934)",
117358
+ "--color-sidebar-primary-foreground": NEAR_WHITE,
117359
+ "--color-sidebar-accent": "oklch(0.268 0.007 34.298)",
117360
+ "--color-sidebar-accent-foreground": NEAR_WHITE,
117361
+ "--color-sidebar-border": "oklch(1 0 0 / 8%)",
117362
+ "--color-sidebar-ring": "oklch(0.75 0.183 55.934)"
117363
+ }
117364
+ }
117365
+ },
117366
+ {
117367
+ id: "carbon",
117368
+ name: "Carbon",
117369
+ description: "Pure monochrome. The interface recedes, the data speaks.",
117370
+ accent: { light: ZINC_900, dark: NEAR_WHITE },
117371
+ field: { light: "oklch(1 0 0)", dark: "oklch(0.141 0.005 285.823)" },
117372
+ vars: {
117373
+ light: {
117374
+ "--color-primary": ZINC_900,
117375
+ "--color-primary-foreground": NEAR_WHITE,
117376
+ "--color-ring": "oklch(0.552 0.016 285.938)",
117377
+ "--color-sidebar-primary": ZINC_900,
117378
+ "--color-sidebar-primary-foreground": NEAR_WHITE,
117379
+ "--color-sidebar-ring": "oklch(0.552 0.016 285.938)"
117380
+ },
117381
+ dark: {
117382
+ "--color-primary": NEAR_WHITE,
117383
+ "--color-primary-foreground": ZINC_900,
117384
+ "--color-ring": "oklch(0.705 0.015 286.067)",
117385
+ "--color-sidebar-primary": NEAR_WHITE,
117386
+ "--color-sidebar-primary-foreground": ZINC_900,
117387
+ "--color-sidebar-ring": "oklch(0.705 0.015 286.067)"
117388
+ }
117389
+ }
117390
+ },
117391
+ {
117392
+ id: "paper",
117393
+ name: "Paper",
117394
+ description: "Warm editorial paper: off-white field, white cards, one blue voice.",
117395
+ accent: { light: "oklch(0.546 0.215 262.881)", dark: "oklch(0.714 0.143 254.624)" },
117396
+ field: { light: "oklch(0.973 0.004 91.446)", dark: "oklch(0.21 0.005 91.5)" },
117397
+ vars: {
117398
+ light: {
117399
+ "--color-background": "oklch(0.973 0.004 91.446)",
117400
+ "--color-foreground": ZINC_900,
117401
+ "--color-card": "oklch(1 0 0)",
117402
+ "--color-card-foreground": ZINC_900,
117403
+ "--color-surface": "oklch(0.988 0.001 106.423)",
117404
+ "--color-popover": "oklch(1 0 0)",
117405
+ "--color-popover-foreground": ZINC_900,
117406
+ "--color-primary": "oklch(0.546 0.215 262.881)",
117407
+ "--color-primary-foreground": NEAR_WHITE,
117408
+ "--color-secondary": "oklch(0.951 0.006 91.5)",
117409
+ "--color-secondary-foreground": ZINC_900,
117410
+ "--color-muted": "oklch(0.951 0.006 91.5)",
117411
+ "--color-muted-foreground": "oklch(0.504 0.01 271.22)",
117412
+ "--color-accent": "oklch(0.932 0.008 91.5)",
117413
+ "--color-accent-foreground": ZINC_900,
117414
+ "--color-border": "oklch(0.891 0.013 91.529)",
117415
+ "--color-border-subtle": "oklch(0.925 0.009 91.5)",
117416
+ "--color-input": "oklch(0.891 0.013 91.529)",
117417
+ "--color-ring": "oklch(0.546 0.215 262.881)",
117418
+ "--color-chart-1": "oklch(0.546 0.215 262.881)",
117419
+ "--color-sidebar": "oklch(0.951 0.006 91.5)",
117420
+ "--color-sidebar-foreground": ZINC_900,
117421
+ "--color-sidebar-primary": "oklch(0.546 0.215 262.881)",
117422
+ "--color-sidebar-primary-foreground": NEAR_WHITE,
117423
+ "--color-sidebar-accent": "oklch(0.915 0.01 91.5)",
117424
+ "--color-sidebar-accent-foreground": ZINC_900,
117425
+ "--color-sidebar-border": "oklch(0.925 0.009 91.5)",
117426
+ "--color-sidebar-ring": "oklch(0.546 0.215 262.881)"
117427
+ },
117428
+ dark: {
117429
+ "--color-background": "oklch(0.21 0.005 91.5)",
117430
+ "--color-foreground": "oklch(0.94 0.008 91.5)",
117431
+ "--color-card": "oklch(0.25 0.006 91.5)",
117432
+ "--color-card-foreground": "oklch(0.94 0.008 91.5)",
117433
+ "--color-surface": "oklch(0.23 0.0055 91.5)",
117434
+ "--color-popover": "oklch(0.25 0.006 91.5)",
117435
+ "--color-popover-foreground": "oklch(0.94 0.008 91.5)",
117436
+ "--color-primary": "oklch(0.714 0.143 254.624)",
117437
+ "--color-primary-foreground": "oklch(0.21 0.005 91.5)",
117438
+ "--color-secondary": "oklch(0.3 0.007 91.5)",
117439
+ "--color-secondary-foreground": "oklch(0.94 0.008 91.5)",
117440
+ "--color-muted": "oklch(0.3 0.007 91.5)",
117441
+ "--color-muted-foreground": "oklch(0.72 0.012 91.5)",
117442
+ "--color-accent": "oklch(0.3 0.007 91.5)",
117443
+ "--color-accent-foreground": "oklch(0.94 0.008 91.5)",
117444
+ "--color-border": "oklch(0.95 0.02 91.5 / 12%)",
117445
+ "--color-border-subtle": "oklch(0.95 0.02 91.5 / 8%)",
117446
+ "--color-input": "oklch(0.95 0.02 91.5 / 16%)",
117447
+ "--color-ring": "oklch(0.714 0.143 254.624)",
117448
+ "--color-chart-1": "oklch(0.714 0.143 254.624)",
117449
+ "--color-sidebar": "oklch(0.25 0.006 91.5)",
117450
+ "--color-sidebar-foreground": "oklch(0.94 0.008 91.5)",
117451
+ "--color-sidebar-primary": "oklch(0.714 0.143 254.624)",
117452
+ "--color-sidebar-primary-foreground": NEAR_WHITE,
117453
+ "--color-sidebar-accent": "oklch(0.3 0.007 91.5)",
117454
+ "--color-sidebar-accent-foreground": "oklch(0.94 0.008 91.5)",
117455
+ "--color-sidebar-border": "oklch(0.95 0.02 91.5 / 8%)",
117456
+ "--color-sidebar-ring": "oklch(0.714 0.143 254.624)"
117457
+ }
117458
+ }
117459
+ },
117460
+ ...CLASSIC_THEME_PRESETS
117461
+ ];
117462
+ PRESETS_BY_ID = new Map(THEME_PRESETS.map((preset) => [preset.id, preset]));
117463
+ THEME_PRESET_IDS = THEME_PRESETS.map((preset) => preset.id);
117464
+ });
117465
+
117466
+ // src/themes/page-fields.ts
117467
+ function readThemeFields(input) {
117468
+ if (typeof input.theme === "string" && !isThemePresetId(input.theme)) {
117469
+ return { error: `Unknown theme "${input.theme}". Use one of: ${THEME_PRESET_IDS.join(", ")}` };
117470
+ }
117471
+ if (!input.themeTokens) {
117472
+ return { theme: input.theme, themeTokens: input.themeTokens, ignored: [] };
117473
+ }
117474
+ try {
117475
+ const { tokens, ignored } = importThemeTokens(input.themeTokens);
117476
+ return { theme: input.theme, themeTokens: tokens, ignored };
117477
+ } catch (err) {
117478
+ if (err instanceof ThemeImportError)
117479
+ return { error: `Invalid themeTokens: ${err.message}` };
117480
+ throw err;
117481
+ }
117482
+ }
117483
+ var init_page_fields = __esm(() => {
117484
+ init_import();
117485
+ init_presets();
117486
+ });
117487
+
116161
117488
  // src/tools/create-page.ts
116162
117489
  function slugify3(input) {
116163
117490
  const slug = input.toLowerCase().normalize("NFKD").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
@@ -116169,10 +117496,19 @@ function getApiBaseUrl() {
116169
117496
  function getAppBaseUrl2() {
116170
117497
  return getAppUrl();
116171
117498
  }
116172
- var registerCreatePageTool = (server) => {
117499
+ function bodyUsesDesignSystem(html) {
117500
+ return COLOR_TOKEN_REFERENCE.test(html) || classAttributeValues(html).some((value) => SWARM_CLASS.test(value));
117501
+ }
117502
+ function hasLightOnlyColors(tokens) {
117503
+ if (!tokens)
117504
+ return false;
117505
+ const isColor = (name) => PAGE_COLOR_TOKENS.has(name);
117506
+ return Object.keys(tokens.light).some(isColor) && !Object.keys(tokens.dark).some(isColor);
117507
+ }
117508
+ var SWARM_CLASS, COLOR_TOKEN_REFERENCE, PAGE_COLOR_TOKENS, registerCreatePageTool = (server) => {
116173
117509
  createToolRegistrar(server)("create_page", {
116174
117510
  title: "Create or update a page",
116175
- description: "Stores an HTML or JSON page in the swarm and returns shareable URLs. " + "Calls are upsert-by-(agent, slug): if you previously created a page " + "with the same slug, its prior state is snapshotted and the row is " + "updated. Use this for static reports, dashboards, or JSON action " + "specs that don't need a long-lived process.",
117511
+ description: "Stores an HTML or JSON page in the swarm and returns shareable URLs. " + "Calls are upsert-by-(agent, slug): if you previously created a page " + "with the same slug, its prior state is snapshotted and the row is " + "updated. Use this for static reports, dashboards, or JSON action " + "specs that don't need a long-lived process. " + "HTML pages use the swarm design system (designVersion 2): theme " + "tokens such as var(--color-primary), the swarm-* primitives, and " + "Tailwind v4 utilities such as bg-card and text-muted-foreground. " + "Set `theme` to a preset id or pass `themeTokens` (a token map, or a " + 'CSS variable block with format "css") to restyle the whole page. ' + "Do not hardcode colors: inside the dashboard the page follows the " + "viewer's theme and dark mode. Pages created before designVersion 2 " + "keep the old look; pass designVersion: 2 when you rewrite one.",
116176
117512
  annotations: { destructiveHint: false },
116177
117513
  inputSchema: object2({
116178
117514
  key: AssetKeySchema.optional().describe("Logical namespace. Defaults to a shared/page:<id>/ resource key."),
@@ -116183,7 +117519,10 @@ var registerCreatePageTool = (server) => {
116183
117519
  authMode: PageAuthModeSchema.default("authed").describe("'authed' — requires page-session cookie (default); 'public' — no gate and must be explicit; 'password' — requires key."),
116184
117520
  password: string2().min(1).optional().describe("Plaintext password, hashed before storage. Only meaningful for authMode='password'."),
116185
117521
  description: string2().optional().describe("Optional short description, used in listings + OG-tag unfurl."),
116186
- needsCredentials: array2(object2({ name: string2(), description: string2() })).optional().describe("Declared credential needs for JSON pages (renderer ignores for v1 — reserved for follow-up).")
117522
+ needsCredentials: array2(object2({ name: string2(), description: string2() })).optional().describe("Declared credential needs for JSON pages (renderer ignores for v1 — reserved for follow-up)."),
117523
+ theme: string2().nullable().optional().describe("Theme preset id that restyles the whole page, for example paper, github or hive. An unknown id returns an error that lists every preset. Omit to follow the viewer's theme (on update, to keep the stored one). Pass null to clear it."),
117524
+ themeTokens: PageThemeTokensInputSchema.nullable().optional().describe('Per-page token overrides, applied on top of the preset. Send { light, dark } maps of token name to CSS value (for example { light: { "--color-primary": "oklch(0.55 0.2 260)" } }), or { format: "css", css } with a CSS variable block (:root, .dark, @theme) as shadcn, tweakcn and Tailwind v4 export it. Stored normalized. Names outside the token contract, and values that reference a variable outside it, are ignored and reported in the result. Replaces the stored overrides. Omit to keep them on update. Pass null to clear them.'),
117525
+ designVersion: number2().int().min(1).max(2).optional().describe("Design system version. 2 is the swarm design system and the default for new pages. 1 is the original look that older pages keep. Omit on update to keep the stored value.")
116187
117526
  }),
116188
117527
  outputSchema: swarmToolOutputSchema({
116189
117528
  yourAgentId: string2().optional(),
@@ -116191,13 +117530,21 @@ var registerCreatePageTool = (server) => {
116191
117530
  key: AssetKeySchema.optional(),
116192
117531
  version: number2().optional(),
116193
117532
  app_url: string2().optional(),
116194
- api_url: string2().optional()
117533
+ api_url: string2().optional(),
117534
+ designVersion: number2().optional(),
117535
+ ignoredTokens: array2(string2()).optional(),
117536
+ colorLiteralCount: number2().optional(),
117537
+ usesDesignSystem: boolean().optional(),
117538
+ lightOnlyColors: boolean().optional()
116195
117539
  })
116196
117540
  }, async (input, requestInfo, _meta) => {
116197
117541
  if (!requestInfo.agentId) {
116198
117542
  const msg = "Agent ID required. Set the X-Agent-ID header on the MCP request.";
116199
117543
  return toolErr(msg);
116200
117544
  }
117545
+ const themeFields = readThemeFields(input);
117546
+ if ("error" in themeFields)
117547
+ return toolErr(themeFields.error);
116201
117548
  const slug = input.slug ?? slugify3(input.title);
116202
117549
  const finalSlug = slug || "page";
116203
117550
  let passwordHash;
@@ -116231,7 +117578,10 @@ var registerCreatePageTool = (server) => {
116231
117578
  authMode: input.authMode,
116232
117579
  passwordHash: passwordHash ?? null,
116233
117580
  body: input.body,
116234
- needsCredentials: needsCredentialsNames ?? null
117581
+ needsCredentials: needsCredentialsNames ?? null,
117582
+ theme: themeFields.theme,
117583
+ themeTokens: themeFields.themeTokens,
117584
+ designVersion: input.designVersion
116235
117585
  });
116236
117586
  if (!updated) {
116237
117587
  const msg = `Failed to update existing page ${existing.id}.`;
@@ -116252,7 +117602,10 @@ var registerCreatePageTool = (server) => {
116252
117602
  authMode: input.authMode,
116253
117603
  passwordHash,
116254
117604
  body: input.body,
116255
- needsCredentials: needsCredentialsNames
117605
+ needsCredentials: needsCredentialsNames,
117606
+ theme: themeFields.theme,
117607
+ themeTokens: themeFields.themeTokens,
117608
+ designVersion: input.designVersion
116256
117609
  });
116257
117610
  id = created.id;
116258
117611
  } catch (err) {
@@ -116269,16 +117622,26 @@ var registerCreatePageTool = (server) => {
116269
117622
  const apiUrl = `${getApiBaseUrl()}/p/${id}`;
116270
117623
  const appUrl = `${getAppBaseUrl2()}/pages/${id}`;
116271
117624
  const version = await getPageEditCounter(id);
116272
- return toolOk(`Page "${input.title}" saved (slug=${finalSlug}, version=${version}).`, {
117625
+ const designFlags = fresh.contentType === "text/html" ? {
117626
+ usesDesignSystem: typeof input.theme === "string" || Boolean(input.themeTokens) || bodyUsesDesignSystem(fresh.body),
117627
+ lightOnlyColors: hasLightOnlyColors(fresh.themeTokens),
117628
+ ...fresh.designVersion >= 2 ? { colorLiteralCount: countColorLiterals(fresh.body) } : {}
117629
+ } : {};
117630
+ const { ignored } = themeFields;
117631
+ return toolOk(`Page "${input.title}" saved (slug=${finalSlug}, version=${version}, designVersion=${fresh.designVersion}).` + (ignored.length > 0 ? " Some theme tokens were ignored (outside the page token contract or referencing a variable outside it)." : ""), {
116273
117632
  details: `API: ${apiUrl}
116274
- App: ${appUrl}`,
117633
+ App: ${appUrl}` + (ignored.length > 0 ? `
117634
+ Ignored theme tokens: ${ignored.join(", ")}` : ""),
116275
117635
  data: {
116276
117636
  yourAgentId: requestInfo.agentId,
116277
117637
  id,
116278
117638
  key: fresh.key,
116279
117639
  version,
116280
117640
  app_url: appUrl,
116281
- api_url: apiUrl
117641
+ api_url: apiUrl,
117642
+ designVersion: fresh.designVersion,
117643
+ ...ignored.length > 0 ? { ignoredTokens: ignored } : {},
117644
+ ...designFlags
116282
117645
  }
116283
117646
  });
116284
117647
  });
@@ -116289,10 +117652,16 @@ var init_create_page = __esm(() => {
116289
117652
  init_audit_user();
116290
117653
  init_db4();
116291
117654
  init_page_versions();
117655
+ init_color_literals();
116292
117656
  init_version3();
117657
+ init_page_fields();
117658
+ init_tokens2();
116293
117659
  init_utils();
116294
117660
  init_types4();
116295
117661
  init_constants3();
117662
+ SWARM_CLASS = /(?:^|\s)swarm-/;
117663
+ COLOR_TOKEN_REFERENCE = /var\(\s*--color-/i;
117664
+ PAGE_COLOR_TOKENS = new Set(PAGE_THEME_COLOR_TOKENS);
116296
117665
  });
116297
117666
 
116298
117667
  // src/oauth/app-validation.ts
@@ -116345,7 +117714,7 @@ function hydrateOAuthAppFromPreset(preset, overrides = {}) {
116345
117714
  };
116346
117715
  }
116347
117716
  var OAUTH_PRESETS;
116348
- var init_presets = __esm(() => {
117717
+ var init_presets2 = __esm(() => {
116349
117718
  OAUTH_PRESETS = [
116350
117719
  {
116351
117720
  id: "google",
@@ -116776,7 +118145,7 @@ var init_tool = __esm(() => {
116776
118145
  init_oauth_credential_bindings();
116777
118146
  init_script_connections();
116778
118147
  init_app_validation();
116779
- init_presets();
118148
+ init_presets2();
116780
118149
  init_wrapper();
116781
118150
  init_rbac();
116782
118151
  init_credential_broker();
@@ -117811,6 +119180,187 @@ var init_automatic_task_gate = __esm(() => {
117811
119180
  shouldPersistTaskCompletionMemory = shouldPersistAutomaticTaskMemory;
117812
119181
  });
117813
119182
 
119183
+ // src/tasks/follow-up-gate.ts
119184
+ function readFollowUpGateConfig(env = process.env) {
119185
+ const mode = env.FOLLOW_UP_GATE_MODE?.trim().toLowerCase() === "shadow" ? "shadow" : "off";
119186
+ const scheduleIds = new Set(parseFollowUpGateScheduleIds(env.FOLLOW_UP_GATE_SCHEDULE_IDS).filter(isFollowUpGateScheduleId).map((id) => id.toLowerCase()));
119187
+ return { mode, scheduleIds, verifierScript: env.FOLLOW_UP_GATE_VERIFIER_SCRIPT?.trim() ?? "" };
119188
+ }
119189
+ function classifyFollowUpGate(input) {
119190
+ const { task, status, config } = input;
119191
+ if (config.mode === "off")
119192
+ return { eligible: false, reason: "mode_off" };
119193
+ if (!task.scheduleId)
119194
+ return { eligible: false, reason: "not_scheduled" };
119195
+ if (!config.scheduleIds.has(task.scheduleId.toLowerCase())) {
119196
+ return { eligible: false, reason: "schedule_not_gated" };
119197
+ }
119198
+ if (status === "failed")
119199
+ return { eligible: false, reason: "status_failed" };
119200
+ if (task.followUpConfig?.onCompleted?.trim() || task.followUpConfig?.onFailed?.trim()) {
119201
+ return { eligible: false, reason: "follow_up_instructions" };
119202
+ }
119203
+ return { eligible: true };
119204
+ }
119205
+ function scheduleFollowUpGateShadow(args) {
119206
+ const config = readFollowUpGateConfig();
119207
+ const verdict = classifyFollowUpGate({ task: args.task, status: args.status, config });
119208
+ if (!verdict.eligible && (verdict.reason === "mode_off" || verdict.reason === "not_scheduled" || verdict.reason === "schedule_not_gated")) {
119209
+ return;
119210
+ }
119211
+ const deps = depsForTests ?? defaultDeps;
119212
+ getDbClient2().afterCommit(() => {
119213
+ const run = verdict.eligible ? runShadow(args, config, deps) : writeRecord(args, { decision: "ineligible", reason: verdict.reason });
119214
+ pending.add(run);
119215
+ const settle = () => {
119216
+ pending.delete(run);
119217
+ };
119218
+ run.then(settle, settle);
119219
+ });
119220
+ }
119221
+ async function runShadow(args, config, deps) {
119222
+ if (inFlight4 >= FOLLOW_UP_GATE_MAX_IN_FLIGHT) {
119223
+ await writeRecord(args, { decision: "error", reason: "concurrency_cap" });
119224
+ return;
119225
+ }
119226
+ inFlight4++;
119227
+ try {
119228
+ await writeRecord(args, await verify(args, config, deps));
119229
+ } finally {
119230
+ inFlight4--;
119231
+ }
119232
+ }
119233
+ async function verify(args, config, deps) {
119234
+ if (!config.verifierScript)
119235
+ return { decision: "error", reason: "no_verifier" };
119236
+ const started = performance.now();
119237
+ const latency = () => Math.round(performance.now() - started);
119238
+ const controller = new AbortController;
119239
+ const deadlineMs = timeoutMs;
119240
+ let timer;
119241
+ let script = null;
119242
+ let timedOut = false;
119243
+ try {
119244
+ const run = (async () => {
119245
+ script = await deps.getVerifier(config.verifierScript);
119246
+ if (!script)
119247
+ return null;
119248
+ return {
119249
+ result: await deps.runVerifier(script, { taskId: args.task.id }, args.leadAgentId, controller.signal)
119250
+ };
119251
+ })();
119252
+ run.catch(() => {});
119253
+ const deadline = new Promise((_, reject) => {
119254
+ timer = setTimeout(() => {
119255
+ timedOut = true;
119256
+ controller.abort();
119257
+ reject(new Error(`verifier timed out after ${deadlineMs}ms`));
119258
+ }, deadlineMs);
119259
+ });
119260
+ const outcome = await Promise.race([run, deadline]);
119261
+ const verifier = verifierInfo(script);
119262
+ if (!outcome) {
119263
+ return { decision: "error", reason: "no_verifier", verifier, latencyMs: latency() };
119264
+ }
119265
+ const result = outcome.result;
119266
+ if (!result || typeof result !== "object") {
119267
+ return {
119268
+ decision: "error",
119269
+ reason: "verifier_error",
119270
+ verifier,
119271
+ latencyMs: latency(),
119272
+ error: "verifier result is not an object"
119273
+ };
119274
+ }
119275
+ return { ...mapVerdict(result), verifier, latencyMs: latency() };
119276
+ } catch (err) {
119277
+ const message = err instanceof Error ? err.message : String(err);
119278
+ return {
119279
+ decision: "error",
119280
+ reason: timedOut ? "timeout" : "verifier_error",
119281
+ verifier: verifierInfo(script),
119282
+ latencyMs: latency(),
119283
+ error: clip(message)
119284
+ };
119285
+ } finally {
119286
+ clearTimeout(timer);
119287
+ }
119288
+ }
119289
+ function verifierInfo(script) {
119290
+ return script ? { name: script.name, version: script.version, contentHash: script.contentHash } : null;
119291
+ }
119292
+ function mapVerdict(result) {
119293
+ const ok = typeof result.ok === "boolean" ? result.ok : null;
119294
+ const controls = result.controls;
119295
+ const controlsOk = controls?.ok === true;
119296
+ const unverified = Array.isArray(result.unverified) ? result.unverified.filter((name) => typeof name === "string").slice(0, MAX_UNVERIFIED).map((name) => name.slice(0, 100)) : [];
119297
+ return {
119298
+ decision: ok === true && controlsOk ? "would_skip" : "would_keep",
119299
+ reason: null,
119300
+ verdict: {
119301
+ ok,
119302
+ check: typeof result.check === "string" ? result.check.slice(0, 100) : null,
119303
+ detail: typeof result.detail === "string" ? clip(result.detail) : "",
119304
+ controlsOk
119305
+ },
119306
+ unverified
119307
+ };
119308
+ }
119309
+ function clip(text) {
119310
+ return scrubSecrets(text).slice(0, TEXT_LIMIT);
119311
+ }
119312
+ async function writeRecord(args, record) {
119313
+ try {
119314
+ await createLogEntry2({
119315
+ eventType: FOLLOW_UP_GATE_SHADOW_EVENT,
119316
+ taskId: args.task.id,
119317
+ agentId: args.leadAgentId,
119318
+ metadata: {
119319
+ v: 1,
119320
+ mode: "shadow",
119321
+ followUpTaskId: args.followUpTaskId,
119322
+ scheduleId: args.task.scheduleId ?? null,
119323
+ status: args.status,
119324
+ decision: record.decision,
119325
+ reason: record.reason,
119326
+ verdict: record.verdict ?? null,
119327
+ unverified: record.unverified ?? [],
119328
+ verifier: record.verifier ?? null,
119329
+ latencyMs: record.latencyMs ?? null,
119330
+ ...record.error ? { error: record.error } : {}
119331
+ }
119332
+ });
119333
+ } catch (err) {
119334
+ console.warn(`[follow-up-gate] Could not record shadow decision for task ${args.task.id.slice(0, 8)}:`, scrubSecrets(err instanceof Error ? err.message : String(err)));
119335
+ }
119336
+ }
119337
+ var FOLLOW_UP_GATE_SHADOW_EVENT = "task_follow_up_gate_shadow", FOLLOW_UP_GATE_TIMEOUT_MS = 60000, FOLLOW_UP_GATE_MAX_IN_FLIGHT = 2, TEXT_LIMIT = 300, MAX_UNVERIFIED = 20, defaultDeps, timeoutMs, depsForTests = null, inFlight4 = 0, pending;
119338
+ var init_follow_up_gate = __esm(() => {
119339
+ init_db4();
119340
+ init_db3();
119341
+ init_run_saved();
119342
+ init_follow_up_gate_schedule_ids();
119343
+ init_secret_scrubber();
119344
+ defaultDeps = {
119345
+ getVerifier: (name) => getScript({ name, scope: "global" }),
119346
+ runVerifier: async (script, input, agentId, signal) => {
119347
+ const output = await runSavedScriptAsAgent({
119348
+ script,
119349
+ input,
119350
+ agentId,
119351
+ timeoutMs,
119352
+ signal
119353
+ });
119354
+ if (output.exitCode !== 0 || output.error || output.runtimeError) {
119355
+ throw new Error(output.runtimeError?.message ?? output.error ?? `script exited with code ${output.exitCode}`);
119356
+ }
119357
+ return output.result;
119358
+ }
119359
+ };
119360
+ timeoutMs = FOLLOW_UP_GATE_TIMEOUT_MS;
119361
+ pending = new Set;
119362
+ });
119363
+
117814
119364
  // src/tasks/worker-follow-up.ts
117815
119365
  function isCrashResumePinEnabled() {
117816
119366
  return isEnvFlagEnabled("HEARTBEAT_PIN_CRASH_RESUME", true);
@@ -117991,7 +119541,7 @@ ${depLines.join(`
117991
119541
  console.log(`[worker-follow-up] Skipped follow-up for ${status} task ${task.id.slice(0, 8)}: woke deferred waiter ${wake.waiterTaskId?.slice(0, 8) ?? "?"} (wake-up task ${wake.wakeTaskId.slice(0, 8)})`);
117992
119542
  return null;
117993
119543
  }
117994
- return await createTaskWithSiblingAwareness(changes.description ?? followUpDescription, {
119544
+ const followUp = await createTaskWithSiblingAwareness(changes.description ?? followUpDescription, {
117995
119545
  agentId: followUpAgentId,
117996
119546
  routingReason: followUpAgentId ? "skill" : undefined,
117997
119547
  routingSource: followUpAgentId ? "engine_default" : undefined,
@@ -118006,6 +119556,19 @@ ${depLines.join(`
118006
119556
  followUpConfig: changes.followUpConfig,
118007
119557
  inheritParentOutputSchema: false
118008
119558
  }, { origin: "followUp" });
119559
+ if (followUp) {
119560
+ try {
119561
+ scheduleFollowUpGateShadow({
119562
+ task,
119563
+ status,
119564
+ followUpTaskId: followUp.id,
119565
+ leadAgentId: leadAgent.id
119566
+ });
119567
+ } catch (err) {
119568
+ console.warn(`[worker-follow-up] Follow-up gate shadow failed for task ${task.id.slice(0, 8)}:`, err instanceof Error ? err.message : String(err));
119569
+ }
119570
+ }
119571
+ return followUp;
118009
119572
  }
118010
119573
  async function deferredWorkChatContextKey(task) {
118011
119574
  if (chatThreadOfContextKey(task.contextKey))
@@ -118216,6 +119779,7 @@ var init_worker_follow_up = __esm(() => {
118216
119779
  init_env_flag();
118217
119780
  init_task_attachment_links();
118218
119781
  init_context_key();
119782
+ init_follow_up_gate();
118219
119783
  init_model_pin();
118220
119784
  init_sibling_awareness();
118221
119785
  init_templates3();
@@ -132767,10 +134331,27 @@ function jaccardSimilarity(a, b) {
132767
134331
  const union = new Set([...wordsA, ...wordsB]).size;
132768
134332
  return intersection / union;
132769
134333
  }
134334
+ function matchSimilarTask(existing, opts) {
134335
+ const similarity = jaccardSimilarity(existing.task, opts.taskDescription);
134336
+ if (similarity > HIGH_SIMILARITY_THRESHOLD) {
134337
+ return {
134338
+ task: existing,
134339
+ reason: `similar task description (${(similarity * 100).toFixed(0)}% match)`
134340
+ };
134341
+ }
134342
+ if (opts.targetAgentId && existing.agentId === opts.targetAgentId && similarity > SAME_AGENT_SIMILARITY_THRESHOLD) {
134343
+ return {
134344
+ task: existing,
134345
+ reason: `similar task to same agent (${(similarity * 100).toFixed(0)}% match)`
134346
+ };
134347
+ }
134348
+ return null;
134349
+ }
132770
134350
  async function findDuplicateTask(opts) {
132771
134351
  const recentTasks = await findRecentSimilarTasks2({
132772
134352
  creatorAgentId: opts.creatorAgentId,
132773
- windowMinutes: opts.windowMinutes ?? 10
134353
+ windowMinutes: opts.windowMinutes ?? 10,
134354
+ limit: DEDUP_SCAN_LIMIT
132774
134355
  });
132775
134356
  for (const existing of recentTasks) {
132776
134357
  if (opts.slackChannelId && opts.slackThreadTs && existing.slackChannelId === opts.slackChannelId && existing.slackThreadTs === opts.slackThreadTs) {
@@ -132779,25 +134360,77 @@ async function findDuplicateTask(opts) {
132779
134360
  reason: `same Slack thread (${opts.slackChannelId}/${opts.slackThreadTs})`
132780
134361
  };
132781
134362
  }
132782
- const similarity = jaccardSimilarity(existing.task, opts.taskDescription);
132783
- if (similarity > HIGH_SIMILARITY_THRESHOLD) {
132784
- return {
132785
- task: existing,
132786
- reason: `similar task description (${(similarity * 100).toFixed(0)}% match)`
132787
- };
132788
- }
132789
- if (opts.targetAgentId && existing.agentId === opts.targetAgentId && similarity > SAME_AGENT_SIMILARITY_THRESHOLD) {
134363
+ const match = matchSimilarTask(existing, opts);
134364
+ if (match)
134365
+ return match;
134366
+ }
134367
+ return null;
134368
+ }
134369
+ var HIGH_SIMILARITY_THRESHOLD = 0.8, SAME_AGENT_SIMILARITY_THRESHOLD = 0.6, DEDUP_SCAN_LIMIT = 500;
134370
+ var init_task_dedup = __esm(() => {
134371
+ init_db4();
134372
+ });
134373
+
134374
+ // src/tasks/follow-up-redelegation-guard.ts
134375
+ async function followUpThreadForSourceTask(sourceTaskId) {
134376
+ if (!sourceTaskId)
134377
+ return null;
134378
+ const sourceTask = await getTaskById2(sourceTaskId);
134379
+ if (sourceTask?.taskType !== "follow-up" || !sourceTask.slackChannelId || !sourceTask.slackThreadTs) {
134380
+ return null;
134381
+ }
134382
+ return {
134383
+ channelId: sourceTask.slackChannelId,
134384
+ threadTs: sourceTask.slackThreadTs,
134385
+ userId: sourceTask.slackUserId
134386
+ };
134387
+ }
134388
+ async function findMatchingCompletedWork(args) {
134389
+ let before;
134390
+ for (;; ) {
134391
+ const page = await findCompletedTasksInThread2(args.channelId, args.threadTs, FOLLOW_UP_SAME_WORK_WINDOW_MINUTES, FOLLOW_UP_SAME_WORK_PAGE_SIZE, before);
134392
+ for (const existing of page) {
134393
+ const match = matchSimilarTask(existing, args);
134394
+ if (match)
134395
+ return match;
134396
+ }
134397
+ const last = page.at(-1);
134398
+ if (!last || page.length < FOLLOW_UP_SAME_WORK_PAGE_SIZE)
134399
+ return null;
134400
+ before = { lastUpdatedAt: last.lastUpdatedAt, id: last.id };
134401
+ }
134402
+ }
134403
+ async function evaluateFollowUpRedelegation(args) {
134404
+ const { channelId, threadTs } = args;
134405
+ const match = await findMatchingCompletedWork(args);
134406
+ if (match) {
134407
+ const existing = match.task;
134408
+ const [cancelled, failed] = await Promise.all([
134409
+ findRecentCancelledTaskInThread2(channelId, threadTs, FOLLOW_UP_SAME_WORK_WINDOW_MINUTES),
134410
+ findRecentFailedTaskInThread2(channelId, threadTs, FOLLOW_UP_SAME_WORK_WINDOW_MINUTES)
134411
+ ]);
134412
+ const completedAt = new Date(existing.lastUpdatedAt).getTime();
134413
+ const interruptedLater = [cancelled, failed].some((t) => t && new Date(t.lastUpdatedAt).getTime() > completedAt);
134414
+ if (!interruptedLater) {
132790
134415
  return {
132791
- task: existing,
132792
- reason: `similar task to same agent (${(similarity * 100).toFixed(0)}% match)`
134416
+ rule: "same-work",
134417
+ message: `Blocked by the follow-up re-delegation guard (same-work rule): this task matches completed task ${existing.id.slice(0, 8)} in this Slack thread (${match.reason}), so the work was already done. If it must run again, pass allowRedelegation: true.`
132793
134418
  };
132794
134419
  }
132795
134420
  }
134421
+ const dispatched = await countAgentDispatchesInThread2(channelId, threadTs, args.creatorAgentId, FOLLOW_UP_DISPATCH_WINDOW_MINUTES);
134422
+ if (dispatched >= FOLLOW_UP_DISPATCH_CAP) {
134423
+ return {
134424
+ rule: "loop-cap",
134425
+ message: `Blocked by the follow-up re-delegation guard (loop-cap rule): you already dispatched ${dispatched} times into this Slack thread in the last ${FOLLOW_UP_DISPATCH_WINDOW_MINUTES / 60} hours (cap ${FOLLOW_UP_DISPATCH_CAP}; a durable script run counts once). If this is a deliberate next step and not a re-delegation loop, pass allowRedelegation: true.`
134426
+ };
134427
+ }
132796
134428
  return null;
132797
134429
  }
132798
- var HIGH_SIMILARITY_THRESHOLD = 0.8, SAME_AGENT_SIMILARITY_THRESHOLD = 0.6;
132799
- var init_task_dedup = __esm(() => {
134430
+ var FOLLOW_UP_SAME_WORK_WINDOW_MINUTES = 2880, FOLLOW_UP_DISPATCH_CAP = 10, FOLLOW_UP_DISPATCH_WINDOW_MINUTES = 360, FOLLOW_UP_SAME_WORK_PAGE_SIZE = 200;
134431
+ var init_follow_up_redelegation_guard = __esm(() => {
132800
134432
  init_db4();
134433
+ init_task_dedup();
132801
134434
  });
132802
134435
 
132803
134436
  // src/tools/send-task.ts
@@ -132841,6 +134474,7 @@ async function sendTaskHandler(ctx, {
132841
134474
  effort,
132842
134475
  profile,
132843
134476
  allowDuplicate,
134477
+ allowRedelegation,
132844
134478
  slackChannelId,
132845
134479
  slackThreadTs,
132846
134480
  slackUserId,
@@ -132860,6 +134494,7 @@ async function sendTaskHandler(ctx, {
132860
134494
  const requestedLeadOnly = ctx.kind === "user" ? false : leadOnly;
132861
134495
  const requestedCapabilities = ctx.kind === "user" ? undefined : requiredCapabilities;
132862
134496
  const requestedAllowDuplicate = ctx.kind === "user" ? false : allowDuplicate;
134497
+ const requestedAllowRedelegation = ctx.kind === "user" ? false : allowRedelegation;
132863
134498
  const requestedOverrideSlackContext = ctx.kind === "user" ? false : overrideSlackContext;
132864
134499
  if (requestedAgentId !== undefined && requestedRoutingReason === undefined) {
132865
134500
  return toolErr("routingReason is required when agentId is supplied.");
@@ -133024,7 +134659,7 @@ async function sendTaskHandler(ctx, {
133024
134659
  if (ctx.kind === "user" && (taskOptions.agentId !== userLead.id || taskOptions.offeredTo !== undefined)) {
133025
134660
  return toolErr("A pre.task.create extension cannot change the user task's Lead assignment.");
133026
134661
  }
133027
- const evaluateDedupGuards = async () => {
134662
+ const evaluateDedupGuards = async (logOverride) => {
133028
134663
  const existingTrackerWork = await findExistingLinearTrackerContextWork2(effectiveParentTask?.contextKey, effectiveParentTask?.id);
133029
134664
  if (existingTrackerWork) {
133030
134665
  const msg = `Skipped: Linear tracker contextKey ${effectiveParentTask?.contextKey} already has ${existingTrackerWork.reason === "active_task" ? "active task" : "linked open PR"} ${existingTrackerWork.task.id.slice(0, 8)}.`;
@@ -133044,25 +134679,24 @@ async function sendTaskHandler(ctx, {
133044
134679
  };
133045
134680
  }
133046
134681
  }
133047
- if (sourceTaskId) {
133048
- const sourceTask = await getTaskById2(sourceTaskId);
133049
- if (sourceTask?.taskType === "follow-up" && sourceTask.slackThreadTs && sourceTask.slackChannelId) {
133050
- const recentCompleted = await findCompletedTaskInThread2(sourceTask.slackChannelId, sourceTask.slackThreadTs, 2880);
133051
- if (recentCompleted) {
133052
- const recentCancelled = await findRecentCancelledTaskInThread2(sourceTask.slackChannelId, sourceTask.slackThreadTs, 2880);
133053
- const cancelledMoreRecent = recentCancelled && new Date(recentCancelled.lastUpdatedAt).getTime() > new Date(recentCompleted.lastUpdatedAt).getTime();
133054
- if (!cancelledMoreRecent) {
133055
- return {
133056
- ok: false,
133057
- message: `Blocked: re-delegation from follow-up task in a thread that already has completed work (task ${recentCompleted.id.slice(0, 8)}). The original request was already handled.`
133058
- };
133059
- }
133060
- }
134682
+ const followUpThread = creatorAgentId ? await followUpThreadForSourceTask(sourceTaskId) : null;
134683
+ if (followUpThread && creatorAgentId) {
134684
+ const blocked = await evaluateFollowUpRedelegation({
134685
+ ...followUpThread,
134686
+ creatorAgentId,
134687
+ taskDescription,
134688
+ targetAgentId: taskOptions.agentId ?? taskOptions.offeredTo
134689
+ });
134690
+ if (blocked && !requestedAllowRedelegation) {
134691
+ return { ok: false, message: blocked.message };
134692
+ }
134693
+ if (blocked && logOverride) {
134694
+ console.log(`[send-task] follow-up re-delegation override: rule=${blocked.rule} creatorAgentId=${creatorAgentId} sourceTaskId=${sourceTaskId} thread=${followUpThread.channelId}/${followUpThread.threadTs}`);
133061
134695
  }
133062
134696
  }
133063
134697
  return null;
133064
134698
  };
133065
- const guard = await evaluateDedupGuards();
134699
+ const guard = await evaluateDedupGuards(true);
133066
134700
  if (guard) {
133067
134701
  const guardData = {
133068
134702
  yourAgentId: creatorAgentId,
@@ -133071,7 +134705,7 @@ async function sendTaskHandler(ctx, {
133071
134705
  return guard.ok ? toolOk(guard.message, { data: guardData }) : toolErr(guard.message, { data: guardData });
133072
134706
  }
133073
134707
  const created = getDbClient2().transaction(async () => {
133074
- const raced = await evaluateDedupGuards();
134708
+ const raced = await evaluateDedupGuards(false);
133075
134709
  if (raced)
133076
134710
  return { success: raced.ok, message: raced.message, task: raced.task };
133077
134711
  if (isLinearTrackerContextKey2(effectiveParentTask?.contextKey)) {
@@ -133176,6 +134810,7 @@ var init_send_task = __esm(() => {
133176
134810
  init_model_validation();
133177
134811
  init_apply_task_create();
133178
134812
  init_rbac();
134813
+ init_follow_up_redelegation_guard();
133179
134814
  init_slack_routing();
133180
134815
  init_task_dedup();
133181
134816
  init_task_tool_ctx();
@@ -133205,7 +134840,8 @@ var init_send_task = __esm(() => {
133205
134840
  allowCustomModel: boolean().optional().describe("Accept a `model` the model catalog does not list. Without it an unknown model id is rejected. Only for ids the catalog cannot know yet (a fresh launch, a private deployment)."),
133206
134841
  effort: ReasoningEffortSchema.optional().describe("Reasoning effort for this task: 'off', 'low', 'medium', 'high', 'xhigh', or 'max'. If omitted, the assignee's REASONING_EFFORT_OVERRIDE/default applies."),
133207
134842
  profile: string2().trim().min(1).optional().describe("Model profile name (see list-model-profiles): a named harness + model + effort, applied when the task is claimed. Must run on the assignee's harness. Exclusive with model and modelTier. A set `effort` still wins over the profile's."),
133208
- allowDuplicate: boolean().default(false).describe("If true, skip duplicate detection and create the task even if a similar one exists."),
134843
+ allowDuplicate: boolean().default(false).describe("If true, skip duplicate detection and create the task even if a similar one exists. Does not bypass the follow-up re-delegation guard; see allowRedelegation."),
134844
+ allowRedelegation: boolean().default(false).describe("Only matters when you call send-task from a follow-up task in a Slack thread. Such a dispatch is blocked when it repeats a task already completed in that thread (same-work rule, unless a task there was cancelled or failed after that completion), or when you already dispatched 10 tasks into the thread in the last 6 hours (loop-cap rule). Set true to dispatch anyway; the override is logged. Use it only for deliberate re-runs or long chains, never to retry a block you have not read."),
133209
134845
  slackChannelId: string2().optional().describe("Slack channel ID to post progress updates to. Use this to propagate Slack context when delegating from a Slack thread."),
133210
134846
  slackThreadTs: string2().optional().describe("Slack thread timestamp. Required with slackChannelId for thread-level updates."),
133211
134847
  slackUserId: string2().optional().describe("Slack user ID of the original requester."),
@@ -135196,7 +136832,7 @@ var registerSlackLeaveThreadTool = (server) => {
135196
136832
  if (!slackChannelId || !slackThreadTs) {
135197
136833
  return toolErr("No Slack thread context available.");
135198
136834
  }
135199
- await leaveSlackThread(slackChannelId, slackThreadTs, agent.id);
136835
+ await leaveSlackThread(slackChannelId, slackThreadTs, { agentId: agent.id });
135200
136836
  return toolOk(`Left Slack thread ${slackChannelId}/${slackThreadTs}. Messages there are ignored until someone @mentions the bot.`, { data: { channelId: slackChannelId, threadTs: slackThreadTs } });
135201
136837
  });
135202
136838
  };
@@ -140028,4 +141664,4 @@ var init_server = __esm(() => {
140028
141664
  loggedToolAllowlistWarnings = new Set;
140029
141665
  });
140030
141666
 
140031
- export { DEFAULT_NEGOTIATED_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, isJSONRPCRequest, isJSONRPCResultResponse, isJSONRPCErrorResponse, JSONRPCMessageSchema, isInitializeRequest, init_types, McpServer, init_mcp, repointTrackerSyncBySwarmId, init_tracker, isRuntimePoolWakeable, isAgentReachable, init_reachability, referencedBundlePaths, skillDirs, init_manifest_format, TaskCreationBlockedError, init_errors2, resolveIdentity, renderIdentity, init_identity, recordUnmappedIdentity, init_unmapped_identities, MAX_TASK_ATTACHMENT_BYTES, recordTaskAttachmentUpload, scopeFromAttachment, backingProviderId, init_task_attachment_store, taskModelPin, resumedTaskModelSelection, init_model_pin, listHarnessModelSupport, recordHarnessModelSupport, agentRanModel, getAgentHarnessCliVersion, setAgentHarnessCliVersion, init_harness_model_support, sanitizeModelTierOverrides, parseModelTierOverridesHeader, setAgentModelTierOverrides, previewModelTiers, recordClaimModelResolution, init_model_tier_resolution, harnessModelErrorFor, poolTaskRunsOnHarness, explicitModelError, explicitModelErrorForAgent, init_model_validation, stripSiblingBlock, init_sibling_block, createTaskWithSiblingAwareness, init_sibling_awareness, transcribeAudioNotes, init_transcription, init_templates, buildEffectiveText, bufferedFileFailures, fetchSlackFiles, createSlackTaskWithFiles, notifySlackFileFailures, init_inbound_files, isAddressedToOtherUser, broadcastMatches, routeMessage, extractTaskFromMessage, init_router, isSlackThreadLeft, shouldSkipLeftSlackThread, init_left_threads, extractSlackMessageText, slackInboundMessageText, collectSlackMessageFiles, init_message_text, createAdditiveBuffer, init_additive_buffer, recoverIncompleteRuns, init_recovery, handleWebhookTrigger, verifyHmacSignature, WebhookError, init_triggers, snapshotAndUpdateWorkflow, init_version, RawLlmConfigSchema, RawLlmOutputSchema, executeRawLlm, init_raw_llm, getExecutorRegistry2, initWorkflows2, init_workflows, dispatchScheduleTarget, calculateNextRun2, startScheduler2, stopScheduler2, runScheduleNow2, init_scheduler, ExtensionAssetConflictError, init_assets, ExtensionOwnershipError, getExtensionFiles, getExtensionById, getExtensionByName, listExtensions, listExtensionVersions, updateExtensionMeta, listExtensionRuns, init_db, SDK_ALLOWLIST, mcpToolNameForSdkMethod, init_sdk_allowlist, MCP_OVERFLOW_NAMESPACE, mcpOverflowAuthError, init_kv_overflow, hasKvViewArgs, resolveKvView, init_kv_view, toolErr, createToolRegistrar, init_utils, handleMcpBridge, init_mcp_bridge, Redacted, init_redacted, SCRIPT_SDK_RESPONSE_LIMIT_BYTES, readScriptSdkJsonResponse, init_response_limit, ExtensionConfigError, init_loader, ExtensionLifecycleError, setExtensionLoopbackBaseUrl, enableExtension, disableExtension, activateVersion, ExtensionAssetsInvalidError, installExtensionWithAssets, uninstallExtension, reloadExtension, loadEnabledExtensions, stopExtensionRuntime, init_lifecycle, ExtensionAbortedError2, isRegistered2, isExtensionAgentId2, getExtensionBridgeToken2, resolveBridgeCallOrigin2, extensionIdForAgent2, runContext2, registerLoaded2, unregister2, listRegistered2, dispatchPre2, dispatchPost2, init_dispatcher, REBOOT_RETRY_PIN_TAG2, getPinCandidateAgent2, resolveLeadOnlyRecoveryAssignment2, getResumeGeneration2, getNextResumeGeneration2, inheritedModelSelection2, createWorkerTaskFollowUp2, createResumeFollowUp2, createRerouteDecisionTask2, createPoolStarvationDecisionTask2, init_worker_follow_up, isGitHubEnabled, initGitHub, verifyWebhookSignature, isAgentMailEnabled, initAgentMail, verifyAgentMailWebhook, isInboxAllowed, isSenderAllowed, handleMessageReceived, init_agentmail, isAzureDevOpsEnabled, initAzureDevOps, verifyAzureDevOpsWebhook, isAzureDevOpsUrl, canonicalAzureDevOpsRepoUrl, parseAzureDevOpsRepoUrl, init_azure_devops, createdPullRequestOf, commentedPayloadOf, handlePullRequestCreated, handlePullRequestCommented, handleWorkItemCreated, handleWorkItemUpdated, handleWorkItemCommented, handleWorkItemDeleted, handleWorkItemRestored, initAzureDevOpsOutbound, init_azure_devops2, enqueueAuditRow, enqueueAdmissionRow, flushAuditBuffer, startAuditWriter, stopAuditWriter, startAuditGc, stopAuditGc, init_rbac_audit, getTelemetryIngestAnchor, init_telemetry_ingest_anchor, initApiTelemetry, syncTelemetryEnabled, init_telemetry_enable, isBitbucketEnabled, initBitbucket, verifyBitbucketWebhook, isDuplicateDelivery, markDeliveryProcessed, pullRequestEventOf, pullRequestCommentEventOf, handlePullRequestCreated2, handlePullRequestCommentCreated, handlePullRequestClosed, init_bitbucket, handlePullRequest, handleIssue, handleComment, handlePullRequestReview, handleCheckRun, handleCheckSuite, handleWorkflowRun, init_github, isGitLabEnabled, initGitLab, verifyGitLabWebhook, handleMergeRequest, handleIssue2, handleNote, handlePipeline, init_gitlab, isChatSdkEnabled, getChatSdkConfig, init_config, errorMessage, init_logger, resolveAdapterApiUrl, init_adapters, trackBackground, init_background, TelegramBotApiError, callTelegramBotApi, init_telegram_api, isTrustedTeamsServiceUrl, init_teams_origin, getSessionLabels, rememberSessionLabel, init_session_labels, isChatSdkStopping, startChatSdk, getChatInstance, isChatAdapterConfigured, getChatSdkHealth, stopChatSdk, init_runtime, getJiraMetadata, updateJiraMetadata, clearJiraMetadata, init_metadata, registerJiraWebhook, deleteJiraWebhook, init_webhook_lifecycle, isJiraEnabled, initJira, init_app, handleJiraWebhook, init_webhook, init_jira, handleAgentSessionEvent, handleIssueUpdate, handleIssueDelete, handleAgentSessionPrompted, init_sync, isLinearEnabled, initLinear, init_app2, init_linear, init_slack, isCookieSafePageId, extractPageSession, extractLegacyPageSession, extractAndVerifyCookie, pageSessionSetCookies, init_page_session, resolveHttpRequestAuth, init_auth, getDeploymentEnvValue, loadGlobalConfigsIntoEnv, reloadGlobalConfigsAndIntegrations, scheduleIntegrationsReload, handleCore, init_core, MCP_MAX_TOOL_INPUT_ELEMENTS, MCP_MAX_REQUEST_BODY_BYTES, init_mcp_limits, userCtx, init_task_tool_ctx, requestPrincipal, agentFirstPrincipal, requireAuthKind, rejectGuest, init_request_principal, handleApps, init_apps, cancelApprovalRequest, cancelApprovalRequestAndRun, init_approval_cancel, getUserCommsPrefs, init_requester_comms, getTaskDetailsInputSchema, getTaskDetailsOutputSchema, getTaskDetailsHandler, init_get_task_details, cancelTaskInputSchema, cancelTaskOutputSchema, cancelTaskHandler, init_cancel_task, executeReadOnlyQuery, assertSelectOnlyQuery, handleDbQuery, init_db_query, snapshotMetric, init_version2, AssetKeyAuthorizationError, authorizeAssetKeyWrite, init_asset_key_auth, getPageEditCounter, init_page_versions, snapshotPage, init_version3, assertOAuthAppUrlsSafe, assertOAuthEgressUrlSafe, init_app_validation, listOAuthPresets, listOAuthPresetIds, getOAuthPreset, hydrateOAuthAppFromPreset, init_presets, scopedResourceScopeIdSchema, resolveScopedResourceId, init_scoped_resource, MemoryKeyError, init_key_guard, refreshLinks, init_link_resolver, indexMemoryContent, init_index_content, dedupeMemoryDocumentIds, recordMemoryAccesses, recordRetrievals, init_retrieval, ExplicitSelfDuplicateError, applyRating, init_store, shouldPersistAutomaticTaskMemory, init_automatic_task_gate, guardTerminalTaskResultWrite, init_terminal_result_guard, getTasksInputSchema, getTasksOutputSchema, getTasksHandler, init_get_tasks, reservedNamespaceError, privateNamespaceError, reservedRoomKeyError, init_kv_reserved_namespaces, updateMcpServerChecked, init_mcp_server_checked_update, updateTouchesStdioExecution, init_mcp_server_stdio_gate, canReadMemory, init_access, getLinksForMemory, init_links_store, expandCandidatesWithGraph, init_graph_expansion, isApiDraining, drainApi, init_api_drain, markKapsoMessageRead, sendKapsoReaction, init_client, getKapsoConfig, getKapsoNumberMapping, markKapsoMessageSeen, init_config2, changesAllowMerge, init_repo_merge_policy, updateSwarmRepoChecked, init_repo_checked_update, getCombConfig, init_config3, resolveRoomNamespace, roomRequestInfo, authorizeRoomNamespace, sessionAccessTopic, sessionPresenceRoot, init_auth2, RoomOperationSchema, init_document, removeAwarenessStates, init_awareness, roomTopic, decodeRoomSnapshot, roomView, getRoom, changeRoom, applyRoomUpdate, resetRoom, sweepRooms, closeRooms, removeNamespaceRooms, init_rooms, init_scheduler2, MEMORY_KEYS_DEFAULT_PREFIX, MEMORY_KEYS_MAX_LIMIT, estimateTokens, posteriorMean, listMemoryKeys, checkChunkIntegrity, getMemoryChunks, getPosteriorsByIds, init_key_browser, createEvent, createEventsBatch, getEventCountsFiltered, getEventsFiltered, init_events, mergeScheduleTiming, validateRecurringTiming, init_validate, checkOutputSchemaShape, sendTaskOutputSchema, sendTaskHandler, init_send_task, steerTaskUserInputSchema, steerTaskOutputSchema, steerTaskHandler, init_steer_task, canClaim, init_budget_admission, emitBudgetRefusalSideEffects, init_budget_refusal_notify, workflowModelErrors, init_model_validation2, patchWorkflowDefinition, init_patch_definition, idempotencyKeyHeader, readIdempotencyKey, replayAcceptedOperation, init_idempotency_key, resolveScriptsOnlyMode, init_scripts_only_mode, ALL_CAPABILITIES, hasCapability, getEnabledCapabilities, createServer, init_server };
141667
+ export { DEFAULT_NEGOTIATED_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, isJSONRPCRequest, isJSONRPCResultResponse, isJSONRPCErrorResponse, JSONRPCMessageSchema, isInitializeRequest, init_types, McpServer, init_mcp, repointTrackerSyncBySwarmId, init_tracker, isRuntimePoolWakeable, isAgentReachable, init_reachability, referencedBundlePaths, skillDirs, init_manifest_format, TaskCreationBlockedError, init_errors2, resolveIdentity, renderIdentity, init_identity, recordUnmappedIdentity, init_unmapped_identities, MAX_TASK_ATTACHMENT_BYTES, recordTaskAttachmentUpload, scopeFromAttachment, backingProviderId, init_task_attachment_store, taskModelPin, resumedTaskModelSelection, init_model_pin, listHarnessModelSupport, recordHarnessModelSupport, agentRanModel, getAgentHarnessCliVersion, setAgentHarnessCliVersion, init_harness_model_support, sanitizeModelTierOverrides, parseModelTierOverridesHeader, setAgentModelTierOverrides, previewModelTiers, recordClaimModelResolution, init_model_tier_resolution, harnessModelErrorFor, poolTaskRunsOnHarness, explicitModelError, explicitModelErrorForAgent, init_model_validation, stripSiblingBlock, init_sibling_block, createTaskWithSiblingAwareness, init_sibling_awareness, transcribeAudioNotes, init_transcription, init_templates, buildEffectiveText, bufferedFileFailures, fetchSlackFiles, createSlackTaskWithFiles, notifySlackFileFailures, init_inbound_files, isAddressedToOtherUser, broadcastMatches, routeMessage, extractTaskFromMessage, init_router, extractSlackMessageText, slackInboundMessageText, collectSlackMessageFiles, init_message_text, createAdditiveBuffer, init_additive_buffer, recoverIncompleteRuns, init_recovery, handleWebhookTrigger, verifyHmacSignature, WebhookError, init_triggers, snapshotAndUpdateWorkflow, init_version, RawLlmConfigSchema, RawLlmOutputSchema, executeRawLlm, init_raw_llm, getExecutorRegistry2, initWorkflows2, init_workflows, dispatchScheduleTarget, calculateNextRun2, startScheduler2, stopScheduler2, runScheduleNow2, init_scheduler, ExtensionAssetConflictError, init_assets, ExtensionOwnershipError, getExtensionFiles, getExtensionById, getExtensionByName, listExtensions, listExtensionVersions, updateExtensionMeta, listExtensionRuns, init_db, SDK_ALLOWLIST, mcpToolNameForSdkMethod, init_sdk_allowlist, MCP_OVERFLOW_NAMESPACE, mcpOverflowAuthError, init_kv_overflow, hasKvViewArgs, resolveKvView, init_kv_view, COLOR_LITERAL_THRESHOLD, countColorLiterals, init_color_literals, toolErr, createToolRegistrar, init_utils, handleMcpBridge, init_mcp_bridge, Redacted, init_redacted, SCRIPT_SDK_RESPONSE_LIMIT_BYTES, readScriptSdkJsonResponse, init_response_limit, ExtensionConfigError, init_loader, ExtensionLifecycleError, setExtensionLoopbackBaseUrl, enableExtension, disableExtension, activateVersion, ExtensionAssetsInvalidError, installExtensionWithAssets, uninstallExtension, reloadExtension, loadEnabledExtensions, stopExtensionRuntime, init_lifecycle, ExtensionAbortedError2, isRegistered2, isExtensionAgentId2, getExtensionBridgeToken2, resolveBridgeCallOrigin2, extensionIdForAgent2, runContext2, registerLoaded2, unregister2, listRegistered2, dispatchPre2, dispatchPost2, init_dispatcher, REBOOT_RETRY_PIN_TAG2, getPinCandidateAgent2, resolveLeadOnlyRecoveryAssignment2, getResumeGeneration2, getNextResumeGeneration2, inheritedModelSelection2, createWorkerTaskFollowUp2, createResumeFollowUp2, createRerouteDecisionTask2, createPoolStarvationDecisionTask2, init_worker_follow_up, isGitHubEnabled, initGitHub, verifyWebhookSignature, isAgentMailEnabled, initAgentMail, verifyAgentMailWebhook, isInboxAllowed, isSenderAllowed, handleMessageReceived, init_agentmail, isAzureDevOpsEnabled, initAzureDevOps, verifyAzureDevOpsWebhook, isAzureDevOpsUrl, canonicalAzureDevOpsRepoUrl, parseAzureDevOpsRepoUrl, init_azure_devops, createdPullRequestOf, commentedPayloadOf, handlePullRequestCreated, handlePullRequestCommented, handleWorkItemCreated, handleWorkItemUpdated, handleWorkItemCommented, handleWorkItemDeleted, handleWorkItemRestored, initAzureDevOpsOutbound, init_azure_devops2, enqueueAuditRow, enqueueAdmissionRow, flushAuditBuffer, startAuditWriter, stopAuditWriter, startAuditGc, stopAuditGc, init_rbac_audit, getTelemetryIngestAnchor, init_telemetry_ingest_anchor, initApiTelemetry, syncTelemetryEnabled, init_telemetry_enable, isBitbucketEnabled, initBitbucket, verifyBitbucketWebhook, isDuplicateDelivery, markDeliveryProcessed, pullRequestEventOf, pullRequestCommentEventOf, handlePullRequestCreated2, handlePullRequestCommentCreated, handlePullRequestClosed, init_bitbucket, handlePullRequest, handleIssue, handleComment, handlePullRequestReview, handleCheckRun, handleCheckSuite, handleWorkflowRun, init_github, isGitLabEnabled, initGitLab, verifyGitLabWebhook, handleMergeRequest, handleIssue2, handleNote, handlePipeline, init_gitlab, isChatSdkEnabled, getChatSdkConfig, init_config, errorMessage, init_logger, resolveAdapterApiUrl, init_adapters, trackBackground, init_background, TelegramBotApiError, callTelegramBotApi, init_telegram_api, isTrustedTeamsServiceUrl, init_teams_origin, getSessionLabels, rememberSessionLabel, init_session_labels, isChatSdkStopping, startChatSdk, getChatInstance, isChatAdapterConfigured, getChatSdkHealth, stopChatSdk, init_runtime, getJiraMetadata, updateJiraMetadata, clearJiraMetadata, init_metadata, registerJiraWebhook, deleteJiraWebhook, init_webhook_lifecycle, isJiraEnabled, initJira, init_app, handleJiraWebhook, init_webhook, init_jira, handleAgentSessionEvent, handleIssueUpdate, handleIssueDelete, handleAgentSessionPrompted, init_sync, isLinearEnabled, initLinear, init_app2, init_linear, init_slack, isCookieSafePageId, extractPageSession, extractLegacyPageSession, extractAndVerifyCookie, isLocalDevPageRequest, pageSessionSetCookies, init_page_session, resolveHttpRequestAuth, init_auth, getDeploymentEnvValue, loadGlobalConfigsIntoEnv, reloadGlobalConfigsAndIntegrations, scheduleIntegrationsReload, handleCore, init_core, MCP_MAX_TOOL_INPUT_ELEMENTS, MCP_MAX_REQUEST_BODY_BYTES, init_mcp_limits, userCtx, init_task_tool_ctx, requestPrincipal, agentFirstPrincipal, requireAuthKind, rejectGuest, init_request_principal, handleApps, init_apps, cancelApprovalRequest, cancelApprovalRequestAndRun, init_approval_cancel, getUserCommsPrefs, init_requester_comms, getTaskDetailsInputSchema, getTaskDetailsOutputSchema, getTaskDetailsHandler, init_get_task_details, cancelTaskInputSchema, cancelTaskOutputSchema, cancelTaskHandler, init_cancel_task, executeReadOnlyQuery, assertSelectOnlyQuery, handleDbQuery, init_db_query, snapshotMetric, init_version2, AssetKeyAuthorizationError, authorizeAssetKeyWrite, init_asset_key_auth, getPageEditCounter, init_page_versions, snapshotPage, init_version3, DEFAULT_THEME_ID, THEME_PRESET_IDS, getThemePreset, init_presets, readThemeFields, init_page_fields, assertOAuthAppUrlsSafe, assertOAuthEgressUrlSafe, init_app_validation, listOAuthPresets, listOAuthPresetIds, getOAuthPreset, hydrateOAuthAppFromPreset, init_presets2, scopedResourceScopeIdSchema, resolveScopedResourceId, init_scoped_resource, MemoryKeyError, init_key_guard, refreshLinks, init_link_resolver, indexMemoryContent, init_index_content, dedupeMemoryDocumentIds, recordMemoryAccesses, recordRetrievals, init_retrieval, ExplicitSelfDuplicateError, applyRating, init_store, shouldPersistAutomaticTaskMemory, init_automatic_task_gate, guardTerminalTaskResultWrite, init_terminal_result_guard, getTasksInputSchema, getTasksOutputSchema, getTasksHandler, init_get_tasks, reservedNamespaceError, privateNamespaceError, reservedRoomKeyError, init_kv_reserved_namespaces, updateMcpServerChecked, init_mcp_server_checked_update, updateTouchesStdioExecution, init_mcp_server_stdio_gate, canReadMemory, init_access, getLinksForMemory, init_links_store, expandCandidatesWithGraph, init_graph_expansion, isApiDraining, drainApi, init_api_drain, markKapsoMessageRead, sendKapsoReaction, init_client, getKapsoConfig, getKapsoNumberMapping, markKapsoMessageSeen, init_config2, changesAllowMerge, init_repo_merge_policy, updateSwarmRepoChecked, init_repo_checked_update, getCombConfig, init_config3, resolveRoomNamespace, roomRequestInfo, authorizeRoomNamespace, sessionAccessTopic, sessionPresenceRoot, init_auth2, RoomOperationSchema, init_document, removeAwarenessStates, init_awareness, roomTopic, decodeRoomSnapshot, roomView, getRoom, changeRoom, applyRoomUpdate, resetRoom, sweepRooms, closeRooms, removeNamespaceRooms, init_rooms, init_scheduler2, MEMORY_KEYS_DEFAULT_PREFIX, MEMORY_KEYS_MAX_LIMIT, estimateTokens, posteriorMean, listMemoryKeys, checkChunkIntegrity, getMemoryChunks, getPosteriorsByIds, init_key_browser, createEvent, createEventsBatch, getEventCountsFiltered, getEventsFiltered, init_events, mergeScheduleTiming, validateRecurringTiming, init_validate, followUpThreadForSourceTask, evaluateFollowUpRedelegation, init_follow_up_redelegation_guard, checkOutputSchemaShape, sendTaskOutputSchema, sendTaskHandler, init_send_task, steerTaskUserInputSchema, steerTaskOutputSchema, steerTaskHandler, init_steer_task, canClaim, init_budget_admission, emitBudgetRefusalSideEffects, init_budget_refusal_notify, workflowModelErrors, init_model_validation2, patchWorkflowDefinition, init_patch_definition, idempotencyKeyHeader, readIdempotencyKey, replayAcceptedOperation, init_idempotency_key, resolveScriptsOnlyMode, init_scripts_only_mode, ALL_CAPABILITIES, hasCapability, getEnabledCapabilities, createServer, init_server };