@cloudgrid-io/mcp 0.21.18 → 0.21.19
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 +2 -2
- package/package.json +10 -3
- package/src/corpus/cli-reference.md +8 -8
- package/src/corpus/cloudgrid-yaml.md +5 -5
- package/src/corpus/cookbook.md +1 -1
- package/src/corpus/playbook.md +1 -1
- package/src/corpus/skill-brain.md +1 -1
- package/src/corpus/skill-claim.md +2 -2
- package/src/corpus/skill-feedback.md +5 -5
- package/src/corpus/skill-plug.md +4 -4
- package/src/corpus/templates/_cloudgrid.yaml.reference +7 -7
- package/src/corpus/templates/admin-dashboard/cloudgrid.yaml +7 -7
- package/src/corpus/templates/ai-app/cloudgrid.yaml +7 -7
- package/src/corpus/templates/ai-knowledge-base/AGENTS.md +1 -1
- package/src/corpus/templates/ai-knowledge-base/cloudgrid.yaml +7 -7
- package/src/corpus/templates/analytics-dashboard/cloudgrid.yaml +7 -7
- package/src/corpus/templates/api-dashboard/cloudgrid.yaml +7 -7
- package/src/corpus/templates/api-docs/cloudgrid.yaml +7 -7
- package/src/corpus/templates/api-service/cloudgrid.yaml +7 -7
- package/src/corpus/templates/app-with-data/cloudgrid.yaml +7 -7
- package/src/corpus/templates/appointment-booking/cloudgrid.yaml +7 -7
- package/src/corpus/templates/approval-workflow/cloudgrid.yaml +7 -7
- package/src/corpus/templates/billing-dashboard/cloudgrid.yaml +7 -7
- package/src/corpus/templates/blog-cms/cloudgrid.yaml +7 -7
- package/src/corpus/templates/booking-system/cloudgrid.yaml +7 -7
- package/src/corpus/templates/calendar-scheduler/AGENTS.md +1 -1
- package/src/corpus/templates/calendar-scheduler/cloudgrid.yaml +7 -7
- package/src/corpus/templates/changelog/cloudgrid.yaml +7 -7
- package/src/corpus/templates/company-website/cloudgrid.yaml +7 -7
- package/src/corpus/templates/course-platform/cloudgrid.yaml +7 -7
- package/src/corpus/templates/crm/cloudgrid.yaml +7 -7
- package/src/corpus/templates/dashboard/cloudgrid.yaml +7 -7
- package/src/corpus/templates/deck/cloudgrid.yaml +7 -7
- package/src/corpus/templates/directory/cloudgrid.yaml +7 -7
- package/src/corpus/templates/docs-site/cloudgrid.yaml +7 -7
- package/src/corpus/templates/erp/cloudgrid.yaml +7 -7
- package/src/corpus/templates/event-board/cloudgrid.yaml +7 -7
- package/src/corpus/templates/expense-tracker/cloudgrid.yaml +7 -7
- package/src/corpus/templates/feature-request-board/cloudgrid.yaml +7 -7
- package/src/corpus/templates/financial-dashboard/cloudgrid.yaml +7 -7
- package/src/corpus/templates/forum/cloudgrid.yaml +7 -7
- package/src/corpus/templates/hr-portal/cloudgrid.yaml +7 -7
- package/src/corpus/templates/internal-tools-portal/cloudgrid.yaml +7 -7
- package/src/corpus/templates/inventory/cloudgrid.yaml +7 -7
- package/src/corpus/templates/invoice/cloudgrid.yaml +7 -7
- package/src/corpus/templates/job-board/cloudgrid.yaml +7 -7
- package/src/corpus/templates/kanban/cloudgrid.yaml +7 -7
- package/src/corpus/templates/landing-page/cloudgrid.yaml +7 -7
- package/src/corpus/templates/lms/cloudgrid.yaml +7 -7
- package/src/corpus/templates/marketplace/AGENTS.md +1 -1
- package/src/corpus/templates/marketplace/cloudgrid.yaml +7 -7
- package/src/corpus/templates/membership-site/cloudgrid.yaml +7 -7
- package/src/corpus/templates/monitoring-dashboard/cloudgrid.yaml +7 -7
- package/src/corpus/templates/multi-service/cloudgrid.yaml +7 -7
- package/src/corpus/templates/online-store/cloudgrid.yaml +7 -7
- package/src/corpus/templates/portfolio/cloudgrid.yaml +7 -7
- package/src/corpus/templates/product-catalog/cloudgrid.yaml +7 -7
- package/src/corpus/templates/product-launch/cloudgrid.yaml +7 -7
- package/src/corpus/templates/project-management/cloudgrid.yaml +7 -7
- package/src/corpus/templates/property-listings/cloudgrid.yaml +7 -7
- package/src/corpus/templates/quiz-platform/cloudgrid.yaml +7 -7
- package/src/corpus/templates/report/cloudgrid.yaml +7 -7
- package/src/corpus/templates/restaurant-reservations/cloudgrid.yaml +7 -7
- package/src/corpus/templates/revenue-dashboard/cloudgrid.yaml +7 -7
- package/src/corpus/templates/saas-marketing/cloudgrid.yaml +7 -7
- package/src/corpus/templates/semantic-search/cloudgrid.yaml +7 -7
- package/src/corpus/templates/semantic-search/services/backend/requirements.txt +2 -2
- package/src/corpus/templates/semantic-search/services/refresh/requirements.txt +2 -2
- package/src/corpus/templates/semantic-search/services/web/package-lock.json +3 -3
- package/src/corpus/templates/simple-semantic-search/cloudgrid.yaml +7 -7
- package/src/corpus/templates/status-page/cloudgrid.yaml +7 -7
- package/src/corpus/templates/subscription-management/cloudgrid.yaml +7 -7
- package/src/corpus/templates/task-manager/cloudgrid.yaml +7 -7
- package/src/corpus/templates/ticket-system/cloudgrid.yaml +7 -7
- package/src/corpus/templates/time-tracking/cloudgrid.yaml +7 -7
- package/src/corpus/templates/travel-booking/cloudgrid.yaml +7 -7
- package/src/corpus/templates/waitlist/cloudgrid.yaml +7 -7
- package/src/corpus/templates/web-app/cloudgrid.yaml +7 -7
- package/src/corpus/workflows/forum.md +1 -1
- package/src/corpus/workflows/simple-semantic-search.md +1 -1
- package/src/tools/deploy.js +37 -10
- package/src/tools/register.js +49 -58
- package/src/widgets/grid-login.html +14 -14
package/src/tools/register.js
CHANGED
|
@@ -70,21 +70,19 @@ const escapeHtml = (s) =>
|
|
|
70
70
|
s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">")
|
|
71
71
|
.replace(/"/g, """).replace(/'/g, "'");
|
|
72
72
|
|
|
73
|
+
// Publishing requires sign-in (#395): every entity must be owned by a real
|
|
74
|
+
// account so the publisher is known. There is NO guest option — offering a path
|
|
75
|
+
// the server will not honour strands the model (it asks, the user picks guest,
|
|
76
|
+
// the next call fails). This is the same reasoning grid_hello applies at
|
|
77
|
+
// register.js's signed-out branch after mcp#336: say ONLY what the tool can
|
|
78
|
+
// actually do, and route to the one recovery action (grid_login). §23 voice:
|
|
79
|
+
// plain, no emoji, no exclamation; the model-directed step is quarantined in the
|
|
80
|
+
// trailing (assistant: …) line so it is not read aloud.
|
|
73
81
|
const AUTH_ASK_SIGNED_OUT =
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"To sign in, call grid_login; as a guest, re-call grid_plug with anon: true. " +
|
|
79
|
-
"Stop and wait for their answer.)";
|
|
80
|
-
const authAskSignedIn = (who) =>
|
|
81
|
-
`You are signed in${who}.\n\n` +
|
|
82
|
-
"How would you like to plug this?\n" +
|
|
83
|
-
" - To your grid — it stays in your CloudGrid account.\n" +
|
|
84
|
-
" - As a guest — live now at a link that expires in 7 days unless you claim it.\n\n" +
|
|
85
|
-
"(assistant: offer both options and let the user choose — do not choose for them. " +
|
|
86
|
-
"For their grid, re-call grid_plug; as a guest, re-call grid_plug with anon: true. " +
|
|
87
|
-
"Stop and wait for their answer.)";
|
|
82
|
+
"Plugging to a grid needs an account, so the page is saved to the user's CloudGrid " +
|
|
83
|
+
"account and belongs to them. Call grid_login to sign in, then re-call grid_plug.\n\n" +
|
|
84
|
+
"(assistant: call grid_login now; after they finish, retry grid_plug. Do not offer " +
|
|
85
|
+
"any sign-in-free path. Stop and wait for the sign-in to complete.)";
|
|
88
86
|
|
|
89
87
|
// ── Registration ───────────────────────────────────────────────────────────────
|
|
90
88
|
// Registers the tools onto `server`. ctx.edition decides whether the CLI-wrapping
|
|
@@ -593,53 +591,46 @@ export function registerTools(server, ctx) {
|
|
|
593
591
|
}
|
|
594
592
|
if (!isEdit) {
|
|
595
593
|
const token = await ctx.getToken();
|
|
596
|
-
|
|
594
|
+
// CREATE requires sign-in (#395). Every published entity must be owned
|
|
595
|
+
// by a known account so "who published this?" is answerable. `anon:
|
|
596
|
+
// true` no longer selects a guest wire — an unauthenticated create is
|
|
597
|
+
// refused and publishes nothing. The guest/anon path is GONE for
|
|
598
|
+
// create; it survives only for editing pre-cutover drops (the
|
|
599
|
+
// owner-token wire, which is an EDIT and never reaches here).
|
|
600
|
+
if (!token) {
|
|
597
601
|
if (ctx.state) ctx.state.authChoiceOffered = true;
|
|
598
|
-
if (token) {
|
|
599
|
-
const claims = decodeJwtAuth(token);
|
|
600
|
-
const who = claims.email ? ` as ${claims.email}` : "";
|
|
601
|
-
return okResult({
|
|
602
|
-
text: authAskSignedIn(who),
|
|
603
|
-
structured: { needs_auth: true },
|
|
604
|
-
});
|
|
605
|
-
}
|
|
606
602
|
return okResult({
|
|
607
603
|
text: AUTH_ASK_SIGNED_OUT,
|
|
608
604
|
structured: { needs_auth: true },
|
|
609
605
|
});
|
|
610
606
|
}
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
607
|
+
// Signed in — never ride the anon wire on a create. Drop a stale
|
|
608
|
+
// `anon: true` so it cannot re-select the guest wire inside runPlug
|
|
609
|
+
// (runPlug keys the wire on `anon === true` for creates).
|
|
610
|
+
if (input?.anon) input = { ...(input || {}), anon: false };
|
|
611
|
+
const decision = await resolveGridOrAsk(ctx, {
|
|
612
|
+
token,
|
|
613
|
+
suppliedGrid: input?.grid,
|
|
614
|
+
edition: ctx.edition,
|
|
615
|
+
});
|
|
616
|
+
if (decision.picker) {
|
|
617
|
+
// Do NOT silently default to the active grid — surface the ask.
|
|
618
|
+
return okResult(decision.picker);
|
|
617
619
|
}
|
|
618
|
-
if (
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
// Proceed into the single grid; warn (don't block) if not set up yet.
|
|
630
|
-
input = { ...(input || {}), grid: decision.single.slug };
|
|
631
|
-
if (decision.single.render_ready === false) {
|
|
632
|
-
const res = await runPlug(ctx, input || {});
|
|
633
|
-
return okResult({
|
|
634
|
-
...res,
|
|
635
|
-
text:
|
|
636
|
-
`Warning: your only grid "${decision.single.slug}" isn't fully set up yet — the page may not load until provisioning completes.\n` +
|
|
637
|
-
res.text,
|
|
638
|
-
});
|
|
639
|
-
}
|
|
640
|
-
} else if (decision.grid) {
|
|
641
|
-
input = { ...(input || {}), grid: decision.grid };
|
|
620
|
+
if (decision.single) {
|
|
621
|
+
// Proceed into the single grid; warn (don't block) if not set up yet.
|
|
622
|
+
input = { ...(input || {}), grid: decision.single.slug };
|
|
623
|
+
if (decision.single.render_ready === false) {
|
|
624
|
+
const res = await runPlug(ctx, input || {});
|
|
625
|
+
return okResult({
|
|
626
|
+
...res,
|
|
627
|
+
text:
|
|
628
|
+
`Warning: your only grid "${decision.single.slug}" isn't fully set up yet — the page may not load until provisioning completes.\n` +
|
|
629
|
+
res.text,
|
|
630
|
+
});
|
|
642
631
|
}
|
|
632
|
+
} else if (decision.grid) {
|
|
633
|
+
input = { ...(input || {}), grid: decision.grid };
|
|
643
634
|
}
|
|
644
635
|
}
|
|
645
636
|
const res = await runPlug(ctx, input || {});
|
|
@@ -890,7 +881,7 @@ export function registerTools(server, ctx) {
|
|
|
890
881
|
"grid_list_grids",
|
|
891
882
|
{
|
|
892
883
|
title: "List your grids",
|
|
893
|
-
description: "List the signed-in user's grids, each with slug, name, role, and provisioning status.
|
|
884
|
+
description: "List the signed-in user's grids, each with slug, name, role, and provisioning status. Requires sign-in. To plug onto a brand-new grid, call grid_plug right away: it waits for the grid to be ready itself, so do not poll render_ready or wait before plugging.",
|
|
894
885
|
inputSchema: {},
|
|
895
886
|
outputSchema: {
|
|
896
887
|
orgs: z.array(z.object({
|
|
@@ -936,10 +927,10 @@ export function registerTools(server, ctx) {
|
|
|
936
927
|
const suffix = tags.length ? ` (${tags.join(", ")})` : "";
|
|
937
928
|
return `${o.slug} — ${o.name} (${o.role})${suffix}`;
|
|
938
929
|
});
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
930
|
+
// No "none of your grids are set up yet, wait" line here (cloudgrid#2428).
|
|
931
|
+
// The platform reports render_ready true for every grid, so that branch
|
|
932
|
+
// never ran, and its advice (poll, then plug) is what playbook rule 3b
|
|
933
|
+
// tells the model NOT to do: grid_plug waits for a new grid itself.
|
|
943
934
|
// Structured output stays `orgs` (its declared schema); user text says grid.
|
|
944
935
|
return okResult({ text: lines.join("\n"), structured: { orgs: annotated } });
|
|
945
936
|
},
|