@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,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
hasLiveSubagentSpawn,
|
|
3
3
|
projectScopedDefShadows
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-K4ESASPL.js";
|
|
5
5
|
import {
|
|
6
6
|
getSessionKey
|
|
7
7
|
} from "./chunk-CVYC6DUW.js";
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
getEmployee,
|
|
15
15
|
isCoordinatorRole,
|
|
16
16
|
loadEmployeesSync
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TAMDAOCU.js";
|
|
18
18
|
import {
|
|
19
19
|
EXE_AI_DIR
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ZIG7VPJV.js";
|
|
21
21
|
|
|
22
22
|
// src/lib/active-agent.ts
|
|
23
23
|
import { readFileSync, writeFileSync, mkdirSync, unlinkSync, readdirSync } from "fs";
|
|
@@ -1,6 +1,235 @@
|
|
|
1
1
|
// src/lib/registry-proxy.ts
|
|
2
2
|
import { createServer } from "http";
|
|
3
|
+
import { readFileSync } from "fs";
|
|
3
4
|
import { Readable } from "stream";
|
|
5
|
+
|
|
6
|
+
// src/lib/stack-release-publish.ts
|
|
7
|
+
import { createHash, timingSafeEqual } from "crypto";
|
|
8
|
+
var MAX_MANIFEST_BYTES = 4 * 1024 * 1024;
|
|
9
|
+
var PUBLISHABLE_STATUSES = ["released", "canary"];
|
|
10
|
+
var StackReleasePublishError = class extends Error {
|
|
11
|
+
rejection;
|
|
12
|
+
constructor(rejection) {
|
|
13
|
+
super(`${rejection.code}: ${rejection.detail}`);
|
|
14
|
+
this.name = "StackReleasePublishError";
|
|
15
|
+
this.rejection = rejection;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
function reject(httpStatus, code, detail) {
|
|
19
|
+
return new StackReleasePublishError({ httpStatus, code, detail });
|
|
20
|
+
}
|
|
21
|
+
function manifestSha256(rawManifest) {
|
|
22
|
+
return createHash("sha256").update(rawManifest, "utf8").digest("hex");
|
|
23
|
+
}
|
|
24
|
+
function constantTimeTokenMatch(candidate, accepted) {
|
|
25
|
+
if (!candidate) return false;
|
|
26
|
+
const candidateDigest = createHash("sha256").update(candidate, "utf8").digest();
|
|
27
|
+
let matched = false;
|
|
28
|
+
for (const token of accepted) {
|
|
29
|
+
if (!token) continue;
|
|
30
|
+
const tokenDigest = createHash("sha256").update(token, "utf8").digest();
|
|
31
|
+
if (timingSafeEqual(candidateDigest, tokenDigest)) matched = true;
|
|
32
|
+
}
|
|
33
|
+
return matched;
|
|
34
|
+
}
|
|
35
|
+
function parsePublisherTokens(raw) {
|
|
36
|
+
return (raw ?? "").split(/[\n,]/).map((s) => s.trim()).filter(Boolean);
|
|
37
|
+
}
|
|
38
|
+
var VERSION_RE = /^[0-9]+(?:\.[0-9]+){1,3}$/;
|
|
39
|
+
function validatePublishBody(body) {
|
|
40
|
+
const { version, manifest, status, createdBy } = body;
|
|
41
|
+
if (typeof manifest !== "string" || manifest.trim() === "") {
|
|
42
|
+
throw reject(
|
|
43
|
+
400,
|
|
44
|
+
"manifest_required",
|
|
45
|
+
"`manifest` must be the RAW manifest file bytes as a string. A pre-parsed object is refused: manifest_sha256 must be the hash of the exact bytes that were signed."
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
if (Buffer.byteLength(manifest, "utf8") > MAX_MANIFEST_BYTES) {
|
|
49
|
+
throw reject(413, "manifest_too_large", `manifest exceeds ${MAX_MANIFEST_BYTES} bytes`);
|
|
50
|
+
}
|
|
51
|
+
if (typeof version !== "string" || !VERSION_RE.test(version)) {
|
|
52
|
+
throw reject(400, "version_invalid", '`version` must be a dotted numeric stack version, e.g. "0.9.36"');
|
|
53
|
+
}
|
|
54
|
+
const resolvedStatus = status === void 0 ? "released" : status;
|
|
55
|
+
if (typeof resolvedStatus !== "string" || !PUBLISHABLE_STATUSES.includes(resolvedStatus)) {
|
|
56
|
+
throw reject(
|
|
57
|
+
400,
|
|
58
|
+
"status_invalid",
|
|
59
|
+
`\`status\` must be one of ${PUBLISHABLE_STATUSES.join(", ")}. "draft" is not publishable \u2014 a draft is not a release.`
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
let parsed;
|
|
63
|
+
try {
|
|
64
|
+
parsed = JSON.parse(manifest);
|
|
65
|
+
} catch (err) {
|
|
66
|
+
throw reject(400, "manifest_unparseable", `manifest is not valid JSON: ${err instanceof Error ? err.message : String(err)}`);
|
|
67
|
+
}
|
|
68
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
69
|
+
throw reject(400, "manifest_unparseable", "manifest must be a JSON object");
|
|
70
|
+
}
|
|
71
|
+
const manifestObj = parsed;
|
|
72
|
+
if (manifestObj.schemaVersion !== 1) {
|
|
73
|
+
throw reject(422, "schema_version_unsupported", `manifest.schemaVersion must be 1 (got ${String(manifestObj.schemaVersion)})`);
|
|
74
|
+
}
|
|
75
|
+
const stacks = manifestObj.stacks;
|
|
76
|
+
if (!stacks || typeof stacks !== "object" || Array.isArray(stacks)) {
|
|
77
|
+
throw reject(422, "manifest_no_stacks", "manifest.stacks must be an object");
|
|
78
|
+
}
|
|
79
|
+
const entry = stacks[version];
|
|
80
|
+
if (!entry || typeof entry !== "object") {
|
|
81
|
+
throw reject(
|
|
82
|
+
422,
|
|
83
|
+
"version_not_in_manifest",
|
|
84
|
+
`manifest.stacks has no entry for version "${version}". Publishing a version the manifest does not describe would ship an empty release.`
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
const entryVersion = entry.version;
|
|
88
|
+
if (entryVersion !== version) {
|
|
89
|
+
throw reject(
|
|
90
|
+
422,
|
|
91
|
+
"version_mismatch",
|
|
92
|
+
`manifest.stacks["${version}"].version is "${String(entryVersion)}" \u2014 the entry disagrees with its own key.`
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
if (resolvedStatus === "released" && manifestObj.latest !== version) {
|
|
96
|
+
throw reject(
|
|
97
|
+
422,
|
|
98
|
+
"latest_mismatch",
|
|
99
|
+
`status "released" requires manifest.latest === "${version}" (got "${String(manifestObj.latest)}"). Publish a canary with status "canary", which is exempt because a canary does not bump latest.`
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
version,
|
|
104
|
+
rawManifest: manifest,
|
|
105
|
+
manifestSha256: manifestSha256(manifest),
|
|
106
|
+
manifest: manifestObj,
|
|
107
|
+
status: resolvedStatus,
|
|
108
|
+
createdBy: typeof createdBy === "string" && createdBy.trim() ? createdBy.trim().slice(0, 200) : "publish-endpoint"
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
function assertDeclaredSha(validated, declared) {
|
|
112
|
+
if (declared === void 0 || declared === null) return;
|
|
113
|
+
if (typeof declared !== "string" || !/^[a-f0-9]{64}$/i.test(declared)) {
|
|
114
|
+
throw reject(400, "manifest_sha256_invalid", "`manifestSha256`, when given, must be 64 hex characters");
|
|
115
|
+
}
|
|
116
|
+
if (declared.toLowerCase() !== validated.manifestSha256) {
|
|
117
|
+
throw reject(
|
|
118
|
+
400,
|
|
119
|
+
"manifest_sha256_mismatch",
|
|
120
|
+
`declared manifestSha256 ${declared.toLowerCase()} != sha256 of received bytes ${validated.manifestSha256}. The manifest was altered in transit.`
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
async function assertManifestSignature(manifest, publicKeyPem) {
|
|
125
|
+
if (!publicKeyPem || !publicKeyPem.trim()) {
|
|
126
|
+
throw reject(
|
|
127
|
+
503,
|
|
128
|
+
"signature_verification_unavailable",
|
|
129
|
+
"No stack manifest public key configured (EXE_STACK_PUBLIC_KEY / EXE_STACK_PUBLIC_KEY_FILE). Refusing to publish: an unverifiable publish cannot guarantee that published implies signed."
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
if (!manifest.signature) {
|
|
133
|
+
throw reject(
|
|
134
|
+
422,
|
|
135
|
+
"manifest_unsigned",
|
|
136
|
+
"manifest carries no `signature`. Fleets that enforce EXE_STACK_PUBLIC_KEY reject unsigned manifests, so publishing one would ship a release no host can install. Re-sign with the custodied key: node scripts/sign-stack-manifest.mjs deploy/stack-manifests/v0.9.json"
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
const { verifyStackManifestSignature } = await import("./stack-update-J6JXSTAZ.js");
|
|
140
|
+
try {
|
|
141
|
+
verifyStackManifestSignature(manifest, publicKeyPem);
|
|
142
|
+
} catch (err) {
|
|
143
|
+
throw reject(
|
|
144
|
+
422,
|
|
145
|
+
"manifest_signature_invalid",
|
|
146
|
+
`manifest signature does not verify against the configured public key: ${err instanceof Error ? err.message : String(err)}. This is a STALE signature (the manifest was edited after signing) or a wrong key. Refusing to publish.`
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
async function assertVersionUniqueIndex(db) {
|
|
151
|
+
let rows;
|
|
152
|
+
try {
|
|
153
|
+
({ rows } = await db.query(
|
|
154
|
+
`SELECT 1
|
|
155
|
+
FROM pg_index i
|
|
156
|
+
JOIN pg_class c ON c.oid = i.indrelid
|
|
157
|
+
JOIN pg_namespace n ON n.oid = c.relnamespace
|
|
158
|
+
WHERE n.nspname = 'billing'
|
|
159
|
+
AND c.relname = 'stack_releases'
|
|
160
|
+
AND i.indisunique
|
|
161
|
+
AND i.indnkeyatts = 1
|
|
162
|
+
AND (SELECT a.attname FROM pg_attribute a WHERE a.attrelid = c.oid AND a.attnum = i.indkey[0]) = 'version'
|
|
163
|
+
LIMIT 1`
|
|
164
|
+
));
|
|
165
|
+
} catch (err) {
|
|
166
|
+
throw reject(
|
|
167
|
+
503,
|
|
168
|
+
"idempotency_constraint_unverifiable",
|
|
169
|
+
`could not verify the UNIQUE index on billing.stack_releases(version): ${err instanceof Error ? err.message : String(err)}`
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
if (rows.length === 0) {
|
|
173
|
+
throw reject(
|
|
174
|
+
503,
|
|
175
|
+
"idempotency_constraint_missing",
|
|
176
|
+
"billing.stack_releases has no UNIQUE index on (version). Publishing without it cannot be idempotent \u2014 two release runs would create two rows. Apply deploy/migrations/004_billing_stack_releases_publish_idempotency.sql."
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
async function insertStackRelease(db, validated) {
|
|
181
|
+
await assertVersionUniqueIndex(db);
|
|
182
|
+
const inserted = await db.query(
|
|
183
|
+
`INSERT INTO billing.stack_releases (version, manifest, manifest_sha256, status, released_at, created_by)
|
|
184
|
+
VALUES ($1, $2::jsonb, $3, $4, now(), $5)
|
|
185
|
+
ON CONFLICT (version) DO NOTHING
|
|
186
|
+
RETURNING version`,
|
|
187
|
+
[validated.version, validated.rawManifest, validated.manifestSha256, validated.status, validated.createdBy]
|
|
188
|
+
);
|
|
189
|
+
if (inserted.rows.length === 1) {
|
|
190
|
+
return {
|
|
191
|
+
outcome: "published",
|
|
192
|
+
version: validated.version,
|
|
193
|
+
manifestSha256: validated.manifestSha256,
|
|
194
|
+
status: validated.status
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
const existing = await db.query(
|
|
198
|
+
"SELECT manifest_sha256, status FROM billing.stack_releases WHERE version = $1",
|
|
199
|
+
[validated.version]
|
|
200
|
+
);
|
|
201
|
+
const row = existing.rows[0];
|
|
202
|
+
if (!row) {
|
|
203
|
+
throw reject(
|
|
204
|
+
409,
|
|
205
|
+
"publish_race",
|
|
206
|
+
`version ${validated.version} conflicted on insert but no row exists. Concurrent mutation of billing.stack_releases \u2014 re-run the release.`
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
const existingSha = String(row.manifest_sha256 ?? "");
|
|
210
|
+
const existingStatus = String(row.status ?? "");
|
|
211
|
+
if (existingSha === validated.manifestSha256 && existingStatus === validated.status) {
|
|
212
|
+
return {
|
|
213
|
+
outcome: "already-published",
|
|
214
|
+
version: validated.version,
|
|
215
|
+
manifestSha256: validated.manifestSha256,
|
|
216
|
+
status: validated.status
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
throw reject(
|
|
220
|
+
409,
|
|
221
|
+
"version_already_published_with_different_content",
|
|
222
|
+
`stack version ${validated.version} is already published (sha256 ${existingSha || "<none>"}, status ${existingStatus || "<none>"}) and does not match this publish (sha256 ${validated.manifestSha256}, status ${validated.status}). Published releases are immutable. Cut a new stack version instead of rewriting a shipped one.`
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
async function publishStackRelease(db, body, options) {
|
|
226
|
+
const validated = validatePublishBody(body);
|
|
227
|
+
assertDeclaredSha(validated, body.manifestSha256);
|
|
228
|
+
await assertManifestSignature(validated.manifest, options.publicKeyPem);
|
|
229
|
+
return insertStackRelease(db, validated);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// src/lib/registry-proxy.ts
|
|
4
233
|
function parsePullTokens(raw) {
|
|
5
234
|
return (raw ?? "").split(/[\n,]/).map((s) => s.trim()).filter(Boolean);
|
|
6
235
|
}
|
|
@@ -16,9 +245,25 @@ function registryProxyOptionsFromEnv(env = process.env) {
|
|
|
16
245
|
pullTokens,
|
|
17
246
|
allowedNamespace: env.EXE_REGISTRY_PROXY_ALLOWED_NAMESPACE || "askexe",
|
|
18
247
|
licenseValidatorUrl: env.EXE_REGISTRY_PROXY_LICENSE_VALIDATOR_URL || "https://api.askexe.com/v1/license/validate",
|
|
19
|
-
databaseUrl: env.EXE_REGISTRY_PROXY_DATABASE_URL || env.DATABASE_URL || void 0
|
|
248
|
+
databaseUrl: env.EXE_REGISTRY_PROXY_DATABASE_URL || env.DATABASE_URL || void 0,
|
|
249
|
+
publisherTokens: parsePublisherTokens(env.EXE_REGISTRY_PROXY_PUBLISHER_TOKENS),
|
|
250
|
+
stackPublicKeyPem: readStackPublicKey(env)
|
|
20
251
|
};
|
|
21
252
|
}
|
|
253
|
+
function readStackPublicKey(env) {
|
|
254
|
+
if (env.EXE_STACK_PUBLIC_KEY) return env.EXE_STACK_PUBLIC_KEY;
|
|
255
|
+
if (env.EXE_STACK_PUBLIC_KEY_FILE) {
|
|
256
|
+
try {
|
|
257
|
+
return readFileSync(env.EXE_STACK_PUBLIC_KEY_FILE, "utf8");
|
|
258
|
+
} catch (err) {
|
|
259
|
+
console.error(
|
|
260
|
+
`[registry-proxy] EXE_STACK_PUBLIC_KEY_FILE unreadable (${err instanceof Error ? err.message : String(err)}) \u2014 publish endpoint will refuse every request until this is fixed.`
|
|
261
|
+
);
|
|
262
|
+
return void 0;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
return void 0;
|
|
266
|
+
}
|
|
22
267
|
function assertRegistryProxyConfig(options) {
|
|
23
268
|
if (!options.upstreamToken) throw new Error("EXE_REGISTRY_PROXY_UPSTREAM_TOKEN or GHCR_TOKEN is required");
|
|
24
269
|
if (options.pullTokens.length === 0 && !options.licenseValidatorUrl) {
|
|
@@ -73,6 +318,7 @@ function unauthorized(res) {
|
|
|
73
318
|
res.end(JSON.stringify({ error: "registry proxy authentication required" }));
|
|
74
319
|
}
|
|
75
320
|
var READ_ONLY_METHODS = ["GET", "HEAD"];
|
|
321
|
+
var STACK_RELEASE_PUBLISH_PATH = "/v1/stack-releases";
|
|
76
322
|
function isReadOnlyRegistryMethod(method) {
|
|
77
323
|
return readOnlyRegistryMethod(method) !== null;
|
|
78
324
|
}
|
|
@@ -80,9 +326,9 @@ function readOnlyRegistryMethod(method) {
|
|
|
80
326
|
const normalized = (method ?? "").toUpperCase();
|
|
81
327
|
return normalized === "GET" || normalized === "HEAD" ? normalized : null;
|
|
82
328
|
}
|
|
83
|
-
function methodNotAllowed(res, method) {
|
|
329
|
+
function methodNotAllowed(res, method, allow = READ_ONLY_METHODS) {
|
|
84
330
|
res.writeHead(405, {
|
|
85
|
-
allow:
|
|
331
|
+
allow: allow.join(", "),
|
|
86
332
|
"content-type": "application/json"
|
|
87
333
|
});
|
|
88
334
|
res.end(
|
|
@@ -156,6 +402,9 @@ function classifyRegistryProxyRequest(req, namespace) {
|
|
|
156
402
|
if (url.pathname === "/v1/stack-manifest.json") {
|
|
157
403
|
return method ? { kind: "stack-manifest", method, url } : { kind: "method-not-allowed", method: req.method, url };
|
|
158
404
|
}
|
|
405
|
+
if (url.pathname === STACK_RELEASE_PUBLISH_PATH) {
|
|
406
|
+
return (req.method ?? "").toUpperCase() === "POST" ? { kind: "stack-release-publish", url } : { kind: "method-not-allowed", method: req.method, url, allow: ["POST"] };
|
|
407
|
+
}
|
|
159
408
|
const pathKind = classifyRegistryPath(url.pathname, namespace);
|
|
160
409
|
if (pathKind === "read") {
|
|
161
410
|
return method ? { kind: "registry-read", method, url } : { kind: "method-not-allowed", method: req.method, url };
|
|
@@ -283,13 +532,92 @@ function createRegistryProxyServer(options) {
|
|
|
283
532
|
res.end(JSON.stringify({ error: "stack manifest query failed" }));
|
|
284
533
|
}
|
|
285
534
|
}
|
|
535
|
+
async function readJsonBody(req, maxBytes) {
|
|
536
|
+
const chunks = [];
|
|
537
|
+
let total = 0;
|
|
538
|
+
for await (const chunk of req) {
|
|
539
|
+
const buf = chunk;
|
|
540
|
+
total += buf.length;
|
|
541
|
+
if (total > maxBytes) {
|
|
542
|
+
req.destroy();
|
|
543
|
+
throw new StackReleasePublishError({
|
|
544
|
+
httpStatus: 413,
|
|
545
|
+
code: "body_too_large",
|
|
546
|
+
detail: `request body exceeds ${maxBytes} bytes`
|
|
547
|
+
});
|
|
548
|
+
}
|
|
549
|
+
chunks.push(buf);
|
|
550
|
+
}
|
|
551
|
+
const raw = Buffer.concat(chunks).toString("utf8");
|
|
552
|
+
try {
|
|
553
|
+
return JSON.parse(raw);
|
|
554
|
+
} catch (err) {
|
|
555
|
+
throw new StackReleasePublishError({
|
|
556
|
+
httpStatus: 400,
|
|
557
|
+
code: "body_unparseable",
|
|
558
|
+
detail: `request body is not valid JSON: ${err instanceof Error ? err.message : String(err)}`
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
async function handleStackReleasePublish(req, res) {
|
|
563
|
+
const publisherTokens = options.publisherTokens ?? [];
|
|
564
|
+
const token = parseBearerToken(req.headers.authorization);
|
|
565
|
+
if (publisherTokens.length === 0) {
|
|
566
|
+
console.error(
|
|
567
|
+
"[registry-proxy] publish attempt refused: EXE_REGISTRY_PROXY_PUBLISHER_TOKENS is not configured."
|
|
568
|
+
);
|
|
569
|
+
res.writeHead(503, { "content-type": "application/json" });
|
|
570
|
+
res.end(JSON.stringify({
|
|
571
|
+
error: "stack release publishing is not enabled on this host",
|
|
572
|
+
code: "publisher_not_configured"
|
|
573
|
+
}));
|
|
574
|
+
return;
|
|
575
|
+
}
|
|
576
|
+
if (!token || !constantTimeTokenMatch(token, publisherTokens)) {
|
|
577
|
+
console.warn(
|
|
578
|
+
`[registry-proxy] REFUSED stack-release publish: bad or missing publisher token from ${req.socket.remoteAddress ?? "unknown"}.`
|
|
579
|
+
);
|
|
580
|
+
res.writeHead(401, { "content-type": "application/json" });
|
|
581
|
+
res.end(JSON.stringify({ error: "publisher authentication required", code: "publisher_unauthorized" }));
|
|
582
|
+
return;
|
|
583
|
+
}
|
|
584
|
+
try {
|
|
585
|
+
const body = await readJsonBody(req, MAX_MANIFEST_BYTES + 64 * 1024);
|
|
586
|
+
const pool = await getManifestPool();
|
|
587
|
+
if (!pool) {
|
|
588
|
+
throw new StackReleasePublishError({
|
|
589
|
+
httpStatus: 503,
|
|
590
|
+
code: "release_store_unavailable",
|
|
591
|
+
detail: "no database configured/reachable for billing.stack_releases"
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
const result = await publishStackRelease(pool, body, { publicKeyPem: options.stackPublicKeyPem });
|
|
595
|
+
console.log(
|
|
596
|
+
`[registry-proxy] stack release ${result.version} ${result.outcome} (status=${result.status}, manifest_sha256=${result.manifestSha256}).`
|
|
597
|
+
);
|
|
598
|
+
res.writeHead(result.outcome === "published" ? 201 : 200, { "content-type": "application/json" });
|
|
599
|
+
res.end(JSON.stringify(result));
|
|
600
|
+
} catch (err) {
|
|
601
|
+
if (err instanceof StackReleasePublishError) {
|
|
602
|
+
const { httpStatus, code, detail: detail2 } = err.rejection;
|
|
603
|
+
console.error(`[registry-proxy] stack-release publish REFUSED (${httpStatus} ${code}): ${detail2}`);
|
|
604
|
+
res.writeHead(httpStatus, { "content-type": "application/json" });
|
|
605
|
+
res.end(JSON.stringify({ error: detail2, code }));
|
|
606
|
+
return;
|
|
607
|
+
}
|
|
608
|
+
const detail = err instanceof Error ? err.message : String(err);
|
|
609
|
+
console.error(`[registry-proxy] stack-release publish FAILED: ${detail}`);
|
|
610
|
+
res.writeHead(500, { "content-type": "application/json" });
|
|
611
|
+
res.end(JSON.stringify({ error: "stack release publish failed", code: "publish_failed", detail }));
|
|
612
|
+
}
|
|
613
|
+
}
|
|
286
614
|
return createServer(async (req, res) => {
|
|
287
615
|
const route = classifyRegistryProxyRequest(req, namespace);
|
|
288
616
|
if (route.kind === "method-not-allowed") {
|
|
289
617
|
console.warn(
|
|
290
618
|
`[registry-proxy] BLOCKED write attempt: ${req.method} ${route.url?.pathname ?? "<unparseable>"} from ${req.socket.remoteAddress ?? "unknown"} \u2014 proxy is pull-through only.`
|
|
291
619
|
);
|
|
292
|
-
methodNotAllowed(res, req.method);
|
|
620
|
+
methodNotAllowed(res, req.method, route.allow);
|
|
293
621
|
return;
|
|
294
622
|
}
|
|
295
623
|
if (route.kind === "not-found") {
|
|
@@ -305,6 +633,10 @@ function createRegistryProxyServer(options) {
|
|
|
305
633
|
await handleStackManifest(req, res);
|
|
306
634
|
return;
|
|
307
635
|
}
|
|
636
|
+
if (route.kind === "stack-release-publish") {
|
|
637
|
+
await handleStackReleasePublish(req, res);
|
|
638
|
+
return;
|
|
639
|
+
}
|
|
308
640
|
const auth = parseBasicAuth(req.headers.authorization);
|
|
309
641
|
if (!auth) {
|
|
310
642
|
unauthorized(res);
|
|
@@ -351,7 +683,7 @@ async function runRegistryProxy(options = registryProxyOptionsFromEnv()) {
|
|
|
351
683
|
await new Promise((resolve) => server.listen(options.port, options.host, resolve));
|
|
352
684
|
console.log(`exe-registry-proxy listening on ${options.host ?? "0.0.0.0"}:${options.port}`);
|
|
353
685
|
console.log(`proxying /v2/${options.allowedNamespace ?? "askexe"}/* -> ${options.upstream ?? "https://ghcr.io"}`);
|
|
354
|
-
const { licenseSyncConfigFromEnv, startLicenseSyncScheduler } = await import("./license-sync-
|
|
686
|
+
const { licenseSyncConfigFromEnv, startLicenseSyncScheduler } = await import("./license-sync-5VYS2F2W.js");
|
|
355
687
|
const syncConfig = licenseSyncConfigFromEnv();
|
|
356
688
|
if (syncConfig) {
|
|
357
689
|
startLicenseSyncScheduler(syncConfig);
|
|
@@ -365,6 +697,7 @@ export {
|
|
|
365
697
|
parsePullTokens,
|
|
366
698
|
registryProxyOptionsFromEnv,
|
|
367
699
|
assertRegistryProxyConfig,
|
|
700
|
+
STACK_RELEASE_PUBLISH_PATH,
|
|
368
701
|
isReadOnlyRegistryMethod,
|
|
369
702
|
createRegistryProxyServer,
|
|
370
703
|
runRegistryProxy
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
} from "./chunk-A6PDF4BO.js";
|
|
5
5
|
import {
|
|
6
6
|
registerDaemonScopedQueryChokepoint
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DJOIMFKV.js";
|
|
8
8
|
import {
|
|
9
9
|
orgPartnerModeActive,
|
|
10
10
|
resolveOrgPartnerBindings,
|
|
11
11
|
resolvePartnerIdentities,
|
|
12
12
|
rosterKeyLookupFor
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-4YLBKEL5.js";
|
|
14
14
|
import {
|
|
15
15
|
createMailboxOpener,
|
|
16
16
|
createMemorySeqStore,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
isConsentMacPrimed,
|
|
20
20
|
primeTaskOriginMarkerKey,
|
|
21
21
|
scopedQueryChokepointStatus
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-IN6CAM4F.js";
|
|
23
23
|
import {
|
|
24
24
|
flushMailboxOutbox
|
|
25
25
|
} from "./chunk-4LWBC7CM.js";
|
|
@@ -3,23 +3,26 @@ import {
|
|
|
3
3
|
} from "./chunk-HSFBNCNC.js";
|
|
4
4
|
import {
|
|
5
5
|
behaviorTruncationNotice
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-32YV32VA.js";
|
|
7
7
|
import {
|
|
8
8
|
countActiveBehaviors,
|
|
9
9
|
listBehaviors
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WMEYJT4R.js";
|
|
11
11
|
import {
|
|
12
12
|
lightweightSearch
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TFKCERAK.js";
|
|
14
14
|
import {
|
|
15
15
|
getCurrentSessionScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-AKLQSC6W.js";
|
|
17
|
+
import {
|
|
18
|
+
getSessionKey
|
|
19
|
+
} from "./chunk-CVYC6DUW.js";
|
|
17
20
|
import {
|
|
18
21
|
getProjectName
|
|
19
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-JTVIANUB.js";
|
|
20
23
|
import {
|
|
21
24
|
getClient
|
|
22
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-TAMDAOCU.js";
|
|
23
26
|
|
|
24
27
|
// src/lib/session-summary.ts
|
|
25
28
|
var MAX_CHARS = 800;
|
|
@@ -145,6 +148,34 @@ function compressCheckpoint(rawText) {
|
|
|
145
148
|
return result;
|
|
146
149
|
}
|
|
147
150
|
|
|
151
|
+
// src/lib/session-scratch.ts
|
|
152
|
+
import { mkdirSync } from "fs";
|
|
153
|
+
import path from "path";
|
|
154
|
+
import os from "os";
|
|
155
|
+
function sanitizeSegment(s) {
|
|
156
|
+
return s.replace(/[^A-Za-z0-9_-]/g, "").slice(0, 64);
|
|
157
|
+
}
|
|
158
|
+
function sanitizeSessionKey(sessionKey) {
|
|
159
|
+
return sanitizeSegment(sessionKey) || `unknown-${process.pid}`;
|
|
160
|
+
}
|
|
161
|
+
function sessionScratchDir(sessionKey, homeDir = os.homedir(), agentId) {
|
|
162
|
+
const base = path.join(homeDir, ".exe-os", "session-cache", "scratch", sanitizeSessionKey(sessionKey));
|
|
163
|
+
if (agentId === void 0) return base;
|
|
164
|
+
const agentSegment = sanitizeSegment(agentId);
|
|
165
|
+
return agentSegment ? path.join(base, agentSegment) : base;
|
|
166
|
+
}
|
|
167
|
+
function resolveSessionScratchDir(homeDir = os.homedir(), agentId) {
|
|
168
|
+
return sessionScratchDir(getSessionKey(), homeDir, agentId);
|
|
169
|
+
}
|
|
170
|
+
function ensureSessionScratchDir(sessionKey, homeDir = os.homedir(), agentId) {
|
|
171
|
+
const dir = sessionKey === void 0 ? resolveSessionScratchDir(homeDir, agentId) : sessionScratchDir(sessionKey, homeDir, agentId);
|
|
172
|
+
try {
|
|
173
|
+
mkdirSync(dir, { recursive: true });
|
|
174
|
+
} catch {
|
|
175
|
+
}
|
|
176
|
+
return dir;
|
|
177
|
+
}
|
|
178
|
+
|
|
148
179
|
// src/lib/employee-boot-brief.ts
|
|
149
180
|
var SECTION_TIMEOUT_MS = 4e3;
|
|
150
181
|
var BRIEF_TIMEOUT_MS = 6e3;
|
|
@@ -296,6 +327,12 @@ async function buildEmployeeBootBriefInner(input, degraded) {
|
|
|
296
327
|
runSection("memories", () => recentProjectMemories(agentId, projectName, sessionScope ?? null, input.mode), "", degraded),
|
|
297
328
|
runSection("behaviors", () => activeBehaviorBrief(agentId, projectName), "", degraded)
|
|
298
329
|
]);
|
|
330
|
+
let scratchDir = "";
|
|
331
|
+
try {
|
|
332
|
+
scratchDir = ensureSessionScratchDir(void 0, void 0, agentId);
|
|
333
|
+
} catch {
|
|
334
|
+
scratchDir = "";
|
|
335
|
+
}
|
|
299
336
|
const sections = [];
|
|
300
337
|
if (input.mode === "subagent") {
|
|
301
338
|
sections.push(`## Employee Memory Brief
|
|
@@ -305,6 +342,14 @@ Bound roster employee: **${agentId}**. Project: ${projectName}.`);
|
|
|
305
342
|
${capBlock(summary, SUMMARY_CAP)}`);
|
|
306
343
|
if (workingMemory) sections.push(`## Working Memory (auto-loaded)
|
|
307
344
|
${capBlock(workingMemory.trim(), WORKING_MEMORY_CAP)}`);
|
|
345
|
+
if (scratchDir) {
|
|
346
|
+
sections.push([
|
|
347
|
+
"## Isolated Scratch Directory",
|
|
348
|
+
`Per-session scratch dir (unique to THIS session, safe from concurrent agents):`,
|
|
349
|
+
scratchDir,
|
|
350
|
+
"Write named intermediate artifacts (pr.md, diffs, generated code, files staged for commit) HERE, not in a shared temp path. A file you place here cannot be read or overwritten by another agent's session."
|
|
351
|
+
].join("\n"));
|
|
352
|
+
}
|
|
308
353
|
if (memories) sections.push(`## Memory Brief
|
|
309
354
|
Recent memories from this project:
|
|
310
355
|
${memories}`);
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
getClient,
|
|
4
4
|
isInitialized,
|
|
5
5
|
loadEmployees
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TAMDAOCU.js";
|
|
7
7
|
import {
|
|
8
8
|
checkLicense,
|
|
9
9
|
isFeatureAllowed,
|
|
10
10
|
isPersonalFreeGrandfathered
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-L6RXG36J.js";
|
|
12
12
|
import {
|
|
13
13
|
PLAN_LIMITS
|
|
14
14
|
} from "./chunk-A7XLR3K7.js";
|
|
15
15
|
import {
|
|
16
16
|
EXE_AI_DIR
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ZIG7VPJV.js";
|
|
18
18
|
|
|
19
19
|
// src/lib/plan-limits.ts
|
|
20
20
|
import { readFileSync, existsSync } from "fs";
|