Skip to content

Commit f09c074

Browse files
loong10khiwepy@gmail.com
andauthored
fix: 统一 CodeGuard 英文显示名称并补齐标准 MCP 配置 (#91)
* fix: 统一 CodeGuard 英文显示名称并补齐标准 MCP 配置 * docs: 将标准 MCP 说明纳入现有双语章节 --------- Co-authored-by: hiwepy@gmail.com <wandl123!@#>
1 parent b503fa7 commit f09c074

12 files changed

Lines changed: 74 additions & 17 deletions

File tree

‎.agents/plugins/marketplace.json‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
{
22
"name": "partme-ai-codeguard",
33
"interface": {
4-
"displayName": "代码规范守卫"
4+
"displayName": "CodeGuard"
55
},
66
"plugins": [
77
{
88
"name": "codeguard",
99
"source": {
1010
"source": "url",
1111
"url": "https://github.com/full-stack-plugins/codeguard-plugin.git",
12-
"ref": "v0.18.2"
12+
"ref": "v0.18.3"
1313
},
1414
"policy": {
1515
"installation": "AVAILABLE",
1616
"authentication": "ON_USE"
1717
},
1818
"category": "Developer Tools",
19-
"version": "0.18.2",
19+
"version": "0.18.3",
2020
"description": "Evidence-backed code checks and Git content gates for AI assistants, with Maven/Gradle module impact analysis. Save hooks provide feedback; unverified checks are explicit.",
21-
"icon": "https://cdn.jsdelivr.net/gh/full-stack-plugins/codeguard-plugin@v0.18.2/assets/official-logo.png",
21+
"icon": "https://cdn.jsdelivr.net/gh/full-stack-plugins/codeguard-plugin@v0.18.3/assets/official-logo.png",
2222
"interface": {
23-
"displayName": "代码规范守卫",
23+
"displayName": "CodeGuard",
2424
"shortDescription": "Trustworthy code checks and Java impact analysis",
25-
"logo": "https://cdn.jsdelivr.net/gh/full-stack-plugins/codeguard-plugin@v0.18.2/assets/official-logo.png"
25+
"logo": "https://cdn.jsdelivr.net/gh/full-stack-plugins/codeguard-plugin@v0.18.3/assets/official-logo.png"
2626
}
2727
}
2828
]

‎.claude-plugin/marketplace.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{
88
"name": "codeguard",
99
"description": "Evidence-backed code checks and Git content gates for AI assistants, with Maven/Gradle module impact analysis. Save hooks provide feedback; unverified checks are explicit.",
10-
"version": "0.18.2",
10+
"version": "0.18.3",
1111
"source": "./"
1212
}
1313
]

‎.codex-plugin/plugin.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codeguard",
3-
"version": "0.18.2+codex.20260929",
3+
"version": "0.18.3+codex.20261003",
44
"description": "Evidence-backed code checks and Git content gates for AI assistants, with Maven/Gradle module impact analysis. Save hooks provide feedback; unverified checks are explicit.",
55
"author": {
66
"name": "Full Stack Skills / PartMe.AI",
@@ -23,7 +23,7 @@
2323
],
2424
"skills": "./skills/",
2525
"interface": {
26-
"displayName": "代码规范守卫",
26+
"displayName": "CodeGuard",
2727
"shortDescription": "Trustworthy code checks and Java impact analysis",
2828
"longDescription": "Evidence-backed code checks and Git content gates for AI assistants, with Maven/Gradle module impact analysis. Save hooks provide feedback; unverified checks are explicit. Java planning is read-only; executing project checks runs trusted build/test commands, not a security sandbox.",
2929
"developerName": "Full Stack Skills / PartMe.AI",

‎.zcode-plugin/plugin.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "codeguard",
3-
"displayName": "代码规范守卫",
3+
"displayName": "CodeGuard",
44
"displayName_i18n": {
5-
"en": "代码规范守卫",
5+
"en": "CodeGuard",
66
"zh-CN": "代码规范检查"
77
},
8-
"version": "0.18.2",
8+
"version": "0.18.3",
99
"description": "Evidence-backed code checks and Git content gates for AI assistants, with Maven/Gradle module impact analysis. Save hooks provide feedback; unverified checks are explicit.",
1010
"description_i18n": {
1111
"en": "Evidence-backed code checks and Git content gates for AI assistants, with Maven/Gradle module impact analysis. Save hooks provide feedback; unverified checks are explicit.",

‎CHANGELOG.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 0.18.3 — 2026-10-03
4+
5+
- 各宿主和市场清单的显示名称统一为 `CodeGuard`,保留中文本地化翻译。
6+
7+
- 补齐标准根目录 `mcp.json`,让可移植客户端发现已有 CodeGuard stdio MCP 服务。
8+
- 增加配置发现回归测试,明确依赖安装与工具调用的目标项目路径要求。
9+
10+
311
按版本段落提炼的主题摘要(生成于 2026-09-23,来源:git 历史 212 个提交与各 release 提交)。逐提交细节以 `git log` 与 GitHub Releases 为准;本文件按主题归纳,不逐条罗列。
412

513
## v0.16.1 — 测试可移植性收口与汇流

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ CVE exits: 0 pass, 1 unverified, 2 findings, 3 invalid ecosystem. Maven/npm/pip-
115115

116116
### MCP server
117117

118+
The root `mcp.json` provides portable Agent Plugins 1.0.0 discovery of the existing CodeGuard stdio server. The host needs Python and the dependencies in `requirements.txt`; installation does not install them automatically. The configured working directory is the plugin root. For `check_code_style`, `auto_fix`, and `analyze_java_impact`, supply the target project’s absolute `path` in each tool call; the plugin directory is not the user project. `list_languages` needs no project path.
119+
118120
```bash
119121
# Requires the dependencies declared in requirements.txt.
120122
python3 scripts/run_check.py --mcp /path/to/project

‎README.zh-CN.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ CVE 退出码:0 通过、1 未验证、2 发现漏洞、3 非法生态。Maven
115115

116116
### MCP 服务
117117

118+
根目录 `mcp.json` 按 Agent Plugins 1.0.0 声明已有 CodeGuard stdio 服务。宿主需要 Python 及 `requirements.txt` 中的依赖,插件不会自动安装。配置工作目录是插件根目录;调用 `check_code_style`、`auto_fix`、`analyze_java_impact` 时必须显式传入目标项目的绝对 `path`,不得把插件目录当作用户项目。`list_languages` 不需要项目路径。
119+
118120
```bash
119121
# 需要 requirements.txt 已声明的依赖。
120122
python3 scripts/run_check.py --mcp /path/to/project

‎kimi.plugin.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codeguard",
3-
"version": "0.18.2",
3+
"version": "0.18.3",
44
"description": "Evidence-backed code checks and Git content gates for AI assistants, with Maven/Gradle module impact analysis. Save hooks provide feedback; unverified checks are explicit.",
55
"author": {
66
"name": "Full Stack Skills / PartMe.AI"
@@ -20,7 +20,7 @@
2020
"pre-commit"
2121
],
2222
"interface": {
23-
"displayName": "代码规范守卫",
23+
"displayName": "CodeGuard",
2424
"shortDescription": "Trustworthy code checks and Java impact analysis",
2525
"longDescription": "Evidence-backed code checks and Git content gates for AI assistants, with Maven/Gradle module impact analysis. Save hooks provide feedback; unverified checks are explicit. Java planning is read-only; executing project checks runs trusted build/test commands, not a security sandbox.",
2626
"developerName": "Full Stack Skills / PartMe.AI",

‎mcp.json‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json",
3+
"mcpServers": {
4+
"codeguard": {
5+
"type": "stdio",
6+
"command": "python",
7+
"args": [
8+
"-X",
9+
"utf8",
10+
"./scripts/run_check.py",
11+
"--mcp"
12+
],
13+
"cwd": "./"
14+
}
15+
}
16+
}

‎openspec/specs/mcp-tool-server/spec.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,13 @@ auto_fix MUST 默认仅处理 Git 改动文件并按相同范围复检;无法
5252

5353
- **WHEN** the client calls `list_languages`
5454
- **THEN** the response enumerates every entry in `scripts/languages.json` with exactly two fields (`id`, `name`) per record
55+
56+
### Requirement: Portable MCP discovery SHALL use root mcp.json
57+
58+
提供已有 MCP 服务的发布包 MUST 在根目录包含标准 `mcp.json`,声明 Agent Plugins 1.0.0 MCP Schema、`stdio` 传输、单独的 Python 可执行命令与参数,指向包内 `scripts/run_check.py --mcp`。不得在可移植 `plugin.json` 中内嵌 `mcpServers`。
59+
60+
#### Scenario: A portable client discovers CodeGuard
61+
- **WHEN** 客户端读取根目录 `mcp.json`
62+
- **THEN** 可发现 `codeguard` stdio 服务,配置中的脚本存在于插件包内,Schema 版本与 `plugin.json` 一致
63+
- **AND** 项目工具调用由客户端显式传入目标项目的绝对 `path`;配置工作目录为插件根,不代表用户项目
64+
- **AND** MCP SDK 依赖仍通过 `requirements.txt` 声明,不自动安装

0 commit comments

Comments
 (0)