@groundfloorcloud/mcp 0.1.8 → 0.1.9

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 (2) hide show
  1. package/dist/index.js +142 -21
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -567,7 +567,9 @@ Pick **one** type per coderunner. Changing type later means a new coderunner.
567
567
  - Same as job, plus a cron expression at deploy:
568
568
  \`gf deploy --workload-type schedule --schedule "<cron>"\`
569
569
  (or \`groundfloor.json\` \`"schedule"\`).
570
- - No public invoke URL. Debug with Process Log, not curl.
570
+ - GET/list/status expose top-level \`workload_type\` and \`schedule\`.
571
+ \`gf coderunner status -c <slug>\` prints type, schedule, last_job.
572
+ - No public invoke URL. Debug with \`gf coderunner logs\`, not curl.
571
573
 
572
574
  ### Service (Deployment)
573
575
 
@@ -654,6 +656,12 @@ or customer env.
654
656
 
655
657
  When the handler looks right locally, \`gf deploy\` the same tree.
656
658
 
659
+ ## Secrets on deploy
660
+
661
+ Do not pass credential-shaped keys as \`--env KEY=VALUE\` (\`*_SECRET\`,
662
+ \`*_API_KEY\`, \`DATABASE_URL\`, \u2026). Control Plane returns **422**.
663
+ \`gf secrets set KEY\` then \`gf deploy --secret KEY\` (inject by reference).
664
+
657
665
  ## M2M tokens (Vault and Files)
658
666
 
659
667
  New Coderunners cannot call Vault or Files until an M2M client is attached
@@ -665,7 +673,7 @@ Writer on that workspace (full Vault skip-ACL + Files). Grant site users on
665
673
  ## Agent actions
666
674
 
667
675
  Inspect: \`workspace_context\`, \`docs_get\` id \`coderunner\` or \`coderunner-runtime\`, \`suggest_cli\`.
668
- Act: \`gf deploy\`, \`gf coderunner run|status\`, \`gf m2m token\`. MCP does not deploy.
676
+ Act: \`gf deploy\`, \`gf coderunner run|status|logs\`, \`gf m2m token\`, \`gf identities ls|mint\`, \`gf api\`. MCP does not deploy.
669
677
  `.trim();
670
678
 
671
679
  // src/css-and-styling-guide.ts
@@ -711,30 +719,46 @@ Dataplane is not a database. It is how Groundfloor talks to databases.
711
719
  When the user starts any data or database work, say this first. Do not mention
712
720
  infrastructure internals (cluster operators, installers, and the like):
713
721
 
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.
722
+ You have Postgres ready to use through Dataplane \u2014 a shared, platform-managed
723
+ cluster, already there, no deploy step. If you want a different engine, or a
724
+ database that is entirely your own (own scaling, own backups schedule), you
725
+ can deploy one first.
717
726
 
718
727
  ## Options
719
728
 
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.
729
+ - Postgres (shared) \u2014 platform-managed, already there. Default for app data
730
+ and Vault. No deploy step. This is NOT a workspace-owned resource: it does
731
+ not appear on the customer Databases page, and there is nothing to scale,
732
+ back up, or delete yourself \u2014 it's offered, not provisioned. Query via
733
+ Control Plane vault: POST /v1/workspaces/{id}/vault/collections/{name}/query
734
+ - ArangoDB \u2014 also shared, managed, already there, no deploy step. Still fully
735
+ supported; just no longer the pre-selected engine for new collections.
736
+ - A dedicated database you deploy and own (Postgres, Redis, ClickHouse,
737
+ Qdrant) \u2014 portal Data \u2192 Databases, or
738
+ POST /v1/workspaces/{id}/managed-databases. Heavier than the shared
739
+ default: you own its scaling, backups, and lifecycle. Use this when you
740
+ need a tier/engine the shared default doesn't offer (Redis, ClickHouse,
741
+ Qdrant) or want a database isolated to this workspace.
725
742
  - A database they already run \u2014 through Dataplane if they wire it, or direct.
726
743
 
727
744
  Do not list other engines as available to deploy. Do not call Dataplane hosts
728
745
  from apps or embed service keys.
729
746
 
