@askexenow/exe-os 0.9.302 → 0.9.310
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.example +8 -2
- package/deploy/compose/README.md +7 -3
- package/deploy/compose/add-routes.sh +107 -0
- package/deploy/compose/docker-compose.yml +91 -18
- package/deploy/compose/gateway-watchdog.sh +223 -0
- package/deploy/compose/generate-env.ts +16 -4
- package/deploy/compose/setup.sh +7 -8
- package/deploy/stack-manifests/v0.9.json +125 -4
- package/dist/{active-agent-ODI6GGVD.js → active-agent-ORX47ZKW.js} +4 -3
- package/dist/{active-agent-GGQAP4QE.js → active-agent-S5T2YMOR.js} +4 -3
- package/dist/{agentic-ontology-M7T72M6V.js → agentic-ontology-6KBAXLSJ.js} +1 -1
- package/dist/{backfill-metadata-GSZP2BEW.js → backfill-metadata-FV7GX6AS.js} +5 -4
- package/dist/{behaviors-JM6KFSXL.js → behaviors-47CPEKJ7.js} +6 -5
- package/dist/bin/agentic-ontology-backfill.js +6 -5
- package/dist/bin/agentic-reflection-backfill.js +7 -6
- package/dist/bin/agentic-semantic-label.js +6 -5
- package/dist/bin/backfill-conversations.js +8 -7
- package/dist/bin/backfill-responses.js +8 -7
- package/dist/bin/backfill-vectors.js +10 -9
- package/dist/bin/bulk-sync-postgres.js +14 -13
- package/dist/bin/cc-doctor.js +5 -4
- package/dist/bin/cleanup-stale-review-tasks.js +13 -12
- package/dist/bin/cli.js +20 -17
- package/dist/bin/deferred-daemon-restart.js +4 -4
- package/dist/bin/exe-agent-config.js +3 -2
- package/dist/bin/exe-agent.js +12 -11
- package/dist/bin/exe-assign.js +10 -9
- package/dist/bin/exe-boot.js +21 -20
- package/dist/bin/exe-call.js +5 -4
- package/dist/bin/exe-cloud.js +14 -13
- package/dist/bin/exe-config-dump.js +525 -0
- package/dist/bin/exe-dispatch.js +13 -12
- package/dist/bin/exe-doctor.js +2 -2
- package/dist/bin/exe-export-behaviors.js +8 -7
- package/dist/bin/exe-forget.js +7 -6
- package/dist/bin/exe-gateway.js +22 -11
- package/dist/bin/exe-healthcheck.js +7 -4
- package/dist/bin/exe-heartbeat.js +13 -12
- package/dist/bin/exe-kill.js +16 -15
- package/dist/bin/exe-launch-agent.js +41 -25
- package/dist/bin/exe-new-employee.js +9 -8
- package/dist/bin/exe-pending-messages.js +14 -13
- package/dist/bin/exe-pending-notifications.js +13 -12
- package/dist/bin/exe-pending-reviews.js +13 -12
- package/dist/bin/exe-preflight.js +108 -0
- package/dist/bin/exe-rename.js +5 -4
- package/dist/bin/exe-review.js +15 -14
- package/dist/bin/exe-search-quality.js +282 -0
- package/dist/bin/exe-search.js +6 -5
- package/dist/bin/exe-session-cleanup.js +18 -17
- package/dist/bin/exe-settings.js +15 -14
- package/dist/bin/exe-start-codex.js +13 -12
- package/dist/bin/exe-start-opencode.js +9 -8
- package/dist/bin/exe-status.js +14 -13
- package/dist/bin/exe-support.js +4 -4
- package/dist/bin/exe-team.js +4 -3
- package/dist/bin/exe-timers.js +237 -0
- package/dist/bin/git-sweep.js +14 -13
- package/dist/bin/graph-backfill.js +7 -6
- package/dist/bin/graph-export.js +6 -5
- package/dist/bin/import-history.js +10 -9
- package/dist/bin/install-launchd.js +5 -2
- package/dist/bin/install.js +16 -15
- package/dist/bin/intercom-check.js +4 -4
- package/dist/bin/mcp-sessions.js +2 -2
- package/dist/bin/orchestration-metrics.js +5 -4
- package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
- package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
- package/dist/bin/prune-orphan-chunks.js +43 -10
- package/dist/bin/scan-tasks.js +13 -12
- package/dist/bin/setup.js +1 -1
- package/dist/bin/shard-migrate.js +5 -4
- package/dist/bin/stack-update.js +30 -5
- package/dist/bin/vps-health-gate.js +1 -1
- package/dist/{capability-cards-BCTFKT4G.js → capability-cards-WQVY7WSS.js} +3 -2
- package/dist/{capacity-monitor-B4S3XEDO.js → capacity-monitor-BUKYPSWR.js} +14 -13
- package/dist/{catchup-brief-I35KHK62.js → catchup-brief-X5IVQAOH.js} +16 -15
- package/dist/{chunk-74TUYU5A.js → chunk-255DIG4B.js} +1 -1
- package/dist/{chunk-CXKR5Z5F.js → chunk-2EJ636HI.js} +4 -0
- package/dist/{chunk-ST3X3YMZ.js → chunk-2NGPZCWX.js} +4 -4
- package/dist/{chunk-LD2JKEJT.js → chunk-2NVEKSSP.js} +7 -7
- package/dist/{chunk-V6P7TPPA.js → chunk-2UVN2NBN.js} +148 -2
- package/dist/{chunk-OZRO37JW.js → chunk-3KH6GXXX.js} +2 -2
- package/dist/{chunk-IMJNYREY.js → chunk-43R2GILO.js} +1 -1
- package/dist/{chunk-6X2YNVLB.js → chunk-4BANMHJ5.js} +3 -3
- package/dist/{chunk-QNJPDIWY.js → chunk-4L4R6AQJ.js} +1 -1
- package/dist/{chunk-QWLPAEG5.js → chunk-4Q5VNQTV.js} +3 -3
- package/dist/{chunk-VLSYKMCJ.js → chunk-4RJJ5FJ2.js} +14 -2
- package/dist/{chunk-4AN6KMVG.js → chunk-5DPE7B7K.js} +1 -1
- package/dist/{chunk-H7ZNSQ2E.js → chunk-62UZWGFX.js} +2 -2
- package/dist/{chunk-ZQ2QHGWE.js → chunk-66JPZELX.js} +20 -24
- package/dist/{chunk-BUGMW7YF.js → chunk-6LNSZADA.js} +11 -11
- package/dist/{chunk-PBCRUNIK.js → chunk-6OD2RVIA.js} +492 -157
- package/dist/chunk-7ODTYODO.js +350 -0
- package/dist/{chunk-5YL4Y27D.js → chunk-7WDIGRSO.js} +1 -1
- package/dist/{chunk-WIL6LXNG.js → chunk-AC6DKMVS.js} +1 -1
- package/dist/{chunk-HZEAAKCR.js → chunk-B2J3BBJC.js} +3 -3
- package/dist/{chunk-LE7CDIOA.js → chunk-BUOMSIXH.js} +1 -1
- package/dist/{chunk-XKGNKH6V.js → chunk-DFUCFLZH.js} +1 -1
- package/dist/{chunk-U724Z3S3.js → chunk-DKHBMIVE.js} +100 -37
- package/dist/{chunk-MY36XDUK.js → chunk-DNFU56ZS.js} +1 -1
- package/dist/{chunk-GSWGOGP5.js → chunk-EOS7VPVT.js} +5 -5
- package/dist/{chunk-P33JVGSP.js → chunk-FM7XZDZI.js} +1 -1
- package/dist/chunk-G6EJKYK3.js +33 -0
- package/dist/{chunk-OMCNFTSI.js → chunk-GMZMBLHT.js} +1 -1
- package/dist/{chunk-4LZ54YGA.js → chunk-GSY6HL3T.js} +5 -5
- package/dist/{chunk-OVKNFTCL.js → chunk-HED6D5KR.js} +132 -21
- package/dist/{chunk-ALH6QLYF.js → chunk-HQODUV3G.js} +2 -2
- package/dist/{chunk-US64UR5O.js → chunk-IIHE3FNC.js} +3 -3
- package/dist/{chunk-H2ISTRWU.js → chunk-IRIPGGGL.js} +1 -1
- package/dist/{chunk-Z3EXECOX.js → chunk-ISILDO7P.js} +1 -1
- package/dist/{chunk-6ERZFDBS.js → chunk-IZPO6IOZ.js} +1 -1
- package/dist/{chunk-W65Z4SJS.js → chunk-J3QZPDNH.js} +1 -1
- package/dist/{chunk-3IJCP6ZH.js → chunk-JDYO76PI.js} +1 -1
- package/dist/{chunk-ORNKGGFX.js → chunk-JNARUXDC.js} +1 -1
- package/dist/{chunk-VME3UH4D.js → chunk-JV225JBX.js} +1 -1
- package/dist/{chunk-EI7PBUIA.js → chunk-JZW5AOWI.js} +1 -1
- package/dist/{chunk-TLOILHSL.js → chunk-K7KBAJQL.js} +36 -18
- package/dist/{chunk-RHMWSUJB.js → chunk-KAVUTP5G.js} +2 -2
- package/dist/{chunk-7FNELLMX.js → chunk-KPVVTHPK.js} +8 -8
- package/dist/{chunk-35U72CD2.js → chunk-KSMITUGY.js} +3 -3
- package/dist/{chunk-D6UICP3C.js → chunk-LMX7UKGX.js} +81 -3
- package/dist/{chunk-7ZWC5HVG.js → chunk-MTIJ2NXY.js} +1 -1
- package/dist/{chunk-KVHPBQV4.js → chunk-NCC3F6GM.js} +1 -1
- package/dist/{chunk-AYMSIV7X.js → chunk-NIZQ3CIS.js} +1 -1
- package/dist/{chunk-LTI2DLHY.js → chunk-OBJXZII2.js} +2 -2
- package/dist/{chunk-WHOT5NZ7.js → chunk-OR3TAZL3.js} +14 -2
- package/dist/{chunk-RQUHAXMM.js → chunk-PHFPIUWU.js} +2 -0
- package/dist/{chunk-N76VTMMF.js → chunk-PMEOSD6S.js} +2 -2
- package/dist/{chunk-TCJEFW5V.js → chunk-PPXQE7AS.js} +4 -4
- package/dist/{chunk-KHZQVLNZ.js → chunk-QE7UVQDP.js} +46 -0
- package/dist/{chunk-SXJACGQ5.js → chunk-QEGXNJGR.js} +4 -4
- package/dist/{chunk-W3E4VEEJ.js → chunk-RPBTYQKJ.js} +1 -1
- package/dist/chunk-RQ7OVXUZ.js +81 -0
- package/dist/{chunk-7L2EV3XX.js → chunk-RVXWGPD3.js} +39 -6
- package/dist/{chunk-YNALY3SX.js → chunk-RZJ6DXVE.js} +1 -1
- package/dist/{chunk-P3SIFDES.js → chunk-SCYWCWKY.js} +16 -4
- package/dist/{chunk-7I43GVER.js → chunk-SOT23KWW.js} +3 -3
- package/dist/{chunk-T62GAN7I.js → chunk-SPOXL7HF.js} +7 -7
- package/dist/{chunk-3YJMI422.js → chunk-TN2YCFQE.js} +4 -4
- package/dist/{chunk-YMSWCERY.js → chunk-U63BZI2B.js} +3 -3
- package/dist/{chunk-KA5RK5HZ.js → chunk-V42BSVX6.js} +2 -2
- package/dist/{chunk-PJTRAFL4.js → chunk-V4BW5HFQ.js} +3 -3
- package/dist/{chunk-4FG6IX7U.js → chunk-VFSYVQX4.js} +1 -1
- package/dist/chunk-VQRTO7IS.js +290 -0
- package/dist/{chunk-OR7J7TIA.js → chunk-VT6P7FV4.js} +1 -1
- package/dist/{chunk-BEIYF4NS.js → chunk-W2J2RF5N.js} +3 -3
- package/dist/{chunk-Y5ASPRP7.js → chunk-WBJXJ2R4.js} +17 -13
- package/dist/chunk-WCGNCH3Q.js +72 -0
- package/dist/{chunk-2LJDLQNO.js → chunk-WJ2PZGRV.js} +1 -1
- package/dist/{chunk-AAPPSMPH.js → chunk-WZBUKC5N.js} +1 -1
- package/dist/{chunk-RO7EXVSJ.js → chunk-X4AFBL4N.js} +1 -1
- package/dist/{chunk-BR74NYEF.js → chunk-XV5HRIXG.js} +5 -5
- package/dist/chunk-XXJRZ75E.js +43 -0
- package/dist/{chunk-VDHUHXFF.js → chunk-XYG722JW.js} +2 -2
- package/dist/{chunk-MM7SWUQ4.js → chunk-YB7U4WTY.js} +4 -4
- package/dist/{chunk-RMRZXPUU.js → chunk-Z6H6Y4BS.js} +1 -1
- package/dist/{token-budget-UMHRRDBT.js → chunk-ZOVHXTGC.js} +2 -9
- package/dist/{chunk-HNLBHP6P.js → chunk-ZZXADKAP.js} +3 -3
- package/dist/{co-activation-OKAHEMPE.js → co-activation-WN25AJOC.js} +3 -2
- package/dist/{co-occurrence-IHSPB53O.js → co-occurrence-YP2Q3OEA.js} +5 -4
- package/dist/{code-context-index-KGY4LKCA.js → code-context-index-ZWONKBKX.js} +4 -4
- package/dist/{conversation-entity-extractor-KXJSHRGJ.js → conversation-entity-extractor-KYOBXNID.js} +2 -2
- package/dist/{crdt-sync-K2G3C6XY.js → crdt-sync-ZFIFL2QM.js} +1 -1
- package/dist/{crm-webhook-ERZSQ3CW.js → crm-webhook-DGPHULOO.js} +2 -2
- package/dist/{cto-delegation-gate-ZCJ53LBQ.js → cto-delegation-gate-OF2A3TSS.js} +12 -11
- package/dist/daemon-auth-N6P2MZAV.js +17 -0
- package/dist/{daemon-orchestration-V6HALVDS.js → daemon-orchestration-G4RRTPP7.js} +16 -15
- package/dist/daemon-ready-signal-3L2MJT7C.js +13 -0
- package/dist/{db-backup-VZHSFUVA.js → db-backup-EORG4LBO.js} +1 -1
- package/dist/{doc-graph-extractor-LQ2IFND2.js → doc-graph-extractor-APZS3DFD.js} +5 -4
- package/dist/{dreaming-QAKUASYV.js → dreaming-Q4E3WBGY.js} +13 -12
- package/dist/{exe-drift-H3UWNFFY.js → exe-drift-CI5R6GUT.js} +4 -3
- package/dist/{exe-export-MN5D4JMT.js → exe-export-HQIQASIT.js} +7 -6
- package/dist/{exe-import-IFFMEVD7.js → exe-import-ULZK56WC.js} +7 -6
- package/dist/{exe-key-RSZC72QK.js → exe-key-ILNSBGRN.js} +5 -4
- package/dist/{exe-snapshot-I622MPLS.js → exe-snapshot-RUZTWZOF.js} +16 -15
- package/dist/{factory-CTFAGZUA.js → factory-YHQZ6RZZ.js} +14 -6
- package/dist/{fast-db-init-QEFVT7Q3.js → fast-db-init-KNJRL7T3.js} +1 -1
- package/dist/{founder-context-3SOKEW76.js → founder-context-QCTMEK66.js} +2 -2
- package/dist/gateway/index.js +12 -11
- package/dist/{git-staleness-E7RPQA5U.js → git-staleness-KIA5YI4H.js} +3 -2
- package/dist/{git-task-sweep-D3A2C5BW.js → git-task-sweep-WH6QE7HL.js} +13 -12
- package/dist/{global-procedures-POG4V6IK.js → global-procedures-SYZZCGDS.js} +4 -3
- package/dist/{graph-auto-extract-E7KALNWA.js → graph-auto-extract-J2TIWZEE.js} +5 -4
- package/dist/{graph-rag-3RZN7JR3.js → graph-rag-HITZZ63L.js} +2 -2
- package/dist/hooks/bug-report-worker.js +15 -14
- package/dist/hooks/codex-stop-task-finalizer.js +15 -14
- package/dist/hooks/commit-complete.js +15 -14
- package/dist/hooks/error-recall.js +8 -7
- package/dist/hooks/exe-heartbeat-hook.js +4 -3
- package/dist/hooks/ingest-worker.js +4 -4
- package/dist/hooks/ingest.js +8 -7
- package/dist/hooks/instructions-loaded.js +5 -4
- package/dist/hooks/manifest.json +20 -20
- package/dist/hooks/notification.js +5 -4
- package/dist/hooks/post-compact.js +14 -13
- package/dist/hooks/post-tool-combined.js +7 -7
- package/dist/hooks/pre-compact.js +19 -18
- package/dist/hooks/pre-tool-use.js +18 -17
- package/dist/hooks/prompt-submit.js +28 -27
- package/dist/hooks/session-end.js +24 -23
- package/dist/hooks/session-start.js +46 -22
- package/dist/hooks/stop.js +22 -21
- package/dist/hooks/subagent-stop.js +14 -13
- package/dist/hooks/summary-worker.js +22 -21
- package/dist/index.js +25 -23
- package/dist/{installer-IXUX73JN.js → installer-3NB3IBHF.js} +10 -9
- package/dist/{installer-RCUPPZ7Y.js → installer-IIJFCTMH.js} +10 -9
- package/dist/{installer-HDD6OH5Z.js → installer-PSDYMGN7.js} +7 -6
- package/dist/lib/cloud-sync.js +14 -13
- package/dist/lib/consolidation.js +8 -7
- package/dist/lib/database.js +3 -2
- package/dist/lib/db-daemon-client.js +4 -4
- package/dist/lib/db.js +3 -2
- package/dist/lib/device-registry.js +3 -1
- package/dist/lib/embedder.js +4 -4
- package/dist/lib/employee-templates.js +5 -4
- package/dist/lib/employees.js +3 -2
- package/dist/lib/exe-daemon-client.js +3 -3
- package/dist/lib/exe-daemon.js +256 -406
- package/dist/lib/hybrid-search.js +6 -5
- package/dist/lib/identity.js +3 -2
- package/dist/lib/license.js +2 -2
- package/dist/lib/messaging.js +13 -12
- package/dist/lib/reminders.js +4 -3
- package/dist/lib/schedules.js +6 -5
- package/dist/lib/session-registry.js +5 -4
- package/dist/lib/skill-learning.js +7 -6
- package/dist/lib/store.js +7 -4
- package/dist/lib/task-router.js +4 -3
- package/dist/lib/tasks.js +14 -13
- package/dist/lib/tmux-routing.js +16 -11
- package/dist/lib/token-spend.js +4 -3
- package/dist/{license-gate-V2UCK4KJ.js → license-gate-7SDHCJUO.js} +3 -3
- package/dist/mcp/register-tools.js +74 -73
- package/dist/mcp/server.js +97 -79
- package/dist/mcp/tools/complete-reminder.js +5 -4
- package/dist/mcp/tools/create-reminder.js +5 -4
- package/dist/mcp/tools/create-task.js +16 -15
- package/dist/mcp/tools/deactivate-behavior.js +8 -7
- package/dist/mcp/tools/list-reminders.js +5 -4
- package/dist/mcp/tools/list-tasks.js +16 -15
- package/dist/mcp/tools/send-message.js +15 -14
- package/dist/mcp/tools/update-task.js +15 -14
- package/dist/{mcp-http-config-7LFFPNGV.js → mcp-http-config-QSOVFXHW.js} +4 -3
- package/dist/mcp-tool-surface-CSPFXL3F.js +15 -0
- package/dist/{memory-cards-BGI6MJRN.js → memory-cards-II67WFL2.js} +3 -2
- package/dist/{memory-graph-extractor-DTRRNWHZ.js → memory-graph-extractor-PM4Q2KJG.js} +6 -5
- package/dist/{memory-poisoning-defense-MOCWJK6S.js → memory-poisoning-defense-ECXSX7HK.js} +3 -2
- package/dist/{memory-queue-client-DD4E5SIZ.js → memory-queue-client-HLURQEV6.js} +4 -4
- package/dist/{memory-reflection-UKKTGZYR.js → memory-reflection-PXF6YFDU.js} +3 -2
- package/dist/{notifications-AMJ2K3MM.js → notifications-UP7WQGG4.js} +12 -11
- package/dist/{orchestration-events-MB4QVHTD.js → orchestration-events-PZLLPCKY.js} +4 -3
- package/dist/orchestration-health-read-EJWVUARG.js +191 -0
- package/dist/{orchestrator-M7DJH6TN.js → orchestrator-PUT45J4O.js} +14 -13
- package/dist/{pipeline-router-4LT5YG5P.js → pipeline-router-5CRWKESM.js} +4 -3
- package/dist/{plan-limits-ENS7OJWP.js → plan-limits-SH2NDFNX.js} +6 -5
- package/dist/{project-boot-6W5JPGSB.js → project-boot-2TCPDZ4S.js} +25 -1
- package/dist/{projection-worker-WWXZK7QD.js → projection-worker-HWY37MNC.js} +2 -2
- package/dist/{prospective-memory-VNGLPMS6.js → prospective-memory-FQSVMCGG.js} +3 -2
- package/dist/{reranker-6XBS55FA.js → reranker-AALRMGMM.js} +1 -1
- package/dist/{retrieval-health-ATX5TIQ2.js → retrieval-health-PNWJSJNG.js} +1 -1
- package/dist/{review-polling-E4ALHTQE.js → review-polling-65JZUE3T.js} +13 -12
- package/dist/runtime/index.js +24 -22
- package/dist/{session-events-3J6APMKN.js → session-events-EJ3OSAA6.js} +13 -12
- package/dist/session-kill-telemetry-3HGM7SNQ.js +63 -0
- package/dist/{session-scope-E54VIYTJ.js → session-scope-JGDYAMJO.js} +12 -11
- package/dist/{setup-wizard-XV736U5D.js → setup-wizard-44LMFM2C.js} +1 -1
- package/dist/shared-rate-limit-store-QZPQEVE2.js +80 -0
- package/dist/{skill-refinement-FTURVWFN.js → skill-refinement-DUOO6B7V.js} +3 -2
- package/dist/{stack-release-JZVTSBJJ.js → stack-release-XYMKU7NT.js} +53 -4
- package/dist/{stack-update-BIK2QHOE.js → stack-update-XHQJRJEP.js} +5 -3
- package/dist/{steward-gate-YGU4VXPP.js → steward-gate-6NWRDLX2.js} +4 -3
- package/dist/{task-enforcement-GY3VTY6L.js → task-enforcement-UOULTGFB.js} +12 -11
- package/dist/{task-scope-PYOK7OQ6.js → task-scope-P5STKYAC.js} +12 -11
- package/dist/{tasks-crud-HLJEJ2UU.js → tasks-crud-24HMTULR.js} +12 -11
- package/dist/{tasks-notify-NGS3DWUJ.js → tasks-notify-LAIU7UUI.js} +13 -12
- package/dist/{tasks-review-BP5V2X34.js → tasks-review-AFJAU2DY.js} +12 -11
- package/dist/{telemetry-upload-AXYPFAPS.js → telemetry-upload-DWFGC2XJ.js} +8 -7
- package/dist/token-budget-4RFZKWGH.js +16 -0
- package/dist/{tool-capability-index-RHPVMMDD.js → tool-capability-index-ZEXBWKUZ.js} +1 -1
- package/dist/{tool-telemetry-BLSVABFJ.js → tool-telemetry-BS5JXM5M.js} +1 -1
- package/dist/tui/App.js +21 -20
- package/dist/{tui-data-EYPOFYLS.js → tui-data-UNO5B7PU.js} +12 -11
- package/dist/{worker-gate-SMFOBMMX.js → worker-gate-C6CTTYMD.js} +1 -1
- package/dist/{workflow-engine-TDJZ3TXB.js → workflow-engine-4W2KYCDV.js} +2 -2
- package/dist/{worktree-XISIYRM4.js → worktree-2CXY6NEB.js} +5 -4
- package/dist/{worktree-sweep-AS6GAR6X.js → worktree-sweep-K3CJFSUL.js} +6 -5
- package/package.json +9 -4
- package/release-notes.json +17 -88
- package/stack.release.json +51 -4
- package/dist/chunk-PHOQAVTK.js +0 -42
- package/dist/daemon-auth-BK7ON5ZH.js +0 -13
- package/dist/session-kill-telemetry-KOAHLRBT.js +0 -31
- package/dist/{chunk-XDE5IGBX.js → chunk-2NS3QRMJ.js} +0 -0
- package/dist/{chunk-JTMKRUX6.js → chunk-A2YZG4AD.js} +0 -0
- package/dist/{chunk-UZATXREL.js → chunk-AE74NOE6.js} +0 -0
- package/dist/{chunk-LUGWK6QB.js → chunk-FF5DA4XP.js} +3 -3
- /package/dist/{chunk-BGOMFGSW.js → chunk-GWPICNSO.js} +0 -0
- /package/dist/{chunk-NLHUA3YB.js → chunk-I3DPCSDG.js} +0 -0
- /package/dist/{chunk-YM3367VC.js → chunk-J3SR5MGG.js} +0 -0
- /package/dist/{chunk-FKFVNV7X.js → chunk-K4BKJJ4F.js} +0 -0
- /package/dist/{chunk-PTDBHQX7.js → chunk-MQCTK6EF.js} +0 -0
- /package/dist/{chunk-GBV5PV5T.js → chunk-QNXM2HXW.js} +0 -0
- /package/dist/{chunk-GZSG2ZOX.js → chunk-YUBTHJVV.js} +0 -0
- /package/dist/{core-memory-4OM7LR77.js → core-memory-OC5ITKKV.js} +0 -0
- /package/dist/{entity-boost-SFHIRXT5.js → entity-boost-NF3LE6OJ.js} +0 -0
- /package/dist/{message-queue-client-QTC3VHJT.js → message-queue-client-4VDU6BZY.js} +0 -0
- /package/dist/{oauth-server-BPN55EJM.js → oauth-server-EWUL7DMD.js} +0 -0
- /package/dist/{wiki-acl-45SIGG4O.js → wiki-acl-CONNF6ES.js} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateTask
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EOS7VPVT.js";
|
|
4
4
|
import {
|
|
5
5
|
TASK_ALREADY_CLAIMED_PREFIX
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HED6D5KR.js";
|
|
7
7
|
|
|
8
8
|
// src/mcp/tools/update-task.ts
|
|
9
9
|
import { z } from "zod";
|
|
@@ -40,7 +40,7 @@ function registerUpdateTask(server) {
|
|
|
40
40
|
let callerAgentId;
|
|
41
41
|
let callerSession;
|
|
42
42
|
try {
|
|
43
|
-
const { getActiveAgent: getAgent } = await import("./active-agent-
|
|
43
|
+
const { getActiveAgent: getAgent } = await import("./active-agent-S5T2YMOR.js");
|
|
44
44
|
callerAgentId = getAgent().agentId;
|
|
45
45
|
const { getAgentContext } = await import("./agent-context-AZTTMUHP.js");
|
|
46
46
|
callerSession = getAgentContext()?.sessionHint || process.env.EXE_SESSION_NAME || process.env.EXE_SESSION || void 0;
|
|
@@ -1,17 +1,68 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
isExeSession
|
|
3
|
+
} from "./chunk-HED6D5KR.js";
|
|
4
|
+
import {
|
|
5
|
+
recordOrchestrationEventBestEffort
|
|
6
|
+
} from "./chunk-OR3TAZL3.js";
|
|
7
|
+
import {
|
|
8
|
+
getClient,
|
|
9
|
+
isCoordinatorName
|
|
10
|
+
} from "./chunk-SCYWCWKY.js";
|
|
11
|
+
import {
|
|
12
|
+
isDaemonAlive
|
|
13
|
+
} from "./chunk-7HLWBYH7.js";
|
|
4
14
|
|
|
5
15
|
// src/lib/session-kill-telemetry.ts
|
|
6
16
|
import crypto from "crypto";
|
|
7
|
-
import { appendFileSync } from "fs";
|
|
17
|
+
import { appendFileSync, statSync } from "fs";
|
|
8
18
|
import path from "path";
|
|
9
19
|
import os from "os";
|
|
10
20
|
var KILL_FILE_LOG = path.join(os.homedir(), ".exe-os", "logs", "session-kills.jsonl");
|
|
21
|
+
var EVENT_LOOP_BLOCKED_MARKER = path.join(
|
|
22
|
+
os.homedir(),
|
|
23
|
+
".exe-os",
|
|
24
|
+
"session-cache",
|
|
25
|
+
"event-loop-blocked.marker"
|
|
26
|
+
);
|
|
27
|
+
function isDaemonAlive2() {
|
|
28
|
+
const { alive } = isDaemonAlive();
|
|
29
|
+
if (!alive) return false;
|
|
30
|
+
try {
|
|
31
|
+
const st = statSync(EVENT_LOOP_BLOCKED_MARKER);
|
|
32
|
+
if (Date.now() - st.mtimeMs < 6e4) return false;
|
|
33
|
+
} catch {
|
|
34
|
+
}
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
var CPU_STARVATION_LOAD_RATIO = 0.8;
|
|
11
38
|
var TOKENS_PER_IDLE_MINUTE = 50;
|
|
39
|
+
function classifyRole(sessionName, agentId) {
|
|
40
|
+
return isExeSession(sessionName) || isCoordinatorName(agentId) ? "coordinator" : "worker";
|
|
41
|
+
}
|
|
42
|
+
function captureLoadAtDeath() {
|
|
43
|
+
const load1 = os.loadavg()[0] ?? 0;
|
|
44
|
+
const cpus = Math.max(1, os.cpus().length);
|
|
45
|
+
return { load1, cpus, loadRatio: load1 / cpus };
|
|
46
|
+
}
|
|
47
|
+
function classifyDeathCause(reason, loadRatio, daemonReady) {
|
|
48
|
+
if (loadRatio >= CPU_STARVATION_LOAD_RATIO) return "cpu_starvation";
|
|
49
|
+
if (!daemonReady) return "daemon_loss";
|
|
50
|
+
if (reason) return reason;
|
|
51
|
+
return "unknown";
|
|
52
|
+
}
|
|
12
53
|
async function recordSessionKill(input) {
|
|
13
54
|
const killedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
14
55
|
const id = crypto.randomUUID();
|
|
56
|
+
let role = "worker";
|
|
57
|
+
let loadAtDeath = null;
|
|
58
|
+
let cause = input.reason;
|
|
59
|
+
try {
|
|
60
|
+
role = classifyRole(input.sessionName, input.agentId);
|
|
61
|
+
loadAtDeath = captureLoadAtDeath();
|
|
62
|
+
cause = classifyDeathCause(input.reason, loadAtDeath.loadRatio, isDaemonAlive2());
|
|
63
|
+
} catch {
|
|
64
|
+
cause = input.reason;
|
|
65
|
+
}
|
|
15
66
|
try {
|
|
16
67
|
const logEntry = JSON.stringify({
|
|
17
68
|
id,
|
|
@@ -19,6 +70,9 @@ async function recordSessionKill(input) {
|
|
|
19
70
|
session: input.sessionName,
|
|
20
71
|
agent: input.agentId,
|
|
21
72
|
reason: input.reason,
|
|
73
|
+
role,
|
|
74
|
+
cause,
|
|
75
|
+
loadAtDeath,
|
|
22
76
|
ticksIdle: input.ticksIdle ?? null,
|
|
23
77
|
tokensSaved: input.estimatedTokensSaved ?? null
|
|
24
78
|
});
|
|
@@ -29,6 +83,25 @@ async function recordSessionKill(input) {
|
|
|
29
83
|
`
|
|
30
84
|
);
|
|
31
85
|
}
|
|
86
|
+
try {
|
|
87
|
+
recordOrchestrationEventBestEffort({
|
|
88
|
+
eventType: "session.died",
|
|
89
|
+
source: "session-kill-telemetry",
|
|
90
|
+
severity: cause === "cpu_starvation" && role === "coordinator" ? "error" : "warn",
|
|
91
|
+
agentId: input.agentId,
|
|
92
|
+
tmuxSession: input.sessionName,
|
|
93
|
+
result: cause,
|
|
94
|
+
payload: {
|
|
95
|
+
role,
|
|
96
|
+
cause,
|
|
97
|
+
reason: input.reason,
|
|
98
|
+
load1: loadAtDeath?.load1 ?? null,
|
|
99
|
+
cpus: loadAtDeath?.cpus ?? null,
|
|
100
|
+
loadRatio: loadAtDeath?.loadRatio ?? null
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
} catch {
|
|
104
|
+
}
|
|
32
105
|
try {
|
|
33
106
|
const client = getClient();
|
|
34
107
|
await client.execute({
|
|
@@ -111,7 +184,12 @@ async function sumTokensSavedSince(sinceISO) {
|
|
|
111
184
|
}
|
|
112
185
|
|
|
113
186
|
export {
|
|
187
|
+
isDaemonAlive2 as isDaemonAlive,
|
|
188
|
+
CPU_STARVATION_LOAD_RATIO,
|
|
114
189
|
TOKENS_PER_IDLE_MINUTE,
|
|
190
|
+
classifyRole,
|
|
191
|
+
captureLoadAtDeath,
|
|
192
|
+
classifyDeathCause,
|
|
115
193
|
recordSessionKill,
|
|
116
194
|
countKillsSince,
|
|
117
195
|
IDLE_KILL_STREAK_META_KEY,
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-VUH67PT4.js";
|
|
4
4
|
import {
|
|
5
5
|
isGhostBehaviorRow
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PMEOSD6S.js";
|
|
7
7
|
import {
|
|
8
8
|
getClient,
|
|
9
9
|
getIdentity,
|
|
10
10
|
listIdentities,
|
|
11
11
|
updateIdentity
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-SCYWCWKY.js";
|
|
13
13
|
import {
|
|
14
14
|
atomicWriteJsonSync
|
|
15
15
|
} from "./chunk-65DBIEM2.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SCYWCWKY.js";
|
|
4
4
|
|
|
5
5
|
// src/lib/orchestration-events.ts
|
|
6
6
|
import crypto from "crypto";
|
|
@@ -42,6 +42,8 @@ var ORCHESTRATION_COUNTER_KEYS = [
|
|
|
42
42
|
"tmuxNudgeCompleted",
|
|
43
43
|
"tmuxSpawnAttempted",
|
|
44
44
|
"tmuxSpawnCompleted",
|
|
45
|
+
"tmuxSpawnFailed",
|
|
46
|
+
"spawnFailureByCause",
|
|
45
47
|
"consistencyMismatches",
|
|
46
48
|
"consistencyRepaired",
|
|
47
49
|
"fileRowsResynced",
|
|
@@ -251,6 +253,8 @@ async function getOrchestrationMetrics(input = {}) {
|
|
|
251
253
|
tmuxNudgeCompleted: 0,
|
|
252
254
|
tmuxSpawnAttempted: 0,
|
|
253
255
|
tmuxSpawnCompleted: 0,
|
|
256
|
+
tmuxSpawnFailed: 0,
|
|
257
|
+
spawnFailureByCause: {},
|
|
254
258
|
consistencyMismatches: 0,
|
|
255
259
|
consistencyRepaired: 0,
|
|
256
260
|
fileRowsResynced: 0,
|
|
@@ -311,7 +315,14 @@ async function getOrchestrationMetrics(input = {}) {
|
|
|
311
315
|
if (String(row.result ?? "") === "debounced") counts.duplicateNudges++;
|
|
312
316
|
}
|
|
313
317
|
if (type === "tmux.spawn.attempted") counts.tmuxSpawnAttempted++;
|
|
314
|
-
if (type === "tmux.spawn.completed")
|
|
318
|
+
if (type === "tmux.spawn.completed") {
|
|
319
|
+
counts.tmuxSpawnCompleted++;
|
|
320
|
+
if (String(row.result ?? "") === "failed") {
|
|
321
|
+
counts.tmuxSpawnFailed++;
|
|
322
|
+
const code = String(row.error_code ?? "unknown") || "unknown";
|
|
323
|
+
counts.spawnFailureByCause[code] = (counts.spawnFailureByCause[code] ?? 0) + 1;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
315
326
|
if (type === "consistency.mismatch") counts.consistencyMismatches++;
|
|
316
327
|
if (type === "consistency.repaired") counts.consistencyRepaired++;
|
|
317
328
|
if (type === "task_file.resynced") counts.fileRowsResynced++;
|
|
@@ -529,6 +540,7 @@ function formatOrchestrationMetrics(metrics) {
|
|
|
529
540
|
`- worker instances selected: ${metrics.counts.workerInstancesSelected}`,
|
|
530
541
|
`- tmux spawn attempted: ${metrics.counts.tmuxSpawnAttempted}`,
|
|
531
542
|
`- tmux spawn completed: ${metrics.counts.tmuxSpawnCompleted}`,
|
|
543
|
+
`- tmux spawn FAILED: ${metrics.counts.tmuxSpawnFailed}${metrics.counts.tmuxSpawnFailed > 0 ? ` (${Object.entries(metrics.counts.spawnFailureByCause).map(([cause, n]) => `${cause}=${n}`).join(" ")})` : ""}`,
|
|
532
544
|
`- worktrees created: ${metrics.counts.worktreeCreated}`,
|
|
533
545
|
`- worktrees reused: ${metrics.counts.worktreeReused}`,
|
|
534
546
|
`- worktrees failed: ${metrics.counts.worktreeFailed}`,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
vectorToSqlLiteral
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WBJXJ2R4.js";
|
|
4
4
|
import {
|
|
5
5
|
blobToVector
|
|
6
6
|
} from "./chunk-OTVEIJUQ.js";
|
|
7
7
|
import {
|
|
8
8
|
getClient
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SCYWCWKY.js";
|
|
10
10
|
|
|
11
11
|
// src/lib/behaviors.ts
|
|
12
12
|
import crypto from "crypto";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureDaemonToken,
|
|
3
3
|
readDaemonToken
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RQ7OVXUZ.js";
|
|
5
|
+
import {
|
|
6
|
+
requestRestart
|
|
7
|
+
} from "./chunk-RVXWGPD3.js";
|
|
5
8
|
import {
|
|
6
9
|
computeDaemonHeapCapMb
|
|
7
10
|
} from "./chunk-7XGDTKHX.js";
|
|
8
|
-
import {
|
|
9
|
-
requestRestart
|
|
10
|
-
} from "./chunk-7L2EV3XX.js";
|
|
11
11
|
import {
|
|
12
12
|
EXE_AI_DIR
|
|
13
13
|
} from "./chunk-DFIOOK5R.js";
|
|
@@ -1,9 +1,52 @@
|
|
|
1
1
|
// src/bin/fast-db-init.ts
|
|
2
|
+
function makeNoopClient() {
|
|
3
|
+
const emptyResult = {
|
|
4
|
+
columns: [],
|
|
5
|
+
columnTypes: [],
|
|
6
|
+
rows: [],
|
|
7
|
+
rowsAffected: 0,
|
|
8
|
+
lastInsertRowid: void 0,
|
|
9
|
+
toJSON() {
|
|
10
|
+
return {};
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
return {
|
|
14
|
+
async execute() {
|
|
15
|
+
return emptyResult;
|
|
16
|
+
},
|
|
17
|
+
async batch(stmts) {
|
|
18
|
+
return stmts.map(() => emptyResult);
|
|
19
|
+
},
|
|
20
|
+
async transaction() {
|
|
21
|
+
throw new Error("Transactions not supported in daemon-down no-op mode");
|
|
22
|
+
},
|
|
23
|
+
async executeMultiple() {
|
|
24
|
+
},
|
|
25
|
+
async migrate() {
|
|
26
|
+
return [];
|
|
27
|
+
},
|
|
28
|
+
sync() {
|
|
29
|
+
return Promise.resolve(void 0);
|
|
30
|
+
},
|
|
31
|
+
close() {
|
|
32
|
+
},
|
|
33
|
+
get closed() {
|
|
34
|
+
return false;
|
|
35
|
+
},
|
|
36
|
+
get protocol() {
|
|
37
|
+
return "file";
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
2
41
|
async function fastDbInit(opts) {
|
|
3
42
|
const { isInitialized, getClient, setExternalClient } = await import("./lib/database.js");
|
|
4
43
|
if (isInitialized()) {
|
|
5
44
|
return getClient();
|
|
6
45
|
}
|
|
46
|
+
if (opts?.daemonOnly) {
|
|
47
|
+
const { isDaemonReady } = await import("./daemon-ready-signal-3L2MJT7C.js");
|
|
48
|
+
if (!isDaemonReady()) return makeNoopClient();
|
|
49
|
+
}
|
|
7
50
|
const forceDirect = process.env.EXE_DB_DIRECT === "1" || process.env.EXE_DB_READONLY === "1" || process.env.EXE_SKIP_DAEMON === "1";
|
|
8
51
|
if (!forceDirect) {
|
|
9
52
|
try {
|
|
@@ -71,6 +114,9 @@ async function fastDbInit(opts) {
|
|
|
71
114
|
} catch {
|
|
72
115
|
}
|
|
73
116
|
}
|
|
117
|
+
if (opts?.daemonOnly) {
|
|
118
|
+
return makeNoopClient();
|
|
119
|
+
}
|
|
74
120
|
if (opts?.socketOnly) {
|
|
75
121
|
throw new Error("Daemon socket unavailable and socketOnly=true \u2014 skipping slow DB fallback");
|
|
76
122
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
deactivateBehavior
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PMEOSD6S.js";
|
|
4
4
|
import {
|
|
5
5
|
getActiveAgent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BUOMSIXH.js";
|
|
7
7
|
import {
|
|
8
8
|
canCoordinate,
|
|
9
9
|
getClient
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SCYWCWKY.js";
|
|
11
11
|
|
|
12
12
|
// src/mcp/tools/deactivate-behavior.ts
|
|
13
13
|
import { z } from "zod";
|
|
@@ -24,7 +24,7 @@ function registerDeactivateBehavior(server) {
|
|
|
24
24
|
async ({ behavior_id }) => {
|
|
25
25
|
const caller = getActiveAgent();
|
|
26
26
|
try {
|
|
27
|
-
const { StewardGate } = await import("./steward-gate-
|
|
27
|
+
const { StewardGate } = await import("./steward-gate-6NWRDLX2.js");
|
|
28
28
|
const steward = new StewardGate();
|
|
29
29
|
const gateDecision = await steward.checkAuthority(caller.agentId || "unknown", "deactivate_behavior", behavior_id);
|
|
30
30
|
if (!gateDecision.allowed) {
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EXE_AI_DIR
|
|
3
|
+
} from "./chunk-DFIOOK5R.js";
|
|
4
|
+
import {
|
|
5
|
+
enforcePrivateFileSync,
|
|
6
|
+
ensurePrivateDirSync
|
|
7
|
+
} from "./chunk-65DBIEM2.js";
|
|
8
|
+
|
|
9
|
+
// src/lib/daemon-auth.ts
|
|
10
|
+
import crypto from "crypto";
|
|
11
|
+
import path from "path";
|
|
12
|
+
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
13
|
+
var DAEMON_TOKEN_PATH = path.join(EXE_AI_DIR, "exed.token");
|
|
14
|
+
function normalizeToken(token) {
|
|
15
|
+
if (!token) return null;
|
|
16
|
+
const trimmed = token.trim();
|
|
17
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
18
|
+
}
|
|
19
|
+
function readDaemonToken() {
|
|
20
|
+
try {
|
|
21
|
+
if (!existsSync(DAEMON_TOKEN_PATH)) return null;
|
|
22
|
+
return normalizeToken(readFileSync(DAEMON_TOKEN_PATH, "utf8"));
|
|
23
|
+
} catch {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function ensureDaemonToken(seed) {
|
|
28
|
+
const existing = readDaemonToken();
|
|
29
|
+
if (existing) return existing;
|
|
30
|
+
const token = normalizeToken(seed) ?? crypto.randomBytes(32).toString("hex");
|
|
31
|
+
ensurePrivateDirSync(EXE_AI_DIR);
|
|
32
|
+
writeFileSync(DAEMON_TOKEN_PATH, `${token}
|
|
33
|
+
`, "utf8");
|
|
34
|
+
enforcePrivateFileSync(DAEMON_TOKEN_PATH);
|
|
35
|
+
return token;
|
|
36
|
+
}
|
|
37
|
+
function isUnclaimedAgentId(agentId) {
|
|
38
|
+
if (!agentId || agentId === "default") return true;
|
|
39
|
+
if (/^\$\{[^}]*\}$/.test(agentId)) return true;
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
function shouldEnforceSessionIdentity(env = process.env) {
|
|
43
|
+
const v = (env.EXE_ENFORCE_SESSION_IDENTITY ?? "").trim().toLowerCase();
|
|
44
|
+
return v === "1" || v === "true" || v === "yes" || v === "on";
|
|
45
|
+
}
|
|
46
|
+
function reconcileSessionAgentIdentity(boundAgentId, claimedAgentId, enforce = false) {
|
|
47
|
+
const bound = normalizeToken(boundAgentId ?? null);
|
|
48
|
+
if (!bound) {
|
|
49
|
+
return {
|
|
50
|
+
effectiveAgentId: claimedAgentId,
|
|
51
|
+
impersonationDetected: false,
|
|
52
|
+
reject: false,
|
|
53
|
+
claimedAgentId,
|
|
54
|
+
boundAgentId: claimedAgentId
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
if (isUnclaimedAgentId(claimedAgentId) || claimedAgentId === bound) {
|
|
58
|
+
return {
|
|
59
|
+
effectiveAgentId: bound,
|
|
60
|
+
impersonationDetected: false,
|
|
61
|
+
reject: false,
|
|
62
|
+
claimedAgentId,
|
|
63
|
+
boundAgentId: bound
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
effectiveAgentId: bound,
|
|
68
|
+
impersonationDetected: true,
|
|
69
|
+
reject: enforce,
|
|
70
|
+
claimedAgentId,
|
|
71
|
+
boundAgentId: bound
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export {
|
|
76
|
+
DAEMON_TOKEN_PATH,
|
|
77
|
+
readDaemonToken,
|
|
78
|
+
ensureDaemonToken,
|
|
79
|
+
shouldEnforceSessionIdentity,
|
|
80
|
+
reconcileSessionAgentIdentity
|
|
81
|
+
};
|
|
@@ -295,15 +295,48 @@ function cleanWorkerPidFiles() {
|
|
|
295
295
|
} catch {
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
-
function updateMcpVersionMarker() {
|
|
298
|
+
async function updateMcpVersionMarker(opts) {
|
|
299
299
|
try {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
300
|
+
let surfaceHash = opts?.surfaceHash;
|
|
301
|
+
if (surfaceHash === void 0) {
|
|
302
|
+
surfaceHash = await computeMcpSurfaceHash();
|
|
303
|
+
}
|
|
304
|
+
const { buildMcpVersionMarker } = await import("./mcp-tool-surface-CSPFXL3F.js");
|
|
305
|
+
const marker = buildMcpVersionMarker(surfaceHash ?? null);
|
|
306
|
+
let current = null;
|
|
307
|
+
try {
|
|
308
|
+
current = existsSync(MCP_VERSION_PATH) ? readFileSync(MCP_VERSION_PATH, "utf8").trim() : null;
|
|
309
|
+
} catch {
|
|
310
|
+
}
|
|
311
|
+
if (current === marker) {
|
|
312
|
+
process.stderr.write(
|
|
313
|
+
"[restart-orchestrator] MCP tool surface unchanged \u2014 marker NOT updated, no hot-reload\n"
|
|
314
|
+
);
|
|
315
|
+
logRestart({ event: "mcp_marker_unchanged", marker });
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
writeFileSync(MCP_VERSION_PATH, marker);
|
|
319
|
+
const surfaceMode = surfaceHash ? "surface-hash" : "timestamp-fallback";
|
|
320
|
+
process.stderr.write(
|
|
321
|
+
`[restart-orchestrator] MCP version marker updated (${surfaceMode}) \u2014 servers will hot-reload within 10s
|
|
322
|
+
`
|
|
323
|
+
);
|
|
324
|
+
logRestart({ event: "mcp_marker_updated", mode: surfaceMode });
|
|
303
325
|
} catch {
|
|
304
326
|
}
|
|
305
327
|
}
|
|
306
|
-
function
|
|
328
|
+
async function computeMcpSurfaceHash() {
|
|
329
|
+
try {
|
|
330
|
+
const [{ computeToolSurfaceHash }, { registerAllTools }] = await Promise.all([
|
|
331
|
+
import("./mcp-tool-surface-CSPFXL3F.js"),
|
|
332
|
+
import("./mcp/register-tools.js")
|
|
333
|
+
]);
|
|
334
|
+
return computeToolSurfaceHash((server) => registerAllTools(server));
|
|
335
|
+
} catch {
|
|
336
|
+
return null;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
async function requestDeployRestart(reason) {
|
|
307
340
|
const deployReason = reason ?? "deploy";
|
|
308
341
|
if (!acquireLock()) {
|
|
309
342
|
process.stderr.write("[restart-orchestrator] Lock held \u2014 waiting briefly for deploy\n");
|
|
@@ -340,7 +373,7 @@ function requestDeployRestart(reason) {
|
|
|
340
373
|
}
|
|
341
374
|
const orphansKilled = killOrphanedDaemons();
|
|
342
375
|
const backfillKilled = killOrphanedBackfill();
|
|
343
|
-
updateMcpVersionMarker();
|
|
376
|
+
await updateMcpVersionMarker();
|
|
344
377
|
cleanWorkerPidFiles();
|
|
345
378
|
try {
|
|
346
379
|
unlinkSync(SOCKET_PATH);
|
|
@@ -3,11 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-2I23RPSI.js";
|
|
4
4
|
import {
|
|
5
5
|
listBackups
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GWPICNSO.js";
|
|
7
7
|
import {
|
|
8
8
|
getEmotionalBaseline,
|
|
9
9
|
renderEmotionalBaselineSection
|
|
10
10
|
} from "./chunk-PNQDP3OA.js";
|
|
11
|
+
import {
|
|
12
|
+
logDaemonHealth
|
|
13
|
+
} from "./chunk-VQRTO7IS.js";
|
|
11
14
|
import {
|
|
12
15
|
isDaemonAlive
|
|
13
16
|
} from "./chunk-7HLWBYH7.js";
|
|
@@ -1116,7 +1119,7 @@ async function migrateReflectionDedup(client) {
|
|
|
1116
1119
|
"ALTER TABLE memory_reflections ADD COLUMN dedup_key TEXT",
|
|
1117
1120
|
"migration add memory_reflections.dedup_key"
|
|
1118
1121
|
);
|
|
1119
|
-
const { reflectionDedupKey } = await import("./memory-reflection-
|
|
1122
|
+
const { reflectionDedupKey } = await import("./memory-reflection-PXF6YFDU.js");
|
|
1120
1123
|
const keyForRow = (row) => {
|
|
1121
1124
|
let sources = [];
|
|
1122
1125
|
try {
|
|
@@ -1365,7 +1368,7 @@ async function _attemptBackupRestore(config) {
|
|
|
1365
1368
|
} catch {
|
|
1366
1369
|
}
|
|
1367
1370
|
try {
|
|
1368
|
-
const { pruneCorruptQuarantine } = await import("./db-backup-
|
|
1371
|
+
const { pruneCorruptQuarantine } = await import("./db-backup-EORG4LBO.js");
|
|
1369
1372
|
pruneCorruptQuarantine();
|
|
1370
1373
|
} catch {
|
|
1371
1374
|
}
|
|
@@ -1637,7 +1640,7 @@ async function sweepExpiredSoftDeletedMemories(client, options = {}) {
|
|
|
1637
1640
|
const purgeArchived = archDays !== void 0;
|
|
1638
1641
|
const BATCH_SIZE = 2e3;
|
|
1639
1642
|
const MAX_BATCHES = 500;
|
|
1640
|
-
const { cleanupCardsForMemories, cleanupGraphLinksForMemories } = await import("./graph-rag-
|
|
1643
|
+
const { cleanupCardsForMemories, cleanupGraphLinksForMemories } = await import("./graph-rag-HITZZ63L.js");
|
|
1641
1644
|
const softCutoff = `-${softDays} days`;
|
|
1642
1645
|
const selectArgsBase = [softCutoff];
|
|
1643
1646
|
let predicate = `status = 'deleted' AND COALESCE(deleted_at, timestamp) < datetime('now', ?)`;
|
|
@@ -1713,6 +1716,15 @@ function getClient() {
|
|
|
1713
1716
|
process.stderr.write(
|
|
1714
1717
|
"[database] WARN: daemon unavailable \u2014 using direct SQLite (single-writer CLI mode).\n"
|
|
1715
1718
|
);
|
|
1719
|
+
logDaemonHealth({
|
|
1720
|
+
event: "direct_sqlite_fallback",
|
|
1721
|
+
pid: process.pid,
|
|
1722
|
+
message: "CLI opened encrypted DB directly \u2014 daemon unavailable",
|
|
1723
|
+
data: {
|
|
1724
|
+
hook: process.env.EXE_HOOK_NAME ?? null,
|
|
1725
|
+
mcpMode: process.env.EXE_MCP_MODE === "1"
|
|
1726
|
+
}
|
|
1727
|
+
});
|
|
1716
1728
|
}
|
|
1717
1729
|
return _resilientClient;
|
|
1718
1730
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SCYWCWKY.js";
|
|
4
4
|
|
|
5
5
|
// src/lib/pipeline-router.ts
|
|
6
6
|
import crypto from "crypto";
|
|
@@ -140,8 +140,8 @@ Agent response: ${agentResponse}` : ""
|
|
|
140
140
|
}
|
|
141
141
|
async function sinkEntityExtraction(msg, agentResponse, agentName) {
|
|
142
142
|
try {
|
|
143
|
-
const { extractFromConversation } = await import("./conversation-entity-extractor-
|
|
144
|
-
const { storeExtraction } = await import("./graph-rag-
|
|
143
|
+
const { extractFromConversation } = await import("./conversation-entity-extractor-KYOBXNID.js");
|
|
144
|
+
const { storeExtraction } = await import("./graph-rag-HITZZ63L.js");
|
|
145
145
|
if ((msg.text?.length ?? 0) < 20) return false;
|
|
146
146
|
if (msg.isHistorical) return false;
|
|
147
147
|
const extraction = await extractFromConversation(msg, agentResponse, agentName);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isCrdtSyncEnabled
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-K4BKJJ4F.js";
|
|
4
4
|
import {
|
|
5
5
|
GHOST_BEHAVIOR_SQL,
|
|
6
6
|
isGhostBehaviorRow
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PMEOSD6S.js";
|
|
8
8
|
import {
|
|
9
9
|
decryptSyncBlob,
|
|
10
10
|
encryptSyncBlob,
|
|
@@ -13,16 +13,16 @@ import {
|
|
|
13
13
|
} from "./chunk-LO6L5ADL.js";
|
|
14
14
|
import {
|
|
15
15
|
retryOnDaemonTransportError
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-DNFU56ZS.js";
|
|
17
17
|
import {
|
|
18
18
|
getClient,
|
|
19
19
|
loadEmployees,
|
|
20
20
|
registerBinSymlinks,
|
|
21
21
|
saveEmployees
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-SCYWCWKY.js";
|
|
23
23
|
import {
|
|
24
24
|
loadDeviceId
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-JV225JBX.js";
|
|
26
26
|
import {
|
|
27
27
|
EXE_AI_DIR
|
|
28
28
|
} from "./chunk-DFIOOK5R.js";
|
|
@@ -584,7 +584,7 @@ async function cloudSync(config, options) {
|
|
|
584
584
|
let pulled = 0;
|
|
585
585
|
if (pullResult.records.length > 0) {
|
|
586
586
|
if (shouldUseCrdtMergeForCloudSync()) {
|
|
587
|
-
const { initCrdtDoc, importExistingMemories, readAllMemories } = await import("./crdt-sync-
|
|
587
|
+
const { initCrdtDoc, importExistingMemories, readAllMemories } = await import("./crdt-sync-ZFIFL2QM.js");
|
|
588
588
|
initCrdtDoc();
|
|
589
589
|
importExistingMemories(
|
|
590
590
|
pullResult.records.map((rec) => ({
|
|
@@ -1023,7 +1023,7 @@ async function cloudSync(config, options) {
|
|
|
1023
1023
|
}
|
|
1024
1024
|
const totalMemories = await countRows("SELECT COUNT(*) as cnt FROM memories WHERE status = 'active' OR status IS NULL");
|
|
1025
1025
|
try {
|
|
1026
|
-
const { getLatestBackup } = await import("./db-backup-
|
|
1026
|
+
const { getLatestBackup } = await import("./db-backup-EORG4LBO.js");
|
|
1027
1027
|
const latestBackup = getLatestBackup();
|
|
1028
1028
|
if (latestBackup) {
|
|
1029
1029
|
const backupSize = statSync(latestBackup).size;
|