@askexenow/exe-os 0.9.347 → 0.9.348

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 (311) hide show
  1. package/deploy/compose/cloudflared/config.yml.example +9 -6
  2. package/deploy/compose/docker-compose.yml +16 -9
  3. package/deploy/compose/sso-edge/default.conf.template +26 -0
  4. package/deploy/stack-manifests/v0.9.json +1 -1
  5. package/dist/{active-agent-CMY7WTJL.js → active-agent-PX6KAEEQ.js} +4 -3
  6. package/dist/{active-agent-US4KO4LV.js → active-agent-QVLZKWR2.js} +4 -3
  7. package/dist/{agentic-ontology-3Y37SQYR.js → agentic-ontology-6MEXY5L7.js} +1 -1
  8. package/dist/{backfill-metadata-GK66TYQE.js → backfill-metadata-MCFBGWKX.js} +6 -5
  9. package/dist/{backup-verify-72XBKKHL.js → backup-verify-RGB3KKD4.js} +2 -1
  10. package/dist/{behaviors-G7TR6LBM.js → behaviors-6GI6VND2.js} +7 -6
  11. package/dist/bin/agentic-ontology-backfill.js +7 -6
  12. package/dist/bin/agentic-reflection-backfill.js +8 -7
  13. package/dist/bin/agentic-semantic-label.js +7 -6
  14. package/dist/bin/backfill-conversations.js +6 -5
  15. package/dist/bin/backfill-responses.js +6 -5
  16. package/dist/bin/backfill-vectors.js +7 -6
  17. package/dist/bin/bulk-sync-postgres.js +11 -10
  18. package/dist/bin/cc-doctor.js +5 -4
  19. package/dist/bin/cleanup-stale-review-tasks.js +14 -13
  20. package/dist/bin/cli.js +16 -16
  21. package/dist/bin/deferred-daemon-restart.js +105 -91
  22. package/dist/bin/exe-agent-config.js +4 -3
  23. package/dist/bin/exe-agent.js +6 -5
  24. package/dist/bin/exe-assign.js +7 -6
  25. package/dist/bin/exe-boot.js +29 -28
  26. package/dist/bin/exe-call.js +6 -5
  27. package/dist/bin/exe-cloud.js +26 -15
  28. package/dist/bin/exe-config-dump.js +4 -3
  29. package/dist/bin/exe-dispatch.js +14 -13
  30. package/dist/bin/exe-doctor.js +5 -4
  31. package/dist/bin/exe-export-behaviors.js +9 -8
  32. package/dist/bin/exe-forget.js +8 -7
  33. package/dist/bin/exe-gateway.js +8 -7
  34. package/dist/bin/exe-healthcheck.js +5 -4
  35. package/dist/bin/exe-heartbeat.js +16 -15
  36. package/dist/bin/exe-kill.js +18 -17
  37. package/dist/bin/exe-launch-agent.js +24 -23
  38. package/dist/bin/exe-memory-reads.js +6 -5
  39. package/dist/bin/exe-new-employee.js +10 -9
  40. package/dist/bin/exe-os-mcp-proxy.js +4 -3
  41. package/dist/bin/exe-pending-messages.js +15 -14
  42. package/dist/bin/exe-pending-notifications.js +14 -13
  43. package/dist/bin/exe-pending-reviews.js +14 -13
  44. package/dist/bin/exe-rename.js +6 -5
  45. package/dist/bin/exe-review.js +17 -16
  46. package/dist/bin/exe-search.js +7 -6
  47. package/dist/bin/exe-session-cleanup.js +18 -17
  48. package/dist/bin/exe-settings.js +12 -11
  49. package/dist/bin/exe-start-codex.js +97 -15
  50. package/dist/bin/exe-start-opencode.js +10 -9
  51. package/dist/bin/exe-status.js +15 -14
  52. package/dist/bin/exe-support.js +3 -3
  53. package/dist/bin/exe-team.js +4 -3
  54. package/dist/bin/git-sweep.js +15 -14
  55. package/dist/bin/graph-backfill.js +7 -6
  56. package/dist/bin/graph-export.js +7 -6
  57. package/dist/bin/import-history.js +10 -9
  58. package/dist/bin/install.js +71 -70
  59. package/dist/bin/intercom-check.js +4 -4
  60. package/dist/bin/mcp-sessions.js +2 -2
  61. package/dist/bin/orchestration-metrics.js +5 -4
  62. package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
  63. package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
  64. package/dist/bin/pre-publish.js +1 -1
  65. package/dist/bin/reconcile-backlog.js +2 -2
  66. package/dist/bin/registry-proxy.js +1 -1
  67. package/dist/bin/scan-tasks.js +14 -13
  68. package/dist/bin/setup.js +1 -1
  69. package/dist/bin/shard-migrate.js +6 -5
  70. package/dist/bin/stack-update.js +7 -6
  71. package/dist/bin/vps-health-gate.js +1 -1
  72. package/dist/{boot-generation-KG43UYL4.js → boot-generation-FB2J53IG.js} +4 -3
  73. package/dist/{boot-review-sections-56BRURLM.js → boot-review-sections-QF5MZGJI.js} +13 -12
  74. package/dist/{capability-cards-4MN3IVJO.js → capability-cards-YADEM2KN.js} +3 -2
  75. package/dist/{capacity-monitor-4NJTN5QQ.js → capacity-monitor-CG2IGONS.js} +15 -14
  76. package/dist/{catchup-brief-AMBXLHXU.js → catchup-brief-QFVNMTU5.js} +18 -17
  77. package/dist/{chunk-PYNWGP72.js → chunk-23O6LHII.js} +1 -1
  78. package/dist/{chunk-VDJUATQJ.js → chunk-27REQ7KR.js} +1 -1
  79. package/dist/{chunk-G4HOMQY7.js → chunk-2AD2GAPC.js} +1 -1
  80. package/dist/{chunk-QZA5NG6Z.js → chunk-2WJYLXPF.js} +1 -1
  81. package/dist/{chunk-G6IANQKD.js → chunk-43RTUMUT.js} +1 -1
  82. package/dist/{chunk-WOKPKILI.js → chunk-5C46Y4AK.js} +1 -1
  83. package/dist/{chunk-IMHERTUL.js → chunk-5KCC26FB.js} +2 -2
  84. package/dist/{chunk-XRX7F7XW.js → chunk-5RPCWLXE.js} +1 -1
  85. package/dist/{chunk-DZJL775P.js → chunk-6GSYN262.js} +1 -1
  86. package/dist/{chunk-UMK7TNCF.js → chunk-6JQTSKDR.js} +157 -65
  87. package/dist/{chunk-2BOEUPL6.js → chunk-6QRS3IZF.js} +1 -1
  88. package/dist/{chunk-M722B4DA.js → chunk-6WFXNQDJ.js} +1 -1
  89. package/dist/{chunk-LUQ57SRM.js → chunk-7QRMFYOV.js} +23 -9
  90. package/dist/{chunk-I3XN3G3H.js → chunk-7WQ3WHPW.js} +113 -113
  91. package/dist/{chunk-3EMAJBBN.js → chunk-A3YHWWE6.js} +1 -1
  92. package/dist/{chunk-JLYQD2XF.js → chunk-A42356G7.js} +1 -1
  93. package/dist/{chunk-EYWB6526.js → chunk-A43SIGAO.js} +3 -3
  94. package/dist/{chunk-Z7DWUHDP.js → chunk-AFY4V4N3.js} +1 -1
  95. package/dist/{chunk-MT6YGWJ6.js → chunk-AMC2OPYP.js} +1 -1
  96. package/dist/{chunk-SUG5P42S.js → chunk-AQ24P2O7.js} +4 -4
  97. package/dist/{chunk-T7ZLJZAO.js → chunk-AUILJKSM.js} +2 -2
  98. package/dist/{chunk-PRUZNNEF.js → chunk-AXNUMBLO.js} +3 -3
  99. package/dist/{chunk-PEVOVM3W.js → chunk-BOQUXG7N.js} +3 -3
  100. package/dist/{chunk-ILLBFFY6.js → chunk-BUUGFQHL.js} +2 -2
  101. package/dist/{chunk-VMTKHDFM.js → chunk-CCOKYSJA.js} +3 -3
  102. package/dist/{chunk-YSTIPPZK.js → chunk-DAODOSH4.js} +1 -1
  103. package/dist/{chunk-LJGHAZYU.js → chunk-DJYJDK53.js} +7 -7
  104. package/dist/{chunk-K3ZHVW26.js → chunk-DXMTJJP3.js} +4 -4
  105. package/dist/{chunk-IRMJHC23.js → chunk-E3BNUQHW.js} +2 -2
  106. package/dist/{chunk-CNIAEIWV.js → chunk-EFHGK6JP.js} +1 -1
  107. package/dist/{chunk-FM4ZI5ZP.js → chunk-FE6WBI2M.js} +5 -1
  108. package/dist/{chunk-DBDMZTU5.js → chunk-FENYNW52.js} +1 -1
  109. package/dist/{chunk-FJPZ7KHN.js → chunk-FFCPSPNK.js} +1 -1
  110. package/dist/{chunk-FAH7JUNS.js → chunk-FPK753IZ.js} +10 -10
  111. package/dist/{chunk-F6NABQJ4.js → chunk-GA655CUD.js} +2 -2
  112. package/dist/{chunk-BRVDGE7N.js → chunk-GJ6KIHOM.js} +4 -4
  113. package/dist/{chunk-2ESYTX6F.js → chunk-GKNWKQFY.js} +1 -1
  114. package/dist/{chunk-3HGAAWNZ.js → chunk-GLOWJP5H.js} +2 -2
  115. package/dist/{chunk-DNN27P35.js → chunk-H3TA23PH.js} +4 -4
  116. package/dist/{chunk-TQSAPNFW.js → chunk-H5QNVWU4.js} +18 -10
  117. package/dist/{chunk-PO64LWTM.js → chunk-HL24OHHS.js} +9 -9
  118. package/dist/{chunk-FDOURKUO.js → chunk-HYZE3MNS.js} +1 -1
  119. package/dist/{chunk-3T4BRBSH.js → chunk-JORPYG4O.js} +1 -1
  120. package/dist/{chunk-2LZMDOC6.js → chunk-JW5XS35A.js} +5 -5
  121. package/dist/{chunk-3LQMUO5D.js → chunk-KIMAQNSM.js} +3 -3
  122. package/dist/{chunk-AHR3F7HW.js → chunk-KZUU6MNF.js} +1 -1
  123. package/dist/{chunk-VALVWYAK.js → chunk-L36RX54F.js} +5 -5
  124. package/dist/{chunk-UO56K55W.js → chunk-M7PBRIRH.js} +1 -1
  125. package/dist/{chunk-4VLRGKNY.js → chunk-MGMXYI7Y.js} +2 -2
  126. package/dist/{chunk-MESFJRIT.js → chunk-MH5HWMVH.js} +1 -1
  127. package/dist/{chunk-ZK53K7OR.js → chunk-MMOONM6D.js} +1 -1
  128. package/dist/{chunk-CQN4IKRB.js → chunk-MMXIE6HV.js} +1 -1
  129. package/dist/{chunk-VA3ZUIWG.js → chunk-MOZY4IQO.js} +1 -1
  130. package/dist/{chunk-VTMSGELG.js → chunk-MVZLF27P.js} +2 -2
  131. package/dist/{chunk-H44V3Y6D.js → chunk-NY6DU5RB.js} +1 -1
  132. package/dist/{chunk-F4ZW76IX.js → chunk-O522M4YZ.js} +1 -1
  133. package/dist/{chunk-7667KFAG.js → chunk-OBWIVRD6.js} +1 -1
  134. package/dist/{chunk-VDKDW5IA.js → chunk-PAXAF2UY.js} +29 -9
  135. package/dist/{chunk-QFGUAJ6T.js → chunk-PBLDPW4U.js} +2 -2
  136. package/dist/{chunk-D74XYSA3.js → chunk-QCQT5RXR.js} +5 -1
  137. package/dist/{chunk-ZY2ABBVR.js → chunk-QNKR7WEL.js} +20 -6
  138. package/dist/{chunk-XOVHWGPV.js → chunk-RBRGSOK5.js} +1 -1
  139. package/dist/{chunk-Y7637VDZ.js → chunk-RFRUDXOI.js} +2 -2
  140. package/dist/{chunk-7AD4GSRT.js → chunk-SLH2743O.js} +3 -3
  141. package/dist/{chunk-OE6D2IJI.js → chunk-SMQ642D3.js} +4 -4
  142. package/dist/{chunk-4K2PLZKF.js → chunk-SQ4WACH4.js} +1 -1
  143. package/dist/{chunk-HWK5GKE6.js → chunk-TF5E6O5Q.js} +1 -1
  144. package/dist/{chunk-KWRO4RMT.js → chunk-TLWYOMSS.js} +3 -3
  145. package/dist/{chunk-XDVLCS64.js → chunk-UAKGNQWE.js} +1 -1
  146. package/dist/{chunk-JYFBQH5O.js → chunk-UTQWVRU6.js} +5 -5
  147. package/dist/{chunk-FBSAXAXQ.js → chunk-WL3IQJKN.js} +3 -3
  148. package/dist/{chunk-BMTUSSHV.js → chunk-WUMWXU6B.js} +1 -1
  149. package/dist/{chunk-W7HKGDJO.js → chunk-WWT3E7DO.js} +3 -3
  150. package/dist/{chunk-YJK4JZ35.js → chunk-WZJ3VYRJ.js} +3 -3
  151. package/dist/{chunk-QIALRZZG.js → chunk-X6VEQ7MC.js} +1 -1
  152. package/dist/{chunk-W666YWFU.js → chunk-Y3JXLIZV.js} +3 -3
  153. package/dist/{chunk-M3NSYVE3.js → chunk-YAIFZXOM.js} +5 -5
  154. package/dist/{chunk-ZYNQXN73.js → chunk-YM6GJM2F.js} +4 -4
  155. package/dist/chunk-YMUZWC33.js +8 -0
  156. package/dist/{chunk-7DAJHBFH.js → chunk-YTPCJLEL.js} +1 -1
  157. package/dist/{chunk-53VXPGZ2.js → chunk-Z52QQB4Z.js} +2 -2
  158. package/dist/{chunk-EWWCMMES.js → chunk-ZXSFUR77.js} +16 -16
  159. package/dist/{cleanup-graph-garbage-5HKGGUS3.js → cleanup-graph-garbage-XTSBQXD6.js} +8 -7
  160. package/dist/{cloud-sync-shutdown-2JAEIAW6.js → cloud-sync-shutdown-A2QB74YM.js} +3 -2
  161. package/dist/{co-activation-SYSIFY66.js → co-activation-S2FVGMQP.js} +3 -2
  162. package/dist/{co-occurrence-QZFT5ORJ.js → co-occurrence-VQB6U5ME.js} +6 -5
  163. package/dist/{conversation-entity-extractor-YC3A2ODD.js → conversation-entity-extractor-YF3ZLTEJ.js} +3 -3
  164. package/dist/{crdt-sync-W45AKWCU.js → crdt-sync-2SGCDWC3.js} +1 -1
  165. package/dist/{crm-webhook-ZAGDYWB3.js → crm-webhook-P64SXEHD.js} +2 -2
  166. package/dist/{cto-delegation-gate-PLSICYEK.js → cto-delegation-gate-6KLGT2LB.js} +13 -12
  167. package/dist/{daemon-orchestration-QX3FS4L2.js → daemon-orchestration-JQGKEWPD.js} +18 -17
  168. package/dist/{doc-graph-extractor-NK6CP4LE.js → doc-graph-extractor-DCJMATVZ.js} +6 -5
  169. package/dist/{documents-FGXV6BDL.js → documents-7EPH3VPE.js} +7 -6
  170. package/dist/{dreaming-YIESEME7.js → dreaming-O4P2W5E5.js} +17 -16
  171. package/dist/{exe-drift-TLY7MCXW.js → exe-drift-ED7FBS2C.js} +4 -3
  172. package/dist/{exe-export-32J4WPS6.js → exe-export-YJI4USGZ.js} +9 -8
  173. package/dist/{exe-import-MDEWE325.js → exe-import-SUTAYKUW.js} +9 -8
  174. package/dist/{exe-key-NW42YUA3.js → exe-key-CRSDAOZD.js} +69 -68
  175. package/dist/{exe-snapshot-NNEEAGYI.js → exe-snapshot-KB4YYDCA.js} +18 -17
  176. package/dist/{fast-db-init-O7AECNTB.js → fast-db-init-3K2PV6GJ.js} +1 -1
  177. package/dist/{founder-context-3WDZ6LIS.js → founder-context-JHHFM4GF.js} +2 -2
  178. package/dist/gateway/index.js +9 -8
  179. package/dist/{git-main-guard-UZP3KXYI.js → git-main-guard-TGK3RQY3.js} +1 -1
  180. package/dist/{git-staleness-GEJ7U4MW.js → git-staleness-YPHGWE3B.js} +3 -2
  181. package/dist/{global-procedures-HY3BJXY4.js → global-procedures-PEWDBSPJ.js} +5 -4
  182. package/dist/{graph-auto-extract-DBAIFNDK.js → graph-auto-extract-7OJYYV4G.js} +6 -5
  183. package/dist/{graph-rag-LWKKHY72.js → graph-rag-YFITUAVO.js} +3 -3
  184. package/dist/{hook-prefetch-KNHZNI4L.js → hook-prefetch-O6ZCZCTX.js} +14 -13
  185. package/dist/hooks/bug-report-worker.js +16 -15
  186. package/dist/hooks/codex-stop-task-finalizer.js +17 -16
  187. package/dist/hooks/commit-complete.js +16 -15
  188. package/dist/hooks/error-recall.js +8 -7
  189. package/dist/hooks/exe-heartbeat-hook.js +4 -3
  190. package/dist/hooks/ingest.js +7 -6
  191. package/dist/hooks/instructions-loaded.js +5 -4
  192. package/dist/hooks/manifest.json +19 -19
  193. package/dist/hooks/notification.js +5 -4
  194. package/dist/hooks/post-compact.js +15 -14
  195. package/dist/hooks/post-tool-combined.js +9 -9
  196. package/dist/hooks/pre-compact.js +16 -15
  197. package/dist/hooks/pre-tool-use.js +36 -38
  198. package/dist/hooks/prompt-submit.js +28 -27
  199. package/dist/hooks/session-end.js +20 -19
  200. package/dist/hooks/session-start.js +13 -13
  201. package/dist/hooks/stop.js +19 -18
  202. package/dist/hooks/subagent-stop.js +17 -16
  203. package/dist/hooks/summary-worker.js +20 -19
  204. package/dist/index.js +23 -22
  205. package/dist/{installer-R2S64Q6T.js → installer-3ONNP5JV.js} +6 -5
  206. package/dist/{installer-AWALPCAX.js → installer-CY5PN7TN.js} +6 -5
  207. package/dist/{installer-SQF5I6YS.js → installer-N4QXGINR.js} +6 -5
  208. package/dist/{intercom-queue-SJL4G3J5.js → intercom-queue-A52WQOCD.js} +13 -12
  209. package/dist/lib/agent-config.js +1 -1
  210. package/dist/lib/cloud-sync.js +11 -10
  211. package/dist/lib/consolidation.js +8 -7
  212. package/dist/lib/database.js +5 -2
  213. package/dist/lib/db-backup.js +2 -1
  214. package/dist/lib/db-checkpoint-worker.js +9 -0
  215. package/dist/lib/db-read-worker-client.js +21 -8
  216. package/dist/lib/db-read-worker.js +15 -0
  217. package/dist/lib/db-write-worker-client.js +4 -1
  218. package/dist/lib/db-write-worker.js +21 -6
  219. package/dist/lib/db.js +5 -2
  220. package/dist/lib/device-registry.js +1 -1
  221. package/dist/lib/employee-templates.js +6 -5
  222. package/dist/lib/employees.js +3 -2
  223. package/dist/lib/exe-daemon.js +211 -71
  224. package/dist/lib/hybrid-search.js +7 -6
  225. package/dist/lib/identity.js +3 -2
  226. package/dist/lib/license.js +2 -2
  227. package/dist/lib/messaging.js +14 -13
  228. package/dist/lib/registry-proxy.js +1 -1
  229. package/dist/lib/reminders.js +4 -3
  230. package/dist/lib/schedules.js +7 -6
  231. package/dist/lib/session-registry.js +5 -4
  232. package/dist/lib/skill-learning.js +8 -7
  233. package/dist/lib/store.js +6 -5
  234. package/dist/lib/task-router.js +4 -3
  235. package/dist/lib/tasks.js +15 -14
  236. package/dist/lib/tmux-routing.js +13 -12
  237. package/dist/lib/token-spend.js +4 -3
  238. package/dist/{license-gate-ZYZQGPKW.js → license-gate-ZRORTAQ2.js} +3 -3
  239. package/dist/{license-sync-GU3L66JR.js → license-sync-CQHBDUQE.js} +2 -2
  240. package/dist/mcp/register-tools.js +68 -67
  241. package/dist/mcp/server.js +69 -68
  242. package/dist/mcp/tools/complete-reminder.js +5 -4
  243. package/dist/mcp/tools/create-reminder.js +5 -4
  244. package/dist/mcp/tools/create-task.js +17 -16
  245. package/dist/mcp/tools/deactivate-behavior.js +9 -8
  246. package/dist/mcp/tools/list-reminders.js +5 -4
  247. package/dist/mcp/tools/list-tasks.js +17 -16
  248. package/dist/mcp/tools/send-message.js +16 -15
  249. package/dist/mcp/tools/update-task.js +16 -15
  250. package/dist/{mcp-http-config-BV2GO7P4.js → mcp-http-config-2A6HKQP5.js} +4 -3
  251. package/dist/{mcp-session-identity-3QQPOGNI.js → mcp-session-identity-OPRX32H5.js} +13 -12
  252. package/dist/{memory-cards-NISTO4EP.js → memory-cards-GFO2CSPV.js} +6 -5
  253. package/dist/{memory-graph-extractor-CO3R5K7L.js → memory-graph-extractor-2Z72HN5P.js} +7 -6
  254. package/dist/{memory-poisoning-defense-QZCG3BMC.js → memory-poisoning-defense-WZJ52KXT.js} +3 -2
  255. package/dist/{memory-pressure-watchdog-VWQM3GXR.js → memory-pressure-watchdog-IG7VRFIX.js} +14 -13
  256. package/dist/{memory-reflection-G32OQ3X3.js → memory-reflection-LTRHDGUL.js} +3 -2
  257. package/dist/{notification-ledger-C3J4HFMM.js → notification-ledger-KSCPGLQG.js} +14 -13
  258. package/dist/{notifications-JIARMDZ5.js → notifications-YKHZPCXU.js} +13 -12
  259. package/dist/{orchestration-events-AL7AWHBX.js → orchestration-events-HAFDPTLV.js} +4 -3
  260. package/dist/{orchestrator-LWVALDUO.js → orchestrator-4MZEQULR.js} +15 -14
  261. package/dist/{pipeline-router-HK5BI3LQ.js → pipeline-router-RSRJPZNI.js} +4 -3
  262. package/dist/{plan-limits-4LMRHOUW.js → plan-limits-5QYYPIPT.js} +6 -5
  263. package/dist/{platform-procedures-G44IYUM2.js → platform-procedures-DZ6YABEK.js} +1 -1
  264. package/dist/{projection-worker-Z5U6UWCE.js → projection-worker-SKAMSZJF.js} +2 -2
  265. package/dist/{prospective-memory-UDQWFP5Y.js → prospective-memory-V7LFCPU4.js} +3 -2
  266. package/dist/{reranker-FX4QOK2G.js → reranker-HXMJ7SKW.js} +1 -1
  267. package/dist/{retrieval-health-2LIKKDMW.js → retrieval-health-4NCBHUUS.js} +1 -1
  268. package/dist/{review-polling-B2EP4KGE.js → review-polling-KQUALBEU.js} +14 -13
  269. package/dist/runtime/index.js +17 -16
  270. package/dist/{session-events-HVYX42HD.js → session-events-3KL735DZ.js} +14 -13
  271. package/dist/{session-kill-telemetry-BHKUHSK2.js → session-kill-telemetry-KVRGLYVI.js} +14 -13
  272. package/dist/{session-scope-TXCBVOSN.js → session-scope-LBG6DT5O.js} +13 -12
  273. package/dist/{setup-wizard-QMKBAK6B.js → setup-wizard-UL3AKI6E.js} +1 -1
  274. package/dist/{skill-refinement-G6BPD6QK.js → skill-refinement-6HPISXQC.js} +4 -3
  275. package/dist/{stack-update-CBP5S5BG.js → stack-update-WBDTJJEF.js} +7 -3
  276. package/dist/{steward-gate-CGP6U7KC.js → steward-gate-CWPD4HEK.js} +4 -3
  277. package/dist/{support-inbox-3ATAP7KN.js → support-inbox-HRIHHKPU.js} +3 -3
  278. package/dist/{task-enforcement-YINAK3T6.js → task-enforcement-OAOL7XFL.js} +14 -13
  279. package/dist/{task-scope-5OSP2MUP.js → task-scope-PSVAE3EM.js} +13 -12
  280. package/dist/{tasks-crud-PTN36B5F.js → tasks-crud-TLELWWUL.js} +13 -12
  281. package/dist/{tasks-notify-QCJXVZCJ.js → tasks-notify-7Q2XTDZ7.js} +14 -13
  282. package/dist/{tasks-review-ZY3S65OV.js → tasks-review-S6QB5KGS.js} +13 -12
  283. package/dist/{telemetry-upload-Z47OEELW.js → telemetry-upload-LTL5SW24.js} +8 -7
  284. package/dist/{token-budget-B3OKOYDA.js → token-budget-SK32GKFZ.js} +4 -3
  285. package/dist/{tool-telemetry-KIHAHUPT.js → tool-telemetry-QJGJAHOC.js} +1 -1
  286. package/dist/tui/App.js +22 -21
  287. package/dist/{tui-data-YIFXHE2D.js → tui-data-3JSV56ME.js} +13 -12
  288. package/dist/{update-support-IZUWVU2U.js → update-support-LMPGWJVG.js} +10 -9
  289. package/dist/{work-state-heartbeat-WIURKX3N.js → work-state-heartbeat-MQQOCU54.js} +1 -1
  290. package/dist/{worker-gate-NZRA426F.js → worker-gate-P2O64XMH.js} +1 -1
  291. package/dist/{workflow-engine-LAB6TGBZ.js → workflow-engine-BLLQKA3O.js} +2 -2
  292. package/dist/{worktree-TBUUZJHY.js → worktree-FJZXHDCJ.js} +5 -4
  293. package/dist/{worktree-sweep-LXDNIZPM.js → worktree-sweep-SW4AG6JR.js} +6 -5
  294. package/package.json +1 -1
  295. package/release-notes.json +26 -37
  296. /package/dist/{chunk-QPNXYGWG.js → chunk-AQ6ECPUP.js} +0 -0
  297. /package/dist/{chunk-UVPLZ6AK.js → chunk-BTP7BORU.js} +0 -0
  298. /package/dist/{chunk-4P7NUL4D.js → chunk-DRHXISWL.js} +0 -0
  299. /package/dist/{chunk-G4JZ22KK.js → chunk-E42D2E5F.js} +0 -0
  300. /package/dist/{chunk-MA22RV3T.js → chunk-FXZRJT3H.js} +0 -0
  301. /package/dist/{chunk-D4UCBR4O.js → chunk-GFIWADEH.js} +0 -0
  302. /package/dist/{chunk-VBHLE3TR.js → chunk-GPZQZTJB.js} +0 -0
  303. /package/dist/{chunk-FFUEDKYK.js → chunk-H4JKOLXU.js} +0 -0
  304. /package/dist/{chunk-OG2RT4IY.js → chunk-HTJKAAHD.js} +0 -0
  305. /package/dist/{chunk-MDK7E653.js → chunk-PIUDQ7P2.js} +0 -0
  306. /package/dist/{chunk-CYI2YR56.js → chunk-QUOMJKVF.js} +0 -0
  307. /package/dist/{chunk-SJLZ53ZR.js → chunk-XF2D4CDA.js} +0 -0
  308. /package/dist/{core-memory-FOW4BCPN.js → core-memory-Z7LPR3RX.js} +0 -0
  309. /package/dist/{oauth-server-OR4RAQYM.js → oauth-server-FSKABATB.js} +0 -0
  310. /package/dist/{project-boot-WP54EOAG.js → project-boot-FVSC4VQC.js} +0 -0
  311. /package/dist/{wiki-acl-4DQQCP4V.js → wiki-acl-CW2UALTJ.js} +0 -0
