shinjuku-shield 0.3.87 → 0.3.88

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.87. The npm packages `shinjuku-shield` and
9
+ This is version 0.3.88. The npm packages `shinjuku-shield` and
10
10
  `shinjuku-shielded` hold the same files; `shinjuku` is the short command.
11
11
 
12
12
  ## Set up
13
13
 
14
14
  ```sh
15
- npx -y --no-audit --no-fund shinjuku-shield@0.3.87 setup
15
+ npx -y --no-audit --no-fund shinjuku-shield@0.3.88 setup
16
16
  ```
17
17
 
18
18
  Setup makes the wallet on this machine, a private passphrase file, and the
@@ -24,7 +24,7 @@ server to that host's config.
24
24
  ## The `shinjuku` command
25
25
 
26
26
  ```sh
27
- npm install -g shinjuku@0.3.87
27
+ npm install -g shinjuku@0.3.88
28
28
  shinjuku help
29
29
  ```
30
30
 
@@ -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-shielded -- npx -y --no-audit --no-fund shinjuku-shield@0.3.87 mcp
39
+ claude mcp add --scope user shinjuku-shielded -- npx -y --no-audit --no-fund shinjuku-shield@0.3.88 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-shielded": { "command": "npx", "args": ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.87", "mcp"] } } }
45
+ { "mcpServers": { "shinjuku-shielded": { "command": "npx", "args": ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.88", "mcp"] } } }
46
46
  ```
47
47
 
48
48
  On native Windows, if the host cannot find `npx`, use `"command": "cmd"` and
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": "c0b0b77bafa0cc4e15bd9c01e207c73b8188102f8ed1c9fe5e74e67c7bde008b",
5
- "bytes": 12523149,
6
- "sourceCommit": "d3e53e8aee2580ccfe7aee5fd957aea96457dc73",
4
+ "sha256": "17d8275d7939ba1783b53b5839277d88fdb473fd4e1cfb1e59e6f0226e13d8fb",
5
+ "bytes": 12524840,
6
+ "sourceCommit": "a964944a76529fa5b5f834e16a1e279df6b4e7cf",
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",
@@ -1282,5 +1282,5 @@
1282
1282
  "version": "1.8.0"
1283
1283
  }
1284
1284
  ],
1285
- "publishedAt": "2026-10-23T23:09:24.273Z"
1285
+ "publishedAt": "2026-10-23T23:37:34.040Z"
1286
1286
  }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "shinjuku-shield",
3
- "version": "0.3.87",
3
+ "version": "0.3.88",
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": "c0b0b77b",
7
- "shinjukuSha256": "c0b0b77bafa0cc4e15bd9c01e207c73b8188102f8ed1c9fe5e74e67c7bde008b",
6
+ "shinjukuRelease": "17d8275d",
7
+ "shinjukuSha256": "17d8275d7939ba1783b53b5839277d88fdb473fd4e1cfb1e59e6f0226e13d8fb",
8
8
  "license": "SEE LICENSE IN LICENSE.txt",
9
9
  "author": "Shinjuku Shielded",
10
10
  "homepage": "https://github.com/ShinjukuStaition/shinjuku-mcp#readme",
@@ -103417,7 +103417,9 @@ async function createSellerAdapter({
103417
103417
  }
103418
103418
  syncDirectory2();
103419
103419
  }
103420
- console.log(`SELLER_STORE layout=${OFFERS_LAYOUT} offers=${Object.keys(state.offers).length} migrated=${migrated ? "yes" : "no"} ms=${Date.now() - storeStarted}`);
103420
+ if (receiptVerification === "chain") {
103421
+ console.log(`SELLER_STORE layout=${OFFERS_LAYOUT} offers=${Object.keys(state.offers).length} migrated=${migrated ? "yes" : "no"} ms=${Date.now() - storeStarted}`);
103422
+ }
103421
103423
  let dirty = false;
103422
103424
  let snapshotting = false;
103423
103425
  let generation = 0;
@@ -107367,6 +107369,18 @@ var init_family = __esm({
107367
107369
  }
107368
107370
  });
107369
107371
 
107372
+ // wallet/src/caps/launchCaps.mjs
107373
+ function capFlagFromLaunchLine(flag3, argv2 = process.argv) {
107374
+ const at = argv2.indexOf("mcp");
107375
+ if (at < 0) return false;
107376
+ return argv2.slice(at + 1).some((arg) => arg === flag3 || arg.startsWith(`${flag3}=`));
107377
+ }
107378
+ var init_launchCaps = __esm({
107379
+ "wallet/src/caps/launchCaps.mjs"() {
107380
+ "use strict";
107381
+ }
107382
+ });
107383
+
107370
107384
  // wallet/src/mcp/sendRunner.mjs
107371
107385
  import { spawn as spawn4 } from "node:child_process";
107372
107386
  import { dirname as dirname22, join as join24 } from "node:path";
@@ -109872,9 +109886,9 @@ function refusalSay(a, tool, again, npmVersion) {
109872
109886
  const minutes = minutesText(REFUND_MINUTES);
109873
109887
  const ask = typeof a.requestId === "string" && a.requestId ? `Ask again with request_id ${a.requestId}.` : "Ask again with the same request_id.";
109874
109888
  return [
109875
- `${head} ${again} If the seller never takes it, the money returns in about ${minutes}.`,
109876
- `${head} ${ask} If the seller never takes it, the money returns in about ${minutes}.`,
109877
- `${head} ${ask} Otherwise the money returns in about ${minutes}.`
109889
+ `${head} ${again} If the seller never takes it, the money returns within about ${minutes}.`,
109890
+ `${head} ${ask} If the seller never takes it, the money returns within about ${minutes}.`,
109891
+ `${head} ${ask} Otherwise the money returns within about ${minutes}.`
109878
109892
  ].find((line) => words(line) <= SAY_MAX_WORDS) ?? `${head} ${again}`;
109879
109893
  }
109880
109894
  if (/_retry_same_request$/.test(code2)) {
@@ -109973,7 +109987,7 @@ function refusalSay(a, tool, again, npmVersion) {
109973
109987
  const total = usdcText(a.totalAtomic ?? a.neededAtomic ?? a.amountAtomic);
109974
109988
  const cap = usdcText(a.capAtomic ?? a.limitAtomic);
109975
109989
  if (a.capKind === "call" && total && cap) return `Nothing was paid: it costs ${total} USDC, over this request's ${cap} USDC cap. Allow ${total} USDC to pay it.`;
109976
- return total && cap ? `Nothing was paid: ${total} USDC is over your ${cap} USDC limit. ${raiseLine("--max-payment", npmVersion)}` : `Nothing was paid: this is above your per-payment limit. ${raiseLine("--max-payment", npmVersion)}`;
109990
+ return total && cap ? raiseLine("--max-payment", npmVersion, `Nothing was paid: ${total} USDC is over your ${cap} USDC limit.`) : raiseLine("--max-payment", npmVersion, "Nothing was paid: this is above your per-payment limit.");
109977
109991
  }
109978
109992
  if (MOVE_CAP_CODES.has(code2)) {
109979
109993
  const total = usdcText(a.totalAtomic ?? a.neededAtomic ?? a.amountAtomic);
@@ -109991,10 +110005,10 @@ function refusalSay(a, tool, again, npmVersion) {
109991
110005
  return `Nothing was paid: this request's ${usdcText(a.capAtomic)} USDC cap is below the ${usdcText(a.ceilingAtomic)} USDC ceiling. ${allow}`;
109992
110006
  }
109993
110007
  if ((code2 === "inference_ceiling_over_cap" || code2 === "p03_float_over_maximum") && usdcText(a.totalAtomic) && usdcText(a.capAtomic)) {
109994
- return `Nothing was paid: up to ${usdcText(a.totalAtomic)} USDC is over your ${usdcText(a.capAtomic)} USDC limit. ${raiseLine("--max-payment", npmVersion)}`;
110008
+ return raiseLine("--max-payment", npmVersion, `Nothing was paid: up to ${usdcText(a.totalAtomic)} USDC is over your ${usdcText(a.capAtomic)} USDC limit.`);
109995
110009
  }
109996
110010
  if (code2 === "mcp_session_cap_exceeded" && usdcText(a.capAtomic)) {
109997
- return `Nothing was paid: over your 24-hour limit of ${usdcText(a.capAtomic)} USDC. ${raiseLine("--max-session", npmVersion)}`;
110011
+ return raiseLine("--max-session", npmVersion, `Nothing was paid: over your 24-hour limit of ${usdcText(a.capAtomic)} USDC.`);
109998
110012
  }
109999
110013
  if (OWNER_LIMIT_CODES.has(code2)) return "Nothing was paid. This is above a spending limit set for this wallet.";
110000
110014
  if (code2 === "spend_host_not_allowed") return "Nothing was paid. This wallet's settings do not allow payments to this site.";
@@ -110260,9 +110274,12 @@ function previewReason(a, npmVersion) {
110260
110274
  if (PAY_CAP_CODES.has(code2)) {
110261
110275
  const total = usdcText(a.totalAtomic ?? a.priceAtomic);
110262
110276
  const cap = usdcText(a.capAtomic);
110263
- return total && cap ? `${total} USDC is over your ${cap} USDC limit. ${raiseLine("--max-payment", npmVersion)}` : `it is above your per-payment limit. ${raiseLine("--max-payment", npmVersion)}`;
110277
+ const room = SAY_MAX_WORDS - 3;
110278
+ return total && cap ? raiseLine("--max-payment", npmVersion, `${total} USDC is over your ${cap} USDC limit.`, room) : raiseLine("--max-payment", npmVersion, "it is above your per-payment limit.", room);
110279
+ }
110280
+ if (code2 === "mcp_session_cap_exceeded" && usdcText(a.capAtomic)) {
110281
+ return raiseLine("--max-session", npmVersion, `over your 24-hour limit of ${usdcText(a.capAtomic)} USDC.`, SAY_MAX_WORDS - 3);
110264
110282
  }
110265
- if (code2 === "mcp_session_cap_exceeded" && usdcText(a.capAtomic)) return `over your 24-hour limit of ${usdcText(a.capAtomic)} USDC. ${raiseLine("--max-session", npmVersion)}`;
110266
110283
  if (OWNER_LIMIT_CODES.has(code2)) return "it is above a spending limit set for this wallet.";
110267
110284
  if (BUSY.test(code2)) return "the payment service is busy; try again in a minute.";
110268
110285
  if (code2 === "mcp_wallet_unreadable" || code2 === "p03_float_config_unreadable") return "the price could not be checked just now; try again in a minute.";
@@ -110505,6 +110522,7 @@ var init_say = __esm({
110505
110522
  "use strict";
110506
110523
  init_amounts();
110507
110524
  init_config2();
110525
+ init_launchCaps();
110508
110526
  SAY_MAX_WORDS = 25;
110509
110527
  DECIMALS = 6;
110510
110528
  ATOMIC3 = /^[0-9]{1,31}$/;
@@ -110519,7 +110537,13 @@ var init_say = __esm({
110519
110537
  MOVING_ROLES = /* @__PURE__ */ new Set(["draining", "old pool (switching)"]);
110520
110538
  CLOSE_LATER = "Cannot close yet: the seller could still take this payment. Ask again in about 2 minutes; if unpaid, it closes and the money comes back.";
110521
110539
  PAY_CAP_CODES = /* @__PURE__ */ new Set(["spend_payment_cap_exceeded", "mcp_cap_argument_above_launch_cap"]);
110522
- raiseLine = (flag3, npmVersion) => `Raise it: ${oneTimeCommandLine(`setup --yes ${flag3} <usdc>`, npmVersion)}, then restart this app.`;
110540
+ raiseLine = (flag3, npmVersion, head, room = SAY_MAX_WORDS) => {
110541
+ const lines = capFlagFromLaunchLine(flag3) ? [`Raise ${flag3} in this app's shinjuku-shielded entry, then restart this app.`] : [
110542
+ `Raise it: ${oneTimeCommandLine(`setup --yes ${flag3} <usdc>`, npmVersion)}, then restart this app.`,
110543
+ `Raise ${flag3} with setup in a terminal, then restart this app.`
110544
+ ];
110545
+ return lines.map((line) => `${head} ${line}`).find((line) => words(line) <= room) ?? `${head} ${lines.at(-1)}`;
110546
+ };
110523
110547
  MOVE_CAP_CODES = /* @__PURE__ */ new Set(["mcp_shield_cap_exceeded", "mcp_unshield_cap_exceeded"]);
110524
110548
  OWNER_LIMIT_CODES = /* @__PURE__ */ new Set([
110525
110549
  "mcp_session_cap_exceeded",
@@ -123332,7 +123356,7 @@ ${canonical5}`;
123332
123356
  } catch {
123333
123357
  }
123334
123358
  const sessionLeft = sessionLeftShown(policy, countStore);
123335
- const sessionSummary = `Spending limits: ${capWords(policy.limits.maxPaymentAtomic)} per payment and ${capWords(policy.limits.maxSessionAtomic)} in any 24 hours, for this wallet (every MCP process counts; a pool upgrade starts a new 24-hour count)${sessionLeft === null ? "" : ` (${usdcText2(sessionLeft)} USDC left now)`}; ${usdcText2(policy.sessionSpentAtomic) ?? "0"} USDC paid in the last 24 hours. They come from this MCP server's launch line in the host (--max-payment and --max-session, in USDC like 0.05), else from the limits setup recorded. To change them, edit those flags in the host's MCP entry, or run ${terminalCommand("setup --yes --max-payment <usdc> --max-session <usdc>")} in a terminal; then restart the host. The wallet file also holds its own limits (--max-payment, and --max-cumulative for all payments together): ${terminalCommand("limits")} shows and changes them`;
123359
+ const sessionSummary = `Spending limits: ${capWords(policy.limits.maxPaymentAtomic)} per payment and ${capWords(policy.limits.maxSessionAtomic)} in any 24 hours, for this wallet (every MCP process counts; a pool upgrade starts a new 24-hour count)${sessionLeft === null ? "" : ` (${usdcText2(sessionLeft)} USDC left now)`}; ${usdcText2(policy.sessionSpentAtomic) ?? "0"} USDC paid in the last 24 hours. --max-payment comes from ${capPlaceWords("--max-payment")}, and --max-session from ${capPlaceWords("--max-session")}. To change one from the host's entry, edit that flag (in USDC, like 0.05) in the host's entry for shinjuku-shielded; to change one from setup, run ${terminalCommand("setup --yes --max-payment <usdc> --max-session <usdc>")} in a terminal; then restart the host. The wallet file also holds its own limits (--max-payment, and --max-cumulative for all payments together): ${terminalCommand("limits")} shows and changes them`;
123336
123360
  return json3({
123337
123361
  ok: true,
123338
123362
  ...reportPublic,
@@ -128920,7 +128944,7 @@ function createSetupTools({
128920
128944
  };
128921
128945
  return { tools: [setupTool, statusTool, ...MCP_TOOL_NAMES.map((name) => name === "x402_discover" ? discoverTool(discoverCacheDir) : notSetUp(name))], doneTool };
128922
128946
  }
128923
- var import_web3133, shownCaps, RELEASE_RETRY_MS, STAGE_WORDS, stageWords, INTERNAL_BALANCE_DETAIL, shownBreakdown, sessionLeftShown, TOKEN_UNIT_TOOLS, RESOURCE_PAYMENT_WAL_PREFIX2, POOL_LAYOUT_CODE, POOL_LAYOUT_UPDATE, USEPOD_VIA_INFERENCE_CHAT, SEND_RUNS_ON, DEPOSIT_RUNS_ON, CLI_FUNDS_PLAN_PREFIX, CLI_FUNDS_SCHEMA, SELF_PAY_ORIGIN3, REQUEST_ID4, POSITIVE_ATOMIC6, PRIVATE_HOST3, FORBIDDEN_HEADERS3, MAX_BODY_BYTES2, PREVIEW_TIMEOUT_MS, PREVIEW_SELLER_READ_MS, CALL_BUDGET_MS, budgetLeft, MONEY_FIRST_ANSWER_MS, BALANCE_AFTER_LANDING_MS, JOIN_CALL_MAX_MS, JOIN_NUDGE_QUIET_MS, JOIN_STEP_MS, sleep2, PROGRESS_EVERY_MS2, READ_BUDGET_MS, UNPAID_TOR_TRY_MS, UNPAID_CLEAR_MS, READ_BUDGET_TOOLS, FLOAT_BUSY_CODES, RETRY_MARGIN_MS, ASK_PAY_CODES, runningNpmVersion, terminalCommand, capRaiseText, cheaperSellerText, limitNext, SAFE_TEXT, MCP_TOOL_ALIASES, POOL_SWITCH_WHY, POOL_SWITCH_NEXT, SWITCH_STATES, quietSwitch, switchKey, ATOMIC_TEXT, FLOAT_ID, ANSWERED_EXIT_RETRY_MS, ANSWERED_EXIT_UNCONFIRMED_MS, ANSWERED_EXIT_RETRY_WINDOW_MS, ANSWERED_EXIT_CLOSED, switchAmount, switchEta, switchRows, OWNER_CAP_CODES, JOIN_END_MCP, JOIN_END_TERMINAL_LIBRARY, JOIN_RETRY_BACKOFF_MS, WALLET_CAP_FIX, MCP_CAP_FIX, capFix, ownerOnlyNext, mcpNext, CONFIDENTIAL_RETIRED, json3, answerResult, discoverTool, refuse12, publicOffer, FLOAT_PAID_CODES, FLOAT_PRIVATE_LEG, floatStillSettling, MONEY_ID2, toRecordId, linkKindOf, moneyId, REFUSED_CODES, refusedCodeOf, PLAIN_REASONS, plainReason, KEPT_SEND_TRIES, shownId, isSplitSend, sendPartId, PROMISED_NEXT, PUBLIC_READ_TIMEOUT_MS, withTimeout, ownKey, readFailure, OWN_KEY_TOKENS_MAX, OWN_TOKENS_GRACE_MS, tokenAmountText, elsewhereId, AGENT_ID_SCHEMA, agentIdName, minutesText2, ageWords2, DEPOSIT_SENT_STATES, depositLanded, usdcText2, walkWalletHistory, REFRESH_LEASE_WALK_MS, HOME_MARKS_SETTLED_MS2, AUTO_BACKUPS_KEPT, AUTO_BACKUP_NAME, AUTO_BACKUP_VERIFIED, FRONTED_SETTLE_MARGIN_SLOTS, BALANCE_REFRESH_WAIT_MS, BALANCE_REFRESH_GRACE_MS, BALANCE_REFRESH_LONG_MS, INBOUND_REFRESH_AGE_MS, CAP_BALANCE_WAIT_MS, CAP_BALANCE_RETRY_MS, REFRESH_RETRY_MS, FINALITY_POLL_MS, FINALITY_WAIT_MS, FINALITY_REFRESH_LIMIT_MS, POOL_WATCH_MS, POOL_WATCH_POLL_MS, EARLY_BALANCE_DELAY_MS, FINALITY_SETTLE_WINDOW_SLOTS, PUBLIC_READ_ANSWER_MS, SWITCH_WAIT_MS, UNSHIELD_TO_NO_USDC_DETAIL, UNSHIELD_TO_INVALID_NEXT, INFERENCE_MIN_MAX_TOKENS, ELICIT_TIMEOUT_MS, ELICIT_UNSHOWN_MS, elicitUnshown, POLL_SECONDS3, TRANSFER_CHANGE_READ_MS, TEMP_CLEAN_DELAY_MS, KEPT_ON_DISK, MAX_SHIELDED_BALANCE_ATOMIC, receiveGenerator, MCP_TOOL_NAMES, MCP_HIDDEN_TOOL_NAMES, setupTerminalNext, SETUP_POLL_NEXT, PRIVATE_INFERENCE_WHY, PRIVATE_INFERENCE_NEXT;
128947
+ var import_web3133, shownCaps, RELEASE_RETRY_MS, STAGE_WORDS, stageWords, INTERNAL_BALANCE_DETAIL, shownBreakdown, sessionLeftShown, TOKEN_UNIT_TOOLS, RESOURCE_PAYMENT_WAL_PREFIX2, POOL_LAYOUT_CODE, POOL_LAYOUT_UPDATE, USEPOD_VIA_INFERENCE_CHAT, SEND_RUNS_ON, DEPOSIT_RUNS_ON, CLI_FUNDS_PLAN_PREFIX, CLI_FUNDS_SCHEMA, SELF_PAY_ORIGIN3, REQUEST_ID4, POSITIVE_ATOMIC6, PRIVATE_HOST3, FORBIDDEN_HEADERS3, MAX_BODY_BYTES2, PREVIEW_TIMEOUT_MS, PREVIEW_SELLER_READ_MS, CALL_BUDGET_MS, budgetLeft, MONEY_FIRST_ANSWER_MS, BALANCE_AFTER_LANDING_MS, JOIN_CALL_MAX_MS, JOIN_NUDGE_QUIET_MS, JOIN_STEP_MS, sleep2, PROGRESS_EVERY_MS2, READ_BUDGET_MS, UNPAID_TOR_TRY_MS, UNPAID_CLEAR_MS, READ_BUDGET_TOOLS, FLOAT_BUSY_CODES, RETRY_MARGIN_MS, ASK_PAY_CODES, runningNpmVersion, terminalCommand, capPlaceWords, capRaiseText, cheaperSellerText, limitNext, SAFE_TEXT, MCP_TOOL_ALIASES, POOL_SWITCH_WHY, POOL_SWITCH_NEXT, SWITCH_STATES, quietSwitch, switchKey, ATOMIC_TEXT, FLOAT_ID, ANSWERED_EXIT_RETRY_MS, ANSWERED_EXIT_UNCONFIRMED_MS, ANSWERED_EXIT_RETRY_WINDOW_MS, ANSWERED_EXIT_CLOSED, switchAmount, switchEta, switchRows, OWNER_CAP_CODES, JOIN_END_MCP, JOIN_END_TERMINAL_LIBRARY, JOIN_RETRY_BACKOFF_MS, WALLET_CAP_FIX, MCP_CAP_FIX, capFix, ownerOnlyNext, mcpNext, CONFIDENTIAL_RETIRED, json3, answerResult, discoverTool, refuse12, publicOffer, FLOAT_PAID_CODES, FLOAT_PRIVATE_LEG, floatStillSettling, MONEY_ID2, toRecordId, linkKindOf, moneyId, REFUSED_CODES, refusedCodeOf, PLAIN_REASONS, plainReason, KEPT_SEND_TRIES, shownId, isSplitSend, sendPartId, PROMISED_NEXT, PUBLIC_READ_TIMEOUT_MS, withTimeout, ownKey, readFailure, OWN_KEY_TOKENS_MAX, OWN_TOKENS_GRACE_MS, tokenAmountText, elsewhereId, AGENT_ID_SCHEMA, agentIdName, minutesText2, ageWords2, DEPOSIT_SENT_STATES, depositLanded, usdcText2, walkWalletHistory, REFRESH_LEASE_WALK_MS, HOME_MARKS_SETTLED_MS2, AUTO_BACKUPS_KEPT, AUTO_BACKUP_NAME, AUTO_BACKUP_VERIFIED, FRONTED_SETTLE_MARGIN_SLOTS, BALANCE_REFRESH_WAIT_MS, BALANCE_REFRESH_GRACE_MS, BALANCE_REFRESH_LONG_MS, INBOUND_REFRESH_AGE_MS, CAP_BALANCE_WAIT_MS, CAP_BALANCE_RETRY_MS, REFRESH_RETRY_MS, FINALITY_POLL_MS, FINALITY_WAIT_MS, FINALITY_REFRESH_LIMIT_MS, POOL_WATCH_MS, POOL_WATCH_POLL_MS, EARLY_BALANCE_DELAY_MS, FINALITY_SETTLE_WINDOW_SLOTS, PUBLIC_READ_ANSWER_MS, SWITCH_WAIT_MS, UNSHIELD_TO_NO_USDC_DETAIL, UNSHIELD_TO_INVALID_NEXT, INFERENCE_MIN_MAX_TOKENS, ELICIT_TIMEOUT_MS, ELICIT_UNSHOWN_MS, elicitUnshown, POLL_SECONDS3, TRANSFER_CHANGE_READ_MS, TEMP_CLEAN_DELAY_MS, KEPT_ON_DISK, MAX_SHIELDED_BALANCE_ATOMIC, receiveGenerator, MCP_TOOL_NAMES, MCP_HIDDEN_TOOL_NAMES, setupTerminalNext, SETUP_POLL_NEXT, PRIVATE_INFERENCE_WHY, PRIVATE_INFERENCE_NEXT;
128924
128948
  var init_tools = __esm({
128925
128949
  "wallet/src/mcp/tools.mjs"() {
128926
128950
  "use strict";
@@ -128948,6 +128972,7 @@ var init_tools = __esm({
128948
128972
  init_book();
128949
128973
  init_errorLine();
128950
128974
  init_spendPolicy();
128975
+ init_launchCaps();
128951
128976
  import_web3133 = __toESM(require_index_cjs(), 1);
128952
128977
  init_esm2();
128953
128978
  init_deposit();
@@ -129051,9 +129076,14 @@ var init_tools = __esm({
129051
129076
  RETRY_MARGIN_MS = 15e3;
129052
129077
  ASK_PAY_CODES = /* @__PURE__ */ new Set(["spend_payment_cap_exceeded", "mcp_cap_argument_above_launch_cap"]);
129053
129078
  terminalCommand = (words2) => oneTimeCommandLine(words2, runningNpmVersion);
129079
+ capPlaceWords = (flag3) => capFlagFromLaunchLine(flag3) ? `the host's entry (${flag3} in its args)` : "setup (config.json in the wallet folder)";
129054
129080
  capRaiseText = (flag3) => {
129081
+ if (capFlagFromLaunchLine(flag3)) {
129082
+ const both2 = flag3 === "--max-payment" ? " (raise --max-session there too when it is below the new amount: the server refuses to start with it lower)" : "";
129083
+ return `This limit comes from the host's entry for shinjuku-shielded: its args hold ${flag3}. To raise it, the user changes that value there${both2}, with amounts in USDC like 0.5, then restarts the agent host (Claude Desktop: claude_desktop_config.json; Cursor: ~/.cursor/mcp.json; Claude Code: claude mcp get shinjuku-shielded shows the entry, then claude mcp remove shinjuku-shielded and claude mcp add it again with the new value; Hermes: config.yaml). Running setup does not change this limit: the entry's ${flag3} wins over the limit setup records.`;
129084
+ }
129055
129085
  const both = flag3 === "--max-payment" ? " (add --max-session <usdc> too when the 24-hour limit is below the new amount: setup refuses it lower)" : "";
129056
- return `To raise it, the user runs this in a terminal: ${terminalCommand(`setup --yes ${flag3} <usdc>`)}${both}, with amounts in USDC like 0.5, then restarts the agent host. setup keeps the wallet and saves the limit in config.json in the wallet folder (~/.carbon-shielded-wallet, or SHIELDED_WALLET_HOME when it is set). If the host's entry for shinjuku-shielded has ${flag3} in its args, that value wins: change it there instead (Claude Desktop: claude_desktop_config.json; Cursor: ~/.cursor/mcp.json; Claude Code: claude mcp get shinjuku-shielded shows the entry; Hermes: config.yaml).`;
129086
+ return `This limit comes from setup (the host's entry has no ${flag3}). To raise it, the user runs this in a terminal: ${terminalCommand(`setup --yes ${flag3} <usdc>`)}${both}, with amounts in USDC like 0.5, then restarts the agent host. setup keeps the wallet and saves the limit in config.json in the wallet folder (~/.carbon-shielded-wallet, or SHIELDED_WALLET_HOME when it is set).`;
129057
129087
  };
129058
129088
  cheaperSellerText = "Or call x402_discover to look for a cheaper seller of the same data.";
129059
129089
  limitNext = ({ totalAtomic, capAtomic } = {}, { flag: flag3 = "--max-payment", verb = "paid", noun = "costs" } = {}) => `${totalAtomic && capAtomic ? `Nothing was ${verb}. Tell the user: this ${noun} ${usdcText2(totalAtomic)} USDC and the limit (${flag3}) is ${usdcText2(capAtomic)} USDC.` : `Nothing was ${verb}. Tell the user this is above the limit (${flag3}).`} ${capRaiseText(flag3)}${verb === "paid" ? ` ${cheaperSellerText}` : ""}`;