@askexenow/exe-os 0.9.322 → 0.9.323

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 (316) 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/dist/{active-agent-M5NJFEBM.js → active-agent-67BHUBV2.js} +3 -3
  11. package/dist/{active-agent-SHM4QSRJ.js → active-agent-IGVX2AAK.js} +3 -3
  12. package/dist/{agentic-ontology-HQKCU7LG.js → agentic-ontology-I5MEKVGE.js} +1 -1
  13. package/dist/backfill-gate-J7UXFNXU.js +19 -0
  14. package/dist/{backfill-metadata-CXWFCTBO.js → backfill-metadata-N5VVCYFT.js} +4 -4
  15. package/dist/{behaviors-J47D342W.js → behaviors-2YYG72ZH.js} +5 -5
  16. package/dist/bin/agentic-ontology-backfill.js +5 -5
  17. package/dist/bin/agentic-reflection-backfill.js +6 -6
  18. package/dist/bin/agentic-semantic-label.js +5 -5
  19. package/dist/bin/backfill-conversations.js +11 -11
  20. package/dist/bin/backfill-responses.js +11 -11
  21. package/dist/bin/backfill-vectors.js +102 -22
  22. package/dist/bin/bulk-sync-postgres.js +14 -14
  23. package/dist/bin/cc-doctor.js +5 -5
  24. package/dist/bin/cleanup-stale-review-tasks.js +20 -13
  25. package/dist/bin/cli.js +28 -31
  26. package/dist/bin/customer-readiness.js +1 -0
  27. package/dist/bin/deferred-daemon-restart.js +79 -76
  28. package/dist/bin/exe-agent-config.js +3 -3
  29. package/dist/bin/exe-agent.js +4 -4
  30. package/dist/bin/exe-assign.js +10 -10
  31. package/dist/bin/exe-boot.js +31 -22
  32. package/dist/bin/exe-call.js +4 -4
  33. package/dist/bin/exe-cloud.js +120 -47
  34. package/dist/bin/exe-config-dump.js +3 -3
  35. package/dist/bin/exe-dispatch.js +48 -14
  36. package/dist/bin/exe-doctor.js +4 -4
  37. package/dist/bin/exe-export-behaviors.js +7 -7
  38. package/dist/bin/exe-forget.js +6 -6
  39. package/dist/bin/exe-gateway.js +8 -8
  40. package/dist/bin/exe-healthcheck.js +17 -8
  41. package/dist/bin/exe-heartbeat.js +20 -13
  42. package/dist/bin/exe-kill.js +23 -16
  43. package/dist/bin/exe-launch-agent.js +29 -26
  44. package/dist/bin/exe-new-employee.js +8 -8
  45. package/dist/bin/exe-pending-messages.js +21 -14
  46. package/dist/bin/exe-pending-notifications.js +20 -13
  47. package/dist/bin/exe-pending-reviews.js +20 -13
  48. package/dist/bin/exe-rename.js +4 -4
  49. package/dist/bin/exe-review.js +22 -15
  50. package/dist/bin/exe-search.js +8 -13
  51. package/dist/bin/exe-session-cleanup.js +39 -22
  52. package/dist/bin/exe-settings.js +15 -15
  53. package/dist/bin/exe-start-codex.js +12 -12
  54. package/dist/bin/exe-start-opencode.js +8 -8
  55. package/dist/bin/exe-status.js +21 -14
  56. package/dist/bin/exe-support.js +3 -3
  57. package/dist/bin/exe-team.js +3 -3
  58. package/dist/bin/exe-watchdog.js +278 -39
  59. package/dist/bin/git-sweep.js +21 -14
  60. package/dist/bin/graph-backfill.js +4 -4
  61. package/dist/bin/graph-export.js +5 -5
  62. package/dist/bin/import-history.js +7 -7
  63. package/dist/bin/install-launchd.js +2 -2
  64. package/dist/bin/install.js +120 -87
  65. package/dist/bin/intercom-check.js +4 -4
  66. package/dist/bin/mcp-sessions.js +2 -2
  67. package/dist/bin/orchestration-metrics.js +4 -4
  68. package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
  69. package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
  70. package/dist/bin/registry-proxy.js +1 -1
  71. package/dist/bin/scan-tasks.js +20 -13
  72. package/dist/bin/setup.js +1 -1
  73. package/dist/bin/shard-migrate.js +4 -4
  74. package/dist/bin/stack-update.js +4 -4
  75. package/dist/bin/vps-health-gate.js +1 -1
  76. package/dist/{capability-cards-H7H3MU74.js → capability-cards-RC4JYXCG.js} +2 -2
  77. package/dist/{capacity-monitor-WAEHVBL7.js → capacity-monitor-EDIGJSVQ.js} +21 -14
  78. package/dist/{catchup-brief-L42STIDR.js → catchup-brief-YVSBRXYZ.js} +23 -16
  79. package/dist/{chunk-VSXGFHJY.js → chunk-2COLYLE6.js} +1 -1
  80. package/dist/{chunk-KL5WYWS3.js → chunk-2RR2CJCX.js} +2 -2
  81. package/dist/{chunk-HV5CUDOE.js → chunk-364VBQIC.js} +1 -1
  82. package/dist/{chunk-ABGDTMKC.js → chunk-3CT3GN2B.js} +1 -1
  83. package/dist/{chunk-HWC5W34K.js → chunk-3LZILUET.js} +1 -1
  84. package/dist/{chunk-3M73L663.js → chunk-3MUV2GDZ.js} +2 -2
  85. package/dist/{chunk-GA76RGSP.js → chunk-3QJ3GDQZ.js} +5 -5
  86. package/dist/{chunk-SENJA7BZ.js → chunk-3VYAQUWZ.js} +54 -7
  87. package/dist/{chunk-XLNF3CIO.js → chunk-46AMZT3C.js} +110 -24
  88. package/dist/{chunk-6N4LYEDI.js → chunk-4GK6JTEV.js} +1 -1
  89. package/dist/{chunk-QNUHDEPI.js → chunk-4VW5KF6X.js} +4 -4
  90. package/dist/{chunk-TI6YX3L5.js → chunk-5CRFNQ7L.js} +2 -2
  91. package/dist/{chunk-OI63OVCR.js → chunk-5HXJI7SX.js} +1 -1
  92. package/dist/{chunk-CWQAXO3O.js → chunk-5RACW3LX.js} +28 -3
  93. package/dist/{chunk-EOPSIIEH.js → chunk-5ZQMGI3V.js} +1 -1
  94. package/dist/{chunk-WCCR5IFR.js → chunk-644DVREV.js} +2 -2
  95. package/dist/chunk-6IWLAQ7O.js +40 -0
  96. package/dist/{chunk-ORC5AO7E.js → chunk-6UR7C2NX.js} +1 -1
  97. package/dist/{chunk-F5FAD2YR.js → chunk-7PXMLHPG.js} +2 -2
  98. package/dist/{chunk-FANIBYUO.js → chunk-A2K7YIRL.js} +2 -2
  99. package/dist/{chunk-LB77CSLO.js → chunk-A3CRB4PS.js} +3 -3
  100. package/dist/{chunk-6UQRJCKK.js → chunk-A6I36KVN.js} +2 -2
  101. package/dist/{chunk-CXXERHNC.js → chunk-A6ODMODG.js} +1 -1
  102. package/dist/{chunk-GN3IWZDH.js → chunk-AVEOL6NP.js} +140 -122
  103. package/dist/{chunk-KLG53B63.js → chunk-BKOGHVRO.js} +1 -1
  104. package/dist/{chunk-HIOO7DZ2.js → chunk-CCYEO6EG.js} +5 -5
  105. package/dist/{chunk-NYFPFOYM.js → chunk-CMZIAR5S.js} +1 -1
  106. package/dist/{chunk-6SXJZHRJ.js → chunk-CP4LIKCX.js} +1 -1
  107. package/dist/{chunk-XEBN5CPD.js → chunk-DDRASSJI.js} +6 -6
  108. package/dist/{chunk-7SDS5VCL.js → chunk-DZVQ23CM.js} +7 -7
  109. package/dist/{chunk-NAHAOFTY.js → chunk-E72VLAJH.js} +3 -3
  110. package/dist/{chunk-EVUXF2G4.js → chunk-EAHLB7YN.js} +1 -1
  111. package/dist/{signal-paths-4GOIRLGH.js → chunk-EIKATSE4.js} +3 -4
  112. package/dist/{chunk-HKSJSW2V.js → chunk-EZHNCIO5.js} +1 -1
  113. package/dist/{chunk-QVFJCFNM.js → chunk-FROUDYRT.js} +33 -2
  114. package/dist/{chunk-EPBB2OD3.js → chunk-GHARDROH.js} +2 -2
  115. package/dist/{chunk-ROMB2HH4.js → chunk-GMDLNJ5E.js} +6 -6
  116. package/dist/{chunk-E32KARET.js → chunk-H7FI3AWZ.js} +4 -4
  117. package/dist/{chunk-X62GD6QW.js → chunk-HAA4N3NI.js} +2 -2
  118. package/dist/{chunk-PISGLNV7.js → chunk-HYNNAM4R.js} +5 -5
  119. package/dist/{chunk-KXP3CUTL.js → chunk-I4IMPAZQ.js} +2 -2
  120. package/dist/{chunk-C4BIZXKB.js → chunk-IFXE7QYT.js} +1 -1
  121. package/dist/{chunk-WFHYAKEU.js → chunk-IKFL4OLM.js} +1 -1
  122. package/dist/{chunk-657AQEPY.js → chunk-IKOAALTW.js} +1 -1
  123. package/dist/{chunk-TKBWBHFV.js → chunk-JTF4UVXK.js} +1 -1
  124. package/dist/{chunk-7FBPLVHM.js → chunk-KADUJ7PE.js} +3 -3
  125. package/dist/{chunk-CHSRSESS.js → chunk-KIXTW4VH.js} +1 -1
  126. package/dist/chunk-KPIN44GZ.js +67 -0
  127. package/dist/{chunk-VY7345RO.js → chunk-L5TUAHLX.js} +1 -1
  128. package/dist/{chunk-JXEMAB4M.js → chunk-LX2TYKEQ.js} +1 -1
  129. package/dist/{chunk-ONKIWA3R.js → chunk-ML4S5SHZ.js} +3 -1
  130. package/dist/{chunk-CMDC5D7S.js → chunk-NLEW62VC.js} +6 -0
  131. package/dist/{chunk-OFR7KQ37.js → chunk-NQPAG7CB.js} +3 -3
  132. package/dist/{chunk-6XM6PZXQ.js → chunk-NW6V3XVK.js} +1 -1
  133. package/dist/{chunk-G5TP2D2U.js → chunk-PGEADAZL.js} +3 -3
  134. package/dist/{chunk-AZL3EUR3.js → chunk-QBRBLEXP.js} +229 -29
  135. package/dist/{chunk-MYMA23KC.js → chunk-QCWZMS7B.js} +1 -1
  136. package/dist/{chunk-HGM6NZQH.js → chunk-RYJH6S55.js} +1 -1
  137. package/dist/{chunk-2GBGIXKH.js → chunk-S6XKC36B.js} +1 -1
  138. package/dist/{chunk-QQOH3I4A.js → chunk-SAUO2ZLB.js} +1 -1
  139. package/dist/{chunk-7BZ6TOZN.js → chunk-SE7TU5GX.js} +3 -3
  140. package/dist/{chunk-SQ5JWDJ2.js → chunk-SSIUJXOL.js} +1 -1
  141. package/dist/{chunk-KK4ZOYXJ.js → chunk-SXN3TRJ4.js} +80 -40
  142. package/dist/{chunk-7CUF27OT.js → chunk-T3OGIK3Y.js} +1 -1
  143. package/dist/{skill-refinement-YLIAY7V4.js → chunk-U3VSCPGX.js} +3 -11
  144. package/dist/{chunk-V2ESQU3S.js → chunk-UB322YIG.js} +3 -3
  145. package/dist/{chunk-3JW3ZXCP.js → chunk-UPLY33F7.js} +1 -1
  146. package/dist/{chunk-H2SD2EA7.js → chunk-UW5QD52P.js} +23 -9
  147. package/dist/{chunk-A3KUGBDP.js → chunk-VH345O6X.js} +1 -1
  148. package/dist/{chunk-QYLDCPNG.js → chunk-VJL2BGX2.js} +1 -1
  149. package/dist/{chunk-BFHBHQFA.js → chunk-VQEZ3ZNK.js} +5 -5
  150. package/dist/{chunk-T6AUMO5X.js → chunk-W33H7TWW.js} +1 -1
  151. package/dist/{chunk-ERSFOJGC.js → chunk-W377NZE4.js} +20 -11
  152. package/dist/{chunk-LCZ55G5G.js → chunk-WCXFNUMD.js} +136 -66
  153. package/dist/{chunk-WSYKLS2Y.js → chunk-WRA6OO5V.js} +3 -3
  154. package/dist/{chunk-XP53WEXP.js → chunk-WYHCMHTL.js} +3 -3
  155. package/dist/{chunk-YIFZZYQD.js → chunk-X2K2LHFO.js} +2 -2
  156. package/dist/{chunk-PLBDXCYZ.js → chunk-XK7HAEFC.js} +1446 -612
  157. package/dist/{chunk-DGFIXJ4S.js → chunk-XYJXJWKH.js} +3 -3
  158. package/dist/{chunk-XC7C3GQ2.js → chunk-YOS4FN26.js} +30 -19
  159. package/dist/{chunk-NFM6VHL7.js → chunk-YS7VW7KR.js} +1 -1
  160. package/dist/{chunk-6IBUQBMY.js → chunk-YTPNOTUS.js} +198 -39
  161. package/dist/{chunk-LOE2N23P.js → chunk-ZR57QAJ2.js} +1 -1
  162. package/dist/{chunk-4Z47UMMM.js → chunk-ZU2UK4BC.js} +23 -23
  163. package/dist/{cleanup-graph-garbage-MX5JDTJA.js → cleanup-graph-garbage-5KI4MSDC.js} +4 -4
  164. package/dist/{co-activation-K44LGZ7A.js → co-activation-JRDKF2M3.js} +2 -2
  165. package/dist/{co-occurrence-N62HJTRP.js → co-occurrence-JGFIAEKR.js} +2 -2
  166. package/dist/{code-context-index-6YQ3DGCN.js → code-context-index-NODPVXHC.js} +3 -3
  167. package/dist/{crdt-sync-BO76VVRX.js → crdt-sync-NOWBFD5N.js} +1 -1
  168. package/dist/{crm-bridge-BVTB6LZK.js → crm-bridge-CZLEW2LW.js} +1 -1
  169. package/dist/{crm-webhook-UZLTHXAS.js → crm-webhook-FXSSAHON.js} +2 -2
  170. package/dist/{cto-delegation-gate-NVMRONA2.js → cto-delegation-gate-J6DDJFAB.js} +19 -12
  171. package/dist/{daemon-orchestration-JI3RD5EZ.js → daemon-orchestration-HIZMZ2Y5.js} +31 -16
  172. package/dist/{db-backup-ITRADB2J.js → db-backup-I5GQBRIG.js} +1 -1
  173. package/dist/{doc-graph-extractor-L7YESUSI.js → doc-graph-extractor-TAZHM63R.js} +2 -2
  174. package/dist/{documents-7BFXA6V3.js → documents-XXOQ5QIJ.js} +10 -10
  175. package/dist/{dreaming-NRTMPNPZ.js → dreaming-V275C7L2.js} +20 -13
  176. package/dist/{exe-drift-GLJIM7EI.js → exe-drift-VOJZYOIO.js} +3 -3
  177. package/dist/{exe-export-THIAYHXK.js → exe-export-EDQDGZV3.js} +6 -6
  178. package/dist/{exe-import-3Y4VOUYL.js → exe-import-DV7GKBZD.js} +6 -6
  179. package/dist/{exe-key-IPGY4RMU.js → exe-key-6SLYWY36.js} +77 -74
  180. package/dist/{exe-snapshot-2ZEWCDYK.js → exe-snapshot-TDQI34DW.js} +23 -16
  181. package/dist/{fast-db-init-TLYUWCDE.js → fast-db-init-SNHHRW3L.js} +1 -1
  182. package/dist/{founder-context-J362DNU4.js → founder-context-UZVRU4HI.js} +2 -2
  183. package/dist/gateway/index.js +12 -12
  184. package/dist/{git-staleness-BRDHTHNS.js → git-staleness-TRCX6FVG.js} +2 -2
  185. package/dist/{global-procedures-FNUKY2LF.js → global-procedures-LH4JG3CR.js} +3 -3
  186. package/dist/{graph-auto-extract-AJZUV3PO.js → graph-auto-extract-YTXHYR35.js} +2 -2
  187. package/dist/hooks/bug-report-worker.js +22 -15
  188. package/dist/hooks/codex-stop-task-finalizer.js +22 -15
  189. package/dist/hooks/commit-complete.js +22 -15
  190. package/dist/hooks/error-recall.js +6 -6
  191. package/dist/hooks/exe-heartbeat-hook.js +3 -3
  192. package/dist/hooks/ingest-worker.js +6 -6
  193. package/dist/hooks/ingest.js +6 -6
  194. package/dist/hooks/instructions-loaded.js +4 -4
  195. package/dist/hooks/manifest.json +20 -20
  196. package/dist/hooks/notification.js +4 -4
  197. package/dist/hooks/post-compact.js +21 -14
  198. package/dist/hooks/post-tool-combined.js +8 -8
  199. package/dist/hooks/pre-compact.js +22 -21
  200. package/dist/hooks/pre-tool-use.js +29 -19
  201. package/dist/hooks/prompt-submit.js +89 -72
  202. package/dist/hooks/session-end.js +27 -26
  203. package/dist/hooks/session-start.js +13 -13
  204. package/dist/hooks/stop.js +28 -21
  205. package/dist/hooks/subagent-stop.js +24 -41
  206. package/dist/hooks/summary-worker.js +27 -25
  207. package/dist/index.js +30 -23
  208. package/dist/{installer-SC7CQBYY.js → installer-U7D3PAR5.js} +5 -5
  209. package/dist/{installer-2EKTDQZB.js → installer-W4SHZFOR.js} +5 -5
  210. package/dist/{installer-UEF44TWQ.js → installer-WHO23TIO.js} +5 -5
  211. package/dist/intercom-queue-2XB622OR.js +53 -0
  212. package/dist/lib/agent-config.js +7 -1
  213. package/dist/lib/cloud-sync.js +16 -14
  214. package/dist/lib/consolidation.js +5 -5
  215. package/dist/lib/database.js +10 -2
  216. package/dist/lib/db-daemon-client.js +3 -3
  217. package/dist/lib/db.js +10 -2
  218. package/dist/lib/device-registry.js +1 -1
  219. package/dist/lib/embed-worker.js +28 -0
  220. package/dist/lib/embedder.js +3 -3
  221. package/dist/lib/employee-templates.js +4 -4
  222. package/dist/lib/employees.js +2 -2
  223. package/dist/lib/exe-daemon-client.js +2 -2
  224. package/dist/lib/exe-daemon.js +319 -129
  225. package/dist/lib/hybrid-search.js +5 -5
  226. package/dist/lib/identity.js +2 -2
  227. package/dist/lib/license.js +2 -2
  228. package/dist/lib/messaging.js +20 -13
  229. package/dist/lib/registry-proxy.js +1 -1
  230. package/dist/lib/reminders.js +3 -3
  231. package/dist/lib/schedules.js +5 -5
  232. package/dist/lib/session-registry.js +4 -4
  233. package/dist/lib/skill-learning.js +6 -6
  234. package/dist/lib/store.js +4 -4
  235. package/dist/lib/task-router.js +3 -3
  236. package/dist/lib/tasks.js +21 -14
  237. package/dist/lib/tmux-routing.js +27 -12
  238. package/dist/lib/token-spend.js +3 -3
  239. package/dist/{license-gate-YUUSIPJ7.js → license-gate-7CYKGRXW.js} +3 -3
  240. package/dist/{license-sync-LX73IEBH.js → license-sync-H4TVZ7PR.js} +2 -2
  241. package/dist/mcp/register-tools.js +74 -71
  242. package/dist/mcp/server.js +98 -132
  243. package/dist/mcp/tools/complete-reminder.js +4 -4
  244. package/dist/mcp/tools/create-reminder.js +4 -4
  245. package/dist/mcp/tools/create-task.js +37 -18
  246. package/dist/mcp/tools/deactivate-behavior.js +7 -7
  247. package/dist/mcp/tools/list-reminders.js +4 -4
  248. package/dist/mcp/tools/list-tasks.js +23 -16
  249. package/dist/mcp/tools/send-message.js +22 -15
  250. package/dist/mcp/tools/update-task.js +22 -15
  251. package/dist/{mcp-http-config-MBG5AQNH.js → mcp-http-config-LEBUOECG.js} +3 -3
  252. package/dist/{memory-cards-MGZ4P3AA.js → memory-cards-47XM3VWW.js} +4 -4
  253. package/dist/{memory-graph-extractor-44P2ATID.js → memory-graph-extractor-COD5E52L.js} +3 -3
  254. package/dist/{memory-poisoning-defense-3CYFKNLA.js → memory-poisoning-defense-SBYOEXT3.js} +2 -2
  255. package/dist/{memory-pressure-watchdog-6PFLEOUO.js → memory-pressure-watchdog-T276SDOR.js} +20 -13
  256. package/dist/{memory-queue-client-BZD6MXA5.js → memory-queue-client-IQ52W7W4.js} +3 -3
  257. package/dist/{memory-reflection-AYPJRPU7.js → memory-reflection-UZK5MHG2.js} +7 -9
  258. package/dist/{notifications-BBQ23ORD.js → notifications-O5DH4O35.js} +19 -12
  259. package/dist/{orchestration-events-O5P5NEKS.js → orchestration-events-65YDDRF4.js} +3 -3
  260. package/dist/{orchestrator-SERM6FDY.js → orchestrator-NHMTDGWJ.js} +21 -14
  261. package/dist/{pipeline-router-T673WGL3.js → pipeline-router-2KJQDX5O.js} +3 -3
  262. package/dist/{plan-limits-QWBN2EKH.js → plan-limits-NQQN5C4S.js} +5 -5
  263. package/dist/{projection-worker-K6TILAZH.js → projection-worker-IUCBINZH.js} +12 -2
  264. package/dist/{prospective-memory-XRNRMEDL.js → prospective-memory-U2TISMIW.js} +2 -2
  265. package/dist/{reranker-3XC5UM4F.js → reranker-D6NSD5A3.js} +1 -1
  266. package/dist/{retrieval-health-ULVVOIPL.js → retrieval-health-LBNMCYNF.js} +1 -1
  267. package/dist/{review-polling-5YGDPJUX.js → review-polling-ZJWELHBP.js} +20 -13
  268. package/dist/runtime/index.js +23 -16
  269. package/dist/{session-events-D52HNUJK.js → session-events-GRHFFRZV.js} +20 -13
  270. package/dist/{session-kill-telemetry-IBNCJSI7.js → session-kill-telemetry-ALV4KMWS.js} +20 -13
  271. package/dist/{session-scope-5FWZ4AYR.js → session-scope-JB5TBNCX.js} +19 -12
  272. package/dist/{setup-wizard-KVTLSSRD.js → setup-wizard-5STOE3PS.js} +1 -1
  273. package/dist/signal-paths-4G53QTII.js +11 -0
  274. package/dist/skill-refinement-JB2LRDLS.js +20 -0
  275. package/dist/{stack-update-OWWGTYRB.js → stack-update-ZG4YS7WS.js} +9 -3
  276. package/dist/{steward-gate-3ZITRYVH.js → steward-gate-TE63SGPL.js} +3 -3
  277. package/dist/{support-outbox-QPQQK7F7.js → support-outbox-MGUVVGHT.js} +96 -44
  278. package/dist/sweep-budget-WB2FKPYN.js +64 -0
  279. package/dist/{task-enforcement-L4YTDOOX.js → task-enforcement-72WZMQGC.js} +191 -17
  280. package/dist/{task-scope-OIHLMQOQ.js → task-scope-FLDBFGWR.js} +25 -12
  281. package/dist/{tasks-crud-QUIIRWE3.js → tasks-crud-DKOSSXTD.js} +23 -12
  282. package/dist/{tasks-notify-ANYLB5GU.js → tasks-notify-WEWKM6B3.js} +20 -13
  283. package/dist/{tasks-review-BWSCXFMB.js → tasks-review-MHCL7PNP.js} +27 -14
  284. package/dist/{telemetry-upload-XLDBCD7B.js → telemetry-upload-K2MZ4O6U.js} +7 -7
  285. package/dist/{token-budget-OQCLPV3A.js → token-budget-MZZ5DLOH.js} +3 -3
  286. package/dist/{tool-capability-index-3UWKZZED.js → tool-capability-index-M3FUNMFF.js} +1 -1
  287. package/dist/{tool-telemetry-AQTFWOWG.js → tool-telemetry-ERE5FRVC.js} +1 -1
  288. package/dist/tui/App.js +27 -20
  289. package/dist/{tui-data-3Y5L5LJB.js → tui-data-JDBTFDAF.js} +19 -12
  290. package/dist/{worker-gate-WJS2MFNA.js → worker-gate-3OR47E4T.js} +1 -1
  291. package/dist/{workflow-engine-EPPZ226V.js → workflow-engine-JLVEE2CI.js} +2 -2
  292. package/dist/{worktree-OYGDGJP7.js → worktree-WLPHLZ2S.js} +4 -4
  293. package/dist/{worktree-sweep-KV4H4766.js → worktree-sweep-S6AYDLAQ.js} +5 -5
  294. package/package.json +3 -3
  295. package/release-notes.json +51 -19
  296. package/dist/chunk-4FVVJ7ME.js +0 -193
  297. package/dist/completion-nudge-dedup-DBZF24MM.js +0 -74
  298. package/dist/git-task-sweep-7GVUKDBW.js +0 -47
  299. package/dist/intercom-queue-6M5IRX3Y.js +0 -17
  300. /package/dist/{chunk-SJZT66LM.js → chunk-2G75BF5J.js} +0 -0
  301. /package/dist/{chunk-SIJSFULW.js → chunk-6IJ47YFD.js} +0 -0
  302. /package/dist/{chunk-72LWCZTJ.js → chunk-AI3BK3JD.js} +0 -0
  303. /package/dist/{chunk-Q5YKWFVO.js → chunk-B2ONIFHD.js} +0 -0
  304. /package/dist/{chunk-DY3J6GQO.js → chunk-FU767JXE.js} +0 -0
  305. /package/dist/{chunk-ZU6767WK.js → chunk-HWVEDRZA.js} +0 -0
  306. /package/dist/{chunk-WXRVHXVP.js → chunk-MV5OSOP4.js} +0 -0
  307. /package/dist/{chunk-DQJ3WZRK.js → chunk-RYZR4NNE.js} +0 -0
  308. /package/dist/{chunk-RRQI5PSJ.js → chunk-SSM2JHQ4.js} +0 -0
  309. /package/dist/{chunk-IZY6V4FI.js → chunk-TVY65H23.js} +0 -0
  310. /package/dist/{chunk-QTEHH4LG.js → chunk-VW326Q5R.js} +0 -0
  311. /package/dist/{core-memory-DARTILJG.js → core-memory-4AZ2CSQZ.js} +0 -0
  312. /package/dist/{entity-boost-VR5YOQCT.js → entity-boost-WV4GGNN2.js} +0 -0
  313. /package/dist/{message-queue-client-HVFR67QH.js → message-queue-client-JZ7TIOTZ.js} +0 -0
  314. /package/dist/{oauth-server-UQHCFVHT.js → oauth-server-LUJ5P2BH.js} +0 -0
  315. /package/dist/{project-boot-22ZZL2GE.js → project-boot-TOFNGMHM.js} +0 -0
  316. /package/dist/{wiki-acl-EZMGL6KW.js → wiki-acl-3JA23DH3.js} +0 -0