@@ -8,24 +8,24 @@ import {
8
8
  isAtCapacity,
9
9
  isWithinRelaunchCooldown,
10
10
  pollCapacityDead
11
- } from "./chunk-M3NSYVE3.js";
12
- import "./chunk-W666YWFU.js";
13
- import "./chunk-EWWCMMES.js";
14
- import "./chunk-XOVHWGPV.js";
15
- import "./chunk-7667KFAG.js";
16
- import "./chunk-JLYQD2XF.js";
11
+ } from "./chunk-YAIFZXOM.js";
12
+ import "./chunk-Y3JXLIZV.js";
13
+ import "./chunk-ZXSFUR77.js";
14
+ import "./chunk-RBRGSOK5.js";
15
+ import "./chunk-OBWIVRD6.js";
16
+ import "./chunk-A42356G7.js";
17
17
  import "./chunk-E23LNUWJ.js";
18
18
  import "./chunk-4JERP7NT.js";
19
19
  import "./chunk-EIKATSE4.js";
20
- import "./chunk-FDOURKUO.js";
20
+ import "./chunk-HYZE3MNS.js";
21
21
  import "./chunk-AD2VCHSS.js";
22
22
  import "./chunk-WOYADZF5.js";
23
23
  import "./chunk-SKGMF2SO.js";
