@askexenow/exe-os 0.9.217 → 0.9.219

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 (238) hide show
  1. package/deploy/compose/.env.customer.example +12 -2
  2. package/deploy/compose/.env.example +42 -16
  3. package/deploy/compose/PROTECTED_FILES.md +1 -0
  4. package/deploy/compose/README.md +1 -1
  5. package/deploy/compose/backup.sh +3 -1
  6. package/deploy/compose/clickhouse-config.xml +18 -0
  7. package/deploy/compose/docker-compose.yml +37 -13
  8. package/deploy/compose/gateway.json +12 -2
  9. package/deploy/compose/generate-env.ts +17 -1
  10. package/deploy/compose/init-db.sql +12 -0
  11. package/deploy/compose/restore.sh +1 -0
  12. package/deploy/compose/setup.sh +3 -1
  13. package/deploy/compose/uptime-check.sh +143 -0
  14. package/deploy/stack-manifests/v0.9.json +4 -4
  15. package/dist/{active-agent-R7QDYADX.js → active-agent-65SRKUVF.js} +2 -2
  16. package/dist/{active-agent-4XH2Q6KJ.js → active-agent-YLIAU6SX.js} +2 -2
  17. package/dist/{agentic-ontology-CHAWPTEY.js → agentic-ontology-VZWBROYO.js} +1 -1
  18. package/dist/{backfill-metadata-I6VR7JZ2.js → backfill-metadata-YUN6DXIE.js} +3 -3
  19. package/dist/{behaviors-YJ3HEQED.js → behaviors-4PGM7IJJ.js} +2 -2
  20. package/dist/bin/agentic-ontology-backfill.js +4 -4
  21. package/dist/bin/agentic-reflection-backfill.js +5 -5
  22. package/dist/bin/agentic-semantic-label.js +4 -4
  23. package/dist/bin/backfill-conversations.js +3 -3
  24. package/dist/bin/backfill-responses.js +3 -3
  25. package/dist/bin/backfill-vectors.js +4 -4
  26. package/dist/bin/bulk-sync-postgres.js +5 -5
  27. package/dist/bin/cleanup-stale-review-tasks.js +8 -8
  28. package/dist/bin/cli.js +30 -12
  29. package/dist/bin/exe-agent-config.js +1 -1
  30. package/dist/bin/exe-agent.js +6 -6
  31. package/dist/bin/exe-assign.js +4 -4
  32. package/dist/bin/exe-boot.js +15 -15
  33. package/dist/bin/exe-call.js +3 -3
  34. package/dist/bin/exe-cloud.js +3 -3
  35. package/dist/bin/exe-dispatch.js +8 -8
  36. package/dist/bin/exe-doctor.js +1 -1
  37. package/dist/bin/exe-export-behaviors.js +6 -6
  38. package/dist/bin/exe-forget.js +5 -5
  39. package/dist/bin/exe-gateway.js +38 -12
  40. package/dist/bin/exe-heartbeat.js +8 -8
  41. package/dist/bin/exe-kill.js +11 -11
  42. package/dist/bin/exe-launch-agent.js +15 -15
  43. package/dist/bin/exe-new-employee.js +5 -5
  44. package/dist/bin/exe-pending-messages.js +9 -9
  45. package/dist/bin/exe-pending-notifications.js +8 -8
  46. package/dist/bin/exe-pending-reviews.js +8 -8
  47. package/dist/bin/exe-rename.js +3 -3
  48. package/dist/bin/exe-review.js +10 -10
  49. package/dist/bin/exe-search.js +4 -4
  50. package/dist/bin/exe-session-cleanup.js +13 -13
  51. package/dist/bin/exe-settings.js +3 -3
  52. package/dist/bin/exe-start-codex.js +10 -10
  53. package/dist/bin/exe-start-opencode.js +7 -7
  54. package/dist/bin/exe-status.js +9 -9
  55. package/dist/bin/exe-team.js +2 -2
  56. package/dist/bin/git-sweep.js +8 -8
  57. package/dist/bin/graph-backfill.js +3 -3
  58. package/dist/bin/graph-export.js +4 -4
  59. package/dist/bin/import-history.js +4 -4
  60. package/dist/bin/install.js +5 -5
  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 +3 -3
  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/scan-tasks.js +8 -8
  67. package/dist/bin/setup.js +1 -1
  68. package/dist/bin/shard-migrate.js +3 -3
  69. package/dist/bin/stack-update.js +1 -1
  70. package/dist/bin/vps-health-gate.js +1 -1
  71. package/dist/{capacity-monitor-XFMZSJDB.js → capacity-monitor-A6TMCY5F.js} +9 -9
  72. package/dist/{catchup-brief-D5IZFZDO.js → catchup-brief-TU4C22MJ.js} +10 -10
  73. package/dist/{chunk-F54CVIXL.js → chunk-222EGJ6Z.js} +1 -1
  74. package/dist/{chunk-6UY62EGD.js → chunk-2F7URV5H.js} +4 -4
  75. package/dist/{chunk-2DRWIXOO.js → chunk-2OERQW4L.js} +2 -2
  76. package/dist/{chunk-4GXXYDNU.js → chunk-3XGZAFHE.js} +36 -0
  77. package/dist/{chunk-BN3HRSEU.js → chunk-443YQ2FS.js} +2 -2
  78. package/dist/{chunk-5QKUR5KS.js → chunk-4UHKYQZJ.js} +1 -1
  79. package/dist/{chunk-QOY6CTHV.js → chunk-55VWU47L.js} +2 -2
  80. package/dist/{chunk-ACOW43IN.js → chunk-56NWZFB2.js} +1 -1
  81. package/dist/{chunk-UO3IEPSY.js → chunk-5ZTZ3SHF.js} +233 -333
  82. package/dist/{chunk-GKNYEJQ3.js → chunk-7DYKIMN2.js} +1 -1
  83. package/dist/{chunk-5G643UWZ.js → chunk-7EUYGWPH.js} +117 -8
  84. package/dist/{chunk-FXD53Q32.js → chunk-7F5MJSWJ.js} +3 -3
  85. package/dist/{chunk-2QNMGFIF.js → chunk-7WEP4DNC.js} +2 -2
  86. package/dist/{chunk-S5TTV7PC.js → chunk-A24RUKU6.js} +1 -1
  87. package/dist/{chunk-NEGJAEZ7.js → chunk-AAMUHY6Y.js} +3 -3
  88. package/dist/{chunk-46WQ76VA.js → chunk-AMGEPNUB.js} +1 -1
  89. package/dist/{chunk-HURS5JVX.js → chunk-BCREJ6FD.js} +21 -3
  90. package/dist/{chunk-S2T7CE4P.js → chunk-BMRLKOGT.js} +1 -1
  91. package/dist/{chunk-S4I3UITZ.js → chunk-BXLA6CQM.js} +1 -1
  92. package/dist/{chunk-JXJV64JW.js → chunk-D7DRYXDE.js} +1 -1
  93. package/dist/{chunk-5VOC35A3.js → chunk-DAE4I3UN.js} +1 -1
  94. package/dist/{chunk-R766IOBQ.js → chunk-DF67VZ2H.js} +1 -1
  95. package/dist/{chunk-HW46Q4AR.js → chunk-DZE2MBOW.js} +257 -10
  96. package/dist/{chunk-RTGN42GD.js → chunk-E6KXZF4B.js} +2 -2
  97. package/dist/{chunk-IFSAR5IX.js → chunk-EB3AAVAK.js} +5 -5
  98. package/dist/{chunk-PKIOJQ2N.js → chunk-EUS7TKVR.js} +1 -1
  99. package/dist/{chunk-T43SC2XX.js → chunk-FJQPH2W3.js} +2 -2
  100. package/dist/{chunk-GEFZHKEN.js → chunk-GJFS27NL.js} +5 -5
  101. package/dist/{chunk-KEFHCL4U.js → chunk-GT5E5PW6.js} +1 -1
  102. package/dist/{chunk-XPKACO5A.js → chunk-GYIPOKH6.js} +8 -8
  103. package/dist/chunk-I3MJHU76.js +225 -0
  104. package/dist/{chunk-2IMUAL3X.js → chunk-IEAXNG3H.js} +8 -8
  105. package/dist/{chunk-YJNRRQOG.js → chunk-ILTZBCLW.js} +2 -2
  106. package/dist/{chunk-SDQSOQOE.js → chunk-JEBWC4VU.js} +2 -2
  107. package/dist/{chunk-7X6QKJGM.js → chunk-JHEABI3I.js} +2 -2
  108. package/dist/{chunk-R2MZDZTQ.js → chunk-JUWC7V2I.js} +3 -3
  109. package/dist/{chunk-6I7O6YW3.js → chunk-OM3CETSN.js} +3 -3
  110. package/dist/{chunk-WEJ45ZFF.js → chunk-PBI526CO.js} +2 -2
  111. package/dist/{chunk-I22ZH3XF.js → chunk-PXO6SF6L.js} +1 -1
  112. package/dist/{chunk-B7NO5U7H.js → chunk-Q4GGIM3A.js} +1 -1
  113. package/dist/{chunk-I6474EQW.js → chunk-QG6IPAT6.js} +1 -1
  114. package/dist/{chunk-NO5GHSNU.js → chunk-QPU5QQLX.js} +4 -3
  115. package/dist/{chunk-4ANCHFE2.js → chunk-R6JBGFSE.js} +1 -1
  116. package/dist/{chunk-ALVYUOBW.js → chunk-RQJDO6LP.js} +1 -1
  117. package/dist/{chunk-BFLBZGPZ.js → chunk-S5KQLCYU.js} +1 -1
  118. package/dist/{chunk-NUUAYDD6.js → chunk-SRJLG6RC.js} +1 -1
  119. package/dist/{chunk-O6LFXATW.js → chunk-SURCM7EO.js} +3 -3
  120. package/dist/{chunk-CIANVJ3G.js → chunk-UVUA2DQM.js} +61 -6
  121. package/dist/{chunk-64DYFA5X.js → chunk-V224L2GJ.js} +3 -3
  122. package/dist/{chunk-W7OCXE2L.js → chunk-V24ZGSQW.js} +1 -1
  123. package/dist/{chunk-RSHVFBKD.js → chunk-V2BQL663.js} +8 -8
  124. package/dist/{chunk-JJHJOGYR.js → chunk-WYPNZALJ.js} +1 -1
  125. package/dist/{chunk-RSVJQ4E2.js → chunk-YTBT3SW2.js} +1 -1
  126. package/dist/{chunk-CUKIMXQ7.js → chunk-YTPLK6QP.js} +1 -1
  127. package/dist/{co-occurrence-EWVCCFOI.js → co-occurrence-FBP2GTER.js} +1 -1
  128. package/dist/{crdt-sync-TSO4O67N.js → crdt-sync-KFPZWAIE.js} +1 -1
  129. package/dist/{crm-webhook-WMAW6ZT2.js → crm-webhook-56OJDKXK.js} +2 -2
  130. package/dist/{cto-delegation-gate-YNWMQEQB.js → cto-delegation-gate-5WNDH4IL.js} +7 -7
  131. package/dist/{daemon-orchestration-5KUKQOZ4.js → daemon-orchestration-KYK662AN.js} +14 -10
  132. package/dist/{exe-drift-KP5RZCXA.js → exe-drift-C254MZW4.js} +2 -2
  133. package/dist/{exe-export-RAYK76SO.js → exe-export-S56FIA5P.js} +4 -4
  134. package/dist/{exe-import-SAJBGUN5.js → exe-import-7F7Y4I6T.js} +4 -4
  135. package/dist/{exe-key-W3CME65M.js → exe-key-U7TAND3I.js} +1 -1
  136. package/dist/{fast-db-init-5VDTKVKX.js → fast-db-init-6DG7B7NO.js} +1 -1
  137. package/dist/gateway/index.js +6 -6
  138. package/dist/{git-staleness-M7WLXBAA.js → git-staleness-FDYT34WP.js} +1 -1
  139. package/dist/{git-task-sweep-GED54WTZ.js → git-task-sweep-EERTURH7.js} +8 -8
  140. package/dist/{global-procedures-EYWKFVOO.js → global-procedures-74U75Y2I.js} +2 -2
  141. package/dist/{graph-auto-extract-B4W4BEOZ.js → graph-auto-extract-VUBFSL6D.js} +1 -1
  142. package/dist/hooks/bug-report-worker.js +9 -9
  143. package/dist/hooks/codex-stop-task-finalizer.js +9 -9
  144. package/dist/hooks/commit-complete.js +10 -10
  145. package/dist/hooks/error-recall.js +5 -5
  146. package/dist/hooks/exe-heartbeat-hook.js +2 -2
  147. package/dist/hooks/ingest.js +5 -5
  148. package/dist/hooks/instructions-loaded.js +3 -3
  149. package/dist/hooks/manifest.json +19 -19
  150. package/dist/hooks/notification.js +3 -3
  151. package/dist/hooks/post-compact.js +9 -9
  152. package/dist/hooks/post-tool-combined.js +4 -4
  153. package/dist/hooks/pre-compact.js +10 -10
  154. package/dist/hooks/pre-tool-use.js +13 -13
  155. package/dist/hooks/prompt-submit.js +19 -19
  156. package/dist/hooks/session-end.js +13 -13
  157. package/dist/hooks/session-start.js +28 -9
  158. package/dist/hooks/stop.js +13 -13
  159. package/dist/hooks/subagent-stop.js +9 -9
  160. package/dist/hooks/summary-worker.js +13 -13
  161. package/dist/import-conversations-FO4IQCOP.js +23 -0
  162. package/dist/index.js +15 -15
  163. package/dist/{installer-EYRABPEC.js → installer-MWLYK37L.js} +4 -4
  164. package/dist/{installer-WVPFKMDW.js → installer-XIP332UC.js} +4 -4
  165. package/dist/{installer-X6XJE2EA.js → installer-XZ4H2J3J.js} +4 -4
  166. package/dist/lib/cloud-sync.js +3 -3
  167. package/dist/lib/consolidation.js +4 -4
  168. package/dist/lib/database.js +1 -1
  169. package/dist/lib/db.js +1 -1
  170. package/dist/lib/employee-templates.js +3 -3
  171. package/dist/lib/employees.js +1 -1
  172. package/dist/lib/exe-daemon.js +65 -25
  173. package/dist/lib/hybrid-search.js +4 -4
  174. package/dist/lib/identity.js +1 -1
  175. package/dist/lib/messaging.js +8 -8
  176. package/dist/lib/reminders.js +2 -2
  177. package/dist/lib/schedules.js +4 -4
  178. package/dist/lib/session-registry.js +3 -3
  179. package/dist/lib/skill-learning.js +3 -3
  180. package/dist/lib/store.js +3 -3
  181. package/dist/lib/task-router.js +2 -2
  182. package/dist/lib/tasks.js +8 -8
  183. package/dist/lib/tmux-routing.js +7 -7
  184. package/dist/lib/token-spend.js +2 -2
  185. package/dist/mcp/register-tools.js +47 -46
  186. package/dist/mcp/server.js +48 -47
  187. package/dist/mcp/tools/complete-reminder.js +3 -3
  188. package/dist/mcp/tools/create-reminder.js +3 -3
  189. package/dist/mcp/tools/create-task.js +10 -10
  190. package/dist/mcp/tools/deactivate-behavior.js +4 -4
  191. package/dist/mcp/tools/list-reminders.js +3 -3
  192. package/dist/mcp/tools/list-tasks.js +10 -10
  193. package/dist/mcp/tools/send-message.js +10 -10
  194. package/dist/mcp/tools/update-task.js +9 -9
  195. package/dist/{mcp-http-config-L4U52ZAF.js → mcp-http-config-GYVAS5HQ.js} +2 -2
  196. package/dist/{memory-cards-I55OBMVE.js → memory-cards-HU5WIUTY.js} +1 -1
  197. package/dist/{memory-graph-extractor-6M6J5FNX.js → memory-graph-extractor-PNRAGL4V.js} +2 -2
  198. package/dist/{memory-poisoning-defense-UXB75NB7.js → memory-poisoning-defense-KBBWI6ZL.js} +1 -1
  199. package/dist/{memory-reflection-3BMVNA6T.js → memory-reflection-UP56KTJ5.js} +1 -1
  200. package/dist/{notifications-SCHILQCQ.js → notifications-VWAMI4ZE.js} +7 -7
  201. package/dist/{orchestration-events-RDW7BTCK.js → orchestration-events-7XAYQ2MT.js} +2 -2
  202. package/dist/{orchestrator-NCEFZF32.js → orchestrator-D7NWJTJO.js} +9 -9
  203. package/dist/{plan-limits-YE5WKMQM.js → plan-limits-EA3VBZJ2.js} +2 -2
  204. package/dist/{projection-worker-ENYZ7THQ.js → projection-worker-HNI2TOO3.js} +1 -1
  205. package/dist/{reranker-QFLVGVRT.js → reranker-M52JJADT.js} +1 -1
  206. package/dist/{review-polling-ZKYFETP3.js → review-polling-YT3BEKPV.js} +8 -8
  207. package/dist/runtime/index.js +10 -10
  208. package/dist/{session-events-XCNQDXF4.js → session-events-7EN6W4EX.js} +8 -8
  209. package/dist/{session-kill-telemetry-SPB6LEI5.js → session-kill-telemetry-XIFWDG3L.js} +2 -2
  210. package/dist/{session-scope-FEZQJMD4.js → session-scope-7F3JL2RJ.js} +7 -7
  211. package/dist/{setup-wizard-KUYMMP35.js → setup-wizard-OT5R6PJ6.js} +1 -1
  212. package/dist/{skill-refinement-QHOS6CGQ.js → skill-refinement-N5RINY42.js} +1 -1
  213. package/dist/{stack-update-UCIPCTBO.js → stack-update-SASYGDOB.js} +1 -1
  214. package/dist/{task-enforcement-HVY36QRD.js → task-enforcement-DCBYO3R6.js} +7 -7
  215. package/dist/{task-scope-ODSOEGTH.js → task-scope-NM2C2QZX.js} +7 -7
  216. package/dist/{tasks-crud-RIUHZJGR.js → tasks-crud-AVVOQKZY.js} +17 -7
  217. package/dist/{tasks-review-EBUVFQUJ.js → tasks-review-QNBO3D7U.js} +7 -7
  218. package/dist/{telemetry-upload-DFISOB2V.js → telemetry-upload-ZJ4UP2RP.js} +3 -3
  219. package/dist/{token-budget-6TTILQW7.js → token-budget-SPQB44ZI.js} +1 -1
  220. package/dist/{tool-telemetry-BNZJICWG.js → tool-telemetry-EIRCR2VO.js} +1 -1
  221. package/dist/tui/App.js +15 -15
  222. package/dist/{tui-data-UM6LR4EQ.js → tui-data-5B6YA4VV.js} +7 -7
  223. package/dist/{worker-gate-K5YTO2H5.js → worker-gate-WQV3FR4R.js} +1 -1
  224. package/dist/{workflow-engine-WUU5OZ3N.js → workflow-engine-TZKS5QB7.js} +2 -2
  225. package/dist/{worktree-XZBJQWQZ.js → worktree-KI3X6POI.js} +3 -3
  226. package/package.json +1 -1
  227. package/release-notes.json +52 -52
  228. /package/dist/{chunk-MQA6K7DH.js → chunk-3OZ7LXUY.js} +0 -0
  229. /package/dist/{chunk-KVOTLCAX.js → chunk-4B7JKVUT.js} +0 -0
  230. /package/dist/{chunk-HNXHUG7A.js → chunk-HUVQ2NUX.js} +0 -0
  231. /package/dist/{chunk-Y2B6MB3J.js → chunk-PN7MTAYN.js} +0 -0
  232. /package/dist/{chunk-54JMB5UI.js → chunk-Q3YGPFZH.js} +0 -0
  233. /package/dist/{chunk-WRVFZ433.js → chunk-QSWZI7NH.js} +0 -0
  234. /package/dist/{chunk-4AJYZFDE.js → chunk-V3CEFPKS.js} +0 -0
  235. /package/dist/{chunk-K77FHRYS.js → chunk-V3NHFF3Z.js} +0 -0
  236. /package/dist/{chunk-DXB3CB2O.js → chunk-ZPQ2RUIU.js} +0 -0
  237. /package/dist/{core-memory-NZOLAIOE.js → core-memory-3XHQZ5EI.js} +0 -0
  238. /package/dist/{wiki-acl-QYGMJDUT.js → wiki-acl-QSO37KYW.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  listBehaviors
3
- } from "./chunk-BFLBZGPZ.js";
3
+ } from "./chunk-S5KQLCYU.js";
4
4
  import {
5
5
  loadConfigSync
6
6
  } from "./chunk-WXW3XGWX.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  recordSessionKill
