@askexenow/exe-os 0.9.322 → 0.9.324

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/deploy/compose/.env.customer.example +1 -1
  2. package/deploy/compose/.env.example +18 -1
  3. package/deploy/compose/PROTECTED_FILES.md +4 -1
  4. package/deploy/compose/add-routes.sh +22 -0
  5. package/deploy/compose/cloudflared/config.yml.example +6 -3
  6. package/deploy/compose/docker-compose.yml +36 -1
  7. package/deploy/compose/generate-env.ts +40 -2
  8. package/deploy/compose/sso-edge/default.conf.template +11 -0
  9. package/deploy/compose/sso-edge/sso-redirect.conf +90 -21
  10. package/deploy/stack-manifests/v0.9.json +110 -2
  11. package/dist/{active-agent-M5NJFEBM.js → active-agent-CVSB2EER.js} +3 -3
  12. package/dist/{active-agent-SHM4QSRJ.js → active-agent-IUVRZOSF.js} +3 -3
  13. package/dist/{agentic-ontology-HQKCU7LG.js → agentic-ontology-2QFPBIQP.js} +1 -1
  14. package/dist/backfill-gate-J7UXFNXU.js +19 -0
  15. package/dist/{backfill-metadata-CXWFCTBO.js → backfill-metadata-W3PRQPVV.js} +4 -4
  16. package/dist/{behaviors-J47D342W.js → behaviors-MQCADHAD.js} +5 -5
  17. package/dist/bin/agentic-ontology-backfill.js +5 -5
  18. package/dist/bin/agentic-reflection-backfill.js +6 -6
  19. package/dist/bin/agentic-semantic-label.js +5 -5
  20. package/dist/bin/backfill-conversations.js +11 -11
  21. package/dist/bin/backfill-responses.js +11 -11
  22. package/dist/bin/backfill-vectors.js +102 -22
  23. package/dist/bin/bulk-sync-postgres.js +14 -14
  24. package/dist/bin/cc-doctor.js +5 -5
  25. package/dist/bin/cleanup-stale-review-tasks.js +20 -13
  26. package/dist/bin/cli.js +28 -31
  27. package/dist/bin/customer-readiness.js +1 -0
  28. package/dist/bin/deferred-daemon-restart.js +80 -77
  29. package/dist/bin/exe-agent-config.js +3 -3
  30. package/dist/bin/exe-agent.js +5 -5
  31. package/dist/bin/exe-assign.js +10 -10
  32. package/dist/bin/exe-boot.js +32 -23
  33. package/dist/bin/exe-call.js +5 -5
  34. package/dist/bin/exe-cloud.js +120 -47
  35. package/dist/bin/exe-config-dump.js +3 -3
  36. package/dist/bin/exe-dispatch.js +48 -14
  37. package/dist/bin/exe-doctor.js +4 -4
  38. package/dist/bin/exe-export-behaviors.js +7 -7
  39. package/dist/bin/exe-forget.js +6 -6
  40. package/dist/bin/exe-gateway.js +8 -8
  41. package/dist/bin/exe-healthcheck.js +17 -8
  42. package/dist/bin/exe-heartbeat.js +20 -13
  43. package/dist/bin/exe-kill.js +23 -16
  44. package/dist/bin/exe-launch-agent.js +30 -27
  45. package/dist/bin/exe-new-employee.js +9 -9
  46. package/dist/bin/exe-pending-messages.js +21 -14
  47. package/dist/bin/exe-pending-notifications.js +20 -13
  48. package/dist/bin/exe-pending-reviews.js +20 -13
  49. package/dist/bin/exe-rename.js +5 -5
  50. package/dist/bin/exe-review.js +22 -15
  51. package/dist/bin/exe-search.js +8 -13
  52. package/dist/bin/exe-session-cleanup.js +39 -22
  53. package/dist/bin/exe-settings.js +15 -15
  54. package/dist/bin/exe-start-codex.js +51 -34
  55. package/dist/bin/exe-start-opencode.js +8 -8
  56. package/dist/bin/exe-status.js +21 -14
  57. package/dist/bin/exe-support.js +3 -3
  58. package/dist/bin/exe-team.js +3 -3
  59. package/dist/bin/exe-watchdog.js +278 -39
  60. package/dist/bin/git-sweep.js +21 -14
  61. package/dist/bin/graph-backfill.js +4 -4
  62. package/dist/bin/graph-export.js +5 -5
  63. package/dist/bin/import-history.js +7 -7
  64. package/dist/bin/install-launchd.js +2 -2
  65. package/dist/bin/install.js +121 -88
  66. package/dist/bin/intercom-check.js +4 -4
  67. package/dist/bin/mcp-sessions.js +2 -2
  68. package/dist/bin/orchestration-metrics.js +4 -4
  69. package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
  70. package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
  71. package/dist/bin/pre-publish.js +1 -1
  72. package/dist/bin/registry-proxy.js +1 -1
  73. package/dist/bin/scan-tasks.js +20 -13
  74. package/dist/bin/setup.js +1 -1
  75. package/dist/bin/shard-migrate.js +4 -4
  76. package/dist/bin/stack-update.js +4 -4
  77. package/dist/bin/vps-health-gate.js +1 -1
  78. package/dist/{capability-cards-H7H3MU74.js → capability-cards-STD3NMCR.js} +2 -2
  79. package/dist/{capacity-monitor-WAEHVBL7.js → capacity-monitor-6O3PWYNM.js} +21 -14
  80. package/dist/{catchup-brief-L42STIDR.js → catchup-brief-EDQ3VZCF.js} +23 -16
  81. package/dist/{chunk-HKSJSW2V.js → chunk-2E2NKFXK.js} +1 -1
  82. package/dist/{chunk-NYFPFOYM.js → chunk-2NY7LZT7.js} +1 -1
  83. package/dist/{chunk-DGFIXJ4S.js → chunk-2QD5M47V.js} +3 -3
  84. package/dist/{chunk-3M73L663.js → chunk-2YWUZPHE.js} +2 -2
  85. package/dist/{chunk-LB77CSLO.js → chunk-2ZW4AQ24.js} +3 -3
  86. package/dist/{chunk-E32KARET.js → chunk-376J36IW.js} +4 -4
  87. package/dist/{chunk-CWQAXO3O.js → chunk-5RACW3LX.js} +28 -3
  88. package/dist/{chunk-VSXGFHJY.js → chunk-5VT45EV6.js} +1 -1
  89. package/dist/{chunk-X62GD6QW.js → chunk-5YCOEPEX.js} +2 -2
  90. package/dist/{chunk-TKBWBHFV.js → chunk-6FWMLTF2.js} +1 -1
  91. package/dist/chunk-6IWLAQ7O.js +40 -0
  92. package/dist/{chunk-WFHYAKEU.js → chunk-6XAAJ5OV.js} +1 -1
  93. package/dist/{chunk-4Z47UMMM.js → chunk-7M6TXYRQ.js} +23 -23
  94. package/dist/{chunk-HWC5W34K.js → chunk-7PLMYXPG.js} +1 -1
  95. package/dist/{chunk-DDKDN4HV.js → chunk-A47MXY2I.js} +7 -0
  96. package/dist/{chunk-SQ5JWDJ2.js → chunk-AEFZEJKW.js} +1 -1
  97. package/dist/{chunk-657AQEPY.js → chunk-AVKZIG4A.js} +1 -1
  98. package/dist/{chunk-EPBB2OD3.js → chunk-BB5IKY7B.js} +2 -2
  99. package/dist/{chunk-3JW3ZXCP.js → chunk-BC7IIR3A.js} +65 -39
  100. package/dist/{chunk-WSYKLS2Y.js → chunk-BDJQWBWF.js} +3 -3
  101. package/dist/{chunk-VY7345RO.js → chunk-BMSAJ2IH.js} +1 -1
  102. package/dist/{chunk-OI63OVCR.js → chunk-C7B44DJI.js} +1 -1
  103. package/dist/{chunk-GA76RGSP.js → chunk-CS6MYGNB.js} +5 -5
  104. package/dist/{chunk-6N4LYEDI.js → chunk-CSPHV5DJ.js} +1 -1
  105. package/dist/{chunk-HGM6NZQH.js → chunk-DYUISOIT.js} +1 -1
  106. package/dist/{signal-paths-4GOIRLGH.js → chunk-EIKATSE4.js} +3 -4
  107. package/dist/{chunk-G5TP2D2U.js → chunk-EWDTTTZP.js} +3 -3
  108. package/dist/{chunk-TI6YX3L5.js → chunk-F2RK5YWB.js} +36 -27
  109. package/dist/{chunk-HV5CUDOE.js → chunk-F6TJIWN5.js} +1 -1
  110. package/dist/{chunk-WCCR5IFR.js → chunk-FPTBCPI3.js} +2 -2
  111. package/dist/{chunk-QVFJCFNM.js → chunk-FROUDYRT.js} +33 -2
  112. package/dist/{chunk-T6AUMO5X.js → chunk-GIFDGNIL.js} +1 -1
  113. package/dist/{chunk-OFR7KQ37.js → chunk-HAYDXMW6.js} +3 -3
  114. package/dist/{chunk-V2ESQU3S.js → chunk-HBKYKN3S.js} +3 -3
  115. package/dist/{chunk-LCZ55G5G.js → chunk-HZ5J2GFE.js} +136 -66
  116. package/dist/{chunk-EOPSIIEH.js → chunk-ID3V4BWS.js} +1 -1
  117. package/dist/{chunk-ABGDTMKC.js → chunk-JRD7ARQ6.js} +60 -2
  118. package/dist/{chunk-7FBPLVHM.js → chunk-KADUJ7PE.js} +3 -3
  119. package/dist/{chunk-KLG53B63.js → chunk-KJOQLNX2.js} +1 -1
  120. package/dist/{chunk-AZL3EUR3.js → chunk-KK67DSCO.js} +229 -29
  121. package/dist/{chunk-H2SD2EA7.js → chunk-KLDQFOFY.js} +23 -9
  122. package/dist/chunk-KPIN44GZ.js +67 -0
  123. package/dist/{chunk-PLBDXCYZ.js → chunk-KUJGADX6.js} +1491 -606
  124. package/dist/{chunk-GN3IWZDH.js → chunk-KWWHRJGG.js} +660 -539
  125. package/dist/{chunk-ERSFOJGC.js → chunk-LUOQCGBO.js} +20 -11
  126. package/dist/{chunk-CXXERHNC.js → chunk-LWAGAC3H.js} +1 -1
  127. package/dist/{chunk-7BZ6TOZN.js → chunk-MB2YT5VQ.js} +3 -3
  128. package/dist/{chunk-KXP3CUTL.js → chunk-MCEXBLLK.js} +3 -3
  129. package/dist/{chunk-A3KUGBDP.js → chunk-MIWPKWXQ.js} +1 -1
  130. package/dist/{chunk-7CUF27OT.js → chunk-MKIFYIXC.js} +1 -1
  131. package/dist/{chunk-ONKIWA3R.js → chunk-ML4S5SHZ.js} +3 -1
  132. package/dist/{chunk-BFHBHQFA.js → chunk-MWIX3YKA.js} +5 -5
  133. package/dist/{chunk-6UQRJCKK.js → chunk-NBDTQVWU.js} +2 -2
  134. package/dist/{chunk-KK4ZOYXJ.js → chunk-NGACCR2M.js} +80 -40
  135. package/dist/{chunk-CMDC5D7S.js → chunk-NLEW62VC.js} +6 -0
  136. package/dist/{chunk-QYLDCPNG.js → chunk-PGFYWVOB.js} +1 -1
  137. package/dist/{chunk-XEBN5CPD.js → chunk-PGUISLOT.js} +3 -3
  138. package/dist/{chunk-MYMA23KC.js → chunk-PJTEZLAM.js} +1 -1
  139. package/dist/{chunk-QNUHDEPI.js → chunk-POOMY3CS.js} +4 -4
  140. package/dist/{chunk-2GBGIXKH.js → chunk-PV7IG4V6.js} +1 -1
  141. package/dist/{chunk-SENJA7BZ.js → chunk-QDI77B3E.js} +54 -7
  142. package/dist/{chunk-XLNF3CIO.js → chunk-QGOMYIVT.js} +119 -24
  143. package/dist/{chunk-HIOO7DZ2.js → chunk-QQFZ32WS.js} +5 -5
  144. package/dist/{chunk-KL5WYWS3.js → chunk-SOXUF34Y.js} +2 -2
  145. package/dist/{chunk-6XM6PZXQ.js → chunk-SPO2RLOB.js} +1 -1
  146. package/dist/{chunk-ROMB2HH4.js → chunk-T3XHH5FE.js} +6 -6
  147. package/dist/{chunk-6SXJZHRJ.js → chunk-TA3A4UQL.js} +1 -1
  148. package/dist/{chunk-XP53WEXP.js → chunk-TGVKQ3QB.js} +3 -3
  149. package/dist/{chunk-XC7C3GQ2.js → chunk-TNS6U2K7.js} +30 -19
  150. package/dist/{chunk-JXEMAB4M.js → chunk-UAIMI7CK.js} +1 -1
  151. package/dist/{chunk-YIFZZYQD.js → chunk-UBYAKNRF.js} +2 -2
  152. package/dist/{chunk-6IBUQBMY.js → chunk-UXYQLOFW.js} +198 -39
  153. package/dist/{chunk-C4BIZXKB.js → chunk-UYOW7U24.js} +1 -1
  154. package/dist/{chunk-NFM6VHL7.js → chunk-V4VYIHSL.js} +1 -1
  155. package/dist/{chunk-QQOH3I4A.js → chunk-VDUHWQFA.js} +1 -1
  156. package/dist/{chunk-EVUXF2G4.js → chunk-W5GBB23I.js} +1 -1
  157. package/dist/{chunk-FANIBYUO.js → chunk-WF3J6GJZ.js} +2 -2
  158. package/dist/{chunk-NAHAOFTY.js → chunk-WGHTISNK.js} +3 -3
  159. package/dist/{chunk-F5FAD2YR.js → chunk-WGOAILWE.js} +2 -2
  160. package/dist/{chunk-LOE2N23P.js → chunk-WJICX53Z.js} +1 -1
  161. package/dist/{skill-refinement-YLIAY7V4.js → chunk-Y2KBHLEO.js} +3 -11
  162. package/dist/{chunk-PISGLNV7.js → chunk-Y34FDPOY.js} +5 -5
  163. package/dist/{chunk-ORC5AO7E.js → chunk-YBHOWK3L.js} +2 -2
  164. package/dist/{chunk-7SDS5VCL.js → chunk-ZDNJ3TSB.js} +7 -7
  165. package/dist/{chunk-CHSRSESS.js → chunk-ZRZ2Z6RZ.js} +1 -1
  166. package/dist/{cleanup-graph-garbage-MX5JDTJA.js → cleanup-graph-garbage-2YH52ADR.js} +4 -4
  167. package/dist/{co-activation-K44LGZ7A.js → co-activation-7F3J2GC7.js} +2 -2
  168. package/dist/{co-occurrence-N62HJTRP.js → co-occurrence-B36Q5GY3.js} +2 -2
  169. package/dist/{code-context-index-6YQ3DGCN.js → code-context-index-2PUBBQOE.js} +3 -3
  170. package/dist/{crdt-sync-BO76VVRX.js → crdt-sync-MXHPR6V6.js} +1 -1
  171. package/dist/{crm-bridge-BVTB6LZK.js → crm-bridge-CZLEW2LW.js} +1 -1
  172. package/dist/{crm-webhook-UZLTHXAS.js → crm-webhook-56MWGMRY.js} +2 -2
  173. package/dist/{cto-delegation-gate-NVMRONA2.js → cto-delegation-gate-26BD7NEE.js} +19 -12
  174. package/dist/{daemon-orchestration-JI3RD5EZ.js → daemon-orchestration-IBP6PWEG.js} +31 -16
  175. package/dist/{db-backup-ITRADB2J.js → db-backup-XLID57KW.js} +1 -1
  176. package/dist/{doc-graph-extractor-L7YESUSI.js → doc-graph-extractor-VBZ6XTTE.js} +2 -2
  177. package/dist/{documents-7BFXA6V3.js → documents-C5LYSJT3.js} +10 -10
  178. package/dist/{dreaming-NRTMPNPZ.js → dreaming-LMVDIC5C.js} +20 -13
  179. package/dist/{exe-drift-GLJIM7EI.js → exe-drift-T3K6WA47.js} +3 -3
  180. package/dist/{exe-export-THIAYHXK.js → exe-export-QCTASWXI.js} +7 -7
  181. package/dist/{exe-import-3Y4VOUYL.js → exe-import-WNP5A7VA.js} +7 -7
  182. package/dist/{exe-key-IPGY4RMU.js → exe-key-JM3JXE2E.js} +78 -75
  183. package/dist/{exe-snapshot-2ZEWCDYK.js → exe-snapshot-ODDJUEM5.js} +23 -16
  184. package/dist/{fast-db-init-TLYUWCDE.js → fast-db-init-O6A3TK3F.js} +1 -1
  185. package/dist/{founder-context-J362DNU4.js → founder-context-FYTF4IMD.js} +2 -2
  186. package/dist/gateway/index.js +9 -9
  187. package/dist/{git-staleness-BRDHTHNS.js → git-staleness-YA5J6VYJ.js} +2 -2
  188. package/dist/{global-procedures-FNUKY2LF.js → global-procedures-76NDWTYN.js} +4 -4
  189. package/dist/{graph-auto-extract-AJZUV3PO.js → graph-auto-extract-I7QL2TY5.js} +2 -2
  190. package/dist/hooks/bug-report-worker.js +22 -15
  191. package/dist/hooks/codex-stop-task-finalizer.js +22 -15
  192. package/dist/hooks/commit-complete.js +22 -15
  193. package/dist/hooks/error-recall.js +6 -6
  194. package/dist/hooks/exe-heartbeat-hook.js +3 -3
  195. package/dist/hooks/ingest-worker.js +6 -6
  196. package/dist/hooks/ingest.js +6 -6
  197. package/dist/hooks/instructions-loaded.js +4 -4
  198. package/dist/hooks/manifest.json +20 -20
  199. package/dist/hooks/notification.js +4 -4
  200. package/dist/hooks/post-compact.js +21 -14
  201. package/dist/hooks/post-tool-combined.js +8 -8
  202. package/dist/hooks/pre-compact.js +22 -21
  203. package/dist/hooks/pre-tool-use.js +29 -19
  204. package/dist/hooks/prompt-submit.js +89 -72
  205. package/dist/hooks/session-end.js +27 -26
  206. package/dist/hooks/session-start.js +13 -13
  207. package/dist/hooks/stop.js +28 -21
  208. package/dist/hooks/subagent-stop.js +24 -41
  209. package/dist/hooks/summary-worker.js +27 -25
  210. package/dist/index.js +30 -23
  211. package/dist/{installer-SC7CQBYY.js → installer-3EYHBKWB.js} +5 -5
  212. package/dist/{installer-UEF44TWQ.js → installer-3VZMDDMJ.js} +5 -5
  213. package/dist/{installer-2EKTDQZB.js → installer-GYABVCB7.js} +5 -5
  214. package/dist/intercom-queue-ZCNT4LYU.js +53 -0
  215. package/dist/lib/agent-config.js +7 -1
  216. package/dist/lib/cloud-sync.js +16 -14
  217. package/dist/lib/consolidation.js +5 -5
  218. package/dist/lib/database.js +10 -2
  219. package/dist/lib/db-daemon-client.js +3 -3
  220. package/dist/lib/db.js +10 -2
  221. package/dist/lib/device-registry.js +1 -1
  222. package/dist/lib/embed-worker.js +28 -0
  223. package/dist/lib/embedder.js +3 -3
  224. package/dist/lib/employee-templates.js +5 -5
  225. package/dist/lib/employees.js +2 -2
  226. package/dist/lib/exe-daemon-client.js +2 -2
  227. package/dist/lib/exe-daemon.js +393 -140
  228. package/dist/lib/hybrid-search.js +5 -5
  229. package/dist/lib/identity.js +2 -2
  230. package/dist/lib/license.js +2 -2
  231. package/dist/lib/messaging.js +20 -13
  232. package/dist/lib/registry-proxy.js +1 -1
  233. package/dist/lib/reminders.js +3 -3
  234. package/dist/lib/schedules.js +5 -5
  235. package/dist/lib/session-registry.js +6 -4
  236. package/dist/lib/skill-learning.js +6 -6
  237. package/dist/lib/store.js +4 -4
  238. package/dist/lib/task-router.js +3 -3
  239. package/dist/lib/tasks.js +21 -14
  240. package/dist/lib/tmux-routing.js +29 -12
  241. package/dist/lib/token-spend.js +3 -3
  242. package/dist/{license-gate-YUUSIPJ7.js → license-gate-73XGUIVP.js} +3 -3
  243. package/dist/{license-sync-LX73IEBH.js → license-sync-CG5YRUVH.js} +2 -2
  244. package/dist/mcp/register-tools.js +75 -72
  245. package/dist/mcp/server.js +96 -130
  246. package/dist/mcp/tools/complete-reminder.js +4 -4
  247. package/dist/mcp/tools/create-reminder.js +4 -4
  248. package/dist/mcp/tools/create-task.js +37 -18
  249. package/dist/mcp/tools/deactivate-behavior.js +7 -7
  250. package/dist/mcp/tools/list-reminders.js +4 -4
  251. package/dist/mcp/tools/list-tasks.js +23 -16
  252. package/dist/mcp/tools/send-message.js +22 -15
  253. package/dist/mcp/tools/update-task.js +22 -15
  254. package/dist/{mcp-http-config-MBG5AQNH.js → mcp-http-config-TT7PXZLX.js} +3 -3
  255. package/dist/{memory-cards-MGZ4P3AA.js → memory-cards-6NGUDUDN.js} +4 -4
  256. package/dist/{memory-graph-extractor-44P2ATID.js → memory-graph-extractor-FIMS3VQR.js} +3 -3
  257. package/dist/{memory-poisoning-defense-3CYFKNLA.js → memory-poisoning-defense-M3LOQ3XU.js} +2 -2
  258. package/dist/{memory-pressure-watchdog-6PFLEOUO.js → memory-pressure-watchdog-45GABDWH.js} +20 -13
  259. package/dist/{memory-queue-client-BZD6MXA5.js → memory-queue-client-BDYKFNB4.js} +3 -3
  260. package/dist/{memory-reflection-AYPJRPU7.js → memory-reflection-LANCFYK2.js} +7 -9
  261. package/dist/{notifications-BBQ23ORD.js → notifications-N5NKUYAU.js} +19 -12
  262. package/dist/{orchestration-events-O5P5NEKS.js → orchestration-events-KVNRNIPR.js} +3 -3
  263. package/dist/{orchestrator-SERM6FDY.js → orchestrator-VTF5BR26.js} +21 -14
  264. package/dist/{pipeline-router-T673WGL3.js → pipeline-router-KQAYWDPH.js} +3 -3
  265. package/dist/{plan-limits-QWBN2EKH.js → plan-limits-EUZI4X5W.js} +5 -5
  266. package/dist/{projection-worker-K6TILAZH.js → projection-worker-FG6G226D.js} +12 -2
  267. package/dist/{prospective-memory-XRNRMEDL.js → prospective-memory-FVDNUSIL.js} +2 -2
  268. package/dist/{reranker-3XC5UM4F.js → reranker-54Q3L32E.js} +1 -1
  269. package/dist/{retrieval-health-ULVVOIPL.js → retrieval-health-YJ7CXYVD.js} +1 -1
  270. package/dist/{review-polling-5YGDPJUX.js → review-polling-TKXYSXH6.js} +20 -13
  271. package/dist/runtime/index.js +23 -16
  272. package/dist/{session-events-D52HNUJK.js → session-events-WQHTP65R.js} +20 -13
  273. package/dist/{session-kill-telemetry-IBNCJSI7.js → session-kill-telemetry-2HSE7IGH.js} +20 -13
  274. package/dist/{session-scope-5FWZ4AYR.js → session-scope-RBKAC75W.js} +19 -12
  275. package/dist/{setup-wizard-KVTLSSRD.js → setup-wizard-AA6ZV57H.js} +1 -1
  276. package/dist/signal-paths-4G53QTII.js +11 -0
  277. package/dist/skill-refinement-QI35LMTZ.js +20 -0
  278. package/dist/{stack-update-OWWGTYRB.js → stack-update-BE6PX4AG.js} +9 -3
  279. package/dist/{steward-gate-3ZITRYVH.js → steward-gate-2XD5BXH6.js} +3 -3
  280. package/dist/{support-outbox-QPQQK7F7.js → support-outbox-MGUVVGHT.js} +96 -44
  281. package/dist/sweep-budget-WB2FKPYN.js +64 -0
  282. package/dist/{task-enforcement-L4YTDOOX.js → task-enforcement-DMOCBRLB.js} +191 -17
  283. package/dist/{task-scope-OIHLMQOQ.js → task-scope-ULBNFBFH.js} +25 -12
  284. package/dist/{tasks-crud-QUIIRWE3.js → tasks-crud-6SJOKES5.js} +25 -12
  285. package/dist/{tasks-notify-ANYLB5GU.js → tasks-notify-TESRABUM.js} +20 -13
  286. package/dist/{tasks-review-BWSCXFMB.js → tasks-review-INDAGLWJ.js} +27 -14
  287. package/dist/{telemetry-upload-XLDBCD7B.js → telemetry-upload-6XB3Q3IH.js} +7 -7
  288. package/dist/{token-budget-OQCLPV3A.js → token-budget-NOF27AZC.js} +3 -3
  289. package/dist/{tool-capability-index-3UWKZZED.js → tool-capability-index-EFBBPTBI.js} +1 -1
  290. package/dist/{tool-telemetry-AQTFWOWG.js → tool-telemetry-OEK6KQFF.js} +1 -1
  291. package/dist/tui/App.js +28 -21
  292. package/dist/{tui-data-3Y5L5LJB.js → tui-data-EG6LEZFF.js} +19 -12
  293. package/dist/{worker-gate-WJS2MFNA.js → worker-gate-YA35VMAN.js} +1 -1
  294. package/dist/{workflow-engine-EPPZ226V.js → workflow-engine-3AVKRE5I.js} +2 -2
  295. package/dist/{worktree-OYGDGJP7.js → worktree-72QYYL5L.js} +4 -4
  296. package/dist/{worktree-sweep-KV4H4766.js → worktree-sweep-GDISKGQ2.js} +5 -5
  297. package/package.json +1 -1
  298. package/release-notes.json +45 -45
  299. package/dist/chunk-4FVVJ7ME.js +0 -193
  300. package/dist/completion-nudge-dedup-DBZF24MM.js +0 -74
  301. package/dist/git-task-sweep-7GVUKDBW.js +0 -47
  302. package/dist/intercom-queue-6M5IRX3Y.js +0 -17
  303. /package/dist/{chunk-QTEHH4LG.js → chunk-24WPWCD6.js} +0 -0
  304. /package/dist/{chunk-IZY6V4FI.js → chunk-4O3N7I5Z.js} +0 -0
  305. /package/dist/{chunk-WXRVHXVP.js → chunk-7577GDDG.js} +0 -0
  306. /package/dist/{chunk-Q5YKWFVO.js → chunk-EWKZKO7F.js} +0 -0
  307. /package/dist/{chunk-DY3J6GQO.js → chunk-H43BPGIV.js} +0 -0
  308. /package/dist/{chunk-DQJ3WZRK.js → chunk-IHRXCNSC.js} +0 -0
  309. /package/dist/{chunk-RRQI5PSJ.js → chunk-NIB2N6L2.js} +0 -0
  310. /package/dist/{chunk-ZU6767WK.js → chunk-QMUSJESS.js} +0 -0
  311. /package/dist/{chunk-72LWCZTJ.js → chunk-RXS2LBKE.js} +0 -0
  312. /package/dist/{chunk-SJZT66LM.js → chunk-SNFYZFXY.js} +0 -0
  313. /package/dist/{chunk-SIJSFULW.js → chunk-TSYMWC53.js} +0 -0
  314. /package/dist/{core-memory-DARTILJG.js → core-memory-NKKP2XUB.js} +0 -0
  315. /package/dist/{entity-boost-VR5YOQCT.js → entity-boost-DRIUFTYB.js} +0 -0
  316. /package/dist/{message-queue-client-HVFR67QH.js → message-queue-client-4ERC7HLX.js} +0 -0
  317. /package/dist/{oauth-server-UQHCFVHT.js → oauth-server-PECJREY2.js} +0 -0
  318. /package/dist/{project-boot-22ZZL2GE.js → project-boot-SFKP2MFW.js} +0 -0
  319. /package/dist/{wiki-acl-EZMGL6KW.js → wiki-acl-QIBDNXSM.js} +0 -0