24
- import "./chunk-MT6YGWJ6.js";
24
+ import "./chunk-AMC2OPYP.js";
25
25
  import "./chunk-AJIXH5JF.js";
26
- import "./chunk-3EMAJBBN.js";
26
+ import "./chunk-A3YHWWE6.js";
27
27
  import "./chunk-AM7S2TY6.js";
28
- import "./chunk-Y7637VDZ.js";
28
+ import "./chunk-RFRUDXOI.js";
29
29
  import "./chunk-OSKWCKUC.js";
30
30
  import "./chunk-KI5PFRG6.js";
31
31
  import "./chunk-CVYC6DUW.js";
@@ -39,16 +39,17 @@ import "./chunk-NLEW62VC.js";
39
39
  import "./chunk-HYZV25LY.js";
40
40
  import "./chunk-GJV3WDWM.js";
41
41
  import "./chunk-MP2AFCGL.js";
42
- import "./chunk-ZY2ABBVR.js";
42
+ import "./chunk-QNKR7WEL.js";
43
43
  import "./chunk-2I23RPSI.js";
44
- import "./chunk-FM4ZI5ZP.js";
44
+ import "./chunk-FE6WBI2M.js";
45
45
  import "./chunk-OMXJMOBD.js";
46
46
  import "./chunk-7HLWBYH7.js";
