@codapult/cli 0.1.2
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/LICENSE +21 -0
- package/README.md +115 -0
- package/dist/commands/config-show.d.ts +1 -0
- package/dist/commands/config-show.js +116 -0
- package/dist/commands/config-show.js.map +1 -0
- package/dist/commands/db.d.ts +5 -0
- package/dist/commands/db.js +115 -0
- package/dist/commands/db.js.map +1 -0
- package/dist/commands/deploy.d.ts +5 -0
- package/dist/commands/deploy.js +203 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/doctor.d.ts +1 -0
- package/dist/commands/doctor.js +182 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/env.d.ts +2 -0
- package/dist/commands/env.js +145 -0
- package/dist/commands/env.js.map +1 -0
- package/dist/commands/generate.d.ts +4 -0
- package/dist/commands/generate.js +353 -0
- package/dist/commands/generate.js.map +1 -0
- package/dist/commands/generate.test.d.ts +1 -0
- package/dist/commands/generate.test.js +126 -0
- package/dist/commands/generate.test.js.map +1 -0
- package/dist/commands/plugins.d.ts +8 -0
- package/dist/commands/plugins.js +387 -0
- package/dist/commands/plugins.js.map +1 -0
- package/dist/commands/setup.d.ts +5 -0
- package/dist/commands/setup.js +478 -0
- package/dist/commands/setup.js.map +1 -0
- package/dist/commands/update.d.ts +6 -0
- package/dist/commands/update.js +172 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +107 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/prompts.d.ts +2 -0
- package/dist/mcp/prompts.js +111 -0
- package/dist/mcp/prompts.js.map +1 -0
- package/dist/mcp/resources.d.ts +2 -0
- package/dist/mcp/resources.js +66 -0
- package/dist/mcp/resources.js.map +1 -0
- package/dist/mcp/server.d.ts +1 -0
- package/dist/mcp/server.js +25 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools/db.d.ts +2 -0
- package/dist/mcp/tools/db.js +126 -0
- package/dist/mcp/tools/db.js.map +1 -0
- package/dist/mcp/tools/db.test.d.ts +1 -0
- package/dist/mcp/tools/db.test.js +154 -0
- package/dist/mcp/tools/db.test.js.map +1 -0
- package/dist/mcp/tools/deploy.d.ts +2 -0
- package/dist/mcp/tools/deploy.js +44 -0
- package/dist/mcp/tools/deploy.js.map +1 -0
- package/dist/mcp/tools/env.d.ts +2 -0
- package/dist/mcp/tools/env.js +144 -0
- package/dist/mcp/tools/env.js.map +1 -0
- package/dist/mcp/tools/env.test.d.ts +1 -0
- package/dist/mcp/tools/env.test.js +132 -0
- package/dist/mcp/tools/env.test.js.map +1 -0
- package/dist/mcp/tools/generate.d.ts +2 -0
- package/dist/mcp/tools/generate.js +126 -0
- package/dist/mcp/tools/generate.js.map +1 -0
- package/dist/mcp/tools/plugins.d.ts +2 -0
- package/dist/mcp/tools/plugins.js +211 -0
- package/dist/mcp/tools/plugins.js.map +1 -0
- package/dist/mcp/tools/project.d.ts +2 -0
- package/dist/mcp/tools/project.js +144 -0
- package/dist/mcp/tools/project.js.map +1 -0
- package/dist/mcp/tools/project.test.d.ts +1 -0
- package/dist/mcp/tools/project.test.js +123 -0
- package/dist/mcp/tools/project.test.js.map +1 -0
- package/dist/utils/git.d.ts +19 -0
- package/dist/utils/git.js +45 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/git.test.d.ts +1 -0
- package/dist/utils/git.test.js +78 -0
- package/dist/utils/git.test.js.map +1 -0
- package/dist/utils/manifest.d.ts +27 -0
- package/dist/utils/manifest.js +50 -0
- package/dist/utils/manifest.js.map +1 -0
- package/dist/utils/manifest.test.d.ts +1 -0
- package/dist/utils/manifest.test.js +108 -0
- package/dist/utils/manifest.test.js.map +1 -0
- package/dist/utils/patchers.d.ts +14 -0
- package/dist/utils/patchers.js +319 -0
- package/dist/utils/patchers.js.map +1 -0
- package/dist/utils/patchers.test.d.ts +1 -0
- package/dist/utils/patchers.test.js +403 -0
- package/dist/utils/patchers.test.js.map +1 -0
- package/dist/utils/project.d.ts +11 -0
- package/dist/utils/project.js +51 -0
- package/dist/utils/project.js.map +1 -0
- package/dist/utils/project.test.d.ts +1 -0
- package/dist/utils/project.test.js +124 -0
- package/dist/utils/project.test.js.map +1 -0
- package/dist/utils/ui.d.ts +18 -0
- package/dist/utils/ui.js +61 -0
- package/dist/utils/ui.js.map +1 -0
- package/dist/utils/validation.d.ts +6 -0
- package/dist/utils/validation.js +12 -0
- package/dist/utils/validation.js.map +1 -0
- package/package.json +74 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEzF,MAAM,eAAe,GAAG,mBAAmB,CAAC;AAC5C,MAAM,YAAY,GAAG,0CAA0C,CAAC;AAOhE,SAAS,IAAI,CAAC,GAAW,EAAE,GAAW,EAAE,MAAM,GAAG,KAAK;IACpD,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IAC1C,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;IAChE,OAAO,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;AAClD,CAAC;AAED,SAAS,SAAS,CAAC,GAAW,EAAE,GAAW;IACzC,IAAI,CAAC;QACH,OAAO,QAAQ,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,OAA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AI;gBAAE,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACpC,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,CAAC;QAED,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,IAAI,CAAC,4CAA4C,CAAC,CAAC;YACnD,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;gBACxB,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBACd,IAAI,CAAC,KAAK,gBAAgB,EAAE,CAAC;oBAC3B,GAAG,CAAC,0DAA0D,CAAC,CAAC;gBAClE,CAAC;qBAAM,IAAI,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;oBACnC,GAAG,CAAC,+DAA+D,CAAC,CAAC;gBACvE,CAAC;YACH,CAAC;YACD,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,CAAC;QAED,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACpB,IAAI,CAAC,+CAA+C,CAAC,CAAC;YACtD,KAAK,MAAM,CAAC,IAAI,IAAI;gBAAE,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACpC,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,CAAC;QAED,IAAI,CAAC,4BAA4B,CAAC,CAAC;QACnC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QACtB,GAAG,CAAC,iBAAiB,CAAC,CAAC;QACvB,GAAG,CAAC,mBAAmB,CAAC,CAAC;QACzB,GAAG,CAAC,wCAAwC,CAAC,CAAC;QAC9C,GAAG,CAAC,8CAA8C,CAAC,CAAC;IACtD,CAAC;IAED,OAAO,CAAC,GAAG,EAAE,CAAC;AAChB,CAAC"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from 'commander';
|
|
3
|
+
import pc from 'picocolors';
|
|
4
|
+
import { setupCommand } from './commands/setup.js';
|
|
5
|
+
import { updateCommand } from './commands/update.js';
|
|
6
|
+
import { doctorCommand } from './commands/doctor.js';
|
|
7
|
+
import { configShowCommand } from './commands/config-show.js';
|
|
8
|
+
import { pluginsAddCommand, pluginsRemoveCommand, pluginsListCommand, pluginsMigrateCommand, } from './commands/plugins.js';
|
|
9
|
+
import { generatePageCommand, generateApiCommand, generateActionCommand, generatePluginCommand, } from './commands/generate.js';
|
|
10
|
+
import { dbPushCommand, dbGenerateCommand, dbSeedCommand, dbStudioCommand, dbStatusCommand, } from './commands/db.js';
|
|
11
|
+
import { envCheckCommand, envSyncCommand } from './commands/env.js';
|
|
12
|
+
import { deployVercelCommand, deployDockerCommand, deployStatusCommand, } from './commands/deploy.js';
|
|
13
|
+
const program = new Command()
|
|
14
|
+
.name('codapult')
|
|
15
|
+
.description('Codapult CLI — manage your SaaS project')
|
|
16
|
+
.version('0.1.0')
|
|
17
|
+
.configureHelp({
|
|
18
|
+
styleTitle: (str) => pc.bold(pc.cyan(str)),
|
|
19
|
+
styleCommandText: (str) => pc.yellow(str),
|
|
20
|
+
styleOptionText: (str) => pc.green(str),
|
|
21
|
+
});
|
|
22
|
+
program
|
|
23
|
+
.commandsGroup('Project')
|
|
24
|
+
.command('setup')
|
|
25
|
+
.description('interactive project setup wizard (or non-interactive with --preset)')
|
|
26
|
+
.option('--preset <value>', 'apply a preset non-interactively (name, key=value pairs, or both)')
|
|
27
|
+
.action(setupCommand);
|
|
28
|
+
program
|
|
29
|
+
.command('update [version]')
|
|
30
|
+
.description('update from upstream Codapult releases')
|
|
31
|
+
.option('--dry-run', 'show what would change without applying')
|
|
32
|
+
.option('--list', 'list available versions')
|
|
33
|
+
.action(updateCommand);
|
|
34
|
+
program
|
|
35
|
+
.command('doctor')
|
|
36
|
+
.description('check project health and configuration')
|
|
37
|
+
.action(doctorCommand);
|
|
38
|
+
program
|
|
39
|
+
.command('config')
|
|
40
|
+
.description('show current project configuration')
|
|
41
|
+
.action(configShowCommand);
|
|
42
|
+
const plugins = program
|
|
43
|
+
.commandsGroup('Plugins')
|
|
44
|
+
.command('plugins')
|
|
45
|
+
.description('manage Codapult plugins');
|
|
46
|
+
plugins
|
|
47
|
+
.command('add <name>')
|
|
48
|
+
.description('install a plugin (local or remote)')
|
|
49
|
+
.option('--from <url>', 'git URL to clone the plugin from')
|
|
50
|
+
.action(pluginsAddCommand);
|
|
51
|
+
plugins.command('remove <name>').description('uninstall a plugin').action(pluginsRemoveCommand);
|
|
52
|
+
plugins
|
|
53
|
+
.command('migrate [name]')
|
|
54
|
+
.description('update plugin schema and generate DB migration')
|
|
55
|
+
.option('--push', 'use db:push instead of db:generate + db:migrate (dev mode)')
|
|
56
|
+
.action(pluginsMigrateCommand);
|
|
57
|
+
plugins.command('list').description('list installed plugins').action(pluginsListCommand);
|
|
58
|
+
const generate = program
|
|
59
|
+
.commandsGroup('Code Generation')
|
|
60
|
+
.command('generate')
|
|
61
|
+
.alias('g')
|
|
62
|
+
.description('scaffold new code from templates');
|
|
63
|
+
generate.command('page <name>').description('create a dashboard page').action(generatePageCommand);
|
|
64
|
+
generate
|
|
65
|
+
.command('api <name>')
|
|
66
|
+
.description('create an API route (auth + rate limit + Zod)')
|
|
67
|
+
.action(generateApiCommand);
|
|
68
|
+
generate
|
|
69
|
+
.command('action <name>')
|
|
70
|
+
.description('create a server action')
|
|
71
|
+
.action(generateActionCommand);
|
|
72
|
+
generate
|
|
73
|
+
.command('plugin <name>')
|
|
74
|
+
.description('scaffold a new plugin repository')
|
|
75
|
+
.action(generatePluginCommand);
|
|
76
|
+
const db = program
|
|
77
|
+
.commandsGroup('Infrastructure')
|
|
78
|
+
.command('db')
|
|
79
|
+
.description('database management (Drizzle ORM)');
|
|
80
|
+
db.command('push').description('apply schema to database').action(dbPushCommand);
|
|
81
|
+
db.command('generate').description('generate migration files').action(dbGenerateCommand);
|
|
82
|
+
db.command('seed').description('seed sample data').action(dbSeedCommand);
|
|
83
|
+
db.command('studio').description('open Drizzle Studio').action(dbStudioCommand);
|
|
84
|
+
db.command('status').description('show schema info and migration count').action(dbStatusCommand);
|
|
85
|
+
const env = program.command('env').description('environment variable management');
|
|
86
|
+
env
|
|
87
|
+
.command('check')
|
|
88
|
+
.description('validate .env.local against .env.example')
|
|
89
|
+
.action(envCheckCommand);
|
|
90
|
+
env.command('sync').description('add missing variables from .env.example').action(envSyncCommand);
|
|
91
|
+
const deploy = program.command('deploy').description('deployment helpers');
|
|
92
|
+
deploy.command('vercel').description('build and deploy to Vercel').action(deployVercelCommand);
|
|
93
|
+
deploy
|
|
94
|
+
.command('docker')
|
|
95
|
+
.description('build Docker image')
|
|
96
|
+
.option('-t, --tag <tag>', 'image tag', 'latest')
|
|
97
|
+
.action(deployDockerCommand);
|
|
98
|
+
deploy.command('status').description('check deploy readiness').action(deployStatusCommand);
|
|
99
|
+
program
|
|
100
|
+
.commandsGroup('AI Integration')
|
|
101
|
+
.command('mcp-server')
|
|
102
|
+
.description('start MCP server for AI assistant integration (Cursor, Claude, Codex)')
|
|
103
|
+
.action(async () => {
|
|
104
|
+
await import('./mcp/server.js');
|
|
105
|
+
});
|
|
106
|
+
program.parse();
|
|
107
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,uBAAuB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CAAyC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;AAElG,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC;AAE3E,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,4BAA4B,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAC/F,MAAM;KACH,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,oBAAoB,CAAC;KACjC,MAAM,CAAC,iBAAiB,EAAE,WAAW,EAAE,QAAQ,CAAC;KAChD,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAC/B,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAE3F,OAAO;KACJ,aAAa,CAAC,gBAAgB,CAAC;KAC/B,OAAO,CAAC,YAAY,CAAC;KACrB,WAAW,CAAC,uEAAuE,CAAC;KACpF,MAAM,CAAC,KAAK,IAAI,EAAE;IACjB,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAClC,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { findProjectRoot, readProjectFile } from '../utils/project.js';
|
|
3
|
+
function loadProjectContext() {
|
|
4
|
+
const root = findProjectRoot();
|
|
5
|
+
if (!root)
|
|
6
|
+
return { schema: '', config: '' };
|
|
7
|
+
return {
|
|
8
|
+
schema: readProjectFile(root, 'src/lib/db/schema.ts') ?? '',
|
|
9
|
+
config: readProjectFile(root, 'src/config/app.ts') ?? '',
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function extractTableNames(schema) {
|
|
13
|
+
const matches = [
|
|
14
|
+
...schema.matchAll(/export\s+const\s+\w+\s*=\s*(?:sqliteTable|pgTable)\(\s*['"](\w+)['"]/g),
|
|
15
|
+
];
|
|
16
|
+
return matches.map((m) => m[1]).join(', ');
|
|
17
|
+
}
|
|
18
|
+
export function registerPrompts(server) {
|
|
19
|
+
server.registerPrompt('codapult_code_review', {
|
|
20
|
+
title: 'Codapult Code Review',
|
|
21
|
+
description: 'Review code against Codapult conventions: API pattern (auth→rate limit→Zod→response), adapter usage, TypeScript strict mode, server components first. Auto-includes current project config.',
|
|
22
|
+
argsSchema: {
|
|
23
|
+
code: z.string().describe('The code to review'),
|
|
24
|
+
focus: z
|
|
25
|
+
.string()
|
|
26
|
+
.optional()
|
|
27
|
+
.describe('Focus area: "security" | "performance" | "conventions" | "typescript"'),
|
|
28
|
+
},
|
|
29
|
+
}, ({ code, focus }) => {
|
|
30
|
+
const ctx = loadProjectContext();
|
|
31
|
+
const focusInstruction = focus
|
|
32
|
+
? `Focus specifically on: ${focus}.`
|
|
33
|
+
: 'Cover all aspects: security, performance, conventions, and TypeScript quality.';
|
|
34
|
+
const tables = extractTableNames(ctx.schema);
|
|
35
|
+
const projectContext = tables
|
|
36
|
+
? `\n\nProject context:\n- Database tables: ${tables}\n- Config preview:\n\`\`\`typescript\n${ctx.config.slice(0, 600)}\n\`\`\``
|
|
37
|
+
: '';
|
|
38
|
+
return {
|
|
39
|
+
messages: [
|
|
40
|
+
{
|
|
41
|
+
role: 'user',
|
|
42
|
+
content: {
|
|
43
|
+
type: 'text',
|
|
44
|
+
text: `Review the following code against Codapult conventions. ${focusInstruction}
|
|
45
|
+
|
|
46
|
+
Codapult conventions:
|
|
47
|
+
- API routes: auth check (getAppSession) → rate limiting (checkRateLimit) → Zod validation → business logic → NextResponse.json
|
|
48
|
+
- Server actions: 'use server' directive, auth check, rate limiting, Zod parse, revalidatePath
|
|
49
|
+
- TypeScript: strict mode, no \`any\`, prefer \`satisfies\` over \`as\`, \`unknown\` + type guards
|
|
50
|
+
- React: server components by default, \`'use client'\` only when needed
|
|
51
|
+
- Imports: use \`@/\` path alias, UI from \`@/components/ui/\`, utils from \`@/lib/utils\`
|
|
52
|
+
- Error responses: always \`{ error: string }\`, never expose stack traces
|
|
53
|
+
- Database: Drizzle ORM, snake_case tables/columns, text PKs, integer timestamps
|
|
54
|
+
- Class merging: use \`cn()\` from \`@/lib/utils\`
|
|
55
|
+
- AI: embedding/vector store use adapter pattern, RAG config from appConfig.ai
|
|
56
|
+
- Org quotas: enforce via checkOrgQuota() for AI and API routes${projectContext}
|
|
57
|
+
|
|
58
|
+
Code to review:
|
|
59
|
+
|
|
60
|
+
\`\`\`
|
|
61
|
+
${code}
|
|
62
|
+
\`\`\``,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
server.registerPrompt('codapult_schema_design', {
|
|
69
|
+
title: 'Codapult Schema Design',
|
|
70
|
+
description: 'Design a Drizzle ORM table following Codapult conventions. Auto-includes current schema for context (existing tables, naming patterns).',
|
|
71
|
+
argsSchema: {
|
|
72
|
+
description: z
|
|
73
|
+
.string()
|
|
74
|
+
.describe('What the table should store (e.g. "user bookmarks with URL, title, and tags")'),
|
|
75
|
+
},
|
|
76
|
+
}, ({ description }) => {
|
|
77
|
+
const ctx = loadProjectContext();
|
|
78
|
+
const tables = extractTableNames(ctx.schema);
|
|
79
|
+
const existingContext = tables
|
|
80
|
+
? `\n\nExisting tables in this project: ${tables}\nEnsure your new table follows the same patterns and avoids name conflicts.`
|
|
81
|
+
: '';
|
|
82
|
+
return {
|
|
83
|
+
messages: [
|
|
84
|
+
{
|
|
85
|
+
role: 'user',
|
|
86
|
+
content: {
|
|
87
|
+
type: 'text',
|
|
88
|
+
text: `Design a Drizzle ORM SQLite table for the following requirement:
|
|
89
|
+
|
|
90
|
+
"${description}"
|
|
91
|
+
|
|
92
|
+
Follow Codapult schema conventions:
|
|
93
|
+
- Use \`sqliteTable()\` from \`drizzle-orm/sqlite-core\`
|
|
94
|
+
- Table name: singular snake_case (e.g. \`bookmark\`, \`user_preference\`)
|
|
95
|
+
- Primary key: \`text('id').primaryKey()\` (nanoid/UUID, not auto-increment)
|
|
96
|
+
- Timestamps: \`integer('created_at', { mode: 'timestamp' }).notNull().$defaultFn(() => new Date())\`
|
|
97
|
+
- Foreign keys: always specify \`onDelete\` behavior (\`cascade\`, \`set null\`)
|
|
98
|
+
- Booleans: \`integer('col', { mode: 'boolean' })\`
|
|
99
|
+
- Type-safe enums: use \`.$type<TypeName>()\` with exported union type
|
|
100
|
+
- Export the table const and any type aliases
|
|
101
|
+
|
|
102
|
+
Also provide the Postgres equivalent using \`pgTable()\` with native types (\`timestamp\`, \`boolean\`).
|
|
103
|
+
|
|
104
|
+
Output both the SQLite and Postgres table definitions.${existingContext}`,
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
};
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=prompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/mcp/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEvE,SAAS,kBAAkB;IACzB,MAAM,IAAI,GAAG,eAAe,EAAE,CAAC;IAC/B,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IAC7C,OAAO;QACL,MAAM,EAAE,eAAe,CAAC,IAAI,EAAE,sBAAsB,CAAC,IAAI,EAAE;QAC3D,MAAM,EAAE,eAAe,CAAC,IAAI,EAAE,mBAAmB,CAAC,IAAI,EAAE;KACzD,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,OAAO,GAAG;QACd,GAAG,MAAM,CAAC,QAAQ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,EACxB;QACE,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EACT,yIAAyI;QAC3I,UAAU,EAAE;YACV,WAAW,EAAE,CAAC;iBACX,MAAM,EAAE;iBACR,QAAQ,CACP,+EAA+E,CAChF;SACJ;KACF,EACD,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE;QAClB,MAAM,GAAG,GAAG,kBAAkB,EAAE,CAAC;QACjC,MAAM,MAAM,GAAG,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC7C,MAAM,eAAe,GAAG,MAAM;YAC5B,CAAC,CAAC,wCAAwC,MAAM,8EAA8E;YAC9H,CAAC,CAAC,EAAE,CAAC;QAEP,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAe;oBACrB,OAAO,EAAE;wBACP,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE;;GAEjB,WAAW;;;;;;;;;;;;;;wDAc0C,eAAe,EAAE;qBAC5D;iBACF;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { findProjectRoot, readProjectFile } from '../utils/project.js';
|
|
2
|
+
function getRoot() {
|
|
3
|
+
const root = findProjectRoot();
|
|
4
|
+
if (!root)
|
|
5
|
+
throw new Error('Not inside a Codapult project');
|
|
6
|
+
return root;
|
|
7
|
+
}
|
|
8
|
+
export function registerResources(server) {
|
|
9
|
+
server.registerResource('codapult_schema', 'codapult://schema', {
|
|
10
|
+
title: 'Database Schema',
|
|
11
|
+
description: 'Drizzle ORM schema (src/lib/db/schema.ts) — all tables, columns, types, and relations',
|
|
12
|
+
mimeType: 'text/plain',
|
|
13
|
+
}, () => {
|
|
14
|
+
const content = readProjectFile(getRoot(), 'src/lib/db/schema.ts') ?? 'Schema file not found';
|
|
15
|
+
return { contents: [{ uri: 'codapult://schema', text: content, mimeType: 'text/plain' }] };
|
|
16
|
+
});
|
|
17
|
+
server.registerResource('codapult_app_config', 'codapult://config/app', {
|
|
18
|
+
title: 'App Configuration',
|
|
19
|
+
description: 'Application config (src/config/app.ts) — brand, features, AI, auth settings',
|
|
20
|
+
mimeType: 'text/plain',
|
|
21
|
+
}, () => {
|
|
22
|
+
const content = readProjectFile(getRoot(), 'src/config/app.ts') ?? 'Config file not found';
|
|
23
|
+
return {
|
|
24
|
+
contents: [{ uri: 'codapult://config/app', text: content, mimeType: 'text/plain' }],
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
server.registerResource('codapult_agents_md', 'codapult://agents', {
|
|
28
|
+
title: 'AGENTS.md',
|
|
29
|
+
description: 'AI agent guide — project structure, patterns, conventions, and rules',
|
|
30
|
+
mimeType: 'text/markdown',
|
|
31
|
+
}, () => {
|
|
32
|
+
const content = readProjectFile(getRoot(), 'AGENTS.md') ?? 'AGENTS.md not found';
|
|
33
|
+
return { contents: [{ uri: 'codapult://agents', text: content, mimeType: 'text/markdown' }] };
|
|
34
|
+
});
|
|
35
|
+
server.registerResource('codapult_env_example', 'codapult://env-example', {
|
|
36
|
+
title: '.env.example',
|
|
37
|
+
description: 'Environment variable template with descriptions and defaults',
|
|
38
|
+
mimeType: 'text/plain',
|
|
39
|
+
}, () => {
|
|
40
|
+
const content = readProjectFile(getRoot(), '.env.example') ?? '.env.example not found';
|
|
41
|
+
return {
|
|
42
|
+
contents: [{ uri: 'codapult://env-example', text: content, mimeType: 'text/plain' }],
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
server.registerResource('codapult_validation', 'codapult://validation', {
|
|
46
|
+
title: 'Zod Schemas',
|
|
47
|
+
description: 'All Zod validation schemas (src/lib/validation.ts)',
|
|
48
|
+
mimeType: 'text/plain',
|
|
49
|
+
}, () => {
|
|
50
|
+
const content = readProjectFile(getRoot(), 'src/lib/validation.ts') ?? 'validation.ts not found';
|
|
51
|
+
return {
|
|
52
|
+
contents: [{ uri: 'codapult://validation', text: content, mimeType: 'text/plain' }],
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
server.registerResource('codapult_navigation', 'codapult://config/navigation', {
|
|
56
|
+
title: 'Navigation Config',
|
|
57
|
+
description: 'Dashboard & admin sidebar items (src/config/navigation.ts)',
|
|
58
|
+
mimeType: 'text/plain',
|
|
59
|
+
}, () => {
|
|
60
|
+
const content = readProjectFile(getRoot(), 'src/config/navigation.ts') ?? 'navigation.ts not found';
|
|
61
|
+
return {
|
|
62
|
+
contents: [{ uri: 'codapult://config/navigation', text: content, mimeType: 'text/plain' }],
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=resources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/mcp/resources.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEvE,SAAS,OAAO;IACd,MAAM,IAAI,GAAG,eAAe,EAAE,CAAC;IAC/B,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IAC5D,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,MAAiB;IACjD,MAAM,CAAC,gBAAgB,CACrB,iBAAiB,EACjB,mBAAmB,EACnB;QACE,KAAK,EAAE,iBAAiB;QACxB,WAAW,EACT,uFAAuF;QACzF,QAAQ,EAAE,YAAY;KACvB,EACD,GAAG,EAAE;QACH,MAAM,OAAO,GAAG,eAAe,CAAC,OAAO,EAAE,EAAE,sBAAsB,CAAC,IAAI,uBAAuB,CAAC;QAC9F,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,mBAAmB,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;IAC7F,CAAC,CACF,CAAC;IAEF,MAAM,CAAC,gBAAgB,CACrB,qBAAqB,EACrB,uBA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QACE,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,oDAAoD;QACjE,QAAQ,EAAE,YAAY;KACvB,EACD,GAAG,EAAE;QACH,MAAM,OAAO,GACX,eAAe,CAAC,OAAO,EAAE,EAAE,uBAAuB,CAAC,IAAI,yBAAyB,CAAC;QACnF,OAAO;YACL,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,uBAAuB,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC;SACpF,CAAC;IACJ,CAAC,CACF,CAAC;IAEF,MAAM,CAAC,gBAAgB,CACrB,qBAAqB,EACrB,8BAA8B,EAC9B;QACE,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,4DAA4D;QACzE,QAAQ,EAAE,YAAY;KACvB,EACD,GAAG,EAAE;QACH,MAAM,OAAO,GACX,eAAe,CAAC,OAAO,EAAE,EAAE,0BAA0B,CAAC,IAAI,yBAAyB,CAAC;QACtF,OAAO;YACL,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,8BAA8B,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC;SAC3F,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
3
|
+
import { registerProjectTools } from './tools/project.js';
|
|
4
|
+
import { registerDbTools } from './tools/db.js';
|
|
5
|
+
import { registerEnvTools } from './tools/env.js';
|
|
6
|
+
import { registerPluginTools } from './tools/plugins.js';
|
|
7
|
+
import { registerGenerateTools } from './tools/generate.js';
|
|
8
|
+
import { registerDeployTools } from './tools/deploy.js';
|
|
9
|
+
import { registerPrompts } from './prompts.js';
|
|
10
|
+
import { registerResources } from './resources.js';
|
|
11
|
+
const server = new McpServer({
|
|
12
|
+
name: 'codapult',
|
|
13
|
+
version: '0.1.0',
|
|
14
|
+
});
|
|
15
|
+
registerProjectTools(server);
|
|
16
|
+
registerDbTools(server);
|
|
17
|
+
registerEnvTools(server);
|
|
18
|
+
registerPluginTools(server);
|
|
19
|
+
registerGenerateTools(server);
|
|
20
|
+
registerDeployTools(server);
|
|
21
|
+
registerPrompts(server);
|
|
22
|
+
registerResources(server);
|
|
23
|
+
const transport = new StdioServerTransport();
|
|
24
|
+
await server.connect(transport);
|
|
25
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;IAC3B,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;CACjB,CAAC,CAAC;AAEH,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAC7B,eAAe,CAAC,MAAM,CAAC,CAAC;AACxB,gBAAgB,CAAC,MAAM,CAAC,CAAC;AACzB,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAC5B,qBAAqB,CAAC,MAAM,CAAC,CAAC;AAC9B,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAC5B,eAAe,CAAC,MAAM,CAAC,CAAC;AACxB,iBAAiB,CAAC,MAAM,CAAC,CAAC;AAE1B,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { existsSync, readdirSync } from 'node:fs';
|
|
2
|
+
import { resolve } from 'node:path';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { findProjectRoot, readProjectFile } from '../../utils/project.js';
|
|
5
|
+
function getRoot() {
|
|
6
|
+
const root = findProjectRoot();
|
|
7
|
+
if (!root)
|
|
8
|
+
throw new Error('Not inside a Codapult project');
|
|
9
|
+
return root;
|
|
10
|
+
}
|
|
11
|
+
function parseSchema(content) {
|
|
12
|
+
const tables = [];
|
|
13
|
+
const tableRegex = /export\s+const\s+(\w+)\s*=\s*(?:sqliteTable|pgTable)\(\s*['"](\w+)['"]\s*,\s*\{/g;
|
|
14
|
+
let match;
|
|
15
|
+
while ((match = tableRegex.exec(content)) !== null) {
|
|
16
|
+
const tableName = match[2];
|
|
17
|
+
const startIdx = match.index + match[0].length;
|
|
18
|
+
let depth = 1;
|
|
19
|
+
let endIdx = startIdx;
|
|
20
|
+
for (let i = startIdx; i < content.length && depth > 0; i += 1) {
|
|
21
|
+
if (content[i] === '{')
|
|
22
|
+
depth += 1;
|
|
23
|
+
if (content[i] === '}')
|
|
24
|
+
depth -= 1;
|
|
25
|
+
endIdx = i;
|
|
26
|
+
}
|
|
27
|
+
const body = content.slice(startIdx, endIdx);
|
|
28
|
+
const columns = [];
|
|
29
|
+
const colRegex = /(\w+)\s*:\s*(text|integer|real|blob|boolean|timestamp|serial)\(['"](\w+)['"]/g;
|
|
30
|
+
let colMatch;
|
|
31
|
+
while ((colMatch = colRegex.exec(body)) !== null) {
|
|
32
|
+
const colName = colMatch[1];
|
|
33
|
+
const colType = colMatch[2];
|
|
34
|
+
const constraints = [];
|
|
35
|
+
const lineEnd = body.indexOf('\n', colMatch.index + colMatch[0].length);
|
|
36
|
+
const restOfLine = body.slice(colMatch.index, lineEnd > -1 ? lineEnd : undefined);
|
|
37
|
+
if (restOfLine.includes('.primaryKey()'))
|
|
38
|
+
constraints.push('PRIMARY KEY');
|
|
39
|
+
if (restOfLine.includes('.notNull()'))
|
|
40
|
+
constraints.push('NOT NULL');
|
|
41
|
+
if (restOfLine.includes('.unique()'))
|
|
42
|
+
constraints.push('UNIQUE');
|
|
43
|
+
if (restOfLine.includes('.references('))
|
|
44
|
+
constraints.push('FK');
|
|
45
|
+
if (restOfLine.includes('.$defaultFn('))
|
|
46
|
+
constraints.push('DEFAULT');
|
|
47
|
+
columns.push({ name: colName, type: colType, constraints });
|
|
48
|
+
}
|
|
49
|
+
tables.push({ name: tableName, columns });
|
|
50
|
+
}
|
|
51
|
+
return tables;
|
|
52
|
+
}
|
|
53
|
+
export function registerDbTools(server) {
|
|
54
|
+
server.registerTool('codapult_db_get_tables', {
|
|
55
|
+
title: 'Get Database Tables',
|
|
56
|
+
description: 'List all tables in the database schema with column counts',
|
|
57
|
+
inputSchema: {},
|
|
58
|
+
}, () => {
|
|
59
|
+
const root = getRoot();
|
|
60
|
+
const content = readProjectFile(root, 'src/lib/db/schema.ts');
|
|
61
|
+
if (!content)
|
|
62
|
+
return {
|
|
63
|
+
content: [{ type: 'text', text: 'Schema file not found' }],
|
|
64
|
+
isError: true,
|
|
65
|
+
};
|
|
66
|
+
const tables = parseSchema(content);
|
|
67
|
+
const summary = tables.map((t) => ({
|
|
68
|
+
name: t.name,
|
|
69
|
+
columns: t.columns.length,
|
|
70
|
+
columnNames: t.columns.map((c) => c.name),
|
|
71
|
+
}));
|
|
72
|
+
return { content: [{ type: 'text', text: JSON.stringify(summary, null, 2) }] };
|
|
73
|
+
});
|
|
74
|
+
server.registerTool('codapult_db_get_table_info', {
|
|
75
|
+
title: 'Get Table Info',
|
|
76
|
+
description: 'Get detailed column info for a specific database table (columns, types, constraints)',
|
|
77
|
+
inputSchema: {
|
|
78
|
+
table: z.string().describe('Table name (e.g. "user", "subscription")'),
|
|
79
|
+
},
|
|
80
|
+
}, ({ table }) => {
|
|
81
|
+
const root = getRoot();
|
|
82
|
+
const content = readProjectFile(root, 'src/lib/db/schema.ts');
|
|
83
|
+
if (!content)
|
|
84
|
+
return {
|
|
85
|
+
content: [{ type: 'text', text: 'Schema file not found' }],
|
|
86
|
+
isError: true,
|
|
87
|
+
};
|
|
88
|
+
const tables = parseSchema(content);
|
|
89
|
+
const found = tables.find((t) => t.name === table);
|
|
90
|
+
if (!found) {
|
|
91
|
+
const available = tables.map((t) => t.name).join(', ');
|
|
92
|
+
return {
|
|
93
|
+
content: [
|
|
94
|
+
{ type: 'text', text: `Table "${table}" not found. Available: ${available}` },
|
|
95
|
+
],
|
|
96
|
+
isError: true,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
return { content: [{ type: 'text', text: JSON.stringify(found, null, 2) }] };
|
|
100
|
+
});
|
|
101
|
+
server.registerTool('codapult_db_status', {
|
|
102
|
+
title: 'Database Status',
|
|
103
|
+
description: 'Get database provider, table count, and migration count',
|
|
104
|
+
inputSchema: {},
|
|
105
|
+
}, () => {
|
|
106
|
+
const root = getRoot();
|
|
107
|
+
const envContent = readProjectFile(root, '.env.local') ?? '';
|
|
108
|
+
const providerMatch = /^DB_PROVIDER\s*=\s*"?(\w+)"?/m.exec(envContent);
|
|
109
|
+
const provider = providerMatch?.[1] ?? 'turso';
|
|
110
|
+
const schemaContent = readProjectFile(root, 'src/lib/db/schema.ts') ?? '';
|
|
111
|
+
const tables = parseSchema(schemaContent);
|
|
112
|
+
let sqliteMigrations = 0;
|
|
113
|
+
let pgMigrations = 0;
|
|
114
|
+
const migrDir = resolve(root, 'src/lib/db/migrations');
|
|
115
|
+
const migrPgDir = resolve(root, 'src/lib/db/migrations-pg');
|
|
116
|
+
if (existsSync(migrDir)) {
|
|
117
|
+
sqliteMigrations = readdirSync(migrDir).filter((f) => f.endsWith('.sql')).length;
|
|
118
|
+
}
|
|
119
|
+
if (existsSync(migrPgDir)) {
|
|
120
|
+
pgMigrations = readdirSync(migrPgDir).filter((f) => f.endsWith('.sql')).length;
|
|
121
|
+
}
|
|
122
|
+
const result = { provider, tableCount: tables.length, sqliteMigrations, pgMigrations };
|
|
123
|
+
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=db.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"db.js","sourceRoot":"","sources":["../../../src/mcp/tools/db.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE1E,SAAS,OAAO;IACd,MAAM,IAAI,GAAG,eAAe,EAAE,CAAC;IAC/B,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IAC5D,OAAO,IAAI,CAAC;AACd,CAAC;AAWD,SAAS,WAAW,CAAC,OAAe;IAClC,MAAM,MAAM,GAAgB,EAAE,CAAC;IAC/B,MAAM,UAAU,GACd,kFAAkF,CAAC;IAErF,IAAI,KAAK,CAAC;IACV,OAAO,CAAC,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QACnD,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAE3B,MAAM,QAAQ,GAAG,KAAK,C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