midnight-mcp 0.0.1
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 +136 -0
- package/dist/db/index.d.ts +3 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +2 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/vectorStore.d.ts +66 -0
- package/dist/db/vectorStore.d.ts.map +1 -0
- package/dist/db/vectorStore.js +196 -0
- package/dist/db/vectorStore.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/pipeline/embeddings.d.ts +25 -0
- package/dist/pipeline/embeddings.d.ts.map +1 -0
- package/dist/pipeline/embeddings.js +103 -0
- package/dist/pipeline/embeddings.js.map +1 -0
- package/dist/pipeline/github.d.ts +67 -0
- package/dist/pipeline/github.d.ts.map +1 -0
- package/dist/pipeline/github.js +287 -0
- package/dist/pipeline/github.js.map +1 -0
- package/dist/pipeline/index.d.ts +11 -0
- package/dist/pipeline/index.d.ts.map +1 -0
- package/dist/pipeline/index.js +6 -0
- package/dist/pipeline/index.js.map +1 -0
- package/dist/pipeline/indexer.d.ts +38 -0
- package/dist/pipeline/indexer.d.ts.map +1 -0
- package/dist/pipeline/indexer.js +222 -0
- package/dist/pipeline/indexer.js.map +1 -0
- package/dist/pipeline/parser.d.ts +46 -0
- package/dist/pipeline/parser.d.ts.map +1 -0
- package/dist/pipeline/parser.js +436 -0
- package/dist/pipeline/parser.js.map +1 -0
- package/dist/pipeline/releases.d.ts +112 -0
- package/dist/pipeline/releases.d.ts.map +1 -0
- package/dist/pipeline/releases.js +298 -0
- package/dist/pipeline/releases.js.map +1 -0
- package/dist/pipeline/repository.d.ts +372 -0
- package/dist/pipeline/repository.d.ts.map +1 -0
- package/dist/pipeline/repository.js +517 -0
- package/dist/pipeline/repository.js.map +1 -0
- package/dist/prompts/index.d.ts +3 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +2 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/templates.d.ts +26 -0
- package/dist/prompts/templates.d.ts.map +1 -0
- package/dist/prompts/templates.js +353 -0
- package/dist/prompts/templates.js.map +1 -0
- package/dist/resources/code.d.ts +16 -0
- package/dist/resources/code.d.ts.map +1 -0
- package/dist/resources/code.js +630 -0
- package/dist/resources/code.js.map +1 -0
- package/dist/resources/docs.d.ts +16 -0
- package/dist/resources/docs.d.ts.map +1 -0
- package/dist/resources/docs.js +989 -0
- package/dist/resources/docs.js.map +1 -0
- package/dist/resources/index.d.ts +6 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +13 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/resources/schemas.d.ts +16 -0
- package/dist/resources/schemas.d.ts.map +1 -0
- package/dist/resources/schemas.js +407 -0
- package/dist/resources/schemas.js.map +1 -0
- package/dist/scripts/index-repos.d.ts +12 -0
- package/dist/scripts/index-repos.d.ts.map +1 -0
- package/dist/scripts/index-repos.js +53 -0
- package/dist/scripts/index-repos.js.map +1 -0
- package/dist/server.d.ts +14 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +231 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/analyze.d.ts +140 -0
- package/dist/tools/analyze.d.ts.map +1 -0
- package/dist/tools/analyze.js +270 -0
- package/dist/tools/analyze.js.map +1 -0
- package/dist/tools/index.d.ts +392 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +9 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/repository.d.ts +537 -0
- package/dist/tools/repository.d.ts.map +1 -0
- package/dist/tools/repository.js +654 -0
- package/dist/tools/repository.js.map +1 -0
- package/dist/tools/search.d.ts +204 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/tools/search.js +210 -0
- package/dist/tools/search.js.map +1 -0
- package/dist/utils/config.d.ts +66 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +161 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logger.d.ts +14 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +43 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +64 -0
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
// Prompt definitions
|
|
2
|
+
export const promptDefinitions = [
|
|
3
|
+
{
|
|
4
|
+
name: "midnight:create-contract",
|
|
5
|
+
description: "Guided prompt for creating new Compact contracts with privacy considerations",
|
|
6
|
+
arguments: [
|
|
7
|
+
{
|
|
8
|
+
name: "contractType",
|
|
9
|
+
description: "Type of contract (token, voting, credential, custom)",
|
|
10
|
+
required: true,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: "privacyLevel",
|
|
14
|
+
description: "Required privacy features (full, partial, public)",
|
|
15
|
+
required: false,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: "complexity",
|
|
19
|
+
description: "Expected complexity level (beginner, intermediate, advanced)",
|
|
20
|
+
required: false,
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "midnight:review-contract",
|
|
26
|
+
description: "Security and best practices review prompt for existing contracts",
|
|
27
|
+
arguments: [
|
|
28
|
+
{
|
|
29
|
+
name: "contractCode",
|
|
30
|
+
description: "The Compact contract code to review",
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "focusAreas",
|
|
35
|
+
description: "Specific areas to emphasize (security, performance, privacy, readability)",
|
|
36
|
+
required: false,
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: "midnight:explain-concept",
|
|
42
|
+
description: "Educational prompt for explaining Midnight concepts at various levels",
|
|
43
|
+
arguments: [
|
|
44
|
+
{
|
|
45
|
+
name: "concept",
|
|
46
|
+
description: "The concept to explain (zk-proofs, circuits, witnesses, ledger, etc.)",
|
|
47
|
+
required: true,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "level",
|
|
51
|
+
description: "Expertise level (beginner, intermediate, advanced)",
|
|
52
|
+
required: false,
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "midnight:compare-approaches",
|
|
58
|
+
description: "Compare different implementation approaches for a given problem",
|
|
59
|
+
arguments: [
|
|
60
|
+
{
|
|
61
|
+
name: "problem",
|
|
62
|
+
description: "The problem to solve",
|
|
63
|
+
required: true,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "approaches",
|
|
67
|
+
description: "Specific approaches to compare (comma-separated)",
|
|
68
|
+
required: false,
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: "midnight:debug-contract",
|
|
74
|
+
description: "Help debug issues with a Compact contract",
|
|
75
|
+
arguments: [
|
|
76
|
+
{
|
|
77
|
+
name: "contractCode",
|
|
78
|
+
description: "The contract code with issues",
|
|
79
|
+
required: true,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: "errorMessage",
|
|
83
|
+
description: "Error message or description of the issue",
|
|
84
|
+
required: false,
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
];
|
|
89
|
+
/**
|
|
90
|
+
* Generate prompt messages based on template and arguments
|
|
91
|
+
*/
|
|
92
|
+
export function generatePrompt(name, args) {
|
|
93
|
+
switch (name) {
|
|
94
|
+
case "midnight:create-contract":
|
|
95
|
+
return generateCreateContractPrompt(args);
|
|
96
|
+
case "midnight:review-contract":
|
|
97
|
+
return generateReviewContractPrompt(args);
|
|
98
|
+
case "midnight:explain-concept":
|
|
99
|
+
return generateExplainConceptPrompt(args);
|
|
100
|
+
case "midnight:compare-approaches":
|
|
101
|
+
return generateCompareApproachesPrompt(args);
|
|
102
|
+
case "midnight:debug-contract":
|
|
103
|
+
return generateDebugContractPrompt(args);
|
|
104
|
+
default:
|
|
105
|
+
return [
|
|
106
|
+
{
|
|
107
|
+
role: "user",
|
|
108
|
+
content: {
|
|
109
|
+
type: "text",
|
|
110
|
+
text: `Unknown prompt: ${name}`,
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
];
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
function generateCreateContractPrompt(args) {
|
|
117
|
+
const contractType = args.contractType || "custom";
|
|
118
|
+
const privacyLevel = args.privacyLevel || "partial";
|
|
119
|
+
const complexity = args.complexity || "intermediate";
|
|
120
|
+
return [
|
|
121
|
+
{
|
|
122
|
+
role: "user",
|
|
123
|
+
content: {
|
|
124
|
+
type: "text",
|
|
125
|
+
text: `I want to create a new Midnight Compact smart contract with the following requirements:
|
|
126
|
+
|
|
127
|
+
**Contract Type:** ${contractType}
|
|
128
|
+
**Privacy Level:** ${privacyLevel}
|
|
129
|
+
**Complexity:** ${complexity}
|
|
130
|
+
|
|
131
|
+
Please help me design and implement this contract. Consider:
|
|
132
|
+
|
|
133
|
+
1. **State Design**
|
|
134
|
+
- What should be public vs private (shielded)?
|
|
135
|
+
- What data structures are needed?
|
|
136
|
+
- How should state transitions work?
|
|
137
|
+
|
|
138
|
+
2. **Circuit Design**
|
|
139
|
+
- What circuits (functions) are needed?
|
|
140
|
+
- What inputs/outputs should they have?
|
|
141
|
+
- What constraints and assertions are required?
|
|
142
|
+
|
|
143
|
+
3. **Witness Functions**
|
|
144
|
+
- What off-chain data is needed?
|
|
145
|
+
- How should private state be accessed?
|
|
146
|
+
|
|
147
|
+
4. **Privacy Considerations**
|
|
148
|
+
- How to protect user privacy?
|
|
149
|
+
- When to use disclose() vs commit()?
|
|
150
|
+
- How to prevent information leakage?
|
|
151
|
+
|
|
152
|
+
5. **Security**
|
|
153
|
+
- Access control mechanisms
|
|
154
|
+
- Input validation
|
|
155
|
+
- Protection against common vulnerabilities
|
|
156
|
+
|
|
157
|
+
Please provide:
|
|
158
|
+
- A complete contract implementation
|
|
159
|
+
- Explanation of design decisions
|
|
160
|
+
- Example usage scenarios
|
|
161
|
+
- Any security considerations`,
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
];
|
|
165
|
+
}
|
|
166
|
+
function generateReviewContractPrompt(args) {
|
|
167
|
+
const contractCode = args.contractCode || "// No code provided";
|
|
168
|
+
const focusAreas = args.focusAreas || "security, privacy, best practices";
|
|
169
|
+
return [
|
|
170
|
+
{
|
|
171
|
+
role: "user",
|
|
172
|
+
content: {
|
|
173
|
+
type: "text",
|
|
174
|
+
text: `Please review this Midnight Compact smart contract:
|
|
175
|
+
|
|
176
|
+
\`\`\`compact
|
|
177
|
+
${contractCode}
|
|
178
|
+
\`\`\`
|
|
179
|
+
|
|
180
|
+
**Focus Areas:** ${focusAreas}
|
|
181
|
+
|
|
182
|
+
Please analyze:
|
|
183
|
+
|
|
184
|
+
1. **Security Analysis**
|
|
185
|
+
- Input validation
|
|
186
|
+
- Access control
|
|
187
|
+
- State manipulation vulnerabilities
|
|
188
|
+
- Assertion coverage
|
|
189
|
+
|
|
190
|
+
2. **Privacy Assessment**
|
|
191
|
+
- Proper use of @private state
|
|
192
|
+
- Information leakage risks
|
|
193
|
+
- Correct use of disclose() and commit()
|
|
194
|
+
- Privacy guarantees provided
|
|
195
|
+
|
|
196
|
+
3. **Best Practices**
|
|
197
|
+
- Code organization
|
|
198
|
+
- Naming conventions
|
|
199
|
+
- Documentation
|
|
200
|
+
- Error messages
|
|
201
|
+
|
|
202
|
+
4. **Performance**
|
|
203
|
+
- Circuit complexity
|
|
204
|
+
- State access patterns
|
|
205
|
+
- Optimization opportunities
|
|
206
|
+
|
|
207
|
+
5. **Recommendations**
|
|
208
|
+
- Critical issues to fix
|
|
209
|
+
- Improvements to consider
|
|
210
|
+
- Alternative approaches
|
|
211
|
+
|
|
212
|
+
Please provide specific line references and code suggestions where applicable.`,
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
];
|
|
216
|
+
}
|
|
217
|
+
function generateExplainConceptPrompt(args) {
|
|
218
|
+
const concept = args.concept || "zero-knowledge proofs";
|
|
219
|
+
const level = args.level || "intermediate";
|
|
220
|
+
const levelDescriptions = {
|
|
221
|
+
beginner: "Explain like I'm new to blockchain and cryptography. Use analogies and avoid jargon.",
|
|
222
|
+
intermediate: "I understand blockchain basics and some cryptography. Focus on practical applications.",
|
|
223
|
+
advanced: "I have deep technical knowledge. Include implementation details and edge cases.",
|
|
224
|
+
};
|
|
225
|
+
return [
|
|
226
|
+
{
|
|
227
|
+
role: "user",
|
|
228
|
+
content: {
|
|
229
|
+
type: "text",
|
|
230
|
+
text: `Please explain the concept of **${concept}** in the context of Midnight blockchain.
|
|
231
|
+
|
|
232
|
+
**My Level:** ${level}
|
|
233
|
+
${levelDescriptions[level] || levelDescriptions.intermediate}
|
|
234
|
+
|
|
235
|
+
Please cover:
|
|
236
|
+
|
|
237
|
+
1. **What it is**
|
|
238
|
+
- Clear definition
|
|
239
|
+
- How it works in Midnight
|
|
240
|
+
|
|
241
|
+
2. **Why it matters**
|
|
242
|
+
- Benefits and use cases
|
|
243
|
+
- Real-world applications
|
|
244
|
+
|
|
245
|
+
3. **How to use it**
|
|
246
|
+
- Code examples in Compact
|
|
247
|
+
- Best practices
|
|
248
|
+
|
|
249
|
+
4. **Common pitfalls**
|
|
250
|
+
- Mistakes to avoid
|
|
251
|
+
- Debugging tips
|
|
252
|
+
|
|
253
|
+
5. **Further learning**
|
|
254
|
+
- Related concepts
|
|
255
|
+
- Resources for deeper understanding`,
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
];
|
|
259
|
+
}
|
|
260
|
+
function generateCompareApproachesPrompt(args) {
|
|
261
|
+
const problem = args.problem || "implementing a token contract";
|
|
262
|
+
const approaches = args.approaches || "";
|
|
263
|
+
return [
|
|
264
|
+
{
|
|
265
|
+
role: "user",
|
|
266
|
+
content: {
|
|
267
|
+
type: "text",
|
|
268
|
+
text: `I need to solve the following problem in Midnight:
|
|
269
|
+
|
|
270
|
+
**Problem:** ${problem}
|
|
271
|
+
|
|
272
|
+
${approaches ? `**Approaches to compare:** ${approaches}` : "Please suggest different implementation approaches."}
|
|
273
|
+
|
|
274
|
+
Please compare:
|
|
275
|
+
|
|
276
|
+
1. **Approach Overview**
|
|
277
|
+
- Brief description of each approach
|
|
278
|
+
- Key differences
|
|
279
|
+
|
|
280
|
+
2. **Privacy Implications**
|
|
281
|
+
- What data is exposed?
|
|
282
|
+
- Privacy guarantees
|
|
283
|
+
|
|
284
|
+
3. **Performance**
|
|
285
|
+
- Proof generation time
|
|
286
|
+
- State storage requirements
|
|
287
|
+
- Transaction costs
|
|
288
|
+
|
|
289
|
+
4. **Security**
|
|
290
|
+
- Attack surface
|
|
291
|
+
- Trust assumptions
|
|
292
|
+
|
|
293
|
+
5. **Code Complexity**
|
|
294
|
+
- Implementation difficulty
|
|
295
|
+
- Maintenance burden
|
|
296
|
+
|
|
297
|
+
6. **Recommendation**
|
|
298
|
+
- Best approach for different scenarios
|
|
299
|
+
- Trade-offs to consider
|
|
300
|
+
|
|
301
|
+
Please include code examples for each approach.`,
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
];
|
|
305
|
+
}
|
|
306
|
+
function generateDebugContractPrompt(args) {
|
|
307
|
+
const contractCode = args.contractCode || "// No code provided";
|
|
308
|
+
const errorMessage = args.errorMessage || "Not specified";
|
|
309
|
+
return [
|
|
310
|
+
{
|
|
311
|
+
role: "user",
|
|
312
|
+
content: {
|
|
313
|
+
type: "text",
|
|
314
|
+
text: `I'm having issues with this Midnight Compact contract:
|
|
315
|
+
|
|
316
|
+
\`\`\`compact
|
|
317
|
+
${contractCode}
|
|
318
|
+
\`\`\`
|
|
319
|
+
|
|
320
|
+
**Error/Issue:** ${errorMessage}
|
|
321
|
+
|
|
322
|
+
Please help me debug by:
|
|
323
|
+
|
|
324
|
+
1. **Identifying the Problem**
|
|
325
|
+
- What's causing the error?
|
|
326
|
+
- Which line(s) are problematic?
|
|
327
|
+
|
|
328
|
+
2. **Explaining Why**
|
|
329
|
+
- Root cause analysis
|
|
330
|
+
- How Compact/ZK constraints work
|
|
331
|
+
|
|
332
|
+
3. **Providing a Fix**
|
|
333
|
+
- Corrected code
|
|
334
|
+
- Explanation of changes
|
|
335
|
+
|
|
336
|
+
4. **Preventing Future Issues**
|
|
337
|
+
- Related pitfalls to watch for
|
|
338
|
+
- Testing strategies
|
|
339
|
+
|
|
340
|
+
5. **Additional Improvements**
|
|
341
|
+
- Code quality suggestions
|
|
342
|
+
- Best practices`,
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
];
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* List all available prompts
|
|
349
|
+
*/
|
|
350
|
+
export function listPrompts() {
|
|
351
|
+
return promptDefinitions;
|
|
352
|
+
}
|
|
353
|
+
//# sourceMappingURL=templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/prompts/templates.ts"],"names":[],"mappings":"AAkBA,qBAAqB;AACrB,MAAM,CAAC,MAAM,iBAAiB,GAAuB;IACnD;QACE,IAAI,EAAE,0BAA0B;QAChC,WAAW,EACT,8EAA8E;QAChF,SAAS,EAAE;YACT;gBACE,IAAI,EAAE,cAAc;gBACpB,WAAW,EAAE,sDAAsD;gBACnE,QAAQ,EAAE,IAAI;aACf;YACD;gBACE,IAAI,EAAE,cAAc;gBACpB,WAAW,EAAE,mDAAmD;gBAChE,QAAQ,EAAE,KAAK;aAChB;YACD;gBACE,IAAI,EAAE,YAAY;gBAClB,WAAW,EAAE,8DAA8D;gBAC3E,QAAQ,EAAE,KAAK;aAChB;SACF;KACF;IACD;QACE,IAAI,EAAE,0BAA0B;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;;;;;;;;;;;;;;;;;;oBAsBX;aACb;SACF;KACF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO,iBAAiB,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface ResourceDefinition {
|
|
2
|
+
uri: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
mimeType: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const codeResources: ResourceDefinition[];
|
|
8
|
+
/**
|
|
9
|
+
* Get code content by URI
|
|
10
|
+
*/
|
|
11
|
+
export declare function getCode(uri: string): Promise<string | null>;
|
|
12
|
+
/**
|
|
13
|
+
* List all available code resources
|
|
14
|
+
*/
|
|
15
|
+
export declare function listCodeResources(): ResourceDefinition[];
|
|
16
|
+
//# sourceMappingURL=code.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../src/resources/code.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAGD,eAAO,MAAM,aAAa,EAAE,kBAAkB,EA2C7C,CAAC;AAkiBF;;GAEG;AACH,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAyCjE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,kBAAkB,EAAE,CAExD"}
|