@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
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
sanitizeSupportEndpointPath,
|
|
9
9
|
sanitizeUpstreamId,
|
|
10
10
|
sanitizeUpstreamPayload
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZUGQPYUY.js";
|
|
12
12
|
import {
|
|
13
13
|
isOlderThan
|
|
14
14
|
} from "./chunk-YRUZK2QA.js";
|
|
15
15
|
|
|
16
16
|
// src/lib/support-outbox.ts
|
|
17
|
-
import { mkdirSync, readdirSync, readFileSync, writeFileSync, existsSync } from "fs";
|
|
17
|
+
import { mkdirSync, readdirSync, readFileSync, writeFileSync, existsSync, unlinkSync } from "fs";
|
|
18
18
|
import { createHash } from "crypto";
|
|
19
19
|
import path from "path";
|
|
20
20
|
import os from "os";
|
|
@@ -246,6 +246,7 @@ function buildSupportPayload(kind, file, filePath, content) {
|
|
|
246
246
|
if (kind === "bug") {
|
|
247
247
|
const titleMatch2 = cleanContent.match(/^#\s*(.+)$/m);
|
|
248
248
|
const severityMatch = cleanContent.match(/^severity:\s*(.+)$/m);
|
|
249
|
+
const isGated = extractField(cleanContent, "gate_version") !== void 0;
|
|
249
250
|
return {
|
|
250
251
|
id,
|
|
251
252
|
title: titleMatch2?.[1]?.trim() ?? file,
|
|
@@ -256,6 +257,8 @@ function buildSupportPayload(kind, file, filePath, content) {
|
|
|
256
257
|
reproduction_steps: linesFromSection(extractSection(cleanContent, "Reproduction steps")),
|
|
257
258
|
expected: extractSection(cleanContent, "Expected behavior") ?? extractField(cleanContent, "expected"),
|
|
258
259
|
actual: extractSection(cleanContent, "Actual behavior") ?? extractField(cleanContent, "actual"),
|
|
260
|
+
observed_kind: extractField(extractSection(cleanContent, "Evidence") ?? "", "observed_kind"),
|
|
261
|
+
evidence_pointer: extractField(extractSection(cleanContent, "Evidence") ?? "", "evidence_pointer"),
|
|
259
262
|
workaround: extractSection(cleanContent, "Workaround"),
|
|
260
263
|
// Bug 4b8b47fd (P0-1): `markdown: content` (the entire raw, uncapped
|
|
261
264
|
// report body) and `report_path: filePath` (an absolute path leaking the
|
|
@@ -267,7 +270,8 @@ function buildSupportPayload(kind, file, filePath, content) {
|
|
|
267
270
|
project_name: extractField(cleanContent, "project_name") ?? extractField(cleanContent, "project"),
|
|
268
271
|
agent_id: extractField(cleanContent, "filed_by"),
|
|
269
272
|
agent_role: "outbox-flusher",
|
|
270
|
-
report_file: path.basename(filePath)
|
|
273
|
+
report_file: path.basename(filePath),
|
|
274
|
+
...isGated ? {} : { legacy_ungated: true }
|
|
271
275
|
};
|
|
272
276
|
}
|
|
273
277
|
const titleMatch = cleanContent.match(/^#\s*Feature Request\s*[—–-]\s*(.+)$/m);
|
|
@@ -289,6 +293,37 @@ function buildSupportPayload(kind, file, filePath, content) {
|
|
|
289
293
|
agent_role: "outbox-flusher"
|
|
290
294
|
};
|
|
291
295
|
}
|
|
296
|
+
var OUTBOX_OBSERVED_KINDS = /* @__PURE__ */ new Set(["failing_test", "command_output", "log_excerpt", "screenshot", "live_probe"]);
|
|
297
|
+
function validateBugFilingGate(payload) {
|
|
298
|
+
const missing = [];
|
|
299
|
+
const reproSteps = (Array.isArray(payload.reproduction_steps) ? payload.reproduction_steps : []).filter((s) => typeof s === "string" && s.trim() && s.trim() !== "Not provided");
|
|
300
|
+
if (reproSteps.length === 0) missing.push("reproduction_steps");
|
|
301
|
+
const expected = typeof payload.expected === "string" ? payload.expected.trim() : "";
|
|
302
|
+
if (!expected || expected === "Not provided") missing.push("expected");
|
|
303
|
+
const actual = typeof payload.actual === "string" ? payload.actual.trim() : "";
|
|
304
|
+
if (!actual || actual === "Not provided") missing.push("actual");
|
|
305
|
+
const observedKind = typeof payload.observed_kind === "string" ? payload.observed_kind : "";
|
|
306
|
+
if (!observedKind || observedKind === "Not provided" || !OUTBOX_OBSERVED_KINDS.has(observedKind)) {
|
|
307
|
+
missing.push("observed_kind");
|
|
308
|
+
}
|
|
309
|
+
const evidencePointer = typeof payload.evidence_pointer === "string" ? payload.evidence_pointer.trim() : "";
|
|
310
|
+
if (!evidencePointer || evidencePointer === "Not provided") missing.push("evidence_pointer");
|
|
311
|
+
return missing;
|
|
312
|
+
}
|
|
313
|
+
function rejectQueuedFile(dir, file, content, reasons) {
|
|
314
|
+
try {
|
|
315
|
+
const rejectedDir = path.join(dir, "rejected");
|
|
316
|
+
mkdirSync(rejectedDir, { recursive: true });
|
|
317
|
+
const reasonHeader = `upstream_rejected: true
|
|
318
|
+
rejected_at: ${(/* @__PURE__ */ new Date()).toISOString()}
|
|
319
|
+
rejected_reason: missing/invalid evidence field(s): ${reasons.join(", ")}
|
|
320
|
+
|
|
321
|
+
`;
|
|
322
|
+
writeFileSync(path.join(rejectedDir, file), reasonHeader + content, "utf-8");
|
|
323
|
+
unlinkSync(path.join(dir, file));
|
|
324
|
+
} catch {
|
|
325
|
+
}
|
|
326
|
+
}
|
|
292
327
|
function shouldBackoff() {
|
|
293
328
|
if (consecutiveFailures === 0) return false;
|
|
294
329
|
const backoffMs = Math.min(Math.pow(2, consecutiveFailures), MAX_BACKOFF_S) * 1e3;
|
|
@@ -360,6 +395,14 @@ ${SKIPPED_MARKER}
|
|
|
360
395
|
continue;
|
|
361
396
|
}
|
|
362
397
|
const payload = buildSupportPayload(kind, file, filePath, content);
|
|
398
|
+
if (kind === "bug" && !payload.legacy_ungated) {
|
|
399
|
+
const gateFailures = validateBugFilingGate(payload);
|
|
400
|
+
if (gateFailures.length > 0) {
|
|
401
|
+
rejectQueuedFile(dir, file, content, gateFailures);
|
|
402
|
+
errors++;
|
|
403
|
+
continue;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
363
406
|
const dedupeHash = payloadDedupeHash(kind, payload);
|
|
364
407
|
payload.idempotency_key = dedupeHash;
|
|
365
408
|
if (sentContentHashes.has(dedupeHash)) {
|
|
@@ -401,6 +444,10 @@ ${DUPLICATE_MARKER}: ${dedupeHash}
|
|
|
401
444
|
sentContentHashes.add(dedupeHash);
|
|
402
445
|
onNetworkSuccess();
|
|
403
446
|
sent++;
|
|
447
|
+
} else if (kind === "bug" && isDeterministicRejection(resp.status)) {
|
|
448
|
+
const serverErrorText = await resp.text().catch(() => `HTTP ${resp.status}`);
|
|
449
|
+
rejectQueuedFile(dir, file, content, [`server rejected (HTTP ${resp.status}): ${serverErrorText}`]);
|
|
450
|
+
errors++;
|
|
404
451
|
} else {
|
|
405
452
|
onNetworkFailure();
|
|
406
453
|
errors++;
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
loadLicense,
|
|
10
10
|
readCachedLicenseToken
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-FWRPDSO3.js";
|
|
12
12
|
import {
|
|
13
13
|
EXE_AI_DIR,
|
|
14
14
|
loadConfig
|
|
@@ -121,9 +121,14 @@ async function runTest(project) {
|
|
|
121
121
|
severity: "p3",
|
|
122
122
|
summary: "Synthetic exe-os support intake smoke test. Safe to close.",
|
|
123
123
|
customer_impact: "No customer impact; diagnostic only.",
|
|
124
|
-
reproduction_steps: ["Run exe-os support test"],
|
|
124
|
+
reproduction_steps: ["Run `exe-os support test`"],
|
|
125
125
|
expected: "The report reaches AskExe support intake and can be triaged.",
|
|
126
126
|
actual: "Smoke test submitted by exe-os support test.",
|
|
127
|
+
// Satisfies the server-side filing gate (PR #1437 P1-1) with genuine
|
|
128
|
+
// evidence rather than a special-cased bypass: this record's own creation
|
|
129
|
+
// IS the command output being declared.
|
|
130
|
+
observed_kind: "command_output",
|
|
131
|
+
evidence_pointer: "exe-os support test CLI run, local report at " + path.basename(reportPath),
|
|
127
132
|
package_version: `@askexenow/exe-os@${version}`,
|
|
128
133
|
project_name: project,
|
|
129
134
|
agent_id: "support-test",
|
|
@@ -282,7 +287,7 @@ function nextForPostFailure(status) {
|
|
|
282
287
|
return "Run `exe-os support health`; if it passes, send this output to AskExe.";
|
|
283
288
|
}
|
|
284
289
|
async function runFlush(json) {
|
|
285
|
-
const { flushSupportOutbox } = await import("./support-outbox-
|
|
290
|
+
const { flushSupportOutbox } = await import("./support-outbox-2TG2UV6J.js");
|
|
286
291
|
const result = await flushSupportOutbox({ maxPerFlush: 10, userInitiated: true });
|
|
287
292
|
if (json) {
|
|
288
293
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -305,7 +310,7 @@ async function runFlush(json) {
|
|
|
305
310
|
console.log("");
|
|
306
311
|
}
|
|
307
312
|
async function runStatus(json) {
|
|
308
|
-
const { getOutboxStatus } = await import("./support-outbox-
|
|
313
|
+
const { getOutboxStatus } = await import("./support-outbox-2TG2UV6J.js");
|
|
309
314
|
const status = await getOutboxStatus();
|
|
310
315
|
if (json) {
|
|
311
316
|
console.log(JSON.stringify(status, null, 2));
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
deactivateBehavior,
|
|
3
3
|
listBehaviors
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YA5LK6KB.js";
|
|
5
5
|
import {
|
|
6
6
|
IdentityConflictError,
|
|
7
7
|
IdentityLockError,
|
|
8
8
|
getIdentity,
|
|
9
9
|
mutateIdentity,
|
|
10
10
|
withIdentityLock
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3UD3OF3X.js";
|
|
12
12
|
|
|
13
13
|
// src/lib/behavior-promotion.ts
|
|
14
14
|
var PROMOTED_SECTION_HEADING = "## Promoted lessons (permanent \u2014 promoted from behaviours)";
|
|
@@ -2,19 +2,19 @@ import {
|
|
|
2
2
|
InviteError,
|
|
3
3
|
resolveAuth,
|
|
4
4
|
resolveEndpoint
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-P22VFGFK.js";
|
|
6
6
|
import {
|
|
7
7
|
asOrgBillablePlan
|
|
8
8
|
} from "./chunk-X2X3IGZU.js";
|
|
9
9
|
import {
|
|
10
10
|
resolvePartnerIdentities
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-AIB2EWO2.js";
|
|
12
12
|
import {
|
|
13
13
|
orgKeyFingerprintDisplay
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZD6FZ3WL.js";
|
|
15
15
|
import {
|
|
16
16
|
ed25519PrivateKeyFromSeed
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-E5CKRHIZ.js";
|
|
18
18
|
|
|
19
19
|
// src/lib/org-key-admin.ts
|
|
20
20
|
import { sign } from "crypto";
|
|
@@ -262,6 +262,7 @@ async function issueSeatInvite(input) {
|
|
|
262
262
|
seatRef: requireField(body, "seat_ref", what),
|
|
263
263
|
isAdmin: body.is_admin === true,
|
|
264
264
|
inviteToken: requireField(body, "invite_token", what),
|
|
265
|
+
claimPassphrase: requireField(body, "claim_passphrase", what),
|
|
265
266
|
expiresAt: requireField(body, "expires_at", what),
|
|
266
267
|
fingerprint: orgKeyFingerprintDisplay(signFp),
|
|
267
268
|
signFp,
|
|
@@ -4,16 +4,39 @@ import {
|
|
|
4
4
|
} from "./chunk-EIOGV75A.js";
|
|
5
5
|
import {
|
|
6
6
|
vectorToSqlLiteral
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5RK75SWH.js";
|
|
8
8
|
import {
|
|
9
9
|
blobToVector
|
|
10
10
|
} from "./chunk-OTVEIJUQ.js";
|
|
11
11
|
import {
|
|
12
|
-
getClient
|
|
13
|
-
|
|
12
|
+
getClient,
|
|
13
|
+
sanitizeBehaviorContent
|
|
14
|
+
} from "./chunk-3UD3OF3X.js";
|
|
14
15
|
|
|
15
16
|
// src/lib/behaviors.ts
|
|
16
17
|
import crypto from "crypto";
|
|
18
|
+
var BEHAVIOR_P0_HARD_CAP = (() => {
|
|
19
|
+
const raw = Number(process.env.EXE_BEHAVIOR_P0_CAP);
|
|
20
|
+
return Number.isFinite(raw) && raw > 0 ? Math.floor(raw) : 15;
|
|
21
|
+
})();
|
|
22
|
+
var USAGE_TRACKING_COLUMNS = ["consulted_count", "applied_count", "last_consulted_at", "last_applied_at"];
|
|
23
|
+
var MISSING_USAGE_COLUMN_RE = new RegExp(
|
|
24
|
+
`no such column:\\s*(?:\\w+\\.)?(?:${USAGE_TRACKING_COLUMNS.join("|")})\\b`,
|
|
25
|
+
"i"
|
|
26
|
+
);
|
|
27
|
+
function isMissingUsageColumnError(err) {
|
|
28
|
+
const msg = err instanceof Error ? err.message : String(err ?? "");
|
|
29
|
+
return MISSING_USAGE_COLUMN_RE.test(msg);
|
|
30
|
+
}
|
|
31
|
+
async function executeTolerantOfMissingUsageColumns(client, sql, args) {
|
|
32
|
+
try {
|
|
33
|
+
return await client.execute({ sql, args });
|
|
34
|
+
} catch (err) {
|
|
35
|
+
if (!isMissingUsageColumnError(err)) throw err;
|
|
36
|
+
const fallbackSql = sql.replace(/\bconsulted_count\b/g, "0 AS consulted_count").replace(/\bapplied_count\b/g, "0 AS applied_count").replace(/\blast_consulted_at\b/g, "NULL AS last_consulted_at").replace(/\blast_applied_at\b/g, "NULL AS last_applied_at");
|
|
37
|
+
return await client.execute({ sql: fallbackSql, args });
|
|
38
|
+
}
|
|
39
|
+
}
|
|
17
40
|
var GHOST_BEHAVIOR_SQL = "(id IS NULL OR trim(coalesce(content, '')) = '' OR (content = '(empty)' AND coalesce(agent_id, '') = 'unknown'))";
|
|
18
41
|
function isGhostBehaviorRow(row) {
|
|
19
42
|
const id = row.id;
|
|
@@ -28,10 +51,6 @@ var BEHAVIOR_CONTENT_MAX_LENGTH = 500;
|
|
|
28
51
|
function behaviorContentOverCapMessage(actualLength) {
|
|
29
52
|
return `Behavior content is ${actualLength} characters; the maximum is ${BEHAVIOR_CONTENT_MAX_LENGTH}. Behaviors are injected verbatim into agent context at boot \u2014 split this into separate, single-sentence behaviors.`;
|
|
30
53
|
}
|
|
31
|
-
var TOOL_FRAMING_TAG_RE = /<\/?(?:invoke|parameter|content|function_calls)\b[^>]*>/gi;
|
|
32
|
-
function sanitizeBehaviorContent(content) {
|
|
33
|
-
return content.replace(TOOL_FRAMING_TAG_RE, " ").replace(/\s{2,}/g, " ").trim();
|
|
34
|
-
}
|
|
35
54
|
function formatReflexContent(trigger, action) {
|
|
36
55
|
return `\u26A1 REFLEX: When ${trigger} \u2192 ${action}. Decide whether to act.`;
|
|
37
56
|
}
|
|
@@ -66,6 +85,23 @@ async function storeBehavior(opts) {
|
|
|
66
85
|
"[behaviors] Refusing to store a behavior with empty agent_id (ghost-row guard)."
|
|
67
86
|
);
|
|
68
87
|
}
|
|
88
|
+
const resolvedPriority = opts.priority ?? "p1";
|
|
89
|
+
const capMode = opts.onP0CapExceeded ?? "throw";
|
|
90
|
+
if (resolvedPriority === "p0") {
|
|
91
|
+
const existingP0 = await countActiveBehaviors(trimmedAgent, opts.projectName);
|
|
92
|
+
if (existingP0.p0 >= BEHAVIOR_P0_HARD_CAP) {
|
|
93
|
+
const detail = `"${trimmedAgent}" already has ${existingP0.p0} active p0 behaviors, at the configured cap of ${BEHAVIOR_P0_HARD_CAP} (env EXE_BEHAVIOR_P0_CAP). p0 behaviors are ALWAYS injected in full, so this cap exists to stop the always-injected block from growing without bound.`;
|
|
94
|
+
if (capMode === "throw") {
|
|
95
|
+
throw new Error(
|
|
96
|
+
`[behaviors] Refusing to store: ${detail} Consolidate an existing p0 rule into this one, demote one to p1 (behavior(action='store', priority='p1', ...) after deactivating the old row), or promote a long-stable one into identity with behavior(action='promote') to free a slot.`
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
process.stderr.write(
|
|
100
|
+
`[behaviors] \u26A0\uFE0F P0 CAP EXCEEDED (store-and-flag): ${detail} Storing anyway \u2014 this p0 rule will be injected, but the wall is now ${existingP0.p0 + 1} deep. Run behavior(action='list', priority='p0') and consolidate/demote/promote to bring it back under the cap.
|
|
101
|
+
`
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
69
105
|
try {
|
|
70
106
|
const { loadEmployeesSync, baseAgentName } = await import("./lib/employees.js");
|
|
71
107
|
const roster = loadEmployeesSync();
|
|
@@ -406,11 +442,12 @@ async function reactivateBehavior(id) {
|
|
|
406
442
|
}
|
|
407
443
|
|
|
408
444
|
export {
|
|
445
|
+
BEHAVIOR_P0_HARD_CAP,
|
|
446
|
+
executeTolerantOfMissingUsageColumns,
|
|
409
447
|
GHOST_BEHAVIOR_SQL,
|
|
410
448
|
isGhostBehaviorRow,
|
|
411
449
|
BEHAVIOR_CONTENT_MAX_LENGTH,
|
|
412
450
|
behaviorContentOverCapMessage,
|
|
413
|
-
sanitizeBehaviorContent,
|
|
414
451
|
formatReflexContent,
|
|
415
452
|
isReflexBehavior,
|
|
416
453
|
storeReflexBehavior,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
behaviorTruncationNotice
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OHZSTZXN.js";
|
|
4
4
|
import {
|
|
5
5
|
countActiveBehaviors,
|
|
6
6
|
listBehaviors
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YA5LK6KB.js";
|
|
8
8
|
import {
|
|
9
9
|
loadConfigSync
|
|
10
10
|
} from "./chunk-MMS2HBRT.js";
|
|
@@ -22,7 +22,7 @@ var OrgOriginProvenanceError = class extends Error {
|
|
|
22
22
|
async function mintOrgOriginStamp(input) {
|
|
23
23
|
if (!input.orgId) throw new OrgOriginProvenanceError("An org-origin stamp requires a non-empty org_id (\xA71.5)");
|
|
24
24
|
if (!input.requestId) throw new OrgOriginProvenanceError("An org-origin stamp requires a request id");
|
|
25
|
-
const { getTaskRequest } = await import("./task-request-inbox-
|
|
25
|
+
const { getTaskRequest } = await import("./task-request-inbox-PKJCYKJV.js");
|
|
26
26
|
const req = getTaskRequest(input.orgId, input.requestId);
|
|
27
27
|
if (!req) {
|
|
28
28
|
throw new OrgOriginProvenanceError(
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PLATFORM_PROCEDURES,
|
|
3
3
|
PLATFORM_PROCEDURE_TITLES
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IZWMWJZT.js";
|
|
5
5
|
import {
|
|
6
6
|
getClient
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3UD3OF3X.js";
|
|
8
8
|
|
|
9
9
|
// src/lib/global-procedures.ts
|
|
10
10
|
import { randomUUID } from "crypto";
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
// src/lib/hook-registration-liveness.ts
|
|
2
|
+
import { accessSync, constants, existsSync, readFileSync, statSync } from "fs";
|
|
3
|
+
import os from "os";
|
|
4
|
+
import path2 from "path";
|
|
5
|
+
|
|
6
|
+
// src/lib/hook-path-stability.ts
|
|
7
|
+
import path from "path";
|
|
8
|
+
var TRANSIENT_RULES = [
|
|
9
|
+
{
|
|
10
|
+
segments: ["_npx"],
|
|
11
|
+
reason: "npm's per-invocation `npx` cache \u2014 npm prunes it, `npm cache clean` wipes it, and the directory hash changes with the invocation spec"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
segments: ["_cacache"],
|
|
15
|
+
reason: "npm's content-addressable package cache \u2014 evicted by `npm cache clean` and by npm's own pruning"
|
|
16
|
+
},
|
|
17
|
+
{ segments: [".npm-cache"], reason: "an npm cache directory" },
|
|
18
|
+
{ segments: [".cache", "npm"], reason: "an npm cache directory" },
|
|
19
|
+
{ segments: [".cache", "yarn"], reason: "a yarn cache directory" },
|
|
20
|
+
{ segments: [".yarn", "berry", "cache"], reason: "a yarn berry cache directory" },
|
|
21
|
+
{ segments: [".yarn", "unplugged"], reason: "yarn's unplugged package cache \u2014 regenerated on install" },
|
|
22
|
+
{ segments: [".yarn", "$$virtual"], reason: "yarn's virtual package tree \u2014 synthesised per install" },
|
|
23
|
+
{ segments: [".pnpm-store"], reason: "the pnpm content-addressable store \u2014 pruned by `pnpm store prune`" },
|
|
24
|
+
{ segments: [".cache", "pnpm"], reason: "a pnpm cache directory" },
|
|
25
|
+
{ segments: [".bun", "install", "cache"], reason: "bun's install cache" },
|
|
26
|
+
{ segments: [".deno", "npm"], reason: "deno's npm package cache" }
|
|
27
|
+
];
|
|
28
|
+
function segmentsOf(p) {
|
|
29
|
+
const normalized = path.resolve(p);
|
|
30
|
+
const caseFolds = process.platform === "darwin" || process.platform === "win32";
|
|
31
|
+
return normalized.split(/[\\/]+/).filter(Boolean).map((s) => caseFolds ? s.toLowerCase() : s);
|
|
32
|
+
}
|
|
33
|
+
function matchesRule(segments, rule) {
|
|
34
|
+
const caseFolds = process.platform === "darwin" || process.platform === "win32";
|
|
35
|
+
const want = rule.segments.map((s) => caseFolds ? s.toLowerCase() : s);
|
|
36
|
+
for (let i = 0; i + want.length <= segments.length; i++) {
|
|
37
|
+
let hit = true;
|
|
38
|
+
for (let j = 0; j < want.length; j++) {
|
|
39
|
+
if (segments[i + j] !== want[j]) {
|
|
40
|
+
hit = false;
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (hit) return true;
|
|
45
|
+
}
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
function classifyInstallPath(p, env = process.env) {
|
|
49
|
+
const segments = segmentsOf(p);
|
|
50
|
+
for (const rule of TRANSIENT_RULES) {
|
|
51
|
+
if (matchesRule(segments, rule)) {
|
|
52
|
+
return {
|
|
53
|
+
transient: true,
|
|
54
|
+
marker: rule.segments.join(path.sep),
|
|
55
|
+
reason: rule.reason
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const configured = env.npm_config_cache ?? env.NPM_CONFIG_CACHE;
|
|
60
|
+
if (configured && configured.trim()) {
|
|
61
|
+
const cacheSegments = segmentsOf(configured.trim());
|
|
62
|
+
if (cacheSegments.length > 0 && cacheSegments.every((seg, i) => segments[i] === seg) && segments.length > cacheSegments.length) {
|
|
63
|
+
return {
|
|
64
|
+
transient: true,
|
|
65
|
+
marker: configured.trim(),
|
|
66
|
+
reason: "the directory npm_config_cache points at \u2014 package-manager cache, pruned without warning"
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return { transient: false };
|
|
71
|
+
}
|
|
72
|
+
function assertStableHookPath(hookPath, contextLabel = "hook") {
|
|
73
|
+
const verdict = classifyInstallPath(hookPath);
|
|
74
|
+
if (!verdict.transient) return;
|
|
75
|
+
throw new Error(
|
|
76
|
+
`[exe-os] REFUSING to register ${contextLabel} under a transient package cache: ${hookPath}
|
|
77
|
+
${verdict.marker} is ${verdict.reason}.
|
|
78
|
+
Hook paths are written into GLOBAL config (~/.claude/settings.json) and must outlive it. When the cache is pruned, every hook dies system-wide and \u2014 because hooks are non-blocking \u2014 does so silently (bug 3b487bce). Install exe-os to the global npm root (\`npm i -g @askexenow/exe-os\`) or to a stable location such as ~/exe-os, and run the installer from there.`
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// src/lib/hook-registration-liveness.ts
|
|
83
|
+
var EXE_HOOK_COMMAND = /[\\/]dist[\\/]hooks[\\/]/;
|
|
84
|
+
function extractHookTarget(command) {
|
|
85
|
+
const script = command.match(/"([^"]+\.[cm]?js)"|(\S+\.[cm]?js)(?=\s|$)/);
|
|
86
|
+
if (script) return script[1] ?? script[2] ?? null;
|
|
87
|
+
const argv0 = command.trim().match(/^"([^"]+)"|^(\S+)/);
|
|
88
|
+
const first = argv0?.[1] ?? argv0?.[2] ?? null;
|
|
89
|
+
if (!first) return null;
|
|
90
|
+
if (/^(node|npx|bash|sh|env)$/.test(path2.basename(first))) return null;
|
|
91
|
+
return first;
|
|
92
|
+
}
|
|
93
|
+
var INTERPRETERS = /* @__PURE__ */ new Set(["node", "npx", "bash", "sh", "zsh", "env", "python", "python3"]);
|
|
94
|
+
function isInterpreted(command, target) {
|
|
95
|
+
const argv0 = command.trim().match(/^"([^"]+)"|^(\S+)/);
|
|
96
|
+
const first = argv0?.[1] ?? argv0?.[2] ?? "";
|
|
97
|
+
if (!first) return false;
|
|
98
|
+
if (first === target || first === `"${target}"`) return false;
|
|
99
|
+
return INTERPRETERS.has(path2.basename(first));
|
|
100
|
+
}
|
|
101
|
+
function probeTarget(runtime, event, command) {
|
|
102
|
+
const target = extractHookTarget(command);
|
|
103
|
+
if (!target) {
|
|
104
|
+
return {
|
|
105
|
+
runtime,
|
|
106
|
+
event,
|
|
107
|
+
command,
|
|
108
|
+
target: null,
|
|
109
|
+
status: "unparsable",
|
|
110
|
+
detail: "could not determine which file this hook command runs"
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
if (!existsSync(target)) {
|
|
114
|
+
const verdict2 = classifyInstallPath(target);
|
|
115
|
+
return {
|
|
116
|
+
runtime,
|
|
117
|
+
event,
|
|
118
|
+
command,
|
|
119
|
+
target,
|
|
120
|
+
status: "missing",
|
|
121
|
+
detail: verdict2.transient ? `script does not exist \u2014 registered under ${verdict2.marker}, which is ${verdict2.reason}` : "script does not exist"
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
const needsExec = !isInterpreted(command, target);
|
|
125
|
+
try {
|
|
126
|
+
accessSync(target, needsExec ? constants.R_OK | constants.X_OK : constants.R_OK);
|
|
127
|
+
} catch {
|
|
128
|
+
return {
|
|
129
|
+
runtime,
|
|
130
|
+
event,
|
|
131
|
+
command,
|
|
132
|
+
target,
|
|
133
|
+
status: "unreadable",
|
|
134
|
+
detail: needsExec ? "exists but is not readable+executable by this user" : "exists but is not readable by this user"
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
try {
|
|
138
|
+
if (statSync(target).isDirectory()) {
|
|
139
|
+
return {
|
|
140
|
+
runtime,
|
|
141
|
+
event,
|
|
142
|
+
command,
|
|
143
|
+
target,
|
|
144
|
+
status: "missing",
|
|
145
|
+
detail: "registered path is a directory, not a script"
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
} catch (err) {
|
|
149
|
+
if (err?.code !== "ENOENT") {
|
|
150
|
+
return {
|
|
151
|
+
runtime,
|
|
152
|
+
event,
|
|
153
|
+
command,
|
|
154
|
+
target,
|
|
155
|
+
status: "unreadable",
|
|
156
|
+
detail: `cannot stat registered path: ${err?.message ?? String(err)}`
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
const verdict = classifyInstallPath(target);
|
|
161
|
+
if (verdict.transient) {
|
|
162
|
+
return {
|
|
163
|
+
runtime,
|
|
164
|
+
event,
|
|
165
|
+
command,
|
|
166
|
+
target,
|
|
167
|
+
status: "transient",
|
|
168
|
+
detail: `registered under ${verdict.marker}, which is ${verdict.reason} \u2014 present now, but guaranteed to disappear (bug 3b487bce)`
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
return { runtime, event, command, target, status: "ok", detail: "script present and loadable" };
|
|
172
|
+
}
|
|
173
|
+
function readHookConfig(filePath) {
|
|
174
|
+
let text;
|
|
175
|
+
try {
|
|
176
|
+
text = readFileSync(filePath, "utf-8");
|
|
177
|
+
} catch (err) {
|
|
178
|
+
if (err?.code === "ENOENT") return { kind: "absent" };
|
|
179
|
+
return { kind: "unreadable", reason: err?.message ?? String(err) };
|
|
180
|
+
}
|
|
181
|
+
try {
|
|
182
|
+
return { kind: "config", value: JSON.parse(text) };
|
|
183
|
+
} catch (err) {
|
|
184
|
+
return { kind: "unreadable", reason: err?.message ?? String(err) };
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
function unreadableConfigProbe(runtime, filePath, reason) {
|
|
188
|
+
return {
|
|
189
|
+
runtime,
|
|
190
|
+
event: "<registration file>",
|
|
191
|
+
command: filePath,
|
|
192
|
+
target: filePath,
|
|
193
|
+
status: "unreadable",
|
|
194
|
+
detail: `hook registration file could not be read: ${reason}`
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
function claudeCommands(settings) {
|
|
198
|
+
const hooks = settings?.hooks;
|
|
199
|
+
if (!hooks || typeof hooks !== "object") return [];
|
|
200
|
+
const out = [];
|
|
201
|
+
for (const [event, groups] of Object.entries(hooks)) {
|
|
202
|
+
if (!Array.isArray(groups)) continue;
|
|
203
|
+
for (const group of groups) {
|
|
204
|
+
const list = group?.hooks;
|
|
205
|
+
if (!Array.isArray(list)) continue;
|
|
206
|
+
for (const hook of list) {
|
|
207
|
+
const command = hook?.command;
|
|
208
|
+
if (typeof command === "string") out.push({ event, command });
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return out;
|
|
213
|
+
}
|
|
214
|
+
function codexCommands(config) {
|
|
215
|
+
const hooks = config?.hooks;
|
|
216
|
+
const source = hooks && typeof hooks === "object" ? hooks : config;
|
|
217
|
+
if (!source || typeof source !== "object") return [];
|
|
218
|
+
const out = [];
|
|
219
|
+
for (const [event, entries] of Object.entries(source)) {
|
|
220
|
+
const list = Array.isArray(entries) ? entries : [entries];
|
|
221
|
+
for (const entry of list) {
|
|
222
|
+
if (typeof entry === "string") {
|
|
223
|
+
out.push({ event, command: entry });
|
|
224
|
+
continue;
|
|
225
|
+
}
|
|
226
|
+
const nested = entry?.hooks;
|
|
227
|
+
if (Array.isArray(nested)) {
|
|
228
|
+
for (const hook of nested) {
|
|
229
|
+
const command2 = hook?.command;
|
|
230
|
+
if (typeof command2 === "string") out.push({ event, command: command2 });
|
|
231
|
+
}
|
|
232
|
+
continue;
|
|
233
|
+
}
|
|
234
|
+
const command = entry?.command;
|
|
235
|
+
if (typeof command === "string") out.push({ event, command });
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return out;
|
|
239
|
+
}
|
|
240
|
+
function auditRegisteredHookLiveness(opts = {}) {
|
|
241
|
+
const home = opts.home ?? process.env.HOME ?? process.env.USERPROFILE ?? os.homedir();
|
|
242
|
+
const checkedFiles = [];
|
|
243
|
+
const probes = [];
|
|
244
|
+
const sources = [
|
|
245
|
+
["claude", path2.join(home, ".claude", "settings.json"), claudeCommands],
|
|
246
|
+
["codex", path2.join(home, ".codex", "hooks.json"), codexCommands]
|
|
247
|
+
];
|
|
248
|
+
for (const [runtime, filePath, parse] of sources) {
|
|
249
|
+
const read = readHookConfig(filePath);
|
|
250
|
+
if (read.kind === "absent") continue;
|
|
251
|
+
checkedFiles.push(filePath);
|
|
252
|
+
if (read.kind === "unreadable") {
|
|
253
|
+
probes.push(unreadableConfigProbe(runtime, filePath, read.reason));
|
|
254
|
+
continue;
|
|
255
|
+
}
|
|
256
|
+
for (const { event, command } of parse(read.value)) {
|
|
257
|
+
if (!EXE_HOOK_COMMAND.test(command)) continue;
|
|
258
|
+
probes.push(probeTarget(runtime, event, command));
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
const broken = probes.filter((p) => p.status !== "ok");
|
|
262
|
+
return {
|
|
263
|
+
checkedFiles,
|
|
264
|
+
probes,
|
|
265
|
+
broken,
|
|
266
|
+
healthy: probes.length - broken.length,
|
|
267
|
+
ok: broken.length === 0
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
function formatHookLivenessFailure(report) {
|
|
271
|
+
if (report.ok) return "";
|
|
272
|
+
const lines = report.broken.map(
|
|
273
|
+
(p) => ` ${p.runtime}/${p.event}: ${p.status.toUpperCase()} \u2014 ${p.target ?? p.command} (${p.detail})`
|
|
274
|
+
);
|
|
275
|
+
return `${report.broken.length} of ${report.probes.length} registered exe-os hook(s) cannot run. Hooks are non-blocking, so sessions look healthy while capture, task pickup, PreToolUse enforcement gates and checkpointing are all silently dead. Re-register with the installer (\`exe-os install\`).
|
|
276
|
+
${lines.join("\n")}`;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export {
|
|
280
|
+
classifyInstallPath,
|
|
281
|
+
assertStableHookPath,
|
|
282
|
+
extractHookTarget,
|
|
283
|
+
auditRegisteredHookLiveness,
|
|
284
|
+
formatHookLivenessFailure
|
|
285
|
+
};
|