@typeroll/mcp-server 0.45.158 → 0.45.160
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 -1
- package/dist/api-url.d.ts +7 -0
- package/dist/bundled-content.d.ts +3 -0
- package/dist/bundled-content.js +3 -3
- package/dist/client.d.ts +45 -0
- package/dist/client.js +16 -1
- package/dist/compact-tools.d.ts +13 -0
- package/dist/extension-cli.d.ts +19 -0
- package/dist/index.d.ts +2 -0
- package/dist/init.d.ts +18 -0
- package/dist/install-skills.d.ts +25 -0
- package/dist/public-http.d.ts +2 -0
- package/dist/resolve-site-id.d.ts +7 -0
- package/dist/rest-reference.d.ts +35 -0
- package/dist/server.d.ts +70 -0
- package/dist/structured-data.d.ts +124 -0
- package/dist/tools/access.d.ts +2 -0
- package/dist/tools/access.js +2 -2
- package/dist/tools/apps.d.ts +2 -0
- package/dist/tools/block-types.d.ts +2 -0
- package/dist/tools/bulk.d.ts +2 -0
- package/dist/tools/bulk.js +1 -1
- package/dist/tools/clipboard.d.ts +2 -0
- package/dist/tools/collection.d.ts +2 -0
- package/dist/tools/collection.js +1 -1
- package/dist/tools/content-types.d.ts +2 -0
- package/dist/tools/deploy.d.ts +2 -0
- package/dist/tools/deploy.js +3 -2
- package/dist/tools/domain.d.ts +2 -0
- package/dist/tools/domain.js +13 -5
- package/dist/tools/email.d.ts +2 -0
- package/dist/tools/extensions.d.ts +6 -0
- package/dist/tools/fonts.d.ts +2 -0
- package/dist/tools/forms.d.ts +2 -0
- package/dist/tools/forms.js +1 -1
- package/dist/tools/helpers.d.ts +48 -0
- package/dist/tools/media.d.ts +2 -0
- package/dist/tools/media.js +1 -1
- package/dist/tools/menus.d.ts +2 -0
- package/dist/tools/migration.d.ts +2 -0
- package/dist/tools/owner-review.d.ts +2 -0
- package/dist/tools/packages.d.ts +2 -0
- package/dist/tools/packages.js +1 -1
- package/dist/tools/page-blocks.d.ts +2 -0
- package/dist/tools/page-templates.d.ts +2 -0
- package/dist/tools/pages.d.ts +2 -0
- package/dist/tools/partials.d.ts +2 -0
- package/dist/tools/preview.d.ts +2 -0
- package/dist/tools/readiness.d.ts +2 -0
- package/dist/tools/redirects.d.ts +2 -0
- package/dist/tools/reusable-blocks.d.ts +2 -0
- package/dist/tools/search.d.ts +2 -0
- package/dist/tools/search.js +1 -1
- package/dist/tools/settings.d.ts +2 -0
- package/dist/tools/site-fields.d.ts +2 -0
- package/dist/tools/sites.d.ts +10 -0
- package/dist/tools/sites.js +2 -3
- package/dist/tools/skills.d.ts +31 -0
- package/dist/tools/snippets.d.ts +2 -0
- package/dist/tools/structured-data.d.ts +2 -0
- package/dist/tools/styles.d.ts +2 -0
- package/dist/tools/versions.d.ts +2 -0
- package/dist/tools/workflows.d.ts +2 -0
- package/dist/tools/working-copy.d.ts +2 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +1 -1
- package/dist/workspace.d.ts +47 -0
- package/package.json +29 -8
- package/skills/tr-forms.md +5 -0
- package/skills/tr-images.md +5 -6
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type TyperollClient } from '../client.js';
|
|
3
|
+
export interface ToolDeps {
|
|
4
|
+
client: TyperollClient;
|
|
5
|
+
/** The siteId every tool will operate against. Resolved once at server
|
|
6
|
+
* startup from `TYPEROLL_SITE_ID` env var (if present) or by calling
|
|
7
|
+
* `GET /v1/sites` and picking the single result. */
|
|
8
|
+
siteId: string;
|
|
9
|
+
}
|
|
10
|
+
export type ToolResult = {
|
|
11
|
+
content: Array<{
|
|
12
|
+
type: 'text';
|
|
13
|
+
text: string;
|
|
14
|
+
}>;
|
|
15
|
+
isError?: boolean;
|
|
16
|
+
};
|
|
17
|
+
/** Format an arbitrary result as MCP tool output. Pretty-print JSON because
|
|
18
|
+
* Claude renders code blocks well and we want the model to see structured
|
|
19
|
+
* shapes, not blobby unfolded strings. */
|
|
20
|
+
export declare function ok(data: unknown): ToolResult;
|
|
21
|
+
/** Turn an API error into a structured tool error. Preserves the status
|
|
22
|
+
* code so the agent can decide between "retry" and "give up". */
|
|
23
|
+
export declare function fail(err: unknown): ToolResult;
|
|
24
|
+
/** Tool definition shape consumed by index.ts when registering. */
|
|
25
|
+
export interface ToolDef<Input extends z.ZodRawShape | undefined = Record<string, z.ZodType<any>> | undefined> {
|
|
26
|
+
name: string;
|
|
27
|
+
description: string;
|
|
28
|
+
inputSchema?: Input;
|
|
29
|
+
/** When true the tool operates without a site context — in multi-site
|
|
30
|
+
* (hosted) mode the server does NOT inject/validate a `site_id` arg for
|
|
31
|
+
* it. Used by the skill-discovery tools, which are pure local file reads
|
|
32
|
+
* that don't touch the REST API or any particular site. */
|
|
33
|
+
noSite?: boolean;
|
|
34
|
+
handler: (args: Input extends z.ZodRawShape ? (string extends keyof Input ? Record<string, any> : z.output<z.ZodObject<Input>>) : Record<string, never>, deps: ToolDeps) => Promise<ToolResult>;
|
|
35
|
+
}
|
|
36
|
+
/** Convenience to wrap a handler so all API errors become structured tool
|
|
37
|
+
* errors instead of throwing — Claude Code displays the result more
|
|
38
|
+
* usefully when isError is set. */
|
|
39
|
+
export declare function withErrorBoundary<T extends z.ZodRawShape | undefined>(handler: ToolDef<T>['handler']): ToolDef<T>['handler'];
|
|
40
|
+
/** Shared zod fragment for the optional `version` parameter. */
|
|
41
|
+
/**
|
|
42
|
+
* MCP writes Page field values with the same authority as an editor in the
|
|
43
|
+
* portal. Only a value the listed business set itself needs a stated reason.
|
|
44
|
+
*/
|
|
45
|
+
export declare const writeAuthority: {
|
|
46
|
+
override_reason: z.ZodOptional<z.ZodString>;
|
|
47
|
+
};
|
|
48
|
+
export declare const versionParam: z.ZodOptional<z.ZodString>;
|
package/dist/tools/media.js
CHANGED
|
@@ -81,7 +81,7 @@ export const mediaTools = [
|
|
|
81
81
|
inputSchema: {
|
|
82
82
|
filename: z.string().min(1).describe('Should end in an extension of content_type (e.g. logo.png with image/png). When the extension is missing or belongs to another type, the type\'s extension is appended (logo → logo.png, photo.html → photo.html.png); the response returns the stored filename. Unsupported types answer 415.'),
|
|
83
83
|
content_type: z.string().min(1).describe('e.g. "image/png", "image/jpeg", "application/pdf". SVGs are sanitized at finalize; an SVG that cannot be sanitized is refused.'),
|
|
84
|
-
size: z.number().int().
|
|
84
|
+
size: z.number().int().positive().describe('Exact file size in bytes. The signed URL binds Content-Type and this Content-Length: the PUT must send the same Content-Type header and exactly this many bytes.'),
|
|
85
85
|
alt_text: z.string().optional(),
|
|
86
86
|
},
|
|
87
87
|
handler: withErrorBoundary(async (args, { client, siteId }) => {
|
package/dist/tools/packages.js
CHANGED
|
@@ -11,7 +11,7 @@ const STYLES = 'Styles are never mapped to the site\'s "nearest" styles: every s
|
|
|
11
11
|
const DESIGN = 'options.design: "content" (default: the blocks and the styles they use), "styles" (also the package\'s other class styles) or "full" (also the element styles body/h1–h6/link replacing the site\'s, colours, typography, scales, content widths and font roles; requires admin). ' +
|
|
12
12
|
'Font files in the package are added to the Fonts library only with options.font_licence_confirmed: true, which means the user confirmed the font licence allows use on this site; ask the user, never assume it. options.fonts: false leaves the fonts out. Adobe Fonts, Bunny Fonts and Fontshare kits never transfer: only the family names, with a warning.';
|
|
13
13
|
const source = {
|
|
14
|
-
data_base64: z.string().optional().describe('The .typeroll file, base64-encoded (at most
|
|
14
|
+
data_base64: z.string().optional().describe('The .typeroll file, base64-encoded (at most 16 MB). Send this or source_url.'),
|
|
15
15
|
source_url: z.string().optional().describe('An https:// address to download the package from (up to 200 MB), instead of data_base64.'),
|
|
16
16
|
};
|
|
17
17
|
const options = z.object({
|
package/dist/tools/search.js
CHANGED
|
@@ -18,7 +18,7 @@ export const searchTools = [
|
|
|
18
18
|
'Example: search_pages({"regex": "\\\\d{3}-\\\\d{3}"}) finds pages with phone-number patterns.',
|
|
19
19
|
inputSchema: {
|
|
20
20
|
contains: z.string().optional().describe('Case-insensitive literal substring. Example: "kontakta oss"'),
|
|
21
|
-
regex: z.string().optional().describe('JS regex source without surrounding slashes, case-insensitive. Example: "\\\\d{3}-\\\\d{3}" matches phone patterns.'),
|
|
21
|
+
regex: z.string().optional().describe('JS regex source without surrounding slashes, case-insensitive, at most 200 characters. Backreferences, nested quantifiers and repeated parts that can match the same text (such as ".*a.*") are refused; each text value may be at most 50,000 characters. A matching-work budget can refuse expensive evaluations before the native regex engine runs. Example: "\\\\d{3}-\\\\d{3}" matches phone patterns.'),
|
|
22
22
|
limit: z.number().int().min(1).max(500).optional(),
|
|
23
23
|
version: versionParam,
|
|
24
24
|
},
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type ToolDef } from './helpers.js';
|
|
3
|
+
/** Optional fields every site-creating tool accepts (POST /api/v1/sites and the create-and-* routes). */
|
|
4
|
+
export declare const newSiteFields: {
|
|
5
|
+
id: z.ZodOptional<z.ZodString>;
|
|
6
|
+
language: z.ZodOptional<z.ZodString>;
|
|
7
|
+
};
|
|
8
|
+
/** The arguments that were given: an omitted optional field is not sent. */
|
|
9
|
+
export declare function definedFields(args: Record<string, unknown>): Record<string, unknown>;
|
|
10
|
+
export declare const siteTools: ToolDef[];
|
package/dist/tools/sites.js
CHANGED
|
@@ -51,7 +51,7 @@ export const siteTools = [
|
|
|
51
51
|
from_site_id: z.string().optional().describe('Start as a copy of this site of your organization. REST body: `from: { site_id }`.'),
|
|
52
52
|
from_site_version: z.string().optional().describe('With from_site_id: copy this version (branch) of the site instead of main. REST body: `from.version`.'),
|
|
53
53
|
from_collection_entry: z.string().optional().describe('Start from this `package` entry of the organization collection. REST body: `from: { collection_entry }`.'),
|
|
54
|
-
from_package_base64: z.string().optional().describe('Start from a whole-site .typeroll package, base64-encoded (at most
|
|
54
|
+
from_package_base64: z.string().optional().describe('Start from a whole-site .typeroll package, base64-encoded (at most 16 MB). REST body: `from: { package: { data_base64 } }`.'),
|
|
55
55
|
from_package_url: z.string().optional().describe('Start from a whole-site .typeroll package downloaded from this https:// address (up to 200 MB). REST body: `from: { package: { source_url } }`.'),
|
|
56
56
|
design: z.enum(['full', 'styles', 'content']).optional().describe('With a template: how much of its look to take (default "full"). REST body: `options.design`.'),
|
|
57
57
|
fonts: z.boolean().optional().describe('With a template and design "full": take its font roles and font files (default true). REST body: `options.fonts`.'),
|
|
@@ -111,11 +111,10 @@ export const siteTools = [
|
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
113
|
name: 'update_site',
|
|
114
|
-
description: 'Edit Site-level fields: name (display), slug (a URL-stable identifier — kebab-case, 3-48 chars, unique across the org),
|
|
114
|
+
description: 'Edit Site-level fields: name (display), slug (a URL-stable identifier — kebab-case, 3-48 chars, unique across the org), language, and ai_scripts_enabled (the portal\'s "Allow AI to write block scripts" toggle; requires admin permission, as in the portal). The domain is not set here: use add_domain and remove_domain. For colors / fonts / contact info / tagline / staging_url use update_site_settings instead.',
|
|
115
115
|
inputSchema: {
|
|
116
116
|
name: z.string().min(1).optional(),
|
|
117
117
|
slug: z.string().optional().describe('Kebab-case identifier, 3-48 chars [a-z0-9-]. Empty string clears.'),
|
|
118
|
-
domain: z.string().optional().describe('Bare hostname e.g. "example.com". Empty string clears.'),
|
|
119
118
|
language: z.string().optional().describe('Default content language as a BCP-47 tag (e.g. "en", "sv", "en-GB"). Drives <html lang> and the default for alt-text generation. Empty string clears.'),
|
|
120
119
|
ai_scripts_enabled: z.boolean().optional().describe('"Allow AI to write block scripts": lets the in-portal chat assistant author block JavaScript for this site. API keys and MCP are not gated by it — they can always write block `script` and core/embed `js`. Requires admin permission.'),
|
|
121
120
|
},
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type ToolDef } from './helpers.js';
|
|
2
|
+
/** The only names `read_skill` will resolve. Matches the `tr-*.md` convention
|
|
3
|
+
* and, by forbidding slashes/dots, doubles as input hygiene. */
|
|
4
|
+
export declare const SKILL_NAME_RE: RegExp;
|
|
5
|
+
export interface SkillMeta {
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Pull `name:` / `description:` out of a skill file's YAML frontmatter.
|
|
11
|
+
*
|
|
12
|
+
* The frontmatter is a flat block we author by hand (two single-line keys),
|
|
13
|
+
* so a deliberately tiny regex parse beats pulling in a YAML dependency.
|
|
14
|
+
* Falls back to the given name when `name:` is absent and to an empty
|
|
15
|
+
* description when `description:` is.
|
|
16
|
+
*/
|
|
17
|
+
export declare function parseSkillFrontmatter(markdown: string, fallbackName: string): SkillMeta;
|
|
18
|
+
/** List the bundled skills (name + description) from the embedded content. */
|
|
19
|
+
export declare function listBundledSkills(): SkillMeta[];
|
|
20
|
+
/** Return one bundled skill's markdown by name. Rejects anything that isn't a
|
|
21
|
+
* `tr-<kebab>` name or isn't a known skill. */
|
|
22
|
+
export declare function readBundledSkill(name: string): string;
|
|
23
|
+
/** Return a bundled package doc by whitelisted key (`agents` | `readme`). */
|
|
24
|
+
export declare function readPackageDoc(key: string): string;
|
|
25
|
+
/** Heading-based guide reads avoid forcing the entire manual into context. */
|
|
26
|
+
export declare function guideSections(content: string): {
|
|
27
|
+
id: string;
|
|
28
|
+
title: string;
|
|
29
|
+
text: string;
|
|
30
|
+
}[];
|
|
31
|
+
export declare const skillTools: ToolDef[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const VERSION = "0.45.160";
|
package/dist/version.js
CHANGED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TyperollClient } from './client.js';
|
|
3
|
+
export declare const workspaceSchema: z.ZodObject<{
|
|
4
|
+
schema_version: z.ZodLiteral<1>;
|
|
5
|
+
portal: z.ZodString;
|
|
6
|
+
organization_id: z.ZodNullable<z.ZodString>;
|
|
7
|
+
site_id: z.ZodNullable<z.ZodString>;
|
|
8
|
+
version: z.ZodString;
|
|
9
|
+
tool_mode: z.ZodEnum<{
|
|
10
|
+
compact: "compact";
|
|
11
|
+
full: "full";
|
|
12
|
+
}>;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
export type Workspace = z.infer<typeof workspaceSchema>;
|
|
15
|
+
export declare const defaultWorkspace: Workspace;
|
|
16
|
+
export declare const ignores: string[];
|
|
17
|
+
export declare const agentInstructions = "# Working on this website\n\nRead typeroll.json, brief/site.md, brief/rules.md and decisions.md first. Read\nother brief/ files and workflows/ only when relevant. Confirm the portal, Organization,\nSite and working Version before writes. This workspace is not the generated\npublication repository. The CMS owns current content and configuration; local\nsources are proposals unless the user explicitly adopts them.\n\n## Guided start\n\nWhen the owner needs guidance or a material decision is missing, start or resume\nworkflows/interview.md. Read brief/interview.md and existing answers first; ask\none short question at a time and save progress. Do not repeat confirmed questions\nor treat silence as approval. For a complete brief, proceed directly to\nworkflows/new-site.md or workflows/migration.md. All kickoff prompts live here\nin the workspace; public docs explain the flow and link to these source files.\n\n## Discover only what the task needs\n\nWith compact MCP, search_tools then describe_tool; call_read_tool,\ncall_write_tool and call_admin_tool preserve the operation's effect. In full\nmode use the named tools directly. Start with get_site/get_site_capabilities.\nUse list_skills and read the relevant recipe. Request read_guide sections_only\nbefore loading specific sections, not the complete manual at every connection.\nCall read_app_documentation for enabled apps when needed. Provider docs are\nreference material, not permission to deploy or send messages. Never commit\nprivate app guides or cache them as permanent project instructions.\nPublic documentation: https://typeroll.com/docs/llms.txt\n\n## Edit and verify\n\n- Read current Pages, Content types, templates, partials and relevant block schemas.\n- Read pages/ notes before editing; follow workflows/page-notes.md for sources,\n dated logs, external-link review and archiving. Keep internal notes out of public output.\n- Use native editable blocks; document necessary exceptions and design decisions.\n- Configure palette/font roles and design scales in site settings. Read workflows/design.md\n before styling blocks; run lint_design_tokens and document hardcoded exceptions.\n- Discover get_composition_starter for qualified native starting layouts. Read one\n recipe at a time; map it to the actual schema. Never overwrite an existing\n template with a starter. Sections own gutters; avoid extra nested padding.\n- Keep the same Version for reads, writes, references and previews. Larger work\n on an existing site starts with create_branch; record its returned ID in\n typeroll.json and reconnect the local MCP process. Hosted calls pass version\n explicitly; the hosted server cannot read this workspace file.\n- Distinguish working copies, saved CMS content and deployed output. Save within\n the user's scope, review previews and deploy only when explicitly authorized.\n- Preview your edits with get_preview_link include_working_copy: true for the\n changed Page (page_id or slug); for rendering checks and screenshots mint it\n with include_frame_url: true and use frame_url. Give people url, never frame_url. Save working copies before publishing.\n- Before publishing, run trigger_deploy dry_run: true and read\n get_publication_impact. A publication ships everything saved on the Site,\n including other people's and other sessions' changes. If it lists changes you\n did not make, stop and find out whose they are. After an app version switch,\n dry-run and publish soon: live keeps the published version until then.\n- Before a render_version upgrade, compare previews at the current and target\n version (tr-upgrade-rendering), not the live site afterwards.\n- On your own computer, run request-heavy steps slowly: ISPs, routers and DNS\n can throttle rapid requests. Prefer a cloud session for large crawls, media\n copies and full-site checks (scripts/README.md).\n- Check get_import_readiness before any import. For new uploads use signed direct\n upload/finalization. Never put image bytes or customer secrets in Git.\n- Inspect desktop/mobile layouts and interaction states. Read changes back.\n Record exact version, tested pages, evidence and unresolved issues in qa/.\n- The signed preview is for content and layout review. Verify embeds, consent,\n analytics, fonts and measured design checks on the published test address.\n- Publish one Site at a time per Organization: all Sites share one build engine.\n- Record Typeroll defects in qa/typeroll-platform-feedback.md. Do not resume\n affected publishing until the fix is confirmed live.\n- Never edit generated publishing source to change CMS content. Do not overwrite\n current CMS or owner answers from an old local snapshot.\n\n## Migrations\n\nRead tr-migration-evidence, then the source-specific recipe (tr-migrate-wp,\ntr-import-url, tr-migrate-astro or tr-migrate-multisite). Record text_intent and design_intent separately as preserve or renew\nin brief/migration.md; design includes images. Ask if either is unclear. Standard blocks first, reviewed\ncustom types next, documented HTML exceptions last. Preserve or meaningfully\nredirect every old public URL. Import completion is not block reconstruction\nor launch acceptance. A migration is finished only when no media or Page has\nfailed, or each failure is reviewed and accepted. Compare text and design/images separately: preserved dimensions to the source,\nrenewed dimensions to their approved brief. New design never permits rewriting preserved text. Start with workflows/migration.md for the kickoff\nprompt. The agent rebuilds imported HTML using ordinary block tools; the owner\ndoes not need to manually convert each Page. No automatic converter is available.\nDiscover tools and recipes on demand. Read scripts/README.md for version-bound\npre-deploy and hosted QA tools. Follow workflows/design.md for layout defaults.\n\n## Project rules and search strategy\n\nRecord the owner's preferences and durable constraints in brief/rules.md; put\napproved search intent, topic coverage and URL/indexing strategy in brief/seo.md.\nThese are project decisions, not CMS settings or permission to publish. If a\nrequest conflicts with an agreed rule, ask and record the resulting decision.\nUse workflows/README.md to find the relevant routine, not load every recipe.\n\n## Everyday requests\n\n- Links, images, menus, settings, analytics and site-wide changes: read the\n tr-edit-site recipe. Shared content becomes one global block, not N edits.\n- FAQ, recipe and event pages: add_faq_schema, add_recipe_schema and\n add_event_schema build validated JSON-LD (see tr-seo); don't hand-write it.\n- A blank site or the starter design: tr-starter-design lists its variables.\n- The portal's built-in AI is optional. When an AI workflow (site planning,\n content generation or improvement, schema markup) reports ai_not_enabled,\n do the work yourself with the recipe it names and say so; don't retry.\n\nStore credentials in the client's private settings or injected environment.\nRun the workspace doctor after setup and after changing the binding.\n";
|
|
18
|
+
export declare const workspaceTemplates: Record<string, string>;
|
|
19
|
+
export declare function readWorkspace(dir: string): Promise<Workspace>;
|
|
20
|
+
/** Reject linked destinations, including linked ancestor folders inside the workspace. */
|
|
21
|
+
export declare function safeDestination(dir: string, relative: string): Promise<string>;
|
|
22
|
+
export declare function writeWorkspaceFiles(dir: string, templates: Record<string, string>, update: boolean): Promise<{
|
|
23
|
+
path: string;
|
|
24
|
+
action: "created" | "updated" | "kept" | "modified";
|
|
25
|
+
}[]>;
|
|
26
|
+
/** The hosted Typeroll Cloud portal: the only origin trusted from typeroll.json alone. */
|
|
27
|
+
export declare const OFFICIAL_PORTAL_ORIGIN = "https://app.typeroll.com";
|
|
28
|
+
/** Raised before any credential is sent when the committed portal is not confirmed by the environment. */
|
|
29
|
+
export declare class UntrustedPortalError extends Error {
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* typeroll.json is committed and can be changed by anyone who can open a pull
|
|
33
|
+
* request, so its portal alone never receives the injected API key. Another
|
|
34
|
+
* origin must be confirmed through the private TYPEROLL_API_URL setting.
|
|
35
|
+
*/
|
|
36
|
+
export declare function assertTrustedPortal(config: Workspace, env: NodeJS.ProcessEnv): void;
|
|
37
|
+
export declare function workspaceClient(config: Workspace, env: NodeJS.ProcessEnv, fetchImpl?: typeof fetch): TyperollClient;
|
|
38
|
+
export declare function verifyWorkspaceBinding(config: Workspace, client: TyperollClient): Promise<void>;
|
|
39
|
+
export declare function doctor(dir: string, offline: boolean, env?: NodeJS.ProcessEnv, fetchImpl?: typeof fetch): Promise<{
|
|
40
|
+
passed: boolean;
|
|
41
|
+
generator_version: string;
|
|
42
|
+
checks: {
|
|
43
|
+
check: string;
|
|
44
|
+
status: "passed" | "required" | "not_checked";
|
|
45
|
+
message: string;
|
|
46
|
+
}[];
|
|
47
|
+
}>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typeroll/mcp-server",
|
|
3
3
|
"mcpName": "io.github.Typeroll/typeroll",
|
|
4
|
-
"version": "0.45.
|
|
4
|
+
"version": "0.45.160",
|
|
5
5
|
"description": "Typeroll CMS MCP server \u2013 connect AI agents to the REST API to manage content and publish static websites.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -18,13 +18,34 @@
|
|
|
18
18
|
},
|
|
19
19
|
"main": "./dist/index.js",
|
|
20
20
|
"exports": {
|
|
21
|
-
".":
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"./
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"default": "./dist/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./server": {
|
|
26
|
+
"types": "./dist/server.d.ts",
|
|
27
|
+
"default": "./dist/server.js"
|
|
28
|
+
},
|
|
29
|
+
"./client": {
|
|
30
|
+
"types": "./dist/client.d.ts",
|
|
31
|
+
"default": "./dist/client.js"
|
|
32
|
+
},
|
|
33
|
+
"./version": {
|
|
34
|
+
"types": "./dist/version.d.ts",
|
|
35
|
+
"default": "./dist/version.js"
|
|
36
|
+
},
|
|
37
|
+
"./tools/helpers": {
|
|
38
|
+
"types": "./dist/tools/helpers.d.ts",
|
|
39
|
+
"default": "./dist/tools/helpers.js"
|
|
40
|
+
},
|
|
41
|
+
"./structured-data": {
|
|
42
|
+
"types": "./dist/structured-data.d.ts",
|
|
43
|
+
"default": "./dist/structured-data.js"
|
|
44
|
+
},
|
|
45
|
+
"./bundled-content": {
|
|
46
|
+
"types": "./dist/bundled-content.d.ts",
|
|
47
|
+
"default": "./dist/bundled-content.js"
|
|
48
|
+
}
|
|
28
49
|
},
|
|
29
50
|
"files": [
|
|
30
51
|
"dist",
|
package/skills/tr-forms.md
CHANGED
|
@@ -119,6 +119,11 @@ update_form form_id=contact patch={ actions: [
|
|
|
119
119
|
] }
|
|
120
120
|
```
|
|
121
121
|
|
|
122
|
+
`include_all` appends every submitted value only to emails with fixed
|
|
123
|
+
recipients. An email whose `to`, `cc` or `bcc` uses a `{{field}}` (the
|
|
124
|
+
confirmation above) contains only its own subject and body; put the values it
|
|
125
|
+
should show in the body as `{{field}}` placeholders.
|
|
126
|
+
|
|
122
127
|
An email action with `trigger: "partial_abandoned"` and `after_hours: 2` is
|
|
123
128
|
sent once for a multi-step submission that stopped part-way and has not moved
|
|
124
129
|
on for two hours (never for completed ones) — opt-in follow-up on leads who
|
package/skills/tr-images.md
CHANGED
|
@@ -108,12 +108,11 @@ curl --fail-with-body -sS -X PUT -H "Content-Type: image/png" \
|
|
|
108
108
|
Send the same `Content-Type` used to request the upload URL. Do not attach your
|
|
109
109
|
Typeroll API key or copy the URL's signing query parameters into headers.
|
|
110
110
|
|
|
111
|
-
> The
|
|
112
|
-
>
|
|
113
|
-
>
|
|
114
|
-
>
|
|
115
|
-
>
|
|
116
|
-
> `--data-binary` the file at the URL.
|
|
111
|
+
> The signature binds `host`, `content-type` and `content-length`: the
|
|
112
|
+
> PUT must send the requested `Content-Type` and exactly `size` bytes,
|
|
113
|
+
> or storage answers `403 SignatureDoesNotMatch`. `curl --data-binary`
|
|
114
|
+
> and `fetch` set `Content-Length` from the body. Do not send the URL's
|
|
115
|
+
> `x-amz-*` query parameters as request headers.
|
|
117
116
|
|
|
118
117
|
Or from JS (Claude Code can run a one-line script):
|
|
119
118
|
|