@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
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
2
|
recordSessionKill
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EWDTTTZP.js";
|
|
4
4
|
import {
|
|
5
5
|
updateTask
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZDNJ3TSB.js";
|
|
7
7
|
import {
|
|
8
|
+
countPendingReviews,
|
|
8
9
|
ensureEmployeeAsync,
|
|
9
10
|
extractRootExe,
|
|
10
11
|
getSessionState,
|
|
11
12
|
isExeSession,
|
|
12
13
|
queryTaskRows,
|
|
14
|
+
queueIntercom,
|
|
13
15
|
sendIntercomAsync,
|
|
14
16
|
sessionScopeFilter,
|
|
15
17
|
strictSessionScopeFilter,
|
|
16
18
|
writeNotification
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import {
|
|
19
|
-
queueIntercom
|
|
20
|
-
} from "./chunk-4FVVJ7ME.js";
|
|
19
|
+
} from "./chunk-KUJGADX6.js";
|
|
21
20
|
import {
|
|
22
21
|
isLeaseExpired
|
|
23
22
|
} from "./chunk-E23LNUWJ.js";
|
|
24
23
|
import {
|
|
25
24
|
listSessions
|
|
26
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-JRD7ARQ6.js";
|
|
27
26
|
import {
|
|
28
27
|
listTmuxSessions,
|
|
29
28
|
parseContextPercentage
|
|
@@ -33,16 +32,16 @@ import {
|
|
|
33
32
|
} from "./chunk-RMOBQ6A5.js";
|
|
34
33
|
import {
|
|
35
34
|
recordOrchestrationEventBestEffort
|
|
36
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-F6TJIWN5.js";
|
|
37
36
|
import {
|
|
38
37
|
getAgentRuntime
|
|
39
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-FROUDYRT.js";
|
|
40
39
|
import {
|
|
41
40
|
baseAgentName,
|
|
42
41
|
getCoordinatorName,
|
|
43
42
|
isCoordinatorName,
|
|
44
43
|
shouldAutoInstance
|
|
45
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-QGOMYIVT.js";
|
|
46
45
|
import {
|
|
47
46
|
loadConfigSync
|
|
48
47
|
} from "./chunk-7Y5UDEVM.js";
|
|
@@ -53,7 +52,7 @@ import { promisify } from "util";
|
|
|
53
52
|
import { randomUUID } from "crypto";
|
|
54
53
|
import { existsSync as existsSync2, readFileSync, writeFileSync, unlinkSync, statSync as statSync2 } from "fs";
|
|
55
54
|
import { homedir, loadavg, freemem, cpus as osCpus, platform } from "os";
|
|
56
|
-
import { join } from "path";
|
|
55
|
+
import { join, basename } from "path";
|
|
57
56
|
|
|
58
57
|
// src/lib/agent-signals.ts
|
|
59
58
|
import { existsSync, openSync, closeSync, readSync, statSync } from "fs";
|
|
@@ -432,6 +431,12 @@ async function pollIdleKill(deps, idleTickCounts, opts) {
|
|
|
432
431
|
return killed;
|
|
433
432
|
}
|
|
434
433
|
var REVIEW_NUDGE_COOLDOWN_MS = 3e5;
|
|
434
|
+
var REVIEW_RENUDGE_INTERVAL_MS = Number(process.env.EXE_REVIEW_RENUDGE_MS) || 30 * 60 * 1e3;
|
|
435
|
+
var DEAD_SCOPE_REVIEW_ALERT_MS = 60 * 60 * 1e3;
|
|
436
|
+
var _deadScopeReviewAlertAt = /* @__PURE__ */ new Map();
|
|
437
|
+
function _resetDeadScopeReviewAlerts() {
|
|
438
|
+
_deadScopeReviewAlertAt.clear();
|
|
439
|
+
}
|
|
435
440
|
async function pollReviewNudge(deps, state) {
|
|
436
441
|
let sessions;
|
|
437
442
|
try {
|
|
@@ -440,9 +445,57 @@ async function pollReviewNudge(deps, state) {
|
|
|
440
445
|
process.stderr.write("[daemon-orch] list tmux sessions for review nudge: " + (e instanceof Error ? e.message : String(e)) + "\n");
|
|
441
446
|
return [];
|
|
442
447
|
}
|
|
443
|
-
if (sessions.length === 0) return [];
|
|
444
448
|
const nudged = [];
|
|
445
449
|
const now = Date.now();
|
|
450
|
+
const deadExtraBySession = /* @__PURE__ */ new Map();
|
|
451
|
+
if (deps.listDeadScopeReviewCounts) {
|
|
452
|
+
let deadRows = [];
|
|
453
|
+
try {
|
|
454
|
+
deadRows = await deps.listDeadScopeReviewCounts(sessions);
|
|
455
|
+
} catch (e) {
|
|
456
|
+
process.stderr.write("[daemon-orch] list dead-scope review counts: " + (e instanceof Error ? e.message : String(e)) + "\n");
|
|
457
|
+
}
|
|
458
|
+
for (const row of deadRows) {
|
|
459
|
+
if (row.count <= 0) continue;
|
|
460
|
+
let attributed = null;
|
|
461
|
+
if (row.projectName && deps.getSessionProjectDir) {
|
|
462
|
+
for (const s of sessions) {
|
|
463
|
+
let dir = null;
|
|
464
|
+
try {
|
|
465
|
+
dir = deps.getSessionProjectDir(s);
|
|
466
|
+
} catch {
|
|
467
|
+
dir = null;
|
|
468
|
+
}
|
|
469
|
+
if (dir && basename(dir) === row.projectName) {
|
|
470
|
+
attributed = s;
|
|
471
|
+
break;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
if (attributed) {
|
|
476
|
+
deadExtraBySession.set(attributed, (deadExtraBySession.get(attributed) ?? 0) + row.count);
|
|
477
|
+
process.stderr.write(
|
|
478
|
+
`[review-nudge] ${row.count} review(s) scoped to dead coordinator "${row.scope}" folded into live coordinator "${attributed}" (project "${row.projectName}")
|
|
479
|
+
`
|
|
480
|
+
);
|
|
481
|
+
} else {
|
|
482
|
+
const lastAlert = _deadScopeReviewAlertAt.get(row.scope) ?? 0;
|
|
483
|
+
if (now - lastAlert < DEAD_SCOPE_REVIEW_ALERT_MS) continue;
|
|
484
|
+
_deadScopeReviewAlertAt.set(row.scope, now);
|
|
485
|
+
process.stderr.write(
|
|
486
|
+
`[review-nudge] ORPHANED REVIEWS: ${row.count} pending review(s) scoped to DEAD coordinator "${row.scope}" (project "${row.projectName ?? "unknown"}") \u2014 no live coordinator matches; re-scope or close them
|
|
487
|
+
`
|
|
488
|
+
);
|
|
489
|
+
if (deps.notifyDeadScopeReviews) {
|
|
490
|
+
try {
|
|
491
|
+
await deps.notifyDeadScopeReviews(row.scope, row.count, row.projectName ?? null);
|
|
492
|
+
} catch (e) {
|
|
493
|
+
process.stderr.write("[daemon-orch] notify dead-scope reviews: " + (e instanceof Error ? e.message : String(e)) + "\n");
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
}
|
|
446
499
|
for (const exeSession of sessions) {
|
|
447
500
|
const prev = state.lastNudge.get(exeSession);
|
|
448
501
|
if (prev && now - prev.at < REVIEW_NUDGE_COOLDOWN_MS) continue;
|
|
@@ -455,8 +508,11 @@ async function pollReviewNudge(deps, state) {
|
|
|
455
508
|
process.stderr.write("[daemon-orch] count reviews for scope: " + (e instanceof Error ? e.message : String(e)) + "\n");
|
|
456
509
|
continue;
|
|
457
510
|
}
|
|
511
|
+
count += deadExtraBySession.get(exeSession) ?? 0;
|
|
458
512
|
if (count === 0) continue;
|
|
459
|
-
|
|
513
|
+
const countChanged = !prev || prev.count !== count;
|
|
514
|
+
const renudgeDue = prev !== void 0 && now - prev.at > REVIEW_RENUDGE_INTERVAL_MS;
|
|
515
|
+
if (!countChanged && !renudgeDue) continue;
|
|
460
516
|
try {
|
|
461
517
|
deps.sendNudge(exeSession);
|
|
462
518
|
state.lastNudge.set(exeSession, { at: now, count });
|
|
@@ -499,15 +555,48 @@ function createReviewNudgeRealDeps(_getClient) {
|
|
|
499
555
|
listTmuxSessions: () => listTmuxSessions(),
|
|
500
556
|
getSessionState: (sessionName) => getSessionState(sessionName),
|
|
501
557
|
countReviewsForScope: async (sessionScope) => {
|
|
558
|
+
return countPendingReviews(sessionScope, getCoordinatorName());
|
|
559
|
+
},
|
|
560
|
+
listDeadScopeReviewCounts: async (liveScopes) => {
|
|
502
561
|
const rows = await queryTaskRows({
|
|
503
562
|
status: "needs_review",
|
|
504
|
-
columns: "
|
|
505
|
-
sessionScope,
|
|
563
|
+
columns: "session_scope, project_name",
|
|
564
|
+
sessionScope: null,
|
|
506
565
|
projectName: null,
|
|
507
|
-
limit:
|
|
566
|
+
limit: 1e3,
|
|
508
567
|
orderBy: "1"
|
|
509
568
|
});
|
|
510
|
-
|
|
569
|
+
const live = new Set(liveScopes);
|
|
570
|
+
const acc = /* @__PURE__ */ new Map();
|
|
571
|
+
for (const r of rows) {
|
|
572
|
+
const scope = r.session_scope ? String(r.session_scope) : null;
|
|
573
|
+
if (!scope || live.has(scope)) continue;
|
|
574
|
+
const projectName = r.project_name ? String(r.project_name) : null;
|
|
575
|
+
const key = `${scope}::${projectName ?? ""}`;
|
|
576
|
+
const cur = acc.get(key);
|
|
577
|
+
if (cur) cur.count++;
|
|
578
|
+
else acc.set(key, { scope, projectName, count: 1 });
|
|
579
|
+
}
|
|
580
|
+
return [...acc.values()];
|
|
581
|
+
},
|
|
582
|
+
getSessionProjectDir: (sessionName) => {
|
|
583
|
+
try {
|
|
584
|
+
const entry = listSessions().find((s) => s.windowName === sessionName);
|
|
585
|
+
return entry?.projectDir ?? null;
|
|
586
|
+
} catch {
|
|
587
|
+
return null;
|
|
588
|
+
}
|
|
589
|
+
},
|
|
590
|
+
notifyDeadScopeReviews: async (scope, count, projectName) => {
|
|
591
|
+
await writeNotification({
|
|
592
|
+
agentId: getCoordinatorName(),
|
|
593
|
+
agentRole: "coordinator",
|
|
594
|
+
event: "orphan_task",
|
|
595
|
+
project: projectName ?? "",
|
|
596
|
+
summary: `\u26A0\uFE0F ${count} pending review(s) scoped to dead coordinator session "${scope}" (project "${projectName ?? "unknown"}") \u2014 no live coordinator matches. Re-scope or close them; they are invisible to every live lane.`,
|
|
597
|
+
// NULL scope on purpose: visible to any coordinator lane, since the owning lane is dead.
|
|
598
|
+
sessionScope: null
|
|
599
|
+
});
|
|
511
600
|
},
|
|
512
601
|
sendNudge: (sessionName) => {
|
|
513
602
|
queueIntercom(sessionName, "review nudge: pending reviews", "completion");
|
|
@@ -611,6 +700,7 @@ function createIdleKillRealDeps(getClient, intercomAckWindowMs) {
|
|
|
611
700
|
}
|
|
612
701
|
var AUTO_WAKE_COOLDOWN_MS = 5 * 60 * 1e3;
|
|
613
702
|
var AUTO_WAKE_MAX_RETRIES = 3;
|
|
703
|
+
var DEAD_SCOPE_SKIP_THRESHOLD = 10;
|
|
614
704
|
var AUTO_WAKE_STATE_PATH = join(homedir(), ".exe-os", "session-cache", "auto-wake-state.json");
|
|
615
705
|
var CRASH_LOOP_WINDOW_MS = 15 * 60 * 1e3;
|
|
616
706
|
var CRASH_LOOP_THRESHOLD = 3;
|
|
@@ -627,12 +717,13 @@ function loadAutoWakeState() {
|
|
|
627
717
|
taskRetries: raw.taskRetries ?? {},
|
|
628
718
|
recentSpawns: raw.recentSpawns ?? {},
|
|
629
719
|
crashLoopCount: raw.crashLoopCount ?? {},
|
|
720
|
+
deadScopeSkips: raw.deadScopeSkips ?? {},
|
|
630
721
|
lastSaved: raw.lastSaved ?? 0
|
|
631
722
|
};
|
|
632
723
|
}
|
|
633
724
|
} catch {
|
|
634
725
|
}
|
|
635
|
-
return { lastSpawn: {}, taskRetries: {}, recentSpawns: {}, crashLoopCount: {}, lastSaved: 0 };
|
|
726
|
+
return { lastSpawn: {}, taskRetries: {}, recentSpawns: {}, crashLoopCount: {}, deadScopeSkips: {}, lastSaved: 0 };
|
|
636
727
|
}
|
|
637
728
|
var AUTO_WAKE_STATE_MAX_ENTRIES = Number(process.env.EXE_AUTOWAKE_STATE_MAX_ENTRIES) || 500;
|
|
638
729
|
function pruneAutoWakeMap(map) {
|
|
@@ -645,6 +736,7 @@ function pruneAutoWakeState(state) {
|
|
|
645
736
|
pruneAutoWakeMap(state.taskRetries);
|
|
646
737
|
pruneAutoWakeMap(state.recentSpawns);
|
|
647
738
|
pruneAutoWakeMap(state.crashLoopCount);
|
|
739
|
+
pruneAutoWakeMap(state.deadScopeSkips);
|
|
648
740
|
}
|
|
649
741
|
function saveAutoWakeState(state) {
|
|
650
742
|
try {
|
|
@@ -674,7 +766,7 @@ var _autoWakeRecentSpawns = {
|
|
|
674
766
|
}
|
|
675
767
|
};
|
|
676
768
|
function _resetAutoWakeState() {
|
|
677
|
-
_autoWakeState = { lastSpawn: {}, taskRetries: {}, recentSpawns: {}, crashLoopCount: {}, lastSaved: 0 };
|
|
769
|
+
_autoWakeState = { lastSpawn: {}, taskRetries: {}, recentSpawns: {}, crashLoopCount: {}, deadScopeSkips: {}, lastSaved: 0 };
|
|
678
770
|
try {
|
|
679
771
|
unlinkSync(AUTO_WAKE_STATE_PATH);
|
|
680
772
|
} catch {
|
|
@@ -790,6 +882,7 @@ async function pollOrphanedTasks(deps, nowMs = Date.now()) {
|
|
|
790
882
|
const coordinatorSet = new Set(coordinatorSessions);
|
|
791
883
|
const VALID_SESSION_SCOPE = /^[a-zA-Z0-9_]+$/;
|
|
792
884
|
const agentTasks = /* @__PURE__ */ new Map();
|
|
885
|
+
let deadScopeStateDirty = false;
|
|
793
886
|
for (const t of tasksByAgent) {
|
|
794
887
|
const rawScope = t.sessionScope;
|
|
795
888
|
if (rawScope && !VALID_SESSION_SCOPE.test(rawScope)) {
|
|
@@ -812,17 +905,110 @@ async function pollOrphanedTasks(deps, nowMs = Date.now()) {
|
|
|
812
905
|
}
|
|
813
906
|
if (!scope) continue;
|
|
814
907
|
if (t.sessionScope && !coordinatorSet.has(t.sessionScope)) {
|
|
815
|
-
|
|
816
|
-
|
|
908
|
+
const deadScope = t.sessionScope;
|
|
909
|
+
const skips = (_autoWakeState.deadScopeSkips[t.taskId] ?? 0) + 1;
|
|
910
|
+
_autoWakeState.deadScopeSkips[t.taskId] = skips;
|
|
911
|
+
deadScopeStateDirty = true;
|
|
912
|
+
if (skips < DEAD_SCOPE_SKIP_THRESHOLD) {
|
|
913
|
+
process.stderr.write(
|
|
914
|
+
`[auto-wake] Skipping ${t.agentId} task ${t.taskId} \u2014 coordinator session "${deadScope}" is dead (skip ${skips}/${DEAD_SCOPE_SKIP_THRESHOLD} before escalation)
|
|
817
915
|
`
|
|
818
|
-
|
|
819
|
-
|
|
916
|
+
);
|
|
917
|
+
continue;
|
|
918
|
+
}
|
|
919
|
+
const taskProject = t.projectName ?? null;
|
|
920
|
+
let reparented = false;
|
|
921
|
+
if (taskProject && deps.reparentTask && deps.listRegisteredSessions) {
|
|
922
|
+
try {
|
|
923
|
+
let registry = [];
|
|
924
|
+
try {
|
|
925
|
+
registry = deps.listRegisteredSessions();
|
|
926
|
+
} catch {
|
|
927
|
+
registry = [];
|
|
928
|
+
}
|
|
929
|
+
const matches = coordinatorSessions.filter((cs) => {
|
|
930
|
+
const entry = registry.find((r) => r.windowName === cs);
|
|
931
|
+
return Boolean(entry?.projectDir) && basename(entry.projectDir) === taskProject;
|
|
932
|
+
});
|
|
933
|
+
if (matches.length === 1) {
|
|
934
|
+
const newScope = matches[0];
|
|
935
|
+
await deps.reparentTask(t.taskId, newScope);
|
|
936
|
+
delete _autoWakeState.deadScopeSkips[t.taskId];
|
|
937
|
+
process.stderr.write(
|
|
938
|
+
`[auto-wake] RE-PARENTED task ${t.taskId} (${t.agentId}): dead coordinator "${deadScope}" \u2192 live coordinator "${newScope}" \u2014 project "${taskProject}" matched exactly one live coordinator after ${skips} skipped ticks
|
|
939
|
+
`
|
|
940
|
+
);
|
|
941
|
+
recordOrchestrationEventBestEffort({
|
|
942
|
+
eventType: "auto_wake.dead_scope_reparented",
|
|
943
|
+
source: "daemon-orchestration.pollOrphanedTasks",
|
|
944
|
+
severity: "warn",
|
|
945
|
+
agentId: t.agentId,
|
|
946
|
+
sessionScope: newScope,
|
|
947
|
+
payload: { taskId: t.taskId, deadScope, project: taskProject, skips }
|
|
948
|
+
});
|
|
949
|
+
t.sessionScope = newScope;
|
|
950
|
+
scope = newScope;
|
|
951
|
+
reparented = true;
|
|
952
|
+
} else {
|
|
953
|
+
process.stderr.write(
|
|
954
|
+
`[auto-wake] Cannot re-parent task ${t.taskId} from dead scope "${deadScope}" \u2014 ${matches.length} live coordinator(s) match project "${taskProject}" (need exactly 1)
|
|
955
|
+
`
|
|
956
|
+
);
|
|
957
|
+
}
|
|
958
|
+
} catch (e) {
|
|
959
|
+
process.stderr.write("[daemon-orch] re-parent dead-scope task: " + (e instanceof Error ? e.message : String(e)) + "\n");
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
if (!reparented) {
|
|
963
|
+
try {
|
|
964
|
+
const routed = await routeUnrecoverableTask(
|
|
965
|
+
deps,
|
|
966
|
+
t.taskId,
|
|
967
|
+
`Coordinator session "${deadScope}" is dead \u2014 auto-wake skipped ${skips} ticks and no unique live coordinator matches this project. Deliverable present; needs manual review.`,
|
|
968
|
+
`Coordinator session "${deadScope}" is dead \u2014 auto-wake skipped ${skips} ticks and no unique live coordinator matches this project. Blocked for manual re-dispatch.`
|
|
969
|
+
);
|
|
970
|
+
delete _autoWakeState.deadScopeSkips[t.taskId];
|
|
971
|
+
process.stderr.write(
|
|
972
|
+
`[auto-wake] DEAD-SCOPE ESCALATION: task ${t.taskId} (${t.agentId}) scoped to dead coordinator "${deadScope}" marked ${routed} after ${skips} skipped ticks
|
|
973
|
+
`
|
|
974
|
+
);
|
|
975
|
+
recordOrchestrationEventBestEffort({
|
|
976
|
+
eventType: "auto_wake.dead_scope_unrecoverable",
|
|
977
|
+
source: "daemon-orchestration.pollOrphanedTasks",
|
|
978
|
+
severity: "warn",
|
|
979
|
+
agentId: t.agentId,
|
|
980
|
+
sessionScope: deadScope,
|
|
981
|
+
payload: { taskId: t.taskId, routed, project: taskProject, skips }
|
|
982
|
+
});
|
|
983
|
+
try {
|
|
984
|
+
const attention = routed === "blocked" ? "needs re-dispatch" : "needs review";
|
|
985
|
+
await writeNotification({
|
|
986
|
+
agentId: t.agentId,
|
|
987
|
+
agentRole: "employee",
|
|
988
|
+
event: "orphan_task",
|
|
989
|
+
project: taskProject ?? "",
|
|
990
|
+
summary: `\u26A0\uFE0F Task ${t.taskId} (${t.agentId}) was scoped to dead coordinator "${deadScope}" \u2014 marked ${routed} after ${skips} skipped auto-wake ticks; ${attention}.`,
|
|
991
|
+
// Deliver to a live coordinator lane so it is actually seen;
|
|
992
|
+
// NULL scope (visible everywhere) when no coordinator is live.
|
|
993
|
+
sessionScope: coordinatorSessions[0] ?? null
|
|
994
|
+
});
|
|
995
|
+
} catch {
|
|
996
|
+
}
|
|
997
|
+
} catch (e) {
|
|
998
|
+
process.stderr.write("[daemon-orch] dead-scope escalation failed for task " + t.taskId + ": " + (e instanceof Error ? e.message : String(e)) + "\n");
|
|
999
|
+
}
|
|
1000
|
+
continue;
|
|
1001
|
+
}
|
|
1002
|
+
} else if (_autoWakeState.deadScopeSkips[t.taskId] !== void 0) {
|
|
1003
|
+
delete _autoWakeState.deadScopeSkips[t.taskId];
|
|
1004
|
+
deadScopeStateDirty = true;
|
|
820
1005
|
}
|
|
821
1006
|
const key = `${t.agentId}::${scope}`;
|
|
822
1007
|
const existing = agentTasks.get(key) ?? [];
|
|
823
1008
|
existing.push({ taskId: t.taskId, priority: t.priority, sessionScope: scope });
|
|
824
1009
|
agentTasks.set(key, existing);
|
|
825
1010
|
}
|
|
1011
|
+
if (deadScopeStateDirty) saveAutoWakeState(_autoWakeState);
|
|
826
1012
|
const woken = [];
|
|
827
1013
|
for (const [key, tasks] of agentTasks) {
|
|
828
1014
|
const agentId = key.split("::")[0];
|
|
@@ -1238,7 +1424,7 @@ function createAutoWakeRealDeps(getClient, projectDir) {
|
|
|
1238
1424
|
const deviceId = loadDeviceId();
|
|
1239
1425
|
const rows = await queryTaskRows({
|
|
1240
1426
|
status: ["open", "in_progress"],
|
|
1241
|
-
columns: "assigned_to, id, priority, session_scope",
|
|
1427
|
+
columns: "assigned_to, id, priority, session_scope, project_name",
|
|
1242
1428
|
sessionScope: null,
|
|
1243
1429
|
// daemon-level: no session filter
|
|
1244
1430
|
projectName: null,
|
|
@@ -1250,9 +1436,19 @@ function createAutoWakeRealDeps(getClient, projectDir) {
|
|
|
1250
1436
|
agentId: String(r.assigned_to),
|
|
1251
1437
|
taskId: String(r.id),
|
|
1252
1438
|
priority: String(r.priority),
|
|
1253
|
-
sessionScope: r.session_scope ? String(r.session_scope) : null
|
|
1439
|
+
sessionScope: r.session_scope ? String(r.session_scope) : null,
|
|
1440
|
+
projectName: r.project_name ? String(r.project_name) : null
|
|
1254
1441
|
}));
|
|
1255
1442
|
},
|
|
1443
|
+
// C1: registry lookup + re-parent for dead-scope escalation.
|
|
1444
|
+
listRegisteredSessions: () => listSessions(),
|
|
1445
|
+
reparentTask: async (taskId, newSessionScope) => {
|
|
1446
|
+
const client = getClient();
|
|
1447
|
+
await client.execute({
|
|
1448
|
+
sql: `UPDATE tasks SET session_scope = ?, updated_at = ? WHERE id = ?`,
|
|
1449
|
+
args: [newSessionScope, (/* @__PURE__ */ new Date()).toISOString(), taskId]
|
|
1450
|
+
});
|
|
1451
|
+
},
|
|
1256
1452
|
ensureEmployee: async (agentName, scope) => {
|
|
1257
1453
|
let resolvedProjectDir = projectDir;
|
|
1258
1454
|
try {
|
|
@@ -2014,9 +2210,9 @@ async function reapOrphanedWorktrees(deps, nowMs = Date.now()) {
|
|
|
2014
2210
|
}
|
|
2015
2211
|
async function createWorktreeReaperRealDeps() {
|
|
2016
2212
|
const { getPaneCwdAsync } = await import("./lib/tmux-status.js");
|
|
2017
|
-
const { getGitRoot, isWorktreeDirty: isDirty } = await import("./worktree-
|
|
2213
|
+
const { getGitRoot, isWorktreeDirty: isDirty } = await import("./worktree-72QYYL5L.js");
|
|
2018
2214
|
const { statSync: statSync3 } = await import("fs");
|
|
2019
|
-
const { basename } = await import("path");
|
|
2215
|
+
const { basename: basename2 } = await import("path");
|
|
2020
2216
|
const { promisify: promisify2 } = await import("util");
|
|
2021
2217
|
const { execFile: execFileCb } = await import("child_process");
|
|
2022
2218
|
const execFileAsync2 = promisify2(execFileCb);
|
|
@@ -2105,7 +2301,7 @@ async function createWorktreeReaperRealDeps() {
|
|
|
2105
2301
|
}
|
|
2106
2302
|
},
|
|
2107
2303
|
parseAgentFromWorktreePath: (wtPath) => {
|
|
2108
|
-
const dirName =
|
|
2304
|
+
const dirName = basename2(wtPath);
|
|
2109
2305
|
if (!dirName) return null;
|
|
2110
2306
|
return baseAgentName(dirName);
|
|
2111
2307
|
},
|
|
@@ -2198,7 +2394,7 @@ async function gcStaleCheckpoints() {
|
|
|
2198
2394
|
}
|
|
2199
2395
|
async function pollTaskGroupBarriers() {
|
|
2200
2396
|
try {
|
|
2201
|
-
const { checkAndFireBarriers } = await import("./tasks-crud-
|
|
2397
|
+
const { checkAndFireBarriers } = await import("./tasks-crud-6SJOKES5.js");
|
|
2202
2398
|
const firedGroupIds = await checkAndFireBarriers();
|
|
2203
2399
|
if (firedGroupIds.length === 0) return 0;
|
|
2204
2400
|
const { getClient } = await import("./lib/database.js");
|
|
@@ -2280,6 +2476,9 @@ export {
|
|
|
2280
2476
|
checkSessionTTL,
|
|
2281
2477
|
pollIdleKill,
|
|
2282
2478
|
REVIEW_NUDGE_COOLDOWN_MS,
|
|
2479
|
+
REVIEW_RENUDGE_INTERVAL_MS,
|
|
2480
|
+
DEAD_SCOPE_REVIEW_ALERT_MS,
|
|
2481
|
+
_resetDeadScopeReviewAlerts,
|
|
2283
2482
|
pollReviewNudge,
|
|
2284
2483
|
loadNudgeState,
|
|
2285
2484
|
saveNudgeState,
|
|
@@ -2289,6 +2488,7 @@ export {
|
|
|
2289
2488
|
createIdleKillRealDeps,
|
|
2290
2489
|
AUTO_WAKE_COOLDOWN_MS,
|
|
2291
2490
|
AUTO_WAKE_MAX_RETRIES,
|
|
2491
|
+
DEAD_SCOPE_SKIP_THRESHOLD,
|
|
2292
2492
|
CRASH_LOOP_WINDOW_MS,
|
|
2293
2493
|
CRASH_LOOP_THRESHOLD,
|
|
2294
2494
|
pruneAutoWakeState,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
findScopedDuplicate,
|
|
10
10
|
governMemoryRecord,
|
|
11
11
|
schedulePostWriteMemoryHygiene
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TSYMWC53.js";
|
|
13
13
|
import {
|
|
14
14
|
orgBus
|
|
15
15
|
} from "./chunk-MP2AFCGL.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
ensureSchema,
|
|
19
19
|
getClient,
|
|
20
20
|
initTurso
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-QGOMYIVT.js";
|
|
22
22
|
import {
|
|
23
23
|
EMBEDDING_DIM
|
|
24
24
|
} from "./chunk-FXU7JOXK.js";
|
|
@@ -68,7 +68,7 @@ function recordShardFailure(project, error) {
|
|
|
68
68
|
`[store] Shard circuit OPEN for "${project}" after ${state.failures} consecutive failures. Will retry in ${SHARD_CB_COOLDOWN_MS / 6e4}min. Last error: ${error}
|
|
69
69
|
`
|
|
70
70
|
);
|
|
71
|
-
void import("./orchestration-events-
|
|
71
|
+
void import("./orchestration-events-KVNRNIPR.js").then(({ recordOrchestrationEventBestEffort }) => {
|
|
72
72
|
recordOrchestrationEventBestEffort({
|
|
73
73
|
eventType: "shard.circuit_open",
|
|
74
74
|
source: "store.recordShardFailure",
|
|
@@ -165,7 +165,7 @@ async function initStore(options) {
|
|
|
165
165
|
);
|
|
166
166
|
_nextVersion = (Number(vResult.rows[0]?.max_v) || 0) + 1;
|
|
167
167
|
try {
|
|
168
|
-
const { loadGlobalProcedures } = await import("./global-procedures-
|
|
168
|
+
const { loadGlobalProcedures } = await import("./global-procedures-76NDWTYN.js");
|
|
169
169
|
await loadGlobalProcedures();
|
|
170
170
|
} catch (e) {
|
|
171
171
|
logStoreWarn("catch", e);
|
|
@@ -293,7 +293,7 @@ async function writeMemory(record) {
|
|
|
293
293
|
founder_id: record.founder_id ?? null
|
|
294
294
|
};
|
|
295
295
|
try {
|
|
296
|
-
const { checkMemoryPoisoning } = await import("./memory-poisoning-defense-
|
|
296
|
+
const { checkMemoryPoisoning } = await import("./memory-poisoning-defense-M3LOQ3XU.js");
|
|
297
297
|
const poisonResult = await checkMemoryPoisoning({
|
|
298
298
|
memoryId: dbRow.id,
|
|
299
299
|
vector: Array.isArray(dbRow.vector) ? dbRow.vector : void 0,
|
|
@@ -486,19 +486,19 @@ async function flushBatch() {
|
|
|
486
486
|
}
|
|
487
487
|
_nextVersion = baseVersion;
|
|
488
488
|
try {
|
|
489
|
-
const { insertMemoryCardsForBatch } = await import("./memory-cards-
|
|
489
|
+
const { insertMemoryCardsForBatch } = await import("./memory-cards-6NGUDUDN.js");
|
|
490
490
|
await insertMemoryCardsForBatch(batch);
|
|
491
491
|
} catch (e) {
|
|
492
492
|
logStoreWarn("catch", e);
|
|
493
493
|
}
|
|
494
494
|
try {
|
|
495
|
-
const { insertOntologyForBatch } = await import("./agentic-ontology-
|
|
495
|
+
const { insertOntologyForBatch } = await import("./agentic-ontology-2QFPBIQP.js");
|
|
496
496
|
await insertOntologyForBatch(batch);
|
|
497
497
|
} catch (e) {
|
|
498
498
|
logStoreWarn("catch", e);
|
|
499
499
|
}
|
|
500
500
|
try {
|
|
501
|
-
const { extractGraphForBatch } = await import("./memory-graph-extractor-
|
|
501
|
+
const { extractGraphForBatch } = await import("./memory-graph-extractor-FIMS3VQR.js");
|
|
502
502
|
await extractGraphForBatch(batch);
|
|
503
503
|
} catch (e) {
|
|
504
504
|
logStoreWarn("catch", e);
|
|
@@ -629,7 +629,7 @@ async function searchMemories(queryVector, agentId, options) {
|
|
|
629
629
|
args.push(activeEmbeddingModel);
|
|
630
630
|
}
|
|
631
631
|
try {
|
|
632
|
-
const { founderScopeFilter } = await import("./founder-context-
|
|
632
|
+
const { founderScopeFilter } = await import("./founder-context-FYTF4IMD.js");
|
|
633
633
|
const founderFilter = founderScopeFilter(options?.founderId);
|
|
634
634
|
sql += founderFilter.sql;
|
|
635
635
|
args.push(...founderFilter.args.filter((a) => a !== null));
|
|
@@ -787,6 +787,20 @@ async function updateMemoryStatus(id, status) {
|
|
|
787
787
|
}
|
|
788
788
|
async function reserveVersions(count) {
|
|
789
789
|
const client = getClient();
|
|
790
|
+
const interactiveTx = client.interactiveTransactions !== false;
|
|
791
|
+
if (!interactiveTx) {
|
|
792
|
+
const vResult = await client.execute("SELECT COALESCE(MAX(version), 0) as max_v FROM memories");
|
|
793
|
+
let baseVersion = (Number(vResult.rows[0]?.max_v) || 0) + 1;
|
|
794
|
+
if (_nextVersion > baseVersion) {
|
|
795
|
+
baseVersion = _nextVersion;
|
|
796
|
+
}
|
|
797
|
+
const reserved = [];
|
|
798
|
+
for (let i = 0; i < count; i++) {
|
|
799
|
+
reserved.push(baseVersion + i);
|
|
800
|
+
}
|
|
801
|
+
_nextVersion = baseVersion + count;
|
|
802
|
+
return reserved;
|
|
803
|
+
}
|
|
790
804
|
await client.execute("BEGIN IMMEDIATE");
|
|
791
805
|
try {
|
|
792
806
|
const vResult = await client.execute("SELECT COALESCE(MAX(version), 0) as max_v FROM memories");
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MODELS_DIR,
|
|
3
|
+
loadConfigSync,
|
|
4
|
+
resolveEmbedModelFile
|
|
5
|
+
} from "./chunk-7Y5UDEVM.js";
|
|
6
|
+
|
|
7
|
+
// src/lib/backfill-gate.ts
|
|
8
|
+
import { existsSync } from "fs";
|
|
9
|
+
import path from "path";
|
|
10
|
+
function backfillKillSwitchEnabled(env = process.env) {
|
|
11
|
+
const v = env.EXE_DISABLE_BACKFILL;
|
|
12
|
+
return v === "1" || v === "true";
|
|
13
|
+
}
|
|
14
|
+
var PARKED_EMBEDDING_MODEL_PREFIX = "parked:";
|
|
15
|
+
var PARKED_EMBEDDING_MODEL = `${PARKED_EMBEDDING_MODEL_PREFIX}embed-failed`;
|
|
16
|
+
var NOT_PARKED_SQL = `(embedding_model IS NULL OR embedding_model NOT LIKE '${PARKED_EMBEDDING_MODEL_PREFIX}%')`;
|
|
17
|
+
async function countActionableNullVectors(client) {
|
|
18
|
+
try {
|
|
19
|
+
const res = await client.execute(
|
|
20
|
+
`SELECT COUNT(*) as cnt FROM memories WHERE vector IS NULL AND ${NOT_PARKED_SQL}`
|
|
21
|
+
);
|
|
22
|
+
return Number(res.rows[0]?.cnt) || 0;
|
|
23
|
+
} catch {
|
|
24
|
+
const res = await client.execute("SELECT COUNT(*) as cnt FROM memories WHERE vector IS NULL");
|
|
25
|
+
return Number(res.rows[0]?.cnt) || 0;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function computeBackfillDisabled(totalGB, oomMarkerPath, env = process.env) {
|
|
29
|
+
if (backfillKillSwitchEnabled(env)) {
|
|
30
|
+
return { disabled: true, reason: "EXE_DISABLE_BACKFILL kill-switch is set" };
|
|
31
|
+
}
|
|
32
|
+
if (totalGB <= 8) {
|
|
33
|
+
return { disabled: true, reason: `host RAM ${totalGB.toFixed(1)} GB <= 8 GB` };
|
|
34
|
+
}
|
|
35
|
+
if (existsSync(oomMarkerPath)) {
|
|
36
|
+
return { disabled: true, reason: "embedding OOM marker present" };
|
|
37
|
+
}
|
|
38
|
+
if (env.EXE_SERVER_MODE === "1") {
|
|
39
|
+
return { disabled: true, reason: "EXE_SERVER_MODE=1 (VPS mode)" };
|
|
40
|
+
}
|
|
41
|
+
const envOverride = env.EXE_EMBEDDINGS;
|
|
42
|
+
const embeddingsEnabled = envOverride === "1" || envOverride === "true";
|
|
43
|
+
if (!embeddingsEnabled) {
|
|
44
|
+
return { disabled: true, reason: "embeddings OFF (set EXE_EMBEDDINGS=1 to enable)" };
|
|
45
|
+
}
|
|
46
|
+
try {
|
|
47
|
+
const cfg = loadConfigSync();
|
|
48
|
+
if (cfg?.searchMode === "fts") {
|
|
49
|
+
return { disabled: true, reason: "searchMode=fts (FTS+Graph only)" };
|
|
50
|
+
}
|
|
51
|
+
const modelName = resolveEmbedModelFile(MODELS_DIR, cfg?.modelFile || void 0);
|
|
52
|
+
if (!modelName || !existsSync(path.join(MODELS_DIR, modelName))) {
|
|
53
|
+
return { disabled: true, reason: "no embedding model installed" };
|
|
54
|
+
}
|
|
55
|
+
} catch {
|
|
56
|
+
}
|
|
57
|
+
return { disabled: false, reason: "" };
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export {
|
|
61
|
+
backfillKillSwitchEnabled,
|
|
62
|
+
PARKED_EMBEDDING_MODEL_PREFIX,
|
|
63
|
+
PARKED_EMBEDDING_MODEL,
|
|
64
|
+
NOT_PARKED_SQL,
|
|
65
|
+
countActionableNullVectors,
|
|
66
|
+
computeBackfillDisabled
|
|
67
|
+
};
|