@forgespace/branding-mcp 0.7.0 → 0.8.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/README.md +41 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/dist/lib/branding-core/ai/claude-interpreter.d.ts.map +1 -1
- package/dist/lib/branding-core/ai/claude-interpreter.js +8 -19
- package/dist/lib/branding-core/ai/claude-interpreter.js.map +1 -1
- package/dist/lib/branding-core/exporters/style-dictionary.d.ts +19 -0
- package/dist/lib/branding-core/exporters/style-dictionary.d.ts.map +1 -0
- package/dist/lib/branding-core/exporters/style-dictionary.js +85 -0
- package/dist/lib/branding-core/exporters/style-dictionary.js.map +1 -0
- package/dist/lib/branding-core/generators/brand-voice.d.ts +3 -0
- package/dist/lib/branding-core/generators/brand-voice.d.ts.map +1 -0
- package/dist/lib/branding-core/generators/brand-voice.js +338 -0
- package/dist/lib/branding-core/generators/brand-voice.js.map +1 -0
- package/dist/lib/branding-core/index.d.ts +2 -0
- package/dist/lib/branding-core/index.d.ts.map +1 -1
- package/dist/lib/branding-core/index.js +2 -0
- package/dist/lib/branding-core/index.js.map +1 -1
- package/dist/lib/branding-core/validators/token-schema.d.ts +1 -1
- package/dist/lib/branding-core/validators/token-schema.d.ts.map +1 -1
- package/dist/lib/branding-core/validators/token-schema.js +9 -1
- package/dist/lib/branding-core/validators/token-schema.js.map +1 -1
- package/dist/lib/config.d.ts +3 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +5 -0
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/http-server.d.ts +3 -0
- package/dist/lib/http-server.d.ts.map +1 -0
- package/dist/lib/http-server.js +93 -0
- package/dist/lib/http-server.js.map +1 -0
- package/dist/lib/types.d.ts +27 -1
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/tools/export-design-tokens.d.ts.map +1 -1
- package/dist/tools/export-design-tokens.js +2 -1
- package/dist/tools/export-design-tokens.js.map +1 -1
- package/dist/tools/generate-brand-voice.d.ts +3 -0
- package/dist/tools/generate-brand-voice.d.ts.map +1 -0
- package/dist/tools/generate-brand-voice.js +51 -0
- package/dist/tools/generate-brand-voice.js.map +1 -0
- package/dist/tools/generate-design-system.d.ts.map +1 -1
- package/dist/tools/generate-design-system.js +2 -1
- package/dist/tools/generate-design-system.js.map +1 -1
- package/package.json +21 -3
- package/server.json +41 -0
- package/.env.example +0 -3
- package/.github/CODEOWNERS +0 -1
- package/.github/ISSUE_TEMPLATE/config.yml +0 -8
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -22
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -22
- package/.github/dependabot.yml +0 -17
- package/.github/workflows/ci.yml +0 -55
- package/.github/workflows/codeql.yml +0 -47
- package/.github/workflows/release-automation.yml +0 -56
- package/.github/workflows/secret-scan.yml +0 -13
- package/.github/workflows/security-scan.yml +0 -37
- package/.github/workflows/semgrep.yml +0 -12
- package/.github/workflows/trivy.yml +0 -17
- package/.gitleaks.toml +0 -14
- package/.husky/commit-msg +0 -1
- package/.nvmrc +0 -1
- package/.prettierrc.json +0 -10
- package/CHANGELOG.md +0 -114
- package/CONTRIBUTING.md +0 -203
- package/catalog-info.yaml +0 -16
- package/commitlint.config.cjs +0 -24
- package/data/README.md +0 -13
- package/docs/API.md +0 -110
- package/docs/DATA_SOURCES.md +0 -69
- package/docs/INTEGRATION.md +0 -58
- package/eslint.config.js +0 -52
- package/jest.config.js +0 -40
- package/knip.json +0 -10
- package/src/__tests__/integration/brand-generation.test.ts +0 -84
- package/src/__tests__/integration/mcp-server.test.ts +0 -18
- package/src/__tests__/unit/ai-interpreter.test.ts +0 -172
- package/src/__tests__/unit/border-system.test.ts +0 -77
- package/src/__tests__/unit/color-palette.test.ts +0 -161
- package/src/__tests__/unit/contrast-checker.test.ts +0 -124
- package/src/__tests__/unit/design-system-tool.test.ts +0 -176
- package/src/__tests__/unit/design-tokens.test.ts +0 -184
- package/src/__tests__/unit/favicon-generator.test.ts +0 -80
- package/src/__tests__/unit/gradient-system.test.ts +0 -122
- package/src/__tests__/unit/logo-generator.test.ts +0 -146
- package/src/__tests__/unit/motion-system.test.ts +0 -91
- package/src/__tests__/unit/og-image-generator.test.ts +0 -115
- package/src/__tests__/unit/shadow-system.test.ts +0 -63
- package/src/__tests__/unit/spacing-scale.test.ts +0 -60
- package/src/__tests__/unit/typography-system.test.ts +0 -71
- package/src/index.ts +0 -76
- package/src/lib/branding-core/ai/brand-interpreter.ts +0 -30
- package/src/lib/branding-core/ai/claude-interpreter.ts +0 -76
- package/src/lib/branding-core/ai/intent-applier.ts +0 -59
- package/src/lib/branding-core/ai/keyword-interpreter.ts +0 -95
- package/src/lib/branding-core/ai/prompts.ts +0 -93
- package/src/lib/branding-core/ai/types.ts +0 -36
- package/src/lib/branding-core/documents/html-generator.ts +0 -32
- package/src/lib/branding-core/documents/pdf-generator.ts +0 -21
- package/src/lib/branding-core/exporters/css-variables.ts +0 -71
- package/src/lib/branding-core/exporters/design-tokens.ts +0 -86
- package/src/lib/branding-core/exporters/figma-tokens.ts +0 -87
- package/src/lib/branding-core/exporters/react-theme.ts +0 -69
- package/src/lib/branding-core/exporters/sass-variables.ts +0 -74
- package/src/lib/branding-core/exporters/tailwind-preset.ts +0 -67
- package/src/lib/branding-core/generators/border-system.ts +0 -41
- package/src/lib/branding-core/generators/color-palette.ts +0 -147
- package/src/lib/branding-core/generators/favicon-generator.ts +0 -33
- package/src/lib/branding-core/generators/gradient-system.ts +0 -120
- package/src/lib/branding-core/generators/logo-generator.ts +0 -152
- package/src/lib/branding-core/generators/motion-system.ts +0 -98
- package/src/lib/branding-core/generators/og-image-generator.ts +0 -97
- package/src/lib/branding-core/generators/shadow-system.ts +0 -66
- package/src/lib/branding-core/generators/spacing-scale.ts +0 -29
- package/src/lib/branding-core/generators/typography-system.ts +0 -128
- package/src/lib/branding-core/index.ts +0 -28
- package/src/lib/branding-core/validators/brand-consistency.ts +0 -79
- package/src/lib/branding-core/validators/contrast-checker.ts +0 -37
- package/src/lib/branding-core/validators/token-schema.ts +0 -50
- package/src/lib/config.ts +0 -13
- package/src/lib/logger.ts +0 -12
- package/src/lib/types.ts +0 -236
- package/src/resources/brand-knowledge.ts +0 -60
- package/src/resources/brand-templates.ts +0 -385
- package/src/tools/create-brand-guidelines.ts +0 -94
- package/src/tools/export-design-tokens.ts +0 -52
- package/src/tools/generate-brand-assets.ts +0 -48
- package/src/tools/generate-brand-identity.ts +0 -115
- package/src/tools/generate-color-palette.ts +0 -43
- package/src/tools/generate-design-system.ts +0 -163
- package/src/tools/generate-typography-system.ts +0 -42
- package/src/tools/refine-brand-element.ts +0 -65
- package/src/tools/validate-brand-consistency.ts +0 -32
- package/tsconfig.json +0 -21
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
const TONE_VOCABULARY = {
|
|
2
|
+
professional: {
|
|
3
|
+
preferred: ['strategic', 'expertise', 'solutions', 'deliver', 'optimize', 'excellence'],
|
|
4
|
+
avoided: ['awesome', 'super', 'crazy', 'killer', 'crush it', 'game-changer'],
|
|
5
|
+
},
|
|
6
|
+
friendly: {
|
|
7
|
+
preferred: ['together', 'easy', 'help', 'welcome', 'support', 'community'],
|
|
8
|
+
avoided: ['leverage', 'synergy', 'paradigm', 'utilize', 'facilitate'],
|
|
9
|
+
},
|
|
10
|
+
playful: {
|
|
11
|
+
preferred: ['fun', 'exciting', 'discover', 'explore', 'magic', 'delight'],
|
|
12
|
+
avoided: ['complex', 'enterprise', 'compliance', 'stakeholder', 'deliverable'],
|
|
13
|
+
},
|
|
14
|
+
authoritative: {
|
|
15
|
+
preferred: ['proven', 'leading', 'trusted', 'established', 'definitive', 'expert'],
|
|
16
|
+
avoided: ['maybe', 'try', 'sort of', 'kind of', 'basically', 'literally'],
|
|
17
|
+
},
|
|
18
|
+
empathetic: {
|
|
19
|
+
preferred: ['understand', 'care', 'support', 'journey', 'feel', 'listen'],
|
|
20
|
+
avoided: ['unfortunately', 'problem', 'issue', 'failure', 'impossible', 'can not'],
|
|
21
|
+
},
|
|
22
|
+
inspirational: {
|
|
23
|
+
preferred: ['vision', 'transform', 'empower', 'achieve', 'future', 'possibility'],
|
|
24
|
+
avoided: ['limit', 'restrict', 'constraint', 'barrier', 'obstacle', 'problem'],
|
|
25
|
+
},
|
|
26
|
+
minimalist: {
|
|
27
|
+
preferred: ['clear', 'simple', 'focus', 'essential', 'clean', 'direct'],
|
|
28
|
+
avoided: ['comprehensive', 'extensive', 'numerous', 'various', 'multiple', 'several'],
|
|
29
|
+
},
|
|
30
|
+
bold: {
|
|
31
|
+
preferred: ['disrupt', 'revolutionize', 'breakthrough', 'fearless', 'unstoppable', 'define'],
|
|
32
|
+
avoided: ['traditional', 'conventional', 'standard', 'typical', 'normal', 'ordinary'],
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
const TONE_PERSONALITY = {
|
|
36
|
+
professional: ['Precise', 'Credible', 'Reliable', 'Authoritative', 'Clear'],
|
|
37
|
+
friendly: ['Warm', 'Approachable', 'Supportive', 'Human', 'Genuine'],
|
|
38
|
+
playful: ['Energetic', 'Creative', 'Witty', 'Curious', 'Enthusiastic'],
|
|
39
|
+
authoritative: ['Expert', 'Confident', 'Definitive', 'Trustworthy', 'Knowledgeable'],
|
|
40
|
+
empathetic: ['Understanding', 'Compassionate', 'Supportive', 'Attentive', 'Inclusive'],
|
|
41
|
+
inspirational: ['Visionary', 'Motivating', 'Uplifting', 'Ambitious', 'Forward-thinking'],
|
|
42
|
+
minimalist: ['Focused', 'Elegant', 'Intentional', 'Refined', 'Essential'],
|
|
43
|
+
bold: ['Daring', 'Disruptive', 'Passionate', 'Unconventional', 'Fierce'],
|
|
44
|
+
};
|
|
45
|
+
const SENTENCE_STYLE = {
|
|
46
|
+
professional: { averageLength: 'medium', structure: 'varied' },
|
|
47
|
+
friendly: { averageLength: 'short', structure: 'simple' },
|
|
48
|
+
playful: { averageLength: 'short', structure: 'varied' },
|
|
49
|
+
authoritative: { averageLength: 'medium', structure: 'complex' },
|
|
50
|
+
empathetic: { averageLength: 'short', structure: 'simple' },
|
|
51
|
+
inspirational: { averageLength: 'medium', structure: 'varied' },
|
|
52
|
+
minimalist: { averageLength: 'short', structure: 'simple' },
|
|
53
|
+
bold: { averageLength: 'short', structure: 'simple' },
|
|
54
|
+
};
|
|
55
|
+
function inferTone(brand) {
|
|
56
|
+
const styleToTone = {
|
|
57
|
+
minimal: 'minimalist',
|
|
58
|
+
bold: 'bold',
|
|
59
|
+
elegant: 'professional',
|
|
60
|
+
playful: 'playful',
|
|
61
|
+
corporate: 'authoritative',
|
|
62
|
+
tech: 'professional',
|
|
63
|
+
organic: 'empathetic',
|
|
64
|
+
retro: 'friendly',
|
|
65
|
+
};
|
|
66
|
+
return styleToTone[brand.style] ?? 'professional';
|
|
67
|
+
}
|
|
68
|
+
function inferAudience(brand) {
|
|
69
|
+
const industry = brand.industry.toLowerCase();
|
|
70
|
+
if (industry.includes('enterprise') ||
|
|
71
|
+
industry.includes('b2b') ||
|
|
72
|
+
industry.includes('consulting')) {
|
|
73
|
+
return 'enterprise';
|
|
74
|
+
}
|
|
75
|
+
if (industry.includes('startup') || industry.includes('venture')) {
|
|
76
|
+
return 'startup';
|
|
77
|
+
}
|
|
78
|
+
if (industry.includes('creative') || industry.includes('design') || industry.includes('art')) {
|
|
79
|
+
return 'creative';
|
|
80
|
+
}
|
|
81
|
+
if (industry.includes('retail') ||
|
|
82
|
+
industry.includes('consumer') ||
|
|
83
|
+
industry.includes('ecommerce')) {
|
|
84
|
+
return 'consumer';
|
|
85
|
+
}
|
|
86
|
+
if (industry.includes('tech') || industry.includes('software') || industry.includes('saas')) {
|
|
87
|
+
return 'technical';
|
|
88
|
+
}
|
|
89
|
+
return 'general';
|
|
90
|
+
}
|
|
91
|
+
function generateTaglines(brand, tone) {
|
|
92
|
+
const name = brand.name;
|
|
93
|
+
const industry = brand.industry;
|
|
94
|
+
const templates = {
|
|
95
|
+
professional: [
|
|
96
|
+
`${name}. Excellence in ${industry}.`,
|
|
97
|
+
`Delivering ${industry} solutions that matter.`,
|
|
98
|
+
`Where ${industry} expertise meets results.`,
|
|
99
|
+
],
|
|
100
|
+
friendly: [
|
|
101
|
+
`${name}. Here to help.`,
|
|
102
|
+
`Making ${industry} easy for everyone.`,
|
|
103
|
+
`Your ${industry} partner, always.`,
|
|
104
|
+
],
|
|
105
|
+
playful: [
|
|
106
|
+
`${name}. Let's have fun with ${industry}!`,
|
|
107
|
+
`${industry} made joyful.`,
|
|
108
|
+
`Discover the joy of ${industry} with ${name}.`,
|
|
109
|
+
],
|
|
110
|
+
authoritative: [
|
|
111
|
+
`${name}. The ${industry} authority.`,
|
|
112
|
+
`Leading ${industry} innovation since day one.`,
|
|
113
|
+
`The trusted name in ${industry}.`,
|
|
114
|
+
],
|
|
115
|
+
empathetic: [
|
|
116
|
+
`${name}. We understand ${industry}.`,
|
|
117
|
+
`${industry} designed around you.`,
|
|
118
|
+
`Your journey. Our ${industry} expertise.`,
|
|
119
|
+
],
|
|
120
|
+
inspirational: [
|
|
121
|
+
`${name}. Transform your ${industry}.`,
|
|
122
|
+
`Empowering ${industry} leaders everywhere.`,
|
|
123
|
+
`The future of ${industry} starts here.`,
|
|
124
|
+
],
|
|
125
|
+
minimalist: [
|
|
126
|
+
`${name}. ${industry}. Simplified.`,
|
|
127
|
+
`Less complexity. More ${industry}.`,
|
|
128
|
+
`${industry} distilled.`,
|
|
129
|
+
],
|
|
130
|
+
bold: [
|
|
131
|
+
`${name}. Redefining ${industry}.`,
|
|
132
|
+
`${industry} will never be the same.`,
|
|
133
|
+
`Break the rules of ${industry}.`,
|
|
134
|
+
],
|
|
135
|
+
};
|
|
136
|
+
return templates[tone];
|
|
137
|
+
}
|
|
138
|
+
function generateSampleCopy(brand, tone, audience) {
|
|
139
|
+
const { name, industry } = brand;
|
|
140
|
+
const audiencePhrases = {
|
|
141
|
+
b2b: 'businesses',
|
|
142
|
+
b2c: 'customers',
|
|
143
|
+
enterprise: 'enterprise teams',
|
|
144
|
+
startup: 'startups',
|
|
145
|
+
consumer: 'people',
|
|
146
|
+
technical: 'developers',
|
|
147
|
+
creative: 'creators',
|
|
148
|
+
general: 'everyone',
|
|
149
|
+
};
|
|
150
|
+
const target = audiencePhrases[audience];
|
|
151
|
+
const copies = {
|
|
152
|
+
professional: {
|
|
153
|
+
headline: `Elevate Your ${industry} Strategy`,
|
|
154
|
+
subheadline: `${name} delivers professional-grade ${industry} solutions tailored for ${target} who demand excellence.`,
|
|
155
|
+
cta: `Start Your Journey`,
|
|
156
|
+
aboutUs: `${name} is a leading ${industry} company dedicated to helping ${target} achieve measurable results through proven expertise and innovative thinking.`,
|
|
157
|
+
},
|
|
158
|
+
friendly: {
|
|
159
|
+
headline: `${industry} Made Simple`,
|
|
160
|
+
subheadline: `We're here to help ${target} navigate ${industry} with ease. No jargon, just real support.`,
|
|
161
|
+
cta: `Let's Get Started`,
|
|
162
|
+
aboutUs: `Hey there! We're ${name}, a friendly team passionate about making ${industry} accessible to ${target}. We're in your corner every step of the way.`,
|
|
163
|
+
},
|
|
164
|
+
playful: {
|
|
165
|
+
headline: `Let's Do ${industry} Differently!`,
|
|
166
|
+
subheadline: `${name} brings fun and creativity to ${industry} for ${target} who love to explore.`,
|
|
167
|
+
cta: `Join the Adventure`,
|
|
168
|
+
aboutUs: `We're ${name} — a bunch of passionate ${industry} enthusiasts who believe ${target} deserve a joyful, exciting experience. Buckle up!`,
|
|
169
|
+
},
|
|
170
|
+
authoritative: {
|
|
171
|
+
headline: `The Industry Standard in ${industry}`,
|
|
172
|
+
subheadline: `Trusted by ${target} worldwide, ${name} sets the benchmark for ${industry} excellence.`,
|
|
173
|
+
cta: `Explore Our Expertise`,
|
|
174
|
+
aboutUs: `${name} is the recognized authority in ${industry}, providing ${target} with definitive solutions backed by decades of expertise and research.`,
|
|
175
|
+
},
|
|
176
|
+
empathetic: {
|
|
177
|
+
headline: `We Get ${industry}. We Get You.`,
|
|
178
|
+
subheadline: `${name} listens first. We design ${industry} solutions that truly work for ${target}.`,
|
|
179
|
+
cta: `Let's Talk`,
|
|
180
|
+
aboutUs: `${name} was built with empathy at its core. We understand the challenges ${target} face in ${industry} and create solutions that genuinely address your needs.`,
|
|
181
|
+
},
|
|
182
|
+
inspirational: {
|
|
183
|
+
headline: `Transform Your ${industry} Future`,
|
|
184
|
+
subheadline: `${name} empowers ${target} to achieve what others call impossible in ${industry}.`,
|
|
185
|
+
cta: `Start Transforming`,
|
|
186
|
+
aboutUs: `${name} exists to inspire and empower ${target}. We believe the future of ${industry} belongs to those bold enough to reimagine it.`,
|
|
187
|
+
},
|
|
188
|
+
minimalist: {
|
|
189
|
+
headline: `${industry}. Simplified.`,
|
|
190
|
+
subheadline: `${name} gives ${target} exactly what they need. Nothing more.`,
|
|
191
|
+
cta: `See How`,
|
|
192
|
+
aboutUs: `${name}. We do ${industry} well. That's it.`,
|
|
193
|
+
},
|
|
194
|
+
bold: {
|
|
195
|
+
headline: `Redefine ${industry}`,
|
|
196
|
+
subheadline: `${name} is for ${target} who refuse to settle. We don't follow ${industry} trends — we set them.`,
|
|
197
|
+
cta: `Make Your Move`,
|
|
198
|
+
aboutUs: `${name} is not your average ${industry} company. We challenge conventions, break boundaries, and help ${target} achieve the extraordinary.`,
|
|
199
|
+
},
|
|
200
|
+
};
|
|
201
|
+
return copies[tone];
|
|
202
|
+
}
|
|
203
|
+
function generateDoAndDont(tone) {
|
|
204
|
+
const rules = {
|
|
205
|
+
professional: {
|
|
206
|
+
do: [
|
|
207
|
+
'Use precise, industry-specific language',
|
|
208
|
+
'Back claims with data and evidence',
|
|
209
|
+
'Maintain formal but approachable tone',
|
|
210
|
+
'Focus on outcomes and value delivered',
|
|
211
|
+
],
|
|
212
|
+
dont: [
|
|
213
|
+
'Use slang or overly casual language',
|
|
214
|
+
'Make unsubstantiated claims',
|
|
215
|
+
'Be condescending or overly formal',
|
|
216
|
+
'Bury the key message in jargon',
|
|
217
|
+
],
|
|
218
|
+
},
|
|
219
|
+
friendly: {
|
|
220
|
+
do: [
|
|
221
|
+
'Use conversational, warm language',
|
|
222
|
+
'Address the reader directly with "you"',
|
|
223
|
+
'Acknowledge challenges with empathy',
|
|
224
|
+
'Keep sentences short and clear',
|
|
225
|
+
],
|
|
226
|
+
dont: [
|
|
227
|
+
'Use corporate buzzwords',
|
|
228
|
+
'Sound scripted or robotic',
|
|
229
|
+
'Ignore the human element',
|
|
230
|
+
'Be overly promotional',
|
|
231
|
+
],
|
|
232
|
+
},
|
|
233
|
+
playful: {
|
|
234
|
+
do: [
|
|
235
|
+
'Use wordplay and light humor',
|
|
236
|
+
'Embrace exclamation and energy',
|
|
237
|
+
'Tell stories and use vivid imagery',
|
|
238
|
+
'Invite participation and interaction',
|
|
239
|
+
],
|
|
240
|
+
dont: [
|
|
241
|
+
'Be sarcastic or mean-spirited',
|
|
242
|
+
'Use humor that alienates people',
|
|
243
|
+
'Let playfulness undermine credibility',
|
|
244
|
+
'Overdo the exclamation marks',
|
|
245
|
+
],
|
|
246
|
+
},
|
|
247
|
+
authoritative: {
|
|
248
|
+
do: [
|
|
249
|
+
'Lead with expertise and credentials',
|
|
250
|
+
'Use definitive statements confidently',
|
|
251
|
+
'Reference data, research, and results',
|
|
252
|
+
'Establish thought leadership',
|
|
253
|
+
],
|
|
254
|
+
dont: [
|
|
255
|
+
'Hedge or use uncertain language',
|
|
256
|
+
'Over-explain obvious concepts',
|
|
257
|
+
'Sound arrogant or dismissive',
|
|
258
|
+
'Use passive voice excessively',
|
|
259
|
+
],
|
|
260
|
+
},
|
|
261
|
+
empathetic: {
|
|
262
|
+
do: [
|
|
263
|
+
"Acknowledge the reader's feelings",
|
|
264
|
+
'Use inclusive, supportive language',
|
|
265
|
+
'Frame problems as shared challenges',
|
|
266
|
+
'Offer reassurance and solutions',
|
|
267
|
+
],
|
|
268
|
+
dont: [
|
|
269
|
+
'Dismiss or minimize concerns',
|
|
270
|
+
'Use clinical or detached language',
|
|
271
|
+
'Focus only on features, not feelings',
|
|
272
|
+
'Promise more than you can deliver',
|
|
273
|
+
],
|
|
274
|
+
},
|
|
275
|
+
inspirational: {
|
|
276
|
+
do: [
|
|
277
|
+
'Paint a compelling vision of the future',
|
|
278
|
+
'Use strong action verbs',
|
|
279
|
+
'Connect to purpose and meaning',
|
|
280
|
+
'Celebrate achievements and progress',
|
|
281
|
+
],
|
|
282
|
+
dont: [
|
|
283
|
+
'Be vague or abstract without direction',
|
|
284
|
+
'Use clichés without substance',
|
|
285
|
+
'Overpromise without grounding',
|
|
286
|
+
'Ignore the practical path forward',
|
|
287
|
+
],
|
|
288
|
+
},
|
|
289
|
+
minimalist: {
|
|
290
|
+
do: [
|
|
291
|
+
'Choose every word deliberately',
|
|
292
|
+
'Eliminate redundancy ruthlessly',
|
|
293
|
+
'Let white space do the work',
|
|
294
|
+
'Say one thing at a time',
|
|
295
|
+
],
|
|
296
|
+
dont: [
|
|
297
|
+
'Pad copy with filler words',
|
|
298
|
+
'Use three words when one will do',
|
|
299
|
+
'Add unnecessary qualifiers',
|
|
300
|
+
'Over-explain the obvious',
|
|
301
|
+
],
|
|
302
|
+
},
|
|
303
|
+
bold: {
|
|
304
|
+
do: [
|
|
305
|
+
'Make confident, direct statements',
|
|
306
|
+
'Challenge conventional thinking',
|
|
307
|
+
'Use strong, active language',
|
|
308
|
+
'Stand for something specific',
|
|
309
|
+
],
|
|
310
|
+
dont: [
|
|
311
|
+
'Be aggressive or offensive',
|
|
312
|
+
'Alienate potential customers',
|
|
313
|
+
'Sacrifice clarity for impact',
|
|
314
|
+
'Make claims you cannot back up',
|
|
315
|
+
],
|
|
316
|
+
},
|
|
317
|
+
};
|
|
318
|
+
return rules[tone];
|
|
319
|
+
}
|
|
320
|
+
export function generateBrandVoice(brand, overrideTone, overrideAudience) {
|
|
321
|
+
const tone = overrideTone ?? inferTone(brand);
|
|
322
|
+
const audience = overrideAudience ?? inferAudience(brand);
|
|
323
|
+
const vocab = TONE_VOCABULARY[tone];
|
|
324
|
+
return {
|
|
325
|
+
tone,
|
|
326
|
+
audience,
|
|
327
|
+
vocabulary: {
|
|
328
|
+
preferred: vocab.preferred,
|
|
329
|
+
avoided: vocab.avoided,
|
|
330
|
+
},
|
|
331
|
+
sentenceStyle: SENTENCE_STYLE[tone],
|
|
332
|
+
personality: TONE_PERSONALITY[tone],
|
|
333
|
+
taglineSuggestions: generateTaglines(brand, tone),
|
|
334
|
+
sampleCopy: generateSampleCopy(brand, tone, audience),
|
|
335
|
+
doAndDont: generateDoAndDont(tone),
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
//# sourceMappingURL=brand-voice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brand-voice.js","sourceRoot":"","sources":["../../../../src/lib/branding-core/generators/brand-voice.ts"],"names":[],"mappings":"AAOA,MAAM,eAAe,GAAuE;IAC1F,YAAY,EAAE;QACZ,SAAS,EAAE,CAAC,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,CAAC;QACvF,OAAO,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,cAAc,CAAC;KAC7E;IACD,QAAQ,EAAE;QACR,SAAS,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC;QAC1E,OAAO,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,CAAC;KACtE;IACD,OAAO,EAAE;QACP,SAAS,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC;QACzE,OAAO,EAAE,CAAC,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,CAAC;KAC/E;IACD,aAAa,EAAE;QACb,SAAS,EAAE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;aAC3B;SACF;QACD,IAAI,EAAE;YACJ,EAAE,EAAE;gBACF,mCAAmC;gBACnC,iCAAiC;gBACjC,6BAA6B;gBAC7B,8BAA8B;aAC/B;YACD,IAAI,EAAE;gBACJ,4BAA4B;gBAC5B,8BAA8B;gBAC9B,8BAA8B;gBAC9B,gCAAgC;aACjC;SACF;KACF,CAAC;IAEF,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,KAAoB,EACpB,YAA6B,EAC7B,gBAAqC;IAErC,MAAM,IAAI,GAAG,YAAY,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,QAAQ,GAAG,gBAAgB,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC;IAC1D,MAAM,KAAK,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAEpC,OAAO;QACL,IAAI;QACJ,QAAQ;QACR,UAAU,EAAE;YACV,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,OAAO,EAAE,KAAK,CAAC,OAAO;SACvB;QACD,aAAa,EAAE,cAAc,CAAC,IAAI,CAAC;QACnC,WAAW,EAAE,gBAAgB,CAAC,IAAI,CAAC;QACnC,kBAAkB,EAAE,gBAAgB,CAAC,KAAK,EAAE,IAAI,CAAC;QACjD,UAAU,EAAE,kBAAkB,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC;QACrD,SAAS,EAAE,iBAAiB,CAAC,IAAI,CAAC;KACnC,CAAC;AACJ,CAAC"}
|
|
@@ -14,6 +14,8 @@ export { exportTailwindPreset } from './exporters/tailwind-preset.js';
|
|
|
14
14
|
export { exportFigmaTokens } from './exporters/figma-tokens.js';
|
|
15
15
|
export { exportReactTheme } from './exporters/react-theme.js';
|
|
16
16
|
export { exportSassVariables } from './exporters/sass-variables.js';
|
|
17
|
+
export { exportStyleDictionary } from './exporters/style-dictionary.js';
|
|
18
|
+
export { generateBrandVoice } from './generators/brand-voice.js';
|
|
17
19
|
export { validateBrandConsistency } from './validators/brand-consistency.js';
|
|
18
20
|
export { validateContrast } from './validators/contrast-checker.js';
|
|
19
21
|
export { interpretFeedback } from './ai/brand-interpreter.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/branding-core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,QAAQ,EACR,QAAQ,GACT,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC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,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACpG,YAAY,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -14,6 +14,8 @@ export { exportTailwindPreset } from './exporters/tailwind-preset.js';
|
|
|
14
14
|
export { exportFigmaTokens } from './exporters/figma-tokens.js';
|
|
15
15
|
export { exportReactTheme } from './exporters/react-theme.js';
|
|
16
16
|
export { exportSassVariables } from './exporters/sass-variables.js';
|
|
17
|
+
export { exportStyleDictionary } from './exporters/style-dictionary.js';
|
|
18
|
+
export { generateBrandVoice } from './generators/brand-voice.js';
|
|
17
19
|
export { validateBrandConsistency } from './validators/brand-consistency.js';
|
|
18
20
|
export { validateContrast } from './validators/contrast-checker.js';
|
|
19
21
|
export { interpretFeedback } from './ai/brand-interpreter.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/branding-core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,QAAQ,EACR,QAAQ,GACT,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,oB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EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -4,7 +4,7 @@ export declare const colorHarmonySchema: z.ZodEnum<["complementary", "analogous"
|
|
|
4
4
|
export declare const colorThemeSchema: z.ZodEnum<["light", "dark", "both"]>;
|
|
5
5
|
export declare const fontCategorySchema: z.ZodEnum<["serif", "sans-serif", "monospace", "display", "handwriting"]>;
|
|
6
6
|
export declare const typeScaleRatioSchema: z.ZodEnum<["minor-second", "major-second", "minor-third", "major-third", "perfect-fourth", "augmented-fourth", "perfect-fifth", "golden-ratio"]>;
|
|
7
|
-
export declare const exportFormatSchema: z.ZodEnum<["json", "css", "tailwind", "figma", "react", "sass"]>;
|
|
7
|
+
export declare const exportFormatSchema: z.ZodEnum<["json", "css", "tailwind", "figma", "react", "sass", "style-dictionary"]>;
|
|
8
8
|
export declare const brandStyleSchema: z.ZodEnum<["minimal", "bold", "elegant", "playful", "corporate", "tech", "organic", "retro"]>;
|
|
9
9
|
export declare const brandDocFormatSchema: z.ZodEnum<["pdf", "html"]>;
|
|
10
10
|
//# sourceMappingURL=token-schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-schema.d.ts","sourceRoot":"","sources":["../../../../src/lib/branding-core/validators/token-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc,aAEyC,CAAC;AAErE,eAAO,MAAM,kBAAkB,0GAO7B,CAAC;AAEH,eAAO,MAAM,gBAAgB,sCAAoC,CAAC;AAElE,eAAO,MAAM,kBAAkB,2EAM7B,CAAC;AAEH,eAAO,MAAM,oBAAoB,kJAS/B,CAAC;AAEH,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"token-schema.d.ts","sourceRoot":"","sources":["../../../../src/lib/branding-core/validators/token-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc,aAEyC,CAAC;AAErE,eAAO,MAAM,kBAAkB,0GAO7B,CAAC;AAEH,eAAO,MAAM,gBAAgB,sCAAoC,CAAC;AAElE,eAAO,MAAM,kBAAkB,2EAM7B,CAAC;AAEH,eAAO,MAAM,oBAAoB,kJAS/B,CAAC;AAEH,eAAO,MAAM,kBAAkB,sFAQ7B,CAAC;AAEH,eAAO,MAAM,gBAAgB,+FAS3B,CAAC;AAEH,eAAO,MAAM,oBAAoB,4BAA0B,CAAC"}
|
|
@@ -28,7 +28,15 @@ export const typeScaleRatioSchema = z.enum([
|
|
|
28
28
|
'perfect-fifth',
|
|
29
29
|
'golden-ratio',
|
|
30
30
|
]);
|
|
31
|
-
export const exportFormatSchema = z.enum([
|
|
31
|
+
export const exportFormatSchema = z.enum([
|
|
32
|
+
'json',
|
|
33
|
+
'css',
|
|
34
|
+
'tailwind',
|
|
35
|
+
'figma',
|
|
36
|
+
'react',
|
|
37
|
+
'sass',
|
|
38
|
+
'style-dictionary',
|
|
39
|
+
]);
|
|
32
40
|
export const brandStyleSchema = z.enum([
|
|
33
41
|
'minimal',
|
|
34
42
|
'bold',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-schema.js","sourceRoot":"","sources":["../../../../src/lib/branding-core/validators/token-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC;KAC5B,MAAM,EAAE;KACR,KAAK,CAAC,mBAAmB,EAAE,qCAAqC,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC;IACvC,eAAe;IACf,WAAW;IACX,SAAS;IACT,qBAAqB;IACrB,UAAU;IACV,eAAe;CAChB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAElE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC;IACvC,OAAO;IACP,YAAY;IACZ,WAAW;IACX,SAAS;IACT,aAAa;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC;IACzC,cAAc;IACd,cAAc;IACd,aAAa;IACb,aAAa;IACb,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IACf,cAAc;CACf,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"token-schema.js","sourceRoot":"","sources":["../../../../src/lib/branding-core/validators/token-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC;KAC5B,MAAM,EAAE;KACR,KAAK,CAAC,mBAAmB,EAAE,qCAAqC,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC;IACvC,eAAe;IACf,WAAW;IACX,SAAS;IACT,qBAAqB;IACrB,UAAU;IACV,eAAe;CAChB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAElE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC;IACvC,OAAO;IACP,YAAY;IACZ,WAAW;IACX,SAAS;IACT,aAAa;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC;IACzC,cAAc;IACd,cAAc;IACd,aAAa;IACb,aAAa;IACb,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IACf,cAAc;CACf,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC;IACvC,MAAM;IACN,KAAK;IACL,UAAU;IACV,OAAO;IACP,OAAO;IACP,MAAM;IACN,kBAAkB;CACnB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC;IACrC,SAAS;IACT,MAAM;IACN,SAAS;IACT,SAAS;IACT,WAAW;IACX,MAAM;IACN,SAAS;IACT,OAAO;CACR,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC"}
|
package/dist/lib/config.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
export type TransportMode = 'stdio' | 'http';
|
|
1
2
|
export interface AppConfig {
|
|
2
3
|
logLevel: string;
|
|
3
4
|
nodeEnv: string;
|
|
4
5
|
anthropicApiKey?: string;
|
|
6
|
+
transport: TransportMode;
|
|
7
|
+
port: number;
|
|
5
8
|
}
|
|
6
9
|
export declare function loadConfig(): AppConfig;
|
|
7
10
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/lib/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,aAAa,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,UAAU,IAAI,SAAS,CAYtC"}
|
package/dist/lib/config.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export function loadConfig() {
|
|
2
|
+
const rawTransport = process.env.MCP_TRANSPORT ?? 'stdio';
|
|
3
|
+
const transport = rawTransport === 'http' ? 'http' : 'stdio';
|
|
4
|
+
const port = parseInt(process.env.PORT ?? '3000', 10);
|
|
2
5
|
return {
|
|
3
6
|
logLevel: process.env.LOG_LEVEL ?? 'info',
|
|
4
7
|
nodeEnv: process.env.NODE_ENV ?? 'development',
|
|
5
8
|
anthropicApiKey: process.env.ANTHROPIC_API_KEY,
|
|
9
|
+
transport,
|
|
10
|
+
port,
|
|
6
11
|
};
|
|
7
12
|
}
|
|
8
13
|
//# sourceMappingURL=config.js.map
|
package/dist/lib/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,UAAU;IACxB,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,OAAO,CAAC;IAC1D,MAAM,SAAS,GAAkB,YAAY,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;IAC5E,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,MAAM,EAAE,EAAE,CAAC,CAAC;IAEtD,OAAO;QACL,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,MAAM;QACzC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa;QAC9C,eAAe,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB;QAC9C,SAAS;QACT,IAAI;KACL,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-server.d.ts","sourceRoot":"","sources":["../../src/lib/http-server.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE,wBAAsB,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAwFpF"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { createServer } from 'node:http';
|
|
2
|
+
import { randomUUID } from 'node:crypto';
|
|
3
|
+
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
4
|
+
import { logger } from './logger.js';
|
|
5
|
+
export async function startHttpServer(server, port) {
|
|
6
|
+
const transports = new Map();
|
|
7
|
+
const httpServer = createServer(async (req, res) => {
|
|
8
|
+
const url = new URL(req.url ?? '/', `http://localhost:${port}`);
|
|
9
|
+
if (url.pathname !== '/mcp') {
|
|
10
|
+
res.writeHead(404, { 'Content-Type': 'application/json' });
|
|
11
|
+
res.end(JSON.stringify({ error: 'Not found. Use POST /mcp' }));
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
if (req.method === 'GET') {
|
|
15
|
+
const sessionId = req.headers['mcp-session-id'];
|
|
16
|
+
if (sessionId && transports.has(sessionId)) {
|
|
17
|
+
const transport = transports.get(sessionId);
|
|
18
|
+
await transport.handleRequest(req, res);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
res.writeHead(400, { 'Content-Type': 'application/json' });
|
|
22
|
+
res.end(JSON.stringify({ error: 'Invalid or missing session ID' }));
|
|
23
|
+
}
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (req.method === 'DELETE') {
|
|
27
|
+
const sessionId = req.headers['mcp-session-id'];
|
|
28
|
+
if (sessionId && transports.has(sessionId)) {
|
|
29
|
+
await transports.get(sessionId).close();
|
|
30
|
+
transports.delete(sessionId);
|
|
31
|
+
res.writeHead(200);
|
|
32
|
+
res.end();
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
res.writeHead(404);
|
|
36
|
+
res.end();
|
|
37
|
+
}
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (req.method !== 'POST') {
|
|
41
|
+
res.writeHead(405, { 'Content-Type': 'application/json' });
|
|
42
|
+
res.end(JSON.stringify({ error: 'Method not allowed' }));
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const body = await readBody(req);
|
|
46
|
+
let parsed;
|
|
47
|
+
try {
|
|
48
|
+
parsed = JSON.parse(body);
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
res.writeHead(400, { 'Content-Type': 'application/json' });
|
|
52
|
+
res.end(JSON.stringify({ error: 'Invalid JSON body' }));
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const sessionId = req.headers['mcp-session-id'];
|
|
56
|
+
if (sessionId && transports.has(sessionId)) {
|
|
57
|
+
await transports.get(sessionId).handleRequest(req, res, parsed);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const transport = new StreamableHTTPServerTransport({
|
|
61
|
+
sessionIdGenerator: () => randomUUID(),
|
|
62
|
+
onsessioninitialized: (id) => {
|
|
63
|
+
transports.set(id, transport);
|
|
64
|
+
logger.info({ sessionId: id }, 'MCP session initialized');
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
transport.onclose = () => {
|
|
68
|
+
const id = transport.sessionId;
|
|
69
|
+
if (id) {
|
|
70
|
+
transports.delete(id);
|
|
71
|
+
logger.info({ sessionId: id }, 'MCP session closed');
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
await server.connect(transport);
|
|
75
|
+
await transport.handleRequest(req, res, parsed);
|
|
76
|
+
});
|
|
77
|
+
await new Promise((resolve, reject) => {
|
|
78
|
+
httpServer.on('error', reject);
|
|
79
|
+
httpServer.listen(port, () => {
|
|
80
|
+
logger.info({ port }, 'Branding MCP HTTP server listening');
|
|
81
|
+
resolve();
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function readBody(req) {
|
|
86
|
+
return new Promise((resolve, reject) => {
|
|
87
|
+
const chunks = [];
|
|
88
|
+
req.on('data', (chunk) => chunks.push(chunk));
|
|
89
|
+
req.on('end', () => resolve(Buffer.concat(chunks).toString('utf8')));
|
|
90
|
+
req.on('error', reject);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=http-server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-server.js","sourceRoot":"","sources":["../../src/lib/http-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA6C,MAAM,WAAW,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,MAAiB,EAAE,IAAY;IACnE,MAAM,UAAU,GAAG,IAAI,GAAG,EAAyC,CAAC;IAEpE,MAAM,UAAU,GAAG,YAAY,CAAC,KAAK,EAAE,GAAoB,EAAE,GAAmB,EAAE,EAAE;QAClF,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,EAAE,oBAAoB,IAAI,EAAE,CAAC,CAAC;QAEhE,IAAI,GAAG,CAAC,QAAQ,KAAK,MAAM,EAAE,CAAC;YAC5B,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC,CAAC;YAC3D,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,0BAA0B,EAAE,CAAC,CAAC,CAAC;YAC/D,OAAO;QACT,CAAC;QAED,IAAI,GAAG,CAAC,MAAM,KAAK,KAAK,EAAE,CAAC;YACzB,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAA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split-co
|
|
|
2
2
|
export type ColorTheme = 'light' | 'dark' | 'both';
|
|
3
3
|
export type FontCategory = 'serif' | 'sans-serif' | 'monospace' | 'display' | 'handwriting';
|
|
4
4
|
export type TypeScaleRatio = 'minor-second' | 'major-second' | 'minor-third' | 'major-third' | 'perfect-fourth' | 'augmented-fourth' | 'perfect-fifth' | 'golden-ratio';
|
|
5
|
-
export type ExportFormat = 'json' | 'css' | 'tailwind' | 'figma' | 'react' | 'sass';
|
|
5
|
+
export type ExportFormat = 'json' | 'css' | 'tailwind' | 'figma' | 'react' | 'sass' | 'style-dictionary';
|
|
6
6
|
export type BrandDocFormat = 'pdf' | 'html';
|
|
7
7
|
export type BrandStyle = 'minimal' | 'bold' | 'elegant' | 'playful' | 'corporate' | 'tech' | 'organic' | 'retro';
|
|
8
8
|
export interface HslColor {
|
|
@@ -194,6 +194,32 @@ export interface BrandGenerationInput {
|
|
|
194
194
|
scaleRatio?: TypeScaleRatio;
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
|
+
export type BrandVoiceTone = 'professional' | 'friendly' | 'playful' | 'authoritative' | 'empathetic' | 'inspirational' | 'minimalist' | 'bold';
|
|
198
|
+
export type BrandVoiceAudience = 'b2b' | 'b2c' | 'enterprise' | 'startup' | 'consumer' | 'technical' | 'creative' | 'general';
|
|
199
|
+
export interface BrandVoiceGuidelines {
|
|
200
|
+
tone: BrandVoiceTone;
|
|
201
|
+
audience: BrandVoiceAudience;
|
|
202
|
+
vocabulary: {
|
|
203
|
+
preferred: string[];
|
|
204
|
+
avoided: string[];
|
|
205
|
+
};
|
|
206
|
+
sentenceStyle: {
|
|
207
|
+
averageLength: 'short' | 'medium' | 'long';
|
|
208
|
+
structure: 'simple' | 'varied' | 'complex';
|
|
209
|
+
};
|
|
210
|
+
personality: string[];
|
|
211
|
+
taglineSuggestions: string[];
|
|
212
|
+
sampleCopy: {
|
|
213
|
+
headline: string;
|
|
214
|
+
subheadline: string;
|
|
215
|
+
cta: string;
|
|
216
|
+
aboutUs: string;
|
|
217
|
+
};
|
|
218
|
+
doAndDont: {
|
|
219
|
+
do: string[];
|
|
220
|
+
dont: string[];
|
|
221
|
+
};
|
|
222
|
+
}
|
|
197
223
|
export interface BrandValidationResult {
|
|
198
224
|
valid: boolean;
|
|
199
225
|
score: number;
|