capy-mcp 1.0.2 → 1.0.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.
package/dist/brief.js CHANGED
@@ -3,6 +3,7 @@ import { buildProjectFacts } from "./project.js";
3
3
  const SECTION_ORDER = [
4
4
  "Foundations",
5
5
  "Colors",
6
+ "Icons",
6
7
  "Typography",
7
8
  "Spacing",
8
9
  "Inputs",
@@ -25,12 +26,18 @@ export async function buildPreviewBrief(projectRoot, input) {
25
26
  goal: input.task === "update_preview"
26
27
  ? "Update the existing /preview surface incrementally based on the files or areas that changed."
27
28
  : "Create a local /preview route that helps humans and agents inspect the app's real UI system quickly.",
28
- layout: "vertical-scroll",
29
+ layout: "bidirectional-scroll",
29
30
  allowHorizontalRows: true,
30
31
  previewRoute: projectFacts.previewRoute,
31
32
  previewEntryFile: projectFacts.previewEntryFile,
32
33
  sections: SECTION_ORDER,
33
34
  useExistingComponentsFirst: true,
35
+ interactionFeatures: [
36
+ "Allow both vertical and horizontal scrolling when the preview surface benefits from a canvas-like layout.",
37
+ "Display icons used in the app in a dedicated section whenever they can be discovered from the repo.",
38
+ "Render color swatches in a consistent format with 6-character hex labels.",
39
+ "Use a pointer cursor and click-to-copy behavior for color hex values.",
40
+ ],
34
41
  },
35
42
  updateStrategy: buildUpdateStrategy(input.changedFiles),
36
43
  warnings,
@@ -80,10 +87,12 @@ function buildInspectionPlan(projectFacts) {
80
87
  function buildConstraints(framework) {
81
88
  const constraints = [
82
89
  "Do not invent colors, spacing, typography, or component APIs before inspecting the repo files listed in inspection_plan.",
83
- "Build a vertically scrollable preview page.",
90
+ "Build a preview page that can support both vertical and horizontal scanning where useful.",
84
91
  "Use horizontal specimen rows only when they make scanning easier.",
85
92
  "Prefer existing components over creating preview-only components.",
86
93
  "Keep the page neat, easy to scan, and aligned with the app's current design language.",
94
+ "Include an icon inventory when the repo exposes app icons clearly enough to catalogue them.",
95
+ "Show colors in a uniform swatch format with normalized 6-character hex labels and click-to-copy affordance.",
87
96
  ];
88
97
  if (framework.needsConfirmation && framework.confirmationMessage) {
89
98
  constraints.push(framework.confirmationMessage);
@@ -119,7 +128,7 @@ function buildInstructions(projectFacts, input) {
119
128
  ? "Update the existing /preview route incrementally."
120
129
  : "Create the /preview route from scratch.";
121
130
  const userGoal = input.userGoal ? ` User goal: ${input.userGoal}.` : "";
122
- return `${lead}${userGoal} Read the app shell first, then global styles, then component directories. After that, implement ${projectFacts.previewEntryFile} as a vertically scrollable preview surface using the repo's real design language and existing components.`;
131
+ return `${lead}${userGoal} Read the app shell first, then global styles, then component directories. After that, implement ${projectFacts.previewEntryFile} as a clean preview surface that supports both vertical and horizontal scanning when useful, includes a dedicated icon section when icons can be discovered, and renders colors as consistent swatches with 6-character hex labels plus click-to-copy behavior using a pointer cursor.`;
123
132
  }
124
133
  function uniqueCompact(values) {
125
134
  return Array.from(new Set(values.filter(Boolean)));
package/dist/server.js CHANGED
@@ -7,7 +7,7 @@ import { writeDesignSystemArtifact } from "./design-system.js";
7
7
  export function createServer(projectRoot = process.cwd()) {
8
8
  const server = new McpServer({
9
9
  name: "capy",
10
- version: "1.0.2",
10
+ version: "1.0.3",
11
11
  });
12
12
  server.registerTool("get_preview_brief", {
13
13
  title: "Get Preview Brief",
@@ -59,12 +59,13 @@ export function createServer(projectRoot = process.cwd()) {
59
59
  constraints: z.array(z.string()),
60
60
  deliverable_spec: z.object({
61
61
  goal: z.string(),
62
- layout: z.literal("vertical-scroll"),
62
+ layout: z.literal("bidirectional-scroll"),
63
63
  allow_horizontal_rows: z.boolean(),
64
64
  preview_route: z.string(),
65
65
  preview_entry_file: z.string(),
66
66
  sections: z.array(z.string()),
67
67
  use_existing_components_first: z.boolean(),
68
+ interaction_features: z.array(z.string()),
68
69
  }),
69
70
  update_strategy: z.array(z.string()),
70
71
  warnings: z.array(z.string()),
@@ -103,6 +104,7 @@ export function createServer(projectRoot = process.cwd()) {
103
104
  preview_entry_file: brief.deliverableSpec.previewEntryFile,
104
105
  sections: brief.deliverableSpec.sections,
105
106
  use_existing_components_first: brief.deliverableSpec.useExistingComponentsFirst,
107
+ interaction_features: brief.deliverableSpec.interactionFeatures,
106
108
  },
107
109
  update_strategy: brief.updateStrategy,
108
110
  warnings: brief.warnings,
package/dist/types.d.ts CHANGED
@@ -29,12 +29,13 @@ export interface InspectionStep {
29
29
  }
30
30
  export interface DeliverableSpec {
31
31
  goal: string;
32
- layout: "vertical-scroll";
32
+ layout: "bidirectional-scroll";
33
33
  allowHorizontalRows: boolean;
34
34
  previewRoute: string;
35
35
  previewEntryFile: string;
36
36
  sections: string[];
37
37
  useExistingComponentsFirst: boolean;
38
+ interactionFeatures: string[];
38
39
  }
39
40
  export interface PreviewBrief {
40
41
  projectFacts: ProjectFacts;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capy-mcp",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "MCP server that inspects a repo, returns a structured /preview brief, and writes a design-system JSON artifact for AI coding agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",