@askexenow/exe-os 0.9.384 → 0.9.389
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.
- package/deploy/compose/.env.askexe-control-plane.example +6 -0
- package/deploy/compose/.env.customer.example +1 -1
- package/deploy/compose/.env.example +1 -1
- package/deploy/compose/docker-compose.yml +16 -0
- package/deploy/compose/generate-env.ts +1 -1
- package/deploy/compose/sso-edge/sso-redirect.conf +18 -3
- package/deploy/stack-manifests/v0.9.json +1160 -1
- package/dist/.dist-verified.json +3 -3
- package/dist/{active-agent-F5V4E4UL.js → active-agent-RZ24KSJN.js} +8 -6
- package/dist/{active-agent-YTBB4ZQM.js → active-agent-YWSWPIEA.js} +8 -6
- package/dist/{agent-defs-generator-7TFISIJQ.js → agent-defs-generator-GY3UBREJ.js} +8 -6
- package/dist/{agent-heartbeat-CQPGJIFF.js → agent-heartbeat-GUVUUQVM.js} +1 -1
- package/dist/{agent-loop-EZ7LDAGD.js → agent-loop-HPNCH3HK.js} +1 -1
- package/dist/{agentic-ontology-XVTUVV7W.js → agentic-ontology-RHYNXEKE.js} +1 -1
- package/dist/{artifact-backup-TF6YWQT2.js → artifact-backup-HGUFSIJH.js} +19 -6
- package/dist/{backfill-metadata-J6MXIDCW.js → backfill-metadata-XLFASEOD.js} +11 -9
- package/dist/{backup-verify-6DVBQMDP.js → backup-verify-TUQEICWA.js} +1 -1
- package/dist/{behavior-injection-XDA7ZCYN.js → behavior-injection-GXO7ERGN.js} +14 -12
- package/dist/{behavior-promotion-4VLQ7LXK.js → behavior-promotion-V63WIZ4N.js} +13 -11
- package/dist/{behaviors-SCCZP7RZ.js → behaviors-RMLDPLOF.js} +18 -11
- package/dist/bin/agentic-ontology-backfill.js +12 -10
- package/dist/bin/agentic-reflection-backfill.js +13 -11
- package/dist/bin/agentic-semantic-label.js +12 -10
- package/dist/bin/backfill-conversations.js +11 -9
- package/dist/bin/backfill-responses.js +11 -9
- package/dist/bin/backfill-vectors.js +13 -11
- package/dist/bin/bulk-sync-postgres.js +20 -18
- package/dist/bin/cc-doctor.js +15 -13
- package/dist/bin/cleanup-stale-review-tasks.js +44 -32
- package/dist/bin/cli.js +109 -30
- package/dist/bin/customer-readiness.js +55 -25
- package/dist/bin/deferred-daemon-restart.js +111 -108
- package/dist/bin/exe-actions.js +7 -1
- package/dist/bin/exe-agent-config.js +8 -6
- package/dist/bin/exe-agent.js +18 -16
- package/dist/bin/exe-assign.js +13 -11
- package/dist/bin/exe-boot.js +49 -47
- package/dist/bin/exe-call.js +9 -7
- package/dist/bin/exe-cicd.js +19 -8
- package/dist/bin/exe-cloud.js +59 -25
- package/dist/bin/exe-config-dump.js +8 -6
- package/dist/bin/exe-dispatch.js +23 -21
- package/dist/bin/exe-doctor.js +11 -8
- package/dist/bin/exe-export-behaviors.js +16 -14
- package/dist/bin/exe-forget.js +14 -12
- package/dist/bin/exe-gateway.js +12 -10
- package/dist/bin/exe-grant.js +6 -6
- package/dist/bin/exe-healthcheck.js +15 -13
- package/dist/bin/exe-heartbeat.js +28 -26
- package/dist/bin/exe-kill.js +28 -26
- package/dist/bin/exe-launch-agent.js +35 -33
- package/dist/bin/exe-mcp.js +9 -7
- package/dist/bin/exe-memory-reads.js +11 -9
- package/dist/bin/exe-new-employee.js +13 -11
- package/dist/bin/exe-os-mcp-proxy.js +9 -7
- package/dist/bin/exe-pending-messages.js +23 -21
- package/dist/bin/exe-pending-notifications.js +22 -20
- package/dist/bin/exe-pending-reviews.js +23 -21
- package/dist/bin/exe-preflight.js +1 -1
- package/dist/bin/exe-rename.js +9 -7
- package/dist/bin/exe-review.js +59 -55
- package/dist/bin/exe-search-quality.js +16 -3
- package/dist/bin/exe-search.js +13 -11
- package/dist/bin/exe-session-cleanup.js +29 -27
- package/dist/bin/exe-settings.js +22 -20
- package/dist/bin/exe-start-codex.js +23 -21
- package/dist/bin/exe-start-opencode.js +21 -19
- package/dist/bin/exe-status.js +24 -22
- package/dist/bin/exe-support.js +3 -3
- package/dist/bin/exe-team.js +8 -6
- package/dist/bin/exe-verify-running-images.js +644 -17
- package/dist/bin/git-sweep.js +24 -22
- package/dist/bin/graph-backfill.js +12 -10
- package/dist/bin/graph-export.js +12 -10
- package/dist/bin/hooks-cli.js +4 -4
- package/dist/bin/import-history.js +16 -14
- package/dist/bin/install.js +113 -110
- package/dist/bin/intercom-check.js +5 -5
- package/dist/bin/mcp-sessions.js +2 -2
- package/dist/bin/orchestration-metrics.js +8 -6
- package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
- package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
- package/dist/bin/pre-build-guard.js +55 -16
- package/dist/bin/pre-publish.js +1 -1
- package/dist/bin/prune-orphan-chunks.js +154 -28
- package/dist/bin/reconcile-backlog.js +5 -3
- package/dist/bin/registry-proxy.js +1 -1
- package/dist/bin/repair-document-chunks.js +11 -9
- package/dist/bin/scan-tasks.js +23 -21
- package/dist/bin/setup.js +3 -3
- package/dist/bin/shard-migrate.js +12 -10
- package/dist/bin/stack-update.js +622 -43
- package/dist/bin/verify-stack.js +2 -2
- package/dist/bin/vps-health-gate.js +1 -1
- package/dist/{boot-generation-Q7LGQ3AO.js → boot-generation-VCQXVYGT.js} +7 -5
- package/dist/{boot-review-sections-G5774FR5.js → boot-review-sections-3QO6Q7MP.js} +21 -19
- package/dist/{branch-hygiene-44WLSOZR.js → branch-hygiene-DDXXI6ZA.js} +59 -21
- package/dist/bug-landed-reconciler-TQVNOUCU.js +353 -0
- package/dist/build-manifest.json +1269 -1194
- package/dist/{capability-cards-I3RHCF4F.js → capability-cards-XPDLT6LU.js} +6 -4
- package/dist/{capacity-monitor-7I7GDONU.js → capacity-monitor-N3AW242L.js} +23 -21
- package/dist/{catchup-brief-3T5PARIR.js → catchup-brief-3PKX7FUP.js} +29 -27
- package/dist/{chunk-C5ISP5FO.js → chunk-2BKJAOO4.js} +11 -1
- package/dist/{chunk-JJTPPAZY.js → chunk-2CUQHG6H.js} +1609 -1356
- package/dist/{chunk-HU3VD4MQ.js → chunk-2Q2GGYBX.js} +1 -1
- package/dist/{chunk-CHIUS5QB.js → chunk-36LMIOVU.js} +9 -9
- package/dist/{chunk-46VSBDUW.js → chunk-3DCBDG4T.js} +2 -2
- package/dist/{chunk-W3KPQE7H.js → chunk-3GL3E4TD.js} +3 -3
- package/dist/{chunk-GL47M7NY.js → chunk-3UD3OF3X.js} +202 -117
- package/dist/{chunk-WNBZJSQT.js → chunk-3VW5ZP2F.js} +1 -1
- package/dist/{chunk-JDDM6C57.js → chunk-3X74IQBU.js} +1 -1
- package/dist/{chunk-NVFNADTX.js → chunk-3ZL4MDQ6.js} +18 -4
- package/dist/{chunk-R5E7WNAC.js → chunk-4ESNDGMB.js} +3 -3
- package/dist/{chunk-CYCIX7AW.js → chunk-4FLLIQRQ.js} +2 -2
- package/dist/{chunk-3RGTLZNO.js → chunk-4GAKF7KR.js} +99 -74
- package/dist/{chunk-RVO5O5SR.js → chunk-4S3A52AV.js} +38 -10
- package/dist/{chunk-7J2ZQ4XN.js → chunk-4VQ3QR6B.js} +29 -28
- package/dist/{chunk-MROSARM5.js → chunk-5BJBTFFQ.js} +7 -1
- package/dist/chunk-5LQZABW5.js +6 -0
- package/dist/chunk-5ONMHTNI.js +236 -0
- package/dist/{chunk-APL7HUE3.js → chunk-5QQJUO3F.js} +200 -31
- package/dist/{chunk-UOPCVFVR.js → chunk-5RK75SWH.js} +205 -278
- package/dist/{chunk-T5FEAQES.js → chunk-5TYJYGS5.js} +1 -1
- package/dist/{chunk-P3QQ52QK.js → chunk-5U6EOTZV.js} +3 -3
- package/dist/{chunk-ALRHGEAJ.js → chunk-637FL62O.js} +1 -1
- package/dist/{chunk-PUBA5B4M.js → chunk-6L4VIYLZ.js} +33 -19
- package/dist/{chunk-VF2KRROX.js → chunk-754P2UXM.js} +1 -1
- package/dist/{chunk-CM7N5MBY.js → chunk-7FZG7WP4.js} +5 -5
- package/dist/{chunk-NYLJQ2M2.js → chunk-7NEBFB3L.js} +4 -4
- package/dist/{chunk-E7C2WNR5.js → chunk-AEIOFFFX.js} +5 -5
- package/dist/{chunk-VOVFUKEB.js → chunk-AIB2EWO2.js} +5 -5
- package/dist/{chunk-EGOEB42T.js → chunk-AP2C4OGS.js} +3 -3
- package/dist/{chunk-MPZ2AVNS.js → chunk-ATNV3BVZ.js} +1 -1
- package/dist/{chunk-F4BBMIPG.js → chunk-B4XJQBQB.js} +2 -2
- package/dist/{chunk-BPVFZ6Q4.js → chunk-B5EGDNG6.js} +2 -2
- package/dist/{chunk-AGC2V7JS.js → chunk-B6CBN6EF.js} +1 -1
- package/dist/{chunk-KTKIFXIP.js → chunk-B7FDRN7G.js} +1 -1
- package/dist/{chunk-C5HUMAA7.js → chunk-B7WVYLAQ.js} +67 -15
- package/dist/chunk-BGVP5RMT.js +185 -0
- package/dist/{chunk-FVLNNNH6.js → chunk-BNI4LIU5.js} +35 -4
- package/dist/{chunk-P4XLIPB7.js → chunk-BU5JRLZT.js} +1 -1
- package/dist/{chunk-PHUHIVD5.js → chunk-C6U7XWOC.js} +34 -5
- package/dist/chunk-C7GHNJPW.js +8 -0
- package/dist/{chunk-4AR5XKCH.js → chunk-CL2MU3OX.js} +1 -1
- package/dist/{chunk-ZPP63JSQ.js → chunk-CL3AB7Z2.js} +1 -1
- package/dist/{chunk-FHIFTSPL.js → chunk-CP7XUSOF.js} +8 -3
- package/dist/{chunk-3OX34OC3.js → chunk-CUDNRHHT.js} +30 -10
- package/dist/chunk-CYUUNIEL.js +21 -0
- package/dist/{chunk-P2UY34XE.js → chunk-D4C57S2H.js} +5 -5
- package/dist/{chunk-XSUALA32.js → chunk-DDYFNBYV.js} +3 -3
- package/dist/{chunk-LSNBTGW4.js → chunk-DPYZW42H.js} +1 -1
- package/dist/{chunk-FMIYFHLE.js → chunk-E2PRXEZK.js} +9 -3
- package/dist/{chunk-L63V25HS.js → chunk-E54SPUYJ.js} +3 -3
- package/dist/{chunk-DMUOTCDN.js → chunk-E5CKRHIZ.js} +1 -1
- package/dist/{chunk-BV2IET6B.js → chunk-EVMOKRBC.js} +15 -2
- package/dist/{chunk-YLFCH3VA.js → chunk-FDWI3T6I.js} +133 -31
- package/dist/{chunk-PWC3C5ME.js → chunk-FNJTCJGY.js} +4 -4
- package/dist/{chunk-TNS63ATU.js → chunk-FWRPDSO3.js} +350 -50
- package/dist/{chunk-JA3Y5TV6.js → chunk-GDLB6BPM.js} +141 -74
- package/dist/{chunk-IGJMS7C5.js → chunk-GOVGG7HU.js} +2 -2
- package/dist/{chunk-MB47DRF5.js → chunk-GP7CTIUK.js} +2 -2
- package/dist/{chunk-L5EPGGDP.js → chunk-GWAN2BDB.js} +4 -4
- package/dist/{chunk-YRQ26MNP.js → chunk-H3YF7X4J.js} +12 -5
- package/dist/{chunk-VLBHZ6TF.js → chunk-H6PLIFUE.js} +2 -2
- package/dist/{chunk-GSLFH4AI.js → chunk-HRNM3N4Y.js} +6 -15
- package/dist/chunk-IG2ISRTF.js +48 -0
- package/dist/{chunk-MWEIBVBS.js → chunk-IJCWBYA5.js} +14 -1
- package/dist/{chunk-NKEFYE4R.js → chunk-IPTUKX3N.js} +1 -1
- package/dist/{chunk-RB3J2WYQ.js → chunk-IVE7H6KA.js} +1 -1
- package/dist/{chunk-HA63SH5W.js → chunk-IWY2OGQG.js} +1 -1
- package/dist/{chunk-BQEZPRUC.js → chunk-IZWMWJZT.js} +64 -46
- package/dist/{chunk-AHESD3KW.js → chunk-J4UVI652.js} +1 -1
- package/dist/{chunk-PLII76NJ.js → chunk-JBUCA4OX.js} +33 -6
- package/dist/{chunk-2PZTMSMG.js → chunk-JOF4HQDF.js} +5 -5
- package/dist/{chunk-OBBO6EJR.js → chunk-JQN3QGSF.js} +1 -1
- package/dist/{chunk-P4PIZOL2.js → chunk-JWYIH5DR.js} +3 -3
- package/dist/{chunk-3XY57PKT.js → chunk-KZLKE7I3.js} +210 -48
- package/dist/{chunk-DYVLEMKS.js → chunk-L3GXMYBK.js} +1 -1
- package/dist/{chunk-72V3S44T.js → chunk-LUA4SLJY.js} +46 -19
- package/dist/{chunk-ZT4LFTUJ.js → chunk-LW3JCBXP.js} +20 -3
- package/dist/{chunk-YLB365YX.js → chunk-M5XHN4OM.js} +3 -3
- package/dist/{chunk-VHHX4UCP.js → chunk-MDTWARSF.js} +22 -93
- package/dist/{chunk-JFJP6ATJ.js → chunk-MWKXQSF6.js} +3 -2
- package/dist/{chunk-VJEJ7JNB.js → chunk-N32DVIKY.js} +1 -1
- package/dist/{chunk-MUCNYSJP.js → chunk-NRLJOV7M.js} +32 -4
- package/dist/{chunk-PL4CFSQ7.js → chunk-NSXJOSH7.js} +1 -1
- package/dist/{chunk-NF5FOSLD.js → chunk-NVTG66CK.js} +1 -1
- package/dist/chunk-O45GBJEH.js +1500 -0
- package/dist/{chunk-4AAMFWJT.js → chunk-OHZSTZXN.js} +4 -2
- package/dist/chunk-OSIS7ZQW.js +344 -0
- package/dist/{chunk-E3ZM32LF.js → chunk-P22VFGFK.js} +14 -5
- package/dist/{chunk-KILR4FBR.js → chunk-PAFLR7WD.js} +3 -3
- package/dist/{chunk-R3CZWFFC.js → chunk-PEYQ6MWO.js} +15 -3
- package/dist/{chunk-RDWIKDMY.js → chunk-PZR54BEI.js} +8 -20
- package/dist/{chunk-2FKU4ZEO.js → chunk-QDBKMEYY.js} +9 -9
- package/dist/{chunk-7UHZBVP3.js → chunk-QDVLVLXP.js} +97 -31
- package/dist/{chunk-PRDDPQLC.js → chunk-QLXEQRHD.js} +5 -5
- package/dist/{chunk-MUAWCFW6.js → chunk-QNPDXV5V.js} +5 -2
- package/dist/{chunk-LR5O2XWZ.js → chunk-QUZYLDNJ.js} +5 -5
- package/dist/chunk-RBQUXHYK.js +48 -0
- package/dist/{chunk-3SUPEE6H.js → chunk-RDMBSHGG.js} +3 -3
- package/dist/{chunk-I5XIW2BP.js → chunk-RGUM474V.js} +7 -7
- package/dist/{chunk-OAFENIHN.js → chunk-RJ67XAJU.js} +76 -28
- package/dist/{chunk-LFUBEHFW.js → chunk-RT57D7C4.js} +39 -1
- package/dist/{chunk-MKM6D7JM.js → chunk-RWG7DLOG.js} +42 -5
- package/dist/{chunk-P3UX5EH4.js → chunk-RWKAHHIX.js} +3 -3
- package/dist/{chunk-XEBKIWI7.js → chunk-RYNT3HB7.js} +12 -12
- package/dist/{chunk-EUGEFBGV.js → chunk-S2V272KJ.js} +3 -3
- package/dist/{chunk-W6BZ4UGA.js → chunk-SGYEM2PD.js} +1 -1
- package/dist/{chunk-VROK4X2L.js → chunk-SJP57MQM.js} +1 -1
- package/dist/{chunk-5MVKTNZP.js → chunk-SL4JWAMQ.js} +54 -4
- package/dist/{chunk-MOANZQXF.js → chunk-SLMKLEU6.js} +1 -1
- package/dist/{chunk-RZN2LEAK.js → chunk-SQA7XCYI.js} +3 -3
- package/dist/{chunk-4YNA3CM6.js → chunk-SSFS4NCH.js} +262 -56
- package/dist/{chunk-6FIC57PH.js → chunk-T4P2G3PO.js} +1 -1
- package/dist/{chunk-5U2IJBFV.js → chunk-TA3B4N24.js} +1 -1
- package/dist/{chunk-ZOTTYCP5.js → chunk-TEWWBVQP.js} +40 -4
- package/dist/{chunk-SDYWZRPN.js → chunk-TLSFGXXE.js} +1 -1
- package/dist/{chunk-L3VUW5M4.js → chunk-TQS2YHLB.js} +1 -1
- package/dist/{chunk-KXYKSLW4.js → chunk-TU4M757W.js} +399 -116
- package/dist/{chunk-MC4IM2CC.js → chunk-TYD4F4XU.js} +6 -6
- package/dist/{chunk-TKS5GMYA.js → chunk-U44Y7RC7.js} +2 -0
- package/dist/{chunk-B7AMNZTC.js → chunk-UKBPEEEQ.js} +2 -2
- package/dist/{chunk-ZBPZDADW.js → chunk-UWVXQEQQ.js} +467 -78
- package/dist/{chunk-P2VVMGMI.js → chunk-V4WH3FV7.js} +35 -16
- package/dist/{worktree-ownership-guard-O6JQF2CL.js → chunk-V6F4I2XY.js} +13 -14
- package/dist/{chunk-JFTUAV4J.js → chunk-VBKUESIW.js} +1 -1
- package/dist/{chunk-AZSTIAVL.js → chunk-VBPYYJPC.js} +1 -1
- package/dist/{chunk-LKTN22L6.js → chunk-VIP4LKLO.js} +57 -24
- package/dist/{chunk-L5CGXEZC.js → chunk-WAAGVFFN.js} +63 -71
- package/dist/{chunk-D3LXVAIQ.js → chunk-WC7AE3PT.js} +244 -103
- package/dist/{chunk-EOTZSAQL.js → chunk-WUCUDHKR.js} +1 -1
- package/dist/{chunk-VF3BZOZK.js → chunk-X7HZHKY4.js} +50 -3
- package/dist/{chunk-LFBLQE2P.js → chunk-XCAKYVKI.js} +1 -1
- package/dist/{chunk-UXN4BICC.js → chunk-XMX5J52Z.js} +1 -1
- package/dist/{chunk-6YDY6ZTD.js → chunk-XTCXGWTV.js} +9 -4
- package/dist/{chunk-XUZK23V7.js → chunk-XW2FW6LS.js} +2 -2
- package/dist/{chunk-CH7BUBP3.js → chunk-XWVHUDEK.js} +5 -4
- package/dist/{chunk-S26CV7BE.js → chunk-YA5LK6KB.js} +45 -8
- package/dist/{chunk-ELCRJGCH.js → chunk-YMRQIENV.js} +2 -2
- package/dist/{chunk-QNZ4562V.js → chunk-Z3LXWCB7.js} +1 -1
- package/dist/{chunk-EYMFVITZ.js → chunk-Z7I6NQMA.js} +2 -2
- package/dist/{chunk-6BJCDWSM.js → chunk-ZB4FS2EG.js} +1 -1
- package/dist/{chunk-ZAEUEDTN.js → chunk-ZD6FZ3WL.js} +1 -1
- package/dist/{chunk-FEU6QEEL.js → chunk-ZM6EZAVY.js} +1 -0
- package/dist/{chunk-2KY7WZZF.js → chunk-ZPA4R2UI.js} +1 -1
- package/dist/chunk-ZPPPHVSU.js +285 -0
- package/dist/{chunk-ELEGH4DX.js → chunk-ZUGQPYUY.js} +51 -4
- package/dist/{chunk-UX2EO653.js → chunk-ZZWFZ46U.js} +66 -8
- package/dist/{cleanup-graph-garbage-VQAJ2RBT.js → cleanup-graph-garbage-HFUD5ZQT.js} +12 -10
- package/dist/{cloud-sync-command-J7NEFUY7.js → cloud-sync-command-3JHJJKPN.js} +25 -3
- package/dist/{cloud-sync-db-init-KWEMNMGA.js → cloud-sync-db-init-2LHIQOSF.js} +1 -1
- package/dist/{cloud-sync-shutdown-P63AUTUI.js → cloud-sync-shutdown-ZXAXA3Z7.js} +6 -4
- package/dist/{cloud-sync-state-QF3TMMJ4.js → cloud-sync-state-VSQFGPP6.js} +1 -1
- package/dist/{co-activation-7IHRPBZN.js → co-activation-NX4EH4AP.js} +6 -4
- package/dist/{co-occurrence-R5AG4OAU.js → co-occurrence-5LBYCW3U.js} +10 -8
- package/dist/{consent-passphrase-5ZBDJ5G7.js → consent-passphrase-65W3DJIJ.js} +2 -2
- package/dist/{content-extractor-ZLXC6GNR.js → content-extractor-OGXETBOX.js} +2 -2
- package/dist/{conversation-entity-extractor-7FRKLLBD.js → conversation-entity-extractor-FQCOAH4F.js} +5 -4
- package/dist/conversations-retention-XTBFJBUM.js +166 -0
- package/dist/{crdt-sync-IFRZOEIS.js → crdt-sync-7TDUBTLH.js} +4 -4
- package/dist/{crm-webhook-L2S63ASV.js → crm-webhook-776JTY55.js} +2 -2
- package/dist/{cto-delegation-gate-3WU7OHX7.js → cto-delegation-gate-ZNUWVYCN.js} +25 -23
- package/dist/{daemon-orchestration-3VQYKLOR.js → daemon-orchestration-76BOFDEP.js} +30 -24
- package/dist/{doc-graph-extractor-YIR5E7OF.js → doc-graph-extractor-F724KZJX.js} +10 -8
- package/dist/{documents-QEHPTYIY.js → documents-Q24V4GRD.js} +13 -11
- package/dist/{dreaming-LNFE7DTN.js → dreaming-IY6NQTSP.js} +27 -25
- package/dist/{employee-boot-brief-ZTXDYNWM.js → employee-boot-brief-CCTXO5DQ.js} +35 -29
- package/dist/{entity-boost-R5N6JWXD.js → entity-boost-XGOB7HDM.js} +1 -1
- package/dist/{exe-drift-WYSJVZFO.js → exe-drift-NEPXLNGP.js} +7 -5
- package/dist/{exe-export-GOLNAEAV.js → exe-export-ZHJQFKR2.js} +14 -12
- package/dist/{exe-import-U4BSI6OH.js → exe-import-7SVNI4FW.js} +14 -12
- package/dist/{exe-key-V42G3NGO.js → exe-key-QJKU56WZ.js} +119 -108
- package/dist/{exe-org-U4GLQ6OP.js → exe-org-SJXHLV6K.js} +76 -51
- package/dist/{exe-snapshot-U7ONBYNY.js → exe-snapshot-EFWPXTXE.js} +45 -36
- package/dist/{fast-db-init-W3NGKAEU.js → fast-db-init-BQZOQNT3.js} +1 -1
- package/dist/{founder-context-ZSIBRVDM.js → founder-context-KG2ZAOXY.js} +2 -2
- package/dist/{founder-monitor-envelope-L3IWZLFY.js → founder-monitor-envelope-NYB5LLU4.js} +4 -4
- package/dist/gateway/index.js +20 -18
- package/dist/{gateway-client-DJFCVIPT.js → gateway-client-ODMUXUL3.js} +1 -1
- package/dist/{git-staleness-OF24QXFZ.js → git-staleness-OPGEAJA7.js} +6 -4
- package/dist/{global-procedures-WSIOWO43.js → global-procedures-3KXY4LL6.js} +8 -6
- package/dist/{graph-auto-extract-IEVVN3L3.js → graph-auto-extract-I7H2F5NJ.js} +10 -8
- package/dist/{graph-query-JDZWAVCU.js → graph-query-E7JBSNY5.js} +1 -1
- package/dist/{graph-rag-BKAD2XQA.js → graph-rag-H24CMFP2.js} +5 -4
- package/dist/{hook-integrity-TPWDGX2M.js → hook-integrity-PGQ3OX4S.js} +1 -1
- package/dist/{hook-prefetch-FD6VGJJA.js → hook-prefetch-7AZJER6Z.js} +23 -21
- package/dist/hook-registration-liveness-NGQRFKAA.js +11 -0
- package/dist/hooks/bug-report-worker.js +26 -24
- package/dist/hooks/codex-stop-task-finalizer.js +28 -26
- package/dist/hooks/commit-complete.js +26 -24
- package/dist/hooks/error-recall.js +16 -14
- package/dist/hooks/exe-heartbeat-hook.js +9 -7
- package/dist/hooks/ingest-worker.js +12 -10
- package/dist/hooks/ingest.js +22 -17
- package/dist/hooks/instructions-loaded.js +11 -9
- package/dist/hooks/manifest.json +20 -20
- package/dist/hooks/notification.js +10 -8
- package/dist/hooks/post-compact.js +9 -7
- package/dist/hooks/post-tool-combined.js +14 -14
- package/dist/hooks/pre-compact.js +26 -24
- package/dist/hooks/pre-tool-use.js +2 -2
- package/dist/hooks/prompt-submit.js +47 -41
- package/dist/hooks/session-end.js +38 -42
- package/dist/hooks/session-start.js +26 -18
- package/dist/hooks/stop.js +29 -27
- package/dist/hooks/subagent-stop.js +29 -27
- package/dist/hooks/summary-worker.js +32 -30
- package/dist/index.js +37 -35
- package/dist/{installer-OTI5SA43.js → installer-2ZS3LHCU.js} +12 -9
- package/dist/{installer-NMOBSEZ2.js → installer-NH3A3HWC.js} +14 -9
- package/dist/{installer-SRJGE4GU.js → installer-UJ73PGRD.js} +21 -9
- package/dist/{intercom-queue-4FFXCBHO.js → intercom-queue-OE25GJF2.js} +21 -19
- package/dist/lib/agent-config.js +2 -2
- package/dist/lib/cloud-sync.js +24 -18
- package/dist/lib/consolidation.js +13 -11
- package/dist/lib/crypto.js +3 -3
- package/dist/lib/database.js +6 -4
- package/dist/lib/db-backup.js +1 -1
- package/dist/lib/db-write-worker-client.js +3 -1
- package/dist/lib/db-write-worker.js +65 -89
- package/dist/lib/db.js +6 -4
- package/dist/lib/delivery-truth.js +5 -1
- package/dist/lib/device-registry.js +1 -1
- package/dist/lib/embedder.js +2 -2
- package/dist/lib/employee-templates.js +9 -7
- package/dist/lib/employees.js +6 -4
- package/dist/lib/exe-daemon.js +425 -314
- package/dist/lib/file-grep.js +15 -21
- package/dist/lib/hybrid-search.js +19 -13
- package/dist/lib/identity-templates.js +1 -1
- package/dist/lib/identity.js +6 -4
- package/dist/lib/keychain.js +1 -1
- package/dist/lib/license.js +22 -6
- package/dist/lib/messaging.js +22 -20
- package/dist/lib/post-tool-memory.js +10 -8
- package/dist/lib/registry-proxy.js +1 -1
- package/dist/lib/reminders.js +7 -5
- package/dist/lib/runtime-table.js +1 -1
- package/dist/lib/schedules.js +12 -10
- package/dist/lib/session-registry.js +8 -6
- package/dist/lib/skill-learning.js +13 -11
- package/dist/lib/status-brief.js +2 -2
- package/dist/lib/store.js +17 -9
- package/dist/lib/task-router.js +7 -5
- package/dist/lib/tasks.js +23 -21
- package/dist/lib/tmux-routing.js +21 -19
- package/dist/lib/tmux-status.js +4 -1
- package/dist/lib/token-spend.js +7 -5
- package/dist/lib/ws-client.js +1 -1
- package/dist/{license-gate-R4JWTWM4.js → license-gate-XQ2KN5I5.js} +3 -3
- package/dist/{license-recheck-3MBJ4IJX.js → license-recheck-IIBKR2V5.js} +1 -1
- package/dist/{license-sync-BVSG3WMW.js → license-sync-76JVI2M5.js} +151 -8
- package/dist/{local-secret-inventory-JWNBHZZ4.js → local-secret-inventory-MJT7NJLY.js} +2 -2
- package/dist/{mailbox-inbox-MTAT4MXX.js → mailbox-inbox-BPZP4GIZ.js} +1 -1
- package/dist/maintenance-worker-54VZTFIK.js +371 -0
- package/dist/mcp/register-tools.js +110 -107
- package/dist/mcp/server.js +113 -110
- package/dist/mcp/tools/complete-reminder.js +8 -6
- package/dist/mcp/tools/create-reminder.js +8 -6
- package/dist/mcp/tools/create-task.js +26 -24
- package/dist/mcp/tools/deactivate-behavior.js +15 -13
- package/dist/mcp/tools/list-reminders.js +8 -6
- package/dist/mcp/tools/list-tasks.js +26 -24
- package/dist/mcp/tools/send-message.js +25 -23
- package/dist/mcp/tools/update-task.js +24 -22
- package/dist/{mcp-child-registry-TIZERM7O.js → mcp-child-registry-5VUG5ATZ.js} +1 -1
- package/dist/{mcp-http-config-VUMSFWFH.js → mcp-http-config-SKXESWHA.js} +9 -7
- package/dist/{mcp-session-identity-DZHWEJRV.js → mcp-session-identity-HYMLJXXA.js} +21 -19
- package/dist/{memory-cards-JVXTMSAT.js → memory-cards-PAZDUQ3B.js} +16 -32
- package/dist/{memory-graph-extractor-PPBJMYFJ.js → memory-graph-extractor-BC6QKBY6.js} +11 -9
- package/dist/{memory-poisoning-defense-K5Q74XQ4.js → memory-poisoning-defense-BRGIHF6J.js} +9 -7
- package/dist/{memory-pressure-watchdog-YMJH5CSA.js → memory-pressure-watchdog-HR6TPOMT.js} +22 -20
- package/dist/{memory-reflection-7BZWIHRE.js → memory-reflection-LO7VFBL3.js} +38 -59
- package/dist/memory-write-repository-J25USX63.js +16 -0
- package/dist/{monitor-grants-Q7X3MYQP.js → monitor-grants-YQTO6NWR.js} +3 -3
- package/dist/{monitor-identity-ZQB4IXEE.js → monitor-identity-POVTG76Y.js} +2 -2
- package/dist/{notification-ledger-XRAXL5OI.js → notification-ledger-KLD6GZTG.js} +22 -20
- package/dist/{notifications-JE3PX55X.js → notifications-3R6HNHDR.js} +21 -19
- package/dist/{orchestration-events-JCQ5F5IJ.js → orchestration-events-CHY3GOJD.js} +7 -5
- package/dist/{orchestrator-X65INDTR.js → orchestrator-GAL3HOAD.js} +23 -21
- package/dist/{org-brief-session-3PQ22UIX.js → org-brief-session-LQ2DBYVF.js} +17 -15
- package/dist/{org-consent-policy-VGELJ7K7.js → org-consent-policy-KFUP7QPG.js} +5 -5
- package/dist/{org-join-6TO5ZYUZ.js → org-join-MXZCIQWX.js} +8 -8
- package/dist/{org-key-admin-XHYVRRAZ.js → org-key-admin-4UK6QUT7.js} +9 -9
- package/dist/{org-key-pin-TTTYGTQL.js → org-key-pin-ZOX4OM3O.js} +3 -3
- package/dist/{org-membership-Y7T2BS57.js → org-membership-D5TPN45F.js} +4 -4
- package/dist/{org-partner-config-OP4NEUNF.js → org-partner-config-3FXSYPQA.js} +7 -7
- package/dist/{org-partner-runtime-YNVUNT2R.js → org-partner-runtime-TH3LMPII.js} +20 -16
- package/dist/{org-row-visibility-JBBXNYXD.js → org-row-visibility-Y5R33C5U.js} +1 -1
- package/dist/{pipeline-router-EIBB7QNG.js → pipeline-router-E2JZLDK6.js} +7 -5
- package/dist/{plan-limits-MEWXYLEN.js → plan-limits-NYI6R4IK.js} +9 -7
- package/dist/{platform-procedures-Z7ZGBJWN.js → platform-procedures-RTD5E3BD.js} +5 -3
- package/dist/{pre-tool-use-impl-C6KJY22W.js → pre-tool-use-impl-LT4FRXBP.js} +127 -83
- package/dist/{project-boot-VEYFCCSL.js → project-boot-LIMXQKAF.js} +25 -17
- package/dist/{project-name-UYORSNGE.js → project-name-V62GWALX.js} +7 -5
- package/dist/{projection-worker-WYFDWS57.js → projection-worker-KLE3IZQ2.js} +5 -2
- package/dist/{prospective-memory-E6XBQFJA.js → prospective-memory-HRN7JFT2.js} +6 -4
- package/dist/{push-notifications-M7YU63FY.js → push-notifications-XC6EQEXF.js} +22 -20
- package/dist/{reproject-worktree-memories-B5XMGJSD.js → reproject-worktree-memories-4CAVZSFE.js} +21 -19
- package/dist/{reranker-SRA4BR7N.js → reranker-2RU6IIX2.js} +1 -1
- package/dist/{retrieval-health-P2JPZUPV.js → retrieval-health-4Q5TOV2S.js} +1 -1
- package/dist/{review-polling-KQPN7IQE.js → review-polling-WOWIMBCL.js} +22 -20
- package/dist/runtime/index.js +30 -28
- package/dist/{session-events-6LDDKKY3.js → session-events-OPMS2C5F.js} +22 -20
- package/dist/{session-kill-telemetry-5DSRGWCL.js → session-kill-telemetry-3GWATSIX.js} +22 -20
- package/dist/{session-scope-XG5R3P3D.js → session-scope-TIRGR4MH.js} +21 -19
- package/dist/{setup-wizard-7QFLZIKT.js → setup-wizard-B2JBVGNH.js} +3 -3
- package/dist/{shard-manager-HHHHV2KZ.js → shard-manager-C7LYX6E4.js} +5 -1
- package/dist/{skill-refinement-I5RMAHSC.js → skill-refinement-FWQFYNBI.js} +7 -5
- package/dist/skill-retrieval-PPLFC5RY.js +166 -0
- package/dist/skill-usage-NDB67PU2.js +25 -0
- package/dist/{stack-generate-manifest-AKMZ3AUX.js → stack-generate-manifest-AXI55MEQ.js} +6 -6
- package/dist/{stack-promote-34CE2HHF.js → stack-promote-6N23OGZY.js} +6 -6
- package/dist/stack-release-2CXFYVWM.js +2770 -0
- package/dist/{stack-update-ZQQ5YYPJ.js → stack-update-U53FBVCQ.js} +13 -5
- package/dist/{steward-gate-AQJ6KT2C.js → steward-gate-TUA3QCN7.js} +7 -5
- package/dist/{subagent-brief-injection-3GU7YAWY.js → subagent-brief-injection-N52RWYFZ.js} +34 -32
- package/dist/{subagent-spawn-ledger-52I66CLW.js → subagent-spawn-ledger-OI23OT4I.js} +1 -1
- package/dist/support-bug-actions-XWCJI6S5.js +30 -0
- package/dist/support-inbox-MMVTCXRX.js +77 -0
- package/dist/{support-outbox-KNI3FR3G.js → support-outbox-2TG2UV6J.js} +2 -2
- package/dist/{task-enforcement-CAA6D2MH.js → task-enforcement-JDMBAAOY.js} +22 -20
- package/dist/{task-request-inbox-QBZVU66E.js → task-request-inbox-PKJCYKJV.js} +9 -5
- package/dist/{task-scope-NHXB4ZRN.js → task-scope-32HQEV6W.js} +27 -19
- package/dist/{tasks-crud-JHSWL5NM.js → tasks-crud-CYKUKS3F.js} +21 -19
- package/dist/{tasks-notify-7PBE4U7T.js → tasks-notify-YND5MKWJ.js} +22 -20
- package/dist/{tasks-review-PPPVEE62.js → tasks-review-CG2A5GM3.js} +23 -19
- package/dist/{telemetry-upload-YU2VRNHX.js → telemetry-upload-WLUMEFAB.js} +11 -9
- package/dist/{token-budget-QCMWKG3K.js → token-budget-3YHAY5LL.js} +7 -5
- package/dist/{tool-capability-index-7AWQAJRP.js → tool-capability-index-2ADOWH43.js} +2 -2
- package/dist/{tool-gates-5Q3RSQEG.js → tool-gates-7ENOOYMR.js} +5 -3
- package/dist/{tool-gates-QD26D2NE.js → tool-gates-EKJTLVGN.js} +1 -1
- package/dist/{tool-telemetry-LTOIC64I.js → tool-telemetry-VUP7S6HC.js} +1 -1
- package/dist/tui/App.js +59 -35
- package/dist/{tui-data-NDBXD6U7.js → tui-data-BOQTOW2G.js} +25 -23
- package/dist/{update-support-BMJM4NG7.js → update-support-WT3S3AQ4.js} +21 -21
- package/dist/{whatsapp-QQLDAHUX.js → whatsapp-OZGIF2EM.js} +2 -2
- package/dist/{wiki-acl-W6WDCVCP.js → wiki-acl-LTEQJVDA.js} +1 -1
- package/dist/{work-claims-6DM32MGO.js → work-claims-CMV2GWIW.js} +8 -6
- package/dist/{work-state-heartbeat-HG7D4AWJ.js → work-state-heartbeat-S45TXK4M.js} +1 -1
- package/dist/{worker-gate-FTMW7GBB.js → worker-gate-7Z6NMM3G.js} +1 -1
- package/dist/{workflow-engine-ZWC6CCXE.js → workflow-engine-ZSQDXZQ7.js} +2 -2
- package/dist/{worktree-EMQCPGFE.js → worktree-NMWDVT6N.js} +8 -6
- package/dist/worktree-ownership-guard-ZVIWJAOP.js +35 -0
- package/dist/{worktree-sweep-XVUJZBXV.js → worktree-sweep-Q62ZIT3U.js} +9 -7
- package/package.json +14 -8
- package/release-notes.json +7 -41
- package/src/commands/exe/afk.md +6 -0
- package/src/commands/exe/call.md +6 -0
- package/src/commands/exe/employee-heartbeat.md +6 -0
- package/src/commands/exe/intercom.md +6 -0
- package/src/commands/exe/kill.md +6 -0
- package/src/commands/exe/launch.md +6 -0
- package/src/commands/exe/logs.md +1 -1
- package/src/commands/exe/sessions.md +6 -0
- package/src/commands/exe/setup.md +7 -3
- package/src/commands/exe/status.md +6 -0
- package/src/commands/exe-reference.md +25 -36
- package/src/commands/exe.md +19 -28
- package/stack.release.json +11 -11
- package/dist/chunk-3B6FLNLV.js +0 -30
- package/dist/chunk-FXU7JOXK.js +0 -6
- package/dist/chunk-QFAFKEB5.js +0 -820
- package/dist/conversations-retention-C4BLKFEL.js +0 -54
- package/dist/stack-release-5PGWV5D4.js +0 -1607
- package/dist/support-inbox-NY5TB3FN.js +0 -51
- /package/dist/{chunk-U2D6PJ5T.js → chunk-65G7ZTGE.js} +0 -0
- /package/dist/{chunk-DN3ZR3UE.js → chunk-CP7Z35MJ.js} +0 -0
- /package/dist/{chunk-XDVOGDBC.js → chunk-KBBWALJV.js} +0 -0
- /package/dist/{chunk-JRIH6I7D.js → chunk-LZXYPTY4.js} +0 -0
- /package/dist/{chunk-GIRD7O5X.js → chunk-MCWEW2SG.js} +0 -0
- /package/dist/{chunk-TKAU7IJ2.js → chunk-MQHUJLCA.js} +0 -0
- /package/dist/{chunk-M4XY4JRK.js → chunk-O53LTOXK.js} +0 -0
- /package/dist/{chunk-DZN7SDY2.js → chunk-OSVTH3SG.js} +0 -0
- /package/dist/{chunk-AJK2PVQW.js → chunk-QXXEXGX3.js} +0 -0
- /package/dist/{chunk-AWWDKF22.js → chunk-SFWNTO2F.js} +0 -0
- /package/dist/{chunk-2Q2CD6CD.js → chunk-WC5HF2FN.js} +0 -0
- /package/dist/{core-memory-O6D5UC3T.js → core-memory-MMMW3TF3.js} +0 -0
- /package/dist/{memory-isolation-EBFFC6HF.js → memory-isolation-67ACKQ2M.js} +0 -0
- /package/dist/{oauth-server-ZKBUHDFI.js → oauth-server-OILIKR7D.js} +0 -0
package/dist/lib/exe-daemon.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CLOUD_SYNC_EXIT_PARTIAL
|
|
3
|
+
} from "../chunk-5LQZABW5.js";
|
|
1
4
|
import {
|
|
2
5
|
RESTART_BREAKER_THRESHOLD,
|
|
3
6
|
readBreakerAlert,
|
|
@@ -6,12 +9,16 @@ import {
|
|
|
6
9
|
restartBreakerAlertPath,
|
|
7
10
|
writeDaemonExitBreadcrumb
|
|
8
11
|
} from "../chunk-7INEFMVU.js";
|
|
12
|
+
import {
|
|
13
|
+
decideSweepSkip,
|
|
14
|
+
readHostLoadSignal
|
|
15
|
+
} from "../chunk-CYUUNIEL.js";
|
|
9
16
|
import {
|
|
10
17
|
isDbVerifyStampFresh
|
|
11
18
|
} from "../chunk-SVFNWBLF.js";
|
|
12
19
|
import {
|
|
13
20
|
pushNotifyAsync
|
|
14
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-MWKXQSF6.js";
|
|
15
22
|
import {
|
|
16
23
|
disposeDbWriteWorker,
|
|
17
24
|
isDbWriteWorkerReady,
|
|
@@ -20,7 +27,7 @@ import {
|
|
|
20
27
|
sweepConversationsRetentionInWorker,
|
|
21
28
|
sweepSessionEventsRetentionInWorker,
|
|
22
29
|
writeMemoryInWorker
|
|
23
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-PEYQ6MWO.js";
|
|
24
31
|
import {
|
|
25
32
|
shouldScheduleDaemonRestartHandoff
|
|
26
33
|
} from "../chunk-FXZ6VGFW.js";
|
|
@@ -42,12 +49,12 @@ import {
|
|
|
42
49
|
getMcpToolFamily,
|
|
43
50
|
inferMcpRuntime,
|
|
44
51
|
recordMcpHttpEvent
|
|
45
|
-
} from "../chunk-
|
|
52
|
+
} from "../chunk-ZM6EZAVY.js";
|
|
46
53
|
import {
|
|
47
54
|
hasPendingCloudSyncSlice,
|
|
48
55
|
readCloudSyncState,
|
|
49
56
|
writeCloudSyncState
|
|
50
|
-
} from "../chunk-
|
|
57
|
+
} from "../chunk-IJCWBYA5.js";
|
|
51
58
|
import {
|
|
52
59
|
deserializeArgs,
|
|
53
60
|
serializeResultSet
|
|
@@ -56,18 +63,17 @@ import {
|
|
|
56
63
|
resolveEmbeddingsEnabled
|
|
57
64
|
} from "../chunk-KWOAM7TA.js";
|
|
58
65
|
import {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
schedulePostWriteMemoryHygiene
|
|
62
|
-
} from "../chunk-VHHX4UCP.js";
|
|
66
|
+
governMemoryRecord
|
|
67
|
+
} from "../chunk-MDTWARSF.js";
|
|
63
68
|
import "../chunk-5MOYSU5A.js";
|
|
64
|
-
import "../chunk-
|
|
69
|
+
import "../chunk-ZUGQPYUY.js";
|
|
65
70
|
import "../chunk-76CJBM36.js";
|
|
66
71
|
import {
|
|
67
72
|
BUSY_PATTERN
|
|
68
|
-
} from "../chunk-
|
|
69
|
-
import "../chunk-
|
|
70
|
-
import "../chunk-
|
|
73
|
+
} from "../chunk-QDVLVLXP.js";
|
|
74
|
+
import "../chunk-ZB4FS2EG.js";
|
|
75
|
+
import "../chunk-Z3LXWCB7.js";
|
|
76
|
+
import "../chunk-3X74IQBU.js";
|
|
71
77
|
import {
|
|
72
78
|
currentPauseStartMs,
|
|
73
79
|
isTimerPausedNow,
|
|
@@ -76,22 +82,21 @@ import {
|
|
|
76
82
|
sweepPauseTotalMs,
|
|
77
83
|
timerPauseIntervalsSince
|
|
78
84
|
} from "../chunk-ZKGWHT56.js";
|
|
79
|
-
import "../chunk-QNZ4562V.js";
|
|
80
85
|
import "../chunk-WT4RI36X.js";
|
|
86
|
+
import "../chunk-EIKATSE4.js";
|
|
81
87
|
import "../chunk-E23LNUWJ.js";
|
|
82
88
|
import "../chunk-TDF2XKLK.js";
|
|
83
|
-
import "../chunk-EIKATSE4.js";
|
|
84
89
|
import "../chunk-MJCSEIFI.js";
|
|
85
|
-
import "../chunk-
|
|
86
|
-
import "../chunk-
|
|
90
|
+
import "../chunk-637FL62O.js";
|
|
91
|
+
import "../chunk-6L4VIYLZ.js";
|
|
87
92
|
import "../chunk-VI4ATC6I.js";
|
|
88
93
|
import "../chunk-A27Q27CT.js";
|
|
89
|
-
import "../chunk-
|
|
94
|
+
import "../chunk-DPYZW42H.js";
|
|
90
95
|
import "../chunk-T5SM4RXY.js";
|
|
91
|
-
import "../chunk-
|
|
92
|
-
import "../chunk-
|
|
96
|
+
import "../chunk-N32DVIKY.js";
|
|
97
|
+
import "../chunk-GWAN2BDB.js";
|
|
93
98
|
import "../chunk-AM7S2TY6.js";
|
|
94
|
-
import "../chunk-
|
|
99
|
+
import "../chunk-B5EGDNG6.js";
|
|
95
100
|
import "../chunk-CVYC6DUW.js";
|
|
96
101
|
import "../chunk-ANVHWV2X.js";
|
|
97
102
|
import "../chunk-HME6ITKV.js";
|
|
@@ -142,12 +147,12 @@ import {
|
|
|
142
147
|
killAttributionLogPath,
|
|
143
148
|
recordKillIntent
|
|
144
149
|
} from "../chunk-DRTJCG6B.js";
|
|
145
|
-
import "../chunk-
|
|
150
|
+
import "../chunk-ZZWFZ46U.js";
|
|
146
151
|
import "../chunk-HYZV25LY.js";
|
|
147
152
|
import "../chunk-GJV3WDWM.js";
|
|
148
153
|
import "../chunk-MP2AFCGL.js";
|
|
149
154
|
import "../chunk-YRUZK2QA.js";
|
|
150
|
-
import "../chunk-
|
|
155
|
+
import "../chunk-3UD3OF3X.js";
|
|
151
156
|
import {
|
|
152
157
|
logBoot,
|
|
153
158
|
logCrash,
|
|
@@ -157,11 +162,13 @@ import {
|
|
|
157
162
|
} from "../chunk-BBMTVAE3.js";
|
|
158
163
|
import "../chunk-TKDITWDN.js";
|
|
159
164
|
import "../chunk-5YEUPUV4.js";
|
|
160
|
-
import "../chunk-
|
|
165
|
+
import "../chunk-LUA4SLJY.js";
|
|
166
|
+
import "../chunk-5ONMHTNI.js";
|
|
167
|
+
import "../chunk-RBQUXHYK.js";
|
|
161
168
|
import {
|
|
162
169
|
isPostgresBackendEnabled
|
|
163
170
|
} from "../chunk-YYB5PMTK.js";
|
|
164
|
-
import "../chunk-
|
|
171
|
+
import "../chunk-WAAGVFFN.js";
|
|
165
172
|
import {
|
|
166
173
|
getEventLoopLagMs,
|
|
167
174
|
getLastStall,
|
|
@@ -180,11 +187,11 @@ import {
|
|
|
180
187
|
} from "../chunk-ZQEJ4IX2.js";
|
|
181
188
|
import {
|
|
182
189
|
EMBEDDING_DIM
|
|
183
|
-
} from "../chunk-
|
|
184
|
-
import "../chunk-
|
|
185
|
-
import "../chunk-
|
|
190
|
+
} from "../chunk-C7GHNJPW.js";
|
|
191
|
+
import "../chunk-3VW5ZP2F.js";
|
|
192
|
+
import "../chunk-FWRPDSO3.js";
|
|
186
193
|
import "../chunk-A7XLR3K7.js";
|
|
187
|
-
import "../chunk-
|
|
194
|
+
import "../chunk-OSVTH3SG.js";
|
|
188
195
|
import "../chunk-A7JYF4RG.js";
|
|
189
196
|
import "../chunk-ARX6TAGN.js";
|
|
190
197
|
import {
|
|
@@ -199,7 +206,7 @@ import "../chunk-JKKZGDLP.js";
|
|
|
199
206
|
import "../chunk-MLKGABMK.js";
|
|
200
207
|
|
|
201
208
|
// src/lib/exe-daemon.ts
|
|
202
|
-
import
|
|
209
|
+
import os3 from "os";
|
|
203
210
|
import net from "net";
|
|
204
211
|
import v8 from "v8";
|
|
205
212
|
import { createServer as createHttpServer, request as httpRequest } from "http";
|
|
@@ -1333,19 +1340,6 @@ function activeHealthExits(streak, nowMs, windowMs = DEFAULT_SPIN_WINDOW_MS) {
|
|
|
1333
1340
|
return streak.count;
|
|
1334
1341
|
}
|
|
1335
1342
|
|
|
1336
|
-
// src/lib/daemon-sweep-gate.ts
|
|
1337
|
-
import os3 from "os";
|
|
1338
|
-
function readHostLoadSignal(env = process.env) {
|
|
1339
|
-
return {
|
|
1340
|
-
load1m: os3.loadavg()[0] ?? 0,
|
|
1341
|
-
cpuCount: os3.cpus().length || 1,
|
|
1342
|
-
starvationRatio: parseFloat(env.EXE_STARVATION_LOAD_RATIO ?? "1.5")
|
|
1343
|
-
};
|
|
1344
|
-
}
|
|
1345
|
-
function decideSweepSkip(signal) {
|
|
1346
|
-
return decideOrchestrationTickSkip(signal);
|
|
1347
|
-
}
|
|
1348
|
-
|
|
1349
1343
|
// src/lib/bootstrap-response.ts
|
|
1350
1344
|
import { existsSync as existsSync5, mkdirSync as mkdirSync4, readFileSync as readFileSync4, unlinkSync as unlinkSync3, writeFileSync as writeFileSync4 } from "fs";
|
|
1351
1345
|
import { homedir as homedir2 } from "os";
|
|
@@ -1493,7 +1487,7 @@ function stabilizeDaemonCwd() {
|
|
|
1493
1487
|
} catch (err) {
|
|
1494
1488
|
const moduleDir = path4.dirname(fileURLToPath(import.meta.url));
|
|
1495
1489
|
const packageRoot = path4.resolve(moduleDir, "../..");
|
|
1496
|
-
const fallback = existsSync7(path4.join(packageRoot, "package.json")) ? packageRoot :
|
|
1490
|
+
const fallback = existsSync7(path4.join(packageRoot, "package.json")) ? packageRoot : os3.homedir();
|
|
1497
1491
|
try {
|
|
1498
1492
|
process.chdir(fallback);
|
|
1499
1493
|
process.stderr.write(
|
|
@@ -1691,16 +1685,16 @@ var TICK_SKIP_LOG_THROTTLE_MS = 5 * 60 * 1e3;
|
|
|
1691
1685
|
async function runOrchestrationTick() {
|
|
1692
1686
|
if (_orchestrationBusy) return;
|
|
1693
1687
|
const tickSkip = decideOrchestrationTickSkip({
|
|
1694
|
-
load1m:
|
|
1695
|
-
cpuCount:
|
|
1688
|
+
load1m: os3.loadavg()[0] ?? 0,
|
|
1689
|
+
cpuCount: os3.cpus().length || 1,
|
|
1696
1690
|
starvationRatio: parseFloat(process.env.EXE_STARVATION_LOAD_RATIO ?? "1.5")
|
|
1697
1691
|
});
|
|
1698
1692
|
if (tickSkip.skip) {
|
|
1699
1693
|
const now = Date.now();
|
|
1700
1694
|
if (now - _lastTickSkipLogTs > TICK_SKIP_LOG_THROTTLE_MS) {
|
|
1701
1695
|
_lastTickSkipLogTs = now;
|
|
1702
|
-
const load1m =
|
|
1703
|
-
const cpuCount =
|
|
1696
|
+
const load1m = os3.loadavg()[0] ?? 0;
|
|
1697
|
+
const cpuCount = os3.cpus().length || 1;
|
|
1704
1698
|
process.stderr.write(
|
|
1705
1699
|
`[exed] Orchestration tick SKIPPED: load=${load1m.toFixed(2)} cpus=${cpuCount} \u2014 CPU starved, deferring per-session pass to avoid feeding the event-loop-block spiral.
|
|
1706
1700
|
`
|
|
@@ -1997,7 +1991,7 @@ function scheduleRestartHandoff(exitCode, reason) {
|
|
|
1997
1991
|
const daemonPath = fileURLToPath(import.meta.url);
|
|
1998
1992
|
const logPath = path4.join(EXE_AI_DIR, "logs", "exed.log");
|
|
1999
1993
|
const lockPath = path4.join(EXE_AI_DIR, "exed-spawn.lock");
|
|
2000
|
-
const heapCapMb = computeDaemonHeapCapMb(
|
|
1994
|
+
const heapCapMb = computeDaemonHeapCapMb(os3.totalmem() / (1024 * 1024 * 1024));
|
|
2001
1995
|
const config = {
|
|
2002
1996
|
oldPid: process.pid,
|
|
2003
1997
|
daemonPath,
|
|
@@ -2276,9 +2270,9 @@ function enqueue(queue, entry) {
|
|
|
2276
2270
|
}
|
|
2277
2271
|
queue.push(entry);
|
|
2278
2272
|
}
|
|
2279
|
-
var OOM_MARKER_PATH = path4.join(
|
|
2280
|
-
var EMBED_TIMEOUT_MARKER_PATH = path4.join(
|
|
2281
|
-
var EMBEDDINGS_OPT_IN_PATH = path4.join(
|
|
2273
|
+
var OOM_MARKER_PATH = path4.join(os3.homedir(), ".exe-os", "embedding-oom-marker");
|
|
2274
|
+
var EMBED_TIMEOUT_MARKER_PATH = path4.join(os3.homedir(), ".exe-os", "embedding-timeout-marker");
|
|
2275
|
+
var EMBEDDINGS_OPT_IN_PATH = path4.join(os3.homedir(), ".exe-os", "embeddings-enabled");
|
|
2282
2276
|
var MIN_FREE_MEM_BYTES = 2 * 1024 ** 3;
|
|
2283
2277
|
var EMBED_WORKER_HEAP_MB = resolveEmbedWorkerHeapMb(process.env.EXE_EMBED_WORKER_HEAP_MB);
|
|
2284
2278
|
var EMBED_WORKER_RSS_KILL_MB = resolveEmbedWorkerRssKillMb(
|
|
@@ -2296,10 +2290,10 @@ function resolveEmbeddingsOptIn() {
|
|
|
2296
2290
|
var MAX_SMALL_TOTAL_BYTES = 16 * 1024 ** 3;
|
|
2297
2291
|
var OOM_MARKER_TTL_MS = 1 * 60 * 60 * 1e3;
|
|
2298
2292
|
var EMBED_RESPAWN_RESET_UPTIME_MS = 60 * 60 * 1e3;
|
|
2299
|
-
var CRASH_LOOP_COUNTER_PATH = path4.join(
|
|
2293
|
+
var CRASH_LOOP_COUNTER_PATH = path4.join(os3.homedir(), ".exe-os", "daemon-crash-counter.json");
|
|
2300
2294
|
var CRASH_LOOP_THRESHOLD = 3;
|
|
2301
2295
|
var CRASH_LOOP_WINDOW_MS = 10 * 60 * 1e3;
|
|
2302
|
-
var CRASH_LOOP_BREAKER_PATH = path4.join(
|
|
2296
|
+
var CRASH_LOOP_BREAKER_PATH = path4.join(os3.homedir(), ".exe-os", "crash-loop-breaker");
|
|
2303
2297
|
var CRASH_LOOP_BREAKER_TTL_MS = 30 * 60 * 1e3;
|
|
2304
2298
|
function recordDaemonCrash() {
|
|
2305
2299
|
const now = Date.now();
|
|
@@ -2405,7 +2399,7 @@ function touchEventLoopHeartbeat() {
|
|
|
2405
2399
|
function checkLaunchdPlistHealth() {
|
|
2406
2400
|
try {
|
|
2407
2401
|
if (process.platform !== "darwin") return;
|
|
2408
|
-
const plistPath = path4.join(
|
|
2402
|
+
const plistPath = path4.join(os3.homedir(), "Library", "LaunchAgents", "com.askexe.exed.plist");
|
|
2409
2403
|
if (!existsSync7(plistPath)) return;
|
|
2410
2404
|
const plist = readFileSync6(plistPath, "utf8");
|
|
2411
2405
|
const expectedHeap = computeDaemonHeapCapMb();
|
|
@@ -2515,14 +2509,14 @@ async function loadModel() {
|
|
|
2515
2509
|
_embeddingsDisabledByDesign = true;
|
|
2516
2510
|
return;
|
|
2517
2511
|
}
|
|
2518
|
-
const totalMem =
|
|
2512
|
+
const totalMem = os3.totalmem();
|
|
2519
2513
|
if (totalMem <= MAX_SMALL_TOTAL_BYTES) {
|
|
2520
2514
|
process.stderr.write(`[exed] Skipping embeddings \u2014 total RAM ${(totalMem / 1024 ** 3).toFixed(1)} GB <= 16 GB (FTS+Graph only).
|
|
2521
2515
|
`);
|
|
2522
2516
|
_embeddingsDisabledByDesign = true;
|
|
2523
2517
|
return;
|
|
2524
2518
|
}
|
|
2525
|
-
if (
|
|
2519
|
+
if (os3.freemem() < MIN_FREE_MEM_BYTES) {
|
|
2526
2520
|
process.stderr.write(`[exed] Skipping embeddings \u2014 free RAM < 2 GB.
|
|
2527
2521
|
`);
|
|
2528
2522
|
_embeddingsDisabledByDesign = true;
|
|
@@ -2533,8 +2527,8 @@ async function loadModel() {
|
|
|
2533
2527
|
if (isCpuStarved()) {
|
|
2534
2528
|
if (_embedLoadDeferrals < embedLoadMaxDefers) {
|
|
2535
2529
|
_embedLoadDeferrals++;
|
|
2536
|
-
const load1m = (
|
|
2537
|
-
const cpuCount =
|
|
2530
|
+
const load1m = (os3.loadavg()[0] ?? 0).toFixed(2);
|
|
2531
|
+
const cpuCount = os3.cpus().length || 1;
|
|
2538
2532
|
process.stderr.write(
|
|
2539
2533
|
`[exed] Deferring embed model load \u2014 host CPU-starved (load=${load1m} / ${cpuCount} cpus). Loading the Metal model now would feed the starvation spiral. Retry ${_embedLoadDeferrals}/${embedLoadMaxDefers} in ${embedLoadDeferMs / 1e3}s.
|
|
2540
2534
|
`
|
|
@@ -2673,7 +2667,7 @@ async function loadModel() {
|
|
|
2673
2667
|
void (async () => {
|
|
2674
2668
|
try {
|
|
2675
2669
|
if (_storeInitialized) {
|
|
2676
|
-
const { writeNotification } = await import("../notifications-
|
|
2670
|
+
const { writeNotification } = await import("../notifications-3R6HNHDR.js");
|
|
2677
2671
|
await writeNotification({
|
|
2678
2672
|
agentId: "exe",
|
|
2679
2673
|
agentRole: "system",
|
|
@@ -2810,7 +2804,7 @@ function disableEmbeddingsForInferenceTimeouts() {
|
|
|
2810
2804
|
void (async () => {
|
|
2811
2805
|
try {
|
|
2812
2806
|
if (_storeInitialized) {
|
|
2813
|
-
const { writeNotification } = await import("../notifications-
|
|
2807
|
+
const { writeNotification } = await import("../notifications-3R6HNHDR.js");
|
|
2814
2808
|
await writeNotification({
|
|
2815
2809
|
agentId: "exe",
|
|
2816
2810
|
agentRole: "system",
|
|
@@ -2977,7 +2971,7 @@ async function shutdown(exitCode = 0, reason = null, restartKind) {
|
|
|
2977
2971
|
_shuttingDown = true;
|
|
2978
2972
|
_drainingWrites = true;
|
|
2979
2973
|
try {
|
|
2980
|
-
const { stopOrgPartnerRuntime } = await import("../org-partner-runtime-
|
|
2974
|
+
const { stopOrgPartnerRuntime } = await import("../org-partner-runtime-TH3LMPII.js");
|
|
2981
2975
|
stopOrgPartnerRuntime();
|
|
2982
2976
|
} catch {
|
|
2983
2977
|
}
|
|
@@ -2996,6 +2990,11 @@ async function shutdown(exitCode = 0, reason = null, restartKind) {
|
|
|
2996
2990
|
logRestartEvent("daemon_shutdown_start", { uptime_s: Math.floor((Date.now() - _startedAt2) / 1e3), active_writes: _activeWrites, active_connections: _activeConnections });
|
|
2997
2991
|
resetIdleTimer();
|
|
2998
2992
|
flushToDisk();
|
|
2993
|
+
try {
|
|
2994
|
+
const { stopMaintenanceLane } = await import("../maintenance-worker-54VZTFIK.js");
|
|
2995
|
+
await stopMaintenanceLane();
|
|
2996
|
+
} catch {
|
|
2997
|
+
}
|
|
2999
2998
|
if (process.platform === "darwin" && _embedWorker && isRssOverThreshold(RSS_BACKPRESSURE_HIGH)) {
|
|
3000
2999
|
process.stderr.write(
|
|
3001
3000
|
`[exed] RSS CRITICAL during shutdown \u2014 fast Metal exit (skipping WAL/backup/shards).
|
|
@@ -3060,7 +3059,7 @@ async function shutdown(exitCode = 0, reason = null, restartKind) {
|
|
|
3060
3059
|
dbBytes = dbPath ? statSync4(dbPath).size : 0;
|
|
3061
3060
|
} catch {
|
|
3062
3061
|
}
|
|
3063
|
-
const { getAvailableMemoryBytesSync } = await import("../memory-pressure-watchdog-
|
|
3062
|
+
const { getAvailableMemoryBytesSync } = await import("../memory-pressure-watchdog-HR6TPOMT.js");
|
|
3064
3063
|
const freeBytes = getAvailableMemoryBytesSync();
|
|
3065
3064
|
if (shouldSkipBackupUnderMemoryPressure(freeBytes, dbBytes)) {
|
|
3066
3065
|
memoryGateSkip = true;
|
|
@@ -3113,12 +3112,12 @@ async function shutdown(exitCode = 0, reason = null, restartKind) {
|
|
|
3113
3112
|
`);
|
|
3114
3113
|
}
|
|
3115
3114
|
try {
|
|
3116
|
-
const { stopProjectionWorker } = await import("../projection-worker-
|
|
3115
|
+
const { stopProjectionWorker } = await import("../projection-worker-KLE3IZQ2.js");
|
|
3117
3116
|
stopProjectionWorker();
|
|
3118
3117
|
} catch {
|
|
3119
3118
|
}
|
|
3120
3119
|
try {
|
|
3121
|
-
const { disposeShards } = await import("../shard-manager-
|
|
3120
|
+
const { disposeShards } = await import("../shard-manager-C7LYX6E4.js");
|
|
3122
3121
|
disposeShards();
|
|
3123
3122
|
} catch {
|
|
3124
3123
|
}
|
|
@@ -3181,7 +3180,7 @@ async function handleHealthCheck(socket, requestId) {
|
|
|
3181
3180
|
let pipelineStatus = "unknown";
|
|
3182
3181
|
if (dbConnected) {
|
|
3183
3182
|
try {
|
|
3184
|
-
await import("../pipeline-router-
|
|
3183
|
+
await import("../pipeline-router-E2JZLDK6.js");
|
|
3185
3184
|
pipelineStatus = "ok";
|
|
3186
3185
|
} catch {
|
|
3187
3186
|
pipelineStatus = "unavailable";
|
|
@@ -3450,6 +3449,7 @@ async function handleIngest(req, outboxPath) {
|
|
|
3450
3449
|
agent_id: req.agentId,
|
|
3451
3450
|
agent_role: req.agentRole,
|
|
3452
3451
|
session_id: req.sessionId,
|
|
3452
|
+
session_scope: req.sessionScope ?? null,
|
|
3453
3453
|
tool_name: req.toolName,
|
|
3454
3454
|
project_name: req.projectName,
|
|
3455
3455
|
has_error: req.hasError,
|
|
@@ -3482,7 +3482,7 @@ async function handleWriteMemory(socket, requestId, entry) {
|
|
|
3482
3482
|
return;
|
|
3483
3483
|
}
|
|
3484
3484
|
const memoryId = await writeMemoryRecord(entry);
|
|
3485
|
-
sendResponse(socket, { id: requestId, ok: true, memory_id: memoryId });
|
|
3485
|
+
sendResponse(socket, memoryId ? { id: requestId, ok: true, memory_id: memoryId } : { id: requestId, error: "Memory rejected by admission policy; nothing was stored" });
|
|
3486
3486
|
} catch (err) {
|
|
3487
3487
|
sendResponse(socket, {
|
|
3488
3488
|
id: requestId,
|
|
@@ -3499,8 +3499,7 @@ async function handleBatchWriteMemory(socket, requestId, entries) {
|
|
|
3499
3499
|
let count = 0;
|
|
3500
3500
|
for (const entry of entries) {
|
|
3501
3501
|
if (!entry?.raw_text || entry.raw_text.length < 10) continue;
|
|
3502
|
-
await writeMemoryRecord(entry)
|
|
3503
|
-
count++;
|
|
3502
|
+
if (await writeMemoryRecord(entry)) count++;
|
|
3504
3503
|
}
|
|
3505
3504
|
sendResponse(socket, { id: requestId, ok: true, count });
|
|
3506
3505
|
} catch (err) {
|
|
@@ -3537,9 +3536,10 @@ async function _writeMemoryRecordInner(entry, syncOnly = false) {
|
|
|
3537
3536
|
importance: entry.importance ?? 5,
|
|
3538
3537
|
confidence: entry.confidence ?? 0.7,
|
|
3539
3538
|
draft: entry.draft ?? false,
|
|
3540
|
-
memory_type: entry.memory_type
|
|
3539
|
+
memory_type: entry.memory_type,
|
|
3540
|
+
session_scope: entry.session_scope ?? null
|
|
3541
3541
|
});
|
|
3542
|
-
if (governed.shouldDrop) return
|
|
3542
|
+
if (governed.shouldDrop) return null;
|
|
3543
3543
|
const record = governed.record;
|
|
3544
3544
|
let vectorBlob = null;
|
|
3545
3545
|
if (!syncOnly && _embedWorkerReady && !governed.skipEmbedding) {
|
|
@@ -3571,83 +3571,29 @@ async function _writeMemoryRecordInner(entry, syncOnly = false) {
|
|
|
3571
3571
|
`);
|
|
3572
3572
|
}
|
|
3573
3573
|
}
|
|
3574
|
-
const duplicate = await findScopedDuplicate({
|
|
3575
|
-
contentHash: governed.contentHash,
|
|
3576
|
-
agentId: record.agent_id,
|
|
3577
|
-
projectName: record.project_name,
|
|
3578
|
-
memoryType: record.memory_type ?? "raw"
|
|
3579
|
-
});
|
|
3580
|
-
if (duplicate) return duplicate;
|
|
3581
3574
|
const { getClient } = await import("./database.js");
|
|
3575
|
+
const { buildMemoryInsert, readMemoryWriteOutcome } = await import("../memory-write-repository-J25USX63.js");
|
|
3582
3576
|
const client = getClient();
|
|
3583
|
-
const
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
id,
|
|
3599
|
-
record.agent_id,
|
|
3600
|
-
record.agent_role,
|
|
3601
|
-
record.session_id,
|
|
3602
|
-
record.timestamp,
|
|
3603
|
-
record.tool_name,
|
|
3604
|
-
record.project_name,
|
|
3605
|
-
record.has_error ? 1 : 0,
|
|
3606
|
-
record.raw_text,
|
|
3607
|
-
vectorBlob,
|
|
3608
|
-
record.task_id ?? null,
|
|
3609
|
-
record.importance ?? 5,
|
|
3610
|
-
record.confidence ?? 0.7,
|
|
3611
|
-
record.timestamp,
|
|
3612
|
-
record.draft ? 1 : 0,
|
|
3613
|
-
record.memory_type ?? "raw",
|
|
3614
|
-
entry.trajectory ?? null,
|
|
3615
|
-
governed.contentHash,
|
|
3616
|
-
embeddingModel
|
|
3617
|
-
] : [
|
|
3618
|
-
id,
|
|
3619
|
-
record.agent_id,
|
|
3620
|
-
record.agent_role,
|
|
3621
|
-
record.session_id,
|
|
3622
|
-
record.timestamp,
|
|
3623
|
-
record.tool_name,
|
|
3624
|
-
record.project_name,
|
|
3625
|
-
record.has_error ? 1 : 0,
|
|
3626
|
-
record.raw_text,
|
|
3627
|
-
record.task_id ?? null,
|
|
3628
|
-
record.importance ?? 5,
|
|
3629
|
-
record.confidence ?? 0.7,
|
|
3630
|
-
record.timestamp,
|
|
3631
|
-
record.draft ? 1 : 0,
|
|
3632
|
-
record.memory_type ?? "raw",
|
|
3633
|
-
entry.trajectory ?? null,
|
|
3634
|
-
governed.contentHash,
|
|
3635
|
-
embeddingModel
|
|
3636
|
-
]
|
|
3637
|
-
});
|
|
3638
|
-
if (Number(insertResult.rowsAffected) === 0) {
|
|
3639
|
-
const winner = await findScopedDuplicate({
|
|
3640
|
-
contentHash: governed.contentHash,
|
|
3641
|
-
agentId: record.agent_id,
|
|
3642
|
-
projectName: record.project_name,
|
|
3643
|
-
memoryType: record.memory_type ?? "raw"
|
|
3644
|
-
});
|
|
3645
|
-
return winner ?? id;
|
|
3577
|
+
const row = {
|
|
3578
|
+
...record,
|
|
3579
|
+
agent_id: record.agent_id.toLowerCase(),
|
|
3580
|
+
has_error: record.has_error ? 1 : 0,
|
|
3581
|
+
draft: record.draft ? 1 : 0,
|
|
3582
|
+
vector: vectorBlob === null ? null : JSON.parse(vectorBlob),
|
|
3583
|
+
trajectory: entry.trajectory ?? null,
|
|
3584
|
+
content_hash: governed.contentHash,
|
|
3585
|
+
embedding_model: embeddingModel,
|
|
3586
|
+
version: 0
|
|
3587
|
+
};
|
|
3588
|
+
const inserted = await client.execute(buildMemoryInsert(row));
|
|
3589
|
+
const outcome = await readMemoryWriteOutcome(client, row);
|
|
3590
|
+
if (outcome.outcome !== "committed" && outcome.outcome !== "duplicate") {
|
|
3591
|
+
throw new Error("reason" in outcome ? outcome.reason : "Memory is quarantined");
|
|
3646
3592
|
}
|
|
3647
|
-
|
|
3648
|
-
const version =
|
|
3593
|
+
if (Number(inserted.rowsAffected) === 0) return outcome.id;
|
|
3594
|
+
const version = outcome.version;
|
|
3649
3595
|
try {
|
|
3650
|
-
const { insertOntologyForMemory } = await import("../agentic-ontology-
|
|
3596
|
+
const { insertOntologyForMemory } = await import("../agentic-ontology-RHYNXEKE.js");
|
|
3651
3597
|
await insertOntologyForMemory({
|
|
3652
3598
|
id,
|
|
3653
3599
|
agent_id: record.agent_id,
|
|
@@ -3666,7 +3612,6 @@ async function _writeMemoryRecordInner(entry, syncOnly = false) {
|
|
|
3666
3612
|
process.stderr.write(`[exed] ontology extraction failed (non-blocking): ${e instanceof Error ? e.message : String(e)}
|
|
3667
3613
|
`);
|
|
3668
3614
|
}
|
|
3669
|
-
schedulePostWriteMemoryHygiene([id]);
|
|
3670
3615
|
return id;
|
|
3671
3616
|
}
|
|
3672
3617
|
var MEMORY_DRAIN_INTERVAL_MS = 30 * 1e3;
|
|
@@ -4342,7 +4287,7 @@ async function startMcpHttpServer() {
|
|
|
4342
4287
|
`);
|
|
4343
4288
|
}
|
|
4344
4289
|
try {
|
|
4345
|
-
void import("../mcp-child-registry-
|
|
4290
|
+
void import("../mcp-child-registry-5VUG5ATZ.js").then(({ reapOrphanedMcpChildren }) => reapOrphanedMcpChildren({
|
|
4346
4291
|
// A session the reaper cannot decide on must not vanish into a
|
|
4347
4292
|
// silent `continue` — an orphan nobody can see is worse than one
|
|
4348
4293
|
// that is reported. It is deliberately NOT terminated (unverified
|
|
@@ -4446,8 +4391,8 @@ async function startMcpHttpServer() {
|
|
|
4446
4391
|
}
|
|
4447
4392
|
let loggedClientsWaitingBackoff = false;
|
|
4448
4393
|
for (let attempt = 0; ; attempt++) {
|
|
4449
|
-
const load1m =
|
|
4450
|
-
const cpuCount =
|
|
4394
|
+
const load1m = os3.loadavg()[0] ?? 0;
|
|
4395
|
+
const cpuCount = os3.cpus().length || 1;
|
|
4451
4396
|
const decision = decideBootBackoff({
|
|
4452
4397
|
load1m,
|
|
4453
4398
|
cpuCount,
|
|
@@ -4525,7 +4470,7 @@ async function startMcpHttpServer() {
|
|
|
4525
4470
|
setBootPhase("db_ready");
|
|
4526
4471
|
_storeInitialized = true;
|
|
4527
4472
|
markDbInitCompleted();
|
|
4528
|
-
const { initLicenseGate, getCachedLicenseGate } = await import("../license-gate-
|
|
4473
|
+
const { initLicenseGate, getCachedLicenseGate } = await import("../license-gate-XQ2KN5I5.js");
|
|
4529
4474
|
const gateResult = await initLicenseGate();
|
|
4530
4475
|
if (!gateResult.hasKey) {
|
|
4531
4476
|
process.stderr.write(
|
|
@@ -4537,7 +4482,7 @@ async function startMcpHttpServer() {
|
|
|
4537
4482
|
`
|
|
4538
4483
|
);
|
|
4539
4484
|
}
|
|
4540
|
-
const { startLicenseRecheckTimer, LICENSE_RECHECK_INTERVAL_MS } = await import("../license-recheck-
|
|
4485
|
+
const { startLicenseRecheckTimer, LICENSE_RECHECK_INTERVAL_MS } = await import("../license-recheck-IIBKR2V5.js");
|
|
4541
4486
|
startLicenseRecheckTimer();
|
|
4542
4487
|
process.stderr.write(
|
|
4543
4488
|
`[exed] License re-check timer started (every ${LICENSE_RECHECK_INTERVAL_MS / 6e4}m, throttled by cache freshness)
|
|
@@ -4546,14 +4491,14 @@ async function startMcpHttpServer() {
|
|
|
4546
4491
|
let _cachedWrapTelemetry = null;
|
|
4547
4492
|
async function getWrapTelemetry() {
|
|
4548
4493
|
if (!_cachedWrapTelemetry) {
|
|
4549
|
-
const { wrapServerWithTelemetry } = await import("../tool-telemetry-
|
|
4494
|
+
const { wrapServerWithTelemetry } = await import("../tool-telemetry-VUP7S6HC.js");
|
|
4550
4495
|
_cachedWrapTelemetry = wrapServerWithTelemetry;
|
|
4551
4496
|
}
|
|
4552
4497
|
return _cachedWrapTelemetry;
|
|
4553
4498
|
}
|
|
4554
4499
|
Promise.all([
|
|
4555
|
-
import("../tool-capability-index-
|
|
4556
|
-
import("../tool-gates-
|
|
4500
|
+
import("../tool-capability-index-2ADOWH43.js"),
|
|
4501
|
+
import("../tool-gates-7ENOOYMR.js")
|
|
4557
4502
|
]).then(async ([{ getToolCapabilityIndex }, { TOOL_CATEGORIES }]) => {
|
|
4558
4503
|
const gateState = getCachedLicenseGate();
|
|
4559
4504
|
const index = getToolCapabilityIndex();
|
|
@@ -4618,7 +4563,7 @@ async function startMcpHttpServer() {
|
|
|
4618
4563
|
const expectedBuf = Buffer.from(_daemonToken);
|
|
4619
4564
|
if (tokenBuf.length === expectedBuf.length && timingSafeEqual(tokenBuf, expectedBuf)) return true;
|
|
4620
4565
|
try {
|
|
4621
|
-
const { verifyAccessToken } = await import("../oauth-server-
|
|
4566
|
+
const { verifyAccessToken } = await import("../oauth-server-OILIKR7D.js");
|
|
4622
4567
|
const result = verifyAccessToken(token);
|
|
4623
4568
|
return result.valid;
|
|
4624
4569
|
} catch {
|
|
@@ -4881,7 +4826,7 @@ async function startMcpHttpServer() {
|
|
|
4881
4826
|
return;
|
|
4882
4827
|
}
|
|
4883
4828
|
try {
|
|
4884
|
-
const { handleOAuthRoute } = await import("../oauth-server-
|
|
4829
|
+
const { handleOAuthRoute } = await import("../oauth-server-OILIKR7D.js");
|
|
4885
4830
|
const handled = await handleOAuthRoute(req, res, url, MCP_HTTP_PORT, _daemonToken);
|
|
4886
4831
|
if (handled) return;
|
|
4887
4832
|
} catch (err) {
|
|
@@ -5002,14 +4947,14 @@ async function startMcpHttpServer() {
|
|
|
5002
4947
|
res.end(JSON.stringify({ error: "agent_id and session_name are required" }));
|
|
5003
4948
|
return;
|
|
5004
4949
|
}
|
|
5005
|
-
const { recordHeartbeat } = await import("../agent-heartbeat-
|
|
4950
|
+
const { recordHeartbeat } = await import("../agent-heartbeat-GUVUUQVM.js");
|
|
5006
4951
|
recordHeartbeat(body.agent_id, body.session_name, {
|
|
5007
4952
|
taskId: body.task_id,
|
|
5008
4953
|
status: body.status,
|
|
5009
4954
|
contextPct: body.context_pct
|
|
5010
4955
|
});
|
|
5011
4956
|
if (body.context_pct !== void 0 && body.context_pct > 70) {
|
|
5012
|
-
void import("../orchestration-events-
|
|
4957
|
+
void import("../orchestration-events-CHY3GOJD.js").then(({ recordOrchestrationEventBestEffort: recordOE }) => {
|
|
5013
4958
|
recordOE({
|
|
5014
4959
|
eventType: "context.pressure",
|
|
5015
4960
|
source: "exe-daemon.heartbeat",
|
|
@@ -5105,7 +5050,7 @@ async function startMcpHttpServer() {
|
|
|
5105
5050
|
let sessionHint = req.headers["x-exe-session-name"] || req.headers["x-exe-session"] || "";
|
|
5106
5051
|
if (sessionHint) {
|
|
5107
5052
|
try {
|
|
5108
|
-
const { sanitizeSessionHintHeader, rejectForgedSessionHint } = await import("../mcp-session-identity-
|
|
5053
|
+
const { sanitizeSessionHintHeader, rejectForgedSessionHint } = await import("../mcp-session-identity-HYMLJXXA.js");
|
|
5109
5054
|
const rawHint = sessionHint;
|
|
5110
5055
|
sessionHint = sanitizeSessionHintHeader(sessionHint);
|
|
5111
5056
|
if (!sessionHint) {
|
|
@@ -5144,7 +5089,7 @@ async function startMcpHttpServer() {
|
|
|
5144
5089
|
try {
|
|
5145
5090
|
const liveSessions = await getTmuxSessionsAsync();
|
|
5146
5091
|
const paneCommands = await getPaneCommandsAsync();
|
|
5147
|
-
const { resolveMcpSessionHint } = await import("../mcp-session-identity-
|
|
5092
|
+
const { resolveMcpSessionHint } = await import("../mcp-session-identity-HYMLJXXA.js");
|
|
5148
5093
|
let registrySessions = [];
|
|
5149
5094
|
try {
|
|
5150
5095
|
const { listSessions: listRegistrySessions } = await import("./session-registry.js");
|
|
@@ -5281,7 +5226,7 @@ async function startMcpHttpServer() {
|
|
|
5281
5226
|
bindLive = await getTmuxSessionsAsync();
|
|
5282
5227
|
} catch {
|
|
5283
5228
|
}
|
|
5284
|
-
const { isLauncherCorroboratedIdentity } = await import("../mcp-session-identity-
|
|
5229
|
+
const { isLauncherCorroboratedIdentity } = await import("../mcp-session-identity-HYMLJXXA.js");
|
|
5285
5230
|
const corroborated = isLauncherCorroboratedIdentity({
|
|
5286
5231
|
agentId,
|
|
5287
5232
|
registrySessions: bindRegistry,
|
|
@@ -5489,9 +5434,8 @@ async function startMcpHttpServer() {
|
|
|
5489
5434
|
const toolName = parsedRequest?.method === "tools/call" ? parsedRequest.params?.name : void 0;
|
|
5490
5435
|
if (toolName && agentRole) {
|
|
5491
5436
|
try {
|
|
5492
|
-
const {
|
|
5493
|
-
const
|
|
5494
|
-
const category = TOOL_CATEGORIES[registerName] || TOOL_CATEGORIES[toolName];
|
|
5437
|
+
const { resolveToolCategory, TOOL_GATES } = await import("../tool-gates-7ENOOYMR.js");
|
|
5438
|
+
const category = resolveToolCategory(toolName);
|
|
5495
5439
|
if (category) {
|
|
5496
5440
|
const allowedRoles = TOOL_GATES[category];
|
|
5497
5441
|
if (allowedRoles && allowedRoles.length > 0 && !allowedRoles.includes(agentRole)) {
|
|
@@ -5524,7 +5468,7 @@ async function startMcpHttpServer() {
|
|
|
5524
5468
|
}
|
|
5525
5469
|
}
|
|
5526
5470
|
try {
|
|
5527
|
-
const { reconcileHintWithRegistryIdentity } = await import("../mcp-session-identity-
|
|
5471
|
+
const { reconcileHintWithRegistryIdentity } = await import("../mcp-session-identity-HYMLJXXA.js");
|
|
5528
5472
|
const { listSessions: listRegistrySessions } = await import("./session-registry.js");
|
|
5529
5473
|
const recon = reconcileHintWithRegistryIdentity({
|
|
5530
5474
|
agentId,
|
|
@@ -5784,9 +5728,9 @@ async function ensureStoreForPolling() {
|
|
|
5784
5728
|
await initDatabase({ dbPath: config.dbPath, encryptionKey: masterKey.toString("hex") });
|
|
5785
5729
|
await ensureSchema();
|
|
5786
5730
|
try {
|
|
5787
|
-
const { isLedgerEnabled } = await import("../notification-ledger-
|
|
5731
|
+
const { isLedgerEnabled } = await import("../notification-ledger-KLD6GZTG.js");
|
|
5788
5732
|
if (isLedgerEnabled()) {
|
|
5789
|
-
const { bumpBootGeneration } = await import("../boot-generation-
|
|
5733
|
+
const { bumpBootGeneration } = await import("../boot-generation-VCQXVYGT.js");
|
|
5790
5734
|
const { setDaemonReadyGeneration } = await import("../daemon-ready-signal-PNDMVKPJ.js");
|
|
5791
5735
|
const generation = await bumpBootGeneration();
|
|
5792
5736
|
setDaemonReadyGeneration(generation);
|
|
@@ -5827,13 +5771,13 @@ async function ensureStoreForPolling() {
|
|
|
5827
5771
|
}
|
|
5828
5772
|
}
|
|
5829
5773
|
async function startReviewPolling() {
|
|
5830
|
-
const polling = await import("../review-polling-
|
|
5774
|
+
const polling = await import("../review-polling-WOWIMBCL.js");
|
|
5831
5775
|
const state = {
|
|
5832
5776
|
lastIntercomSent: /* @__PURE__ */ new Map(),
|
|
5833
5777
|
lastNudgeSent: /* @__PURE__ */ new Map(),
|
|
5834
5778
|
intervalMs: REVIEW_POLL_INTERVAL_MS
|
|
5835
5779
|
};
|
|
5836
|
-
const { pollReviewNudge, createReviewNudgeRealDeps, loadNudgeState } = await import("../daemon-orchestration-
|
|
5780
|
+
const { pollReviewNudge, createReviewNudgeRealDeps, loadNudgeState } = await import("../daemon-orchestration-76BOFDEP.js");
|
|
5837
5781
|
const nudgeState = loadNudgeState();
|
|
5838
5782
|
const tick = async () => traceDaemonTimer("review_polling", async () => {
|
|
5839
5783
|
fired("review_polling");
|
|
@@ -5841,7 +5785,7 @@ async function startReviewPolling() {
|
|
|
5841
5785
|
try {
|
|
5842
5786
|
const { getClient } = await import("./database.js");
|
|
5843
5787
|
const deps = polling.createRealDeps(getClient);
|
|
5844
|
-
const { strictSessionScopeFilter } = await import("../task-scope-
|
|
5788
|
+
const { strictSessionScopeFilter } = await import("../task-scope-32HQEV6W.js");
|
|
5845
5789
|
const { getCoordinatorName, DEFAULT_COORDINATOR_TEMPLATE_NAME } = await import("./employees.js");
|
|
5846
5790
|
deps.findOrphanedDoneTasks = async (sessionScope) => {
|
|
5847
5791
|
const coordinatorName = getCoordinatorName();
|
|
@@ -5861,7 +5805,7 @@ async function startReviewPolling() {
|
|
|
5861
5805
|
deps.findTieredReviewCandidates = async (sessionScope) => {
|
|
5862
5806
|
let project = null;
|
|
5863
5807
|
try {
|
|
5864
|
-
const { getProjectName } = await import("../project-name-
|
|
5808
|
+
const { getProjectName } = await import("../project-name-V62GWALX.js");
|
|
5865
5809
|
project = getProjectName() || null;
|
|
5866
5810
|
} catch {
|
|
5867
5811
|
project = null;
|
|
@@ -5920,7 +5864,7 @@ function startSessionTTL() {
|
|
|
5920
5864
|
if (!await ensureStoreForPolling()) return;
|
|
5921
5865
|
if (inPostRestartDestructiveGrace("session_ttl")) return;
|
|
5922
5866
|
const { getClient } = await import("./database.js");
|
|
5923
|
-
const { checkSessionTTL, createSessionTTLRealDeps } = await import("../daemon-orchestration-
|
|
5867
|
+
const { checkSessionTTL, createSessionTTLRealDeps } = await import("../daemon-orchestration-76BOFDEP.js");
|
|
5924
5868
|
const deps = createSessionTTLRealDeps(getClient);
|
|
5925
5869
|
const killed = await checkSessionTTL(deps, _wedgeObservations);
|
|
5926
5870
|
if (killed.length > 0) acted("session_ttl");
|
|
@@ -5945,7 +5889,7 @@ function startIdleKill() {
|
|
|
5945
5889
|
if (!await ensureStoreForPolling()) return;
|
|
5946
5890
|
if (inPostRestartDestructiveGrace("idle_kill")) return;
|
|
5947
5891
|
try {
|
|
5948
|
-
const signalDir = path4.join(
|
|
5892
|
+
const signalDir = path4.join(os3.homedir(), ".exe-os", "task-signals");
|
|
5949
5893
|
try {
|
|
5950
5894
|
await access(signalDir);
|
|
5951
5895
|
} catch {
|
|
@@ -5980,7 +5924,7 @@ function startIdleKill() {
|
|
|
5980
5924
|
const cfg = await getCachedConfig();
|
|
5981
5925
|
if (!cfg) return;
|
|
5982
5926
|
const { getClient } = await import("./database.js");
|
|
5983
|
-
const { pollIdleKill, createIdleKillRealDeps } = await import("../daemon-orchestration-
|
|
5927
|
+
const { pollIdleKill, createIdleKillRealDeps } = await import("../daemon-orchestration-76BOFDEP.js");
|
|
5984
5928
|
const { sessions: liveSessions, paneCache, aliveSessions } = await getSharedOrchestrationCaches();
|
|
5985
5929
|
const realDeps = createIdleKillRealDeps(
|
|
5986
5930
|
getClient,
|
|
@@ -6110,9 +6054,15 @@ function cloudSyncDebugLog(msg) {
|
|
|
6110
6054
|
`);
|
|
6111
6055
|
}
|
|
6112
6056
|
}
|
|
6113
|
-
function persistCloudSyncState(state) {
|
|
6057
|
+
function persistCloudSyncState(state, statePath) {
|
|
6114
6058
|
try {
|
|
6115
|
-
|
|
6059
|
+
const onDisk = readCloudSyncState(statePath);
|
|
6060
|
+
writeCloudSyncState({
|
|
6061
|
+
...state,
|
|
6062
|
+
...onDisk?.pullIncompleteReason !== void 0 ? { pullIncompleteReason: onDisk.pullIncompleteReason } : {},
|
|
6063
|
+
...onDisk?.pullIncompleteMaxVersion !== void 0 ? { pullIncompleteMaxVersion: onDisk.pullIncompleteMaxVersion } : {},
|
|
6064
|
+
...onDisk?.pendingSliceAt !== void 0 ? { pendingSliceAt: onDisk.pendingSliceAt } : {}
|
|
6065
|
+
}, statePath);
|
|
6116
6066
|
} catch {
|
|
6117
6067
|
}
|
|
6118
6068
|
}
|
|
@@ -6162,103 +6112,141 @@ async function runCloudSyncChild() {
|
|
|
6162
6112
|
_cloudSyncChild = null;
|
|
6163
6113
|
}
|
|
6164
6114
|
}
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
`)
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
if (
|
|
6115
|
+
var _cloudSyncScheduleDeferredRetry = () => {
|
|
6116
|
+
};
|
|
6117
|
+
function scheduleFastRetryIfSlicePending(context) {
|
|
6118
|
+
let slicePending = false;
|
|
6119
|
+
try {
|
|
6120
|
+
slicePending = hasPendingCloudSyncSlice(readCloudSyncState(), Date.now(), CLOUD_SYNC_INTERVAL_MS);
|
|
6121
|
+
} catch {
|
|
6122
|
+
slicePending = false;
|
|
6123
|
+
}
|
|
6124
|
+
if (slicePending) {
|
|
6125
|
+
process.stderr.write(
|
|
6126
|
+
`[exed] Cloud sync ${context} \u2014 next attempt in ${Math.round(CLOUD_SYNC_DEFERRED_RESUME_MS / 1e3)}s
|
|
6127
|
+
`
|
|
6128
|
+
);
|
|
6129
|
+
_cloudSyncScheduleDeferredRetry();
|
|
6130
|
+
}
|
|
6131
|
+
return slicePending;
|
|
6132
|
+
}
|
|
6133
|
+
async function handleCloudSyncResult(result) {
|
|
6134
|
+
if (result.code === CLOUD_SYNC_EXIT_PARTIAL) {
|
|
6135
|
+
const chased = scheduleFastRetryIfSlicePending(
|
|
6136
|
+
"child reported a PARTIAL pull that is still making progress \u2014 chasing it"
|
|
6137
|
+
);
|
|
6138
|
+
if (!chased) {
|
|
6189
6139
|
process.stderr.write(
|
|
6190
|
-
`[exed] Cloud sync
|
|
6140
|
+
`[exed] Cloud sync child reported a PARTIAL pull \u2014 remote history was not fully restored, memory push skipped. Not counted as a failure; retrying at the normal interval.
|
|
6191
6141
|
`
|
|
6192
6142
|
);
|
|
6193
|
-
setTimeout(() => void traceDaemonTimer("cloud_sync", tick), CLOUD_SYNC_DEFERRED_RESUME_MS).unref();
|
|
6194
|
-
return;
|
|
6195
6143
|
}
|
|
6196
|
-
|
|
6144
|
+
return;
|
|
6145
|
+
}
|
|
6146
|
+
if (result.code !== 0) {
|
|
6147
|
+
const err = new Error(
|
|
6148
|
+
`cloud sync child exited code=${result.code ?? "null"} signal=${result.signal ?? "null"} \u2014 last stderr: ${formatCloudSyncStderrTail(result.stderrTail)}`
|
|
6149
|
+
);
|
|
6150
|
+
err.stderrTail = result.stderrTail;
|
|
6151
|
+
throw err;
|
|
6152
|
+
}
|
|
6153
|
+
if (_cloudSyncConsecutiveFailures > 0) {
|
|
6154
|
+
process.stderr.write(`[exed] Cloud sync recovered after ${_cloudSyncConsecutiveFailures} failures
|
|
6197
6155
|
`);
|
|
6198
|
-
}
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6156
|
+
}
|
|
6157
|
+
_cloudSyncConsecutiveFailures = 0;
|
|
6158
|
+
_cloudSyncBackoffMs = 0;
|
|
6159
|
+
_cloudSyncPaused = false;
|
|
6160
|
+
acted("cloud_sync");
|
|
6161
|
+
if (scheduleFastRetryIfSlicePending("slice deferred with memories still pending")) {
|
|
6162
|
+
return;
|
|
6163
|
+
}
|
|
6164
|
+
process.stderr.write(`[exed] Cloud sync child completed successfully
|
|
6165
|
+
`);
|
|
6166
|
+
}
|
|
6167
|
+
function handleCloudSyncError(err) {
|
|
6168
|
+
_cloudSyncConsecutiveFailures++;
|
|
6169
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
6170
|
+
const stderrTail = err instanceof Error ? err.stderrTail : void 0;
|
|
6171
|
+
const lastSuccessAt = previousCloudSyncLastSuccessAt();
|
|
6172
|
+
_cloudSyncBackoffMs = Math.min(
|
|
6173
|
+
CLOUD_SYNC_BACKOFF_BASE_MS * Math.pow(2, _cloudSyncConsecutiveFailures - 1),
|
|
6174
|
+
CLOUD_SYNC_BACKOFF_MAX_MS
|
|
6175
|
+
);
|
|
6176
|
+
logDaemonHealth({
|
|
6177
|
+
event: "cloud_sync_fail",
|
|
6178
|
+
pid: process.pid,
|
|
6179
|
+
message: "Cloud sync child failed",
|
|
6180
|
+
data: {
|
|
6181
|
+
consecutiveFailures: _cloudSyncConsecutiveFailures,
|
|
6182
|
+
lastError: msg,
|
|
6183
|
+
...stderrTail ? { stderrTail: formatCloudSyncStderrTail(stderrTail) } : {}
|
|
6184
|
+
}
|
|
6185
|
+
});
|
|
6186
|
+
const failureNow = (/* @__PURE__ */ new Date()).toISOString();
|
|
6187
|
+
persistCloudSyncState({
|
|
6188
|
+
lastSuccessAt,
|
|
6189
|
+
lastError: msg,
|
|
6190
|
+
consecutiveFailures: _cloudSyncConsecutiveFailures,
|
|
6191
|
+
paused: false,
|
|
6192
|
+
pausedAt: null,
|
|
6193
|
+
intervalMs: CLOUD_SYNC_INTERVAL_MS,
|
|
6194
|
+
updatedAt: failureNow
|
|
6195
|
+
});
|
|
6196
|
+
if (_cloudSyncConsecutiveFailures >= CLOUD_SYNC_CIRCUIT_BREAK) {
|
|
6197
|
+
_cloudSyncPaused = true;
|
|
6198
|
+
_cloudSyncPausedAt = Date.now();
|
|
6199
|
+
const pausedAt = new Date(_cloudSyncPausedAt).toISOString();
|
|
6200
|
+
persistCloudSyncState({
|
|
6201
|
+
lastSuccessAt,
|
|
6202
|
+
lastError: msg,
|
|
6203
|
+
consecutiveFailures: _cloudSyncConsecutiveFailures,
|
|
6204
|
+
paused: true,
|
|
6205
|
+
pausedAt,
|
|
6206
|
+
intervalMs: CLOUD_SYNC_INTERVAL_MS,
|
|
6207
|
+
updatedAt: pausedAt
|
|
6208
|
+
});
|
|
6209
|
+
process.stderr.write(
|
|
6210
|
+
`[exed] Cloud sync PAUSED after ${CLOUD_SYNC_CIRCUIT_BREAK} consecutive failures. Last error: ${msg}. Will retry when daemon restarts or /exe-cloud sync is run manually.
|
|
6211
|
+
`
|
|
6207
6212
|
);
|
|
6208
6213
|
logDaemonHealth({
|
|
6209
6214
|
event: "cloud_sync_fail",
|
|
6210
6215
|
pid: process.pid,
|
|
6211
|
-
message:
|
|
6216
|
+
message: `Cloud sync circuit-breaker tripped after ${CLOUD_SYNC_CIRCUIT_BREAK} failures`,
|
|
6212
6217
|
data: {
|
|
6213
6218
|
consecutiveFailures: _cloudSyncConsecutiveFailures,
|
|
6214
6219
|
lastError: msg,
|
|
6215
6220
|
...stderrTail ? { stderrTail: formatCloudSyncStderrTail(stderrTail) } : {}
|
|
6216
6221
|
}
|
|
6217
6222
|
});
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
lastError: msg,
|
|
6222
|
-
consecutiveFailures: _cloudSyncConsecutiveFailures,
|
|
6223
|
-
paused: false,
|
|
6224
|
-
pausedAt: null,
|
|
6225
|
-
intervalMs: CLOUD_SYNC_INTERVAL_MS,
|
|
6226
|
-
updatedAt: failureNow
|
|
6227
|
-
});
|
|
6228
|
-
if (_cloudSyncConsecutiveFailures >= CLOUD_SYNC_CIRCUIT_BREAK) {
|
|
6229
|
-
_cloudSyncPaused = true;
|
|
6230
|
-
_cloudSyncPausedAt = Date.now();
|
|
6231
|
-
const pausedAt = new Date(_cloudSyncPausedAt).toISOString();
|
|
6232
|
-
persistCloudSyncState({
|
|
6233
|
-
lastSuccessAt,
|
|
6234
|
-
lastError: msg,
|
|
6235
|
-
consecutiveFailures: _cloudSyncConsecutiveFailures,
|
|
6236
|
-
paused: true,
|
|
6237
|
-
pausedAt,
|
|
6238
|
-
intervalMs: CLOUD_SYNC_INTERVAL_MS,
|
|
6239
|
-
updatedAt: pausedAt
|
|
6240
|
-
});
|
|
6241
|
-
process.stderr.write(
|
|
6242
|
-
`[exed] Cloud sync PAUSED after ${CLOUD_SYNC_CIRCUIT_BREAK} consecutive failures. Last error: ${msg}. Will retry when daemon restarts or /exe-cloud sync is run manually.
|
|
6243
|
-
`
|
|
6244
|
-
);
|
|
6245
|
-
logDaemonHealth({
|
|
6246
|
-
event: "cloud_sync_fail",
|
|
6247
|
-
pid: process.pid,
|
|
6248
|
-
message: `Cloud sync circuit-breaker tripped after ${CLOUD_SYNC_CIRCUIT_BREAK} failures`,
|
|
6249
|
-
data: {
|
|
6250
|
-
consecutiveFailures: _cloudSyncConsecutiveFailures,
|
|
6251
|
-
lastError: msg,
|
|
6252
|
-
...stderrTail ? { stderrTail: formatCloudSyncStderrTail(stderrTail) } : {}
|
|
6253
|
-
}
|
|
6254
|
-
});
|
|
6255
|
-
} else {
|
|
6256
|
-
process.stderr.write(
|
|
6257
|
-
`[exed] Cloud sync error (${_cloudSyncConsecutiveFailures}/${CLOUD_SYNC_CIRCUIT_BREAK}, backoff ${Math.round(_cloudSyncBackoffMs / 1e3)}s): ${msg}
|
|
6223
|
+
} else {
|
|
6224
|
+
process.stderr.write(
|
|
6225
|
+
`[exed] Cloud sync error (${_cloudSyncConsecutiveFailures}/${CLOUD_SYNC_CIRCUIT_BREAK}, backoff ${Math.round(_cloudSyncBackoffMs / 1e3)}s): ${msg}
|
|
6258
6226
|
`
|
|
6259
|
-
|
|
6260
|
-
|
|
6227
|
+
);
|
|
6228
|
+
}
|
|
6229
|
+
}
|
|
6230
|
+
function __getCloudSyncCountersForTests() {
|
|
6231
|
+
return {
|
|
6232
|
+
consecutiveFailures: _cloudSyncConsecutiveFailures,
|
|
6233
|
+
backoffMs: _cloudSyncBackoffMs,
|
|
6234
|
+
paused: _cloudSyncPaused,
|
|
6235
|
+
pausedAt: _cloudSyncPausedAt
|
|
6261
6236
|
};
|
|
6237
|
+
}
|
|
6238
|
+
function __resetCloudSyncStateForTests() {
|
|
6239
|
+
_cloudSyncConsecutiveFailures = 0;
|
|
6240
|
+
_cloudSyncBackoffMs = 0;
|
|
6241
|
+
_cloudSyncPaused = false;
|
|
6242
|
+
_cloudSyncPausedAt = 0;
|
|
6243
|
+
_cloudSyncScheduleDeferredRetry = () => {
|
|
6244
|
+
};
|
|
6245
|
+
}
|
|
6246
|
+
function __setCloudSyncScheduleDeferredRetryForTests(fn) {
|
|
6247
|
+
_cloudSyncScheduleDeferredRetry = fn;
|
|
6248
|
+
}
|
|
6249
|
+
function startCloudSyncTimer() {
|
|
6262
6250
|
const tick = async () => {
|
|
6263
6251
|
fired("cloud_sync");
|
|
6264
6252
|
if (_shuttingDown) return;
|
|
@@ -6306,6 +6294,9 @@ function startCloudSyncTimer() {
|
|
|
6306
6294
|
handleCloudSyncError(err);
|
|
6307
6295
|
}
|
|
6308
6296
|
};
|
|
6297
|
+
_cloudSyncScheduleDeferredRetry = () => {
|
|
6298
|
+
setTimeout(() => void traceDaemonTimer("cloud_sync", tick), CLOUD_SYNC_DEFERRED_RESUME_MS).unref();
|
|
6299
|
+
};
|
|
6309
6300
|
const timer = setInterval(() => void traceDaemonTimer("cloud_sync", tick), CLOUD_SYNC_INTERVAL_MS);
|
|
6310
6301
|
timer.unref();
|
|
6311
6302
|
setTimeout(() => void traceDaemonTimer("cloud_sync", tick), 3e4);
|
|
@@ -6369,7 +6360,7 @@ function startSkillRefinement() {
|
|
|
6369
6360
|
if (!shouldRunHeavyJob("skill_refinement")) return;
|
|
6370
6361
|
try {
|
|
6371
6362
|
if (!await ensureStoreForPolling()) return;
|
|
6372
|
-
const { runSkillRefinement } = await import("../skill-refinement-
|
|
6363
|
+
const { runSkillRefinement } = await import("../skill-refinement-FWQFYNBI.js");
|
|
6373
6364
|
const result = await runSkillRefinement();
|
|
6374
6365
|
if (result.reviewed > 0) {
|
|
6375
6366
|
acted("skill_refinement");
|
|
@@ -6434,7 +6425,7 @@ function startStalledDispatchSweep() {
|
|
|
6434
6425
|
});
|
|
6435
6426
|
const { notifications, nextState } = decideStalledDispatchEscalations(intents, previousState);
|
|
6436
6427
|
if (notifications.length > 0 && _storeInitialized) {
|
|
6437
|
-
const { writeNotification } = await import("../notifications-
|
|
6428
|
+
const { writeNotification } = await import("../notifications-3R6HNHDR.js");
|
|
6438
6429
|
for (const note of notifications) {
|
|
6439
6430
|
try {
|
|
6440
6431
|
await writeNotification({
|
|
@@ -6484,8 +6475,8 @@ function startStaleBranchSweep() {
|
|
|
6484
6475
|
fired("stale_branch_sweep");
|
|
6485
6476
|
if (sweepStarved("stale_branch_sweep")) return;
|
|
6486
6477
|
try {
|
|
6487
|
-
const { discoverRepoPathsAsync } = await import("../worktree-sweep-
|
|
6488
|
-
const { scanUnmergedBranchesCached } = await import("../branch-hygiene-
|
|
6478
|
+
const { discoverRepoPathsAsync } = await import("../worktree-sweep-Q62ZIT3U.js");
|
|
6479
|
+
const { scanUnmergedBranchesCached } = await import("../branch-hygiene-DDXXI6ZA.js");
|
|
6489
6480
|
const { runBudgetedSweep } = await import("../sweep-budget-YGLCNXZZ.js");
|
|
6490
6481
|
const today = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
6491
6482
|
for (const k of _staleBranchAlertedToday) {
|
|
@@ -6517,7 +6508,7 @@ function startStaleBranchSweep() {
|
|
|
6517
6508
|
if (!_storeInitialized) return;
|
|
6518
6509
|
const stale = scan.branches.filter((b) => b.ageHours >= STALE_BRANCH_HOURS).slice(0, 5).map((b) => `${b.name} (${b.aheadUnknown ? "+? commits" : `+${b.ahead} commits`}, ${(b.ageHours / 24).toFixed(1)}d)`).join("; ");
|
|
6519
6510
|
try {
|
|
6520
|
-
const { writeNotification } = await import("../notifications-
|
|
6511
|
+
const { writeNotification } = await import("../notifications-3R6HNHDR.js");
|
|
6521
6512
|
await writeNotification({
|
|
6522
6513
|
agentId: "exe",
|
|
6523
6514
|
agentRole: "system",
|
|
@@ -6552,6 +6543,51 @@ function startStaleBranchSweep() {
|
|
|
6552
6543
|
process.stderr.write(`[exed] Stale-branch sweep timer started (every ${STALE_BRANCH_SWEEP_INTERVAL_MS / 36e5}h, >${STALE_BRANCH_HOURS}h threshold)
|
|
6553
6544
|
`);
|
|
6554
6545
|
}
|
|
6546
|
+
var BUG_LANDED_RECONCILE_INTERVAL_MS = 30 * 60 * 1e3;
|
|
6547
|
+
function startBugLandedReconcile() {
|
|
6548
|
+
const tick = async () => {
|
|
6549
|
+
fired("bug_landed_reconcile");
|
|
6550
|
+
if (sweepStarved("bug_landed_reconcile")) return;
|
|
6551
|
+
try {
|
|
6552
|
+
const { reconcileLandedBugs } = await import("../bug-landed-reconciler-TQVNOUCU.js");
|
|
6553
|
+
const result = await reconcileLandedBugs();
|
|
6554
|
+
const triaged = result.repos.reduce((n, r) => n + r.matched.filter((m) => m.action === "triaged").length, 0);
|
|
6555
|
+
const errored = result.repos.filter((r) => !r.ok).length;
|
|
6556
|
+
if (triaged > 0 || errored > 0) {
|
|
6557
|
+
acted("bug_landed_reconcile");
|
|
6558
|
+
process.stderr.write(
|
|
6559
|
+
`[exed] Bug-landed reconcile: ${triaged} bug(s) auto-triaged, ${errored} repo(s) errored this tick
|
|
6560
|
+
`
|
|
6561
|
+
);
|
|
6562
|
+
}
|
|
6563
|
+
} catch (err) {
|
|
6564
|
+
process.stderr.write(`[exed] Bug-landed reconcile error: ${err instanceof Error ? err.message : String(err)}
|
|
6565
|
+
`);
|
|
6566
|
+
}
|
|
6567
|
+
};
|
|
6568
|
+
const timer = setInterval(() => void traceDaemonTimer("bug_landed_reconcile", tick), BUG_LANDED_RECONCILE_INTERVAL_MS);
|
|
6569
|
+
timer.unref();
|
|
6570
|
+
process.stderr.write(`[exed] Bug-landed reconcile timer started (every ${BUG_LANDED_RECONCILE_INTERVAL_MS / 6e4}min)
|
|
6571
|
+
`);
|
|
6572
|
+
}
|
|
6573
|
+
async function maybeScheduleBugLandedReconcile() {
|
|
6574
|
+
try {
|
|
6575
|
+
const { hasSupportAdminAccess } = await import("../support-bug-actions-XWCJI6S5.js");
|
|
6576
|
+
if (!await hasSupportAdminAccess()) {
|
|
6577
|
+
process.stderr.write("[exed] Bug-landed reconcile: no AskExe support admin token configured \u2014 skipping (customer install)\n");
|
|
6578
|
+
return;
|
|
6579
|
+
}
|
|
6580
|
+
const { isGhAvailableAndAuthenticated } = await import("../bug-landed-reconciler-TQVNOUCU.js");
|
|
6581
|
+
if (!await isGhAvailableAndAuthenticated()) {
|
|
6582
|
+
process.stderr.write("[exed] Bug-landed reconcile: gh CLI not available/authenticated \u2014 skipping\n");
|
|
6583
|
+
return;
|
|
6584
|
+
}
|
|
6585
|
+
startBugLandedReconcile();
|
|
6586
|
+
} catch (err) {
|
|
6587
|
+
process.stderr.write(`[exed] Bug-landed reconcile: eligibility check failed, not scheduling: ${err instanceof Error ? err.message : String(err)}
|
|
6588
|
+
`);
|
|
6589
|
+
}
|
|
6590
|
+
}
|
|
6555
6591
|
var configuredWorkStateIntervalMs = Number(process.env.EXE_WORK_STATE_INTERVAL_MS ?? 5 * 60 * 1e3);
|
|
6556
6592
|
var WORK_STATE_HEARTBEAT_INTERVAL_MS = Number.isFinite(configuredWorkStateIntervalMs) ? Math.max(6e4, configuredWorkStateIntervalMs) : 5 * 60 * 1e3;
|
|
6557
6593
|
var _workStateHeartbeatState = /* @__PURE__ */ new Map();
|
|
@@ -6580,7 +6616,7 @@ function startWorkStateHeartbeat() {
|
|
|
6580
6616
|
const { getClient } = await import("./database.js");
|
|
6581
6617
|
const { listSessions } = await import("./session-registry.js");
|
|
6582
6618
|
const { isCoordinatorName } = await import("./employees.js");
|
|
6583
|
-
const { runWorkStateTick } = await import("../work-state-heartbeat-
|
|
6619
|
+
const { runWorkStateTick } = await import("../work-state-heartbeat-S45TXK4M.js");
|
|
6584
6620
|
let liveTmux = null;
|
|
6585
6621
|
const loadLiveTmux = async () => {
|
|
6586
6622
|
if (!liveTmux) liveTmux = await listTmuxSessionNamesAsync();
|
|
@@ -6646,7 +6682,7 @@ function startGraphExtraction() {
|
|
|
6646
6682
|
if (!await ensureStoreForPolling()) return;
|
|
6647
6683
|
const { getClient } = await import("./database.js");
|
|
6648
6684
|
const client = getClient();
|
|
6649
|
-
const { extractBatch } = await import("../graph-rag-
|
|
6685
|
+
const { extractBatch } = await import("../graph-rag-H24CMFP2.js");
|
|
6650
6686
|
const result = await extractBatch(client, 50, config.selfQueryModel);
|
|
6651
6687
|
if (result.processed > 0) {
|
|
6652
6688
|
acted("graph_extraction");
|
|
@@ -6967,7 +7003,7 @@ async function refreshAgentData() {
|
|
|
6967
7003
|
const decision = evaluateSpendCapAlert(_lastSpendCapLevel, capStatus);
|
|
6968
7004
|
_lastSpendCapLevel = decision.level;
|
|
6969
7005
|
if (decision.shouldAlert && decision.summary) {
|
|
6970
|
-
const { writeNotification } = await import("../notifications-
|
|
7006
|
+
const { writeNotification } = await import("../notifications-3R6HNHDR.js");
|
|
6971
7007
|
await writeNotification({
|
|
6972
7008
|
agentId: "system",
|
|
6973
7009
|
agentRole: "system",
|
|
@@ -7089,7 +7125,7 @@ function startReflectionSweep() {
|
|
|
7089
7125
|
);
|
|
7090
7126
|
let runReflection;
|
|
7091
7127
|
try {
|
|
7092
|
-
({ runReflection } = await import("../memory-reflection-
|
|
7128
|
+
({ runReflection } = await import("../memory-reflection-LO7VFBL3.js"));
|
|
7093
7129
|
} catch (importErr) {
|
|
7094
7130
|
_reflectionImportFailed = true;
|
|
7095
7131
|
process.stderr.write(`[exed] Reflection module unavailable (stale chunk hash?) \u2014 disabled until daemon restart: ${importErr instanceof Error ? importErr.message : String(importErr)}
|
|
@@ -7130,7 +7166,7 @@ function startReflectionSweep() {
|
|
|
7130
7166
|
if (memories > 100 && cards < memories * 0.1) {
|
|
7131
7167
|
process.stderr.write(`[exed] Memory cards sparse (${cards} cards / ${memories} memories) \u2014 running backfill...
|
|
7132
7168
|
`);
|
|
7133
|
-
const { insertMemoryCardsForBatch } = await import("../memory-cards-
|
|
7169
|
+
const { insertMemoryCardsForBatch } = await import("../memory-cards-PAZDUQ3B.js");
|
|
7134
7170
|
const batchSize = 500;
|
|
7135
7171
|
let offset = 0;
|
|
7136
7172
|
let totalCards = 0;
|
|
@@ -7211,7 +7247,7 @@ function startDatabaseBackup() {
|
|
|
7211
7247
|
`
|
|
7212
7248
|
);
|
|
7213
7249
|
try {
|
|
7214
|
-
const { maybeVerifyDailyBackup } = await import("../backup-verify-
|
|
7250
|
+
const { maybeVerifyDailyBackup } = await import("../backup-verify-TUQEICWA.js");
|
|
7215
7251
|
const verdict = await maybeVerifyDailyBackup(backupPath);
|
|
7216
7252
|
if (verdict && !verdict.ok) {
|
|
7217
7253
|
process.stderr.write(
|
|
@@ -7287,7 +7323,7 @@ function startSessionEventsRetention() {
|
|
|
7287
7323
|
fired("session_events_retention");
|
|
7288
7324
|
if (!await ensureStoreForPolling()) return;
|
|
7289
7325
|
try {
|
|
7290
|
-
const { DEFAULT_SESSION_EVENTS_RETENTION_DAYS, sessionEventsRetentionMode } = await import("../session-events-
|
|
7326
|
+
const { DEFAULT_SESSION_EVENTS_RETENTION_DAYS, sessionEventsRetentionMode } = await import("../session-events-OPMS2C5F.js");
|
|
7291
7327
|
const days = SESSION_EVENTS_RETENTION_DAYS ?? DEFAULT_SESSION_EVENTS_RETENTION_DAYS;
|
|
7292
7328
|
const decision = sessionEventsRetentionMode(isWriteWorkerEnabled(), isDbWriteWorkerReady());
|
|
7293
7329
|
if (decision.mode === "skip") {
|
|
@@ -7332,13 +7368,14 @@ function startSessionEventsRetention() {
|
|
|
7332
7368
|
}
|
|
7333
7369
|
var CONVERSATIONS_RETENTION_INTERVAL_MS = 6 * 60 * 60 * 1e3;
|
|
7334
7370
|
var CONVERSATIONS_RETENTION_DAYS = Number(process.env.EXE_CONVERSATIONS_RETENTION_DAYS) > 0 ? Math.floor(Number(process.env.EXE_CONVERSATIONS_RETENTION_DAYS)) : void 0;
|
|
7371
|
+
var CONVERSATIONS_RETENTION_MODE = process.env.EXE_CONVERSATIONS_RETENTION_MODE;
|
|
7335
7372
|
function startConversationsRetention() {
|
|
7336
7373
|
const tick = async () => {
|
|
7337
7374
|
fired("conversations_retention");
|
|
7338
7375
|
if (!await ensureStoreForPolling()) return;
|
|
7339
7376
|
try {
|
|
7340
|
-
const { DEFAULT_CONVERSATIONS_RETENTION_DAYS } = await import("../conversations-retention-
|
|
7341
|
-
const { sessionEventsRetentionMode } = await import("../session-events-
|
|
7377
|
+
const { DEFAULT_CONVERSATIONS_RETENTION_DAYS } = await import("../conversations-retention-XTBFJBUM.js");
|
|
7378
|
+
const { sessionEventsRetentionMode } = await import("../session-events-OPMS2C5F.js");
|
|
7342
7379
|
const days = CONVERSATIONS_RETENTION_DAYS ?? DEFAULT_CONVERSATIONS_RETENTION_DAYS;
|
|
7343
7380
|
const decision = sessionEventsRetentionMode(isWriteWorkerEnabled(), isDbWriteWorkerReady());
|
|
7344
7381
|
if (decision.mode === "skip") {
|
|
@@ -7348,9 +7385,9 @@ function startConversationsRetention() {
|
|
|
7348
7385
|
);
|
|
7349
7386
|
return;
|
|
7350
7387
|
}
|
|
7351
|
-
let
|
|
7388
|
+
let swept;
|
|
7352
7389
|
try {
|
|
7353
|
-
|
|
7390
|
+
swept = await sweepConversationsRetentionInWorker(days, CONVERSATIONS_RETENTION_MODE);
|
|
7354
7391
|
} catch (err) {
|
|
7355
7392
|
process.stderr.write(
|
|
7356
7393
|
`[exed] Conversations retention worker failed (${err instanceof Error ? err.message : String(err)}) - skipping this tick
|
|
@@ -7358,10 +7395,11 @@ function startConversationsRetention() {
|
|
|
7358
7395
|
);
|
|
7359
7396
|
return;
|
|
7360
7397
|
}
|
|
7361
|
-
if (
|
|
7398
|
+
if (swept.deleted > 0) {
|
|
7362
7399
|
acted("conversations_retention");
|
|
7400
|
+
const what = swept.mode === "purge" ? `PERMANENTLY DELETED ${swept.purged}` : `archived ${swept.archived}`;
|
|
7363
7401
|
process.stderr.write(
|
|
7364
|
-
`[exed] Conversations retention:
|
|
7402
|
+
`[exed] Conversations retention: ${what} messages older than ${days}d
|
|
7365
7403
|
`
|
|
7366
7404
|
);
|
|
7367
7405
|
}
|
|
@@ -7377,7 +7415,7 @@ function startConversationsRetention() {
|
|
|
7377
7415
|
const timer = setInterval(() => void traceDaemonTimer("conversations_retention", tick), CONVERSATIONS_RETENTION_INTERVAL_MS);
|
|
7378
7416
|
timer.unref();
|
|
7379
7417
|
process.stderr.write(
|
|
7380
|
-
`[exed] Conversations retention started (every 6h, retention: ${CONVERSATIONS_RETENTION_DAYS ?? 90} days)
|
|
7418
|
+
`[exed] Conversations retention started (every 6h, retention: ${CONVERSATIONS_RETENTION_DAYS ?? 90} days, mode: ${CONVERSATIONS_RETENTION_MODE === "purge" ? "purge (irreversible)" : "archive"})
|
|
7381
7419
|
`
|
|
7382
7420
|
);
|
|
7383
7421
|
}
|
|
@@ -7386,7 +7424,7 @@ function startIntercomQueueDrain() {
|
|
|
7386
7424
|
const tick = async () => traceDaemonTimer("intercom_queue_drain", async () => {
|
|
7387
7425
|
fired("intercom_queue_drain");
|
|
7388
7426
|
try {
|
|
7389
|
-
const { drainQueueAsync, readQueue } = await import("../intercom-queue-
|
|
7427
|
+
const { drainQueueAsync, readQueue } = await import("../intercom-queue-OE25GJF2.js");
|
|
7390
7428
|
const {
|
|
7391
7429
|
sendIntercomAsync: centralSendIntercomAsync,
|
|
7392
7430
|
countScopedPendingReviews,
|
|
@@ -7518,7 +7556,7 @@ function startLedgerDrain() {
|
|
|
7518
7556
|
const tick = async () => traceDaemonTimer("ledger_drain", async () => {
|
|
7519
7557
|
fired("ledger_drain");
|
|
7520
7558
|
try {
|
|
7521
|
-
const { isLedgerEnabled, drainLedger } = await import("../notification-ledger-
|
|
7559
|
+
const { isLedgerEnabled, drainLedger } = await import("../notification-ledger-KLD6GZTG.js");
|
|
7522
7560
|
if (!isLedgerEnabled()) return;
|
|
7523
7561
|
const result = await drainLedger({
|
|
7524
7562
|
// Shadow "would-deliver": idle target = would-deliver, busy = retry.
|
|
@@ -7558,7 +7596,7 @@ function startOrphanReaper() {
|
|
|
7558
7596
|
fired("orphan_reaper");
|
|
7559
7597
|
if (sweepStarved("orphan_reaper")) return;
|
|
7560
7598
|
try {
|
|
7561
|
-
const { reapOrphanedMcpProcesses, createOrphanReaperRealDepsAsync } = await import("../daemon-orchestration-
|
|
7599
|
+
const { reapOrphanedMcpProcesses, createOrphanReaperRealDepsAsync } = await import("../daemon-orchestration-76BOFDEP.js");
|
|
7562
7600
|
const deps = await createOrphanReaperRealDepsAsync();
|
|
7563
7601
|
const reaped = await reapOrphanedMcpProcesses(deps);
|
|
7564
7602
|
if (reaped.length > 0) acted("orphan_reaper");
|
|
@@ -7584,7 +7622,7 @@ function startZombieAgentReaper() {
|
|
|
7584
7622
|
fired("zombie_agent_reaper");
|
|
7585
7623
|
if (sweepStarved("zombie_agent_reaper")) return;
|
|
7586
7624
|
try {
|
|
7587
|
-
const { reapZombieAgentProcesses, createZombieAgentReaperRealDepsAsync } = await import("../daemon-orchestration-
|
|
7625
|
+
const { reapZombieAgentProcesses, createZombieAgentReaperRealDepsAsync } = await import("../daemon-orchestration-76BOFDEP.js");
|
|
7588
7626
|
const deps = await createZombieAgentReaperRealDepsAsync();
|
|
7589
7627
|
const reaped = reapZombieAgentProcesses(deps);
|
|
7590
7628
|
if (reaped.length > 0) acted("zombie_agent_reaper");
|
|
@@ -7608,7 +7646,7 @@ async function startDaemonMemoryPressureWatchdog() {
|
|
|
7608
7646
|
try {
|
|
7609
7647
|
const cfg = await getCachedConfig();
|
|
7610
7648
|
if (!cfg) return;
|
|
7611
|
-
const { startMemoryPressureWatchdog: startWatchdog, MEMORY_PRESSURE_WATCHDOG_DEFAULTS } = await import("../memory-pressure-watchdog-
|
|
7649
|
+
const { startMemoryPressureWatchdog: startWatchdog, MEMORY_PRESSURE_WATCHDOG_DEFAULTS } = await import("../memory-pressure-watchdog-HR6TPOMT.js");
|
|
7612
7650
|
const watchdogCfg = {
|
|
7613
7651
|
...MEMORY_PRESSURE_WATCHDOG_DEFAULTS,
|
|
7614
7652
|
...cfg.memoryPressureWatchdog ?? {}
|
|
@@ -7640,7 +7678,7 @@ function startWorktreeReaper() {
|
|
|
7640
7678
|
fired("worktree_reaper");
|
|
7641
7679
|
if (sweepStarved("worktree_reaper")) return;
|
|
7642
7680
|
try {
|
|
7643
|
-
const { reapOrphanedWorktrees, createWorktreeReaperRealDeps } = await import("../daemon-orchestration-
|
|
7681
|
+
const { reapOrphanedWorktrees, createWorktreeReaperRealDeps } = await import("../daemon-orchestration-76BOFDEP.js");
|
|
7644
7682
|
const deps = await createWorktreeReaperRealDeps();
|
|
7645
7683
|
const result = await reapOrphanedWorktrees(deps);
|
|
7646
7684
|
if (result.pruned.length > 0) {
|
|
@@ -7684,8 +7722,8 @@ function startWorktreeReaper() {
|
|
|
7684
7722
|
}
|
|
7685
7723
|
return;
|
|
7686
7724
|
}
|
|
7687
|
-
const { cleanupAgentWorktree } = await import("../worktree-sweep-
|
|
7688
|
-
const { getMainRepoRootAsync } = await import("../worktree-
|
|
7725
|
+
const { cleanupAgentWorktree } = await import("../worktree-sweep-Q62ZIT3U.js");
|
|
7726
|
+
const { getMainRepoRootAsync } = await import("../worktree-NMWDVT6N.js");
|
|
7689
7727
|
const repoRoot = await getMainRepoRootAsync(signal.worktreePath);
|
|
7690
7728
|
if (repoRoot && signal.agentId) {
|
|
7691
7729
|
const notes = await cleanupAgentWorktree(repoRoot, signal.agentId);
|
|
@@ -7722,7 +7760,7 @@ function startAutoWake() {
|
|
|
7722
7760
|
if (!await ensureStoreForPolling()) return;
|
|
7723
7761
|
try {
|
|
7724
7762
|
const { getClient } = await import("./database.js");
|
|
7725
|
-
const { pollOrphanedTasks, createAutoWakeRealDeps } = await import("../daemon-orchestration-
|
|
7763
|
+
const { pollOrphanedTasks, createAutoWakeRealDeps } = await import("../daemon-orchestration-76BOFDEP.js");
|
|
7726
7764
|
const deps = createAutoWakeRealDeps(getClient, process.cwd(), getTmuxSessionsAsync);
|
|
7727
7765
|
const woken = await pollOrphanedTasks(deps);
|
|
7728
7766
|
if (woken.length > 0) acted("auto_wake");
|
|
@@ -7732,7 +7770,7 @@ function startAutoWake() {
|
|
|
7732
7770
|
}
|
|
7733
7771
|
if (sweepStarved("auto_wake_signals")) return;
|
|
7734
7772
|
try {
|
|
7735
|
-
const signalBase = path4.join(
|
|
7773
|
+
const signalBase = path4.join(os3.homedir(), ".exe-os", "task-signals");
|
|
7736
7774
|
try {
|
|
7737
7775
|
await access(signalBase);
|
|
7738
7776
|
} catch {
|
|
@@ -7741,7 +7779,7 @@ function startAutoWake() {
|
|
|
7741
7779
|
{
|
|
7742
7780
|
const { sendIntercomAsync, extractRootExe } = await import("./tmux-routing.js");
|
|
7743
7781
|
const { runBudgetedSweep } = await import("../sweep-budget-YGLCNXZZ.js");
|
|
7744
|
-
const sessionCache = path4.join(
|
|
7782
|
+
const sessionCache = path4.join(os3.homedir(), ".exe-os", "session-cache");
|
|
7745
7783
|
const sessions = await getTmuxSessionsAsync();
|
|
7746
7784
|
const signalDirs = [];
|
|
7747
7785
|
for (const entry of await readdir(signalBase, { withFileTypes: true })) {
|
|
@@ -7797,7 +7835,7 @@ function startAutoWake() {
|
|
|
7797
7835
|
if (age > 60 * 60 * 1e3) {
|
|
7798
7836
|
try {
|
|
7799
7837
|
await unlink(signalPath);
|
|
7800
|
-
void import("../orchestration-events-
|
|
7838
|
+
void import("../orchestration-events-CHY3GOJD.js").then(({ recordOrchestrationEventBestEffort: recordOE }) => {
|
|
7801
7839
|
recordOE({ eventType: "signal.stale", source: "exe-daemon.autoWake", severity: "warn", payload: { file, ageMinutes: Math.round(age / 6e4) } });
|
|
7802
7840
|
}).catch(() => {
|
|
7803
7841
|
});
|
|
@@ -7946,7 +7984,7 @@ function startStuckTaskRelease() {
|
|
|
7946
7984
|
createStaleClaimRealDeps,
|
|
7947
7985
|
escalateStuckBlockedTasks,
|
|
7948
7986
|
createStuckBlockedRealDeps
|
|
7949
|
-
} = await import("../daemon-orchestration-
|
|
7987
|
+
} = await import("../daemon-orchestration-76BOFDEP.js");
|
|
7950
7988
|
const { runBudgetedSweep } = await import("../sweep-budget-YGLCNXZZ.js");
|
|
7951
7989
|
const steps = [
|
|
7952
7990
|
async () => {
|
|
@@ -8174,7 +8212,7 @@ function startExternalRssWatchdog() {
|
|
|
8174
8212
|
restartBytes: RSS_RESTART_BYTES,
|
|
8175
8213
|
checkMs: RSS_CHECK_INTERVAL_MS,
|
|
8176
8214
|
markerPath: OOM_MARKER_PATH,
|
|
8177
|
-
cwd:
|
|
8215
|
+
cwd: os3.homedir(),
|
|
8178
8216
|
// Resolved on the main thread — the worker cannot import config.ts.
|
|
8179
8217
|
killLedgerPath: killAttributionLogPath(),
|
|
8180
8218
|
// External path can't GC the daemon → require one extra consecutive sample
|
|
@@ -8211,12 +8249,12 @@ function startTaskEnforcementScanner() {
|
|
|
8211
8249
|
const tick = async () => traceDaemonTimer("task_enforcement", async () => {
|
|
8212
8250
|
fired("task_enforcement");
|
|
8213
8251
|
try {
|
|
8214
|
-
const { runTaskEnforcementTick } = await import("../task-enforcement-
|
|
8252
|
+
const { runTaskEnforcementTick } = await import("../task-enforcement-JDMBAAOY.js");
|
|
8215
8253
|
const { getTransport } = await import("./transport.js");
|
|
8216
8254
|
const { loadAgentConfig } = await import("./agent-config.js");
|
|
8217
8255
|
const { getClient } = await import("./database.js");
|
|
8218
8256
|
const { loadEmployeesSync } = await import("./employees.js");
|
|
8219
|
-
const { sessionScopeFilter } = await import("../task-scope-
|
|
8257
|
+
const { sessionScopeFilter } = await import("../task-scope-32HQEV6W.js");
|
|
8220
8258
|
const transport = getTransport();
|
|
8221
8259
|
const { sessions: allSessions, paneCache, aliveSessions } = await getSharedOrchestrationCaches();
|
|
8222
8260
|
await yieldToEventLoop();
|
|
@@ -8227,10 +8265,10 @@ function startTaskEnforcementScanner() {
|
|
|
8227
8265
|
sendKeysLiteral: transport.sendKeysLiteral?.bind(transport),
|
|
8228
8266
|
isAlive: (session) => aliveSessions.has(session)
|
|
8229
8267
|
};
|
|
8230
|
-
const { checkAutoWakeGates } = await import("../daemon-orchestration-
|
|
8268
|
+
const { checkAutoWakeGates } = await import("../daemon-orchestration-76BOFDEP.js");
|
|
8231
8269
|
const { ensureEmployeeAsync, employeeSessionName, sendIntercomAsync } = await import("./tmux-routing.js");
|
|
8232
8270
|
const { shouldAutoInstance } = await import("./employees.js");
|
|
8233
|
-
const { recordOrchestrationEventBestEffort } = await import("../orchestration-events-
|
|
8271
|
+
const { recordOrchestrationEventBestEffort } = await import("../orchestration-events-CHY3GOJD.js");
|
|
8234
8272
|
const projectDir = process.cwd();
|
|
8235
8273
|
await runTaskEnforcementTick({
|
|
8236
8274
|
transport: enforcementTransport,
|
|
@@ -8560,7 +8598,7 @@ async function sweepExpiredTracesFromDaemonTimer() {
|
|
|
8560
8598
|
const memoryIds = idsResult.rows.map((r) => String(r.id)).filter(Boolean);
|
|
8561
8599
|
if (memoryIds.length === 0) return 0;
|
|
8562
8600
|
const { getClient } = await import("./database.js");
|
|
8563
|
-
const { cleanupGraphLinksForMemories, cleanupCardsForMemories } = await import("../graph-rag-
|
|
8601
|
+
const { cleanupGraphLinksForMemories, cleanupCardsForMemories } = await import("../graph-rag-H24CMFP2.js");
|
|
8564
8602
|
const client = getClient();
|
|
8565
8603
|
await cleanupGraphLinksForMemories(client, memoryIds);
|
|
8566
8604
|
await cleanupCardsForMemories(client, memoryIds);
|
|
@@ -8667,6 +8705,61 @@ function readOnDiskPackageVersion() {
|
|
|
8667
8705
|
return PACKAGE_VERSION;
|
|
8668
8706
|
}
|
|
8669
8707
|
}
|
|
8708
|
+
var HOOK_LIVENESS_CHECK_INTERVAL_MS = 10 * 6e4;
|
|
8709
|
+
var HOOK_LIVENESS_REALERT_MS = 60 * 6e4;
|
|
8710
|
+
var _hookLivenessSignature = null;
|
|
8711
|
+
var _hookLivenessLastAlertAt = 0;
|
|
8712
|
+
function startHookRegistrationWatch() {
|
|
8713
|
+
const tick = async () => {
|
|
8714
|
+
fired("hook_liveness_watch");
|
|
8715
|
+
let report;
|
|
8716
|
+
try {
|
|
8717
|
+
const mod = await import("../hook-registration-liveness-NGQRFKAA.js");
|
|
8718
|
+
report = mod.auditRegisteredHookLiveness();
|
|
8719
|
+
if (report.ok) {
|
|
8720
|
+
if (_hookLivenessSignature !== null) {
|
|
8721
|
+
process.stderr.write(
|
|
8722
|
+
`[exed] Hook liveness RECOVERED \u2014 all ${report.probes.length} registered exe-os hook(s) present
|
|
8723
|
+
`
|
|
8724
|
+
);
|
|
8725
|
+
}
|
|
8726
|
+
_hookLivenessSignature = null;
|
|
8727
|
+
return;
|
|
8728
|
+
}
|
|
8729
|
+
const signature = report.broken.map((probe) => `${probe.runtime}/${probe.event}:${probe.status}:${probe.target ?? probe.command}`).sort().join("|");
|
|
8730
|
+
const changed = signature !== _hookLivenessSignature;
|
|
8731
|
+
const stale = Date.now() - _hookLivenessLastAlertAt > HOOK_LIVENESS_REALERT_MS;
|
|
8732
|
+
_hookLivenessSignature = signature;
|
|
8733
|
+
if (!changed && !stale) return;
|
|
8734
|
+
acted("hook_liveness_watch");
|
|
8735
|
+
_hookLivenessLastAlertAt = Date.now();
|
|
8736
|
+
process.stderr.write(`[exed] [HOOKS DEAD] ${mod.formatHookLivenessFailure(report)}
|
|
8737
|
+
`);
|
|
8738
|
+
try {
|
|
8739
|
+
const { pushNotifyAsync: pushNotifyAsync2 } = await import("../push-notifications-XC6EQEXF.js");
|
|
8740
|
+
pushNotifyAsync2({
|
|
8741
|
+
event: "hooks_dead",
|
|
8742
|
+
title: `${report.broken.length} exe-os hook(s) cannot run`,
|
|
8743
|
+
body: `${report.broken.map((probe) => `${probe.event} (${probe.status})`).join(", ")} \u2014 hooks are non-blocking, so sessions look healthy while capture and enforcement are dead. Re-run the exe-os installer.`,
|
|
8744
|
+
priority: "urgent"
|
|
8745
|
+
});
|
|
8746
|
+
} catch {
|
|
8747
|
+
}
|
|
8748
|
+
} catch (err) {
|
|
8749
|
+
process.stderr.write(
|
|
8750
|
+
`[exed] hook-liveness probe failed (non-fatal): ${err instanceof Error ? err.message : String(err)}
|
|
8751
|
+
`
|
|
8752
|
+
);
|
|
8753
|
+
}
|
|
8754
|
+
};
|
|
8755
|
+
void traceDaemonTimer("hook_liveness_watch", tick);
|
|
8756
|
+
const timer = setInterval(() => void traceDaemonTimer("hook_liveness_watch", tick), HOOK_LIVENESS_CHECK_INTERVAL_MS);
|
|
8757
|
+
timer.unref();
|
|
8758
|
+
process.stderr.write(
|
|
8759
|
+
`[exed] Hook-liveness watch started (every ${HOOK_LIVENESS_CHECK_INTERVAL_MS / 6e4}min)
|
|
8760
|
+
`
|
|
8761
|
+
);
|
|
8762
|
+
}
|
|
8670
8763
|
function startDistDriftWatch() {
|
|
8671
8764
|
if (!DIST_DIR) {
|
|
8672
8765
|
process.stderr.write("[exed] Dist-drift watch skipped \u2014 could not resolve dist dir\n");
|
|
@@ -9089,7 +9182,7 @@ try {
|
|
|
9089
9182
|
process.env.EXE_IS_DAEMON = "1";
|
|
9090
9183
|
if (process.platform === "darwin") {
|
|
9091
9184
|
try {
|
|
9092
|
-
const oldPlist = path4.join(
|
|
9185
|
+
const oldPlist = path4.join(os3.homedir(), "Library", "LaunchAgents", "com.askexe.exed-keepalive.plist");
|
|
9093
9186
|
if (existsSync7(oldPlist)) {
|
|
9094
9187
|
try {
|
|
9095
9188
|
execSyncNode(`launchctl unload "${oldPlist}" 2>/dev/null`, { timeout: 5e3 });
|
|
@@ -9115,8 +9208,8 @@ void (async () => {
|
|
|
9115
9208
|
})();
|
|
9116
9209
|
function isCpuStarved() {
|
|
9117
9210
|
const ratio = parseFloat(process.env.EXE_STARVATION_LOAD_RATIO ?? "1.5");
|
|
9118
|
-
const load1m =
|
|
9119
|
-
const cpuCount =
|
|
9211
|
+
const load1m = os3.loadavg()[0] ?? 0;
|
|
9212
|
+
const cpuCount = os3.cpus().length || 1;
|
|
9120
9213
|
return isHostCpuStarved(load1m, cpuCount, ratio);
|
|
9121
9214
|
}
|
|
9122
9215
|
async function runSmokeTests() {
|
|
@@ -9244,7 +9337,7 @@ function startEventLoopLagDetector() {
|
|
|
9244
9337
|
let lastTick = monotonicNowMs();
|
|
9245
9338
|
let clockProbe = captureClockProbe();
|
|
9246
9339
|
let lastCpu = process.cpuUsage();
|
|
9247
|
-
const sumHostCpuMs = () => totalHostCpuMs(
|
|
9340
|
+
const sumHostCpuMs = () => totalHostCpuMs(os3.cpus());
|
|
9248
9341
|
let lastHostCpuMs = sumHostCpuMs();
|
|
9249
9342
|
const SELF_CPU_BUSY_RATIO = parseFloat(process.env.EXE_SELF_CPU_BUSY_RATIO ?? "") || 0.5;
|
|
9250
9343
|
const SELF_INFLICTED_LIMIT = parseInt(process.env.EXE_SELF_INFLICTED_LIMIT ?? "") || 5;
|
|
@@ -9262,7 +9355,7 @@ function startEventLoopLagDetector() {
|
|
|
9262
9355
|
touchEventLoopHeartbeat();
|
|
9263
9356
|
const wallElapsedMs = monotonicElapsedMs(lastTick);
|
|
9264
9357
|
const lag = wallElapsedMs - 2e3;
|
|
9265
|
-
const sampledLoad1m =
|
|
9358
|
+
const sampledLoad1m = os3.loadavg()[0] ?? 0;
|
|
9266
9359
|
const loadWindow = updateLoadWindow(loadSamples, Date.now(), sampledLoad1m, wallElapsedMs, LOAD_SAMPLE_KEEP_MS);
|
|
9267
9360
|
loadSamples = loadWindow.samples;
|
|
9268
9361
|
const cpuDelta = process.cpuUsage(lastCpu);
|
|
@@ -9270,7 +9363,7 @@ function startEventLoopLagDetector() {
|
|
|
9270
9363
|
const hostCpuNowMs = sumHostCpuMs();
|
|
9271
9364
|
const previousHostCpuMs = lastHostCpuMs;
|
|
9272
9365
|
lastHostCpuMs = hostCpuNowMs;
|
|
9273
|
-
const hostCoreCountRaw =
|
|
9366
|
+
const hostCoreCountRaw = os3.cpus().length;
|
|
9274
9367
|
const hostCoreCount = hostCoreCountRaw > 0 ? hostCoreCountRaw : void 0;
|
|
9275
9368
|
const hostTickFraction = hostTickFractionFor(previousHostCpuMs, hostCpuNowMs, hostCoreCount, wallElapsedMs);
|
|
9276
9369
|
const selfCpuBusyFraction = wallElapsedMs > 0 ? (cpuDelta.user + cpuDelta.system) / 1e3 / wallElapsedMs : 0;
|
|
@@ -9317,7 +9410,7 @@ function startEventLoopLagDetector() {
|
|
|
9317
9410
|
setLastStallClass("blocked", lag);
|
|
9318
9411
|
process.stderr.write(msg + "\n");
|
|
9319
9412
|
logDaemonHealth({ event: "event_loop_blocked", pid: process.pid, message: msg, data: { lagMs: lag } });
|
|
9320
|
-
void import("../orchestration-events-
|
|
9413
|
+
void import("../orchestration-events-CHY3GOJD.js").then(({ recordOrchestrationEventBestEffort: recordOE }) => {
|
|
9321
9414
|
recordOE({ eventType: "daemon.event_loop_blocked", source: "exe-daemon.lagDetector", severity: "error", durationMs: lag });
|
|
9322
9415
|
}).catch(() => {
|
|
9323
9416
|
});
|
|
@@ -9330,8 +9423,8 @@ function startEventLoopLagDetector() {
|
|
|
9330
9423
|
}
|
|
9331
9424
|
clearDaemonReady();
|
|
9332
9425
|
try {
|
|
9333
|
-
const load1m2 =
|
|
9334
|
-
const cpuCount2 =
|
|
9426
|
+
const load1m2 = os3.loadavg()[0] ?? 0;
|
|
9427
|
+
const cpuCount2 = os3.cpus().length || 1;
|
|
9335
9428
|
logDaemonHealth({
|
|
9336
9429
|
event: "orchestration_health",
|
|
9337
9430
|
pid: process.pid,
|
|
@@ -9342,7 +9435,7 @@ function startEventLoopLagDetector() {
|
|
|
9342
9435
|
}
|
|
9343
9436
|
const load1m = sampledLoad1m;
|
|
9344
9437
|
const maxLoad1mOverWindow = loadWindow.maxLoad1mOverWindow;
|
|
9345
|
-
const cpuCount =
|
|
9438
|
+
const cpuCount = os3.cpus().length || 1;
|
|
9346
9439
|
const starvationRatio = resolveSelfHealThresholds().starvationRatio;
|
|
9347
9440
|
const catchUpActive = inBootCatchUpGrace();
|
|
9348
9441
|
const decision = decideDaemonSelfHeal({
|
|
@@ -9479,7 +9572,7 @@ function startTaskFileResync() {
|
|
|
9479
9572
|
const { getClient } = await import("./database.js");
|
|
9480
9573
|
const { runBudgetedSweep } = await import("../sweep-budget-YGLCNXZZ.js");
|
|
9481
9574
|
const client = getClient();
|
|
9482
|
-
const tasksRoot = path4.join(
|
|
9575
|
+
const tasksRoot = path4.join(os3.homedir(), ".exe-os", "tasks");
|
|
9483
9576
|
let synced = 0;
|
|
9484
9577
|
const paths = [];
|
|
9485
9578
|
let fileCount = 0;
|
|
@@ -9522,7 +9615,7 @@ function startTaskFileResync() {
|
|
|
9522
9615
|
});
|
|
9523
9616
|
if (Number(res.rowsAffected ?? 0) > 0) {
|
|
9524
9617
|
synced++;
|
|
9525
|
-
void import("../orchestration-events-
|
|
9618
|
+
void import("../orchestration-events-CHY3GOJD.js").then(({ recordOrchestrationEventBestEffort: recordOE }) => {
|
|
9526
9619
|
recordOE({
|
|
9527
9620
|
eventType: "task_file.resynced",
|
|
9528
9621
|
source: "exe-daemon.taskFileResync",
|
|
@@ -9556,7 +9649,7 @@ function startTaskGroupBarriers() {
|
|
|
9556
9649
|
fired("task_group_barriers");
|
|
9557
9650
|
if (!await ensureStoreForPolling()) return;
|
|
9558
9651
|
try {
|
|
9559
|
-
const { pollTaskGroupBarriers } = await import("../daemon-orchestration-
|
|
9652
|
+
const { pollTaskGroupBarriers } = await import("../daemon-orchestration-76BOFDEP.js");
|
|
9560
9653
|
const firedCount = await pollTaskGroupBarriers();
|
|
9561
9654
|
if (firedCount > 0) {
|
|
9562
9655
|
acted("task_group_barriers");
|
|
@@ -9578,7 +9671,7 @@ function startCheckpointGc() {
|
|
|
9578
9671
|
fired("checkpoint_gc");
|
|
9579
9672
|
if (!await ensureStoreForPolling()) return;
|
|
9580
9673
|
try {
|
|
9581
|
-
const { gcStaleCheckpoints } = await import("../daemon-orchestration-
|
|
9674
|
+
const { gcStaleCheckpoints } = await import("../daemon-orchestration-76BOFDEP.js");
|
|
9582
9675
|
const cleared = await gcStaleCheckpoints();
|
|
9583
9676
|
if (cleared > 0) {
|
|
9584
9677
|
acted("checkpoint_gc");
|
|
@@ -9618,14 +9711,14 @@ function startDispatchAckCleanup() {
|
|
|
9618
9711
|
function startProjectionWorkerDeferred() {
|
|
9619
9712
|
setTimeout(async () => {
|
|
9620
9713
|
try {
|
|
9621
|
-
const { startProjectionWorker } = await import("../projection-worker-
|
|
9714
|
+
const { startProjectionWorker } = await import("../projection-worker-KLE3IZQ2.js");
|
|
9622
9715
|
startProjectionWorker();
|
|
9623
9716
|
} catch {
|
|
9624
9717
|
}
|
|
9625
9718
|
}, 2e4);
|
|
9626
9719
|
}
|
|
9627
9720
|
async function startToolTelemetry() {
|
|
9628
|
-
const { startToolTelemetryFlush } = await import("../tool-telemetry-
|
|
9721
|
+
const { startToolTelemetryFlush } = await import("../tool-telemetry-VUP7S6HC.js");
|
|
9629
9722
|
startToolTelemetryFlush();
|
|
9630
9723
|
process.stderr.write("[exed] Tool telemetry started (flush every 5m)\n");
|
|
9631
9724
|
}
|
|
@@ -9651,6 +9744,7 @@ function startServerModeTimers() {
|
|
|
9651
9744
|
void startToolTelemetry();
|
|
9652
9745
|
startProjectionWorkerDeferred();
|
|
9653
9746
|
setTimeout(startDistDriftWatch, 3e4);
|
|
9747
|
+
setTimeout(startHookRegistrationWatch, 4e4);
|
|
9654
9748
|
}
|
|
9655
9749
|
function startLocalFirstTimers() {
|
|
9656
9750
|
startMemoryQueueDrain();
|
|
@@ -9667,6 +9761,7 @@ function startLocalFirstTimers() {
|
|
|
9667
9761
|
startIdleKill();
|
|
9668
9762
|
startRssWatchdog();
|
|
9669
9763
|
setTimeout(startDistDriftWatch, 3e4);
|
|
9764
|
+
setTimeout(startHookRegistrationWatch, 4e4);
|
|
9670
9765
|
startOrchestrationTimer();
|
|
9671
9766
|
setTimeout(startWalCheckpoint, 5e3);
|
|
9672
9767
|
startTaskFileResync();
|
|
@@ -9743,6 +9838,7 @@ function startLocalFirstTimers() {
|
|
|
9743
9838
|
setTimeout(() => void traceDaemonTimer("background_job_guardrails_start", () => startBackgroundJobGuardrails()), 6e4);
|
|
9744
9839
|
setTimeout(startWorktreeReaper, 12e4);
|
|
9745
9840
|
setTimeout(startStaleBranchSweep, 2e5);
|
|
9841
|
+
setTimeout(() => void maybeScheduleBugLandedReconcile(), 26e4);
|
|
9746
9842
|
setTimeout(startStalledDispatchSweep, 21e4);
|
|
9747
9843
|
setTimeout(startZombieAgentReaper, 25e3);
|
|
9748
9844
|
setTimeout(() => void startDaemonMemoryPressureWatchdog(), 3e4);
|
|
@@ -9750,7 +9846,7 @@ function startLocalFirstTimers() {
|
|
|
9750
9846
|
fired("intercom_dedup_cleanup");
|
|
9751
9847
|
if (_intercomDedupCompleted) return;
|
|
9752
9848
|
try {
|
|
9753
|
-
const markerPath = path4.join(
|
|
9849
|
+
const markerPath = path4.join(os3.homedir(), ".exe-os", ".intercom-dedup-done");
|
|
9754
9850
|
try {
|
|
9755
9851
|
await access(markerPath);
|
|
9756
9852
|
_intercomDedupCompleted = true;
|
|
@@ -9795,7 +9891,7 @@ function startLocalFirstTimers() {
|
|
|
9795
9891
|
fired("orphan_task_cleanup");
|
|
9796
9892
|
try {
|
|
9797
9893
|
if (!await ensureStoreForPolling()) return;
|
|
9798
|
-
const { cleanOrphanedTaskFiles } = await import("../tasks-crud-
|
|
9894
|
+
const { cleanOrphanedTaskFiles } = await import("../tasks-crud-CYKUKS3F.js");
|
|
9799
9895
|
const count = await cleanOrphanedTaskFiles();
|
|
9800
9896
|
if (count > 0) {
|
|
9801
9897
|
acted("orphan_task_cleanup");
|
|
@@ -9811,7 +9907,7 @@ function startLocalFirstTimers() {
|
|
|
9811
9907
|
fired("task_file_consistency");
|
|
9812
9908
|
try {
|
|
9813
9909
|
if (!await ensureStoreForPolling()) return;
|
|
9814
|
-
const { checkTaskFileConsistency } = await import("../tasks-crud-
|
|
9910
|
+
const { checkTaskFileConsistency } = await import("../tasks-crud-CYKUKS3F.js");
|
|
9815
9911
|
const mismatches = await checkTaskFileConsistency();
|
|
9816
9912
|
if (mismatches > 0) {
|
|
9817
9913
|
acted("task_file_consistency");
|
|
@@ -9830,7 +9926,7 @@ function startLocalFirstTimers() {
|
|
|
9830
9926
|
const TELEMETRY_DAILY_MS = 24 * 60 * 60 * 1e3;
|
|
9831
9927
|
const telemetryDaily = async () => {
|
|
9832
9928
|
try {
|
|
9833
|
-
const { sendTelemetry, isTelemetryEnabled } = await import("../telemetry-upload-
|
|
9929
|
+
const { sendTelemetry, isTelemetryEnabled } = await import("../telemetry-upload-WLUMEFAB.js");
|
|
9834
9930
|
if (!isTelemetryEnabled()) return;
|
|
9835
9931
|
const { upstream } = await sendTelemetry(24);
|
|
9836
9932
|
if (upstream.startsWith("sent")) {
|
|
@@ -10012,7 +10108,7 @@ try {
|
|
|
10012
10108
|
try {
|
|
10013
10109
|
coverageGapNowMs = Date.now();
|
|
10014
10110
|
coverageGapLastHeartbeatTs = readLastHeartbeatTsMs();
|
|
10015
|
-
coverageGapHostBootTs = hostBootTimeMs(coverageGapNowMs,
|
|
10111
|
+
coverageGapHostBootTs = hostBootTimeMs(coverageGapNowMs, os3.uptime());
|
|
10016
10112
|
const rawThreshold = Number(process.env.EXE_COVERAGE_GAP_THRESHOLD_MS);
|
|
10017
10113
|
coverageGap = assessCoverageGap({
|
|
10018
10114
|
lastHeartbeatTs: coverageGapLastHeartbeatTs,
|
|
@@ -10073,7 +10169,7 @@ try {
|
|
|
10073
10169
|
});
|
|
10074
10170
|
}
|
|
10075
10171
|
try {
|
|
10076
|
-
const { initOrgPartnerRuntime } = await import("../org-partner-runtime-
|
|
10172
|
+
const { initOrgPartnerRuntime } = await import("../org-partner-runtime-TH3LMPII.js");
|
|
10077
10173
|
await initOrgPartnerRuntime();
|
|
10078
10174
|
} catch (err) {
|
|
10079
10175
|
process.stderr.write(
|
|
@@ -10098,6 +10194,15 @@ try {
|
|
|
10098
10194
|
);
|
|
10099
10195
|
});
|
|
10100
10196
|
startEventLoopLagDetector();
|
|
10197
|
+
try {
|
|
10198
|
+
const { startMaintenanceLane, isMaintenanceLaneEnabled } = await import("../maintenance-worker-54VZTFIK.js");
|
|
10199
|
+
if (isMaintenanceLaneEnabled()) {
|
|
10200
|
+
startMaintenanceLane();
|
|
10201
|
+
}
|
|
10202
|
+
} catch (err) {
|
|
10203
|
+
process.stderr.write(`[exed] Maintenance lane start failed (non-fatal): ${err instanceof Error ? err.message : String(err)}
|
|
10204
|
+
`);
|
|
10205
|
+
}
|
|
10101
10206
|
if (SERVER_MODE) {
|
|
10102
10207
|
startServerModeTimers();
|
|
10103
10208
|
} else {
|
|
@@ -10122,12 +10227,18 @@ try {
|
|
|
10122
10227
|
process.exit(1);
|
|
10123
10228
|
}
|
|
10124
10229
|
export {
|
|
10230
|
+
__getCloudSyncCountersForTests,
|
|
10231
|
+
__resetCloudSyncStateForTests,
|
|
10232
|
+
__setCloudSyncScheduleDeferredRetryForTests,
|
|
10125
10233
|
creditedOutsideParkLagMs,
|
|
10126
10234
|
decidePortHolderAction,
|
|
10127
10235
|
getLastBlockingTimer,
|
|
10236
|
+
handleCloudSyncError,
|
|
10237
|
+
handleCloudSyncResult,
|
|
10128
10238
|
injectRegisterAllTools,
|
|
10129
10239
|
isCrashLoopBreakerActive,
|
|
10130
10240
|
isEventLoopBlockedNow,
|
|
10241
|
+
persistCloudSyncState,
|
|
10131
10242
|
recordDaemonCrash,
|
|
10132
10243
|
requiresV1BearerAuth,
|
|
10133
10244
|
rerankViaWorker,
|