@groundfloorcloud/mcp 0.1.5 → 0.1.7
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 +8 -2
- package/dist/index.js +319 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -69,10 +69,12 @@ The `command` must be your Node (from `which node`), not `npx` and not Cursor’
|
|
|
69
69
|
|------|------|
|
|
70
70
|
| `whoami` / `workspace_context` | Session + live workspace snapshot |
|
|
71
71
|
| `workspaces_list` | List; switch with `gf workspaces use` |
|
|
72
|
-
| `coderunner_list` / `_get_status` / `_get_logs` | Inspect workloads |
|
|
72
|
+
| `coderunner_list` / `_get_status` / `_get_logs` / `_process_log` | Inspect workloads (Process Log does not need a job_id) |
|
|
73
|
+
| `environments_list` | List workspace environments |
|
|
74
|
+
| `coderunner_cancel_deployment` | Delete current (or given) deployment |
|
|
73
75
|
| `apps_list` / `apps_get` | Inspect product Apps |
|
|
74
76
|
| `secrets_list` / `files_list` / `domains_list` / `dataplane_status` | Inspect (no secrets values) |
|
|
75
|
-
| `docs_list` / `docs_get` | Product docs (`coderunner`, `
|
|
77
|
+
| `docs_list` / `docs_get` | Product docs (`coderunner`, `shell`, `design-standard`, `css-and-styling`, `databases` are embedded how-tos) |
|
|
76
78
|
| `suggest_cli` | Command to run: login, deploy, init_app, publish_app, … |
|
|
77
79
|
|
|
78
80
|
Never create `app_kind=coderunner`. Deploy with `gf deploy`.
|
|
@@ -80,6 +82,10 @@ Never create `app_kind=coderunner`. Deploy with `gf deploy`.
|
|
|
80
82
|
**Shell apps:** `docs_get` id `shell`. Always `gf apps init --slug <portal-slug>`,
|
|
81
83
|
then `npm run release` and `gf apps publish --path release.zip`. Do not invent
|
|
82
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.
|
|
83
89
|
|
|
84
90
|
**Coderunner how-to** is embedded: `docs_get` id `coderunner` (also
|
|
85
91
|
`coderunner-overview`). That page covers:
|
package/dist/index.js
CHANGED
|
@@ -191,6 +191,16 @@ async function cpGet(apiUrl, path2) {
|
|
|
191
191
|
}
|
|
192
192
|
return await res.json();
|
|
193
193
|
}
|
|
194
|
+
async function cpDelete(apiUrl, path2) {
|
|
195
|
+
const token = await getValidAccessToken();
|
|
196
|
+
const res = await fetch(`${apiUrl}${path2}`, {
|
|
197
|
+
method: "DELETE",
|
|
198
|
+
headers: { Authorization: `Bearer ${token}`, Accept: "application/json" }
|
|
199
|
+
});
|
|
200
|
+
if (!res.ok) {
|
|
201
|
+
throw new CpError(res.status, await parseError(res));
|
|
202
|
+
}
|
|
203
|
+
}
|
|
194
204
|
function queryString(params) {
|
|
195
205
|
const u = new URLSearchParams();
|
|
196
206
|
for (const [key, value] of Object.entries(params)) {
|
|
@@ -229,6 +239,22 @@ async function getDeployment(apiUrl, workspaceId, coderunnerId) {
|
|
|
229
239
|
}
|
|
230
240
|
return await res.json();
|
|
231
241
|
}
|
|
242
|
+
function deleteCoderunnerDeployment(apiUrl, workspaceId, coderunnerId, deploymentId) {
|
|
243
|
+
return cpDelete(
|
|
244
|
+
apiUrl,
|
|
245
|
+
`/v1/workspaces/${encodeURIComponent(
|
|
246
|
+
workspaceId
|
|
247
|
+
)}/coderunners/${encodeURIComponent(
|
|
248
|
+
coderunnerId
|
|
249
|
+
)}/deployments/${encodeURIComponent(deploymentId)}`
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
function listWorkspaceEnvironments(apiUrl, workspaceId) {
|
|
253
|
+
return cpGet(
|
|
254
|
+
apiUrl,
|
|
255
|
+
`/v1/workspaces/${encodeURIComponent(workspaceId)}/environments`
|
|
256
|
+
);
|
|
257
|
+
}
|
|
232
258
|
function getCoderunnerStatus(apiUrl, workspaceId, coderunnerId) {
|
|
233
259
|
return cpGet(
|
|
234
260
|
apiUrl,
|
|
@@ -247,6 +273,18 @@ function getCoderunnerLogs(apiUrl, workspaceId, coderunnerId, jobId) {
|
|
|
247
273
|
)}/logs/${encodeURIComponent(jobId)}`
|
|
248
274
|
);
|
|
249
275
|
}
|
|
276
|
+
function getProcessLogs(apiUrl, workspaceId, query = {}) {
|
|
277
|
+
const params = new URLSearchParams();
|
|
278
|
+
for (const [key, value] of Object.entries(query)) {
|
|
279
|
+
if (value == null || value === "") continue;
|
|
280
|
+
params.set(key, String(value));
|
|
281
|
+
}
|
|
282
|
+
const qs = params.toString();
|
|
283
|
+
return cpGet(
|
|
284
|
+
apiUrl,
|
|
285
|
+
`/v1/workspaces/${encodeURIComponent(workspaceId)}/logs${qs ? `?${qs}` : ""}`
|
|
286
|
+
);
|
|
287
|
+
}
|
|
250
288
|
function domainsBase(workspaceId, coderunnerId) {
|
|
251
289
|
return `/v1/workspaces/${encodeURIComponent(
|
|
252
290
|
workspaceId
|
|
@@ -429,7 +467,9 @@ Bind \`0.0.0.0\` and \`PORT\` (default 8080), for example
|
|
|
429
467
|
## Jobs and schedules
|
|
430
468
|
|
|
431
469
|
Same package/start rules. The process may exit 0 when finished; it does not
|
|
432
|
-
need a public URL. Schedules have **no** Deployment URL.
|
|
470
|
+
need a public URL. Schedules have **no** Deployment URL. Set cron with
|
|
471
|
+
\`gf deploy --workload-type schedule --schedule "<cron>"\` or
|
|
472
|
+
\`groundfloor.json\` \`"schedule"\`.
|
|
433
473
|
|
|
434
474
|
## What \`gf deploy\` checks
|
|
435
475
|
|
|
@@ -506,8 +546,9 @@ Pick **one** type per coderunner. Changing type later means a new coderunner.
|
|
|
506
546
|
|
|
507
547
|
### Schedule
|
|
508
548
|
|
|
509
|
-
- Same as job, plus a cron expression at
|
|
510
|
-
\`
|
|
549
|
+
- Same as job, plus a cron expression at deploy:
|
|
550
|
+
\`gf deploy --workload-type schedule --schedule "<cron>"\`
|
|
551
|
+
(or \`groundfloor.json\` \`"schedule"\`).
|
|
511
552
|
- No public invoke URL. Debug with Process Log, not curl.
|
|
512
553
|
|
|
513
554
|
### Service (Deployment)
|
|
@@ -545,7 +586,7 @@ CMD ["npm", "start"]
|
|
|
545
586
|
\`gf secrets\` / deploy \`-e\`, never in the archive.
|
|
546
587
|
- Zip **contents** at root, not a wrapping folder.
|
|
547
588
|
- Optional \`groundfloor.json\`: \`name\`, \`runtime\`, \`workloadType\`,
|
|
548
|
-
\`cpu\`, \`memory\`, \`env
|
|
589
|
+
\`cpu\`, \`memory\`, \`env\`, \`schedule\` (cron, schedule workloads only).
|
|
549
590
|
|
|
550
591
|
## Local development with live workspace data
|
|
551
592
|
|
|
@@ -589,6 +630,122 @@ Inspect: \`workspace_context\`, \`docs_get\` id \`coderunner\` or \`coderunner-r
|
|
|
589
630
|
Act: \`gf deploy\`, \`gf coderunner run|status\`. MCP does not deploy.
|
|
590
631
|
`.trim();
|
|
591
632
|
|
|
633
|
+
// src/css-and-styling-guide.ts
|
|
634
|
+
var CSS_AND_STYLING_GUIDE = `
|
|
635
|
+
# CSS and styling (Shell apps)
|
|
636
|
+
|
|
637
|
+
Default is Tailwind CSS v3.4 \u2014 same as the Shell. Keep it unless the user
|
|
638
|
+
opts for their own framework.
|
|
639
|
+
|
|
640
|
+
## Default (Tailwind)
|
|
641
|
+
|
|
642
|
+
1. Import src/index.css from App.tsx.
|
|
643
|
+
2. Wrap in FederatedAppRoot (class gf-federated-app).
|
|
644
|
+
3. Keep important: '.gf-federated-app' and corePlugins.preflight: false.
|
|
645
|
+
4. Scoped form reset lives in @layer base. Do not put unlayered CSS after
|
|
646
|
+
@tailwind utilities \u2014 that hides input borders.
|
|
647
|
+
|
|
648
|
+
Visual rules: docs_get id design-standard.
|
|
649
|
+
|
|
650
|
+
## Using your own CSS framework
|
|
651
|
+
|
|
652
|
+
This path is available. Do not run Tailwind and a second global framework
|
|
653
|
+
together (Bootstrap, MUI, CSS Modules, \u2026). Pick one.
|
|
654
|
+
|
|
655
|
+
If they opt out of Tailwind:
|
|
656
|
+
|
|
657
|
+
1. Do not import that CSS as a global stylesheet.
|
|
658
|
+
2. Import it as a string: import vendorCss from './vendor.css?inline'
|
|
659
|
+
3. Wrap the app in FederatedStyleRoot instead of FederatedAppRoot.
|
|
660
|
+
4. Render modals inside that shadow root, not document.body.
|
|
661
|
+
|
|
662
|
+
The kit ships FederatedStyleRoot in src/lib/FederatedStyleRoot.tsx.
|
|
663
|
+
|
|
664
|
+
Human docs: /docs/integrations/shell/css-and-styling
|
|
665
|
+
`;
|
|
666
|
+
|
|
667
|
+
// src/databases-guide.ts
|
|
668
|
+
var DATABASES_GUIDE = `
|
|
669
|
+
# Databases
|
|
670
|
+
|
|
671
|
+
Dataplane is not a database. It is how Groundfloor talks to databases.
|
|
672
|
+
|
|
673
|
+
When the user starts any data or database work, say this first. Do not mention
|
|
674
|
+
infrastructure internals (cluster operators, installers, and the like):
|
|
675
|
+
|
|
676
|
+
You have ArangoDB ready to use through Dataplane. If you want another
|
|
677
|
+
database, deploy it first. You can use a deployed database through Dataplane,
|
|
678
|
+
or connect to it on your own.
|
|
679
|
+
|
|
680
|
+
## Options
|
|
681
|
+
|
|
682
|
+
- ArangoDB \u2014 shared, managed, already there. Default for app data and Vault.
|
|
683
|
+
No deploy step. Query via Control Plane vault:
|
|
684
|
+
POST /v1/workspaces/{id}/vault/collections/{name}/query
|
|
685
|
+
- Postgres \u2014 what you can deploy today (portal Data \u2192 Databases). After it is
|
|
686
|
+
ready, use it through Dataplane or with the connection secrets.
|
|
687
|
+
- A database they already run \u2014 through Dataplane if they wire it, or direct.
|
|
688
|
+
|
|
689
|
+
Do not list other engines as available to deploy. Do not call Dataplane hosts
|
|
690
|
+
from apps or embed service keys.
|
|
691
|
+
|
|
692
|
+
## Paths
|
|
693
|
+
|
|
694
|
+
- Browse / edit rows \u2192 Data Vault (portal or vault APIs)
|
|
695
|
+
- Deploy Postgres \u2192 Customer Portal Databases page, or
|
|
696
|
+
POST /v1/workspaces/{id}/managed-databases with engine postgres
|
|
697
|
+
- Shell 403 / empty vault \u2192 collection Access for the site role
|
|
698
|
+
|
|
699
|
+
docs_get id databases. Human docs: /docs/customer-portal/databases
|
|
700
|
+
`;
|
|
701
|
+
|
|
702
|
+
// src/design-standard-guide.ts
|
|
703
|
+
var DESIGN_STANDARD_GUIDE = `
|
|
704
|
+
# Shell app design standard
|
|
705
|
+
|
|
706
|
+
Every app from \`gf apps init\` should look like this. Reference: Morguard IT
|
|
707
|
+
Onboarding (flat, grey ground, one accent). Do not restyle to the stock
|
|
708
|
+
Tailwind raised-button look.
|
|
709
|
+
|
|
710
|
+
## Rules
|
|
711
|
+
|
|
712
|
+
- Ground: grey page, white header, one white panel per page with the title inside it.
|
|
713
|
+
- Flat: no shadows, no raised buttons, no sunken fields. Hairline borders only.
|
|
714
|
+
Inputs and secondary buttons share one border weight. Use the kit's scoped
|
|
715
|
+
reset in src/index.css. Never re-enable Tailwind preflight in the remote.
|
|
716
|
+
- Colour: neutral first. One accent (manifest theme.primaryColor) for primary
|
|
717
|
+
actions, links, and the tint behind a selected tab. Meaningful colour only
|
|
718
|
+
in status pills and phase dots. Fallback is a neutral if the hex is missing.
|
|
719
|
+
- Type: Geist Sans / Geist Mono, 13\u201314px working size, tabular numbers, mono
|
|
720
|
+
for IDs and codes.
|
|
721
|
+
- Sequence: a process with ordered steps gets PhaseChevron \u2014 flat, outlined,
|
|
722
|
+
soft tints, underline on the selected step. Pass an ordered steps list;
|
|
723
|
+
do not hard-code client phases.
|
|
724
|
+
- Tables: DataGrid with sentence-case muted headers, search + toggleable
|
|
725
|
+
filters, icon paging, a real empty state.
|
|
726
|
+
|
|
727
|
+
## Manifest
|
|
728
|
+
|
|
729
|
+
theme.primaryColor \u2192 --primary / --ring at runtime.
|
|
730
|
+
theme.logoUrl \u2192 AppHeader (absolute https URL). Bundled images 404 in Shell
|
|
731
|
+
unless the production build uses base: './'.
|
|
732
|
+
|
|
733
|
+
## Local
|
|
734
|
+
|
|
735
|
+
npm run dev \u2014 live vault via gf login.
|
|
736
|
+
npm run dev:fixtures \u2014 src/dev/fixtures/<collection>.json, no client data.
|
|
737
|
+
|
|
738
|
+
## Using your own CSS framework
|
|
739
|
+
|
|
740
|
+
The kit is Tailwind only. You do not need a second framework.
|
|
741
|
+
|
|
742
|
+
If you opt out (Bootstrap, MUI, CSS Modules, \u2026), do not import that CSS
|
|
743
|
+
globally. Use FederatedStyleRoot with \`import './vendor.css?inline'\` so styles
|
|
744
|
+
stay in Shadow DOM. Render modals inside that root, not document.body.
|
|
745
|
+
|
|
746
|
+
Full steps: docs_get id css-and-styling.
|
|
747
|
+
`;
|
|
748
|
+
|
|
592
749
|
// src/shell-guide.ts
|
|
593
750
|
var SHELL_APP_GUIDE = `
|
|
594
751
|
# Shell federated apps
|
|
@@ -617,6 +774,15 @@ gf apps publish --path release.zip
|
|
|
617
774
|
\`__federation_*.js\` + CSS) at the zip root. Do not zip \`dist/\`. Do not
|
|
618
775
|
upload a lone \`remoteEntry.js\`. \`gf apps publish\` rejects incomplete zips.
|
|
619
776
|
|
|
777
|
+
Production builds use Vite \`base: './'\` so imported images resolve next to
|
|
778
|
+
remoteEntry.js. Header logos: manifest \`theme.logoUrl\` (absolute https).
|
|
779
|
+
UI look: \`docs_get\` id \`design-standard\`. CSS: Tailwind by default;
|
|
780
|
+
own framework uses FederatedStyleRoot (Shadow DOM) \u2014 \`docs_get\` id
|
|
781
|
+
\`css-and-styling\`. Data: Dataplane is not a database. Say first: you have
|
|
782
|
+
ArangoDB ready through Dataplane; deploy Postgres if you want another
|
|
783
|
+
database; use it through Dataplane or on your own (\`docs_get\` id
|
|
784
|
+
\`databases\`). Local UI without live vault: \`npm run dev:fixtures\`.
|
|
785
|
+
|
|
620
786
|
## suggest_cli
|
|
621
787
|
|
|
622
788
|
- init_app \u2192 \`gf apps init --slug <portal-slug>\`
|
|
@@ -677,6 +843,27 @@ var DOC_CATALOG = [
|
|
|
677
843
|
path: "/docs/integrations/shell",
|
|
678
844
|
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.",
|
|
679
845
|
embedded: SHELL_APP_GUIDE
|
|
846
|
+
},
|
|
847
|
+
{
|
|
848
|
+
id: "design-standard",
|
|
849
|
+
title: "Shell app design standard",
|
|
850
|
+
path: "/docs/integrations/shell/design-standard",
|
|
851
|
+
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.",
|
|
852
|
+
embedded: DESIGN_STANDARD_GUIDE
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
id: "css-and-styling",
|
|
856
|
+
title: "CSS and styling",
|
|
857
|
+
path: "/docs/integrations/shell/css-and-styling",
|
|
858
|
+
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.",
|
|
859
|
+
embedded: CSS_AND_STYLING_GUIDE
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
id: "databases",
|
|
863
|
+
title: "Databases",
|
|
864
|
+
path: "/docs/customer-portal/databases",
|
|
865
|
+
summary: "Dataplane is not a database. ArangoDB is ready through Dataplane. Postgres you deploy first, then use through Dataplane or on your own.",
|
|
866
|
+
embedded: DATABASES_GUIDE
|
|
680
867
|
}
|
|
681
868
|
];
|
|
682
869
|
function docUrl(entry) {
|
|
@@ -747,7 +934,7 @@ function suggestCli(intent, args) {
|
|
|
747
934
|
case "deploy":
|
|
748
935
|
return {
|
|
749
936
|
command: name ? `gf deploy -n ${name}${ws}` : `gf deploy${ws}`,
|
|
750
|
-
why:
|
|
937
|
+
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.',
|
|
751
938
|
docs: "https://docs.groundfloor.cloud/docs/customer-portal/coderunner"
|
|
752
939
|
};
|
|
753
940
|
case "run":
|
|
@@ -782,6 +969,18 @@ function suggestCli(intent, args) {
|
|
|
782
969
|
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.",
|
|
783
970
|
docs: "https://docs.groundfloor.cloud/docs/integrations/shell"
|
|
784
971
|
};
|
|
972
|
+
case "environments":
|
|
973
|
+
return {
|
|
974
|
+
command: `gf environments ls${ws}`,
|
|
975
|
+
why: "List workspace environments (id, name, status) for secrets and deploy targeting.",
|
|
976
|
+
docs: "https://docs.groundfloor.cloud/docs/customer-portal/developers"
|
|
977
|
+
};
|
|
978
|
+
case "cancel_deployment":
|
|
979
|
+
return {
|
|
980
|
+
command: name ? `gf coderunner cancel-deployment -c ${name}${ws}` : `gf coderunner cancel-deployment -c <id-or-slug>${ws}`,
|
|
981
|
+
why: "Delete the current deployment (or --deployment-id). Use this for a deploy stuck in deploying.",
|
|
982
|
+
docs: "https://docs.groundfloor.cloud/docs/customer-portal/coderunner"
|
|
983
|
+
};
|
|
785
984
|
case "secrets":
|
|
786
985
|
return {
|
|
787
986
|
command: `gf secrets ls${ws}`,
|
|
@@ -797,7 +996,7 @@ function suggestCli(intent, args) {
|
|
|
797
996
|
default:
|
|
798
997
|
return {
|
|
799
998
|
command: "gf --help",
|
|
800
|
-
why: `Unknown intent "${intent}". Use login | switch_workspace | deploy | run | status | init_app | publish_app | secrets | dataplane.`,
|
|
999
|
+
why: `Unknown intent "${intent}". Use login | switch_workspace | deploy | run | status | logs | environments | cancel_deployment | init_app | publish_app | secrets | dataplane.`,
|
|
801
1000
|
docs: "https://docs.groundfloor.cloud/docs/customer-portal/developers"
|
|
802
1001
|
};
|
|
803
1002
|
}
|
|
@@ -841,7 +1040,7 @@ async function resolveCoderunnerId(apiUrl, workspaceId, idOrSlug) {
|
|
|
841
1040
|
}
|
|
842
1041
|
var server = new McpServer({
|
|
843
1042
|
name: "groundfloor",
|
|
844
|
-
version: "0.1.
|
|
1043
|
+
version: "0.1.7"
|
|
845
1044
|
});
|
|
846
1045
|
server.tool(
|
|
847
1046
|
"whoami",
|
|
@@ -868,7 +1067,7 @@ server.tool(
|
|
|
868
1067
|
);
|
|
869
1068
|
server.tool(
|
|
870
1069
|
"workspace_context",
|
|
871
|
-
"Live context for the selected workspace: session, coderunners, apps, dataplane,
|
|
1070
|
+
"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.",
|
|
872
1071
|
{ workspace_id: wsId },
|
|
873
1072
|
async ({ workspace_id }) => {
|
|
874
1073
|
try {
|
|
@@ -906,7 +1105,7 @@ server.tool(
|
|
|
906
1105
|
types: {
|
|
907
1106
|
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.",
|
|
908
1107
|
job: "Run-to-completion worker. Deploy, then gf coderunner run.",
|
|
909
|
-
schedule:
|
|
1108
|
+
schedule: 'Cron job. No public Deployment URL. Set cron with gf deploy --workload-type schedule --schedule "<cron>" (or groundfloor.json schedule).',
|
|
910
1109
|
service: "Long-running Deployment (same type as service). Dockerfile at ZIP root is required. Listen on 8080 / 0.0.0.0."
|
|
911
1110
|
},
|
|
912
1111
|
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.",
|
|
@@ -915,13 +1114,24 @@ server.tool(
|
|
|
915
1114
|
shell_app_howto: {
|
|
916
1115
|
docs_get: "shell",
|
|
917
1116
|
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.",
|
|
1117
|
+
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.",
|
|
1118
|
+
design: "docs_get id design-standard",
|
|
918
1119
|
suggest_cli: "init_app | publish_app"
|
|
919
1120
|
},
|
|
1121
|
+
databases_howto: {
|
|
1122
|
+
docs_get: "databases",
|
|
1123
|
+
dataplane: "Dataplane is not a database. It is how Groundfloor talks to databases.",
|
|
1124
|
+
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.",
|
|
1125
|
+
arango: "Shared, managed, already there. Default for app data and Vault. No deploy step.",
|
|
1126
|
+
deploy: "Postgres is what you can deploy today."
|
|
1127
|
+
},
|
|
920
1128
|
actions: {
|
|
921
1129
|
deploy: suggestCli("deploy"),
|
|
922
1130
|
switch_workspace: suggestCli("switch_workspace"),
|
|
923
1131
|
run: suggestCli("run"),
|
|
924
1132
|
logs: suggestCli("logs"),
|
|
1133
|
+
environments: suggestCli("environments"),
|
|
1134
|
+
cancel_deployment: suggestCli("cancel_deployment"),
|
|
925
1135
|
init_app: suggestCli("init_app"),
|
|
926
1136
|
publish_app: suggestCli("publish_app")
|
|
927
1137
|
},
|
|
@@ -997,9 +1207,102 @@ server.tool(
|
|
|
997
1207
|
}
|
|
998
1208
|
}
|
|
999
1209
|
);
|
|
1210
|
+
server.tool(
|
|
1211
|
+
"coderunner_process_log",
|
|
1212
|
+
"Process Log (deploy/build stdout/stderr) by coderunner id. Prefer this over coderunner_get_logs when there is no job_id.",
|
|
1213
|
+
{
|
|
1214
|
+
workspace_id: wsId,
|
|
1215
|
+
coderunner_id: z.string().min(1).describe("Coderunner id or slug"),
|
|
1216
|
+
limit: z.number().int().positive().optional(),
|
|
1217
|
+
since_seconds: z.number().int().min(10).optional(),
|
|
1218
|
+
search: z.string().optional(),
|
|
1219
|
+
deployment_id: z.string().optional()
|
|
1220
|
+
},
|
|
1221
|
+
async (args) => {
|
|
1222
|
+
try {
|
|
1223
|
+
const c = await cfg(args.workspace_id);
|
|
1224
|
+
const id = await resolveCoderunnerId(
|
|
1225
|
+
c.apiUrl,
|
|
1226
|
+
c.workspaceId,
|
|
1227
|
+
args.coderunner_id
|
|
1228
|
+
);
|
|
1229
|
+
return text(
|
|
1230
|
+
await getProcessLogs(c.apiUrl, c.workspaceId, {
|
|
1231
|
+
runner_id: id,
|
|
1232
|
+
deployment_id: args.deployment_id,
|
|
1233
|
+
limit: args.limit ?? 50,
|
|
1234
|
+
since_seconds: args.since_seconds ?? 3600,
|
|
1235
|
+
search: args.search
|
|
1236
|
+
})
|
|
1237
|
+
);
|
|
1238
|
+
} catch (e) {
|
|
1239
|
+
return errText(e);
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
);
|
|
1243
|
+
server.tool(
|
|
1244
|
+
"environments_list",
|
|
1245
|
+
"List environments in the workspace (id, name, status).",
|
|
1246
|
+
{ workspace_id: wsId },
|
|
1247
|
+
async ({ workspace_id }) => {
|
|
1248
|
+
try {
|
|
1249
|
+
const c = await cfg(workspace_id);
|
|
1250
|
+
const environments = await listWorkspaceEnvironments(
|
|
1251
|
+
c.apiUrl,
|
|
1252
|
+
c.workspaceId
|
|
1253
|
+
);
|
|
1254
|
+
return text({ environments, count: environments.length });
|
|
1255
|
+
} catch (e) {
|
|
1256
|
+
return errText(e);
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
);
|
|
1260
|
+
server.tool(
|
|
1261
|
+
"coderunner_cancel_deployment",
|
|
1262
|
+
"Delete a coderunner deployment (current deployment if deployment_id is omitted). Same as `gf coderunner cancel-deployment`.",
|
|
1263
|
+
{
|
|
1264
|
+
workspace_id: wsId,
|
|
1265
|
+
coderunner_id: z.string().min(1).describe("Coderunner id or slug"),
|
|
1266
|
+
deployment_id: z.string().optional().describe("Deployment id; defaults to the current deployment")
|
|
1267
|
+
},
|
|
1268
|
+
async (args) => {
|
|
1269
|
+
try {
|
|
1270
|
+
const c = await cfg(args.workspace_id);
|
|
1271
|
+
const id = await resolveCoderunnerId(
|
|
1272
|
+
c.apiUrl,
|
|
1273
|
+
c.workspaceId,
|
|
1274
|
+
args.coderunner_id
|
|
1275
|
+
);
|
|
1276
|
+
let deploymentId = args.deployment_id?.trim();
|
|
1277
|
+
if (!deploymentId) {
|
|
1278
|
+
const current = await getDeployment(c.apiUrl, c.workspaceId, id);
|
|
1279
|
+
deploymentId = current?.id?.trim();
|
|
1280
|
+
}
|
|
1281
|
+
if (!deploymentId) {
|
|
1282
|
+
throw new Error(
|
|
1283
|
+
`No current deployment for coderunner ${id}. Pass deployment_id.`
|
|
1284
|
+
);
|
|
1285
|
+
}
|
|
1286
|
+
await deleteCoderunnerDeployment(
|
|
1287
|
+
c.apiUrl,
|
|
1288
|
+
c.workspaceId,
|
|
1289
|
+
id,
|
|
1290
|
+
deploymentId
|
|
1291
|
+
);
|
|
1292
|
+
return text({
|
|
1293
|
+
coderunner_id: id,
|
|
1294
|
+
deployment_id: deploymentId,
|
|
1295
|
+
deleted: true,
|
|
1296
|
+
next: suggestCli("logs", { coderunner: id })
|
|
1297
|
+
});
|
|
1298
|
+
} catch (e) {
|
|
1299
|
+
return errText(e);
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
);
|
|
1000
1303
|
server.tool(
|
|
1001
1304
|
"coderunner_get_logs",
|
|
1002
|
-
"Job-run logs from a previous `gf coderunner run` (needs job_id). For deploy/build stdout use suggest_cli intent logs (`gf coderunner logs`).",
|
|
1305
|
+
"Job-run logs from a previous `gf coderunner run` (needs job_id). For deploy/build stdout use coderunner_process_log or suggest_cli intent logs (`gf coderunner logs`).",
|
|
1003
1306
|
{
|
|
1004
1307
|
workspace_id: wsId,
|
|
1005
1308
|
coderunner_id: z.string().min(1),
|
|
@@ -1097,7 +1400,7 @@ server.tool(
|
|
|
1097
1400
|
);
|
|
1098
1401
|
server.tool(
|
|
1099
1402
|
"dataplane_status",
|
|
1100
|
-
"Dataplane setup status. Provision with `gf dataplane provision`.",
|
|
1403
|
+
"Dataplane setup status (Dataplane is how Groundfloor talks to databases, not a database itself). ArangoDB is ready through it. Provision with `gf dataplane provision`.",
|
|
1101
1404
|
{ workspace_id: wsId },
|
|
1102
1405
|
async ({ workspace_id }) => {
|
|
1103
1406
|
try {
|
|
@@ -1127,10 +1430,10 @@ server.tool(
|
|
|
1127
1430
|
);
|
|
1128
1431
|
server.tool(
|
|
1129
1432
|
"docs_get",
|
|
1130
|
-
"How-to for Coderunner
|
|
1433
|
+
"How-to for Coderunner, Shell, design-standard, css-and-styling, databases. Pass id from docs_list. Prefer id coderunner or coderunner-runtime before deploying. For data work use id databases. For own CSS framework use id css-and-styling.",
|
|
1131
1434
|
{
|
|
1132
1435
|
id: z.string().min(1).describe(
|
|
1133
|
-
"Catalog id, e.g. coderunner | coderunner-runtime |
|
|
1436
|
+
"Catalog id, e.g. coderunner | coderunner-runtime | shell | design-standard | css-and-styling | databases | agents | developers | authentication"
|
|
1134
1437
|
)
|
|
1135
1438
|
},
|
|
1136
1439
|
async ({ id }) => {
|
|
@@ -1160,13 +1463,15 @@ server.tool(
|
|
|
1160
1463
|
"run",
|
|
1161
1464
|
"status",
|
|
1162
1465
|
"logs",
|
|
1466
|
+
"environments",
|
|
1467
|
+
"cancel_deployment",
|
|
1163
1468
|
"init_app",
|
|
1164
1469
|
"publish_app",
|
|
1165
1470
|
"secrets",
|
|
1166
1471
|
"dataplane"
|
|
1167
1472
|
]),
|
|
1168
1473
|
workspace: z.string().optional(),
|
|
1169
|
-
name: z.string().optional().describe("Coderunner name/id for deploy/run/status/logs"),
|
|
1474
|
+
name: z.string().optional().describe("Coderunner name/id for deploy/run/status/logs/cancel_deployment"),
|
|
1170
1475
|
slug: z.string().optional().describe("Portal app slug for init_app / publish_app"),
|
|
1171
1476
|
cell: z.enum(["production", "stage", "dev"]).optional()
|
|
1172
1477
|
},
|