@@ -2,14 +2,18 @@
2
2
  import {
3
3
  checkCpuStealSync
4
4
  } from "../chunk-SSC7EKY2.js";
5
+ import {
6
+ isMainModule
7
+ } from "../chunk-6Y4B3QF6.js";
5
8
  import "../chunk-MLKGABMK.js";
6
9
 
7
10
  // src/bin/exe-watchdog.ts
8
- import { readFileSync, writeFileSync, unlinkSync, existsSync, appendFileSync, mkdirSync, statSync } from "fs";
11
+ import { readFileSync, writeFileSync, unlinkSync, existsSync, appendFileSync, mkdirSync, statSync, realpathSync } from "fs";
9
12
  import { randomUUID } from "crypto";
10
- import { execSync } from "child_process";
13
+ import { spawn } from "child_process";
11
14
  import { get } from "http";
12
15
  import { join } from "path";
16
+ import { fileURLToPath } from "url";
13
17
  import { homedir, userInfo, loadavg, cpus, platform } from "os";
14
18
  var EXE_DIR = process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? join(homedir(), ".exe-os");
15
19
  var PID_PATH = join(EXE_DIR, "exed.pid");
@@ -23,13 +27,23 @@ var DEFAULT_HEALTH_PORT = 48739;
23
27
  var PING_INTERVAL_MS = 1e4;
