tenjin-cli 0.1.0-alpha.33 → 0.1.0-alpha.35
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/NOTICE.md +110 -0
- package/README.md +87 -81
- package/dist/{_esm-BIN7VY2L.js → _esm-2KST7HQ7.js} +7 -7
- package/dist/alive-5TV22PNF.js +51 -0
- package/dist/auth-XI7BJFLW.js +47 -0
- package/dist/{auto-update-Y24UL56V.js → auto-update-7L24KDWA.js} +4 -5
- package/dist/balance-DFHC6XEU.js +71 -0
- package/dist/{ccip-DHDFKTQV.js → ccip-HOW3DZYF.js} +4 -4
- package/dist/chunk-24XKUN2S.js +202 -0
- package/dist/chunk-24XKUN2S.js.map +1 -0
- package/dist/chunk-2L7TDGLV.js +56 -0
- package/dist/chunk-2L7TDGLV.js.map +1 -0
- package/dist/{chunk-C2Q76BVM.js → chunk-2U7H35IP.js} +29 -7
- package/dist/chunk-2U7H35IP.js.map +1 -0
- package/dist/chunk-2W4DQQUU.js +176 -0
- package/dist/chunk-2W4DQQUU.js.map +1 -0
- package/dist/{chunk-LRW6S53P.js → chunk-34SAECKZ.js} +35 -11
- package/dist/chunk-34SAECKZ.js.map +1 -0
- package/dist/{chunk-2I4QTOLB.js → chunk-3MZ7DYRO.js} +1 -1
- package/dist/chunk-3MZ7DYRO.js.map +1 -0
- package/dist/{chunk-RVPYTUP4.js → chunk-3Y2EHT4F.js} +13 -9
- package/dist/chunk-3Y2EHT4F.js.map +1 -0
- package/dist/chunk-3Y6BHIN6.js +169 -0
- package/dist/chunk-3Y6BHIN6.js.map +1 -0
- package/dist/{chunk-4K7TQHNP.js → chunk-3YPL6T3P.js} +17 -33
- package/dist/chunk-3YPL6T3P.js.map +1 -0
- package/dist/{chunk-E7SW44LM.js → chunk-44MVIRZH.js} +121 -6
- package/dist/chunk-44MVIRZH.js.map +1 -0
- package/dist/chunk-45MMSBHA.js +321 -0
- package/dist/chunk-45MMSBHA.js.map +1 -0
- package/dist/{chunk-3FMZGI7I.js → chunk-4CE6TMI5.js} +1 -1
- package/dist/chunk-4CE6TMI5.js.map +1 -0
- package/dist/{chunk-QXP3Z3JN.js → chunk-4MBCJFY4.js} +35 -3
- package/dist/chunk-4MBCJFY4.js.map +1 -0
- package/dist/chunk-4TPL54KW.js +227 -0
- package/dist/chunk-4TPL54KW.js.map +1 -0
- package/dist/chunk-54ELBTKE.js +1615 -0
- package/dist/chunk-54ELBTKE.js.map +1 -0
- package/dist/{chunk-NDGZDTSJ.js → chunk-5F4OB5B3.js} +115 -57
- package/dist/chunk-5F4OB5B3.js.map +1 -0
- package/dist/chunk-5HN4KVQU.js +3348 -0
- package/dist/chunk-5HN4KVQU.js.map +1 -0
- package/dist/{chunk-ZDZERB6L.js → chunk-5J4E5GYI.js} +572 -407
- package/dist/chunk-5J4E5GYI.js.map +1 -0
- package/dist/{chunk-ZNNXRNFD.js → chunk-5N4GGUBN.js} +48 -6
- package/dist/chunk-5N4GGUBN.js.map +1 -0
- package/dist/chunk-5USBZ2MU.js +58 -0
- package/dist/chunk-5USBZ2MU.js.map +1 -0
- package/dist/chunk-64WOMNYR.js +183 -0
- package/dist/chunk-64WOMNYR.js.map +1 -0
- package/dist/{chunk-ILNIZ5I2.js → chunk-65RS4LQS.js} +1825 -1715
- package/dist/chunk-65RS4LQS.js.map +1 -0
- package/dist/{chunk-IE7P2BZE.js → chunk-6QMDUDF2.js} +3 -3
- package/dist/{chunk-IADZOXKN.js → chunk-7SLOTLO7.js} +19 -697
- package/dist/chunk-7SLOTLO7.js.map +1 -0
- package/dist/{chunk-WFSPCCVW.js → chunk-7V25UAQO.js} +99 -99
- package/dist/{chunk-WFSPCCVW.js.map → chunk-7V25UAQO.js.map} +1 -1
- package/dist/chunk-BGA4DO5M.js +719 -0
- package/dist/chunk-BGA4DO5M.js.map +1 -0
- package/dist/chunk-BVP7YK2J.js +706 -0
- package/dist/chunk-BVP7YK2J.js.map +1 -0
- package/dist/chunk-C265QIMJ.js +83 -0
- package/dist/chunk-C265QIMJ.js.map +1 -0
- package/dist/{chunk-XQJXNMSB.js → chunk-CRG54LEB.js} +1 -1
- package/dist/chunk-CRG54LEB.js.map +1 -0
- package/dist/{chunk-KG3D7FIF.js → chunk-CZJOMUBP.js} +2 -2
- package/dist/{chunk-36RVGZNY.js → chunk-D6M3ZK66.js} +22 -39
- package/dist/chunk-D6M3ZK66.js.map +1 -0
- package/dist/{chunk-3UCIG4TG.js → chunk-DI4QAGRZ.js} +1 -11
- package/dist/chunk-DI4QAGRZ.js.map +1 -0
- package/dist/{chunk-JKKAIPTU.js → chunk-DIH2G3YG.js} +47 -10
- package/dist/chunk-DIH2G3YG.js.map +1 -0
- package/dist/chunk-DJ36BM62.js +78 -0
- package/dist/chunk-DJ36BM62.js.map +1 -0
- package/dist/chunk-DTEWAVNE.js +114 -0
- package/dist/chunk-DTEWAVNE.js.map +1 -0
- package/dist/chunk-F2KJAJ7T.js +13 -0
- package/dist/chunk-F2KJAJ7T.js.map +1 -0
- package/dist/{chunk-BF4XHEQK.js → chunk-F3QPGYOY.js} +6 -6
- package/dist/chunk-F3QPGYOY.js.map +1 -0
- package/dist/{chunk-3GNJXKIT.js → chunk-F43CV6UC.js} +2 -2
- package/dist/{chunk-J57UC3DD.js → chunk-FKVJKLPI.js} +3 -3
- package/dist/{chunk-V2LQLN5H.js → chunk-FYFHH7V5.js} +59 -8
- package/dist/{chunk-V2LQLN5H.js.map → chunk-FYFHH7V5.js.map} +1 -1
- package/dist/chunk-GAJC4BQZ.js +1096 -0
- package/dist/chunk-GAJC4BQZ.js.map +1 -0
- package/dist/{chunk-DOQGNFHM.js → chunk-GH5UKMZD.js} +2 -12
- package/dist/{chunk-DOQGNFHM.js.map → chunk-GH5UKMZD.js.map} +1 -1
- package/dist/{chunk-WYXUQGOL.js → chunk-HAZAN4UM.js} +7 -6
- package/dist/chunk-HAZAN4UM.js.map +1 -0
- package/dist/chunk-HI5XQOX2.js +393 -0
- package/dist/chunk-HI5XQOX2.js.map +1 -0
- package/dist/chunk-HKGUKAQW.js +488 -0
- package/dist/chunk-HKGUKAQW.js.map +1 -0
- package/dist/{chunk-SO3XRZPX.js → chunk-HPRVFJPM.js} +6 -6
- package/dist/{chunk-L6JEXB3E.js → chunk-HQR4BWKX.js} +3 -131
- package/dist/chunk-HQR4BWKX.js.map +1 -0
- package/dist/chunk-HZKANST2.js +177 -0
- package/dist/chunk-HZKANST2.js.map +1 -0
- package/dist/{chunk-UUGOUOVT.js → chunk-I557SAOM.js} +8 -2
- package/dist/chunk-I557SAOM.js.map +1 -0
- package/dist/{chunk-TC2WZLSC.js → chunk-IGLWLH73.js} +8 -7
- package/dist/chunk-IGLWLH73.js.map +1 -0
- package/dist/chunk-ILWCKCOI.js +58 -0
- package/dist/chunk-ILWCKCOI.js.map +1 -0
- package/dist/{chunk-2GP3HRYK.js → chunk-INSIW65E.js} +182 -182
- package/dist/{chunk-MPZUYCAP.js → chunk-IULCDMVG.js} +12 -1
- package/dist/chunk-IULCDMVG.js.map +1 -0
- package/dist/{chunk-INTFHMU4.js → chunk-IVNSUAVC.js} +25 -26
- package/dist/chunk-IVNSUAVC.js.map +1 -0
- package/dist/chunk-JDQZCREI.js +87 -0
- package/dist/chunk-JDQZCREI.js.map +1 -0
- package/dist/chunk-JHFFUVON.js +1050 -0
- package/dist/chunk-JHFFUVON.js.map +1 -0
- package/dist/{chunk-RL5UUDT4.js → chunk-JNUKLSMZ.js} +3 -3
- package/dist/chunk-JTILUN4W.js +2933 -0
- package/dist/chunk-JTILUN4W.js.map +1 -0
- package/dist/{chunk-OJNTCYQQ.js → chunk-JTX3BUDK.js} +37 -53
- package/dist/chunk-JTX3BUDK.js.map +1 -0
- package/dist/{chunk-X5ZBP3IY.js → chunk-JUUBBBY5.js} +2 -2
- package/dist/chunk-JUUBBBY5.js.map +1 -0
- package/dist/chunk-JWAK7JQB.js +15 -0
- package/dist/chunk-JWAK7JQB.js.map +1 -0
- package/dist/{chunk-UXZONNEQ.js → chunk-K5KNGC4I.js} +34 -31
- package/dist/chunk-K5KNGC4I.js.map +1 -0
- package/dist/chunk-KAQ4Q3TO.js +135 -0
- package/dist/chunk-KAQ4Q3TO.js.map +1 -0
- package/dist/chunk-KFVJYLVL.js +125 -0
- package/dist/chunk-KFVJYLVL.js.map +1 -0
- package/dist/chunk-KGUE5AVX.js +69 -0
- package/dist/chunk-KGUE5AVX.js.map +1 -0
- package/dist/{chunk-FVIGCDSV.js → chunk-KLDMLWXT.js} +11 -85
- package/dist/chunk-KLDMLWXT.js.map +1 -0
- package/dist/chunk-KNKDMTHU.js +453 -0
- package/dist/chunk-KNKDMTHU.js.map +1 -0
- package/dist/chunk-LDA6TAYQ.js +95 -0
- package/dist/chunk-LDA6TAYQ.js.map +1 -0
- package/dist/chunk-LWSSIZOY.js +347 -0
- package/dist/chunk-LWSSIZOY.js.map +1 -0
- package/dist/{chunk-ZURZHELF.js → chunk-MAHNZA6C.js} +158 -41
- package/dist/chunk-MAHNZA6C.js.map +1 -0
- package/dist/chunk-MEWZCIA6.js +220 -0
- package/dist/chunk-MEWZCIA6.js.map +1 -0
- package/dist/{chunk-2SNUOHAT.js → chunk-MEZJ3I63.js} +49 -1
- package/dist/chunk-MEZJ3I63.js.map +1 -0
- package/dist/chunk-MJDO4EXD.js +353 -0
- package/dist/chunk-MJDO4EXD.js.map +1 -0
- package/dist/chunk-NJA6NT3A.js +6595 -0
- package/dist/chunk-NJA6NT3A.js.map +1 -0
- package/dist/{chunk-LHHMV4GU.js → chunk-NVSKJPRC.js} +1 -1
- package/dist/{chunk-LHHMV4GU.js.map → chunk-NVSKJPRC.js.map} +1 -1
- package/dist/{chunk-4YOZGGTZ.js → chunk-OC7K2DVZ.js} +5 -5
- package/dist/chunk-OC7K2DVZ.js.map +1 -0
- package/dist/chunk-ODRPASFP.js +2078 -0
- package/dist/chunk-ODRPASFP.js.map +1 -0
- package/dist/chunk-OJJFANO6.js +133 -0
- package/dist/chunk-OJJFANO6.js.map +1 -0
- package/dist/{chunk-JNJWBTU2.js → chunk-OQWPRFAC.js} +332 -882
- package/dist/chunk-OQWPRFAC.js.map +1 -0
- package/dist/chunk-P4I7BFNJ.js +11 -0
- package/dist/chunk-P4I7BFNJ.js.map +1 -0
- package/dist/{chunk-SNNSAGMT.js → chunk-P6YQWIT2.js} +4058 -4039
- package/dist/chunk-P6YQWIT2.js.map +1 -0
- package/dist/{chunk-JRGFKVAZ.js → chunk-PETQ5WEA.js} +2 -2
- package/dist/{chunk-HMWYAUA6.js → chunk-Q6RSJCXB.js} +29 -69
- package/dist/chunk-Q6RSJCXB.js.map +1 -0
- package/dist/{chunk-U3IKUGRP.js → chunk-QKEUKBRK.js} +17 -23
- package/dist/chunk-QKEUKBRK.js.map +1 -0
- package/dist/{chunk-2RWB7RKE.js → chunk-QKYUCITR.js} +174 -5814
- package/dist/chunk-QKYUCITR.js.map +1 -0
- package/dist/chunk-QQDPRTLP.js +127 -0
- package/dist/chunk-QQDPRTLP.js.map +1 -0
- package/dist/chunk-QQYCYAKI.js +79 -0
- package/dist/chunk-QQYCYAKI.js.map +1 -0
- package/dist/chunk-R4KDH477.js +1064 -0
- package/dist/chunk-R4KDH477.js.map +1 -0
- package/dist/chunk-R5TR2DIK.js +119 -0
- package/dist/chunk-R5TR2DIK.js.map +1 -0
- package/dist/chunk-R62PKTAG.js +66 -0
- package/dist/chunk-R62PKTAG.js.map +1 -0
- package/dist/{chunk-BFDQ4WNW.js → chunk-RFZA7PSM.js} +4 -5
- package/dist/chunk-RFZA7PSM.js.map +1 -0
- package/dist/chunk-RGCPELQN.js +219 -0
- package/dist/chunk-RGCPELQN.js.map +1 -0
- package/dist/chunk-RGVCOG2S.js +910 -0
- package/dist/chunk-RGVCOG2S.js.map +1 -0
- package/dist/chunk-SOLNJ3AZ.js +209 -0
- package/dist/chunk-SOLNJ3AZ.js.map +1 -0
- package/dist/chunk-TFT2X7SH.js +77 -0
- package/dist/chunk-TFT2X7SH.js.map +1 -0
- package/dist/chunk-TUCKEEXE.js +2 -0
- package/dist/chunk-TVWCLUBI.js +293 -0
- package/dist/chunk-TVWCLUBI.js.map +1 -0
- package/dist/chunk-U4TRWSVE.js +78 -0
- package/dist/chunk-U4TRWSVE.js.map +1 -0
- package/dist/chunk-UIB33QQP.js +379 -0
- package/dist/chunk-UIB33QQP.js.map +1 -0
- package/dist/chunk-V6GIVALQ.js +1889 -0
- package/dist/chunk-V6GIVALQ.js.map +1 -0
- package/dist/chunk-VHXCPXUS.js +366 -0
- package/dist/chunk-VHXCPXUS.js.map +1 -0
- package/dist/{chunk-HGZEPQUT.js → chunk-VU6GMWF6.js} +17 -8
- package/dist/chunk-VU6GMWF6.js.map +1 -0
- package/dist/chunk-VWZYE3NC.js +8415 -0
- package/dist/chunk-VWZYE3NC.js.map +1 -0
- package/dist/{chunk-AGMVASXZ.js → chunk-W2GXIARJ.js} +88 -11
- package/dist/chunk-W2GXIARJ.js.map +1 -0
- package/dist/chunk-W4G3K3V7.js +288 -0
- package/dist/chunk-W4G3K3V7.js.map +1 -0
- package/dist/chunk-W74LJ5OT.js +588 -0
- package/dist/chunk-W74LJ5OT.js.map +1 -0
- package/dist/chunk-W7ELYLYK.js +233 -0
- package/dist/chunk-W7ELYLYK.js.map +1 -0
- package/dist/{chunk-BPMWXTFX.js → chunk-WFZX352D.js} +7 -7
- package/dist/chunk-WXA3WTPF.js +20 -0
- package/dist/chunk-WXA3WTPF.js.map +1 -0
- package/dist/chunk-XRGFH7FI.js +454 -0
- package/dist/chunk-XRGFH7FI.js.map +1 -0
- package/dist/chunk-XSCGUO2U.js +330 -0
- package/dist/chunk-XSCGUO2U.js.map +1 -0
- package/dist/chunk-XWROSMI5.js +1039 -0
- package/dist/chunk-XWROSMI5.js.map +1 -0
- package/dist/chunk-Y2EXZ47H.js +40 -0
- package/dist/chunk-Y2EXZ47H.js.map +1 -0
- package/dist/chunk-YJGEVBKZ.js +47 -0
- package/dist/chunk-YJGEVBKZ.js.map +1 -0
- package/dist/{chunk-6CMM6YCB.js → chunk-YWWMISDY.js} +2 -2
- package/dist/{chunk-WXA2BWTE.js → chunk-ZCT5DJ3G.js} +2 -48
- package/dist/chunk-ZCT5DJ3G.js.map +1 -0
- package/dist/chunk-ZEYA2WWX.js +982 -0
- package/dist/chunk-ZEYA2WWX.js.map +1 -0
- package/dist/chunk-ZRC7Z5X3.js +82 -0
- package/dist/chunk-ZRC7Z5X3.js.map +1 -0
- package/dist/{chunk-3AIHRXKO.js → chunk-ZS7JIUJ3.js} +12 -10
- package/dist/chunk-ZS7JIUJ3.js.map +1 -0
- package/dist/{clack-EZ7TDWQU.js → clack-Q4RNC5VE.js} +2 -6
- package/dist/{claude-cli-2YKABJJZ.js → claude-cli-GIIHOBGT.js} +4 -2
- package/dist/claude-install-BAUSJMW3.js +64 -0
- package/dist/{cli-E36SPKBW.js → cli-QY4KKA3D.js} +632 -150
- package/dist/cli-QY4KKA3D.js.map +1 -0
- package/dist/client-3YQKORVK.js +710 -0
- package/dist/client-3YQKORVK.js.map +1 -0
- package/dist/{codex-event-ZO2GEFE6.js → codex-event-EUTCAOTQ.js} +3 -5
- package/dist/{codex-host-KECJVTA2.js → codex-host-ZON3S6HU.js} +7 -7
- package/dist/{codex-install-HQZDGFXW.js → codex-install-HZV2DOAB.js} +242 -88
- package/dist/codex-install-HZV2DOAB.js.map +1 -0
- package/dist/config-QZOBMTEL.js +57 -0
- package/dist/config-names-Z5NZD5R2.js +224 -0
- package/dist/config-names-Z5NZD5R2.js.map +1 -0
- package/dist/config-rules-YOYHS6YL.js +55 -0
- package/dist/config-subagents-WQV2ZAD5.js +362 -0
- package/dist/config-subagents-WQV2ZAD5.js.map +1 -0
- package/dist/connect-YDWTYU4B.js +1020 -0
- package/dist/connect-YDWTYU4B.js.map +1 -0
- package/dist/core-0a66n3e7-TTP554XV.js +127 -0
- package/dist/core-0a66n3e7-TTP554XV.js.map +1 -0
- package/dist/core-0bmnpbz2-C2JIRVZO.js +10790 -0
- package/dist/core-0bmnpbz2-C2JIRVZO.js.map +1 -0
- package/dist/core-9je8ee1j-74DGHWPV.js +30 -0
- package/dist/core-9je8ee1j-74DGHWPV.js.map +1 -0
- package/dist/core-wadgcjfh-TSZFQZGH.js +666 -0
- package/dist/core-wadgcjfh-TSZFQZGH.js.map +1 -0
- package/dist/core-zg882d22-LKV5DZYW.js +37 -0
- package/dist/core-zg882d22-LKV5DZYW.js.map +1 -0
- package/dist/decision-QSKHOGCO.js +145 -0
- package/dist/{doctor-I6XQEKWD.js → doctor-ZWJXRD75.js} +162 -148
- package/dist/doctor-ZWJXRD75.js.map +1 -0
- package/dist/{env-proxy-R6ZMLQTT.js → env-proxy-XLSLHBKQ.js} +2 -2
- package/dist/{ethersCompat-Df4a6QIZ-X6YZWAML.js → ethersCompat-Df4a6QIZ-K3DMHR6Y.js} +5 -5
- package/dist/explicit-ME2NRADQ.js +371 -0
- package/dist/explicit-ME2NRADQ.js.map +1 -0
- package/dist/flush-stdio-NYIJ3QXT.js +18 -0
- package/dist/fund-VF7TLDJH.js +722 -0
- package/dist/fund-VF7TLDJH.js.map +1 -0
- package/dist/hook-command-VZ27MGWO.js +49 -0
- package/dist/hosts/claude/.claude-plugin/marketplace.json +2 -2
- package/dist/hosts/claude/tenjin/.claude-plugin/plugin.json +2 -2
- package/dist/hosts/claude/tenjin/hooks/hook-data.ts +152 -0
- package/dist/hosts/claude/tenjin/hooks/hooks.json +7 -0
- package/dist/hosts/claude/tenjin/hooks/model-viewer.tsx +2987 -0
- package/dist/hosts/claude/tenjin/hooks/register.tsx +527 -56
- package/dist/hosts/claude/tenjin/skills/tenjin-pay/SKILL.md +14 -4
- package/dist/hosts/claude/tenjin/types/index.d.ts +144 -1
- package/dist/{hosts-DVQJ32QC.js → hosts-3EMTVM4H.js} +7 -6
- package/dist/index.js +18 -15
- package/dist/index.js.map +1 -1
- package/dist/install-ZA7L2UF3.js +115 -0
- package/dist/install-funding-JDGYTF72.js +30 -0
- package/dist/install-identity-FFAYEFLX.js +30 -0
- package/dist/{install-wallet-5M4OTYLX.js → install-wallet-2SFOVE3Q.js} +68 -53
- package/dist/install-wallet-2SFOVE3Q.js.map +1 -0
- package/dist/mcp-36S6MK3C.js +67642 -0
- package/dist/mcp-36S6MK3C.js.map +1 -0
- package/dist/new-install-5L4GY3LN.js +51 -0
- package/dist/{package-IJFGMWEV.js → package-BONDXSV3.js} +2 -2
- package/dist/{passphrase-IFTDS3CU.js → passphrase-T4ULBN4M.js} +16 -12
- package/dist/{paths-XCSAKISU.js → paths-O2KDWZ76.js} +18 -28
- package/dist/pay-CMV5KL74.js +74 -0
- package/dist/{payments-HFPPWHTV.js → payments-Z6UBZL4Z.js} +36 -26
- package/dist/payments-Z6UBZL4Z.js.map +1 -0
- package/dist/reclaim-subagent-credit-ABSF67SJ.js +105 -0
- package/dist/reclaim-subagent-credit-ABSF67SJ.js.map +1 -0
- package/dist/{redact-D7ASVWKL.js → redact-LOTHE5TS.js} +2 -8
- package/dist/redact-LOTHE5TS.js.map +1 -0
- package/dist/routing-quote-AHLAREXR.js +40 -0
- package/dist/routing-quote-AHLAREXR.js.map +1 -0
- package/dist/run-JH7ELYAM.js +88 -0
- package/dist/run-JH7ELYAM.js.map +1 -0
- package/dist/runtime-2GX4ALJP.js +410 -0
- package/dist/runtime-2GX4ALJP.js.map +1 -0
- package/dist/runtime-activate-IDQ2NCSP.js +39 -0
- package/dist/runtime-activate-IDQ2NCSP.js.map +1 -0
- package/dist/{runtime-fetch-ZSSSK72Y.js → runtime-fetch-6LOBHBEN.js} +4 -4
- package/dist/runtime-fetch-6LOBHBEN.js.map +1 -0
- package/dist/runtime-launchers-YAPKCBHV.js +31 -0
- package/dist/runtime-launchers-YAPKCBHV.js.map +1 -0
- package/dist/{runtime-layout-WIDILZ6K.js → runtime-layout-QHZQJV7C.js} +5 -4
- package/dist/runtime-layout-QHZQJV7C.js.map +1 -0
- package/dist/runtime-place-4POL4KK4.js +37 -0
- package/dist/runtime-place-4POL4KK4.js.map +1 -0
- package/dist/runtime-provenance-MNJGVBV2.js +12 -0
- package/dist/runtime-provenance-MNJGVBV2.js.map +1 -0
- package/dist/{secp256k1-ZZZT2CAX.js → secp256k1-N5P2GVGF.js} +3 -3
- package/dist/secp256k1-N5P2GVGF.js.map +1 -0
- package/dist/{send-GCVEAQKL.js → send-ELXFKEKY.js} +35 -32
- package/dist/send-ELXFKEKY.js.map +1 -0
- package/dist/status-FXUFWJDM.js +404 -0
- package/dist/status-FXUFWJDM.js.map +1 -0
- package/dist/{status-line-OPCXDHL2.js → status-line-IH5JBWBC.js} +51 -43
- package/dist/status-line-IH5JBWBC.js.map +1 -0
- package/dist/streamableHttp-CP2ZQBIK.js +768 -0
- package/dist/streamableHttp-CP2ZQBIK.js.map +1 -0
- package/dist/{uninstall-BAWRBXXQ.js → uninstall-LJZUKM4D.js} +76 -76
- package/dist/uninstall-LJZUKM4D.js.map +1 -0
- package/dist/update-EUIX72IX.js +68 -0
- package/dist/update-EUIX72IX.js.map +1 -0
- package/dist/usage-EKDC7LUC.js +180 -0
- package/dist/usage-EKDC7LUC.js.map +1 -0
- package/dist/{usdc-VG4CIOUK.js → usdc-YIHK2OMC.js} +8 -12
- package/dist/usdc-YIHK2OMC.js.map +1 -0
- package/dist/{viemAdapter-By13KInL-DOFTEIJV.js → viemAdapter-By13KInL-PRLSIESK.js} +5 -5
- package/dist/viemAdapter-By13KInL-PRLSIESK.js.map +1 -0
- package/dist/wallet-HSW757W6.js +80 -0
- package/dist/wallet-HSW757W6.js.map +1 -0
- package/dist/wallet-kdf-worker.mjs +1433 -818
- package/docs/agent-permissions.md +88 -155
- package/docs/router-reference.md +236 -0
- package/docs/safety-model.md +31 -33
- package/docs/subagents-internals.md +97 -0
- package/docs/subagents.md +348 -0
- package/docs/troubleshooting.md +10 -6
- package/package.json +12 -8
- package/scripts/installers/install.sh +7 -1
- package/dist/alive-GSOWKUOY.js +0 -38
- package/dist/chunk-2I4QTOLB.js.map +0 -1
- package/dist/chunk-2M2VPI2E.js +0 -560
- package/dist/chunk-2M2VPI2E.js.map +0 -1
- package/dist/chunk-2RWB7RKE.js.map +0 -1
- package/dist/chunk-2SNUOHAT.js.map +0 -1
- package/dist/chunk-3623BLPV.js +0 -184
- package/dist/chunk-3623BLPV.js.map +0 -1
- package/dist/chunk-36RVGZNY.js.map +0 -1
- package/dist/chunk-3AIHRXKO.js.map +0 -1
- package/dist/chunk-3FMZGI7I.js.map +0 -1
- package/dist/chunk-3UCIG4TG.js.map +0 -1
- package/dist/chunk-4K7TQHNP.js.map +0 -1
- package/dist/chunk-4LMUQMBH.js +0 -29
- package/dist/chunk-4LMUQMBH.js.map +0 -1
- package/dist/chunk-4USCZ2NI.js +0 -228
- package/dist/chunk-4USCZ2NI.js.map +0 -1
- package/dist/chunk-4YOZGGTZ.js.map +0 -1
- package/dist/chunk-62KNUYWD.js +0 -111
- package/dist/chunk-62KNUYWD.js.map +0 -1
- package/dist/chunk-A5GKIG5O.js +0 -2037
- package/dist/chunk-A5GKIG5O.js.map +0 -1
- package/dist/chunk-AGMVASXZ.js.map +0 -1
- package/dist/chunk-BF4XHEQK.js.map +0 -1
- package/dist/chunk-BFDQ4WNW.js.map +0 -1
- package/dist/chunk-C2Q76BVM.js.map +0 -1
- package/dist/chunk-CEXSOI5R.js +0 -808
- package/dist/chunk-CEXSOI5R.js.map +0 -1
- package/dist/chunk-E7SW44LM.js.map +0 -1
- package/dist/chunk-EDJWHDDL.js +0 -33
- package/dist/chunk-EDJWHDDL.js.map +0 -1
- package/dist/chunk-FVIGCDSV.js.map +0 -1
- package/dist/chunk-GTTUCOPD.js +0 -105
- package/dist/chunk-GTTUCOPD.js.map +0 -1
- package/dist/chunk-HDPUXS3Z.js +0 -122
- package/dist/chunk-HDPUXS3Z.js.map +0 -1
- package/dist/chunk-HGGWCP7W.js +0 -120
- package/dist/chunk-HGGWCP7W.js.map +0 -1
- package/dist/chunk-HGZEPQUT.js.map +0 -1
- package/dist/chunk-HMWYAUA6.js.map +0 -1
- package/dist/chunk-IADZOXKN.js.map +0 -1
- package/dist/chunk-ILNIZ5I2.js.map +0 -1
- package/dist/chunk-INTFHMU4.js.map +0 -1
- package/dist/chunk-JKKAIPTU.js.map +0 -1
- package/dist/chunk-JNJWBTU2.js.map +0 -1
- package/dist/chunk-KM7RY2ZS.js +0 -246
- package/dist/chunk-KM7RY2ZS.js.map +0 -1
- package/dist/chunk-KOGZDMHO.js +0 -21
- package/dist/chunk-KOGZDMHO.js.map +0 -1
- package/dist/chunk-L6JEXB3E.js.map +0 -1
- package/dist/chunk-LRW6S53P.js.map +0 -1
- package/dist/chunk-LXAYUOXI.js +0 -511
- package/dist/chunk-LXAYUOXI.js.map +0 -1
- package/dist/chunk-MEFB5KHA.js +0 -59
- package/dist/chunk-MEFB5KHA.js.map +0 -1
- package/dist/chunk-MPZUYCAP.js.map +0 -1
- package/dist/chunk-NDGZDTSJ.js.map +0 -1
- package/dist/chunk-OJNTCYQQ.js.map +0 -1
- package/dist/chunk-P3LFTKE7.js +0 -58
- package/dist/chunk-P3LFTKE7.js.map +0 -1
- package/dist/chunk-QXP3Z3JN.js.map +0 -1
- package/dist/chunk-RVPYTUP4.js.map +0 -1
- package/dist/chunk-SNNSAGMT.js.map +0 -1
- package/dist/chunk-TC2WZLSC.js.map +0 -1
- package/dist/chunk-TKPF35W6.js +0 -29
- package/dist/chunk-TKPF35W6.js.map +0 -1
- package/dist/chunk-U3IKUGRP.js.map +0 -1
- package/dist/chunk-UUGOUOVT.js.map +0 -1
- package/dist/chunk-UXZONNEQ.js.map +0 -1
- package/dist/chunk-WXA2BWTE.js.map +0 -1
- package/dist/chunk-WYXUQGOL.js.map +0 -1
- package/dist/chunk-X5ZBP3IY.js.map +0 -1
- package/dist/chunk-XKESD27X.js +0 -10
- package/dist/chunk-XKESD27X.js.map +0 -1
- package/dist/chunk-XQJXNMSB.js.map +0 -1
- package/dist/chunk-Y527D4TV.js +0 -56
- package/dist/chunk-Y527D4TV.js.map +0 -1
- package/dist/chunk-ZDZERB6L.js.map +0 -1
- package/dist/chunk-ZNNXRNFD.js.map +0 -1
- package/dist/chunk-ZURZHELF.js.map +0 -1
- package/dist/cli-E36SPKBW.js.map +0 -1
- package/dist/codex-install-HQZDGFXW.js.map +0 -1
- package/dist/config-HY2E4GGW.js +0 -55
- package/dist/doctor-I6XQEKWD.js.map +0 -1
- package/dist/fund-2QRO7OJL.js +0 -378
- package/dist/fund-2QRO7OJL.js.map +0 -1
- package/dist/hook-command-2UBCSZG6.js +0 -43
- package/dist/install-ILUX5C4A.js +0 -107
- package/dist/install-identity-TZKGY6LQ.js +0 -31
- package/dist/install-wallet-5M4OTYLX.js.map +0 -1
- package/dist/mcp-LE4DUS22.js +0 -14127
- package/dist/mcp-LE4DUS22.js.map +0 -1
- package/dist/pay-WCG3IH4R.js +0 -55
- package/dist/payments-HFPPWHTV.js.map +0 -1
- package/dist/plugin-registration-PZFI5GZW.js +0 -68
- package/dist/runtime-UZOKSUZX.js +0 -1321
- package/dist/runtime-UZOKSUZX.js.map +0 -1
- package/dist/send-GCVEAQKL.js.map +0 -1
- package/dist/status-HCVAOCN7.js +0 -150
- package/dist/status-HCVAOCN7.js.map +0 -1
- package/dist/status-line-OPCXDHL2.js.map +0 -1
- package/dist/uninstall-BAWRBXXQ.js.map +0 -1
- package/dist/update-CACXLQLR.js +0 -56
- package/dist/wallet-QL4UUXEZ.js +0 -55
- /package/dist/{_esm-BIN7VY2L.js.map → _esm-2KST7HQ7.js.map} +0 -0
- /package/dist/{alive-GSOWKUOY.js.map → alive-5TV22PNF.js.map} +0 -0
- /package/dist/{auto-update-Y24UL56V.js.map → auth-XI7BJFLW.js.map} +0 -0
- /package/dist/{ccip-DHDFKTQV.js.map → auto-update-7L24KDWA.js.map} +0 -0
- /package/dist/{clack-EZ7TDWQU.js.map → balance-DFHC6XEU.js.map} +0 -0
- /package/dist/{claude-cli-2YKABJJZ.js.map → ccip-HOW3DZYF.js.map} +0 -0
- /package/dist/{chunk-IE7P2BZE.js.map → chunk-6QMDUDF2.js.map} +0 -0
- /package/dist/{chunk-KG3D7FIF.js.map → chunk-CZJOMUBP.js.map} +0 -0
- /package/dist/{chunk-3GNJXKIT.js.map → chunk-F43CV6UC.js.map} +0 -0
- /package/dist/{chunk-J57UC3DD.js.map → chunk-FKVJKLPI.js.map} +0 -0
- /package/dist/{chunk-SO3XRZPX.js.map → chunk-HPRVFJPM.js.map} +0 -0
- /package/dist/{chunk-2GP3HRYK.js.map → chunk-INSIW65E.js.map} +0 -0
- /package/dist/{chunk-RL5UUDT4.js.map → chunk-JNUKLSMZ.js.map} +0 -0
- /package/dist/{chunk-JRGFKVAZ.js.map → chunk-PETQ5WEA.js.map} +0 -0
- /package/dist/{codex-event-ZO2GEFE6.js.map → chunk-TUCKEEXE.js.map} +0 -0
- /package/dist/{chunk-BPMWXTFX.js.map → chunk-WFZX352D.js.map} +0 -0
- /package/dist/{chunk-6CMM6YCB.js.map → chunk-YWWMISDY.js.map} +0 -0
- /package/dist/{codex-host-KECJVTA2.js.map → clack-Q4RNC5VE.js.map} +0 -0
- /package/dist/{config-HY2E4GGW.js.map → claude-cli-GIIHOBGT.js.map} +0 -0
- /package/dist/{env-proxy-R6ZMLQTT.js.map → claude-install-BAUSJMW3.js.map} +0 -0
- /package/dist/{ethersCompat-Df4a6QIZ-X6YZWAML.js.map → codex-event-EUTCAOTQ.js.map} +0 -0
- /package/dist/{hook-command-2UBCSZG6.js.map → codex-host-ZON3S6HU.js.map} +0 -0
- /package/dist/{hosts-DVQJ32QC.js.map → config-QZOBMTEL.js.map} +0 -0
- /package/dist/{install-ILUX5C4A.js.map → config-rules-YOYHS6YL.js.map} +0 -0
- /package/dist/{install-identity-TZKGY6LQ.js.map → decision-QSKHOGCO.js.map} +0 -0
- /package/dist/{package-IJFGMWEV.js.map → env-proxy-XLSLHBKQ.js.map} +0 -0
- /package/dist/{passphrase-IFTDS3CU.js.map → ethersCompat-Df4a6QIZ-K3DMHR6Y.js.map} +0 -0
- /package/dist/{paths-XCSAKISU.js.map → flush-stdio-NYIJ3QXT.js.map} +0 -0
- /package/dist/{pay-WCG3IH4R.js.map → hook-command-VZ27MGWO.js.map} +0 -0
- /package/dist/{plugin-registration-PZFI5GZW.js.map → hosts-3EMTVM4H.js.map} +0 -0
- /package/dist/{redact-D7ASVWKL.js.map → install-ZA7L2UF3.js.map} +0 -0
- /package/dist/{runtime-fetch-ZSSSK72Y.js.map → install-funding-JDGYTF72.js.map} +0 -0
- /package/dist/{runtime-layout-WIDILZ6K.js.map → install-identity-FFAYEFLX.js.map} +0 -0
- /package/dist/{secp256k1-ZZZT2CAX.js.map → new-install-5L4GY3LN.js.map} +0 -0
- /package/dist/{update-CACXLQLR.js.map → package-BONDXSV3.js.map} +0 -0
- /package/dist/{usdc-VG4CIOUK.js.map → passphrase-T4ULBN4M.js.map} +0 -0
- /package/dist/{viemAdapter-By13KInL-DOFTEIJV.js.map → paths-O2KDWZ76.js.map} +0 -0
- /package/dist/{wallet-QL4UUXEZ.js.map → pay-CMV5KL74.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/config.ts","../src/adapters/types.ts"],"sourcesContent":["import { readFile } from 'node:fs/promises';\nimport { z } from 'zod';\nimport { CliError } from './errors';\nimport { PRODUCTION_ORIGIN } from './production-origin';\nimport { configPath } from './paths';\nimport { HARNESSES } from '../adapters/types';\nimport type { Harness } from '../adapters/types';\nimport { writeFileAtomic } from './atomic-json';\nimport { DEFAULT_RPC_URL } from './usdc-balance';\n\n/** A non-negative integer string in USDC atomic units (6-decimal base). */\nconst atomicString = z.string().regex(/^\\d+$/, 'expected an atomic USDC integer string');\n\n/** The publish consent mode (B3, D38). `full-auto` is loosening-gated, below. */\nexport const PublishModeSchema = z.enum(['review', 'auto', 'full-auto']);\nexport type PublishMode = z.infer<typeof PublishModeSchema>;\n\n/**\n * Validate a publish-mode value at a command edge (`--mode`, `--publish-mode`):\n * an unrecognized value is USAGE (exit 2), never silently dropped. `flagName` is\n * woven into the message so the failing flag is named.\n */\nexport function parsePublishModeFlag(value: string, flagName: string): PublishMode {\n const parsed = PublishModeSchema.safeParse(value);\n if (parsed.success) return parsed.data;\n throw new CliError('USAGE', `Invalid ${flagName} ${JSON.stringify(value)}`, {\n fix: 'Use \"review\", \"auto\", or \"full-auto\".',\n });\n}\n\n/**\n * The standing answer to the MARKETPLACE gate's warn tier (lib/consent.ts,\n * `acksServerWarnings`), which is a different question from `publish.mode`: the\n * mode decides what a run asks about the findings it can see locally, and this\n * decides whether a yes already given also covers findings only the server\n * found.\n *\n * `mode` (the default) derives the answer: `full-auto` acks, and anything else\n * acks only when the server contributed nothing the local pass had not already\n * rendered. `off` never acks, whatever the mode says, which is the off switch a\n * `full-auto` machine has without changing its mode. `on` is the operator's\n * standing yes for server findings, and it still needs a yes for the run: it\n * restores the pre-gate reading of `--yes` rather than manufacturing one.\n */\nexport const AckServerWarningsSchema = z.enum(['mode', 'on', 'off']);\nexport type AckServerWarnings = z.infer<typeof AckServerWarningsSchema>;\n\n/**\n * Validate an ack-setting value at a command edge: an unrecognized value is\n * USAGE (exit 2), never silently dropped onto the looser reading.\n */\nexport function parseAckServerWarnings(value: string, keyName: string): AckServerWarnings {\n const parsed = AckServerWarningsSchema.safeParse(value);\n if (parsed.success) return parsed.data;\n throw new CliError('USAGE', `Invalid ${keyName} ${JSON.stringify(value)}`, {\n fix: 'Use \"mode\", \"on\", or \"off\".',\n });\n}\n\n/**\n * The publish block (B3): `mode` governs the confirm cascade a `publish` runs,\n * `defaultPrice` is the atomic USDC price a card is published at when no\n * per-publish price is given (stored atomic like the spend keys), and\n * `ackServerWarnings` is the standing answer to the server gate's warn tier.\n */\nconst PublishConfigSchema = z.object({\n mode: PublishModeSchema,\n defaultPrice: atomicString,\n ackServerWarnings: AckServerWarningsSchema,\n});\n\n/**\n * The seven hook arms, one boolean each. Named by what the arm does, with the\n * harness event it answers beside it: `prompt` (UserPromptSubmit), `web-search`\n * (WebSearch), `web-fetch` (WebFetch), `subagent` (the dispatch and the child's\n * own start), `failure` (a failing command), `publish` (the turn-end ask on\n * Stop and SubagentStop), `primer` (SessionStart). The context arm is\n * bookkeeping for `failure` and `publish` and runs when either is on.\n */\nexport const HOOK_ARMS = [\n 'prompt',\n 'web-search',\n 'web-fetch',\n 'subagent',\n 'failure',\n 'publish',\n 'primer',\n] as const;\nexport type HookArm = (typeof HOOK_ARMS)[number];\n\n/**\n * The harness-hook block. EVERY key is read by the daemon at run time, which is\n * what makes them runtime toggles rather than install-time choices:\n * `tenjin config set hooks.web-search false` silences that arm immediately,\n * with no re-install and nothing to unwire. The entries stay registered and the\n * arm no-ops, which is also what lets turning one back on be a single\n * `config set`.\n */\nconst HooksConfigSchema = z.object({\n prompt: z.boolean(),\n 'web-search': z.boolean(),\n 'web-fetch': z.boolean(),\n subagent: z.boolean(),\n failure: z.boolean(),\n publish: z.boolean(),\n primer: z.boolean(),\n});\n\n/** How much conversation a router hook packet carries. */\nexport const ROUTER_CONTEXTS = ['session', 'turn'] as const;\nexport type RouterContext = (typeof ROUTER_CONTEXTS)[number];\n\n/**\n * The router's own block, separate from the shelf's `hooks.*`: `enabled` is the\n * off switch every router hook and the `request` tool honour, and `context` is how\n * much conversation a hook packet carries (`session`, up to six prior messages,\n * or `turn`, none). THE ONE SCHEMA for it: the global file validates it here,\n * and a project's `.tenjin/config.json` and `config.local.json` go through\n * {@link parseRouterLayer}. Both keys only ever tighten, which is why a\n * project file may carry them; a key that loosens (spend, allowlist, enabling,\n * base URL) must never join this object. `routerSettings` in\n * router/settings.ts is the one reader of the resolved values.\n */\nexport const RouterLayerSchema = z.object({\n enabled: z.boolean().optional(),\n context: z.enum(ROUTER_CONTEXTS).optional(),\n});\nexport type RouterLayer = z.infer<typeof RouterLayerSchema>;\nconst RouterConfigSchema = RouterLayerSchema.required();\n\n/**\n * The `router` block of one project file's parsed JSON, and nothing else: an\n * unknown key, inside the block or beside it, is never read. CONFIG_INVALID,\n * naming the file, when the file is not an object or a key has the wrong type.\n */\nexport function parseRouterLayer(json: unknown, path: string): RouterLayer {\n if (json === null || typeof json !== 'object' || Array.isArray(json)) {\n throw new CliError('CONFIG_INVALID', `Config at ${path} is not a JSON object`, {\n fix: `Fix ${path}, or delete it.`,\n });\n }\n const parsed = RouterLayerSchema.safeParse((json as { router?: unknown }).router ?? {});\n if (!parsed.success) {\n throw new CliError('CONFIG_INVALID', `Config at ${path} has an invalid router block`, {\n fix: `Use router.enabled true|false and router.context \"session\"|\"turn\" in ${path}, or delete it.`,\n details: parsed.error.issues,\n });\n }\n const { enabled, context } = parsed.data;\n return {\n ...(enabled !== undefined ? { enabled } : {}),\n ...(context !== undefined ? { context } : {}),\n };\n}\n\n/**\n * What the daily update check is allowed to do about a newer version.\n *\n * `auto` installs it in the background where Tenjin's runtime is set up for the\n * default data dir (see lib/auto-update), and elsewhere behaves as `nudge`: the\n * runtime is the deferred-activation window a self-update needs, since versions\n * sit side by side and a running session keeps the one it started on. `nudge`\n * only reports it — one dim line for a human at a terminal, and an\n * `updateAvailable` field on the JSON envelope for everyone else, which is how\n * an agent learns to run `tenjin update` itself. `off` neither reports nor asks\n * npm.\n */\nexport const UpdateModeSchema = z.enum(['auto', 'nudge', 'off']);\n\n/**\n * The loop daemon's numbers (tenjin-notes loop-redesign/02-redesign.md §7). TWO\n * budget numbers and two daemon knobs; every other bound is a formula over\n * these or a constant with a stated reason in `src/hooks/constants.ts`.\n *\n * `human_wait_ms`: a fire the human is waiting on (prompt, Stop, SessionStart).\n * `tool_wait_ms`: a fire a tool call is waiting on. There is no third budget:\n * a client-side rate limit rationed the research panel the loop exists to\n * capture, so the runaway stop is the server's own 429. `idle_exit_min`: the\n * daemon exits after this long with no request. `port`: null derives one from\n * the data dir path; set it only when doctor reports a foreign listener.\n */\nconst positiveInt = z.number().int().positive();\nexport const LoopConfigSchema = z.object({\n human_wait_ms: positiveInt,\n tool_wait_ms: positiveInt,\n idle_exit_min: positiveInt,\n port: z.number().int().min(0).max(65535).nullable(),\n});\nexport type LoopConfig = z.infer<typeof LoopConfigSchema>;\n\n/**\n * `team.publicFallback` (tenjin-agent#229): `off` drops every public-only stage\n * from every lookup plan, so a team-mode miss never reaches tenjin.blog. Plain\n * config read by the daemon per fire; install against a team shelf writes `off`.\n */\nexport const PublicFallbackSchema = z.enum(['on', 'off']);\nexport type PublicFallback = z.infer<typeof PublicFallbackSchema>;\nexport const TeamConfigSchema = z.object({ publicFallback: PublicFallbackSchema });\nexport type TeamConfig = z.infer<typeof TeamConfigSchema>;\n\n/**\n * `experimental.*`: features that ship off. `bazaar` widens the third-party\n * services the router may offer from Tenjin's reviewed list (always on) to the\n * open x402 Bazaar: unreviewed sellers. Off, the client never asks for them.\n */\nexport const ExperimentalConfigSchema = z.object({ bazaar: PublicFallbackSchema });\nexport type ExperimentalConfig = z.infer<typeof ExperimentalConfigSchema>;\n\nexport function parsePublicFallbackFlag(value: string, keyName: string): PublicFallback {\n const parsed = PublicFallbackSchema.safeParse(value);\n if (parsed.success) return parsed.data;\n throw new CliError('USAGE', `Invalid ${keyName}: ${JSON.stringify(value)}`, {\n fix: 'Use \"on\" or \"off\".',\n });\n}\n\n/** A `loop.*` value from `config set`: a positive integer, or for `loop.port`\n * also `0`..`65535` or `null` (derive). */\nexport function parseLoopValue(key: LoopConfigKey, value: string): number | null {\n const field = key.slice('loop.'.length) as keyof LoopConfig;\n if (field === 'port' && (value === 'null' || value === 'auto')) return null;\n const n = /^\\d+$/.test(value.trim()) ? Number(value.trim()) : NaN;\n const parsed = LoopConfigSchema.shape[field].safeParse(n);\n if (parsed.success) return parsed.data;\n throw new CliError('USAGE', `Invalid ${key}: ${JSON.stringify(value)}`, {\n fix:\n field === 'port'\n ? 'Use an integer from 0 to 65535, or \"null\" to derive one from the data dir.'\n : 'Use a positive integer.',\n });\n}\nexport type UpdateMode = z.infer<typeof UpdateModeSchema>;\n\nconst UpdateConfigSchema = z.object({\n mode: UpdateModeSchema,\n});\n\nexport function parseUpdateModeFlag(value: string, flagName: string): UpdateMode {\n const parsed = UpdateModeSchema.safeParse(value);\n if (parsed.success) return parsed.data;\n throw new CliError('USAGE', `Invalid ${flagName} ${JSON.stringify(value)}`, {\n fix: 'Use \"auto\", \"nudge\" or \"off\".',\n });\n}\n\n/**\n * What `install` recorded about its own targets. `harness` is the last settled\n * prompt or explicit `--harness` selection, so `doctor` keeps judging every\n * directory the operator chose even when later detection cannot see it. Written\n * by `install`, not a `config set` key.\n */\nconst InstallConfigSchema = z.object({\n harness: z.array(z.enum(HARNESSES)),\n /**\n * The EXACT rule strings still pending the last time an install explicitly\n * declined the free-verb allowlist (`--no-grant`), so `--refresh`\n * can subtract them from what it would\n * otherwise report as pending instead of recomputing from the settings file\n * and nagging about a settled \"no\" on every refresh (tenjin-agent#234).\n *\n * A LIST, NOT A FLAG, on purpose: a boolean has no way to say \"these were\n * declined\" without also silencing every rule a LATER version might add, so a\n * genuinely new suggestion would never be reported again either. Per-rule\n * suppression means only the rules that were actually offered and refused\n * stay quiet; a new one still surfaces.\n *\n * Cleared back to `[]` the next time an install actually wires the allowlist,\n * or finds it already fully satisfied, so a later legitimate grant (manual or\n * otherwise) is never shadowed by a stale decline.\n */\n grantDeclined: z.array(z.string()),\n /**\n * Absolute directories a `tenjin install --project` wired, so `tenjin update`\n * can refresh them. It spawns `install --refresh` from the HOME directory,\n * which is the one place a project install can never be found by looking\n * around: without this list a project-only machine refreshed nothing and\n * reported success while its hooks stayed on the old build.\n *\n * A LIST, because one machine can wire several projects, and entries are\n * dropped by `tenjin uninstall --project` and by any refresh that finds the\n * project's settings file no longer carries our entries.\n */\n routerProjects: z.array(z.string()),\n});\n\n/**\n * `shared` was a real `install --harness` value before the harness selector was\n * narrowed to actual harnesses. It targeted the same ~/.agents/skills directory\n * as Codex, so the lossless upgrade is `codex`. Normalize at the raw parse edge:\n * commands that intentionally consume loadRawConfig directly must never see the\n * superseded value, and a later merge-write naturally persists the current shape.\n */\nconst STORED_INSTALL_HARNESSES = [...HARNESSES, 'shared'] as const;\ntype StoredInstallHarness = (typeof STORED_INSTALL_HARNESSES)[number];\n\nexport function resolveInstallHarness(\n value: readonly StoredInstallHarness[] | undefined,\n): Harness[] {\n const normalized = new Set(value?.map((harness) => (harness === 'shared' ? 'codex' : harness)));\n return HARNESSES.filter((harness) => normalized.has(harness));\n}\n\nconst RawInstallHarnessSchema = z\n .array(z.enum(STORED_INSTALL_HARNESSES))\n .transform(resolveInstallHarness);\n\n/**\n * The persisted config shape. Spend keys are stored atomic (accepted as decimal\n * USD at the command edge, see lib/money). These are client-enforced guardrails, not a\n * security boundary — any process that runs the CLI can also edit this file.\n */\nexport const ConfigSchema = z.object({\n maxAutoSpend: atomicString,\n sessionBudget: z.union([atomicString, z.literal('none')]),\n /**\n * Hard per-send cap for `tenjin wallet send`, NOT satisfiable by --yes or a prompt\n * (the spend-policy posture): an atomic amount caps each send, \"0\" disables\n * the verb entirely, and \"none\" = explicitly uncapped (send exists to drain\n * the wallet, but uncapped is an opt-in, never a default). The key has NO\n * usable default: absent from config.json, `tenjin wallet send` refuses until it is\n * set (see resolveSendMaxAmount). Client-enforced like every spend key (see\n * the note above).\n */\n sendMaxAmount: z.union([z.literal('none'), atomicString]),\n allowlistCreators: z.array(z.string()),\n baseUrl: z.url(),\n /**\n * The PUBLIC marketplace, consume-only, and the second shelf a team-mode\n * lookup falls through to. Distinct from `baseUrl` because in team mode\n * `baseUrl` is the team's own deployment: `publish`, `read` and the first leg\n * of every search go there, and this is the shelf that still gets asked when\n * the team's own has nothing. In public mode the two are the same origin and\n * nothing falls through.\n */\n publicShelfUrl: z.url(),\n /**\n * The team shelf's Vercel \"Protection Bypass for Automation\" secret, and the\n * ONE key that decides which mode this CLI is in: empty (the default) is\n * public mode, byte-for-byte what it always did; non-empty is team mode.\n *\n * It is a DOOR KEY, not a credential of the operator's: it gets a request past\n * Deployment Protection on the team's preview deployment and authenticates\n * nobody. Stored in plain config.json alongside everything else for exactly\n * that reason — anything that can read this file can already read the wallet's\n * keystore path and rewrite `baseUrl`. It is redacted from `config get` and\n * `config list` all the same, because those outputs are pasted into issues.\n *\n * Sent ONLY to `baseUrl`'s origin; see lib/http.ts's `bypass` option, which\n * derives that from the request URL rather than from the caller's intent.\n */\n shelfBypassSecret: z.string(),\n rpcUrl: z.url(),\n /**\n * Evaluation-cohort opt-in (spec 09 §3): when true, search sends\n * X-Tenjin-Eval-Cohort: 1 and the server stores the generalized question for\n * 90 days. Off by default; no query text is retained server-side without it.\n */\n evalCohort: z.boolean(),\n /** x402 discovery registries (facilitator base URLs) `discover` queries and\n * the Bazaar pay lane verifies against. */\n bazaarRegistries: z.array(z.url()),\n publish: PublishConfigSchema,\n install: InstallConfigSchema,\n hooks: HooksConfigSchema,\n update: UpdateConfigSchema,\n loop: LoopConfigSchema,\n team: TeamConfigSchema,\n router: RouterConfigSchema,\n experimental: ExperimentalConfigSchema,\n});\nexport type Config = z.infer<typeof ConfigSchema>;\n\n/**\n * `install`'s raw shape. The decline is a list of exact rules rather than a\n * boolean so a later version can still report a rule the operator was never\n * offered. The key is intentionally not aliased from its pre-release name.\n */\nconst RawInstallConfigSchema = InstallConfigSchema.partial()\n .extend({\n harness: RawInstallHarnessSchema.optional(),\n grantDeclined: z.array(z.string()).optional(),\n })\n .passthrough();\n\n/**\n * Values as they may appear in config.json — every known key optional; absent =\n * default. `.passthrough()` PRESERVES unknown keys through load + persist: without\n * it an older binary's `config set` would strip (and re-serialize away) any newer\n * block a later CLI wrote, e.g. B3's `publish.*`. Known keys are still validated;\n * unknown keys ride along untouched.\n */\nexport const RawConfigSchema = ConfigSchema.partial()\n // The publish block is itself partial + passthrough: `config set publish.mode`\n // writes only the one subkey, and a subkey a newer CLI adds (e.g. publish.*\n // beyond mode/defaultPrice) survives an older binary's set, same reason the\n // outer object passes unknown keys through.\n .extend({\n publish: PublishConfigSchema.partial().passthrough().optional(),\n install: RawInstallConfigSchema.optional(),\n hooks: HooksConfigSchema.partial().passthrough().optional(),\n update: UpdateConfigSchema.partial().passthrough().optional(),\n loop: LoopConfigSchema.partial().passthrough().optional(),\n team: TeamConfigSchema.partial().passthrough().optional(),\n router: RouterLayerSchema.passthrough().optional(),\n experimental: ExperimentalConfigSchema.partial().passthrough().optional(),\n })\n .passthrough();\nexport type PartialConfig = z.infer<typeof RawConfigSchema>;\n\n/**\n * Normalize `install.grantDeclined` as read from config.json. An absent key is\n * an empty set; a present key is already validated as exact rule strings.\n */\nexport function resolveGrantDeclined(value: string[] | undefined): string[] {\n return value ?? [];\n}\n\n/**\n * The resolved-view sentinel for an absent sendMaxAmount. Never a persistable\n * value (ConfigSchema rejects it, and `config set` has no way to produce it);\n * while the resolved value is this sentinel, `tenjin wallet send` refuses —\n * require-set-before-first-send.\n */\nexport const SEND_MAX_UNSET = 'unset';\n\n/**\n * Registries verified keyless (CDP/UV on 2026-08-14, PayAI on 2026-08-18): all\n * answer GET /discovery/resources with no credential in the Bazaar envelope\n * the sweep parses. CDP's Bazaar is settlement-derived (it indexes what its\n * facilitator settles, Tenjin's endpoints included); UltraVioleta is the\n * registry Tenjin also announces to; PayAI's facilitator is settlement-derived\n * like CDP's (26k+ listings at verification). PayAI's /discovery/search is\n * keyword-only (measured 2026-10-02), so a natural-language query finds nothing\n * there. It also ignores payTo filters, as UV and CDP do, which the query\n * sweep's per-registry errors and the stored-sweep evidence cover.\n */\nexport const DEFAULT_BAZAAR_REGISTRIES = [\n 'https://api.cdp.coinbase.com/platform/v2/x402',\n 'https://facilitator.ultravioletadao.xyz',\n 'https://facilitator.payai.network',\n];\n\n/**\n * THE TWO SPEND LIMITS, IN EFFECT WHETHER OR NOT ANYONE ANSWERED. The daily\n * budget ($5) is the control; the per-call ceiling ($0.25) is the runaway\n * guard; the wallet balance is the hard stop. Install asks once, these or your\n * own limits, and an install nobody answered still runs on these. A call\n * priced above the ceiling is approved once, for that call.\n */\nexport const DEFAULT_MAX_AUTO_SPEND = '250000';\nexport const DEFAULT_SESSION_BUDGET = '5000000';\n\n/** The lowest per-call ceiling anyone can set, atomic USDC ($0.25): the\n * routing deposit (`CHANNEL_DEPOSIT_ATOMIC`), below which routing cannot pay. */\nexport const MAX_AUTO_SPEND_FLOOR_ATOMIC = 250_000n;\n/** Why: said by install, `config set` and doctor wherever the floor refuses. */\nexport const MAX_AUTO_SPEND_FLOOR_WHY =\n 'The $0.25 minimum is the routing deposit: below it, routing cannot pay at all. To stop automatic payments, turn the router off with `tenjin config set router.enabled false`.';\n\nexport const CONFIG_DEFAULTS: Config = {\n maxAutoSpend: DEFAULT_MAX_AUTO_SPEND,\n sessionBudget: DEFAULT_SESSION_BUDGET,\n // A type placeholder only, never honored: Config requires every key (and\n // CONFIG_KEYS derives from these). resolveSendMaxAmount never reads it — an\n // absent key resolves to SEND_MAX_UNSET and `tenjin wallet send` refuses until the\n // cap is set. '0' (send disabled) rather than 'none' (uncapped) so that if a\n // future caller ever DOES read the cap through loadConfig/fileOrDefault, the\n // leak fails closed instead of silently running uncapped.\n sendMaxAmount: '0',\n allowlistCreators: [],\n baseUrl: PRODUCTION_ORIGIN,\n publicShelfUrl: PRODUCTION_ORIGIN,\n // Empty = public mode. Setting it is the whole of \"turn on team mode\".\n shelfBypassSecret: '',\n rpcUrl: DEFAULT_RPC_URL,\n evalCohort: false,\n bazaarRegistries: DEFAULT_BAZAAR_REGISTRIES,\n publish: { mode: 'review', defaultPrice: '100000', ackServerWarnings: 'mode' },\n install: { harness: [], grantDeclined: [], routerProjects: [] },\n // Every hook is on out of the box: a vanilla install turns the whole loop on,\n // and the disclosure and the undo ride the install output. `false` leaves the\n // registered entries inert without touching settings.json, so any of these is\n // one `config set` away in either direction.\n hooks: {\n prompt: true,\n 'web-search': true,\n 'web-fetch': true,\n subagent: true,\n failure: true,\n publish: true,\n primer: true,\n },\n update: { mode: 'auto' },\n loop: {\n human_wait_ms: 2500,\n tool_wait_ms: 4000,\n idle_exit_min: 30,\n port: null,\n },\n team: { publicFallback: 'on' },\n router: { enabled: true, context: 'session' },\n experimental: { bazaar: 'off' },\n};\n\n/**\n * Scalar keys `config get/set/list` render one line each. The nested blocks are\n * excluded: `publish` and `hooks` are addressed by their dotted keys (see\n * PUBLISH_CONFIG_KEYS / HOOKS_CONFIG_KEYS), and `install` is a record `install`\n * writes about itself rather than a setting to hand-edit, so none is ever a bare\n * scalar.\n */\nexport type ScalarConfigKey = Exclude<\n keyof Config,\n 'publish' | 'install' | 'hooks' | 'update' | 'loop' | 'team' | 'router' | 'experimental'\n>;\nconst NESTED_CONFIG_KEYS: ReadonlySet<string> = new Set([\n 'publish',\n 'install',\n 'hooks',\n 'update',\n 'loop',\n 'team',\n 'router',\n 'experimental',\n]);\nexport const CONFIG_KEYS = (Object.keys(CONFIG_DEFAULTS) as Array<keyof Config>).filter(\n (key): key is ScalarConfigKey => !NESTED_CONFIG_KEYS.has(key),\n);\n\n/** The dotted keys `config get/set` accept for the nested publish block. */\nexport const PUBLISH_CONFIG_KEYS = [\n 'publish.mode',\n 'publish.defaultPrice',\n 'publish.ackServerWarnings',\n] as const;\nexport type PublishConfigKey = (typeof PUBLISH_CONFIG_KEYS)[number];\n\n/** The dotted keys `config get/set` accept for the nested hooks block. */\nexport type HooksConfigKey = `hooks.${HookArm}`;\nexport const HOOKS_CONFIG_KEYS: readonly HooksConfigKey[] = HOOK_ARMS.map(\n (arm) => `hooks.${arm}` as const,\n);\n\n/** The dotted key `config get/set` accepts for the nested update block. */\nexport const UPDATE_CONFIG_KEYS = ['update.mode'] as const;\nexport type UpdateConfigKey = (typeof UPDATE_CONFIG_KEYS)[number];\n\n/** The dotted keys `config get/set` accept for the loop daemon's block. */\nexport const LOOP_CONFIG_KEYS = [\n 'loop.human_wait_ms',\n 'loop.tool_wait_ms',\n 'loop.idle_exit_min',\n 'loop.port',\n] as const;\nexport type LoopConfigKey = (typeof LOOP_CONFIG_KEYS)[number];\n\n/** The dotted key `config get/set` accepts for the team block. */\nexport const TEAM_CONFIG_KEYS = ['team.publicFallback'] as const;\nexport type TeamConfigKey = (typeof TEAM_CONFIG_KEYS)[number];\n\n/** The dotted key `config get/set` accepts for the experimental block. */\nexport const EXPERIMENTAL_CONFIG_KEYS = ['experimental.bazaar'] as const;\nexport type ExperimentalConfigKey = (typeof EXPERIMENTAL_CONFIG_KEYS)[number];\n\n/** The dotted keys `config get/set` accept for the router block. */\nexport const ROUTER_CONFIG_KEYS = ['router.enabled', 'router.context'] as const;\nexport type RouterConfigKey = (typeof ROUTER_CONFIG_KEYS)[number];\n\nexport const RETIRED_PAYMENT_KEYS = ['bazaarPay', 'confirm'] as const;\nexport const RETIRED_PAYMENT_GUIDANCE =\n 'Retired payment settings no longer control payments. Use router.enabled, maxAutoSpend and sessionBudget for automatic routing; manual pay always requires consent. Run tenjin install to remove retired keys.';\n\nexport function retiredPaymentKeys(raw: PartialConfig): string[] {\n return RETIRED_PAYMENT_KEYS.filter((key) => Object.hasOwn(raw, key));\n}\n\n/**\n * Read and validate config.json WITHOUT applying defaults, so provenance can\n * distinguish \"present in file\" from \"absent\". Missing file is fine (returns\n * {}); malformed JSON or a failed schema is CONFIG_INVALID with a fix.\n */\nexport async function loadRawConfig(dir: string): Promise<PartialConfig> {\n const path = configPath(dir);\n let raw: string;\n try {\n raw = await readFile(path, 'utf8');\n } catch (err) {\n if (isNotFound(err)) return {};\n throw new CliError('CONFIG_INVALID', `Could not read config at ${path}`, {\n fix: `Check file permissions on ${path}.`,\n cause: err,\n });\n }\n let json: unknown;\n try {\n json = JSON.parse(raw);\n } catch (err) {\n throw new CliError('CONFIG_INVALID', `Config at ${path} is not valid JSON`, {\n fix: `Fix the JSON syntax in ${path}, or delete it to restore defaults.`,\n cause: err,\n });\n }\n const parsed = RawConfigSchema.safeParse(json);\n if (!parsed.success) {\n throw new CliError('CONFIG_INVALID', `Config at ${path} is invalid`, {\n fix: `Correct the reported keys in ${path}, or delete it to restore defaults.`,\n details: parsed.error.issues,\n });\n }\n return parsed.data;\n}\n\n/** File values merged over defaults — the effective persisted config. The nested\n * publish block is merged per-subkey so a file that sets only publish.mode keeps\n * the default defaultPrice (a shallow spread would drop it). */\nexport async function loadConfig(dir: string): Promise<Config> {\n const raw = { ...(await loadRawConfig(dir)) };\n for (const key of retiredPaymentKeys(raw)) delete raw[key];\n // loadConfig's job is the effective Config object, so an absent key is its\n // default here; the provenance question lives in resolve* below.\n return {\n ...CONFIG_DEFAULTS,\n ...raw,\n publish: {\n mode: raw.publish?.mode ?? CONFIG_DEFAULTS.publish.mode,\n defaultPrice: raw.publish?.defaultPrice ?? CONFIG_DEFAULTS.publish.defaultPrice,\n ackServerWarnings:\n raw.publish?.ackServerWarnings ?? CONFIG_DEFAULTS.publish.ackServerWarnings,\n },\n install: {\n harness: raw.install?.harness ?? CONFIG_DEFAULTS.install.harness,\n routerProjects: raw.install?.routerProjects ?? CONFIG_DEFAULTS.install.routerProjects,\n grantDeclined: resolveGrantDeclined(raw.install?.grantDeclined),\n },\n hooks: resolveHooksConfig(raw),\n update: { mode: raw.update?.mode ?? CONFIG_DEFAULTS.update.mode },\n loop: resolveLoopConfig(raw),\n team: { publicFallback: raw.team?.publicFallback ?? CONFIG_DEFAULTS.team.publicFallback },\n router: {\n enabled: raw.router?.enabled ?? CONFIG_DEFAULTS.router.enabled,\n context: raw.router?.context ?? CONFIG_DEFAULTS.router.context,\n },\n experimental: {\n bazaar: raw.experimental?.bazaar ?? CONFIG_DEFAULTS.experimental.bazaar,\n },\n };\n}\n\n/** Per-subkey merge over the defaults; an unknown key a newer CLI wrote is\n * dropped from the EFFECTIVE object (it still rides through persist). */\nexport function resolveLoopConfig(raw: PartialConfig): LoopConfig {\n const file = raw.loop ?? {};\n return {\n human_wait_ms: file.human_wait_ms ?? CONFIG_DEFAULTS.loop.human_wait_ms,\n tool_wait_ms: file.tool_wait_ms ?? CONFIG_DEFAULTS.loop.tool_wait_ms,\n idle_exit_min: file.idle_exit_min ?? CONFIG_DEFAULTS.loop.idle_exit_min,\n port: file.port === undefined ? CONFIG_DEFAULTS.loop.port : file.port,\n };\n}\n\n/** `local` is a project's personal `.tenjin/config.local.json` (router keys only). */\nexport type Provenance = 'default' | 'file' | 'project' | 'local' | 'env' | 'flag';\n\nexport interface ResolvedSetting<T> {\n value: T;\n source: Provenance;\n}\n\n/**\n * The per-project `.tenjin.json` layer (B3, D38): publish overrides discovered by\n * walking up from cwd, plus whether that file is gitignored. `gitignored` gates\n * `full-auto` — a committed file requesting it is downgraded (loosening gate).\n */\nexport interface ProjectPublishLayer {\n publish?: { mode?: PublishMode; defaultPrice?: string };\n gitignored: boolean;\n /** The file named `publish.ackServerWarnings`, which this layer never supplies. */\n ignoredAckServerWarnings?: boolean;\n}\n\n/** publish.mode resolution: value, source, and the downgrade warning (if any). */\nexport interface PublishModeResolution {\n value: PublishMode;\n source: Provenance;\n /** Set when a committed `.tenjin.json`'s `full-auto` was downgraded to `auto`. */\n downgradedWarning?: string;\n}\n\n/** Effective value + where it came from, per key. What `config` (bare) renders. */\nexport interface EffectiveSettings {\n maxAutoSpend: ResolvedSetting<string>;\n sessionBudget: ResolvedSetting<string>;\n sendMaxAmount: ResolvedSetting<string>;\n allowlistCreators: ResolvedSetting<string[]>;\n baseUrl: ResolvedSetting<string>;\n publicShelfUrl: ResolvedSetting<string>;\n shelfBypassSecret: ResolvedSetting<string>;\n rpcUrl: ResolvedSetting<string>;\n evalCohort: ResolvedSetting<boolean>;\n bazaarRegistries: ResolvedSetting<string[]>;\n publishMode: PublishModeResolution;\n publishDefaultPrice: ResolvedSetting<string>;\n publishAckServerWarnings: ResolvedSetting<AckServerWarnings>;\n hooks: { [K in HookArm]: ResolvedSetting<boolean> };\n updateMode: ResolvedSetting<UpdateMode>;\n loop: { [K in keyof LoopConfig]: ResolvedSetting<LoopConfig[K]> };\n teamPublicFallback: ResolvedSetting<PublicFallback>;\n experimentalBazaar: ResolvedSetting<PublicFallback>;\n}\n\n/** CLI flags that participate in settings precedence (`--base-url`). */\nexport interface SettingsFlags {\n baseUrl?: string;\n}\n\nexport interface ResolveSettingsInput {\n /** Raw file values (present keys only) — from loadRawConfig, not loadConfig. */\n config: PartialConfig;\n flags: SettingsFlags;\n env: NodeJS.ProcessEnv;\n /** The nearest `.tenjin.json` layer, when one was found (see publish-settings). */\n project?: ProjectPublishLayer;\n}\n\n/**\n * Apply precedence flag > env > file > default per key, returning each effective\n * value with its source. In B1 only baseUrl has flag/env overrides\n * (`--base-url`, TENJIN_BASE_URL); the rest resolve file-or-default. B3 adds the\n * publish keys, which additionally fold in the per-project `.tenjin.json` layer.\n */\nexport function resolveSettings(input: ResolveSettingsInput): EffectiveSettings {\n const { config, flags, env, project } = input;\n return {\n maxAutoSpend: fileOrDefault('maxAutoSpend', config),\n sessionBudget: fileOrDefault('sessionBudget', config),\n sendMaxAmount: resolveSendMaxAmount(config),\n allowlistCreators: fileOrDefault('allowlistCreators', config),\n baseUrl: resolveBaseUrl(config, flags, env),\n publicShelfUrl: fileOrDefault('publicShelfUrl', config),\n shelfBypassSecret: fileOrDefault('shelfBypassSecret', config),\n rpcUrl: fileOrDefault('rpcUrl', config),\n evalCohort: fileOrDefault('evalCohort', config),\n bazaarRegistries: fileOrDefault('bazaarRegistries', config),\n publishMode: resolvePublishMode({ config, project, env }),\n publishDefaultPrice: resolvePublishDefaultPrice({ config, project }),\n publishAckServerWarnings: resolveAckServerWarnings(config),\n hooks: resolveHookSettings(config),\n updateMode: resolveUpdateMode(config),\n loop: resolveLoopSettings(config),\n teamPublicFallback: resolveTeamPublicFallback(config),\n experimentalBazaar: resolveExperimentalBazaar(config),\n };\n}\n\nfunction resolveLoopSettings(config: PartialConfig): EffectiveSettings['loop'] {\n const file = config.loop ?? {};\n const one = <K extends keyof LoopConfig>(key: K): ResolvedSetting<LoopConfig[K]> => {\n const fromFile = file[key];\n if (fromFile !== undefined) return { value: fromFile as LoopConfig[K], source: 'file' };\n return { value: CONFIG_DEFAULTS.loop[key], source: 'default' };\n };\n return {\n human_wait_ms: one('human_wait_ms'),\n tool_wait_ms: one('tool_wait_ms'),\n idle_exit_min: one('idle_exit_min'),\n port: one('port'),\n };\n}\n\n/** experimental.bazaar: file or default (off), no env or flag. */\nexport function resolveExperimentalBazaar(config: PartialConfig): ResolvedSetting<PublicFallback> {\n const fromFile = config.experimental?.bazaar;\n if (fromFile !== undefined) return { value: fromFile, source: 'file' };\n return { value: CONFIG_DEFAULTS.experimental.bazaar, source: 'default' };\n}\n\n/** team.publicFallback: file or default, no env or flag. */\nexport function resolveTeamPublicFallback(config: PartialConfig): ResolvedSetting<PublicFallback> {\n const fromFile = config.team?.publicFallback;\n if (fromFile !== undefined) return { value: fromFile, source: 'file' };\n return { value: CONFIG_DEFAULTS.team.publicFallback, source: 'default' };\n}\n\n/**\n * publish.ackServerWarnings: the GLOBAL config file or the default, deliberately\n * with no project `.tenjin.json` layer and no env override. The other two publish\n * keys take the project layer because a repo may reasonably state its own price\n * and its own mode; this one only ever LOOSENS what a yes covers, so a file\n * checked into a repo the operator cloned must not be able to set it. That is the\n * same reason `resolvePublishMode` gates `full-auto` out of the project layer,\n * applied one step earlier: here there is no benign reading of the key at all.\n *\n * Exported because `resolvePublishSettings` (lib/settings.ts) resolves the same\n * key for the two writing commands, and two global-only readings that disagreed\n * would disagree about consent.\n */\nexport function resolveAckServerWarnings(\n config: PartialConfig,\n): ResolvedSetting<AckServerWarnings> {\n const fromFile = config.publish?.ackServerWarnings;\n if (fromFile !== undefined) return { value: fromFile, source: 'file' };\n return { value: CONFIG_DEFAULTS.publish.ackServerWarnings, source: 'default' };\n}\n\n/** update.mode: file or default, no env or flag. Every surface that reports a\n * newer version reads this one resolved value, so they cannot disagree. */\nfunction resolveUpdateMode(config: PartialConfig): ResolvedSetting<UpdateMode> {\n const fromFile = config.update?.mode;\n if (fromFile !== undefined) return { value: fromFile, source: 'file' };\n return { value: CONFIG_DEFAULTS.update.mode, source: 'default' };\n}\n\n/** One hook arm: file or default. Read per fire by the daemon, so a `config\n * set` takes effect on the next prompt with no re-install. */\nexport function resolveHook(config: PartialConfig, arm: HookArm): ResolvedSetting<boolean> {\n const fromFile = config.hooks?.[arm];\n if (fromFile !== undefined) return { value: fromFile, source: 'file' };\n return { value: CONFIG_DEFAULTS.hooks[arm], source: 'default' };\n}\n\nfunction resolveHookSettings(config: PartialConfig): EffectiveSettings['hooks'] {\n return Object.fromEntries(\n HOOK_ARMS.map((arm) => [arm, resolveHook(config, arm)]),\n ) as EffectiveSettings['hooks'];\n}\n\n/** Per-arm merge over the defaults, for the effective Config object. */\nfunction resolveHooksConfig(raw: PartialConfig): Config['hooks'] {\n return Object.fromEntries(\n HOOK_ARMS.map((arm) => [arm, raw.hooks?.[arm] ?? CONFIG_DEFAULTS.hooks[arm]]),\n ) as Config['hooks'];\n}\n\n/**\n * The loosening gate (D38): a committed (not-gitignored) `.tenjin.json` requesting\n * `full-auto` is downgraded to `auto`, never silently honored — cloning a repo\n * must not enable auto-publish. `full-auto` from global config / env / flag (all\n * inherently local, not cloned) is always honored.\n */\nconst FULL_AUTO_DOWNGRADE_WARNING =\n 'Ignoring publish.mode \"full-auto\" from a committed .tenjin.json (cloning a repo must not enable auto-publish); using \"auto\". Add .tenjin.json to .gitignore to opt in.';\n\nfunction coercePublishMode(raw: string | undefined): PublishMode | undefined {\n if (raw === undefined || raw.length === 0) return undefined;\n const parsed = PublishModeSchema.safeParse(raw);\n return parsed.success ? parsed.data : undefined;\n}\n\n/**\n * Resolve publish.mode through global file < project `.tenjin.json` < env\n * (TENJIN_PUBLISH_MODE) < flag (`--mode`). Total: an invalid env/flag value is\n * ignored (validation lives at the command edge, like baseUrl). The project\n * layer's `full-auto` is gated on that file being gitignored.\n */\nexport function resolvePublishMode(input: {\n config: PartialConfig;\n project?: ProjectPublishLayer;\n env: NodeJS.ProcessEnv;\n flag?: string;\n}): PublishModeResolution {\n const { config, project, env, flag } = input;\n let winner: PublishModeResolution = { value: CONFIG_DEFAULTS.publish.mode, source: 'default' };\n\n const fromFile = config.publish?.mode;\n if (fromFile !== undefined) winner = { value: fromFile, source: 'file' };\n\n if (project !== undefined && project.publish?.mode !== undefined) {\n const fromProject = project.publish.mode;\n if (fromProject === 'full-auto' && !project.gitignored) {\n winner = { value: 'auto', source: 'project', downgradedWarning: FULL_AUTO_DOWNGRADE_WARNING };\n } else {\n winner = { value: fromProject, source: 'project' };\n }\n }\n\n const fromEnv = coercePublishMode(env.TENJIN_PUBLISH_MODE);\n if (fromEnv !== undefined) winner = { value: fromEnv, source: 'env' };\n\n const fromFlag = coercePublishMode(flag);\n if (fromFlag !== undefined) winner = { value: fromFlag, source: 'flag' };\n\n return winner;\n}\n\n/** Resolve publish.defaultPrice (atomic) through global file < project < default. */\nexport function resolvePublishDefaultPrice(input: {\n config: PartialConfig;\n project?: ProjectPublishLayer;\n}): ResolvedSetting<string> {\n const { config, project } = input;\n let result: ResolvedSetting<string> = {\n value: CONFIG_DEFAULTS.publish.defaultPrice,\n source: 'default',\n };\n if (config.publish?.defaultPrice !== undefined) {\n result = { value: config.publish.defaultPrice, source: 'file' };\n }\n if (project?.publish?.defaultPrice !== undefined) {\n result = { value: project.publish.defaultPrice, source: 'project' };\n }\n return result;\n}\n\n/**\n * Persist a full, validated config via the atomic writer (0700 dir, 0600 file).\n *\n * 0600 BECAUSE config.json NOW HOLDS A CREDENTIAL: `shelfBypassSecret` is the\n * team shelf's shared door key, and every other secret in this tree is 0600\n * (the wallet, the passphrase, the session key, the spend ledger, the daemon\n * token) — wallet/local.ts even warns when it finds one that is not.\n * `dirMode: 0o700` is not a substitute: node's recursive mkdir does not chmod a\n * directory that already exists, so a `~/.tenjin` or `TENJIN_DATA_DIR` created\n * at 0755 by a devcontainer volume, a restored backup or a shared CI image left\n * the key world-readable. `config --json` already redacts it, which is the same\n * care applied one layer up. Keep this in step with `persist` in commands/config.ts,\n * the other writer of this file.\n */\nexport async function writeConfig(dir: string, config: Config): Promise<void> {\n const validated = ConfigSchema.parse(config);\n await writeFileAtomic(configPath(dir), `${JSON.stringify(validated, null, 2)}\\n`, {\n mode: 0o600,\n dirMode: 0o700,\n });\n}\n\n/**\n * sendMaxAmount deliberately bypasses fileOrDefault: it has no usable default\n * (the operator's require-set-before-first-send posture). Absent from\n * config.json it resolves to the SEND_MAX_UNSET sentinel with source 'default',\n * which `tenjin wallet send` refuses outright — the cap must be set to an amount, \"0\"\n * (disable), or an explicit \"none\" (uncapped opt-in) before the first send.\n */\nfunction resolveSendMaxAmount(config: PartialConfig): ResolvedSetting<string> {\n if (config.sendMaxAmount !== undefined) return { value: config.sendMaxAmount, source: 'file' };\n return { value: SEND_MAX_UNSET, source: 'default' };\n}\n\nfunction fileOrDefault<K extends keyof Config>(\n key: K,\n config: PartialConfig,\n): ResolvedSetting<Config[K]> {\n const fromFile = config[key];\n // PartialConfig[K] is Config[K] | undefined; narrowing an indexed access of a\n // type parameter doesn't refine K, so assert the excluded-undefined type.\n if (fromFile !== undefined) return { value: fromFile as Config[K], source: 'file' };\n return { value: CONFIG_DEFAULTS[key], source: 'default' };\n}\n\nfunction resolveBaseUrl(\n config: PartialConfig,\n flags: SettingsFlags,\n env: NodeJS.ProcessEnv,\n): ResolvedSetting<string> {\n if (flags.baseUrl !== undefined && flags.baseUrl.length > 0) {\n return { value: flags.baseUrl, source: 'flag' };\n }\n const fromEnv = env.TENJIN_BASE_URL;\n if (fromEnv !== undefined && fromEnv.length > 0) {\n return { value: fromEnv, source: 'env' };\n }\n if (config.baseUrl !== undefined) return { value: config.baseUrl, source: 'file' };\n return { value: CONFIG_DEFAULTS.baseUrl, source: 'default' };\n}\n\nfunction isNotFound(err: unknown): boolean {\n return (\n typeof err === 'object' &&\n err !== null &&\n 'code' in err &&\n (err as { code?: unknown }).code === 'ENOENT'\n );\n}\n","/**\n * The harness adapter contract (tenjin-notes loop-redesign/04-harness-adapters.md).\n *\n * This and `error-markers.ts` (data both sides read) are the ONLY files the\n * kernel (`src/hooks/*`) imports from `src/adapters/`.\n * A harness is one module exporting a {@link HarnessAdapter}: a pure `decode`\n * from its native payload to {@link HookInput}, a pure `encode` from the\n * kernel's {@link Emit} to its native response, and a {@link Registrar} the\n * installer uses to write its hook entries. The daemon holds one adapter per\n * member of {@link Harness} and one route, `POST /hook/:harness`.\n *\n * Adding a harness is an adapter file plus a transport; nothing in `src/hooks`\n * or `src/daemon` changes. The union gains a member when an adapter lands, not\n * before.\n */\n\nimport type { PublishMode } from '../lib/config';\nimport type {\n CodexGrantResult,\n HarnessPermissions,\n PermissionsResult,\n} from '../lib/harness-permissions';\nimport type { CodexTrustReport, TrustProbeOptions, TrustResult } from '../lib/codex-trust';\n\n/** Harnesses with an adapter in this build. */\nexport type Harness = 'claude' | 'codex';\n\n/** The same union at run time: the installer's ownership predicate matches a\n * registered URL against `/hook/<harness>`, and a list it cannot iterate would\n * have to be spelled a second time. */\nexport const HARNESSES: readonly Harness[] = ['claude', 'codex'];\n\n/**\n * The canonical event vocabulary every adapter maps its native events onto.\n * `session.end` is deliberately absent: no arm registers on it and retention\n * never runs there (a daemon serves many sessions; one ending is not the\n * machine going quiet).\n */\nexport type Event =\n | 'session.start'\n | 'prompt'\n | 'tool.before'\n | 'tool.after'\n | 'agent.start'\n | 'agent.stop'\n | 'turn.end';\n\nexport const EVENTS: readonly Event[] = [\n 'session.start',\n 'prompt',\n 'tool.before',\n 'tool.after',\n 'agent.start',\n 'agent.stop',\n 'turn.end',\n];\n\n/**\n * What a tool IS to the arms. Anything unmatched is `'other'`, never a key.\n *\n * `web` and `fetch` are separate kinds because they are separate arms: a page\n * fetch and a real web search ask different questions, and one agent's six page\n * fetches must not spend the budget its search needed.\n */\nexport type ToolKind = 'web' | 'fetch' | 'dispatch' | 'shell' | 'edit' | 'read';\n\nexport interface ToolResult {\n stdout?: string;\n stderr?: string;\n error?: string;\n text?: string;\n}\n\ninterface ToolBase {\n /** The native tool name, verbatim. */\n name: string;\n callId?: string;\n /**\n * `tool.after` only, and DECIDED IN DECODE, never by an arm reading the\n * result text. `false` is a failure the harness stated or an error marker in\n * a shell's output; `true` is a completion the harness vouched for;\n * `undefined` is unknown, which is what a harness that reports no exit status\n * leaves behind. No marker never means success.\n */\n ok?: boolean;\n result?: ToolResult;\n interrupted?: boolean;\n}\n\n/**\n * The fields the arms read, canonical per kind. Native argument shapes (a\n * `file_path`, a patch body, a `message`) stop at the adapter; an arm never\n * reads a vendor field. One native invocation is one tool value, so an edit\n * that touches several files carries them all in `paths` and the context arm\n * marks every one in a single fire.\n */\nexport type HookTool = ToolBase &\n (\n | { kind: 'shell'; command: string }\n | { kind: 'edit'; paths: string[] }\n | { kind: 'read'; paths: string[] }\n | { kind: 'dispatch'; task: string; description?: string }\n | { kind: 'web'; query: string }\n | { kind: 'fetch'; url: string; prompt: string }\n | { kind: 'other' }\n );\n\n/** The normalized payload the kernel runs on. */\nexport interface HookInput {\n harness: Harness;\n event: Event;\n /** `hook_event_name` verbatim; `encode` stamps its response with it. */\n native: { event: string };\n /** The ROOT session as the harness names it: the id the lead and all its\n * children share. `actorOf` namespaces it by harness before anything is\n * stored, so equal native ids across harnesses never share state. */\n session: string;\n /** Child id; undefined = the lead. Present-but-invalid makes `decode` return null. */\n agent?: string;\n /** Required; '' is allowed and recorded. */\n cwd: string;\n /** Claude `prompt_id`, Codex `turn_id`. */\n turn?: string;\n tool?: HookTool;\n /** The prompt on `prompt`; the spawn prompt on `agent.start` when the harness has it. */\n prompt?: string;\n agentType?: string;\n lastMessage?: string;\n /** Claude/Codex `stop_hook_active`: this stop was raised by a hook's own\n * feedback rather than by the agent finishing. The capture arm reads it to\n * tell an ask turn from the answer turn after one. */\n stopFuse?: boolean;\n transcript?: { path?: string; agentPath?: string };\n /** `session.start` source (`startup`, `clear`, `compact`, `resume`). */\n source?: string;\n /** The native payload. Ledger `question` on error rows and tests only; never read by arms. */\n raw: unknown;\n}\n\n/**\n * What the kernel hands back to the harness. `null` is \"nothing to say\" (204).\n *\n * ONE CHANNEL. Everything an arm says is context beside the turn, including the\n * turn-end ask: on Stop and SubagentStop `additionalContext` keeps the\n * conversation going through the same loop protections a blocking decision\n * would, and shows in the transcript as hook feedback rather than a hook error.\n * A second channel with a red banner said the same words for a worse price.\n */\nexport interface Emit {\n context?: string;\n}\n\n/**\n * What the installer needs to register a harness, and nothing the daemon runs\n * on: `selectArm` reads the event and tool kind off the decoded input, so a\n * registrar carries no event or tool metadata that would claim an enforcement\n * nothing performs.\n */\nexport interface Registrar {\n /** The harness's own hooks file under `home`. */\n configPath(home: string, env?: NodeJS.ProcessEnv): string;\n /**\n * Entries the installer merges additively into that file, each\n * `{ event, matcher?, hooks }` in the harness's own JSON shape.\n */\n plan(target: { url: string; token: string; shimPath: string; timeoutSeconds: number }): unknown[];\n /**\n * The steps left to a PERSON once the file is written, for a harness that\n * gates entries it has not been told to trust. Takes the path actually\n * written, because a machine on `$CODEX_HOME` is not reading `~/.codex`.\n * One sentence was not enough: as a clause on the undo line, operators\n * finished an install reporting \"7 entries\" with a loop that never fired\n * (tenjin-agent#342).\n */\n activation?(hooksPath: string): string[];\n /** The harness-native persistent command grant, when this harness has one. */\n grant?: {\n path(home: string, env?: NodeJS.ProcessEnv): string;\n inspect(home: string, mode: PublishMode, env?: NodeJS.ProcessEnv): Promise<HarnessPermissions>;\n write(\n home: string,\n mode: PublishMode,\n env?: NodeJS.ProcessEnv,\n ): Promise<PermissionsResult | CodexGrantResult>;\n remove?(home: string, env?: NodeJS.ProcessEnv): Promise<{ path: string; removed: boolean }>;\n };\n /** A harness-native trust gate for registered hook handlers. */\n trust?: {\n ensure(\n home: string,\n keys: readonly string[],\n ownedBy: (row: { command?: unknown; sourcePath?: unknown }) => boolean,\n opts?: TrustProbeOptions,\n ): Promise<TrustResult>;\n read(\n home: string,\n keys: readonly string[],\n opts?: TrustProbeOptions,\n ): Promise<CodexTrustReport>;\n };\n}\n\nexport interface HarnessAdapter {\n id: Harness;\n /** Pure. `null` = drop the fire quietly (unknown event, invalid identity). */\n decode(raw: unknown): HookInput | null;\n /** Pure. `null` = respond 204 with no body. */\n encode(emit: Emit | null, input: HookInput): unknown;\n registrar: Registrar;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAAS,gBAAg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