@groundfloorcloud/mcp 0.1.6 → 0.1.8

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.
Files changed (3) hide show
  1. package/README.md +8 -4
  2. package/dist/index.js +246 -30
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -74,23 +74,27 @@ The `command` must be your Node (from `which node`), not `npx` and not Cursor’
74
74
  | `coderunner_cancel_deployment` | Delete current (or given) deployment |
75
75
  | `apps_list` / `apps_get` | Inspect product Apps |
76
76
  | `secrets_list` / `files_list` / `domains_list` / `dataplane_status` | Inspect (no secrets values) |
77
- | `docs_list` / `docs_get` | Product docs (`coderunner`, `coderunner-runtime`, and `shell` are embedded how-tos) |
78
- | `suggest_cli` | Command to run: login, deploy, init_app, publish_app, … |
77
+ | `docs_list` / `docs_get` | Product docs (`coderunner`, `shell`, `design-standard`, `css-and-styling`, `databases` are embedded; `access` and `m2m` are live pages) |
78
+ | `suggest_cli` | Command to run: login, deploy, init_app, publish_app, m2m_token, … |
79
79
 
80
80
  Never create `app_kind=coderunner`. Deploy with `gf deploy`.
81
81
 
82
82
  **Shell apps:** `docs_get` id `shell`. Always `gf apps init --slug <portal-slug>`,
83
83
  then `npm run release` and `gf apps publish --path release.zip`. Do not invent
84
84
  `App.tsx` / `vite.config`, zip `dist/`, or upload only `remoteEntry.js`.
85
+ Own CSS framework: `docs_get` id `css-and-styling` (`FederatedStyleRoot`).
86
+
87
+ **Databases:** `docs_get` id `databases`. Dataplane is not a database. ArangoDB
88
+ is ready through Dataplane; Postgres is what you can deploy today.
85
89
 
86
90
  **Coderunner how-to** is embedded: `docs_get` id `coderunner` (also
87
91
  `coderunner-overview`). That page covers:
88
92
 
89
93
  - Types: `function`, `job`, `schedule`, `service` (**also called Deployment**)
90
- - **Authentication must be active** before creating a coderunner
94
+ - App authentication is optional (end-user login); not required to create a coderunner
91
95
  - **Dockerfile is required** for `service` / Deployment
92
96
  - Runtime contract: Node `scripts.start`, listen on `PORT`/8080, bind `0.0.0.0` (`docs_get` id `coderunner-runtime`)
93
- - Local development against live vault/files/secrets (`gf env` + `gf token`)
97
+ - Local development against live vault/files/secrets (`gf env`; as the workload use `gf m2m token`, not `gf token`)
94
98
 
95
99
  `workspace_context` includes a `coderunner_howto` summary so agents see this
96
100
  without an extra fetch.
package/dist/index.js CHANGED
@@ -169,11 +169,31 @@ var CpError = class extends Error {
169
169
  }
170
170
  status;
171
171
  };
