@askexenow/exe-os 0.9.340 → 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-EC6M7KTX.js → active-agent-PVGE57FY.js} +5 -5
- package/dist/{active-agent-WHIUCHLA.js → active-agent-TNIO6IY3.js} +5 -5
- package/dist/{agentic-ontology-RNSXGXW4.js → agentic-ontology-3FXYMHKW.js} +1 -1
- package/dist/{backfill-gate-J7UXFNXU.js → backfill-gate-65LSYVE5.js} +3 -3
- package/dist/{backfill-metadata-MFY6BHKE.js → backfill-metadata-ZSMZC45J.js} +8 -8
- package/dist/{background-jobs-STURKDCS.js → background-jobs-EXR5RVGG.js} +3 -3
- package/dist/backup-verify-3Y2FHGZU.js +425 -0
- package/dist/{behaviors-HLZUJSMP.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 +26 -24
- package/dist/bin/cli.js +111 -25
- package/dist/bin/customer-readiness.js +1 -1
- package/dist/bin/deferred-daemon-restart.js +97 -90
- package/dist/bin/exe-agent-config.js +9 -8
- package/dist/bin/exe-agent.js +20 -20
- package/dist/bin/exe-assign.js +12 -12
- package/dist/bin/exe-boot.js +201 -68
- 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 +26 -24
- 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 +29 -28
- package/dist/bin/exe-kill.js +31 -29
- package/dist/bin/exe-launch-agent.js +129 -68
- 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 +27 -25
- package/dist/bin/exe-pending-notifications.js +26 -24
- package/dist/bin/exe-pending-reviews.js +26 -24
- package/dist/bin/exe-rename.js +7 -7
- package/dist/bin/exe-review.js +30 -28
- package/dist/bin/exe-search.js +11 -9
- package/dist/bin/exe-session-cleanup.js +116 -86
- 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 +27 -25
- 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 +27 -25
- package/dist/bin/graph-backfill.js +9 -9
- package/dist/bin/graph-export.js +9 -9
- package/dist/bin/import-history.js +11 -11
- package/dist/bin/install.js +102 -95
- 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 +484 -0
- package/dist/bin/registry-proxy.js +1 -1
- package/dist/bin/scan-tasks.js +26 -24
- package/dist/bin/setup.js +6 -5
- package/dist/bin/shard-migrate.js +9 -9
- package/dist/bin/stack-update.js +15 -9
- package/dist/bin/update.js +1 -1
- package/dist/bin/vps-health-gate.js +1 -1
- package/dist/boot-generation-BL2ISK4U.js +22 -0
- 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-YOKVMMOL.js → capability-cards-DN5UIKVN.js} +4 -4
- package/dist/{capacity-monitor-S54IOWRL.js → capacity-monitor-ZG5GGFR2.js} +27 -25
- package/dist/{catchup-brief-DRRQCMKA.js → catchup-brief-D6HH6DWS.js} +32 -29
- package/dist/{support-outbox-MGUVVGHT.js → chunk-25X4JD2V.js} +28 -12
- package/dist/{chunk-IYB2NIW3.js → chunk-2KZNGDSW.js} +1 -1
- package/dist/{chunk-FUIIVSW6.js → chunk-2WAVZ5UJ.js} +1 -1
- package/dist/{chunk-K5WFKEXQ.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-VI7L43DC.js → chunk-4CMVFVFC.js} +173 -69
- package/dist/{chunk-BU2QQWBQ.js → chunk-4J4PMPXZ.js} +3 -2
- package/dist/{chunk-JD5S5AAV.js → chunk-4N2NRGCM.js} +2 -2
- package/dist/chunk-4QCFFW2H.js +378 -0
- package/dist/{chunk-7EA7LYW4.js → chunk-4VSV5P4D.js} +4 -4
- package/dist/{chunk-52KNOQMK.js → chunk-4ZCD2UWW.js} +39 -10
- package/dist/{chunk-DZ6OQM67.js → chunk-5ERDIOV3.js} +2 -2
- package/dist/chunk-5H47VHB7.js +30 -0
- package/dist/{chunk-UCQITDLM.js → chunk-5TY4FPH6.js} +1 -1
- package/dist/{chunk-R44Z32O2.js → chunk-6CH3TPHR.js} +2 -2
- package/dist/{chunk-WYLV4S6A.js → chunk-6WQ3NNCE.js} +3 -3
- package/dist/{chunk-HHIBOU3P.js → chunk-6XWTQUO4.js} +1 -1
- package/dist/chunk-76CJBM36.js +88 -0
- package/dist/{chunk-H2L4PHGH.js → chunk-7CTRGNLW.js} +2 -2
- package/dist/{chunk-XUKPALWT.js → chunk-7V4JADD6.js} +2 -2
- package/dist/{chunk-RMOBQ6A5.js → chunk-AD2VCHSS.js} +1 -1
- package/dist/{chunk-QXSBB26A.js → chunk-AJYCFKJR.js} +1 -1
- package/dist/chunk-AM7S2TY6.js +54 -0
- package/dist/{chunk-HEPR6QTL.js → chunk-AOHXREB7.js} +334 -66
- package/dist/{chunk-FNZR3B7U.js → chunk-ASAFVDVR.js} +1 -1
- package/dist/{chunk-TALWBVZE.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-XCTGRD4S.js → chunk-CE7F6RHG.js} +587 -77
- package/dist/{chunk-7WPOJDTA.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-AOO77BDE.js → chunk-EUS4QUKP.js} +1 -1
- package/dist/{chunk-RLRT2BVM.js → chunk-EV46QTD3.js} +1 -1
- package/dist/{chunk-PAEXYFMY.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-LMZISHSJ.js → chunk-FPFPLPUY.js} +6 -6
- package/dist/{chunk-7TS64TBG.js → chunk-G4RGKBCA.js} +8 -3
- package/dist/{chunk-4IYSBPX3.js → chunk-G5T6KDG4.js} +1 -1
- package/dist/{chunk-7WDXEKUL.js → chunk-GBTTBXAF.js} +4 -4
- package/dist/{chunk-6MRWJMI5.js → chunk-GDIJE6D7.js} +1 -1
- package/dist/{chunk-AVKXCSBI.js → chunk-GG5NDQNN.js} +2 -2
- package/dist/{chunk-I3XKO3KQ.js → chunk-GJ26DULE.js} +2 -2
- package/dist/chunk-GL57PO3K.js +104 -0
- package/dist/chunk-GWDSB25T.js +6 -0
- package/dist/{chunk-F55JF43M.js → chunk-H6BV5TKD.js} +39 -24
- package/dist/{chunk-HCJCW7X4.js → chunk-H7I47RS5.js} +34 -1
- package/dist/{chunk-65SVQELL.js → chunk-HA5R6USD.js} +31 -5
- package/dist/{chunk-VJHUVFIW.js → chunk-HAF2DJYV.js} +3 -3
- package/dist/chunk-HJ447YER.js +224 -0
- package/dist/chunk-HV4KESRY.js +395 -0
- package/dist/{chunk-B76TSEP3.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-MW2GJJ53.js → chunk-JGIPOUIK.js} +3 -3
- package/dist/{chunk-2233TQCA.js → chunk-JLZ4RYSD.js} +2 -2
- package/dist/{chunk-Q7L6G6KV.js → chunk-JMYHW3AL.js} +2 -2
- package/dist/{chunk-OJTJYEMX.js → chunk-JPUZPAAF.js} +4 -4
- package/dist/{chunk-XWHE4LZK.js → chunk-JTBIS4R5.js} +21 -2
- package/dist/{chunk-5Z5NATNS.js → chunk-K7KFGDWF.js} +1 -1
- package/dist/{chunk-UIV2WPBT.js → chunk-KGWRTRKC.js} +2 -2
- package/dist/{chunk-KTPG4XKI.js → chunk-KP3U5QGJ.js} +1 -1
- package/dist/{chunk-TLYAEISW.js → chunk-KW2SD2FL.js} +2 -2
- package/dist/{chunk-X7H3HMFH.js → chunk-KWZMQACA.js} +11 -7
- package/dist/{chunk-OFX5B2S7.js → chunk-L2R3LN2P.js} +1 -1
- package/dist/{chunk-T4KZ2Z2N.js → chunk-L4A5DL6Z.js} +3 -3
- package/dist/{chunk-X425OEYF.js → chunk-LU2FALL6.js} +3 -3
- package/dist/{chunk-6M36JFFD.js → chunk-MKYFAKDW.js} +4 -4
- package/dist/{chunk-I5RLNOFK.js → chunk-MOPUCPXK.js} +12 -4
- package/dist/{chunk-ZIVEA3NB.js → chunk-MR6LHP4F.js} +1 -1
- package/dist/chunk-MVYB76QG.js +341 -0
- package/dist/{chunk-2SG2UGCH.js → chunk-MZM6EJCU.js} +4 -4
- package/dist/{chunk-ZREGOV2Q.js → chunk-N7QJKQMX.js} +258 -14
- package/dist/{chunk-QLFRCA6I.js → chunk-NBZL5CGA.js} +93 -12
- package/dist/{chunk-QFPTDSY2.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-ATOU6CYR.js → chunk-OLMQ4UOF.js} +57 -11
- package/dist/{chunk-6HBURYON.js → chunk-OTF44GXL.js} +4 -4
- package/dist/{chunk-DILD54TU.js → chunk-OZEBAGKR.js} +277 -137
- package/dist/{chunk-DADMPMYX.js → chunk-P5HIWY2E.js} +1 -1
- package/dist/{chunk-EIF2LQHZ.js → chunk-PDWS3E22.js} +55 -4
- package/dist/{chunk-KTY7I7UH.js → chunk-PPCDBE6Z.js} +1 -1
- package/dist/{chunk-XACL67CS.js → chunk-PQIDGXSG.js} +13 -4
- package/dist/chunk-PWUFMX75.js +186 -0
- package/dist/{chunk-UPWE5NOG.js → chunk-QDGZJ653.js} +3 -3
- package/dist/{chunk-MQRFKSLI.js → chunk-QOO5RW3K.js} +6 -5
- package/dist/{chunk-KCC5A7YL.js → chunk-QQ4E2RYW.js} +95 -18
- package/dist/{chunk-BPC5LZ6Y.js → chunk-QRYVCDWS.js} +2 -2
- package/dist/{chunk-Z42MXYWW.js → chunk-QWVXN224.js} +110 -28
- package/dist/{chunk-542EWGY3.js → chunk-QYZJHTNE.js} +26 -27
- package/dist/{chunk-I7Z6KTGF.js → chunk-R2NN3JKH.js} +43 -6
- package/dist/{chunk-3OBWSCJN.js → chunk-RACAOE2Z.js} +14 -14
- package/dist/{chunk-5RACW3LX.js → chunk-RAXVPNMR.js} +1 -1
- package/dist/{chunk-2HZY3ECT.js → chunk-RHWZUUS4.js} +6 -6
- package/dist/{chunk-RNAYCUNM.js → chunk-S3THSOWV.js} +1 -1
- package/dist/{chunk-W7DHFGCB.js → chunk-S7QUM2UK.js} +2 -2
- package/dist/{chunk-SSTLTIF3.js → chunk-SKGMF2SO.js} +25 -2
- package/dist/{chunk-GN45PBWI.js → chunk-SQKXKV2Y.js} +2 -2
- package/dist/{chunk-QZLIZAS7.js → chunk-TLT7NZCW.js} +4 -4
- package/dist/chunk-TTCUG2CF.js +91 -0
- package/dist/chunk-UEA3LXOB.js +40 -0
- package/dist/{chunk-DRCRZIIJ.js → chunk-UNXQBELK.js} +1 -1
- package/dist/{chunk-PLRIJALF.js → chunk-UP75Z5X7.js} +921 -176
- package/dist/{chunk-TNJRWUCE.js → chunk-USSB56WK.js} +1 -1
- package/dist/{chunk-KMBEL7VB.js → chunk-UUEKJDK6.js} +90 -10
- package/dist/{chunk-XJI7Z6LZ.js → chunk-UUQBZPJJ.js} +1 -1
- package/dist/{chunk-RRWDYOQS.js → chunk-V3EEVY4L.js} +1 -1
- package/dist/{chunk-N5I7RL3I.js → chunk-VPZHJCKW.js} +2 -2
- package/dist/chunk-VRAQTFD6.js +265 -0
- package/dist/{chunk-H37HHX3E.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-YE7NH53A.js → chunk-X33NYQYJ.js} +2 -2
- package/dist/{chunk-UXBD22CD.js → chunk-XHK3FS3W.js} +3 -2
- package/dist/{chunk-3QDSCJ3F.js → chunk-XZXBB3TN.js} +2 -2
- package/dist/{chunk-JSKBHUR7.js → chunk-YCANDMI2.js} +2 -2
- package/dist/{chunk-JBSCL2XT.js → chunk-YLXTKI6M.js} +1 -1
- package/dist/{chunk-G7WO77Z2.js → chunk-YTCFACP4.js} +812 -896
- package/dist/{chunk-LTVCRHHD.js → chunk-Z6RSN7KS.js} +7 -6
- package/dist/{cleanup-graph-garbage-KUABW6LS.js → cleanup-graph-garbage-XWUFAMFO.js} +6 -6
- package/dist/{co-activation-XMPHKGHR.js → co-activation-ZCHPLLP6.js} +4 -4
- package/dist/{co-occurrence-SHKSJ6CV.js → co-occurrence-KG3LKALN.js} +4 -4
- package/dist/{code-context-index-EXXDY3QZ.js → code-context-index-WSOJQ72R.js} +5 -5
- package/dist/{content-extractor-RHITF2KM.js → content-extractor-NXYNEF5K.js} +2 -2
- package/dist/{conversation-wiki-populator-WU4HEQ7C.js → conversation-wiki-populator-WQN3IUU6.js} +1 -1
- package/dist/{crdt-sync-UJELKSNX.js → crdt-sync-4PFGPZXV.js} +8 -1
- package/dist/{crm-webhook-HHNBS7LY.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-7QB6QOXT.js → daemon-orchestration-FX4XZDR5.js} +46 -27
- package/dist/{daemon-ready-5XI5BIJD.js → daemon-ready-4JTSFKAY.js} +1 -1
- package/dist/{daemon-ready-signal-E7VMIQ6I.js → daemon-ready-signal-LPAZWQOV.js} +5 -1
- package/dist/daemon-restart-circuit-breaker-PEGEIP6H.js +35 -0
- package/dist/daemon-timer-report-NM44WQRH.js +25 -0
- package/dist/{db-backup-DLD4QZBO.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-3TRLGD7M.js → doc-graph-extractor-F6ODFIID.js} +4 -4
- package/dist/{documents-FHIBU7KJ.js → documents-23WX2FPQ.js} +12 -12
- package/dist/dreaming-NWD22UQ5.js +46 -0
- package/dist/{exe-drift-KY2KHZEL.js → exe-drift-CW72FBGE.js} +5 -5
- package/dist/{exe-export-SP6G3QF6.js → exe-export-AUJ7CV7G.js} +11 -11
- package/dist/{exe-import-KJU7FBVQ.js → exe-import-JX4I52VE.js} +11 -11
- package/dist/{exe-key-M6TYHNUW.js → exe-key-2N6LY2BU.js} +241 -226
- package/dist/{exe-org-BGZNNE4H.js → exe-org-X4CSNCKS.js} +3 -3
- package/dist/{exe-snapshot-ZNPGUKRZ.js → exe-snapshot-XZ7FVCYZ.js} +31 -29
- package/dist/{fast-db-init-QQB6IVWV.js → fast-db-init-4CWHSOOR.js} +1 -1
- package/dist/{founder-context-PQR3BUS7.js → founder-context-7L3CFPYN.js} +4 -4
- package/dist/gateway/index.js +14 -14
- 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-UGB5J3K7.js → git-staleness-CI2R4QOJ.js} +4 -4
- package/dist/{global-procedures-R7KRREEK.js → global-procedures-XQX3LUH6.js} +6 -6
- package/dist/{graph-auto-extract-LKIQ57PL.js → graph-auto-extract-OURWMGBS.js} +4 -4
- 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 +32 -28
- package/dist/hooks/codex-stop-task-finalizer.js +32 -28
- package/dist/hooks/commit-complete.js +29 -27
- 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 +28 -26
- package/dist/hooks/post-tool-combined.js +12 -12
- package/dist/hooks/pre-compact.js +29 -27
- package/dist/hooks/pre-tool-use.js +180 -47
- package/dist/hooks/prompt-submit.js +324 -273
- package/dist/hooks/session-end.js +35 -33
- package/dist/hooks/session-start.js +28 -21
- package/dist/hooks/stop.js +35 -33
- package/dist/hooks/subagent-stop.js +28 -26
- package/dist/hooks/summary-worker.js +36 -34
- package/dist/index.js +39 -37
- package/dist/{installer-SB2N5NKH.js → installer-G3JAO3NT.js} +9 -9
- package/dist/{installer-MZWWBXM6.js → installer-JND3RJ6Q.js} +9 -9
- package/dist/{installer-MNPXDLGG.js → installer-L7EVH5U5.js} +9 -9
- package/dist/{intercom-queue-VU2G6F5R.js → intercom-queue-ZFEQALR3.js} +25 -23
- 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 +9 -9
- 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 +651 -158
- 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 +28 -24
- 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 +29 -25
- package/dist/lib/tmux-routing.js +56 -25
- 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-BYDMFMFT.js → license-gate-QTRQHV4F.js} +5 -5
- package/dist/{license-sync-N3RNYVP2.js → license-sync-N3UJFWAW.js} +4 -4
- package/dist/mcp/register-tools.js +96 -89
- package/dist/mcp/server.js +98 -91
- 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 +37 -28
- 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 +35 -29
- package/dist/mcp/tools/send-message.js +28 -26
- package/dist/mcp/tools/update-task.js +34 -28
- package/dist/{mcp-http-config-EMAVS2JI.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-TQRLZI4D.js → memory-cards-ZRDW7QBX.js} +8 -8
- package/dist/{memory-graph-extractor-IWGNVAFU.js → memory-graph-extractor-QLXDMHRS.js} +5 -5
- package/dist/{memory-poisoning-defense-T4ITBGSG.js → memory-poisoning-defense-HJTXYCWH.js} +4 -4
- package/dist/{memory-pressure-watchdog-RRIAXPXQ.js → memory-pressure-watchdog-HN5X7AVN.js} +76 -37
- package/dist/{memory-queue-X2CSEAKE.js → memory-queue-2UOOF27L.js} +5 -3
- package/dist/{memory-queue-client-BKQHTYTH.js → memory-queue-client-O5U6F6XP.js} +6 -6
- package/dist/{memory-reflection-6N4J2FL7.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-SZEPGJQ7.js +409 -0
- package/dist/{notifications-KONB3C62.js → notifications-4UT53CDG.js} +25 -23
- package/dist/{orchestration-events-5SIJOE4H.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-O6HU7DKH.js → pipeline-router-LM53NMWJ.js} +5 -5
- package/dist/{plan-limits-GRNBOBB3.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-SD7GM24K.js → project-boot-4NUH5FRU.js} +2 -2
- package/dist/{projection-worker-ZVOFHTXT.js → projection-worker-FZ7YSN3G.js} +5 -5
- package/dist/{prospective-memory-W6S67LZZ.js → prospective-memory-6D2ASWM3.js} +4 -4
- package/dist/{push-notifications-W5JRXLKJ.js → push-notifications-U6FIBQRW.js} +3 -3
- package/dist/{reranker-QATGTAPC.js → reranker-GYYRPANK.js} +3 -3
- package/dist/{retrieval-health-TWHKYCRK.js → retrieval-health-4Z242P3B.js} +1 -1
- package/dist/{review-polling-PCMD5BFN.js → review-polling-HXAFJZDA.js} +26 -24
- package/dist/runtime/index.js +37 -35
- package/dist/{session-events-3LCVQEL7.js → session-events-O3BV56ZX.js} +26 -24
- package/dist/{session-kill-telemetry-CZSPN5V6.js → session-kill-telemetry-AELE4JDK.js} +26 -24
- package/dist/session-mcp-config-YKNXG5DW.js +50 -0
- package/dist/{session-scope-CFHVSVAQ.js → session-scope-5EAPUT45.js} +25 -23
- package/dist/setup-wizard-NB6R4QVS.js +14 -0
- package/dist/{shard-manager-MBWQEYNG.js → shard-manager-35PWFR3B.js} +3 -3
- package/dist/{skill-refinement-74T6VDFM.js → skill-refinement-DVSYXBBP.js} +5 -5
- package/dist/stack-promote-RSOWO6EY.js +130 -0
- package/dist/{stack-release-XXMV7SPX.js → stack-release-HGFFFCGC.js} +112 -22
- package/dist/{stack-update-E2TKHHSQ.js → stack-update-ATCJFOEK.js} +7 -5
- package/dist/{steward-gate-WT7WXQIE.js → steward-gate-3GQ5XKMJ.js} +5 -5
- package/dist/support-inbox-4L62P4EP.js +33 -0
- package/dist/support-outbox-WHGPUYL2.js +16 -0
- package/dist/task-enforcement-IPIZX2MM.js +90 -0
- package/dist/{task-scope-CQEG5SSJ.js → task-scope-FOIW25HR.js} +27 -23
- package/dist/{tasks-crud-UGK5A25L.js → tasks-crud-HBDKE6C5.js} +35 -23
- package/dist/tasks-notify-G2U2U2YA.js +53 -0
- package/dist/{tasks-review-JKBRACII.js → tasks-review-27SFX5XN.js} +27 -23
- package/dist/{telemetry-upload-7LBYGPCB.js → telemetry-upload-ZOXHRWR5.js} +9 -9
- package/dist/tmux-command-guard-KSJKIX3C.js +117 -0
- package/dist/{token-budget-QBRJR4M5.js → token-budget-5Y4YPDO3.js} +5 -5
- package/dist/{tool-capability-index-Q6YQDL7I.js → tool-capability-index-VYF5GNJ2.js} +1 -1
- package/dist/{tool-telemetry-ULIDUK3P.js → tool-telemetry-KBXSBDTK.js} +1 -1
- package/dist/tui/App.js +40 -38
- package/dist/{tui-data-NPTGKT37.js → tui-data-NLFMBIQI.js} +25 -23
- package/dist/{update-check-HFO4VHO4.js → update-check-3FHAWIG2.js} +7 -3
- package/dist/update-support-UVUSZG7R.js +355 -0
- 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-MXUQUG4M.js → worker-gate-3KUBAU32.js} +3 -3
- package/dist/{workflow-engine-EWCOLD47.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-ZAG3V24E.js → worktree-sweep-WTK3MTKH.js} +7 -7
- package/package.json +3 -2
- package/release-notes.json +86 -76
- package/dist/branch-hygiene-R5NVTRAY.js +0 -138
- package/dist/chunk-6IRVGOUL.js +0 -30
- package/dist/chunk-HMP5VT6A.js +0 -118
- package/dist/chunk-PVYR4FCQ.js +0 -113
- package/dist/chunk-UFAXZ2PY.js +0 -138
- package/dist/chunk-Y25OJWOQ.js +0 -45
- package/dist/chunk-YGAAZN3E.js +0 -47
- package/dist/cto-delegation-gate-DXNF5HVW.js +0 -290
- package/dist/dispatch-ack-4S44HBWB.js +0 -15
- package/dist/dreaming-OMFUEUCQ.js +0 -44
- package/dist/orchestrator-DUUX7FQV.js +0 -45
- package/dist/setup-wizard-TOFEJPLF.js +0 -13
- package/dist/tasks-notify-SMLDFBWM.js +0 -50
- package/dist/worktree-GVF2I5FP.js +0 -31
- /package/dist/{chunk-FLNSJ2TC.js → chunk-GIBYNT6W.js} +0 -0
- /package/dist/{chunk-NQBRGXYR.js → chunk-JRM4TAGS.js} +0 -0
- /package/dist/{chunk-WHRTDN5J.js → chunk-MGGOSFCR.js} +0 -0
- /package/dist/{chunk-D3QASX2W.js → chunk-QIFYLIUF.js} +0 -0
- /package/dist/{chunk-OADURIIN.js → chunk-WTH4CSAP.js} +0 -0
- /package/dist/{core-memory-VO5ZIBKH.js → core-memory-GAC6EWOQ.js} +0 -0
- /package/dist/{entity-boost-DNI4A5I7.js → entity-boost-NT6UO2Z3.js} +0 -0
- /package/dist/{message-queue-client-Q5BW3O5W.js → message-queue-client-4EOQRUXW.js} +0 -0
- /package/dist/{oauth-server-ROQFOEMM.js → oauth-server-67YBDP32.js} +0 -0
- /package/dist/{webhook-pipe-FZYLO6RR.js → webhook-pipe-LEXMUQ5B.js} +0 -0
- /package/dist/{wiki-acl-JA5UCQZ4.js → wiki-acl-74BLWG6J.js} +0 -0
- /package/dist/{wiki-client-VNDOBK63.js → wiki-client-EAN7F5LV.js} +0 -0
|
@@ -8,21 +8,225 @@ import {
|
|
|
8
8
|
buildStatusFilter,
|
|
9
9
|
buildWikiScopeFilter,
|
|
10
10
|
searchMemories
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-VSRPS3J7.js";
|
|
12
12
|
import {
|
|
13
13
|
blobToVector
|
|
14
14
|
} from "./chunk-OTVEIJUQ.js";
|
|
15
|
+
import {
|
|
16
|
+
normalizeSessionScope,
|
|
17
|
+
resolveCurrentTask
|
|
18
|
+
} from "./chunk-76CJBM36.js";
|
|
19
|
+
import {
|
|
20
|
+
getAgentContext
|
|
21
|
+
} from "./chunk-GJV3WDWM.js";
|
|
15
22
|
import {
|
|
16
23
|
getClient
|
|
17
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-AOHXREB7.js";
|
|
25
|
+
|
|
26
|
+
// src/lib/memory-reads.ts
|
|
27
|
+
import crypto from "crypto";
|
|
28
|
+
var MAX_BUFFER = 5e3;
|
|
29
|
+
var FLUSH_AT = 256;
|
|
30
|
+
var FLUSH_DEBOUNCE_MS = 2e3;
|
|
31
|
+
var ATTRIBUTION_TTL_MS = 5e3;
|
|
32
|
+
var DEFAULT_RETENTION_DAYS = 30;
|
|
33
|
+
var DEFAULT_MAX_ROWS = 2e5;
|
|
34
|
+
var SWEEP_INTERVAL_MS = 60 * 60 * 1e3;
|
|
35
|
+
var buffer = [];
|
|
36
|
+
var flushTimer = null;
|
|
37
|
+
var flushing = false;
|
|
38
|
+
var lastSweepAt = 0;
|
|
39
|
+
function readLogEnabled() {
|
|
40
|
+
return process.env.EXE_READ_LOG !== "0";
|
|
41
|
+
}
|
|
42
|
+
var attributionCache = /* @__PURE__ */ new Map();
|
|
43
|
+
function loadAttribution(agentId, sessionScope) {
|
|
44
|
+
try {
|
|
45
|
+
const marker = resolveCurrentTask(agentId, sessionScope);
|
|
46
|
+
return {
|
|
47
|
+
taskId: marker?.taskId ?? null,
|
|
48
|
+
sessionScope: marker?.sessionScope ?? sessionScope ?? null
|
|
49
|
+
};
|
|
50
|
+
} catch {
|
|
51
|
+
return { taskId: null, sessionScope: sessionScope ?? null };
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function getAttribution(agentId, sessionScope) {
|
|
55
|
+
const key = `${agentId}::${sessionScope ?? ""}`;
|
|
56
|
+
const entry = attributionCache.get(key);
|
|
57
|
+
const now = Date.now();
|
|
58
|
+
if (!entry) {
|
|
59
|
+
const value = loadAttribution(agentId, sessionScope);
|
|
60
|
+
attributionCache.set(key, { value, at: now, refreshing: false });
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
if (now - entry.at > ATTRIBUTION_TTL_MS && !entry.refreshing) {
|
|
64
|
+
entry.refreshing = true;
|
|
65
|
+
setImmediate(() => {
|
|
66
|
+
try {
|
|
67
|
+
entry.value = loadAttribution(agentId, sessionScope);
|
|
68
|
+
entry.at = Date.now();
|
|
69
|
+
} catch {
|
|
70
|
+
} finally {
|
|
71
|
+
entry.refreshing = false;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
return entry.value;
|
|
76
|
+
}
|
|
77
|
+
function recordMemoryReads(input) {
|
|
78
|
+
try {
|
|
79
|
+
if (!readLogEnabled()) return;
|
|
80
|
+
const { memoryIds } = input;
|
|
81
|
+
if (!memoryIds || memoryIds.length === 0) return;
|
|
82
|
+
const scopeHint = input.sessionScope ?? getAgentContext()?.sessionHint;
|
|
83
|
+
let taskId = input.taskId ?? null;
|
|
84
|
+
let sessionScope = normalizeSessionScope(scopeHint) ?? null;
|
|
85
|
+
if (input.taskId === void 0) {
|
|
86
|
+
const attribution = getAttribution(input.agentId, scopeHint);
|
|
87
|
+
taskId = attribution.taskId;
|
|
88
|
+
sessionScope = attribution.sessionScope;
|
|
89
|
+
}
|
|
90
|
+
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
91
|
+
const query = input.query ? input.query.slice(0, 500) : null;
|
|
92
|
+
const seen = /* @__PURE__ */ new Set();
|
|
93
|
+
let rank = 0;
|
|
94
|
+
for (const memoryId of memoryIds) {
|
|
95
|
+
if (!memoryId || seen.has(memoryId)) continue;
|
|
96
|
+
seen.add(memoryId);
|
|
97
|
+
rank++;
|
|
98
|
+
buffer.push({
|
|
99
|
+
id: crypto.randomUUID(),
|
|
100
|
+
memory_id: memoryId,
|
|
101
|
+
agent_id: input.agentId ?? null,
|
|
102
|
+
task_id: taskId,
|
|
103
|
+
session_scope: sessionScope,
|
|
104
|
+
source: input.source,
|
|
105
|
+
query,
|
|
106
|
+
rank_position: rank,
|
|
107
|
+
timestamp
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
if (buffer.length > MAX_BUFFER) {
|
|
111
|
+
buffer = buffer.slice(buffer.length - MAX_BUFFER);
|
|
112
|
+
}
|
|
113
|
+
scheduleFlush();
|
|
114
|
+
} catch {
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function scheduleFlush() {
|
|
118
|
+
if (buffer.length >= FLUSH_AT) {
|
|
119
|
+
void flushMemoryReads();
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
if (flushTimer) return;
|
|
123
|
+
flushTimer = setTimeout(() => {
|
|
124
|
+
flushTimer = null;
|
|
125
|
+
void flushMemoryReads();
|
|
126
|
+
}, FLUSH_DEBOUNCE_MS);
|
|
127
|
+
flushTimer.unref?.();
|
|
128
|
+
}
|
|
129
|
+
async function flushMemoryReads() {
|
|
130
|
+
if (flushing) return;
|
|
131
|
+
if (buffer.length === 0) return;
|
|
132
|
+
flushing = true;
|
|
133
|
+
const batch = buffer;
|
|
134
|
+
buffer = [];
|
|
135
|
+
if (flushTimer) {
|
|
136
|
+
clearTimeout(flushTimer);
|
|
137
|
+
flushTimer = null;
|
|
138
|
+
}
|
|
139
|
+
try {
|
|
140
|
+
const client = getClient();
|
|
141
|
+
const CHUNK = 200;
|
|
142
|
+
for (let i = 0; i < batch.length; i += CHUNK) {
|
|
143
|
+
const chunk = batch.slice(i, i + CHUNK);
|
|
144
|
+
const placeholders = chunk.map(() => "(?,?,?,?,?,?,?,?,?)").join(",");
|
|
145
|
+
const args = [];
|
|
146
|
+
for (const r of chunk) {
|
|
147
|
+
args.push(
|
|
148
|
+
r.id,
|
|
149
|
+
r.memory_id,
|
|
150
|
+
r.agent_id,
|
|
151
|
+
r.task_id,
|
|
152
|
+
r.session_scope,
|
|
153
|
+
r.source,
|
|
154
|
+
r.query,
|
|
155
|
+
r.rank_position,
|
|
156
|
+
r.timestamp
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
await client.execute({
|
|
160
|
+
sql: `INSERT INTO memory_reads
|
|
161
|
+
(id, memory_id, agent_id, task_id, session_scope, source, query, rank_position, timestamp)
|
|
162
|
+
VALUES ${placeholders}`,
|
|
163
|
+
args
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
void maybeSweep();
|
|
167
|
+
} catch {
|
|
168
|
+
} finally {
|
|
169
|
+
flushing = false;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
function retentionDays() {
|
|
173
|
+
const raw = Number(process.env.EXE_READ_LOG_RETENTION_DAYS);
|
|
174
|
+
return Number.isFinite(raw) && raw > 0 ? raw : DEFAULT_RETENTION_DAYS;
|
|
175
|
+
}
|
|
176
|
+
function maxRows() {
|
|
177
|
+
const raw = Number(process.env.EXE_READ_LOG_MAX_ROWS);
|
|
178
|
+
return Number.isFinite(raw) && raw > 0 ? raw : DEFAULT_MAX_ROWS;
|
|
179
|
+
}
|
|
180
|
+
async function maybeSweep() {
|
|
181
|
+
const now = Date.now();
|
|
182
|
+
if (now - lastSweepAt < SWEEP_INTERVAL_MS) return;
|
|
183
|
+
lastSweepAt = now;
|
|
184
|
+
await sweepMemoryReads({ retentionDays: retentionDays(), maxRows: maxRows() });
|
|
185
|
+
}
|
|
186
|
+
async function sweepMemoryReads(options) {
|
|
187
|
+
const days = options?.retentionDays ?? retentionDays();
|
|
188
|
+
const cap = options?.maxRows ?? maxRows();
|
|
189
|
+
try {
|
|
190
|
+
const client = getClient();
|
|
191
|
+
const cutoff = new Date(Date.now() - days * 24 * 3600 * 1e3).toISOString();
|
|
192
|
+
await client.execute({
|
|
193
|
+
sql: `DELETE FROM memory_reads WHERE timestamp < ?`,
|
|
194
|
+
args: [cutoff]
|
|
195
|
+
});
|
|
196
|
+
const counted = await client.execute("SELECT COUNT(*) AS c FROM memory_reads");
|
|
197
|
+
const total = Number(counted.rows[0]?.c ?? 0);
|
|
198
|
+
if (total > cap) {
|
|
199
|
+
await client.execute({
|
|
200
|
+
sql: `DELETE FROM memory_reads WHERE id IN (
|
|
201
|
+
SELECT id FROM memory_reads ORDER BY timestamp ASC LIMIT ?
|
|
202
|
+
)`,
|
|
203
|
+
args: [total - cap]
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
if (options?.force) lastSweepAt = Date.now();
|
|
207
|
+
} catch {
|
|
208
|
+
}
|
|
209
|
+
}
|
|
18
210
|
|
|
19
211
|
// src/lib/hybrid-search.ts
|
|
212
|
+
import { createHash } from "crypto";
|
|
20
213
|
var RRF_K = 60;
|
|
21
214
|
var DAEMON_SAFE_FTS_TERM_THRESHOLD = 3;
|
|
22
215
|
var DAEMON_SAFE_FTS_MAX_TERMS = 5;
|
|
23
216
|
var _daemonBroadFtsSkipLogged = false;
|
|
24
217
|
var _daemonGraphFtsSkipLogged = false;
|
|
25
218
|
var _hybridDegradeWarned = false;
|
|
219
|
+
function searchQualityQuerySnapshot(queryText) {
|
|
220
|
+
const normalized = queryText.replace(/\s+/g, " ").trim();
|
|
221
|
+
const queryHash = createHash("sha256").update(queryText).digest("hex");
|
|
222
|
+
const maxPreview = Number(process.env.EXE_SEARCH_LOG_QUERY_PREVIEW_CHARS ?? 96);
|
|
223
|
+
const safeMaxPreview = Number.isFinite(maxPreview) && maxPreview > 0 ? Math.min(maxPreview, 256) : 96;
|
|
224
|
+
const query = normalized.length > safeMaxPreview ? `${normalized.slice(0, safeMaxPreview)}\u2026` : normalized;
|
|
225
|
+
if (process.env.EXE_SEARCH_LOG_FULL_TEXT === "1") {
|
|
226
|
+
return { query, queryHash, queryFull: queryText };
|
|
227
|
+
}
|
|
228
|
+
return { query, queryHash };
|
|
229
|
+
}
|
|
26
230
|
function isDaemonProcess() {
|
|
27
231
|
return process.env.EXE_IS_DAEMON === "1";
|
|
28
232
|
}
|
|
@@ -359,7 +563,7 @@ async function hybridSearch(queryText, agentId, options) {
|
|
|
359
563
|
let rerankerAvailable = false;
|
|
360
564
|
if (process.env.EXE_IS_DAEMON === "1") {
|
|
361
565
|
try {
|
|
362
|
-
const { isRerankerAvailable } = await import("./reranker-
|
|
566
|
+
const { isRerankerAvailable } = await import("./reranker-GYYRPANK.js");
|
|
363
567
|
rerankerAvailable = isRerankerAvailable();
|
|
364
568
|
} catch {
|
|
365
569
|
}
|
|
@@ -384,7 +588,8 @@ async function hybridSearch(queryText, agentId, options) {
|
|
|
384
588
|
}
|
|
385
589
|
}
|
|
386
590
|
let grepPromise = Promise.resolve([]);
|
|
387
|
-
|
|
591
|
+
const onFailOpenHotPath = process.env.EXE_HOOK_FAIL_OPEN === "1";
|
|
592
|
+
if (config.fileGrepEnabled === true && !process.env.VITEST && !onFailOpenHotPath) {
|
|
388
593
|
try {
|
|
389
594
|
if (process.env.EXE_IS_DAEMON !== "1") {
|
|
390
595
|
const { getProjectName } = await import("./project-name-EWG5KAZP.js");
|
|
@@ -427,7 +632,7 @@ async function hybridSearch(queryText, agentId, options) {
|
|
|
427
632
|
]).catch(() => []),
|
|
428
633
|
includeStructuredCards ? (async () => {
|
|
429
634
|
try {
|
|
430
|
-
const { searchMemoryCards } = await import("./memory-cards-
|
|
635
|
+
const { searchMemoryCards } = await import("./memory-cards-ZRDW7QBX.js");
|
|
431
636
|
return await searchMemoryCards(effectiveQuery, agentId, fetchOptions);
|
|
432
637
|
} catch {
|
|
433
638
|
return [];
|
|
@@ -436,7 +641,7 @@ async function hybridSearch(queryText, agentId, options) {
|
|
|
436
641
|
// Reflection insights: patterns, contradictions, summaries across sessions
|
|
437
642
|
includeStructuredCards ? (async () => {
|
|
438
643
|
try {
|
|
439
|
-
const { searchReflections } = await import("./memory-reflection-
|
|
644
|
+
const { searchReflections } = await import("./memory-reflection-WVNFBJAA.js");
|
|
440
645
|
const insights = await searchReflections(effectiveQuery, agentId, 5, {
|
|
441
646
|
includeArchived: options?.includeArchived
|
|
442
647
|
});
|
|
@@ -537,7 +742,7 @@ async function hybridSearch(queryText, agentId, options) {
|
|
|
537
742
|
let entityBoostRan = false;
|
|
538
743
|
if (merged.length > 0) {
|
|
539
744
|
try {
|
|
540
|
-
const { applyEntityBoost } = await import("./entity-boost-
|
|
745
|
+
const { applyEntityBoost } = await import("./entity-boost-NT6UO2Z3.js");
|
|
541
746
|
const boosted = await applyEntityBoost(merged, effectiveQuery, getClient());
|
|
542
747
|
merged = boosted.results;
|
|
543
748
|
graphContextMap = boosted.graphContext;
|
|
@@ -561,7 +766,7 @@ async function hybridSearch(queryText, agentId, options) {
|
|
|
561
766
|
try {
|
|
562
767
|
let rerankedRecords;
|
|
563
768
|
if (graphContextMap.size > 0) {
|
|
564
|
-
const { rerankWithContext } = await import("./reranker-
|
|
769
|
+
const { rerankWithContext } = await import("./reranker-GYYRPANK.js");
|
|
565
770
|
const candidates = merged.map((m) => ({
|
|
566
771
|
text: m.raw_text,
|
|
567
772
|
context: graphContextMap.get(m.id)
|
|
@@ -569,7 +774,7 @@ async function hybridSearch(queryText, agentId, options) {
|
|
|
569
774
|
const scored = await rerankWithContext(effectiveQuery, candidates, rerankReturnLimit);
|
|
570
775
|
rerankedRecords = scored.map((s) => merged[s.index]);
|
|
571
776
|
} else {
|
|
572
|
-
const { rerank } = await import("./reranker-
|
|
777
|
+
const { rerank } = await import("./reranker-GYYRPANK.js");
|
|
573
778
|
rerankedRecords = await rerank(effectiveQuery, merged, rerankReturnLimit);
|
|
574
779
|
}
|
|
575
780
|
if (rerankedRecords.length > 0) {
|
|
@@ -619,9 +824,10 @@ async function hybridSearch(queryText, agentId, options) {
|
|
|
619
824
|
await attachDocumentMetadata(finalResults);
|
|
620
825
|
}
|
|
621
826
|
if (process.env.EXE_SEARCH_LOG !== "0") {
|
|
827
|
+
const querySnapshot = searchQualityQuerySnapshot(queryText);
|
|
622
828
|
const logEntry = {
|
|
623
829
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
624
|
-
|
|
830
|
+
...querySnapshot,
|
|
625
831
|
agentId,
|
|
626
832
|
signals: {
|
|
627
833
|
fts: ftsResults.length,
|
|
@@ -657,12 +863,24 @@ async function hybridSearch(queryText, agentId, options) {
|
|
|
657
863
|
const path = await import("path");
|
|
658
864
|
const os = await import("os");
|
|
659
865
|
const logPath = path.join(os.homedir(), ".exe-os", "search-quality.jsonl");
|
|
660
|
-
fs.mkdirSync(path.dirname(logPath), { recursive: true });
|
|
866
|
+
fs.mkdirSync(path.dirname(logPath), { recursive: true, mode: 448 });
|
|
867
|
+
try {
|
|
868
|
+
fs.chmodSync(path.dirname(logPath), 448);
|
|
869
|
+
} catch {
|
|
870
|
+
}
|
|
661
871
|
const MAX_LOG_BYTES = 5 * 1024 * 1024;
|
|
662
872
|
try {
|
|
663
873
|
const stat = fs.statSync(logPath);
|
|
874
|
+
try {
|
|
875
|
+
fs.chmodSync(logPath, 384);
|
|
876
|
+
} catch {
|
|
877
|
+
}
|
|
664
878
|
if (stat.size > MAX_LOG_BYTES) {
|
|
665
879
|
fs.renameSync(logPath, logPath + ".1");
|
|
880
|
+
try {
|
|
881
|
+
fs.chmodSync(logPath + ".1", 384);
|
|
882
|
+
} catch {
|
|
883
|
+
}
|
|
666
884
|
}
|
|
667
885
|
} catch {
|
|
668
886
|
}
|
|
@@ -674,10 +892,28 @@ async function hybridSearch(queryText, agentId, options) {
|
|
|
674
892
|
}
|
|
675
893
|
} catch {
|
|
676
894
|
}
|
|
895
|
+
const fd = fs.openSync(logPath, "a", 384);
|
|
896
|
+
fs.closeSync(fd);
|
|
897
|
+
try {
|
|
898
|
+
fs.chmodSync(logPath, 384);
|
|
899
|
+
} catch {
|
|
900
|
+
}
|
|
677
901
|
fs.appendFileSync(logPath, JSON.stringify(logEntry) + "\n");
|
|
902
|
+
try {
|
|
903
|
+
fs.chmodSync(logPath, 384);
|
|
904
|
+
} catch {
|
|
905
|
+
}
|
|
678
906
|
} catch {
|
|
679
907
|
}
|
|
680
908
|
}
|
|
909
|
+
if (finalResults.length > 0) {
|
|
910
|
+
recordMemoryReads({
|
|
911
|
+
agentId,
|
|
912
|
+
query: queryText,
|
|
913
|
+
source: "memory",
|
|
914
|
+
memoryIds: finalResults.map((r) => r.id)
|
|
915
|
+
});
|
|
916
|
+
}
|
|
681
917
|
if (finalResults.length > 0) {
|
|
682
918
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
683
919
|
const ids = finalResults.filter((r) => !r._isNeighbor).map((r) => r.id);
|
|
@@ -931,15 +1167,23 @@ async function lightweightSearch(queryText, agentId, options) {
|
|
|
931
1167
|
}
|
|
932
1168
|
if (results.length >= 2) {
|
|
933
1169
|
try {
|
|
934
|
-
const { recordCoActivations } = await import("./co-activation-
|
|
1170
|
+
const { recordCoActivations } = await import("./co-activation-ZCHPLLP6.js");
|
|
935
1171
|
const ids = results.slice(0, 10).map((r) => r.id);
|
|
936
|
-
void recordCoActivations(ids)
|
|
1172
|
+
void recordCoActivations(ids).catch((e) => {
|
|
1173
|
+
try {
|
|
1174
|
+
process.stderr.write(
|
|
1175
|
+
`[hybrid-search] co-activation recording failed (non-fatal): ${e instanceof Error ? e.message : String(e)}
|
|
1176
|
+
`
|
|
1177
|
+
);
|
|
1178
|
+
} catch {
|
|
1179
|
+
}
|
|
1180
|
+
});
|
|
937
1181
|
} catch {
|
|
938
1182
|
}
|
|
939
1183
|
}
|
|
940
1184
|
if (options?.includeStructuredCards !== true) return results;
|
|
941
1185
|
try {
|
|
942
|
-
const { searchMemoryCards } = await import("./memory-cards-
|
|
1186
|
+
const { searchMemoryCards } = await import("./memory-cards-ZRDW7QBX.js");
|
|
943
1187
|
const cardResults = await searchMemoryCards(queryText, agentId, options);
|
|
944
1188
|
if (cardResults.length > 0) {
|
|
945
1189
|
return rrfMergeMulti([results, cardResults], limit, RRF_K, [1, 0.85]);
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
decryptSyncBlob,
|
|
3
|
+
encryptSyncBlob,
|
|
4
|
+
isSyncCryptoInitialized
|
|
5
|
+
} from "./chunk-S3THSOWV.js";
|
|
6
|
+
|
|
1
7
|
// src/lib/crdt-sync.ts
|
|
2
8
|
import * as Y from "yjs";
|
|
3
|
-
import { readFileSync, writeFileSync, existsSync, mkdirSync, unlinkSync, renameSync } from "fs";
|
|
9
|
+
import { readFileSync, writeFileSync, existsSync, mkdirSync, unlinkSync, renameSync, chmodSync } from "fs";
|
|
4
10
|
import path from "path";
|
|
5
11
|
import { homedir } from "os";
|
|
12
|
+
var CRDT_STATE_ENC_MAGIC = "EXEO-CRDT-ENC1:";
|
|
13
|
+
function isEncryptedCrdtState(buf) {
|
|
14
|
+
const magic = Buffer.from(CRDT_STATE_ENC_MAGIC, "utf8");
|
|
15
|
+
if (buf.length < magic.length) return false;
|
|
16
|
+
return Buffer.from(buf.subarray(0, magic.length)).equals(magic);
|
|
17
|
+
}
|
|
6
18
|
var DEFAULT_STATE_PATH = path.join(homedir(), ".exe-os", "crdt-state.bin");
|
|
7
19
|
var _statePathOverride = null;
|
|
8
20
|
function getStatePath() {
|
|
@@ -12,6 +24,9 @@ function _setStatePath(p) {
|
|
|
12
24
|
_statePathOverride = p;
|
|
13
25
|
}
|
|
14
26
|
var doc = null;
|
|
27
|
+
var loadSkippedPendingCrypto = false;
|
|
28
|
+
var _warnedPersistNoCrypto = false;
|
|
29
|
+
var _warnedPersistBlocked = false;
|
|
15
30
|
var SYNC_TYPES = [
|
|
16
31
|
{
|
|
17
32
|
mapName: "memories",
|
|
@@ -106,28 +121,73 @@ function importRecords(mapName, records) {
|
|
|
106
121
|
});
|
|
107
122
|
return imported;
|
|
108
123
|
}
|
|
124
|
+
function quarantineStateFile(sp, reason) {
|
|
125
|
+
try {
|
|
126
|
+
const ts = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
127
|
+
const dest = `${sp}.unreadable-${ts}`;
|
|
128
|
+
renameSync(sp, dest);
|
|
129
|
+
try {
|
|
130
|
+
chmodSync(dest, 384);
|
|
131
|
+
} catch {
|
|
132
|
+
}
|
|
133
|
+
console.warn(`[crdt-sync] WARN: ${reason}: quarantined ${path.basename(sp)} -> ${path.basename(dest)} (NOT deleted); rebuilding from DB`);
|
|
134
|
+
} catch (err) {
|
|
135
|
+
console.warn(`[crdt-sync] WARN: ${reason}: could not quarantine ${path.basename(sp)} (${err instanceof Error ? err.message : String(err)}); leaving it in place and rebuilding from DB`);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function scheduleRebuildFromDb() {
|
|
139
|
+
rebuildFromDb().catch((err) => {
|
|
140
|
+
console.warn("[crdt-sync] rebuild from DB failed:", err);
|
|
141
|
+
});
|
|
142
|
+
}
|
|
109
143
|
function initCrdtDoc() {
|
|
110
144
|
if (doc) return doc;
|
|
111
145
|
doc = new Y.Doc();
|
|
112
146
|
const sp = getStatePath();
|
|
147
|
+
let migratedLegacyPlaintext = false;
|
|
148
|
+
loadSkippedPendingCrypto = false;
|
|
113
149
|
if (existsSync(sp)) {
|
|
150
|
+
let raw = null;
|
|
114
151
|
try {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
152
|
+
raw = readFileSync(sp);
|
|
153
|
+
} catch (err) {
|
|
154
|
+
console.warn(`[crdt-sync] WARN: could not read state file (${err instanceof Error ? err.message : String(err)}); leaving it in place and rebuilding from DB`);
|
|
155
|
+
scheduleRebuildFromDb();
|
|
156
|
+
}
|
|
157
|
+
if (raw !== null) {
|
|
158
|
+
if (raw.length === 0) {
|
|
159
|
+
quarantineStateFile(sp, "empty state file");
|
|
160
|
+
scheduleRebuildFromDb();
|
|
161
|
+
} else if (isEncryptedCrdtState(raw)) {
|
|
162
|
+
if (!isSyncCryptoInitialized()) {
|
|
163
|
+
loadSkippedPendingCrypto = true;
|
|
164
|
+
console.warn("[crdt-sync] WARN: encrypted state present but sync crypto not initialized; skipping load and BLOCKING overwrite until a successful load (state preserved)");
|
|
165
|
+
} else {
|
|
166
|
+
try {
|
|
167
|
+
const blob = raw.subarray(CRDT_STATE_ENC_MAGIC.length).toString("utf8");
|
|
168
|
+
Y.applyUpdate(doc, new Uint8Array(decryptSyncBlob(blob)));
|
|
169
|
+
} catch (err) {
|
|
170
|
+
console.warn(`[crdt-sync] WARN: could not decrypt state file (${err instanceof Error ? err.message : String(err)}) \u2014 likely a rotated/foreign key`);
|
|
171
|
+
quarantineStateFile(sp, "decrypt failed");
|
|
172
|
+
scheduleRebuildFromDb();
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
} else {
|
|
176
|
+
try {
|
|
177
|
+
Y.applyUpdate(doc, new Uint8Array(raw));
|
|
178
|
+
migratedLegacyPlaintext = true;
|
|
179
|
+
} catch (err) {
|
|
180
|
+
console.warn(`[crdt-sync] WARN: state file is neither encrypted nor a valid legacy update (${err instanceof Error ? err.message : String(err)})`);
|
|
181
|
+
quarantineStateFile(sp, "unparseable state file");
|
|
182
|
+
scheduleRebuildFromDb();
|
|
183
|
+
}
|
|
122
184
|
}
|
|
123
|
-
rebuildFromDb().catch((err) => {
|
|
124
|
-
console.warn("[crdt-sync] rebuild from DB failed:", err);
|
|
125
|
-
});
|
|
126
185
|
}
|
|
127
186
|
}
|
|
128
187
|
doc.on("update", () => {
|
|
129
188
|
persistState();
|
|
130
189
|
});
|
|
190
|
+
if (migratedLegacyPlaintext) persistState();
|
|
131
191
|
return doc;
|
|
132
192
|
}
|
|
133
193
|
function getMemoriesMap() {
|
|
@@ -208,14 +268,30 @@ function onUpdate(callback) {
|
|
|
208
268
|
}
|
|
209
269
|
function persistState() {
|
|
210
270
|
if (!doc) return;
|
|
271
|
+
if (loadSkippedPendingCrypto) {
|
|
272
|
+
if (!_warnedPersistBlocked) {
|
|
273
|
+
_warnedPersistBlocked = true;
|
|
274
|
+
console.warn("[crdt-sync] WARN: refusing to persist \u2014 on-disk encrypted state was not loaded this session (sync crypto uninitialized). CRDT deltas are NOT being written to avoid overwriting recoverable state.");
|
|
275
|
+
}
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
if (!isSyncCryptoInitialized()) {
|
|
279
|
+
if (!_warnedPersistNoCrypto) {
|
|
280
|
+
_warnedPersistNoCrypto = true;
|
|
281
|
+
console.warn("[crdt-sync] WARN: sync crypto not initialized \u2014 CRDT state cannot be encrypted and will NOT be persisted this session. Deltas remain in memory only.");
|
|
282
|
+
}
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
211
285
|
try {
|
|
212
286
|
const sp = getStatePath();
|
|
213
287
|
const dir = path.dirname(sp);
|
|
214
288
|
if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
|
|
215
289
|
const state = Y.encodeStateAsUpdate(doc);
|
|
290
|
+
const encoded = CRDT_STATE_ENC_MAGIC + encryptSyncBlob(Buffer.from(state));
|
|
216
291
|
const tmp = `${sp}.tmp-${process.pid}-${Date.now()}`;
|
|
217
292
|
try {
|
|
218
|
-
writeFileSync(tmp,
|
|
293
|
+
writeFileSync(tmp, encoded, { mode: 384 });
|
|
294
|
+
chmodSync(tmp, 384);
|
|
219
295
|
renameSync(tmp, sp);
|
|
220
296
|
} catch (err) {
|
|
221
297
|
try {
|
|
@@ -256,9 +332,14 @@ function destroyCrdtDoc() {
|
|
|
256
332
|
doc.destroy();
|
|
257
333
|
doc = null;
|
|
258
334
|
}
|
|
335
|
+
loadSkippedPendingCrypto = false;
|
|
336
|
+
_warnedPersistNoCrypto = false;
|
|
337
|
+
_warnedPersistBlocked = false;
|
|
259
338
|
}
|
|
260
339
|
|
|
261
340
|
export {
|
|
341
|
+
CRDT_STATE_ENC_MAGIC,
|
|
342
|
+
isEncryptedCrdtState,
|
|
262
343
|
_setStatePath,
|
|
263
344
|
initCrdtDoc,
|
|
264
345
|
applyRemoteUpdate,
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createReminder
|
|
3
|
+
} from "./chunk-UUEKJDK6.js";
|
|
4
|
+
|
|
5
|
+
// src/mcp/tools/create-reminder.ts
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
function registerCreateReminder(server) {
|
|
8
|
+
server.registerTool(
|
|
9
|
+
"create_reminder",
|
|
10
|
+
{
|
|
11
|
+
title: "Create Reminder",
|
|
12
|
+
description: "Set a reminder for the founder. Shown in the boot brief every session.",
|
|
13
|
+
inputSchema: {
|
|
14
|
+
text: z.string().describe("What to remind about"),
|
|
15
|
+
due_date: z.string().optional().describe("Optional due date \u2014 ISO date (2026-04-01) or null for persistent"),
|
|
16
|
+
daily_push: z.string().optional().describe('Optional daily push schedule \u2014 JSON {"hours":[9,18]} (0\u201323, founder timezone). A gateway channel pushes this reminder at those hours.')
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
async ({ text, due_date, daily_push }) => {
|
|
20
|
+
let reminder;
|
|
21
|
+
try {
|
|
22
|
+
reminder = await createReminder(text, due_date, daily_push);
|
|
23
|
+
} catch (err) {
|
|
24
|
+
return {
|
|
25
|
+
content: [{ type: "text", text: err instanceof Error ? err.message : String(err) }],
|
|
26
|
+
isError: true
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const dueStr = reminder.dueDate ? ` (due: ${reminder.dueDate})` : "";
|
|
30
|
+
const pushStr = reminder.dailyPush ? ` (daily push: ${reminder.dailyPush})` : "";
|
|
31
|
+
return {
|
|
32
|
+
content: [{ type: "text", text: `Reminder set: "${reminder.text}"${dueStr}${pushStr}` }]
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
registerCreateReminder
|
|
40
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isValidX25519Recipient,
|
|
3
3
|
pubKeyHash
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IOEUAQWP.js";
|
|
5
5
|
import {
|
|
6
6
|
EXE_AI_DIR
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WZHZCDDO.js";
|
|
8
8
|
|
|
9
9
|
// src/lib/monitor-grants.ts
|
|
10
10
|
import crypto from "crypto";
|