smashspace 0.1.3 → 0.1.5

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
@@ -17,6 +17,10 @@ agents work through the CLI, MCP, and HTTP API on the *same* data. See
17
17
  npm i -g smashspace
18
18
  ```
19
19
 
20
+ > **Using [Volta](https://volta.sh)?** Install with `volta install smashspace`
21
+ > instead. A global `npm i -g` under Volta leaves a stale shim that later fails
22
+ > with `Volta error: Could not execute command` — `volta install` avoids it.
23
+
20
24
  ## Sign in (approve in the browser — no copy/paste)
21
25
 
22
26
  ```bash
package/dist/smash.mjs CHANGED
@@ -3593,7 +3593,10 @@ back to the **\`smash\` CLI**. Do **not** hit the HTTP API with \`curl\` or a ra
3593
3593
  browser \u2014 the CLI and MCP are the supported surfaces and they resolve auth and
3594
3594
  the target board for you.
3595
3595
 
3596
- - CLI install: \`npm i -g smashspace\` (then \`smash --help\`)
3596
+ - CLI install: \`npm i -g smashspace\` (then \`smash --help\`).
3597
+ **If the machine uses Volta** (\`command -v volta\` succeeds), install with
3598
+ \`volta install smashspace\` instead \u2014 \`npm i -g\` under Volta leaves a stale
3599
+ shim that fails with "Volta error: Could not execute command".
3597
3600
  - MCP server: \`smashspace-mcp\` (exposes \`smash_*\` tools, same token as the CLI)
3598
3601
  - Sign in once per machine: \`smash login\` (browser approval; token saved to
3599
3602
  \`~/.config/smash/credentials.json\` and reused by MCP)
@@ -3742,7 +3745,10 @@ Verify \`Review\` cards and move verified work to \`Done\`.
3742
3745
  ## Fallbacks
3743
3746
 
3744
3747
  - Prefer \`smashspace-mcp\` MCP tools. If unavailable, use the \`smash\` CLI.
3745
- - If the CLI is not installed: \`npm i -g smashspace\`, then \`smash login\`.
3748
+ - If the CLI is not installed: \`npm i -g smashspace\` (or \`volta install smashspace\`
3749
+ on a Volta machine), then \`smash login\`.
3750
+ - \`smash\` fails with "Volta error: Could not execute command"? A stale Volta
3751
+ shim \u2014 fix with \`volta install smashspace\` (do NOT \`npm i -g\` under Volta).
3746
3752
  - If a board returns "Sign-in required": run \`smash login\`, or set \`SMASH_TOKEN\`
3747
3753
  for a headless/CI agent.
3748
3754
 
@@ -4732,22 +4738,33 @@ program2.command("init").description(
4732
4738
  }
4733
4739
  if (opts.mcp !== false) {
4734
4740
  let mcp = { mcpServers: {} };
4741
+ let parseFailed = false;
4735
4742
  if (await exists(".mcp.json")) {
4736
4743
  try {
4737
- mcp = JSON.parse(await readFile2(abs(".mcp.json"), "utf8"));
4744
+ const parsed = JSON.parse(await readFile2(abs(".mcp.json"), "utf8"));
4745
+ if (parsed && typeof parsed === "object")
4746
+ mcp = parsed;
4738
4747
  } catch {
4748
+ parseFailed = true;
4739
4749
  }
4740
- if (!mcp.mcpServers)
4750
+ if (!mcp.mcpServers || typeof mcp.mcpServers !== "object") {
4741
4751
  mcp.mcpServers = {};
4752
+ }
4742
4753
  }
4743
- const servers = mcp.mcpServers;
4744
- if (servers.smashspace && !opts.force) {
4745
- actions.push("\u2022 .mcp.json already wires 'smashspace' \u2014 kept (use --force)");
4754
+ if (parseFailed && !opts.force) {
4755
+ actions.push(
4756
+ "\u26A0 .mcp.json exists but is not valid JSON \u2014 left untouched; add the 'smashspace' server by hand or re-run with --force"
4757
+ );
4746
4758
  } else {
4747
- servers.smashspace = mcpServerEntry(baseUrl, boardId);
4748
- await put(".mcp.json", `${JSON.stringify(mcp, null, 2)}
4759
+ const servers = mcp.mcpServers;
4760
+ if (servers.smashspace && !opts.force) {
4761
+ actions.push("\u2022 .mcp.json already wires 'smashspace' \u2014 kept (use --force)");
4762
+ } else {
4763
+ servers.smashspace = mcpServerEntry(baseUrl, boardId);
4764
+ await put(".mcp.json", `${JSON.stringify(mcp, null, 2)}
4749
4765
  `);
4750
- actions.push("\u2713 .mcp.json \u2014 smashspace MCP server");
4766
+ actions.push("\u2713 .mcp.json \u2014 smashspace MCP server");
4767
+ }
4751
4768
  }
4752
4769
  }
4753
4770
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smashspace",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "SmashSpace CLI + MCP — operate SmashSpace boards from your terminal, Claude Code, Cursor, and Codex.",
5
5
  "type": "module",
6
6
  "bin": {