3
- } from "./chunk-W7OCXE2L.js";
3
+ } from "./chunk-V24ZGSQW.js";
4
4
  import {
5
5
  updateTask
6
- } from "./chunk-IFSAR5IX.js";
6
+ } from "./chunk-EB3AAVAK.js";
7
7
  import {
8
8
  ensureEmployee,
9
9
  extractRootExe,
@@ -14,13 +14,13 @@ import {
14
14
  sessionScopeFilter,
15
15
  strictSessionScopeFilter,
16
16
  writeNotification
17
- } from "./chunk-HW46Q4AR.js";
17
+ } from "./chunk-DZE2MBOW.js";
18
18
  import {
19
19
  queueIntercom
20
20
  } from "./chunk-QI4IXJN7.js";
21
21
  import {
22
22
  listSessions
23
- } from "./chunk-B7NO5U7H.js";
23
+ } from "./chunk-Q4GGIM3A.js";
24
24
  import {
25
25
  getTransport
26
26
  } from "./chunk-MVW62NIZ.js";
@@ -30,7 +30,7 @@ import {
30
30
  } from "./chunk-CX6GL3ZJ.js";
31
31
  import {
32
32
  recordOrchestrationEventBestEffort
33
- } from "./chunk-HURS5JVX.js";
33
+ } from "./chunk-BCREJ6FD.js";
34
34
  import {
35
35
  getAgentRuntime
36
36
  } from "./chunk-6RX2XEET.js";