24
28
  var PING_TIMEOUT_MS = 5e3;
25
29
  var MAX_FAILURES = 3;
26
- var SIGTERM_GRACE_MS = 1e4;
30
+ var SIGTERM_GRACE_MS = 6e4;
27
31
  var KICKSTART_SUPPRESS_TICKS = 3;
28
32
  var MIN_DAEMON_AGE_S = 60;
33
+ var MIN_DAEMON_AGE_LOADED_S = 180;
29
34
  var STEAL_SUPPRESS_PERCENT = 20;
30
35
  var LOAD_PER_CORE_SUPPRESS = 2;
31
- var consecutiveFailures = 0;
36
+ var LOAD_PER_CORE_ELEVATED = 1.5;
37
+ var HEARTBEAT_FRESH_MS = 15e3;
38
+ var STALE_BUILD_CHECK_INTERVAL_MS = 6e4;
39
+ function emptyFailureState() {
40
+ return { count: 0, firstFailureAtMs: null, lastFailureAtMs: null };
41
+ }
42
+ var failureState = emptyFailureState();
32
43
  var suppressTicks = 0;
44
+ var tickInFlight = false;
45
+ var lastSelfStatMs = null;
46
+ var PROCESS_STARTED_AT_MS = Date.now() - process.uptime() * 1e3;
33
47
  function log(msg) {
34
48
  const line = `${(/* @__PURE__ */ new Date()).toISOString()} ${msg}
35
49
  `;
@@ -39,6 +53,9 @@ function log(msg) {
39
53
  } catch {
40
54
  }
41
55
  }
