shinjuku-shielded 0.3.155 → 0.3.156
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 +22 -4
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.156. 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.156
|
|
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.156 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.156 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.156", "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.156", "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": "003fb669ed2395e72fbedad6336c943c92c940fba878d03c4fa03245e2b5ae78",
|
|
5
|
+
"bytes": 9056153,
|
|
6
|
+
"sourceCommit": "41849a3c692d96c166971d1dd5e13ca84cbceb12",
|
|
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-03T06:19:18.430Z"
|
|
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.156",
|
|
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": "003fb669",
|
|
7
|
+
"shinjukuSha256": "003fb669ed2395e72fbedad6336c943c92c940fba878d03c4fa03245e2b5ae78",
|
|
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
|
@@ -42618,6 +42618,15 @@ function markPhase(phase, outcome) {
|
|
|
42618
42618
|
} catch {
|
|
42619
42619
|
}
|
|
42620
42620
|
}
|
|
42621
|
+
function boundMarkPhase() {
|
|
42622
|
+
const write = scope.getStore();
|
|
42623
|
+
return (phase, outcome) => {
|
|
42624
|
+
try {
|
|
42625
|
+
write?.(phase, outcome);
|
|
42626
|
+
} catch {
|
|
42627
|
+
}
|
|
42628
|
+
};
|
|
42629
|
+
}
|
|
42621
42630
|
function poolReadOutcome(slot3, moved) {
|
|
42622
42631
|
let text3;
|
|
42623
42632
|
try {
|
|
@@ -42917,6 +42926,9 @@ function tunnelRefused(statusCode) {
|
|
|
42917
42926
|
}
|
|
42918
42927
|
function optimisticConnect(params, { proxyHost, proxyPort, closedInRow }) {
|
|
42919
42928
|
const target = String(params.path);
|
|
42929
|
+
const mark = boundMarkPhase();
|
|
42930
|
+
const startedAt = Date.now();
|
|
42931
|
+
let dials = 0;
|
|
42920
42932
|
const head = `CONNECT ${target} HTTP/1.1\r
|
|
42921
42933
|
${Object.entries(params.headers ?? {}).filter(([name, value2]) => value2 !== void 0 && !/[\r\n]/.test(`${name}${value2}`)).map(([name, value2]) => `${name}: ${value2}\r
|
|
42922
42934
|
`).join("")}\r
|
|
@@ -42969,6 +42981,7 @@ ${Object.entries(params.headers ?? {}).filter(([name, value2]) => value2 !== voi
|
|
|
42969
42981
|
if (first) pendingReject = reject;
|
|
42970
42982
|
reply = Buffer.alloc(0);
|
|
42971
42983
|
ready = false;
|
|
42984
|
+
dials += 1;
|
|
42972
42985
|
socket = net.connect(proxyPort, proxyHost);
|
|
42973
42986
|
socket.setNoDelay(true);
|
|
42974
42987
|
let connected = false;
|
|
@@ -42977,6 +42990,7 @@ ${Object.entries(params.headers ?? {}).filter(([name, value2]) => value2 !== voi
|
|
|
42977
42990
|
socket.write(head);
|
|
42978
42991
|
for (const chunk of sent) socket.write(chunk);
|
|
42979
42992
|
ready = true;
|
|
42993
|
+
mark("tunnel-sent", `dial${dials}`);
|
|
42980
42994
|
if (first) pendingReject = void 0;
|
|
42981
42995
|
resolve39();
|
|
42982
42996
|
});
|
|
@@ -42990,9 +43004,11 @@ ${Object.entries(params.headers ?? {}).filter(([name, value2]) => value2 !== voi
|
|
|
42990
43004
|
if (end < 0) return;
|
|
42991
43005
|
const status = Number(/^HTTP\/1\.[01] (\d{3})/.exec(reply.subarray(0, reply.indexOf("\r\n")).toString("latin1"))?.[1] ?? 0);
|
|
42992
43006
|
if (status !== 200) {
|
|
43007
|
+
mark("tunnel-refused", `http${status}`);
|
|
42993
43008
|
stream.destroy(tunnelRefused(status));
|
|
42994
43009
|
return;
|
|
42995
43010
|
}
|
|
43011
|
+
mark("tunnel-200", `ms${Date.now() - startedAt}_dial${dials}`);
|
|
42996
43012
|
open4 = true;
|
|
42997
43013
|
sent.length = 0;
|
|
42998
43014
|
closedInRow.delete(target);
|
|
@@ -43019,6 +43035,7 @@ ${Object.entries(params.headers ?? {}).filter(([name, value2]) => value2 !== voi
|
|
|
43019
43035
|
return;
|
|
43020
43036
|
}
|
|
43021
43037
|
const closed = (closedInRow.get(target) ?? 0) + 1;
|
|
43038
|
+
mark("tunnel-closed", `n${closed}`);
|
|
43022
43039
|
if (closed < TUNNEL_CLOSED_TRIES) {
|
|
43023
43040
|
closedInRow.set(target, closed);
|
|
43024
43041
|
dial(false).catch((error) => stream.destroy(error));
|
|
@@ -43042,6 +43059,7 @@ var init_tunnelGuard = __esm({
|
|
|
43042
43059
|
"wallet/src/net/tunnelGuard.mjs"() {
|
|
43043
43060
|
"use strict";
|
|
43044
43061
|
init_keepAlive();
|
|
43062
|
+
init_phaseTiming();
|
|
43045
43063
|
RUN_MARK = "SHINJUKU_WALLET_PROXIED";
|
|
43046
43064
|
TUNNEL_CLOSED_TRIES = 3;
|
|
43047
43065
|
}
|
|
@@ -111049,9 +111067,9 @@ async function payTurn({ session, target, method, headers, body, maxPrice, polic
|
|
|
111049
111067
|
if (session.closed) fail26("fetch_session_closed", "this payer session is closed; open a new one");
|
|
111050
111068
|
const paymentStartedAt = Date.now();
|
|
111051
111069
|
const timing = typeof opts?.timing === "function" ? opts.timing : session.timing();
|
|
111052
|
-
const mark = (phase) => {
|
|
111070
|
+
const mark = (phase, outcome) => {
|
|
111053
111071
|
try {
|
|
111054
|
-
timing?.(phase);
|
|
111072
|
+
timing?.(phase, outcome);
|
|
111055
111073
|
} catch {
|
|
111056
111074
|
}
|
|
111057
111075
|
};
|
|
@@ -111069,12 +111087,12 @@ async function payTurn({ session, target, method, headers, body, maxPrice, polic
|
|
|
111069
111087
|
warmFloatConfig({ origin: new URL(session.memoServiceUrl).origin, timing: mark });
|
|
111070
111088
|
startRecoveredPaymentTools(lazyProofTools(session));
|
|
111071
111089
|
}
|
|
111072
|
-
const response = await unpaidRequest(target, () => keepAliveInit({
|
|
111090
|
+
const response = await withPhaseScope(mark, "fetch", () => unpaidRequest(target, () => keepAliveInit({
|
|
111073
111091
|
method,
|
|
111074
111092
|
headers,
|
|
111075
111093
|
...body ? { body } : {},
|
|
111076
111094
|
redirect: "manual"
|
|
111077
|
-
}), { timeoutMs: Number.isSafeInteger(opts?.unpaidTimeoutMs) && opts.unpaidTimeoutMs > 0 ? opts.unpaidTimeoutMs : void 0, onCut: opts?.onUnpaidCut });
|
|
111095
|
+
}), { timeoutMs: Number.isSafeInteger(opts?.unpaidTimeoutMs) && opts.unpaidTimeoutMs > 0 ? opts.unpaidTimeoutMs : void 0, onCut: opts?.onUnpaidCut }));
|
|
111078
111096
|
if (response.status !== 402) return response;
|
|
111079
111097
|
const encoded = response.headers.get("PAYMENT-REQUIRED");
|
|
111080
111098
|
void drainBody(response);
|