@askexenow/exe-os 0.9.367 → 0.9.368

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 (344) hide show
  1. package/deploy/compose/.env.askexe-control-plane.example +3 -1
  2. package/deploy/compose/.env.customer.example +6 -2
  3. package/deploy/compose/.env.example +8 -2
  4. package/deploy/compose/docker-compose.yml +21 -2
  5. package/deploy/compose/generate-env.ts +21 -1
  6. package/dist/.dist-verified.json +3 -3
  7. package/dist/{active-agent-V3CUDNED.js → active-agent-6WNC756A.js} +3 -3
  8. package/dist/{active-agent-R6Q7UEUD.js → active-agent-RDTJGZHP.js} +3 -3
  9. package/dist/{agent-defs-generator-MLPRGY75.js → agent-defs-generator-M5AUL3WM.js} +2 -2
  10. package/dist/{agentic-ontology-5FMQWGDZ.js → agentic-ontology-ZJBRYETW.js} +1 -1
  11. package/dist/{backfill-metadata-YXUMCKRV.js → backfill-metadata-Q4X23XLR.js} +5 -5
  12. package/dist/{backup-verify-GYHKAX7K.js → backup-verify-UKLX6IEK.js} +1 -1
  13. package/dist/behavior-injection-C3HEKSJY.js +60 -0
  14. package/dist/{behaviors-O6HKTSOF.js → behaviors-UCMAREU3.js} +8 -6
  15. package/dist/bin/agentic-ontology-backfill.js +6 -6
  16. package/dist/bin/agentic-reflection-backfill.js +7 -7
  17. package/dist/bin/agentic-semantic-label.js +6 -6
  18. package/dist/bin/backfill-conversations.js +5 -5
  19. package/dist/bin/backfill-responses.js +5 -5
  20. package/dist/bin/backfill-vectors.js +6 -6
  21. package/dist/bin/bulk-sync-postgres.js +10 -10
  22. package/dist/bin/cc-doctor.js +4 -4
  23. package/dist/bin/cleanup-stale-review-tasks.js +14 -14
  24. package/dist/bin/cli.js +20 -20
  25. package/dist/bin/deferred-daemon-restart.js +83 -81
  26. package/dist/bin/exe-agent-config.js +2 -2
  27. package/dist/bin/exe-agent.js +11 -11
  28. package/dist/bin/exe-assign.js +6 -6
  29. package/dist/bin/exe-boot.js +30 -30
  30. package/dist/bin/exe-call.js +4 -4
  31. package/dist/bin/exe-cloud.js +11 -11
  32. package/dist/bin/exe-config-dump.js +2 -2
  33. package/dist/bin/exe-dispatch.js +15 -15
  34. package/dist/bin/exe-doctor.js +5 -5
  35. package/dist/bin/exe-export-behaviors.js +10 -8
  36. package/dist/bin/exe-forget.js +7 -7
  37. package/dist/bin/exe-gateway.js +7 -7
  38. package/dist/bin/exe-healthcheck.js +4 -4
  39. package/dist/bin/exe-heartbeat.js +17 -17
  40. package/dist/bin/exe-kill.js +18 -18
  41. package/dist/bin/exe-launch-agent.js +24 -23
  42. package/dist/bin/exe-mcp.js +3 -3
  43. package/dist/bin/exe-memory-reads.js +5 -5
  44. package/dist/bin/exe-new-employee.js +8 -8
  45. package/dist/bin/exe-os-mcp-proxy.js +3 -3
  46. package/dist/bin/exe-pending-messages.js +15 -15
  47. package/dist/bin/exe-pending-notifications.js +14 -14
  48. package/dist/bin/exe-pending-reviews.js +14 -14
  49. package/dist/bin/exe-rename.js +4 -4
  50. package/dist/bin/exe-review.js +17 -17
  51. package/dist/bin/exe-search.js +6 -6
  52. package/dist/bin/exe-session-cleanup.js +19 -18
  53. package/dist/bin/exe-settings.js +10 -10
  54. package/dist/bin/exe-start-codex.js +73 -19
  55. package/dist/bin/exe-start-opencode.js +11 -9
  56. package/dist/bin/exe-status.js +16 -16
  57. package/dist/bin/exe-support.js +3 -3
  58. package/dist/bin/exe-team.js +4 -4
  59. package/dist/bin/exe-verify-running-images.js +123 -4
  60. package/dist/bin/exe-watchdog.js +44 -3
  61. package/dist/bin/git-sweep.js +16 -15
  62. package/dist/bin/graph-backfill.js +7 -7
  63. package/dist/bin/graph-export.js +6 -6
  64. package/dist/bin/import-history.js +10 -10
  65. package/dist/bin/install.js +85 -83
  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 +4 -4
  70. package/dist/bin/postgres-agentic-semantic-backfill.js +4 -4
  71. package/dist/bin/reconcile-backlog.js +47 -6
  72. package/dist/bin/registry-proxy.js +1 -1
  73. package/dist/bin/scan-tasks.js +14 -14
  74. package/dist/bin/setup.js +1 -1
  75. package/dist/bin/shard-migrate.js +5 -5
  76. package/dist/bin/stack-update.js +6 -5
  77. package/dist/bin/verify-stack.js +6 -1
  78. package/dist/bin/vps-health-gate.js +1 -1
  79. package/dist/{boot-generation-EZ2Y74IG.js → boot-generation-7H7Y4KC2.js} +3 -3
  80. package/dist/{boot-review-sections-7CNQTAYR.js → boot-review-sections-4AGCECCP.js} +13 -13
  81. package/dist/build-manifest.json +808 -773
  82. package/dist/{capability-cards-ZTFMK4VJ.js → capability-cards-6KAC5D2Z.js} +2 -2
  83. package/dist/{capacity-monitor-B2XU4YHP.js → capacity-monitor-J2Y4SFLA.js} +15 -15
  84. package/dist/{catchup-brief-3BEOL7EV.js → catchup-brief-F2HKF2CU.js} +18 -18
  85. package/dist/{chunk-PR3AHVFW.js → chunk-2AS6FG6C.js} +3 -3
  86. package/dist/{chunk-WCDIDSLR.js → chunk-2UBMXN4D.js} +2 -2
  87. package/dist/{chunk-267QB6VB.js → chunk-2UGU3V63.js} +1 -1
  88. package/dist/{chunk-PQ6NRLKL.js → chunk-34BMZTWV.js} +1 -1
  89. package/dist/{chunk-XA4EU3CW.js → chunk-4DGIOK6T.js} +1 -1
  90. package/dist/{chunk-JJRZE2LD.js → chunk-4GVJIMMK.js} +12 -6
  91. package/dist/{chunk-2IZH6W73.js → chunk-4L732DE5.js} +3 -3
  92. package/dist/{chunk-ZSHLY5BS.js → chunk-4RRMZJLG.js} +1 -1
  93. package/dist/{chunk-MQ3N4KZY.js → chunk-5IVLOOJR.js} +1 -1
  94. package/dist/{chunk-PFR6EOUY.js → chunk-5YKNEL3W.js} +2 -2
  95. package/dist/{chunk-AE3PYLLS.js → chunk-6EXOW5ZA.js} +9 -9
  96. package/dist/{chunk-CTPG4KYZ.js → chunk-6P7DVFKA.js} +1 -1
  97. package/dist/{chunk-F3PIHVVY.js → chunk-6UZ3DEQI.js} +1 -1
  98. package/dist/{chunk-URHJDUWO.js → chunk-72JZQ7EV.js} +1 -1
  99. package/dist/{chunk-66BFQOWR.js → chunk-72QUZX6J.js} +4 -4
  100. package/dist/{chunk-JOKKIFRN.js → chunk-AAL6CDMQ.js} +7 -7
  101. package/dist/{chunk-FSIAGX55.js → chunk-AJGX4Z34.js} +1 -1
  102. package/dist/{chunk-OADOH45L.js → chunk-BEPO36MW.js} +3 -3
  103. package/dist/{chunk-UI3K73LD.js → chunk-BFL3UB77.js} +1 -1
  104. package/dist/{chunk-KDD26FUY.js → chunk-BFPQXPN3.js} +1 -1
  105. package/dist/{chunk-7W5LCREK.js → chunk-BJKC6ZJU.js} +40 -84
  106. package/dist/{chunk-OPS7KUFV.js → chunk-BLNSUBP3.js} +3 -3
  107. package/dist/{chunk-5CH6XKVC.js → chunk-BNDHQGOY.js} +1 -1
  108. package/dist/{chunk-Z5Z3MYUW.js → chunk-BPQWRR4H.js} +2 -2
  109. package/dist/{chunk-YA4PM3MV.js → chunk-BTGR55GX.js} +3 -3
  110. package/dist/{chunk-WYVBWDFY.js → chunk-C4IJ5IS5.js} +1 -1
  111. package/dist/{chunk-XVRQZCTS.js → chunk-C5FOA5GO.js} +14 -3
  112. package/dist/{chunk-XKFMNAJ7.js → chunk-CSBD7QLZ.js} +1 -1
  113. package/dist/{chunk-BY3V5CLX.js → chunk-CU2OUUSV.js} +25 -5
  114. package/dist/{chunk-Y4JVM3SI.js → chunk-CXHRNESJ.js} +1 -1
  115. package/dist/{chunk-SFKIZYKK.js → chunk-DRMGPZSC.js} +2 -2
  116. package/dist/{chunk-PFOJX6CR.js → chunk-DYPKSVB7.js} +5 -5
  117. package/dist/{chunk-PS4NA7PM.js → chunk-EDB3LXBQ.js} +268 -166
  118. package/dist/{chunk-TCR7NBHD.js → chunk-EDRXCUEP.js} +4 -4
  119. package/dist/{chunk-BQYQES2Z.js → chunk-ELY5WBZX.js} +10 -10
  120. package/dist/{chunk-ALYI3P5D.js → chunk-EZUSIF66.js} +1 -1
  121. package/dist/{chunk-CYNL3ZFD.js → chunk-FHYX64H3.js} +3 -3
  122. package/dist/{chunk-PWCZFIQH.js → chunk-FSALI4B7.js} +4 -4
  123. package/dist/{chunk-4DJDC4Y2.js → chunk-FWKTZURC.js} +4 -4
  124. package/dist/{chunk-53LCVVX5.js → chunk-FWVPGXHD.js} +5 -5
  125. package/dist/{chunk-O3F5P6Z5.js → chunk-GILYOIMP.js} +2 -2
  126. package/dist/{chunk-NPND34FS.js → chunk-GP3J3AOT.js} +4 -4
  127. package/dist/{chunk-6NJURKRG.js → chunk-H6J7N3BZ.js} +1 -1
  128. package/dist/{chunk-WSLFGJBA.js → chunk-HQSUXAB4.js} +1 -1
  129. package/dist/{chunk-XTEKGO44.js → chunk-HTLJHSN4.js} +1 -1
  130. package/dist/{chunk-AEVE654G.js → chunk-HXV3DGL7.js} +1 -1
  131. package/dist/{chunk-LW5WRSDD.js → chunk-IEE6X6R2.js} +1 -1
  132. package/dist/{chunk-V3ISR2QT.js → chunk-IKRIUEIF.js} +1 -1
  133. package/dist/{chunk-52CFP2AV.js → chunk-J44774XC.js} +1 -1
  134. package/dist/{chunk-TJSTWACD.js → chunk-J77ZIMH5.js} +5 -5
  135. package/dist/{chunk-Y7OK5PJE.js → chunk-JDPV7W2L.js} +1 -1
  136. package/dist/{chunk-7W6FDHHY.js → chunk-KGPWS4KE.js} +1 -1
  137. package/dist/{chunk-XAMLDTRA.js → chunk-KWQ7RHYD.js} +4 -4
  138. package/dist/{chunk-IIVFXD6P.js → chunk-KYVIV54Y.js} +1 -1
  139. package/dist/chunk-KZXMP6JG.js +319 -0
  140. package/dist/{chunk-ZZ3JQM5I.js → chunk-LJWCK2DR.js} +9 -9
  141. package/dist/{chunk-WBKIU6UJ.js → chunk-MCXYNYZI.js} +30 -2
  142. package/dist/{chunk-L2VZBPJJ.js → chunk-MWEIBVBS.js} +13 -1
  143. package/dist/{chunk-GUOMZ3JM.js → chunk-MXP27XTP.js} +2 -2
  144. package/dist/{chunk-EDZ5URGR.js → chunk-N3CGSO3S.js} +1 -1
  145. package/dist/{chunk-QWDZNQXA.js → chunk-NNXPIJRB.js} +1 -1
  146. package/dist/{chunk-OISZ2I4X.js → chunk-NWE3CFX7.js} +4 -4
  147. package/dist/{chunk-HSBKV5LB.js → chunk-OBESOWFJ.js} +3 -3
  148. package/dist/{chunk-XKZD5FGK.js → chunk-OL3QP3AU.js} +116 -1
  149. package/dist/{chunk-6MCUXRIP.js → chunk-P3PAD6AA.js} +1 -1
  150. package/dist/{chunk-N3JLNMPF.js → chunk-PGF5I7EV.js} +2 -2
  151. package/dist/{chunk-CX4MVEM3.js → chunk-PVWM2WMM.js} +1 -1
  152. package/dist/{chunk-JFOZHVNO.js → chunk-QCSAYYL6.js} +1 -1
  153. package/dist/{chunk-J6VQ7HYV.js → chunk-QE5KWKVU.js} +27 -6
  154. package/dist/{chunk-4WOOCTON.js → chunk-QKZEUCTS.js} +2 -2
  155. package/dist/{chunk-P5XER5QY.js → chunk-QT6CNCXO.js} +3 -3
  156. package/dist/{chunk-P76VYS6V.js → chunk-QZYYCPNL.js} +1 -1
  157. package/dist/{chunk-DTTISDTI.js → chunk-RDIZSXXD.js} +1 -1
  158. package/dist/{chunk-R4AROSYI.js → chunk-RFWOXKVL.js} +10 -179
  159. package/dist/chunk-S2YTU74T.js +76 -0
  160. package/dist/{chunk-K2OFS57E.js → chunk-TP7BFVQP.js} +2 -2
  161. package/dist/{chunk-LIZ3QQGK.js → chunk-TTJWPV4G.js} +1 -1
  162. package/dist/{chunk-XUGOVOID.js → chunk-UATT6BNO.js} +3 -3
  163. package/dist/{chunk-ALKYXAMB.js → chunk-UVM5ZXO2.js} +4 -4
  164. package/dist/{chunk-R3H3WW7H.js → chunk-V7E37GE3.js} +2 -2
  165. package/dist/{chunk-XSXZVKJ7.js → chunk-VD3CVNGB.js} +3 -3
  166. package/dist/{chunk-CKKLSY7B.js → chunk-VIW62NN5.js} +1 -1
  167. package/dist/{chunk-VY3QUSWS.js → chunk-VTOO5UB3.js} +9 -9
  168. package/dist/chunk-W5MCOZTW.js +304 -0
  169. package/dist/{chunk-TZFOWWPM.js → chunk-WJOJWRN5.js} +139 -33
  170. package/dist/{chunk-PS6VPW64.js → chunk-X4MRVNR3.js} +1 -1
  171. package/dist/{chunk-YYLVHUYZ.js → chunk-XBTQPQN7.js} +1 -1
  172. package/dist/{behavior-injection-7VGYY2KO.js → chunk-XOTDAKJL.js} +24 -38
  173. package/dist/{chunk-QX33D4CH.js → chunk-Y4AYNLXU.js} +25 -25
  174. package/dist/{chunk-BTMX2D4X.js → chunk-YGPJ7VSJ.js} +48 -10
  175. package/dist/{chunk-DXCTHNEF.js → chunk-ZR3VMM3X.js} +9 -9
  176. package/dist/{chunk-MLPPG2OG.js → chunk-ZWONQU5S.js} +1 -1
  177. package/dist/{cleanup-graph-garbage-XDIX3HLN.js → cleanup-graph-garbage-FBSQI33K.js} +8 -8
  178. package/dist/{cloud-sync-command-VPYE4FIH.js → cloud-sync-command-NHGVDTLM.js} +11 -3
  179. package/dist/{cloud-sync-db-init-NSDBTFGI.js → cloud-sync-db-init-I75VOTXC.js} +1 -1
  180. package/dist/{cloud-sync-shutdown-6OUYTG4T.js → cloud-sync-shutdown-JGOFGGET.js} +2 -2
  181. package/dist/{cloud-sync-state-5DFKLWNB.js → cloud-sync-state-QF3TMMJ4.js} +3 -1
  182. package/dist/{co-activation-EAAKGGZH.js → co-activation-AE5L2SJV.js} +2 -2
  183. package/dist/{co-occurrence-OFVF55RX.js → co-occurrence-O65D4SCN.js} +6 -6
  184. package/dist/{conversation-entity-extractor-ZR5GFKAI.js → conversation-entity-extractor-LFIDTD2O.js} +4 -4
  185. package/dist/{crdt-sync-FGH4SBFW.js → crdt-sync-NRWDBRSE.js} +1 -1
  186. package/dist/{crm-webhook-PJATR2DC.js → crm-webhook-XOQGX6DV.js} +2 -2
  187. package/dist/{cto-delegation-gate-PO4LSSQ4.js → cto-delegation-gate-ZGOAXQI2.js} +13 -13
  188. package/dist/{daemon-orchestration-IJFZFQUX.js → daemon-orchestration-ZMQWYYDT.js} +18 -18
  189. package/dist/dispatch-intent-journal-VV6HMZC4.js +17 -0
  190. package/dist/{doc-graph-extractor-CAYUAM5A.js → doc-graph-extractor-6C5JBKPP.js} +6 -6
  191. package/dist/{documents-W2G477QE.js → documents-FKSQGSO4.js} +6 -6
  192. package/dist/{dreaming-FVXSIIWV.js → dreaming-IB3H6NDZ.js} +17 -17
  193. package/dist/{employee-boot-brief-OYMSHFHA.js → employee-boot-brief-5YRTUEJH.js} +24 -21
  194. package/dist/{exe-drift-67RGJOBX.js → exe-drift-CUWUYX3O.js} +3 -3
  195. package/dist/{exe-export-SGYX6XZG.js → exe-export-XWENYJNM.js} +7 -7
  196. package/dist/{exe-import-UABVA5N3.js → exe-import-OWOMRF2S.js} +7 -7
  197. package/dist/{exe-key-XNYDCVFE.js → exe-key-P356FGK5.js} +83 -81
  198. package/dist/{exe-org-XJVSU5HN.js → exe-org-UKIVF3KE.js} +8 -8
  199. package/dist/{exe-snapshot-YXOGYZUX.js → exe-snapshot-AZI2WW5Y.js} +18 -18
  200. package/dist/{fast-db-init-GDFJY5UH.js → fast-db-init-FPAPF3GB.js} +1 -1
  201. package/dist/{founder-context-KUXSNXKS.js → founder-context-QTQ6V3B5.js} +2 -2
  202. package/dist/gateway/index.js +11 -11
  203. package/dist/{git-staleness-NN6RWNLW.js → git-staleness-6ACWLV5Q.js} +2 -2
  204. package/dist/{global-procedures-XDNA3TNA.js → global-procedures-RXIKBVLZ.js} +3 -3
  205. package/dist/{graph-auto-extract-KTOR45V4.js → graph-auto-extract-Q4A4QMOF.js} +6 -6
  206. package/dist/{graph-rag-L5NV5YWD.js → graph-rag-RLRQMY54.js} +4 -4
  207. package/dist/{hook-integrity-X3YAVGUW.js → hook-integrity-3X2JRLBM.js} +1 -1
  208. package/dist/{hook-prefetch-WE4MIXBM.js → hook-prefetch-DU44UZQP.js} +14 -14
  209. package/dist/hooks/bug-report-worker.js +18 -18
  210. package/dist/hooks/codex-stop-task-finalizer.js +19 -19
  211. package/dist/hooks/commit-complete.js +20 -18
  212. package/dist/hooks/error-recall.js +8 -8
  213. package/dist/hooks/exe-heartbeat-hook.js +4 -4
  214. package/dist/hooks/ingest-worker.js +2 -2
  215. package/dist/hooks/ingest.js +11 -11
  216. package/dist/hooks/instructions-loaded.js +5 -5
  217. package/dist/hooks/manifest.json +20 -20
  218. package/dist/hooks/notification.js +5 -5
  219. package/dist/hooks/post-compact.js +4 -4
  220. package/dist/hooks/post-tool-combined.js +11 -11
  221. package/dist/hooks/pre-compact.js +17 -17
  222. package/dist/hooks/pre-tool-use.js +44 -37
  223. package/dist/hooks/prompt-submit.js +35 -31
  224. package/dist/hooks/session-end.js +21 -21
  225. package/dist/hooks/session-start.js +16 -16
  226. package/dist/hooks/stop.js +20 -20
  227. package/dist/hooks/subagent-stop.js +18 -18
  228. package/dist/hooks/summary-worker.js +22 -22
  229. package/dist/index.js +25 -25
  230. package/dist/{installer-EAAYEEEF.js → installer-B7QYQE56.js} +7 -5
  231. package/dist/{installer-UDRMFY75.js → installer-EXR25DDG.js} +5 -5
  232. package/dist/{installer-EPQAOI6M.js → installer-TOPA7673.js} +5 -5
  233. package/dist/{intercom-queue-IBOAVT2I.js → intercom-queue-BZ4M3L4S.js} +13 -13
  234. package/dist/lib/cloud-sync.js +10 -10
  235. package/dist/lib/consolidation.js +8 -8
  236. package/dist/lib/database.js +2 -2
  237. package/dist/lib/db-backup.js +1 -1
  238. package/dist/lib/db-write-worker.js +3 -3
  239. package/dist/lib/db.js +2 -2
  240. package/dist/lib/delivery-truth.js +25 -0
  241. package/dist/lib/device-registry.js +1 -1
  242. package/dist/lib/employee-templates.js +4 -4
  243. package/dist/lib/employees.js +2 -2
  244. package/dist/lib/exe-daemon.js +181 -76
  245. package/dist/lib/hybrid-search.js +6 -6
  246. package/dist/lib/identity.js +2 -2
  247. package/dist/lib/license.js +2 -2
  248. package/dist/lib/messaging.js +14 -14
  249. package/dist/lib/registry-proxy.js +1 -1
  250. package/dist/lib/reminders.js +3 -3
  251. package/dist/lib/schedules.js +6 -6
  252. package/dist/lib/session-registry.js +4 -4
  253. package/dist/lib/skill-learning.js +7 -7
  254. package/dist/lib/store.js +5 -5
  255. package/dist/lib/task-router.js +3 -3
  256. package/dist/lib/tasks.js +15 -15
  257. package/dist/lib/tmux-routing.js +13 -13
  258. package/dist/lib/token-spend.js +3 -3
  259. package/dist/{license-gate-3TTWJABL.js → license-gate-YTIOLKVV.js} +3 -3
  260. package/dist/{license-sync-ZC6TPKVV.js → license-sync-5VE5OSTV.js} +2 -2
  261. package/dist/mcp/register-tools.js +82 -80
  262. package/dist/mcp/server.js +85 -83
  263. package/dist/mcp/tools/complete-reminder.js +4 -4
  264. package/dist/mcp/tools/create-reminder.js +4 -4
  265. package/dist/mcp/tools/create-task.js +25 -23
  266. package/dist/mcp/tools/deactivate-behavior.js +8 -8
  267. package/dist/mcp/tools/list-reminders.js +4 -4
  268. package/dist/mcp/tools/list-tasks.js +17 -17
  269. package/dist/mcp/tools/send-message.js +16 -16
  270. package/dist/mcp/tools/update-task.js +16 -16
  271. package/dist/{mcp-http-config-ROF5EPEF.js → mcp-http-config-XUNRIGQH.js} +3 -3
  272. package/dist/{mcp-session-identity-ERU6FEUB.js → mcp-session-identity-4UIG7KLK.js} +13 -13
  273. package/dist/{memory-cards-3QTXI2SG.js → memory-cards-R74YU4CO.js} +5 -5
  274. package/dist/{memory-graph-extractor-7GAILMYG.js → memory-graph-extractor-3B4QJUXI.js} +7 -7
  275. package/dist/{memory-poisoning-defense-TPXSRJTQ.js → memory-poisoning-defense-OAKFL5O2.js} +2 -2
  276. package/dist/{memory-pressure-watchdog-ZSOP6T2F.js → memory-pressure-watchdog-FFC2CHFJ.js} +14 -14
  277. package/dist/{memory-reflection-3AI4JBV2.js → memory-reflection-5IJ6RE2J.js} +2 -2
  278. package/dist/{notification-ledger-ZU7ZFJJX.js → notification-ledger-P5XBUYKO.js} +14 -14
  279. package/dist/{notifications-S4GU22GF.js → notifications-LLCCHRYV.js} +13 -13
  280. package/dist/{orchestration-events-HVG56HJ5.js → orchestration-events-VBGCIQSS.js} +3 -3
  281. package/dist/{orchestrator-UW3Q3WYG.js → orchestrator-EB3SCTAJ.js} +15 -15
  282. package/dist/{org-brief-session-G36TJBN4.js → org-brief-session-GDCDKBFF.js} +6 -6
  283. package/dist/{org-consent-policy-RMYVMM3X.js → org-consent-policy-HCD42NBN.js} +2 -2
  284. package/dist/{org-partner-runtime-KXMGEYFW.js → org-partner-runtime-TPVKFR6E.js} +6 -6
  285. package/dist/{org-row-visibility-UI5PGN76.js → org-row-visibility-ZZLOPZLH.js} +1 -1
  286. package/dist/{pipeline-router-IODWXDDI.js → pipeline-router-3JTL2KF6.js} +3 -3
  287. package/dist/{plan-limits-XMAQVEJZ.js → plan-limits-MTHRP4WY.js} +5 -5
  288. package/dist/{projection-worker-6LZUCI3B.js → projection-worker-FLASNERC.js} +2 -2
  289. package/dist/{prospective-memory-G5VK5GCD.js → prospective-memory-HI3WUY4U.js} +2 -2
  290. package/dist/{push-notifications-S2RYRXLF.js → push-notifications-DFSR6P7V.js} +14 -14
  291. package/dist/{reranker-EHQTAA3L.js → reranker-XHBKUDGG.js} +1 -1
  292. package/dist/{retrieval-health-WZ4ICGNF.js → retrieval-health-NYKSDS6M.js} +1 -1
  293. package/dist/{review-polling-MAWLRDSP.js → review-polling-UAV6DZIZ.js} +14 -14
  294. package/dist/runtime/index.js +21 -21
  295. package/dist/{session-events-BRUIZ5E4.js → session-events-YCYPLWPG.js} +14 -14
  296. package/dist/{session-kill-telemetry-PTZLHT33.js → session-kill-telemetry-UEJTHL65.js} +14 -14
  297. package/dist/{session-scope-G4RVJJGR.js → session-scope-LXDW7LJJ.js} +13 -13
  298. package/dist/{setup-wizard-WFEUB63Z.js → setup-wizard-OVJQYUUL.js} +1 -1
  299. package/dist/{skill-refinement-2OYPH7WD.js → skill-refinement-EWRJID73.js} +3 -3
  300. package/dist/{stack-promote-DLYYQXQI.js → stack-promote-4IJM36OG.js} +4 -4
  301. package/dist/{stack-release-OPWARLXI.js → stack-release-BAIRY65H.js} +4 -4
  302. package/dist/{stack-update-SJ43IEQE.js → stack-update-VDM5WXRS.js} +3 -3
  303. package/dist/stalled-dispatch-escalation-MHLYH2PT.js +80 -0
  304. package/dist/{steward-gate-V7PBGVFK.js → steward-gate-Y4N2XY3R.js} +3 -3
  305. package/dist/{subagent-brief-injection-BLCRI2AJ.js → subagent-brief-injection-7A6JEVTP.js} +21 -20
  306. package/dist/{support-inbox-6HOQYFD2.js → support-inbox-LT4WJECQ.js} +4 -3
  307. package/dist/{task-enforcement-EF6O2V26.js → task-enforcement-WOIZ5TLK.js} +14 -14
  308. package/dist/{task-request-inbox-OB2KIJWO.js → task-request-inbox-D65BPUKZ.js} +2 -2
  309. package/dist/{task-scope-74JBTKJN.js → task-scope-PQ67YRWP.js} +13 -13
  310. package/dist/{tasks-crud-ZU6RZDEZ.js → tasks-crud-TJNMUKKH.js} +13 -13
  311. package/dist/{tasks-notify-767DRYAA.js → tasks-notify-7UVC3VGI.js} +14 -14
  312. package/dist/{tasks-review-4F6PZZ3B.js → tasks-review-WDWYISZ2.js} +13 -13
  313. package/dist/{telemetry-upload-2JM6KIAB.js → telemetry-upload-6LBGRJUE.js} +7 -7
  314. package/dist/{token-budget-NH2RD4YX.js → token-budget-XO5XW6DL.js} +3 -3
  315. package/dist/{tool-telemetry-CHCBD4OQ.js → tool-telemetry-ZL6TTZWG.js} +1 -1
  316. package/dist/tui/App.js +21 -21
  317. package/dist/{tui-data-244GF3BI.js → tui-data-UK7ZPKN4.js} +13 -13
  318. package/dist/{update-support-P2LO3DAB.js → update-support-BGL5KAZO.js} +12 -12
  319. package/dist/{work-claims-4QOE7DT2.js → work-claims-XZL2DKQ3.js} +3 -3
  320. package/dist/{work-state-heartbeat-GX3VWWWK.js → work-state-heartbeat-267YQ75U.js} +1 -1
  321. package/dist/{worker-gate-62PZATOV.js → worker-gate-RUM6MLIR.js} +1 -1
  322. package/dist/{workflow-engine-7YIRU62F.js → workflow-engine-YQHGHKSJ.js} +2 -2
  323. package/dist/{worktree-3TUKIZWY.js → worktree-3FO6EQ4G.js} +4 -4
  324. package/dist/{worktree-sweep-MYQHUXDE.js → worktree-sweep-X7MUEEQS.js} +5 -5
  325. package/package.json +2 -1
  326. package/release-notes.json +29 -23
  327. /package/dist/{chunk-25EN7XXN.js → chunk-4AN2PWUK.js} +0 -0
  328. /package/dist/{chunk-WM7Y5ZV2.js → chunk-5U4UJGTW.js} +0 -0
  329. /package/dist/{chunk-62U63R3E.js → chunk-EYIX6JU7.js} +0 -0
  330. /package/dist/{chunk-JLYHJJHU.js → chunk-FDA45THL.js} +0 -0
  331. /package/dist/{chunk-JZBZI36P.js → chunk-GIO4VU4J.js} +0 -0
  332. /package/dist/{chunk-BTFDA3UJ.js → chunk-I76LRCNA.js} +0 -0
  333. /package/dist/{chunk-YNPOELAN.js → chunk-LBWEAQ6Z.js} +0 -0
  334. /package/dist/{chunk-65ZSFW3O.js → chunk-MQ5RUHNZ.js} +0 -0
  335. /package/dist/{chunk-XM7HJ5SS.js → chunk-PFCE4AXQ.js} +0 -0
  336. /package/dist/{chunk-FLP2BQOA.js → chunk-SXAERZL2.js} +0 -0
  337. /package/dist/{chunk-OUIEDJFO.js → chunk-TKTQRSSD.js} +0 -0
  338. /package/dist/{chunk-DAXFAXLN.js → chunk-U2AZUMBZ.js} +0 -0
  339. /package/dist/{chunk-GTOMDMJL.js → chunk-W6FVADZS.js} +0 -0
  340. /package/dist/{core-memory-EARETDZ6.js → core-memory-W5ZHHBRR.js} +0 -0
  341. /package/dist/{memory-isolation-XASOGA7G.js → memory-isolation-ZE7EDBO4.js} +0 -0
  342. /package/dist/{oauth-server-C3BXAKAW.js → oauth-server-3HG62YYJ.js} +0 -0
  343. /package/dist/{project-boot-LCFBQ6NB.js → project-boot-3OAWKYLO.js} +0 -0
  344. /package/dist/{wiki-acl-XQH4UBP2.js → wiki-acl-FQV4E6M4.js} +0 -0