747
+ ## Creating a collection / table
748
+
749
+ Pass the engine explicitly \u2014 do not rely on Dataplane's default connector
750
+ resolution. POST /v1/workspaces/{id}/vault/collections with
751
+ \`"schema": {"engine": "postgresql", ...}\` for the shared default, or
752
+ \`"engine": "arangodb"\` to use ArangoDB instead.
753
+
730
754
  ## Paths
731
755
 
732
756
  - 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
757
+ - Deploy your own database \u2192 Customer Portal Databases page, or
758
+ POST /v1/workspaces/{id}/managed-databases with engine postgres|redis|clickhouse|qdrant
735
759
  - Shell 403 / empty vault \u2192 collection Access for the site role
736
760
 
737
- docs_get id databases. Human docs: /docs/customer-portal/databases
761
+ docs_get id databases. Human docs: /docs/customer-portal/databases and /docs/customer-portal/data-vault
738
762
  `;
739
763
 
740
764
  // src/design-standard-guide.ts
@@ -818,9 +842,11 @@ remoteEntry.js. Header logos: manifest \`theme.logoUrl\` (absolute https).
818
842
  UI look: \`docs_get\` id \`design-standard\`. CSS: Tailwind by default;
819
843
  own framework uses FederatedStyleRoot (Shadow DOM) \u2014 \`docs_get\` id
820
844
  \`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\`.
845
+ Postgres (shared, platform-managed, no deploy step) ready through Dataplane
846
+ by default; ArangoDB is also ready the same way. Deploy your own dedicated
847
+ database only if you need a different engine or workspace-owned isolation
848
+ (\`docs_get\` id \`databases\`). Local UI without live vault:
849
+ \`npm run dev:fixtures\`.
824
850
 
825
851
  ## suggest_cli
826
852
 
@@ -828,6 +854,86 @@ database; use it through Dataplane or on your own (\`docs_get\` id
828
854
  - publish_app \u2192 init + npm install + npm run release + gf apps publish --path release.zip
829
855
  `;
830
856
 
857
+ // src/vault-guide.ts
858
+ var VAULT_GUIDE = `
859
+ # Data Vault collections
860
+
861
+ Vault is workspace data behind Control Plane
862
+ \`/v1/workspaces/{workspace_id}/vault/\u2026\`. Browser apps send the Shell JWT.
863
+ Coderunners use \`gf m2m token\` (preferred) or a workload-identity Vault JWT.
864
+
865
+ ## Create a collection (JSON Schema)
866
+
867
+ POST \`/v1/workspaces/{id}/vault/collections\` with a **JSON Schema** object
868
+ (\`type: object\`, \`properties\`, optional \`required\`). A missing schema is a
869
+ **400** with a field error \u2014 not a 500.
870
+
871
+ Pass \`engine\` explicitly \u2014 don't rely on Dataplane's default connector.
872
+ \`"postgresql"\` is the platform default (shared, no deploy step);
873
+ \`"arangodb"\` is also available the same way.
874
+
875
+ Example:
876
+
877
+ \`\`\`json
878
+ {
879
+ "name": "properties",
880
+ "engine": "postgresql",
881
+ "schema": {
882
+ "type": "object",
883
+ "properties": {
884
+ "name": { "type": "string" },
885
+ "metadata": { "type": "object" }
886
+ },
887
+ "required": ["name"]
888
+ }
889
+ }
890
+ \`\`\`
891
+
892
+ Or use \`gf api -X POST /v1/workspaces/{workspace_id}/vault/collections --body '{...}'\`.
893
+
894
+ \`GET \u2026/vault/collections\` lists schema-registered collections. Implicit
895
+ tables created by the first \`POST \u2026/vault/{collection}\` appear when you pass
896
+ \`include_implicit=true\` (or after a schema create).
897
+
898
+ ## Query totals
899
+
900
+ \`POST \u2026/vault/{collection}/query\` \`total\` is the **unpaged** match count.
901
+ \`limit\` only sizes \`records\`. Do not treat \`total === records.length\` as
902
+ the full table size.
903
+
904
+ ## Filters
905
+
906
+ Top-level fields work in \`filter\`. Nested paths such as \`metadata.sector\`
907
+ are either supported by the connector or rejected with **400 unsupported
908
+ path** \u2014 never a silent empty page.
909
+
910
+ ## ACLs
911
+
912
+ Grant site roles on **Administer \u2192 Access**. Workload identities get
913
+ collection grants via \`PUT \u2026/vault/collections/{name}/acl\`. M2M is Team
914
+ Writer (workspace-wide), not an Access subject.
915
+
916
+ ## Identities vs M2M
917
+
918
+ - Unattended Coderunners: attach an M2M client, \`gf deploy\`, then
919
+ \`gf m2m token\`.
920
+ - Workload identity mint: \`gf identities mint --identity <id>\`. The **first**
921
+ mint returns \`refresh_secret\` once. Later mints omit it unless
922
+ \`--rotate-refresh\`. Prefer M2M for new workloads.
923
+
924
+ ## Scheduled jobs
925
+
926
+ \`gf deploy --workload-type schedule --schedule "<cron>"\`.
927
+ \`gf coderunner status -c <slug>\` shows **type**, **schedule**, and **last_job**.
928
+ \`gf coderunner logs -c <slug>\` shows stdout. There is no public URL for
929
+ schedules.
930
+
931
+ ## Secrets on deploy
932
+
933
+ Do not \`--env SENDGRID_SECRET=\u2026\`. That is **422**.
934
+ \`gf secrets set SENDGRID_SECRET\` then \`gf deploy --secret SENDGRID_SECRET\`.
935
+ `.trim();
936
+
831
937
  // src/docs.ts
