import type { ConnectionActionInvoker } from "./connection-actions.js"; /** * Script input for the "Create Cursor agent" effect (`cursor.createAgent`), * derived from its Tool Core definition's call_function input projection. * * Create a new Cursor agent */ export type CreateAgentScriptInput = { /** * What you want the agent to do */ prompt: string; /** * GitHub repository URL or owner/repo format (e.g. 'owner/repo' or 'https://github.com/owner/repo') */ repository: string; /** * Optional branch or ref to work from (e.g. 'main', 'develop') */ ref?: string; /** * Custom branch name for the agent to create in the target repository. */ branchName?: string; /** * Whether to open the pull request as the Cursor GitHub App instead of as the user (default: true). Only applies when a PR is auto-created. */ openAsCursorGithubApp?: boolean; /** * Whether to skip adding the user as a reviewer on the pull request. Only applies if autoCreatePr is true and the PR is opened as the Cursor GitHub App (default: false). */ skipReviewerRequest?: boolean; webhook?: { /** * Webhook URL to receive agent status updates. */ url: string; /** * Optional shared secret for verifying webhook signatures. */ secret?: string; }; }; /** * Canonical Tool Core output for the "Create Cursor agent" effect (`cursor.createAgent`). * This is the definition's output schema; the effect's script surface may * re-encode it before returning. */ export type CreateAgentScriptOutput = { id: string; name: string; /** * One of: `CREATING`, `RUNNING`, `FINISHED`, `ERROR`, `EXPIRED` */ status: "CREATING" | "RUNNING" | "FINISHED" | "ERROR" | "EXPIRED"; source: { repository: string; ref?: string; }; target: { url: string; prUrl?: string; branchName?: string; autoCreatePr?: boolean; autoBranch?: boolean; openAsCursorGithubApp?: boolean; skipReviewerRequest?: boolean; }; createdAt: string; summary?: string; conversation?: { id: string; messages: Array<{ id: string; type: string; text: string; }>; }; }; /** * Script input for the "Get Cursor agent" effect (`cursor.getAgent`), * derived from its Tool Core definition's call_function input projection. * * Get a Cursor agent by ID */ export type GetAgentScriptInput = { /** * The ID of the Cursor agent to get (e.g. 'agent-123') */ agentId: string; }; /** * Canonical Tool Core output for the "Get Cursor agent" effect (`cursor.getAgent`). * This is the definition's output schema; the effect's script surface may * re-encode it before returning. */ export type GetAgentScriptOutput = { id: string; name: string; /** * One of: `CREATING`, `RUNNING`, `FINISHED`, `ERROR`, `EXPIRED` */ status: "CREATING" | "RUNNING" | "FINISHED" | "ERROR" | "EXPIRED"; source: { repository: string; ref?: string; }; target: { url: string; prUrl?: string; branchName?: string; autoCreatePr?: boolean; autoBranch?: boolean; openAsCursorGithubApp?: boolean; skipReviewerRequest?: boolean; }; createdAt: string; summary?: string; conversation?: { id: string; messages: Array<{ id: string; type: string; text: string; }>; }; }; /** * Script input for the "List Cursor repositories" effect (`cursor.listRepositories`), * derived from its Tool Core definition's call_function input projection. * * List accessible Cursor repositories */ export type ListRepositoriesScriptInput = Record; /** * Canonical Tool Core output for the "List Cursor repositories" effect (`cursor.listRepositories`). * This is the definition's output schema; the effect's script surface may * re-encode it before returning. */ export type ListRepositoriesScriptOutput = { repositories: Array<{ owner: string; name: string; repository: string; }>; }; export declare class CursorConnectionClient { private readonly invoke; constructor(invoke: ConnectionActionInvoker); createAgent(args: CreateAgentScriptInput): Promise; getAgent(args: GetAgentScriptInput): Promise; listRepositories(args: ListRepositoriesScriptInput): Promise; } //# sourceMappingURL=cursor.generated.d.ts.map