@askexenow/exe-os 0.9.290 → 0.9.292

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 (461) hide show
  1. package/deploy/compose/.env.customer.example +14 -1
  2. package/deploy/compose/.env.example +40 -1
  3. package/deploy/compose/backup.sh +147 -42
  4. package/deploy/compose/docker-compose.yml +128 -51
  5. package/deploy/compose/generate-env.ts +31 -0
  6. package/deploy/compose/setup.sh +11 -2
  7. package/dist/active-agent-5DCUU6QR.js +28 -0
  8. package/dist/active-agent-JTTDI66I.js +27 -0
  9. package/dist/active-agent-NQAHMQSR.js +27 -0
  10. package/dist/active-agent-QHGHLMYS.js +28 -0
  11. package/dist/agentic-ontology-7RXZLSZY.js +25 -0
  12. package/dist/agentic-ontology-BSSNX24R.js +25 -0
  13. package/dist/backfill-metadata-5I3PAO66.js +600 -0
  14. package/dist/backfill-metadata-F3KEE7WZ.js +600 -0
  15. package/dist/background-jobs-PUXOTBD4.js +25 -0
  16. package/dist/behaviors-AJFFFXT2.js +40 -0
  17. package/dist/behaviors-RXUKZLER.js +40 -0
  18. package/dist/bin/age-ontology-load.js +2 -2
  19. package/dist/bin/agentic-ontology-backfill.js +8 -7
  20. package/dist/bin/agentic-reflection-backfill.js +9 -8
  21. package/dist/bin/agentic-semantic-label.js +8 -7
  22. package/dist/bin/backfill-conversations.js +8 -7
  23. package/dist/bin/backfill-responses.js +8 -7
  24. package/dist/bin/backfill-vectors.js +11 -10
  25. package/dist/bin/bulk-sync-postgres.js +9 -8
  26. package/dist/bin/cc-doctor.js +7 -6
  27. package/dist/bin/cleanup-stale-review-tasks.js +13 -12
  28. package/dist/bin/cli.js +20 -20
  29. package/dist/bin/exe-agent-config.js +5 -4
  30. package/dist/bin/exe-agent.js +10 -9
  31. package/dist/bin/exe-assign.js +10 -9
  32. package/dist/bin/exe-boot.js +20 -19
  33. package/dist/bin/exe-call.js +6 -5
  34. package/dist/bin/exe-cloud.js +8 -7
  35. package/dist/bin/exe-dispatch.js +13 -12
  36. package/dist/bin/exe-doctor.js +2 -1
  37. package/dist/bin/exe-export-behaviors.js +9 -8
  38. package/dist/bin/exe-forget.js +8 -7
  39. package/dist/bin/exe-gateway.js +9 -8
  40. package/dist/bin/exe-healthcheck.js +11 -6
  41. package/dist/bin/exe-heartbeat.js +13 -12
  42. package/dist/bin/exe-kill.js +16 -15
  43. package/dist/bin/exe-launch-agent.js +20 -19
  44. package/dist/bin/exe-new-employee.js +9 -8
  45. package/dist/bin/exe-pending-messages.js +14 -13
  46. package/dist/bin/exe-pending-notifications.js +13 -12
  47. package/dist/bin/exe-pending-reviews.js +13 -12
  48. package/dist/bin/exe-rename.js +6 -5
  49. package/dist/bin/exe-review.js +15 -14
  50. package/dist/bin/exe-search.js +7 -6
  51. package/dist/bin/exe-session-cleanup.js +18 -17
  52. package/dist/bin/exe-settings.js +8 -7
  53. package/dist/bin/exe-start-codex.js +13 -12
  54. package/dist/bin/exe-start-opencode.js +10 -9
  55. package/dist/bin/exe-status.js +14 -13
  56. package/dist/bin/exe-support.js +3 -3
  57. package/dist/bin/exe-team.js +5 -4
  58. package/dist/bin/exe-watchdog.js +34 -1
  59. package/dist/bin/git-sweep.js +14 -13
  60. package/dist/bin/graph-backfill.js +8 -7
  61. package/dist/bin/graph-export.js +7 -6
  62. package/dist/bin/import-history.js +10 -9
  63. package/dist/bin/install-launchd.js +19 -1
  64. package/dist/bin/install.js +9 -8
  65. package/dist/bin/intercom-check.js +4 -4
  66. package/dist/bin/mcp-sessions.js +2 -2
  67. package/dist/bin/orchestration-metrics.js +6 -5
  68. package/dist/bin/postgres-agentic-reflection-backfill.js +4 -4
  69. package/dist/bin/postgres-agentic-semantic-backfill.js +3 -3
  70. package/dist/bin/scan-tasks.js +13 -12
  71. package/dist/bin/setup.js +2 -2
  72. package/dist/bin/shard-migrate.js +7 -6
  73. package/dist/bin/stack-update.js +4 -4
  74. package/dist/bin/vps-health-gate.js +1 -1
  75. package/dist/branding-RBMRJA5D.js +97 -0
  76. package/dist/capability-cards-DCWQI3NN.js +89 -0
  77. package/dist/capability-cards-TQVKK6TE.js +89 -0
  78. package/dist/capacity-monitor-7YZOMMMP.js +51 -0
  79. package/dist/capacity-monitor-S6GFT45S.js +51 -0
  80. package/dist/catchup-brief-DK7OD5DJ.js +175 -0
  81. package/dist/catchup-brief-J27L7LKR.js +175 -0
  82. package/dist/catchup-brief-JLMK2IP5.js +175 -0
  83. package/dist/chunk-2664Y4WA.js +14503 -0
  84. package/dist/chunk-2FTHXF6X.js +150 -0
  85. package/dist/chunk-2H2SCCA7.js +221 -0
  86. package/dist/chunk-2ISUEARV.js +76 -0
  87. package/dist/chunk-2RU66KAN.js +456 -0
  88. package/dist/chunk-2SI5Z24A.js +284 -0
  89. package/dist/chunk-2V6AASHE.js +668 -0
  90. package/dist/chunk-2ZMQI2J4.js +85 -0
  91. package/dist/chunk-3ET3QGXG.js +70 -0
  92. package/dist/chunk-3V6KXHSV.js +203 -0
  93. package/dist/chunk-3VT5IG2G.js +14439 -0
  94. package/dist/chunk-3YHG7W74.js +362 -0
  95. package/dist/chunk-434Z2LFO.js +30 -0
  96. package/dist/chunk-44SWZWGS.js +231 -0
  97. package/dist/chunk-4DFENB7E.js +128 -0
  98. package/dist/chunk-4EA3J7SE.js +333 -0
  99. package/dist/chunk-4JY5DRY2.js +1350 -0
  100. package/dist/chunk-5BUPY2ZC.js +81 -0
  101. package/dist/chunk-5FIQBJ5I.js +735 -0
  102. package/dist/chunk-5MQ4RUUP.js +244 -0
  103. package/dist/chunk-6CTHQKUS.js +1186 -0
  104. package/dist/chunk-6GEEAOFU.js +538 -0
  105. package/dist/chunk-6JOF37K6.js +1352 -0
  106. package/dist/chunk-6OAAN25C.js +727 -0
  107. package/dist/chunk-6S6QFQ33.js +382 -0
  108. package/dist/chunk-6U2BFODG.js +227 -0
  109. package/dist/chunk-76QWODZW.js +1119 -0
  110. package/dist/chunk-7BNDOTRZ.js +1094 -0
  111. package/dist/chunk-7HBACWKV.js +128 -0
  112. package/dist/chunk-7IWWRNJI.js +333 -0
  113. package/dist/chunk-7MH7VI6T.js +280 -0
  114. package/dist/chunk-7QKQE7J4.js +70 -0
  115. package/dist/chunk-7U4JXDBV.js +284 -0
  116. package/dist/chunk-7UF4323L.js +50 -0
  117. package/dist/chunk-7UUJMSFH.js +348 -0
  118. package/dist/chunk-7YEOKPZ6.js +185 -0
  119. package/dist/chunk-7Z3P23BX.js +244 -0
  120. package/dist/chunk-BK42Z2SX.js +1186 -0
  121. package/dist/chunk-BREJRA7B.js +171 -0
  122. package/dist/chunk-C3FMNIJT.js +94 -0
  123. package/dist/chunk-CCNSV7J5.js +128 -0
  124. package/dist/chunk-CKFT7GM6.js +128 -0
  125. package/dist/chunk-CRCB5S7I.js +454 -0
  126. package/dist/chunk-CSMTQ24E.js +97 -0
  127. package/dist/chunk-CSXNLHUU.js +185 -0
  128. package/dist/chunk-D3ELJGEI.js +97 -0
  129. package/dist/chunk-D6CCJVTB.js +214 -0
  130. package/dist/chunk-DEVITBD5.js +1079 -0
  131. package/dist/chunk-DKIFBCKT.js +157 -0
  132. package/dist/chunk-DRUPHYRL.js +286 -0
  133. package/dist/chunk-E4XU7EVT.js +1350 -0
  134. package/dist/chunk-EEZNLI6L.js +240 -0
  135. package/dist/chunk-EIA6LRM4.js +38 -0
  136. package/dist/chunk-FBIXI7WC.js +382 -0
  137. package/dist/chunk-FSQTZ57R.js +4349 -0
  138. package/dist/chunk-FW75WOTA.js +97 -0
  139. package/dist/chunk-GDSV52EC.js +85 -0
  140. package/dist/chunk-GMZTZ4KQ.js +345 -0
  141. package/dist/chunk-GNKHK5VD.js +1068 -0
  142. package/dist/chunk-GP3ZHQJO.js +362 -0
  143. package/dist/chunk-GSVK66OV.js +58 -0
  144. package/dist/chunk-GY2BY5VF.js +58 -0
  145. package/dist/chunk-HNDG5ZDJ.js +336 -0
  146. package/dist/chunk-HTD4AJUF.js +85 -0
  147. package/dist/chunk-HTU7RDZA.js +127 -0
  148. package/dist/chunk-HX4PBMY3.js +227 -0
  149. package/dist/chunk-IC2PIVLM.js +181 -0
  150. package/dist/chunk-IK3Q7NLP.js +2113 -0
  151. package/dist/chunk-IL5FQSUQ.js +2142 -0
  152. package/dist/chunk-ITWU5LJL.js +85 -0
  153. package/dist/chunk-IUIVLCAO.js +369 -0
  154. package/dist/chunk-JHJUV633.js +150 -0
  155. package/dist/chunk-JXOXGBC2.js +262 -0
  156. package/dist/chunk-KG55JL2G.js +604 -0
  157. package/dist/chunk-KGT7VT77.js +167 -0
  158. package/dist/chunk-L2DMZT56.js +210 -0
  159. package/dist/chunk-L57H26UP.js +33 -0
  160. package/dist/chunk-L5E3RXLR.js +197 -0
  161. package/dist/chunk-L5O4MFMV.js +402 -0
  162. package/dist/chunk-LAB3RQRN.js +204 -0
  163. package/dist/chunk-LCOPVYU2.js +3293 -0
  164. package/dist/chunk-LDI633LO.js +2078 -0
  165. package/dist/chunk-LJONNOFH.js +336 -0
  166. package/dist/chunk-LKM56CDI.js +2078 -0
  167. package/dist/chunk-LPO7KLSP.js +14470 -0
  168. package/dist/chunk-M46T2E3A.js +262 -0
  169. package/dist/chunk-MBJYQBUX.js +456 -0
  170. package/dist/chunk-MEWGYH6Z.js +190 -0
  171. package/dist/chunk-MHGR5CRN.js +731 -0
  172. package/dist/chunk-MR64FIZU.js +735 -0
  173. package/dist/chunk-MTRUOIND.js +159 -0
  174. package/dist/chunk-MUDCJP6B.js +68 -0
  175. package/dist/chunk-MUQ46NLH.js +3293 -0
  176. package/dist/chunk-MYVGG2VW.js +204 -0
  177. package/dist/chunk-NEFF4ATD.js +197 -0
  178. package/dist/chunk-NOC7GUHJ.js +836 -0
  179. package/dist/chunk-NOP22U7I.js +33 -0
  180. package/dist/chunk-OGFEQ264.js +448 -0
  181. package/dist/chunk-OGV67HHE.js +230 -0
  182. package/dist/chunk-OQ3CC5N2.js +54 -0
  183. package/dist/chunk-OTANU4LT.js +297 -0
  184. package/dist/chunk-P5A77YDA.js +58 -0
  185. package/dist/chunk-PIOBPKYE.js +377 -0
  186. package/dist/chunk-POEI5ZRV.js +731 -0
  187. package/dist/chunk-PS4W2VGW.js +129 -0
  188. package/dist/chunk-PT3URNVT.js +836 -0
  189. package/dist/chunk-Q4IL3S44.js +55 -0
  190. package/dist/chunk-QEDM5BJW.js +240 -0
  191. package/dist/chunk-QGYRNG7T.js +129 -0
  192. package/dist/chunk-QHNGZ6X2.js +538 -0
  193. package/dist/chunk-QOZQ2MYZ.js +42 -0
  194. package/dist/chunk-QPYEVLED.js +402 -0
  195. package/dist/chunk-QRTJNSKU.js +133 -0
  196. package/dist/chunk-R36FAN53.js +488 -0
  197. package/dist/chunk-R426G4MO.js +290 -0
  198. package/dist/chunk-RG4OHDY7.js +348 -0
  199. package/dist/chunk-RHNSYJCT.js +30 -0
  200. package/dist/chunk-RKYLET7V.js +1352 -0
  201. package/dist/chunk-RLSEMHP7.js +369 -0
  202. package/dist/chunk-ROGL26Q2.js +630 -0
  203. package/dist/chunk-RTC3JHFF.js +345 -0
  204. package/dist/chunk-RV62SMCL.js +171 -0
  205. package/dist/chunk-SC4MQTMY.js +192 -0
  206. package/dist/chunk-SCT6IMMD.js +630 -0
  207. package/dist/chunk-SOTS4FXN.js +546 -0
  208. package/dist/chunk-STS5552V.js +448 -0
  209. package/dist/chunk-SY65TI5X.js +424 -0
  210. package/dist/chunk-T67ELIV6.js +38 -0
  211. package/dist/chunk-TBSYE2WW.js +97 -0
  212. package/dist/chunk-TGRGBM7C.js +1094 -0
  213. package/dist/chunk-TGTJYERN.js +621 -0
  214. package/dist/chunk-THWAU77X.js +290 -0
  215. package/dist/chunk-TM7NUOZ7.js +574 -0
  216. package/dist/chunk-TNZWNC4O.js +106 -0
  217. package/dist/chunk-TRSYK4HA.js +1352 -0
  218. package/dist/chunk-TZIGQLY7.js +123 -0
  219. package/dist/chunk-U7PCRZEB.js +286 -0
  220. package/dist/chunk-UCBIETEA.js +373 -0
  221. package/dist/chunk-UGH4Z3BT.js +50 -0
  222. package/dist/chunk-UKRCNA3D.js +127 -0
  223. package/dist/chunk-ULUNIZOZ.js +2113 -0
  224. package/dist/chunk-UWTIDBMQ.js +411 -0
  225. package/dist/chunk-VJTS6RGD.js +81 -0
  226. package/dist/chunk-VLE2Z4JK.js +411 -0
  227. package/dist/chunk-VOGYUVYX.js +4349 -0
  228. package/dist/chunk-VPQAXUG4.js +210 -0
  229. package/dist/chunk-W3TXZRGP.js +1186 -0
  230. package/dist/chunk-WQKB25AU.js +1119 -0
  231. package/dist/chunk-WTEVY2WF.js +122 -0
  232. package/dist/chunk-X5CTZH7W.js +76 -0
  233. package/dist/chunk-XCZP6I5M.js +167 -0
  234. package/dist/chunk-XP3DCIAH.js +181 -0
  235. package/dist/chunk-XRN5MQRN.js +373 -0
  236. package/dist/chunk-XZXY66KH.js +123 -0
  237. package/dist/chunk-Y2SP7JYR.js +668 -0
  238. package/dist/chunk-Y5ZF5OFM.js +280 -0
  239. package/dist/chunk-YN7XRPQ6.js +546 -0
  240. package/dist/chunk-YQOOELC3.js +221 -0
  241. package/dist/chunk-YTKVJJSU.js +379 -0
  242. package/dist/chunk-YZJZXBPL.js +192 -0
  243. package/dist/chunk-Z2XRD6SJ.js +377 -0
  244. package/dist/chunk-ZBD56XE2.js +122 -0
  245. package/dist/chunk-ZE2XPYEC.js +299 -0
  246. package/dist/chunk-ZE4E4PMM.js +157 -0
  247. package/dist/chunk-ZIY6HVAD.js +214 -0
  248. package/dist/chunk-ZK4VCLCK.js +176 -0
  249. package/dist/chunk-ZOBV6QWD.js +54 -0
  250. package/dist/chunk-ZTGID7RE.js +1068 -0
  251. package/dist/co-activation-BOHQZWKI.js +74 -0
  252. package/dist/co-activation-KSBQKWYV.js +74 -0
  253. package/dist/co-occurrence-OSJQ2XQO.js +95 -0
  254. package/dist/co-occurrence-YKTIFNYA.js +95 -0
  255. package/dist/code-context-index-43MNXX4H.js +30 -0
  256. package/dist/conversation-entity-extractor-6PJUN5DP.js +114 -0
  257. package/dist/conversation-wiki-populator-PDL2SUZJ.js +105 -0
  258. package/dist/core-memory-TU636T4D.js +110 -0
  259. package/dist/core-memory-U74QUX6H.js +110 -0
  260. package/dist/crdt-sync-JTTYSLBV.js +33 -0
  261. package/dist/crdt-sync-UG3532QN.js +33 -0
  262. package/dist/crm-webhook-D5JCLN2M.js +10 -0
  263. package/dist/crm-webhook-Y2BDCVPM.js +10 -0
  264. package/dist/cto-delegation-gate-7TJT5EOE.js +280 -0
  265. package/dist/cto-delegation-gate-DCIFDJDX.js +280 -0
  266. package/dist/daemon-auth-CBMX4H6L.js +13 -0
  267. package/dist/daemon-orchestration-D5MFCNVH.js +139 -0
  268. package/dist/daemon-orchestration-XSDZPGYX.js +139 -0
  269. package/dist/db-backup-77QYAXID.js +37 -0
  270. package/dist/db-backup-LJVPP5AS.js +37 -0
  271. package/dist/db-restore-events-GNZS42YO.js +76 -0
  272. package/dist/doc-graph-extractor-3PI2M2LX.js +133 -0
  273. package/dist/doc-graph-extractor-CJU6HR2C.js +133 -0
  274. package/dist/dreaming-5A4MKONF.js +34 -0
  275. package/dist/dreaming-RFRHTYFN.js +34 -0
  276. package/dist/entity-boost-WXSBSZW4.js +375 -0
  277. package/dist/exe-drift-HBLGPMBH.js +70 -0
  278. package/dist/exe-drift-K7HAX5N4.js +70 -0
  279. package/dist/exe-export-JSJOEDBE.js +76 -0
  280. package/dist/exe-export-YVZMMVZZ.js +76 -0
  281. package/dist/exe-import-BO2GU36V.js +79 -0
  282. package/dist/exe-import-S6O6JTAB.js +79 -0
  283. package/dist/exe-key-5C5FYDC7.js +673 -0
  284. package/dist/exe-key-QVPXEUTV.js +673 -0
  285. package/dist/exe-org-35QVSGCM.js +73 -0
  286. package/dist/exe-snapshot-6MFTRMI5.js +338 -0
  287. package/dist/exe-snapshot-OFWZY3CY.js +338 -0
  288. package/dist/fast-db-init-E64KKZS2.js +7 -0
  289. package/dist/fast-db-init-ZSRLXT5Y.js +7 -0
  290. package/dist/founder-context-QAAWZEZM.js +96 -0
  291. package/dist/gateway/index.js +13 -12
  292. package/dist/git-staleness-3PLBSHA3.js +112 -0
  293. package/dist/git-staleness-XPWBDY2Q.js +112 -0
  294. package/dist/git-task-sweep-C5DM7CJS.js +42 -0
  295. package/dist/git-task-sweep-G2MKIFGS.js +42 -0
  296. package/dist/global-procedures-CGXY2AVS.js +22 -0
  297. package/dist/global-procedures-WLVOTD2Y.js +22 -0
  298. package/dist/graph-auto-extract-SAE3GKG5.js +183 -0
  299. package/dist/graph-auto-extract-ZLKCPSPD.js +183 -0
  300. package/dist/graph-query-AP5R6ZHO.js +28 -0
  301. package/dist/graph-rag-ZCJ4X7YL.js +35 -0
  302. package/dist/hook-integrity-A3NDG7EB.js +89 -0
  303. package/dist/hooks/bug-report-worker.js +15 -14
  304. package/dist/hooks/codex-stop-task-finalizer.js +15 -14
  305. package/dist/hooks/commit-complete.js +16 -15
  306. package/dist/hooks/error-recall.js +9 -8
  307. package/dist/hooks/exe-heartbeat-hook.js +6 -5
  308. package/dist/hooks/ingest-worker.js +5 -5
  309. package/dist/hooks/ingest.js +13 -12
  310. package/dist/hooks/instructions-loaded.js +7 -6
  311. package/dist/hooks/manifest.json +20 -20
  312. package/dist/hooks/notification.js +7 -6
  313. package/dist/hooks/post-compact.js +15 -14
  314. package/dist/hooks/post-tool-combined.js +7 -7
  315. package/dist/hooks/pre-compact.js +20 -19
  316. package/dist/hooks/pre-tool-use.js +28 -20
  317. package/dist/hooks/prompt-submit.js +28 -27
  318. package/dist/hooks/session-end.js +25 -24
  319. package/dist/hooks/session-start.js +27 -16
  320. package/dist/hooks/stop.js +22 -21
  321. package/dist/hooks/subagent-stop.js +20 -14
  322. package/dist/hooks/summary-worker.js +22 -21
  323. package/dist/index.js +23 -22
  324. package/dist/installer-ALESUE7P.js +298 -0
  325. package/dist/installer-APCDG6FF.js +40 -0
  326. package/dist/installer-BYIQKENA.js +40 -0
  327. package/dist/installer-JNHPJNO2.js +344 -0
  328. package/dist/installer-KWTPZCUH.js +40 -0
  329. package/dist/installer-MUKDPCXL.js +344 -0
  330. package/dist/installer-NR636CAL.js +298 -0
  331. package/dist/installer-O2S3ZLAH.js +344 -0
  332. package/dist/installer-T5XSDLBK.js +298 -0
  333. package/dist/key-backup-status-2EPRIAXU.js +39 -0
  334. package/dist/lib/agent-config.js +2 -2
  335. package/dist/lib/cloud-sync.js +7 -6
  336. package/dist/lib/config.js +1 -1
  337. package/dist/lib/consolidation.js +8 -7
  338. package/dist/lib/database.js +4 -3
  339. package/dist/lib/db-daemon-client.js +3 -3
  340. package/dist/lib/db.js +4 -3
  341. package/dist/lib/device-registry.js +1 -1
  342. package/dist/lib/embed-worker.js +6 -4
  343. package/dist/lib/embedder.js +4 -4
  344. package/dist/lib/employee-templates.js +6 -5
  345. package/dist/lib/employees.js +4 -3
  346. package/dist/lib/exe-daemon-client.js +3 -3
  347. package/dist/lib/exe-daemon.js +164 -63
  348. package/dist/lib/hybrid-search.js +7 -6
  349. package/dist/lib/identity.js +4 -3
  350. package/dist/lib/license.js +2 -2
  351. package/dist/lib/messaging.js +13 -12
  352. package/dist/lib/reminders.js +5 -4
  353. package/dist/lib/schedules.js +7 -6
  354. package/dist/lib/session-registry.js +10 -5
  355. package/dist/lib/skill-learning.js +8 -7
  356. package/dist/lib/store.js +6 -5
  357. package/dist/lib/task-router.js +5 -4
  358. package/dist/lib/tasks.js +14 -13
  359. package/dist/lib/tmux-routing.js +12 -11
  360. package/dist/lib/token-spend.js +5 -4
  361. package/dist/license-gate-O2LLJ6LS.js +16 -0
  362. package/dist/mcp/register-tools.js +69 -69
  363. package/dist/mcp/server.js +121 -90
  364. package/dist/mcp/tools/complete-reminder.js +6 -5
  365. package/dist/mcp/tools/create-reminder.js +6 -5
  366. package/dist/mcp/tools/create-task.js +16 -15
  367. package/dist/mcp/tools/deactivate-behavior.js +9 -8
  368. package/dist/mcp/tools/list-reminders.js +6 -5
  369. package/dist/mcp/tools/list-tasks.js +16 -15
  370. package/dist/mcp/tools/send-message.js +15 -14
  371. package/dist/mcp/tools/update-task.js +15 -14
  372. package/dist/mcp-http-config-XI53TYZL.js +29 -0
  373. package/dist/mcp-http-config-YQ3KWB73.js +29 -0
  374. package/dist/memory-cards-2F6RFUT5.js +180 -0
  375. package/dist/memory-cards-LLUWHHT3.js +180 -0
  376. package/dist/memory-graph-extractor-IT6HYWWM.js +22 -0
  377. package/dist/memory-graph-extractor-LZUQWU7P.js +22 -0
  378. package/dist/memory-poisoning-defense-45AMNLDK.js +224 -0
  379. package/dist/memory-poisoning-defense-FFO3YUFP.js +224 -0
  380. package/dist/memory-queue-HSHWXVZC.js +19 -0
  381. package/dist/memory-queue-client-AJ2WHEEE.js +16 -0
  382. package/dist/memory-reflection-JGA6ULGJ.js +244 -0
  383. package/dist/memory-reflection-ZT4ST2SS.js +244 -0
  384. package/dist/message-queue-client-SANA7URQ.js +92 -0
  385. package/dist/notifications-S5QQ3SBU.js +47 -0
  386. package/dist/notifications-YBJCZJDR.js +47 -0
  387. package/dist/oauth-server-VEMBOSS3.js +437 -0
  388. package/dist/orchestration-events-CYDARUFL.js +27 -0
  389. package/dist/orchestration-events-F67I3TG6.js +27 -0
  390. package/dist/orchestration-phase-EMDEZHIU.js +23 -0
  391. package/dist/orchestrator-B4CUAA7M.js +35 -0
  392. package/dist/orchestrator-GBONJR6S.js +35 -0
  393. package/dist/pipeline-router-FKCP3RCU.js +15 -0
  394. package/dist/pipeline-router-LIQTRMQW.js +15 -0
  395. package/dist/plan-limits-BQ2CEB66.js +28 -0
  396. package/dist/plan-limits-H63HOJ4H.js +28 -0
  397. package/dist/project-boot-4CLI3CLL.js +299 -0
  398. package/dist/project-boot-VSMQJDDI.js +299 -0
  399. package/dist/projection-worker-55EFFXOK.js +1084 -0
  400. package/dist/projection-worker-IQ55BIX7.js +1084 -0
  401. package/dist/prospective-memory-E7WBD5V4.js +232 -0
  402. package/dist/prospective-memory-GE7TW6EW.js +232 -0
  403. package/dist/push-notifications-CV5UD5CC.js +15 -0
  404. package/dist/reranker-PZWHSEGQ.js +19 -0
  405. package/dist/reranker-WSJEPXIY.js +19 -0
  406. package/dist/reranker-ZBN2GKIO.js +19 -0
  407. package/dist/retrieval-health-HBFTJ5M3.js +11 -0
  408. package/dist/retrieval-health-M2OE7USG.js +11 -0
  409. package/dist/review-polling-BBOASCWL.js +126 -0
  410. package/dist/review-polling-WTJZTCTD.js +126 -0
  411. package/dist/runtime/index.js +19 -18
  412. package/dist/session-events-POJ3YCUQ.js +38 -0
  413. package/dist/session-events-QVNSNSQN.js +38 -0
  414. package/dist/session-kill-telemetry-65TJ5XV7.js +31 -0
  415. package/dist/session-kill-telemetry-OC34JTYX.js +31 -0
  416. package/dist/session-scope-3WDVXSJH.js +88 -0
  417. package/dist/session-scope-KRQL3PIP.js +88 -0
  418. package/dist/setup-wizard-FE2MBSZS.js +12 -0
  419. package/dist/setup-wizard-UUAEUY3X.js +12 -0
  420. package/dist/shard-manager-P5ZJH4AX.js +30 -0
  421. package/dist/skill-refinement-5MCWYJW4.js +159 -0
  422. package/dist/skill-refinement-TRSMFCKK.js +159 -0
  423. package/dist/stack-update-OGFSAV6F.js +80 -0
  424. package/dist/steward-gate-L43S6CSV.js +15 -0
  425. package/dist/steward-gate-LCR46RJV.js +15 -0
  426. package/dist/support-outbox-QPQQK7F7.js +547 -0
  427. package/dist/task-enforcement-DRWNGNLH.js +506 -0
  428. package/dist/task-enforcement-STQBU5AM.js +506 -0
  429. package/dist/task-scope-A2IJJQQS.js +37 -0
  430. package/dist/task-scope-X3JOBCZV.js +37 -0
  431. package/dist/tasks-crud-66VBOQTI.js +79 -0
  432. package/dist/tasks-crud-ZD24ZQOL.js +79 -0
  433. package/dist/tasks-notify-EPWV6YRP.js +40 -0
  434. package/dist/tasks-notify-GHPMBTB3.js +40 -0
  435. package/dist/tasks-review-P6ZVW3ZV.js +49 -0
  436. package/dist/tasks-review-VXJVJ7ZT.js +49 -0
  437. package/dist/telemetry-upload-KCE2IT6P.js +741 -0
  438. package/dist/telemetry-upload-ZNAMKKNS.js +741 -0
  439. package/dist/token-budget-GHUZSDOD.js +86 -0
  440. package/dist/token-budget-O7B4NGY3.js +86 -0
  441. package/dist/tool-capability-index-3OZFBAC3.js +10 -0
  442. package/dist/tool-telemetry-EWAC3F75.js +17 -0
  443. package/dist/tool-telemetry-IO6L62QY.js +17 -0
  444. package/dist/tui/App.js +25 -24
  445. package/dist/tui-data-2KSB36YG.js +260 -0
  446. package/dist/tui-data-YVJ72ZVD.js +260 -0
  447. package/dist/webhook-pipe-PAPBITL4.js +114 -0
  448. package/dist/wiki-acl-HTRRAQGV.js +111 -0
  449. package/dist/wiki-acl-MNG2ROWJ.js +111 -0
  450. package/dist/wiki-client-Q4O6EMTP.js +157 -0
  451. package/dist/worker-gate-EVQTUUIF.js +21 -0
  452. package/dist/worker-gate-XKPDQQY4.js +21 -0
  453. package/dist/workflow-engine-JYGEDGTL.js +28 -0
  454. package/dist/workflow-engine-UBTXKWRV.js +28 -0
  455. package/dist/worktree-VPSXFHXP.js +28 -0
  456. package/dist/worktree-ZH5AT35X.js +28 -0
  457. package/dist/worktree-sweep-BIUP4BGY.js +21 -0
  458. package/dist/worktree-sweep-KEHR4NFP.js +21 -0
  459. package/package.json +2 -2
  460. package/release-notes.json +101 -101
  461. package/stack.release.json +8 -0
