@askexenow/exe-os 0.9.365 → 0.9.367

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 (342) hide show
  1. package/dist/.dist-verified.json +3 -3
  2. package/dist/{active-agent-C6DPH43L.js → active-agent-R6Q7UEUD.js} +3 -3
  3. package/dist/{active-agent-MGF7J3HB.js → active-agent-V3CUDNED.js} +3 -3
  4. package/dist/{agent-defs-generator-X7TVMPVB.js → agent-defs-generator-MLPRGY75.js} +2 -2
  5. package/dist/agent-heartbeat-CQPGJIFF.js +13 -0
  6. package/dist/{agent-loop-E7RZCFDB.js → agent-loop-FOK2IRZQ.js} +1 -1
  7. package/dist/{agentic-ontology-CARDCG37.js → agentic-ontology-5FMQWGDZ.js} +1 -1
  8. package/dist/{backfill-metadata-ANCJA6LA.js → backfill-metadata-YXUMCKRV.js} +5 -5
  9. package/dist/{backup-verify-F7BHVEF7.js → backup-verify-GYHKAX7K.js} +1 -1
  10. package/dist/{behavior-injection-XQ4B7DCF.js → behavior-injection-7VGYY2KO.js} +7 -7
  11. package/dist/{behaviors-R2IE3PEN.js → behaviors-O6HKTSOF.js} +6 -6
  12. package/dist/bin/agentic-ontology-backfill.js +6 -6
  13. package/dist/bin/agentic-reflection-backfill.js +7 -7
  14. package/dist/bin/agentic-semantic-label.js +6 -6
  15. package/dist/bin/backfill-conversations.js +5 -5
  16. package/dist/bin/backfill-responses.js +5 -5
  17. package/dist/bin/backfill-vectors.js +6 -6
  18. package/dist/bin/bulk-sync-postgres.js +10 -10
  19. package/dist/bin/cc-doctor.js +5 -5
  20. package/dist/bin/cleanup-stale-review-tasks.js +14 -13
  21. package/dist/bin/cli.js +20 -20
  22. package/dist/bin/deferred-daemon-restart.js +78 -75
  23. package/dist/bin/exe-agent-config.js +2 -2
  24. package/dist/bin/exe-agent.js +251 -13
  25. package/dist/bin/exe-assign.js +6 -6
  26. package/dist/bin/exe-boot.js +29 -27
  27. package/dist/bin/exe-call.js +4 -4
  28. package/dist/bin/exe-cloud.js +11 -11
  29. package/dist/bin/exe-config-dump.js +2 -2
  30. package/dist/bin/exe-dispatch.js +15 -14
  31. package/dist/bin/exe-doctor.js +5 -5
  32. package/dist/bin/exe-export-behaviors.js +8 -8
  33. package/dist/bin/exe-forget.js +7 -7
  34. package/dist/bin/exe-gateway.js +7 -7
  35. package/dist/bin/exe-healthcheck.js +5 -5
  36. package/dist/bin/exe-heartbeat.js +17 -16
  37. package/dist/bin/exe-kill.js +18 -17
  38. package/dist/bin/exe-launch-agent.js +23 -22
  39. package/dist/bin/exe-mcp.js +3 -3
  40. package/dist/bin/exe-memory-reads.js +5 -5
  41. package/dist/bin/exe-new-employee.js +8 -8
  42. package/dist/bin/exe-os-mcp-proxy.js +3 -3
  43. package/dist/bin/exe-pending-messages.js +15 -14
  44. package/dist/bin/exe-pending-notifications.js +14 -13
  45. package/dist/bin/exe-pending-reviews.js +14 -13
  46. package/dist/bin/exe-rename.js +4 -4
  47. package/dist/bin/exe-review.js +17 -16
  48. package/dist/bin/exe-search.js +6 -6
  49. package/dist/bin/exe-session-cleanup.js +18 -17
  50. package/dist/bin/exe-settings.js +10 -10
  51. package/dist/bin/exe-start-codex.js +21 -13
  52. package/dist/bin/exe-start-opencode.js +9 -9
  53. package/dist/bin/exe-status.js +16 -15
  54. package/dist/bin/exe-support.js +3 -3
  55. package/dist/bin/exe-team.js +4 -4
  56. package/dist/bin/git-sweep.js +23 -14
  57. package/dist/bin/graph-backfill.js +6 -6
  58. package/dist/bin/graph-export.js +6 -6
  59. package/dist/bin/import-history.js +9 -9
  60. package/dist/bin/install.js +80 -77
  61. package/dist/bin/intercom-check.js +4 -4
  62. package/dist/bin/mcp-sessions.js +2 -2
  63. package/dist/bin/orchestration-metrics.js +4 -4
  64. package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
  65. package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
  66. package/dist/bin/reconcile-backlog.js +2 -2
  67. package/dist/bin/registry-proxy.js +1 -1
  68. package/dist/bin/scan-tasks.js +14 -13
  69. package/dist/bin/setup.js +1 -1
  70. package/dist/bin/shard-migrate.js +5 -5
  71. package/dist/bin/stack-update.js +34 -6
  72. package/dist/bin/verify-stack.js +6 -1
  73. package/dist/bin/vps-health-gate.js +1 -1
  74. package/dist/{boot-generation-X45BSVZY.js → boot-generation-EZ2Y74IG.js} +3 -3
  75. package/dist/{boot-review-sections-OBVRXXSF.js → boot-review-sections-7CNQTAYR.js} +13 -12
  76. package/dist/build-manifest.json +865 -835
  77. package/dist/{capability-cards-57FURUMR.js → capability-cards-ZTFMK4VJ.js} +2 -2
  78. package/dist/{capacity-monitor-QEL62JDO.js → capacity-monitor-B2XU4YHP.js} +15 -14
  79. package/dist/{catchup-brief-PMXTCASA.js → catchup-brief-3BEOL7EV.js} +18 -17
  80. package/dist/{chunk-J6I7X272.js → chunk-267QB6VB.js} +1 -1
  81. package/dist/{chunk-IXEFO6HD.js → chunk-2IZH6W73.js} +3 -3
  82. package/dist/{chunk-6GQYPJPG.js → chunk-4DJDC4Y2.js} +8 -8
  83. package/dist/{chunk-LZKYVMBY.js → chunk-4WOOCTON.js} +2 -2
  84. package/dist/{chunk-RHX6MNWY.js → chunk-52CFP2AV.js} +1 -1
  85. package/dist/{chunk-EWZYFG5Q.js → chunk-53LCVVX5.js} +2 -2
  86. package/dist/{chunk-52TIQJEQ.js → chunk-5CH6XKVC.js} +1 -1
  87. package/dist/{chunk-22YQBVMO.js → chunk-66BFQOWR.js} +4 -4
  88. package/dist/{chunk-ESTR7QUP.js → chunk-6MCUXRIP.js} +1 -1
  89. package/dist/{chunk-LHOKWZKL.js → chunk-6NJURKRG.js} +1 -1
  90. package/dist/{chunk-VGE6IHZB.js → chunk-7W5LCREK.js} +80 -12
  91. package/dist/{chunk-FXPAUDCZ.js → chunk-7W6FDHHY.js} +1 -1
  92. package/dist/{chunk-E6ORBQHP.js → chunk-AAMGHW5W.js} +1 -0
  93. package/dist/{chunk-EMZHB767.js → chunk-AE3PYLLS.js} +9 -9
  94. package/dist/{chunk-JUOZLXLH.js → chunk-AEVE654G.js} +1 -1
  95. package/dist/{chunk-PPGPCWRC.js → chunk-ALKYXAMB.js} +4 -4
  96. package/dist/{chunk-MPQXQ5IE.js → chunk-ALYI3P5D.js} +1 -1
  97. package/dist/{chunk-4QKKLK3C.js → chunk-BQYQES2Z.js} +10 -10
  98. package/dist/{chunk-WYLFDSIE.js → chunk-BTMX2D4X.js} +5 -5
  99. package/dist/chunk-BTSWFMEH.js +14 -0
  100. package/dist/{chunk-EKVTRI3N.js → chunk-BY3V5CLX.js} +5 -4
  101. package/dist/{chunk-ZSZPMUNX.js → chunk-CKKLSY7B.js} +126 -7
  102. package/dist/{chunk-6Q263OZE.js → chunk-CTPG4KYZ.js} +1 -1
  103. package/dist/{chunk-C3UAQ3JG.js → chunk-CX4MVEM3.js} +1 -1
  104. package/dist/{chunk-DEFSN2FQ.js → chunk-CYNL3ZFD.js} +3 -3
  105. package/dist/{chunk-RD4E5G3B.js → chunk-DTTISDTI.js} +1 -1
  106. package/dist/{chunk-ZRKEUCUZ.js → chunk-DXCTHNEF.js} +12 -10
  107. package/dist/{chunk-KSVLBATT.js → chunk-E5QQZDQN.js} +53 -0
  108. package/dist/{chunk-DQ5KHWFD.js → chunk-EDZ5URGR.js} +1 -1
  109. package/dist/{chunk-ZDUO6QBH.js → chunk-F3PIHVVY.js} +1 -1
  110. package/dist/{chunk-EJ4522YM.js → chunk-FSIAGX55.js} +1 -1
  111. package/dist/{chunk-RVWALVDT.js → chunk-GUOMZ3JM.js} +2 -2
  112. package/dist/{chunk-BRLS5OLZ.js → chunk-HSBKV5LB.js} +35 -4
  113. package/dist/{chunk-QFIVK3G5.js → chunk-IIVFXD6P.js} +1 -1
  114. package/dist/{chunk-SBAU735L.js → chunk-J6VQ7HYV.js} +4 -4
  115. package/dist/{chunk-EWCEUO65.js → chunk-JFOZHVNO.js} +1 -1
  116. package/dist/{chunk-T6S45OLV.js → chunk-JJRZE2LD.js} +1 -1
  117. package/dist/{chunk-DYWGIPVP.js → chunk-JOKKIFRN.js} +3 -3
  118. package/dist/{chunk-X6A2VWVJ.js → chunk-K2OFS57E.js} +2 -2
  119. package/dist/{chunk-NV6A5HDN.js → chunk-KDD26FUY.js} +1 -1
  120. package/dist/{chunk-L3TB7CC3.js → chunk-KM6XSFHP.js} +12 -2
  121. package/dist/{chunk-CKG6CVKI.js → chunk-LIZ3QQGK.js} +1 -1
  122. package/dist/{chunk-OFGFRT5J.js → chunk-LW5WRSDD.js} +1 -1
  123. package/dist/{chunk-JITNFE4W.js → chunk-MLPPG2OG.js} +1 -1
  124. package/dist/{chunk-3JNVB5LG.js → chunk-MQ3N4KZY.js} +1 -1
  125. package/dist/{chunk-2FYIMTQE.js → chunk-N3JLNMPF.js} +2 -2
  126. package/dist/{chunk-RZIKSE6N.js → chunk-NPND34FS.js} +4 -4
  127. package/dist/{chunk-DWAQOEXL.js → chunk-O3F5P6Z5.js} +2 -2
  128. package/dist/{chunk-M7EES2KM.js → chunk-OADOH45L.js} +3 -3
  129. package/dist/{chunk-MZJBUAC3.js → chunk-OISZ2I4X.js} +4 -4
  130. package/dist/{chunk-R7RM766N.js → chunk-OPS7KUFV.js} +3 -3
  131. package/dist/{chunk-JNVQGLPX.js → chunk-P5XER5QY.js} +3 -3
  132. package/dist/{chunk-J4U5Z7VX.js → chunk-P76VYS6V.js} +4 -4
  133. package/dist/{chunk-KRUYQFSH.js → chunk-PFOJX6CR.js} +5 -5
  134. package/dist/chunk-PFR6EOUY.js +356 -0
  135. package/dist/{agent-heartbeat-I5UPGXAU.js → chunk-PHUHIVD5.js} +4 -5
  136. package/dist/{chunk-45EQTS7B.js → chunk-PQ6NRLKL.js} +1 -1
  137. package/dist/{chunk-5CBGH6RA.js → chunk-PR3AHVFW.js} +3 -3
  138. package/dist/{chunk-ODBRU6BF.js → chunk-PS4NA7PM.js} +1399 -943
  139. package/dist/{chunk-CPILYY2K.js → chunk-PS6VPW64.js} +1 -1
  140. package/dist/{chunk-YMJOLEPE.js → chunk-PWCZFIQH.js} +4 -4
  141. package/dist/{chunk-POPRJKAY.js → chunk-QS6HI4B6.js} +6 -0
  142. package/dist/{chunk-ZNEBZCZR.js → chunk-QWDZNQXA.js} +1 -1
  143. package/dist/{chunk-ORNCMRIX.js → chunk-QX33D4CH.js} +25 -31
  144. package/dist/{chunk-BATQKSLI.js → chunk-R3H3WW7H.js} +2 -2
  145. package/dist/chunk-R4AROSYI.js +496 -0
  146. package/dist/{chunk-F2S3M5MB.js → chunk-SFKIZYKK.js} +2 -2
  147. package/dist/{chunk-IIZITKBV.js → chunk-TCR7NBHD.js} +4 -4
  148. package/dist/{chunk-7C4FUNVO.js → chunk-TJSTWACD.js} +2 -2
  149. package/dist/chunk-TX3Q2GIL.js +97 -0
  150. package/dist/{chunk-2ESB5SDP.js → chunk-TZFOWWPM.js} +1 -1
  151. package/dist/{chunk-WR75WUEP.js → chunk-UI3K73LD.js} +1 -1
  152. package/dist/{chunk-DJK45U7B.js → chunk-URHJDUWO.js} +1 -1
  153. package/dist/{chunk-SP37DONS.js → chunk-V3ISR2QT.js} +1 -1
  154. package/dist/{chunk-EPNWEOOE.js → chunk-VY3QUSWS.js} +6 -6
  155. package/dist/{chunk-O2MEBF23.js → chunk-WBKIU6UJ.js} +2 -2
  156. package/dist/{chunk-TO6TB75E.js → chunk-WCDIDSLR.js} +2 -2
  157. package/dist/{chunk-EVPBYX2Z.js → chunk-WSLFGJBA.js} +1 -1
  158. package/dist/{chunk-OPNROU5B.js → chunk-WYVBWDFY.js} +1 -1
  159. package/dist/{chunk-JYFYIGYK.js → chunk-XA4EU3CW.js} +1 -1
  160. package/dist/{chunk-ZEKCHV43.js → chunk-XAMLDTRA.js} +4 -4
  161. package/dist/{chunk-EHHMNKOA.js → chunk-XKFMNAJ7.js} +1 -1
  162. package/dist/{chunk-5KLQCGI5.js → chunk-XKZD5FGK.js} +55 -0
  163. package/dist/{chunk-U373MEF5.js → chunk-XSXZVKJ7.js} +3 -3
  164. package/dist/{chunk-IM2I7OOS.js → chunk-XTEKGO44.js} +1 -1
  165. package/dist/{chunk-Q7BU5Q6I.js → chunk-XUGOVOID.js} +3 -3
  166. package/dist/{chunk-BEHLIRRJ.js → chunk-XVRQZCTS.js} +1 -1
  167. package/dist/{chunk-P47MPWNU.js → chunk-Y4JVM3SI.js} +1 -1
  168. package/dist/{chunk-NO3M2AFM.js → chunk-Y7OK5PJE.js} +1 -1
  169. package/dist/{chunk-ANPE3TT3.js → chunk-YA4PM3MV.js} +3 -3
  170. package/dist/{chunk-EPDNWY5P.js → chunk-YYLVHUYZ.js} +1 -1
  171. package/dist/{chunk-QYJANQWC.js → chunk-Z5Z3MYUW.js} +2 -2
  172. package/dist/{chunk-MXEIZUXG.js → chunk-ZSHLY5BS.js} +1 -1
  173. package/dist/{chunk-AGQAGOQN.js → chunk-ZZ3JQM5I.js} +9 -9
  174. package/dist/{cleanup-graph-garbage-CAA625RJ.js → cleanup-graph-garbage-XDIX3HLN.js} +7 -7
  175. package/dist/{cloud-sync-command-DBB7WRHL.js → cloud-sync-command-VPYE4FIH.js} +2 -2
  176. package/dist/{cloud-sync-db-init-V7IB23W5.js → cloud-sync-db-init-NSDBTFGI.js} +1 -1
  177. package/dist/{cloud-sync-shutdown-2D3B73CJ.js → cloud-sync-shutdown-6OUYTG4T.js} +2 -2
  178. package/dist/{co-activation-JVN7EBS6.js → co-activation-EAAKGGZH.js} +2 -2
  179. package/dist/{co-occurrence-526PTFGT.js → co-occurrence-OFVF55RX.js} +5 -5
  180. package/dist/codex-consolidation-PPXNBXCV.js +96 -0
  181. package/dist/{conversation-entity-extractor-JO56DB2E.js → conversation-entity-extractor-ZR5GFKAI.js} +3 -3
  182. package/dist/{crdt-sync-LIJLZKFE.js → crdt-sync-FGH4SBFW.js} +1 -1
  183. package/dist/{crm-webhook-55F7Y6D2.js → crm-webhook-PJATR2DC.js} +2 -2
  184. package/dist/{cto-delegation-gate-QIYV4KFO.js → cto-delegation-gate-PO4LSSQ4.js} +13 -12
  185. package/dist/{daemon-orchestration-Q3GJA2JJ.js → daemon-orchestration-IJFZFQUX.js} +18 -17
  186. package/dist/{doc-graph-extractor-P46R4QME.js → doc-graph-extractor-CAYUAM5A.js} +5 -5
  187. package/dist/{documents-7KFEREWO.js → documents-W2G477QE.js} +6 -6
  188. package/dist/{dreaming-JMUXBAPU.js → dreaming-FVXSIIWV.js} +17 -16
  189. package/dist/{employee-boot-brief-HN63D2BY.js → employee-boot-brief-OYMSHFHA.js} +19 -18
  190. package/dist/{exe-drift-7J7GX7DP.js → exe-drift-67RGJOBX.js} +3 -3
  191. package/dist/{exe-export-KJ7B2OBU.js → exe-export-SGYX6XZG.js} +7 -7
  192. package/dist/{exe-import-HPZDWKGE.js → exe-import-UABVA5N3.js} +7 -7
  193. package/dist/{exe-key-2PREP464.js → exe-key-XNYDCVFE.js} +78 -75
  194. package/dist/{exe-org-VEIISATF.js → exe-org-XJVSU5HN.js} +8 -8
  195. package/dist/{exe-snapshot-JXQFLUKA.js → exe-snapshot-YXOGYZUX.js} +18 -17
  196. package/dist/{fast-db-init-SCXJXOYX.js → fast-db-init-GDFJY5UH.js} +1 -1
  197. package/dist/{founder-context-U2SZPLYV.js → founder-context-KUXSNXKS.js} +2 -2
  198. package/dist/gateway/index.js +8 -8
  199. package/dist/{git-staleness-S4NDR7NX.js → git-staleness-NN6RWNLW.js} +2 -2
  200. package/dist/{global-procedures-ZOFTOXIR.js → global-procedures-XDNA3TNA.js} +3 -3
  201. package/dist/{graph-auto-extract-CLVTSUSB.js → graph-auto-extract-KTOR45V4.js} +5 -5
  202. package/dist/{graph-rag-LSJLWGXV.js → graph-rag-L5NV5YWD.js} +3 -3
  203. package/dist/{hook-integrity-SGTKBL6W.js → hook-integrity-X3YAVGUW.js} +1 -1
  204. package/dist/{hook-prefetch-BDSLB6F4.js → hook-prefetch-WE4MIXBM.js} +14 -13
  205. package/dist/hooks/bug-report-worker.js +18 -17
  206. package/dist/hooks/codex-stop-task-finalizer.js +19 -18
  207. package/dist/hooks/commit-complete.js +33 -19
  208. package/dist/hooks/error-recall.js +8 -8
  209. package/dist/hooks/exe-heartbeat-hook.js +4 -4
  210. package/dist/hooks/ingest-worker.js +2 -2
  211. package/dist/hooks/ingest.js +11 -11
  212. package/dist/hooks/instructions-loaded.js +5 -5
  213. package/dist/hooks/manifest.json +20 -20
  214. package/dist/hooks/notification.js +5 -5
  215. package/dist/hooks/post-compact.js +4 -4
  216. package/dist/hooks/post-tool-combined.js +12 -12
  217. package/dist/hooks/pre-compact.js +17 -16
  218. package/dist/hooks/pre-tool-use.js +68 -23
  219. package/dist/hooks/prompt-submit.js +30 -29
  220. package/dist/hooks/session-end.js +113 -99
  221. package/dist/hooks/session-start.js +16 -16
  222. package/dist/hooks/stop.js +82 -19
  223. package/dist/hooks/subagent-stop.js +18 -17
  224. package/dist/hooks/summary-worker.js +22 -21
  225. package/dist/index.js +24 -23
  226. package/dist/{installer-RC2JCKSE.js → installer-EAAYEEEF.js} +6 -6
  227. package/dist/{installer-KCEM4RCG.js → installer-EPQAOI6M.js} +152 -8
  228. package/dist/{installer-EA7T3PBD.js → installer-UDRMFY75.js} +6 -6
  229. package/dist/{intercom-queue-6DZPHHQ2.js → intercom-queue-IBOAVT2I.js} +13 -12
  230. package/dist/lib/cloud-sync.js +10 -10
  231. package/dist/lib/consolidation.js +7 -7
  232. package/dist/lib/database.js +2 -2
  233. package/dist/lib/db-backup.js +1 -1
  234. package/dist/lib/db-write-worker.js +3 -3
  235. package/dist/lib/db.js +2 -2
  236. package/dist/lib/device-registry.js +1 -1
  237. package/dist/lib/employee-templates.js +4 -4
  238. package/dist/lib/employees.js +2 -2
  239. package/dist/lib/exe-daemon.js +77 -76
  240. package/dist/lib/hybrid-search.js +6 -6
  241. package/dist/lib/identity.js +2 -2
  242. package/dist/lib/license.js +2 -2
  243. package/dist/lib/messaging.js +14 -13
  244. package/dist/lib/registry-proxy.js +1 -1
  245. package/dist/lib/reminders.js +3 -3
  246. package/dist/lib/schedules.js +6 -6
  247. package/dist/lib/session-registry.js +4 -4
  248. package/dist/lib/skill-learning.js +7 -7
  249. package/dist/lib/status-brief.js +2 -1
  250. package/dist/lib/store.js +5 -5
  251. package/dist/lib/task-router.js +3 -3
  252. package/dist/lib/tasks.js +15 -14
  253. package/dist/lib/tmux-routing.js +13 -12
  254. package/dist/lib/token-spend.js +3 -3
  255. package/dist/{license-gate-HMSMUIAU.js → license-gate-3TTWJABL.js} +3 -3
  256. package/dist/{license-sync-FBCMPC4J.js → license-sync-ZC6TPKVV.js} +2 -2
  257. package/dist/mcp/register-tools.js +77 -74
  258. package/dist/mcp/server.js +78 -75
  259. package/dist/mcp/tools/complete-reminder.js +4 -4
  260. package/dist/mcp/tools/create-reminder.js +4 -4
  261. package/dist/mcp/tools/create-task.js +17 -16
  262. package/dist/mcp/tools/deactivate-behavior.js +8 -8
  263. package/dist/mcp/tools/list-reminders.js +4 -4
  264. package/dist/mcp/tools/list-tasks.js +17 -16
  265. package/dist/mcp/tools/send-message.js +16 -15
  266. package/dist/mcp/tools/update-task.js +16 -15
  267. package/dist/{mcp-http-config-YKJN52HG.js → mcp-http-config-ROF5EPEF.js} +3 -3
  268. package/dist/{mcp-session-identity-QLUVYWPR.js → mcp-session-identity-ERU6FEUB.js} +13 -12
  269. package/dist/{memory-cards-K2OSX4AW.js → memory-cards-3QTXI2SG.js} +5 -5
  270. package/dist/{memory-graph-extractor-YLTSKLSY.js → memory-graph-extractor-7GAILMYG.js} +6 -6
  271. package/dist/{memory-poisoning-defense-IPO4ADRL.js → memory-poisoning-defense-TPXSRJTQ.js} +2 -2
  272. package/dist/{memory-pressure-watchdog-ZI3TH2OF.js → memory-pressure-watchdog-ZSOP6T2F.js} +14 -13
  273. package/dist/{memory-reflection-ZKVRU3NT.js → memory-reflection-3AI4JBV2.js} +2 -2
  274. package/dist/{notification-ledger-4REL6M3T.js → notification-ledger-ZU7ZFJJX.js} +16 -14
  275. package/dist/{notifications-UXJUAP3C.js → notifications-S4GU22GF.js} +13 -12
  276. package/dist/{orchestration-events-GMRGGBMN.js → orchestration-events-HVG56HJ5.js} +3 -3
  277. package/dist/{orchestrator-5TV75HDJ.js → orchestrator-UW3Q3WYG.js} +15 -14
  278. package/dist/{org-brief-session-7AZZEO3F.js → org-brief-session-G36TJBN4.js} +5 -5
  279. package/dist/{org-consent-policy-XT6UZENB.js → org-consent-policy-RMYVMM3X.js} +1 -1
  280. package/dist/{org-partner-runtime-WLZAZJIY.js → org-partner-runtime-KXMGEYFW.js} +5 -5
  281. package/dist/{org-row-visibility-A5XM4MVO.js → org-row-visibility-UI5PGN76.js} +1 -1
  282. package/dist/{pipeline-router-UEVXDUHR.js → pipeline-router-IODWXDDI.js} +3 -3
  283. package/dist/{plan-limits-QEP32X4W.js → plan-limits-XMAQVEJZ.js} +5 -5
  284. package/dist/{projection-worker-GMRC6SBH.js → projection-worker-6LZUCI3B.js} +2 -2
  285. package/dist/{prospective-memory-QLHSAPSG.js → prospective-memory-G5VK5GCD.js} +2 -2
  286. package/dist/{push-notifications-GKRPXOGI.js → push-notifications-S2RYRXLF.js} +14 -13
  287. package/dist/{reranker-GB4VEMUV.js → reranker-EHQTAA3L.js} +1 -1
  288. package/dist/{retrieval-health-QIBPBGN6.js → retrieval-health-WZ4ICGNF.js} +1 -1
  289. package/dist/{review-polling-MU47NQ2N.js → review-polling-MAWLRDSP.js} +14 -13
  290. package/dist/runtime/index.js +18 -17
  291. package/dist/{session-events-YMQ3VGBJ.js → session-events-BRUIZ5E4.js} +14 -13
  292. package/dist/{session-kill-telemetry-VGPKE57M.js → session-kill-telemetry-PTZLHT33.js} +14 -13
  293. package/dist/{session-scope-P46KAHXQ.js → session-scope-G4RVJJGR.js} +13 -12
  294. package/dist/{setup-wizard-BRNHSJ4U.js → setup-wizard-WFEUB63Z.js} +1 -1
  295. package/dist/{skill-refinement-NLYDSFEH.js → skill-refinement-2OYPH7WD.js} +3 -3
  296. package/dist/{stack-promote-NHFTNIM2.js → stack-promote-DLYYQXQI.js} +5 -4
  297. package/dist/{stack-release-AQVKZUS7.js → stack-release-OPWARLXI.js} +5 -4
  298. package/dist/{stack-update-LLX5KT7G.js → stack-update-SJ43IEQE.js} +10 -3
  299. package/dist/{steward-gate-JKHYFAHA.js → steward-gate-V7PBGVFK.js} +3 -3
  300. package/dist/{subagent-brief-injection-VDVOHDOU.js → subagent-brief-injection-BLCRI2AJ.js} +20 -19
  301. package/dist/{support-inbox-S6YO5YZU.js → support-inbox-6HOQYFD2.js} +3 -3
  302. package/dist/{task-enforcement-LXW45H5Z.js → task-enforcement-EF6O2V26.js} +14 -13
  303. package/dist/{task-request-inbox-UCSKDC3R.js → task-request-inbox-OB2KIJWO.js} +1 -1
  304. package/dist/{task-scope-GDLFE26E.js → task-scope-74JBTKJN.js} +17 -15
  305. package/dist/{tasks-crud-W7VGWRUV.js → tasks-crud-ZU6RZDEZ.js} +13 -12
  306. package/dist/{tasks-notify-CT7NWCS4.js → tasks-notify-767DRYAA.js} +14 -13
  307. package/dist/{tasks-review-WCSKOUFW.js → tasks-review-4F6PZZ3B.js} +13 -12
  308. package/dist/{telemetry-upload-FK5WKXVB.js → telemetry-upload-2JM6KIAB.js} +7 -7
  309. package/dist/{token-budget-GBNGSIU3.js → token-budget-NH2RD4YX.js} +3 -3
  310. package/dist/{tool-gates-3IC7DK4R.js → tool-gates-2OZY3GZM.js} +1 -1
  311. package/dist/{tool-gates-GXSYBVK4.js → tool-gates-7PLIOLAL.js} +1 -1
  312. package/dist/{tool-telemetry-VKMRS6MP.js → tool-telemetry-CHCBD4OQ.js} +1 -1
  313. package/dist/tui/App.js +22 -21
  314. package/dist/{tui-data-FTPV2XBQ.js → tui-data-244GF3BI.js} +13 -12
  315. package/dist/{update-support-J6UWPUOC.js → update-support-P2LO3DAB.js} +9 -9
  316. package/dist/work-claims-4QOE7DT2.js +53 -0
  317. package/dist/{work-state-heartbeat-4LDF6DSM.js → work-state-heartbeat-GX3VWWWK.js} +1 -1
  318. package/dist/{worker-gate-35VZINZG.js → worker-gate-62PZATOV.js} +1 -1
  319. package/dist/{workflow-engine-4DA6RSHI.js → workflow-engine-7YIRU62F.js} +2 -2
  320. package/dist/{worktree-H3YFJ3NU.js → worktree-3TUKIZWY.js} +4 -4
  321. package/dist/{worktree-sweep-4EDLLQ2E.js → worktree-sweep-MYQHUXDE.js} +5 -5
  322. package/package.json +6 -2
  323. package/release-notes.json +68 -62
  324. package/dist/chunk-2RQT7TED.js +0 -275
  325. /package/dist/{chunk-7Y6AQWVT.js → chunk-25EN7XXN.js} +0 -0
  326. /package/dist/{chunk-3THNS2T7.js → chunk-62U63R3E.js} +0 -0
  327. /package/dist/{chunk-VS4LPG66.js → chunk-65ZSFW3O.js} +0 -0
  328. /package/dist/{chunk-LKYGSJ2E.js → chunk-BTFDA3UJ.js} +0 -0
  329. /package/dist/{chunk-JRPYLUXH.js → chunk-DAXFAXLN.js} +0 -0
  330. /package/dist/{chunk-3NBWARKC.js → chunk-FLP2BQOA.js} +0 -0
  331. /package/dist/{chunk-CMBF5WCL.js → chunk-GTOMDMJL.js} +0 -0
  332. /package/dist/{chunk-QYECRPGD.js → chunk-JLYHJJHU.js} +0 -0
  333. /package/dist/{chunk-MBBFL2SP.js → chunk-JZBZI36P.js} +0 -0
  334. /package/dist/{chunk-BY7WWPRM.js → chunk-OUIEDJFO.js} +0 -0
  335. /package/dist/{chunk-7DMCAGSC.js → chunk-WM7Y5ZV2.js} +0 -0
  336. /package/dist/{chunk-G2EAYH4U.js → chunk-XM7HJ5SS.js} +0 -0
  337. /package/dist/{chunk-UY6HRDB2.js → chunk-YNPOELAN.js} +0 -0
  338. /package/dist/{core-memory-CMPPHJN5.js → core-memory-EARETDZ6.js} +0 -0
  339. /package/dist/{memory-isolation-ZB5S5HCO.js → memory-isolation-XASOGA7G.js} +0 -0
  340. /package/dist/{oauth-server-NP7KGF7N.js → oauth-server-C3BXAKAW.js} +0 -0
  341. /package/dist/{project-boot-LEZSK3W7.js → project-boot-LCFBQ6NB.js} +0 -0
  342. /package/dist/{wiki-acl-5DKOWOIH.js → wiki-acl-XQH4UBP2.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  WORK_STATE_HEARTBEAT_TOOL
3
- } from "./chunk-QYECRPGD.js";
3
+ } from "./chunk-JLYHJJHU.js";
4
4
  import {
5
5
  extractKeywords,
6
6
  keywordsToString
@@ -12,7 +12,7 @@ import {
12
12
  findScopedDuplicate,
13
13
  governMemoryRecord,
14
14
  schedulePostWriteMemoryHygiene
15
- } from "./chunk-7DMCAGSC.js";
15
+ } from "./chunk-WM7Y5ZV2.js";
16
16
  import {
17
17
  orgBus
18
18
  } from "./chunk-MP2AFCGL.js";