@@ -1,21 +1,28 @@
1
+ import {
2
+ clearDispatchJournalEntry,
3
+ dispatchJournalDir,
4
+ findOrphanedDispatchIntents,
5
+ journalDispatchIntent,
6
+ updateDispatchJournalEntry
7
+ } from "./chunk-S2YTU74T.js";
1
8
  import {
2
9
  createTask
3
- } from "./chunk-ZZ3JQM5I.js";
10
+ } from "./chunk-LJWCK2DR.js";
4
11
  import {
5
12
  getActiveAgent
6
- } from "./chunk-QWDZNQXA.js";
13
+ } from "./chunk-NNXPIJRB.js";
7
14
  import {
8
15
  ensureEmployeeAsync,
9
16
  isExeSession,
10
17
  logTaskDispatch,
11
18
  resolveExeSession
12
- } from "./chunk-QX33D4CH.js";
19
+ } from "./chunk-Y4AYNLXU.js";
13
20
  import {
14
21
  isValidSessionScope
15
22
  } from "./chunk-BTSWFMEH.js";
16
23
  import {
17
24
  recordOrchestrationEventBestEffort
18
- } from "./chunk-UI3K73LD.js";
25
+ } from "./chunk-BFL3UB77.js";
19
26
  import {
20
27
  releaseDispatchClaim,
21
28
  tryAcquireDispatchClaim,
@@ -28,19 +35,18 @@ import {
28
35
  } from "./chunk-XTWHNLGD.js";
29
36
  import {
30
37
  getLicenseSync
31
- } from "./chunk-N3JLNMPF.js";
38
+ } from "./chunk-PGF5I7EV.js";
32
39
  import {
33
40
  getAgentContext
34
41
  } from "./chunk-GJV3WDWM.js";
