midnight-mcp 0.1.41 → 0.2.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.
Files changed (103) hide show
  1. package/README.md +32 -1
  2. package/dist/bin.d.ts +1 -0
  3. package/dist/bin.js +60 -0
  4. package/dist/chunk-HOWO4K5A.js +2197 -0
  5. package/dist/chunk-S7G4OHA4.js +8306 -0
  6. package/dist/db-YDGUWI5K.js +7 -0
  7. package/dist/index.d.ts +205 -3
  8. package/dist/index.js +28 -16
  9. package/package.json +16 -6
  10. package/dist/config/compact-version.d.ts +0 -183
  11. package/dist/config/compact-version.js +0 -423
  12. package/dist/db/index.d.ts +0 -3
  13. package/dist/db/index.js +0 -2
  14. package/dist/db/vectorStore.d.ts +0 -69
  15. package/dist/db/vectorStore.js +0 -196
  16. package/dist/pipeline/embeddings.d.ts +0 -25
  17. package/dist/pipeline/embeddings.js +0 -103
  18. package/dist/pipeline/github.d.ts +0 -84
  19. package/dist/pipeline/github.js +0 -399
  20. package/dist/pipeline/index.d.ts +0 -11
  21. package/dist/pipeline/index.js +0 -6
  22. package/dist/pipeline/indexer.d.ts +0 -41
  23. package/dist/pipeline/indexer.js +0 -254
  24. package/dist/pipeline/parser.d.ts +0 -46
  25. package/dist/pipeline/parser.js +0 -436
  26. package/dist/pipeline/releases.d.ts +0 -112
  27. package/dist/pipeline/releases.js +0 -298
  28. package/dist/pipeline/repository.d.ts +0 -372
  29. package/dist/pipeline/repository.js +0 -520
  30. package/dist/prompts/index.d.ts +0 -3
  31. package/dist/prompts/index.js +0 -2
  32. package/dist/prompts/templates.d.ts +0 -26
  33. package/dist/prompts/templates.js +0 -443
  34. package/dist/resources/code.d.ts +0 -15
  35. package/dist/resources/code.js +0 -122
  36. package/dist/resources/content/code-content.d.ts +0 -6
  37. package/dist/resources/content/code-content.js +0 -802
  38. package/dist/resources/content/docs-content.d.ts +0 -14
  39. package/dist/resources/content/docs-content.js +0 -1202
  40. package/dist/resources/content/index.d.ts +0 -6
  41. package/dist/resources/content/index.js +0 -6
  42. package/dist/resources/docs.d.ts +0 -15
  43. package/dist/resources/docs.js +0 -98
  44. package/dist/resources/index.d.ts +0 -6
  45. package/dist/resources/index.js +0 -13
  46. package/dist/resources/schemas.d.ts +0 -16
  47. package/dist/resources/schemas.js +0 -407
  48. package/dist/scripts/index-repos.d.ts +0 -12
  49. package/dist/scripts/index-repos.js +0 -53
  50. package/dist/server.d.ts +0 -43
  51. package/dist/server.js +0 -696
  52. package/dist/services/index.d.ts +0 -6
  53. package/dist/services/index.js +0 -6
  54. package/dist/services/sampling.d.ts +0 -62
  55. package/dist/services/sampling.js +0 -277
  56. package/dist/tools/analyze.d.ts +0 -106
  57. package/dist/tools/analyze.js +0 -431
  58. package/dist/tools/generation.d.ts +0 -9
  59. package/dist/tools/generation.js +0 -285
  60. package/dist/tools/health.d.ts +0 -120
  61. package/dist/tools/health.js +0 -365
  62. package/dist/tools/index.d.ts +0 -14
  63. package/dist/tools/index.js +0 -22
  64. package/dist/tools/meta.d.ts +0 -61
  65. package/dist/tools/meta.js +0 -282
  66. package/dist/tools/repository/constants.d.ts +0 -19
  67. package/dist/tools/repository/constants.js +0 -324
  68. package/dist/tools/repository/handlers.d.ts +0 -373
  69. package/dist/tools/repository/handlers.js +0 -724
  70. package/dist/tools/repository/index.d.ts +0 -9
  71. package/dist/tools/repository/index.js +0 -13
  72. package/dist/tools/repository/schemas.d.ts +0 -153
  73. package/dist/tools/repository/schemas.js +0 -106
  74. package/dist/tools/repository/tools.d.ts +0 -7
  75. package/dist/tools/repository/tools.js +0 -484
  76. package/dist/tools/repository/validation.d.ts +0 -106
  77. package/dist/tools/repository/validation.js +0 -820
  78. package/dist/tools/repository.d.ts +0 -6
  79. package/dist/tools/repository.js +0 -7
  80. package/dist/tools/search.d.ts +0 -76
  81. package/dist/tools/search.js +0 -423
  82. package/dist/types/index.d.ts +0 -2
  83. package/dist/types/index.js +0 -2
  84. package/dist/types/mcp.d.ts +0 -187
  85. package/dist/types/mcp.js +0 -6
  86. package/dist/utils/cache.d.ts +0 -77
  87. package/dist/utils/cache.js +0 -172
  88. package/dist/utils/config.d.ts +0 -70
  89. package/dist/utils/config.js +0 -294
  90. package/dist/utils/errors.d.ts +0 -111
  91. package/dist/utils/errors.js +0 -165
  92. package/dist/utils/health.d.ts +0 -29
  93. package/dist/utils/health.js +0 -132
  94. package/dist/utils/hosted-api.d.ts +0 -67
  95. package/dist/utils/hosted-api.js +0 -119
  96. package/dist/utils/index.d.ts +0 -16
  97. package/dist/utils/index.js +0 -15
  98. package/dist/utils/logger.d.ts +0 -48
  99. package/dist/utils/logger.js +0 -124
  100. package/dist/utils/rate-limit.d.ts +0 -61
  101. package/dist/utils/rate-limit.js +0 -148
  102. package/dist/utils/validation.d.ts +0 -52
  103. package/dist/utils/validation.js +0 -255