172
+ function formatCpErrorDetail(detail, fallback) {
173
+ if (typeof detail === "string" && detail.trim()) return detail.trim();
174
+ if (detail && typeof detail === "object") {
175
+ const obj = detail;
176
+ if (typeof obj.message === "string" && obj.message.trim()) {
177
+ return obj.message.trim();
178
+ }
179
+ if (typeof obj.detail === "string" && obj.detail.trim()) {
180
+ return obj.detail.trim();
181
+ }
182
+ try {
183
+ return JSON.stringify(detail);
184
+ } catch {
185
+ return fallback;
186
+ }
187
+ }
188
+ return fallback;
189
+ }
172
190
  async function parseError(res) {
173
191
  let detail = res.statusText;
174
192
  try {
175
193
  const body = await res.json();
176
- if (body?.detail) detail = String(body.detail);
194
+ if (body?.detail !== void 0) {
195
+ detail = formatCpErrorDetail(body.detail, res.statusText);
196
+ }
177
197
  } catch {
178
198
  }
179
199
  return `${res.status} ${detail}`;
@@ -504,13 +524,11 @@ Also \`docs_get\` id \`coderunner-runtime\`.
504
524
 
505
525
  ## Prerequisites (do these before create/deploy)
506
526
 
507
- 1. **Workspace Authentication is required** before creating a coderunner.
508
- Portal \u2192 Administer \u2192 Authentication \u2192 set mode to \`groundfloor\` (or
509
- \`external\` with an issuer) and wait until the realm is **active**.
510
- Code Runner JWTs use the workspace site issuer. Mode \`none\` cannot mint
511
- that token \u2014 create/deploy fails with "requires the workspace site issuer".
512
- 2. \`gf login\` (\`--stage\` / \`--dev\` as needed) and \`gf workspaces use <uuid>\`.
513
- 3. Dataplane for vault/files/secrets: \`gf dataplane provision\` if those APIs
527
+ 1. \`gf login\` (\`--stage\` / \`--dev\` as needed) and \`gf workspaces use <uuid>\`.
528
+ Team **write** can create Coderunners without App authentication. Site auth
529
+ (Groundfloor/external) is only for end-user login. Mode \`none\` mints
530
+ management JWTs against Portal JWKS (\`GET /v1/public/jwks.json\`).
531
+ 2. Dataplane for vault/files: \`gf dataplane provision\` if those APIs
514
532
  are needed (local live data or the deployed workload).
515
533
 
516
534
  ## Workload types
@@ -613,23 +631,159 @@ curl -sS -X POST http://127.0.0.1:8080/ -H 'Content-Type: application/json' \\
613
631
 
614
632
  Live vault / files / secrets from the laptop:
615
633
 
634
+ \`gf token\` is a **builder** credential. Use it for operator Vault. To call
635
+ Vault and Files as a Coderunner does, use an M2M client and \`gf m2m token\`.
636
+
616
637
  \`\`\`bash
638
+ # Builder token:
617
639
  curl -sS -H "Authorization: Bearer $(gf token)" \\
618
640
  "$CONTROLPLANE_URL/v1/workspaces/$GROUNDFLOOR_WORKSPACE_ID/vault/collections"
641
+
642
+ # M2M (same class as an attached Coderunner):
643
+ curl -sS -H "Authorization: Bearer $(gf m2m token)" \\
644
+ "$CONTROLPLANE_URL/v1/workspaces/$GROUNDFLOOR_WORKSPACE_ID/vault/collections"
645
+ curl -sS -H "Authorization: Bearer $(gf m2m token)" \\
646
+ "$CONTROLPLANE_URL/v1/workspaces/$GROUNDFLOOR_WORKSPACE_ID/files"
619
647
  \`\`\`
620
648
 
621
- In app code, use \`CONTROLPLANE_URL\` + Bearer (\`gf token\` locally;
622
- injected env / workspace secrets after \`gf deploy\`). Never put
623
- \`DATAPLANE_SERVICE_API_KEY\` in a browser bundle.
649
+ In app code, use \`CONTROLPLANE_URL\` + Bearer from
650
+ \`POST \u2026/m2m/token\` (\`gf m2m token\` locally; injected
651
+ \`GROUNDFLOOR_M2M_CLIENT_ID\` / \`GROUNDFLOOR_M2M_CLIENT_SECRET\` after
652
+ \`gf deploy\`). Never put \`DATAPLANE_SERVICE_API_KEY\` in a browser bundle
653
+ or customer env.
624
654
 
625
655
  When the handler looks right locally, \`gf deploy\` the same tree.
626
656
 
657
+ ## M2M tokens (Vault and Files)
658
+
659
+ New Coderunners cannot call Vault or Files until an M2M client is attached
660
+ and the workload is redeployed. Create the client in Portal **Administer \u2192
661
+ M2M tokens**, attach it on the Coderunner card, then deploy. v1 M2M is Team
662
+ Writer on that workspace (full Vault skip-ACL + Files). Grant site users on
663
+ **Administer \u2192 Access**. Never inject a Dataplane key.
664
+
627
665
  ## Agent actions
628
666
 
629
667
  Inspect: \`workspace_context\`, \`docs_get\` id \`coderunner\` or \`coderunner-runtime\`, \`suggest_cli\`.
630
- Act: \`gf deploy\`, \`gf coderunner run|status\`. MCP does not deploy.
668
+ Act: \`gf deploy\`, \`gf coderunner run|status\`, \`gf m2m token\`. MCP does not deploy.
631
669
  `.trim();
632
670
 
671
+ // src/css-and-styling-guide.ts
672
+ var CSS_AND_STYLING_GUIDE = `
673
+ # CSS and styling (Shell apps)
674
+
675
+ Default is Tailwind CSS v3.4 \u2014 same as the Shell. Keep it unless the user
676
+ opts for their own framework.
677
+
678
+ ## Default (Tailwind)
679
+
680
+ 1. Import src/index.css from App.tsx.
681
+ 2. Wrap in FederatedAppRoot (class gf-federated-app).
682
+ 3. Keep important: '.gf-federated-app' and corePlugins.preflight: false.
683
+ 4. Scoped form reset lives in @layer base. Do not put unlayered CSS after
684
+ @tailwind utilities \u2014 that hides input borders.
685
+
686
+ Visual rules: docs_get id design-standard.
687
+
688
+ ## Using your own CSS framework
689
+
690
+ This path is available. Do not run Tailwind and a second global framework
691
+ together (Bootstrap, MUI, CSS Modules, \u2026). Pick one.
692
+
693
+ If they opt out of Tailwind:
694
+
695
+ 1. Do not import that CSS as a global stylesheet.
696
+ 2. Import it as a string: import vendorCss from './vendor.css?inline'
697
+ 3. Wrap the app in FederatedStyleRoot instead of FederatedAppRoot.
698
+ 4. Render modals inside that shadow root, not document.body.
699
+
700
+ The kit ships FederatedStyleRoot in src/lib/FederatedStyleRoot.tsx.
701
+
702
+ Human docs: /docs/integrations/shell/css-and-styling
703
+ `;
704
+
705
+ // src/databases-guide.ts
706
+ var DATABASES_GUIDE = `
707
+ # Databases
708
+
709
+ Dataplane is not a database. It is how Groundfloor talks to databases.
710
+
711
+ When the user starts any data or database work, say this first. Do not mention
712
+ infrastructure internals (cluster operators, installers, and the like):
713
+
714
+ You have ArangoDB ready to use through Dataplane. If you want another
715
+ database, deploy it first. You can use a deployed database through Dataplane,
716
+ or connect to it on your own.
717
+
718
+ ## Options
719
+
720
+ - ArangoDB \u2014 shared, managed, already there. Default for app data and Vault.
721
+ No deploy step. Query via Control Plane vault:
722
+ POST /v1/workspaces/{id}/vault/collections/{name}/query
723
+ - Postgres \u2014 what you can deploy today (portal Data \u2192 Databases). After it is
724
+ ready, use it through Dataplane or with the connection secrets.
725
+ - A database they already run \u2014 through Dataplane if they wire it, or direct.
726
+
727
+ Do not list other engines as available to deploy. Do not call Dataplane hosts
728
+ from apps or embed service keys.
729
+
730
+ ## Paths
731
+
732
+ - Browse / edit rows \u2192 Data Vault (portal or vault APIs)
733
+ - Deploy Postgres \u2192 Customer Portal Databases page, or
734
+ POST /v1/workspaces/{id}/managed-databases with engine postgres
735
+ - Shell 403 / empty vault \u2192 collection Access for the site role
736
+
737
+ docs_get id databases. Human docs: /docs/customer-portal/databases
738
+ `;
739
+
740
+ // src/design-standard-guide.ts
741
+ var DESIGN_STANDARD_GUIDE = `
742
+ # Shell app design standard
743
+
744
+ Every app from \`gf apps init\` should look like this. Reference: Morguard IT
745
+ Onboarding (flat, grey ground, one accent). Do not restyle to the stock
746
+ Tailwind raised-button look.
747
+
748
+ ## Rules
749
+
750
+ - Ground: grey page, white header, one white panel per page with the title inside it.
751
+ - Flat: no shadows, no raised buttons, no sunken fields. Hairline borders only.
752
+ Inputs and secondary buttons share one border weight. Use the kit's scoped
753
+ reset in src/index.css. Never re-enable Tailwind preflight in the remote.
754
+ - Colour: neutral first. One accent (manifest theme.primaryColor) for primary
755
+ actions, links, and the tint behind a selected tab. Meaningful colour only
756
+ in status pills and phase dots. Fallback is a neutral if the hex is missing.
757
+ - Type: Geist Sans / Geist Mono, 13\u201314px working size, tabular numbers, mono
758
+ for IDs and codes.
759
+ - Sequence: a process with ordered steps gets PhaseChevron \u2014 flat, outlined,
760
+ soft tints, underline on the selected step. Pass an ordered steps list;
761
+ do not hard-code client phases.
762
+ - Tables: DataGrid with sentence-case muted headers, search + toggleable
763
+ filters, icon paging, a real empty state.
764
+
765
+ ## Manifest
766
+
767
+ theme.primaryColor \u2192 --primary / --ring at runtime.
768
+ theme.logoUrl \u2192 AppHeader (absolute https URL). Bundled images 404 in Shell
769
+ unless the production build uses base: './'.
770
+
771
+ ## Local
772
+
773
+ npm run dev \u2014 live vault via gf login.
774
+ npm run dev:fixtures \u2014 src/dev/fixtures/<collection>.json, no client data.
775
+
776
+ ## Using your own CSS framework
777
+
778
+ The kit is Tailwind only. You do not need a second framework.
779
+
780
+ If you opt out (Bootstrap, MUI, CSS Modules, \u2026), do not import that CSS
781
+ globally. Use FederatedStyleRoot with \`import './vendor.css?inline'\` so styles
782
+ stay in Shadow DOM. Render modals inside that root, not document.body.
783
+
784
+ Full steps: docs_get id css-and-styling.
785
+ `;
786
+
633
787
  // src/shell-guide.ts
634
788
  var SHELL_APP_GUIDE = `
635
789
  # Shell federated apps
@@ -655,8 +809,18 @@ gf apps publish --path release.zip
655
809
  \`\`\`
656
810
 
657
811
  \`npm run release\` packs **all** of dist/assets (remoteEntry.js + hashed
658
- \`__federation_*.js\` + CSS) at the zip root. Do not zip \`dist/\`. Do not
659
- upload a lone \`remoteEntry.js\`. \`gf apps publish\` rejects incomplete zips.
812
+ \`__federation_*.js\` + CSS) at the zip root and rewrites \`./assets/\` imports
813
+ in remoteEntry.js. Do not zip \`dist/\`. Do not upload a lone \`remoteEntry.js\`.
814
+ \`gf apps publish\` rejects incomplete zips.
815
+
816
+ Production builds use Vite \`base: './'\` so imported images resolve next to
817
+ remoteEntry.js. Header logos: manifest \`theme.logoUrl\` (absolute https).
818
+ UI look: \`docs_get\` id \`design-standard\`. CSS: Tailwind by default;
819
+ own framework uses FederatedStyleRoot (Shadow DOM) \u2014 \`docs_get\` id
820
+ \`css-and-styling\`. Data: Dataplane is not a database. Say first: you have
821
+ ArangoDB ready through Dataplane; deploy Postgres if you want another
822
+ database; use it through Dataplane or on your own (\`docs_get\` id
823
+ \`databases\`). Local UI without live vault: \`npm run dev:fixtures\`.
660
824
 
661
825
  ## suggest_cli
662
826
 
@@ -671,19 +835,19 @@ var DOC_CATALOG = [
671
835
  id: "agents",
672
836
  title: "Deploy with agents",
673
837
  path: "/docs/customer-portal/agents",
674
- 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."
838
+ summary: "How agents should deploy Coderunner workloads and init/publish Shell apps with gf / MCP. App authentication is optional (end-user login). Service (Deployment) requires a Dockerfile. Shell apps: gf apps init, never invent App.tsx."
675
839
  },
676
840
  {
677
841
  id: "developers",
678
842
  title: "Developers (gf CLI)",
679
843
  path: "/docs/customer-portal/developers",
680
- summary: "gf login, workspaces, deploy, secrets, files, apps. Coderunner types: function, job, schedule, service (also called Deployment)."
844
+ summary: "gf login, workspaces, deploy, secrets, files, apps, gf m2m token. Coderunner types: function, job, schedule, service (also called Deployment). App authentication optional."
681
845
  },
682
846
  {
683
847
  id: "coderunner",
684
848
  title: "Coderunner",
685
849
  path: "/docs/customer-portal/coderunner",
686
- summary: "Workload types (function, job, schedule, service/Deployment), runtime contract (scripts.start, 0.0.0.0:8080), Dockerfile for services, Authentication before create, local live data, gf deploy.",
850
+ summary: "Workload types (function, job, schedule, service/Deployment), runtime contract (scripts.start, 0.0.0.0:8080), Dockerfile for services, Coderunner identities for Vault, App authentication optional, local live data, gf deploy.",
687
851
  embedded: CODERUNNER_GUIDE
688
852
  },
689
853
  {
@@ -697,14 +861,26 @@ var DOC_CATALOG = [
697
861
  id: "coderunner-overview",
698
862
  title: "Coderunner overview",
699
863
  path: "/docs/integrations/coderunner/overview",
700
- summary: "Architecture and lifecycle. Prefer docs_get id coderunner for type usage, Dockerfile, and auth prerequisites.",
864
+ summary: "Architecture and lifecycle. Prefer docs_get id coderunner for type usage, Dockerfile, and create prerequisites.",
701
865
  embedded: CODERUNNER_GUIDE
702
866
  },
703
867
  {
704
868
  id: "authentication",
705
869
  title: "Workspace Authentication",
706
870
  path: "/docs/customer-portal/authentication",
707
- summary: "Workspace site auth (Groundfloor or external) must be active before creating a Coderunner. Separate from portal Team."
871
+ summary: "Workspace site auth (Groundfloor or external) is optional end-user login. Leaving Groundfloor keeps the realm (disabled) until Delete Groundfloor login. Separate from portal Team. Not required to create Apps or Coderunners."
872
+ },
873
+ {
874
+ id: "access",
875
+ title: "Access",
876
+ path: "/docs/customer-portal/access",
877
+ summary: "Grant site roles Data Vault collections, workspace-wide Files, and Apps launch. Admin is implicit. M2M is not an Access subject. Team membership is unchanged."
878
+ },
879
+ {
880
+ id: "m2m",
881
+ title: "M2M tokens",
882
+ path: "/docs/customer-portal/m2m-tokens",
883
+ summary: "Confidential client secret \u2192 short Control Plane JWT (typ=m2m). Attach on Coderunner or gf m2m token. Never DATAPLANE_SERVICE_API_KEY. v1 is Team Writer, no collection ACL."
708
884
  },
709
885
  {
710
886
  id: "api-authentication",
@@ -718,6 +894,27 @@ var DOC_CATALOG = [
718
894
  path: "/docs/integrations/shell",
719
895
  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.",
720
896
  embedded: SHELL_APP_GUIDE
897
+ },
898
+ {
899
+ id: "design-standard",
900
+ title: "Shell app design standard",
901
+ path: "/docs/integrations/shell/design-standard",
902
+ summary: "Visual rules for Shell apps: grey ground, flat controls, Geist, one brand accent from theme.primaryColor, DataGrid, PhaseChevron. Use the kit; do not restyle to stock Tailwind.",
903
+ embedded: DESIGN_STANDARD_GUIDE
904
+ },
905
+ {
906
+ id: "css-and-styling",
907
+ title: "CSS and styling",
908
+ path: "/docs/integrations/shell/css-and-styling",
909
+ summary: "Tailwind is the default. Own CSS framework (Bootstrap, MUI, \u2026) uses FederatedStyleRoot and Shadow DOM \u2014 do not load it globally onto the Shell page.",
910
+ embedded: CSS_AND_STYLING_GUIDE
911
+ },
912
+ {
913
+ id: "databases",
914
+ title: "Databases",
915
+ path: "/docs/customer-portal/databases",
916
+ summary: "Dataplane is not a database. ArangoDB is ready through Dataplane. Postgres you deploy first, then use through Dataplane or on your own.",
917
+ embedded: DATABASES_GUIDE
721
918
  }
722
919
  ];
723
920
  function docUrl(entry) {
@@ -788,7 +985,7 @@ function suggestCli(intent, args) {
788
985
  case "deploy":
789
986
  return {
790
987
  command: name ? `gf deploy -n ${name}${ws}` : `gf deploy${ws}`,
791
- why: 'Package the current (or --path) folder and deploy as a Coderunner. Workspace Authentication (groundfloor/external) must already be active. workloadType function|job|schedule|service (service = Deployment; requires a Dockerfile). Schedules need --schedule "<cron>" or groundfloor.json schedule. Node bootstrap: scripts.start, listen PORT||8080, bind 0.0.0.0. Do not create an App for this.',
988
+ why: 'Package the current (or --path) folder and deploy as a Coderunner. App authentication is optional (end-user login only). workloadType function|job|schedule|service (service = Deployment; requires a Dockerfile). Schedules need --schedule "<cron>" or groundfloor.json schedule. Node bootstrap: scripts.start, listen PORT||8080, bind 0.0.0.0. Do not create an App for this.',
792
989
  docs: "https://docs.groundfloor.cloud/docs/customer-portal/coderunner"
793
990
  };
794
991
  case "run":
@@ -847,10 +1044,17 @@ function suggestCli(intent, args) {
847
1044
  why: "Dataplane is required for vault, files, and secrets.",
848
1045
  docs: "https://docs.groundfloor.cloud/docs/customer-portal/developers"
849
1046
  };
1047
+ case "vault_token":
1048
+ case "m2m_token":
1049
+ return {
1050
+ command: `gf m2m token${ws}`,
1051
+ why: "Exchange GROUNDFLOOR_M2M_CLIENT_ID + GROUNDFLOOR_M2M_CLIENT_SECRET for a short Control Plane JWT. Call Vault and Files at $CONTROLPLANE_URL. Never DATAPLANE_SERVICE_API_KEY. gf token is a builder credential.",
1052
+ docs: "https://docs.groundfloor.cloud/docs/customer-portal/m2m-tokens"
1053
+ };
850
1054
  default:
851
1055
  return {
852
1056
  command: "gf --help",
853
- why: `Unknown intent "${intent}". Use login | switch_workspace | deploy | run | status | logs | environments | cancel_deployment | init_app | publish_app | secrets | dataplane.`,
1057
+ why: `Unknown intent "${intent}". Use login | switch_workspace | deploy | run | status | logs | environments | cancel_deployment | init_app | publish_app | secrets | dataplane | vault_token.`,
854
1058
  docs: "https://docs.groundfloor.cloud/docs/customer-portal/developers"
855
1059
  };
856
1060
  }
@@ -894,7 +1098,7 @@ async function resolveCoderunnerId(apiUrl, workspaceId, idOrSlug) {
894
1098
  }
895
1099
  var server = new McpServer({
896
1100
  name: "groundfloor",
897
- version: "0.1.6"
1101
+ version: "0.1.7"
898
1102
  });
899
1103
  server.tool(
900
1104
  "whoami",
@@ -921,7 +1125,7 @@ server.tool(
921
1125
  );
922
1126
  server.tool(
923
1127
  "workspace_context",
924
- "Live context for the selected workspace: session, coderunners, apps, dataplane, suggested gf commands, and Coderunner type/auth/Dockerfile/runtime-contract rules. Use docs_get id coderunner (or coderunner-runtime) before deploying.",
1128
+ "Live context for the selected workspace: session, coderunners, apps, dataplane (access layer, not a database), databases_howto, suggested gf commands. Use docs_get id coderunner before deploying; id databases for data work; id css-and-styling for own CSS framework.",
925
1129
  { workspace_id: wsId },
926
1130
  async ({ workspace_id }) => {
927
1131
  try {
@@ -955,7 +1159,7 @@ server.tool(
955
1159
  coderunner_howto: {
956
1160
  docs_get: "coderunner",
957
1161
  runtime_contract: "coderunner-runtime",
958
- before_create: "Enable Administer \u2192 Authentication (mode groundfloor or external, realm active). Mode none cannot mint a Code Runner JWT.",
1162
+ before_create: "Team write can create Coderunners without App authentication. Site auth is optional (end-user login). Mode none uses Portal JWKS (GET /v1/public/jwks.json).",
959
1163
  types: {
960
1164
  function: "HTTP handler on PORT/8080 bound to 0.0.0.0. Invoke with gf coderunner run or the Deployment URL. Node requires package.json scripts.start.",
961
1165
  job: "Run-to-completion worker. Deploy, then gf coderunner run.",
@@ -963,13 +1167,22 @@ server.tool(
963
1167
  service: "Long-running Deployment (same type as service). Dockerfile at ZIP root is required. Listen on 8080 / 0.0.0.0."
964
1168
  },
965
1169
  node: "No Dockerfile \u2192 platform injects node:18-alpine CMD npm start EXPOSE 8080. Require scripts.start; listen on PORT||8080; bind 0.0.0.0. gf deploy fails fast if scripts.start is missing.",
966
- local_live_data: 'eval "$(gf env)" then call Control Plane vault/files/secrets with Bearer $(gf token). Do not zip .env files.'
1170
+ local_live_data: 'eval "$(gf env)". For files/secrets as a builder use Bearer $(gf token). For Vault/Files as the deployed workload, attach an M2M client and use Bearer $(gf m2m token). Never DATAPLANE_SERVICE_API_KEY. Do not zip .env files.'
967
1171
  },
968
1172
  shell_app_howto: {
969
1173
  docs_get: "shell",
970
1174
  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.",
1175
+ css: "Tailwind is the default (docs_get id css-and-styling). Own framework: FederatedStyleRoot + ?inline CSS in Shadow DOM. Do not load a second CSS framework onto the Shell page.",
1176
+ design: "docs_get id design-standard",
971
1177
  suggest_cli: "init_app | publish_app"
972
1178
  },
1179
+ databases_howto: {
1180
+ docs_get: "databases",
1181
+ dataplane: "Dataplane is not a database. It is how Groundfloor talks to databases.",
1182
+ say_first: "You have ArangoDB ready to use through Dataplane. If you want another database, deploy it first. You can use a deployed database through Dataplane, or connect to it on your own.",
1183
+ arango: "Shared, managed, already there. Default for app data and Vault. No deploy step.",
1184
+ deploy: "Postgres is what you can deploy today."
1185
+ },
973
1186
  actions: {
974
1187
  deploy: suggestCli("deploy"),
975
1188
  switch_workspace: suggestCli("switch_workspace"),
@@ -977,6 +1190,7 @@ server.tool(
977
1190
  logs: suggestCli("logs"),
978
1191
  environments: suggestCli("environments"),
979
1192
  cancel_deployment: suggestCli("cancel_deployment"),
1193
+ vault_token: suggestCli("m2m_token"),
980
1194
  init_app: suggestCli("init_app"),
981
1195
  publish_app: suggestCli("publish_app")
982
1196
  },
@@ -1245,7 +1459,7 @@ server.tool(
1245
1459
  );
1246
1460
  server.tool(
1247
1461
  "dataplane_status",
1248
- "Dataplane setup status. Provision with `gf dataplane provision`.",
1462
+ "Dataplane setup status (Dataplane is how Groundfloor talks to databases, not a database itself). ArangoDB is ready through it. Provision with `gf dataplane provision`.",
1249
1463
  { workspace_id: wsId },
1250
1464
  async ({ workspace_id }) => {
1251
1465
  try {
@@ -1275,10 +1489,10 @@ server.tool(
1275
1489
  );
1276
1490
  server.tool(
1277
1491
  "docs_get",
1278
- "How-to for Coderunner types, runtime contract (scripts.start, 0.0.0.0:8080), Dockerfile, Authentication, local live data, gf CLI, Shell. Pass id from docs_list. Prefer id coderunner or coderunner-runtime before deploying.",
1492
+ "How-to for Coderunner, Shell, design-standard, css-and-styling, databases, access, m2m. Pass id from docs_list. Prefer id coderunner or coderunner-runtime before deploying. For site grants use id access. For Coderunner Vault/Files use id m2m.",
1279
1493
  {
1280
1494
  id: z.string().min(1).describe(
1281
- "Catalog id, e.g. coderunner | coderunner-runtime | coderunner-overview | agents | developers | authentication | api-authentication | shell"
1495
+ "Catalog id, e.g. coderunner | coderunner-runtime | shell | design-standard | css-and-styling | databases | agents | developers | authentication | access | m2m"
1282
1496
  )
1283
1497
  },
1284
1498
  async ({ id }) => {
@@ -1313,10 +1527,12 @@ server.tool(
1313
1527
  "init_app",
1314
1528
  "publish_app",
1315
1529
  "secrets",
1316
- "dataplane"
1530
+ "dataplane",
1531
+ "vault_token",
1532
+ "m2m_token"
1317
1533
  ]),
1318
1534
  workspace: z.string().optional(),
1319
- name: z.string().optional().describe("Coderunner name/id for deploy/run/status/logs/cancel_deployment"),
1535
+ name: z.string().optional().describe("Coderunner name/id for deploy/run/status/logs/cancel_deployment/vault_token"),
1320
1536
  slug: z.string().optional().describe("Portal app slug for init_app / publish_app"),
1321
1537
  cell: z.enum(["production", "stage", "dev"]).optional()
1322
1538
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groundfloorcloud/mcp",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Groundfloor MCP — inspect workspace state and docs; take actions with the gf CLI.",
5
5
  "type": "module",
6
6
  "bin": {