@polyxd/mcp 0.4.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/LICENSE +202 -0
- package/NOTICE +224 -0
- package/README.md +151 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +13 -0
- package/dist/bin.js.map +1 -0
- package/dist/check.d.ts +49 -0
- package/dist/check.js +214 -0
- package/dist/check.js.map +1 -0
- package/dist/http.d.ts +34 -0
- package/dist/http.js +198 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/output-schemas.d.ts +376 -0
- package/dist/output-schemas.js +186 -0
- package/dist/output-schemas.js.map +1 -0
- package/dist/packs.generated.d.ts +11 -0
- package/dist/packs.generated.js +178 -0
- package/dist/packs.generated.js.map +1 -0
- package/dist/prompt.d.ts +14 -0
- package/dist/prompt.generated.d.ts +2 -0
- package/dist/prompt.generated.js +4 -0
- package/dist/prompt.generated.js.map +1 -0
- package/dist/prompt.js +31 -0
- package/dist/prompt.js.map +1 -0
- package/dist/server.d.ts +56 -0
- package/dist/server.js +256 -0
- package/dist/server.js.map +1 -0
- package/dist/spec-files.generated.d.ts +3 -0
- package/dist/spec-files.generated.js +159 -0
- package/dist/spec-files.generated.js.map +1 -0
- package/dist/spec.d.ts +26 -0
- package/dist/spec.js +40 -0
- package/dist/spec.js.map +1 -0
- package/dist/view-file.d.ts +2 -0
- package/dist/view-file.js +16 -0
- package/dist/view-file.js.map +1 -0
- package/dist/view.html +33 -0
- package/package.json +61 -0
package/dist/server.js
ADDED
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Polyxd MCP server. The host's model is the generator: these tools give it the spec, check
|
|
3
|
+
* what it wrote, and show the result to the user as an MCP App (SEP-1865, `io.modelcontextprotocol/ui`).
|
|
4
|
+
*
|
|
5
|
+
* Nothing here touches the file system or Node's APIs, so the same server runs over stdio in Node
|
|
6
|
+
* (src/bin.ts) and over Streamable HTTP in a Cloudflare Worker (src/http.ts, apps/mcp). Where the
|
|
7
|
+
* MCP App's page comes from is the caller's business: src/view-file.ts reads it from dist/view.html,
|
|
8
|
+
* and the Worker bundles it as text.
|
|
9
|
+
*/
|
|
10
|
+
import { McpServer, fromJsonSchema } from "@modelcontextprotocol/server";
|
|
11
|
+
import { formatValidation, formatVerify, validate, verify, withData } from "./check.js";
|
|
12
|
+
import { guide, SPEC_VERSION } from "./prompt.js";
|
|
13
|
+
import { PACKS } from "./packs.generated.js";
|
|
14
|
+
import { componentDefinitions, componentNamed, exampleDirections, exampleDocuments } from "./spec.js";
|
|
15
|
+
import { componentsOutput, guideOutput, packsOutput, showOutput, validateOutput, verifyOutput } from "./output-schemas.js";
|
|
16
|
+
export const VERSION = "0.4.0";
|
|
17
|
+
/** The MCP App resource every shown screen renders in. */
|
|
18
|
+
export const VIEW_URI = "ui://polyxd/surface.html";
|
|
19
|
+
/** MCP Apps' HTML profile. */
|
|
20
|
+
export const VIEW_MIME_TYPE = "text/html;profile=mcp-app";
|
|
21
|
+
export const DEFAULT_PACK = "material3";
|
|
22
|
+
/** The origin ChatGPT gives the MCP App's sandbox (`openai/widgetDomain`): unique to this app. */
|
|
23
|
+
export const WIDGET_DOMAIN = "https://mcp.polyxd.com";
|
|
24
|
+
const text = (t) => [{ type: "text", text: t }];
|
|
25
|
+
const packNames = PACKS.map((p) => p.name);
|
|
26
|
+
/** Lower case, letters and digits only: "IBM Carbon" → "ibmcarbon", "GOV.UK" → "govuk". */
|
|
27
|
+
const squash = (s) => s.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
28
|
+
const VENDORS = /^(google|ibm|microsoft|shopify|github|adobe)\s+/i;
|
|
29
|
+
/**
|
|
30
|
+
* The pack a model means. Models write what people say ("Carbon", "shadcn/ui", "Material 3", "IBM
|
|
31
|
+
* Carbon") as often as the pack's id, and an id-only enum made hosts drop the argument and fall back
|
|
32
|
+
* to the default. Exact names first, then a display name with or without its vendor and version, then
|
|
33
|
+
* an unambiguous prefix. Unknown names are an error, never a silent default.
|
|
34
|
+
*/
|
|
35
|
+
export function resolvePack(input) {
|
|
36
|
+
const q = squash(input);
|
|
37
|
+
if (!q)
|
|
38
|
+
return undefined;
|
|
39
|
+
const keys = (p) => {
|
|
40
|
+
const display = p.displayName.split(/\s+on\s+/i)[0];
|
|
41
|
+
const bare = display.replace(VENDORS, "");
|
|
42
|
+
return [p.name, display, bare, bare.replace(/\s*\d+$/, ""), display.replace(/\s*\d+$/, "")].map(squash);
|
|
43
|
+
};
|
|
44
|
+
const exact = PACKS.filter((p) => keys(p).includes(q));
|
|
45
|
+
if (exact.length === 1)
|
|
46
|
+
return exact[0];
|
|
47
|
+
// A leading part of a name ("mater", "shad"), never a longer one: "bootstrap4" is not Bootstrap 5.
|
|
48
|
+
const near = PACKS.filter((p) => keys(p).some((k) => q.length >= 4 && k.startsWith(q)));
|
|
49
|
+
return near.length === 1 ? near[0] : undefined;
|
|
50
|
+
}
|
|
51
|
+
const documentSchema = {
|
|
52
|
+
type: "object",
|
|
53
|
+
description: "A Polyxd UI document: {specVersion, surface, root, components, data?}. polyxd_guide explains the format.",
|
|
54
|
+
additionalProperties: true,
|
|
55
|
+
};
|
|
56
|
+
const dataSchema = {
|
|
57
|
+
type: "object",
|
|
58
|
+
description: "The values the screen shows, bound by {\"path\": \"/pointer\"}. Replaces the document's own \"data\" when given.",
|
|
59
|
+
additionalProperties: true,
|
|
60
|
+
};
|
|
61
|
+
const INSTRUCTIONS = `Polyxd turns a small JSON document of meaning into a real screen in a design system. You write the document; this server checks it and shows it to the user. Call polyxd_guide once before writing your first document, polyxd_validate until it is valid, then polyxd_show. Actions the user takes in a shown screen come back to you as chat messages. A button press only tells you what the user chose: it submits, pays or saves nothing, so never say it did.`;
|
|
62
|
+
/**
|
|
63
|
+
* The MCP App resource's `_meta`, for Claude and ChatGPT alike. The page loads nothing from anywhere
|
|
64
|
+
* (renderer, styles and themes are inlined), so its Content Security Policy allows no origins at all.
|
|
65
|
+
* `ui.domain` is left out on purpose: each host wants its own format there (Claude a hash of the
|
|
66
|
+
* connector URL, ChatGPT an origin), and a value in the wrong one stops Claude rendering the app.
|
|
67
|
+
* ChatGPT takes its origin from `openai/widgetDomain` instead, which Claude ignores.
|
|
68
|
+
*/
|
|
69
|
+
export function appResourceMeta(widgetDomain = WIDGET_DOMAIN) {
|
|
70
|
+
return {
|
|
71
|
+
ui: { prefersBorder: true, csp: { connectDomains: [], resourceDomains: [] } },
|
|
72
|
+
"openai/widgetDescription": "An interactive screen the assistant wrote as a Polyxd document, drawn in a design-system pack. Pressing an action in it sends the assistant a chat message naming the action and what the user entered.",
|
|
73
|
+
"openai/widgetPrefersBorder": true,
|
|
74
|
+
"openai/widgetCSP": { connect_domains: [], resource_domains: [] },
|
|
75
|
+
"openai/widgetDomain": widgetDomain,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Every tool is a pure function of its arguments: it reads nothing but the spec, writes nothing,
|
|
80
|
+
* reaches no other system and gives the same answer twice. The annotations say so, with the title
|
|
81
|
+
* repeated inside them for hosts that read it only there.
|
|
82
|
+
*/
|
|
83
|
+
const readOnly = (title) => ({ title, readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false });
|
|
84
|
+
export function createServer(options) {
|
|
85
|
+
const server = new McpServer({
|
|
86
|
+
name: "polyxd",
|
|
87
|
+
title: "Polyxd",
|
|
88
|
+
version: VERSION,
|
|
89
|
+
websiteUrl: "https://polyxd.com/docs/mcp/",
|
|
90
|
+
icons: [{ src: "https://polyxd.com/icon-512.png", mimeType: "image/png", sizes: ["512x512"] }],
|
|
91
|
+
}, { instructions: INSTRUCTIONS });
|
|
92
|
+
server.registerTool("polyxd_guide", {
|
|
93
|
+
title: "Polyxd guide",
|
|
94
|
+
description: "Returns the instructions for writing a Polyxd UI document: the document shape, the rules for generated screens, bindings, actions, every component with its props, and the patterns. Call this once before writing your first document.",
|
|
95
|
+
inputSchema: fromJsonSchema({ type: "object", properties: {} }),
|
|
96
|
+
outputSchema: fromJsonSchema(guideOutput),
|
|
97
|
+
annotations: readOnly("Polyxd guide"),
|
|
98
|
+
}, async () => {
|
|
99
|
+
const g = guide();
|
|
100
|
+
return { content: text(g), structuredContent: { specVersion: SPEC_VERSION, guide: g } };
|
|
101
|
+
});
|
|
102
|
+
server.registerTool("polyxd_validate", {
|
|
103
|
+
title: "Validate a Polyxd document",
|
|
104
|
+
description: "Checks a Polyxd UI document against the spec: the schema, ids and references, bindings against the data, actions, and the rules for generated screens. Returns every issue with its JSON Pointer, the component it is in, and a hint saying what to change. Call it after writing or changing a document, and fix every error before showing it.",
|
|
105
|
+
inputSchema: fromJsonSchema({
|
|
106
|
+
type: "object",
|
|
107
|
+
properties: { document: documentSchema, data: dataSchema },
|
|
108
|
+
required: ["document"],
|
|
109
|
+
}),
|
|
110
|
+
outputSchema: fromJsonSchema(validateOutput),
|
|
111
|
+
annotations: readOnly("Validate a Polyxd document"),
|
|
112
|
+
}, async ({ document, data }) => {
|
|
113
|
+
const report = validate(document, data);
|
|
114
|
+
return { content: text(formatValidation(report)), structuredContent: { ...report } };
|
|
115
|
+
});
|
|
116
|
+
server.registerTool("polyxd_verify", {
|
|
117
|
+
title: "Verify a Polyxd document",
|
|
118
|
+
description: `Runs the Polyxd verifier's document checks: the spec validator, the pattern the surface declares, readable and distinct labels, one primary action per view, at most six inputs per view, entity-first flows, confirmations, and, when you pass one, a Design Direction's rules and voice. Returns a compact report. Example directions by name: ${exampleDirections().map((d) => d.name).join(", ")}.`,
|
|
119
|
+
inputSchema: fromJsonSchema({
|
|
120
|
+
type: "object",
|
|
121
|
+
properties: {
|
|
122
|
+
document: documentSchema,
|
|
123
|
+
data: dataSchema,
|
|
124
|
+
direction: {
|
|
125
|
+
description: "A Design Direction to hold the document to: the direction object, or the name of an example direction.",
|
|
126
|
+
oneOf: [{ type: "string" }, { type: "object", additionalProperties: true }],
|
|
127
|
+
},
|
|
128
|
+
registry: {
|
|
129
|
+
type: "object",
|
|
130
|
+
description: "A capability registry ({capabilities: [...]}) to check the document's actions against. Leave out when there is none.",
|
|
131
|
+
additionalProperties: true,
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
required: ["document"],
|
|
135
|
+
}),
|
|
136
|
+
outputSchema: fromJsonSchema(verifyOutput),
|
|
137
|
+
annotations: readOnly("Verify a Polyxd document"),
|
|
138
|
+
}, async ({ document, data, direction, registry }) => {
|
|
139
|
+
try {
|
|
140
|
+
const report = verify(document, { data, direction, registry });
|
|
141
|
+
return { content: text(formatVerify(report)), structuredContent: { ...report } };
|
|
142
|
+
}
|
|
143
|
+
catch (e) {
|
|
144
|
+
return { isError: true, content: text(e.message) };
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
server.registerTool("polyxd_show", {
|
|
148
|
+
title: "Show a Polyxd screen",
|
|
149
|
+
description: `Validates a Polyxd UI document and shows it to the user as an interactive screen, drawn by the Polyxd renderer in the design-system pack you choose (default ${DEFAULT_PACK}). Shows nothing if the document has errors; fix them first with polyxd_validate. When the user presses an action in the screen, you receive a chat message from the user naming the action and its context; that only tells you their choice, and nothing has been submitted or paid. Packs: ${packNames.join(", ")}.`,
|
|
150
|
+
inputSchema: fromJsonSchema({
|
|
151
|
+
type: "object",
|
|
152
|
+
properties: {
|
|
153
|
+
document: documentSchema,
|
|
154
|
+
data: dataSchema,
|
|
155
|
+
pack: { type: "string", description: `The design-system pack to draw the screen in, by id: ${packNames.join(", ")}. Names like "Carbon" or "shadcn/ui" work too. Pass it whenever the user names a design system. Default ${DEFAULT_PACK}.` },
|
|
156
|
+
mode: { type: "string", enum: ["light", "dark"], description: "Light or dark. Leave out to follow the host's theme." },
|
|
157
|
+
},
|
|
158
|
+
required: ["document"],
|
|
159
|
+
}),
|
|
160
|
+
outputSchema: fromJsonSchema(showOutput),
|
|
161
|
+
annotations: readOnly("Show a Polyxd screen"),
|
|
162
|
+
_meta: {
|
|
163
|
+
ui: { resourceUri: VIEW_URI },
|
|
164
|
+
// The flat key is the deprecated form; the official ext-apps helper still sets both, for hosts that read only it.
|
|
165
|
+
"ui/resourceUri": VIEW_URI,
|
|
166
|
+
// ChatGPT honours ui.resourceUri; these are its compatibility alias and its status lines while the tool runs.
|
|
167
|
+
"openai/outputTemplate": VIEW_URI,
|
|
168
|
+
"openai/toolInvocation/invoking": "Drawing the screen",
|
|
169
|
+
"openai/toolInvocation/invoked": "Screen shown",
|
|
170
|
+
},
|
|
171
|
+
}, async ({ document, data, pack = DEFAULT_PACK, mode }) => {
|
|
172
|
+
const chosen = resolvePack(pack);
|
|
173
|
+
if (!chosen)
|
|
174
|
+
return { isError: true, content: text(`No pack named "${pack}". Packs: ${packNames.join(", ")}. Ask the user which to use, or pick the nearest and say so.`) };
|
|
175
|
+
const report = validate(document, data);
|
|
176
|
+
const meta = { ui: { resourceUri: VIEW_URI } };
|
|
177
|
+
if (!report.valid) {
|
|
178
|
+
return {
|
|
179
|
+
isError: true,
|
|
180
|
+
content: text(`Not shown. ${formatValidation(report)}`),
|
|
181
|
+
structuredContent: { shown: false, issues: report.issues },
|
|
182
|
+
_meta: meta,
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
const doc = withData(document, data);
|
|
186
|
+
const title = doc.surface?.title ?? doc.surface?.id ?? "the screen";
|
|
187
|
+
const others = packNames.filter((n) => n !== chosen.name).join(", ");
|
|
188
|
+
const summary = [
|
|
189
|
+
`Showing "${title}" to the user in ${chosen.displayName} (pack "${chosen.name}")${mode ? `, ${mode} mode` : ""}.`,
|
|
190
|
+
report.warnings ? `${report.warnings} warning${report.warnings === 1 ? "" : "s"}: ${report.issues.map((i) => `${i.pointer}: ${i.message}`).join("; ")}.` : "",
|
|
191
|
+
"When the user presses an action, it arrives as a chat message from the user naming the action and its context.",
|
|
192
|
+
`Other packs: ${others}.`,
|
|
193
|
+
]
|
|
194
|
+
.filter(Boolean)
|
|
195
|
+
.join("\n");
|
|
196
|
+
return {
|
|
197
|
+
content: text(summary),
|
|
198
|
+
structuredContent: { shown: true, document: doc, pack: chosen.name, packName: chosen.displayName, ...(mode ? { mode } : {}), specVersion: SPEC_VERSION },
|
|
199
|
+
_meta: meta,
|
|
200
|
+
};
|
|
201
|
+
});
|
|
202
|
+
server.registerTool("polyxd_packs", {
|
|
203
|
+
title: "List Polyxd packs",
|
|
204
|
+
description: "Lists the design-system packs polyxd_show can draw a screen in: published design systems (Material 3, Carbon, GOV.UK and others) and original templates. The same document looks native in each.",
|
|
205
|
+
inputSchema: fromJsonSchema({ type: "object", properties: {} }),
|
|
206
|
+
outputSchema: fromJsonSchema(packsOutput),
|
|
207
|
+
annotations: readOnly("List Polyxd packs"),
|
|
208
|
+
}, async () => {
|
|
209
|
+
const line = (p) => `- ${p.name}: ${p.displayName}${p.name === DEFAULT_PACK ? " (default)" : ""}. ${p.description}.`;
|
|
210
|
+
const systems = PACKS.filter((p) => !p.template);
|
|
211
|
+
const templates = PACKS.filter((p) => p.template);
|
|
212
|
+
return {
|
|
213
|
+
content: text([`Design systems (${systems.length}):`, ...systems.map(line), "", `Templates (${templates.length}):`, ...templates.map(line)].join("\n")),
|
|
214
|
+
structuredContent: { default: DEFAULT_PACK, packs: PACKS },
|
|
215
|
+
};
|
|
216
|
+
});
|
|
217
|
+
server.registerTool("polyxd_components", {
|
|
218
|
+
title: "List Polyxd components",
|
|
219
|
+
description: "Lists the semantic components a Polyxd document can use, with a one-line summary each. Pass \"name\" for one component's full definition: every prop and its type, which are required, when to use it and when not to, and how it renders.",
|
|
220
|
+
inputSchema: fromJsonSchema({
|
|
221
|
+
type: "object",
|
|
222
|
+
properties: { name: { type: "string", description: "A component name, e.g. \"Choice\", for its full definition." } },
|
|
223
|
+
}),
|
|
224
|
+
outputSchema: fromJsonSchema(componentsOutput),
|
|
225
|
+
annotations: readOnly("List Polyxd components"),
|
|
226
|
+
}, async ({ name }) => {
|
|
227
|
+
if (name) {
|
|
228
|
+
const def = componentNamed(name);
|
|
229
|
+
if (!def)
|
|
230
|
+
return { isError: true, content: text(`No component named "${name}". Components: ${componentDefinitions().map((c) => c.name).join(", ")}.`) };
|
|
231
|
+
return { content: text(JSON.stringify(def, null, 2)), structuredContent: { component: def } };
|
|
232
|
+
}
|
|
233
|
+
const all = componentDefinitions();
|
|
234
|
+
const rows = all.filter((c) => !c.shell).map((c) => `- ${c.name} (${c.category}): ${c.summary}`);
|
|
235
|
+
const shell = all.filter((c) => c.shell).map((c) => c.name);
|
|
236
|
+
return {
|
|
237
|
+
content: text([`${rows.length} components for generated screens:`, ...rows, "", `Shell components, authored once per product and never generated: ${shell.join(", ")}.`].join("\n")),
|
|
238
|
+
structuredContent: { components: all.map((c) => ({ name: c.name, category: c.category, summary: c.summary, shell: c.shell === true })) },
|
|
239
|
+
};
|
|
240
|
+
});
|
|
241
|
+
// The MCP App: one page for every shown screen, the document arriving in the tool result.
|
|
242
|
+
const viewMeta = appResourceMeta(options.widgetDomain ?? WIDGET_DOMAIN);
|
|
243
|
+
server.registerResource("polyxd-surface", VIEW_URI, {
|
|
244
|
+
title: "Polyxd screen",
|
|
245
|
+
description: "Renders a Polyxd UI document with the Polyxd Web Components renderer in any design-system pack, and sends the user's actions back to the chat.",
|
|
246
|
+
mimeType: VIEW_MIME_TYPE,
|
|
247
|
+
_meta: viewMeta,
|
|
248
|
+
}, async (uri) => ({ contents: [{ uri: uri.href, mimeType: VIEW_MIME_TYPE, text: await options.viewHtml(), _meta: viewMeta }] }));
|
|
249
|
+
for (const ex of [...exampleDocuments(), ...exampleDirections()]) {
|
|
250
|
+
server.registerResource(ex.name, ex.uri, { title: ex.title, description: ex.description, mimeType: "application/json" }, async (uri) => ({
|
|
251
|
+
contents: [{ uri: uri.href, mimeType: "application/json", text: ex.json }],
|
|
252
|
+
}));
|
|
253
|
+
}
|
|
254
|
+
return server;
|
|
255
|
+
}
|
|
256
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1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,CAAC,gBAAgB,CACrB,gBAAgB,EAChB,QAAQ,EACR;QACE,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,gJAAgJ;QAC7J,QAAQ,EAAE,cAAc;QACxB,KAAK,EAAE,QAAQ;KAChB,EACD,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAC9H,CAAC;IAEF,KAAK,MAAM,EAAE,IAAI,CAAC,GAAG,gBAAgB,EAAE,EAAE,GAAG,iBAAiB,EAAE,CAAC,EAAE,CAAC;QACjE,MAAM,CAAC,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE,CAAC,WAAW,EAAE,QAAQ,EAAE,kBAAkB,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;YACvI,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,kBAAkB,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;SAC3E,CAAC,CAAC,CAAC;IACN,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
// Generated by scripts/sync.ts from @polyxd/spec's components/ and examples/. Do not edit.
|
|
2
|
+
// Imported as JSON modules rather than read from disk, so the server runs where there is no file system.
|
|
3
|
+
import c0 from "@polyxd/spec/components/Action.json" with { type: "json" };
|
|
4
|
+
import c1 from "@polyxd/spec/components/ActionBar.json" with { type: "json" };
|
|
5
|
+
import c2 from "@polyxd/spec/components/ActionMenu.json" with { type: "json" };
|
|
6
|
+
import c3 from "@polyxd/spec/components/AppBar.json" with { type: "json" };
|
|
7
|
+
import c4 from "@polyxd/spec/components/Card.json" with { type: "json" };
|
|
8
|
+
import c5 from "@polyxd/spec/components/Chart.json" with { type: "json" };
|
|
9
|
+
import c6 from "@polyxd/spec/components/Choice.json" with { type: "json" };
|
|
10
|
+
import c7 from "@polyxd/spec/components/Code.json" with { type: "json" };
|
|
11
|
+
import c8 from "@polyxd/spec/components/CodeInput.json" with { type: "json" };
|
|
12
|
+
import c9 from "@polyxd/spec/components/Collection.json" with { type: "json" };
|
|
13
|
+
import c10 from "@polyxd/spec/components/ColorInput.json" with { type: "json" };
|
|
14
|
+
import c11 from "@polyxd/spec/components/Columns.json" with { type: "json" };
|
|
15
|
+
import c12 from "@polyxd/spec/components/Comparison.json" with { type: "json" };
|
|
16
|
+
import c13 from "@polyxd/spec/components/Confirm.json" with { type: "json" };
|
|
17
|
+
import c14 from "@polyxd/spec/components/Custom.json" with { type: "json" };
|
|
18
|
+
import c15 from "@polyxd/spec/components/DateInput.json" with { type: "json" };
|
|
19
|
+
import c16 from "@polyxd/spec/components/DetailList.json" with { type: "json" };
|
|
20
|
+
import c17 from "@polyxd/spec/components/Disclosure.json" with { type: "json" };
|
|
21
|
+
import c18 from "@polyxd/spec/components/FileInput.json" with { type: "json" };
|
|
22
|
+
import c19 from "@polyxd/spec/components/FilterPanel.json" with { type: "json" };
|
|
23
|
+
import c20 from "@polyxd/spec/components/Footer.json" with { type: "json" };
|
|
24
|
+
import c21 from "@polyxd/spec/components/Form.json" with { type: "json" };
|
|
25
|
+
import c22 from "@polyxd/spec/components/Frame.json" with { type: "json" };
|
|
26
|
+
import c23 from "@polyxd/spec/components/Group.json" with { type: "json" };
|
|
27
|
+
import c24 from "@polyxd/spec/components/Identity.json" with { type: "json" };
|
|
28
|
+
import c25 from "@polyxd/spec/components/Media.json" with { type: "json" };
|
|
29
|
+
import c26 from "@polyxd/spec/components/Metric.json" with { type: "json" };
|
|
30
|
+
import c27 from "@polyxd/spec/components/Navigation.json" with { type: "json" };
|
|
31
|
+
import c28 from "@polyxd/spec/components/Outlet.json" with { type: "json" };
|
|
32
|
+
import c29 from "@polyxd/spec/components/Panel.json" with { type: "json" };
|
|
33
|
+
import c30 from "@polyxd/spec/components/Progress.json" with { type: "json" };
|
|
34
|
+
import c31 from "@polyxd/spec/components/RangeInput.json" with { type: "json" };
|
|
35
|
+
import c32 from "@polyxd/spec/components/Rating.json" with { type: "json" };
|
|
36
|
+
import c33 from "@polyxd/spec/components/Section.json" with { type: "json" };
|
|
37
|
+
import c34 from "@polyxd/spec/components/Split.json" with { type: "json" };
|
|
38
|
+
import c35 from "@polyxd/spec/components/Status.json" with { type: "json" };
|
|
39
|
+
import c36 from "@polyxd/spec/components/Steps.json" with { type: "json" };
|
|
40
|
+
import c37 from "@polyxd/spec/components/Table.json" with { type: "json" };
|
|
41
|
+
import c38 from "@polyxd/spec/components/Tag.json" with { type: "json" };
|
|
42
|
+
import c39 from "@polyxd/spec/components/Text.json" with { type: "json" };
|
|
43
|
+
import c40 from "@polyxd/spec/components/TextInput.json" with { type: "json" };
|
|
44
|
+
import c41 from "@polyxd/spec/components/Toggle.json" with { type: "json" };
|
|
45
|
+
import c42 from "@polyxd/spec/components/Tree.json" with { type: "json" };
|
|
46
|
+
import c43 from "@polyxd/spec/components/Views.json" with { type: "json" };
|
|
47
|
+
import e0 from "@polyxd/spec/examples/calendar-find-slot.json" with { type: "json" };
|
|
48
|
+
import e1 from "@polyxd/spec/examples/crm-account-record.json" with { type: "json" };
|
|
49
|
+
import e2 from "@polyxd/spec/examples/crm-accounts-list.json" with { type: "json" };
|
|
50
|
+
import e3 from "@polyxd/spec/examples/crm-cancel-subscription.json" with { type: "json" };
|
|
51
|
+
import e4 from "@polyxd/spec/examples/error-load-failed.json" with { type: "json" };
|
|
52
|
+
import e5 from "@polyxd/spec/examples/files-move-to-folder.json" with { type: "json" };
|
|
53
|
+
import e6 from "@polyxd/spec/examples/money-balance-overview.json" with { type: "json" };
|
|
54
|
+
import e7 from "@polyxd/spec/examples/money-budget-settings.json" with { type: "json" };
|
|
55
|
+
import e8 from "@polyxd/spec/examples/money-send-confirm.json" with { type: "json" };
|
|
56
|
+
import e9 from "@polyxd/spec/examples/money-send-form.json" with { type: "json" };
|
|
57
|
+
import e10 from "@polyxd/spec/examples/personal-habits.json" with { type: "json" };
|
|
58
|
+
import e11 from "@polyxd/spec/examples/personal-reading-log.json" with { type: "json" };
|
|
59
|
+
import e12 from "@polyxd/spec/examples/settings-api-keys.json" with { type: "json" };
|
|
60
|
+
import e13 from "@polyxd/spec/examples/settings-delete-account.json" with { type: "json" };
|
|
61
|
+
import e14 from "@polyxd/spec/examples/settings-notifications.json" with { type: "json" };
|
|
62
|
+
import e15 from "@polyxd/spec/examples/shell-product.json" with { type: "json" };
|
|
63
|
+
import e16 from "@polyxd/spec/examples/shop-browse-filter.json" with { type: "json" };
|
|
64
|
+
import e17 from "@polyxd/spec/examples/shop-checkout.json" with { type: "json" };
|
|
65
|
+
import e18 from "@polyxd/spec/examples/shop-compare-plans.json" with { type: "json" };
|
|
66
|
+
import e19 from "@polyxd/spec/examples/shop-order-status.json" with { type: "json" };
|
|
67
|
+
import e20 from "@polyxd/spec/examples/storage-usage.json" with { type: "json" };
|
|
68
|
+
import e21 from "@polyxd/spec/examples/tasks-add.json" with { type: "json" };
|
|
69
|
+
import e22 from "@polyxd/spec/examples/tasks-archive.json" with { type: "json" };
|
|
70
|
+
import e23 from "@polyxd/spec/examples/tasks-delete-project.json" with { type: "json" };
|
|
71
|
+
import e24 from "@polyxd/spec/examples/tasks-list.json" with { type: "json" };
|
|
72
|
+
import e25 from "@polyxd/spec/examples/team-members.json" with { type: "json" };
|
|
73
|
+
import e26 from "@polyxd/spec/examples/travel-booking-review.json" with { type: "json" };
|
|
74
|
+
import e27 from "@polyxd/spec/examples/travel-flight-results.json" with { type: "json" };
|
|
75
|
+
import e28 from "@polyxd/spec/examples/travel-trip-overview.json" with { type: "json" };
|
|
76
|
+
import d0 from "@polyxd/spec/examples/directions/calm-finance.json" with { type: "json" };
|
|
77
|
+
import d1 from "@polyxd/spec/examples/directions/playful-personal.json" with { type: "json" };
|
|
78
|
+
export const COMPONENT_FILES = [
|
|
79
|
+
["Action.json", c0],
|
|
80
|
+
["ActionBar.json", c1],
|
|
81
|
+
["ActionMenu.json", c2],
|
|
82
|
+
["AppBar.json", c3],
|
|
83
|
+
["Card.json", c4],
|
|
84
|
+
["Chart.json", c5],
|
|
85
|
+
["Choice.json", c6],
|
|
86
|
+
["Code.json", c7],
|
|
87
|
+
["CodeInput.json", c8],
|
|
88
|
+
["Collection.json", c9],
|
|
89
|
+
["ColorInput.json", c10],
|
|
90
|
+
["Columns.json", c11],
|
|
91
|
+
["Comparison.json", c12],
|
|
92
|
+
["Confirm.json", c13],
|
|
93
|
+
["Custom.json", c14],
|
|
94
|
+
["DateInput.json", c15],
|
|
95
|
+
["DetailList.json", c16],
|
|
96
|
+
["Disclosure.json", c17],
|
|
97
|
+
["FileInput.json", c18],
|
|
98
|
+
["FilterPanel.json", c19],
|
|
99
|
+
["Footer.json", c20],
|
|
100
|
+
["Form.json", c21],
|
|
101
|
+
["Frame.json", c22],
|
|
102
|
+
["Group.json", c23],
|
|
103
|
+
["Identity.json", c24],
|
|
104
|
+
["Media.json", c25],
|
|
105
|
+
["Metric.json", c26],
|
|
106
|
+
["Navigation.json", c27],
|
|
107
|
+
["Outlet.json", c28],
|
|
108
|
+
["Panel.json", c29],
|
|
109
|
+
["Progress.json", c30],
|
|
110
|
+
["RangeInput.json", c31],
|
|
111
|
+
["Rating.json", c32],
|
|
112
|
+
["Section.json", c33],
|
|
113
|
+
["Split.json", c34],
|
|
114
|
+
["Status.json", c35],
|
|
115
|
+
["Steps.json", c36],
|
|
116
|
+
["Table.json", c37],
|
|
117
|
+
["Tag.json", c38],
|
|
118
|
+
["Text.json", c39],
|
|
119
|
+
["TextInput.json", c40],
|
|
120
|
+
["Toggle.json", c41],
|
|
121
|
+
["Tree.json", c42],
|
|
122
|
+
["Views.json", c43],
|
|
123
|
+
];
|
|
124
|
+
export const EXAMPLE_FILES = [
|
|
125
|
+
["calendar-find-slot.json", e0],
|
|
126
|
+
["crm-account-record.json", e1],
|
|
127
|
+
["crm-accounts-list.json", e2],
|
|
128
|
+
["crm-cancel-subscription.json", e3],
|
|
129
|
+
["error-load-failed.json", e4],
|
|
130
|
+
["files-move-to-folder.json", e5],
|
|
131
|
+
["money-balance-overview.json", e6],
|
|
132
|
+
["money-budget-settings.json", e7],
|
|
133
|
+
["money-send-confirm.json", e8],
|
|
134
|
+
["money-send-form.json", e9],
|
|
135
|
+
["personal-habits.json", e10],
|
|
136
|
+
["personal-reading-log.json", e11],
|
|
137
|
+
["settings-api-keys.json", e12],
|
|
138
|
+
["settings-delete-account.json", e13],
|
|
139
|
+
["settings-notifications.json", e14],
|
|
140
|
+
["shell-product.json", e15],
|
|
141
|
+
["shop-browse-filter.json", e16],
|
|
142
|
+
["shop-checkout.json", e17],
|
|
143
|
+
["shop-compare-plans.json", e18],
|
|
144
|
+
["shop-order-status.json", e19],
|
|
145
|
+
["storage-usage.json", e20],
|
|
146
|
+
["tasks-add.json", e21],
|
|
147
|
+
["tasks-archive.json", e22],
|
|
148
|
+
["tasks-delete-project.json", e23],
|
|
149
|
+
["tasks-list.json", e24],
|
|
150
|
+
["team-members.json", e25],
|
|
151
|
+
["travel-booking-review.json", e26],
|
|
152
|
+
["travel-flight-results.json", e27],
|
|
153
|
+
["travel-trip-overview.json", e28],
|
|
154
|
+
];
|
|
155
|
+
export const DIRECTION_FILES = [
|
|
156
|
+
["calm-finance.json", d0],
|
|
157
|
+
["playful-personal.json", d1],
|
|
158
|
+
];
|
|
159
|
+
//# sourceMappingURL=spec-files.generated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec-files.generated.js","sourceRoot":"","sources":["../src/spec-files.generated.ts"],"names":[],"mappings":"AAAA,2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E,EAAE,CAAC;CAC9B,CAAC"}
|
package/dist/spec.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface ComponentDefinition {
|
|
2
|
+
name: string;
|
|
3
|
+
category: string;
|
|
4
|
+
summary: string;
|
|
5
|
+
props: Record<string, unknown>;
|
|
6
|
+
required: string[];
|
|
7
|
+
whenToUse: string[];
|
|
8
|
+
whenNotToUse: string[];
|
|
9
|
+
/** Shell components frame a product's screens: authored once, never generated. */
|
|
10
|
+
shell?: boolean;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
}
|
|
13
|
+
export interface Example {
|
|
14
|
+
/** File name without .json, e.g. "tasks-add" */
|
|
15
|
+
name: string;
|
|
16
|
+
uri: string;
|
|
17
|
+
title: string;
|
|
18
|
+
description: string;
|
|
19
|
+
json: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function componentDefinitions(): ComponentDefinition[];
|
|
22
|
+
export declare function componentNamed(name: string): ComponentDefinition | undefined;
|
|
23
|
+
/** The spec's example UI documents, served as polyxd://examples/<name>.json. */
|
|
24
|
+
export declare function exampleDocuments(): Example[];
|
|
25
|
+
/** The spec's example Design Directions, served as polyxd://directions/<name>.json and accepted by name by polyxd_verify. */
|
|
26
|
+
export declare function exampleDirections(): Example[];
|
package/dist/spec.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the server serves from @polyxd/spec: the component definitions, the example documents and
|
|
3
|
+
* the example Design Directions. They arrive as JSON modules (src/spec-files.generated.ts), not
|
|
4
|
+
* from the file system, so the same code runs in Node and in a Cloudflare Worker.
|
|
5
|
+
*/
|
|
6
|
+
import { COMPONENT_FILES, DIRECTION_FILES, EXAMPLE_FILES } from "./spec-files.generated.js";
|
|
7
|
+
let components;
|
|
8
|
+
export function componentDefinitions() {
|
|
9
|
+
return (components ??= COMPONENT_FILES.map(([, json]) => json));
|
|
10
|
+
}
|
|
11
|
+
export function componentNamed(name) {
|
|
12
|
+
const lower = name.toLowerCase();
|
|
13
|
+
return componentDefinitions().find((c) => c.name.toLowerCase() === lower);
|
|
14
|
+
}
|
|
15
|
+
const text = (json) => `${JSON.stringify(json, null, 2)}\n`;
|
|
16
|
+
let examples;
|
|
17
|
+
/** The spec's example UI documents, served as polyxd://examples/<name>.json. */
|
|
18
|
+
export function exampleDocuments() {
|
|
19
|
+
return (examples ??= EXAMPLE_FILES.map(([f, json]) => {
|
|
20
|
+
const doc = json;
|
|
21
|
+
const name = f.replace(/\.json$/, "");
|
|
22
|
+
const kind = doc.surface?.kind === "shell" ? "shell" : "surface";
|
|
23
|
+
return {
|
|
24
|
+
name,
|
|
25
|
+
uri: `polyxd://examples/${f}`,
|
|
26
|
+
title: doc.surface?.title ?? name,
|
|
27
|
+
description: `Example Polyxd UI document (${kind}${doc.surface?.pattern ? `, ${doc.surface.pattern} pattern` : ""}${doc.surface?.intent ? `, intent ${doc.surface.intent}` : ""}).`,
|
|
28
|
+
json: text(doc),
|
|
29
|
+
};
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
let directions;
|
|
33
|
+
/** The spec's example Design Directions, served as polyxd://directions/<name>.json and accepted by name by polyxd_verify. */
|
|
34
|
+
export function exampleDirections() {
|
|
35
|
+
return (directions ??= DIRECTION_FILES.map(([f, json]) => {
|
|
36
|
+
const name = f.replace(/\.json$/, "");
|
|
37
|
+
return { name, uri: `polyxd://directions/${f}`, title: name, description: "Example Design Direction: the voice, rules and emphasis budget a product holds its screens to.", json: text(json) };
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=spec.js.map
|
package/dist/spec.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec.js","sourceRoot":"","sources":["../src/spec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAwB5F,IAAI,UAA6C,CAAC;AACl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AO,EAAE,MAAM,CAAC,CAAC,CAAC,YAAY,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI;YACnL,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC;SAChB,CAAC;IACJ,CAAC,CAAC,CAAC,CAAC;AACN,CAAC;AAED,IAAI,UAAiC,CAAC;AACtC,6HAA6H;AAC7H,MAAM,UAAU,iBAAiB;IAC/B,OAAO,CAAC,UAAU,KAAK,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE;QACvD,MAAM,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QACtC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,uBAAuB,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,gGAAgG,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IACjM,CAAC,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The MCP App's page, read from dist/view.html in Node. A Worker bundles the same file as text
|
|
3
|
+
* instead (apps/mcp), which is why this lives apart from src/server.ts.
|
|
4
|
+
*/
|
|
5
|
+
import { readFileSync, existsSync } from "node:fs";
|
|
6
|
+
const VIEW_FILE = new URL("../dist/view.html", import.meta.url);
|
|
7
|
+
let viewHtml;
|
|
8
|
+
/** The self-contained page (renderer, every pack's CSS, the MCP Apps bridge) built by scripts/build-view.ts. */
|
|
9
|
+
export function viewHTML() {
|
|
10
|
+
if (viewHtml)
|
|
11
|
+
return viewHtml;
|
|
12
|
+
if (!existsSync(VIEW_FILE))
|
|
13
|
+
throw new Error("dist/view.html is missing: run `npm run build -w @polyxd/mcp`");
|
|
14
|
+
return (viewHtml = readFileSync(VIEW_FILE, "utf8"));
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=view-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view-file.js","sourceRoot":"","sources":["../src/view-file.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEnD,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,mBAAmB,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AAChE,IAAI,QAA4B,CAAC;AAEjC,gHAAgH;AAChH,MAAM,UAAU,QAAQ;IACtB,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAC;IAC9B,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;IAC7G,OAAO,CAAC,QAAQ,GAAG,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;AACtD,CAAC"}
|