@askexenow/exe-os 0.9.365 → 0.9.368

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/deploy/compose/.env.askexe-control-plane.example +3 -1
  2. package/deploy/compose/.env.customer.example +6 -2
  3. package/deploy/compose/.env.example +8 -2
  4. package/deploy/compose/docker-compose.yml +21 -2
  5. package/deploy/compose/generate-env.ts +21 -1
  6. package/dist/.dist-verified.json +3 -3
  7. package/dist/{active-agent-MGF7J3HB.js → active-agent-6WNC756A.js} +3 -3
  8. package/dist/{active-agent-C6DPH43L.js → active-agent-RDTJGZHP.js} +3 -3
  9. package/dist/{agent-defs-generator-X7TVMPVB.js → agent-defs-generator-M5AUL3WM.js} +2 -2
  10. package/dist/agent-heartbeat-CQPGJIFF.js +13 -0
  11. package/dist/{agent-loop-E7RZCFDB.js → agent-loop-FOK2IRZQ.js} +1 -1
  12. package/dist/{agentic-ontology-CARDCG37.js → agentic-ontology-ZJBRYETW.js} +1 -1
  13. package/dist/{backfill-metadata-ANCJA6LA.js → backfill-metadata-Q4X23XLR.js} +5 -5
  14. package/dist/{backup-verify-F7BHVEF7.js → backup-verify-UKLX6IEK.js} +1 -1
  15. package/dist/behavior-injection-C3HEKSJY.js +60 -0
  16. package/dist/{behaviors-R2IE3PEN.js → behaviors-UCMAREU3.js} +8 -6
  17. package/dist/bin/agentic-ontology-backfill.js +6 -6
  18. package/dist/bin/agentic-reflection-backfill.js +7 -7
  19. package/dist/bin/agentic-semantic-label.js +6 -6
  20. package/dist/bin/backfill-conversations.js +5 -5
  21. package/dist/bin/backfill-responses.js +5 -5
  22. package/dist/bin/backfill-vectors.js +6 -6
  23. package/dist/bin/bulk-sync-postgres.js +10 -10
  24. package/dist/bin/cc-doctor.js +5 -5
  25. package/dist/bin/cleanup-stale-review-tasks.js +15 -14
  26. package/dist/bin/cli.js +20 -20
  27. package/dist/bin/deferred-daemon-restart.js +88 -83
  28. package/dist/bin/exe-agent-config.js +2 -2
  29. package/dist/bin/exe-agent.js +252 -14
  30. package/dist/bin/exe-assign.js +6 -6
  31. package/dist/bin/exe-boot.js +33 -31
  32. package/dist/bin/exe-call.js +4 -4
  33. package/dist/bin/exe-cloud.js +11 -11
  34. package/dist/bin/exe-config-dump.js +2 -2
  35. package/dist/bin/exe-dispatch.js +16 -15
  36. package/dist/bin/exe-doctor.js +6 -6
  37. package/dist/bin/exe-export-behaviors.js +10 -8
  38. package/dist/bin/exe-forget.js +7 -7
  39. package/dist/bin/exe-gateway.js +7 -7
  40. package/dist/bin/exe-healthcheck.js +5 -5
  41. package/dist/bin/exe-heartbeat.js +18 -17
  42. package/dist/bin/exe-kill.js +19 -18
  43. package/dist/bin/exe-launch-agent.js +25 -23
  44. package/dist/bin/exe-mcp.js +3 -3
  45. package/dist/bin/exe-memory-reads.js +5 -5
  46. package/dist/bin/exe-new-employee.js +8 -8
  47. package/dist/bin/exe-os-mcp-proxy.js +3 -3
  48. package/dist/bin/exe-pending-messages.js +16 -15
  49. package/dist/bin/exe-pending-notifications.js +15 -14
  50. package/dist/bin/exe-pending-reviews.js +15 -14
  51. package/dist/bin/exe-rename.js +4 -4
  52. package/dist/bin/exe-review.js +18 -17
  53. package/dist/bin/exe-search.js +6 -6
  54. package/dist/bin/exe-session-cleanup.js +20 -18
  55. package/dist/bin/exe-settings.js +10 -10
  56. package/dist/bin/exe-start-codex.js +81 -19
  57. package/dist/bin/exe-start-opencode.js +11 -9
  58. package/dist/bin/exe-status.js +17 -16
  59. package/dist/bin/exe-support.js +3 -3
  60. package/dist/bin/exe-team.js +4 -4
  61. package/dist/bin/exe-verify-running-images.js +123 -4
  62. package/dist/bin/exe-watchdog.js +44 -3
  63. package/dist/bin/git-sweep.js +25 -15
  64. package/dist/bin/graph-backfill.js +7 -7
  65. package/dist/bin/graph-export.js +6 -6
  66. package/dist/bin/import-history.js +10 -10
  67. package/dist/bin/install.js +90 -85
  68. package/dist/bin/intercom-check.js +4 -4
  69. package/dist/bin/mcp-sessions.js +2 -2
  70. package/dist/bin/orchestration-metrics.js +4 -4
  71. package/dist/bin/postgres-agentic-reflection-backfill.js +4 -4
  72. package/dist/bin/postgres-agentic-semantic-backfill.js +4 -4
  73. package/dist/bin/reconcile-backlog.js +47 -6
  74. package/dist/bin/registry-proxy.js +1 -1
  75. package/dist/bin/scan-tasks.js +15 -14
  76. package/dist/bin/setup.js +1 -1
  77. package/dist/bin/shard-migrate.js +5 -5
  78. package/dist/bin/stack-update.js +35 -6
  79. package/dist/bin/verify-stack.js +11 -1
  80. package/dist/bin/vps-health-gate.js +1 -1
  81. package/dist/{boot-generation-X45BSVZY.js → boot-generation-7H7Y4KC2.js} +3 -3
  82. package/dist/{boot-review-sections-OBVRXXSF.js → boot-review-sections-4AGCECCP.js} +14 -13
  83. package/dist/build-manifest.json +910 -845
  84. package/dist/{capability-cards-57FURUMR.js → capability-cards-6KAC5D2Z.js} +2 -2
  85. package/dist/{capacity-monitor-QEL62JDO.js → capacity-monitor-J2Y4SFLA.js} +16 -15
  86. package/dist/{catchup-brief-PMXTCASA.js → catchup-brief-F2HKF2CU.js} +19 -18
  87. package/dist/{chunk-5CBGH6RA.js → chunk-2AS6FG6C.js} +3 -3
  88. package/dist/{chunk-TO6TB75E.js → chunk-2UBMXN4D.js} +2 -2
  89. package/dist/{chunk-J6I7X272.js → chunk-2UGU3V63.js} +1 -1
  90. package/dist/{chunk-45EQTS7B.js → chunk-34BMZTWV.js} +1 -1
  91. package/dist/{chunk-JYFYIGYK.js → chunk-4DGIOK6T.js} +1 -1
  92. package/dist/{chunk-T6S45OLV.js → chunk-4GVJIMMK.js} +12 -6
  93. package/dist/{chunk-IXEFO6HD.js → chunk-4L732DE5.js} +3 -3
  94. package/dist/{chunk-MXEIZUXG.js → chunk-4RRMZJLG.js} +1 -1
  95. package/dist/{chunk-3JNVB5LG.js → chunk-5IVLOOJR.js} +1 -1
  96. package/dist/chunk-5YKNEL3W.js +356 -0
  97. package/dist/{chunk-EMZHB767.js → chunk-6EXOW5ZA.js} +9 -9
  98. package/dist/{chunk-6Q263OZE.js → chunk-6P7DVFKA.js} +1 -1
  99. package/dist/{chunk-ZDUO6QBH.js → chunk-6UZ3DEQI.js} +1 -1
  100. package/dist/{chunk-DJK45U7B.js → chunk-72JZQ7EV.js} +1 -1
  101. package/dist/{chunk-22YQBVMO.js → chunk-72QUZX6J.js} +4 -4
  102. package/dist/{chunk-DYWGIPVP.js → chunk-AAL6CDMQ.js} +7 -7
  103. package/dist/{chunk-E6ORBQHP.js → chunk-AAMGHW5W.js} +1 -0
  104. package/dist/{chunk-EJ4522YM.js → chunk-AJGX4Z34.js} +1 -1
  105. package/dist/{chunk-M7EES2KM.js → chunk-BEPO36MW.js} +3 -3
  106. package/dist/{chunk-WR75WUEP.js → chunk-BFL3UB77.js} +1 -1
  107. package/dist/{chunk-NV6A5HDN.js → chunk-BFPQXPN3.js} +1 -1
  108. package/dist/{chunk-VGE6IHZB.js → chunk-BJKC6ZJU.js} +110 -86
  109. package/dist/{chunk-R7RM766N.js → chunk-BLNSUBP3.js} +3 -3
  110. package/dist/{chunk-52TIQJEQ.js → chunk-BNDHQGOY.js} +1 -1
  111. package/dist/{chunk-QYJANQWC.js → chunk-BPQWRR4H.js} +2 -2
  112. package/dist/{chunk-ANPE3TT3.js → chunk-BTGR55GX.js} +3 -3
  113. package/dist/chunk-BTSWFMEH.js +14 -0
  114. package/dist/{chunk-OPNROU5B.js → chunk-C4IJ5IS5.js} +1 -1
  115. package/dist/{chunk-BEHLIRRJ.js → chunk-C5FOA5GO.js} +14 -3
  116. package/dist/{chunk-EHHMNKOA.js → chunk-CSBD7QLZ.js} +1 -1
  117. package/dist/{chunk-EKVTRI3N.js → chunk-CU2OUUSV.js} +27 -6
  118. package/dist/{chunk-P47MPWNU.js → chunk-CXHRNESJ.js} +1 -1
  119. package/dist/{chunk-F2S3M5MB.js → chunk-DRMGPZSC.js} +2 -2
  120. package/dist/{chunk-KRUYQFSH.js → chunk-DYPKSVB7.js} +5 -5
  121. package/dist/{chunk-KSVLBATT.js → chunk-E5QQZDQN.js} +53 -0
  122. package/dist/{chunk-ODBRU6BF.js → chunk-EDB3LXBQ.js} +1542 -984
  123. package/dist/{chunk-IIZITKBV.js → chunk-EDRXCUEP.js} +4 -4
  124. package/dist/{chunk-4QKKLK3C.js → chunk-ELY5WBZX.js} +10 -10
  125. package/dist/{chunk-MPQXQ5IE.js → chunk-EZUSIF66.js} +1 -1
  126. package/dist/{chunk-DEFSN2FQ.js → chunk-FHYX64H3.js} +3 -3
  127. package/dist/{chunk-YMJOLEPE.js → chunk-FSALI4B7.js} +4 -4
  128. package/dist/{chunk-6GQYPJPG.js → chunk-FWKTZURC.js} +8 -8
  129. package/dist/{chunk-EWZYFG5Q.js → chunk-FWVPGXHD.js} +5 -5
  130. package/dist/{chunk-DWAQOEXL.js → chunk-GILYOIMP.js} +2 -2
  131. package/dist/{chunk-RZIKSE6N.js → chunk-GP3J3AOT.js} +4 -4
  132. package/dist/{chunk-LHOKWZKL.js → chunk-H6J7N3BZ.js} +1 -1
  133. package/dist/{chunk-EVPBYX2Z.js → chunk-HQSUXAB4.js} +1 -1
  134. package/dist/{chunk-IM2I7OOS.js → chunk-HTLJHSN4.js} +1 -1
  135. package/dist/{chunk-JUOZLXLH.js → chunk-HXV3DGL7.js} +1 -1
  136. package/dist/{chunk-OFGFRT5J.js → chunk-IEE6X6R2.js} +1 -1
  137. package/dist/{chunk-SP37DONS.js → chunk-IKRIUEIF.js} +1 -1
  138. package/dist/{chunk-RHX6MNWY.js → chunk-J44774XC.js} +1 -1
  139. package/dist/{chunk-7C4FUNVO.js → chunk-J77ZIMH5.js} +5 -5
  140. package/dist/{chunk-NO3M2AFM.js → chunk-JDPV7W2L.js} +1 -1
  141. package/dist/{chunk-FXPAUDCZ.js → chunk-KGPWS4KE.js} +1 -1
  142. package/dist/{chunk-L3TB7CC3.js → chunk-KM6XSFHP.js} +12 -2
  143. package/dist/{chunk-ZEKCHV43.js → chunk-KWQ7RHYD.js} +4 -4
  144. package/dist/{chunk-QFIVK3G5.js → chunk-KYVIV54Y.js} +1 -1
  145. package/dist/chunk-KZXMP6JG.js +319 -0
  146. package/dist/{chunk-AGQAGOQN.js → chunk-LJWCK2DR.js} +9 -9
  147. package/dist/{chunk-O2MEBF23.js → chunk-MCXYNYZI.js} +30 -2
  148. package/dist/{chunk-L2VZBPJJ.js → chunk-MWEIBVBS.js} +13 -1
  149. package/dist/{chunk-RVWALVDT.js → chunk-MXP27XTP.js} +2 -2
  150. package/dist/{chunk-DQ5KHWFD.js → chunk-N3CGSO3S.js} +1 -1
  151. package/dist/{chunk-ZNEBZCZR.js → chunk-NNXPIJRB.js} +1 -1
  152. package/dist/{chunk-MZJBUAC3.js → chunk-NWE3CFX7.js} +4 -4
  153. package/dist/{chunk-BRLS5OLZ.js → chunk-OBESOWFJ.js} +35 -4
  154. package/dist/{chunk-5KLQCGI5.js → chunk-OL3QP3AU.js} +171 -1
  155. package/dist/{chunk-ESTR7QUP.js → chunk-P3PAD6AA.js} +1 -1
  156. package/dist/{chunk-2FYIMTQE.js → chunk-PGF5I7EV.js} +2 -2
  157. package/dist/{agent-heartbeat-I5UPGXAU.js → chunk-PHUHIVD5.js} +4 -5
  158. package/dist/{chunk-C3UAQ3JG.js → chunk-PVWM2WMM.js} +1 -1
  159. package/dist/{chunk-EWCEUO65.js → chunk-QCSAYYL6.js} +1 -1
  160. package/dist/{chunk-SBAU735L.js → chunk-QE5KWKVU.js} +27 -6
  161. package/dist/{chunk-LZKYVMBY.js → chunk-QKZEUCTS.js} +2 -2
  162. package/dist/{chunk-POPRJKAY.js → chunk-QS6HI4B6.js} +6 -0
  163. package/dist/{chunk-JNVQGLPX.js → chunk-QT6CNCXO.js} +3 -3
  164. package/dist/{chunk-J4U5Z7VX.js → chunk-QZYYCPNL.js} +4 -4
  165. package/dist/{chunk-RD4E5G3B.js → chunk-RDIZSXXD.js} +1 -1
  166. package/dist/{chunk-2RQT7TED.js → chunk-RFWOXKVL.js} +55 -3
  167. package/dist/chunk-S2YTU74T.js +76 -0
  168. package/dist/{chunk-X6A2VWVJ.js → chunk-TP7BFVQP.js} +2 -2
  169. package/dist/{chunk-CKG6CVKI.js → chunk-TTJWPV4G.js} +1 -1
  170. package/dist/chunk-TX3Q2GIL.js +97 -0
  171. package/dist/{chunk-Q7BU5Q6I.js → chunk-UATT6BNO.js} +3 -3
  172. package/dist/{chunk-PPGPCWRC.js → chunk-UVM5ZXO2.js} +4 -4
  173. package/dist/{chunk-BATQKSLI.js → chunk-V7E37GE3.js} +2 -2
  174. package/dist/{chunk-U373MEF5.js → chunk-VD3CVNGB.js} +3 -3
  175. package/dist/{chunk-ZSZPMUNX.js → chunk-VIW62NN5.js} +126 -7
  176. package/dist/{chunk-EPNWEOOE.js → chunk-VTOO5UB3.js} +10 -10
  177. package/dist/chunk-W5MCOZTW.js +304 -0
  178. package/dist/{chunk-2ESB5SDP.js → chunk-WJOJWRN5.js} +139 -33
  179. package/dist/{chunk-CPILYY2K.js → chunk-X4MRVNR3.js} +1 -1
  180. package/dist/{chunk-EPDNWY5P.js → chunk-XBTQPQN7.js} +1 -1
  181. package/dist/{behavior-injection-XQ4B7DCF.js → chunk-XOTDAKJL.js} +24 -38
  182. package/dist/{chunk-ORNCMRIX.js → chunk-Y4AYNLXU.js} +31 -37
  183. package/dist/{chunk-WYLFDSIE.js → chunk-YGPJ7VSJ.js} +48 -10
  184. package/dist/{chunk-ZRKEUCUZ.js → chunk-ZR3VMM3X.js} +12 -10
  185. package/dist/{chunk-JITNFE4W.js → chunk-ZWONQU5S.js} +1 -1
  186. package/dist/{cleanup-graph-garbage-CAA625RJ.js → cleanup-graph-garbage-FBSQI33K.js} +8 -8
  187. package/dist/{cloud-sync-command-DBB7WRHL.js → cloud-sync-command-NHGVDTLM.js} +11 -3
  188. package/dist/{cloud-sync-db-init-V7IB23W5.js → cloud-sync-db-init-I75VOTXC.js} +1 -1
  189. package/dist/{cloud-sync-shutdown-2D3B73CJ.js → cloud-sync-shutdown-JGOFGGET.js} +2 -2
  190. package/dist/{cloud-sync-state-5DFKLWNB.js → cloud-sync-state-QF3TMMJ4.js} +3 -1
  191. package/dist/{co-activation-JVN7EBS6.js → co-activation-AE5L2SJV.js} +2 -2
  192. package/dist/{co-occurrence-526PTFGT.js → co-occurrence-O65D4SCN.js} +6 -6
  193. package/dist/codex-consolidation-PPXNBXCV.js +96 -0
  194. package/dist/{conversation-entity-extractor-JO56DB2E.js → conversation-entity-extractor-LFIDTD2O.js} +4 -4
  195. package/dist/{crdt-sync-LIJLZKFE.js → crdt-sync-NRWDBRSE.js} +1 -1
  196. package/dist/{crm-webhook-55F7Y6D2.js → crm-webhook-XOQGX6DV.js} +2 -2
  197. package/dist/{cto-delegation-gate-QIYV4KFO.js → cto-delegation-gate-ZGOAXQI2.js} +14 -13
  198. package/dist/{daemon-orchestration-Q3GJA2JJ.js → daemon-orchestration-ZMQWYYDT.js} +19 -18
  199. package/dist/dispatch-intent-journal-VV6HMZC4.js +17 -0
  200. package/dist/{doc-graph-extractor-P46R4QME.js → doc-graph-extractor-6C5JBKPP.js} +6 -6
  201. package/dist/{documents-7KFEREWO.js → documents-FKSQGSO4.js} +6 -6
  202. package/dist/{dreaming-JMUXBAPU.js → dreaming-IB3H6NDZ.js} +18 -17
  203. package/dist/{employee-boot-brief-HN63D2BY.js → employee-boot-brief-5YRTUEJH.js} +25 -21
  204. package/dist/{exe-drift-7J7GX7DP.js → exe-drift-CUWUYX3O.js} +3 -3
  205. package/dist/{exe-export-KJ7B2OBU.js → exe-export-XWENYJNM.js} +7 -7
  206. package/dist/{exe-import-HPZDWKGE.js → exe-import-OWOMRF2S.js} +7 -7
  207. package/dist/{exe-key-2PREP464.js → exe-key-P356FGK5.js} +88 -83
  208. package/dist/{exe-org-VEIISATF.js → exe-org-UKIVF3KE.js} +8 -8
  209. package/dist/{exe-snapshot-JXQFLUKA.js → exe-snapshot-AZI2WW5Y.js} +19 -18
  210. package/dist/{fast-db-init-SCXJXOYX.js → fast-db-init-FPAPF3GB.js} +1 -1
  211. package/dist/{founder-context-U2SZPLYV.js → founder-context-QTQ6V3B5.js} +2 -2
  212. package/dist/gateway/index.js +11 -11
  213. package/dist/{git-staleness-S4NDR7NX.js → git-staleness-6ACWLV5Q.js} +2 -2
  214. package/dist/{global-procedures-ZOFTOXIR.js → global-procedures-RXIKBVLZ.js} +3 -3
  215. package/dist/{graph-auto-extract-CLVTSUSB.js → graph-auto-extract-Q4A4QMOF.js} +6 -6
  216. package/dist/{graph-rag-LSJLWGXV.js → graph-rag-RLRQMY54.js} +4 -4
  217. package/dist/{hook-integrity-SGTKBL6W.js → hook-integrity-3X2JRLBM.js} +1 -1
  218. package/dist/{hook-prefetch-BDSLB6F4.js → hook-prefetch-DU44UZQP.js} +15 -14
  219. package/dist/hooks/bug-report-worker.js +19 -18
  220. package/dist/hooks/codex-stop-task-finalizer.js +20 -19
  221. package/dist/hooks/commit-complete.js +35 -19
  222. package/dist/hooks/error-recall.js +8 -8
  223. package/dist/hooks/exe-heartbeat-hook.js +4 -4
  224. package/dist/hooks/ingest-worker.js +2 -2
  225. package/dist/hooks/ingest.js +11 -11
  226. package/dist/hooks/instructions-loaded.js +5 -5
  227. package/dist/hooks/manifest.json +20 -20
  228. package/dist/hooks/notification.js +5 -5
  229. package/dist/hooks/post-compact.js +4 -4
  230. package/dist/hooks/post-tool-combined.js +12 -12
  231. package/dist/hooks/pre-compact.js +18 -17
  232. package/dist/hooks/pre-tool-use.js +86 -34
  233. package/dist/hooks/prompt-submit.js +36 -31
  234. package/dist/hooks/session-end.js +114 -100
  235. package/dist/hooks/session-start.js +16 -16
  236. package/dist/hooks/stop.js +83 -20
  237. package/dist/hooks/subagent-stop.js +19 -18
  238. package/dist/hooks/summary-worker.js +23 -22
  239. package/dist/index.js +27 -26
  240. package/dist/{installer-RC2JCKSE.js → installer-B7QYQE56.js} +8 -6
  241. package/dist/{installer-EA7T3PBD.js → installer-EXR25DDG.js} +6 -6
  242. package/dist/{installer-KCEM4RCG.js → installer-TOPA7673.js} +152 -8
  243. package/dist/{intercom-queue-6DZPHHQ2.js → intercom-queue-BZ4M3L4S.js} +14 -13
  244. package/dist/lib/cloud-sync.js +10 -10
  245. package/dist/lib/consolidation.js +8 -8
  246. package/dist/lib/database.js +2 -2
  247. package/dist/lib/db-backup.js +1 -1
  248. package/dist/lib/db-write-worker.js +3 -3
  249. package/dist/lib/db.js +2 -2
  250. package/dist/lib/delivery-truth.js +25 -0
  251. package/dist/lib/device-registry.js +1 -1
  252. package/dist/lib/employee-templates.js +4 -4
  253. package/dist/lib/employees.js +2 -2
  254. package/dist/lib/exe-daemon.js +185 -79
  255. package/dist/lib/hybrid-search.js +6 -6
  256. package/dist/lib/identity.js +2 -2
  257. package/dist/lib/license.js +2 -2
  258. package/dist/lib/messaging.js +15 -14
  259. package/dist/lib/registry-proxy.js +1 -1
  260. package/dist/lib/reminders.js +3 -3
  261. package/dist/lib/schedules.js +6 -6
  262. package/dist/lib/session-registry.js +4 -4
  263. package/dist/lib/skill-learning.js +7 -7
  264. package/dist/lib/status-brief.js +2 -1
  265. package/dist/lib/store.js +5 -5
  266. package/dist/lib/task-router.js +3 -3
  267. package/dist/lib/tasks.js +16 -15
  268. package/dist/lib/tmux-routing.js +14 -13
  269. package/dist/lib/token-spend.js +3 -3
  270. package/dist/{license-gate-HMSMUIAU.js → license-gate-YTIOLKVV.js} +3 -3
  271. package/dist/{license-sync-FBCMPC4J.js → license-sync-5VE5OSTV.js} +2 -2
  272. package/dist/mcp/register-tools.js +87 -82
  273. package/dist/mcp/server.js +90 -85
  274. package/dist/mcp/tools/complete-reminder.js +4 -4
  275. package/dist/mcp/tools/create-reminder.js +4 -4
  276. package/dist/mcp/tools/create-task.js +26 -23
  277. package/dist/mcp/tools/deactivate-behavior.js +8 -8
  278. package/dist/mcp/tools/list-reminders.js +4 -4
  279. package/dist/mcp/tools/list-tasks.js +18 -17
  280. package/dist/mcp/tools/send-message.js +17 -16
  281. package/dist/mcp/tools/update-task.js +17 -16
  282. package/dist/{mcp-http-config-YKJN52HG.js → mcp-http-config-XUNRIGQH.js} +3 -3
  283. package/dist/{mcp-session-identity-QLUVYWPR.js → mcp-session-identity-4UIG7KLK.js} +14 -13
  284. package/dist/{memory-cards-K2OSX4AW.js → memory-cards-R74YU4CO.js} +5 -5
  285. package/dist/{memory-graph-extractor-YLTSKLSY.js → memory-graph-extractor-3B4QJUXI.js} +7 -7
  286. package/dist/{memory-poisoning-defense-IPO4ADRL.js → memory-poisoning-defense-OAKFL5O2.js} +2 -2
  287. package/dist/{memory-pressure-watchdog-ZI3TH2OF.js → memory-pressure-watchdog-FFC2CHFJ.js} +15 -14
  288. package/dist/{memory-reflection-ZKVRU3NT.js → memory-reflection-5IJ6RE2J.js} +2 -2
  289. package/dist/{notification-ledger-4REL6M3T.js → notification-ledger-P5XBUYKO.js} +17 -15
  290. package/dist/{notifications-UXJUAP3C.js → notifications-LLCCHRYV.js} +14 -13
  291. package/dist/{orchestration-events-GMRGGBMN.js → orchestration-events-VBGCIQSS.js} +3 -3
  292. package/dist/{orchestrator-5TV75HDJ.js → orchestrator-EB3SCTAJ.js} +16 -15
  293. package/dist/{org-brief-session-7AZZEO3F.js → org-brief-session-GDCDKBFF.js} +6 -6
  294. package/dist/{org-consent-policy-XT6UZENB.js → org-consent-policy-HCD42NBN.js} +2 -2
  295. package/dist/{org-partner-runtime-WLZAZJIY.js → org-partner-runtime-TPVKFR6E.js} +6 -6
  296. package/dist/{org-row-visibility-A5XM4MVO.js → org-row-visibility-ZZLOPZLH.js} +1 -1
  297. package/dist/{pipeline-router-UEVXDUHR.js → pipeline-router-3JTL2KF6.js} +3 -3
  298. package/dist/{plan-limits-QEP32X4W.js → plan-limits-MTHRP4WY.js} +5 -5
  299. package/dist/{projection-worker-GMRC6SBH.js → projection-worker-FLASNERC.js} +2 -2
  300. package/dist/{prospective-memory-QLHSAPSG.js → prospective-memory-HI3WUY4U.js} +2 -2
  301. package/dist/{push-notifications-GKRPXOGI.js → push-notifications-DFSR6P7V.js} +15 -14
  302. package/dist/{reranker-GB4VEMUV.js → reranker-XHBKUDGG.js} +1 -1
  303. package/dist/{retrieval-health-QIBPBGN6.js → retrieval-health-NYKSDS6M.js} +1 -1
  304. package/dist/{review-polling-MU47NQ2N.js → review-polling-UAV6DZIZ.js} +15 -14
  305. package/dist/runtime/index.js +23 -22
  306. package/dist/{session-events-YMQ3VGBJ.js → session-events-YCYPLWPG.js} +15 -14
  307. package/dist/{session-kill-telemetry-VGPKE57M.js → session-kill-telemetry-UEJTHL65.js} +15 -14
  308. package/dist/{session-scope-P46KAHXQ.js → session-scope-LXDW7LJJ.js} +14 -13
  309. package/dist/{setup-wizard-BRNHSJ4U.js → setup-wizard-OVJQYUUL.js} +1 -1
  310. package/dist/{skill-refinement-NLYDSFEH.js → skill-refinement-EWRJID73.js} +3 -3
  311. package/dist/{stack-promote-NHFTNIM2.js → stack-promote-4IJM36OG.js} +5 -4
  312. package/dist/{stack-release-AQVKZUS7.js → stack-release-BAIRY65H.js} +5 -4
  313. package/dist/{stack-update-LLX5KT7G.js → stack-update-VDM5WXRS.js} +10 -3
  314. package/dist/stalled-dispatch-escalation-MHLYH2PT.js +80 -0
  315. package/dist/{steward-gate-JKHYFAHA.js → steward-gate-Y4N2XY3R.js} +3 -3
  316. package/dist/{subagent-brief-injection-VDVOHDOU.js → subagent-brief-injection-7A6JEVTP.js} +22 -20
  317. package/dist/{support-inbox-S6YO5YZU.js → support-inbox-LT4WJECQ.js} +4 -3
  318. package/dist/{task-enforcement-LXW45H5Z.js → task-enforcement-WOIZ5TLK.js} +15 -14
  319. package/dist/{task-request-inbox-UCSKDC3R.js → task-request-inbox-D65BPUKZ.js} +2 -2
  320. package/dist/{task-scope-GDLFE26E.js → task-scope-PQ67YRWP.js} +18 -16
  321. package/dist/{tasks-crud-W7VGWRUV.js → tasks-crud-TJNMUKKH.js} +14 -13
  322. package/dist/{tasks-notify-CT7NWCS4.js → tasks-notify-7UVC3VGI.js} +15 -14
  323. package/dist/{tasks-review-WCSKOUFW.js → tasks-review-WDWYISZ2.js} +14 -13
  324. package/dist/{telemetry-upload-FK5WKXVB.js → telemetry-upload-6LBGRJUE.js} +7 -7
  325. package/dist/{token-budget-GBNGSIU3.js → token-budget-XO5XW6DL.js} +3 -3
  326. package/dist/{tool-gates-3IC7DK4R.js → tool-gates-2OZY3GZM.js} +1 -1
  327. package/dist/{tool-gates-GXSYBVK4.js → tool-gates-7PLIOLAL.js} +1 -1
  328. package/dist/{tool-telemetry-VKMRS6MP.js → tool-telemetry-ZL6TTZWG.js} +1 -1
  329. package/dist/tui/App.js +23 -22
  330. package/dist/{tui-data-FTPV2XBQ.js → tui-data-UK7ZPKN4.js} +14 -13
  331. package/dist/{update-support-J6UWPUOC.js → update-support-BGL5KAZO.js} +12 -12
  332. package/dist/work-claims-XZL2DKQ3.js +53 -0
  333. package/dist/{work-state-heartbeat-4LDF6DSM.js → work-state-heartbeat-267YQ75U.js} +1 -1
  334. package/dist/{worker-gate-35VZINZG.js → worker-gate-RUM6MLIR.js} +1 -1
  335. package/dist/{workflow-engine-4DA6RSHI.js → workflow-engine-YQHGHKSJ.js} +2 -2
  336. package/dist/{worktree-H3YFJ3NU.js → worktree-3FO6EQ4G.js} +4 -4
  337. package/dist/{worktree-sweep-4EDLLQ2E.js → worktree-sweep-X7MUEEQS.js} +5 -5
  338. package/package.json +7 -2
  339. package/release-notes.json +93 -81
  340. /package/dist/{chunk-7Y6AQWVT.js → chunk-4AN2PWUK.js} +0 -0
  341. /package/dist/{chunk-7DMCAGSC.js → chunk-5U4UJGTW.js} +0 -0
  342. /package/dist/{chunk-3THNS2T7.js → chunk-EYIX6JU7.js} +0 -0
  343. /package/dist/{chunk-QYECRPGD.js → chunk-FDA45THL.js} +0 -0
  344. /package/dist/{chunk-MBBFL2SP.js → chunk-GIO4VU4J.js} +0 -0
  345. /package/dist/{chunk-LKYGSJ2E.js → chunk-I76LRCNA.js} +0 -0
  346. /package/dist/{chunk-UY6HRDB2.js → chunk-LBWEAQ6Z.js} +0 -0
  347. /package/dist/{chunk-VS4LPG66.js → chunk-MQ5RUHNZ.js} +0 -0
  348. /package/dist/{chunk-G2EAYH4U.js → chunk-PFCE4AXQ.js} +0 -0
  349. /package/dist/{chunk-3NBWARKC.js → chunk-SXAERZL2.js} +0 -0
  350. /package/dist/{chunk-BY7WWPRM.js → chunk-TKTQRSSD.js} +0 -0
  351. /package/dist/{chunk-JRPYLUXH.js → chunk-U2AZUMBZ.js} +0 -0
  352. /package/dist/{chunk-CMBF5WCL.js → chunk-W6FVADZS.js} +0 -0
  353. /package/dist/{core-memory-CMPPHJN5.js → core-memory-W5ZHHBRR.js} +0 -0
  354. /package/dist/{memory-isolation-ZB5S5HCO.js → memory-isolation-ZE7EDBO4.js} +0 -0
  355. /package/dist/{oauth-server-NP7KGF7N.js → oauth-server-3HG62YYJ.js} +0 -0
  356. /package/dist/{project-boot-LEZSK3W7.js → project-boot-3OAWKYLO.js} +0 -0
  357. /package/dist/{wiki-acl-5DKOWOIH.js → wiki-acl-FQV4E6M4.js} +0 -0