47
47
  import "./chunk-BBMTVAE3.js";
48
+ import "./chunk-YMUZWC33.js";
48
49
  import "./chunk-FXU7JOXK.js";
49
50
  import "./chunk-WNBZJSQT.js";
50
- import "./chunk-ZK53K7OR.js";
51
- import "./chunk-SJLZ53ZR.js";
51
+ import "./chunk-MMOONM6D.js";
52
+ import "./chunk-XF2D4CDA.js";
52
53
  import "./chunk-BCZF3AGJ.js";
53
54
  import "./chunk-HSGBZSCA.js";
54
55
  import "./chunk-MLKGABMK.js";
@@ -1,34 +1,34 @@
1
1
  import {
2
2
  lightweightSearch
3
- } from "./chunk-PO64LWTM.js";
3
+ } from "./chunk-HL24OHHS.js";
4
4
  import "./chunk-AB4PAQYK.js";
5
- import "./chunk-TQSAPNFW.js";
6
- import "./chunk-FFUEDKYK.js";
5
+ import "./chunk-H5QNVWU4.js";
6
+ import "./chunk-H4JKOLXU.js";
7
7
  import "./chunk-CHCA3ZM2.js";
8
8
  import "./chunk-OTVEIJUQ.js";
9
- import "./chunk-VBHLE3TR.js";
9
+ import "./chunk-GPZQZTJB.js";
10
10
  import "./chunk-5MOYSU5A.js";
11
11
  import "./chunk-4QCFFW2H.js";
12
12
  import "./chunk-76CJBM36.js";
13
13
  import {
14
14
  sessionScopeFilter,
15
15
  strictSessionScopeFilter
16
- } from "./chunk-EWWCMMES.js";
17
- import "./chunk-XOVHWGPV.js";
18
- import "./chunk-7667KFAG.js";
19
- import "./chunk-JLYQD2XF.js";
16
+ } from "./chunk-ZXSFUR77.js";
17
+ import "./chunk-RBRGSOK5.js";
18
+ import "./chunk-OBWIVRD6.js";
19
+ import "./chunk-A42356G7.js";
20
20
  import "./chunk-E23LNUWJ.js";
