Skip to content

Commit f40d370

Browse files
committed
feat: route pinned Rust prompt candidate in CodeGuard 0.18.0
1 parent de0936a commit f40d370

24 files changed

Lines changed: 189 additions & 26 deletions

File tree

‎.agents/plugins/marketplace.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@
99
"source": {
1010
"source": "url",
1111
"url": "https://github.com/full-stack-plugins/codeguard-plugin.git",
12-
"ref": "v0.17.0"
12+
"ref": "v0.18.0"
1313
},
1414
"policy": {
1515
"installation": "AVAILABLE",
1616
"authentication": "ON_USE"
1717
},
1818
"category": "Developer Tools",
19-
"version": "0.17.0",
19+
"version": "0.18.0",
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.17.0/assets/official-logo.png",
21+
"icon": "https://cdn.jsdelivr.net/gh/full-stack-plugins/codeguard-plugin@v0.18.0/assets/official-logo.png",
2222
"interface": {
2323
"displayName": "代码规范守卫",
2424
"shortDescription": "Trustworthy code checks and Java impact analysis",
25-
"logo": "https://cdn.jsdelivr.net/gh/full-stack-plugins/codeguard-plugin@v0.17.0/assets/official-logo.png"
25+
"logo": "https://cdn.jsdelivr.net/gh/full-stack-plugins/codeguard-plugin@v0.18.0/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.17.0",
10+
"version": "0.18.0",
1111
"source": "./"
1212
}
1313
]

‎.codex-plugin/plugin.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codeguard",
3-
"version": "0.17.0+codex.20260929",
3+
"version": "0.18.0+codex.20260929",
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",

‎.zcode-plugin/plugin.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"en": "代码规范守卫",
66
"zh-CN": "代码规范检查"
77
},
8-
"version": "0.17.0",
8+
"version": "0.18.0",
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.",

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ CodeGuard provides native check evidence and guards supported Git commit/push ca
1212

1313
### Rust runtime candidate (macOS arm64)
1414

15-
The plugin now contains a **candidate**, explicit Rust runtime binding. It pins `@partme.ai/codeguard@0.1.1`, its registry tarball and native binary hashes, candidate source commit, platform, and check protocol major in [`runtime/codeguard.lock.json`](runtime/codeguard.lock.json). Install only on Apple Silicon macOS:
15+
The plugin now contains a **candidate**, explicit Rust runtime binding. It pins `@partme.ai/codeguard@0.1.2`, its registry tarball and native binary hashes, candidate source commit, platform, and check protocol major in [`runtime/codeguard.lock.json`](runtime/codeguard.lock.json). Install only on Apple Silicon macOS:
1616

1717
```bash
1818
node runtime/codeguard_runtime.cjs install --download
1919
node runtime/codeguard_runtime.cjs verify
2020
```
2121

22-
For offline installation, use `install --tarball /absolute/path/to/partme.ai-codeguard-0.1.1.tgz`; the same lock hashes are enforced. Installation stages and verifies the package before switching the active receipt. [`hooks/rust_runtime_dispatch.cjs`](hooks/rust_runtime_dispatch.cjs) is a candidate Claude Code adapter for SessionStart, PostToolUse, PostToolUseFailure, and Stop. It rechecks the active binary before each call, never selects a random `codeguard` on `PATH`, and reports an incomplete runtime instead of falling back to Python. The current [`hooks/hooks.json`](hooks/hooks.json) still uses the legacy Python hooks; the Rust candidate has not been made the default, connected to a strict Git gate, or accepted on Codex/ZCode/Kimi. See the [candidate acceptance record](tests/rust-runtime-candidate.md) and [hook protocol](hooks/__protocol__.md).
22+
For offline installation, use `install --tarball /absolute/path/to/partme.ai-codeguard-0.1.2.tgz`; the same lock hashes are enforced. Installation stages and verifies the package before switching the active receipt. [`hooks/rust_runtime_dispatch.cjs`](hooks/rust_runtime_dispatch.cjs) is a candidate Claude Code adapter for SessionStart, UserPromptSubmit, PostToolUse, PostToolUseFailure, and Stop. It rechecks the active binary before each call, never selects a random `codeguard` on `PATH`, and reports an incomplete runtime instead of falling back to Python. UserPromptSubmit returns fixed, non-blocking timing guidance; it does not run lint or treat prompt words as a Git gate. The current [`hooks/hooks.json`](hooks/hooks.json) still uses the legacy Python hooks; the Rust candidate has not been made the default, connected to a strict Git gate, or accepted on Codex/ZCode/Kimi. See the [candidate acceptance record](tests/rust-runtime-candidate.md) and [hook protocol](hooks/__protocol__.md).
2323

