@askexenow/exe-os 0.9.279 → 0.9.280

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 (504) hide show
  1. package/dist/active-agent-2G5ARPXZ.js +26 -0
  2. package/dist/active-agent-2IAUPOJO.js +27 -0
  3. package/dist/agentic-ontology-YLZRGG7G.js +25 -0
  4. package/dist/backfill-metadata-GHUTESVD.js +599 -0
  5. package/dist/backfill-metadata-MSIZ5PV2.js +599 -0
  6. package/dist/backfill-metadata-SKUAF4QY.js +599 -0
  7. package/dist/backfill-metadata-WXUP5OVY.js +599 -0
  8. package/dist/behaviors-27D52NU4.js +39 -0
  9. package/dist/behaviors-BHIVZRAN.js +39 -0
  10. package/dist/behaviors-HAEVJHQN.js +39 -0
  11. package/dist/behaviors-LDDK7WEB.js +39 -0
  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 +7 -7
  16. package/dist/bin/backfill-responses.js +7 -7
  17. package/dist/bin/backfill-vectors.js +9 -9
  18. package/dist/bin/bulk-sync-postgres.js +7 -7
  19. package/dist/bin/cc-doctor.js +4 -4
  20. package/dist/bin/cleanup-stale-review-tasks.js +9 -9
  21. package/dist/bin/cli.js +151 -16
  22. package/dist/bin/deferred-daemon-restart.js +1 -1
  23. package/dist/bin/exe-agent-config.js +2 -2
  24. package/dist/bin/exe-agent.js +7 -7
  25. package/dist/bin/exe-assign.js +9 -9
  26. package/dist/bin/exe-boot.js +17 -17
  27. package/dist/bin/exe-call.js +4 -4
  28. package/dist/bin/exe-cloud.js +5 -5
  29. package/dist/bin/exe-dispatch.js +9 -9
  30. package/dist/bin/exe-doctor.js +1 -1
  31. package/dist/bin/exe-export-behaviors.js +8 -8
  32. package/dist/bin/exe-forget.js +7 -7
  33. package/dist/bin/exe-gateway.js +7 -7
  34. package/dist/bin/exe-healthcheck.js +4 -4
  35. package/dist/bin/exe-heartbeat.js +9 -9
  36. package/dist/bin/exe-kill.js +13 -13
  37. package/dist/bin/exe-launch-agent.js +17 -17
  38. package/dist/bin/exe-new-employee.js +6 -6
  39. package/dist/bin/exe-pending-messages.js +10 -10
  40. package/dist/bin/exe-pending-notifications.js +9 -9
  41. package/dist/bin/exe-pending-reviews.js +9 -9
  42. package/dist/bin/exe-rename.js +4 -4
  43. package/dist/bin/exe-review.js +12 -12
  44. package/dist/bin/exe-search.js +6 -6
  45. package/dist/bin/exe-session-cleanup.js +15 -15
  46. package/dist/bin/exe-settings.js +4 -4
  47. package/dist/bin/exe-start-codex.js +24 -13
  48. package/dist/bin/exe-start-opencode.js +9 -9
  49. package/dist/bin/exe-start.sh +2 -2
  50. package/dist/bin/exe-status.js +10 -10
  51. package/dist/bin/exe-support.js +1 -1
  52. package/dist/bin/exe-team.js +3 -3
  53. package/dist/bin/exe-watchdog.js +52 -4
  54. package/dist/bin/git-sweep.js +10 -10
  55. package/dist/bin/graph-backfill.js +7 -7
  56. package/dist/bin/graph-export.js +6 -6
  57. package/dist/bin/import-history.js +10 -10
  58. package/dist/bin/install.js +7 -7
  59. package/dist/bin/intercom-check.js +4 -4
  60. package/dist/bin/mcp-sessions.js +2 -2
  61. package/dist/bin/orchestration-metrics.js +4 -4
  62. package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
  63. package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
  64. package/dist/bin/scan-tasks.js +9 -9
  65. package/dist/bin/setup.js +2 -2
  66. package/dist/bin/shard-migrate.js +5 -5
  67. package/dist/capability-cards-JG75HHOF.js +88 -0
  68. package/dist/capacity-monitor-CNW7PRLG.js +50 -0
  69. package/dist/capacity-monitor-HET7G4MG.js +50 -0
  70. package/dist/capacity-monitor-SAY7CD46.js +50 -0
  71. package/dist/capacity-monitor-V7LY63U6.js +50 -0
  72. package/dist/catchup-brief-E7IF2QGR.js +154 -0
  73. package/dist/catchup-brief-JPOHC6UH.js +154 -0
  74. package/dist/catchup-brief-JQID2BF7.js +154 -0
  75. package/dist/catchup-brief-RW5GN43K.js +154 -0
  76. package/dist/chunk-2IA7BLFA.js +2078 -0
  77. package/dist/chunk-2UATPAHA.js +244 -0
  78. package/dist/chunk-2XEWT25L.js +290 -0
  79. package/dist/chunk-2ZFUZKF5.js +197 -0
  80. package/dist/chunk-37C3FRF2.js +1352 -0
  81. package/dist/chunk-3ABB3GEN.js +97 -0
  82. package/dist/chunk-3FCQSK7F.js +4318 -0
  83. package/dist/chunk-3LEZZS52.js +2113 -0
  84. package/dist/chunk-3O46YCET.js +30 -0
  85. package/dist/chunk-3SDHTGTT.js +369 -0
  86. package/dist/chunk-3XLXETYH.js +128 -0
  87. package/dist/chunk-433KKYLZ.js +539 -0
  88. package/dist/chunk-4CCAANIM.js +85 -0
  89. package/dist/chunk-4J5TKW7C.js +1352 -0
  90. package/dist/chunk-4QN4XAB5.js +227 -0
  91. package/dist/chunk-4T2F5SJA.js +2078 -0
  92. package/dist/chunk-52HOURUP.js +369 -0
  93. package/dist/chunk-52XEYRFA.js +362 -0
  94. package/dist/chunk-54XM4CYO.js +1076 -0
  95. package/dist/chunk-5BECNOD5.js +14219 -0
  96. package/dist/chunk-5BUPCYCN.js +604 -0
  97. package/dist/chunk-5CVQOWOY.js +1350 -0
  98. package/dist/chunk-5DGFPLCO.js +214 -0
  99. package/dist/chunk-5DSH4NNZ.js +731 -0
  100. package/dist/chunk-5MCJQCAM.js +128 -0
  101. package/dist/chunk-5OCQ4NMK.js +284 -0
  102. package/dist/chunk-5ODRK4TE.js +1076 -0
  103. package/dist/chunk-5QDLLWZ3.js +510 -0
  104. package/dist/chunk-5TT4VL25.js +167 -0
  105. package/dist/chunk-5VV3WZB6.js +76 -0
  106. package/dist/chunk-6H74SOGI.js +204 -0
  107. package/dist/chunk-6M74TBVW.js +290 -0
  108. package/dist/chunk-6MDKSLYM.js +123 -0
  109. package/dist/chunk-6OFFJSL5.js +33 -0
  110. package/dist/chunk-6ST7MMLG.js +240 -0
  111. package/dist/chunk-6WFUH2B4.js +345 -0
  112. package/dist/chunk-74YEBPGM.js +271 -0
  113. package/dist/chunk-77C3E5LS.js +54 -0
  114. package/dist/chunk-7EAYV7G2.js +345 -0
  115. package/dist/chunk-7FT4TXF3.js +4318 -0
  116. package/dist/chunk-7L2EV3XX.js +366 -0
  117. package/dist/chunk-7MAQO7FA.js +394 -0
  118. package/dist/chunk-7NPWPF2X.js +712 -0
  119. package/dist/chunk-7NWWQ6QX.js +1094 -0
  120. package/dist/chunk-AB5QAKU3.js +1119 -0
  121. package/dist/chunk-AEQOKSU4.js +214 -0
  122. package/dist/chunk-AFPNLGJJ.js +377 -0
  123. package/dist/chunk-ARWKPNWX.js +284 -0
  124. package/dist/chunk-B3UT6H2X.js +14219 -0
  125. package/dist/chunk-BDEB2THB.js +127 -0
  126. package/dist/chunk-BIISXDSB.js +50 -0
  127. package/dist/chunk-BOCQAH6E.js +171 -0
  128. package/dist/chunk-BVETHEMM.js +456 -0
  129. package/dist/chunk-C3N2MXIP.js +85 -0
  130. package/dist/chunk-C3PAAUNW.js +54 -0
  131. package/dist/chunk-C7CRZGD7.js +81 -0
  132. package/dist/chunk-CAQE2WME.js +214 -0
  133. package/dist/chunk-CAWCO2VR.js +2078 -0
  134. package/dist/chunk-CB4SB3VJ.js +377 -0
  135. package/dist/chunk-CFLJBUHT.js +1094 -0
  136. package/dist/chunk-CITYIYX5.js +89 -0
  137. package/dist/chunk-CLBCRQWU.js +210 -0
  138. package/dist/chunk-D5IPAFJO.js +82 -0
  139. package/dist/chunk-DA53BA7V.js +271 -0
  140. package/dist/chunk-DHBIRCFL.js +290 -0
  141. package/dist/chunk-DHP3ISXV.js +185 -0
  142. package/dist/chunk-DIAOAGZ6.js +38 -0
  143. package/dist/chunk-DJ2MBAAF.js +280 -0
  144. package/dist/chunk-DKH2VU3V.js +97 -0
  145. package/dist/chunk-DOTMUSXW.js +81 -0
  146. package/dist/chunk-DQM5DO5S.js +128 -0
  147. package/dist/chunk-EGFKI6W2.js +129 -0
  148. package/dist/chunk-EMA5YFAV.js +362 -0
  149. package/dist/chunk-EQQNJ4B3.js +128 -0
  150. package/dist/chunk-EVVR5QCW.js +290 -0
  151. package/dist/chunk-EXECVV2I.js +539 -0
  152. package/dist/chunk-F73FLMUA.js +668 -0
  153. package/dist/chunk-FECRU7AB.js +221 -0
  154. package/dist/chunk-FGMF5K2G.js +231 -0
  155. package/dist/chunk-FIWKVHEU.js +204 -0
  156. package/dist/chunk-FJ5WSXU5.js +97 -0
  157. package/dist/chunk-FLBMX6YY.js +75 -0
  158. package/dist/chunk-FLKGAL3F.js +333 -0
  159. package/dist/chunk-FRXQSRTO.js +1076 -0
  160. package/dist/chunk-FVHQL6ND.js +89 -0
  161. package/dist/chunk-G2FYKVRB.js +54 -0
  162. package/dist/chunk-G4RPL2RH.js +333 -0
  163. package/dist/chunk-GACE3UCH.js +271 -0
  164. package/dist/chunk-GAQ2OCPU.js +204 -0
  165. package/dist/chunk-GMM3ALHG.js +1350 -0
  166. package/dist/chunk-GSNDMSWZ.js +1119 -0
  167. package/dist/chunk-H4IGERTU.js +712 -0
  168. package/dist/chunk-HCIMNY45.js +2078 -0
  169. package/dist/chunk-HKB4GOGL.js +159 -0
  170. package/dist/chunk-HMMM6YFN.js +1068 -0
  171. package/dist/chunk-HVKPZCXA.js +271 -0
  172. package/dist/chunk-HZJDZ6NX.js +89 -0
  173. package/dist/chunk-I5BYXBAD.js +1350 -0
  174. package/dist/chunk-I6NQVJYF.js +97 -0
  175. package/dist/chunk-I6YJU2DE.js +128 -0
  176. package/dist/chunk-I7GRBEFS.js +690 -0
  177. package/dist/chunk-IFYEMOZG.js +85 -0
  178. package/dist/chunk-IHR5L3YV.js +244 -0
  179. package/dist/chunk-ILIAYMKP.js +362 -0
  180. package/dist/chunk-IPZ4JWBG.js +4318 -0
  181. package/dist/chunk-IQHXWJ2Q.js +402 -0
  182. package/dist/chunk-J2PDHWJV.js +448 -0
  183. package/dist/chunk-J373WY35.js +82 -0
  184. package/dist/chunk-JAZEO27N.js +1094 -0
  185. package/dist/chunk-JDSJ3NU7.js +836 -0
  186. package/dist/chunk-JMK2BOGQ.js +2113 -0
  187. package/dist/chunk-JS2KQWMD.js +377 -0
  188. package/dist/chunk-JU42WYSP.js +448 -0
  189. package/dist/chunk-K26DLCUP.js +299 -0
  190. package/dist/chunk-K4JTUUWC.js +1094 -0
  191. package/dist/chunk-KBUQ4X5Y.js +1076 -0
  192. package/dist/chunk-KFSW4EKI.js +50 -0
  193. package/dist/chunk-KT2XEGXZ.js +345 -0
  194. package/dist/chunk-KZ57MNYJ.js +562 -0
  195. package/dist/chunk-LFAX3MCC.js +668 -0
  196. package/dist/chunk-LJZZS4B5.js +81 -0
  197. package/dist/chunk-LNV6OOHY.js +150 -0
  198. package/dist/chunk-LYH3ZLYF.js +197 -0
  199. package/dist/chunk-M2QK3YD5.js +214 -0
  200. package/dist/chunk-M5N2TE3L.js +76 -0
  201. package/dist/chunk-MJ44I6HG.js +244 -0
  202. package/dist/chunk-MRRYZQUS.js +510 -0
  203. package/dist/chunk-MZV4HV2T.js +363 -0
  204. package/dist/chunk-N663LPHD.js +97 -0
  205. package/dist/chunk-NDG4GHYH.js +171 -0
  206. package/dist/chunk-NGK4DUTW.js +85 -0
  207. package/dist/chunk-O25CS3BH.js +836 -0
  208. package/dist/chunk-OADURIIN.js +258 -0
  209. package/dist/chunk-OCYNSIQR.js +204 -0
  210. package/dist/chunk-OGYVGJ7F.js +402 -0
  211. package/dist/chunk-OUKLRG7K.js +54 -0
  212. package/dist/chunk-OVOWVZXV.js +127 -0
  213. package/dist/chunk-P3AUAXMW.js +712 -0
  214. package/dist/chunk-P3YEMU7L.js +167 -0
  215. package/dist/chunk-P73YSDV7.js +284 -0
  216. package/dist/chunk-PAMQBA5K.js +157 -0
  217. package/dist/chunk-PDOGDOO6.js +81 -0
  218. package/dist/chunk-PDSMTX4H.js +448 -0
  219. package/dist/chunk-PN5VKI6G.js +448 -0
  220. package/dist/chunk-PW4S2SN7.js +14219 -0
  221. package/dist/chunk-PWJI2O5R.js +171 -0
  222. package/dist/chunk-PZLB7XHF.js +1119 -0
  223. package/dist/chunk-QLBF5REP.js +731 -0
  224. package/dist/chunk-QMU256CS.js +262 -0
  225. package/dist/chunk-QMVUSITJ.js +539 -0
  226. package/dist/chunk-QOWE36S5.js +1119 -0
  227. package/dist/chunk-QRLP3WDY.js +373 -0
  228. package/dist/chunk-QWFF3NWP.js +382 -0
  229. package/dist/chunk-RUF7DGXX.js +1350 -0
  230. package/dist/chunk-S5JWN7XT.js +382 -0
  231. package/dist/chunk-SEIYC4D4.js +197 -0
  232. package/dist/chunk-SFQXO7I6.js +1352 -0
  233. package/dist/chunk-SO4SCJZ2.js +362 -0
  234. package/dist/chunk-SOLGWOCM.js +836 -0
  235. package/dist/chunk-SVHHWATZ.js +377 -0
  236. package/dist/chunk-SVOMFAJM.js +50 -0
  237. package/dist/chunk-SYIROM36.js +197 -0
  238. package/dist/chunk-SYSDSINS.js +76 -0
  239. package/dist/chunk-T5XMAQAC.js +85 -0
  240. package/dist/chunk-TGHIBL4B.js +244 -0
  241. package/dist/chunk-TH22CNKK.js +70 -0
  242. package/dist/chunk-TJMNFB2W.js +58 -0
  243. package/dist/chunk-TWPNURFU.js +50 -0
  244. package/dist/chunk-U3PEZZ7D.js +712 -0
  245. package/dist/chunk-U76CXW3D.js +55 -0
  246. package/dist/chunk-UJUPYSVY.js +333 -0
  247. package/dist/chunk-UKVPGFD4.js +4318 -0
  248. package/dist/chunk-UVD2VXDC.js +127 -0
  249. package/dist/chunk-V6M2GKUD.js +89 -0
  250. package/dist/chunk-VD5NF6RG.js +348 -0
  251. package/dist/chunk-VFPBTJBN.js +58 -0
  252. package/dist/chunk-VIFBK7VL.js +510 -0
  253. package/dist/chunk-VNBHLJTU.js +76 -0
  254. package/dist/chunk-VO73AAFF.js +539 -0
  255. package/dist/chunk-VOZL5CBT.js +731 -0
  256. package/dist/chunk-WK2X6PE6.js +167 -0
  257. package/dist/chunk-WYU7FFTV.js +127 -0
  258. package/dist/chunk-WZLKGEUJ.js +510 -0
  259. package/dist/chunk-X46O77S4.js +630 -0
  260. package/dist/chunk-X6C2EL46.js +836 -0
  261. package/dist/chunk-XZ2KJ3OG.js +103 -0
  262. package/dist/chunk-Y2PCFIJE.js +345 -0
  263. package/dist/chunk-Y5OXHXCP.js +731 -0
  264. package/dist/chunk-YKRQXHXX.js +1352 -0
  265. package/dist/chunk-YMUH7TWT.js +382 -0
  266. package/dist/chunk-YO43YXZS.js +1076 -0
  267. package/dist/chunk-YWN6DKZJ.js +181 -0
  268. package/dist/chunk-Z42MXYWW.js +691 -0
  269. package/dist/chunk-Z75DAPMI.js +14219 -0
  270. package/dist/chunk-ZDCRV6PH.js +58 -0
  271. package/dist/chunk-ZDIKSXMV.js +58 -0
  272. package/dist/chunk-ZFU7SITA.js +284 -0
  273. package/dist/chunk-ZGBIUKNK.js +668 -0
  274. package/dist/chunk-ZJP3ZONM.js +3208 -0
  275. package/dist/chunk-ZLXATOXN.js +167 -0
  276. package/dist/chunk-ZM5WXR57.js +382 -0
  277. package/dist/chunk-ZQ4CBSJ3.js +171 -0
  278. package/dist/chunk-ZQXOZ4U2.js +14219 -0
  279. package/dist/chunk-ZTS2KRU5.js +333 -0
  280. package/dist/co-activation-PLLVFEDK.js +73 -0
  281. package/dist/co-occurrence-OIK6WLXN.js +94 -0
  282. package/dist/co-occurrence-QB4MQSY7.js +94 -0
  283. package/dist/code-context-index-CG4P2JZI.js +30 -0
  284. package/dist/conversation-entity-extractor-ZN3J4WGY.js +114 -0
  285. package/dist/core-memory-D3AWRAMA.js +110 -0
  286. package/dist/core-memory-JUTA3DWM.js +110 -0
  287. package/dist/core-memory-NW6GT543.js +110 -0
  288. package/dist/core-memory-TPY5XO3E.js +110 -0
  289. package/dist/crdt-sync-6GDTEJBT.js +33 -0
  290. package/dist/crm-webhook-2BYS65SZ.js +10 -0
  291. package/dist/crm-webhook-3AZQWNMQ.js +10 -0
  292. package/dist/crm-webhook-AUYAFOV3.js +10 -0
  293. package/dist/crm-webhook-VM72DSLW.js +10 -0
  294. package/dist/cto-delegation-gate-GQNNQON7.js +279 -0
  295. package/dist/cto-delegation-gate-LTI5OTGF.js +279 -0
  296. package/dist/cto-delegation-gate-Q2IIOK3T.js +279 -0
  297. package/dist/cto-delegation-gate-VVDKZGQ6.js +279 -0
  298. package/dist/daemon-orchestration-2ZD3N5AP.js +138 -0
  299. package/dist/daemon-orchestration-3J4K62I5.js +138 -0
  300. package/dist/daemon-orchestration-L47GDSJG.js +138 -0
  301. package/dist/daemon-orchestration-ZAQF437L.js +138 -0
  302. package/dist/db-backup-L64NT6GW.js +33 -0
  303. package/dist/doc-graph-extractor-7EXXBHN5.js +132 -0
  304. package/dist/doc-graph-extractor-M3G5IZAT.js +132 -0
  305. package/dist/dreaming-3CVAKE4O.js +33 -0
  306. package/dist/dreaming-DMKA2UH6.js +33 -0
  307. package/dist/dreaming-EP3WNLQ3.js +33 -0
  308. package/dist/dreaming-INJT3QVE.js +33 -0
  309. package/dist/entity-boost-DVQU26WN.js +375 -0
  310. package/dist/exe-drift-ZCUGNELY.js +69 -0
  311. package/dist/exe-export-5LKQALH2.js +75 -0
  312. package/dist/exe-export-7CME3MXT.js +75 -0
  313. package/dist/exe-export-GQMMQWON.js +75 -0
  314. package/dist/exe-export-Q5O2YADE.js +75 -0
  315. package/dist/exe-import-25AMCNVB.js +78 -0
  316. package/dist/exe-import-DMXDVIF2.js +78 -0
  317. package/dist/exe-import-EHJM6OZW.js +78 -0
  318. package/dist/exe-import-J6BPUDJ3.js +78 -0
  319. package/dist/exe-key-4SRZOC5W.js +580 -0
  320. package/dist/exe-key-5QK7VKBJ.js +580 -0
  321. package/dist/exe-key-GFLJRRHG.js +580 -0
  322. package/dist/exe-key-XWTYIY3B.js +580 -0
  323. package/dist/exe-snapshot-CR2AFYRP.js +337 -0
  324. package/dist/exe-snapshot-DWXKW6SC.js +337 -0
  325. package/dist/exe-snapshot-IYPOSAWY.js +337 -0
  326. package/dist/exe-snapshot-QIIQZXZM.js +337 -0
  327. package/dist/fast-db-init-BSUZIK6R.js +7 -0
  328. package/dist/fast-db-init-MAISJZ3L.js +7 -0
  329. package/dist/fast-db-init-WKK5SPFG.js +7 -0
  330. package/dist/fast-db-init-XZ6WHYNC.js +7 -0
  331. package/dist/gateway/index.js +8 -8
  332. package/dist/gateway-client-GRBOJQYC.js +11 -0
  333. package/dist/git-staleness-G7347RT3.js +111 -0
  334. package/dist/git-task-sweep-GGTGURJ6.js +41 -0
  335. package/dist/git-task-sweep-TQA4QTSM.js +41 -0
  336. package/dist/git-task-sweep-UCJ3KLDS.js +41 -0
  337. package/dist/git-task-sweep-XFX3OTBY.js +41 -0
  338. package/dist/global-procedures-3NYFIROX.js +21 -0
  339. package/dist/global-procedures-NOBNQDNA.js +21 -0
  340. package/dist/global-procedures-ZFIEDO7E.js +21 -0
  341. package/dist/gotrue-session-2IT7MDGW.js +171 -0
  342. package/dist/graph-auto-extract-HC576FNS.js +182 -0
  343. package/dist/graph-auto-extract-RMZT3EYN.js +182 -0
  344. package/dist/graph-rag-HFBYZF3M.js +31 -0
  345. package/dist/hooks/bug-report-worker.js +11 -11
  346. package/dist/hooks/codex-stop-task-finalizer.js +11 -11
  347. package/dist/hooks/commit-complete.js +11 -11
  348. package/dist/hooks/error-recall.js +7 -7
  349. package/dist/hooks/exe-heartbeat-hook.js +3 -3
  350. package/dist/hooks/ingest-worker.js +3 -3
  351. package/dist/hooks/ingest.js +6 -6
  352. package/dist/hooks/instructions-loaded.js +4 -4
  353. package/dist/hooks/manifest.json +20 -20
  354. package/dist/hooks/notification.js +4 -4
  355. package/dist/hooks/post-compact.js +10 -10
  356. package/dist/hooks/post-tool-combined.js +6 -6
  357. package/dist/hooks/pre-compact.js +14 -14
  358. package/dist/hooks/pre-tool-use.js +14 -14
  359. package/dist/hooks/prompt-submit.js +24 -24
  360. package/dist/hooks/session-end.js +19 -19
  361. package/dist/hooks/session-start.js +11 -11
  362. package/dist/hooks/stop.js +17 -17
  363. package/dist/hooks/subagent-stop.js +10 -10
  364. package/dist/hooks/summary-worker.js +18 -18
  365. package/dist/index.js +17 -17
  366. package/dist/installer-3QCLMBSY.js +297 -0
  367. package/dist/installer-6SAIKLV6.js +343 -0
  368. package/dist/installer-RN25LFX6.js +39 -0
  369. package/dist/lib/cloud-sync.js +4 -4
  370. package/dist/lib/consolidation.js +8 -8
  371. package/dist/lib/database.js +2 -2
  372. package/dist/lib/db-daemon-client.js +2 -2
  373. package/dist/lib/db.js +2 -2
  374. package/dist/lib/embedder.js +3 -3
  375. package/dist/lib/employee-templates.js +4 -4
  376. package/dist/lib/employees.js +2 -2
  377. package/dist/lib/exe-daemon-client.js +2 -2
  378. package/dist/lib/exe-daemon.js +41 -41
  379. package/dist/lib/hybrid-search.js +6 -6
  380. package/dist/lib/identity.js +2 -2
  381. package/dist/lib/keychain.js +1 -1
  382. package/dist/lib/messaging.js +9 -9
  383. package/dist/lib/reminders.js +3 -3
  384. package/dist/lib/schedules.js +6 -6
  385. package/dist/lib/session-registry.js +4 -4
  386. package/dist/lib/skill-learning.js +7 -7
  387. package/dist/lib/store.js +5 -5
  388. package/dist/lib/task-router.js +3 -3
  389. package/dist/lib/tasks.js +10 -10
  390. package/dist/lib/tmux-routing.js +8 -8
  391. package/dist/lib/token-spend.js +3 -3
  392. package/dist/lib/ws-client.js +1 -1
  393. package/dist/mcp/register-tools.js +63 -63
  394. package/dist/mcp/server.js +64 -64
  395. package/dist/mcp/tools/complete-reminder.js +4 -4
  396. package/dist/mcp/tools/create-reminder.js +4 -4
  397. package/dist/mcp/tools/create-task.js +12 -12
  398. package/dist/mcp/tools/deactivate-behavior.js +8 -8
  399. package/dist/mcp/tools/list-reminders.js +4 -4
  400. package/dist/mcp/tools/list-tasks.js +12 -12
  401. package/dist/mcp/tools/send-message.js +11 -11
  402. package/dist/mcp/tools/update-task.js +11 -11
  403. package/dist/mcp-http-config-YFZWGX4W.js +28 -0
  404. package/dist/memory-cards-AKXTAQZG.js +179 -0
  405. package/dist/memory-graph-extractor-O7KEZROX.js +21 -0
  406. package/dist/memory-graph-extractor-Q66O22GE.js +21 -0
  407. package/dist/memory-poisoning-defense-ADIGRTRJ.js +223 -0
  408. package/dist/memory-queue-client-4ZAOMEJR.js +16 -0
  409. package/dist/memory-reflection-RAWMCOLK.js +243 -0
  410. package/dist/message-queue-client-EDB46D6M.js +92 -0
  411. package/dist/notifications-JRKUMV4T.js +46 -0
  412. package/dist/notifications-MOTAHF7S.js +46 -0
  413. package/dist/notifications-SSRKYMKV.js +46 -0
  414. package/dist/notifications-XIMWAK7P.js +46 -0
  415. package/dist/orchestration-events-H6EZJEMV.js +26 -0
  416. package/dist/orchestrator-BCSQHCCZ.js +34 -0
  417. package/dist/orchestrator-J2EDJBWJ.js +34 -0
  418. package/dist/orchestrator-QODIF3U2.js +34 -0
  419. package/dist/orchestrator-W6AO4RZM.js +34 -0
  420. package/dist/pipeline-router-2IFHZ5KC.js +14 -0
  421. package/dist/pipeline-router-VCJCI5W7.js +14 -0
  422. package/dist/pipeline-router-VEP3NSZF.js +14 -0
  423. package/dist/pipeline-router-WV34UOJV.js +14 -0
  424. package/dist/plan-limits-IQK6XLCF.js +27 -0
  425. package/dist/project-boot-QWRBVBFG.js +299 -0
  426. package/dist/projection-worker-74KP2LHZ.js +1034 -0
  427. package/dist/projection-worker-GJ2M2BUF.js +1034 -0
  428. package/dist/projection-worker-HOLOWWX7.js +1034 -0
  429. package/dist/projection-worker-JEC7EM5Y.js +1034 -0
  430. package/dist/reranker-SIUVV2JD.js +19 -0
  431. package/dist/reranker-TEEWFPPU.js +19 -0
  432. package/dist/reranker-USWG7L7N.js +19 -0
  433. package/dist/reranker-VI3T6F2P.js +19 -0
  434. package/dist/retrieval-health-WIEQKVAV.js +7 -0
  435. package/dist/review-polling-DNBH4D7X.js +125 -0
  436. package/dist/review-polling-FAG2O7R4.js +125 -0
  437. package/dist/review-polling-RRD7IIEV.js +125 -0
  438. package/dist/review-polling-WVH6DK22.js +125 -0
  439. package/dist/runtime/index.js +11 -11
  440. package/dist/session-events-67N3ESQN.js +37 -0
  441. package/dist/session-events-NCPIQK5Q.js +37 -0
  442. package/dist/session-events-SF75L7NG.js +37 -0
  443. package/dist/session-events-VTP7KQQM.js +37 -0
  444. package/dist/session-kill-telemetry-5MTQD4JW.js +30 -0
  445. package/dist/session-scope-6QDWFFGE.js +87 -0
  446. package/dist/session-scope-FZ7CJ2PU.js +87 -0
  447. package/dist/session-scope-QGR72GYJ.js +87 -0
  448. package/dist/session-scope-YRJWFFQ5.js +87 -0
  449. package/dist/setup-wizard-2MGNOCDA.js +12 -0
  450. package/dist/setup-wizard-2ZHU6PBC.js +12 -0
  451. package/dist/setup-wizard-LGMBT5MA.js +12 -0
  452. package/dist/setup-wizard-MC6OYLSN.js +12 -0
  453. package/dist/skill-refinement-645HA6R7.js +158 -0
  454. package/dist/skill-refinement-6S5GJPBC.js +158 -0
  455. package/dist/skill-refinement-7M3OO2KL.js +158 -0
  456. package/dist/skill-refinement-HBS65LE7.js +158 -0
  457. package/dist/steward-gate-JSGYBZRR.js +14 -0
  458. package/dist/support-outbox-TIC66SRX.js +494 -0
  459. package/dist/support-outbox-YLXLMEKF.js +503 -0
  460. package/dist/task-enforcement-7CV4AMJY.js +439 -0
  461. package/dist/task-enforcement-BQ4L3T2J.js +439 -0
  462. package/dist/task-enforcement-L5EZK5MJ.js +439 -0
  463. package/dist/task-enforcement-S6KEUCL6.js +439 -0
  464. package/dist/task-scope-47VM3OGT.js +36 -0
  465. package/dist/task-scope-MONXB37O.js +36 -0
  466. package/dist/task-scope-RPYOVJOD.js +36 -0
  467. package/dist/task-scope-V6BS7L5C.js +36 -0
  468. package/dist/tasks-crud-AMWLBEJT.js +78 -0
  469. package/dist/tasks-crud-LD2WCC5Z.js +78 -0
  470. package/dist/tasks-crud-SMVAMAK7.js +78 -0
  471. package/dist/tasks-crud-UVSMJ7SQ.js +78 -0
  472. package/dist/tasks-notify-5KWFXJBA.js +39 -0
  473. package/dist/tasks-notify-6Q2CJIR5.js +39 -0
  474. package/dist/tasks-notify-FG2NXZP6.js +39 -0
  475. package/dist/tasks-notify-NBHN537I.js +39 -0
  476. package/dist/tasks-review-333PSSFU.js +48 -0
  477. package/dist/tasks-review-B6VOLVVZ.js +48 -0
  478. package/dist/tasks-review-MFD4VTZL.js +48 -0
  479. package/dist/tasks-review-MYPYFT6C.js +48 -0
  480. package/dist/telemetry-upload-45DH7FR7.js +740 -0
  481. package/dist/telemetry-upload-OSTVGOIS.js +740 -0
  482. package/dist/telemetry-upload-PNLXKL43.js +740 -0
  483. package/dist/telemetry-upload-QOKD4NUY.js +740 -0
  484. package/dist/token-budget-RJ2VKVYI.js +85 -0
  485. package/dist/tool-capability-index-ANXYTG5M.js +10 -0
  486. package/dist/tool-telemetry-W6I2BO5E.js +17 -0
  487. package/dist/tui/App.js +17 -17
  488. package/dist/tui-data-A6PDJW45.js +259 -0
  489. package/dist/tui-data-GOGDXQF5.js +259 -0
  490. package/dist/tui-data-VIY77WXK.js +259 -0
  491. package/dist/tui-data-YOZSLQMZ.js +259 -0
  492. package/dist/wiki-acl-Z5XZ6X4K.js +111 -0
  493. package/dist/worker-gate-34CD6WYY.js +21 -0
  494. package/dist/worker-gate-7T2DKS3A.js +21 -0
  495. package/dist/worker-gate-LN2IHRFB.js +21 -0
  496. package/dist/worker-gate-MQJTGE5N.js +21 -0
  497. package/dist/workflow-engine-KWAYDFUW.js +28 -0
  498. package/dist/workflow-engine-PXQ6N3C7.js +28 -0
  499. package/dist/workflow-engine-TECXAR65.js +28 -0
  500. package/dist/workflow-engine-UWEMT2OU.js +28 -0
  501. package/dist/worktree-5Q4VB2LR.js +27 -0
  502. package/dist/worktree-sweep-5KENYHYC.js +20 -0
  503. package/package.json +1 -1
  504. package/release-notes.json +87 -24
