@askexenow/exe-os 0.9.372 → 0.9.374
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 +45 -10
- package/deploy/compose/.env.example +46 -9
- package/deploy/compose/docker-compose.yml +136 -18
- package/deploy/compose/generate-env.ts +142 -34
- package/deploy/compose/sso-edge/default.conf.template +78 -7
- package/deploy/compose/sso-edge/sso-redirect.conf +109 -13
- package/deploy/stack-manifests/v0.9.30-apps.json +1 -1
- package/deploy/stack-manifests/v0.9.json +4 -4
- package/dist/.dist-verified.json +3 -3
- package/dist/{active-agent-GRT5MKD5.js → active-agent-ONPPEWQV.js} +7 -6
- package/dist/{active-agent-L2ZSSXDK.js → active-agent-UJKMG7LJ.js} +7 -6
- package/dist/{agent-defs-generator-M4ZNYIVX.js → agent-defs-generator-ZWI6DXOE.js} +6 -5
- package/dist/{agent-loop-FOK2IRZQ.js → agent-loop-OYHJKNYH.js} +1 -1
- package/dist/{agentic-ontology-DMPRDEUX.js → agentic-ontology-WHFJ3QFS.js} +1 -1
- package/dist/{artifact-backup-767STHSW.js → artifact-backup-WXZNB7KE.js} +2 -1
- package/dist/{backfill-gate-VX2RZTQV.js → backfill-gate-KWJQ35YX.js} +3 -2
- package/dist/{backfill-metadata-ZMEHJQ5M.js → backfill-metadata-3OUSQD5V.js} +8 -7
- package/dist/{background-jobs-LTPWCMA3.js → background-jobs-6VMD55PK.js} +3 -2
- package/dist/{backup-verify-EX2K732J.js → backup-verify-ZKTUYLTA.js} +4 -3
- package/dist/{behavior-injection-22AGMS25.js → behavior-injection-M6UYZCMW.js} +17 -15
- package/dist/{behaviors-DVFXAWF5.js → behaviors-ZJ45TFBJ.js} +21 -13
- package/dist/bin/age-ontology-load.js +3 -2
- package/dist/bin/agentic-ontology-backfill.js +10 -9
- package/dist/bin/agentic-reflection-backfill.js +11 -10
- package/dist/bin/agentic-semantic-label.js +10 -9
- package/dist/bin/backfill-conversations.js +13 -11
- package/dist/bin/backfill-responses.js +13 -11
- package/dist/bin/backfill-vectors.js +17 -15
- package/dist/bin/bulk-sync-postgres.js +22 -20
- package/dist/bin/cc-doctor.js +10 -9
- package/dist/bin/cleanup-stale-review-tasks.js +29 -26
- package/dist/bin/cli.js +36 -26
- package/dist/bin/deferred-daemon-restart.js +114 -110
- package/dist/bin/exe-agent-config.js +6 -5
- package/dist/bin/exe-agent.js +127 -33
- package/dist/bin/exe-assign.js +15 -13
- package/dist/bin/exe-boot.js +57 -54
- package/dist/bin/exe-call.js +8 -7
- package/dist/bin/exe-cloud.js +24 -22
- package/dist/bin/exe-config-dump.js +6 -5
- package/dist/bin/exe-dispatch.js +30 -27
- package/dist/bin/exe-doctor.js +14 -10
- package/dist/bin/exe-export-behaviors.js +19 -17
- package/dist/bin/exe-forget.js +10 -9
- package/dist/bin/exe-gateway.js +199 -19
- package/dist/bin/exe-grant.js +5 -5
- package/dist/bin/exe-healthcheck.js +10 -9
- package/dist/bin/exe-heartbeat.js +35 -32
- package/dist/bin/exe-kill.js +34 -31
- package/dist/bin/exe-launch-agent.js +126 -54
- package/dist/bin/exe-mcp.js +6 -5
- package/dist/bin/exe-memory-reads.js +8 -7
- package/dist/bin/exe-new-employee.js +12 -11
- package/dist/bin/exe-os-mcp-proxy.js +6 -5
- package/dist/bin/exe-pending-messages.js +30 -27
- package/dist/bin/exe-pending-notifications.js +29 -26
- package/dist/bin/exe-pending-reviews.js +30 -27
- package/dist/bin/exe-rename.js +8 -7
- package/dist/bin/exe-repo-truth.js +1 -1
- package/dist/bin/exe-review.js +33 -30
- package/dist/bin/exe-search.js +9 -8
- package/dist/bin/exe-session-cleanup.js +35 -32
- package/dist/bin/exe-settings.js +24 -22
- package/dist/bin/exe-start-codex.js +137 -55
- package/dist/bin/exe-start-opencode.js +121 -23
- package/dist/bin/exe-status.js +31 -28
- package/dist/bin/exe-support.js +5 -4
- package/dist/bin/exe-team.js +7 -6
- package/dist/bin/exe-watchdog.js +31 -11
- package/dist/bin/generate-hook-manifest.js +44 -7
- package/dist/bin/git-sweep.js +31 -28
- package/dist/bin/graph-backfill.js +89 -35
- package/dist/bin/graph-export.js +9 -8
- package/dist/bin/import-history.js +14 -13
- package/dist/bin/install.js +137 -113
- package/dist/bin/intercom-check.js +5 -5
- package/dist/bin/mcp-sessions.js +2 -2
- package/dist/bin/orchestration-metrics.js +7 -6
- package/dist/bin/postgres-agentic-reflection-backfill.js +5 -4
- package/dist/bin/postgres-agentic-semantic-backfill.js +4 -3
- package/dist/bin/pre-publish.js +1 -1
- package/dist/bin/reconcile-backlog.js +2 -2
- package/dist/bin/registry-proxy.js +1 -1
- package/dist/bin/scan-tasks.js +29 -26
- package/dist/bin/setup.js +5 -4
- package/dist/bin/shard-migrate.js +9 -8
- package/dist/bin/stack-update.js +40 -9
- package/dist/bin/verify-stack.js +2 -2
- package/dist/bin/vps-health-gate.js +1 -1
- package/dist/{boot-generation-OHXH4YC5.js → boot-generation-JKVZ4ZAT.js} +6 -5
- package/dist/{boot-review-sections-N5IXIGSS.js → boot-review-sections-2M6BTG73.js} +28 -25
- package/dist/{branch-hygiene-KCGXRAWP.js → branch-hygiene-U5GFRSTP.js} +31 -7
- package/dist/{branding-GH43W3PU.js → branding-I6KIMB7F.js} +3 -2
- package/dist/budget-fallback-XJRPMP2D.js +11 -0
- package/dist/build-manifest.json +1318 -1233
- package/dist/{capability-cards-4PXVLIVS.js → capability-cards-5IMJT6J7.js} +5 -4
- package/dist/{capacity-monitor-FKMQXORX.js → capacity-monitor-SAXCQK7O.js} +30 -27
- package/dist/{catchup-brief-SN5EKO4N.js → catchup-brief-U2TXBLHD.js} +34 -31
- package/dist/{chunk-CNC57JCS.js → chunk-23MVDXLY.js} +4 -4
- package/dist/{chunk-V4XAKXXF.js → chunk-2AJGV5UL.js} +1 -1
- package/dist/{chunk-FBYAXTDM.js → chunk-2ZOEC4KC.js} +10 -2
- package/dist/{chunk-ELXFSIIM.js → chunk-32YV32VA.js} +2 -2
- package/dist/{chunk-44C7QNZS.js → chunk-3KDCORDO.js} +1 -1
- package/dist/{chunk-JTB5V6BV.js → chunk-3SXHEQ7X.js} +1 -1
- package/dist/{chunk-HDW4XPDV.js → chunk-3UUX5OY4.js} +1 -1
- package/dist/{chunk-7PSLK36P.js → chunk-44TLJZJ5.js} +1 -1
- package/dist/{chunk-JTWTBX2M.js → chunk-4EN3IZ3Q.js} +2 -1
- package/dist/{chunk-KPMC7PY7.js → chunk-4HKTO2SV.js} +1 -1
- package/dist/{chunk-CDUB5Q6J.js → chunk-4IK2K3B3.js} +1 -1
- package/dist/{chunk-GH6YJOOC.js → chunk-4SJ4LK4V.js} +6 -6
- package/dist/{chunk-PVEM537A.js → chunk-4YLBKEL5.js} +2 -2
- package/dist/chunk-4YNA3CM6.js +872 -0
- package/dist/{chunk-KYFFVTGO.js → chunk-55BEFF4V.js} +3 -3
- package/dist/{chunk-SEP5ITFQ.js → chunk-636LKCKE.js} +2 -2
- package/dist/{chunk-QTI4QAWA.js → chunk-6EZQUNE6.js} +338 -5
- package/dist/{chunk-WAEKYKTK.js → chunk-6RKKVPYF.js} +1 -1
- package/dist/{chunk-VX2F4ZUY.js → chunk-6SCGLHJ7.js} +3 -3
- package/dist/{chunk-MEGRQ53A.js → chunk-6VHOQ3IM.js} +51 -6
- package/dist/{chunk-HIIXCAEE.js → chunk-6YVUR3OU.js} +3 -3
- package/dist/{chunk-L6ZNURWN.js → chunk-7GE2EQ23.js} +1 -1
- package/dist/{chunk-2CWS374F.js → chunk-7RI2CNXJ.js} +1 -1
- package/dist/{chunk-OL3QP3AU.js → chunk-7TSBV3SD.js} +1 -1
- package/dist/{chunk-DSOQUQTV.js → chunk-A27Q27CT.js} +27 -0
- package/dist/{chunk-5AHRZI3R.js → chunk-AETLDRZB.js} +1 -1
- package/dist/{chunk-RNLF3CBB.js → chunk-AKLJ4JH3.js} +1 -1
- package/dist/{chunk-XHYHX6F7.js → chunk-AKLQSC6W.js} +329 -164
- package/dist/chunk-ANLFH23R.js +261 -0
- package/dist/{chunk-QLA3RTH4.js → chunk-AWWKRZMB.js} +5 -5
- package/dist/{chunk-ERVQTR7P.js → chunk-BBSIEYF5.js} +17 -3
- package/dist/{chunk-IPMUWYRQ.js → chunk-BJ7AVSY6.js} +2 -2
- package/dist/{chunk-HV6Y6F4X.js → chunk-C2L622QJ.js} +89 -3
- package/dist/{chunk-TX3Q2GIL.js → chunk-C5HUMAA7.js} +24 -1
- package/dist/{chunk-QTYJPWJN.js → chunk-CBCGDEJA.js} +7 -7
- package/dist/{chunk-XXSNLM6R.js → chunk-DB55JZHU.js} +1 -1
- package/dist/{chunk-LAZKEJMS.js → chunk-DIXXEE3S.js} +840 -607
- package/dist/{chunk-FB343XQX.js → chunk-DJ7YXOTU.js} +2 -2
- package/dist/{chunk-YFCNWQAM.js → chunk-DJOIMFKV.js} +2 -2
- package/dist/{chunk-UTDMTQNH.js → chunk-DSJI76XL.js} +92 -14
- package/dist/{chunk-EEXX4UMQ.js → chunk-DZKPOSFD.js} +1 -1
- package/dist/{chunk-WSOA3WMC.js → chunk-E426DOSY.js} +161 -4
- package/dist/{chunk-ZISQOOER.js → chunk-EKE37MO4.js} +3 -3
- package/dist/{chunk-RIECV7SR.js → chunk-EKYYMIVT.js} +1 -1
- package/dist/{chunk-HIVZ53YB.js → chunk-EXTZSNWL.js} +2 -2
- package/dist/{chunk-YYA5LXCT.js → chunk-FNEZ4BWT.js} +1 -1
- package/dist/chunk-FTZET5YX.js +313 -0
- package/dist/chunk-GHR4ZPJ7.js +70 -0
- package/dist/{chunk-MINXPXAB.js → chunk-GJI77VDO.js} +3 -3
- package/dist/{chunk-AAMGHW5W.js → chunk-GLQEJOXE.js} +1 -0
- package/dist/{chunk-ADNBOKYZ.js → chunk-GM7TLYOK.js} +60 -18
- package/dist/{chunk-RUWWES2K.js → chunk-GNUAL43X.js} +2 -2
- package/dist/{chunk-QZL6E4UB.js → chunk-GOMQ7PVQ.js} +2 -2
- package/dist/{chunk-GB3AHV5F.js → chunk-GQOEWNVM.js} +1 -1
- package/dist/{chunk-NQZUSEAR.js → chunk-GS7LIT34.js} +246 -17
- package/dist/{chunk-XTWHNLGD.js → chunk-GZOG2MAX.js} +1 -1
- package/dist/{chunk-E5HAY3DQ.js → chunk-HDLAB7W3.js} +1 -1
- package/dist/{chunk-E5QQZDQN.js → chunk-HNWS7YHN.js} +358 -136
- package/dist/{chunk-VV5EZZNT.js → chunk-HTBEVCO2.js} +1 -1
- package/dist/{chunk-OZBII5E3.js → chunk-I4DNJFDR.js} +4 -4
- package/dist/{chunk-SI5SZAJA.js → chunk-IBS2FAI4.js} +21 -4
- package/dist/{chunk-J5EYOBFF.js → chunk-IHXW4VUI.js} +1 -1
- package/dist/{chunk-RUVO3NJC.js → chunk-IN6CAM4F.js} +9 -3
- package/dist/{chunk-53PYNYTW.js → chunk-IRVOXUSK.js} +5 -5
- package/dist/{chunk-THM7J6UI.js → chunk-JHI5WMK5.js} +5 -5
- package/dist/{chunk-3KTQWMHI.js → chunk-JSMDRKPJ.js} +12 -4
- package/dist/chunk-JTVIANUB.js +131 -0
- package/dist/{chunk-2ADYTOHQ.js → chunk-K4ESASPL.js} +1 -1
- package/dist/{chunk-YWUQVHDL.js → chunk-KTCXJWJG.js} +1 -1
- package/dist/{chunk-RGUDGC6A.js → chunk-KTU3EAWK.js} +5 -5
- package/dist/{chunk-DKBPCOU4.js → chunk-L6RXG36J.js} +2 -2
- package/dist/{chunk-T4EK56WI.js → chunk-LDNYSMPZ.js} +1 -1
- package/dist/{chunk-RIK5GRWI.js → chunk-LGS2V2XD.js} +3 -3
- package/dist/{chunk-JKXZGRWR.js → chunk-LP4GB656.js} +2 -2
- package/dist/{chunk-H74466TM.js → chunk-M7O7TGGU.js} +1 -1
- package/dist/chunk-MJCSEIFI.js +54 -0
- package/dist/{chunk-IDZPQG2D.js → chunk-MOGA4Q7F.js} +2 -2
- package/dist/{chunk-OYQNNKNS.js → chunk-MXPNVSXI.js} +37 -14
- package/dist/{chunk-UVW7YFAF.js → chunk-N7VEP5B3.js} +4 -4
- package/dist/{chunk-HHE2HV3V.js → chunk-NBXDXKLC.js} +1 -1
- package/dist/{chunk-LDL3S7AC.js → chunk-NKETJCB5.js} +7 -3
- package/dist/{chunk-ECHLVLA7.js → chunk-NMH5ZQPU.js} +1 -1
- package/dist/{chunk-U3XLRMJD.js → chunk-NT7W4RXD.js} +1 -1
- package/dist/{chunk-UQUUNGTP.js → chunk-NUK7EEN5.js} +11 -9
- package/dist/{chunk-GBNB4EWD.js → chunk-ORM7ZFKC.js} +16 -0
- package/dist/{chunk-O4ZFRK6W.js → chunk-OVEQE6YS.js} +244 -49
- package/dist/{chunk-4ZJ5BPY6.js → chunk-PB5S7YOF.js} +2 -2
- package/dist/{chunk-JR23BL74.js → chunk-PDVXWXTL.js} +4 -4
- package/dist/{chunk-3CIMDFXG.js → chunk-PFQ3VEEM.js} +1 -1
- package/dist/{chunk-SBJV2PCU.js → chunk-PHBU4LGO.js} +1 -1
- package/dist/{chunk-W25RLOQ2.js → chunk-PLZSZOZN.js} +3 -3
- package/dist/{chunk-THIJIOE2.js → chunk-PY3FOMRN.js} +18 -6
- package/dist/{chunk-AAUWFXOX.js → chunk-Q3AXXKDF.js} +3 -3
- package/dist/{chunk-VKXS2YGN.js → chunk-QHJR7IMX.js} +2 -2
- package/dist/chunk-QLZ46RCK.js +45 -0
- package/dist/{chunk-UHPMK6QZ.js → chunk-R3CZWFFC.js} +10 -2
- package/dist/{chunk-6XEYELCA.js → chunk-R4CBHKZ2.js} +1 -1
- package/dist/{chunk-5APCDDJZ.js → chunk-R522MWAR.js} +9 -9
- package/dist/chunk-RH4AH3YB.js +80 -0
- package/dist/{chunk-AMKSDKMK.js → chunk-S2WBS6BG.js} +22 -35
- package/dist/{chunk-WUKQVNLP.js → chunk-SEQIPGLU.js} +1 -1
- package/dist/{chunk-7WQRFSZI.js → chunk-SL6KQYDU.js} +26 -6
- package/dist/chunk-SLLLOOEI.js +103 -0
- package/dist/{chunk-5N4SG5NB.js → chunk-T35RCQFE.js} +3 -3
- package/dist/{chunk-7V6M3QUS.js → chunk-T3QUKNLI.js} +1 -1
- package/dist/{chunk-CW2UCKHS.js → chunk-TADAO3HV.js} +2 -2
- package/dist/{chunk-5DCCKHDY.js → chunk-TAMDAOCU.js} +109 -13
- package/dist/{chunk-ZXB56YR2.js → chunk-TFKCERAK.js} +101 -23
- package/dist/{chunk-RBYHJDAT.js → chunk-TQAZTRQ3.js} +3 -3
- package/dist/{chunk-OKGIOWOB.js → chunk-U6SUKSZR.js} +2 -2
- package/dist/{chunk-23QKEUF6.js → chunk-U73AC5AN.js} +34 -12
- package/dist/{chunk-PM6WSWVU.js → chunk-UBK7HK3J.js} +3 -3
- package/dist/{chunk-H37FSTF2.js → chunk-UBMZ3YQU.js} +1 -1
- package/dist/{chunk-JJUGI2YL.js → chunk-UCFC2AEI.js} +1 -1
- package/dist/{chunk-6IWLAQ7O.js → chunk-UCUOGVDX.js} +4 -0
- package/dist/{chunk-E7UCDSUE.js → chunk-UKLN57Q5.js} +2 -2
- package/dist/{chunk-ZYCLSEZT.js → chunk-ULIBLJ6W.js} +33 -11
- package/dist/{chunk-RLR6VVKV.js → chunk-UM3N6VND.js} +4 -4
- package/dist/{chunk-ZNUJFX7L.js → chunk-UQGSBM3U.js} +1 -1
- package/dist/{chunk-ZZXMB5F2.js → chunk-UZDF6FLJ.js} +1 -1
- package/dist/{chunk-LNOS24GV.js → chunk-V3WLC5TJ.js} +2 -95
- package/dist/{chunk-UXLO7VHX.js → chunk-VI4ATC6I.js} +1 -1
- package/dist/{chunk-77JP3LK4.js → chunk-VKJGHAZT.js} +92 -21
- package/dist/{chunk-7R73IAHU.js → chunk-VMTZ4RUW.js} +67 -150
- package/dist/{chunk-TGPQMMQP.js → chunk-VYQ7B7DI.js} +30 -17
- package/dist/{chunk-E2WEFZOR.js → chunk-W75GTHR3.js} +1 -1
- package/dist/{chunk-UKLF7F3Z.js → chunk-WJG344NC.js} +9 -9
- package/dist/{chunk-MBNIJXKI.js → chunk-WMEYJT4R.js} +18 -4
- package/dist/{chunk-R6FLELV6.js → chunk-XFTEX77S.js} +3 -3
- package/dist/{chunk-MDGYXUOV.js → chunk-XH7YL7JM.js} +1 -1
- package/dist/{chunk-JOO35RHR.js → chunk-XL5MFGMR.js} +3 -3
- package/dist/{chunk-OW5RZIDW.js → chunk-XNNECNDL.js} +95 -33
- package/dist/{chunk-5AHDQCTB.js → chunk-XXFKSJYA.js} +6 -6
- package/dist/{chunk-TGEPLJ66.js → chunk-XXOPG4BW.js} +3 -3
- package/dist/{chunk-PGLPUP37.js → chunk-XZ65ST2I.js} +1 -1
- package/dist/{chunk-3TTKAT6V.js → chunk-YKC7QDZH.js} +9 -4
- package/dist/{chunk-KXYFBBZR.js → chunk-YMP2QSOP.js} +20 -3
- package/dist/{chunk-TK4MI6F6.js → chunk-YSLGFPWX.js} +6 -6
- package/dist/{chunk-X2P43TB2.js → chunk-YTSXPJUQ.js} +1 -1
- package/dist/{chunk-HECXZGGZ.js → chunk-ZCERWHY2.js} +33 -35
- package/dist/{chunk-IVU3WN7S.js → chunk-ZG62LIK3.js} +74 -4
- package/dist/{chunk-GU62SNDH.js → chunk-ZGYNKA3O.js} +744 -111
- package/dist/{chunk-QMSEL5YS.js → chunk-ZIG7VPJV.js} +28 -76
- package/dist/{chunk-WZJVGA5I.js → chunk-ZL4AGWAH.js} +258 -13
- package/dist/{chunk-QR624DER.js → chunk-ZSODLMFV.js} +2 -2
- package/dist/{cleanup-graph-garbage-IPYDS5OX.js → cleanup-graph-garbage-DPJGO52H.js} +11 -10
- package/dist/{cloud-sync-command-JLNVG7H4.js → cloud-sync-command-JPNTT4OQ.js} +2 -2
- package/dist/{cloud-sync-db-init-JXUF6GI3.js → cloud-sync-db-init-V2LWIUQU.js} +1 -1
- package/dist/{cloud-sync-shutdown-Z4SBP6PL.js → cloud-sync-shutdown-BNALPWGX.js} +5 -4
- package/dist/{co-activation-74RDFTKS.js → co-activation-CMNSWS6B.js} +5 -4
- package/dist/{co-occurrence-CN3TBYVR.js → co-occurrence-WRI2NAN6.js} +9 -8
- package/dist/{code-context-index-D4MJ4VFX.js → code-context-index-NOJSHLPN.js} +12 -6
- package/dist/code-context-watcher-VZNZU3BO.js +118 -0
- package/dist/{codex-consolidation-PPXNBXCV.js → codex-consolidation-SH4UKFBQ.js} +2 -1
- package/dist/{conversation-entity-extractor-QGTLH4BP.js → conversation-entity-extractor-74252CAO.js} +4 -4
- package/dist/{conversation-wiki-populator-EBUZXYEU.js → conversation-wiki-populator-OS4C6W54.js} +1 -1
- package/dist/conversations-retention-C4BLKFEL.js +54 -0
- package/dist/coordinator-notice-MHUY7AQB.js +55 -0
- package/dist/{crdt-sync-7T4WCOKD.js → crdt-sync-B3JN6AIV.js} +1 -1
- package/dist/{crm-webhook-FTW3XZTO.js → crm-webhook-GYWQRFET.js} +2 -2
- package/dist/{cto-delegation-gate-SZCE34LB.js → cto-delegation-gate-LQHVLEMW.js} +29 -26
- package/dist/{daemon-auth-SSPY5ODS.js → daemon-auth-QZHEO7IQ.js} +3 -2
- package/dist/{daemon-orchestration-IGPHVNFR.js → daemon-orchestration-5HIQALZH.js} +36 -34
- package/dist/{daemon-ready-OT2VQLS7.js → daemon-ready-P2BR2XP5.js} +1 -1
- package/dist/{db-integrity-events-5DTASXJF.js → db-integrity-events-2DTFO37N.js} +3 -2
- package/dist/{db-restore-events-2FI4ZMKA.js → db-restore-events-G6NOQOVE.js} +2 -1
- package/dist/{destructive-data-guard-6I5MDFVD.js → destructive-data-guard-BVFWPPIS.js} +1 -1
- package/dist/doc-graph-extractor-PQHDHQPQ.js +367 -0
- package/dist/{documents-URULIXGM.js → documents-C4SSPJMC.js} +15 -13
- package/dist/{dreaming-VIZO3QDO.js → dreaming-XAO3FCBV.js} +33 -30
- package/dist/{employee-boot-brief-XLOG4ULP.js → employee-boot-brief-W4OHUMRQ.js} +37 -34
- package/dist/{exe-drift-TLQM3IHD.js → exe-drift-AG2KMKD5.js} +6 -5
- package/dist/{exe-export-7YWYWJHY.js → exe-export-IC5BT335.js} +17 -15
- package/dist/{exe-import-DW6VAUKW.js → exe-import-A35ZLDPG.js} +17 -15
- package/dist/{exe-key-TLJP2B4Y.js → exe-key-TCMJNYLA.js} +116 -112
- package/dist/{exe-org-LU46N36E.js → exe-org-JXCR3JYZ.js} +24 -23
- package/dist/{exe-snapshot-QHUZRS62.js → exe-snapshot-SV6SRIG6.js} +36 -33
- package/dist/{fast-db-init-SCTOOIUT.js → fast-db-init-L2RGKJWH.js} +1 -1
- package/dist/{founder-context-ZFZC4UHO.js → founder-context-D4HFIESJ.js} +4 -3
- package/dist/{founder-monitor-envelope-5KTKNL5G.js → founder-monitor-envelope-TFKRGCFE.js} +5 -4
- package/dist/{fts-integrity-LKAZEZJE.js → fts-integrity-4YB34KWX.js} +3 -2
- package/dist/gateway/index.js +19 -17
- package/dist/{git-main-guard-TN27QBAI.js → git-main-guard-VTW4N3CM.js} +7 -1
- package/dist/{git-staleness-GSGP344N.js → git-staleness-TN7CYGFG.js} +5 -4
- package/dist/{global-procedures-YAR7G4C6.js → global-procedures-YFDEIOG7.js} +7 -6
- package/dist/{graph-auto-extract-GNQS64F5.js → graph-auto-extract-3YR3TYRW.js} +9 -8
- package/dist/{graph-rag-RMSFLUOB.js → graph-rag-Z2KCJTPK.js} +6 -4
- package/dist/{hook-integrity-CF567MVN.js → hook-integrity-KGAV6ZC2.js} +14 -4
- package/dist/{hook-prefetch-36BK4F7U.js → hook-prefetch-K5DN3TOQ.js} +29 -26
- package/dist/hooks/bug-report-worker.js +34 -30
- package/dist/hooks/codex-stop-task-finalizer.js +36 -32
- package/dist/hooks/commit-complete.js +33 -30
- package/dist/hooks/error-recall.js +12 -11
- package/dist/hooks/exe-heartbeat-hook.js +8 -7
- package/dist/hooks/ingest-worker.js +23 -11
- package/dist/hooks/ingest.js +18 -17
- package/dist/hooks/instructions-loaded.js +10 -9
- package/dist/hooks/manifest.json +20 -20
- package/dist/hooks/notification.js +9 -8
- package/dist/hooks/post-compact.js +8 -7
- package/dist/hooks/post-tool-combined.js +26 -15
- package/dist/hooks/pre-compact.js +33 -30
- package/dist/hooks/pre-tool-use.js +404 -46
- package/dist/hooks/prompt-submit.js +57 -47
- package/dist/hooks/session-end.js +40 -41
- package/dist/hooks/session-start.js +21 -20
- package/dist/hooks/stop.js +40 -37
- package/dist/hooks/subagent-stop.js +38 -35
- package/dist/hooks/summary-worker.js +39 -36
- package/dist/hyde-MP4QNMU5.js +80 -0
- package/dist/index.js +44 -39
- package/dist/{installer-LUN4HQIC.js → installer-54HTN5RE.js} +8 -7
- package/dist/{installer-OC5VXNC7.js → installer-LK35OX6R.js} +8 -7
- package/dist/{installer-MPRFUQJE.js → installer-LLWKZI2S.js} +8 -7
- package/dist/intercom-ack-VCW755TN.js +13 -0
- package/dist/{intercom-queue-6DZ7BANV.js → intercom-queue-5NOT2RKI.js} +28 -25
- package/dist/{key-backup-status-6L2ARCXW.js → key-backup-status-LQPINQ3W.js} +2 -1
- package/dist/lib/agent-config.js +3 -2
- package/dist/lib/cloud-sync.js +26 -20
- package/dist/lib/config.js +2 -1
- package/dist/lib/consolidation.js +17 -10
- package/dist/lib/database.js +7 -4
- package/dist/lib/db-backup.js +17 -2
- package/dist/lib/db-daemon-client.js +8 -6
- package/dist/lib/db-write-worker-client.js +3 -1
- package/dist/lib/db-write-worker.js +20 -3
- package/dist/lib/db.js +7 -4
- package/dist/lib/device-registry.js +3 -2
- package/dist/lib/embed-worker.js +2 -1
- package/dist/lib/embedder.js +8 -6
- package/dist/lib/employee-templates.js +8 -7
- package/dist/lib/employees.js +5 -4
- package/dist/lib/exe-daemon-client.js +7 -5
- package/dist/lib/exe-daemon.js +467 -221
- package/dist/lib/hybrid-search.js +11 -8
- package/dist/lib/identity.js +5 -4
- package/dist/lib/license.js +4 -3
- package/dist/lib/messaging.js +29 -26
- package/dist/lib/post-tool-memory.js +16 -2
- package/dist/lib/registry-proxy.js +3 -1
- package/dist/lib/reminders.js +6 -5
- package/dist/lib/schedules.js +9 -8
- package/dist/lib/session-registry.js +7 -6
- package/dist/lib/skill-learning.js +16 -14
- package/dist/lib/stack-invariants.js +17 -1
- package/dist/lib/status-brief.js +5 -4
- package/dist/lib/store.js +10 -7
- package/dist/lib/task-router.js +6 -5
- package/dist/lib/tasks.js +31 -27
- package/dist/lib/tmux-routing.js +40 -25
- package/dist/lib/tmux-status.js +3 -1
- package/dist/lib/tmux-transport.js +2 -1
- package/dist/lib/token-spend.js +6 -5
- package/dist/lib/transport.js +3 -2
- package/dist/{license-gate-ESER24PJ.js → license-gate-JVMB6OFD.js} +5 -4
- package/dist/{license-sync-JVG5KNIY.js → license-sync-5VYS2F2W.js} +4 -3
- package/dist/mcp/register-tools.js +113 -109
- package/dist/mcp/server.js +118 -114
- package/dist/mcp/tools/complete-reminder.js +7 -6
- package/dist/mcp/tools/create-reminder.js +7 -6
- package/dist/mcp/tools/create-task.js +34 -30
- package/dist/mcp/tools/deactivate-behavior.js +18 -16
- package/dist/mcp/tools/list-reminders.js +7 -6
- package/dist/mcp/tools/list-tasks.js +34 -30
- package/dist/mcp/tools/send-message.js +32 -29
- package/dist/mcp/tools/update-task.js +32 -28
- package/dist/mcp-child-registry-OTG4MWO7.js +25 -0
- package/dist/{mcp-http-config-6K6IKH5F.js → mcp-http-config-DQWL7U2Z.js} +6 -5
- package/dist/{mcp-session-identity-LRC6WJSD.js → mcp-session-identity-277GASTQ.js} +28 -25
- package/dist/{memory-cards-V3OZHIYP.js → memory-cards-3S2ZQPR7.js} +17 -8
- package/dist/{memory-graph-extractor-JC2Z64L4.js → memory-graph-extractor-A6DFEFIN.js} +10 -9
- package/dist/{memory-poisoning-defense-YM4QJHCX.js → memory-poisoning-defense-ZVP4H6DY.js} +5 -4
- package/dist/{memory-pressure-watchdog-6F6KEQHN.js → memory-pressure-watchdog-6W5F6R7H.js} +29 -26
- package/dist/{memory-queue-QJNWKWKG.js → memory-queue-YF7IDSFY.js} +3 -2
- package/dist/{memory-queue-client-COA4ABEV.js → memory-queue-client-ADSDP6OX.js} +9 -7
- package/dist/{memory-reflection-QXHJPYPC.js → memory-reflection-BKB2YOE6.js} +52 -6
- package/dist/{monitor-grants-BW2WL4IU.js → monitor-grants-EV747HMW.js} +4 -3
- package/dist/{notification-ledger-6QRLQW4Q.js → notification-ledger-CLGM7ODF.js} +30 -27
- package/dist/{notifications-7B6D7Y5C.js → notifications-MACUZPYP.js} +28 -25
- package/dist/{oauth-server-TZFNQAFS.js → oauth-server-AYM37SQ4.js} +25 -4
- package/dist/{orchestration-events-GY5VP5LU.js → orchestration-events-N7LYMUGA.js} +6 -5
- package/dist/{orchestration-phase-UDS24CVQ.js → orchestration-phase-T2WD45UA.js} +3 -2
- package/dist/{orchestrator-JVPVOYWA.js → orchestrator-4X24EWHV.js} +30 -27
- package/dist/{org-brief-session-GRV5R5E3.js → org-brief-session-FZOFMO5U.js} +13 -12
- package/dist/{org-consent-policy-3FHHSYXV.js → org-consent-policy-O5E6HXBL.js} +1 -1
- package/dist/{org-join-BY4PV6UO.js → org-join-POWUG25F.js} +8 -7
- package/dist/{org-key-admin-WSCPT2CZ.js → org-key-admin-E7EMDOZZ.js} +9 -8
- package/dist/{org-key-pin-5WUSPGVN.js → org-key-pin-WHWHVWUO.js} +4 -3
- package/dist/{org-membership-ESALTLLN.js → org-membership-WRT2IHJK.js} +5 -4
- package/dist/{org-partner-config-YKHPDPZR.js → org-partner-config-B7T4CL2T.js} +7 -6
- package/dist/{org-partner-runtime-UJDGECZ4.js → org-partner-runtime-FODONVTM.js} +13 -12
- package/dist/{org-row-visibility-V5DXIHTE.js → org-row-visibility-VX4AVV5Q.js} +1 -1
- package/dist/{pipeline-router-YY5FQKTY.js → pipeline-router-6GGT2ZW3.js} +6 -5
- package/dist/{plan-limits-OVX6SN6B.js → plan-limits-FUN76LYY.js} +8 -7
- package/dist/{platform-procedures-I57ITMDC.js → platform-procedures-7YSCLF4Z.js} +1 -1
- package/dist/{postinstall-failure-B2JHNFPM.js → postinstall-failure-O6TSSNJB.js} +3 -2
- package/dist/{project-boot-LXLU2J32.js → project-boot-3Q65LCIP.js} +2 -1
- package/dist/project-name-LJVFMYTQ.js +30 -0
- package/dist/{projection-worker-D2472IOD.js → projection-worker-4OANGP5K.js} +5 -4
- package/dist/{prospective-memory-JXO2A6PL.js → prospective-memory-KR3P4T6N.js} +5 -4
- package/dist/{push-notifications-HR3FZRDI.js → push-notifications-NCZLH6DI.js} +29 -26
- package/dist/ref-provenance-gate-M4AQO4OT.js +269 -0
- package/dist/{reproject-worktree-memories-OSS3PGRF.js → reproject-worktree-memories-PWYKPB2U.js} +106 -23
- package/dist/{reranker-IMZRPYJ2.js → reranker-6V3C2AO4.js} +3 -2
- package/dist/resolve-image-labels-ZI6UBW5W.js +15 -0
- package/dist/{retrieval-health-W7OD44FE.js → retrieval-health-5D7O6VH6.js} +4 -3
- package/dist/{review-polling-2INP7H6M.js → review-polling-QW3LJ4KN.js} +29 -26
- package/dist/runtime/index.js +38 -34
- package/dist/{session-events-G4XUPVWV.js → session-events-T45SSTMF.js} +31 -26
- package/dist/{session-kill-telemetry-W7MHWJTQ.js → session-kill-telemetry-QSPVJGBF.js} +29 -26
- package/dist/{session-mcp-config-F7KATWOF.js → session-mcp-config-SC5BLWZG.js} +3 -2
- package/dist/{session-scope-LG2J4EMQ.js → session-scope-KRWE54C4.js} +28 -25
- package/dist/{setup-wizard-YQJI3SVM.js → setup-wizard-GP3TBTPF.js} +5 -4
- package/dist/{shard-manager-UROHZE46.js → shard-manager-OE36A4MY.js} +3 -2
- package/dist/{skill-refinement-RA37U756.js → skill-refinement-C7JTMLJG.js} +6 -5
- package/dist/stack-generate-manifest-MFMDWRUP.js +810 -0
- package/dist/{stack-promote-IYBRXHTA.js → stack-promote-EKSCYY63.js} +8 -6
- package/dist/{stack-release-OXWLVVG6.js → stack-release-2GZAAFO4.js} +8 -6
- package/dist/{stack-update-2CZEROPK.js → stack-update-J6JXSTAZ.js} +51 -5
- package/dist/{steward-gate-LTNFB3FY.js → steward-gate-BFCCMCSW.js} +6 -5
- package/dist/{subagent-brief-injection-OHLWLECQ.js → subagent-brief-injection-ED36PLYY.js} +44 -36
- package/dist/{subagent-spawn-ledger-USYZXU3M.js → subagent-spawn-ledger-E6U3OY6Z.js} +3 -2
- package/dist/{supervisor-handoff-CSJQMI53.js → supervisor-handoff-SGLEPOCY.js} +12 -3
- package/dist/{support-inbox-4KCEPAZQ.js → support-inbox-YW47SYJF.js} +20 -5
- package/dist/{task-enforcement-LGXWXGVZ.js → task-enforcement-CECTQX4U.js} +29 -26
- package/dist/{task-request-inbox-WHCOSUCP.js → task-request-inbox-Q5T4N5K7.js} +1 -1
- package/dist/{task-scope-KXF7Y6KA.js → task-scope-ERVEUEYU.js} +28 -25
- package/dist/{tasks-crud-5EM55WRZ.js → tasks-crud-ZRQNJXQ2.js} +28 -25
- package/dist/{tasks-notify-VFMAURTN.js → tasks-notify-MIZH4C2O.js} +29 -26
- package/dist/{tasks-review-MHGMBHUZ.js → tasks-review-Z7J2P6DG.js} +28 -25
- package/dist/{telemetry-upload-6NRTN7QJ.js → telemetry-upload-LVQUQYFP.js} +10 -9
- package/dist/{token-budget-LZPOYTRP.js → token-budget-BU4NOVZF.js} +6 -5
- package/dist/{tool-capability-index-ED5OAPMW.js → tool-capability-index-7F42MOJT.js} +1 -1
- package/dist/{tool-gates-7PLIOLAL.js → tool-gates-JWVSAYTW.js} +1 -1
- package/dist/{tool-gates-2OZY3GZM.js → tool-gates-VXITVRFQ.js} +1 -1
- package/dist/{tool-telemetry-ZX7VSAXK.js → tool-telemetry-O27EVMBR.js} +1 -1
- package/dist/tui/App.js +43 -40
- package/dist/{tui-data-CC5POSUV.js → tui-data-TPWWBIUQ.js} +28 -25
- package/dist/{update-support-KH6NSQON.js → update-support-F2F5537B.js} +22 -20
- package/dist/{whatsapp-QW3X7OCN.js → whatsapp-YM4A2CSK.js} +3 -1
- package/dist/{work-claims-MNK7PEPW.js → work-claims-B73X5NE7.js} +6 -5
- package/dist/{work-state-heartbeat-YEWT5NMZ.js → work-state-heartbeat-P4YX6E2R.js} +1 -1
- package/dist/{worker-gate-BOQSIU2Z.js → worker-gate-BEEIIVWA.js} +3 -2
- package/dist/{workflow-engine-MUUD7ZEX.js → workflow-engine-5X46PFCW.js} +4 -2
- package/dist/{worktree-GOGT2LZP.js → worktree-W47CIMJ6.js} +9 -6
- package/dist/worktree-ownership-guard-OUWJROW2.js +88 -0
- package/dist/{worktree-sweep-46VWPVQT.js → worktree-sweep-BNBD4RFX.js} +8 -7
- package/package.json +14 -5
- package/release-notes.json +5 -5
- package/src/commands/exe/call.md +1 -1
- package/stack.release.json +6 -0
- package/dist/chunk-KZXMP6JG.js +0 -319
- package/dist/chunk-TCTED52S.js +0 -120
- package/dist/chunk-W2IRQJ6R.js +0 -67
- package/dist/doc-graph-extractor-VPTRIEKN.js +0 -149
- package/dist/project-name-ILJTETUE.js +0 -14
- /package/dist/{chunk-3Y5THOU6.js → chunk-6WIFPD2P.js} +0 -0
- /package/dist/{chunk-7XGXRD22.js → chunk-AISULNGL.js} +0 -0
- /package/dist/{chunk-3F2UB4IQ.js → chunk-DN4YVV4Z.js} +0 -0
- /package/dist/{chunk-WV3TOOL7.js → chunk-KQ6RJWRW.js} +0 -0
- /package/dist/{chunk-HR2R2QER.js → chunk-M4IRPXSZ.js} +0 -0
- /package/dist/{chunk-ORA5BWCV.js → chunk-NRG7KZIP.js} +0 -0
- /package/dist/{chunk-7UTJA6HF.js → chunk-VZAFWPAY.js} +0 -0
- /package/dist/{chunk-VJSDGDNS.js → chunk-WSQASFLP.js} +0 -0
- /package/dist/{chunk-FZQWVQJG.js → chunk-YO4BO2CL.js} +0 -0
- /package/dist/{core-memory-6WBNT2HL.js → core-memory-7I7RE2SJ.js} +0 -0
- /package/dist/{entity-boost-MT336PI3.js → entity-boost-3UWGXG5O.js} +0 -0
- /package/dist/{memory-isolation-EJ45IXBH.js → memory-isolation-2TUZ7Z4K.js} +0 -0
- /package/dist/{message-queue-client-MVBTYCSV.js → message-queue-client-XQN7QABL.js} +0 -0
- /package/dist/{webhook-pipe-UQSEHFPO.js → webhook-pipe-W2FVXY7M.js} +0 -0
- /package/dist/{wiki-acl-WXRJGZ5Q.js → wiki-acl-IBQLLBTS.js} +0 -0
- /package/dist/{wiki-client-AXNM5FWY.js → wiki-client-W65IOSWF.js} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isPaneBusy
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-23MVDXLY.js";
|
|
4
4
|
import {
|
|
5
5
|
recordSessionKill
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TQAZTRQ3.js";
|
|
7
7
|
import {
|
|
8
8
|
updateTask
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZCERWHY2.js";
|
|
10
10
|
import {
|
|
11
11
|
BUSY_PATTERN,
|
|
12
12
|
countPendingReviews,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
sessionScopeFilter,
|
|
23
23
|
strictSessionScopeFilter,
|
|
24
24
|
writeNotification
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-AKLQSC6W.js";
|
|
26
26
|
import {
|
|
27
27
|
isValidSessionScope
|
|
28
28
|
} from "./chunk-BTSWFMEH.js";
|
|
@@ -32,19 +32,20 @@ import {
|
|
|
32
32
|
} from "./chunk-E23LNUWJ.js";
|
|
33
33
|
import {
|
|
34
34
|
listSessions
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-XH7YL7JM.js";
|
|
36
36
|
import {
|
|
37
37
|
capturePaneLinesAsync,
|
|
38
38
|
listTmuxSessions,
|
|
39
|
+
listTmuxSessionsAsync,
|
|
39
40
|
parseContextPercentage,
|
|
40
41
|
parseContextPercentageAsync
|
|
41
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-ORM7ZFKC.js";
|
|
42
43
|
import {
|
|
43
44
|
getTransport
|
|
44
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-VI4ATC6I.js";
|
|
45
46
|
import {
|
|
46
47
|
recordOrchestrationEventBestEffort
|
|
47
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-W75GTHR3.js";
|
|
48
49
|
import {
|
|
49
50
|
checkDispatchStatus,
|
|
50
51
|
readTerminalLauncherFailure,
|
|
@@ -53,27 +54,29 @@ import {
|
|
|
53
54
|
} from "./chunk-AJIXH5JF.js";
|
|
54
55
|
import {
|
|
55
56
|
getAgentRuntime
|
|
56
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-GZOG2MAX.js";
|
|
57
58
|
import {
|
|
58
59
|
killIfSameProcess,
|
|
59
|
-
processStartedAt
|
|
60
|
+
processStartedAt
|
|
61
|
+
} from "./chunk-SLLLOOEI.js";
|
|
62
|
+
import {
|
|
60
63
|
recordKillIntent
|
|
61
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-V3WLC5TJ.js";
|
|
62
65
|
import {
|
|
63
66
|
baseAgentName,
|
|
64
67
|
getCoordinatorName,
|
|
65
68
|
isCoordinatorName,
|
|
66
69
|
shouldAutoInstance
|
|
67
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-TAMDAOCU.js";
|
|
68
71
|
import {
|
|
69
72
|
eventLoopBlockedMarkerPath
|
|
70
73
|
} from "./chunk-JY5GAZYC.js";
|
|
71
74
|
import {
|
|
72
75
|
loadConfigSync
|
|
73
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-ZIG7VPJV.js";
|
|
74
77
|
|
|
75
78
|
// src/lib/daemon-orchestration.ts
|
|
76
|
-
import { execFile, execFileSync
|
|
79
|
+
import { execFile, execFileSync } from "child_process";
|
|
77
80
|
import { promisify } from "util";
|
|
78
81
|
import { randomUUID } from "crypto";
|
|
79
82
|
import { existsSync as existsSync2, mkdirSync, readFileSync, writeFileSync, unlinkSync, statSync as statSync2 } from "fs";
|
|
@@ -256,6 +259,7 @@ function getAvailableMemoryGB() {
|
|
|
256
259
|
}
|
|
257
260
|
var execFileAsync = promisify(execFile);
|
|
258
261
|
var IDLE_NUDGE_DEDUP_MS = Number(process.env.EXE_NUDGE_INTERVAL_MS) || 6e4;
|
|
262
|
+
var IDLE_NUDGE_MAX_TASK_AGE_MS = Number(process.env.EXE_IDLE_NUDGE_MAX_TASK_AGE_MS) || 6 * 60 * 60 * 1e3;
|
|
259
263
|
var SESSION_TTL_HOURS = Number(process.env.EXE_SESSION_TTL_HOURS) || 8;
|
|
260
264
|
var UNREACHABLE_ACTIVE_TASK_TTL_HOURS = Number(process.env.EXE_UNREACHABLE_ACTIVE_TASK_TTL_HOURS) || 1;
|
|
261
265
|
var SESSION_CONTEXT_THRESHOLD_PCT = Number(process.env.EXE_CONTEXT_KILL_PCT) || 80;
|
|
@@ -313,7 +317,7 @@ async function pollIdleEmployees(deps, lastNudge) {
|
|
|
313
317
|
if (registered.length === 0) return [];
|
|
314
318
|
let liveSessions;
|
|
315
319
|
try {
|
|
316
|
-
liveSessions = new Set(deps.listTmuxSessions());
|
|
320
|
+
liveSessions = new Set(await deps.listTmuxSessions());
|
|
317
321
|
} catch (e) {
|
|
318
322
|
process.stderr.write("[daemon-orch] list tmux sessions for idle nudge: " + (e instanceof Error ? e.message : String(e)) + "\n");
|
|
319
323
|
return [];
|
|
@@ -329,6 +333,8 @@ async function pollIdleEmployees(deps, lastNudge) {
|
|
|
329
333
|
const employeeScope = entry.windowName.includes("-") ? entry.windowName.slice(entry.windowName.indexOf("-") + 1) : null;
|
|
330
334
|
const task = await deps.queryOpenTask(entry.agentId, employeeScope);
|
|
331
335
|
if (!task) continue;
|
|
336
|
+
const transitionMs = Date.parse(task.updatedAt);
|
|
337
|
+
if (!Number.isFinite(transitionMs) || now - transitionMs > IDLE_NUDGE_MAX_TASK_AGE_MS) continue;
|
|
332
338
|
if (shouldNudgeEmployee(state, true, lastMs, now, IDLE_NUDGE_DEDUP_MS)) {
|
|
333
339
|
await deps.sendIntercom(entry.windowName);
|
|
334
340
|
lastNudge.set(entry.windowName, now);
|
|
@@ -546,7 +552,7 @@ async function pollIdleKill(deps, idleTickCounts, opts) {
|
|
|
546
552
|
if (registered.length === 0) return [];
|
|
547
553
|
let liveSessions;
|
|
548
554
|
try {
|
|
549
|
-
liveSessions = new Set(deps.listTmuxSessions());
|
|
555
|
+
liveSessions = new Set(await deps.listTmuxSessions());
|
|
550
556
|
} catch (e) {
|
|
551
557
|
process.stderr.write("[daemon-orch] list tmux sessions for idle kill: " + (e instanceof Error ? e.message : String(e)) + "\n");
|
|
552
558
|
return [];
|
|
@@ -668,7 +674,7 @@ function _resetDeadScopeReviewAlerts() {
|
|
|
668
674
|
async function pollReviewNudge(deps, state) {
|
|
669
675
|
let sessions;
|
|
670
676
|
try {
|
|
671
|
-
sessions = deps.listTmuxSessions().filter((s) => isExeSession(s));
|
|
677
|
+
sessions = (await deps.listTmuxSessions()).filter((s) => isExeSession(s));
|
|
672
678
|
} catch (e) {
|
|
673
679
|
process.stderr.write("[daemon-orch] list tmux sessions for review nudge: " + (e instanceof Error ? e.message : String(e)) + "\n");
|
|
674
680
|
return [];
|
|
@@ -812,7 +818,7 @@ function createReviewNudgeRealDeps(getClient) {
|
|
|
812
818
|
});
|
|
813
819
|
return Number(res?.rowsAffected ?? 0);
|
|
814
820
|
},
|
|
815
|
-
listTmuxSessions: () =>
|
|
821
|
+
listTmuxSessions: () => listTmuxSessionsAsync(),
|
|
816
822
|
getSessionState: (sessionName) => getSessionState(sessionName),
|
|
817
823
|
countReviewsForScope: async (sessionScope) => {
|
|
818
824
|
return countPendingReviews(sessionScope, getCoordinatorName());
|
|
@@ -867,20 +873,21 @@ function createReviewNudgeRealDeps(getClient) {
|
|
|
867
873
|
function createIdleNudgeRealDeps(_getClient) {
|
|
868
874
|
return {
|
|
869
875
|
listRegisteredSessions: () => listSessions(),
|
|
870
|
-
listTmuxSessions: () =>
|
|
876
|
+
listTmuxSessions: () => listTmuxSessionsAsync(),
|
|
871
877
|
getSessionState: (sessionName) => getSessionState(sessionName),
|
|
872
878
|
queryOpenTask: async (agentId, sessionScope) => {
|
|
873
879
|
const rows = await queryTaskRows({
|
|
874
880
|
assignedTo: agentId,
|
|
875
881
|
status: ["open", "in_progress"],
|
|
876
|
-
columns: "id, title, priority",
|
|
882
|
+
columns: "id, title, priority, updated_at",
|
|
877
883
|
sessionScope: sessionScope ?? null,
|
|
878
884
|
projectName: null,
|
|
879
885
|
orderBy: "CASE priority WHEN 'p0' THEN 0 WHEN 'p1' THEN 1 ELSE 2 END",
|
|
880
886
|
limit: 1
|
|
881
887
|
});
|
|
882
888
|
if (rows.length === 0) return null;
|
|
883
|
-
|
|
889
|
+
const r = rows[0];
|
|
890
|
+
return { id: String(r.id), title: String(r.title), priority: String(r.priority), updatedAt: String(r.updated_at) };
|
|
884
891
|
},
|
|
885
892
|
// Bug f9302cc0: the daemon's idle nudge targets the employee session whose
|
|
886
893
|
// scoped task was just verified (queryOpenTask filters by the employee's
|
|
@@ -1015,7 +1022,7 @@ function createSessionTTLRealDeps(getClient) {
|
|
|
1015
1022
|
function createIdleKillRealDeps(getClient, intercomAckWindowMs) {
|
|
1016
1023
|
return {
|
|
1017
1024
|
listRegisteredSessions: () => listSessions(),
|
|
1018
|
-
listTmuxSessions: () =>
|
|
1025
|
+
listTmuxSessions: () => listTmuxSessionsAsync(),
|
|
1019
1026
|
getSessionState: (sessionName) => getSessionState(sessionName),
|
|
1020
1027
|
collectSignals: async (agentId, sessionName) => {
|
|
1021
1028
|
return collectAgentSignals(getClient(), agentId, sessionName, intercomAckWindowMs);
|
|
@@ -1460,7 +1467,7 @@ async function pollOrphanedTasks(deps, nowMs = Date.now()) {
|
|
|
1460
1467
|
}
|
|
1461
1468
|
const key = `${t.agentId}::${scope}`;
|
|
1462
1469
|
const existing = agentTasks.get(key) ?? [];
|
|
1463
|
-
existing.push({ taskId: t.taskId, priority: t.priority, sessionScope: scope, assignedBy: t.assignedBy ?? null });
|
|
1470
|
+
existing.push({ taskId: t.taskId, priority: t.priority, sessionScope: scope, assignedBy: t.assignedBy ?? null, spawnRuntime: t.spawnRuntime ?? null });
|
|
1464
1471
|
agentTasks.set(key, existing);
|
|
1465
1472
|
}
|
|
1466
1473
|
if (deadScopeStateDirty) saveAutoWakeState(_autoWakeState);
|
|
@@ -1608,7 +1615,7 @@ async function pollOrphanedTasks(deps, nowMs = Date.now()) {
|
|
|
1608
1615
|
`
|
|
1609
1616
|
);
|
|
1610
1617
|
try {
|
|
1611
|
-
const result = await deps.ensureEmployee(agentId, sessionScope);
|
|
1618
|
+
const result = await deps.ensureEmployee(agentId, sessionScope, topTask.spawnRuntime ? { runtimeOverride: topTask.spawnRuntime } : void 0);
|
|
1612
1619
|
if (result.status === "failed") {
|
|
1613
1620
|
process.stderr.write(
|
|
1614
1621
|
`[auto-wake] Failed to spawn ${agentId}: ${result.error ?? "unknown"}
|
|
@@ -2407,17 +2414,17 @@ function createStuckBlockedRealDeps(getClient) {
|
|
|
2407
2414
|
persistState: saveStuckBlockedState
|
|
2408
2415
|
};
|
|
2409
2416
|
}
|
|
2410
|
-
function createAutoWakeRealDeps(getClient, projectDir,
|
|
2417
|
+
function createAutoWakeRealDeps(getClient, projectDir, listTmuxSessionsAsync2) {
|
|
2411
2418
|
return {
|
|
2412
2419
|
listTmuxSessions: () => listTmuxSessions(),
|
|
2413
2420
|
// Bug ddbfc3f6: injected async accessor keeps auto_wake off the sync tmux path.
|
|
2414
|
-
...
|
|
2421
|
+
...listTmuxSessionsAsync2 ? { listTmuxSessionsAsync: listTmuxSessionsAsync2 } : {},
|
|
2415
2422
|
queryTasksByAgent: async () => {
|
|
2416
2423
|
const { loadDeviceId } = await import("./lib/license.js");
|
|
2417
2424
|
const deviceId = loadDeviceId();
|
|
2418
2425
|
const rows = await queryTaskRows({
|
|
2419
2426
|
status: ["open", "in_progress"],
|
|
2420
|
-
columns: "assigned_to, assigned_by, id, priority, session_scope, project_name",
|
|
2427
|
+
columns: "assigned_to, assigned_by, id, priority, session_scope, project_name, spawn_runtime",
|
|
2421
2428
|
sessionScope: null,
|
|
2422
2429
|
// daemon-level: no session filter
|
|
2423
2430
|
projectName: null,
|
|
@@ -2431,7 +2438,8 @@ function createAutoWakeRealDeps(getClient, projectDir, listTmuxSessionsAsync) {
|
|
|
2431
2438
|
priority: String(r.priority),
|
|
2432
2439
|
sessionScope: r.session_scope ? String(r.session_scope) : null,
|
|
2433
2440
|
projectName: r.project_name ? String(r.project_name) : null,
|
|
2434
|
-
assignedBy: r.assigned_by ? String(r.assigned_by) : null
|
|
2441
|
+
assignedBy: r.assigned_by ? String(r.assigned_by) : null,
|
|
2442
|
+
spawnRuntime: r.spawn_runtime != null ? String(r.spawn_runtime) : null
|
|
2435
2443
|
}));
|
|
2436
2444
|
},
|
|
2437
2445
|
// DEFECT 1 (dup-spawn): honor create_task's fresh dispatch signal so auto-wake
|
|
@@ -2461,7 +2469,7 @@ function createAutoWakeRealDeps(getClient, projectDir, listTmuxSessionsAsync) {
|
|
|
2461
2469
|
args: [newSessionScope, (/* @__PURE__ */ new Date()).toISOString(), taskId]
|
|
2462
2470
|
});
|
|
2463
2471
|
},
|
|
2464
|
-
ensureEmployee: async (agentName, scope) => {
|
|
2472
|
+
ensureEmployee: async (agentName, scope, opts) => {
|
|
2465
2473
|
let resolvedProjectDir = projectDir;
|
|
2466
2474
|
try {
|
|
2467
2475
|
const sessions = listSessions();
|
|
@@ -2475,7 +2483,7 @@ function createAutoWakeRealDeps(getClient, projectDir, listTmuxSessionsAsync) {
|
|
|
2475
2483
|
`
|
|
2476
2484
|
);
|
|
2477
2485
|
}
|
|
2478
|
-
return ensureEmployeeAsync(agentName, scope, resolvedProjectDir, shouldAutoInstance(agentName));
|
|
2486
|
+
return ensureEmployeeAsync(agentName, scope, resolvedProjectDir, { ...shouldAutoInstance(agentName), ...opts?.runtimeOverride ? { runtimeOverride: opts.runtimeOverride } : {} });
|
|
2479
2487
|
},
|
|
2480
2488
|
markTaskNeedsReview: async (taskId, reason) => {
|
|
2481
2489
|
try {
|
|
@@ -2512,7 +2520,7 @@ function _resetCooRestartState() {
|
|
|
2512
2520
|
async function pollCoordinatorContextRestart(deps, projectDir) {
|
|
2513
2521
|
let liveSessions;
|
|
2514
2522
|
try {
|
|
2515
|
-
liveSessions = deps.listTmuxSessions();
|
|
2523
|
+
liveSessions = await deps.listTmuxSessions();
|
|
2516
2524
|
} catch (e) {
|
|
2517
2525
|
process.stderr.write(`[daemon-orch] list tmux sessions for coordinator context: ${e instanceof Error ? e.message : String(e)}
|
|
2518
2526
|
`);
|
|
@@ -2580,7 +2588,7 @@ async function pollCoordinatorContextRestart(deps, projectDir) {
|
|
|
2580
2588
|
function createCoordinatorRestartRealDeps(getClient) {
|
|
2581
2589
|
return {
|
|
2582
2590
|
listTmuxSessions: () => {
|
|
2583
|
-
return
|
|
2591
|
+
return listTmuxSessionsAsync();
|
|
2584
2592
|
},
|
|
2585
2593
|
parseContextPercentage: (sessionName) => {
|
|
2586
2594
|
return parseContextPercentage(sessionName);
|
|
@@ -2666,27 +2674,28 @@ var ORPHAN_PATTERNS = [
|
|
|
2666
2674
|
"exe-mem/dist/hooks/ingest-worker.js",
|
|
2667
2675
|
// Hook processes that become orphaned and never get reaped.
|
|
2668
2676
|
// These accumulate at ~70MB each and caused 1GB+ memory waste.
|
|
2669
|
-
|
|
2670
|
-
"
|
|
2671
|
-
"
|
|
2672
|
-
"exe-pending-
|
|
2673
|
-
"exe-pending-
|
|
2677
|
+
// Anchored to dist/hooks|bin path tails, never bare basenames (bug 59aeb574).
|
|
2678
|
+
"dist/hooks/codex-stop-task-finalizer.js",
|
|
2679
|
+
"dist/bin/scan-tasks.js",
|
|
2680
|
+
"dist/bin/exe-pending-reviews.js",
|
|
2681
|
+
"dist/bin/exe-pending-messages.js",
|
|
2682
|
+
"dist/bin/exe-pending-notifications.js"
|
|
2674
2683
|
];
|
|
2675
2684
|
var HOOK_PROCESS_PATTERNS = [
|
|
2676
|
-
"codex-stop-task-finalizer.js",
|
|
2677
|
-
"scan-tasks.js",
|
|
2678
|
-
"exe-pending-reviews.js",
|
|
2679
|
-
"exe-pending-messages.js",
|
|
2680
|
-
"exe-pending-notifications.js",
|
|
2685
|
+
"dist/hooks/codex-stop-task-finalizer.js",
|
|
2686
|
+
"dist/bin/scan-tasks.js",
|
|
2687
|
+
"dist/bin/exe-pending-reviews.js",
|
|
2688
|
+
"dist/bin/exe-pending-messages.js",
|
|
2689
|
+
"dist/bin/exe-pending-notifications.js",
|
|
2681
2690
|
// Hook scripts that can zombie (added 2026-06-01 — orphan bug a4eaf106)
|
|
2682
|
-
"prompt-submit.js",
|
|
2683
|
-
"stop.js",
|
|
2684
|
-
"subagent-stop.js",
|
|
2685
|
-
"pre-tool-use.js",
|
|
2686
|
-
"post-tool-combined.js",
|
|
2687
|
-
"ingest.js",
|
|
2688
|
-
"intercom-check.js",
|
|
2689
|
-
"exe-heartbeat-hook.js"
|
|
2691
|
+
"dist/hooks/prompt-submit.js",
|
|
2692
|
+
"dist/hooks/stop.js",
|
|
2693
|
+
"dist/hooks/subagent-stop.js",
|
|
2694
|
+
"dist/hooks/pre-tool-use.js",
|
|
2695
|
+
"dist/hooks/post-tool-combined.js",
|
|
2696
|
+
"dist/hooks/ingest.js",
|
|
2697
|
+
"dist/bin/intercom-check.js",
|
|
2698
|
+
"dist/hooks/exe-heartbeat-hook.js"
|
|
2690
2699
|
];
|
|
2691
2700
|
var AGENT_CLI_EXECUTABLES = /* @__PURE__ */ new Set(["claude", "codex", "opencode"]);
|
|
2692
2701
|
var RUNTIME_EXECUTABLES = /* @__PURE__ */ new Set([
|
|
@@ -2817,10 +2826,7 @@ function reapZombieAgentProcesses(deps) {
|
|
|
2817
2826
|
const wrapperPid = info.ppid;
|
|
2818
2827
|
for (const session of liveSessions) {
|
|
2819
2828
|
try {
|
|
2820
|
-
const panePids = deps.getPanePids
|
|
2821
|
-
`tmux list-panes -t ${JSON.stringify(session)} -F '#{pane_pid}' 2>/dev/null`,
|
|
2822
|
-
{ encoding: "utf8", timeout: 3e3, maxBuffer: REAPER_MAX_BUFFER_BYTES }
|
|
2823
|
-
).trim().split("\n").map(Number);
|
|
2829
|
+
const panePids = deps.getPanePids(session);
|
|
2824
2830
|
if (panePids.includes(wrapperPid)) {
|
|
2825
2831
|
hasLiveSession = true;
|
|
2826
2832
|
break;
|
|
@@ -2847,10 +2853,7 @@ function reapZombieAgentProcesses(deps) {
|
|
|
2847
2853
|
let belongsToCoordinator = false;
|
|
2848
2854
|
for (const cs of coordinatorSessions) {
|
|
2849
2855
|
try {
|
|
2850
|
-
const panePids =
|
|
2851
|
-
`tmux list-panes -t ${JSON.stringify(cs)} -F '#{pane_pid}' 2>/dev/null`,
|
|
2852
|
-
{ encoding: "utf8", timeout: 3e3, maxBuffer: REAPER_MAX_BUFFER_BYTES }
|
|
2853
|
-
).trim().split("\n").map(Number)).filter(Boolean);
|
|
2856
|
+
const panePids = deps.getPanePids(cs).filter(Boolean);
|
|
2854
2857
|
for (const panePid of panePids) {
|
|
2855
2858
|
let walk = pid;
|
|
2856
2859
|
for (let d = 0; d < 10; d++) {
|
|
@@ -2926,68 +2929,6 @@ function reapZombieAgentProcesses(deps) {
|
|
|
2926
2929
|
}
|
|
2927
2930
|
return reaped;
|
|
2928
2931
|
}
|
|
2929
|
-
function getRssKb(pid) {
|
|
2930
|
-
try {
|
|
2931
|
-
const out = execSync(`ps -o rss= -p ${pid} 2>/dev/null`, { encoding: "utf8", timeout: 2e3, maxBuffer: REAPER_MAX_BUFFER_BYTES });
|
|
2932
|
-
const val = parseInt(out.trim(), 10);
|
|
2933
|
-
return isNaN(val) ? null : val;
|
|
2934
|
-
} catch {
|
|
2935
|
-
return null;
|
|
2936
|
-
}
|
|
2937
|
-
}
|
|
2938
|
-
function createZombieAgentReaperRealDeps() {
|
|
2939
|
-
const panePidMap = /* @__PURE__ */ new Map();
|
|
2940
|
-
let panePidCacheReady = false;
|
|
2941
|
-
try {
|
|
2942
|
-
const output = execSync("tmux list-panes -a -F '#{session_name} #{pane_pid}' 2>/dev/null", {
|
|
2943
|
-
encoding: "utf8",
|
|
2944
|
-
timeout: 5e3,
|
|
2945
|
-
maxBuffer: REAPER_MAX_BUFFER_BYTES
|
|
2946
|
-
});
|
|
2947
|
-
for (const line of output.split("\n")) {
|
|
2948
|
-
const [sessionName, pidText] = line.trim().split(/\s+/);
|
|
2949
|
-
const pid = Number(pidText);
|
|
2950
|
-
if (!sessionName || !Number.isFinite(pid)) continue;
|
|
2951
|
-
const arr = panePidMap.get(sessionName) ?? [];
|
|
2952
|
-
arr.push(pid);
|
|
2953
|
-
panePidMap.set(sessionName, arr);
|
|
2954
|
-
}
|
|
2955
|
-
panePidCacheReady = true;
|
|
2956
|
-
} catch {
|
|
2957
|
-
}
|
|
2958
|
-
return {
|
|
2959
|
-
listProcesses: () => {
|
|
2960
|
-
const output = execSync("ps -eo pid,ppid,etime,tty,args", {
|
|
2961
|
-
encoding: "utf8",
|
|
2962
|
-
timeout: 5e3,
|
|
2963
|
-
maxBuffer: REAPER_MAX_BUFFER_BYTES
|
|
2964
|
-
});
|
|
2965
|
-
return output.split("\n");
|
|
2966
|
-
},
|
|
2967
|
-
listTmuxSessions: () => {
|
|
2968
|
-
const output = execSync("tmux list-sessions -F '#{session_name}' 2>/dev/null", {
|
|
2969
|
-
encoding: "utf8",
|
|
2970
|
-
timeout: 3e3,
|
|
2971
|
-
maxBuffer: REAPER_MAX_BUFFER_BYTES
|
|
2972
|
-
});
|
|
2973
|
-
return output.trim().split("\n").filter(Boolean);
|
|
2974
|
-
},
|
|
2975
|
-
killProcess: (pid, signal) => {
|
|
2976
|
-
process.kill(pid, signal);
|
|
2977
|
-
},
|
|
2978
|
-
...panePidCacheReady ? { getPanePids: (sessionName) => panePidMap.get(sessionName) ?? [] } : {},
|
|
2979
|
-
getRssKb,
|
|
2980
|
-
scheduleKill: (_pid, delayMs, cb) => {
|
|
2981
|
-
setTimeout(() => {
|
|
2982
|
-
try {
|
|
2983
|
-
cb();
|
|
2984
|
-
} catch {
|
|
2985
|
-
}
|
|
2986
|
-
}, delayMs).unref();
|
|
2987
|
-
},
|
|
2988
|
-
selfPid: process.pid
|
|
2989
|
-
};
|
|
2990
|
-
}
|
|
2991
2932
|
async function createZombieAgentReaperRealDepsAsync() {
|
|
2992
2933
|
const execOpts = { encoding: "utf8", timeout: 5e3, maxBuffer: REAPER_MAX_BUFFER_BYTES };
|
|
2993
2934
|
const [procRes, sessRes, paneRes] = await Promise.allSettled([
|
|
@@ -3101,30 +3042,6 @@ function reapOrphanedMcpProcesses(deps) {
|
|
|
3101
3042
|
}
|
|
3102
3043
|
return reaped;
|
|
3103
3044
|
}
|
|
3104
|
-
function createOrphanReaperRealDeps() {
|
|
3105
|
-
return {
|
|
3106
|
-
listProcesses: () => {
|
|
3107
|
-
const output = execSync("ps -eo pid,ppid,etime,args", {
|
|
3108
|
-
encoding: "utf8",
|
|
3109
|
-
timeout: 5e3,
|
|
3110
|
-
maxBuffer: REAPER_MAX_BUFFER_BYTES
|
|
3111
|
-
});
|
|
3112
|
-
return output.split("\n");
|
|
3113
|
-
},
|
|
3114
|
-
killProcess: (pid, signal) => {
|
|
3115
|
-
process.kill(pid, signal);
|
|
3116
|
-
},
|
|
3117
|
-
scheduleKill: (_pid, delayMs, cb) => {
|
|
3118
|
-
setTimeout(() => {
|
|
3119
|
-
try {
|
|
3120
|
-
cb();
|
|
3121
|
-
} catch {
|
|
3122
|
-
}
|
|
3123
|
-
}, delayMs).unref();
|
|
3124
|
-
},
|
|
3125
|
-
selfPid: process.pid
|
|
3126
|
-
};
|
|
3127
|
-
}
|
|
3128
3045
|
async function createOrphanReaperRealDepsAsync() {
|
|
3129
3046
|
const { stdout } = await execFileAsync("ps", ["-eo", "pid,ppid,etime,args"], {
|
|
3130
3047
|
encoding: "utf8",
|
|
@@ -3459,7 +3376,7 @@ async function reapOrphanedWorktrees(deps, nowMs = Date.now()) {
|
|
|
3459
3376
|
}
|
|
3460
3377
|
async function createWorktreeReaperRealDeps() {
|
|
3461
3378
|
const { getPaneCwdAsync } = await import("./lib/tmux-status.js");
|
|
3462
|
-
const { getGitRootAsync, isWorktreeDirtyAsync } = await import("./worktree-
|
|
3379
|
+
const { getGitRootAsync, isWorktreeDirtyAsync, GIT_CRYPT_SMUDGE_BYPASS_ARGS } = await import("./worktree-W47CIMJ6.js");
|
|
3463
3380
|
const { statSync: statSync3 } = await import("fs");
|
|
3464
3381
|
const { basename: basename2 } = await import("path");
|
|
3465
3382
|
const { promisify: promisify2 } = await import("util");
|
|
@@ -3618,17 +3535,18 @@ async function createWorktreeReaperRealDeps() {
|
|
|
3618
3535
|
const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
|
|
3619
3536
|
const quarantineBranch = `quarantine/${agentName}-${timestamp}`;
|
|
3620
3537
|
try {
|
|
3621
|
-
await execFileAsync2("git", ["-C", wtPath, "checkout", "-b", quarantineBranch], {
|
|
3538
|
+
await execFileAsync2("git", ["-C", wtPath, ...GIT_CRYPT_SMUDGE_BYPASS_ARGS, "checkout", "-b", quarantineBranch], {
|
|
3622
3539
|
encoding: "utf-8",
|
|
3623
3540
|
timeout: 1e4
|
|
3624
3541
|
});
|
|
3625
|
-
await execFileAsync2("git", ["-C", wtPath, "add", "-A"], {
|
|
3542
|
+
await execFileAsync2("git", ["-C", wtPath, ...GIT_CRYPT_SMUDGE_BYPASS_ARGS, "add", "-A"], {
|
|
3626
3543
|
encoding: "utf-8",
|
|
3627
3544
|
timeout: 1e4
|
|
3628
3545
|
});
|
|
3629
3546
|
await execFileAsync2("git", [
|
|
3630
3547
|
"-C",
|
|
3631
3548
|
wtPath,
|
|
3549
|
+
...GIT_CRYPT_SMUDGE_BYPASS_ARGS,
|
|
3632
3550
|
"commit",
|
|
3633
3551
|
"-m",
|
|
3634
3552
|
`[quarantine] Auto-archived dirty orphan worktree
|
|
@@ -3702,7 +3620,7 @@ async function gcStaleCheckpoints() {
|
|
|
3702
3620
|
}
|
|
3703
3621
|
async function pollTaskGroupBarriers() {
|
|
3704
3622
|
try {
|
|
3705
|
-
const { checkAndFireBarriers } = await import("./tasks-crud-
|
|
3623
|
+
const { checkAndFireBarriers } = await import("./tasks-crud-ZRQNJXQ2.js");
|
|
3706
3624
|
const firedGroupIds = await checkAndFireBarriers();
|
|
3707
3625
|
if (firedGroupIds.length === 0) return 0;
|
|
3708
3626
|
const { getClient } = await import("./lib/database.js");
|
|
@@ -3773,6 +3691,7 @@ async function pollTaskGroupBarriers() {
|
|
|
3773
3691
|
export {
|
|
3774
3692
|
getAvailableMemoryGB,
|
|
3775
3693
|
IDLE_NUDGE_DEDUP_MS,
|
|
3694
|
+
IDLE_NUDGE_MAX_TASK_AGE_MS,
|
|
3776
3695
|
SESSION_TTL_HOURS,
|
|
3777
3696
|
SESSION_CONTEXT_THRESHOLD_PCT,
|
|
3778
3697
|
IDLE_KILL_INTERCOM_ACK_WINDOW_MS,
|
|
@@ -3837,10 +3756,8 @@ export {
|
|
|
3837
3756
|
ORPHAN_PATTERNS,
|
|
3838
3757
|
HOOK_PROCESS_PATTERNS,
|
|
3839
3758
|
reapZombieAgentProcesses,
|
|
3840
|
-
createZombieAgentReaperRealDeps,
|
|
3841
3759
|
createZombieAgentReaperRealDepsAsync,
|
|
3842
3760
|
reapOrphanedMcpProcesses,
|
|
3843
|
-
createOrphanReaperRealDeps,
|
|
3844
3761
|
createOrphanReaperRealDepsAsync,
|
|
3845
3762
|
WORKTREE_REAPER_INTERVAL_MS,
|
|
3846
3763
|
WORKTREE_ARCHIVE_FAILURE_MAX_ATTEMPTS,
|
|
@@ -1,24 +1,31 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cleanupCardsForMemories,
|
|
3
3
|
cleanupGraphLinksForMemories
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ULIBLJ6W.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveAnthropicAuth
|
|
7
7
|
} from "./chunk-VGMACSEV.js";
|
|
8
8
|
import {
|
|
9
9
|
buildSystemStateExclusionFilter,
|
|
10
10
|
vectorToBlob
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MXPNVSXI.js";
|
|
12
12
|
import {
|
|
13
13
|
extractKeywords,
|
|
14
14
|
keywordsToString
|
|
15
15
|
} from "./chunk-CHCA3ZM2.js";
|
|
16
16
|
import {
|
|
17
17
|
isCoordinatorName
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-TAMDAOCU.js";
|
|
19
19
|
|
|
20
20
|
// src/lib/consolidation.ts
|
|
21
21
|
import { randomUUID } from "crypto";
|
|
22
|
+
var CONSOLIDATION_PROTECTED_TYPES = ["procedure", "decision", "behavior", "skill"];
|
|
23
|
+
var CONSOLIDATION_IMPORTANCE_FLOOR = 7;
|
|
24
|
+
function buildConsolidationProtectionFilter() {
|
|
25
|
+
const typeList = CONSOLIDATION_PROTECTED_TYPES.map((t) => `'${t}'`).join(", ");
|
|
26
|
+
return `AND COALESCE(memory_type, 'raw') NOT IN (${typeList})
|
|
27
|
+
AND COALESCE(importance, 0) < ${CONSOLIDATION_IMPORTANCE_FLOOR}`;
|
|
28
|
+
}
|
|
22
29
|
async function readOffLoop(client, sql, args) {
|
|
23
30
|
if (process.env.EXE_IS_DAEMON === "1") {
|
|
24
31
|
const { offloadReadQuery } = await import("./lib/database.js");
|
|
@@ -32,7 +39,7 @@ async function selectUnconsolidated(client, limit = 200) {
|
|
|
32
39
|
`SELECT id, agent_id, project_name, tool_name, raw_text, timestamp, memory_type, session_scope
|
|
33
40
|
FROM memories
|
|
34
41
|
WHERE consolidated = 0
|
|
35
|
-
|
|
42
|
+
${buildConsolidationProtectionFilter()}
|
|
36
43
|
${buildSystemStateExclusionFilter("")}
|
|
37
44
|
ORDER BY timestamp DESC
|
|
38
45
|
LIMIT ?`,
|
|
@@ -66,18 +73,21 @@ function dominantMemoryType(memories) {
|
|
|
66
73
|
return best;
|
|
67
74
|
}
|
|
68
75
|
function groupMemories(memories) {
|
|
69
|
-
const
|
|
76
|
+
const byGroup = /* @__PURE__ */ new Map();
|
|
70
77
|
for (const mem of memories) {
|
|
71
|
-
const
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
78
|
+
const memType = mem.memory_type ?? "raw";
|
|
79
|
+
const key = JSON.stringify([mem.agent_id, mem.project_name, memType]);
|
|
80
|
+
let group = byGroup.get(key);
|
|
81
|
+
if (!group) {
|
|
82
|
+
group = { agentId: mem.agent_id, projectName: mem.project_name, rows: [] };
|
|
83
|
+
byGroup.set(key, group);
|
|
84
|
+
}
|
|
85
|
+
group.rows.push(mem);
|
|
75
86
|
}
|
|
76
87
|
const clusters = [];
|
|
77
|
-
for (const
|
|
78
|
-
const [agentId, projectName] = key.split("::");
|
|
88
|
+
for (const group of byGroup.values()) {
|
|
79
89
|
const byDay = /* @__PURE__ */ new Map();
|
|
80
|
-
for (const mem of
|
|
90
|
+
for (const mem of group.rows) {
|
|
81
91
|
const day = mem.timestamp.slice(0, 10);
|
|
82
92
|
const list = byDay.get(day) ?? [];
|
|
83
93
|
list.push(mem);
|
|
@@ -87,8 +97,8 @@ function groupMemories(memories) {
|
|
|
87
97
|
if (dayMemories.length < 3) continue;
|
|
88
98
|
if (dayMemories.length <= 15) {
|
|
89
99
|
clusters.push({
|
|
90
|
-
agentId,
|
|
91
|
-
projectName,
|
|
100
|
+
agentId: group.agentId,
|
|
101
|
+
projectName: group.projectName,
|
|
92
102
|
dateRange: day,
|
|
93
103
|
memories: dayMemories
|
|
94
104
|
});
|
|
@@ -96,8 +106,8 @@ function groupMemories(memories) {
|
|
|
96
106
|
for (let i = 0; i < dayMemories.length; i += 12) {
|
|
97
107
|
const chunk = dayMemories.slice(i, i + 12);
|
|
98
108
|
clusters.push({
|
|
99
|
-
agentId,
|
|
100
|
-
projectName,
|
|
109
|
+
agentId: group.agentId,
|
|
110
|
+
projectName: group.projectName,
|
|
101
111
|
dateRange: day,
|
|
102
112
|
memories: chunk
|
|
103
113
|
});
|
|
@@ -457,7 +467,7 @@ async function countUnconsolidated(client) {
|
|
|
457
467
|
client,
|
|
458
468
|
`SELECT COUNT(*) as cnt FROM memories
|
|
459
469
|
WHERE consolidated = 0
|
|
460
|
-
|
|
470
|
+
${buildConsolidationProtectionFilter()}`,
|
|
461
471
|
[]
|
|
462
472
|
);
|
|
463
473
|
return Number(result.rows[0]?.cnt ?? 0);
|
|
@@ -535,6 +545,9 @@ async function sweepExpiredTraces(client) {
|
|
|
535
545
|
}
|
|
536
546
|
|
|
537
547
|
export {
|
|
548
|
+
CONSOLIDATION_PROTECTED_TYPES,
|
|
549
|
+
CONSOLIDATION_IMPORTANCE_FLOOR,
|
|
550
|
+
buildConsolidationProtectionFilter,
|
|
538
551
|
selectUnconsolidated,
|
|
539
552
|
groupMemories,
|
|
540
553
|
buildConsolidationPrompt,
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IMessageAdapter
|
|
3
|
+
} from "./chunk-2SRG3B3D.js";
|
|
4
|
+
import {
|
|
5
|
+
createCRMWebhookHandler,
|
|
6
|
+
parseTwentyWebhook
|
|
7
|
+
} from "./chunk-NMH5ZQPU.js";
|
|
1
8
|
import {
|
|
2
9
|
WhatsAppAdapter
|
|
3
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-E426DOSY.js";
|
|
4
11
|
import {
|
|
5
12
|
SignalAdapter
|
|
6
13
|
} from "./chunk-RJT7H2KR.js";
|
|
@@ -13,13 +20,6 @@ import {
|
|
|
13
20
|
import {
|
|
14
21
|
SlackAdapter
|
|
15
22
|
} from "./chunk-ORCCI2VV.js";
|
|
16
|
-
import {
|
|
17
|
-
IMessageAdapter
|
|
18
|
-
} from "./chunk-2SRG3B3D.js";
|
|
19
|
-
import {
|
|
20
|
-
createCRMWebhookHandler,
|
|
21
|
-
parseTwentyWebhook
|
|
22
|
-
} from "./chunk-ECHLVLA7.js";
|
|
23
23
|
import {
|
|
24
24
|
BotRegistry,
|
|
25
25
|
BotRuntime,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
retryWithBackoff,
|
|
43
43
|
routeMessage,
|
|
44
44
|
validateGatewayConfig
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-UKLN57Q5.js";
|
|
46
46
|
import {
|
|
47
47
|
OllamaProvider
|
|
48
48
|
} from "./chunk-FWFFZGSC.js";
|