@@ -0,0 +1,97 @@
1
+ // src/lib/deploy-staleness.ts
2
+ import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "fs";
3
+ import os from "os";
4
+ import path from "path";
5
+ var SETTLED_STATUSES = /* @__PURE__ */ new Set(["completed", "skipped", "unchanged"]);
6
+ var MAX_ERROR_CHARS = 240;
7
+ function evaluateDeployStaleness(lock, now = () => /* @__PURE__ */ new Date()) {
8
+ if (!lock) return null;
9
+ const entries = Object.entries(lock.serviceStatus ?? {});
10
+ const failedServices = entries.filter(([, svc]) => !SETTLED_STATUSES.has(String(svc?.status ?? "").toLowerCase())).map(([name]) => name).sort();
11
+ const runningVersion = lock.stackVersion ?? "unknown";
12
+ const targetVersion = lock.targetVersion ?? lock.stackVersion ?? "unknown";
13
+ const versionStuck = Boolean(lock.targetVersion) && lock.targetVersion !== lock.stackVersion;
14
+ if (failedServices.length === 0 && !versionStuck) return null;
15
+ const sampleError = entries.map(([, svc]) => typeof svc?.error === "string" ? svc.error.trim() : "").find((err) => err.length > 0);
16
+ const scope = failedServices.length === entries.length && entries.length > 0 ? `ALL ${entries.length} service(s)` : `${failedServices.length} of ${entries.length} service(s)`;
17
+ return {
18
+ detectedAt: now().toISOString(),
19
+ runningVersion,
20
+ targetVersion,
21
+ attemptedAt: lock.updatedAt,
22
+ failedServices,
23
+ totalServices: entries.length,
24
+ sampleError: sampleError ? sampleError.slice(0, MAX_ERROR_CHARS) : void 0,
25
+ reason: `The last stack deploy attempt did not land: ${scope} failed and production is still running ${runningVersion} while the manifest target was ${targetVersion}. The stack keeps serving the OLD images, so nothing looks broken \u2014 which is exactly how this went unnoticed for five weeks (bug f1c36209).`,
26
+ recovery: {
27
+ inspect: "Read serviceStatus in .exe-stack-lock.json for the per-service error.",
28
+ retry: "Re-run the stack update once the cause is fixed; a successful deploy clears this alert.",
29
+ acknowledge: `Delete ${deployStalenessAlertPath()} to silence it deliberately.`
30
+ }
31
+ };
32
+ }
33
+ function deployStalenessAlertPath() {
34
+ const home = process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path.join(os.homedir(), ".exe-os");
35
+ return path.join(home, "deploy-staleness.ALERT.json");
36
+ }
37
+ function writeDeployStalenessAlert(alert, alertPath = deployStalenessAlertPath()) {
38
+ try {
39
+ mkdirSync(path.dirname(alertPath), { recursive: true });
40
+ writeFileSync(alertPath, JSON.stringify(alert, null, 2));
41
+ } catch {
42
+ }
43
+ console.error(
44
+ `
45
+ [stack-update] ========================================================================
46
+ [stack-update] DEPLOY DID NOT LAND \u2014 production is STALE.
47
+ [stack-update] Running ${alert.runningVersion}, target ${alert.targetVersion}. Failed: ${alert.failedServices.join(", ") || "(version never committed)"}
48
+ [stack-update] This will be re-surfaced in the boot brief on EVERY boot until a deploy succeeds.
49
+ [stack-update] Alert: ${alertPath}
50
+ [stack-update] ========================================================================
51
+ `
52
+ );
53
+ }
54
+ function clearDeployStalenessAlert(alertPath = deployStalenessAlertPath()) {
55
+ try {
56
+ if (existsSync(alertPath)) rmSync(alertPath, { force: true });
57
+ } catch {
58
+ }
59
+ }
60
+ function readDeployStalenessAlert(alertPath = deployStalenessAlertPath()) {
61
+ try {
62
+ if (!existsSync(alertPath)) return null;
63
+ return JSON.parse(readFileSync(alertPath, "utf8"));
64
+ } catch {
65
+ return null;
66
+ }
67
+ }
68
+ function buildDeployStalenessBanner(alert) {
69
+ if (!alert) return [];
70
+ const lines = [];
71
+ const age = alert.attemptedAt ? Date.parse(alert.attemptedAt) : NaN;
72
+ const days = Number.isFinite(age) ? Math.floor((Date.now() - age) / 864e5) : null;
73
+ lines.push("\u{1F534} PRODUCTION IS STALE \u2014 the last stack deploy did not land");
74
+ lines.push("");
75
+ lines.push(` Running: ${alert.runningVersion} Target: ${alert.targetVersion}`);
76
+ if (days !== null && days >= 1) lines.push(` Last attempt: ${days} day(s) ago \u2014 the stack has been stale since.`);
77
+ if (alert.failedServices.length > 0) {
78
+ lines.push(` Failed service(s): ${alert.failedServices.join(", ")}`);
79
+ } else {
80
+ lines.push(" The version stamp never committed \u2014 the attempt died mid-flight.");
81
+ }
82
+ if (alert.sampleError) lines.push(` Error: ${alert.sampleError}`);
83
+ lines.push("");
84
+ lines.push(" \u{1F527} TO FIX:");
85
+ lines.push(` 1. ${alert.recovery.inspect}`);
86
+ lines.push(` 2. ${alert.recovery.retry}`);
87
+ lines.push(` 3. ${alert.recovery.acknowledge}`);
88
+ return lines;
89
+ }
90
+
91
+ export {
92
+ evaluateDeployStaleness,
93
+ writeDeployStalenessAlert,
94
+ clearDeployStalenessAlert,
95
+ readDeployStalenessAlert,
96
+ buildDeployStalenessBanner
97
+ };
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  extractMemoryGraph
3
- } from "./chunk-M7EES2KM.js";
3
+ } from "./chunk-BEPO36MW.js";
4
4
  import {
5
5
  flushBatch,
6
6
  writeMemory
7
- } from "./chunk-4QKKLK3C.js";
7
+ } from "./chunk-ELY5WBZX.js";
8
8
  import {
9
9
  extractKeywords
10
10
  } from "./chunk-CHCA3ZM2.js";