56
+ function sleep(ms) {
57
+ return new Promise((resolve) => setTimeout(resolve, ms));
58
+ }
42
59
  function sanitizePort(raw) {
43
60
  const n = typeof raw === "number" ? raw : parseInt(String(raw ?? "").trim(), 10);
44
61
  if (!Number.isInteger(n) || n <= 0 || n > 65535) return null;
@@ -94,14 +111,99 @@ function pingHealth() {
94
111
  }
95
112
  });
96
113
  }
97
- function daemonAgeSec() {
114
+ function resolveSelfPath() {
115
+ try {
116
+ if (process.argv[1]) return realpathSync(process.argv[1]);
117
+ } catch {
118
+ }
119
+ try {
120
+ return realpathSync(fileURLToPath(import.meta.url));
121
+ } catch {
122
+ return null;
123
+ }
124
+ }
125
+ function checkStaleBuild(opts) {
126
+ const interval = opts.checkIntervalMs ?? STALE_BUILD_CHECK_INTERVAL_MS;
127
+ if (opts.selfPath === null) return { exit: false, checkedMs: opts.lastCheckedMs };
128
+ if (opts.lastCheckedMs !== null && opts.nowMs - opts.lastCheckedMs < interval) {
129
+ return { exit: false, checkedMs: opts.lastCheckedMs };
130
+ }
131
+ try {
132
+ const statFn = opts.statFn ?? statSync;
133
+ const { mtimeMs } = statFn(opts.selfPath);
134
+ return { exit: mtimeMs > opts.processStartMs, checkedMs: opts.nowMs, mtimeMs };
135
+ } catch {
136
+ return { exit: false, checkedMs: opts.nowMs };
137
+ }
138
+ }
139
+ function heartbeatAgeMs(nowMs, readyPath = DAEMON_READY_PATH, statFn = statSync) {
140
+ try {
141
+ return nowMs - statFn(readyPath).mtimeMs;
142
+ } catch {
143
+ return null;
144
+ }
145
+ }
146
+ function isHeartbeatFresh(ageMs, freshMs = HEARTBEAT_FRESH_MS) {
147
+ return ageMs !== null && ageMs > -2e3 && ageMs < freshMs;
148
+ }
149
+ function loadPerCore() {
150
+ try {
151
+ if (platform() === "win32") return 0;
152
+ const cores = Math.max(1, cpus().length);
153
+ const oneMin = loadavg()[0] ?? 0;
154
+ return Number.isFinite(oneMin) && oneMin > 0 ? oneMin / cores : 0;
155
+ } catch {
156
+ return 0;
157
+ }
158
+ }
159
+ function effectiveSigtermGraceMs(perCore) {
160
+ return perCore >= LOAD_PER_CORE_ELEVATED ? SIGTERM_GRACE_MS * 2 : SIGTERM_GRACE_MS;
161
+ }
162
+ function effectiveMinDaemonAgeS(perCore) {
163
+ return perCore >= LOAD_PER_CORE_ELEVATED ? MIN_DAEMON_AGE_LOADED_S : MIN_DAEMON_AGE_S;
164
+ }
165
+ function bootGraceActive(opts) {
166
+ if (opts.ageSec === null) return false;
167
+ if (opts.readySignaledThisBoot) return false;
168
+ return opts.ageSec < effectiveMinDaemonAgeS(opts.perCore);
169
+ }
170
+ function readySignaledByPid(daemonPid) {
171
+ if (daemonPid === null) return false;
172
+ try {
173
+ const ready = JSON.parse(readFileSync(DAEMON_READY_PATH, "utf8"));
174
+ return typeof ready.pid === "number" && ready.pid === daemonPid;
175
+ } catch {
176
+ return false;
177
+ }
178
+ }
179
+ function recordPingFailure(state, nowMs, pingIntervalMs = PING_INTERVAL_MS) {
180
+ if (state.lastFailureAtMs !== null && nowMs - state.lastFailureAtMs > 3 * pingIntervalMs) {
181
+ return { next: { count: 1, firstFailureAtMs: nowMs, lastFailureAtMs: nowMs }, staleGapReset: true };
182
+ }
183
+ return {
184
+ next: {
185
+ count: state.count + 1,
186
+ firstFailureAtMs: state.firstFailureAtMs ?? nowMs,
187
+ lastFailureAtMs: nowMs
188
+ },
189
+ staleGapReset: false
190
+ };
191
+ }
192
+ function hasSustainedFailures(state, nowMs, maxFailures = MAX_FAILURES, pingIntervalMs = PING_INTERVAL_MS) {
193
+ if (state.count < maxFailures || state.firstFailureAtMs === null) return false;
194
+ return nowMs - state.firstFailureAtMs >= (maxFailures - 1) * pingIntervalMs;
195
+ }
196
+ function daemonAgeSec(pidPath = PID_PATH, nowMs = Date.now()) {
98
197
  try {
99
- const stat = statSync(PID_PATH);
100
- return (Date.now() - stat.mtimeMs) / 1e3;
198
+ const stat = statSync(pidPath);
199
+ return Math.max(0, (nowMs - stat.mtimeMs) / 1e3);
101
200
  } catch {
102
- return Infinity;
201
+ return null;
103
202
  }
104
203
  }
204
+ function describeDaemonAge(ageSec) {
205
+ return ageSec === null ? "unknown (PID file missing)" : `${Math.round(ageSec)}s`;
206
+ }
105
207
  function readPid() {
106
208
  try {
107
209
  if (!existsSync(PID_PATH)) return null;
@@ -113,26 +215,63 @@ function readPid() {
113
215
  return null;
114
216
  }
115
217
  }
116
- function killDaemon(pid) {
218
+ var bootDeferStreak = 0;
219
+ var MAX_BOOT_DEFERRALS = 10;
220
+ async function detectBootingDaemon() {
221
+ const port = resolveHealthPort();
222
+ const portAlive = await new Promise((resolve) => {
223
+ try {
224
+ const req = get({ host: "127.0.0.1", port, path: "/health", timeout: 2e3 }, (res) => {
225
+ res.resume();
226
+ resolve(true);
227
+ });
228
+ req.on("timeout", () => {
229
+ req.destroy();
230
+ resolve(false);
231
+ });
232
+ req.on("error", () => resolve(false));
233
+ } catch {
234
+ resolve(false);
235
+ }
236
+ });
237
+ if (portAlive) return `health port ${port} is answering`;
238
+ return await new Promise((resolve) => {
239
+ let out = "";
240
+ try {
241
+ const child = spawn("pgrep", ["-f", "exe-os-node"], { timeout: 3e3, killSignal: "SIGKILL" });
242
+ child.stdout?.on("data", (d) => {
243
+ out += String(d);
244
+ });
245
+ child.on("error", () => resolve(null));
246
+ child.on("exit", () => {
247
+ const pids = out.trim().split("\n").filter((p) => p && Number(p) !== process.pid);
248
+ resolve(pids.length > 0 ? `exe-os-node process(es) ${pids.join(",")} alive` : null);
249
+ });
250
+ } catch {
251
+ resolve(null);
252
+ }
253
+ });
254
+ }
255
+ async function killDaemon(pid, graceMs) {
117
256
  try {
118
257
  process.kill(pid, "SIGTERM");
119
258
  } catch {
120
259
  return;
121
260
  }
122
- const deadline = Date.now() + SIGTERM_GRACE_MS;
261
+ const deadline = Date.now() + graceMs;
123
262
  while (Date.now() < deadline) {
124
263
  try {
125
264
  process.kill(pid, 0);
126
265
  } catch {
127
266
  return;
128
267
  }
129
- Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 500);
268
+ await sleep(500);
130
269
  }
131
270
  try {
132
271
  process.kill(pid, "SIGKILL");
133
272
  } catch {
134
273
  }
135
- log(`[watchdog] SIGKILL sent to ${pid} after SIGTERM grace expired`);
274
+ log(`[watchdog] SIGKILL sent to ${pid} after SIGTERM grace (${Math.round(graceMs / 1e3)}s) expired`);
136
275
  }
137
276
  function cleanupStaleFiles() {
138
277
  try {
@@ -153,18 +292,43 @@ function writeRestartIntentMarker(reason) {
153
292
  log(`[watchdog] WARNING: could not write restart-intent marker: ${err instanceof Error ? err.message : String(err)}`);
154
293
  }
155
294
  }
156
- function kickstartDaemon() {
295
+ function runSupervisorCommand(cmd, args, timeoutMs) {
296
+ return new Promise((resolve) => {
297
+ let settled = false;
298
+ const settle = (r) => {
299
+ if (settled) return;
300
+ settled = true;
301
+ clearTimeout(fallback);
302
+ resolve(r);
303
+ };
304
+ const fallback = setTimeout(() => settle({ ok: false, detail: `no exit after ${timeoutMs + 5e3}ms \u2014 abandoned` }), timeoutMs + 5e3);
305
+ fallback.unref();
306
+ try {
307
+ const child = spawn(cmd, args, { stdio: "ignore", timeout: timeoutMs, killSignal: "SIGKILL" });
308
+ child.on("error", (err) => settle({ ok: false, detail: err.message }));
309
+ child.on("exit", (code, signal) => {
310
+ if (signal) settle({ ok: false, detail: `killed by ${signal} after ${timeoutMs}ms timeout` });
311
+ else settle({ ok: code === 0, detail: `exit ${code}` });
312
+ });
313
+ } catch (err) {
314
+ settle({ ok: false, detail: err instanceof Error ? err.message : String(err) });
315
+ }
316
+ });
317
+ }
318
+ async function kickstartDaemon() {
157
319
  try {
158
320
  if (process.platform === "darwin") {
159
321
  const uid = userInfo().uid;
160
322
  const target = `gui/${uid}/com.askexe.exed`;
161
323
  log(`[watchdog] Issuing: launchctl kickstart -k ${target}`);
162
- execSync(`launchctl kickstart -k ${target} 2>/dev/null`, { timeout: 1e4 });
163
- log("[watchdog] launchctl kickstart succeeded");
324
+ const res = await runSupervisorCommand("launchctl", ["kickstart", "-k", target], 1e4);
325
+ if (res.ok) log("[watchdog] launchctl kickstart succeeded");
326
+ else log(`[watchdog] kickstart command failed (non-fatal, launchd passive relaunch may still trigger): ${res.detail}`);
164
327
  } else if (process.platform === "linux") {
165
328
  log("[watchdog] Issuing: systemctl --user start exe-os");
166
- execSync("systemctl --user start exe-os 2>/dev/null", { timeout: 1e4 });
167
- log("[watchdog] systemctl --user start exe-os succeeded");
329
+ const res = await runSupervisorCommand("systemctl", ["--user", "start", "exe-os"], 1e4);
330
+ if (res.ok) log("[watchdog] systemctl --user start exe-os succeeded");
331
+ else log(`[watchdog] kickstart command failed (non-fatal, systemd passive restart may still trigger): ${res.detail}`);
168
332
  } else {
169
333
  log(`[watchdog] Unknown platform ${process.platform} \u2014 no kickstart issued`);
170
334
  }
@@ -194,58 +358,133 @@ function detectStarvation() {
194
358
  return { starved: false, reason: "" };
195
359
  }
196
360
  async function tick() {
361
+ const staleCheck = checkStaleBuild({
362
+ selfPath: resolveSelfPath(),
363
+ processStartMs: PROCESS_STARTED_AT_MS,
364
+ nowMs: Date.now(),
365
+ lastCheckedMs: lastSelfStatMs
366
+ });
367
+ lastSelfStatMs = staleCheck.checkedMs;
368
+ if (staleCheck.exit) {
369
+ log("[watchdog] newer build detected \u2014 exiting for launchd relaunch");
370
+ process.exit(0);
371
+ }
197
372
  if (suppressTicks > 0) {
198
373
  suppressTicks--;
199
374
  const healthy2 = await pingHealth();
200
375
  if (healthy2) {
201
376
  log("[watchdog] Daemon healthy after kickstart");
202
- consecutiveFailures = 0;
377
+ failureState = emptyFailureState();
203
378
  suppressTicks = 0;
204
379
  }
205
380
  return;
206
381
  }
207
382
  const healthy = await pingHealth();
208
383
  if (healthy) {
209
- if (consecutiveFailures > 0) {
210
- log(`[watchdog] Daemon recovered after ${consecutiveFailures} failed ping(s)`);
384
+ if (failureState.count > 0) {
385
+ log(`[watchdog] Daemon recovered after ${failureState.count} failed ping(s)`);
211
386
  }
212
- consecutiveFailures = 0;
387
+ failureState = emptyFailureState();
388
+ return;
389
+ }
390
+ const now = Date.now();
391
+ const recorded = recordPingFailure(failureState, now);
392
+ failureState = recorded.next;
393
+ if (recorded.staleGapReset) {
394
+ log(`[watchdog] Ping failed after a stale gap (> ${3 * PING_INTERVAL_MS / 1e3}s since previous failure) \u2014 counter reset (1/${MAX_FAILURES})`);
395
+ return;
396
+ }
397
+ if (failureState.count < MAX_FAILURES) {
398
+ log(`[watchdog] Ping failed (${failureState.count}/${MAX_FAILURES})`);
213
399
  return;
214
400
  }
215
- consecutiveFailures++;
216
- if (consecutiveFailures < MAX_FAILURES) {
217
- log(`[watchdog] Ping failed (${consecutiveFailures}/${MAX_FAILURES})`);
401
+ if (!hasSustainedFailures(failureState, now)) {
402
+ const spanMs = failureState.firstFailureAtMs === null ? 0 : now - failureState.firstFailureAtMs;
403
+ log(`[watchdog] ${failureState.count} ping failures span only ${(spanMs / 1e3).toFixed(1)}s (starved timers fired back-to-back?) \u2014 waiting for wall-clock confirmation`);
218
404
  return;
219
405
  }
406
+ const perCore = loadPerCore();
407
+ const pid = readPid();
220
408
  const age = daemonAgeSec();
221
- if (age < MIN_DAEMON_AGE_S) {
222
- log(`[watchdog] Daemon is only ${Math.round(age)}s old (min ${MIN_DAEMON_AGE_S}s) \u2014 suppressing kill, resetting counter`);
223
- consecutiveFailures = 0;
409
+ if (age === null) {
410
+ log("[watchdog] Daemon PID file missing \u2014 cannot determine daemon age (daemon likely dead); proceeding to self-heal checks");
411
+ } else if (bootGraceActive({ ageSec: age, perCore, readySignaledThisBoot: readySignaledByPid(pid) })) {
412
+ log(`[watchdog] Daemon is only ${Math.round(age)}s old (min ${effectiveMinDaemonAgeS(perCore)}s at load ${perCore.toFixed(2)}/core, not yet ready) \u2014 suppressing kill, resetting counter`);
413
+ failureState = emptyFailureState();
224
414
  return;
225
415
  }
226
416
  const starvation = detectStarvation();
227
417
  if (starvation.starved) {
228
418
  log(`[watchdog] Daemon unresponsive but host is CPU-starved (${starvation.reason}) \u2014 suppressing self-heal (restart won't fix starvation), resetting counter`);
229
- consecutiveFailures = 0;
419
+ failureState = emptyFailureState();
420
+ return;
421
+ }
422
+ const hbAge = heartbeatAgeMs(now);
423
+ if (isHeartbeatFresh(hbAge)) {
424
+ log(`[watchdog] Daemon unresponsive to HTTP ping but daemon.ready heartbeat is fresh (${((hbAge ?? 0) / 1e3).toFixed(1)}s old < ${HEARTBEAT_FRESH_MS / 1e3}s) \u2014 daemon is alive-but-slow; suppressing kill, resetting counter`);
425
+ failureState = emptyFailureState();
230
426
  return;
231
427
  }
232
- log(`[watchdog] Daemon unresponsive for ${consecutiveFailures * PING_INTERVAL_MS / 1e3}s (age ${Math.round(age)}s) \u2014 initiating self-heal`);
428
+ const unresponsiveForS = failureState.firstFailureAtMs === null ? 0 : (now - failureState.firstFailureAtMs + PING_INTERVAL_MS) / 1e3;
429
+ if (pid === null) {
430
+ const booting = await detectBootingDaemon();
431
+ if (booting && bootDeferStreak < MAX_BOOT_DEFERRALS) {
432
+ bootDeferStreak++;
433
+ log(`[watchdog] No PID file but a daemon appears to be BOOTING (${booting}) \u2014 deferring self-heal ${bootDeferStreak}/${MAX_BOOT_DEFERRALS} (kickstart -k would kill it mid-init)`);
434
+ failureState = emptyFailureState();
435
+ return;
436
+ }
437
+ if (booting) {
438
+ log(`[watchdog] Boot-deferral limit reached (${MAX_BOOT_DEFERRALS}) with daemon still not ready (${booting}) \u2014 proceeding with self-heal`);
439
+ }
440
+ }
441
+ bootDeferStreak = 0;
442
+ log(`[watchdog] Daemon unresponsive for ~${Math.round(unresponsiveForS)}s (age ${describeDaemonAge(age)}) \u2014 initiating self-heal`);
233
443
  writeRestartIntentMarker("watchdog-self-heal");
234
- const pid = readPid();
235
444
  if (pid !== null) {
236
- log(`[watchdog] Killing daemon PID ${pid}`);
237
- killDaemon(pid);
445
+ const graceMs = effectiveSigtermGraceMs(perCore);
446
+ log(`[watchdog] Killing daemon PID ${pid} (SIGTERM grace ${Math.round(graceMs / 1e3)}s, load ${perCore.toFixed(2)}/core)`);
447
+ await killDaemon(pid, graceMs);
238
448
  } else {
239
449
  log("[watchdog] No live daemon PID found \u2014 daemon already dead");
240
450
  }
241
451
  cleanupStaleFiles();
242
452
  log("[watchdog] Stale PID/socket removed");
243
- kickstartDaemon();
244
- consecutiveFailures = 0;
453
+ await kickstartDaemon();
454
+ failureState = emptyFailureState();
245
455
  suppressTicks = KICKSTART_SUPPRESS_TICKS;
246
456
  }
247
- log("[watchdog] Started");
248
- setInterval(() => {
249
- tick().catch(() => {
250
- });
251
- }, PING_INTERVAL_MS);
457
+ if (isMainModule(import.meta.url) && (process.argv[1] ?? "").includes("exe-watchdog")) {
458
+ log("[watchdog] Started");
459
+ setInterval(() => {
460
+ if (tickInFlight) return;
461
+ tickInFlight = true;
462
+ tick().catch(() => {
463
+ }).finally(() => {
464
+ tickInFlight = false;
465
+ });
466
+ }, PING_INTERVAL_MS);
467
+ }
468
+ export {
469
+ HEARTBEAT_FRESH_MS,
470
+ LOAD_PER_CORE_ELEVATED,
471
+ MAX_FAILURES,
472
+ MIN_DAEMON_AGE_LOADED_S,
473
+ MIN_DAEMON_AGE_S,
474
+ PING_INTERVAL_MS,
475
+ SIGTERM_GRACE_MS,
476
+ STALE_BUILD_CHECK_INTERVAL_MS,
477
+ bootGraceActive,
478
+ checkStaleBuild,
479
+ daemonAgeSec,
480
+ describeDaemonAge,
481
+ effectiveMinDaemonAgeS,
482
+ effectiveSigtermGraceMs,
483
+ emptyFailureState,
484
+ hasSustainedFailures,
485
+ heartbeatAgeMs,
486
+ isHeartbeatFresh,
487
+ loadPerCore,
488
+ recordPingFailure,
489
+ resolveSelfPath
490
+ };
@@ -1,38 +1,45 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  sweepWorktrees
4
- } from "../chunk-C4BIZXKB.js";
4
+ } from "../chunk-IFXE7QYT.js";
5
5
  import {
6
6
  sweepTasks
7
- } from "../chunk-3M73L663.js";
8
- import "../chunk-PLBDXCYZ.js";
9
- import "../chunk-HWC5W34K.js";
10
- import "../chunk-KLG53B63.js";
11
- import "../chunk-4FVVJ7ME.js";
7
+ } from "../chunk-3MUV2GDZ.js";
8
+ import "../chunk-XK7HAEFC.js";
9
+ import "../chunk-3LZILUET.js";
10
+ import "../chunk-BKOGHVRO.js";
11
+ import "../chunk-U3VSCPGX.js";
12
+ import "../chunk-EIKATSE4.js";
12
13
  import "../chunk-E23LNUWJ.js";
13
14
  import "../chunk-4JERP7NT.js";
14
- import "../chunk-ABGDTMKC.js";
15
+ import "../chunk-3CT3GN2B.js";
15
16
  import "../chunk-SSTLTIF3.js";
16
17
  import "../chunk-RMOBQ6A5.js";
17
18
  import "../chunk-54QCG45Y.js";
18
- import "../chunk-HV5CUDOE.js";
19
- import "../chunk-QVFJCFNM.js";
19
+ import "../chunk-364VBQIC.js";
20
+ import "../chunk-FROUDYRT.js";
20
21
  import "../chunk-NGP6LSV2.js";
21
- import "../chunk-EPBB2OD3.js";
22
+ import "../chunk-GHARDROH.js";
22
23
  import "../chunk-CVYC6DUW.js";
24
+ import "../chunk-W33H7TWW.js";
25
+ import "../chunk-HCJCW7X4.js";
23
26
  import "../chunk-OPU3NYOO.js";
27
+ import "../chunk-UPLY33F7.js";
28
+ import "../chunk-AFNRE2RV.js";
29
+ import "../chunk-3NGZ4PL7.js";
30
+ import "../chunk-NLEW62VC.js";
24
31
  import "../chunk-HYZV25LY.js";
25
32
  import "../chunk-GJV3WDWM.js";
26
33
  import "../chunk-MP2AFCGL.js";
27
- import "../chunk-XLNF3CIO.js";
34
+ import "../chunk-46AMZT3C.js";
28
35
  import "../chunk-2I23RPSI.js";
29
- import "../chunk-WXRVHXVP.js";
36
+ import "../chunk-MV5OSOP4.js";
30
37
  import "../chunk-PNQDP3OA.js";
31
38
  import "../chunk-H73TUI4Y.js";
32
39
  import "../chunk-7HLWBYH7.js";
33
40
  import "../chunk-FXU7JOXK.js";
34
- import "../chunk-VY7345RO.js";
35
- import "../chunk-DQJ3WZRK.js";
41
+ import "../chunk-L5TUAHLX.js";
42
+ import "../chunk-RYZR4NNE.js";
36
43
  import "../chunk-7Y5UDEVM.js";
37
44
  import "../chunk-SHIICYJW.js";
38
45
  import "../chunk-MLKGABMK.js";
@@ -11,17 +11,17 @@ import "../chunk-GUMRIUI5.js";
11
11
  import {
12
12
  disposeStore,
13
13
  initStore
14
- } from "../chunk-H2SD2EA7.js";
14
+ } from "../chunk-UW5QD52P.js";
15
15
  import "../chunk-CHCA3ZM2.js";
16
16
  import "../chunk-OTVEIJUQ.js";
17
- import "../chunk-SIJSFULW.js";
17
+ import "../chunk-6IJ47YFD.js";
18
18
  import "../chunk-Y25OJWOQ.js";
19
19
  import "../chunk-MP2AFCGL.js";
20
20
  import {
21
21
  getClient
22
- } from "../chunk-XLNF3CIO.js";
22
+ } from "../chunk-46AMZT3C.js";
23
23
  import "../chunk-2I23RPSI.js";
24
- import "../chunk-WXRVHXVP.js";
24
+ import "../chunk-MV5OSOP4.js";
25
25
  import "../chunk-PNQDP3OA.js";
26
26
  import "../chunk-H73TUI4Y.js";
27
27
  import "../chunk-7HLWBYH7.js";
@@ -5,20 +5,20 @@ import {
5
5
  } from "../chunk-3OEVDGIY.js";
6
6
  import {
7
7
  fastDbInit
8
- } from "../chunk-ZU6767WK.js";
8
+ } from "../chunk-HWVEDRZA.js";
9
9
  import {
10
10
  disposeStore
11
- } from "../chunk-H2SD2EA7.js";
11
+ } from "../chunk-UW5QD52P.js";
12
12
  import "../chunk-CHCA3ZM2.js";
13
13
  import "../chunk-OTVEIJUQ.js";
14
- import "../chunk-SIJSFULW.js";
14
+ import "../chunk-6IJ47YFD.js";
15
15
  import "../chunk-Y25OJWOQ.js";
16
16
  import "../chunk-MP2AFCGL.js";
17
17
  import {
18
18
  getClient
19
- } from "../chunk-XLNF3CIO.js";
19
+ } from "../chunk-46AMZT3C.js";
20
20
  import "../chunk-2I23RPSI.js";
21
- import "../chunk-WXRVHXVP.js";
21
+ import "../chunk-MV5OSOP4.js";
22
22
  import "../chunk-PNQDP3OA.js";
23
23
  import "../chunk-H73TUI4Y.js";
24
24
  import "../chunk-7HLWBYH7.js";
@@ -1,23 +1,23 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  registerImportConversations
4
- } from "../chunk-LB77CSLO.js";
5
- import "../chunk-F5FAD2YR.js";
4
+ } from "../chunk-A3CRB4PS.js";
5
+ import "../chunk-7PXMLHPG.js";
6
6
  import "../chunk-7UMCQQWS.js";
