@askexenow/exe-os 0.9.357 → 0.9.359
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/stack-manifests/v0.9.json +3 -3
- package/dist/.dist-verified.json +6 -0
- package/dist/{active-agent-PYMOMGQ7.js → active-agent-DMKNHGSG.js} +6 -4
- package/dist/{active-agent-LCRV3HVS.js → active-agent-Y3DCBD7J.js} +6 -4
- package/dist/{agentic-ontology-TNKI4FOM.js → agentic-ontology-3233PNKV.js} +1 -1
- package/dist/{backfill-metadata-SFS4ARNR.js → backfill-metadata-4DS4A5U3.js} +8 -6
- package/dist/{backup-verify-7NLKR4S6.js → backup-verify-JNYKXIU2.js} +6 -1
- package/dist/{behavior-injection-OT7VX7M6.js → behavior-injection-CGAMI552.js} +10 -8
- package/dist/{behaviors-6GW5AFG4.js → behaviors-57AMN5IP.js} +9 -7
- package/dist/bin/agentic-ontology-backfill.js +9 -7
- package/dist/bin/agentic-reflection-backfill.js +10 -8
- package/dist/bin/agentic-semantic-label.js +9 -7
- package/dist/bin/backfill-conversations.js +8 -6
- package/dist/bin/backfill-responses.js +8 -6
- package/dist/bin/backfill-vectors.js +9 -7
- package/dist/bin/bulk-sync-postgres.js +18 -14
- package/dist/bin/cc-doctor.js +7 -5
- package/dist/bin/cleanup-stale-review-tasks.js +16 -14
- package/dist/bin/cli.js +19 -19
- package/dist/bin/deferred-daemon-restart.js +81 -77
- package/dist/bin/exe-agent-config.js +5 -3
- package/dist/bin/exe-agent.js +14 -12
- package/dist/bin/exe-assign.js +9 -7
- package/dist/bin/exe-boot.js +62 -28
- package/dist/bin/exe-call.js +8 -6
- package/dist/bin/exe-cloud.js +20 -16
- package/dist/bin/exe-config-dump.js +5 -3
- package/dist/bin/exe-dispatch.js +16 -14
- package/dist/bin/exe-doctor.js +9 -6
- package/dist/bin/exe-export-behaviors.js +11 -9
- package/dist/bin/exe-forget.js +10 -8
- package/dist/bin/exe-gateway.js +10 -8
- package/dist/bin/exe-grant.js +17 -4
- package/dist/bin/exe-healthcheck.js +7 -5
- package/dist/bin/exe-heartbeat.js +18 -16
- package/dist/bin/exe-kill.js +20 -18
- package/dist/bin/exe-launch-agent.js +27 -25
- package/dist/bin/exe-memory-reads.js +8 -6
- package/dist/bin/exe-new-employee.js +12 -10
- package/dist/bin/exe-os-mcp-proxy.js +6 -4
- package/dist/bin/exe-pending-messages.js +17 -15
- package/dist/bin/exe-pending-notifications.js +16 -14
- package/dist/bin/exe-pending-reviews.js +16 -14
- package/dist/bin/exe-rename.js +8 -6
- package/dist/bin/exe-review.js +19 -17
- package/dist/bin/exe-search.js +9 -7
- package/dist/bin/exe-session-cleanup.js +20 -18
- package/dist/bin/exe-settings.js +18 -14
- package/dist/bin/exe-start-codex.js +16 -14
- package/dist/bin/exe-start-opencode.js +12 -10
- package/dist/bin/exe-status.js +17 -15
- package/dist/bin/exe-support.js +3 -3
- package/dist/bin/exe-team.js +6 -4
- package/dist/bin/exe-timers.js +2 -1
- package/dist/bin/git-sweep.js +17 -15
- package/dist/bin/graph-backfill.js +10 -8
- package/dist/bin/graph-export.js +9 -7
- package/dist/bin/import-history.js +13 -11
- package/dist/bin/install.js +83 -79
- package/dist/bin/intercom-check.js +4 -4
- package/dist/bin/mcp-sessions.js +2 -2
- package/dist/bin/orchestration-metrics.js +7 -5
- package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
- package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
- package/dist/bin/pre-publish.js +1 -1
- package/dist/bin/reconcile-backlog.js +2 -2
- package/dist/bin/registry-proxy.js +1 -1
- package/dist/bin/scan-tasks.js +16 -14
- package/dist/bin/setup.js +1 -1
- package/dist/bin/shard-migrate.js +9 -7
- package/dist/bin/stack-update.js +4 -4
- package/dist/bin/vps-health-gate.js +1 -1
- package/dist/{boot-generation-7ZI7JYGR.js → boot-generation-4D3CTT7X.js} +6 -4
- package/dist/{boot-review-sections-3MSXM6V7.js → boot-review-sections-NDFE5443.js} +15 -13
- package/dist/build-manifest.json +2961 -0
- package/dist/{capability-cards-4RD2SB2K.js → capability-cards-OBB7BMMX.js} +5 -3
- package/dist/{capacity-monitor-5XUR3JTN.js → capacity-monitor-QLPEL6S5.js} +17 -15
- package/dist/{catchup-brief-AYJWMQUZ.js → catchup-brief-EN7QR6MP.js} +20 -18
- package/dist/{chunk-ZMVVKOOS.js → chunk-2EAYZ3BK.js} +7 -7
- package/dist/{chunk-4KCLB4TY.js → chunk-2KLVTRY2.js} +1 -1
- package/dist/{chunk-4VU2VCEU.js → chunk-2OVTGZYH.js} +1 -1
- package/dist/{chunk-5Q2J6P4T.js → chunk-2YGAKBRG.js} +3 -3
- package/dist/{chunk-2TL5RKMC.js → chunk-3BAGFZFN.js} +1 -1
- package/dist/{chunk-PM4TIRCR.js → chunk-3ODATKWH.js} +1 -1
- package/dist/{chunk-RUBXKPOT.js → chunk-3ZEVMZ4G.js} +1 -1
- package/dist/{chunk-H4ZSOAP6.js → chunk-44WFVMZ5.js} +1 -1
- package/dist/{chunk-Y4JA5V22.js → chunk-46RPEWTH.js} +1 -1
- package/dist/{chunk-EHL4RCND.js → chunk-4DYJ6NOK.js} +6 -5
- package/dist/{chunk-ZWXSO4FN.js → chunk-4FQIWAXA.js} +9 -9
- package/dist/{chunk-YG4LS7TI.js → chunk-4WSUP4CC.js} +8 -8
- package/dist/{chunk-EWOMZLR6.js → chunk-57GRYGDU.js} +1 -1
- package/dist/{chunk-VCKIV5WG.js → chunk-5I3YC7ER.js} +2 -2
- package/dist/{chunk-UQCYG6EI.js → chunk-5UAMBMNR.js} +1 -1
- package/dist/chunk-5YEUPUV4.js +53 -0
- package/dist/{chunk-34MIJGQS.js → chunk-6EOLGE7T.js} +1 -1
- package/dist/{chunk-AWB7M62V.js → chunk-6KREY2Q7.js} +4 -4
- package/dist/{chunk-FWJFKWYA.js → chunk-6LY3QSJA.js} +2 -2
- package/dist/{chunk-7FKC2TIB.js → chunk-6SK4MM5B.js} +1 -1
- package/dist/{chunk-P7EUKYSQ.js → chunk-6WHYSLGF.js} +1 -1
- package/dist/{chunk-YSUHXDQU.js → chunk-74R44E4S.js} +21 -19
- package/dist/{chunk-DF5K4JJL.js → chunk-A5WEEND7.js} +3 -3
- package/dist/{chunk-OBWTTM7E.js → chunk-AL7JMA54.js} +2 -2
- package/dist/{chunk-JZXHLDQN.js → chunk-APR556TY.js} +1 -1
- package/dist/{chunk-G2MXTLOD.js → chunk-C5YZMYQH.js} +1 -1
- package/dist/{chunk-X7CWCQ5S.js → chunk-CAEWPEBA.js} +1 -1
- package/dist/{chunk-SFSB64NK.js → chunk-DKRSKC5R.js} +1 -1
- package/dist/{chunk-IIHFSNL4.js → chunk-DQ75MEPU.js} +1 -1
- package/dist/{chunk-H4IZKSOY.js → chunk-DWKH2H7W.js} +1 -1
- package/dist/{chunk-M5DPPJLS.js → chunk-EA5FVACM.js} +39 -7
- package/dist/{chunk-S3THSOWV.js → chunk-EUQF3JOH.js} +28 -100
- package/dist/{chunk-2LM5GO5R.js → chunk-EX2SSLNU.js} +5 -5
- package/dist/{chunk-4GGP4Q5N.js → chunk-F3QTF4T7.js} +2 -2
- package/dist/{chunk-EQQYCP6D.js → chunk-FASR2WLT.js} +1 -1
- package/dist/{chunk-NT4GET5B.js → chunk-G2KK64UB.js} +4 -4
- package/dist/{chunk-ABM3DZF3.js → chunk-G37RG543.js} +1 -1
- package/dist/{chunk-AW3WT3TJ.js → chunk-GD7VXXW6.js} +141 -140
- package/dist/{chunk-IT4TFJTK.js → chunk-GSVQBBE5.js} +3 -3
- package/dist/{chunk-LVZZ7YS3.js → chunk-HK7SQDKJ.js} +5 -5
- package/dist/chunk-HKK7LLS5.js +408 -0
- package/dist/{chunk-W3IXTUCL.js → chunk-HLEZ5O5P.js} +77 -37
- package/dist/{chunk-A5P2MMII.js → chunk-HNPHPGGF.js} +2 -2
- package/dist/{chunk-QGLAMWQJ.js → chunk-HPHF5VTT.js} +3 -3
- package/dist/{chunk-IO5FR7BZ.js → chunk-IQWAYXVF.js} +3 -3
- package/dist/{chunk-PNTRRXAN.js → chunk-JBAMYKBL.js} +1 -1
- package/dist/{chunk-2WWGTOVP.js → chunk-JE34CB5H.js} +19 -1
- package/dist/{chunk-APRVAUOR.js → chunk-JY5GAZYC.js} +1 -0
- package/dist/{chunk-PUAA3P47.js → chunk-KIXNMTGC.js} +4 -4
- package/dist/{chunk-ES4XE6AU.js → chunk-LPKTGK7L.js} +4 -4
- package/dist/{chunk-KT4RUFYO.js → chunk-LRETL4I3.js} +3 -3
- package/dist/{chunk-JO6TS75M.js → chunk-LXG37RB2.js} +1 -1
- package/dist/{chunk-CI3YVCUY.js → chunk-MCNDZU5W.js} +1 -1
- package/dist/{chunk-JLXJMDKG.js → chunk-NE57GONM.js} +1 -1
- package/dist/{chunk-72GUU6Z4.js → chunk-NKDKB2RT.js} +3 -3
- package/dist/{chunk-KP3PLOGC.js → chunk-NP2Y7P3I.js} +2 -2
- package/dist/{chunk-ES6PDSEK.js → chunk-OAYTQ4RY.js} +8 -8
- package/dist/{chunk-Z5DTZ464.js → chunk-OIS5VIAH.js} +6 -0
- package/dist/{chunk-VPMAC5VB.js → chunk-OY2PWHYR.js} +1 -1
- package/dist/{chunk-YQ7IZPVC.js → chunk-PDRIIEFV.js} +1 -1
- package/dist/{chunk-W3REQ37P.js → chunk-PLOEFBFW.js} +2 -2
- package/dist/{chunk-X4EDW3FH.js → chunk-POZGQQEZ.js} +1 -1
- package/dist/{chunk-AJGTBW3N.js → chunk-QH2XAUZ5.js} +1 -1
- package/dist/{chunk-6CZXY5BD.js → chunk-QROIFRKI.js} +5 -5
- package/dist/{chunk-P2Y6S53G.js → chunk-R6LNQAUG.js} +1 -1
- package/dist/{chunk-JKOEOHOD.js → chunk-R7F6HKTH.js} +6 -21
- package/dist/{chunk-6WAJJN5W.js → chunk-RFUTLZ2U.js} +3 -3
- package/dist/{chunk-CQPFNVWY.js → chunk-RJ67HG2P.js} +3 -3
- package/dist/{chunk-6H4ZEU7P.js → chunk-SHEWTDPC.js} +4 -4
- package/dist/{chunk-XPGUSSG7.js → chunk-SIGAQQHW.js} +1 -1
- package/dist/{chunk-PUNCHUEX.js → chunk-SNWV44E5.js} +3 -3
- package/dist/{chunk-WJIGSNJM.js → chunk-SQBNN44X.js} +12 -12
- package/dist/{chunk-6UTP7AIH.js → chunk-STFR72YH.js} +1 -1
- package/dist/chunk-TWMWHDOY.js +79 -0
- package/dist/{chunk-RZSPCNLY.js → chunk-UZ5RJYL3.js} +1 -1
- package/dist/chunk-V3W3SATA.js +135 -0
- package/dist/{chunk-WL3CT5KX.js → chunk-VCCZQDCU.js} +2 -2
- package/dist/{chunk-VU2MZ7BP.js → chunk-VNK3MNZE.js} +40 -3
- package/dist/{chunk-MVYB76QG.js → chunk-VRTCVZND.js} +16 -20
- package/dist/{chunk-UEXJYSJX.js → chunk-VXL7PJ56.js} +39 -2
- package/dist/{chunk-4OMIENRX.js → chunk-VY5VU7SX.js} +1 -1
- package/dist/{chunk-JUE37LOD.js → chunk-W3XUU36X.js} +4 -4
- package/dist/{chunk-WHQYVFE2.js → chunk-W5YV2PZE.js} +22 -15
- package/dist/{chunk-DZNXWCJN.js → chunk-WA2MJGPT.js} +1 -1
- package/dist/{chunk-LDRMNJJJ.js → chunk-WCP4OQUL.js} +2 -2
- package/dist/{chunk-25X4JD2V.js → chunk-WDA2KAV7.js} +20 -3
- package/dist/{chunk-YNYISUMW.js → chunk-WRP5AG4D.js} +1 -1
- package/dist/{chunk-HAOZB4W6.js → chunk-X2F6Q7TW.js} +1 -1
- package/dist/{chunk-TQ4O5A4S.js → chunk-XV42EAVK.js} +1 -1
- package/dist/{chunk-TAR5J7WI.js → chunk-XVTKJEI2.js} +4 -4
- package/dist/{chunk-XQAELSOQ.js → chunk-XWWNRFRF.js} +2 -2
- package/dist/{chunk-6SAQSXT2.js → chunk-YKRNH5LU.js} +1 -1
- package/dist/{chunk-QXAE6S3A.js → chunk-YMCIZCNK.js} +3 -3
- package/dist/chunk-YQGMSXT5.js +33 -0
- package/dist/{chunk-LLXYWNCH.js → chunk-Z2PAVJJ4.js} +1 -1
- package/dist/{cleanup-graph-garbage-XUNHVCRR.js → cleanup-graph-garbage-XFGY4EEE.js} +11 -9
- package/dist/{cloud-sync-shutdown-JRAERBUO.js → cloud-sync-shutdown-XCOATIJW.js} +5 -3
- package/dist/{co-activation-5AN2CF23.js → co-activation-XNBLOGK3.js} +5 -3
- package/dist/{co-occurrence-A7E774ZX.js → co-occurrence-HO4PGQC4.js} +9 -7
- package/dist/{conversation-entity-extractor-2XI2GC4N.js → conversation-entity-extractor-5G5DGRJU.js} +4 -4
- package/dist/{crdt-sync-2IUU6GZ6.js → crdt-sync-6TD7LSZW.js} +3 -2
- package/dist/{crm-webhook-BQCP77TI.js → crm-webhook-WZAV5776.js} +2 -2
- package/dist/{cto-delegation-gate-UHHNMWCL.js → cto-delegation-gate-UHMYFM4D.js} +15 -13
- package/dist/{daemon-orchestration-7WS3X5DQ.js → daemon-orchestration-DT5M2ZAR.js} +20 -19
- package/dist/{daemon-ready-signal-TVCPSG7J.js → daemon-ready-signal-CKXPUMJ2.js} +3 -1
- package/dist/{daemon-restart-report-QDRGKLL6.js → daemon-restart-report-HZU5LWXN.js} +2 -1
- package/dist/{daemon-timer-report-NM44WQRH.js → daemon-timer-report-TNJH5SFY.js} +2 -1
- package/dist/{doc-graph-extractor-NFERAJNP.js → doc-graph-extractor-FNCYPFKY.js} +9 -7
- package/dist/{documents-SW2MJUXY.js → documents-GKDZDUED.js} +9 -7
- package/dist/{dreaming-KSNJVNFH.js → dreaming-WPMQJAXW.js} +19 -17
- package/dist/{exe-drift-NBLYKQBQ.js → exe-drift-QTKD2FHT.js} +6 -4
- package/dist/{exe-export-44IWTJHL.js → exe-export-ESJ6KP6J.js} +11 -9
- package/dist/{exe-import-PPECH3KO.js → exe-import-N4X3GEQB.js} +11 -9
- package/dist/{exe-key-ZCRJQYA7.js → exe-key-KZCCHX3W.js} +84 -77
- package/dist/{exe-snapshot-OVINJ6MC.js → exe-snapshot-SCRPHCPZ.js} +20 -18
- package/dist/{fast-db-init-B5Q3SJQG.js → fast-db-init-6H67K76Q.js} +1 -1
- package/dist/{founder-context-5OFTZNDO.js → founder-context-C7X7IRDA.js} +2 -2
- package/dist/founder-monitor-envelope-DHSUMBWU.js +83 -0
- package/dist/gateway/index.js +11 -9
- package/dist/{git-staleness-XQJTOSGZ.js → git-staleness-JCKVMWPO.js} +5 -3
- package/dist/{global-procedures-YCJ3JPAP.js → global-procedures-BR7WGSE7.js} +7 -5
- package/dist/{graph-auto-extract-XJN6PQH3.js → graph-auto-extract-EOXWQRBZ.js} +9 -7
- package/dist/{graph-rag-HCQCZ2W7.js → graph-rag-5FVC5JXH.js} +4 -4
- package/dist/{hook-prefetch-FKXDTCDS.js → hook-prefetch-2CN3MK4H.js} +16 -14
- package/dist/hooks/bug-report-worker.js +18 -16
- package/dist/hooks/codex-stop-task-finalizer.js +19 -17
- package/dist/hooks/commit-complete.js +18 -16
- package/dist/hooks/error-recall.js +10 -8
- package/dist/hooks/exe-heartbeat-hook.js +6 -4
- package/dist/hooks/ingest.js +14 -102
- package/dist/hooks/instructions-loaded.js +7 -5
- package/dist/hooks/manifest.json +19 -19
- package/dist/hooks/notification.js +7 -5
- package/dist/hooks/post-compact.js +17 -15
- package/dist/hooks/post-tool-combined.js +10 -10
- package/dist/hooks/pre-compact.js +18 -16
- package/dist/hooks/pre-tool-use.js +23 -21
- package/dist/hooks/prompt-submit.js +34 -38
- package/dist/hooks/session-end.js +22 -20
- package/dist/hooks/session-start.js +13 -18
- package/dist/hooks/stop.js +21 -19
- package/dist/hooks/subagent-stop.js +19 -17
- package/dist/hooks/summary-worker.js +22 -25
- package/dist/index.js +25 -23
- package/dist/{installer-YSCUE6MT.js → installer-7UV3CNWZ.js} +8 -6
- package/dist/{installer-YTT5OSRL.js → installer-VPNTM3X6.js} +8 -6
- package/dist/{installer-G3DVMNC6.js → installer-YDLSXGD2.js} +8 -6
- package/dist/{intercom-queue-5D52JF3Q.js → intercom-queue-KHKJJYCQ.js} +15 -13
- package/dist/lib/cloud-sync.js +18 -14
- package/dist/lib/consolidation.js +11 -9
- package/dist/lib/crypto.js +2 -1
- package/dist/lib/database.js +9 -3
- package/dist/lib/db-backup.js +1 -1
- package/dist/lib/db-checkpoint-worker.js +4 -0
- package/dist/lib/db-daemon-client.js +3 -1
- package/dist/lib/db-read-worker.js +4 -0
- package/dist/lib/db-write-worker.js +3 -3
- package/dist/lib/db.js +9 -3
- package/dist/lib/device-registry.js +1 -1
- package/dist/lib/employee-templates.js +8 -6
- package/dist/lib/employees.js +5 -3
- package/dist/lib/exe-daemon.js +202 -93
- package/dist/lib/hybrid-search.js +9 -7
- package/dist/lib/identity.js +5 -3
- package/dist/lib/license.js +2 -2
- package/dist/lib/messaging.js +16 -14
- package/dist/lib/registry-proxy.js +1 -1
- package/dist/lib/reminders.js +6 -4
- package/dist/lib/schedules.js +9 -7
- package/dist/lib/session-registry.js +7 -5
- package/dist/lib/skill-learning.js +10 -8
- package/dist/lib/store.js +8 -6
- package/dist/lib/task-router.js +6 -4
- package/dist/lib/tasks.js +17 -15
- package/dist/lib/tmux-routing.js +15 -13
- package/dist/lib/token-spend.js +8 -4
- package/dist/{license-gate-DKYHCAMN.js → license-gate-YXUSNA2I.js} +3 -3
- package/dist/{license-sync-JVEXPDHN.js → license-sync-XFDOXL3Z.js} +2 -2
- package/dist/mcp/register-tools.js +80 -76
- package/dist/mcp/server.js +81 -77
- package/dist/mcp/tools/complete-reminder.js +7 -5
- package/dist/mcp/tools/create-reminder.js +7 -5
- package/dist/mcp/tools/create-task.js +19 -17
- package/dist/mcp/tools/deactivate-behavior.js +11 -9
- package/dist/mcp/tools/list-reminders.js +7 -5
- package/dist/mcp/tools/list-tasks.js +19 -17
- package/dist/mcp/tools/send-message.js +18 -16
- package/dist/mcp/tools/update-task.js +18 -16
- package/dist/{mcp-health-WDOB6XUB.js → mcp-health-HNVSWKFA.js} +6 -1
- package/dist/{mcp-http-config-L5RDDU6P.js → mcp-http-config-HIP5CEDV.js} +6 -4
- package/dist/{mcp-session-identity-S6UCHBER.js → mcp-session-identity-RTNZ2ZLW.js} +15 -13
- package/dist/{memory-cards-65RGFT5M.js → memory-cards-KG4TPNKK.js} +8 -6
- package/dist/{memory-graph-extractor-ZDZ5VQUX.js → memory-graph-extractor-6HTBLO2N.js} +10 -8
- package/dist/{memory-poisoning-defense-EQUQNXRE.js → memory-poisoning-defense-3ZT57RSJ.js} +5 -3
- package/dist/{memory-pressure-watchdog-CC344JBH.js → memory-pressure-watchdog-ZOZBIMKC.js} +16 -14
- package/dist/{memory-reflection-Q4OT4V55.js → memory-reflection-EQC4FXSW.js} +5 -3
- package/dist/{monitor-grants-NWSQ7ZCQ.js → monitor-grants-BDLVFVDR.js} +3 -1
- package/dist/{notification-ledger-GL3ZPZNR.js → notification-ledger-NZ4HO3M5.js} +16 -14
- package/dist/{notifications-FGYNO2FY.js → notifications-74YECZ4V.js} +15 -13
- package/dist/{orchestration-events-N5FQ4SKU.js → orchestration-events-KRQI4ED5.js} +6 -4
- package/dist/{orchestrator-XUJDK4EW.js → orchestrator-WV2YCHTK.js} +17 -15
- package/dist/org-membership-B32NS5NI.js +34 -0
- package/dist/{pipeline-router-YQOZ4M62.js → pipeline-router-6ZZV7JMA.js} +6 -4
- package/dist/{plan-limits-VBHKYKSK.js → plan-limits-B7AZKZ6U.js} +8 -6
- package/dist/{platform-procedures-F3XB6WWM.js → platform-procedures-2VQGBJU7.js} +1 -1
- package/dist/{projection-worker-NJUNGEXE.js → projection-worker-LRFFQ6JB.js} +2 -2
- package/dist/{prospective-memory-3MKUPDVI.js → prospective-memory-A4GDTIWG.js} +5 -3
- package/dist/{reranker-LGSIL6TX.js → reranker-YVTLJCFC.js} +1 -1
- package/dist/{retrieval-health-AEEQ5IO6.js → retrieval-health-PK2ODTXM.js} +1 -1
- package/dist/{review-polling-2RMEZ5QO.js → review-polling-JFWRNQF6.js} +16 -14
- package/dist/runtime/index.js +19 -17
- package/dist/{session-events-5XSYCV4I.js → session-events-VMQBCUH3.js} +16 -14
- package/dist/{session-kill-telemetry-QJUHG3IG.js → session-kill-telemetry-Z3W256T5.js} +16 -14
- package/dist/{session-scope-LIJ746K2.js → session-scope-2ADEVY3C.js} +15 -13
- package/dist/{setup-wizard-RLUCGGA7.js → setup-wizard-26B36FMC.js} +1 -1
- package/dist/{shard-manager-3L2NMJVJ.js → shard-manager-DFLCDZT5.js} +2 -1
- package/dist/{skill-refinement-FMN3WFSG.js → skill-refinement-APBYOSGX.js} +6 -4
- package/dist/{stack-promote-BGDGAYKG.js → stack-promote-SZYIPTFT.js} +29 -4
- package/dist/{stack-release-SOIHMI3I.js → stack-release-EYRDEGPD.js} +4 -4
- package/dist/{stack-update-AXFHJRK5.js → stack-update-YWK2YXP6.js} +3 -3
- package/dist/{steward-gate-R2XWABMV.js → steward-gate-CIOBPNX6.js} +6 -4
- package/dist/{support-inbox-IITW66TG.js → support-inbox-OAWGFRKW.js} +3 -3
- package/dist/{support-outbox-WHGPUYL2.js → support-outbox-DSWU3IXH.js} +1 -1
- package/dist/{task-enforcement-SFZGBY27.js → task-enforcement-YAU6ZGDC.js} +16 -14
- package/dist/{task-scope-74ZIFQRH.js → task-scope-44N7XP5N.js} +15 -13
- package/dist/{tasks-crud-N54JZCXU.js → tasks-crud-IWVDREXG.js} +15 -13
- package/dist/{tasks-notify-62IJZW55.js → tasks-notify-WK5HA77D.js} +16 -14
- package/dist/{tasks-review-3LHBE6ZJ.js → tasks-review-VDFWFETP.js} +15 -13
- package/dist/{telemetry-upload-HR3QIWZV.js → telemetry-upload-3X5ESEKM.js} +20 -180
- package/dist/{token-budget-DBXHLCMN.js → token-budget-WZGO22ME.js} +6 -4
- package/dist/{tool-telemetry-UFUTCNE3.js → tool-telemetry-F7RWUNVK.js} +1 -1
- package/dist/tui/App.js +24 -22
- package/dist/{tui-data-BPXEJKRQ.js → tui-data-KT7YGVQS.js} +15 -13
- package/dist/{update-support-HLZ7KMVM.js → update-support-ZVRMECNQ.js} +13 -11
- package/dist/{work-state-heartbeat-IQI3LCHN.js → work-state-heartbeat-CA4CN7DQ.js} +1 -1
- package/dist/{worker-gate-5ABYGLC2.js → worker-gate-52MVKYGZ.js} +1 -1
- package/dist/{workflow-engine-XSUWZK6I.js → workflow-engine-ZAFBPVUP.js} +2 -2
- package/dist/{worktree-EUYBBABA.js → worktree-NNVXVV6A.js} +7 -5
- package/dist/{worktree-sweep-LSKFA2PK.js → worktree-sweep-IM2ZQG6Z.js} +8 -6
- package/package.json +14 -4
- package/release-notes.json +34 -30
- package/dist/chunk-7HLWBYH7.js +0 -60
- /package/dist/{chunk-AK77MITT.js → chunk-6JTKIXLU.js} +0 -0
- /package/dist/{chunk-HABPXFHZ.js → chunk-BGYCUZYK.js} +0 -0
- /package/dist/{chunk-GVU3BW6N.js → chunk-COHHVCFA.js} +0 -0
- /package/dist/{chunk-VML2UQK7.js → chunk-FVWI2AR4.js} +0 -0
- /package/dist/{chunk-2267TRAO.js → chunk-R62ITJDQ.js} +0 -0
- /package/dist/{chunk-HMBMHZ3S.js → chunk-U7RZIY74.js} +0 -0
- /package/dist/{chunk-7GOSAV25.js → chunk-XLEYCOHX.js} +0 -0
- /package/dist/{chunk-A627QFOE.js → chunk-YBX3G5OP.js} +0 -0
- /package/dist/{chunk-IHKRHGKT.js → chunk-ZMYXQU4L.js} +0 -0
- /package/dist/{core-memory-KXE4QMOA.js → core-memory-AATZRQEY.js} +0 -0
- /package/dist/{memory-isolation-VSKUKTN4.js → memory-isolation-CF6FYSXD.js} +0 -0
- /package/dist/{oauth-server-JELOVN5D.js → oauth-server-VE5ELXTF.js} +0 -0
- /package/dist/{project-boot-LQ4CF6BI.js → project-boot-WEQSKDD7.js} +0 -0
- /package/dist/{wiki-acl-VR4AFJ3T.js → wiki-acl-GNIXYWHJ.js} +0 -0
|
@@ -263,7 +263,7 @@ async function runRegistryProxy(options = registryProxyOptionsFromEnv()) {
|
|
|
263
263
|
await new Promise((resolve) => server.listen(options.port, options.host, resolve));
|
|
264
264
|
console.log(`exe-registry-proxy listening on ${options.host ?? "0.0.0.0"}:${options.port}`);
|
|
265
265
|
console.log(`proxying /v2/${options.allowedNamespace ?? "askexe"}/* -> ${options.upstream ?? "https://ghcr.io"}`);
|
|
266
|
-
const { licenseSyncConfigFromEnv, startLicenseSyncScheduler } = await import("./license-sync-
|
|
266
|
+
const { licenseSyncConfigFromEnv, startLicenseSyncScheduler } = await import("./license-sync-XFDOXL3Z.js");
|
|
267
267
|
const syncConfig = licenseSyncConfigFromEnv();
|
|
268
268
|
if (syncConfig) {
|
|
269
269
|
startLicenseSyncScheduler(syncConfig);
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
recordSessionKill
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XVTKJEI2.js";
|
|
4
4
|
import {
|
|
5
5
|
sessionScopeFilter,
|
|
6
6
|
verifyPaneAtCapacity,
|
|
7
7
|
writeNotification
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-74R44E4S.js";
|
|
9
9
|
import {
|
|
10
10
|
listSessions
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3ODATKWH.js";
|
|
12
12
|
import {
|
|
13
13
|
getTransport
|
|
14
14
|
} from "./chunk-UXLO7VHX.js";
|
|
15
15
|
import {
|
|
16
16
|
recordOrchestrationEventBestEffort
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-POZGQQEZ.js";
|
|
18
18
|
import {
|
|
19
19
|
getClient,
|
|
20
20
|
isCoordinatorName
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-EA5FVACM.js";
|
|
22
22
|
|
|
23
23
|
// src/lib/capacity-monitor.ts
|
|
24
24
|
var CAPACITY_PATTERNS = [
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
filterTimerWakeClusterArtifacts
|
|
3
|
+
} from "./chunk-YQGMSXT5.js";
|
|
4
|
+
|
|
1
5
|
// src/lib/daemon-restart-report.ts
|
|
2
6
|
import { existsSync, readFileSync, statSync, openSync, readSync, closeSync } from "fs";
|
|
3
7
|
import path from "path";
|
|
4
8
|
import os from "os";
|
|
5
|
-
var SUSPEND_CLUSTER_MIN_MS = 6e4;
|
|
6
|
-
var SUSPEND_CLUSTER_WINDOW_MS = 2e3;
|
|
7
|
-
var SUSPEND_CLUSTER_MIN_TIMERS = 2;
|
|
8
9
|
function logDir() {
|
|
9
10
|
return path.join(os.homedir(), ".exe-os", "logs");
|
|
10
11
|
}
|
|
@@ -84,23 +85,6 @@ function parseTsMs(ts) {
|
|
|
84
85
|
const parsed = Date.parse(ts);
|
|
85
86
|
return Number.isFinite(parsed) ? parsed : null;
|
|
86
87
|
}
|
|
87
|
-
function filterTimerSleepArtifacts(samples) {
|
|
88
|
-
const clockClean = samples.filter((sample) => sample.durationMs >= 0);
|
|
89
|
-
const candidates = clockClean.filter((sample) => sample.atMs !== null && sample.durationMs >= SUSPEND_CLUSTER_MIN_MS).sort((a, b) => a.atMs - b.atMs);
|
|
90
|
-
const suspendArtifacts = /* @__PURE__ */ new Set();
|
|
91
|
-
let start = 0;
|
|
92
|
-
for (let end = 0; end < candidates.length; end++) {
|
|
93
|
-
while (candidates[end].atMs - candidates[start].atMs > SUSPEND_CLUSTER_WINDOW_MS) {
|
|
94
|
-
start++;
|
|
95
|
-
}
|
|
96
|
-
const window = candidates.slice(start, end + 1);
|
|
97
|
-
const distinctTimers = new Set(window.map((sample) => sample.timer));
|
|
98
|
-
if (distinctTimers.size >= SUSPEND_CLUSTER_MIN_TIMERS) {
|
|
99
|
-
for (const sample of window) suspendArtifacts.add(sample);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
return clockClean.filter((sample) => !suspendArtifacts.has(sample));
|
|
103
|
-
}
|
|
104
88
|
function maxIso(a, b) {
|
|
105
89
|
if (!b) return a;
|
|
106
90
|
if (!a) return b;
|
|
@@ -153,8 +137,9 @@ function buildRestartReport(opts = {}) {
|
|
|
153
137
|
if (data.clockJump === true || sleptMs > 1e3) continue;
|
|
154
138
|
rawTimerSamples.push({ timer, durationMs, atMs: parseTsMs(rec.ts) });
|
|
155
139
|
}
|
|
140
|
+
const clockCleanTimerSamples = rawTimerSamples.filter((sample) => sample.durationMs >= 0);
|
|
156
141
|
const timerSamples = /* @__PURE__ */ new Map();
|
|
157
|
-
for (const { timer, durationMs } of
|
|
142
|
+
for (const { timer, durationMs } of filterTimerWakeClusterArtifacts(clockCleanTimerSamples)) {
|
|
158
143
|
const arr = timerSamples.get(timer) ?? [];
|
|
159
144
|
arr.push(durationMs);
|
|
160
145
|
timerSamples.set(timer, arr);
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
reserveVersions,
|
|
6
6
|
vectorToBlob
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-W5YV2PZE.js";
|
|
8
8
|
import {
|
|
9
9
|
getClient
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EA5FVACM.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-FNCYPFKY.js").then(
|
|
274
274
|
({ extractAndStoreDocumentGraph }) => extractAndStoreDocumentGraph(documentId, originalTexts)
|
|
275
275
|
).catch((err) => {
|
|
276
276
|
process.stderr.write(
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fastDbInit
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YMCIZCNK.js";
|
|
4
4
|
import {
|
|
5
5
|
sessionScopeFilter
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-74R44E4S.js";
|
|
7
7
|
import {
|
|
8
8
|
formatStatusAll,
|
|
9
9
|
formatStatusDeep,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
getClient,
|
|
15
15
|
isCoordinatorRole,
|
|
16
16
|
loadEmployees
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-EA5FVACM.js";
|
|
18
18
|
import {
|
|
19
19
|
isMainModule
|
|
20
20
|
} from "./chunk-6Y4B3QF6.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
deactivateBehavior
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6LY3QSJA.js";
|
|
4
4
|
import {
|
|
5
5
|
getActiveAgent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WRP5AG4D.js";
|
|
7
7
|
import {
|
|
8
8
|
canCoordinate,
|
|
9
9
|
getClient
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EA5FVACM.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-CIOBPNX6.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) {
|
|
@@ -119,7 +119,7 @@ function releaseBackfillLock() {
|
|
|
119
119
|
}
|
|
120
120
|
async function getTaskAwareCapacity() {
|
|
121
121
|
const { getClient } = await import("./lib/database.js");
|
|
122
|
-
const { sessionScopeFilter } = await import("./task-scope-
|
|
122
|
+
const { sessionScopeFilter } = await import("./task-scope-44N7XP5N.js");
|
|
123
123
|
const client = getClient();
|
|
124
124
|
const scope = sessionScopeFilter();
|
|
125
125
|
const result = await client.execute({
|
|
@@ -4,17 +4,17 @@ import {
|
|
|
4
4
|
resolveExeSession,
|
|
5
5
|
sendIntercom,
|
|
6
6
|
strictSessionScopeFilter
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-74R44E4S.js";
|
|
8
8
|
import {
|
|
9
9
|
parseMessage,
|
|
10
10
|
serializeMessage
|
|
11
11
|
} from "./chunk-4JERP7NT.js";
|
|
12
12
|
import {
|
|
13
13
|
recordOrchestrationEventBestEffort
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-POZGQQEZ.js";
|
|
15
15
|
import {
|
|
16
16
|
getClient
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-EA5FVACM.js";
|
|
18
18
|
|
|
19
19
|
// src/lib/messaging.ts
|
|
20
20
|
import crypto from "crypto";
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isPaneBusy
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-G2KK64UB.js";
|
|
4
4
|
import {
|
|
5
5
|
recordSessionKill
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
eventLoopBlockedMarkerPath
|
|
9
|
-
} from "./chunk-APRVAUOR.js";
|
|
6
|
+
} from "./chunk-XVTKJEI2.js";
|
|
10
7
|
import {
|
|
11
8
|
updateTask
|
|
12
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2EAYZ3BK.js";
|
|
13
10
|
import {
|
|
14
11
|
countPendingReviews,
|
|
15
12
|
ensureEmployeeAsync,
|
|
@@ -25,14 +22,14 @@ import {
|
|
|
25
22
|
sessionScopeFilter,
|
|
26
23
|
strictSessionScopeFilter,
|
|
27
24
|
writeNotification
|
|
28
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-74R44E4S.js";
|
|
29
26
|
import {
|
|
30
27
|
LEASE_MINUTES,
|
|
31
28
|
isLeaseExpired
|
|
32
29
|
} from "./chunk-E23LNUWJ.js";
|
|
33
30
|
import {
|
|
34
31
|
listSessions
|
|
35
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-3ODATKWH.js";
|
|
36
33
|
import {
|
|
37
34
|
getTransport
|
|
38
35
|
} from "./chunk-UXLO7VHX.js";
|
|
@@ -44,7 +41,7 @@ import {
|
|
|
44
41
|
} from "./chunk-SKGMF2SO.js";
|
|
45
42
|
import {
|
|
46
43
|
recordOrchestrationEventBestEffort
|
|
47
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-POZGQQEZ.js";
|
|
48
45
|
import {
|
|
49
46
|
checkDispatchStatus,
|
|
50
47
|
readTerminalLauncherFailure,
|
|
@@ -62,7 +59,10 @@ import {
|
|
|
62
59
|
getCoordinatorName,
|
|
63
60
|
isCoordinatorName,
|
|
64
61
|
shouldAutoInstance
|
|
65
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-EA5FVACM.js";
|
|
63
|
+
import {
|
|
64
|
+
eventLoopBlockedMarkerPath
|
|
65
|
+
} from "./chunk-JY5GAZYC.js";
|
|
66
66
|
import {
|
|
67
67
|
loadConfigSync
|
|
68
68
|
} from "./chunk-BCZF3AGJ.js";
|
|
@@ -3194,7 +3194,7 @@ async function reapOrphanedWorktrees(deps, nowMs = Date.now()) {
|
|
|
3194
3194
|
}
|
|
3195
3195
|
async function createWorktreeReaperRealDeps() {
|
|
3196
3196
|
const { getPaneCwdAsync } = await import("./lib/tmux-status.js");
|
|
3197
|
-
const { getGitRootAsync, isWorktreeDirtyAsync } = await import("./worktree-
|
|
3197
|
+
const { getGitRootAsync, isWorktreeDirtyAsync } = await import("./worktree-NNVXVV6A.js");
|
|
3198
3198
|
const { statSync: statSync3 } = await import("fs");
|
|
3199
3199
|
const { basename: basename2 } = await import("path");
|
|
3200
3200
|
const { promisify: promisify2 } = await import("util");
|
|
@@ -3425,7 +3425,7 @@ async function gcStaleCheckpoints() {
|
|
|
3425
3425
|
}
|
|
3426
3426
|
async function pollTaskGroupBarriers() {
|
|
3427
3427
|
try {
|
|
3428
|
-
const { checkAndFireBarriers } = await import("./tasks-crud-
|
|
3428
|
+
const { checkAndFireBarriers } = await import("./tasks-crud-IWVDREXG.js");
|
|
3429
3429
|
const firedGroupIds = await checkAndFireBarriers();
|
|
3430
3430
|
if (firedGroupIds.length === 0) return 0;
|
|
3431
3431
|
const { getClient } = await import("./lib/database.js");
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// src/internal/sync-key-store.ts
|
|
2
|
+
import crypto from "crypto";
|
|
3
|
+
var ALGORITHM = "aes-256-gcm";
|
|
4
|
+
var IV_LENGTH = 12;
|
|
5
|
+
var TAG_LENGTH = 16;
|
|
6
|
+
var DEK_LENGTH = 32;
|
|
7
|
+
var PK_HASH_LENGTH = 8;
|
|
8
|
+
var X25519_PUB_LENGTH = 32;
|
|
9
|
+
var SYNC_HKDF_INFO = "exe-mem-sync-v2";
|
|
10
|
+
var SYNC_BLOB_VERSION = 1;
|
|
11
|
+
var ENVELOPE_BLOB_VERSION = 2;
|
|
12
|
+
var CURRENT_KEY_ID = 0;
|
|
13
|
+
var VERSIONED_HEADER_LENGTH = 2;
|
|
14
|
+
var RECIPIENT_SYMMETRIC = 0;
|
|
15
|
+
var RECIPIENT_X25519 = 1;
|
|
16
|
+
var SYM_RECIPIENT_LENGTH = 1 + IV_LENGTH + DEK_LENGTH + TAG_LENGTH;
|
|
17
|
+
var X25519_RECIPIENT_LENGTH = 1 + PK_HASH_LENGTH + X25519_PUB_LENGTH + IV_LENGTH + DEK_LENGTH + TAG_LENGTH;
|
|
18
|
+
var _syncKey = null;
|
|
19
|
+
function initSyncKey(masterKey) {
|
|
20
|
+
if (masterKey.length !== 32) {
|
|
21
|
+
throw new Error(`Master key must be 32 bytes, got ${masterKey.length}`);
|
|
22
|
+
}
|
|
23
|
+
_syncKey = Buffer.from(crypto.hkdfSync("sha256", masterKey, "", SYNC_HKDF_INFO, 32));
|
|
24
|
+
}
|
|
25
|
+
function isSyncKeyInitialized() {
|
|
26
|
+
return _syncKey !== null;
|
|
27
|
+
}
|
|
28
|
+
function requireSyncKey() {
|
|
29
|
+
if (!_syncKey) {
|
|
30
|
+
throw new Error("Sync crypto not initialized. Call initSyncCrypto(masterKey) first.");
|
|
31
|
+
}
|
|
32
|
+
return _syncKey;
|
|
33
|
+
}
|
|
34
|
+
function wrapDek(dek, wrapKey, aad) {
|
|
35
|
+
const iv = crypto.randomBytes(IV_LENGTH);
|
|
36
|
+
const cipher = crypto.createCipheriv(ALGORITHM, wrapKey, iv);
|
|
37
|
+
cipher.setAAD(aad);
|
|
38
|
+
const wrapped = Buffer.concat([cipher.update(dek), cipher.final()]);
|
|
39
|
+
const tag = cipher.getAuthTag();
|
|
40
|
+
return Buffer.concat([iv, wrapped, tag]);
|
|
41
|
+
}
|
|
42
|
+
function unwrapDek(iv, wrapped, tag, wrapKey, aad) {
|
|
43
|
+
const decipher = crypto.createDecipheriv(ALGORITHM, wrapKey, iv);
|
|
44
|
+
decipher.setAAD(aad);
|
|
45
|
+
decipher.setAuthTag(tag);
|
|
46
|
+
return Buffer.concat([decipher.update(wrapped), decipher.final()]);
|
|
47
|
+
}
|
|
48
|
+
function wrapDekForCurrentDevice(dek) {
|
|
49
|
+
const sym = wrapDek(dek, requireSyncKey(), Buffer.from([RECIPIENT_SYMMETRIC]));
|
|
50
|
+
return Buffer.concat([Buffer.from([RECIPIENT_SYMMETRIC]), sym]);
|
|
51
|
+
}
|
|
52
|
+
function v2PayloadAad(keyId, recipientCount, recipientBytes) {
|
|
53
|
+
const digest = crypto.createHash("sha256").update(recipientBytes).digest();
|
|
54
|
+
return Buffer.concat([Buffer.from([ENVELOPE_BLOB_VERSION, keyId, recipientCount]), digest]);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export {
|
|
58
|
+
ALGORITHM,
|
|
59
|
+
IV_LENGTH,
|
|
60
|
+
TAG_LENGTH,
|
|
61
|
+
DEK_LENGTH,
|
|
62
|
+
PK_HASH_LENGTH,
|
|
63
|
+
X25519_PUB_LENGTH,
|
|
64
|
+
SYNC_BLOB_VERSION,
|
|
65
|
+
ENVELOPE_BLOB_VERSION,
|
|
66
|
+
CURRENT_KEY_ID,
|
|
67
|
+
VERSIONED_HEADER_LENGTH,
|
|
68
|
+
RECIPIENT_SYMMETRIC,
|
|
69
|
+
RECIPIENT_X25519,
|
|
70
|
+
SYM_RECIPIENT_LENGTH,
|
|
71
|
+
X25519_RECIPIENT_LENGTH,
|
|
72
|
+
initSyncKey,
|
|
73
|
+
isSyncKeyInitialized,
|
|
74
|
+
requireSyncKey,
|
|
75
|
+
wrapDek,
|
|
76
|
+
unwrapDek,
|
|
77
|
+
wrapDekForCurrentDevice,
|
|
78
|
+
v2PayloadAad
|
|
79
|
+
};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import {
|
|
2
|
+
eventLoopHeartbeatPath,
|
|
3
|
+
exeDir
|
|
4
|
+
} from "./chunk-JY5GAZYC.js";
|
|
5
|
+
|
|
6
|
+
// src/lib/mcp-health.ts
|
|
7
|
+
import { existsSync, readFileSync, statSync } from "fs";
|
|
8
|
+
import net from "net";
|
|
9
|
+
import path from "path";
|
|
10
|
+
function daemonPidPath() {
|
|
11
|
+
return process.env.EXE_DAEMON_PID ?? process.env.EXE_EMBED_PID ?? path.join(exeDir(), "exed.pid");
|
|
12
|
+
}
|
|
13
|
+
function daemonSockPath() {
|
|
14
|
+
return process.env.EXE_DAEMON_SOCK ?? process.env.EXE_EMBED_SOCK ?? path.join(exeDir(), "exed.sock");
|
|
15
|
+
}
|
|
16
|
+
var SOCKET_PING_TIMEOUT_MS = 300;
|
|
17
|
+
var HEARTBEAT_FRESH_MS = 6e4;
|
|
18
|
+
function isDaemonAlive() {
|
|
19
|
+
if (_isDaemonProcess) {
|
|
20
|
+
return { alive: true, pid: process.pid };
|
|
21
|
+
}
|
|
22
|
+
try {
|
|
23
|
+
const pidPath = daemonPidPath();
|
|
24
|
+
if (!existsSync(pidPath)) {
|
|
25
|
+
if (existsSync(daemonSockPath())) return { alive: true, pid: null };
|
|
26
|
+
return { alive: false, pid: null };
|
|
27
|
+
}
|
|
28
|
+
const pid = parseInt(readFileSync(pidPath, "utf8").trim(), 10);
|
|
29
|
+
if (!Number.isFinite(pid) || pid <= 0) return { alive: false, pid: null };
|
|
30
|
+
process.kill(pid, 0);
|
|
31
|
+
return { alive: true, pid };
|
|
32
|
+
} catch {
|
|
33
|
+
return { alive: false, pid: null };
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function pingUnixSocket(socketPath, timeoutMs) {
|
|
37
|
+
return new Promise((resolve) => {
|
|
38
|
+
let settled = false;
|
|
39
|
+
const finish = (result) => {
|
|
40
|
+
if (settled) return;
|
|
41
|
+
settled = true;
|
|
42
|
+
try {
|
|
43
|
+
sock.destroy();
|
|
44
|
+
} catch {
|
|
45
|
+
}
|
|
46
|
+
resolve(result);
|
|
47
|
+
};
|
|
48
|
+
const sock = net.connect(socketPath);
|
|
49
|
+
sock.once("connect", () => finish("alive"));
|
|
50
|
+
sock.once("error", (err) => {
|
|
51
|
+
const code = err?.code;
|
|
52
|
+
finish(
|
|
53
|
+
code === "ECONNREFUSED" || code === "ENOENT" || code === "ENOTSOCK" || code === "ENOTDIR" ? "dead" : "indeterminate"
|
|
54
|
+
);
|
|
55
|
+
});
|
|
56
|
+
sock.setTimeout(timeoutMs, () => finish("indeterminate"));
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function livePidWithFreshHeartbeat() {
|
|
60
|
+
let pidAlive = false;
|
|
61
|
+
try {
|
|
62
|
+
const pidPath = daemonPidPath();
|
|
63
|
+
if (existsSync(pidPath)) {
|
|
64
|
+
const pid = parseInt(readFileSync(pidPath, "utf8").trim(), 10);
|
|
65
|
+
if (Number.isFinite(pid) && pid > 0) {
|
|
66
|
+
try {
|
|
67
|
+
process.kill(pid, 0);
|
|
68
|
+
pidAlive = true;
|
|
69
|
+
} catch {
|
|
70
|
+
pidAlive = false;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
} catch {
|
|
75
|
+
pidAlive = false;
|
|
76
|
+
}
|
|
77
|
+
if (!pidAlive) return false;
|
|
78
|
+
try {
|
|
79
|
+
const st = statSync(eventLoopHeartbeatPath());
|
|
80
|
+
return Date.now() - st.mtimeMs <= HEARTBEAT_FRESH_MS;
|
|
81
|
+
} catch {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
async function isDaemonWriterAuthority() {
|
|
86
|
+
if (_isDaemonProcess) return true;
|
|
87
|
+
const socketPath = daemonSockPath();
|
|
88
|
+
const ping = await pingUnixSocket(socketPath, SOCKET_PING_TIMEOUT_MS);
|
|
89
|
+
if (ping !== "dead") return true;
|
|
90
|
+
return livePidWithFreshHeartbeat();
|
|
91
|
+
}
|
|
92
|
+
async function directWriterAllowed() {
|
|
93
|
+
if (process.env.VITEST) return true;
|
|
94
|
+
if (process.env.EXE_IS_DAEMON === "1" || _isDaemonProcess) return true;
|
|
95
|
+
if (process.env.EXE_DB_DIRECT === "1") return true;
|
|
96
|
+
return !await isDaemonWriterAuthority();
|
|
97
|
+
}
|
|
98
|
+
function isMcpHealthy(_timeoutMs = 2e3) {
|
|
99
|
+
if (_isDaemonProcess) return true;
|
|
100
|
+
const { alive } = isDaemonAlive();
|
|
101
|
+
if (!alive) return false;
|
|
102
|
+
return existsSync(daemonSockPath());
|
|
103
|
+
}
|
|
104
|
+
var _isDaemonProcess = false;
|
|
105
|
+
function markAsDaemonProcess() {
|
|
106
|
+
_isDaemonProcess = true;
|
|
107
|
+
}
|
|
108
|
+
var EVENT_LOOP_DEGRADED_THRESHOLD_MS = 5e3;
|
|
109
|
+
var _eventLoopLagMs = 0;
|
|
110
|
+
var _eventLoopLagUpdatedAt = 0;
|
|
111
|
+
function setEventLoopLagMs(lagMs) {
|
|
112
|
+
_eventLoopLagMs = lagMs;
|
|
113
|
+
_eventLoopLagUpdatedAt = Date.now();
|
|
114
|
+
}
|
|
115
|
+
function getEventLoopLagMs() {
|
|
116
|
+
return _eventLoopLagMs;
|
|
117
|
+
}
|
|
118
|
+
function getEventLoopLagUpdatedAt() {
|
|
119
|
+
return _eventLoopLagUpdatedAt;
|
|
120
|
+
}
|
|
121
|
+
function isEventLoopDegraded() {
|
|
122
|
+
return _eventLoopLagMs > EVENT_LOOP_DEGRADED_THRESHOLD_MS;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export {
|
|
126
|
+
isDaemonAlive,
|
|
127
|
+
isDaemonWriterAuthority,
|
|
128
|
+
directWriterAllowed,
|
|
129
|
+
isMcpHealthy,
|
|
130
|
+
markAsDaemonProcess,
|
|
131
|
+
setEventLoopLagMs,
|
|
132
|
+
getEventLoopLagMs,
|
|
133
|
+
getEventLoopLagUpdatedAt,
|
|
134
|
+
isEventLoopDegraded
|
|
135
|
+
};
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
buildClaudeHttpMcpEntry,
|
|
11
11
|
buildClaudeStdioProxyMcpEntry
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6EOLGE7T.js";
|
|
13
13
|
import {
|
|
14
14
|
ensureAllAgentSymlinks
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-CAEWPEBA.js";
|
|
16
16
|
import {
|
|
17
17
|
MCP_LEGACY_KEY,
|
|
18
18
|
MCP_PRIMARY_KEY
|
|
@@ -7,6 +7,9 @@ import {
|
|
|
7
7
|
isClientConnected,
|
|
8
8
|
sendDaemonRequest
|
|
9
9
|
} from "./chunk-W6UB2AWP.js";
|
|
10
|
+
import {
|
|
11
|
+
directWriterAllowed
|
|
12
|
+
} from "./chunk-V3W3SATA.js";
|
|
10
13
|
|
|
11
14
|
// src/lib/db-daemon-client.ts
|
|
12
15
|
function normalizeStatement(stmt) {
|
|
@@ -92,6 +95,9 @@ function createDaemonDbClient(fallbackClient) {
|
|
|
92
95
|
return false;
|
|
93
96
|
}
|
|
94
97
|
const unavailableForMcp = (errMsg) => daemonMcpOpError(errMsg);
|
|
98
|
+
const daemonAliveNoWriterError = (context) => new Error(
|
|
99
|
+
`Daemon is alive but its socket was unavailable for a ${context}; refusing a direct SQLite WRITER fallback to preserve the single-writer gate (bug 4a6f8aaf). Retry \u2014 the daemon socket typically re-handshakes within a moment.`
|
|
100
|
+
);
|
|
95
101
|
const client = {
|
|
96
102
|
// Daemon-routed clients cannot span a transaction across requests —
|
|
97
103
|
// BEGIN/COMMIT via execute() is rejected by the daemon SQL guard.
|
|
@@ -103,6 +109,10 @@ function createDaemonDbClient(fallbackClient) {
|
|
|
103
109
|
const daemonReady = await ensureDaemonRoute();
|
|
104
110
|
if (!daemonReady) {
|
|
105
111
|
if (isMcpProcess()) throw unavailableForMcp();
|
|
112
|
+
const stmtSql = typeof stmt === "string" ? stmt : stmt.sql;
|
|
113
|
+
if (!isReadOnlySql(stmtSql) && !await directWriterAllowed()) {
|
|
114
|
+
throw daemonAliveNoWriterError("direct DB write");
|
|
115
|
+
}
|
|
106
116
|
return fallbackClient.execute(stmt);
|
|
107
117
|
}
|
|
108
118
|
const { sql, args } = normalizeStatement(stmt);
|
|
@@ -146,6 +156,12 @@ function createDaemonDbClient(fallbackClient) {
|
|
|
146
156
|
const daemonReady = await ensureDaemonRoute();
|
|
147
157
|
if (!daemonReady) {
|
|
148
158
|
if (isMcpProcess()) throw unavailableForMcp();
|
|
159
|
+
const readOnlyBatch = stmts.every(
|
|
160
|
+
(s) => isReadOnlySql(typeof s === "string" ? s : s.sql)
|
|
161
|
+
);
|
|
162
|
+
if (!readOnlyBatch && !await directWriterAllowed()) {
|
|
163
|
+
throw daemonAliveNoWriterError("direct DB batch write");
|
|
164
|
+
}
|
|
149
165
|
return fallbackClient.batch(stmts, mode);
|
|
150
166
|
}
|
|
151
167
|
const statements = stmts.map(normalizeStatement);
|
|
@@ -192,16 +208,37 @@ function createDaemonDbClient(fallbackClient) {
|
|
|
192
208
|
process.stderr.write("[db-daemon] Unexpected batch response shape, falling back to direct\n");
|
|
193
209
|
return fallbackClient.batch(stmts, mode);
|
|
194
210
|
},
|
|
195
|
-
// Transaction support —
|
|
211
|
+
// Transaction support — needs a direct connection. Single-writer gate (bug
|
|
212
|
+
// 4a6f8aaf / df26c896, ADR-016): these escape hatches must NOT open a direct
|
|
213
|
+
// WRITER while the daemon holds writer authority (including the boot window —
|
|
214
|
+
// an alive-but-slow daemon), or an external CLI holding this client could
|
|
215
|
+
// corrupt FTS5 under the live daemon. Authority is the STRONG async
|
|
216
|
+
// directWriterAllowed() (isDaemonWriterAuthority), not a stale sync flag. Fail
|
|
217
|
+
// closed exactly like execute()/batch(); daemonless / EXE_DB_DIRECT keep direct
|
|
218
|
+
// access. Multi-statement writes should use batch() (atomic, daemon-side).
|
|
219
|
+
// S1 (df26c896): an MCP process is refused UNCONDITIONALLY — even during a
|
|
220
|
+
// daemon outage (directWriterAllowed() === true) — mirroring execute()/batch().
|
|
221
|
+
// Otherwise N MCP agents in an outage could each open a direct writer and race
|
|
222
|
+
// FTS5. MCP work always funnels through the daemon; it never writes directly.
|
|
196
223
|
async transaction(mode) {
|
|
224
|
+
if (isMcpProcess()) throw unavailableForMcp("direct DB transaction");
|
|
225
|
+
if (!await directWriterAllowed()) throw daemonAliveNoWriterError("direct DB transaction");
|
|
197
226
|
return fallbackClient.transaction(mode);
|
|
198
227
|
},
|
|
199
|
-
// executeMultiple — delegate to fallback (used only for schema migrations)
|
|
228
|
+
// executeMultiple — delegate to fallback (used only for schema migrations).
|
|
229
|
+
// Same single-writer gate: DDL via a second direct writer is refused while
|
|
230
|
+
// the daemon holds writer authority. Schema is the daemon's responsibility
|
|
231
|
+
// (its own boot ensureSchema). S1: MCP refused unconditionally (see above).
|
|
200
232
|
async executeMultiple(sql) {
|
|
233
|
+
if (isMcpProcess()) throw unavailableForMcp("direct DB executeMultiple");
|
|
234
|
+
if (!await directWriterAllowed()) throw daemonAliveNoWriterError("direct DB executeMultiple");
|
|
201
235
|
return fallbackClient.executeMultiple(sql);
|
|
202
236
|
},
|
|
203
|
-
// migrate — delegate to fallback
|
|
237
|
+
// migrate — delegate to fallback. Same single-writer gate. S1: MCP refused
|
|
238
|
+
// unconditionally (see transaction()).
|
|
204
239
|
async migrate(stmts) {
|
|
240
|
+
if (isMcpProcess()) throw unavailableForMcp("direct DB migrate");
|
|
241
|
+
if (!await directWriterAllowed()) throw daemonAliveNoWriterError("direct DB migrate");
|
|
205
242
|
return fallbackClient.migrate(stmts);
|
|
206
243
|
},
|
|
207
244
|
// Sync mode — delegate to fallback
|