@framingui/mcp-server 0.5.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.
Files changed (206) hide show
  1. package/README.md +1027 -0
  2. package/dist/auth/cache.d.ts +28 -0
  3. package/dist/auth/cache.d.ts.map +1 -0
  4. package/dist/auth/cache.js +48 -0
  5. package/dist/auth/cache.js.map +1 -0
  6. package/dist/auth/guard.d.ts +22 -0
  7. package/dist/auth/guard.d.ts.map +1 -0
  8. package/dist/auth/guard.js +37 -0
  9. package/dist/auth/guard.js.map +1 -0
  10. package/dist/auth/state.d.ts +42 -0
  11. package/dist/auth/state.d.ts.map +1 -0
  12. package/dist/auth/state.js +96 -0
  13. package/dist/auth/state.js.map +1 -0
  14. package/dist/auth/theme-access.d.ts +21 -0
  15. package/dist/auth/theme-access.d.ts.map +1 -0
  16. package/dist/auth/theme-access.js +30 -0
  17. package/dist/auth/theme-access.js.map +1 -0
  18. package/dist/auth/verify.d.ts +44 -0
  19. package/dist/auth/verify.d.ts.map +1 -0
  20. package/dist/auth/verify.js +77 -0
  21. package/dist/auth/verify.js.map +1 -0
  22. package/dist/cli/agent-md-templates.d.ts +16 -0
  23. package/dist/cli/agent-md-templates.d.ts.map +1 -0
  24. package/dist/cli/agent-md-templates.js +311 -0
  25. package/dist/cli/agent-md-templates.js.map +1 -0
  26. package/dist/cli/credentials.d.ts +29 -0
  27. package/dist/cli/credentials.d.ts.map +1 -0
  28. package/dist/cli/credentials.js +66 -0
  29. package/dist/cli/credentials.js.map +1 -0
  30. package/dist/cli/guide-template.d.ts +10 -0
  31. package/dist/cli/guide-template.d.ts.map +1 -0
  32. package/dist/cli/guide-template.js +195 -0
  33. package/dist/cli/guide-template.js.map +1 -0
  34. package/dist/cli/index.d.ts +7 -0
  35. package/dist/cli/index.d.ts.map +1 -0
  36. package/dist/cli/index.js +41 -0
  37. package/dist/cli/index.js.map +1 -0
  38. package/dist/cli/init.d.ts +6 -0
  39. package/dist/cli/init.d.ts.map +1 -0
  40. package/dist/cli/init.js +319 -0
  41. package/dist/cli/init.js.map +1 -0
  42. package/dist/cli/login.d.ts +9 -0
  43. package/dist/cli/login.d.ts.map +1 -0
  44. package/dist/cli/login.js +121 -0
  45. package/dist/cli/login.js.map +1 -0
  46. package/dist/cli/logout.d.ts +9 -0
  47. package/dist/cli/logout.d.ts.map +1 -0
  48. package/dist/cli/logout.js +18 -0
  49. package/dist/cli/logout.js.map +1 -0
  50. package/dist/cli/status.d.ts +9 -0
  51. package/dist/cli/status.d.ts.map +1 -0
  52. package/dist/cli/status.js +31 -0
  53. package/dist/cli/status.js.map +1 -0
  54. package/dist/data/component-props.d.ts +30 -0
  55. package/dist/data/component-props.d.ts.map +1 -0
  56. package/dist/data/component-props.js +537 -0
  57. package/dist/data/component-props.js.map +1 -0
  58. package/dist/data/component-registry.d.ts +30 -0
  59. package/dist/data/component-registry.d.ts.map +1 -0
  60. package/dist/data/component-registry.js +320 -0
  61. package/dist/data/component-registry.js.map +1 -0
  62. package/dist/data/examples/screen-examples.d.ts +38 -0
  63. package/dist/data/examples/screen-examples.d.ts.map +1 -0
  64. package/dist/data/examples/screen-examples.js +500 -0
  65. package/dist/data/examples/screen-examples.js.map +1 -0
  66. package/dist/data/hint-generator.d.ts +16 -0
  67. package/dist/data/hint-generator.d.ts.map +1 -0
  68. package/dist/data/hint-generator.js +298 -0
  69. package/dist/data/hint-generator.js.map +1 -0
  70. package/dist/data/recipe-resolver.d.ts +48 -0
  71. package/dist/data/recipe-resolver.d.ts.map +1 -0
  72. package/dist/data/recipe-resolver.js +226 -0
  73. package/dist/data/recipe-resolver.js.map +1 -0
  74. package/dist/data/template-matcher.d.ts +50 -0
  75. package/dist/data/template-matcher.d.ts.map +1 -0
  76. package/dist/data/template-matcher.js +240 -0
  77. package/dist/data/template-matcher.js.map +1 -0
  78. package/dist/generators/core-resolver.d.ts +56 -0
  79. package/dist/generators/core-resolver.d.ts.map +1 -0
  80. package/dist/generators/core-resolver.js +490 -0
  81. package/dist/generators/core-resolver.js.map +1 -0
  82. package/dist/generators/css-generator.d.ts +49 -0
  83. package/dist/generators/css-generator.d.ts.map +1 -0
  84. package/dist/generators/css-generator.js +294 -0
  85. package/dist/generators/css-generator.js.map +1 -0
  86. package/dist/generators/index.d.ts +13 -0
  87. package/dist/generators/index.d.ts.map +1 -0
  88. package/dist/generators/index.js +16 -0
  89. package/dist/generators/index.js.map +1 -0
  90. package/dist/generators/llm-generator.d.ts +96 -0
  91. package/dist/generators/llm-generator.d.ts.map +1 -0
  92. package/dist/generators/llm-generator.js +296 -0
  93. package/dist/generators/llm-generator.js.map +1 -0
  94. package/dist/index.d.ts +3 -0
  95. package/dist/index.d.ts.map +1 -0
  96. package/dist/index.js +965 -0
  97. package/dist/index.js.map +1 -0
  98. package/dist/prompts/getting-started.d.ts +18 -0
  99. package/dist/prompts/getting-started.d.ts.map +1 -0
  100. package/dist/prompts/getting-started.js +112 -0
  101. package/dist/prompts/getting-started.js.map +1 -0
  102. package/dist/prompts/screen-workflow.d.ts +17 -0
  103. package/dist/prompts/screen-workflow.d.ts.map +1 -0
  104. package/dist/prompts/screen-workflow.js +246 -0
  105. package/dist/prompts/screen-workflow.js.map +1 -0
  106. package/dist/schemas/mcp-schemas.d.ts +4342 -0
  107. package/dist/schemas/mcp-schemas.d.ts.map +1 -0
  108. package/dist/schemas/mcp-schemas.js +989 -0
  109. package/dist/schemas/mcp-schemas.js.map +1 -0
  110. package/dist/storage/blueprint-storage.d.ts +68 -0
  111. package/dist/storage/blueprint-storage.d.ts.map +1 -0
  112. package/dist/storage/blueprint-storage.js +135 -0
  113. package/dist/storage/blueprint-storage.js.map +1 -0
  114. package/dist/storage/timestamp-manager.d.ts +32 -0
  115. package/dist/storage/timestamp-manager.d.ts.map +1 -0
  116. package/dist/storage/timestamp-manager.js +59 -0
  117. package/dist/storage/timestamp-manager.js.map +1 -0
  118. package/dist/tools/export-screen.d.ts +34 -0
  119. package/dist/tools/export-screen.d.ts.map +1 -0
  120. package/dist/tools/export-screen.js +344 -0
  121. package/dist/tools/export-screen.js.map +1 -0
  122. package/dist/tools/generate-blueprint.d.ts +15 -0
  123. package/dist/tools/generate-blueprint.d.ts.map +1 -0
  124. package/dist/tools/generate-blueprint.js +165 -0
  125. package/dist/tools/generate-blueprint.js.map +1 -0
  126. package/dist/tools/generate-screen.d.ts +13 -0
  127. package/dist/tools/generate-screen.d.ts.map +1 -0
  128. package/dist/tools/generate-screen.js +82 -0
  129. package/dist/tools/generate-screen.js.map +1 -0
  130. package/dist/tools/get-screen-generation-context.d.ts +11 -0
  131. package/dist/tools/get-screen-generation-context.d.ts.map +1 -0
  132. package/dist/tools/get-screen-generation-context.js +325 -0
  133. package/dist/tools/get-screen-generation-context.js.map +1 -0
  134. package/dist/tools/list-components.d.ts +15 -0
  135. package/dist/tools/list-components.d.ts.map +1 -0
  136. package/dist/tools/list-components.js +46 -0
  137. package/dist/tools/list-components.js.map +1 -0
  138. package/dist/tools/list-icon-libraries.d.ts +12 -0
  139. package/dist/tools/list-icon-libraries.d.ts.map +1 -0
  140. package/dist/tools/list-icon-libraries.js +48 -0
  141. package/dist/tools/list-icon-libraries.js.map +1 -0
  142. package/dist/tools/list-screen-templates.d.ts +15 -0
  143. package/dist/tools/list-screen-templates.d.ts.map +1 -0
  144. package/dist/tools/list-screen-templates.js +61 -0
  145. package/dist/tools/list-screen-templates.js.map +1 -0
  146. package/dist/tools/list-themes.d.ts +13 -0
  147. package/dist/tools/list-themes.d.ts.map +1 -0
  148. package/dist/tools/list-themes.js +42 -0
  149. package/dist/tools/list-themes.js.map +1 -0
  150. package/dist/tools/list-tokens.d.ts +13 -0
  151. package/dist/tools/list-tokens.d.ts.map +1 -0
  152. package/dist/tools/list-tokens.js +92 -0
  153. package/dist/tools/list-tokens.js.map +1 -0
  154. package/dist/tools/preview-component.d.ts +18 -0
  155. package/dist/tools/preview-component.d.ts.map +1 -0
  156. package/dist/tools/preview-component.js +63 -0
  157. package/dist/tools/preview-component.js.map +1 -0
  158. package/dist/tools/preview-icon-library.d.ts +13 -0
  159. package/dist/tools/preview-icon-library.d.ts.map +1 -0
  160. package/dist/tools/preview-icon-library.js +63 -0
  161. package/dist/tools/preview-icon-library.js.map +1 -0
  162. package/dist/tools/preview-screen-template.d.ts +18 -0
  163. package/dist/tools/preview-screen-template.d.ts.map +1 -0
  164. package/dist/tools/preview-screen-template.js +99 -0
  165. package/dist/tools/preview-screen-template.js.map +1 -0
  166. package/dist/tools/preview-theme.d.ts +15 -0
  167. package/dist/tools/preview-theme.d.ts.map +1 -0
  168. package/dist/tools/preview-theme.js +172 -0
  169. package/dist/tools/preview-theme.js.map +1 -0
  170. package/dist/tools/validate-environment.d.ts +37 -0
  171. package/dist/tools/validate-environment.d.ts.map +1 -0
  172. package/dist/tools/validate-environment.js +153 -0
  173. package/dist/tools/validate-environment.js.map +1 -0
  174. package/dist/tools/validate-screen-definition.d.ts +10 -0
  175. package/dist/tools/validate-screen-definition.d.ts.map +1 -0
  176. package/dist/tools/validate-screen-definition.js +559 -0
  177. package/dist/tools/validate-screen-definition.js.map +1 -0
  178. package/dist/tools/validate-screen.d.ts +13 -0
  179. package/dist/tools/validate-screen.d.ts.map +1 -0
  180. package/dist/tools/validate-screen.js +106 -0
  181. package/dist/tools/validate-screen.js.map +1 -0
  182. package/dist/tools/whoami.d.ts +17 -0
  183. package/dist/tools/whoami.d.ts.map +1 -0
  184. package/dist/tools/whoami.js +65 -0
  185. package/dist/tools/whoami.js.map +1 -0
  186. package/dist/utils/dependency-extractor.d.ts +13 -0
  187. package/dist/utils/dependency-extractor.d.ts.map +1 -0
  188. package/dist/utils/dependency-extractor.js +232 -0
  189. package/dist/utils/dependency-extractor.js.map +1 -0
  190. package/dist/utils/error-handler.d.ts +29 -0
  191. package/dist/utils/error-handler.d.ts.map +1 -0
  192. package/dist/utils/error-handler.js +48 -0
  193. package/dist/utils/error-handler.js.map +1 -0
  194. package/dist/utils/logger.d.ts +8 -0
  195. package/dist/utils/logger.d.ts.map +1 -0
  196. package/dist/utils/logger.js +14 -0
  197. package/dist/utils/logger.js.map +1 -0
  198. package/dist/utils/package-json-reader.d.ts +37 -0
  199. package/dist/utils/package-json-reader.d.ts.map +1 -0
  200. package/dist/utils/package-json-reader.js +108 -0
  201. package/dist/utils/package-json-reader.js.map +1 -0
  202. package/dist/utils/tailwind-config-reader.d.ts +23 -0
  203. package/dist/utils/tailwind-config-reader.d.ts.map +1 -0
  204. package/dist/utils/tailwind-config-reader.js +81 -0
  205. package/dist/utils/tailwind-config-reader.js.map +1 -0
  206. package/package.json +103 -0
