tenjin-cli 0.1.0-alpha.23 → 0.1.0-alpha.24
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 +1 -1
- package/README.md +2 -7
- package/dist/{chunk-HTC4VJFT.js → chunk-EP5P2STS.js} +8 -11
- package/dist/chunk-EP5P2STS.js.map +1 -0
- package/dist/{chunk-F4IJQBGP.js → chunk-FFL5M5BC.js} +2 -2
- package/dist/{chunk-DHCOGDJB.js → chunk-GPLSNGKX.js} +4 -4
- package/dist/{chunk-Y3LKUXZA.js → chunk-H5UR3GFJ.js} +98 -14
- package/dist/chunk-H5UR3GFJ.js.map +1 -0
- package/dist/{chunk-K63HPLYT.js → chunk-IIE65SJC.js} +4 -4
- package/dist/{chunk-2RMXTNLT.js → chunk-KC24CYGV.js} +4 -4
- package/dist/{chunk-XBYTP4SP.js → chunk-NSDZESRS.js} +3 -3
- package/dist/{chunk-UGLTSPXQ.js → chunk-O2WN732M.js} +2 -2
- package/dist/{chunk-SAN5PFTL.js → chunk-P22ZWXFX.js} +1 -1
- package/dist/{chunk-SAN5PFTL.js.map → chunk-P22ZWXFX.js.map} +1 -1
- package/dist/{chunk-2QYORQBF.js → chunk-P7LABKCW.js} +36 -1
- package/dist/{chunk-2QYORQBF.js.map → chunk-P7LABKCW.js.map} +1 -1
- package/dist/{chunk-3IOS6YG6.js → chunk-RCJ64OXH.js} +3 -3
- package/dist/{chunk-6O6DFYF3.js → chunk-SQSKVKX6.js} +2 -2
- package/dist/{chunk-UHEMZEGW.js → chunk-TMLCEPCD.js} +2 -2
- package/dist/{chunk-YT7A7DLY.js → chunk-UBOFYC6J.js} +7 -7
- package/dist/{chunk-GONDQ27X.js → chunk-UXSF7IFD.js} +3 -3
- package/dist/{chunk-I2GBBIDI.js → chunk-W2ARIOAZ.js} +43 -27
- package/dist/chunk-W2ARIOAZ.js.map +1 -0
- package/dist/{chunk-N7A5EXJZ.js → chunk-XRW4N23F.js} +4 -4
- package/dist/{chunk-NYJCBQL5.js → chunk-XZUGRTSV.js} +2 -2
- package/dist/{chunk-A2XMQSWI.js → chunk-YXLG7Q6Q.js} +3 -3
- package/dist/{chunk-HJYI52HM.js → chunk-YZTIYDWU.js} +2 -2
- package/dist/{chunk-WXFVJPZD.js → chunk-ZMFDMALH.js} +2 -2
- package/dist/{chunk-RA2J3TWG.js → chunk-ZNZGBUV6.js} +11 -9
- package/dist/chunk-ZNZGBUV6.js.map +1 -0
- package/dist/{cli-MUYFTWWB.js → cli-GGNOQQEB.js} +28 -28
- package/dist/{cli-MUYFTWWB.js.map → cli-GGNOQQEB.js.map} +1 -1
- package/dist/{config-IIRRO3XC.js → config-XUUFICXK.js} +8 -8
- package/dist/{doctor-KGHM2CAC.js → doctor-3LGF6CWI.js} +16 -16
- package/dist/{fund-DOWIT3JT.js → fund-3URFMBMN.js} +9 -9
- package/dist/{hook-command-RDT754KQ.js → hook-command-GMIDXVFK.js} +28 -10
- package/dist/{hook-command-RDT754KQ.js.map → hook-command-GMIDXVFK.js.map} +1 -1
- package/dist/index.js +3 -3
- package/dist/{install-BYQUMYBN.js → install-FRTG4KHF.js} +11 -11
- package/dist/{install-identity-KTQPYVAO.js → install-identity-WNXSYP6N.js} +6 -6
- package/dist/{install-wallet-T737X74E.js → install-wallet-MXLJJP3N.js} +9 -9
- package/dist/{mcp-ZKOTURQN.js → mcp-O2WJ3QBW.js} +23 -33
- package/dist/{mcp-ZKOTURQN.js.map → mcp-O2WJ3QBW.js.map} +1 -1
- package/dist/{pay-LZPU2HUT.js → pay-43WUYTW5.js} +11 -11
- package/dist/{payments-26NVMFR2.js → payments-7UTMMTIO.js} +6 -6
- package/dist/{send-4RUBQQKP.js → send-ALHG2RXT.js} +8 -8
- package/dist/{status-CEHZKHBU.js → status-CFPNHB6R.js} +5 -5
- package/dist/{status-line-QRAO3Y2E.js → status-line-FJ6N7MKJ.js} +4 -4
- package/dist/{status-line-wiring-7D2CSV3K.js → status-line-wiring-GXFNXHPE.js} +4 -4
- package/dist/{uninstall-VR44B4KD.js → uninstall-5P2GFYBY.js} +11 -11
- package/dist/{update-SOYQLDBF.js → update-QJ5YHJ7I.js} +5 -5
- package/dist/{wallet-IB2EFAUP.js → wallet-6OJPGNEV.js} +8 -8
- package/docs/agent-permissions.md +5 -5
- package/docs/safety-model.md +10 -23
- package/package.json +10 -8
- package/dist/chunk-HTC4VJFT.js.map +0 -1
- package/dist/chunk-I2GBBIDI.js.map +0 -1
- package/dist/chunk-RA2J3TWG.js.map +0 -1
- package/dist/chunk-Y3LKUXZA.js.map +0 -1
- package/dist/tenjin-daemon.mjs +0 -20601
- package/dist/tenjin-shim.mjs +0 -251
- package/dist/tenjin-vitest-reporter.mjs +0 -49
- /package/dist/{chunk-F4IJQBGP.js.map → chunk-FFL5M5BC.js.map} +0 -0
- /package/dist/{chunk-DHCOGDJB.js.map → chunk-GPLSNGKX.js.map} +0 -0
- /package/dist/{chunk-K63HPLYT.js.map → chunk-IIE65SJC.js.map} +0 -0
- /package/dist/{chunk-2RMXTNLT.js.map → chunk-KC24CYGV.js.map} +0 -0
- /package/dist/{chunk-XBYTP4SP.js.map → chunk-NSDZESRS.js.map} +0 -0
- /package/dist/{chunk-UGLTSPXQ.js.map → chunk-O2WN732M.js.map} +0 -0
- /package/dist/{chunk-3IOS6YG6.js.map → chunk-RCJ64OXH.js.map} +0 -0
- /package/dist/{chunk-6O6DFYF3.js.map → chunk-SQSKVKX6.js.map} +0 -0
- /package/dist/{chunk-UHEMZEGW.js.map → chunk-TMLCEPCD.js.map} +0 -0
- /package/dist/{chunk-YT7A7DLY.js.map → chunk-UBOFYC6J.js.map} +0 -0
- /package/dist/{chunk-GONDQ27X.js.map → chunk-UXSF7IFD.js.map} +0 -0
- /package/dist/{chunk-N7A5EXJZ.js.map → chunk-XRW4N23F.js.map} +0 -0
- /package/dist/{chunk-NYJCBQL5.js.map → chunk-XZUGRTSV.js.map} +0 -0
- /package/dist/{chunk-A2XMQSWI.js.map → chunk-YXLG7Q6Q.js.map} +0 -0
- /package/dist/{chunk-HJYI52HM.js.map → chunk-YZTIYDWU.js.map} +0 -0
- /package/dist/{chunk-WXFVJPZD.js.map → chunk-ZMFDMALH.js.map} +0 -0
- /package/dist/{config-IIRRO3XC.js.map → config-XUUFICXK.js.map} +0 -0
- /package/dist/{doctor-KGHM2CAC.js.map → doctor-3LGF6CWI.js.map} +0 -0
- /package/dist/{fund-DOWIT3JT.js.map → fund-3URFMBMN.js.map} +0 -0
- /package/dist/{install-BYQUMYBN.js.map → install-FRTG4KHF.js.map} +0 -0
- /package/dist/{install-identity-KTQPYVAO.js.map → install-identity-WNXSYP6N.js.map} +0 -0
- /package/dist/{install-wallet-T737X74E.js.map → install-wallet-MXLJJP3N.js.map} +0 -0
- /package/dist/{pay-LZPU2HUT.js.map → pay-43WUYTW5.js.map} +0 -0
- /package/dist/{payments-26NVMFR2.js.map → payments-7UTMMTIO.js.map} +0 -0
- /package/dist/{send-4RUBQQKP.js.map → send-ALHG2RXT.js.map} +0 -0
- /package/dist/{status-CEHZKHBU.js.map → status-CFPNHB6R.js.map} +0 -0
- /package/dist/{status-line-QRAO3Y2E.js.map → status-line-FJ6N7MKJ.js.map} +0 -0
- /package/dist/{status-line-wiring-7D2CSV3K.js.map → status-line-wiring-GXFNXHPE.js.map} +0 -0
- /package/dist/{uninstall-VR44B4KD.js.map → uninstall-5P2GFYBY.js.map} +0 -0
- /package/dist/{update-SOYQLDBF.js.map → update-QJ5YHJ7I.js.map} +0 -0
- /package/dist/{wallet-IB2EFAUP.js.map → wallet-6OJPGNEV.js.map} +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
paidLegTimeoutMs,
|
|
5
5
|
runPay,
|
|
6
6
|
settlementTx
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UBOFYC6J.js";
|
|
8
8
|
import "./chunk-LAIZ2AQA.js";
|
|
9
9
|
import "./chunk-RGVOODF4.js";
|
|
10
10
|
import "./chunk-TTNESUPQ.js";
|
|
@@ -12,10 +12,10 @@ import "./chunk-HPWO4O6S.js";
|
|
|
12
12
|
import "./chunk-POUWHWID.js";
|
|
13
13
|
import "./chunk-XZKD7DIF.js";
|
|
14
14
|
import "./chunk-LHHMV4GU.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-FFL5M5BC.js";
|
|
16
|
+
import "./chunk-GPLSNGKX.js";
|
|
17
|
+
import "./chunk-XZUGRTSV.js";
|
|
18
|
+
import "./chunk-ZMFDMALH.js";
|
|
19
19
|
import "./chunk-AWQPGIR6.js";
|
|
20
20
|
import "./chunk-N35E6CM2.js";
|
|
21
21
|
import "./chunk-JRGFKVAZ.js";
|
|
@@ -24,15 +24,15 @@ import "./chunk-EGELTSPU.js";
|
|
|
24
24
|
import "./chunk-KG3D7FIF.js";
|
|
25
25
|
import "./chunk-RBJPAZFI.js";
|
|
26
26
|
import "./chunk-BPMWXTFX.js";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-O2WN732M.js";
|
|
28
28
|
import "./chunk-7QKHZQKW.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-RCJ64OXH.js";
|
|
30
30
|
import "./chunk-MEFB5KHA.js";
|
|
31
31
|
import "./chunk-2I4QTOLB.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-TMLCEPCD.js";
|
|
33
33
|
import "./chunk-O2JYBOUO.js";
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-P22ZWXFX.js";
|
|
35
|
+
import "./chunk-ZNZGBUV6.js";
|
|
36
36
|
import "./chunk-JLEF5WHM.js";
|
|
37
37
|
import "./chunk-K6AXXYCG.js";
|
|
38
38
|
import "./chunk-ZXTAQYNA.js";
|
|
@@ -42,4 +42,4 @@ export {
|
|
|
42
42
|
runPay,
|
|
43
43
|
settlementTx
|
|
44
44
|
};
|
|
45
|
-
//# sourceMappingURL=pay-
|
|
45
|
+
//# sourceMappingURL=pay-43WUYTW5.js.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
reconcilePayments
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UXSF7IFD.js";
|
|
5
5
|
import "./chunk-LAIZ2AQA.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-XZUGRTSV.js";
|
|
7
|
+
import "./chunk-ZMFDMALH.js";
|
|
8
8
|
import "./chunk-7QKHZQKW.js";
|
|
9
9
|
import "./chunk-MEFB5KHA.js";
|
|
10
10
|
import "./chunk-2I4QTOLB.js";
|
|
11
11
|
import {
|
|
12
12
|
resolveContextSettings
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TMLCEPCD.js";
|
|
14
14
|
import {
|
|
15
15
|
toMoney
|
|
16
16
|
} from "./chunk-O2JYBOUO.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-P22ZWXFX.js";
|
|
18
18
|
import "./chunk-JLEF5WHM.js";
|
|
19
19
|
import {
|
|
20
20
|
paidLedgerPath
|
|
@@ -44,4 +44,4 @@ async function runPaymentsReconcile(ctx, deps = {}) {
|
|
|
44
44
|
export {
|
|
45
45
|
runPaymentsReconcile
|
|
46
46
|
};
|
|
47
|
-
//# sourceMappingURL=payments-
|
|
47
|
+
//# sourceMappingURL=payments-7UTMMTIO.js.map
|
|
@@ -10,13 +10,13 @@ import {
|
|
|
10
10
|
broadcastUsdcSend,
|
|
11
11
|
getUsdcBalance,
|
|
12
12
|
prepareUsdcSend
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FFL5M5BC.js";
|
|
14
14
|
import {
|
|
15
15
|
describeWallet,
|
|
16
16
|
resolveWalletProvider
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-GPLSNGKX.js";
|
|
18
|
+
import "./chunk-XZUGRTSV.js";
|
|
19
|
+
import "./chunk-ZMFDMALH.js";
|
|
20
20
|
import "./chunk-AWQPGIR6.js";
|
|
21
21
|
import "./chunk-N35E6CM2.js";
|
|
22
22
|
import "./chunk-JRGFKVAZ.js";
|
|
@@ -29,19 +29,19 @@ import {
|
|
|
29
29
|
import "./chunk-KG3D7FIF.js";
|
|
30
30
|
import "./chunk-RBJPAZFI.js";
|
|
31
31
|
import "./chunk-BPMWXTFX.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-O2WN732M.js";
|
|
33
33
|
import "./chunk-MEFB5KHA.js";
|
|
34
34
|
import "./chunk-2I4QTOLB.js";
|
|
35
35
|
import {
|
|
36
36
|
resolveContextSettings
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-TMLCEPCD.js";
|
|
38
38
|
import {
|
|
39
39
|
parseUsdToAtomic,
|
|
40
40
|
toMoney
|
|
41
41
|
} from "./chunk-O2JYBOUO.js";
|
|
42
42
|
import {
|
|
43
43
|
SEND_MAX_UNSET
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-P22ZWXFX.js";
|
|
45
45
|
import {
|
|
46
46
|
CliError
|
|
47
47
|
} from "./chunk-JLEF5WHM.js";
|
|
@@ -221,4 +221,4 @@ This moves funds out of the agent wallet and cannot be undone. [y/N] `;
|
|
|
221
221
|
export {
|
|
222
222
|
runSend
|
|
223
223
|
};
|
|
224
|
-
//# sourceMappingURL=send-
|
|
224
|
+
//# sourceMappingURL=send-ALHG2RXT.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
|
|
2
|
-
import "./chunk-
|
|
2
|
+
import "./chunk-XZUGRTSV.js";
|
|
3
3
|
import {
|
|
4
4
|
readSpendSummary,
|
|
5
5
|
spentOf
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZMFDMALH.js";
|
|
7
7
|
import "./chunk-MEFB5KHA.js";
|
|
8
8
|
import "./chunk-2I4QTOLB.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveContextSettings
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TMLCEPCD.js";
|
|
12
12
|
import {
|
|
13
13
|
toMoney
|
|
14
14
|
} from "./chunk-O2JYBOUO.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
RETIRED_PAYMENT_GUIDANCE,
|
|
17
17
|
loadRawConfig,
|
|
18
18
|
retiredPaymentKeys
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-P22ZWXFX.js";
|
|
20
20
|
import "./chunk-JLEF5WHM.js";
|
|
21
21
|
import "./chunk-K6AXXYCG.js";
|
|
22
22
|
import "./chunk-ZXTAQYNA.js";
|
|
@@ -68,4 +68,4 @@ async function runRouterStatus(ctx, deps = {}) {
|
|
|
68
68
|
export {
|
|
69
69
|
runRouterStatus
|
|
70
70
|
};
|
|
71
|
-
//# sourceMappingURL=status-
|
|
71
|
+
//# sourceMappingURL=status-CFPNHB6R.js.map
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-QF4SSCQV.js";
|
|
5
5
|
import {
|
|
6
6
|
routerSettings
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-NSDZESRS.js";
|
|
8
|
+
import "./chunk-TMLCEPCD.js";
|
|
9
9
|
import "./chunk-O2JYBOUO.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-P22ZWXFX.js";
|
|
11
11
|
import "./chunk-JLEF5WHM.js";
|
|
12
12
|
import "./chunk-K6AXXYCG.js";
|
|
13
13
|
import "./chunk-ZXTAQYNA.js";
|
|
@@ -84,4 +84,4 @@ export {
|
|
|
84
84
|
runStatusLine,
|
|
85
85
|
statusLineMain
|
|
86
86
|
};
|
|
87
|
-
//# sourceMappingURL=status-line-
|
|
87
|
+
//# sourceMappingURL=status-line-FJ6N7MKJ.js.map
|
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
inspectStatusLine,
|
|
10
10
|
removeStatusLine,
|
|
11
11
|
statusLineMode
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-YZTIYDWU.js";
|
|
13
|
+
import "./chunk-SQSKVKX6.js";
|
|
14
|
+
import "./chunk-ZNZGBUV6.js";
|
|
15
15
|
import "./chunk-JLEF5WHM.js";
|
|
16
16
|
import "./chunk-K6AXXYCG.js";
|
|
17
17
|
import "./chunk-ZXTAQYNA.js";
|
|
@@ -26,4 +26,4 @@ export {
|
|
|
26
26
|
removeStatusLine,
|
|
27
27
|
statusLineMode
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=status-line-wiring-
|
|
29
|
+
//# sourceMappingURL=status-line-wiring-GXFNXHPE.js.map
|
|
@@ -5,31 +5,31 @@ import {
|
|
|
5
5
|
mcpScope,
|
|
6
6
|
readMcpEntry,
|
|
7
7
|
routerSettingsPath
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-H5UR3GFJ.js";
|
|
9
9
|
import {
|
|
10
10
|
MCP_SERVER_NAME
|
|
11
11
|
} from "./chunk-TGLKKLQG.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-O2WN732M.js";
|
|
13
13
|
import {
|
|
14
14
|
onPath,
|
|
15
15
|
persistRouterProject
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-W2ARIOAZ.js";
|
|
17
17
|
import "./chunk-A36LQPHV.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-P7LABKCW.js";
|
|
19
19
|
import "./chunk-MEFB5KHA.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-NSDZESRS.js";
|
|
21
21
|
import "./chunk-2I4QTOLB.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-TMLCEPCD.js";
|
|
23
23
|
import "./chunk-O2JYBOUO.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-P22ZWXFX.js";
|
|
25
25
|
import {
|
|
26
26
|
removeStatusLine
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-YZTIYDWU.js";
|
|
28
28
|
import {
|
|
29
29
|
inspectHooksFile,
|
|
30
30
|
pruneHooks
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-SQSKVKX6.js";
|
|
32
|
+
import "./chunk-ZNZGBUV6.js";
|
|
33
33
|
import {
|
|
34
34
|
writeFileAtomic
|
|
35
35
|
} from "./chunk-JLEF5WHM.js";
|
|
@@ -162,4 +162,4 @@ export {
|
|
|
162
162
|
MCP_REMOVE_COMMAND,
|
|
163
163
|
runRouterUninstall
|
|
164
164
|
};
|
|
165
|
-
//# sourceMappingURL=uninstall-
|
|
165
|
+
//# sourceMappingURL=uninstall-5P2GFYBY.js.map
|
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
fetchDistTags,
|
|
6
6
|
isNewer,
|
|
7
7
|
resolveTarget
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XRW4N23F.js";
|
|
9
9
|
import {
|
|
10
10
|
emitWriteNotice,
|
|
11
11
|
sanitizeForTerminal
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-O2WN732M.js";
|
|
13
|
+
import "./chunk-P22ZWXFX.js";
|
|
14
14
|
import {
|
|
15
15
|
package_default
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZNZGBUV6.js";
|
|
17
17
|
import {
|
|
18
18
|
CliError
|
|
19
19
|
} from "./chunk-JLEF5WHM.js";
|
|
@@ -430,4 +430,4 @@ export {
|
|
|
430
430
|
spawnCapture,
|
|
431
431
|
versionFreeEntry
|
|
432
432
|
};
|
|
433
|
-
//# sourceMappingURL=update-
|
|
433
|
+
//# sourceMappingURL=update-QJ5YHJ7I.js.map
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
runWalletBalance,
|
|
4
4
|
runWalletCreate,
|
|
5
5
|
runWalletShow
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-KC24CYGV.js";
|
|
7
|
+
import "./chunk-FFL5M5BC.js";
|
|
8
|
+
import "./chunk-GPLSNGKX.js";
|
|
9
|
+
import "./chunk-XZUGRTSV.js";
|
|
10
|
+
import "./chunk-ZMFDMALH.js";
|
|
11
11
|
import "./chunk-AWQPGIR6.js";
|
|
12
12
|
import "./chunk-N35E6CM2.js";
|
|
13
13
|
import "./chunk-JRGFKVAZ.js";
|
|
@@ -16,11 +16,11 @@ import "./chunk-EGELTSPU.js";
|
|
|
16
16
|
import "./chunk-KG3D7FIF.js";
|
|
17
17
|
import "./chunk-RBJPAZFI.js";
|
|
18
18
|
import "./chunk-BPMWXTFX.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-O2WN732M.js";
|
|
20
20
|
import "./chunk-MEFB5KHA.js";
|
|
21
21
|
import "./chunk-2I4QTOLB.js";
|
|
22
22
|
import "./chunk-O2JYBOUO.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-P22ZWXFX.js";
|
|
24
24
|
import "./chunk-JLEF5WHM.js";
|
|
25
25
|
import "./chunk-K6AXXYCG.js";
|
|
26
26
|
import "./chunk-ZXTAQYNA.js";
|
|
@@ -29,4 +29,4 @@ export {
|
|
|
29
29
|
runWalletCreate,
|
|
30
30
|
runWalletShow
|
|
31
31
|
};
|
|
32
|
-
//# sourceMappingURL=wallet-
|
|
32
|
+
//# sourceMappingURL=wallet-6OJPGNEV.js.map
|
|
@@ -18,7 +18,7 @@ It is a tool grant, not a spending grant. Every payment the tool makes still pas
|
|
|
18
18
|
|
|
19
19
|
Router on/off controls automatic routing. The spending controls and ledger are local; the router cannot read or raise them:
|
|
20
20
|
|
|
21
|
-
- **`maxAutoSpend`** caps automatic router purchases per call. `tenjin install`
|
|
21
|
+
- **`maxAutoSpend`** caps automatic router purchases per call. `tenjin install` asks you to approve or change these limits in an interactive terminal, and writes 0.25 USD only when absent otherwise; the bare CLI defaults to zero. Above the cap, automatic payment is refused without prompting.
|
|
22
22
|
- **`sessionBudget`** caps automatic exposure in the existing 24 hour ledger window. It defaults to 5.00 USD before and after install. Explicit zero blocks positive automatic spending; `none` removes the automatic daily ceiling.
|
|
23
23
|
- **`spend.json`** records all payments, with separate automatic exposure and reservation modes. Only automatic exposure and pending automatic reservations consume the daily budget. Manual payments remain in total reporting. Older records without a mode/counter conservatively count as automatic until their window expires. Both modes retain the keyed duplicate guard, including under `none`.
|
|
24
24
|
|
|
@@ -37,7 +37,7 @@ tenjin config set sessionBudget 2.00
|
|
|
37
37
|
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:
|
|
38
38
|
|
|
39
39
|
- The amount actually signed has to fit `maxAutoSpend` and the day's `sessionBudget`. A live price above the one the decision quoted is refused before anything is signed, so a provider or a stale catalog cannot charge more than it advertised; a hostile server sets that quote itself, so against one the bound stays `maxAutoSpend`.
|
|
40
|
-
- An offer carries the service's spec: its input schema, the fields Tenjin pins, and the HTTP request those fields become. Your assistant fills the fields; this CLI puts the pins over them, validates the result against the schema, builds the request and pays the spec's own payee, never above the spec's price ceiling.
|
|
40
|
+
- An offer carries the service's spec: its input schema, the fields Tenjin pins, and the HTTP request those fields become. Your assistant fills the fields; this CLI puts the pins over them, validates the result against the schema, builds the request and pays the spec's own payee, never above the spec's price ceiling. The one lookup without a spec, the free docs lookup, is bound by the backend from your assistant's query, and nothing is paid for it.
|
|
41
41
|
- 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).
|
|
42
42
|
- A 2xx whose body fails the decision's own success rule is delivered as `unverified`, never `fulfilled`, with a caveat naming the rule it missed. The money has already moved, so the body is not withheld.
|
|
43
43
|
|
|
@@ -45,7 +45,7 @@ A compromised backend can therefore name any origin it likes, and spend at most
|
|
|
45
45
|
|
|
46
46
|
## A prefix rule pins the verb, not the flags
|
|
47
47
|
|
|
48
|
-
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
|
|
48
|
+
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 provider result is exactly where such a flag comes from.
|
|
49
49
|
|
|
50
50
|
## Opt in by hand: paying an endpoint you name
|
|
51
51
|
|
|
@@ -65,7 +65,7 @@ tenjin pay https://api.example.com/quote --json --max-price 0.05
|
|
|
65
65
|
tenjin pay https://api.example.com/quote --json --max-price 0.05 --ignore-warnings --yes
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
Both flags still obey the optional explicit `--max-price` cap, destination and supported-challenge checks, and the authoritative wallet balance check. Warnings and acknowledgement status remain in JSON output. Each paid invocation can spend again;
|
|
68
|
+
Both flags still obey the optional explicit `--max-price` cap, destination and supported-challenge checks, and the authoritative wallet balance check. Warnings and acknowledgement status remain in JSON output. Each paid invocation can spend again; nothing deduplicates repeat payments. Free or SIWX-entitled delivery needs neither warning acknowledgement nor a payment balance read.
|
|
69
69
|
|
|
70
70
|
Router calls cannot use `--ignore-warnings`. They require their offered price and retain hard checks for any supplied network, asset or recipient. An offer's spec supplies all four, so the live 402 has to match its recipient, network and asset and stay within its price; a lookup without a spec gets its price alone from the server, and for it this release does not claim complete endpoint/payee quote binding.
|
|
71
71
|
|
|
@@ -109,7 +109,7 @@ To stop the router without removing anything, `tenjin config set router.enabled
|
|
|
109
109
|
|
|
110
110
|
## What the hooks send
|
|
111
111
|
|
|
112
|
-
- On every prompt and every native `WebSearch` or `WebFetch`: the text of the current turn and at most six prior messages, masked by the
|
|
112
|
+
- On every prompt and every native `WebSearch` or `WebFetch`: the text of the current turn and at most six prior messages, masked by the CLI's key, PEM, seed-phrase, and URL credential rules (`src/lib/redact-rules.json`), then bounded to 16 KiB, with harness meta rows and tool results excluded. 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.
|
|
113
113
|
- A native call sends that same bounded turn WITH the call 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. When that call then comes back short and nothing was offered before it, it is sent once more with what the harness reported: the status code and byte count, the error, or that a fetch came back with only the page's shell (`reason: no_main_content`). Never the page or the results. A call that came back fine sends nothing more.
|
|
114
114
|
- When your assistant hands a task to a subagent: that task, as the current message, with the same bounded turn before it.
|
|
115
115
|
- When your assistant asks you a question (`AskUserQuestion`): the questions and their options, attached to the same bounded turn, before you see them; and after you answer, your answers as the current message. Before the question, a fitting lookup redirects it once, under the same rules as a native call, and only when your spend limits and wallet would pay it without asking you; after it, a fitting lookup is offered beside your answers.
|
package/docs/safety-model.md
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
# Safety model
|
|
2
2
|
|
|
3
|
-
Tenjin is built for agents, so the important rule is simple:
|
|
3
|
+
Tenjin is built for agents, so the important rule is simple: what a provider returns can inform the agent, but it must never become authority over the harness.
|
|
4
4
|
|
|
5
5
|
## Core invariants
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
- No harness permission, hook, settings change,
|
|
7
|
+
- Provider results are untrusted data, never instructions.
|
|
8
|
+
- No harness permission, hook, settings change, or wallet 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
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
11
|
- The wallet key stays local. Tenjin receives signatures and payment authorizations, never the private key.
|
|
13
12
|
|
|
14
13
|
## Content is evidence, not control
|
|
15
14
|
|
|
16
|
-
A
|
|
15
|
+
A provider result may contain shell commands, config snippets, prompts, or claims about what an agent should do next. Treat those as evidence to evaluate against local context and source material.
|
|
17
16
|
|
|
18
|
-
Do not copy commands from
|
|
17
|
+
Do not copy commands from a provider result into an allowlist, `AGENTS.md`, `CLAUDE.md`, Codex config, MCP config, shell profile, cron job, or hook. If a result suggests changing trust boundaries, summarize the suggestion and ask the user.
|
|
19
18
|
|
|
20
19
|
## Money-moving boundaries
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+
Wallet display, balance checks, doctor, and checkout-link creation are separated from payments and transfers.
|
|
23
22
|
|
|
24
|
-
The x402 router's `request` tool and `tenjin pay` are the paying commands, and they run one gate between them: `maxAutoSpend` and `sessionBudget` as limits on automatic router spending only, mandatory consent for manual pay, 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: an offer's spec carries the service's schema, pinned fields and request shape, and this client validates the agent's input against it and builds the call (
|
|
23
|
+
The x402 router's `request` tool and `tenjin pay` are the paying commands, and they run one gate between them: `maxAutoSpend` and `sessionBudget` as limits on automatic router spending only, mandatory consent for manual pay, 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: an offer's spec carries the service's schema, pinned fields and request shape, and this client validates the agent's input against it and builds the call (the free docs lookup, which has no spec and costs nothing, is bound by the backend); this client alone 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, for the paid request: it 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. The router's download of media a discovered service links to does pin: it connects to the address it validated, on every redirect hop. `--max-price` is always a hard cap on `tenjin pay`. Every automatic authorization that LEAVES the process counts against the automatic 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. Manual exposure remains recorded in the same ledger but does not consume automatic headroom. Older records without a mode or automatic counter count conservatively as automatic. The budget is deliberately the conservative side of that, and a caller can be left with less headroom than it actually spent. The one release is proof from the chain, not the counterparty: `tenjin payments reconcile` (and the `request` tool, for up to three records beside each lookup) gives an authorization's amount back only when USDC's `authorizationState` shows it unused at a block whose timestamp is past its `validBefore`, so it can never be charged, and only inside the window that counted it, once per nonce.
|
|
25
24
|
|
|
26
25
|
The automatic daily limit is zero, a finite amount or `none`: zero blocks positive automatic payments and `none` removes that ceiling while retaining reservations and duplicate protection. Manual pay requires explicit user consent and is subject to neither automatic limit. Retired `bazaarPay` and `confirm` values are ignored after upgrade; doctor/status warn, and install/refresh remove and report them while preserving current controls and unrelated fields.
|
|
27
26
|
|
|
@@ -40,25 +39,13 @@ After policy confirmation and immediately before signing, the actual signer's US
|
|
|
40
39
|
1. Delete the line from `KNOWN_DEPLOYMENT_ORIGINS` and update the exact-membership pin in `production-origin.test.ts`, which is written out independently so this cannot be a one-line change.
|
|
41
40
|
2. Release, then tell operators to update. Until each CLI updates it keeps the old set: a released binary cannot be recalled, so treat the removal as effective only after operators have upgraded, and stop pointing DNS at anyone else's infrastructure in the meantime.
|
|
42
41
|
|
|
43
|
-
##
|
|
42
|
+
## Secret redaction
|
|
44
43
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
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).
|
|
48
|
-
|
|
49
|
-
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.
|
|
50
|
-
|
|
51
|
-
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.
|
|
52
|
-
|
|
53
|
-
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.
|
|
54
|
-
|
|
55
|
-
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.
|
|
56
|
-
|
|
57
|
-
When in doubt, publish less context and more reproducible evidence.
|
|
44
|
+
Every router packet is masked before it leaves the machine: 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. The rules live as data in `src/lib/redact-rules.json`, the one table every redaction surface in the CLI reads. A finding never carries the matched secret: it is a detector id, a tier, offsets, and a masked excerpt.
|
|
58
45
|
|
|
59
46
|
## Permission boundaries
|
|
60
47
|
|
|
61
|
-
The recommended free harness permissions are documented in [agent-permissions.md](./agent-permissions.md). They are intentionally narrow and do not include `
|
|
48
|
+
The recommended free harness permissions are documented in [agent-permissions.md](./agent-permissions.md). They are intentionally narrow and do not include `pay`, `wallet send`, `wallet create`, `config set`, `install`, or `mcp`.
|
|
62
49
|
|
|
63
50
|
Codex's default `workspace-write` sandbox also needs network access for paid x402 calls:
|
|
64
51
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tenjin-cli",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
4
|
-
"mcpName": "blog.tenjin/tenjin",
|
|
3
|
+
"version": "0.1.0-alpha.24",
|
|
5
4
|
"type": "module",
|
|
6
|
-
"description": "
|
|
5
|
+
"description": "The tool router for coding agents. Tenjin picks the right tool when your agent needs one, and one wallet pays for every call.",
|
|
7
6
|
"repository": {
|
|
8
7
|
"type": "git",
|
|
9
8
|
"url": "git+https://github.com/BackTrackCo/tenjin-agent.git"
|
|
@@ -11,14 +10,17 @@
|
|
|
11
10
|
"homepage": "https://tenjin.blog/agents",
|
|
12
11
|
"bugs": "https://github.com/BackTrackCo/tenjin-agent/issues",
|
|
13
12
|
"keywords": [
|
|
13
|
+
"claude-code",
|
|
14
|
+
"coding-agents",
|
|
15
|
+
"tool-router",
|
|
16
|
+
"ai-agents",
|
|
17
|
+
"agent-tools",
|
|
18
|
+
"mcp",
|
|
14
19
|
"x402",
|
|
15
20
|
"usdc",
|
|
16
21
|
"base",
|
|
17
|
-
"ai-agents",
|
|
18
|
-
"agent-payments",
|
|
19
|
-
"mcp",
|
|
20
|
-
"knowledge-marketplace",
|
|
21
22
|
"micropayments",
|
|
23
|
+
"agent-payments",
|
|
22
24
|
"claude",
|
|
23
25
|
"codex",
|
|
24
26
|
"cli"
|
|
@@ -35,7 +37,7 @@
|
|
|
35
37
|
"NOTICE.md"
|
|
36
38
|
],
|
|
37
39
|
"devDependencies": {
|
|
38
|
-
"@changesets/cli": "^
|
|
40
|
+
"@changesets/cli": "^3.0.3",
|
|
39
41
|
"@clack/prompts": "^1.7.0",
|
|
40
42
|
"@eslint/js": "^10",
|
|
41
43
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/router/decision.ts"],"sourcesContent":["import { z } from 'zod';\nimport { fetchFailureToCliError, httpRequest } from '../lib/http';\nimport type { HttpRequestOptions, HttpResult } from '../lib/http';\nimport type { CommandContext } from '../context';\nimport type { Packet } from './context';\n\n/**\n * `POST /api/x402-router`: ONE FREE DECISION PER LOOKUP.\n *\n * The routing decision costs nothing and nobody signs for it. The hook asks for\n * it from the user's own words, the backend answers with what it would do and\n * what the provider charges, and the only payment on the wire is the one\n * `runPay` makes to that provider. That deletes the router fee and everything\n * built to carry it: the 402 probe, the requirements cache, the stale-quote\n * retry, the settlement accounting and one Base settlement of about 1.5 s from\n * every paid lookup.\n *\n * NOTHING IS STORED LOCALLY. The bounded packet travels with the request and\n * the backend keeps it against the decision id until that id expires, which is\n * how `request({query})` reaches the same calibrated input with no session\n * file, no timestamp latch and no guess about which window this process serves.\n */\n\nexport const ROUTER_PATH = '/api/x402-router';\n\n/**\n * The request the server builds and this client sends verbatim. Query assembly,\n * body encoding and header choice are the server's; what stays here is every\n * check that decides whether to send it at all.\n */\nconst RequestSchema = z.object({\n url: z.string().min(1).max(16_384),\n method: z.enum(['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS']),\n headers: z.record(z.string(), z.string()),\n body: z\n .string()\n .max(256 * 1024)\n .optional(),\n});\n\nconst ContractSchema = z.object({\n /** Flat, for display and for the result check; never re-encoded into a call:\n * the server built `request` from them and this client sends that verbatim. */\n arguments: z.record(z.string(), z.unknown()).optional(),\n resultSchema: z.record(z.string(), z.unknown()).optional(),\n request: RequestSchema,\n});\nexport type DecisionContract = z.infer<typeof ContractSchema>;\n\n/**\n * What stopped an outcome this client cannot execute, in terms the host can act\n * on: a stable reason code, the stage that stopped, the fields or scope choices\n * the user can supply, and one concrete next action.\n */\nconst DiagnosticsSchema = z.object({\n reasonCode: z.string().min(1).max(64),\n stage: z.string().min(1).max(32),\n missing: z.array(z.string().max(200)).max(60),\n nextAction: z.string().max(500),\n});\nexport type DecisionDiagnostics = z.infer<typeof DiagnosticsSchema>;\n\n/**\n * ONE VARIANT PER ANSWER, DISCRIMINATED ON THE ACTION. Optional fields made\n * every shape legal: an `execute` with no contract parsed and came back to the\n * host as a routine `needs_input`, a non-execute with no diagnostics parsed\n * with nothing to act on, and a hook answer carrying a contract parsed as\n * though the hook had quoted a price. Each of those is drift the shared\n * fixtures exist to catch, so each is now a parse failure that names itself.\n *\n * The two calls ask different questions and get different answers, so they get\n * different parsers. The HOOK asks whether a paid lookup is worth offering: an\n * id, or a reason it is not. The TOOL asks for the decision: the capability,\n * its price and the contract together, so a caller cannot approve one offer and\n * receive another.\n */\nconst IdSchema = z\n .string()\n .regex(/^[A-Za-z0-9_-]{8,64}$/)\n .describe(\n 'The turn id, an OPAQUE HANDLE: it is the one piece of server text this ' +\n 'client puts in a model-facing line, so the alphabet is pinned here ' +\n 'rather than escaped later.',\n );\n\n/** Every non-execute answer carries these, beside the action they explain. */\nconst RefusedSchema = z.strictObject({\n reason: z.string().max(2_000).optional(),\n diagnostics: DiagnosticsSchema,\n});\n\n/**\n * WHAT THE SERVICE IS, AND WHAT IT DOES. The hook answer used to be an id and\n * nothing else, so the line the host injected could only say \"a paid lookup is\n * available\", which a model follows 8 to 20 times in 40 where a line naming the\n * task and the service is followed 40 in 40. The gate knows which capability\n * serves the category it chose, so it now says so; the CONTRACT is still not\n * here, because the task the host will run does not exist yet.\n */\nconst CapabilityFields = {\n capabilityId: z.string().min(1).max(200),\n category: z.string().min(1).max(64),\n /** The service's own name, not the x402 reseller in front of it. */\n provider: z.string().min(1).max(120),\n capabilityDescription: z.string().min(1).max(500),\n /** What the provider charges, atomic USDC. The `request` tool refuses a live\n * 402 above it; `gateSpend` still caps the amount actually signed. */\n providerPriceAtomic: z.string().regex(/^\\d+$/),\n};\n\n/**\n * STRUCTURE, NEVER WORDING. A hint lands in the model's context verbatim, so\n * its shape is checked the way the id's alphabet is: one line, no control\n * characters, and it has to be the call it claims to be, naming the id this\n * same answer carries. A hint that fails any of these is a protocol error and\n * the turn falls back to the generic line; nothing here rewrites a word of a\n * hint that passes. Both offering arms, `execute` and `discovered`, hold it.\n */\nfunction checkHint(decision: { id: string; hint: string }, ctx: z.RefinementCtx): void {\n if (/[\\p{Cc}\\p{Cf}]/u.test(decision.hint)) {\n ctx.addIssue({ code: 'custom', path: ['hint'], message: 'a hint is one plain line' });\n }\n if (!decision.hint.includes('request({')) {\n ctx.addIssue({ code: 'custom', path: ['hint'], message: 'a hint names the call to make' });\n }\n if (!decision.hint.includes(decision.id)) {\n ctx.addIssue({\n code: 'custom',\n path: ['hint'],\n message: \"a hint carries this answer's own id\",\n });\n }\n}\n\n/**\n * A PAY-PER-CALL SERVICE NOBODY CURATED. When no capability in the catalog fits\n * but a listed x402 service could do the step, the server names that one\n * service: who sells it, where, for how much, and the input it takes. The\n * candidate is the seller's own listing, so every field is data for the host\n * to judge, never an instruction; the host builds the `input` and the tool\n * call pays through the same `runPay` path and caps as a curated lookup.\n */\nconst DiscoveredCandidateSchema = z.strictObject({\n source: z.string().min(1).max(64),\n provider: z.string().min(1).max(120),\n url: z.string().min(1).max(2_048),\n method: z.enum(['GET', 'POST']),\n description: z.string().max(500),\n providerPriceAtomic: z.string().regex(/^\\d+$/),\n network: z.string().min(1).max(64),\n payTo: z.string().min(1).max(200),\n input: z.strictObject({\n location: z.enum(['body', 'query']),\n schema: z.record(z.string(), z.unknown()),\n }),\n});\n\n/**\n * A REQUEST SPEC: the offered service's real contract, sent beside the line only\n * because this build asks for it (`accepts: [\"spec\"]`). The hook stores it by\n * the offer's id; `request({id})` shows it and `request({id, input})` fills its\n * request and pays the provider directly, with no second decision. Every field\n * is the server's, and so is checked like the rest of the answer: the payee and\n * price still meet the live 402 and the spend policy in `runPay`.\n */\nexport const ToolSpecSchema = z.strictObject({\n capabilityId: z.string().min(1).max(200),\n provider: z.string().min(1).max(120),\n description: z.string().min(1).max(500),\n priceAtomic: z.string().regex(/^\\d+$/),\n priceVaries: z.boolean(),\n maxAmountAtomic: z.string().regex(/^\\d+$/),\n payTo: z.string().min(1).max(200),\n network: z.string().min(1).max(64),\n asset: z.string().min(1).max(200),\n request: z.strictObject({\n method: z.enum(['GET', 'POST']),\n url: z.string().min(1).max(2_048),\n fields: z.record(z.string(), z.enum(['path', 'query', 'body'])),\n location: z.enum(['query', 'body']),\n }),\n input: z.record(z.string(), z.unknown()),\n pinned: z.record(z.string(), z.unknown()),\n example: z.record(z.string(), z.unknown()).optional(),\n returns: z.string().min(1).max(200).optional(),\n returnsExample: z.unknown().optional(),\n resultSchema: z.record(z.string(), z.unknown()).optional(),\n /** The fields the result promises (type, properties, items, required). The\n * agent is handed only these; the whole body is saved to a file. */\n outputSchema: z.record(z.string(), z.unknown()).optional(),\n});\nexport type ToolSpec = z.infer<typeof ToolSpecSchema>;\n\nexport const OfferSpecSchema = ToolSpecSchema.extend({ id: IdSchema });\nexport type OfferSpec = z.infer<typeof OfferSpecSchema>;\n\n/** One spec per service the line names: the offer and any alternative. */\nconst SpecsSchema = z.array(OfferSpecSchema).min(1).max(4).optional();\n\n/** The same answer on both calls: the hook's offer, and the tool's fallback\n * when a query with no id found no curated capability. */\nconst DiscoveredSchema = z\n .strictObject({\n action: z.literal('discovered'),\n id: IdSchema,\n candidate: DiscoveredCandidateSchema,\n /** THE LINE, FINISHED, as on `execute`: it carries the seller's\n * description and the input it takes. */\n hint: z.string().min(1).max(2_000),\n specs: SpecsSchema,\n })\n .superRefine(checkHint);\n\nconst HookDecisionSchema = z.discriminatedUnion('action', [\n z\n .strictObject({\n action: z.literal('execute'),\n id: IdSchema,\n ...CapabilityFields,\n /** The x402 URL a lookup would pay, for the line the server writes. */\n endpoint: z.string().min(1).max(2_048),\n /** What to pass in `query`, in the service's own terms. */\n usage: z.string().min(1).max(300),\n /**\n * THE LINE, FINISHED. The server writes it with the real id in it and, on a\n * native call, the exact search or URL that was denied. The client injects\n * it and composes nothing, which is why there is no hint builder here any\n * more: two sides writing the same sentence is how they drift. The same\n * bound as a discovered line's.\n */\n hint: z.string().min(1).max(2_000),\n specs: SpecsSchema,\n })\n .superRefine(checkHint),\n DiscoveredSchema,\n RefusedSchema.extend({ action: z.literal('native') }),\n RefusedSchema.extend({ action: z.literal('needs_input') }),\n]);\n\nconst ToolDecisionSchema = z.discriminatedUnion('action', [\n z.strictObject({\n action: z.literal('execute'),\n ...CapabilityFields,\n contract: ContractSchema,\n }),\n /**\n * A query with no id, answered with the spec of the service the server\n * picked under a fresh `id`: kept like a hook's. `input` is there only when\n * the query, as written, was a valid value for the spec's query field (a\n * free-text field, or one whose format or pattern it satisfies), and the\n * tool then runs it in the same call, checked again like any input.\n * Otherwise the agent fills the skeleton. `hint` is the line, with the skeleton of the call:\n * `request({id, input: {...}})` with the required fields, or the bound one.\n */\n z\n .strictObject({\n action: z.literal('spec'),\n id: IdSchema,\n spec: ToolSpecSchema,\n hint: z.string().min(1).max(2_000),\n input: z.record(z.string(), z.unknown()).optional(),\n })\n .superRefine(checkHint),\n DiscoveredSchema,\n RefusedSchema.extend({ action: z.literal('native') }),\n RefusedSchema.extend({ action: z.literal('needs_input') }),\n]);\n\nfunction envelope<T extends z.ZodTypeAny>(decision: T) {\n return z.strictObject({\n schemaVersion: z.literal(1),\n routerVersion: z.string().min(1).max(64),\n decision,\n /** A plain sentence about the CALL, such as an id that had expired. Never a\n * failure: the decision beside it ran anyway. */\n note: z.string().max(500).optional(),\n jev: z.object({ calls: z.number(), latencyMs: z.number() }).optional(),\n });\n}\n\nconst HookResponseSchema = envelope(HookDecisionSchema);\nconst ToolResponseSchema = envelope(ToolDecisionSchema);\n\nexport type HookResponse = z.infer<typeof HookResponseSchema>;\nexport type ToolResponse = z.infer<typeof ToolResponseSchema>;\nexport type HookDecision = HookResponse['decision'];\nexport type ToolDecision = ToolResponse['decision'];\n\n/** Which call this is, and therefore which answer is legal for it. */\nexport type CallKind = 'hook' | 'tool';\n\n/**\n * What this client can act on beyond the curated answers, sent on both calls.\n * `discovered` is Tenjin's reviewed list of third-party services, on for every\n * build that parses it; the server answers that arm only to a request that\n * lists it, so an older build never sees one. `spec` asks for each offered\n * service's request spec beside its line, and for the picked service's spec in\n * place of a decision on a query with no id, which only a build that parses\n * them can take: the decision schemas are strict. `bazaar` widens discovery\n * to the open Bazaar and is sent only while `experimental.bazaar` is on.\n */\nexport const CLIENT_ACCEPTS: readonly string[] = ['discovered', 'spec'];\nexport const BAZAAR_ACCEPT = 'bazaar';\n\n/** The `accepts` this build sends, with the open Bazaar or without it. */\nexport function acceptsFor(bazaar: boolean): string[] {\n return bazaar ? [...CLIENT_ACCEPTS, BAZAAR_ACCEPT] : [...CLIENT_ACCEPTS];\n}\n\n/**\n * The exact body the hook call sends, spelled once and pinned to the shared\n * fixtures. The route reads it with a strict object, so an extra field is a\n * 400, and a 400 is a turn with no hint.\n *\n * ONE BODY FOR BOTH HOOKS. Which hook is asking is not a field: the route reads\n * it from `packet.pendingCall`, which the native hook sets and the prompt hook\n * does not. A `source` beside the packet was the `/prepare` route's shape, and\n * that route is gone. `sessionId` is the harness's own session id, which the\n * server uses only so one session is not offered the same discovered service\n * twice.\n */\nexport function buildHookBody(\n packet: Packet,\n extras: { sessionId?: string; accepts?: readonly string[] } = {},\n): Record<string, unknown> {\n return {\n schemaVersion: 1,\n ...(extras.sessionId !== undefined ? { sessionId: extras.sessionId } : {}),\n ...(extras.accepts !== undefined ? { accepts: [...extras.accepts] } : {}),\n packet,\n };\n}\n\n/** The exact body the tool call sends. `id` is the turn whose packet decides\n * with this query; `gateHint` is evidence, never authority. `input` is the\n * host's own input for a discovered service, and stands in for `query`. */\nexport function buildToolBody(request: {\n query?: string;\n id?: string;\n input?: Record<string, unknown>;\n gateHint?: GateHint;\n accepts?: readonly string[];\n}): Record<string, unknown> {\n return {\n schemaVersion: 1,\n ...(request.query !== undefined ? { query: request.query } : {}),\n ...(request.id !== undefined ? { id: request.id } : {}),\n ...(request.input !== undefined ? { input: request.input } : {}),\n ...(request.gateHint !== undefined ? { gateHint: request.gateHint } : {}),\n ...(request.accepts !== undefined ? { accepts: [...request.accepts] } : {}),\n };\n}\n\n/** The parsers, exposed so the shared wire fixtures are checked against the\n * same schemas production parses with rather than against a copy of them. */\nexport function parseForTests(kind: CallKind, value: unknown): { success: boolean } {\n const schema = kind === 'hook' ? HookResponseSchema : ToolResponseSchema;\n return { success: schema.safeParse(value).success };\n}\n\n/**\n * The gate's own reading of this turn, travelling as EVIDENCE for the lookup it\n * was produced for. The backend may refine or reject it, and it authorizes no\n * money: the local spend policy does that. Optional on both call forms.\n */\nexport interface GateHint {\n category: string;\n turnId: string;\n lookupId: string;\n}\n\nexport interface DecisionDeps {\n ctx: CommandContext;\n baseUrl: string;\n /** `experimental.bazaar`: add {@link BAZAAR_ACCEPT}, so a service from the\n * open Bazaar may come back. Off by default: curated and the Tenjin list. */\n acceptsBazaar?: boolean;\n fetchImpl?: typeof fetch;\n /** Overrides the per-call deadline; the hook passes its own, smaller one. */\n timeoutMs?: number;\n}\n\nexport type DecisionOutcome<T> =\n | { status: 'decided'; decision: T }\n /** Nothing was paid and nothing could be: the endpoint is free, so a failure\n * here costs the turn a routing answer and nothing else. */\n | { status: 'failed'; reason: string; errorCode?: string };\n\n/**\n * ONE FREE CALL, IN TWO FORMS. The hook sends `{ packet }`: the backend runs\n * the gate, and on `execute` stores that packet under an id. The tool sends\n * `{ query, id? }`: the backend makes THE decision from that query plus the\n * packet it stored, and answers with the contract to run. A discovered\n * service's id is sent with the host's own `{ input }` instead of a query.\n *\n * The tool never sends a packet of its own. The turn's context lives on the\n * backend against the id, and the query the model wrote is what the routing\n * corpus is calibrated against: 55 of 56 for query plus packet, 53 of 56 for\n * the raw prompt, measured on jev-1.13.0.\n */\nexport async function requestDecision(\n kind: 'hook',\n request: { packet: Packet; sessionId?: string },\n deps: DecisionDeps,\n): Promise<DecisionOutcome<HookResponse>>;\nexport async function requestDecision(\n kind: 'tool',\n request: { query?: string; id?: string; input?: Record<string, unknown>; gateHint?: GateHint },\n deps: DecisionDeps,\n): Promise<DecisionOutcome<ToolResponse>>;\nexport async function requestDecision(\n kind: CallKind,\n request: {\n query?: string;\n packet?: Packet;\n sessionId?: string;\n id?: string;\n input?: Record<string, unknown>;\n gateHint?: GateHint;\n },\n deps: DecisionDeps,\n): Promise<DecisionOutcome<HookResponse | ToolResponse>> {\n const url = new URL(ROUTER_PATH, deps.baseUrl).toString();\n const options: HttpRequestOptions = {\n method: 'POST',\n timeoutMs: deps.timeoutMs ?? deps.ctx.flags.timeout,\n blockRedirects: true,\n jsonBody:\n kind === 'hook'\n ? buildHookBody(request.packet as Packet, {\n ...(request.sessionId !== undefined ? { sessionId: request.sessionId } : {}),\n accepts: acceptsFor(deps.acceptsBazaar === true),\n })\n : buildToolBody({\n ...(request.query !== undefined ? { query: request.query } : {}),\n ...(request.id !== undefined ? { id: request.id } : {}),\n ...(request.input !== undefined ? { input: request.input } : {}),\n ...(request.gateHint !== undefined ? { gateHint: request.gateHint } : {}),\n accepts: acceptsFor(deps.acceptsBazaar === true),\n }),\n ...(deps.fetchImpl !== undefined ? { fetchImpl: deps.fetchImpl } : {}),\n };\n return readDecision(\n await httpRequest(url, options),\n kind === 'hook' ? HookResponseSchema : ToolResponseSchema,\n );\n}\n\n/** How a call run from a request spec ended, for the server's offer-to-call\n * count. No text: the id, the outcome, the provider's status and the time. */\nexport interface SpecOutcome {\n id: string;\n status: 'fulfilled' | 'unverified' | 'failed' | 'needs_approval';\n httpStatus?: number;\n ms?: number;\n}\n\n/** The outcome report's own deadline: it is telemetry and never holds a result. */\nexport const OUTCOME_TIMEOUT_MS = 3_000;\n\n/**\n * TELL THE SERVER A SPEC WAS USED. The client called and paid the provider\n * itself, so this is the only word the server gets that its offer was taken.\n * Never throws and never waits on anything the caller needs: a lost report\n * costs one count.\n */\nexport async function reportSpecOutcome(\n outcome: SpecOutcome,\n deps: Pick<DecisionDeps, 'ctx' | 'baseUrl' | 'fetchImpl'>,\n): Promise<void> {\n try {\n await httpRequest(new URL(ROUTER_PATH, deps.baseUrl).toString(), {\n method: 'POST',\n timeoutMs: OUTCOME_TIMEOUT_MS,\n blockRedirects: true,\n jsonBody: buildOutcomeBody(outcome),\n ...(deps.fetchImpl !== undefined ? { fetchImpl: deps.fetchImpl } : {}),\n });\n } catch {\n // Telemetry only.\n }\n}\n\n/** The exact body of an outcome report, pinned to the shared fixtures. */\nexport function buildOutcomeBody(outcome: SpecOutcome): Record<string, unknown> {\n return {\n schemaVersion: 1,\n id: outcome.id,\n status: outcome.status,\n ...(outcome.httpStatus !== undefined ? { httpStatus: outcome.httpStatus } : {}),\n ...(outcome.ms !== undefined ? { ms: Math.max(0, Math.round(outcome.ms)) } : {}),\n };\n}\n\nfunction readDecision<T extends z.ZodTypeAny>(\n response: HttpResult,\n schema: T,\n): DecisionOutcome<z.infer<T>> {\n // A transport failure says its own reason; nothing was paid either way,\n // because there is nothing to pay for on this route.\n if (!response.ok) return { status: 'failed', reason: fetchFailureToCliError(response).message };\n if (response.status < 200 || response.status >= 300) {\n const named = errorOf(response.json);\n return {\n status: 'failed',\n // The backend's own code and message, never a bare status line: a typed\n // refusal the host could act on was arriving as \"answered 400\".\n reason:\n named === null\n ? `The router endpoint answered ${response.status}.`\n : `The router endpoint answered ${response.status} (${named.code}): ${named.message}`,\n ...(named !== null ? { errorCode: named.code } : {}),\n };\n }\n const parsed = schema.safeParse(response.json);\n if (!parsed.success) {\n return { status: 'failed', reason: 'The router returned a decision this build cannot read.' };\n }\n return { status: 'decided', decision: parsed.data as z.infer<T> };\n}\n\n/** `{ error: { code, message } }`, the envelope every Tenjin route answers a\n * refusal with. Anything else reads as no code rather than as a guess. */\nfunction errorOf(body: unknown): { code: string; message: string } | null {\n if (body === null || typeof body !== 'object') return null;\n const error = (body as { error?: unknown }).error;\n if (error === null || typeof error !== 'object') return null;\n const { code, message } = error as { code?: unknown; message?: unknown };\n if (typeof code !== 'string' || code.length === 0 || code.length > 64) return null;\n const text = typeof message === 'string' ? message.slice(0, 500) : '';\n return { code, message: text };\n}\n"],"mappings":";;;;;;;;;;AAuBO,IAAM,cAAc;AAO3B,IAAM,gBAAgB,iBAAE,OAAO;AAAA,EAC7B,KAAK,iBAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,KAAM;AAAA,EACjC,QAAQ,iBAAE,KAAK,CAAC,OAAO,QAAQ,OAAO,SAAS,UAAU,QAAQ,SAAS,CAAC;AAAA,EAC3E,SAAS,iBAAE,OAAO,iBAAE,OAAO,GAAG,iBAAE,OAAO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