2424
The installed plugin version is recorded in its manifests. The architecture refactor keeps the existing 68 managed skills and focuses on reliable evidence, clear module ownership and Java project awareness.
2525

‎README.zh-CN.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ CodeGuard 为 AI 编程助手提供原生检查证据,守护已支持的 Git
1212

1313
### Rust 运行时候选(macOS arm64)
1414

15-
插件新增**显式候选** Rust 运行时绑定。[`runtime/codeguard.lock.json`](runtime/codeguard.lock.json) 固定 `@partme.ai/codeguard@0.1.1`、注册表 tarball 和原生二进制摘要、候选源码提交、平台及检查协议主版本。仅在 Apple Silicon macOS 上安装:
15+
插件新增**显式候选** Rust 运行时绑定。[`runtime/codeguard.lock.json`](runtime/codeguard.lock.json) 固定 `@partme.ai/codeguard@0.1.2`、注册表 tarball 和原生二进制摘要、候选源码提交、平台及检查协议主版本。仅在 Apple Silicon macOS 上安装:
1616

1717
```bash
1818
node runtime/codeguard_runtime.cjs install --download
1919
node runtime/codeguard_runtime.cjs verify
2020
```
2121

22-
离线安装可执行 `install --tarball /absolute/path/to/partme.ai-codeguard-0.1.1.tgz`,仍须满足同一锁定摘要。安装器先在暂存目录核验包,再切换活动收据。[`hooks/rust_runtime_dispatch.cjs`](hooks/rust_runtime_dispatch.cjs) 是 Claude Code 的 SessionStart、PostToolUse、PostToolUseFailure、Stop 候选适配器;每次调用前复核活动二进制,不从 PATH 随机选择 `codeguard`,缺运行时时报告未完成而不回退 Python。当前 [`hooks/hooks.json`](hooks/hooks.json) 仍使用旧 Python 钩子;Rust 候选尚未成为默认入口,未接严格 Git 门禁,也未在 Codex/ZCode/Kimi 完成宿主验收。见[候选验收记录](tests/rust-runtime-candidate.md)和[钩子协议](hooks/__protocol__.md)。
22+
离线安装可执行 `install --tarball /absolute/path/to/partme.ai-codeguard-0.1.2.tgz`,仍须满足同一锁定摘要。安装器先在暂存目录核验包,再切换活动收据。[`hooks/rust_runtime_dispatch.cjs`](hooks/rust_runtime_dispatch.cjs) 是 Claude Code 的 SessionStart、UserPromptSubmit、PostToolUse、PostToolUseFailure、Stop 候选适配器;每次调用前复核活动二进制,不从 PATH 随机选择 `codeguard`,缺运行时时报告未完成而不回退 Python。UserPromptSubmit 仅返回固定、非阻断的检查时机建议,不运行 lint,也不把提示词当作 Git 门禁。当前 [`hooks/hooks.json`](hooks/hooks.json) 仍使用旧 Python 钩子;Rust 候选尚未成为默认入口,未接严格 Git 门禁,也未在 Codex/ZCode/Kimi 完成宿主验收。见[候选验收记录](tests/rust-runtime-candidate.md)和[钩子协议](hooks/__protocol__.md)。
2323

2424
已安装插件的版本以各清单为准。本次架构重构保留现有 68 个受管技能,重点收敛判定证据、模块职责与 Java 项目感知。
2525

‎com.github.copilot/hooks/__protocol__.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# hooks/ 与宿主 CLI 之间的契约(canonical cheat-sheet)
22

