shinjuku-shield 0.3.253 → 0.3.254

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
@@ -8,7 +8,7 @@ web services and AI answers from your private balance, so the payment does
8
8
  not show who paid. It works inside your AI app (Claude, Cursor, Codex) and in
9
9
  a terminal. Only you hold the keys: they never leave your computer.
10
10
 
11
- This is version 0.3.253. The command is `shinjuku`.
11
+ This is version 0.3.254. The command is `shinjuku`.
12
12
 
13
13
  ## Set up
14
14
 
@@ -112,7 +112,7 @@ Add it yourself. The name of the wallet in your app is `shinjuku`.
112
112
  Claude Code:
113
113
 
114
114
  ```sh
115
- claude mcp add --scope user shinjuku -- npx -y --prefer-offline --no-audit --no-fund shinjuku-shield@0.3.253 mcp
115
+ claude mcp add --scope user shinjuku -- npx -y --prefer-offline --no-audit --no-fund shinjuku-shield@0.3.254 mcp
116
116
  ```
117
117
 
118
118
  `--prefer-offline` runs the copy of the wallet that npm saved. If npm has not saved it yet, that start asks
@@ -131,7 +131,7 @@ with the Releases table in
131
131
  Versions are published from GitHub Actions with npm provenance.
132
132
 
133
133
  `shinjuku-shield` is the package that holds the wallet. `shinjuku-shielded`
134
- 0.3.253, its older name, runs this package at the same version, so wallets
134
+ 0.3.254, its older name, runs this package at the same version, so wallets
135
135
  installed under that name keep updating. New installs use `shinjuku`.
136
136
 
137
137
  The full guide is
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": "0593a1731586d3389be05986bbeb6c5c9168ae0cea661417e7db211fb1d3ac82",
5
- "bytes": 10871936,
6
- "sourceCommit": "6b916a0b1ceb40af662c2cfe445b22cfb8a843cd",
4
+ "sha256": "a1a6fceeff167022d55c4b58f90dabe79565d545ea52e48fd73fa04c890534f6",
5
+ "bytes": 10875671,
6
+ "sourceCommit": "9a5fa6769207843962e6d2e25cf765c98e402e71",
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",
@@ -1075,8 +1075,8 @@
1075
1075
  ],
1076
1076
  "seller": {
1077
1077
  "file": "shinjuku-seller.mjs",
1078
- "sha256": "c9e3036ebf406a91541a90d958516ab50fcfc148c372b15a7aef813e8c9764ba",
1079
- "bytes": 4301407,
1078
+ "sha256": "c06dc2843c63a590ab895ff7690b893a0ec984c4a1a25cc0ceab239e52999cfe",
1079
+ "bytes": 4301500,
1080
1080
  "entry": "wallet/src/seller/exact/index.mjs",
1081
1081
  "external": [
1082
1082
  "@x402/core/http",
@@ -2080,5 +2080,5 @@
2080
2080
  }
2081
2081
  ]
2082
2082
  },
2083
- "publishedAt": "2026-11-19T20:48:55.451Z"
2083
+ "publishedAt": "2026-11-20T02:29:30.665Z"
2084
2084
  }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "shinjuku-shield",
3
- "version": "0.3.253",
3
+ "version": "0.3.254",
4
4
  "mcpName": "io.github.ShinjukuStaition/shinjuku-shield",
5
5
  "description": "Shinjuku Shield, private x402 payments 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": "0593a173",
7
- "shinjukuSha256": "0593a1731586d3389be05986bbeb6c5c9168ae0cea661417e7db211fb1d3ac82",
6
+ "shinjukuRelease": "a1a6fcee",
7
+ "shinjukuSha256": "a1a6fceeff167022d55c4b58f90dabe79565d545ea52e48fd73fa04c890534f6",
8
8
  "license": "SEE LICENSE IN LICENSE.txt",
9
9
  "author": "Shinjuku Shield",
10
10
  "homepage": "https://github.com/ShinjukuStaition/shinjuku-shield#readme",
