@askexenow/exe-os 0.9.384 → 0.9.389
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.askexe-control-plane.example +6 -0
- package/deploy/compose/.env.customer.example +1 -1
- package/deploy/compose/.env.example +1 -1
- package/deploy/compose/docker-compose.yml +16 -0
- package/deploy/compose/generate-env.ts +1 -1
- package/deploy/compose/sso-edge/sso-redirect.conf +18 -3
- package/deploy/stack-manifests/v0.9.json +1160 -1
- package/dist/.dist-verified.json +3 -3
- package/dist/{active-agent-F5V4E4UL.js → active-agent-RZ24KSJN.js} +8 -6
- package/dist/{active-agent-YTBB4ZQM.js → active-agent-YWSWPIEA.js} +8 -6
- package/dist/{agent-defs-generator-7TFISIJQ.js → agent-defs-generator-GY3UBREJ.js} +8 -6
- package/dist/{agent-heartbeat-CQPGJIFF.js → agent-heartbeat-GUVUUQVM.js} +1 -1
- package/dist/{agent-loop-EZ7LDAGD.js → agent-loop-HPNCH3HK.js} +1 -1
- package/dist/{agentic-ontology-XVTUVV7W.js → agentic-ontology-RHYNXEKE.js} +1 -1
- package/dist/{artifact-backup-TF6YWQT2.js → artifact-backup-HGUFSIJH.js} +19 -6
- package/dist/{backfill-metadata-J6MXIDCW.js → backfill-metadata-XLFASEOD.js} +11 -9
- package/dist/{backup-verify-6DVBQMDP.js → backup-verify-TUQEICWA.js} +1 -1
- package/dist/{behavior-injection-XDA7ZCYN.js → behavior-injection-GXO7ERGN.js} +14 -12
- package/dist/{behavior-promotion-4VLQ7LXK.js → behavior-promotion-V63WIZ4N.js} +13 -11
- package/dist/{behaviors-SCCZP7RZ.js → behaviors-RMLDPLOF.js} +18 -11
- package/dist/bin/agentic-ontology-backfill.js +12 -10
- package/dist/bin/agentic-reflection-backfill.js +13 -11
- package/dist/bin/agentic-semantic-label.js +12 -10
- package/dist/bin/backfill-conversations.js +11 -9
- package/dist/bin/backfill-responses.js +11 -9
- package/dist/bin/backfill-vectors.js +13 -11
- package/dist/bin/bulk-sync-postgres.js +20 -18
- package/dist/bin/cc-doctor.js +15 -13
- package/dist/bin/cleanup-stale-review-tasks.js +44 -32
- package/dist/bin/cli.js +109 -30
- package/dist/bin/customer-readiness.js +55 -25
- package/dist/bin/deferred-daemon-restart.js +111 -108
- package/dist/bin/exe-actions.js +7 -1
- package/dist/bin/exe-agent-config.js +8 -6
- package/dist/bin/exe-agent.js +18 -16
- package/dist/bin/exe-assign.js +13 -11
- package/dist/bin/exe-boot.js +49 -47
- package/dist/bin/exe-call.js +9 -7
- package/dist/bin/exe-cicd.js +19 -8
- package/dist/bin/exe-cloud.js +59 -25
- package/dist/bin/exe-config-dump.js +8 -6
- package/dist/bin/exe-dispatch.js +23 -21
- package/dist/bin/exe-doctor.js +11 -8
- package/dist/bin/exe-export-behaviors.js +16 -14
- package/dist/bin/exe-forget.js +14 -12
- package/dist/bin/exe-gateway.js +12 -10
- package/dist/bin/exe-grant.js +6 -6
- package/dist/bin/exe-healthcheck.js +15 -13
- package/dist/bin/exe-heartbeat.js +28 -26
- package/dist/bin/exe-kill.js +28 -26
- package/dist/bin/exe-launch-agent.js +35 -33
- package/dist/bin/exe-mcp.js +9 -7
- package/dist/bin/exe-memory-reads.js +11 -9
- package/dist/bin/exe-new-employee.js +13 -11
- package/dist/bin/exe-os-mcp-proxy.js +9 -7
- package/dist/bin/exe-pending-messages.js +23 -21
- package/dist/bin/exe-pending-notifications.js +22 -20
- package/dist/bin/exe-pending-reviews.js +23 -21
- package/dist/bin/exe-preflight.js +1 -1
- package/dist/bin/exe-rename.js +9 -7
- package/dist/bin/exe-review.js +59 -55
- package/dist/bin/exe-search-quality.js +16 -3
- package/dist/bin/exe-search.js +13 -11
- package/dist/bin/exe-session-cleanup.js +29 -27
- package/dist/bin/exe-settings.js +22 -20
- package/dist/bin/exe-start-codex.js +23 -21
- package/dist/bin/exe-start-opencode.js +21 -19
- package/dist/bin/exe-status.js +24 -22
- package/dist/bin/exe-support.js +3 -3
- package/dist/bin/exe-team.js +8 -6
- package/dist/bin/exe-verify-running-images.js +644 -17
- package/dist/bin/git-sweep.js +24 -22
- package/dist/bin/graph-backfill.js +12 -10
- package/dist/bin/graph-export.js +12 -10
- package/dist/bin/hooks-cli.js +4 -4
- package/dist/bin/import-history.js +16 -14
- package/dist/bin/install.js +113 -110
- package/dist/bin/intercom-check.js +5 -5
- package/dist/bin/mcp-sessions.js +2 -2
- package/dist/bin/orchestration-metrics.js +8 -6
- package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
- package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
- package/dist/bin/pre-build-guard.js +55 -16
- package/dist/bin/pre-publish.js +1 -1
- package/dist/bin/prune-orphan-chunks.js +154 -28
- package/dist/bin/reconcile-backlog.js +5 -3
- package/dist/bin/registry-proxy.js +1 -1
- package/dist/bin/repair-document-chunks.js +11 -9
- package/dist/bin/scan-tasks.js +23 -21
- package/dist/bin/setup.js +3 -3
- package/dist/bin/shard-migrate.js +12 -10
- package/dist/bin/stack-update.js +622 -43
- package/dist/bin/verify-stack.js +2 -2
- package/dist/bin/vps-health-gate.js +1 -1
- package/dist/{boot-generation-Q7LGQ3AO.js → boot-generation-VCQXVYGT.js} +7 -5
- package/dist/{boot-review-sections-G5774FR5.js → boot-review-sections-3QO6Q7MP.js} +21 -19
- package/dist/{branch-hygiene-44WLSOZR.js → branch-hygiene-DDXXI6ZA.js} +59 -21
- package/dist/bug-landed-reconciler-TQVNOUCU.js +353 -0
- package/dist/build-manifest.json +1269 -1194
- package/dist/{capability-cards-I3RHCF4F.js → capability-cards-XPDLT6LU.js} +6 -4
- package/dist/{capacity-monitor-7I7GDONU.js → capacity-monitor-N3AW242L.js} +23 -21
- package/dist/{catchup-brief-3T5PARIR.js → catchup-brief-3PKX7FUP.js} +29 -27
- package/dist/{chunk-C5ISP5FO.js → chunk-2BKJAOO4.js} +11 -1
- package/dist/{chunk-JJTPPAZY.js → chunk-2CUQHG6H.js} +1609 -1356
- package/dist/{chunk-HU3VD4MQ.js → chunk-2Q2GGYBX.js} +1 -1
- package/dist/{chunk-CHIUS5QB.js → chunk-36LMIOVU.js} +9 -9
- package/dist/{chunk-46VSBDUW.js → chunk-3DCBDG4T.js} +2 -2
- package/dist/{chunk-W3KPQE7H.js → chunk-3GL3E4TD.js} +3 -3
- package/dist/{chunk-GL47M7NY.js → chunk-3UD3OF3X.js} +202 -117
- package/dist/{chunk-WNBZJSQT.js → chunk-3VW5ZP2F.js} +1 -1
- package/dist/{chunk-JDDM6C57.js → chunk-3X74IQBU.js} +1 -1
- package/dist/{chunk-NVFNADTX.js → chunk-3ZL4MDQ6.js} +18 -4
- package/dist/{chunk-R5E7WNAC.js → chunk-4ESNDGMB.js} +3 -3
- package/dist/{chunk-CYCIX7AW.js → chunk-4FLLIQRQ.js} +2 -2
- package/dist/{chunk-3RGTLZNO.js → chunk-4GAKF7KR.js} +99 -74
- package/dist/{chunk-RVO5O5SR.js → chunk-4S3A52AV.js} +38 -10
- package/dist/{chunk-7J2ZQ4XN.js → chunk-4VQ3QR6B.js} +29 -28
- package/dist/{chunk-MROSARM5.js → chunk-5BJBTFFQ.js} +7 -1
- package/dist/chunk-5LQZABW5.js +6 -0
- package/dist/chunk-5ONMHTNI.js +236 -0
- package/dist/{chunk-APL7HUE3.js → chunk-5QQJUO3F.js} +200 -31
- package/dist/{chunk-UOPCVFVR.js → chunk-5RK75SWH.js} +205 -278
- package/dist/{chunk-T5FEAQES.js → chunk-5TYJYGS5.js} +1 -1
- package/dist/{chunk-P3QQ52QK.js → chunk-5U6EOTZV.js} +3 -3
- package/dist/{chunk-ALRHGEAJ.js → chunk-637FL62O.js} +1 -1
- package/dist/{chunk-PUBA5B4M.js → chunk-6L4VIYLZ.js} +33 -19
- package/dist/{chunk-VF2KRROX.js → chunk-754P2UXM.js} +1 -1
- package/dist/{chunk-CM7N5MBY.js → chunk-7FZG7WP4.js} +5 -5
- package/dist/{chunk-NYLJQ2M2.js → chunk-7NEBFB3L.js} +4 -4
- package/dist/{chunk-E7C2WNR5.js → chunk-AEIOFFFX.js} +5 -5
- package/dist/{chunk-VOVFUKEB.js → chunk-AIB2EWO2.js} +5 -5
- package/dist/{chunk-EGOEB42T.js → chunk-AP2C4OGS.js} +3 -3
- package/dist/{chunk-MPZ2AVNS.js → chunk-ATNV3BVZ.js} +1 -1
- package/dist/{chunk-F4BBMIPG.js → chunk-B4XJQBQB.js} +2 -2
- package/dist/{chunk-BPVFZ6Q4.js → chunk-B5EGDNG6.js} +2 -2
- package/dist/{chunk-AGC2V7JS.js → chunk-B6CBN6EF.js} +1 -1
- package/dist/{chunk-KTKIFXIP.js → chunk-B7FDRN7G.js} +1 -1
- package/dist/{chunk-C5HUMAA7.js → chunk-B7WVYLAQ.js} +67 -15
- package/dist/chunk-BGVP5RMT.js +185 -0
- package/dist/{chunk-FVLNNNH6.js → chunk-BNI4LIU5.js} +35 -4
- package/dist/{chunk-P4XLIPB7.js → chunk-BU5JRLZT.js} +1 -1
- package/dist/{chunk-PHUHIVD5.js → chunk-C6U7XWOC.js} +34 -5
- package/dist/chunk-C7GHNJPW.js +8 -0
- package/dist/{chunk-4AR5XKCH.js → chunk-CL2MU3OX.js} +1 -1
- package/dist/{chunk-ZPP63JSQ.js → chunk-CL3AB7Z2.js} +1 -1
- package/dist/{chunk-FHIFTSPL.js → chunk-CP7XUSOF.js} +8 -3
- package/dist/{chunk-3OX34OC3.js → chunk-CUDNRHHT.js} +30 -10
- package/dist/chunk-CYUUNIEL.js +21 -0
- package/dist/{chunk-P2UY34XE.js → chunk-D4C57S2H.js} +5 -5
- package/dist/{chunk-XSUALA32.js → chunk-DDYFNBYV.js} +3 -3
- package/dist/{chunk-LSNBTGW4.js → chunk-DPYZW42H.js} +1 -1
- package/dist/{chunk-FMIYFHLE.js → chunk-E2PRXEZK.js} +9 -3
- package/dist/{chunk-L63V25HS.js → chunk-E54SPUYJ.js} +3 -3
- package/dist/{chunk-DMUOTCDN.js → chunk-E5CKRHIZ.js} +1 -1
- package/dist/{chunk-BV2IET6B.js → chunk-EVMOKRBC.js} +15 -2
- package/dist/{chunk-YLFCH3VA.js → chunk-FDWI3T6I.js} +133 -31
- package/dist/{chunk-PWC3C5ME.js → chunk-FNJTCJGY.js} +4 -4
- package/dist/{chunk-TNS63ATU.js → chunk-FWRPDSO3.js} +350 -50
- package/dist/{chunk-JA3Y5TV6.js → chunk-GDLB6BPM.js} +141 -74
- package/dist/{chunk-IGJMS7C5.js → chunk-GOVGG7HU.js} +2 -2
- package/dist/{chunk-MB47DRF5.js → chunk-GP7CTIUK.js} +2 -2
- package/dist/{chunk-L5EPGGDP.js → chunk-GWAN2BDB.js} +4 -4
- package/dist/{chunk-YRQ26MNP.js → chunk-H3YF7X4J.js} +12 -5
- package/dist/{chunk-VLBHZ6TF.js → chunk-H6PLIFUE.js} +2 -2
- package/dist/{chunk-GSLFH4AI.js → chunk-HRNM3N4Y.js} +6 -15
- package/dist/chunk-IG2ISRTF.js +48 -0
- package/dist/{chunk-MWEIBVBS.js → chunk-IJCWBYA5.js} +14 -1
- package/dist/{chunk-NKEFYE4R.js → chunk-IPTUKX3N.js} +1 -1
- package/dist/{chunk-RB3J2WYQ.js → chunk-IVE7H6KA.js} +1 -1
- package/dist/{chunk-HA63SH5W.js → chunk-IWY2OGQG.js} +1 -1
- package/dist/{chunk-BQEZPRUC.js → chunk-IZWMWJZT.js} +64 -46
- package/dist/{chunk-AHESD3KW.js → chunk-J4UVI652.js} +1 -1
- package/dist/{chunk-PLII76NJ.js → chunk-JBUCA4OX.js} +33 -6
- package/dist/{chunk-2PZTMSMG.js → chunk-JOF4HQDF.js} +5 -5
- package/dist/{chunk-OBBO6EJR.js → chunk-JQN3QGSF.js} +1 -1
- package/dist/{chunk-P4PIZOL2.js → chunk-JWYIH5DR.js} +3 -3
- package/dist/{chunk-3XY57PKT.js → chunk-KZLKE7I3.js} +210 -48
- package/dist/{chunk-DYVLEMKS.js → chunk-L3GXMYBK.js} +1 -1
- package/dist/{chunk-72V3S44T.js → chunk-LUA4SLJY.js} +46 -19
- package/dist/{chunk-ZT4LFTUJ.js → chunk-LW3JCBXP.js} +20 -3
- package/dist/{chunk-YLB365YX.js → chunk-M5XHN4OM.js} +3 -3
- package/dist/{chunk-VHHX4UCP.js → chunk-MDTWARSF.js} +22 -93
- package/dist/{chunk-JFJP6ATJ.js → chunk-MWKXQSF6.js} +3 -2
- package/dist/{chunk-VJEJ7JNB.js → chunk-N32DVIKY.js} +1 -1
- package/dist/{chunk-MUCNYSJP.js → chunk-NRLJOV7M.js} +32 -4
- package/dist/{chunk-PL4CFSQ7.js → chunk-NSXJOSH7.js} +1 -1
- package/dist/{chunk-NF5FOSLD.js → chunk-NVTG66CK.js} +1 -1
- package/dist/chunk-O45GBJEH.js +1500 -0
- package/dist/{chunk-4AAMFWJT.js → chunk-OHZSTZXN.js} +4 -2
- package/dist/chunk-OSIS7ZQW.js +344 -0
- package/dist/{chunk-E3ZM32LF.js → chunk-P22VFGFK.js} +14 -5
- package/dist/{chunk-KILR4FBR.js → chunk-PAFLR7WD.js} +3 -3
- package/dist/{chunk-R3CZWFFC.js → chunk-PEYQ6MWO.js} +15 -3
- package/dist/{chunk-RDWIKDMY.js → chunk-PZR54BEI.js} +8 -20
- package/dist/{chunk-2FKU4ZEO.js → chunk-QDBKMEYY.js} +9 -9
- package/dist/{chunk-7UHZBVP3.js → chunk-QDVLVLXP.js} +97 -31
- package/dist/{chunk-PRDDPQLC.js → chunk-QLXEQRHD.js} +5 -5
- package/dist/{chunk-MUAWCFW6.js → chunk-QNPDXV5V.js} +5 -2
- package/dist/{chunk-LR5O2XWZ.js → chunk-QUZYLDNJ.js} +5 -5
- package/dist/chunk-RBQUXHYK.js +48 -0
- package/dist/{chunk-3SUPEE6H.js → chunk-RDMBSHGG.js} +3 -3
- package/dist/{chunk-I5XIW2BP.js → chunk-RGUM474V.js} +7 -7
- package/dist/{chunk-OAFENIHN.js → chunk-RJ67XAJU.js} +76 -28
- package/dist/{chunk-LFUBEHFW.js → chunk-RT57D7C4.js} +39 -1
- package/dist/{chunk-MKM6D7JM.js → chunk-RWG7DLOG.js} +42 -5
- package/dist/{chunk-P3UX5EH4.js → chunk-RWKAHHIX.js} +3 -3
- package/dist/{chunk-XEBKIWI7.js → chunk-RYNT3HB7.js} +12 -12
- package/dist/{chunk-EUGEFBGV.js → chunk-S2V272KJ.js} +3 -3
- package/dist/{chunk-W6BZ4UGA.js → chunk-SGYEM2PD.js} +1 -1
- package/dist/{chunk-VROK4X2L.js → chunk-SJP57MQM.js} +1 -1
- package/dist/{chunk-5MVKTNZP.js → chunk-SL4JWAMQ.js} +54 -4
- package/dist/{chunk-MOANZQXF.js → chunk-SLMKLEU6.js} +1 -1
- package/dist/{chunk-RZN2LEAK.js → chunk-SQA7XCYI.js} +3 -3
- package/dist/{chunk-4YNA3CM6.js → chunk-SSFS4NCH.js} +262 -56
- package/dist/{chunk-6FIC57PH.js → chunk-T4P2G3PO.js} +1 -1
- package/dist/{chunk-5U2IJBFV.js → chunk-TA3B4N24.js} +1 -1
- package/dist/{chunk-ZOTTYCP5.js → chunk-TEWWBVQP.js} +40 -4
- package/dist/{chunk-SDYWZRPN.js → chunk-TLSFGXXE.js} +1 -1
- package/dist/{chunk-L3VUW5M4.js → chunk-TQS2YHLB.js} +1 -1
- package/dist/{chunk-KXYKSLW4.js → chunk-TU4M757W.js} +399 -116
- package/dist/{chunk-MC4IM2CC.js → chunk-TYD4F4XU.js} +6 -6
- package/dist/{chunk-TKS5GMYA.js → chunk-U44Y7RC7.js} +2 -0
- package/dist/{chunk-B7AMNZTC.js → chunk-UKBPEEEQ.js} +2 -2
- package/dist/{chunk-ZBPZDADW.js → chunk-UWVXQEQQ.js} +467 -78
- package/dist/{chunk-P2VVMGMI.js → chunk-V4WH3FV7.js} +35 -16
- package/dist/{worktree-ownership-guard-O6JQF2CL.js → chunk-V6F4I2XY.js} +13 -14
- package/dist/{chunk-JFTUAV4J.js → chunk-VBKUESIW.js} +1 -1
- package/dist/{chunk-AZSTIAVL.js → chunk-VBPYYJPC.js} +1 -1
- package/dist/{chunk-LKTN22L6.js → chunk-VIP4LKLO.js} +57 -24
- package/dist/{chunk-L5CGXEZC.js → chunk-WAAGVFFN.js} +63 -71
- package/dist/{chunk-D3LXVAIQ.js → chunk-WC7AE3PT.js} +244 -103
- package/dist/{chunk-EOTZSAQL.js → chunk-WUCUDHKR.js} +1 -1
- package/dist/{chunk-VF3BZOZK.js → chunk-X7HZHKY4.js} +50 -3
- package/dist/{chunk-LFBLQE2P.js → chunk-XCAKYVKI.js} +1 -1
- package/dist/{chunk-UXN4BICC.js → chunk-XMX5J52Z.js} +1 -1
- package/dist/{chunk-6YDY6ZTD.js → chunk-XTCXGWTV.js} +9 -4
- package/dist/{chunk-XUZK23V7.js → chunk-XW2FW6LS.js} +2 -2
- package/dist/{chunk-CH7BUBP3.js → chunk-XWVHUDEK.js} +5 -4
- package/dist/{chunk-S26CV7BE.js → chunk-YA5LK6KB.js} +45 -8
- package/dist/{chunk-ELCRJGCH.js → chunk-YMRQIENV.js} +2 -2
- package/dist/{chunk-QNZ4562V.js → chunk-Z3LXWCB7.js} +1 -1
- package/dist/{chunk-EYMFVITZ.js → chunk-Z7I6NQMA.js} +2 -2
- package/dist/{chunk-6BJCDWSM.js → chunk-ZB4FS2EG.js} +1 -1
- package/dist/{chunk-ZAEUEDTN.js → chunk-ZD6FZ3WL.js} +1 -1
- package/dist/{chunk-FEU6QEEL.js → chunk-ZM6EZAVY.js} +1 -0
- package/dist/{chunk-2KY7WZZF.js → chunk-ZPA4R2UI.js} +1 -1
- package/dist/chunk-ZPPPHVSU.js +285 -0
- package/dist/{chunk-ELEGH4DX.js → chunk-ZUGQPYUY.js} +51 -4
- package/dist/{chunk-UX2EO653.js → chunk-ZZWFZ46U.js} +66 -8
- package/dist/{cleanup-graph-garbage-VQAJ2RBT.js → cleanup-graph-garbage-HFUD5ZQT.js} +12 -10
- package/dist/{cloud-sync-command-J7NEFUY7.js → cloud-sync-command-3JHJJKPN.js} +25 -3
- package/dist/{cloud-sync-db-init-KWEMNMGA.js → cloud-sync-db-init-2LHIQOSF.js} +1 -1
- package/dist/{cloud-sync-shutdown-P63AUTUI.js → cloud-sync-shutdown-ZXAXA3Z7.js} +6 -4
- package/dist/{cloud-sync-state-QF3TMMJ4.js → cloud-sync-state-VSQFGPP6.js} +1 -1
- package/dist/{co-activation-7IHRPBZN.js → co-activation-NX4EH4AP.js} +6 -4
- package/dist/{co-occurrence-R5AG4OAU.js → co-occurrence-5LBYCW3U.js} +10 -8
- package/dist/{consent-passphrase-5ZBDJ5G7.js → consent-passphrase-65W3DJIJ.js} +2 -2
- package/dist/{content-extractor-ZLXC6GNR.js → content-extractor-OGXETBOX.js} +2 -2
- package/dist/{conversation-entity-extractor-7FRKLLBD.js → conversation-entity-extractor-FQCOAH4F.js} +5 -4
- package/dist/conversations-retention-XTBFJBUM.js +166 -0
- package/dist/{crdt-sync-IFRZOEIS.js → crdt-sync-7TDUBTLH.js} +4 -4
- package/dist/{crm-webhook-L2S63ASV.js → crm-webhook-776JTY55.js} +2 -2
- package/dist/{cto-delegation-gate-3WU7OHX7.js → cto-delegation-gate-ZNUWVYCN.js} +25 -23
- package/dist/{daemon-orchestration-3VQYKLOR.js → daemon-orchestration-76BOFDEP.js} +30 -24
- package/dist/{doc-graph-extractor-YIR5E7OF.js → doc-graph-extractor-F724KZJX.js} +10 -8
- package/dist/{documents-QEHPTYIY.js → documents-Q24V4GRD.js} +13 -11
- package/dist/{dreaming-LNFE7DTN.js → dreaming-IY6NQTSP.js} +27 -25
- package/dist/{employee-boot-brief-ZTXDYNWM.js → employee-boot-brief-CCTXO5DQ.js} +35 -29
- package/dist/{entity-boost-R5N6JWXD.js → entity-boost-XGOB7HDM.js} +1 -1
- package/dist/{exe-drift-WYSJVZFO.js → exe-drift-NEPXLNGP.js} +7 -5
- package/dist/{exe-export-GOLNAEAV.js → exe-export-ZHJQFKR2.js} +14 -12
- package/dist/{exe-import-U4BSI6OH.js → exe-import-7SVNI4FW.js} +14 -12
- package/dist/{exe-key-V42G3NGO.js → exe-key-QJKU56WZ.js} +119 -108
- package/dist/{exe-org-U4GLQ6OP.js → exe-org-SJXHLV6K.js} +76 -51
- package/dist/{exe-snapshot-U7ONBYNY.js → exe-snapshot-EFWPXTXE.js} +45 -36
- package/dist/{fast-db-init-W3NGKAEU.js → fast-db-init-BQZOQNT3.js} +1 -1
- package/dist/{founder-context-ZSIBRVDM.js → founder-context-KG2ZAOXY.js} +2 -2
- package/dist/{founder-monitor-envelope-L3IWZLFY.js → founder-monitor-envelope-NYB5LLU4.js} +4 -4
- package/dist/gateway/index.js +20 -18
- package/dist/{gateway-client-DJFCVIPT.js → gateway-client-ODMUXUL3.js} +1 -1
- package/dist/{git-staleness-OF24QXFZ.js → git-staleness-OPGEAJA7.js} +6 -4
- package/dist/{global-procedures-WSIOWO43.js → global-procedures-3KXY4LL6.js} +8 -6
- package/dist/{graph-auto-extract-IEVVN3L3.js → graph-auto-extract-I7H2F5NJ.js} +10 -8
- package/dist/{graph-query-JDZWAVCU.js → graph-query-E7JBSNY5.js} +1 -1
- package/dist/{graph-rag-BKAD2XQA.js → graph-rag-H24CMFP2.js} +5 -4
- package/dist/{hook-integrity-TPWDGX2M.js → hook-integrity-PGQ3OX4S.js} +1 -1
- package/dist/{hook-prefetch-FD6VGJJA.js → hook-prefetch-7AZJER6Z.js} +23 -21
- package/dist/hook-registration-liveness-NGQRFKAA.js +11 -0
- package/dist/hooks/bug-report-worker.js +26 -24
- package/dist/hooks/codex-stop-task-finalizer.js +28 -26
- package/dist/hooks/commit-complete.js +26 -24
- package/dist/hooks/error-recall.js +16 -14
- package/dist/hooks/exe-heartbeat-hook.js +9 -7
- package/dist/hooks/ingest-worker.js +12 -10
- package/dist/hooks/ingest.js +22 -17
- package/dist/hooks/instructions-loaded.js +11 -9
- package/dist/hooks/manifest.json +20 -20
- package/dist/hooks/notification.js +10 -8
- package/dist/hooks/post-compact.js +9 -7
- package/dist/hooks/post-tool-combined.js +14 -14
- package/dist/hooks/pre-compact.js +26 -24
- package/dist/hooks/pre-tool-use.js +2 -2
- package/dist/hooks/prompt-submit.js +47 -41
- package/dist/hooks/session-end.js +38 -42
- package/dist/hooks/session-start.js +26 -18
- package/dist/hooks/stop.js +29 -27
- package/dist/hooks/subagent-stop.js +29 -27
- package/dist/hooks/summary-worker.js +32 -30
- package/dist/index.js +37 -35
- package/dist/{installer-OTI5SA43.js → installer-2ZS3LHCU.js} +12 -9
- package/dist/{installer-NMOBSEZ2.js → installer-NH3A3HWC.js} +14 -9
- package/dist/{installer-SRJGE4GU.js → installer-UJ73PGRD.js} +21 -9
- package/dist/{intercom-queue-4FFXCBHO.js → intercom-queue-OE25GJF2.js} +21 -19
- package/dist/lib/agent-config.js +2 -2
- package/dist/lib/cloud-sync.js +24 -18
- package/dist/lib/consolidation.js +13 -11
- package/dist/lib/crypto.js +3 -3
- package/dist/lib/database.js +6 -4
- package/dist/lib/db-backup.js +1 -1
- package/dist/lib/db-write-worker-client.js +3 -1
- package/dist/lib/db-write-worker.js +65 -89
- package/dist/lib/db.js +6 -4
- package/dist/lib/delivery-truth.js +5 -1
- package/dist/lib/device-registry.js +1 -1
- package/dist/lib/embedder.js +2 -2
- package/dist/lib/employee-templates.js +9 -7
- package/dist/lib/employees.js +6 -4
- package/dist/lib/exe-daemon.js +425 -314
- package/dist/lib/file-grep.js +15 -21
- package/dist/lib/hybrid-search.js +19 -13
- package/dist/lib/identity-templates.js +1 -1
- package/dist/lib/identity.js +6 -4
- package/dist/lib/keychain.js +1 -1
- package/dist/lib/license.js +22 -6
- package/dist/lib/messaging.js +22 -20
- package/dist/lib/post-tool-memory.js +10 -8
- package/dist/lib/registry-proxy.js +1 -1
- package/dist/lib/reminders.js +7 -5
- package/dist/lib/runtime-table.js +1 -1
- package/dist/lib/schedules.js +12 -10
- package/dist/lib/session-registry.js +8 -6
- package/dist/lib/skill-learning.js +13 -11
- package/dist/lib/status-brief.js +2 -2
- package/dist/lib/store.js +17 -9
- package/dist/lib/task-router.js +7 -5
- package/dist/lib/tasks.js +23 -21
- package/dist/lib/tmux-routing.js +21 -19
- package/dist/lib/tmux-status.js +4 -1
- package/dist/lib/token-spend.js +7 -5
- package/dist/lib/ws-client.js +1 -1
- package/dist/{license-gate-R4JWTWM4.js → license-gate-XQ2KN5I5.js} +3 -3
- package/dist/{license-recheck-3MBJ4IJX.js → license-recheck-IIBKR2V5.js} +1 -1
- package/dist/{license-sync-BVSG3WMW.js → license-sync-76JVI2M5.js} +151 -8
- package/dist/{local-secret-inventory-JWNBHZZ4.js → local-secret-inventory-MJT7NJLY.js} +2 -2
- package/dist/{mailbox-inbox-MTAT4MXX.js → mailbox-inbox-BPZP4GIZ.js} +1 -1
- package/dist/maintenance-worker-54VZTFIK.js +371 -0
- package/dist/mcp/register-tools.js +110 -107
- package/dist/mcp/server.js +113 -110
- package/dist/mcp/tools/complete-reminder.js +8 -6
- package/dist/mcp/tools/create-reminder.js +8 -6
- package/dist/mcp/tools/create-task.js +26 -24
- package/dist/mcp/tools/deactivate-behavior.js +15 -13
- package/dist/mcp/tools/list-reminders.js +8 -6
- package/dist/mcp/tools/list-tasks.js +26 -24
- package/dist/mcp/tools/send-message.js +25 -23
- package/dist/mcp/tools/update-task.js +24 -22
- package/dist/{mcp-child-registry-TIZERM7O.js → mcp-child-registry-5VUG5ATZ.js} +1 -1
- package/dist/{mcp-http-config-VUMSFWFH.js → mcp-http-config-SKXESWHA.js} +9 -7
- package/dist/{mcp-session-identity-DZHWEJRV.js → mcp-session-identity-HYMLJXXA.js} +21 -19
- package/dist/{memory-cards-JVXTMSAT.js → memory-cards-PAZDUQ3B.js} +16 -32
- package/dist/{memory-graph-extractor-PPBJMYFJ.js → memory-graph-extractor-BC6QKBY6.js} +11 -9
- package/dist/{memory-poisoning-defense-K5Q74XQ4.js → memory-poisoning-defense-BRGIHF6J.js} +9 -7
- package/dist/{memory-pressure-watchdog-YMJH5CSA.js → memory-pressure-watchdog-HR6TPOMT.js} +22 -20
- package/dist/{memory-reflection-7BZWIHRE.js → memory-reflection-LO7VFBL3.js} +38 -59
- package/dist/memory-write-repository-J25USX63.js +16 -0
- package/dist/{monitor-grants-Q7X3MYQP.js → monitor-grants-YQTO6NWR.js} +3 -3
- package/dist/{monitor-identity-ZQB4IXEE.js → monitor-identity-POVTG76Y.js} +2 -2
- package/dist/{notification-ledger-XRAXL5OI.js → notification-ledger-KLD6GZTG.js} +22 -20
- package/dist/{notifications-JE3PX55X.js → notifications-3R6HNHDR.js} +21 -19
- package/dist/{orchestration-events-JCQ5F5IJ.js → orchestration-events-CHY3GOJD.js} +7 -5
- package/dist/{orchestrator-X65INDTR.js → orchestrator-GAL3HOAD.js} +23 -21
- package/dist/{org-brief-session-3PQ22UIX.js → org-brief-session-LQ2DBYVF.js} +17 -15
- package/dist/{org-consent-policy-VGELJ7K7.js → org-consent-policy-KFUP7QPG.js} +5 -5
- package/dist/{org-join-6TO5ZYUZ.js → org-join-MXZCIQWX.js} +8 -8
- package/dist/{org-key-admin-XHYVRRAZ.js → org-key-admin-4UK6QUT7.js} +9 -9
- package/dist/{org-key-pin-TTTYGTQL.js → org-key-pin-ZOX4OM3O.js} +3 -3
- package/dist/{org-membership-Y7T2BS57.js → org-membership-D5TPN45F.js} +4 -4
- package/dist/{org-partner-config-OP4NEUNF.js → org-partner-config-3FXSYPQA.js} +7 -7
- package/dist/{org-partner-runtime-YNVUNT2R.js → org-partner-runtime-TH3LMPII.js} +20 -16
- package/dist/{org-row-visibility-JBBXNYXD.js → org-row-visibility-Y5R33C5U.js} +1 -1
- package/dist/{pipeline-router-EIBB7QNG.js → pipeline-router-E2JZLDK6.js} +7 -5
- package/dist/{plan-limits-MEWXYLEN.js → plan-limits-NYI6R4IK.js} +9 -7
- package/dist/{platform-procedures-Z7ZGBJWN.js → platform-procedures-RTD5E3BD.js} +5 -3
- package/dist/{pre-tool-use-impl-C6KJY22W.js → pre-tool-use-impl-LT4FRXBP.js} +127 -83
- package/dist/{project-boot-VEYFCCSL.js → project-boot-LIMXQKAF.js} +25 -17
- package/dist/{project-name-UYORSNGE.js → project-name-V62GWALX.js} +7 -5
- package/dist/{projection-worker-WYFDWS57.js → projection-worker-KLE3IZQ2.js} +5 -2
- package/dist/{prospective-memory-E6XBQFJA.js → prospective-memory-HRN7JFT2.js} +6 -4
- package/dist/{push-notifications-M7YU63FY.js → push-notifications-XC6EQEXF.js} +22 -20
- package/dist/{reproject-worktree-memories-B5XMGJSD.js → reproject-worktree-memories-4CAVZSFE.js} +21 -19
- package/dist/{reranker-SRA4BR7N.js → reranker-2RU6IIX2.js} +1 -1
- package/dist/{retrieval-health-P2JPZUPV.js → retrieval-health-4Q5TOV2S.js} +1 -1
- package/dist/{review-polling-KQPN7IQE.js → review-polling-WOWIMBCL.js} +22 -20
- package/dist/runtime/index.js +30 -28
- package/dist/{session-events-6LDDKKY3.js → session-events-OPMS2C5F.js} +22 -20
- package/dist/{session-kill-telemetry-5DSRGWCL.js → session-kill-telemetry-3GWATSIX.js} +22 -20
- package/dist/{session-scope-XG5R3P3D.js → session-scope-TIRGR4MH.js} +21 -19
- package/dist/{setup-wizard-7QFLZIKT.js → setup-wizard-B2JBVGNH.js} +3 -3
- package/dist/{shard-manager-HHHHV2KZ.js → shard-manager-C7LYX6E4.js} +5 -1
- package/dist/{skill-refinement-I5RMAHSC.js → skill-refinement-FWQFYNBI.js} +7 -5
- package/dist/skill-retrieval-PPLFC5RY.js +166 -0
- package/dist/skill-usage-NDB67PU2.js +25 -0
- package/dist/{stack-generate-manifest-AKMZ3AUX.js → stack-generate-manifest-AXI55MEQ.js} +6 -6
- package/dist/{stack-promote-34CE2HHF.js → stack-promote-6N23OGZY.js} +6 -6
- package/dist/stack-release-2CXFYVWM.js +2770 -0
- package/dist/{stack-update-ZQQ5YYPJ.js → stack-update-U53FBVCQ.js} +13 -5
- package/dist/{steward-gate-AQJ6KT2C.js → steward-gate-TUA3QCN7.js} +7 -5
- package/dist/{subagent-brief-injection-3GU7YAWY.js → subagent-brief-injection-N52RWYFZ.js} +34 -32
- package/dist/{subagent-spawn-ledger-52I66CLW.js → subagent-spawn-ledger-OI23OT4I.js} +1 -1
- package/dist/support-bug-actions-XWCJI6S5.js +30 -0
- package/dist/support-inbox-MMVTCXRX.js +77 -0
- package/dist/{support-outbox-KNI3FR3G.js → support-outbox-2TG2UV6J.js} +2 -2
- package/dist/{task-enforcement-CAA6D2MH.js → task-enforcement-JDMBAAOY.js} +22 -20
- package/dist/{task-request-inbox-QBZVU66E.js → task-request-inbox-PKJCYKJV.js} +9 -5
- package/dist/{task-scope-NHXB4ZRN.js → task-scope-32HQEV6W.js} +27 -19
- package/dist/{tasks-crud-JHSWL5NM.js → tasks-crud-CYKUKS3F.js} +21 -19
- package/dist/{tasks-notify-7PBE4U7T.js → tasks-notify-YND5MKWJ.js} +22 -20
- package/dist/{tasks-review-PPPVEE62.js → tasks-review-CG2A5GM3.js} +23 -19
- package/dist/{telemetry-upload-YU2VRNHX.js → telemetry-upload-WLUMEFAB.js} +11 -9
- package/dist/{token-budget-QCMWKG3K.js → token-budget-3YHAY5LL.js} +7 -5
- package/dist/{tool-capability-index-7AWQAJRP.js → tool-capability-index-2ADOWH43.js} +2 -2
- package/dist/{tool-gates-5Q3RSQEG.js → tool-gates-7ENOOYMR.js} +5 -3
- package/dist/{tool-gates-QD26D2NE.js → tool-gates-EKJTLVGN.js} +1 -1
- package/dist/{tool-telemetry-LTOIC64I.js → tool-telemetry-VUP7S6HC.js} +1 -1
- package/dist/tui/App.js +59 -35
- package/dist/{tui-data-NDBXD6U7.js → tui-data-BOQTOW2G.js} +25 -23
- package/dist/{update-support-BMJM4NG7.js → update-support-WT3S3AQ4.js} +21 -21
- package/dist/{whatsapp-QQLDAHUX.js → whatsapp-OZGIF2EM.js} +2 -2
- package/dist/{wiki-acl-W6WDCVCP.js → wiki-acl-LTEQJVDA.js} +1 -1
- package/dist/{work-claims-6DM32MGO.js → work-claims-CMV2GWIW.js} +8 -6
- package/dist/{work-state-heartbeat-HG7D4AWJ.js → work-state-heartbeat-S45TXK4M.js} +1 -1
- package/dist/{worker-gate-FTMW7GBB.js → worker-gate-7Z6NMM3G.js} +1 -1
- package/dist/{workflow-engine-ZWC6CCXE.js → workflow-engine-ZSQDXZQ7.js} +2 -2
- package/dist/{worktree-EMQCPGFE.js → worktree-NMWDVT6N.js} +8 -6
- package/dist/worktree-ownership-guard-ZVIWJAOP.js +35 -0
- package/dist/{worktree-sweep-XVUJZBXV.js → worktree-sweep-Q62ZIT3U.js} +9 -7
- package/package.json +14 -8
- package/release-notes.json +7 -41
- package/src/commands/exe/afk.md +6 -0
- package/src/commands/exe/call.md +6 -0
- package/src/commands/exe/employee-heartbeat.md +6 -0
- package/src/commands/exe/intercom.md +6 -0
- package/src/commands/exe/kill.md +6 -0
- package/src/commands/exe/launch.md +6 -0
- package/src/commands/exe/logs.md +1 -1
- package/src/commands/exe/sessions.md +6 -0
- package/src/commands/exe/setup.md +7 -3
- package/src/commands/exe/status.md +6 -0
- package/src/commands/exe-reference.md +25 -36
- package/src/commands/exe.md +19 -28
- package/stack.release.json +11 -11
- package/dist/chunk-3B6FLNLV.js +0 -30
- package/dist/chunk-FXU7JOXK.js +0 -6
- package/dist/chunk-QFAFKEB5.js +0 -820
- package/dist/conversations-retention-C4BLKFEL.js +0 -54
- package/dist/stack-release-5PGWV5D4.js +0 -1607
- package/dist/support-inbox-NY5TB3FN.js +0 -51
- /package/dist/{chunk-U2D6PJ5T.js → chunk-65G7ZTGE.js} +0 -0
- /package/dist/{chunk-DN3ZR3UE.js → chunk-CP7Z35MJ.js} +0 -0
- /package/dist/{chunk-XDVOGDBC.js → chunk-KBBWALJV.js} +0 -0
- /package/dist/{chunk-JRIH6I7D.js → chunk-LZXYPTY4.js} +0 -0
- /package/dist/{chunk-GIRD7O5X.js → chunk-MCWEW2SG.js} +0 -0
- /package/dist/{chunk-TKAU7IJ2.js → chunk-MQHUJLCA.js} +0 -0
- /package/dist/{chunk-M4XY4JRK.js → chunk-O53LTOXK.js} +0 -0
- /package/dist/{chunk-DZN7SDY2.js → chunk-OSVTH3SG.js} +0 -0
- /package/dist/{chunk-AJK2PVQW.js → chunk-QXXEXGX3.js} +0 -0
- /package/dist/{chunk-AWWDKF22.js → chunk-SFWNTO2F.js} +0 -0
- /package/dist/{chunk-2Q2CD6CD.js → chunk-WC5HF2FN.js} +0 -0
- /package/dist/{core-memory-O6D5UC3T.js → core-memory-MMMW3TF3.js} +0 -0
- /package/dist/{memory-isolation-EBFFC6HF.js → memory-isolation-67ACKQ2M.js} +0 -0
- /package/dist/{oauth-server-ZKBUHDFI.js → oauth-server-OILIKR7D.js} +0 -0
|
@@ -11,13 +11,14 @@ import {
|
|
|
11
11
|
compareLiveArtifacts,
|
|
12
12
|
declaredArtifactsFromManifest,
|
|
13
13
|
deliveryStateOf,
|
|
14
|
-
parseDigest
|
|
15
|
-
|
|
14
|
+
parseDigest,
|
|
15
|
+
repositoryKey
|
|
16
|
+
} from "../chunk-RT57D7C4.js";
|
|
16
17
|
import "../chunk-MLKGABMK.js";
|
|
17
18
|
|
|
18
19
|
// src/bin/exe-verify-running-images.ts
|
|
19
|
-
import { spawnSync } from "child_process";
|
|
20
|
-
import { existsSync, readFileSync } from "fs";
|
|
20
|
+
import { spawnSync as spawnSync2 } from "child_process";
|
|
21
|
+
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
|
|
21
22
|
|
|
22
23
|
// src/lib/running-image-versions.ts
|
|
23
24
|
function findRunningImageIssues(containers, knownVersions = /* @__PURE__ */ new Set()) {
|
|
@@ -68,22 +69,552 @@ function knownReleaseVersions(manifest) {
|
|
|
68
69
|
return versions;
|
|
69
70
|
}
|
|
70
71
|
|
|
72
|
+
// src/lib/deploy-pin-agreement.ts
|
|
73
|
+
var PIN_SOURCES = Object.freeze([
|
|
74
|
+
"manifest",
|
|
75
|
+
"host",
|
|
76
|
+
"container"
|
|
77
|
+
]);
|
|
78
|
+
var PIN_SOURCE_LABEL = Object.freeze({
|
|
79
|
+
manifest: "signed manifest",
|
|
80
|
+
host: "host .env pin",
|
|
81
|
+
container: "running container"
|
|
82
|
+
});
|
|
83
|
+
var HEX_RE = /^[0-9a-f]+$/;
|
|
84
|
+
var MIN_SHA_PREFIX = 7;
|
|
85
|
+
function normalizeTag(value) {
|
|
86
|
+
return value.trim().replace(/^v(?=\d)/i, "").toLowerCase();
|
|
87
|
+
}
|
|
88
|
+
function commitsMatch(left, right) {
|
|
89
|
+
const a = left.trim().toLowerCase();
|
|
90
|
+
const b = right.trim().toLowerCase();
|
|
91
|
+
if (!HEX_RE.test(a) || !HEX_RE.test(b)) return void 0;
|
|
92
|
+
const n = Math.min(a.length, b.length);
|
|
93
|
+
if (n < MIN_SHA_PREFIX) return void 0;
|
|
94
|
+
return a.slice(0, n) === b.slice(0, n);
|
|
95
|
+
}
|
|
96
|
+
var PAIRS = Object.freeze([
|
|
97
|
+
{ pair: ["manifest", "host"], fields: ["repository", "tag", "digest"] },
|
|
98
|
+
{ pair: ["host", "container"], fields: ["repository", "tag"] },
|
|
99
|
+
{ pair: ["manifest", "container"], fields: ["tag", "commit"] }
|
|
100
|
+
]);
|
|
101
|
+
function valueOf(obs, field) {
|
|
102
|
+
if (!obs || obs.unreadable) return null;
|
|
103
|
+
const raw = field === "tag" ? obs.tag : field === "commit" ? obs.commit : field === "repository" ? obs.repository : obs.digest;
|
|
104
|
+
return typeof raw === "string" && raw.trim() !== "" ? raw.trim() : null;
|
|
105
|
+
}
|
|
106
|
+
function describeDistance(d) {
|
|
107
|
+
if (!d) return "";
|
|
108
|
+
if (d.unresolved) return ` (distance not measurable: ${d.unresolved})`;
|
|
109
|
+
const parts = [];
|
|
110
|
+
if (typeof d.behind === "number") parts.push(`${d.behind} behind`);
|
|
111
|
+
if (typeof d.ahead === "number") parts.push(`${d.ahead} ahead`);
|
|
112
|
+
return parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
113
|
+
}
|
|
114
|
+
function compareOne(left, right, field, bySource, resolveDistance) {
|
|
115
|
+
const lo = bySource.get(left);
|
|
116
|
+
const ro = bySource.get(right);
|
|
117
|
+
const base = { pair: [left, right], field };
|
|
118
|
+
const L = PIN_SOURCE_LABEL[left];
|
|
119
|
+
const R = PIN_SOURCE_LABEL[right];
|
|
120
|
+
const missing = [];
|
|
121
|
+
if (!lo) missing.push(`${L} produced no observation at all`);
|
|
122
|
+
else if (lo.unreadable) missing.push(`${L} unreadable (${lo.origin}): ${lo.unreadable}`);
|
|
123
|
+
if (!ro) missing.push(`${R} produced no observation at all`);
|
|
124
|
+
else if (ro.unreadable) missing.push(`${R} unreadable (${ro.origin}): ${ro.unreadable}`);
|
|
125
|
+
if (missing.length > 0) {
|
|
126
|
+
return {
|
|
127
|
+
...base,
|
|
128
|
+
status: "unreadable",
|
|
129
|
+
left: null,
|
|
130
|
+
right: null,
|
|
131
|
+
detail: `${field} of ${L} vs ${R} could not be compared \u2014 ${missing.join("; ")}`
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
const lv = valueOf(lo, field);
|
|
135
|
+
const rv = valueOf(ro, field);
|
|
136
|
+
if (lv === null || rv === null) {
|
|
137
|
+
const which = lv === null && rv === null ? `neither side` : lv === null ? L : R;
|
|
138
|
+
return {
|
|
139
|
+
...base,
|
|
140
|
+
status: "incomparable",
|
|
141
|
+
left: lv,
|
|
142
|
+
right: rv,
|
|
143
|
+
detail: `${field} of ${L} vs ${R} could not be compared \u2014 ${which} records no ${field}; this is WEAKER EVIDENCE than a match, not agreement, and does not become agreement by being unmeasurable`
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
if (field === "repository" || field === "digest") {
|
|
147
|
+
const same = lv.trim().toLowerCase() === rv.trim().toLowerCase();
|
|
148
|
+
return {
|
|
149
|
+
...base,
|
|
150
|
+
status: same ? "agree" : "disagree",
|
|
151
|
+
left: lv,
|
|
152
|
+
right: rv,
|
|
153
|
+
detail: same ? `${L} and ${R} both name ${field} ${lv}` : `${L} names ${field} ${lv} but ${R} names ${rv} \u2014 these two disagree` + (field === "digest" ? `; one tag resolved to two different images, which a tag comparison alone cannot see` : "")
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
if (field === "tag") {
|
|
157
|
+
const same = normalizeTag(lv) === normalizeTag(rv);
|
|
158
|
+
return {
|
|
159
|
+
...base,
|
|
160
|
+
status: same ? "agree" : "disagree",
|
|
161
|
+
left: lv,
|
|
162
|
+
right: rv,
|
|
163
|
+
detail: same ? `${L} and ${R} both pin tag ${lv}` : `${L} pins tag ${lv} but ${R} reports ${rv} \u2014 these two disagree`
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
const match = commitsMatch(lv, rv);
|
|
167
|
+
if (match === void 0) {
|
|
168
|
+
return {
|
|
169
|
+
...base,
|
|
170
|
+
status: "incomparable",
|
|
171
|
+
left: lv,
|
|
172
|
+
right: rv,
|
|
173
|
+
detail: `commit of ${L} (${lv}) vs ${R} (${rv}) could not be compared \u2014 not two comparable sha values; this is unknown, not agreement`
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
if (match) {
|
|
177
|
+
return {
|
|
178
|
+
...base,
|
|
179
|
+
status: "agree",
|
|
180
|
+
left: lv,
|
|
181
|
+
right: rv,
|
|
182
|
+
detail: `${L} and ${R} both resolve to commit ${lv}`
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
const distance = resolveDistance?.(lv, rv);
|
|
186
|
+
return {
|
|
187
|
+
...base,
|
|
188
|
+
status: "disagree",
|
|
189
|
+
left: lv,
|
|
190
|
+
right: rv,
|
|
191
|
+
...distance ? { distance } : {},
|
|
192
|
+
detail: `${L} records commit ${lv} but ${R} is running ${rv}${describeDistance(distance)} \u2014 these two disagree`
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
function verdictFor(comparisons, bySource) {
|
|
196
|
+
const disagreements = comparisons.filter((c) => c.status === "disagree").map((c) => c.detail);
|
|
197
|
+
const unverified = [];
|
|
198
|
+
for (const source of PIN_SOURCES) {
|
|
199
|
+
const obs = bySource.get(source);
|
|
200
|
+
if (!obs) {
|
|
201
|
+
unverified.push(
|
|
202
|
+
`${PIN_SOURCE_LABEL[source]} was never consulted \u2014 no observation was supplied for it`
|
|
203
|
+
);
|
|
204
|
+
} else if (obs.unreadable) {
|
|
205
|
+
unverified.push(
|
|
206
|
+
`${PIN_SOURCE_LABEL[source]} could not be read (${obs.origin}): ${obs.unreadable}`
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
for (const c of comparisons) {
|
|
211
|
+
if (c.status === "incomparable") unverified.push(c.detail);
|
|
212
|
+
}
|
|
213
|
+
const container = bySource.get("container");
|
|
214
|
+
const containerBlind = !container || Boolean(container.unreadable);
|
|
215
|
+
if (containerBlind) {
|
|
216
|
+
const agreeingDescriptors = comparisons.some(
|
|
217
|
+
(c) => c.status === "agree" && !c.pair.includes("container")
|
|
218
|
+
);
|
|
219
|
+
if (agreeingDescriptors) {
|
|
220
|
+
unverified.push(
|
|
221
|
+
`the signed manifest and the host .env pin agree with each other, but the running container could not be inspected \u2014 two claims agreeing is not an observation of what is running, so this is UNVERIFIED and not AGREED`
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
return { verdict: "UNVERIFIED", disagreements, unverified };
|
|
225
|
+
}
|
|
226
|
+
if (disagreements.length > 0) return { verdict: "DRIFTED", disagreements, unverified };
|
|
227
|
+
if (unverified.length > 0) return { verdict: "UNVERIFIED", disagreements, unverified };
|
|
228
|
+
return { verdict: "AGREED", disagreements, unverified };
|
|
229
|
+
}
|
|
230
|
+
function compareDeployPins(services, options) {
|
|
231
|
+
const evaluated = [];
|
|
232
|
+
for (const svc of services) {
|
|
233
|
+
const bySource = /* @__PURE__ */ new Map();
|
|
234
|
+
for (const obs of svc.observations) bySource.set(obs.source, obs);
|
|
235
|
+
const comparisons = [];
|
|
236
|
+
for (const { pair, fields } of PAIRS) {
|
|
237
|
+
for (const field of fields) {
|
|
238
|
+
if (field === "commit" && svc.compareCommit === false) continue;
|
|
239
|
+
comparisons.push(compareOne(pair[0], pair[1], field, bySource, options?.resolveDistance));
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
const { verdict, disagreements, unverified } = verdictFor(comparisons, bySource);
|
|
243
|
+
evaluated.push({
|
|
244
|
+
service: svc.service,
|
|
245
|
+
verdict,
|
|
246
|
+
comparisons,
|
|
247
|
+
disagreements,
|
|
248
|
+
unverified,
|
|
249
|
+
observations: [...bySource.values()]
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
const counts = { AGREED: 0, DRIFTED: 0, UNVERIFIED: 0 };
|
|
253
|
+
for (const s of evaluated) counts[s.verdict]++;
|
|
254
|
+
return {
|
|
255
|
+
services: evaluated,
|
|
256
|
+
counts,
|
|
257
|
+
// Zero services is NOT clean. A sweep that evaluated nothing has proven
|
|
258
|
+
// nothing, and reporting it green is the exact defect class this detects.
|
|
259
|
+
clean: evaluated.length > 0 && counts.DRIFTED === 0 && counts.UNVERIFIED === 0,
|
|
260
|
+
// Carried in the report, never printed as a side effect: a caller in --json
|
|
261
|
+
// mode must get one parseable document on stdout and nothing else.
|
|
262
|
+
notApplicable: options?.notApplicable ?? [],
|
|
263
|
+
skipped: options?.skipped ?? [],
|
|
264
|
+
inventory: { services: evaluated.length, sources: options?.sources ?? "unspecified" }
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// src/lib/deploy-pin-observe.ts
|
|
269
|
+
import { spawnSync } from "child_process";
|
|
270
|
+
import { existsSync, readFileSync } from "fs";
|
|
271
|
+
var GIT_SHA_LABEL = "org.exe.git_sha";
|
|
272
|
+
var OCI_REVISION_LABEL = "org.opencontainers.image.revision";
|
|
273
|
+
var DEFAULT_HOST_ENV = "/opt/exe-stack/.env";
|
|
274
|
+
function tagFromRef(ref) {
|
|
275
|
+
const value = (ref ?? "").trim();
|
|
276
|
+
if (!value) return null;
|
|
277
|
+
const beforeDigest = value.split("@")[0] ?? "";
|
|
278
|
+
if (!beforeDigest) return null;
|
|
279
|
+
const lastSegment = beforeDigest.split("/").pop() ?? beforeDigest;
|
|
280
|
+
const colon = lastSegment.lastIndexOf(":");
|
|
281
|
+
if (colon <= 0) return null;
|
|
282
|
+
const tag = lastSegment.slice(colon + 1).trim();
|
|
283
|
+
return tag === "" ? null : tag;
|
|
284
|
+
}
|
|
285
|
+
function tagFromPin(value) {
|
|
286
|
+
const raw = (value ?? "").trim();
|
|
287
|
+
if (!raw) return null;
|
|
288
|
+
const beforeDigest = raw.split("@")[0]?.trim() ?? "";
|
|
289
|
+
if (beforeDigest && !beforeDigest.includes("/") && !beforeDigest.includes(":")) {
|
|
290
|
+
return beforeDigest;
|
|
291
|
+
}
|
|
292
|
+
return tagFromRef(raw);
|
|
293
|
+
}
|
|
294
|
+
function isBareTagPin(raw) {
|
|
295
|
+
const beforeDigest = raw.split("@")[0]?.trim() ?? "";
|
|
296
|
+
return beforeDigest !== "" && !beforeDigest.includes("/") && !beforeDigest.includes(":");
|
|
297
|
+
}
|
|
298
|
+
function repositoryFromPin(value) {
|
|
299
|
+
const raw = (value ?? "").trim();
|
|
300
|
+
if (!raw || isBareTagPin(raw)) return null;
|
|
301
|
+
const key = repositoryKey(raw);
|
|
302
|
+
return key === "" ? null : key;
|
|
303
|
+
}
|
|
304
|
+
function repositoryFromRef(ref) {
|
|
305
|
+
const raw = (ref ?? "").trim();
|
|
306
|
+
if (!raw) return null;
|
|
307
|
+
const key = repositoryKey(raw);
|
|
308
|
+
return key === "" ? null : key;
|
|
309
|
+
}
|
|
310
|
+
function digestOf(value) {
|
|
311
|
+
return parseDigest((value ?? "").trim());
|
|
312
|
+
}
|
|
313
|
+
function parseHostEnv(raw) {
|
|
314
|
+
const env = /* @__PURE__ */ new Map();
|
|
315
|
+
for (const line of raw.split(/\r?\n/)) {
|
|
316
|
+
const trimmed = line.trim();
|
|
317
|
+
if (!trimmed || trimmed.startsWith("#")) continue;
|
|
318
|
+
const idx = trimmed.indexOf("=");
|
|
319
|
+
if (idx <= 0) continue;
|
|
320
|
+
let value = trimmed.slice(idx + 1).trim();
|
|
321
|
+
if (value.startsWith('"') && value.endsWith('"') && value.length >= 2 || value.startsWith("'") && value.endsWith("'") && value.length >= 2) {
|
|
322
|
+
value = value.slice(1, -1);
|
|
323
|
+
}
|
|
324
|
+
env.set(trimmed.slice(0, idx).trim(), value);
|
|
325
|
+
}
|
|
326
|
+
return env;
|
|
327
|
+
}
|
|
328
|
+
function manifestServiceEntries(manifest, options) {
|
|
329
|
+
const m = manifest;
|
|
330
|
+
if (!m || typeof m !== "object" || !m.stacks) throw new Error("manifest has no `stacks` object");
|
|
331
|
+
const version = options?.stackVersion ?? m.latest;
|
|
332
|
+
if (!version) throw new Error("manifest has no `latest` and no stack version was given");
|
|
333
|
+
const stack = m.stacks[version];
|
|
334
|
+
if (!stack?.services) throw new Error(`manifest stack "${version}" is missing or has no services`);
|
|
335
|
+
return Object.entries(stack.services).map(([service, svc]) => ({
|
|
336
|
+
service,
|
|
337
|
+
image: typeof svc?.image === "string" ? svc.image : void 0,
|
|
338
|
+
env: typeof svc?.env === "string" ? svc.env : void 0,
|
|
339
|
+
composeService: typeof svc?.composeService === "string" ? svc.composeService : void 0,
|
|
340
|
+
gitSha: typeof svc?.gitSha === "string" ? svc.gitSha : void 0
|
|
341
|
+
}));
|
|
342
|
+
}
|
|
343
|
+
function isSidecarOfOtherService(entry, container) {
|
|
344
|
+
const ownService = entry.composeService ?? entry.service;
|
|
345
|
+
const labelService = container.labels?.["com.docker.compose.service"];
|
|
346
|
+
if (typeof labelService === "string" && labelService !== ownService) return true;
|
|
347
|
+
return container.name.startsWith(`${ownService}-`);
|
|
348
|
+
}
|
|
349
|
+
function matchContainer(entry, containers, claimedNames = /* @__PURE__ */ new Set()) {
|
|
350
|
+
const byName = containers.find((c) => c.name === (entry.composeService ?? entry.service));
|
|
351
|
+
if (byName) return byName;
|
|
352
|
+
if (entry.image) {
|
|
353
|
+
const want = repositoryKey(entry.image);
|
|
354
|
+
const byRepo = containers.find(
|
|
355
|
+
(c) => !claimedNames.has(c.name) && c.image && repositoryKey(c.image) === want && !isSidecarOfOtherService(entry, c)
|
|
356
|
+
);
|
|
357
|
+
if (byRepo) return byRepo;
|
|
358
|
+
}
|
|
359
|
+
return void 0;
|
|
360
|
+
}
|
|
361
|
+
function manifestObservation(entry, manifestPath) {
|
|
362
|
+
if (!entry.image) {
|
|
363
|
+
return {
|
|
364
|
+
source: "manifest",
|
|
365
|
+
origin: `${manifestPath} \u2192 services.${entry.service}`,
|
|
366
|
+
unreadable: "manifest entry declares no image"
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
return {
|
|
370
|
+
source: "manifest",
|
|
371
|
+
origin: `${manifestPath} \u2192 services.${entry.service}`,
|
|
372
|
+
repository: repositoryFromRef(entry.image),
|
|
373
|
+
digest: digestOf(entry.image),
|
|
374
|
+
tag: tagFromRef(entry.image),
|
|
375
|
+
commit: entry.gitSha ?? null
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
function effectiveHostPinKey(entry, env) {
|
|
379
|
+
const serverKeys = ["EXE_OS_SERVER_IMAGE_TAG", "EXE_OS_IMAGE_TAG", "EXED_IMAGE_TAG"];
|
|
380
|
+
if ((entry.composeService ?? entry.service) === "exe-os" && serverKeys.includes(entry.env ?? "")) {
|
|
381
|
+
return serverKeys.find((key) => (env.get(key) ?? "") !== "") ?? entry.env;
|
|
382
|
+
}
|
|
383
|
+
return entry.env;
|
|
384
|
+
}
|
|
385
|
+
function hostObservation(entry, env, envPath) {
|
|
386
|
+
if (!entry.env) {
|
|
387
|
+
return {
|
|
388
|
+
source: "host",
|
|
389
|
+
origin: `${envPath} (key unknown)`,
|
|
390
|
+
unreadable: `the manifest entry for "${entry.service}" names no env key, so there is no way to tell which host pin drives it`
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
const key = env instanceof Map ? effectiveHostPinKey(entry, env) : entry.env;
|
|
394
|
+
const origin = `${envPath} \u2192 ${key}`;
|
|
395
|
+
if (!(env instanceof Map)) {
|
|
396
|
+
return { source: "host", origin, unreadable: env.unreadable };
|
|
397
|
+
}
|
|
398
|
+
const raw = env.get(key);
|
|
399
|
+
if (raw === void 0 || raw.trim() === "") {
|
|
400
|
+
return {
|
|
401
|
+
source: "host",
|
|
402
|
+
origin,
|
|
403
|
+
unreadable: `${key} is not set in ${envPath} \u2014 the pin that decides what starts is absent`
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
return {
|
|
407
|
+
source: "host",
|
|
408
|
+
origin,
|
|
409
|
+
repository: repositoryFromPin(raw),
|
|
410
|
+
digest: digestOf(raw),
|
|
411
|
+
tag: tagFromPin(raw)
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
function containerObservation(entry, container) {
|
|
415
|
+
const target = entry.composeService ?? entry.service;
|
|
416
|
+
if (!container) {
|
|
417
|
+
return {
|
|
418
|
+
source: "container",
|
|
419
|
+
origin: `container ${target}`,
|
|
420
|
+
unreadable: `no running container matched this service \u2014 nothing was observed, so what this host runs for "${entry.service}" is unknown`
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
if (container.unreadable) {
|
|
424
|
+
return {
|
|
425
|
+
source: "container",
|
|
426
|
+
origin: `container ${container.name}`,
|
|
427
|
+
unreadable: container.unreadable
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
const labels = container.labels ?? {};
|
|
431
|
+
const sha = labels[GIT_SHA_LABEL] ?? labels[OCI_REVISION_LABEL] ?? null;
|
|
432
|
+
const tag = tagFromRef(container.image);
|
|
433
|
+
if (!sha && !tag) {
|
|
434
|
+
return {
|
|
435
|
+
source: "container",
|
|
436
|
+
origin: `container ${container.name}`,
|
|
437
|
+
unreadable: `the running image carries neither ${GIT_SHA_LABEL} nor a resolvable tag \u2014 an un-stamped image cannot be traced to a commit`
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
return {
|
|
441
|
+
source: "container",
|
|
442
|
+
origin: `container ${container.name}`,
|
|
443
|
+
repository: repositoryFromRef(container.image),
|
|
444
|
+
digest: digestOf(container.image),
|
|
445
|
+
tag,
|
|
446
|
+
commit: sha
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
function outsideThreeWayContract(entry) {
|
|
450
|
+
if (entry.env || entry.gitSha) return null;
|
|
451
|
+
return `the manifest declares neither an env key nor a gitSha for "${entry.service}", so there is no host pin to read and no commit to compare \u2014 it is pinned directly in compose and sits outside the three-way contract. NOT APPLICABLE, which is not agreement: nothing about this service was verified here`;
|
|
452
|
+
}
|
|
453
|
+
function hostPinProvablyAbsent(entry, env) {
|
|
454
|
+
if (!entry.env) return false;
|
|
455
|
+
if (!(env instanceof Map)) return false;
|
|
456
|
+
const raw = env.get(effectiveHostPinKey(entry, env));
|
|
457
|
+
return raw === void 0 || raw.trim() === "";
|
|
458
|
+
}
|
|
459
|
+
var COMPOSE_SERVICE_PROFILES = {
|
|
460
|
+
"exe-monitor-agent": ["monitor-agent"],
|
|
461
|
+
"exe-os-worker": ["embeddings"],
|
|
462
|
+
"exe-update": ["registry-proxy", "askexe-control-plane"],
|
|
463
|
+
"exe-dashboard": ["dashboard"]
|
|
464
|
+
};
|
|
465
|
+
function buildServiceObservations(input) {
|
|
466
|
+
const services = [];
|
|
467
|
+
const skipped = [];
|
|
468
|
+
const notApplicable = [];
|
|
469
|
+
const claimedNames = new Set(input.entries.map((entry) => entry.composeService ?? entry.service));
|
|
470
|
+
for (const entry of input.entries) {
|
|
471
|
+
const outside = outsideThreeWayContract(entry);
|
|
472
|
+
if (outside) {
|
|
473
|
+
notApplicable.push({ service: entry.service, reason: outside });
|
|
474
|
+
continue;
|
|
475
|
+
}
|
|
476
|
+
const container = matchContainer(entry, input.containers, claimedNames);
|
|
477
|
+
if (container) claimedNames.add(container.name);
|
|
478
|
+
const host = hostObservation(entry, input.env, input.envPath);
|
|
479
|
+
const profiles = COMPOSE_SERVICE_PROFILES[entry.composeService ?? ""];
|
|
480
|
+
if (!container && profiles && input.env instanceof Map) {
|
|
481
|
+
const enabled = new Set((input.env.get("COMPOSE_PROFILES") ?? "").split(",").map((p) => p.trim()));
|
|
482
|
+
if (!enabled.has("*") && !profiles.some((profile) => enabled.has(profile))) {
|
|
483
|
+
skipped.push({
|
|
484
|
+
service: entry.service,
|
|
485
|
+
reason: `compose profiles ${profiles.join(", ")} are disabled and no running container matched "${entry.service}"`
|
|
486
|
+
});
|
|
487
|
+
continue;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
if (!container && hostPinProvablyAbsent(entry, input.env)) {
|
|
491
|
+
skipped.push({
|
|
492
|
+
service: entry.service,
|
|
493
|
+
reason: `no host pin and no running container matched "${entry.service}" \u2014 it is not installed on this host, so there was nothing to observe. Not agreement`
|
|
494
|
+
});
|
|
495
|
+
continue;
|
|
496
|
+
}
|
|
497
|
+
services.push({
|
|
498
|
+
service: entry.service,
|
|
499
|
+
compareCommit: entry.gitSha || repositoryFromRef(entry.image) !== "pgvector" ? true : false,
|
|
500
|
+
observations: [
|
|
501
|
+
manifestObservation(entry, input.manifestPath),
|
|
502
|
+
host,
|
|
503
|
+
containerObservation(entry, container)
|
|
504
|
+
]
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
return { services, skipped, notApplicable };
|
|
508
|
+
}
|
|
509
|
+
var INSPECT_TIMEOUT_MS = 3e4;
|
|
510
|
+
function run(cmd, args, opts) {
|
|
511
|
+
const timeoutMs = opts?.timeoutMs ?? INSPECT_TIMEOUT_MS;
|
|
512
|
+
const res = spawnSync(cmd, args, {
|
|
513
|
+
encoding: "utf8",
|
|
514
|
+
cwd: opts?.cwd,
|
|
515
|
+
timeout: timeoutMs,
|
|
516
|
+
killSignal: "SIGKILL"
|
|
517
|
+
});
|
|
518
|
+
const code = res.error?.code;
|
|
519
|
+
const timedOut = code === "ETIMEDOUT" || res.status === null && res.signal === "SIGKILL";
|
|
520
|
+
return {
|
|
521
|
+
status: res.status,
|
|
522
|
+
stdout: (res.stdout ?? "").toString(),
|
|
523
|
+
stderr: (res.stderr ?? "").toString(),
|
|
524
|
+
timedOut
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
function failureReason(what, res, timeoutMs) {
|
|
528
|
+
if (res.timedOut) {
|
|
529
|
+
return `${what} did not finish within ${timeoutMs}ms and was killed \u2014 the container runtime never answered, so nothing was learned. UNVERIFIED, not absence`;
|
|
530
|
+
}
|
|
531
|
+
return `${what} exited ${res.status ?? "null"}: ${res.stderr.trim() || "no stderr"}`;
|
|
532
|
+
}
|
|
533
|
+
function readHostEnv(envPath) {
|
|
534
|
+
if (!existsSync(envPath)) {
|
|
535
|
+
return { unreadable: `${envPath} does not exist on this machine` };
|
|
536
|
+
}
|
|
537
|
+
try {
|
|
538
|
+
return parseHostEnv(readFileSync(envPath, "utf8"));
|
|
539
|
+
} catch (err) {
|
|
540
|
+
return { unreadable: `${envPath} could not be read: ${err.message}` };
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
function inspectRunningContainers(options) {
|
|
544
|
+
const timeoutMs = options?.timeoutMs ?? INSPECT_TIMEOUT_MS;
|
|
545
|
+
const ps = run("docker", ["ps", "--format", "{{.Names}}"], { timeoutMs });
|
|
546
|
+
if (ps.status !== 0) {
|
|
547
|
+
return {
|
|
548
|
+
unreadable: `the container runtime could not be queried \u2014 ` + failureReason("docker ps", ps, timeoutMs)
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
const names = ps.stdout.split("\n").map((s) => s.trim()).filter(Boolean);
|
|
552
|
+
return names.map((name) => {
|
|
553
|
+
const fmt = `{{ .Config.Image }} {{ index .Config.Labels "${GIT_SHA_LABEL}" }} {{ index .Config.Labels "${OCI_REVISION_LABEL}" }} {{ index .Config.Labels "com.docker.compose.service" }}`;
|
|
554
|
+
const res = run("docker", ["inspect", name, "--format", fmt], { timeoutMs });
|
|
555
|
+
if (res.status !== 0) {
|
|
556
|
+
return { name, unreadable: failureReason(`docker inspect ${name}`, res, timeoutMs) };
|
|
557
|
+
}
|
|
558
|
+
const [image = "", sha = "", revision = "", composeService = ""] = res.stdout.trim().split(" ");
|
|
559
|
+
const clean = (v) => v === "" || v === "<no value>" ? void 0 : v;
|
|
560
|
+
if (!clean(image)) {
|
|
561
|
+
return { name, unreadable: `docker inspect ${name} returned no image reference` };
|
|
562
|
+
}
|
|
563
|
+
return {
|
|
564
|
+
name,
|
|
565
|
+
image: image.trim(),
|
|
566
|
+
labels: {
|
|
567
|
+
[GIT_SHA_LABEL]: clean(sha),
|
|
568
|
+
[OCI_REVISION_LABEL]: clean(revision),
|
|
569
|
+
"com.docker.compose.service": clean(composeService)
|
|
570
|
+
}
|
|
571
|
+
};
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
function gitDistanceResolver(repoPath) {
|
|
575
|
+
return (left, right) => {
|
|
576
|
+
if (!repoPath) {
|
|
577
|
+
return {
|
|
578
|
+
behind: null,
|
|
579
|
+
ahead: null,
|
|
580
|
+
unresolved: "no local checkout of this service's repository to count commits in"
|
|
581
|
+
};
|
|
582
|
+
}
|
|
583
|
+
const count = (range) => {
|
|
584
|
+
const res = run("git", ["rev-list", "--count", range], { cwd: repoPath });
|
|
585
|
+
if (res.status !== 0) return null;
|
|
586
|
+
const n = Number.parseInt(res.stdout.trim(), 10);
|
|
587
|
+
return Number.isFinite(n) ? n : null;
|
|
588
|
+
};
|
|
589
|
+
const behind = count(`${left}..${right}`);
|
|
590
|
+
const ahead = count(`${right}..${left}`);
|
|
591
|
+
if (behind === null && ahead === null) {
|
|
592
|
+
return {
|
|
593
|
+
behind: null,
|
|
594
|
+
ahead: null,
|
|
595
|
+
unresolved: `git rev-list could not resolve ${left} and ${right} in ${repoPath}`
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
return { behind, ahead };
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
|
|
71
602
|
// src/bin/exe-verify-running-images.ts
|
|
72
603
|
var DEFAULT_MANIFESTS = [
|
|
73
604
|
"deploy/stack-manifests/v0.9.json",
|
|
74
605
|
"/opt/exe-stack/stack-manifest.json"
|
|
75
606
|
];
|
|
76
|
-
function
|
|
77
|
-
const res =
|
|
607
|
+
function run2(cmd, args) {
|
|
608
|
+
const res = spawnSync2(cmd, args, { encoding: "utf8", timeout: 3e4 });
|
|
78
609
|
return { status: res.status, stdout: (res.stdout ?? "").toString() };
|
|
79
610
|
}
|
|
80
611
|
function runningContainerNames() {
|
|
81
|
-
const { status, stdout } =
|
|
612
|
+
const { status, stdout } = run2("docker", ["ps", "--format", "{{.Names}}"]);
|
|
82
613
|
if (status !== 0) return [];
|
|
83
614
|
return stdout.split("\n").map((s) => s.trim()).filter(Boolean);
|
|
84
615
|
}
|
|
85
616
|
function inspectContainer(name) {
|
|
86
|
-
const { status, stdout } =
|
|
617
|
+
const { status, stdout } = run2("docker", [
|
|
87
618
|
"inspect",
|
|
88
619
|
name,
|
|
89
620
|
"--format",
|
|
@@ -100,11 +631,11 @@ function inspectContainer(name) {
|
|
|
100
631
|
};
|
|
101
632
|
}
|
|
102
633
|
function resolveRunningRef(containerName, configuredImage) {
|
|
103
|
-
const imageId =
|
|
634
|
+
const imageId = run2("docker", ["inspect", containerName, "--format", "{{ .Image }}"]);
|
|
104
635
|
if (imageId.status !== 0) return configuredImage;
|
|
105
636
|
const id = imageId.stdout.trim();
|
|
106
637
|
if (!id) return configuredImage;
|
|
107
|
-
const digests =
|
|
638
|
+
const digests = run2("docker", ["inspect", id, "--format", "{{ json .RepoDigests }}"]);
|
|
108
639
|
if (digests.status !== 0) return configuredImage;
|
|
109
640
|
let list = [];
|
|
110
641
|
try {
|
|
@@ -132,9 +663,9 @@ function groupRunningArtifacts(entries) {
|
|
|
132
663
|
function loadManifest(explicitPath) {
|
|
133
664
|
const candidates = explicitPath ? [explicitPath] : DEFAULT_MANIFESTS;
|
|
134
665
|
for (const candidate of candidates) {
|
|
135
|
-
if (!
|
|
666
|
+
if (!existsSync2(candidate)) continue;
|
|
136
667
|
try {
|
|
137
|
-
return { manifest: JSON.parse(
|
|
668
|
+
return { manifest: JSON.parse(readFileSync2(candidate, "utf8")), path: candidate };
|
|
138
669
|
} catch {
|
|
139
670
|
}
|
|
140
671
|
}
|
|
@@ -178,20 +709,88 @@ What is live \u2014 ${report.inventory.runningArtifacts} running artifact(s) vs
|
|
|
178
709
|
function loadKnownVersions(explicitPath) {
|
|
179
710
|
const candidates = explicitPath ? [explicitPath] : DEFAULT_MANIFESTS;
|
|
180
711
|
for (const candidate of candidates) {
|
|
181
|
-
if (!
|
|
712
|
+
if (!existsSync2(candidate)) continue;
|
|
182
713
|
try {
|
|
183
|
-
return knownReleaseVersions(JSON.parse(
|
|
714
|
+
return knownReleaseVersions(JSON.parse(readFileSync2(candidate, "utf8")));
|
|
184
715
|
} catch {
|
|
185
716
|
}
|
|
186
717
|
}
|
|
187
718
|
return /* @__PURE__ */ new Set();
|
|
188
719
|
}
|
|
720
|
+
var PIN_ICON = {
|
|
721
|
+
AGREED: "\u{1F7E2}",
|
|
722
|
+
DRIFTED: "\u{1F534}",
|
|
723
|
+
UNVERIFIED: "\u{1F7E0}"
|
|
724
|
+
};
|
|
725
|
+
function runPinAgreement(options) {
|
|
726
|
+
const loaded = loadManifest(options.manifestPath);
|
|
727
|
+
if (!loaded) {
|
|
728
|
+
return { assertionNotRun: "no stack manifest found \u2014 nothing declares what should be pinned" };
|
|
729
|
+
}
|
|
730
|
+
let entries;
|
|
731
|
+
try {
|
|
732
|
+
entries = manifestServiceEntries(loaded.manifest);
|
|
733
|
+
} catch (err) {
|
|
734
|
+
return { assertionNotRun: `${loaded.path} is unusable: ${err.message}` };
|
|
735
|
+
}
|
|
736
|
+
const inspected = inspectRunningContainers();
|
|
737
|
+
const containers = Array.isArray(inspected) ? inspected : entries.map((e) => ({
|
|
738
|
+
name: e.composeService ?? e.service,
|
|
739
|
+
unreadable: inspected.unreadable
|
|
740
|
+
}));
|
|
741
|
+
const env = readHostEnv(options.envPath);
|
|
742
|
+
const { services, skipped, notApplicable } = buildServiceObservations({
|
|
743
|
+
entries,
|
|
744
|
+
manifestPath: loaded.path,
|
|
745
|
+
env,
|
|
746
|
+
envPath: options.envPath,
|
|
747
|
+
containers
|
|
748
|
+
});
|
|
749
|
+
return compareDeployPins(services, {
|
|
750
|
+
resolveDistance: gitDistanceResolver(options.repoPath),
|
|
751
|
+
sources: `${loaded.path} + ${options.envPath} + docker inspect`,
|
|
752
|
+
skipped,
|
|
753
|
+
notApplicable
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
function printPinAgreement(report) {
|
|
757
|
+
console.log(
|
|
758
|
+
`
|
|
759
|
+
Pin agreement \u2014 manifest vs host .env vs running container (${report.inventory.services} service(s); ${report.inventory.sources})
|
|
760
|
+
`
|
|
761
|
+
);
|
|
762
|
+
for (const s of report.services) {
|
|
763
|
+
console.log(` ${PIN_ICON[s.verdict]} ${s.service.padEnd(22)} ${s.verdict}`);
|
|
764
|
+
for (const line of s.disagreements) console.log(` ${line}`);
|
|
765
|
+
for (const line of s.unverified) console.log(` ${line}`);
|
|
766
|
+
}
|
|
767
|
+
for (const na of report.notApplicable) {
|
|
768
|
+
console.log(` \u26AA ${na.service.padEnd(22)} NOT APPLICABLE`);
|
|
769
|
+
console.log(` ${na.reason}`);
|
|
770
|
+
}
|
|
771
|
+
for (const sk of report.skipped) {
|
|
772
|
+
console.log(` \u26AA ${sk.service.padEnd(22)} NOT INSTALLED HERE`);
|
|
773
|
+
console.log(` ${sk.reason}`);
|
|
774
|
+
}
|
|
775
|
+
console.log(
|
|
776
|
+
`
|
|
777
|
+
AGREED: ${report.counts.AGREED} DRIFTED: ${report.counts.DRIFTED} UNVERIFIED: ${report.counts.UNVERIFIED} not applicable: ${report.notApplicable.length} not installed: ${report.skipped.length}
|
|
778
|
+
`
|
|
779
|
+
);
|
|
780
|
+
if (!report.clean && report.inventory.services === 0) {
|
|
781
|
+
console.log(" \u26A0\uFE0F zero services evaluated \u2014 this is NOT a clean result\n");
|
|
782
|
+
}
|
|
783
|
+
}
|
|
189
784
|
function main(argv) {
|
|
190
785
|
const args = argv.slice(2);
|
|
191
786
|
const json = args.includes("--json");
|
|
192
787
|
const enforce = args.includes("--enforce") || process.env.EXE_VERIFY_RUNNING_IMAGES_ENFORCE === "1";
|
|
193
788
|
const manifestIdx = args.indexOf("--manifest");
|
|
194
789
|
const manifestPath = manifestIdx !== -1 ? args[manifestIdx + 1] : void 0;
|
|
790
|
+
const envIdx = args.indexOf("--stack-env");
|
|
791
|
+
const envPath = (envIdx !== -1 ? args[envIdx + 1] : void 0) ?? DEFAULT_HOST_ENV;
|
|
792
|
+
const repoIdx = args.indexOf("--repo");
|
|
793
|
+
const repoPath = repoIdx !== -1 ? args[repoIdx + 1] : void 0;
|
|
195
794
|
const names = runningContainerNames();
|
|
196
795
|
if (names.length === 0) {
|
|
197
796
|
console.error("::warning::no running containers found (is docker available?)");
|
|
@@ -212,14 +811,18 @@ function main(argv) {
|
|
|
212
811
|
// dismiss — see limitation 4 in delivery-truth.ts.
|
|
213
812
|
reportNotRunning: declared.length > 0
|
|
214
813
|
});
|
|
814
|
+
const pin = runPinAgreement({ manifestPath, envPath, repoPath });
|
|
815
|
+
const pinReport = "assertionNotRun" in pin ? void 0 : pin;
|
|
816
|
+
const pinBlocked = pinReport === void 0 || !pinReport.clean;
|
|
215
817
|
if (json) {
|
|
216
818
|
console.log(
|
|
217
819
|
JSON.stringify(
|
|
218
820
|
{
|
|
219
|
-
ok: findings.length === 0 && liveState.findings.length === 0,
|
|
821
|
+
ok: findings.length === 0 && liveState.findings.length === 0 && !pinBlocked,
|
|
220
822
|
checked: containers.length,
|
|
221
823
|
findings,
|
|
222
824
|
liveState,
|
|
825
|
+
pinAgreement: pinReport ?? { assertionNotRun: pin.assertionNotRun },
|
|
223
826
|
// The contract the bug/task close gates should consume (#690/#694).
|
|
224
827
|
delivery: deliveryStateOf(liveState)
|
|
225
828
|
},
|
|
@@ -243,19 +846,43 @@ function main(argv) {
|
|
|
243
846
|
} else {
|
|
244
847
|
printLiveState(liveState);
|
|
245
848
|
}
|
|
849
|
+
if (pinReport) {
|
|
850
|
+
printPinAgreement(pinReport);
|
|
851
|
+
} else {
|
|
852
|
+
console.log(
|
|
853
|
+
` \u26A0\uFE0F pin agreement SKIPPED \u2014 ${pin.assertionNotRun}. This is not a pass: nothing was compared.`
|
|
854
|
+
);
|
|
855
|
+
}
|
|
246
856
|
}
|
|
247
857
|
const enforceable = liveState.findings.filter((f) => f.verdict !== "not-running");
|
|
248
|
-
const
|
|
858
|
+
const pinFindings = pinReport ? pinReport.services.filter((s) => s.verdict !== "AGREED") : [];
|
|
859
|
+
const nothingVerified = pinReport !== void 0 && !pinReport.clean && pinFindings.length === 0;
|
|
860
|
+
const total = findings.length + enforceable.length + pinFindings.length + (pinReport ? 0 : 1) + (nothingVerified ? 1 : 0);
|
|
249
861
|
if (total === 0) return 0;
|
|
250
862
|
if (!enforce) {
|
|
251
863
|
console.error(
|
|
252
|
-
`::warning::${findings.length} running-image finding(s)
|
|
864
|
+
`::warning::${findings.length} running-image finding(s), ${liveState.findings.length} live-vs-declared finding(s) and ${pinFindings.length} pin-agreement finding(s) (${pinReport ? `${pinReport.counts.DRIFTED} DRIFTED, ${pinReport.counts.UNVERIFIED} UNVERIFIED` : "assertion SKIPPED"}${nothingVerified ? "; ZERO services verified" : ""}) \u2014 WARN-first, not failing. Pass --enforce (or EXE_VERIFY_RUNNING_IMAGES_ENFORCE=1) to fail closed.`
|
|
253
865
|
);
|
|
254
866
|
return 0;
|
|
255
867
|
}
|
|
256
868
|
for (const f of enforceable) {
|
|
257
869
|
console.error(`::error::[${f.verdict}] ${f.service}: ${f.detail}`);
|
|
258
870
|
}
|
|
871
|
+
for (const s of pinFindings) {
|
|
872
|
+
for (const line of [...s.disagreements, ...s.unverified]) {
|
|
873
|
+
console.error(`::error::[${s.verdict}] ${s.service}: ${line}`);
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
if (!pinReport) {
|
|
877
|
+
console.error(
|
|
878
|
+
`::error::[pin-agreement] SKIPPED \u2014 ${pin.assertionNotRun}. A comparison that did not run is not a pass.`
|
|
879
|
+
);
|
|
880
|
+
}
|
|
881
|
+
if (nothingVerified && pinReport) {
|
|
882
|
+
console.error(
|
|
883
|
+
`::error::[pin-agreement] ZERO services verified \u2014 ${pinReport.notApplicable.length} not applicable, ${pinReport.skipped.length} not installed here, 0 compared. Nothing was observed, so nothing was verified: this is not a pass.`
|
|
884
|
+
);
|
|
885
|
+
}
|
|
259
886
|
console.error(
|
|
260
887
|
`::error::${total} finding(s): ${findings.length} container(s) do not resolve to a known release; ${enforceable.length} artifact(s) are not the artifact the signed manifest pins.`
|
|
261
888
|
);
|