@@ -0,0 +1,311 @@
1
+ /**
2
+ * Agent guidance templates for CLAUDE.md and AGENTS.md
3
+ * Provides framework-specific Tekton workflow instructions
4
+ */
5
+ /**
6
+ * Generate CLAUDE.md section for Claude Code
7
+ * (Claude Code-specific patterns and MCP integration)
8
+ */
9
+ export function generateClaudeMdSection(framework) {
10
+ const importPath = framework === 'nextjs' ? 'app/page.tsx' : 'src/App.tsx';
11
+ return `
12
+ ## FramingUI Workflow (Claude Code)
13
+
14
+ ### MCP Server Connection
15
+
16
+ Tekton MCP server is configured in \`.mcp.json\`. Claude Code automatically loads 15 tools for screen generation.
17
+
18
+ ### Authentication (Step 1)
19
+
20
+ Before generating any screens, authenticate:
21
+
22
+ \`\`\`bash
23
+ tekton-mcp login
24
+ \`\`\`
25
+
26
+ **Important:** All 6 themes require authentication. No free themes are available.
27
+
28
+ ### Screen Generation Workflow (3 Steps)
29
+
30
+ **Step 1/3:** Gather Context
31
+ - Call \`get-screen-generation-context\` with user's screen description
32
+ - Receive template matches, component suggestions with inline props/variants, and schema
33
+
34
+ **Step 2/3:** Validate Definition
35
+ - Generate Screen Definition JSON based on context
36
+ - Call \`validate-screen-definition\` to verify structure
37
+ - Apply autoFixPatches or fix any errors before proceeding
38
+
39
+ **After Validation:** Write React Code Directly
40
+ - Use components and import statements from Step 1 context
41
+ - Apply theme recipes via variant props
42
+
43
+ **Step 3/3:** Validate Environment (Optional)
44
+ - Call \`validate-environment\` with project path and required packages
45
+ - Verify Tailwind CSS configuration
46
+ - Show user install commands for missing packages
47
+
48
+ ### Component Usage Example
49
+
50
+ \`\`\`tsx
51
+ // ${importPath}
52
+ import { Button, Card, CardHeader, CardTitle, CardContent } from '@framingui/ui';
53
+
54
+ export default function Page() {
55
+ return (
56
+ <Card>
57
+ <CardHeader>
58
+ <CardTitle>Welcome to Tekton</CardTitle>
59
+ </CardHeader>
60
+ <CardContent>
61
+ <Button variant="default" size="lg">Get Started</Button>
62
+ </CardContent>
63
+ </Card>
64
+ );
65
+ }
66
+ \`\`\`
67
+
68
+ ### Available Tools
69
+
70
+ **Discovery (6 tools):**
71
+ - \`list-themes\` - List 6 available themes
72
+ - \`preview-theme\` - Get theme design tokens
73
+ - \`list-components\` - List 30+ UI components
74
+ - \`preview-component\` - Get component props and variants
75
+ - \`list-screen-templates\` - List 13 screen templates
76
+ - \`preview-screen-template\` - Get template structure
77
+
78
+ **Screen Generation (3 tools):**
79
+ - \`get-screen-generation-context\` - Step 1/3
80
+ - \`validate-screen-definition\` - Step 2/3
81
+ - \`validate-environment\` - Step 3/3 (Optional)
82
+
83
+ **Quick Prototyping (3 tools):**
84
+ - \`generate-blueprint\` - Quick UI structure
85
+ - \`export-screen\` - Export to JSX/TSX/Vue
86
+ - \`list_tokens\` - List layout tokens
87
+
88
+ **Icon Libraries (2 tools):**
89
+ - \`list-icon-libraries\` - List available icon libraries
90
+ - \`preview-icon-library\` - Preview icon library
91
+
92
+ **Additional:**
93
+ - \`validate_screen\` - Simple validation (use \`validate-screen-definition\` for production)
94
+
95
+ ### MCP Prompts (Universal Guidance)
96
+
97
+ Claude Code can access built-in prompts for guidance:
98
+
99
+ - \`getting-started\` - Authentication → Theme → Components → Screen generation
100
+ - \`screen-workflow\` - Detailed 3-step workflow with troubleshooting
101
+
102
+ These prompts work across all MCP clients, not just Claude Code.
103
+
104
+ ### Common Mistakes to Avoid
105
+
106
+ 1. ❌ Skipping authentication before generating screens
107
+ 2. ❌ Using non-existent theme IDs (only 6 exist)
108
+ 3. ❌ Skipping validate-screen-definition step
109
+ 4. ❌ Delivering code without verifying Tailwind config
110
+
111
+ ### Troubleshooting
112
+
113
+ **Authentication issues:**
114
+ - Run \`tekton-mcp status\` to check authentication
115
+ - Run \`tekton-mcp login\` to re-authenticate
116
+
117
+ **Missing styles:**
118
+ - Run \`validate-environment\` to check Tailwind config
119
+ - Verify \`@framingui/ui\` content paths are included
120
+ - Check \`tailwindcss-animate\` plugin is configured
121
+
122
+ **Component not found:**
123
+ - Use \`list-components\` to verify component exists
124
+ - Use \`preview-component\` to check correct component ID
125
+ `;
126
+ }
127
+ /**
128
+ * Generate AGENTS.md section for generic AI agents
129
+ * (Platform-agnostic guidance for OpenAI Codex, Cursor, Windsurf, etc.)
130
+ */
131
+ export function generateAgentsMdSection(framework) {
132
+ const importPath = framework === 'nextjs' ? 'app/page.tsx' : 'src/App.tsx';
133
+ return `
134
+ ## FramingUI Workflow (AI Agents)
135
+
136
+ ### Overview
137
+
138
+ Tekton MCP server provides 15 tools for screen generation via Model Context Protocol (MCP). This guide is for AI agents on platforms like OpenAI Codex, Cursor, Windsurf, and other MCP-compatible clients.
139
+
140
+ ### Prerequisites
141
+
142
+ 1. **MCP Server Running:** Ensure \`@framingui/mcp-server\` is running and connected
143
+ 2. **Authentication:** User must run \`tekton-mcp login\` before generating screens
144
+ 3. **Project Setup:** \`@framingui/ui\` and \`tailwindcss-animate\` must be installed
145
+
146
+ ### Required Authentication Flow
147
+
148
+ **Step 1:** Check authentication status
149
+ \`\`\`bash
150
+ tekton-mcp status
151
+ \`\`\`
152
+
153
+ **Step 2:** If not authenticated, instruct user:
154
+ \`\`\`bash
155
+ tekton-mcp login
156
+ \`\`\`
157
+
158
+ **Important:** All 6 themes require valid licenses. There are no free themes available.
159
+
160
+ ### Screen Generation Workflow (3 Steps)
161
+
162
+ Follow this exact sequence for production-ready screens:
163
+
164
+ #### Step 1/3: Gather Context
165
+
166
+ **Tool:** \`get-screen-generation-context\`
167
+
168
+ **Purpose:** Get all context needed to create Screen Definition
169
+
170
+ **Input:**
171
+ \`\`\`json
172
+ {
173
+ "description": "user dashboard with profile card",
174
+ "themeId": "minimal-workspace",
175
+ "includeExamples": true
176
+ }
177
+ \`\`\`
178
+
179
+ **Output:** Template matches, component suggestions with inline props/variants, schema, examples
180
+
181
+ #### Step 2/3: Validate Definition
182
+
183
+ **Tool:** \`validate-screen-definition\`
184
+
185
+ **Purpose:** Ensure Screen Definition JSON is correct
186
+
187
+ **Input:**
188
+ \`\`\`json
189
+ {
190
+ "definition": {
191
+ "id": "user-dashboard",
192
+ "shell": "shell.web.dashboard",
193
+ "page": "page.dashboard",
194
+ "sections": [...]
195
+ },
196
+ "strict": true
197
+ }
198
+ \`\`\`
199
+
200
+ **Output:** Validation results with errors, warnings, suggestions, and autoFix patches
201
+
202
+ **Critical:** Always validate before writing code. Apply autoFixPatches or fix all errors.
203
+
204
+ #### After Validation: Write React Code Directly
205
+
206
+ **No tool needed** - Write production-ready React code using components from Step 1 context.
207
+
208
+ Use the import statements and props provided in the context response.
209
+
210
+ #### Step 3/3: Validate Environment (Optional)
211
+
212
+ **Tool:** \`validate-environment\`
213
+
214
+ **Purpose:** Verify project has required packages and Tailwind config
215
+
216
+ **Input:**
217
+ \`\`\`json
218
+ {
219
+ "projectPath": "/path/to/package.json",
220
+ "requiredPackages": ["@radix-ui/react-slot", "@radix-ui/react-avatar"],
221
+ "checkTailwind": true
222
+ }
223
+ \`\`\`
224
+
225
+ **Output:** Missing packages, install commands, Tailwind validation
226
+
227
+ **Critical:** Always inform user about missing packages and Tailwind config issues.
228
+
229
+ ### Discovery Tools
230
+
231
+ Before generating screens, explore available resources:
232
+
233
+ **Themes (6 total, all require authentication):**
234
+ - \`list-themes\` → See all 6 themes
235
+ - \`preview-theme\` → Get theme design tokens
236
+
237
+ **Components (30+ available):**
238
+ - \`list-components\` → Browse component catalog
239
+ - \`preview-component\` → Get component props, variants, examples
240
+
241
+ **Templates (13 available):**
242
+ - \`list-screen-templates\` → Browse screen templates
243
+ - \`preview-screen-template\` → Get template structure
244
+
245
+ ### Component Usage Example
246
+
247
+ \`\`\`tsx
248
+ // ${importPath}
249
+ import { Button, Card, CardHeader, CardTitle, CardContent } from '@framingui/ui';
250
+
251
+ export default function Page() {
252
+ return (
253
+ <Card>
254
+ <CardHeader>
255
+ <CardTitle>Welcome</CardTitle>
256
+ </CardHeader>
257
+ <CardContent>
258
+ <Button variant="default">Get Started</Button>
259
+ </CardContent>
260
+ </Card>
261
+ );
262
+ }
263
+ \`\`\`
264
+
265
+ ### MCP Prompts (Universal Guidance)
266
+
267
+ Your MCP client may support prompts. If available:
268
+
269
+ - \`getting-started\` - Complete onboarding guide
270
+ - \`screen-workflow\` - Detailed 3-step workflow
271
+
272
+ These provide context to help you guide users effectively.
273
+
274
+ ### Error Handling
275
+
276
+ **Authentication errors:**
277
+ - Instruct user to run \`tekton-mcp login\`
278
+ - Verify with \`tekton-mcp status\`
279
+
280
+ **Validation errors (Step 2):**
281
+ - Read error messages - they include suggestions
282
+ - Fix errors in Screen Definition
283
+ - Re-run \`validate-screen-definition\`
284
+
285
+ **Missing dependencies (Step 3):**
286
+ - Always run Step 4 to check environment
287
+ - Show user install commands from \`validate-environment\`
288
+
289
+ **Missing styles (runtime):**
290
+ - Run \`validate-environment\` to diagnose
291
+ - Check Tailwind config includes \`@framingui/ui\` content paths
292
+ - Check \`tailwindcss-animate\` plugin is configured
293
+
294
+ ### Best Practices
295
+
296
+ 1. ✅ Always authenticate before generating screens
297
+ 2. ✅ Follow all 3 workflow steps in order
298
+ 3. ✅ Validate before writing code (Step 2)
299
+ 4. ✅ Check environment before delivering code (Step 3)
300
+ 5. ✅ Inform user about missing dependencies and Tailwind issues
301
+ 6. ✅ Use \`strict: true\` for production validation
302
+
303
+ ### Quick Reference: All 15 Tools
304
+
305
+ **Discovery:** list-themes, preview-theme, list-components, preview-component, list-screen-templates, preview-screen-template
306
+ **Workflow:** get-screen-generation-context, validate-screen-definition, validate-environment
307
+ **Quick:** generate-blueprint, export-screen, validate_screen, list_tokens
308
+ **Icons:** list-icon-libraries, preview-icon-library
309
+ `;
310
+ }
311
+ //# sourceMappingURL=agent-md-templates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-md-templates.js","sourceRoot":"","sources":["../../src/cli/agent-md-templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,SAAoB;IAC1D,MAAM,UAAU,GAAG,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,aAAa,CAAC;IAE3E,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAwCJ,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0Ed,CAAC;AACF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,SAAoB;IAC1D,MAAM,UAAU,GAAG,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,aAAa,CAAC;IAE3E,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAmHJ,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6Dd,CAAC;AACF,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * 크레덴셜 파일 관리
3
+ * ~/.tekton/credentials.json 읽기/쓰기/삭제
4
+ */
5
+ export interface TektonCredentials {
6
+ api_key: string;
7
+ api_url: string;
8
+ created_at: string;
9
+ user_email: string;
10
+ }
11
+ /**
12
+ * 크레덴셜 파일 경로 반환
13
+ */
14
+ export declare function getCredentialsPath(): string;
15
+ /**
16
+ * 크레덴셜 파일 로드
17
+ * @returns 크레덴셜 객체 또는 null (파일 없거나 파싱 실패 시)
18
+ */
19
+ export declare function loadCredentials(): TektonCredentials | null;
20
+ /**
21
+ * 크레덴셜 저장 (chmod 600)
22
+ */
23
+ export declare function saveCredentials(creds: TektonCredentials): void;
24
+ /**
25
+ * 크레덴셜 파일 삭제
26
+ * @returns true면 삭제 성공, false면 파일 없음
27
+ */
28
+ export declare function deleteCredentials(): boolean;
29
+ //# sourceMappingURL=credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../src/cli/credentials.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,iBAAiB,GAAG,IAAI,CAmB1D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI,CAW9D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAY3C"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * 크레덴셜 파일 관리
3
+ * ~/.tekton/credentials.json 읽기/쓰기/삭제
4
+ */
5
+ import fs from 'node:fs';
6
+ import path from 'node:path';
7
+ import os from 'node:os';
8
+ /**
9
+ * 크레덴셜 파일 경로 반환
10
+ */
11
+ export function getCredentialsPath() {
12
+ return path.join(os.homedir(), '.tekton', 'credentials.json');
13
+ }
14
+ /**
15
+ * 크레덴셜 파일 로드
16
+ * @returns 크레덴셜 객체 또는 null (파일 없거나 파싱 실패 시)
17
+ */
18
+ export function loadCredentials() {
19
+ const credPath = getCredentialsPath();
20
+ try {
21
+ if (!fs.existsSync(credPath)) {
22
+ return null;
23
+ }
24
+ const raw = fs.readFileSync(credPath, 'utf-8');
25
+ const data = JSON.parse(raw);
26
+ // 필수 필드 검증
27
+ if (!data.api_key || !data.api_url) {
28
+ return null;
29
+ }
30
+ return data;
31
+ }
32
+ catch {
33
+ return null;
34
+ }
35
+ }
36
+ /**
37
+ * 크레덴셜 저장 (chmod 600)
38
+ */
39
+ export function saveCredentials(creds) {
40
+ const credPath = getCredentialsPath();
41
+ const dir = path.dirname(credPath);
42
+ // ~/.tekton 디렉토리 자동 생성
43
+ fs.mkdirSync(dir, { recursive: true });
44
+ // 소유자만 읽기/쓰기 (0o600)
45
+ fs.writeFileSync(credPath, JSON.stringify(creds, null, 2) + '\n', {
46
+ mode: 0o600,
47
+ });
48
+ }
49
+ /**
50
+ * 크레덴셜 파일 삭제
51
+ * @returns true면 삭제 성공, false면 파일 없음
52
+ */
53
+ export function deleteCredentials() {
54
+ const credPath = getCredentialsPath();
55
+ try {
56
+ if (!fs.existsSync(credPath)) {
57
+ return false;
58
+ }
59
+ fs.unlinkSync(credPath);
60
+ return true;
61
+ }
62
+ catch {
63
+ return false;
64
+ }
65
+ }
66
+ //# sourceMappingURL=credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials.js","sourceRoot":"","sources":["../../src/cli/credentials.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,SAAS,CAAC;AASzB;;GAEG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,kBAAkB,CAAC,CAAC;AAChE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,QAAQ,GAAG,kBAAkB,EAAE,CAAC;IAEtC,IAAI,CAAC;QACH,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC/C,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAsB,CAAC;QAElD,WAAW;QACX,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YACnC,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAAwB;IACtD,MAAM,QAAQ,GAAG,kBAAkB,EAAE,CAAC;IACtC,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEnC,uBAAuB;IACvB,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAEvC,qBAAqB;IACrB,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE;QAChE,IAAI,EAAE,KAAK;KACZ,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,QAAQ,GAAG,kBAAkB,EAAE,CAAC;IAEtC,IAAI,CAAC;QACH,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC7B,OAAO,KAAK,CAAC;QACf,CAAC;QACD,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * TEKTON-GUIDE.md 콘텐츠 템플릿
3
+ * 프레임워크별 맞춤 가이드 생성
4
+ */
5
+ export type Framework = 'nextjs' | 'vite';
6
+ /**
7
+ * TEKTON-GUIDE.md 콘텐츠 생성
8
+ */
9
+ export declare function generateGuide(framework: Framework): string;
10
+ //# sourceMappingURL=guide-template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guide-template.d.ts","sourceRoot":"","sources":["../../src/cli/guide-template.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE1C;;GAEG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CA4L1D"}
@@ -0,0 +1,195 @@
1
+ /**
2
+ * TEKTON-GUIDE.md 콘텐츠 템플릿
3
+ * 프레임워크별 맞춤 가이드 생성
4
+ */
5
+ /**
6
+ * TEKTON-GUIDE.md 콘텐츠 생성
7
+ */
8
+ export function generateGuide(framework) {
9
+ const importExample = framework === 'nextjs'
10
+ ? `// app/page.tsx
11
+ import { Button, Card, CardHeader, CardTitle, CardContent } from '@framingui/ui';
12
+
13
+ export default function HomePage() {
14
+ return (
15
+ <Card>
16
+ <CardHeader>
17
+ <CardTitle>Welcome</CardTitle>
18
+ </CardHeader>
19
+ <CardContent>
20
+ <Button variant="default" size="lg">Get Started</Button>
21
+ </CardContent>
22
+ </Card>
23
+ );
24
+ }`
25
+ : `// src/App.tsx
26
+ import { Button, Card, CardHeader, CardTitle, CardContent } from '@framingui/ui';
27
+
28
+ function App() {
29
+ return (
30
+ <Card>
31
+ <CardHeader>
32
+ <CardTitle>Welcome</CardTitle>
33
+ </CardHeader>
34
+ <CardContent>
35
+ <Button variant="default" size="lg">Get Started</Button>
36
+ </CardContent>
37
+ </Card>
38
+ );
39
+ }
40
+
41
+ export default App;`;
42
+ return `# FramingUI Guide
43
+
44
+ > AI-powered design system for building production-ready UIs.
45
+
46
+ ---
47
+
48
+ ## Authentication
49
+
50
+ Before generating screens, authenticate with your Tekton account:
51
+
52
+ \`\`\`bash
53
+ tekton-mcp login
54
+ \`\`\`
55
+
56
+ This opens your browser for OAuth authentication. Your credentials are stored in \`~/.tekton/credentials.json\`.
57
+
58
+ **Why authentication is required:**
59
+ - All 6 themes require valid licenses
60
+ - No free themes are available
61
+ - Authentication verifies your license status
62
+
63
+ **Check your authentication status:**
64
+
65
+ \`\`\`bash
66
+ tekton-mcp status
67
+ \`\`\`
68
+
69
+ ---
70
+
71
+ ## Screen Generation Workflow
72
+
73
+ Tekton provides a **3-step workflow** for production-ready screen generation:
74
+
75
+ ### Step 1/3: Get Context
76
+
77
+ Claude Code calls \`get-screen-generation-context\` with your screen description:
78
+
79
+ \`\`\`
80
+ "Create a user dashboard with profile card and recent activity"
81
+ \`\`\`
82
+
83
+ Returns: Template matches, component suggestions with inline props/variants, Screen Definition schema
84
+
85
+ ### Step 2/3: Validate Definition
86
+
87
+ Claude Code generates a Screen Definition JSON and calls \`validate-screen-definition\`:
88
+
89
+ Returns: Validation results, errors with auto-fix patches (if any), improvement suggestions
90
+
91
+ ### After Validation: Write Code
92
+
93
+ Claude Code writes React code directly using the components and props from Step 1 context.
94
+
95
+ ### Step 3/3: Validate Environment (Optional)
96
+
97
+ Claude Code calls \`validate-environment\` to check your project:
98
+
99
+ Returns: Missing packages, install commands, Tailwind CSS config validation
100
+
101
+ **Important:** Always check the dependencies and Tailwind configuration before running generated code.
102
+
103
+ ---
104
+
105
+ ## Quick Start
106
+
107
+ ### Using Components
108
+
109
+ \`\`\`tsx
110
+ ${importExample}
111
+ \`\`\`
112
+
113
+ ### AI Screen Generation
114
+
115
+ Claude Code에서 MCP 서버가 연결되어 있으면, 자연어로 화면을 생성할 수 있습니다:
116
+
117
+ \`\`\`
118
+ "로그인 화면 만들어줘"
119
+ "대시보드 페이지를 카드 레이아웃으로 만들어줘"
120
+ "사용자 프로필 페이지를 만들어줘"
121
+ \`\`\`
122
+
123
+ ---
124
+
125
+ ## Components (30+)
126
+
127
+ ### Core
128
+ Button, Input, Label, Card, Badge, Avatar, Separator, Checkbox, RadioGroup, Switch, Textarea, Skeleton, ScrollArea, Select, Progress
129
+
130
+ ### Complex
131
+ Dialog, DropdownMenu, Table, Tabs, Toast, Tooltip, Popover, Sheet, AlertDialog, NavigationMenu
132
+
133
+ ### Advanced
134
+ Sidebar, Breadcrumb, Command, Calendar, Form
135
+
136
+ ### Usage
137
+
138
+ \`\`\`tsx
139
+ import { Button, Dialog, DialogTrigger, DialogContent } from '@framingui/ui';
140
+ \`\`\`
141
+
142
+ ---
143
+
144
+ ## Screen Templates (13)
145
+
146
+ 프로덕션에서 바로 사용할 수 있는 완성된 화면 템플릿:
147
+
148
+ | Category | Templates |
149
+ |----------|-----------|
150
+ | Auth | Login, Signup, ForgotPassword, Verification |
151
+ | Core | Landing, Preferences, Profile |
152
+ | Feedback | Loading, Error, Empty, Confirmation, Success |
153
+ | Dashboard | Dashboard |
154
+
155
+ ---
156
+
157
+ ## Themes (6)
158
+
159
+ | Theme ID | Description |
160
+ |----------|-------------|
161
+ | \`classic-magazine\` | Classic magazine style |
162
+ | \`dark-boldness\` | Fitness & wellness |
163
+ | \`minimal-workspace\` | Minimal workspace |
164
+ | \`neutral-workspace\` | Neutral humanism |
165
+ | \`pebble\` | Round minimal |
166
+ | \`square-minimalism\` | Square minimalism |
167
+
168
+ ### Applying a Theme
169
+
170
+ \`\`\`tsx
171
+ import { themeToCSS, injectThemeCSS } from '@framingui/ui';
172
+
173
+ // Inject theme CSS at runtime
174
+ injectThemeCSS(themeData);
175
+ \`\`\`
176
+
177
+ ---
178
+
179
+ ## Utility: cn()
180
+
181
+ \`\`\`tsx
182
+ import { cn } from '@framingui/ui';
183
+
184
+ <div className={cn('p-4 bg-white', isActive && 'bg-blue-500', className)} />
185
+ \`\`\`
186
+
187
+ ---
188
+
189
+ ## Links
190
+
191
+ - [npm: @framingui/ui](https://www.npmjs.com/package/@framingui/ui)
192
+ - [npm: @framingui/mcp-server](https://www.npmjs.com/package/@framingui/mcp-server)
193
+ `;
194
+ }
195
+ //# sourceMappingURL=guide-template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guide-template.js","sourceRoot":"","sources":["../../src/cli/guide-template.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,SAAoB;IAChD,MAAM,aAAa,GACjB,SAAS,KAAK,QAAQ;QACpB,CAAC,CAAC;;;;;;;;;;;;;;EAcN;QACI,CAAC,CAAC;;;;;;;;;;;;;;;;oBAgBY,CAAC;IAEnB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoEP,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmFd,CAAC;AACF,CAAC"}
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Tekton MCP CLI 라우터
4
+ * 서브커맨드: login, logout, status, (없으면 MCP 서버 시작)
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA;;;GAGG;AAEH,OAAO,EAAE,CAAC"}
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Tekton MCP CLI 라우터
4
+ * 서브커맨드: login, logout, status, (없으면 MCP 서버 시작)
5
+ */
6
+ const command = process.argv[2];
7
+ switch (command) {
8
+ case 'login': {
9
+ const { loginCommand } = await import('./login.js');
10
+ try {
11
+ await loginCommand();
12
+ }
13
+ catch (err) {
14
+ console.error(err instanceof Error ? err.message : String(err));
15
+ process.exit(1);
16
+ }
17
+ break;
18
+ }
19
+ case 'logout': {
20
+ const { logoutCommand } = await import('./logout.js');
21
+ logoutCommand();
22
+ break;
23
+ }
24
+ case 'status': {
25
+ const { statusCommand } = await import('./status.js');
26
+ statusCommand();
27
+ break;
28
+ }
29
+ case 'init': {
30
+ const { initCommand } = await import('./init.js');
31
+ await initCommand();
32
+ break;
33
+ }
34
+ default: {
35
+ // 서브커맨드 없음 → MCP stdio 서버 시작 (기존 동작 유지)
36
+ await import('../index.js');
37
+ break;
38
+ }
39
+ }
40
+ export {};
41
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA;;;GAGG;AAIH,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAEhC,QAAQ,OAAO,EAAE,CAAC;IAChB,KAAK,OAAO,CAAC,CAAC,CAAC;QACb,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,CAAC;QACpD,IAAI,CAAC;YACH,MAAM,YAAY,EAAE,CAAC;QACvB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;YAChE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,MAAM;IACR,CAAC;IAED,KAAK,QAAQ,CAAC,CAAC,CAAC;QACd,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;QACtD,aAAa,EAAE,CAAC;QAChB,MAAM;IACR,CAAC;IAED,KAAK,QAAQ,CAAC,CAAC,CAAC;QACd,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;QACtD,aAAa,EAAE,CAAC;QAChB,MAAM;IACR,CAAC;IAED,KAAK,MAAM,CAAC,CAAC,CAAC;QACZ,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC;QAClD,MAAM,WAAW,EAAE,CAAC;QACpB,MAAM;IACR,CAAC;IAED,OAAO,CAAC,CAAC,CAAC;QACR,wCAAwC;QACxC,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;QAC5B,MAAM;IACR,CAAC;AACH,CAAC"}