@cloudgrid-io/mcp 0.17.0 → 0.19.0
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/package.json +1 -1
- package/src/corpus/capability-map.md +12 -6
- package/src/corpus/cloudgrid-yaml.md +7 -5
- package/src/corpus/cookbook.md +4 -4
- package/src/corpus/install-for-agents.md +1 -2
- package/src/corpus/skill-plug.md +69 -6
- package/src/corpus/skills-readme.md +9 -9
- package/src/corpus/templates/api-docs/README.md +1 -1
- package/src/corpus/templates/api-docs/index.md +2 -3
- package/src/corpus/templates/appointment-booking/AGENTS.md +1 -1
- package/src/corpus/templates/changelog/README.md +1 -1
- package/src/corpus/templates/changelog/index.md +2 -3
- package/src/corpus/templates/company-website/README.md +2 -3
- package/src/corpus/templates/company-website/cloudgrid.yaml +1 -1
- package/src/corpus/templates/company-website/index.md +2 -3
- package/src/corpus/templates/dashboard/cloudgrid.yaml +1 -1
- package/src/corpus/templates/dashboard/index.md +2 -3
- package/src/corpus/templates/deck/cloudgrid.yaml +1 -1
- package/src/corpus/templates/deck/index.md +2 -3
- package/src/corpus/templates/docs-site/README.md +1 -1
- package/src/corpus/templates/docs-site/index.md +2 -3
- package/src/corpus/templates/landing-page/cloudgrid.yaml +1 -1
- package/src/corpus/templates/landing-page/index.md +2 -3
- package/src/corpus/templates/membership-site/AGENTS.md +1 -1
- package/src/corpus/templates/portfolio/README.md +1 -1
- package/src/corpus/templates/portfolio/index.md +2 -3
- package/src/corpus/templates/product-launch/README.md +2 -3
- package/src/corpus/templates/product-launch/cloudgrid.yaml +1 -1
- package/src/corpus/templates/product-launch/index.md +2 -3
- package/src/corpus/templates/report/cloudgrid.yaml +1 -1
- package/src/corpus/templates/report/index.md +2 -3
- package/src/corpus/templates/saas-marketing/README.md +1 -1
- package/src/corpus/templates/saas-marketing/index.md +2 -3
- package/src/corpus/templates/status-page/README.md +1 -1
- package/src/corpus/templates/status-page/index.md +2 -3
- package/src/corpus/templates/subscription-management/AGENTS.md +1 -1
- package/src/corpus/templates/waitlist/README.md +1 -1
- package/src/corpus/templates/waitlist/index.md +2 -3
- package/src/corpus/templates/web-app/cloudgrid.yaml +1 -1
- package/src/corpus/templates/web-app/index.md +2 -3
- package/src/corpus/usage.md +2 -2
- package/src/corpus/workflows/api-docs.md +1 -1
- package/src/corpus/workflows/changelog.md +1 -1
- package/src/corpus/workflows/company-website.md +1 -1
- package/src/corpus/workflows/dashboard.md +1 -1
- package/src/corpus/workflows/docs-site.md +1 -1
- package/src/corpus/workflows/landing-page.md +1 -1
- package/src/corpus/workflows/portfolio.md +1 -1
- package/src/corpus/workflows/presentation.md +1 -1
- package/src/corpus/workflows/product-launch.md +1 -1
- package/src/corpus/workflows/report.md +1 -1
- package/src/corpus/workflows/saas-marketing.md +1 -1
- package/src/corpus/workflows/status-page.md +1 -1
- package/src/corpus/workflows/waitlist.md +1 -1
- package/src/corpus/workflows/web-app.md +1 -1
- package/src/tools.js +353 -650
- package/src/web.js +1 -1
- package/src/widgets/org-picker.html +3 -3
- package/src/corpus/skill-drop.md +0 -140
package/src/web.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
//
|
|
3
3
|
// The same tool core as the local edition, served over the MCP Streamable HTTP
|
|
4
4
|
// transport so web clients (claude.ai) can connect by URL with nothing installed.
|
|
5
|
-
// The light, CLI-free toolset only:
|
|
5
|
+
// The light, CLI-free toolset only: plug, claim, login. Identity is a per-session
|
|
6
6
|
// token held in memory for the life of the MCP session (no local files on a
|
|
7
7
|
// shared host).
|
|
8
8
|
//
|
|
@@ -72,10 +72,10 @@ body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;b
|
|
|
72
72
|
var args = {};
|
|
73
73
|
if (input.html) args.html = input.html;
|
|
74
74
|
if (input.filename) args.filename = input.filename;
|
|
75
|
-
if (input.
|
|
75
|
+
if (input.artifact_files) args.artifact_files = input.artifact_files;
|
|
76
|
+
if (input.target_entity_id) args.target_entity_id = input.target_entity_id;
|
|
76
77
|
args.grid = slug;
|
|
77
|
-
args.
|
|
78
|
-
window.openai.callTool("grid_drop", args).then(function () {
|
|
78
|
+
window.openai.callTool("grid_plug", args).then(function () {
|
|
79
79
|
// The host will render the new result with the live-result card.
|
|
80
80
|
}).catch(function () {
|
|
81
81
|
for (var m = 0; m < all.length; m++) all[m].classList.remove("loading");
|
package/src/corpus/skill-drop.md
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
version: 0.2.0
|
|
3
|
-
name: drop
|
|
4
|
-
description: |
|
|
5
|
-
Share an artifact and get a public URL. Use when the user wants to share,
|
|
6
|
-
publish, send, or deploy an HTML page or file, or wants a link for a friend.
|
|
7
|
-
Works with no login (anonymous, claimable later) or signed in (published
|
|
8
|
-
into the user's org, owned). Re-plugging updates the same URL in place.
|
|
9
|
-
Inspirations only.
|
|
10
|
-
argument-hint: "[file]"
|
|
11
|
-
allowed-tools: Bash
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
# CloudGrid Drop
|
|
15
|
-
|
|
16
|
-
Publish an artifact and get a shareable URL — with no account and no CLI. This is
|
|
17
|
-
the fastest path from "I made a thing" to "here is a link."
|
|
18
|
-
|
|
19
|
-
It calls the CloudGrid API directly. It does **not** use the `cloudgrid` CLI and it
|
|
20
|
-
does **not** require login. That is the point: anyone can drop.
|
|
21
|
-
|
|
22
|
-
## When to use this vs cloudgrid:plug
|
|
23
|
-
|
|
24
|
-
- **Drop (this skill):** the user is not signed in, or just wants a quick public
|
|
25
|
-
link for an HTML page or file. Anonymous. Inspirations only.
|
|
26
|
-
- **Plug (`cloudgrid:plug`):** the user is signed in and wants a full app deploy in
|
|
27
|
-
their own org. Uses the CLI.
|
|
28
|
-
|
|
29
|
-
If the user is signed in and asks to "share" a static artifact, this skill still
|
|
30
|
-
works and is faster; offer `cloudgrid:plug` only when they want an app.
|
|
31
|
-
|
|
32
|
-
## UX rules
|
|
33
|
-
|
|
34
|
-
- Be concise. The result the user wants is the URL. Print it plainly.
|
|
35
|
-
- Detect the user's language from their first message and reply in it.
|
|
36
|
-
- Do not ask the user to log in. The whole value here is that they do not have to.
|
|
37
|
-
|
|
38
|
-
## How to run it
|
|
39
|
-
|
|
40
|
-
You need a single HTML file. If the user gave you inline HTML, write it to a file
|
|
41
|
-
first. The content must be a full HTML document (start with `<!doctype html>` or
|
|
42
|
-
`<html>`); if you only have a fragment, wrap it in a minimal document. HTML is
|
|
43
|
-
capped at 2 MB for anonymous drops.
|
|
44
|
-
|
|
45
|
-
Then POST it to the unified plug endpoint:
|
|
46
|
-
|
|
47
|
-
```
|
|
48
|
-
curl -sS -X POST https://api.cloudgrid.io/api/v2/plug \
|
|
49
|
-
-F "artifact=@/path/to/index.html;type=text/html"
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
The response is JSON (HTTP 201 for an anonymous drop). Read these fields:
|
|
53
|
-
|
|
54
|
-
- `url` — the live link, composed by the server. Use it verbatim; never compose a
|
|
55
|
-
URL from the slug yourself.
|
|
56
|
-
- `entity_id` — the durable handle for updating this drop later (see re-plug below).
|
|
57
|
-
- `owner_token` — a JWT proving you made this drop. It lets you re-plug the drop
|
|
58
|
-
anonymously and doubles as the claim token. Its lifetime matches the drop's
|
|
59
|
-
expiry (default 7 days). Persist it together with `entity_id` and `url`.
|
|
60
|
-
- `claim_url` — the link to sign in and keep the drop past its expiry.
|
|
61
|
-
- `claim_message` — a ready-to-show nudge to sign in and claim.
|
|
62
|
-
|
|
63
|
-
## If the user is signed in
|
|
64
|
-
|
|
65
|
-
A signed-in user can publish into their own org instead of anonymously — the drop
|
|
66
|
-
is owned and needs no claim. Add their token and org to the same request:
|
|
67
|
-
|
|
68
|
-
```
|
|
69
|
-
JWT=$(jq -r .jwt ~/.cloudgrid/credentials 2>/dev/null)
|
|
70
|
-
ORG=$(grep -E '^\s*active_org_slug:' ~/.cloudgrid/config.yaml | awk '{print $2}')
|
|
71
|
-
curl -sS -X POST https://api.cloudgrid.io/api/v2/plug \
|
|
72
|
-
-H "Authorization: Bearer $JWT" -H "X-CloudGrid-Org: $ORG" \
|
|
73
|
-
-F "artifact=@/path/to/index.html;type=text/html"
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
A signed-in drop returns HTTP 202 with `entity_id`, `url`, `slug` + `grid` and no
|
|
77
|
-
`claim_url` (it is already owned). Use the returned `url` as the live link — do
|
|
78
|
-
not compose it. The org is taken from the `X-CloudGrid-Org` header — there is no
|
|
79
|
-
`org_slug` form field. If the user is a member of several orgs and the header is
|
|
80
|
-
missing, the API replies with the list of orgs to choose from. The MCP
|
|
81
|
-
`grid_drop` tool does this automatically when credentials are present.
|
|
82
|
-
|
|
83
|
-
## Re-plug: update the same URL in place
|
|
84
|
-
|
|
85
|
-
`/api/v2/plug` is a unified create-or-update endpoint. The switch is the
|
|
86
|
-
`target_entity_id` form field:
|
|
87
|
-
|
|
88
|
-
- **Absent** → create: a new entity, a new URL.
|
|
89
|
-
- **Present** → re-plug: the SAME entity is updated — same slug, same URL, new
|
|
90
|
-
content. This is how you iterate on one shareable link.
|
|
91
|
-
|
|
92
|
-
Signed in, re-plug with the entity id and your normal auth headers:
|
|
93
|
-
|
|
94
|
-
```
|
|
95
|
-
curl -sS -X POST https://api.cloudgrid.io/api/v2/plug \
|
|
96
|
-
-H "Authorization: Bearer $JWT" -H "X-CloudGrid-Org: $ORG" \
|
|
97
|
-
-F "target_entity_id=$ENTITY_ID" \
|
|
98
|
-
-F "artifact=@/path/to/index.html;type=text/html"
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
Anonymously, prove ownership with the `owner_token` the drop returned:
|
|
102
|
-
|
|
103
|
-
```
|
|
104
|
-
curl -sS -X POST https://api.cloudgrid.io/api/v2/plug \
|
|
105
|
-
-F "target_entity_id=$ENTITY_ID" \
|
|
106
|
-
-F "owner_token=$OWNER_TOKEN" \
|
|
107
|
-
-F "artifact=@/path/to/index.html;type=text/html"
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
Rules that matter:
|
|
111
|
-
|
|
112
|
-
- `entity_id` + `url` (+ `owner_token` when anonymous) are the durable re-plug
|
|
113
|
-
handle. Persist them after every drop.
|
|
114
|
-
- Every anonymous edit REFRESHES the `owner_token` — store the one from the
|
|
115
|
-
latest response; the old one is superseded. Each edit also resets the drop's
|
|
116
|
-
expiry window.
|
|
117
|
-
- Editing an archived or expired drop returns **409 `EDIT_REJECTED`** — it never
|
|
118
|
-
silently creates a new entity. Drop again (without `target_entity_id`) if the
|
|
119
|
-
user wants a new link.
|
|
120
|
-
- An anonymous edit without a valid `owner_token` returns **401**.
|
|
121
|
-
- Anonymous edits count against the same daily anonymous cap as creates.
|
|
122
|
-
- Only re-plug when the user is iterating on an existing artifact. If they want a
|
|
123
|
-
separate new link, omit `target_entity_id` (the MCP `grid_drop` tool's
|
|
124
|
-
`fresh` flag does the same: it forces a new entity instead of updating).
|
|
125
|
-
|
|
126
|
-
## After the drop
|
|
127
|
-
|
|
128
|
-
Print the `url` from the response on its own line, by itself, so it can be copied
|
|
129
|
-
in one go. Then add one line of context: an anonymous drop expires (default 7 days,
|
|
130
|
-
reset on every edit) and can be claimed to keep it; a signed-in drop is already
|
|
131
|
-
owned. Do not bury the URL in prose. Keep `entity_id` (and `owner_token` if
|
|
132
|
-
anonymous) so a follow-up "change X" can re-plug the same URL.
|
|
133
|
-
|
|
134
|
-
## Limits and errors
|
|
135
|
-
|
|
136
|
-
- Anonymous drops are **inspirations only**. A full app needs sign-in — if the
|
|
137
|
-
artifact is an app, the API returns 401; switch to `cloudgrid:plug`.
|
|
138
|
-
- HTML over 2 MB is rejected. Trim it or suggest signing in.
|
|
139
|
-
- There is a per-IP and per-device daily cap. If you hit 429, tell the user to try
|
|
140
|
-
again later.
|