@askexenow/exe-os 0.9.322 → 0.9.324
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/deploy/stack-manifests/v0.9.json +110 -2
- package/dist/{active-agent-M5NJFEBM.js → active-agent-CVSB2EER.js} +3 -3
- package/dist/{active-agent-SHM4QSRJ.js → active-agent-IUVRZOSF.js} +3 -3
- package/dist/{agentic-ontology-HQKCU7LG.js → agentic-ontology-2QFPBIQP.js} +1 -1
- package/dist/backfill-gate-J7UXFNXU.js +19 -0
- package/dist/{backfill-metadata-CXWFCTBO.js → backfill-metadata-W3PRQPVV.js} +4 -4
- package/dist/{behaviors-J47D342W.js → behaviors-MQCADHAD.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 +80 -77
- package/dist/bin/exe-agent-config.js +3 -3
- package/dist/bin/exe-agent.js +5 -5
- package/dist/bin/exe-assign.js +10 -10
- package/dist/bin/exe-boot.js +32 -23
- package/dist/bin/exe-call.js +5 -5
- 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 +30 -27
- package/dist/bin/exe-new-employee.js +9 -9
- 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 +5 -5
- 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 +51 -34
- 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 +121 -88
- 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/pre-publish.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-STD3NMCR.js} +2 -2
- package/dist/{capacity-monitor-WAEHVBL7.js → capacity-monitor-6O3PWYNM.js} +21 -14
- package/dist/{catchup-brief-L42STIDR.js → catchup-brief-EDQ3VZCF.js} +23 -16
- package/dist/{chunk-HKSJSW2V.js → chunk-2E2NKFXK.js} +1 -1
- package/dist/{chunk-NYFPFOYM.js → chunk-2NY7LZT7.js} +1 -1
- package/dist/{chunk-DGFIXJ4S.js → chunk-2QD5M47V.js} +3 -3
- package/dist/{chunk-3M73L663.js → chunk-2YWUZPHE.js} +2 -2
- package/dist/{chunk-LB77CSLO.js → chunk-2ZW4AQ24.js} +3 -3
- package/dist/{chunk-E32KARET.js → chunk-376J36IW.js} +4 -4
- package/dist/{chunk-CWQAXO3O.js → chunk-5RACW3LX.js} +28 -3
- package/dist/{chunk-VSXGFHJY.js → chunk-5VT45EV6.js} +1 -1
- package/dist/{chunk-X62GD6QW.js → chunk-5YCOEPEX.js} +2 -2
- package/dist/{chunk-TKBWBHFV.js → chunk-6FWMLTF2.js} +1 -1
- package/dist/chunk-6IWLAQ7O.js +40 -0
- package/dist/{chunk-WFHYAKEU.js → chunk-6XAAJ5OV.js} +1 -1
- package/dist/{chunk-4Z47UMMM.js → chunk-7M6TXYRQ.js} +23 -23
- package/dist/{chunk-HWC5W34K.js → chunk-7PLMYXPG.js} +1 -1
- package/dist/{chunk-DDKDN4HV.js → chunk-A47MXY2I.js} +7 -0
- package/dist/{chunk-SQ5JWDJ2.js → chunk-AEFZEJKW.js} +1 -1
- package/dist/{chunk-657AQEPY.js → chunk-AVKZIG4A.js} +1 -1
- package/dist/{chunk-EPBB2OD3.js → chunk-BB5IKY7B.js} +2 -2
- package/dist/{chunk-3JW3ZXCP.js → chunk-BC7IIR3A.js} +65 -39
- package/dist/{chunk-WSYKLS2Y.js → chunk-BDJQWBWF.js} +3 -3
- package/dist/{chunk-VY7345RO.js → chunk-BMSAJ2IH.js} +1 -1
- package/dist/{chunk-OI63OVCR.js → chunk-C7B44DJI.js} +1 -1
- package/dist/{chunk-GA76RGSP.js → chunk-CS6MYGNB.js} +5 -5
- package/dist/{chunk-6N4LYEDI.js → chunk-CSPHV5DJ.js} +1 -1
- package/dist/{chunk-HGM6NZQH.js → chunk-DYUISOIT.js} +1 -1
- package/dist/{signal-paths-4GOIRLGH.js → chunk-EIKATSE4.js} +3 -4
- package/dist/{chunk-G5TP2D2U.js → chunk-EWDTTTZP.js} +3 -3
- package/dist/{chunk-TI6YX3L5.js → chunk-F2RK5YWB.js} +36 -27
- package/dist/{chunk-HV5CUDOE.js → chunk-F6TJIWN5.js} +1 -1
- package/dist/{chunk-WCCR5IFR.js → chunk-FPTBCPI3.js} +2 -2
- package/dist/{chunk-QVFJCFNM.js → chunk-FROUDYRT.js} +33 -2
- package/dist/{chunk-T6AUMO5X.js → chunk-GIFDGNIL.js} +1 -1
- package/dist/{chunk-OFR7KQ37.js → chunk-HAYDXMW6.js} +3 -3
- package/dist/{chunk-V2ESQU3S.js → chunk-HBKYKN3S.js} +3 -3
- package/dist/{chunk-LCZ55G5G.js → chunk-HZ5J2GFE.js} +136 -66
- package/dist/{chunk-EOPSIIEH.js → chunk-ID3V4BWS.js} +1 -1
- package/dist/{chunk-ABGDTMKC.js → chunk-JRD7ARQ6.js} +60 -2
- package/dist/{chunk-7FBPLVHM.js → chunk-KADUJ7PE.js} +3 -3
- package/dist/{chunk-KLG53B63.js → chunk-KJOQLNX2.js} +1 -1
- package/dist/{chunk-AZL3EUR3.js → chunk-KK67DSCO.js} +229 -29
- package/dist/{chunk-H2SD2EA7.js → chunk-KLDQFOFY.js} +23 -9
- package/dist/chunk-KPIN44GZ.js +67 -0
- package/dist/{chunk-PLBDXCYZ.js → chunk-KUJGADX6.js} +1491 -606
- package/dist/{chunk-GN3IWZDH.js → chunk-KWWHRJGG.js} +660 -539
- package/dist/{chunk-ERSFOJGC.js → chunk-LUOQCGBO.js} +20 -11
- package/dist/{chunk-CXXERHNC.js → chunk-LWAGAC3H.js} +1 -1
- package/dist/{chunk-7BZ6TOZN.js → chunk-MB2YT5VQ.js} +3 -3
- package/dist/{chunk-KXP3CUTL.js → chunk-MCEXBLLK.js} +3 -3
- package/dist/{chunk-A3KUGBDP.js → chunk-MIWPKWXQ.js} +1 -1
- package/dist/{chunk-7CUF27OT.js → chunk-MKIFYIXC.js} +1 -1
- package/dist/{chunk-ONKIWA3R.js → chunk-ML4S5SHZ.js} +3 -1
- package/dist/{chunk-BFHBHQFA.js → chunk-MWIX3YKA.js} +5 -5
- package/dist/{chunk-6UQRJCKK.js → chunk-NBDTQVWU.js} +2 -2
- package/dist/{chunk-KK4ZOYXJ.js → chunk-NGACCR2M.js} +80 -40
- package/dist/{chunk-CMDC5D7S.js → chunk-NLEW62VC.js} +6 -0
- package/dist/{chunk-QYLDCPNG.js → chunk-PGFYWVOB.js} +1 -1
- package/dist/{chunk-XEBN5CPD.js → chunk-PGUISLOT.js} +3 -3
- package/dist/{chunk-MYMA23KC.js → chunk-PJTEZLAM.js} +1 -1
- package/dist/{chunk-QNUHDEPI.js → chunk-POOMY3CS.js} +4 -4
- package/dist/{chunk-2GBGIXKH.js → chunk-PV7IG4V6.js} +1 -1
- package/dist/{chunk-SENJA7BZ.js → chunk-QDI77B3E.js} +54 -7
- package/dist/{chunk-XLNF3CIO.js → chunk-QGOMYIVT.js} +119 -24
- package/dist/{chunk-HIOO7DZ2.js → chunk-QQFZ32WS.js} +5 -5
- package/dist/{chunk-KL5WYWS3.js → chunk-SOXUF34Y.js} +2 -2
- package/dist/{chunk-6XM6PZXQ.js → chunk-SPO2RLOB.js} +1 -1
- package/dist/{chunk-ROMB2HH4.js → chunk-T3XHH5FE.js} +6 -6
- package/dist/{chunk-6SXJZHRJ.js → chunk-TA3A4UQL.js} +1 -1
- package/dist/{chunk-XP53WEXP.js → chunk-TGVKQ3QB.js} +3 -3
- package/dist/{chunk-XC7C3GQ2.js → chunk-TNS6U2K7.js} +30 -19
- package/dist/{chunk-JXEMAB4M.js → chunk-UAIMI7CK.js} +1 -1
- package/dist/{chunk-YIFZZYQD.js → chunk-UBYAKNRF.js} +2 -2
- package/dist/{chunk-6IBUQBMY.js → chunk-UXYQLOFW.js} +198 -39
- package/dist/{chunk-C4BIZXKB.js → chunk-UYOW7U24.js} +1 -1
- package/dist/{chunk-NFM6VHL7.js → chunk-V4VYIHSL.js} +1 -1
- package/dist/{chunk-QQOH3I4A.js → chunk-VDUHWQFA.js} +1 -1
- package/dist/{chunk-EVUXF2G4.js → chunk-W5GBB23I.js} +1 -1
- package/dist/{chunk-FANIBYUO.js → chunk-WF3J6GJZ.js} +2 -2
- package/dist/{chunk-NAHAOFTY.js → chunk-WGHTISNK.js} +3 -3
- package/dist/{chunk-F5FAD2YR.js → chunk-WGOAILWE.js} +2 -2
- package/dist/{chunk-LOE2N23P.js → chunk-WJICX53Z.js} +1 -1
- package/dist/{skill-refinement-YLIAY7V4.js → chunk-Y2KBHLEO.js} +3 -11
- package/dist/{chunk-PISGLNV7.js → chunk-Y34FDPOY.js} +5 -5
- package/dist/{chunk-ORC5AO7E.js → chunk-YBHOWK3L.js} +2 -2
- package/dist/{chunk-7SDS5VCL.js → chunk-ZDNJ3TSB.js} +7 -7
- package/dist/{chunk-CHSRSESS.js → chunk-ZRZ2Z6RZ.js} +1 -1
- package/dist/{cleanup-graph-garbage-MX5JDTJA.js → cleanup-graph-garbage-2YH52ADR.js} +4 -4
- package/dist/{co-activation-K44LGZ7A.js → co-activation-7F3J2GC7.js} +2 -2
- package/dist/{co-occurrence-N62HJTRP.js → co-occurrence-B36Q5GY3.js} +2 -2
- package/dist/{code-context-index-6YQ3DGCN.js → code-context-index-2PUBBQOE.js} +3 -3
- package/dist/{crdt-sync-BO76VVRX.js → crdt-sync-MXHPR6V6.js} +1 -1
- package/dist/{crm-bridge-BVTB6LZK.js → crm-bridge-CZLEW2LW.js} +1 -1
- package/dist/{crm-webhook-UZLTHXAS.js → crm-webhook-56MWGMRY.js} +2 -2
- package/dist/{cto-delegation-gate-NVMRONA2.js → cto-delegation-gate-26BD7NEE.js} +19 -12
- package/dist/{daemon-orchestration-JI3RD5EZ.js → daemon-orchestration-IBP6PWEG.js} +31 -16
- package/dist/{db-backup-ITRADB2J.js → db-backup-XLID57KW.js} +1 -1
- package/dist/{doc-graph-extractor-L7YESUSI.js → doc-graph-extractor-VBZ6XTTE.js} +2 -2
- package/dist/{documents-7BFXA6V3.js → documents-C5LYSJT3.js} +10 -10
- package/dist/{dreaming-NRTMPNPZ.js → dreaming-LMVDIC5C.js} +20 -13
- package/dist/{exe-drift-GLJIM7EI.js → exe-drift-T3K6WA47.js} +3 -3
- package/dist/{exe-export-THIAYHXK.js → exe-export-QCTASWXI.js} +7 -7
- package/dist/{exe-import-3Y4VOUYL.js → exe-import-WNP5A7VA.js} +7 -7
- package/dist/{exe-key-IPGY4RMU.js → exe-key-JM3JXE2E.js} +78 -75
- package/dist/{exe-snapshot-2ZEWCDYK.js → exe-snapshot-ODDJUEM5.js} +23 -16
- package/dist/{fast-db-init-TLYUWCDE.js → fast-db-init-O6A3TK3F.js} +1 -1
- package/dist/{founder-context-J362DNU4.js → founder-context-FYTF4IMD.js} +2 -2
- package/dist/gateway/index.js +9 -9
- package/dist/{git-staleness-BRDHTHNS.js → git-staleness-YA5J6VYJ.js} +2 -2
- package/dist/{global-procedures-FNUKY2LF.js → global-procedures-76NDWTYN.js} +4 -4
- package/dist/{graph-auto-extract-AJZUV3PO.js → graph-auto-extract-I7QL2TY5.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-3EYHBKWB.js} +5 -5
- package/dist/{installer-UEF44TWQ.js → installer-3VZMDDMJ.js} +5 -5
- package/dist/{installer-2EKTDQZB.js → installer-GYABVCB7.js} +5 -5
- package/dist/intercom-queue-ZCNT4LYU.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 +5 -5
- package/dist/lib/employees.js +2 -2
- package/dist/lib/exe-daemon-client.js +2 -2
- package/dist/lib/exe-daemon.js +393 -140
- 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 +6 -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 +29 -12
- package/dist/lib/token-spend.js +3 -3
- package/dist/{license-gate-YUUSIPJ7.js → license-gate-73XGUIVP.js} +3 -3
- package/dist/{license-sync-LX73IEBH.js → license-sync-CG5YRUVH.js} +2 -2
- package/dist/mcp/register-tools.js +75 -72
- package/dist/mcp/server.js +96 -130
- 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-TT7PXZLX.js} +3 -3
- package/dist/{memory-cards-MGZ4P3AA.js → memory-cards-6NGUDUDN.js} +4 -4
- package/dist/{memory-graph-extractor-44P2ATID.js → memory-graph-extractor-FIMS3VQR.js} +3 -3
- package/dist/{memory-poisoning-defense-3CYFKNLA.js → memory-poisoning-defense-M3LOQ3XU.js} +2 -2
- package/dist/{memory-pressure-watchdog-6PFLEOUO.js → memory-pressure-watchdog-45GABDWH.js} +20 -13
- package/dist/{memory-queue-client-BZD6MXA5.js → memory-queue-client-BDYKFNB4.js} +3 -3
- package/dist/{memory-reflection-AYPJRPU7.js → memory-reflection-LANCFYK2.js} +7 -9
- package/dist/{notifications-BBQ23ORD.js → notifications-N5NKUYAU.js} +19 -12
- package/dist/{orchestration-events-O5P5NEKS.js → orchestration-events-KVNRNIPR.js} +3 -3
- package/dist/{orchestrator-SERM6FDY.js → orchestrator-VTF5BR26.js} +21 -14
- package/dist/{pipeline-router-T673WGL3.js → pipeline-router-KQAYWDPH.js} +3 -3
- package/dist/{plan-limits-QWBN2EKH.js → plan-limits-EUZI4X5W.js} +5 -5
- package/dist/{projection-worker-K6TILAZH.js → projection-worker-FG6G226D.js} +12 -2
- package/dist/{prospective-memory-XRNRMEDL.js → prospective-memory-FVDNUSIL.js} +2 -2
- package/dist/{reranker-3XC5UM4F.js → reranker-54Q3L32E.js} +1 -1
- package/dist/{retrieval-health-ULVVOIPL.js → retrieval-health-YJ7CXYVD.js} +1 -1
- package/dist/{review-polling-5YGDPJUX.js → review-polling-TKXYSXH6.js} +20 -13
- package/dist/runtime/index.js +23 -16
- package/dist/{session-events-D52HNUJK.js → session-events-WQHTP65R.js} +20 -13
- package/dist/{session-kill-telemetry-IBNCJSI7.js → session-kill-telemetry-2HSE7IGH.js} +20 -13
- package/dist/{session-scope-5FWZ4AYR.js → session-scope-RBKAC75W.js} +19 -12
- package/dist/{setup-wizard-KVTLSSRD.js → setup-wizard-AA6ZV57H.js} +1 -1
- package/dist/signal-paths-4G53QTII.js +11 -0
- package/dist/skill-refinement-QI35LMTZ.js +20 -0
- package/dist/{stack-update-OWWGTYRB.js → stack-update-BE6PX4AG.js} +9 -3
- package/dist/{steward-gate-3ZITRYVH.js → steward-gate-2XD5BXH6.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-DMOCBRLB.js} +191 -17
- package/dist/{task-scope-OIHLMQOQ.js → task-scope-ULBNFBFH.js} +25 -12
- package/dist/{tasks-crud-QUIIRWE3.js → tasks-crud-6SJOKES5.js} +25 -12
- package/dist/{tasks-notify-ANYLB5GU.js → tasks-notify-TESRABUM.js} +20 -13
- package/dist/{tasks-review-BWSCXFMB.js → tasks-review-INDAGLWJ.js} +27 -14
- package/dist/{telemetry-upload-XLDBCD7B.js → telemetry-upload-6XB3Q3IH.js} +7 -7
- package/dist/{token-budget-OQCLPV3A.js → token-budget-NOF27AZC.js} +3 -3
- package/dist/{tool-capability-index-3UWKZZED.js → tool-capability-index-EFBBPTBI.js} +1 -1
- package/dist/{tool-telemetry-AQTFWOWG.js → tool-telemetry-OEK6KQFF.js} +1 -1
- package/dist/tui/App.js +28 -21
- package/dist/{tui-data-3Y5L5LJB.js → tui-data-EG6LEZFF.js} +19 -12
- package/dist/{worker-gate-WJS2MFNA.js → worker-gate-YA35VMAN.js} +1 -1
- package/dist/{workflow-engine-EPPZ226V.js → workflow-engine-3AVKRE5I.js} +2 -2
- package/dist/{worktree-OYGDGJP7.js → worktree-72QYYL5L.js} +4 -4
- package/dist/{worktree-sweep-KV4H4766.js → worktree-sweep-GDISKGQ2.js} +5 -5
- package/package.json +1 -1
- package/release-notes.json +45 -45
- 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-QTEHH4LG.js → chunk-24WPWCD6.js} +0 -0
- /package/dist/{chunk-IZY6V4FI.js → chunk-4O3N7I5Z.js} +0 -0
- /package/dist/{chunk-WXRVHXVP.js → chunk-7577GDDG.js} +0 -0
- /package/dist/{chunk-Q5YKWFVO.js → chunk-EWKZKO7F.js} +0 -0
- /package/dist/{chunk-DY3J6GQO.js → chunk-H43BPGIV.js} +0 -0
- /package/dist/{chunk-DQJ3WZRK.js → chunk-IHRXCNSC.js} +0 -0
- /package/dist/{chunk-RRQI5PSJ.js → chunk-NIB2N6L2.js} +0 -0
- /package/dist/{chunk-ZU6767WK.js → chunk-QMUSJESS.js} +0 -0
- /package/dist/{chunk-72LWCZTJ.js → chunk-RXS2LBKE.js} +0 -0
- /package/dist/{chunk-SJZT66LM.js → chunk-SNFYZFXY.js} +0 -0
- /package/dist/{chunk-SIJSFULW.js → chunk-TSYMWC53.js} +0 -0
- /package/dist/{core-memory-DARTILJG.js → core-memory-NKKP2XUB.js} +0 -0
- /package/dist/{entity-boost-VR5YOQCT.js → entity-boost-DRIUFTYB.js} +0 -0
- /package/dist/{message-queue-client-HVFR67QH.js → message-queue-client-4ERC7HLX.js} +0 -0
- /package/dist/{oauth-server-UQHCFVHT.js → oauth-server-PECJREY2.js} +0 -0
- /package/dist/{project-boot-22ZZL2GE.js → project-boot-SFKP2MFW.js} +0 -0
- /package/dist/{wiki-acl-EZMGL6KW.js → wiki-acl-QIBDNXSM.js} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-2I23RPSI.js";
|
|
4
4
|
import {
|
|
5
5
|
listBackups
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7577GDDG.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, fstatSync } 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-LANCFYK2.js");
|
|
1123
1123
|
const keyForRow = (row) => {
|
|
1124
1124
|
let sources = [];
|
|
1125
1125
|
try {
|
|
@@ -1199,44 +1199,135 @@ var _checkpointInProgress = false;
|
|
|
1199
1199
|
var _daemonClient = null;
|
|
1200
1200
|
var _adapterClient = null;
|
|
1201
1201
|
var _lockFd = null;
|
|
1202
|
-
var
|
|
1203
|
-
function
|
|
1204
|
-
|
|
1202
|
+
var _lockIdentity = null;
|
|
1203
|
+
function dbLockPath() {
|
|
1204
|
+
return process.env.EXE_DB_LOCK_PATH ?? join(homedir(), ".exe-os", "db.lock");
|
|
1205
|
+
}
|
|
1206
|
+
function dbLockWaitMs() {
|
|
1207
|
+
const raw = Number(process.env.EXE_DB_LOCK_WAIT_MS);
|
|
1208
|
+
return Number.isFinite(raw) && raw > 0 ? raw : 15e3;
|
|
1209
|
+
}
|
|
1210
|
+
var DB_LOCK_STALE_MS = 6e4;
|
|
1211
|
+
var DbLockHeldError = class extends Error {
|
|
1212
|
+
constructor(holderPid, waitedMs) {
|
|
1213
|
+
super(
|
|
1214
|
+
`[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.`
|
|
1215
|
+
);
|
|
1216
|
+
this.name = "DbLockHeldError";
|
|
1217
|
+
}
|
|
1218
|
+
};
|
|
1219
|
+
function readLockHolderPid(lockPath) {
|
|
1220
|
+
try {
|
|
1221
|
+
const pid = parseInt(readFileSync3(lockPath, "utf8").trim(), 10);
|
|
1222
|
+
return Number.isInteger(pid) && pid > 0 ? pid : null;
|
|
1223
|
+
} catch {
|
|
1224
|
+
return null;
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
function pidIsAlive(pid) {
|
|
1205
1228
|
try {
|
|
1206
|
-
|
|
1229
|
+
process.kill(pid, 0);
|
|
1230
|
+
return true;
|
|
1207
1231
|
} catch (err) {
|
|
1208
|
-
|
|
1232
|
+
return err.code === "EPERM";
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
function tryTakeLock(lockPath) {
|
|
1236
|
+
_lockFd = openSync(lockPath, "wx");
|
|
1237
|
+
try {
|
|
1238
|
+
writeSync(_lockFd, `${process.pid}
|
|
1239
|
+
`);
|
|
1240
|
+
fsyncSync(_lockFd);
|
|
1241
|
+
const st = fstatSync(_lockFd);
|
|
1242
|
+
_lockIdentity = { path: lockPath, dev: st.dev, ino: st.ino };
|
|
1243
|
+
} catch (e) {
|
|
1244
|
+
logCatchDebug("lock pid write", e);
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
async function acquireDbLock(options = {}) {
|
|
1248
|
+
const lockPath = dbLockPath();
|
|
1249
|
+
const waitMs = options.waitMs ?? dbLockWaitMs();
|
|
1250
|
+
const role = options.role ?? (process.env.EXE_IS_DAEMON === "1" ? "daemon" : "cli");
|
|
1251
|
+
const exit = options.exit ?? ((code) => process.exit(code));
|
|
1252
|
+
const isAlive = options.isPidAlive ?? pidIsAlive;
|
|
1253
|
+
mkdirSync2(join(lockPath, ".."), { recursive: true });
|
|
1254
|
+
const start = Date.now();
|
|
1255
|
+
let backoffMs = options.initialBackoffMs ?? 100;
|
|
1256
|
+
let warned = false;
|
|
1257
|
+
for (; ; ) {
|
|
1258
|
+
try {
|
|
1259
|
+
tryTakeLock(lockPath);
|
|
1260
|
+
return;
|
|
1261
|
+
} catch (err) {
|
|
1262
|
+
if (!(err && typeof err === "object" && "code" in err && err.code === "EEXIST")) {
|
|
1263
|
+
throw err;
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
const holderPid = readLockHolderPid(lockPath);
|
|
1267
|
+
let stale = false;
|
|
1268
|
+
if (holderPid !== null) {
|
|
1269
|
+
stale = !isAlive(holderPid);
|
|
1270
|
+
} else {
|
|
1209
1271
|
try {
|
|
1210
|
-
|
|
1211
|
-
if (Date.now() - lockStat.mtimeMs > 6e4) {
|
|
1212
|
-
unlinkSync2(DB_LOCK_PATH);
|
|
1213
|
-
_lockFd = openSync(DB_LOCK_PATH, "wx");
|
|
1214
|
-
return;
|
|
1215
|
-
}
|
|
1272
|
+
stale = Date.now() - statSync(lockPath).mtimeMs > DB_LOCK_STALE_MS;
|
|
1216
1273
|
} catch (e) {
|
|
1217
1274
|
logCatchDebug("stale lock check", e);
|
|
1275
|
+
continue;
|
|
1218
1276
|
}
|
|
1277
|
+
}
|
|
1278
|
+
if (stale) {
|
|
1219
1279
|
process.stderr.write(
|
|
1220
|
-
|
|
1280
|
+
`[database] db.lock is stale (holder ${holderPid !== null ? `pid ${holderPid} is dead` : "unknown, lock older than 60s"}) \u2014 breaking lock.
|
|
1281
|
+
`
|
|
1282
|
+
);
|
|
1283
|
+
try {
|
|
1284
|
+
unlinkSync2(lockPath);
|
|
1285
|
+
} catch (e) {
|
|
1286
|
+
logCatchDebug("stale lock unlink", e);
|
|
1287
|
+
}
|
|
1288
|
+
continue;
|
|
1289
|
+
}
|
|
1290
|
+
const waited = Date.now() - start;
|
|
1291
|
+
if (waited >= waitMs) {
|
|
1292
|
+
if (role === "daemon") {
|
|
1293
|
+
process.stderr.write(
|
|
1294
|
+
`[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.
|
|
1295
|
+
`
|
|
1296
|
+
);
|
|
1297
|
+
return exit(1);
|
|
1298
|
+
}
|
|
1299
|
+
throw new DbLockHeldError(holderPid, waited);
|
|
1300
|
+
}
|
|
1301
|
+
if (!warned) {
|
|
1302
|
+
warned = true;
|
|
1303
|
+
process.stderr.write(
|
|
1304
|
+
`[database] db.lock held by ${holderPid ? `pid ${holderPid}` : "another process"} \u2014 retrying with backoff for up to ${waitMs}ms.
|
|
1305
|
+
`
|
|
1221
1306
|
);
|
|
1222
|
-
return;
|
|
1223
1307
|
}
|
|
1224
|
-
|
|
1308
|
+
await new Promise((resolve) => setTimeout(resolve, Math.min(backoffMs, waitMs - waited)));
|
|
1309
|
+
backoffMs = Math.min(backoffMs * 2, 1e3);
|
|
1225
1310
|
}
|
|
1226
1311
|
}
|
|
1227
1312
|
function releaseDbLock() {
|
|
1228
1313
|
if (_lockFd !== null) {
|
|
1314
|
+
const identity = _lockIdentity;
|
|
1229
1315
|
try {
|
|
1230
1316
|
closeSync(_lockFd);
|
|
1231
1317
|
} catch (e) {
|
|
1232
1318
|
logCatchDebug("lock close", e);
|
|
1233
1319
|
}
|
|
1234
1320
|
_lockFd = null;
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1321
|
+
_lockIdentity = null;
|
|
1322
|
+
try {
|
|
1323
|
+
const lockPath = identity?.path ?? dbLockPath();
|
|
1324
|
+
const st = statSync(lockPath);
|
|
1325
|
+
if (!identity || st.dev === identity.dev && st.ino === identity.ino) {
|
|
1326
|
+
unlinkSync2(lockPath);
|
|
1327
|
+
}
|
|
1328
|
+
} catch (e) {
|
|
1329
|
+
logCatchDebug("lock unlink", e);
|
|
1330
|
+
}
|
|
1240
1331
|
}
|
|
1241
1332
|
}
|
|
1242
1333
|
var CORRUPTION_ERROR_RE = /malformed|disk image|sqlite_corrupt|database is corrupt|corrupt(ed)? (database|page|index)|btree/i;
|
|
@@ -1368,7 +1459,7 @@ async function _attemptBackupRestore(config) {
|
|
|
1368
1459
|
} catch {
|
|
1369
1460
|
}
|
|
1370
1461
|
try {
|
|
1371
|
-
const { pruneCorruptQuarantine } = await import("./db-backup-
|
|
1462
|
+
const { pruneCorruptQuarantine } = await import("./db-backup-XLID57KW.js");
|
|
1372
1463
|
pruneCorruptQuarantine();
|
|
1373
1464
|
} catch {
|
|
1374
1465
|
}
|
|
@@ -1479,7 +1570,7 @@ async function optimizeFtsIndexes(client = getRawClient(), pages = FTS_MERGE_PAG
|
|
|
1479
1570
|
var initTurso = initDatabase;
|
|
1480
1571
|
async function initDatabase(config) {
|
|
1481
1572
|
assertValidDbPath(config?.dbPath, "initDatabase");
|
|
1482
|
-
acquireDbLock();
|
|
1573
|
+
await acquireDbLock();
|
|
1483
1574
|
if (existsSync3(config.dbPath)) {
|
|
1484
1575
|
const dbStat = statSync(config.dbPath);
|
|
1485
1576
|
if (dbStat.size === 0) {
|
|
@@ -3669,6 +3760,10 @@ async function disposeDatabase() {
|
|
|
3669
3760
|
}
|
|
3670
3761
|
|
|
3671
3762
|
export {
|
|
3763
|
+
dbLockWaitMs,
|
|
3764
|
+
DbLockHeldError,
|
|
3765
|
+
acquireDbLock,
|
|
3766
|
+
releaseDbLock,
|
|
3672
3767
|
WAL_ESCALATION_THRESHOLD_BYTES,
|
|
3673
3768
|
checkpointWalIfLarge,
|
|
3674
3769
|
runWalCheckpoint,
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
recordSessionKill
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EWDTTTZP.js";
|
|
4
4
|
import {
|
|
5
5
|
sessionScopeFilter,
|
|
6
6
|
verifyPaneAtCapacity,
|
|
7
7
|
writeNotification
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KUJGADX6.js";
|
|
9
9
|
import {
|
|
10
10
|
listSessions
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JRD7ARQ6.js";
|
|
12
12
|
import {
|
|
13
13
|
getTransport
|
|
14
14
|
} from "./chunk-RMOBQ6A5.js";
|
|
15
15
|
import {
|
|
16
16
|
recordOrchestrationEventBestEffort
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-F6TJIWN5.js";
|
|
18
18
|
import {
|
|
19
19
|
getClient,
|
|
20
20
|
isCoordinatorName
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-QGOMYIVT.js";
|
|
22
22
|
|
|
23
23
|
// src/lib/capacity-monitor.ts
|
|
24
24
|
var CAPACITY_PATTERNS = [
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-CLAYNAXC.js";
|
|
4
4
|
import {
|
|
5
5
|
buildClaudeHttpMcpEntry
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2E2NKFXK.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-7PLMYXPG.js";
|
|
15
15
|
import {
|
|
16
16
|
MCP_LEGACY_KEY,
|
|
17
17
|
MCP_PRIMARY_KEY
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
formatDegradations,
|
|
3
3
|
getRetrievalHealth
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-24WPWCD6.js";
|
|
5
5
|
import {
|
|
6
6
|
buildRestartReport,
|
|
7
7
|
formatRestartReport
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./chunk-OTVEIJUQ.js";
|
|
17
17
|
import {
|
|
18
18
|
offloadReadIfMain
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-QGOMYIVT.js";
|
|
20
20
|
import {
|
|
21
21
|
isMainModule
|
|
22
22
|
} from "./chunk-6Y4B3QF6.js";
|
|
@@ -654,7 +654,7 @@ async function auditKeyHealth() {
|
|
|
654
654
|
}
|
|
655
655
|
async function auditOutbox() {
|
|
656
656
|
try {
|
|
657
|
-
const { getOutboxStatus } = await import("./support-outbox-
|
|
657
|
+
const { getOutboxStatus } = await import("./support-outbox-MGUVVGHT.js");
|
|
658
658
|
return await getOutboxStatus();
|
|
659
659
|
} catch {
|
|
660
660
|
return {
|
|
@@ -959,7 +959,7 @@ function formatReport(report, flags) {
|
|
|
959
959
|
return lines.join("\n");
|
|
960
960
|
}
|
|
961
961
|
async function fixNullVectors() {
|
|
962
|
-
const { tryAcquireWorkerSlot, registerWorkerPid } = await import("./worker-gate-
|
|
962
|
+
const { tryAcquireWorkerSlot, registerWorkerPid } = await import("./worker-gate-YA35VMAN.js");
|
|
963
963
|
if (!tryAcquireWorkerSlot()) {
|
|
964
964
|
process.stderr.write("[exe-doctor] Worker gate full \u2014 waiting for existing backfill workers to finish\n");
|
|
965
965
|
await new Promise((r) => setTimeout(r, 5e3));
|
|
@@ -1144,7 +1144,7 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
1144
1144
|
console.log(formatRestartReport(restartReport));
|
|
1145
1145
|
return emptyAuditReport();
|
|
1146
1146
|
}
|
|
1147
|
-
const { fastDbInit } = await import("./fast-db-init-
|
|
1147
|
+
const { fastDbInit } = await import("./fast-db-init-O6A3TK3F.js");
|
|
1148
1148
|
const client = await fastDbInit();
|
|
1149
1149
|
const report = await runAudit(client, flags);
|
|
1150
1150
|
console.log(formatReport(report, flags));
|
|
@@ -1155,7 +1155,7 @@ ${mode} Applying repairs...
|
|
|
1155
1155
|
`);
|
|
1156
1156
|
if (!flags.dryRun) {
|
|
1157
1157
|
try {
|
|
1158
|
-
const { createBackup } = await import("./db-backup-
|
|
1158
|
+
const { createBackup } = await import("./db-backup-XLID57KW.js");
|
|
1159
1159
|
const backupPath = await createBackup("pre-fix");
|
|
1160
1160
|
if (backupPath) {
|
|
1161
1161
|
console.log(` Backup created: ${backupPath.split("/").pop()}`);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateTask
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZDNJ3TSB.js";
|
|
4
4
|
import {
|
|
5
5
|
TASK_ALREADY_CLAIMED_PREFIX
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KUJGADX6.js";
|
|
7
7
|
|
|
8
8
|
// src/mcp/tools/update-task.ts
|
|
9
9
|
import { z } from "zod";
|
|
@@ -40,7 +40,7 @@ function registerUpdateTask(server) {
|
|
|
40
40
|
let callerAgentId;
|
|
41
41
|
let callerSession;
|
|
42
42
|
try {
|
|
43
|
-
const { getActiveAgent: getAgent } = await import("./active-agent-
|
|
43
|
+
const { getActiveAgent: getAgent } = await import("./active-agent-IUVRZOSF.js");
|
|
44
44
|
callerAgentId = getAgent().agentId;
|
|
45
45
|
const { getAgentContext } = await import("./agent-context-AZTTMUHP.js");
|
|
46
46
|
callerSession = getAgentContext()?.sessionHint || process.env.EXE_SESSION_NAME || process.env.EXE_SESSION || void 0;
|
|
@@ -7,27 +7,35 @@ import {
|
|
|
7
7
|
} from "./chunk-PROQW3NL.js";
|
|
8
8
|
import {
|
|
9
9
|
vectorToBlob
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KLDQFOFY.js";
|
|
11
11
|
import {
|
|
12
12
|
extractKeywords,
|
|
13
13
|
keywordsToString
|
|
14
14
|
} from "./chunk-CHCA3ZM2.js";
|
|
15
15
|
import {
|
|
16
16
|
isCoordinatorName
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-QGOMYIVT.js";
|
|
18
18
|
|
|
19
19
|
// src/lib/consolidation.ts
|
|
20
20
|
import { randomUUID } from "crypto";
|
|
21
|
+
async function readOffLoop(client, sql, args) {
|
|
22
|
+
if (process.env.EXE_IS_DAEMON === "1") {
|
|
23
|
+
const { offloadReadQuery } = await import("./lib/database.js");
|
|
24
|
+
return offloadReadQuery(sql, args);
|
|
25
|
+
}
|
|
26
|
+
return client.execute({ sql, args });
|
|
27
|
+
}
|
|
21
28
|
async function selectUnconsolidated(client, limit = 200) {
|
|
22
|
-
const result = await
|
|
23
|
-
|
|
29
|
+
const result = await readOffLoop(
|
|
30
|
+
client,
|
|
31
|
+
`SELECT id, agent_id, project_name, tool_name, raw_text, timestamp, memory_type, session_scope
|
|
24
32
|
FROM memories
|
|
25
33
|
WHERE consolidated = 0
|
|
26
34
|
AND COALESCE(memory_type, 'raw') != 'procedure'
|
|
27
35
|
ORDER BY timestamp DESC
|
|
28
36
|
LIMIT ?`,
|
|
29
|
-
|
|
30
|
-
|
|
37
|
+
[limit]
|
|
38
|
+
);
|
|
31
39
|
return result.rows.map((row) => ({
|
|
32
40
|
id: row.id,
|
|
33
41
|
agent_id: row.agent_id,
|
|
@@ -324,9 +332,10 @@ async function runConsolidation(client, options) {
|
|
|
324
332
|
let memoriesConsolidated = 0;
|
|
325
333
|
let clustersFailed = 0;
|
|
326
334
|
let attemptedSynthesis = 0;
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
if (
|
|
335
|
+
const { runBudgetedSweep } = await import("./sweep-budget-WB2FKPYN.js");
|
|
336
|
+
await runBudgetedSweep(clusters, async (cluster) => {
|
|
337
|
+
if (clustersProcessed >= options.maxCalls) return false;
|
|
338
|
+
if (cluster.memories.length < 3) return;
|
|
330
339
|
try {
|
|
331
340
|
const isCoordinator = isCoordinatorName(cluster.agentId);
|
|
332
341
|
const agentRole = roleMap[cluster.agentId];
|
|
@@ -336,7 +345,7 @@ async function runConsolidation(client, options) {
|
|
|
336
345
|
const synthesis = await consolidateCluster(cluster, options.model, agentRole);
|
|
337
346
|
if (!synthesis.trim()) {
|
|
338
347
|
if (dedupCount > 0) clustersProcessed++;
|
|
339
|
-
|
|
348
|
+
return;
|
|
340
349
|
}
|
|
341
350
|
const result = await storeConsolidation(client, cluster, synthesis, options.embedFn);
|
|
342
351
|
if (isCoordinator && options.wikiConfig) {
|
|
@@ -369,7 +378,7 @@ async function runConsolidation(client, options) {
|
|
|
369
378
|
`
|
|
370
379
|
);
|
|
371
380
|
}
|
|
372
|
-
}
|
|
381
|
+
}, { label: "consolidation" });
|
|
373
382
|
if (attemptedSynthesis > 0 && clustersFailed >= attemptedSynthesis) {
|
|
374
383
|
throw new Error(
|
|
375
384
|
`[consolidation] All ${clustersFailed} synthesis cluster(s) failed \u2014 consolidation is non-functional. Check ANTHROPIC_API_KEY/ANTHROPIC_AUTH_TOKEN and consolidationModel (${options.model}).`
|
|
@@ -427,13 +436,14 @@ function cosineSimilarity(a, b) {
|
|
|
427
436
|
return denom === 0 ? 0 : dot / denom;
|
|
428
437
|
}
|
|
429
438
|
async function isUserIdle(client, idleMinutes = 30) {
|
|
430
|
-
const result = await
|
|
431
|
-
|
|
439
|
+
const result = await readOffLoop(
|
|
440
|
+
client,
|
|
441
|
+
`SELECT MAX(timestamp) as last_activity
|
|
432
442
|
FROM memories
|
|
433
443
|
WHERE tool_name != 'consolidation'
|
|
434
444
|
AND timestamp >= datetime('now', '-1 day')`,
|
|
435
|
-
|
|
436
|
-
|
|
445
|
+
[]
|
|
446
|
+
);
|
|
437
447
|
const lastActivity = result.rows[0]?.last_activity;
|
|
438
448
|
if (!lastActivity) return true;
|
|
439
449
|
const lastMs = new Date(lastActivity).getTime();
|
|
@@ -441,12 +451,13 @@ async function isUserIdle(client, idleMinutes = 30) {
|
|
|
441
451
|
return now - lastMs >= idleMinutes * 60 * 1e3;
|
|
442
452
|
}
|
|
443
453
|
async function countUnconsolidated(client) {
|
|
444
|
-
const result = await
|
|
445
|
-
|
|
454
|
+
const result = await readOffLoop(
|
|
455
|
+
client,
|
|
456
|
+
`SELECT COUNT(*) as cnt FROM memories
|
|
446
457
|
WHERE consolidated = 0
|
|
447
458
|
AND COALESCE(memory_type, 'raw') != 'procedure'`,
|
|
448
|
-
|
|
449
|
-
|
|
459
|
+
[]
|
|
460
|
+
);
|
|
450
461
|
return Number(result.rows[0]?.cnt ?? 0);
|
|
451
462
|
}
|
|
452
463
|
var INTERCOM_NOISE_PATTERNS = [
|
|
@@ -777,9 +777,9 @@ async function runSetupWizard(opts = {}) {
|
|
|
777
777
|
rtChoice = await askOrEnv("Choose your AI runtime [1]: ", "EXE_RUNTIME", "1");
|
|
778
778
|
}
|
|
779
779
|
const rtMap = {
|
|
780
|
-
"1": { runtime: "claude", defaultModel: "claude-sonnet-4" },
|
|
780
|
+
"1": { runtime: "claude", defaultModel: "claude-sonnet-4.6" },
|
|
781
781
|
"2": { runtime: "codex", defaultModel: "o3" },
|
|
782
|
-
"3": { runtime: "opencode", defaultModel: "anthropic/claude-sonnet-4" }
|
|
782
|
+
"3": { runtime: "opencode", defaultModel: "anthropic/claude-sonnet-4-6" }
|
|
783
783
|
};
|
|
784
784
|
const selected = rtMap[rtChoice.trim()] ?? rtMap["1"];
|
|
785
785
|
const chosenModel = selected.defaultModel;
|