@groundfloorcloud/mcp 0.1.2 → 0.1.3

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
@@ -67,11 +67,15 @@ The `command` must be your Node (from `which node`), not `npx` and not Cursor’
67
67
  | `coderunner_list` / `_get_status` / `_get_logs` | Inspect workloads |
68
68
  | `apps_list` / `apps_get` | Inspect product Apps |
69
69
  | `secrets_list` / `files_list` / `domains_list` / `dataplane_status` | Inspect (no secrets values) |
70
- | `docs_list` / `docs_get` | Product docs (`coderunner` returns the full type/auth/Dockerfile guide) |
70
+ | `docs_list` / `docs_get` | Product docs (`coderunner` and `shell` are embedded how-tos) |
71
71
  | `suggest_cli` | Command to run: login, deploy, init_app, publish_app, … |
72
72
 
73
73
  Never create `app_kind=coderunner`. Deploy with `gf deploy`.
74
74
 
75
+ **Shell apps:** `docs_get` id `shell`. Always `gf apps init --slug <portal-slug>`,
76
+ then `npm run release` and `gf apps publish --path release.zip`. Do not invent
77
+ `App.tsx` / `vite.config`, zip `dist/`, or upload only `remoteEntry.js`.
78
+
75
79
  **Coderunner how-to** is embedded: `docs_get` id `coderunner` (also
76
80
  `coderunner-overview`). That page covers:
77
81
 
package/dist/index.js CHANGED
@@ -517,6 +517,40 @@ Inspect: \`workspace_context\`, \`docs_get\` id \`coderunner\`, \`suggest_cli\`.
517
517
  Act: \`gf deploy\`, \`gf coderunner run|status\`. MCP does not deploy.
518
518
  `.trim();
519
519
 
520
+ // src/shell-guide.ts
521
+ var SHELL_APP_GUIDE = `
522
+ # Shell federated apps
523
+
524
+ A Groundfloor **App** (app_kind=shell_federated) is a Module Federation remote
525
+ loaded by the workspace Shell. It is **not** a Coderunner. Do not \`gf deploy\`.
526
+
527
+ ## Required path (do not invent a Vite app)
528
+
529
+ Agents must not scaffold App.tsx, vite.config.ts, or BrowserRouter from memory.
530
+ A from-scratch remote 404s in Shell (missing sibling chunks) or crashes
531
+ (extra Router). Federation \`name\` must be federationRemoteName(slug)
532
+ (\`hello-world\` \u2192 \`hello_world\`).
533
+
534
+ \`\`\`bash
535
+ gf apps create --name "Hello World" --slug hello-world --kind shell_federated
536
+ gf apps init --slug hello-world
537
+ cd hello-world
538
+ npm install
539
+ # edit src/ inside the kit only
540
+ npm run release
541
+ gf apps publish --path release.zip
542
+ \`\`\`
543
+
544
+ \`npm run release\` packs **all** of dist/assets (remoteEntry.js + hashed
545
+ \`__federation_*.js\` + CSS) at the zip root. Do not zip \`dist/\`. Do not
546
+ upload a lone \`remoteEntry.js\`. \`gf apps publish\` rejects incomplete zips.
547
+
548
+ ## suggest_cli
549
+
550
+ - init_app \u2192 \`gf apps init --slug <portal-slug>\`
551
+ - publish_app \u2192 init + npm install + npm run release + gf apps publish --path release.zip
552
+ `;
553
+
520
554
  // src/docs.ts
521
555
  var DOCS_ORIGIN = "https://docs.groundfloor.cloud";
