@framingui/mcp-server 0.6.26 → 0.6.28
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 +4 -3
- package/dist/__tests__/react-native-contract.test.d.ts +2 -0
- package/dist/__tests__/react-native-contract.test.d.ts.map +1 -0
- package/dist/__tests__/react-native-contract.test.js +50 -0
- package/dist/__tests__/react-native-contract.test.js.map +1 -0
- package/dist/auth/state.d.ts +16 -0
- package/dist/auth/state.d.ts.map +1 -1
- package/dist/auth/state.js +54 -15
- package/dist/auth/state.js.map +1 -1
- package/dist/auth/verify.d.ts +9 -0
- package/dist/auth/verify.d.ts.map +1 -1
- package/dist/auth/verify.js.map +1 -1
- package/dist/billing/quota-policy.d.ts +13 -0
- package/dist/billing/quota-policy.d.ts.map +1 -0
- package/dist/billing/quota-policy.js +32 -0
- package/dist/billing/quota-policy.js.map +1 -0
- package/dist/billing/tool-metering.d.ts +10 -0
- package/dist/billing/tool-metering.d.ts.map +1 -0
- package/dist/billing/tool-metering.js +126 -0
- package/dist/billing/tool-metering.js.map +1 -0
- package/dist/billing/usage-ledger.d.ts +61 -0
- package/dist/billing/usage-ledger.d.ts.map +1 -0
- package/dist/billing/usage-ledger.js +102 -0
- package/dist/billing/usage-ledger.js.map +1 -0
- package/dist/billing/usage-sync.d.ts +3 -0
- package/dist/billing/usage-sync.d.ts.map +1 -0
- package/dist/billing/usage-sync.js +40 -0
- package/dist/billing/usage-sync.js.map +1 -0
- package/dist/cli/agent-md-templates.d.ts.map +1 -1
- package/dist/cli/agent-md-templates.js +58 -38
- package/dist/cli/agent-md-templates.js.map +1 -1
- package/dist/cli/commands.d.ts +2 -0
- package/dist/cli/commands.d.ts.map +1 -0
- package/dist/cli/commands.js +20 -0
- package/dist/cli/commands.js.map +1 -0
- package/dist/cli/guide-template.d.ts.map +1 -1
- package/dist/cli/guide-template.js +20 -36
- package/dist/cli/guide-template.js.map +1 -1
- package/dist/cli/help.d.ts +5 -0
- package/dist/cli/help.d.ts.map +1 -0
- package/dist/cli/help.js +59 -0
- package/dist/cli/help.js.map +1 -0
- package/dist/cli/init.d.ts +2 -3
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +33 -48
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/package-manager.d.ts +5 -0
- package/dist/cli/package-manager.d.ts.map +1 -0
- package/dist/cli/package-manager.js +34 -0
- package/dist/cli/package-manager.js.map +1 -0
- package/dist/cli/update.d.ts +8 -0
- package/dist/cli/update.d.ts.map +1 -0
- package/dist/cli/update.js +53 -0
- package/dist/cli/update.js.map +1 -0
- package/dist/commands/slash-command-adapters.d.ts +9 -0
- package/dist/commands/slash-command-adapters.d.ts.map +1 -0
- package/dist/commands/slash-command-adapters.js +116 -0
- package/dist/commands/slash-command-adapters.js.map +1 -0
- package/dist/data/component-fallback-catalog.d.ts +26 -0
- package/dist/data/component-fallback-catalog.d.ts.map +1 -0
- package/dist/data/component-fallback-catalog.js +149 -0
- package/dist/data/component-fallback-catalog.js.map +1 -0
- package/dist/data/component-props.d.ts +30 -0
- package/dist/data/component-props.d.ts.map +1 -0
- package/dist/data/component-props.js +537 -0
- package/dist/data/component-props.js.map +1 -0
- package/dist/data/component-registry.d.ts +30 -0
- package/dist/data/component-registry.d.ts.map +1 -0
- package/dist/data/component-registry.js +320 -0
- package/dist/data/component-registry.js.map +1 -0
- package/dist/data/examples/screen-examples.d.ts +38 -0
- package/dist/data/examples/screen-examples.d.ts.map +1 -0
- package/dist/data/examples/screen-examples.js +500 -0
- package/dist/data/examples/screen-examples.js.map +1 -0
- package/dist/data/react-native-runtime-catalog.d.ts +24 -0
- package/dist/data/react-native-runtime-catalog.d.ts.map +1 -0
- package/dist/data/react-native-runtime-catalog.js +265 -0
- package/dist/data/react-native-runtime-catalog.js.map +1 -0
- package/dist/index.js +225 -205
- package/dist/index.js.map +1 -1
- package/dist/platform-support.d.ts +22 -0
- package/dist/platform-support.d.ts.map +1 -0
- package/dist/platform-support.js +148 -0
- package/dist/platform-support.js.map +1 -0
- package/dist/project-context-resolution.d.ts +7 -0
- package/dist/project-context-resolution.d.ts.map +1 -0
- package/dist/project-context-resolution.js +21 -0
- package/dist/project-context-resolution.js.map +1 -0
- package/dist/project-context-state.d.ts +12 -0
- package/dist/project-context-state.d.ts.map +1 -0
- package/dist/project-context-state.js +14 -0
- package/dist/project-context-state.js.map +1 -0
- package/dist/project-context.d.ts +15 -0
- package/dist/project-context.d.ts.map +1 -0
- package/dist/project-context.js +78 -0
- package/dist/project-context.js.map +1 -0
- package/dist/prompts/doctor-workflow.js +1 -1
- package/dist/prompts/getting-started.d.ts.map +1 -1
- package/dist/prompts/getting-started.js +36 -15
- package/dist/prompts/getting-started.js.map +1 -1
- package/dist/prompts/screen-workflow.d.ts.map +1 -1
- package/dist/prompts/screen-workflow.js +54 -3
- package/dist/prompts/screen-workflow.js.map +1 -1
- package/dist/schemas/mcp-schemas.d.ts +954 -309
- package/dist/schemas/mcp-schemas.d.ts.map +1 -1
- package/dist/schemas/mcp-schemas.js +130 -1
- package/dist/schemas/mcp-schemas.js.map +1 -1
- package/dist/tools/detect-project-context.d.ts +5 -0
- package/dist/tools/detect-project-context.d.ts.map +1 -0
- package/dist/tools/detect-project-context.js +36 -0
- package/dist/tools/detect-project-context.js.map +1 -0
- package/dist/tools/get-screen-generation-context.d.ts +3 -1
- package/dist/tools/get-screen-generation-context.d.ts.map +1 -1
- package/dist/tools/get-screen-generation-context.js +120 -20
- package/dist/tools/get-screen-generation-context.js.map +1 -1
- package/dist/tools/list-components.d.ts.map +1 -1
- package/dist/tools/list-components.js +42 -3
- package/dist/tools/list-components.js.map +1 -1
- package/dist/tools/list-screen-templates.d.ts +3 -1
- package/dist/tools/list-screen-templates.d.ts.map +1 -1
- package/dist/tools/list-screen-templates.js +3 -3
- package/dist/tools/list-screen-templates.js.map +1 -1
- package/dist/tools/preview-component.d.ts.map +1 -1
- package/dist/tools/preview-component.js +57 -7
- package/dist/tools/preview-component.js.map +1 -1
- package/dist/tools/preview-theme.d.ts +3 -1
- package/dist/tools/preview-theme.d.ts.map +1 -1
- package/dist/tools/preview-theme.js +48 -21
- package/dist/tools/preview-theme.js.map +1 -1
- package/dist/tools/theme-authority.js +1 -1
- package/dist/tools/theme-authority.js.map +1 -1
- package/dist/tools/validate-environment.d.ts +3 -1
- package/dist/tools/validate-environment.d.ts.map +1 -1
- package/dist/tools/validate-environment.js +102 -9
- package/dist/tools/validate-environment.js.map +1 -1
- package/dist/tools/validate-screen-definition.d.ts.map +1 -1
- package/dist/tools/validate-screen-definition.js +41 -7
- package/dist/tools/validate-screen-definition.js.map +1 -1
- package/dist/tools/whoami.d.ts.map +1 -1
- package/dist/tools/whoami.js +27 -17
- package/dist/tools/whoami.js.map +1 -1
- package/dist/utils/style-contract-reader.d.ts +10 -0
- package/dist/utils/style-contract-reader.d.ts.map +1 -0
- package/dist/utils/style-contract-reader.js +67 -0
- package/dist/utils/style-contract-reader.js.map +1 -0
- package/package.json +3 -3
|
@@ -14,7 +14,7 @@ export function getScreenWorkflowPrompt() {
|
|
|
14
14
|
This is the current production workflow for building screens with FramingUI.
|
|
15
15
|
|
|
16
16
|
Prerequisite: authenticate with \`framingui-mcp login\` or provide \`FRAMINGUI_API_KEY\`.
|
|
17
|
-
Optional: call \`whoami\` to inspect
|
|
17
|
+
Optional: call \`whoami\` to inspect entitled themes and the current shadow quota snapshot before starting.
|
|
18
18
|
|
|
19
19
|
## Overview
|
|
20
20
|
|
|
@@ -24,10 +24,29 @@ The production workflow is **guarded direct write**:
|
|
|
24
24
|
- ✅ Write React code directly using FramingUI components and props from context
|
|
25
25
|
- ✅ Verify dependencies, Tailwind setup, and raw HTML/style escapes before delivery
|
|
26
26
|
|
|
27
|
+
React Native is also supported through a **direct-write contract path**:
|
|
28
|
+
- ✅ Prefer \`detect-project-context\` once when the project path is known
|
|
29
|
+
- ✅ Gather platform-aware component guidance without repeating platform flags
|
|
30
|
+
- ✅ Write Expo / React Native code directly using \`@framingui/react-native\` where available, then host primitives or app abstractions for the rest
|
|
31
|
+
- ✅ Use \`validate-environment\` with \`sourceFiles\` for package checks and QC
|
|
32
|
+
- 🚫 Do not import \`@framingui/ui\` into React Native projects
|
|
33
|
+
|
|
27
34
|
This is **not** the old \`generate_screen\`-first workflow.
|
|
28
35
|
\`generate_screen\` may still be used as an optional helper, but the default production path is:
|
|
29
36
|
|
|
30
|
-
|
|
37
|
+
If the project path is known:
|
|
38
|
+
|
|
39
|
+
\`detect-project-context\` → \`preview-theme\` → \`get-screen-generation-context\` → \`preview-component\` / \`list-icon-libraries\` when needed → \`validate-screen-definition\` → write code directly → \`validate-environment\`
|
|
40
|
+
|
|
41
|
+
If the project path is not known, start at \`get-screen-generation-context\` and use explicit platform overrides only when needed.
|
|
42
|
+
|
|
43
|
+
## React Native Note
|
|
44
|
+
|
|
45
|
+
For Expo or React Native projects:
|
|
46
|
+
- pass \`"platform": "react-native"\` to \`get-screen-generation-context\`
|
|
47
|
+
- prefer \`@framingui/react-native\` exports over app-local wrappers for common UI
|
|
48
|
+
- write code directly with \`StyleSheet.create\`
|
|
49
|
+
- run \`validate-environment\` with \`sourceFiles\` to catch web-only imports, \`className\`, and raw token drift
|
|
31
50
|
|
|
32
51
|
## Step 1/4: Gather Context
|
|
33
52
|
|
|
@@ -46,6 +65,15 @@ Use this at the start of every screen task.
|
|
|
46
65
|
|
|
47
66
|
Set \`includeExamples: false\` when you want a smaller response and do not need example screen definitions.
|
|
48
67
|
|
|
68
|
+
For React Native direct-write work without a detected session default, pass:
|
|
69
|
+
\`\`\`json
|
|
70
|
+
{
|
|
71
|
+
"description": "Profile screen with subscription card and settings actions",
|
|
72
|
+
"platform": "react-native",
|
|
73
|
+
"includeExamples": false
|
|
74
|
+
}
|
|
75
|
+
\`\`\`
|
|
76
|
+
|
|
49
77
|
**What to review from the response:**
|
|
50
78
|
- \`templateMatch\` as a layout hint only
|
|
51
79
|
- \`components\` as the source of truth for imports, props, and variants
|
|
@@ -136,15 +164,38 @@ Use it to verify:
|
|
|
136
164
|
|
|
137
165
|
If the tool reports missing setup or raw primitive drift, fix the code before delivery.
|
|
138
166
|
|
|
167
|
+
## React Native Direct-Write Path
|
|
168
|
+
|
|
169
|
+
Use this instead of the web screen-definition path when the target app is Expo or React Native.
|
|
170
|
+
|
|
171
|
+
1. Call \`detect-project-context\` with \`projectPath\` when the app path is available
|
|
172
|
+
2. Call \`get-screen-generation-context\` and let the stored session default pick React Native automatically
|
|
173
|
+
3. If the project path is not available, call \`get-screen-generation-context\` with \`platform: "react-native"\`
|
|
174
|
+
4. Review React Native compatible components and hints
|
|
175
|
+
5. Write the screen directly using \`@framingui/react-native\` exports where available, then \`react-native\` primitives or local app abstractions
|
|
176
|
+
6. Run \`validate-environment\` with:
|
|
177
|
+
- \`platform: "react-native"\`
|
|
178
|
+
- \`projectPath\`
|
|
179
|
+
- \`requiredPackages\`
|
|
180
|
+
- \`sourceFiles\`
|
|
181
|
+
7. Fix missing packages, hardcoded color/spacing/radius values, and web-only patterns such as \`className\`
|
|
182
|
+
|
|
183
|
+
React Native rules:
|
|
184
|
+
- Do **not** import \`@framingui/ui\`
|
|
185
|
+
- Do **not** require Tailwind or CSS imports
|
|
186
|
+
- Prefer \`StyleSheet\` plus \`@framingui/react-native\` helpers or host app token helpers over raw style literals
|
|
187
|
+
- Treat \`@framingui/react-native\` as a minimal runtime, not as full \`@framingui/ui\` parity or code generation
|
|
188
|
+
|
|
139
189
|
## Best Practices
|
|
140
190
|
|
|
141
|
-
1. Start with \`
|
|
191
|
+
1. Start with \`detect-project-context\` when project path is known
|
|
142
192
|
2. Use \`includeExamples: false\` unless examples are actually needed
|
|
143
193
|
3. Treat \`templateMatch\` as a hint, not a hard constraint
|
|
144
194
|
4. Treat \`components\` as the source of truth
|
|
145
195
|
5. Validate the definition before writing JSX
|
|
146
196
|
6. Never parse MCP transcript text with shell or Python JSON tooling
|
|
147
197
|
7. Run \`validate-environment\` before handoff
|
|
198
|
+
8. Use the React Native direct-write path when the target project is Expo or React Native
|
|
148
199
|
|
|
149
200
|
## Optional Helper Path
|
|
150
201
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screen-workflow.js","sourceRoot":"","sources":["../../src/prompts/screen-workflow.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,UAAU,uBAAuB;IACrC,OAAO;QACL,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE
|
|
1
|
+
{"version":3,"file":"screen-workflow.js","sourceRoot":"","sources":["../../src/prompts/screen-workflow.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,UAAU,uBAAuB;IACrC,OAAO;QACL,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gMA8LgL;iBACvL;aACF;SACF;KACF,CAAC;AACJ,CAAC"}
|