Skip to content

v0.8.0 - Windsurf adapter

Choose a tag to compare

@AGGIB AGGIB released this 06 Sep 20:54
· 43 commits to main since this release

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, a windsurf hooks line in stroq 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 policy ask is rendered as a block that names the rule (Windsurf hooks cannot prompt; the audit keeps the real ask); 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 from mcp_result; MCP calls are classified as mcp__<server>__<tool> with the arguments in front of the secret egress guard. The policy cwd is the workspace root, never a payload's cwd. Internal errors on pre_run_command, pre_write_code and pre_mcp_tool_use fail closed (exit 2).
  • Installer: merges Stroq's entries into .windsurf/hooks.json (or ~/.codeium/windsurf/hooks.json with --user), preserving your own hooks; idempotent; --dry-run; show_output: true so 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_line is 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 windsurf

stroq-cli-0.8.0.tgz sha256: e26b4159a5e4d58fb2a4b26bd220e253e5ea65f912a6be72e81059657f1875a2

stroq attack: 12 scenarios, 8 blocked, 4 asked, 0 passed through.