@@ -0,0 +1,375 @@
1
+ import {
2
+ buildFtsMatch,
3
+ tokenizeForFts
4
+ } from "./chunk-AB4PAQYK.js";
5
+ import "./chunk-MLKGABMK.js";
6
+
7
+ // src/lib/entity-boost.ts
8
+ var ENTITY_BOOST_WEIGHT = parseFloat(
9
+ process.env.ENTITY_BOOST_WEIGHT ?? "0.5"
10
+ );
11
+ var SEMANTIC_MATCH_THRESHOLD = parseFloat(
12
+ process.env.SEMANTIC_MATCH_THRESHOLD ?? "0.7"
13
+ );
14
+ var _entityEmbedCache = null;
15
+ var ENTITY_EMBED_CACHE_TTL_MS = 10 * 60 * 1e3;
16
+ var MIN_WORD_LENGTH = 3;
17
+ var MAX_ENTITY_MATCHES = 20;
18
+ var GRAPH_TRAVERSAL_MAX_HOPS = Math.min(
19
+ parseInt(process.env.GRAPH_TRAVERSAL_MAX_HOPS ?? "2", 10),
20
+ 3
21
+ );
22
+ var TOP_ENTITIES_TO_TRAVERSE = 5;
23
+ var DAEMON_SAFE_ENTITY_FTS_TERM_THRESHOLD = 3;
24
+ var DAEMON_SAFE_ENTITY_FTS_MAX_TERMS = 5;
25
+ var _daemonEntityBoostSkipLogged = false;
26
+ function isDaemonProcess() {
27
+ return process.env.EXE_IS_DAEMON === "1";
28
+ }
29
+ function daemonSafeEntityTerms(words) {
30
+ return isDaemonProcess() ? words.slice(0, DAEMON_SAFE_ENTITY_FTS_MAX_TERMS) : words;
31
+ }
32
+ function escapeLikePattern(value) {
33
+ return value.replace(/[\\%_]/g, (m) => `\\${m}`);
34
+ }
35
+ function logDaemonEntityBoostSkipOnce(wordCount) {
36
+ if (_daemonEntityBoostSkipLogged || process.env.VITEST) return;
37
+ _daemonEntityBoostSkipLogged = true;
38
+ process.stderr.write(
39
+ `[entity-boost] Daemon-safe FTS: skipped entity boost for ${wordCount} terms to keep MCP responsive.
40
+ `
41
+ );
42
+ }
43
+ var DEFAULT_RELATIONSHIP_WEIGHTS = {
44
+ decided: 1,
45
+ depends_on: 0.8,
46
+ part_of: 0.7,
47
+ related_to: 0.5,
48
+ mentioned_in: 0.3
49
+ };
50
+ var DEFAULT_REL_WEIGHT = 0.4;
51
+ function getRelTypeWeights() {
52
+ const override = process.env.RELATIONSHIP_TYPE_WEIGHTS;
53
+ if (!override) return DEFAULT_RELATIONSHIP_WEIGHTS;
54
+ try {
55
+ return { ...DEFAULT_RELATIONSHIP_WEIGHTS, ...JSON.parse(override) };
56
+ } catch {
57
+ return DEFAULT_RELATIONSHIP_WEIGHTS;
58
+ }
59
+ }
60
+ function cosineSimilarity(a, b) {
61
+ if (a.length !== b.length) return 0;
62
+ let dot = 0, normA = 0, normB = 0;
63
+ for (let i = 0; i < a.length; i++) {
64
+ dot += a[i] * b[i];
65
+ normA += a[i] * a[i];
66
+ normB += b[i] * b[i];
67
+ }
68
+ const denom = Math.sqrt(normA) * Math.sqrt(normB);
69
+ return denom === 0 ? 0 : dot / denom;
70
+ }
71
+ async function matchEntitiesSemantic(query, client) {
72
+ try {
73
+ const { embed } = await import("./lib/embedder.js");
74
+ const queryVec = await embed(query);
75
+ const now = Date.now();
76
+ if (!_entityEmbedCache || now - _entityEmbedCache.loadedAt > ENTITY_EMBED_CACHE_TTL_MS) {
77
+ const allEntities = await client.execute({
78
+ sql: `SELECT id, name FROM entities ORDER BY last_seen DESC LIMIT 500`,
79
+ args: []
80
+ });
81
+ const embeddings = /* @__PURE__ */ new Map();
82
+ const namesById = /* @__PURE__ */ new Map();
83
+ const names = allEntities.rows.map((r) => String(r.name));
84
+ const ids = allEntities.rows.map((r) => String(r.id));
85
+ for (let i = 0; i < ids.length; i++) {
86
+ namesById.set(ids[i], names[i]);
87
+ }
88
+ try {
89
+ const { embedBatchViaClient } = await import("./lib/exe-daemon-client.js");
90
+ const vecs = await embedBatchViaClient(names, "low");
91
+ if (vecs && vecs.length === names.length) {
92
+ for (let i = 0; i < names.length; i++) {
93
+ embeddings.set(ids[i], vecs[i]);
94
+ }
95
+ }
96
+ } catch {
97
+ }
98
+ _entityEmbedCache = { embeddings, names: namesById, loadedAt: now };
99
+ }
100
+ const scored = [];
101
+ for (const [entityId, entityVec] of _entityEmbedCache.embeddings) {
102
+ const similarity = cosineSimilarity(queryVec, entityVec);
103
+ if (similarity >= SEMANTIC_MATCH_THRESHOLD) {
104
+ scored.push({
105
+ entityId,
106
+ name: _entityEmbedCache.names.get(entityId) ?? entityId,
107
+ similarity
108
+ });
109
+ }
110
+ }
111
+ scored.sort((a, b) => b.similarity - a.similarity);
112
+ return scored.slice(0, MAX_ENTITY_MATCHES).map(({ entityId, name }) => ({
113
+ entityId,
114
+ name
115
+ }));
116
+ } catch {
117
+ return [];
118
+ }
119
+ }
120
+ async function matchEntities(query, client) {
121
+ const words = daemonSafeEntityTerms(tokenizeForFts(query, {
122
+ minLen: MIN_WORD_LENGTH,
123
+ maxTerms: 16
124
+ }));
125
+ if (words.length === 0) return [];
126
+ if (isDaemonProcess() && words.length >= DAEMON_SAFE_ENTITY_FTS_TERM_THRESHOLD) {
127
+ logDaemonEntityBoostSkipOnce(words.length);
128
+ return [];
129
+ }
130
+ try {
131
+ const matchExpr = buildFtsMatch(words, {
132
+ prefix: !(isDaemonProcess() && words.length >= DAEMON_SAFE_ENTITY_FTS_TERM_THRESHOLD),
133
+ join: "OR"
134
+ });
135
+ const result = await client.execute({
136
+ sql: `SELECT e.id, e.name FROM entities e
137
+ JOIN entities_fts fts ON e.rowid = fts.rowid
138
+ WHERE entities_fts MATCH ?
139
+ ORDER BY rank
140
+ LIMIT ?`,
141
+ args: [matchExpr, MAX_ENTITY_MATCHES]
142
+ });
143
+ if (result.rows.length > 0) {
144
+ return result.rows.map((row) => ({
145
+ entityId: String(row.id),
146
+ name: String(row.name)
147
+ }));
148
+ }
149
+ } catch {
150
+ }
151
+ const semanticMatches = await matchEntitiesSemantic(query, client);
152
+ if (semanticMatches.length > 0) {
153
+ return semanticMatches;
154
+ }
155
+ const conditions = words.map(() => `LOWER(name) LIKE ? ESCAPE '\\'`);
156
+ const args = words.map((w) => `%${escapeLikePattern(w)}%`);
157
+ try {
158
+ const result = await client.execute({
159
+ sql: `SELECT id, name FROM entities
160
+ WHERE ${conditions.join(" OR ")}
161
+ LIMIT ?`,
162
+ args: [...args, MAX_ENTITY_MATCHES]
163
+ });
164
+ return result.rows.map((row) => ({
165
+ entityId: String(row.id),
166
+ name: String(row.name)
167
+ }));
168
+ } catch (err) {
169
+ process.stderr.write(
170
+ `[entity-boost] LIKE fallback query failed: ${err instanceof Error ? err.message : String(err)}
171
+ `
172
+ );
173
+ return [];
174
+ }
175
+ }
176
+ async function getLinkedMemories(entityIds, client, candidateMemoryIds) {
177
+ const linked = /* @__PURE__ */ new Map();
178
+ if (entityIds.length === 0) return linked;
179
+ const placeholders = entityIds.map(() => "?").join(",");
180
+ const candidateIds = candidateMemoryIds ? Array.from(candidateMemoryIds) : [];
181
+ const candidateClause = candidateIds.length > 0 ? ` AND memory_id IN (${candidateIds.map(() => "?").join(",")})` : "";
182
+ try {
183
+ const counts = await client.execute({
184
+ sql: `SELECT entity_id, COUNT(*) as cnt FROM entity_memories
185
+ WHERE entity_id IN (${placeholders})
186
+ GROUP BY entity_id`,
187
+ args: entityIds
188
+ });
189
+ for (const row of counts.rows) {
190
+ const entityId = String(row.entity_id);
191
+ linked.set(entityId, {
192
+ entityId,
193
+ memoryIds: /* @__PURE__ */ new Set(),
194
+ count: Number(row.cnt ?? 0)
195
+ });
196
+ }
197
+ const result = await client.execute({
198
+ sql: `SELECT entity_id, memory_id FROM entity_memories
199
+ WHERE entity_id IN (${placeholders})${candidateClause}
200
+ LIMIT 1000`,
201
+ args: [...entityIds, ...candidateIds]
202
+ });
203
+ for (const row of result.rows) {
204
+ const entityId = String(row.entity_id);
205
+ const memoryId = String(row.memory_id);
206
+ const entry = linked.get(entityId) ?? {
207
+ entityId,
208
+ memoryIds: /* @__PURE__ */ new Set(),
209
+ count: 0
210
+ };
211
+ entry.memoryIds.add(memoryId);
212
+ if (entry.count === 0) entry.count = entry.memoryIds.size;
213
+ linked.set(entityId, entry);
214
+ }
215
+ } catch {
216
+ }
217
+ return linked;
218
+ }
219
+ function spreadAttenuation(numLinked) {
220
+ return 1 / (1 + 1e-3 * (numLinked - 1) ** 2);
221
+ }
222
+ async function traverseAndScore(entities, client, boostMap, resultIds, graphContextMap) {
223
+ const topEntities = entities.slice(0, TOP_ENTITIES_TO_TRAVERSE);
224
+ if (topEntities.length === 0) return;
225
+ const { getEntityNeighbors } = await import("./graph-query-AP5R6ZHO.js");
226
+ const relWeights = getRelTypeWeights();
227
+ const neighborEntityIds = [];
228
+ const neighborMeta = /* @__PURE__ */ new Map();
229
+ for (const entity of topEntities) {
230
+ try {
231
+ const neighbors = await getEntityNeighbors(
232
+ client,
233
+ entity.entityId,
234
+ GRAPH_TRAVERSAL_MAX_HOPS
235
+ );
236
+ for (const n of neighbors) {
237
+ if (n.depth === 0) continue;
238
+ if (neighborMeta.has(n.entity.id)) continue;
239
+ neighborEntityIds.push(n.entity.id);
240
+ neighborMeta.set(n.entity.id, {
241
+ depth: n.depth,
242
+ relType: n.relType,
243
+ relConfidence: n.relConfidence,
244
+ sourceName: entity.name,
245
+ neighborName: n.entity.name
246
+ });
247
+ }
248
+ } catch {
249
+ }
250
+ }
251
+ if (neighborEntityIds.length === 0) return;
252
+ const neighborLinked = await getLinkedMemories(neighborEntityIds, client, resultIds);
253
+ for (const [entityId, entry] of neighborLinked) {
254
+ const meta = neighborMeta.get(entityId);
255
+ if (!meta) continue;
256
+ const relWeight = relWeights[meta.relType] ?? DEFAULT_REL_WEIGHT;
257
+ const depthDecay = 1 / (1 + meta.depth);
258
+ const neighborBoost = ENTITY_BOOST_WEIGHT * meta.relConfidence * depthDecay * relWeight;
259
+ const attenuation = spreadAttenuation(entry.count);
260
+ const finalBoost = neighborBoost * attenuation;
261
+ for (const memoryId of entry.memoryIds) {
262
+ if (resultIds.has(memoryId)) {
263
+ boostMap.set(memoryId, (boostMap.get(memoryId) ?? 0) + finalBoost);
264
+ const contextPath = `${meta.sourceName} ${meta.relType} ${meta.neighborName}`;
265
+ if (!graphContextMap.has(memoryId)) {
266
+ graphContextMap.set(memoryId, contextPath);
267
+ }
268
+ }
269
+ }
270
+ }
271
+ }
272
+ async function applyHyperedgeBoost(entities, client, boostMap, resultIds) {
273
+ if (entities.length < 2) return;
274
+ const entityIds = entities.map((e) => e.entityId);
275
+ const placeholders = entityIds.map(() => "?").join(",");
276
+ try {
277
+ const result = await client.execute({
278
+ sql: `SELECT hyperedge_id, entity_id FROM hyperedge_nodes
279
+ WHERE entity_id IN (${placeholders})`,
280
+ args: entityIds
281
+ });
282
+ const hyperedgeEntities = /* @__PURE__ */ new Map();
283
+ for (const row of result.rows) {
284
+ const hid = String(row.hyperedge_id);
285
+ const eid = String(row.entity_id);
286
+ const set = hyperedgeEntities.get(hid) ?? /* @__PURE__ */ new Set();
287
+ set.add(eid);
288
+ hyperedgeEntities.set(hid, set);
289
+ }
290
+ const sharedHyperedgeIds = [];
291
+ for (const [hid, eids] of hyperedgeEntities) {
292
+ if (eids.size >= 2) {
293
+ sharedHyperedgeIds.push(hid);
294
+ }
295
+ }
296
+ if (sharedHyperedgeIds.length === 0) return;
297
+ const hPlaceholders = sharedHyperedgeIds.map(() => "?").join(",");
298
+ const allNodesResult = await client.execute({
299
+ sql: `SELECT DISTINCT entity_id FROM hyperedge_nodes
300
+ WHERE hyperedge_id IN (${hPlaceholders})`,
301
+ args: sharedHyperedgeIds
302
+ });
303
+ const allEntityIds = allNodesResult.rows.map((r) => String(r.entity_id));
304
+ if (allEntityIds.length === 0) return;
305
+ const linked = await getLinkedMemories(allEntityIds, client, resultIds);
306
+ for (const [, entry] of linked) {
307
+ const attenuation = spreadAttenuation(entry.count);
308
+ const boost = ENTITY_BOOST_WEIGHT * attenuation;
309
+ for (const memoryId of entry.memoryIds) {
310
+ if (resultIds.has(memoryId)) {
311
+ boostMap.set(memoryId, (boostMap.get(memoryId) ?? 0) + boost);
312
+ }
313
+ }
314
+ }
315
+ } catch {
316
+ }
317
+ }
318
+ async function applyEntityBoost(results, query, client) {
319
+ const emptyResult = { results, graphContext: /* @__PURE__ */ new Map() };
320
+ if (ENTITY_BOOST_WEIGHT === 0 || results.length === 0) {
321
+ return emptyResult;
322
+ }
323
+ const debugStart = process.env.EXE_DEBUG_HOOKS ? performance.now() : 0;
324
+ const debugEnd = () => {
325
+ if (!process.env.EXE_DEBUG_HOOKS) return;
326
+ process.stderr.write(
327
+ `[entity-boost] ${(performance.now() - debugStart).toFixed(3)}ms
328
+ `
329
+ );
330
+ };
331
+ const entities = await matchEntities(query, client);
332
+ if (entities.length === 0) {
333
+ debugEnd();
334
+ return emptyResult;
335
+ }
336
+ const boostMap = /* @__PURE__ */ new Map();
337
+ const resultIds = new Set(results.map((r) => r.id));
338
+ const graphContextMap = /* @__PURE__ */ new Map();
339
+ const directLinked = await getLinkedMemories(
340
+ entities.map((e) => e.entityId),
341
+ client,
342
+ resultIds
343
+ );
344
+ for (const [, entry] of directLinked) {
345
+ const attenuation = spreadAttenuation(entry.count);
346
+ const boost = ENTITY_BOOST_WEIGHT * attenuation;
347
+ for (const memoryId of entry.memoryIds) {
348
+ if (resultIds.has(memoryId)) {
349
+ boostMap.set(memoryId, (boostMap.get(memoryId) ?? 0) + boost);
350
+ }
351
+ }
352
+ }
353
+ await traverseAndScore(entities, client, boostMap, resultIds, graphContextMap);
354
+ await applyHyperedgeBoost(entities, client, boostMap, resultIds);
355
+ if (boostMap.size === 0) {
356
+ debugEnd();
357
+ return emptyResult;
358
+ }
359
+ const scored = results.map((r, i) => ({
360
+ record: r,
361
+ baseScore: 1 / (1 + i * 0.1),
362
+ entityBoost: boostMap.get(r.id) ?? 0
363
+ }));
364
+ scored.sort(
365
+ (a, b) => b.baseScore + b.entityBoost - (a.baseScore + a.entityBoost)
366
+ );
367
+ debugEnd();
368
+ return {
369
+ results: scored.map((s) => s.record),
370
+ graphContext: graphContextMap
371
+ };
372
+ }
373
+ export {
374
+ applyEntityBoost
375
+ };
@@ -0,0 +1,70 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ runDriftProbes
4
+ } from "./chunk-RG4OHDY7.js";
5
+ import "./chunk-LCOPVYU2.js";
6
+ import "./chunk-2I23RPSI.js";
7
+ import "./chunk-LJONNOFH.js";
8
+ import "./chunk-PNQDP3OA.js";
9
+ import "./chunk-7HLWBYH7.js";
10
+ import "./chunk-FXU7JOXK.js";
11
+ import "./chunk-5P3HOBZX.js";
12
+ import "./chunk-LYH5HE24.js";
13
+ import "./chunk-MLKGABMK.js";
14
+
15
+ // src/bin/exe-drift.ts
16
+ var AXES = ["continuity", "consistency", "role-fidelity", "world-model"];
17
+ var AXIS_HEADERS = {
18
+ continuity: "Cont.",
19
+ consistency: "Consist.",
20
+ "role-fidelity": "Role",
21
+ "world-model": "World"
22
+ };
23
+ function statusIcon(overall) {
24
+ if (overall >= 80) return "\x1B[32m\u{1F7E2} OK\x1B[0m";
25
+ if (overall >= 60) return "\x1B[33m\u{1F7E0} WARN\x1B[0m";
26
+ return "\x1B[31m\u{1F534} DRIFTING\x1B[0m";
27
+ }
28
+ function padRight(str, len) {
29
+ return str.length >= len ? str.slice(0, len) : str + " ".repeat(len - str.length);
30
+ }
31
+ function padLeft(str, len) {
32
+ return str.length >= len ? str : " ".repeat(len - str.length) + str;
33
+ }
34
+ function formatTable(results) {
35
+ const lines = [];
36
+ const header = padRight("Agent", 10) + AXES.map((a) => padLeft(AXIS_HEADERS[a], 9)).join("") + padLeft("Overall", 9) + " Status";
37
+ lines.push(header);
38
+ lines.push("-".repeat(header.length + 10));
39
+ for (const r of results) {
40
+ const line = padRight(r.agent, 10) + AXES.map((a) => padLeft(String(r.scores[a]), 9)).join("") + padLeft(String(r.overall), 9) + " " + statusIcon(r.overall);
41
+ lines.push(line);
42
+ }
43
+ return lines.join("\n");
44
+ }
45
+ async function runDrift(args) {
46
+ const agentIdx = args.indexOf("--agent");
47
+ const agentId = agentIdx >= 0 ? args[agentIdx + 1] : void 0;
48
+ console.log("\nexe-os doctor --drift\n");
49
+ const results = await runDriftProbes({ agentId });
50
+ if (results.length === 0) {
51
+ console.log("No agents found. Run /exe-team to see available employees.");
52
+ return;
53
+ }
54
+ console.log(formatTable(results));
55
+ console.log();
56
+ const flagged = results.filter((r) => r.flags.length > 0);
57
+ if (flagged.length > 0) {
58
+ for (const r of flagged) {
59
+ for (const flag of r.flags) {
60
+ console.log(`\u26A0 ${r.agent}: ${flag}`);
61
+ }
62
+ }
63
+ console.log();
64
+ } else {
65
+ console.log("All agents within role-fidelity thresholds.\n");
66
+ }
67
+ }
68
+ export {
69
+ runDrift
70
+ };
@@ -0,0 +1,70 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ runDriftProbes
4
+ } from "./chunk-7UUJMSFH.js";
5
+ import "./chunk-MUQ46NLH.js";
6
+ import "./chunk-2I23RPSI.js";
7
+ import "./chunk-HNDG5ZDJ.js";
8
+ import "./chunk-PNQDP3OA.js";
9
+ import "./chunk-7HLWBYH7.js";
10
+ import "./chunk-FXU7JOXK.js";
11
+ import "./chunk-R36FAN53.js";
12
+ import "./chunk-LYH5HE24.js";
13
+ import "./chunk-MLKGABMK.js";
14
+
15
+ // src/bin/exe-drift.ts
16
+ var AXES = ["continuity", "consistency", "role-fidelity", "world-model"];
17
+ var AXIS_HEADERS = {
18
+ continuity: "Cont.",
19
+ consistency: "Consist.",
20
+ "role-fidelity": "Role",
21
+ "world-model": "World"
22
+ };
23
+ function statusIcon(overall) {
24
+ if (overall >= 80) return "\x1B[32m\u{1F7E2} OK\x1B[0m";
25
+ if (overall >= 60) return "\x1B[33m\u{1F7E0} WARN\x1B[0m";
26
+ return "\x1B[31m\u{1F534} DRIFTING\x1B[0m";
27
+ }
28
+ function padRight(str, len) {
29
+ return str.length >= len ? str.slice(0, len) : str + " ".repeat(len - str.length);
30
+ }
31
+ function padLeft(str, len) {
32
+ return str.length >= len ? str : " ".repeat(len - str.length) + str;
33
+ }
34
+ function formatTable(results) {
35
+ const lines = [];
36
+ const header = padRight("Agent", 10) + AXES.map((a) => padLeft(AXIS_HEADERS[a], 9)).join("") + padLeft("Overall", 9) + " Status";
37
+ lines.push(header);
38
+ lines.push("-".repeat(header.length + 10));
39
+ for (const r of results) {
40
+ const line = padRight(r.agent, 10) + AXES.map((a) => padLeft(String(r.scores[a]), 9)).join("") + padLeft(String(r.overall), 9) + " " + statusIcon(r.overall);
41
+ lines.push(line);
42
+ }
43
+ return lines.join("\n");
44
+ }
45
+ async function runDrift(args) {
46
+ const agentIdx = args.indexOf("--agent");
47
+ const agentId = agentIdx >= 0 ? args[agentIdx + 1] : void 0;
48
+ console.log("\nexe-os doctor --drift\n");
49
+ const results = await runDriftProbes({ agentId });
50
+ if (results.length === 0) {
51
+ console.log("No agents found. Run /exe-team to see available employees.");
52
+ return;
53
+ }
54
+ console.log(formatTable(results));
55
+ console.log();
56
+ const flagged = results.filter((r) => r.flags.length > 0);
57
+ if (flagged.length > 0) {
58
+ for (const r of flagged) {
59
+ for (const flag of r.flags) {
60
+ console.log(`\u26A0 ${r.agent}: ${flag}`);
61
+ }
62
+ }
63
+ console.log();
64
+ } else {
65
+ console.log("All agents within role-fidelity thresholds.\n");
66
+ }
67
+ }
68
+ export {
69
+ runDrift
70
+ };
@@ -0,0 +1,76 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ exportOrchestration
4
+ } from "./chunk-UCBIETEA.js";
5
+ import "./chunk-VUH67PT4.js";
6
+ import {
7
+ disposeStore,
8
+ initStore
9
+ } from "./chunk-NOC7GUHJ.js";
10
+ import "./chunk-CHCA3ZM2.js";
11
+ import "./chunk-OTVEIJUQ.js";
12
+ import "./chunk-L2DMZT56.js";
13
+ import "./chunk-Y25OJWOQ.js";
14
+ import "./chunk-MP2AFCGL.js";
15
+ import "./chunk-MUQ46NLH.js";
16
+ import "./chunk-2I23RPSI.js";
17
+ import "./chunk-HNDG5ZDJ.js";
18
+ import "./chunk-PNQDP3OA.js";
19
+ import "./chunk-7HLWBYH7.js";
20
+ import "./chunk-FXU7JOXK.js";
21
+ import "./chunk-Z42MXYWW.js";
22
+ import "./chunk-R36FAN53.js";
23
+ import "./chunk-LYH5HE24.js";
24
+ import {
25
+ isMainModule
26
+ } from "./chunk-6Y4B3QF6.js";
27
+ import "./chunk-MLKGABMK.js";
28
+
29
+ // src/bin/exe-export.ts
30
+ import { mkdirSync, writeFileSync } from "fs";
31
+ import path from "path";
32
+ var OUTPUT_FLAG = "--output";
33
+ function printUsage() {
34
+ process.stdout.write("Usage: exe-os export --output <path>\n");
35
+ }
36
+ function parseOutputPath(argv) {
37
+ if (argv.includes("--help") || argv.includes("-h")) {
38
+ printUsage();
39
+ return null;
40
+ }
41
+ const flagIndex = argv.indexOf(OUTPUT_FLAG);
42
+ if (flagIndex === -1 || !argv[flagIndex + 1]) {
43
+ throw new Error("Missing required --output <path> argument");
44
+ }
45
+ return argv[flagIndex + 1];
46
+ }
47
+ async function runExeExport(argv = process.argv.slice(2)) {
48
+ const outputPath = parseOutputPath(argv);
49
+ if (outputPath == null) return;
50
+ await initStore();
51
+ try {
52
+ const pkg = await exportOrchestration("cli");
53
+ mkdirSync(path.dirname(outputPath), { recursive: true });
54
+ writeFileSync(outputPath, `${JSON.stringify(pkg, null, 2)}
55
+ `, "utf-8");
56
+ process.stdout.write(
57
+ `Exported ${pkg.roster.length} roster entries, ${Object.keys(pkg.identities).length} identities, ${pkg.behaviors.length} behaviors, ${pkg.procedures.length} procedures to ${outputPath}
58
+ `
59
+ );
60
+ } finally {
61
+ try {
62
+ await disposeStore();
63
+ } catch {
64
+ }
65
+ }
66
+ }
67
+ if (isMainModule(import.meta.url) && (process.argv[1] ?? "").includes("exe-export")) {
68
+ runExeExport().catch((err) => {
69
+ process.stderr.write(`exe-os export failed: ${err instanceof Error ? err.message : String(err)}
70
+ `);
71
+ process.exit(1);
72
+ });
73
+ }
74
+ export {
75
+ runExeExport
76
+ };
@@ -0,0 +1,76 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ exportOrchestration
4
+ } from "./chunk-XRN5MQRN.js";
5
+ import "./chunk-VUH67PT4.js";
6
+ import {
7
+ disposeStore,
8
+ initStore
9
+ } from "./chunk-PT3URNVT.js";
10
+ import "./chunk-CHCA3ZM2.js";
11
+ import "./chunk-OTVEIJUQ.js";
12
+ import "./chunk-VPQAXUG4.js";
13
+ import "./chunk-Y25OJWOQ.js";
14
+ import "./chunk-MP2AFCGL.js";
15
+ import "./chunk-LCOPVYU2.js";
16
+ import "./chunk-2I23RPSI.js";
17
+ import "./chunk-LJONNOFH.js";
18
+ import "./chunk-PNQDP3OA.js";
19
+ import "./chunk-7HLWBYH7.js";
20
+ import "./chunk-FXU7JOXK.js";
21
+ import "./chunk-Z42MXYWW.js";
22
+ import "./chunk-5P3HOBZX.js";
23
+ import "./chunk-LYH5HE24.js";
24
+ import {
25
+ isMainModule
26
+ } from "./chunk-6Y4B3QF6.js";
27
+ import "./chunk-MLKGABMK.js";
28
+
29
+ // src/bin/exe-export.ts
30
+ import { mkdirSync, writeFileSync } from "fs";
31
+ import path from "path";
32
+ var OUTPUT_FLAG = "--output";
33
+ function printUsage() {
34
+ process.stdout.write("Usage: exe-os export --output <path>\n");
35
+ }
36
+ function parseOutputPath(argv) {
37
+ if (argv.includes("--help") || argv.includes("-h")) {
38
+ printUsage();
39
+ return null;
40
+ }
41
+ const flagIndex = argv.indexOf(OUTPUT_FLAG);
42
+ if (flagIndex === -1 || !argv[flagIndex + 1]) {
43
+ throw new Error("Missing required --output <path> argument");
44
+ }
45
+ return argv[flagIndex + 1];
46
+ }
47
+ async function runExeExport(argv = process.argv.slice(2)) {
48
+ const outputPath = parseOutputPath(argv);
49
+ if (outputPath == null) return;
50
+ await initStore();
51
+ try {
52
+ const pkg = await exportOrchestration("cli");
53
+ mkdirSync(path.dirname(outputPath), { recursive: true });
54
+ writeFileSync(outputPath, `${JSON.stringify(pkg, null, 2)}
55
+ `, "utf-8");
56
+ process.stdout.write(
57
+ `Exported ${pkg.roster.length} roster entries, ${Object.keys(pkg.identities).length} identities, ${pkg.behaviors.length} behaviors, ${pkg.procedures.length} procedures to ${outputPath}
58
+ `
59
+ );
60
+ } finally {
61
+ try {
62
+ await disposeStore();
63
+ } catch {
64
+ }
65
+ }
66
+ }
67
+ if (isMainModule(import.meta.url) && (process.argv[1] ?? "").includes("exe-export")) {
68
+ runExeExport().catch((err) => {
69
+ process.stderr.write(`exe-os export failed: ${err instanceof Error ? err.message : String(err)}
70
+ `);
71
+ process.exit(1);
72
+ });
73
+ }
74
+ export {
75
+ runExeExport
76
+ };