@@ -46052,6 +46052,7 @@ var init_errorCodes = __esm({
46052
46052
  "inference_messages_invalid",
46053
46053
  "inference_tools_invalid",
46054
46054
  "inference_model_unknown",
46055
+ "inference_model_not_offered",
46055
46056
  "inference_no_provider",
46056
46057
  "inference_origin_refused",
46057
46058
  "inference_out_of_tokens",
@@ -47631,6 +47632,8 @@ var init_errorCodes = __esm({
47631
47632
  "max_tokens",
47632
47633
  "inference_models",
47633
47634
  "inference_chat",
47635
+ "ask_deepseek_private",
47636
+ "ask_kimi_private",
47634
47637
  "inference_server",
47635
47638
  "mcp_tool_disabled",
47636
47639
  "mcp_unshield_to_not_allowed",
@@ -81208,6 +81208,7 @@ var init_errorCodes = __esm({
81208
81208
  "inference_messages_invalid",
81209
81209
  "inference_tools_invalid",
81210
81210
  "inference_model_unknown",
81211
+ "inference_model_not_offered",
81211
81212
  "inference_no_provider",
81212
81213
  "inference_origin_refused",
81213
81214
  "inference_out_of_tokens",
@@ -82787,6 +82788,8 @@ var init_errorCodes = __esm({
82787
82788
  "max_tokens",
82788
82789
  "inference_models",
82789
82790
  "inference_chat",
82791
+ "ask_deepseek_private",
82792
+ "ask_kimi_private",
82790
82793
  "inference_server",
82791
82794
  "mcp_tool_disabled",
82792
82795
  "mcp_unshield_to_not_allowed",
@@ -127428,7 +127431,7 @@ var init_say = __esm({
127428
127431
  init_programStart();
127429
127432
  SAY_MAX_WORDS = 25;
127430
127433
  CHECK_FIRST = "Ask for your Shinjuku balance before you try again.";
127431
- MONEY_TOOLS = /* @__PURE__ */ new Set(["pay_for_service", "inference_chat", "wallet_unshield", "wallet_shield", "wallet_shield_from_elsewhere"]);
127434
+ MONEY_TOOLS = /* @__PURE__ */ new Set(["pay_for_service", "inference_chat", "ask_deepseek_private", "ask_kimi_private", "wallet_unshield", "wallet_shield", "wallet_shield_from_elsewhere"]);
127432
127435
  nextStepOf = (tool) => tool === void 0 || MONEY_TOOLS.has(tool) ? CHECK_FIRST : "Ask again.";
127433
127436
  DECIMALS = 6;
127434
127437
  ATOMIC9 = /^[0-9]{1,31}$/;
@@ -149073,6 +149076,46 @@ ${key}`).digest("hex").slice(0, 40)}.json`);
149073
149076
  if (waited === void 0) return torWaitingAnswer(what);
149074
149077
  return waited.output;
149075
149078
  }
149079
+ function askPrivateTool(chat, name, company) {
149080
+ const label = `${company} Private`;
149081
+ const { model: _model, ...properties } = chat.inputSchema.properties;
149082
+ return {
149083
+ name,
149084
+ title: `Ask ${label} (a private AI model), paid privately`,
149085
+ description: `Ask ${label} one question: the uncensored ${company} model through Shinjuku's own AI address (it does not store the question), paid privately from the PRIVATE balance. Use this for any request to ask ` + label + ', never your own answer. Pass prompt (or messages). It is inference_chat with that model: the same price (inference_models lists it), spending limits, request_id rules and Tor rule (with Tor off the wallet asks the user to turn Tor on; nothing is paid without Tor). Example: { "prompt": "Name one ocean" }.',
149086
+ inputSchema: { ...chat.inputSchema, properties },
149087
+ annotations: { ...chat.annotations },
149088
+ async run(args = {}, ctx = {}) {
149089
+ if ((args?.prompt === void 0 || args.prompt === null) && (args?.messages === void 0 || args.messages === null)) {
149090
+ return refuse11(
149091
+ "inference_messages_invalid",
149092
+ `no prompt or messages were given, so nothing was asked of ${label} and nothing was paid`,
149093
+ `ask the user what to ask ${label}, then call ${name} with prompt`,
149094
+ { say: `What should I ask ${label}? Nothing was paid.` }
149095
+ );
149096
+ }
149097
+ if (!proxied()) return chat.run({ ...args }, ctx);
149098
+ let ai;
149099
+ try {
149100
+ ai = await shinjukuAiModels({ proxied: true });
149101
+ } catch {
149102
+ ai = void 0;
149103
+ }
149104
+ const id = ai?.models?.find((entry) => typeof entry?.id === "string" && modelFamily(entry.id) === company)?.id;
149105
+ if (!id) {
149106
+ const why = ai?.paused ? "Shinjuku's AI address is paused" : ai?.checked ? `Shinjuku's AI list has no ${company} model now` : "Shinjuku's AI list could not be read";
149107
+ log(`MCP_ASK_PRIVATE_NO_MODEL tool=${name} checked=${ai?.checked === true} paused=${ai?.paused === true}`);
149108
+ return refuse11(
149109
+ "inference_model_not_offered",
149110
+ `${why}; nothing was asked or paid`,
149111
+ `Tell the user ${label} is not available right now and nothing was paid; inference_models lists the models that are`,
149112
+ { say: `${label} is not available right now. Nothing was paid.` }
149113
+ );
149114
+ }
149115
+ return chat.run({ ...args, model: id }, ctx);
149116
+ }
149117
+ };
149118
+ }
149076
149119
  const progressEveryMs = Number.isSafeInteger(ops.progressEveryMs) && ops.progressEveryMs > 0 ? ops.progressEveryMs : PROGRESS_EVERY_MS2;
149077
149120
  const statusWait = (promises, ms, progress2, message) => waitOrProgress(promises, ms, { progress: progress2, message, everyMs: progressEveryMs });
149078
149121
  const NOT_ALLOWED_WORDS = Object.freeze({
@@ -161232,6 +161275,8 @@ ${JSON.stringify(args ?? {})}`;
161232
161275
  ))));
161233
161276
  for (let at = 0; at < tools.length; at += 1) tools[at] = withView(tools[at]);
161234
161277
  tools.push(cardPayTool(tools.find((tool) => tool.name === "pay_for_service")));
161278
+ const chatTool = tools.find((tool) => tool.name === "inference_chat");
161279
+ for (const [name, company] of ASK_PRIVATE_TOOLS) tools.push(askPrivateTool(chatTool, name, company));
161235
161280
  tools.push({
161236
161281
  name: "wallet_tor",
161237
161282
  title: "Turn Tor on",
@@ -161975,7 +162020,7 @@ function createSetupTools({
161975
162020
  finalPending
161976
162021
  };
161977
162022
  }
161978
- var import_web3137, X402_V1_NEXT, shownCaps, shinjukuWord, SEND_RESULT_READ, sendQuestionNext, SEND_KEPT_ON_DISK, RELEASE_RETRY_MS, STAGE_WORDS2, slowReadWords, stageWords, INTERNAL_BALANCE_DETAIL, shownBreakdown, sessionLeftShown, RESOURCE_PAYMENT_WAL_PREFIX2, POOL_LAYOUT_CODE, POOL_LAYOUT_UPDATE, AI_ONION_UNAVAILABLE_SAY, USEPOD_VIA_INFERENCE_CHAT, TOR_ON_RESTART_SAY, askTorOnStep, 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_SELLER_READ_MS, PREVIEW_BODY_OPEN_MS, CALL_BUDGET_MS, budgetLeft, PAY_ANSWER_MARGIN_MS, MONEY_FIRST_ANSWER_MS, HERMES_CALL_WAIT_MS, hermesLeft, TOOL_PLAIN_FIRST, UPDATE_CHECK_WAIT_MS, BALANCE_AFTER_LANDING_MS, JOIN_CALL_MAX_MS, JOIN_CALL_ANSWER_MARGIN_S, PAY_AFTER_JOIN_MS, joinAnswerSeconds, JOIN_TIME_MS, JOIN_NUDGE_QUIET_MS, SPEND_TOOLS, MOVES_WHILE_READING, USER_ACTION_TOOLS, JOIN_STEP_MS, sleep2, PROGRESS_EVERY_MS2, READ_BUDGET_MS, TOR_WAIT_IN_CALL_MS, TOR_ANSWER_KEEP_MS, UNPAID_TOR_TRY_MS, UNPAID_TOR_OPEN_MS, UNPAID_CLEAR_MS, READ_BUDGET_TOOLS, FLOAT_BUSY_CODES, RETRY_MARGIN_MS, ASK_PAY_CODES, runningNpmVersion2, terminalCommand2, capPlaceWords, noLimitSetLine, CAP_NAMES, capName, entryPlaces, capRaiseText, runningLimits, payCapFlag, noPriceFits, cheaperText, limitNext, overLimitStep, logCause, SAFE_TEXT, causesLog, ADD_FUNDS_DONE_SHOWN_MS, addFundsShownName, MCP_TOOL_ALIASES, POOL_SWITCH_WHY, POOL_SWITCH_NEXT, SWITCH_STATES, quietSwitch, switchKey, ATOMIC_TEXT, MAX_PAYMENT_ATOMIC_LEAST, movedTo, FLOAT_ID2, 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, ENTRY_CAP_CODES, MCP_CAP_FIX, capFix, ownerOnlyNext, mcpNext, CONFIDENTIAL_RETIRED, json4, answerResult, discoverTool, LAUNCH_CAP_CODES, dayCapKind, refuse11, newRequestIdFor, payCapName, limitQuestion, stableJson, requestPrint, JSON_SNIFF_MAX_CHARS, publicOffer, FLOAT_PAID_CODES, FLOAT_NOT_CERTAIN_CODES, FLOAT_PRIVATE_LEG, SELLER_ONLY_HERE, outsideWalletRule, TOR_START_STEP, MONEY_ID2, toRecordId, linkKindOf, moneyId, FUNDING_REFUSAL_SCHEMA, fundingRefusalName, OTHER_WALLET_NEXT, REFUSED_CODES, SEND_STOPPED, SEND_STOP_NOT_SAVED, sendStoppedError, refusedCodeOf, PLAIN_REASONS, insufficientCause, INSUFFICIENT_REASONS, historyRefusalCode, reasonOf, plainReason, KEPT_SEND_TRIES, shownId, isSplitSend, PROMISED_NEXT, partFailReason, sendAnswerOf, PUBLIC_READ_TIMEOUT_MS, RECIPIENT_CHECK_TIMEOUT_MS, withTimeout, ownKey, readFailure, OWN_KEY_TOKENS_MAX, tokenAmountText, elsewhereId, PORTAL_DEPOSIT_ID, PORTAL_BLOCK_WORDS, isPortalBlocker, TERMINAL_PLAN_PREFIX, APP_LINK_PREFIX, cliPlanSplit, blockedByOf, AGENT_ID_SCHEMA, agentIdName, minutesText2, ageWords2, agoWords, DEPOSIT_SENT_STATES, depositLanded, usdcText3, walkWalletHistory, REFRESH_LEASE_WALK_MS, HOME_MARKS_SETTLED_MS2, AUTO_BACKUPS_KEPT, AUTO_BACKUP_NAME, AUTO_BACKUP_VERIFIED, FRONTED_SETTLE_MARGIN_SLOTS, RECIPIENT_READ_TOTAL_MS, RECIPIENT_READ_SLOW_MS, slowReadSaid, UNSHIELD_WINDOW_YIELD_MS, NOT_FINAL_YET, FINISH_FINALITY_WAIT_MS, FINISH_FINALITY_WAITS, FINISH_FINALITY_RECENT_MS, walkStillCurrent, DIRECT_EXIT_GONE, BALANCE_REFRESH_WAIT_MS, BALANCE_REFRESH_GRACE_MS, BALANCE_REFRESH_LONG_MS, INBOUND_REFRESH_AGE_MS, PAY_ME_STATUS_WALK_MS, REFUND_CHECK_MIN_MS, SALE_VIEW_AGE_SECONDS, saleViewRead, balanceTextFields, changeFields, balanceAnswer, REFRESH_RETRY_MS, FINALITY_POLL_MS, FINALITY_WAIT_MS, FINALITY_REFRESH_LIMIT_MS, FINALITY_CLOSE_WAIT_MS, POOL_WATCH_MS, POOL_WATCH_POLL_MS, EARLY_BALANCE_DELAY_MS, FINALITY_SETTLE_WINDOW_SLOTS, PUBLIC_READ_ANSWER_MS, OWN_READ_ANSWER_MS, RECEIPTS_ID_LOOKUP_MS, RECEIPTS_SEND_WAIT_MS, PRIVATE_ID_NOT_READ, LINK_READ_ANSWER_MS, OWN_READS_AHEAD_MS, OWN_PUBLIC_KNOWN_MS, OWN_READS_REUSE_MS, FLOAT_CORRECT_WAIT_MS, SWITCH_WAIT_MS, UNSHIELD_TO_NO_USDC_DETAIL, UNSHIELD_TO_INVALID_NEXT, ELICIT_TIMEOUT_MS, ALLOW_BOX_HOSTS, ALLOW_BOX_PROGRESS_MS, ELICIT_UNSHOWN_MS, elicitUnshown, ANSWER_ARRIVED_AT, monotonicNow, answerTimeOf, elicitTooFast, POLL_SECONDS2, TEMP_CLEAN_DELAY_MS, KEPT_ON_DISK, receiveGenerator, MCP_TOOL_NAMES, MCP_HIDDEN_TOOL_NAMES, setupTerminalNext, SETUP_RUNNING_SAY, SETUP_WAITING_SAY, ACCEPTED_NEXT, SETUP_RUNNING_NEXT, SETUP_ANSWER_WAIT_MS, SETUP_CONFIRMING_SAY, SETUP_CONFIRMING_NEXT, OWN_ADDRESS_QUESTION, OWN_ADDRESS_WHERE, OWN_ADDRESS_INVALID, hostSeesAnswer, HOST_CHAT_NOT_PRIVATE, PRIVATE_INFERENCE_WHY, RESTART_STEPS, HOST_BLOCKED_LINE, TOR_BROWSER_PORT, SETUP_TOR_TITLE, SETUP_TOR_WHY;
162023
+ var import_web3137, X402_V1_NEXT, shownCaps, shinjukuWord, SEND_RESULT_READ, sendQuestionNext, SEND_KEPT_ON_DISK, RELEASE_RETRY_MS, STAGE_WORDS2, slowReadWords, stageWords, INTERNAL_BALANCE_DETAIL, shownBreakdown, sessionLeftShown, RESOURCE_PAYMENT_WAL_PREFIX2, POOL_LAYOUT_CODE, POOL_LAYOUT_UPDATE, AI_ONION_UNAVAILABLE_SAY, USEPOD_VIA_INFERENCE_CHAT, TOR_ON_RESTART_SAY, askTorOnStep, 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_SELLER_READ_MS, PREVIEW_BODY_OPEN_MS, CALL_BUDGET_MS, budgetLeft, PAY_ANSWER_MARGIN_MS, MONEY_FIRST_ANSWER_MS, HERMES_CALL_WAIT_MS, hermesLeft, TOOL_PLAIN_FIRST, UPDATE_CHECK_WAIT_MS, BALANCE_AFTER_LANDING_MS, JOIN_CALL_MAX_MS, JOIN_CALL_ANSWER_MARGIN_S, PAY_AFTER_JOIN_MS, joinAnswerSeconds, JOIN_TIME_MS, JOIN_NUDGE_QUIET_MS, SPEND_TOOLS, MOVES_WHILE_READING, USER_ACTION_TOOLS, JOIN_STEP_MS, sleep2, PROGRESS_EVERY_MS2, READ_BUDGET_MS, ASK_PRIVATE_TOOLS, TOR_WAIT_IN_CALL_MS, TOR_ANSWER_KEEP_MS, UNPAID_TOR_TRY_MS, UNPAID_TOR_OPEN_MS, UNPAID_CLEAR_MS, READ_BUDGET_TOOLS, FLOAT_BUSY_CODES, RETRY_MARGIN_MS, ASK_PAY_CODES, runningNpmVersion2, terminalCommand2, capPlaceWords, noLimitSetLine, CAP_NAMES, capName, entryPlaces, capRaiseText, runningLimits, payCapFlag, noPriceFits, cheaperText, limitNext, overLimitStep, logCause, SAFE_TEXT, causesLog, ADD_FUNDS_DONE_SHOWN_MS, addFundsShownName, MCP_TOOL_ALIASES, POOL_SWITCH_WHY, POOL_SWITCH_NEXT, SWITCH_STATES, quietSwitch, switchKey, ATOMIC_TEXT, MAX_PAYMENT_ATOMIC_LEAST, movedTo, FLOAT_ID2, 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, ENTRY_CAP_CODES, MCP_CAP_FIX, capFix, ownerOnlyNext, mcpNext, CONFIDENTIAL_RETIRED, json4, answerResult, discoverTool, LAUNCH_CAP_CODES, dayCapKind, refuse11, newRequestIdFor, payCapName, limitQuestion, stableJson, requestPrint, JSON_SNIFF_MAX_CHARS, publicOffer, FLOAT_PAID_CODES, FLOAT_NOT_CERTAIN_CODES, FLOAT_PRIVATE_LEG, SELLER_ONLY_HERE, outsideWalletRule, TOR_START_STEP, MONEY_ID2, toRecordId, linkKindOf, moneyId, FUNDING_REFUSAL_SCHEMA, fundingRefusalName, OTHER_WALLET_NEXT, REFUSED_CODES, SEND_STOPPED, SEND_STOP_NOT_SAVED, sendStoppedError, refusedCodeOf, PLAIN_REASONS, insufficientCause, INSUFFICIENT_REASONS, historyRefusalCode, reasonOf, plainReason, KEPT_SEND_TRIES, shownId, isSplitSend, PROMISED_NEXT, partFailReason, sendAnswerOf, PUBLIC_READ_TIMEOUT_MS, RECIPIENT_CHECK_TIMEOUT_MS, withTimeout, ownKey, readFailure, OWN_KEY_TOKENS_MAX, tokenAmountText, elsewhereId, PORTAL_DEPOSIT_ID, PORTAL_BLOCK_WORDS, isPortalBlocker, TERMINAL_PLAN_PREFIX, APP_LINK_PREFIX, cliPlanSplit, blockedByOf, AGENT_ID_SCHEMA, agentIdName, minutesText2, ageWords2, agoWords, DEPOSIT_SENT_STATES, depositLanded, usdcText3, walkWalletHistory, REFRESH_LEASE_WALK_MS, HOME_MARKS_SETTLED_MS2, AUTO_BACKUPS_KEPT, AUTO_BACKUP_NAME, AUTO_BACKUP_VERIFIED, FRONTED_SETTLE_MARGIN_SLOTS, RECIPIENT_READ_TOTAL_MS, RECIPIENT_READ_SLOW_MS, slowReadSaid, UNSHIELD_WINDOW_YIELD_MS, NOT_FINAL_YET, FINISH_FINALITY_WAIT_MS, FINISH_FINALITY_WAITS, FINISH_FINALITY_RECENT_MS, walkStillCurrent, DIRECT_EXIT_GONE, BALANCE_REFRESH_WAIT_MS, BALANCE_REFRESH_GRACE_MS, BALANCE_REFRESH_LONG_MS, INBOUND_REFRESH_AGE_MS, PAY_ME_STATUS_WALK_MS, REFUND_CHECK_MIN_MS, SALE_VIEW_AGE_SECONDS, saleViewRead, balanceTextFields, changeFields, balanceAnswer, REFRESH_RETRY_MS, FINALITY_POLL_MS, FINALITY_WAIT_MS, FINALITY_REFRESH_LIMIT_MS, FINALITY_CLOSE_WAIT_MS, POOL_WATCH_MS, POOL_WATCH_POLL_MS, EARLY_BALANCE_DELAY_MS, FINALITY_SETTLE_WINDOW_SLOTS, PUBLIC_READ_ANSWER_MS, OWN_READ_ANSWER_MS, RECEIPTS_ID_LOOKUP_MS, RECEIPTS_SEND_WAIT_MS, PRIVATE_ID_NOT_READ, LINK_READ_ANSWER_MS, OWN_READS_AHEAD_MS, OWN_PUBLIC_KNOWN_MS, OWN_READS_REUSE_MS, FLOAT_CORRECT_WAIT_MS, SWITCH_WAIT_MS, UNSHIELD_TO_NO_USDC_DETAIL, UNSHIELD_TO_INVALID_NEXT, ELICIT_TIMEOUT_MS, ALLOW_BOX_HOSTS, ALLOW_BOX_PROGRESS_MS, ELICIT_UNSHOWN_MS, elicitUnshown, ANSWER_ARRIVED_AT, monotonicNow, answerTimeOf, elicitTooFast, POLL_SECONDS2, TEMP_CLEAN_DELAY_MS, KEPT_ON_DISK, receiveGenerator, MCP_TOOL_NAMES, MCP_HIDDEN_TOOL_NAMES, setupTerminalNext, SETUP_RUNNING_SAY, SETUP_WAITING_SAY, ACCEPTED_NEXT, SETUP_RUNNING_NEXT, SETUP_ANSWER_WAIT_MS, SETUP_CONFIRMING_SAY, SETUP_CONFIRMING_NEXT, OWN_ADDRESS_QUESTION, OWN_ADDRESS_WHERE, OWN_ADDRESS_INVALID, hostSeesAnswer, HOST_CHAT_NOT_PRIVATE, PRIVATE_INFERENCE_WHY, RESTART_STEPS, HOST_BLOCKED_LINE, TOR_BROWSER_PORT, SETUP_TOR_TITLE, SETUP_TOR_WHY;
161979
162024
  var init_tools = __esm({
161980
162025
  "wallet/src/mcp/tools.mjs"() {
161981
162026
  "use strict";
@@ -162157,6 +162202,8 @@ var init_tools = __esm({
162157
162202
  inference_server: "Starts, stops or checks a private AI address on this computer for your other AI apps.",
162158
162203
  inference_models: "Lists the private AI models and their prices; it pays nothing.",
162159
162204
  inference_chat: "Asks an AI model a question, paid privately from your balance.",
162205
+ ask_deepseek_private: "Asks DeepSeek Private a question, paid privately from your balance.",
162206
+ ask_kimi_private: "Asks Kimi Private a question, paid privately from your balance.",
162160
162207
  wallet_card_pay: "Pays the price shown on a price card after you click Pay.",
162161
162208
  wallet_tor: "Turns on Tor, which hides your IP address, after you say yes."
162162
162209
  });
@@ -162178,6 +162225,7 @@ var init_tools = __esm({
162178
162225
  });
162179
162226
  PROGRESS_EVERY_MS2 = 1e4;
162180
162227
  READ_BUDGET_MS = 3e4;
162228
+ ASK_PRIVATE_TOOLS = Object.freeze([["ask_deepseek_private", "DeepSeek"], ["ask_kimi_private", "Kimi"]]);
162181
162229
  TOR_WAIT_IN_CALL_MS = 45e3;
162182
162230
  TOR_ANSWER_KEEP_MS = 12e4;
162183
162231
  UNPAID_TOR_TRY_MS = 12e3;
@@ -162679,6 +162727,8 @@ var init_tools = __esm({
162679
162727
  "inference_server",
162680
162728
  "inference_models",
162681
162729
  "inference_chat",
162730
+ "ask_deepseek_private",
162731
+ "ask_kimi_private",
162682
162732
  "wallet_tor"
162683
162733
  ]);
162684
162734
  MCP_HIDDEN_TOOL_NAMES = Object.freeze(["wallet_shield_from_elsewhere", "wallet_unshield_cancel", "wallet_move_status"]);
@@ -164738,7 +164788,7 @@ var init_stdioServer = __esm({
164738
164788
  SUPPORTED_PROTOCOL_VERSIONS = Object.freeze(["2025-06-18", "2025-03-26", "2024-11-05"]);
164739
164789
  MAX_LINE_BYTES = 4 * 1024 * 1024;
164740
164790
  POSITIVE_ATOMIC7 = /^[1-9][0-9]{0,30}$/;
164741
- INSTRUCTIONS_BASE = `A self-custody Shinjuku Shield wallet on this machine; no tool takes or returns its keys or passphrase. Each answer's say is one plain sentence for the user; other fields are data. Never tell the user a tool, field, code or protocol name (x402, MCP) unless told to. Map a plain request to one tool: "what is my (Shinjuku) balance" -> wallet_balance (starts no new payment or send; it finishes one under way); "add money" / "deposit" / "move USDC in from Phantom or an exchange" -> wallet_add_funds; "get paid" / "pay-me link" -> wallet_pay_me (both: nothing moves until USDC arrives; then wallet_balance makes it private); "was my link paid" -> wallet_pay_me_status; "pay a pay-me link" -> wallet_unshield, to = it; "shield the USDC on this wallet's own address" -> wallet_shield; "stop" / "cancel" -> wallet_cancel (the request_id of what to stop); "pay this URL" -> pay_for_service (no preview needed); "what does this URL cost" -> check_price (only when asked); "find a paid API for X" -> find_paid_services, then pay its url; "send 2 USDC to <address>" -> wallet_unshield; "show my payments" -> wallet_receipts; "sell, swap or send a non-USDC token" -> no tool: say this wallet does not, offer no sale; "which AI models" -> inference_models; "ask an AI model" / "ask Kimi Private" / "ask DeepSeek Private" -> inference_chat, not your own answer; "give my other AI app a private AI" -> inference_server action "start". wallet_balance answers ONE balance (balanceAtomic); pay_for_service pays any paid URL from it. Fields ending in Atomic count 1000000 per USDC; tell the user USDC. The wallet does its own upkeep. A shield, add-funds or unshield call can run for minutes: do as its next says. Pass your own request_id to pay_for_service: the same one never pays twice (a code ending in _retry_same_request: call again with it). pay_for_service never pays above the spending limits (one payment; 24 hours); with none, only the balance bounds it. Never claim a payment happened unless the answer has a transaction. After a pay or send call that stopped, failed, or this app calls rejected or interrupted, call wallet_receipts (a payment) or wallet_cancel (a send; no request_id) before you say whether it happened; never say nothing moved without that. Privacy: the chain does not show which wallet paid, but this app and its model provider see every URL, body, price and answer you handle; reach a seller or its domain only through these tools, never yourself (no curl, browser, DNS or DNS-over-HTTPS lookup), also when the user asks for no Tor: that shows their IP address to the site or a DNS company. When a poolSwitch.items[] item has tellUser true, tell the user its message once, in plain words; the wallet moves the balance itself.`;
164791
+ INSTRUCTIONS_BASE = `A self-custody Shinjuku Shield wallet on this machine; no tool takes or returns its keys or passphrase. Each answer's say is one plain sentence for the user; other fields are data. Never tell the user a tool, field, code or protocol name (x402, MCP) unless told to. Map a plain request to one tool: "what is my (Shinjuku) balance" -> wallet_balance (starts no new payment or send; it finishes one under way); "add money" / "deposit" / "move USDC in from Phantom or an exchange" -> wallet_add_funds; "get paid" / "pay-me link" -> wallet_pay_me (both: nothing moves until USDC arrives; then wallet_balance makes it private); "was my link paid" -> wallet_pay_me_status; "pay a pay-me link" -> wallet_unshield, to = it; "shield the USDC on this wallet's own address" -> wallet_shield; "stop" / "cancel" -> wallet_cancel (the request_id of what to stop); "pay this URL" -> pay_for_service (no preview needed); "what does this URL cost" -> check_price (only when asked); "find a paid API for X" -> find_paid_services, then pay its url; "send 2 USDC to <address>" -> wallet_unshield; "show my payments" -> wallet_receipts; "sell, swap or send a non-USDC token" -> no tool: say this wallet does not, offer no sale; "which AI models" -> inference_models; "ask <model>" -> ask_<model>_private if listed, else inference_chat; never your own answer; "give my other AI app a private AI" -> inference_server action "start". wallet_balance answers ONE balance (balanceAtomic); pay_for_service pays any paid URL from it. Fields ending in Atomic count 1000000 per USDC; tell the user USDC. The wallet does its own upkeep. A shield, add-funds or unshield call can run for minutes: do as its next says. Pass your own request_id to pay_for_service: the same one never pays twice (a code ending in _retry_same_request: call again with it). pay_for_service never pays above the spending limits (one payment; 24 hours); with none, only the balance bounds it. Never claim a payment happened unless the answer has a transaction. After a pay or send call that stopped, failed, or this app calls rejected or interrupted, call wallet_receipts (a payment) or wallet_cancel (a send; no request_id) before you say whether it happened; never say nothing moved without that. Privacy: the chain does not show which wallet paid, but this app and its model provider see every URL, body, price and answer you handle; reach a seller or its domain only through these tools, never yourself (no curl, browser, DNS or DNS-over-HTTPS lookup), also when the user asks for no Tor: that shows their IP address to the site or a DNS company. When a poolSwitch.items[] item has tellUser true, tell the user its message once, in plain words; the wallet moves the balance itself.`;
164742
164792
  OWN_ADDRESS_LINE = '"Send to my (main) wallet": wallet_unshield with no to uses the address saved at setup; never ask for it.';
164743
164793
  INSTRUCTIONS = `${INSTRUCTIONS_BASE} ${OWN_ADDRESS_LINE} ${HOST_BLOCKED_LINE}`;
164744
164794
  MCP_LOG_LEVELS = Object.freeze(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]);
@@ -164783,7 +164833,7 @@ parentPort.once("message", () => { for (;;) {
164783
164833
  };
164784
164834
  BUNDLED_SOURCE_DIR = "__bundled_source__";
164785
164835
  SHA256_HEX = /^[0-9a-f]{64}$/;
164786
- UPDATE_NOTICE_TOOLS = Object.freeze(["wallet_balance", "pay_for_service", "inference_chat", "inference_server", "wallet_add_funds"]);
164836
+ UPDATE_NOTICE_TOOLS = Object.freeze(["wallet_balance", "pay_for_service", "inference_chat", "ask_deepseek_private", "ask_kimi_private", "inference_server", "wallet_add_funds"]);
164787
164837
  UPDATE_NOTICE_MAX_TEXT = 262144;
164788
164838
  UPDATE_RECHECK_MS = 6e4;
164789
164839
  NPM_VERSION2 = /^(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})$/;
@@ -164811,7 +164861,7 @@ parentPort.once("message", () => { for (;;) {
164811
164861
  };
164812
164862
  TOOL_ROOTS_WAIT_MS = 6e4;
164813
164863
  ADOPTER_ROOTS_CHECK_MS = 15e3;
164814
- ROOTS_FREE_TOOLS = /* @__PURE__ */ new Set(["pay_for_service", "inference_chat", "inference_models", "inference_server", "check_price", "find_paid_services"]);
164864
+ ROOTS_FREE_TOOLS = /* @__PURE__ */ new Set(["pay_for_service", "inference_chat", "ask_deepseek_private", "ask_kimi_private", "inference_models", "inference_server", "check_price", "find_paid_services"]);
164815
164865
  ROOTS_READ_TOOLS = /* @__PURE__ */ new Set(["wallet_balance", "wallet_receipts", "wallet_backup"]);
164816
164866
  MCP_CLOSE_BOUND_MS = 5e3;
164817
164867
  MCP_CLOSE_HISTORY_BOUND_MS = 17e3;
@@ -167845,17 +167895,16 @@ async function waitForRoom({ stdout = process.stdout, stdin = process.stdin, env
167845
167895
  } catch {
167846
167896
  }
167847
167897
  };
167848
- const mark = (() => {
167849
- const codes = paletteFor(screenColor(stdout, env));
167850
- return codes ? `${codes.crim}\u25C6 ${codes.bone}shinjuku-shield\x1B[0m` : "\u25C6 shinjuku-shield";
167851
- })();
167898
+ const codes = paletteFor(screenColor(stdout, env));
167899
+ const tint = (name, text3) => codes ? `${codes[name]}${text3}\x1B[0m` : text3;
167900
+ const mark = codes ? `${codes.crim}\u25C6 ${codes.bone}shinjuku-shield\x1B[0m` : "\u25C6 shinjuku-shield";
167852
167901
  const say2 = () => write([
167853
167902
  "\x1B[0m\x1B[2J\x1B[H",
167854
167903
  mark,
167855
- "This window is too small for the wallet screen.",
167856
- `It needs ${needs.columns} x ${needs.rows}; this one is ${stdout.columns} x ${stdout.rows}.`,
167857
- "Make the window larger: the screen opens by itself.",
167858
- "Press q to stop.",
167904
+ tint("bone", "This window is too small for the wallet screen."),
167905
+ tint("dim", `It needs ${needs.columns} x ${needs.rows}; this one is ${stdout.columns} x ${stdout.rows}.`),
167906
+ tint("dim", "Make the window larger: the screen opens by itself."),
167907
+ tint("mute", "Press q to stop."),
167859
167908
  ""
167860
167909
  ].join("\n"));
167861
167910
  say2();
@@ -183975,7 +184024,7 @@ function commandPathFix(deps, npmVersion, balanceLine2 = oneTimeCommandLine("bal
183975
184024
  `);
183976
184025
  }
183977
184026
  if ((step.state === "profile-added" || step.state === "profile-present") && !String(process.env.PATH ?? "").split(":").includes(step.folder)) {
183978
- process.env.PATH = `${step.folder}:${process.env.PATH ?? ""}`;
184027
+ process.env.PATH = `${process.env.PATH ?? ""}:${step.folder}`;
183979
184028
  refreshCommandName();
183980
184029
  }
183981
184030
  return step;
@@ -184211,7 +184260,7 @@ async function runSetupCommandHeld(values, deps) {
184211
184260
  noLimitNote = true;
184212
184261
  }
184213
184262
  if (rescued.tor === void 0 && !values.has("--prefer-tor") && !torRunRecords) {
184214
- const torHow = (deps.platform ?? process.platform) === "win32" ? "the wallet gets Tor and runs it in the background for you (only if that fails, setup gives a command)" : "if Tor is not running, setup gives the one command that starts it";
184263
+ const torHow = ownTorPlatform(deps.platform ?? process.platform) ? "the wallet gets Tor and runs it in the background for you (only if that fails, setup gives a command)" : "if Tor is not running, setup gives the one command that starts it";
184215
184264
  const tor = String(await deps.ask(`Send every request through Tor? It hides your IP address; ${torHow}. [Y/n] `)).trim();
184216
184265
  options.tor = !/^n(o)?$/i.test(tor);
184217
184266
  }
@@ -190224,9 +190273,18 @@ async function openShinjukuAfterSetup(argv2, deps, theme2) {
190224
190273
  return 0;
190225
190274
  }
190226
190275
  const connection = argv2.flatMap((word2, index) => word2 === "--tor" || word2 === "--no-tor" ? [word2] : word2 === "--proxy" && argv2[index + 1] ? [word2, argv2[index + 1]] : []);
190227
- return runHomeLoop(connection, deps, { animation: false });
190276
+ return runHomeLoop(connection, deps, { animation: false, drawn: true });
190277
+ }
190278
+ async function runHomeLoop(argv2, deps, { animation = true, drawn = false } = {}) {
190279
+ const unTheme = drawn || !terminalThemeOn({ env: deps.env }) ? () => {
190280
+ } : themeStreams(setupPainter({ env: deps.env }));
190281
+ try {
190282
+ return await homeLoop(argv2, deps, { animation });
190283
+ } finally {
190284
+ unTheme();
190285
+ }
190228
190286
  }
190229
- async function runHomeLoop(argv2, deps, { animation = true } = {}) {
190287
+ async function homeLoop(argv2, deps, { animation }) {
190230
190288
  const io = deps.io;
190231
190289
  if (!deps.homeScreenOn(deps.env)) {
190232
190290
  const room = deps.stdinIsTTY() && process.stdout.isTTY ? await deps.homeWaitForRoom(deps.env) : "off";
@@ -190236,6 +190294,7 @@ async function runHomeLoop(argv2, deps, { animation = true } = {}) {
190236
190294
  return 0;
190237
190295
  }
190238
190296
  }
190297
+ if (typeof deps.ask === "function") deps.ask = themedAsk(deps.ask, setupPainter({ env: deps.env }));
190239
190298
  const readData = () => ({
190240
190299
  ...deps.homeData({ env: deps.env, walletVersion: deps.walletVersion, torRun: homeJobTor(argv2, deps.env) }),
190241
190300
  ...deps.homeKeysExtra(deps.env)