### Install OpenCursor using Go TUI installer Source: https://github.com/nomadcxx/opencode-cursor/blob/main/README.md Clones the repository, builds the installer, and runs it to install OpenCursor. This method is suitable for users who prefer a Go-based installation. ```bash git clone https://github.com/Nomadcxx/opencode-cursor.git cd opencode-cursor go build -o ./installer ./cmd/installer && ./installer ``` -------------------------------- ### Manual installation of OpenCursor from source Source: https://github.com/nomadcxx/opencode-cursor/blob/main/README.md Installs OpenCursor by cloning the repository, building the project with Bun, and manually linking the plugin. This method provides more control over the installation process. ```bash git clone https://github.com/Nomadcxx/opencode-cursor.git && cd opencode-cursor bun install && bun run build ln -sf $(pwd)/dist/plugin-entry.js ~/.config/opencode/plugin/cursor-acp.js ./scripts/sync-models.sh ``` -------------------------------- ### Install Dependencies and Build Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/PUBLISHING.md Install project dependencies and build the project locally before testing or publishing. ```bash bun install bun run build ``` -------------------------------- ### Install Project Globally Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/plans/2026-03-10-mcp-tool-bridge.md Command to install the project globally using npm. ```bash npm install -g . ``` -------------------------------- ### Add Windows installation instructions to README Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-windows-support.md Includes a new section in README.md detailing the PowerShell command for installing the tool on Windows systems. ```markdown **macOS/Linux:** ```bash curl -fsSL https://raw.githubusercontent.com/Nomadcxx/opencode-cursor/main/install.sh | bash ``` **Windows (PowerShell):** ```powershell iwr https://raw.githubusercontent.com/Nomadcxx/opencode-cursor/main/install.ps1 -UseBasicParsing | iex ``` ``` -------------------------------- ### Example User Prompt and Expected Output Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/architecture/opencode-skills-bridge-design.md Illustrates a user request that triggers OpenCode skill execution and the expected assistant response, including a tool call. ```markdown User Prompt: ``` I want to build a Pong game in Go. Use the brainstorm skill to generate design ideas. ``` Expected Output: ``` Assistant: I'll help you design a Pong game. Let me brainstorm some ideas. [Tool Call: brainstorm] Design ideas for Pong game: 1. Classic 2D with simple physics 2. Power-ups (speed boost, paddle expansion) 3. AI opponent with difficulty levels 4. Sound effects and particle effects Now let me create a plan... ``` ``` -------------------------------- ### JSON: Example Agent Configuration Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/specs/2026-03-17-task-tool-guard-and-schema-fix.md Illustrates the structure of the 'agent' section within the 'opencode.json' configuration file, showing primary and subagent configurations with their respective modes and models. ```json "agent": { "build": { "mode": "primary", "model": "openai/gpt-5.2", ... }, "codemachine": { "mode": "subagent", "model": "kimi/kimi-k2.5", ... }, "review": { "mode": "subagent", "model": "google/", ... } } ``` -------------------------------- ### Install OpenCursor globally via npm Source: https://github.com/nomadcxx/opencode-cursor/blob/main/README.md Installs the open-cursor package globally using npm. This is a prerequisite for using the CLI commands. ```bash npm install -g @rama_nigg/open-cursor open-cursor install ``` -------------------------------- ### Verify MCP SDK Loading Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/plans/2026-03-10-mcp-tool-bridge.md A simple Node.js script to verify that the `@modelcontextprotocol/sdk` has been successfully installed and can be loaded. It checks for the existence of the `Client` class. ```bash node -e "const { Client } = require('@modelcontextprotocol/sdk/client/index.js'); console.log('MCP SDK loaded:', typeof Client)" ``` -------------------------------- ### Install OpenCode Cursor on Linux/macOS Source: https://github.com/nomadcxx/opencode-cursor/blob/main/README.md Use this command to install OpenCode Cursor on Linux or macOS systems. ```bash curl -fsSL https://raw.githubusercontent.com/Nomadcxx/opencode-cursor/main/install.sh | bash ``` -------------------------------- ### roshan-c/cursor-acp Approach: Session Management Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/gap-analysis.md This example demonstrates how to track multiple concurrent sessions, including their working directory, cancellation status, and resume IDs, for robust session management. ```typescript // Tracks multiple concurrent sessions private sessions: Record = {}; async newSession(params: NewSessionRequest): Promise { const id = cryptoRandomId(); this.sessions[id] = { cwd: params.cwd, cancelled: false, modeId: "default", resumeId: undefined, // Set from result }; return { sessionId: id, ... }; } async prompt(params: PromptRequest): Promise { const session = this.sessions[params.sessionId]; if (session.resumeId) { args.push("--resume", session.resumeId); // Resume conversation! } // ... } ``` -------------------------------- ### Commit Changes for MCP Client Manager Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/plans/2026-03-10-mcp-tool-bridge.md Example Git commands to stage and commit the newly added MCP client manager files and a related test file. ```bash git add src/mcp/client-manager.ts tests/unit/mcp/client-manager.test.ts git commit -m "feat(mcp): add client manager for direct MCP server connections" ``` -------------------------------- ### Connect to MCP Server Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/plans/2026-03-10-mcp-tool-bridge.md Establishes a connection to an MCP server using the provided configuration. It handles lazy loading of default dependencies, client creation, transport setup, and tool discovery. Logs warnings on connection or discovery failures. ```typescript async connectServer(config: McpServerConfig): Promise { if (this.connections.has(config.name)) { log.debug("Server already connected, skipping", { server: config.name }); return; } // Lazy-load default deps if none were injected if (!this.deps.createClient.toString().includes("open-cursor")) { try { this.deps = await loadDefaultDeps(); } catch (err) { log.warn("Failed to load MCP SDK", { error: String(err) }); return; } } let client: any; try { client = this.deps.createClient(); const transport = this.deps.createTransport(config); await client.connect(transport); } catch (err) { log.warn("MCP server connection failed", { server: config.name, error: String(err), }); return; } let tools: McpToolInfo[] = []; try { const result = await client.listTools(); tools = result?.tools ?? []; log.info("MCP server connected", { server: config.name, tools: tools.length, }); } catch (err) { log.warn("MCP tool discovery failed", { server: config.name, error: String(err), }); } this.connections.set(config.name, { client, tools }); } ``` -------------------------------- ### Run OpenCode with OpenCursor models Source: https://github.com/nomadcxx/opencode-cursor/blob/main/README.md Executes a prompt using OpenCode, specifying a model from the configured OpenCursor providers. Examples show using the 'auto' model and a specific 'sonnet-4.5' model. ```bash opencode run "your prompt" --model cursor-acp/auto opencode run "your prompt" --model cursor-acp/sonnet-4.5 ``` -------------------------------- ### Mock Transport for Testing Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/plans/2026-03-10-mcp-tool-bridge.md A mock transport implementation for testing purposes, simulating start and close operations. ```typescript import { vi } from "bun:test"; function createMockTransport() { return { start: vi.fn(), close: vi.fn() }; } ``` -------------------------------- ### Build Project Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/plans/2026-03-10-mcp-tool-bridge.md Run the build command to verify that the project compiles successfully after the changes. ```bash bun run build ``` -------------------------------- ### Get List of Connected Servers Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/plans/2026-03-10-mcp-tool-bridge.md Returns an array of names for all currently connected MCP servers. ```typescript get connectedServers(): string[] { return Array.from(this.connections.keys()); } ``` -------------------------------- ### Run Full Test Suite Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-windows-support.md Executes the entire test suite to verify that all functionalities, including the new Windows support, are working correctly. ```bash bun test tests/ 2>&1 | tail -10 ``` -------------------------------- ### Run Full Unit Test Suite Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-windows-support.md Executes the full unit test suite using Bun and displays the last 10 lines of output. ```bash bun test tests/unit/ 2>&1 | tail -10 ``` -------------------------------- ### Run build process Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-windows-support.md Executes the build script using 'bun run build', redirecting stderr to stdout and showing the last 5 lines to check for build errors. ```bash bun run build 2>&1 | tail -5 ``` -------------------------------- ### Run Full Test Suite Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-task-tool-guard-and-schema-fix.md Execute the full test suite and display the last 5 lines of the output. Ensure all tests pass. ```bash bun test 2>&1 | tail -5 ``` -------------------------------- ### MCP SDK Client Initialization and Connection Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/plans/2026-03-10-mcp-tool-bridge.md Demonstrates how to initialize an MCP SDK client and establish a connection using a StdioClientTransport for local servers. This is a foundational step for interacting with MCP services. ```typescript import { Client } from '@modelcontextprotocol/sdk/client/index.js'; import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js'; const client = new Client({ name: 'open-cursor', version: '1.0.0' }, { capabilities: {} }); const transport = new StdioClientTransport({ command: 'node', args: ['/path/to/server.js'], env: { KEY: 'value' }, }); await client.connect(transport); ``` -------------------------------- ### Stream Tool Execution Status Updates Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/architecture/opencode-skills-bridge-design.md Uses Server-Sent Events (SSE) to stream progress updates for tool execution. This allows for real-time feedback on tool start and result events. ```typescript // In proxy handler if (toolCall.isOpenCodeTool) { yield `event: tool_start\ndata: ${JSON.stringify({ toolId, callId })}\n\n`; const result = await executeTool(toolCall); yield `event: tool_result\ndata: ${JSON.stringify(result)}\n\n`; } ``` -------------------------------- ### Run All Experiments Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/cursor-agent-tools.md Executes all experiments defined in the harness. Results are logged to raw and summary directories. ```bash python tests/experiments/run_experiments.py ``` -------------------------------- ### Inject subagentNames into system messages Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-task-tool-guard-and-schema-fix.md Adds logic to the `buildAvailableToolsSystemMessage` function to include subagent names in the system message if they are provided. This helps guide the task tool on valid subagent types. ```typescript if (subagentNames.length > 0) { parts.push( `When calling the task tool, set subagent_type to one of: ${subagentNames.join(", ")}. Do not omit this parameter.` ); } ``` -------------------------------- ### List Available Tools for an MCP Server Source: https://github.com/nomadcxx/opencode-cursor/blob/main/README.md Use this command to list the tools available on a specific MCP server. If no server is specified, it lists tools for all discovered servers. ```bash mcptool tools [server] ``` -------------------------------- ### ACP Agent Initialization and Capabilities Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/gap-analysis.md Demonstrates how roshan-c/cursor-acp initializes the agent, negotiates protocol version, and declares agent capabilities, including image support and embedded context. ```typescript async initialize(req: InitializeRequest): Promise { return { protocolVersion: 1, agentCapabilities: { promptCapabilities: { image: false, embeddedContext: true }, }, authMethods: [ { id: "cursor-login", name: "Log in with Cursor Agent", description: "Run `cursor-agent login` in your terminal", }, ], }; } ``` -------------------------------- ### Add, Commit, and Push Changes Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-task-tool-guard-and-schema-fix.md Stage the package.json file, commit the version bump with a descriptive message, and push the changes to the remote repository. ```bash git add package.json git commit -m "chore: bump version to 2.3.20" git push ``` -------------------------------- ### Run Build for TypeScript Compilation Check Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-windows-support.md Executes the build process using Bun and displays the last 10 lines of output to check for TypeScript compilation errors. ```bash bun run build 2>&1 | tail -10 ``` -------------------------------- ### Run Tests for Node Fallback Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-windows-support.md Execute tests to verify the initial state of the node fallback functions. This step helps confirm that tests fail as expected before implementing the functions. ```bash bun test tests/tools/node-fallbacks.test.ts 2>&1 | head -20 ``` -------------------------------- ### Run Full Unit Test Suite Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-windows-support.md Execute the entire unit test suite and capture the last 5 lines of output. This is used to confirm that no regressions have been introduced. ```bash bun test tests/unit/ 2>&1 | tail -5 ``` -------------------------------- ### Create and Push Release Tag Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/PUBLISHING.md Tag the current commit with a version number and push the tag to the origin. ```bash git tag vX.Y.Z git push origin vX.Y.Z ``` -------------------------------- ### Run Unit Tests for Binary Resolution Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-windows-support.md Executes the unit tests for the binary resolution module using Bun and captures the first 20 lines of output, useful for debugging module resolution issues. ```bash cd /home/nomadx/opencode-cursor bun test tests/unit/utils/binary.test.ts 2>&1 | head -20 ``` -------------------------------- ### Run Unit Tests for Binary Resolution Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-windows-support.md Execute the unit tests for the binary resolution utility using the 'bun test' command. This command verifies the functionality of the binary resolution logic. ```bash bun test tests/unit/utils/binary.test.ts ``` -------------------------------- ### Recommended Implementation: Session ID Tracking Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/gap-analysis.md This snippet outlines the minimal implementation for session ID tracking, including initializing session state, updating resume IDs, and marking sessions as cancelled. ```typescript // Add to src/index.ts private sessions: Record = {}; async "chat.params"(input, output) { const sessionId = crypto.randomUUID(); // Node 18+ or polyfill this.sessions[sessionId] = { cancelled: false }; // In child result handler: if (evt.session_id && !session.resumeId) { session.resumeId = evt.session_id; } // In cancel handler: if (this.sessions[sessionId]) { this.sessions[sessionId].cancelled = true; } } ``` -------------------------------- ### Run Unit and Integration Tests Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/PUBLISHING.md Execute unit and integration tests to ensure code quality and stability. ```bash bun run test:ci:unit bun run test:ci:integration ``` -------------------------------- ### Run Full Test Suite Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-task-tool-guard-and-schema-fix.md Execute the complete test suite to ensure no regressions are introduced. Redirects stderr to stdout and shows the last 20 lines. ```bash bun test 2>&1 | tail -20 ``` -------------------------------- ### Initialize MCP Client Manager Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/plans/2026-03-10-mcp-tool-bridge.md Initializes the McpClientManager with optional dependencies. If no dependencies are provided, it uses placeholder functions that throw errors until default dependencies are loaded. ```typescript export class McpClientManager { private connections = new Map(); private deps: McpClientManagerDeps; constructor(deps?: McpClientManagerDeps) { this.deps = deps ?? { createClient: () => { throw new Error("MCP SDK not loaded yet — call connectServer after init"); }, createTransport: () => { throw new Error("MCP SDK not loaded yet"); }, }; } // ... other methods } ``` -------------------------------- ### Stage and Commit Integration Test Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/plans/2026-03-10-mcp-tool-bridge.md Commands to stage the newly created integration test file and commit it with a descriptive message. ```bash git add tests/unit/mcp/integration.test.ts git commit -m "test(mcp): add integration test for full MCP bridge pipeline" ``` -------------------------------- ### Run Integration Test with Bun Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/plans/2026-03-10-mcp-tool-bridge.md Command to execute the specific integration test file using the Bun test runner. ```bash bun test tests/unit/mcp/integration.test.ts ``` -------------------------------- ### Run Test Suite Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/plans/2026-03-10-mcp-tool-bridge.md Execute the full test suite to ensure all existing tests pass and no regressions have been introduced. ```bash bun test ``` -------------------------------- ### Sync models for OpenCursor Source: https://github.com/nomadcxx/opencode-cursor/blob/main/README.md Synchronizes available models for OpenCursor. Use the `--variants --compact` flags for a more organized list that groups variants and includes cost information. ```bash open-cursor sync-models # plain list open-cursor sync-models --variants --compact # group thinking / fast / -low/-high variants under each base ``` -------------------------------- ### Call MCP Tool with JSON Arguments Source: https://github.com/nomadcxx/opencode-cursor/blob/main/README.md Demonstrates calling an MCP tool, 'playwright browser_navigate', with JSON-formatted arguments specifying the URL. ```bash mcptool call playwright browser_navigate '{"url":"https://example.com"}' ``` -------------------------------- ### Run full test suite Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-task-tool-guard-and-schema-fix.md Executes the entire test suite to confirm that all functionalities, including the new subagent name injection, pass without errors. ```bash bun test 2>&1 | tail -15 ``` -------------------------------- ### Run tests to verify passing Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-task-tool-guard-and-schema-fix.md After implementing the `readSubagentNames` function, run the unit tests again using Bun. This command displays the last 15 lines of the test output, which should confirm that all 6 tests for `readSubagentNames` are now passing. ```bash bun test tests/unit/mcp-config.test.ts 2>&1 | tail -15 ``` -------------------------------- ### Run Tests Command (Post-Fix) Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-task-tool-guard-and-schema-fix.md Command to run the guard tests again after implementing the fix, verifying that the tests now pass. ```bash bun test tests/unit/provider-tool-loop-guard.test.ts 2>&1 | tail -20 ``` -------------------------------- ### Run Unit Tests for MCP Config Reader Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/plans/2026-03-10-mcp-tool-bridge.md Executes the unit tests for the MCP configuration reader using the bun test runner. Verifies the expected outcome of tests passing. ```bash bun test tests/unit/mcp/config.test.ts ``` -------------------------------- ### MCP SDK Tool Discovery and Invocation Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/plans/2026-03-10-mcp-tool-bridge.md Shows how to discover available tools on an MCP server using `listTools()` and subsequently invoke a specific tool with its arguments using `callTool()`. This is the core mechanism for tool execution. ```typescript const { tools } = await client.listTools(); // discover const result = await client.callTool({ name, arguments: args }); // invoke ``` -------------------------------- ### Run plugin-toggle unit tests Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-windows-support.md Executes the unit tests specifically for the plugin-toggle functionality using the bun test runner. ```bash bun test tests/unit/plugin-toggle.test.ts ``` -------------------------------- ### Run full test suite Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-task-tool-guard-and-schema-fix.md Execute the entire test suite using Bun to ensure that the new `readSubagentNames` function has not introduced any regressions in existing functionality. This command shows the last 10 lines of the output, typically including the summary of all tests run. ```bash bun test 2>&1 | tail -10 ``` -------------------------------- ### List Discovered MCP Servers Source: https://github.com/nomadcxx/opencode-cursor/blob/main/README.md Use this command to list all MCP servers that have been discovered by the plugin. ```bash mcptool servers ``` -------------------------------- ### Mocking process.platform for Binary Resolution Tests Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/specs/2026-03-17-windows-support-design.md Tests the resolution logic for the cursor agent binary on different platforms, including environment variable overrides and fallback mechanisms. Mocks `existsSync` and `process.platform` to simulate various scenarios. ```typescript describe('resolveCursorAgentBinary', () => { let originalPlatform: NodeJS.Platform; let originalEnv: NodeJS.ProcessEnv; beforeAll(() => { originalPlatform = process.platform; originalEnv = process.env; }); afterAll(() => { process.platform = originalPlatform; process.env = originalEnv; }); // ... test cases ... }); ``` -------------------------------- ### Run Tests Command Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-task-tool-guard-and-schema-fix.md Command to execute unit tests for the provider tool loop guard and filter the output for relevant status messages. ```bash bun test tests/unit/provider-tool-loop-guard.test.ts 2>&1 | grep -E "FAIL|PASS|error" ``` -------------------------------- ### Run injection tests Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-task-tool-guard-and-schema-fix.md Executes unit tests for proxy prompt builder and plugin system message to verify the correct injection of subagent names. This step ensures the changes integrate properly. ```bash bun test tests/unit/proxy-prompt-builder.test.ts tests/unit/plugin-system-message.test.ts 2>&1 | tail -15 ``` -------------------------------- ### OpenCode SDK Tool API Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/architecture/opencode-skills-bridge-design.md Illustrates the available methods for interacting with tools via the OpenCode client SDK, noting the absence of a direct invocation method. ```typescript class OpencodeClient { tool: { ids(): Promise; // List all tool IDs list(): Promise; // List with JSON schemas }; session: { create(): Promise; // Note: No direct tool.invoke() method }; } ``` -------------------------------- ### Run full CI test suite for verification Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-windows-support.md Executes a comprehensive set of CI tests across various modules and tools to ensure the stability and correctness of the changes, displaying the last 10 lines of output. ```bash bun test tests/tools/defaults.test.ts tests/tools/executor-chain.test.ts tests/tools/sdk-executor.test.ts tests/tools/mcp-executor.test.ts tests/tools/skills.test.ts tests/tools/registry.test.ts tests/unit/cli/model-discovery.test.ts tests/unit/proxy/prompt-builder.test.ts tests/unit/proxy/tool-loop.test.ts tests/unit/provider-boundary.test.ts tests/unit/provider-runtime-interception.test.ts tests/unit/provider-tool-schema-compat.test.ts tests/unit/provider-tool-loop-guard.test.ts tests/unit/plugin.test.ts tests/unit/plugin-tools-hook.test.ts tests/unit/plugin-tool-resolution.test.ts tests/unit/plugin-config.test.ts tests/unit/auth.test.ts tests/unit/streaming/line-buffer.test.ts tests/unit/streaming/parser.test.ts tests/unit/streaming/types.test.ts tests/unit/streaming/delta-tracker.test.ts tests/competitive/edge.test.ts 2>&1 | tail -10 ``` -------------------------------- ### Run Fallback Tests Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-windows-support.md Executes the tests for Node.js fallbacks to ensure correct functionality on Windows. ```bash bun test tests/tools/node-fallbacks.test.ts ``` -------------------------------- ### Implement Structured Logger (Recommendation) Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/gap-analysis.md Provides an implementation for a structured logger, similar to the Antigravity Pattern, but using console.error for all levels and a specific prefix. This is a proposed improvement. ```typescript // Add to src/index.ts function createLogger(prefix: string) { return { debug: (msg: string, meta?: any) => console.error(`[cursor:${prefix}] ${msg}`, meta), info: (msg: string, meta?: any) => console.error(`[cursor:${prefix}] ${msg}`, meta), warn: (msg: string, meta?: any) => console.error(`[cursor:${prefix}] ${msg}`, meta), error: (msg: string, err?: any) => console.error(`[cursor:${prefix}] ${msg}`, err) }; } const log = createLogger("main"); log.info("Starting cursor-agent", { model, stream }); ``` -------------------------------- ### Publish to npm Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/PUBLISHING.md Publish the package to npm with public access. This is typically automated via GitHub Actions. ```bash npm publish --access public ``` -------------------------------- ### Add MCP SDK Dependency to Package.json Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/plans/2026-03-10-mcp-tool-bridge.md Command to add the `@modelcontextprotocol/sdk` package with a specific version to the project's dependencies. This is the first step in integrating the SDK. ```bash bun add @modelcontextprotocol/sdk@^1.12.0 ``` -------------------------------- ### Stage and commit changes Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-windows-support.md Stages the modified files (package.json, src/plugin-toggle.ts, tests/unit/plugin-toggle.test.ts, README.md) and commits them with a descriptive message indicating the addition of Windows platform support. ```bash git add package.json src/plugin-toggle.ts tests/unit/plugin-toggle.test.ts README.md git commit -m "feat: add Windows platform support (binary resolution, spawn, path compare, fallback tools)" ``` -------------------------------- ### Update Platform row in README comparison table Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-windows-support.md Updates the 'Platform' row in the comparison table within README.md to explicitly list 'Windows' as a supported operating system. ```markdown Linux, macOS, Windows ``` -------------------------------- ### Run Specific Unit Tests Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-windows-support.md This command executes the tests located in `tests/unit/plugin-proxy-reuse.test.ts` to verify the existing logic and the newly added test cases before applying the code modification. ```bash bun test tests/unit/plugin-proxy-reuse.test.ts ``` -------------------------------- ### Configure opencode.json for OpenCursor Source: https://github.com/nomadcxx/opencode-cursor/blob/main/README.md Adds the open-cursor plugin and configures a 'cursor-acp' provider with specific models and options to your opencode.json file. This enables integration with various LLM providers. ```json { "plugin": ["@rama_nigg/open-cursor@latest"], "provider": { "cursor-acp": { "name": "Cursor ACP", "npm": "@ai-sdk/openai-compatible", "options": { "baseURL": "http://127.0.0.1:32124/v1" }, "models": { "cursor-acp/auto": { "name": "Auto" }, "cursor-acp/claude-opus-4-7": { "name": "Claude 4.7 Opus" }, "cursor-acp/claude-4.6-opus": { "name": "Claude 4.6 Opus" }, "cursor-acp/claude-4.6-sonnet": { "name": "Claude 4.6 Sonnet" }, "cursor-acp/claude-4.5-opus": { "name": "Claude 4.5 Opus" }, "cursor-acp/claude-4.5-sonnet": { "name": "Claude 4.5 Sonnet" }, "cursor-acp/claude-4.5-haiku": { "name": "Claude 4.5 Haiku" }, "cursor-acp/claude-4-sonnet": { "name": "Claude 4 Sonnet" }, "cursor-acp/gpt-5.5": { "name": "GPT-5.5" }, "cursor-acp/gpt-5.4": { "name": "GPT-5.4" }, "cursor-acp/gpt-5.4-mini": { "name": "GPT-5.4 Mini" }, "cursor-acp/gpt-5.4-nano": { "name": "GPT-5.4 Nano" }, "cursor-acp/gpt-5.3-codex": { "name": "GPT-5.3 Codex" }, "cursor-acp/gpt-5.2": { "name": "GPT-5.2" }, "cursor-acp/gpt-5.2-codex": { "name": "GPT-5.2 Codex" }, "cursor-acp/gpt-5.1-codex": { "name": "GPT-5.1 Codex" }, "cursor-acp/gpt-5.1-codex-max": { "name": "GPT-5.1 Codex Max" }, "cursor-acp/gpt-5.1-codex-mini":{ "name": "GPT-5.1 Codex Mini" }, "cursor-acp/gpt-5-mini": { "name": "GPT-5 Mini" }, "cursor-acp/gemini-3.1-pro": { "name": "Gemini 3.1 Pro" }, "cursor-acp/gemini-3-pro": { "name": "Gemini 3 Pro" }, "cursor-acp/gemini-3-flash": { "name": "Gemini 3 Flash" }, "cursor-acp/composer-2": { "name": "Composer 2" }, "cursor-acp/composer-2-fast": { "name": "Composer 2 Fast" }, "cursor-acp/composer-1.5": { "name": "Composer 1.5" }, "cursor-acp/grok-4-20": { "name": "Grok 4.20" }, "cursor-acp/kimi-k2.5": { "name": "Kimi K2.5" } } } } } ``` -------------------------------- ### Plugin Integration for OpenCode Tools Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/architecture/opencode-skills-bridge-design.md Integrates OpenCode tools into the Cursor plugin. Initializes tool discovery and routing, and sets up an HTTP endpoint for tool execution callbacks. ```typescript import { OpenCodeToolDiscovery } from "./tools/opencode-discovery"; import { OpenCodeToolRouter } from "./tools/opencode-router"; export default definePlugin((input: PluginInput) => { const { client, serverUrl, $ } = input; // Initialize tool discovery const toolDiscovery = new OpenCodeToolDiscovery(client); const toolRouter = new OpenCodeToolRouter(toolDiscovery, 32125); // Plugin port // Start tool execution endpoint const toolServer = Bun.serve({ port: 32125, async fetch(req) { const url = new URL(req.url); if (url.pathname === "/.opencode/tool-execution" && req.method === "POST") { const invocation: ToolInvocation = await req.json(); // Execute tool via OpenCode // Note: This requires OpenCode to expose tool execution to plugins // Currently not available, would need OpenCode SDK update const result = await executeViaOpenCode(invocation); return Response.json(result); } return new Response("Not Found", { status: 404 }); } }); return { name: "cursor-acp", description: "Cursor Agent Compatibility Proxy with bidirectional tools", chat: { params: async ({ messages }) => { // Get OpenCode tools and inject into request const openCodeTools = await toolRouter.toOpenAiTools(); // Store tools for later use in proxy process.env.CURSOR_ACP_OPENCODE_TOOLS = JSON.stringify(openCodeTools); return { messages }; } }, async onClose() { toolServer.stop(); } }; }); ``` -------------------------------- ### Update prepublishOnly script in package.json Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-windows-support.md Ensures the 'prepublishOnly' script in package.json is correctly set to 'bun run build', avoiding literal newline characters. ```json "prepublishOnly": "bun run build" ``` -------------------------------- ### Check Current Version in package.json Source: https://github.com/nomadcxx/opencode-cursor/blob/main/docs/superpowers/plans/2026-03-17-task-tool-guard-and-schema-fix.md Before bumping the version, check the current version specified in the package.json file. ```bash grep "version" package.json ```