11
11
  import {
12
12
  getActiveAgent
13
- } from "./chunk-ZNEBZCZR.js";
13
+ } from "./chunk-NNXPIJRB.js";
14
14
 
15
15
  // src/mcp/tools/import-conversations.ts
16
16
  import { z } from "zod";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  buildSystemStateMemoryTypeExclusion
3
- } from "./chunk-4QKKLK3C.js";
3
+ } from "./chunk-ELY5WBZX.js";
4
4
  import {
5
5
  sessionScopeFilter
6
- } from "./chunk-ORNCMRIX.js";
6
+ } from "./chunk-Y4AYNLXU.js";
7
7
  import {
8
8
  getClient,
9
9
  getIdentity
10
- } from "./chunk-BRLS5OLZ.js";
10
+ } from "./chunk-OBESOWFJ.js";
11
11
  import {
12
12
  getEmotionalBaseline
13
13
  } from "./chunk-NJFJWQNN.js";
@@ -646,7 +646,7 @@ var DreamingEngine = class {
646
646
  }
647
647
  let overdueProspective = [];
648
648
  try {
649
- const { getOverdueProspective, completeProspective } = await import("./prospective-memory-QLHSAPSG.js");
649
+ const { getOverdueProspective, completeProspective } = await import("./prospective-memory-HI3WUY4U.js");
650
650
  const overdue = await getOverdueProspective(agentId);
651
651
  overdueProspective = overdue.map((o) => ({
652
652
  id: o.id,
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  ingest
3
- } from "./chunk-U373MEF5.js";
3
+ } from "./chunk-VD3CVNGB.js";
4
4
  import {
5
5
  listWorkflowDefinitions,
6
6
  runWorkflow,
7
7
  startWorkflow
8
- } from "./chunk-P47MPWNU.js";
8
+ } from "./chunk-CXHRNESJ.js";
9
9
  import {
10
10
  initCRMBridge
11
11
  } from "./chunk-ML4S5SHZ.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getClient
3
- } from "./chunk-BRLS5OLZ.js";
3
+ } from "./chunk-OBESOWFJ.js";
4
4
 
