@askexenow/exe-os 0.9.341 → 0.9.343
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-LW45DSJ4.js → active-agent-MDGDKGCL.js} +5 -5
- package/dist/{active-agent-AIQP4DFL.js → active-agent-SNVSJFI5.js} +5 -5
- package/dist/{agentic-ontology-RVUNRCQY.js → agentic-ontology-SCG6UUHK.js} +1 -1
- package/dist/{backfill-gate-J7UXFNXU.js → backfill-gate-HARARX5F.js} +3 -3
- package/dist/{backfill-metadata-ZSDJ4O2T.js → backfill-metadata-SCQ5FPDR.js} +8 -8
- package/dist/{background-jobs-STURKDCS.js → background-jobs-KKRO3QRO.js} +3 -3
- package/dist/{backup-verify-ZAJLEL4X.js → backup-verify-KDLOT4RP.js} +4 -4
- package/dist/{behaviors-EO7KCP3H.js → behaviors-MICGF3H3.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 +19 -19
- 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 +27 -24
- package/dist/bin/cli.js +79 -25
- package/dist/bin/customer-readiness.js +1 -1
- package/dist/bin/daemon-restart-handoff.js +27 -0
- package/dist/bin/deferred-daemon-restart.js +132 -99
- package/dist/bin/exe-agent-config.js +9 -8
- package/dist/bin/exe-agent.js +19 -19
- package/dist/bin/exe-assign.js +12 -12
- package/dist/bin/exe-boot.js +202 -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 +27 -24
- package/dist/bin/exe-doctor.js +10 -6
- package/dist/bin/exe-export-behaviors.js +13 -13
- package/dist/bin/exe-forget.js +14 -12
- 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 +30 -28
- package/dist/bin/exe-kill.js +34 -31
- package/dist/bin/exe-launch-agent.js +146 -70
- package/dist/bin/exe-memory-reads.js +257 -0
- package/dist/bin/exe-new-employee.js +12 -11
- package/dist/bin/exe-os-mcp-proxy.js +365 -0
- package/dist/bin/exe-pending-messages.js +28 -25
- package/dist/bin/exe-pending-notifications.js +27 -24
- package/dist/bin/exe-pending-reviews.js +27 -24
- package/dist/bin/exe-rename.js +7 -7
- package/dist/bin/exe-review.js +33 -30
- package/dist/bin/exe-search.js +11 -9
- package/dist/bin/exe-session-cleanup.js +117 -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 +28 -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 +28 -25
- package/dist/bin/graph-backfill.js +11 -11
- package/dist/bin/graph-export.js +11 -11
- package/dist/bin/import-history.js +13 -13
- package/dist/bin/install.js +106 -99
- 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 +27 -24
- 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-CFA5NKSK.js} +5 -5
- package/dist/boot-review-sections-FX2FYZJQ.js +108 -0
- package/dist/branch-hygiene-PILXQQDF.js +224 -0
- package/dist/{branding-JTEOF4ZV.js → branding-ZSC6YN63.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-O27UB3J5.js} +4 -4
- package/dist/{capacity-monitor-MG3FTUD5.js → capacity-monitor-5DVZY3SM.js} +28 -25
- package/dist/{catchup-brief-BVJOF3GL.js → catchup-brief-3GYI6AKV.js} +33 -29
- package/dist/{chunk-LEJ25726.js → chunk-25ORSHR7.js} +660 -444
- package/dist/{chunk-Q5AIPSSC.js → chunk-25X4JD2V.js} +10 -6
- package/dist/{chunk-MJB5ZFQM.js → chunk-2F7WGH5K.js} +57 -6
- package/dist/{chunk-LLU6WZLK.js → chunk-2VZMLKNS.js} +2 -2
- package/dist/{chunk-YWQMWFYR.js → chunk-2YPCD2UH.js} +24 -18
- package/dist/{chunk-L2YGXJGF.js → chunk-34RULPS2.js} +3 -3
- package/dist/{chunk-CLAYNAXC.js → chunk-3EUMUSLE.js} +1 -1
- package/dist/{chunk-KP4PY2Z2.js → chunk-3MLSM77R.js} +4 -4
- package/dist/{chunk-4LWV633D.js → chunk-3OO34BOT.js} +1 -1
- package/dist/{chunk-IELUDZAA.js → chunk-3OR54BBE.js} +3 -3
- package/dist/{chunk-Y3S4H77G.js → chunk-3PFP7GV2.js} +1 -1
- package/dist/{chunk-DPFQ2WQX.js → chunk-4AA2HRIM.js} +4 -4
- package/dist/{chunk-7SEC2AG5.js → chunk-4E3SZEEI.js} +13 -4
- package/dist/chunk-4EI5AHHR.js +37 -0
- package/dist/{chunk-7LF5DS3A.js → chunk-4MLSFZLY.js} +20 -9
- package/dist/{chunk-EDOO23B2.js → chunk-4N2NRGCM.js} +2 -2
- package/dist/chunk-4QCFFW2H.js +378 -0
- package/dist/{chunk-DNVFWFYF.js → chunk-4UIYLTA3.js} +1 -1
- package/dist/{chunk-BJOBR6P2.js → chunk-4VUAG6DN.js} +216 -9
- package/dist/{chunk-32YHCHWW.js → chunk-54O2FWRM.js} +1 -1
- package/dist/chunk-5DSVWSL5.js +91 -0
- package/dist/{chunk-2YCFNBC4.js → chunk-5ERB3AWT.js} +3 -2
- package/dist/{chunk-J6SEDDOR.js → chunk-5GDTZOVS.js} +2 -2
- package/dist/chunk-5H47VHB7.js +30 -0
- package/dist/{chunk-NTI22F3R.js → chunk-5HQHHQUR.js} +1 -1
- package/dist/chunk-5MLYU6I2.js +76 -0
- package/dist/{chunk-3NGZ4PL7.js → chunk-5VV2YMMB.js} +11 -2
- package/dist/{chunk-AP455LBW.js → chunk-62MYX7G4.js} +2 -2
- package/dist/{chunk-CCIEIRV2.js → chunk-6CYVBLZW.js} +2 -2
- package/dist/{chunk-6BQG7EKO.js → chunk-6IK2ME5X.js} +2 -2
- package/dist/{chunk-HJX6NCJF.js → chunk-6JMRRJD6.js} +39 -10
- package/dist/{chunk-A47MXY2I.js → chunk-6L6SXVTP.js} +58 -24
- package/dist/{chunk-BR4423AS.js → chunk-6ST7ZWTV.js} +1 -1
- package/dist/{chunk-5ZNY7IZI.js → chunk-6TJLBXR5.js} +66 -7
- package/dist/{chunk-4FJZ6SO7.js → chunk-6XKIMGHA.js} +1 -1
- package/dist/{chunk-AYLNJGCS.js → chunk-735SUAT4.js} +93 -12
- package/dist/chunk-76CJBM36.js +88 -0
- package/dist/{chunk-C445WRUX.js → chunk-7M5AWCR3.js} +2 -2
- package/dist/{chunk-LOBCQXV5.js → chunk-7MESPFOK.js} +4 -4
- package/dist/{chunk-B7CUBLF7.js → chunk-7S3A4TOL.js} +12 -12
- package/dist/{chunk-2C455MU3.js → chunk-7UNIYLGV.js} +29 -5
- package/dist/{chunk-RMOBQ6A5.js → chunk-AD2VCHSS.js} +1 -1
- package/dist/{chunk-FOV57K47.js → chunk-AGHKOBA6.js} +258 -14
- package/dist/chunk-AM7S2TY6.js +54 -0
- package/dist/{chunk-GOGSWXNZ.js → chunk-B4LOFZLB.js} +277 -137
- package/dist/{chunk-LA2Z6RMS.js → chunk-BUI2CHLQ.js} +1 -1
- package/dist/{chunk-WWNQFOSP.js → chunk-BVURFD5R.js} +2 -2
- package/dist/{chunk-ITMEE7PQ.js → chunk-BXSC34Y2.js} +3 -3
- package/dist/{chunk-SHIICYJW.js → chunk-BYTDMAGB.js} +4 -2
- package/dist/{chunk-JSKBHUR7.js → chunk-BZA4N43B.js} +2 -2
- package/dist/{chunk-GPW32HVB.js → chunk-C24F7SOO.js} +4 -4
- package/dist/{chunk-BJ23BNED.js → chunk-CBD64QQG.js} +1 -1
- package/dist/chunk-D74XYSA3.js +621 -0
- package/dist/{chunk-2WMTTIAZ.js → chunk-DHW4DIGK.js} +2 -2
- package/dist/{chunk-6MVI4QH2.js → chunk-DLGEQJ6E.js} +1 -1
- package/dist/{chunk-TWXZM34M.js → chunk-DT6LX4SV.js} +6 -6
- package/dist/{chunk-I7ECEP3W.js → chunk-E4FGXPHB.js} +43 -6
- package/dist/{chunk-XQNNB5GY.js → chunk-F55P3H4S.js} +37 -2
- package/dist/{chunk-W6K4XB6G.js → chunk-FCKYJSVY.js} +1 -1
- package/dist/{chunk-MC4ATFJV.js → chunk-FQEBVYVE.js} +6 -6
- package/dist/{chunk-RWSLVYTE.js → chunk-GD7FA6IP.js} +356 -124
- package/dist/{chunk-TIXTHUVJ.js → chunk-GGQMX4IU.js} +3 -3
- package/dist/chunk-GL57PO3K.js +104 -0
- package/dist/chunk-GWDSB25T.js +6 -0
- package/dist/{chunk-HSYJ6DZ2.js → chunk-H6BVQIAF.js} +39 -24
- package/dist/{chunk-KPIN44GZ.js → chunk-H6WLWIPN.js} +1 -1
- package/dist/{chunk-KKOLHBNC.js → chunk-HDL7CXQ4.js} +958 -215
- package/dist/{chunk-CMR64RYM.js → chunk-HENPNYGY.js} +13 -13
- package/dist/{chunk-32SXNM3G.js → chunk-HRBTW62M.js} +1 -1
- package/dist/{chunk-BV6GBSRP.js → chunk-IKAGAKAI.js} +249 -28
- package/dist/{chunk-JCBKARSK.js → chunk-IOEUAQWP.js} +1 -1
- package/dist/{chunk-PVIH3ZGV.js → chunk-IPB5QM4S.js} +90 -10
- package/dist/{chunk-B75BOKEI.js → chunk-IRUWKANS.js} +2 -2
- package/dist/{chunk-YHUNDGVV.js → chunk-JBMIIBPS.js} +1 -1
- package/dist/{chunk-2IWBY7XK.js → chunk-JLLJ3ER3.js} +2 -2
- package/dist/{chunk-N7A5D25S.js → chunk-JMMF3PPQ.js} +1 -1
- package/dist/{chunk-WNKVKNOM.js → chunk-K2G3VDCV.js} +1 -1
- package/dist/{chunk-BVV6NHKQ.js → chunk-KIUNO3JP.js} +5 -5
- package/dist/{chunk-OUEFW4RK.js → chunk-KRRZNASS.js} +2 -2
- package/dist/{chunk-IB336P52.js → chunk-L5GFREAH.js} +1 -1
- package/dist/{chunk-6QW6JHRE.js → chunk-LSAH73QD.js} +59 -32
- package/dist/chunk-LUQ57SRM.js +127 -0
- package/dist/{sweep-budget-WB2FKPYN.js → chunk-M6DZYWZH.js} +8 -3
- package/dist/{chunk-2UGGBIDL.js → chunk-MNIA3IOU.js} +3 -3
- package/dist/{chunk-3BRVLPPA.js → chunk-MOPUCPXK.js} +4 -0
- package/dist/{chunk-K6KRBXQP.js → chunk-MTFSD6DH.js} +3 -2
- package/dist/{chunk-PTJBWC77.js → chunk-MVWFY7IO.js} +4 -3
- package/dist/chunk-MVYB76QG.js +341 -0
- package/dist/{chunk-DGGDUKH6.js → chunk-NDJASAXP.js} +1 -1
- package/dist/{chunk-PPZOWQHP.js → chunk-NG2ABIDX.js} +1 -1
- package/dist/{chunk-TPHCZDE3.js → chunk-NPFU2NPG.js} +1 -1
- package/dist/{chunk-T2PYVVZ5.js → chunk-NUVP4CCD.js} +1 -1
- package/dist/chunk-O5VMAZZH.js +40 -0
- package/dist/chunk-O7LWR36Z.js +269 -0
- package/dist/{chunk-7Y5UDEVM.js → chunk-OL4JFQ2T.js} +7 -5
- package/dist/{chunk-HUSVERE6.js → chunk-OZUQJZYO.js} +7 -6
- package/dist/{chunk-NDSNM5OH.js → chunk-PAYVSTF2.js} +1 -1
- package/dist/chunk-PWRC5XZO.js +161 -0
- package/dist/{chunk-ZNE6H2JO.js → chunk-PXPBF2JZ.js} +4 -4
- package/dist/{chunk-ATKW3SYL.js → chunk-QFBT7CJH.js} +1 -1
- package/dist/{chunk-WH7XN5ER.js → chunk-QTKDGDR5.js} +1 -1
- package/dist/{chunk-Z42MXYWW.js → chunk-QWVXN224.js} +110 -28
- package/dist/{chunk-UU4UINUX.js → chunk-R3QDXB55.js} +13 -3
- package/dist/{chunk-IXBIVKWZ.js → chunk-RZZ66LSS.js} +98 -21
- package/dist/chunk-S3FIQCSM.js +232 -0
- package/dist/{chunk-RNAYCUNM.js → chunk-S3THSOWV.js} +1 -1
- package/dist/{chunk-HAZO7TRD.js → chunk-SA7GZU3U.js} +1 -1
- package/dist/{chunk-NFBW7N4D.js → chunk-SIGS6D5R.js} +2 -2
- package/dist/chunk-SJN5ZEDI.js +265 -0
- package/dist/{chunk-SSTLTIF3.js → chunk-SKGMF2SO.js} +25 -2
- package/dist/{chunk-CYA5S5OD.js → chunk-SLK3DPYU.js} +6 -5
- package/dist/{chunk-MWZFF3Q7.js → chunk-SXKMH4JX.js} +1 -1
- package/dist/{chunk-WD55PEBM.js → chunk-T3EJIMDX.js} +4 -4
- package/dist/{chunk-2P4WJNN5.js → chunk-TI2XFHRQ.js} +11 -7
- package/dist/{chunk-UIU2DGRV.js → chunk-TR73G4GH.js} +4 -4
- package/dist/{task-enforcement-X5QVL6RE.js → chunk-UC37QPSR.js} +173 -69
- package/dist/chunk-UU4FHMON.js +186 -0
- package/dist/{chunk-HNLXMD2V.js → chunk-UZ2LYBY5.js} +2 -2
- package/dist/{chunk-6D2PI4QD.js → chunk-V7AGCRLI.js} +1 -1
- package/dist/chunk-VIIHBYIP.js +335 -0
- package/dist/{chunk-54QCG45Y.js → chunk-WOYADZF5.js} +56 -5
- package/dist/{chunk-GFDGDFBF.js → chunk-WYRZEMRU.js} +22 -5
- package/dist/{chunk-BMHQPIJ2.js → chunk-WZTWA4G4.js} +585 -75
- package/dist/chunk-X4Z5DPOC.js +54 -0
- package/dist/{chunk-6MVC43X7.js → chunk-XZTTLTPG.js} +4 -4
- package/dist/{chunk-U2MREVXQ.js → chunk-YCPZTX7V.js} +2 -2
- package/dist/{chunk-YIIME2OW.js → chunk-YLXTKI6M.js} +1 -1
- package/dist/{chunk-4QSJVMMT.js → chunk-YYCKKORY.js} +13 -20
- package/dist/{chunk-YLQXP7T7.js → chunk-Z5VL7YBR.js} +1 -1
- package/dist/{chunk-XSMRR4IW.js → chunk-ZCLVPTZU.js} +26 -27
- package/dist/{chunk-5RACW3LX.js → chunk-ZUBUP66T.js} +1 -1
- package/dist/{chunk-EDH54E5A.js → chunk-ZYLKX3KB.js} +14 -14
- package/dist/{cleanup-graph-garbage-MXQ4Q2MA.js → cleanup-graph-garbage-DDVPSPI4.js} +8 -8
- package/dist/{co-activation-QI5BK4RT.js → co-activation-HLCAD44L.js} +4 -4
- package/dist/{co-occurrence-BYSQNZSV.js → co-occurrence-I5U2PCPX.js} +6 -6
- package/dist/{code-context-index-BNBHDXHW.js → code-context-index-FSYP5VF2.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-YVT5AYSK.js} +1 -1
- package/dist/{crdt-sync-ETPKNBCU.js → crdt-sync-EMV5EZ4J.js} +8 -1
- package/dist/{crm-webhook-M566ZMZS.js → crm-webhook-XJ6UOBHR.js} +2 -2
- package/dist/cto-delegation-gate-5NNZWP2M.js +670 -0
- package/dist/{daemon-auth-7IFSV5FG.js → daemon-auth-TIE7HSWF.js} +5 -3
- package/dist/{daemon-orchestration-XV5GN73R.js → daemon-orchestration-GGSRCXR3.js} +47 -27
- package/dist/{daemon-ready-RKKB4P6K.js → daemon-ready-A7R6XZRF.js} +1 -1
- package/dist/{daemon-ready-signal-WKEJQNRA.js → daemon-ready-signal-LPAZWQOV.js} +3 -1
- package/dist/daemon-restart-circuit-breaker-5V6B6NLS.js +35 -0
- package/dist/daemon-timer-report-NM44WQRH.js +25 -0
- package/dist/{db-restore-events-JVEEP52Z.js → db-restore-events-GQGQSYHV.js} +2 -2
- package/dist/dispatch-ack-VYH3ONSS.js +27 -0
- package/dist/{doc-graph-extractor-LR5KMPH7.js → doc-graph-extractor-3OXUTEKS.js} +6 -6
- package/dist/{documents-FA6N7QDA.js → documents-M7UI6SZ6.js} +12 -12
- package/dist/dreaming-CYQWRJA5.js +47 -0
- package/dist/{exe-drift-TUKTCXZE.js → exe-drift-DPDRG3OM.js} +5 -5
- package/dist/{exe-export-ZLHBXMZC.js → exe-export-SZVIC6KI.js} +11 -11
- package/dist/{exe-import-VVKBZWSA.js → exe-import-Q6TCHQ6P.js} +11 -11
- package/dist/{exe-key-QJXFBF6G.js → exe-key-EVMVLB3Y.js} +244 -229
- package/dist/{exe-org-BGZNNE4H.js → exe-org-3Y3RWGIU.js} +3 -3
- package/dist/{exe-snapshot-JRLUO645.js → exe-snapshot-UX5CFSDX.js} +32 -29
- package/dist/{fast-db-init-JKJEEHUI.js → fast-db-init-O62SMAQL.js} +1 -1
- package/dist/{founder-context-HWPLMZVR.js → founder-context-FCVTBCWI.js} +4 -4
- package/dist/gateway/index.js +21 -21
- 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-AFBXWNTZ.js} +4 -4
- package/dist/{global-procedures-VIIVWB6R.js → global-procedures-BDREAJSZ.js} +6 -6
- package/dist/{graph-auto-extract-HCQQF5AG.js → graph-auto-extract-JJ5OGNGJ.js} +6 -6
- package/dist/{graph-rag-WAK2BRJH.js → graph-rag-JZZAB7PC.js} +2 -2
- package/dist/{hook-integrity-WURH6DS3.js → hook-integrity-IKKZ6HBC.js} +1 -1
- package/dist/hook-prefetch-HLCCAOSZ.js +138 -0
- package/dist/hooks/bug-report-worker.js +33 -28
- package/dist/hooks/codex-stop-task-finalizer.js +33 -28
- package/dist/hooks/commit-complete.js +30 -27
- package/dist/hooks/error-recall.js +16 -15
- package/dist/hooks/exe-heartbeat-hook.js +6 -6
- package/dist/hooks/ingest-worker.js +11 -11
- package/dist/hooks/ingest.js +23 -23
- 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 +29 -26
- package/dist/hooks/post-tool-combined.js +25 -12
- package/dist/hooks/pre-compact.js +30 -27
- package/dist/hooks/pre-tool-use.js +181 -47
- package/dist/hooks/prompt-submit.js +343 -279
- package/dist/hooks/session-end.js +36 -33
- package/dist/hooks/session-start.js +28 -21
- package/dist/hooks/stop.js +36 -33
- package/dist/hooks/subagent-stop.js +29 -26
- package/dist/hooks/summary-worker.js +37 -34
- package/dist/index.js +39 -36
- package/dist/{installer-T2LGHZKL.js → installer-BZ3QV7DJ.js} +9 -9
- package/dist/{installer-NX2CLNV5.js → installer-HADQQZIU.js} +9 -9
- package/dist/{installer-6IFVEQI4.js → installer-OJ7XKSAR.js} +9 -9
- package/dist/{intercom-queue-KYHXXZCQ.js → intercom-queue-NFOLOBTT.js} +26 -23
- package/dist/{key-backup-status-TNEHXA2X.js → key-backup-status-TTO2UUYP.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/{db-backup-MX2G3CEK.js → lib/db-backup.js} +28 -6
- package/dist/lib/db-checkpoint-worker.js +57 -0
- package/dist/lib/db-daemon-client.js +5 -5
- package/dist/lib/db-read-worker-client.js +9 -3
- package/dist/lib/db-write-worker-client.js +17 -0
- package/dist/lib/db-write-worker.js +216 -0
- 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 +1292 -363
- 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 +29 -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 +30 -25
- package/dist/lib/tmux-routing.js +57 -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-MGDR4YNI.js → license-gate-3KPSNYVA.js} +5 -5
- package/dist/{license-sync-UWE6GEB4.js → license-sync-CQ42HDBA.js} +4 -4
- package/dist/mcp/register-tools.js +99 -92
- package/dist/mcp/server.js +102 -95
- 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 +38 -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 +36 -29
- package/dist/mcp/tools/send-message.js +29 -26
- package/dist/mcp/tools/update-task.js +35 -28
- package/dist/{mcp-http-config-RQLYEPTL.js → mcp-http-config-BHAM376G.js} +9 -7
- package/dist/mcp-port-config-PA3W3BJK.js +16 -0
- package/dist/mcp-session-identity-S7GSVRR6.js +178 -0
- package/dist/mcp-session-persist-PS7BIG44.js +62 -0
- package/dist/mcp-stale-flag-ZM23XRSJ.js +11 -0
- package/dist/{memory-cards-VYQ5DPMR.js → memory-cards-47NYPFC3.js} +8 -8
- package/dist/{memory-graph-extractor-GX2HNYLU.js → memory-graph-extractor-IH7YBZ6U.js} +7 -7
- package/dist/{memory-poisoning-defense-TX7627BD.js → memory-poisoning-defense-MZQFCQ2G.js} +4 -4
- package/dist/{memory-pressure-watchdog-MLNNH26B.js → memory-pressure-watchdog-PSVJ5BCF.js} +77 -37
- package/dist/{memory-queue-X2CSEAKE.js → memory-queue-ZI7DX44D.js} +5 -3
- package/dist/{memory-queue-client-YRL6XTGU.js → memory-queue-client-6IPZTWZA.js} +6 -6
- package/dist/{memory-reflection-KIGEFSI4.js → memory-reflection-3VPYJS2G.js} +4 -4
- package/dist/{monitor-grants-RZOVSYVO.js → monitor-grants-OXKZ75TH.js} +5 -5
- package/dist/{monitor-identity-MOXISYNG.js → monitor-identity-GLFZSEAH.js} +2 -2
- package/dist/{notification-ledger-B6AVEGMV.js → notification-ledger-A6MYLQAN.js} +27 -24
- package/dist/{notifications-DWXV7SVL.js → notifications-6XCSUTJW.js} +26 -23
- package/dist/{orchestration-events-ZG7O4HRY.js → orchestration-events-5XDNVNR2.js} +5 -5
- package/dist/{orchestration-phase-CXRCBCK7.js → orchestration-phase-6DJUSFMV.js} +3 -3
- package/dist/orchestrator-2RQBNMZL.js +48 -0
- package/dist/{pipeline-router-RTLAGZTA.js → pipeline-router-N2LDNFJ5.js} +5 -5
- package/dist/{plan-limits-WLQZTCSF.js → plan-limits-7BUMNQOI.js} +7 -7
- package/dist/platform-procedures-VDW2R65H.js +13 -0
- package/dist/{preferences-TYTGDXQZ.js → preferences-TWIXZBKS.js} +2 -2
- package/dist/{project-boot-6CGQ3EAH.js → project-boot-RXCHF3S7.js} +2 -2
- package/dist/{projection-worker-44SEKTZ5.js → projection-worker-CKC2E22U.js} +5 -5
- package/dist/{prospective-memory-UACFTYXK.js → prospective-memory-Q7ZUCAS4.js} +4 -4
- package/dist/{push-notifications-W5JRXLKJ.js → push-notifications-VCSZYVD5.js} +3 -3
- package/dist/{reranker-NL4YAV6R.js → reranker-L3GLRUDY.js} +3 -3
- package/dist/{retrieval-health-4C2PO6HH.js → retrieval-health-DPLY6O6P.js} +1 -1
- package/dist/{review-polling-W5AMHNLT.js → review-polling-DLPMK3QW.js} +27 -24
- package/dist/runtime/index.js +34 -31
- package/dist/{session-events-PGL5GJEB.js → session-events-N5VRC6IT.js} +27 -24
- package/dist/{session-kill-telemetry-6YDGEF27.js → session-kill-telemetry-76ZVQ525.js} +27 -24
- package/dist/session-mcp-config-YKNXG5DW.js +50 -0
- package/dist/{session-scope-3MEOO557.js → session-scope-B3BEHGHO.js} +26 -23
- package/dist/setup-wizard-5SIRITVN.js +14 -0
- package/dist/{shard-manager-MBWQEYNG.js → shard-manager-OETALPDW.js} +3 -3
- package/dist/{skill-refinement-EOROTBPX.js → skill-refinement-ACXLAK2G.js} +5 -5
- package/dist/{stack-release-PR2XKJ4Q.js → stack-release-HGFFFCGC.js} +90 -15
- package/dist/{stack-update-LMDM27ZW.js → stack-update-YVFP65NY.js} +5 -5
- package/dist/{steward-gate-4A2XHYFD.js → steward-gate-2M66UU6A.js} +5 -5
- package/dist/{support-inbox-Z77ACQUY.js → support-inbox-5W2GMJGV.js} +7 -6
- package/dist/{support-outbox-GB5SQFRJ.js → support-outbox-WHGPUYL2.js} +2 -2
- package/dist/sweep-budget-LQYBMDTK.js +15 -0
- package/dist/task-enforcement-C7MMJTKX.js +91 -0
- package/dist/{task-scope-EKYDCVUF.js → task-scope-DK666AKV.js} +28 -23
- package/dist/{tasks-crud-6LBNU43G.js → tasks-crud-DFPIAAEC.js} +38 -23
- package/dist/tasks-notify-4R5YIPZN.js +54 -0
- package/dist/{tasks-review-PBIUYXAL.js → tasks-review-GOYSZEZA.js} +28 -23
- package/dist/{telemetry-upload-WQDFABTF.js → telemetry-upload-Y5F6WYLD.js} +9 -9
- package/dist/tmux-command-guard-KSJKIX3C.js +117 -0
- package/dist/{token-budget-KWGL5DY7.js → token-budget-BAM5QDFV.js} +5 -5
- package/dist/{tool-capability-index-EH3HQVHU.js → tool-capability-index-QOFFCWDS.js} +1 -1
- package/dist/{tool-telemetry-UC55LSIH.js → tool-telemetry-4MF2HIWR.js} +1 -1
- package/dist/tui/App.js +41 -38
- package/dist/{tui-data-M3RBSJL3.js → tui-data-WMYZNTBR.js} +26 -23
- package/dist/{update-check-HFO4VHO4.js → update-check-3FHAWIG2.js} +7 -3
- package/dist/{update-support-VPBD5SD2.js → update-support-44SGQUA4.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-7OK7ZRJL.js} +3 -3
- package/dist/{workflow-engine-MMEHKUN4.js → workflow-engine-EDZGGHAI.js} +2 -2
- package/dist/{working-memory-PY4AG577.js → working-memory-NUVB5SFV.js} +1 -1
- package/dist/worktree-VDCY44ZP.js +47 -0
- package/dist/{worktree-sweep-5WKBU7E6.js → worktree-sweep-VSL7TRQK.js} +7 -7
- package/package.json +5 -3
- package/release-notes.json +86 -54
- package/dist/branch-hygiene-R5NVTRAY.js +0 -138
- package/dist/chunk-2KLAYDFB.js +0 -23
- package/dist/chunk-7YORGTXC.js +0 -138
- package/dist/chunk-CCPHEPLU.js +0 -30
- package/dist/chunk-HCJCW7X4.js +0 -190
- package/dist/chunk-HMP5VT6A.js +0 -118
- package/dist/chunk-PVYR4FCQ.js +0 -113
- package/dist/chunk-RP5GETX5.js +0 -140
- package/dist/chunk-X2FHTDIU.js +0 -34
- 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/mcp-port-config-FFAMMLLE.js +0 -10
- 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-3NCZKWPO.js → chunk-CIG7FSD5.js} +0 -0
- /package/dist/{chunk-MC6VPZKS.js → chunk-DFCSGPNZ.js} +0 -0
- /package/dist/{chunk-C2SRRCRK.js → chunk-EBTWNNAS.js} +0 -0
- /package/dist/{chunk-OADURIIN.js → chunk-WTH4CSAP.js} +0 -0
- /package/dist/{core-memory-3IBWM4WR.js → core-memory-VOBMIFRX.js} +0 -0
- /package/dist/{entity-boost-DWAWXFKN.js → entity-boost-N4NAK4WA.js} +0 -0
- /package/dist/{message-queue-client-3PTHPG5Q.js → message-queue-client-WMIO5FL5.js} +0 -0
- /package/dist/{oauth-server-M5TGXT6D.js → oauth-server-HPQCBLZQ.js} +0 -0
- /package/dist/{webhook-pipe-FZYLO6RR.js → webhook-pipe-HH7XXXYC.js} +0 -0
- /package/dist/{wiki-acl-7CROE3MJ.js → wiki-acl-NEM3L4LK.js} +0 -0
- /package/dist/{wiki-client-VNDOBK63.js → wiki-client-WREIYJLY.js} +0 -0
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EXE_AI_DIR
|
|
3
|
+
} from "./chunk-OL4JFQ2T.js";
|
|
4
|
+
|
|
5
|
+
// src/lib/memory-queue.ts
|
|
6
|
+
import {
|
|
7
|
+
appendFileSync,
|
|
8
|
+
mkdirSync,
|
|
9
|
+
readFileSync,
|
|
10
|
+
readdirSync,
|
|
11
|
+
renameSync,
|
|
12
|
+
unlinkSync,
|
|
13
|
+
existsSync,
|
|
14
|
+
statSync,
|
|
15
|
+
writeFileSync
|
|
16
|
+
} from "fs";
|
|
17
|
+
import path from "path";
|
|
18
|
+
import crypto from "crypto";
|
|
19
|
+
var QUEUE_PATH = path.join(EXE_AI_DIR, "memory-queue.jsonl");
|
|
20
|
+
var PROCESSING_PATH = QUEUE_PATH + ".processing";
|
|
21
|
+
var PROCESSING_PREFIX = path.basename(PROCESSING_PATH);
|
|
22
|
+
var TTL_MS = 24 * 60 * 60 * 1e3;
|
|
23
|
+
var DEFAULT_STALE_LEASE_MS = 5 * 60 * 1e3;
|
|
24
|
+
function enqueueMemory(entry) {
|
|
25
|
+
mkdirSync(path.dirname(QUEUE_PATH), { recursive: true });
|
|
26
|
+
appendFileSync(QUEUE_PATH, JSON.stringify(entry) + "\n");
|
|
27
|
+
}
|
|
28
|
+
function claimQueue(options = {}) {
|
|
29
|
+
const staleLeaseMs = options.staleLeaseMs ?? DEFAULT_STALE_LEASE_MS;
|
|
30
|
+
const staleLease = claimStaleLease(staleLeaseMs);
|
|
31
|
+
if (staleLease) return staleLease;
|
|
32
|
+
if (!existsSync(QUEUE_PATH)) return null;
|
|
33
|
+
try {
|
|
34
|
+
const stat = statSync(QUEUE_PATH);
|
|
35
|
+
if (stat.size === 0) {
|
|
36
|
+
try {
|
|
37
|
+
unlinkSync(QUEUE_PATH);
|
|
38
|
+
} catch {
|
|
39
|
+
}
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
} catch {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
const leasePath = newLeasePath();
|
|
46
|
+
try {
|
|
47
|
+
renameSync(QUEUE_PATH, leasePath);
|
|
48
|
+
} catch {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
const entries = parseQueueFile(leasePath);
|
|
52
|
+
if (entries.length === 0) {
|
|
53
|
+
try {
|
|
54
|
+
unlinkSync(leasePath);
|
|
55
|
+
} catch {
|
|
56
|
+
}
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
return { leasePath, entries };
|
|
60
|
+
}
|
|
61
|
+
function ackQueue(leasePath) {
|
|
62
|
+
assertQueueLeasePath(leasePath);
|
|
63
|
+
try {
|
|
64
|
+
unlinkSync(leasePath);
|
|
65
|
+
} catch {
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function retryQueueEntries(leasePath, entries) {
|
|
69
|
+
assertQueueLeasePath(leasePath);
|
|
70
|
+
if (entries.length === 0) {
|
|
71
|
+
ackQueue(leasePath);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
writeFileSync(leasePath, entries.map((entry) => JSON.stringify(entry)).join("\n") + "\n");
|
|
75
|
+
}
|
|
76
|
+
async function processQueueEntries(entries, writeEntry, options = {}) {
|
|
77
|
+
const batchSize = Math.max(1, options.batchSize ?? 1);
|
|
78
|
+
const yieldFn = options.yieldFn ?? (() => new Promise((resolve) => setImmediate(resolve)));
|
|
79
|
+
const isDraining = options.isDraining ?? (() => false);
|
|
80
|
+
const retryEntries = [];
|
|
81
|
+
let processed = 0;
|
|
82
|
+
let preserved = 0;
|
|
83
|
+
let sinceYield = 0;
|
|
84
|
+
const hasBatchHooks = Boolean(options.beginBatch && options.commitBatch && options.rollbackBatch);
|
|
85
|
+
if (hasBatchHooks) {
|
|
86
|
+
const beginBatch = options.beginBatch;
|
|
87
|
+
const commitBatch = options.commitBatch;
|
|
88
|
+
const rollbackBatch = options.rollbackBatch;
|
|
89
|
+
const maxBatchMs = Math.max(1, options.maxBatchMs ?? 500);
|
|
90
|
+
let i = 0;
|
|
91
|
+
while (i < entries.length) {
|
|
92
|
+
while (i < entries.length && !isWritableEntry(entries[i])) i++;
|
|
93
|
+
if (i >= entries.length) break;
|
|
94
|
+
if (isDraining()) {
|
|
95
|
+
const remaining = entries.slice(i).filter(isWritableEntry);
|
|
96
|
+
retryEntries.push(...remaining);
|
|
97
|
+
preserved += remaining.length;
|
|
98
|
+
if (remaining.length > 0) options.onShutdownPreserve?.(remaining.length);
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
const written = [];
|
|
102
|
+
let transactionOpen = false;
|
|
103
|
+
try {
|
|
104
|
+
await beginBatch();
|
|
105
|
+
transactionOpen = true;
|
|
106
|
+
const txStartedAt = Date.now();
|
|
107
|
+
while (i < entries.length && written.length < batchSize) {
|
|
108
|
+
const entry = entries[i];
|
|
109
|
+
if (!isWritableEntry(entry)) {
|
|
110
|
+
i++;
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
if (isDraining()) {
|
|
114
|
+
await rollbackBatch();
|
|
115
|
+
transactionOpen = false;
|
|
116
|
+
const remaining = [...written, ...entries.slice(i).filter(isWritableEntry)];
|
|
117
|
+
retryEntries.push(...remaining);
|
|
118
|
+
preserved += remaining.length;
|
|
119
|
+
if (remaining.length > 0) options.onShutdownPreserve?.(remaining.length);
|
|
120
|
+
return { processed, retryEntries, preserved };
|
|
121
|
+
}
|
|
122
|
+
await writeEntry(entry);
|
|
123
|
+
written.push(entry);
|
|
124
|
+
i++;
|
|
125
|
+
if (Date.now() - txStartedAt >= maxBatchMs) break;
|
|
126
|
+
}
|
|
127
|
+
await commitBatch();
|
|
128
|
+
transactionOpen = false;
|
|
129
|
+
processed += written.length;
|
|
130
|
+
await yieldFn();
|
|
131
|
+
} catch {
|
|
132
|
+
if (transactionOpen) {
|
|
133
|
+
try {
|
|
134
|
+
await rollbackBatch();
|
|
135
|
+
} catch {
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
const failedEntry = i < entries.length ? entries[i] : void 0;
|
|
139
|
+
const toReprocess = [...written];
|
|
140
|
+
if (failedEntry && isWritableEntry(failedEntry)) {
|
|
141
|
+
toReprocess.push(failedEntry);
|
|
142
|
+
}
|
|
143
|
+
if (failedEntry) i++;
|
|
144
|
+
const individual = await processIndividualEntries(
|
|
145
|
+
toReprocess,
|
|
146
|
+
writeEntry,
|
|
147
|
+
{
|
|
148
|
+
isDraining,
|
|
149
|
+
onWriteError: options.onWriteError,
|
|
150
|
+
onShutdownPreserve: options.onShutdownPreserve
|
|
151
|
+
}
|
|
152
|
+
);
|
|
153
|
+
processed += individual.processed;
|
|
154
|
+
retryEntries.push(...individual.retryEntries);
|
|
155
|
+
preserved += individual.preserved;
|
|
156
|
+
if (individual.preserved > 0) {
|
|
157
|
+
const remaining = entries.slice(i).filter(isWritableEntry);
|
|
158
|
+
retryEntries.push(...remaining);
|
|
159
|
+
preserved += remaining.length;
|
|
160
|
+
if (remaining.length > 0) options.onShutdownPreserve?.(remaining.length);
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
await yieldFn();
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return { processed, retryEntries, preserved };
|
|
167
|
+
}
|
|
168
|
+
for (let i = 0; i < entries.length; i++) {
|
|
169
|
+
if (isDraining()) {
|
|
170
|
+
const remaining = entries.slice(i).filter(isWritableEntry);
|
|
171
|
+
retryEntries.push(...remaining);
|
|
172
|
+
preserved = remaining.length;
|
|
173
|
+
if (preserved > 0) options.onShutdownPreserve?.(preserved);
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
const entry = entries[i];
|
|
177
|
+
if (!isWritableEntry(entry)) continue;
|
|
178
|
+
try {
|
|
179
|
+
await writeEntry(entry);
|
|
180
|
+
processed++;
|
|
181
|
+
} catch (err) {
|
|
182
|
+
retryEntries.push(entry);
|
|
183
|
+
options.onWriteError?.(entry, err);
|
|
184
|
+
}
|
|
185
|
+
if (++sinceYield >= batchSize) {
|
|
186
|
+
sinceYield = 0;
|
|
187
|
+
await yieldFn();
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return { processed, retryEntries, preserved };
|
|
191
|
+
}
|
|
192
|
+
function isWritableEntry(entry) {
|
|
193
|
+
return Boolean(entry.raw_text && entry.raw_text.length >= 10);
|
|
194
|
+
}
|
|
195
|
+
async function processIndividualEntries(entries, writeEntry, options) {
|
|
196
|
+
const isDraining = options.isDraining ?? (() => false);
|
|
197
|
+
const retryEntries = [];
|
|
198
|
+
let processed = 0;
|
|
199
|
+
let preserved = 0;
|
|
200
|
+
for (let i = 0; i < entries.length; i++) {
|
|
201
|
+
if (isDraining()) {
|
|
202
|
+
const remaining = entries.slice(i).filter(isWritableEntry);
|
|
203
|
+
retryEntries.push(...remaining);
|
|
204
|
+
preserved = remaining.length;
|
|
205
|
+
if (preserved > 0) options.onShutdownPreserve?.(preserved);
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
208
|
+
const entry = entries[i];
|
|
209
|
+
if (!isWritableEntry(entry)) continue;
|
|
210
|
+
try {
|
|
211
|
+
await writeEntry(entry);
|
|
212
|
+
processed++;
|
|
213
|
+
} catch (err) {
|
|
214
|
+
retryEntries.push(entry);
|
|
215
|
+
options.onWriteError?.(entry, err);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
return { processed, retryEntries, preserved };
|
|
219
|
+
}
|
|
220
|
+
function drainQueue() {
|
|
221
|
+
const entries = [];
|
|
222
|
+
while (true) {
|
|
223
|
+
const lease = claimQueue({ staleLeaseMs: 0 });
|
|
224
|
+
if (!lease) break;
|
|
225
|
+
entries.push(...lease.entries);
|
|
226
|
+
ackQueue(lease.leasePath);
|
|
227
|
+
}
|
|
228
|
+
return entries;
|
|
229
|
+
}
|
|
230
|
+
function queueDepth() {
|
|
231
|
+
const queueFiles = [QUEUE_PATH, ...listLeasePaths()];
|
|
232
|
+
let count = 0;
|
|
233
|
+
for (const filePath of queueFiles) {
|
|
234
|
+
if (!existsSync(filePath)) continue;
|
|
235
|
+
try {
|
|
236
|
+
const content = readFileSync(filePath, "utf8");
|
|
237
|
+
count += content.split("\n").filter((line) => line.trim().length > 0).length;
|
|
238
|
+
} catch {
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
return count;
|
|
242
|
+
}
|
|
243
|
+
function newLeasePath() {
|
|
244
|
+
const unique = `${process.pid}.${Date.now()}.${crypto.randomBytes(6).toString("hex")}`;
|
|
245
|
+
return `${PROCESSING_PATH}.${unique}`;
|
|
246
|
+
}
|
|
247
|
+
function listLeasePaths() {
|
|
248
|
+
const dir = path.dirname(QUEUE_PATH);
|
|
249
|
+
const files = [];
|
|
250
|
+
try {
|
|
251
|
+
for (const name of readdirSync(dir)) {
|
|
252
|
+
if (name === PROCESSING_PREFIX || name.startsWith(`${PROCESSING_PREFIX}.`)) {
|
|
253
|
+
files.push(path.join(dir, name));
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
} catch {
|
|
257
|
+
}
|
|
258
|
+
return files.sort();
|
|
259
|
+
}
|
|
260
|
+
function claimStaleLease(staleLeaseMs) {
|
|
261
|
+
const now = Date.now();
|
|
262
|
+
for (const existingLeasePath of listLeasePaths()) {
|
|
263
|
+
let stat;
|
|
264
|
+
try {
|
|
265
|
+
stat = statSync(existingLeasePath);
|
|
266
|
+
} catch {
|
|
267
|
+
continue;
|
|
268
|
+
}
|
|
269
|
+
const ageMs = Math.max(0, now - stat.mtimeMs);
|
|
270
|
+
if (ageMs < staleLeaseMs) continue;
|
|
271
|
+
let leasePath = existingLeasePath;
|
|
272
|
+
if (path.basename(existingLeasePath) === PROCESSING_PREFIX) {
|
|
273
|
+
leasePath = newLeasePath();
|
|
274
|
+
try {
|
|
275
|
+
renameSync(existingLeasePath, leasePath);
|
|
276
|
+
} catch {
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
const entries = parseQueueFile(leasePath);
|
|
281
|
+
if (entries.length === 0) {
|
|
282
|
+
try {
|
|
283
|
+
unlinkSync(leasePath);
|
|
284
|
+
} catch {
|
|
285
|
+
}
|
|
286
|
+
continue;
|
|
287
|
+
}
|
|
288
|
+
return { leasePath, entries };
|
|
289
|
+
}
|
|
290
|
+
return null;
|
|
291
|
+
}
|
|
292
|
+
function assertQueueLeasePath(leasePath) {
|
|
293
|
+
const resolved = path.resolve(leasePath);
|
|
294
|
+
const dir = path.resolve(path.dirname(QUEUE_PATH));
|
|
295
|
+
const base = path.basename(resolved);
|
|
296
|
+
if (path.dirname(resolved) !== dir || base !== PROCESSING_PREFIX && !base.startsWith(`${PROCESSING_PREFIX}.`)) {
|
|
297
|
+
throw new Error(`Refusing to operate on non-memory-queue lease path: ${leasePath}`);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
function parseQueueFile(filePath) {
|
|
301
|
+
const now = Date.now();
|
|
302
|
+
const entries = [];
|
|
303
|
+
let content;
|
|
304
|
+
try {
|
|
305
|
+
content = readFileSync(filePath, "utf8");
|
|
306
|
+
} catch {
|
|
307
|
+
return entries;
|
|
308
|
+
}
|
|
309
|
+
for (const line of content.split("\n")) {
|
|
310
|
+
const trimmed = line.trim();
|
|
311
|
+
if (!trimmed) continue;
|
|
312
|
+
try {
|
|
313
|
+
const entry = JSON.parse(trimmed);
|
|
314
|
+
if (entry.timestamp) {
|
|
315
|
+
const age = now - new Date(entry.timestamp).getTime();
|
|
316
|
+
if (age > TTL_MS) continue;
|
|
317
|
+
}
|
|
318
|
+
entries.push(entry);
|
|
319
|
+
} catch {
|
|
320
|
+
process.stderr.write(`[memory-queue] Skipping corrupt line: ${trimmed.slice(0, 80)}
|
|
321
|
+
`);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
return entries;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export {
|
|
328
|
+
enqueueMemory,
|
|
329
|
+
claimQueue,
|
|
330
|
+
ackQueue,
|
|
331
|
+
retryQueueEntries,
|
|
332
|
+
processQueueEntries,
|
|
333
|
+
drainQueue,
|
|
334
|
+
queueDepth
|
|
335
|
+
};
|
|
@@ -3,7 +3,8 @@ import {
|
|
|
3
3
|
} from "./chunk-GJV3WDWM.js";
|
|
4
4
|
|
|
5
5
|
// src/lib/tmux-transport.ts
|
|
6
|
-
import { execFileSync } from "child_process";
|
|
6
|
+
import { execFile, execFileSync } from "child_process";
|
|
7
|
+
import { promisify } from "util";
|
|
7
8
|
import { writeFileSync, unlinkSync, mkdirSync } from "fs";
|
|
8
9
|
import { randomBytes } from "crypto";
|
|
9
10
|
import path from "path";
|
|
@@ -24,6 +25,7 @@ var QUIET = {
|
|
|
24
25
|
stdio: ["pipe", "pipe", "pipe"],
|
|
25
26
|
timeout: 3e3
|
|
26
27
|
};
|
|
28
|
+
var execFileAsync = promisify(execFile);
|
|
27
29
|
var TmuxTransport = class {
|
|
28
30
|
sessionsCache = { ts: 0, sessions: [] };
|
|
29
31
|
paneStatusCache = { ts: 0, bySession: /* @__PURE__ */ new Map(), byPaneId: /* @__PURE__ */ new Map() };
|
|
@@ -68,12 +70,30 @@ var TmuxTransport = class {
|
|
|
68
70
|
this.paneStatusCache = { ts: now, bySession, byPaneId };
|
|
69
71
|
return this.paneStatusCache;
|
|
70
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* The tmux session this PROCESS lives in. Immutable for the process lifetime
|
|
75
|
+
* (a process cannot move between sessions), so it is resolved once and
|
|
76
|
+
* memoized — unlike listSessions/paneStatus, which describe the changing
|
|
77
|
+
* outside world and keep their TTL caches.
|
|
78
|
+
*
|
|
79
|
+
* Boot-perf (bug 4b2d2d10): this was an uncached fork on EVERY call. Every
|
|
80
|
+
* sessionScopeFilter() → resolveExeSession() → getMySession() hop paid a
|
|
81
|
+
* `tmux display-message` fork — 9.95s of a 76s boot, most of it from inside
|
|
82
|
+
* per-task loops. Memoizing removes the forks without changing the answer.
|
|
83
|
+
* Deliberately NOT cleared by invalidateCaches(): spawning or killing another
|
|
84
|
+
* session cannot rename the session we are in.
|
|
85
|
+
*/
|
|
86
|
+
mySessionCache = { resolved: false, value: null };
|
|
71
87
|
getMySession() {
|
|
88
|
+
if (this.mySessionCache.resolved) return this.mySessionCache.value;
|
|
89
|
+
let value = null;
|
|
72
90
|
try {
|
|
73
|
-
|
|
91
|
+
value = execFileSync("tmux", ["display-message", "-p", "#{session_name}"], QUIET).trim() || null;
|
|
74
92
|
} catch {
|
|
75
|
-
|
|
93
|
+
value = null;
|
|
76
94
|
}
|
|
95
|
+
this.mySessionCache = { resolved: true, value };
|
|
96
|
+
return value;
|
|
77
97
|
}
|
|
78
98
|
listSessions() {
|
|
79
99
|
return this.listSessionsCached();
|
|
@@ -164,7 +184,18 @@ var TmuxTransport = class {
|
|
|
164
184
|
return { sessionName: name, error: `spawn failed: ${e}` };
|
|
165
185
|
}
|
|
166
186
|
}
|
|
167
|
-
|
|
187
|
+
/**
|
|
188
|
+
* Session-isolation guard shared by the sync kill and the async killAsync.
|
|
189
|
+
* Returns true when the kill is BLOCKED (caller scope ≠ target scope).
|
|
190
|
+
*
|
|
191
|
+
* Session isolation: only kill sessions belonging to the caller's coordinator
|
|
192
|
+
* scope. An agent in exe1 can only kill *-exe1 sessions. Coordinator sessions
|
|
193
|
+
* (exe1) can kill their own employees.
|
|
194
|
+
*
|
|
195
|
+
* Caller identity priority (bug a671b0c9): explicit callerScope → ALS
|
|
196
|
+
* sessionHint/EXE_SESSION → ambient tmux.
|
|
197
|
+
*/
|
|
198
|
+
killBlockedByScope(target, callerScope) {
|
|
168
199
|
const resolvedCaller = this.resolveCallerScope(callerScope);
|
|
169
200
|
if (resolvedCaller && target.includes("-")) {
|
|
170
201
|
const targetScope = target.slice(target.lastIndexOf("-") + 1);
|
|
@@ -174,15 +205,35 @@ var TmuxTransport = class {
|
|
|
174
205
|
`[tmux-transport] BLOCKED kill: caller scope "${resolvedCaller}" tried to kill ${target} (scope ${targetScope} \u2260 ${cScope}). Session isolation enforced.
|
|
175
206
|
`
|
|
176
207
|
);
|
|
177
|
-
return;
|
|
208
|
+
return true;
|
|
178
209
|
}
|
|
179
210
|
}
|
|
211
|
+
return false;
|
|
212
|
+
}
|
|
213
|
+
kill(target, callerScope) {
|
|
214
|
+
if (this.killBlockedByScope(target, callerScope)) return;
|
|
180
215
|
try {
|
|
181
216
|
execFileSync("tmux", ["kill-session", "-t", target], QUIET);
|
|
182
217
|
} catch {
|
|
183
218
|
}
|
|
184
219
|
this.invalidateCaches();
|
|
185
220
|
}
|
|
221
|
+
/**
|
|
222
|
+
* Async twin of kill — same isolation guard, but the actual kill-session runs
|
|
223
|
+
* via execFileAsync so it never blocks the event loop. Bug 1c870c78: the
|
|
224
|
+
* daemon's 5-min TTL timer kills expired sessions through deps.killSession →
|
|
225
|
+
* kill → execFileSync; on kill decisions that was a sync tmux subprocess on
|
|
226
|
+
* the timer. The TTL real deps now await this. Sync kill() is kept for the
|
|
227
|
+
* many non-timer callers (no ripple).
|
|
228
|
+
*/
|
|
229
|
+
async killAsync(target, callerScope) {
|
|
230
|
+
if (this.killBlockedByScope(target, callerScope)) return;
|
|
231
|
+
try {
|
|
232
|
+
await execFileAsync("tmux", ["kill-session", "-t", target], { encoding: "utf8", timeout: 3e3 });
|
|
233
|
+
} catch {
|
|
234
|
+
}
|
|
235
|
+
this.invalidateCaches();
|
|
236
|
+
}
|
|
186
237
|
/**
|
|
187
238
|
* Resolve the caller's coordinator scope for isolation enforcement.
|
|
188
239
|
* In the shared HTTP daemon, ambient tmux is meaningless — prefer the
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
assertCodexModelForAuth,
|
|
3
|
+
describeCodexModelAvailability,
|
|
4
|
+
detectCodexAuthType
|
|
5
|
+
} from "./chunk-AM7S2TY6.js";
|
|
1
6
|
import {
|
|
2
7
|
DEFAULT_RUNTIME,
|
|
3
8
|
RUNTIME_TABLE
|
|
4
9
|
} from "./chunk-NGP6LSV2.js";
|
|
5
10
|
import {
|
|
6
11
|
EXE_AI_DIR
|
|
7
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OL4JFQ2T.js";
|
|
8
13
|
import {
|
|
9
14
|
atomicWriteJsonSync,
|
|
10
15
|
ensurePrivateDirSync
|
|
11
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-BYTDMAGB.js";
|
|
12
17
|
|
|
13
18
|
// src/lib/agent-config.ts
|
|
14
19
|
import { readFileSync, existsSync } from "fs";
|
|
@@ -16,6 +21,14 @@ import path from "path";
|
|
|
16
21
|
var AGENT_CONFIG_PATH = path.join(EXE_AI_DIR, "agent-config.json");
|
|
17
22
|
var KNOWN_RUNTIMES = {
|
|
18
23
|
claude: ["claude-opus-4.8", "claude-opus-4.8-1m", "claude-opus-4.6", "claude-sonnet-4.8", "claude-sonnet-4.6", "claude-haiku-4.5", "claude-fable-5"],
|
|
24
|
+
// Bug fbf99272: this list MUST contain RUNTIME_TABLE.codex.defaultModel — the
|
|
25
|
+
// adapter's own default — or a default codex spawn boots an unlisted model that
|
|
26
|
+
// 400s and idles (asserted by an agent-config-models test so they cannot drift).
|
|
27
|
+
// Codex model availability also depends on AUTH TYPE (ChatGPT account vs OpenAI
|
|
28
|
+
// API key); see codex-auth.ts for the auth-aware preflight. Do NOT add
|
|
29
|
+
// "gpt-5.6" here: VERIFIED 2026-07-10 to 400 ("not supported … with a ChatGPT
|
|
30
|
+
// account"). "gpt-5.3-codex" (the Codex CLI's own default) is likewise NOT
|
|
31
|
+
// whitelisted for the same reason — exe-start-codex pins a listed model instead.
|
|
19
32
|
codex: ["gpt-5.4", "gpt-5.5", "gpt-5.3-codex-spark", "o3", "o4-mini"],
|
|
20
33
|
opencode: ["anthropic/claude-opus-4-8", "anthropic/claude-sonnet-4-8", "anthropic/claude-sonnet-4-6", "openai/gpt-5.4", "google/gemini-2.5-pro", "deepseek/deepseek-r3", "minimax/minimax-m2.5", "xai/grok-4", "xai/grok-3", "xai/grok-2-latest", "xai/grok-2-1212", "xai/grok-beta"]
|
|
21
34
|
};
|
|
@@ -125,7 +138,7 @@ function resolveSpawnRuntimeConfig(agentId, runtimeOverride, modelOverride) {
|
|
|
125
138
|
...modelOverride ? { model: modelOverride } : {}
|
|
126
139
|
};
|
|
127
140
|
}
|
|
128
|
-
function assertRuntimeModelCompatible(runtime, model) {
|
|
141
|
+
function assertRuntimeModelCompatible(runtime, model, opts) {
|
|
129
142
|
const replacement = retiredModelReplacement(model);
|
|
130
143
|
if (replacement) {
|
|
131
144
|
return {
|
|
@@ -134,12 +147,16 @@ function assertRuntimeModelCompatible(runtime, model) {
|
|
|
134
147
|
};
|
|
135
148
|
}
|
|
136
149
|
if (runtime === "codex" && model && isClaudeModel(model)) {
|
|
137
|
-
const codexModels = KNOWN_RUNTIMES.codex?.join(", ") ?? "gpt-* models";
|
|
138
150
|
return {
|
|
139
151
|
ok: false,
|
|
140
|
-
error: `Runtime/model mismatch: runtime "codex" cannot run Claude model "${model}". Codex
|
|
152
|
+
error: `Runtime/model mismatch: runtime "codex" cannot run Claude model "${model}". Codex needs an OpenAI model (${describeCodexModelAvailability(KNOWN_RUNTIMES.codex ?? [])}). Pass a Codex spawn_model, or set the agent's runtime to "claude". Rejected before spawn to avoid a silently dead session (bug a403e1f4).`
|
|
141
153
|
};
|
|
142
154
|
}
|
|
155
|
+
if (runtime === "codex" && model) {
|
|
156
|
+
const authType = opts?.codexAuthType ?? detectCodexAuthType();
|
|
157
|
+
const authCheck = assertCodexModelForAuth(model, authType, KNOWN_RUNTIMES.codex ?? []);
|
|
158
|
+
if (!authCheck.ok) return authCheck;
|
|
159
|
+
}
|
|
143
160
|
if (model && KNOWN_RUNTIMES[runtime]) {
|
|
144
161
|
const validated = validateRuntimeModel(runtime, model);
|
|
145
162
|
if (!validated.ok) {
|