@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
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
2
|
recordSessionKill
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IELUDZAA.js";
|
|
4
4
|
import {
|
|
5
5
|
isExeSession
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-KKOLHBNC.js";
|
|
7
|
+
import "./chunk-ATKW3SYL.js";
|
|
8
|
+
import "./chunk-BJOBR6P2.js";
|
|
9
|
+
import "./chunk-6D2PI4QD.js";
|
|
10
|
+
import "./chunk-E23LNUWJ.js";
|
|
10
11
|
import "./chunk-4JERP7NT.js";
|
|
11
12
|
import "./chunk-EIKATSE4.js";
|
|
12
|
-
import "./chunk-E23LNUWJ.js";
|
|
13
13
|
import {
|
|
14
14
|
listSessions
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-SSTLTIF3.js";
|
|
15
|
+
} from "./chunk-HNLXMD2V.js";
|
|
17
16
|
import "./chunk-RMOBQ6A5.js";
|
|
18
17
|
import "./chunk-54QCG45Y.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-SSTLTIF3.js";
|
|
19
|
+
import "./chunk-WH7XN5ER.js";
|
|
20
|
+
import "./chunk-GFDGDFBF.js";
|
|
21
21
|
import "./chunk-NGP6LSV2.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-2UGGBIDL.js";
|
|
23
23
|
import "./chunk-CVYC6DUW.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-LLU6WZLK.js";
|
|
25
25
|
import "./chunk-HCJCW7X4.js";
|
|
26
26
|
import "./chunk-OPU3NYOO.js";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-UU4UINUX.js";
|
|
28
28
|
import "./chunk-AFNRE2RV.js";
|
|
29
29
|
import "./chunk-3NGZ4PL7.js";
|
|
30
30
|
import "./chunk-NLEW62VC.js";
|
|
@@ -33,15 +33,15 @@ import "./chunk-GJV3WDWM.js";
|
|
|
33
33
|
import "./chunk-MP2AFCGL.js";
|
|
34
34
|
import {
|
|
35
35
|
isCoordinatorName
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-RWSLVYTE.js";
|
|
37
37
|
import "./chunk-2I23RPSI.js";
|
|
38
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-BV6GBSRP.js";
|
|
39
39
|
import "./chunk-PNQDP3OA.js";
|
|
40
40
|
import "./chunk-H73TUI4Y.js";
|
|
41
41
|
import "./chunk-7HLWBYH7.js";
|
|
42
42
|
import "./chunk-FXU7JOXK.js";
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-7SEC2AG5.js";
|
|
44
|
+
import "./chunk-PPZOWQHP.js";
|
|
45
45
|
import "./chunk-7Y5UDEVM.js";
|
|
46
46
|
import "./chunk-SHIICYJW.js";
|
|
47
47
|
import "./chunk-MLKGABMK.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
batchWriteMemoryViaDaemon,
|
|
3
3
|
writeMemoryViaDaemon
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LLU6WZLK.js";
|
|
5
5
|
import "./chunk-HCJCW7X4.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-UU4UINUX.js";
|
|
7
7
|
import "./chunk-AFNRE2RV.js";
|
|
8
8
|
import "./chunk-3NGZ4PL7.js";
|
|
9
9
|
import "./chunk-NLEW62VC.js";
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
getClient,
|
|
7
7
|
offloadReadQuery
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RWSLVYTE.js";
|
|
9
9
|
import "./chunk-2I23RPSI.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-BV6GBSRP.js";
|
|
11
11
|
import "./chunk-PNQDP3OA.js";
|
|
12
12
|
import "./chunk-H73TUI4Y.js";
|
|
13
13
|
import "./chunk-7HLWBYH7.js";
|
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getBootGeneration
|
|
3
|
+
} from "./chunk-W6K4XB6G.js";
|
|
4
|
+
import {
|
|
5
|
+
resolveExeSession,
|
|
6
|
+
sanitizeSessionScope,
|
|
7
|
+
strictSessionScopeFilter,
|
|
8
|
+
writeNotification
|
|
9
|
+
} from "./chunk-KKOLHBNC.js";
|
|
10
|
+
import "./chunk-ATKW3SYL.js";
|
|
11
|
+
import "./chunk-BJOBR6P2.js";
|
|
12
|
+
import "./chunk-6D2PI4QD.js";
|
|
13
|
+
import "./chunk-E23LNUWJ.js";
|
|
14
|
+
import "./chunk-4JERP7NT.js";
|
|
15
|
+
import "./chunk-EIKATSE4.js";
|
|
16
|
+
import "./chunk-HNLXMD2V.js";
|
|
17
|
+
import "./chunk-RMOBQ6A5.js";
|
|
18
|
+
import "./chunk-54QCG45Y.js";
|
|
19
|
+
import "./chunk-SSTLTIF3.js";
|
|
20
|
+
import "./chunk-WH7XN5ER.js";
|
|
21
|
+
import "./chunk-GFDGDFBF.js";
|
|
22
|
+
import "./chunk-NGP6LSV2.js";
|
|
23
|
+
import "./chunk-2UGGBIDL.js";
|
|
24
|
+
import "./chunk-CVYC6DUW.js";
|
|
25
|
+
import "./chunk-LLU6WZLK.js";
|
|
26
|
+
import "./chunk-HCJCW7X4.js";
|
|
27
|
+
import {
|
|
28
|
+
getProjectName
|
|
29
|
+
} from "./chunk-OPU3NYOO.js";
|
|
30
|
+
import "./chunk-UU4UINUX.js";
|
|
31
|
+
import "./chunk-AFNRE2RV.js";
|
|
32
|
+
import "./chunk-3NGZ4PL7.js";
|
|
33
|
+
import "./chunk-NLEW62VC.js";
|
|
34
|
+
import "./chunk-HYZV25LY.js";
|
|
35
|
+
import "./chunk-GJV3WDWM.js";
|
|
36
|
+
import "./chunk-MP2AFCGL.js";
|
|
37
|
+
import {
|
|
38
|
+
getClient
|
|
39
|
+
} from "./chunk-RWSLVYTE.js";
|
|
40
|
+
import "./chunk-2I23RPSI.js";
|
|
41
|
+
import "./chunk-BV6GBSRP.js";
|
|
42
|
+
import "./chunk-PNQDP3OA.js";
|
|
43
|
+
import "./chunk-H73TUI4Y.js";
|
|
44
|
+
import "./chunk-7HLWBYH7.js";
|
|
45
|
+
import "./chunk-FXU7JOXK.js";
|
|
46
|
+
import "./chunk-7SEC2AG5.js";
|
|
47
|
+
import "./chunk-PPZOWQHP.js";
|
|
48
|
+
import "./chunk-7Y5UDEVM.js";
|
|
49
|
+
import "./chunk-SHIICYJW.js";
|
|
50
|
+
import "./chunk-MLKGABMK.js";
|
|
51
|
+
|
|
52
|
+
// src/lib/notification-ledger.ts
|
|
53
|
+
import crypto from "crypto";
|
|
54
|
+
function ledgerMode() {
|
|
55
|
+
const v = (process.env.EXE_NOTIFICATION_LEDGER ?? "off").trim().toLowerCase();
|
|
56
|
+
return v === "shadow" ? "shadow" : "off";
|
|
57
|
+
}
|
|
58
|
+
function isLedgerEnabled() {
|
|
59
|
+
return ledgerMode() !== "off";
|
|
60
|
+
}
|
|
61
|
+
var LEDGER_MAX_RETRIES = 10;
|
|
62
|
+
var LEDGER_TTL_MS = 60 * 60 * 1e3;
|
|
63
|
+
var BACKOFF_BASE_MS = 15e3;
|
|
64
|
+
var BACKOFF_CAP_MS = 5 * 6e4;
|
|
65
|
+
function computeBackoffMs(retryCount, opts) {
|
|
66
|
+
const base = opts?.base ?? BACKOFF_BASE_MS;
|
|
67
|
+
const cap = opts?.cap ?? BACKOFF_CAP_MS;
|
|
68
|
+
const jitterRatio = opts?.jitterRatio ?? 0;
|
|
69
|
+
const rng = opts?.rng ?? Math.random;
|
|
70
|
+
const n = Number.isFinite(retryCount) && retryCount > 0 ? retryCount : 0;
|
|
71
|
+
const raw = Math.min(base * 2 ** n, cap);
|
|
72
|
+
if (jitterRatio <= 0) return raw;
|
|
73
|
+
const jitter = raw * jitterRatio * (rng() * 2 - 1);
|
|
74
|
+
return Math.max(0, Math.round(raw + jitter));
|
|
75
|
+
}
|
|
76
|
+
var _tableEnsured = /* @__PURE__ */ new WeakSet();
|
|
77
|
+
async function ensureNotificationLedgerTable(client = getClient()) {
|
|
78
|
+
if (_tableEnsured.has(client)) return;
|
|
79
|
+
await client.execute(`
|
|
80
|
+
CREATE TABLE IF NOT EXISTS notification_ledger (
|
|
81
|
+
id TEXT PRIMARY KEY,
|
|
82
|
+
session_scope TEXT,
|
|
83
|
+
project TEXT,
|
|
84
|
+
target_agent TEXT NOT NULL,
|
|
85
|
+
target_role TEXT NOT NULL DEFAULT 'employee',
|
|
86
|
+
target_session TEXT,
|
|
87
|
+
kind TEXT NOT NULL,
|
|
88
|
+
intercom_reason TEXT,
|
|
89
|
+
task_id TEXT,
|
|
90
|
+
task_file TEXT,
|
|
91
|
+
payload_json TEXT,
|
|
92
|
+
dedup_key TEXT,
|
|
93
|
+
delivery_state TEXT NOT NULL DEFAULT 'pending',
|
|
94
|
+
ack_state TEXT NOT NULL DEFAULT 'unacked',
|
|
95
|
+
retry_count INTEGER NOT NULL DEFAULT 0,
|
|
96
|
+
max_retries INTEGER NOT NULL DEFAULT 10,
|
|
97
|
+
next_retry_at TEXT,
|
|
98
|
+
boot_generation INTEGER,
|
|
99
|
+
created_at TEXT NOT NULL,
|
|
100
|
+
delivered_at TEXT,
|
|
101
|
+
acked_at TEXT,
|
|
102
|
+
expires_at TEXT,
|
|
103
|
+
last_error TEXT
|
|
104
|
+
)
|
|
105
|
+
`);
|
|
106
|
+
await client.execute(`
|
|
107
|
+
CREATE INDEX IF NOT EXISTS idx_nledger_scope_state
|
|
108
|
+
ON notification_ledger(session_scope, delivery_state, next_retry_at)
|
|
109
|
+
`);
|
|
110
|
+
await client.execute(`
|
|
111
|
+
CREATE INDEX IF NOT EXISTS idx_nledger_target
|
|
112
|
+
ON notification_ledger(target_agent, session_scope, delivery_state)
|
|
113
|
+
`);
|
|
114
|
+
await client.execute(`
|
|
115
|
+
CREATE INDEX IF NOT EXISTS idx_nledger_task
|
|
116
|
+
ON notification_ledger(task_id)
|
|
117
|
+
`);
|
|
118
|
+
await client.execute(`
|
|
119
|
+
CREATE UNIQUE INDEX IF NOT EXISTS idx_nledger_dedup
|
|
120
|
+
ON notification_ledger(session_scope, dedup_key)
|
|
121
|
+
WHERE dedup_key IS NOT NULL AND delivery_state IN ('pending', 'delivered')
|
|
122
|
+
`);
|
|
123
|
+
_tableEnsured.add(client);
|
|
124
|
+
}
|
|
125
|
+
function _resetLedgerTableCache() {
|
|
126
|
+
}
|
|
127
|
+
function rowToLedger(row) {
|
|
128
|
+
return {
|
|
129
|
+
id: String(row.id),
|
|
130
|
+
sessionScope: row.session_scope == null ? null : String(row.session_scope),
|
|
131
|
+
project: row.project == null ? null : String(row.project),
|
|
132
|
+
targetAgent: String(row.target_agent),
|
|
133
|
+
targetRole: String(row.target_role ?? "employee"),
|
|
134
|
+
targetSession: row.target_session == null ? null : String(row.target_session),
|
|
135
|
+
kind: String(row.kind),
|
|
136
|
+
intercomReason: row.intercom_reason == null ? null : String(row.intercom_reason),
|
|
137
|
+
taskId: row.task_id == null ? null : String(row.task_id),
|
|
138
|
+
taskFile: row.task_file == null ? null : String(row.task_file),
|
|
139
|
+
payloadJson: row.payload_json == null ? null : String(row.payload_json),
|
|
140
|
+
dedupKey: row.dedup_key == null ? null : String(row.dedup_key),
|
|
141
|
+
deliveryState: String(row.delivery_state ?? "pending"),
|
|
142
|
+
ackState: String(row.ack_state ?? "unacked"),
|
|
143
|
+
retryCount: Number(row.retry_count ?? 0),
|
|
144
|
+
maxRetries: Number(row.max_retries ?? LEDGER_MAX_RETRIES),
|
|
145
|
+
nextRetryAt: row.next_retry_at == null ? null : String(row.next_retry_at),
|
|
146
|
+
bootGeneration: row.boot_generation == null ? null : Number(row.boot_generation),
|
|
147
|
+
createdAt: String(row.created_at),
|
|
148
|
+
deliveredAt: row.delivered_at == null ? null : String(row.delivered_at),
|
|
149
|
+
ackedAt: row.acked_at == null ? null : String(row.acked_at),
|
|
150
|
+
expiresAt: row.expires_at == null ? null : String(row.expires_at),
|
|
151
|
+
lastError: row.last_error == null ? null : String(row.last_error)
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
function generateUlid() {
|
|
155
|
+
const timestamp = Date.now().toString(36).padStart(10, "0");
|
|
156
|
+
const random = crypto.randomBytes(10).toString("hex").slice(0, 16);
|
|
157
|
+
return (timestamp + random).toUpperCase();
|
|
158
|
+
}
|
|
159
|
+
function ledgerScopeFilter(sessionScope) {
|
|
160
|
+
if (sessionScope === void 0) return strictSessionScopeFilter(void 0);
|
|
161
|
+
const clean = sanitizeSessionScope(sessionScope);
|
|
162
|
+
if (!clean) return { sql: " AND 1=0", args: [] };
|
|
163
|
+
return strictSessionScopeFilter(clean);
|
|
164
|
+
}
|
|
165
|
+
async function enqueueNudge(input, client = getClient(), now = Date.now()) {
|
|
166
|
+
if (!isLedgerEnabled()) return null;
|
|
167
|
+
await ensureNotificationLedgerTable(client);
|
|
168
|
+
const id = generateUlid();
|
|
169
|
+
const createdAt = new Date(now).toISOString();
|
|
170
|
+
const ttlMs = input.ttlMs ?? LEDGER_TTL_MS;
|
|
171
|
+
const expiresAt = new Date(now + ttlMs).toISOString();
|
|
172
|
+
const explicitScope = input.sessionScope !== void 0;
|
|
173
|
+
const rawScope = explicitScope ? input.sessionScope : resolveExeSession();
|
|
174
|
+
const sessionScope = sanitizeSessionScope(rawScope);
|
|
175
|
+
if (explicitScope && sessionScope === null) return null;
|
|
176
|
+
const project = input.project === void 0 ? safeProjectName() : input.project;
|
|
177
|
+
const bootGeneration = await getBootGeneration(client);
|
|
178
|
+
await client.execute({
|
|
179
|
+
sql: `INSERT INTO notification_ledger
|
|
180
|
+
(id, session_scope, project, target_agent, target_role, target_session,
|
|
181
|
+
kind, intercom_reason, task_id, task_file, payload_json, dedup_key,
|
|
182
|
+
delivery_state, ack_state, retry_count, max_retries, next_retry_at,
|
|
183
|
+
boot_generation, created_at, expires_at)
|
|
184
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'pending', 'unacked', 0, ?, NULL, ?, ?, ?)
|
|
185
|
+
ON CONFLICT(session_scope, dedup_key)
|
|
186
|
+
WHERE dedup_key IS NOT NULL AND delivery_state IN ('pending', 'delivered')
|
|
187
|
+
DO NOTHING`,
|
|
188
|
+
args: [
|
|
189
|
+
id,
|
|
190
|
+
sessionScope,
|
|
191
|
+
project,
|
|
192
|
+
input.targetAgent,
|
|
193
|
+
input.targetRole ?? "employee",
|
|
194
|
+
input.targetSession ?? null,
|
|
195
|
+
input.kind,
|
|
196
|
+
input.intercomReason ?? null,
|
|
197
|
+
input.taskId ?? null,
|
|
198
|
+
input.taskFile ?? null,
|
|
199
|
+
input.payload === void 0 ? null : JSON.stringify(input.payload),
|
|
200
|
+
input.dedupKey ?? null,
|
|
201
|
+
LEDGER_MAX_RETRIES,
|
|
202
|
+
bootGeneration,
|
|
203
|
+
createdAt,
|
|
204
|
+
expiresAt
|
|
205
|
+
]
|
|
206
|
+
});
|
|
207
|
+
const readScope = sessionScope ? strictSessionScopeFilter(sessionScope) : { sql: "", args: [] };
|
|
208
|
+
const result = await client.execute({
|
|
209
|
+
sql: `SELECT * FROM notification_ledger WHERE id = ?${readScope.sql}`,
|
|
210
|
+
args: [id, ...readScope.args]
|
|
211
|
+
});
|
|
212
|
+
if (result.rows[0]) return rowToLedger(result.rows[0]);
|
|
213
|
+
if (input.dedupKey) {
|
|
214
|
+
const existing = await client.execute({
|
|
215
|
+
sql: `SELECT * FROM notification_ledger
|
|
216
|
+
WHERE dedup_key = ? AND delivery_state IN ('pending', 'delivered')${readScope.sql}
|
|
217
|
+
ORDER BY id LIMIT 1`,
|
|
218
|
+
args: [input.dedupKey, ...readScope.args]
|
|
219
|
+
});
|
|
220
|
+
return existing.rows[0] ? rowToLedger(existing.rows[0]) : null;
|
|
221
|
+
}
|
|
222
|
+
return null;
|
|
223
|
+
}
|
|
224
|
+
function safeProjectName() {
|
|
225
|
+
try {
|
|
226
|
+
return getProjectName();
|
|
227
|
+
} catch {
|
|
228
|
+
return null;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
async function listDrainableNudges(sessionScope, client = getClient(), now = Date.now()) {
|
|
232
|
+
await ensureNotificationLedgerTable(client);
|
|
233
|
+
const scope = ledgerScopeFilter(sessionScope);
|
|
234
|
+
const nowIso = new Date(now).toISOString();
|
|
235
|
+
const result = await client.execute({
|
|
236
|
+
sql: `SELECT * FROM notification_ledger
|
|
237
|
+
WHERE delivery_state = 'pending' AND ack_state = 'unacked'
|
|
238
|
+
AND (next_retry_at IS NULL OR next_retry_at <= ?)${scope.sql}
|
|
239
|
+
ORDER BY id`,
|
|
240
|
+
args: [nowIso, ...scope.args]
|
|
241
|
+
});
|
|
242
|
+
return result.rows.map((r) => rowToLedger(r));
|
|
243
|
+
}
|
|
244
|
+
async function getNudge(id, sessionScope, client = getClient()) {
|
|
245
|
+
await ensureNotificationLedgerTable(client);
|
|
246
|
+
const scope = ledgerScopeFilter(sessionScope);
|
|
247
|
+
const result = await client.execute({
|
|
248
|
+
sql: `SELECT * FROM notification_ledger WHERE id = ?${scope.sql}`,
|
|
249
|
+
args: [id, ...scope.args]
|
|
250
|
+
});
|
|
251
|
+
return result.rows[0] ? rowToLedger(result.rows[0]) : null;
|
|
252
|
+
}
|
|
253
|
+
function isRedeliverEligible(row, currentGeneration) {
|
|
254
|
+
return row.deliveryState === "pending" && row.ackState === "unacked" && row.bootGeneration != null && row.bootGeneration < currentGeneration;
|
|
255
|
+
}
|
|
256
|
+
async function drainLedger(opts, client = getClient()) {
|
|
257
|
+
await ensureNotificationLedgerTable(client);
|
|
258
|
+
const now = opts.now ?? Date.now();
|
|
259
|
+
const yieldEvery = opts.yieldEvery ?? 10;
|
|
260
|
+
const rows = await listDrainableNudges(opts.sessionScope, client, now);
|
|
261
|
+
const currentGeneration = await getBootGeneration(client);
|
|
262
|
+
const scope = ledgerScopeFilter(opts.sessionScope);
|
|
263
|
+
const out = { delivered: 0, retried: 0, expired: 0, escalated: 0 };
|
|
264
|
+
let processed = 0;
|
|
265
|
+
for (const row of rows) {
|
|
266
|
+
if (processed > 0 && processed % yieldEvery === 0) {
|
|
267
|
+
await new Promise((resolve) => setImmediate(resolve));
|
|
268
|
+
}
|
|
269
|
+
processed++;
|
|
270
|
+
if (row.expiresAt && new Date(row.expiresAt).getTime() <= now) {
|
|
271
|
+
await client.execute({
|
|
272
|
+
sql: `UPDATE notification_ledger SET delivery_state = 'expired'
|
|
273
|
+
WHERE id = ? AND delivery_state = 'pending'${scope.sql}`,
|
|
274
|
+
args: [row.id, ...scope.args]
|
|
275
|
+
});
|
|
276
|
+
void writeNotification({
|
|
277
|
+
agentId: row.targetAgent,
|
|
278
|
+
agentRole: row.targetRole === "coordinator" ? "COO" : "employee",
|
|
279
|
+
event: "error_spike",
|
|
280
|
+
project: row.project ?? "",
|
|
281
|
+
summary: `Ledger nudge (${row.kind}) to ${row.targetAgent} expired undelivered after ${Math.round(LEDGER_TTL_MS / 6e4)}m (${row.retryCount} attempts). Recorded in notification_ledger \u2014 re-send if still relevant.`,
|
|
282
|
+
taskFile: row.taskFile ?? void 0,
|
|
283
|
+
sessionScope: row.sessionScope
|
|
284
|
+
});
|
|
285
|
+
out.expired++;
|
|
286
|
+
continue;
|
|
287
|
+
}
|
|
288
|
+
let delivered = false;
|
|
289
|
+
try {
|
|
290
|
+
delivered = await opts.attemptDelivery(row);
|
|
291
|
+
} catch {
|
|
292
|
+
delivered = false;
|
|
293
|
+
}
|
|
294
|
+
if (delivered) {
|
|
295
|
+
await client.execute({
|
|
296
|
+
sql: `UPDATE notification_ledger
|
|
297
|
+
SET delivery_state = 'delivered', delivered_at = ?, boot_generation = ?, last_error = NULL
|
|
298
|
+
WHERE id = ? AND delivery_state = 'pending'${scope.sql}`,
|
|
299
|
+
args: [new Date(now).toISOString(), currentGeneration, row.id, ...scope.args]
|
|
300
|
+
});
|
|
301
|
+
out.delivered++;
|
|
302
|
+
continue;
|
|
303
|
+
}
|
|
304
|
+
const nextRetryCount = row.retryCount + 1;
|
|
305
|
+
const backoffMs = computeBackoffMs(nextRetryCount, opts.backoff);
|
|
306
|
+
const nextRetryAt = new Date(now + backoffMs).toISOString();
|
|
307
|
+
if (nextRetryCount >= row.maxRetries) {
|
|
308
|
+
await client.execute({
|
|
309
|
+
sql: `UPDATE notification_ledger
|
|
310
|
+
SET retry_count = ?, next_retry_at = NULL, boot_generation = ?
|
|
311
|
+
WHERE id = ? AND delivery_state = 'pending'${scope.sql}`,
|
|
312
|
+
args: [row.maxRetries, currentGeneration, row.id, ...scope.args]
|
|
313
|
+
});
|
|
314
|
+
out.escalated++;
|
|
315
|
+
} else {
|
|
316
|
+
await client.execute({
|
|
317
|
+
sql: `UPDATE notification_ledger
|
|
318
|
+
SET retry_count = ?, next_retry_at = ?, boot_generation = ?
|
|
319
|
+
WHERE id = ? AND delivery_state = 'pending'${scope.sql}`,
|
|
320
|
+
args: [nextRetryCount, nextRetryAt, currentGeneration, row.id, ...scope.args]
|
|
321
|
+
});
|
|
322
|
+
out.retried++;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
return out;
|
|
326
|
+
}
|
|
327
|
+
async function ackNudge(id, sessionScope, client = getClient(), now = Date.now()) {
|
|
328
|
+
await ensureNotificationLedgerTable(client);
|
|
329
|
+
const scope = ledgerScopeFilter(sessionScope);
|
|
330
|
+
await client.execute({
|
|
331
|
+
sql: `UPDATE notification_ledger SET ack_state = 'acked', acked_at = ?
|
|
332
|
+
WHERE id = ? AND ack_state = 'unacked'${scope.sql}`,
|
|
333
|
+
args: [new Date(now).toISOString(), id, ...scope.args]
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
async function markNudgeActed(id, sessionScope, client = getClient(), now = Date.now()) {
|
|
337
|
+
await ensureNotificationLedgerTable(client);
|
|
338
|
+
const scope = ledgerScopeFilter(sessionScope);
|
|
339
|
+
await client.execute({
|
|
340
|
+
sql: `UPDATE notification_ledger SET ack_state = 'acted', acked_at = COALESCE(acked_at, ?)
|
|
341
|
+
WHERE id = ?${scope.sql}`,
|
|
342
|
+
args: [new Date(now).toISOString(), id, ...scope.args]
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
async function silenceNudgesForTask(taskId, sessionScope, client = getClient(), now = Date.now()) {
|
|
346
|
+
await ensureNotificationLedgerTable(client);
|
|
347
|
+
const scope = ledgerScopeFilter(sessionScope);
|
|
348
|
+
const result = await client.execute({
|
|
349
|
+
sql: `UPDATE notification_ledger SET ack_state = 'acted', acked_at = COALESCE(acked_at, ?)
|
|
350
|
+
WHERE task_id = ? AND ack_state != 'acted'${scope.sql}`,
|
|
351
|
+
args: [new Date(now).toISOString(), taskId, ...scope.args]
|
|
352
|
+
});
|
|
353
|
+
return Number(result.rowsAffected ?? 0);
|
|
354
|
+
}
|
|
355
|
+
function recordShadowNudge(targetSession, reason, callerSessionScope) {
|
|
356
|
+
if (!isLedgerEnabled()) return;
|
|
357
|
+
try {
|
|
358
|
+
const dashIdx = targetSession.indexOf("-");
|
|
359
|
+
const targetAgent = (dashIdx > 0 ? targetSession.slice(0, dashIdx) : targetSession).replace(/\d+$/, "") || targetSession;
|
|
360
|
+
const derivedScope = dashIdx > 0 ? targetSession.slice(dashIdx + 1) : targetSession;
|
|
361
|
+
const targetRole = dashIdx > 0 ? "employee" : "coordinator";
|
|
362
|
+
const kind = intercomReasonToKind(reason);
|
|
363
|
+
const dedupKey = `${kind}:${targetSession}`;
|
|
364
|
+
void enqueueNudge({
|
|
365
|
+
targetAgent,
|
|
366
|
+
targetRole,
|
|
367
|
+
targetSession,
|
|
368
|
+
kind,
|
|
369
|
+
intercomReason: reason,
|
|
370
|
+
dedupKey,
|
|
371
|
+
// Prefer the caller's resolved scope; fall back to the scope derived from
|
|
372
|
+
// the target session name. Sanitized inside enqueueNudge.
|
|
373
|
+
sessionScope: callerSessionScope != null && callerSessionScope !== "" ? callerSessionScope : derivedScope
|
|
374
|
+
}).catch(() => {
|
|
375
|
+
});
|
|
376
|
+
} catch {
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
function intercomReasonToKind(reason) {
|
|
380
|
+
switch (reason) {
|
|
381
|
+
case "message":
|
|
382
|
+
return "message";
|
|
383
|
+
case "completion":
|
|
384
|
+
case "notification":
|
|
385
|
+
return "completion";
|
|
386
|
+
default:
|
|
387
|
+
return "dispatch";
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
export {
|
|
391
|
+
LEDGER_MAX_RETRIES,
|
|
392
|
+
LEDGER_TTL_MS,
|
|
393
|
+
_resetLedgerTableCache,
|
|
394
|
+
ackNudge,
|
|
395
|
+
computeBackoffMs,
|
|
396
|
+
drainLedger,
|
|
397
|
+
enqueueNudge,
|
|
398
|
+
ensureNotificationLedgerTable,
|
|
399
|
+
getNudge,
|
|
400
|
+
isLedgerEnabled,
|
|
401
|
+
isRedeliverEligible,
|
|
402
|
+
ledgerMode,
|
|
403
|
+
listDrainableNudges,
|
|
404
|
+
markNudgeActed,
|
|
405
|
+
recordShadowNudge,
|
|
406
|
+
silenceNudgesForTask
|
|
407
|
+
};
|
|
@@ -7,41 +7,41 @@ import {
|
|
|
7
7
|
migrateJsonNotifications,
|
|
8
8
|
readUnreadNotifications,
|
|
9
9
|
writeNotification
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-KKOLHBNC.js";
|
|
11
|
+
import "./chunk-ATKW3SYL.js";
|
|
12
|
+
import "./chunk-BJOBR6P2.js";
|
|
13
|
+
import "./chunk-6D2PI4QD.js";
|
|
14
|
+
import "./chunk-E23LNUWJ.js";
|
|
14
15
|
import "./chunk-4JERP7NT.js";
|
|
15
16
|
import "./chunk-EIKATSE4.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-UIV2WPBT.js";
|
|
18
|
-
import "./chunk-SSTLTIF3.js";
|
|
17
|
+
import "./chunk-HNLXMD2V.js";
|
|
19
18
|
import "./chunk-RMOBQ6A5.js";
|
|
20
19
|
import "./chunk-54QCG45Y.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-SSTLTIF3.js";
|
|
21
|
+
import "./chunk-WH7XN5ER.js";
|
|
22
|
+
import "./chunk-GFDGDFBF.js";
|
|
23
23
|
import "./chunk-NGP6LSV2.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-2UGGBIDL.js";
|
|
25
25
|
import "./chunk-CVYC6DUW.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-LLU6WZLK.js";
|
|
27
27
|
import "./chunk-HCJCW7X4.js";
|
|
28
28
|
import "./chunk-OPU3NYOO.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-UU4UINUX.js";
|
|
30
30
|
import "./chunk-AFNRE2RV.js";
|
|
31
31
|
import "./chunk-3NGZ4PL7.js";
|
|
32
32
|
import "./chunk-NLEW62VC.js";
|
|
33
33
|
import "./chunk-HYZV25LY.js";
|
|
34
34
|
import "./chunk-GJV3WDWM.js";
|
|
35
35
|
import "./chunk-MP2AFCGL.js";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-RWSLVYTE.js";
|
|
37
37
|
import "./chunk-2I23RPSI.js";
|
|
38
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-BV6GBSRP.js";
|
|
39
39
|
import "./chunk-PNQDP3OA.js";
|
|
40
40
|
import "./chunk-H73TUI4Y.js";
|
|
41
41
|
import "./chunk-7HLWBYH7.js";
|
|
42
42
|
import "./chunk-FXU7JOXK.js";
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-7SEC2AG5.js";
|
|
44
|
+
import "./chunk-PPZOWQHP.js";
|
|
45
45
|
import "./chunk-7Y5UDEVM.js";
|
|
46
46
|
import "./chunk-SHIICYJW.js";
|
|
47
47
|
import "./chunk-MLKGABMK.js";
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
getOrchestrationMetrics,
|
|
7
7
|
recordOrchestrationEvent,
|
|
8
8
|
recordOrchestrationEventBestEffort
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-WH7XN5ER.js";
|
|
10
|
+
import "./chunk-RWSLVYTE.js";
|
|
11
11
|
import "./chunk-2I23RPSI.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-BV6GBSRP.js";
|
|
13
13
|
import "./chunk-PNQDP3OA.js";
|
|
14
14
|
import "./chunk-H73TUI4Y.js";
|
|
15
15
|
import "./chunk-7HLWBYH7.js";
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MultiAgentOrchestrator
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-HJX6NCJF.js";
|
|
4
|
+
import "./chunk-HAZO7TRD.js";
|
|
5
|
+
import "./chunk-KKOLHBNC.js";
|
|
6
|
+
import "./chunk-ATKW3SYL.js";
|
|
7
|
+
import "./chunk-BJOBR6P2.js";
|
|
8
|
+
import "./chunk-6D2PI4QD.js";
|
|
9
|
+
import "./chunk-E23LNUWJ.js";
|
|
9
10
|
import "./chunk-4JERP7NT.js";
|
|
10
11
|
import "./chunk-EIKATSE4.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-UIV2WPBT.js";
|
|
13
|
-
import "./chunk-SSTLTIF3.js";
|
|
12
|
+
import "./chunk-HNLXMD2V.js";
|
|
14
13
|
import "./chunk-RMOBQ6A5.js";
|
|
15
14
|
import "./chunk-54QCG45Y.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-SSTLTIF3.js";
|
|
16
|
+
import "./chunk-WH7XN5ER.js";
|
|
17
|
+
import "./chunk-GFDGDFBF.js";
|
|
18
18
|
import "./chunk-NGP6LSV2.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-2UGGBIDL.js";
|
|
20
20
|
import "./chunk-CVYC6DUW.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-LLU6WZLK.js";
|
|
22
22
|
import "./chunk-HCJCW7X4.js";
|
|
23
23
|
import "./chunk-OPU3NYOO.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-UU4UINUX.js";
|
|
25
25
|
import "./chunk-AFNRE2RV.js";
|
|
26
26
|
import "./chunk-3NGZ4PL7.js";
|
|
27
27
|
import "./chunk-NLEW62VC.js";
|
|
28
28
|
import "./chunk-HYZV25LY.js";
|
|
29
29
|
import "./chunk-GJV3WDWM.js";
|
|
30
30
|
import "./chunk-MP2AFCGL.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-RWSLVYTE.js";
|
|
32
32
|
import "./chunk-2I23RPSI.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-BV6GBSRP.js";
|
|
34
34
|
import "./chunk-PNQDP3OA.js";
|
|
35
35
|
import "./chunk-H73TUI4Y.js";
|
|
36
36
|
import "./chunk-7HLWBYH7.js";
|
|
37
37
|
import "./chunk-FXU7JOXK.js";
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-7SEC2AG5.js";
|
|
39
|
+
import "./chunk-PPZOWQHP.js";
|
|
40
40
|
import "./chunk-7Y5UDEVM.js";
|
|
41
41
|
import "./chunk-SHIICYJW.js";
|
|
42
42
|
import "./chunk-MLKGABMK.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ingest
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-TWXZM34M.js";
|
|
4
|
+
import "./chunk-RWSLVYTE.js";
|
|
5
5
|
import "./chunk-2I23RPSI.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-BV6GBSRP.js";
|
|
7
7
|
import "./chunk-PNQDP3OA.js";
|
|
8
8
|
import "./chunk-H73TUI4Y.js";
|
|
9
9
|
import "./chunk-7HLWBYH7.js";
|
|
@@ -6,16 +6,16 @@ import {
|
|
|
6
6
|
assertMemoryLimit,
|
|
7
7
|
countActiveMemories,
|
|
8
8
|
getLicenseSync
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-2UGGBIDL.js";
|
|
10
|
+
import "./chunk-RWSLVYTE.js";
|
|
11
11
|
import "./chunk-2I23RPSI.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-BV6GBSRP.js";
|
|
13
13
|
import "./chunk-PNQDP3OA.js";
|
|
14
14
|
import "./chunk-H73TUI4Y.js";
|
|
15
15
|
import "./chunk-7HLWBYH7.js";
|
|
16
16
|
import "./chunk-FXU7JOXK.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-7SEC2AG5.js";
|
|
18
|
+
import "./chunk-PPZOWQHP.js";
|
|
19
19
|
import "./chunk-7Y5UDEVM.js";
|
|
20
20
|
import "./chunk-SHIICYJW.js";
|
|
21
21
|
import "./chunk-MLKGABMK.js";
|