@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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listBehaviors
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YA5LK6KB.js";
|
|
4
4
|
import {
|
|
5
5
|
incrementSkillUsage
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-N32DVIKY.js";
|
|
7
7
|
|
|
8
8
|
// src/lib/behavior-injection.ts
|
|
9
9
|
import { appendFile } from "fs/promises";
|
|
@@ -349,6 +349,8 @@ async function injectBehaviors(opts) {
|
|
|
349
349
|
`[behavior-injection] ${opts.assignedTo} <- ${selected.length}/${behaviors.length} behaviour(s) for "${opts.title.slice(0, 60)}": ` + selected.map((s) => `${s.behavior.id.slice(0, 8)}(${s.score.toFixed(2)})`).join(" ") + "\n"
|
|
350
350
|
);
|
|
351
351
|
await incrementSkillUsage(selected.map((s) => s.behavior));
|
|
352
|
+
const { recordBehaviorsConsulted } = await import("./skill-usage-NDB67PU2.js");
|
|
353
|
+
await recordBehaviorsConsulted(selected.map((s) => s.behavior.id));
|
|
352
354
|
return selected;
|
|
353
355
|
} catch (err) {
|
|
354
356
|
process.stderr.write(
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import {
|
|
2
|
+
orgMembershipsPath,
|
|
3
|
+
readActiveOrgMemberships
|
|
4
|
+
} from "./chunk-GDLB6BPM.js";
|
|
5
|
+
import {
|
|
6
|
+
resolveExeDataDir
|
|
7
|
+
} from "./chunk-NPXIS2RY.js";
|
|
8
|
+
|
|
9
|
+
// src/lib/org-departure.ts
|
|
10
|
+
import { existsSync as existsSync3, mkdirSync as mkdirSync3, readFileSync as readFileSync3, rmSync, writeFileSync as writeFileSync3 } from "fs";
|
|
11
|
+
import os2 from "os";
|
|
12
|
+
import path3 from "path";
|
|
13
|
+
|
|
14
|
+
// src/lib/seat-heartbeat.ts
|
|
15
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
16
|
+
import { createHash } from "crypto";
|
|
17
|
+
import path from "path";
|
|
18
|
+
import os from "os";
|
|
19
|
+
var EXE_DIR = process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path.join(os.homedir(), ".exe-os");
|
|
20
|
+
var STATE_PATH = path.join(EXE_DIR, "seat-presence.json");
|
|
21
|
+
var WEEK_MS = 7 * 24 * 60 * 60 * 1e3;
|
|
22
|
+
var HOUR_MS = 60 * 60 * 1e3;
|
|
23
|
+
var JITTER_HALF_WIDTH_MS = 72 * HOUR_MS;
|
|
24
|
+
var JITTER_BASE_OFFSET_MS = 84 * HOUR_MS;
|
|
25
|
+
var MAX_TRACKED_WINDOWS = 8;
|
|
26
|
+
function emptyOrgs() {
|
|
27
|
+
return /* @__PURE__ */ Object.create(null);
|
|
28
|
+
}
|
|
29
|
+
var EMPTY_STATE = { version: 1, orgs: emptyOrgs() };
|
|
30
|
+
function readSeatPresenceState() {
|
|
31
|
+
try {
|
|
32
|
+
if (!existsSync(STATE_PATH)) return { ...EMPTY_STATE, orgs: emptyOrgs() };
|
|
33
|
+
const parsed = JSON.parse(readFileSync(STATE_PATH, "utf-8"));
|
|
34
|
+
if (!parsed || typeof parsed !== "object" || typeof parsed.orgs !== "object" || parsed.orgs === null) {
|
|
35
|
+
return { ...EMPTY_STATE, orgs: emptyOrgs() };
|
|
36
|
+
}
|
|
37
|
+
const orgs = emptyOrgs();
|
|
38
|
+
for (const [org, entry] of Object.entries(parsed.orgs)) {
|
|
39
|
+
const e = entry;
|
|
40
|
+
orgs[org] = {
|
|
41
|
+
observed: sanitizeWindows(e?.observed),
|
|
42
|
+
sent: sanitizeWindows(e?.sent)
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
return { version: 1, orgs };
|
|
46
|
+
} catch {
|
|
47
|
+
return { ...EMPTY_STATE, orgs: emptyOrgs() };
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function sanitizeWindows(value) {
|
|
51
|
+
if (!Array.isArray(value)) return [];
|
|
52
|
+
return value.filter((v) => typeof v === "string" && /^\d{4}-W\d{2}$/.test(v)).slice(-MAX_TRACKED_WINDOWS);
|
|
53
|
+
}
|
|
54
|
+
function writeSeatPresenceState(state) {
|
|
55
|
+
try {
|
|
56
|
+
mkdirSync(EXE_DIR, { recursive: true });
|
|
57
|
+
writeFileSync(STATE_PATH, JSON.stringify(state, null, 2), { encoding: "utf-8", mode: 384 });
|
|
58
|
+
} catch {
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function forgetSeatPresence(orgId) {
|
|
62
|
+
const state = readSeatPresenceState();
|
|
63
|
+
if (!(orgId in state.orgs)) return;
|
|
64
|
+
delete state.orgs[orgId];
|
|
65
|
+
writeSeatPresenceState(state);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// src/lib/org-admin-scope.ts
|
|
69
|
+
import { existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync as readFileSync2, renameSync, writeFileSync as writeFileSync2 } from "fs";
|
|
70
|
+
import path2 from "path";
|
|
71
|
+
var ORG_ADMIN_SCOPE_FILENAME = "org-admin-scope.json";
|
|
72
|
+
var ORG_ID_RE = /^(?!\.{1,2}$)[a-z0-9._:-]{1,128}$/;
|
|
73
|
+
function orgAdminScopePath() {
|
|
74
|
+
return path2.join(resolveExeDataDir(), ORG_ADMIN_SCOPE_FILENAME);
|
|
75
|
+
}
|
|
76
|
+
function normalizeOrgId(raw) {
|
|
77
|
+
if (typeof raw !== "string") return null;
|
|
78
|
+
const folded = raw.trim().toLowerCase();
|
|
79
|
+
return ORG_ID_RE.test(folded) ? folded : null;
|
|
80
|
+
}
|
|
81
|
+
function readAdministeredOrgs() {
|
|
82
|
+
const file = orgAdminScopePath();
|
|
83
|
+
if (!existsSync2(file)) return [];
|
|
84
|
+
let raw;
|
|
85
|
+
try {
|
|
86
|
+
raw = readFileSync2(file, "utf8");
|
|
87
|
+
} catch (err) {
|
|
88
|
+
if (err.code === "ENOENT") return [];
|
|
89
|
+
throw err;
|
|
90
|
+
}
|
|
91
|
+
const parsed = JSON.parse(raw);
|
|
92
|
+
const orgs = parsed?.orgs;
|
|
93
|
+
if (!Array.isArray(orgs)) return [];
|
|
94
|
+
const out = [];
|
|
95
|
+
for (const entry of orgs) {
|
|
96
|
+
const id = normalizeOrgId(entry);
|
|
97
|
+
if (id && !out.includes(id)) out.push(id);
|
|
98
|
+
}
|
|
99
|
+
return out;
|
|
100
|
+
}
|
|
101
|
+
function listAdministeredOrgs() {
|
|
102
|
+
try {
|
|
103
|
+
return readAdministeredOrgs();
|
|
104
|
+
} catch {
|
|
105
|
+
return [];
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function recordOrgAdminship(orgId) {
|
|
109
|
+
const id = normalizeOrgId(orgId);
|
|
110
|
+
if (!id) return;
|
|
111
|
+
try {
|
|
112
|
+
const existing = readAdministeredOrgs();
|
|
113
|
+
if (existing.includes(id)) return;
|
|
114
|
+
const next = { version: 1, orgs: [...existing, id] };
|
|
115
|
+
const file = orgAdminScopePath();
|
|
116
|
+
mkdirSync2(path2.dirname(file), { recursive: true });
|
|
117
|
+
const tmp = `${file}.tmp`;
|
|
118
|
+
writeFileSync2(tmp, `${JSON.stringify(next, null, 2)}
|
|
119
|
+
`, { mode: 384 });
|
|
120
|
+
renameSync(tmp, file);
|
|
121
|
+
} catch {
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
function forgetOrgAdminship(orgId) {
|
|
125
|
+
const id = normalizeOrgId(orgId);
|
|
126
|
+
if (!id) return false;
|
|
127
|
+
const existing = listAdministeredOrgs();
|
|
128
|
+
if (!existing.includes(id)) return false;
|
|
129
|
+
const next = { version: 1, orgs: existing.filter((o) => o !== id) };
|
|
130
|
+
const file = orgAdminScopePath();
|
|
131
|
+
mkdirSync2(path2.dirname(file), { recursive: true });
|
|
132
|
+
const tmp = `${file}.tmp`;
|
|
133
|
+
writeFileSync2(tmp, `${JSON.stringify(next, null, 2)}
|
|
134
|
+
`, { mode: 384 });
|
|
135
|
+
renameSync(tmp, file);
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
function candidateAdminOrgIds() {
|
|
139
|
+
const out = [...listAdministeredOrgs()];
|
|
140
|
+
let memberships = [];
|
|
141
|
+
try {
|
|
142
|
+
memberships = readActiveOrgMemberships();
|
|
143
|
+
} catch {
|
|
144
|
+
memberships = [];
|
|
145
|
+
}
|
|
146
|
+
for (const m of memberships) {
|
|
147
|
+
const id = normalizeOrgId(m.org_id);
|
|
148
|
+
if (id && !out.includes(id)) out.push(id);
|
|
149
|
+
}
|
|
150
|
+
return out;
|
|
151
|
+
}
|
|
152
|
+
function orgAdminScopePresent() {
|
|
153
|
+
return candidateAdminOrgIds().length > 0;
|
|
154
|
+
}
|
|
155
|
+
function resolveTargetOrgId(explicit) {
|
|
156
|
+
if (explicit !== void 0 && explicit.trim() !== "") {
|
|
157
|
+
const id = normalizeOrgId(explicit);
|
|
158
|
+
if (!id) {
|
|
159
|
+
return {
|
|
160
|
+
error: `"${explicit}" is not a usable org id. An org id is a handle, not a company name: 1-128 characters of [a-z0-9._:-] (capitals are folded).`
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
return { orgId: id };
|
|
164
|
+
}
|
|
165
|
+
const candidates = candidateAdminOrgIds();
|
|
166
|
+
if (candidates.length === 1) return { orgId: candidates[0] };
|
|
167
|
+
if (candidates.length === 0) {
|
|
168
|
+
return {
|
|
169
|
+
error: "No org_id given and this install knows of no org. Pass org_id explicitly, or create one with org_create / join one with org_join first."
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
return {
|
|
173
|
+
error: `No org_id given and this install knows of ${candidates.length}: ${candidates.join(", ")}. Pass org_id explicitly \u2014 guessing which company an administrative action lands on is not a thing this tool will do.`
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// src/lib/org-departure.ts
|
|
178
|
+
var EXE_DIR2 = process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path3.join(os2.homedir(), ".exe-os");
|
|
179
|
+
var PER_ORG_STATE_DIRS = [
|
|
180
|
+
{
|
|
181
|
+
root: path3.join(EXE_DIR2, "org-outbox"),
|
|
182
|
+
store: "mailbox outbox",
|
|
183
|
+
why: "queued sealed envelopes addressed to the org \u2014 an outbound channel to a former employer"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
root: path3.join(EXE_DIR2, "org-inbox"),
|
|
187
|
+
store: "mailbox inbox",
|
|
188
|
+
why: "poll cursors and sequence state that keep this install polling an org it left"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
root: path3.join(EXE_DIR2, "org-requests"),
|
|
192
|
+
store: "task requests",
|
|
193
|
+
why: "inbound task_requests that could still be accepted into the task list after leaving"
|
|
194
|
+
}
|
|
195
|
+
];
|
|
196
|
+
function orgSegment(orgId) {
|
|
197
|
+
return orgId.replace(/[^A-Za-z0-9._:-]/g, "_").slice(0, 128);
|
|
198
|
+
}
|
|
199
|
+
function readMembershipsFile() {
|
|
200
|
+
const p = orgMembershipsPath();
|
|
201
|
+
if (!existsSync3(p)) return { version: 1, memberships: [] };
|
|
202
|
+
try {
|
|
203
|
+
const parsed = JSON.parse(readFileSync3(p, "utf-8"));
|
|
204
|
+
if (!Array.isArray(parsed?.memberships)) return { version: 1, memberships: [] };
|
|
205
|
+
return { version: typeof parsed.version === "number" ? parsed.version : 1, memberships: parsed.memberships };
|
|
206
|
+
} catch {
|
|
207
|
+
return { version: 1, memberships: [] };
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
function writeMembershipsFile(file) {
|
|
211
|
+
const p = orgMembershipsPath();
|
|
212
|
+
mkdirSync3(path3.dirname(p), { recursive: true });
|
|
213
|
+
writeFileSync3(p, JSON.stringify(file, null, 2), { encoding: "utf-8", mode: 384 });
|
|
214
|
+
}
|
|
215
|
+
async function departOrgToPersonalFreeTier(orgIdRaw, cause = "left") {
|
|
216
|
+
const orgId = orgIdRaw.trim().toLowerCase();
|
|
217
|
+
const notes = [];
|
|
218
|
+
const failures = [];
|
|
219
|
+
const file = readMembershipsFile();
|
|
220
|
+
let changed = false;
|
|
221
|
+
for (const m of file.memberships) {
|
|
222
|
+
if (typeof m.org_id === "string" && m.org_id.toLowerCase() === orgId && m.status !== "revoked") {
|
|
223
|
+
m.status = "revoked";
|
|
224
|
+
m.departed_cause = cause;
|
|
225
|
+
changed = true;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
if (changed) {
|
|
229
|
+
try {
|
|
230
|
+
writeMembershipsFile(file);
|
|
231
|
+
} catch (err) {
|
|
232
|
+
failures.push(
|
|
233
|
+
`the local membership record was NOT updated (${err instanceof Error ? err.message : String(err)}). Your Partner is unaffected and the org side has already ended the membership, but this install still believes it belongs to the org.`
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
let consentCleared = false;
|
|
238
|
+
const consentStatePath = path3.join(EXE_DIR2, "org-consent", orgSegment(orgId), "consent-state.json");
|
|
239
|
+
if (!existsSync3(consentStatePath)) {
|
|
240
|
+
consentCleared = true;
|
|
241
|
+
notes.push(`No standing consent policies existed for ${orgId}; there was nothing to disarm.`);
|
|
242
|
+
} else try {
|
|
243
|
+
const { clearStandingPolicies } = await import("./org-consent-policy-KFUP7QPG.js");
|
|
244
|
+
await clearStandingPolicies(orgId);
|
|
245
|
+
consentCleared = true;
|
|
246
|
+
} catch (err) {
|
|
247
|
+
failures.push(
|
|
248
|
+
`standing consent policies for ${orgId} were NOT cleared (${err instanceof Error ? err.message : String(err)}). They may still be armed. Re-run the departure from a session with consent initialized, or clear them explicitly.`
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
let presenceForgotten = false;
|
|
252
|
+
try {
|
|
253
|
+
forgetSeatPresence(orgId);
|
|
254
|
+
presenceForgotten = true;
|
|
255
|
+
} catch (err) {
|
|
256
|
+
failures.push(
|
|
257
|
+
`seat presence for ${orgId} was NOT forgotten (${err instanceof Error ? err.message : String(err)}). This install may keep reporting presence for an org it has left.`
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
let pollerStopped = false;
|
|
261
|
+
try {
|
|
262
|
+
const { stopOrgPartnerPollerFor } = await import("./org-partner-runtime-TH3LMPII.js");
|
|
263
|
+
pollerStopped = await stopOrgPartnerPollerFor(orgId);
|
|
264
|
+
} catch (err) {
|
|
265
|
+
failures.push(
|
|
266
|
+
`the inbox poller for ${orgId} was NOT stopped (${err instanceof Error ? err.message : String(err)}). It may keep polling the org and may recreate the state removed below. Restart this install to be certain it has stopped.`
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
let seqFloor = 0;
|
|
270
|
+
try {
|
|
271
|
+
const { preserveOutboundSeqFloor } = await import("./task-request-inbox-PKJCYKJV.js");
|
|
272
|
+
seqFloor = preserveOutboundSeqFloor(orgId);
|
|
273
|
+
if (seqFloor > 0) {
|
|
274
|
+
notes.push(
|
|
275
|
+
`Outbound envelope seq ${seqFloor} recorded as spent for ${orgId}, so rejoining this org from this device resumes the series instead of restarting it.`
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
} catch (err) {
|
|
279
|
+
failures.push(
|
|
280
|
+
`the outbound seq floor for ${orgId} was NOT recorded (${err instanceof Error ? err.message : String(err)}). If this device rejoins this org, its receipts and briefs may be refused as replays until the counter passes the relay's watermark.`
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
const purged = [];
|
|
284
|
+
for (const { root, store, why } of PER_ORG_STATE_DIRS) {
|
|
285
|
+
const dir = path3.join(root, orgSegment(orgId));
|
|
286
|
+
try {
|
|
287
|
+
if (!existsSync3(dir)) continue;
|
|
288
|
+
rmSync(dir, { recursive: true, force: true });
|
|
289
|
+
purged.push(store);
|
|
290
|
+
} catch (err) {
|
|
291
|
+
failures.push(
|
|
292
|
+
`${store} state for ${orgId} was NOT removed (${err instanceof Error ? err.message : String(err)}): ${why}.`
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
let adminScopeForgotten = false;
|
|
297
|
+
try {
|
|
298
|
+
adminScopeForgotten = forgetOrgAdminship(orgId);
|
|
299
|
+
} catch (err) {
|
|
300
|
+
failures.push(
|
|
301
|
+
`the local adminship note for ${orgId} was NOT removed (${err instanceof Error ? err.message : String(err)}).`
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
const remaining = readMembershipsFile().memberships.filter((m) => m.status !== "revoked").map((m) => String(m.org_id));
|
|
305
|
+
notes.push(
|
|
306
|
+
"Your Partner, your keys, and your memory are untouched and stay on this machine. You continue on the personal FREE tier at no cost \u2014 leaving an organization never requires you to buy a plan to keep what is yours."
|
|
307
|
+
);
|
|
308
|
+
if (remaining.length === 0) {
|
|
309
|
+
notes.push(
|
|
310
|
+
"This install now belongs to no organization. It keeps working as a personal Partner; org-mode protections stay latched (clearing them is a separate, deliberate action)."
|
|
311
|
+
);
|
|
312
|
+
}
|
|
313
|
+
return {
|
|
314
|
+
org_id: orgId,
|
|
315
|
+
cause,
|
|
316
|
+
changed,
|
|
317
|
+
remaining_orgs: remaining,
|
|
318
|
+
personal_plan: "free",
|
|
319
|
+
partner_retained: true,
|
|
320
|
+
memory_retained: true,
|
|
321
|
+
consent_cleared: consentCleared,
|
|
322
|
+
seat_presence_forgotten: presenceForgotten,
|
|
323
|
+
state_dirs_purged: purged,
|
|
324
|
+
poller_stopped: pollerStopped,
|
|
325
|
+
outbound_seq_floor: seqFloor,
|
|
326
|
+
admin_scope_forgotten: adminScopeForgotten,
|
|
327
|
+
failures,
|
|
328
|
+
complete: failures.length === 0,
|
|
329
|
+
notes
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
function seatReportingOrgIds() {
|
|
333
|
+
return readMembershipsFile().memberships.filter((m) => m.status === "active").map((m) => String(m.org_id).toLowerCase());
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
export {
|
|
337
|
+
listAdministeredOrgs,
|
|
338
|
+
recordOrgAdminship,
|
|
339
|
+
candidateAdminOrgIds,
|
|
340
|
+
orgAdminScopePresent,
|
|
341
|
+
resolveTargetOrgId,
|
|
342
|
+
departOrgToPersonalFreeTier,
|
|
343
|
+
seatReportingOrgIds
|
|
344
|
+
};
|
|
@@ -3,25 +3,25 @@ import {
|
|
|
3
3
|
} from "./chunk-X2X3IGZU.js";
|
|
4
4
|
import {
|
|
5
5
|
resolvePartnerIdentities
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AIB2EWO2.js";
|
|
7
7
|
import {
|
|
8
8
|
OrgKeyPinConflictError,
|
|
9
9
|
orgKeyPinConfirmation,
|
|
10
10
|
pinOrgKey,
|
|
11
11
|
readOrgKeyPin
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZD6FZ3WL.js";
|
|
13
13
|
import {
|
|
14
14
|
displayFingerprint,
|
|
15
15
|
ed25519PrivateKeyFromSeed,
|
|
16
16
|
signKeyFingerprint
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-E5CKRHIZ.js";
|
|
18
18
|
import {
|
|
19
19
|
establishOrgMode,
|
|
20
20
|
upsertOrgMembership
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-GDLB6BPM.js";
|
|
22
22
|
import {
|
|
23
23
|
isValidX25519Recipient
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-CL2MU3OX.js";
|
|
25
25
|
|
|
26
26
|
// src/lib/org-join.ts
|
|
27
27
|
import { createHash, sign } from "crypto";
|
|
@@ -181,6 +181,11 @@ async function completeOrgJoin(input) {
|
|
|
181
181
|
`Refusing to pin the Org Key without the exact confirmation phrase ("${expected}").`
|
|
182
182
|
);
|
|
183
183
|
}
|
|
184
|
+
if (!input.claimPassphrase || input.claimPassphrase.trim().length === 0) {
|
|
185
|
+
throw new InviteError(
|
|
186
|
+
"Refusing to redeem without claim_passphrase \u2014 the passphrase issued alongside the invite code. An invite code by itself does not claim a seat."
|
|
187
|
+
);
|
|
188
|
+
}
|
|
184
189
|
const existing = readOrgKeyPin(input.offer.orgId);
|
|
185
190
|
if (existing) {
|
|
186
191
|
if (existing.org_key_sign_pub !== input.offer.orgKeySignPub || existing.org_key_x25519_pub !== input.offer.orgKeyX25519Pub) {
|
|
@@ -208,6 +213,10 @@ async function completeOrgJoin(input) {
|
|
|
208
213
|
headers,
|
|
209
214
|
body: JSON.stringify({
|
|
210
215
|
token: code,
|
|
216
|
+
// THE SECOND SECRET. MANDATORY for every redeem — see the field doc
|
|
217
|
+
// on CompleteOrgJoinInput. Checked already, above; sent here so the
|
|
218
|
+
// server's own compare-and-swap is the authority, not this client.
|
|
219
|
+
claim_passphrase: input.claimPassphrase,
|
|
211
220
|
// MANDATORY. The server checks this INSIDE the compare-and-swap, so the
|
|
212
221
|
// pin is something we DEMAND, not something the server announces to us.
|
|
213
222
|
// Together with the response comparison below it means a substitution
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
withScopedReadWindow
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GOVGG7HU.js";
|
|
4
4
|
import {
|
|
5
5
|
requireOrgPartnerBinding,
|
|
6
6
|
resolvePartnerIdentities
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AIB2EWO2.js";
|
|
8
8
|
import {
|
|
9
9
|
allocateOutboundSeq,
|
|
10
10
|
approveBriefManually,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
sealMailboxEnvelope,
|
|
23
23
|
unrecordedText,
|
|
24
24
|
verifyManifest
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-FDWI3T6I.js";
|
|
26
26
|
import {
|
|
27
27
|
queueMailboxDeposit
|
|
28
28
|
} from "./chunk-3FGBBJYM.js";
|
|
@@ -77,6 +77,7 @@ function spawnDbWriteWorker(dbPath, encryptionKey, opts) {
|
|
|
77
77
|
if (msg.error) cb.reject(new Error(msg.error));
|
|
78
78
|
else if (msg.memoryId) cb.resolve({ memoryId: msg.memoryId, version: msg.version, deduped: msg.deduped });
|
|
79
79
|
else if (typeof msg.deleted === "number") cb.resolve({ deleted: msg.deleted });
|
|
80
|
+
else if (msg.ok) cb.resolve({ ok: true, result: msg.result });
|
|
80
81
|
else cb.reject(new Error("invalid write-worker response"));
|
|
81
82
|
});
|
|
82
83
|
_worker.on("error", (err) => {
|
|
@@ -108,12 +109,22 @@ async function sweepSessionEventsRetentionInWorker(retentionDays) {
|
|
|
108
109
|
});
|
|
109
110
|
return { deleted: Number(result.deleted ?? 0) };
|
|
110
111
|
}
|
|
111
|
-
async function sweepConversationsRetentionInWorker(retentionDays) {
|
|
112
|
+
async function sweepConversationsRetentionInWorker(retentionDays, retentionMode) {
|
|
112
113
|
const result = await sendWriteWorkerRequest({
|
|
113
114
|
type: "sweep-conversations-retention",
|
|
114
|
-
retentionDays
|
|
115
|
+
retentionDays,
|
|
116
|
+
retentionMode
|
|
115
117
|
});
|
|
116
|
-
return {
|
|
118
|
+
return {
|
|
119
|
+
deleted: Number(result.deleted ?? 0),
|
|
120
|
+
archived: Number(result.archived ?? 0),
|
|
121
|
+
purged: Number(result.purged ?? 0),
|
|
122
|
+
mode: String(result.mode ?? "archive")
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
async function requestMaintenanceWrite(jobId, jobName, kind, payload) {
|
|
126
|
+
const result = await sendWriteWorkerRequest({ type: "maintenance-job-write", jobId, jobName, kind, payload });
|
|
127
|
+
return result.result;
|
|
117
128
|
}
|
|
118
129
|
function sendWriteWorkerRequest(payload) {
|
|
119
130
|
if (!_worker || !_workerReady) {
|
|
@@ -158,6 +169,7 @@ export {
|
|
|
158
169
|
writeMemoryInWorker,
|
|
159
170
|
sweepSessionEventsRetentionInWorker,
|
|
160
171
|
sweepConversationsRetentionInWorker,
|
|
172
|
+
requestMaintenanceWrite,
|
|
161
173
|
_getDbWriteWorkerForTests,
|
|
162
174
|
disposeDbWriteWorker
|
|
163
175
|
};
|
|
@@ -138,7 +138,7 @@ async function assertManifestSignature(manifest, publicKeyPem) {
|
|
|
138
138
|
"manifest carries no `signature`. Fleets that enforce EXE_STACK_PUBLIC_KEY reject unsigned manifests, so publishing one would ship a release no host can install. Re-sign with the custodied key: node scripts/sign-stack-manifest.mjs deploy/stack-manifests/v0.9.json"
|
|
139
139
|
);
|
|
140
140
|
}
|
|
141
|
-
const { verifyStackManifestSignature } = await import("./stack-update-
|
|
141
|
+
const { verifyStackManifestSignature } = await import("./stack-update-U53FBVCQ.js");
|
|
142
142
|
try {
|
|
143
143
|
verifyStackManifestSignature(manifest, publicKeyPem);
|
|
144
144
|
} catch (err) {
|
|
@@ -383,7 +383,7 @@ function registryProxyOptionsFromEnv(env = process.env) {
|
|
|
383
383
|
upstreamToken,
|
|
384
384
|
pullTokens,
|
|
385
385
|
allowedNamespace: env.EXE_REGISTRY_PROXY_ALLOWED_NAMESPACE || "askexe",
|
|
386
|
-
licenseValidatorUrl: env.EXE_REGISTRY_PROXY_LICENSE_VALIDATOR_URL || "https://
|
|
386
|
+
licenseValidatorUrl: env.EXE_REGISTRY_PROXY_LICENSE_VALIDATOR_URL || "https://cloud.askexe.com/auth/activate",
|
|
387
387
|
databaseUrl: env.EXE_REGISTRY_PROXY_DATABASE_URL || env.DATABASE_URL || void 0,
|
|
388
388
|
publisherTokens: parsePublisherTokens(env.EXE_REGISTRY_PROXY_PUBLISHER_TOKENS),
|
|
389
389
|
stackPublicKeyPem: readStackPublicKey(env)
|
|
@@ -424,10 +424,12 @@ async function validateLicenseKey(licenseKey, validatorUrl) {
|
|
|
424
424
|
const res = await fetch(validatorUrl, {
|
|
425
425
|
method: "POST",
|
|
426
426
|
headers: { "content-type": "application/json" },
|
|
427
|
-
body: JSON.stringify({ licenseKey }),
|
|
427
|
+
body: JSON.stringify({ apiKey: licenseKey }),
|
|
428
428
|
signal: AbortSignal.timeout(5e3)
|
|
429
429
|
});
|
|
430
|
-
|
|
430
|
+
if (!res.ok) return false;
|
|
431
|
+
const verdict = await res.json();
|
|
432
|
+
return verdict.valid === true;
|
|
431
433
|
} catch {
|
|
432
434
|
return false;
|
|
433
435
|
}
|
|
@@ -637,23 +639,9 @@ function createRegistryProxyServer(options) {
|
|
|
637
639
|
}
|
|
638
640
|
return manifestPoolInit;
|
|
639
641
|
}
|
|
640
|
-
async function isLicenseKeyValidLocally(pool, token) {
|
|
641
|
-
try {
|
|
642
|
-
const r = await pool.query(
|
|
643
|
-
"SELECT 1 FROM billing.licenses WHERE key = $1 AND status = 'active' AND (expires_at IS NULL OR expires_at > now()) LIMIT 1",
|
|
644
|
-
[token]
|
|
645
|
-
);
|
|
646
|
-
return r.rows.length > 0;
|
|
647
|
-
} catch (err) {
|
|
648
|
-
console.error("[registry-proxy] local license validation failed:", err instanceof Error ? err.message : String(err));
|
|
649
|
-
return false;
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
642
|
async function isManifestAuthorized(token) {
|
|
653
643
|
if (timingSafeIncludes(options.pullTokens, token)) return true;
|
|
654
644
|
if (!isLicenseKeyFormat(token)) return false;
|
|
655
|
-
const pool = await getManifestPool();
|
|
656
|
-
if (pool && await isLicenseKeyValidLocally(pool, token)) return true;
|
|
657
645
|
if (options.licenseValidatorUrl) return validateLicenseKey(token, options.licenseValidatorUrl);
|
|
658
646
|
return false;
|
|
659
647
|
}
|
|
@@ -937,12 +925,12 @@ async function runRegistryProxy(options = registryProxyOptionsFromEnv()) {
|
|
|
937
925
|
await new Promise((resolve) => server.listen(options.port, options.host, resolve));
|
|
938
926
|
console.log(`exe-registry-proxy listening on ${options.host ?? "0.0.0.0"}:${options.port}`);
|
|
939
927
|
console.log(`proxying /v2/${options.allowedNamespace ?? "askexe"}/* -> ${options.upstream ?? "https://ghcr.io"}`);
|
|
940
|
-
const { licenseSyncConfigFromEnv, startLicenseSyncScheduler } = await import("./license-sync-
|
|
928
|
+
const { licenseSyncConfigFromEnv, startLicenseSyncScheduler } = await import("./license-sync-76JVI2M5.js");
|
|
941
929
|
const syncConfig = licenseSyncConfigFromEnv();
|
|
942
930
|
if (syncConfig) {
|
|
943
931
|
startLicenseSyncScheduler(syncConfig);
|
|
944
932
|
console.log(
|
|
945
|
-
`[license-sync] scheduler started (interval=${syncConfig.intervalMs ?? 36e5}ms,
|
|
933
|
+
`[license-sync] scheduler started (interval=${syncConfig.intervalMs ?? 36e5}ms, GoTrue\u2192billing.licenses, one-way)`
|
|
946
934
|
);
|
|
947
935
|
}
|
|
948
936
|
}
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
dispatchTaskToEmployee,
|
|
3
3
|
markTaskNotificationsRead,
|
|
4
4
|
notifyTaskDone
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-D4C57S2H.js";
|
|
6
6
|
import {
|
|
7
7
|
clearCurrentTask,
|
|
8
8
|
writeCurrentTask
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
strictSessionScopeFilter,
|
|
20
20
|
updateTaskStatus,
|
|
21
21
|
writeNotification
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-QDVLVLXP.js";
|
|
23
23
|
import {
|
|
24
24
|
getAgentContext
|
|
25
25
|
} from "./chunk-GJV3WDWM.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
getClient,
|
|
31
31
|
getCoordinatorName,
|
|
32
32
|
isCoordinatorName
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-3UD3OF3X.js";
|
|
34
34
|
import {
|
|
35
35
|
isAutonomousTmuxSpawnEnabled
|
|
36
36
|
} from "./chunk-MMS2HBRT.js";
|
|
@@ -85,7 +85,7 @@ async function cascadeUnblock(taskId, baseDir, now) {
|
|
|
85
85
|
if (unblockedRows.rows.length > 0 && !process.env.VITEST) {
|
|
86
86
|
const autonomousSpawnAllowed = isAutonomousTmuxSpawnEnabled();
|
|
87
87
|
try {
|
|
88
|
-
const { dispatchTaskToEmployee: dispatchTaskToEmployee2 } = await import("./tasks-notify-
|
|
88
|
+
const { dispatchTaskToEmployee: dispatchTaskToEmployee2 } = await import("./tasks-notify-YND5MKWJ.js");
|
|
89
89
|
const dispatched = /* @__PURE__ */ new Set();
|
|
90
90
|
for (const ur of unblockedRows.rows) {
|
|
91
91
|
if (!unblockedRowMayAutoDispatch(ur, autonomousSpawnAllowed)) continue;
|
|
@@ -97,7 +97,7 @@ async function cascadeUnblock(taskId, baseDir, now) {
|
|
|
97
97
|
}
|
|
98
98
|
} catch {
|
|
99
99
|
try {
|
|
100
|
-
const { queueIntercom } = await import("./intercom-queue-
|
|
100
|
+
const { queueIntercom } = await import("./intercom-queue-OE25GJF2.js");
|
|
101
101
|
const dispatched = /* @__PURE__ */ new Set();
|
|
102
102
|
for (const ur of unblockedRows.rows) {
|
|
103
103
|
if (!unblockedRowIsDurableTmux(ur)) continue;
|
|
@@ -313,7 +313,7 @@ async function updateTask(input, deps = {}) {
|
|
|
313
313
|
try {
|
|
314
314
|
process.stderr.write(`[tasks] EVENT: tmux delivery failed for reviewer="${reviewer}". Queueing for daemon delivery.
|
|
315
315
|
`);
|
|
316
|
-
const { queueIntercom } = await import("./intercom-queue-
|
|
316
|
+
const { queueIntercom } = await import("./intercom-queue-OE25GJF2.js");
|
|
317
317
|
const { resolveExeSession } = await import("./lib/tmux-routing.js");
|
|
318
318
|
const exeSession = row.session_scope ? String(row.session_scope) : resolveExeSession();
|
|
319
319
|
if (exeSession) {
|
|
@@ -330,7 +330,7 @@ async function updateTask(input, deps = {}) {
|
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
try {
|
|
333
|
-
const { pushNotifyAsync } = await import("./push-notifications-
|
|
333
|
+
const { pushNotifyAsync } = await import("./push-notifications-XC6EQEXF.js");
|
|
334
334
|
pushNotifyAsync({
|
|
335
335
|
event: "review_ready",
|
|
336
336
|
title: `Review ready: ${taskTitle.slice(0, 50)}`,
|
|
@@ -342,7 +342,7 @@ async function updateTask(input, deps = {}) {
|
|
|
342
342
|
}
|
|
343
343
|
if (isLegacyExecution && !isCoordinator && isCompletionReviewTransition) {
|
|
344
344
|
try {
|
|
345
|
-
const { pushNotifyAsync } = await import("./push-notifications-
|
|
345
|
+
const { pushNotifyAsync } = await import("./push-notifications-XC6EQEXF.js");
|
|
346
346
|
const event = input.status === "needs_review" ? "review_ready" : "task_complete";
|
|
347
347
|
pushNotifyAsync({
|
|
348
348
|
event,
|
|
@@ -357,7 +357,7 @@ async function updateTask(input, deps = {}) {
|
|
|
357
357
|
await markTaskNotificationsRead(taskFile);
|
|
358
358
|
if (isLegacyExecution && isCompletionReviewTransition && !isCoordinator && row.reviewer) {
|
|
359
359
|
try {
|
|
360
|
-
const { writeNotification: writeNotification2 } = await import("./notifications-
|
|
360
|
+
const { writeNotification: writeNotification2 } = await import("./notifications-3R6HNHDR.js");
|
|
361
361
|
const reviewer = String(row.reviewer);
|
|
362
362
|
await writeNotification2({
|
|
363
363
|
agentId: reviewer,
|