@@ -2,10 +2,10 @@ import {
2
2
  exportOrchestration,
3
3
  importOrchestration,
4
4
  validatePackage
5
- } from "./chunk-KXP3CUTL.js";
5
+ } from "./chunk-MCEXBLLK.js";
6
6
  import {
7
7
  runDriftProbes
8
- } from "./chunk-6N4LYEDI.js";
8
+ } from "./chunk-CSPHV5DJ.js";
9
9
  import {
10
10
  DEFAULT_LIST_LIMIT,
11
11
  MAX_IMPORTANCE,
@@ -14,7 +14,7 @@ import {
14
14
  ingestDocument,
15
15
  listDocumentsByWorkspace,
16
16
  updateChunksImportance
17
- } from "./chunk-QNUHDEPI.js";
17
+ } from "./chunk-POOMY3CS.js";
18
18
  import {
19
19
  analyzeBlastRadius,
20
20
  buildCodeContextIndex,
@@ -23,17 +23,17 @@ import {
23
23
  searchCodeContext,
24
24
  searchCodeContextSemantic,
25
25
  traceCodeSymbol
26
- } from "./chunk-OI63OVCR.js";
26
+ } from "./chunk-C7B44DJI.js";
27
27
  import {
28
28
  StewardGate
29
- } from "./chunk-7CUF27OT.js";
29
+ } from "./chunk-MKIFYIXC.js";
30
30
  import {
31
31
  DreamingEngine
32
- } from "./chunk-NAHAOFTY.js";
32
+ } from "./chunk-WGHTISNK.js";
33
33
  import {
34
34
  isRerankerAvailable,
35
35
  rerankWithScores
36
- } from "./chunk-RRQI5PSJ.js";
36
+ } from "./chunk-NIB2N6L2.js";
37
37
  import {
38
38
  getEntityByName,
39
39
  getEntityNeighbors,
@@ -44,10 +44,10 @@ import {
44
44
  } from "./chunk-CRCB5S7I.js";
45
45
  import {
46
46
  AUTO_WAKE_MAX_RETRIES
47
- } from "./chunk-AZL3EUR3.js";
47
+ } from "./chunk-KK67DSCO.js";
48
48
  import {
49
49
  listRecentSessionEvents
50
- } from "./chunk-JXEMAB4M.js";
50
+ } from "./chunk-UAIMI7CK.js";
51
51
  import {
52
52
  DEFAULT_EXPLORE_DURATION_MS,
53
53
  getPlayMode,
@@ -56,10 +56,10 @@ import {
56
56
  } from "./chunk-PVYR4FCQ.js";
57
57
  import {
58
58
  getToolUsageStats
59
- } from "./chunk-Q5YKWFVO.js";
59
+ } from "./chunk-EWKZKO7F.js";
60
60
  import {
61
61
  getToolCapabilityIndex
62
- } from "./chunk-SJZT66LM.js";
62
+ } from "./chunk-SNFYZFXY.js";
63
63
  import {
64
64
  isToolAllowed,
65
65
  isToolAllowedForPlan
@@ -67,68 +67,68 @@ import {
67
67
  import {
68
68
  getCachedLicenseGate,
69
69
  refreshLicenseGate
70
- } from "./chunk-6XM6PZXQ.js";
70
+ } from "./chunk-SPO2RLOB.js";
71
71
  import {
72
72
  loadOrchestrationPhase,
73
73
  setOrchestrationPhase
74
74
  } from "./chunk-32SXNM3G.js";
75
75
  import {
76
76
  createOrRefreshResumeTask
77
- } from "./chunk-HIOO7DZ2.js";
77
+ } from "./chunk-QQFZ32WS.js";
78
78
  import {
79
79
  registerUpdateTask
80
- } from "./chunk-XP53WEXP.js";
80
+ } from "./chunk-TGVKQ3QB.js";
81
81
  import {
82
82
  registerCreateReminder
83
- } from "./chunk-NYFPFOYM.js";
83
+ } from "./chunk-2NY7LZT7.js";
84
84
  import {
85
85
  registerListReminders
86
- } from "./chunk-6SXJZHRJ.js";
86
+ } from "./chunk-TA3A4UQL.js";
87
87
  import {
88
88
  registerCompleteReminder
89
- } from "./chunk-WFHYAKEU.js";
89
+ } from "./chunk-6XAAJ5OV.js";
90
90
  import {
91
91
  registerDeactivateBehavior
92
- } from "./chunk-E32KARET.js";
92
+ } from "./chunk-376J36IW.js";
93
93
  import {
94
94
  completeReminder,
95
95
  createReminder,
96
96
  listReminders
97
- } from "./chunk-EVUXF2G4.js";
97
+ } from "./chunk-W5GBB23I.js";
98
98
  import {
99
99
  registerSendMessage
100
- } from "./chunk-WCCR5IFR.js";
100
+ } from "./chunk-FPTBCPI3.js";
101
101
  import {
102
102
  registerCreateTask
103
- } from "./chunk-6IBUQBMY.js";
103
+ } from "./chunk-UXYQLOFW.js";
104
104
  import {
105
105
  registerListTasks
106
- } from "./chunk-DGFIXJ4S.js";
106
+ } from "./chunk-2QD5M47V.js";
107
107
  import {
108
108
  TOKENS_PER_IDLE_MINUTE,
109
109
  countKillsSince,
110
110
  sumTokensSavedSince
111
- } from "./chunk-G5TP2D2U.js";
111
+ } from "./chunk-EWDTTTZP.js";
112
112
  import {
113
113
  registerImportConversations
114
- } from "./chunk-LB77CSLO.js";
114
+ } from "./chunk-2ZW4AQ24.js";
115
115
  import {
116
116
  createSchedule,
117
117
  parseHumanCron
118
- } from "./chunk-6UQRJCKK.js";
118
+ } from "./chunk-NBDTQVWU.js";
119
119
  import {
120
120
  status
121
- } from "./chunk-WSYKLS2Y.js";
121
+ } from "./chunk-BDJQWBWF.js";
122
122
  import {
123
123
  getAgentSpend
124
- } from "./chunk-VSXGFHJY.js";
124
+ } from "./chunk-5VT45EV6.js";
125
125
  import {
126
126
  exportGraphHTML,
127
127
  generateGraphReport
128
128
  } from "./chunk-3OEVDGIY.js";
129
129
  import {
130
130
  runHealthCheck
131
- } from "./chunk-SENJA7BZ.js";
131
+ } from "./chunk-QDI77B3E.js";
132
132
  import {
133
133
  checkCpuStealSync
134
134
  } from "./chunk-SSC7EKY2.js";
@@ -140,16 +140,16 @@ import {
140
140
  formatReport,
141
141
  runAudit,
142
142
  shouldFixShards
143
- } from "./chunk-ROMB2HH4.js";
143
+ } from "./chunk-T3XHH5FE.js";
144
144
  import {
145
145
  formatDegradations,
146
146
  getRetrievalHealth
147
- } from "./chunk-QTEHH4LG.js";
147
+ } from "./chunk-24WPWCD6.js";
148
148
  import {
149
149
  hasFailures,
150
150
  runHealth,
151
151
  runTest
152
- } from "./chunk-V2ESQU3S.js";
152
+ } from "./chunk-HBKYKN3S.js";
153
153
  import {
154
154
  isSupportReportSentStatus,
155
155
  markSupportReportSent
@@ -160,28 +160,28 @@ import {
160
160
  } from "./chunk-2XZ6X3PJ.js";
161
161
  import {
162
162
  renderClientCOOTemplate
163
- } from "./chunk-LOE2N23P.js";
163
+ } from "./chunk-WJICX53Z.js";
164
164
  import {
165
165
  deactivateGlobalProcedure,
166
166
  loadGlobalProcedures,
167
167
  storeGlobalProcedure
168
- } from "./chunk-ORC5AO7E.js";
168
+ } from "./chunk-YBHOWK3L.js";
169
169
  import {
170
170
  PLATFORM_PROCEDURES
171
- } from "./chunk-DDKDN4HV.js";
171
+ } from "./chunk-A47MXY2I.js";
172
172
  import {
173
173
  clearCloudReuploadRequired,
174
174
  cloudSync,
175
175
  getCloudReuploadRequired,
176
176
  markCloudReuploadRequired
177
- } from "./chunk-LCZ55G5G.js";
177
+ } from "./chunk-HZ5J2GFE.js";
178
178
  import {
179
179
  createARecord
180
180
  } from "./chunk-X2Z5GT3V.js";
181
181
  import {
182
182
  findSimilarTrajectories,
183
183
  hashSignature
184
- } from "./chunk-TI6YX3L5.js";
184
+ } from "./chunk-F2RK5YWB.js";
185
185
  import {
186
186
  GHOST_BEHAVIOR_SQL,
187
187
  deactivateBehavior,
@@ -190,43 +190,40 @@ import {
190
190
  reactivateBehavior,
191
191
  storeBehavior,
192
192
  storeReflexBehavior
193
- } from "./chunk-FANIBYUO.js";
193
+ } from "./chunk-WF3J6GJZ.js";
194
194
  import {
195
195
  countUnconsolidated,
196
196
  groupMemories,
197
197
  runConsolidation,
198
198
  selectUnconsolidated
199
- } from "./chunk-XC7C3GQ2.js";
199
+ } from "./chunk-TNS6U2K7.js";
200
200
  import {
201
201
  entityId,
202
202
  mergeEntities
203
203
  } from "./chunk-7UMCQQWS.js";
204
204
  import {
205
205
  embed
206
- } from "./chunk-CHSRSESS.js";
206
+ } from "./chunk-ZRZ2Z6RZ.js";
207
207
  import {
208
208
  detectDcrIncompatibleConnectorsFromDisk,
209
209
  detectExternalMcpFailures,
210
210
  readMcpHttpEvents,
211
211
  summarizeMcpTransport,
212
212
  writeMcpTransportSummary
213
- } from "./chunk-CWQAXO3O.js";
213
+ } from "./chunk-5RACW3LX.js";
214
214
  import {
215
215
  updateTask
216
- } from "./chunk-7SDS5VCL.js";
216
+ } from "./chunk-ZDNJ3TSB.js";
217
217
  import {
218
218
  fastDbInit
219
- } from "./chunk-ZU6767WK.js";
219
+ } from "./chunk-QMUSJESS.js";
220
220
  import {
221
221
  MAX_CONCURRENT_WORKERS
222
- } from "./chunk-TKBWBHFV.js";
223
- import {
224
- readDaemonToken
225
- } from "./chunk-3NGZ4PL7.js";
222
+ } from "./chunk-6FWMLTF2.js";
226
223
  import {
227
224
  hybridSearch,
228
225
  recentRecords
229
- } from "./chunk-4Z47UMMM.js";
226
+ } from "./chunk-7M6TXYRQ.js";
230
227
  import {
231
228
  buildFtsMatch,
232
229
  tokenizeForFts
@@ -236,24 +233,25 @@ import {
236
233
  flushBatch,
237
234
  initStore,
238
235
  writeMemory
239
- } from "./chunk-H2SD2EA7.js";
236
+ } from "./chunk-KLDQFOFY.js";
240
237
  import {
241
238
  getActiveAgent
242
- } from "./chunk-EOPSIIEH.js";
239
+ } from "./chunk-ID3V4BWS.js";
243
240
  import {
244
241
  getMySession,
245
242
  resolveExeSession,
246
243
  resolveTask,
244
+ sanitizeSessionScope,
247
245
  sessionScopeFilter,
248
246
  updateTaskStatus,
249
247
  writeCheckpoint
250
- } from "./chunk-PLBDXCYZ.js";
248
+ } from "./chunk-KUJGADX6.js";
251
249
  import {
252
250
  listSessions
253
- } from "./chunk-ABGDTMKC.js";
251
+ } from "./chunk-JRD7ARQ6.js";
254
252
  import {
255
253
  recordOrchestrationEventBestEffort
256
- } from "./chunk-HV5CUDOE.js";
254
+ } from "./chunk-F6TJIWN5.js";
257
255
  import {
258
256
  DEFAULT_MODELS,
259
257
  KNOWN_RUNTIMES,
@@ -261,7 +259,7 @@ import {
261
259
  getAgentRuntime,
262
260
  loadAgentConfig,
263
261
  setAgentRuntime
264
- } from "./chunk-QVFJCFNM.js";
262
+ } from "./chunk-FROUDYRT.js";
265
263
  import {
266
264
  DEFAULT_RUNTIME
267
265
  } from "./chunk-NGP6LSV2.js";
@@ -270,10 +268,13 @@ import {
270
268
  assertEmployeeLimit,
271
269
  assertFeature,
272
270
  assertMemoryLimit
273
- } from "./chunk-EPBB2OD3.js";
271
+ } from "./chunk-BB5IKY7B.js";
274
272
  import {
275
273
  getProjectName
276
274
  } from "./chunk-OPU3NYOO.js";
275
+ import {
276
+ readDaemonToken
277
+ } from "./chunk-3NGZ4PL7.js";
277
278
  import {
278
279
  getAgentContext
279
280
  } from "./chunk-GJV3WDWM.js";
