v0.8.0 - Windsurf adapter
Stroq 0.8.0 — Windsurf adapter
npx @stroq/cli init --agent windsurf puts Stroq on Windsurf's Cascade Hooks. Supported today: Claude Code, Cursor, Codex, Copilot CLI, Windsurf (native hooks) · OpenClaw (in-process plugin).
Added
- Windsurf adapter (
stroq hook windsurf,stroq init --agent windsurf, awindsurf hooksline instroq doctor). Six Cascade Hook events:pre_read_code,post_read_code,pre_write_code,pre_run_command,pre_mcp_tool_use,post_mcp_tool_use. A deny is exit 2 with the reason on stderr; a policyaskis rendered as a block that names the rule (Windsurf hooks cannot prompt; the audit keeps the realask); a suspect scan is exit 2 with the warning, which is how Cascade shows hook text to the agent. Files Cascade reads are scanned by reading them (1 MiB cap); MCP results are scanned frommcp_result; MCP calls are classified asmcp__<server>__<tool>with the arguments in front of the secret egress guard. The policy cwd is the workspace root, never a payload'scwd. Internal errors onpre_run_command,pre_write_codeandpre_mcp_tool_usefail closed (exit 2). - Installer: merges Stroq's entries into
.windsurf/hooks.json(or~/.codeium/windsurf/hooks.jsonwith--user), preserving your own hooks; idempotent;--dry-run;show_output: trueso block reasons show in the Cascade UI. - Self-tamper protection for Windsurf's hook files (workspace, both user files, the Linux and macOS system files) in both the Bash classifier and the Write/Edit path check.
- Demo
examples/demo/run-windsurf-demo.sh(7 events) in CI;command_lineis now a recognised command spelling for every adapter.
Limits
No ask. Command output is not visible to Cascade hooks, so a poisoned command output cannot taint a Windsurf session (files read and MCP results do). No hook timeout setting; keep @stroq/cli installed globally. Any exit other than 0 or 2 is an allow on Windsurf. The wire format comes from Windsurf's documentation and third-party integrations, not a recorded session. Windows powershell entries are written but untested; system-level and JetBrains files are not written by init.
Install
npm install -g @stroq/cli@0.8.0 # once npm's review clears; until then:
npm install -g https://github.com/AGGIB/Stroq/releases/download/v0.8.0/stroq-cli-0.8.0.tgz
stroq init --agent windsurfstroq-cli-0.8.0.tgz sha256: e26b4159a5e4d58fb2a4b26bd220e253e5ea65f912a6be72e81059657f1875a2
stroq attack: 12 scenarios, 8 blocked, 4 asked, 0 passed through.