3-
> Rust 候选入口:`runtime/codeguard_runtime.cjs` 固定 npm 0.1.1 制品和本机二进制身份;`hooks/rust_runtime_dispatch.cjs` 显式处理 Claude Code 的 SessionStart/PostToolUse/PostToolUseFailure/Stop。候选入口在运行时缺失、摘要或版本失配时返回对话中的“未完成”,不执行 PATH 上的 `codeguard`,也不回退到 Python。它尚未写入 `hooks/hooks.json`,以下旧协议表仍描述默认 Python 运行时。Rust 严格交付门禁与其它宿主接线尚未完成,不能把候选保存反馈当作通过。
3+
> Rust 候选入口:`runtime/codeguard_runtime.cjs` 固定 npm 0.1.2 制品和本机二进制身份;`hooks/rust_runtime_dispatch.cjs` 显式处理 Claude Code 的 SessionStart/UserPromptSubmit/PostToolUse/PostToolUseFailure/Stop。UserPromptSubmit 只输出固定的非阻断检查时机建议,源码检查未运行、交付未评估;提示词不能触发 lint 或替代真实 Git 门禁。候选入口在运行时缺失、摘要或版本失配时返回对话中的“未完成”,不执行 PATH 上的 `codeguard`,也不回退到 Python。它尚未写入 `hooks/hooks.json`,以下旧协议表仍描述默认 Python 运行时。Rust 严格交付门禁与其它宿主接线尚未完成,不能把候选保存反馈当作通过。
44
55
> 这份文档是 codeguard-plugin 与 Codex CLI / ZCode / Kimi Code 三端宿主
66
> 交互契约的**单源事实**。所有 hook 脚本(`hooks/*.py`)的实现都必须与本文件

‎com.github.copilot/hooks/rust_runtime_dispatch.cjs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const { activeBinary } = require(path.join(pluginRoot, 'runtime', 'codeguard_run
1111

1212
const EVENTS = new Map([
1313
['session-start', 'SessionStart'],
14+
['user-prompt-submit', 'UserPromptSubmit'],
1415
['post-tool-use', 'PostToolUse'],
1516
['post-tool-use-failure', 'PostToolUseFailure'],
1617
['stop', 'Stop'],

‎dev.openhands/hooks/__protocol__.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# hooks/ 与宿主 CLI 之间的契约(canonical cheat-sheet)
22

3-
> Rust 候选入口:`runtime/codeguard_runtime.cjs` 固定 npm 0.1.1 制品和本机二进制身份;`hooks/rust_runtime_dispatch.cjs` 显式处理 Claude Code 的 SessionStart/PostToolUse/PostToolUseFailure/Stop。候选入口在运行时缺失、摘要或版本失配时返回对话中的“未完成”,不执行 PATH 上的 `codeguard`,也不回退到 Python。它尚未写入 `hooks/hooks.json`,以下旧协议表仍描述默认 Python 运行时。Rust 严格交付门禁与其它宿主接线尚未完成,不能把候选保存反馈当作通过。
3+
> Rust 候选入口:`runtime/codeguard_runtime.cjs` 固定 npm 0.1.2 制品和本机二进制身份;`hooks/rust_runtime_dispatch.cjs` 显式处理 Claude Code 的 SessionStart/UserPromptSubmit/PostToolUse/PostToolUseFailure/Stop。UserPromptSubmit 只输出固定的非阻断检查时机建议,源码检查未运行、交付未评估;提示词不能触发 lint 或替代真实 Git 门禁。候选入口在运行时缺失、摘要或版本失配时返回对话中的“未完成”,不执行 PATH 上的 `codeguard`,也不回退到 Python。它尚未写入 `hooks/hooks.json`,以下旧协议表仍描述默认 Python 运行时。Rust 严格交付门禁与其它宿主接线尚未完成,不能把候选保存反馈当作通过。
44
55
> 这份文档是 codeguard-plugin 与 Codex CLI / ZCode / Kimi Code 三端宿主
66
> 交互契约的**单源事实**。所有 hook 脚本(`hooks/*.py`)的实现都必须与本文件

‎dev.openhands/hooks/rust_runtime_dispatch.cjs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const { activeBinary } = require(path.join(pluginRoot, 'runtime', 'codeguard_run
1111

1212
const EVENTS = new Map([
1313
['session-start', 'SessionStart'],
14+
['user-prompt-submit', 'UserPromptSubmit'],
1415
['post-tool-use', 'PostToolUse'],
1516
['post-tool-use-failure', 'PostToolUseFailure'],
1617
['stop', 'Stop'],

0 commit comments

Comments
 (0)