siteplane 0.3.3 → 0.3.4

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
@@ -170,12 +170,14 @@ flag it does not know, names the ones it takes and runs nothing.
170
170
  ## Siteplane's MCP server
171
171
 
172
172
  `https://siteplane.io/mcp` does in the chat what the Siteplane dashboard does: websites, content, members, Analytics,
173
- Booking and settings, with the rights of the person who signs in. Add it to your coding agent and sign in once through
174
- the browser:
173
+ Booking and settings, with the rights of the person who signs in. Add it in the app of your agent, under "Connect
174
+ your agent" in Siteplane, and approve it once in the browser. In Claude,
175
+ [this link](https://claude.ai/customize/connectors?modal=add-custom-connector&connectorName=Siteplane&connectorUrl=https%3A%2F%2Fsiteplane.io%2Fmcp)
176
+ opens the connector with Siteplane filled in. In a terminal:
175
177
 
176
178
  ```bash
177
- claude mcp add --transport http siteplane https://siteplane.io/mcp # Claude Code, then /mcp → Authenticate
178
- codex mcp add siteplane --url https://siteplane.io/mcp # Codex, then codex mcp login siteplane
179
+ claude mcp add --scope user --transport http siteplane https://siteplane.io/mcp # then claude mcp login siteplane
180
+ codex mcp add siteplane --url https://siteplane.io/mcp # opens the sign-in by itself
179
181
  ```
180
182
 
181
183
  In Cursor, add `{ "mcpServers": { "siteplane": { "url": "https://siteplane.io/mcp" } } }` to `.cursor/mcp.json`.
@@ -1005,7 +1005,7 @@ function readSiteId(payload) {
1005
1005
  }
1006
1006
 
1007
1007
  // src/version.ts
1008
- var PACKAGE_VERSION = "0.3.3";
1008
+ var PACKAGE_VERSION = "0.3.4";
1009
1009
 
1010
1010
  // src/astro/build-images.ts
1011
1011
  import { mkdir, readdir, readFile, rename, rm, writeFile } from "fs/promises";
@@ -114,7 +114,7 @@ function readSiteId(payload) {
114
114
  }
115
115
 
116
116
  // src/version.ts
117
- var PACKAGE_VERSION = "0.3.3";
117
+ var PACKAGE_VERSION = "0.3.4";
118
118
 
119
119
  // src/astro/route.ts
120
120
  var embeddable = { httpOnly: true, secure: true, sameSite: "none", partitioned: true, path: "/" };
@@ -19730,16 +19730,24 @@ function installPackage(project, spec) {
19730
19730
  // ../cli/dist/commands/mcp.js
19731
19731
  init_esm_shims();
19732
19732
  var SITEPLANE_MCP_URL = "https://siteplane.io/mcp";
19733
+ function claudeConnectUrl(url = SITEPLANE_MCP_URL) {
19734
+ return `https://claude.ai/customize/connectors?modal=add-custom-connector&connectorName=Siteplane&connectorUrl=${encodeURIComponent(url)}`;
19735
+ }
19736
+ function inClaudeApp(env) {
19737
+ return (env.CLAUDE_CODE_ENTRYPOINT ?? "").toLowerCase() === "claude-desktop";
19738
+ }
19733
19739
  function mcpSetupFor(kind, url = SITEPLANE_MCP_URL) {
19734
19740
  const claude = {
19735
19741
  agent: "Claude Code",
19736
- add: `claude mcp add --transport http siteplane ${url}`,
19737
- signIn: "In Claude Code, run /mcp, choose siteplane and Authenticate; the browser opens Siteplane's approval."
19742
+ add: `claude mcp add --scope user --transport http siteplane ${url}`,
19743
+ // The sign-in refuses a shell without a terminal (checked with Claude Code 2.1.311 and 2.1.331), so the agent's
19744
+ // own shell can't run it.
19745
+ signIn: "claude mcp login siteplane, in an interactive terminal; the browser opens Siteplane's approval. Run it yourself only if you can open a terminal, otherwise give the user this one line. Where the command is missing: /mcp in Claude Code, siteplane, Authenticate."
19738
19746
  };
19739
19747
  const codex = {
19740
19748
  agent: "Codex",
19741
19749
  add: `codex mcp add siteplane --url ${url}`,
19742
- signIn: "Then run codex mcp login siteplane; the browser opens Siteplane's approval."
19750
+ signIn: "Step 1 opens Siteplane's approval in the browser by itself and waits for it; codex mcp login siteplane opens it again."
19743
19751
  };
19744
19752
  const cursor = {
19745
19753
  agent: "Cursor",
@@ -19755,17 +19763,33 @@ function mcpSetupFor(kind, url = SITEPLANE_MCP_URL) {
19755
19763
  return [claude, codex, cursor];
19756
19764
  }
19757
19765
  function mcpCommand(deps) {
19766
+ const { out } = deps;
19767
+ const url = deps.url ?? SITEPLANE_MCP_URL;
19768
+ out(`Siteplane's MCP server (${url}) does in the chat what the Siteplane dashboard does: websites, content, members, Analytics, Booking and settings, with the rights of the person who signs in.`);
19769
+ if (deps.agent.kind === "claude-code" && inClaudeApp(deps.env ?? {})) {
19770
+ out("");
19771
+ out("You run in Claude's app, so the user adds it there, without a terminal:");
19772
+ out(` ${claudeConnectUrl(url)}`);
19773
+ out("The link opens Claude with Siteplane's name and address filled in. The user confirms the connector, selects Connect and approves Siteplane in the browser. On a Team or Enterprise plan an owner adds it to the organization first.");
19774
+ out("");
19775
+ out("Do not add the server yourself and do not send the user to a terminal. Only the user can approve the sign-in; a new session has the tools if this one does not.");
19776
+ out("Next: give the user this link and ask them to connect Siteplane there.");
19777
+ return 0;
19778
+ }
19758
19779
  const setups = mcpSetupFor(deps.agent.kind, deps.url);
19759
- deps.out(`Siteplane's MCP server (${deps.url ?? SITEPLANE_MCP_URL}) does in the chat what the Siteplane dashboard does: websites, content, members, Analytics, Booking and settings, with the rights of the person who signs in.`);
19760
19780
  for (const setup of setups) {
19761
- deps.out("");
19762
- deps.out(`${setup.agent}:`);
19763
- deps.out(` 1. ${setup.add}`);
19764
- deps.out(` 2. ${setup.signIn}`);
19765
- }
19766
- deps.out("");
19767
- deps.out("Only the user can approve the sign-in, and a new server works from the agent's next session on.");
19768
- deps.out(setups.length === 1 ? `Next: run step 1 (${setups[0]?.add.startsWith("add ") ? "edit the file" : "the command"}), then ask the user to do step 2.` : "Next: do step 1 for the agent you are, then ask the user to do step 2.");
19781
+ out("");
19782
+ out(`${setup.agent}:`);
19783
+ out(` 1. ${setup.add}`);
19784
+ out(` 2. ${setup.signIn}`);
19785
+ }
19786
+ if (deps.agent.kind !== "codex" && deps.agent.kind !== "cursor") {
19787
+ out("");
19788
+ out(`In Claude's app or on claude.ai, without a terminal: ${claudeConnectUrl(url)}`);
19789
+ }
19790
+ out("");
19791
+ out("Only the user can approve the sign-in. If the tools are missing afterwards, they are there from the next session on.");
19792
+ out(setups.length > 1 ? "Next: do step 1 for the agent you are, then step 2 as it says." : deps.agent.kind === "codex" ? "Next: run step 1 and ask the user to approve Siteplane in the browser." : setups[0]?.add.startsWith("add ") ? "Next: edit the file of step 1, then ask the user to do step 2." : "Next: run step 1, then step 2 as it says.");
19769
19793
  return 0;
19770
19794
  }
19771
19795
 
@@ -20778,7 +20802,7 @@ async function contentRestoreCommand(deps, input) {
20778
20802
 
20779
20803
  // src/version.ts
20780
20804
  init_esm_shims();
20781
- var PACKAGE_VERSION = "0.3.3";
20805
+ var PACKAGE_VERSION = "0.3.4";
20782
20806
 
20783
20807
  // src/bin/run-siteplane.ts
20784
20808
  var usage = [
@@ -20924,7 +20948,7 @@ async function runSiteplaneCli(args, dependencies = createDefaultDependencies())
20924
20948
  return { exitCode: 1 };
20925
20949
  }
20926
20950
  case "mcp":
20927
- return { exitCode: mcpCommand({ agent: detectAgent(dependencies.env), out: dependencies.stdout }) };
20951
+ return { exitCode: mcpCommand({ agent: detectAgent(dependencies.env), env: dependencies.env, out: dependencies.stdout }) };
20928
20952
  case "--version":
20929
20953
  case "-v":
20930
20954
  dependencies.stdout(await dependencies.readPackageVersion());
package/dist/route.js CHANGED
@@ -118,7 +118,7 @@ function readSiteId(payload) {
118
118
  }
119
119
 
120
120
  // src/version.ts
121
- var PACKAGE_VERSION = "0.3.3";
121
+ var PACKAGE_VERSION = "0.3.4";
122
122
 
123
123
  // src/route.ts
124
124
  var embeddable = { httpOnly: true, secure: true, sameSite: "none", partitioned: true, path: "/" };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "siteplane",
3
3
  "private": false,
4
- "version": "0.3.3",
4
+ "version": "0.3.4",
5
5
  "description": "Siteplane for Next.js and Astro websites: content from Siteplane, Draft Mode preview, Booking and the siteplane CLI.",
6
6
  "type": "module",
7
7
  "license": "SEE LICENSE IN LICENSE",