Add selectable CASAN IDE integrations

This commit is contained in:
thanhnv
2026-07-23 23:04:54 +07:00
parent ff4e9d5a53
commit ce708fafe5
28 changed files with 1658 additions and 407 deletions
@@ -2,7 +2,7 @@
> Ngày lập: 2026-07-22
> Cập nhật: 2026-07-23
> Trạng thái: **IMPLEMENTED (Wave 0 + Wave 1 core) — bridge, adapters, tests, devkit, docs đã ship và xanh; Codex/VS Code black-box trên client thật còn CONDITIONAL**
> Trạng thái: **IMPLEMENTED + Plan-21 hardening — Claude black-box verified; Codex current hook schema + trust onboarding implemented; VS Code `@casan` packaged, host black-box còn CONDITIONAL**
> Thứ tự bắt buộc: **Claude Code → Codex → Claude/Codex trên VS Code**
Kết quả khảo sát và test matrix: [CASAN Spike-20](../spikes/CASAN_SPIKE_20_AGENTIC_CLIENT_HOOKS.md).
@@ -310,14 +310,16 @@ nguồn), **certification strength** (bốn mức, không gộp).
| Bridge state machine (20.0.2/0.3/0.4) | `packages/casan-harness/scripts/python/agentic_bridge.py` (stdlib-only, Py3.9+) | ✅ |
| Claude Code adapter (20.1.1–20.1.3) | `packages/casan-harness/adapters/claude-code/` (`claude_hook.py`, `settings.template.json`) | ✅ |
| Codex adapter (20.3.1/0.2) | `packages/casan-harness/adapters/codex/` (`codex_hook.py`, `hooks.template.json`, `config.template.toml`) | ✅ mapping defensive, chờ pin trên client thật |
| Threat + acceptance suite (20.0.5/1.6) | `packages/casan-harness/tests/phase-agentic-bridge-tests.sh` | ✅ **30/30 PASS** (C1–C12 + threat) |
| Threat + acceptance suite (20.0.5/1.6) | `packages/casan-harness/tests/phase-agentic-bridge-tests.sh` | ✅ **37/37 PASS** (C1–C12 + threat + adapters) |
| DevKit templates + Windows installer (Wave 5) | `packages/casan-devkit/templates/{claude,codex}/`, `packages/casan-devkit/windows/install-agentic.ps1` | ✅ (install/doctor/uninstall + manifest) |
| Global project bootstrap | `.casan/casan-hook.py` from `packages/casan-devkit/templates/project/` | ✅ auto-load config + live pin verify |
| VS Code/Copilot explicit route | `packages/casan-harness/adapters/vscode/extension/`, `adapters/vscode/` | ✅ packaged dependency-free VSIX; `@casan` only |
| Docs Windows + Security/bypass | `docs/casan/CASAN_AGENTIC_CLIENTS_WINDOWS.md`, `docs/casan/CASAN_AGENTIC_CLIENT_SECURITY.md` | ✅ |
| H6 provenance + report filter (20.0.4) | superset record trong bridge + `agentic_bridge.py report --client/--integration-mode/--trace-id/--project-id` | ✅ null-not-zero, filter được |
### Ánh xạ exit gate (mục 8)
- ✅ 100% test lifecycle fixtures pass (30/30).
- ✅ 100% test lifecycle fixtures pass (37/37).
- ✅ 100% side-effect test bị deny khi thiếu admission (C4, cross-project, expired, traversal).
- ✅ Không có double model execution (invariant test trên nguồn bridge).
- ✅ Timeout/hook failure tạo non-certified + H6 failure (C6, abort).
@@ -327,9 +329,12 @@ nguồn), **certification strength** (bốn mức, không gộp).
### Còn CONDITIONAL (đúng theo phạm vi Spike-20, chưa đóng)
- **Codex payload keys**: adapter đọc nhiều alias phòng thủ; cần pin trên Codex thật (Wave 3.1).
- **VS Code / extension**: chưa black-box trên client thật; `@casan` Chat Participant (Wave 4)
chưa hiện thực — vẫn giữ badge `unsupported` cho tới khi có evidence độc lập.
- **Codex host trust**: schema đã pin theo current Codex manual; project hook
chỉ load sau project + exact-hook-hash trust qua `/hooks`, nên clean untrusted
black-box phải giữ `pending_trust`, không giả `verified`.
- **VS Code / extension host**: `@casan` Chat Participant đã hiện thực và đóng
gói VSIX; môi trường phát triển hiện không có `code` CLI để black-box extension
host. Built-in Copilot vẫn `unsupported_global_interception`.
- **Windows exit-gate smoke**: cần chạy `install-agentic.ps1` trên clean Windows clone.
### Quyết định thiết kế cần lưu