5
5
  // src/lib/pipeline-router.ts
6
6
  import crypto from "crypto";
@@ -140,8 +140,8 @@ Agent response: ${agentResponse}` : ""
140
140
  }
141
141
  async function sinkEntityExtraction(msg, agentResponse, agentName) {
142
142
  try {
143
- const { extractFromConversation } = await import("./conversation-entity-extractor-JO56DB2E.js");
144
- const { storeExtraction } = await import("./graph-rag-LSJLWGXV.js");
143
+ const { extractFromConversation } = await import("./conversation-entity-extractor-LFIDTD2O.js");
144
+ const { storeExtraction } = await import("./graph-rag-RLRQMY54.js");
145
145
  if ((msg.text?.length ?? 0) < 20) return false;
146
146
  if (msg.isHistorical) return false;
147
147
  const extraction = await extractFromConversation(msg, agentResponse, agentName);
@@ -1,3 +1,8 @@
1
+ import {
2
+ clearDeployStalenessAlert,
3
+ evaluateDeployStaleness,
4
+ writeDeployStalenessAlert
5
+ } from "./chunk-TX3Q2GIL.js";
1
6
  import {
2
7
  REVISION_LABEL,
3
8
  VERSION_LABEL,
@@ -6,7 +11,7 @@ import {
6
11
  } from "./chunk-L25OAFOU.js";
7
12
  import {
8
13
  loadLicense
9
- } from "./chunk-ZDUO6QBH.js";
14
+ } from "./chunk-6UZ3DEQI.js";
10
15
 
11
16
  // src/lib/stack-update.ts
12
17
  import { execFileSync, spawnSync as spawnSync2 } from "child_process";
@@ -411,6 +416,7 @@ async function rollbackStackUpdate(options) {
411
416
  const backupComposeFile = lockData?.backupComposeFile;
412
417
  const backupComposeOverrideFile = lockData?.backupComposeOverrideFile;
413
418
  const composeOverrideFile = composeOverrideFileFor(options.composeFile);
419
+ let composeRestored = false;
414
420
  if (!options.serviceName) {
415
421
  try {
416
422
  if (existsSync(options.composeFile)) {
@@ -420,6 +426,7 @@ async function rollbackStackUpdate(options) {
420
426
  }
421
427
  if (backupComposeFile && existsSync(backupComposeFile)) {
422
428
  copyFileSync(backupComposeFile, options.composeFile);
429
+ composeRestored = true;
423
430
  console.log(`[stack-update] Restored docker-compose.yml from ${backupComposeFile}`);
424
431
  } else {
425
432
  console.log("[stack-update] No backed-up docker-compose.yml in lock \u2014 rolling back image tags via .env on the current compose.");
@@ -439,19 +446,60 @@ async function rollbackStackUpdate(options) {
439
446
  }
440
447
  const scopedServiceNames = options.serviceName ? Object.entries(lockData?.services ?? {}).filter(([name, service]) => name === options.serviceName || (service.composeService ?? name) === options.serviceName).map(([name]) => name) : [];
441
448
  const rollbackEnvRaw = readFileSync(rollbackEnv, "utf8");
449
+ const rollbackEnvMap = parseEnv(rollbackEnvRaw);
450
+ const preUpdateImageDefaults = lockData?.preUpdateImageDefaults ?? {};
442
451
  if (scopedServiceNames.length > 0 && lockData?.services) {
443
- const rollbackEnvMap = parseEnv(rollbackEnvRaw);
444
452
  const scopedEnvKeys = scopedServiceNames.map((serviceName) => lockData.services[serviceName].env).filter((key) => Boolean(key));
445
453
  const mutatedEnvKeys = lockData.mutatedEnvKeys ?? [];
446
454
  const restoreEnvKeys = [.../* @__PURE__ */ new Set([...scopedEnvKeys, ...mutatedEnvKeys])];
447
- const scopedUpdates = Object.fromEntries(
448
- restoreEnvKeys.map((key) => [key, rollbackEnvMap.get(key) ?? ""])
449
- );
455
+ const scopedUpdates = {};
456
+ const scopedRemovals = [];
457
+ const scopedRepins = [];
458
+ for (const key of restoreEnvKeys) {
459
+ const previous = rollbackEnvMap.get(key);
460
+ if (previous !== void 0) {
461
+ scopedUpdates[key] = previous;
462
+ continue;
463
+ }
464
+ const previousDefault = preUpdateImageDefaults[key];
465
+ if (previousDefault !== void 0) {
466
+ scopedUpdates[key] = previousDefault;
467
+ scopedRepins.push(key);
468
+ continue;
469
+ }
470
+ scopedRemovals.push(key);
471
+ }
450
472
  console.log(`[stack-update] Restoring env keys for service ${scopedServiceNames.join(", ")} from ${rollbackEnv}: ${restoreEnvKeys.join(", ")}`);
451
- writeSecretFile(options.envFile, patchEnv(readFileSync(options.envFile, "utf8"), scopedUpdates));
473
+ if (scopedRepins.length > 0) {
474
+ console.log(`[stack-update] Re-pinning previously-unset image var(s) to their pre-update compose default so the service does not stay on the new image: ${scopedRepins.join(", ")}`);
475
+ }
476
+ if (scopedRemovals.length > 0) {
477
+ console.log(`[stack-update] Removing env key(s) that did not exist before the update: ${scopedRemovals.join(", ")}`);
478
+ }
479
+ const patched = patchEnv(readFileSync(options.envFile, "utf8"), scopedUpdates);
480
+ writeSecretFile(options.envFile, removeEnvKeys(patched, scopedRemovals));
452
481
  } else {
453
482
  console.log(`[stack-update] Restoring env from ${rollbackEnv}`);
454
483
  writeSecretFile(options.envFile, rollbackEnvRaw);
484
+ if (!composeRestored) {
485
+ const touched = /* @__PURE__ */ new Set([
486
+ ...lockData?.mutatedEnvKeys ?? [],
487
+ ...Object.values(lockData?.services ?? {}).map((svc) => svc.env).filter((k) => Boolean(k))
488
+ ]);
489
+ const repins = {};
490
+ for (const [key, image] of Object.entries(preUpdateImageDefaults)) {
491
+ if (touched.size > 0 && !touched.has(key)) continue;
492
+ if (rollbackEnvMap.has(key)) continue;
493
+ repins[key] = image;
494
+ }
495
+ const repinKeys = Object.keys(repins);
496
+ if (repinKeys.length > 0) {
497
+ console.log(
498
+ `[stack-update] No pre-update compose to restore \u2014 re-pinning previously-unset image var(s) to their pre-update default so the service is not left on the NEW image: ${repinKeys.join(", ")}`
499
+ );
500
+ writeSecretFile(options.envFile, patchEnv(readFileSync(options.envFile, "utf8"), repins));
501
+ }
502
+ }
455
503
  }
456
504
  const composeArgs = composeArgsForStack(options.composeFile, options.envFile);
457
505
  if (lockData?.services) {
@@ -754,6 +802,59 @@ function patchEnv(raw, updates) {
754
802
  }
755
803
  return patched.join("\n").replace(/\n*$/, "\n");
756
804
  }
805
+ function removeEnvKeys(raw, keys) {
806
+ if (keys.length === 0) return raw;
807
+ const drop = new Set(keys);
808
+ const kept = raw.replace(/\n$/, "").split(/\r?\n/).filter((line) => {
809
+ const idx = line.indexOf("=");
810
+ if (idx <= 0 || line.trim().startsWith("#")) return true;
811
+ return !drop.has(line.slice(0, idx).trim());
812
+ });
813
+ return kept.join("\n").replace(/\n*$/, "\n");
814
+ }
815
+ function expandComposeExpression(expr, env) {
816
+ let out = "";
817
+ for (let i = 0; i < expr.length; ) {
818
+ if (expr[i] === "$" && expr[i + 1] === "{") {
819
+ let depth = 1;
820
+ let j = i + 2;
821
+ for (; j < expr.length && depth > 0; j++) {
822
+ if (expr[j] === "{" && expr[j - 1] === "$") depth++;
823
+ else if (expr[j] === "}") depth--;
824
+ }
825
+ const body = expr.slice(i + 2, j - 1);
826
+ const sep = /^([A-Za-z_][A-Za-z0-9_]*)(:?-)?([\s\S]*)$/.exec(body);
827
+ if (sep) {
828
+ const [, name, operator, fallback] = sep;
829
+ const value = env.get(name);
830
+ const unset = operator === ":-" ? value === void 0 || value === "" : value === void 0;
831
+ out += unset && operator ? expandComposeExpression(fallback, env) : value ?? "";
832
+ }
833
+ i = j;
834
+ continue;
835
+ }
836
+ out += expr[i];
837
+ i++;
838
+ }
839
+ return out;
840
+ }
841
+ function snapshotComposeImageDefaults(composeRaw, env) {
842
+ const defaults = {};
843
+ for (const line of composeRaw.split(/\r?\n/)) {
844
+ const image = /^\s*image:\s*(\S.*?)\s*$/.exec(line);
845
+ if (!image) continue;
846
+ let expr = image[1];
847
+ for (; ; ) {
848
+ const head = /^\$\{([A-Za-z_][A-Za-z0-9_]*):?-([\s\S]*)\}$/.exec(expr);
849
+ if (!head) break;
850
+ const [, name, fallback] = head;
851
+ const resolved = expandComposeExpression(fallback, env);
852
+ if (resolved) defaults[name] = resolved;
853
+ expr = fallback;
854
+ }
855
+ }
856
+ return defaults;
857
+ }
757
858
  var EXE_OS_ALLOW_IMAGE_OVERRIDE_DOC = "EXE_OS_ALLOW_IMAGE_OVERRIDE=1 (documented break-glass; manifest pin is authoritative for production)";
758
859
  function isBreakGlassImageOverrideEnabled(processEnv) {
759
860
  const v = (processEnv.EXE_OS_ALLOW_IMAGE_OVERRIDE ?? "").trim().toLowerCase();
@@ -1596,6 +1697,7 @@ function backupStackConfig(stackDir, composeFile, envRaw, now = () => /* @__PURE
1596
1697
  const backupEnvFile = path.join(updateBackupDir, "env.bak");
1597
1698
  writeSecretFile(backupEnvFile, envRaw);
1598
1699
  let backupComposeFile;
1700
+ let preUpdateImageDefaults;
1599
1701
  try {
1600
1702
  if (existsSync(composeFile)) {
1601
1703
  backupComposeFile = path.join(updateBackupDir, "docker-compose.yml.bak");
@@ -1604,6 +1706,13 @@ function backupStackConfig(stackDir, composeFile, envRaw, now = () => /* @__PURE
1604
1706
  } catch {
1605
1707
  backupComposeFile = void 0;
1606
1708
  }
1709
+ try {
1710
+ if (existsSync(composeFile)) {
1711
+ preUpdateImageDefaults = snapshotComposeImageDefaults(readFileSync(composeFile, "utf8"), parseEnv(envRaw));
1712
+ }
1713
+ } catch {
1714
+ preUpdateImageDefaults = void 0;
1715
+ }
1607
1716
  const composeOverrideFile = composeOverrideFileFor(composeFile);
1608
1717
  const hadComposeOverrideFile = existsSync(composeOverrideFile);
1609
1718
  let backupComposeOverrideFile;
@@ -1649,7 +1758,7 @@ function backupStackConfig(stackDir, composeFile, envRaw, now = () => /* @__PURE
1649
1758
  } catch {
1650
1759
  }
1651
1760
  console.log(`[stack-update] Config backed up to ${updateBackupDir}`);
1652
- return { updateBackupDir, backupEnvFile, backupComposeFile, backupComposeOverrideFile, hadComposeOverrideFile };
1761
+ return { updateBackupDir, backupEnvFile, backupComposeFile, backupComposeOverrideFile, hadComposeOverrideFile, preUpdateImageDefaults };
1653
1762
  }
1654
1763
  function installDockerUbuntu(exec) {
1655
1764
  if (process.platform !== "linux") throw new Error("Docker auto-install is only supported on Linux. Install Docker manually, then retry.");
@@ -2420,6 +2529,9 @@ ${lines.join("\n")}`
2420
2529
  backupComposeOverrideFile: resumeLock?.backupComposeOverrideFile ?? backupComposeOverrideFile,
