shinjuku-shielded 0.3.176 → 0.3.177

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 CHANGED
@@ -6,13 +6,13 @@ 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.176. The npm packages `shinjuku-shield` and
9
+ This is version 0.3.177. 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
- npx -y shinjuku@0.3.176 setup
15
+ npx -y shinjuku@0.3.177 setup
16
16
  ```
17
17
 
18
18
  Setup offers to install the `shinjuku` command and, on Windows, adds npm's
@@ -35,13 +35,13 @@ Every wallet command works after `shinjuku`, for example `shinjuku balance`,
35
35
  Claude Code:
36
36
 
37
37
  ```sh
38
- claude mcp add --scope user shinjuku -- npx -y --no-audit --no-fund shinjuku-shield@0.3.176 mcp
38
+ claude mcp add --scope user shinjuku -- npx -y --no-audit --no-fund shinjuku-shield@0.3.177 mcp
39
39
  ```
40
40
 
41
41
  Claude Desktop (`claude_desktop_config.json`) or Cursor (`~/.cursor/mcp.json`):
42
42
 
43
43
  ```json
44
- { "mcpServers": { "shinjuku": { "command": "npx", "args": ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.176", "mcp"] } } }
44
+ { "mcpServers": { "shinjuku": { "command": "npx", "args": ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.177", "mcp"] } } }
45
45
  ```
46
46
 
47
47
  On native Windows, if the host cannot find `npx`, use `"command": "cmd"` and
@@ -54,7 +54,7 @@ Codex (the Codex app and Codex CLI read the same file, `~/.codex/config.toml`):
54
54
  ```toml
55
55
  [mcp_servers.shinjuku]
56
56
  command = "npx"
57
- args = ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.176", "mcp"]
57
+ args = ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.177", "mcp"]
58
58
  startup_timeout_sec = 120
59
59
  tool_timeout_sec = 300
60
60
  ```
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": "eb8212021af756602a223fcb5e329e0eaf488b7b276850014abef3c6a917eb81",
5
- "bytes": 9401666,
6
- "sourceCommit": "d6237649219078cad2c31a571967809dc888a3fc",
4
+ "sha256": "8d9526ec3aa19b0a648557fb5ccb8568e7988f91bab9b208767fb00a50c8b71f",
5
+ "bytes": 9405041,
6
+ "sourceCommit": "a2e92102622963218d6222d6f5c18c46b858fb3b",
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-06T00:15:32.603Z"
1041
+ "publishedAt": "2026-11-06T00:45:28.350Z"
1042
1042
  }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "shinjuku-shielded",
3
- "version": "0.3.176",
3
+ "version": "0.3.177",
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": "eb821202",
7
- "shinjukuSha256": "eb8212021af756602a223fcb5e329e0eaf488b7b276850014abef3c6a917eb81",
6
+ "shinjukuRelease": "8d9526ec",
7
+ "shinjukuSha256": "8d9526ec3aa19b0a648557fb5ccb8568e7988f91bab9b208767fb00a50c8b71f",
8
8
  "license": "SEE LICENSE IN LICENSE.txt",
9
9
  "author": "Shinjuku Shielded",
10
10
  "homepage": "https://github.com/ShinjukuStaition/shinjuku-shield#readme",
@@ -158023,41 +158023,92 @@ var PROGRESS = /^(downloading the setup files|tor: |history: )/;
158023
158023
  var LABEL = /^ {2}([a-z][a-z -]{1,12}?)( {2,}|(?<=^ {2}.{12}) )(\S.*)$/;
158024
158024
  var COMMAND = /^ {2}(npx |shinjuku |claude |codex |cursor |\$ )/;
158025
158025
  var NEXT = /^(Next|Status|Home|Then): ?(.*)$/;
158026
- var NOT_PROSE = /^\s|[\\/`$]|\s--|\bnpx\b|\biwr\b|\bshinjuku [a-z]/;
158027
- var wrapWidth = (columns) => Number.isSafeInteger(columns) && columns >= 40 ? columns - 1 : void 0;
158028
- function wrapWords(text3, width) {
158029
- const lines = [];
158030
- let line = "";
158031
- for (const word2 of text3.split(" ")) {
158032
- if (line && `${line} ${word2}`.length > width) {
158033
- lines.push(line);
158034
- line = word2;
158035
- } else line = line ? `${line} ${word2}` : word2;
158026
+ var NPM_COMMAND = String.raw`npm(?= (?:install|i|uninstall|ci|cache|config|prefix|root|bin|exec|run|view|ls|update|set|get|-\S*)(?:\s|$))`;
158027
+ var SHINJUKU_COMMAND = String.raw`shinjuku(?= (?:add-funds|backup-export|backup-verify|balance|buy-item|cancel|chat|curl|deposit[a-z-]*|funds-status|help|infer|init|keep-warm|limits|mcp|move|own-address|pay|pay-me|prepare|recover|restore|seller[a-z-]*|setup[a-z-]*|transfer-token|unshield[a-z-]*|version)(?:\s|$))`;
158028
+ var COMMAND_PROGRAM = String.raw`(?:npx|${NPM_COMMAND}|iwr|${SHINJUKU_COMMAND}|hermes|claude|codex|cursor|chmod|chown|wsl|Stop-Process|powershell|cmd|tor)`;
158029
+ var WHOLE_LINE_SIGNS = new RegExp(String.raw`^\s*(?:${COMMAND_PROGRAM}(?= |$)|[&$]|["{}\[\]]|- |[A-Za-z_][\w.-]* = )|^\s+[A-Za-z_][\w.-]*:(?: |$)`);
158030
+ var CODE_TOKEN2 = /^(?:-|[^\s,;()]*[=@\\/:])/;
158031
+ var UNIT_PATTERNS = [
158032
+ // A command program and up to six words after it, to the next , ; ( ); while its words hold code (a flag, a path, =, @
158033
+ // or :), it goes on to the next such sign or the end (Claude Code's "with command: cmd /c npx ... mcp to user config").
158034
+ new RegExp(String.raw`\b${COMMAND_PROGRAM}(?: [^\s,;()]+){1,6}`, "g"),
158035
+ // A path: a drive, \\, ~/ or / and its next words that go on with a separator ("C:\Users\John Smith\.shinjuku-shield").
158036
+ /(?:\b[A-Za-z]:\\|\\\\|~\/|(?<![\w.])\/)[^\s,;()"]*(?: [^\s,;()"]*[\\/][^\s,;()"]*)*/g,
158037
+ // A URL; a backtick span; a flag with its value ("--max-payment 0.05", "--add-to claude-code").
158038
+ /\b[a-z]+:\/\/[^\s,;()"]+/g,
158039
+ /`[^`\n]*`/g,
158040
+ /(?<!\S)--?[A-Za-z][\w-]*(?:[ =](?!-)[^\s,;()]+)?/g,
158041
+ // A quoted example request or a JSON entry ("tor": false, "inference": { "enabled": false }).
158042
+ /"[^"\n]*"(?:\s*:\s*(?:\{[^}\n]*\}|[^\s,;)}]+))?/g
158043
+ ];
158044
+ function unitsOf(text3) {
158045
+ const units = [];
158046
+ for (const pattern of UNIT_PATTERNS) for (const match of text3.matchAll(pattern)) {
158047
+ let to = match.index + match[0].length;
158048
+ if (pattern === UNIT_PATTERNS[0] && match[0].split(" ").slice(1).some((word2) => CODE_TOKEN2.test(word2))) {
158049
+ const rest = /^(?: [^\s,;()]+)*/.exec(text3.slice(to))[0];
158050
+ to += rest.length;
158051
+ }
158052
+ units.push([match.index, to]);
158036
158053
  }
158037
- if (line) lines.push(line);
158038
- return lines;
158054
+ return units;
158039
158055
  }
158040
- function proseKind(line) {
158041
- if (NOT_PROSE.test(line)) return void 0;
158042
- if (DONE.test(line)) return { mark: ["\u25C6 ", "crim"], cls: "verm" };
158043
- if (FAIL.test(line)) return { mark: ["\u25CB ", "crim"], cls: "crim" };
158044
- if (WARN.test(line)) return { mark: ["! ", "verm"], cls: "verm" };
158045
- if (STEP.test(line)) return { mark: ["\u25C6 ", "crim"], cls: "bone" };
158046
- if (PROGRESS.test(line) || COMMAND.test(line) || LABEL.test(line)) return void 0;
158047
- if (NEXT.test(line)) return { cls: "bone", next: true };
158048
- return { cls: "dim" };
158056
+ var wholeLine = (text3) => WHOLE_LINE_SIGNS.test(String(text3));
158057
+ var wrapWidth = (columns) => Number.isSafeInteger(columns) && columns >= 40 ? columns - 1 : void 0;
158058
+ function columnsOf3(text3) {
158059
+ let column = 0;
158060
+ for (const char of String(text3)) column = char === " " ? column - column % 8 + 8 : column + 1;
158061
+ return column;
158062
+ }
158063
+ function wrapWords(text3, firstPrefix, restPrefix, width) {
158064
+ const kept3 = unitsOf(text3);
158065
+ const inside = (at) => kept3.some(([from, to]) => at > from && at < to);
158066
+ const segments = [];
158067
+ let start = 0;
158068
+ for (let at = 1; at < text3.length - 1; at += 1) {
158069
+ if (text3[at] === " " && text3[at + 1] !== " " && text3[at - 1] !== " " && !inside(at)) {
158070
+ segments.push(text3.slice(start, at));
158071
+ start = at + 1;
158072
+ }
158073
+ }
158074
+ segments.push(text3.slice(start));
158075
+ const pieces = [];
158076
+ let piece = segments[0];
158077
+ for (const segment of segments.slice(1)) {
158078
+ const prefix = pieces.length ? restPrefix : firstPrefix;
158079
+ if (columnsOf3(`${prefix}${piece} ${segment}`) > width) {
158080
+ pieces.push(piece);
158081
+ piece = segment;
158082
+ } else piece = `${piece} ${segment}`;
158083
+ }
158084
+ pieces.push(piece);
158085
+ return pieces;
158086
+ }
158087
+ function wrapSetupLine(line, paint2, width) {
158088
+ if (!width || line.startsWith("\r") || columnsOf3(line) <= width || line.includes("\x1B[") || wholeLine(line) || PROGRESS.test(line)) return void 0;
158089
+ const label = LABEL.exec(line);
158090
+ if (label) {
158091
+ const head = ` ${label[1]}${label[2]}`;
158092
+ const under = " ".repeat(columnsOf3(head));
158093
+ const pieces2 = wrapWords(label[3], head, under, width);
158094
+ if (pieces2.length < 2) return void 0;
158095
+ return [
158096
+ paint2([[" ", ""], [label[1] + label[2], "mute"], [pieces2[0], "bone"]]),
158097
+ ...pieces2.slice(1).map((piece) => paint2([[under, ""], [piece, "bone"]]))
158098
+ ].join("\n");
158099
+ }
158100
+ const indent = /^[ \t]*/.exec(line)[0];
158101
+ const body = line.slice(indent.length);
158102
+ const kind = indent ? { cls: "dim" } : DONE.test(line) ? { mark: ["\u25C6 ", "crim"], cls: "verm" } : FAIL.test(line) ? { mark: ["\u25CB ", "crim"], cls: "crim" } : WARN.test(line) ? { mark: ["! ", "verm"], cls: "verm" } : STEP.test(line) ? { mark: ["\u25C6 ", "crim"], cls: "bone" } : NEXT.test(line) ? { cls: "bone", next: true } : { cls: "dim" };
158103
+ const next = indent + (kind.mark ? " " : "");
158104
+ const pieces = wrapWords(body, kind.mark ? kind.mark[0] : indent, next, width);
158105
+ if (pieces.length < 2) return void 0;
158106
+ const first = kind.mark ? paint2([kind.mark, [pieces[0], kind.cls]]) : kind.next ? paintSetupLine(pieces[0], paint2) : paint2([[indent, ""], [pieces[0], kind.cls]]);
158107
+ return [first, ...pieces.slice(1).map((piece) => paint2([[next, ""], [piece, kind.cls]]))].join("\n");
158049
158108
  }
158050
158109
  function paintSetupLine(line, paint2, columns) {
158051
- const width = wrapWidth(columns);
158052
- const kind = width && line.length > width && !line.includes("\x1B[") ? proseKind(line) : void 0;
158053
- if (kind) {
158054
- const indent = kind.mark ? " " : "";
158055
- const pieces = wrapWords(line, width - indent.length);
158056
- if (pieces.length > 1) {
158057
- const first = kind.mark ? paint2([kind.mark, [pieces[0], kind.cls]]) : kind.next ? paintSetupLine(pieces[0], paint2) : paint2([[pieces[0], kind.cls]]);
158058
- return [first, ...pieces.slice(1).map((piece) => paint2([[indent, ""], [piece, kind.cls]]))].join("\n");
158059
- }
158060
- }
158110
+ const wrapped = wrapSetupLine(line, paint2, wrapWidth(columns));
158111
+ if (wrapped !== void 0) return wrapped;
158061
158112
  if (line === "" || line.includes("\x1B[")) return line;
158062
158113
  if (DONE.test(line)) return paint2([["\u25C6 ", "crim"], [line, "verm"]]);
158063
158114
  if (FAIL.test(line)) return paint2([["\u25CB ", "crim"], [line, "crim"]]);
@@ -158122,7 +158173,7 @@ var themedAsk = (ask, paint2, stream = process.stdout) => (prompt, ...rest) => {
158122
158173
  const text3 = String(prompt);
158123
158174
  if (text3.startsWith("? ") || text3.includes("\x1B[")) return ask(prompt, ...rest);
158124
158175
  const width = stream?.isTTY ? wrapWidth(stream.columns) : void 0;
158125
- const pieces = width && text3.length + 2 > width && !NOT_PROSE.test(text3) ? wrapWords(text3, width - 2) : [text3];
158176
+ const pieces = width && columnsOf3(`? ${text3}`) > width && !wholeLine(text3) ? wrapWords(text3, "? ", " ", width) : [text3];
158126
158177
  return ask([paint2([["? ", "crim"], [pieces[0], "bone"]]), ...pieces.slice(1).map((piece) => paint2([[" ", ""], [piece, "bone"]]))].join("\n"), ...rest);
158127
158178
  };
158128
158179
  function setupHeader(paint2, columns = 80, title = "set up the wallet") {