ring/platforms/opencode/plugin/hooks/factories
Gandalf e916168251
feat(opencode): add gate progression validator (soft block)
OpenCode integration for the gate progression validator using
tool.execute.before/after hooks with detect-and-revert strategy.

Since OpenCode SDK lacks hard block (deny) support in tool hooks,
this uses a two-phase approach:
1. tool.execute.before: saves backup of current-cycle.json
2. tool.execute.after: runs the same shell validator used by Claude
   Code. If invalid → reverts file to previous state + replaces tool
   output with block message showing which gates need completion.

Tested in live OpenCode session: agent attempted to write
current-cycle.json with gate 8 while testing gates were pending.
Hook detected, reverted, and injected error message. Agent saw
' GATE PROGRESSION BLOCKED' instead of 'Wrote file successfully'.

Also updates installer.sh to copy validate-gate-progression.sh
to ~/.config/opencode/hooks/ during ring install.

Requested-by: @jeff-music-city
2026-04-15 23:22:20 -03:00
..
context-injection.ts feat: add OpenCode platform integration (consolidate ring-for-opencode) 2026-03-07 22:46:47 -03:00
gate-validator.ts feat(opencode): add gate progression validator (soft block) 2026-04-15 23:22:20 -03:00
index.ts feat: add OpenCode platform integration (consolidate ring-for-opencode) 2026-03-07 22:46:47 -03:00
session-start.ts feat: add OpenCode platform integration (consolidate ring-for-opencode) 2026-03-07 22:46:47 -03:00