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,298 @@
|
|
|
1
|
+
import { Octokit } from "octokit";
|
|
2
|
+
import { config, logger } from "../utils/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Fetches and tracks releases from GitHub repositories
|
|
5
|
+
*/
|
|
6
|
+
export class ReleaseTracker {
|
|
7
|
+
octokit;
|
|
8
|
+
cache = new Map();
|
|
9
|
+
cacheMaxAge = 1000 * 60 * 15; // 15 minutes
|
|
10
|
+
constructor(token) {
|
|
11
|
+
this.octokit = new Octokit({
|
|
12
|
+
auth: token || config.githubToken,
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Get all releases for a repository
|
|
17
|
+
*/
|
|
18
|
+
async getReleases(owner, repo, limit = 20) {
|
|
19
|
+
try {
|
|
20
|
+
const { data } = await this.octokit.rest.repos.listReleases({
|
|
21
|
+
owner,
|
|
22
|
+
repo,
|
|
23
|
+
per_page: limit,
|
|
24
|
+
});
|
|
25
|
+
return data.map((release) => ({
|
|
26
|
+
tag: release.tag_name,
|
|
27
|
+
name: release.name || release.tag_name,
|
|
28
|
+
body: release.body || "",
|
|
29
|
+
publishedAt: release.published_at || release.created_at,
|
|
30
|
+
url: release.html_url,
|
|
31
|
+
isPrerelease: release.prerelease,
|
|
32
|
+
assets: release.assets.map((asset) => ({
|
|
33
|
+
name: asset.name,
|
|
34
|
+
downloadUrl: asset.browser_download_url,
|
|
35
|
+
})),
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
logger.warn(`Failed to fetch releases for ${owner}/${repo}`, {
|
|
40
|
+
error: String(error),
|
|
41
|
+
});
|
|
42
|
+
return [];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Parse a release body to extract structured changelog info
|
|
47
|
+
*/
|
|
48
|
+
parseChangelog(releaseBody, version, date) {
|
|
49
|
+
const changes = {
|
|
50
|
+
breaking: [],
|
|
51
|
+
features: [],
|
|
52
|
+
fixes: [],
|
|
53
|
+
deprecations: [],
|
|
54
|
+
};
|
|
55
|
+
const lines = releaseBody.split("\n");
|
|
56
|
+
let currentSection = null;
|
|
57
|
+
for (const line of lines) {
|
|
58
|
+
const trimmed = line.trim().toLowerCase();
|
|
59
|
+
// Detect section headers
|
|
60
|
+
if (trimmed.includes("breaking") || trimmed.includes("⚠️")) {
|
|
61
|
+
currentSection = "breaking";
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
if (trimmed.includes("feature") ||
|
|
65
|
+
trimmed.includes("added") ||
|
|
66
|
+
trimmed.includes("✨") ||
|
|
67
|
+
trimmed.includes("🚀")) {
|
|
68
|
+
currentSection = "features";
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
if (trimmed.includes("fix") ||
|
|
72
|
+
trimmed.includes("bug") ||
|
|
73
|
+
trimmed.includes("🐛") ||
|
|
74
|
+
trimmed.includes("🔧")) {
|
|
75
|
+
currentSection = "fixes";
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
if (trimmed.includes("deprecat") || trimmed.includes("⚠")) {
|
|
79
|
+
currentSection = "deprecations";
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
// Extract list items
|
|
83
|
+
if (currentSection &&
|
|
84
|
+
(line.startsWith("-") || line.startsWith("*") || line.match(/^\d+\./))) {
|
|
85
|
+
const content = line.replace(/^[-*]\s*|\d+\.\s*/, "").trim();
|
|
86
|
+
if (content) {
|
|
87
|
+
changes[currentSection].push(content);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return {
|
|
92
|
+
version,
|
|
93
|
+
date,
|
|
94
|
+
changes,
|
|
95
|
+
rawBody: releaseBody,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Get version info for a repository with caching
|
|
100
|
+
*/
|
|
101
|
+
async getVersionInfo(owner, repo) {
|
|
102
|
+
const repoKey = `${owner}/${repo}`;
|
|
103
|
+
const cached = this.cache.get(repoKey);
|
|
104
|
+
if (cached) {
|
|
105
|
+
const age = Date.now() - new Date(cached.lastChecked).getTime();
|
|
106
|
+
if (age < this.cacheMaxAge) {
|
|
107
|
+
return cached;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
const releases = await this.getReleases(owner, repo);
|
|
111
|
+
const latestRelease = releases[0] || null;
|
|
112
|
+
const latestStableRelease = releases.find((r) => !r.isPrerelease) || null;
|
|
113
|
+
const changelog = releases.map((r) => this.parseChangelog(r.body, r.tag, r.publishedAt));
|
|
114
|
+
const info = {
|
|
115
|
+
repository: repoKey,
|
|
116
|
+
latestRelease,
|
|
117
|
+
latestStableRelease,
|
|
118
|
+
recentReleases: releases.slice(0, 10),
|
|
119
|
+
changelog,
|
|
120
|
+
lastChecked: new Date().toISOString(),
|
|
121
|
+
};
|
|
122
|
+
this.cache.set(repoKey, info);
|
|
123
|
+
return info;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Get breaking changes since a specific version
|
|
127
|
+
*/
|
|
128
|
+
async getBreakingChangesSince(owner, repo, sinceVersion) {
|
|
129
|
+
const info = await this.getVersionInfo(owner, repo);
|
|
130
|
+
const breakingChanges = [];
|
|
131
|
+
for (const entry of info.changelog) {
|
|
132
|
+
// Stop if we've reached the version they're using
|
|
133
|
+
if (entry.version === sinceVersion)
|
|
134
|
+
break;
|
|
135
|
+
breakingChanges.push(...entry.changes.breaking);
|
|
136
|
+
}
|
|
137
|
+
return breakingChanges;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Check if a version is outdated
|
|
141
|
+
*/
|
|
142
|
+
async isOutdated(owner, repo, currentVersion) {
|
|
143
|
+
const info = await this.getVersionInfo(owner, repo);
|
|
144
|
+
const latestVersion = info.latestStableRelease?.tag || info.latestRelease?.tag || null;
|
|
145
|
+
if (!latestVersion) {
|
|
146
|
+
return {
|
|
147
|
+
isOutdated: false,
|
|
148
|
+
latestVersion: null,
|
|
149
|
+
versionsBehind: 0,
|
|
150
|
+
hasBreakingChanges: false,
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
const releaseIndex = info.recentReleases.findIndex((r) => r.tag === currentVersion);
|
|
154
|
+
const versionsBehind = releaseIndex === -1 ? info.recentReleases.length : releaseIndex;
|
|
155
|
+
const breakingChanges = await this.getBreakingChangesSince(owner, repo, currentVersion);
|
|
156
|
+
return {
|
|
157
|
+
isOutdated: currentVersion !== latestVersion,
|
|
158
|
+
latestVersion,
|
|
159
|
+
versionsBehind,
|
|
160
|
+
hasBreakingChanges: breakingChanges.length > 0,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Get migration guide between two versions
|
|
165
|
+
*/
|
|
166
|
+
async getMigrationGuide(owner, repo, fromVersion, toVersion) {
|
|
167
|
+
const info = await this.getVersionInfo(owner, repo);
|
|
168
|
+
const to = toVersion ||
|
|
169
|
+
info.latestStableRelease?.tag ||
|
|
170
|
+
info.latestRelease?.tag ||
|
|
171
|
+
fromVersion;
|
|
172
|
+
const result = {
|
|
173
|
+
from: fromVersion,
|
|
174
|
+
to,
|
|
175
|
+
breakingChanges: [],
|
|
176
|
+
deprecations: [],
|
|
177
|
+
newFeatures: [],
|
|
178
|
+
migrationSteps: [],
|
|
179
|
+
};
|
|
180
|
+
let inRange = false;
|
|
181
|
+
for (const entry of [...info.changelog].reverse()) {
|
|
182
|
+
if (entry.version === fromVersion) {
|
|
183
|
+
inRange = true;
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
if (entry.version === to) {
|
|
187
|
+
result.breakingChanges.push(...entry.changes.breaking);
|
|
188
|
+
result.deprecations.push(...entry.changes.deprecations);
|
|
189
|
+
result.newFeatures.push(...entry.changes.features);
|
|
190
|
+
break;
|
|
191
|
+
}
|
|
192
|
+
if (inRange) {
|
|
193
|
+
result.breakingChanges.push(...entry.changes.breaking);
|
|
194
|
+
result.deprecations.push(...entry.changes.deprecations);
|
|
195
|
+
result.newFeatures.push(...entry.changes.features);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
// Generate migration steps from breaking changes
|
|
199
|
+
result.migrationSteps = result.breakingChanges.map((change) => `Review and update: ${change}`);
|
|
200
|
+
return result;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Get version-specific documentation hints
|
|
204
|
+
*/
|
|
205
|
+
getVersionContext(versionInfo) {
|
|
206
|
+
const parts = [];
|
|
207
|
+
if (versionInfo.latestRelease) {
|
|
208
|
+
parts.push(`Latest version: ${versionInfo.latestRelease.tag} (${versionInfo.latestRelease.publishedAt.split("T")[0]})`);
|
|
209
|
+
}
|
|
210
|
+
if (versionInfo.latestStableRelease &&
|
|
211
|
+
versionInfo.latestStableRelease !== versionInfo.latestRelease) {
|
|
212
|
+
parts.push(`Latest stable: ${versionInfo.latestStableRelease.tag}`);
|
|
213
|
+
}
|
|
214
|
+
const recentBreaking = versionInfo.changelog
|
|
215
|
+
.slice(0, 3)
|
|
216
|
+
.flatMap((c) => c.changes.breaking);
|
|
217
|
+
if (recentBreaking.length > 0) {
|
|
218
|
+
parts.push(`Recent breaking changes:\n${recentBreaking.map((b) => ` - ${b}`).join("\n")}`);
|
|
219
|
+
}
|
|
220
|
+
return parts.join("\n");
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Fetch a file at a specific version/tag
|
|
224
|
+
* This is critical for ensuring code recommendations match the user's version
|
|
225
|
+
*/
|
|
226
|
+
async getFileAtVersion(owner, repo, filePath, version) {
|
|
227
|
+
try {
|
|
228
|
+
const { data } = await this.octokit.rest.repos.getContent({
|
|
229
|
+
owner,
|
|
230
|
+
repo,
|
|
231
|
+
path: filePath,
|
|
232
|
+
ref: version, // Can be a tag like "v1.0.0" or branch
|
|
233
|
+
});
|
|
234
|
+
if (Array.isArray(data) || data.type !== "file") {
|
|
235
|
+
return null;
|
|
236
|
+
}
|
|
237
|
+
const content = data.encoding === "base64"
|
|
238
|
+
? Buffer.from(data.content, "base64").toString("utf-8")
|
|
239
|
+
: data.content;
|
|
240
|
+
return { content, version };
|
|
241
|
+
}
|
|
242
|
+
catch (error) {
|
|
243
|
+
logger.warn(`Failed to fetch ${filePath} at ${version} from ${owner}/${repo}`, {
|
|
244
|
+
error: String(error),
|
|
245
|
+
});
|
|
246
|
+
return null;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Compare syntax between two versions of a file
|
|
251
|
+
* Useful for showing what changed in API/syntax
|
|
252
|
+
*/
|
|
253
|
+
async compareSyntax(owner, repo, filePath, oldVersion, newVersion) {
|
|
254
|
+
const [oldFile, newFile] = await Promise.all([
|
|
255
|
+
this.getFileAtVersion(owner, repo, filePath, oldVersion),
|
|
256
|
+
this.getFileAtVersion(owner, repo, filePath, newVersion),
|
|
257
|
+
]);
|
|
258
|
+
return {
|
|
259
|
+
oldVersion,
|
|
260
|
+
newVersion,
|
|
261
|
+
oldContent: oldFile?.content || null,
|
|
262
|
+
newContent: newFile?.content || null,
|
|
263
|
+
hasDifferences: oldFile?.content !== newFile?.content,
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Get the grammar/syntax reference files at the latest version
|
|
268
|
+
* These are the source of truth for valid Compact syntax
|
|
269
|
+
*/
|
|
270
|
+
async getLatestSyntaxReference(owner, repo) {
|
|
271
|
+
const versionInfo = await this.getVersionInfo(owner, repo);
|
|
272
|
+
const version = versionInfo.latestStableRelease?.tag ||
|
|
273
|
+
versionInfo.latestRelease?.tag ||
|
|
274
|
+
"main";
|
|
275
|
+
// Key files that define Compact syntax
|
|
276
|
+
const syntaxFilePaths = [
|
|
277
|
+
"docs/grammar.md",
|
|
278
|
+
"docs/syntax.md",
|
|
279
|
+
"docs/reference.md",
|
|
280
|
+
"src/grammar.ts",
|
|
281
|
+
"grammar/compact.grammar",
|
|
282
|
+
"README.md",
|
|
283
|
+
];
|
|
284
|
+
const syntaxFiles = [];
|
|
285
|
+
for (const path of syntaxFilePaths) {
|
|
286
|
+
const file = await this.getFileAtVersion(owner, repo, path, version);
|
|
287
|
+
if (file) {
|
|
288
|
+
syntaxFiles.push({ path, content: file.content });
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
if (syntaxFiles.length === 0) {
|
|
292
|
+
return null;
|
|
293
|
+
}
|
|
294
|
+
return { version, syntaxFiles };
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
export const releaseTracker = new ReleaseTracker();
|
|
298
|
+
//# sourceMappingURL=releases.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"releases.js","sourceRoot":"","sources":["../../src/pipeline/releases.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAiCnD;;GAEG;AACH,MAAM,OAAO,cAAc;IACjB,OAAO,CAAU;IACjB,KAAK,GAA6B,IAAI,GAAG,EAAE,CAAC;IAC5C,WAAW,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,aAAa;IAEnD,YAAY,KAAc;QACxB,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC;YACzB,IAAI,EAAE,KAAK,IAAI,MAAM,CAAC,WAAW;SAClC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,WAAW,CACf,KAAa,EACb,IAAY,EACZ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MAAM,WAAW,GAA6C,EAAE,CAAC;QAEjE,KAAK,MAAM,IAAI,IAAI,eAAe,EAAE,CAAC;YACnC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;YACrE,IAAI,IAAI,EAAE,CAAC;gBACT,WAAW,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;YACpD,CAAC;QACH,CAAC;QAED,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;IAClC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const GetFileInputSchema: z.ZodObject<{
|
|
3
|
+
repo: z.ZodString;
|
|
4
|
+
path: z.ZodString;
|
|
5
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
path: string;
|
|
8
|
+
repo: string;
|
|
9
|
+
ref?: string | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
path: string;
|
|
12
|
+
repo: string;
|
|
13
|
+
ref?: string | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const ListExamplesInputSchema: z.ZodObject<{
|
|
16
|
+
category: z.ZodDefault<z.ZodOptional<z.ZodEnum<["counter", "bboard", "token", "voting", "all"]>>>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
category: "all" | "counter" | "bboard" | "token" | "voting";
|
|
19
|
+
}, {
|
|
20
|
+
category?: "all" | "counter" | "bboard" | "token" | "voting" | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
export declare const GetLatestUpdatesInputSchema: z.ZodObject<{
|
|
23
|
+
since: z.ZodOptional<z.ZodString>;
|
|
24
|
+
repos: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
repos?: string[] | undefined;
|
|
27
|
+
since?: string | undefined;
|
|
28
|
+
}, {
|
|
29
|
+
repos?: string[] | undefined;
|
|
30
|
+
since?: string | undefined;
|
|
31
|
+
}>;
|
|
32
|
+
export declare const GetVersionInfoInputSchema: z.ZodObject<{
|
|
33
|
+
repo: z.ZodString;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
repo: string;
|
|
36
|
+
}, {
|
|
37
|
+
repo: string;
|
|
38
|
+
}>;
|
|
39
|
+
export declare const CheckBreakingChangesInputSchema: z.ZodObject<{
|
|
40
|
+
repo: z.ZodString;
|
|
41
|
+
currentVersion: z.ZodString;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
repo: string;
|
|
44
|
+
currentVersion: string;
|
|
45
|
+
}, {
|
|
46
|
+
repo: string;
|
|
47
|
+
currentVersion: string;
|
|
48
|
+
}>;
|
|
49
|
+
export declare const GetMigrationGuideInputSchema: z.ZodObject<{
|
|
50
|
+
repo: z.ZodString;
|
|
51
|
+
fromVersion: z.ZodString;
|
|
52
|
+
toVersion: z.ZodOptional<z.ZodString>;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
repo: string;
|
|
55
|
+
fromVersion: string;
|
|
56
|
+
toVersion?: string | undefined;
|
|
57
|
+
}, {
|
|
58
|
+
repo: string;
|
|
59
|
+
fromVersion: string;
|
|
60
|
+
toVersion?: string | undefined;
|
|
61
|
+
}>;
|
|
62
|
+
export type GetFileInput = z.infer<typeof GetFileInputSchema>;
|
|
63
|
+
export type ListExamplesInput = z.infer<typeof ListExamplesInputSchema>;
|
|
64
|
+
export type GetLatestUpdatesInput = z.infer<typeof GetLatestUpdatesInputSchema>;
|
|
65
|
+
export type GetVersionInfoInput = z.infer<typeof GetVersionInfoInputSchema>;
|
|
66
|
+
export type CheckBreakingChangesInput = z.infer<typeof CheckBreakingChangesInputSchema>;
|
|
67
|
+
export type GetMigrationGuideInput = z.infer<typeof GetMigrationGuideInputSchema>;
|
|
68
|
+
/**
|
|
69
|
+
* Retrieve a specific file from Midnight repositories
|
|
70
|
+
*/
|
|
71
|
+
export declare function getFile(input: GetFileInput): Promise<{
|
|
72
|
+
error: string;
|
|
73
|
+
suggestion: string;
|
|
74
|
+
repository?: undefined;
|
|
75
|
+
content?: undefined;
|
|
76
|
+
path?: undefined;
|
|
77
|
+
sha?: undefined;
|
|
78
|
+
size?: undefined;
|
|
79
|
+
url?: undefined;
|
|
80
|
+
} | {
|
|
81
|
+
error: string;
|
|
82
|
+
repository: string;
|
|
83
|
+
suggestion: string;
|
|
84
|
+
content?: undefined;
|
|
85
|
+
path?: undefined;
|
|
86
|
+
sha?: undefined;
|
|
87
|
+
size?: undefined;
|
|
88
|
+
url?: undefined;
|
|
89
|
+
} | {
|
|
90
|
+
content: string;
|
|
91
|
+
path: string;
|
|
92
|
+
repository: string;
|
|
93
|
+
sha: string;
|
|
94
|
+
size: number;
|
|
95
|
+
url: string;
|
|
96
|
+
error?: undefined;
|
|
97
|
+
suggestion?: undefined;
|
|
98
|
+
}>;
|
|
99
|
+
/**
|
|
100
|
+
* List available example contracts and DApps
|
|
101
|
+
*/
|
|
102
|
+
export declare function listExamples(input: ListExamplesInput): Promise<{
|
|
103
|
+
examples: {
|
|
104
|
+
name: string;
|
|
105
|
+
repository: string;
|
|
106
|
+
description: string;
|
|
107
|
+
complexity: "beginner" | "intermediate" | "advanced";
|
|
108
|
+
mainFile: string;
|
|
109
|
+
features: string[];
|
|
110
|
+
githubUrl: string;
|
|
111
|
+
}[];
|
|
112
|
+
totalCount: number;
|
|
113
|
+
categories: string[];
|
|
114
|
+
}>;
|
|
115
|
+
/**
|
|
116
|
+
* Retrieve recent changes across Midnight repositories
|
|
117
|
+
*/
|
|
118
|
+
export declare function getLatestUpdates(input: GetLatestUpdatesInput): Promise<{
|
|
119
|
+
summary: {
|
|
120
|
+
since: string;
|
|
121
|
+
totalCommits: number;
|
|
122
|
+
activeRepositories: number;
|
|
123
|
+
checkedRepositories: number;
|
|
124
|
+
};
|
|
125
|
+
updates: {
|
|
126
|
+
repository: string;
|
|
127
|
+
commitCount: number;
|
|
128
|
+
latestCommit: {
|
|
129
|
+
message: string;
|
|
130
|
+
date: string;
|
|
131
|
+
author: string;
|
|
132
|
+
url: string;
|
|
133
|
+
} | null;
|
|
134
|
+
recentCommits: {
|
|
135
|
+
message: string;
|
|
136
|
+
date: string;
|
|
137
|
+
sha: string;
|
|
138
|
+
}[];
|
|
139
|
+
}[];
|
|
140
|
+
}>;
|
|
141
|
+
/**
|
|
142
|
+
* Get version and release info for a repository
|
|
143
|
+
*/
|
|
144
|
+
export declare function getVersionInfo(input: GetVersionInfoInput): Promise<{
|
|
145
|
+
note: string;
|
|
146
|
+
examples: ({
|
|
147
|
+
name: string;
|
|
148
|
+
repository: string;
|
|
149
|
+
latestVersion: string;
|
|
150
|
+
publishedAt: string | null;
|
|
151
|
+
} | null)[];
|
|
152
|
+
availableExamples: {
|
|
153
|
+
name: string;
|
|
154
|
+
repository: string;
|
|
155
|
+
description: string;
|
|
156
|
+
complexity: "beginner" | "intermediate" | "advanced";
|
|
157
|
+
}[];
|
|
158
|
+
hint: string;
|
|
159
|
+
repository?: undefined;
|
|
160
|
+
latestVersion?: undefined;
|
|
161
|
+
latestStableVersion?: undefined;
|
|
162
|
+
publishedAt?: undefined;
|
|
163
|
+
releaseNotes?: undefined;
|
|
164
|
+
recentReleases?: undefined;
|
|
165
|
+
recentBreakingChanges?: undefined;
|
|
166
|
+
versionContext?: undefined;
|
|
167
|
+
} | {
|
|
168
|
+
repository: string;
|
|
169
|
+
latestVersion: string;
|
|
170
|
+
latestStableVersion: string;
|
|
171
|
+
publishedAt: string | null;
|
|
172
|
+
releaseNotes: string | null;
|
|
173
|
+
recentReleases: {
|
|
174
|
+
version: string;
|
|
175
|
+
date: string;
|
|
176
|
+
isPrerelease: boolean;
|
|
177
|
+
url: string;
|
|
178
|
+
}[];
|
|
179
|
+
recentBreakingChanges: string[];
|
|
180
|
+
versionContext: string;
|
|
181
|
+
note?: undefined;
|
|
182
|
+
examples?: undefined;
|
|
183
|
+
availableExamples?: undefined;
|
|
184
|
+
hint?: undefined;
|
|
185
|
+
}>;
|
|
186
|
+
/**
|
|
187
|
+
* Check for breaking changes since a specific version
|
|
188
|
+
*/
|
|
189
|
+
export declare function checkBreakingChanges(input: CheckBreakingChangesInput): Promise<{
|
|
190
|
+
repository: string;
|
|
191
|
+
currentVersion: string;
|
|
192
|
+
latestVersion: string | null;
|
|
193
|
+
isOutdated: boolean;
|
|
194
|
+
versionsBehind: number;
|
|
195
|
+
hasBreakingChanges: boolean;
|
|
196
|
+
breakingChanges: string[];
|
|
197
|
+
recommendation: string;
|
|
198
|
+
}>;
|
|
199
|
+
/**
|
|
200
|
+
* Get migration guide between versions
|
|
201
|
+
*/
|
|
202
|
+
export declare function getMigrationGuide(input: GetMigrationGuideInput): Promise<{
|
|
203
|
+
repository: string;
|
|
204
|
+
from: string;
|
|
205
|
+
to: string;
|
|
206
|
+
summary: {
|
|
207
|
+
breakingChangesCount: number;
|
|
208
|
+
deprecationsCount: number;
|
|
209
|
+
newFeaturesCount: number;
|
|
210
|
+
};
|
|
211
|
+
breakingChanges: string[];
|
|
212
|
+
deprecations: string[];
|
|
213
|
+
newFeatures: string[];
|
|
214
|
+
migrationSteps: string[];
|
|
215
|
+
migrationDifficulty: string;
|
|
216
|
+
}>;
|
|
217
|
+
export declare const repositoryTools: ({
|
|
218
|
+
name: string;
|
|
219
|
+
description: string;
|
|
220
|
+
inputSchema: {
|
|
221
|
+
type: "object";
|
|
222
|
+
properties: {
|
|
223
|
+
repo: {
|
|
224
|
+
type: string;
|
|
225
|
+
description: string;
|
|
226
|
+
};
|
|
227
|
+
path: {
|
|
228
|
+
type: string;
|
|
229
|
+
description: string;
|
|
230
|
+
};
|
|
231
|
+
ref: {
|
|
232
|
+
type: string;
|
|
233
|
+
description: string;
|
|
234
|
+
};
|
|
235
|
+
category?: undefined;
|
|
236
|
+
since?: undefined;
|
|
237
|
+
repos?: undefined;
|
|
238
|
+
currentVersion?: undefined;
|
|
239
|
+
fromVersion?: undefined;
|
|
240
|
+
toVersion?: undefined;
|
|
241
|
+
};
|
|
242
|
+
required: string[];
|
|
243
|
+
};
|
|
244
|
+
handler: typeof getFile;
|
|
245
|
+
} | {
|
|
246
|
+
name: string;
|
|
247
|
+
description: string;
|
|
248
|
+
inputSchema: {
|
|
249
|
+
type: "object";
|
|
250
|
+
properties: {
|
|
251
|
+
category: {
|
|
252
|
+
type: string;
|
|
253
|
+
enum: string[];
|
|
254
|
+
description: string;
|
|
255
|
+
};
|
|
256
|
+
repo?: undefined;
|
|
257
|
+
path?: undefined;
|
|
258
|
+
ref?: undefined;
|
|
259
|
+
since?: undefined;
|
|
260
|
+
repos?: undefined;
|
|
261
|
+
currentVersion?: undefined;
|
|
262
|
+
fromVersion?: undefined;
|
|
263
|
+
toVersion?: undefined;
|
|
264
|
+
};
|
|
265
|
+
required: never[];
|
|
266
|
+
};
|
|
267
|
+
handler: typeof listExamples;
|
|
268
|
+
} | {
|
|
269
|
+
name: string;
|
|
270
|
+
description: string;
|
|
271
|
+
inputSchema: {
|
|
272
|
+
type: "object";
|
|
273
|
+
properties: {
|
|
274
|
+
since: {
|
|
275
|
+
type: string;
|
|
276
|
+
description: string;
|
|
277
|
+
};
|
|
278
|
+
repos: {
|
|
279
|
+
type: string;
|
|
280
|
+
items: {
|
|
281
|
+
type: string;
|
|
282
|
+
};
|
|
283
|
+
description: string;
|
|
284
|
+
};
|
|
285
|
+
repo?: undefined;
|
|
286
|
+
path?: undefined;
|
|
287
|
+
ref?: undefined;
|
|
288
|
+
category?: undefined;
|
|
289
|
+
currentVersion?: undefined;
|
|
290
|
+
fromVersion?: undefined;
|
|
291
|
+
toVersion?: undefined;
|
|
292
|
+
};
|
|
293
|
+
required: never[];
|
|
294
|
+
};
|
|
295
|
+
handler: typeof getLatestUpdates;
|
|
296
|
+
} | {
|
|
297
|
+
name: string;
|
|
298
|
+
description: string;
|
|
299
|
+
inputSchema: {
|
|
300
|
+
type: "object";
|
|
301
|
+
properties: {
|
|
302
|
+
repo: {
|
|
303
|
+
type: string;
|
|
304
|
+
description: string;
|
|
305
|
+
};
|
|
306
|
+
path?: undefined;
|
|
307
|
+
ref?: undefined;
|
|
308
|
+
category?: undefined;
|
|
309
|
+
since?: undefined;
|
|
310
|
+
repos?: undefined;
|
|
311
|
+
currentVersion?: undefined;
|
|
312
|
+
fromVersion?: undefined;
|
|
313
|
+
toVersion?: undefined;
|
|
314
|
+
};
|
|
315
|
+
required: string[];
|
|
316
|
+
};
|
|
317
|
+
handler: typeof getVersionInfo;
|
|
318
|
+
} | {
|
|
319
|
+
name: string;
|
|
320
|
+
description: string;
|
|
321
|
+
inputSchema: {
|
|
322
|
+
type: "object";
|
|
323
|
+
properties: {
|
|
324
|
+
repo: {
|
|
325
|
+
type: string;
|
|
326
|
+
description: string;
|
|
327
|
+
};
|
|
328
|
+
currentVersion: {
|
|
329
|
+
type: string;
|
|
330
|
+
description: string;
|
|
331
|
+
};
|
|
332
|
+
path?: undefined;
|
|
333
|
+
ref?: undefined;
|
|
334
|
+
category?: undefined;
|
|
335
|
+
since?: undefined;
|
|
336
|
+
repos?: undefined;
|
|
337
|
+
fromVersion?: undefined;
|
|
338
|
+
toVersion?: undefined;
|
|
339
|
+
};
|
|
340
|
+
required: string[];
|
|
341
|
+
};
|
|
342
|
+
handler: typeof checkBreakingChanges;
|
|
343
|
+
} | {
|
|
344
|
+
name: string;
|
|
345
|
+
description: string;
|
|
346
|
+
inputSchema: {
|
|
347
|
+
type: "object";
|
|
348
|
+
properties: {
|
|
349
|
+
repo: {
|
|
350
|
+
type: string;
|
|
351
|
+
description: string;
|
|
352
|
+
};
|
|
353
|
+
fromVersion: {
|
|
354
|
+
type: string;
|
|
355
|
+
description: string;
|
|
356
|
+
};
|
|
357
|
+
toVersion: {
|
|
358
|
+
type: string;
|
|
359
|
+
description: string;
|
|
360
|
+
};
|
|
361
|
+
path?: undefined;
|
|
362
|
+
ref?: undefined;
|
|
363
|
+
category?: undefined;
|
|
364
|
+
since?: undefined;
|
|
365
|
+
repos?: undefined;
|
|
366
|
+
currentVersion?: undefined;
|
|
367
|
+
};
|
|
368
|
+
required: string[];
|
|
369
|
+
};
|
|
370
|
+
handler: typeof getMigrationGuide;
|
|
371
|
+
})[];
|
|
372
|
+
//# sourceMappingURL=repository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../src/pipeline/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;EAW7B,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;EAMlC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;EAStC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;EAEpC,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;;;EAK1C,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;EAOvC,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,yBA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