2421
2530
  hadComposeOverrideFile: resumeLock?.hadComposeOverrideFile ?? hadComposeOverrideFile,
2422
2531
  mutatedEnvKeys: [.../* @__PURE__ */ new Set([...resumeLock?.mutatedEnvKeys ?? [], ...mutatedEnvKeys])],
2532
+ // Bug 879aad12: preserve the FIRST snapshot across --resume; the compose on
2533
+ // disk may already be the new template by the time a resume runs.
2534
+ preUpdateImageDefaults: resumeLock?.preUpdateImageDefaults ?? configBackup.preUpdateImageDefaults,
2423
2535
  services: { ...fullTargetPlan.release.services, ...resumeLock?.services ?? {}, ...plan.release.services },
2424
2536
  serviceStatus: initialServiceStatus
2425
2537
  });
@@ -2827,8 +2939,10 @@ Fix these before the stack is safe to operate.`);
2827
2939
  backupComposeOverrideFile: finalLock.backupComposeOverrideFile ?? backupComposeOverrideFile,
2828
2940
  hadComposeOverrideFile: finalLock.hadComposeOverrideFile ?? hadComposeOverrideFile,
2829
2941
  mutatedEnvKeys: finalLock.mutatedEnvKeys ?? mutatedEnvKeys,
2942
+ preUpdateImageDefaults: finalLock.preUpdateImageDefaults ?? configBackup.preUpdateImageDefaults,
2830
2943
  services: { ...fullTargetPlan.release.services, ...finalLock.services ?? {}, ...plan.release.services }
2831
2944
  });
2945
+ clearDeployStalenessAlert();
2832
2946
  await postDeployAudit(options, "success", plan.targetVersion, previousVersion, void 0, { changes: plan.changes.length });
2833
2947
  return { status: "updated", targetVersion: plan.targetVersion, changes: plan.changes, backupEnvFile, lockFile, serviceStatus: readStackUpdateLock(lockFile)?.serviceStatus };
2834
2948
  } catch (err) {
@@ -2868,6 +2982,8 @@ Fix these before the stack is safe to operate.`);
2868
2982
  }