@@ -38,7 +38,7 @@ import {
38
38
  baseAgentName,
39
39
  isCoordinatorName,
40
40
  shouldAutoInstance
41
- } from "./chunk-4GXXYDNU.js";
41
+ } from "./chunk-3XGZAFHE.js";
42
42
  import {
43
43
  loadConfigSync
44
44
  } from "./chunk-WXW3XGWX.js";
@@ -1655,7 +1655,7 @@ async function reapOrphanedWorktrees(deps, nowMs = Date.now()) {
1655
1655
  }
1656
1656
  async function createWorktreeReaperRealDeps() {
1657
1657
  const { getPaneCwdAsync } = await import("./lib/tmux-status.js");
1658
- const { getGitRoot, isWorktreeDirty: isDirty } = await import("./worktree-XZBJQWQZ.js");
1658
+ const { getGitRoot, isWorktreeDirty: isDirty } = await import("./worktree-KI3X6POI.js");
1659
1659
  const { statSync: statSync2 } = await import("fs");
1660
1660
  const { basename } = await import("path");
1661
1661
  const { promisify } = await import("util");
@@ -1756,6 +1756,113 @@ async function createWorktreeReaperRealDeps() {
1756
1756
  getGitRoot: (dir) => getGitRoot(dir)
1757
1757
  };
1758
1758
  }
