@d5render/cli 0.1.12 → 0.1.15
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/.skills/review/SKILL.md +5 -3
- package/.skills/review/version +1 -1
- package/bin/copilot.js +2864 -3200
- package/bin/d5cli +16 -10
- package/package.json +1 -1
package/bin/d5cli
CHANGED
|
@@ -6,14 +6,14 @@ import { argv, env, exit, platform } from "node:process";
|
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
|
|
8
8
|
//#region package.json
|
|
9
|
-
var name
|
|
10
|
-
var version = "0.1.
|
|
9
|
+
var name = "@d5render/cli";
|
|
10
|
+
var version = "0.1.15";
|
|
11
11
|
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region copilot/server/config.ts
|
|
14
|
-
const name = "d5_mcp_review_builtin";
|
|
14
|
+
const name$1 = "d5_mcp_review_builtin";
|
|
15
15
|
const report = "report";
|
|
16
|
-
const getHash = "
|
|
16
|
+
const getHash = "hash";
|
|
17
17
|
const file = "./copilot.js";
|
|
18
18
|
const serveFile = join(dirname(fileURLToPath(import.meta.url)), file);
|
|
19
19
|
const envJson = buildEnv();
|
|
@@ -37,12 +37,13 @@ const envUsed = {
|
|
|
37
37
|
};
|
|
38
38
|
const tools = [
|
|
39
39
|
"--additional-mcp-config",
|
|
40
|
-
JSON.stringify({ mcpServers: { [name]: {
|
|
40
|
+
JSON.stringify({ mcpServers: { [name$1]: {
|
|
41
41
|
type: "local",
|
|
42
42
|
command: "node",
|
|
43
43
|
args: [serveFile, `--customizenv=${JSON.stringify(envUsed)}`],
|
|
44
44
|
tools: ["*"]
|
|
45
45
|
} } }),
|
|
46
|
+
"--allow-all-paths",
|
|
46
47
|
"--allow-all-tools",
|
|
47
48
|
"--deny-tool",
|
|
48
49
|
"write",
|
|
@@ -193,8 +194,8 @@ function need() {
|
|
|
193
194
|
|
|
194
195
|
//#endregion
|
|
195
196
|
//#region copilot/bin/index.ts
|
|
196
|
-
const prompt = `call the mcp tool '${name}-${getHash}' to load review commits, if the task encounters an error, throw that
|
|
197
|
-
|
|
197
|
+
const prompt = `Load skills, then call the mcp tool '${name$1}-${getHash}' to load code-review commits, if the task encounters an error, throw that.
|
|
198
|
+
Otherwise, use chinese as default language to call the mcp tool '${name$1}-${report}'`;
|
|
198
199
|
deploy();
|
|
199
200
|
if (need()) {
|
|
200
201
|
install();
|
|
@@ -207,10 +208,15 @@ if (need()) {
|
|
|
207
208
|
prompt
|
|
208
209
|
], {
|
|
209
210
|
cwd: env.CI_PROJECT_DIR,
|
|
211
|
+
stdio: [
|
|
212
|
+
"inherit",
|
|
213
|
+
"pipe",
|
|
214
|
+
"pipe"
|
|
215
|
+
],
|
|
210
216
|
...platform === "win32" && { windowsHide: true }
|
|
211
217
|
});
|
|
212
|
-
copilot.stdout.on("data", (
|
|
213
|
-
copilot.stderr.on("data", (
|
|
218
|
+
copilot.stdout.on("data", (chunk) => console.log(String(chunk)));
|
|
219
|
+
copilot.stderr.on("data", (chunk) => console.error(String(chunk)));
|
|
214
220
|
copilot.on("close", (code) => exit(code));
|
|
215
221
|
} else console.log("重复提交,进程跳过");
|
|
216
222
|
function findCopilopt() {
|
|
@@ -228,7 +234,7 @@ function findCopilopt() {
|
|
|
228
234
|
if (!binPath) throw new Error("non copilot executable found");
|
|
229
235
|
const copilotVersion = copilotPackage.version || "unknown";
|
|
230
236
|
const copilotPath = join(copilot, binPath);
|
|
231
|
-
console.log(`${name
|
|
237
|
+
console.log(`${name} server:
|
|
232
238
|
version: ${version}
|
|
233
239
|
path: ${serveFile}
|
|
234
240
|
copilot:
|