832
938
  var DOCS_ORIGIN = "https://docs.groundfloor.cloud";
833
939
  var DOC_CATALOG = [
@@ -913,8 +1019,22 @@ var DOC_CATALOG = [
913
1019
  id: "databases",
914
1020
  title: "Databases",
915
1021
  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.",
1022
+ summary: "Dataplane is not a database. Postgres (shared, platform-managed) is the default, ready through Dataplane with no deploy step. ArangoDB is also ready the same way. A dedicated database you deploy and own is a separate, heavier path.",
917
1023
  embedded: DATABASES_GUIDE
1024
+ },
1025
+ {
1026
+ id: "vault",
1027
+ title: "Data Vault",
1028
+ path: "/docs/api/vault",
1029
+ summary: "Create collections with JSON Schema, query totals vs limit, ACLs, implicit tables, nested filters, identities vs M2M.",
1030
+ embedded: VAULT_GUIDE
1031
+ },
1032
+ {
1033
+ id: "scheduled-jobs",
1034
+ title: "Scheduled jobs",
1035
+ path: "/docs/customer-portal/scheduled-jobs",
1036
+ summary: "workload_type=schedule plus cron. gf coderunner status shows type/schedule/last_job. Use Process Log, not a public URL.",
1037
+ embedded: CODERUNNER_GUIDE
918
1038
  }
919
1039
  ];
920
1040
  function docUrl(entry) {
@@ -1179,9 +1299,10 @@ server.tool(
1179
1299
  databases_howto: {
1180
1300
  docs_get: "databases",
1181
1301
  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."
1302
+ say_first: "You have Postgres ready to use through Dataplane \u2014 shared, platform-managed, already there, no deploy step. ArangoDB is also available the same way. If you want your own dedicated database instead, deploy it first.",
1303
+ shared_postgres: 'Default for app data and Vault. Platform-managed, not workspace-owned \u2014 nothing to scale/backup/delete yourself. Pass engine "postgresql" explicitly when creating a collection.',
1304
+ arango: "Also shared, managed, already there, no deploy step. Still fully supported; just no longer pre-selected.",
1305
+ deploy: "A dedicated Postgres/Redis/ClickHouse/Qdrant you own is what you can deploy today (portal Data \u2192 Databases)."
1185
1306
  },
1186
1307
  actions: {
1187
1308
  deploy: suggestCli("deploy"),
@@ -1459,7 +1580,7 @@ server.tool(
1459
1580
  );
1460
1581
  server.tool(
1461
1582
  "dataplane_status",
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`.",
1583
+ "Dataplane setup status (Dataplane is how Groundfloor talks to databases, not a database itself). Postgres (shared, platform-managed) is ready through it by default; ArangoDB is also ready. Provision with `gf dataplane provision`.",
1463
1584
  { workspace_id: wsId },
1464
1585
  async ({ workspace_id }) => {
1465
1586
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groundfloorcloud/mcp",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Groundfloor MCP — inspect workspace state and docs; take actions with the gf CLI.",
5
5
  "type": "module",
6
6
  "bin": {