1759
+ var _lastStaleCheckpointGcMs = 0;
1760
+ var STALE_CHECKPOINT_GC_INTERVAL_MS = 6 * 60 * 60 * 1e3;
1761
+ async function gcStaleCheckpoints() {
1762
+ const now = Date.now();
1763
+ if (now - _lastStaleCheckpointGcMs < STALE_CHECKPOINT_GC_INTERVAL_MS) return 0;
1764
+ _lastStaleCheckpointGcMs = now;
1765
+ try {
1766
+ const { getClient } = await import("./lib/database.js");
1767
+ const client = getClient();
1768
+ const scope = sessionScopeFilter();
1769
+ const result = await client.execute({
1770
+ sql: `UPDATE tasks SET checkpoint = NULL, checkpoint_count = 0
1771
+ WHERE checkpoint IS NOT NULL
1772
+ AND status IN ('done', 'closed', 'cancelled', 'needs_review')
1773
+ ${scope.sql}`,
1774
+ args: scope.args
1775
+ });
1776
+ const cleared = Number(result.rowsAffected ?? 0);
1777
+ if (cleared > 0) {
1778
+ process.stderr.write(`[daemon-orchestration] GC'd ${cleared} stale checkpoint(s)
1779
+ `);
1780
+ recordOrchestrationEventBestEffort({
1781
+ eventType: "checkpoint.gc",
1782
+ source: "daemon-orchestration.gcStaleCheckpoints",
1783
+ payload: { cleared }
1784
+ });
1785
+ }
1786
+ return cleared;
1787
+ } catch (err) {
1788
+ if (process.env.EXE_DEBUG === "1") {
1789
+ process.stderr.write(
1790
+ `[daemon-orchestration] gcStaleCheckpoints error: ${err instanceof Error ? err.message : String(err)}
1791
+ `
1792
+ );
1793
+ }
1794
+ return 0;
1795
+ }
1796
+ }
1797
+ async function pollTaskGroupBarriers() {
1798
+ try {
1799
+ const { checkAndFireBarriers } = await import("./tasks-crud-AVVOQKZY.js");
1800
+ const firedGroupIds = await checkAndFireBarriers();
1801
+ if (firedGroupIds.length === 0) return 0;
1802
+ const { getClient } = await import("./lib/database.js");
1803
+ const client = getClient();
1804
+ for (const groupId of firedGroupIds) {
1805
+ try {
1806
+ const groupRow = await client.execute({
1807
+ sql: "SELECT title, coordinator, session_scope, aggregated_result FROM task_groups WHERE id = ?",
1808
+ args: [groupId]
1809
+ });
1810
+ if (groupRow.rows.length === 0) continue;
1811
+ const group = groupRow.rows[0];
1812
+ const coordinator = String(group.coordinator);
1813
+ const sessionScope = group.session_scope != null ? String(group.session_scope) : null;
1814
+ const title = String(group.title);
1815
+ let summary = `Task group "${title}" barrier fired.`;
1816
+ try {
1817
+ const agg = JSON.parse(String(group.aggregated_result ?? "{}"));
1818
+ summary = `Task group "${title}" complete: ${agg.succeeded ?? 0}/${agg.total ?? 0} succeeded`;
1819
+ if (agg.cancelled) summary += `, ${agg.cancelled} cancelled`;
1820
+ if (agg.timed_out) summary += " (timed out)";
1821
+ } catch {
1822
+ }
1823
+ if (sessionScope) {
1824
+ try {
1825
+ if (isCoordinatorName(coordinator) && isExeSession(sessionScope)) {
1826
+ sendIntercom(sessionScope, { force: true, reason: "completion" });
1827
+ } else {
1828
+ const { employeeSessionName } = await import("./lib/tmux-routing.js");
1829
+ sendIntercom(employeeSessionName(coordinator, sessionScope), { force: true, reason: "completion" });
1830
+ }
1831
+ } catch {
1832
+ }
1833
+ }
1834
+ try {
1835
+ await writeNotification({
1836
+ agentId: coordinator,
1837
+ agentRole: isCoordinatorName(coordinator) ? "COO" : "manager",
1838
+ event: "task_group_barrier",
1839
+ project: "",
1840
+ summary,
1841
+ sessionScope: sessionScope ?? void 0
1842
+ });
1843
+ } catch {
1844
+ }
1845
+ recordOrchestrationEventBestEffort({
1846
+ eventType: "task_group.barrier_notified",
1847
+ source: "daemon-orchestration.pollTaskGroupBarriers",
1848
+ agentId: coordinator,
1849
+ sessionScope,
1850
+ payload: { groupId, title, summary }
1851
+ });
1852
+ } catch {
1853
+ }
1854
+ }
1855
+ return firedGroupIds.length;
1856
+ } catch (err) {
1857
+ if (process.env.EXE_DEBUG === "1") {
1858
+ process.stderr.write(
1859
+ `[daemon-orchestration] pollTaskGroupBarriers error: ${err instanceof Error ? err.message : String(err)}
1860
+ `
1861
+ );
1862
+ }
1863
+ return 0;
1864
+ }
1865
+ }
1759
1866
 
