@pulsemcp/air-provider-github 0.0.1 → 0.0.3
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/dist/github-provider.d.ts +26 -9
- package/dist/github-provider.d.ts.map +1 -1
- package/dist/github-provider.js +100 -47
- package/dist/github-provider.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -7,9 +7,8 @@ export interface GitHubUri {
|
|
|
7
7
|
}
|
|
8
8
|
export interface GitHubProviderOptions {
|
|
9
9
|
/**
|
|
10
|
-
* GitHub personal access token for authenticating
|
|
11
|
-
* Required for private repositories. Optional for public repos
|
|
12
|
-
* (unauthenticated requests have lower rate limits).
|
|
10
|
+
* GitHub personal access token for authenticating git clone.
|
|
11
|
+
* Required for private repositories. Optional for public repos.
|
|
13
12
|
*
|
|
14
13
|
* Can also be set via the AIR_GITHUB_TOKEN environment variable.
|
|
15
14
|
*/
|
|
@@ -23,21 +22,39 @@ export interface GitHubProviderOptions {
|
|
|
23
22
|
*/
|
|
24
23
|
export declare function parseGitHubUri(uri: string): GitHubUri;
|
|
25
24
|
/**
|
|
26
|
-
* Get the local cache directory for GitHub
|
|
25
|
+
* Get the local cache directory for GitHub clones.
|
|
27
26
|
*/
|
|
28
27
|
export declare function getCacheDir(): string;
|
|
29
28
|
/**
|
|
30
|
-
*
|
|
31
|
-
|
|
29
|
+
* Get the clone path for a specific owner/repo/ref combination.
|
|
30
|
+
*/
|
|
31
|
+
export declare function getClonePath(owner: string, repo: string, ref: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* GitHub catalog provider — resolves github:// URIs by cloning the
|
|
34
|
+
* repository locally (shallow clone) and reading files from the clone.
|
|
32
35
|
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
36
|
+
* Clones are cached at ~/.air/cache/github/{owner}/{repo}/{ref}/.
|
|
37
|
+
* Subsequent resolves for the same repo+ref reuse the existing clone.
|
|
35
38
|
*/
|
|
36
39
|
export declare class GitHubCatalogProvider implements CatalogProvider {
|
|
37
40
|
scheme: string;
|
|
38
41
|
private token;
|
|
39
42
|
constructor(options?: GitHubProviderOptions);
|
|
40
43
|
resolve(uri: string, _baseDir: string): Promise<Record<string, unknown>>;
|
|
41
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Return the local clone directory for a given github:// URI.
|
|
46
|
+
* This allows loadAndMerge to resolve relative path/file fields
|
|
47
|
+
* in artifact entries to absolute paths within the clone.
|
|
48
|
+
*/
|
|
49
|
+
resolveSourceDir(uri: string): string | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Ensure the repository is cloned locally. If the clone already exists,
|
|
52
|
+
* reuse it. Returns the path to the clone directory.
|
|
53
|
+
*/
|
|
54
|
+
private ensureClone;
|
|
55
|
+
/**
|
|
56
|
+
* Build the clone URL, injecting token for authentication if available.
|
|
57
|
+
*/
|
|
58
|
+
private buildCloneUrl;
|
|
42
59
|
}
|
|
43
60
|
//# sourceMappingURL=github-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-provider.d.ts","sourceRoot":"","sources":["../src/github-provider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"github-provider.d.ts","sourceRoot":"","sources":["../src/github-provider.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAsBD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CA6BrD;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAGpC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7E;AAUD;;;;;;GAMG;AACH,qBAAa,qBAAsB,YAAW,eAAe;IAC3D,MAAM,SAAY;IAClB,OAAO,CAAC,KAAK,CAAqB;gBAEtB,OAAO,CAAC,EAAE,qBAAqB;IAIrC,OAAO,CACX,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAmBnC;;;;OAIG;IACH,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAiBjD;;;OAGG;IACH,OAAO,CAAC,WAAW;IAkCnB;;OAEG;IACH,OAAO,CAAC,aAAa;CAMtB"}
|
package/dist/github-provider.js
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { execFileSync } from "child_process";
|
|
2
|
+
import { existsSync, readFileSync } from "fs";
|
|
3
|
+
import { resolve, dirname } from "path";
|
|
4
|
+
/**
|
|
5
|
+
* Validate that a URI component contains only safe characters.
|
|
6
|
+
* Prevents path traversal and shell injection via owner/repo/ref values.
|
|
7
|
+
*/
|
|
8
|
+
function validateUriComponent(value, label) {
|
|
9
|
+
// Allow alphanumeric, hyphens, dots, underscores, forward slashes (for paths)
|
|
10
|
+
if (!/^[a-zA-Z0-9._\-/]+$/.test(value)) {
|
|
11
|
+
throw new Error(`Invalid ${label} in github:// URI: "${value}". ` +
|
|
12
|
+
`Only alphanumeric characters, hyphens, dots, underscores, and forward slashes are allowed.`);
|
|
13
|
+
}
|
|
14
|
+
// Prevent path traversal
|
|
15
|
+
if (value.includes("..")) {
|
|
16
|
+
throw new Error(`Invalid ${label} in github:// URI: "${value}". Path traversal ("..") is not allowed.`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
3
19
|
/**
|
|
4
20
|
* Parse a github:// URI into its components.
|
|
5
21
|
*
|
|
@@ -22,21 +38,41 @@ export function parseGitHubUri(uri) {
|
|
|
22
38
|
ref = filePath.slice(atIndex + 1);
|
|
23
39
|
filePath = filePath.slice(0, atIndex);
|
|
24
40
|
}
|
|
41
|
+
// Validate all components to prevent shell injection and path traversal
|
|
42
|
+
validateUriComponent(owner, "owner");
|
|
43
|
+
validateUriComponent(repo, "repo");
|
|
44
|
+
if (ref)
|
|
45
|
+
validateUriComponent(ref, "ref");
|
|
46
|
+
validateUriComponent(filePath, "path");
|
|
25
47
|
return { owner, repo, path: filePath, ref };
|
|
26
48
|
}
|
|
27
49
|
/**
|
|
28
|
-
* Get the local cache directory for GitHub
|
|
50
|
+
* Get the local cache directory for GitHub clones.
|
|
29
51
|
*/
|
|
30
52
|
export function getCacheDir() {
|
|
31
53
|
const home = process.env.HOME || process.env.USERPROFILE || "~";
|
|
32
54
|
return resolve(home, ".air", "cache", "github");
|
|
33
55
|
}
|
|
34
56
|
/**
|
|
35
|
-
*
|
|
36
|
-
|
|
57
|
+
* Get the clone path for a specific owner/repo/ref combination.
|
|
58
|
+
*/
|
|
59
|
+
export function getClonePath(owner, repo, ref) {
|
|
60
|
+
return resolve(getCacheDir(), owner, repo, ref);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Redact tokens from a string to prevent leaking credentials in logs.
|
|
64
|
+
*/
|
|
65
|
+
function redactToken(text, token) {
|
|
66
|
+
if (!token)
|
|
67
|
+
return text;
|
|
68
|
+
return text.replaceAll(token, "***");
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* GitHub catalog provider — resolves github:// URIs by cloning the
|
|
72
|
+
* repository locally (shallow clone) and reading files from the clone.
|
|
37
73
|
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
74
|
+
* Clones are cached at ~/.air/cache/github/{owner}/{repo}/{ref}/.
|
|
75
|
+
* Subsequent resolves for the same repo+ref reuse the existing clone.
|
|
40
76
|
*/
|
|
41
77
|
export class GitHubCatalogProvider {
|
|
42
78
|
scheme = "github";
|
|
@@ -47,58 +83,75 @@ export class GitHubCatalogProvider {
|
|
|
47
83
|
async resolve(uri, _baseDir) {
|
|
48
84
|
const parsed = parseGitHubUri(uri);
|
|
49
85
|
const ref = parsed.ref || "HEAD";
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
86
|
+
const cloneDir = this.ensureClone(parsed.owner, parsed.repo, ref);
|
|
87
|
+
const filePath = resolve(cloneDir, parsed.path);
|
|
88
|
+
if (!existsSync(filePath)) {
|
|
89
|
+
throw new Error(`File not found in cloned repository: ${parsed.path}\n` +
|
|
90
|
+
` Repository: ${parsed.owner}/${parsed.repo}\n` +
|
|
91
|
+
` Ref: ${ref}\n` +
|
|
92
|
+
` Clone path: ${cloneDir}`);
|
|
57
93
|
}
|
|
58
|
-
const content =
|
|
59
|
-
// Write to cache
|
|
60
|
-
const cacheFileDir = resolve(cachePath, "..");
|
|
61
|
-
mkdirSync(cacheFileDir, { recursive: true });
|
|
62
|
-
writeFileSync(cachePath, content);
|
|
94
|
+
const content = readFileSync(filePath, "utf-8");
|
|
63
95
|
return JSON.parse(content);
|
|
64
96
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
97
|
+
/**
|
|
98
|
+
* Return the local clone directory for a given github:// URI.
|
|
99
|
+
* This allows loadAndMerge to resolve relative path/file fields
|
|
100
|
+
* in artifact entries to absolute paths within the clone.
|
|
101
|
+
*/
|
|
102
|
+
resolveSourceDir(uri) {
|
|
103
|
+
const parsed = parseGitHubUri(uri);
|
|
104
|
+
const ref = parsed.ref || "HEAD";
|
|
105
|
+
const cloneDir = getClonePath(parsed.owner, parsed.repo, ref);
|
|
106
|
+
// Return the directory containing the resolved file within the clone,
|
|
107
|
+
// so relative paths in the artifact index resolve correctly.
|
|
108
|
+
const filePath = resolve(cloneDir, parsed.path);
|
|
109
|
+
const sourceDir = dirname(filePath);
|
|
110
|
+
// Only return if the clone already exists (resolve() should be called first)
|
|
111
|
+
if (existsSync(cloneDir)) {
|
|
112
|
+
return sourceDir;
|
|
70
113
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
114
|
+
return undefined;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Ensure the repository is cloned locally. If the clone already exists,
|
|
118
|
+
* reuse it. Returns the path to the clone directory.
|
|
119
|
+
*/
|
|
120
|
+
ensureClone(owner, repo, ref) {
|
|
121
|
+
const cloneDir = getClonePath(owner, repo, ref);
|
|
122
|
+
if (existsSync(resolve(cloneDir, ".git"))) {
|
|
123
|
+
return cloneDir;
|
|
77
124
|
}
|
|
78
|
-
|
|
125
|
+
const repoUrl = this.buildCloneUrl(owner, repo);
|
|
126
|
+
const publicUrl = `https://github.com/${owner}/${repo}.git`;
|
|
79
127
|
try {
|
|
80
|
-
|
|
128
|
+
const args = ref === "HEAD"
|
|
129
|
+
? ["clone", "--depth", "1", repoUrl, cloneDir]
|
|
130
|
+
: ["clone", "--depth", "1", "--branch", ref, repoUrl, cloneDir];
|
|
131
|
+
execFileSync("git", args, { stdio: "pipe", timeout: 60000 });
|
|
81
132
|
}
|
|
82
133
|
catch (err) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
if (!response.ok) {
|
|
87
|
-
const hint = response.status === 404
|
|
134
|
+
const rawMsg = err instanceof Error ? err.message : String(err);
|
|
135
|
+
const msg = redactToken(rawMsg, this.token);
|
|
136
|
+
const hint = msg.includes("Authentication failed") || msg.includes("could not read Username")
|
|
88
137
|
? " (repository may be private — set AIR_GITHUB_TOKEN or pass token option)"
|
|
89
|
-
:
|
|
90
|
-
? " (
|
|
138
|
+
: msg.includes("not found")
|
|
139
|
+
? " (repository or ref not found)"
|
|
91
140
|
: "";
|
|
92
|
-
throw new Error(`
|
|
93
|
-
`
|
|
94
|
-
`
|
|
141
|
+
throw new Error(`Failed to clone ${owner}/${repo} at ref "${ref}"${hint}\n` +
|
|
142
|
+
` URL: ${publicUrl}\n` +
|
|
143
|
+
` Error: ${msg}`);
|
|
95
144
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
145
|
+
return cloneDir;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Build the clone URL, injecting token for authentication if available.
|
|
149
|
+
*/
|
|
150
|
+
buildCloneUrl(owner, repo) {
|
|
151
|
+
if (this.token) {
|
|
152
|
+
return `https://${this.token}@github.com/${owner}/${repo}.git`;
|
|
100
153
|
}
|
|
101
|
-
return
|
|
154
|
+
return `https://github.com/${owner}/${repo}.git`;
|
|
102
155
|
}
|
|
103
156
|
}
|
|
104
157
|
//# sourceMappingURL=github-provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-provider.js","sourceRoot":"","sources":["../src/github-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"github-provider.js","sourceRoot":"","sources":["../src/github-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAoBxC;;;GAGG;AACH,SAAS,oBAAoB,CAAC,KAAa,EAAE,KAAa;IACxD,8EAA8E;IAC9E,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CACb,WAAW,KAAK,uBAAuB,KAAK,KAAK;YAC/C,4FAA4F,CAC/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OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;OAEG;IACK,aAAa,CAAC,KAAa,EAAE,IAAY;QAC/C,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,OAAO,WAAW,IAAI,CAAC,KAAK,eAAe,KAAK,IAAI,IAAI,MAAM,CAAC;QACjE,CAAC;QACD,OAAO,sBAAsB,KAAK,IAAI,IAAI,MAAM,CAAC;IACnD,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AirExtension } from "@pulsemcp/air-core";
|
|
2
|
-
export { GitHubCatalogProvider, parseGitHubUri, getCacheDir } from "./github-provider.js";
|
|
2
|
+
export { GitHubCatalogProvider, parseGitHubUri, getCacheDir, getClonePath } from "./github-provider.js";
|
|
3
3
|
export type { GitHubUri, GitHubProviderOptions } from "./github-provider.js";
|
|
4
4
|
declare const extension: AirExtension;
|
|
5
5
|
export default extension;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGvD,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGvD,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACxG,YAAY,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7E,QAAA,MAAM,SAAS,EAAE,YAIhB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GitHubCatalogProvider } from "./github-provider.js";
|
|
2
|
-
export { GitHubCatalogProvider, parseGitHubUri, getCacheDir } from "./github-provider.js";
|
|
2
|
+
export { GitHubCatalogProvider, parseGitHubUri, getCacheDir, getClonePath } from "./github-provider.js";
|
|
3
3
|
const extension = {
|
|
4
4
|
name: "github",
|
|
5
5
|
type: "provider",
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGxG,MAAM,SAAS,GAAiB;IAC9B,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE,IAAI,qBAAqB,EAAE;CACtC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pulsemcp/air-provider-github",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"lint": "tsc --noEmit"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@pulsemcp/air-core": "0.0.
|
|
32
|
+
"@pulsemcp/air-core": "0.0.3"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/node": "^22.10.0",
|