@groundfloorcloud/mcp 0.1.14 → 0.1.16
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/dist/index.js +95 -92
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -446,14 +446,38 @@ async function resolveMcpConfig(overrides) {
|
|
|
446
446
|
|
|
447
447
|
// src/coderunner-runtime.ts
|
|
448
448
|
var CODERUNNER_RUNTIME_BODY = `
|
|
449
|
-
|
|
450
|
-
Your process must match that image \u2014 \`gf deploy\` checks the Node bits before
|
|
451
|
-
upload. A custom Dockerfile (required for \`service\` / Deployment) replaces
|
|
452
|
-
the bootstrap; the listen/bind rules still apply.
|
|
449
|
+
The contract depends on the workload type.
|
|
453
450
|
|
|
454
|
-
|
|
451
|
+
| Type | Entrypoint (no Dockerfile) | Needs |
|
|
452
|
+
|---|---|---|
|
|
453
|
+
| \`function\`, \`job\`, \`schedule\` | Generated \`/app/main.js\` that does \`require('./handler')\` | Root \`handler.js\` exporting \`handler\` |
|
|
454
|
+
| \`service\` (Deployment) | Your Dockerfile \`CMD\` (Dockerfile required) | \`npm start\` / \`PORT\` / bind \`0.0.0.0\` if CMD is \`npm start\` |
|
|
455
455
|
|
|
456
|
-
|
|
456
|
+
\`gf deploy\` checks the Node bits before upload.
|
|
457
|
+
|
|
458
|
+
## Node: function, job, schedule
|
|
459
|
+
|
|
460
|
+
\`npm start\` is **not** run for these types. The platform's generated
|
|
461
|
+
\`/app/main.js\` loads your code with \`require('./handler')\`, so:
|
|
462
|
+
|
|
463
|
+
1. Put a \`handler.js\` at the ZIP root (not nested) that exports \`handler\`.
|
|
464
|
+
\`gf deploy\` also accepts a \`package.json\` \`"main"\` that points at an
|
|
465
|
+
existing file, but \`./handler\` is the documented path; prefer \`handler.js\`.
|
|
466
|
+
2. \`scripts.start\` is not required, and a server that listens on a port is
|
|
467
|
+
not needed.
|
|
468
|
+
3. Missing \`handler.js\` \u2192 the new revision crash-loops
|
|
469
|
+
(\`Cannot find module './handler'\`, \`MODULE_NOT_FOUND\`) and the deployment
|
|
470
|
+
ends **Failed (status 4)**. Check \`gf coderunner logs -c <id>\`.
|
|
471
|
+
|
|
472
|
+
For the handler's arguments and, for functions, the HTTP event/return shape,
|
|
473
|
+
see the runtime docs (https://docs.groundfloor.cloud/docs/deploy). Do not guess
|
|
474
|
+
the argument order.
|
|
475
|
+
|
|
476
|
+
## Node: service (or any Dockerfile that runs \`npm start\`)
|
|
477
|
+
|
|
478
|
+
A \`service\` **requires** a root Dockerfile; you own \`CMD\`. If it is
|
|
479
|
+
\`npm start\` (for any type), \`package.json\` needs \`"scripts": { "start": ... }\`,
|
|
480
|
+
and the process must follow the HTTP contract:
|
|
457
481
|
|
|
458
482
|
\`\`\`dockerfile
|
|
459
483
|
FROM node:18-alpine
|
|
@@ -464,8 +488,7 @@ ENV PORT=8080
|
|
|
464
488
|
CMD ["npm", "start"]
|
|
465
489
|
\`\`\`
|
|
466
490
|
|
|
467
|
-
1. \`
|
|
468
|
-
Missing \`start\` \u2192 container crash loop, probe \`127.0.0.1:8080\` connection
|
|
491
|
+
1. Missing \`start\` \u2192 container crash loop, probe \`127.0.0.1:8080\` connection
|
|
469
492
|
refused, deployment **Failed (status 4)** after several minutes.
|
|
470
493
|
2. Listen on \`Number(process.env.PORT || 8080)\`.
|
|
471
494
|
3. Bind **\`0.0.0.0\`**, not \`127.0.0.1\`. Cluster traffic is not loopback.
|
|
@@ -477,29 +500,8 @@ server.listen(port, "0.0.0.0", () => {
|
|
|
477
500
|
});
|
|
478
501
|
\`\`\`
|
|
479
502
|
|
|
480
|
-
Offer GET \`/\` or \`/health\` for the probe.
|
|
481
|
-
|
|
482
|
-
## Known issue: bootstrap has been reported to skip \`npm start\`
|
|
483
|
-
|
|
484
|
-
Reported 2026-09-22 against a \`function\` deploy with no Dockerfile, **unresolved as of this
|
|
485
|
-
writing**: instead of running \`npm start\` per the contract above, the platform's own
|
|
486
|
-
\`/app/main.js\` ran \`require('./handler')\` \u2014 a file/module contract this document does not
|
|
487
|
-
describe \u2014 even though \`scripts.start\` and the entrypoint were present and correct. Symptom in
|
|
488
|
-
\`gf coderunner logs -c <id>\`: \`Cannot find module './handler'\` (\`MODULE_NOT_FOUND\`), repeated
|
|
489
|
-
probe \`127.0.0.1:8080\` connection refused, deployment **Failed (status 4)**. Whether \`job\` and
|
|
490
|
-
\`schedule\` share this bootstrap path and are equally affected has not been confirmed either way \u2014
|
|
491
|
-
treat the workaround below as precautionary for those types too if you hit the same signature.
|
|
492
|
-
|
|
493
|
-
**Workaround:** add your own root \`Dockerfile\` (e.g. \`CMD ["npm", "start"]\`) and keep your
|
|
494
|
-
existing \`workload_type\` \u2014 a Dockerfile bypasses the injected bootstrap entirely regardless of
|
|
495
|
-
type (see "Node (with Dockerfile)" below), so this sidesteps the bug without changing how the
|
|
496
|
-
workload is invoked.
|
|
497
|
-
|
|
498
|
-
## Node (with Dockerfile)
|
|
499
|
-
|
|
500
|
-
You own \`CMD\`. If it is \`npm start\`, you still need \`scripts.start\`.
|
|
501
|
-
Listen on 8080 / \`PORT\` and bind \`0.0.0.0\`. \`service\` (Deployment)
|
|
502
|
-
**requires** a root Dockerfile \u2014 bootstrap is not injected on that path.
|
|
503
|
+
Offer GET \`/\` or \`/health\` for the probe. A Dockerfile whose \`CMD\` is not
|
|
504
|
+
\`npm start\` replaces the generated bootstrap entirely, for any type.
|
|
503
505
|
|
|
504
506
|
## Python
|
|
505
507
|
|
|
@@ -508,16 +510,18 @@ Bind \`0.0.0.0\` and \`PORT\` (default 8080), for example
|
|
|
508
510
|
|
|
509
511
|
## Jobs and schedules
|
|
510
512
|
|
|
511
|
-
|
|
512
|
-
need a public URL. Schedules have **no** Deployment URL. Set cron with
|
|
513
|
+
Node: \`handler.js\` exporting \`handler\`, same as functions (no \`npm start\`).
|
|
514
|
+
They do not need a public URL. Schedules have **no** Deployment URL. Set cron with
|
|
513
515
|
\`gf deploy --workload-type schedule --schedule "<cron>"\` or
|
|
514
516
|
\`groundfloor.json\` \`"schedule"\`.
|
|
515
517
|
|
|
516
518
|
## What \`gf deploy\` checks
|
|
517
519
|
|
|
518
520
|
- \`service\` without a root Dockerfile \u2192 fail immediately.
|
|
519
|
-
- Node without a Dockerfile
|
|
520
|
-
\`
|
|
521
|
+
- Node \`function\`/\`job\`/\`schedule\` without a Dockerfile and without a root
|
|
522
|
+
\`handler.js\` (or a \`package.json\` \`"main"\` that resolves to a file) \u2192 fail
|
|
523
|
+
immediately. \`scripts.start\` is not required.
|
|
524
|
+
- Node with a Dockerfile that runs \`npm start\` and no \`scripts.start\` \u2192 fail immediately.
|
|
521
525
|
- Listen/bind are not parsed from source; match the sample or the probe fails
|
|
522
526
|
at deploy time. Check Process Log / \`gf coderunner logs -c <id>\`.
|
|
523
527
|
`.trim();
|
|
@@ -571,24 +575,24 @@ Pick **one** type per coderunner. Changing type later means a new coderunner.
|
|
|
571
575
|
|
|
572
576
|
### Function
|
|
573
577
|
|
|
574
|
-
- ZIP at archive root (\`
|
|
575
|
-
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
578
|
+
- ZIP at archive root (\`handler.js\` / \`package.json\` or \`main.py\` not nested).
|
|
579
|
+
- **Node:** a root \`handler.js\` exporting \`handler\`. The platform runs a generated
|
|
580
|
+
\`/app/main.js\` that does \`require('./handler')\`; \`npm start\` is **not** run and
|
|
581
|
+
\`scripts.start\` is not required. Missing \`handler.js\` \u2192 crash loop
|
|
582
|
+
(\`Cannot find module './handler'\`), deployment **Failed (status 4)**.
|
|
583
|
+
\`gf deploy\` fails fast on this. Handler arguments and the HTTP event/return
|
|
584
|
+
shape: see the runtime docs (\`docs_get\` id \`coderunner-runtime\`, docs.groundfloor.cloud/docs/deploy).
|
|
585
|
+
- Node with your own Dockerfile (\`CMD ["npm","start"]\`) instead: listen on
|
|
586
|
+
\`process.env.PORT || 8080\`, bind **\`0.0.0.0\`** (health GET \`/\` or \`/health\`), and
|
|
587
|
+
define \`scripts.start\`.
|
|
579
588
|
- Python: process must bind 0.0.0.0:\${PORT:-8080}.
|
|
580
589
|
- After deploy: \`gf coderunner run -c <slug> --payload '{"hello":"world"}'\`.
|
|
581
|
-
- \u26A0\uFE0F See "Known issue" in \`docs_get\` id \`coderunner-runtime\` if \`gf coderunner logs\` shows
|
|
582
|
-
\`Cannot find module './handler'\` despite a correct \`scripts.start\` \u2014 add a Dockerfile as the
|
|
583
|
-
workaround, no type change needed.
|
|
584
590
|
|
|
585
591
|
### Job
|
|
586
592
|
|
|
587
|
-
-
|
|
593
|
+
- Node: same as function (root \`handler.js\` exporting \`handler\`; no \`npm start\`).
|
|
594
|
+
No need to serve forever; exit 0 on success.
|
|
588
595
|
- Deploy, then start a run (\`gf coderunner run\`). Check Process Log.
|
|
589
|
-
- \u26A0\uFE0F Not confirmed whether the no-Dockerfile bootstrap bug in \`docs_get\` id \`coderunner-runtime\`
|
|
590
|
-
("Known issue") also hits \`job\` \u2014 if a run never starts and logs show the same
|
|
591
|
-
\`MODULE_NOT_FOUND: './handler'\`, apply the same Dockerfile workaround.
|
|
592
596
|
|
|
593
597
|
### Schedule
|
|
594
598
|
|
|
@@ -598,8 +602,7 @@ Pick **one** type per coderunner. Changing type later means a new coderunner.
|
|
|
598
602
|
- GET/list/status expose top-level \`workload_type\` and \`schedule\`.
|
|
599
603
|
\`gf coderunner status -c <slug>\` prints type, schedule, last_job.
|
|
600
604
|
- No public invoke URL. Debug with \`gf coderunner logs\`, not curl.
|
|
601
|
-
-
|
|
602
|
-
same Dockerfile workaround if you see the identical crash signature.
|
|
605
|
+
- Node: same handler contract as function (root \`handler.js\`).
|
|
603
606
|
|
|
604
607
|
### Service (Deployment)
|
|
605
608
|
|
|
@@ -620,7 +623,7 @@ ENV PORT=8080
|
|
|
620
623
|
CMD ["npm", "start"]
|
|
621
624
|
\`\`\`
|
|
622
625
|
|
|
623
|
-
-
|
|
626
|
+
- Services follow the \`npm start\` / \`PORT\` contract: Node needs \`scripts.start\` if CMD is \`npm start\`.
|
|
624
627
|
- Prefer curling the Deployment URL (\`/health\`) over \`\u2026/run\`.
|
|
625
628
|
|
|
626
629
|
## Latest deploy rules (all types)
|
|
@@ -651,7 +654,7 @@ gf dataplane status # provision if needed: gf dataplane provision
|
|
|
651
654
|
gf secrets ls
|
|
652
655
|
\`\`\`
|
|
653
656
|
|
|
654
|
-
Local HTTP (Node function
|
|
657
|
+
Local HTTP (Node service, or a Dockerfile-based function):
|
|
655
658
|
|
|
656
659
|
\`\`\`bash
|
|
657
660
|
export PORT=8080
|
|
@@ -770,7 +773,7 @@ If they opt out of Tailwind:
|
|
|
770
773
|
|
|
771
774
|
The kit ships FederatedStyleRoot in src/lib/FederatedStyleRoot.tsx.
|
|
772
775
|
|
|
773
|
-
Human docs: /docs/
|
|
776
|
+
Human docs: /docs/apps/shell/styling
|
|
774
777
|
`;
|
|
775
778
|
|
|
776
779
|
// src/databases-guide.ts
|
|
@@ -818,7 +821,7 @@ resolution. POST /v1/workspaces/{id}/vault/collections with
|
|
|
818
821
|
POST /v1/workspaces/{id}/managed-databases with engine postgres
|
|
819
822
|
- Shell 403 / empty vault \u2192 collection Access for the site role
|
|
820
823
|
|
|
821
|
-
docs_get id databases. Human docs: /docs/
|
|
824
|
+
docs_get id databases. Human docs: /docs/data/databases and /docs/data/data-vault
|
|
822
825
|
`;
|
|
823
826
|
|
|
824
827
|
// src/design-standard-guide.ts
|
|
@@ -1131,55 +1134,55 @@ var DOC_CATALOG = [
|
|
|
1131
1134
|
{
|
|
1132
1135
|
id: "agents",
|
|
1133
1136
|
title: "Deploy with agents",
|
|
1134
|
-
path: "/docs/
|
|
1137
|
+
path: "/docs/developer-tools/ai-agents",
|
|
1135
1138
|
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."
|
|
1136
1139
|
},
|
|
1137
1140
|
{
|
|
1138
1141
|
id: "developers",
|
|
1139
1142
|
title: "Developers (gf CLI)",
|
|
1140
|
-
path: "/docs/
|
|
1143
|
+
path: "/docs/developer-tools/cli",
|
|
1141
1144
|
summary: "gf login, workspaces, deploy, secrets, feature flags (gf flags), files, apps, gf m2m token. Coderunner types: function, job, schedule, service (also called Deployment). App authentication optional."
|
|
1142
1145
|
},
|
|
1143
1146
|
{
|
|
1144
1147
|
id: "coderunner",
|
|
1145
1148
|
title: "Coderunner",
|
|
1146
|
-
path: "/docs/
|
|
1147
|
-
summary: "Workload types (function, job, schedule, service/Deployment), runtime contract (
|
|
1149
|
+
path: "/docs/deploy",
|
|
1150
|
+
summary: "Workload types (function, job, schedule, service/Deployment), runtime contract (handler.js for function/job/schedule; npm start, PORT 8080 for service), Dockerfile for services, Coderunner identities for Vault, App authentication optional, local live data, gf deploy.",
|
|
1148
1151
|
embedded: CODERUNNER_GUIDE,
|
|
1149
|
-
lastUpdated: "2026-
|
|
1152
|
+
lastUpdated: "2026-10-02"
|
|
1150
1153
|
},
|
|
1151
1154
|
{
|
|
1152
1155
|
id: "coderunner-runtime",
|
|
1153
1156
|
title: "Coderunner runtime contract",
|
|
1154
|
-
path: "/docs/
|
|
1155
|
-
summary: "What the platform expects your code to do: Node
|
|
1157
|
+
path: "/docs/deploy",
|
|
1158
|
+
summary: "What the platform expects your code to do: Node handler.js for function/job/schedule, npm start + PORT/8080 + bind 0.0.0.0 for service/Dockerfile, Python bind.",
|
|
1156
1159
|
embedded: CODERUNNER_RUNTIME_CONTRACT,
|
|
1157
|
-
lastUpdated: "2026-
|
|
1160
|
+
lastUpdated: "2026-10-02"
|
|
1158
1161
|
},
|
|
1159
1162
|
{
|
|
1160
1163
|
id: "coderunner-overview",
|
|
1161
1164
|
title: "Coderunner overview",
|
|
1162
|
-
path: "/docs/
|
|
1165
|
+
path: "/docs/deploy",
|
|
1163
1166
|
summary: "Architecture and lifecycle. Prefer docs_get id coderunner for type usage, Dockerfile, and create prerequisites.",
|
|
1164
1167
|
embedded: CODERUNNER_GUIDE,
|
|
1165
|
-
lastUpdated: "2026-
|
|
1168
|
+
lastUpdated: "2026-10-02"
|
|
1166
1169
|
},
|
|
1167
1170
|
{
|
|
1168
1171
|
id: "authentication",
|
|
1169
1172
|
title: "Workspace Authentication",
|
|
1170
|
-
path: "/docs/
|
|
1173
|
+
path: "/docs/access/app-authentication",
|
|
1171
1174
|
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."
|
|
1172
1175
|
},
|
|
1173
1176
|
{
|
|
1174
1177
|
id: "access",
|
|
1175
1178
|
title: "Access",
|
|
1176
|
-
path: "/docs/
|
|
1179
|
+
path: "/docs/access/site-access",
|
|
1177
1180
|
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."
|
|
1178
1181
|
},
|
|
1179
1182
|
{
|
|
1180
1183
|
id: "m2m",
|
|
1181
1184
|
title: "M2M tokens",
|
|
1182
|
-
path: "/docs/
|
|
1185
|
+
path: "/docs/access/m2m-tokens",
|
|
1183
1186
|
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. Secrets only with the opt-in secrets:read scope (read-only). Cache the token; minting is rate-limited per client and IP."
|
|
1184
1187
|
},
|
|
1185
1188
|
{
|
|
@@ -1191,7 +1194,7 @@ var DOC_CATALOG = [
|
|
|
1191
1194
|
{
|
|
1192
1195
|
id: "shell",
|
|
1193
1196
|
title: "Shell federated apps",
|
|
1194
|
-
path: "/docs/
|
|
1197
|
+
path: "/docs/apps/shell",
|
|
1195
1198
|
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.",
|
|
1196
1199
|
embedded: SHELL_APP_GUIDE,
|
|
1197
1200
|
lastUpdated: "2026-09-26"
|
|
@@ -1199,7 +1202,7 @@ var DOC_CATALOG = [
|
|
|
1199
1202
|
{
|
|
1200
1203
|
id: "design-standard",
|
|
1201
1204
|
title: "Shell app design standard",
|
|
1202
|
-
path: "/docs/
|
|
1205
|
+
path: "/docs/apps/shell/styling",
|
|
1203
1206
|
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.",
|
|
1204
1207
|
embedded: DESIGN_STANDARD_GUIDE,
|
|
1205
1208
|
lastUpdated: "2026-09-04"
|
|
@@ -1207,7 +1210,7 @@ var DOC_CATALOG = [
|
|
|
1207
1210
|
{
|
|
1208
1211
|
id: "css-and-styling",
|
|
1209
1212
|
title: "CSS and styling",
|
|
1210
|
-
path: "/docs/
|
|
1213
|
+
path: "/docs/apps/shell/styling",
|
|
1211
1214
|
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.",
|
|
1212
1215
|
embedded: CSS_AND_STYLING_GUIDE,
|
|
1213
1216
|
lastUpdated: "2026-09-04"
|
|
@@ -1215,7 +1218,7 @@ var DOC_CATALOG = [
|
|
|
1215
1218
|
{
|
|
1216
1219
|
id: "databases",
|
|
1217
1220
|
title: "Databases",
|
|
1218
|
-
path: "/docs/
|
|
1221
|
+
path: "/docs/data/databases",
|
|
1219
1222
|
summary: "Dataplane is not a database. PostgreSQL (shared, platform-managed) is ready through Dataplane with no deploy step. A dedicated PostgreSQL you deploy and own is a separate, heavier path. PostgreSQL is the only engine offered.",
|
|
1220
1223
|
embedded: DATABASES_GUIDE,
|
|
1221
1224
|
lastUpdated: "2026-09-26"
|
|
@@ -1231,7 +1234,7 @@ var DOC_CATALOG = [
|
|
|
1231
1234
|
{
|
|
1232
1235
|
id: "feature-flags",
|
|
1233
1236
|
title: "Feature Flags",
|
|
1234
|
-
path: "/docs/
|
|
1237
|
+
path: "/docs/configure/feature-flags",
|
|
1235
1238
|
summary: "Built-in per-environment feature flags (toggles / config values) \u2014 use these, not a Vault collection. gf flags ls|set|compare|promote. Apps read GET \u2026/flags/runtime: Shell apps with the end-user JWT + window.__GF_ENVIRONMENT_ID__ (starter-kit useFlag), Coderunners with gf m2m token + GROUNDFLOOR_ENVIRONMENT_ID. Default environment is dev.",
|
|
1236
1239
|
embedded: FLAGS_GUIDE,
|
|
1237
1240
|
lastUpdated: "2026-09-26"
|
|
@@ -1247,10 +1250,10 @@ var DOC_CATALOG = [
|
|
|
1247
1250
|
{
|
|
1248
1251
|
id: "scheduled-jobs",
|
|
1249
1252
|
title: "Scheduled jobs",
|
|
1250
|
-
path: "/docs/
|
|
1253
|
+
path: "/docs/deploy/schedules",
|
|
1251
1254
|
summary: "workload_type=schedule plus cron. gf coderunner status shows type/schedule/last_job. Use Process Log, not a public URL.",
|
|
1252
1255
|
embedded: CODERUNNER_GUIDE,
|
|
1253
|
-
lastUpdated: "2026-
|
|
1256
|
+
lastUpdated: "2026-10-02"
|
|
1254
1257
|
}
|
|
1255
1258
|
];
|
|
1256
1259
|
function docUrl(entry) {
|
|
@@ -1314,94 +1317,94 @@ function suggestCli(intent, args) {
|
|
|
1314
1317
|
return {
|
|
1315
1318
|
command: args?.cell === "stage" ? "gf login --stage" : args?.cell === "dev" ? "gf login --dev" : "gf login",
|
|
1316
1319
|
why: "Creates ~/.groundfloor session (auto-refresh). MCP reads this; do not paste JWTs into mcp.json.",
|
|
1317
|
-
docs: "https://docs.groundfloor.cloud/docs/
|
|
1320
|
+
docs: "https://docs.groundfloor.cloud/docs/developer-tools/cli"
|
|
1318
1321
|
};
|
|
1319
1322
|
case "switch_workspace":
|
|
1320
1323
|
return {
|
|
1321
1324
|
command: args?.workspace ? `gf workspaces use ${args.workspace}` : "gf workspaces && gf workspaces use <uuid>",
|
|
1322
1325
|
why: "Sets the default workspace for gf and MCP.",
|
|
1323
|
-
docs: "https://docs.groundfloor.cloud/docs/
|
|
1326
|
+
docs: "https://docs.groundfloor.cloud/docs/developer-tools/cli"
|
|
1324
1327
|
};
|
|
1325
1328
|
case "deploy":
|
|
1326
1329
|
return {
|
|
1327
1330
|
command: name ? `gf deploy -n ${name}${ws}` : `gf deploy${ws}`,
|
|
1328
|
-
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
|
|
1329
|
-
docs: "https://docs.groundfloor.cloud/docs/
|
|
1331
|
+
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 function/job/schedule: root handler.js exporting handler (no npm start). Node service/Dockerfile: scripts.start, listen PORT||8080, bind 0.0.0.0. Do not create an App for this.',
|
|
1332
|
+
docs: "https://docs.groundfloor.cloud/docs/deploy"
|
|
1330
1333
|
};
|
|
1331
1334
|
case "run":
|
|
1332
1335
|
return {
|
|
1333
1336
|
command: name ? `gf coderunner run -c ${name}${ws}` : `gf coderunner run -c <id-or-slug>${ws}`,
|
|
1334
1337
|
why: "Smoke-invoke a deployed function or job.",
|
|
1335
|
-
docs: "https://docs.groundfloor.cloud/docs/
|
|
1338
|
+
docs: "https://docs.groundfloor.cloud/docs/deploy"
|
|
1336
1339
|
};
|
|
1337
1340
|
case "status":
|
|
1338
1341
|
return {
|
|
1339
1342
|
command: name ? `gf coderunner status -c ${name}${ws}` : `gf coderunner ls${ws}`,
|
|
1340
1343
|
why: "Inspect build/deploy state.",
|
|
1341
|
-
docs: "https://docs.groundfloor.cloud/docs/
|
|
1344
|
+
docs: "https://docs.groundfloor.cloud/docs/deploy"
|
|
1342
1345
|
};
|
|
1343
1346
|
case "logs":
|
|
1344
1347
|
return {
|
|
1345
1348
|
command: name ? `gf coderunner logs -c ${name}${ws}` : `gf coderunner logs -c <id-or-slug>${ws}`,
|
|
1346
1349
|
why: "Process Log (stdout/stderr). gf deploy prints the last lines on failure; this command fetches more. runner_id accepts a coderunner id.",
|
|
1347
|
-
docs: "https://docs.groundfloor.cloud/docs/
|
|
1350
|
+
docs: "https://docs.groundfloor.cloud/docs/deploy"
|
|
1348
1351
|
};
|
|
1349
1352
|
case "init_app": {
|
|
1350
1353
|
const slug = args?.slug?.trim();
|
|
1351
1354
|
return {
|
|
1352
1355
|
command: slug ? `gf apps init --slug ${slug}` : "gf apps init --slug <portal-slug>",
|
|
1353
1356
|
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.",
|
|
1354
|
-
docs: "https://docs.groundfloor.cloud/docs/
|
|
1357
|
+
docs: "https://docs.groundfloor.cloud/docs/apps/shell"
|
|
1355
1358
|
};
|
|
1356
1359
|
}
|
|
1357
1360
|
case "publish_app":
|
|
1358
1361
|
return {
|
|
1359
1362
|
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",
|
|
1360
1363
|
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.",
|
|
1361
|
-
docs: "https://docs.groundfloor.cloud/docs/
|
|
1364
|
+
docs: "https://docs.groundfloor.cloud/docs/apps/shell"
|
|
1362
1365
|
};
|
|
1363
1366
|
case "environments":
|
|
1364
1367
|
return {
|
|
1365
1368
|
command: `gf environments ls${ws}`,
|
|
1366
1369
|
why: "List workspace environments (id, name, status) for secrets and deploy targeting.",
|
|
1367
|
-
docs: "https://docs.groundfloor.cloud/docs/
|
|
1370
|
+
docs: "https://docs.groundfloor.cloud/docs/developer-tools/cli"
|
|
1368
1371
|
};
|
|
1369
1372
|
case "cancel_deployment":
|
|
1370
1373
|
return {
|
|
1371
1374
|
command: name ? `gf coderunner cancel-deployment -c ${name}${ws}` : `gf coderunner cancel-deployment -c <id-or-slug>${ws}`,
|
|
1372
1375
|
why: "Delete the current deployment (or --deployment-id). Use this for a deploy stuck in deploying.",
|
|
1373
|
-
docs: "https://docs.groundfloor.cloud/docs/
|
|
1376
|
+
docs: "https://docs.groundfloor.cloud/docs/deploy"
|
|
1374
1377
|
};
|
|
1375
1378
|
case "secrets":
|
|
1376
1379
|
return {
|
|
1377
1380
|
command: `gf secrets ls${ws}`,
|
|
1378
1381
|
why: "Mutations: gf secrets set|get|rm. MCP only lists keys.",
|
|
1379
|
-
docs: "https://docs.groundfloor.cloud/docs/
|
|
1382
|
+
docs: "https://docs.groundfloor.cloud/docs/developer-tools/cli"
|
|
1380
1383
|
};
|
|
1381
1384
|
case "flags":
|
|
1382
1385
|
return {
|
|
1383
1386
|
command: `gf flags ls${ws}`,
|
|
1384
1387
|
why: "Feature flags per environment. Mutations: gf flags set|rm|compare|promote (-e <id|name>). Apps read GET \u2026/flags/runtime (docs_get id feature-flags). Do not build flags in a Vault collection.",
|
|
1385
|
-
docs: "https://docs.groundfloor.cloud/docs/
|
|
1388
|
+
docs: "https://docs.groundfloor.cloud/docs/configure/feature-flags"
|
|
1386
1389
|
};
|
|
1387
1390
|
case "dataplane":
|
|
1388
1391
|
return {
|
|
1389
1392
|
command: `gf dataplane status${ws} # provision: gf dataplane provision`,
|
|
1390
1393
|
why: "Dataplane is required for vault, files, and secrets.",
|
|
1391
|
-
docs: "https://docs.groundfloor.cloud/docs/
|
|
1394
|
+
docs: "https://docs.groundfloor.cloud/docs/developer-tools/cli"
|
|
1392
1395
|
};
|
|
1393
1396
|
case "vault_token":
|
|
1394
1397
|
case "m2m_token":
|
|
1395
1398
|
return {
|
|
1396
1399
|
command: `gf m2m token${ws}`,
|
|
1397
1400
|
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.",
|
|
1398
|
-
docs: "https://docs.groundfloor.cloud/docs/
|
|
1401
|
+
docs: "https://docs.groundfloor.cloud/docs/access/m2m-tokens"
|
|
1399
1402
|
};
|
|
1400
1403
|
default:
|
|
1401
1404
|
return {
|
|
1402
1405
|
command: "gf --help",
|
|
1403
1406
|
why: `Unknown intent "${intent}". Use login | switch_workspace | deploy | run | status | logs | environments | cancel_deployment | init_app | publish_app | secrets | flags | dataplane | vault_token.`,
|
|
1404
|
-
docs: "https://docs.groundfloor.cloud/docs/
|
|
1407
|
+
docs: "https://docs.groundfloor.cloud/docs/developer-tools/cli"
|
|
1405
1408
|
};
|
|
1406
1409
|
}
|
|
1407
1410
|
}
|
|
@@ -1524,12 +1527,12 @@ server.tool(
|
|
|
1524
1527
|
runtime_contract: "coderunner-runtime",
|
|
1525
1528
|
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).",
|
|
1526
1529
|
types: {
|
|
1527
|
-
function: "
|
|
1528
|
-
job: "Run-to-completion worker. Deploy, then gf coderunner run.",
|
|
1530
|
+
function: "Request/response handler. Invoke with gf coderunner run or the Deployment URL. Node: root handler.js exporting handler (npm start is not run); see docs_get coderunner-runtime.",
|
|
1531
|
+
job: "Run-to-completion worker. Node: root handler.js exporting handler. Deploy, then gf coderunner run.",
|
|
1529
1532
|
schedule: 'Cron job. No public Deployment URL. Set cron with gf deploy --workload-type schedule --schedule "<cron>" (or groundfloor.json schedule).',
|
|
1530
1533
|
service: "Long-running Deployment (same type as service). Dockerfile at ZIP root is required. Listen on 8080 / 0.0.0.0."
|
|
1531
1534
|
},
|
|
1532
|
-
node: "
|
|
1535
|
+
node: "function/job/schedule without a Dockerfile run a generated /app/main.js that requires ./handler: ship a root handler.js exporting handler (scripts.start not needed). service/Dockerfile running npm start: scripts.start, listen PORT||8080, bind 0.0.0.0. gf deploy fails fast on either missing.",
|
|
1533
1536
|
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.'
|
|
1534
1537
|
},
|
|
1535
1538
|
shell_app_howto: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@groundfloorcloud/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "Groundfloor MCP — inspect workspace state and docs; take actions with the gf CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"url": "git+ssh://git@bitbucket.org/codementeam/groundfloor-client-portal.git",
|
|
19
19
|
"directory": "packages/mcp"
|
|
20
20
|
},
|
|
21
|
-
"homepage": "https://docs.groundfloor.cloud/docs/
|
|
21
|
+
"homepage": "https://docs.groundfloor.cloud/docs/developer-tools/ai-agents",
|
|
22
22
|
"keywords": [
|
|
23
23
|
"groundfloor",
|
|
24
24
|
"mcp",
|