@@ -1,520 +0,0 @@
1
- import { z } from "zod";
2
- import { githubClient } from "../pipeline/index.js";
3
- import { releaseTracker } from "../pipeline/releases.js";
4
- import { logger, DEFAULT_REPOSITORIES } from "../utils/index.js";
5
- // Schema definitions
6
- export const GetFileInputSchema = z.object({
7
- repo: z
8
- .string()
9
- .describe("Repository name (e.g., 'compact', 'midnight-js', 'example-counter')"),
10
- path: z.string().describe("File path within repository"),
11
- ref: z
12
- .string()
13
- .optional()
14
- .describe("Branch, tag, or commit SHA (default: main)"),
15
- });
16
- export const ListExamplesInputSchema = z.object({
17
- category: z
18
- .enum(["counter", "bboard", "token", "voting", "all"])
19
- .optional()
20
- .default("all")
21
- .describe("Filter by example type"),
22
- });
23
- export const GetLatestUpdatesInputSchema = z.object({
24
- since: z
25
- .string()
26
- .optional()
27
- .describe("ISO date to fetch updates from (default: last 7 days)"),
28
- repos: z
29
- .array(z.string())
30
- .optional()
31
- .describe("Specific repos to check (default: all configured repos)"),
32
- });
33
- export const GetVersionInfoInputSchema = z.object({
34
- repo: z.string().describe("Repository name (e.g., 'compact', 'midnight-js')"),
35
- });
36
- export const CheckBreakingChangesInputSchema = z.object({
37
- repo: z.string().describe("Repository name (e.g., 'compact', 'midnight-js')"),
38
- currentVersion: z
39
- .string()
40
- .describe("Version you're currently using (e.g., 'v1.0.0', '0.5.2')"),
41
- });
42
- export const GetMigrationGuideInputSchema = z.object({
43
- repo: z.string().describe("Repository name (e.g., 'compact', 'midnight-js')"),
44
- fromVersion: z.string().describe("Version you're migrating from"),
45
- toVersion: z
46
- .string()
47
- .optional()
48
- .describe("Target version (default: latest stable)"),
49
- });
50
- // Repository name mapping
51
- // Repository name mapping
52
- const REPO_ALIASES = {
53
- // Core Language & SDK
54
- compact: { owner: "midnightntwrk", repo: "compact" },
55
- "midnight-js": { owner: "midnightntwrk", repo: "midnight-js" },
56
- js: { owner: "midnightntwrk", repo: "midnight-js" },
57
- sdk: { owner: "midnightntwrk", repo: "midnight-js" },
58
- // Documentation
59
- docs: { owner: "midnightntwrk", repo: "midnight-docs" },
60
- "midnight-docs": { owner: "midnightntwrk", repo: "midnight-docs" },
61
- // Example DApps
62
- "example-counter": { owner: "midnightntwrk", repo: "example-counter" },
63
- counter: { owner: "midnightntwrk", repo: "example-counter" },
64
- "example-bboard": { owner: "midnightntwrk", repo: "example-bboard" },
65
- bboard: { owner: "midnightntwrk", repo: "example-bboard" },
66
- "example-dex": { owner: "midnightntwrk", repo: "example-dex" },
67
- dex: { owner: "midnightntwrk", repo: "example-dex" },
68
- // Developer Tools
69
- "create-mn-app": { owner: "midnightntwrk", repo: "create-mn-app" },
70
- "midnight-wallet": { owner: "midnightntwrk", repo: "midnight-wallet" },
71
- wallet: { owner: "midnightntwrk", repo: "midnight-wallet" },
72
- // Infrastructure
73
- "midnight-indexer": { owner: "midnightntwrk", repo: "midnight-indexer" },
74
- indexer: { owner: "midnightntwrk", repo: "midnight-indexer" },
75
- "midnight-node-docker": {
76
- owner: "midnightntwrk",
77
- repo: "midnight-node-docker",
78
- },
79
- node: { owner: "midnightntwrk", repo: "midnight-node-docker" },
80
- // APIs & Connectors
81
- "midnight-dapp-connector-api": {
82
- owner: "midnightntwrk",
83
- repo: "midnight-dapp-connector-api",
84
- },
85
- connector: { owner: "midnightntwrk", repo: "midnight-dapp-connector-api" },
86
- // Tooling
87
- "compact-tree-sitter": {
88
- owner: "midnightntwrk",
89
- repo: "compact-tree-sitter",
90
- },
91
- // Community
92
- "midnight-awesome-dapps": {
93
- owner: "midnightntwrk",
94
- repo: "midnight-awesome-dapps",
95
- },
96
- awesome: { owner: "midnightntwrk", repo: "midnight-awesome-dapps" },
97
- "contributor-hub": { owner: "midnightntwrk", repo: "contributor-hub" },
98
- };
99
- const EXAMPLES = [
100
- {
101
- name: "Counter",
102
- repository: "midnightntwrk/example-counter",
103
- description: "Simple counter contract demonstrating basic Compact concepts. Perfect for learning ledger state, circuits, and witnesses.",
104
- category: "counter",
105
- complexity: "beginner",
106
- mainFile: "contract/src/counter.compact",
107
- features: [
108
- "Ledger state management",
109
- "Basic circuit definition",
110
- "Counter increment/decrement",
111
- "TypeScript integration",
112
- ],
113
- },
114
- {
115
- name: "Bulletin Board",
116
- repository: "midnightntwrk/example-bboard",
117
- description: "Full DApp example with CLI and React UI. Demonstrates posting messages with privacy features.",
118
- category: "bboard",
119
- complexity: "intermediate",
120
- mainFile: "contract/src/bboard.compact",
121
- features: [
122
- "Private messaging",
123
- "Private messaging",
124
- "React frontend",
125
- "CLI interface",
126
- "Wallet integration",
127
- "Disclose operations",
128
- ],
129
- },
130
- {
131
- name: "DEX (Decentralized Exchange)",
132
- repository: "midnightntwrk/example-dex",
133
- description: "Advanced DApp example showing token swaps and liquidity pools with privacy-preserving transactions.",
134
- category: "dex",
135
- complexity: "advanced",
136
- mainFile: "contract/src/dex.compact",
137
- features: [
138
- "Token swaps",
139
- "Liquidity pools",
140
- "Privacy-preserving trades",
141
- "Price calculations",
142
- "Advanced state management",
143
- ],
144
- },
145
- ];
146
- /**
147
- * Resolve repository name alias to owner/repo
148
- */
149
- function resolveRepo(repoName) {
150
- // Default to compact if not provided
151
- const name = repoName || "compact";
152
- const normalized = name.toLowerCase().replace(/^midnightntwrk\//, "");
153
- const alias = REPO_ALIASES[normalized];
154
- if (alias)
155
- return alias;
156
- // Try to find in configured repos
157
- for (const config of DEFAULT_REPOSITORIES) {
158
- if (config.repo.toLowerCase() === normalized) {
159
- return { owner: config.owner, repo: config.repo };
160
- }
161
- }
162
- // Assume it's a full org/repo name
163
- if (name.includes("/")) {
164
- const [owner, repo] = name.split("/");
165
- return { owner, repo };
166
- }
167
- return null;
168
- }
169
- /**
170
- * Retrieve a specific file from Midnight repositories
171
- */
172
- export async function getFile(input) {
173
- logger.debug("Getting file", { repo: input.repo, path: input.path });
174
- const repoInfo = resolveRepo(input.repo);
175
- if (!repoInfo) {
176
- return {
177
- error: `Unknown repository: ${input.repo}`,
178
- suggestion: `Valid repositories: ${Object.keys(REPO_ALIASES).join(", ")}`,
179
- };
180
- }
181
- const file = await githubClient.getFileContent(repoInfo.owner, repoInfo.repo, input.path, input.ref);
182
- if (!file) {
183
- return {
184
- error: `File not found: ${input.path}`,
185
- repository: `${repoInfo.owner}/${repoInfo.repo}`,
186
- suggestion: "Check the file path and try again. Use midnight:list-examples to see available example files.",
187
- };
188
- }
189
- return {
190
- content: file.content,
191
- path: file.path,
192
- repository: `${repoInfo.owner}/${repoInfo.repo}`,
193
- sha: file.sha,
194
- size: file.size,
195
- url: `https://github.com/${repoInfo.owner}/${repoInfo.repo}/blob/${input.ref || "main"}/${file.path}`,
196
- };
197
- }
198
- /**
199
- * List available example contracts and DApps
200
- */
201
- export async function listExamples(input) {
202
- logger.debug("Listing examples", { category: input.category });
203
- let filteredExamples = EXAMPLES;
204
- if (input.category !== "all") {
205
- filteredExamples = EXAMPLES.filter((e) => e.category === input.category);
206
- }
207
- return {
208
- examples: filteredExamples.map((e) => ({
209
- name: e.name,
210
- repository: e.repository,
211
- description: e.description,
212
- complexity: e.complexity,
213
- mainFile: e.mainFile,
214
- features: e.features,
215
- githubUrl: `https://github.com/${e.repository}`,
216
- })),
217
- totalCount: filteredExamples.length,
218
- categories: [...new Set(EXAMPLES.map((e) => e.category))],
219
- };
220
- }
221
- /**
222
- * Retrieve recent changes across Midnight repositories
223
- */
224
- export async function getLatestUpdates(input) {
225
- logger.debug("Getting latest updates", input);
226
- // Default to last 7 days
227
- const since = input.since || new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString();
228
- const repos = input.repos?.map(resolveRepo).filter(Boolean) ||
229
- DEFAULT_REPOSITORIES.map((r) => ({ owner: r.owner, repo: r.repo }));
230
- const updates = [];
231
- for (const repo of repos) {
232
- if (!repo)
233
- continue;
234
- const commits = await githubClient.getRecentCommits(repo.owner, repo.repo, since, 10);
235
- if (commits.length > 0) {
236
- updates.push({
237
- repository: `${repo.owner}/${repo.repo}`,
238
- commits,
239
- });
240
- }
241
- }
242
- // Sort by most recent commit
243
- updates.sort((a, b) => {
244
- const aDate = a.commits[0]?.date || "";
245
- const bDate = b.commits[0]?.date || "";
246
- return bDate.localeCompare(aDate);
247
- });
248
- // Generate summary
249
- const totalCommits = updates.reduce((sum, u) => sum + u.commits.length, 0);
250
- const activeRepos = updates.filter((u) => u.commits.length > 0).length;
251
- return {
252
- summary: {
253
- since,
254
- totalCommits,
255
- activeRepositories: activeRepos,
256
- checkedRepositories: repos.length,
257
- },
258
- updates: updates.map((u) => ({
259
- repository: u.repository,
260
- commitCount: u.commits.length,
261
- latestCommit: u.commits[0]
262
- ? {
263
- message: u.commits[0].message.split("\n")[0], // First line only
264
- date: u.commits[0].date,
265
- author: u.commits[0].author,
266
- url: u.commits[0].url,
267
- }
268
- : null,
269
- recentCommits: u.commits.slice(0, 5).map((c) => ({
270
- message: c.message.split("\n")[0],
271
- date: c.date,
272
- sha: c.sha.substring(0, 7),
273
- })),
274
- })),
275
- };
276
- }
277
- /**
278
- * Get version and release info for a repository
279
- */
280
- export async function getVersionInfo(input) {
281
- logger.debug("Getting version info", input);
282
- // Special handling for "midnight-examples" - redirect to listing examples
283
- const repoName = input.repo || "compact";
284
- const normalizedRepo = repoName.toLowerCase();
285
- if (normalizedRepo === "midnight-examples" || normalizedRepo === "examples") {
286
- const exampleRepos = ["example-counter", "example-bboard", "example-dex"];
287
- const versions = await Promise.all(exampleRepos.map(async (repoName) => {
288
- const resolved = resolveRepo(repoName);
289
- if (!resolved)
290
- return null;
291
- try {
292
- const versionInfo = await releaseTracker.getVersionInfo(resolved.owner, resolved.repo);
293
- return {
294
- name: repoName,
295
- repository: `${resolved.owner}/${resolved.repo}`,
296
- latestVersion: versionInfo.latestRelease?.tag || "No releases",
297
- publishedAt: versionInfo.latestRelease?.publishedAt || null,
298
- };
299
- }
300
- catch {
301
- return {
302
- name: repoName,
303
- repository: `${resolved.owner}/${resolved.repo}`,
304
- latestVersion: "Unable to fetch",
305
- publishedAt: null,
306
- };
307
- }
308
- }));
309
- return {
310
- note: "There is no single 'midnight-examples' repository. Examples are split across multiple repos:",
311
- examples: versions.filter(Boolean),
312
- availableExamples: EXAMPLES.map((e) => ({
313
- name: e.name,
314
- repository: e.repository,
315
- description: e.description,
316
- complexity: e.complexity,
317
- })),
318
- hint: "Use 'counter', 'bboard', or 'dex' as repo aliases to get specific example info.",
319
- };
320
- }
321
- const resolved = resolveRepo(input.repo);
322
- if (!resolved) {
323
- throw new Error(`Unknown repository: ${input.repo}. Available: ${Object.keys(REPO_ALIASES).join(", ")}`);
324
- }
325
- const versionInfo = await releaseTracker.getVersionInfo(resolved.owner, resolved.repo);
326
- return {
327
- repository: `${resolved.owner}/${resolved.repo}`,
328
- latestVersion: versionInfo.latestRelease?.tag || "No releases found",
329
- latestStableVersion: versionInfo.latestStableRelease?.tag || "No stable releases",
330
- publishedAt: versionInfo.latestRelease?.publishedAt || null,
331
- releaseNotes: versionInfo.latestRelease?.body || null,
332
- recentReleases: versionInfo.recentReleases.slice(0, 5).map((r) => ({
333
- version: r.tag,
334
- date: r.publishedAt.split("T")[0],
335
- isPrerelease: r.isPrerelease,
336
- url: r.url,
337
- })),
338
- recentBreakingChanges: versionInfo.changelog
339
- .slice(0, 3)
340
- .flatMap((c) => c.changes.breaking)
341
- .slice(0, 10),
342
- versionContext: releaseTracker.getVersionContext(versionInfo),
343
- };
344
- }
345
- /**
346
- * Check for breaking changes since a specific version
347
- */
348
- export async function checkBreakingChanges(input) {
349
- logger.debug("Checking breaking changes", input);
350
- const resolved = resolveRepo(input.repo);
351
- if (!resolved) {
352
- throw new Error(`Unknown repository: ${input.repo}. Available: ${Object.keys(REPO_ALIASES).join(", ")}`);
353
- }
354
- const outdatedInfo = await releaseTracker.isOutdated(resolved.owner, resolved.repo, input.currentVersion);
355
- const breakingChanges = await releaseTracker.getBreakingChangesSince(resolved.owner, resolved.repo, input.currentVersion);
356
- return {
357
- repository: `${resolved.owner}/${resolved.repo}`,
358
- currentVersion: input.currentVersion,
359
- latestVersion: outdatedInfo.latestVersion,
360
- isOutdated: outdatedInfo.isOutdated,
361
- versionsBehind: outdatedInfo.versionsBehind,
362
- hasBreakingChanges: outdatedInfo.hasBreakingChanges,
363
- breakingChanges: breakingChanges,
364
- recommendation: outdatedInfo.hasBreakingChanges
365
- ? `⚠️ Breaking changes detected! Review the ${breakingChanges.length} breaking change(s) before upgrading.`
366
- : outdatedInfo.isOutdated
367
- ? `✅ Safe to upgrade. No breaking changes detected since ${input.currentVersion}.`
368
- : `✅ You're on the latest version.`,
369
- };
370
- }
371
- /**
372
- * Get migration guide between versions
373
- */
374
- export async function getMigrationGuide(input) {
375
- logger.debug("Getting migration guide", input);
376
- const resolved = resolveRepo(input.repo);
377
- if (!resolved) {
378
- throw new Error(`Unknown repository: ${input.repo}. Available: ${Object.keys(REPO_ALIASES).join(", ")}`);
379
- }
380
- const guide = await releaseTracker.getMigrationGuide(resolved.owner, resolved.repo, input.fromVersion, input.toVersion);
381
- return {
382
- repository: `${resolved.owner}/${resolved.repo}`,
383
- from: guide.from,
384
- to: guide.to,
385
- summary: {
386
- breakingChangesCount: guide.breakingChanges.length,
387
- deprecationsCount: guide.deprecations.length,
388
- newFeaturesCount: guide.newFeatures.length,
389
- },
390
- breakingChanges: guide.breakingChanges,
391
- deprecations: guide.deprecations,
392
- newFeatures: guide.newFeatures,
393
- migrationSteps: guide.migrationSteps,
394
- migrationDifficulty: guide.breakingChanges.length === 0
395
- ? "Easy - No breaking changes"
396
- : guide.breakingChanges.length <= 3
397
- ? "Moderate - Few breaking changes"
398
- : "Complex - Multiple breaking changes, plan carefully",
399
- };
400
- }
401
- // Tool definitions for MCP
402
- export const repositoryTools = [
403
- {
404
- name: "midnight:get-file",
405
- description: "Retrieve a specific file from Midnight repositories. Use repository aliases like 'compact', 'midnight-js', 'counter', or 'bboard' for convenience.",
406
- inputSchema: {
407
- type: "object",
408
- properties: {
409
- repo: {
410
- type: "string",
411
- description: "Repository name (e.g., 'compact', 'midnight-js', 'example-counter')",
412
- },
413
- path: {
414
- type: "string",
415
- description: "File path within repository",
416
- },
417
- ref: {
418
- type: "string",
419
- description: "Branch, tag, or commit SHA (default: main)",
420
- },
421
- },
422
- required: ["repo", "path"],
423
- },
424
- handler: getFile,
425
- },
426
- {
427
- name: "midnight:list-examples",
428
- description: "List available Midnight example contracts and DApps with descriptions, complexity ratings, and key features.",
429
- inputSchema: {
430
- type: "object",
431
- properties: {
432
- category: {
433
- type: "string",
434
- enum: ["counter", "bboard", "token", "voting", "all"],
435
- description: "Filter by example type (default: all)",
436
- },
437
- },
438
- required: [],
439
- },
440
- handler: listExamples,
441
- },
442
- {
443
- name: "midnight:get-latest-updates",
444
- description: "Retrieve recent changes and commits across Midnight repositories. Useful for staying up-to-date with the latest developments.",
445
- inputSchema: {
446
- type: "object",
447
- properties: {
448
- since: {
449
- type: "string",
450
- description: "ISO date to fetch updates from (default: last 7 days)",
451
- },
452
- repos: {
453
- type: "array",
454
- items: { type: "string" },
455
- description: "Specific repos to check (default: all configured repos)",
456
- },
457
- },
458
- required: [],
459
- },
460
- handler: getLatestUpdates,
461
- },
462
- {
463
- name: "midnight:get-version-info",
464
- description: "Get the latest version, release notes, and recent breaking changes for a Midnight repository. Use this to ensure you're working with the latest implementation.",
465
- inputSchema: {
466
- type: "object",
467
- properties: {
468
- repo: {
469
- type: "string",
470
- description: "Repository name (e.g., 'compact', 'midnight-js', 'sdk')",
471
- },
472
- },
473
- required: ["repo"],
474
- },
475
- handler: getVersionInfo,
476
- },
477
- {
478
- name: "midnight:check-breaking-changes",
479
- description: "Check if there are breaking changes between your current version and the latest release. Essential before upgrading dependencies.",
480
- inputSchema: {
481
- type: "object",
482
- properties: {
483
- repo: {
484
- type: "string",
485
- description: "Repository name (e.g., 'compact', 'midnight-js')",
486
- },
487
- currentVersion: {
488
- type: "string",
489
- description: "Version you're currently using (e.g., 'v1.0.0', '0.5.2')",
490
- },
491
- },
492
- required: ["repo", "currentVersion"],
493
- },
494
- handler: checkBreakingChanges,
495
- },
496
- {
497
- name: "midnight:get-migration-guide",
498
- description: "Get a detailed migration guide for upgrading between versions, including all breaking changes, deprecations, and recommended steps.",
499
- inputSchema: {
500
- type: "object",
501
- properties: {
502
- repo: {
503
- type: "string",
504
- description: "Repository name (e.g., 'compact', 'midnight-js')",
505
- },
506
- fromVersion: {
507
- type: "string",
508
- description: "Version you're migrating from",
509
- },
510
- toVersion: {
511
- type: "string",
512
- description: "Target version (default: latest stable)",
513
- },
514
- },
515
- required: ["repo", "fromVersion"],
516
- },
517
- handler: getMigrationGuide,
518
- },
519
- ];
520
- //# sourceMappingURL=repository.js.map
@@ -1,3 +0,0 @@
1
- export { promptDefinitions, generatePrompt, listPrompts, } from "./templates.js";
2
- export type { PromptDefinition, PromptMessage } from "./templates.js";
3
- //# sourceMappingURL=index.d.ts.map
@@ -1,2 +0,0 @@
1
- export { promptDefinitions, generatePrompt, listPrompts, } from "./templates.js";
2
- //# sourceMappingURL=index.js.map
@@ -1,26 +0,0 @@
1
- export interface PromptDefinition {
2
- name: string;
3
- description: string;
4
- arguments: Array<{
5
- name: string;
6
- description: string;
7
- required: boolean;
8
- }>;
9
- }
10
- export interface PromptMessage {
11
- role: "user" | "assistant";
12
- content: {
13
- type: "text";
14
- text: string;
15
- };
16
- }
17
- export declare const promptDefinitions: PromptDefinition[];
18
- /**
19
- * Generate prompt messages based on template and arguments
20
- */
21
- export declare function generatePrompt(name: string, args: Record<string, string>): PromptMessage[];
22
- /**
23
- * List all available prompts
24
- */
25
- export declare function listPrompts(): PromptDefinition[];
26
- //# sourceMappingURL=templates.d.ts.map