@@ -23,7 +23,7 @@ import {
23
23
  initPostgresOnlyDatabase,
24
24
  initTurso,
25
25
  isDaemonRoutingActive
26
- } from "./chunk-BRLS5OLZ.js";
26
+ } from "./chunk-HSBKV5LB.js";
27
27
  import {
28
28
  isPostgresBackendEnabled
29
29
  } from "./chunk-YYB5PMTK.js";
@@ -82,7 +82,7 @@ function recordShardFailure(project, error) {
82
82
  `[store] Shard circuit OPEN for "${project}" after ${state.failures} consecutive failures. Will retry in ${SHARD_CB_COOLDOWN_MS / 6e4}min. Last error: ${error}
83
83
  `
84
84
  );
85
- void import("./orchestration-events-GMRGGBMN.js").then(({ recordOrchestrationEventBestEffort }) => {
85
+ void import("./orchestration-events-HVG56HJ5.js").then(({ recordOrchestrationEventBestEffort }) => {
86
86
  recordOrchestrationEventBestEffort({
87
87
  eventType: "shard.circuit_open",
88
88
  source: "store.recordShardFailure",
@@ -186,7 +186,7 @@ async function initStore(options) {
186
186
  );
187
187
  _nextVersion = (Number(vResult.rows[0]?.max_v) || 0) + 1;
188
188
  try {
189
- const { loadGlobalProcedures } = await import("./global-procedures-ZOFTOXIR.js");
189
+ const { loadGlobalProcedures } = await import("./global-procedures-XDNA3TNA.js");
190
190
  await loadGlobalProcedures();
191
191
  } catch (e) {
192
192
  logStoreWarn("catch", e);
@@ -314,7 +314,7 @@ async function writeMemory(record) {
314
314
  founder_id: record.founder_id ?? null
315
315
  };
316
316
  try {
317
- const { checkMemoryPoisoning } = await import("./memory-poisoning-defense-IPO4ADRL.js");
317
+ const { checkMemoryPoisoning } = await import("./memory-poisoning-defense-TPXSRJTQ.js");
318
318
  const poisonResult = await checkMemoryPoisoning({
319
319
  memoryId: dbRow.id,
320
320
  vector: Array.isArray(dbRow.vector) ? dbRow.vector : void 0,
@@ -513,19 +513,19 @@ async function flushBatch() {
513
513
  _nextVersion = baseVersion;
514
514
  if (insertedBatch.length > 0) {
515
515
  try {
516
- const { insertMemoryCardsForBatch } = await import("./memory-cards-K2OSX4AW.js");
516
+ const { insertMemoryCardsForBatch } = await import("./memory-cards-3QTXI2SG.js");
517
517
  await insertMemoryCardsForBatch(insertedBatch);
518
518
  } catch (e) {
519
519
  logStoreWarn("catch", e);
520
520
  }
521
521
  try {
522
- const { insertOntologyForBatch } = await import("./agentic-ontology-CARDCG37.js");
522
+ const { insertOntologyForBatch } = await import("./agentic-ontology-5FMQWGDZ.js");
523
523
  await insertOntologyForBatch(insertedBatch);
524
524
  } catch (e) {
525
525
  logStoreWarn("catch", e);
526
526
  }
527
527
  try {
528
- const { extractGraphForBatch } = await import("./memory-graph-extractor-YLTSKLSY.js");
528
+ const { extractGraphForBatch } = await import("./memory-graph-extractor-7GAILMYG.js");
529
529
  await extractGraphForBatch(insertedBatch);
530
530
  } catch (e) {
531
531
  logStoreWarn("catch", e);
@@ -665,7 +665,7 @@ async function searchMemories(queryVector, agentId, options) {
665
665
  args.push(activeEmbeddingModel);
666
666
  }
667
667
  try {
668
- const { founderScopeFilter } = await import("./founder-context-U2SZPLYV.js");
668
+ const { founderScopeFilter } = await import("./founder-context-KUXSNXKS.js");
669
669
  const founderFilter = founderScopeFilter(options?.founderId);
670
670
  sql += founderFilter.sql;
671
671
  args.push(...founderFilter.args.filter((a) => a !== null));
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-NEHOQ3P2.js";
5
5
  import {
6
6
  isCrdtSyncEnabled
7
- } from "./chunk-3THNS2T7.js";
7
+ } from "./chunk-62U63R3E.js";
8
8
  import {
9
9
  orgMembershipsPath,
10
10
  orgModeActive
@@ -25,7 +25,7 @@ import {
25
25
  import {
26
26
  GHOST_BEHAVIOR_SQL,
27
27
  isGhostBehaviorRow
28
- } from "./chunk-O2MEBF23.js";
28
+ } from "./chunk-WBKIU6UJ.js";
29
29
  import {
30
30
  retryOnDaemonTransportError
31
31
  } from "./chunk-VMJ2UH4S.js";
@@ -41,10 +41,10 @@ import {
41
41
  loadEmployees,
42
42
  registerBinSymlinks,
43
43
  saveEmployees
44
- } from "./chunk-BRLS5OLZ.js";
44
+ } from "./chunk-HSBKV5LB.js";
45
45
  import {
46
46
  loadDeviceId
47
- } from "./chunk-ZDUO6QBH.js";
47
+ } from "./chunk-F3PIHVVY.js";
48
48
  import {
49
49
  EXE_AI_DIR
50
50
  } from "./chunk-QMSEL5YS.js";
@@ -1024,7 +1024,7 @@ async function cloudSync(config, options) {
1024
1024
  pullResult = await cloudPull(lastPullVersion, config);
1025
1025
  if (pullResult.records.length > 0) {
1026
1026
  if (shouldUseCrdtMergeForCloudSync()) {
1027
- const { initCrdtDoc, importExistingMemories, readAllMemories } = await import("./crdt-sync-LIJLZKFE.js");
1027
+ const { initCrdtDoc, importExistingMemories, readAllMemories } = await import("./crdt-sync-FGH4SBFW.js");
1028
1028
  initCrdtDoc();
1029
1029
  importExistingMemories(
1030
1030
  pullResult.records.map((rec) => ({
@@ -0,0 +1,14 @@
1
+ // src/lib/session-scope-token.ts
2
+ var VALID_SESSION_SCOPE_RE = /^[a-zA-Z0-9_]+$/;
3
+ function isValidSessionScope(scope) {
4
+ return typeof scope === "string" && scope.length > 0 && scope.length <= 64 && VALID_SESSION_SCOPE_RE.test(scope);
5
+ }
6
+ function sanitizeSessionScope(scope) {
7
+ return isValidSessionScope(scope) ? scope : null;
8
+ }
9
+
10
+ export {
11
+ VALID_SESSION_SCOPE_RE,
12
+ isValidSessionScope,
13
+ sanitizeSessionScope
14
+ };
@@ -5,14 +5,14 @@ import {
5
5
  EXE_HOOKS,
6
6
  isLegacyHomeDirHookCommand,
7
7
  isLegacySplitPostToolCommand
8
- } from "./chunk-L3TB7CC3.js";
8
+ } from "./chunk-KM6XSFHP.js";
9
9
  import {
10
10
  buildClaudeHttpMcpEntry,
11
11
  buildClaudeStdioProxyMcpEntry
12
- } from "./chunk-EWCEUO65.js";
12
+ } from "./chunk-JFOZHVNO.js";
13
13
  import {
14
14
  ensureAllAgentSymlinks
15
- } from "./chunk-ESTR7QUP.js";
15
+ } from "./chunk-6MCUXRIP.js";
16
16
  import {
17
17
  MCP_LEGACY_KEY,
18
18
  MCP_PRIMARY_KEY
@@ -641,6 +641,7 @@ async function mergeHooks(packageRoot, homeDir = os.homedir()) {
641
641
  "update_task",
642
642
  "close_task",
643
643
  "checkpoint_task",
644
+ "claim",
644
645
  // Behaviors
645
646
  "store_behavior",
646
647
  "deactivate_behavior",
@@ -922,7 +923,7 @@ async function runInstaller(homeDir) {
922
923
  );
923
924
  }
924
925
  try {
925
- const { generateAgentDefs, summarizeAgentDefResults } = await import("./agent-defs-generator-X7TVMPVB.js");
926
+ const { generateAgentDefs, summarizeAgentDefResults } = await import("./agent-defs-generator-MLPRGY75.js");
926
927
  const defResults = generateAgentDefs({ homeDir: resolvedHome });
927
928
  process.stderr.write(`Agent definitions: ${summarizeAgentDefResults(defResults)}
928
929
  `);
@@ -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-F3PIHVVY.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,
@@ -212,7 +212,7 @@ async function main(args) {
212
212
  console.log("[health-gate] Starting rollback...");
213
213
  restorePreDeployBackup();
214
214
  try {
215
- const { rollbackStackUpdate, defaultStackPaths } = await import("./stack-update-LLX5KT7G.js");
215
+ const { rollbackStackUpdate, defaultStackPaths } = await import("./stack-update-SJ43IEQE.js");
216
216
  const paths = defaultStackPaths();
217
217
  await rollbackStackUpdate({
218
218
  manifestRef: paths.manifestRef,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getClient
3
- } from "./chunk-BRLS5OLZ.js";
3
+ } from "./chunk-HSBKV5LB.js";
4
4
 
5
5
  // src/lib/skill-refinement.ts
6
6
  import crypto from "crypto";
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  cleanupCardsForMemories,
3
3
  cleanupGraphLinksForMemories
4
- } from "./chunk-EWZYFG5Q.js";
4
+ } from "./chunk-53LCVVX5.js";
5
5
  import {
6
6
  resolveAnthropicAuth
7
7
  } from "./chunk-VGMACSEV.js";
8
8
  import {
9
9
  buildSystemStateExclusionFilter,
10
10
  vectorToBlob
11
- } from "./chunk-4QKKLK3C.js";
11
+ } from "./chunk-BQYQES2Z.js";
12
12
  import {
13
13
  extractKeywords,
14
14
  keywordsToString
15
15
  } from "./chunk-CHCA3ZM2.js";
16
16
  import {
17
17
  isCoordinatorName
18
- } from "./chunk-BRLS5OLZ.js";
18
+ } from "./chunk-HSBKV5LB.js";
19
19
 
20
20
  // src/lib/consolidation.ts
21
21
  import { randomUUID } from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getClient
3
- } from "./chunk-BRLS5OLZ.js";
3
+ } from "./chunk-HSBKV5LB.js";
4
4
  import {
5
5
  loadConfig
6
6
  } from "./chunk-QMSEL5YS.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  isPaneBusy
3
- } from "./chunk-ZEKCHV43.js";
3
+ } from "./chunk-XAMLDTRA.js";
4
4
  import {
5
5
  recordSessionKill
6
- } from "./chunk-ANPE3TT3.js";
6
+ } from "./chunk-YA4PM3MV.js";
7
7
  import {
8
8
  updateTask
9
- } from "./chunk-AGQAGOQN.js";
9
+ } from "./chunk-ZZ3JQM5I.js";
10
10
  import {
11
11
  BUSY_PATTERN,
12
12
  countPendingReviews,
@@ -15,7 +15,6 @@ import {
15
15
  getSessionState,
16
16
  getSessionStateAsync,
17
17
  isExeSession,
18
- isValidSessionScope,
19
18
  queryTaskRows,
20
19
  queueIntercom,
21
20
  sendIntercomAsync,
@@ -23,14 +22,17 @@ import {
23
22
  sessionScopeFilter,
24
23
  strictSessionScopeFilter,
25
24
  writeNotification
26
- } from "./chunk-ORNCMRIX.js";
25
+ } from "./chunk-QX33D4CH.js";
26
+ import {
27
+ isValidSessionScope
28
+ } from "./chunk-BTSWFMEH.js";
27
29
  import {
28
30
  LEASE_MINUTES,
29
31
  isLeaseExpired
30
32
  } from "./chunk-E23LNUWJ.js";
31
33
  import {
32
34
  listSessions
33
- } from "./chunk-EHHMNKOA.js";
35
+ } from "./chunk-XKFMNAJ7.js";
34
36
  import {
35
37
  capturePaneLinesAsync,
36
38
  listTmuxSessions,
@@ -42,7 +44,7 @@ import {
42
44
  } from "./chunk-UXLO7VHX.js";
43
45
  import {
44
46
  recordOrchestrationEventBestEffort
45
- } from "./chunk-WR75WUEP.js";
47
+ } from "./chunk-UI3K73LD.js";
46
48
  import {
47
49
  checkDispatchStatus,
48
50
  readTerminalLauncherFailure,
@@ -62,7 +64,7 @@ import {
62
64
  getCoordinatorName,
63
65
  isCoordinatorName,
64
66
  shouldAutoInstance
65
- } from "./chunk-BRLS5OLZ.js";
67
+ } from "./chunk-HSBKV5LB.js";
66
68
  import {
67
69
  eventLoopBlockedMarkerPath
68
70
  } from "./chunk-JY5GAZYC.js";
@@ -3457,7 +3459,7 @@ async function reapOrphanedWorktrees(deps, nowMs = Date.now()) {
3457
3459
  }
3458
3460
  async function createWorktreeReaperRealDeps() {
3459
3461
  const { getPaneCwdAsync } = await import("./lib/tmux-status.js");
3460
- const { getGitRootAsync, isWorktreeDirtyAsync } = await import("./worktree-H3YFJ3NU.js");
3462
+ const { getGitRootAsync, isWorktreeDirtyAsync } = await import("./worktree-3TUKIZWY.js");
3461
3463
  const { statSync: statSync3 } = await import("fs");
3462
3464
  const { basename: basename2 } = await import("path");
3463
3465
  const { promisify: promisify2 } = await import("util");
@@ -3700,7 +3702,7 @@ async function gcStaleCheckpoints() {
3700
3702
  }
3701
3703
  async function pollTaskGroupBarriers() {
3702
3704
  try {
3703
- const { checkAndFireBarriers } = await import("./tasks-crud-W7VGWRUV.js");
3705
+ const { checkAndFireBarriers } = await import("./tasks-crud-ZU6RZDEZ.js");
3704
3706
  const firedGroupIds = await checkAndFireBarriers();
3705
3707
  if (firedGroupIds.length === 0) return 0;
3706
3708
  const { getClient } = await import("./lib/database.js");
@@ -5,6 +5,47 @@ import {
5
5
  checkPermission
6
6
  } from "./chunk-2O2UKMUE.js";
7
7
 
8
+ // src/runtime/stall-detection.ts
9
+ import { createHash } from "crypto";
10
+ var STALL_LIMITS = {
11
+ /**
12
+ * Consecutive identical (calls + results) turns before the loop is declared
13
+ * stalled. Three, not two: a legitimate retry of a transient failure is common
14
+ * and should be allowed exactly once. A third identical outcome is not a retry,
15
+ * it is a loop.
16
+ */
17
+ maxIdenticalTurns: 3
18
+ };
19
+ function createStallState() {
20
+ return { lastSignature: null, repeats: 0 };
21
+ }
22
+ function turnSignature(calls, results) {
23
+ if (calls.length === 0) return null;
24
+ const payload = JSON.stringify({
25
+ calls: calls.map((c) => [c.name, stableStringify(c.input)]),
26
+ results: results.map((r) => [r.content, Boolean(r.isError)])
27
+ });
28
+ return createHash("sha256").update(payload).digest("hex").slice(0, 32);
29
+ }
30
+ function stableStringify(value) {
31
+ if (value === null || typeof value !== "object") return JSON.stringify(value) ?? "null";
32
+ if (Array.isArray(value)) return `[${value.map(stableStringify).join(",")}]`;
33
+ const obj = value;
34
+ return `{${Object.keys(obj).sort().map((k) => `${JSON.stringify(k)}:${stableStringify(obj[k])}`).join(",")}}`;
35
+ }
36
+ function recordTurn(state, signature) {
37
+ if (signature === null) return createStallState();
38
+ if (signature === state.lastSignature) return { lastSignature: signature, repeats: state.repeats + 1 };
39
+ return { lastSignature: signature, repeats: 1 };
40
+ }
41
+ function isStalled(state) {
42
+ return state.repeats >= STALL_LIMITS.maxIdenticalTurns;
43
+ }
44
+ function stallReason(state, toolNames = []) {
45
+ const tools = toolNames.length > 0 ? ` (${[...new Set(toolNames)].join(", ")})` : "";
46
+ return `Agent stalled: the same tool call and the same result${tools} repeated ${state.repeats} turns in a row with no progress. Stopping instead of burning the remaining turn budget on an identical retry.`;
47
+ }
48
+
8
49
  // src/runtime/compact.ts
9
50
  var COMPACTION_THRESHOLD = 0.85;
10
51
  var KEEP_RECENT_MESSAGES = 10;
@@ -322,6 +363,7 @@ async function* agentLoop(userMessage, history, config) {
322
363
  const allowedTools = config.tools.toAllowedNormalizedTools(config.permissions);
323
364
  const contextManager = createContextManager(config.model, config.hooks);
324
365
  let denialState = createDenialTrackingState();
366
+ let stallState = createStallState();
325
367
  let turns = 0;
326
368
  let activeModel = config.model;
327
369
  let routedToFallback = false;
@@ -462,6 +504,17 @@ async function* agentLoop(userMessage, history, config) {
462
504
  }
463
505
  messages.push({ role: "user", content: toolResults });
464
506
  yield { type: "turn_complete", turn: turns, usage: response.usage };
507
+ stallState = recordTurn(stallState, turnSignature(
508
+ toolUseBlocks.map((b) => ({ name: b.name, input: b.input })),
509
+ toolResults.map((r) => ({
510
+ content: typeof r.content === "string" ? r.content : "",
511
+ isError: Boolean(r.is_error)
512
+ }))
513
+ ));
514
+ if (isStalled(stallState)) {
515
+ yield { type: "error", error: new Error(stallReason(stallState, toolUseBlocks.map((b) => b.name))) };
516
+ break;
517
+ }
465
518
  }
466
519
  yield { type: "done", totalUsage, turns };
467
520
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  processCRMEvent
3
- } from "./chunk-UY6HRDB2.js";
3
+ } from "./chunk-YNPOELAN.js";
4
4
 
5
5
  // src/gateway/adapters/crm-webhook.ts
6
6
  function parseTwentyWebhook(payload) {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-A7XLR3K7.js";
4
4
  import {
5
5
  getDeviceInfo
6
- } from "./chunk-VS4LPG66.js";
6
+ } from "./chunk-65ZSFW3O.js";
7
7
  import {
8
8
  EXE_AI_DIR
9
9
  } from "./chunk-QMSEL5YS.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createReminder
3
- } from "./chunk-RD4E5G3B.js";
3
+ } from "./chunk-DTTISDTI.js";
4
4
 
5
5
  // src/mcp/tools/create-reminder.ts
6
6
  import { z } from "zod";
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-75H4R62K.js";
4
4
  import {
5
5
  initStore
6
- } from "./chunk-4QKKLK3C.js";
6
+ } from "./chunk-BQYQES2Z.js";
7
7
  import {
8
8
  getClient,
9
9
  isInitialized
10
- } from "./chunk-BRLS5OLZ.js";
10
+ } from "./chunk-HSBKV5LB.js";
11
11
 
12
12
  // src/lib/schedules.ts
13
13
  import crypto from "crypto";