@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
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-3NGZ4PL7.js";
8
8
  import {
9
9
  computeDaemonHeapCapMb
10
- } from "./chunk-CMDC5D7S.js";
10
+ } from "./chunk-NLEW62VC.js";
11
11
  import {
12
12
  EXE_AI_DIR
13
13
  } from "./chunk-7Y5UDEVM.js";
@@ -42,6 +42,7 @@ function isBootFast() {
42
42
  var _socket = null;
43
43
  var _connected = false;
44
44
  var _autoReconnecting = false;
45
+ var _autoReconnectTimer = null;
45
46
  var _buffer = "";
46
47
  var _requestCount = 0;
47
48
  var _consecutiveFailures = 0;
@@ -54,6 +55,11 @@ var MAX_RETRIES_BEFORE_RESTART = 3;
54
55
  var RETRY_DELAYS_MS = [1e3, 3e3, 5e3];
55
56
  var ALIVE_SOCKET_WARNING_INTERVAL_MS = 6e4;
56
57
  var MISSING_SOCKET_RECOVERY_INTERVAL_MS = 6e4;
58
+ var AUTO_RECONNECT_ALIVE_MIN_MS = parseInt(process.env.EXE_DAEMON_RECONNECT_ALIVE_MIN_MS ?? "", 10) || 2e3;
59
+ var AUTO_RECONNECT_ALIVE_MAX_MS = parseInt(process.env.EXE_DAEMON_RECONNECT_ALIVE_MAX_MS ?? "", 10) || 3e4;
60
+ var AUTO_RECONNECT_DEAD_MIN_MS = parseInt(process.env.EXE_DAEMON_RECONNECT_DEAD_MIN_MS ?? "", 10) || 500;
61
+ var AUTO_RECONNECT_DEAD_MAX_MS = parseInt(process.env.EXE_DAEMON_RECONNECT_DEAD_MAX_MS ?? "", 10) || 1e4;
62
+ var MCP_RECONNECT_WAIT_MAX_MS = parseInt(process.env.EXE_MCP_RECONNECT_WAIT_MAX_MS ?? "", 10) || 25e3;
57
63
  var _pending = /* @__PURE__ */ new Map();
58
64
  var MAX_BUFFER = 1e7;
59
65
  function handleData(chunk) {
@@ -260,6 +266,60 @@ function releaseSpawnLock() {
260
266
  } catch {
261
267
  }
262
268
  }
269
+ function clearAutoReconnectTimer() {
270
+ if (_autoReconnectTimer) {
271
+ clearTimeout(_autoReconnectTimer);
272
+ _autoReconnectTimer = null;
273
+ }
274
+ }
275
+ function autoReconnectDelay(attempt, daemonDeadInitially) {
276
+ const min = daemonDeadInitially ? AUTO_RECONNECT_DEAD_MIN_MS : AUTO_RECONNECT_ALIVE_MIN_MS;
277
+ const max = daemonDeadInitially ? AUTO_RECONNECT_DEAD_MAX_MS : AUTO_RECONNECT_ALIVE_MAX_MS;
278
+ const exponential = Math.min(max, min * Math.pow(2, Math.max(0, attempt - 1)));
279
+ const jitter = Math.random() * Math.min(min, Math.max(1, Math.floor(exponential / 2)));
280
+ return Math.max(1, Math.floor(exponential + jitter));
281
+ }
282
+ function startAutoReconnectLoop() {
283
+ if (_autoReconnecting || isBootFast()) return;
284
+ _autoReconnecting = true;
285
+ const daemonDeadInitially = !isDaemonPidAlive();
286
+ if (daemonDeadInitially) {
287
+ debugLog("[daemon-client] Daemon PID dead \u2014 fast-path respawn (skipping jitter)");
288
+ try {
289
+ cleanupStaleFiles();
290
+ if (acquireSpawnLock()) {
291
+ try {
292
+ spawnDaemon();
293
+ } finally {
294
+ releaseSpawnLock();
295
+ }
296
+ }
297
+ } catch {
298
+ }
299
+ }
300
+ let attempt = 0;
301
+ const scheduleNext = (delayMs) => {
302
+ clearAutoReconnectTimer();
303
+ _autoReconnectTimer = setTimeout(async () => {
304
+ attempt++;
305
+ const ok = await connectToSocket();
306
+ if (ok) {
307
+ clearAutoReconnectTimer();
308
+ _autoReconnecting = false;
309
+ _connectFailedAt = 0;
310
+ if (attempt > 1) debugLog(`[exed-client] Auto-reconnected to daemon (attempt ${attempt})`);
311
+ return;
312
+ }
313
+ if (attempt === 20 || attempt % 60 === 0) {
314
+ debugLog(`[exed-client] Auto-reconnect still pending after ${attempt} attempts; continuing with capped backoff`);
315
+ }
316
+ scheduleNext(autoReconnectDelay(attempt, daemonDeadInitially));
317
+ }, delayMs);
318
+ _autoReconnectTimer.unref?.();
319
+ };
320
+ const initialDelay = daemonDeadInitially ? 200 : Math.floor(Math.random() * AUTO_RECONNECT_ALIVE_MIN_MS);
321
+ scheduleNext(initialDelay);
322
+ }
263
323
  function connectToSocket() {
264
324
  return new Promise((resolve) => {
265
325
  if (_socket && _connected) {
@@ -286,43 +346,7 @@ function connectToSocket() {
286
346
  entry.resolve({ error: "Connection closed" });
287
347
  }
288
348
  if (!_autoReconnecting && !isBootFast()) {
289
- _autoReconnecting = true;
290
- const maxRetries = 20;
291
- let attempt = 0;
292
- const daemonDead = !isDaemonPidAlive();
293
- if (daemonDead) {
294
- debugLog("[daemon-client] Daemon PID dead \u2014 fast-path respawn (skipping jitter)");
295
- try {
296
- cleanupStaleFiles();
297
- if (acquireSpawnLock()) {
298
- try {
299
- spawnDaemon();
300
- } finally {
301
- releaseSpawnLock();
302
- }
303
- }
304
- } catch {
305
- }
306
- }
307
- const jitter = daemonDead ? () => 500 + Math.random() * 500 : () => 2e3 + Math.random() * 2e3;
308
- const initialDelay = daemonDead ? 200 : Math.random() * 2e3;
309
- setTimeout(() => {
310
- const retryTimer = setInterval(async () => {
311
- attempt++;
312
- if (attempt > maxRetries) {
313
- clearInterval(retryTimer);
314
- _autoReconnecting = false;
315
- criticalLog(`[exed-client] Auto-reconnect failed after ${maxRetries} attempts`);
316
- return;
317
- }
318
- const ok = await connectToSocket();
319
- if (ok) {
320
- clearInterval(retryTimer);
321
- _autoReconnecting = false;
322
- if (attempt > 1) debugLog(`[exed-client] Auto-reconnected to daemon (attempt ${attempt})`);
323
- }
324
- }, jitter());
325
- }, initialDelay);
349
+ startAutoReconnectLoop();
326
350
  }
327
351
  });
328
352
  socket.on("error", () => {
@@ -389,7 +413,7 @@ function sendRequest(texts, priority) {
389
413
  function sendDaemonRequest(payload, timeoutMs = REQUEST_TIMEOUT_MS) {
390
414
  return new Promise(async (resolve) => {
391
415
  if ((!_socket || !_connected) && _autoReconnecting) {
392
- const reconnectWaitMs = Math.min(3e3, timeoutMs);
416
+ const reconnectWaitMs = process.env.EXE_MCP_MODE === "1" ? Math.min(MCP_RECONNECT_WAIT_MAX_MS, timeoutMs) : Math.min(3e3, timeoutMs);
393
417
  const waitStart = Date.now();
394
418
  while (!_connected && Date.now() - waitStart < reconnectWaitMs) {
395
419
  await new Promise((r) => setTimeout(r, 500));
@@ -537,6 +561,8 @@ async function embedBatchViaClient(texts, priority = "high") {
537
561
  return !result.error && result.vectors ? result.vectors : null;
538
562
  }
539
563
  function disconnectClient() {
564
+ clearAutoReconnectTimer();
565
+ _autoReconnecting = false;
540
566
  if (_socket) {
541
567
  _socket.destroy();
542
568
  _socket = null;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  fastDbInit
3
- } from "./chunk-ZU6767WK.js";
3
+ } from "./chunk-QMUSJESS.js";
4
4
  import {
5
5
  sessionScopeFilter
6
- } from "./chunk-PLBDXCYZ.js";
6
+ } from "./chunk-KUJGADX6.js";
7
7
  import {
8
8
  formatStatusAll,
9
9
  formatStatusDeep,
@@ -14,7 +14,7 @@ import {
14
14
  getClient,
15
15
  isCoordinatorRole,
16
16
  loadEmployees
17
- } from "./chunk-XLNF3CIO.js";
17
+ } from "./chunk-QGOMYIVT.js";
18
18
  import {
19
19
  isMainModule
20
20
  } from "./chunk-6Y4B3QF6.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getDeviceInfo
3
- } from "./chunk-DQJ3WZRK.js";
3
+ } from "./chunk-IHRXCNSC.js";
4
4
  import {
5
5
  EXE_AI_DIR
6
6
  } from "./chunk-7Y5UDEVM.js";
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  connectEmbedDaemon,
9
9
  embedBatchViaClient
10
- } from "./chunk-3JW3ZXCP.js";
10
+ } from "./chunk-BC7IIR3A.js";
11
11
  import {
12
12
  EXE_AI_DIR
13
13
  } from "./chunk-7Y5UDEVM.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  routeTask
3
- } from "./chunk-QQOH3I4A.js";
3
+ } from "./chunk-VDUHWQFA.js";
4
4
  import {
5
5
  createTaskCore,
6
6
  employeeSessionName,
@@ -9,11 +9,11 @@ import {
9
9
  isEmployeeAlive,
10
10
  sessionScopeFilter,
11
11
  updateTaskStatus
12
- } from "./chunk-PLBDXCYZ.js";
12
+ } from "./chunk-KUJGADX6.js";
13
13
  import {
14
14
  DEFAULT_COORDINATOR_TEMPLATE_NAME,
15
15
  getCoordinatorName
16
- } from "./chunk-XLNF3CIO.js";
16
+ } from "./chunk-QGOMYIVT.js";
17
17
 
18
18
  // src/runtime/orchestrator.ts
19
19
  var STALE_THRESHOLD_MS = 2 * 60 * 60 * 1e3;
@@ -191,8 +191,8 @@ ${task.context}`,
191
191
  });
192
192
  } catch {
193
193
  await client.execute({
194
- sql: `UPDATE tasks SET status = 'done', result = ? WHERE id = ?`,
195
- args: [`[auto-approved] ${item.result}`, item.taskId]
194
+ sql: `UPDATE tasks SET status = 'needs_review', result = ?, updated_at = ? WHERE id = ?`,
195
+ args: [`[auto-approved] ${item.result}`, (/* @__PURE__ */ new Date()).toISOString(), item.taskId]
196
196
  });
197
197
  }
198
198
  autoApproved.push(item);
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getIdentity,
3
3
  loadEmployeesSync
4
- } from "./chunk-XLNF3CIO.js";
4
+ } from "./chunk-QGOMYIVT.js";
5
5
 
6
6
  // src/lib/drift-probes.ts
7
7
  var DRIFT_THRESHOLD = 80;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executeAction,
3
3
  substituteTemplate
4
- } from "./chunk-IZY6V4FI.js";
4
+ } from "./chunk-4O3N7I5Z.js";
5
5
 
6
6
  // src/automation/workflow-engine.ts
7
7
  import { randomUUID } from "crypto";
@@ -1,5 +1,3 @@
1
- import "./chunk-MLKGABMK.js";
2
-
3
1
  // src/lib/signal-paths.ts
4
2
  import { join } from "path";
5
3
  import { homedir } from "os";
@@ -12,8 +10,9 @@ function taskSignalPath(sessionScope, agent, taskId) {
12
10
  function reviewSignalPath(sessionScope, reviewer, taskId) {
13
11
  return join(taskSignalDir(sessionScope), `${reviewer}.review-${taskId}.pending`);
14
12
  }
13
+
15
14
  export {
16
- reviewSignalPath,
17
15
  taskSignalDir,
18
- taskSignalPath
16
+ taskSignalPath,
17
+ reviewSignalPath
19
18
  };
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  isExeSession
3
- } from "./chunk-PLBDXCYZ.js";
3
+ } from "./chunk-KUJGADX6.js";
4
4
  import {
5
5
  recordOrchestrationEventBestEffort
6
- } from "./chunk-HV5CUDOE.js";
6
+ } from "./chunk-F6TJIWN5.js";
7
7
  import {
8
8
  getClient,
9
9
  isCoordinatorName
10
- } from "./chunk-XLNF3CIO.js";
10
+ } from "./chunk-QGOMYIVT.js";
11
11
  import {
12
12
  isDaemonAlive
13
13
  } from "./chunk-7HLWBYH7.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  storeBehavior
3
- } from "./chunk-FANIBYUO.js";
3
+ } from "./chunk-WF3J6GJZ.js";
4
4
  import {
5
5
  getClient
6
- } from "./chunk-XLNF3CIO.js";
6
+ } from "./chunk-QGOMYIVT.js";
7
7
  import {
8
8
  loadConfig
9
9
  } from "./chunk-7Y5UDEVM.js";
@@ -11,15 +11,24 @@ import {
11
11
  // src/lib/skill-learning.ts
12
12
  import crypto from "crypto";
13
13
  var DEFAULT_SKILL_THRESHOLD = 3;
14
+ async function readOffLoop(sql, args = []) {
15
+ if (process.env.EXE_IS_DAEMON === "1") {
16
+ const { offloadReadQuery } = await import("./lib/database.js");
17
+ return offloadReadQuery(sql, args);
18
+ }
19
+ return getClient().execute({ sql, args });
20
+ }
21
+ async function yieldToLoop() {
22
+ await new Promise((resolve) => setImmediate(resolve));
23
+ }
14
24
  async function extractTrajectory(taskId, agentId) {
15
- const client = getClient();
16
- const result = await client.execute({
17
- sql: `SELECT tool_name, raw_text
25
+ const result = await readOffLoop(
26
+ `SELECT tool_name, raw_text
18
27
  FROM memories
19
28
  WHERE task_id = ? AND agent_id = ?
20
29
  ORDER BY timestamp ASC`,
21
- args: [taskId, agentId]
22
- });
30
+ [taskId, agentId]
31
+ );
23
32
  if (result.rows.length === 0) return [];
24
33
  const rawTools = result.rows.map((r) => {
25
34
  const toolName = String(r.tool_name);
@@ -64,16 +73,15 @@ async function storeTrajectory(opts) {
64
73
  return id;
65
74
  }
66
75
  async function findSimilarTrajectories(signature, threshold = DEFAULT_SKILL_THRESHOLD) {
67
- const client = getClient();
68
76
  const hash = hashSignature(signature);
69
- const result = await client.execute({
70
- sql: `SELECT id, task_id, agent_id, project_name, task_title, signature, signature_hash, tool_count, skill_id, created_at
77
+ const result = await readOffLoop(
78
+ `SELECT id, task_id, agent_id, project_name, task_title, signature, signature_hash, tool_count, skill_id, created_at
71
79
  FROM trajectories
72
80
  WHERE signature_hash = ?
73
81
  ORDER BY created_at DESC
74
82
  LIMIT 20`,
75
- args: [hash]
76
- });
83
+ [hash]
84
+ );
77
85
  const mapRow = (r) => ({
78
86
  id: String(r.id),
79
87
  taskId: String(r.task_id),
@@ -88,19 +96,19 @@ async function findSimilarTrajectories(signature, threshold = DEFAULT_SKILL_THRE
88
96
  });
89
97
  const matches = result.rows.map(mapRow);
90
98
  if (matches.length >= threshold) return matches;
91
- const nearResult = await client.execute({
92
- sql: `SELECT id, task_id, agent_id, project_name, task_title, signature, signature_hash, tool_count, skill_id, created_at
99
+ const nearResult = await readOffLoop(
100
+ `SELECT id, task_id, agent_id, project_name, task_title, signature, signature_hash, tool_count, skill_id, created_at
93
101
  FROM trajectories
94
102
  WHERE tool_count BETWEEN ? AND ?
95
103
  AND signature_hash != ?
96
104
  ORDER BY created_at DESC
97
105
  LIMIT 50`,
98
- args: [
106
+ [
99
107
  Math.max(1, signature.length - 3),
100
108
  signature.length + 3,
101
109
  hash
102
110
  ]
103
- });
111
+ );
104
112
  for (const r of nearResult.rows) {
105
113
  const candidateSig = JSON.parse(String(r.signature));
106
114
  if (editDistance(signature, candidateSig) <= 2) {
@@ -177,6 +185,7 @@ async function extractSkill(trajectories, model) {
177
185
  sql: "UPDATE trajectories SET skill_id = ? WHERE id = ?",
178
186
  args: [skillId, t.id]
179
187
  });
188
+ await yieldToLoop();
180
189
  }
181
190
  process.stderr.write(
182
191
  `[skill-learning] Skill extracted from ${trajectories.length} trajectories \u2192 behavior ${skillId}
@@ -215,29 +224,29 @@ async function sweepTrajectories(threshold, model) {
215
224
  const config = await loadConfig();
216
225
  if (!config.skillLearning) return { clustersProcessed: 0, skillsExtracted: 0 };
217
226
  const t = threshold ?? config.skillThreshold;
218
- const client = getClient();
219
- const result = await client.execute({
220
- sql: `SELECT signature_hash, COUNT(*) as cnt
227
+ const result = await readOffLoop(
228
+ `SELECT signature_hash, COUNT(*) as cnt
221
229
  FROM trajectories
222
230
  WHERE skill_id IS NULL
223
231
  GROUP BY signature_hash
224
232
  HAVING cnt >= ?
225
233
  ORDER BY cnt DESC
226
234
  LIMIT 10`,
227
- args: [t]
228
- });
235
+ [t]
236
+ );
229
237
  let clustersProcessed = 0;
230
238
  let skillsExtracted = 0;
231
- for (const row of result.rows) {
239
+ const { runBudgetedSweep } = await import("./sweep-budget-WB2FKPYN.js");
240
+ await runBudgetedSweep(result.rows, async (row) => {
232
241
  const hash = String(row.signature_hash);
233
- const trajResult = await client.execute({
234
- sql: `SELECT id, task_id, agent_id, project_name, task_title, signature, signature_hash, tool_count, created_at
242
+ const trajResult = await readOffLoop(
243
+ `SELECT id, task_id, agent_id, project_name, task_title, signature, signature_hash, tool_count, created_at
235
244
  FROM trajectories
236
245
  WHERE signature_hash = ? AND skill_id IS NULL
237
246
  ORDER BY created_at DESC
238
247
  LIMIT 10`,
239
- args: [hash]
240
- });
248
+ [hash]
249
+ );
241
250
  const trajectories = trajResult.rows.map((r) => ({
242
251
  id: String(r.id),
243
252
  taskId: String(r.task_id),
@@ -255,7 +264,7 @@ async function sweepTrajectories(threshold, model) {
255
264
  const skillId = await extractSkill(trajectories, model ?? config.skillModel);
256
265
  if (skillId) skillsExtracted++;
257
266
  }
258
- }
267
+ }, { label: "skill_sweep" });
259
268
  return { clustersProcessed, skillsExtracted };
260
269
  }
261
270
  function editDistance(a, b) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getClient
3
- } from "./chunk-XLNF3CIO.js";
3
+ } from "./chunk-QGOMYIVT.js";
4
4
 
5
5
  // src/lib/orchestration-events.ts
6
6
  import crypto from "crypto";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  sendMessage
3
- } from "./chunk-OFR7KQ37.js";
3
+ } from "./chunk-HAYDXMW6.js";
4
4
  import {
5
5
  getActiveAgent
6
- } from "./chunk-EOPSIIEH.js";
6
+ } from "./chunk-ID3V4BWS.js";
7
7
 
8
8
  // src/mcp/tools/send-message.ts
9
9
  import { z } from "zod";
@@ -15,10 +15,28 @@ import { readFileSync, existsSync } from "fs";
15
15
  import path from "path";
16
16
  var AGENT_CONFIG_PATH = path.join(EXE_AI_DIR, "agent-config.json");
17
17
  var KNOWN_RUNTIMES = {
18
- claude: ["claude-opus-4.8", "claude-opus-4.8-1m", "claude-opus-4.6", "claude-opus-4", "claude-sonnet-4.8", "claude-sonnet-4.6", "claude-sonnet-4", "claude-haiku-4.5", "claude-fable-5"],
18
+ claude: ["claude-opus-4.8", "claude-opus-4.8-1m", "claude-opus-4.6", "claude-sonnet-4.8", "claude-sonnet-4.6", "claude-haiku-4.5", "claude-fable-5"],
19
19
  codex: ["gpt-5.4", "gpt-5.5", "gpt-5.3-codex-spark", "o3", "o4-mini"],
20
20
  opencode: ["anthropic/claude-opus-4-8", "anthropic/claude-sonnet-4-8", "anthropic/claude-sonnet-4-6", "openai/gpt-5.4", "google/gemini-2.5-pro", "deepseek/deepseek-r3", "minimax/minimax-m2.5"]
21
21
  };
22
+ var RETIRED_MODELS = {
23
+ "claude-sonnet-4": "claude-sonnet-4.6",
24
+ "claude-opus-4": "claude-opus-4.6"
25
+ };
26
+ function canonicalModelId(model) {
27
+ return model.trim().toLowerCase().replace(/^[a-z0-9.-]+\//, "").replace(/\[1m\]$/, "").replace(/-1m$/, "").replace(/(\d+)\.(\d+)/g, "$1-$2");
28
+ }
29
+ function retiredModelReplacement(model) {
30
+ if (!model) return null;
31
+ const canonical = canonicalModelId(model);
32
+ for (const [retired, replacement] of Object.entries(RETIRED_MODELS)) {
33
+ if (canonical === canonicalModelId(retired)) return replacement;
34
+ }
35
+ return null;
36
+ }
37
+ function isRetiredModel(model) {
38
+ return retiredModelReplacement(model) !== null;
39
+ }
22
40
  var MODEL_ALIASES = {
23
41
  claude: {
24
42
  fable: "claude-fable-5"
@@ -30,7 +48,10 @@ var RUNTIME_LABELS = {
30
48
  opencode: "OpenCode (open source)"
31
49
  };
32
50
  var DEFAULT_MODELS = {
33
- claude: "claude-sonnet-4",
51
+ // Bug ac1f9c80: claude-sonnet-4 was RETIRED 2026-06-15. It was the fallback
52
+ // default here, so any agent without an explicit config booted onto a dead
53
+ // model and idled forever. Default now points at the live claude-sonnet-4.6.
54
+ claude: "claude-sonnet-4.6",
34
55
  codex: RUNTIME_TABLE.codex?.defaultModel ?? "gpt-5.4",
35
56
  opencode: RUNTIME_TABLE.opencode?.defaultModel ?? "anthropic/claude-sonnet-4-6"
36
57
  };
@@ -79,6 +100,13 @@ function resolveSpawnRuntimeConfig(agentId, runtimeOverride, modelOverride) {
79
100
  };
80
101
  }
81
102
  function assertRuntimeModelCompatible(runtime, model) {
103
+ const replacement = retiredModelReplacement(model);
104
+ if (replacement) {
105
+ return {
106
+ ok: false,
107
+ error: `Retired model: "${model}" was retired by the provider and no longer accepts prompts. A session spawned on it looks alive but rejects every prompt (task delivery and re-nudges), so the worker idles forever. Migrate the agent to "${replacement}" (e.g. set_agent_config <agent> model=${replacement}). Rejected before spawn to avoid a silently unrecoverable session (bug ac1f9c80).`
108
+ };
109
+ }
82
110
  if (runtime === "codex" && model && isClaudeModel(model)) {
83
111
  const codexModels = KNOWN_RUNTIMES.codex?.join(", ") ?? "gpt-* models";
84
112
  return {
@@ -140,6 +168,9 @@ function clearAgentRuntime(agentId) {
140
168
  export {
141
169
  AGENT_CONFIG_PATH,
142
170
  KNOWN_RUNTIMES,
171
+ RETIRED_MODELS,
172
+ retiredModelReplacement,
173
+ isRetiredModel,
143
174
  MODEL_ALIASES,
144
175
  RUNTIME_LABELS,
145
176
  DEFAULT_MODELS,
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  isClientConnected,
6
6
  sendDaemonRequest
7
- } from "./chunk-3JW3ZXCP.js";
7
+ } from "./chunk-BC7IIR3A.js";
8
8
 
9
9
  // src/lib/memory-queue-client.ts
10
10
  async function writeMemoryViaDaemon(entry) {
@@ -4,17 +4,17 @@ import {
4
4
  resolveExeSession,
5
5
  sendIntercom,
6
6
  strictSessionScopeFilter
7
- } from "./chunk-PLBDXCYZ.js";
7
+ } from "./chunk-KUJGADX6.js";
8
8
  import {
9
9
  parseMessage,
10
10
  serializeMessage
11
11
  } from "./chunk-4JERP7NT.js";
12
12
  import {
13
13
  recordOrchestrationEventBestEffort
14
- } from "./chunk-HV5CUDOE.js";
14
+ } from "./chunk-F6TJIWN5.js";
15
15
  import {
16
16
  getClient
17
- } from "./chunk-XLNF3CIO.js";
17
+ } from "./chunk-QGOMYIVT.js";
18
18
 
19
19
  // src/lib/messaging.ts
20
20
  import crypto from "crypto";
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  loadLicense,
10
10
  readCachedLicenseToken
11
- } from "./chunk-VY7345RO.js";
11
+ } from "./chunk-BMSAJ2IH.js";
12
12
  import {
13
13
  EXE_AI_DIR,
14
14
  loadConfig
@@ -275,7 +275,7 @@ function nextForPostFailure(status) {
275
275
  return "Run `exe-os support health`; if it passes, send this output to AskExe.";
276
276
  }
277
277
  async function runFlush(json) {
278
- const { flushSupportOutbox } = await import("./support-outbox-QPQQK7F7.js");
278
+ const { flushSupportOutbox } = await import("./support-outbox-MGUVVGHT.js");
279
279
  const result = await flushSupportOutbox({ maxPerFlush: 10 });
280
280
  if (json) {
281
281
  console.log(JSON.stringify(result, null, 2));
@@ -298,7 +298,7 @@ async function runFlush(json) {
298
298
  console.log("");
299
299
  }
300
300
  async function runStatus(json) {
301
- const { getOutboxStatus } = await import("./support-outbox-QPQQK7F7.js");
301
+ const { getOutboxStatus } = await import("./support-outbox-MGUVVGHT.js");
302
302
  const status = await getOutboxStatus();
303
303
  if (json) {
304
304
  console.log(JSON.stringify(status, null, 2));