@askexenow/exe-os 0.9.339 → 0.9.341
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/dist/{active-agent-EC6M7KTX.js → active-agent-AIQP4DFL.js} +3 -3
- package/dist/{active-agent-WHIUCHLA.js → active-agent-LW45DSJ4.js} +3 -3
- package/dist/{agentic-ontology-RNSXGXW4.js → agentic-ontology-RVUNRCQY.js} +1 -1
- package/dist/{backfill-metadata-MFY6BHKE.js → backfill-metadata-ZSDJ4O2T.js} +5 -5
- package/dist/backup-verify-ZAJLEL4X.js +425 -0
- package/dist/{behaviors-HLZUJSMP.js → behaviors-EO7KCP3H.js} +6 -6
- package/dist/bin/agentic-ontology-backfill.js +6 -6
- package/dist/bin/agentic-reflection-backfill.js +7 -7
- package/dist/bin/agentic-semantic-label.js +6 -6
- package/dist/bin/backfill-conversations.js +6 -6
- package/dist/bin/backfill-responses.js +6 -6
- package/dist/bin/backfill-vectors.js +8 -8
- package/dist/bin/bulk-sync-postgres.js +12 -12
- package/dist/bin/cc-doctor.js +4 -4
- package/dist/bin/cleanup-stale-review-tasks.js +17 -17
- package/dist/bin/cli.js +50 -18
- package/dist/bin/deferred-daemon-restart.js +74 -73
- package/dist/bin/exe-agent-config.js +3 -3
- package/dist/bin/exe-agent.js +10 -10
- package/dist/bin/exe-assign.js +8 -8
- package/dist/bin/exe-boot.js +26 -26
- package/dist/bin/exe-call.js +4 -4
- package/dist/bin/exe-cloud.js +12 -12
- package/dist/bin/exe-config-dump.js +3 -3
- package/dist/bin/exe-dispatch.js +17 -17
- package/dist/bin/exe-doctor.js +4 -4
- package/dist/bin/exe-export-behaviors.js +8 -8
- package/dist/bin/exe-forget.js +7 -7
- package/dist/bin/exe-gateway.js +7 -7
- package/dist/bin/exe-healthcheck.js +4 -4
- package/dist/bin/exe-heartbeat.js +17 -17
- package/dist/bin/exe-kill.js +21 -21
- package/dist/bin/exe-launch-agent.js +27 -27
- package/dist/bin/exe-new-employee.js +8 -8
- package/dist/bin/exe-pending-messages.js +18 -18
- package/dist/bin/exe-pending-notifications.js +17 -17
- package/dist/bin/exe-pending-reviews.js +17 -17
- package/dist/bin/exe-rename.js +4 -4
- package/dist/bin/exe-review.js +20 -20
- package/dist/bin/exe-search.js +6 -6
- package/dist/bin/exe-session-cleanup.js +22 -22
- package/dist/bin/exe-settings.js +13 -13
- package/dist/bin/exe-start-codex.js +13 -13
- package/dist/bin/exe-start-opencode.js +9 -9
- package/dist/bin/exe-status.js +18 -18
- package/dist/bin/exe-support.js +3 -3
- package/dist/bin/exe-team.js +3 -3
- package/dist/bin/git-sweep.js +18 -18
- package/dist/bin/graph-backfill.js +7 -7
- package/dist/bin/graph-export.js +6 -6
- package/dist/bin/import-history.js +10 -10
- package/dist/bin/install.js +76 -75
- 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/reconcile-backlog.js +484 -0
- package/dist/bin/registry-proxy.js +1 -1
- package/dist/bin/scan-tasks.js +17 -17
- package/dist/bin/setup.js +1 -1
- package/dist/bin/shard-migrate.js +5 -5
- package/dist/bin/stack-update.js +13 -7
- package/dist/bin/vps-health-gate.js +1 -1
- package/dist/boot-generation-GSMPJOWM.js +22 -0
- package/dist/{capability-cards-YOKVMMOL.js → capability-cards-OBYQNAKZ.js} +2 -2
- package/dist/{capacity-monitor-S54IOWRL.js → capacity-monitor-MG3FTUD5.js} +18 -18
- package/dist/{catchup-brief-DIOMTEW5.js → catchup-brief-BVJOF3GL.js} +21 -21
- package/dist/{chunk-X425OEYF.js → chunk-2C455MU3.js} +2 -2
- package/dist/{chunk-N5I7RL3I.js → chunk-2IWBY7XK.js} +1 -1
- package/dist/{chunk-X7H3HMFH.js → chunk-2P4WJNN5.js} +3 -3
- package/dist/{chunk-MW2GJJ53.js → chunk-2UGGBIDL.js} +2 -2
- package/dist/{chunk-BPC5LZ6Y.js → chunk-2WMTTIAZ.js} +1 -1
- package/dist/{chunk-BU2QQWBQ.js → chunk-2YCFNBC4.js} +1 -1
- package/dist/{chunk-RRWDYOQS.js → chunk-32YHCHWW.js} +1 -1
- package/dist/{chunk-I5RLNOFK.js → chunk-3BRVLPPA.js} +8 -4
- package/dist/{chunk-KTY7I7UH.js → chunk-4FJZ6SO7.js} +1 -1
- package/dist/{chunk-XWHE4LZK.js → chunk-4LWV633D.js} +21 -2
- package/dist/{chunk-AVKXCSBI.js → chunk-4QSJVMMT.js} +1 -1
- package/dist/{chunk-I3XKO3KQ.js → chunk-6BQG7EKO.js} +1 -1
- package/dist/{chunk-RLRT2BVM.js → chunk-6D2PI4QD.js} +1 -1
- package/dist/{chunk-7EA7LYW4.js → chunk-6MVC43X7.js} +4 -4
- package/dist/chunk-6QW6JHRE.js +368 -0
- package/dist/{chunk-HHIBOU3P.js → chunk-7LF5DS3A.js} +1 -1
- package/dist/{chunk-XACL67CS.js → chunk-7SEC2AG5.js} +1 -1
- package/dist/{chunk-UFAXZ2PY.js → chunk-7YORGTXC.js} +1 -1
- package/dist/{chunk-3QDSCJ3F.js → chunk-AP455LBW.js} +1 -1
- package/dist/{chunk-OFX5B2S7.js → chunk-ATKW3SYL.js} +1 -1
- package/dist/{chunk-3OBWSCJN.js → chunk-B7CUBLF7.js} +10 -10
- package/dist/{chunk-UCQITDLM.js → chunk-BJ23BNED.js} +1 -1
- package/dist/{chunk-B76TSEP3.js → chunk-BJOBR6P2.js} +1 -1
- package/dist/{chunk-XCTGRD4S.js → chunk-BMHQPIJ2.js} +12 -12
- package/dist/{chunk-ZIVEA3NB.js → chunk-BR4423AS.js} +1 -1
- package/dist/{chunk-ATOU6CYR.js → chunk-BV6GBSRP.js} +16 -2
- package/dist/{chunk-DZ6OQM67.js → chunk-C445WRUX.js} +1 -1
- package/dist/{chunk-YE7NH53A.js → chunk-CCIEIRV2.js} +1 -1
- package/dist/{chunk-6IRVGOUL.js → chunk-CCPHEPLU.js} +1 -1
- package/dist/{chunk-2HZY3ECT.js → chunk-CMR64RYM.js} +18 -18
- package/dist/{chunk-MQRFKSLI.js → chunk-CYA5S5OD.js} +3 -3
- package/dist/{chunk-FNZR3B7U.js → chunk-DGGDUKH6.js} +1 -1
- package/dist/{chunk-QXSBB26A.js → chunk-DNVFWFYF.js} +1 -1
- package/dist/{chunk-QZLIZAS7.js → chunk-DPFQ2WQX.js} +2 -2
- package/dist/{chunk-H37HHX3E.js → chunk-EDH54E5A.js} +9 -9
- package/dist/{chunk-JD5S5AAV.js → chunk-EDOO23B2.js} +2 -2
- package/dist/{chunk-GQQHDEEM.js → chunk-FOV57K47.js} +10 -10
- package/dist/{chunk-65SVQELL.js → chunk-GFDGDFBF.js} +9 -0
- package/dist/{chunk-DILD54TU.js → chunk-GOGSWXNZ.js} +9 -9
- package/dist/{chunk-UPWE5NOG.js → chunk-GPW32HVB.js} +2 -2
- package/dist/{chunk-4IYSBPX3.js → chunk-HAZO7TRD.js} +1 -1
- package/dist/{chunk-52KNOQMK.js → chunk-HJX6NCJF.js} +3 -3
- package/dist/{chunk-UIV2WPBT.js → chunk-HNLXMD2V.js} +1 -1
- package/dist/{chunk-Z7OZP3ET.js → chunk-HSYJ6DZ2.js} +1 -1
- package/dist/{chunk-LTVCRHHD.js → chunk-HUSVERE6.js} +4 -4
- package/dist/{chunk-I7Z6KTGF.js → chunk-I7ECEP3W.js} +5 -5
- package/dist/{chunk-T4KZ2Z2N.js → chunk-IELUDZAA.js} +3 -3
- package/dist/{chunk-XUKPALWT.js → chunk-ITMEE7PQ.js} +3 -3
- package/dist/{chunk-KCC5A7YL.js → chunk-IXBIVKWZ.js} +6 -6
- package/dist/{chunk-GN45PBWI.js → chunk-J6SEDDOR.js} +2 -2
- package/dist/{chunk-UXBD22CD.js → chunk-K6KRBXQP.js} +1 -1
- package/dist/{chunk-PLRIJALF.js → chunk-KKOLHBNC.js} +33 -25
- package/dist/{chunk-OJTJYEMX.js → chunk-KP4PY2Z2.js} +3 -3
- package/dist/{chunk-VJHUVFIW.js → chunk-L2YGXJGF.js} +3 -3
- package/dist/{chunk-6MRWJMI5.js → chunk-LA2Z6RMS.js} +1 -1
- package/dist/{chunk-DEPZOCYD.js → chunk-LEJ25726.js} +321 -621
- package/dist/{chunk-2233TQCA.js → chunk-LLU6WZLK.js} +1 -1
- package/dist/{chunk-6M36JFFD.js → chunk-LOBCQXV5.js} +4 -4
- package/dist/{chunk-LMZISHSJ.js → chunk-MC4ATFJV.js} +5 -5
- package/dist/{chunk-EIF2LQHZ.js → chunk-MJB5ZFQM.js} +1 -1
- package/dist/{chunk-PAEXYFMY.js → chunk-N7A5D25S.js} +1 -1
- package/dist/{chunk-DADMPMYX.js → chunk-NDSNM5OH.js} +1 -1
- package/dist/{chunk-H2L4PHGH.js → chunk-NFBW7N4D.js} +2 -2
- package/dist/{chunk-VYRYY7TE.js → chunk-NTI22F3R.js} +1 -1
- package/dist/{chunk-TLYAEISW.js → chunk-OUEFW4RK.js} +2 -2
- package/dist/{chunk-K5WFKEXQ.js → chunk-PTJBWC77.js} +1 -1
- package/dist/{chunk-KMBEL7VB.js → chunk-PVIH3ZGV.js} +1 -1
- package/dist/{support-outbox-MGUVVGHT.js → chunk-Q5AIPSSC.js} +19 -7
- package/dist/chunk-RP5GETX5.js +140 -0
- package/dist/{chunk-HEPR6QTL.js → chunk-RWSLVYTE.js} +45 -5
- package/dist/{chunk-XJI7Z6LZ.js → chunk-T2PYVVZ5.js} +1 -1
- package/dist/{chunk-WYLV4S6A.js → chunk-TIXTHUVJ.js} +3 -3
- package/dist/{chunk-7WDXEKUL.js → chunk-TWXZM34M.js} +3 -3
- package/dist/{chunk-W7DHFGCB.js → chunk-U2MREVXQ.js} +1 -1
- package/dist/{chunk-6HBURYON.js → chunk-UIU2DGRV.js} +3 -3
- package/dist/{chunk-7TS64TBG.js → chunk-UU4UINUX.js} +6 -1
- package/dist/chunk-W6K4XB6G.js +40 -0
- package/dist/{chunk-R44Z32O2.js → chunk-WD55PEBM.js} +3 -3
- package/dist/{chunk-FUIIVSW6.js → chunk-WH7XN5ER.js} +1 -1
- package/dist/{chunk-Q7L6G6KV.js → chunk-WWNQFOSP.js} +2 -2
- package/dist/{chunk-542EWGY3.js → chunk-XSMRR4IW.js} +7 -7
- package/dist/{chunk-TNJRWUCE.js → chunk-Y3S4H77G.js} +1 -1
- package/dist/{chunk-AOO77BDE.js → chunk-YHUNDGVV.js} +1 -1
- package/dist/{chunk-JBSCL2XT.js → chunk-YIIME2OW.js} +1 -1
- package/dist/{chunk-QFPTDSY2.js → chunk-YLQXP7T7.js} +1 -1
- package/dist/{chunk-RDTZTLVQ.js → chunk-YWQMWFYR.js} +30 -14
- package/dist/{chunk-2SG2UGCH.js → chunk-ZNE6H2JO.js} +4 -4
- package/dist/{cleanup-graph-garbage-KUABW6LS.js → cleanup-graph-garbage-MXQ4Q2MA.js} +6 -6
- package/dist/{co-activation-XMPHKGHR.js → co-activation-QI5BK4RT.js} +2 -2
- package/dist/{co-occurrence-SHKSJ6CV.js → co-occurrence-BYSQNZSV.js} +4 -4
- package/dist/{code-context-index-EXXDY3QZ.js → code-context-index-BNBHDXHW.js} +2 -2
- package/dist/{content-extractor-RHITF2KM.js → content-extractor-JRJDNIHP.js} +2 -2
- package/dist/{conversation-entity-extractor-D3EFTLT4.js → conversation-entity-extractor-FPAMTL3C.js} +2 -2
- package/dist/{crdt-sync-UJELKSNX.js → crdt-sync-ETPKNBCU.js} +1 -1
- package/dist/{crm-webhook-HHNBS7LY.js → crm-webhook-M566ZMZS.js} +2 -2
- package/dist/{cto-delegation-gate-DXNF5HVW.js → cto-delegation-gate-S734XDXT.js} +16 -16
- package/dist/{daemon-orchestration-7QB6QOXT.js → daemon-orchestration-XV5GN73R.js} +20 -20
- package/dist/{daemon-ready-5XI5BIJD.js → daemon-ready-RKKB4P6K.js} +1 -1
- package/dist/{daemon-ready-signal-E7VMIQ6I.js → daemon-ready-signal-WKEJQNRA.js} +3 -1
- package/dist/{db-backup-DLD4QZBO.js → db-backup-MX2G3CEK.js} +1 -1
- package/dist/{doc-graph-extractor-3TRLGD7M.js → doc-graph-extractor-LR5KMPH7.js} +4 -4
- package/dist/{documents-FHIBU7KJ.js → documents-FA6N7QDA.js} +8 -8
- package/dist/{dreaming-OMFUEUCQ.js → dreaming-UKGTQT6I.js} +17 -17
- package/dist/{exe-drift-KY2KHZEL.js → exe-drift-TUKTCXZE.js} +3 -3
- package/dist/{exe-export-SP6G3QF6.js → exe-export-ZLHBXMZC.js} +7 -7
- package/dist/{exe-import-KJU7FBVQ.js → exe-import-VVKBZWSA.js} +7 -7
- package/dist/{exe-key-5RLFQMYP.js → exe-key-QJXFBF6G.js} +74 -73
- package/dist/{exe-snapshot-ZNPGUKRZ.js → exe-snapshot-JRLUO645.js} +21 -21
- package/dist/{fast-db-init-QQB6IVWV.js → fast-db-init-JKJEEHUI.js} +1 -1
- package/dist/{founder-context-PQR3BUS7.js → founder-context-HWPLMZVR.js} +2 -2
- package/dist/gateway/index.js +24 -24
- package/dist/{git-staleness-UGB5J3K7.js → git-staleness-X5XZONX3.js} +2 -2
- package/dist/{global-procedures-R7KRREEK.js → global-procedures-VIIVWB6R.js} +3 -3
- package/dist/{graph-auto-extract-LKIQ57PL.js → graph-auto-extract-HCQQF5AG.js} +4 -4
- package/dist/{graph-rag-JZZAB7PC.js → graph-rag-WAK2BRJH.js} +2 -2
- package/dist/hooks/bug-report-worker.js +19 -19
- package/dist/hooks/codex-stop-task-finalizer.js +19 -19
- package/dist/hooks/commit-complete.js +19 -19
- package/dist/hooks/error-recall.js +7 -7
- package/dist/hooks/exe-heartbeat-hook.js +3 -3
- package/dist/hooks/ingest-worker.js +5 -5
- package/dist/hooks/ingest.js +9 -9
- 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 +18 -18
- package/dist/hooks/post-tool-combined.js +9 -9
- package/dist/hooks/pre-compact.js +19 -19
- package/dist/hooks/pre-tool-use.js +22 -22
- package/dist/hooks/prompt-submit.js +36 -36
- package/dist/hooks/session-end.js +24 -24
- package/dist/hooks/session-start.js +14 -14
- package/dist/hooks/stop.js +25 -25
- package/dist/hooks/subagent-stop.js +18 -18
- package/dist/hooks/summary-worker.js +23 -23
- package/dist/index.js +29 -29
- package/dist/{installer-SB2N5NKH.js → installer-6IFVEQI4.js} +5 -5
- package/dist/{installer-MZWWBXM6.js → installer-NX2CLNV5.js} +5 -5
- package/dist/{installer-MNPXDLGG.js → installer-T2LGHZKL.js} +5 -5
- package/dist/{intercom-queue-VU2G6F5R.js → intercom-queue-KYHXXZCQ.js} +16 -16
- package/dist/lib/agent-config.js +1 -1
- package/dist/lib/cloud-sync.js +12 -12
- package/dist/lib/consolidation.js +8 -8
- package/dist/lib/database.js +2 -2
- package/dist/lib/db-daemon-client.js +2 -2
- package/dist/lib/db.js +2 -2
- package/dist/lib/device-registry.js +1 -1
- package/dist/lib/embedder.js +2 -2
- package/dist/lib/employee-templates.js +4 -4
- package/dist/lib/employees.js +2 -2
- package/dist/lib/exe-daemon-client.js +1 -1
- package/dist/lib/exe-daemon.js +123 -54
- package/dist/lib/hybrid-search.js +6 -6
- package/dist/lib/identity.js +2 -2
- package/dist/lib/license.js +2 -2
- package/dist/lib/messaging.js +17 -17
- package/dist/lib/post-tool-memory.js +3 -3
- package/dist/lib/registry-proxy.js +1 -1
- package/dist/lib/reminders.js +3 -3
- package/dist/lib/schedules.js +6 -6
- package/dist/lib/session-registry.js +4 -4
- package/dist/lib/skill-learning.js +7 -7
- package/dist/lib/store.js +5 -5
- package/dist/lib/task-router.js +3 -3
- package/dist/lib/tasks.js +18 -18
- package/dist/lib/tmux-routing.js +16 -16
- package/dist/lib/token-spend.js +3 -3
- package/dist/{license-gate-BYDMFMFT.js → license-gate-MGDR4YNI.js} +3 -3
- package/dist/{license-sync-N3RNYVP2.js → license-sync-UWE6GEB4.js} +2 -2
- package/dist/mcp/register-tools.js +73 -72
- package/dist/mcp/server.js +74 -73
- 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 +20 -20
- package/dist/mcp/tools/deactivate-behavior.js +8 -8
- package/dist/mcp/tools/list-reminders.js +4 -4
- package/dist/mcp/tools/list-tasks.js +20 -20
- package/dist/mcp/tools/send-message.js +19 -19
- package/dist/mcp/tools/update-task.js +19 -19
- package/dist/{mcp-http-config-EMAVS2JI.js → mcp-http-config-RQLYEPTL.js} +3 -3
- package/dist/{memory-cards-TQRLZI4D.js → memory-cards-VYQ5DPMR.js} +5 -5
- package/dist/{memory-graph-extractor-IWGNVAFU.js → memory-graph-extractor-GX2HNYLU.js} +5 -5
- package/dist/{memory-poisoning-defense-T4ITBGSG.js → memory-poisoning-defense-TX7627BD.js} +2 -2
- package/dist/{memory-pressure-watchdog-RRIAXPXQ.js → memory-pressure-watchdog-MLNNH26B.js} +17 -17
- package/dist/{memory-queue-client-BKQHTYTH.js → memory-queue-client-YRL6XTGU.js} +2 -2
- package/dist/{memory-reflection-6N4J2FL7.js → memory-reflection-KIGEFSI4.js} +2 -2
- package/dist/notification-ledger-B6AVEGMV.js +407 -0
- package/dist/{notifications-KONB3C62.js → notifications-DWXV7SVL.js} +16 -16
- package/dist/{orchestration-events-5SIJOE4H.js → orchestration-events-ZG7O4HRY.js} +3 -3
- package/dist/{orchestrator-DUUX7FQV.js → orchestrator-PGHJDUUT.js} +18 -18
- package/dist/{pipeline-router-O6HU7DKH.js → pipeline-router-RTLAGZTA.js} +3 -3
- package/dist/{plan-limits-GRNBOBB3.js → plan-limits-WLQZTCSF.js} +5 -5
- package/dist/{projection-worker-ZVOFHTXT.js → projection-worker-44SEKTZ5.js} +2 -2
- package/dist/{prospective-memory-W6S67LZZ.js → prospective-memory-UACFTYXK.js} +2 -2
- package/dist/{reranker-SSFBRWWD.js → reranker-NL4YAV6R.js} +1 -1
- package/dist/{retrieval-health-TWHKYCRK.js → retrieval-health-4C2PO6HH.js} +1 -1
- package/dist/{review-polling-PCMD5BFN.js → review-polling-W5AMHNLT.js} +17 -17
- package/dist/runtime/index.js +24 -24
- package/dist/{session-events-3LCVQEL7.js → session-events-PGL5GJEB.js} +17 -17
- package/dist/{session-kill-telemetry-CZSPN5V6.js → session-kill-telemetry-6YDGEF27.js} +17 -17
- package/dist/{session-scope-CFHVSVAQ.js → session-scope-3MEOO557.js} +16 -16
- package/dist/{setup-wizard-CJZMM43G.js → setup-wizard-CJIYDSSP.js} +1 -1
- package/dist/{skill-refinement-74T6VDFM.js → skill-refinement-EOROTBPX.js} +3 -3
- package/dist/stack-promote-RSOWO6EY.js +130 -0
- package/dist/{stack-release-XXMV7SPX.js → stack-release-PR2XKJ4Q.js} +24 -9
- package/dist/{stack-update-E2TKHHSQ.js → stack-update-LMDM27ZW.js} +5 -3
- package/dist/{steward-gate-WT7WXQIE.js → steward-gate-4A2XHYFD.js} +3 -3
- package/dist/support-inbox-Z77ACQUY.js +32 -0
- package/dist/support-outbox-GB5SQFRJ.js +16 -0
- package/dist/{task-enforcement-VI7L43DC.js → task-enforcement-X5QVL6RE.js} +17 -17
- package/dist/{task-scope-CQEG5SSJ.js → task-scope-EKYDCVUF.js} +16 -16
- package/dist/{tasks-crud-UGK5A25L.js → tasks-crud-6LBNU43G.js} +16 -16
- package/dist/{tasks-notify-SMLDFBWM.js → tasks-notify-TFJLSQ3B.js} +17 -17
- package/dist/{tasks-review-JKBRACII.js → tasks-review-PBIUYXAL.js} +16 -16
- package/dist/{telemetry-upload-7LBYGPCB.js → telemetry-upload-WQDFABTF.js} +7 -7
- package/dist/{token-budget-QBRJR4M5.js → token-budget-KWGL5DY7.js} +3 -3
- package/dist/{tool-capability-index-Q6YQDL7I.js → tool-capability-index-EH3HQVHU.js} +1 -1
- package/dist/{tool-telemetry-ULIDUK3P.js → tool-telemetry-UC55LSIH.js} +1 -1
- package/dist/tui/App.js +24 -24
- package/dist/{tui-data-NPTGKT37.js → tui-data-M3RBSJL3.js} +16 -16
- package/dist/update-support-VPBD5SD2.js +355 -0
- package/dist/{worker-gate-MXUQUG4M.js → worker-gate-4QLLMXZM.js} +1 -1
- package/dist/{workflow-engine-EWCOLD47.js → workflow-engine-MMEHKUN4.js} +2 -2
- package/dist/{worktree-GVF2I5FP.js → worktree-YXBDRYOC.js} +4 -4
- package/dist/{worktree-sweep-ZAG3V24E.js → worktree-sweep-5WKBU7E6.js} +5 -5
- package/package.json +2 -2
- package/release-notes.json +35 -60
- package/dist/chunk-Y25OJWOQ.js +0 -45
- package/dist/{chunk-FLNSJ2TC.js → chunk-2KLAYDFB.js} +0 -0
- package/dist/{chunk-WHRTDN5J.js → chunk-3NCZKWPO.js} +0 -0
- package/dist/{chunk-IYB2NIW3.js → chunk-6MVI4QH2.js} +0 -0
- package/dist/{chunk-A4DVMPYB.js → chunk-7UMCQQWS.js} +3 -3
- /package/dist/{chunk-QLFRCA6I.js → chunk-AYLNJGCS.js} +0 -0
- /package/dist/{chunk-D3QASX2W.js → chunk-C2SRRCRK.js} +0 -0
- /package/dist/{chunk-KTPG4XKI.js → chunk-IB336P52.js} +0 -0
- /package/dist/{chunk-NQBRGXYR.js → chunk-MC6VPZKS.js} +0 -0
- /package/dist/{chunk-5Z5NATNS.js → chunk-PPZOWQHP.js} +0 -0
- /package/dist/{chunk-C2UO2I6K.js → chunk-WNKVKNOM.js} +0 -0
- /package/dist/{core-memory-VO5ZIBKH.js → core-memory-3IBWM4WR.js} +0 -0
- /package/dist/{entity-boost-DNI4A5I7.js → entity-boost-DWAWXFKN.js} +0 -0
- /package/dist/{message-queue-client-Q5BW3O5W.js → message-queue-client-3PTHPG5Q.js} +0 -0
- /package/dist/{oauth-server-ROQFOEMM.js → oauth-server-M5TGXT6D.js} +0 -0
- /package/dist/{project-boot-SD7GM24K.js → project-boot-6CGQ3EAH.js} +0 -0
- /package/dist/{wiki-acl-JA5UCQZ4.js → wiki-acl-7CROE3MJ.js} +0 -0
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
getAllActiveAgents,
|
|
6
6
|
resolveActiveAgentFromTmuxSession,
|
|
7
7
|
writeActiveAgent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-C445WRUX.js";
|
|
9
9
|
import "./chunk-CVYC6DUW.js";
|
|
10
10
|
import "./chunk-GJV3WDWM.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-RWSLVYTE.js";
|
|
12
12
|
import "./chunk-2I23RPSI.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-BV6GBSRP.js";
|
|
14
14
|
import "./chunk-PNQDP3OA.js";
|
|
15
15
|
import "./chunk-H73TUI4Y.js";
|
|
16
16
|
import "./chunk-7HLWBYH7.js";
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
getAllActiveAgents,
|
|
7
7
|
resolveActiveAgentFromTmuxSession,
|
|
8
8
|
writeActiveAgent
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-C445WRUX.js";
|
|
10
10
|
import "./chunk-CVYC6DUW.js";
|
|
11
11
|
import "./chunk-GJV3WDWM.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-RWSLVYTE.js";
|
|
13
13
|
import "./chunk-2I23RPSI.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-BV6GBSRP.js";
|
|
15
15
|
import "./chunk-PNQDP3OA.js";
|
|
16
16
|
import "./chunk-H73TUI4Y.js";
|
|
17
17
|
import "./chunk-7HLWBYH7.js";
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
import {
|
|
3
3
|
disposeStore,
|
|
4
4
|
initStore
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EDH54E5A.js";
|
|
6
6
|
import "./chunk-CHCA3ZM2.js";
|
|
7
7
|
import "./chunk-OTVEIJUQ.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-7LF5DS3A.js";
|
|
9
|
+
import "./chunk-RP5GETX5.js";
|
|
10
10
|
import "./chunk-MP2AFCGL.js";
|
|
11
11
|
import {
|
|
12
12
|
getClient,
|
|
13
13
|
getEmployeeNamesByRole,
|
|
14
14
|
loadEmployeesSync
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-RWSLVYTE.js";
|
|
16
16
|
import "./chunk-2I23RPSI.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-BV6GBSRP.js";
|
|
18
18
|
import "./chunk-PNQDP3OA.js";
|
|
19
19
|
import "./chunk-H73TUI4Y.js";
|
|
20
20
|
import "./chunk-7HLWBYH7.js";
|
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getLatestBackup,
|
|
3
|
+
reasonFromBackupName
|
|
4
|
+
} from "./chunk-BV6GBSRP.js";
|
|
5
|
+
import "./chunk-7Y5UDEVM.js";
|
|
6
|
+
import "./chunk-SHIICYJW.js";
|
|
7
|
+
import "./chunk-MLKGABMK.js";
|
|
8
|
+
|
|
9
|
+
// src/lib/backup-verify.ts
|
|
10
|
+
import { createClient } from "@libsql/client";
|
|
11
|
+
import { existsSync } from "fs";
|
|
12
|
+
import { copyFile, mkdtemp, rm, writeFile, readFile } from "fs/promises";
|
|
13
|
+
import { createHash } from "crypto";
|
|
14
|
+
import { tmpdir } from "os";
|
|
15
|
+
import path from "path";
|
|
16
|
+
var MANIFEST_SCHEMA_VERSION = 1;
|
|
17
|
+
var DEFAULT_DRIFT_ALLOWANCE = 1e5;
|
|
18
|
+
var CRASH_LOOP_REASONS = /* @__PURE__ */ new Set(["pre-restart", "pre-consolidation", "pre-fix"]);
|
|
19
|
+
function manifestWriteEnabled() {
|
|
20
|
+
return !/^(0|false|no|off)$/i.test(process.env.EXE_BACKUP_MANIFEST ?? "1");
|
|
21
|
+
}
|
|
22
|
+
function dailyVerifyEnabled() {
|
|
23
|
+
return /^(1|true|yes|on)$/i.test(process.env.EXE_BACKUP_VERIFY_DAILY ?? "0");
|
|
24
|
+
}
|
|
25
|
+
function liveHardEnabled() {
|
|
26
|
+
return /^(1|true|yes|on)$/i.test(process.env.EXE_BACKUP_VERIFY_LIVE_HARD ?? "0");
|
|
27
|
+
}
|
|
28
|
+
function isCrashLoopBackup(nameOrPath) {
|
|
29
|
+
const reason = reasonFromBackupName(path.basename(nameOrPath));
|
|
30
|
+
return reason !== null && CRASH_LOOP_REASONS.has(reason);
|
|
31
|
+
}
|
|
32
|
+
function rowStr(row, key, idx) {
|
|
33
|
+
if (!row) return null;
|
|
34
|
+
const v = row[key] ?? row[idx];
|
|
35
|
+
if (v == null) return null;
|
|
36
|
+
return typeof v === "string" ? v : String(v);
|
|
37
|
+
}
|
|
38
|
+
function rowNum(row, key, idx) {
|
|
39
|
+
if (!row) return 0;
|
|
40
|
+
const v = row[key] ?? row[idx];
|
|
41
|
+
return Number(v ?? 0);
|
|
42
|
+
}
|
|
43
|
+
var SHADOW_SUFFIXES = ["_data", "_idx", "_content", "_docsize", "_config"];
|
|
44
|
+
function isUserTable(name, allNames) {
|
|
45
|
+
if (name.startsWith("sqlite_")) return false;
|
|
46
|
+
for (const sfx of SHADOW_SUFFIXES) {
|
|
47
|
+
if (name.endsWith(sfx)) {
|
|
48
|
+
const base = name.slice(0, -sfx.length);
|
|
49
|
+
if (base.length > 0 && allNames.has(base)) return false;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
async function collectSchemaTables(client) {
|
|
55
|
+
const res = await client.execute("SELECT name, sql FROM sqlite_master WHERE type='table'");
|
|
56
|
+
const all = /* @__PURE__ */ new Set();
|
|
57
|
+
for (const r of res.rows) {
|
|
58
|
+
const n = rowStr(r, "name", 0);
|
|
59
|
+
if (n) all.add(n);
|
|
60
|
+
}
|
|
61
|
+
const out = [];
|
|
62
|
+
for (const r of res.rows) {
|
|
63
|
+
const n = rowStr(r, "name", 0);
|
|
64
|
+
if (!n) continue;
|
|
65
|
+
if (!isUserTable(n, all)) continue;
|
|
66
|
+
if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(n)) continue;
|
|
67
|
+
out.push({ name: n, sql: rowStr(r, "sql", 1) ?? "" });
|
|
68
|
+
}
|
|
69
|
+
out.sort((a, b) => a.name.localeCompare(b.name));
|
|
70
|
+
return out;
|
|
71
|
+
}
|
|
72
|
+
function computeSchemaHash(tables) {
|
|
73
|
+
const h = createHash("sha256");
|
|
74
|
+
for (const t of tables) h.update(`${t.name}
|
|
75
|
+
${t.sql}
|
|
76
|
+
`);
|
|
77
|
+
return h.digest("hex");
|
|
78
|
+
}
|
|
79
|
+
async function countTable(client, name) {
|
|
80
|
+
const r = await client.execute(`SELECT COUNT(*) AS c FROM "${name}"`);
|
|
81
|
+
return rowNum(r.rows[0], "c", 0);
|
|
82
|
+
}
|
|
83
|
+
async function collectCounts(client, tables) {
|
|
84
|
+
const out = {};
|
|
85
|
+
for (const t of tables) out[t] = await countTable(client, t);
|
|
86
|
+
return out;
|
|
87
|
+
}
|
|
88
|
+
async function computeKeyEpoch(keyHex) {
|
|
89
|
+
let hex = keyHex;
|
|
90
|
+
if (hex === void 0) {
|
|
91
|
+
try {
|
|
92
|
+
const { getMasterKey } = await import("./lib/keychain.js");
|
|
93
|
+
const key = await getMasterKey();
|
|
94
|
+
hex = key ? key.toString("hex") : null;
|
|
95
|
+
} catch {
|
|
96
|
+
hex = null;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
if (!hex) return null;
|
|
100
|
+
return createHash("sha256").update(hex).digest("hex").slice(0, 8);
|
|
101
|
+
}
|
|
102
|
+
function manifestPathFor(backupPath) {
|
|
103
|
+
return `${backupPath}.manifest.json`;
|
|
104
|
+
}
|
|
105
|
+
async function writeBackupManifest(backupPath, dbName, opts = {}) {
|
|
106
|
+
try {
|
|
107
|
+
let client = opts.client;
|
|
108
|
+
if (!client) {
|
|
109
|
+
try {
|
|
110
|
+
const { getClient } = await import("./lib/database.js");
|
|
111
|
+
client = getClient();
|
|
112
|
+
} catch {
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
const schemaTables = await collectSchemaTables(client);
|
|
117
|
+
const schemaHash = computeSchemaHash(schemaTables);
|
|
118
|
+
const tables = await collectCounts(client, schemaTables.map((t) => t.name));
|
|
119
|
+
const keyEpoch = opts.keyEpoch !== void 0 ? opts.keyEpoch : await computeKeyEpoch();
|
|
120
|
+
const manifest = {
|
|
121
|
+
schemaVersion: MANIFEST_SCHEMA_VERSION,
|
|
122
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
123
|
+
dbName,
|
|
124
|
+
schemaHash,
|
|
125
|
+
tables,
|
|
126
|
+
keyEpoch
|
|
127
|
+
};
|
|
128
|
+
await writeFile(manifestPathFor(backupPath), JSON.stringify(manifest, null, 2), "utf-8");
|
|
129
|
+
return manifest;
|
|
130
|
+
} catch {
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
async function readManifest(backupPath) {
|
|
135
|
+
const p = manifestPathFor(backupPath);
|
|
136
|
+
if (!existsSync(p)) return null;
|
|
137
|
+
try {
|
|
138
|
+
const parsed = JSON.parse(await readFile(p, "utf-8"));
|
|
139
|
+
if (!parsed || typeof parsed !== "object") return null;
|
|
140
|
+
const m = parsed;
|
|
141
|
+
if (typeof m.schemaHash !== "string" || typeof m.tables !== "object" || m.tables == null) return null;
|
|
142
|
+
return {
|
|
143
|
+
schemaVersion: typeof m.schemaVersion === "number" ? m.schemaVersion : 1,
|
|
144
|
+
createdAt: typeof m.createdAt === "string" ? m.createdAt : "",
|
|
145
|
+
dbName: typeof m.dbName === "string" ? m.dbName : "",
|
|
146
|
+
schemaHash: m.schemaHash,
|
|
147
|
+
tables: m.tables,
|
|
148
|
+
keyEpoch: typeof m.keyEpoch === "string" ? m.keyEpoch : null
|
|
149
|
+
};
|
|
150
|
+
} catch {
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
function errMsg(err) {
|
|
155
|
+
return err instanceof Error ? err.message : String(err);
|
|
156
|
+
}
|
|
157
|
+
async function runIntegrityCheck(client) {
|
|
158
|
+
try {
|
|
159
|
+
const r = await client.execute("PRAGMA cipher_integrity_check");
|
|
160
|
+
if (r.rows.length === 0) return "ok";
|
|
161
|
+
const v = rowStr(r.rows[0], "cipher_integrity_check", 0);
|
|
162
|
+
if (v && v.toLowerCase() === "ok") return "ok";
|
|
163
|
+
return "failed";
|
|
164
|
+
} catch {
|
|
165
|
+
}
|
|
166
|
+
try {
|
|
167
|
+
const r = await client.execute("PRAGMA quick_check");
|
|
168
|
+
const v = rowStr(r.rows[0], "quick_check", 0);
|
|
169
|
+
return v && v.toLowerCase() === "ok" ? "ok" : "failed";
|
|
170
|
+
} catch {
|
|
171
|
+
return "unreadable";
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
function compareToManifest(name, manifest, schemaHash, gotCounts) {
|
|
175
|
+
if (manifest.schemaHash && manifest.schemaHash !== schemaHash) {
|
|
176
|
+
return {
|
|
177
|
+
ok: false,
|
|
178
|
+
backup: name,
|
|
179
|
+
source: "manifest",
|
|
180
|
+
integrity: "ok",
|
|
181
|
+
tables: [],
|
|
182
|
+
reason: "schema-drift",
|
|
183
|
+
detail: `schema-drift: manifest=${manifest.schemaHash.slice(0, 12)} backup=${schemaHash.slice(0, 12)}`
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
const tables = [];
|
|
187
|
+
let ok = true;
|
|
188
|
+
let firstMismatch = null;
|
|
189
|
+
for (const [t, expected] of Object.entries(manifest.tables)) {
|
|
190
|
+
const got = gotCounts[t] ?? 0;
|
|
191
|
+
const rowOk = got === expected;
|
|
192
|
+
if (!rowOk) {
|
|
193
|
+
ok = false;
|
|
194
|
+
if (!firstMismatch) firstMismatch = `row-count-mismatch:${t} expected=${expected} got=${got}`;
|
|
195
|
+
}
|
|
196
|
+
tables.push({ name: t, expected, got, ok: rowOk });
|
|
197
|
+
}
|
|
198
|
+
return {
|
|
199
|
+
ok,
|
|
200
|
+
backup: name,
|
|
201
|
+
source: "manifest",
|
|
202
|
+
integrity: "ok",
|
|
203
|
+
tables,
|
|
204
|
+
reason: ok ? "ok" : "row-count-mismatch",
|
|
205
|
+
detail: firstMismatch ?? void 0
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
async function compareToLive(name, gotCounts, opts) {
|
|
209
|
+
const drift = opts.driftAllowance ?? DEFAULT_DRIFT_ALLOWANCE;
|
|
210
|
+
let live = opts.liveCounts;
|
|
211
|
+
if (!live) {
|
|
212
|
+
try {
|
|
213
|
+
const { getClient } = await import("./lib/database.js");
|
|
214
|
+
const client = getClient();
|
|
215
|
+
const schemaTables = await collectSchemaTables(client);
|
|
216
|
+
live = await collectCounts(client, schemaTables.map((t) => t.name));
|
|
217
|
+
} catch {
|
|
218
|
+
live = void 0;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
if (!live) {
|
|
222
|
+
return {
|
|
223
|
+
ok: true,
|
|
224
|
+
backup: name,
|
|
225
|
+
source: "none",
|
|
226
|
+
integrity: "ok",
|
|
227
|
+
tables: [],
|
|
228
|
+
reason: "ok",
|
|
229
|
+
detail: "opened + integrity ok; no manifest or live DB to compare row counts"
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
const hard = opts.liveHard ?? liveHardEnabled();
|
|
233
|
+
const tables = [];
|
|
234
|
+
let hardFail = false;
|
|
235
|
+
let softFail = false;
|
|
236
|
+
let firstIssue = null;
|
|
237
|
+
for (const [t, liveCount] of Object.entries(live)) {
|
|
238
|
+
const got = gotCounts[t] ?? 0;
|
|
239
|
+
const impossible = got > liveCount || got === 0 && liveCount > 0;
|
|
240
|
+
const behindTooFar = liveCount - got > drift;
|
|
241
|
+
const rowOk = !impossible && !behindTooFar;
|
|
242
|
+
if (impossible) {
|
|
243
|
+
hardFail = true;
|
|
244
|
+
if (!firstIssue) firstIssue = `live-compare:${t} live=${liveCount} backup=${got} (impossible)`;
|
|
245
|
+
} else if (behindTooFar) {
|
|
246
|
+
softFail = true;
|
|
247
|
+
if (!firstIssue) firstIssue = `live-compare:${t} live=${liveCount} backup=${got} (behind > ${drift})`;
|
|
248
|
+
}
|
|
249
|
+
tables.push({ name: t, expected: liveCount, got, ok: rowOk });
|
|
250
|
+
}
|
|
251
|
+
const ok = !hardFail && (hard ? !softFail : true);
|
|
252
|
+
let detail;
|
|
253
|
+
if (!ok) detail = firstIssue ?? void 0;
|
|
254
|
+
else if (softFail) detail = `advisory (not hard-failed): ${firstIssue}`;
|
|
255
|
+
return {
|
|
256
|
+
ok,
|
|
257
|
+
backup: name,
|
|
258
|
+
source: "live",
|
|
259
|
+
integrity: "ok",
|
|
260
|
+
tables,
|
|
261
|
+
reason: ok ? "ok" : "row-count-mismatch",
|
|
262
|
+
detail
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
async function recordVerdict(res) {
|
|
266
|
+
try {
|
|
267
|
+
const { recordDbRestoreEvent } = await import("./db-restore-events-JVEEP52Z.js");
|
|
268
|
+
if (res.ok) {
|
|
269
|
+
recordDbRestoreEvent({
|
|
270
|
+
kind: "restore-verify-pass",
|
|
271
|
+
restoredFrom: res.backup ?? void 0,
|
|
272
|
+
detail: `backup verified (${res.source}): ${res.tables.length} table(s) OK`
|
|
273
|
+
});
|
|
274
|
+
} else {
|
|
275
|
+
process.stderr.write(
|
|
276
|
+
`[db-backup] VERIFY FAIL: ${res.backup ?? "(none)"} \u2014 ${res.reason}${res.detail ? `: ${res.detail}` : ""}
|
|
277
|
+
`
|
|
278
|
+
);
|
|
279
|
+
recordDbRestoreEvent({
|
|
280
|
+
kind: "restore-verify-fail",
|
|
281
|
+
restoredFrom: res.backup ?? void 0,
|
|
282
|
+
detail: `${res.reason}${res.detail ? `: ${res.detail}` : ""}`
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
} catch {
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
async function verifyBackup(backupPath, opts = {}) {
|
|
289
|
+
const record = opts.record !== false;
|
|
290
|
+
const target = backupPath ?? getLatestBackup();
|
|
291
|
+
if (!target || !existsSync(target)) {
|
|
292
|
+
const res2 = {
|
|
293
|
+
ok: false,
|
|
294
|
+
backup: target ? path.basename(target) : null,
|
|
295
|
+
source: "none",
|
|
296
|
+
integrity: "unreadable",
|
|
297
|
+
tables: [],
|
|
298
|
+
reason: "no-backup",
|
|
299
|
+
detail: "no backup file to verify"
|
|
300
|
+
};
|
|
301
|
+
if (record) await recordVerdict(res2);
|
|
302
|
+
return res2;
|
|
303
|
+
}
|
|
304
|
+
const name = path.basename(target);
|
|
305
|
+
let keyHex;
|
|
306
|
+
if (opts.keyHex !== void 0) {
|
|
307
|
+
keyHex = opts.keyHex;
|
|
308
|
+
} else {
|
|
309
|
+
try {
|
|
310
|
+
const { getMasterKey } = await import("./lib/keychain.js");
|
|
311
|
+
const key = await getMasterKey();
|
|
312
|
+
keyHex = key ? key.toString("hex") : null;
|
|
313
|
+
} catch {
|
|
314
|
+
keyHex = null;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
const scratchParent = opts.scratchParent ?? tmpdir();
|
|
318
|
+
let scratch = null;
|
|
319
|
+
let res;
|
|
320
|
+
try {
|
|
321
|
+
scratch = await mkdtemp(path.join(scratchParent, "exe-bkverify-"));
|
|
322
|
+
const scratchDb = path.join(scratch, name);
|
|
323
|
+
await copyFile(target, scratchDb);
|
|
324
|
+
for (const sfx of ["-wal", "-shm"]) {
|
|
325
|
+
if (existsSync(target + sfx)) {
|
|
326
|
+
try {
|
|
327
|
+
await copyFile(target + sfx, scratchDb + sfx);
|
|
328
|
+
} catch {
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
let client;
|
|
333
|
+
try {
|
|
334
|
+
client = createClient(
|
|
335
|
+
keyHex ? { url: `file:${scratchDb}`, encryptionKey: keyHex } : { url: `file:${scratchDb}` }
|
|
336
|
+
);
|
|
337
|
+
await client.execute("PRAGMA cache_size = -2000");
|
|
338
|
+
} catch (err) {
|
|
339
|
+
res = {
|
|
340
|
+
ok: false,
|
|
341
|
+
backup: name,
|
|
342
|
+
source: "none",
|
|
343
|
+
integrity: "unreadable",
|
|
344
|
+
tables: [],
|
|
345
|
+
reason: "unreadable",
|
|
346
|
+
detail: `cannot open backup with key: ${errMsg(err)}`
|
|
347
|
+
};
|
|
348
|
+
if (record) await recordVerdict(res);
|
|
349
|
+
return res;
|
|
350
|
+
}
|
|
351
|
+
try {
|
|
352
|
+
const integrity = await runIntegrityCheck(client);
|
|
353
|
+
if (integrity !== "ok") {
|
|
354
|
+
res = {
|
|
355
|
+
ok: false,
|
|
356
|
+
backup: name,
|
|
357
|
+
source: "none",
|
|
358
|
+
integrity,
|
|
359
|
+
tables: [],
|
|
360
|
+
reason: integrity === "unreadable" ? "unreadable" : "integrity",
|
|
361
|
+
detail: `integrity check ${integrity}`
|
|
362
|
+
};
|
|
363
|
+
if (record) await recordVerdict(res);
|
|
364
|
+
return res;
|
|
365
|
+
}
|
|
366
|
+
const schemaTables = await collectSchemaTables(client);
|
|
367
|
+
const schemaHash = computeSchemaHash(schemaTables);
|
|
368
|
+
const gotCounts = await collectCounts(client, schemaTables.map((t) => t.name));
|
|
369
|
+
const wantSource = opts.source ?? "auto";
|
|
370
|
+
const manifest = wantSource === "live" ? null : await readManifest(target);
|
|
371
|
+
if (manifest) {
|
|
372
|
+
res = compareToManifest(name, manifest, schemaHash, gotCounts);
|
|
373
|
+
} else {
|
|
374
|
+
res = await compareToLive(name, gotCounts, opts);
|
|
375
|
+
}
|
|
376
|
+
if (record) await recordVerdict(res);
|
|
377
|
+
return res;
|
|
378
|
+
} finally {
|
|
379
|
+
try {
|
|
380
|
+
client.close?.();
|
|
381
|
+
} catch {
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
} catch (err) {
|
|
385
|
+
res = {
|
|
386
|
+
ok: false,
|
|
387
|
+
backup: name,
|
|
388
|
+
source: "none",
|
|
389
|
+
integrity: "unreadable",
|
|
390
|
+
tables: [],
|
|
391
|
+
reason: "unreadable",
|
|
392
|
+
detail: errMsg(err)
|
|
393
|
+
};
|
|
394
|
+
if (record) await recordVerdict(res);
|
|
395
|
+
return res;
|
|
396
|
+
} finally {
|
|
397
|
+
if (scratch) {
|
|
398
|
+
try {
|
|
399
|
+
await rm(scratch, { recursive: true, force: true });
|
|
400
|
+
} catch {
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
async function maybeVerifyDailyBackup(backupPath) {
|
|
406
|
+
if (!dailyVerifyEnabled()) return null;
|
|
407
|
+
if (isCrashLoopBackup(backupPath)) return null;
|
|
408
|
+
try {
|
|
409
|
+
return await verifyBackup(backupPath);
|
|
410
|
+
} catch {
|
|
411
|
+
return null;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
export {
|
|
415
|
+
computeKeyEpoch,
|
|
416
|
+
dailyVerifyEnabled,
|
|
417
|
+
isCrashLoopBackup,
|
|
418
|
+
liveHardEnabled,
|
|
419
|
+
manifestPathFor,
|
|
420
|
+
manifestWriteEnabled,
|
|
421
|
+
maybeVerifyDailyBackup,
|
|
422
|
+
readManifest,
|
|
423
|
+
verifyBackup,
|
|
424
|
+
writeBackupManifest
|
|
425
|
+
};
|
|
@@ -12,16 +12,16 @@ import {
|
|
|
12
12
|
reactivateBehavior,
|
|
13
13
|
storeBehavior,
|
|
14
14
|
storeReflexBehavior
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-OUEFW4RK.js";
|
|
16
|
+
import "./chunk-EDH54E5A.js";
|
|
17
17
|
import "./chunk-CHCA3ZM2.js";
|
|
18
18
|
import "./chunk-OTVEIJUQ.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-7LF5DS3A.js";
|
|
20
|
+
import "./chunk-RP5GETX5.js";
|
|
21
21
|
import "./chunk-MP2AFCGL.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-RWSLVYTE.js";
|
|
23
23
|
import "./chunk-2I23RPSI.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-BV6GBSRP.js";
|
|
25
25
|
import "./chunk-PNQDP3OA.js";
|
|
26
26
|
import "./chunk-H73TUI4Y.js";
|
|
27
27
|
import "./chunk-7HLWBYH7.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
insertOntologyForBatch
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-C2SRRCRK.js";
|
|
5
5
|
import {
|
|
6
6
|
politeBatchPause,
|
|
7
7
|
startManagedJob
|
|
@@ -9,17 +9,17 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
disposeStore,
|
|
11
11
|
initStore
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-EDH54E5A.js";
|
|
13
13
|
import "../chunk-CHCA3ZM2.js";
|
|
14
14
|
import "../chunk-OTVEIJUQ.js";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-7LF5DS3A.js";
|
|
16
|
+
import "../chunk-RP5GETX5.js";
|
|
17
17
|
import "../chunk-MP2AFCGL.js";
|
|
18
18
|
import {
|
|
19
19
|
getClient
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-RWSLVYTE.js";
|
|
21
21
|
import "../chunk-2I23RPSI.js";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-BV6GBSRP.js";
|
|
23
23
|
import "../chunk-PNQDP3OA.js";
|
|
24
24
|
import "../chunk-H73TUI4Y.js";
|
|
25
25
|
import "../chunk-7HLWBYH7.js";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
generateReflectionCheckpoints
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-4FJZ6SO7.js";
|
|
5
|
+
import "../chunk-C2SRRCRK.js";
|
|
6
6
|
import {
|
|
7
7
|
startManagedJob
|
|
8
8
|
} from "../chunk-JSKBHUR7.js";
|
|
9
9
|
import {
|
|
10
10
|
initStore
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-EDH54E5A.js";
|
|
12
12
|
import "../chunk-CHCA3ZM2.js";
|
|
13
13
|
import "../chunk-OTVEIJUQ.js";
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-7LF5DS3A.js";
|
|
15
|
+
import "../chunk-RP5GETX5.js";
|
|
16
16
|
import "../chunk-MP2AFCGL.js";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-RWSLVYTE.js";
|
|
18
18
|
import "../chunk-2I23RPSI.js";
|
|
19
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-BV6GBSRP.js";
|
|
20
20
|
import "../chunk-PNQDP3OA.js";
|
|
21
21
|
import "../chunk-H73TUI4Y.js";
|
|
22
22
|
import "../chunk-7HLWBYH7.js";
|
|
@@ -3,24 +3,24 @@ import {
|
|
|
3
3
|
clean,
|
|
4
4
|
inferSemanticLabel,
|
|
5
5
|
stableId
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-C2SRRCRK.js";
|
|
7
7
|
import {
|
|
8
8
|
politeBatchPause,
|
|
9
9
|
startManagedJob
|
|
10
10
|
} from "../chunk-JSKBHUR7.js";
|
|
11
11
|
import {
|
|
12
12
|
initStore
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-EDH54E5A.js";
|
|
14
14
|
import "../chunk-CHCA3ZM2.js";
|
|
15
15
|
import "../chunk-OTVEIJUQ.js";
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-7LF5DS3A.js";
|
|
17
|
+
import "../chunk-RP5GETX5.js";
|
|
18
18
|
import "../chunk-MP2AFCGL.js";
|
|
19
19
|
import {
|
|
20
20
|
getClient
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-RWSLVYTE.js";
|
|
22
22
|
import "../chunk-2I23RPSI.js";
|
|
23
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-BV6GBSRP.js";
|
|
24
24
|
import "../chunk-PNQDP3OA.js";
|
|
25
25
|
import "../chunk-H73TUI4Y.js";
|
|
26
26
|
import "../chunk-7HLWBYH7.js";
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
flushBatch,
|
|
4
4
|
initStore,
|
|
5
5
|
writeMemory
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-EDH54E5A.js";
|
|
7
7
|
import "../chunk-CHCA3ZM2.js";
|
|
8
8
|
import "../chunk-OTVEIJUQ.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-7LF5DS3A.js";
|
|
10
|
+
import "../chunk-RP5GETX5.js";
|
|
11
11
|
import {
|
|
12
12
|
connectEmbedDaemon,
|
|
13
13
|
embedViaClient
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-UU4UINUX.js";
|
|
15
15
|
import "../chunk-AFNRE2RV.js";
|
|
16
16
|
import "../chunk-3NGZ4PL7.js";
|
|
17
17
|
import "../chunk-NLEW62VC.js";
|
|
@@ -19,9 +19,9 @@ import "../chunk-MP2AFCGL.js";
|
|
|
19
19
|
import {
|
|
20
20
|
getClient,
|
|
21
21
|
isCoordinatorName
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-RWSLVYTE.js";
|
|
23
23
|
import "../chunk-2I23RPSI.js";
|
|
24
|
-
import "../chunk-
|
|
24
|
+
import "../chunk-BV6GBSRP.js";
|
|
25
25
|
import "../chunk-PNQDP3OA.js";
|
|
26
26
|
import "../chunk-H73TUI4Y.js";
|
|
27
27
|
import "../chunk-7HLWBYH7.js";
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
flushBatch,
|
|
4
4
|
initStore,
|
|
5
5
|
writeMemory
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-EDH54E5A.js";
|
|
7
7
|
import "../chunk-CHCA3ZM2.js";
|
|
8
8
|
import "../chunk-OTVEIJUQ.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-7LF5DS3A.js";
|
|
10
|
+
import "../chunk-RP5GETX5.js";
|
|
11
11
|
import {
|
|
12
12
|
connectEmbedDaemon,
|
|
13
13
|
embedViaClient
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-UU4UINUX.js";
|
|
15
15
|
import "../chunk-AFNRE2RV.js";
|
|
16
16
|
import "../chunk-3NGZ4PL7.js";
|
|
17
17
|
import "../chunk-NLEW62VC.js";
|
|
@@ -19,9 +19,9 @@ import "../chunk-MP2AFCGL.js";
|
|
|
19
19
|
import {
|
|
20
20
|
getClient,
|
|
21
21
|
isCoordinatorName
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-RWSLVYTE.js";
|
|
23
23
|
import "../chunk-2I23RPSI.js";
|
|
24
|
-
import "../chunk-
|
|
24
|
+
import "../chunk-BV6GBSRP.js";
|
|
25
25
|
import "../chunk-PNQDP3OA.js";
|
|
26
26
|
import "../chunk-H73TUI4Y.js";
|
|
27
27
|
import "../chunk-7HLWBYH7.js";
|