21
21
  import "./chunk-4JERP7NT.js";
22
22
  import "./chunk-EIKATSE4.js";
23
- import "./chunk-FDOURKUO.js";
23
+ import "./chunk-HYZE3MNS.js";
24
24
  import "./chunk-AD2VCHSS.js";
25
25
  import "./chunk-WOYADZF5.js";
26
26
  import "./chunk-SKGMF2SO.js";
27
- import "./chunk-MT6YGWJ6.js";
27
+ import "./chunk-AMC2OPYP.js";
28
28
  import "./chunk-AJIXH5JF.js";
29
- import "./chunk-3EMAJBBN.js";
29
+ import "./chunk-A3YHWWE6.js";
30
30
  import "./chunk-AM7S2TY6.js";
31
- import "./chunk-Y7637VDZ.js";
31
+ import "./chunk-RFRUDXOI.js";
32
32
  import "./chunk-OSKWCKUC.js";
33
33
  import "./chunk-KI5PFRG6.js";
34
34
  import "./chunk-CVYC6DUW.js";
@@ -44,17 +44,18 @@ import "./chunk-GJV3WDWM.js";
44
44
  import "./chunk-MP2AFCGL.js";
45
45
  import {
46
46
  getClient
47
- } from "./chunk-ZY2ABBVR.js";
47
+ } from "./chunk-QNKR7WEL.js";
48
48
  import "./chunk-2I23RPSI.js";
49
- import "./chunk-FM4ZI5ZP.js";
49
+ import "./chunk-FE6WBI2M.js";
50
50
  import "./chunk-OMXJMOBD.js";
51
51
  import "./chunk-7HLWBYH7.js";
52
52
  import "./chunk-BBMTVAE3.js";
53
+ import "./chunk-YMUZWC33.js";
53
54
  import "./chunk-FXU7JOXK.js";
54
55
  import "./chunk-QWVXN224.js";
55
56
  import "./chunk-WNBZJSQT.js";
56
- import "./chunk-ZK53K7OR.js";
57
- import "./chunk-SJLZ53ZR.js";
57
+ import "./chunk-MMOONM6D.js";
58
+ import "./chunk-XF2D4CDA.js";
58
59
  import "./chunk-BCZF3AGJ.js";
59
60
  import "./chunk-HSGBZSCA.js";
60
61
  import "./chunk-MLKGABMK.js";
@@ -163,7 +164,7 @@ ${msgLines}`);
163
164
  } catch {
164
165
  }
165
166
  try {
166
- const { getPendingProspective, markSurfaced } = await import("./prospective-memory-UDQWFP5Y.js");
167
+ const { getPendingProspective, markSurfaced } = await import("./prospective-memory-V7LFCPU4.js");
167
168
  const due = await getPendingProspective(agentId, { projectName, limit: 5 });
168
169
  if (due.length > 0) {
169
170
  const now = Date.now();
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  listReminders
3
- } from "./chunk-XDVLCS64.js";
3
+ } from "./chunk-UAKGNQWE.js";
4
4
 
5
5
  // src/mcp/tools/list-reminders.ts
6
6
  import { z } from "zod";
@@ -2,7 +2,7 @@ import {
2
2
  getGitRoot,
3
3
  isWorktreeDirty,
4
4
  isWorktreeDirtyAsync
5
- } from "./chunk-7667KFAG.js";
5
+ } from "./chunk-OBWIVRD6.js";
6
6
 
7
7
  // src/lib/worktree-sweep.ts
8
8
  import { execFile } from "child_process";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getIdentity,
3
3
  loadEmployeesSync
4
- } from "./chunk-ZY2ABBVR.js";
4
+ } from "./chunk-QNKR7WEL.js";
5
5
 
6
6
  // src/lib/drift-probes.ts
7
7
  var DRIFT_THRESHOLD = 80;
@@ -119,7 +119,7 @@ function releaseBackfillLock() {
119
119
  }
120
120
  async function getTaskAwareCapacity() {
121
121
  const { getClient } = await import("./lib/database.js");
122
- const { sessionScopeFilter } = await import("./task-scope-5OSP2MUP.js");
122
+ const { sessionScopeFilter } = await import("./task-scope-PSVAE3EM.js");
123
123
  const client = getClient();
124
124
  const scope = sessionScopeFilter();
125
125
  const result = await client.execute({
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executeAction,
3
3
  substituteTemplate
4
- } from "./chunk-MDK7E653.js";
4
+ } from "./chunk-PIUDQ7P2.js";
5
5
 
6
6
  // src/automation/workflow-engine.ts
7
7
  import { randomUUID } from "crypto";
@@ -263,7 +263,7 @@ async function runRegistryProxy(options = registryProxyOptionsFromEnv()) {
263
263
  await new Promise((resolve) => server.listen(options.port, options.host, resolve));
264
264
  console.log(`exe-registry-proxy listening on ${options.host ?? "0.0.0.0"}:${options.port}`);
265
265
  console.log(`proxying /v2/${options.allowedNamespace ?? "askexe"}/* -> ${options.upstream ?? "https://ghcr.io"}`);
266
- const { licenseSyncConfigFromEnv, startLicenseSyncScheduler } = await import("./license-sync-GU3L66JR.js");
266
+ const { licenseSyncConfigFromEnv, startLicenseSyncScheduler } = await import("./license-sync-CQHBDUQE.js");
267
267
  const syncConfig = licenseSyncConfigFromEnv();
268
268
  if (syncConfig) {
269
269
  startLicenseSyncScheduler(syncConfig);
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  storeBehavior
3
- } from "./chunk-4VLRGKNY.js";
3
+ } from "./chunk-MGMXYI7Y.js";
4
4
  import {
5
5
  getClient
6
- } from "./chunk-ZY2ABBVR.js";
6
+ } from "./chunk-QNKR7WEL.js";
7
7
  import {
8
8
  loadConfig
9
9
  } from "./chunk-BCZF3AGJ.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getCurrentSessionScope,
3
3
  strictSessionScopeFilter
4
- } from "./chunk-EWWCMMES.js";
4
+ } from "./chunk-ZXSFUR77.js";
5
5
  import {
6
6
  getProjectName
7
7
  } from "./chunk-OPU3NYOO.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getGlobalProceduresBlock
3
- } from "./chunk-T7ZLJZAO.js";
3
+ } from "./chunk-AUILJKSM.js";
4
4
 
5
5
  // src/lib/employee-templates.ts
6
6
  var BASE_OPERATING_PROCEDURES = `
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  loadLicense
3
- } from "./chunk-ZK53K7OR.js";
3
+ } from "./chunk-MMOONM6D.js";
4
4
 
5
5
  // src/lib/stack-update.ts
6
6
  import { execFileSync, spawnSync } from "child_process";
@@ -299,6 +299,8 @@ async function rollbackStackUpdate(options) {
299
299
  } catch {
300
300
  }
301
301
  const backupComposeFile = lockData?.backupComposeFile;
302
+ const backupComposeOverrideFile = lockData?.backupComposeOverrideFile;
303
+ const composeOverrideFile = composeOverrideFileFor(options.composeFile);
302
304
  if (!options.serviceName) {
303
305
  try {
304
306
  if (existsSync(options.composeFile)) {
@@ -307,27 +309,41 @@ async function rollbackStackUpdate(options) {
307
309
  } catch {
308
310
  }
309
311
  if (backupComposeFile && existsSync(backupComposeFile)) {
310
- console.log(
311
- `[stack-update] Keeping current (superset) docker-compose.yml for recovery so newly-added services are not dropped; rolling back image tags via .env. Previous compose preserved at ${backupComposeFile}.`
312
- );
312
+ copyFileSync(backupComposeFile, options.composeFile);
313
+ console.log(`[stack-update] Restored docker-compose.yml from ${backupComposeFile}`);
313
314
  } else {
314
315
  console.log("[stack-update] No backed-up docker-compose.yml in lock \u2014 rolling back image tags via .env on the current compose.");
315
316
  }
317
+ try {
318
+ if (backupComposeOverrideFile && existsSync(backupComposeOverrideFile)) {
319
+ copyFileSync(backupComposeOverrideFile, composeOverrideFile);
320
+ console.log(`[stack-update] Restored docker-compose.override.yml from ${backupComposeOverrideFile}`);
321
+ } else if (lockData?.hadComposeOverrideFile === false && existsSync(composeOverrideFile)) {
322
+ rmSync(composeOverrideFile, { force: true });
323
+ console.log("[stack-update] Removed docker-compose.override.yml because it was absent from the pre-update snapshot.");
324
+ }
325
+ } catch (overrideErr) {
326
+ const reason = overrideErr instanceof Error ? overrideErr.message : String(overrideErr);
327
+ console.warn(`[stack-update] Could not restore docker-compose.override.yml (${reason}); continuing rollback.`);
328
+ }
316
329
  }
317
330
  const scopedServiceNames = options.serviceName ? Object.entries(lockData?.services ?? {}).filter(([name, service]) => name === options.serviceName || (service.composeService ?? name) === options.serviceName).map(([name]) => name) : [];
318
331
  const rollbackEnvRaw = readFileSync(rollbackEnv, "utf8");
319
332
  if (scopedServiceNames.length > 0 && lockData?.services) {
320
333
  const rollbackEnvMap = parseEnv(rollbackEnvRaw);
334
+ const scopedEnvKeys = scopedServiceNames.map((serviceName) => lockData.services[serviceName].env).filter((key) => Boolean(key));
335
+ const mutatedEnvKeys = lockData.mutatedEnvKeys ?? [];
336
+ const restoreEnvKeys = [.../* @__PURE__ */ new Set([...scopedEnvKeys, ...mutatedEnvKeys])];
321
337
  const scopedUpdates = Object.fromEntries(
322
- scopedServiceNames.map((serviceName) => lockData.services[serviceName].env).filter((key) => Boolean(key)).map((key) => [key, rollbackEnvMap.get(key) ?? ""])
338
+ restoreEnvKeys.map((key) => [key, rollbackEnvMap.get(key) ?? ""])
323
339
  );
