Cursor
Run Cursor Agent with hard Statewright hooks and same-chat route changes
Cursor
Cursor has two integration modes. Executor mode uses Cursor Agent's native hooks for hard enforcement. Standalone IDE MCP/rules mode remains advisory.
Executor Mode
Install and authenticate cursor-agent, then run:
node plugins/executor/statewright-exec.mjs \
--host cursor --workflow bugfix --cwd "$PWD" -- \
"Fix the failing tests"The executor creates a chat, launches Cursor against it, and resumes the same chat ID after a state model route changes. Cursor tools such as Shell, ReadFile, and StrReplace are mapped to portable Statewright capabilities before the gateway evaluates policy.
The remote API key remains in the executor. Pre-tool decisions, post-tool accounting, MCP workflow calls, and stop handling use the authenticated loopback bridge.
Standalone IDE Mode
Merge plugins/cursor/mcp.json into .cursor/mcp.json and copy plugins/cursor/statewright.mdc into .cursor/rules/statewright.mdc. This exposes workflow tools and instructions, but MCP and a rule file alone cannot intercept every tool call. Use executor mode when hard enforcement or isolated delivery is required.