@d5render/cli 0.1.65 → 0.1.68
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/.github/instructions/severity.instructions.md +50 -50
- package/.skills/code-review/SKILL.md +38 -38
- package/.skills/devops/SKILL.md +46 -46
- package/README.md +35 -35
- package/bin/d5cli +4 -3
- package/bin/mcpServer.js +148 -148
- package/package.json +1 -1
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
---
|
|
2
|
-
applyTo: "**"
|
|
3
|
-
excludeAgent: ["code-review"]
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# **Further summary report:**
|
|
7
|
-
|
|
8
|
-
- **Tone/Content:** **DO NOT** add comments that:
|
|
9
|
-
- Tell the user to "check," "confirm," "verify," or "ensure" something.
|
|
10
|
-
- Explain what the code change does or validate its purpose.
|
|
11
|
-
- Explain the code to the author (they are assumed to know their own code).
|
|
12
|
-
- Comment on missing trailing newlines or other purely stylistic issues that do not affect code execution or readability in a meaningful way.
|
|
13
|
-
- **Technical Detail:**
|
|
14
|
-
- Pay **meticulous attention to line numbers and indentation** in code suggestions; they **must** be correct and match the surrounding code.
|
|
15
|
-
- **NEVER** comment on license headers, copyright headers, or anything related to future dates/versions (e.g., "this date is in the future").
|
|
16
|
-
- **NEVER** comment on the presence or absence of comments in the code.
|
|
17
|
-
- **Formatting/Structure:**
|
|
18
|
-
- Keep the **change summary** concise (aim for a single sentence).
|
|
19
|
-
- Keep **comment bodies concise** and focused on a single issue.
|
|
20
|
-
- When similar issues occur frequently, please review the code to determine if it meets the change objectives.
|
|
21
|
-
|
|
22
|
-
# **Severity Guidelines (for consistent classification):**
|
|
23
|
-
|
|
24
|
-
- **Functional correctness bugs that lead to behavior contrary to the change's intent should generally be classified as HIGH or CRITICAL.**
|
|
25
|
-
- **Issues where input/output validation cannot be performed even after searching all contexts do not require reporting.**
|
|
26
|
-
- **CRITICAL:**
|
|
27
|
-
- security vulnerabilities
|
|
28
|
-
- system-breaking bugs
|
|
29
|
-
- complete logic failure
|
|
30
|
-
- the features already in repository or suspected highly duplicated code
|
|
31
|
-
- **HIGH:**
|
|
32
|
-
- performance bottlenecks (e.g., N+1 queries)
|
|
33
|
-
- resource leaks
|
|
34
|
-
- major architectural violations
|
|
35
|
-
- code style mismatch best practices
|
|
36
|
-
- severe code smell that significantly impairs maintainability.
|
|
37
|
-
- **MEDIUM:**
|
|
38
|
-
- typographical errors in code (not comments)
|
|
39
|
-
- complex logic that could be simplified
|
|
40
|
-
- non-compliant style guide issues (e.g., wrong naming convention).
|
|
41
|
-
- **LOW:**
|
|
42
|
-
- confirmation items for multi-device interaction
|
|
43
|
-
- Refactoring hardcoded values to constants
|
|
44
|
-
- minor log message enhancements
|
|
45
|
-
- comments on docstring/Javadoc expansion
|
|
46
|
-
- typos in documentation (.md files)
|
|
47
|
-
- comments on tests or test quality
|
|
48
|
-
- suppressing unchecked warnings/TODOs.
|
|
49
|
-
|
|
50
|
-
# **Focus on understanding the content of the comment itself, and ignore any inappropriate wording.**
|
|
1
|
+
---
|
|
2
|
+
applyTo: "**"
|
|
3
|
+
excludeAgent: ["code-review"]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# **Further summary report:**
|
|
7
|
+
|
|
8
|
+
- **Tone/Content:** **DO NOT** add comments that:
|
|
9
|
+
- Tell the user to "check," "confirm," "verify," or "ensure" something.
|
|
10
|
+
- Explain what the code change does or validate its purpose.
|
|
11
|
+
- Explain the code to the author (they are assumed to know their own code).
|
|
12
|
+
- Comment on missing trailing newlines or other purely stylistic issues that do not affect code execution or readability in a meaningful way.
|
|
13
|
+
- **Technical Detail:**
|
|
14
|
+
- Pay **meticulous attention to line numbers and indentation** in code suggestions; they **must** be correct and match the surrounding code.
|
|
15
|
+
- **NEVER** comment on license headers, copyright headers, or anything related to future dates/versions (e.g., "this date is in the future").
|
|
16
|
+
- **NEVER** comment on the presence or absence of comments in the code.
|
|
17
|
+
- **Formatting/Structure:**
|
|
18
|
+
- Keep the **change summary** concise (aim for a single sentence).
|
|
19
|
+
- Keep **comment bodies concise** and focused on a single issue.
|
|
20
|
+
- When similar issues occur frequently, please review the code to determine if it meets the change objectives.
|
|
21
|
+
|
|
22
|
+
# **Severity Guidelines (for consistent classification):**
|
|
23
|
+
|
|
24
|
+
- **Functional correctness bugs that lead to behavior contrary to the change's intent should generally be classified as HIGH or CRITICAL.**
|
|
25
|
+
- **Issues where input/output validation cannot be performed even after searching all contexts do not require reporting.**
|
|
26
|
+
- **CRITICAL:**
|
|
27
|
+
- security vulnerabilities
|
|
28
|
+
- system-breaking bugs
|
|
29
|
+
- complete logic failure
|
|
30
|
+
- the features already in repository or suspected highly duplicated code
|
|
31
|
+
- **HIGH:**
|
|
32
|
+
- performance bottlenecks (e.g., N+1 queries)
|
|
33
|
+
- resource leaks
|
|
34
|
+
- major architectural violations
|
|
35
|
+
- code style mismatch best practices
|
|
36
|
+
- severe code smell that significantly impairs maintainability.
|
|
37
|
+
- **MEDIUM:**
|
|
38
|
+
- typographical errors in code (not comments)
|
|
39
|
+
- complex logic that could be simplified
|
|
40
|
+
- non-compliant style guide issues (e.g., wrong naming convention).
|
|
41
|
+
- **LOW:**
|
|
42
|
+
- confirmation items for multi-device interaction
|
|
43
|
+
- Refactoring hardcoded values to constants
|
|
44
|
+
- minor log message enhancements
|
|
45
|
+
- comments on docstring/Javadoc expansion
|
|
46
|
+
- typos in documentation (.md files)
|
|
47
|
+
- comments on tests or test quality
|
|
48
|
+
- suppressing unchecked warnings/TODOs.
|
|
49
|
+
|
|
50
|
+
# **Focus on understanding the content of the comment itself, and ignore any inappropriate wording.**
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: code-review
|
|
3
|
-
description: code-review task process.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
For all review-related tasks, the subagent and main-agent can confirm with each other without user confirmation; they can be executed directly. However, it is important to note that all executed tasks must be listed at the end and only main-agent can execute report tasks. And obtain as much context as possible, including but not limited to the following:
|
|
7
|
-
|
|
8
|
-
- Use tools to locate files related to the changes. However, commits that explicitly request a merge, such as those with the title "Merge", do not require processing.
|
|
9
|
-
- Use toolchains to build complete call relationships and flowcharts for diff code, ensure the relevant graphs are as complete as possible (use `LSP` tool as a first-choice solution, and try other toolchain only if encounter problems). And use other tools mentioned in related documents to construct a data flow graph of the changes, ensure the relevant graphs are as complete as possible.
|
|
10
|
-
|
|
11
|
-
Then,
|
|
12
|
-
|
|
13
|
-
- Launch parallel subagents to independently code review the change (Unless there are special requirements, only the main-agent needs to call the report mcp tools, subagnets do not call.). Information can be communicated between the subagents and main-agent, Subagents should do the following, then return a list of issues and the reason each issue was flagged (eg. .md adherence, issue, historical git context, etc.):
|
|
14
|
-
- One of:
|
|
15
|
-
- Read README.md, AGENTS.md, .github/**.md, .cursor/**.md files in the **same directory** as the changes and the **root directory**.
|
|
16
|
-
- Determining whether documents contain related content requires additional loading and returning to the main agent.
|
|
17
|
-
- Check [severity.instructions.md](./severity.instructions.md) to clarify error severity levels, Please follow the project requirements regarding the redefinition of error levels in the relevant documentation.
|
|
18
|
-
- Another of:
|
|
19
|
-
- Read all modified codes block, build a complete data flow and call relationship graph about the codes to review logic
|
|
20
|
-
- Consider whether there is a better implementation for the current logic.
|
|
21
|
-
- One more of:
|
|
22
|
-
- Read the git blame and history of the code modified, to identify any issues in light of that historical context
|
|
23
|
-
- Read code comments in the modified files, and make sure the changes in the pull request comply with any guidance in the comments.
|
|
24
|
-
- Read previous pull requests that touched these files, and check for any comments on those pull requests that may also apply to the current pull request.
|
|
25
|
-
- Consider other related aspects of the current function and provide corresponding suggestions.
|
|
26
|
-
- Parallel subagents have the following additions.
|
|
27
|
-
- The subagents **should not** perform any report-related tasks.
|
|
28
|
-
- For each issue found returns a score to indicate the agent's level of confidence for whether the issue is real or false positive. To do that, the agent should score each issue on a scale from 0-100, indicating its level of confidence. For issues that were flagged due to CLAUDE.md instructions, the agent should double check that the CLAUDE.md actually calls out that issue specifically. The scale is (give this rubric to the agent verbatim):
|
|
29
|
-
- 0: Not confident at all. This is a false positive that doesn't stand up to light scrutiny, or is a pre-existing issue.
|
|
30
|
-
- 25: Somewhat confident. This might be a real issue, but may also be a false positive. The agent wasn't able to verify that it's a real issue. If the issue is stylistic, it is one that was not explicitly called out in the relevant CLAUDE.md.
|
|
31
|
-
- 50: Moderately confident. The agent was able to verify this is a real issue, but it might be a nitpick or not happen very often in practice. Relative to the rest of the PR, it's not very important.
|
|
32
|
-
- 75: Highly confident. The agent double checked the issue, and verified that it is very likely it is a real issue that will be hit in practice. The existing approach in the PR is insufficient. The issue is very important and will directly impact the code's functionality, or it is an issue that is directly mentioned in the relevant CLAUDE.md.
|
|
33
|
-
- 100: Absolutely certain. The agent double checked the issue, and confirmed that it is definitely a real issue, that will happen frequently in practice. The evidence directly confirms this.
|
|
34
|
-
- List the task plan and output the task completion status to main-agent. Then, main-agent performs the following actions
|
|
35
|
-
- First, based on the report, relevant tools were used again to supplement the context, them evaluate codes self.
|
|
36
|
-
- Then, compare and organize the issue scores in self and subagent, refine the context of projects scoring below 60, and re-perform the review. And final score is the average of the three scores.
|
|
37
|
-
- List all the task status
|
|
38
|
-
- Executes the report-related processes, must use chinese(中文) to report
|
|
1
|
+
---
|
|
2
|
+
name: code-review
|
|
3
|
+
description: code-review task process.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
For all review-related tasks, the subagent and main-agent can confirm with each other without user confirmation; they can be executed directly. However, it is important to note that all executed tasks must be listed at the end and only main-agent can execute report tasks. And obtain as much context as possible, including but not limited to the following:
|
|
7
|
+
|
|
8
|
+
- Use tools to locate files related to the changes. However, commits that explicitly request a merge, such as those with the title "Merge", do not require processing.
|
|
9
|
+
- Use toolchains to build complete call relationships and flowcharts for diff code, ensure the relevant graphs are as complete as possible (use `LSP` tool as a first-choice solution, and try other toolchain only if encounter problems). And use other tools mentioned in related documents to construct a data flow graph of the changes, ensure the relevant graphs are as complete as possible.
|
|
10
|
+
|
|
11
|
+
Then,
|
|
12
|
+
|
|
13
|
+
- Launch parallel subagents to independently code review the change (Unless there are special requirements, only the main-agent needs to call the report mcp tools, subagnets do not call.). Information can be communicated between the subagents and main-agent, Subagents should do the following, then return a list of issues and the reason each issue was flagged (eg. .md adherence, issue, historical git context, etc.):
|
|
14
|
+
- One of:
|
|
15
|
+
- Read README.md, AGENTS.md, .github/**.md, .cursor/**.md files in the **same directory** as the changes and the **root directory**.
|
|
16
|
+
- Determining whether documents contain related content requires additional loading and returning to the main agent.
|
|
17
|
+
- Check [severity.instructions.md](./severity.instructions.md) to clarify error severity levels, Please follow the project requirements regarding the redefinition of error levels in the relevant documentation.
|
|
18
|
+
- Another of:
|
|
19
|
+
- Read all modified codes block, build a complete data flow and call relationship graph about the codes to review logic
|
|
20
|
+
- Consider whether there is a better implementation for the current logic.
|
|
21
|
+
- One more of:
|
|
22
|
+
- Read the git blame and history of the code modified, to identify any issues in light of that historical context
|
|
23
|
+
- Read code comments in the modified files, and make sure the changes in the pull request comply with any guidance in the comments.
|
|
24
|
+
- Read previous pull requests that touched these files, and check for any comments on those pull requests that may also apply to the current pull request.
|
|
25
|
+
- Consider other related aspects of the current function and provide corresponding suggestions.
|
|
26
|
+
- Parallel subagents have the following additions.
|
|
27
|
+
- The subagents **should not** perform any report-related tasks.
|
|
28
|
+
- For each issue found returns a score to indicate the agent's level of confidence for whether the issue is real or false positive. To do that, the agent should score each issue on a scale from 0-100, indicating its level of confidence. For issues that were flagged due to CLAUDE.md instructions, the agent should double check that the CLAUDE.md actually calls out that issue specifically. The scale is (give this rubric to the agent verbatim):
|
|
29
|
+
- 0: Not confident at all. This is a false positive that doesn't stand up to light scrutiny, or is a pre-existing issue.
|
|
30
|
+
- 25: Somewhat confident. This might be a real issue, but may also be a false positive. The agent wasn't able to verify that it's a real issue. If the issue is stylistic, it is one that was not explicitly called out in the relevant CLAUDE.md.
|
|
31
|
+
- 50: Moderately confident. The agent was able to verify this is a real issue, but it might be a nitpick or not happen very often in practice. Relative to the rest of the PR, it's not very important.
|
|
32
|
+
- 75: Highly confident. The agent double checked the issue, and verified that it is very likely it is a real issue that will be hit in practice. The existing approach in the PR is insufficient. The issue is very important and will directly impact the code's functionality, or it is an issue that is directly mentioned in the relevant CLAUDE.md.
|
|
33
|
+
- 100: Absolutely certain. The agent double checked the issue, and confirmed that it is definitely a real issue, that will happen frequently in practice. The evidence directly confirms this.
|
|
34
|
+
- List the task plan and output the task completion status to main-agent. Then, main-agent performs the following actions
|
|
35
|
+
- First, based on the report, relevant tools were used again to supplement the context, them evaluate codes self.
|
|
36
|
+
- Then, compare and organize the issue scores in self and subagent, refine the context of projects scoring below 60, and re-perform the review. And final score is the average of the three scores.
|
|
37
|
+
- List all the task status
|
|
38
|
+
- Executes the report-related processes, must use chinese(中文) to report
|
package/.skills/devops/SKILL.md
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: 开发流程
|
|
3
|
-
description: 初始化项目时的相关配置
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# install
|
|
7
|
-
|
|
8
|
-
请运行 npm run setup 进行项目初始化
|
|
9
|
-
|
|
10
|
-
整体使用 ts 进行开发,会进行一轮打包,最终 CI 运行的是 bin/d5cli 文件
|
|
11
|
-
|
|
12
|
-
# dev
|
|
13
|
-
|
|
14
|
-
CI MCP 的入口是 [server.ts](.\copilot\server\index.ts) 会经历一轮打包进入 dist (只需要启动 server)
|
|
15
|
-
|
|
16
|
-
开发的一些注意点:
|
|
17
|
-
|
|
18
|
-
1. [config.ts](.\copilot\server\config.ts) 属于公共配置,有需要可以放这里
|
|
19
|
-
2. [vscode](.\vscode\index.ts) 插件的 client 需要单独开发
|
|
20
|
-
3. 本地功能调试 gpt-5-mini 食用最佳🤣,效果测试建议切回当前模型(开发环境已内置)
|
|
21
|
-
4. 返回 Promise 之后会丢失开发过程中的类型支持,registerTool 调用时可先不写 Promise 看 MCP Server 支持的返回参数
|
|
22
|
-
5. 其他用例参考 https://github.com/modelcontextprotocol/typescript-sdk/tree/main/src/examples
|
|
23
|
-
|
|
24
|
-
# debug
|
|
25
|
-
|
|
26
|
-
项目初始化会多出来 Standalone 的调试配置。
|
|
27
|
-
|
|
28
|
-
可点其进行开发过程中的调试win下linux调试建议:
|
|
29
|
-
|
|
30
|
-
1. 安装 wsl
|
|
31
|
-
- 系统:`wsl --install`
|
|
32
|
-
- ```
|
|
33
|
-
# wsl内安装nvm
|
|
34
|
-
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
|
|
35
|
-
|
|
36
|
-
# 代替重启 shell
|
|
37
|
-
\. "$HOME/.nvm/nvm.sh"
|
|
38
|
-
|
|
39
|
-
# 安装 Node
|
|
40
|
-
# 安装 pnpm
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
- 插件 WSL (已在插件建议中)
|
|
44
|
-
|
|
45
|
-
2. git worktree 创建linux分支(或者直接靠代码)
|
|
46
|
-
3. ide 基于wsl启动(mnt是默认磁盘位置)
|
|
1
|
+
---
|
|
2
|
+
name: 开发流程
|
|
3
|
+
description: 初始化项目时的相关配置
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# install
|
|
7
|
+
|
|
8
|
+
请运行 npm run setup 进行项目初始化
|
|
9
|
+
|
|
10
|
+
整体使用 ts 进行开发,会进行一轮打包,最终 CI 运行的是 bin/d5cli 文件
|
|
11
|
+
|
|
12
|
+
# dev
|
|
13
|
+
|
|
14
|
+
CI MCP 的入口是 [server.ts](.\copilot\server\index.ts) 会经历一轮打包进入 dist (只需要启动 server)
|
|
15
|
+
|
|
16
|
+
开发的一些注意点:
|
|
17
|
+
|
|
18
|
+
1. [config.ts](.\copilot\server\config.ts) 属于公共配置,有需要可以放这里
|
|
19
|
+
2. [vscode](.\vscode\index.ts) 插件的 client 需要单独开发
|
|
20
|
+
3. 本地功能调试 gpt-5-mini 食用最佳🤣,效果测试建议切回当前模型(开发环境已内置)
|
|
21
|
+
4. 返回 Promise 之后会丢失开发过程中的类型支持,registerTool 调用时可先不写 Promise 看 MCP Server 支持的返回参数
|
|
22
|
+
5. 其他用例参考 https://github.com/modelcontextprotocol/typescript-sdk/tree/main/src/examples
|
|
23
|
+
|
|
24
|
+
# debug
|
|
25
|
+
|
|
26
|
+
项目初始化会多出来 Standalone 的调试配置。
|
|
27
|
+
|
|
28
|
+
可点其进行开发过程中的调试win下linux调试建议:
|
|
29
|
+
|
|
30
|
+
1. 安装 wsl
|
|
31
|
+
- 系统:`wsl --install`
|
|
32
|
+
- ```
|
|
33
|
+
# wsl内安装nvm
|
|
34
|
+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
|
|
35
|
+
|
|
36
|
+
# 代替重启 shell
|
|
37
|
+
\. "$HOME/.nvm/nvm.sh"
|
|
38
|
+
|
|
39
|
+
# 安装 Node
|
|
40
|
+
# 安装 pnpm
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
- 插件 WSL (已在插件建议中)
|
|
44
|
+
|
|
45
|
+
2. git worktree 创建linux分支(或者直接靠代码)
|
|
46
|
+
3. ide 基于wsl启动(mnt是默认磁盘位置)
|
package/README.md
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
> 参考 [.skills/devops](.skills/devops) 对项目进行初始化
|
|
2
|
-
|
|
3
|
-
> .github/\* 是相关技能的自定义的部分,建议自行放在项目文件夹内,review脚本会自动部署在~/.claude/skills(.claude适配的CLI比较多)内
|
|
4
|
-
|
|
5
|
-
# CHANGELOG
|
|
6
|
-
|
|
7
|
-
### 2026-3-18
|
|
8
|
-
|
|
9
|
-
🚩 cli
|
|
10
|
-
|
|
11
|
-
- 功能更新
|
|
12
|
-
- 报告添加回流功能
|
|
13
|
-
|
|
14
|
-
🚩 skills
|
|
15
|
-
|
|
16
|
-
- 多agent审查
|
|
17
|
-
- 启动LSP等辅助工具
|
|
18
|
-
|
|
19
|
-
### 2026-1-31
|
|
20
|
-
|
|
21
|
-
code-review skill 补充LSP相关语句
|
|
22
|
-
|
|
23
|
-
### 2026-1-16
|
|
24
|
-
|
|
25
|
-
补充安全相关检查
|
|
26
|
-
|
|
27
|
-
### 2026-1-7
|
|
28
|
-
|
|
29
|
-
代码评审 skills 更新
|
|
30
|
-
|
|
31
|
-
使用内置 skills
|
|
32
|
-
|
|
33
|
-
### 2025-12-31
|
|
34
|
-
|
|
35
|
-
基础评审能力上云
|
|
1
|
+
> 参考 [.skills/devops](.skills/devops) 对项目进行初始化
|
|
2
|
+
|
|
3
|
+
> .github/\* 是相关技能的自定义的部分,建议自行放在项目文件夹内,review脚本会自动部署在~/.claude/skills(.claude适配的CLI比较多)内
|
|
4
|
+
|
|
5
|
+
# CHANGELOG
|
|
6
|
+
|
|
7
|
+
### 2026-3-18
|
|
8
|
+
|
|
9
|
+
🚩 cli
|
|
10
|
+
|
|
11
|
+
- 功能更新
|
|
12
|
+
- 报告添加回流功能
|
|
13
|
+
|
|
14
|
+
🚩 skills
|
|
15
|
+
|
|
16
|
+
- 多agent审查
|
|
17
|
+
- 启动LSP等辅助工具
|
|
18
|
+
|
|
19
|
+
### 2026-1-31
|
|
20
|
+
|
|
21
|
+
code-review skill 补充LSP相关语句
|
|
22
|
+
|
|
23
|
+
### 2026-1-16
|
|
24
|
+
|
|
25
|
+
补充安全相关检查
|
|
26
|
+
|
|
27
|
+
### 2026-1-7
|
|
28
|
+
|
|
29
|
+
代码评审 skills 更新
|
|
30
|
+
|
|
31
|
+
使用内置 skills
|
|
32
|
+
|
|
33
|
+
### 2025-12-31
|
|
34
|
+
|
|
35
|
+
基础评审能力上云
|
package/bin/d5cli
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { argv, env } from "node:process";
|
|
2
|
+
import { argv, env, platform } from "node:process";
|
|
3
3
|
import { execSync, spawn } from "node:child_process";
|
|
4
4
|
import { copyFileSync, existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { dirname, join } from "node:path";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
|
+
import { createHash } from "node:crypto";
|
|
7
8
|
|
|
8
9
|
//#region package.json
|
|
9
10
|
var name$1 = "@d5render/cli";
|
|
@@ -128,7 +129,7 @@ const common_review_prompt = `Load code-review skills, then call the mcp tool '$
|
|
|
128
129
|
Then use chinese(中文) to call the mcp tool '${name}-${report}', only main agent can call the tool '${name}-${report}', **prevent** subagent from calling tool '${name}-${report}`;
|
|
129
130
|
async function changelog() {
|
|
130
131
|
const changelog = readFileSync(join(RUNTIME_CWD, "README.md"), "utf8");
|
|
131
|
-
const cachepath = join(TEMP, "CHANGELOG_" + (env.CI_RUNNER_ID
|
|
132
|
+
const cachepath = join(TEMP, "CHANGELOG_" + createHash("md5").update(env.DINGTALK_WEBHOOK || env.CI_RUNNER_ID || env.CI_PROJECT_ID || "").digest("hex"));
|
|
132
133
|
if (changelog === (existsSync(cachepath) ? readFileSync(cachepath, "utf8") : "")) return;
|
|
133
134
|
if (!existsSync(TEMP)) mkdirSync(TEMP, { recursive: true });
|
|
134
135
|
writeFileSync(cachepath, changelog, "utf8");
|
|
@@ -324,7 +325,7 @@ async function cli() {
|
|
|
324
325
|
"pipe",
|
|
325
326
|
"pipe"
|
|
326
327
|
],
|
|
327
|
-
shell: true
|
|
328
|
+
...platform === "win32" ? { shell: true } : { env: { ...env } }
|
|
328
329
|
});
|
|
329
330
|
child.stdout.on("data", (chunk) => console.log(String(chunk)));
|
|
330
331
|
child.stderr.on("data", (chunk) => console.error(String(chunk)));
|