2869
2983
  }
2870
2984
  }
2985
+ const staleness = evaluateDeployStaleness(readStackUpdateLock(lockFile), now);
2986
+ if (staleness) writeDeployStalenessAlert(staleness);
2871
2987
  await postDeployAudit(options, "failed", plan.targetVersion, previousVersion, reason, { rollbackAttempted: true });
2872
2988
  throw new Error(`Stack update failed and rollback was attempted: ${reason}`);
2873
2989
  } finally {
@@ -3416,6 +3532,9 @@ export {
3416
3532
  reportStackManifestSource,
3417
3533
  parseEnv,
3418
3534
  patchEnv,
3535
+ removeEnvKeys,
3536
+ expandComposeExpression,
3537
+ snapshotComposeImageDefaults,
3419
3538
  resolveServerImageOverride,
3420
3539
  applyServerImageOverrideResolution,
3421
3540
  parseRequiredEnvRefs,
@@ -1,23 +1,23 @@
1
1
  import {
2
2
  MultiAgentOrchestrator
3
- } from "./chunk-JNVQGLPX.js";
3
+ } from "./chunk-QT6CNCXO.js";
4
4
  import {
5
5
  createTokenBudgetMiddleware
6
- } from "./chunk-J6I7X272.js";
6
+ } from "./chunk-2UGU3V63.js";
7
7
  import {
8
8
  createQuietRenderer,
9
9
  createTerminalRenderer,
10
10
  renderAgentEvents
11
11
  } from "./chunk-YZFZDJWZ.js";