1760
1867
  export {
1761
1868
  IDLE_NUDGE_DEDUP_MS,
@@ -1806,5 +1913,7 @@ export {
1806
1913
  createOrphanReaperRealDeps,
1807
1914
  WORKTREE_REAPER_INTERVAL_MS,
1808
1915
  reapOrphanedWorktrees,
1809
- createWorktreeReaperRealDeps
1916
+ createWorktreeReaperRealDeps,
1917
+ gcStaleCheckpoints,
1918
+ pollTaskGroupBarriers
1810
1919
  };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  fastDbInit
3
- } from "./chunk-4AJYZFDE.js";
3
+ } from "./chunk-V3CEFPKS.js";
4
4
  import {
5
5
  sessionScopeFilter
6
- } from "./chunk-HW46Q4AR.js";
6
+ } from "./chunk-DZE2MBOW.js";
7
7
  import {
8
8
  formatStatusAll,
9
9
  formatStatusDeep,
@@ -14,7 +14,7 @@ import {
14
14
  getClient,
15
15
  isCoordinatorRole,
16
16
  loadEmployees
17
- } from "./chunk-4GXXYDNU.js";
17
+ } from "./chunk-3XGZAFHE.js";
18
18
  import {
19
19
  isMainModule
20
20
  } from "./chunk-6Y4B3QF6.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getClient