522
556
  var DOC_CATALOG = [
@@ -524,7 +558,7 @@ var DOC_CATALOG = [
524
558
  id: "agents",
525
559
  title: "Deploy with agents",
526
560
  path: "/docs/customer-portal/agents",
527
- summary: "How agents should deploy Coderunner workloads and init/publish Shell apps with gf / MCP. Enable workspace Authentication before create. Service (Deployment) requires a Dockerfile."
561
+ summary: "How agents should deploy Coderunner workloads and init/publish Shell apps with gf / MCP. Enable workspace Authentication before create. Service (Deployment) requires a Dockerfile. Shell apps: gf apps init, never invent App.tsx."
528
562
  },
529
563
  {
530
564
  id: "developers",
@@ -562,7 +596,8 @@ var DOC_CATALOG = [
562
596
  id: "shell",
563
597
  title: "Shell federated apps",
564
598
  path: "/docs/integrations/shell",
565
- summary: "Product Apps vs Coderunner deploy."
599
+ summary: "Product Apps vs Coderunner. Always gf apps init --slug <portal-slug>, then npm run release and gf apps publish --path release.zip. Never zip dist/ or upload only remoteEntry.js.",
600
+ embedded: SHELL_APP_GUIDE
566
601
  }
567
602
  ];
568
603
  function docUrl(entry) {
@@ -652,14 +687,14 @@ function suggestCli(intent, args) {
652
687
  const slug = args?.slug?.trim();
653
688
  return {
654
689
  command: slug ? `gf apps init --slug ${slug}` : "gf apps init --slug <portal-slug>",
655
- why: "Download the official Shell starter-kit and stamp APP_ID. Never scaffold a federated App.tsx from memory \u2014 BrowserRouter in App.tsx crashes the Shell.",
690
+ why: "Download the official Shell starter-kit and stamp APP_ID. Never scaffold vite.config / App.tsx from memory. Never wrap App in BrowserRouter. Never zip dist/ or upload only remoteEntry.js.",
656
691
  docs: "https://docs.groundfloor.cloud/docs/integrations/shell"
657
692
  };
658
693
  }
659
694
  case "publish_app":
660
695
  return {
661
696
  command: args?.slug ? `gf apps init --slug ${args.slug} && cd ${args.slug} && npm install && npm run release && gf apps publish --path release.zip` : "gf apps init --slug <portal-slug> && cd <slug> && npm install && npm run release && gf apps publish --path release.zip",
662
- why: "Ship a Shell federated product App. Init the starter-kit first; run npm run release (do not zip Vite dist/). Do not gf deploy and do not invent App.tsx.",
697
+ why: "Ship a Shell federated App. Always init the kit first. npm run release (not zip dist/, not a lone remoteEntry.js). Do not gf deploy. Do not invent App.tsx.",
663
698
  docs: "https://docs.groundfloor.cloud/docs/integrations/shell"
664
699
  };
665
700
  case "secrets":
@@ -721,7 +756,7 @@ async function resolveCoderunnerId(apiUrl, workspaceId, idOrSlug) {
721
756
  }
722
757
  var server = new McpServer({
723
758
  name: "groundfloor",
724
- version: "0.1.0"
759
+ version: "0.1.3"
725
760
  });
726
761
  server.tool(
727
762
  "whoami",
@@ -791,10 +826,17 @@ server.tool(
791
826
  node: 'Bootstrap image uses CMD ["npm","start"]. Missing scripts.start \u2192 deploy Failed (status 4), 8080 connection refused.',
792
827
  local_live_data: 'eval "$(gf env)" then call Control Plane vault/files/secrets with Bearer $(gf token). Do not zip .env files.'
793
828
  },
829
+ shell_app_howto: {
830
+ docs_get: "shell",
831
+ rule: "Never invent a Vite + Module Federation app. gf apps init --slug <portal-slug>, npm install, npm run release, gf apps publish --path release.zip. Do not zip dist/ or upload only remoteEntry.js.",
832
+ suggest_cli: "init_app | publish_app"
833
+ },
794
834
  actions: {
795
835
  deploy: suggestCli("deploy"),
796
836
  switch_workspace: suggestCli("switch_workspace"),
797
- run: suggestCli("run")
837
+ run: suggestCli("run"),
838
+ init_app: suggestCli("init_app"),
839
+ publish_app: suggestCli("publish_app")
798
840
  },
799
841
  docs: DOC_CATALOG.map((d) => ({
800
842
  id: d.id,
@@ -1022,7 +1064,7 @@ server.tool(
1022
1064
  );
1023
1065
  server.tool(
1024
1066
  "suggest_cli",
1025
- "Return the gf command the developer (or agent terminal) should run. MCP does not execute mutations.",
1067
+ "Return the gf command to run. For a Shell App use intent init_app or publish_app (never scaffold App.tsx; never gf deploy). MCP does not execute mutations.",
1026
1068
  {
1027
1069
  intent: z.enum([
1028
1070
  "login",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groundfloorcloud/mcp",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Groundfloor MCP — inspect workspace state and docs; take actions with the gf CLI.",
5
5
  "type": "module",
6
6
  "bin": {