@fragments-sdk/context 0.4.1 → 0.4.3
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.
|
@@ -35,6 +35,19 @@ var CLI_COMMAND_CATEGORIES = {
|
|
|
35
35
|
};
|
|
36
36
|
var CLI_COMMANDS = [
|
|
37
37
|
// ── Setup ──
|
|
38
|
+
{
|
|
39
|
+
name: "setup",
|
|
40
|
+
description: "Configure @fragments-sdk/ui in a consumer project (styles, providers, Next.js config)",
|
|
41
|
+
category: "setup",
|
|
42
|
+
usage: "fragments setup [options]",
|
|
43
|
+
options: [
|
|
44
|
+
{ flags: "--root <dir>", description: "Project root directory" },
|
|
45
|
+
{ flags: "-y, --yes", description: "Skip interactive prompts" },
|
|
46
|
+
{ flags: "--brand <color>", description: "Brand color hex (e.g., #6366f1)" },
|
|
47
|
+
{ flags: "--scss", description: "Create SCSS seed file for build-time theming" },
|
|
48
|
+
{ flags: "--mcp", description: "Configure MCP server for AI tooling" }
|
|
49
|
+
]
|
|
50
|
+
},
|
|
38
51
|
{
|
|
39
52
|
name: "init",
|
|
40
53
|
description: "Initialize fragments in a project (interactive by default)",
|
|
@@ -417,6 +430,17 @@ var CLI_COMMANDS = [
|
|
|
417
430
|
]
|
|
418
431
|
},
|
|
419
432
|
// ── Utility ──
|
|
433
|
+
{
|
|
434
|
+
name: "doctor",
|
|
435
|
+
description: "Diagnose design system configuration issues (styles import, ThemeProvider, seed values, peer deps, MCP config)",
|
|
436
|
+
category: "utility",
|
|
437
|
+
usage: "fragments doctor [options]",
|
|
438
|
+
options: [
|
|
439
|
+
{ flags: "--root <dir>", description: "Project root directory", default: "cwd" },
|
|
440
|
+
{ flags: "--json", description: "Output results as JSON" },
|
|
441
|
+
{ flags: "--fix", description: "Auto-fix issues where possible" }
|
|
442
|
+
]
|
|
443
|
+
},
|
|
420
444
|
{
|
|
421
445
|
name: "view",
|
|
422
446
|
description: "Generate a static HTML viewer for fragments.json",
|
|
@@ -288,6 +288,21 @@ var MCP_TOOL_DEFINITIONS = [
|
|
|
288
288
|
}
|
|
289
289
|
},
|
|
290
290
|
required: ["component"]
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
key: "generate_ui",
|
|
294
|
+
description: "Generate a complete UI from a natural language description. Returns a structured element tree that can be rendered with Fragments components. Optionally pass an existing element tree to refine it.",
|
|
295
|
+
params: {
|
|
296
|
+
prompt: {
|
|
297
|
+
type: "string",
|
|
298
|
+
description: 'Natural language description of the UI to generate (e.g., "a settings page with profile section and notification preferences")'
|
|
299
|
+
},
|
|
300
|
+
currentTree: {
|
|
301
|
+
type: "object",
|
|
302
|
+
description: "Optional existing element tree to refine. When provided, the AI will modify this tree based on the prompt instead of generating from scratch."
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
required: ["prompt"]
|
|
291
306
|
}
|
|
292
307
|
];
|
|
293
308
|
var CLI_TOOL_EXTENSIONS = [
|
package/dist/index.js
CHANGED
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
MCP_TOOL_DEFINITIONS,
|
|
4
4
|
buildMcpTools,
|
|
5
5
|
buildToolNames
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RTJ3JOPA.js";
|
|
7
7
|
import {
|
|
8
8
|
CLI_COMMANDS,
|
|
9
9
|
CLI_COMMAND_CATEGORIES
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BZ6SGVA2.js";
|
|
11
11
|
import {
|
|
12
12
|
chunkByAST,
|
|
13
13
|
chunkByLines,
|
package/dist/mcp-tools/index.js
CHANGED