3
- } from "./chunk-4GXXYDNU.js";
3
+ } from "./chunk-3XGZAFHE.js";
4
4
 
5
5
  // src/lib/memory-graph-extractor.ts
6
6
  function entityId(type, name) {
@@ -247,7 +247,7 @@ async function upsertMemoryGraph(result, memoryId) {
247
247
  });
248
248
  }
249
249
  try {
250
- const { createCoOccurrenceEdges } = await import("./co-occurrence-EWVCCFOI.js");
250
+ const { createCoOccurrenceEdges } = await import("./co-occurrence-FBP2GTER.js");
251
251
  await createCoOccurrenceEdges(result.entities, memoryId);
252
252
  } catch {
253
253
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  loadEmployeesSync
3
- } from "./chunk-4GXXYDNU.js";
3
+ } from "./chunk-3XGZAFHE.js";
4
4
 
5
5
  // src/adapters/mcp-http-config.ts
6
6
  import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  deactivateBehavior
3
- } from "./chunk-BFLBZGPZ.js";
3
+ } from "./chunk-S5KQLCYU.js";
4
4
  import {
5
5
  getActiveAgent
6
- } from "./chunk-S4I3UITZ.js";
6
+ } from "./chunk-BXLA6CQM.js";
7
7
  import {
8
8
  canCoordinate,
9
9
  getClient
10
- } from "./chunk-4GXXYDNU.js";
10
+ } from "./chunk-3XGZAFHE.js";
11
11
 
