@askexenow/exe-os 0.9.312 → 0.9.313
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deploy/compose/.env.askexe-control-plane.example +1 -1
- package/deploy/compose/.env.customer.example +11 -7
- package/deploy/compose/.env.default +4 -4
- package/deploy/compose/.env.example +7 -7
- package/deploy/compose/docker-compose.yml +43 -19
- package/deploy/compose/gateway.json +2 -2
- package/deploy/compose/init-db.sql +6 -20
- package/deploy/compose/setup.sh +74 -132
- package/deploy/compose/status.sh +5 -0
- package/deploy/stack-manifests/v0.9.json +21 -0
- package/dist/{active-agent-ORX47ZKW.js → active-agent-EWF2HJ3W.js} +6 -6
- package/dist/{active-agent-S5T2YMOR.js → active-agent-FFN5ARMC.js} +6 -6
- package/dist/{agentic-ontology-6KBAXLSJ.js → agentic-ontology-AAUATKUS.js} +1 -1
- package/dist/{backfill-metadata-FV7GX6AS.js → backfill-metadata-FBYFDOTH.js} +7 -7
- package/dist/{background-jobs-A2LV36UX.js → background-jobs-2QZ5IQKE.js} +5 -3
- package/dist/{behaviors-47CPEKJ7.js → behaviors-PQ77IPJR.js} +8 -8
- package/dist/bin/age-ontology-load.js +3 -3
- package/dist/bin/agentic-ontology-backfill.js +9 -9
- package/dist/bin/agentic-reflection-backfill.js +10 -10
- package/dist/bin/agentic-semantic-label.js +9 -9
- package/dist/bin/backfill-conversations.js +10 -10
- package/dist/bin/backfill-responses.js +10 -10
- package/dist/bin/backfill-vectors.js +13 -13
- package/dist/bin/bulk-sync-postgres.js +16 -16
- package/dist/bin/cc-doctor.js +9 -9
- package/dist/bin/cleanup-stale-review-tasks.js +15 -15
- package/dist/bin/cli.js +21 -21
- package/dist/bin/deferred-daemon-restart.js +1 -1
- package/dist/bin/exe-agent-config.js +6 -6
- package/dist/bin/exe-agent.js +14 -14
- package/dist/bin/exe-assign.js +12 -12
- package/dist/bin/exe-boot.js +78 -57
- package/dist/bin/exe-call.js +7 -7
- package/dist/bin/exe-cloud.js +17 -17
- package/dist/bin/exe-config-dump.js +7 -7
- package/dist/bin/exe-dispatch.js +15 -15
- package/dist/bin/exe-doctor.js +11 -2
- package/dist/bin/exe-export-behaviors.js +10 -10
- package/dist/bin/exe-forget.js +9 -9
- package/dist/bin/exe-gateway.js +10 -10
- package/dist/bin/exe-healthcheck.js +9 -9
- package/dist/bin/exe-heartbeat.js +15 -15
- package/dist/bin/exe-kill.js +18 -18
- package/dist/bin/exe-launch-agent.js +30 -28
- package/dist/bin/exe-new-employee.js +36 -15
- package/dist/bin/exe-pending-messages.js +16 -16
- package/dist/bin/exe-pending-notifications.js +15 -15
- package/dist/bin/exe-pending-reviews.js +15 -15
- package/dist/bin/exe-preflight.js +1 -1
- package/dist/bin/exe-rename.js +19 -29
- package/dist/bin/exe-review.js +17 -17
- package/dist/bin/exe-search.js +8 -8
- package/dist/bin/exe-session-cleanup.js +41 -20
- package/dist/bin/exe-settings.js +18 -18
- package/dist/bin/exe-start-codex.js +15 -15
- package/dist/bin/exe-start-opencode.js +11 -11
- package/dist/bin/exe-status.js +16 -16
- package/dist/bin/exe-support.js +5 -5
- package/dist/bin/exe-team.js +6 -6
- package/dist/bin/exe-watchdog.js +32 -3
- package/dist/bin/git-sweep.js +16 -16
- package/dist/bin/graph-backfill.js +8 -8
- package/dist/bin/graph-export.js +8 -8
- package/dist/bin/import-history.js +10 -10
- package/dist/bin/install-launchd.js +2 -2
- package/dist/bin/install.js +15 -15
- package/dist/bin/intercom-check.js +4 -4
- package/dist/bin/mcp-sessions.js +2 -2
- package/dist/bin/orchestration-metrics.js +7 -7
- package/dist/bin/postgres-agentic-reflection-backfill.js +5 -5
- package/dist/bin/postgres-agentic-semantic-backfill.js +4 -4
- package/dist/bin/pre-build-guard.js +12 -1
- package/dist/bin/scan-tasks.js +15 -15
- package/dist/bin/setup.js +3 -3
- package/dist/bin/shard-migrate.js +8 -8
- package/dist/bin/stack-update.js +8 -8
- package/dist/bin/verify-stack.js +3 -1
- package/dist/bin/vps-health-gate.js +1 -1
- package/dist/{branding-SC4BOPUY.js → branding-EDUC7TUP.js} +2 -2
- package/dist/{browser-session-store-DV5TDXXD.js → browser-session-store-CXQMOSEC.js} +1 -1
- package/dist/{capability-cards-WQVY7WSS.js → capability-cards-2U3XWCDP.js} +5 -5
- package/dist/{capacity-monitor-BUKYPSWR.js → capacity-monitor-ZRLW7TVL.js} +16 -16
- package/dist/{catchup-brief-X5IVQAOH.js → catchup-brief-FSBZVYPL.js} +18 -18
- package/dist/{chunk-PMEOSD6S.js → chunk-24BUDF3J.js} +9 -6
- package/dist/{chunk-2NVEKSSP.js → chunk-2FULKRDO.js} +56 -38
- package/dist/{chunk-QB5JOGPK.js → chunk-2PI6JBJL.js} +5 -4
- package/dist/{chunk-MTIJ2NXY.js → chunk-2PWRUIKZ.js} +1 -1
- package/dist/{chunk-NIZQ3CIS.js → chunk-3AMGSCRH.js} +1 -1
- package/dist/{chunk-7ODTYODO.js → chunk-3LGID56M.js} +10 -7
- package/dist/{chunk-GSY6HL3T.js → chunk-4JI54RHR.js} +5 -5
- package/dist/{chunk-ISILDO7P.js → chunk-4THK7IA4.js} +1 -1
- package/dist/{chunk-IRIPGGGL.js → chunk-4UHQYBMQ.js} +1 -1
- package/dist/{chunk-HQODUV3G.js → chunk-552IGUBB.js} +2 -2
- package/dist/{chunk-IRHNV4GY.js → chunk-5KLQCGI5.js} +72 -18
- package/dist/{chunk-SOT23KWW.js → chunk-63UEWYM3.js} +4 -4
- package/dist/{chunk-QE7UVQDP.js → chunk-6PR2RAKM.js} +1 -1
- package/dist/{chunk-ZZXADKAP.js → chunk-6SPUK67A.js} +2 -2
- package/dist/{chunk-RVXWGPD3.js → chunk-75TM3APG.js} +29 -6
- package/dist/{chunk-IZPO6IOZ.js → chunk-7QSXARI3.js} +1 -1
- package/dist/{chunk-A2YZG4AD.js → chunk-AIUXE3ZJ.js} +6 -6
- package/dist/{chunk-U63BZI2B.js → chunk-AJERMFD6.js} +3 -3
- package/dist/{chunk-BUOMSIXH.js → chunk-BMNX3YWX.js} +2 -2
- package/dist/{chunk-YUBTHJVV.js → chunk-BRSMAFBN.js} +1 -1
- package/dist/{chunk-JZW5AOWI.js → chunk-BSPALHIR.js} +2 -2
- package/dist/{chunk-VDYUKTNS.js → chunk-CLAYNAXC.js} +4 -5
- package/dist/{chunk-J3QZPDNH.js → chunk-CNQ25C4C.js} +1 -1
- package/dist/{chunk-GWPICNSO.js → chunk-CSTL7BMK.js} +49 -4
- package/dist/{chunk-5DPE7B7K.js → chunk-CTYHSVHP.js} +1 -1
- package/dist/{chunk-EM4EYF3P.js → chunk-CVTWQZOR.js} +13 -5
- package/dist/{chunk-JNARUXDC.js → chunk-CW3FPWUW.js} +2 -2
- package/dist/{chunk-V42BSVX6.js → chunk-CWACO2D4.js} +51 -4
- package/dist/{chunk-RPBTYQKJ.js → chunk-CWUCD7C7.js} +1 -1
- package/dist/{chunk-DFUCFLZH.js → chunk-D4EMVYI7.js} +2 -2
- package/dist/{chunk-W2J2RF5N.js → chunk-DIHMGQGV.js} +3 -3
- package/dist/{chunk-YB7U4WTY.js → chunk-DJ4RG3RK.js} +2 -2
- package/dist/{chunk-KSMITUGY.js → chunk-DR7QPGX4.js} +3 -3
- package/dist/{chunk-QNXM2HXW.js → chunk-ELFFRVNL.js} +1 -1
- package/dist/{chunk-QEGXNJGR.js → chunk-EV2SMRLF.js} +4 -4
- package/dist/{chunk-VFSYVQX4.js → chunk-F3QMXKKJ.js} +8 -2
- package/dist/{chunk-NCC3F6GM.js → chunk-F5XPKUPK.js} +2 -2
- package/dist/{chunk-43R2GILO.js → chunk-FIBL4JRZ.js} +2 -2
- package/dist/{chunk-B2J3BBJC.js → chunk-FQH4R6UG.js} +2 -2
- package/dist/{chunk-AC6DKMVS.js → chunk-FSAKWKWU.js} +1 -1
- package/dist/{chunk-GL5NU6IK.js → chunk-FXS5OFGH.js} +1 -1
- package/dist/{chunk-K7KBAJQL.js → chunk-GHJRLETI.js} +10 -10
- package/dist/{chunk-VQRTO7IS.js → chunk-H73TUI4Y.js} +9 -2
- package/dist/{chunk-IIHE3FNC.js → chunk-HSXWUZOD.js} +3 -3
- package/dist/{chunk-JV225JBX.js → chunk-I6RHLHVW.js} +2 -2
- package/dist/{chunk-S6HVQF27.js → chunk-IEDCQRGG.js} +88 -4
- package/dist/{chunk-4Q5VNQTV.js → chunk-IFSOVXGN.js} +3 -3
- package/dist/{chunk-JMHKK7A5.js → chunk-ITVMRPCQ.js} +1 -1
- package/dist/{chunk-VT6P7FV4.js → chunk-IU44MPY3.js} +1 -1
- package/dist/{chunk-6OD2RVIA.js → chunk-IXTDBQYU.js} +273 -397
- package/dist/{chunk-2NGPZCWX.js → chunk-JB7QUK3D.js} +3 -3
- package/dist/{chunk-VT2B5BHM.js → chunk-JBSCL2XT.js} +2 -1
- package/dist/{chunk-MPX3TRMQ.js → chunk-JD5S5AAV.js} +1 -1
- package/dist/{chunk-XYG722JW.js → chunk-JIJKUZIO.js} +3 -3
- package/dist/{chunk-KMIAYKIH.js → chunk-K5C6LC2G.js} +159 -39
- package/dist/{chunk-DAOHCXM2.js → chunk-KH6BCYLC.js} +1 -1
- package/dist/{chunk-4L4R6AQJ.js → chunk-KMI4TUTW.js} +1 -1
- package/dist/{chunk-PHFPIUWU.js → chunk-KWOAM7TA.js} +3 -0
- package/dist/{chunk-RZJ6DXVE.js → chunk-L6QI2NNG.js} +1 -1
- package/dist/{chunk-HED6D5KR.js → chunk-MMNMQNLD.js} +43 -29
- package/dist/{chunk-KAVUTP5G.js → chunk-N3CRJ2VW.js} +3 -3
- package/dist/{chunk-OBJXZII2.js → chunk-N7LBAQGK.js} +3 -3
- package/dist/{chunk-LMX7UKGX.js → chunk-OUAGTQC4.js} +17 -11
- package/dist/{chunk-WZBUKC5N.js → chunk-OUJI2ZTY.js} +2 -2
- package/dist/{chunk-YUGLOZOR.js → chunk-OXTZEKVA.js} +1 -1
- package/dist/{chunk-OR3TAZL3.js → chunk-P4ULFI2N.js} +1 -1
- package/dist/{chunk-6LNSZADA.js → chunk-PVC4RNHQ.js} +50 -11
- package/dist/{chunk-FM7XZDZI.js → chunk-R2WP3XIN.js} +1 -1
- package/dist/{chunk-IBDPPBFK.js → chunk-R5IPZ5ZC.js} +1 -1
- package/dist/{chunk-7WDIGRSO.js → chunk-R5TZ2FC3.js} +1 -1
- package/dist/{chunk-2UVN2NBN.js → chunk-RICNNGYH.js} +3 -3
- package/dist/{chunk-WBJXJ2R4.js → chunk-RLBVY5FE.js} +17 -14
- package/dist/{chunk-XXJRZ75E.js → chunk-RV634O2W.js} +5 -2
- package/dist/{chunk-3KH6GXXX.js → chunk-RYPFOZQH.js} +2 -2
- package/dist/{chunk-DNFU56ZS.js → chunk-SB7W6XI4.js} +1 -1
- package/dist/{chunk-PPXQE7AS.js → chunk-SE6MLUOK.js} +33 -34
- package/dist/{chunk-65DBIEM2.js → chunk-SHIICYJW.js} +7 -1
- package/dist/{chunk-KPVVTHPK.js → chunk-SRMNWAHN.js} +15 -10
- package/dist/chunk-T2DJR7ND.js +367 -0
- package/dist/{chunk-Z6H6Y4BS.js → chunk-TA22MGGN.js} +1 -1
- package/dist/{chunk-ZOVHXTGC.js → chunk-TN7SC2ZQ.js} +1 -1
- package/dist/{chunk-XV5HRIXG.js → chunk-TRPGNCVB.js} +8 -8
- package/dist/{chunk-4BANMHJ5.js → chunk-UDZP2SHJ.js} +3 -3
- package/dist/{chunk-GMZMBLHT.js → chunk-UM6WUSQ7.js} +2 -2
- package/dist/{chunk-2EJ636HI.js → chunk-UST3MKK7.js} +1 -1
- package/dist/{chunk-RQ7OVXUZ.js → chunk-V2CZVZUO.js} +2 -2
- package/dist/{chunk-4RJJ5FJ2.js → chunk-V4UKBUUA.js} +1 -1
- package/dist/{chunk-EOS7VPVT.js → chunk-VA2MDALR.js} +8 -8
- package/dist/{chunk-SCYWCWKY.js → chunk-VG4ZH2Z3.js} +24 -10
- package/dist/{chunk-255DIG4B.js → chunk-VHLI6CTD.js} +1 -1
- package/dist/{chunk-DFIOOK5R.js → chunk-WCES22KG.js} +4 -3
- package/dist/{chunk-5A6KTWQL.js → chunk-WOTKNUKK.js} +126 -2
- package/dist/{chunk-62UZWGFX.js → chunk-WZZBGGSD.js} +63 -2
- package/dist/{chunk-ELXR65AN.js → chunk-X2FHTDIU.js} +6 -3
- package/dist/{chunk-V4BW5HFQ.js → chunk-X5I5QRC2.js} +3 -3
- package/dist/{chunk-X4AFBL4N.js → chunk-XCORXJ3M.js} +1 -1
- package/dist/{chunk-66JPZELX.js → chunk-Y5CNGG4F.js} +24 -16
- package/dist/{chunk-SPOXL7HF.js → chunk-YEWNIBNA.js} +9 -9
- package/dist/{chunk-WJ2PZGRV.js → chunk-ZAA344BL.js} +29 -2
- package/dist/{chunk-TN2YCFQE.js → chunk-ZGLJ2VD7.js} +5 -5
- package/dist/{co-activation-WN25AJOC.js → co-activation-RH46OQ3N.js} +5 -5
- package/dist/{co-occurrence-YP2Q3OEA.js → co-occurrence-MJWERUWY.js} +5 -5
- package/dist/{code-context-index-ZWONKBKX.js → code-context-index-WFUBYGQT.js} +6 -6
- package/dist/{content-extractor-EYRVGD6O.js → content-extractor-RHITF2KM.js} +1 -1
- package/dist/{conversation-wiki-populator-XFUC7S5P.js → conversation-wiki-populator-SK233TL4.js} +1 -1
- package/dist/{crdt-sync-ZFIFL2QM.js → crdt-sync-4R7SXTNB.js} +1 -1
- package/dist/{crm-webhook-DGPHULOO.js → crm-webhook-YDXX5FDK.js} +2 -2
- package/dist/{cto-delegation-gate-OF2A3TSS.js → cto-delegation-gate-ZJHLPK4Y.js} +14 -14
- package/dist/{daemon-auth-N6P2MZAV.js → daemon-auth-5FCYVQIZ.js} +3 -3
- package/dist/{daemon-orchestration-G4RRTPP7.js → daemon-orchestration-NBU5RZ2O.js} +18 -18
- package/dist/{daemon-ready-signal-3L2MJT7C.js → daemon-ready-signal-KXLL6ZFL.js} +1 -1
- package/dist/{db-backup-EORG4LBO.js → db-backup-BTL2FBBL.js} +9 -3
- package/dist/{db-restore-events-3R7G4FP4.js → db-restore-events-3A57GMLW.js} +2 -2
- package/dist/{doc-graph-extractor-APZS3DFD.js → doc-graph-extractor-ADYRG7DB.js} +5 -5
- package/dist/documents-VWPZTDFA.js +56 -0
- package/dist/{dreaming-Q4E3WBGY.js → dreaming-76WKGTL6.js} +15 -15
- package/dist/embeddings-config-FANLORDH.js +21 -0
- package/dist/{exe-drift-CI5R6GUT.js → exe-drift-T3IO2SPX.js} +6 -6
- package/dist/{exe-export-HQIQASIT.js → exe-export-6YEHSJMP.js} +9 -9
- package/dist/{exe-import-ULZK56WC.js → exe-import-3NERK63O.js} +9 -9
- package/dist/{exe-key-ILNSBGRN.js → exe-key-RCMBMLSQ.js} +8 -8
- package/dist/{exe-org-WQWQZRLR.js → exe-org-KCOOLUTW.js} +3 -3
- package/dist/{exe-snapshot-RUZTWZOF.js → exe-snapshot-JIY7MNRI.js} +18 -18
- package/dist/{fast-db-init-KNJRL7T3.js → fast-db-init-PVJ72264.js} +1 -1
- package/dist/{founder-context-QCTMEK66.js → founder-context-A4VUEKDH.js} +4 -4
- package/dist/gateway/index.js +17 -17
- package/dist/{git-staleness-KIA5YI4H.js → git-staleness-IOAHAGBI.js} +5 -5
- package/dist/{git-task-sweep-WH6QE7HL.js → git-task-sweep-IGM5RILF.js} +17 -15
- package/dist/{global-procedures-SYZZCGDS.js → global-procedures-VZL2X4RK.js} +6 -6
- package/dist/{graph-auto-extract-J2TIWZEE.js → graph-auto-extract-TIXRGBC5.js} +5 -5
- package/dist/{hook-integrity-I6PWJQER.js → hook-integrity-XNPNCMAS.js} +1 -1
- package/dist/hooks/bug-report-worker.js +47 -17
- package/dist/hooks/codex-stop-task-finalizer.js +47 -17
- package/dist/hooks/commit-complete.js +18 -18
- package/dist/hooks/error-recall.js +11 -11
- package/dist/hooks/exe-heartbeat-hook.js +7 -7
- package/dist/hooks/ingest-worker.js +39 -9
- package/dist/hooks/ingest.js +17 -17
- package/dist/hooks/instructions-loaded.js +8 -8
- package/dist/hooks/manifest.json +20 -20
- package/dist/hooks/notification.js +8 -8
- package/dist/hooks/post-compact.js +17 -17
- package/dist/hooks/post-tool-combined.js +60 -7
- package/dist/hooks/pre-compact.js +23 -23
- package/dist/hooks/pre-tool-use.js +64 -34
- package/dist/hooks/prompt-submit.js +40 -32
- package/dist/hooks/session-end.js +29 -29
- package/dist/hooks/session-start.js +17 -17
- package/dist/hooks/stop.js +24 -24
- package/dist/hooks/subagent-stop.js +17 -17
- package/dist/hooks/summary-worker.js +55 -25
- package/dist/index.js +27 -27
- package/dist/{installer-PSDYMGN7.js → installer-D7D5O4KL.js} +10 -10
- package/dist/{installer-3NB3IBHF.js → installer-EQP2EMNZ.js} +10 -10
- package/dist/{installer-IIJFCTMH.js → installer-IWRYH55Z.js} +10 -10
- package/dist/{key-backup-status-FNSN3NXH.js → key-backup-status-ZNGDSPLT.js} +2 -2
- package/dist/lib/agent-config.js +3 -3
- package/dist/lib/cloud-sync.js +16 -16
- package/dist/lib/config.js +2 -2
- package/dist/lib/consolidation.js +8 -8
- package/dist/lib/database.js +7 -5
- package/dist/lib/db-daemon-client.js +6 -6
- package/dist/lib/db.js +7 -5
- package/dist/lib/device-registry.js +3 -3
- package/dist/lib/embed-worker.js +2 -2
- package/dist/lib/embedder.js +6 -6
- package/dist/lib/employee-templates.js +7 -7
- package/dist/lib/employees.js +5 -5
- package/dist/lib/exe-daemon-client.js +5 -5
- package/dist/lib/exe-daemon.js +449 -89
- package/dist/lib/hybrid-search.js +8 -8
- package/dist/lib/identity.js +5 -5
- package/dist/lib/license.js +4 -4
- package/dist/lib/messaging.js +15 -15
- package/dist/lib/post-tool-memory.js +2 -2
- package/dist/lib/reminders.js +6 -6
- package/dist/lib/schedules.js +8 -8
- package/dist/lib/session-registry.js +9 -7
- package/dist/lib/session-wrappers.js +1 -1
- package/dist/lib/skill-learning.js +9 -9
- package/dist/lib/store.js +7 -7
- package/dist/lib/task-router.js +6 -6
- package/dist/lib/tasks.js +16 -16
- package/dist/lib/tmux-routing.js +14 -14
- package/dist/lib/token-spend.js +6 -6
- package/dist/{license-gate-7SDHCJUO.js → license-gate-PZOP7S2S.js} +5 -5
- package/dist/mcp/register-tools.js +73 -72
- package/dist/mcp/server.js +74 -73
- package/dist/mcp/tools/complete-reminder.js +7 -7
- package/dist/mcp/tools/create-reminder.js +7 -7
- package/dist/mcp/tools/create-task.js +18 -18
- package/dist/mcp/tools/deactivate-behavior.js +10 -10
- package/dist/mcp/tools/list-reminders.js +7 -7
- package/dist/mcp/tools/list-tasks.js +18 -18
- package/dist/mcp/tools/send-message.js +17 -17
- package/dist/mcp/tools/update-task.js +17 -17
- package/dist/{mcp-http-config-QSOVFXHW.js → mcp-http-config-23DHJAU4.js} +7 -7
- package/dist/{mcp-port-config-AWWRZA22.js → mcp-port-config-FFAMMLLE.js} +2 -1
- package/dist/{memory-cards-II67WFL2.js → memory-cards-CNLMHSZC.js} +5 -5
- package/dist/{memory-graph-extractor-PM4Q2KJG.js → memory-graph-extractor-HIXP2BQS.js} +6 -6
- package/dist/{memory-poisoning-defense-ECXSX7HK.js → memory-poisoning-defense-YL53IBBF.js} +5 -5
- package/dist/{memory-queue-VAE6WMSS.js → memory-queue-3Q5P43AM.js} +3 -3
- package/dist/memory-queue-client-YP2QKX6J.js +16 -0
- package/dist/{memory-reflection-PXF6YFDU.js → memory-reflection-VHQRUZWK.js} +5 -5
- package/dist/{notifications-UP7WQGG4.js → notifications-Q5NEAP6K.js} +14 -14
- package/dist/{orchestration-events-PZLLPCKY.js → orchestration-events-7SNWRJYE.js} +6 -6
- package/dist/{orchestration-phase-SJOXDB7X.js → orchestration-phase-U45T4VG3.js} +3 -3
- package/dist/{orchestrator-PUT45J4O.js → orchestrator-XWLKNWUG.js} +16 -16
- package/dist/{pipeline-router-5CRWKESM.js → pipeline-router-5IBJBH7P.js} +6 -6
- package/dist/{plan-limits-SH2NDFNX.js → plan-limits-PBEZVHRQ.js} +8 -8
- package/dist/{preferences-YWBTKW3M.js → preferences-TYTGDXQZ.js} +2 -2
- package/dist/{project-boot-2TCPDZ4S.js → project-boot-OHEGJD2L.js} +2 -2
- package/dist/{projection-worker-HWY37MNC.js → projection-worker-HELRBNDR.js} +5 -5
- package/dist/{prospective-memory-FQSVMCGG.js → prospective-memory-N55XRGJP.js} +5 -5
- package/dist/{push-notifications-DK6XA5B3.js → push-notifications-PAFNP3EC.js} +3 -3
- package/dist/{reranker-AALRMGMM.js → reranker-MNJSTOPR.js} +3 -3
- package/dist/{retrieval-health-PNWJSJNG.js → retrieval-health-W4HNR3WX.js} +1 -1
- package/dist/{review-polling-65JZUE3T.js → review-polling-SRYZU2PI.js} +15 -15
- package/dist/runtime/index.js +22 -22
- package/dist/{session-events-EJ3OSAA6.js → session-events-L4DK5J6J.js} +15 -15
- package/dist/{session-kill-telemetry-3HGM7SNQ.js → session-kill-telemetry-U2YHKHCB.js} +15 -15
- package/dist/{session-scope-JGDYAMJO.js → session-scope-JTPHECAU.js} +14 -14
- package/dist/{setup-wizard-44LMFM2C.js → setup-wizard-IP5R66LR.js} +3 -3
- package/dist/{shard-manager-KUCJPLC6.js → shard-manager-RASGFMGS.js} +3 -3
- package/dist/{skill-refinement-DUOO6B7V.js → skill-refinement-VTYL4OMJ.js} +5 -5
- package/dist/{stack-release-XYMKU7NT.js → stack-release-TOCCJQOF.js} +244 -45
- package/dist/{stack-update-TUBZTY7Z.js → stack-update-MRNVHUZZ.js} +11 -5
- package/dist/{steward-gate-6NWRDLX2.js → steward-gate-JEVUDTBI.js} +6 -6
- package/dist/{task-enforcement-UOULTGFB.js → task-enforcement-VFSAAZUN.js} +14 -14
- package/dist/{task-scope-P5STKYAC.js → task-scope-P4VLIQNP.js} +14 -14
- package/dist/{tasks-crud-24HMTULR.js → tasks-crud-SC3ERIUR.js} +14 -14
- package/dist/{tasks-notify-LAIU7UUI.js → tasks-notify-WJYBUCIB.js} +15 -15
- package/dist/{tasks-review-AFJAU2DY.js → tasks-review-XPVPHCGD.js} +14 -14
- package/dist/{telemetry-upload-DWFGC2XJ.js → telemetry-upload-4QEYQROW.js} +10 -10
- package/dist/{token-budget-4RFZKWGH.js → token-budget-UBOP3HVE.js} +6 -6
- package/dist/{tool-capability-index-ZEXBWKUZ.js → tool-capability-index-SHYCBE2Z.js} +1 -1
- package/dist/{tool-telemetry-BS5JXM5M.js → tool-telemetry-CDNPES5B.js} +1 -1
- package/dist/tui/App.js +27 -27
- package/dist/{tui-data-UNO5B7PU.js → tui-data-HVYY7GRK.js} +14 -14
- package/dist/{worker-gate-C6CTTYMD.js → worker-gate-KQTODSUQ.js} +3 -3
- package/dist/{workflow-engine-4W2KYCDV.js → workflow-engine-OP2DQISD.js} +2 -2
- package/dist/{working-memory-FXHQCJJE.js → working-memory-PY4AG577.js} +22 -2
- package/dist/{worktree-2CXY6NEB.js → worktree-Z2G4CP4Z.js} +7 -7
- package/dist/{worktree-sweep-K3CJFSUL.js → worktree-sweep-LWSCAZW6.js} +8 -8
- package/package.json +2 -2
- package/release-notes.json +56 -113
- package/stack.release.json +7 -7
- package/dist/memory-queue-client-HLURQEV6.js +0 -16
- /package/dist/{chunk-J3SR5MGG.js → chunk-GIS4GBZE.js} +0 -0
- /package/dist/{chunk-AE74NOE6.js → chunk-NAPBIDGH.js} +0 -0
- /package/dist/{chunk-I3DPCSDG.js → chunk-OJS2H5HR.js} +0 -0
- /package/dist/{chunk-K4BKJJ4F.js → chunk-PCRRDXGL.js} +0 -0
- /package/dist/{chunk-MQCTK6EF.js → chunk-RRYJTPVW.js} +0 -0
- /package/dist/{chunk-2NS3QRMJ.js → chunk-ZIVUMDHA.js} +0 -0
- /package/dist/{core-memory-OC5ITKKV.js → core-memory-4JWCAGJI.js} +0 -0
- /package/dist/{entity-boost-NF3LE6OJ.js → entity-boost-AU342QRK.js} +0 -0
- /package/dist/{message-queue-client-4VDU6BZY.js → message-queue-client-IXYLJJVJ.js} +0 -0
- /package/dist/{oauth-server-EWUL7DMD.js → oauth-server-F4QWESK2.js} +0 -0
- /package/dist/{webhook-pipe-DHIGZHPW.js → webhook-pipe-S4CWK6H5.js} +0 -0
- /package/dist/{wiki-acl-CONNF6ES.js → wiki-acl-6GZHUA44.js} +0 -0
- /package/dist/{wiki-client-N6PT5P7W.js → wiki-client-CIJXRMKL.js} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isExeSession
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MMNMQNLD.js";
|
|
4
4
|
import {
|
|
5
5
|
recordOrchestrationEventBestEffort
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-P4ULFI2N.js";
|
|
7
7
|
import {
|
|
8
8
|
getClient,
|
|
9
9
|
isCoordinatorName
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VG4ZH2Z3.js";
|
|
11
11
|
import {
|
|
12
12
|
isDaemonAlive
|
|
13
13
|
} from "./chunk-7HLWBYH7.js";
|
|
@@ -128,11 +128,14 @@ async function recordSessionKill(input) {
|
|
|
128
128
|
}
|
|
129
129
|
async function countKillsSince(sinceISO) {
|
|
130
130
|
try {
|
|
131
|
+
const { offloadReadIfMain } = await import("./lib/database.js");
|
|
131
132
|
const client = getClient();
|
|
132
|
-
const result = await
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
const result = await offloadReadIfMain(
|
|
134
|
+
client,
|
|
135
|
+
`SELECT COUNT(*) AS n FROM session_kills WHERE killed_at >= ?`,
|
|
136
|
+
[sinceISO],
|
|
137
|
+
true
|
|
138
|
+
);
|
|
136
139
|
const row = result.rows[0];
|
|
137
140
|
return row ? Number(row.n) : 0;
|
|
138
141
|
} catch {
|
|
@@ -169,13 +172,16 @@ function computeIdleKillSuspectStreak(prev, killsToday, liveSessions, todayDate)
|
|
|
169
172
|
}
|
|
170
173
|
async function sumTokensSavedSince(sinceISO) {
|
|
171
174
|
try {
|
|
175
|
+
const { offloadReadIfMain } = await import("./lib/database.js");
|
|
172
176
|
const client = getClient();
|
|
173
|
-
const result = await
|
|
174
|
-
|
|
177
|
+
const result = await offloadReadIfMain(
|
|
178
|
+
client,
|
|
179
|
+
`SELECT COALESCE(SUM(estimated_tokens_saved), 0) AS total
|
|
175
180
|
FROM session_kills
|
|
176
181
|
WHERE killed_at >= ?`,
|
|
177
|
-
|
|
178
|
-
|
|
182
|
+
[sinceISO],
|
|
183
|
+
true
|
|
184
|
+
);
|
|
179
185
|
const row = result.rows[0];
|
|
180
186
|
return row ? Number(row.total) : 0;
|
|
181
187
|
} catch {
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
connectEmbedDaemon,
|
|
9
9
|
embedBatchViaClient
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SE6MLUOK.js";
|
|
11
11
|
import {
|
|
12
12
|
EXE_AI_DIR
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WCES22KG.js";
|
|
14
14
|
|
|
15
15
|
// src/lib/code-context-index.ts
|
|
16
16
|
import crypto from "crypto";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
recordSessionKill
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OUAGTQC4.js";
|
|
4
4
|
import {
|
|
5
5
|
updateTask
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VA2MDALR.js";
|
|
7
7
|
import {
|
|
8
8
|
ensureEmployeeAsync,
|
|
9
9
|
extractRootExe,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
sessionScopeFilter,
|
|
15
15
|
strictSessionScopeFilter,
|
|
16
16
|
writeNotification
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-MMNMQNLD.js";
|
|
18
18
|
import {
|
|
19
19
|
queueIntercom
|
|
20
20
|
} from "./chunk-4FVVJ7ME.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-E23LNUWJ.js";
|
|
24
24
|
import {
|
|
25
25
|
listSessions
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-ZAA344BL.js";
|
|
27
27
|
import {
|
|
28
28
|
listTmuxSessions,
|
|
29
29
|
parseContextPercentage
|
|
@@ -33,19 +33,19 @@ import {
|
|
|
33
33
|
} from "./chunk-KOO3J5PV.js";
|
|
34
34
|
import {
|
|
35
35
|
recordOrchestrationEventBestEffort
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-P4ULFI2N.js";
|
|
37
37
|
import {
|
|
38
38
|
getAgentRuntime
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-2PI6JBJL.js";
|
|
40
40
|
import {
|
|
41
41
|
baseAgentName,
|
|
42
42
|
getCoordinatorName,
|
|
43
43
|
isCoordinatorName,
|
|
44
44
|
shouldAutoInstance
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-VG4ZH2Z3.js";
|
|
46
46
|
import {
|
|
47
47
|
loadConfigSync
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-WCES22KG.js";
|
|
49
49
|
|
|
50
50
|
// src/lib/daemon-orchestration.ts
|
|
51
51
|
import { execFile, execFileSync, execSync } from "child_process";
|
|
@@ -669,10 +669,11 @@ function _resetAutoWakeState() {
|
|
|
669
669
|
}
|
|
670
670
|
function checkAutoWakeGates(key, nowMs) {
|
|
671
671
|
try {
|
|
672
|
+
const blockWindowMs = parseInt(process.env.EXE_AUTOWAKE_BLOCK_WINDOW_MS ?? "", 10) || 15e3;
|
|
672
673
|
const lagMarker = join(homedir(), ".exe-os", "session-cache", "event-loop-blocked.marker");
|
|
673
674
|
if (existsSync2(lagMarker)) {
|
|
674
675
|
const age = nowMs - statSync2(lagMarker).mtimeMs;
|
|
675
|
-
if (age <
|
|
676
|
+
if (age < blockWindowMs && age > -blockWindowMs) return "daemon_event_loop_blocked";
|
|
676
677
|
}
|
|
677
678
|
} catch {
|
|
678
679
|
}
|
|
@@ -856,6 +857,25 @@ async function pollOrphanedTasks(deps, nowMs = Date.now()) {
|
|
|
856
857
|
`[auto-wake] Failed to spawn ${agentId}: ${result.error ?? "unknown"}
|
|
857
858
|
`
|
|
858
859
|
);
|
|
860
|
+
recordOrchestrationEventBestEffort({
|
|
861
|
+
eventType: "auto_wake.spawn_failed",
|
|
862
|
+
source: "daemon-orchestration.pollOrphanedTasks",
|
|
863
|
+
severity: "warn",
|
|
864
|
+
agentId,
|
|
865
|
+
sessionScope,
|
|
866
|
+
payload: { error: result.error ?? "unknown", taskId: topTask.taskId, attempt: retries + 1 }
|
|
867
|
+
});
|
|
868
|
+
try {
|
|
869
|
+
await writeNotification({
|
|
870
|
+
agentId,
|
|
871
|
+
agentRole: "employee",
|
|
872
|
+
event: "error_spike",
|
|
873
|
+
project: String(topTask.sessionScope ?? ""),
|
|
874
|
+
summary: `Auto-wake spawn failed for ${agentId} (attempt ${retries + 1}): ${(result.error ?? "unknown").slice(0, 200)}`,
|
|
875
|
+
sessionScope
|
|
876
|
+
});
|
|
877
|
+
} catch {
|
|
878
|
+
}
|
|
859
879
|
continue;
|
|
860
880
|
}
|
|
861
881
|
_autoWakeLastSpawn.set(key, nowMs);
|
|
@@ -871,6 +891,25 @@ async function pollOrphanedTasks(deps, nowMs = Date.now()) {
|
|
|
871
891
|
`[auto-wake] Error spawning ${agentId}: ${err instanceof Error ? err.message : String(err)}
|
|
872
892
|
`
|
|
873
893
|
);
|
|
894
|
+
recordOrchestrationEventBestEffort({
|
|
895
|
+
eventType: "auto_wake.spawn_error",
|
|
896
|
+
source: "daemon-orchestration.pollOrphanedTasks",
|
|
897
|
+
severity: "error",
|
|
898
|
+
agentId,
|
|
899
|
+
sessionScope,
|
|
900
|
+
payload: { error: err instanceof Error ? err.message : String(err), taskId: topTask.taskId, attempt: retries + 1 }
|
|
901
|
+
});
|
|
902
|
+
try {
|
|
903
|
+
await writeNotification({
|
|
904
|
+
agentId,
|
|
905
|
+
agentRole: "employee",
|
|
906
|
+
event: "error_spike",
|
|
907
|
+
project: String(topTask.sessionScope ?? ""),
|
|
908
|
+
summary: `Auto-wake spawn error for ${agentId} (attempt ${retries + 1}): ${(err instanceof Error ? err.message : String(err)).slice(0, 200)}`,
|
|
909
|
+
sessionScope
|
|
910
|
+
});
|
|
911
|
+
} catch {
|
|
912
|
+
}
|
|
874
913
|
}
|
|
875
914
|
}
|
|
876
915
|
return woken;
|
|
@@ -1900,7 +1939,7 @@ async function reapOrphanedWorktrees(deps, nowMs = Date.now()) {
|
|
|
1900
1939
|
}
|
|
1901
1940
|
async function createWorktreeReaperRealDeps() {
|
|
1902
1941
|
const { getPaneCwdAsync } = await import("./lib/tmux-status.js");
|
|
1903
|
-
const { getGitRoot, isWorktreeDirty: isDirty } = await import("./worktree-
|
|
1942
|
+
const { getGitRoot, isWorktreeDirty: isDirty } = await import("./worktree-Z2G4CP4Z.js");
|
|
1904
1943
|
const { statSync: statSync3 } = await import("fs");
|
|
1905
1944
|
const { basename } = await import("path");
|
|
1906
1945
|
const { promisify: promisify2 } = await import("util");
|
|
@@ -2084,7 +2123,7 @@ async function gcStaleCheckpoints() {
|
|
|
2084
2123
|
}
|
|
2085
2124
|
async function pollTaskGroupBarriers() {
|
|
2086
2125
|
try {
|
|
2087
|
-
const { checkAndFireBarriers } = await import("./tasks-crud-
|
|
2126
|
+
const { checkAndFireBarriers } = await import("./tasks-crud-SC3ERIUR.js");
|
|
2088
2127
|
const firedGroupIds = await checkAndFireBarriers();
|
|
2089
2128
|
if (firedGroupIds.length === 0) return 0;
|
|
2090
2129
|
const { getClient } = await import("./lib/database.js");
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
readMcpHttpEvents,
|
|
11
11
|
summarizeMcpTransport
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WOTKNUKK.js";
|
|
13
13
|
import {
|
|
14
14
|
mcpHttpPort
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-BSPALHIR.js";
|
|
16
16
|
import {
|
|
17
17
|
EXE_AI_DIR
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-WCES22KG.js";
|
|
19
19
|
import {
|
|
20
20
|
isMainModule
|
|
21
21
|
} from "./chunk-6Y4B3QF6.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
findScopedDuplicate,
|
|
10
10
|
governMemoryRecord,
|
|
11
11
|
schedulePostWriteMemoryHygiene
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RRYJTPVW.js";
|
|
13
13
|
import {
|
|
14
14
|
orgBus
|
|
15
15
|
} from "./chunk-MP2AFCGL.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
ensureSchema,
|
|
19
19
|
getClient,
|
|
20
20
|
initTurso
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-VG4ZH2Z3.js";
|
|
22
22
|
import {
|
|
23
23
|
EMBEDDING_DIM
|
|
24
24
|
} from "./chunk-FXU7JOXK.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
} from "./chunk-Z42MXYWW.js";
|
|
28
28
|
import {
|
|
29
29
|
loadConfig
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-WCES22KG.js";
|
|
31
31
|
|
|
32
32
|
// src/lib/store.ts
|
|
33
33
|
var _debugStore = process.env.EXE_DEBUG === "1";
|
|
@@ -68,7 +68,7 @@ function recordShardFailure(project, error) {
|
|
|
68
68
|
`[store] Shard circuit OPEN for "${project}" after ${state.failures} consecutive failures. Will retry in ${SHARD_CB_COOLDOWN_MS / 6e4}min. Last error: ${error}
|
|
69
69
|
`
|
|
70
70
|
);
|
|
71
|
-
void import("./orchestration-events-
|
|
71
|
+
void import("./orchestration-events-7SNWRJYE.js").then(({ recordOrchestrationEventBestEffort }) => {
|
|
72
72
|
recordOrchestrationEventBestEffort({
|
|
73
73
|
eventType: "shard.circuit_open",
|
|
74
74
|
source: "store.recordShardFailure",
|
|
@@ -152,7 +152,7 @@ async function initStore(options) {
|
|
|
152
152
|
if (!options?.lightweight) {
|
|
153
153
|
try {
|
|
154
154
|
if (process.env.EXE_DISABLE_SHARDING !== "1") {
|
|
155
|
-
const { initShardManager } = await import("./shard-manager-
|
|
155
|
+
const { initShardManager } = await import("./shard-manager-RASGFMGS.js");
|
|
156
156
|
initShardManager(hexKey);
|
|
157
157
|
}
|
|
158
158
|
} catch (e) {
|
|
@@ -165,7 +165,7 @@ async function initStore(options) {
|
|
|
165
165
|
);
|
|
166
166
|
_nextVersion = (Number(vResult.rows[0]?.max_v) || 0) + 1;
|
|
167
167
|
try {
|
|
168
|
-
const { loadGlobalProcedures } = await import("./global-procedures-
|
|
168
|
+
const { loadGlobalProcedures } = await import("./global-procedures-VZL2X4RK.js");
|
|
169
169
|
await loadGlobalProcedures();
|
|
170
170
|
} catch (e) {
|
|
171
171
|
logStoreWarn("catch", e);
|
|
@@ -293,7 +293,7 @@ async function writeMemory(record) {
|
|
|
293
293
|
founder_id: record.founder_id ?? null
|
|
294
294
|
};
|
|
295
295
|
try {
|
|
296
|
-
const { checkMemoryPoisoning } = await import("./memory-poisoning-defense-
|
|
296
|
+
const { checkMemoryPoisoning } = await import("./memory-poisoning-defense-YL53IBBF.js");
|
|
297
297
|
const poisonResult = await checkMemoryPoisoning({
|
|
298
298
|
memoryId: dbRow.id,
|
|
299
299
|
vector: Array.isArray(dbRow.vector) ? dbRow.vector : void 0,
|
|
@@ -486,19 +486,19 @@ async function flushBatch() {
|
|
|
486
486
|
}
|
|
487
487
|
_nextVersion = baseVersion;
|
|
488
488
|
try {
|
|
489
|
-
const { insertMemoryCardsForBatch } = await import("./memory-cards-
|
|
489
|
+
const { insertMemoryCardsForBatch } = await import("./memory-cards-CNLMHSZC.js");
|
|
490
490
|
await insertMemoryCardsForBatch(batch);
|
|
491
491
|
} catch (e) {
|
|
492
492
|
logStoreWarn("catch", e);
|
|
493
493
|
}
|
|
494
494
|
try {
|
|
495
|
-
const { insertOntologyForBatch } = await import("./agentic-ontology-
|
|
495
|
+
const { insertOntologyForBatch } = await import("./agentic-ontology-AAUATKUS.js");
|
|
496
496
|
await insertOntologyForBatch(batch);
|
|
497
497
|
} catch (e) {
|
|
498
498
|
logStoreWarn("catch", e);
|
|
499
499
|
}
|
|
500
500
|
try {
|
|
501
|
-
const { extractGraphForBatch } = await import("./memory-graph-extractor-
|
|
501
|
+
const { extractGraphForBatch } = await import("./memory-graph-extractor-HIXP2BQS.js");
|
|
502
502
|
await extractGraphForBatch(batch);
|
|
503
503
|
} catch (e) {
|
|
504
504
|
logStoreWarn("catch", e);
|
|
@@ -506,7 +506,7 @@ async function flushBatch() {
|
|
|
506
506
|
schedulePostWriteMemoryHygiene(batch.map((row) => row.id));
|
|
507
507
|
_pendingRecords.splice(0, batch.length);
|
|
508
508
|
try {
|
|
509
|
-
const { isShardingEnabled, getReadyShardClient } = await import("./shard-manager-
|
|
509
|
+
const { isShardingEnabled, getReadyShardClient } = await import("./shard-manager-RASGFMGS.js");
|
|
510
510
|
if (process.env.EXE_DISABLE_SHARDING !== "1" && isShardingEnabled()) {
|
|
511
511
|
const byProject = /* @__PURE__ */ new Map();
|
|
512
512
|
let skippedUnknown = 0;
|
|
@@ -588,10 +588,12 @@ function buildRawVisibilityFilter(options, columnPrefix) {
|
|
|
588
588
|
}
|
|
589
589
|
async function searchMemories(queryVector, agentId, options) {
|
|
590
590
|
let client;
|
|
591
|
+
let isMainDb = true;
|
|
591
592
|
try {
|
|
592
|
-
const { isShardingEnabled, shardExists, getReadyShardClient } = await import("./shard-manager-
|
|
593
|
+
const { isShardingEnabled, shardExists, getReadyShardClient } = await import("./shard-manager-RASGFMGS.js");
|
|
593
594
|
if (isShardingEnabled() && options?.projectName && shardExists(options.projectName)) {
|
|
594
595
|
client = await getReadyShardClient(options.projectName);
|
|
596
|
+
isMainDb = false;
|
|
595
597
|
} else {
|
|
596
598
|
client = getClient();
|
|
597
599
|
}
|
|
@@ -627,7 +629,7 @@ async function searchMemories(queryVector, agentId, options) {
|
|
|
627
629
|
args.push(activeEmbeddingModel);
|
|
628
630
|
}
|
|
629
631
|
try {
|
|
630
|
-
const { founderScopeFilter } = await import("./founder-context-
|
|
632
|
+
const { founderScopeFilter } = await import("./founder-context-A4VUEKDH.js");
|
|
631
633
|
const founderFilter = founderScopeFilter(options?.founderId);
|
|
632
634
|
sql += founderFilter.sql;
|
|
633
635
|
args.push(...founderFilter.args.filter((a) => a !== null));
|
|
@@ -677,7 +679,8 @@ async function searchMemories(queryVector, agentId, options) {
|
|
|
677
679
|
args.push(vectorToBlob(queryVector));
|
|
678
680
|
sql += ` LIMIT ?`;
|
|
679
681
|
args.push(limit);
|
|
680
|
-
const
|
|
682
|
+
const { offloadReadIfMain } = await import("./lib/database.js");
|
|
683
|
+
const result = await offloadReadIfMain(client, sql, args, isMainDb);
|
|
681
684
|
return result.rows.map((row) => ({
|
|
682
685
|
id: row.id,
|
|
683
686
|
agent_id: row.agent_id,
|
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
import { writeFileSync, statSync, existsSync, unlinkSync } from "fs";
|
|
3
3
|
import { homedir } from "os";
|
|
4
4
|
import { join } from "path";
|
|
5
|
+
function exeDir() {
|
|
6
|
+
return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? join(homedir(), ".exe-os");
|
|
7
|
+
}
|
|
5
8
|
function daemonReadyPath() {
|
|
6
|
-
return join(
|
|
9
|
+
return join(exeDir(), "daemon.ready");
|
|
7
10
|
}
|
|
8
11
|
function eventLoopBlockedMarkerPath() {
|
|
9
|
-
return join(
|
|
12
|
+
return join(exeDir(), "session-cache", "event-loop-blocked.marker");
|
|
10
13
|
}
|
|
11
14
|
function writeDaemonReady(info) {
|
|
12
15
|
try {
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
listWorkflowDefinitions,
|
|
3
3
|
runWorkflow,
|
|
4
4
|
startWorkflow
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-XCORXJ3M.js";
|
|
6
6
|
import {
|
|
7
7
|
ingest
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-63UEWYM3.js";
|
|
9
9
|
import {
|
|
10
10
|
initCRMBridge
|
|
11
11
|
} from "./chunk-ONKIWA3R.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureDaemonToken,
|
|
3
3
|
readDaemonToken
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-V2CZVZUO.js";
|
|
5
5
|
import {
|
|
6
6
|
requestRestart
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-75TM3APG.js";
|
|
8
8
|
import {
|
|
9
9
|
computeDaemonHeapCapMb
|
|
10
10
|
} from "./chunk-7XGDTKHX.js";
|
|
11
11
|
import {
|
|
12
12
|
EXE_AI_DIR
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WCES22KG.js";
|
|
14
14
|
|
|
15
15
|
// src/lib/exe-daemon-client.ts
|
|
16
16
|
import net from "net";
|
|
@@ -20,6 +20,15 @@ import { randomUUID } from "crypto";
|
|
|
20
20
|
import { existsSync, unlinkSync, readFileSync, openSync, closeSync, statSync, writeSync } from "fs";
|
|
21
21
|
import path from "path";
|
|
22
22
|
import { fileURLToPath } from "url";
|
|
23
|
+
function isDebug() {
|
|
24
|
+
return process.env.EXE_DEBUG === "1" || process.env.DEBUG === "1";
|
|
25
|
+
}
|
|
26
|
+
function debugLog(msg) {
|
|
27
|
+
if (isDebug()) process.stderr.write(msg.endsWith("\n") ? msg : msg + "\n");
|
|
28
|
+
}
|
|
29
|
+
function criticalLog(msg) {
|
|
30
|
+
process.stderr.write(msg.endsWith("\n") ? msg : msg + "\n");
|
|
31
|
+
}
|
|
23
32
|
var SOCKET_PATH = process.env.EXE_DAEMON_SOCK ?? process.env.EXE_EMBED_SOCK ?? path.join(EXE_AI_DIR, "exed.sock");
|
|
24
33
|
var PID_PATH = process.env.EXE_DAEMON_PID ?? process.env.EXE_EMBED_PID ?? path.join(EXE_AI_DIR, "exed.pid");
|
|
25
34
|
var SPAWN_LOCK_PATH = path.join(EXE_AI_DIR, "exed-spawn.lock");
|
|
@@ -97,8 +106,7 @@ function cleanupStaleFiles() {
|
|
|
97
106
|
if (!isZombie(pid)) {
|
|
98
107
|
return;
|
|
99
108
|
}
|
|
100
|
-
|
|
101
|
-
`);
|
|
109
|
+
debugLog(`[exed-client] PID ${pid} is a zombie \u2014 cleaning up stale files`);
|
|
102
110
|
} catch {
|
|
103
111
|
}
|
|
104
112
|
}
|
|
@@ -138,8 +146,7 @@ function warnAliveSocketUnresponsive(message) {
|
|
|
138
146
|
const now = Date.now();
|
|
139
147
|
if (now - _lastAliveSocketWarningAt < ALIVE_SOCKET_WARNING_INTERVAL_MS) return;
|
|
140
148
|
_lastAliveSocketWarningAt = now;
|
|
141
|
-
|
|
142
|
-
`);
|
|
149
|
+
debugLog(message);
|
|
143
150
|
}
|
|
144
151
|
function shouldRecoverMissingSocket() {
|
|
145
152
|
if (existsSync(SOCKET_PATH)) return false;
|
|
@@ -162,27 +169,25 @@ function spawnDaemon() {
|
|
|
162
169
|
try {
|
|
163
170
|
const result = execSync("launchctl list com.askexe.exed 2>/dev/null", { encoding: "utf8", timeout: 3e3 });
|
|
164
171
|
if (result.includes("com.askexe.exed")) {
|
|
165
|
-
|
|
172
|
+
debugLog("[exed-client] Daemon not responding \u2014 launchd will restart it. Waiting...");
|
|
166
173
|
return;
|
|
167
174
|
}
|
|
168
175
|
} catch {
|
|
169
176
|
}
|
|
170
|
-
|
|
177
|
+
debugLog("[exed-client] No launchd supervisor \u2014 spawning daemon directly (dev mode)");
|
|
171
178
|
const totalGB = os.totalmem() / (1024 * 1024 * 1024);
|
|
172
179
|
if (totalGB <= 8) {
|
|
173
|
-
|
|
174
|
-
`);
|
|
180
|
+
debugLog(`[exed-client] SKIP: ${totalGB.toFixed(0)}GB system \u2014 daemon disabled.`);
|
|
175
181
|
return;
|
|
176
182
|
}
|
|
177
183
|
const pkgRoot = findPackageRoot();
|
|
178
184
|
if (!pkgRoot) {
|
|
179
|
-
|
|
185
|
+
debugLog("[exed-client] WARN: cannot find package root");
|
|
180
186
|
return;
|
|
181
187
|
}
|
|
182
188
|
const daemonPath = path.join(pkgRoot, "dist", "lib", "exe-daemon.js");
|
|
183
189
|
if (!existsSync(daemonPath)) {
|
|
184
|
-
|
|
185
|
-
`);
|
|
190
|
+
debugLog(`[exed-client] WARN: daemon not found at ${daemonPath}`);
|
|
186
191
|
return;
|
|
187
192
|
}
|
|
188
193
|
const daemonToken = ensureDaemonToken(process.env[DAEMON_TOKEN_ENV] ?? null);
|
|
@@ -286,7 +291,7 @@ function connectToSocket() {
|
|
|
286
291
|
let attempt = 0;
|
|
287
292
|
const daemonDead = !isDaemonPidAlive();
|
|
288
293
|
if (daemonDead) {
|
|
289
|
-
|
|
294
|
+
debugLog("[daemon-client] Daemon PID dead \u2014 fast-path respawn (skipping jitter)");
|
|
290
295
|
try {
|
|
291
296
|
cleanupStaleFiles();
|
|
292
297
|
if (acquireSpawnLock()) {
|
|
@@ -307,16 +312,14 @@ function connectToSocket() {
|
|
|
307
312
|
if (attempt > maxRetries) {
|
|
308
313
|
clearInterval(retryTimer);
|
|
309
314
|
_autoReconnecting = false;
|
|
310
|
-
|
|
311
|
-
`);
|
|
315
|
+
criticalLog(`[exed-client] Auto-reconnect failed after ${maxRetries} attempts`);
|
|
312
316
|
return;
|
|
313
317
|
}
|
|
314
318
|
const ok = await connectToSocket();
|
|
315
319
|
if (ok) {
|
|
316
320
|
clearInterval(retryTimer);
|
|
317
321
|
_autoReconnecting = false;
|
|
318
|
-
if (attempt > 1)
|
|
319
|
-
`);
|
|
322
|
+
if (attempt > 1) debugLog(`[exed-client] Auto-reconnected to daemon (attempt ${attempt})`);
|
|
320
323
|
}
|
|
321
324
|
}, jitter());
|
|
322
325
|
}, initialDelay);
|
|
@@ -352,9 +355,8 @@ async function connectEmbedDaemon() {
|
|
|
352
355
|
}
|
|
353
356
|
if (shouldRecoverMissingSocket()) {
|
|
354
357
|
const pid = readDaemonPid();
|
|
355
|
-
|
|
356
|
-
`[exed-client] Daemon socket missing while PID ${pid ?? "unknown"} is alive \u2014 requesting supervised recovery
|
|
357
|
-
`
|
|
358
|
+
debugLog(
|
|
359
|
+
`[exed-client] Daemon socket missing while PID ${pid ?? "unknown"} is alive \u2014 requesting supervised recovery`
|
|
358
360
|
);
|
|
359
361
|
killAndRespawnDaemon("daemon socket missing while PID alive", { forceMissingSocket: true });
|
|
360
362
|
}
|
|
@@ -387,9 +389,10 @@ function sendRequest(texts, priority) {
|
|
|
387
389
|
function sendDaemonRequest(payload, timeoutMs = REQUEST_TIMEOUT_MS) {
|
|
388
390
|
return new Promise(async (resolve) => {
|
|
389
391
|
if ((!_socket || !_connected) && _autoReconnecting) {
|
|
392
|
+
const reconnectWaitMs = Math.min(3e3, timeoutMs);
|
|
390
393
|
const waitStart = Date.now();
|
|
391
|
-
while (!_connected && Date.now() - waitStart <
|
|
392
|
-
await new Promise((r) => setTimeout(r,
|
|
394
|
+
while (!_connected && Date.now() - waitStart < reconnectWaitMs) {
|
|
395
|
+
await new Promise((r) => setTimeout(r, 500));
|
|
393
396
|
}
|
|
394
397
|
}
|
|
395
398
|
if (!_socket || !_connected) {
|
|
@@ -425,9 +428,8 @@ function canClientRequestDaemonRestart() {
|
|
|
425
428
|
}
|
|
426
429
|
function killAndRespawnDaemon(reason, opts) {
|
|
427
430
|
if (!opts?.forceMissingSocket && !canClientRequestDaemonRestart()) {
|
|
428
|
-
|
|
429
|
-
`[exed-client] Restart suppressed (${reason ?? "consecutive failures"}) \u2014
|
|
430
|
-
`
|
|
431
|
+
debugLog(
|
|
432
|
+
`[exed-client] Restart suppressed (${reason ?? "consecutive failures"}) \u2014 degrading gracefully`
|
|
431
433
|
);
|
|
432
434
|
if (_socket) {
|
|
433
435
|
_socket.destroy();
|
|
@@ -450,7 +452,7 @@ function killAndRespawnDaemon(reason, opts) {
|
|
|
450
452
|
if (!isDaemonPidAlive()) {
|
|
451
453
|
spawnDaemon();
|
|
452
454
|
} else {
|
|
453
|
-
|
|
455
|
+
debugLog("[exed-client] Daemon PID alive after kill \u2014 launchd will restart when it exits");
|
|
454
456
|
}
|
|
455
457
|
return true;
|
|
456
458
|
}
|
|
@@ -466,8 +468,7 @@ async function retryThenRestart(doRequest, label) {
|
|
|
466
468
|
_consecutiveFailures++;
|
|
467
469
|
for (let i = 0; i < MAX_RETRIES_BEFORE_RESTART; i++) {
|
|
468
470
|
const delayMs = RETRY_DELAYS_MS[i] ?? 5e3;
|
|
469
|
-
|
|
470
|
-
`);
|
|
471
|
+
debugLog(`[exed-client] ${label} failed (${result.error}), retry ${i + 1}/${MAX_RETRIES_BEFORE_RESTART} in ${delayMs}ms`);
|
|
471
472
|
await new Promise((r) => setTimeout(r, delayMs));
|
|
472
473
|
if (!_connected) {
|
|
473
474
|
if (!await connectToSocket()) continue;
|
|
@@ -480,8 +481,7 @@ async function retryThenRestart(doRequest, label) {
|
|
|
480
481
|
_consecutiveFailures++;
|
|
481
482
|
}
|
|
482
483
|
const isEmbed = label.toLowerCase().includes("embed");
|
|
483
|
-
|
|
484
|
-
`);
|
|
484
|
+
criticalLog(`[exed-client] ${label}: ${_consecutiveFailures} consecutive failures \u2014 restarting daemon`);
|
|
485
485
|
const restartRequested = killAndRespawnDaemon(`${label}: ${_consecutiveFailures} consecutive failures`, { isEmbedRelated: isEmbed });
|
|
486
486
|
if (!restartRequested) {
|
|
487
487
|
return result;
|
|
@@ -506,8 +506,7 @@ async function embedViaClient(text, priority = "high") {
|
|
|
506
506
|
if (_requestCount % HEALTH_CHECK_INTERVAL === 0) {
|
|
507
507
|
const health = await pingDaemon();
|
|
508
508
|
if (!health) {
|
|
509
|
-
|
|
510
|
-
`);
|
|
509
|
+
debugLog(`[exed-client] Periodic health check failed at request ${_requestCount} \u2014 restarting daemon`);
|
|
511
510
|
const restartRequested = killAndRespawnDaemon(`Embed health check failed at request ${_requestCount}`, { isEmbedRelated: true });
|
|
512
511
|
if (!restartRequested) return null;
|
|
513
512
|
const start = Date.now();
|
|
@@ -102,6 +102,11 @@ function atomicWriteSync(filePath, content, encoding = "utf-8") {
|
|
|
102
102
|
writeFileSync(tmpPath, content, { encoding, mode: PRIVATE_FILE_MODE });
|
|
103
103
|
renameSync(tmpPath, filePath);
|
|
104
104
|
}
|
|
105
|
+
async function atomicWrite(filePath, content, encoding = "utf-8") {
|
|
106
|
+
const tmpPath = filePath + ".tmp." + process.pid;
|
|
107
|
+
await fsWriteFile(tmpPath, content, { encoding, mode: PRIVATE_FILE_MODE });
|
|
108
|
+
await fsRename(tmpPath, filePath);
|
|
109
|
+
}
|
|
105
110
|
|
|
106
111
|
export {
|
|
107
112
|
ensurePrivateDir,
|
|
@@ -109,5 +114,6 @@ export {
|
|
|
109
114
|
enforcePrivateFileSync,
|
|
110
115
|
atomicWriteJson,
|
|
111
116
|
atomicWriteJsonSync,
|
|
112
|
-
atomicWriteSync
|
|
117
|
+
atomicWriteSync,
|
|
118
|
+
atomicWrite
|
|
113
119
|
};
|