.windsurf/hooks.json) and Cline / Roo Code (.clinerules/hooks/PreToolUse, .cline/hooks/PreToolUse.sh, and .clinerules/hooks.json).dmint init)# Install hooks and dedicated policies for both Windsurf and Cline / Roo Code: dmint init --harness windsurf,cline
.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..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.dmint hook status
.windsurf/hooks.json)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..clinerules/hooks/PreToolUse & .cline/hooks/PreToolUse.sh){"preToolUse": {"toolName": "...", "parameters": {...}}} with JSON-stringified parameter values) or the CLI payload ({"tool_call": {"name": "...", "input": {...}}}).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.attempt_completion, ask_followup_question) are explicitly allowed in cline.policy.json so Cline can ask questions and finish tasks cleanly.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
CONSUMED, and allows the action to proceed once.