tenjin-cli 0.1.0-alpha.15 → 0.1.0-alpha.16
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 +54 -7
- package/README.md +41 -310
- package/dist/{_esm-N4KAVXQR.js → _esm-CE7KNONL.js} +9 -10
- package/dist/{ccip-ZGGWQN4X.js → ccip-7RMRLAGV.js} +4 -4
- package/dist/{ccip-RPPPKTJR.js → ccip-NLCSCHKI.js} +5 -5
- package/dist/chunk-25TJPVBF.js +353 -0
- package/dist/chunk-25TJPVBF.js.map +1 -0
- package/dist/chunk-2BKS2FVE.js +93 -0
- package/dist/chunk-2BKS2FVE.js.map +1 -0
- package/dist/chunk-2QYORQBF.js +55 -0
- package/dist/chunk-2QYORQBF.js.map +1 -0
- package/dist/{chunk-NIKXHWOL.js → chunk-2U5ZVEV3.js} +16 -16
- package/dist/chunk-2U5ZVEV3.js.map +1 -0
- package/dist/{chunk-HPJGOLTN.js → chunk-3AJS6LLN.js} +13 -8
- package/dist/chunk-3AJS6LLN.js.map +1 -0
- package/dist/{chunk-KINZ23CV.js → chunk-3AUDA53C.js} +4740 -23
- package/dist/chunk-3AUDA53C.js.map +1 -0
- package/dist/{chunk-MJZZTKCC.js → chunk-56MOAIP5.js} +5 -10
- package/dist/chunk-56MOAIP5.js.map +1 -0
- package/dist/{chunk-U5S527PP.js → chunk-5IEP5EGE.js} +3 -3
- package/dist/chunk-5X4SZ5BF.js +227 -0
- package/dist/chunk-5X4SZ5BF.js.map +1 -0
- package/dist/chunk-7WEQQJLG.js +68 -0
- package/dist/chunk-7WEQQJLG.js.map +1 -0
- package/dist/{chunk-7FK2UN2T.js → chunk-AWQPGIR6.js} +65 -67
- package/dist/{chunk-7FK2UN2T.js.map → chunk-AWQPGIR6.js.map} +1 -1
- package/dist/{chunk-ZFJJ3EXC.js → chunk-BBVUVBUO.js} +516 -185
- package/dist/chunk-BBVUVBUO.js.map +1 -0
- package/dist/{chunk-JBIKAAT3.js → chunk-BFFM2WFK.js} +8 -8
- package/dist/chunk-BFFM2WFK.js.map +1 -0
- package/dist/{chunk-KYQVEKP5.js → chunk-BPMWXTFX.js} +8 -8
- package/dist/chunk-DMZZLPZN.js +205 -0
- package/dist/chunk-DMZZLPZN.js.map +1 -0
- package/dist/{chunk-47PP7TAG.js → chunk-EGELTSPU.js} +1356 -1356
- package/dist/chunk-EGELTSPU.js.map +1 -0
- package/dist/chunk-GULLJQXA.js +698 -0
- package/dist/chunk-GULLJQXA.js.map +1 -0
- package/dist/{chunk-S5RYMCV6.js → chunk-HPWO4O6S.js} +3 -3
- package/dist/chunk-HVRC33OL.js +174 -0
- package/dist/chunk-HVRC33OL.js.map +1 -0
- package/dist/{chunk-W6R3HAAG.js → chunk-JRGFKVAZ.js} +2 -2
- package/dist/{chunk-XJN5WUKL.js → chunk-KG3D7FIF.js} +2 -2
- package/dist/chunk-L3PVMIYQ.js +10328 -0
- package/dist/chunk-L3PVMIYQ.js.map +1 -0
- package/dist/{chunk-QW2Q2KAH.js → chunk-LHHMV4GU.js} +2 -2
- package/dist/{chunk-ZOBNS7CX.js → chunk-MEFB5KHA.js} +4 -18
- package/dist/chunk-MEFB5KHA.js.map +1 -0
- package/dist/{chunk-M2O56UK7.js → chunk-N35E6CM2.js} +293 -163
- package/dist/chunk-N35E6CM2.js.map +1 -0
- package/dist/chunk-OCBHUHWB.js +69 -0
- package/dist/chunk-OCBHUHWB.js.map +1 -0
- package/dist/chunk-OIM4HLN6.js +1405 -0
- package/dist/chunk-OIM4HLN6.js.map +1 -0
- package/dist/{chunk-VYOJOX4Z.js → chunk-OJLYNM4Z.js} +54 -33
- package/dist/chunk-OJLYNM4Z.js.map +1 -0
- package/dist/{chunk-POJRB2AE.js → chunk-POUWHWID.js} +2 -2
- package/dist/chunk-PZEN5PHN.js +285 -0
- package/dist/chunk-PZEN5PHN.js.map +1 -0
- package/dist/chunk-SKAHDQH7.js +1785 -0
- package/dist/chunk-SKAHDQH7.js.map +1 -0
- package/dist/{chunk-KZAAWQNP.js → chunk-TTNESUPQ.js} +3 -3
- package/dist/chunk-U5DXNFJC.js +137 -0
- package/dist/chunk-U5DXNFJC.js.map +1 -0
- package/dist/chunk-USS336NF.js +165 -0
- package/dist/chunk-USS336NF.js.map +1 -0
- package/dist/{chunk-UO22YNY4.js → chunk-WH7OWT6G.js} +49 -1
- package/dist/chunk-WH7OWT6G.js.map +1 -0
- package/dist/chunk-WXC57XGG.js +29 -0
- package/dist/chunk-WXC57XGG.js.map +1 -0
- package/dist/{chunk-YLYINX2H.js → chunk-XZKD7DIF.js} +3 -3
- package/dist/{chunk-CPCX67TI.js → chunk-YEETV6IW.js} +1079 -1039
- package/dist/chunk-YEETV6IW.js.map +1 -0
- package/dist/{chunk-OLWTRUTS.js → chunk-YJHHCWM3.js} +35 -16
- package/dist/chunk-YJHHCWM3.js.map +1 -0
- package/dist/{cli-KKRKBU5T.js → cli-M3XCSOU6.js} +289 -374
- package/dist/cli-M3XCSOU6.js.map +1 -0
- package/dist/config-MXOX7XDR.js +41 -0
- package/dist/{dist-U4M6QCKE.js → dist-3LOO6M4U.js} +10 -10
- package/dist/doctor-LU4YIZWM.js +349 -0
- package/dist/doctor-LU4YIZWM.js.map +1 -0
- package/dist/{ethersCompat-Df4a6QIZ-WHYKB6HA.js → ethersCompat-Df4a6QIZ-THAVUGIJ.js} +5 -5
- package/dist/{chunk-KAJZHIQ4.js → fund-A54P2QFK.js} +80 -24
- package/dist/fund-A54P2QFK.js.map +1 -0
- package/dist/hook-command-U6KWPEDQ.js +377 -0
- package/dist/hook-command-U6KWPEDQ.js.map +1 -0
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/install-XUM2XSHW.js +53 -0
- package/dist/install-wallet-QIOFORTX.js +105 -0
- package/dist/install-wallet-QIOFORTX.js.map +1 -0
- package/dist/{run-XYTQ5TWQ.js → mcp-HJC2PLRV.js} +3727 -10670
- package/dist/mcp-HJC2PLRV.js.map +1 -0
- package/dist/paths-P2N4JTDZ.js +49 -0
- package/dist/pay-SBXZEPEP.js +37 -0
- package/dist/redact-46ZHF2NH.js +17 -0
- package/dist/{secp256k1-XRPVBC6V.js → secp256k1-ZZZT2CAX.js} +3 -3
- package/dist/{send-G746D7PQ.js → send-ASD2ZXJD.js} +28 -29
- package/dist/send-ASD2ZXJD.js.map +1 -0
- package/dist/{chunk-QZ6ROAJU.js → skill-placement-NFVHY6A3.js} +157 -11
- package/dist/skill-placement-NFVHY6A3.js.map +1 -0
- package/dist/status-T2SDB57A.js +63 -0
- package/dist/status-T2SDB57A.js.map +1 -0
- package/dist/status-line-CGPUSDMC.js +71 -0
- package/dist/status-line-CGPUSDMC.js.map +1 -0
- package/dist/status-line-wiring-BYPHTYZE.js +30 -0
- package/dist/tenjin-daemon.mjs +20060 -0
- package/dist/tenjin-shim.mjs +251 -0
- package/dist/tenjin-vitest-reporter.mjs +49 -0
- package/dist/uninstall-FKYZHAM3.js +144 -0
- package/dist/uninstall-FKYZHAM3.js.map +1 -0
- package/dist/{update-R76LHOZW.js → update-ANJ2AOTN.js} +133 -16
- package/dist/update-ANJ2AOTN.js.map +1 -0
- package/dist/{viemAdapter-By13KInL-TUQJBMHM.js → viemAdapter-By13KInL-X2VY6CY3.js} +5 -5
- package/dist/wallet-PWAHVKWW.js +31 -0
- package/dist/wallet-kdf-worker.mjs +980 -0
- package/docs/agent-permissions.md +65 -354
- package/docs/safety-model.md +16 -6
- package/package.json +8 -7
- package/LICENSE +0 -21
- package/dist/buy-VIRNSYGN.js +0 -47
- package/dist/chunk-2MYQN7HM.js +0 -247
- package/dist/chunk-2MYQN7HM.js.map +0 -1
- package/dist/chunk-2RF2GIJQ.js +0 -1188
- package/dist/chunk-2RF2GIJQ.js.map +0 -1
- package/dist/chunk-3GL2Z5QK.js +0 -57
- package/dist/chunk-3GL2Z5QK.js.map +0 -1
- package/dist/chunk-47PP7TAG.js.map +0 -1
- package/dist/chunk-4CQIDQOT.js +0 -167
- package/dist/chunk-4CQIDQOT.js.map +0 -1
- package/dist/chunk-4KG27W2S.js +0 -614
- package/dist/chunk-4KG27W2S.js.map +0 -1
- package/dist/chunk-5QQTYWEU.js +0 -199
- package/dist/chunk-5QQTYWEU.js.map +0 -1
- package/dist/chunk-65DTCCJ7.js +0 -21
- package/dist/chunk-65DTCCJ7.js.map +0 -1
- package/dist/chunk-A5DKHMUN.js +0 -173
- package/dist/chunk-A5DKHMUN.js.map +0 -1
- package/dist/chunk-B63XPWQ4.js +0 -246
- package/dist/chunk-B63XPWQ4.js.map +0 -1
- package/dist/chunk-CAR6FHK6.js +0 -105
- package/dist/chunk-CAR6FHK6.js.map +0 -1
- package/dist/chunk-CPCX67TI.js.map +0 -1
- package/dist/chunk-CQBVCYI2.js +0 -162
- package/dist/chunk-CQBVCYI2.js.map +0 -1
- package/dist/chunk-DBU5CXBV.js +0 -4731
- package/dist/chunk-DBU5CXBV.js.map +0 -1
- package/dist/chunk-DHJD77OW.js +0 -81
- package/dist/chunk-DHJD77OW.js.map +0 -1
- package/dist/chunk-EDZSNPE5.js +0 -35
- package/dist/chunk-EDZSNPE5.js.map +0 -1
- package/dist/chunk-EFWZPUTC.js +0 -65
- package/dist/chunk-EFWZPUTC.js.map +0 -1
- package/dist/chunk-EPFL6CTE.js +0 -448
- package/dist/chunk-EPFL6CTE.js.map +0 -1
- package/dist/chunk-GHLVXVZD.js +0 -142
- package/dist/chunk-GHLVXVZD.js.map +0 -1
- package/dist/chunk-H3SOOJ2I.js +0 -580
- package/dist/chunk-H3SOOJ2I.js.map +0 -1
- package/dist/chunk-HPJGOLTN.js.map +0 -1
- package/dist/chunk-HRGBS2PA.js +0 -203
- package/dist/chunk-HRGBS2PA.js.map +0 -1
- package/dist/chunk-ITUXPJIS.js +0 -314
- package/dist/chunk-ITUXPJIS.js.map +0 -1
- package/dist/chunk-JBIKAAT3.js.map +0 -1
- package/dist/chunk-KAJZHIQ4.js.map +0 -1
- package/dist/chunk-KINZ23CV.js.map +0 -1
- package/dist/chunk-LRYV3SK7.js +0 -235
- package/dist/chunk-LRYV3SK7.js.map +0 -1
- package/dist/chunk-M2O56UK7.js.map +0 -1
- package/dist/chunk-MJZZTKCC.js.map +0 -1
- package/dist/chunk-NIKXHWOL.js.map +0 -1
- package/dist/chunk-OKDRDT74.js +0 -209
- package/dist/chunk-OKDRDT74.js.map +0 -1
- package/dist/chunk-OKYSNAS3.js +0 -2144
- package/dist/chunk-OKYSNAS3.js.map +0 -1
- package/dist/chunk-OLWTRUTS.js.map +0 -1
- package/dist/chunk-QQ6ELLSA.js +0 -143
- package/dist/chunk-QQ6ELLSA.js.map +0 -1
- package/dist/chunk-QZ6ROAJU.js.map +0 -1
- package/dist/chunk-R7RSCBI7.js +0 -794
- package/dist/chunk-R7RSCBI7.js.map +0 -1
- package/dist/chunk-SGK2B724.js +0 -67
- package/dist/chunk-SGK2B724.js.map +0 -1
- package/dist/chunk-U6VPKMGC.js +0 -390
- package/dist/chunk-U6VPKMGC.js.map +0 -1
- package/dist/chunk-UHTVXQ2O.js +0 -140
- package/dist/chunk-UHTVXQ2O.js.map +0 -1
- package/dist/chunk-UO22YNY4.js.map +0 -1
- package/dist/chunk-US456VUI.js +0 -149
- package/dist/chunk-US456VUI.js.map +0 -1
- package/dist/chunk-V44J2MXV.js +0 -400
- package/dist/chunk-V44J2MXV.js.map +0 -1
- package/dist/chunk-VJQKL3YH.js +0 -216
- package/dist/chunk-VJQKL3YH.js.map +0 -1
- package/dist/chunk-VJSQSLBM.js +0 -1442
- package/dist/chunk-VJSQSLBM.js.map +0 -1
- package/dist/chunk-VYOJOX4Z.js.map +0 -1
- package/dist/chunk-WY2K35OL.js +0 -269
- package/dist/chunk-WY2K35OL.js.map +0 -1
- package/dist/chunk-ZFJJ3EXC.js.map +0 -1
- package/dist/chunk-ZOBNS7CX.js.map +0 -1
- package/dist/cli-KKRKBU5T.js.map +0 -1
- package/dist/config-JMRUNYE6.js +0 -37
- package/dist/discover-B5HF6SHM.js +0 -102
- package/dist/discover-B5HF6SHM.js.map +0 -1
- package/dist/doctor-ZBG7X66D.js +0 -32
- package/dist/edit-PZJIILQE.js +0 -40
- package/dist/fund-EUDH5KPA.js +0 -40
- package/dist/inspect-QC6WEQPN.js +0 -37
- package/dist/install-GNK2W3PI.js +0 -972
- package/dist/install-GNK2W3PI.js.map +0 -1
- package/dist/outcome-KSGWZHUS.js +0 -24
- package/dist/pay-BC4UICPA.js +0 -361
- package/dist/pay-BC4UICPA.js.map +0 -1
- package/dist/publish-LXWFDIKF.js +0 -42
- package/dist/read-JMNUQ56P.js +0 -160
- package/dist/read-JMNUQ56P.js.map +0 -1
- package/dist/run-XYTQ5TWQ.js.map +0 -1
- package/dist/search-TSQAB45E.js +0 -25
- package/dist/secp256k1-XRPVBC6V.js.map +0 -1
- package/dist/send-G746D7PQ.js.map +0 -1
- package/dist/session-JBKWMJ24.js +0 -89
- package/dist/session-JBKWMJ24.js.map +0 -1
- package/dist/skill-heal-WKD67SLJ.js +0 -92
- package/dist/skill-heal-WKD67SLJ.js.map +0 -1
- package/dist/skill-placement-RIU4AMC2.js +0 -20
- package/dist/skill-placement-RIU4AMC2.js.map +0 -1
- package/dist/uninstall-5E263VTS.js +0 -73
- package/dist/uninstall-5E263VTS.js.map +0 -1
- package/dist/update-R76LHOZW.js.map +0 -1
- package/dist/usdc-4VCDHFWX.js +0 -38
- package/dist/usdc-4VCDHFWX.js.map +0 -1
- package/dist/viemAdapter-By13KInL-TUQJBMHM.js.map +0 -1
- package/dist/wallet-TQ7D5EQ7.js +0 -41
- package/dist/wallet-TQ7D5EQ7.js.map +0 -1
- package/dist/wallet-ZAVXWLWP.js +0 -32
- package/dist/wallet-ZAVXWLWP.js.map +0 -1
- package/docs/command-reference.md +0 -303
- package/skills/tenjin/SKILL.md +0 -373
- package/skills/tenjin-pay/SKILL.md +0 -76
- package/skills/tenjin-publish/SKILL.md +0 -227
- package/skills/tenjin-publish/references/maintain.md +0 -39
- package/skills/tenjin-search/SKILL.md +0 -154
- package/skills/tenjin-search/references/permissions.md +0 -112
- /package/dist/{_esm-N4KAVXQR.js.map → _esm-CE7KNONL.js.map} +0 -0
- /package/dist/{buy-VIRNSYGN.js.map → ccip-7RMRLAGV.js.map} +0 -0
- /package/dist/{ccip-RPPPKTJR.js.map → ccip-NLCSCHKI.js.map} +0 -0
- /package/dist/{chunk-U5S527PP.js.map → chunk-5IEP5EGE.js.map} +0 -0
- /package/dist/{chunk-KYQVEKP5.js.map → chunk-BPMWXTFX.js.map} +0 -0
- /package/dist/{chunk-S5RYMCV6.js.map → chunk-HPWO4O6S.js.map} +0 -0
- /package/dist/{chunk-W6R3HAAG.js.map → chunk-JRGFKVAZ.js.map} +0 -0
- /package/dist/{chunk-XJN5WUKL.js.map → chunk-KG3D7FIF.js.map} +0 -0
- /package/dist/{chunk-QW2Q2KAH.js.map → chunk-LHHMV4GU.js.map} +0 -0
- /package/dist/{chunk-POJRB2AE.js.map → chunk-POUWHWID.js.map} +0 -0
- /package/dist/{chunk-KZAAWQNP.js.map → chunk-TTNESUPQ.js.map} +0 -0
- /package/dist/{chunk-YLYINX2H.js.map → chunk-XZKD7DIF.js.map} +0 -0
- /package/dist/{ccip-ZGGWQN4X.js.map → config-MXOX7XDR.js.map} +0 -0
- /package/dist/{dist-U4M6QCKE.js.map → dist-3LOO6M4U.js.map} +0 -0
- /package/dist/{config-JMRUNYE6.js.map → ethersCompat-Df4a6QIZ-THAVUGIJ.js.map} +0 -0
- /package/dist/{doctor-ZBG7X66D.js.map → install-XUM2XSHW.js.map} +0 -0
- /package/dist/{edit-PZJIILQE.js.map → paths-P2N4JTDZ.js.map} +0 -0
- /package/dist/{ethersCompat-Df4a6QIZ-WHYKB6HA.js.map → pay-SBXZEPEP.js.map} +0 -0
- /package/dist/{fund-EUDH5KPA.js.map → redact-46ZHF2NH.js.map} +0 -0
- /package/dist/{inspect-QC6WEQPN.js.map → secp256k1-ZZZT2CAX.js.map} +0 -0
- /package/dist/{outcome-KSGWZHUS.js.map → status-line-wiring-BYPHTYZE.js.map} +0 -0
- /package/dist/{publish-LXWFDIKF.js.map → viemAdapter-By13KInL-X2VY6CY3.js.map} +0 -0
- /package/dist/{search-TSQAB45E.js.map → wallet-PWAHVKWW.js.map} +0 -0
|
@@ -1,404 +1,115 @@
|
|
|
1
1
|
# Agent permissions
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
shell command before running it, and an unknown binary is denied by default. That
|
|
5
|
-
denies the free verbs too, which breaks the whole marketplace loop: the skills
|
|
6
|
-
forbid working around a denial, so a denied `tenjin search` just stops.
|
|
3
|
+
`tenjin install` writes one permission rule into `~/.claude/settings.json`, and this page is the whole reasoning behind it: what it clears, what it cannot clear, and what stays a decision you make by hand.
|
|
7
4
|
|
|
8
|
-
|
|
9
|
-
behind which verbs are on that list, which three are separate opt-ins, and which are
|
|
10
|
-
never recommended at all, and it is where `tenjin install` and `tenjin doctor`
|
|
11
|
-
send you. The [README](../README.md#permissions) carries the paste block and the
|
|
12
|
-
three-tier summary.
|
|
5
|
+
Harnesses that run unattended deny tools they have not been told about. Without the rule below, every lookup stops on a permission prompt, and a session left alone stops with it.
|
|
13
6
|
|
|
14
|
-
## The
|
|
15
|
-
|
|
16
|
-
The free tier is nine rules for the `permissions.allow` array of Claude Code's
|
|
17
|
-
`~/.claude/settings.json`. `tenjin install` can write them for you; see
|
|
18
|
-
[Getting the rules onto your machine](#getting-the-rules-onto-your-machine).
|
|
7
|
+
## The one rule
|
|
19
8
|
|
|
20
9
|
```
|
|
21
|
-
|
|
22
|
-
Bash(tenjin fund:*)
|
|
23
|
-
Bash(tenjin inspect:*)
|
|
24
|
-
Bash(tenjin read:*)
|
|
25
|
-
Bash(tenjin outcome:*)
|
|
26
|
-
Bash(tenjin doctor:*)
|
|
27
|
-
Bash(tenjin wallet show:*)
|
|
28
|
-
Bash(tenjin wallet balance:*)
|
|
29
|
-
Bash(tenjin config get:*)
|
|
10
|
+
mcp__x402__request
|
|
30
11
|
```
|
|
31
12
|
|
|
32
|
-
|
|
33
|
-
locally to check your wallet still opens. That is the definition of
|
|
34
|
-
this tier, and it is deliberately narrower than "signs nothing": `tenjin read` can
|
|
35
|
-
present a session key that already exists, which is a signature — a P-256
|
|
36
|
-
delegation, the wrong curve to authorize a USDC transfer. It cannot mint one; that
|
|
37
|
-
needs the wallet.
|
|
38
|
-
|
|
39
|
-
### What each verb actually does
|
|
40
|
-
|
|
41
|
-
| Rule | Why it is safe to pre-clear |
|
|
42
|
-
| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
43
|
-
| `Bash(tenjin search:*)` | Free anonymous marketplace search. No wallet, no signing, no payment. POSTs the generalized question off-machine. |
|
|
44
|
-
| `Bash(tenjin fund:*)` | Owner call (2026-08-12): mints a card-funding checkout link for THIS wallet only; moves no money, origin-pinned (no `--base-url`). |
|
|
45
|
-
| `Bash(tenjin inspect:*)` | Free pre-purchase card and preview. Never signs, never pays, never saves. |
|
|
46
|
-
| `Bash(tenjin read:*)` | Free-only delivery. Cannot spend and cannot open the keystore, but transmits a cached session key when one exists (see below). |
|
|
47
|
-
| `Bash(tenjin outcome:*)` | Free honest outcome report on a past search. No wallet, no payment. POSTs a report that moves the marketplace's reuse signal. |
|
|
48
|
-
| `Bash(tenjin doctor:*)` | Local environment and API reachability diagnostics; decrypts the wallet locally to check it still opens. |
|
|
49
|
-
| `Bash(tenjin wallet show:*)` | Prints the wallet address and key source. Never prints the key. |
|
|
50
|
-
| `Bash(tenjin wallet balance:*)` | Read-only USDC balance query on Base. |
|
|
51
|
-
| `Bash(tenjin config get:*)` | Reads one effective config value. Note `config get rpcUrl` returns a URL that commonly embeds a provider API key. |
|
|
52
|
-
|
|
53
|
-
`tenjin doctor --json` emits the same per-verb notes under `permissions`, so an
|
|
54
|
-
agent can read them without this page.
|
|
55
|
-
|
|
56
|
-
### Three free verbs are not read-only
|
|
57
|
-
|
|
58
|
-
Worth knowing before you pre-clear them: `tenjin search` POSTs your generalized
|
|
59
|
-
question off-machine, and `tenjin outcome` POSTs a report that moves the
|
|
60
|
-
marketplace's reuse signal — both unauthenticated and free, neither carrying a
|
|
61
|
-
credential — while `tenjin read` writes locally, saving a delivered piece to your
|
|
62
|
-
library.
|
|
63
|
-
|
|
64
|
-
### `read` transmits a credential once a session key exists
|
|
65
|
-
|
|
66
|
-
Worth knowing before you paste the `read` line: once a session key exists, `read`
|
|
67
|
-
**transmits that wallet-derived credential** to the origin it was minted for. That
|
|
68
|
-
origin binding is what keeps a stray `--base-url` from redirecting it, and it is
|
|
69
|
-
the reason the binding exists rather than a nicety.
|
|
70
|
-
|
|
71
|
-
`read` itself can never mint one: it imports no wallet, payment, or
|
|
72
|
-
session-minting module, and its import graph is test-pinned to stay clear of all
|
|
73
|
-
three. It cannot unlock a keystore and never consults the spend policy.
|
|
74
|
-
|
|
75
|
-
## Getting the rules onto your machine
|
|
76
|
-
|
|
77
|
-
`tenjin install` writes the nine rules into `~/.claude/settings.json` for you,
|
|
78
|
-
plus the two rules your publish mode carries (below). It is one of the four setup
|
|
79
|
-
decisions, and at a terminal it asks:
|
|
80
|
-
|
|
81
|
-
> Let your agent use tenjin without permission popups? Adds 9 command rules to
|
|
82
|
-
> `~/.claude/settings.json`. None of them can spend your money. Details:
|
|
83
|
-
> https://github.com/BackTrackCo/tenjin-agent/blob/main/docs/agent-permissions.md
|
|
84
|
-
|
|
85
|
-
On an `auto` or `full-auto` publish mode the same question says 11 rules, and adds
|
|
86
|
-
that your agent will publish under your identity on its own. The question is two
|
|
87
|
-
sentences and a link on purpose: this page is where the detail lives, and an
|
|
88
|
-
operator answering a yes/no cannot act on a rule string they have not met yet.
|
|
89
|
-
|
|
90
|
-
Answer yes and it merges them in. The write appends the rules that are missing and
|
|
91
|
-
never reorders or rewrites an existing entry or any other key in the file. It
|
|
92
|
-
removes exactly two things: a rule an older version of this CLI wrote and this one
|
|
93
|
-
no longer does, and, when your `publish.mode` is back to `review`, the two rules
|
|
94
|
-
that mode carries. A settings file it cannot parse is reported and left exactly as
|
|
95
|
-
it is, never repaired. The rules it may write are fixed constants selected by your
|
|
96
|
-
publish mode, so no flag or config value can widen it to `buy`, `session start`,
|
|
97
|
-
`send`, `config set`, or a blanket `Bash(tenjin:*)`.
|
|
98
|
-
|
|
99
|
-
A non-interactive install (piped, or under `--json`) does the same write BY
|
|
100
|
-
DEFAULT, with no flag: the machine most likely to be denied mid-task is the
|
|
101
|
-
headless one, and there is nobody there to answer. `--no-allow-free-verbs` opts
|
|
102
|
-
out; `--allow-free-verbs` states the default explicitly. Every run that writes
|
|
103
|
-
reports how many rules landed, in which file, and that deleting those lines undoes
|
|
104
|
-
it.
|
|
105
|
-
|
|
106
|
-
`tenjin doctor --json` carries this whole recommendation as data under
|
|
107
|
-
`permissions` (every rule, every per-verb note, both caveats, on the failure
|
|
108
|
-
envelope as well as the success one) so an agent that just got denied can point
|
|
109
|
-
you at the exact line. Its human render is the check list plus one link back
|
|
110
|
-
here.
|
|
111
|
-
|
|
112
|
-
## A prefix rule pins the verb, not the flags
|
|
113
|
-
|
|
114
|
-
Every line above also clears `--base-url <url>` on that verb, because the CLI
|
|
115
|
-
accepts the global flags on every subcommand. `--base-url` is validated as a URL
|
|
116
|
-
and nothing more, and it wins settings precedence, so it moves where the question
|
|
117
|
-
goes, where `doctor` probes, and (with the `buy` line below) where a SIWX signature
|
|
118
|
-
and an EIP-3009 payment authorization are sent. The origin pin only checks that a
|
|
119
|
-
resource URL shares an origin with the _configured_ base, so an attacker-controlled
|
|
120
|
-
pair satisfies it.
|
|
13
|
+
That is it. It clears the `request` tool on the `x402` MCP server `tenjin install` registers, and nothing else: no shell verb, no other tool, no price.
|
|
121
14
|
|
|
122
|
-
|
|
123
|
-
disclosed limit: set your base URL in config, and allowlist these verbs only if you
|
|
124
|
-
are content for an agent to be able to choose the destination host. The skills tell
|
|
125
|
-
agents never to pass `--base-url` on an allowlisted verb, but that is a convention
|
|
126
|
-
rather than an enforced boundary.
|
|
15
|
+
It is a tool grant, not a spending grant. Every payment the tool makes still passes the local spend policy, and the policy is the only thing that decides an amount.
|
|
127
16
|
|
|
128
|
-
##
|
|
17
|
+
## What bounds a payment
|
|
129
18
|
|
|
130
|
-
|
|
19
|
+
Four numbers and a file, all local, none of them readable or raisable by the router:
|
|
131
20
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
21
|
+
- **`maxAutoSpend`** is the ceiling on one call. `tenjin install` sets it to 0.25 USD when your config file does not already name it.
|
|
22
|
+
- **`sessionBudget`** is a rolling 24 hour ceiling on everything. `tenjin install` sets it to 5.00 USD on the same terms.
|
|
23
|
+
- **`confirm`** decides when a human is asked. `tenjin install` sets `above:250000`, which auto-approves at or below 0.25 USD, and it NEVER changes a `confirm` you wrote yourself.
|
|
24
|
+
- **`spend.json`** is the ledger. A reservation counts the money the moment an authorization is built, under a cross-process file lock, so two commands cannot each spend the last of the budget.
|
|
135
25
|
|
|
136
|
-
|
|
137
|
-
unattended spending up to your wallet balance.** `--yes` is an ordinary flag on the
|
|
138
|
-
same allowlisted verb and it clears the confirm gate outright, so `confirm: always`
|
|
139
|
-
does not put a human on every purchase once the agent can pass `--yes`.
|
|
140
|
-
|
|
141
|
-
Walking the defaults:
|
|
142
|
-
|
|
143
|
-
- `allowlistCreators` is empty, so the creator gate is off.
|
|
144
|
-
- `maxAutoSpend` is `0` and `confirm` is `always`, which together only ask for a
|
|
145
|
-
confirmation that `--yes` satisfies.
|
|
146
|
-
- `sessionBudget` is `0`, which the policy reads as **no ceiling at all**, not a
|
|
147
|
-
zero one.
|
|
148
|
-
|
|
149
|
-
Set real values first:
|
|
26
|
+
The `request` tool has nobody to ask, so it answers its own confirm prompt with no. Under `confirm always` it returns `needs_approval` with the amount and the command that changes it, and pays nothing.
|
|
150
27
|
|
|
151
28
|
```bash
|
|
29
|
+
tenjin status # spent, reserved, and the caps in force
|
|
152
30
|
tenjin config set maxAutoSpend 0.25
|
|
153
31
|
tenjin config set sessionBudget 2.00
|
|
154
32
|
```
|
|
155
33
|
|
|
156
|
-
|
|
157
|
-
same as saying the caps stop an allowlisted `buy`.
|
|
34
|
+
## What bounds a ROUTER payment, on top of that
|
|
158
35
|
|
|
159
|
-
|
|
36
|
+
The routing decision comes from a server, and it is free: it proposes, it never authorizes. These checks are what keep a wrong or hostile one from being worth anything:
|
|
160
37
|
|
|
161
|
-
The
|
|
162
|
-
|
|
38
|
+
- The amount actually signed has to fit `maxAutoSpend` and the day's `sessionBudget`. That is the whole money rule: a price the decision quotes is information, not a ceiling anyone is held to, so a provider charging more than it quoted is paid only if the real amount is inside your limits.
|
|
39
|
+
- The backend binds the call and validates its arguments against the capability's own schema, then sends the finished request; this CLI sends it as given and never rebuilds it, so there is no second copy of that rule here to drift from the first.
|
|
40
|
+
- The destination has to be a public HTTPS endpoint whose name resolves to a public address. This is a check, not a pin: the request resolves the name again on its own, so a host that answers publicly at check time and privately a moment later is not closed by it. See [safety-model.md](./safety-model.md).
|
|
41
|
+
- A 2xx whose body fails the decision's own success rule is a paid failure, not a delivery.
|
|
163
42
|
|
|
164
|
-
|
|
165
|
-
Bash(tenjin pay:*)
|
|
166
|
-
```
|
|
43
|
+
A compromised backend can therefore name any origin it likes, and spend at most one `maxAutoSpend` per call inside `sessionBudget`. Set both to numbers you would not mind losing. This is a pocket-money wallet, not treasury custody.
|
|
167
44
|
|
|
168
|
-
|
|
169
|
-
URL always, and with `bazaarPay` on, any registry-listed foreign seller. And
|
|
170
|
-
there is no library dedupe: `pay` has no owned-content re-read, so a looping
|
|
171
|
-
agent pays on every call, bounded only by `maxAutoSpend`, `sessionBudget`, and
|
|
172
|
-
`--max-price`. Leave `bazaarPay` off unless you mean it.
|
|
45
|
+
## A prefix rule pins the verb, not the flags
|
|
173
46
|
|
|
174
|
-
|
|
47
|
+
This matters for the shell rules below rather than the tool rule above. Claude Code's `Bash(tenjin pay:*)` matches the verb and lets every flag through, including `--base-url`, which points the command at another host. So a rule you add is a rule for the verb at whatever host the caller names, and a task that arrived from a web page or a purchased document is exactly where such a flag comes from.
|
|
175
48
|
|
|
176
|
-
|
|
177
|
-
cannot spend, but it opens the keystore:
|
|
49
|
+
## Opt in by hand: paying an endpoint you name
|
|
178
50
|
|
|
179
51
|
```
|
|
180
|
-
Bash(tenjin
|
|
52
|
+
Bash(tenjin pay:*)
|
|
181
53
|
```
|
|
182
54
|
|
|
183
|
-
`tenjin
|
|
184
|
-
P-256 delegation in `~/.tenjin/session.json` (0600), which `tenjin read` then
|
|
185
|
-
presents to recover pieces you already own. The key is the wrong curve to sign an
|
|
186
|
-
EIP-3009 payment authorization, so the line can never become a spend grant.
|
|
187
|
-
|
|
188
|
-
### The `read` scope is not a containment boundary
|
|
189
|
-
|
|
190
|
-
Do not read the `read` scope as more than a scope. It is enforced only on the
|
|
191
|
-
request shape that carries a session signature alongside the delegation header; a
|
|
192
|
-
copy of the same delegation presented differently is not scope-checked, so treat
|
|
193
|
-
the file as a credential carrying your wallet's authority. Its real bounds are the
|
|
194
|
-
24h expiry, the 0600 mode, and the origin binding.
|
|
195
|
-
|
|
196
|
-
### What you are actually clearing
|
|
55
|
+
`tenjin pay <url>` is the plain x402 client verb. It runs the same gate as the router: `maxAutoSpend`, `sessionBudget`, `confirm`, the same reservation. Two differences are worth knowing before you add the line:
|
|
197
56
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
hardest here, because a mint against a host an agent chose is a wallet signature
|
|
201
|
-
you did not intend to make. `tenjin doctor` reports whether a session exists, for
|
|
202
|
-
which origin, at what scope, and when it expires.
|
|
57
|
+
- The destination set is wider. The configured base URL is always payable; any other https origin needs `bazaarPay` on AND a configured registry that lists that exact resource with terms the live 402 does not exceed. Leave `bazaarPay` off unless you mean it.
|
|
58
|
+
- There is no dedupe. Every call pays, bounded only by the caps and `--max-price`.
|
|
203
59
|
|
|
204
60
|
## Never recommended
|
|
205
61
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
| Verb | Why it stays a human decision |
|
|
209
|
-
| ---------------------- | ------------------------------------------------------------------------------------ |
|
|
210
|
-
| `tenjin send` | Moves USDC out of the wallet, and is not bounded by the buy spend policy. See below. |
|
|
211
|
-
| `tenjin publish` | Publishes publicly under your identity. Cleared only by `publish.mode`; see below. |
|
|
212
|
-
| `tenjin edit` | Edits live posts and prices. Cleared only by `publish.mode`; see below. |
|
|
213
|
-
| `tenjin wallet create` | Creates the payment credential. |
|
|
214
|
-
| `tenjin config set` | It can widen the agent's own spend policy. |
|
|
215
|
-
| `tenjin install` | Writes into harness config and skills directories. |
|
|
216
|
-
| `tenjin mcp` | It re-exposes every command core, so clearing it clears everything. |
|
|
217
|
-
| `tenjin update` | It replaces the tenjin binary the agent then runs. See below. |
|
|
218
|
-
|
|
219
|
-
For the same reason, prefer the narrow rules above over a broad `Bash(tenjin:*)`,
|
|
220
|
-
`Bash(tenjin wallet:*)`, or `Bash(tenjin config:*)`, which would swallow them.
|
|
221
|
-
|
|
222
|
-
## The two rules your publish mode carries
|
|
223
|
-
|
|
224
|
-
`publish.mode` is where you say whether publishing asks you first. On `auto` or
|
|
225
|
-
`full-auto` it does not, and a harness prompt in front of every publish asks that
|
|
226
|
-
same question again somewhere the mode cannot answer it, so the agent stops and
|
|
227
|
-
the mode you chose does nothing. That is why two rules track the mode:
|
|
228
|
-
|
|
229
|
-
- `Bash(tenjin publish:*)` puts new content on the marketplace under your identity.
|
|
230
|
-
It publishes the contents of any local file the agent can read, gated only by the
|
|
231
|
-
deterministic scan below. It also opens your wallet keystore unattended and mints
|
|
232
|
-
a `read+write` session credential to disk when no usable one exists, which is a
|
|
233
|
-
strictly broader credential than the read-only one `tenjin session start` asks
|
|
234
|
-
for as an explicit opt-in.
|
|
235
|
-
- `Bash(tenjin edit:*)` updates posts your wallet already owns: reprices, refreshes
|
|
236
|
-
an as-of date, repairs an answer card. Owner-scoped on both legs, spends nothing,
|
|
237
|
-
and creates no new public content, but it opens the keystore on the same terms,
|
|
238
|
-
and it runs the same `publish.mode` gate in the CLI. A mode that can publish a
|
|
239
|
-
post unattended but cannot fix that post's price is the asymmetry the mode exists
|
|
240
|
-
to remove.
|
|
241
|
-
|
|
242
|
-
Neither is in any block above: there is nothing to paste here, because the mode is
|
|
243
|
-
the decision and the rules only follow it. Neither can spend: `publish` and `edit`
|
|
244
|
-
carry no payment path, so what they reach is your identity and your keystore, not
|
|
245
|
-
your balance.
|
|
246
|
-
|
|
247
|
-
**Installing Tenjin is the consent for these.** `tenjin install` settles
|
|
248
|
-
`publish.mode` at `auto` unless you say otherwise, and writes both rules alongside
|
|
249
|
-
the free tier on the FIRST install, headless runs included. Pass
|
|
250
|
-
`--publish-mode review` if you want the mode without the rules; at a terminal the
|
|
251
|
-
install asks the question outright, with auto as the default answer.
|
|
252
|
-
|
|
253
|
-
Each surface discloses the grant at the depth its reader can use. At a terminal
|
|
254
|
-
the install says which mode it settled, what your agent will now do in plain
|
|
255
|
-
words, and the one command that turns it off (`tenjin config set publish.mode
|
|
256
|
-
review`); it deliberately prints no rule strings, because a `Bash(...)` line an
|
|
257
|
-
operator is meeting for the first time mid-install is not something they can act
|
|
258
|
-
on. `tenjin install --json` and `tenjin doctor --json` carry the whole thing as
|
|
259
|
-
data: both rule strings, what they clear including the keystore and the
|
|
260
|
-
`read+write` session mint, and all three undos. This page is the long form.
|
|
261
|
-
|
|
262
|
-
The bare CLI, on a machine where `install` never ran, still defaults to `review`
|
|
263
|
-
and grants nothing. Install is the consent anchor: nothing here is granted to
|
|
264
|
-
someone who never ran it.
|
|
265
|
-
|
|
266
|
-
Going back to `review` takes them away, on the next `install` or immediately
|
|
267
|
-
with `tenjin config set publish.mode review`. `tenjin uninstall` reclaims them
|
|
268
|
-
like every other rule this CLI wrote. There is no flag that adds them and no line
|
|
269
|
-
to paste: change the mode.
|
|
270
|
-
|
|
271
|
-
Your `publish.mode` lives in `~/.tenjin/config.json` and survives `tenjin
|
|
272
|
-
uninstall` along with the rest of your config, so a later `tenjin install` resumes
|
|
273
|
-
it and writes both rules again: installing is the consent, each time. Set the mode
|
|
274
|
-
to `review` before uninstalling, or pass `--publish-mode review` when you come
|
|
275
|
-
back, if you want the rules to stay gone.
|
|
276
|
-
|
|
277
|
-
`tenjin config set publish.mode` keeps the two in step without waiting for the
|
|
278
|
-
next `install`. Moving to `auto` or `full-auto` asks you once, naming both rules,
|
|
279
|
-
and writes them on yes; a run with no terminal, a `--json` run, or a no leaves
|
|
280
|
-
the file alone and prints where the rules go. Moving back to `review` retracts
|
|
281
|
-
them without asking, because that direction can only take back what this CLI
|
|
282
|
-
wrote. It runs through a pass that removes and never appends, so it retracts on
|
|
283
|
-
any machine carrying the rules, including one whose free tier no longer matches
|
|
284
|
-
what this release ships. The one case it cannot handle is a settings file it
|
|
285
|
-
cannot parse, which it reports by name along with `tenjin uninstall`.
|
|
286
|
-
|
|
287
|
-
What still stops a bad publish is the CLI, not the harness prompt: the
|
|
288
|
-
deterministic secret scan blocks in every mode and is never clearable by `--yes`,
|
|
289
|
-
`auto` stops on any finding, and `full-auto` stops only on a hard block. These
|
|
290
|
-
rules clear the harness prompt and nothing else.
|
|
291
|
-
|
|
292
|
-
Read "`auto` stops on any finding" as a stop rather than as a human, though.
|
|
293
|
-
These are prefix rules: they pin the verb, not the flags. `--yes` is an ordinary
|
|
294
|
-
flag on the same allowlisted verb, and it clears exactly the WARN findings `auto`
|
|
295
|
-
stopped on, so a re-run with it collapses `auto` into `full-auto` with nobody
|
|
296
|
-
asked, the same hazard the `tenjin buy` line carries. What holds that line is the
|
|
297
|
-
skills, which render the findings as the question rather than asking a generic
|
|
298
|
-
one first.
|
|
299
|
-
|
|
300
|
-
### `tenjin update`, a human decision
|
|
301
|
-
|
|
302
|
-
`tenjin update` replaces the globally installed `tenjin` with whatever npm serves
|
|
303
|
-
next, which is the binary the agent goes on to run for the rest of the session and
|
|
304
|
-
every session after it. Which build an agent executes is an operator decision, so
|
|
305
|
-
no recommended rule pre-clears it. `tenjin update --check` only reports, but a
|
|
306
|
-
prefix rule pins the **verb**, not the flags, so clearing the check would clear
|
|
307
|
-
the install with it. Nothing stops you adding the rule yourself; it stays off the
|
|
308
|
-
recommended set.
|
|
309
|
-
|
|
310
|
-
### `tenjin fund`, free on both surfaces
|
|
311
|
-
|
|
312
|
-
Free by owner decision (2026-08-12), because on either surface the command just
|
|
313
|
-
opens the fund modal. Minting a checkout link moves no money: the destination is
|
|
314
|
-
pinned server-side to the wallet that signed the request, so a link an agent
|
|
315
|
-
mints can only ever fund your own wallet, the CLI refuses any checkout host but
|
|
316
|
-
`pay.coinbase.com`, and the payment itself happens behind Coinbase's own human
|
|
317
|
-
gate. The `--base-url` caveat that qualifies every other prefix rule does not
|
|
318
|
-
apply here: `fund` is pinned to the production origin and takes no override from
|
|
319
|
-
the flag, the environment, or config, so an allowlisted invocation cannot steer
|
|
320
|
-
where the wallet's SIWX proof goes. That pin is what separates `fund` from
|
|
321
|
-
`session start` (unattended keystore access, override surface intact), which
|
|
322
|
-
stays opt-in.
|
|
323
|
-
|
|
324
|
-
### `tenjin send`, the escape hatch
|
|
325
|
-
|
|
326
|
-
`send` is human-invoked only: it is deliberately absent from the MCP toolset and
|
|
327
|
-
the harness skills, and nothing is signed until the previewed (checksummed)
|
|
328
|
-
recipient, amount, and network fee are confirmed, interactively at a TTY or
|
|
329
|
-
explicitly with `--yes` when headless. It refuses when the active wallet's
|
|
330
|
-
passphrase entry is missing. The `sendMaxAmount` hard per-send cap has no
|
|
331
|
-
default: `tenjin send` refuses until you run `tenjin config set sendMaxAmount
|
|
332
|
-
<usd|0|none>` (`0` disables the verb, `none` opts in to uncapped), and `--yes`
|
|
333
|
-
can never bypass the cap or the unset refusal. For routing FUTURE revenue away
|
|
334
|
-
from the agent wallet entirely, connect the agent to your own Tenjin account
|
|
335
|
-
instead (delegation); `send` exists for funds already sitting on the agent key.
|
|
62
|
+
Each of these is a decision a person makes, so none is in the rule set and none should be added without meaning it:
|
|
336
63
|
|
|
337
|
-
|
|
64
|
+
| Verb | Why it stays a human decision |
|
|
65
|
+
| ---------------------- | -------------------------------------------------------------------- |
|
|
66
|
+
| `tenjin wallet send` | Moves USDC out of the wallet and is not bounded by the spend policy. |
|
|
67
|
+
| `tenjin wallet create` | Creates the payment credential. |
|
|
68
|
+
| `tenjin config set` | It can widen the agent's own spend policy. |
|
|
69
|
+
| `tenjin install` | Writes into harness config. |
|
|
70
|
+
| `tenjin uninstall` | Removes the wiring the harness is running on. |
|
|
71
|
+
| `tenjin update` | Replaces the binary the agent then runs. |
|
|
338
72
|
|
|
339
|
-
|
|
340
|
-
OS credential store, then an interactive prompt. On `wallet create` with no env
|
|
341
|
-
passphrase, a strong random one is generated and saved to the OS store so later
|
|
342
|
-
signing is transparent. Every stored entry is **per wallet**, keyed by the
|
|
343
|
-
wallet's own address, so replacing a wallet never touches the outgoing wallet's
|
|
344
|
-
passphrase. Installs from before per-wallet entries used one shared slot; the
|
|
345
|
-
first signing that proves ownership re-keys that slot under the owning wallet's
|
|
346
|
-
address, and the copy is verified before the old slot is removed.
|
|
73
|
+
Prefer the narrow rules on this page to a broad `Bash(tenjin:*)`, `Bash(tenjin wallet:*)` or `Bash(tenjin config:*)`, each of which swallows the table above.
|
|
347
74
|
|
|
348
|
-
|
|
75
|
+
## What `tenjin install` writes, in full
|
|
349
76
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
- **Desktop Linux**: the Secret Service keyring, via `secret-tool` when
|
|
356
|
-
libsecret-tools is installed: service `tenjin-cli`, account = the wallet
|
|
357
|
-
address.
|
|
358
|
-
- **Headless or CI (any OS)**: no durable OS store, so set
|
|
359
|
-
`TENJIN_WALLET_PASSPHRASE`.
|
|
77
|
+
1. Two hook entries in `~/.claude/settings.json` (`--project` writes the project file instead): `UserPromptSubmit` running `tenjin hook prompt`, and `PreToolUse` on `WebSearch|WebFetch` running `tenjin hook native`. Both are plain command entries with a 5 second timeout. No daemon, no background process, no generated script.
|
|
78
|
+
2. The `mcp__x402__request` rule in `permissions.allow`. Nothing goes into `permissions.deny`, so localhost, intranet and private pages stay reachable by WebFetch whenever the gate says to use your native tools.
|
|
79
|
+
3. The `x402` MCP server, through `claude mcp add x402 -s user -- tenjin mcp` when the `claude` binary is on PATH, and printed for you to run when it is not. Under `--project` it registers at project scope instead, from the project directory, so the server lands in that project's `.mcp.json` and your `~/.claude.json` is not touched; `tenjin uninstall --project` removes it from the same place. The scope's own file is read first: a registration that already launches `tenjin mcp` is left exactly as it is and nothing is spawned, an `x402` entry launching anything else is removed and re-added, and a registration file this build cannot parse is reported rather than written over.
|
|
80
|
+
4. The three spend keys above, only where your config file is silent, plus `bazaarPay` on, which is the lane the router pays providers through.
|
|
81
|
+
5. `statusLine`, running `tenjin status-line` once a second, ONLY when that key is not already set. A status line of your own is never replaced: the install prints the command that runs both, and `--status-line compose` writes it only if you ask. The status line stores nothing new off your machine. It reads local files this CLI already writes under your Tenjin data dir: per session, the tool, the provider endpoint, the bounded redacted parameters of the call, its outcome and its price. No prompt text, no result body. Records expire after ten minutes, live in a 0700 directory under a hash of the session id, and are deleted by the next lookup that passes over them.
|
|
360
82
|
|
|
361
|
-
|
|
362
|
-
key never leaves the machine.
|
|
83
|
+
Every other key in the settings file is preserved byte for byte, a second run writes the same bytes, and `tenjin uninstall` removes exactly those five things and keeps your wallet, your ledger and your config.
|
|
363
84
|
|
|
364
|
-
##
|
|
85
|
+
## How one lookup runs
|
|
365
86
|
|
|
366
|
-
|
|
87
|
+
1. You type a turn. The hook sends the bounded packet to Tenjin, which answers whether a paid capability fits and, if it does, keeps that packet under a short-lived id.
|
|
88
|
+
2. When one fits, your assistant sees one line: a paid lookup is available for this turn, call `request` with your exact lookup and that id.
|
|
89
|
+
3. Your assistant calls `request({query, id})` with the lookup it actually means. That is the accurate part: the routing is decided from your assistant's own query plus the stored context, not from a guess made before the lookup was known.
|
|
90
|
+
4. Tenjin answers with the call to make and what the provider charges. Deciding costs nothing.
|
|
91
|
+
5. This CLI pays that provider once, under your limits, and hands back the result.
|
|
367
92
|
|
|
368
|
-
|
|
369
|
-
it without also covering `config set`, so use `tenjin config get <key>`.
|
|
370
|
-
- Group-level flag forms like `tenjin wallet --json show` are not covered, so put
|
|
371
|
-
global flags after the leaf verb (`tenjin wallet show --json`).
|
|
93
|
+
## What the hooks send
|
|
372
94
|
|
|
373
|
-
|
|
95
|
+
- On every prompt, and on every native `WebSearch` or `WebFetch`: the bounded text of the current turn, at most six prior messages and 16 KiB, redacted for obvious secrets. Tool results never travel: a tool result is other people's content, and a packet carrying it would be a channel from a fetched page into a routing decision.
|
|
96
|
+
- A native call sends that same bounded turn WITH the call it is about attached, read from this session's own transcript. That is how a restriction you stated in your own words, such as asking for native tools only, reaches the decision about a bare URL your assistant is fetching.
|
|
97
|
+
- Slash commands and one-word acknowledgements are never sent at all.
|
|
98
|
+
- The packet is stored on the backend against the decision id, so the lookup your assistant sends next is decided with the context you gave. Expired packets are unreadable after 15 minutes (the route refuses an expired id) and are deleted by the next router request or the daily cleanup, whichever comes first.
|
|
99
|
+
- On a paid lookup: the capability chosen, a hash of the contract, a hash of the arguments, your wallet address, the amount and the transaction hash are kept.
|
|
374
100
|
|
|
375
|
-
The
|
|
376
|
-
subtracted. All nine are safe to hand over: `search`, `fund`, `inspect`, `read`,
|
|
377
|
-
`outcome`, `doctor`, `config get`, `wallet show`, `wallet balance`.
|
|
378
|
-
None can spend and none can move your keys; `fund` mints a checkout link only a
|
|
379
|
-
human can pay.
|
|
101
|
+
The answer can put one line into your session: that a paid lookup is available for this turn, and the id that carries your context to it. It names no provider and no price, because at that point the lookup itself has not been decided.
|
|
380
102
|
|
|
381
|
-
|
|
382
|
-
`publish`, `edit`, `buy`, `send`,
|
|
383
|
-
`session start`, `wallet create`, `config set`, `install`. In particular, do not
|
|
384
|
-
delegate publishing what a subagent just derived: bring the finding back and
|
|
385
|
-
publish it from the context that can ask the user.
|
|
103
|
+
## Wallet passphrase storage
|
|
386
104
|
|
|
387
|
-
|
|
388
|
-
repo, not the network: `search` and `outcome` POST off-machine (a question, a
|
|
389
|
-
report) and `read` saves to the local library. And a delegated context is where a stray `--base-url` does the most
|
|
390
|
-
damage, so never pass one.
|
|
105
|
+
The private key is generated on your machine and stored encrypted in `~/.tenjin/wallet.json`. Its passphrase is `TENJIN_WALLET_PASSPHRASE` when you set one, and otherwise a strong generated passphrase in the platform's own credential store (Keychain on macOS, Secret Service on Linux, DPAPI on Windows), verified by reading it back. There is deliberately no plain-file fallback: a passphrase sitting next to the keystore it unlocks protects nothing, so a machine with neither creates no wallet and says so.
|
|
391
106
|
|
|
392
|
-
|
|
107
|
+
Decryption happens in this CLI, in a disposable worker thread, and the key never leaves the process. `tenjin mcp` decrypts once at start so a lookup does not wait for it, holds the signer for the session, and exits with the session.
|
|
108
|
+
|
|
109
|
+
## Delegating to a subagent
|
|
393
110
|
|
|
394
|
-
|
|
395
|
-
Bash rules do not apply. If you follow the
|
|
396
|
-
[MCP section](../README.md#local-stdio-mcp-server) as well, leave
|
|
397
|
-
`mcp__tenjin__tenjin_publish`, `mcp__tenjin__tenjin_edit`, and
|
|
398
|
-
`mcp__tenjin__tenjin_wallet` gated, and treat `mcp__tenjin__tenjin_buy` as the
|
|
399
|
-
same opt-in decision as the `buy` line above.
|
|
111
|
+
A subagent has no transcript of its own, so a lookup it makes routes on the query it wrote and nothing else. Its payments run through the same ledger and the same caps as the lead's, because the lock is on the file rather than on the process. A subagent is not a second budget.
|
|
400
112
|
|
|
401
113
|
## Not the same as `allowlistCreators`
|
|
402
114
|
|
|
403
|
-
|
|
404
|
-
that one gates **who you may pay**, this one gates **which commands may run**.
|
|
115
|
+
`allowlistCreators` is a spend-policy key that restricts which hosts may be paid at all. The permission rule on this page is a harness setting about which tool may run. They are separate gates and neither substitutes for the other.
|
package/docs/safety-model.md
CHANGED
|
@@ -7,8 +7,8 @@ Tenjin is built for agents, so the important rule is simple: marketplace content
|
|
|
7
7
|
- Purchased content is untrusted data, never instructions.
|
|
8
8
|
- No harness permission, hook, settings change, wallet action, or publish action is recommended on the strength of content the agent read.
|
|
9
9
|
- A harness permission denial is never worked around. The agent should stop and ask the user to change permissions deliberately.
|
|
10
|
-
- A
|
|
11
|
-
- Hard publish blocks cannot be bypassed by `--yes`, `auto`, or `full-auto`.
|
|
10
|
+
- A routing decision is a proposal, never an authorization. Spending is decided locally, against limits the server cannot read or raise.
|
|
11
|
+
- Hard publish blocks are the marketplace's own, at ingest, and cannot be bypassed by `--yes`, `auto`, or `full-auto`. The local scan is warn-only: every finding it makes, including a block-tier shape, is a flag the publish.mode consent flow shows, not a local refusal.
|
|
12
12
|
- The wallet key stays local. Tenjin receives signatures and payment authorizations, never the private key.
|
|
13
13
|
|
|
14
14
|
## Content is evidence, not control
|
|
@@ -21,9 +21,9 @@ Do not copy commands from purchased content into an allowlist, `AGENTS.md`, `CLA
|
|
|
21
21
|
|
|
22
22
|
Search, inspect, free reads, outcomes, wallet display, balance checks, doctor, and checkout-link creation are separated from purchases and transfers.
|
|
23
23
|
|
|
24
|
-
`tenjin
|
|
24
|
+
The x402 router's `request` tool and `tenjin pay` are the paying commands, and they run one gate between them: `maxAutoSpend` per call, `sessionBudget` per rolling day, `confirm` for when a human is asked, and a reservation that counts a signed authorization as spent the moment it leaves. A router lookup is ONE payment, to the provider: deciding where to route costs nothing and nobody signs for it. The boundary is split on purpose: the backend binds the call and validates its arguments against the capability's own schema, and this client checks the three things only it can: the amount signed against the spend caps, the body that comes back against the success rule the decision carries, and the destination resolving to a public address. That destination check is a check, not a pin: the request resolves the name again on its own, so a host that answers publicly at check time and privately a moment later is not closed by it. Closing it needs a resolver-aware transport that connects to the address it validated, which this release does not ship. `--max-price` is always a hard cap on `tenjin pay`. Every authorization that LEAVES the process counts against the session budget until the 24 hour window rolls, even where the provider never settles it: a signed EIP-3009 authorization is a bearer instrument, so a 200 that reports no match, or a 402 that rejects the payment, is the counterparty saying it did not take the money rather than proof that it cannot. The budget is deliberately the conservative side of that, and a caller can be left with less headroom than it actually spent.
|
|
25
25
|
|
|
26
|
-
`tenjin send` moves USDC out of the wallet. It exists as a human escape hatch, not as part of the agent flow.
|
|
26
|
+
`tenjin wallet send` moves USDC out of the wallet. It exists as a human escape hatch, not as part of the agent flow.
|
|
27
27
|
|
|
28
28
|
### The deployment origin set
|
|
29
29
|
|
|
@@ -36,13 +36,23 @@ Search, inspect, free reads, outcomes, wallet display, balance checks, doctor, a
|
|
|
36
36
|
|
|
37
37
|
## Publishing boundaries
|
|
38
38
|
|
|
39
|
-
Publishing and editing put content on a public marketplace under your identity.
|
|
39
|
+
Publishing and editing put content on a public marketplace under your identity. A local scan flags likely secrets and private-key material before every write: provider token shapes, private keys in and out of PEM framing, connection URIs with an embedded password, BIP-39 recovery phrases, and TOTP provisioning URIs, plus a broader warn tier for other sensitive context the agent still has to use judgment about. Its rules live as data in `src/lib/redact-rules.json`, the one table every redaction surface in the CLI reads.
|
|
40
|
+
|
|
41
|
+
The local scan does not refuse on its own: every finding it makes, block-tier shapes included, is a flag that goes through the same publish.mode consent flow as any other change — `review` asks, `auto` holds with `NEEDS_CONFIRMATION`, `full-auto` clears it and proceeds. The marketplace runs its own scan at ingest, on the write itself, and it is the one place that still refuses: its block tier has no acknowledgement path, so no mode and no `--yes` clears it. Today that covers the body, the frontmatter and `--excerpt`. The answer card is frontmatter now, with no flag form on `publish`, so it reaches the marketplace gate inside the document like the body does; `tenjin edit` still authors card fields by flag, and a secret typed into one of those is scanned locally as a flag only until the marketplace gate is extended to the card (loop-redesign PR F).
|
|
42
|
+
|
|
43
|
+
Server-side, the block tier has no acknowledgement path. The warn tier is held with a token, and a `--yes` clears that hold only when the marketplace found nothing the local scan had not already rendered. **A confirmation covers the findings it post-dates.** A `--yes` is an answer to a payload, and the payload it answered was rendered before any server call, so it cannot have contained the marketplace's own findings; the semantic checks in particular have no local counterpart at all. `full-auto` acknowledges unasked, because clearing soft findings unasked is that mode's contract. `publish.ackServerWarnings` overrides both readings: `off` never acknowledges whatever the mode says, and `on` is a standing yes that lets a `--yes` cover the marketplace's findings too. Findings the server contributed are marked as such where they are rendered, with their tier, including detectors this release has never heard of.
|
|
44
|
+
|
|
45
|
+
Findings never carry the matched secret. Each one is a detector id, a tier, offsets, and a masked excerpt, so a finding can be shown, logged, or forwarded without republishing what it found.
|
|
46
|
+
|
|
47
|
+
On a team shelf the destination is the team's own deployment rather than the marketplace, so the warn tier — which asks "is this safe to make public" — is skipped, except for `secret-assignment` (and `hex32-value`, the warn form a block-tier check demotes to). `high-entropy-string`, `env-dump-block` and the injection check `embedded-instruction` are public-only now. Which warn checks survive is data rather than a list in code: the `scopes` list on the rule in `src/lib/redact-rules.json` (a warn scoped to `team` as well as `publish`), applied inside the scan itself, so a new credential detector joins the survivors by marking itself and no command filters. The block on secrets and private-key material is not skipped either: that deployment is still a hosted database with logs and a door key the whole team holds, and a team note is fed to teammates' agents by the loop's hook arms, so neither "is this a live credential" nor "would this text steer the reader" gets easier to answer for being private.
|
|
48
|
+
|
|
49
|
+
The ingest gate runs on a team shelf too, since it sits in the shared write path rather than in the marketplace's publish route, and the shelf keeps its block tier on purpose for the reasons above. **Its warn tier stays advisory on a team shelf**: the shelf sets no `SCAN_WARN_MODE`, so warn findings ride the success response onto the team receipt and nothing is held. That is deliberate, not an oversight. Under `enforce` the shelf's warn tier would re-impose exactly the findings the team drop removes, and it is not the shelf's job to re-ask a question the drop already answered. A team shelf that does flip its own `SCAN_WARN_MODE` to `enforce` gets marketplace semantics on this path, warn holds included, and should expect the drop and the gate to disagree.
|
|
40
50
|
|
|
41
51
|
When in doubt, publish less context and more reproducible evidence.
|
|
42
52
|
|
|
43
53
|
## Permission boundaries
|
|
44
54
|
|
|
45
|
-
The recommended free harness permissions are documented in [agent-permissions.md](./agent-permissions.md). They are intentionally narrow and do not include `buy`, `publish`, `edit`, `send`, `
|
|
55
|
+
The recommended free harness permissions are documented in [agent-permissions.md](./agent-permissions.md). They are intentionally narrow and do not include `buy`, `publish`, `edit`, `wallet send`, `wallet create`, `config set`, `install`, or `mcp`.
|
|
46
56
|
|
|
47
57
|
Codex's default `workspace-write` sandbox also needs network access for paid x402 calls:
|
|
48
58
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tenjin-cli",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.16",
|
|
4
4
|
"mcpName": "blog.tenjin/tenjin",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"description": "
|
|
7
|
-
"license": "MIT",
|
|
6
|
+
"description": "x402 router for coding agents: one paid decision per lookup, a local wallet that pays each provider per call in USDC on Base.",
|
|
8
7
|
"repository": {
|
|
9
8
|
"type": "git",
|
|
10
9
|
"url": "git+https://github.com/BackTrackCo/tenjin-agent.git"
|
|
@@ -28,12 +27,11 @@
|
|
|
28
27
|
"tenjin": "dist/index.js"
|
|
29
28
|
},
|
|
30
29
|
"engines": {
|
|
31
|
-
"node": ">=
|
|
30
|
+
"node": ">=24"
|
|
32
31
|
},
|
|
33
32
|
"files": [
|
|
34
33
|
"dist",
|
|
35
34
|
"docs",
|
|
36
|
-
"skills",
|
|
37
35
|
"NOTICE.md"
|
|
38
36
|
],
|
|
39
37
|
"devDependencies": {
|
|
@@ -45,6 +43,8 @@
|
|
|
45
43
|
"@x402/core": "2.17.0",
|
|
46
44
|
"@x402/evm": "2.17.0",
|
|
47
45
|
"@x402/extensions": "2.17.0",
|
|
46
|
+
"ajv": "^8.20.0",
|
|
47
|
+
"ajv-formats": "^3.0.1",
|
|
48
48
|
"commander": "^14.0.1",
|
|
49
49
|
"eslint": "^10",
|
|
50
50
|
"eslint-config-prettier": "^10",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"zod": "^4.4.3"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
|
-
"build": "tsup",
|
|
61
|
+
"build": "rm -rf dist && tsup",
|
|
62
62
|
"test": "vitest run",
|
|
63
63
|
"typecheck": "tsc --noEmit",
|
|
64
64
|
"lint": "eslint .",
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"check": "pnpm run build && pnpm run test",
|
|
68
68
|
"sync:skill": "node scripts/sync-skill.mjs",
|
|
69
69
|
"pack-smoke": "bash scripts/pack-smoke.sh",
|
|
70
|
-
"changeset": "changeset"
|
|
70
|
+
"changeset": "changeset",
|
|
71
|
+
"githooks": "git config core.hooksPath .githooks"
|
|
71
72
|
}
|
|
72
73
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 BackTrackCo and Tenjin contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|