JSPM

@open-cursor/protocol

0.1.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 5
    • Score
      100M100P100Q58754F
    • License MIT

    Cursor agent protocol definitions, generated code, and API clients

    Package Exports

    • @open-cursor/protocol
    • @open-cursor/protocol/__generated__/agent/v1/agent_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/agent_service_connect.js
    • @open-cursor/protocol/__generated__/agent/v1/apply_agent_diff_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/ask_question_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/background_shell_exec_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/computer_use_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/control_service_connect.js
    • @open-cursor/protocol/__generated__/agent/v1/control_service_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/create_plan_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/cursor_packages_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/cursor_rules_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/delete_exec_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/delete_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/diagnostics_exec_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/edit_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/exa_fetch_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/exa_search_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/exec_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/exec_service_connect.js
    • @open-cursor/protocol/__generated__/agent/v1/fetch_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/generate_image_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/glob_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/grep_exec_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/grep_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/kv_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/ls_exec_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/ls_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/mcp_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/mcp_resource_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/mcp_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/private_worker_bridge_external_connect.js
    • @open-cursor/protocol/__generated__/agent/v1/read_exec_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/read_lints_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/read_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/record_screen_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/reflect_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/repo_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/report_bugfix_results_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/request_context_exec_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/sandbox_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/selected_context_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/semsearch_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/setup_vm_environment_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/shell_exec_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/shell_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/start_grind_execution_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/start_grind_planning_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/subagents_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/switch_mode_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/todo_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/utils_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/web_fetch_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/web_search_tool_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/write_exec_pb.js
    • @open-cursor/protocol/__generated__/agent/v1/write_shell_stdin_tool_pb.js
    • @open-cursor/protocol/__generated__/aiserver/v1/aiserver_service_connect.js
    • @open-cursor/protocol/agent
    • @open-cursor/protocol/ai
    • @open-cursor/protocol/auth
    • @open-cursor/protocol/backoff
    • @open-cursor/protocol/constants

    Readme

    @open-cursor/protocol

    Cursor agent protocol definitions, generated protobuf code, and ConnectRPC client services.

    This package contains the protobuf definitions (.proto files), TypeScript classes generated from them, and high-level ConnectRPC client wrappers for interacting with Cursor's backend services (Agent, AI, and Auth).

    Install

    npm install @open-cursor/protocol

    Requires Node.js 18+.

    Usage

    import { Auth, AgentService, CURSOR_API_URL } from "@open-cursor/protocol";
    
    // 1. Authenticate with Cursor's auth endpoints
    const auth = new Auth(CURSOR_API_URL);
    const tokens = await auth.poll({ uuid, verifier });
    
    // 2. Instantiate the agent service client
    const service = new AgentService(CURSOR_API_URL, {
      accessToken: tokens.accessToken,
      clientType: "cli",
      clientVersion: "cli-2026.06.04-5fd875e",
    });
    const rpcClient = service.rpcClient;

    Provenance

    • proto/: Original protobuf definitions reverse-engineered from Cursor.
    • src/__generated__/: Generated TypeScript definitions (protoc-gen-es and protoc-gen-connect-es).
    • src/agent.ts, src/ai.ts, src/auth.ts: Client wrappers around ConnectRPC transport.

    Updating

    To regenerate TypeScript files after modifying the .proto files under proto/:

    npm run generate