@askexenow/exe-os 0.9.362 → 0.9.365
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 +46 -2
- package/deploy/compose/.env.example +49 -2
- package/deploy/compose/cloudflared/config.yml.example +15 -8
- package/deploy/compose/docker-compose.yml +240 -34
- package/deploy/compose/generate-env.ts +88 -2
- package/deploy/compose/status.sh +30 -0
- package/deploy/compose/uptime-check.sh +39 -2
- package/deploy/compose/wiki-schema-guard.sh +302 -0
- package/deploy/stack-manifests/v0.9.json +232 -2
- package/dist/.dist-verified.json +3 -3
- package/dist/{active-agent-BPNEBKHI.js → active-agent-C6DPH43L.js} +10 -5
- package/dist/{active-agent-3FV5V7SS.js → active-agent-MGF7J3HB.js} +10 -5
- package/dist/agent-defs-generator-X7TVMPVB.js +240 -0
- package/dist/{agentic-ontology-RCVCJ6WB.js → agentic-ontology-CARDCG37.js} +1 -1
- package/dist/artifact-backup-767STHSW.js +209 -0
- package/dist/artifact-provenance-C7HQ267L.js +13 -0
- package/dist/{backfill-gate-LRX77SUD.js → backfill-gate-VX2RZTQV.js} +2 -2
- package/dist/{backfill-metadata-Y3DGVCK5.js → backfill-metadata-ANCJA6LA.js} +7 -7
- package/dist/{background-jobs-Z6KHCWES.js → background-jobs-LTPWCMA3.js} +2 -2
- package/dist/{backup-verify-TZPPUCLU.js → backup-verify-F7BHVEF7.js} +27 -14
- package/dist/{behavior-injection-JMGGWCWG.js → behavior-injection-XQ4B7DCF.js} +13 -12
- package/dist/{behaviors-TT6CMEKC.js → behaviors-R2IE3PEN.js} +12 -11
- package/dist/bin/age-ontology-load.js +2 -2
- package/dist/bin/agentic-ontology-backfill.js +9 -9
- package/dist/bin/agentic-reflection-backfill.js +10 -10
- package/dist/bin/agentic-semantic-label.js +9 -9
- package/dist/bin/backfill-conversations.js +10 -9
- package/dist/bin/backfill-responses.js +10 -9
- package/dist/bin/backfill-vectors.js +14 -13
- package/dist/bin/bulk-sync-postgres.js +23 -19
- package/dist/bin/cc-doctor.js +11 -8
- package/dist/bin/cleanup-stale-review-tasks.js +26 -24
- package/dist/bin/cli.js +29 -102
- package/dist/bin/customer-readiness.js +3 -1
- package/dist/bin/deferred-daemon-restart.js +115 -103
- package/dist/bin/exe-agent-config.js +5 -5
- package/dist/bin/exe-agent.js +14 -14
- package/dist/bin/exe-assign.js +12 -11
- package/dist/bin/exe-boot.js +60 -51
- package/dist/bin/exe-call.js +7 -7
- package/dist/bin/exe-cloud.js +26 -22
- package/dist/bin/exe-config-dump.js +5 -5
- package/dist/bin/exe-dispatch.js +30 -24
- package/dist/bin/exe-doctor.js +10 -9
- package/dist/bin/exe-export-behaviors.js +14 -13
- package/dist/bin/exe-forget.js +9 -9
- package/dist/bin/exe-gateway.js +9 -9
- package/dist/bin/exe-grant.js +5 -5
- package/dist/bin/exe-healthcheck.js +13 -8
- package/dist/bin/exe-heartbeat.js +36 -29
- package/dist/bin/exe-kill.js +30 -28
- package/dist/bin/exe-launch-agent.js +41 -37
- package/dist/bin/exe-mcp.js +5 -5
- package/dist/bin/exe-memory-reads.js +7 -7
- package/dist/bin/exe-new-employee.js +12 -11
- package/dist/bin/exe-os-mcp-proxy.js +5 -5
- package/dist/bin/exe-pending-messages.js +27 -25
- package/dist/bin/exe-pending-notifications.js +26 -24
- package/dist/bin/exe-pending-reviews.js +27 -25
- package/dist/bin/exe-rename.js +7 -7
- package/dist/bin/exe-review.js +29 -27
- package/dist/bin/exe-search.js +8 -8
- package/dist/bin/exe-session-cleanup.js +31 -29
- package/dist/bin/exe-settings.js +24 -20
- package/dist/bin/exe-start-codex.js +36 -21
- package/dist/bin/exe-start-opencode.js +15 -14
- package/dist/bin/exe-status.js +28 -25
- package/dist/bin/exe-support.js +5 -4
- package/dist/bin/exe-team.js +12 -6
- package/dist/bin/exe-verify-running-images.js +145 -0
- package/dist/bin/exe-watchdog.js +16 -6
- package/dist/bin/git-sweep.js +27 -25
- package/dist/bin/graph-backfill.js +10 -9
- package/dist/bin/graph-export.js +8 -8
- package/dist/bin/import-history.js +13 -11
- package/dist/bin/install.js +119 -107
- package/dist/bin/intercom-check.js +5 -5
- package/dist/bin/mcp-sessions.js +2 -2
- package/dist/bin/orchestration-metrics.js +6 -6
- package/dist/bin/postgres-agentic-reflection-backfill.js +4 -4
- package/dist/bin/postgres-agentic-semantic-backfill.js +3 -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 +26 -24
- package/dist/bin/setup.js +4 -3
- package/dist/bin/shard-migrate.js +8 -8
- package/dist/bin/stack-update.js +87 -38
- package/dist/bin/vps-health-gate.js +1 -1
- package/dist/{boot-generation-XABYKF5P.js → boot-generation-X45BSVZY.js} +5 -5
- package/dist/{boot-review-sections-2X5TFIGU.js → boot-review-sections-OBVRXXSF.js} +25 -23
- package/dist/{branch-hygiene-Z4IBWAOX.js → branch-hygiene-HFJ3HA62.js} +17 -10
- package/dist/{branding-7MZDHTKN.js → branding-GH43W3PU.js} +2 -2
- package/dist/build-manifest.json +1189 -1049
- package/dist/{capability-cards-O5UXDOOA.js → capability-cards-57FURUMR.js} +4 -4
- package/dist/{capacity-monitor-IPXM726A.js → capacity-monitor-QEL62JDO.js} +27 -25
- package/dist/{catchup-brief-EBIGDXOK.js → catchup-brief-PMXTCASA.js} +30 -28
- package/dist/{chunk-UO5QJ2RX.js → chunk-22YQBVMO.js} +4 -4
- package/dist/chunk-2ADYTOHQ.js +189 -0
- package/dist/{chunk-NO5KHKKB.js → chunk-2CWS374F.js} +1 -1
- package/dist/{chunk-NAHCSQWT.js → chunk-2ESB5SDP.js} +19 -7
- package/dist/{chunk-CY5NVDTH.js → chunk-2FYIMTQE.js} +9 -5
- package/dist/{chunk-SC6WDF3Q.js → chunk-2RQT7TED.js} +2 -2
- package/dist/{chunk-UWEFIIEG.js → chunk-3CIMDFXG.js} +1 -1
- package/dist/{chunk-E7PL3T2U.js → chunk-3JNVB5LG.js} +1 -1
- package/dist/{chunk-7SY2NOMQ.js → chunk-3THNS2T7.js} +1 -1
- package/dist/{chunk-XJIRUTGJ.js → chunk-45EQTS7B.js} +1 -1
- package/dist/{chunk-YZUHSV24.js → chunk-4LWBC7CM.js} +1 -1
- package/dist/{chunk-DKRDU2AX.js → chunk-4QKKLK3C.js} +14 -14
- package/dist/{chunk-WP2TGH5R.js → chunk-52TIQJEQ.js} +2 -2
- package/dist/{chunk-LG37UBBE.js → chunk-5CBGH6RA.js} +5 -5
- package/dist/{chunk-W3LKIQJ2.js → chunk-6GQYPJPG.js} +22 -16
- package/dist/{chunk-I3SF6QGV.js → chunk-6Q263OZE.js} +1 -1
- package/dist/{chunk-XSYQ5EPE.js → chunk-7C4FUNVO.js} +11 -11
- package/dist/{chunk-P7CV4SHQ.js → chunk-7Y6AQWVT.js} +21 -10
- package/dist/{chunk-NGDXBN3M.js → chunk-A6PDF4BO.js} +2 -2
- package/dist/chunk-A7XLR3K7.js +45 -0
- package/dist/{chunk-7H3AZNQ7.js → chunk-AGQAGOQN.js} +9 -9
- package/dist/{chunk-VDMFVUSY.js → chunk-ANPE3TT3.js} +3 -3
- package/dist/{chunk-NE4QI2GX.js → chunk-BATQKSLI.js} +2 -2
- package/dist/{chunk-AOMFYUPT.js → chunk-BEHLIRRJ.js} +2 -2
- package/dist/{chunk-6EM6USV7.js → chunk-BNHAZ65R.js} +42 -50
- package/dist/{chunk-HLU52KTO.js → chunk-BRLS5OLZ.js} +257 -36
- package/dist/{chunk-QCJT265O.js → chunk-BY7WWPRM.js} +1 -1
- package/dist/{chunk-Z67DIJKT.js → chunk-C3UAQ3JG.js} +1 -1
- package/dist/{chunk-MZYNW5OY.js → chunk-CDUB5Q6J.js} +1 -1
- package/dist/{chunk-5H3RHWRE.js → chunk-CKG6CVKI.js} +1 -1
- package/dist/{chunk-WH2VVEGD.js → chunk-CMBF5WCL.js} +56 -2
- package/dist/{chunk-JYKZVAS6.js → chunk-CPILYY2K.js} +1 -1
- package/dist/{chunk-XTGR3LMF.js → chunk-CW2UCKHS.js} +2 -2
- package/dist/{chunk-32FEF5BW.js → chunk-CWBFOAGM.js} +2 -2
- package/dist/{chunk-V5I5N7NC.js → chunk-DEFSN2FQ.js} +3 -3
- package/dist/{chunk-HAXCUCJC.js → chunk-DJK45U7B.js} +1 -1
- package/dist/{chunk-MZZN5GFC.js → chunk-DQ5KHWFD.js} +1 -1
- package/dist/{chunk-SLBOKYYQ.js → chunk-DWAQOEXL.js} +2 -2
- package/dist/{chunk-T2RZU7JA.js → chunk-DYWGIPVP.js} +7 -7
- package/dist/{chunk-6DTALXOA.js → chunk-E5HAY3DQ.js} +1 -1
- package/dist/{chunk-D5CY4E7I.js → chunk-EHHMNKOA.js} +1 -1
- package/dist/{chunk-54USDN5Q.js → chunk-EJ4522YM.js} +1 -1
- package/dist/{chunk-URNVIZXU.js → chunk-EKVTRI3N.js} +52 -6
- package/dist/{chunk-KID6T2A4.js → chunk-EMZHB767.js} +44 -35
- package/dist/{chunk-KBI4FVBZ.js → chunk-EPDNWY5P.js} +111 -22
- package/dist/{chunk-AQO3BT3I.js → chunk-EPNWEOOE.js} +13 -13
- package/dist/{chunk-5C6ZIJ7J.js → chunk-ESTR7QUP.js} +1 -1
- package/dist/{chunk-Q2VQNAPU.js → chunk-EVPBYX2Z.js} +2 -2
- package/dist/{chunk-CVYDJ2TW.js → chunk-EWCEUO65.js} +1 -1
- package/dist/{chunk-RNSAVQEU.js → chunk-EWZYFG5Q.js} +8 -3
- package/dist/{chunk-R7F6HKTH.js → chunk-EXDW3E2R.js} +3 -1
- package/dist/{chunk-TY4JLBFO.js → chunk-F2S3M5MB.js} +3 -3
- package/dist/{chunk-BT2PUK3S.js → chunk-FXPAUDCZ.js} +1 -1
- package/dist/{chunk-3C7NE4JE.js → chunk-G2EAYH4U.js} +1 -1
- package/dist/{chunk-WDA2KAV7.js → chunk-GSJLB6JI.js} +1 -1
- package/dist/{chunk-M67ARGXY.js → chunk-H37FSTF2.js} +1 -1
- package/dist/{chunk-ZR4CQBAP.js → chunk-H74466TM.js} +1 -1
- package/dist/{chunk-3BAGFZFN.js → chunk-HHGOCBVQ.js} +9 -9
- package/dist/{working-memory-BACVOAIV.js → chunk-HSFBNCNC.js} +3 -3
- package/dist/{chunk-PF7EQSE5.js → chunk-IIZITKBV.js} +6 -6
- package/dist/{chunk-2FA4PYYX.js → chunk-IM2I7OOS.js} +1 -1
- package/dist/{chunk-DSKEYEL2.js → chunk-IXEFO6HD.js} +3 -3
- package/dist/{chunk-TN2E6ZCM.js → chunk-J4U5Z7VX.js} +214 -58
- package/dist/{chunk-PU7UYQRC.js → chunk-J5EYOBFF.js} +1 -1
- package/dist/{chunk-RWKX2TK5.js → chunk-J6I7X272.js} +1 -1
- package/dist/{chunk-BDLRTLXY.js → chunk-JITNFE4W.js} +6 -2
- package/dist/{chunk-PUMH7JSB.js → chunk-JNVQGLPX.js} +3 -3
- package/dist/{chunk-VAOUB2TK.js → chunk-JTB5V6BV.js} +1 -1
- package/dist/{chunk-QYRI25IP.js → chunk-JUOZLXLH.js} +2 -2
- package/dist/{chunk-RYRNY6IF.js → chunk-JYFYIGYK.js} +2 -2
- package/dist/{chunk-2PRAXZWM.js → chunk-KOYGRP2L.js} +10 -5
- package/dist/{chunk-4AFD4R35.js → chunk-KRUYQFSH.js} +5 -5
- package/dist/chunk-L25OAFOU.js +93 -0
- package/dist/{chunk-FUQ2OSDV.js → chunk-L2VZBPJJ.js} +25 -8
- package/dist/{chunk-LCDW2HUL.js → chunk-LHOKWZKL.js} +1 -1
- package/dist/{chunk-BN26LSME.js → chunk-LKYGSJ2E.js} +13 -2
- package/dist/chunk-LNOS24GV.js +214 -0
- package/dist/{chunk-O32HTNRX.js → chunk-LZKYVMBY.js} +13 -4
- package/dist/{chunk-35FD67ZB.js → chunk-M7EES2KM.js} +3 -3
- package/dist/chunk-MBBFL2SP.js +45 -0
- package/dist/{chunk-4R2WD6T3.js → chunk-MPQXQ5IE.js} +2 -2
- package/dist/{chunk-QQMYD4M7.js → chunk-MXEIZUXG.js} +1 -1
- package/dist/{chunk-6QJXFLNN.js → chunk-MZJBUAC3.js} +5 -5
- package/dist/chunk-NEHOQ3P2.js +19 -0
- package/dist/{chunk-BRZR76TS.js → chunk-NJFJWQNN.js} +49 -14
- package/dist/{chunk-Q7J2SQJ6.js → chunk-NO3M2AFM.js} +100 -32
- package/dist/{gotrue-session-2IT7MDGW.js → chunk-NUTZJZKW.js} +7 -8
- package/dist/{chunk-6UZDGEGQ.js → chunk-NV6A5HDN.js} +71 -1
- package/dist/{chunk-ZI3HA3XW.js → chunk-O2MEBF23.js} +3 -3
- package/dist/{chunk-V6YLIDLK.js → chunk-ODBRU6BF.js} +577 -230
- package/dist/{chunk-6N3HUOV3.js → chunk-OFGFRT5J.js} +2 -2
- package/dist/{chunk-HKQ7UTSE.js → chunk-OPNROU5B.js} +1 -1
- package/dist/{chunk-SQM4ZTL2.js → chunk-ORNCMRIX.js} +60 -33
- package/dist/{chunk-RUUX2ZST.js → chunk-P47MPWNU.js} +1 -1
- package/dist/{org-key-admin-4W6LZ5KZ.js → chunk-P5XTVIEC.js} +62 -17
- package/dist/{chunk-OZNCAMS3.js → chunk-POPRJKAY.js} +122 -20
- package/dist/{chunk-SRFRUN66.js → chunk-PPGPCWRC.js} +5 -5
- package/dist/{chunk-B6PFGUYJ.js → chunk-PVEM537A.js} +46 -5
- package/dist/{chunk-QJBX3MBV.js → chunk-Q7BU5Q6I.js} +3 -3
- package/dist/{chunk-SXKIGBNF.js → chunk-QFIVK3G5.js} +1 -1
- package/dist/{chunk-BRIZ6OZ3.js → chunk-QMSEL5YS.js} +81 -23
- package/dist/{chunk-BJEQBKGH.js → chunk-QYJANQWC.js} +8 -8
- package/dist/{chunk-4U56FZ7B.js → chunk-R7RM766N.js} +3 -3
- package/dist/{chunk-QI25QRUP.js → chunk-RD4E5G3B.js} +2 -2
- package/dist/{chunk-QP53XLC5.js → chunk-RHX6MNWY.js} +1 -1
- package/dist/chunk-RIECV7SR.js +234 -0
- package/dist/{chunk-3YBJ36UX.js → chunk-RLDMUSRM.js} +2 -2
- package/dist/{chunk-CXQ724WH.js → chunk-RVWALVDT.js} +2 -2
- package/dist/{chunk-VWTUKKUF.js → chunk-RZIKSE6N.js} +10 -4
- package/dist/chunk-SBAU735L.js +328 -0
- package/dist/{chunk-XRCX6R5S.js → chunk-SBJV2PCU.js} +1 -1
- package/dist/chunk-SO7KTH3Q.js +27 -0
- package/dist/{chunk-327Q53AS.js → chunk-SP37DONS.js} +17 -6
- package/dist/{chunk-KA4WVDLX.js → chunk-T6S45OLV.js} +4 -4
- package/dist/chunk-TCTED52S.js +120 -0
- package/dist/{chunk-HLQ4MS42.js → chunk-TO6TB75E.js} +4 -4
- package/dist/{chunk-465RCKVI.js → chunk-U373MEF5.js} +6 -6
- package/dist/{chunk-AL4HXKDJ.js → chunk-VGE6IHZB.js} +10 -10
- package/dist/{chunk-WBG7XYVR.js → chunk-VHJVD3MZ.js} +8 -0
- package/dist/{chunk-ZZEKOI2M.js → chunk-VMJ2UH4S.js} +1 -1
- package/dist/{chunk-3ICF4IAZ.js → chunk-VS4LPG66.js} +1 -1
- package/dist/{chunk-E3YI6FVJ.js → chunk-VV5EZZNT.js} +1 -1
- package/dist/{chunk-OPU3NYOO.js → chunk-W2IRQJ6R.js} +12 -0
- package/dist/{chunk-PV5BIXT6.js → chunk-WR75WUEP.js} +1 -1
- package/dist/{chunk-XUB4GFPN.js → chunk-WYLFDSIE.js} +144 -99
- package/dist/{chunk-4L33OFU4.js → chunk-X2P43TB2.js} +6 -3
- package/dist/chunk-X2X3IGZU.js +215 -0
- package/dist/{chunk-KIKB6FY3.js → chunk-X6A2VWVJ.js} +2 -2
- package/dist/chunk-XMVSLLED.js +38 -0
- package/dist/{chunk-KDMVVHZH.js → chunk-XTWHNLGD.js} +95 -23
- package/dist/{chunk-QY3TM2T3.js → chunk-YMJOLEPE.js} +4 -4
- package/dist/{chunk-RFKRCVGW.js → chunk-YYA5LXCT.js} +1 -1
- package/dist/{chunk-HSKABJE6.js → chunk-ZDUO6QBH.js} +5 -10
- package/dist/{chunk-PDJWHL63.js → chunk-ZEKCHV43.js} +4 -4
- package/dist/{chunk-23KWUA7Z.js → chunk-ZNEBZCZR.js} +53 -2
- package/dist/chunk-ZNUJFX7L.js +135 -0
- package/dist/{chunk-TP7RXGMP.js → chunk-ZRKEUCUZ.js} +315 -67
- package/dist/{chunk-6Y3KUO7Q.js → chunk-ZSZPMUNX.js} +244 -21
- package/dist/{chunk-4P2BFNSB.js → chunk-ZVTKWWLV.js} +2 -2
- package/dist/{chunk-RCOIKTHM.js → chunk-ZZXMB5F2.js} +1 -1
- package/dist/{cleanup-graph-garbage-6F22Y5SD.js → cleanup-graph-garbage-CAA625RJ.js} +10 -9
- package/dist/cloud-sync-command-DBB7WRHL.js +96 -0
- package/dist/cloud-sync-db-init-V7IB23W5.js +46 -0
- package/dist/{cloud-sync-shutdown-FWERMZB5.js → cloud-sync-shutdown-2D3B73CJ.js} +10 -4
- package/dist/{cloud-sync-state-DJRZORFI.js → cloud-sync-state-5DFKLWNB.js} +1 -1
- package/dist/{co-activation-UEEDCM5U.js → co-activation-JVN7EBS6.js} +4 -4
- package/dist/{co-occurrence-W6OPFRSY.js → co-occurrence-526PTFGT.js} +8 -7
- package/dist/{code-context-index-DWR6HS35.js → code-context-index-XOP6TLPZ.js} +5 -4
- package/dist/{conversation-entity-extractor-LWUIH3UB.js → conversation-entity-extractor-JO56DB2E.js} +9 -4
- package/dist/{conversation-wiki-populator-5EGRW2UZ.js → conversation-wiki-populator-EBUZXYEU.js} +1 -1
- package/dist/{crdt-sync-NHJX3ZJD.js → crdt-sync-LIJLZKFE.js} +2 -2
- package/dist/{crm-webhook-OY467ATC.js → crm-webhook-55F7Y6D2.js} +2 -2
- package/dist/{cto-delegation-gate-XH4YSQVC.js → cto-delegation-gate-QIYV4KFO.js} +41 -24
- package/dist/daemon-auth-SSPY5ODS.js +46 -0
- package/dist/{daemon-orchestration-7425ZVNH.js → daemon-orchestration-Q3GJA2JJ.js} +46 -30
- package/dist/{daemon-ready-VGPSRI3Z.js → daemon-ready-MKBH4QWD.js} +1 -1
- package/dist/{daemon-restart-report-HZU5LWXN.js → daemon-restart-report-EIVD6WDJ.js} +1 -1
- package/dist/db-integrity-events-5DTASXJF.js +22 -0
- package/dist/{db-restore-events-TFCZ4CPM.js → db-restore-events-2FI4ZMKA.js} +1 -1
- package/dist/{doc-graph-extractor-RR2VSO4W.js → doc-graph-extractor-P46R4QME.js} +13 -8
- package/dist/{documents-TRZ4R2ZW.js → documents-7KFEREWO.js} +12 -11
- package/dist/{dreaming-MAMZAPYW.js → dreaming-JMUXBAPU.js} +29 -27
- package/dist/employee-boot-brief-HN63D2BY.js +71 -0
- package/dist/{exe-drift-VBWB5E6S.js → exe-drift-7J7GX7DP.js} +5 -5
- package/dist/{exe-export-XJJTVVT7.js → exe-export-KJ7B2OBU.js} +14 -13
- package/dist/{exe-import-G6O7JFNZ.js → exe-import-HPZDWKGE.js} +14 -13
- package/dist/{exe-key-A2WJLLTM.js → exe-key-2PREP464.js} +117 -105
- package/dist/{exe-org-HXF4XBB3.js → exe-org-VEIISATF.js} +88 -26
- package/dist/{exe-snapshot-TL3TLKLR.js → exe-snapshot-JXQFLUKA.js} +33 -40
- package/dist/{fast-db-init-SO2XUQ7T.js → fast-db-init-SCXJXOYX.js} +1 -1
- package/dist/{founder-context-IOCADC66.js → founder-context-U2SZPLYV.js} +4 -3
- package/dist/{founder-monitor-envelope-SMILO4BT.js → founder-monitor-envelope-5KTKNL5G.js} +4 -4
- package/dist/fts-integrity-LKAZEZJE.js +96 -0
- package/dist/gateway/index.js +19 -19
- package/dist/{git-staleness-I6WT7EXV.js → git-staleness-S4NDR7NX.js} +4 -4
- package/dist/{global-procedures-3RMO6C3C.js → global-procedures-ZOFTOXIR.js} +6 -6
- package/dist/gotrue-session-ODZ2ERJX.js +25 -0
- package/dist/{graph-auto-extract-NKTYPD2I.js → graph-auto-extract-CLVTSUSB.js} +8 -7
- package/dist/{graph-rag-EOGPZOYI.js → graph-rag-LSJLWGXV.js} +4 -3
- package/dist/{hook-integrity-RTBF2BL2.js → hook-integrity-SGTKBL6W.js} +1 -1
- package/dist/{hook-prefetch-V5KCGW2N.js → hook-prefetch-BDSLB6F4.js} +26 -24
- package/dist/hooks/bug-report-worker.js +30 -28
- package/dist/hooks/codex-stop-task-finalizer.js +32 -30
- package/dist/hooks/commit-complete.js +29 -27
- package/dist/hooks/error-recall.js +11 -10
- package/dist/hooks/exe-heartbeat-hook.js +7 -6
- package/dist/hooks/ingest-worker.js +10 -9
- package/dist/hooks/ingest.js +18 -16
- package/dist/hooks/instructions-loaded.js +12 -8
- package/dist/hooks/manifest.json +20 -20
- package/dist/hooks/notification.js +8 -7
- package/dist/hooks/post-compact.js +7 -6
- package/dist/hooks/post-tool-combined.js +33 -14
- package/dist/hooks/pre-compact.js +31 -28
- package/dist/hooks/pre-tool-use.js +61 -34
- package/dist/hooks/prompt-submit.js +45 -42
- package/dist/hooks/session-end.js +40 -35
- package/dist/hooks/session-start.js +29 -71
- package/dist/hooks/stop.js +42 -36
- package/dist/hooks/subagent-stop.js +49 -33
- package/dist/hooks/summary-worker.js +35 -33
- package/dist/index.js +40 -38
- package/dist/{installer-G67M3DME.js → installer-EA7T3PBD.js} +7 -7
- package/dist/{installer-L3ZKMOPU.js → installer-KCEM4RCG.js} +7 -7
- package/dist/{installer-QBWZSYDG.js → installer-RC2JCKSE.js} +9 -7
- package/dist/{intercom-queue-R5LSXD3V.js → intercom-queue-6DZPHHQ2.js} +25 -23
- package/dist/{key-backup-status-3RC6XTUX.js → key-backup-status-6L2ARCXW.js} +1 -1
- package/dist/lib/agent-config.js +2 -2
- package/dist/lib/cloud-sync.js +25 -19
- package/dist/lib/config.js +1 -1
- package/dist/lib/consolidation.js +9 -9
- package/dist/lib/crypto.js +3 -1
- package/dist/lib/database.js +18 -4
- package/dist/lib/db-backup.js +4 -2
- package/dist/lib/db-daemon-client.js +5 -4
- package/dist/lib/db-write-worker.js +3 -3
- package/dist/lib/db.js +18 -4
- package/dist/lib/device-registry.js +2 -2
- package/dist/lib/embed-worker.js +1 -1
- package/dist/lib/embedder.js +5 -4
- package/dist/lib/employee-templates.js +7 -7
- package/dist/lib/employees.js +4 -4
- package/dist/lib/exe-daemon-client.js +4 -3
- package/dist/lib/exe-daemon.js +473 -206
- package/dist/lib/hybrid-search.js +8 -8
- package/dist/lib/identity-templates.js +1 -1
- package/dist/lib/identity.js +4 -4
- package/dist/lib/license.js +6 -4
- package/dist/lib/messaging.js +26 -24
- package/dist/lib/post-tool-memory.js +2 -2
- package/dist/lib/registry-proxy.js +3 -1
- package/dist/lib/reminders.js +5 -5
- package/dist/lib/schedules.js +8 -8
- package/dist/lib/session-registry.js +6 -6
- package/dist/lib/skill-learning.js +14 -12
- package/dist/lib/stack-invariants.js +21 -0
- package/dist/lib/status-brief.js +3 -3
- package/dist/lib/store.js +7 -7
- package/dist/lib/task-router.js +5 -5
- package/dist/lib/tasks.js +27 -25
- package/dist/lib/tmux-routing.js +25 -23
- package/dist/lib/token-spend.js +5 -5
- package/dist/{license-gate-6R3F3NQR.js → license-gate-HMSMUIAU.js} +5 -4
- package/dist/{license-sync-VBJCXBAP.js → license-sync-FBCMPC4J.js} +4 -3
- package/dist/{mailbox-inbox-CP2VRBXZ.js → mailbox-inbox-4MEUOL3J.js} +2 -2
- package/dist/{mailbox-outbox-HXI7DYNC.js → mailbox-outbox-J6WIF3UY.js} +1 -1
- package/dist/mcp/register-tools.js +114 -102
- package/dist/mcp/server.js +120 -108
- package/dist/mcp/tools/complete-reminder.js +6 -6
- package/dist/mcp/tools/create-reminder.js +6 -6
- package/dist/mcp/tools/create-task.js +30 -27
- package/dist/mcp/tools/deactivate-behavior.js +15 -13
- package/dist/mcp/tools/list-reminders.js +6 -6
- package/dist/mcp/tools/list-tasks.js +30 -27
- package/dist/mcp/tools/send-message.js +29 -26
- package/dist/mcp/tools/update-task.js +28 -26
- package/dist/{mcp-http-config-BWX7AMAZ.js → mcp-http-config-YKJN52HG.js} +5 -5
- package/dist/{mcp-session-identity-GOBGICLI.js → mcp-session-identity-QLUVYWPR.js} +25 -23
- package/dist/{memory-cards-4EXX3BQS.js → memory-cards-K2OSX4AW.js} +7 -7
- package/dist/{memory-graph-extractor-OYVZIJ3R.js → memory-graph-extractor-YLTSKLSY.js} +9 -8
- package/dist/{memory-poisoning-defense-AHOD2EBX.js → memory-poisoning-defense-IPO4ADRL.js} +4 -4
- package/dist/{memory-pressure-watchdog-COJC3OYS.js → memory-pressure-watchdog-ZI3TH2OF.js} +26 -24
- package/dist/{memory-queue-4VN3DTOE.js → memory-queue-QJNWKWKG.js} +2 -2
- package/dist/{memory-queue-client-OI4LDT4W.js → memory-queue-client-HIHCA3W4.js} +6 -5
- package/dist/{memory-reflection-V2SNAUIB.js → memory-reflection-ZKVRU3NT.js} +4 -4
- package/dist/{monitor-grants-W3ISOLMC.js → monitor-grants-BW2WL4IU.js} +3 -3
- package/dist/{notification-ledger-J6Q2GAYU.js → notification-ledger-4REL6M3T.js} +27 -25
- package/dist/{notifications-56TP36IK.js → notifications-UXJUAP3C.js} +25 -23
- package/dist/{orchestration-events-CKQ756NA.js → orchestration-events-GMRGGBMN.js} +5 -5
- package/dist/{orchestration-phase-ZJ4XVNFO.js → orchestration-phase-UDS24CVQ.js} +2 -2
- package/dist/{orchestrator-ERSQ3KNT.js → orchestrator-5TV75HDJ.js} +27 -25
- package/dist/{org-brief-session-FSZ3QJDN.js → org-brief-session-7AZZEO3F.js} +13 -13
- package/dist/{org-consent-policy-BN7MKCZ2.js → org-consent-policy-XT6UZENB.js} +2 -2
- package/dist/{org-join-HTQ57JYH.js → org-join-BMBQDMVF.js} +10 -7
- package/dist/org-key-admin-SCCVVE2H.js +38 -0
- package/dist/{org-key-pin-OTOKAELD.js → org-key-pin-5WUSPGVN.js} +3 -3
- package/dist/{org-membership-SML6GCHP.js → org-membership-ESALTLLN.js} +4 -4
- package/dist/{org-partner-config-XQGOB7EJ.js → org-partner-config-YKHPDPZR.js} +6 -6
- package/dist/{org-partner-runtime-RNNUL5IN.js → org-partner-runtime-WLZAZJIY.js} +14 -14
- package/dist/{org-row-visibility-JZFJ3YRJ.js → org-row-visibility-A5XM4MVO.js} +1 -1
- package/dist/{pipeline-router-IUENNTAY.js → pipeline-router-UEVXDUHR.js} +5 -5
- package/dist/{plan-limits-ZUII366B.js → plan-limits-QEP32X4W.js} +8 -7
- package/dist/{platform-procedures-2VQGBJU7.js → platform-procedures-44NDFTB6.js} +1 -1
- package/dist/{postinstall-failure-A7WTAXD6.js → postinstall-failure-B2JHNFPM.js} +2 -2
- package/dist/{project-boot-3DFY5F35.js → project-boot-LEZSK3W7.js} +9 -1
- package/dist/project-name-ILJTETUE.js +14 -0
- package/dist/{projection-worker-MBWUPB5O.js → projection-worker-GMRC6SBH.js} +4 -4
- package/dist/{prospective-memory-GHE5ORN4.js → prospective-memory-QLHSAPSG.js} +4 -4
- package/dist/{push-notifications-PTQ5DHCD.js → push-notifications-GKRPXOGI.js} +26 -24
- package/dist/reproject-worktree-memories-IXYGHTGA.js +224 -0
- package/dist/{reranker-NUIGAPA3.js → reranker-GB4VEMUV.js} +2 -2
- package/dist/{retrieval-health-XHCERQPG.js → retrieval-health-QIBPBGN6.js} +5 -1
- package/dist/{review-polling-CYBCBHZA.js → review-polling-MU47NQ2N.js} +26 -24
- package/dist/runtime/index.js +37 -35
- package/dist/seat-benefit-VDQJYJOB.js +17 -0
- package/dist/{session-events-X33W4JNA.js → session-events-YMQ3VGBJ.js} +26 -24
- package/dist/{session-kill-telemetry-I2F5PUIW.js → session-kill-telemetry-VGPKE57M.js} +26 -24
- package/dist/{session-mcp-config-YKNXG5DW.js → session-mcp-config-F7KATWOF.js} +10 -1
- package/dist/{session-scope-WXP4F7OF.js → session-scope-P46KAHXQ.js} +26 -24
- package/dist/{setup-wizard-2CTVITIX.js → setup-wizard-BRNHSJ4U.js} +4 -3
- package/dist/{shard-manager-YEOHEOHL.js → shard-manager-UROHZE46.js} +2 -2
- package/dist/{skill-refinement-VDR5OT4V.js → skill-refinement-NLYDSFEH.js} +5 -5
- package/dist/{stack-promote-XVC7FRJW.js → stack-promote-NHFTNIM2.js} +7 -5
- package/dist/{stack-release-6PWAACRM.js → stack-release-AQVKZUS7.js} +7 -5
- package/dist/{stack-update-24VRBQ3U.js → stack-update-LLX5KT7G.js} +38 -6
- package/dist/{steward-gate-2ZNYDVFO.js → steward-gate-JKHYFAHA.js} +5 -5
- package/dist/subagent-brief-injection-VDVOHDOU.js +97 -0
- package/dist/subagent-spawn-ledger-USYZXU3M.js +22 -0
- package/dist/{support-inbox-ZHKLDETT.js → support-inbox-S6YO5YZU.js} +5 -4
- package/dist/{support-outbox-DSWU3IXH.js → support-outbox-HFJWG52M.js} +1 -1
- package/dist/{task-enforcement-GQDUTIFY.js → task-enforcement-LXW45H5Z.js} +26 -24
- package/dist/{task-request-inbox-BFXNUU44.js → task-request-inbox-UCSKDC3R.js} +2 -2
- package/dist/{task-scope-ERHPHLUM.js → task-scope-GDLFE26E.js} +25 -23
- package/dist/{tasks-crud-NVNF3NRA.js → tasks-crud-W7VGWRUV.js} +25 -23
- package/dist/{tasks-notify-DXLU5VCT.js → tasks-notify-CT7NWCS4.js} +26 -24
- package/dist/{tasks-review-BST6N34P.js → tasks-review-WCSKOUFW.js} +25 -23
- package/dist/{telemetry-upload-NY3EKOGY.js → telemetry-upload-FK5WKXVB.js} +10 -9
- package/dist/{token-budget-CLB3GUIX.js → token-budget-GBNGSIU3.js} +5 -5
- package/dist/{tool-capability-index-WZWVBI2R.js → tool-capability-index-BT2GGLLI.js} +1 -1
- package/dist/{tool-telemetry-PALAZUXT.js → tool-telemetry-VKMRS6MP.js} +1 -1
- package/dist/tui/App.js +39 -37
- package/dist/{tui-data-CNFSRZP7.js → tui-data-FTPV2XBQ.js} +25 -23
- package/dist/{update-support-ZVB3CNGY.js → update-support-J6UWPUOC.js} +18 -15
- package/dist/{work-state-heartbeat-O7UMB6SE.js → work-state-heartbeat-4LDF6DSM.js} +1 -1
- package/dist/{worker-gate-6DQQWDNB.js → worker-gate-35VZINZG.js} +2 -2
- package/dist/{workflow-engine-5ZULFH7O.js → workflow-engine-4DA6RSHI.js} +2 -2
- package/dist/working-memory-DPFRSKH3.js +18 -0
- package/dist/{worktree-ZWA35PKW.js → worktree-H3YFJ3NU.js} +6 -6
- package/dist/{worktree-sweep-5LCVT46V.js → worktree-sweep-4EDLLQ2E.js} +9 -7
- package/package.json +11 -5
- package/release-notes.json +86 -34
- package/src/commands/exe/call.md +6 -4
- package/src/commands/exe-reference.md +11 -7
- package/src/commands/exe.md +16 -20
- package/dist/chunk-HISFWAAK.js +0 -90
- package/dist/daemon-auth-OCHW2U6B.js +0 -20
- package/dist/project-name-EWG5KAZP.js +0 -10
- package/dist/session-summary-5EYI4XW4.js +0 -128
- /package/dist/{chunk-YAZ5ECEG.js → chunk-3NBWARKC.js} +0 -0
- /package/dist/{chunk-6C4UAKMS.js → chunk-6CAX7YH4.js} +0 -0
- /package/dist/{chunk-FIPUVCKC.js → chunk-7DMCAGSC.js} +0 -0
- /package/dist/{chunk-X7LY3IOB.js → chunk-JRPYLUXH.js} +0 -0
- /package/dist/{chunk-L4LPJMPV.js → chunk-QYECRPGD.js} +0 -0
- /package/dist/{chunk-UELGUVNL.js → chunk-UY6HRDB2.js} +0 -0
- /package/dist/{chunk-YWN3XMPU.js → chunk-YSDIJ3VI.js} +0 -0
- /package/dist/{core-memory-BZFPVS43.js → core-memory-CMPPHJN5.js} +0 -0
- /package/dist/{entity-boost-VXXED26D.js → entity-boost-CDFAXVYL.js} +0 -0
- /package/dist/{memory-isolation-3PIOWLYP.js → memory-isolation-ZB5S5HCO.js} +0 -0
- /package/dist/{message-queue-client-5XW7ZOK2.js → message-queue-client-PL2POQOV.js} +0 -0
- /package/dist/{oauth-server-KW5M437C.js → oauth-server-NP7KGF7N.js} +0 -0
- /package/dist/{webhook-pipe-QJRFZVKA.js → webhook-pipe-UQSEHFPO.js} +0 -0
- /package/dist/{wiki-acl-RXFV5OEU.js → wiki-acl-5DKOWOIH.js} +0 -0
- /package/dist/{wiki-client-57QWZIHQ.js → wiki-client-AXNM5FWY.js} +0 -0
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
REVISION_LABEL,
|
|
3
|
+
VERSION_LABEL,
|
|
4
|
+
checkImageVersionLabels,
|
|
5
|
+
isFirstPartyImage
|
|
6
|
+
} from "./chunk-L25OAFOU.js";
|
|
1
7
|
import {
|
|
2
8
|
loadLicense
|
|
3
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZDUO6QBH.js";
|
|
4
10
|
|
|
5
11
|
// src/lib/stack-update.ts
|
|
6
12
|
import { execFileSync, spawnSync as spawnSync2 } from "child_process";
|
|
@@ -106,7 +112,50 @@ function saveServiceSelection(envFile, selectedServices) {
|
|
|
106
112
|
selectedServices,
|
|
107
113
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
108
114
|
};
|
|
109
|
-
writeFileSync(selPath, JSON.stringify(data, null, 2) + "\n", { mode:
|
|
115
|
+
writeFileSync(selPath, JSON.stringify(data, null, 2) + "\n", { mode: 420 });
|
|
116
|
+
chmodSync(selPath, 420);
|
|
117
|
+
}
|
|
118
|
+
function mergeServiceSelection(envFile, services) {
|
|
119
|
+
const existing = loadServiceSelection(envFile)?.selectedServices;
|
|
120
|
+
const result = computeServiceSelectionMerge(existing, services);
|
|
121
|
+
saveServiceSelection(envFile, result.selectedServices);
|
|
122
|
+
return result;
|
|
123
|
+
}
|
|
124
|
+
function computeServiceSelectionMerge(existingServices, requestedServices) {
|
|
125
|
+
const existing = existingServices ?? [];
|
|
126
|
+
const existingSet = new Set(existing);
|
|
127
|
+
const requestedSet = new Set(requestedServices);
|
|
128
|
+
const added = requestedServices.filter((name, i) => !existingSet.has(name) && requestedServices.indexOf(name) === i);
|
|
129
|
+
const preserved = existing.filter((name) => !requestedSet.has(name));
|
|
130
|
+
const selectedServices = [...existing.filter((name, i) => existing.indexOf(name) === i), ...added];
|
|
131
|
+
return { selectedServices, added, preserved };
|
|
132
|
+
}
|
|
133
|
+
function runScopedServiceSelection(services, now = () => /* @__PURE__ */ new Date()) {
|
|
134
|
+
return { selectedServices: [...services], updatedAt: now().toISOString() };
|
|
135
|
+
}
|
|
136
|
+
function unmanagedManifestServices(release, selection) {
|
|
137
|
+
if (!selection) return [];
|
|
138
|
+
const selected = new Set(selection.selectedServices);
|
|
139
|
+
return Object.entries(release.services).filter(([name, service]) => !service.required && !selected.has(name) && !selected.has(service.composeService ?? name)).map(([name]) => name);
|
|
140
|
+
}
|
|
141
|
+
function warnUnmanagedManifestServices(release, selection, options = { targetVersion: "", envFile: "" }) {
|
|
142
|
+
const skipped = unmanagedManifestServices(release, selection);
|
|
143
|
+
if (skipped.length === 0) return skipped;
|
|
144
|
+
const warn = options.warn ?? ((message) => console.warn(message));
|
|
145
|
+
const border = "!".repeat(72);
|
|
146
|
+
const origin = options.scope === "run" ? "this run's --services scope" : `the managed set (${serviceSelectionPath(options.envFile)})`;
|
|
147
|
+
const remedy = options.scope === "run" ? " Drop --services to update the whole managed set." : ` These services will NOT be updated. If that is not what you want, run:
|
|
148
|
+
` + skipped.map((name) => ` exe-os stack-update --add-service ${name}`).join("\n");
|
|
149
|
+
warn(
|
|
150
|
+
`
|
|
151
|
+
${border}
|
|
152
|
+
[stack-update] \u26A0\uFE0F SKIPPING ${skipped.length} service(s) present in manifest ${options.targetVersion || "(target)"} but NOT in ${origin}:
|
|
153
|
+
` + skipped.map((name) => ` - ${name}`).join("\n") + `
|
|
154
|
+
${remedy}
|
|
155
|
+
${border}
|
|
156
|
+
`
|
|
157
|
+
);
|
|
158
|
+
return skipped;
|
|
110
159
|
}
|
|
111
160
|
function parseComposeDependsOn(composeRaw) {
|
|
112
161
|
const deps = /* @__PURE__ */ new Map();
|
|
@@ -562,7 +611,8 @@ function readStackUpdateLock(lockFile) {
|
|
|
562
611
|
}
|
|
563
612
|
}
|
|
564
613
|
function writeStackUpdateLock(lockFile, data) {
|
|
565
|
-
writeFileSync(lockFile, JSON.stringify(data, null, 2) + "\n");
|
|
614
|
+
writeFileSync(lockFile, JSON.stringify(data, null, 2) + "\n", { mode: 420 });
|
|
615
|
+
chmodSync(lockFile, 420);
|
|
566
616
|
}
|
|
567
617
|
function composeOverrideFileFor(composeFile) {
|
|
568
618
|
return path.join(path.dirname(composeFile), "docker-compose.override.yml");
|
|
@@ -641,8 +691,37 @@ function parseStackManifest(raw, publicKey) {
|
|
|
641
691
|
return parsed;
|
|
642
692
|
}
|
|
643
693
|
async function loadStackManifest(ref, fetchText = defaultFetchText, publicKey, authToken) {
|
|
644
|
-
|
|
645
|
-
|
|
694
|
+
return parseStackManifest(await readStackManifestRaw(ref, fetchText, authToken), publicKey);
|
|
695
|
+
}
|
|
696
|
+
async function readStackManifestRaw(ref, fetchText = defaultFetchText, authToken) {
|
|
697
|
+
if (/^https?:\/\//.test(ref)) return fetchTextWithAuth(ref, fetchText, authToken);
|
|
698
|
+
return readFileSync(ref, "utf8");
|
|
699
|
+
}
|
|
700
|
+
async function loadStackManifestWithFallback(primaryRef, fallbackRef, fetchText = defaultFetchText, publicKey, authToken) {
|
|
701
|
+
let raw;
|
|
702
|
+
let source = primaryRef;
|
|
703
|
+
let usedFallback = false;
|
|
704
|
+
let fallbackReason;
|
|
705
|
+
try {
|
|
706
|
+
raw = await readStackManifestRaw(primaryRef, fetchText, authToken);
|
|
707
|
+
} catch (err) {
|
|
708
|
+
if (!fallbackRef || fallbackRef === primaryRef) throw err;
|
|
709
|
+
fallbackReason = err instanceof Error ? err.message : String(err);
|
|
710
|
+
raw = await readStackManifestRaw(fallbackRef, fetchText, authToken);
|
|
711
|
+
source = fallbackRef;
|
|
712
|
+
usedFallback = true;
|
|
713
|
+
}
|
|
714
|
+
const manifest = parseStackManifest(raw, publicKey);
|
|
715
|
+
return { manifest, source, usedFallback, fallbackReason };
|
|
716
|
+
}
|
|
717
|
+
function reportStackManifestSource(result) {
|
|
718
|
+
if (!result.usedFallback) {
|
|
719
|
+
console.log(`[stack-update] Manifest source: ${result.source} (live)`);
|
|
720
|
+
return;
|
|
721
|
+
}
|
|
722
|
+
console.warn(
|
|
723
|
+
`[stack-update] \u26A0\uFE0F Live manifest unreachable \u2014 using OFFLINE PACKAGED manifest ${result.source}. It is frozen at the installed exe-os version and may not list newer stack releases. Reason: ${result.fallbackReason}`
|
|
724
|
+
);
|
|
646
725
|
}
|
|
647
726
|
async function fetchTextWithAuth(ref, fetchText, authToken) {
|
|
648
727
|
if (!authToken || fetchText !== defaultFetchText) return fetchText(ref);
|
|
@@ -799,9 +878,30 @@ function createStackUpdatePlan(manifest, envRaw, targetVersion, serviceNames, se
|
|
|
799
878
|
var ASKEXE_GHCR_IMAGE = /^(?:ghcr\.io\/askexe|update\.askexe\.com\/askexe)\/[a-z0-9._/-]+(?:(?::[^:@$/{]+)(?:@sha256:[a-f0-9]{64})?|@sha256:[a-f0-9]{64})$/i;
|
|
800
879
|
var OFFICIAL_COMPOSE_IMAGE = /^(?:postgres|pgvector\/pgvector|clickhouse\/clickhouse-server|redis|nginx|postgrest\/postgrest|supabase\/gotrue|cloudflare\/cloudflared|otel\/opentelemetry-collector-contrib)(?:(?::[^:@$/{]+)(?:@sha256:[a-f0-9]{64})?|@sha256:[a-f0-9]{64})$/i;
|
|
801
880
|
var IMAGE_DIGEST = /@sha256:[a-f0-9]{64}/;
|
|
881
|
+
var TRUTHY = /^(1|true|yes)$/i;
|
|
882
|
+
function isUnpinnedImageBreakGlassEnabled() {
|
|
883
|
+
return TRUTHY.test((process.env.EXE_STACK_ALLOW_UNPINNED_IMAGES ?? "").trim());
|
|
884
|
+
}
|
|
802
885
|
function isStrictDigestEnabled(option) {
|
|
803
886
|
if (typeof option === "boolean") return option;
|
|
804
|
-
|
|
887
|
+
if (isUnpinnedImageBreakGlassEnabled()) return false;
|
|
888
|
+
return true;
|
|
889
|
+
}
|
|
890
|
+
function unpinnedImageBreakGlassBanner() {
|
|
891
|
+
const border = "=".repeat(72);
|
|
892
|
+
return [
|
|
893
|
+
"",
|
|
894
|
+
border,
|
|
895
|
+
" !!! DIGEST PINNING GATE DISABLED !!!",
|
|
896
|
+
border,
|
|
897
|
+
" EXE_STACK_ALLOW_UNPINNED_IMAGES=1 \u2014 unpinned images are warnings, not errors.",
|
|
898
|
+
" A tag can be repointed at different bytes after you reviewed it. This deploy",
|
|
899
|
+
" cannot tell you what it is actually running.",
|
|
900
|
+
"",
|
|
901
|
+
" Break-glass only. Resolve the digest and unset this.",
|
|
902
|
+
border,
|
|
903
|
+
""
|
|
904
|
+
].join("\n");
|
|
805
905
|
}
|
|
806
906
|
function imageTag(image) {
|
|
807
907
|
const noDigest = image.replace(/@sha256:[a-f0-9]{64}$/i, "");
|
|
@@ -941,6 +1041,13 @@ function collectProductionDeployGateIssues(plan, envRaw, composeRaw, options = {
|
|
|
941
1041
|
if (resolved) {
|
|
942
1042
|
const composeIssue = validateComposeImageLiteral(resolved, `compose image resolved value on line ${index + 1}`, strictDigest);
|
|
943
1043
|
if (composeIssue) issues.push(composeIssue);
|
|
1044
|
+
} else {
|
|
1045
|
+
const vars = [...image.matchAll(/\$\{([A-Za-z_][A-Za-z0-9_]*)/g)].map((m) => m[1]);
|
|
1046
|
+
issues.push({
|
|
1047
|
+
kind: "compose-image",
|
|
1048
|
+
message: `compose image on line ${index + 1} resolves to nothing (${image}) \u2014 no image is pinned for this service. Set ${vars.join(" or ") || "the image variable"} to a digest-pinned ref before enabling it`,
|
|
1049
|
+
severity: "warn"
|
|
1050
|
+
});
|
|
944
1051
|
}
|
|
945
1052
|
} else {
|
|
946
1053
|
const composeIssue = validateComposeImageLiteral(image, `compose image on line ${index + 1}`, strictDigest);
|
|
@@ -1029,10 +1136,9 @@ function assertProductionDeployGate(plan, envRaw, composeRaw, options = {}) {
|
|
|
1029
1136
|
const issues = collectProductionDeployGateIssues(plan, envRaw, composeRaw, { strictDigest: options.strictDigest });
|
|
1030
1137
|
const warnings = issues.filter((i) => i.severity === "warn");
|
|
1031
1138
|
const errors = issues.filter((i) => i.severity !== "warn");
|
|
1139
|
+
if (isUnpinnedImageBreakGlassEnabled()) console.warn(unpinnedImageBreakGlassBanner());
|
|
1032
1140
|
for (const w of warnings) {
|
|
1033
|
-
console.warn(
|
|
1034
|
-
`[stack-update] \u26A0\uFE0F digest policy: [${w.kind}] ${w.message}. Set EXE_STACK_STRICT_DIGEST=1 (or --strict-digest) to make this a hard failure once the manifest is digest-pinned.`
|
|
1035
|
-
);
|
|
1141
|
+
console.warn(`[stack-update] \u26A0\uFE0F digest policy: [${w.kind}] ${w.message}.`);
|
|
1036
1142
|
}
|
|
1037
1143
|
if (errors.length === 0) return;
|
|
1038
1144
|
if (options.breakGlassReason?.trim()) {
|
|
@@ -1284,6 +1390,52 @@ ${details}
|
|
|
1284
1390
|
The registry is serving code that does not match the signed manifest's recorded commit. Break-glass override requires --break-glass <reason>.`
|
|
1285
1391
|
);
|
|
1286
1392
|
}
|
|
1393
|
+
function collectImageVersionLabelIssues(plan, readLabel = defaultImageLabelReader) {
|
|
1394
|
+
const issues = [];
|
|
1395
|
+
const checked = /* @__PURE__ */ new Set();
|
|
1396
|
+
for (const [serviceName, service] of Object.entries(plan.release.services)) {
|
|
1397
|
+
const pinned = service.image;
|
|
1398
|
+
if (!isFirstPartyImage(pinned)) continue;
|
|
1399
|
+
if (checked.has(pinned)) continue;
|
|
1400
|
+
checked.add(pinned);
|
|
1401
|
+
const readRef = imagePullRef(pinned);
|
|
1402
|
+
issues.push(
|
|
1403
|
+
...checkImageVersionLabels({
|
|
1404
|
+
service: serviceName,
|
|
1405
|
+
image: pinned,
|
|
1406
|
+
versionLabel: readLabel(readRef, VERSION_LABEL),
|
|
1407
|
+
revisionLabel: readLabel(readRef, REVISION_LABEL)
|
|
1408
|
+
})
|
|
1409
|
+
);
|
|
1410
|
+
}
|
|
1411
|
+
return issues;
|
|
1412
|
+
}
|
|
1413
|
+
function assertImageVersionLabels(plan, options = {}) {
|
|
1414
|
+
const issues = collectImageVersionLabelIssues(plan, options.readLabel ?? defaultImageLabelReader);
|
|
1415
|
+
if (issues.length === 0) return;
|
|
1416
|
+
for (const issue of issues) {
|
|
1417
|
+
console.warn(`[stack-update] \u26A0\uFE0F version-label (G4b): ${issue.message}`);
|
|
1418
|
+
}
|
|
1419
|
+
const enforce = options.strictVersionLabel ?? process.env.EXE_STACK_ENFORCE_VERSION_LABEL === "1";
|
|
1420
|
+
if (options.breakGlassReason?.trim()) {
|
|
1421
|
+
console.warn(
|
|
1422
|
+
`[stack-update] BREAK-GLASS: proceeding despite ${issues.length} image version-label issue(s). Reason: ${options.breakGlassReason.trim()}`
|
|
1423
|
+
);
|
|
1424
|
+
return;
|
|
1425
|
+
}
|
|
1426
|
+
if (!enforce) {
|
|
1427
|
+
console.warn(
|
|
1428
|
+
`[stack-update] \u26A0\uFE0F image version-label check is WARN-first \u2014 ${issues.length} issue(s) logged but NOT blocking the deploy. Set EXE_STACK_ENFORCE_VERSION_LABEL=1 (or --strict-version-label) once every first-party image is stamped to fail closed.`
|
|
1429
|
+
);
|
|
1430
|
+
return;
|
|
1431
|
+
}
|
|
1432
|
+
const details = issues.map((i) => ` - ${i.message}`).join("\n");
|
|
1433
|
+
throw new Error(
|
|
1434
|
+
`Deploy-time image version-label check failed (G4b, fail-closed) \u2014 aborting before any container swap.
|
|
1435
|
+
${details}
|
|
1436
|
+
A first-party image whose version label does not match its tag cannot be traced to a release. Break-glass override requires --break-glass <reason>.`
|
|
1437
|
+
);
|
|
1438
|
+
}
|
|
1287
1439
|
var PROBE_TIMEOUT_MS = 1e4;
|
|
1288
1440
|
function commandSucceeds(cmd, args = []) {
|
|
1289
1441
|
const res = spawnSync2(cmd, args, {
|
|
@@ -1615,7 +1767,7 @@ function bootstrapStackHost(options) {
|
|
|
1615
1767
|
createdFiles
|
|
1616
1768
|
);
|
|
1617
1769
|
ensureOverlayDir(path.join(path.dirname(options.composeFile), "overlay"), actions);
|
|
1618
|
-
for (const helper of ["gateway-watchdog.sh", "add-routes.sh"]) {
|
|
1770
|
+
for (const helper of ["gateway-watchdog.sh", "add-routes.sh", "wiki-schema-guard.sh"]) {
|
|
1619
1771
|
const dest = path.join(path.dirname(options.composeFile), helper);
|
|
1620
1772
|
copyTemplate(`deploy/compose/${helper}`, dest, createdFiles, { overwrite: true });
|
|
1621
1773
|
try {
|
|
@@ -2049,7 +2201,15 @@ async function runStackUpdate(options) {
|
|
|
2049
2201
|
}
|
|
2050
2202
|
}
|
|
2051
2203
|
}
|
|
2052
|
-
const
|
|
2204
|
+
const manifestLoad = await loadStackManifestWithFallback(
|
|
2205
|
+
options.manifestRef,
|
|
2206
|
+
options.manifestFallbackRef,
|
|
2207
|
+
options.fetchText,
|
|
2208
|
+
options.manifestPublicKey,
|
|
2209
|
+
options.manifestAuthToken
|
|
2210
|
+
);
|
|
2211
|
+
reportStackManifestSource(manifestLoad);
|
|
2212
|
+
const manifest = manifestLoad.manifest;
|
|
2053
2213
|
if (options.addService || options.removeService) {
|
|
2054
2214
|
const effectiveVersion = options.targetVersion ?? manifest.latest;
|
|
2055
2215
|
const manifestRelease = manifest.stacks[effectiveVersion];
|
|
@@ -2060,7 +2220,11 @@ async function runStackUpdate(options) {
|
|
|
2060
2220
|
if (!manifestRelease.services[options.addService]) {
|
|
2061
2221
|
throw new Error(`Service "${options.addService}" not found in manifest ${effectiveVersion}. Available: ${Object.keys(manifestRelease.services).join(", ")}`);
|
|
2062
2222
|
}
|
|
2063
|
-
currentServices.
|
|
2223
|
+
currentServices.clear();
|
|
2224
|
+
for (const name of computeServiceSelectionMerge(
|
|
2225
|
+
currentSelection?.selectedServices ?? buildDefaultServiceSelection(manifestRelease),
|
|
2226
|
+
[options.addService]
|
|
2227
|
+
).selectedServices) currentServices.add(name);
|
|
2064
2228
|
console.log(`[stack-update] Added service: ${options.addService}`);
|
|
2065
2229
|
}
|
|
2066
2230
|
if (options.removeService) {
|
|
@@ -2072,11 +2236,13 @@ async function runStackUpdate(options) {
|
|
|
2072
2236
|
saveServiceSelection(options.envFile, [...currentServices]);
|
|
2073
2237
|
console.log(`[stack-update] Saved service selection: ${[...currentServices].join(", ")}`);
|
|
2074
2238
|
}
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2239
|
+
const isRunScoped = Boolean(options.services && options.services.length > 0);
|
|
2240
|
+
const serviceSelection = isRunScoped ? runScopedServiceSelection(options.services, now) : loadServiceSelection(options.envFile);
|
|
2241
|
+
if (isRunScoped) {
|
|
2242
|
+
console.log(
|
|
2243
|
+
`[stack-update] Service scope for THIS RUN ONLY: ${options.services.join(", ")} (the managed set in ${serviceSelectionPath(options.envFile)} is unchanged)`
|
|
2244
|
+
);
|
|
2078
2245
|
}
|
|
2079
|
-
const serviceSelection = loadServiceSelection(options.envFile);
|
|
2080
2246
|
const envRaw = readFileSync(options.envFile, "utf8");
|
|
2081
2247
|
const lockFile = options.lockFile ?? path.join(path.dirname(options.envFile), ".exe-stack-lock.json");
|
|
2082
2248
|
const resumeLock = options.resume ? readStackUpdateLock(lockFile) : void 0;
|
|
@@ -2088,6 +2254,14 @@ async function runStackUpdate(options) {
|
|
|
2088
2254
|
const composeRaw = readFileSync(options.composeFile, "utf8");
|
|
2089
2255
|
const stagedCompose = readStagedComposeTemplate(options, composeRaw);
|
|
2090
2256
|
const plan = createStackUpdatePlan(manifest, envRaw, effectiveTargetVersion, scopedServiceNames, serviceSelection, composeRaw);
|
|
2257
|
+
const targetRelease = manifest.stacks[plan.targetVersion];
|
|
2258
|
+
if (targetRelease) {
|
|
2259
|
+
warnUnmanagedManifestServices(targetRelease, serviceSelection, {
|
|
2260
|
+
targetVersion: plan.targetVersion,
|
|
2261
|
+
envFile: options.envFile,
|
|
2262
|
+
scope: isRunScoped ? "run" : "persisted"
|
|
2263
|
+
});
|
|
2264
|
+
}
|
|
2091
2265
|
const fullTargetPlan = scopedServiceNames.length > 0 ? createStackUpdatePlan(manifest, envRaw, effectiveTargetVersion, void 0, serviceSelection, composeRaw) : plan;
|
|
2092
2266
|
assertRolloutStageAllowed(plan, {
|
|
2093
2267
|
explicitTarget: Boolean(effectiveTargetVersion),
|
|
@@ -2142,6 +2316,9 @@ ${lines.join("\n")}`
|
|
|
2142
2316
|
console.log("[stack-update] Deploy-time image-provenance check (G4) started");
|
|
2143
2317
|
assertImageProvenance(plan, options);
|
|
2144
2318
|
console.log("[stack-update] \u2713 Deploy-time image-provenance check (G4) passed");
|
|
2319
|
+
console.log("[stack-update] Deploy-time image version-label check (G4b) started");
|
|
2320
|
+
assertImageVersionLabels(plan, options);
|
|
2321
|
+
console.log("[stack-update] \u2713 Deploy-time image version-label check (G4b) passed");
|
|
2145
2322
|
}
|
|
2146
2323
|
await postDeployAudit(options, "started", plan.targetVersion, previousVersion);
|
|
2147
2324
|
try {
|
|
@@ -2483,6 +2660,18 @@ Push the missing image(s) to the registry, or re-run with --break-glass <reason>
|
|
|
2483
2660
|
});
|
|
2484
2661
|
if (psResult.status !== 0) continue;
|
|
2485
2662
|
progress.logServiceStep(restartIndex, service, "Restarting");
|
|
2663
|
+
if (service === "exe-wiki") {
|
|
2664
|
+
const guard = spawnSync2(
|
|
2665
|
+
"docker",
|
|
2666
|
+
[...composeArgs, "run", "--rm", "--no-deps", "exe-wiki-schema-guard"],
|
|
2667
|
+
{ encoding: "utf8", stdio: ["pipe", "inherit", "inherit"], timeout: 12e4 }
|
|
2668
|
+
);
|
|
2669
|
+
if (guard.status !== null && guard.status !== 0) {
|
|
2670
|
+
throw new Error(
|
|
2671
|
+
"exe-wiki schema guard refused the restart (bug 2a8d3003): the wiki would start against a schema holding no account and no documents, and come up looking wiped. Its output above names the schema your data is actually in. Fix WIKI_DB_SCHEMA in the stack .env (or the compose override) and re-run. Do NOT restore from backup \u2014 the rows are still there."
|
|
2672
|
+
);
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2486
2675
|
exec("docker", [...composeArgs, "up", "-d", "--remove-orphans", "--no-deps", service]);
|
|
2487
2676
|
restartedAnyService = true;
|
|
2488
2677
|
updateServiceStatus(lockFile, manifestServiceName, "restarted", now);
|
|
@@ -2973,7 +3162,10 @@ function defaultStackPaths() {
|
|
|
2973
3162
|
const cwdCompose = path.resolve("docker-compose.yml");
|
|
2974
3163
|
const cwdEnv = path.resolve(".env");
|
|
2975
3164
|
const packagedManifest = path.join(resolvePackageRoot(), "deploy", "stack-manifests", "v0.9.json");
|
|
2976
|
-
const
|
|
3165
|
+
const manifestOverride = process.env.EXE_STACK_MANIFEST;
|
|
3166
|
+
const liveManifest = process.env.EXE_STACK_MANIFEST_URL || "https://update.askexe.com/v1/stack-manifest.json";
|
|
3167
|
+
const manifestRef = manifestOverride || liveManifest;
|
|
3168
|
+
const manifestFallbackRef = manifestOverride || !existsSync(packagedManifest) ? void 0 : packagedManifest;
|
|
2977
3169
|
const licenseKey = process.env.EXE_LICENSE_KEY || loadLicense() || process.env.EXE_STACK_UPDATE_TOKEN || void 0;
|
|
2978
3170
|
const isRemoteManifest = /^https?:\/\//.test(manifestRef);
|
|
2979
3171
|
const hasLicenseForRemote = !!licenseKey;
|
|
@@ -2982,6 +3174,7 @@ function defaultStackPaths() {
|
|
|
2982
3174
|
composeFile: process.env.EXE_STACK_COMPOSE_FILE || (existsSync(cwdCompose) ? cwdCompose : "/opt/exe-stack/docker-compose.yml"),
|
|
2983
3175
|
envFile: process.env.EXE_STACK_ENV_FILE || (existsSync(cwdEnv) ? cwdEnv : "/opt/exe-stack/.env"),
|
|
2984
3176
|
manifestRef,
|
|
3177
|
+
manifestFallbackRef,
|
|
2985
3178
|
auditUrl: process.env.EXE_STACK_AUDIT_URL || (isRemoteManifest || hasLicenseForRemote ? `${apiBaseUrl}/v1/deploy-audits` : void 0),
|
|
2986
3179
|
imageCredentialsUrl: process.env.EXE_STACK_IMAGE_CREDENTIALS_URL || (isRemoteManifest || hasLicenseForRemote ? `${apiBaseUrl}/v1/image-credentials` : void 0),
|
|
2987
3180
|
// License key IS the auth token for update.askexe.com — no separate update token needed.
|
|
@@ -3166,12 +3359,27 @@ function printVolumeCleanupResult(result) {
|
|
|
3166
3359
|
}
|
|
3167
3360
|
}
|
|
3168
3361
|
}
|
|
3169
|
-
|
|
3362
|
+
var BUILTIN_STACK_MANIFEST_KEY_ID = "exe-stack-1";
|
|
3363
|
+
function builtinStackManifestPublicKeyPath() {
|
|
3364
|
+
return path.join(resolvePackageRoot(), "deploy", "stack-manifests", "signing-key.pub");
|
|
3365
|
+
}
|
|
3366
|
+
function builtinStackManifestPublicKey() {
|
|
3367
|
+
const keyPath = builtinStackManifestPublicKeyPath();
|
|
3368
|
+
if (!existsSync(keyPath)) return void 0;
|
|
3369
|
+
const pem = readFileSync(keyPath, "utf8").trim();
|
|
3370
|
+
return pem ? `${pem}
|
|
3371
|
+
` : void 0;
|
|
3372
|
+
}
|
|
3373
|
+
function resolveStackManifestPublicKey() {
|
|
3170
3374
|
if (process.env.EXE_STACK_PUBLIC_KEY) return process.env.EXE_STACK_PUBLIC_KEY;
|
|
3171
|
-
if (process.env.EXE_STACK_PUBLIC_KEY_FILE
|
|
3375
|
+
if (process.env.EXE_STACK_PUBLIC_KEY_FILE) {
|
|
3376
|
+
if (!existsSync(process.env.EXE_STACK_PUBLIC_KEY_FILE)) return void 0;
|
|
3172
3377
|
return readFileSync(process.env.EXE_STACK_PUBLIC_KEY_FILE, "utf8");
|
|
3173
3378
|
}
|
|
3174
|
-
return
|
|
3379
|
+
return builtinStackManifestPublicKey();
|
|
3380
|
+
}
|
|
3381
|
+
function loadDefaultPublicKey() {
|
|
3382
|
+
return resolveStackManifestPublicKey();
|
|
3175
3383
|
}
|
|
3176
3384
|
|
|
3177
3385
|
export {
|
|
@@ -3179,6 +3387,11 @@ export {
|
|
|
3179
3387
|
serviceSelectionPath,
|
|
3180
3388
|
loadServiceSelection,
|
|
3181
3389
|
saveServiceSelection,
|
|
3390
|
+
mergeServiceSelection,
|
|
3391
|
+
computeServiceSelectionMerge,
|
|
3392
|
+
runScopedServiceSelection,
|
|
3393
|
+
unmanagedManifestServices,
|
|
3394
|
+
warnUnmanagedManifestServices,
|
|
3182
3395
|
parseComposeDependsOn,
|
|
3183
3396
|
parseComposeServiceNames,
|
|
3184
3397
|
isUsableTunnelToken,
|
|
@@ -3199,6 +3412,8 @@ export {
|
|
|
3199
3412
|
composeArgsForStack,
|
|
3200
3413
|
parseStackManifest,
|
|
3201
3414
|
loadStackManifest,
|
|
3415
|
+
loadStackManifestWithFallback,
|
|
3416
|
+
reportStackManifestSource,
|
|
3202
3417
|
parseEnv,
|
|
3203
3418
|
patchEnv,
|
|
3204
3419
|
resolveServerImageOverride,
|
|
@@ -3206,7 +3421,9 @@ export {
|
|
|
3206
3421
|
parseRequiredEnvRefs,
|
|
3207
3422
|
detectMissingRequiredEnvVars,
|
|
3208
3423
|
createStackUpdatePlan,
|
|
3424
|
+
isUnpinnedImageBreakGlassEnabled,
|
|
3209
3425
|
isStrictDigestEnabled,
|
|
3426
|
+
unpinnedImageBreakGlassBanner,
|
|
3210
3427
|
isThirdPartyImage,
|
|
3211
3428
|
stripImageDigest,
|
|
3212
3429
|
imagePullRef,
|
|
@@ -3219,6 +3436,8 @@ export {
|
|
|
3219
3436
|
verifyManifestImagesAvailable,
|
|
3220
3437
|
collectImageProvenanceIssues,
|
|
3221
3438
|
assertImageProvenance,
|
|
3439
|
+
collectImageVersionLabelIssues,
|
|
3440
|
+
assertImageVersionLabels,
|
|
3222
3441
|
applyGatewayOverlays,
|
|
3223
3442
|
backupStackConfig,
|
|
3224
3443
|
pairMonitorAgent,
|
|
@@ -3240,5 +3459,9 @@ export {
|
|
|
3240
3459
|
detectDanglingVolumes,
|
|
3241
3460
|
removeDanglingVolumes,
|
|
3242
3461
|
printDanglingVolumes,
|
|
3243
|
-
printVolumeCleanupResult
|
|
3462
|
+
printVolumeCleanupResult,
|
|
3463
|
+
BUILTIN_STACK_MANIFEST_KEY_ID,
|
|
3464
|
+
builtinStackManifestPublicKeyPath,
|
|
3465
|
+
builtinStackManifestPublicKey,
|
|
3466
|
+
resolveStackManifestPublicKey
|
|
3244
3467
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
enqueueMemory
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CDUB5Q6J.js";
|
|
4
4
|
import {
|
|
5
5
|
isClientConnected,
|
|
6
6
|
sendDaemonRequest
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BNHAZ65R.js";
|
|
8
8
|
|
|
9
9
|
// src/lib/memory-queue-client.ts
|
|
10
10
|
async function writeMemoryViaDaemon(entry) {
|
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./chunk-
|
|
2
|
+
import "./chunk-M7EES2KM.js";
|
|
3
3
|
import {
|
|
4
4
|
isGarbageEntity
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EWZYFG5Q.js";
|
|
6
6
|
import "./chunk-GUMRIUI5.js";
|
|
7
7
|
import "./chunk-Z6BZQHP5.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-VGMACSEV.js";
|
|
9
|
+
import "./chunk-QYECRPGD.js";
|
|
9
10
|
import "./chunk-CHCA3ZM2.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-7DMCAGSC.js";
|
|
11
12
|
import {
|
|
12
13
|
fastDbInit
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-LKYGSJ2E.js";
|
|
14
15
|
import "./chunk-5MOYSU5A.js";
|
|
15
16
|
import "./chunk-4QCFFW2H.js";
|
|
16
17
|
import "./chunk-76CJBM36.js";
|
|
17
18
|
import {
|
|
18
19
|
getClient
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-BRLS5OLZ.js";
|
|
20
21
|
import "./chunk-TKDITWDN.js";
|
|
21
22
|
import "./chunk-BBMTVAE3.js";
|
|
22
23
|
import "./chunk-5YEUPUV4.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-NO3M2AFM.js";
|
|
24
25
|
import "./chunk-YYB5PMTK.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-NJFJWQNN.js";
|
|
26
27
|
import "./chunk-V3W3SATA.js";
|
|
27
28
|
import "./chunk-JY5GAZYC.js";
|
|
28
29
|
import "./chunk-FXU7JOXK.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-QMSEL5YS.js";
|
|
30
31
|
import "./chunk-HSGBZSCA.js";
|
|
31
32
|
import {
|
|
32
33
|
isMainModule
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import "./chunk-MLKGABMK.js";
|
|
2
|
+
|
|
3
|
+
// src/bin/cloud-sync-command.ts
|
|
4
|
+
async function disposeCloudSyncCommandResources(disposeStore, disconnectClient) {
|
|
5
|
+
try {
|
|
6
|
+
await disposeStore();
|
|
7
|
+
} catch {
|
|
8
|
+
}
|
|
9
|
+
try {
|
|
10
|
+
disconnectClient();
|
|
11
|
+
} catch {
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
async function runCloudSyncCli() {
|
|
15
|
+
const { loadConfig } = await import("./lib/config.js");
|
|
16
|
+
const config = await loadConfig();
|
|
17
|
+
if (!config.cloud?.apiKey) {
|
|
18
|
+
console.error("Cloud sync is not configured. Run \x1B[36mexe-os cloud\x1B[0m to set up.");
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
const { disposeStore } = await import("./lib/store.js");
|
|
22
|
+
const { cloudSync } = await import("./lib/cloud-sync.js");
|
|
23
|
+
const { getMasterKey } = await import("./lib/keychain.js");
|
|
24
|
+
const { initSyncCrypto } = await import("./lib/crypto.js");
|
|
25
|
+
const { assertCloudSyncReachable, withTimeout } = await import("./bin/exe-cloud.js");
|
|
26
|
+
const { runCloudSyncShutdown } = await import("./cloud-sync-shutdown-2D3B73CJ.js");
|
|
27
|
+
const { disconnectClient } = await import("./lib/exe-daemon-client.js");
|
|
28
|
+
let shuttingDown = false;
|
|
29
|
+
const handleShutdown = (signal) => {
|
|
30
|
+
if (shuttingDown) return;
|
|
31
|
+
shuttingDown = true;
|
|
32
|
+
void runCloudSyncShutdown(signal, { disposeStore, disconnectClient }).finally(() => process.exit(143));
|
|
33
|
+
};
|
|
34
|
+
process.on("SIGTERM", handleShutdown);
|
|
35
|
+
process.on("SIGINT", handleShutdown);
|
|
36
|
+
let exitCode = null;
|
|
37
|
+
try {
|
|
38
|
+
try {
|
|
39
|
+
await assertCloudSyncReachable(config.cloud.endpoint);
|
|
40
|
+
} catch (err) {
|
|
41
|
+
console.error(`Cloud sync aborted: ${err instanceof Error ? err.message : String(err)}`);
|
|
42
|
+
exitCode = 1;
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
const { isPostgresBackendEnabled } = await import("./db-backend-ODVJ3Q3D.js");
|
|
47
|
+
if (isPostgresBackendEnabled()) {
|
|
48
|
+
const { initPostgresOnlyDatabase } = await import("./lib/database.js");
|
|
49
|
+
await initPostgresOnlyDatabase();
|
|
50
|
+
} else {
|
|
51
|
+
const { initCloudSyncDatabase } = await import("./cloud-sync-db-init-V7IB23W5.js");
|
|
52
|
+
await initCloudSyncDatabase();
|
|
53
|
+
}
|
|
54
|
+
const masterKey = await getMasterKey();
|
|
55
|
+
if (masterKey) {
|
|
56
|
+
initSyncCrypto(masterKey);
|
|
57
|
+
} else {
|
|
58
|
+
console.error("No encryption key found. Run \x1B[36mexe-os setup\x1B[0m first.");
|
|
59
|
+
exitCode = 1;
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
console.log("Syncing with Exe Cloud now... (Normally this runs automatically in the background.)");
|
|
63
|
+
const syncTimeoutMs = Number(process.env.EXE_CLOUD_SYNC_TIMEOUT_MS ?? 6e5);
|
|
64
|
+
const result = await withTimeout(cloudSync(config.cloud), syncTimeoutMs, "Cloud sync");
|
|
65
|
+
console.log("");
|
|
66
|
+
console.log(` Active memories: ${result.totalMemories} (\u2191 ${result.pushed} syncable rows pushed, \u2193 ${result.pulled} pulled)`);
|
|
67
|
+
console.log(` Behaviors: ${result.behaviors.pushed} total (\u2193 ${result.behaviors.pulled} pulled)`);
|
|
68
|
+
console.log(` Roster: ${result.roster.employees} employees, ${result.roster.identities} identities`);
|
|
69
|
+
console.log(` Tasks: ${result.tasks.pushed} total (\u2193 ${result.tasks.pulled} pulled)`);
|
|
70
|
+
console.log(` Conversations: ${result.conversations.pushed} total (\u2193 ${result.conversations.pulled} pulled)`);
|
|
71
|
+
console.log(` Documents: ${result.documents.pushed} total (\u2193 ${result.documents.pulled} pulled)`);
|
|
72
|
+
console.log(` GraphRAG: ${result.graphrag.pushed} entities`);
|
|
73
|
+
const elapsedDisplay = result.elapsedMs != null ? `${(result.elapsedMs / 1e3).toFixed(1)}s` : "n/a";
|
|
74
|
+
console.log(`
|
|
75
|
+
\x1B[32mSync complete.\x1B[0m (${elapsedDisplay})`);
|
|
76
|
+
} catch (err) {
|
|
77
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
78
|
+
if (message.includes("Cloud sync is blocked because this device rotated")) {
|
|
79
|
+
console.error("\nCloud sync is blocked for safety.");
|
|
80
|
+
console.error("This device changed its memory encryption key, so Exe Cloud must be re-uploaded with the new key first.");
|
|
81
|
+
console.error("Run: exe-os cloud reupload");
|
|
82
|
+
} else {
|
|
83
|
+
console.error(`Sync failed: ${message}`);
|
|
84
|
+
}
|
|
85
|
+
exitCode = 1;
|
|
86
|
+
}
|
|
87
|
+
} finally {
|
|
88
|
+
await disposeCloudSyncCommandResources(disposeStore, disconnectClient);
|
|
89
|
+
process.off("SIGTERM", handleShutdown);
|
|
90
|
+
process.off("SIGINT", handleShutdown);
|
|
91
|
+
if (exitCode !== null) process.exit(exitCode);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
export {
|
|
95
|
+
runCloudSyncCli
|
|
96
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fastDbInit,
|
|
3
|
+
isNoopFastDbClient
|
|
4
|
+
} from "./chunk-LKYGSJ2E.js";
|
|
5
|
+
import "./chunk-MLKGABMK.js";
|
|
6
|
+
|
|
7
|
+
// src/lib/cloud-sync-db-init.ts
|
|
8
|
+
var DEFAULT_CLOUD_SYNC_DAEMON_PROBE_TIMEOUT_MS = 1e4;
|
|
9
|
+
var DEFAULT_CLOUD_SYNC_DAEMON_INIT_BUDGET_MS = 25e3;
|
|
10
|
+
function positiveEnvMs(name, fallback) {
|
|
11
|
+
const raw = Number(process.env[name]);
|
|
12
|
+
return Number.isFinite(raw) && raw > 0 ? raw : fallback;
|
|
13
|
+
}
|
|
14
|
+
async function initCloudSyncDatabase(options = {}) {
|
|
15
|
+
const background = options.background ?? process.env.EXE_BACKGROUND_CLOUD_SYNC === "1";
|
|
16
|
+
const daemonProbeTimeoutMs = positiveEnvMs(
|
|
17
|
+
"EXE_CLOUD_SYNC_DAEMON_PROBE_TIMEOUT_MS",
|
|
18
|
+
DEFAULT_CLOUD_SYNC_DAEMON_PROBE_TIMEOUT_MS
|
|
19
|
+
);
|
|
20
|
+
const daemonFastPathBudgetMs = positiveEnvMs(
|
|
21
|
+
"EXE_CLOUD_SYNC_DAEMON_INIT_BUDGET_MS",
|
|
22
|
+
DEFAULT_CLOUD_SYNC_DAEMON_INIT_BUDGET_MS
|
|
23
|
+
);
|
|
24
|
+
let client;
|
|
25
|
+
try {
|
|
26
|
+
client = await fastDbInit({
|
|
27
|
+
caller: "cli",
|
|
28
|
+
socketOnly: background,
|
|
29
|
+
daemonProbeTimeoutMs,
|
|
30
|
+
daemonFastPathBudgetMs
|
|
31
|
+
});
|
|
32
|
+
} catch (err) {
|
|
33
|
+
throw new Error(
|
|
34
|
+
`[cloud-sync] Unable to initialize DB through the daemon socket within ${Math.round(daemonFastPathBudgetMs / 1e3)}s; refusing direct SQLite access from the background sync path to preserve the single-writer invariant. Retry on the next sync cycle. Cause: ${err instanceof Error ? err.message : String(err)}`
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
if (isNoopFastDbClient(client)) {
|
|
38
|
+
throw new Error(
|
|
39
|
+
"[cloud-sync] DB initialization returned a no-op fastDbInit client. Cloud sync refuses no-op DB access because reads would be empty and writes would be dropped; retry on the next sync cycle after the daemon socket responds."
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
return client;
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
initCloudSyncDatabase
|
|
46
|
+
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
releaseDbLock
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BRLS5OLZ.js";
|
|
4
4
|
import "./chunk-TKDITWDN.js";
|
|
5
5
|
import "./chunk-BBMTVAE3.js";
|
|
6
6
|
import "./chunk-5YEUPUV4.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-NO3M2AFM.js";
|
|
8
8
|
import "./chunk-YYB5PMTK.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-NJFJWQNN.js";
|
|
10
10
|
import "./chunk-V3W3SATA.js";
|
|
11
11
|
import "./chunk-JY5GAZYC.js";
|
|
12
12
|
import "./chunk-FXU7JOXK.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-QMSEL5YS.js";
|
|
14
14
|
import "./chunk-HSGBZSCA.js";
|
|
15
15
|
import "./chunk-JKKZGDLP.js";
|
|
16
16
|
import "./chunk-MLKGABMK.js";
|
|
@@ -40,6 +40,12 @@ async function runCloudSyncShutdown(reason, options = {}) {
|
|
|
40
40
|
stderr.write(`cloud sync shutdown dispose failed: ${err instanceof Error ? err.message : String(err)}
|
|
41
41
|
`);
|
|
42
42
|
} finally {
|
|
43
|
+
try {
|
|
44
|
+
options.disconnectClient?.();
|
|
45
|
+
} catch (err) {
|
|
46
|
+
stderr.write(`cloud sync shutdown daemon disconnect failed: ${err instanceof Error ? err.message : String(err)}
|
|
47
|
+
`);
|
|
48
|
+
}
|
|
43
49
|
releaseDbLock();
|
|
44
50
|
}
|
|
45
51
|
}
|