rampkit-mcp-server 0.1.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 +160 -0
- package/dist/api/rampkit.d.ts +96 -0
- package/dist/api/rampkit.d.ts.map +1 -0
- package/dist/api/rampkit.js +391 -0
- package/dist/api/rampkit.js.map +1 -0
- package/dist/detection/platform.d.ts +11 -0
- package/dist/detection/platform.d.ts.map +1 -0
- package/dist/detection/platform.js +420 -0
- package/dist/detection/platform.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/index.d.ts +24 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +183 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/resources/authoring-guide.d.ts +9 -0
- package/dist/resources/authoring-guide.d.ts.map +1 -0
- package/dist/resources/authoring-guide.js +487 -0
- package/dist/resources/authoring-guide.js.map +1 -0
- package/dist/resources/best-practices.d.ts +8 -0
- package/dist/resources/best-practices.d.ts.map +1 -0
- package/dist/resources/best-practices.js +92 -0
- package/dist/resources/best-practices.js.map +1 -0
- package/dist/resources/index.d.ts +19 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +236 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/resources/schema.d.ts +42 -0
- package/dist/resources/schema.d.ts.map +1 -0
- package/dist/resources/schema.js +239 -0
- package/dist/resources/schema.js.map +1 -0
- package/dist/resources/sdk-guide.d.ts +7 -0
- package/dist/resources/sdk-guide.d.ts.map +1 -0
- package/dist/resources/sdk-guide.js +368 -0
- package/dist/resources/sdk-guide.js.map +1 -0
- package/dist/resources/templates.d.ts +9 -0
- package/dist/resources/templates.d.ts.map +1 -0
- package/dist/resources/templates.js +874 -0
- package/dist/resources/templates.js.map +1 -0
- package/dist/server.d.ts +10 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +109 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/instructions.d.ts +23 -0
- package/dist/tools/instructions.d.ts.map +1 -0
- package/dist/tools/instructions.js +74 -0
- package/dist/tools/instructions.js.map +1 -0
- package/dist/tools/onboarding.d.ts +211 -0
- package/dist/tools/onboarding.d.ts.map +1 -0
- package/dist/tools/onboarding.js +452 -0
- package/dist/tools/onboarding.js.map +1 -0
- package/dist/tools/setup.d.ts +61 -0
- package/dist/tools/setup.d.ts.map +1 -0
- package/dist/tools/setup.js +543 -0
- package/dist/tools/setup.js.map +1 -0
- package/dist/types.d.ts +280 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/package.json +51 -0
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform Detection
|
|
3
|
+
*
|
|
4
|
+
* Automatically detects the project type, bundle ID, app name, and SDK installation.
|
|
5
|
+
*/
|
|
6
|
+
import * as fs from 'fs';
|
|
7
|
+
import * as path from 'path';
|
|
8
|
+
/**
|
|
9
|
+
* Detect project information from the current working directory
|
|
10
|
+
*/
|
|
11
|
+
export async function detectProject() {
|
|
12
|
+
const cwd = process.cwd();
|
|
13
|
+
const platform = detectPlatform(cwd);
|
|
14
|
+
const bundleId = extractBundleId(cwd, platform);
|
|
15
|
+
const appName = extractAppName(cwd, platform);
|
|
16
|
+
const { installed: sdkInstalled, version: sdkVersion } = detectSDK(cwd, platform);
|
|
17
|
+
const iosDeploymentTarget = detectIOSDeploymentTarget(cwd, platform);
|
|
18
|
+
const androidMinSdk = detectAndroidMinSdk(cwd, platform);
|
|
19
|
+
return {
|
|
20
|
+
platform,
|
|
21
|
+
bundleId,
|
|
22
|
+
appName,
|
|
23
|
+
sdkInstalled,
|
|
24
|
+
sdkVersion,
|
|
25
|
+
iosDeploymentTarget,
|
|
26
|
+
androidMinSdk,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Detect the project platform
|
|
31
|
+
*/
|
|
32
|
+
function detectPlatform(cwd) {
|
|
33
|
+
// Check for iOS indicators
|
|
34
|
+
const iosIndicators = [
|
|
35
|
+
'*.xcodeproj',
|
|
36
|
+
'*.xcworkspace',
|
|
37
|
+
'Podfile',
|
|
38
|
+
'Package.swift',
|
|
39
|
+
];
|
|
40
|
+
for (const pattern of iosIndicators) {
|
|
41
|
+
if (pattern.includes('*')) {
|
|
42
|
+
const ext = pattern.replace('*', '');
|
|
43
|
+
const files = fs.readdirSync(cwd).filter((f) => f.endsWith(ext));
|
|
44
|
+
if (files.length > 0)
|
|
45
|
+
return 'ios';
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
if (fs.existsSync(path.join(cwd, pattern)))
|
|
49
|
+
return 'ios';
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
// Check for Android indicators
|
|
53
|
+
const androidIndicators = ['build.gradle', 'settings.gradle', 'app/build.gradle'];
|
|
54
|
+
for (const indicator of androidIndicators) {
|
|
55
|
+
if (fs.existsSync(path.join(cwd, indicator))) {
|
|
56
|
+
// Check if it's not React Native
|
|
57
|
+
const packageJsonPath = path.join(cwd, 'package.json');
|
|
58
|
+
if (!fs.existsSync(packageJsonPath))
|
|
59
|
+
return 'android';
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
// Check for React Native
|
|
63
|
+
const packageJsonPath = path.join(cwd, 'package.json');
|
|
64
|
+
if (fs.existsSync(packageJsonPath)) {
|
|
65
|
+
try {
|
|
66
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
67
|
+
if (packageJson.dependencies?.['react-native'] ||
|
|
68
|
+
packageJson.devDependencies?.['react-native']) {
|
|
69
|
+
return 'react-native';
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
// Invalid package.json
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
// Check for metro.config.js (React Native)
|
|
77
|
+
if (fs.existsSync(path.join(cwd, 'metro.config.js'))) {
|
|
78
|
+
return 'react-native';
|
|
79
|
+
}
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Extract bundle ID from project
|
|
84
|
+
*/
|
|
85
|
+
function extractBundleId(cwd, platform) {
|
|
86
|
+
switch (platform) {
|
|
87
|
+
case 'ios':
|
|
88
|
+
return extractIOSBundleId(cwd);
|
|
89
|
+
case 'android':
|
|
90
|
+
return extractAndroidBundleId(cwd);
|
|
91
|
+
case 'react-native':
|
|
92
|
+
return extractReactNativeBundleId(cwd);
|
|
93
|
+
default:
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
function extractIOSBundleId(cwd) {
|
|
98
|
+
// Simple approach: search recursively but not too deep
|
|
99
|
+
const searchDirs = [cwd];
|
|
100
|
+
const entries = fs.readdirSync(cwd, { withFileTypes: true });
|
|
101
|
+
for (const entry of entries) {
|
|
102
|
+
if (entry.isDirectory() && !entry.name.startsWith('.') && entry.name !== 'node_modules') {
|
|
103
|
+
searchDirs.push(path.join(cwd, entry.name));
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
for (const dir of searchDirs) {
|
|
107
|
+
const infoPlistPath = path.join(dir, 'Info.plist');
|
|
108
|
+
if (fs.existsSync(infoPlistPath)) {
|
|
109
|
+
try {
|
|
110
|
+
const content = fs.readFileSync(infoPlistPath, 'utf-8');
|
|
111
|
+
// Simple regex extraction for CFBundleIdentifier
|
|
112
|
+
const match = content.match(/<key>CFBundleIdentifier<\/key>\s*<string>([^<]+)<\/string>/);
|
|
113
|
+
if (match && match[1] && !match[1].includes('$')) {
|
|
114
|
+
return match[1];
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
catch {
|
|
118
|
+
// Can't read file
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
function extractAndroidBundleId(cwd) {
|
|
125
|
+
// Check AndroidManifest.xml
|
|
126
|
+
const manifestPaths = [
|
|
127
|
+
'app/src/main/AndroidManifest.xml',
|
|
128
|
+
'AndroidManifest.xml',
|
|
129
|
+
];
|
|
130
|
+
for (const manifestPath of manifestPaths) {
|
|
131
|
+
const fullPath = path.join(cwd, manifestPath);
|
|
132
|
+
if (fs.existsSync(fullPath)) {
|
|
133
|
+
try {
|
|
134
|
+
const content = fs.readFileSync(fullPath, 'utf-8');
|
|
135
|
+
const match = content.match(/package="([^"]+)"/);
|
|
136
|
+
if (match && match[1]) {
|
|
137
|
+
return match[1];
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
catch {
|
|
141
|
+
// Can't read file
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
// Check build.gradle for applicationId
|
|
146
|
+
const buildGradlePath = path.join(cwd, 'app/build.gradle');
|
|
147
|
+
if (fs.existsSync(buildGradlePath)) {
|
|
148
|
+
try {
|
|
149
|
+
const content = fs.readFileSync(buildGradlePath, 'utf-8');
|
|
150
|
+
const match = content.match(/applicationId\s+["']([^"']+)["']/);
|
|
151
|
+
if (match && match[1]) {
|
|
152
|
+
return match[1];
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
catch {
|
|
156
|
+
// Can't read file
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
function extractReactNativeBundleId(cwd) {
|
|
162
|
+
// Check app.json (Expo)
|
|
163
|
+
const appJsonPath = path.join(cwd, 'app.json');
|
|
164
|
+
if (fs.existsSync(appJsonPath)) {
|
|
165
|
+
try {
|
|
166
|
+
const appJson = JSON.parse(fs.readFileSync(appJsonPath, 'utf-8'));
|
|
167
|
+
// Expo format
|
|
168
|
+
if (appJson.expo?.ios?.bundleIdentifier) {
|
|
169
|
+
return appJson.expo.ios.bundleIdentifier;
|
|
170
|
+
}
|
|
171
|
+
// Standard format
|
|
172
|
+
if (appJson.name) {
|
|
173
|
+
return `com.${appJson.name.toLowerCase().replace(/[^a-z0-9]/g, '')}`;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
catch {
|
|
177
|
+
// Invalid JSON
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
// Fallback to iOS extraction if ios folder exists
|
|
181
|
+
const iosPath = path.join(cwd, 'ios');
|
|
182
|
+
if (fs.existsSync(iosPath) && fs.statSync(iosPath).isDirectory()) {
|
|
183
|
+
return extractIOSBundleId(iosPath);
|
|
184
|
+
}
|
|
185
|
+
return null;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Extract app name from project
|
|
189
|
+
*/
|
|
190
|
+
function extractAppName(cwd, platform) {
|
|
191
|
+
switch (platform) {
|
|
192
|
+
case 'ios':
|
|
193
|
+
return extractIOSAppName(cwd);
|
|
194
|
+
case 'android':
|
|
195
|
+
return extractAndroidAppName(cwd);
|
|
196
|
+
case 'react-native':
|
|
197
|
+
return extractReactNativeAppName(cwd);
|
|
198
|
+
default:
|
|
199
|
+
return null;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
function extractIOSAppName(cwd) {
|
|
203
|
+
// Look for xcodeproj
|
|
204
|
+
const entries = fs.readdirSync(cwd);
|
|
205
|
+
const xcodeproj = entries.find((e) => e.endsWith('.xcodeproj'));
|
|
206
|
+
if (xcodeproj) {
|
|
207
|
+
return xcodeproj.replace('.xcodeproj', '');
|
|
208
|
+
}
|
|
209
|
+
// Try Info.plist
|
|
210
|
+
const searchDirs = [cwd];
|
|
211
|
+
const dirEntries = fs.readdirSync(cwd, { withFileTypes: true });
|
|
212
|
+
for (const entry of dirEntries) {
|
|
213
|
+
if (entry.isDirectory() && !entry.name.startsWith('.') && entry.name !== 'node_modules') {
|
|
214
|
+
searchDirs.push(path.join(cwd, entry.name));
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
for (const dir of searchDirs) {
|
|
218
|
+
const infoPlistPath = path.join(dir, 'Info.plist');
|
|
219
|
+
if (fs.existsSync(infoPlistPath)) {
|
|
220
|
+
try {
|
|
221
|
+
const content = fs.readFileSync(infoPlistPath, 'utf-8');
|
|
222
|
+
const match = content.match(/<key>CFBundleDisplayName<\/key>\s*<string>([^<]+)<\/string>/);
|
|
223
|
+
if (match && match[1] && !match[1].includes('$')) {
|
|
224
|
+
return match[1];
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
catch {
|
|
228
|
+
// Can't read file
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
return null;
|
|
233
|
+
}
|
|
234
|
+
function extractAndroidAppName(cwd) {
|
|
235
|
+
// Check strings.xml
|
|
236
|
+
const stringsPath = path.join(cwd, 'app/src/main/res/values/strings.xml');
|
|
237
|
+
if (fs.existsSync(stringsPath)) {
|
|
238
|
+
try {
|
|
239
|
+
const content = fs.readFileSync(stringsPath, 'utf-8');
|
|
240
|
+
const match = content.match(/<string name="app_name">([^<]+)<\/string>/);
|
|
241
|
+
if (match && match[1]) {
|
|
242
|
+
return match[1];
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
catch {
|
|
246
|
+
// Can't read file
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return null;
|
|
250
|
+
}
|
|
251
|
+
function extractReactNativeAppName(cwd) {
|
|
252
|
+
// Check app.json
|
|
253
|
+
const appJsonPath = path.join(cwd, 'app.json');
|
|
254
|
+
if (fs.existsSync(appJsonPath)) {
|
|
255
|
+
try {
|
|
256
|
+
const appJson = JSON.parse(fs.readFileSync(appJsonPath, 'utf-8'));
|
|
257
|
+
if (appJson.expo?.name)
|
|
258
|
+
return appJson.expo.name;
|
|
259
|
+
if (appJson.displayName)
|
|
260
|
+
return appJson.displayName;
|
|
261
|
+
if (appJson.name)
|
|
262
|
+
return appJson.name;
|
|
263
|
+
}
|
|
264
|
+
catch {
|
|
265
|
+
// Invalid JSON
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
// Check package.json
|
|
269
|
+
const packageJsonPath = path.join(cwd, 'package.json');
|
|
270
|
+
if (fs.existsSync(packageJsonPath)) {
|
|
271
|
+
try {
|
|
272
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
273
|
+
if (packageJson.name)
|
|
274
|
+
return packageJson.name;
|
|
275
|
+
}
|
|
276
|
+
catch {
|
|
277
|
+
// Invalid JSON
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
return null;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Detect if RampKit SDK is installed
|
|
284
|
+
*/
|
|
285
|
+
function detectSDK(cwd, platform) {
|
|
286
|
+
switch (platform) {
|
|
287
|
+
case 'ios':
|
|
288
|
+
return detectIOSSDK(cwd);
|
|
289
|
+
case 'android':
|
|
290
|
+
return detectAndroidSDK(cwd);
|
|
291
|
+
case 'react-native':
|
|
292
|
+
return detectReactNativeSDK(cwd);
|
|
293
|
+
default:
|
|
294
|
+
return { installed: false, version: null };
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
function detectIOSSDK(cwd) {
|
|
298
|
+
// Check Package.resolved for RampKit (Swift Package Manager)
|
|
299
|
+
const packageResolvedPaths = [
|
|
300
|
+
'Package.resolved',
|
|
301
|
+
'.build/workspace-state.json',
|
|
302
|
+
];
|
|
303
|
+
// Also check in common Xcode project locations
|
|
304
|
+
const entries = fs.readdirSync(cwd).filter(e => e.endsWith('.xcodeproj') || e.endsWith('.xcworkspace'));
|
|
305
|
+
for (const entry of entries) {
|
|
306
|
+
const resolvedPath = path.join(cwd, entry, 'project.xcworkspace', 'xcshareddata', 'swiftpm', 'Package.resolved');
|
|
307
|
+
if (fs.existsSync(resolvedPath)) {
|
|
308
|
+
packageResolvedPaths.push(path.relative(cwd, resolvedPath));
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
for (const resolvedPath of packageResolvedPaths) {
|
|
312
|
+
const fullPath = path.join(cwd, resolvedPath);
|
|
313
|
+
if (fs.existsSync(fullPath)) {
|
|
314
|
+
try {
|
|
315
|
+
const content = fs.readFileSync(fullPath, 'utf-8');
|
|
316
|
+
if (content.includes('rampkit-ios') || content.includes('getrampkit')) {
|
|
317
|
+
// Try to extract version
|
|
318
|
+
const versionMatch = content.match(/"rampkit-ios"[^}]*"version"\s*:\s*"([^"]+)"/);
|
|
319
|
+
return { installed: true, version: versionMatch ? versionMatch[1] : null };
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
catch {
|
|
323
|
+
// Can't read file
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
// Check Package.swift for RampKit dependency
|
|
328
|
+
const packageSwiftPath = path.join(cwd, 'Package.swift');
|
|
329
|
+
if (fs.existsSync(packageSwiftPath)) {
|
|
330
|
+
try {
|
|
331
|
+
const content = fs.readFileSync(packageSwiftPath, 'utf-8');
|
|
332
|
+
if (content.includes('rampkit-ios') || content.includes('getrampkit')) {
|
|
333
|
+
return { installed: true, version: null };
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
catch {
|
|
337
|
+
// Can't read file
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
// Legacy: Check Podfile.lock for RampKit (CocoaPods)
|
|
341
|
+
const podfileLockPath = path.join(cwd, 'Podfile.lock');
|
|
342
|
+
if (fs.existsSync(podfileLockPath)) {
|
|
343
|
+
try {
|
|
344
|
+
const content = fs.readFileSync(podfileLockPath, 'utf-8');
|
|
345
|
+
const match = content.match(/RampKit \(([0-9.]+)\)/);
|
|
346
|
+
if (match) {
|
|
347
|
+
return { installed: true, version: match[1] };
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
catch {
|
|
351
|
+
// Can't read file
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
// Legacy: Check Podfile
|
|
355
|
+
const podfilePath = path.join(cwd, 'Podfile');
|
|
356
|
+
if (fs.existsSync(podfilePath)) {
|
|
357
|
+
try {
|
|
358
|
+
const content = fs.readFileSync(podfilePath, 'utf-8');
|
|
359
|
+
if (content.includes('RampKit')) {
|
|
360
|
+
return { installed: true, version: null };
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
catch {
|
|
364
|
+
// Can't read file
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
return { installed: false, version: null };
|
|
368
|
+
}
|
|
369
|
+
function detectAndroidSDK(cwd) {
|
|
370
|
+
// Check build.gradle for RampKit
|
|
371
|
+
const buildGradlePath = path.join(cwd, 'app/build.gradle');
|
|
372
|
+
if (fs.existsSync(buildGradlePath)) {
|
|
373
|
+
try {
|
|
374
|
+
const content = fs.readFileSync(buildGradlePath, 'utf-8');
|
|
375
|
+
const match = content.match(/com\.rampkit:sdk:([0-9.]+)/);
|
|
376
|
+
if (match) {
|
|
377
|
+
return { installed: true, version: match[1] };
|
|
378
|
+
}
|
|
379
|
+
if (content.includes('com.rampkit')) {
|
|
380
|
+
return { installed: true, version: null };
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
catch {
|
|
384
|
+
// Can't read file
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
return { installed: false, version: null };
|
|
388
|
+
}
|
|
389
|
+
function detectReactNativeSDK(cwd) {
|
|
390
|
+
// Check package.json for rampkit-expo-dev (the correct package name)
|
|
391
|
+
const packageJsonPath = path.join(cwd, 'package.json');
|
|
392
|
+
if (fs.existsSync(packageJsonPath)) {
|
|
393
|
+
try {
|
|
394
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
395
|
+
// Check for rampkit-expo-dev (primary Expo SDK)
|
|
396
|
+
const version = packageJson.dependencies?.['rampkit-expo-dev'] ||
|
|
397
|
+
packageJson.devDependencies?.['rampkit-expo-dev'];
|
|
398
|
+
if (version) {
|
|
399
|
+
return { installed: true, version: version.replace(/^[\^~]/, '') };
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
catch {
|
|
403
|
+
// Invalid JSON
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
return { installed: false, version: null };
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Detect iOS deployment target - returns null, Claude checks manually
|
|
410
|
+
*/
|
|
411
|
+
function detectIOSDeploymentTarget(_cwd, _platform) {
|
|
412
|
+
return null;
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Detect Android minimum SDK version - returns null, Claude checks manually
|
|
416
|
+
*/
|
|
417
|
+
function detectAndroidMinSdk(_cwd, _platform) {
|
|
418
|
+
return null;
|
|
419
|
+
}
|
|
420
|
+
//# sourceMappingURL=platform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../src/detection/platform.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAG7B;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAE1B,MAAM,QAAQ,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;IACrC,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAChD,MAAM,OAAO,GAAG,cAAc,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAC9C,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,SAAS,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAClF,MAAM,mBAAmB,GAAG,yBAAyB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IACrE,MAAM,aAAa,GAAG,mBAAmB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAEzD,OAAO;QACL,QAAQ;QACR,QAAQ;QACR,OAAO;QACP,Y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B,CAAC;gBAC9C,WAAW,CAAC,eAAe,EAAE,CAAC,kBAAkB,CAAC,CAAC;YACpD,IAAI,OAAO,EAAE,CAAC;gBACZ,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,EAAE,CAAC;YACrE,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,eAAe;QACjB,CAAC;IACH,CAAC;IAED,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC7C,CAAC;AAED;;GAEG;AACH,SAAS,yBAAyB,CAAC,IAAY,EAAE,SAAmB;IAClE,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;GAEG;AACH,SAAS,mBAAmB,CAAC,IAAY,EAAE,SAAmB;IAC5D,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* RampKit MCP Server Entry Point
|
|
4
|
+
*
|
|
5
|
+
* This is the main entry point for the MCP server.
|
|
6
|
+
* It can be run directly via `npx @rampkit/mcp-server`
|
|
7
|
+
*/
|
|
8
|
+
import { runServer } from './server.js';
|
|
9
|
+
runServer().catch((error) => {
|
|
10
|
+
console.error('Failed to start RampKit MCP server:', error);
|
|
11
|
+
process.exit(1);
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,SAAS,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IAC1B,OAAO,CAAC,KAAK,CAAC,qCAAqC,EAAE,KAAK,CAAC,CAAC;IAC5D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Prompts
|
|
3
|
+
*
|
|
4
|
+
* Pre-built prompts for common RampKit tasks.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getPrompts(): {
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
arguments: {
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
required: boolean;
|
|
13
|
+
}[];
|
|
14
|
+
}[];
|
|
15
|
+
export declare function getPrompt(name: string, args?: Record<string, string>): {
|
|
16
|
+
messages: Array<{
|
|
17
|
+
role: 'user';
|
|
18
|
+
content: {
|
|
19
|
+
type: 'text';
|
|
20
|
+
text: string;
|
|
21
|
+
};
|
|
22
|
+
}>;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wBAAgB,UAAU;;;;;;;;IAuCzB;AAED,wBAAgB,SAAS,CACvB,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC5B;IAAE,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC,CAAA;CAAE,CA4ChF"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Prompts
|
|
3
|
+
*
|
|
4
|
+
* Pre-built prompts for common RampKit tasks.
|
|
5
|
+
*/
|
|
6
|
+
export function getPrompts() {
|
|
7
|
+
return [
|
|
8
|
+
{
|
|
9
|
+
name: 'create-from-codebase',
|
|
10
|
+
description: 'Generate an onboarding by analyzing the current codebase for app features, colors, and style',
|
|
11
|
+
arguments: [
|
|
12
|
+
{
|
|
13
|
+
name: 'focus',
|
|
14
|
+
description: 'Specific aspect to focus on (e.g., "premium features", "new user", "permissions")',
|
|
15
|
+
required: false,
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'convert-onboarding',
|
|
21
|
+
description: 'Find and convert existing native onboarding code to RampKit format',
|
|
22
|
+
arguments: [
|
|
23
|
+
{
|
|
24
|
+
name: 'path',
|
|
25
|
+
description: 'Path to existing onboarding code (optional)',
|
|
26
|
+
required: false,
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'optimize-onboarding',
|
|
32
|
+
description: 'Get suggestions for improving an existing RampKit onboarding',
|
|
33
|
+
arguments: [
|
|
34
|
+
{
|
|
35
|
+
name: 'onboardingId',
|
|
36
|
+
description: 'ID of the onboarding to optimize',
|
|
37
|
+
required: true,
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
];
|
|
42
|
+
}
|
|
43
|
+
export function getPrompt(name, args) {
|
|
44
|
+
switch (name) {
|
|
45
|
+
case 'create-from-codebase':
|
|
46
|
+
return {
|
|
47
|
+
messages: [
|
|
48
|
+
{
|
|
49
|
+
role: 'user',
|
|
50
|
+
content: {
|
|
51
|
+
type: 'text',
|
|
52
|
+
text: getCreateFromCodebasePrompt(args?.focus),
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
};
|
|
57
|
+
case 'convert-onboarding':
|
|
58
|
+
return {
|
|
59
|
+
messages: [
|
|
60
|
+
{
|
|
61
|
+
role: 'user',
|
|
62
|
+
content: {
|
|
63
|
+
type: 'text',
|
|
64
|
+
text: getConvertOnboardingPrompt(args?.path),
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
};
|
|
69
|
+
case 'optimize-onboarding':
|
|
70
|
+
return {
|
|
71
|
+
messages: [
|
|
72
|
+
{
|
|
73
|
+
role: 'user',
|
|
74
|
+
content: {
|
|
75
|
+
type: 'text',
|
|
76
|
+
text: getOptimizeOnboardingPrompt(args?.onboardingId),
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
};
|
|
81
|
+
default:
|
|
82
|
+
throw new Error(`Unknown prompt: ${name}`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
function getCreateFromCodebasePrompt(focus) {
|
|
86
|
+
const focusSection = focus
|
|
87
|
+
? `\n\nFOCUS AREA: ${focus}\nPay special attention to features and screens related to "${focus}".`
|
|
88
|
+
: '';
|
|
89
|
+
return `Create a RampKit onboarding flow by analyzing this codebase.
|
|
90
|
+
|
|
91
|
+
STEPS:
|
|
92
|
+
1. First, call the RampKit "get_instructions" tool to get the schema and templates
|
|
93
|
+
2. Analyze the codebase to understand:
|
|
94
|
+
- What the app does and its key features
|
|
95
|
+
- The app's visual style (colors, fonts, tone)
|
|
96
|
+
- Any existing onboarding or welcome screens
|
|
97
|
+
- Permission requests (notifications, camera, etc.)
|
|
98
|
+
- Premium/subscription features
|
|
99
|
+
|
|
100
|
+
3. Design an onboarding flow with 3-5 screens:
|
|
101
|
+
- Welcome: Introduce the app with its main value proposition
|
|
102
|
+
- Features: Highlight 2-3 key features
|
|
103
|
+
- Permissions: Pre-frame any permission requests
|
|
104
|
+
- Personalization: Optional - ask user preferences
|
|
105
|
+
- Completion: Celebrate and guide to first action
|
|
106
|
+
|
|
107
|
+
4. For each screen, create HTML that:
|
|
108
|
+
- Uses the app's actual colors as CSS variables
|
|
109
|
+
- Matches the app's visual style and tone
|
|
110
|
+
- Includes data-ramp-id on all text elements
|
|
111
|
+
- Has clear navigation with data-ramp-action buttons
|
|
112
|
+
|
|
113
|
+
5. Call "create_onboarding" with the generated screens
|
|
114
|
+
|
|
115
|
+
OUTPUT: The onboarding ID and editor URL for the user to preview and customize.${focusSection}`;
|
|
116
|
+
}
|
|
117
|
+
function getConvertOnboardingPrompt(codePath) {
|
|
118
|
+
const pathSection = codePath
|
|
119
|
+
? `\n\nSPECIFIC PATH: ${codePath}\nStart by looking at the onboarding code in this location.`
|
|
120
|
+
: '';
|
|
121
|
+
return `Find and convert existing native onboarding code to RampKit format.
|
|
122
|
+
|
|
123
|
+
STEPS:
|
|
124
|
+
1. Search the codebase for existing onboarding/welcome screens:
|
|
125
|
+
- iOS: Look for UIPageViewController, onboarding, walkthrough, tutorial
|
|
126
|
+
- Android: Look for ViewPager, OnboardingActivity, WelcomeActivity
|
|
127
|
+
- React Native: Look for Swiper, onboarding, welcome, intro
|
|
128
|
+
|
|
129
|
+
2. For each screen found, extract:
|
|
130
|
+
- The visual layout and elements
|
|
131
|
+
- Text content (titles, subtitles, descriptions)
|
|
132
|
+
- Images or illustrations used
|
|
133
|
+
- Button actions and navigation
|
|
134
|
+
|
|
135
|
+
3. Call "get_instructions" to get RampKit templates
|
|
136
|
+
|
|
137
|
+
4. Convert each screen to RampKit HTML format:
|
|
138
|
+
- Preserve the original visual design as much as possible
|
|
139
|
+
- Convert native layouts to CSS flexbox
|
|
140
|
+
- Map native colors to CSS variables
|
|
141
|
+
- Add data-ramp-id attributes for all dynamic content
|
|
142
|
+
- Add data-ramp-action for button navigation
|
|
143
|
+
|
|
144
|
+
5. Call "create_onboarding" with the converted screens
|
|
145
|
+
|
|
146
|
+
OUTPUT: Comparison showing original vs converted, plus the new onboarding URL.${pathSection}`;
|
|
147
|
+
}
|
|
148
|
+
function getOptimizeOnboardingPrompt(onboardingId) {
|
|
149
|
+
if (!onboardingId) {
|
|
150
|
+
return `Please provide an onboarding ID to optimize.
|
|
151
|
+
|
|
152
|
+
Use "list_onboardings" to see available onboardings, then call this prompt again with the ID.`;
|
|
153
|
+
}
|
|
154
|
+
return `Analyze and optimize the RampKit onboarding with ID: ${onboardingId}
|
|
155
|
+
|
|
156
|
+
STEPS:
|
|
157
|
+
1. Call "get_onboarding" with onboardingId "${onboardingId}"
|
|
158
|
+
2. Call "get_instructions" to get best practices
|
|
159
|
+
|
|
160
|
+
3. Analyze against best practices:
|
|
161
|
+
- Is each screen focused on ONE key message?
|
|
162
|
+
- Are CTAs clear and prominent?
|
|
163
|
+
- Is the copy user-focused and benefit-driven?
|
|
164
|
+
- Are permissions pre-framed with value explanation?
|
|
165
|
+
- Is the flow length appropriate (3-5 screens)?
|
|
166
|
+
- Are there clear progress indicators?
|
|
167
|
+
- Is there a skip option for power users?
|
|
168
|
+
|
|
169
|
+
4. Check technical quality:
|
|
170
|
+
- All interactive elements have data-ramp-id
|
|
171
|
+
- Proper safe area handling
|
|
172
|
+
- Responsive layout with relative units
|
|
173
|
+
- Accessible color contrast
|
|
174
|
+
|
|
175
|
+
5. Generate specific recommendations:
|
|
176
|
+
- Copy improvements with before/after
|
|
177
|
+
- Visual design suggestions
|
|
178
|
+
- Flow optimization (add/remove screens)
|
|
179
|
+
- A/B test ideas
|
|
180
|
+
|
|
181
|
+
OUTPUT: Prioritized list of improvements with specific implementation suggestions.`;
|
|
182
|
+
}
|
|
183
|
+
//# sourceMappingURL=index.js.map
|