shinjuku-shielded 0.3.166 → 0.3.167
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 +6 -6
- package/manifest.json +4 -4
- package/package.json +3 -3
- package/shinjuku-wallet.mjs +55 -10
package/README.md
CHANGED
|
@@ -6,19 +6,19 @@ answers privately, in a terminal chat or for your agent app. Its `mcp`
|
|
|
6
6
|
command runs a local MCP server (stdio) for your agent. Your keys never
|
|
7
7
|
leave your machine.
|
|
8
8
|
|
|
9
|
-
This is version 0.3.
|
|
9
|
+
This is version 0.3.167. The npm packages `shinjuku-shield` and
|
|
10
10
|
`shinjuku-shielded` hold the same files. The command is `shinjuku`.
|
|
11
11
|
|
|
12
12
|
## Set up
|
|
13
13
|
|
|
14
14
|
```sh
|
|
15
|
-
npm install -g shinjuku@0.3.
|
|
15
|
+
npm install -g shinjuku@0.3.167
|
|
16
16
|
shinjuku setup
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
Type the two lines as they are. `npx install shinjuku` does not work: npx
|
|
20
20
|
reads `install` as the name of another npm package. To set up without
|
|
21
|
-
installing, type `npx shinjuku@0.3.
|
|
21
|
+
installing, type `npx shinjuku@0.3.167 setup`.
|
|
22
22
|
|
|
23
23
|
Setup makes the wallet on this machine, a private passphrase file, and the
|
|
24
24
|
checked proof tools (about 191 MB), and writes `config.json`. It also writes
|
|
@@ -36,13 +36,13 @@ Every wallet command works after `shinjuku`, for example `shinjuku balance`,
|
|
|
36
36
|
Claude Code:
|
|
37
37
|
|
|
38
38
|
```sh
|
|
39
|
-
claude mcp add --scope user shinjuku -- npx -y --no-audit --no-fund shinjuku-shield@0.3.
|
|
39
|
+
claude mcp add --scope user shinjuku -- npx -y --no-audit --no-fund shinjuku-shield@0.3.167 mcp
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
Claude Desktop (`claude_desktop_config.json`) or Cursor (`~/.cursor/mcp.json`):
|
|
43
43
|
|
|
44
44
|
```json
|
|
45
|
-
{ "mcpServers": { "shinjuku": { "command": "npx", "args": ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.
|
|
45
|
+
{ "mcpServers": { "shinjuku": { "command": "npx", "args": ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.167", "mcp"] } } }
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
On native Windows, if the host cannot find `npx`, use `"command": "cmd"` and
|
|
@@ -55,7 +55,7 @@ Codex (the Codex app and Codex CLI read the same file, `~/.codex/config.toml`):
|
|
|
55
55
|
```toml
|
|
56
56
|
[mcp_servers.shinjuku]
|
|
57
57
|
command = "npx"
|
|
58
|
-
args = ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.
|
|
58
|
+
args = ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.167", "mcp"]
|
|
59
59
|
startup_timeout_sec = 120
|
|
60
60
|
tool_timeout_sec = 300
|
|
61
61
|
```
|
package/manifest.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "carbon-shielded-wallet/bundle-manifest/v1",
|
|
3
3
|
"file": "shinjuku-wallet.mjs",
|
|
4
|
-
"sha256": "
|
|
5
|
-
"bytes":
|
|
6
|
-
"sourceCommit": "
|
|
4
|
+
"sha256": "6801635b43f010f60eea3c04a763a1ad06ef772c20b6a77907c8bdc66fae8e75",
|
|
5
|
+
"bytes": 9301251,
|
|
6
|
+
"sourceCommit": "eee4b3d7a248c78cfadf450c7eae8f2250e98de1",
|
|
7
7
|
"sourceDirty": false,
|
|
8
8
|
"installRecordMatchesLockfile": true,
|
|
9
9
|
"releaseRule": "valid only when two fresh npm ci --ignore-scripts builds on different OSes give the same sha256; installRecordMatchesLockfile true means every entry npm installed equals its package-lock.json entry and every entry not marked optional, devOptional included, is installed: an optional entry (a package for another platform) may be absent",
|
|
@@ -1038,5 +1038,5 @@
|
|
|
1038
1038
|
"version": "1.8.0"
|
|
1039
1039
|
}
|
|
1040
1040
|
],
|
|
1041
|
-
"publishedAt": "2026-11-
|
|
1041
|
+
"publishedAt": "2026-11-05T03:40:15.715Z"
|
|
1042
1042
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shinjuku-shielded",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.167",
|
|
4
4
|
"mcpName": "io.github.ShinjukuStaition/shinjuku-mcp",
|
|
5
5
|
"description": "Shinjuku Shielded, the private x402 facilitator on Solana: the self-custody wallet CLI and its MCP server. Shield, pay, and unshield USDC from any MCP agent, under caps you set.",
|
|
6
|
-
"shinjukuRelease": "
|
|
7
|
-
"shinjukuSha256": "
|
|
6
|
+
"shinjukuRelease": "6801635b",
|
|
7
|
+
"shinjukuSha256": "6801635b43f010f60eea3c04a763a1ad06ef772c20b6a77907c8bdc66fae8e75",
|
|
8
8
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
9
9
|
"author": "Shinjuku Shielded",
|
|
10
10
|
"homepage": "https://github.com/ShinjukuStaition/shinjuku-shield#readme",
|
package/shinjuku-wallet.mjs
CHANGED
|
@@ -54314,12 +54314,29 @@ function hostConfigFile(target, { platform = process.platform, env = process.env
|
|
|
54314
54314
|
if (target === "gemini") return join8(set("GEMINI_CLI_HOME") ?? home, ".gemini", "settings.json");
|
|
54315
54315
|
if (target === "antigravity") return join8(home, ".gemini", "config", "mcp_config.json");
|
|
54316
54316
|
if (target === "claude-desktop") {
|
|
54317
|
-
if (platform === "win32") return join8(env.APPDATA || join8(home, "AppData", "Roaming"), "Claude", "claude_desktop_config.json");
|
|
54317
|
+
if (platform === "win32") return packagedClaudeDesktopFile(env, home) ?? join8(env.APPDATA || join8(home, "AppData", "Roaming"), "Claude", "claude_desktop_config.json");
|
|
54318
54318
|
if (platform === "darwin") return join8(home, "Library", "Application Support", "Claude", "claude_desktop_config.json");
|
|
54319
54319
|
return join8(env.XDG_CONFIG_HOME || join8(home, ".config"), "Claude", "claude_desktop_config.json");
|
|
54320
54320
|
}
|
|
54321
54321
|
return void 0;
|
|
54322
54322
|
}
|
|
54323
|
+
function packagedClaudeDesktopFile(env, home) {
|
|
54324
|
+
const packages = join8(env.LOCALAPPDATA || join8(home, "AppData", "Local"), "Packages");
|
|
54325
|
+
let names;
|
|
54326
|
+
try {
|
|
54327
|
+
names = readdirSync(packages);
|
|
54328
|
+
} catch {
|
|
54329
|
+
return void 0;
|
|
54330
|
+
}
|
|
54331
|
+
const files = names.filter((each) => /^Claude_[a-z0-9]+$/i.test(each)).map((name) => join8(packages, name, "LocalCache", "Roaming", "Claude", "claude_desktop_config.json")).filter((file) => existsSync(file));
|
|
54332
|
+
if (files.length > 1) {
|
|
54333
|
+
throw Object.assign(
|
|
54334
|
+
new Error(`setup_host_config_ambiguous: this computer has ${files.length} Claude Desktop settings files (${files.join("; ")}), so the wallet did not pick one`),
|
|
54335
|
+
{ files }
|
|
54336
|
+
);
|
|
54337
|
+
}
|
|
54338
|
+
return files[0];
|
|
54339
|
+
}
|
|
54323
54340
|
function hostConfigText({ home, env = process.env, platform = process.platform, npmVersion, skip = /* @__PURE__ */ new Set(), userHome = homedir() } = {}) {
|
|
54324
54341
|
const entry = mcpServerEntry({ home, platform, npmVersion });
|
|
54325
54342
|
const more = ["vscode", "devin", "cline", "continue", "gemini", "antigravity"].filter((target) => !skip.has(target)).flatMap((target) => {
|
|
@@ -54332,7 +54349,10 @@ function hostConfigText({ home, env = process.env, platform = process.platform,
|
|
|
54332
54349
|
];
|
|
54333
54350
|
});
|
|
54334
54351
|
const member = `${JSON.stringify(MCP_SERVER_NAME)}: ${JSON.stringify(entry, null, 2)}`;
|
|
54335
|
-
const files = [
|
|
54352
|
+
const files = [
|
|
54353
|
+
["claude-desktop", "Claude Desktop (claude_desktop_config.json: in Claude Desktop, Settings > Developer > Edit Config opens it)"],
|
|
54354
|
+
["cursor", "Cursor (~/.cursor/mcp.json)"]
|
|
54355
|
+
].filter(([target]) => !skip.has(target)).map(([, label]) => label);
|
|
54336
54356
|
return [
|
|
54337
54357
|
...skip.has("claude-code") ? [] : claudeCodeShellWhy({ home, env, platform }) ? ["Claude Code:", ` ${claudeCodeShellWhy({ home, env, platform })}`] : claudeCodeLines({ home, env, platform, npmVersion }),
|
|
54338
54358
|
...files.length ? [
|
|
@@ -54340,7 +54360,7 @@ function hostConfigText({ home, env = process.env, platform = process.platform,
|
|
|
54340
54360
|
...member.split("\n").map((line) => ` ${line}`)
|
|
54341
54361
|
] : [],
|
|
54342
54362
|
...skip.has("codex") ? [] : [
|
|
54343
|
-
"Codex (the Codex app and Codex CLI), at the end of ~/.codex/config.toml:",
|
|
54363
|
+
"Codex (the Codex side of the ChatGPT desktop app, and Codex CLI), at the end of ~/.codex/config.toml:",
|
|
54344
54364
|
...codexTomlBlock(entry).trimEnd().split("\n").map((line) => ` ${line}`)
|
|
54345
54365
|
],
|
|
54346
54366
|
...more
|
|
@@ -142299,7 +142319,7 @@ var init_tools = __esm({
|
|
|
142299
142319
|
"--max-shield / --max-unshield": "shield and unshield limits"
|
|
142300
142320
|
};
|
|
142301
142321
|
capName = (flag3) => CAP_NAMES[flag3] ?? "spending limit";
|
|
142302
|
-
entryPlaces = (change) => `Where the entry is: Claude Desktop: claude_desktop_config.json; Cursor: ~/.cursor/mcp.json; Claude Code: claude mcp get ${MCP_SERVER_NAME} shows the entry (an entry added by hand can have another name: claude mcp list shows it), then claude mcp remove ${MCP_SERVER_NAME} and claude mcp add it again ${change}; Hermes: config.yaml.`;
|
|
142322
|
+
entryPlaces = (change) => `Where the entry is: Claude Desktop: claude_desktop_config.json (Settings > Developer > Edit Config opens it); Cursor: ~/.cursor/mcp.json; Claude Code: claude mcp get ${MCP_SERVER_NAME} shows the entry (an entry added by hand can have another name: claude mcp list shows it), then claude mcp remove ${MCP_SERVER_NAME} and claude mcp add it again ${change}; Hermes: config.yaml.`;
|
|
142303
142323
|
capRaiseText = (flag3) => {
|
|
142304
142324
|
if (capFlagFromLaunchLine(flag3)) {
|
|
142305
142325
|
const both = flag3 === "--max-payment" ? " (raise the 24-hour payment limit there too when it is below the new amount: the wallet does not start with it lower)" : "";
|
|
@@ -156835,7 +156855,13 @@ function claudeCodeState(env, home) {
|
|
|
156835
156855
|
}
|
|
156836
156856
|
function agentHostsOf(env, home) {
|
|
156837
156857
|
const jsonHost = (target) => {
|
|
156838
|
-
|
|
156858
|
+
let file;
|
|
156859
|
+
try {
|
|
156860
|
+
file = hostConfigFile(target, { env, home: homedir3() });
|
|
156861
|
+
} catch {
|
|
156862
|
+
return null;
|
|
156863
|
+
}
|
|
156864
|
+
const config = readJsonFile(file);
|
|
156839
156865
|
return config === void 0 ? false : config === null ? null : runsThisWallet(config[hostServersKey(target)], home);
|
|
156840
156866
|
};
|
|
156841
156867
|
const continueHost = () => {
|
|
@@ -159631,7 +159657,7 @@ function agentAppLines({ skip = /* @__PURE__ */ new Set() }) {
|
|
|
159631
159657
|
function hostLines(targets) {
|
|
159632
159658
|
const commands = targets.map((target) => `${setupCli2()} setup --add-to ${target}`);
|
|
159633
159659
|
const width = Math.max(...commands.map((command) => command.length));
|
|
159634
|
-
const label = { codex: "Codex (the
|
|
159660
|
+
const label = { codex: "Codex (the ChatGPT desktop app's Codex side, or Codex CLI)", devin: "Devin Desktop (the app that was Windsurf)", vscode: "VS Code (GitHub Copilot)" };
|
|
159635
159661
|
return targets.map((target, index) => ` ${commands[index].padEnd(width)} ${label[target] ?? HOST_NAMES[target]}`);
|
|
159636
159662
|
}
|
|
159637
159663
|
function setupNextText({ home, deps, npmVersion, config, fundAsked, rerun, targets = [], added = /* @__PURE__ */ new Set() }) {
|
|
@@ -160057,6 +160083,17 @@ function claudeCodeEntryOf(deps) {
|
|
|
160057
160083
|
}
|
|
160058
160084
|
}
|
|
160059
160085
|
var RESTART_APP = (app) => `If ${app} is open now, quit it and start it again.`;
|
|
160086
|
+
function hostAddedNext(target, app, platform) {
|
|
160087
|
+
const ask = 'then ask in plain words, for example "what is my Shinjuku balance".';
|
|
160088
|
+
if (target === "claude-desktop") {
|
|
160089
|
+
const quit = platform === "win32" ? "If Claude Desktop is open now, quit it: right-click its icon by the clock and choose Quit (closing its window does not quit it). Then open it again" : platform === "darwin" ? "If Claude Desktop is open now, quit it (Claude > Quit Claude, or Command+Q) and open it again" : `${RESTART_APP(app).slice(0, -1)}`;
|
|
160090
|
+
return `${quit}. In a new chat, click + and choose Connectors to see Shinjuku there, ${ask}`;
|
|
160091
|
+
}
|
|
160092
|
+
if (target === "codex") {
|
|
160093
|
+
return `If the ChatGPT desktop app or Codex CLI is open now, quit it and start it again. In the app, use its Codex side (ChatGPT's own chat cannot start a server on this computer). In Codex, type /mcp to see the wallet's tools, ${ask}`;
|
|
160094
|
+
}
|
|
160095
|
+
return RESTART_APP(app);
|
|
160096
|
+
}
|
|
160060
160097
|
function allowWalletChecks(deps) {
|
|
160061
160098
|
const file = claudeCodeSettingsFile({ env: deps.env, home: deps.homedir() });
|
|
160062
160099
|
try {
|
|
@@ -160190,8 +160227,16 @@ async function addToHosts(targets, home, deps, { force = false, npmVersion, ask,
|
|
|
160190
160227
|
`));
|
|
160191
160228
|
continue;
|
|
160192
160229
|
}
|
|
160193
|
-
const file = hostConfigFile(target, { ...options, home: deps.homedir() });
|
|
160194
160230
|
const app = HOST_NAMES[target];
|
|
160231
|
+
let file;
|
|
160232
|
+
try {
|
|
160233
|
+
file = hostConfigFile(target, { ...options, home: deps.homedir() });
|
|
160234
|
+
} catch (error) {
|
|
160235
|
+
if (!String(error?.message).startsWith("setup_host_config_ambiguous:")) throw error;
|
|
160236
|
+
io.out(`Not added to ${app}: this computer has more than one ${app} settings file (${error.files.join("; ")}), so the wallet did not pick one. In ${app}, Settings > Developer > Edit Config opens the file it reads: add the entry below to it by hand.
|
|
160237
|
+
`);
|
|
160238
|
+
continue;
|
|
160239
|
+
}
|
|
160195
160240
|
const first = torOn ? await hostStartCheck(app, options, deps, { terminal: false, noTor }) : void 0;
|
|
160196
160241
|
if (first && !first.ok) {
|
|
160197
160242
|
io.out(`Not added to ${app}: ${hostCheckWords(app, first)}
|
|
@@ -160205,8 +160250,8 @@ async function addToHosts(targets, home, deps, { force = false, npmVersion, ask,
|
|
|
160205
160250
|
`);
|
|
160206
160251
|
const check = await hostStartCheck(app, options, deps, { terminal: false, noTor });
|
|
160207
160252
|
if (check.path) added = { ...write(mcpServerEntry({ ...options, path: check.path }), false), changed: true };
|
|
160208
|
-
io.out(!added.changed ? `${app} already has the wallet: ${file} (nothing changed).${check.ok ? ` ${app} starts it (checked).` : ""}
|
|
160209
|
-
` : `Added the wallet to ${app}: ${file}${added.backup ? ` (the old file was copied to ${added.backup}, readable by you alone)` : ""}.${check.ok ? ` ${app} starts it (checked).` : ""} ${
|
|
160253
|
+
io.out(!added.changed ? `${app} already has the wallet: ${file} (nothing changed).${check.ok ? ` ${app} starts it (checked).` : ""} If ${app} does not show the wallet yet: ${hostAddedNext(target, app, options.platform)}
|
|
160254
|
+
` : `Added the wallet to ${app}: ${file}${added.backup ? ` (the old file was copied to ${added.backup}, readable by you alone)` : ""}.${check.ok ? ` ${app} starts it (checked).` : ""} ${hostAddedNext(target, app, options.platform)}
|
|
160210
160255
|
`);
|
|
160211
160256
|
if (!check.ok) io.out(`${hostCheckWords(app, check)}
|
|
160212
160257
|
`);
|
|
@@ -161593,7 +161638,7 @@ var COMMANDS = [
|
|
|
161593
161638
|
"Your own --passphrase-file must be private: on Linux and macOS setup refuses a file that group or other may read or write, or that another user owns (setup_passphrase_file_insecure: chmod 600 <file>). On Windows setup cannot read the access list; it accepts the file with a warning.",
|
|
161594
161639
|
`--add-to writes each app's own user file: vscode (VS Code with Copilot) mcp.json in VS Code's User folder, under "servers"; devin (Devin Desktop, the app that was Windsurf) mcp_config.json in AppData\\Roaming\\devin on Windows, else ~/.config/devin; cline ~/.cline/data/settings/cline_mcp_settings.json (or CLINE_MCP_SETTINGS_PATH, CLINE_DATA_DIR, CLINE_DIR); continue its own block file ~/.continue/mcpServers/shinjuku.yaml (or in CONTINUE_GLOBAL_DIR); gemini (Gemini CLI) ~/.gemini/settings.json (or in GEMINI_CLI_HOME); antigravity (Antigravity) ~/.gemini/config/mcp_config.json. Every other key and server in a file stays as it is.`,
|
|
161595
161640
|
`--add-to for a JSON file (Claude Desktop, Cursor and the apps above): a host config whose server list is not a JSON object, or that has a different ${MCP_SERVER_NAME} entry (without --force), is left alone. Otherwise the old file is copied to <file>.bak-<time> (mode 0600 on Linux and macOS; on Windows the folder's access list) and the new file replaces it in one rename. An entry an older setup wrote (no version, another version, or an old package name, shinjuku or shinjuku-shielded; the same home) is replaced without --force, in a JSON host and in Claude Code. An entry under an old key (${OLD_MCP_SERVER_NAMES.join(" or ")}) is replaced by itself, in every host, so the host never starts two wallet servers. For Claude Code, a different ${MCP_SERVER_NAME} server (not an older entry of this wallet) needs --force.`,
|
|
161596
|
-
`--add-to codex: the
|
|
161641
|
+
`--add-to codex: the ChatGPT desktop app (its Codex side) and Codex CLI read one file, config.toml in CODEX_HOME (else ~/.codex). Setup writes the [mcp_servers.${MCP_SERVER_NAME}] tables at its end with startup_timeout_sec = 120 (a first start downloads the wallet) and tool_timeout_sec = 300, and keeps every other line; the same rules as a JSON host (a different entry stays without --force; the old file is backed up first). Then type /mcp in Codex to see the tools.`,
|
|
161597
161642
|
"The proof programs run natively: Windows x64, Linux x64 and Linux arm64 each download their own set (no WSL). Setup downloads the programs first and starts each one once before it makes a key; when Windows app control or an antivirus blocks one, setup stops and says which. macOS and other systems: not supported yet; setup says so and creates nothing.",
|
|
161598
161643
|
"Run it again at any time: it never changes an existing wallet, keeps the recorded caps unless you pass new ones, checks every setup file again, downloads what is missing or newer, and rewrites config.json.",
|
|
161599
161644
|
`A wallet that ${SETUP_CLI_WORD} restore made and did not read back yet (the restore stopped): setup reads its money back from the chain in place of the add-money question, so setup finishes that restore.`,
|