tenjin-cli 0.1.0-alpha.27 → 0.1.0-alpha.29
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/README.md +18 -26
- package/dist/alive-3J3CHOQP.js +21 -0
- package/dist/{chunk-XVYATBKD.js → chunk-25GGN553.js} +897 -522
- package/dist/chunk-25GGN553.js.map +1 -0
- package/dist/{chunk-B2L53TMK.js → chunk-2SNUOHAT.js} +28 -23
- package/dist/chunk-2SNUOHAT.js.map +1 -0
- package/dist/{chunk-5NEHH2E5.js → chunk-3FY5HG7R.js} +86 -19
- package/dist/chunk-3FY5HG7R.js.map +1 -0
- package/dist/{chunk-YQOQ6XEI.js → chunk-4FYMDRD3.js} +51 -41
- package/dist/chunk-4FYMDRD3.js.map +1 -0
- package/dist/chunk-6W5GYG3W.js +128 -0
- package/dist/chunk-6W5GYG3W.js.map +1 -0
- package/dist/{chunk-G4AM2SOL.js → chunk-AMEUXNJT.js} +4 -8
- package/dist/{chunk-G4AM2SOL.js.map → chunk-AMEUXNJT.js.map} +1 -1
- package/dist/chunk-EWLU46J6.js +100 -0
- package/dist/chunk-EWLU46J6.js.map +1 -0
- package/dist/chunk-LRCJ2IZ5.js +115 -0
- package/dist/{chunk-HC3QEZKT.js.map → chunk-LRCJ2IZ5.js.map} +1 -1
- package/dist/{chunk-X7I343ZY.js → chunk-LX5OT4TQ.js} +3 -3
- package/dist/{chunk-X7I343ZY.js.map → chunk-LX5OT4TQ.js.map} +1 -1
- package/dist/{chunk-DATCR7AU.js → chunk-MG3G644T.js} +5 -7
- package/dist/{chunk-DATCR7AU.js.map → chunk-MG3G644T.js.map} +1 -1
- package/dist/{chunk-BOAI23CX.js → chunk-MOG7PB3A.js} +21 -15
- package/dist/chunk-MOG7PB3A.js.map +1 -0
- package/dist/{chunk-GU4GGKYP.js → chunk-MRUPDSUM.js} +14 -59
- package/dist/chunk-MRUPDSUM.js.map +1 -0
- package/dist/{chunk-AWKQSKUL.js → chunk-OOSRB3OF.js} +2 -2
- package/dist/{chunk-PZ5N6BAL.js → chunk-ORWL5BSN.js} +5 -4
- package/dist/chunk-ORWL5BSN.js.map +1 -0
- package/dist/chunk-P4LVLFO4.js +29 -0
- package/dist/chunk-P4LVLFO4.js.map +1 -0
- package/dist/{chunk-VXIBZ6W5.js → chunk-QTGUDCIR.js} +5 -5
- package/dist/{chunk-YKM2ZTA2.js → chunk-R4AO7GC2.js} +462 -105
- package/dist/chunk-R4AO7GC2.js.map +1 -0
- package/dist/{chunk-OHZYNZSD.js → chunk-RJEPZMYY.js} +12 -8
- package/dist/chunk-RJEPZMYY.js.map +1 -0
- package/dist/chunk-SBL4THYT.js +2074 -0
- package/dist/chunk-SBL4THYT.js.map +1 -0
- package/dist/{chunk-VNNXAYJE.js → chunk-SFEQGENI.js} +2 -2
- package/dist/{chunk-K6AXXYCG.js → chunk-SJLTEINJ.js} +10 -2
- package/dist/{chunk-K6AXXYCG.js.map → chunk-SJLTEINJ.js.map} +1 -1
- package/dist/{chunk-5FGO6TYT.js → chunk-TROZ6HL4.js} +3 -5
- package/dist/{chunk-5FGO6TYT.js.map → chunk-TROZ6HL4.js.map} +1 -1
- package/dist/{chunk-SKQQOEWH.js → chunk-USOLCBKC.js} +6 -8
- package/dist/{chunk-SKQQOEWH.js.map → chunk-USOLCBKC.js.map} +1 -1
- package/dist/{chunk-64SE3QC5.js → chunk-VKQXVCZR.js} +54 -5
- package/dist/chunk-VKQXVCZR.js.map +1 -0
- package/dist/{chunk-VIOUZW7Z.js → chunk-VVAHFCX2.js} +209 -37
- package/dist/chunk-VVAHFCX2.js.map +1 -0
- package/dist/{chunk-4L7KMA7P.js → chunk-WM7TJEBP.js} +8 -10
- package/dist/{chunk-4L7KMA7P.js.map → chunk-WM7TJEBP.js.map} +1 -1
- package/dist/{chunk-2TYQD22Q.js → chunk-XDYKZRLN.js} +23 -16
- package/dist/chunk-XDYKZRLN.js.map +1 -0
- package/dist/{chunk-LAIZ2AQA.js → chunk-XJQ6CH7X.js} +3 -2
- package/dist/{chunk-O7CUHHYU.js → chunk-ZQNGTLOC.js} +8 -10
- package/dist/{chunk-O7CUHHYU.js.map → chunk-ZQNGTLOC.js.map} +1 -1
- package/dist/{cli-6JNIPZQ6.js → cli-JPTDHGRX.js} +58 -52
- package/dist/{cli-6JNIPZQ6.js.map → cli-JPTDHGRX.js.map} +1 -1
- package/dist/{config-G75YT6NC.js → config-YYKDH2TH.js} +12 -15
- package/dist/{doctor-3GMDOW4Y.js → doctor-SSTXGCHX.js} +298 -269
- package/dist/doctor-SSTXGCHX.js.map +1 -0
- package/dist/{fund-3IPR5YRJ.js → fund-QWVWRVDK.js} +95 -43
- package/dist/{fund-3IPR5YRJ.js.map → fund-QWVWRVDK.js.map} +1 -1
- package/dist/hook-command-VWJXRT7H.js +31 -0
- package/dist/hosts/claude/.claude-plugin/marketplace.json +19 -0
- package/dist/hosts/claude/tenjin/.claude-plugin/plugin.json +14 -0
- package/dist/hosts/claude/tenjin/.mcp.json +12 -0
- package/dist/hosts/claude/tenjin/hooks/hooks.json +221 -0
- package/dist/index.js +13 -4
- package/dist/index.js.map +1 -1
- package/dist/install-2GXXD4DK.js +51 -0
- package/dist/{install-identity-PM4AGFFX.js → install-identity-FK3YF227.js} +7 -9
- package/dist/{install-wallet-6756NOB5.js → install-wallet-TC22U52X.js} +21 -17
- package/dist/{install-wallet-6756NOB5.js.map → install-wallet-TC22U52X.js.map} +1 -1
- package/dist/{mcp-33FAAZ7F.js → mcp-42H2F4NY.js} +2128 -372
- package/dist/mcp-42H2F4NY.js.map +1 -0
- package/dist/package-6DJA3Y2O.js +37 -0
- package/dist/{paths-MUXHUOCM.js → paths-POPTXJO6.js} +6 -2
- package/dist/{pay-XOYR4PCH.js → pay-LSDJBIAZ.js} +20 -18
- package/dist/payments-SPECLBRQ.js +105 -0
- package/dist/payments-SPECLBRQ.js.map +1 -0
- package/dist/{send-CVGNOQW3.js → send-MHAOLPK3.js} +13 -17
- package/dist/{send-CVGNOQW3.js.map → send-MHAOLPK3.js.map} +1 -1
- package/dist/status-O2RWLPS5.js +114 -0
- package/dist/status-O2RWLPS5.js.map +1 -0
- package/dist/{status-line-3IQKGRUH.js → status-line-45TVCRM3.js} +7 -9
- package/dist/{status-line-3IQKGRUH.js.map → status-line-45TVCRM3.js.map} +1 -1
- package/dist/uninstall-VOK2Z5M4.js +146 -0
- package/dist/uninstall-VOK2Z5M4.js.map +1 -0
- package/dist/update-FGP3HNLD.js +33 -0
- package/dist/update-FGP3HNLD.js.map +1 -0
- package/dist/{wallet-B3FVHNTS.js → wallet-DA7OFNEW.js} +18 -14
- package/dist/wallet-DA7OFNEW.js.map +1 -0
- package/docs/agent-permissions.md +35 -22
- package/docs/safety-model.md +3 -1
- package/package.json +2 -2
- package/dist/chunk-2TYQD22Q.js.map +0 -1
- package/dist/chunk-5NEHH2E5.js.map +0 -1
- package/dist/chunk-64SE3QC5.js.map +0 -1
- package/dist/chunk-6ZSGER3A.js +0 -52
- package/dist/chunk-6ZSGER3A.js.map +0 -1
- package/dist/chunk-B2L53TMK.js.map +0 -1
- package/dist/chunk-BOAI23CX.js.map +0 -1
- package/dist/chunk-DSNXKUXI.js +0 -172
- package/dist/chunk-DSNXKUXI.js.map +0 -1
- package/dist/chunk-GU4GGKYP.js.map +0 -1
- package/dist/chunk-H2L33M7F.js +0 -944
- package/dist/chunk-H2L33M7F.js.map +0 -1
- package/dist/chunk-HC3QEZKT.js +0 -87
- package/dist/chunk-JLEF5WHM.js +0 -132
- package/dist/chunk-JLEF5WHM.js.map +0 -1
- package/dist/chunk-MAQUL5BD.js +0 -99
- package/dist/chunk-MAQUL5BD.js.map +0 -1
- package/dist/chunk-OHZYNZSD.js.map +0 -1
- package/dist/chunk-PY7MQUKP.js +0 -755
- package/dist/chunk-PY7MQUKP.js.map +0 -1
- package/dist/chunk-PZ5N6BAL.js.map +0 -1
- package/dist/chunk-TGLKKLQG.js +0 -11
- package/dist/chunk-TGLKKLQG.js.map +0 -1
- package/dist/chunk-VIOUZW7Z.js.map +0 -1
- package/dist/chunk-XVYATBKD.js.map +0 -1
- package/dist/chunk-YKM2ZTA2.js.map +0 -1
- package/dist/chunk-YQOQ6XEI.js.map +0 -1
- package/dist/doctor-3GMDOW4Y.js.map +0 -1
- package/dist/hook-command-ZXX4FT4N.js +0 -32
- package/dist/install-6OROTYHZ.js +0 -72
- package/dist/mcp-33FAAZ7F.js.map +0 -1
- package/dist/payments-UTQDBO7H.js +0 -48
- package/dist/payments-UTQDBO7H.js.map +0 -1
- package/dist/status-NACN4DGX.js +0 -72
- package/dist/status-NACN4DGX.js.map +0 -1
- package/dist/status-line-wiring-QXBOOY2T.js +0 -31
- package/dist/uninstall-NYFKSYW4.js +0 -175
- package/dist/uninstall-NYFKSYW4.js.map +0 -1
- package/dist/update-RJDA5ZY3.js +0 -442
- package/dist/update-RJDA5ZY3.js.map +0 -1
- /package/dist/{config-G75YT6NC.js.map → alive-3J3CHOQP.js.map} +0 -0
- /package/dist/{chunk-AWKQSKUL.js.map → chunk-OOSRB3OF.js.map} +0 -0
- /package/dist/{chunk-VXIBZ6W5.js.map → chunk-QTGUDCIR.js.map} +0 -0
- /package/dist/{chunk-VNNXAYJE.js.map → chunk-SFEQGENI.js.map} +0 -0
- /package/dist/{chunk-LAIZ2AQA.js.map → chunk-XJQ6CH7X.js.map} +0 -0
- /package/dist/{hook-command-ZXX4FT4N.js.map → config-YYKDH2TH.js.map} +0 -0
- /package/dist/{install-6OROTYHZ.js.map → hook-command-VWJXRT7H.js.map} +0 -0
- /package/dist/{install-identity-PM4AGFFX.js.map → install-2GXXD4DK.js.map} +0 -0
- /package/dist/{paths-MUXHUOCM.js.map → install-identity-FK3YF227.js.map} +0 -0
- /package/dist/{pay-XOYR4PCH.js.map → package-6DJA3Y2O.js.map} +0 -0
- /package/dist/{status-line-wiring-QXBOOY2T.js.map → paths-POPTXJO6.js.map} +0 -0
- /package/dist/{wallet-B3FVHNTS.js.map → pay-LSDJBIAZ.js.map} +0 -0
package/README.md
CHANGED
|
@@ -45,14 +45,14 @@ In Claude Code or Claude Desktop, paste:
|
|
|
45
45
|
Install Tenjin from tenjin.sh
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
Your agent installs it, asks you about spend limits in the session, and helps you fund the wallet.
|
|
48
|
+
Your agent installs it, asks you about spend limits in the session, and helps you fund the wallet. Then type `/reload-plugins`, or start a new session, and Tenjin is on (when upgrading from an earlier release, start a new session). It needs Claude Code 2.1.287 or newer.
|
|
49
49
|
|
|
50
50
|
Or in a terminal (Node.js 22 or newer):
|
|
51
51
|
|
|
52
52
|
```bash
|
|
53
53
|
npm i -g tenjin-cli
|
|
54
|
-
tenjin install #
|
|
55
|
-
tenjin wallet fund
|
|
54
|
+
tenjin install # adds the Tenjin plugin to Claude Code and creates your wallet
|
|
55
|
+
tenjin wallet fund 5 # optional: add $5 with a card, via Coinbase
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
## What it can do
|
|
@@ -99,11 +99,7 @@ flowchart LR
|
|
|
99
99
|
|
|
100
100
|
The Tenjin router hooks into Claude Code at your prompt, before each web search or page fetch, when your agent hands work to a subagent, and around a question your agent asks you. At each point it asks Jev, a decision model from [TypeSafe](https://typesafe.ai), whether a tool in the catalog fits. When none does, Jev may pick one third-party service from a short list matching the step (the Tenjin list, plus the open Bazaar if you turned it on), or none. Either way Jev only chooses from a list, so it never writes a call or an instruction for your agent; a third-party listing's description is the seller's own, and your agent judges it.
|
|
101
101
|
|
|
102
|
-
When one fits, your agent sees a one-line suggestion with the tool and its price, and calls it through Tenjin's
|
|
103
|
-
|
|
104
|
-
```text
|
|
105
|
-
x402 · request: calling pro-api.coinmarketcap.com/x402/v3/cryptocurrency/quotes/latest · {"query":{"symbol":"BTC,ETH"}}
|
|
106
|
-
```
|
|
102
|
+
When one fits, your agent sees a one-line suggestion with the tool and its price, and calls it through the Tenjin plugin's MCP server: the offer's id alone shows the tool's inputs, an example and what it returns, and the id with the agent's input runs it. Tenjin builds the call, pays the provider from your wallet, within your limits, and hands back the result.
|
|
107
103
|
|
|
108
104
|
To pick a tool, the router sends your prompt and recent messages with secrets masked, plus the searches, URLs, subagent tasks and questions it routes; tool results stay on your machine. [What it sends, and everything install writes →](./docs/agent-permissions.md#what-the-hooks-send)
|
|
109
105
|
|
|
@@ -117,22 +113,22 @@ Tenjin pays for tools with [x402](https://www.x402.org), an open standard that b
|
|
|
117
113
|
|
|
118
114
|
### Limits
|
|
119
115
|
|
|
120
|
-
| Limit
|
|
121
|
-
|
|
|
122
|
-
| Per
|
|
123
|
-
| Per day
|
|
116
|
+
| Limit | Default | Change it |
|
|
117
|
+
| -------- | ------- | ------------------------------------- |
|
|
118
|
+
| Per call | $0.25 | `tenjin config set maxAutoSpend 0.10` |
|
|
119
|
+
| Per day | $5 | `tenjin config set sessionBudget 2` |
|
|
124
120
|
|
|
125
|
-
`tenjin install` asks you to approve these limits, or tells your agent to ask you when the agent runs it. [How the limits work →](./docs/agent-permissions.md#what-bounds-a-payment)
|
|
121
|
+
`tenjin install` asks you to approve these limits, or tells your agent to ask you when the agent runs it. A call that would pay more (all its payments together, such as five takes of a video) pays nothing on its own: your assistant tells you what it costs, and in Claude Code it asks you through Claude Code's own permission prompt and runs it once you say yes. [How the limits work →](./docs/agent-permissions.md#what-bounds-a-payment)
|
|
126
122
|
|
|
127
123
|
### Routing fee
|
|
128
124
|
|
|
129
|
-
Each routing call costs a flat $0.003, paid over x402 `batch-settlement` by `tenjin mcp` from a channel deposit of up to $0.25 (less when your per-call limit is lower). A deposit is an automatic payment: it counts against the limits above, and approving them at install approves the fee. The fees come out of the deposit and are not counted again. When a call cannot be paid, it takes the free path, and Claude Code tells you once per session why and what fixes it; `tenjin doctor` says the same. Details are in [docs/agent-permissions.md](docs/agent-permissions.md#what-bounds-a-router-payment-on-top-of-that).
|
|
125
|
+
Each routing call costs a flat $0.003, paid over x402 `batch-settlement` by `tenjin mcp` from a channel deposit of up to $0.25 (less when your per-call limit is lower). A deposit is an automatic payment: it counts against the limits above, and approving them at install approves the fee. The fees come out of the deposit and are not counted again. When a deposit is taken, Claude Code says so once; `tenjin status` shows it as prepaid routing credit, apart from what lookups cost, and `tenjin wallet balance` adds the credit still left. When a call cannot be paid, it takes the free path, and Claude Code tells you once per session why and what fixes it; `tenjin doctor` says the same. Details are in [docs/agent-permissions.md](docs/agent-permissions.md#what-bounds-a-router-payment-on-top-of-that).
|
|
130
126
|
|
|
131
127
|
### Funding
|
|
132
128
|
|
|
133
|
-
`tenjin wallet fund
|
|
129
|
+
`tenjin wallet fund 5` opens a Coinbase Onramp checkout for your wallet. In the US, Apple Pay or Google Pay with no Coinbase account. Elsewhere, your Coinbase account. You can also send USDC on Base to the address `tenjin wallet address` prints; at a terminal it and `tenjin wallet fund` also draw that address as a QR code for a phone wallet to scan (`--no-qr` skips it).
|
|
134
130
|
|
|
135
|
-
$
|
|
131
|
+
$5, the Apple Pay and Google Pay minimum, covers about 700 web searches, 500 page reads or 250 Wolfram Alpha answers.
|
|
136
132
|
|
|
137
133
|
### Withdrawing
|
|
138
134
|
|
|
@@ -144,23 +140,19 @@ $1–2 goes a long way. $2 covers about 280 web searches, 200 page reads or 100
|
|
|
144
140
|
tenjin status # what you've spent today
|
|
145
141
|
tenjin wallet balance # what's left
|
|
146
142
|
tenjin wallet fund 5 # top up
|
|
143
|
+
tenjin payments # the paid lookups this machine made
|
|
147
144
|
tenjin payments reconcile # settle paid lookups whose settlement was unknown
|
|
148
145
|
tenjin update # newest version; wallet and settings stay
|
|
149
146
|
tenjin config set router.enabled false # pause the router on this machine
|
|
150
147
|
tenjin config set --project router.enabled false # ...or just in this repo
|
|
151
|
-
tenjin uninstall # remove the Claude Code
|
|
148
|
+
tenjin uninstall # remove the Claude Code plugin; your wallet stays
|
|
152
149
|
```
|
|
153
150
|
|
|
154
|
-
Use `tenjin install --project` to set it up for a single project. Add `--json` to any command for machine-readable output.
|
|
151
|
+
Use `tenjin install --project` to set it up for a single project; `tenjin doctor` run in that project checks it, and `tenjin update` refreshes it with the rest. Add `--json` to any command for machine-readable output.
|
|
155
152
|
|
|
156
|
-
|
|
153
|
+
The CLI asks npm at most once a day whether a newer version exists and says so; it never updates itself, so `tenjin update` is yours to run. `tenjin config set update.mode off` turns that check off, the request to npm included, and `TENJIN_NO_UPDATE_CHECK=1` in the environment does the same wherever it is set.
|
|
157
154
|
|
|
158
|
-
|
|
159
|
-
<summary>Status line: keeping your own</summary>
|
|
160
|
-
|
|
161
|
-
`tenjin install` sets Claude Code's [status line](https://code.claude.com/docs/en/statusline) only if you don't already have one. If you do, yours is left alone and the install prints a command that shows both; `tenjin install --status-line compose` writes it for you, and `--status-line skip` leaves the setting untouched. The status line reads local files only: no network, no wallet, and it can't affect a lookup or a payment.
|
|
162
|
-
|
|
163
|
-
</details>
|
|
155
|
+
Every paid lookup is recorded on your machine, with the files and full results it returned. [Where they live, and what `payments reconcile` does →](./docs/agent-permissions.md#what-a-paid-lookup-leaves-on-your-machine)
|
|
164
156
|
|
|
165
157
|
<details>
|
|
166
158
|
<summary>Spending limits: the fine print</summary>
|
|
@@ -182,7 +174,7 @@ Tenjin is in alpha, and the catalog grows with what people ask for. Missing a se
|
|
|
182
174
|
|
|
183
175
|
- [How a lookup runs, what it sends, and what install writes](./docs/agent-permissions.md)
|
|
184
176
|
- [Safety model](./docs/safety-model.md)
|
|
185
|
-
- [Troubleshooting](./docs/troubleshooting.md)
|
|
177
|
+
- [Troubleshooting](./docs/troubleshooting.md)
|
|
186
178
|
|
|
187
179
|
## Developing
|
|
188
180
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
aliveDir,
|
|
4
|
+
aliveMain,
|
|
5
|
+
markSessionServed,
|
|
6
|
+
readAliveStamp,
|
|
7
|
+
removeAliveState,
|
|
8
|
+
runAliveHook,
|
|
9
|
+
sessionServedByPlugin
|
|
10
|
+
} from "./chunk-6W5GYG3W.js";
|
|
11
|
+
import "./chunk-ZXTAQYNA.js";
|
|
12
|
+
export {
|
|
13
|
+
aliveDir,
|
|
14
|
+
aliveMain,
|
|
15
|
+
markSessionServed,
|
|
16
|
+
readAliveStamp,
|
|
17
|
+
removeAliveState,
|
|
18
|
+
runAliveHook,
|
|
19
|
+
sessionServedByPlugin
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=alive-3J3CHOQP.js.map
|