@typeroll/mcp-server 0.45.81 → 0.45.83
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/AGENTS.md +7 -3
- package/README.md +14 -6
- package/dist/api-url.js +23 -0
- package/dist/bundled-content.js +10 -7
- package/dist/compact-tools.js +2 -2
- package/dist/extension-cli.js +37 -7
- package/dist/index.js +4 -0
- package/dist/server.js +2 -1
- package/dist/tools/access.js +22 -3
- package/dist/tools/extensions.js +3 -3
- package/dist/tools/settings.js +3 -1
- package/dist/version.js +1 -1
- package/dist/workspace.js +29 -6
- package/package.json +1 -1
- package/skills/tr-edit-site.md +5 -1
- package/workspace-templates/pages/README.md +40 -0
- package/workspace-templates/qa/checklist.md +7 -0
- package/workspace-templates/scripts/README.md +9 -1
- package/workspace-templates/scripts/typeroll/page_notes.py +144 -0
- package/workspace-templates/scripts/typeroll/trlib.py +26 -2
- package/workspace-templates/workflows/migration.md +7 -0
- package/workspace-templates/workflows/page-notes.md +20 -0
package/AGENTS.md
CHANGED
|
@@ -1084,8 +1084,12 @@ choice; never ask for it as a prerequisite for your own work.
|
|
|
1084
1084
|
`list_site_shares`. Site admin. Confirm the recipient first: a share gives
|
|
1085
1085
|
every member of that Organization access.
|
|
1086
1086
|
- **A person joining your Organization:** `create_organization_invite` returns
|
|
1087
|
-
a link; the person signs in and joins as an editor.
|
|
1088
|
-
|
|
1087
|
+
a link; the person signs in and joins as an editor. It is single use unless
|
|
1088
|
+
you set `max_uses` (up to 50), and `email` binds it to one address.
|
|
1089
|
+
`list_organization_invites` shows each invite's state without its link, and
|
|
1090
|
+
`revoke_organization_invite` stops a link immediately. Organization key.
|
|
1091
|
+
Creating Organizations, switching Organization and redeeming invites remain
|
|
1092
|
+
signed-in portal actions.
|
|
1089
1093
|
|
|
1090
1094
|
### "Turn on the portal's AI assistant" (and why you don't need it)
|
|
1091
1095
|
|
|
@@ -1298,7 +1302,7 @@ preview.
|
|
|
1298
1302
|
| **Discovery** | `get_site`, `create_site`, `create_site_and_migrate`, `create_site_and_plan` (org-scoped key only — see below), `update_site` (incl. `ai_scripts_enabled`, admin), `list_versions`, `read_site_settings` |
|
|
1299
1303
|
| **Site lifecycle** | `archive_site`, `restore_site`, `purge_site_media` (archived sites only, irreversible). Owner-organization admin, as in the portal. |
|
|
1300
1304
|
| **Workflows** | `list_workflows`, `start_workflow` (write; `rebuild_deploy` admin), `get_workflow`, `approve_workflow` (only `paused_for_review`, with the user's consent) |
|
|
1301
|
-
| **Access** | `list_api_keys`, `revoke_api_key` (site admin), `list_organization_api_keys`, `revoke_organization_api_key` (organization key; new keys are created only in the portal), `list_site_shares`, `share_site`, `update_site_share`, `revoke_site_share` (site admin), `create_organization_invite` (organization key), `read_organization_ai_settings`, `set_organization_ai_key`, `remove_organization_ai_key`, `set_organization_ai_site_access` (the portal AI chat's own key and Sites; organization key) |
|
|
1305
|
+
| **Access** | `list_api_keys`, `revoke_api_key` (site admin), `list_organization_api_keys`, `revoke_organization_api_key` (organization key; new keys are created only in the portal), `list_site_shares`, `share_site`, `update_site_share`, `revoke_site_share` (site admin), `create_organization_invite`, `list_organization_invites`, `revoke_organization_invite` (organization key), `read_organization_ai_settings`, `set_organization_ai_key`, `remove_organization_ai_key`, `set_organization_ai_site_access` (the portal AI chat's own key and Sites; organization key) |
|
|
1302
1306
|
| **Organization publishing** | `read_organization_publishing_connections`, `diagnose_organization_github_connection`, `diagnose_organization_cloudflare_connection`, `disconnect_organization_publishing_provider`, `connect_organization_cloudflare`, `prepare_organization_media_storage`, `save_organization_media_access`, plus builds, Hosting Groups, domains and media migration tools (organization key) |
|
|
1303
1307
|
| **Insights** | `get_site_insights` — traffic, AI-assistant referrals, and first-party conversion events over 7/30/90 days. Read-only. Traffic is powered by Cloudflare Web Analytics in the account that hosts the site; a non-ok `status` carries a `reason` with the next step. Conversion rows come from validated Analytics attribution `click_event` targets and can be present even when the traffic provider is unavailable. |
|
|
1304
1308
|
| **Pages — reads** | `list_pages`, `read_page`, `batch_read_pages` |
|
package/README.md
CHANGED
|
@@ -107,7 +107,8 @@ log.
|
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
For a self-hosted portal, point `TYPEROLL_API_URL` at it (e.g.
|
|
110
|
-
`https://cms.example.com`).
|
|
110
|
+
`https://cms.example.com`). The stdio server and the `typeroll extension`
|
|
111
|
+
CLI require HTTPS, except on loopback hosts.
|
|
111
112
|
|
|
112
113
|
For an optional agent-neutral workspace, run
|
|
113
114
|
`npx @typeroll/mcp-server init ./my-site`. It creates project instructions,
|
|
@@ -131,7 +132,7 @@ log.
|
|
|
131
132
|
|
|
132
133
|
| Var | Required | Description |
|
|
133
134
|
| ------------------ | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
134
|
-
| `TYPEROLL_API_URL` | yes | Base URL of your Typeroll portal.
|
|
135
|
+
| `TYPEROLL_API_URL` | yes | Base URL of your Typeroll portal. Must use HTTPS; plain HTTP is accepted only for `localhost`, `127.0.0.1` or `[::1]`. |
|
|
135
136
|
| `TYPEROLL_API_KEY` | yes | A `typeroll_live_…` bearer token. |
|
|
136
137
|
| `TYPEROLL_SITE_ID` | sometimes | Pin to a specific site. Required when the key can access multiple sites; each stdio process targets one site. A single accessible site is auto-detected. |
|
|
137
138
|
|
|
@@ -151,7 +152,11 @@ typeroll extension promote 1.0.0
|
|
|
151
152
|
```
|
|
152
153
|
|
|
153
154
|
The manifest defaults to `typeroll-extension.json`; use `--manifest` to select
|
|
154
|
-
another file.
|
|
155
|
+
another file. For a private Extension, `install` adds the site to the
|
|
156
|
+
Extension's `allowed_site_ids`. A bare site id only matches a site of your own
|
|
157
|
+
developer organization; to install on another organization's site, pass
|
|
158
|
+
`--site <organization-id>/<site-id>`, which is written to the allow-list in
|
|
159
|
+
that form. Local validation is a fast preflight. The portal always performs
|
|
155
160
|
the complete schema, compatibility, origin and asset-hash validation.
|
|
156
161
|
`extension configure` queues a production deploy by default; pass
|
|
157
162
|
`--no-deploy` only when batching updates and deploy once afterwards.
|
|
@@ -191,8 +196,9 @@ the full reference + concrete operation recipes.
|
|
|
191
196
|
`revoke_api_key`; revoking needs site admin) and organization API keys
|
|
192
197
|
(`list_organization_api_keys`, `revoke_organization_api_key`),
|
|
193
198
|
cross-organization sharing (`list_site_shares`, `share_site`,
|
|
194
|
-
`update_site_share`, `revoke_site_share`; site admin) and
|
|
195
|
-
`create_organization_invite`
|
|
199
|
+
`update_site_share`, `revoke_site_share`; site admin) and editor invite
|
|
200
|
+
links (`create_organization_invite`, `list_organization_invites`,
|
|
201
|
+
`revoke_organization_invite`; organization key). A share never reaches
|
|
196
202
|
further than the caller. New API keys are created only in the portal, so the
|
|
197
203
|
secret never passes through an agent conversation.
|
|
198
204
|
- **Portal AI assistant** — `read_organization_ai_settings`,
|
|
@@ -407,7 +413,9 @@ Use `read_app_documentation` to discover instructions for the selected site’s
|
|
|
407
413
|
MCP 0.45.23 introduces an agent-neutral `typeroll init` workspace, optional
|
|
408
414
|
client adapters, safe hash-based `init --update`, and read-only `typeroll doctor`.
|
|
409
415
|
Use `workspace-mcp` to bind local calls to `typeroll.json`; no credentials are
|
|
410
|
-
stored there.
|
|
416
|
+
stored there. Because `typeroll.json` is committed, its `portal` receives the
|
|
417
|
+
API key only when it is `https://app.typeroll.com` or matches a privately set
|
|
418
|
+
`TYPEROLL_API_URL`. Recipes are optional rather than automatically injected.
|
|
411
419
|
|
|
412
420
|
Compact mode exposes five discovery/execution tools instead of every schema.
|
|
413
421
|
Choose `?tools=compact` on the hosted endpoint (Core 0.2.27+), `tool_mode` in the
|
package/dist/api-url.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const LOOPBACK_HOSTS = new Set(['localhost', '127.0.0.1', '[::1]']);
|
|
2
|
+
/** HTTPS, or plain HTTP only to a loopback host where the key never leaves the machine. */
|
|
3
|
+
export function isSecureApiUrl(url) {
|
|
4
|
+
return url.protocol === 'https:' || (url.protocol === 'http:' && LOOPBACK_HOSTS.has(url.hostname));
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Validate TYPEROLL_API_URL before an API key is attached to any request.
|
|
8
|
+
* Returns an error message, or null when the URL is acceptable.
|
|
9
|
+
*/
|
|
10
|
+
export function apiUrlProblem(value) {
|
|
11
|
+
let url;
|
|
12
|
+
try {
|
|
13
|
+
url = new URL(value);
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return 'TYPEROLL_API_URL must be an absolute URL such as https://app.typeroll.com.';
|
|
17
|
+
}
|
|
18
|
+
if (url.username || url.password)
|
|
19
|
+
return 'TYPEROLL_API_URL must not contain credentials.';
|
|
20
|
+
if (!isSecureApiUrl(url))
|
|
21
|
+
return 'TYPEROLL_API_URL must use HTTPS (HTTP is allowed only for localhost, 127.0.0.1 or [::1]).';
|
|
22
|
+
return null;
|
|
23
|
+
}
|