shinjuku-shielded 0.3.13 → 0.3.14

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/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": "d2ba7e62eff143df57466d5f0ba534856e29c88007eafc22c3dfaeb89535eadb",
5
- "bytes": 11120794,
6
- "sourceCommit": "21b7da9a5ca048b184cfec73d82ab94dfe9dff14",
4
+ "sha256": "db079e3700b17388873252fb91358d1918801ff69d1ee26f4e3e9f21bccbab34",
5
+ "bytes": 11121670,
6
+ "sourceCommit": "181724d44e72d6b49f062fb641761811e66e23a6",
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",
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "shinjuku-shielded",
3
- "version": "0.3.13",
3
+ "version": "0.3.14",
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": "d2ba7e62",
7
- "shinjukuSha256": "d2ba7e62eff143df57466d5f0ba534856e29c88007eafc22c3dfaeb89535eadb",
6
+ "shinjukuRelease": "db079e37",
7
+ "shinjukuSha256": "db079e3700b17388873252fb91358d1918801ff69d1ee26f4e3e9f21bccbab34",
8
8
  "license": "SEE LICENSE IN LICENSE.txt",
9
9
  "author": "Shinjuku Shielded",
10
10
  "homepage": "https://github.com/ShinjukuStaition/shinjuku-mcp#readme",
@@ -132988,7 +132988,7 @@ var COMMANDS = [
132988
132988
  "The provers are Linux programs. Linux: ready. Windows: the wallet runs them through WSL; setup checks that wsl.exe runs (wsl --install -d Ubuntu otherwise). macOS: not supported; setup says so and creates nothing.",
132989
132989
  "Run it again at any time: it never changes an existing wallet, keeps the recorded caps unless you pass new ones, checks every proof-tool file again, downloads what is missing or newer, and rewrites config.json.",
132990
132990
  "Then mcp needs no flags: npx -y shinjuku-shielded mcp reads config.json (a flag on the command line still wins). Before setup, mcp in a terminal offers to run setup; started by an agent host, it serves shinjuku_setup, which runs this same setup after you confirm in the host.",
132991
- "A command that takes --pool (balance, recover, deposit, add-funds, and others) takes it, and the passphrase of this home's wallet, from config.json when you leave them out: shinjuku-wallet balance needs no flags. A flag or SHIELDED_WALLET_PASSPHRASE still wins; init and restore never use config.json, and move reads it itself."
132991
+ "A command that takes --pool (balance, recover, deposit, add-funds, and others) takes it, and the passphrase of this home's wallet, from config.json when you leave them out: shinjuku-wallet balance needs no flags. A pocket command (pocket list, scan, reshield, release, fill) takes this home's --wallet and passphrase file the same way, and --program, --proof-tools, --facilitator when it needs them. A flag or SHIELDED_WALLET_PASSPHRASE still wins; init and restore never use config.json, and move reads it itself."
132992
132992
  ],
132993
132993
  next: `start it from your agent host with npx -y shinjuku-shielded mcp (or ${CLI2} mcp), then ask your agent "what is my balance"`,
132994
132994
  run: (args, values, deps, io) => deps.setupMain(values, { ...deps, io })
@@ -133669,17 +133669,30 @@ function configDefaults(command, args, deps) {
133669
133669
  const passphraseFileSpec = command.flags.find((spec) => spec.name === "--passphrase-file");
133670
133670
  const envPassphrase = Boolean(deps.env[PASSPHRASE_ENV2]);
133671
133671
  const wantPool = has2("--pool") && !given.has("--pool") && !given.has("--wallet");
133672
+ const wantWallet = !has2("--pool") && has2("--wallet") && !given.has("--wallet");
133672
133673
  const wantFile = Boolean(passphraseFileSpec) && !given.has("--passphrase-file") && (passphraseFileSpec.required || !envPassphrase);
133673
133674
  const wantEnv = !passphraseFileSpec && command.env.includes(PASSPHRASE_ENV2) && !envPassphrase;
133674
- if (!wantPool && !wantFile && !wantEnv) return unchanged;
133675
+ if (!wantPool && !wantWallet && !wantFile && !wantEnv) return unchanged;
133675
133676
  const home = setupHome(deps.env);
133676
133677
  const config = setupConfigOf(home);
133677
133678
  if (!config) return unchanged;
133678
- const added = wantPool ? ["--pool", config.pool] : [];
133679
+ const added = wantPool ? ["--pool", config.pool] : wantWallet ? ["--wallet", homeWalletPath(home, config.pool)] : [];
133680
+ const fromConfig = [
133681
+ ["--program", config.program],
133682
+ ["--proof-tools", config.proofTools],
133683
+ ["--facilitator", config.memoService],
133684
+ ["--service", config.memoService]
133685
+ ];
133686
+ if (wantPool || wantWallet || given.has("--wallet") || given.get("--pool") === config.pool) {
133687
+ for (const [name, value] of fromConfig) {
133688
+ if (typeof value === "string" && command.flags.some((spec) => spec.name === name && spec.required) && !given.has(name)) added.push(name, value);
133689
+ }
133690
+ }
133679
133691
  const pool = wantPool ? config.pool : given.get("--pool");
133680
133692
  const homePools = [config.pool, ...(config.previousPools ?? []).map((entry) => entry.pool)];
133681
- const ownWallet = given.has("--wallet") ? homePools.some((entry) => resolve35(given.get("--wallet")) === resolve35(homeWalletPath(home, entry))) : homePools.includes(pool);
133682
- if (!ownWallet || !wantFile && !wantEnv) return { args: [...args, ...added], passphrase: void 0 };
133693
+ const ownWallet = wantWallet || (given.has("--wallet") ? homePools.some((entry) => resolve35(given.get("--wallet")) === resolve35(homeWalletPath(home, entry))) : homePools.includes(pool));
133694
+ if (!ownWallet) return unchanged;
133695
+ if (!wantFile && !wantEnv) return { args: [...args, ...added], passphrase: void 0 };
133683
133696
  const where = `config.json (${join34(home, "config.json")})`;
133684
133697
  if (wantFile) {
133685
133698
  if (!config.passphraseFile) {