tenjin-cli 0.1.0-alpha.30 → 0.1.0-alpha.31
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 +65 -116
- package/dist/{_esm-CE7KNONL.js → _esm-MEXZI5DL.js} +4 -4
- package/dist/{alive-3J3CHOQP.js → alive-J64H46HI.js} +14 -4
- package/dist/{chunk-O2FRQ2L2.js → chunk-27EPWVOY.js} +4 -64
- package/dist/chunk-27EPWVOY.js.map +1 -0
- package/dist/{chunk-OSYTBCUC.js → chunk-2XLC3AEX.js} +16 -14
- package/dist/{chunk-OSYTBCUC.js.map → chunk-2XLC3AEX.js.map} +1 -1
- package/dist/chunk-3623BLPV.js +184 -0
- package/dist/chunk-3623BLPV.js.map +1 -0
- package/dist/chunk-3UCIG4TG.js +65 -0
- package/dist/chunk-3UCIG4TG.js.map +1 -0
- package/dist/{chunk-PAYV4XUA.js → chunk-4ZZO6ULA.js} +2 -2
- package/dist/{chunk-VUFAK2LW.js → chunk-5C32RLTA.js} +2 -2
- package/dist/{chunk-VUFAK2LW.js.map → chunk-5C32RLTA.js.map} +1 -1
- package/dist/{chunk-YHKXNYTB.js → chunk-5K5W4S66.js} +2 -2
- package/dist/{chunk-3O2BQIF6.js → chunk-5MARFNSB.js} +273 -482
- package/dist/chunk-5MARFNSB.js.map +1 -0
- package/dist/{chunk-HPWO4O6S.js → chunk-6E5R45ZO.js} +2 -2
- package/dist/{chunk-JMM6YE7J.js → chunk-77TCKDEC.js} +125 -312
- package/dist/chunk-77TCKDEC.js.map +1 -0
- package/dist/{chunk-LFZJM56J.js → chunk-7Q5FDF65.js} +2 -2
- package/dist/chunk-7WEQQJLG.js +68 -0
- package/dist/chunk-7WEQQJLG.js.map +1 -0
- package/dist/{chunk-AWFUPKTM.js → chunk-7WU4OPLP.js} +12 -6
- package/dist/{chunk-AWFUPKTM.js.map → chunk-7WU4OPLP.js.map} +1 -1
- package/dist/{chunk-AEG2PXBP.js → chunk-7ZRL2LBQ.js} +3 -3
- package/dist/{chunk-IOODYAXL.js → chunk-AGZ7PJKY.js} +6 -4
- package/dist/{chunk-IOODYAXL.js.map → chunk-AGZ7PJKY.js.map} +1 -1
- package/dist/{chunk-VFMQTSXG.js → chunk-B7HUUJOK.js} +3 -3
- package/dist/{chunk-EL56RW2J.js → chunk-BL3332HQ.js} +7 -7
- package/dist/{chunk-5LJCEMFD.js → chunk-D65GNPS3.js} +35 -27
- package/dist/{chunk-5LJCEMFD.js.map → chunk-D65GNPS3.js.map} +1 -1
- package/dist/{chunk-P7LABKCW.js → chunk-DOQGNFHM.js} +33 -2
- package/dist/{chunk-P7LABKCW.js.map → chunk-DOQGNFHM.js.map} +1 -1
- package/dist/{chunk-OK2TDZQU.js → chunk-FW75G2W4.js} +7 -5
- package/dist/chunk-FW75G2W4.js.map +1 -0
- package/dist/chunk-GA7JETVM.js +150 -0
- package/dist/chunk-GA7JETVM.js.map +1 -0
- package/dist/{chunk-6W5GYG3W.js → chunk-I3EQFHCD.js} +48 -1
- package/dist/chunk-I3EQFHCD.js.map +1 -0
- package/dist/{chunk-EBVIKMCH.js → chunk-JKKAIPTU.js} +2 -2
- package/dist/{chunk-N35E6CM2.js → chunk-K3I7C2MO.js} +6 -6
- package/dist/{chunk-KYFZTGMC.js → chunk-K72RURN3.js} +5 -3
- package/dist/{chunk-KYFZTGMC.js.map → chunk-K72RURN3.js.map} +1 -1
- package/dist/{chunk-RAULEAZ6.js → chunk-KXQ4UIP7.js} +3 -3
- package/dist/{chunk-VZGAONSJ.js → chunk-KXVP2VKA.js} +5 -5
- package/dist/chunk-LEFIX6RS.js +100 -0
- package/dist/chunk-LEFIX6RS.js.map +1 -0
- package/dist/{chunk-TTBKWWTV.js → chunk-MNXS2U45.js} +246 -83
- package/dist/chunk-MNXS2U45.js.map +1 -0
- package/dist/{chunk-AWQPGIR6.js → chunk-NEFNKLBE.js} +5 -5
- package/dist/chunk-OHRR5OYM.js +63 -0
- package/dist/chunk-OHRR5OYM.js.map +1 -0
- package/dist/{chunk-U6YQ6FRI.js → chunk-P4NH7OUK.js} +31 -11
- package/dist/chunk-P4NH7OUK.js.map +1 -0
- package/dist/chunk-QSCPK4F5.js +145 -0
- package/dist/chunk-QSCPK4F5.js.map +1 -0
- package/dist/chunk-QXP3Z3JN.js +131 -0
- package/dist/chunk-QXP3Z3JN.js.map +1 -0
- package/dist/{chunk-YFQOA5AU.js → chunk-R5LCN54M.js} +4 -4
- package/dist/{chunk-KHE6L6TD.js → chunk-UKY4CHNC.js} +92 -10
- package/dist/chunk-UKY4CHNC.js.map +1 -0
- package/dist/{chunk-QUVVWYJW.js → chunk-UQUOVWBG.js} +8 -6
- package/dist/{chunk-QUVVWYJW.js.map → chunk-UQUOVWBG.js.map} +1 -1
- package/dist/{chunk-HE2MS4QO.js → chunk-V6BSF6OC.js} +17 -13
- package/dist/{chunk-HE2MS4QO.js.map → chunk-V6BSF6OC.js.map} +1 -1
- package/dist/{chunk-WVUSXNIE.js → chunk-WJXLQXJY.js} +6 -2
- package/dist/{chunk-WVUSXNIE.js.map → chunk-WJXLQXJY.js.map} +1 -1
- package/dist/{chunk-NZIP4PA2.js → chunk-WK7F3B2E.js} +2 -2
- package/dist/chunk-XQJXNMSB.js +23 -0
- package/dist/chunk-XQJXNMSB.js.map +1 -0
- package/dist/chunk-Y527D4TV.js +56 -0
- package/dist/chunk-Y527D4TV.js.map +1 -0
- package/dist/{chunk-SPAVAYSW.js → chunk-YFPY4ONH.js} +6 -4
- package/dist/{chunk-SPAVAYSW.js.map → chunk-YFPY4ONH.js.map} +1 -1
- package/dist/{chunk-WO5BJNIB.js → chunk-YVFXE7RR.js} +9 -129
- package/dist/chunk-YVFXE7RR.js.map +1 -0
- package/dist/clack-EZ7TDWQU.js +19 -0
- package/dist/claude-cli-2YKABJJZ.js +31 -0
- package/dist/{cli-O5SN7ZJ4.js → cli-D5OE3URZ.js} +128 -56
- package/dist/{cli-O5SN7ZJ4.js.map → cli-D5OE3URZ.js.map} +1 -1
- package/dist/codex-event-PPNVRRDH.js +16 -0
- package/dist/codex-host-2RJOJW2B.js +28 -0
- package/dist/codex-install-UUZ6QMBQ.js +221 -0
- package/dist/codex-install-UUZ6QMBQ.js.map +1 -0
- package/dist/{config-OJQI27LT.js → config-ZD4OB2DO.js} +18 -12
- package/dist/{doctor-IQQJHGGM.js → doctor-KBR34Q4B.js} +48 -37
- package/dist/doctor-KBR34Q4B.js.map +1 -0
- package/dist/{fund-WEV6DMTD.js → fund-5ITKQGYF.js} +38 -31
- package/dist/{fund-WEV6DMTD.js.map → fund-5ITKQGYF.js.map} +1 -1
- package/dist/hook-command-4TYCHHRL.js +39 -0
- package/dist/hosts/claude/.claude-plugin/marketplace.json +2 -2
- package/dist/hosts/claude/tenjin/.claude-plugin/plugin.json +3 -2
- package/dist/hosts/claude/tenjin/hooks/hooks.json +4 -1
- package/dist/hosts/claude/tenjin/hooks/register.tsx +589 -0
- package/dist/hosts/claude/tenjin/types/index.d.ts +41 -0
- package/dist/hosts/codex/.agents/plugins/marketplace.json +20 -0
- package/dist/hosts/codex/tenjin/.codex-plugin/plugin.json +16 -0
- package/dist/hosts/codex/tenjin/.mcp.json +12 -0
- package/dist/hosts/codex/tenjin/hooks/hooks.json +52 -0
- package/dist/hosts-FWZOV26H.js +216 -0
- package/dist/hosts-FWZOV26H.js.map +1 -0
- package/dist/index.js +5 -5
- package/dist/{install-TUCRF32I.js → install-XWGE4Q7L.js} +38 -21
- package/dist/{install-identity-WHPNMNMQ.js → install-identity-K7EJIQFP.js} +11 -7
- package/dist/{install-wallet-MA27FTQ5.js → install-wallet-XQ6XFZV4.js} +27 -23
- package/dist/{install-wallet-MA27FTQ5.js.map → install-wallet-XQ6XFZV4.js.map} +1 -1
- package/dist/{mcp-QML7ZMPH.js → mcp-3LIJSSJB.js} +184 -58
- package/dist/mcp-3LIJSSJB.js.map +1 -0
- package/dist/{package-LGKYOEPV.js → package-ZKQFDWLE.js} +2 -2
- package/dist/{pay-2C2UBBXJ.js → pay-WHBERZ3W.js} +27 -23
- package/dist/{payments-C44QUFXU.js → payments-KVICEKD2.js} +14 -10
- package/dist/{payments-C44QUFXU.js.map → payments-KVICEKD2.js.map} +1 -1
- package/dist/plugin-registration-5TIA564H.js +54 -0
- package/dist/plugin-registration-5TIA564H.js.map +1 -0
- package/dist/{send-KVJX4XIR.js → send-7G7Y7DLN.js} +25 -19
- package/dist/{send-KVJX4XIR.js.map → send-7G7Y7DLN.js.map} +1 -1
- package/dist/{status-S7C3WMSH.js → status-OF7RH5HM.js} +26 -21
- package/dist/{status-S7C3WMSH.js.map → status-OF7RH5HM.js.map} +1 -1
- package/dist/{status-line-YR2T5HC4.js → status-line-XOUE6MPL.js} +10 -6
- package/dist/{status-line-YR2T5HC4.js.map → status-line-XOUE6MPL.js.map} +1 -1
- package/dist/{uninstall-HY6LKIIT.js → uninstall-JXUAFNDB.js} +30 -21
- package/dist/{uninstall-HY6LKIIT.js.map → uninstall-JXUAFNDB.js.map} +1 -1
- package/dist/update-ZKUERSO2.js +44 -0
- package/dist/update-ZKUERSO2.js.map +1 -0
- package/dist/{usdc-JK4RRFFQ.js → usdc-OGOGEHV2.js} +7 -6
- package/dist/usdc-OGOGEHV2.js.map +1 -0
- package/dist/{viemAdapter-By13KInL-X2VY6CY3.js → viemAdapter-By13KInL-S3DA7DFW.js} +2 -2
- package/dist/viemAdapter-By13KInL-S3DA7DFW.js.map +1 -0
- package/dist/{wallet-PD2IMZDU.js → wallet-2HA6W4R4.js} +24 -20
- package/dist/wallet-2HA6W4R4.js.map +1 -0
- package/docs/agent-permissions.md +21 -5
- package/package.json +1 -1
- package/dist/chunk-3O2BQIF6.js.map +0 -1
- package/dist/chunk-6W5GYG3W.js.map +0 -1
- package/dist/chunk-JMM6YE7J.js.map +0 -1
- package/dist/chunk-KHE6L6TD.js.map +0 -1
- package/dist/chunk-O2FRQ2L2.js.map +0 -1
- package/dist/chunk-OK2TDZQU.js.map +0 -1
- package/dist/chunk-TTBKWWTV.js.map +0 -1
- package/dist/chunk-U6YQ6FRI.js.map +0 -1
- package/dist/chunk-WO5BJNIB.js.map +0 -1
- package/dist/doctor-IQQJHGGM.js.map +0 -1
- package/dist/hook-command-D2P3ILRV.js +0 -32
- package/dist/mcp-QML7ZMPH.js.map +0 -1
- package/dist/update-OJV22LR3.js +0 -36
- /package/dist/{_esm-CE7KNONL.js.map → _esm-MEXZI5DL.js.map} +0 -0
- /package/dist/{alive-3J3CHOQP.js.map → alive-J64H46HI.js.map} +0 -0
- /package/dist/{chunk-PAYV4XUA.js.map → chunk-4ZZO6ULA.js.map} +0 -0
- /package/dist/{chunk-YHKXNYTB.js.map → chunk-5K5W4S66.js.map} +0 -0
- /package/dist/{chunk-HPWO4O6S.js.map → chunk-6E5R45ZO.js.map} +0 -0
- /package/dist/{chunk-LFZJM56J.js.map → chunk-7Q5FDF65.js.map} +0 -0
- /package/dist/{chunk-AEG2PXBP.js.map → chunk-7ZRL2LBQ.js.map} +0 -0
- /package/dist/{chunk-VFMQTSXG.js.map → chunk-B7HUUJOK.js.map} +0 -0
- /package/dist/{chunk-EL56RW2J.js.map → chunk-BL3332HQ.js.map} +0 -0
- /package/dist/{chunk-EBVIKMCH.js.map → chunk-JKKAIPTU.js.map} +0 -0
- /package/dist/{chunk-N35E6CM2.js.map → chunk-K3I7C2MO.js.map} +0 -0
- /package/dist/{chunk-RAULEAZ6.js.map → chunk-KXQ4UIP7.js.map} +0 -0
- /package/dist/{chunk-VZGAONSJ.js.map → chunk-KXVP2VKA.js.map} +0 -0
- /package/dist/{chunk-AWQPGIR6.js.map → chunk-NEFNKLBE.js.map} +0 -0
- /package/dist/{chunk-YFQOA5AU.js.map → chunk-R5LCN54M.js.map} +0 -0
- /package/dist/{chunk-NZIP4PA2.js.map → chunk-WK7F3B2E.js.map} +0 -0
- /package/dist/{config-OJQI27LT.js.map → clack-EZ7TDWQU.js.map} +0 -0
- /package/dist/{hook-command-D2P3ILRV.js.map → claude-cli-2YKABJJZ.js.map} +0 -0
- /package/dist/{install-TUCRF32I.js.map → codex-event-PPNVRRDH.js.map} +0 -0
- /package/dist/{install-identity-WHPNMNMQ.js.map → codex-host-2RJOJW2B.js.map} +0 -0
- /package/dist/{package-LGKYOEPV.js.map → config-ZD4OB2DO.js.map} +0 -0
- /package/dist/{pay-2C2UBBXJ.js.map → hook-command-4TYCHHRL.js.map} +0 -0
- /package/dist/{update-OJV22LR3.js.map → install-XWGE4Q7L.js.map} +0 -0
- /package/dist/{usdc-JK4RRFFQ.js.map → install-identity-K7EJIQFP.js.map} +0 -0
- /package/dist/{viemAdapter-By13KInL-X2VY6CY3.js.map → package-ZKQFDWLE.js.map} +0 -0
- /package/dist/{wallet-PD2IMZDU.js.map → pay-WHBERZ3W.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/router/uninstall.ts"],"sourcesContent":["import { homedir } from 'node:os';\nimport { isAbsolute } from 'node:path';\nimport { persistRouterProject } from '../commands/config';\nimport type { CommandContext, CommandResult } from '../context';\nimport { removeAliveState } from './alive';\nimport { findClaudeBinary, jsonList, jsonResult, runClaude, type ClaudeBinary } from './claude-cli';\nimport { projectInstallHere, settingsInstallPaths } from './install';\nimport { inspectLegacyInstall, removeLegacyInstall, type LegacyRemoval } from './legacy-install';\nimport { MARKETPLACE_NAME, PLUGIN_ID } from './names';\nimport { removePluginFolder, type FolderRemoval } from './plugin-folder';\nimport { folderFor, ownMarketplace, type PluginScope } from './plugin-registration';\n\n/**\n * `tenjin uninstall`: take out the plugin and anything a settings install of\n * an earlier release left, and nothing else.\n *\n * THE PLUGIN goes through Claude Code's own commands (`claude plugin\n * uninstall`, then `claude plugin marketplace remove` for the marketplace\n * `install` added), and a plugin folder of ours loses its listed files. The\n * settings install's hook entries, rules, status line and `x402` server go\n * under the exact-shape rules of `legacy-install.ts`.\n *\n * THE WALLET AND `spend.json` STAY. Removing an integration is not a reason to\n * destroy a key that holds funds or a ledger that records what was spent; both\n * are the user's, and `tenjin wallet` is where they go to move either.\n */\n\nexport interface RouterUninstallArgs {\n project?: boolean;\n}\n\nexport interface RouterUninstallDeps {\n homeDir?: string;\n cwd?: string;\n env?: NodeJS.ProcessEnv;\n findClaude?: (env: NodeJS.ProcessEnv) => ClaudeBinary | null;\n}\n\nexport interface PluginRemoval {\n /** `removed`, `absent` (it was not installed), or `kept` with the reason. */\n plugin: 'removed' | 'absent' | 'kept';\n marketplace: 'removed' | 'absent' | 'kept';\n folder: FolderRemoval;\n reason?: string;\n}\n\nexport async function runRouterUninstall(\n args: RouterUninstallArgs,\n ctx: CommandContext,\n deps: RouterUninstallDeps = {},\n): Promise<CommandResult> {\n const env = deps.env ?? process.env;\n const home = deps.homeDir ?? homedir();\n if (!isAbsolute(home)) throw new Error('The home directory is not an absolute path.');\n const cwd = deps.cwd ?? process.cwd();\n const project = args.project === true;\n const scope: PluginScope = project ? 'local' : 'user';\n const binary = (deps.findClaude ?? findClaudeBinary)(env);\n\n const plugin = await removePlugin(binary, scope, env, home, cwd);\n const paths = settingsInstallPaths(project, env, home, cwd);\n const legacy = await inspectLegacyInstall(paths.settingsPath, paths.mcpFile);\n const settings: LegacyRemoval | null = legacy.present\n ? await removeLegacyInstall(legacy, { binary, env, cwd, mcpScope: paths.mcpScope })\n : null;\n const alive = await removeAliveState(ctx.dataDir);\n // Forgotten, so a later `tenjin update` does not go looking for a project\n // this machine no longer wires.\n if (project) await persistRouterProject(ctx.dataDir, cwd, false).catch(() => undefined);\n // A BARE UNINSTALL TOUCHES USER SCOPE ONLY: a project install here is left,\n // and said to be, with the command that removes it.\n const projectLeft = !project && (await projectInstallHere(cwd, home, env));\n const data = {\n plugin,\n settings: { path: paths.settingsPath, found: legacy.present, removed: settings },\n aliveRemoved: alive,\n ...(projectLeft ? { projectInstallLeft: cwd } : {}),\n kept: ['wallet.json', 'spend.json', 'config.json'],\n };\n const lines = uninstallLines(plugin, paths.settingsPath, settings);\n if (projectLeft) {\n lines.splice(\n -1,\n 0,\n 'This project has its own Tenjin install, which this left in place; `tenjin uninstall --project` here removes it.',\n );\n }\n return { data, humanLines: lines };\n}\n\nasync function removePlugin(\n binary: ClaudeBinary | null,\n scope: PluginScope,\n env: NodeJS.ProcessEnv,\n home: string,\n cwd: string,\n): Promise<PluginRemoval> {\n const folder = await removePluginFolder(folderFor(scope, env, home, cwd));\n if (binary === null) {\n return {\n plugin: 'kept',\n marketplace: 'kept',\n folder,\n reason: `no claude binary on PATH or in CLAUDE_CODE_EXECPATH, so ${PLUGIN_ID} could not be checked; if Claude Code still lists it, type /plugin uninstall ${PLUGIN_ID} in a Claude Code session`,\n };\n }\n const run = (a: string[]) => runClaude(binary, a, { env, cwd });\n const uninstall = await run(['plugin', 'uninstall', PLUGIN_ID, '--scope', scope, '--json']);\n const result = jsonResult(uninstall.stdout);\n const pluginState: PluginRemoval['plugin'] =\n uninstall.code === 0 ? 'removed' : result?.failureCode === 'not_installed' ? 'absent' : 'kept';\n // THE MARKETPLACE GOES ONLY WHEN IT IS THE ONE `install` ADDED. A marketplace\n // of the same name from anywhere else is somebody else's.\n const listed = jsonList((await run(['plugin', 'marketplace', 'list', '--json'])).stdout) ?? [];\n const row = listed.find((m) => m.name === MARKETPLACE_NAME);\n let marketplace: PluginRemoval['marketplace'] = 'absent';\n if (row !== undefined) {\n if (await ownMarketplace(row)) {\n // Named only for a project install, as `install` added it.\n const scoped = scope === 'user' ? [] : ['--scope', scope];\n const removed = await run([\n 'plugin',\n 'marketplace',\n 'remove',\n MARKETPLACE_NAME,\n ...scoped,\n '--json',\n ]);\n marketplace = removed.code === 0 ? 'removed' : 'kept';\n } else marketplace = 'kept';\n }\n const message =\n typeof result?.message === 'string' ? result.message : uninstall.stderr.trim().slice(0, 200);\n return {\n plugin: pluginState,\n marketplace,\n folder,\n ...(pluginState === 'kept'\n ? { reason: `claude plugin uninstall did not succeed: ${message}` }\n : {}),\n };\n}\n\nfunction uninstallLines(\n plugin: PluginRemoval,\n settingsPath: string,\n settings: LegacyRemoval | null,\n): string[] {\n const lines: string[] = [\n plugin.plugin === 'removed'\n ? `removed the ${PLUGIN_ID} plugin`\n : plugin.plugin === 'absent'\n ? `plugin: ${PLUGIN_ID} was not installed`\n : `plugin: ${plugin.reason ?? 'left in place'}`,\n ];\n if (plugin.marketplace === 'removed') lines.push(`removed the ${MARKETPLACE_NAME} marketplace`);\n if (plugin.folder.removed) {\n lines.push(\n plugin.folder.left.length === 0\n ? `removed the plugin folder ${plugin.folder.path}`\n : `removed the plugin's files from ${plugin.folder.path}; kept what is not Tenjin's: ${plugin.folder.left.join(', ')}`,\n );\n } else if (plugin.folder.reason !== undefined) lines.push(`folder: ${plugin.folder.reason}`);\n if (settings !== null) {\n const parts = [\n ...(settings.events.length > 0 ? [`hook entries (${settings.events.join(', ')})`] : []),\n ...(settings.allowRule || settings.denyRule ? ['the permission rules'] : []),\n ...(settings.statusLine !== 'kept' ? ['the status line'] : []),\n ...(settings.mcp === 'removed' ? ['the x402 MCP server'] : []),\n ];\n if (parts.length > 0) {\n lines.push(`removed the settings install's ${parts.join(', ')} from ${settingsPath}`);\n }\n lines.push(...settings.warnings.map((w) => `settings: ${w}`));\n }\n lines.push('Your wallet, spend ledger and config are kept.');\n return lines;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,eAAe;AACxB,SAAS,kBAAkB;AA6C3B,eAAsB,mBACpB,MACA,KACA,OAA4B,CAAC,GACL;AACxB,QAAM,MAAM,KAAK,OAAO,QAAQ;AAChC,QAAM,OAAO,KAAK,WAAW,QAAQ;AACrC,MAAI,CAAC,WAAW,IAAI,EAAG,OAAM,IAAI,MAAM,6CAA6C;AACpF,QAAM,MAAM,KAAK,OAAO,QAAQ,IAAI;AACpC,QAAM,UAAU,KAAK,YAAY;AACjC,QAAM,QAAqB,UAAU,UAAU;AAC/C,QAAM,UAAU,KAAK,cAAc,kBAAkB,GAAG;AAExD,QAAM,SAAS,MAAM,aAA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,KAC/C,mCAAmC,OAAO,OAAO,IAAI,gCAAgC,OAAO,OAAO,KAAK,KAAK,IAAI,CAAC;AAAA,IACxH;AAAA,EACF,WAAW,OAAO,OAAO,WAAW,OAAW,OAAM,KAAK,WAAW,OAAO,OAAO,MAAM,EAAE;AAC3F,MAAI,aAAa,MAAM;AACrB,UAAM,QAAQ;AAAA,MACZ,GAAI,SAAS,OAAO,SAAS,IAAI,CAAC,iBAAiB,SAAS,OAAO,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;AAAA,MACrF,GAAI,SAAS,aAAa,SAAS,WAAW,CAAC,sBAAsB,IAAI,CAAC;AAAA,MAC1E,GAAI,SAAS,eAAe,SAAS,CAAC,iBAAiB,IAAI,CAAC;AAAA,MAC5D,GAAI,SAAS,QAAQ,YAAY,CAAC,qBAAqB,IAAI,CAAC;AAAA,IAC9D;AACA,QAAI,MAAM,SAAS,GAAG;AACpB,YAAM,KAAK,kCAAkC,MAAM,KAAK,IAAI,CAAC,SAAS,YAAY,EAAE;AAAA,IACtF;AACA,UAAM,KAAK,GAAG,SAAS,SAAS,IAAI,CAAC,MAAM,aAAa,CAAC,EAAE,CAAC;AAAA,EAC9D;AACA,QAAM,KAAK,gDAAgD;AAC3D,SAAO;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/router/uninstall.ts"],"sourcesContent":["import { homedir } from 'node:os';\nimport { isAbsolute } from 'node:path';\nimport { persistRouterProject } from '../commands/config';\nimport type { CommandContext, CommandResult } from '../context';\nimport { removeAliveState } from './alive';\nimport { findClaudeBinary, jsonList, jsonResult, runClaude, type ClaudeBinary } from './claude-cli';\nimport { projectInstallHere, settingsInstallPaths } from './install';\nimport { inspectLegacyInstall, removeLegacyInstall, type LegacyRemoval } from './legacy-install';\nimport { MARKETPLACE_NAME, PLUGIN_ID } from './names';\nimport { removePluginFolder, type FolderRemoval } from './plugin-folder';\nimport { folderFor, ownMarketplace, type PluginScope } from './plugin-registration';\n\n/**\n * `tenjin uninstall`: take out the plugin and anything a settings install of\n * an earlier release left, and nothing else.\n *\n * THE PLUGIN goes through Claude Code's own commands (`claude plugin\n * uninstall`, then `claude plugin marketplace remove` for the marketplace\n * `install` added), and a plugin folder of ours loses its listed files. The\n * settings install's hook entries, rules, status line and `x402` server go\n * under the exact-shape rules of `legacy-install.ts`.\n *\n * THE WALLET AND `spend.json` STAY. Removing an integration is not a reason to\n * destroy a key that holds funds or a ledger that records what was spent; both\n * are the user's, and `tenjin wallet` is where they go to move either.\n */\n\nexport interface RouterUninstallArgs {\n project?: boolean;\n}\n\nexport interface RouterUninstallDeps {\n homeDir?: string;\n cwd?: string;\n env?: NodeJS.ProcessEnv;\n findClaude?: (env: NodeJS.ProcessEnv) => ClaudeBinary | null;\n}\n\nexport interface PluginRemoval {\n /** `removed`, `absent` (it was not installed), or `kept` with the reason. */\n plugin: 'removed' | 'absent' | 'kept';\n marketplace: 'removed' | 'absent' | 'kept';\n folder: FolderRemoval;\n reason?: string;\n}\n\nexport async function runRouterUninstall(\n args: RouterUninstallArgs,\n ctx: CommandContext,\n deps: RouterUninstallDeps = {},\n): Promise<CommandResult> {\n const env = deps.env ?? process.env;\n const home = deps.homeDir ?? homedir();\n if (!isAbsolute(home)) throw new Error('The home directory is not an absolute path.');\n const cwd = deps.cwd ?? process.cwd();\n const project = args.project === true;\n const scope: PluginScope = project ? 'local' : 'user';\n const binary = (deps.findClaude ?? findClaudeBinary)(env);\n\n const plugin = await removePlugin(binary, scope, env, home, cwd);\n const paths = settingsInstallPaths(project, env, home, cwd);\n const legacy = await inspectLegacyInstall(paths.settingsPath, paths.mcpFile);\n const settings: LegacyRemoval | null = legacy.present\n ? await removeLegacyInstall(legacy, { binary, env, cwd, mcpScope: paths.mcpScope })\n : null;\n const alive = await removeAliveState(ctx.dataDir);\n // Forgotten, so a later `tenjin update` does not go looking for a project\n // this machine no longer wires.\n if (project) await persistRouterProject(ctx.dataDir, cwd, false).catch(() => undefined);\n // A BARE UNINSTALL TOUCHES USER SCOPE ONLY: a project install here is left,\n // and said to be, with the command that removes it.\n const projectLeft = !project && (await projectInstallHere(cwd, home, env));\n const data = {\n plugin,\n settings: { path: paths.settingsPath, found: legacy.present, removed: settings },\n aliveRemoved: alive,\n ...(projectLeft ? { projectInstallLeft: cwd } : {}),\n kept: ['wallet.json', 'spend.json', 'config.json'],\n };\n const lines = uninstallLines(plugin, paths.settingsPath, settings);\n if (projectLeft) {\n lines.splice(\n -1,\n 0,\n 'This project has its own Tenjin install, which this left in place; `tenjin uninstall --project` here removes it.',\n );\n }\n return { data, humanLines: lines };\n}\n\nasync function removePlugin(\n binary: ClaudeBinary | null,\n scope: PluginScope,\n env: NodeJS.ProcessEnv,\n home: string,\n cwd: string,\n): Promise<PluginRemoval> {\n const folder = await removePluginFolder(folderFor(scope, env, home, cwd));\n if (binary === null) {\n return {\n plugin: 'kept',\n marketplace: 'kept',\n folder,\n reason: `no claude binary on PATH or in CLAUDE_CODE_EXECPATH, so ${PLUGIN_ID} could not be checked; if Claude Code still lists it, type /plugin uninstall ${PLUGIN_ID} in a Claude Code session`,\n };\n }\n const run = (a: string[]) => runClaude(binary, a, { env, cwd });\n const uninstall = await run(['plugin', 'uninstall', PLUGIN_ID, '--scope', scope, '--json']);\n const result = jsonResult(uninstall.stdout);\n const pluginState: PluginRemoval['plugin'] =\n uninstall.code === 0 ? 'removed' : result?.failureCode === 'not_installed' ? 'absent' : 'kept';\n // THE MARKETPLACE GOES ONLY WHEN IT IS THE ONE `install` ADDED. A marketplace\n // of the same name from anywhere else is somebody else's.\n const listed = jsonList((await run(['plugin', 'marketplace', 'list', '--json'])).stdout) ?? [];\n const row = listed.find((m) => m.name === MARKETPLACE_NAME);\n let marketplace: PluginRemoval['marketplace'] = 'absent';\n if (row !== undefined) {\n if (await ownMarketplace(row)) {\n // Named only for a project install, as `install` added it.\n const scoped = scope === 'user' ? [] : ['--scope', scope];\n const removed = await run([\n 'plugin',\n 'marketplace',\n 'remove',\n MARKETPLACE_NAME,\n ...scoped,\n '--json',\n ]);\n marketplace = removed.code === 0 ? 'removed' : 'kept';\n } else marketplace = 'kept';\n }\n const message =\n typeof result?.message === 'string' ? result.message : uninstall.stderr.trim().slice(0, 200);\n return {\n plugin: pluginState,\n marketplace,\n folder,\n ...(pluginState === 'kept'\n ? { reason: `claude plugin uninstall did not succeed: ${message}` }\n : {}),\n };\n}\n\nfunction uninstallLines(\n plugin: PluginRemoval,\n settingsPath: string,\n settings: LegacyRemoval | null,\n): string[] {\n const lines: string[] = [\n plugin.plugin === 'removed'\n ? `removed the ${PLUGIN_ID} plugin`\n : plugin.plugin === 'absent'\n ? `plugin: ${PLUGIN_ID} was not installed`\n : `plugin: ${plugin.reason ?? 'left in place'}`,\n ];\n if (plugin.marketplace === 'removed') lines.push(`removed the ${MARKETPLACE_NAME} marketplace`);\n if (plugin.folder.removed) {\n lines.push(\n plugin.folder.left.length === 0\n ? `removed the plugin folder ${plugin.folder.path}`\n : `removed the plugin's files from ${plugin.folder.path}; kept what is not Tenjin's: ${plugin.folder.left.join(', ')}`,\n );\n } else if (plugin.folder.reason !== undefined) lines.push(`folder: ${plugin.folder.reason}`);\n if (settings !== null) {\n const parts = [\n ...(settings.events.length > 0 ? [`hook entries (${settings.events.join(', ')})`] : []),\n ...(settings.allowRule || settings.denyRule ? ['the permission rules'] : []),\n ...(settings.statusLine !== 'kept' ? ['the status line'] : []),\n ...(settings.mcp === 'removed' ? ['the x402 MCP server'] : []),\n ];\n if (parts.length > 0) {\n lines.push(`removed the settings install's ${parts.join(', ')} from ${settingsPath}`);\n }\n lines.push(...settings.warnings.map((w) => `settings: ${w}`));\n }\n lines.push('Your wallet, spend ledger and config are kept.');\n return lines;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,eAAe;AACxB,SAAS,kBAAkB;AA6C3B,eAAsB,mBACpB,MACA,KACA,OAA4B,CAAC,GACL;AACxB,QAAM,MAAM,K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AAAA,IACtB,OAAO,WAAW,YACd,eAAe,SAAS,YACxB,OAAO,WAAW,WAChB,WAAW,SAAS,uBACpB,WAAW,OAAO,UAAU,eAAe;AAAA,EACnD;AACA,MAAI,OAAO,gBAAgB,UAAW,OAAM,KAAK,eAAe,gBAAgB,cAAc;AAC9F,MAAI,OAAO,OAAO,SAAS;AACzB,UAAM;AAAA,MACJ,OAAO,OAAO,KAAK,WAAW,IAC1B,6BAA6B,OAAO,OAAO,IAAI,KAC/C,mCAAmC,OAAO,OAAO,IAAI,gCAAgC,OAAO,OAAO,KAAK,KAAK,IAAI,CAAC;AAAA,IACxH;AAAA,EACF,WAAW,OAAO,OAAO,WAAW,OAAW,OAAM,KAAK,WAAW,OAAO,OAAO,MAAM,EAAE;AAC3F,MAAI,aAAa,MAAM;AACrB,UAAM,QAAQ;AAAA,MACZ,GAAI,SAAS,OAAO,SAAS,IAAI,CAAC,iBAAiB,SAAS,OAAO,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;AAAA,MACrF,GAAI,SAAS,aAAa,SAAS,WAAW,CAAC,sBAAsB,IAAI,CAAC;AAAA,MAC1E,GAAI,SAAS,eAAe,SAAS,CAAC,iBAAiB,IAAI,CAAC;AAAA,MAC5D,GAAI,SAAS,QAAQ,YAAY,CAAC,qBAAqB,IAAI,CAAC;AAAA,IAC9D;AACA,QAAI,MAAM,SAAS,GAAG;AACpB,YAAM,KAAK,kCAAkC,MAAM,KAAK,IAAI,CAAC,SAAS,YAAY,EAAE;AAAA,IACtF;AACA,UAAM,KAAK,GAAG,SAAS,SAAS,IAAI,CAAC,MAAM,aAAa,CAAC,EAAE,CAAC;AAAA,EAC9D;AACA,QAAM,KAAK,gDAAgD;AAC3D,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
runUpdate,
|
|
4
|
+
spawnCapture,
|
|
5
|
+
versionFreeEntry
|
|
6
|
+
} from "./chunk-77TCKDEC.js";
|
|
7
|
+
import "./chunk-UKY4CHNC.js";
|
|
8
|
+
import "./chunk-KXVP2VKA.js";
|
|
9
|
+
import "./chunk-GA7JETVM.js";
|
|
10
|
+
import "./chunk-KOGZDMHO.js";
|
|
11
|
+
import "./chunk-QXP3Z3JN.js";
|
|
12
|
+
import "./chunk-5MARFNSB.js";
|
|
13
|
+
import "./chunk-3623BLPV.js";
|
|
14
|
+
import "./chunk-A36LQPHV.js";
|
|
15
|
+
import "./chunk-QSCPK4F5.js";
|
|
16
|
+
import "./chunk-AKWGE6JQ.js";
|
|
17
|
+
import "./chunk-WJXLQXJY.js";
|
|
18
|
+
import "./chunk-XKESD27X.js";
|
|
19
|
+
import "./chunk-4ZZO6ULA.js";
|
|
20
|
+
import "./chunk-MEFB5KHA.js";
|
|
21
|
+
import "./chunk-2SNUOHAT.js";
|
|
22
|
+
import "./chunk-K72RURN3.js";
|
|
23
|
+
import "./chunk-DOQGNFHM.js";
|
|
24
|
+
import "./chunk-YFPY4ONH.js";
|
|
25
|
+
import "./chunk-I3EQFHCD.js";
|
|
26
|
+
import "./chunk-S4SAZ7OD.js";
|
|
27
|
+
import "./chunk-AGZ7PJKY.js";
|
|
28
|
+
import "./chunk-2I4QTOLB.js";
|
|
29
|
+
import "./chunk-7WU4OPLP.js";
|
|
30
|
+
import "./chunk-Y527D4TV.js";
|
|
31
|
+
import "./chunk-YVFXE7RR.js";
|
|
32
|
+
import "./chunk-XQJXNMSB.js";
|
|
33
|
+
import "./chunk-3UCIG4TG.js";
|
|
34
|
+
import "./chunk-27EPWVOY.js";
|
|
35
|
+
import "./chunk-7WEQQJLG.js";
|
|
36
|
+
import "./chunk-SJLTEINJ.js";
|
|
37
|
+
import "./chunk-5C32RLTA.js";
|
|
38
|
+
import "./chunk-ZXTAQYNA.js";
|
|
39
|
+
export {
|
|
40
|
+
runUpdate,
|
|
41
|
+
spawnCapture,
|
|
42
|
+
versionFreeEntry
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=update-ZKUERSO2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -11,16 +11,17 @@ import {
|
|
|
11
11
|
broadcastUsdcSend,
|
|
12
12
|
getUsdcBalance,
|
|
13
13
|
prepareUsdcSend
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-JRGFKVAZ.js";
|
|
14
|
+
} from "./chunk-R5LCN54M.js";
|
|
15
|
+
import "./chunk-NEFNKLBE.js";
|
|
16
|
+
import "./chunk-K3I7C2MO.js";
|
|
18
17
|
import "./chunk-5IEP5EGE.js";
|
|
19
18
|
import "./chunk-EGELTSPU.js";
|
|
19
|
+
import "./chunk-JRGFKVAZ.js";
|
|
20
20
|
import "./chunk-KG3D7FIF.js";
|
|
21
21
|
import "./chunk-RBJPAZFI.js";
|
|
22
22
|
import "./chunk-BPMWXTFX.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-27EPWVOY.js";
|
|
24
|
+
import "./chunk-7WEQQJLG.js";
|
|
24
25
|
import "./chunk-SJLTEINJ.js";
|
|
25
26
|
import "./chunk-ZXTAQYNA.js";
|
|
26
27
|
export {
|
|
@@ -36,4 +37,4 @@ export {
|
|
|
36
37
|
getUsdcBalance,
|
|
37
38
|
prepareUsdcSend
|
|
38
39
|
};
|
|
39
|
-
//# sourceMappingURL=usdc-
|
|
40
|
+
//# sourceMappingURL=usdc-OGOGEHV2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -2,7 +2,7 @@ import { createRequire as __tenjinCreateRequire } from 'node:module'; const requ
|
|
|
2
2
|
import {
|
|
3
3
|
a,
|
|
4
4
|
s
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6E5R45ZO.js";
|
|
6
6
|
import "./chunk-XZKD7DIF.js";
|
|
7
7
|
import "./chunk-KG3D7FIF.js";
|
|
8
8
|
import "./chunk-BPMWXTFX.js";
|
|
@@ -11,4 +11,4 @@ export {
|
|
|
11
11
|
a as n,
|
|
12
12
|
s as t
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=viemAdapter-By13KInL-
|
|
14
|
+
//# sourceMappingURL=viemAdapter-By13KInL-S3DA7DFW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -3,32 +3,36 @@ import {
|
|
|
3
3
|
runWalletBalance,
|
|
4
4
|
runWalletCreate,
|
|
5
5
|
runWalletShow
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-V6BSF6OC.js";
|
|
7
|
+
import "./chunk-B7HUUJOK.js";
|
|
8
|
+
import "./chunk-5K5W4S66.js";
|
|
9
|
+
import "./chunk-7Q5FDF65.js";
|
|
7
10
|
import "./chunk-ORWL5BSN.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-NZIP4PA2.js";
|
|
16
|
-
import "./chunk-TTNESUPQ.js";
|
|
17
|
-
import "./chunk-PAYV4XUA.js";
|
|
18
|
-
import "./chunk-MEFB5KHA.js";
|
|
19
|
-
import "./chunk-KYFZTGMC.js";
|
|
20
|
-
import "./chunk-2SNUOHAT.js";
|
|
21
|
-
import "./chunk-AWQPGIR6.js";
|
|
22
|
-
import "./chunk-N35E6CM2.js";
|
|
23
|
-
import "./chunk-JRGFKVAZ.js";
|
|
11
|
+
import "./chunk-BL3332HQ.js";
|
|
12
|
+
import "./chunk-2XLC3AEX.js";
|
|
13
|
+
import "./chunk-7ZRL2LBQ.js";
|
|
14
|
+
import "./chunk-WK7F3B2E.js";
|
|
15
|
+
import "./chunk-R5LCN54M.js";
|
|
16
|
+
import "./chunk-NEFNKLBE.js";
|
|
17
|
+
import "./chunk-K3I7C2MO.js";
|
|
24
18
|
import "./chunk-5IEP5EGE.js";
|
|
25
19
|
import "./chunk-EGELTSPU.js";
|
|
20
|
+
import "./chunk-JRGFKVAZ.js";
|
|
21
|
+
import "./chunk-TTNESUPQ.js";
|
|
26
22
|
import "./chunk-KG3D7FIF.js";
|
|
27
23
|
import "./chunk-RBJPAZFI.js";
|
|
28
24
|
import "./chunk-BPMWXTFX.js";
|
|
25
|
+
import "./chunk-4ZZO6ULA.js";
|
|
26
|
+
import "./chunk-MEFB5KHA.js";
|
|
27
|
+
import "./chunk-2SNUOHAT.js";
|
|
28
|
+
import "./chunk-K72RURN3.js";
|
|
29
29
|
import "./chunk-2I4QTOLB.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-Y527D4TV.js";
|
|
31
|
+
import "./chunk-YVFXE7RR.js";
|
|
32
|
+
import "./chunk-XQJXNMSB.js";
|
|
33
|
+
import "./chunk-3UCIG4TG.js";
|
|
34
|
+
import "./chunk-27EPWVOY.js";
|
|
35
|
+
import "./chunk-7WEQQJLG.js";
|
|
32
36
|
import "./chunk-SJLTEINJ.js";
|
|
33
37
|
import "./chunk-ZXTAQYNA.js";
|
|
34
38
|
export {
|
|
@@ -36,4 +40,4 @@ export {
|
|
|
36
40
|
runWalletCreate,
|
|
37
41
|
runWalletShow
|
|
38
42
|
};
|
|
39
|
-
//# sourceMappingURL=wallet-
|
|
43
|
+
//# sourceMappingURL=wallet-2HA6W4R4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -111,10 +111,11 @@ Claude Code 2.1.287 or later is required. `tenjin install` and `tenjin doctor` r
|
|
|
111
111
|
|
|
112
112
|
1. A wallet, when this machine has none (`--no-wallet` skips it).
|
|
113
113
|
2. The two automatic spend limits above, only where your config file is silent, and only after you answer the question in a terminal. When your agent runs the install, it writes neither and the defaults hold: your agent asks you the same question and runs the one install command your answer names (see [When your agent runs the install](#when-your-agent-runs-the-install)). Explicit zero, unlimited, custom registry lists and router opt-outs are preserved. Ignored `bazaarPay` and `confirm` keys are removed and reported; refresh removes retired keys without filling absent settings.
|
|
114
|
-
3. The Claude Code plugin `tenjin`, registered with Claude Code's own commands, which leave no step to you: `claude plugin marketplace add <package>/dist/hosts/claude` and then `claude plugin install tenjin@tenjin` (with `--scope local` under `--project`, so only this project loads it), and `claude plugin update tenjin@tenjin` when Claude Code holds an older version. The marketplace is the installed package's own folder, read in place, so there is no download and the plugin is the build you installed. Claude Code writes `extraKnownMarketplaces` and `enabledPlugins` into its settings; this CLI writes nothing into `settings.json` or `~/.claude.json` itself. The binary is `claude` on PATH, else the one Claude Code names in `CLAUDE_CODE_EXECPATH`; with neither, or when a `claude plugin` command fails, the same plugin is written as a folder, `skills/tenjin-router/` under Claude Code's config directory (`$CLAUDE_CONFIG_DIR` when set, else `~/.claude`), which Claude Code loads as `tenjin@skills-dir` with no command at all. `skills/tenjin`, where tenjin.sh suggests dropping its hosted skill, is never touched, and in the folder only the plugin's own
|
|
114
|
+
3. The Claude Code plugin `tenjin`, registered with Claude Code's own commands, which leave no step to you: `claude plugin marketplace add <package>/dist/hosts/claude` and then `claude plugin install tenjin@tenjin` (with `--scope local` under `--project`, so only this project loads it), and `claude plugin update tenjin@tenjin` when Claude Code holds an older version. The marketplace is the installed package's own folder, read in place, so there is no download and the plugin is the build you installed. Claude Code writes `extraKnownMarketplaces` and `enabledPlugins` into its settings; this CLI writes nothing into `settings.json` or `~/.claude.json` itself. The binary is `claude` on PATH, else the one Claude Code names in `CLAUDE_CODE_EXECPATH`; with neither, or when a `claude plugin` command fails, the same plugin is written as a folder, `skills/tenjin-router/` under Claude Code's config directory (`$CLAUDE_CONFIG_DIR` when set, else `~/.claude`), which Claude Code loads as `tenjin@skills-dir` with no command at all. `skills/tenjin`, where tenjin.sh suggests dropping its hosted skill, is never touched, and in the folder only the plugin's own five files are ever written or removed. The plugin carries:
|
|
115
115
|
- Seven hook legs, each a Claude Code `mcp_tool` hook that calls the `hook` tool of the plugin's `router` server with the event's fields: `UserPromptSubmit`, `PreToolUse` on `WebSearch|WebFetch`, `PreToolUse` on `Agent|Task`, `PostToolUse` and `PostToolUseFailure` on `WebSearch|WebFetch`, and `PreToolUse` and `PostToolUse` on `AskUserQuestion`. So each routing step runs inside the session's own `tenjin mcp`, the one process that holds the wallet. That tool reads history only from a file whose real path, symlinks resolved, lies under Claude Code's projects directory (`$CLAUDE_CONFIG_DIR/projects` when that variable is set, else `~/.claude/projects/`) and that is named for the calling session or one of its subagents; a session's first prompt, which fires before that transcript is written, routes on the prompt alone, and any other call reads, sends and pays nothing. Each has a 5 second timeout, so a stuck server never holds a prompt longer, and the two after-call entries on `WebSearch|WebFetch` 15 seconds so a search can wait for the free docs described below. A call that carries a routing channel's deposit waits 4.5 of those seconds instead of 3.5, and a routing payment still out when its time ends says nothing: that prompt runs on the native tools while `tenjin mcp` lets the request finish, for 15 seconds at most, so the channel records it; a deposit in it was counted in the spend ledger when it was sent. A session where the `router` server is not running routes nothing, and its native tools run. No daemon, no generated script; the one background process is that docs fetch, a single `node` process per such search that exits within 12 seconds. `tenjin hook <prompt|native|shortfall|agent|ask|answer>` still exists for a host with no MCP server, and always takes the free path.
|
|
116
116
|
- The two permission answers above. No hook approves any other call, so WebSearch and WebFetch stay under your own permission rules. Before each one, when a paid lookup fits it, the hook redirects your assistant to `mcp__plugin_tenjin_router__request` in its place; a subagent is redirected only when it is known to have that tool and your spend policy would pay without asking, and otherwise its call simply runs. For library documentation, which is a free lookup, it never redirects, in the main agent or a subagent: a WebSearch runs as your assistant wrote it while the hook fetches Context7 docs for the same query (up to 500 characters of it go to Tenjin's docs lookup, which asks Context7), and when docs are found they are added above the search's own results, with a line saying the web results below are there if the docs do not cover it; when none are found, or the lookup is slow or fails, the search result is left exactly as it was. One agent's identical search is not looked up again for five minutes, and the fetched docs wait in a 0700 directory under your Tenjin data dir only until that search reads them, ten minutes at most. A WebFetch with a free lookup simply runs. It never redirects the same call twice: once a search or URL has been redirected, your assistant's own retry of that same search or URL runs as it is, whether the redirected lookup succeeded, failed or was never called, and however many other calls ran in between, for ten minutes and separately for each agent, while every other search or URL is routed as usual. After a call that came back short (a failed call, a page that answers 401, 402, 403, 429 or 5xx, an empty page, a search with no results; never a 404 or 410, since a missing page is missing for a paid reader too), the router may offer a paid lookup.
|
|
117
|
-
- One `SessionStart` command, `tenjin hook alive`, run as `node` with the package's own `dist/index.js`, which writes two small files under `~/.tenjin/alive/`: a marker for the session (a hash of its id) and a stamp saying the plugin has loaded on this machine. It
|
|
117
|
+
- One `SessionStart` command, `tenjin hook alive`, run as `node` with the package's own `dist/index.js`, which writes two small files under `~/.tenjin/alive/`: a marker for the session (a hash of its id) and a stamp saying the plugin has loaded on this machine. While the wallet holds less than the per-call limit, it shows you one line, `Tenjin balance: $0.00. Ask your agent to add funds to Tenjin.`, with no wallet address; to know, it reads the balance once from your configured Base RPC (the public ones when you set none), at most two seconds. It adds nothing to your assistant's context.
|
|
118
|
+
- A mod (`hooks/register.tsx`, with its state contract in `types/index.d.ts`), which Claude Code runs in the terminal, the desktop app and VS Code. It reads three kinds of file the CLI already keeps under `~/.tenjin`: a kept spec's label, price and the one input a row may show; a choice set's option names; and the offer record of a redirected call, plus the request tool's own result, and writes nothing there. It draws each lookup the way Claude Code draws an MCP call: `⏺ Calling Exa search… · $0.007` with the query under it while it runs, then the dim `Called Exa search · $0.007 (ctrl+o to expand)`. In the ctrl+o transcript, under `--verbose`, or in a run Claude Code expands, every call to the router, the ones the normal view hides included, is Claude Code's own row with its input and result. A lookup over a spend limit draws no row of its own; the `approve` call that runs it once you say yes draws as that lookup (`Calling Exa search… · $0.775`, then `Called Exa search · $0.775`). A call that failed after paying shows the error dot, the amount and the state. A call the router sends back for a missing field, and the router's own free calls, draw nothing. It shows an input only when it names what was looked up (a query, a URL, a name, at most 80 characters), never a media prompt, so an image call reads `Called Ideogram V4 · $0.03`. A run that mixes a lookup with other calls is drawn unfolded, each call its own row. A WebSearch or WebFetch held for a Tenjin offer shows as its native row struck through, `⏺ ~~Web Search~~("query") · Tenjin offered Exa search`, then becomes, in place, the lookup drawn as a built-in row would be, `⏺ Exa search("query") · $0.007`, or disappears if your assistant runs the same search itself. It answers no permission question, rewrites no prompt, denies nothing, writes no config and answers no tool call. The request tool stays in the prompt's tool list through the server's own `anthropic/alwaysLoad`, and the permission answer above allows it.
|
|
118
119
|
- The `router` MCP server, `tenjin mcp --plugin`, run as `node` from your PATH with the package's own `dist/index.js`.
|
|
119
120
|
|
|
120
121
|
Every command the plugin carries is a Claude Code exec-form command: `node` and its arguments, started with no shell and never through the `tenjin` npm shim, so Windows runs the same files macOS and Linux run. The shipped plugin finds the entry three folders above `${CLAUDE_PLUGIN_ROOT}`, since Claude Code loads it in place from the package. The `skills/tenjin-router/` folder carries the absolute entry of the CLI that wrote it.
|
|
@@ -134,14 +135,16 @@ To stop the router without removing anything, `tenjin config set router.enabled
|
|
|
134
135
|
## How one lookup runs
|
|
135
136
|
|
|
136
137
|
1. You type a turn. The hook sends the bounded packet to Tenjin, which answers whether a paid capability fits and, if it does, keeps that packet under a short-lived id.
|
|
137
|
-
2. When one fits, your assistant sees one line, opening with `Tenjin router (installed by the user):`, that
|
|
138
|
+
2. When one fits, your assistant sees one line, opening with `Tenjin router (installed by the user):`, that starts at the service's name and its price (`Exa search, $0.007: …`) and ends with the call to make: `mcp__plugin_tenjin_router__request({id, input})` with the required fields as placeholders, or already filled in when the hook holds them (the search a native call was about to run, or the page it was about to fetch). The hook keeps the service's spec on this machine under the id.
|
|
138
139
|
3. Your assistant fills the fields and calls `request({id, input})` once. This CLI validates the input against the spec, builds the request, pays that provider once under your limits, hands back the result, and tells Tenjin only how the call ended. Deciding costs nothing. Where the spec names the fields its result promises, the result holds only those, and the provider's whole response is saved under `~/.tenjin/results/` (readable by you alone, kept a day) at the path the result names in `fullResultPath`.
|
|
139
140
|
4. An input that does not fit the spec is refused before anything is sent to the provider: your assistant gets every problem and the whole spec (each input with its description and allowed values, the required fields inside a nested object, an example and what comes back), locally and with nothing paid, and calls again. `request({id})` alone shows the same spec. A spec whose input schema this CLI cannot compile is refused outright, with nothing sent to the provider or paid.
|
|
140
|
-
5.
|
|
141
|
+
5. Your assistant can also see what is available without a lookup: `request({browse: "<a need>"})`, or `browse: ""` for every tool, returns the tool list (each tool's id, name, what it does and its price), and `request({tool: "<id>"})` returns one tool's spec under a fresh id, which `request({id, input})` then runs as in step 3. Both are free: no routing decision, no routing fee and no payment. A browse sends only the words of the need; a `tool` call sends only the id. The hooks still route each lookup as above.
|
|
142
|
+
6. Some lines offer a choice of services for the same step, such as several image models. Your assistant uses the one you named or asked to compare, asks you when you have not said and you are there to answer, and otherwise uses the line's default, then calls `request({id, choice, input})`. One choice runs exactly as that service's own offer. `all` runs every choice side by side, each paid once to its own provider, but only after each is quoted at its live price and the whole set's total fits your limits: within `maxAutoSpend`, which is per call, and inside the day's `sessionBudget`. A set that does not fit returns `needs_approval` with nothing paid, and in Claude Code runs once you approve it. The result lists each choice with its cost and the file it saved under `~/.tenjin/downloads/`.
|
|
141
143
|
|
|
142
144
|
## What a paid lookup leaves on your machine
|
|
143
145
|
|
|
144
|
-
- Every paid lookup is recorded in `~/.tenjin/paid/ledger.jsonl`: what was sent (masked), who was paid, how much, the settlement transaction, and any files saved.
|
|
146
|
+
- Every paid lookup is recorded in `~/.tenjin/paid/ledger.jsonl`: what was sent (masked), who was paid, the tool's display name when it has one, how much, the settlement transaction, and any files saved.
|
|
147
|
+
- A hook that redirects a call leaves a short record under `~/.tenjin/progress/`, keyed by that call's id: when, the offer's id, the offered tool's display name, and its price. It expires with the other progress records, after ten minutes.
|
|
145
148
|
- Files a paid lookup returns, and media files a paid third-party service links to or returns inline as base64 in its JSON, are saved under `~/.tenjin/downloads/`. An inline file is replaced in the result by a note naming where it was saved.
|
|
146
149
|
- When a tool names the fields it returns, your agent gets those fields and the provider's whole response is saved under `~/.tenjin/results/` for a day, at the path the result names.
|
|
147
150
|
- When a seller never confirmed settlement, `tenjin payments reconcile` asks USDC on Base whether the payment was used once it has expired, and one that was never charged goes back to today's limit; the `request` tool does the same for up to three beside each lookup, without waiting for it.
|
|
@@ -153,8 +156,10 @@ To stop the router without removing anything, `tenjin config set router.enabled
|
|
|
153
156
|
- When your assistant hands a task to a subagent: that task, as the current message, with the same bounded turn before it.
|
|
154
157
|
- 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.
|
|
155
158
|
- Every hook request carries this session's id, so one session is not offered the same pay-per-call service twice.
|
|
159
|
+
- Every request also lists what this CLI can parse and run (`accepts`): `catalog`, `spec`, `label` and `fields`, plus `bazaar` while the open Bazaar is on. The server sends a field only to a CLI that lists it: `label` brings each tool's display name and the line that starts at it, and `fields` brings which input takes a pending search or URL, what kind of result a tool returns (files are saved only when it says `media`), and how the free docs lookup is delivered. A server change to a tool then reaches an installed CLI without a new release.
|
|
156
160
|
- With `router.context turn`, no prior messages are sent: the prompt on a prompt, your latest message on a native call, and the task on a delegation. `tenjin config set router.context turn` sets it for this machine, and `--project` for this repository.
|
|
157
161
|
- Slash commands and one-word acknowledgements are never sent at all.
|
|
162
|
+
- With `tenjin config set experimental.bazaar on` (off by default), short snippets of your prompts also go to Coinbase's public x402 Bazaar search, so the router can suggest unreviewed sellers listed there.
|
|
158
163
|
- The packet is stored on the backend against the decision id, so the lookup your assistant sends next is decided with the context you gave. Expired packets are unreadable after 15 minutes (the route refuses an expired id) and are deleted by the next router request or the daily cleanup, whichever comes first.
|
|
159
164
|
- On a paid lookup: the capability chosen, a hash of the contract, a hash of the arguments, your wallet address, the amount and the transaction hash are kept.
|
|
160
165
|
- On every call run from an offer's spec: the offer's id, how the call ended, the provider's HTTP status and how long it took. A call stopped before anything was paid says which side stopped it: the input, the offer's terms, the provider's answer, the network, or the wallet. Never the input or the result.
|
|
@@ -178,3 +183,14 @@ A subagent is only redirected or offered a lookup when it is known to have `mcp_
|
|
|
178
183
|
## Not the same as `allowlistCreators`
|
|
179
184
|
|
|
180
185
|
`allowlistCreators` is a spend-policy key that restricts which hosts may be paid at all. The plugin's permission answers on this page are a harness setting about which tool may run. They are separate gates and neither substitutes for the other.
|
|
186
|
+
|
|
187
|
+
## Codex
|
|
188
|
+
|
|
189
|
+
`tenjin install` sets up Codex when Codex's agent runs it, or in a terminal when this machine has Codex (`codex --version` must answer; a name on PATH is not enough). With both Claude Code and Codex there, a terminal install asks which, both selected; `--yes`, `--json` or no terminal takes both. `--harness claude|codex` picks one instead. An agent's install that also finds the other agent ends with one line, in `notices`, telling the agent to ask whether to set up Tenjin there too and, on yes, to run `tenjin install --harness <other>`. Install records the agents it set up in `installed-hosts.json` in your Tenjin data dir, and `tenjin doctor` and `tenjin uninstall` check or remove each one recorded (Claude Code on a machine set up before the record). For Codex, install writes the wallet, the spend limits and the Codex plugin through `codex plugin add`, and no Codex config. Its spend limits follow the same defaults as Claude Code: `--yes` takes them, `--max-auto-spend <usd>` (at least 0.25) and `--session-budget <usd|none>` set your own, and a terminal asks once while the config file names neither limit. With no answer it writes neither, the defaults ($0.25 a call, $5 a day) hold, and the spend question comes back in `nextSteps` with `tenjin install` as its command. The plugin carries four hooks: the prompt leg, one web call (a search, a page open, or a batch of them) before it runs and after, where a batch is blocked at most once and the block names the rest of the call to run as written, and a `PermissionRequest` hook on `mcp__router__request` that answers allow. That last hook is how the request tool runs without a prompt, `approval_policy = "never"` included: Codex runs hooks before its approval policy. It covers the request tool alone, and your spend limits still bound every payment. Codex asks you to trust the four hooks in `/hooks`, and Tenjin never skips that review.
|
|
190
|
+
|
|
191
|
+
The trade-off: the allow hook also overrides your own `approval_mode = "prompt"` for the request tool. To be asked before each call, turn that one hook off in `/hooks`; `tenjin doctor` then reports that the tool asks first, and under `approval_policy = "never"` that Codex refuses it. With that hook off, the router still blocks a web search once to point at the request tool. Where Codex then asks or refuses, a retry of that search runs: each search is blocked once at most, so the cost is one extra step. `tenjin uninstall` removes the plugin and its marketplace.
|
|
192
|
+
|
|
193
|
+
## Other settings
|
|
194
|
+
|
|
195
|
+
- `tenjin wallet send <amount> USDC <address>` moves funds out. It needs a per-send cap (`tenjin config set sendMaxAmount <usd>`) and a little ETH on Base for gas.
|
|
196
|
+
- The CLI checks npm at most once a day for a newer version and never updates itself. `tenjin config set update.mode off` stops the check.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tenjin-cli",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.31",
|
|
4
4
|
"type": "module",
|
|
5
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.",
|
|
6
6
|
"repository": {
|