@askexenow/exe-os 0.9.341 → 0.9.342
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/README.md +159 -196
- package/deploy/compose/.env.customer.example +1 -0
- package/deploy/compose/.env.example +1 -0
- package/deploy/compose/docker-compose.yml +13 -4
- package/deploy/compose/generate-env.ts +4 -0
- package/dist/{active-agent-AIQP4DFL.js → active-agent-PVGE57FY.js} +5 -5
- package/dist/{active-agent-LW45DSJ4.js → active-agent-TNIO6IY3.js} +5 -5
- package/dist/{agentic-ontology-RVUNRCQY.js → agentic-ontology-3FXYMHKW.js} +1 -1
- package/dist/{backfill-gate-J7UXFNXU.js → backfill-gate-65LSYVE5.js} +3 -3
- package/dist/{backfill-metadata-ZSDJ4O2T.js → backfill-metadata-ZSMZC45J.js} +8 -8
- package/dist/{background-jobs-STURKDCS.js → background-jobs-EXR5RVGG.js} +3 -3
- package/dist/{backup-verify-ZAJLEL4X.js → backup-verify-3Y2FHGZU.js} +4 -4
- package/dist/{behaviors-EO7KCP3H.js → behaviors-KYRB3NGJ.js} +9 -9
- package/dist/bin/age-ontology-load.js +3 -3
- package/dist/bin/agentic-ontology-backfill.js +10 -10
- package/dist/bin/agentic-reflection-backfill.js +11 -11
- package/dist/bin/agentic-semantic-label.js +10 -10
- package/dist/bin/backfill-conversations.js +10 -10
- package/dist/bin/backfill-responses.js +10 -10
- package/dist/bin/backfill-vectors.js +14 -14
- package/dist/bin/bulk-sync-postgres.js +19 -19
- package/dist/bin/cc-doctor.js +10 -8
- package/dist/bin/cleanup-stale-review-tasks.js +25 -23
- package/dist/bin/cli.js +79 -25
- package/dist/bin/customer-readiness.js +1 -1
- package/dist/bin/deferred-daemon-restart.js +98 -92
- package/dist/bin/exe-agent-config.js +9 -8
- package/dist/bin/exe-agent.js +17 -17
- package/dist/bin/exe-assign.js +12 -12
- package/dist/bin/exe-boot.js +200 -67
- package/dist/bin/exe-call.js +7 -7
- package/dist/bin/exe-cloud.js +20 -20
- package/dist/bin/exe-config-dump.js +9 -8
- package/dist/bin/exe-dispatch.js +25 -23
- package/dist/bin/exe-doctor.js +10 -6
- package/dist/bin/exe-export-behaviors.js +11 -11
- package/dist/bin/exe-forget.js +12 -10
- package/dist/bin/exe-gateway.js +15 -10
- package/dist/bin/exe-grant.js +5 -5
- package/dist/bin/exe-healthcheck.js +14 -8
- package/dist/bin/exe-heartbeat.js +28 -27
- package/dist/bin/exe-kill.js +30 -28
- package/dist/bin/exe-launch-agent.js +128 -67
- package/dist/bin/exe-memory-reads.js +257 -0
- package/dist/bin/exe-new-employee.js +12 -11
- package/dist/bin/exe-pending-messages.js +26 -24
- package/dist/bin/exe-pending-notifications.js +25 -23
- package/dist/bin/exe-pending-reviews.js +25 -23
- package/dist/bin/exe-rename.js +7 -7
- package/dist/bin/exe-review.js +29 -27
- package/dist/bin/exe-search.js +11 -9
- package/dist/bin/exe-session-cleanup.js +115 -85
- package/dist/bin/exe-settings.js +24 -23
- package/dist/bin/exe-start-codex.js +163 -41
- package/dist/bin/exe-start-opencode.js +15 -15
- package/dist/bin/exe-status.js +26 -24
- package/dist/bin/exe-support.js +5 -5
- package/dist/bin/exe-team.js +5 -5
- package/dist/bin/exe-timers.js +32 -213
- package/dist/bin/exe-watchdog.js +6 -5
- package/dist/bin/git-sweep.js +26 -24
- package/dist/bin/graph-backfill.js +11 -11
- package/dist/bin/graph-export.js +9 -9
- package/dist/bin/import-history.js +13 -13
- package/dist/bin/install.js +103 -97
- package/dist/bin/intercom-check.js +4 -4
- package/dist/bin/mcp-sessions.js +2 -2
- package/dist/bin/orchestration-metrics.js +6 -6
- package/dist/bin/postgres-agentic-reflection-backfill.js +5 -5
- package/dist/bin/postgres-agentic-semantic-backfill.js +7 -7
- package/dist/bin/pre-publish.js +5 -3
- package/dist/bin/reconcile-backlog.js +2 -2
- package/dist/bin/registry-proxy.js +1 -1
- package/dist/bin/scan-tasks.js +25 -23
- package/dist/bin/setup.js +6 -5
- package/dist/bin/shard-migrate.js +9 -9
- package/dist/bin/stack-update.js +6 -6
- package/dist/bin/update.js +1 -1
- package/dist/bin/vps-health-gate.js +1 -1
- package/dist/{boot-generation-GSMPJOWM.js → boot-generation-BL2ISK4U.js} +5 -5
- package/dist/boot-review-sections-DBMQJT5N.js +107 -0
- package/dist/branch-hygiene-TZWK6QCF.js +224 -0
- package/dist/{branding-JTEOF4ZV.js → branding-DVXBGVDH.js} +3 -3
- package/dist/{browser-session-store-CXQMOSEC.js → browser-session-store-B2NR3LIX.js} +2 -1
- package/dist/{capability-cards-OBYQNAKZ.js → capability-cards-DN5UIKVN.js} +4 -4
- package/dist/{capacity-monitor-MG3FTUD5.js → capacity-monitor-ZG5GGFR2.js} +26 -24
- package/dist/{catchup-brief-BVJOF3GL.js → catchup-brief-D6HH6DWS.js} +31 -28
- package/dist/{chunk-Q5AIPSSC.js → chunk-25X4JD2V.js} +10 -6
- package/dist/{chunk-6MVI4QH2.js → chunk-2KZNGDSW.js} +1 -1
- package/dist/{chunk-WH7XN5ER.js → chunk-2WAVZ5UJ.js} +1 -1
- package/dist/{chunk-PTJBWC77.js → chunk-2ZYO73KO.js} +4 -3
- package/dist/{chunk-CLAYNAXC.js → chunk-3EUMUSLE.js} +1 -1
- package/dist/{chunk-BVV6NHKQ.js → chunk-3SW4OEHB.js} +5 -5
- package/dist/{task-enforcement-X5QVL6RE.js → chunk-4CMVFVFC.js} +173 -69
- package/dist/{chunk-2YCFNBC4.js → chunk-4J4PMPXZ.js} +3 -2
- package/dist/{chunk-EDOO23B2.js → chunk-4N2NRGCM.js} +2 -2
- package/dist/chunk-4QCFFW2H.js +378 -0
- package/dist/{chunk-6MVC43X7.js → chunk-4VSV5P4D.js} +2 -2
- package/dist/{chunk-HJX6NCJF.js → chunk-4ZCD2UWW.js} +39 -10
- package/dist/{chunk-C445WRUX.js → chunk-5ERDIOV3.js} +2 -2
- package/dist/chunk-5H47VHB7.js +30 -0
- package/dist/{chunk-BJ23BNED.js → chunk-5TY4FPH6.js} +1 -1
- package/dist/{chunk-WD55PEBM.js → chunk-6CH3TPHR.js} +3 -3
- package/dist/{chunk-TIXTHUVJ.js → chunk-6WQ3NNCE.js} +3 -3
- package/dist/{chunk-7LF5DS3A.js → chunk-6XWTQUO4.js} +1 -1
- package/dist/chunk-76CJBM36.js +88 -0
- package/dist/{chunk-NFBW7N4D.js → chunk-7CTRGNLW.js} +2 -2
- package/dist/{chunk-ITMEE7PQ.js → chunk-7V4JADD6.js} +3 -3
- package/dist/{chunk-RMOBQ6A5.js → chunk-AD2VCHSS.js} +1 -1
- package/dist/{chunk-DNVFWFYF.js → chunk-AJYCFKJR.js} +1 -1
- package/dist/chunk-AM7S2TY6.js +54 -0
- package/dist/{chunk-RWSLVYTE.js → chunk-AOHXREB7.js} +295 -67
- package/dist/{chunk-DGGDUKH6.js → chunk-ASAFVDVR.js} +1 -1
- package/dist/{chunk-NTI22F3R.js → chunk-BUCXNV32.js} +1 -1
- package/dist/{chunk-SHIICYJW.js → chunk-BYTDMAGB.js} +4 -2
- package/dist/{chunk-32SXNM3G.js → chunk-C5QAPURN.js} +1 -1
- package/dist/{chunk-BMHQPIJ2.js → chunk-CE7F6RHG.js} +585 -75
- package/dist/{chunk-YWQMWFYR.js → chunk-CNVBKDEY.js} +21 -15
- package/dist/{chunk-KPIN44GZ.js → chunk-CWXVH7WV.js} +1 -1
- package/dist/chunk-D74XYSA3.js +621 -0
- package/dist/{chunk-A47MXY2I.js → chunk-EQHQF5IM.js} +50 -32
- package/dist/{chunk-YHUNDGVV.js → chunk-EUS4QUKP.js} +1 -1
- package/dist/{chunk-6D2PI4QD.js → chunk-EV46QTD3.js} +1 -1
- package/dist/{chunk-N7A5D25S.js → chunk-F27XXN6C.js} +1 -1
- package/dist/{chunk-XQNNB5GY.js → chunk-F55P3H4S.js} +37 -2
- package/dist/{chunk-MWZFF3Q7.js → chunk-F5O7V7UK.js} +1 -1
- package/dist/{chunk-MC4ATFJV.js → chunk-FPFPLPUY.js} +6 -6
- package/dist/{chunk-UU4UINUX.js → chunk-G4RGKBCA.js} +2 -2
- package/dist/{chunk-HAZO7TRD.js → chunk-G5T6KDG4.js} +1 -1
- package/dist/{chunk-TWXZM34M.js → chunk-GBTTBXAF.js} +6 -6
- package/dist/{chunk-LA2Z6RMS.js → chunk-GDIJE6D7.js} +1 -1
- package/dist/{chunk-4QSJVMMT.js → chunk-GG5NDQNN.js} +2 -2
- package/dist/{chunk-6BQG7EKO.js → chunk-GJ26DULE.js} +2 -2
- package/dist/chunk-GL57PO3K.js +104 -0
- package/dist/chunk-GWDSB25T.js +6 -0
- package/dist/{chunk-HSYJ6DZ2.js → chunk-H6BV5TKD.js} +39 -24
- package/dist/{chunk-HCJCW7X4.js → chunk-H7I47RS5.js} +34 -1
- package/dist/{chunk-GFDGDFBF.js → chunk-HA5R6USD.js} +22 -5
- package/dist/{chunk-L2YGXJGF.js → chunk-HAF2DJYV.js} +3 -3
- package/dist/chunk-HJ447YER.js +224 -0
- package/dist/{chunk-6QW6JHRE.js → chunk-HV4KESRY.js} +59 -32
- package/dist/{chunk-BJOBR6P2.js → chunk-I26FWCSP.js} +216 -9
- package/dist/{chunk-X2FHTDIU.js → chunk-IBYL4DHM.js} +1 -1
- package/dist/{chunk-JCBKARSK.js → chunk-IOEUAQWP.js} +1 -1
- package/dist/{chunk-2UGGBIDL.js → chunk-JGIPOUIK.js} +3 -3
- package/dist/{chunk-LLU6WZLK.js → chunk-JLZ4RYSD.js} +2 -2
- package/dist/{chunk-WWNQFOSP.js → chunk-JMYHW3AL.js} +2 -2
- package/dist/{chunk-KP4PY2Z2.js → chunk-JPUZPAAF.js} +4 -4
- package/dist/{chunk-4LWV633D.js → chunk-JTBIS4R5.js} +1 -1
- package/dist/{chunk-PPZOWQHP.js → chunk-K7KFGDWF.js} +1 -1
- package/dist/{chunk-HNLXMD2V.js → chunk-KGWRTRKC.js} +2 -2
- package/dist/{chunk-IB336P52.js → chunk-KP3U5QGJ.js} +1 -1
- package/dist/{chunk-OUEFW4RK.js → chunk-KW2SD2FL.js} +2 -2
- package/dist/{chunk-2P4WJNN5.js → chunk-KWZMQACA.js} +11 -7
- package/dist/{chunk-ATKW3SYL.js → chunk-L2R3LN2P.js} +1 -1
- package/dist/{chunk-IELUDZAA.js → chunk-L4A5DL6Z.js} +3 -3
- package/dist/{chunk-2C455MU3.js → chunk-LU2FALL6.js} +3 -3
- package/dist/{chunk-LOBCQXV5.js → chunk-MKYFAKDW.js} +4 -4
- package/dist/{chunk-3BRVLPPA.js → chunk-MOPUCPXK.js} +4 -0
- package/dist/{chunk-BR4423AS.js → chunk-MR6LHP4F.js} +1 -1
- package/dist/chunk-MVYB76QG.js +341 -0
- package/dist/{chunk-ZNE6H2JO.js → chunk-MZM6EJCU.js} +4 -4
- package/dist/{chunk-FOV57K47.js → chunk-N7QJKQMX.js} +258 -14
- package/dist/{chunk-AYLNJGCS.js → chunk-NBZL5CGA.js} +93 -12
- package/dist/{chunk-YLQXP7T7.js → chunk-NN2B2QKU.js} +1 -1
- package/dist/chunk-NX5INHHG.js +40 -0
- package/dist/{chunk-B75BOKEI.js → chunk-NXUSDL37.js} +2 -2
- package/dist/{chunk-TPHCZDE3.js → chunk-O5V57XYE.js} +1 -1
- package/dist/chunk-O7LWR36Z.js +269 -0
- package/dist/{chunk-BV6GBSRP.js → chunk-OLMQ4UOF.js} +42 -10
- package/dist/{chunk-UIU2DGRV.js → chunk-OTF44GXL.js} +4 -4
- package/dist/{chunk-GOGSWXNZ.js → chunk-OZEBAGKR.js} +277 -137
- package/dist/{chunk-NDSNM5OH.js → chunk-P5HIWY2E.js} +1 -1
- package/dist/{chunk-MJB5ZFQM.js → chunk-PDWS3E22.js} +55 -4
- package/dist/{chunk-4FJZ6SO7.js → chunk-PPCDBE6Z.js} +1 -1
- package/dist/{chunk-7SEC2AG5.js → chunk-PQIDGXSG.js} +13 -4
- package/dist/chunk-PWUFMX75.js +186 -0
- package/dist/{chunk-GPW32HVB.js → chunk-QDGZJ653.js} +3 -3
- package/dist/{chunk-CYA5S5OD.js → chunk-QOO5RW3K.js} +6 -5
- package/dist/{chunk-IXBIVKWZ.js → chunk-QQ4E2RYW.js} +95 -18
- package/dist/{chunk-2WMTTIAZ.js → chunk-QRYVCDWS.js} +2 -2
- package/dist/{chunk-Z42MXYWW.js → chunk-QWVXN224.js} +110 -28
- package/dist/{chunk-XSMRR4IW.js → chunk-QYZJHTNE.js} +26 -27
- package/dist/{chunk-I7ECEP3W.js → chunk-R2NN3JKH.js} +43 -6
- package/dist/{chunk-B7CUBLF7.js → chunk-RACAOE2Z.js} +13 -13
- package/dist/{chunk-5RACW3LX.js → chunk-RAXVPNMR.js} +1 -1
- package/dist/{chunk-CMR64RYM.js → chunk-RHWZUUS4.js} +17 -17
- package/dist/{chunk-RNAYCUNM.js → chunk-S3THSOWV.js} +1 -1
- package/dist/{chunk-U2MREVXQ.js → chunk-S7QUM2UK.js} +2 -2
- package/dist/{chunk-SSTLTIF3.js → chunk-SKGMF2SO.js} +25 -2
- package/dist/{chunk-J6SEDDOR.js → chunk-SQKXKV2Y.js} +2 -2
- package/dist/{chunk-DPFQ2WQX.js → chunk-TLT7NZCW.js} +4 -4
- package/dist/chunk-TTCUG2CF.js +91 -0
- package/dist/{chunk-W6K4XB6G.js → chunk-UEA3LXOB.js} +1 -1
- package/dist/{chunk-WNKVKNOM.js → chunk-UNXQBELK.js} +1 -1
- package/dist/{chunk-KKOLHBNC.js → chunk-UP75Z5X7.js} +904 -167
- package/dist/{chunk-Y3S4H77G.js → chunk-USSB56WK.js} +1 -1
- package/dist/{chunk-PVIH3ZGV.js → chunk-UUEKJDK6.js} +90 -10
- package/dist/{chunk-T2PYVVZ5.js → chunk-UUQBZPJJ.js} +1 -1
- package/dist/{chunk-32YHCHWW.js → chunk-V3EEVY4L.js} +1 -1
- package/dist/{chunk-2IWBY7XK.js → chunk-VPZHJCKW.js} +2 -2
- package/dist/chunk-VRAQTFD6.js +265 -0
- package/dist/{chunk-EDH54E5A.js → chunk-VSRPS3J7.js} +14 -14
- package/dist/{chunk-5ZNY7IZI.js → chunk-WMESXBJM.js} +37 -3
- package/dist/{chunk-54QCG45Y.js → chunk-WOYADZF5.js} +56 -5
- package/dist/{chunk-7Y5UDEVM.js → chunk-WZHZCDDO.js} +6 -5
- package/dist/{chunk-3NGZ4PL7.js → chunk-X2Q5NLUL.js} +11 -2
- package/dist/{chunk-CCIEIRV2.js → chunk-X33NYQYJ.js} +2 -2
- package/dist/{chunk-K6KRBXQP.js → chunk-XHK3FS3W.js} +3 -2
- package/dist/{chunk-AP455LBW.js → chunk-XZXBB3TN.js} +2 -2
- package/dist/{chunk-JSKBHUR7.js → chunk-YCANDMI2.js} +2 -2
- package/dist/{chunk-YIIME2OW.js → chunk-YLXTKI6M.js} +1 -1
- package/dist/{chunk-LEJ25726.js → chunk-YTCFACP4.js} +650 -434
- package/dist/{chunk-HUSVERE6.js → chunk-Z6RSN7KS.js} +7 -6
- package/dist/{cleanup-graph-garbage-MXQ4Q2MA.js → cleanup-graph-garbage-XWUFAMFO.js} +8 -8
- package/dist/{co-activation-QI5BK4RT.js → co-activation-ZCHPLLP6.js} +4 -4
- package/dist/{co-occurrence-BYSQNZSV.js → co-occurrence-KG3LKALN.js} +6 -6
- package/dist/{code-context-index-BNBHDXHW.js → code-context-index-WSOJQ72R.js} +5 -5
- package/dist/{content-extractor-JRJDNIHP.js → content-extractor-NXYNEF5K.js} +2 -2
- package/dist/{conversation-entity-extractor-FPAMTL3C.js → conversation-entity-extractor-D3EFTLT4.js} +2 -2
- package/dist/{conversation-wiki-populator-WU4HEQ7C.js → conversation-wiki-populator-WQN3IUU6.js} +1 -1
- package/dist/{crdt-sync-ETPKNBCU.js → crdt-sync-4PFGPZXV.js} +8 -1
- package/dist/{crm-webhook-M566ZMZS.js → crm-webhook-II7Z45Q6.js} +2 -2
- package/dist/cto-delegation-gate-JWWOJPNC.js +669 -0
- package/dist/{daemon-auth-7IFSV5FG.js → daemon-auth-3FEAHFWC.js} +5 -3
- package/dist/{daemon-orchestration-XV5GN73R.js → daemon-orchestration-FX4XZDR5.js} +45 -26
- package/dist/{daemon-ready-RKKB4P6K.js → daemon-ready-4JTSFKAY.js} +1 -1
- package/dist/{daemon-ready-signal-WKEJQNRA.js → daemon-ready-signal-LPAZWQOV.js} +3 -1
- package/dist/daemon-restart-circuit-breaker-PEGEIP6H.js +35 -0
- package/dist/daemon-timer-report-NM44WQRH.js +25 -0
- package/dist/{db-backup-MX2G3CEK.js → db-backup-W2QFSYQC.js} +15 -5
- package/dist/{db-restore-events-JVEEP52Z.js → db-restore-events-MQ2DBGEQ.js} +2 -2
- package/dist/dispatch-ack-VYH3ONSS.js +27 -0
- package/dist/{doc-graph-extractor-LR5KMPH7.js → doc-graph-extractor-F6ODFIID.js} +6 -6
- package/dist/{documents-FA6N7QDA.js → documents-23WX2FPQ.js} +12 -12
- package/dist/dreaming-NWD22UQ5.js +46 -0
- package/dist/{exe-drift-TUKTCXZE.js → exe-drift-CW72FBGE.js} +5 -5
- package/dist/{exe-export-ZLHBXMZC.js → exe-export-AUJ7CV7G.js} +11 -11
- package/dist/{exe-import-VVKBZWSA.js → exe-import-JX4I52VE.js} +11 -11
- package/dist/{exe-key-QJXFBF6G.js → exe-key-2N6LY2BU.js} +242 -228
- package/dist/{exe-org-BGZNNE4H.js → exe-org-X4CSNCKS.js} +3 -3
- package/dist/{exe-snapshot-JRLUO645.js → exe-snapshot-XZ7FVCYZ.js} +30 -28
- package/dist/{fast-db-init-JKJEEHUI.js → fast-db-init-4CWHSOOR.js} +1 -1
- package/dist/{founder-context-HWPLMZVR.js → founder-context-7L3CFPYN.js} +4 -4
- package/dist/gateway/index.js +25 -25
- package/dist/{gateway-client-GRBOJQYC.js → gateway-client-7LMZKHTH.js} +1 -1
- package/dist/git-main-guard-UZP3KXYI.js +39 -0
- package/dist/{git-staleness-X5XZONX3.js → git-staleness-CI2R4QOJ.js} +4 -4
- package/dist/{global-procedures-VIIVWB6R.js → global-procedures-XQX3LUH6.js} +6 -6
- package/dist/{graph-auto-extract-HCQQF5AG.js → graph-auto-extract-OURWMGBS.js} +6 -6
- package/dist/{graph-rag-WAK2BRJH.js → graph-rag-JZZAB7PC.js} +2 -2
- package/dist/{hook-integrity-WURH6DS3.js → hook-integrity-XY47IM7G.js} +1 -1
- package/dist/hook-prefetch-PHRRKY4C.js +137 -0
- package/dist/hooks/bug-report-worker.js +31 -27
- package/dist/hooks/codex-stop-task-finalizer.js +31 -27
- package/dist/hooks/commit-complete.js +28 -26
- package/dist/hooks/error-recall.js +12 -11
- package/dist/hooks/exe-heartbeat-hook.js +6 -6
- package/dist/hooks/ingest-worker.js +11 -11
- package/dist/hooks/ingest.js +18 -18
- package/dist/hooks/instructions-loaded.js +7 -7
- package/dist/hooks/manifest.json +20 -20
- package/dist/hooks/notification.js +7 -7
- package/dist/hooks/post-compact.js +27 -25
- package/dist/hooks/post-tool-combined.js +12 -12
- package/dist/hooks/pre-compact.js +28 -26
- package/dist/hooks/pre-tool-use.js +179 -46
- package/dist/hooks/prompt-submit.js +323 -272
- package/dist/hooks/session-end.js +34 -32
- package/dist/hooks/session-start.js +28 -21
- package/dist/hooks/stop.js +34 -32
- package/dist/hooks/subagent-stop.js +27 -25
- package/dist/hooks/summary-worker.js +35 -33
- package/dist/index.js +40 -38
- package/dist/{installer-6IFVEQI4.js → installer-G3JAO3NT.js} +9 -9
- package/dist/{installer-NX2CLNV5.js → installer-JND3RJ6Q.js} +9 -9
- package/dist/{installer-T2LGHZKL.js → installer-L7EVH5U5.js} +9 -9
- package/dist/{intercom-queue-KYHXXZCQ.js → intercom-queue-ZFEQALR3.js} +24 -22
- package/dist/{key-backup-status-TNEHXA2X.js → key-backup-status-LOSMVATJ.js} +2 -2
- package/dist/lib/agent-config.js +4 -3
- package/dist/lib/cloud-sync.js +19 -19
- package/dist/lib/config.js +2 -2
- package/dist/lib/consolidation.js +11 -11
- package/dist/lib/crypto.js +3 -3
- package/dist/lib/database.js +6 -4
- package/dist/lib/db-daemon-client.js +5 -5
- package/dist/lib/db-read-worker-client.js +9 -3
- package/dist/lib/db.js +6 -4
- package/dist/lib/device-registry.js +3 -3
- package/dist/lib/embed-worker.js +2 -2
- package/dist/lib/embedder.js +5 -5
- package/dist/lib/employee-templates.js +7 -7
- package/dist/lib/employees.js +10 -4
- package/dist/lib/exe-daemon-client.js +4 -4
- package/dist/lib/exe-daemon.js +588 -164
- package/dist/lib/hybrid-search.js +11 -9
- package/dist/lib/identity.js +4 -4
- package/dist/lib/keychain.js +1 -1
- package/dist/lib/license.js +4 -4
- package/dist/lib/messaging.js +27 -23
- package/dist/lib/post-tool-memory.js +3 -3
- package/dist/lib/registry-proxy.js +1 -1
- package/dist/lib/reminders.js +15 -7
- package/dist/lib/schedules.js +9 -9
- package/dist/lib/session-registry.js +6 -6
- package/dist/lib/skill-learning.js +10 -10
- package/dist/lib/status-brief.js +4 -4
- package/dist/lib/store.js +8 -8
- package/dist/lib/task-router.js +5 -5
- package/dist/lib/tasks.js +28 -24
- package/dist/lib/tmux-routing.js +55 -24
- package/dist/lib/tmux-status.js +9 -3
- package/dist/lib/tmux-transport.js +1 -1
- package/dist/lib/token-spend.js +5 -5
- package/dist/lib/transport.js +2 -2
- package/dist/lib/ws-client.js +1 -1
- package/dist/{license-gate-MGDR4YNI.js → license-gate-QTRQHV4F.js} +5 -5
- package/dist/{license-sync-UWE6GEB4.js → license-sync-N3UJFWAW.js} +4 -4
- package/dist/mcp/register-tools.js +97 -91
- package/dist/mcp/server.js +99 -93
- package/dist/mcp/tools/complete-reminder.js +6 -6
- package/dist/mcp/tools/create-reminder.js +6 -6
- package/dist/mcp/tools/create-task.js +36 -27
- package/dist/mcp/tools/deactivate-behavior.js +11 -11
- package/dist/mcp/tools/list-reminders.js +6 -6
- package/dist/mcp/tools/list-tasks.js +34 -28
- package/dist/mcp/tools/send-message.js +27 -25
- package/dist/mcp/tools/update-task.js +33 -27
- package/dist/{mcp-http-config-RQLYEPTL.js → mcp-http-config-BDL36JZ3.js} +6 -6
- package/dist/{mcp-port-config-FFAMMLLE.js → mcp-port-config-6HYY6J7K.js} +2 -2
- package/dist/mcp-session-identity-T7H2EKFQ.js +177 -0
- package/dist/{memory-cards-VYQ5DPMR.js → memory-cards-ZRDW7QBX.js} +8 -8
- package/dist/{memory-graph-extractor-GX2HNYLU.js → memory-graph-extractor-QLXDMHRS.js} +7 -7
- package/dist/{memory-poisoning-defense-TX7627BD.js → memory-poisoning-defense-HJTXYCWH.js} +4 -4
- package/dist/{memory-pressure-watchdog-MLNNH26B.js → memory-pressure-watchdog-HN5X7AVN.js} +75 -36
- package/dist/{memory-queue-X2CSEAKE.js → memory-queue-2UOOF27L.js} +5 -3
- package/dist/{memory-queue-client-YRL6XTGU.js → memory-queue-client-O5U6F6XP.js} +6 -6
- package/dist/{memory-reflection-KIGEFSI4.js → memory-reflection-WVNFBJAA.js} +4 -4
- package/dist/{monitor-grants-RZOVSYVO.js → monitor-grants-E3ELDEWD.js} +5 -5
- package/dist/{monitor-identity-MOXISYNG.js → monitor-identity-GLFZSEAH.js} +2 -2
- package/dist/{notification-ledger-B6AVEGMV.js → notification-ledger-SZEPGJQ7.js} +25 -23
- package/dist/{notifications-DWXV7SVL.js → notifications-4UT53CDG.js} +24 -22
- package/dist/{orchestration-events-ZG7O4HRY.js → orchestration-events-WV4NWKZH.js} +5 -5
- package/dist/{orchestration-phase-CXRCBCK7.js → orchestration-phase-AWBXPO52.js} +3 -3
- package/dist/orchestrator-UAC3RW2T.js +47 -0
- package/dist/{pipeline-router-RTLAGZTA.js → pipeline-router-LM53NMWJ.js} +5 -5
- package/dist/{plan-limits-WLQZTCSF.js → plan-limits-2FEY2GOS.js} +7 -7
- package/dist/platform-procedures-X5DFJFV7.js +13 -0
- package/dist/{preferences-TYTGDXQZ.js → preferences-TWIXZBKS.js} +2 -2
- package/dist/{project-boot-6CGQ3EAH.js → project-boot-4NUH5FRU.js} +2 -2
- package/dist/{projection-worker-44SEKTZ5.js → projection-worker-FZ7YSN3G.js} +5 -5
- package/dist/{prospective-memory-UACFTYXK.js → prospective-memory-6D2ASWM3.js} +4 -4
- package/dist/{push-notifications-W5JRXLKJ.js → push-notifications-U6FIBQRW.js} +3 -3
- package/dist/{reranker-NL4YAV6R.js → reranker-GYYRPANK.js} +3 -3
- package/dist/{retrieval-health-4C2PO6HH.js → retrieval-health-4Z242P3B.js} +1 -1
- package/dist/{review-polling-W5AMHNLT.js → review-polling-HXAFJZDA.js} +25 -23
- package/dist/runtime/index.js +35 -33
- package/dist/{session-events-PGL5GJEB.js → session-events-O3BV56ZX.js} +25 -23
- package/dist/{session-kill-telemetry-6YDGEF27.js → session-kill-telemetry-AELE4JDK.js} +25 -23
- package/dist/session-mcp-config-YKNXG5DW.js +50 -0
- package/dist/{session-scope-3MEOO557.js → session-scope-5EAPUT45.js} +24 -22
- package/dist/setup-wizard-NB6R4QVS.js +14 -0
- package/dist/{shard-manager-MBWQEYNG.js → shard-manager-35PWFR3B.js} +3 -3
- package/dist/{skill-refinement-EOROTBPX.js → skill-refinement-DVSYXBBP.js} +5 -5
- package/dist/{stack-release-PR2XKJ4Q.js → stack-release-HGFFFCGC.js} +90 -15
- package/dist/{stack-update-LMDM27ZW.js → stack-update-ATCJFOEK.js} +5 -5
- package/dist/{steward-gate-4A2XHYFD.js → steward-gate-3GQ5XKMJ.js} +5 -5
- package/dist/{support-inbox-Z77ACQUY.js → support-inbox-4L62P4EP.js} +7 -6
- package/dist/{support-outbox-GB5SQFRJ.js → support-outbox-WHGPUYL2.js} +2 -2
- package/dist/task-enforcement-IPIZX2MM.js +90 -0
- package/dist/{task-scope-EKYDCVUF.js → task-scope-FOIW25HR.js} +26 -22
- package/dist/{tasks-crud-6LBNU43G.js → tasks-crud-HBDKE6C5.js} +34 -22
- package/dist/tasks-notify-G2U2U2YA.js +53 -0
- package/dist/{tasks-review-PBIUYXAL.js → tasks-review-27SFX5XN.js} +26 -22
- package/dist/{telemetry-upload-WQDFABTF.js → telemetry-upload-ZOXHRWR5.js} +9 -9
- package/dist/tmux-command-guard-KSJKIX3C.js +117 -0
- package/dist/{token-budget-KWGL5DY7.js → token-budget-5Y4YPDO3.js} +5 -5
- package/dist/{tool-capability-index-EH3HQVHU.js → tool-capability-index-VYF5GNJ2.js} +1 -1
- package/dist/{tool-telemetry-UC55LSIH.js → tool-telemetry-KBXSBDTK.js} +1 -1
- package/dist/tui/App.js +39 -37
- package/dist/{tui-data-M3RBSJL3.js → tui-data-NLFMBIQI.js} +24 -22
- package/dist/{update-check-HFO4VHO4.js → update-check-3FHAWIG2.js} +7 -3
- package/dist/{update-support-VPBD5SD2.js → update-support-UVUSZG7R.js} +93 -93
- package/dist/{whatsapp-accounts-BWRZUY23.js → whatsapp-accounts-BFIOXYW5.js} +1 -1
- package/dist/{whatsapp-config-GOSELKTE.js → whatsapp-config-FAX6EA5K.js} +20 -13
- package/dist/{worker-gate-4QLLMXZM.js → worker-gate-3KUBAU32.js} +3 -3
- package/dist/{workflow-engine-MMEHKUN4.js → workflow-engine-YITHXZR5.js} +2 -2
- package/dist/{working-memory-PY4AG577.js → working-memory-NUVB5SFV.js} +1 -1
- package/dist/worktree-LL62PLQB.js +47 -0
- package/dist/{worktree-sweep-5WKBU7E6.js → worktree-sweep-WTK3MTKH.js} +7 -7
- package/package.json +3 -2
- package/release-notes.json +75 -43
- package/dist/branch-hygiene-R5NVTRAY.js +0 -138
- package/dist/chunk-7YORGTXC.js +0 -138
- package/dist/chunk-CCPHEPLU.js +0 -30
- package/dist/chunk-HMP5VT6A.js +0 -118
- package/dist/chunk-PVYR4FCQ.js +0 -113
- package/dist/chunk-RP5GETX5.js +0 -140
- package/dist/chunk-YGAAZN3E.js +0 -47
- package/dist/cto-delegation-gate-S734XDXT.js +0 -290
- package/dist/dispatch-ack-4S44HBWB.js +0 -15
- package/dist/dreaming-UKGTQT6I.js +0 -44
- package/dist/orchestrator-PGHJDUUT.js +0 -45
- package/dist/setup-wizard-CJIYDSSP.js +0 -13
- package/dist/tasks-notify-TFJLSQ3B.js +0 -50
- package/dist/worktree-YXBDRYOC.js +0 -31
- package/dist/{chunk-7UMCQQWS.js → chunk-A4DVMPYB.js} +3 -3
- /package/dist/{chunk-2KLAYDFB.js → chunk-GIBYNT6W.js} +0 -0
- /package/dist/{chunk-MC6VPZKS.js → chunk-JRM4TAGS.js} +0 -0
- /package/dist/{chunk-3NCZKWPO.js → chunk-MGGOSFCR.js} +0 -0
- /package/dist/{chunk-C2SRRCRK.js → chunk-QIFYLIUF.js} +0 -0
- /package/dist/{chunk-OADURIIN.js → chunk-WTH4CSAP.js} +0 -0
- /package/dist/{core-memory-3IBWM4WR.js → core-memory-GAC6EWOQ.js} +0 -0
- /package/dist/{entity-boost-DWAWXFKN.js → entity-boost-NT6UO2Z3.js} +0 -0
- /package/dist/{message-queue-client-3PTHPG5Q.js → message-queue-client-4EOQRUXW.js} +0 -0
- /package/dist/{oauth-server-M5TGXT6D.js → oauth-server-67YBDP32.js} +0 -0
- /package/dist/{webhook-pipe-FZYLO6RR.js → webhook-pipe-LEXMUQ5B.js} +0 -0
- /package/dist/{wiki-acl-7CROE3MJ.js → wiki-acl-74BLWG6J.js} +0 -0
- /package/dist/{wiki-client-VNDOBK63.js → wiki-client-EAN7F5LV.js} +0 -0
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
// src/lib/daemon-timer-report.ts
|
|
2
|
+
import { existsSync, readFileSync, statSync, openSync, readSync, closeSync } from "fs";
|
|
3
|
+
import path from "path";
|
|
4
|
+
import os from "os";
|
|
5
|
+
var TIMER_SLOW_THRESHOLD_MS = 500;
|
|
6
|
+
var TIMER_BLOCK_THRESHOLD_MS = 1e4;
|
|
7
|
+
var TIMER_SEVERE_MS = 5e3;
|
|
8
|
+
var SUSPEND_CLUSTER_MIN_MS = 6e4;
|
|
9
|
+
var SUSPEND_CLUSTER_WINDOW_MS = 2e3;
|
|
10
|
+
var SUSPEND_CLUSTER_MIN_TIMERS = 2;
|
|
11
|
+
function logDir() {
|
|
12
|
+
return path.join(os.homedir(), ".exe-os", "logs");
|
|
13
|
+
}
|
|
14
|
+
function logPaths(baseName) {
|
|
15
|
+
const dir = logDir();
|
|
16
|
+
return [path.join(dir, baseName), path.join(dir, `${baseName}.1`)];
|
|
17
|
+
}
|
|
18
|
+
function readRecords(files, maxBytes) {
|
|
19
|
+
const records = [];
|
|
20
|
+
for (const file of files) {
|
|
21
|
+
try {
|
|
22
|
+
if (!existsSync(file)) continue;
|
|
23
|
+
const size = statSync(file).size;
|
|
24
|
+
let raw;
|
|
25
|
+
if (size > maxBytes) {
|
|
26
|
+
const buf = Buffer.alloc(maxBytes);
|
|
27
|
+
const fd = openSync(file, "r");
|
|
28
|
+
try {
|
|
29
|
+
readSync(fd, buf, 0, maxBytes, size - maxBytes);
|
|
30
|
+
} finally {
|
|
31
|
+
closeSync(fd);
|
|
32
|
+
}
|
|
33
|
+
raw = buf.toString("utf8");
|
|
34
|
+
const nl = raw.indexOf("\n");
|
|
35
|
+
if (nl >= 0) raw = raw.slice(nl + 1);
|
|
36
|
+
} else {
|
|
37
|
+
raw = readFileSync(file, "utf8");
|
|
38
|
+
}
|
|
39
|
+
for (const line of raw.split("\n")) {
|
|
40
|
+
const trimmed = line.trim();
|
|
41
|
+
if (!trimmed) continue;
|
|
42
|
+
try {
|
|
43
|
+
const rec = JSON.parse(trimmed);
|
|
44
|
+
if (rec && typeof rec === "object") records.push(rec);
|
|
45
|
+
} catch {
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
} catch {
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return records;
|
|
52
|
+
}
|
|
53
|
+
function p95(values) {
|
|
54
|
+
if (values.length === 0) return 0;
|
|
55
|
+
const sorted = [...values].sort((a, b) => a - b);
|
|
56
|
+
const idx = Math.min(sorted.length - 1, Math.ceil(sorted.length * 0.95) - 1);
|
|
57
|
+
return sorted[Math.max(0, idx)] ?? 0;
|
|
58
|
+
}
|
|
59
|
+
function median(values) {
|
|
60
|
+
if (values.length === 0) return 0;
|
|
61
|
+
const sorted = [...values].sort((a, b) => a - b);
|
|
62
|
+
const mid = Math.floor(sorted.length / 2);
|
|
63
|
+
return sorted.length % 2 === 0 ? (sorted[mid - 1] + sorted[mid]) / 2 : sorted[mid];
|
|
64
|
+
}
|
|
65
|
+
function classify(maxMs, p95Ms, tripped) {
|
|
66
|
+
if (tripped || maxMs >= TIMER_SEVERE_MS) return "blocked";
|
|
67
|
+
if (maxMs >= TIMER_SLOW_THRESHOLD_MS || p95Ms >= TIMER_SLOW_THRESHOLD_MS) return "slow";
|
|
68
|
+
return "healthy";
|
|
69
|
+
}
|
|
70
|
+
function buildTimerReport(opts = {}) {
|
|
71
|
+
const maxBytes = opts.maxBytesPerFile ?? 4 * 1024 * 1024;
|
|
72
|
+
const inFlightKnown = Array.isArray(opts.inFlight);
|
|
73
|
+
const inFlightSet = new Set(opts.inFlight ?? []);
|
|
74
|
+
const healthFiles = logPaths("daemon-health.log");
|
|
75
|
+
const sources = healthFiles.filter((f) => existsSync(f));
|
|
76
|
+
const records = readRecords(healthFiles, maxBytes);
|
|
77
|
+
const samplesByTimer = /* @__PURE__ */ new Map();
|
|
78
|
+
const clockJumpsByTimer = /* @__PURE__ */ new Map();
|
|
79
|
+
const timeoutsByTimer = /* @__PURE__ */ new Map();
|
|
80
|
+
let oldestMs = null;
|
|
81
|
+
let newestMs = null;
|
|
82
|
+
const stampOf = (rec) => {
|
|
83
|
+
if (typeof rec.ts !== "string") return null;
|
|
84
|
+
const parsed = Date.parse(rec.ts);
|
|
85
|
+
if (!Number.isFinite(parsed)) return null;
|
|
86
|
+
oldestMs = oldestMs === null ? parsed : Math.min(oldestMs, parsed);
|
|
87
|
+
newestMs = newestMs === null ? parsed : Math.max(newestMs, parsed);
|
|
88
|
+
return parsed;
|
|
89
|
+
};
|
|
90
|
+
for (const rec of records) {
|
|
91
|
+
const data = rec.data;
|
|
92
|
+
if (!data) continue;
|
|
93
|
+
if (rec.event === "timer_timeout") {
|
|
94
|
+
const timer2 = typeof data.timer === "string" ? data.timer : null;
|
|
95
|
+
if (!timer2) continue;
|
|
96
|
+
const atMs2 = stampOf(rec);
|
|
97
|
+
const cur = timeoutsByTimer.get(timer2) ?? { count: 0, lastAtMs: null };
|
|
98
|
+
cur.count += 1;
|
|
99
|
+
if (atMs2 !== null && (cur.lastAtMs === null || atMs2 > cur.lastAtMs)) cur.lastAtMs = atMs2;
|
|
100
|
+
timeoutsByTimer.set(timer2, cur);
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
if (rec.event !== "process_stats") continue;
|
|
104
|
+
const type = data.type;
|
|
105
|
+
if (type !== "timer_duration" && type !== "timer_slow") continue;
|
|
106
|
+
const timer = typeof data.timer === "string" ? data.timer : null;
|
|
107
|
+
const durationMs = typeof data.durationMs === "number" ? data.durationMs : null;
|
|
108
|
+
if (timer === null || durationMs === null || !Number.isFinite(durationMs)) continue;
|
|
109
|
+
const atMs = stampOf(rec);
|
|
110
|
+
const sleptMs = typeof data.sleptMs === "number" ? data.sleptMs : 0;
|
|
111
|
+
if (data.clockJump === true || sleptMs > 1e3) {
|
|
112
|
+
clockJumpsByTimer.set(timer, (clockJumpsByTimer.get(timer) ?? 0) + 1);
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
const arr = samplesByTimer.get(timer) ?? [];
|
|
116
|
+
arr.push({ durationMs, atMs });
|
|
117
|
+
samplesByTimer.set(timer, arr);
|
|
118
|
+
}
|
|
119
|
+
const suspendArtifacts = /* @__PURE__ */ new Set();
|
|
120
|
+
const suspendCountByTimer = /* @__PURE__ */ new Map();
|
|
121
|
+
{
|
|
122
|
+
const candidates = [];
|
|
123
|
+
for (const [timer, samples] of samplesByTimer) {
|
|
124
|
+
for (const s of samples) {
|
|
125
|
+
if (s.atMs !== null && s.durationMs >= SUSPEND_CLUSTER_MIN_MS) {
|
|
126
|
+
candidates.push({ timer, sample: s });
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
candidates.sort((a, b) => a.sample.atMs - b.sample.atMs);
|
|
131
|
+
let start = 0;
|
|
132
|
+
for (let end = 0; end < candidates.length; end++) {
|
|
133
|
+
while (candidates[end].sample.atMs - candidates[start].sample.atMs > SUSPEND_CLUSTER_WINDOW_MS) {
|
|
134
|
+
start++;
|
|
135
|
+
}
|
|
136
|
+
const window = candidates.slice(start, end + 1);
|
|
137
|
+
const distinct = new Set(window.map((c) => c.timer));
|
|
138
|
+
if (distinct.size >= SUSPEND_CLUSTER_MIN_TIMERS) {
|
|
139
|
+
for (const c of window) suspendArtifacts.add(c.sample);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
for (const [timer, samples] of samplesByTimer) {
|
|
143
|
+
const clean = samples.filter((s) => !suspendArtifacts.has(s));
|
|
144
|
+
const dropped = samples.length - clean.length;
|
|
145
|
+
if (dropped > 0) suspendCountByTimer.set(timer, dropped);
|
|
146
|
+
samplesByTimer.set(timer, clean);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
const allTimers = /* @__PURE__ */ new Set([
|
|
150
|
+
...samplesByTimer.keys(),
|
|
151
|
+
...clockJumpsByTimer.keys(),
|
|
152
|
+
...timeoutsByTimer.keys(),
|
|
153
|
+
...inFlightSet
|
|
154
|
+
]);
|
|
155
|
+
const timers = [...allTimers].map((timer) => {
|
|
156
|
+
const samples = samplesByTimer.get(timer) ?? [];
|
|
157
|
+
const timeouts = timeoutsByTimer.get(timer) ?? { count: 0, lastAtMs: null };
|
|
158
|
+
const durations = samples.map((s) => s.durationMs);
|
|
159
|
+
const maxMs = durations.length > 0 ? Math.max(...durations) : 0;
|
|
160
|
+
const avgMs = durations.length > 0 ? Math.round(durations.reduce((a, b) => a + b, 0) / durations.length) : 0;
|
|
161
|
+
const p95Ms = p95(durations);
|
|
162
|
+
const stamped = samples.filter((s) => s.atMs !== null).sort((a, b) => a.atMs - b.atMs);
|
|
163
|
+
const lastAtMs = stamped.length > 0 ? stamped[stamped.length - 1].atMs : null;
|
|
164
|
+
const lastMs = stamped.length > 0 ? stamped[stamped.length - 1].durationMs : samples.length > 0 ? samples[samples.length - 1].durationMs : 0;
|
|
165
|
+
let cadenceMs = null;
|
|
166
|
+
if (stamped.length >= 2) {
|
|
167
|
+
const gaps = [];
|
|
168
|
+
for (let i = 1; i < stamped.length; i++) {
|
|
169
|
+
const gap = stamped[i].atMs - stamped[i - 1].atMs;
|
|
170
|
+
if (gap > 0) gaps.push(gap);
|
|
171
|
+
}
|
|
172
|
+
if (gaps.length > 0) cadenceMs = Math.round(median(gaps));
|
|
173
|
+
}
|
|
174
|
+
const nextRunMs = lastAtMs !== null && cadenceMs !== null ? lastAtMs + cadenceMs : null;
|
|
175
|
+
const trippedBlockThreshold = timeouts.count > 0 || maxMs >= TIMER_BLOCK_THRESHOLD_MS;
|
|
176
|
+
return {
|
|
177
|
+
timer,
|
|
178
|
+
samples: samples.length,
|
|
179
|
+
clockJumpSamples: clockJumpsByTimer.get(timer) ?? 0,
|
|
180
|
+
suspendSamples: suspendCountByTimer.get(timer) ?? 0,
|
|
181
|
+
lastMs,
|
|
182
|
+
avgMs,
|
|
183
|
+
maxMs,
|
|
184
|
+
p95Ms,
|
|
185
|
+
lastAtMs,
|
|
186
|
+
cadenceMs,
|
|
187
|
+
nextRunMs,
|
|
188
|
+
timeoutCount: timeouts.count,
|
|
189
|
+
lastTimeoutAtMs: timeouts.lastAtMs,
|
|
190
|
+
trippedBlockThreshold,
|
|
191
|
+
inFlight: inFlightKnown ? inFlightSet.has(timer) : null,
|
|
192
|
+
status: classify(maxMs, p95Ms, trippedBlockThreshold)
|
|
193
|
+
};
|
|
194
|
+
});
|
|
195
|
+
const rank = { blocked: 0, slow: 1, healthy: 2 };
|
|
196
|
+
timers.sort(
|
|
197
|
+
(a, b) => rank[a.status] - rank[b.status] || b.maxMs - a.maxMs || b.timeoutCount - a.timeoutCount || a.timer.localeCompare(b.timer)
|
|
198
|
+
);
|
|
199
|
+
return {
|
|
200
|
+
logsFound: sources.length > 0,
|
|
201
|
+
sources,
|
|
202
|
+
timers,
|
|
203
|
+
inFlightKnown,
|
|
204
|
+
window: { oldestMs, newestMs }
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
var DAEMON_PORT = 48739;
|
|
208
|
+
async function fetchInFlightTimers(timeoutMs = 1e3) {
|
|
209
|
+
try {
|
|
210
|
+
const res = await fetch(`http://127.0.0.1:${DAEMON_PORT}/health`, {
|
|
211
|
+
signal: AbortSignal.timeout(timeoutMs)
|
|
212
|
+
});
|
|
213
|
+
if (!res.ok) return null;
|
|
214
|
+
const body = await res.json();
|
|
215
|
+
if (!Array.isArray(body.timersInFlight)) return null;
|
|
216
|
+
return body.timersInFlight.filter((t) => typeof t === "string");
|
|
217
|
+
} catch {
|
|
218
|
+
return null;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
async function buildLiveTimerReport(opts = {}) {
|
|
222
|
+
const inFlight = await fetchInFlightTimers();
|
|
223
|
+
return buildTimerReport(inFlight === null ? opts : { ...opts, inFlight });
|
|
224
|
+
}
|
|
225
|
+
function ms(n) {
|
|
226
|
+
if (n >= 1e3) return `${(n / 1e3).toFixed(1)}s`;
|
|
227
|
+
return `${Math.round(n)}ms`;
|
|
228
|
+
}
|
|
229
|
+
function shortClock(epochMs) {
|
|
230
|
+
if (epochMs === null) return "\u2014";
|
|
231
|
+
return new Date(epochMs).toISOString().replace("T", " ").slice(0, 16);
|
|
232
|
+
}
|
|
233
|
+
function nextRunLabel(nextRunMs, now) {
|
|
234
|
+
if (nextRunMs === null) return "\u2014";
|
|
235
|
+
const delta = nextRunMs - now;
|
|
236
|
+
if (delta <= 0) return "due";
|
|
237
|
+
if (delta < 6e4) return `in ${Math.round(delta / 1e3)}s`;
|
|
238
|
+
if (delta < 36e5) return `in ${Math.round(delta / 6e4)}m`;
|
|
239
|
+
return `in ${(delta / 36e5).toFixed(1)}h`;
|
|
240
|
+
}
|
|
241
|
+
function statusIndicator(status) {
|
|
242
|
+
return status === "blocked" ? "\u{1F534}" : status === "slow" ? "\u{1F7E0}" : "\u{1F7E2}";
|
|
243
|
+
}
|
|
244
|
+
function inFlightLabel(inFlight) {
|
|
245
|
+
if (inFlight === null) return "?";
|
|
246
|
+
return inFlight ? "RUN" : "-";
|
|
247
|
+
}
|
|
248
|
+
function formatTimerReport(report, now = Date.now()) {
|
|
249
|
+
const lines = [];
|
|
250
|
+
lines.push("");
|
|
251
|
+
lines.push("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557");
|
|
252
|
+
lines.push("\u2551 Timer Health Dashboard \u2551");
|
|
253
|
+
lines.push("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D");
|
|
254
|
+
lines.push("");
|
|
255
|
+
if (!report.logsFound) {
|
|
256
|
+
lines.push("\u{1F7E2} No daemon health log found.");
|
|
257
|
+
lines.push(" ~/.exe-os/logs/daemon-health.log has no timer data yet");
|
|
258
|
+
lines.push(" (fresh install, or the daemon has run no background timers).");
|
|
259
|
+
lines.push("");
|
|
260
|
+
return lines.join("\n");
|
|
261
|
+
}
|
|
262
|
+
if (report.timers.length === 0) {
|
|
263
|
+
lines.push("\u{1F7E2} No timer durations recorded yet \u2014 no background tick has ever been slow.");
|
|
264
|
+
lines.push("");
|
|
265
|
+
return lines.join("\n");
|
|
266
|
+
}
|
|
267
|
+
if (report.window.oldestMs !== null && report.window.newestMs !== null) {
|
|
268
|
+
lines.push(`Window: ${shortClock(report.window.oldestMs)} \u2192 ${shortClock(report.window.newestMs)}`);
|
|
269
|
+
}
|
|
270
|
+
lines.push(
|
|
271
|
+
report.inFlightKnown ? "Live: daemon reachable \u2014 in-flight state is current." : "Live: daemon unreachable \u2014 in-flight shown as '?' (unknown, not idle)."
|
|
272
|
+
);
|
|
273
|
+
lines.push("");
|
|
274
|
+
const head = ` ${"timer".padEnd(26)} ${"last".padStart(8)} ${"avg".padStart(8)} ${"p95".padStart(8)} ${"max".padStart(8)} ${"trips".padStart(5)} ${"run".padStart(3)} ${"next".padEnd(8)} ${"samples".padStart(7)} ${"skew".padStart(4)} last seen`;
|
|
275
|
+
lines.push(head);
|
|
276
|
+
lines.push(" " + "\u2500".repeat(Math.max(0, head.length - 3)));
|
|
277
|
+
for (const t of report.timers) {
|
|
278
|
+
lines.push(
|
|
279
|
+
`${statusIndicator(t.status)} ${t.timer.padEnd(26)} ${ms(t.lastMs).padStart(8)} ${ms(t.avgMs).padStart(8)} ${ms(t.p95Ms).padStart(8)} ${ms(t.maxMs).padStart(8)} ${String(t.timeoutCount).padStart(5)} ${inFlightLabel(t.inFlight).padStart(3)} ${nextRunLabel(t.nextRunMs, now).padEnd(8)} ${String(t.samples).padStart(7)} ${String(t.clockJumpSamples + t.suspendSamples).padStart(4)} ${shortClock(t.lastAtMs)}`
|
|
280
|
+
);
|
|
281
|
+
}
|
|
282
|
+
lines.push("");
|
|
283
|
+
const blocked = report.timers.filter((t) => t.status === "blocked");
|
|
284
|
+
const slow = report.timers.filter((t) => t.status === "slow");
|
|
285
|
+
const overall = blocked.length > 0 ? "\u{1F534}" : slow.length > 0 ? "\u{1F7E0}" : "\u{1F7E2}";
|
|
286
|
+
lines.push(
|
|
287
|
+
`${overall} ${report.timers.length} timer(s): ${blocked.length} blocked, ${slow.length} slow, ${report.timers.length - blocked.length - slow.length} healthy`
|
|
288
|
+
);
|
|
289
|
+
if (blocked.length > 0) {
|
|
290
|
+
lines.push("");
|
|
291
|
+
lines.push(
|
|
292
|
+
`\u{1F534} BLOCKING RISK \u2014 these ticks reached the event-loop danger zone (watchdog \u2265${TIMER_BLOCK_THRESHOLD_MS / 1e3}s, or a single tick \u2265${TIMER_SEVERE_MS / 1e3}s).`
|
|
293
|
+
);
|
|
294
|
+
lines.push(" A tick that blocks the loop past the budget can self-restart the daemon (exit 75)");
|
|
295
|
+
lines.push(" and drop every agent's MCP connection.");
|
|
296
|
+
for (const t of blocked) {
|
|
297
|
+
const trips = t.timeoutCount > 0 ? `${t.timeoutCount} watchdog trip(s), last ${shortClock(t.lastTimeoutAtMs)}` : "no watchdog trip (single slow tick)";
|
|
298
|
+
lines.push(` \u2022 ${t.timer}: max ${ms(t.maxMs)}, p95 ${ms(t.p95Ms)} \u2014 ${trips}`);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
lines.push("");
|
|
302
|
+
lines.push(
|
|
303
|
+
`\u24D8 Sampling: the daemon only logs a tick when it takes \u2265${TIMER_SLOW_THRESHOLD_MS}ms (or during boot).`
|
|
304
|
+
);
|
|
305
|
+
lines.push(
|
|
306
|
+
" So 'samples' counts SLOW ticks, not total runs, and 'avg' is the mean of the slow"
|
|
307
|
+
);
|
|
308
|
+
lines.push(
|
|
309
|
+
" ones (biased upward). A timer missing from this table has never been slow."
|
|
310
|
+
);
|
|
311
|
+
lines.push(" trips = times the 10s watchdog fired. run = RUN in-flight, - idle, ? unknown.");
|
|
312
|
+
lines.push(
|
|
313
|
+
" skew = ticks discarded as host-suspend artifacts (many timers all 'finishing' at"
|
|
314
|
+
);
|
|
315
|
+
lines.push(
|
|
316
|
+
" the same wake instant) \u2014 EXCLUDED from every duration above. A 4-hour 'tick' is a"
|
|
317
|
+
);
|
|
318
|
+
lines.push(" shut laptop lid, not an event-loop block. What remains is real.");
|
|
319
|
+
lines.push(
|
|
320
|
+
" NOTE: duration is the ASYNC SPAN of the tick, not CPU time on the loop. A long span"
|
|
321
|
+
);
|
|
322
|
+
lines.push(
|
|
323
|
+
" may be awaited I/O (harmless to the loop) \u2014 but it still trips the 10s watchdog and"
|
|
324
|
+
);
|
|
325
|
+
lines.push(" the overlap guard, so the next tick is SKIPPED. Both matter.");
|
|
326
|
+
lines.push("");
|
|
327
|
+
return lines.join("\n");
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
export {
|
|
331
|
+
TIMER_SLOW_THRESHOLD_MS,
|
|
332
|
+
TIMER_BLOCK_THRESHOLD_MS,
|
|
333
|
+
TIMER_SEVERE_MS,
|
|
334
|
+
SUSPEND_CLUSTER_MIN_MS,
|
|
335
|
+
SUSPEND_CLUSTER_WINDOW_MS,
|
|
336
|
+
SUSPEND_CLUSTER_MIN_TIMERS,
|
|
337
|
+
buildTimerReport,
|
|
338
|
+
fetchInFlightTimers,
|
|
339
|
+
buildLiveTimerReport,
|
|
340
|
+
formatTimerReport
|
|
341
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
deactivateBehavior
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KW2SD2FL.js";
|
|
4
4
|
import {
|
|
5
5
|
getActiveAgent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5ERDIOV3.js";
|
|
7
7
|
import {
|
|
8
8
|
canCoordinate,
|
|
9
9
|
getClient
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AOHXREB7.js";
|
|
11
11
|
|
|
12
12
|
// src/mcp/tools/deactivate-behavior.ts
|
|
13
13
|
import { z } from "zod";
|
|
@@ -24,7 +24,7 @@ function registerDeactivateBehavior(server) {
|
|
|
24
24
|
async ({ behavior_id }) => {
|
|
25
25
|
const caller = getActiveAgent();
|
|
26
26
|
try {
|
|
27
|
-
const { StewardGate } = await import("./steward-gate-
|
|
27
|
+
const { StewardGate } = await import("./steward-gate-3GQ5XKMJ.js");
|
|
28
28
|
const steward = new StewardGate();
|
|
29
29
|
const gateDecision = await steward.checkAuthority(caller.agentId || "unknown", "deactivate_behavior", behavior_id);
|
|
30
30
|
if (!gateDecision.allowed) {
|