@askexenow/exe-os 0.9.322 → 0.9.323
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.customer.example +1 -1
- package/deploy/compose/.env.example +18 -1
- package/deploy/compose/PROTECTED_FILES.md +4 -1
- package/deploy/compose/add-routes.sh +22 -0
- package/deploy/compose/cloudflared/config.yml.example +6 -3
- package/deploy/compose/docker-compose.yml +36 -1
- package/deploy/compose/generate-env.ts +40 -2
- package/deploy/compose/sso-edge/default.conf.template +11 -0
- package/deploy/compose/sso-edge/sso-redirect.conf +90 -21
- package/dist/{active-agent-M5NJFEBM.js → active-agent-67BHUBV2.js} +3 -3
- package/dist/{active-agent-SHM4QSRJ.js → active-agent-IGVX2AAK.js} +3 -3
- package/dist/{agentic-ontology-HQKCU7LG.js → agentic-ontology-I5MEKVGE.js} +1 -1
- package/dist/backfill-gate-J7UXFNXU.js +19 -0
- package/dist/{backfill-metadata-CXWFCTBO.js → backfill-metadata-N5VVCYFT.js} +4 -4
- package/dist/{behaviors-J47D342W.js → behaviors-2YYG72ZH.js} +5 -5
- package/dist/bin/agentic-ontology-backfill.js +5 -5
- package/dist/bin/agentic-reflection-backfill.js +6 -6
- package/dist/bin/agentic-semantic-label.js +5 -5
- package/dist/bin/backfill-conversations.js +11 -11
- package/dist/bin/backfill-responses.js +11 -11
- package/dist/bin/backfill-vectors.js +102 -22
- package/dist/bin/bulk-sync-postgres.js +14 -14
- package/dist/bin/cc-doctor.js +5 -5
- package/dist/bin/cleanup-stale-review-tasks.js +20 -13
- package/dist/bin/cli.js +28 -31
- package/dist/bin/customer-readiness.js +1 -0
- package/dist/bin/deferred-daemon-restart.js +79 -76
- package/dist/bin/exe-agent-config.js +3 -3
- package/dist/bin/exe-agent.js +4 -4
- package/dist/bin/exe-assign.js +10 -10
- package/dist/bin/exe-boot.js +31 -22
- package/dist/bin/exe-call.js +4 -4
- package/dist/bin/exe-cloud.js +120 -47
- package/dist/bin/exe-config-dump.js +3 -3
- package/dist/bin/exe-dispatch.js +48 -14
- package/dist/bin/exe-doctor.js +4 -4
- package/dist/bin/exe-export-behaviors.js +7 -7
- package/dist/bin/exe-forget.js +6 -6
- package/dist/bin/exe-gateway.js +8 -8
- package/dist/bin/exe-healthcheck.js +17 -8
- package/dist/bin/exe-heartbeat.js +20 -13
- package/dist/bin/exe-kill.js +23 -16
- package/dist/bin/exe-launch-agent.js +29 -26
- package/dist/bin/exe-new-employee.js +8 -8
- package/dist/bin/exe-pending-messages.js +21 -14
- package/dist/bin/exe-pending-notifications.js +20 -13
- package/dist/bin/exe-pending-reviews.js +20 -13
- package/dist/bin/exe-rename.js +4 -4
- package/dist/bin/exe-review.js +22 -15
- package/dist/bin/exe-search.js +8 -13
- package/dist/bin/exe-session-cleanup.js +39 -22
- package/dist/bin/exe-settings.js +15 -15
- package/dist/bin/exe-start-codex.js +12 -12
- package/dist/bin/exe-start-opencode.js +8 -8
- package/dist/bin/exe-status.js +21 -14
- package/dist/bin/exe-support.js +3 -3
- package/dist/bin/exe-team.js +3 -3
- package/dist/bin/exe-watchdog.js +278 -39
- package/dist/bin/git-sweep.js +21 -14
- package/dist/bin/graph-backfill.js +4 -4
- package/dist/bin/graph-export.js +5 -5
- package/dist/bin/import-history.js +7 -7
- package/dist/bin/install-launchd.js +2 -2
- package/dist/bin/install.js +120 -87
- package/dist/bin/intercom-check.js +4 -4
- package/dist/bin/mcp-sessions.js +2 -2
- package/dist/bin/orchestration-metrics.js +4 -4
- package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
- package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
- package/dist/bin/registry-proxy.js +1 -1
- package/dist/bin/scan-tasks.js +20 -13
- package/dist/bin/setup.js +1 -1
- package/dist/bin/shard-migrate.js +4 -4
- package/dist/bin/stack-update.js +4 -4
- package/dist/bin/vps-health-gate.js +1 -1
- package/dist/{capability-cards-H7H3MU74.js → capability-cards-RC4JYXCG.js} +2 -2
- package/dist/{capacity-monitor-WAEHVBL7.js → capacity-monitor-EDIGJSVQ.js} +21 -14
- package/dist/{catchup-brief-L42STIDR.js → catchup-brief-YVSBRXYZ.js} +23 -16
- package/dist/{chunk-VSXGFHJY.js → chunk-2COLYLE6.js} +1 -1
- package/dist/{chunk-KL5WYWS3.js → chunk-2RR2CJCX.js} +2 -2
- package/dist/{chunk-HV5CUDOE.js → chunk-364VBQIC.js} +1 -1
- package/dist/{chunk-ABGDTMKC.js → chunk-3CT3GN2B.js} +1 -1
- package/dist/{chunk-HWC5W34K.js → chunk-3LZILUET.js} +1 -1
- package/dist/{chunk-3M73L663.js → chunk-3MUV2GDZ.js} +2 -2
- package/dist/{chunk-GA76RGSP.js → chunk-3QJ3GDQZ.js} +5 -5
- package/dist/{chunk-SENJA7BZ.js → chunk-3VYAQUWZ.js} +54 -7
- package/dist/{chunk-XLNF3CIO.js → chunk-46AMZT3C.js} +110 -24
- package/dist/{chunk-6N4LYEDI.js → chunk-4GK6JTEV.js} +1 -1
- package/dist/{chunk-QNUHDEPI.js → chunk-4VW5KF6X.js} +4 -4
- package/dist/{chunk-TI6YX3L5.js → chunk-5CRFNQ7L.js} +2 -2
- package/dist/{chunk-OI63OVCR.js → chunk-5HXJI7SX.js} +1 -1
- package/dist/{chunk-CWQAXO3O.js → chunk-5RACW3LX.js} +28 -3
- package/dist/{chunk-EOPSIIEH.js → chunk-5ZQMGI3V.js} +1 -1
- package/dist/{chunk-WCCR5IFR.js → chunk-644DVREV.js} +2 -2
- package/dist/chunk-6IWLAQ7O.js +40 -0
- package/dist/{chunk-ORC5AO7E.js → chunk-6UR7C2NX.js} +1 -1
- package/dist/{chunk-F5FAD2YR.js → chunk-7PXMLHPG.js} +2 -2
- package/dist/{chunk-FANIBYUO.js → chunk-A2K7YIRL.js} +2 -2
- package/dist/{chunk-LB77CSLO.js → chunk-A3CRB4PS.js} +3 -3
- package/dist/{chunk-6UQRJCKK.js → chunk-A6I36KVN.js} +2 -2
- package/dist/{chunk-CXXERHNC.js → chunk-A6ODMODG.js} +1 -1
- package/dist/{chunk-GN3IWZDH.js → chunk-AVEOL6NP.js} +140 -122
- package/dist/{chunk-KLG53B63.js → chunk-BKOGHVRO.js} +1 -1
- package/dist/{chunk-HIOO7DZ2.js → chunk-CCYEO6EG.js} +5 -5
- package/dist/{chunk-NYFPFOYM.js → chunk-CMZIAR5S.js} +1 -1
- package/dist/{chunk-6SXJZHRJ.js → chunk-CP4LIKCX.js} +1 -1
- package/dist/{chunk-XEBN5CPD.js → chunk-DDRASSJI.js} +6 -6
- package/dist/{chunk-7SDS5VCL.js → chunk-DZVQ23CM.js} +7 -7
- package/dist/{chunk-NAHAOFTY.js → chunk-E72VLAJH.js} +3 -3
- package/dist/{chunk-EVUXF2G4.js → chunk-EAHLB7YN.js} +1 -1
- package/dist/{signal-paths-4GOIRLGH.js → chunk-EIKATSE4.js} +3 -4
- package/dist/{chunk-HKSJSW2V.js → chunk-EZHNCIO5.js} +1 -1
- package/dist/{chunk-QVFJCFNM.js → chunk-FROUDYRT.js} +33 -2
- package/dist/{chunk-EPBB2OD3.js → chunk-GHARDROH.js} +2 -2
- package/dist/{chunk-ROMB2HH4.js → chunk-GMDLNJ5E.js} +6 -6
- package/dist/{chunk-E32KARET.js → chunk-H7FI3AWZ.js} +4 -4
- package/dist/{chunk-X62GD6QW.js → chunk-HAA4N3NI.js} +2 -2
- package/dist/{chunk-PISGLNV7.js → chunk-HYNNAM4R.js} +5 -5
- package/dist/{chunk-KXP3CUTL.js → chunk-I4IMPAZQ.js} +2 -2
- package/dist/{chunk-C4BIZXKB.js → chunk-IFXE7QYT.js} +1 -1
- package/dist/{chunk-WFHYAKEU.js → chunk-IKFL4OLM.js} +1 -1
- package/dist/{chunk-657AQEPY.js → chunk-IKOAALTW.js} +1 -1
- package/dist/{chunk-TKBWBHFV.js → chunk-JTF4UVXK.js} +1 -1
- package/dist/{chunk-7FBPLVHM.js → chunk-KADUJ7PE.js} +3 -3
- package/dist/{chunk-CHSRSESS.js → chunk-KIXTW4VH.js} +1 -1
- package/dist/chunk-KPIN44GZ.js +67 -0
- package/dist/{chunk-VY7345RO.js → chunk-L5TUAHLX.js} +1 -1
- package/dist/{chunk-JXEMAB4M.js → chunk-LX2TYKEQ.js} +1 -1
- package/dist/{chunk-ONKIWA3R.js → chunk-ML4S5SHZ.js} +3 -1
- package/dist/{chunk-CMDC5D7S.js → chunk-NLEW62VC.js} +6 -0
- package/dist/{chunk-OFR7KQ37.js → chunk-NQPAG7CB.js} +3 -3
- package/dist/{chunk-6XM6PZXQ.js → chunk-NW6V3XVK.js} +1 -1
- package/dist/{chunk-G5TP2D2U.js → chunk-PGEADAZL.js} +3 -3
- package/dist/{chunk-AZL3EUR3.js → chunk-QBRBLEXP.js} +229 -29
- package/dist/{chunk-MYMA23KC.js → chunk-QCWZMS7B.js} +1 -1
- package/dist/{chunk-HGM6NZQH.js → chunk-RYJH6S55.js} +1 -1
- package/dist/{chunk-2GBGIXKH.js → chunk-S6XKC36B.js} +1 -1
- package/dist/{chunk-QQOH3I4A.js → chunk-SAUO2ZLB.js} +1 -1
- package/dist/{chunk-7BZ6TOZN.js → chunk-SE7TU5GX.js} +3 -3
- package/dist/{chunk-SQ5JWDJ2.js → chunk-SSIUJXOL.js} +1 -1
- package/dist/{chunk-KK4ZOYXJ.js → chunk-SXN3TRJ4.js} +80 -40
- package/dist/{chunk-7CUF27OT.js → chunk-T3OGIK3Y.js} +1 -1
- package/dist/{skill-refinement-YLIAY7V4.js → chunk-U3VSCPGX.js} +3 -11
- package/dist/{chunk-V2ESQU3S.js → chunk-UB322YIG.js} +3 -3
- package/dist/{chunk-3JW3ZXCP.js → chunk-UPLY33F7.js} +1 -1
- package/dist/{chunk-H2SD2EA7.js → chunk-UW5QD52P.js} +23 -9
- package/dist/{chunk-A3KUGBDP.js → chunk-VH345O6X.js} +1 -1
- package/dist/{chunk-QYLDCPNG.js → chunk-VJL2BGX2.js} +1 -1
- package/dist/{chunk-BFHBHQFA.js → chunk-VQEZ3ZNK.js} +5 -5
- package/dist/{chunk-T6AUMO5X.js → chunk-W33H7TWW.js} +1 -1
- package/dist/{chunk-ERSFOJGC.js → chunk-W377NZE4.js} +20 -11
- package/dist/{chunk-LCZ55G5G.js → chunk-WCXFNUMD.js} +136 -66
- package/dist/{chunk-WSYKLS2Y.js → chunk-WRA6OO5V.js} +3 -3
- package/dist/{chunk-XP53WEXP.js → chunk-WYHCMHTL.js} +3 -3
- package/dist/{chunk-YIFZZYQD.js → chunk-X2K2LHFO.js} +2 -2
- package/dist/{chunk-PLBDXCYZ.js → chunk-XK7HAEFC.js} +1446 -612
- package/dist/{chunk-DGFIXJ4S.js → chunk-XYJXJWKH.js} +3 -3
- package/dist/{chunk-XC7C3GQ2.js → chunk-YOS4FN26.js} +30 -19
- package/dist/{chunk-NFM6VHL7.js → chunk-YS7VW7KR.js} +1 -1
- package/dist/{chunk-6IBUQBMY.js → chunk-YTPNOTUS.js} +198 -39
- package/dist/{chunk-LOE2N23P.js → chunk-ZR57QAJ2.js} +1 -1
- package/dist/{chunk-4Z47UMMM.js → chunk-ZU2UK4BC.js} +23 -23
- package/dist/{cleanup-graph-garbage-MX5JDTJA.js → cleanup-graph-garbage-5KI4MSDC.js} +4 -4
- package/dist/{co-activation-K44LGZ7A.js → co-activation-JRDKF2M3.js} +2 -2
- package/dist/{co-occurrence-N62HJTRP.js → co-occurrence-JGFIAEKR.js} +2 -2
- package/dist/{code-context-index-6YQ3DGCN.js → code-context-index-NODPVXHC.js} +3 -3
- package/dist/{crdt-sync-BO76VVRX.js → crdt-sync-NOWBFD5N.js} +1 -1
- package/dist/{crm-bridge-BVTB6LZK.js → crm-bridge-CZLEW2LW.js} +1 -1
- package/dist/{crm-webhook-UZLTHXAS.js → crm-webhook-FXSSAHON.js} +2 -2
- package/dist/{cto-delegation-gate-NVMRONA2.js → cto-delegation-gate-J6DDJFAB.js} +19 -12
- package/dist/{daemon-orchestration-JI3RD5EZ.js → daemon-orchestration-HIZMZ2Y5.js} +31 -16
- package/dist/{db-backup-ITRADB2J.js → db-backup-I5GQBRIG.js} +1 -1
- package/dist/{doc-graph-extractor-L7YESUSI.js → doc-graph-extractor-TAZHM63R.js} +2 -2
- package/dist/{documents-7BFXA6V3.js → documents-XXOQ5QIJ.js} +10 -10
- package/dist/{dreaming-NRTMPNPZ.js → dreaming-V275C7L2.js} +20 -13
- package/dist/{exe-drift-GLJIM7EI.js → exe-drift-VOJZYOIO.js} +3 -3
- package/dist/{exe-export-THIAYHXK.js → exe-export-EDQDGZV3.js} +6 -6
- package/dist/{exe-import-3Y4VOUYL.js → exe-import-DV7GKBZD.js} +6 -6
- package/dist/{exe-key-IPGY4RMU.js → exe-key-6SLYWY36.js} +77 -74
- package/dist/{exe-snapshot-2ZEWCDYK.js → exe-snapshot-TDQI34DW.js} +23 -16
- package/dist/{fast-db-init-TLYUWCDE.js → fast-db-init-SNHHRW3L.js} +1 -1
- package/dist/{founder-context-J362DNU4.js → founder-context-UZVRU4HI.js} +2 -2
- package/dist/gateway/index.js +12 -12
- package/dist/{git-staleness-BRDHTHNS.js → git-staleness-TRCX6FVG.js} +2 -2
- package/dist/{global-procedures-FNUKY2LF.js → global-procedures-LH4JG3CR.js} +3 -3
- package/dist/{graph-auto-extract-AJZUV3PO.js → graph-auto-extract-YTXHYR35.js} +2 -2
- package/dist/hooks/bug-report-worker.js +22 -15
- package/dist/hooks/codex-stop-task-finalizer.js +22 -15
- package/dist/hooks/commit-complete.js +22 -15
- package/dist/hooks/error-recall.js +6 -6
- package/dist/hooks/exe-heartbeat-hook.js +3 -3
- package/dist/hooks/ingest-worker.js +6 -6
- package/dist/hooks/ingest.js +6 -6
- package/dist/hooks/instructions-loaded.js +4 -4
- package/dist/hooks/manifest.json +20 -20
- package/dist/hooks/notification.js +4 -4
- package/dist/hooks/post-compact.js +21 -14
- package/dist/hooks/post-tool-combined.js +8 -8
- package/dist/hooks/pre-compact.js +22 -21
- package/dist/hooks/pre-tool-use.js +29 -19
- package/dist/hooks/prompt-submit.js +89 -72
- package/dist/hooks/session-end.js +27 -26
- package/dist/hooks/session-start.js +13 -13
- package/dist/hooks/stop.js +28 -21
- package/dist/hooks/subagent-stop.js +24 -41
- package/dist/hooks/summary-worker.js +27 -25
- package/dist/index.js +30 -23
- package/dist/{installer-SC7CQBYY.js → installer-U7D3PAR5.js} +5 -5
- package/dist/{installer-2EKTDQZB.js → installer-W4SHZFOR.js} +5 -5
- package/dist/{installer-UEF44TWQ.js → installer-WHO23TIO.js} +5 -5
- package/dist/intercom-queue-2XB622OR.js +53 -0
- package/dist/lib/agent-config.js +7 -1
- package/dist/lib/cloud-sync.js +16 -14
- package/dist/lib/consolidation.js +5 -5
- package/dist/lib/database.js +10 -2
- package/dist/lib/db-daemon-client.js +3 -3
- package/dist/lib/db.js +10 -2
- package/dist/lib/device-registry.js +1 -1
- package/dist/lib/embed-worker.js +28 -0
- package/dist/lib/embedder.js +3 -3
- package/dist/lib/employee-templates.js +4 -4
- package/dist/lib/employees.js +2 -2
- package/dist/lib/exe-daemon-client.js +2 -2
- package/dist/lib/exe-daemon.js +319 -129
- package/dist/lib/hybrid-search.js +5 -5
- package/dist/lib/identity.js +2 -2
- package/dist/lib/license.js +2 -2
- package/dist/lib/messaging.js +20 -13
- package/dist/lib/registry-proxy.js +1 -1
- package/dist/lib/reminders.js +3 -3
- package/dist/lib/schedules.js +5 -5
- package/dist/lib/session-registry.js +4 -4
- package/dist/lib/skill-learning.js +6 -6
- package/dist/lib/store.js +4 -4
- package/dist/lib/task-router.js +3 -3
- package/dist/lib/tasks.js +21 -14
- package/dist/lib/tmux-routing.js +27 -12
- package/dist/lib/token-spend.js +3 -3
- package/dist/{license-gate-YUUSIPJ7.js → license-gate-7CYKGRXW.js} +3 -3
- package/dist/{license-sync-LX73IEBH.js → license-sync-H4TVZ7PR.js} +2 -2
- package/dist/mcp/register-tools.js +74 -71
- package/dist/mcp/server.js +98 -132
- package/dist/mcp/tools/complete-reminder.js +4 -4
- package/dist/mcp/tools/create-reminder.js +4 -4
- package/dist/mcp/tools/create-task.js +37 -18
- package/dist/mcp/tools/deactivate-behavior.js +7 -7
- package/dist/mcp/tools/list-reminders.js +4 -4
- package/dist/mcp/tools/list-tasks.js +23 -16
- package/dist/mcp/tools/send-message.js +22 -15
- package/dist/mcp/tools/update-task.js +22 -15
- package/dist/{mcp-http-config-MBG5AQNH.js → mcp-http-config-LEBUOECG.js} +3 -3
- package/dist/{memory-cards-MGZ4P3AA.js → memory-cards-47XM3VWW.js} +4 -4
- package/dist/{memory-graph-extractor-44P2ATID.js → memory-graph-extractor-COD5E52L.js} +3 -3
- package/dist/{memory-poisoning-defense-3CYFKNLA.js → memory-poisoning-defense-SBYOEXT3.js} +2 -2
- package/dist/{memory-pressure-watchdog-6PFLEOUO.js → memory-pressure-watchdog-T276SDOR.js} +20 -13
- package/dist/{memory-queue-client-BZD6MXA5.js → memory-queue-client-IQ52W7W4.js} +3 -3
- package/dist/{memory-reflection-AYPJRPU7.js → memory-reflection-UZK5MHG2.js} +7 -9
- package/dist/{notifications-BBQ23ORD.js → notifications-O5DH4O35.js} +19 -12
- package/dist/{orchestration-events-O5P5NEKS.js → orchestration-events-65YDDRF4.js} +3 -3
- package/dist/{orchestrator-SERM6FDY.js → orchestrator-NHMTDGWJ.js} +21 -14
- package/dist/{pipeline-router-T673WGL3.js → pipeline-router-2KJQDX5O.js} +3 -3
- package/dist/{plan-limits-QWBN2EKH.js → plan-limits-NQQN5C4S.js} +5 -5
- package/dist/{projection-worker-K6TILAZH.js → projection-worker-IUCBINZH.js} +12 -2
- package/dist/{prospective-memory-XRNRMEDL.js → prospective-memory-U2TISMIW.js} +2 -2
- package/dist/{reranker-3XC5UM4F.js → reranker-D6NSD5A3.js} +1 -1
- package/dist/{retrieval-health-ULVVOIPL.js → retrieval-health-LBNMCYNF.js} +1 -1
- package/dist/{review-polling-5YGDPJUX.js → review-polling-ZJWELHBP.js} +20 -13
- package/dist/runtime/index.js +23 -16
- package/dist/{session-events-D52HNUJK.js → session-events-GRHFFRZV.js} +20 -13
- package/dist/{session-kill-telemetry-IBNCJSI7.js → session-kill-telemetry-ALV4KMWS.js} +20 -13
- package/dist/{session-scope-5FWZ4AYR.js → session-scope-JB5TBNCX.js} +19 -12
- package/dist/{setup-wizard-KVTLSSRD.js → setup-wizard-5STOE3PS.js} +1 -1
- package/dist/signal-paths-4G53QTII.js +11 -0
- package/dist/skill-refinement-JB2LRDLS.js +20 -0
- package/dist/{stack-update-OWWGTYRB.js → stack-update-ZG4YS7WS.js} +9 -3
- package/dist/{steward-gate-3ZITRYVH.js → steward-gate-TE63SGPL.js} +3 -3
- package/dist/{support-outbox-QPQQK7F7.js → support-outbox-MGUVVGHT.js} +96 -44
- package/dist/sweep-budget-WB2FKPYN.js +64 -0
- package/dist/{task-enforcement-L4YTDOOX.js → task-enforcement-72WZMQGC.js} +191 -17
- package/dist/{task-scope-OIHLMQOQ.js → task-scope-FLDBFGWR.js} +25 -12
- package/dist/{tasks-crud-QUIIRWE3.js → tasks-crud-DKOSSXTD.js} +23 -12
- package/dist/{tasks-notify-ANYLB5GU.js → tasks-notify-WEWKM6B3.js} +20 -13
- package/dist/{tasks-review-BWSCXFMB.js → tasks-review-MHCL7PNP.js} +27 -14
- package/dist/{telemetry-upload-XLDBCD7B.js → telemetry-upload-K2MZ4O6U.js} +7 -7
- package/dist/{token-budget-OQCLPV3A.js → token-budget-MZZ5DLOH.js} +3 -3
- package/dist/{tool-capability-index-3UWKZZED.js → tool-capability-index-M3FUNMFF.js} +1 -1
- package/dist/{tool-telemetry-AQTFWOWG.js → tool-telemetry-ERE5FRVC.js} +1 -1
- package/dist/tui/App.js +27 -20
- package/dist/{tui-data-3Y5L5LJB.js → tui-data-JDBTFDAF.js} +19 -12
- package/dist/{worker-gate-WJS2MFNA.js → worker-gate-3OR47E4T.js} +1 -1
- package/dist/{workflow-engine-EPPZ226V.js → workflow-engine-JLVEE2CI.js} +2 -2
- package/dist/{worktree-OYGDGJP7.js → worktree-WLPHLZ2S.js} +4 -4
- package/dist/{worktree-sweep-KV4H4766.js → worktree-sweep-S6AYDLAQ.js} +5 -5
- package/package.json +3 -3
- package/release-notes.json +51 -19
- package/dist/chunk-4FVVJ7ME.js +0 -193
- package/dist/completion-nudge-dedup-DBZF24MM.js +0 -74
- package/dist/git-task-sweep-7GVUKDBW.js +0 -47
- package/dist/intercom-queue-6M5IRX3Y.js +0 -17
- /package/dist/{chunk-SJZT66LM.js → chunk-2G75BF5J.js} +0 -0
- /package/dist/{chunk-SIJSFULW.js → chunk-6IJ47YFD.js} +0 -0
- /package/dist/{chunk-72LWCZTJ.js → chunk-AI3BK3JD.js} +0 -0
- /package/dist/{chunk-Q5YKWFVO.js → chunk-B2ONIFHD.js} +0 -0
- /package/dist/{chunk-DY3J6GQO.js → chunk-FU767JXE.js} +0 -0
- /package/dist/{chunk-ZU6767WK.js → chunk-HWVEDRZA.js} +0 -0
- /package/dist/{chunk-WXRVHXVP.js → chunk-MV5OSOP4.js} +0 -0
- /package/dist/{chunk-DQJ3WZRK.js → chunk-RYZR4NNE.js} +0 -0
- /package/dist/{chunk-RRQI5PSJ.js → chunk-SSM2JHQ4.js} +0 -0
- /package/dist/{chunk-IZY6V4FI.js → chunk-TVY65H23.js} +0 -0
- /package/dist/{chunk-QTEHH4LG.js → chunk-VW326Q5R.js} +0 -0
- /package/dist/{core-memory-DARTILJG.js → core-memory-4AZ2CSQZ.js} +0 -0
- /package/dist/{entity-boost-VR5YOQCT.js → entity-boost-WV4GGNN2.js} +0 -0
- /package/dist/{message-queue-client-HVFR67QH.js → message-queue-client-JZ7TIOTZ.js} +0 -0
- /package/dist/{oauth-server-UQHCFVHT.js → oauth-server-LUJ5P2BH.js} +0 -0
- /package/dist/{project-boot-22ZZL2GE.js → project-boot-TOFNGMHM.js} +0 -0
- /package/dist/{wiki-acl-EZMGL6KW.js → wiki-acl-3JA23DH3.js} +0 -0
|
@@ -1,46 +1,53 @@
|
|
|
1
1
|
import {
|
|
2
2
|
lightweightSearch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZU2UK4BC.js";
|
|
4
4
|
import "./chunk-AB4PAQYK.js";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-UW5QD52P.js";
|
|
6
6
|
import "./chunk-CHCA3ZM2.js";
|
|
7
7
|
import "./chunk-OTVEIJUQ.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-6IJ47YFD.js";
|
|
9
9
|
import "./chunk-Y25OJWOQ.js";
|
|
10
10
|
import {
|
|
11
11
|
sessionScopeFilter,
|
|
12
12
|
strictSessionScopeFilter
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-XK7HAEFC.js";
|
|
14
|
+
import "./chunk-3LZILUET.js";
|
|
15
|
+
import "./chunk-BKOGHVRO.js";
|
|
16
|
+
import "./chunk-U3VSCPGX.js";
|
|
17
|
+
import "./chunk-EIKATSE4.js";
|
|
17
18
|
import "./chunk-E23LNUWJ.js";
|
|
18
19
|
import "./chunk-4JERP7NT.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-3CT3GN2B.js";
|
|
20
21
|
import "./chunk-SSTLTIF3.js";
|
|
21
22
|
import "./chunk-RMOBQ6A5.js";
|
|
22
23
|
import "./chunk-54QCG45Y.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-364VBQIC.js";
|
|
25
|
+
import "./chunk-FROUDYRT.js";
|
|
25
26
|
import "./chunk-NGP6LSV2.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-GHARDROH.js";
|
|
27
28
|
import "./chunk-CVYC6DUW.js";
|
|
29
|
+
import "./chunk-W33H7TWW.js";
|
|
30
|
+
import "./chunk-HCJCW7X4.js";
|
|
28
31
|
import "./chunk-OPU3NYOO.js";
|
|
32
|
+
import "./chunk-UPLY33F7.js";
|
|
33
|
+
import "./chunk-AFNRE2RV.js";
|
|
34
|
+
import "./chunk-3NGZ4PL7.js";
|
|
35
|
+
import "./chunk-NLEW62VC.js";
|
|
29
36
|
import "./chunk-HYZV25LY.js";
|
|
30
37
|
import "./chunk-GJV3WDWM.js";
|
|
31
38
|
import "./chunk-MP2AFCGL.js";
|
|
32
39
|
import {
|
|
33
40
|
getClient
|
|
34
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-46AMZT3C.js";
|
|
35
42
|
import "./chunk-2I23RPSI.js";
|
|
36
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-MV5OSOP4.js";
|
|
37
44
|
import "./chunk-PNQDP3OA.js";
|
|
38
45
|
import "./chunk-H73TUI4Y.js";
|
|
39
46
|
import "./chunk-7HLWBYH7.js";
|
|
40
47
|
import "./chunk-FXU7JOXK.js";
|
|
41
48
|
import "./chunk-Z42MXYWW.js";
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
49
|
+
import "./chunk-L5TUAHLX.js";
|
|
50
|
+
import "./chunk-RYZR4NNE.js";
|
|
44
51
|
import "./chunk-7Y5UDEVM.js";
|
|
45
52
|
import "./chunk-SHIICYJW.js";
|
|
46
53
|
import "./chunk-MLKGABMK.js";
|
|
@@ -149,7 +156,7 @@ ${msgLines}`);
|
|
|
149
156
|
} catch {
|
|
150
157
|
}
|
|
151
158
|
try {
|
|
152
|
-
const { getPendingProspective, markSurfaced } = await import("./prospective-memory-
|
|
159
|
+
const { getPendingProspective, markSurfaced } = await import("./prospective-memory-U2TISMIW.js");
|
|
153
160
|
const due = await getPendingProspective(agentId, { projectName, limit: 5 });
|
|
154
161
|
if (due.length > 0) {
|
|
155
162
|
const now = Date.now();
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-CLAYNAXC.js";
|
|
4
4
|
import {
|
|
5
5
|
buildClaudeHttpMcpEntry
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EZHNCIO5.js";
|
|
7
7
|
import {
|
|
8
8
|
EXE_HOOKS,
|
|
9
9
|
isLegacyHomeDirHookCommand,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-L3TB7CC3.js";
|
|
12
12
|
import {
|
|
13
13
|
ensureAllAgentSymlinks
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3LZILUET.js";
|
|
15
15
|
import {
|
|
16
16
|
MCP_LEGACY_KEY,
|
|
17
17
|
MCP_PRIMARY_KEY
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sessionScopeFilter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XK7HAEFC.js";
|
|
4
4
|
|
|
5
5
|
// src/lib/git-task-sweep.ts
|
|
6
6
|
import { execSync } from "child_process";
|
|
@@ -238,7 +238,7 @@ async function sweepTasks(projectName, options = {}) {
|
|
|
238
238
|
}
|
|
239
239
|
if (!dryRun) {
|
|
240
240
|
try {
|
|
241
|
-
const { updateTaskStatus } = await import("./tasks-crud-
|
|
241
|
+
const { updateTaskStatus } = await import("./tasks-crud-DKOSSXTD.js");
|
|
242
242
|
await updateTaskStatus({
|
|
243
243
|
taskId: task.id,
|
|
244
244
|
status: "needs_review",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
routeTask
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SAUO2ZLB.js";
|
|
4
4
|
import {
|
|
5
5
|
createTaskCore,
|
|
6
6
|
employeeSessionName,
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
isEmployeeAlive,
|
|
10
10
|
sessionScopeFilter,
|
|
11
11
|
updateTaskStatus
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-XK7HAEFC.js";
|
|
13
13
|
import {
|
|
14
14
|
DEFAULT_COORDINATOR_TEMPLATE_NAME,
|
|
15
15
|
getCoordinatorName
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-46AMZT3C.js";
|
|
17
17
|
|
|
18
18
|
// src/runtime/orchestrator.ts
|
|
19
19
|
var STALE_THRESHOLD_MS = 2 * 60 * 60 * 1e3;
|
|
@@ -191,8 +191,8 @@ ${task.context}`,
|
|
|
191
191
|
});
|
|
192
192
|
} catch {
|
|
193
193
|
await client.execute({
|
|
194
|
-
sql: `UPDATE tasks SET status = '
|
|
195
|
-
args: [`[auto-approved] ${item.result}`, item.taskId]
|
|
194
|
+
sql: `UPDATE tasks SET status = 'needs_review', result = ?, updated_at = ? WHERE id = ?`,
|
|
195
|
+
args: [`[auto-approved] ${item.result}`, (/* @__PURE__ */ new Date()).toISOString(), item.taskId]
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
198
|
autoApproved.push(item);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mcpHttpPort
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EZHNCIO5.js";
|
|
4
4
|
import {
|
|
5
5
|
checkCpuStealSync
|
|
6
6
|
} from "./chunk-SSC7EKY2.js";
|
|
@@ -12,18 +12,15 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
readMcpHttpEvents,
|
|
14
14
|
summarizeMcpTransport
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5RACW3LX.js";
|
|
16
16
|
import {
|
|
17
17
|
EXE_AI_DIR
|
|
18
18
|
} from "./chunk-7Y5UDEVM.js";
|
|
19
|
-
import {
|
|
20
|
-
isMainModule
|
|
21
|
-
} from "./chunk-6Y4B3QF6.js";
|
|
22
19
|
|
|
23
20
|
// src/bin/exe-healthcheck.ts
|
|
24
21
|
import { existsSync, readFileSync, readdirSync } from "fs";
|
|
25
22
|
import path from "path";
|
|
26
|
-
import { execSync } from "child_process";
|
|
23
|
+
import { execSync, spawnSync } from "child_process";
|
|
27
24
|
import { fileURLToPath } from "url";
|
|
28
25
|
var CC_NATIVE_ONLY_CUTOFF2 = CC_NATIVE_ONLY_CUTOFF;
|
|
29
26
|
var compareSemver2 = compareSemver;
|
|
@@ -532,6 +529,46 @@ function checkRetrievalHealth() {
|
|
|
532
529
|
}
|
|
533
530
|
return results;
|
|
534
531
|
}
|
|
532
|
+
var HEALTHCHECK_CHILD_ENV = "EXE_HEALTHCHECK_CHILD";
|
|
533
|
+
var DEFAULT_HEALTHCHECK_TIMEOUT_MS = 3e4;
|
|
534
|
+
function healthcheckTimeoutMs() {
|
|
535
|
+
const raw = Number(process.env.EXE_HEALTHCHECK_TIMEOUT_MS);
|
|
536
|
+
return Number.isFinite(raw) && raw > 0 ? raw : DEFAULT_HEALTHCHECK_TIMEOUT_MS;
|
|
537
|
+
}
|
|
538
|
+
function resolveHealthcheckScript() {
|
|
539
|
+
try {
|
|
540
|
+
const built = path.join(findPackageRoot(), "dist", "bin", "exe-healthcheck.js");
|
|
541
|
+
if (existsSync(built)) return built;
|
|
542
|
+
} catch {
|
|
543
|
+
}
|
|
544
|
+
return fileURLToPath(import.meta.url);
|
|
545
|
+
}
|
|
546
|
+
function runHealthCheckWithDeadline(opts = {}) {
|
|
547
|
+
const timeoutMs = opts.timeoutMs ?? healthcheckTimeoutMs();
|
|
548
|
+
const scriptPath = opts.scriptPath ?? resolveHealthcheckScript();
|
|
549
|
+
const r = spawnSync(process.execPath, [scriptPath], {
|
|
550
|
+
stdio: "inherit",
|
|
551
|
+
timeout: timeoutMs,
|
|
552
|
+
killSignal: "SIGKILL",
|
|
553
|
+
env: { ...process.env, [HEALTHCHECK_CHILD_ENV]: "1" }
|
|
554
|
+
});
|
|
555
|
+
const timedOut = r.error?.code === "ETIMEDOUT" || r.signal != null;
|
|
556
|
+
if (timedOut) {
|
|
557
|
+
console.error(
|
|
558
|
+
`healthcheck timed out after ${Math.round(timeoutMs / 1e3)}s \u2014 daemon unresponsive`
|
|
559
|
+
);
|
|
560
|
+
return { code: 2, timedOut: true };
|
|
561
|
+
}
|
|
562
|
+
return { code: r.status ?? 2, timedOut: false };
|
|
563
|
+
}
|
|
564
|
+
function armHealthcheckDeadline(timeoutMs = healthcheckTimeoutMs()) {
|
|
565
|
+
return setTimeout(() => {
|
|
566
|
+
console.error(
|
|
567
|
+
`healthcheck timed out after ${Math.round(timeoutMs / 1e3)}s \u2014 daemon unresponsive`
|
|
568
|
+
);
|
|
569
|
+
process.exit(2);
|
|
570
|
+
}, timeoutMs);
|
|
571
|
+
}
|
|
535
572
|
function runHealthCheck() {
|
|
536
573
|
const pkgRoot = findPackageRoot();
|
|
537
574
|
const results = [
|
|
@@ -548,7 +585,12 @@ function runHealthCheck() {
|
|
|
548
585
|
const failed = results.filter((r) => !r.pass).length;
|
|
549
586
|
return { results, passed, failed };
|
|
550
587
|
}
|
|
551
|
-
if (
|
|
588
|
+
if ((process.argv[1] ?? "").includes("exe-healthcheck")) {
|
|
589
|
+
if (process.env[HEALTHCHECK_CHILD_ENV] !== "1") {
|
|
590
|
+
const { code } = runHealthCheckWithDeadline();
|
|
591
|
+
process.exit(code);
|
|
592
|
+
}
|
|
593
|
+
armHealthcheckDeadline();
|
|
552
594
|
const { results, passed, failed } = runHealthCheck();
|
|
553
595
|
console.log("\n exe-os Health Check\n");
|
|
554
596
|
for (const r of results) {
|
|
@@ -569,5 +611,10 @@ export {
|
|
|
569
611
|
checkClaudeCodeInstall,
|
|
570
612
|
checkCpuSteal,
|
|
571
613
|
checkRetrievalHealth,
|
|
614
|
+
HEALTHCHECK_CHILD_ENV,
|
|
615
|
+
DEFAULT_HEALTHCHECK_TIMEOUT_MS,
|
|
616
|
+
healthcheckTimeoutMs,
|
|
617
|
+
runHealthCheckWithDeadline,
|
|
618
|
+
armHealthcheckDeadline,
|
|
572
619
|
runHealthCheck
|
|
573
620
|
};
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-2I23RPSI.js";
|
|
4
4
|
import {
|
|
5
5
|
listBackups
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MV5OSOP4.js";
|
|
7
7
|
import {
|
|
8
8
|
getEmotionalBaseline,
|
|
9
9
|
renderEmotionalBaselineSection
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
} from "./chunk-SHIICYJW.js";
|
|
27
27
|
|
|
28
28
|
// src/lib/database.ts
|
|
29
|
-
import { chmodSync, existsSync as existsSync3, statSync, copyFileSync, unlinkSync as unlinkSync2, openSync, closeSync, mkdirSync as mkdirSync2, renameSync as renameSync2 } from "fs";
|
|
29
|
+
import { chmodSync, existsSync as existsSync3, statSync, copyFileSync, unlinkSync as unlinkSync2, openSync, closeSync, mkdirSync as mkdirSync2, renameSync as renameSync2, readFileSync as readFileSync3, writeSync, fsyncSync } from "fs";
|
|
30
30
|
import { createClient } from "@libsql/client";
|
|
31
31
|
import { homedir, totalmem } from "os";
|
|
32
32
|
import { join } from "path";
|
|
@@ -1119,7 +1119,7 @@ async function migrateReflectionDedup(client) {
|
|
|
1119
1119
|
"ALTER TABLE memory_reflections ADD COLUMN dedup_key TEXT",
|
|
1120
1120
|
"migration add memory_reflections.dedup_key"
|
|
1121
1121
|
);
|
|
1122
|
-
const { reflectionDedupKey } = await import("./memory-reflection-
|
|
1122
|
+
const { reflectionDedupKey } = await import("./memory-reflection-UZK5MHG2.js");
|
|
1123
1123
|
const keyForRow = (row) => {
|
|
1124
1124
|
let sources = [];
|
|
1125
1125
|
try {
|
|
@@ -1199,29 +1199,111 @@ var _checkpointInProgress = false;
|
|
|
1199
1199
|
var _daemonClient = null;
|
|
1200
1200
|
var _adapterClient = null;
|
|
1201
1201
|
var _lockFd = null;
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1202
|
+
function dbLockPath() {
|
|
1203
|
+
return process.env.EXE_DB_LOCK_PATH ?? join(homedir(), ".exe-os", "db.lock");
|
|
1204
|
+
}
|
|
1205
|
+
function dbLockWaitMs() {
|
|
1206
|
+
const raw = Number(process.env.EXE_DB_LOCK_WAIT_MS);
|
|
1207
|
+
return Number.isFinite(raw) && raw > 0 ? raw : 15e3;
|
|
1208
|
+
}
|
|
1209
|
+
var DB_LOCK_STALE_MS = 6e4;
|
|
1210
|
+
var DbLockHeldError = class extends Error {
|
|
1211
|
+
constructor(holderPid, waitedMs) {
|
|
1212
|
+
super(
|
|
1213
|
+
`[database] db.lock is held by a live process${holderPid ? ` (pid ${holderPid})` : ""} after waiting ${waitedMs}ms \u2014 refusing to open the database with a second writer. Retry once the other exe-os process finishes initializing.`
|
|
1214
|
+
);
|
|
1215
|
+
this.name = "DbLockHeldError";
|
|
1216
|
+
}
|
|
1217
|
+
};
|
|
1218
|
+
function readLockHolderPid(lockPath) {
|
|
1219
|
+
try {
|
|
1220
|
+
const pid = parseInt(readFileSync3(lockPath, "utf8").trim(), 10);
|
|
1221
|
+
return Number.isInteger(pid) && pid > 0 ? pid : null;
|
|
1222
|
+
} catch {
|
|
1223
|
+
return null;
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
function pidIsAlive(pid) {
|
|
1205
1227
|
try {
|
|
1206
|
-
|
|
1228
|
+
process.kill(pid, 0);
|
|
1229
|
+
return true;
|
|
1207
1230
|
} catch (err) {
|
|
1208
|
-
|
|
1231
|
+
return err.code === "EPERM";
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
function tryTakeLock(lockPath) {
|
|
1235
|
+
_lockFd = openSync(lockPath, "wx");
|
|
1236
|
+
try {
|
|
1237
|
+
writeSync(_lockFd, `${process.pid}
|
|
1238
|
+
`);
|
|
1239
|
+
fsyncSync(_lockFd);
|
|
1240
|
+
} catch (e) {
|
|
1241
|
+
logCatchDebug("lock pid write", e);
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
async function acquireDbLock(options = {}) {
|
|
1245
|
+
const lockPath = dbLockPath();
|
|
1246
|
+
const waitMs = options.waitMs ?? dbLockWaitMs();
|
|
1247
|
+
const role = options.role ?? (process.env.EXE_IS_DAEMON === "1" ? "daemon" : "cli");
|
|
1248
|
+
const exit = options.exit ?? ((code) => process.exit(code));
|
|
1249
|
+
const isAlive = options.isPidAlive ?? pidIsAlive;
|
|
1250
|
+
mkdirSync2(join(lockPath, ".."), { recursive: true });
|
|
1251
|
+
const start = Date.now();
|
|
1252
|
+
let backoffMs = options.initialBackoffMs ?? 100;
|
|
1253
|
+
let warned = false;
|
|
1254
|
+
for (; ; ) {
|
|
1255
|
+
try {
|
|
1256
|
+
tryTakeLock(lockPath);
|
|
1257
|
+
return;
|
|
1258
|
+
} catch (err) {
|
|
1259
|
+
if (!(err && typeof err === "object" && "code" in err && err.code === "EEXIST")) {
|
|
1260
|
+
throw err;
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
const holderPid = readLockHolderPid(lockPath);
|
|
1264
|
+
let stale = false;
|
|
1265
|
+
if (holderPid !== null) {
|
|
1266
|
+
stale = !isAlive(holderPid);
|
|
1267
|
+
} else {
|
|
1209
1268
|
try {
|
|
1210
|
-
|
|
1211
|
-
if (Date.now() - lockStat.mtimeMs > 6e4) {
|
|
1212
|
-
unlinkSync2(DB_LOCK_PATH);
|
|
1213
|
-
_lockFd = openSync(DB_LOCK_PATH, "wx");
|
|
1214
|
-
return;
|
|
1215
|
-
}
|
|
1269
|
+
stale = Date.now() - statSync(lockPath).mtimeMs > DB_LOCK_STALE_MS;
|
|
1216
1270
|
} catch (e) {
|
|
1217
1271
|
logCatchDebug("stale lock check", e);
|
|
1272
|
+
continue;
|
|
1218
1273
|
}
|
|
1274
|
+
}
|
|
1275
|
+
if (stale) {
|
|
1219
1276
|
process.stderr.write(
|
|
1220
|
-
|
|
1277
|
+
`[database] db.lock is stale (holder ${holderPid !== null ? `pid ${holderPid} is dead` : "unknown, lock older than 60s"}) \u2014 breaking lock.
|
|
1278
|
+
`
|
|
1221
1279
|
);
|
|
1222
|
-
|
|
1280
|
+
try {
|
|
1281
|
+
unlinkSync2(lockPath);
|
|
1282
|
+
} catch (e) {
|
|
1283
|
+
logCatchDebug("stale lock unlink", e);
|
|
1284
|
+
}
|
|
1285
|
+
continue;
|
|
1223
1286
|
}
|
|
1224
|
-
|
|
1287
|
+
const waited = Date.now() - start;
|
|
1288
|
+
if (waited >= waitMs) {
|
|
1289
|
+
if (role === "daemon") {
|
|
1290
|
+
process.stderr.write(
|
|
1291
|
+
`[database] FATAL: db.lock held by live pid ${holderPid ?? "?"} after ${waited}ms \u2014 another exe-os process is writing this database. Exiting to preserve the single-writer guarantee; launchd will relaunch this daemon.
|
|
1292
|
+
`
|
|
1293
|
+
);
|
|
1294
|
+
return exit(1);
|
|
1295
|
+
}
|
|
1296
|
+
throw new DbLockHeldError(holderPid, waited);
|
|
1297
|
+
}
|
|
1298
|
+
if (!warned) {
|
|
1299
|
+
warned = true;
|
|
1300
|
+
process.stderr.write(
|
|
1301
|
+
`[database] db.lock held by ${holderPid ? `pid ${holderPid}` : "another process"} \u2014 retrying with backoff for up to ${waitMs}ms.
|
|
1302
|
+
`
|
|
1303
|
+
);
|
|
1304
|
+
}
|
|
1305
|
+
await new Promise((resolve) => setTimeout(resolve, Math.min(backoffMs, waitMs - waited)));
|
|
1306
|
+
backoffMs = Math.min(backoffMs * 2, 1e3);
|
|
1225
1307
|
}
|
|
1226
1308
|
}
|
|
1227
1309
|
function releaseDbLock() {
|
|
@@ -1232,11 +1314,11 @@ function releaseDbLock() {
|
|
|
1232
1314
|
logCatchDebug("lock close", e);
|
|
1233
1315
|
}
|
|
1234
1316
|
_lockFd = null;
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1317
|
+
try {
|
|
1318
|
+
unlinkSync2(dbLockPath());
|
|
1319
|
+
} catch (e) {
|
|
1320
|
+
logCatchDebug("lock unlink", e);
|
|
1321
|
+
}
|
|
1240
1322
|
}
|
|
1241
1323
|
}
|
|
1242
1324
|
var CORRUPTION_ERROR_RE = /malformed|disk image|sqlite_corrupt|database is corrupt|corrupt(ed)? (database|page|index)|btree/i;
|
|
@@ -1368,7 +1450,7 @@ async function _attemptBackupRestore(config) {
|
|
|
1368
1450
|
} catch {
|
|
1369
1451
|
}
|
|
1370
1452
|
try {
|
|
1371
|
-
const { pruneCorruptQuarantine } = await import("./db-backup-
|
|
1453
|
+
const { pruneCorruptQuarantine } = await import("./db-backup-I5GQBRIG.js");
|
|
1372
1454
|
pruneCorruptQuarantine();
|
|
1373
1455
|
} catch {
|
|
1374
1456
|
}
|
|
@@ -1479,7 +1561,7 @@ async function optimizeFtsIndexes(client = getRawClient(), pages = FTS_MERGE_PAG
|
|
|
1479
1561
|
var initTurso = initDatabase;
|
|
1480
1562
|
async function initDatabase(config) {
|
|
1481
1563
|
assertValidDbPath(config?.dbPath, "initDatabase");
|
|
1482
|
-
acquireDbLock();
|
|
1564
|
+
await acquireDbLock();
|
|
1483
1565
|
if (existsSync3(config.dbPath)) {
|
|
1484
1566
|
const dbStat = statSync(config.dbPath);
|
|
1485
1567
|
if (dbStat.size === 0) {
|
|
@@ -3669,6 +3751,10 @@ async function disposeDatabase() {
|
|
|
3669
3751
|
}
|
|
3670
3752
|
|
|
3671
3753
|
export {
|
|
3754
|
+
dbLockWaitMs,
|
|
3755
|
+
DbLockHeldError,
|
|
3756
|
+
acquireDbLock,
|
|
3757
|
+
releaseDbLock,
|
|
3672
3758
|
WAL_ESCALATION_THRESHOLD_BYTES,
|
|
3673
3759
|
checkpointWalIfLarge,
|
|
3674
3760
|
runWalCheckpoint,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
embed
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KIXTW4VH.js";
|
|
4
4
|
import {
|
|
5
5
|
reserveVersions,
|
|
6
6
|
vectorToBlob
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UW5QD52P.js";
|
|
8
8
|
import {
|
|
9
9
|
getClient
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-46AMZT3C.js";
|
|
11
11
|
|
|
12
12
|
// src/lib/documents.ts
|
|
13
13
|
import crypto from "crypto";
|
|
@@ -270,7 +270,7 @@ async function ingestDocument(input) {
|
|
|
270
270
|
await client.batch([documentStmt, ...chunkStmts], "write");
|
|
271
271
|
const embedded = vectors.filter((v) => v !== null).length;
|
|
272
272
|
const originalTexts = input.chunks.map((c) => c.text);
|
|
273
|
-
import("./doc-graph-extractor-
|
|
273
|
+
import("./doc-graph-extractor-TAZHM63R.js").then(
|
|
274
274
|
({ extractAndStoreDocumentGraph }) => extractAndStoreDocumentGraph(documentId, originalTexts)
|
|
275
275
|
).catch((err) => {
|
|
276
276
|
process.stderr.write(
|
|
@@ -13,6 +13,12 @@ var DEFAULT_EVENT_READ_BYTES = 256 * 1024;
|
|
|
13
13
|
var DEFAULT_EVENT_MAX_BYTES = 1024 * 1024;
|
|
14
14
|
var EVENT_READ_BYTES = parsePositiveInt(process.env.EXE_MCP_HTTP_EVENT_READ_BYTES, DEFAULT_EVENT_READ_BYTES);
|
|
15
15
|
var EVENT_MAX_BYTES = parsePositiveInt(process.env.EXE_MCP_HTTP_EVENT_MAX_BYTES, DEFAULT_EVENT_MAX_BYTES);
|
|
16
|
+
var SUMMARY_REFRESH_MIN_MS = parsePositiveInt(process.env.EXE_MCP_TRANSPORT_SUMMARY_REFRESH_MS, 1e3);
|
|
17
|
+
var ROTATE_CHECK_MIN_MS = parsePositiveInt(process.env.EXE_MCP_TRANSPORT_ROTATE_CHECK_MS, 1e3);
|
|
18
|
+
var mcpEventDirReady = false;
|
|
19
|
+
var mcpSummaryRefreshTimer = null;
|
|
20
|
+
var lastMcpSummaryRefreshAt = 0;
|
|
21
|
+
var lastMcpRotateCheckAt = 0;
|
|
16
22
|
function parsePositiveInt(value, fallback) {
|
|
17
23
|
if (!value) return fallback;
|
|
18
24
|
const parsed = Number.parseInt(value, 10);
|
|
@@ -193,6 +199,18 @@ function writeMcpTransportSummary(events) {
|
|
|
193
199
|
} catch {
|
|
194
200
|
}
|
|
195
201
|
}
|
|
202
|
+
function refreshMcpTransportSummaryNow() {
|
|
203
|
+
lastMcpSummaryRefreshAt = Date.now();
|
|
204
|
+
mcpSummaryRefreshTimer = null;
|
|
205
|
+
writeMcpTransportSummary(readMcpHttpEvents());
|
|
206
|
+
}
|
|
207
|
+
function scheduleMcpTransportSummaryRefresh() {
|
|
208
|
+
if (mcpSummaryRefreshTimer) return;
|
|
209
|
+
const elapsed = Date.now() - lastMcpSummaryRefreshAt;
|
|
210
|
+
const delay = Math.max(0, SUMMARY_REFRESH_MIN_MS - elapsed);
|
|
211
|
+
mcpSummaryRefreshTimer = setTimeout(refreshMcpTransportSummaryNow, delay);
|
|
212
|
+
mcpSummaryRefreshTimer.unref?.();
|
|
213
|
+
}
|
|
196
214
|
var EXTERNAL_MCP_PREFIXES = [
|
|
197
215
|
{ prefix: "mcp__claude_ai_Gmail__", label: "Gmail" },
|
|
198
216
|
{ prefix: "mcp__claude_ai_Google_Calendar__", label: "Google Calendar" },
|
|
@@ -316,11 +334,18 @@ function detectDcrIncompatibleConnectorsFromDisk(homeDir) {
|
|
|
316
334
|
}
|
|
317
335
|
function recordMcpHttpEvent(event) {
|
|
318
336
|
try {
|
|
319
|
-
|
|
337
|
+
if (!mcpEventDirReady) {
|
|
338
|
+
mkdirSync(EXE_AI_DIR, { recursive: true });
|
|
339
|
+
mcpEventDirReady = true;
|
|
340
|
+
}
|
|
320
341
|
const enriched = { timestamp: (/* @__PURE__ */ new Date()).toISOString(), ...event };
|
|
321
342
|
appendFileSync(MCP_HTTP_EVENTS_PATH, JSON.stringify(enriched) + "\n");
|
|
322
|
-
|
|
323
|
-
|
|
343
|
+
const now = Date.now();
|
|
344
|
+
if (now - lastMcpRotateCheckAt >= ROTATE_CHECK_MIN_MS) {
|
|
345
|
+
lastMcpRotateCheckAt = now;
|
|
346
|
+
rotateMcpHttpEventLogIfNeeded();
|
|
347
|
+
}
|
|
348
|
+
scheduleMcpTransportSummaryRefresh();
|
|
324
349
|
} catch {
|
|
325
350
|
}
|
|
326
351
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// src/lib/transcript-sidechain.ts
|
|
2
|
+
import { readFileSync } from "fs";
|
|
3
|
+
function isSidechainTranscript(transcriptPath) {
|
|
4
|
+
if (!transcriptPath) return false;
|
|
5
|
+
let raw;
|
|
6
|
+
try {
|
|
7
|
+
raw = readFileSync(transcriptPath, "utf8");
|
|
8
|
+
} catch {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
const lines = raw.split("\n");
|
|
12
|
+
for (let i = lines.length - 1; i >= 0; i--) {
|
|
13
|
+
const line = lines[i]?.trim();
|
|
14
|
+
if (!line) continue;
|
|
15
|
+
let obj;
|
|
16
|
+
try {
|
|
17
|
+
obj = JSON.parse(line);
|
|
18
|
+
} catch {
|
|
19
|
+
continue;
|
|
20
|
+
}
|
|
21
|
+
if (typeof obj.isSidechain === "boolean") {
|
|
22
|
+
return obj.isSidechain;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
function resolveSidechainAgentIdentity(parent, transcriptPath, env = process.env) {
|
|
28
|
+
if (!isSidechainTranscript(transcriptPath)) return parent;
|
|
29
|
+
const rawType = (env.EXE_AGENT_TYPE ?? env.CLAUDE_SUBAGENT_TYPE ?? env.AGENT_TYPE ?? "subagent").trim();
|
|
30
|
+
const agentType = rawType.length > 0 ? rawType : "subagent";
|
|
31
|
+
return {
|
|
32
|
+
agentId: `subagent:${agentType}`,
|
|
33
|
+
agentRole: agentType
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export {
|
|
38
|
+
isSidechainTranscript,
|
|
39
|
+
resolveSidechainAgentIdentity
|
|
40
|
+
};
|