@homenshum/convex-mcp-nodebench 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 +137 -0
- package/dist/__tests__/tools.test.d.ts +1 -0
- package/dist/__tests__/tools.test.js +267 -0
- package/dist/__tests__/tools.test.js.map +1 -0
- package/dist/db.d.ts +10 -0
- package/dist/db.js +125 -0
- package/dist/db.js.map +1 -0
- package/dist/gotchaSeed.d.ts +126 -0
- package/dist/gotchaSeed.js +147 -0
- package/dist/gotchaSeed.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +118 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/componentTools.d.ts +2 -0
- package/dist/tools/componentTools.js +131 -0
- package/dist/tools/componentTools.js.map +1 -0
- package/dist/tools/cronTools.d.ts +2 -0
- package/dist/tools/cronTools.js +142 -0
- package/dist/tools/cronTools.js.map +1 -0
- package/dist/tools/deploymentTools.d.ts +2 -0
- package/dist/tools/deploymentTools.js +222 -0
- package/dist/tools/deploymentTools.js.map +1 -0
- package/dist/tools/functionTools.d.ts +2 -0
- package/dist/tools/functionTools.js +293 -0
- package/dist/tools/functionTools.js.map +1 -0
- package/dist/tools/integrationBridgeTools.d.ts +2 -0
- package/dist/tools/integrationBridgeTools.js +294 -0
- package/dist/tools/integrationBridgeTools.js.map +1 -0
- package/dist/tools/learningTools.d.ts +2 -0
- package/dist/tools/learningTools.js +155 -0
- package/dist/tools/learningTools.js.map +1 -0
- package/dist/tools/methodologyTools.d.ts +2 -0
- package/dist/tools/methodologyTools.js +163 -0
- package/dist/tools/methodologyTools.js.map +1 -0
- package/dist/tools/schemaTools.d.ts +2 -0
- package/dist/tools/schemaTools.js +346 -0
- package/dist/tools/schemaTools.js.map +1 -0
- package/dist/tools/toolRegistry.d.ts +5 -0
- package/dist/tools/toolRegistry.js +308 -0
- package/dist/tools/toolRegistry.js.map +1 -0
- package/dist/types.d.ts +44 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
export const REGISTRY = [
|
|
2
|
+
// ── Schema Tools ──────────────────────────
|
|
3
|
+
{
|
|
4
|
+
name: "convex_audit_schema",
|
|
5
|
+
category: "schema",
|
|
6
|
+
tags: ["schema", "audit", "anti-pattern", "index", "validator"],
|
|
7
|
+
quickRef: {
|
|
8
|
+
nextAction: "Run convex_check_validator_coverage to ensure all functions have arg + return validators",
|
|
9
|
+
nextTools: ["convex_check_validator_coverage", "convex_suggest_indexes"],
|
|
10
|
+
methodology: "convex_schema_audit",
|
|
11
|
+
relatedGotchas: ["system_fields_auto", "index_field_order", "field_no_dollar_underscore"],
|
|
12
|
+
confidence: "high",
|
|
13
|
+
},
|
|
14
|
+
phase: "audit",
|
|
15
|
+
complexity: "medium",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: "convex_suggest_indexes",
|
|
19
|
+
category: "schema",
|
|
20
|
+
tags: ["index", "performance", "query", "optimization"],
|
|
21
|
+
quickRef: {
|
|
22
|
+
nextAction: "Review suggested indexes and add them to schema.ts",
|
|
23
|
+
nextTools: ["convex_audit_schema", "convex_pre_deploy_gate"],
|
|
24
|
+
methodology: "convex_schema_audit",
|
|
25
|
+
relatedGotchas: ["index_field_order", "index_name_include_fields"],
|
|
26
|
+
confidence: "medium",
|
|
27
|
+
},
|
|
28
|
+
phase: "audit",
|
|
29
|
+
complexity: "medium",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: "convex_check_validator_coverage",
|
|
33
|
+
category: "schema",
|
|
34
|
+
tags: ["validator", "coverage", "args", "returns", "compliance"],
|
|
35
|
+
quickRef: {
|
|
36
|
+
nextAction: "Fix any functions missing arg or return validators",
|
|
37
|
+
nextTools: ["convex_audit_functions", "convex_pre_deploy_gate"],
|
|
38
|
+
methodology: "convex_function_compliance",
|
|
39
|
+
relatedGotchas: ["returns_validator_required", "new_function_syntax"],
|
|
40
|
+
confidence: "high",
|
|
41
|
+
},
|
|
42
|
+
phase: "audit",
|
|
43
|
+
complexity: "low",
|
|
44
|
+
},
|
|
45
|
+
// ── Function Tools ────────────────────────
|
|
46
|
+
{
|
|
47
|
+
name: "convex_audit_functions",
|
|
48
|
+
category: "function",
|
|
49
|
+
tags: ["function", "audit", "public", "internal", "registration"],
|
|
50
|
+
quickRef: {
|
|
51
|
+
nextAction: "Review flagged functions and fix registration issues",
|
|
52
|
+
nextTools: ["convex_check_function_refs", "convex_check_validator_coverage"],
|
|
53
|
+
methodology: "convex_function_compliance",
|
|
54
|
+
relatedGotchas: ["internal_for_private", "function_ref_not_direct", "action_from_action"],
|
|
55
|
+
confidence: "high",
|
|
56
|
+
},
|
|
57
|
+
phase: "audit",
|
|
58
|
+
complexity: "medium",
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "convex_check_function_refs",
|
|
62
|
+
category: "function",
|
|
63
|
+
tags: ["function", "reference", "api", "internal", "import"],
|
|
64
|
+
quickRef: {
|
|
65
|
+
nextAction: "Fix broken function references",
|
|
66
|
+
nextTools: ["convex_audit_functions", "convex_pre_deploy_gate"],
|
|
67
|
+
methodology: "convex_function_compliance",
|
|
68
|
+
relatedGotchas: ["function_ref_not_direct", "no_register_via_api", "circular_type_annotation"],
|
|
69
|
+
confidence: "high",
|
|
70
|
+
},
|
|
71
|
+
phase: "audit",
|
|
72
|
+
complexity: "medium",
|
|
73
|
+
},
|
|
74
|
+
// ── Deployment Tools ──────────────────────
|
|
75
|
+
{
|
|
76
|
+
name: "convex_pre_deploy_gate",
|
|
77
|
+
category: "deployment",
|
|
78
|
+
tags: ["deploy", "gate", "pre-deploy", "quality", "check"],
|
|
79
|
+
quickRef: {
|
|
80
|
+
nextAction: "Fix all blockers before running npx convex deploy",
|
|
81
|
+
nextTools: ["convex_check_env_vars", "convex_audit_schema"],
|
|
82
|
+
methodology: "convex_deploy_verification",
|
|
83
|
+
relatedGotchas: [],
|
|
84
|
+
confidence: "high",
|
|
85
|
+
},
|
|
86
|
+
phase: "deploy",
|
|
87
|
+
complexity: "high",
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: "convex_check_env_vars",
|
|
91
|
+
category: "deployment",
|
|
92
|
+
tags: ["env", "environment", "variables", "config", "deploy"],
|
|
93
|
+
quickRef: {
|
|
94
|
+
nextAction: "Set missing environment variables before deploying",
|
|
95
|
+
nextTools: ["convex_pre_deploy_gate"],
|
|
96
|
+
methodology: "convex_deploy_verification",
|
|
97
|
+
relatedGotchas: [],
|
|
98
|
+
confidence: "high",
|
|
99
|
+
},
|
|
100
|
+
phase: "deploy",
|
|
101
|
+
complexity: "low",
|
|
102
|
+
},
|
|
103
|
+
// ── Learning Tools ────────────────────────
|
|
104
|
+
{
|
|
105
|
+
name: "convex_record_gotcha",
|
|
106
|
+
category: "learning",
|
|
107
|
+
tags: ["gotcha", "learning", "edge-case", "record", "persist"],
|
|
108
|
+
quickRef: {
|
|
109
|
+
nextAction: "Search gotchas before your next Convex implementation to avoid repeating mistakes",
|
|
110
|
+
nextTools: ["convex_search_gotchas"],
|
|
111
|
+
methodology: "convex_knowledge_management",
|
|
112
|
+
relatedGotchas: [],
|
|
113
|
+
confidence: "high",
|
|
114
|
+
},
|
|
115
|
+
phase: "learn",
|
|
116
|
+
complexity: "low",
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: "convex_search_gotchas",
|
|
120
|
+
category: "learning",
|
|
121
|
+
tags: ["gotcha", "search", "knowledge", "lookup", "fts"],
|
|
122
|
+
quickRef: {
|
|
123
|
+
nextAction: "Apply relevant gotchas to your current implementation",
|
|
124
|
+
nextTools: ["convex_record_gotcha", "convex_get_methodology"],
|
|
125
|
+
methodology: "convex_knowledge_management",
|
|
126
|
+
relatedGotchas: [],
|
|
127
|
+
confidence: "high",
|
|
128
|
+
},
|
|
129
|
+
phase: "learn",
|
|
130
|
+
complexity: "low",
|
|
131
|
+
},
|
|
132
|
+
// ── Methodology Tools ─────────────────────
|
|
133
|
+
{
|
|
134
|
+
name: "convex_get_methodology",
|
|
135
|
+
category: "methodology",
|
|
136
|
+
tags: ["methodology", "guide", "how-to", "steps", "workflow"],
|
|
137
|
+
quickRef: {
|
|
138
|
+
nextAction: "Follow the methodology steps in order",
|
|
139
|
+
nextTools: ["convex_discover_tools"],
|
|
140
|
+
methodology: "overview",
|
|
141
|
+
relatedGotchas: [],
|
|
142
|
+
confidence: "high",
|
|
143
|
+
},
|
|
144
|
+
phase: "meta",
|
|
145
|
+
complexity: "low",
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: "convex_discover_tools",
|
|
149
|
+
category: "methodology",
|
|
150
|
+
tags: ["discover", "find", "search", "tools", "help"],
|
|
151
|
+
quickRef: {
|
|
152
|
+
nextAction: "Use the discovered tool to proceed with your task",
|
|
153
|
+
nextTools: [],
|
|
154
|
+
methodology: "overview",
|
|
155
|
+
relatedGotchas: [],
|
|
156
|
+
confidence: "high",
|
|
157
|
+
},
|
|
158
|
+
phase: "meta",
|
|
159
|
+
complexity: "low",
|
|
160
|
+
},
|
|
161
|
+
// ── Integration Bridge Tools ──────────
|
|
162
|
+
{
|
|
163
|
+
name: "convex_generate_rules_md",
|
|
164
|
+
category: "integration",
|
|
165
|
+
tags: ["rules", "generate", "markdown", "sync", "knowledge"],
|
|
166
|
+
quickRef: {
|
|
167
|
+
nextAction: "Review generated rules and commit to .windsurf/rules/ or .cursor/rules/",
|
|
168
|
+
nextTools: ["convex_search_gotchas", "convex_audit_schema"],
|
|
169
|
+
methodology: "convex_knowledge_management",
|
|
170
|
+
relatedGotchas: [],
|
|
171
|
+
confidence: "high",
|
|
172
|
+
},
|
|
173
|
+
phase: "learn",
|
|
174
|
+
complexity: "low",
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
name: "convex_snapshot_schema",
|
|
178
|
+
category: "schema",
|
|
179
|
+
tags: ["snapshot", "diff", "history", "schema", "track"],
|
|
180
|
+
quickRef: {
|
|
181
|
+
nextAction: "Make your schema changes, then snapshot again to see the diff",
|
|
182
|
+
nextTools: ["convex_audit_schema", "convex_suggest_indexes"],
|
|
183
|
+
methodology: "convex_schema_audit",
|
|
184
|
+
relatedGotchas: ["index_field_order", "system_fields_auto"],
|
|
185
|
+
confidence: "high",
|
|
186
|
+
},
|
|
187
|
+
phase: "audit",
|
|
188
|
+
complexity: "low",
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
name: "convex_bootstrap_project",
|
|
192
|
+
category: "integration",
|
|
193
|
+
tags: ["bootstrap", "health", "scan", "project", "onboard"],
|
|
194
|
+
quickRef: {
|
|
195
|
+
nextAction: "Fix criticals first, then warnings, then run full audit suite",
|
|
196
|
+
nextTools: ["convex_audit_schema", "convex_audit_functions", "convex_pre_deploy_gate"],
|
|
197
|
+
methodology: "convex_deploy_verification",
|
|
198
|
+
relatedGotchas: [],
|
|
199
|
+
confidence: "high",
|
|
200
|
+
},
|
|
201
|
+
phase: "audit",
|
|
202
|
+
complexity: "medium",
|
|
203
|
+
},
|
|
204
|
+
// ── Cron & Component Tools ────────────
|
|
205
|
+
{
|
|
206
|
+
name: "convex_check_crons",
|
|
207
|
+
category: "deployment",
|
|
208
|
+
tags: ["cron", "schedule", "interval", "daily", "weekly", "jobs"],
|
|
209
|
+
quickRef: {
|
|
210
|
+
nextAction: "Fix any critical cron issues (duplicate names, public handlers) before deploy",
|
|
211
|
+
nextTools: ["convex_pre_deploy_gate", "convex_check_env_vars"],
|
|
212
|
+
methodology: "convex_deploy_verification",
|
|
213
|
+
relatedGotchas: ["internal_for_private"],
|
|
214
|
+
confidence: "high",
|
|
215
|
+
},
|
|
216
|
+
phase: "deploy",
|
|
217
|
+
complexity: "low",
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
name: "convex_analyze_components",
|
|
221
|
+
category: "integration",
|
|
222
|
+
tags: ["component", "config", "plugin", "agent", "workflow", "rag", "module"],
|
|
223
|
+
quickRef: {
|
|
224
|
+
nextAction: "Verify all components are properly imported and used, remove unused ones",
|
|
225
|
+
nextTools: ["convex_pre_deploy_gate", "convex_audit_schema"],
|
|
226
|
+
methodology: "convex_deploy_verification",
|
|
227
|
+
relatedGotchas: [],
|
|
228
|
+
confidence: "high",
|
|
229
|
+
},
|
|
230
|
+
phase: "audit",
|
|
231
|
+
complexity: "low",
|
|
232
|
+
},
|
|
233
|
+
];
|
|
234
|
+
export function getQuickRef(toolName) {
|
|
235
|
+
const entry = REGISTRY.find((e) => e.name === toolName);
|
|
236
|
+
return entry?.quickRef ?? null;
|
|
237
|
+
}
|
|
238
|
+
export function getToolsByCategory(category) {
|
|
239
|
+
return REGISTRY.filter((e) => e.category === category);
|
|
240
|
+
}
|
|
241
|
+
// ── BM25-scored tool discovery with field weighting ──────────────────────
|
|
242
|
+
function tokenize(text) {
|
|
243
|
+
return text.toLowerCase().match(/[a-z_]+/g) ?? [];
|
|
244
|
+
}
|
|
245
|
+
let _bm25Index = null;
|
|
246
|
+
function getBM25Index() {
|
|
247
|
+
if (_bm25Index)
|
|
248
|
+
return _bm25Index;
|
|
249
|
+
const corpus = new Map();
|
|
250
|
+
for (const entry of REGISTRY) {
|
|
251
|
+
// Weight fields: name tokens appear 3x, tags 2x, category/phase 1x
|
|
252
|
+
const nameTokens = tokenize(entry.name);
|
|
253
|
+
const tagTokens = tokenize(entry.tags.join(" "));
|
|
254
|
+
const catTokens = tokenize(`${entry.category} ${entry.phase}`);
|
|
255
|
+
const tokens = [
|
|
256
|
+
...nameTokens, ...nameTokens, ...nameTokens, // 3x name weight
|
|
257
|
+
...tagTokens, ...tagTokens, // 2x tag weight
|
|
258
|
+
...catTokens, // 1x category/phase
|
|
259
|
+
];
|
|
260
|
+
corpus.set(entry.name, tokens);
|
|
261
|
+
}
|
|
262
|
+
let totalLen = 0;
|
|
263
|
+
for (const tokens of corpus.values())
|
|
264
|
+
totalLen += tokens.length;
|
|
265
|
+
const avgDl = corpus.size > 0 ? totalLen / corpus.size : 1;
|
|
266
|
+
const docFreq = new Map();
|
|
267
|
+
for (const tokens of corpus.values()) {
|
|
268
|
+
const unique = new Set(tokens);
|
|
269
|
+
for (const t of unique)
|
|
270
|
+
docFreq.set(t, (docFreq.get(t) ?? 0) + 1);
|
|
271
|
+
}
|
|
272
|
+
const N = corpus.size;
|
|
273
|
+
const idf = new Map();
|
|
274
|
+
for (const [term, df] of docFreq) {
|
|
275
|
+
idf.set(term, Math.log((N - df + 0.5) / (df + 0.5) + 1));
|
|
276
|
+
}
|
|
277
|
+
_bm25Index = { corpus, docLengths: new Map([...corpus].map(([k, v]) => [k, v.length])), avgDl, idf };
|
|
278
|
+
return _bm25Index;
|
|
279
|
+
}
|
|
280
|
+
export function findTools(query) {
|
|
281
|
+
const queryTokens = tokenize(query);
|
|
282
|
+
if (queryTokens.length === 0)
|
|
283
|
+
return [];
|
|
284
|
+
const index = getBM25Index();
|
|
285
|
+
const k1 = 1.2;
|
|
286
|
+
const b = 0.75;
|
|
287
|
+
const scored = REGISTRY.map((entry) => {
|
|
288
|
+
const docTokens = index.corpus.get(entry.name) ?? [];
|
|
289
|
+
const dl = index.docLengths.get(entry.name) ?? 1;
|
|
290
|
+
const tf = new Map();
|
|
291
|
+
for (const t of docTokens)
|
|
292
|
+
tf.set(t, (tf.get(t) ?? 0) + 1);
|
|
293
|
+
let score = 0;
|
|
294
|
+
for (const qt of queryTokens) {
|
|
295
|
+
const termTf = tf.get(qt) ?? 0;
|
|
296
|
+
if (termTf === 0)
|
|
297
|
+
continue;
|
|
298
|
+
const termIdf = index.idf.get(qt) ?? 0;
|
|
299
|
+
score += termIdf * (termTf * (k1 + 1)) / (termTf + k1 * (1 - b + b * (dl / index.avgDl)));
|
|
300
|
+
}
|
|
301
|
+
return { entry, score };
|
|
302
|
+
});
|
|
303
|
+
return scored
|
|
304
|
+
.filter((s) => s.score > 0)
|
|
305
|
+
.sort((a, b) => b.score - a.score)
|
|
306
|
+
.map((s) => s.entry);
|
|
307
|
+
}
|
|
308
|
+
//#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AI,WAAW,EAAE,CAAC;YAC7B,MAAM,MAAM,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;YAC/B,IAAI,MAAM,KAAK,CAAC;gBAAE,SAAS;YAC3B,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;YACvC,KAAK,IAAI,OAAO,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC5F,CAAC;QAED,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM;SACV,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC;SAC1B,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;SACjC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACzB,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export type McpTool = {
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
inputSchema: Record<string, unknown>;
|
|
5
|
+
handler: (args: any) => Promise<unknown>;
|
|
6
|
+
};
|
|
7
|
+
export interface ConvexQuickRef {
|
|
8
|
+
nextAction: string;
|
|
9
|
+
nextTools: string[];
|
|
10
|
+
methodology: string;
|
|
11
|
+
relatedGotchas: string[];
|
|
12
|
+
confidence: "high" | "medium" | "low";
|
|
13
|
+
}
|
|
14
|
+
export interface ToolRegistryEntry {
|
|
15
|
+
name: string;
|
|
16
|
+
category: "schema" | "function" | "deployment" | "learning" | "methodology" | "integration";
|
|
17
|
+
tags: string[];
|
|
18
|
+
quickRef: ConvexQuickRef;
|
|
19
|
+
phase: "audit" | "implement" | "test" | "deploy" | "learn" | "meta";
|
|
20
|
+
complexity: "low" | "medium" | "high";
|
|
21
|
+
}
|
|
22
|
+
export interface SchemaIssue {
|
|
23
|
+
severity: "critical" | "warning" | "info";
|
|
24
|
+
location: string;
|
|
25
|
+
message: string;
|
|
26
|
+
fix: string;
|
|
27
|
+
gotchaKey?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface FunctionIssue {
|
|
30
|
+
severity: "critical" | "warning" | "info";
|
|
31
|
+
location: string;
|
|
32
|
+
functionName: string;
|
|
33
|
+
message: string;
|
|
34
|
+
fix: string;
|
|
35
|
+
}
|
|
36
|
+
export interface DeployGateResult {
|
|
37
|
+
passed: boolean;
|
|
38
|
+
checks: Array<{
|
|
39
|
+
name: string;
|
|
40
|
+
passed: boolean;
|
|
41
|
+
message: string;
|
|
42
|
+
}>;
|
|
43
|
+
blockers: string[];
|
|
44
|
+
}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@homenshum/convex-mcp-nodebench",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Convex-specific MCP server applying NodeBench self-instruct diligence patterns to Convex development. Schema audit, function compliance, deployment gates, persistent gotcha DB, and methodology guidance. Complements Context7 (raw docs) and official Convex MCP (deployment introspection) with structured verification workflows.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"convex-mcp-nodebench": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc",
|
|
16
|
+
"dev": "tsx src/index.ts",
|
|
17
|
+
"test": "vitest run",
|
|
18
|
+
"test:watch": "vitest",
|
|
19
|
+
"prepublishOnly": "npm run build && npm run test"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"mcp",
|
|
23
|
+
"convex",
|
|
24
|
+
"model-context-protocol",
|
|
25
|
+
"schema-audit",
|
|
26
|
+
"function-compliance",
|
|
27
|
+
"deploy-gates",
|
|
28
|
+
"gotcha-db",
|
|
29
|
+
"self-instruct",
|
|
30
|
+
"ai-agents",
|
|
31
|
+
"verification"
|
|
32
|
+
],
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "https://github.com/HomenShum/nodebench-ai.git",
|
|
36
|
+
"directory": "packages/convex-mcp-nodebench"
|
|
37
|
+
},
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"author": "HomenShum",
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@modelcontextprotocol/sdk": "^1.0.4",
|
|
42
|
+
"better-sqlite3": "^11.0.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/better-sqlite3": "^7.6.0",
|
|
46
|
+
"@types/node": "^20.11.0",
|
|
47
|
+
"tsx": "^4.7.0",
|
|
48
|
+
"typescript": "^5.3.3",
|
|
49
|
+
"vitest": "^3.2.4"
|
|
50
|
+
},
|
|
51
|
+
"engines": {
|
|
52
|
+
"node": ">=18.0.0"
|
|
53
|
+
}
|
|
54
|
+
}
|