7
7
  import "../chunk-Z6BZQHP5.js";
8
8
  import "../chunk-GUMRIUI5.js";
9
- import "../chunk-H2SD2EA7.js";
9
+ import "../chunk-UW5QD52P.js";
10
10
  import "../chunk-CHCA3ZM2.js";
11
11
  import "../chunk-OTVEIJUQ.js";
12
- import "../chunk-SIJSFULW.js";
13
- import "../chunk-EOPSIIEH.js";
12
+ import "../chunk-6IJ47YFD.js";
13
+ import "../chunk-5ZQMGI3V.js";
14
14
  import "../chunk-Y25OJWOQ.js";
15
15
  import "../chunk-CVYC6DUW.js";
16
16
  import "../chunk-GJV3WDWM.js";
17
17
  import "../chunk-MP2AFCGL.js";
18
- import "../chunk-XLNF3CIO.js";
18
+ import "../chunk-46AMZT3C.js";
19
19
  import "../chunk-2I23RPSI.js";
20
- import "../chunk-WXRVHXVP.js";
20
+ import "../chunk-MV5OSOP4.js";
21
21
  import "../chunk-PNQDP3OA.js";
22
22
  import "../chunk-H73TUI4Y.js";
23
23
  import "../chunk-7HLWBYH7.js";
@@ -9,9 +9,9 @@ import {
9
9
  resolveAnthropicKeyEnvBlock,
10
10
  resolveAnthropicKeySystemdLine,
11
11
  resolveAnthropicKeyValue
12
- } from "../chunk-7FBPLVHM.js";
13
- import "../chunk-CMDC5D7S.js";
12
+ } from "../chunk-KADUJ7PE.js";
14
13
  import "../chunk-KWOAM7TA.js";
14
+ import "../chunk-NLEW62VC.js";
15
15
  import "../chunk-6Y4B3QF6.js";
16
16
  import "../chunk-MLKGABMK.js";
17
17
  export {