@@ -0,0 +1,363 @@
1
+ import {
2
+ PLATFORM_PROCEDURE_TITLES
3
+ } from "./chunk-VUH67PT4.js";
4
+ import {
5
+ getClient,
6
+ getIdentity,
7
+ listIdentities,
8
+ updateIdentity
9
+ } from "./chunk-ZJP3ZONM.js";
10
+ import {
11
+ atomicWriteJsonSync
12
+ } from "./chunk-LYH5HE24.js";
13
+
14
+ // src/lib/orchestration-package.ts
15
+ import { randomUUID } from "crypto";
16
+ import { copyFileSync, existsSync, mkdirSync, readFileSync } from "fs";
17
+ import os from "os";
18
+ import path from "path";
19
+ var PACKAGE_VERSION = "1.0";
20
+ var ROSTER_FILENAME = "exe-employees.json";
21
+ var ROSTER_BACKUP_FILENAME = "exe-employees.json.bak";
22
+ var EXE_OS_DIRNAME = ".exe-os";
23
+ var DEFAULT_BEHAVIOR_PRIORITY = "p1";
24
+ var DEFAULT_PROCEDURE_PRIORITY = "p0";
25
+ var DEFAULT_IDENTITY_UPDATED_BY = "orchestration-import";
26
+ function ensureObject(value, label) {
27
+ if (value == null || Array.isArray(value) || typeof value !== "object") {
28
+ throw new Error(`${label} must be an object`);
29
+ }
30
+ return value;
31
+ }
32
+ function ensureString(value, label) {
33
+ if (typeof value !== "string") {
34
+ throw new Error(`${label} must be a string`);
35
+ }
36
+ return value;
37
+ }
38
+ function ensureOptionalString(value, label) {
39
+ if (value == null) return void 0;
40
+ return ensureString(value, label);
41
+ }
42
+ function ensureNullableString(value, label) {
43
+ if (value == null) return null;
44
+ return ensureString(value, label);
45
+ }
46
+ function ensurePriority(value, label, fallback) {
47
+ if (value == null) return fallback;
48
+ if (value === "p0" || value === "p1" || value === "p2") {
49
+ return value;
50
+ }
51
+ throw new Error(`${label} must be one of: p0, p1, p2`);
52
+ }
53
+ function validateRosterEntry(value, index) {
54
+ const record = ensureObject(value, `roster[${index}]`);
55
+ return {
56
+ name: ensureString(record.name, `roster[${index}].name`),
57
+ role: ensureString(record.role, `roster[${index}].role`),
58
+ systemPrompt: ensureString(record.systemPrompt, `roster[${index}].systemPrompt`),
59
+ createdAt: typeof record.createdAt === "string" ? record.createdAt : "",
60
+ templateName: ensureOptionalString(record.templateName, `roster[${index}].templateName`),
61
+ templateVersion: typeof record.templateVersion === "number" ? record.templateVersion : void 0
62
+ };
63
+ }
64
+ function validateBehaviorEntry(value, index) {
65
+ const record = ensureObject(value, `behaviors[${index}]`);
66
+ return {
67
+ agent_id: ensureString(record.agent_id, `behaviors[${index}].agent_id`),
68
+ project_name: ensureNullableString(record.project_name, `behaviors[${index}].project_name`),
69
+ domain: ensureNullableString(record.domain, `behaviors[${index}].domain`),
70
+ content: ensureString(record.content, `behaviors[${index}].content`),
71
+ priority: ensurePriority(record.priority, `behaviors[${index}].priority`, DEFAULT_BEHAVIOR_PRIORITY)
72
+ };
73
+ }
74
+ function validateProcedureEntry(value, index) {
75
+ const record = ensureObject(value, `procedures[${index}]`);
76
+ return {
77
+ title: ensureString(record.title, `procedures[${index}].title`),
78
+ content: ensureString(record.content, `procedures[${index}].content`),
79
+ priority: ensurePriority(record.priority, `procedures[${index}].priority`, DEFAULT_PROCEDURE_PRIORITY),
80
+ domain: ensureNullableString(record.domain, `procedures[${index}].domain`)
81
+ };
82
+ }
83
+ function getRosterPath() {
84
+ return path.join(os.homedir(), EXE_OS_DIRNAME, ROSTER_FILENAME);
85
+ }
86
+ function getBackupPath() {
87
+ return path.join(os.homedir(), EXE_OS_DIRNAME, ROSTER_BACKUP_FILENAME);
88
+ }
89
+ function readRosterFile() {
90
+ const rosterPath = getRosterPath();
91
+ if (!existsSync(rosterPath)) return [];
92
+ const raw = readFileSync(rosterPath, "utf-8");
93
+ const parsed = JSON.parse(raw);
94
+ if (!Array.isArray(parsed)) {
95
+ throw new Error("Roster file must contain a JSON array");
96
+ }
97
+ return parsed.map((entry, index) => validateRosterEntry(entry, index));
98
+ }
99
+ function writeRosterFile(roster) {
100
+ if (roster.length === 0) {
101
+ throw new Error("Refusing to write empty roster \u2014 this would delete all employees");
102
+ }
103
+ const rosterPath = getRosterPath();
104
+ mkdirSync(path.dirname(rosterPath), { recursive: true });
105
+ if (existsSync(rosterPath)) {
106
+ const currentRoster = readRosterFile();
107
+ if (roster.length < currentRoster.length) {
108
+ throw new Error(
109
+ `Refusing to write roster with ${roster.length} entries \u2014 current roster has ${currentRoster.length}. Import would delete ${currentRoster.length - roster.length} employee(s). Use merge strategy instead, or add the missing entries to the package.`
110
+ );
111
+ }
112
+ copyFileSync(rosterPath, getBackupPath());
113
+ }
114
+ atomicWriteJsonSync(rosterPath, roster);
115
+ }
116
+ function buildImportedRosterEntries(roster, timestamp) {
117
+ return roster.map((entry) => ({
118
+ name: entry.name,
119
+ role: entry.role,
120
+ systemPrompt: entry.systemPrompt,
121
+ createdAt: timestamp,
122
+ ...entry.templateName != null ? { templateName: entry.templateName } : {},
123
+ ...entry.templateVersion != null ? { templateVersion: entry.templateVersion } : {}
124
+ }));
125
+ }
126
+ async function insertBehaviors(behaviors, timestamp) {
127
+ const client = getClient();
128
+ for (const behavior of behaviors) {
129
+ await client.execute({
130
+ sql: `INSERT INTO behaviors (id, agent_id, project_name, domain, priority, content, active, created_at, updated_at)
131
+ VALUES (?, ?, ?, ?, ?, ?, 1, ?, ?)`,
132
+ args: [
133
+ randomUUID(),
134
+ behavior.agent_id,
135
+ behavior.project_name,
136
+ behavior.domain,
137
+ behavior.priority,
138
+ behavior.content,
139
+ timestamp,
140
+ timestamp
141
+ ]
142
+ });
143
+ }
144
+ return behaviors.length;
145
+ }
146
+ async function insertProcedures(procedures, timestamp, options) {
147
+ const client = getClient();
148
+ const skipTitles = options?.skipTitles ?? /* @__PURE__ */ new Set();
149
+ let inserted = 0;
150
+ for (const procedure of procedures) {
151
+ if (skipTitles.has(procedure.title) || PLATFORM_PROCEDURE_TITLES.has(procedure.title)) {
152
+ continue;
153
+ }
154
+ await client.execute({
155
+ sql: `INSERT INTO company_procedures (id, title, content, priority, domain, active, created_at, updated_at)
156
+ VALUES (?, ?, ?, ?, ?, 1, ?, ?)`,
157
+ args: [
158
+ randomUUID(),
159
+ procedure.title,
160
+ procedure.content,
161
+ procedure.priority,
162
+ procedure.domain,
163
+ timestamp,
164
+ timestamp
165
+ ]
166
+ });
167
+ skipTitles.add(procedure.title);
168
+ inserted += 1;
169
+ }
170
+ return inserted;
171
+ }
172
+ async function replaceBehaviorsAndProcedures(behaviors, procedures, timestamp) {
173
+ const client = getClient();
174
+ const existingBehaviors = await client.execute({
175
+ sql: "SELECT agent_id, content FROM behaviors WHERE active = 1",
176
+ args: []
177
+ });
178
+ const existingBehaviorKeys = new Set(
179
+ existingBehaviors.rows.map((row) => `${String(row.agent_id)}::${String(row.content)}`)
180
+ );
181
+ const newBehaviors = behaviors.filter(
182
+ (b) => !existingBehaviorKeys.has(`${b.agent_id}::${b.content}`)
183
+ );
184
+ const existingProcedureTitles = await getActiveProcedureTitles();
185
+ return {
186
+ behaviors: await insertBehaviors(newBehaviors, timestamp),
187
+ procedures: await insertProcedures(procedures, timestamp, { skipTitles: existingProcedureTitles })
188
+ };
189
+ }
190
+ async function mergeRosterEntries(importedRoster, timestamp) {
191
+ const currentRoster = readRosterFile();
192
+ const existingNames = new Set(currentRoster.map((entry) => entry.name.toLowerCase()));
193
+ const additions = buildImportedRosterEntries(
194
+ importedRoster.filter((entry) => !existingNames.has(entry.name.toLowerCase())),
195
+ timestamp
196
+ );
197
+ if (additions.length > 0) {
198
+ writeRosterFile([...currentRoster, ...additions]);
199
+ }
200
+ return additions.length;
201
+ }
202
+ async function replaceRosterEntries(importedRoster, timestamp) {
203
+ const currentRoster = readRosterFile();
204
+ const importedByName = new Map(
205
+ buildImportedRosterEntries(importedRoster, timestamp).map((entry) => [entry.name.toLowerCase(), entry])
206
+ );
207
+ const merged = currentRoster.map((existing) => {
208
+ const imported = importedByName.get(existing.name.toLowerCase());
209
+ if (imported) {
210
+ importedByName.delete(existing.name.toLowerCase());
211
+ return imported;
212
+ }
213
+ return existing;
214
+ });
215
+ for (const newEntry of importedByName.values()) {
216
+ merged.push(newEntry);
217
+ }
218
+ writeRosterFile(merged);
219
+ return importedRoster.length;
220
+ }
221
+ async function importIdentities(identities, updatedBy) {
222
+ const entries = Object.entries(identities);
223
+ let imported = 0;
224
+ for (const [agentId, content] of entries) {
225
+ const existing = getIdentity(agentId);
226
+ if (existing?.raw) {
227
+ continue;
228
+ }
229
+ await updateIdentity(agentId, content, updatedBy);
230
+ imported += 1;
231
+ }
232
+ return imported;
233
+ }
234
+ async function getActiveProcedureTitles() {
235
+ const client = getClient();
236
+ const result = await client.execute({
237
+ sql: "SELECT title FROM company_procedures WHERE active = 1",
238
+ args: []
239
+ });
240
+ return new Set(result.rows.map((row) => String(row.title)));
241
+ }
242
+ async function exportOrchestration(createdBy) {
243
+ const client = getClient();
244
+ const roster = readRosterFile().map((entry) => ({
245
+ ...entry,
246
+ createdAt: ""
247
+ }));
248
+ const identities = {};
249
+ for (const identitySummary of listIdentities()) {
250
+ const identity = getIdentity(identitySummary.agentId);
251
+ if (identity?.raw) {
252
+ identities[identitySummary.agentId] = identity.raw;
253
+ }
254
+ }
255
+ const behaviorResult = await client.execute({
256
+ sql: "SELECT agent_id, project_name, domain, content, priority FROM behaviors WHERE active = 1",
257
+ args: []
258
+ });
259
+ const procedureResult = await client.execute({
260
+ sql: "SELECT title, content, priority, domain FROM company_procedures WHERE active = 1",
261
+ args: []
262
+ });
263
+ const behaviors = behaviorResult.rows.map((row) => ({
264
+ agent_id: String(row.agent_id),
265
+ project_name: row.project_name == null ? null : String(row.project_name),
266
+ domain: row.domain == null ? null : String(row.domain),
267
+ content: String(row.content),
268
+ priority: ensurePriority(row.priority, "behaviors.priority", DEFAULT_BEHAVIOR_PRIORITY)
269
+ }));
270
+ const procedures = procedureResult.rows.map((row) => ({
271
+ title: String(row.title),
272
+ content: String(row.content),
273
+ priority: ensurePriority(row.priority, "procedures.priority", DEFAULT_PROCEDURE_PRIORITY),
274
+ domain: row.domain == null ? null : String(row.domain)
275
+ })).filter((procedure) => !PLATFORM_PROCEDURE_TITLES.has(procedure.title));
276
+ return {
277
+ version: PACKAGE_VERSION,
278
+ created_by: createdBy,
279
+ created_at: (/* @__PURE__ */ new Date()).toISOString(),
280
+ roster,
281
+ identities,
282
+ behaviors,
283
+ procedures
284
+ };
285
+ }
286
+ async function importOrchestration(pkg, strategy) {
287
+ const validated = validatePackage(pkg);
288
+ const timestamp = (/* @__PURE__ */ new Date()).toISOString();
289
+ const updatedBy = validated.created_by || DEFAULT_IDENTITY_UPDATED_BY;
290
+ const rosterCount = strategy === "replace" ? await replaceRosterEntries(validated.roster, timestamp) : await mergeRosterEntries(validated.roster, timestamp);
291
+ const identityCount = await importIdentities(validated.identities, updatedBy);
292
+ if (strategy === "replace") {
293
+ const replaced = await replaceBehaviorsAndProcedures(
294
+ validated.behaviors,
295
+ validated.procedures,
296
+ timestamp
297
+ );
298
+ return {
299
+ imported: {
300
+ roster: rosterCount,
301
+ identities: identityCount,
302
+ behaviors: replaced.behaviors,
303
+ procedures: replaced.procedures
304
+ }
305
+ };
306
+ }
307
+ const existingProcedureTitles = await getActiveProcedureTitles();
308
+ const behaviorCount = await insertBehaviors(validated.behaviors, timestamp);
309
+ const procedureCount = await insertProcedures(
310
+ validated.procedures,
311
+ timestamp,
312
+ { skipTitles: existingProcedureTitles }
313
+ );
314
+ return {
315
+ imported: {
316
+ roster: rosterCount,
317
+ identities: identityCount,
318
+ behaviors: behaviorCount,
319
+ procedures: procedureCount
320
+ }
321
+ };
322
+ }
323
+ function validatePackage(data) {
324
+ const record = ensureObject(data, "package");
325
+ const version = ensureString(record.version, "version");
326
+ if (version !== PACKAGE_VERSION) {
327
+ throw new Error(`Unsupported orchestration package version: ${version}`);
328
+ }
329
+ if (!Array.isArray(record.roster)) {
330
+ throw new Error("roster is required and must be an array");
331
+ }
332
+ if (record.identities == null || Array.isArray(record.identities) || typeof record.identities !== "object") {
333
+ throw new Error("identities is required and must be an object");
334
+ }
335
+ if (!Array.isArray(record.behaviors)) {
336
+ throw new Error("behaviors is required and must be an array");
337
+ }
338
+ if (!Array.isArray(record.procedures)) {
339
+ throw new Error("procedures is required and must be an array");
340
+ }
341
+ const identities = Object.entries(record.identities).reduce(
342
+ (acc, [agentId, content]) => {
343
+ acc[agentId] = ensureString(content, `identities.${agentId}`);
344
+ return acc;
345
+ },
346
+ {}
347
+ );
348
+ return {
349
+ version: PACKAGE_VERSION,
350
+ created_by: ensureString(record.created_by, "created_by"),
351
+ created_at: ensureString(record.created_at, "created_at"),
352
+ roster: record.roster.map((entry, index) => validateRosterEntry(entry, index)),
353
+ identities,
354
+ behaviors: record.behaviors.map((entry, index) => validateBehaviorEntry(entry, index)),
355
+ procedures: record.procedures.map((entry, index) => validateProcedureEntry(entry, index))
356
+ };
357
+ }
358
+
359
+ export {
360
+ exportOrchestration,
361
+ importOrchestration,
362
+ validatePackage
363
+ };
@@ -0,0 +1,97 @@
1
+ import {
2
+ listBehaviors
3
+ } from "./chunk-74YEBPGM.js";
4
+ import {
5
+ loadConfigSync
6
+ } from "./chunk-T3B5RK4H.js";
7
+
8
+ // src/lib/behaviors-export.ts
9
+ import os from "os";
10
+ import path from "path";
11
+ import {
12
+ existsSync,
13
+ mkdirSync,
14
+ readdirSync,
15
+ statSync,
16
+ unlinkSync,
17
+ writeFileSync
18
+ } from "fs";
19
+ var BEHAVIORS_EXPORT_DIR = path.join(
20
+ os.homedir(),
21
+ ".exe-os",
22
+ "behaviors-export"
23
+ );
24
+ var STALE_EXPORT_AGE_MS = 60 * 60 * 1e3;
25
+ var DEFAULT_BEHAVIOR_LIMIT = 30;
26
+ function getBehaviorLimit() {
27
+ try {
28
+ const cfg = loadConfigSync();
29
+ return cfg.behaviorExportLimit ?? DEFAULT_BEHAVIOR_LIMIT;
30
+ } catch {
31
+ return DEFAULT_BEHAVIOR_LIMIT;
32
+ }
33
+ }
34
+ function sweepStaleBehaviorExports(now = Date.now()) {
35
+ if (!existsSync(BEHAVIORS_EXPORT_DIR)) return;
36
+ let entries;
37
+ try {
38
+ entries = readdirSync(BEHAVIORS_EXPORT_DIR);
39
+ } catch {
40
+ return;
41
+ }
42
+ for (const entry of entries) {
43
+ const filePath = path.join(BEHAVIORS_EXPORT_DIR, entry);
44
+ try {
45
+ const stat = statSync(filePath);
46
+ if (now - stat.mtimeMs > STALE_EXPORT_AGE_MS) {
47
+ unlinkSync(filePath);
48
+ }
49
+ } catch {
50
+ }
51
+ }
52
+ }
53
+ function renderBehaviorLine(row) {
54
+ const tag = row.domain ? `[${row.domain}] ` : "";
55
+ const scope = row.project_name ? ` (${row.project_name})` : "";
56
+ return `- ${tag}${row.content}${scope}`;
57
+ }
58
+ function renderBehaviorExport(behaviors) {
59
+ if (behaviors.length === 0) {
60
+ return "";
61
+ }
62
+ const lines = behaviors.map(renderBehaviorLine);
63
+ return [
64
+ "<system-reminder>",
65
+ "## Your Behavioral Memory",
66
+ "Validated patterns and corrections for this session. Follow them.",
67
+ "Sourced from exe-os Layer 2 (Expertise). Changes apply on next spawn.",
68
+ "",
69
+ ...lines,
70
+ "</system-reminder>",
71
+ ""
72
+ ].join("\n");
73
+ }
74
+ function exportFilePath(agentId, projectName, sessionKey) {
75
+ if (!sessionKey) {
76
+ return path.join(BEHAVIORS_EXPORT_DIR, `${agentId}.md`);
77
+ }
78
+ const safeProject = projectName.replace(/[^a-zA-Z0-9_-]/g, "_");
79
+ return path.join(
80
+ BEHAVIORS_EXPORT_DIR,
81
+ `${agentId}-${safeProject}-${sessionKey}.md`
82
+ );
83
+ }
84
+ async function exportBehaviorsForAgent(agentId, projectName, sessionKey) {
85
+ mkdirSync(BEHAVIORS_EXPORT_DIR, { recursive: true });
86
+ sweepStaleBehaviorExports();
87
+ const behaviors = await listBehaviors(agentId, projectName, getBehaviorLimit());
88
+ if (behaviors.length === 0) return null;
89
+ const body = renderBehaviorExport(behaviors);
90
+ const target = exportFilePath(agentId, projectName, sessionKey);
91
+ writeFileSync(target, body, "utf-8");
92
+ return target;
93
+ }
94
+
95
+ export {
96
+ exportBehaviorsForAgent
97
+ };
@@ -0,0 +1,171 @@
1
+ import {
2
+ writeMemoryViaDaemon
3
+ } from "./chunk-U76CXW3D.js";
4
+
5
+ // src/lib/auto-checkpoint.ts
6
+ var FILE_RE = /(?:^|\s)([\w./-]+\.(?:ts|tsx|js|jsx|json|md|yml|yaml|sql|go|py|css|scss|html|sh))(?:\b|$)/g;
7
+ var DECISION_RE = /\b(decision:|decided:|we decided|founder directive|captured in .*architecture|source of truth)\b/i;
8
+ function asString(value, fallback = "") {
9
+ if (value == null) return fallback;
10
+ return String(value);
11
+ }
12
+ function compactLine(text, max = 220) {
13
+ return text.replace(/\s+/g, " ").trim().slice(0, max);
14
+ }
15
+ function topEntries(counts, limit) {
16
+ return [...counts.entries()].sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0])).slice(0, limit).map(([name, count]) => `${name}(${count})`);
17
+ }
18
+ function buildAutoCheckpoint(input) {
19
+ const maxSamples = input.maxSamples ?? 8;
20
+ const projectCounts = /* @__PURE__ */ new Map();
21
+ const toolCounts = /* @__PURE__ */ new Map();
22
+ const files = /* @__PURE__ */ new Set();
23
+ const errors = [];
24
+ const samples = [];
25
+ const decisionTexts = [];
26
+ for (const row of input.memories) {
27
+ const tool = asString(row.tool_name, "unknown");
28
+ const project = asString(row.project_name, input.projectName || "unknown");
29
+ const raw = asString(row.raw_text);
30
+ const hasError = row.has_error === 1 || row.has_error === true;
31
+ toolCounts.set(tool, (toolCounts.get(tool) ?? 0) + 1);
32
+ projectCounts.set(project, (projectCounts.get(project) ?? 0) + 1);
33
+ if (hasError && errors.length < 5) errors.push(compactLine(raw, 180));
34
+ if (samples.length < maxSamples && raw.length > 30) {
35
+ samples.push(`[${tool}] ${compactLine(raw)}`);
36
+ }
37
+ if (DECISION_RE.test(raw) && decisionTexts.length < 5) {
38
+ decisionTexts.push(`AUTO DECISION CANDIDATE [${input.agentId}]: ${compactLine(raw, 500)}`);
39
+ }
40
+ for (const match of raw.matchAll(FILE_RE)) {
41
+ if (match[1]) files.add(match[1]);
42
+ if (files.size >= 20) break;
43
+ }
44
+ }
45
+ const taskLines = (input.tasks ?? []).slice(0, 10).map((task) => {
46
+ const status = asString(task.status, "unknown");
47
+ const priority = asString(task.priority, "?").toUpperCase();
48
+ const title = asString(task.title, "untitled");
49
+ const taskFile = asString(task.task_file);
50
+ return `- [${status}/${priority}] ${title}${taskFile ? ` (${taskFile})` : ""}`;
51
+ });
52
+ const parts = [
53
+ `CONTEXT CHECKPOINT [auto:${input.reason}]`,
54
+ `Agent: ${input.agentId} (${input.agentRole})`,
55
+ `Session: ${input.sessionId}`,
56
+ `Project: ${input.projectName}`,
57
+ `Time: ${(/* @__PURE__ */ new Date()).toISOString()}`,
58
+ "",
59
+ "## Recent Activity",
60
+ `- Memories scanned: ${input.memories.length}`,
61
+ `- Projects: ${topEntries(projectCounts, 5).join(", ") || input.projectName}`,
62
+ `- Tools: ${topEntries(toolCounts, 8).join(", ") || "none"}`
63
+ ];
64
+ if (taskLines.length > 0) {
65
+ parts.push("", "## Open / Active Tasks", ...taskLines);
66
+ }
67
+ if (files.size > 0) {
68
+ parts.push("", "## Files Mentioned", ...[...files].slice(0, 20).map((f) => `- ${f}`));
69
+ }
70
+ if (samples.length > 0) {
71
+ parts.push("", "## Important Recent Traces", ...samples.map((s) => `- ${s}`));
72
+ }
73
+ if (errors.length > 0) {
74
+ parts.push("", "## Errors / Risks", ...errors.map((e) => `- ${e}`));
75
+ }
76
+ if (decisionTexts.length > 0) {
77
+ parts.push("", "## Decision Candidates", ...decisionTexts.map((d) => `- ${d.replace(/^AUTO DECISION CANDIDATE \\[[^\\]]+\\]: /, "")}`));
78
+ }
79
+ return {
80
+ checkpointText: parts.join("\n"),
81
+ decisionTexts
82
+ };
83
+ }
84
+
85
+ // src/lib/checkpoint-orchestrator.ts
86
+ function toolNameForReason(reason) {
87
+ switch (reason) {
88
+ case "periodic":
89
+ return "auto-summary";
90
+ case "session-end":
91
+ return "SessionEnd";
92
+ case "pre-compact":
93
+ return "pre-compact-hook";
94
+ case "capacity-signal":
95
+ return "auto-checkpoint";
96
+ }
97
+ }
98
+ function importanceForReason(reason, override) {
99
+ if (override !== void 0) return override;
100
+ switch (reason) {
101
+ case "periodic":
102
+ return 7;
103
+ case "session-end":
104
+ case "pre-compact":
105
+ case "capacity-signal":
106
+ return 8;
107
+ }
108
+ }
109
+ function buildContinuityCheckpoint(input) {
110
+ const { checkpointText, decisionTexts } = buildAutoCheckpoint({
111
+ agentId: input.agentId,
112
+ agentRole: input.agentRole,
113
+ sessionId: input.sessionId,
114
+ projectName: input.projectName,
115
+ reason: input.reason,
116
+ memories: input.memories ?? [],
117
+ tasks: input.tasks ?? [],
118
+ maxSamples: input.maxSamples
119
+ });
120
+ const extra = input.extraSections?.filter((section) => section.trim().length > 0) ?? [];
121
+ return {
122
+ checkpointText: extra.length > 0 ? `${checkpointText}
123
+
124
+ ${extra.join("\n\n")}` : checkpointText,
125
+ decisionTexts
126
+ };
127
+ }
128
+ async function writeContinuityCheckpoint(input) {
129
+ const result = buildContinuityCheckpoint(input);
130
+ const now = (/* @__PURE__ */ new Date()).toISOString();
131
+ await writeMemoryViaDaemon({
132
+ raw_text: result.checkpointText,
133
+ agent_id: input.agentId,
134
+ agent_role: input.agentRole,
135
+ session_id: input.sessionId,
136
+ tool_name: toolNameForReason(input.reason),
137
+ project_name: input.projectName,
138
+ timestamp: now,
139
+ importance: importanceForReason(input.reason, input.importance),
140
+ task_id: input.taskId,
141
+ memory_type: "checkpoint"
142
+ });
143
+ const decisionLimit = input.reason === "periodic" ? 3 : 5;
144
+ for (const decisionText of result.decisionTexts.slice(0, decisionLimit)) {
145
+ await writeMemoryViaDaemon({
146
+ raw_text: decisionText,
147
+ agent_id: input.agentId,
148
+ agent_role: input.agentRole,
149
+ session_id: input.sessionId,
150
+ tool_name: "auto-decision",
151
+ project_name: input.projectName,
152
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
153
+ importance: 8,
154
+ memory_type: "decision"
155
+ });
156
+ }
157
+ return result;
158
+ }
159
+ async function checkpointActiveTask(input) {
160
+ const { writeCheckpoint } = await import("./lib/tasks.js");
161
+ await writeCheckpoint({
162
+ taskId: input.taskId,
163
+ step: input.step ?? "pre-compaction-checkpoint",
164
+ contextSummary: `Auto-checkpoint before context compaction. Task: ${input.taskTitle}. Session: ${input.sessionId}. Project: ${input.projectName}.`
165
+ });
166
+ }
167
+
168
+ export {
169
+ writeContinuityCheckpoint,
170
+ checkpointActiveTask
171
+ };