tenjin-cli 0.1.0-alpha.29 → 0.1.0-alpha.30
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 +7 -5
- package/dist/{chunk-25GGN553.js → chunk-3O2BQIF6.js} +86 -22
- package/dist/chunk-3O2BQIF6.js.map +1 -0
- package/dist/{chunk-R4AO7GC2.js → chunk-5LJCEMFD.js} +14 -12
- package/dist/{chunk-R4AO7GC2.js.map → chunk-5LJCEMFD.js.map} +1 -1
- package/dist/{chunk-QTGUDCIR.js → chunk-AEG2PXBP.js} +3 -3
- package/dist/{chunk-AMEUXNJT.js → chunk-AWFUPKTM.js} +2 -2
- package/dist/{chunk-XJQ6CH7X.js → chunk-EBVIKMCH.js} +2 -2
- package/dist/{chunk-XDYKZRLN.js → chunk-HE2MS4QO.js} +6 -6
- package/dist/{chunk-RJEPZMYY.js → chunk-IOODYAXL.js} +3 -3
- package/dist/{chunk-SBL4THYT.js → chunk-JMM6YE7J.js} +190 -90
- package/dist/chunk-JMM6YE7J.js.map +1 -0
- package/dist/{chunk-VKQXVCZR.js → chunk-KHE6L6TD.js} +3 -3
- package/dist/chunk-KOGZDMHO.js +21 -0
- package/dist/chunk-KOGZDMHO.js.map +1 -0
- package/dist/{chunk-TROZ6HL4.js → chunk-KYFZTGMC.js} +2 -2
- package/dist/{chunk-LX5OT4TQ.js → chunk-NZIP4PA2.js} +2 -2
- package/dist/chunk-O2FRQ2L2.js +168 -0
- package/dist/chunk-O2FRQ2L2.js.map +1 -0
- package/dist/{chunk-3FY5HG7R.js → chunk-OK2TDZQU.js} +4 -4
- package/dist/{chunk-ZQNGTLOC.js → chunk-OSYTBCUC.js} +7 -5
- package/dist/{chunk-ZQNGTLOC.js.map → chunk-OSYTBCUC.js.map} +1 -1
- package/dist/{chunk-MRUPDSUM.js → chunk-PAYV4XUA.js} +3 -5
- package/dist/chunk-PAYV4XUA.js.map +1 -0
- package/dist/{chunk-USOLCBKC.js → chunk-QUVVWYJW.js} +7 -5
- package/dist/{chunk-USOLCBKC.js.map → chunk-QUVVWYJW.js.map} +1 -1
- package/dist/{chunk-MOG7PB3A.js → chunk-RAULEAZ6.js} +3 -3
- package/dist/{chunk-MG3G644T.js → chunk-SPAVAYSW.js} +3 -3
- package/dist/{chunk-4FYMDRD3.js → chunk-TTBKWWTV.js} +22 -20
- package/dist/chunk-TTBKWWTV.js.map +1 -0
- package/dist/{chunk-OOSRB3OF.js → chunk-U6YQ6FRI.js} +2 -2
- package/dist/{chunk-P4LVLFO4.js → chunk-VFMQTSXG.js} +2 -2
- package/dist/{chunk-LRCJ2IZ5.js → chunk-VUFAK2LW.js} +2 -2
- package/dist/{chunk-LRCJ2IZ5.js.map → chunk-VUFAK2LW.js.map} +1 -1
- package/dist/{chunk-WM7TJEBP.js → chunk-VZGAONSJ.js} +7 -5
- package/dist/{chunk-WM7TJEBP.js.map → chunk-VZGAONSJ.js.map} +1 -1
- package/dist/{chunk-VVAHFCX2.js → chunk-WO5BJNIB.js} +45 -194
- package/dist/chunk-WO5BJNIB.js.map +1 -0
- package/dist/chunk-WVUSXNIE.js +39 -0
- package/dist/chunk-WVUSXNIE.js.map +1 -0
- package/dist/chunk-XKESD27X.js +10 -0
- package/dist/chunk-XKESD27X.js.map +1 -0
- package/dist/{chunk-SFEQGENI.js → chunk-YFQOA5AU.js} +7 -2
- package/dist/{chunk-SFEQGENI.js.map → chunk-YFQOA5AU.js.map} +1 -1
- package/dist/{cli-JPTDHGRX.js → cli-O5SN7ZJ4.js} +38 -30
- package/dist/{cli-JPTDHGRX.js.map → cli-O5SN7ZJ4.js.map} +1 -1
- package/dist/{config-YYKDH2TH.js → config-OJQI27LT.js} +13 -12
- package/dist/{doctor-SSTXGCHX.js → doctor-IQQJHGGM.js} +36 -62
- package/dist/doctor-IQQJHGGM.js.map +1 -0
- package/dist/{fund-QWVWRVDK.js → fund-WEV6DMTD.js} +17 -12
- package/dist/{fund-QWVWRVDK.js.map → fund-WEV6DMTD.js.map} +1 -1
- package/dist/hook-command-D2P3ILRV.js +32 -0
- package/dist/hosts/claude/.claude-plugin/marketplace.json +2 -2
- package/dist/hosts/claude/tenjin/.claude-plugin/plugin.json +2 -2
- package/dist/index.js +4 -4
- package/dist/{install-2GXXD4DK.js → install-TUCRF32I.js} +23 -14
- package/dist/{install-identity-FK3YF227.js → install-identity-WHPNMNMQ.js} +7 -6
- package/dist/{install-wallet-TC22U52X.js → install-wallet-MA27FTQ5.js} +11 -10
- package/dist/{install-wallet-TC22U52X.js.map → install-wallet-MA27FTQ5.js.map} +1 -1
- package/dist/{mcp-42H2F4NY.js → mcp-QML7ZMPH.js} +33 -40
- package/dist/mcp-QML7ZMPH.js.map +1 -0
- package/dist/{package-6DJA3Y2O.js → package-LGKYOEPV.js} +2 -2
- package/dist/{pay-LSDJBIAZ.js → pay-2C2UBBXJ.js} +14 -13
- package/dist/{payments-SPECLBRQ.js → payments-C44QUFXU.js} +10 -9
- package/dist/{payments-SPECLBRQ.js.map → payments-C44QUFXU.js.map} +1 -1
- package/dist/{send-MHAOLPK3.js → send-KVJX4XIR.js} +9 -8
- package/dist/{send-MHAOLPK3.js.map → send-KVJX4XIR.js.map} +1 -1
- package/dist/{status-O2RWLPS5.js → status-S7C3WMSH.js} +10 -9
- package/dist/{status-O2RWLPS5.js.map → status-S7C3WMSH.js.map} +1 -1
- package/dist/{status-line-45TVCRM3.js → status-line-YR2T5HC4.js} +6 -5
- package/dist/{status-line-45TVCRM3.js.map → status-line-YR2T5HC4.js.map} +1 -1
- package/dist/{uninstall-VOK2Z5M4.js → uninstall-HY6LKIIT.js} +17 -14
- package/dist/{uninstall-VOK2Z5M4.js.map → uninstall-HY6LKIIT.js.map} +1 -1
- package/dist/{update-FGP3HNLD.js → update-OJV22LR3.js} +17 -14
- package/dist/usdc-JK4RRFFQ.js +39 -0
- package/dist/{wallet-DA7OFNEW.js → wallet-PD2IMZDU.js} +11 -10
- package/dist/wallet-PD2IMZDU.js.map +1 -0
- package/docs/agent-permissions.md +16 -4
- package/package.json +1 -1
- package/dist/chunk-25GGN553.js.map +0 -1
- package/dist/chunk-4FYMDRD3.js.map +0 -1
- package/dist/chunk-EWLU46J6.js +0 -100
- package/dist/chunk-EWLU46J6.js.map +0 -1
- package/dist/chunk-MRUPDSUM.js.map +0 -1
- package/dist/chunk-SBL4THYT.js.map +0 -1
- package/dist/chunk-VVAHFCX2.js.map +0 -1
- package/dist/doctor-SSTXGCHX.js.map +0 -1
- package/dist/hook-command-VWJXRT7H.js +0 -31
- package/dist/mcp-42H2F4NY.js.map +0 -1
- /package/dist/{chunk-QTGUDCIR.js.map → chunk-AEG2PXBP.js.map} +0 -0
- /package/dist/{chunk-AMEUXNJT.js.map → chunk-AWFUPKTM.js.map} +0 -0
- /package/dist/{chunk-XJQ6CH7X.js.map → chunk-EBVIKMCH.js.map} +0 -0
- /package/dist/{chunk-XDYKZRLN.js.map → chunk-HE2MS4QO.js.map} +0 -0
- /package/dist/{chunk-RJEPZMYY.js.map → chunk-IOODYAXL.js.map} +0 -0
- /package/dist/{chunk-VKQXVCZR.js.map → chunk-KHE6L6TD.js.map} +0 -0
- /package/dist/{chunk-TROZ6HL4.js.map → chunk-KYFZTGMC.js.map} +0 -0
- /package/dist/{chunk-LX5OT4TQ.js.map → chunk-NZIP4PA2.js.map} +0 -0
- /package/dist/{chunk-3FY5HG7R.js.map → chunk-OK2TDZQU.js.map} +0 -0
- /package/dist/{chunk-MOG7PB3A.js.map → chunk-RAULEAZ6.js.map} +0 -0
- /package/dist/{chunk-MG3G644T.js.map → chunk-SPAVAYSW.js.map} +0 -0
- /package/dist/{chunk-OOSRB3OF.js.map → chunk-U6YQ6FRI.js.map} +0 -0
- /package/dist/{chunk-P4LVLFO4.js.map → chunk-VFMQTSXG.js.map} +0 -0
- /package/dist/{config-YYKDH2TH.js.map → config-OJQI27LT.js.map} +0 -0
- /package/dist/{hook-command-VWJXRT7H.js.map → hook-command-D2P3ILRV.js.map} +0 -0
- /package/dist/{install-2GXXD4DK.js.map → install-TUCRF32I.js.map} +0 -0
- /package/dist/{install-identity-FK3YF227.js.map → install-identity-WHPNMNMQ.js.map} +0 -0
- /package/dist/{package-6DJA3Y2O.js.map → package-LGKYOEPV.js.map} +0 -0
- /package/dist/{pay-LSDJBIAZ.js.map → pay-2C2UBBXJ.js.map} +0 -0
- /package/dist/{update-FGP3HNLD.js.map → update-OJV22LR3.js.map} +0 -0
- /package/dist/{wallet-DA7OFNEW.js.map → usdc-JK4RRFFQ.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/session.ts"],"sourcesContent":["import { AGENT_ID_RE } from './grade';\n\n/**\n * Who a command or a hook fire belongs to. ONE COPY, because the daemon's\n * `actorOf` and the CLI's `search` must agree on what \"this actor\" means: a\n * `tenjin search` run inside a child and that child's own stop hook have to\n * land on the same `(session, agent)` row, or the child is never asked about\n * its own miss.\n *\n * The stored session is NAMESPACED BY HARNESS. Two harnesses can mint equal\n * native ids, and `marks`, `handoff` and `searches` key on the session string\n * alone; without the prefix their state would merge. The prefix is the only\n * place a harness name enters stored identity.\n */\n\nexport interface SessionActor {\n session: string;\n /** The child inside the session; absent for the lead. */\n agent?: string;\n}\n\n/** The stored form of a native session id: `<harness>:<id>`. */\nexport function sessionKey(harness: string, native: string): string {\n return `${harness}:${native}`;\n}\n\n/** The native id back out of a stored key; the whole key when it carries no prefix. */\nexport function nativeSessionOf(key: string): string {\n const at = key.indexOf(':');\n return at === -1 ? key : key.slice(at + 1);\n}\n\n/**\n * The actor a CLI command runs as, from the environment its harness exported.\n *\n * TENJIN_SESSION_ID is the operator override and is taken as the whole stored\n * key. CLAUDE_CODE_SESSION_ID is what Claude Code exports to the Bash\n * subprocess a `tenjin search` runs as, and it equals the `session_id` its\n * hooks post, so the two stamp identically (observed, not documented).\n * Codex 0.153.4 exports CODEX_SESSION_ID for the root session and\n * CODEX_THREAD_ID for the thread the command runs in (exec_env.rs); the thread\n * is the child only when it differs from the session, and it must be an id\n * this build can file a child under. Neither harness names a distinct child id\n * for the lead. On a harness exporting none of these the actor is undefined.\n */\nexport function readActor(env: NodeJS.ProcessEnv = process.env): SessionActor | undefined {\n const override = firstNonEmpty(env.TENJIN_SESSION_ID);\n if (override !== undefined) return { session: override };\n const claude = firstNonEmpty(env.CLAUDE_CODE_SESSION_ID);\n if (claude !== undefined) return { session: sessionKey('claude', claude) };\n const codex = firstNonEmpty(env.CODEX_SESSION_ID);\n if (codex !== undefined) {\n const thread = firstNonEmpty(env.CODEX_THREAD_ID);\n const actor: SessionActor = { session: sessionKey('codex', codex) };\n if (thread !== undefined && thread !== codex && AGENT_ID_RE.test(thread)) actor.agent = thread;\n return actor;\n }\n return undefined;\n}\n\n/**\n * Is this command run by an agent under a harness (Claude Code, which Claude\n * Desktop runs too, or Codex), from the variables each exports to the commands\n * its agent runs? A person's own terminal sets none of them.\n */\nexport function underAgentHarness(env: NodeJS.ProcessEnv = process.env): boolean {\n return [\n env.CLAUDECODE,\n env.CLAUDE_CODE_SESSION_ID,\n env.CLAUDE_CODE_EXECPATH,\n env.CODEX_SESSION_ID,\n ].some((v) => firstNonEmpty(v) !== undefined);\n}\n\nfunction firstNonEmpty(raw: string | undefined): string | undefined {\n if (typeof raw !== 'string') return undefined;\n const trimmed = raw.trim();\n return trimmed.length > 0 ? trimmed : undefined;\n}\n"],"mappings":";;;AAiEO,SAAS,kBAAkB,MAAyB,QAAQ,KAAc;AAC/E,SAAO;AAAA,IACL,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EACN,EAAE,KAAK,CAAC,MAAM,cAAc,CAAC,MAAM,MAAS;AAC9C;AAEA,SAAS,cAAc,KAA6C;AAClE,MAAI,OAAO,QAAQ,SAAU,QAAO;AACpC,QAAM,UAAU,IAAI,KAAK;AACzB,SAAO,QAAQ,SAAS,IAAI,UAAU;AACxC;","names":[]}
|
|
@@ -2,7 +2,7 @@ import { createRequire as __tenjinCreateRequire } from 'node:module'; const requ
|
|
|
2
2
|
import {
|
|
3
3
|
CliError,
|
|
4
4
|
external_exports
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WO5BJNIB.js";
|
|
6
6
|
|
|
7
7
|
// src/lib/output.ts
|
|
8
8
|
import { WriteStream } from "node:tty";
|
|
@@ -234,4 +234,4 @@ export {
|
|
|
234
234
|
style,
|
|
235
235
|
paint
|
|
236
236
|
};
|
|
237
|
-
//# sourceMappingURL=chunk-
|
|
237
|
+
//# sourceMappingURL=chunk-KYFZTGMC.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-2I4QTOLB.js";
|
|
5
5
|
import {
|
|
6
6
|
external_exports
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WO5BJNIB.js";
|
|
8
8
|
import {
|
|
9
9
|
spendLedgerPath
|
|
10
10
|
} from "./chunk-SJLTEINJ.js";
|
|
@@ -111,4 +111,4 @@ export {
|
|
|
111
111
|
readLedger,
|
|
112
112
|
readSpendSummary
|
|
113
113
|
};
|
|
114
|
-
//# sourceMappingURL=chunk-
|
|
114
|
+
//# sourceMappingURL=chunk-NZIP4PA2.js.map
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
balanceCachePath
|
|
4
|
+
} from "./chunk-SJLTEINJ.js";
|
|
5
|
+
|
|
6
|
+
// src/lib/atomic-json.ts
|
|
7
|
+
import { chmod, link, mkdir, open, rename, rm, writeFile } from "node:fs/promises";
|
|
8
|
+
import { randomBytes } from "node:crypto";
|
|
9
|
+
import { basename, dirname, join } from "node:path";
|
|
10
|
+
var isWindows = process.platform === "win32";
|
|
11
|
+
async function writeFileAtomic(targetPath, data, opts = {}) {
|
|
12
|
+
const dir = dirname(targetPath);
|
|
13
|
+
const fileMode = opts.mode ?? 420;
|
|
14
|
+
const dirMode = opts.dirMode ?? 493;
|
|
15
|
+
await mkdir(dir, { recursive: true, ...isWindows ? {} : { mode: dirMode } });
|
|
16
|
+
const tmpPath = join(dir, `.${basename(targetPath)}.${randomBytes(6).toString("hex")}.tmp`);
|
|
17
|
+
try {
|
|
18
|
+
await writeFile(tmpPath, data, isWindows ? void 0 : { mode: fileMode });
|
|
19
|
+
if (!isWindows) await chmod(tmpPath, fileMode);
|
|
20
|
+
await rename(tmpPath, targetPath);
|
|
21
|
+
} catch (err) {
|
|
22
|
+
await rm(tmpPath, { force: true }).catch(() => void 0);
|
|
23
|
+
throw err;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
async function writeFileAtomicExclusive(targetPath, data, opts = {}) {
|
|
27
|
+
const dir = dirname(targetPath);
|
|
28
|
+
const fileMode = opts.mode ?? 420;
|
|
29
|
+
const dirMode = opts.dirMode ?? 493;
|
|
30
|
+
await mkdir(dir, { recursive: true, ...isWindows ? {} : { mode: dirMode } });
|
|
31
|
+
if (isWindows) {
|
|
32
|
+
const handle = await open(targetPath, "wx");
|
|
33
|
+
try {
|
|
34
|
+
await handle.writeFile(data);
|
|
35
|
+
await handle.sync();
|
|
36
|
+
} finally {
|
|
37
|
+
await handle.close();
|
|
38
|
+
}
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const tmpPath = join(dir, `.${basename(targetPath)}.${randomBytes(6).toString("hex")}.tmp`);
|
|
42
|
+
try {
|
|
43
|
+
const handle = await open(tmpPath, "wx", fileMode);
|
|
44
|
+
try {
|
|
45
|
+
await handle.writeFile(data);
|
|
46
|
+
await handle.chmod(fileMode);
|
|
47
|
+
await handle.sync();
|
|
48
|
+
} finally {
|
|
49
|
+
await handle.close();
|
|
50
|
+
}
|
|
51
|
+
await link(tmpPath, targetPath);
|
|
52
|
+
await fsyncDir(dir);
|
|
53
|
+
} finally {
|
|
54
|
+
await rm(tmpPath, { force: true }).catch(() => void 0);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
async function fsyncDir(dir) {
|
|
58
|
+
const handle = await open(dir, "r");
|
|
59
|
+
try {
|
|
60
|
+
await handle.sync();
|
|
61
|
+
} finally {
|
|
62
|
+
await handle.close();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// src/lib/usdc-balance.ts
|
|
67
|
+
import { readFile } from "node:fs/promises";
|
|
68
|
+
var USDC_ADDRESS = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
|
|
69
|
+
var BALANCE_OF_SELECTOR = "0x70a08231";
|
|
70
|
+
var ADDRESS_RE = /^0x[0-9a-fA-F]{40}$/;
|
|
71
|
+
var WORD_RE = /^0x[0-9a-fA-F]{64}$/;
|
|
72
|
+
async function readUsdcBalance(address, rpcUrl, opts) {
|
|
73
|
+
if (!ADDRESS_RE.test(address) || opts.timeoutMs <= 0) return null;
|
|
74
|
+
try {
|
|
75
|
+
const res = await (opts.fetchImpl ?? fetch)(rpcUrl, {
|
|
76
|
+
method: "POST",
|
|
77
|
+
headers: { "content-type": "application/json" },
|
|
78
|
+
body: JSON.stringify({
|
|
79
|
+
jsonrpc: "2.0",
|
|
80
|
+
id: 1,
|
|
81
|
+
method: "eth_call",
|
|
82
|
+
params: [
|
|
83
|
+
{
|
|
84
|
+
to: USDC_ADDRESS,
|
|
85
|
+
data: `${BALANCE_OF_SELECTOR}${address.slice(2).toLowerCase().padStart(64, "0")}`
|
|
86
|
+
},
|
|
87
|
+
"latest"
|
|
88
|
+
]
|
|
89
|
+
}),
|
|
90
|
+
signal: AbortSignal.timeout(opts.timeoutMs)
|
|
91
|
+
});
|
|
92
|
+
if (!res.ok) return null;
|
|
93
|
+
const result = (await res.json())?.result;
|
|
94
|
+
return typeof result === "string" && WORD_RE.test(result) ? BigInt(result) : null;
|
|
95
|
+
} catch {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
var DEFAULT_RPC_URL = "https://mainnet.base.org";
|
|
100
|
+
var FALLBACK_RPC_URLS = [
|
|
101
|
+
"https://base-rpc.publicnode.com",
|
|
102
|
+
"https://base.drpc.org"
|
|
103
|
+
];
|
|
104
|
+
async function readUsdcBalanceWithFallback(address, rpcUrl, opts) {
|
|
105
|
+
const urls = sameUrl(rpcUrl, DEFAULT_RPC_URL) ? [rpcUrl, ...FALLBACK_RPC_URLS] : [rpcUrl];
|
|
106
|
+
const deadline = Date.now() + opts.timeoutMs;
|
|
107
|
+
for (const [index, url] of urls.entries()) {
|
|
108
|
+
const left = deadline - Date.now();
|
|
109
|
+
if (left <= 0) return null;
|
|
110
|
+
const timeoutMs = index === urls.length - 1 ? left : Math.ceil(left / 2);
|
|
111
|
+
const balance = await readUsdcBalance(address, url, { ...opts, timeoutMs });
|
|
112
|
+
if (balance !== null) return balance;
|
|
113
|
+
}
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
function sameUrl(a, b) {
|
|
117
|
+
try {
|
|
118
|
+
return new URL(a).href === new URL(b).href;
|
|
119
|
+
} catch {
|
|
120
|
+
return a === b;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
var LAST_KNOWN_BALANCE_MS = 6e4;
|
|
124
|
+
function rememberingBalanceReader(dataDir, opts = {}) {
|
|
125
|
+
const read = opts.read ?? readUsdcBalanceWithFallback;
|
|
126
|
+
const now = opts.now ?? Date.now;
|
|
127
|
+
const path = balanceCachePath(dataDir);
|
|
128
|
+
return async (address, rpcUrl, readOpts) => {
|
|
129
|
+
const remembered = await recallBalance(path, address, now());
|
|
130
|
+
if (remembered !== null) return remembered;
|
|
131
|
+
const live = await read(address, rpcUrl, readOpts);
|
|
132
|
+
if (live === null) return null;
|
|
133
|
+
const record = {
|
|
134
|
+
version: 1,
|
|
135
|
+
address: address.toLowerCase(),
|
|
136
|
+
atomic: live.toString(),
|
|
137
|
+
at: now()
|
|
138
|
+
};
|
|
139
|
+
try {
|
|
140
|
+
await writeFileAtomic(path, JSON.stringify(record), { mode: 384, dirMode: 448 });
|
|
141
|
+
} catch {
|
|
142
|
+
}
|
|
143
|
+
return live;
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
async function recallBalance(path, address, now) {
|
|
147
|
+
try {
|
|
148
|
+
const row = JSON.parse(await readFile(path, "utf8"));
|
|
149
|
+
if (row?.version !== 1 || row.address !== address.toLowerCase() || typeof row.atomic !== "string" || !/^\d{1,40}$/.test(row.atomic) || typeof row.at !== "number" || now - row.at < 0 || now - row.at > LAST_KNOWN_BALANCE_MS) {
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
152
|
+
return BigInt(row.atomic);
|
|
153
|
+
} catch {
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export {
|
|
159
|
+
writeFileAtomic,
|
|
160
|
+
writeFileAtomicExclusive,
|
|
161
|
+
fsyncDir,
|
|
162
|
+
USDC_ADDRESS,
|
|
163
|
+
readUsdcBalance,
|
|
164
|
+
DEFAULT_RPC_URL,
|
|
165
|
+
readUsdcBalanceWithFallback,
|
|
166
|
+
rememberingBalanceReader
|
|
167
|
+
};
|
|
168
|
+
//# sourceMappingURL=chunk-O2FRQ2L2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/atomic-json.ts","../src/lib/usdc-balance.ts"],"sourcesContent":["import { chmod, link, mkdir, open, rename, rm, writeFile } from 'node:fs/promises';\nimport { randomBytes } from 'node:crypto';\nimport { basename, dirname, join } from 'node:path';\n\n/** fs modes are no-ops on Windows; the 0600/0700 custody story does not apply. */\nconst isWindows = process.platform === 'win32';\n\nexport interface AtomicWriteOptions {\n /** Mode for the written file (ignored on win32). Default 0o644. */\n mode?: number;\n /** Mode for the parent dir when this call creates it (ignored on win32). Default 0o755. */\n dirMode?: number;\n}\n\n/**\n * Write `data` to `targetPath` atomically: a uniquely-named temp file is created\n * in the SAME directory (so the rename is atomic — a cross-filesystem rename is\n * not), given the final mode at open time, then renamed over the target. A\n * reader therefore sees either the old file or the fully-written new one, never\n * a partial write.\n *\n * The temp file is born with the caller's `mode` (0o600 for a wallet key) so the\n * bytes are never written through a world-readable descriptor; the follow-up\n * chmod only makes the mode exact under an unusual umask and only ever touches\n * the temp path, so the live target still appears atomically at its final mode.\n */\nexport async function writeFileAtomic(\n targetPath: string,\n data: string | Buffer,\n opts: AtomicWriteOptions = {},\n): Promise<void> {\n const dir = dirname(targetPath);\n const fileMode = opts.mode ?? 0o644;\n const dirMode = opts.dirMode ?? 0o755;\n\n await mkdir(dir, { recursive: true, ...(isWindows ? {} : { mode: dirMode }) });\n\n const tmpPath = join(dir, `.${basename(targetPath)}.${randomBytes(6).toString('hex')}.tmp`);\n try {\n await writeFile(tmpPath, data, isWindows ? undefined : { mode: fileMode });\n if (!isWindows) await chmod(tmpPath, fileMode);\n await rename(tmpPath, targetPath);\n } catch (err) {\n await rm(tmpPath, { force: true }).catch(() => undefined);\n throw err;\n }\n}\n\n/**\n * Like {@link writeFileAtomic} but NO-CLOBBER and crash-durable: the commit fails\n * with `EEXIST` when `targetPath` already exists instead of replacing it, and the\n * new entry is fsynced before returning. This is what a wallet key needs — two\n * concurrent `create`/`import` runs must not both \"succeed\" and silently lose one\n * key; the loser gets a distinguishable EEXIST the wallet layer maps to\n * WALLET_EXISTS.\n *\n * The temp file is fsynced, then `link()` commits it — link is atomic and throws\n * EEXIST if the target already exists, so the check-then-write race is closed at\n * the filesystem, not by an earlier stat. The parent dir is then fsynced so the\n * new entry survives a crash. On win32, link semantics differ and a directory\n * cannot be fsynced, so we fall back to an exclusive `wx` open (still atomic\n * create-or-EEXIST, just not crash-durable — win32 has no 0600 custody story to\n * protect anyway).\n */\nexport async function writeFileAtomicExclusive(\n targetPath: string,\n data: string,\n opts: AtomicWriteOptions = {},\n): Promise<void> {\n const dir = dirname(targetPath);\n const fileMode = opts.mode ?? 0o644;\n const dirMode = opts.dirMode ?? 0o755;\n\n await mkdir(dir, { recursive: true, ...(isWindows ? {} : { mode: dirMode }) });\n\n if (isWindows) {\n const handle = await open(targetPath, 'wx');\n try {\n await handle.writeFile(data);\n await handle.sync();\n } finally {\n await handle.close();\n }\n return;\n }\n\n const tmpPath = join(dir, `.${basename(targetPath)}.${randomBytes(6).toString('hex')}.tmp`);\n try {\n const handle = await open(tmpPath, 'wx', fileMode);\n try {\n await handle.writeFile(data);\n await handle.chmod(fileMode); // exact mode even under an unusual umask\n await handle.sync();\n } finally {\n await handle.close();\n }\n await link(tmpPath, targetPath); // atomic; throws EEXIST when the target exists\n await fsyncDir(dir);\n } finally {\n // On success the temp is now a redundant link to the target; on EEXIST it is\n // the orphaned write. Either way remove it before returning/throwing.\n await rm(tmpPath, { force: true }).catch(() => undefined);\n }\n}\n\n/** fsync a directory so a freshly linked entry is durable. Never call on win32. */\nexport async function fsyncDir(dir: string): Promise<void> {\n const handle = await open(dir, 'r');\n try {\n await handle.sync();\n } finally {\n await handle.close();\n }\n}\n","/**\n * Base USDC's address and one `balanceOf` over plain JSON-RPC. No viem on\n * purpose: the router hooks read a balance before they redirect a call, and\n * their chunk graph must stay free of it (`src/router/dist-chunks.test.ts`).\n * One `eth_call` needs nothing viem adds. `usdc.ts` keeps the viem client for\n * the send path and re-exports the address from here.\n */\n\nimport { readFile } from 'node:fs/promises';\nimport { writeFileAtomic } from './atomic-json';\nimport { balanceCachePath } from './paths';\n\n// Values mirror the app's lib/chain.ts Base mainnet entry (chain 8453).\nexport const USDC_ADDRESS = '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913';\n\n/** `balanceOf(address)`: the first four bytes of its keccak-256. */\nconst BALANCE_OF_SELECTOR = '0x70a08231';\nconst ADDRESS_RE = /^0x[0-9a-fA-F]{40}$/;\n/** One ABI word: what `balanceOf` returns. */\nconst WORD_RE = /^0x[0-9a-fA-F]{64}$/;\n\n/**\n * The address's USDC balance in atomic units, or null when it could not be\n * read inside `timeoutMs`: a transport failure, a non-2xx, an RPC error, or an\n * answer that is not one word. Never throws, so the caller picks which way an\n * unreadable balance falls.\n */\nexport async function readUsdcBalance(\n address: string,\n rpcUrl: string,\n opts: { timeoutMs: number; fetchImpl?: typeof fetch },\n): Promise<bigint | null> {\n if (!ADDRESS_RE.test(address) || opts.timeoutMs <= 0) return null;\n try {\n const res = await (opts.fetchImpl ?? fetch)(rpcUrl, {\n method: 'POST',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify({\n jsonrpc: '2.0',\n id: 1,\n method: 'eth_call',\n params: [\n {\n to: USDC_ADDRESS,\n data: `${BALANCE_OF_SELECTOR}${address.slice(2).toLowerCase().padStart(64, '0')}`,\n },\n 'latest',\n ],\n }),\n signal: AbortSignal.timeout(opts.timeoutMs),\n });\n if (!res.ok) return null;\n const result = ((await res.json()) as { result?: unknown } | null)?.result;\n return typeof result === 'string' && WORD_RE.test(result) ? BigInt(result) : null;\n } catch {\n return null;\n }\n}\n\n/** Base's public RPC: the shipped `rpcUrl` default (`CONFIG_DEFAULTS`). */\nexport const DEFAULT_RPC_URL = 'https://mainnet.base.org';\n\n/**\n * Public Base RPCs a balance read on the DEFAULT `rpcUrl` falls back to, in\n * order, only after it fails. mainnet.base.org rate-limits a busy IP\n * (`-32016 over rate limit`): four paid lookups across two research runs were\n * refused with `balance_unavailable` before signing, while these two answered\n * every read. They see the wallet's address only when the default did not\n * answer, as the default sees it on every read.\n */\nexport const FALLBACK_RPC_URLS: readonly string[] = [\n 'https://base-rpc.publicnode.com',\n 'https://base.drpc.org',\n];\n\n/**\n * {@link readUsdcBalance} from `rpcUrl` first and, when that is the default,\n * then from each of {@link FALLBACK_RPC_URLS} until one answers, all inside the\n * one `timeoutMs`. Every RPC but the last gets half of what is left, so one\n * that hangs still leaves the others time to answer.\n *\n * AN RPC THE USER CONFIGURED IS THE ONLY ONE ASKED. Choosing one can be about\n * privacy, and the public RPCs would see the wallet's address; a read that\n * fails there fails, as it did before the fallbacks.\n */\nexport async function readUsdcBalanceWithFallback(\n address: string,\n rpcUrl: string,\n opts: { timeoutMs: number; fetchImpl?: typeof fetch },\n): Promise<bigint | null> {\n const urls = sameUrl(rpcUrl, DEFAULT_RPC_URL) ? [rpcUrl, ...FALLBACK_RPC_URLS] : [rpcUrl];\n const deadline = Date.now() + opts.timeoutMs;\n for (const [index, url] of urls.entries()) {\n const left = deadline - Date.now();\n if (left <= 0) return null;\n const timeoutMs = index === urls.length - 1 ? left : Math.ceil(left / 2);\n const balance = await readUsdcBalance(address, url, { ...opts, timeoutMs });\n if (balance !== null) return balance;\n }\n return null;\n}\n\nfunction sameUrl(a: string, b: string): boolean {\n try {\n return new URL(a).href === new URL(b).href;\n } catch {\n return a === b;\n }\n}\n\n/**\n * How long the hooks remember a balance read. Base's public RPC refuses the\n * sixth `eth_call` in a second, which a burst of parallel lookups reaches, and\n * each hook then waited on a failed read. A minute carries a burst past that;\n * the hooks' read only decides whether to offer.\n */\nexport const LAST_KNOWN_BALANCE_MS = 60_000;\n\n/**\n * {@link readUsdcBalanceWithFallback} for the router hooks, which returns the\n * last read it made for this address while it is under\n * {@link LAST_KNOWN_BALANCE_MS} old, without asking an RPC, and reads the chain\n * otherwise. A read that fails on every RPC is null, never the remembered\n * balance. The RPC URL is never stored, since it can embed a key.\n *\n * NEVER FOR A PAYMENT. `tenjin pay` reads the signer's balance live\n * immediately before signing (docs/agent-permissions.md): a minute-old balance\n * can be one the wallet has since spent.\n */\nexport function rememberingBalanceReader(\n dataDir: string,\n opts: { now?: () => number; read?: typeof readUsdcBalance } = {},\n): typeof readUsdcBalance {\n const read = opts.read ?? readUsdcBalanceWithFallback;\n const now = opts.now ?? Date.now;\n const path = balanceCachePath(dataDir);\n return async (address, rpcUrl, readOpts) => {\n const remembered = await recallBalance(path, address, now());\n if (remembered !== null) return remembered;\n const live = await read(address, rpcUrl, readOpts);\n if (live === null) return null;\n const record = {\n version: 1,\n address: address.toLowerCase(),\n atomic: live.toString(),\n at: now(),\n };\n try {\n await writeFileAtomic(path, JSON.stringify(record), { mode: 0o600, dirMode: 0o700 });\n } catch {\n // A cache that cannot be written is a cache that is not used.\n }\n return live;\n };\n}\n\n/** The remembered balance for this address while it is fresh, else null. */\nasync function recallBalance(path: string, address: string, now: number): Promise<bigint | null> {\n try {\n const row = JSON.parse(await readFile(path, 'utf8')) as Record<string, unknown> | null;\n if (\n row?.version !== 1 ||\n row.address !== address.toLowerCase() ||\n typeof row.atomic !== 'string' ||\n !/^\\d{1,40}$/.test(row.atomic) ||\n typeof row.at !== 'number' ||\n now - row.at < 0 ||\n now - row.at > LAST_KNOWN_BALANCE_MS\n ) {\n return null;\n }\n return BigInt(row.atomic);\n } catch {\n return null;\n }\n}\n"],"mappings":";;;;;;AAAA,SAAS,OAAO,MAAM,OAAO,MAAM,QAAQ,IAAI,iBAAiB;AAChE,SAAS,mBAAmB;AAC5B,SAAS,UAAU,SAAS,YAAY;AAGxC,IAAM,YAAY,QAAQ,aAAa;AAqBvC,eAAsB,gBACpB,YACA,MACA,OAA2B,CAAC,GACb;AACf,QAAM,MAAM,QAAQ,UAAU;AAC9B,QAAM,WAAW,KAAK,QAAQ;AAC9B,QAAM,UAAU,KAAK,WAAW;AAEhC,QAAM,MAAM,KAAK,EAAE,WAAW,MAAM,GAAI,YAAY,CAAC,IAAI,EAAE,MAAM,QAAQ,EAAG,CAAC;AAE7E,QAAM,UAAU,KAAK,KAAK,IAAI,SAAS,UAAU,CAAC,IAAI,YAAY,CAAC,EAAE,SAAS,KAAK,CAAC,MAAM;AAC1F,MAAI;AACF,UAAM,UAAU,SAAS,MAAM,YAAY,SAAY,EAAE,MAAM,SAAS,CAAC;AACzE,QAAI,CAAC,UAAW,OAAM,MAAM,SAAS,QAAQ;AAC7C,UAAM,OAAO,SAAS,UAAU;AAAA,EAClC,SAAS,KAAK;AACZ,UAAM,GAAG,SAAS,EAAE,OAAO,KAAK,CAAC,EAAE,MAAM,MAAM,MAAS;AACxD,UAAM;AAAA,EACR;AACF;AAkBA,eAAsB,yBACpB,YACA,MACA,OAA2B,CAAC,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}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
resolvePublicDestination
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EBVIKMCH.js";
|
|
5
5
|
import {
|
|
6
6
|
releaseUnchargedExposure
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AEG2PXBP.js";
|
|
8
8
|
import {
|
|
9
9
|
withFileLock
|
|
10
10
|
} from "./chunk-MEFB5KHA.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
USDC_ADDRESS,
|
|
19
19
|
writeFileAtomic
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-O2FRQ2L2.js";
|
|
21
21
|
import {
|
|
22
22
|
downloadsDir,
|
|
23
23
|
paidLedgerPath
|
|
@@ -401,4 +401,4 @@ export {
|
|
|
401
401
|
writeAll,
|
|
402
402
|
createUniqueFile
|
|
403
403
|
};
|
|
404
|
-
//# sourceMappingURL=chunk-
|
|
404
|
+
//# sourceMappingURL=chunk-OK2TDZQU.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
createLocalSpendAuthorizer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AEG2PXBP.js";
|
|
5
5
|
import {
|
|
6
6
|
emitNotice
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KYFZTGMC.js";
|
|
8
8
|
import {
|
|
9
9
|
hashAuthorization,
|
|
10
10
|
hashMessage,
|
|
@@ -51,11 +51,13 @@ import {
|
|
|
51
51
|
} from "./chunk-2I4QTOLB.js";
|
|
52
52
|
import {
|
|
53
53
|
CliError,
|
|
54
|
-
external_exports
|
|
54
|
+
external_exports
|
|
55
|
+
} from "./chunk-WO5BJNIB.js";
|
|
56
|
+
import {
|
|
55
57
|
fsyncDir,
|
|
56
58
|
writeFileAtomic,
|
|
57
59
|
writeFileAtomicExclusive
|
|
58
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-O2FRQ2L2.js";
|
|
59
61
|
import {
|
|
60
62
|
archivedWalletPath,
|
|
61
63
|
passphraseBlobPath,
|
|
@@ -1676,4 +1678,4 @@ export {
|
|
|
1676
1678
|
@noble/ciphers/esm/utils.js:
|
|
1677
1679
|
(*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) *)
|
|
1678
1680
|
*/
|
|
1679
|
-
//# sourceMappingURL=chunk-
|
|
1681
|
+
//# sourceMappingURL=chunk-OSYTBCUC.js.map
|