@@ -286,10 +287,10 @@ import {
286
287
  isScheduledTrigger,
287
288
  loadTriggers,
288
289
  sanitizeParam
289
- } from "./chunk-IZY6V4FI.js";
290
+ } from "./chunk-4O3N7I5Z.js";
290
291
  import {
291
292
  pushConversationToCRM
292
- } from "./chunk-ONKIWA3R.js";
293
+ } from "./chunk-ML4S5SHZ.js";
293
294
  import {
294
295
  EMPLOYEES_PATH,
295
296
  addEmployee,
@@ -307,7 +308,7 @@ import {
307
308
  loadEmployeesSync,
308
309
  saveEmployees,
309
310
  updateIdentity
310
- } from "./chunk-XLNF3CIO.js";
311
+ } from "./chunk-QGOMYIVT.js";
311
312
  import {
312
313
  getEventLoopLagMs,
313
314
  isDaemonAlive,
@@ -329,7 +330,7 @@ import {
329
330
  refreshLicense,
330
331
  saveLicense,
331
332
  validateLicense
332
- } from "./chunk-VY7345RO.js";
333
+ } from "./chunk-BMSAJ2IH.js";
333
334
  import {
334
335
  EXE_AI_DIR,
335
336
  loadConfig
@@ -513,7 +514,7 @@ function registerRecallMyMemory(server) {
513
514
  }) => {
514
515
  try {
515
516
  if (!isInitialized()) {
516
- const { fastDbInit: fastDbInit2 } = await import("./fast-db-init-TLYUWCDE.js");
517
+ const { fastDbInit: fastDbInit2 } = await import("./fast-db-init-O6A3TK3F.js");
517
518
  await fastDbInit2();
518
519
  }
519
520
  if (!recent && !query) {
@@ -560,7 +561,7 @@ function registerRecallMyMemory(server) {
560
561
  let federatedCount = 0;
561
562
  if (!recent && query && results.length < FEDERATION_THRESHOLD) {
562
563
  try {
563
- const { searchCodeContextSemantic: searchCodeContextSemantic2 } = await import("./code-context-index-6YQ3DGCN.js");
564
+ const { searchCodeContextSemantic: searchCodeContextSemantic2 } = await import("./code-context-index-2PUBBQOE.js");
564
565
  const codeResults = await Promise.race([
565
566
  searchCodeContextSemantic2(query, { limit: 5 }),
566
567
  new Promise((_, rej) => setTimeout(() => rej(new Error("timeout")), 2e3))
@@ -798,7 +799,7 @@ function registerStoreMemory(server) {
798
799
  }
799
800
  const { agentId, agentRole } = getActiveAgent();
800
801
  if (kind === "prospective") {
801
- const { createProspectiveMemory } = await import("./prospective-memory-XRNRMEDL.js");
802
+ const { createProspectiveMemory } = await import("./prospective-memory-FVDNUSIL.js");
802
803
  let sessionScope = null;
803
804
  try {
804
805
  const { resolveExeSession: resolveExeSession2 } = await import("./lib/tmux-routing.js");
@@ -1784,7 +1785,7 @@ async function handleSupersede(input) {
1784
1785
  }
1785
1786
  try {
1786
1787
  const { getClient: getClient2 } = await import("./lib/database.js");
1787
- const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-SHM4QSRJ.js");
1788
+ const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-IUVRZOSF.js");
1788
1789
  const { writeMemory: writeMemory2, flushBatch: flushBatch2 } = await import("./lib/store.js");
1789
1790
  const { randomUUID: randomUUID2 } = await import("crypto");
1790
1791
  const client = getClient2();
@@ -1837,7 +1838,7 @@ New memory id: ${newId}`
1837
1838
  }
1838
1839
  async function handleResonanceQuery(input) {
1839
1840
  try {
1840
- const { getHotPairs, getCoActivationNeighbors } = await import("./co-activation-K44LGZ7A.js");
1841
+ const { getHotPairs, getCoActivationNeighbors } = await import("./co-activation-7F3J2GC7.js");
1841
1842
  const subAction = input.resonance_action ?? "hot_pairs";
1842
1843
  const limit = input.limit ?? 20;
1843
1844
  if (subAction === "hot_pairs") {
@@ -1932,7 +1933,7 @@ function registerMemory(server) {
1932
1933
  return handleResonanceQuery(input);
1933
1934
  }
1934
1935
  if (action === "update_working_memory" || action === "get_working_memory") {
1935
- const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-SHM4QSRJ.js");
1936
+ const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-IUVRZOSF.js");
1936
1937
  const { agentId } = getActiveAgent2();
1937
1938
  const { readWorkingMemoryWithMeta, writeWorkingMemory, WORKING_MEMORY_MAX_BYTES } = await import("./working-memory-PY4AG577.js");
1938
1939
  if (action === "get_working_memory") {
@@ -1958,9 +1959,9 @@ function registerMemory(server) {
1958
1959
  }
1959
1960
  }
1960
1961
  if (action === "core_get" || action === "core_set" || action === "core_delete") {
1961
- const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-SHM4QSRJ.js");
1962
+ const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-IUVRZOSF.js");
1962
1963
  const { agentId } = getActiveAgent2();
1963
- const { getCoreMemory, setCoreMemory, deleteCoreMemory, formatCoreMemoryBlock } = await import("./core-memory-DARTILJG.js");
1964
+ const { getCoreMemory, setCoreMemory, deleteCoreMemory, formatCoreMemoryBlock } = await import("./core-memory-NKKP2XUB.js");
1964
1965
  if (action === "core_get") {
1965
1966
  const entries = await getCoreMemory(agentId);
1966
1967
  const block = formatCoreMemoryBlock(entries);
@@ -2012,12 +2013,12 @@ function registerMemory(server) {
2012
2013
  if (!storeTrigger || !storeTriggerAction) {
2013
2014
  return errorResult('memory action "store" with kind="reflex" requires trigger and trigger_action fields');
2014
2015
  }
2015
- const { formatReflexContent, storeReflexBehavior: storeReflexBehavior2 } = await import("./behaviors-J47D342W.js");
2016
+ const { formatReflexContent, storeReflexBehavior: storeReflexBehavior2 } = await import("./behaviors-MQCADHAD.js");
2016
2017
  const reflexText = formatReflexContent(storeTrigger, storeTriggerAction);
2017
2018
  legacyArgs.text ??= reflexText;
2018
2019
  legacyArgs.query ??= reflexText;
2019
2020
  try {
2020
- const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-SHM4QSRJ.js");
2021
+ const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-IUVRZOSF.js");
2021
2022
  const { getProjectName: getProjectName2 } = await import("./project-name-EWG5KAZP.js");
2022
2023
  const agent = getActiveAgent2();
2023
2024
  const behaviorId = await storeReflexBehavior2({
@@ -2373,7 +2374,7 @@ function registerCloseTask(server) {
2373
2374
  async ({ task_id, result: result3, status: status2 }) => {
2374
2375
  const agent = getActiveAgent();
2375
2376
  try {
2376
- const { StewardGate: StewardGate2 } = await import("./steward-gate-3ZITRYVH.js");
2377
+ const { StewardGate: StewardGate2 } = await import("./steward-gate-2XD5BXH6.js");
2377
2378
  const steward = new StewardGate2();
2378
2379
  const gateDecision = await steward.checkAuthority(agent.agentId || "unknown", "close_task", task_id);
2379
2380
  if (!gateDecision.allowed) {
@@ -2554,8 +2555,8 @@ ${preflightWarnings.join("\n")}`;
2554
2555
  if (mergeNote) text5 += mergeNote;
2555
2556
  if (status2 === "closed" && assignee) {
2556
2557
  try {
2557
- const { cleanupAgentWorktree } = await import("./worktree-sweep-KV4H4766.js");
2558
- const { getGitRoot } = await import("./worktree-OYGDGJP7.js");
2558
+ const { cleanupAgentWorktree } = await import("./worktree-sweep-GDISKGQ2.js");
2559
+ const { getGitRoot } = await import("./worktree-72QYYL5L.js");
2559
2560
  const repoRoot = getGitRoot(baseDir);
2560
2561
  if (repoRoot) {
2561
2562
  const cleanupNotes = cleanupAgentWorktree(repoRoot, assignee);
@@ -2604,8 +2605,8 @@ ${preflightWarnings.join("\n")}`;
2604
2605
  } catch {
2605
2606
  }
2606
2607
  try {
2607
- const { cleanupAgentWorktree } = await import("./worktree-sweep-KV4H4766.js");
2608
- const { getGitRoot } = await import("./worktree-OYGDGJP7.js");
2608
+ const { cleanupAgentWorktree } = await import("./worktree-sweep-GDISKGQ2.js");
2609
+ const { getGitRoot } = await import("./worktree-72QYYL5L.js");
2609
2610
  const root = getGitRoot(_baseDir);
2610
2611
  if (root) {
2611
2612
  const notes = cleanupAgentWorktree(root, _assignee);
@@ -2708,7 +2709,7 @@ function registerResumeEmployee(server) {
2708
2709
  },
2709
2710
  async ({ agent_id, project_name }) => {
2710
2711
  if (!isInitialized()) {
2711
- const { fastDbInit: fastDbInit2 } = await import("./fast-db-init-TLYUWCDE.js");
2712
+ const { fastDbInit: fastDbInit2 } = await import("./fast-db-init-O6A3TK3F.js");
2712
2713
  await fastDbInit2();
2713
2714
  }
2714
2715
  const client = getClient();
@@ -2734,7 +2735,7 @@ function registerResumeEmployee(server) {
2734
2735
  };
2735
2736
  }
2736
2737
  try {
2737
- const { isTmuxSessionAlive } = await import("./tasks-crud-QUIIRWE3.js");
2738
+ const { isTmuxSessionAlive } = await import("./tasks-crud-6SJOKES5.js");
2738
2739
  const now = (/* @__PURE__ */ new Date()).toISOString();
2739
2740
  for (const row of openTasks.rows) {
2740
2741
  const status2 = String(row.status);
@@ -2762,7 +2763,7 @@ function registerResumeEmployee(server) {
2762
2763
  }
2763
2764
  let checkpointInfo = "";
2764
2765
  try {
2765
- const { readLatestCheckpoint } = await import("./tasks-crud-QUIIRWE3.js");
2766
+ const { readLatestCheckpoint } = await import("./tasks-crud-6SJOKES5.js");
2766
2767
  const checkpoint = await readLatestCheckpoint(agent_id);
2767
2768
  if (checkpoint) {
2768
2769
  const filesTouched = checkpoint.files_touched?.length > 0 ? checkpoint.files_touched.join(", ") : "none";
@@ -2804,8 +2805,25 @@ function registerResumeEmployee(server) {
2804
2805
  let dispatchStatus = "";
2805
2806
  try {
2806
2807
  const { ensureEmployee, resolveExeSession: resolveExeSession2 } = await import("./lib/tmux-routing.js");
2807
- const exeSession = resolveExeSession2();
2808
+ let taskScope = null;
2809
+ if (taskId) {
2810
+ try {
2811
+ const scopeRes = await client.execute({
2812
+ sql: "SELECT session_scope FROM tasks WHERE id = ?",
2813
+ args: [taskId]
2814
+ });
2815
+ const raw = scopeRes.rows[0]?.session_scope;
2816
+ taskScope = sanitizeSessionScope(raw == null ? null : String(raw));
2817
+ } catch {
2818
+ taskScope = null;
2819
+ }
2820
+ }
2821
+ const exeSession = taskScope ?? resolveExeSession2();
2808
2822
  if (!exeSession) throw new Error("No coordinator session found");
2823
+ process.stderr.write(
2824
+ `[resume_employee] dispatch lane=${exeSession} source=${taskScope ? "task.session_scope" : "caller.resolveExeSession (task has no scope)"} task=${taskId} agent=${agent_id}
2825
+ `
2826
+ );
2809
2827
  const { shouldAutoInstance } = await import("./lib/employees.js");
2810
2828
  const result3 = ensureEmployee(agent_id, exeSession, process.cwd(), shouldAutoInstance(agent_id));
2811
2829
  switch (result3.status) {
@@ -3161,7 +3179,7 @@ function registerTask(server) {
3161
3179
  const missing2 = missingRequiredFields2(args, REQUIRED_FIELDS2.create_group);
3162
3180
  if (missing2.length > 0) return errorResult2(`task action "create_group" missing required field(s): ${missing2.join(", ")}`);
3163
3181
  try {
3164
- const { createTaskGroup } = await import("./tasks-crud-QUIIRWE3.js");
3182
+ const { createTaskGroup } = await import("./tasks-crud-6SJOKES5.js");
3165
3183
  const group = await createTaskGroup({
3166
3184
  title: args.title,
3167
3185
  coordinator: args.coordinator,
@@ -3180,7 +3198,7 @@ function registerTask(server) {
3180
3198
  const missing2 = missingRequiredFields2(args, REQUIRED_FIELDS2.group_status);
3181
3199
  if (missing2.length > 0) return errorResult2(`task action "group_status" missing required field(s): ${missing2.join(", ")}`);
3182
3200
  try {
3183
- const { getGroupStatus } = await import("./tasks-crud-QUIIRWE3.js");
3201
+ const { getGroupStatus } = await import("./tasks-crud-6SJOKES5.js");
3184
3202
  const status2 = await getGroupStatus(args.group_id);
3185
3203
  return { content: [{ type: "text", text: JSON.stringify(status2, null, 2) }] };
3186
3204
  } catch (err) {
@@ -3192,7 +3210,7 @@ function registerTask(server) {
3192
3210
  const missing2 = missingRequiredFields2(args, REQUIRED_FIELDS2.group_results);
3193
3211
  if (missing2.length > 0) return errorResult2(`task action "group_results" missing required field(s): ${missing2.join(", ")}`);
3194
3212
  try {
3195
- const { getGroupResults } = await import("./tasks-crud-QUIIRWE3.js");
3213
+ const { getGroupResults } = await import("./tasks-crud-6SJOKES5.js");
3196
3214
  const results = await getGroupResults(args.group_id);
3197
3215
  return { content: [{ type: "text", text: JSON.stringify(results, null, 2) }] };
3198
3216
  } catch (err) {
@@ -3443,7 +3461,7 @@ function registerMessage(server) {
3443
3461
  if (msgType && msgPayload) {
3444
3462
  try {
3445
3463
  const { buildTypedMessage, serializeMessage } = await import("./typed-messages-TKDGVPHS.js");
3446
- const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-SHM4QSRJ.js");
3464
+ const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-IUVRZOSF.js");
3447
3465
  const { sendMessage } = await import("./lib/messaging.js");
3448
3466
  const { agentId } = getActiveAgent2();
3449
3467
  const envelope = buildTypedMessage({
@@ -3477,7 +3495,7 @@ ID: ${msg.id}`
3477
3495
  if (action === "read") {
3478
3496
  try {
3479
3497
  const { getPendingMessages } = await import("./lib/messaging.js");
3480
- const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-SHM4QSRJ.js");
3498
+ const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-IUVRZOSF.js");
3481
3499
  const { agentId } = getActiveAgent2();
3482
3500
  const messages = await getPendingMessages(agentId);
3483
3501
  if (messages.length === 0) {
@@ -3840,8 +3858,8 @@ function registerIngestDocument(server) {
3840
3858
  },
3841
3859
  async (input) => {
3842
3860
  try {
3843
- const { assertFeature: assertFeature2 } = await import("./plan-limits-QWBN2EKH.js");
3844
- const { assertMemoryLimit: assertMemoryLimit2 } = await import("./plan-limits-QWBN2EKH.js");
3861
+ const { assertFeature: assertFeature2 } = await import("./plan-limits-EUZI4X5W.js");
3862
+ const { assertMemoryLimit: assertMemoryLimit2 } = await import("./plan-limits-EUZI4X5W.js");
3845
3863
  await assertFeature2("wiki");
3846
3864
  await assertMemoryLimit2();
3847
3865
  const result3 = await ingestDocument(input);
@@ -3912,8 +3930,8 @@ function registerPurgeDocument(server) {
3912
3930
  },
3913
3931
  async ({ document_id }) => {
3914
3932
  try {
3915
- const { StewardGate: StewardGate2 } = await import("./steward-gate-3ZITRYVH.js");
3916
- const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-SHM4QSRJ.js");
3933
+ const { StewardGate: StewardGate2 } = await import("./steward-gate-2XD5BXH6.js");
3934
+ const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-IUVRZOSF.js");
3917
3935
  const steward = new StewardGate2();
3918
3936
  const agent = getActiveAgent2();
3919
3937
  const gateDecision = await steward.checkAuthority(agent.agentId || "unknown", "purge_document", document_id);
@@ -4083,7 +4101,7 @@ function registerDocument(server) {
4083
4101
  const { action: _action, ...legacyArgs } = input;
4084
4102
  if (action === "list" && (legacyArgs.workspace_id === void 0 || legacyArgs.workspace_id === null || legacyArgs.workspace_id === "")) {
4085
4103
  try {
4086
- const { resolveDefaultWorkspaceId, listWorkspaces } = await import("./documents-7BFXA6V3.js");
4104
+ const { resolveDefaultWorkspaceId, listWorkspaces } = await import("./documents-C5LYSJT3.js");
4087
4105
  const defaultId = await resolveDefaultWorkspaceId();
4088
4106
  if (defaultId) {
4089
4107
  legacyArgs.workspace_id = defaultId;
@@ -5070,7 +5088,7 @@ async function handleStatus() {
5070
5088
  sinks.memory = { configured: false, detail: "store module unavailable" };
5071
5089
  }
5072
5090
  try {
5073
- const { isCRMBridgeEnabled } = await import("./crm-bridge-BVTB6LZK.js");
5091
+ const { isCRMBridgeEnabled } = await import("./crm-bridge-CZLEW2LW.js");
5074
5092
  const enabled = isCRMBridgeEnabled();
5075
5093
  sinks.crm = { configured: enabled, detail: enabled ? "CRM bridge enabled" : "CRM bridge disabled" };
5076
5094
  } catch {
@@ -5110,7 +5128,7 @@ async function handleTrigger(limit) {
5110
5128
  if (rows.rows.length === 0) {
5111
5129
  return text3("No conversations found to re-process.");
5112
5130
  }
5113
- const { ingest } = await import("./pipeline-router-T673WGL3.js");
5131
+ const { ingest } = await import("./pipeline-router-KQAYWDPH.js");
5114
5132
  const results = [];
5115
5133
  for (const row of rows.rows) {
5116
5134
  const r = row;
@@ -5741,8 +5759,8 @@ function registerMergeEntities(server) {
5741
5759
  },
5742
5760
  async ({ source_name, source_type, target_name, target_type }) => {
5743
5761
  try {
5744
- const { StewardGate: StewardGate2 } = await import("./steward-gate-3ZITRYVH.js");
5745
- const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-SHM4QSRJ.js");
5762
+ const { StewardGate: StewardGate2 } = await import("./steward-gate-2XD5BXH6.js");
5763
+ const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-IUVRZOSF.js");
5746
5764
  const steward = new StewardGate2();
5747
5765
  const agent = getActiveAgent2();
5748
5766
  const gateDecision = await steward.checkAuthority(agent.agentId || "unknown", "merge_entities", `${source_name}\u2192${target_name}`);
@@ -5950,7 +5968,7 @@ async function handleExtractFromDocument(args) {
5950
5968
  return errorResult7('graph action "extract_from_document" requires document_id');
5951
5969
  }
5952
5970
  try {
5953
- const { extractGraphFromExistingDocument } = await import("./doc-graph-extractor-L7YESUSI.js");
5971
+ const { extractGraphFromExistingDocument } = await import("./doc-graph-extractor-VBZ6XTTE.js");
5954
5972
  const result3 = await extractGraphFromExistingDocument(documentId);
5955
5973
  const lines = [
5956
5974
  `## Graph Extraction for Document ${documentId}`,
@@ -5977,7 +5995,7 @@ async function handleCleanupGarbage(args) {
5977
5995
  const doMerge = !garbageOnly;
5978
5996
  let mod;
5979
5997
  try {
5980
- mod = await import("./cleanup-graph-garbage-MX5JDTJA.js");
5998
+ mod = await import("./cleanup-graph-garbage-2YH52ADR.js");
5981
5999
  } catch (err) {
5982
6000
  return errorResult7(`cleanup_garbage: failed to load cleanup module \u2014 ${err instanceof Error ? err.message : String(err)}`);
5983
6001
  }
@@ -6118,7 +6136,7 @@ function registerGraph(server) {
6118
6136
  }
6119
6137
 
6120
6138
  // src/mcp/tools/config.ts
6121
- import { z as z76 } from "zod";
6139
+ import { z as z77 } from "zod";
6122
6140
 
6123
6141
  // src/mcp/tools/set-agent-config.ts
6124
6142
  import { z as z48 } from "zod";
@@ -6836,7 +6854,7 @@ async function getAgentSessionLoad() {
6836
6854
  return { sessions: [], totalLive: 0, busySessions: 0, idleSessions: 0 };
6837
6855
  }
6838
6856
  const { getClient: getClient2 } = await import("./lib/database.js");
6839
- const { sessionScopeFilter: sessionScopeFilter2 } = await import("./task-scope-OIHLMQOQ.js");
6857
+ const { sessionScopeFilter: sessionScopeFilter2 } = await import("./task-scope-ULBNFBFH.js");
6840
6858
  const client = getClient2();
6841
6859
  const scope = sessionScopeFilter2();
6842
6860
  for (const s of liveAgentSessions) {
@@ -6963,7 +6981,7 @@ ${mode} Applying repairs...
6963
6981
  `];
6964
6982
  if (!isDryRun) {
6965
6983
  try {
6966
- const { createBackup: createBackup2 } = await import("./db-backup-ITRADB2J.js");
6984
+ const { createBackup: createBackup2 } = await import("./db-backup-XLID57KW.js");
6967
6985
  const backupPath = await createBackup2("pre-fix");
6968
6986
  if (backupPath) {
6969
6987
  fixLog.push(` Backup created: ${backupPath.split("/").pop()}`);
@@ -7202,7 +7220,7 @@ async function cloudStatusText() {
7202
7220
  if (lastReuploadedAt) lines.push(`- Last re-upload: ${lastReuploadedAt}`);
7203
7221
  lines.push("");
7204
7222
  try {
7205
- const { getRetrievalHealth: getRetrievalHealth2, formatDegradations: formatDegradations2 } = await import("./retrieval-health-ULVVOIPL.js");
7223
+ const { getRetrievalHealth: getRetrievalHealth2, formatDegradations: formatDegradations2 } = await import("./retrieval-health-YJ7CXYVD.js");
7206
7224
  const h = await getRetrievalHealth2();
7207
7225
  lines.push(formatDegradations2(h.degradations, "Health / Degradations"));
7208
7226
  lines.push("");
@@ -8561,16 +8579,115 @@ Valid: ${license.valid ? "yes" : "no"}`);
8561
8579
  );
8562
8580
  }
8563
8581
 
8564
- // src/mcp/tools/create-trigger.ts
8582
+ // src/mcp/tools/set-customer-plan.ts
8565
8583
  import { z as z68 } from "zod";
8566
- var conditionSchema = z68.object({
8567
- field: z68.string().describe("Dot-path field to evaluate, e.g., 'stage' or 'amount'"),
8568
- op: z68.enum(["eq", "neq", "gt", "lt", "gte", "lte", "contains", "not_contains"]).describe("Comparison operator"),
8569
- value: z68.string().or(z68.number()).or(z68.boolean()).describe("Value to compare against")
8584
+ var PLAN = z68.enum(["free", "pro", "team", "agency", "enterprise"]);
8585
+ var REFRESH_REMINDER = "Customer must run `refresh_license` (or reboot) to pick up the new plan and updated agent limit.";
8586
+ async function sendSetPlan(payload) {
8587
+ if (process.env.VITEST || process.env.NODE_ENV === "test") {
8588
+ return { status: "skipped: test environment" };
8589
+ }
8590
+ const config = await loadConfig();
8591
+ const routerUrl = process.env.API_ROUTER_URL?.replace(/\/+$/, "");
8592
+ const endpoint2 = process.env.EXE_SET_CUSTOMER_PLAN_ENDPOINT || (routerUrl ? `${routerUrl}/admin/customer/plan` : "https://api.askexe.com/admin/customer/plan");
8593
+ const licenseKey = loadLicense() || process.env.EXE_LICENSE_KEY || config.cloud?.apiKey;
8594
+ const licenseToken = readCachedLicenseToken();
8595
+ try {
8596
+ const parsed = new URL(endpoint2);
8597
+ if (parsed.protocol !== "https:" && !["localhost", "127.0.0.1", "::1"].includes(parsed.hostname)) {
8598
+ return { status: "failed: insecure endpoint rejected" };
8599
+ }
8600
+ const response = await fetch(parsed, {
8601
+ method: "POST",
8602
+ headers: {
8603
+ "content-type": "application/json",
8604
+ ...licenseKey ? { "x-exe-license-key": licenseKey } : {},
8605
+ ...licenseToken ? { "x-exe-license-token": licenseToken } : {},
8606
+ ...supportAdminHeaders(config)
8607
+ },
8608
+ body: JSON.stringify(payload),
8609
+ signal: AbortSignal.timeout(1e4)
8610
+ });
8611
+ let body;
8612
+ try {
8613
+ body = await response.json();
8614
+ } catch {
8615
+ body = void 0;
8616
+ }
8617
+ if (!response.ok) return { status: `failed: HTTP ${response.status}`, body };
8618
+ return { status: "sent", body };
8619
+ } catch (err) {
8620
+ return { status: `failed: ${err instanceof Error ? err.message : String(err)}` };
8621
+ }
8622
+ }
8623
+ function buildSetPlanPayload(input) {
8624
+ const payload = { plan: input.plan };
8625
+ if (input.email) payload.email = input.email;
8626
+ if (input.license_key) payload.license_key = input.license_key;
8627
+ return payload;
8628
+ }
8629
+ function registerSetCustomerPlan(server) {
8630
+ server.registerTool(
8631
+ "set_customer_plan",
8632
+ {
8633
+ title: "Set Customer Plan",
8634
+ description: "ADMIN ONLY: set a customer's entitlement plan (free/pro/team/agency/enterprise) in the D1 users table (source of truth). Identify the customer by email OR license_key. Requires the AskExe support admin token; a customer license key alone is rejected by the server.",
8635
+ inputSchema: {
8636
+ email: z68.string().email().optional().describe("Customer email that identifies the target user"),
8637
+ license_key: z68.string().optional().describe("Customer license key (exe_sk_*) \u2014 alternative to email"),
8638
+ plan: PLAN.describe("New entitlement plan: free, pro, team, agency, or enterprise")
8639
+ }
8640
+ },
8641
+ async ({ email, license_key, plan }) => {
8642
+ if (!email && !license_key) {
8643
+ return {
8644
+ content: [{ type: "text", text: "set_customer_plan requires email or license_key to identify the customer." }],
8645
+ isError: true
8646
+ };
8647
+ }
8648
+ const config = await loadConfig();
8649
+ if (!resolveSupportAdminToken(config)) {
8650
+ return {
8651
+ content: [{
8652
+ type: "text",
8653
+ text: "set_customer_plan is admin-only and requires the AskExe support admin token (ASKEXE_SUPPORT_ADMIN_TOKEN env or config.support.adminToken). No token configured."
8654
+ }],
8655
+ isError: true
8656
+ };
8657
+ }
8658
+ const payload = buildSetPlanPayload({ email, license_key, plan });
8659
+ const result3 = await sendSetPlan(payload);
8660
+ if (result3.status !== "sent" && result3.status !== "skipped: test environment") {
8661
+ return {
8662
+ content: [{ type: "text", text: `Failed to set plan: ${result3.status}` }],
8663
+ isError: true
8664
+ };
8665
+ }
8666
+ const record = result3.body ?? {};
8667
+ const lines = [];
8668
+ lines.push("## Customer Plan Updated\n");
8669
+ lines.push(`- **Email:** ${record.email ?? email ?? "(by license_key)"}`);
8670
+ lines.push(`- **Plan:** ${record.plan ?? plan}`);
8671
+ if (record.org_id !== void 0) lines.push(`- **Org:** ${record.org_id ?? "none"}`);
8672
+ if (record.parent_user_id !== void 0) lines.push(`- **Parent user:** ${record.parent_user_id ?? "none"}`);
8673
+ lines.push(`- **Status:** ${result3.status}`);
8674
+ lines.push("");
8675
+ lines.push(REFRESH_REMINDER);
8676
+ return { content: [{ type: "text", text: lines.join("\n") }] };
8677
+ }
8678
+ );
8679
+ }
8680
+
8681
+ // src/mcp/tools/create-trigger.ts
8682
+ import { z as z69 } from "zod";
8683
+ var conditionSchema = z69.object({
8684
+ field: z69.string().describe("Dot-path field to evaluate, e.g., 'stage' or 'amount'"),
8685
+ op: z69.enum(["eq", "neq", "gt", "lt", "gte", "lte", "contains", "not_contains"]).describe("Comparison operator"),
8686
+ value: z69.string().or(z69.number()).or(z69.boolean()).describe("Value to compare against")
8570
8687
  });
8571
- var actionSchema = z68.object({
8572
- type: z68.enum(["send_whatsapp", "send_message", "create_task", "mcp_tool"]).describe("Action type to execute"),
8573
- params: z68.record(z68.string(), z68.string()).describe(
8688
+ var actionSchema = z69.object({
8689
+ type: z69.enum(["send_whatsapp", "send_message", "create_task", "mcp_tool"]).describe("Action type to execute"),
8690
+ params: z69.record(z69.string(), z69.string()).describe(
8574
8691
  "Action parameters. Supports {{record.field}} templates for dynamic values."
8575
8692
  )
8576
8693
  });
@@ -8581,24 +8698,24 @@ function registerCreateTrigger(server) {
8581
8698
  title: "Create Trigger",
8582
8699
  description: "Create a CRM event trigger or scheduled automation. When matching events occur (e.g., Deal.updated with stage=won), configured actions fire automatically (send_whatsapp, create_task, etc.).",
8583
8700
  inputSchema: {
8584
- name: z68.string().describe("Human-readable trigger name"),
8585
- event: z68.string().describe(
8701
+ name: z69.string().describe("Human-readable trigger name"),
8702
+ event: z69.string().describe(
8586
8703
  'CRM event to match, e.g., "Deal.updated", "Order.created", "*" for all'
8587
8704
  ),
8588
- conditions: z68.array(conditionSchema).default([]).describe("Conditions that must all match (AND logic)"),
8589
- actions: z68.array(actionSchema).min(1).describe("Actions to execute when trigger fires"),
8590
- project: z68.string().optional().describe("Scope trigger to a specific project"),
8591
- enabled: z68.boolean().default(true).describe("Whether trigger is active"),
8592
- schedule: z68.string().optional().describe(
8705
+ conditions: z69.array(conditionSchema).default([]).describe("Conditions that must all match (AND logic)"),
8706
+ actions: z69.array(actionSchema).min(1).describe("Actions to execute when trigger fires"),
8707
+ project: z69.string().optional().describe("Scope trigger to a specific project"),
8708
+ enabled: z69.boolean().default(true).describe("Whether trigger is active"),
8709
+ schedule: z69.string().optional().describe(
8593
8710
  'Cron schedule for time-based triggers, e.g., "0 9 * * *" or "Monday 9am"'
8594
8711
  ),
8595
- query: z68.string().optional().describe(
8712
+ query: z69.string().optional().describe(
8596
8713
  "CRM GraphQL query to run on schedule (required if schedule is set)"
8597
8714
  )
8598
8715
  }
8599
8716
  },
8600
8717
  async ({ name, event, conditions, actions, project, enabled, schedule, query }) => {
8601
- const { assertFeature: assertFeature2 } = await import("./plan-limits-QWBN2EKH.js");
8718
+ const { assertFeature: assertFeature2 } = await import("./plan-limits-EUZI4X5W.js");
8602
8719
  const gatedActions = {
8603
8720
  send_whatsapp: "external_agents",
8604
8721
  update_wiki: "wiki"
@@ -8672,7 +8789,7 @@ Enabled: ${trigger.enabled}` + scheduleInfo;
8672
8789
  }
8673
8790
 
8674
8791
  // src/mcp/tools/list-triggers.ts
8675
- import { z as z69 } from "zod";
8792
+ import { z as z70 } from "zod";
8676
8793
  function registerListTriggers(server) {
8677
8794
  server.registerTool(
8678
8795
  "list_triggers",
@@ -8680,7 +8797,7 @@ function registerListTriggers(server) {
8680
8797
  title: "List Triggers",
8681
8798
  description: "List configured CRM event triggers and scheduled automations.",
8682
8799
  inputSchema: {
8683
- project: z69.string().optional().describe("Filter triggers by project name")
8800
+ project: z70.string().optional().describe("Filter triggers by project name")
8684
8801
  }
8685
8802
  },
8686
8803
  async ({ project }) => {
@@ -8715,7 +8832,7 @@ function registerListTriggers(server) {
8715
8832
  }
8716
8833
 
8717
8834
  // src/mcp/tools/apply-starter-pack.ts
8718
- import { z as z70 } from "zod";
8835
+ import { z as z71 } from "zod";
8719
8836
 
8720
8837
  // src/automation/starter-packs/index.ts
8721
8838
  import { readFileSync as readFileSync3, readdirSync as readdirSync2, existsSync as existsSync5 } from "fs";
@@ -8899,17 +9016,17 @@ function registerApplyStarterPack(server) {
8899
9016
  title: "Apply Starter Pack",
8900
9017
  description: "Apply an industry starter pack to a project. Sets up CRM custom objects, pre-wired automation triggers, and wiki seed content. When the pack creates a Client COO (e.g. distribution) and agent_name, company_name, founder_name are all provided, also provisions the COO identity, roster entry, and feedback-loop behavior. Available packs: distribution. More coming.",
8901
9018
  inputSchema: {
8902
- industry: z70.string().describe(
9019
+ industry: z71.string().describe(
8903
9020
  'Industry pack to apply (e.g., "distribution"). Use without args to list available packs.'
8904
9021
  ),
8905
- project: z70.string().describe("Project name to scope the triggers to"),
8906
- agent_name: z70.string().optional().describe(
9022
+ project: z71.string().describe("Project name to scope the triggers to"),
9023
+ agent_name: z71.string().optional().describe(
8907
9024
  "Optional. Lowercase alphanumeric name for the Client COO agent. Required (alongside company_name and founder_name) to provision a COO."
8908
9025
  ),
8909
- company_name: z70.string().optional().describe(
9026
+ company_name: z71.string().optional().describe(
8910
9027
  "Optional. The client company the COO serves. Required to provision a COO."
8911
9028
  ),
8912
- founder_name: z70.string().optional().describe(
9029
+ founder_name: z71.string().optional().describe(
8913
9030
  "Optional. The founder the COO reports to. Required to provision a COO."
8914
9031
  )
8915
9032
  }
@@ -9054,7 +9171,7 @@ ${err.message}`
9054
9171
  }
9055
9172
 
9056
9173
  // src/mcp/tools/load-skill.ts
9057
- import { z as z71 } from "zod";
9174
+ import { z as z72 } from "zod";
9058
9175
  import { readFileSync as readFileSync4, readdirSync as readdirSync3, statSync } from "fs";
9059
9176
  import path10 from "path";
9060
9177
  import { homedir as homedir3 } from "os";
@@ -9084,7 +9201,7 @@ function registerLoadSkill(server) {
9084
9201
  title: "Load Skill",
9085
9202
  description: "Load domain-specific guidance into your context. Use when you need specialized knowledge for a task (e.g., load_skill('seo') before doing SEO work, load_skill('code-reviewer') before reviewing code). Pass skill_name='list' to see all available skills.",
9086
9203
  inputSchema: {
9087
- skill_name: z71.string().describe(
9204
+ skill_name: z72.string().describe(
9088
9205
  "Skill to load (e.g. 'seo', 'code-reviewer', 'frontend-design'). Pass 'list' to see all available skills."
9089
9206
  )
9090
9207
  }
@@ -9141,7 +9258,7 @@ ${available.map((s) => `- ${s}`).join("\n")}` : "\n\nNo skills found in ~/.claud
9141
9258
  // src/mcp/tools/export-orchestration.ts
9142
9259
  import { mkdirSync as mkdirSync3, writeFileSync as writeFileSync5 } from "fs";
9143
9260
  import path11 from "path";
9144
- import { z as z72 } from "zod";
9261
+ import { z as z73 } from "zod";
9145
9262
  function registerExportOrchestration(server) {
9146
9263
  server.registerTool(
9147
9264
  "export_orchestration",
@@ -9149,7 +9266,7 @@ function registerExportOrchestration(server) {
9149
9266
  title: "Export Orchestration",
9150
9267
  description: "Export roster, identities, behaviors, and customer procedures to a JSON package.",
9151
9268
  inputSchema: {
9152
- output_path: z72.string().describe("File path to write the JSON package")
9269
+ output_path: z73.string().describe("File path to write the JSON package")
9153
9270
  }
9154
9271
  },
9155
9272
  async ({ output_path }) => {
@@ -9180,7 +9297,7 @@ function registerExportOrchestration(server) {
9180
9297
 
9181
9298
  // src/mcp/tools/import-orchestration.ts
9182
9299
  import { readFileSync as readFileSync5 } from "fs";
9183
- import { z as z73 } from "zod";
9300
+ import { z as z74 } from "zod";
9184
9301
  function registerImportOrchestration(server) {
9185
9302
  server.registerTool(
9186
9303
  "import_orchestration",
@@ -9188,8 +9305,8 @@ function registerImportOrchestration(server) {
9188
9305
  title: "Import Orchestration",
9189
9306
  description: "Import roster, identities, behaviors, and procedures from an orchestration package. Restricted to coordinator/founder.",
9190
9307
  inputSchema: {
9191
- package_path: z73.string().describe("Path to the orchestration package JSON file"),
9192
- merge_strategy: z73.enum(["replace", "merge"]).default("merge").describe("How to apply the package: both strategies are additive-only \u2014 existing data is never deleted or overwritten")
9308
+ package_path: z74.string().describe("Path to the orchestration package JSON file"),
9309
+ merge_strategy: z74.enum(["replace", "merge"]).default("merge").describe("How to apply the package: both strategies are additive-only \u2014 existing data is never deleted or overwritten")
9193
9310
  }
9194
9311
  },
9195
9312
  async ({ package_path, merge_strategy }) => {
@@ -9229,7 +9346,7 @@ function registerImportOrchestration(server) {
9229
9346
  }
9230
9347
 
9231
9348
  // src/mcp/tools/global-procedure.ts
9232
- import { z as z74 } from "zod";
9349
+ import { z as z75 } from "zod";
9233
9350
  function registerCompanyProcedureTool(server, toolName) {
9234
9351
  server.registerTool(
9235
9352
  toolName,
@@ -9237,13 +9354,13 @@ function registerCompanyProcedureTool(server, toolName) {
9237
9354
  title: "Company Procedure",
9238
9355
  description: "Manage company procedures and values (customer-owned Layer 0 rules) that supersede identity, expertise, and experience. Actions: store (create new, restricted), list (view all, open), deactivate (soft-delete, restricted). Use kind='value' for company values (principles/beliefs), kind='procedure' for operational instructions.",
9239
9356
  inputSchema: {
9240
- action: z74.enum(["store", "list", "deactivate"]).describe("Action to perform"),
9241
- title: z74.string().optional().describe("Short title for the procedure or value (store)"),
9242
- content: z74.string().max(500).optional().describe("The content \u2014 clear, actionable instruction or guiding principle (store)"),
9243
- priority: z74.enum(["p0", "p1", "p2"]).optional().describe("Priority tier. p0 = always (default). p1 = standard. p2 = nice-to-have."),
9244
- domain: z74.string().optional().describe("Category: workflow, code-style, communication, architecture, testing, security"),
9245
- kind: z74.enum(["procedure", "value"]).optional().describe("Type: 'procedure' (operational instruction) or 'value' (company principle). Default: procedure."),
9246
- procedure_id: z74.string().optional().describe("UUID of the company procedure (deactivate)")
9357
+ action: z75.enum(["store", "list", "deactivate"]).describe("Action to perform"),
9358
+ title: z75.string().optional().describe("Short title for the procedure or value (store)"),
9359
+ content: z75.string().max(500).optional().describe("The content \u2014 clear, actionable instruction or guiding principle (store)"),
9360
+ priority: z75.enum(["p0", "p1", "p2"]).optional().describe("Priority tier. p0 = always (default). p1 = standard. p2 = nice-to-have."),
9361
+ domain: z75.string().optional().describe("Category: workflow, code-style, communication, architecture, testing, security"),
9362
+ kind: z75.enum(["procedure", "value"]).optional().describe("Type: 'procedure' (operational instruction) or 'value' (company principle). Default: procedure."),
9363
+ procedure_id: z75.string().optional().describe("UUID of the company procedure (deactivate)")
9247
9364
  }
9248
9365
  },
9249
9366
  async ({ action, title, content, priority, domain, kind, procedure_id }) => {
@@ -9368,8 +9485,8 @@ function registerGlobalProcedure(server) {
9368
9485
  }
9369
9486
 
9370
9487
  // src/mcp/tools/get-session-events.ts
9371
- import { z as z75 } from "zod";
9372
- var EVENT_TYPE = z75.enum([
9488
+ import { z as z76 } from "zod";
9489
+ var EVENT_TYPE = z76.enum([
9373
9490
  "user_prompt",
9374
9491
  "assistant_response",
9375
9492
  "tool_call",
@@ -9399,11 +9516,11 @@ function registerGetSessionEvents(server) {
9399
9516
  title: "Get Session Events",
9400
9517
  description: "Return exact recent chronological user prompts, assistant responses, and tool calls from the append-only session journal. Use this when asked what happened last, not semantic memory search.",
9401
9518
  inputSchema: {
9402
- agent_id: z75.string().optional().describe("Agent to inspect. Defaults to active agent. COO/CTO may inspect others."),
9403
- session_id: z75.string().optional().describe("Optional exact runtime session id."),
9519
+ agent_id: z76.string().optional().describe("Agent to inspect. Defaults to active agent. COO/CTO may inspect others."),
9520
+ session_id: z76.string().optional().describe("Optional exact runtime session id."),
9404
9521
  event_type: EVENT_TYPE.optional().describe("Filter to one event type."),
9405
- project_name: z75.string().optional().describe("Optional project filter. Pass 'all' for all projects."),
9406
- limit: z75.number().int().min(1).max(100).default(20).describe("Number of events to return.")
9522
+ project_name: z76.string().optional().describe("Optional project filter. Pass 'all' for all projects."),
9523
+ limit: z76.number().int().min(1).max(100).default(20).describe("Number of events to return.")
9407
9524
  }
9408
9525
  },
9409
9526
  async ({ agent_id, session_id, event_type, project_name, limit }) => {
@@ -9439,8 +9556,8 @@ function registerGetLastAssistantResponse(server) {
9439
9556
  title: "Get Last Assistant Response",
9440
9557
  description: "Return the exact last assistant response for an agent from the session event journal. Use for 'what was the last thing you said?'",
9441
9558
  inputSchema: {
9442
- agent_id: z75.string().optional().describe("Agent to inspect. Defaults to active agent. COO/CTO may inspect others."),
9443
- project_name: z75.string().optional().describe("Optional project filter. Pass 'all' for all projects.")
9559
+ agent_id: z76.string().optional().describe("Agent to inspect. Defaults to active agent. COO/CTO may inspect others."),
9560
+ project_name: z76.string().optional().describe("Optional project filter. Pass 'all' for all projects.")
9444
9561
  }
9445
9562
  },
9446
9563
  async ({ agent_id, project_name }) => {
@@ -9492,6 +9609,7 @@ var ACTION_TO_TOOL2 = {
9492
9609
  list_licenses: "list_licenses",
9493
9610
  activate_license: "activate_license",
9494
9611
  refresh_license: "refresh_license",
9612
+ set_customer_plan: "set_customer_plan",
9495
9613
  create_trigger: "create_trigger",
9496
9614
  list_triggers: "list_triggers",
9497
9615
  apply_starter_pack: "apply_starter_pack",
@@ -9550,6 +9668,7 @@ function buildHandlers5() {
9550
9668
  registerListLicenses(localServer);
9551
9669
  registerActivateLicense(localServer);
9552
9670
  registerRefreshLicense(localServer);
9671
+ registerSetCustomerPlan(localServer);
9553
9672
  registerCreateTrigger(localServer);
9554
9673
  registerListTriggers(localServer);
9555
9674
  registerApplyStarterPack(localServer);
@@ -9566,8 +9685,8 @@ function buildHandlers5() {
9566
9685
  }
9567
9686
  async function handleDreaming(action, args) {
9568
9687
  try {
9569
- const { DreamingEngine: DreamingEngine2 } = await import("./dreaming-NRTMPNPZ.js");
9570
- const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-SHM4QSRJ.js");
9688
+ const { DreamingEngine: DreamingEngine2 } = await import("./dreaming-LMVDIC5C.js");
9689
+ const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-IUVRZOSF.js");
9571
9690
  const { getClient: getClient2 } = await import("./lib/database.js");
9572
9691
  const agentId = args.agent_id ?? getActiveAgent2().agentId;
9573
9692
  if (action === "dreaming_run") {
@@ -9651,51 +9770,51 @@ function registerConfig(server) {
9651
9770
  title: "Config",
9652
9771
  description: "Consolidated COO/admin tool for runtime config, system health, licensing, triggers, orchestration import/export, company procedures, identity management, session inspection, dreaming self-improvement, and session closeout.",
9653
9772
  inputSchema: {
9654
- action: z76.enum(Object.keys(ACTION_TO_TOOL2)).describe("Admin/config operation. refresh_license force re-checks the plan against the cloud and re-caches the signed JWT (picks up plan upgrades without editing files). identity_get/identity_update manage agent identity files. session_events/session_last_response inspect session logs. dreaming_run/dreaming_status/dreaming_history manage the self-improvement loop. closeout runs dreaming + commits a structured session summary to memory. capability_cards returns A2A-style JSON manifests for all agents. restart_telemetry shows why the daemon restarted \u2014 cause breakdown, slowest timers, event-loop blocks."),
9655
- agent_id: z76.string().optional().describe("Agent id for set_agent_config/agent_spend/session queries/hire"),
9656
- role: z76.string().optional().describe("Role template for action=hire: coo, cto, cmo, gm, principal-engineer, content-specialist, ai-specialist, staff-code-reviewer"),
9657
- runtime: z76.string().optional().describe("Runtime for set_agent_config"),
9658
- model: z76.string().optional().describe("Model for set_agent_config"),
9659
- reasoning_effort: z76.string().optional().describe("Reasoning effort for Codex agents"),
9660
- dry_run: z76.boolean().optional().describe("Preview without applying where supported"),
9661
- fix: z76.boolean().optional().describe("Apply fixes for memory_audit where supported"),
9662
- verbose: z76.boolean().optional().describe("Verbose output where supported"),
9663
- project_name: z76.string().optional().describe("Project filter/name"),
9664
- since: z76.string().optional().describe("ISO lower-bound timestamp"),
9665
- limit: z76.coerce.number().optional().describe("Result limit"),
9666
- output_path: z76.string().optional().describe("Output path for export/backup"),
9667
- input_path: z76.string().optional().describe("Input path for import_orchestration"),
9668
- strategy: z76.enum(["merge", "replace"]).optional().describe("Import strategy; replace must still be additive-only per platform rules"),
9669
- license_key: z76.string().optional().describe("License key for activation/status"),
9670
- email: z76.string().optional().describe("Customer email for license creation"),
9671
- plan: z76.string().optional().describe("License plan"),
9672
- name: z76.string().optional().describe("Trigger/starter pack/procedure/client name"),
9673
- event: z76.string().optional().describe("Trigger event"),
9674
- conditions: z76.array(z76.record(z76.string(), z76.unknown())).optional().describe("Trigger conditions"),
9675
- actions: z76.array(z76.record(z76.string(), z76.unknown())).optional().describe("Trigger actions"),
9676
- enabled: z76.boolean().optional().describe("Trigger enabled flag"),
9677
- schedule: z76.string().optional().describe("Trigger schedule"),
9678
- query: z76.string().optional().describe("Trigger query or filter"),
9679
- skill_name: z76.string().optional().describe("Skill name for load_skill"),
9680
- pack_name: z76.string().optional().describe("Starter pack name"),
9681
- title: z76.string().optional().describe("Procedure title"),
9682
- content: z76.string().optional().describe("Procedure content"),
9683
- priority: z76.enum(["p0", "p1", "p2"]).optional().describe("Procedure priority"),
9684
- domain: z76.string().optional().describe("Procedure domain"),
9685
- procedure_id: z76.string().optional().describe("Procedure id for deactivate"),
9686
- subaction: z76.enum(["store", "list", "deactivate"]).optional().describe("Nested action for company_procedure/global_procedure"),
9687
- max_clusters: z76.coerce.number().optional().describe("Consolidation max clusters"),
9688
- force: z76.boolean().optional().describe("Force operation where supported"),
9689
- cloud_action: z76.enum(["status", "sync", "reupload"]).optional().describe("Nested operation for action=cloud_sync"),
9690
- confirm_local_db_source_of_truth: z76.string().optional().describe("Required for cloud_action=reupload; must exactly equal LOCAL DB IS SOURCE OF TRUTH"),
9691
- domain_name: z76.string().optional().describe("Client deployment domain"),
9692
- phase: z76.enum(["phase_1_coo", "phase_2_executives", "phase_3_parallel_org", "1", "2", "3"]).optional().describe("Orchestration phase for orchestration_phase action"),
9773
+ action: z77.enum(Object.keys(ACTION_TO_TOOL2)).describe("Admin/config operation. refresh_license force re-checks the plan against the cloud and re-caches the signed JWT (picks up plan upgrades without editing files). identity_get/identity_update manage agent identity files. session_events/session_last_response inspect session logs. dreaming_run/dreaming_status/dreaming_history manage the self-improvement loop. closeout runs dreaming + commits a structured session summary to memory. capability_cards returns A2A-style JSON manifests for all agents. restart_telemetry shows why the daemon restarted \u2014 cause breakdown, slowest timers, event-loop blocks."),
9774
+ agent_id: z77.string().optional().describe("Agent id for set_agent_config/agent_spend/session queries/hire"),
9775
+ role: z77.string().optional().describe("Role template for action=hire: coo, cto, cmo, gm, principal-engineer, content-specialist, ai-specialist, staff-code-reviewer"),
9776
+ runtime: z77.string().optional().describe("Runtime for set_agent_config"),
9777
+ model: z77.string().optional().describe("Model for set_agent_config"),
9778
+ reasoning_effort: z77.string().optional().describe("Reasoning effort for Codex agents"),
9779
+ dry_run: z77.boolean().optional().describe("Preview without applying where supported"),
9780
+ fix: z77.boolean().optional().describe("Apply fixes for memory_audit where supported"),
9781
+ verbose: z77.boolean().optional().describe("Verbose output where supported"),
9782
+ project_name: z77.string().optional().describe("Project filter/name"),
9783
+ since: z77.string().optional().describe("ISO lower-bound timestamp"),
9784
+ limit: z77.coerce.number().optional().describe("Result limit"),
9785
+ output_path: z77.string().optional().describe("Output path for export/backup"),
9786
+ input_path: z77.string().optional().describe("Input path for import_orchestration"),
9787
+ strategy: z77.enum(["merge", "replace"]).optional().describe("Import strategy; replace must still be additive-only per platform rules"),
9788
+ license_key: z77.string().optional().describe("License key for activation/status"),
9789
+ email: z77.string().optional().describe("Customer email for license creation"),
9790
+ plan: z77.string().optional().describe("License plan"),
9791
+ name: z77.string().optional().describe("Trigger/starter pack/procedure/client name"),
9792
+ event: z77.string().optional().describe("Trigger event"),
9793
+ conditions: z77.array(z77.record(z77.string(), z77.unknown())).optional().describe("Trigger conditions"),
9794
+ actions: z77.array(z77.record(z77.string(), z77.unknown())).optional().describe("Trigger actions"),
9795
+ enabled: z77.boolean().optional().describe("Trigger enabled flag"),
9796
+ schedule: z77.string().optional().describe("Trigger schedule"),
9797
+ query: z77.string().optional().describe("Trigger query or filter"),
9798
+ skill_name: z77.string().optional().describe("Skill name for load_skill"),
9799
+ pack_name: z77.string().optional().describe("Starter pack name"),
9800
+ title: z77.string().optional().describe("Procedure title"),
9801
+ content: z77.string().optional().describe("Procedure content"),
9802
+ priority: z77.enum(["p0", "p1", "p2"]).optional().describe("Procedure priority"),
9803
+ domain: z77.string().optional().describe("Procedure domain"),
9804
+ procedure_id: z77.string().optional().describe("Procedure id for deactivate"),
9805
+ subaction: z77.enum(["store", "list", "deactivate"]).optional().describe("Nested action for company_procedure/global_procedure"),
9806
+ max_clusters: z77.coerce.number().optional().describe("Consolidation max clusters"),
9807
+ force: z77.boolean().optional().describe("Force operation where supported"),
9808
+ cloud_action: z77.enum(["status", "sync", "reupload"]).optional().describe("Nested operation for action=cloud_sync"),
9809
+ confirm_local_db_source_of_truth: z77.string().optional().describe("Required for cloud_action=reupload; must exactly equal LOCAL DB IS SOURCE OF TRUTH"),
9810
+ domain_name: z77.string().optional().describe("Client deployment domain"),
9811
+ phase: z77.enum(["phase_1_coo", "phase_2_executives", "phase_3_parallel_org", "1", "2", "3"]).optional().describe("Orchestration phase for orchestration_phase action"),
9693
9812
  // Identity params (absorbed from identity tool)
9694
- identity_content: z76.string().optional().describe("Full exe.md content for action=identity_update"),
9813
+ identity_content: z77.string().optional().describe("Full exe.md content for action=identity_update"),
9695
9814
  // Session params (absorbed from session tool)
9696
- session_id: z76.string().optional().describe("Session ID for action=session_events"),
9815
+ session_id: z77.string().optional().describe("Session ID for action=session_events"),
9697
9816
  // Dreaming params (absorbed from dreaming tool)
9698
- hours: z76.coerce.number().min(1).max(720).optional().describe("Lookback window in hours for action=dreaming_run/restart_telemetry. Default 24.")
9817
+ hours: z77.coerce.number().min(1).max(720).optional().describe("Lookback window in hours for action=dreaming_run/restart_telemetry. Default 24.")
9699
9818
  }
9700
9819
  }, async (input, extra) => {
9701
9820
  const action = input.action;
@@ -9709,6 +9828,8 @@ function registerConfig(server) {
9709
9828
  if (action === "export_orchestration" && !args.output_path) return errorResult8('config action "export_orchestration" requires output_path');
9710
9829
  if (action === "import_orchestration" && !args.input_path) return errorResult8('config action "import_orchestration" requires input_path');
9711
9830
  if (action === "activate_license" && !args.license_key) return errorResult8('config action "activate_license" requires license_key');
9831
+ if (action === "set_customer_plan" && (!args.email && !args.license_key)) return errorResult8('config action "set_customer_plan" requires email or license_key');
9832
+ if (action === "set_customer_plan" && !args.plan) return errorResult8('config action "set_customer_plan" requires plan (free/pro/team/agency/enterprise)');
9712
9833
  if (action === "create_trigger" && (!args.name || !args.event || !Array.isArray(args.actions))) return errorResult8('config action "create_trigger" requires name, event, and actions');
9713
9834
  if ((action === "company_procedure" || action === "global_procedure") && args.action === "store" && (!args.title || !args.content)) return errorResult8(`config action "${action}" subaction=store requires title and content`);
9714
9835
  if (action === "identity_update" && (!args.agent_id || !args.identity_content)) {
@@ -9723,8 +9844,8 @@ function registerConfig(server) {
9723
9844
  }
9724
9845
  if (action === "closeout") {
9725
9846
  try {
9726
- const { DreamingEngine: DreamingEngine2 } = await import("./dreaming-NRTMPNPZ.js");
9727
- const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-SHM4QSRJ.js");
9847
+ const { DreamingEngine: DreamingEngine2 } = await import("./dreaming-LMVDIC5C.js");
9848
+ const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-IUVRZOSF.js");
9728
9849
  const { writeMemory: writeMemory2, flushBatch: flushBatch2 } = await import("./lib/store.js");
9729
9850
  const { randomUUID: randomUUID2 } = await import("crypto");
9730
9851
  const { getProjectName: getProjectName2 } = await import("./project-name-EWG5KAZP.js");
@@ -9795,7 +9916,7 @@ function registerConfig(server) {
9795
9916
  }
9796
9917
  if (action === "capability_cards") {
9797
9918
  try {
9798
- const { getAllCapabilityCards, findAgentForTask } = await import("./capability-cards-H7H3MU74.js");
9919
+ const { getAllCapabilityCards, findAgentForTask } = await import("./capability-cards-STD3NMCR.js");
9799
9920
  const cards = getAllCapabilityCards();
9800
9921
  const taskQuery = args.query;
9801
9922
  if (taskQuery) {
@@ -9846,7 +9967,7 @@ function registerConfig(server) {
9846
9967
  const existing = loadEmployeesSync2();
9847
9968
  if (existing.some((e) => e.name === employeeName)) return errorResult8(`Employee "${employeeName}" already exists.`);
9848
9969
  try {
9849
- const { assertEmployeeLimit: assertEmployeeLimit2 } = await import("./plan-limits-QWBN2EKH.js");
9970
+ const { assertEmployeeLimit: assertEmployeeLimit2 } = await import("./plan-limits-EUZI4X5W.js");
9850
9971
  await assertEmployeeLimit2();
9851
9972
  } catch (e) {
9852
9973
  return errorResult8(e instanceof Error ? e.message : "Employee limit reached.");
@@ -9887,7 +10008,7 @@ You are ${employeeName}. Role: ${role}.`, "utf-8");
9887
10008
  }
9888
10009
  try {
9889
10010
  const { generateSessionWrappers } = await import("./lib/session-wrappers.js");
9890
- const { resolvePackageRoot } = await import("./installer-SC7CQBYY.js");
10011
+ const { resolvePackageRoot } = await import("./installer-3EYHBKWB.js");
9891
10012
  generateSessionWrappers(resolvePackageRoot());
9892
10013
  } catch {
9893
10014
  }
@@ -9957,10 +10078,10 @@ You are ${employeeName}. Role: ${role}.`, "utf-8");
9957
10078
  }
9958
10079
 
9959
10080
  // src/mcp/tools/wiki.ts
9960
- import { z as z79 } from "zod";
10081
+ import { z as z80 } from "zod";
9961
10082
 
9962
10083
  // src/mcp/tools/list-wiki-pages.ts
9963
- import { z as z77 } from "zod";
10084
+ import { z as z78 } from "zod";
9964
10085
  var FETCH_TIMEOUT_MS2 = 1e4;
9965
10086
  function registerListWikiPages(server) {
9966
10087
  server.registerTool(
@@ -9969,12 +10090,12 @@ function registerListWikiPages(server) {
9969
10090
  title: "List Wiki Pages",
9970
10091
  description: "List documents in an exe-wiki workspace. Optionally filter by folder.",
9971
10092
  inputSchema: {
9972
- workspace: z77.string().describe('Wiki workspace slug (e.g., "hygo")'),
9973
- folder: z77.string().optional().describe("Filter by folder path")
10093
+ workspace: z78.string().describe('Wiki workspace slug (e.g., "hygo")'),
10094
+ folder: z78.string().optional().describe("Filter by folder path")
9974
10095
  }
9975
10096
  },
9976
10097
  async ({ workspace, folder }) => {
9977
- const { assertFeature: assertFeature2 } = await import("./plan-limits-QWBN2EKH.js");
10098
+ const { assertFeature: assertFeature2 } = await import("./plan-limits-EUZI4X5W.js");
9978
10099
  await assertFeature2("wiki");
9979
10100
  const apiUrl = process.env.EXE_WIKI_API_URL;
9980
10101
  const apiKey = process.env.EXE_WIKI_API_KEY;
@@ -10059,7 +10180,7 @@ function registerListWikiPages(server) {
10059
10180
  }
10060
10181
 
10061
10182
  // src/mcp/tools/get-wiki-page.ts
10062
- import { z as z78 } from "zod";
10183
+ import { z as z79 } from "zod";
10063
10184
  var FETCH_TIMEOUT_MS3 = 1e4;
10064
10185
  function registerGetWikiPage(server) {
10065
10186
  server.registerTool(
@@ -10068,13 +10189,13 @@ function registerGetWikiPage(server) {
10068
10189
  title: "Get Wiki Page",
10069
10190
  description: "Read a wiki page by document ID or title. Returns content, metadata, and folder path. Use title search when you know the page name but not the ID.",
10070
10191
  inputSchema: {
10071
- workspace: z78.string().describe('Wiki workspace slug (e.g., "hygo")'),
10072
- document_id: z78.string().optional().describe("Specific document ID (exact lookup)"),
10073
- title: z78.string().optional().describe("Search by title (fuzzy match)")
10192
+ workspace: z79.string().describe('Wiki workspace slug (e.g., "hygo")'),
10193
+ document_id: z79.string().optional().describe("Specific document ID (exact lookup)"),
10194
+ title: z79.string().optional().describe("Search by title (fuzzy match)")
10074
10195
  }
10075
10196
  },
10076
10197
  async ({ workspace, document_id, title }) => {
10077
- const { assertFeature: assertFeature2 } = await import("./plan-limits-QWBN2EKH.js");
10198
+ const { assertFeature: assertFeature2 } = await import("./plan-limits-EUZI4X5W.js");
10078
10199
  await assertFeature2("wiki");
10079
10200
  const apiUrl = process.env.EXE_WIKI_API_URL;
10080
10201
  const apiKey = process.env.EXE_WIKI_API_KEY;
@@ -10268,10 +10389,10 @@ async function handleWikiSearch(input) {
10268
10389
  const userId = input.user_id;
10269
10390
  if (!workspace) return errorResult9('wiki action "search" requires workspace');
10270
10391
  if (!query) return errorResult9('wiki action "search" requires query');
10271
- const { assertFeature: assertFeature2 } = await import("./plan-limits-QWBN2EKH.js");
10392
+ const { assertFeature: assertFeature2 } = await import("./plan-limits-EUZI4X5W.js");
10272
10393
  await assertFeature2("wiki");
10273
10394
  if (userId) {
10274
- const { checkWikiAccess } = await import("./wiki-acl-EZMGL6KW.js");
10395
+ const { checkWikiAccess } = await import("./wiki-acl-QIBDNXSM.js");
10275
10396
  const { allowed } = await checkWikiAccess(String(userId), String(workspace), "read");
10276
10397
  if (!allowed) {
10277
10398
  return errorResult9(`Access denied: user "${userId}" does not have read access to workspace "${workspace}"`);
@@ -10326,34 +10447,34 @@ function registerWiki(server) {
10326
10447
  title: "Wiki",
10327
10448
  description: "Consolidated wiki and document domain tool. Actions: list, get, search (wiki pages), document_ingest, document_list, document_purge, document_set_importance, document_rerank (document management). Wiki writes flow through raw data ingestion/projection into the curated wiki store.",
10328
10449
  inputSchema: {
10329
- action: z79.enum(["list", "get", "search", "document_ingest", "document_list", "document_purge", "document_set_importance", "document_rerank"]).describe("Wiki/document operation. list/get/search for wiki pages. document_* for document management."),
10330
- query: z79.string().optional().describe("Search query for action=search (FTS across page titles and content)"),
10331
- workspace: z79.string().optional().describe("Wiki workspace slug"),
10332
- title: z79.string().optional().describe("Fuzzy page title lookup for get"),
10333
- content: z79.string().optional().describe("Reserved; wiki writes use raw-data ingestion/projection"),
10334
- folder: z79.string().optional().describe("Optional folder path for list"),
10335
- document_id: z79.string().optional().describe("Document ID for get/purge/set_importance"),
10336
- mode: z79.enum(["replace", "append"]).optional().describe("Reserved; direct wiki updates are removed"),
10337
- section: z79.string().optional().describe("Reserved; direct wiki updates are removed"),
10338
- user_id: z79.string().optional().describe("User ID for ACL enforcement. When set, workspace access is checked against wiki_acl table."),
10450
+ action: z80.enum(["list", "get", "search", "document_ingest", "document_list", "document_purge", "document_set_importance", "document_rerank"]).describe("Wiki/document operation. list/get/search for wiki pages. document_* for document management."),
10451
+ query: z80.string().optional().describe("Search query for action=search (FTS across page titles and content)"),
10452
+ workspace: z80.string().optional().describe("Wiki workspace slug"),
10453
+ title: z80.string().optional().describe("Fuzzy page title lookup for get"),
10454
+ content: z80.string().optional().describe("Reserved; wiki writes use raw-data ingestion/projection"),
10455
+ folder: z80.string().optional().describe("Optional folder path for list"),
10456
+ document_id: z80.string().optional().describe("Document ID for get/purge/set_importance"),
10457
+ mode: z80.enum(["replace", "append"]).optional().describe("Reserved; direct wiki updates are removed"),
10458
+ section: z80.string().optional().describe("Reserved; direct wiki updates are removed"),
10459
+ user_id: z80.string().optional().describe("User ID for ACL enforcement. When set, workspace access is checked against wiki_acl table."),
10339
10460
  // Document management params (absorbed from document tool)
10340
- workspace_id: z79.string().optional().describe("Workspace UUID or slug for document operations"),
10341
- filename: z79.string().optional().describe("Document filename for action=document_ingest"),
10342
- mime: z79.string().optional().describe("MIME type for action=document_ingest"),
10343
- source_type: z79.enum(["upload", "url", "manual", "paste"]).optional().describe("Source type for action=document_ingest"),
10344
- chunks: z79.array(z79.object({
10345
- text: z79.string(),
10346
- char_offset: z79.number().optional(),
10347
- page_number: z79.number().optional(),
10348
- metadata: z79.record(z79.string(), z79.unknown()).optional()
10461
+ workspace_id: z80.string().optional().describe("Workspace UUID or slug for document operations"),
10462
+ filename: z80.string().optional().describe("Document filename for action=document_ingest"),
10463
+ mime: z80.string().optional().describe("MIME type for action=document_ingest"),
10464
+ source_type: z80.enum(["upload", "url", "manual", "paste"]).optional().describe("Source type for action=document_ingest"),
10465
+ chunks: z80.array(z80.object({
10466
+ text: z80.string(),
10467
+ char_offset: z80.number().optional(),
10468
+ page_number: z80.number().optional(),
10469
+ metadata: z80.record(z80.string(), z80.unknown()).optional()
10349
10470
  })).optional().describe("Document chunks for action=document_ingest"),
10350
- document_metadata: z79.record(z79.string(), z79.unknown()).optional().describe("Document metadata for action=document_ingest"),
10351
- importance: z79.number().int().min(1).max(10).optional().describe("Importance for action=document_set_importance"),
10352
- doc_query: z79.string().optional().describe("Query for action=document_rerank"),
10353
- candidates: z79.array(z79.string()).optional().describe("Candidate texts for action=document_rerank"),
10354
- top_k: z79.coerce.number().int().positive().optional().describe("Top K for action=document_rerank"),
10355
- limit: z79.number().int().positive().optional().describe("Limit for action=document_list"),
10356
- offset: z79.number().int().nonnegative().optional().describe("Offset for action=document_list")
10471
+ document_metadata: z80.record(z80.string(), z80.unknown()).optional().describe("Document metadata for action=document_ingest"),
10472
+ importance: z80.number().int().min(1).max(10).optional().describe("Importance for action=document_set_importance"),
10473
+ doc_query: z80.string().optional().describe("Query for action=document_rerank"),
10474
+ candidates: z80.array(z80.string()).optional().describe("Candidate texts for action=document_rerank"),
10475
+ top_k: z80.coerce.number().int().positive().optional().describe("Top K for action=document_rerank"),
10476
+ limit: z80.number().int().positive().optional().describe("Limit for action=document_list"),
10477
+ offset: z80.number().int().nonnegative().optional().describe("Offset for action=document_list")
10357
10478
  }
10358
10479
  },
10359
10480
  async (input, extra) => {
@@ -10374,7 +10495,7 @@ function registerWiki(server) {
10374
10495
  return errorResult9('wiki action "document_rerank" requires at least one candidate');
10375
10496
  }
10376
10497
  if (user_id && legacyArgs.workspace) {
10377
- const { checkWikiAccess } = await import("./wiki-acl-EZMGL6KW.js");
10498
+ const { checkWikiAccess } = await import("./wiki-acl-QIBDNXSM.js");
10378
10499
  const { allowed } = await checkWikiAccess(
10379
10500
  String(user_id),
10380
10501
  String(legacyArgs.workspace),
@@ -10399,7 +10520,7 @@ function registerWiki(server) {
10399
10520
  }
10400
10521
 
10401
10522
  // src/mcp/tools/behavior.ts
10402
- import { z as z80 } from "zod";
10523
+ import { z as z81 } from "zod";
10403
10524
  function rowToBehavior2(r) {
10404
10525
  return {
10405
10526
  id: String(r.id),
@@ -10428,23 +10549,23 @@ function registerBehavior(server) {
10428
10549
  title: "Behavior",
10429
10550
  description: "Manage behavioral patterns, corrections, and reusable procedures for employees. Actions: store (create new), list (query existing), audit (creation context), deactivate (soft-delete, restricted), reactivate (re-enable deactivated, restricted), purge (hard-delete inactive, or purge_ghosts=true to delete corrupt empty/null-id rows; restricted).",
10430
10551
  inputSchema: {
10431
- action: z80.enum(["store", "list", "deactivate", "reactivate", "audit", "purge"]).describe("Action to perform"),
10432
- content: z80.string().max(500).optional().describe("The behavioral instruction \u2014 one clear sentence (store). Not needed when trigger+action are provided for reflex domain."),
10433
- domain: z80.string().optional().describe("Category: workflow, code-style, tool-use, communication, architecture, testing, reflex. Use 'reflex' for trigger\u2192action behaviors."),
10434
- priority: z80.enum(["p0", "p1", "p2"]).optional().describe("Priority tier. p0 = always included. p1 = standard (default). p2 = nice-to-have. Forced to p0 for reflex domain."),
10435
- trigger: z80.string().max(200).optional().describe("Condition that activates this reflex (e.g. 'when customer says cancel', 'when deadline mentioned'). Required when domain='reflex'."),
10436
- trigger_action: z80.string().max(300).optional().describe("What the agent should do when the trigger fires (e.g. 'offer retention discount', 'flag for manager review'). Required when domain='reflex'."),
10437
- agent_id: z80.string().optional().describe("Employee name. Defaults to current agent. Pass 'all' to list everyone's (list only)."),
10438
- project_name: z80.string().optional().describe("Defaults to current project. Pass 'global' for a behavior that applies everywhere (store)."),
10439
- behavior_id: z80.string().optional().describe("UUID of the behavior (deactivate)"),
10440
- shared_skills: z80.boolean().optional().describe("When true with action=list, include skills (domain='skill') from ALL agents. Default: false."),
10441
- device_scoped: z80.boolean().optional().describe("When true, behavior only loads on this device. Default false (global \u2014 loads everywhere). (store)"),
10442
- limit: z80.coerce.number().int().min(1).max(500).optional().describe("Max rows for list/purge preview. Default 100 for list, 500 for purge."),
10443
- offset: z80.coerce.number().int().min(0).optional().describe("Pagination offset for list. Default 0."),
10444
- older_than_days: z80.coerce.number().int().min(0).optional().describe("For purge: only hard-delete inactive behaviors older than this many days. Default 30."),
10445
- dry_run: z80.boolean().optional().default(true).describe("For purge: preview by default; set false to permanently delete matching inactive behaviors."),
10446
- purge_ghosts: z80.boolean().optional().describe("For purge: target ghost rows (empty content or NULL id) regardless of active status / age, instead of aged inactive behaviors. Use to clean up corrupt rows that flood behavior list. (purge)"),
10447
- bulk: z80.boolean().optional().describe("For purge with purge_ghosts=true: drain ALL ghost rows in bounded batches in a single call (handles millions of rows safely) and VACUUM. Use when the ghost table is too large to clear 1000-at-a-time. (purge)")
10552
+ action: z81.enum(["store", "list", "deactivate", "reactivate", "audit", "purge"]).describe("Action to perform"),
10553
+ content: z81.string().max(500).optional().describe("The behavioral instruction \u2014 one clear sentence (store). Not needed when trigger+action are provided for reflex domain."),
10554
+ domain: z81.string().optional().describe("Category: workflow, code-style, tool-use, communication, architecture, testing, reflex. Use 'reflex' for trigger\u2192action behaviors."),
10555
+ priority: z81.enum(["p0", "p1", "p2"]).optional().describe("Priority tier. p0 = always included. p1 = standard (default). p2 = nice-to-have. Forced to p0 for reflex domain."),
10556
+ trigger: z81.string().max(200).optional().describe("Condition that activates this reflex (e.g. 'when customer says cancel', 'when deadline mentioned'). Required when domain='reflex'."),
10557
+ trigger_action: z81.string().max(300).optional().describe("What the agent should do when the trigger fires (e.g. 'offer retention discount', 'flag for manager review'). Required when domain='reflex'."),
10558
+ agent_id: z81.string().optional().describe("Employee name. Defaults to current agent. Pass 'all' to list everyone's (list only)."),
10559
+ project_name: z81.string().optional().describe("Defaults to current project. Pass 'global' for a behavior that applies everywhere (store)."),
10560
+ behavior_id: z81.string().optional().describe("UUID of the behavior (deactivate)"),
10561
+ shared_skills: z81.boolean().optional().describe("When true with action=list, include skills (domain='skill') from ALL agents. Default: false."),
10562
+ device_scoped: z81.boolean().optional().describe("When true, behavior only loads on this device. Default false (global \u2014 loads everywhere). (store)"),
10563
+ limit: z81.coerce.number().int().min(1).max(500).optional().describe("Max rows for list/purge preview. Default 100 for list, 500 for purge."),
10564
+ offset: z81.coerce.number().int().min(0).optional().describe("Pagination offset for list. Default 0."),
10565
+ older_than_days: z81.coerce.number().int().min(0).optional().describe("For purge: only hard-delete inactive behaviors older than this many days. Default 30."),
10566
+ dry_run: z81.boolean().optional().default(true).describe("For purge: preview by default; set false to permanently delete matching inactive behaviors."),
10567
+ purge_ghosts: z81.boolean().optional().describe("For purge: target ghost rows (empty content or NULL id) regardless of active status / age, instead of aged inactive behaviors. Use to clean up corrupt rows that flood behavior list. (purge)"),
10568
+ bulk: z81.boolean().optional().describe("For purge with purge_ghosts=true: drain ALL ghost rows in bounded batches in a single call (handles millions of rows safely) and VACUUM. Use when the ghost table is too large to clear 1000-at-a-time. (purge)")
10448
10569
  }
10449
10570
  },
10450
10571
  async ({ action, content, domain, priority, trigger, trigger_action, agent_id, project_name, behavior_id, shared_skills, device_scoped, limit, offset, older_than_days, dry_run, purge_ghosts, bulk }) => {
@@ -10695,7 +10816,7 @@ Use /exe-forget to remove any that this supersedes.`;
10695
10816
  }]
10696
10817
  };
10697
10818
  }
10698
- const { bulkPurgeGhostBehaviors } = await import("./behaviors-J47D342W.js");
10819
+ const { bulkPurgeGhostBehaviors } = await import("./behaviors-MQCADHAD.js");
10699
10820
  const res = await bulkPurgeGhostBehaviors({ batchSize: 5e3, vacuum: true });
10700
10821
  return {
10701
10822
  content: [{
@@ -10806,7 +10927,7 @@ Use /exe-forget to remove any that this supersedes.`;
10806
10927
  return { content: [{ type: "text", text: `Behavior not found: ${behavior_id}` }], isError: true };
10807
10928
  }
10808
10929
  const row2 = result4.rows[0];
10809
- const { reactivateBehavior: reactivateBehavior2 } = await import("./behaviors-J47D342W.js");
10930
+ const { reactivateBehavior: reactivateBehavior2 } = await import("./behaviors-MQCADHAD.js");
10810
10931
  const wasReactivated = await reactivateBehavior2(behavior_id);
10811
10932
  if (!wasReactivated) {
10812
10933
  return { content: [{ type: "text", text: `Behavior ${behavior_id} is already active.` }] };
@@ -10876,7 +10997,7 @@ Content: ${row.content}`
10876
10997
  }
10877
10998
 
10878
10999
  // src/mcp/tools/reminder.ts
10879
- import { z as z81 } from "zod";
11000
+ import { z as z82 } from "zod";
10880
11001
  function registerReminder(server) {
10881
11002
  server.registerTool(
10882
11003
  "reminder",
@@ -10884,11 +11005,11 @@ function registerReminder(server) {
10884
11005
  title: "Reminder",
10885
11006
  description: "Manage reminders for the founder. Shown in the boot brief every session. Actions: create (set new), list (view active), complete (mark done).",
10886
11007
  inputSchema: {
10887
- action: z81.enum(["create", "list", "complete"]).describe("Action to perform"),
10888
- text: z81.string().optional().describe("What to remind about (create)"),
10889
- due_date: z81.string().optional().describe("Optional due date \u2014 ISO date (2026-04-01) or null for persistent (create)"),
10890
- reminder_id: z81.string().optional().describe("Reminder UUID or text substring to match (complete)"),
10891
- include_completed: z81.boolean().optional().default(false).describe("Include completed reminders (list)")
11008
+ action: z82.enum(["create", "list", "complete"]).describe("Action to perform"),
11009
+ text: z82.string().optional().describe("What to remind about (create)"),
11010
+ due_date: z82.string().optional().describe("Optional due date \u2014 ISO date (2026-04-01) or null for persistent (create)"),
11011
+ reminder_id: z82.string().optional().describe("Reminder UUID or text substring to match (complete)"),
11012
+ include_completed: z82.boolean().optional().default(false).describe("Include completed reminders (list)")
10892
11013
  }
10893
11014
  },
10894
11015
  async ({ action, text: text5, due_date, reminder_id, include_completed }) => {
@@ -10941,7 +11062,7 @@ function registerReminder(server) {
10941
11062
  }
10942
11063
 
10943
11064
  // src/mcp/tools/store-global-procedure.ts
10944
- import { z as z82 } from "zod";
11065
+ import { z as z83 } from "zod";
10945
11066
  function registerStoreGlobalProcedure(server) {
10946
11067
  server.registerTool(
10947
11068
  "store_global_procedure",
@@ -10949,10 +11070,10 @@ function registerStoreGlobalProcedure(server) {
10949
11070
  title: "Store Company Procedure (use global_procedure instead)",
10950
11071
  description: "DEPRECATED \u2014 use global_procedure with action='store'. Create a company procedure (customer-owned Layer 0 rule). RESTRICTED: only coordinator or founder sessions.",
10951
11072
  inputSchema: {
10952
- title: z82.string().describe("Short title for the procedure"),
10953
- content: z82.string().max(500).describe("The procedure content \u2014 clear, actionable instruction"),
10954
- priority: z82.enum(["p0", "p1", "p2"]).optional().describe("Priority tier. p0 = always (default)."),
10955
- domain: z82.string().optional().describe("Category: workflow, code-style, communication, architecture, testing, security")
11073
+ title: z83.string().describe("Short title for the procedure"),
11074
+ content: z83.string().max(500).describe("The procedure content \u2014 clear, actionable instruction"),
11075
+ priority: z83.enum(["p0", "p1", "p2"]).optional().describe("Priority tier. p0 = always (default)."),
11076
+ domain: z83.string().optional().describe("Category: workflow, code-style, communication, architecture, testing, security")
10956
11077
  }
10957
11078
  },
10958
11079
  async ({ title, content, priority, domain }) => {
@@ -11024,7 +11145,7 @@ ${lines.join("\n\n")}`
11024
11145
  }
11025
11146
 
11026
11147
  // src/mcp/tools/deactivate-global-procedure.ts
11027
- import { z as z83 } from "zod";
11148
+ import { z as z84 } from "zod";
11028
11149
  function registerDeactivateGlobalProcedure(server) {
11029
11150
  server.registerTool(
11030
11151
  "deactivate_global_procedure",
@@ -11032,7 +11153,7 @@ function registerDeactivateGlobalProcedure(server) {
11032
11153
  title: "Deactivate Company Procedure (use global_procedure instead)",
11033
11154
  description: "DEPRECATED \u2014 use global_procedure with action='deactivate'. Soft-delete a company procedure. RESTRICTED: only coordinator or founder sessions.",
11034
11155
  inputSchema: {
11035
- procedure_id: z83.string().describe("UUID of the company procedure to deactivate")
11156
+ procedure_id: z84.string().describe("UUID of the company procedure to deactivate")
11036
11157
  }
11037
11158
  },
11038
11159
  async ({ procedure_id }) => {
@@ -11087,7 +11208,7 @@ Content: ${row.content}`
11087
11208
  }
11088
11209
 
11089
11210
  // src/mcp/tools/people-roster.ts
11090
- import { z as z84 } from "zod";
11211
+ import { z as z85 } from "zod";
11091
11212
 
11092
11213
  // src/lib/people.ts
11093
11214
  import { readFile, writeFile, mkdir } from "fs/promises";
@@ -11134,10 +11255,10 @@ function registerAddPerson(server) {
11134
11255
  title: "Add Person",
11135
11256
  description: "Add or update a key human in the people roster. Used for co-founders, partners, customers \u2014 anyone agents need to know about.",
11136
11257
  inputSchema: {
11137
- name: z84.string().describe("Person's name"),
11138
- role: z84.string().describe("Their role (e.g. co-founder, customer, partner)"),
11139
- relationship: z84.string().describe("Relationship to the organization (e.g. co-founder, early adopter, investor)"),
11140
- notes: z84.string().optional().describe("Additional context about this person")
11258
+ name: z85.string().describe("Person's name"),
11259
+ role: z85.string().describe("Their role (e.g. co-founder, customer, partner)"),
11260
+ relationship: z85.string().describe("Relationship to the organization (e.g. co-founder, early adopter, investor)"),
11261
+ notes: z85.string().optional().describe("Additional context about this person")
11141
11262
  }
11142
11263
  },
11143
11264
  async ({ name, role, relationship, notes }) => {
@@ -11183,7 +11304,7 @@ function registerGetPerson(server) {
11183
11304
  title: "Get Person",
11184
11305
  description: "Look up a specific person by name from the people roster.",
11185
11306
  inputSchema: {
11186
- name: z84.string().describe("Person's name to look up")
11307
+ name: z85.string().describe("Person's name to look up")
11187
11308
  }
11188
11309
  },
11189
11310
  async ({ name }) => {
@@ -11207,9 +11328,9 @@ Notes: ${person.notes}` : ""}`
11207
11328
  }
11208
11329
 
11209
11330
  // src/mcp/tools/company-actions.ts
11210
- import { z as z85 } from "zod";
11331
+ import { z as z86 } from "zod";
11211
11332
  var FETCH_TIMEOUT_MS5 = 15e3;
11212
- var ACTION = z85.enum(["list_connectors", "describe_connector", "preview", "execute", "list_runs", "get_run"]);
11333
+ var ACTION = z86.enum(["list_connectors", "describe_connector", "preview", "execute", "list_runs", "get_run"]);
11213
11334
  function format(payload) {
11214
11335
  return ["# Company Actions", "", JSON.stringify(payload, null, 2)].join("\n");
11215
11336
  }
@@ -11221,13 +11342,13 @@ function registerCompanyActions(server) {
11221
11342
  description: "Preview and execute external connector actions (Asana, WhatsApp) through exe-gateway with audit/safety gates.",
11222
11343
  inputSchema: {
11223
11344
  action: ACTION.describe("list_connectors, describe_connector, preview, execute, list_runs, get_run"),
11224
- connector: z85.string().optional().describe("Connector to use, e.g. asana, whatsapp, airtable, notion"),
11225
- connector_ref: z85.string().optional().describe("Exact connector ref from list_connectors when connector names overlap"),
11226
- operation: z85.string().optional().describe("Connector operation, e.g. create_task or send_message"),
11227
- payload: z85.record(z85.string(), z85.unknown()).optional().describe("Operation payload"),
11228
- idempotency_key: z85.string().optional().describe("Stable key to prevent duplicate execution"),
11229
- confirm_token: z85.string().optional().describe("Optional future approval token"),
11230
- run_id: z85.string().optional().describe("Run id for get_run")
11345
+ connector: z86.string().optional().describe("Connector to use, e.g. asana, whatsapp, airtable, notion"),
11346
+ connector_ref: z86.string().optional().describe("Exact connector ref from list_connectors when connector names overlap"),
11347
+ operation: z86.string().optional().describe("Connector operation, e.g. create_task or send_message"),
11348
+ payload: z86.record(z86.string(), z86.unknown()).optional().describe("Operation payload"),
11349
+ idempotency_key: z86.string().optional().describe("Stable key to prevent duplicate execution"),
11350
+ confirm_token: z86.string().optional().describe("Optional future approval token"),
11351
+ run_id: z86.string().optional().describe("Run id for get_run")
11231
11352
  }
11232
11353
  },
11233
11354
  async (input) => {
@@ -11272,8 +11393,8 @@ function registerCompanyActions(server) {
11272
11393
  }
11273
11394
 
11274
11395
  // src/mcp/tools/workflow.ts
11275
- import { z as z86 } from "zod";
11276
- var ACTION2 = z86.enum([
11396
+ import { z as z87 } from "zod";
11397
+ var ACTION2 = z87.enum([
11277
11398
  "create_workflow",
11278
11399
  "start_workflow",
11279
11400
  "get_workflow_status",
@@ -11281,23 +11402,23 @@ var ACTION2 = z86.enum([
11281
11402
  "list_workflows",
11282
11403
  "list_instances"
11283
11404
  ]);
11284
- var StepSchema = z86.object({
11285
- name: z86.string().describe("Human-readable step name"),
11286
- type: z86.enum(["execute_action", "wait_for_approval", "conditional"]).describe("Step type"),
11287
- action: z86.object({
11288
- type: z86.enum(["send_whatsapp", "send_message", "create_task", "update_wiki", "mcp_tool"]),
11289
- params: z86.record(z86.string(), z86.string()),
11290
- requires_approval: z86.boolean().optional()
11405
+ var StepSchema = z87.object({
11406
+ name: z87.string().describe("Human-readable step name"),
11407
+ type: z87.enum(["execute_action", "wait_for_approval", "conditional"]).describe("Step type"),
11408
+ action: z87.object({
11409
+ type: z87.enum(["send_whatsapp", "send_message", "create_task", "update_wiki", "mcp_tool"]),
11410
+ params: z87.record(z87.string(), z87.string()),
11411
+ requires_approval: z87.boolean().optional()
11291
11412
  }).optional().describe("Action to execute (for execute_action steps)"),
11292
- connector: z86.string().optional().describe("Connector name (e.g., asana, whatsapp)"),
11293
- operation: z86.string().optional().describe("Connector operation (e.g., create_task)"),
11294
- payload: z86.record(z86.string(), z86.unknown()).optional().describe("Operation payload"),
11295
- condition: z86.object({
11296
- expression: z86.string().describe("Expression like '{{step.1.result.status}} == completed'"),
11297
- then_step: z86.number().optional(),
11298
- else_step: z86.number().optional()
11413
+ connector: z87.string().optional().describe("Connector name (e.g., asana, whatsapp)"),
11414
+ operation: z87.string().optional().describe("Connector operation (e.g., create_task)"),
11415
+ payload: z87.record(z87.string(), z87.unknown()).optional().describe("Operation payload"),
11416
+ condition: z87.object({
11417
+ expression: z87.string().describe("Expression like '{{step.1.result.status}} == completed'"),
11418
+ then_step: z87.number().optional(),
11419
+ else_step: z87.number().optional()
11299
11420
  }).optional().describe("Condition for conditional steps"),
11300
- approval_message: z86.string().optional().describe("Message shown when waiting for approval")
11421
+ approval_message: z87.string().optional().describe("Message shown when waiting for approval")
11301
11422
  });
11302
11423
  function registerWorkflowTool(server) {
11303
11424
  server.registerTool(
@@ -11307,14 +11428,14 @@ function registerWorkflowTool(server) {
11307
11428
  description: "Create, run, and manage multi-step workflows that chain actions with approval gates. Steps reference previous outputs via {{step.N.result}}. Actions: create_workflow, start_workflow, get_workflow_status, approve_workflow_step, list_workflows, list_instances.",
11308
11429
  inputSchema: {
11309
11430
  action: ACTION2.describe("create_workflow | start_workflow | get_workflow_status | approve_workflow_step | list_workflows | list_instances"),
11310
- name: z86.string().optional().describe("Workflow name (for create_workflow)"),
11311
- description: z86.string().optional().describe("Workflow description (for create_workflow)"),
11312
- steps: z86.array(StepSchema).optional().describe("Workflow steps (for create_workflow)"),
11313
- definition_id: z86.string().optional().describe("Workflow definition ID (for start_workflow)"),
11314
- instance_id: z86.string().optional().describe("Workflow instance ID (for get_workflow_status, approve_workflow_step)"),
11315
- context: z86.record(z86.string(), z86.unknown()).optional().describe("Initial context/record (for start_workflow)"),
11316
- approved: z86.boolean().optional().describe("Approve (true) or reject (false) the step (for approve_workflow_step)"),
11317
- status_filter: z86.string().optional().describe("Filter instances by status (for list_instances)")
11431
+ name: z87.string().optional().describe("Workflow name (for create_workflow)"),
11432
+ description: z87.string().optional().describe("Workflow description (for create_workflow)"),
11433
+ steps: z87.array(StepSchema).optional().describe("Workflow steps (for create_workflow)"),
11434
+ definition_id: z87.string().optional().describe("Workflow definition ID (for start_workflow)"),
11435
+ instance_id: z87.string().optional().describe("Workflow instance ID (for get_workflow_status, approve_workflow_step)"),
11436
+ context: z87.record(z87.string(), z87.unknown()).optional().describe("Initial context/record (for start_workflow)"),
11437
+ approved: z87.boolean().optional().describe("Approve (true) or reject (false) the step (for approve_workflow_step)"),
11438
+ status_filter: z87.string().optional().describe("Filter instances by status (for list_instances)")
11318
11439
  }
11319
11440
  },
11320
11441
  async (input) => {
@@ -11327,7 +11448,7 @@ function registerWorkflowTool(server) {
11327
11448
  getWorkflowInstance,
11328
11449
  listWorkflowInstances,
11329
11450
  approveWorkflowStep
11330
- } = await import("./workflow-engine-EPPZ226V.js");
11451
+ } = await import("./workflow-engine-3AVKRE5I.js");
11331
11452
  try {
11332
11453
  switch (input.action) {
11333
11454
  case "create_workflow": {
@@ -11450,17 +11571,17 @@ function formatInstanceStatus(inst, def) {
11450
11571
  }
11451
11572
 
11452
11573
  // src/mcp/tools/create-bug-report.ts
11453
- import { z as z87 } from "zod";
11574
+ import { z as z88 } from "zod";
11454
11575
  import crypto4 from "crypto";
11455
11576
  import { mkdir as mkdir2, writeFile as writeFile2 } from "fs/promises";
11456
11577
  import path13 from "path";
11457
- var CLASSIFICATION = z87.enum([
11578
+ var CLASSIFICATION = z88.enum([
11458
11579
  "upstream_bug",
11459
11580
  "customer_customization",
11460
11581
  "emergency_hotfix",
11461
11582
  "unclear"
11462
11583
  ]);
11463
- var SEVERITY = z87.enum(["p0", "p1", "p2", "p3"]);
11584
+ var SEVERITY = z88.enum(["p0", "p1", "p2", "p3"]);
11464
11585
  function slugify(input) {
11465
11586
  return input.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 80) || "bug-report";
11466
11587
  }
@@ -11554,29 +11675,29 @@ function registerCreateBugReport(server) {
11554
11675
  title: "Create Bug Report",
11555
11676
  description: "Classify and file an exe-os issue as upstream_bug, customer_customization, emergency_hotfix, or unclear. Writes a local report, stores memory, and optionally sends to AskExe support when a support endpoint is configured. IMPORTANT: Before filing, use diagnostics(action='healthcheck') and review orchestration metrics (exe-os-orchestration-metrics --since 1h) to include evidence in your report. Metrics are auto-attached to every bug report.",
11556
11677
  inputSchema: {
11557
- title: z87.string().min(3).describe("Short descriptive title"),
11678
+ title: z88.string().min(3).describe("Short descriptive title"),
11558
11679
  classification: CLASSIFICATION.describe(
11559
11680
  "upstream_bug = platform defect; customer_customization = local preference; emergency_hotfix = temporary local patch; unclear = needs maintainer triage"
11560
11681
  ),
11561
11682
  severity: SEVERITY.default("p2").describe("p0 critical \u2192 p3 low"),
11562
- summary: z87.string().min(10).describe("What happened and why it matters"),
11563
- customer_impact: z87.string().optional().describe("How this affects the customer/founder"),
11564
- reproduction_steps: z87.array(z87.string()).optional().describe("Steps to reproduce"),
11565
- expected: z87.string().optional().describe("Expected behavior"),
11566
- actual: z87.string().optional().describe("Actual behavior"),
11567
- files_changed: z87.array(z87.string()).optional().describe("Files changed or suspected"),
11568
- workaround: z87.string().optional().describe("Temporary local workaround/hotfix, if any"),
11569
- local_patch_diff: z87.string().optional().describe("Small local diff or patch summary"),
11570
- product: z87.string().optional().describe("Product this bug is for: exe-os, exe-create, exe-wiki, exe-gateway, exe-crm, exe-build. Defaults to exe-os."),
11571
- package_version: z87.string().optional().describe("Installed package version"),
11572
- project_name: z87.string().optional().describe("Project/customer context"),
11573
- implementing_branch: z87.string().optional().describe("Branch name or PR URL that implements/fixes this bug. Recorded on the report so future work can find existing fixes instead of redoing them (bug e324f244)."),
11574
- attachments: z87.array(z87.object({
11575
- filename: z87.string().min(1).describe("Filename for the attachment (e.g. error.log, patch.diff)"),
11576
- content: z87.string().min(1).describe("File content \u2014 plain text (diffs, logs, config snippets)")
11683
+ summary: z88.string().min(10).describe("What happened and why it matters"),
11684
+ customer_impact: z88.string().optional().describe("How this affects the customer/founder"),
11685
+ reproduction_steps: z88.array(z88.string()).optional().describe("Steps to reproduce"),
11686
+ expected: z88.string().optional().describe("Expected behavior"),
11687
+ actual: z88.string().optional().describe("Actual behavior"),
11688
+ files_changed: z88.array(z88.string()).optional().describe("Files changed or suspected"),
11689
+ workaround: z88.string().optional().describe("Temporary local workaround/hotfix, if any"),
11690
+ local_patch_diff: z88.string().optional().describe("Small local diff or patch summary"),
11691
+ product: z88.string().optional().describe("Product this bug is for: exe-os, exe-create, exe-wiki, exe-gateway, exe-crm, exe-build. Defaults to exe-os."),
11692
+ package_version: z88.string().optional().describe("Installed package version"),
11693
+ project_name: z88.string().optional().describe("Project/customer context"),
11694
+ implementing_branch: z88.string().optional().describe("Branch name or PR URL that implements/fixes this bug. Recorded on the report so future work can find existing fixes instead of redoing them (bug e324f244)."),
11695
+ attachments: z88.array(z88.object({
11696
+ filename: z88.string().min(1).describe("Filename for the attachment (e.g. error.log, patch.diff)"),
11697
+ content: z88.string().min(1).describe("File content \u2014 plain text (diffs, logs, config snippets)")
11577
11698
  })).optional().describe("File attachments: diffs, logs, config snippets, screenshots (text-based)"),
11578
- send_upstream: z87.boolean().default(true).describe("Attempt to POST to configured AskExe support endpoint"),
11579
- on_behalf_of_email: z87.string().email().optional().describe("ADMIN ONLY: file this request owned by another customer's license email; ignored unless caller holds the support admin token")
11699
+ send_upstream: z88.boolean().default(true).describe("Attempt to POST to configured AskExe support endpoint"),
11700
+ on_behalf_of_email: z88.string().email().optional().describe("ADMIN ONLY: file this request owned by another customer's license email; ignored unless caller holds the support admin token")
11580
11701
  }
11581
11702
  },
11582
11703
  async ({
@@ -11614,7 +11735,7 @@ function registerCreateBugReport(server) {
11614
11735
  const version = package_version ?? "unknown";
11615
11736
  let metricsSnapshot = "";
11616
11737
  try {
11617
- const { getOrchestrationMetrics, formatOrchestrationMetrics } = await import("./orchestration-events-O5P5NEKS.js");
11738
+ const { getOrchestrationMetrics, formatOrchestrationMetrics } = await import("./orchestration-events-KVNRNIPR.js");
11618
11739
  const sinceIso = new Date(Date.now() - 60 * 60 * 1e3).toISOString();
11619
11740
  const metrics = await getOrchestrationMetrics({ sinceIso });
11620
11741
  if (metrics.totalEvents > 0) {
@@ -11755,17 +11876,17 @@ Upstream status: ${upstreamStatus}`
11755
11876
  }
11756
11877
 
11757
11878
  // src/mcp/tools/create-feature-request.ts
11758
- import { z as z88 } from "zod";
11879
+ import { z as z89 } from "zod";
11759
11880
  import crypto5 from "crypto";
11760
11881
  import { mkdir as mkdir3, writeFile as writeFile3 } from "fs/promises";
11761
11882
  import path14 from "path";
11762
- var CATEGORY = z88.enum([
11883
+ var CATEGORY = z89.enum([
11763
11884
  "upstream_feature",
11764
11885
  "local_customization",
11765
11886
  "integration",
11766
11887
  "unclear"
11767
11888
  ]);
11768
- var PRIORITY = z88.enum(["p0", "p1", "p2", "p3"]);
11889
+ var PRIORITY = z89.enum(["p0", "p1", "p2", "p3"]);
11769
11890
  function slugify2(input) {
11770
11891
  return input.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 80) || "feature-request";
11771
11892
  }
@@ -11839,26 +11960,26 @@ function registerCreateFeatureRequest(server) {
11839
11960
  title: "Create Feature Request",
11840
11961
  description: "File a feature request for exe-os: upstream_feature (requires platform changes), local_customization (configurable in customer layers), integration (third-party), or unclear. Writes a local report, stores memory, and optionally sends to AskExe.",
11841
11962
  inputSchema: {
11842
- title: z88.string().min(3).describe("Short descriptive title"),
11963
+ title: z89.string().min(3).describe("Short descriptive title"),
11843
11964
  category: CATEGORY.describe(
11844
11965
  "upstream_feature = platform capability change; local_customization = configurable in customer layers; integration = third-party connector; unclear = needs product triage"
11845
11966
  ),
11846
11967
  priority: PRIORITY.default("p2").describe("p0 critical \u2192 p3 low"),
11847
- description: z88.string().min(10).describe("What capability is needed and why"),
11848
- use_case: z88.string().optional().describe("Concrete scenario where this feature would be used"),
11849
- current_workaround: z88.string().optional().describe("How the need is currently addressed, if at all"),
11850
- proposed_solution: z88.string().optional().describe("Suggested implementation approach"),
11851
- business_impact: z88.string().optional().describe("Impact on business/workflow if this ships"),
11852
- product: z88.string().optional().describe("Product this feature is for: exe-os, exe-create, exe-wiki, exe-gateway, exe-crm, exe-build. Defaults to exe-os."),
11853
- package_version: z88.string().optional().describe("Installed package version"),
11854
- project_name: z88.string().optional().describe("Project/customer context"),
11855
- implementing_branch: z88.string().optional().describe("Branch name or PR URL that implements this feature. Recorded on the request so future work can find existing implementations instead of redoing them (bug e324f244)."),
11856
- attachments: z88.array(z88.object({
11857
- filename: z88.string().min(1).describe("Filename for the attachment (e.g. mockup.txt, api-sketch.diff)"),
11858
- content: z88.string().min(1).describe("File content \u2014 plain text (diffs, logs, config snippets)")
11968
+ description: z89.string().min(10).describe("What capability is needed and why"),
11969
+ use_case: z89.string().optional().describe("Concrete scenario where this feature would be used"),
11970
+ current_workaround: z89.string().optional().describe("How the need is currently addressed, if at all"),
11971
+ proposed_solution: z89.string().optional().describe("Suggested implementation approach"),
11972
+ business_impact: z89.string().optional().describe("Impact on business/workflow if this ships"),
11973
+ product: z89.string().optional().describe("Product this feature is for: exe-os, exe-create, exe-wiki, exe-gateway, exe-crm, exe-build. Defaults to exe-os."),
11974
+ package_version: z89.string().optional().describe("Installed package version"),
11975
+ project_name: z89.string().optional().describe("Project/customer context"),
11976
+ implementing_branch: z89.string().optional().describe("Branch name or PR URL that implements this feature. Recorded on the request so future work can find existing implementations instead of redoing them (bug e324f244)."),
11977
+ attachments: z89.array(z89.object({
11978
+ filename: z89.string().min(1).describe("Filename for the attachment (e.g. mockup.txt, api-sketch.diff)"),
11979
+ content: z89.string().min(1).describe("File content \u2014 plain text (diffs, logs, config snippets)")
11859
11980
  })).optional().describe("File attachments: diffs, logs, config snippets, mockups (text-based)"),
11860
- send_upstream: z88.boolean().default(true).describe("Attempt to POST to configured AskExe support endpoint"),
11861
- on_behalf_of_email: z88.string().email().optional().describe("ADMIN ONLY: file this request owned by another customer's license email; ignored unless caller holds the support admin token")
11981
+ send_upstream: z89.boolean().default(true).describe("Attempt to POST to configured AskExe support endpoint"),
11982
+ on_behalf_of_email: z89.string().email().optional().describe("ADMIN ONLY: file this request owned by another customer's license email; ignored unless caller holds the support admin token")
11862
11983
  }
11863
11984
  },
11864
11985
  async ({
@@ -12014,10 +12135,10 @@ Upstream status: ${upstreamStatus}`
12014
12135
  }
12015
12136
 
12016
12137
  // src/mcp/tools/update-bug-report.ts
12017
- import { z as z89 } from "zod";
12138
+ import { z as z90 } from "zod";
12018
12139
  import { readdir, readFile as readFile2, writeFile as writeFile4 } from "fs/promises";
12019
12140
  import path15 from "path";
12020
- var STATUS = z89.enum(["open", "triaged", "fixed", "closed", "wontfix"]);
12141
+ var STATUS = z90.enum(["open", "triaged", "fixed", "closed", "wontfix"]);
12021
12142
  var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
12022
12143
  var FRONTMATTER_ID_RE = /^id:\s*([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\s*$/m;
12023
12144
  async function readReportId(filePath) {
@@ -12124,18 +12245,18 @@ function registerUpdateBugReport(server) {
12124
12245
  title: "Update Bug Report",
12125
12246
  description: "Update a previously filed bug report. As the filing customer (owner) you can add follow-up notes (notes/add_note), attach additional evidence (add_evidence), and request a reopen on a recurring fixed bug (reopen_request). AskExe support (with an admin token) can also move status: open \u2192 triaged \u2192 fixed \u2192 closed (or wontfix). Updates the local file, POSTs the change to AskExe support, and stores a memory.",
12126
12247
  inputSchema: {
12127
- id: z89.string().min(8).describe("Bug report UUID (full or 8-char prefix)"),
12248
+ id: z90.string().min(8).describe("Bug report UUID (full or 8-char prefix)"),
12128
12249
  status: STATUS.optional().describe(
12129
12250
  "New status (admin only): open, triaged, fixed, closed, wontfix. Owners cannot set this \u2014 use reopen_request instead."
12130
12251
  ),
12131
- fix_version: z89.string().optional().describe("Version that fixes this bug (admin only, e.g. '0.9.161')"),
12132
- product: z89.string().optional().describe("Re-label this bug's product (admin only): exe-os, exe-create, exe-wiki, exe-gateway, exe-crm, exe-build, exe-chat, exe-auth, exe-monitor, exe-db, exe-erp"),
12133
- notes: z89.string().optional().describe("Follow-up notes about the bug or status change"),
12134
- add_note: z89.string().optional().describe("Owner follow-up note (alias of notes)"),
12135
- add_evidence: z89.string().optional().describe("Additional evidence: logs, repro details, stack traces"),
12136
- reopen_request: z89.boolean().optional().describe("Request a reopen on a recurring fixed/closed bug"),
12137
- reopen_reason: z89.string().optional().describe("Why the bug should be reopened (recurring symptoms, etc.)"),
12138
- send_upstream: z89.boolean().default(true).describe("POST the change to AskExe support endpoint")
12252
+ fix_version: z90.string().optional().describe("Version that fixes this bug (admin only, e.g. '0.9.161')"),
12253
+ product: z90.string().optional().describe("Re-label this bug's product (admin only): exe-os, exe-create, exe-wiki, exe-gateway, exe-crm, exe-build, exe-chat, exe-auth, exe-monitor, exe-db, exe-erp"),
12254
+ notes: z90.string().optional().describe("Follow-up notes about the bug or status change"),
12255
+ add_note: z90.string().optional().describe("Owner follow-up note (alias of notes)"),
12256
+ add_evidence: z90.string().optional().describe("Additional evidence: logs, repro details, stack traces"),
12257
+ reopen_request: z90.boolean().optional().describe("Request a reopen on a recurring fixed/closed bug"),
12258
+ reopen_reason: z90.string().optional().describe("Why the bug should be reopened (recurring symptoms, etc.)"),
12259
+ send_upstream: z90.boolean().default(true).describe("POST the change to AskExe support endpoint")
12139
12260
  }
12140
12261
  },
12141
12262
  async ({ id, status: status2, fix_version, product, notes, add_note, add_evidence, reopen_request, reopen_reason, send_upstream }) => {
@@ -12259,10 +12380,10 @@ Upstream status: ${upstreamStatus}`
12259
12380
  }
12260
12381
 
12261
12382
  // src/mcp/tools/update-feature-request.ts
12262
- import { z as z90 } from "zod";
12383
+ import { z as z91 } from "zod";
12263
12384
  import { readdir as readdir2, readFile as readFile3, writeFile as writeFile5 } from "fs/promises";
12264
12385
  import path16 from "path";
12265
- var STATUS2 = z90.enum(["open", "planned", "in_progress", "shipped", "closed", "wontdo"]);
12386
+ var STATUS2 = z91.enum(["open", "planned", "in_progress", "shipped", "closed", "wontdo"]);
12266
12387
  async function findRequestFile(id) {
12267
12388
  const dir = path16.join(EXE_AI_DIR, "feature-requests");
12268
12389
  try {
@@ -12322,11 +12443,11 @@ function registerUpdateFeatureRequest(server) {
12322
12443
  title: "Update Feature Request",
12323
12444
  description: "Update the status of a previously filed feature request. Updates local file, POSTs change to AskExe support, and stores a memory. Status flow: open \u2192 planned \u2192 in_progress \u2192 shipped \u2192 closed (or wontdo at any point).",
12324
12445
  inputSchema: {
12325
- id: z90.string().min(8).describe("Feature request UUID (full or 8-char prefix)"),
12446
+ id: z91.string().min(8).describe("Feature request UUID (full or 8-char prefix)"),
12326
12447
  status: STATUS2.describe("New status: open, planned, in_progress, shipped, closed, wontdo"),
12327
- shipped_version: z90.string().optional().describe("Version that ships this feature (e.g. '0.9.161')"),
12328
- notes: z90.string().optional().describe("Notes about the status change"),
12329
- send_upstream: z90.boolean().default(true).describe("POST status change to AskExe support endpoint")
12448
+ shipped_version: z91.string().optional().describe("Version that ships this feature (e.g. '0.9.161')"),
12449
+ notes: z91.string().optional().describe("Notes about the status change"),
12450
+ send_upstream: z91.boolean().default(true).describe("POST status change to AskExe support endpoint")
12330
12451
  }
12331
12452
  },
12332
12453
  async ({ id, status: status2, shipped_version, notes, send_upstream }) => {
@@ -12398,7 +12519,7 @@ Upstream status: ${upstreamStatus}`
12398
12519
  }
12399
12520
 
12400
12521
  // src/mcp/tools/support.ts
12401
- import { z as z91 } from "zod";
12522
+ import { z as z92 } from "zod";
12402
12523
  function formatRows(rows, mode) {
12403
12524
  const lines = [`exe-os support ${mode}`, ""];
12404
12525
  for (const row of rows) {
@@ -12439,7 +12560,7 @@ function registerSupportTools(server) {
12439
12560
  title: "Support Test",
12440
12561
  description: "End-to-end support intake smoke test. Files a clearly marked test report upstream and auto-closes it on AskExe machines with admin credentials.",
12441
12562
  inputSchema: {
12442
- project: z91.string().default("support-smoke").describe("Customer/project name, e.g. hygo")
12563
+ project: z92.string().default("support-smoke").describe("Customer/project name, e.g. hygo")
12443
12564
  }
12444
12565
  },
12445
12566
  async ({ project }) => {
@@ -12457,9 +12578,9 @@ function registerSupportTools(server) {
12457
12578
  title: "My Bug Reports",
12458
12579
  description: "List bug reports you've filed, scoped to your license. Shows status (open/triaged/fixed/closed), severity, and fixed_version so you know when to update.",
12459
12580
  inputSchema: {
12460
- status: z91.enum(["all", "open", "triaged", "fixed", "closed", "wontfix"]).default("all").describe("Filter by status. Default: all"),
12461
- limit: z91.number().min(1).max(500).default(25).describe("Max results per page (1-500)"),
12462
- offset: z91.number().min(0).default(0).describe("Number of results to skip for pagination. Use next_offset from a prior response.")
12581
+ status: z92.enum(["all", "open", "triaged", "fixed", "closed", "wontfix"]).default("all").describe("Filter by status. Default: all"),
12582
+ limit: z92.number().min(1).max(500).default(25).describe("Max results per page (1-500)"),
12583
+ offset: z92.number().min(0).default(0).describe("Number of results to skip for pagination. Use next_offset from a prior response.")
12463
12584
  }
12464
12585
  },
12465
12586
  async ({ status: status2, limit, offset }) => {
@@ -12529,9 +12650,9 @@ function registerSupportTools(server) {
12529
12650
  title: "My Feature Requests",
12530
12651
  description: "List feature requests you've filed, scoped to your license. Shows status (open/planned/in_progress/shipped/closed), priority, and shipped_version so you know when to update.",
12531
12652
  inputSchema: {
12532
- status: z91.enum(["all", "open", "planned", "in_progress", "shipped", "closed", "wontdo"]).default("all").describe("Filter by status. Default: all"),
12533
- limit: z91.number().min(1).max(500).default(25).describe("Max results per page (1-500)"),
12534
- offset: z91.number().min(0).default(0).describe("Number of results to skip for pagination. Use next_offset from a prior response.")
12653
+ status: z92.enum(["all", "open", "planned", "in_progress", "shipped", "closed", "wontdo"]).default("all").describe("Filter by status. Default: all"),
12654
+ limit: z92.number().min(1).max(500).default(25).describe("Max results per page (1-500)"),
12655
+ offset: z92.number().min(0).default(0).describe("Number of results to skip for pagination. Use next_offset from a prior response.")
12535
12656
  }
12536
12657
  },
12537
12658
  async ({ status: status2, limit, offset }) => {
@@ -12602,8 +12723,8 @@ function registerSupportTools(server) {
12602
12723
  title: "My Reviews",
12603
12724
  description: "List reviews you've filed, scoped to your license. Shows status (open/in_review/approved/merged/closed/rejected), priority, and resolution.",
12604
12725
  inputSchema: {
12605
- status: z91.enum(["all", "open", "in_review", "approved", "merged", "closed", "rejected"]).default("all").describe("Filter by status. Default: all"),
12606
- limit: z91.number().min(1).max(50).default(25).describe("Max results")
12726
+ status: z92.enum(["all", "open", "in_review", "approved", "merged", "closed", "rejected"]).default("all").describe("Filter by status. Default: all"),
12727
+ limit: z92.number().min(1).max(50).default(25).describe("Max results")
12607
12728
  }
12608
12729
  },
12609
12730
  async ({ status: status2, limit }) => {
@@ -12677,7 +12798,7 @@ import { existsSync as existsSync8 } from "fs";
12677
12798
  import { dirname, join as join3, parse as pathParse } from "path";
12678
12799
  import { fileURLToPath as fileURLToPath2 } from "url";
12679
12800
  import { promisify as promisify2 } from "util";
12680
- import { z as z92 } from "zod";
12801
+ import { z as z93 } from "zod";
12681
12802
  function findPackageRoot() {
12682
12803
  let dir = dirname(fileURLToPath2(import.meta.url));
12683
12804
  const { root } = pathParse(dir);
@@ -12753,12 +12874,12 @@ function registerCliParityTools(server) {
12753
12874
  title: "Doctor",
12754
12875
  description: "Run exe-os doctor audit. Defaults to read-only diagnostics; optional dry-run/fix flags mirror CLI.",
12755
12876
  inputSchema: {
12756
- agent: z92.string().optional(),
12757
- project: z92.string().optional(),
12758
- verbose: z92.boolean().default(false),
12759
- conflicts: z92.boolean().default(false),
12760
- dry_run: z92.boolean().default(false),
12761
- fix: z92.boolean().default(false)
12877
+ agent: z93.string().optional(),
12878
+ project: z93.string().optional(),
12879
+ verbose: z93.boolean().default(false),
12880
+ conflicts: z93.boolean().default(false),
12881
+ dry_run: z93.boolean().default(false),
12882
+ fix: z93.boolean().default(false)
12762
12883
  }
12763
12884
  }, async ({ agent, project, verbose, conflicts, dry_run, fix }) => {
12764
12885
  const args = [];
@@ -12775,9 +12896,9 @@ function registerCliParityTools(server) {
12775
12896
  title: "Rename Employee",
12776
12897
  description: "Rename an employee using the same path as `exe-os rename <old> <new>`. Use for customer roster/identity renames.",
12777
12898
  inputSchema: {
12778
- old_name: z92.string().min(1),
12779
- new_name: z92.string().min(1),
12780
- dry_run: z92.boolean().default(false)
12899
+ old_name: z93.string().min(1),
12900
+ new_name: z93.string().min(1),
12901
+ dry_run: z93.boolean().default(false)
12781
12902
  }
12782
12903
  }, async ({ old_name, new_name, dry_run }) => {
12783
12904
  if (dry_run) {
@@ -12790,7 +12911,7 @@ function registerCliParityTools(server) {
12790
12911
  server.registerTool("status_brief", {
12791
12912
  title: "Status Brief",
12792
12913
  description: "Return current employee/tmux status. Mirrors `exe-status` and supports optional deep view for one employee.",
12793
- inputSchema: { employee: z92.string().optional() }
12914
+ inputSchema: { employee: z93.string().optional() }
12794
12915
  }, async ({ employee }) => {
12795
12916
  const text5 = await status(employee);
12796
12917
  return result2(text5, { ok: true, employee: employee ?? null });
@@ -12798,7 +12919,7 @@ function registerCliParityTools(server) {
12798
12919
  server.registerTool("pending_work_summary", {
12799
12920
  title: "Pending Work Summary",
12800
12921
  description: "Return pending reviews, messages, and notifications using the same summaries as the CLI tools.",
12801
- inputSchema: { agent: z92.string().optional() }
12922
+ inputSchema: { agent: z93.string().optional() }
12802
12923
  }, async ({ agent }) => {
12803
12924
  const settled = await Promise.allSettled([
12804
12925
  runDistScript("exe-pending-reviews", [], 3e4),
@@ -12834,7 +12955,7 @@ function registerCliParityTools(server) {
12834
12955
  server.registerTool("key_rotation_preflight", {
12835
12956
  title: "Key Rotation Preflight",
12836
12957
  description: "Dry-run key rotation/update preflight. No destructive changes.",
12837
- inputSchema: { mode: z92.enum(["rotate", "update"]).default("rotate") }
12958
+ inputSchema: { mode: z93.enum(["rotate", "update"]).default("rotate") }
12838
12959
  }, async ({ mode }) => {
12839
12960
  const out = await runCommand("exe-os", ["key", mode, "--dry-run"], 6e4);
12840
12961
  return result2(out.text, { ok: out.ok, command: out.command, mode }, !out.ok);
@@ -12860,11 +12981,11 @@ function registerCliParityTools(server) {
12860
12981
  title: "Stack Update Check",
12861
12982
  description: "Plan/check a customer stack update without applying Docker changes. Mirrors `exe-os stack-update --check`.",
12862
12983
  inputSchema: {
12863
- target: z92.string().optional(),
12864
- manifest: z92.string().optional(),
12865
- compose_file: z92.string().optional(),
12866
- env_file: z92.string().optional(),
12867
- deployment_persona: z92.enum(["customer", "askexe-control-plane"]).default("customer")
12984
+ target: z93.string().optional(),
12985
+ manifest: z93.string().optional(),
12986
+ compose_file: z93.string().optional(),
12987
+ env_file: z93.string().optional(),
12988
+ deployment_persona: z93.enum(["customer", "askexe-control-plane"]).default("customer")
12868
12989
  }
12869
12990
  }, async ({ target, manifest, compose_file, env_file, deployment_persona }) => {
12870
12991
  const args = ["stack-update", "--check", "--deployment-persona", deployment_persona];
@@ -12883,7 +13004,7 @@ function registerCliParityTools(server) {
12883
13004
  const out = await runCommand("exe-os", ["cloud", "status"], 45e3);
12884
13005
  let healthSection = "";
12885
13006
  try {
12886
- const { getRetrievalHealth: getRetrievalHealth2, formatDegradations: formatDegradations2 } = await import("./retrieval-health-ULVVOIPL.js");
13007
+ const { getRetrievalHealth: getRetrievalHealth2, formatDegradations: formatDegradations2 } = await import("./retrieval-health-YJ7CXYVD.js");
12887
13008
  const h = await getRetrievalHealth2();
12888
13009
  const lines = [
12889
13010
  "",
@@ -12918,7 +13039,7 @@ function registerCliParityTools(server) {
12918
13039
  }
12919
13040
 
12920
13041
  // src/mcp/tools/code-context.ts
12921
- import { z as z93 } from "zod";
13042
+ import { z as z94 } from "zod";
12922
13043
  function errorResult10(text5) {
12923
13044
  return { content: [{ type: "text", text: text5 }], isError: true };
12924
13045
  }
@@ -12930,20 +13051,20 @@ function registerCodeContext(server) {
12930
13051
  title: "Code Context",
12931
13052
  description: "Persistent codebase context engine with semantic vector search. One consolidated tool to avoid MCP bloat. Actions: index (structural only), index_embed (structural + vector embeddings), search (semantic+lexical hybrid), trace, blast_radius, stats. Search uses RRF fusion of embeddings (cosine similarity) + lexical scoring. Falls back to lexical if daemon unavailable or embeddings are off.",
12932
13053
  inputSchema: {
12933
- action: z93.enum(["index", "index_embed", "search", "trace", "blast_radius", "stats"]).describe("Code context operation. index_embed = index + generate embeddings for semantic search."),
12934
- project_root: z93.string().optional().describe("Repository root. Defaults to current working directory."),
12935
- query: z93.string().optional().describe("Natural language search query (e.g. 'authentication logic', 'database migration'). Semantic search finds conceptual matches, not just keywords."),
12936
- symbol: z93.string().optional().describe("Symbol/function/class/type name for trace or blast_radius"),
12937
- file_path: z93.string().optional().describe("File path for blast_radius"),
12938
- force: z93.boolean().optional().describe("Force rebuild before answering"),
12939
- limit: z93.coerce.number().int().min(1).max(100).optional().describe("Max results"),
12940
- offset: z93.coerce.number().int().min(0).optional().describe("Search pagination offset"),
12941
- refresh_index: z93.boolean().optional().describe("Refresh/rebuild index before searching"),
12942
- languages: z93.array(z93.string()).optional().describe('Language filters, e.g. ["python", "typescript"]'),
12943
- paths: z93.array(z93.string()).optional().describe("Path/glob filters"),
12944
- depth: z93.coerce.number().int().min(1).max(5).optional().describe("Dependent traversal depth for blast_radius"),
12945
- max_files: z93.coerce.number().int().min(1).max(1e4).optional().describe("Max code files to index"),
12946
- lexical_only: z93.boolean().optional().describe("Force lexical-only search (skip vector similarity). Default: false \u2014 uses semantic hybrid search.")
13054
+ action: z94.enum(["index", "index_embed", "search", "trace", "blast_radius", "stats"]).describe("Code context operation. index_embed = index + generate embeddings for semantic search."),
13055
+ project_root: z94.string().optional().describe("Repository root. Defaults to current working directory."),
13056
+ query: z94.string().optional().describe("Natural language search query (e.g. 'authentication logic', 'database migration'). Semantic search finds conceptual matches, not just keywords."),
13057
+ symbol: z94.string().optional().describe("Symbol/function/class/type name for trace or blast_radius"),
13058
+ file_path: z94.string().optional().describe("File path for blast_radius"),
13059
+ force: z94.boolean().optional().describe("Force rebuild before answering"),
13060
+ limit: z94.coerce.number().int().min(1).max(100).optional().describe("Max results"),
13061
+ offset: z94.coerce.number().int().min(0).optional().describe("Search pagination offset"),
13062
+ refresh_index: z94.boolean().optional().describe("Refresh/rebuild index before searching"),
13063
+ languages: z94.array(z94.string()).optional().describe('Language filters, e.g. ["python", "typescript"]'),
13064
+ paths: z94.array(z94.string()).optional().describe("Path/glob filters"),
13065
+ depth: z94.coerce.number().int().min(1).max(5).optional().describe("Dependent traversal depth for blast_radius"),
13066
+ max_files: z94.coerce.number().int().min(1).max(1e4).optional().describe("Max code files to index"),
13067
+ lexical_only: z94.boolean().optional().describe("Force lexical-only search (skip vector similarity). Default: false \u2014 uses semantic hybrid search.")
12947
13068
  }
12948
13069
  }, async ({ action, project_root, query, symbol, file_path, force, limit, offset, refresh_index, languages, paths, depth, max_files, lexical_only }) => {
12949
13070
  const opts = { projectRoot: project_root, force, maxFiles: max_files };
@@ -12951,7 +13072,7 @@ function registerCodeContext(server) {
12951
13072
  const index = buildCodeContextIndex(opts);
12952
13073
  let graphExtract;
12953
13074
  try {
12954
- const { autoExtractGraphEntities } = await import("./graph-auto-extract-AJZUV3PO.js");
13075
+ const { autoExtractGraphEntities } = await import("./graph-auto-extract-I7QL2TY5.js");
12955
13076
  graphExtract = await autoExtractGraphEntities(opts.projectRoot);
12956
13077
  } catch {
12957
13078
  }
@@ -13026,13 +13147,13 @@ function registerCodeContext(server) {
13026
13147
  }
13027
13148
 
13028
13149
  // src/mcp/tools/support-inbox.ts
13029
- import { z as z94 } from "zod";
13150
+ import { z as z95 } from "zod";
13030
13151
  import { readFileSync as readFileSync7 } from "fs";
13031
13152
  import { join as join4 } from "path";
13032
13153
  import { homedir as homedir4 } from "os";
13033
13154
  var DEFAULT_ENDPOINT = "https://api.askexe.com/admin/support/bug-reports";
13034
13155
  var DEFAULT_OWNER_ENDPOINT = "https://api.askexe.com/v1/support/bug-reports";
13035
- var STATUS3 = z94.enum(["open", "triaged", "fixed", "closed", "wontfix"]);
13156
+ var STATUS3 = z95.enum(["open", "triaged", "fixed", "closed", "wontfix"]);
13036
13157
  function adminToken() {
13037
13158
  if (process.env.ASKEXE_SUPPORT_ADMIN_TOKEN) return process.env.ASKEXE_SUPPORT_ADMIN_TOKEN;
13038
13159
  if (process.env.EXE_SUPPORT_ADMIN_TOKEN) return process.env.EXE_SUPPORT_ADMIN_TOKEN;
@@ -13139,9 +13260,9 @@ function registerListBugReports(server) {
13139
13260
  title: "List Bug Reports",
13140
13261
  description: "AskExe-internal only: list incoming customer bug reports from the support inbox.",
13141
13262
  inputSchema: {
13142
- status: z94.enum(["all", "open", "triaged", "fixed", "closed", "wontfix"]).default("open"),
13143
- severity: z94.enum(["p0", "p1", "p2", "p3"]).optional(),
13144
- limit: z94.number().int().min(1).max(100).default(25)
13263
+ status: z95.enum(["all", "open", "triaged", "fixed", "closed", "wontfix"]).default("open"),
13264
+ severity: z95.enum(["p0", "p1", "p2", "p3"]).optional(),
13265
+ limit: z95.number().int().min(1).max(100).default(25)
13145
13266
  }
13146
13267
  },
13147
13268
  async ({ status: status2, severity, limit }) => {
@@ -13171,7 +13292,7 @@ function registerGetBugReport(server) {
13171
13292
  {
13172
13293
  title: "Get Bug Report",
13173
13294
  description: "AskExe-internal only: fetch one customer bug report with full markdown payload and comments thread.",
13174
- inputSchema: { id: z94.string().min(8) }
13295
+ inputSchema: { id: z95.string().min(8) }
13175
13296
  },
13176
13297
  async ({ id }) => {
13177
13298
  const data = await requestJson(`${endpoint()}/${encodeURIComponent(id)}`);
@@ -13188,8 +13309,8 @@ function registerAddBugReportComment(server) {
13188
13309
  title: "Add Bug Report Comment",
13189
13310
  description: "AskExe-internal only: append a comment to a bug report's thread (POST /comments). Non-destructive \u2014 does not touch triage_notes or status.",
13190
13311
  inputSchema: {
13191
- id: z94.string().min(8),
13192
- comment: z94.string().min(1).describe("Comment text to append to the bug report thread")
13312
+ id: z95.string().min(8),
13313
+ comment: z95.string().min(1).describe("Comment text to append to the bug report thread")
13193
13314
  }
13194
13315
  },
13195
13316
  async ({ id, comment }) => {
@@ -13207,7 +13328,7 @@ function registerGetBugReportComments(server) {
13207
13328
  {
13208
13329
  title: "Get Bug Report Comments",
13209
13330
  description: "AskExe-internal only: list the comments thread on a bug report (GET /comments).",
13210
- inputSchema: { id: z94.string().min(8) }
13331
+ inputSchema: { id: z95.string().min(8) }
13211
13332
  },
13212
13333
  async ({ id }) => {
13213
13334
  const data = await commentRequestJson(id);
@@ -13222,14 +13343,14 @@ function registerTriageBugReport(server) {
13222
13343
  title: "Triage Bug Report",
13223
13344
  description: "AskExe-internal only: update bug report status and link task/commit/release metadata.",
13224
13345
  inputSchema: {
13225
- id: z94.string().min(8),
13346
+ id: z95.string().min(8),
13226
13347
  status: STATUS3.optional(),
13227
- triage_notes: z94.string().optional(),
13228
- add_note: z94.string().optional().describe("Append a timestamped progress note without changing status or replacing triage_notes"),
13229
- linked_task_id: z94.string().optional(),
13230
- linked_commit: z94.string().optional(),
13231
- fixed_version: z94.string().optional(),
13232
- product: z94.string().optional().describe("Re-label this bug's product: exe-os, exe-create, exe-wiki, exe-gateway, exe-crm, exe-build, exe-chat, exe-auth, exe-monitor, exe-db, exe-erp")
13348
+ triage_notes: z95.string().optional(),
13349
+ add_note: z95.string().optional().describe("Append a timestamped progress note without changing status or replacing triage_notes"),
13350
+ linked_task_id: z95.string().optional(),
13351
+ linked_commit: z95.string().optional(),
13352
+ fixed_version: z95.string().optional(),
13353
+ product: z95.string().optional().describe("Re-label this bug's product: exe-os, exe-create, exe-wiki, exe-gateway, exe-crm, exe-build, exe-chat, exe-auth, exe-monitor, exe-db, exe-erp")
13233
13354
  }
13234
13355
  },
13235
13356
  async ({ id, status: status2, triage_notes, add_note, linked_task_id, linked_commit, fixed_version, product }) => {
@@ -13242,7 +13363,7 @@ function registerTriageBugReport(server) {
13242
13363
  }
13243
13364
  );
13244
13365
  }
13245
- var FEATURE_STATUS = z94.enum(["open", "planned", "in_progress", "shipped", "closed", "wontdo"]);
13366
+ var FEATURE_STATUS = z95.enum(["open", "planned", "in_progress", "shipped", "closed", "wontdo"]);
13246
13367
  function featureEndpoint() {
13247
13368
  return endpoint().replace(/\/bug-reports\/?$/, "/feature-requests");
13248
13369
  }
@@ -13253,9 +13374,9 @@ function registerListFeatureRequests(server) {
13253
13374
  title: "List Feature Requests",
13254
13375
  description: "AskExe-internal only: list incoming customer feature requests from the support inbox.",
13255
13376
  inputSchema: {
13256
- status: z94.enum(["all", "open", "planned", "in_progress", "shipped", "closed", "wontdo"]).default("open"),
13257
- priority: z94.enum(["p0", "p1", "p2", "p3"]).optional(),
13258
- limit: z94.number().int().min(1).max(100).default(25)
13377
+ status: z95.enum(["all", "open", "planned", "in_progress", "shipped", "closed", "wontdo"]).default("open"),
13378
+ priority: z95.enum(["p0", "p1", "p2", "p3"]).optional(),
13379
+ limit: z95.number().int().min(1).max(100).default(25)
13259
13380
  }
13260
13381
  },
13261
13382
  async ({ status: status2, priority, limit }) => {
@@ -13274,7 +13395,7 @@ function registerGetFeatureRequest(server) {
13274
13395
  {
13275
13396
  title: "Get Feature Request",
13276
13397
  description: "AskExe-internal only: fetch one customer feature request with full payload.",
13277
- inputSchema: { id: z94.string().min(8) }
13398
+ inputSchema: { id: z95.string().min(8) }
13278
13399
  },
13279
13400
  async ({ id }) => {
13280
13401
  const data = await requestJson(`${featureEndpoint()}/${encodeURIComponent(id)}`);
@@ -13289,12 +13410,12 @@ function registerTriageFeatureRequest(server) {
13289
13410
  title: "Triage Feature Request",
13290
13411
  description: "AskExe-internal only: update feature request status, response notes, and version metadata.",
13291
13412
  inputSchema: {
13292
- id: z94.string().min(8),
13413
+ id: z95.string().min(8),
13293
13414
  status: FEATURE_STATUS.optional(),
13294
- response_notes: z94.string().optional(),
13295
- add_note: z94.string().optional().describe("Append a timestamped progress note without changing status or replacing response_notes"),
13296
- target_version: z94.string().optional(),
13297
- shipped_version: z94.string().optional()
13415
+ response_notes: z95.string().optional(),
13416
+ add_note: z95.string().optional().describe("Append a timestamped progress note without changing status or replacing response_notes"),
13417
+ target_version: z95.string().optional(),
13418
+ shipped_version: z95.string().optional()
13298
13419
  }
13299
13420
  },
13300
13421
  async ({ id, status: status2, response_notes, add_note, target_version, shipped_version }) => {
@@ -13307,7 +13428,7 @@ function registerTriageFeatureRequest(server) {
13307
13428
  }
13308
13429
  );
13309
13430
  }
13310
- var REVIEW_STATUS = z94.enum(["open", "in_review", "approved", "merged", "closed", "rejected"]);
13431
+ var REVIEW_STATUS = z95.enum(["open", "in_review", "approved", "merged", "closed", "rejected"]);
13311
13432
  function reviewEndpoint() {
13312
13433
  return endpoint().replace(/\/bug-reports\/?$/, "/reviews");
13313
13434
  }
@@ -13318,9 +13439,9 @@ function registerListReviews(server) {
13318
13439
  title: "List Reviews",
13319
13440
  description: "AskExe-internal only: list incoming review requests from the support inbox.",
13320
13441
  inputSchema: {
13321
- status: z94.enum(["all", "open", "in_review", "approved", "merged", "closed", "rejected"]).default("open"),
13322
- priority: z94.enum(["p0", "p1", "p2", "p3"]).optional(),
13323
- limit: z94.number().int().min(1).max(100).default(25)
13442
+ status: z95.enum(["all", "open", "in_review", "approved", "merged", "closed", "rejected"]).default("open"),
13443
+ priority: z95.enum(["p0", "p1", "p2", "p3"]).optional(),
13444
+ limit: z95.number().int().min(1).max(100).default(25)
13324
13445
  }
13325
13446
  },
13326
13447
  async ({ status: status2, priority, limit }) => {
@@ -13339,7 +13460,7 @@ function registerGetReview(server) {
13339
13460
  {
13340
13461
  title: "Get Review",
13341
13462
  description: "AskExe-internal only: fetch one review with full payload.",
13342
- inputSchema: { id: z94.string().min(8) }
13463
+ inputSchema: { id: z95.string().min(8) }
13343
13464
  },
13344
13465
  async ({ id }) => {
13345
13466
  const data = await requestJson(`${reviewEndpoint()}/${encodeURIComponent(id)}`);
@@ -13354,12 +13475,12 @@ function registerTriageReview(server) {
13354
13475
  title: "Triage Review",
13355
13476
  description: "AskExe-internal only: update review status, response notes, and resolution.",
13356
13477
  inputSchema: {
13357
- id: z94.string().min(8),
13478
+ id: z95.string().min(8),
13358
13479
  status: REVIEW_STATUS.optional(),
13359
- response_notes: z94.string().optional(),
13360
- add_note: z94.string().optional().describe("Append a timestamped progress note without changing status or replacing response_notes"),
13361
- resolution: z94.string().optional(),
13362
- pr_url: z94.string().optional()
13480
+ response_notes: z95.string().optional(),
13481
+ add_note: z95.string().optional().describe("Append a timestamped progress note without changing status or replacing response_notes"),
13482
+ resolution: z95.string().optional(),
13483
+ pr_url: z95.string().optional()
13363
13484
  }
13364
13485
  },
13365
13486
  async ({ id, status: status2, response_notes, add_note, resolution, pr_url }) => {
@@ -13373,7 +13494,7 @@ function registerTriageReview(server) {
13373
13494
  }
13374
13495
 
13375
13496
  // src/mcp/tools/decision.ts
13376
- import { z as z95 } from "zod";
13497
+ import { z as z96 } from "zod";
13377
13498
  function buildHandlers6() {
13378
13499
  const tools = /* @__PURE__ */ new Map();
13379
13500
  const fake = {
@@ -13397,12 +13518,12 @@ function registerDecision(server) {
13397
13518
  title: "Decision",
13398
13519
  description: "Store or retrieve authoritative decisions. Actions: store (persist a decision by domain), get (look up a decision by domain/query).",
13399
13520
  inputSchema: {
13400
- action: z95.enum(["store", "get"]).describe("Decision operation"),
13401
- domain: z95.string().optional().describe("Decision domain (e.g. 'architecture', 'hiring')"),
13402
- decision: z95.string().optional().describe("Decision text for action=store"),
13403
- rationale: z95.string().optional().describe("Why this decision was made (action=store)"),
13404
- query: z95.string().optional().describe("Search query for action=get"),
13405
- limit: z95.coerce.number().optional().describe("Max results for action=get")
13521
+ action: z96.enum(["store", "get"]).describe("Decision operation"),
13522
+ domain: z96.string().optional().describe("Decision domain (e.g. 'architecture', 'hiring')"),
13523
+ decision: z96.string().optional().describe("Decision text for action=store"),
13524
+ rationale: z96.string().optional().describe("Why this decision was made (action=store)"),
13525
+ query: z96.string().optional().describe("Search query for action=get"),
13526
+ limit: z96.coerce.number().optional().describe("Max results for action=get")
13406
13527
  }
13407
13528
  },
13408
13529
  async (input, extra) => {
@@ -13418,7 +13539,7 @@ function registerDecision(server) {
13418
13539
  }
13419
13540
 
13420
13541
  // src/mcp/tools/session.ts
13421
- import { z as z96 } from "zod";
13542
+ import { z as z97 } from "zod";
13422
13543
  function buildHandlers7() {
13423
13544
  const tools = /* @__PURE__ */ new Map();
13424
13545
  const fake = {
@@ -13466,17 +13587,17 @@ function registerSession(server) {
13466
13587
  title: "Session",
13467
13588
  description: "Session tools. Actions: events (session event log), last_response (most recent assistant text), set_mode (enter explore or task mode), get_mode (query current mode and active explore sessions).",
13468
13589
  inputSchema: {
13469
- action: z96.enum(["events", "last_response", "set_mode", "get_mode"]).describe("Session operation"),
13470
- session_id: z96.string().optional().describe("Session ID for action=events"),
13471
- limit: z96.coerce.number().optional().describe("Max events for action=events"),
13590
+ action: z97.enum(["events", "last_response", "set_mode", "get_mode"]).describe("Session operation"),
13591
+ session_id: z97.string().optional().describe("Session ID for action=events"),
13592
+ limit: z97.coerce.number().optional().describe("Max events for action=events"),
13472
13593
  // set_mode params
13473
- mode: z96.enum(["explore", "task"]).optional().describe(
13594
+ mode: z97.enum(["explore", "task"]).optional().describe(
13474
13595
  "Mode for action=set_mode. 'explore' = divergent, no deliverable, nudges suppressed. 'task' = default convergent behaviour (resets any active explore session)."
13475
13596
  ),
13476
- duration_minutes: z96.number().optional().describe(
13597
+ duration_minutes: z97.number().optional().describe(
13477
13598
  `How long to stay in explore mode in minutes (action=set_mode, mode=explore). Default: ${DEFAULT_EXPLORE_DURATION_MS / 6e4} minutes (1 hour).`
13478
13599
  ),
13479
- notes: z96.string().optional().describe("Optional notes about this explore session (action=set_mode)")
13600
+ notes: z97.string().optional().describe("Optional notes about this explore session (action=set_mode)")
13480
13601
  }
13481
13602
  },
13482
13603
  async (input, extra) => {
@@ -13541,14 +13662,14 @@ All active explore sessions (${active.length}):
13541
13662
  }
13542
13663
 
13543
13664
  // src/mcp/tools/support-consolidated.ts
13544
- import { z as z98 } from "zod";
13665
+ import { z as z99 } from "zod";
13545
13666
 
13546
13667
  // src/mcp/tools/create-review.ts
13547
- import { z as z97 } from "zod";
13668
+ import { z as z98 } from "zod";
13548
13669
  import crypto6 from "crypto";
13549
13670
  import { mkdir as mkdir4, writeFile as writeFile6 } from "fs/promises";
13550
13671
  import path17 from "path";
13551
- var PRIORITY2 = z97.enum(["p0", "p1", "p2", "p3"]);
13672
+ var PRIORITY2 = z98.enum(["p0", "p1", "p2", "p3"]);
13552
13673
  function slugify3(input) {
13553
13674
  return input.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 80) || "review";
13554
13675
  }
@@ -13614,15 +13735,15 @@ function registerCreateReview(server) {
13614
13735
  title: "Create Review",
13615
13736
  description: "File a review request (code review, self-improvement findings, PR review needs). Writes a local report, stores memory, and optionally sends to AskExe support.",
13616
13737
  inputSchema: {
13617
- title: z97.string().min(3).describe("Short descriptive title"),
13618
- description: z97.string().optional().describe("What needs review and why"),
13738
+ title: z98.string().min(3).describe("Short descriptive title"),
13739
+ description: z98.string().optional().describe("What needs review and why"),
13619
13740
  priority: PRIORITY2.default("p1").describe("p0 critical -> p3 low"),
13620
- source: z97.string().optional().describe("Source: self-improve, manual, ci, etc."),
13621
- pr_url: z97.string().optional().describe("PR URL if applicable"),
13622
- product: z97.string().optional().describe("Product: exe-os (default), exe-create, exe-wiki, exe-gateway, exe-crm, exe-build"),
13623
- package_version: z97.string().optional().describe("Installed package version"),
13624
- project_name: z97.string().optional().describe("Project/customer context"),
13625
- send_upstream: z97.boolean().default(false).describe("Attempt to POST to configured AskExe support endpoint (disabled by default \u2014 review route not yet live)")
13741
+ source: z98.string().optional().describe("Source: self-improve, manual, ci, etc."),
13742
+ pr_url: z98.string().optional().describe("PR URL if applicable"),
13743
+ product: z98.string().optional().describe("Product: exe-os (default), exe-create, exe-wiki, exe-gateway, exe-crm, exe-build"),
13744
+ package_version: z98.string().optional().describe("Installed package version"),
13745
+ project_name: z98.string().optional().describe("Project/customer context"),
13746
+ send_upstream: z98.boolean().default(false).describe("Attempt to POST to configured AskExe support endpoint (disabled by default \u2014 review route not yet live)")
13626
13747
  }
13627
13748
  },
13628
13749
  async ({
@@ -13778,7 +13899,7 @@ function registerSupportConsolidated(server) {
13778
13899
  title: "Support",
13779
13900
  description: "Bug reports, feature requests, reviews, and support system. Actions: create_bug, create_feature, create_review, update_bug, update_feature, list_my_bugs, list_my_features, list_my_reviews, list_bugs, get_bug, add_comment, get_comments, triage_bug, list_features, get_feature, triage_feature, list_reviews, get_review, triage_review, health, test. Use 'product' param to file bugs for any AskExe product.",
13780
13901
  inputSchema: {
13781
- action: z98.enum([
13902
+ action: z99.enum([
13782
13903
  "create_bug",
13783
13904
  "create_feature",
13784
13905
  "create_review",
@@ -13801,40 +13922,40 @@ function registerSupportConsolidated(server) {
13801
13922
  "health",
13802
13923
  "test"
13803
13924
  ]).describe("Support operation"),
13804
- title: z98.string().optional().describe("Bug/feature title"),
13805
- description: z98.string().optional().describe("Bug/feature description"),
13806
- steps_to_reproduce: z98.string().optional().describe("Steps to reproduce (bugs)"),
13807
- expected_behavior: z98.string().optional().describe("Expected behavior (bugs)"),
13808
- actual_behavior: z98.string().optional().describe("Actual behavior (bugs)"),
13809
- severity: z98.string().optional().describe("Severity: p0/p1/p2/p3"),
13810
- product: z98.string().optional().describe("Product (create_bug default exe-os; also re-labels a bug via update_bug, admin only): exe-os, exe-create, exe-wiki, exe-gateway, exe-crm, exe-build, exe-chat, exe-auth, exe-monitor, exe-db, exe-erp"),
13811
- use_case: z98.string().optional().describe("Use case (features)"),
13812
- proposed_solution: z98.string().optional().describe("Proposed solution (features)"),
13813
- priority: z98.string().optional().describe("Priority (features)"),
13814
- on_behalf_of_email: z98.string().email().optional().describe("ADMIN ONLY: file this request owned by another customer's license email; ignored unless caller holds the support admin token (create_bug/create_feature)"),
13815
- id: z98.string().optional().describe("Bug/feature ID for get/triage/add_comment/get_comments"),
13816
- comment: z98.string().optional().describe("Comment text to append to a bug report thread (add_comment)"),
13817
- status: z98.string().optional().describe("Filter by status"),
13818
- classification: z98.string().optional().describe("Triage classification"),
13819
- resolution: z98.string().optional().describe("Triage resolution"),
13820
- notes: z98.string().optional().describe("Triage notes (mapped to triage_notes for bug/feature triage)"),
13821
- triage_notes: z98.string().optional().describe("Triage notes (legacy field name)"),
13822
- linked_task_id: z98.string().optional().describe("Linked task ID for triage"),
13823
- linked_commit: z98.string().optional().describe("Linked commit hash for triage"),
13824
- fixed_version: z98.string().optional().describe("Version that fixes this bug"),
13825
- shipped_version: z98.string().optional().describe("Version that ships this feature (features only)"),
13826
- add_evidence: z98.string().optional().describe("Owner self-service: additional evidence (logs, repro, stack traces) for update_bug"),
13827
- reopen_request: z98.boolean().optional().describe("Owner self-service: request a reopen on a recurring fixed bug (update_bug)"),
13828
- reopen_reason: z98.string().optional().describe("Owner self-service: why the bug should be reopened (update_bug)"),
13829
- attachments: z98.array(z98.object({
13830
- filename: z98.string().min(1).describe("Filename for the attachment"),
13831
- content: z98.string().min(1).describe("File content \u2014 plain text")
13925
+ title: z99.string().optional().describe("Bug/feature title"),
13926
+ description: z99.string().optional().describe("Bug/feature description"),
13927
+ steps_to_reproduce: z99.string().optional().describe("Steps to reproduce (bugs)"),
13928
+ expected_behavior: z99.string().optional().describe("Expected behavior (bugs)"),
13929
+ actual_behavior: z99.string().optional().describe("Actual behavior (bugs)"),
13930
+ severity: z99.string().optional().describe("Severity: p0/p1/p2/p3"),
13931
+ product: z99.string().optional().describe("Product (create_bug default exe-os; also re-labels a bug via update_bug, admin only): exe-os, exe-create, exe-wiki, exe-gateway, exe-crm, exe-build, exe-chat, exe-auth, exe-monitor, exe-db, exe-erp"),
13932
+ use_case: z99.string().optional().describe("Use case (features)"),
13933
+ proposed_solution: z99.string().optional().describe("Proposed solution (features)"),
13934
+ priority: z99.string().optional().describe("Priority (features)"),
13935
+ on_behalf_of_email: z99.string().email().optional().describe("ADMIN ONLY: file this request owned by another customer's license email; ignored unless caller holds the support admin token (create_bug/create_feature)"),
13936
+ id: z99.string().optional().describe("Bug/feature ID for get/triage/add_comment/get_comments"),
13937
+ comment: z99.string().optional().describe("Comment text to append to a bug report thread (add_comment)"),
13938
+ status: z99.string().optional().describe("Filter by status"),
13939
+ classification: z99.string().optional().describe("Triage classification"),
13940
+ resolution: z99.string().optional().describe("Triage resolution"),
13941
+ notes: z99.string().optional().describe("Triage notes (mapped to triage_notes for bug/feature triage)"),
13942
+ triage_notes: z99.string().optional().describe("Triage notes (legacy field name)"),
13943
+ linked_task_id: z99.string().optional().describe("Linked task ID for triage"),
13944
+ linked_commit: z99.string().optional().describe("Linked commit hash for triage"),
13945
+ fixed_version: z99.string().optional().describe("Version that fixes this bug"),
13946
+ shipped_version: z99.string().optional().describe("Version that ships this feature (features only)"),
13947
+ add_evidence: z99.string().optional().describe("Owner self-service: additional evidence (logs, repro, stack traces) for update_bug"),
13948
+ reopen_request: z99.boolean().optional().describe("Owner self-service: request a reopen on a recurring fixed bug (update_bug)"),
13949
+ reopen_reason: z99.string().optional().describe("Owner self-service: why the bug should be reopened (update_bug)"),
13950
+ attachments: z99.array(z99.object({
13951
+ filename: z99.string().min(1).describe("Filename for the attachment"),
13952
+ content: z99.string().min(1).describe("File content \u2014 plain text")
13832
13953
  })).optional().describe("File attachments for bug reports / feature requests (diffs, logs, config snippets)"),
13833
- source: z98.string().optional().describe("Review source: self-improve, manual, ci"),
13834
- pr_url: z98.string().optional().describe("PR URL (reviews)"),
13835
- review_resolution: z98.string().optional().describe("Resolution text (reviews)"),
13836
- limit: z98.coerce.number().optional().describe("Max results per page (up to 500)"),
13837
- offset: z98.coerce.number().optional().describe("Number of results to skip for pagination (list_my_bugs/list_my_features). Use next_offset from a prior response.")
13954
+ source: z99.string().optional().describe("Review source: self-improve, manual, ci"),
13955
+ pr_url: z99.string().optional().describe("PR URL (reviews)"),
13956
+ review_resolution: z99.string().optional().describe("Resolution text (reviews)"),
13957
+ limit: z99.coerce.number().optional().describe("Max results per page (up to 500)"),
13958
+ offset: z99.coerce.number().optional().describe("Number of results to skip for pagination (list_my_bugs/list_my_features). Use next_offset from a prior response.")
13838
13959
  }
13839
13960
  },
13840
13961
  async (input, extra) => {
@@ -13920,7 +14041,7 @@ function registerSupportConsolidated(server) {
13920
14041
  }
13921
14042
 
13922
14043
  // src/mcp/tools/diagnostics.ts
13923
- import { z as z99 } from "zod";
14044
+ import { z as z100 } from "zod";
13924
14045
  function buildHandlers9() {
13925
14046
  const tools = /* @__PURE__ */ new Map();
13926
14047
  const fake = {
@@ -13941,21 +14062,21 @@ function registerDiagnostics(server) {
13941
14062
  title: "Diagnostics",
13942
14063
  description: `System diagnostics and admin operations. Actions: ${toolNames.join(", ")}. Covers health checks, update status, cloud status, key management, employee rename, semantic tool discovery (tool_search), identity drift detection (drift), agent liveness monitoring (agent_liveness), agent memory reassignment (merge_agent_memories), steward identity gate (steward_check, steward_audit_log, steward_override), daemon restart forensics (daemon_restarts \u2014 'why did the daemon restart?': restart-cause breakdown, slowest-timer leaderboard, event-loop-block frequency), and orchestration-health visibility: spawn_failures ('why did dispatch fail?': tmux spawn fail count + cause breakdown path_not_found/claude_launch_failed/timeout + success-vs-fail ratio), orchestration_health ('is the box healthy / is the spiral happening?': load/core, event-loop lag, direct-SQLite-fallback count, event-loop blocks), and work_map ('who's doing what / who died and why?': live sessions \xD7 role \xD7 task \xD7 worktree flag, plus recent session deaths with cause/load + worktree violations).`,
13943
14064
  inputSchema: {
13944
- action: z99.string().describe(`Diagnostic operation: ${toolNames.join(", ")}`),
14065
+ action: z100.string().describe(`Diagnostic operation: ${toolNames.join(", ")}`),
13945
14066
  // Pass-through params used by various sub-tools
13946
- agent_id: z99.string().optional().describe("Agent to probe (drift). Defaults to all agents."),
13947
- name: z99.string().optional().describe("Employee name (rename_employee)"),
13948
- new_name: z99.string().optional().describe("New employee name (rename_employee)"),
13949
- query: z99.string().optional().describe("Search/filter query, or natural language for tool_search"),
13950
- format: z99.string().optional().describe("Output format"),
13951
- limit: z99.coerce.number().int().min(1).max(100).optional().describe("Max results for tool_search (default 20)"),
13952
- from_agent_id: z99.string().optional().describe("Source agent ID to merge from (merge_agent_memories)"),
13953
- to_agent_id: z99.string().optional().describe("Target agent ID to merge into (merge_agent_memories)"),
13954
- dry_run: z99.boolean().optional().default(true).describe("Preview mode \u2014 show count without changing (merge_agent_memories). Default: true"),
14067
+ agent_id: z100.string().optional().describe("Agent to probe (drift). Defaults to all agents."),
14068
+ name: z100.string().optional().describe("Employee name (rename_employee)"),
14069
+ new_name: z100.string().optional().describe("New employee name (rename_employee)"),
14070
+ query: z100.string().optional().describe("Search/filter query, or natural language for tool_search"),
14071
+ format: z100.string().optional().describe("Output format"),
14072
+ limit: z100.coerce.number().int().min(1).max(100).optional().describe("Max results for tool_search (default 20)"),
14073
+ from_agent_id: z100.string().optional().describe("Source agent ID to merge from (merge_agent_memories)"),
14074
+ to_agent_id: z100.string().optional().describe("Target agent ID to merge into (merge_agent_memories)"),
14075
+ dry_run: z100.boolean().optional().default(true).describe("Preview mode \u2014 show count without changing (merge_agent_memories). Default: true"),
13955
14076
  // Steward params (absorbed from steward tool)
13956
- operation: z99.string().optional().describe("Operation name for steward_check/steward_override"),
13957
- target: z99.string().optional().describe("Target resource for steward_check/steward_override"),
13958
- reason: z99.string().optional().describe("Override reason for steward_override")
14077
+ operation: z100.string().optional().describe("Operation name for steward_check/steward_override"),
14078
+ target: z100.string().optional().describe("Target resource for steward_check/steward_override"),
14079
+ reason: z100.string().optional().describe("Override reason for steward_override")
13959
14080
  }
13960
14081
  },
13961
14082
  async (input, extra) => {
@@ -14120,7 +14241,7 @@ async function handleMergeAgentMemories(input) {
14120
14241
  }
14121
14242
  async function handleSpawnFailures() {
14122
14243
  try {
14123
- const { getOrchestrationMetrics } = await import("./orchestration-events-O5P5NEKS.js");
14244
+ const { getOrchestrationMetrics } = await import("./orchestration-events-KVNRNIPR.js");
14124
14245
  const metrics = await getOrchestrationMetrics();
14125
14246
  const c = metrics.counts;
14126
14247
  const attempted = c.tmuxSpawnAttempted;
@@ -14222,7 +14343,7 @@ async function handleOrchestrationHealth() {
14222
14343
  async function handleWorkMap() {
14223
14344
  try {
14224
14345
  const { getAgentLivenessReport } = await import("./agent-heartbeat-I5UPGXAU.js");
14225
- const { classifyRole } = await import("./session-kill-telemetry-IBNCJSI7.js");
14346
+ const { classifyRole } = await import("./session-kill-telemetry-2HSE7IGH.js");
14226
14347
  const { buildSessionDeathSummary } = await import("./orchestration-health-read-EJWVUARG.js");
14227
14348
  const { getPaneCwd } = await import("./lib/tmux-status.js");
14228
14349
  const live = getAgentLivenessReport();
@@ -14357,7 +14478,7 @@ async function handleDrift(input) {
14357
14478
  }
14358
14479
  async function handleSteward(action, input) {
14359
14480
  const gate = new StewardGate();
14360
- const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-SHM4QSRJ.js");
14481
+ const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-IUVRZOSF.js");
14361
14482
  const inputAgent = input.agent_id;
14362
14483
  const operation = input.operation;
14363
14484
  const target = input.target;
@@ -14405,7 +14526,7 @@ async function handleSteward(action, input) {
14405
14526
  }
14406
14527
 
14407
14528
  // src/mcp/tools/dreaming.ts
14408
- import { z as z100 } from "zod";
14529
+ import { z as z101 } from "zod";
14409
14530
  function registerDreaming(server) {
14410
14531
  server.registerTool(
14411
14532
  "dreaming",
@@ -14413,10 +14534,10 @@ function registerDreaming(server) {
14413
14534
  title: "Dreaming",
14414
14535
  description: "Self-improvement loop \u2014 reviews recent work, identifies patterns, proposes behavior changes, and detects identity drift. Actions: run (execute dream cycle), status (last cycle result), history (past cycles).",
14415
14536
  inputSchema: {
14416
- action: z100.enum(["run", "status", "history"]).describe("Action to perform"),
14417
- agent_id: z100.string().optional().describe("Agent to analyze. Defaults to calling agent."),
14418
- hours: z100.coerce.number().min(1).max(720).optional().describe("Lookback window in hours (run). Default 24."),
14419
- limit: z100.coerce.number().int().min(1).max(50).optional().describe("Max results for history. Default 10.")
14537
+ action: z101.enum(["run", "status", "history"]).describe("Action to perform"),
14538
+ agent_id: z101.string().optional().describe("Agent to analyze. Defaults to calling agent."),
14539
+ hours: z101.coerce.number().min(1).max(720).optional().describe("Lookback window in hours (run). Default 24."),
14540
+ limit: z101.coerce.number().int().min(1).max(50).optional().describe("Max results for history. Default 10.")
14420
14541
  }
14421
14542
  },
14422
14543
  async ({ action, agent_id, hours, limit }) => {
@@ -14539,7 +14660,7 @@ ${String(row.raw_text)}`
14539
14660
  }
14540
14661
 
14541
14662
  // src/mcp/tools/steward.ts
14542
- import { z as z101 } from "zod";
14663
+ import { z as z102 } from "zod";
14543
14664
  function errorResult11(text5) {
14544
14665
  return { content: [{ type: "text", text: text5 }], isError: true };
14545
14666
  }
@@ -14551,12 +14672,12 @@ function registerSteward(server) {
14551
14672
  title: "Steward Identity Gate",
14552
14673
  description: "Constitutional check before destructive operations. action=check: verify agent authority for an operation. action=audit_log: query the audit trail. action=override: coordinator-only bypass with reason.",
14553
14674
  inputSchema: {
14554
- action: z101.enum(["check", "audit_log", "override"]).describe("Steward operation to perform"),
14555
- agent: z101.string().optional().describe("Agent to check (defaults to calling agent for action=check)"),
14556
- operation: z101.string().optional().describe("Operation name (required for check/override)"),
14557
- target: z101.string().optional().describe("Target resource (required for check/override)"),
14558
- reason: z101.string().optional().describe("Override reason (required for action=override)"),
14559
- limit: z101.number().optional().describe("Max audit entries to return (default: 50)")
14675
+ action: z102.enum(["check", "audit_log", "override"]).describe("Steward operation to perform"),
14676
+ agent: z102.string().optional().describe("Agent to check (defaults to calling agent for action=check)"),
14677
+ operation: z102.string().optional().describe("Operation name (required for check/override)"),
14678
+ target: z102.string().optional().describe("Target resource (required for check/override)"),
14679
+ reason: z102.string().optional().describe("Override reason (required for action=override)"),
14680
+ limit: z102.number().optional().describe("Max audit entries to return (default: 50)")
14560
14681
  }
14561
14682
  },
14562
14683
  async (input) => {
@@ -14639,7 +14760,7 @@ function registerSteward(server) {
14639
14760
  }
14640
14761
 
14641
14762
  // src/mcp/tools/resonance.ts
14642
- import { z as z102 } from "zod";
14763
+ import { z as z103 } from "zod";
14643
14764
  function text4(content, isError = false) {
14644
14765
  return { content: [{ type: "text", text: content }], ...isError ? { isError: true } : {} };
14645
14766
  }
@@ -14648,14 +14769,14 @@ function registerResonance(server) {
14648
14769
  title: "Resonance Network",
14649
14770
  description: "Co-activation network queries. Actions: hot_pairs (top co-activated memory pairs), neighbors (co-activation neighbors for a specific memory).",
14650
14771
  inputSchema: {
14651
- action: z102.enum(["hot_pairs", "neighbors"]).describe("Resonance query type"),
14652
- memory_id: z102.string().optional().describe("Memory ID for neighbors action"),
14653
- entity_id: z102.string().optional().describe("Deprecated alias for memory_id on neighbors action"),
14654
- limit: z102.number().optional().describe("Max results (default 20)")
14772
+ action: z103.enum(["hot_pairs", "neighbors"]).describe("Resonance query type"),
14773
+ memory_id: z103.string().optional().describe("Memory ID for neighbors action"),
14774
+ entity_id: z103.string().optional().describe("Deprecated alias for memory_id on neighbors action"),
14775
+ limit: z103.number().optional().describe("Max results (default 20)")
14655
14776
  }
14656
14777
  }, async ({ action, memory_id, entity_id, limit }) => {
14657
14778
  try {
14658
- const { getHotPairs, getCoActivationNeighbors } = await import("./co-activation-K44LGZ7A.js");
14779
+ const { getHotPairs, getCoActivationNeighbors } = await import("./co-activation-7F3J2GC7.js");
14659
14780
  if (action === "hot_pairs") {
14660
14781
  const pairs = await getHotPairs(limit ?? 20);
14661
14782
  if (pairs.length === 0) return text4("No co-activation data yet. Pairs are recorded as memories are accessed together in searches.");