324
- console.log(`[stack-update] Restoring env keys for service ${scopedServiceNames.join(", ")} from ${rollbackEnv}`);
340
+ console.log(`[stack-update] Restoring env keys for service ${scopedServiceNames.join(", ")} from ${rollbackEnv}: ${restoreEnvKeys.join(", ")}`);
325
341
  writeSecretFile(options.envFile, patchEnv(readFileSync(options.envFile, "utf8"), scopedUpdates));
326
342
  } else {
327
343
  console.log(`[stack-update] Restoring env from ${rollbackEnv}`);
328
344
  writeSecretFile(options.envFile, rollbackEnvRaw);
329
345
  }
330
- const composeArgs = ["compose", "--file", options.composeFile, "--env-file", options.envFile];
346
+ const composeArgs = composeArgsForStack(options.composeFile, options.envFile);
331
347
  if (lockData?.services) {
332
348
  for (const [serviceName, service] of Object.entries(lockData.services)) {
333
349
  if (scopedServiceNames.length > 0 && !scopedServiceNames.includes(serviceName)) continue;
@@ -440,6 +456,22 @@ function manifestImagesForPull(release) {
440
456
  Object.values(release.services).map((service) => imagePullRef(service.image.trim())).filter(Boolean)
441
457
  ));
442
458
  }