12
- import {
13
- checkDangerousPatterns,
14
- hasCriticalPattern
15
- } from "./chunk-CMCYL2JC.js";
16
12
  import {
17
13
  checkPathSafety,
18
14
  checkReadPathSafety,
19
15
  containsPathTraversal
20
16
  } from "./chunk-NGVOA6ZQ.js";
17
+ import {
18
+ checkDangerousPatterns,
19
+ hasCriticalPattern
20
+ } from "./chunk-CMCYL2JC.js";
21
21
  import {
22
22
  ContextManager,
23
23
  agentLoop,
@@ -30,7 +30,7 @@ import {
30
30
  recordDenial,
31
31
  recordSuccess,
32
32
  shouldFallbackToAsk
33
- } from "./chunk-KSVLBATT.js";
33
+ } from "./chunk-E5QQZDQN.js";
34
34
  import {
35
35
  ToolRegistry,
36
36
  partitionTools,
@@ -209,7 +209,7 @@ function createExeOSHooks(config) {
209
209
  );
210
210
  }
211
211
  try {
212
- const { listBehaviors } = await import("./behaviors-R2IE3PEN.js");
212
+ const { listBehaviors } = await import("./behaviors-UCMAREU3.js");
213
213
  const behaviors = await listBehaviors(config.agentId, config.projectName, 12);
214
214
  if (behaviors.length > 0) {
215
215
  process.stderr.write(
@@ -330,7 +330,7 @@ function createExeOSHooks(config) {
330
330
  async onSubagentStop(_reason) {
331
331
  try {
332
332
  const { getClient } = await import("./lib/database.js");
333
- const { sessionScopeFilter } = await import("./task-scope-GDLFE26E.js");
333
+ const { sessionScopeFilter } = await import("./task-scope-PQ67YRWP.js");
334
334
  const client = getClient();
335
335
  const ehScope = sessionScopeFilter();
336
336
  const tasks = await client.execute({
@@ -422,7 +422,7 @@ function createExeOSHooks(config) {
422
422
  try {
423
423
  const { writeMemory, flushBatch } = await import("./lib/store.js");
424
424
  const { getClient } = await import("./lib/database.js");
425
- const { sessionScopeFilter: cpScopeFilter } = await import("./task-scope-GDLFE26E.js");
425
+ const { sessionScopeFilter: cpScopeFilter } = await import("./task-scope-PQ67YRWP.js");
426
426
  const client = getClient();
427
427
  const cpScope = cpScopeFilter();
428
428
  const tasks = await client.execute({