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
@@ -1,9 +1,9 @@
# CASAN Codex adoption template (Plan-20)
Drop `hooks.json` → `.codex/hooks.json` and merge `config.toml` into
`.codex/config.toml` in the target repo (the installer does this). It wires the
Codex lifecycle hooks to the CASAN agentic bridge via the thin renderer
`packages/casan-harness/adapters/codex/codex_hook.py`.
`casan init --client codex` merges `hooks.json` into `.codex/hooks.json`. Each
handler calls `.casan/casan-hook.py`, which resolves and verifies the pinned
global harness before dispatching the Codex adapter. No custom `[casan]` TOML
keys are required.
Important Codex-specific facts (Spike-20 §4.2):
@@ -21,6 +21,6 @@ Important Codex-specific facts (Spike-20 §4.2):
disable them and set `CASAN_AGENTIC_INTEGRATION_MODE=managed_hook` through the
managed environment (not the committed config).
The command contract is stable (stdin JSON → exit 0 allow / exit 2 block); the
exact Codex payload key names are pinned during the Wave-3 payload spike, which
is why `codex_hook.py` reads several field aliases defensively.
The command shape follows current Codex hooks: nested command handlers,
`timeout` in seconds, `continue`/`stopReason` for turn events, and exit 2 for a
denied `PreToolUse`. The adapter reads documented fields plus defensive aliases.