459
+ var COMPOSE_SIDECARS = {
460
+ // exe-crm-worker uses the same CRM_IMAGE_TAG as exe-crm but is a distinct
461
+ // compose service. Pull/restart it whenever the CRM API image changes so the
462
+ // API and worker cannot drift to different versions. (bug 9e324fd2)
463
+ "exe-crm": ["exe-crm-worker"],
464
+ "exe-erp": ["exe-erp-nginx", "exe-erp-websocket", "exe-erp-queue", "exe-erp-scheduler"]
465
+ };
466
+ function expandComposeServicesWithSidecars(primaryComposeServices) {
467
+ const expanded = [...primaryComposeServices];
468
+ for (const primary of primaryComposeServices) {
469
+ for (const sidecar of COMPOSE_SIDECARS[primary] ?? []) {
470
+ if (!expanded.includes(sidecar)) expanded.push(sidecar);
471
+ }
472
+ }
473
+ return expanded;
474
+ }
443
475
  function cloneReleaseWithServices(release, serviceNames) {
444
476
  const wanted = new Set(serviceNames);
445
477
  const services = {};
@@ -463,6 +495,18 @@ function readStackUpdateLock(lockFile) {
463
495
  function writeStackUpdateLock(lockFile, data) {
464
496
  writeFileSync(lockFile, JSON.stringify(data, null, 2) + "\n");
465
497
  }
498
+ function composeOverrideFileFor(composeFile) {
499
+ return path.join(path.dirname(composeFile), "docker-compose.override.yml");
500
+ }
501
+ function composeArgsForStack(composeFile, envFile, includeOverride = true) {
502
+ const args = ["compose", "--file", composeFile];
503
+ const overrideFile = composeOverrideFileFor(composeFile);
504
+ if (includeOverride && existsSync(overrideFile)) {
505
+ args.push("--file", overrideFile);
506
+ }
507
+ args.push("--env-file", envFile);
508
+ return args;
509
+ }
466
510
  function buildInitialServiceStatus(plan, envRaw, now, activeServices) {
467
511
  const env = parseEnv(envRaw);
468
512
  const at = now().toISOString();
@@ -1017,6 +1061,8 @@ async function resolveStackImageCredentials(options, release) {
1017
1061
  async function verifyManifestImagesAvailable(plan, options) {
1018
1062
  const exec = options.exec ?? defaultExec;
1019
1063
  const images = manifestImagesForPull(plan.release);
1064
+ const maxAttempts = Math.max(1, Math.floor(options.verifyImageMaxAttempts ?? 3));
1065
+ const baseDelayMs = Math.max(0, Math.floor(options.verifyImageRetryBaseDelayMs ?? 1e3));
1020
1066
  let registryForLogout;
1021
1067
  const creds = await resolveStackImageCredentials(options, plan.release);
1022
1068
  if (creds) {
@@ -1024,15 +1070,29 @@ async function verifyManifestImagesAvailable(plan, options) {
1024
1070
  registryForLogout = creds.registry;
1025
1071
  }
1026
1072
  try {
1027
- return images.map((image) => {
1028
- try {
1029
- exec("docker", ["manifest", "inspect", image]);
1030
- return { image, ok: true };
1031
- } catch (err) {
1032
- const reason = err instanceof Error ? err.message : String(err);
1033
- return { image, ok: false, error: reason };
1073
+ const results = [];
1074
+ for (const image of images) {
1075
+ let lastError = "";
1076
+ let ok = false;
1077
+ for (let attempt = 1; attempt <= maxAttempts; attempt++) {
1078
+ try {
1079
+ exec("docker", ["manifest", "inspect", image]);
1080
+ ok = true;
1081
+ break;
1082
+ } catch (err) {
1083
+ lastError = err instanceof Error ? err.message : String(err);
1084
+ if (attempt < maxAttempts) {
1085
+ const delayMs = baseDelayMs * Math.pow(2, attempt - 1);
1086
+ console.warn(
1087
+ `[stack-update] manifest inspect failed for ${image} (attempt ${attempt}/${maxAttempts}): ${lastError}. Retrying in ${delayMs}ms.`
1088
+ );
1089
+ if (delayMs > 0) await new Promise((resolve) => setTimeout(resolve, delayMs));
1090
+ }
1091
+ }
1034
1092
  }
1035
- });
1093
+ results.push(ok ? { image, ok: true } : { image, ok: false, error: `manifest inspect failed after ${maxAttempts} attempt(s): ${lastError}` });
1094
+ }
1095
+ return results;
1036
1096
  } finally {
1037
1097
  if (registryForLogout) {
1038
1098
  try {
@@ -1058,6 +1118,17 @@ function allServiceList(release) {
1058
1118
  function errorMessage(err) {
1059
1119
  return err instanceof Error ? err.message : String(err);
1060
1120
  }
1121
+ function packagedComposeTemplatePath(options) {
1122
+ return options.composeTemplateFileForUpdate ?? path.join(resolvePackageRoot(), "deploy", "compose", "docker-compose.yml");
1123
+ }
1124
+ function readStagedComposeTemplate(options, currentComposeRaw) {
1125
+ const templatePath = packagedComposeTemplatePath(options);
1126
+ if (!existsSync(templatePath)) {
1127
+ return { raw: currentComposeRaw, templatePath, templateFound: false, shouldRefresh: false };
1128
+ }
1129
+ const raw = readFileSync(templatePath, "utf8");
1130
+ return { raw, templatePath, templateFound: true, shouldRefresh: raw !== currentComposeRaw };
1131
+ }
1061
1132
  async function assertPreDeployImagesPullable(plan, options) {
1062
1133
  let results;
1063
1134
  try {
@@ -1238,6 +1309,18 @@ function backupStackConfig(stackDir, composeFile, envRaw, now = () => /* @__PURE
1238
1309
  } catch {
1239
1310
  backupComposeFile = void 0;
1240
1311
  }
1312
+ const composeOverrideFile = composeOverrideFileFor(composeFile);
1313
+ const hadComposeOverrideFile = existsSync(composeOverrideFile);
1314
+ let backupComposeOverrideFile;
1315
+ try {
1316
+ if (hadComposeOverrideFile) {
1317
+ backupComposeOverrideFile = path.join(updateBackupDir, "docker-compose.override.yml.bak");
1318
+ copyFileSync(composeOverrideFile, backupComposeOverrideFile);
1319
+ copyFileSync(composeOverrideFile, path.join(updateBackupDir, "docker-compose.override.yml"));
1320
+ }
1321
+ } catch {
1322
+ backupComposeOverrideFile = void 0;
1323
+ }
1241
1324
  for (const f of [...PROTECTED_CONFIG_FILES, ...BOOTSTRAP_OVERWRITTEN_CONFIG_FILES]) {
1242
1325
  const src = path.join(stackDir, f);
1243
1326
  try {
@@ -1271,7 +1354,7 @@ function backupStackConfig(stackDir, composeFile, envRaw, now = () => /* @__PURE
1271
1354
  } catch {
1272
1355
  }
1273
1356
  console.log(`[stack-update] Config backed up to ${updateBackupDir}`);
1274
- return { updateBackupDir, backupEnvFile, backupComposeFile };
1357
+ return { updateBackupDir, backupEnvFile, backupComposeFile, backupComposeOverrideFile, hadComposeOverrideFile };
1275
1358
  }
1276
1359
  function installDockerUbuntu(exec) {
1277
1360
  if (process.platform !== "linux") throw new Error("Docker auto-install is only supported on Linux. Install Docker manually, then retry.");
@@ -1643,7 +1726,7 @@ function hardenSsh(exec, result) {
1643
1726
  }
1644
1727
  function areStackContainersRunning(composeFile, envFile) {
1645
1728
  try {
1646
- const result = spawnSync("docker", ["compose", "--file", composeFile, "--env-file", envFile, "ps", "-q"], {
1729
+ const result = spawnSync("docker", [...composeArgsForStack(composeFile, envFile), "ps", "-q"], {
1647
1730
  stdio: ["pipe", "pipe", "pipe"],
1648
1731
  timeout: 15e3
1649
1732
  });
@@ -1854,6 +1937,7 @@ async function runStackUpdate(options) {
1854
1937
  const scopedServiceNames = options.serviceName ? [options.serviceName] : resumeServices;
1855
1938
  const effectiveTargetVersion = options.targetVersion ?? resumeLock?.stackVersion;
1856
1939
  const composeRaw = readFileSync(options.composeFile, "utf8");
1940
+ const stagedCompose = readStagedComposeTemplate(options, composeRaw);
1857
1941
  const plan = createStackUpdatePlan(manifest, envRaw, effectiveTargetVersion, scopedServiceNames, serviceSelection, composeRaw);
1858
1942
  const fullTargetPlan = scopedServiceNames.length > 0 ? createStackUpdatePlan(manifest, envRaw, effectiveTargetVersion, void 0, serviceSelection, composeRaw) : plan;
1859
1943
  assertRolloutStageAllowed(plan, {
@@ -1862,7 +1946,20 @@ async function runStackUpdate(options) {
1862
1946
  });
1863
1947
  assertBreakingChangesAllowed(plan, options.allowedBreakingChangeIds ?? []);
1864
1948
  assertDeploymentScopeAllowed(plan, options.deploymentPersona ?? "customer");
1865
- const plannedEnvRaw = patchEnv(envRaw, Object.fromEntries(plan.changes.map((c) => [c.key, c.after])));
1949
+ const requiredEnvValidation = options.dryRun ? { derived: {}, unresolvable: [] } : detectMissingRequiredEnvVars(stagedCompose.raw, envRaw);
1950
+ const migratedEnvVars = requiredEnvValidation.derived;
1951
+ if (requiredEnvValidation.unresolvable.length > 0) {
1952
+ const lines = requiredEnvValidation.unresolvable.map((r) => ` - ${r.key}${r.message ? ` (${r.message})` : ""}`);
1953
+ throw new Error(
1954
+ `Stack update aborted before any changes: the updated compose template requires env vars that are missing from ${options.envFile} and cannot be derived automatically.
1955
+ Set these in ${options.envFile}, then re-run stack-update:
1956
+ ${lines.join("\n")}`
1957
+ );
1958
+ }
1959
+ const plannedEnvRaw = patchEnv(envRaw, {
1960
+ ...migratedEnvVars,
1961
+ ...Object.fromEntries(plan.changes.map((c) => [c.key, c.after]))
1962
+ });
1866
1963
  assertProductionDeployGate(plan, plannedEnvRaw, composeRaw, {
1867
1964
  breakGlassReason: options.breakGlassReason,
1868
1965
  breakGlassAuditFile: options.breakGlassAuditFile,
@@ -1907,13 +2004,13 @@ async function runStackUpdate(options) {
1907
2004
  const updateBackupDir = configBackup.updateBackupDir;
1908
2005
  const backupEnvFile = configBackup.backupEnvFile;
1909
2006
  const backupComposeFile = configBackup.backupComposeFile;
2007
+ const backupComposeOverrideFile = configBackup.backupComposeOverrideFile;
2008
+ const hadComposeOverrideFile = configBackup.hadComposeOverrideFile;
1910
2009
  try {
1911
- const templateCompose = path.join(resolvePackageRoot(), "deploy", "compose", "docker-compose.yml");
1912
- if (existsSync(templateCompose)) {
1913
- const templateRaw = readFileSync(templateCompose, "utf8");
1914
- if (templateRaw !== composeRaw) {
2010
+ if (stagedCompose.templateFound) {
2011
+ if (stagedCompose.shouldRefresh) {
1915
2012
  const tmpCompose = `${options.composeFile}.tmp-${process.pid}`;
1916
- writeFileSync(tmpCompose, templateRaw, { mode: 420 });
2013
+ writeFileSync(tmpCompose, stagedCompose.raw, { mode: 420 });
1917
2014
  renameSync(tmpCompose, options.composeFile);
1918
2015
  console.log(
1919
2016
  `[stack-update] Refreshed docker-compose.yml from packaged template (old saved to ${path.join(updateBackupDir, "docker-compose.yml")}). Customer overrides should live in docker-compose.override.yml.`
@@ -1921,44 +2018,19 @@ async function runStackUpdate(options) {
1921
2018
  }
1922
2019
  } else {
1923
2020
  console.warn(
1924
- `[stack-update] Packaged compose template not found at ${templateCompose}; keeping existing docker-compose.yml. Shipped compose fixes will not apply.`
2021
+ `[stack-update] Packaged compose template not found at ${stagedCompose.templatePath}; keeping existing docker-compose.yml. Shipped compose fixes will not apply.`
1925
2022
  );
1926
2023
  }
1927
2024
  } catch (err) {
1928
2025
  const reason = err instanceof Error ? err.message : String(err);
1929
2026
  console.warn(`[stack-update] Could not refresh docker-compose.yml (${reason}); using existing compose.`);
1930
2027
  }
1931
- let migratedEnvVars = {};
1932
- try {
1933
- const refreshedComposeRaw = readFileSync(options.composeFile, "utf8");
1934
- const { derived, unresolvable } = detectMissingRequiredEnvVars(refreshedComposeRaw, envRaw);
1935
- if (unresolvable.length > 0) {
1936
- const lines = unresolvable.map((r) => ` - ${r.key}${r.message ? ` (${r.message})` : ""}`);
1937
- throw new Error(
1938
- `Stack update aborted before any changes: the updated compose template requires env vars that are missing from ${options.envFile} and cannot be derived automatically.
1939
- Set these in ${options.envFile}, then re-run stack-update:
1940
- ${lines.join("\n")}`
1941
- );
1942
- }
1943
- migratedEnvVars = derived;
1944
- if (Object.keys(derived).length > 0) {
1945
- console.log(
1946
- `[stack-update] Migrating ${Object.keys(derived).length} newly-required env var(s) into ${options.envFile} with derived defaults: ${Object.keys(derived).join(", ")}`
1947
- );
1948
- }
1949
- } catch (err) {
1950
- throw err instanceof Error ? err : new Error(String(err));
2028
+ if (Object.keys(migratedEnvVars).length > 0) {
2029
+ console.log(
2030
+ `[stack-update] Migrating ${Object.keys(migratedEnvVars).length} newly-required env var(s) into ${options.envFile} with derived defaults: ${Object.keys(migratedEnvVars).join(", ")}`
2031
+ );
1951
2032
  }
1952
2033
  const initialServiceStatus = options.resume && resumeLock?.serviceStatus ? resumeLock.serviceStatus : buildInitialServiceStatus(fullTargetPlan, envRaw, now, new Set(Object.keys(plan.release.services)));
1953
- writeStackUpdateLock(lockFile, {
1954
- stackVersion: plan.targetVersion,
1955
- previousVersion,
1956
- updatedAt: now().toISOString(),
1957
- backupEnvFile: resumeLock?.backupEnvFile ?? backupEnvFile,
1958
- backupComposeFile: resumeLock?.backupComposeFile ?? backupComposeFile,
1959
- services: { ...fullTargetPlan.release.services, ...resumeLock?.services ?? {}, ...plan.release.services },
1960
- serviceStatus: initialServiceStatus
1961
- });
1962
2034
  try {
1963
2035
  const { spawnSync: sp } = await import("child_process");
1964
2036
  const backupSh = path.join(stackDir, "backup.sh");
@@ -2003,6 +2075,19 @@ ${lines.join("\n")}`
2003
2075
  if (overrideResolution.warn) console.warn(overrideResolution.notice);
2004
2076
  else console.log(overrideResolution.notice);
2005
2077
  }
2078
+ const mutatedEnvKeys = Object.keys(updates);
2079
+ writeStackUpdateLock(lockFile, {
2080
+ stackVersion: plan.targetVersion,
2081
+ previousVersion,
2082
+ updatedAt: now().toISOString(),
2083
+ backupEnvFile: resumeLock?.backupEnvFile ?? backupEnvFile,
2084
+ backupComposeFile: resumeLock?.backupComposeFile ?? backupComposeFile,
2085
+ backupComposeOverrideFile: resumeLock?.backupComposeOverrideFile ?? backupComposeOverrideFile,
2086
+ hadComposeOverrideFile: resumeLock?.hadComposeOverrideFile ?? hadComposeOverrideFile,
2087
+ mutatedEnvKeys: [.../* @__PURE__ */ new Set([...resumeLock?.mutatedEnvKeys ?? [], ...mutatedEnvKeys])],
2088
+ services: { ...fullTargetPlan.release.services, ...resumeLock?.services ?? {}, ...plan.release.services },
2089
+ serviceStatus: initialServiceStatus
2090
+ });
2006
2091
  const patched = patchEnv(envRaw, updates);
2007
2092
  const tmp = `${options.envFile}.tmp-${process.pid}`;
2008
2093
  writeSecretFile(tmp, patched);
@@ -2010,7 +2095,7 @@ ${lines.join("\n")}`
2010
2095
  for (const serviceName of Object.keys(plan.release.services)) {
2011
2096
  updateServiceStatus(lockFile, serviceName, "env_patched", now);
2012
2097
  }
2013
- const composeArgs = ["compose", "--file", options.composeFile, "--env-file", options.envFile];
2098
+ const composeArgs = composeArgsForStack(options.composeFile, options.envFile);
2014
2099
  let registryForLogout;
2015
2100
  try {
2016
2101
  let credsLogged = false;
@@ -2102,7 +2187,9 @@ Push the missing image(s) to the registry, or re-run with --break-glass <reason>
2102
2187
  );
2103
2188
  }
2104
2189
  }
2105
- const composePullTargets = Object.entries(plan.release.services).map(([name, svc]) => svc.composeService ?? name);
2190
+ const composePullTargets = expandComposeServicesWithSidecars(
2191
+ Object.entries(plan.release.services).map(([name, svc]) => svc.composeService ?? name)
2192
+ );
2106
2193
  try {
2107
2194
  if (composePullTargets.length > 0) {
2108
2195
  exec("docker", [...composeArgs, "pull", ...composePullTargets]);
@@ -2214,16 +2301,8 @@ Push the missing image(s) to the registry, or re-run with --break-glass <reason>
2214
2301
  "cloudflared"
2215
2302
  // tunnel — restarted last so services are healthy before it connects
2216
2303
  ];
2217
- const COMPOSE_SIDECARS = {
2218
- "exe-erp": ["exe-erp-nginx", "exe-erp-websocket", "exe-erp-queue", "exe-erp-scheduler"]
2219
- };
2220
2304
  const primaryComposeServices = Object.entries(plan.release.services).map(([serviceName, service]) => service.composeService ?? serviceName);
2221
- const scopedComposeServices = [...primaryComposeServices];
2222
- for (const primary of primaryComposeServices) {
2223
- for (const sidecar of COMPOSE_SIDECARS[primary] ?? []) {
2224
- if (!scopedComposeServices.includes(sidecar)) scopedComposeServices.push(sidecar);
2225
- }
2226
- }
2305
+ const scopedComposeServices = expandComposeServicesWithSidecars(primaryComposeServices);
2227
2306
  const restartOrder = [
2228
2307
  ...RESTART_ORDER.filter((service) => scopedComposeServices.includes(service)),
2229
2308
  ...scopedComposeServices.filter((service) => !RESTART_ORDER.includes(service))
@@ -2389,7 +2468,18 @@ Fix these before the stack is safe to operate.`);
2389
2468
  progress.logOverallSummary();
2390
2469
  printPhaseSummary();
2391
2470
  const finalLock = readStackUpdateLock(lockFile) ?? {};
2392
- writeStackUpdateLock(lockFile, { ...finalLock, stackVersion: plan.targetVersion, previousVersion, updatedAt: now().toISOString(), backupEnvFile: finalLock.backupEnvFile ?? backupEnvFile, services: { ...fullTargetPlan.release.services, ...finalLock.services ?? {}, ...plan.release.services } });
2471
+ writeStackUpdateLock(lockFile, {
2472
+ ...finalLock,
2473
+ stackVersion: plan.targetVersion,
2474
+ previousVersion,
2475
+ updatedAt: now().toISOString(),
2476
+ backupEnvFile: finalLock.backupEnvFile ?? backupEnvFile,
2477
+ backupComposeFile: finalLock.backupComposeFile ?? backupComposeFile,
2478
+ backupComposeOverrideFile: finalLock.backupComposeOverrideFile ?? backupComposeOverrideFile,
2479
+ hadComposeOverrideFile: finalLock.hadComposeOverrideFile ?? hadComposeOverrideFile,
2480
+ mutatedEnvKeys: finalLock.mutatedEnvKeys ?? mutatedEnvKeys,
2481
+ services: { ...fullTargetPlan.release.services, ...finalLock.services ?? {}, ...plan.release.services }
2482
+ });
2393
2483
  await postDeployAudit(options, "success", plan.targetVersion, previousVersion, void 0, { changes: plan.changes.length });
2394
2484
  return { status: "updated", targetVersion: plan.targetVersion, changes: plan.changes, backupEnvFile, lockFile, serviceStatus: readStackUpdateLock(lockFile)?.serviceStatus };
2395
2485
  } catch (err) {
@@ -2926,6 +3016,8 @@ export {
2926
3016
  buildReleaseMigrationArgs,
2927
3017
  runReleaseMigrations,
2928
3018
  isExecFormMigration,
3019
+ expandComposeServicesWithSidecars,
3020
+ composeArgsForStack,
2929
3021
  parseStackManifest,
2930
3022
  loadStackManifest,
2931
3023
  parseEnv,
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  flushBatch,
6
6
  writeMemory
7
- } from "./chunk-TQSAPNFW.js";
7
+ } from "./chunk-H5QNVWU4.js";
8
8
  import {
9
9
  redactSecrets
10
10
  } from "./chunk-4QCFFW2H.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  listBehaviors
3
- } from "./chunk-4VLRGKNY.js";
3
+ } from "./chunk-MGMXYI7Y.js";
4
4
  import {
5
5
  loadConfigSync
6
6
  } from "./chunk-BCZF3AGJ.js";