diff --git a/.agents/plugins/marketplace.json b/.agents/plugins/marketplace.json index 6e924a1..c635075 100644 --- a/.agents/plugins/marketplace.json +++ b/.agents/plugins/marketplace.json @@ -9,20 +9,20 @@ "source": { "source": "url", "url": "https://github.com/partme-ai/partme-codeguard-plugin.git", - "ref": "v0.10.1" + "ref": "v0.11.0" }, "policy": { "installation": "AVAILABLE", "authentication": "ON_USE" }, "category": "Developer Tools", - "version": "0.10.1", + "version": "0.11.0", "description": "Cross-language code lint enforcement for AI coding assistants (ZCode, Claude Code, Codex CLI, Kimi Code): Java, Rust, TypeScript, Python. PostToolUse hook auto-runs the native linter on every AI-written file and blocks on failure in strict mode.", - "icon": "https://cdn.jsdelivr.net/gh/full-stack-plugins/codeguard-plugin@v0.10.1/assets/official-logo.png", + "icon": "https://cdn.jsdelivr.net/gh/full-stack-plugins/codeguard-plugin@v0.11.0/assets/official-logo.png", "interface": { "displayName": "代码规范守卫", "shortDescription": "Make AI-written code pass lint on first try", - "logo": "https://cdn.jsdelivr.net/gh/full-stack-plugins/codeguard-plugin@v0.10.1/assets/official-logo.png" + "logo": "https://cdn.jsdelivr.net/gh/full-stack-plugins/codeguard-plugin@v0.11.0/assets/official-logo.png" } } ] diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 5709689..98c28d8 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "codeguard", - "version": "0.10.1+codex.20260922", + "version": "0.11.0+codex.20260922", "description": "Cross-language code lint enforcement for AI coding assistants (ZCode, Claude Code, Codex CLI, Kimi Code): Java, Rust, TypeScript, Python. PostToolUse hook auto-runs the native linter on every AI-written file and blocks on failure in strict mode.", "author": { "name": "Full Stack Skills / PartMe.AI", diff --git a/.zcode-plugin/plugin.json b/.zcode-plugin/plugin.json index 097931f..692d8ec 100644 --- a/.zcode-plugin/plugin.json +++ b/.zcode-plugin/plugin.json @@ -5,7 +5,7 @@ "en": "CodeGuard", "zh-CN": "代码规范检查" }, - "version": "0.10.1", + "version": "0.11.0", "description": "Cross-language code lint enforcement for AI coding assistants (ZCode, Claude Code, Codex CLI, Kimi Code): Java, Rust, TypeScript, Python. PostToolUse hook auto-runs the native linter on every AI-written file and blocks on failure in strict mode.", "description_i18n": { "en": "Cross-language code lint enforcement. PostToolUse hook auto-runs the language-specific linter on every AI-written file; failed lint blocks further writes when strict_mode is on. Ships ready-to-go .pre-commit-config.yaml templates for Java/Rust/TypeScript/Python.", diff --git a/hooks/gate_lib.py b/hooks/gate_lib.py index 0a2b2f9..6c9cf5f 100644 --- a/hooks/gate_lib.py +++ b/hooks/gate_lib.py @@ -193,7 +193,6 @@ def _gate_cache_key( 不同文件集——只按工作树指纹,先跑的窄面结果会把宽面查询喂给同一缓存条目 (staged 干净 + 未暂存有病 → 窄面 pass 被宽面复用 = 绕过)。 """ - import hashlib head = _git(project_root, "rev-parse", "HEAD") if head is None: return None diff --git a/hooks/pre_tool_git_guard.py b/hooks/pre_tool_git_guard.py index 7821db5..88a4604 100755 --- a/hooks/pre_tool_git_guard.py +++ b/hooks/pre_tool_git_guard.py @@ -382,7 +382,7 @@ def staging_intent(command: str) -> tuple[tuple[str, ...], list[str]]: except ValueError: continue extra.append(str(rel)) - ordered = tuple(l for l in all_lanes if l in lanes) + ordered = tuple(lane for lane in all_lanes if lane in lanes) return ordered, extra diff --git a/kimi.plugin.json b/kimi.plugin.json index 1a5291b..65d8b41 100644 --- a/kimi.plugin.json +++ b/kimi.plugin.json @@ -1,6 +1,6 @@ { "name": "codeguard", - "version": "0.10.1", + "version": "0.11.0", "description": "Cross-language code lint enforcement for AI coding assistants (ZCode, Claude Code, Codex CLI, Kimi Code): Java, Rust, TypeScript, Python. PostToolUse hook auto-runs the native linter on every AI-written file and blocks on failure in strict mode.", "author": { "name": "Full Stack Skills / PartMe.AI" diff --git a/tests/test_session_fixes_20260922.py b/tests/test_session_fixes_20260922.py index 6ed8185..45d90a5 100644 --- a/tests/test_session_fixes_20260922.py +++ b/tests/test_session_fixes_20260922.py @@ -341,7 +341,7 @@ def test_bare_linter_still_appends_by_default(self) -> None: def test_registry_marks_project_level_commands(self) -> None: reg = json.loads((PLUGIN / "scripts" / "languages.json").read_text(encoding="utf-8")) - by_id = {l["id"]: l for l in reg["languages"]} + by_id = {lang["id"]: lang for lang in reg["languages"]} for lid in ("java", "kotlin", "rust", "go", "csharp", "vbnet", "terraform", "protobuf", "elm"): with self.subTest(lang=lid):