shinjuku-shield 0.3.144 → 0.3.145

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,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.144. The npm packages `shinjuku-shield` and
9
+ This is version 0.3.145. 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.144
15
+ npm install -g shinjuku@0.3.145
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.144 setup`.
21
+ installing, type `npx shinjuku@0.3.145 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.144 mcp
39
+ claude mcp add --scope user shinjuku -- npx -y --no-audit --no-fund shinjuku-shield@0.3.145 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.144", "mcp"] } } }
45
+ { "mcpServers": { "shinjuku": { "command": "npx", "args": ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.145", "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.144", "mcp"]
58
+ args = ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.145", "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": "325c7ac76ca281c68aaeb201b8601305495083f9bfb211578189e55f2f9f298c",
5
- "bytes": 8975329,
6
- "sourceCommit": "4c820285fc768c8cdfbc6496a62d691a71962a14",
4
+ "sha256": "a104f1f4855717492e6a01550a0e2fc02f50651f70a1812173ef94d2bcc963f7",
5
+ "bytes": 8976086,
6
+ "sourceCommit": "e8e4f61d53684f115b44ed99272b87318c254c15",
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-01T09:50:32.342Z"
1041
+ "publishedAt": "2026-11-01T11:08:50.757Z"
1042
1042
  }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "shinjuku-shield",
3
- "version": "0.3.144",
3
+ "version": "0.3.145",
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": "325c7ac7",
7
- "shinjukuSha256": "325c7ac76ca281c68aaeb201b8601305495083f9bfb211578189e55f2f9f298c",
6
+ "shinjukuRelease": "a104f1f4",
7
+ "shinjukuSha256": "a104f1f4855717492e6a01550a0e2fc02f50651f70a1812173ef94d2bcc963f7",
8
8
  "license": "SEE LICENSE IN LICENSE.txt",
9
9
  "author": "Shinjuku Shielded",
10
10
  "homepage": "https://github.com/ShinjukuStaition/shinjuku-shield#readme",
@@ -130169,6 +130169,14 @@ function createWalletTools({
130169
130169
  }
130170
130170
  };
130171
130171
  const joinCounts = { sent: 0, final: 0 };
130172
+ const joinWaiters = /* @__PURE__ */ new Set();
130173
+ let joinWakes = 0;
130174
+ const wakeJoinWaiters = () => {
130175
+ joinWakes += 1;
130176
+ const waiting = [...joinWaiters];
130177
+ joinWaiters.clear();
130178
+ for (const resolve38 of waiting) resolve38();
130179
+ };
130172
130180
  const joiner = (typeof ops.joiner === "function" ? ops.joiner : createAutoJoin)({
130173
130181
  session,
130174
130182
  underLease,
@@ -130180,7 +130188,10 @@ function createWalletTools({
130180
130188
  joinCounts.final += 1;
130181
130189
  markJoinIntents("final");
130182
130190
  refreshAtFinality();
130183
- Promise.resolve(finalityWait).finally(() => continueJoinIntents());
130191
+ Promise.resolve(finalityWait).finally(() => {
130192
+ wakeJoinWaiters();
130193
+ continueJoinIntents();
130194
+ });
130184
130195
  },
130185
130196
  onSent: () => {
130186
130197
  joinCounts.sent += 1;
@@ -131248,8 +131259,9 @@ ${canonical5}`;
131248
131259
  if (joined.ready) {
131249
131260
  payJoinSeen.delete(requestId);
131250
131261
  if (canProgress) {
131251
- payFrom = Date.now();
131252
- payStartedAt.set(requestId, payFrom);
131262
+ const startedPay = Date.now();
131263
+ payFrom = Math.min(startedPay, calledAt + joinCallMaxMs + PAY_ANSWER_MARGIN_MS - CALL_BUDGET_MS);
131264
+ payStartedAt.set(requestId, startedPay);
131253
131265
  }
131254
131266
  log(`MCP_PAY_RETRY_IN_CALL requestId=${requestId} ${code2} join`);
131255
131267
  await refreshIfStale((phase, outcome) => mark(phase, Date.now(), outcome));
@@ -134657,6 +134669,7 @@ ${canonical5}`;
134657
134669
  joinWaitingCalls += 1;
134658
134670
  try {
134659
134671
  for (; ; ) {
134672
+ const wakesSeen = joinWakes;
134660
134673
  const step = await each();
134661
134674
  if (step.stop !== void 0) return { end: "stop", value: step.stop };
134662
134675
  if (finalityClosed) return { end: "close" };
@@ -134682,7 +134695,17 @@ ${canonical5}`;
134682
134695
  }
134683
134696
  }
134684
134697
  const toStart = step.atMs - Date.now();
134685
- await Promise.race([sleep2(Math.min(stepMs, Math.max(0, until - Date.now()), toStart > 0 ? toStart + 50 : stepMs)), stopped, wake()]);
134698
+ if (toStart <= 0 && joinWakes !== wakesSeen) continue;
134699
+ let woke;
134700
+ const stepEnded = new Promise((resolve38) => {
134701
+ woke = resolve38;
134702
+ joinWaiters.add(resolve38);
134703
+ });
134704
+ try {
134705
+ await Promise.race([sleep2(Math.min(stepMs, Math.max(0, until - Date.now()), toStart > 0 ? toStart + 50 : stepMs)), stopped, wake(), stepEnded]);
134706
+ } finally {
134707
+ joinWaiters.delete(woke);
134708
+ }
134686
134709
  }
134687
134710
  } finally {
134688
134711
  joinWaitingCalls -= 1;
@@ -139535,7 +139558,7 @@ var init_tools = __esm({
139535
139558
  BALANCE_AFTER_LANDING_MS = 5e3;
139536
139559
  JOIN_CALL_MAX_MS = 95e3;
139537
139560
  JOIN_CALL_ANSWER_MARGIN_S = 5;
139538
- PAY_AFTER_JOIN_MS = CALL_BUDGET_MS - PAY_ANSWER_MARGIN_MS;
139561
+ PAY_AFTER_JOIN_MS = EARLY_ANSWER_MS + PAY_ANSWER_MARGIN_MS;
139539
139562
  joinAnswerSeconds = (maxMs) => Math.ceil(maxMs / 1e3) + JOIN_CALL_ANSWER_MARGIN_S;
139540
139563
  JOIN_TIME_MS = Object.freeze({ joinLikely: 22e3, joinMost: 4e4, sendLikely: 35e3, sendMost: 5e4 });
139541
139564
  JOIN_NUDGE_QUIET_MS = 15e3;