35
42
  import {
36
43
  isCoordinatorName
37
- } from "./chunk-HSBKV5LB.js";
44
+ } from "./chunk-OBESOWFJ.js";
38
45
 
39
46
  // src/mcp/tools/create-task.ts
40
47
  import { z } from "zod";
41
- import { existsSync, readdirSync, readFileSync, realpathSync, statSync, writeFileSync, mkdirSync, unlinkSync } from "fs";
48
+ import { existsSync, readdirSync, realpathSync, statSync, writeFileSync, mkdirSync } from "fs";
42
49
  import { basename, dirname, isAbsolute, join, sep } from "path";
43
- import { homedir } from "os";
44
50
  function rootFromSessionName(sessionName) {
45
51
  const raw = (sessionName ?? "").trim();
46
52
  if (!raw) return "";
@@ -227,6 +233,9 @@ async function listCoordinatorRoots() {
227
233
  }
228
234
  return [...roots].sort();
229
235
  }
236
+ var HEADLESS_SCOPE_REMEDY = `
237
+
238
+ Headless/app callers (desktop backend, gateway, cron \u2014 anything not running inside a tmux coordinator session) cannot send X-Exe-Session and must instead pass the session_scope parameter naming the coordinator scope to act as (e.g. session_scope: "exe2"). That scope must genuinely own the project: it is resolved by the same in-scope rules as any other caller, and a scope that does not own the project is still refused. Registering the project's directory against a coordinator session also lets it resolve automatically without this parameter.`;
230
239
  async function inferCoordinatorRootForProject(projectName) {
231
240
  try {
232
241
  const liveRoots = new Set(await listCoordinatorRoots());
@@ -240,69 +249,6 @@ async function inferCoordinatorRootForProject(projectName) {
240
249
  function sessionBelongsToCoordinator(session, coordName, callerSession) {
241
250
  return session.windowName === coordName || session.windowName === callerSession || session.parentExe === coordName || rootFromSessionName(session.windowName) === coordName;
242
251
  }
243
- var DISPATCH_JOURNAL_ORPHAN_AGE_MS = 6e4;
244
- function dispatchJournalDir() {
245
- const base = process.env.EXE_OS_DIR || process.env.EXE_MEM_DIR || join(homedir(), ".exe-os");
246
- return join(base, "dispatch-journal");
247
- }
248
- function dispatchJournalSlug(title) {
249
- const slug = title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40);
250
- return slug || "task";
251
- }
252
- function journalDispatchIntent(title, payload, caller) {
253
- const dir = dispatchJournalDir();
254
- mkdirSync(dir, { recursive: true });
255
- const file = join(dir, `${Date.now()}-${dispatchJournalSlug(title)}.json`);
256
- const entry = {
257
- version: 1,
258
- journaledAt: (/* @__PURE__ */ new Date()).toISOString(),
259
- status: "pending",
260
- payload,
261
- caller
262
- };
263
- writeFileSync(file, JSON.stringify(entry, null, 2), "utf-8");
264
- return file;
265
- }
266
- function updateDispatchJournalEntry(file, patch) {
267
- const entry = JSON.parse(readFileSync(file, "utf-8"));
268
- writeFileSync(file, JSON.stringify({ ...entry, ...patch }, null, 2), "utf-8");
269
- }
270
- function clearDispatchJournalEntry(file) {
271
- try {
272
- unlinkSync(file);
273
- } catch {
274
- }
275
- }
276
- function findOrphanedDispatchIntents(sessionScope, olderThanMs = DISPATCH_JOURNAL_ORPHAN_AGE_MS) {
277
- const dir = dispatchJournalDir();
278
- if (!existsSync(dir)) return [];
279
- let names;
280
- try {
281
- names = readdirSync(dir);
282
- } catch {
283
- return [];
284
- }
285
- const cutoff = Date.now() - olderThanMs;
286
- const orphans = [];
287
- for (const name of names) {
288
- if (!name.endsWith(".json")) continue;
289
- const file = join(dir, name);
290
- try {
291
- if (statSync(file).mtimeMs > cutoff) continue;
292
- } catch {
293
- continue;
294
- }
295
- let entry = null;
296
- try {
297
- entry = JSON.parse(readFileSync(file, "utf-8"));
298
- } catch {
299
- }
300
- const entryScope = entry?.caller?.sessionScope ?? null;
301
- if (sessionScope && entryScope && entryScope !== sessionScope) continue;
302
- orphans.push({ file, entry });
303
- }
304
- return orphans;
305
- }
306
252
  function resolveDispatchRuntime(agentId, override) {
307
253
  if (override) return override;
308
254
  try {
@@ -535,7 +481,7 @@ function registerCreateTask(server) {
535
481
  if (!callerRoot) {
536
482
  const coordinatorSessions = await listCoordinatorRoots();
537
483
  if (coordinatorSessions.length > 1 && process.env.VITEST !== "true" && process.env.NODE_ENV !== "test") {
538
- const message = `BLOCKED: create_task cannot determine the caller session. ${coordinatorSessions.length} coordinator sessions are active (${coordinatorSessions.join(", ")}), X-Exe-Session is missing, and project "${project_name}" did not map to exactly one registered coordinator. Refusing to guess because guessing causes cross-session dispatch (for example exe2 tasks spawning yoshi2-exe1). Restart this coordinator or ensure the MCP client sends X-Exe-Session.`;
484
+ const message = `BLOCKED: create_task cannot determine the caller session. ${coordinatorSessions.length} coordinator sessions are active (${coordinatorSessions.join(", ")}), X-Exe-Session is missing, and project "${project_name}" did not map to exactly one registered coordinator. Refusing to guess because guessing causes cross-session dispatch (for example exe2 tasks spawning yoshi2-exe1). Restart this coordinator or ensure the MCP client sends X-Exe-Session.` + HEADLESS_SCOPE_REMEDY;
539
485
  process.stderr.write(`[create_task] ${message}
540
486
  `);
541
487
  recordOrchestrationEventBestEffort({
@@ -563,7 +509,7 @@ function registerCreateTask(server) {
563
509
  }
564
510
  }
565
511
  if (!callerRoot && process.env.VITEST !== "true" && process.env.NODE_ENV !== "test") {
566
- const message = `BLOCKED: create_task resolved no session_scope for project "${project_name}". Refusing to create an unscoped task. Ensure the MCP client sends a non-empty X-Exe-Session header or run from a coordinator session that can be resolved.`;
512
+ const message = `BLOCKED: create_task resolved no session_scope for project "${project_name}". Refusing to create an unscoped task. Ensure the MCP client sends a non-empty X-Exe-Session header or run from a coordinator session that can be resolved.` + HEADLESS_SCOPE_REMEDY;
567
513
  process.stderr.write(`[create_task] ${message}
568
514
  `);
569
515
  recordOrchestrationEventBestEffort({
@@ -595,7 +541,7 @@ function registerCreateTask(server) {
595
541
  let claimWarning = "";
596
542
  const claimRefRaw = (work_ref ?? "").trim();
597
543
  try {
598
- const { findConflicts, findConflictsInText, describeConflict, normalizeTarget } = await import("./work-claims-4QOE7DT2.js");
544
+ const { findConflicts, findConflictsInText, describeConflict, normalizeTarget } = await import("./work-claims-XZL2DKQ3.js");
599
545
  const conflicts = claimRefRaw ? await findConflicts(
600
546
  [normalizeTarget({ kind: "work_ref", value: claimRefRaw })],
601
547
  callerRoot
@@ -648,7 +594,7 @@ Nothing was created or dispatched. Either pick different work, or \u2014 if that
648
594
  }
649
595
  }
650
596
  if (projectDir == null && process.env.VITEST !== "true" && process.env.NODE_ENV !== "test") {
651
- const message = `BLOCKED: create_task could not resolve an existing project directory for "${project_name}" within the caller's coordinator scope. Refusing to create/dispatch into a fabricated or cross-scope path. Clone the project (or ensure the coordinator session registry points at it) and retry. If "${project_name}" is a non-git automation project, dispatch it from a session whose coordinator dir contains it.`;
597
+ const message = `BLOCKED: create_task could not resolve an existing project directory for "${project_name}" within the caller's coordinator scope. Refusing to create/dispatch into a fabricated or cross-scope path. Clone the project (or ensure the coordinator session registry points at it) and retry. If "${project_name}" is a non-git automation project, dispatch it from a session whose coordinator dir contains it.` + HEADLESS_SCOPE_REMEDY;
652
598
  process.stderr.write(`[create_task] ${message}
653
599
  `);
654
600
  recordOrchestrationEventBestEffort({
@@ -774,7 +720,7 @@ Nothing was created or dispatched. Either pick different work, or \u2014 if that
774
720
  }
775
721
  if (claimRefRaw) {
776
722
  try {
777
- const { acquireClaim } = await import("./work-claims-4QOE7DT2.js");
723
+ const { acquireClaim } = await import("./work-claims-XZL2DKQ3.js");
778
724
  const acquired = await acquireClaim({
779
725
  targets: [{ kind: "work_ref", value: claimRefRaw }],
780
726
  holderSession: callerRoot,
@@ -827,7 +773,7 @@ Claimed ${claimRefRaw} for session ${callerRoot} (claim_group ${acquired.claimGr
827
773
  session_scope: sessionScope,
828
774
  created_at: (/* @__PURE__ */ new Date()).toISOString()
829
775
  }), "utf-8");
830
- const { recordOrchestrationEventBestEffort: recordOE } = await import("./orchestration-events-HVG56HJ5.js");
776
+ const { recordOrchestrationEventBestEffort: recordOE } = await import("./orchestration-events-VBGCIQSS.js");
831
777
  recordOE({
832
778
  eventType: "signal.created",
833
779
  source: "create-task.mcp",
@@ -859,7 +805,7 @@ Claimed ${claimRefRaw} for session ${callerRoot} (claim_group ${acquired.claimGr
859
805
  let projectConflictOpts = {};
860
806
  try {
861
807
  const { getClient } = await import("./lib/database.js");
862
- const { sessionScopeFilter } = await import("./task-scope-74JBTKJN.js");
808
+ const { sessionScopeFilter } = await import("./task-scope-PQ67YRWP.js");
863
809
  const client = getClient();
864
810
  const scope = sessionScopeFilter(task.sessionScope || callerRoot || exeSession || null);
865
811
  const existing = await client.execute({
@@ -1036,6 +982,8 @@ Dispatch deferred: no coordinator session \u2014 auto-wake will spawn ${assigned
1036
982
  }
1037
983
  } catch (dispatchErr) {
1038
984
  dispatchOutcome = "failed";
985
+ dispatchStatus = `
986
+ Dispatch FAILED: ${dispatchErr instanceof Error ? dispatchErr.message : String(dispatchErr)}`;
1039
987
  try {
1040
988
  releaseDispatchClaim(task.id, assigned_to, "dispatch exception");
1041
989
  } catch {
@@ -1094,6 +1042,20 @@ Status: blocked (waiting on ${blocked_by})`;
1094
1042
  text += `
1095
1043
  Warning: ${task.warning}`;
1096
1044
  }
1045
+ if (dispatchOutcome === "failed") {
1046
+ return {
1047
+ content: [
1048
+ {
1049
+ type: "text",
1050
+ text: `${text}
1051
+
1052
+ \u26A0 THE TASK ROW EXISTS BUT NO ONE WAS DISPATCHED. Task ${task.id} is durable and assigned to ${assigned_to}, but the spawn/intercom did not land, so ${assigned_to} has NOT been told about it and will not start on its own.
1053
+ Do NOT call create_task again \u2014 that duplicates the row. Re-dispatch the EXISTING task instead (resume_employee for ${assigned_to}, or exe-dispatch), or tell a human. The dispatch intent is journaled and will be surfaced by the daemon's stalled-dispatch check.`
1054
+ }
1055
+ ],
1056
+ isError: true
1057
+ };
1058
+ }
1097
1059
  return {
1098
1060
  content: [
1099
1061
  {
@@ -1110,12 +1072,6 @@ export {
1110
1072
  isSafeProjectName,
1111
1073
  findProjectChildDir,
1112
1074
  findAutomationChildDir,
1113
- DISPATCH_JOURNAL_ORPHAN_AGE_MS,
1114
- dispatchJournalDir,
1115
- journalDispatchIntent,
1116
- updateDispatchJournalEntry,
1117
- clearDispatchJournalEntry,
1118
- findOrphanedDispatchIntents,
1119
1075
  resolveProjectDir,
1120
1076
  resolveCoordinatorOwnProjectDir,
1121
1077
  registerCreateTask
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  getActiveAgent
3
- } from "./chunk-QWDZNQXA.js";
3
+ } from "./chunk-NNXPIJRB.js";
4
4
  import {
5
5
  listTasks
6
- } from "./chunk-QX33D4CH.js";
6
+ } from "./chunk-Y4AYNLXU.js";
7
7
  import {
8
8
  getAgentContext
9
9
  } from "./chunk-GJV3WDWM.js";
10
10
  import {
11
11
  isCoordinatorName
12
- } from "./chunk-HSBKV5LB.js";
12
+ } from "./chunk-OBESOWFJ.js";
13
13
 
14
14
  // src/mcp/tools/list-tasks.ts
15
15
  import { z } from "zod";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-HHGOCBVQ.js";
5
5
  import {
6
6
  getClient
7
- } from "./chunk-HSBKV5LB.js";
7
+ } from "./chunk-OBESOWFJ.js";
8
8
 
9
9
  // src/lib/global-procedures.ts
10
10
  import { randomUUID } from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  registerDaemonScopedQueryChokepoint
3
- } from "./chunk-O3F5P6Z5.js";
3
+ } from "./chunk-GILYOIMP.js";
4
4
  import {
5
5
  orgPartnerModeActive,
6
6
  resolveOrgPartnerBindings,
@@ -19,7 +19,7 @@ import {
19
19
  isConsentMacPrimed,
20
20
  primeTaskOriginMarkerKey,
21
21
  scopedQueryChokepointStatus
22
- } from "./chunk-JOKKIFRN.js";
22
+ } from "./chunk-AAL6CDMQ.js";
23
23
  import {
24
24
  flushMailboxOutbox
25
25
  } from "./chunk-4LWBC7CM.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  isExeSession
3
- } from "./chunk-QX33D4CH.js";
3
+ } from "./chunk-Y4AYNLXU.js";
4
4
  import {
5
5
  recordOrchestrationEventBestEffort
6
- } from "./chunk-UI3K73LD.js";
6
+ } from "./chunk-BFL3UB77.js";
7
7
  import {
8
8
  getClient,
9
9
  isCoordinatorName
10
- } from "./chunk-HSBKV5LB.js";
10
+ } from "./chunk-OBESOWFJ.js";
11
11
  import {
12
12
  isDaemonAlive
13
13
  } from "./chunk-V3W3SATA.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-WCGNCH3Q.js";
4
4
  import {
5
5
  registerAllTools
6
- } from "./chunk-PS4NA7PM.js";
6
+ } from "./chunk-EDB3LXBQ.js";
7
7
 
8
8
  // src/mcp/mcp-surface-hash.ts
9
9
  function computeMcpSurfaceHash() {
@@ -1,6 +1,10 @@
1
1
  import {
2
+ behaviorTruncationNotice
3
+ } from "./chunk-XOTDAKJL.js";
4
+ import {
5
+ countActiveBehaviors,
2
6
  listBehaviors
3
- } from "./chunk-WBKIU6UJ.js";
7
+ } from "./chunk-MCXYNYZI.js";
4
8
  import {
5
9
  loadConfigSync
6
10
  } from "./chunk-QMSEL5YS.js";
@@ -55,11 +59,12 @@ function renderBehaviorLine(row) {
55
59
  const scope = row.project_name ? ` (${row.project_name})` : "";
56
60
  return `- ${tag}${row.content}${scope}`;
57
61
  }
58
- function renderBehaviorExport(behaviors) {
62
+ function renderBehaviorExport(behaviors, counts = { total: behaviors.length, p0: 0 }) {
59
63
  if (behaviors.length === 0) {
60
64
  return "";
61
65
  }
62
66
  const lines = behaviors.map(renderBehaviorLine);
67
+ const notice = behaviorTruncationNotice(behaviors, counts);
63
68
  return [
64
69
  "<system-reminder>",
65
70
  "## Your Behavioral Memory",
@@ -67,6 +72,7 @@ function renderBehaviorExport(behaviors) {
67
72
  "Sourced from exe-os Layer 2 (Expertise). Changes apply on next spawn.",
68
73
  "",
69
74
  ...lines,
75
+ ...notice ? ["", notice] : [],
70
76
  "</system-reminder>",
71
77
  ""
72
78
  ].join("\n");
@@ -86,7 +92,12 @@ async function exportBehaviorsForAgent(agentId, projectName, sessionKey) {
86
92
  sweepStaleBehaviorExports();
87
93
  const behaviors = await listBehaviors(agentId, projectName, getBehaviorLimit());
88
94
  if (behaviors.length === 0) return null;
89
- const body = renderBehaviorExport(behaviors);
95
+ let counts = { total: behaviors.length, p0: 0 };
96
+ try {
97
+ counts = await countActiveBehaviors(agentId, projectName);
98
+ } catch {
99
+ }
100
+ const body = renderBehaviorExport(behaviors, counts);
90
101
  const target = exportFilePath(agentId, projectName, sessionKey);
91
102
  writeFileSync(target, body, "utf-8");
92
103
  return target;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  recordOrchestrationEventBestEffort
3
- } from "./chunk-UI3K73LD.js";
3
+ } from "./chunk-BFL3UB77.js";
4
4
  import {
5
5
  atomicWriteJsonSync
6
6
  } from "./chunk-HSGBZSCA.js";
@@ -9,10 +9,10 @@ import {
9
9
  import {
10
10
  buildClaudeHttpMcpEntry,
11
11
  buildClaudeStdioProxyMcpEntry
12
- } from "./chunk-JFOZHVNO.js";
12
+ } from "./chunk-QCSAYYL6.js";
13
13
  import {
14
14
  ensureAllAgentSymlinks
15
- } from "./chunk-6MCUXRIP.js";
15
+ } from "./chunk-P3PAD6AA.js";
16
16
  import {
17
17
  MCP_LEGACY_KEY,
18
18
  MCP_PRIMARY_KEY
@@ -23,13 +23,13 @@ import {
23
23
 
24
24
  // src/adapters/claude/installer.ts
25
25
  import { readFile, writeFile, mkdir, readdir, rm } from "fs/promises";
26
- import { existsSync, readFileSync, writeFileSync, copyFileSync, mkdirSync, realpathSync } from "fs";
26
+ import { existsSync, readFileSync, writeFileSync, copyFileSync, mkdirSync, realpathSync, statSync } from "fs";
27
27
  import { createHash } from "crypto";
28
28
  import path from "path";
29
29
  import os from "os";
30
30
  import { execSync } from "child_process";
31
31
  import { fileURLToPath } from "url";
32
- function assertCanonicalInstallRoot(packageRoot) {
32
+ function assertCanonicalInstallRoot(packageRoot, opts = {}) {
33
33
  if (process.env.EXE_ALLOW_NONCANONICAL_INSTALL === "1") return;
34
34
  const real = (() => {
35
35
  try {
@@ -57,6 +57,25 @@ function assertCanonicalInstallRoot(packageRoot) {
57
57
  The installer registers this path into global hooks/MCP config (~/.claude/settings.json); when a temp checkout or worktree is deleted, every hook dies system-wide (bug 49550059). Run the installer from the canonical install (e.g. ~/exe-os or the global npm root), or set EXE_ALLOW_NONCANONICAL_INSTALL=1 if you are intentionally sandboxing HOME.`
58
58
  );
59
59
  }
60
+ if (opts.isWorktree ?? isLinkedGitWorktree(real)) {
61
+ throw new Error(
62
+ `[exe-os] REFUSING to install from a git worktree: ${real}
63
+ This checkout is a linked worktree (.git is a gitdir pointer file), so it is expected to be removed once its branch merges \u2014 but the installer would stamp this path into global hooks/MCP config (~/.claude/settings.json), killing every hook system-wide when it goes away (bug 49550059). Build here if you like, but install/deploy from the primary checkout (e.g. ~/exe-os) or the global npm root, or set EXE_ALLOW_NONCANONICAL_INSTALL=1 to override.`
64
+ );
65
+ }
66
+ }
67
+ function isLinkedGitWorktree(root) {
68
+ const dotGit = path.join(root, ".git");
69
+ try {
70
+ if (!statSync(dotGit).isFile()) return false;
71
+ } catch {
72
+ return false;
73
+ }
74
+ try {
75
+ return /^gitdir:\s*\S/m.test(readFileSync(dotGit, "utf-8"));
76
+ } catch {
77
+ return false;
78
+ }
60
79
  }
61
80
  function resolvePackageRoot() {
62
81
  const thisFile = fileURLToPath(import.meta.url);
@@ -923,7 +942,7 @@ async function runInstaller(homeDir) {
923
942
  );
924
943
  }
925
944
  try {
926
- const { generateAgentDefs, summarizeAgentDefResults } = await import("./agent-defs-generator-MLPRGY75.js");
945
+ const { generateAgentDefs, summarizeAgentDefResults } = await import("./agent-defs-generator-M5AUL3WM.js");
927
946
  const defResults = generateAgentDefs({ homeDir: resolvedHome });
928
947
  process.stderr.write(`Agent definitions: ${summarizeAgentDefResults(defResults)}
929
948
  `);
@@ -1133,6 +1152,7 @@ function summarizeSymlinkResults(results) {
1133
1152
 
1134
1153
  export {
1135
1154
  assertCanonicalInstallRoot,
1155
+ isLinkedGitWorktree,
1136
1156
  resolvePackageRoot,
1137
1157
  copySlashCommands,
1138
1158
  detectMcpNameCollisions,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executeAction,
3
3
  substituteTemplate
4
- } from "./chunk-YNPOELAN.js";
4
+ } from "./chunk-LBWEAQ6Z.js";
5
5
 
6
6
  // src/automation/workflow-engine.ts
7
7
  import { randomUUID } from "crypto";
@@ -3,13 +3,13 @@ import {
3
3
  } from "./chunk-HHGOCBVQ.js";
4
4
  import {
5
5
  isGhostBehaviorRow
6
- } from "./chunk-WBKIU6UJ.js";
6
+ } from "./chunk-MCXYNYZI.js";
7
7
  import {
8
8
  getClient,
9
9
  getIdentity,
10
10
  listIdentities,
11
11
  updateIdentity
12
- } from "./chunk-HSBKV5LB.js";
12
+ } from "./chunk-OBESOWFJ.js";
13
13
  import {
14
14
  atomicWriteJsonSync
15
15
  } from "./chunk-HSGBZSCA.js";
@@ -1,24 +1,24 @@
1
1
  import {
2
2
  recordSessionKill
3
- } from "./chunk-YA4PM3MV.js";
3
+ } from "./chunk-BTGR55GX.js";
4
4
  import {
5
5
  sessionScopeFilter,
6
6
  verifyPaneAtCapacity,
7
7
  writeNotification
8
- } from "./chunk-QX33D4CH.js";
8
+ } from "./chunk-Y4AYNLXU.js";
9
9
  import {
10
10
  listSessions
11
- } from "./chunk-XKFMNAJ7.js";
11
+ } from "./chunk-CSBD7QLZ.js";
12
12
  import {
13
13
  getTransport
14
14
  } from "./chunk-UXLO7VHX.js";
15
15
  import {
16
16
  recordOrchestrationEventBestEffort
17
- } from "./chunk-UI3K73LD.js";
17
+ } from "./chunk-BFL3UB77.js";
18
18
  import {
19
19
  getClient,
20
20
  isCoordinatorName
21
- } from "./chunk-HSBKV5LB.js";
21
+ } from "./chunk-OBESOWFJ.js";
22
22
 
23
23
  // src/lib/capacity-monitor.ts
24
24
  var CAPACITY_PATTERNS = [