12
12
  // src/mcp/tools/deactivate-behavior.ts
13
13
  import { z } from "zod";
@@ -6,7 +6,7 @@ import {
6
6
  getIdentity,
7
7
  listIdentities,
8
8
  updateIdentity
9
- } from "./chunk-4GXXYDNU.js";
9
+ } from "./chunk-3XGZAFHE.js";
10
10
  import {
11
11
  atomicWriteJsonSync
12
12
  } from "./chunk-LYH5HE24.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getClient
3
- } from "./chunk-4GXXYDNU.js";
3
+ } from "./chunk-3XGZAFHE.js";
4
4
 
5
5
  // src/lib/orchestration-events.ts
6
6
  import crypto from "crypto";
@@ -51,7 +51,11 @@ var ORCHESTRATION_COUNTER_KEYS = [
51
51
  "worktreePruned",
52
52
  "worktreeSkipped",
53
53
  "registryMissingTmux",
54
- "registryMissingEntry"
54
+ "registryMissingEntry",
55
+ "taskGroupsCreated",
56
+ "taskGroupBarriersFired",
57
+ "taskGroupTimeouts",
58
+ "taskGroupPartialFailures"
55
59
  ];
56
60
  var ORCHESTRATION_LATENCY_METRIC_KEYS = [
57
61
  "createToClaimMs",
@@ -255,7 +259,11 @@ async function getOrchestrationMetrics(input = {}) {
255
259
  worktreePruned: 0,
256
260
  worktreeSkipped: 0,
257
261
  registryMissingTmux: 0,
258
- registryMissingEntry: 0
262
+ registryMissingEntry: 0,
263
+ taskGroupsCreated: 0,
264
+ taskGroupBarriersFired: 0,
265
+ taskGroupTimeouts: 0,
266
+ taskGroupPartialFailures: 0
259
267
  };
260
268
  for (const row of rows) {
261
269
  const type = String(row.event_type ?? "");
@@ -312,6 +320,10 @@ async function getOrchestrationMetrics(input = {}) {
312
320
  if (type === "worktree.skipped") counts.worktreeSkipped++;
313
321
  if (type === "registry.missing_tmux") counts.registryMissingTmux += eventCount;
314
322
  if (type === "registry.missing_entry") counts.registryMissingEntry += eventCount;
323
+ if (type === "task_group.created") counts.taskGroupsCreated++;
324
+ if (type === "task_group.barrier_fired") counts.taskGroupBarriersFired++;
325
+ if (type === "task_group.timeout") counts.taskGroupTimeouts++;
326
+ if (type === "task_group.partial_failure") counts.taskGroupPartialFailures++;
315
327
  if (type.startsWith("tmux.") && String(row.error_code ?? "").toLowerCase().includes("timeout")) {
316
328
  counts.tmuxCommandTimeouts++;
317
329
  }
@@ -544,6 +556,12 @@ function formatOrchestrationMetrics(metrics) {
544
556
  `- tmux command timeouts: ${metrics.counts.tmuxCommandTimeouts}`,
545
557
  `- MCP unreachable: ${metrics.counts.mcpUnreachable}`,
546
558
  "",
559
+ "## Task Groups (Fan-out/Fan-in)",
560
+ `- groups created: ${metrics.counts.taskGroupsCreated}`,
561
+ `- barriers fired: ${metrics.counts.taskGroupBarriersFired}`,
562
+ `- group timeouts: ${metrics.counts.taskGroupTimeouts}`,
563
+ `- partial failures: ${metrics.counts.taskGroupPartialFailures}`,
564
+ "",
547
565
  "## Daemon Health",
548
566
  `- event loop blocks: ${metrics.counts.eventLoopBlocks}`,
549
567
  `- shard circuit opens: ${metrics.counts.shardCircuitOpens}`,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  processCRMEvent
3
- } from "./chunk-DXB3CB2O.js";
3
+ } from "./chunk-ZPQ2RUIU.js";
4
4
 
5
5
  // src/gateway/adapters/crm-webhook.ts
6
6
  function parseTwentyWebhook(payload) {
@@ -9,7 +9,7 @@ import {
9
9
  getCoordinatorEmployee,
10
10
  getEmployee,
11
11
  loadEmployeesSync
12
- } from "./chunk-4GXXYDNU.js";
12
+ } from "./chunk-3XGZAFHE.js";
13
13
  import {
14
14
  EXE_AI_DIR
15
15
  } from "./chunk-WXW3XGWX.js";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-2ZYEO7U7.js";
5
5
  import {
6
6
  getClient
7
- } from "./chunk-4GXXYDNU.js";
7
+ } from "./chunk-3XGZAFHE.js";
8
8
 
9
9
  // src/lib/global-procedures.ts
10
10
  import { randomUUID } from "crypto";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  clean,
3
3
  stableId
4
- } from "./chunk-54JMB5UI.js";
4
+ } from "./chunk-Q3YGPFZH.js";
5
5
 
6
6
  // src/lib/reflection-checkpoints.ts
7
7
  function parsePayload(payload) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  completeReminder
3
- } from "./chunk-I22ZH3XF.js";
3
+ } from "./chunk-PXO6SF6L.js";
4
4
 
5
5
  // src/mcp/tools/complete-reminder.ts
6
6
  import { z } from "zod";