Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Windsurf Cascade & Cline / Roo Code Integration

Dmint provides first-class pre-execution hooks and dedicated built-in tool policies for Windsurf Cascade (.windsurf/hooks.json) and Cline / Roo Code (.clinerules/hooks/PreToolUse, .cline/hooks/PreToolUse.sh, and .clinerules/hooks.json).

1. Install Pre-Tool Hooks (dmint init)

From your workspace root, run:
# Install hooks and dedicated policies for both Windsurf and Cline / Roo Code: dmint init --harness windsurf,cline
This creates:
  • Windsurf Cascade:
    • .dmint/policies/windsurf.policy.json — Dedicated policy for Windsurf Cascade's pre-hooks (pre_run_command, pre_read_code, pre_write_code, pre_mcp_tool_use, pre_user_prompt) and native tools.
    • .windsurf/hooks.json — Official Windsurf Cascade hook configuration registering pre_run_command, pre_read_code, pre_write_code, and pre_mcp_tool_use with show_output: true and blocking disallowed actions via exit code 2.
  • Cline (VS Code Extension & CLI) / Roo Code:
    • .dmint/policies/cline.policy.json — Dedicated policy covering all Cline built-in tools (run_commands, execute_command, read_files, read_file, editor, write_to_file, replace_in_file, apply_patch, search_files, list_files, list_code_definition_names, ask_followup_question, attempt_completion, new_task, switch_mode, browser_action, use_mcp_tool).
    • .clinerules/hooks/PreToolUse — Executable hook script (no extension, chmod +x) required by the Cline VS Code extension.
    • .cline/hooks/PreToolUse.sh — Executable hook script required by the Cline CLI.
    • .clinerules/hooks.json — Declarative hook configuration for Roo Code compatibility.
  • .dmint/ — Local Ed25519 signing key (0600), HMAC integrity key (0600), and approvals.sqlite3 database.
Verify installed hooks and their dedicated policy paths at any time:
dmint hook status

2. Official Payload & Output Schemas Handled by Dmint

Windsurf Cascade (.windsurf/hooks.json)

Windsurf Cascade sends agent_action_name (pre_run_command, pre_read_code, pre_write_code, pre_mcp_tool_use) and tool_info (command_line, file_path, mcp_server_name, mcp_tool_name, mcp_tool_arguments) over stdin. Dmint normalizes tool_info automatically and exits with code 2 (writing the reason to stderr) whenever a call is DENY or APPROVAL_REQUIRED.

Cline VS Code Extension & CLI (.clinerules/hooks/PreToolUse & .cline/hooks/PreToolUse.sh)

Cline sends either the VS Code extension payload ({"preToolUse": {"toolName": "...", "parameters": {...}}} with JSON-stringified parameter values) or the CLI payload ({"tool_call": {"name": "...", "input": {...}}}).
  • Dmint automatically parses stringified JSON parameters, inspects every file in batch read_files / apply_patch calls and every command in batch run_commands ({"commands": [...]}) calls, and returns {"cancel": false} on ALLOW or {"cancel": true, "errorMessage": "..."} when blocked.
  • Turn-completion and question tools (attempt_completion, ask_followup_question) are explicitly allowed in cline.policy.json so Cline can ask questions and finish tasks cleanly.

3. Approving Paused Requests

When Windsurf or Cline pauses on an APPROVAL_REQUIRED action:
# Review pending requests in terminal: dmint pending # Approve once: dmint approve apr_... --by dev@company.com # Or review in the web dashboard: dmint dashboard
When the agent retries the exact same tool call, Dmint verifies the Ed25519 assertion, marks it CONSUMED, and allows the action to proceed once.