diff --git a/biome.json b/biome.json index 584a2b62d..4604c58e1 100644 --- a/biome.json +++ b/biome.json @@ -43,6 +43,7 @@ "!**/test-sessions.ts", "!**/models.generated.ts", "!**/template.generated.ts", + "!**/gen/agent_pb.ts", "!packages/web-ui/src/app.css", "!packages/mom/data/**/*", "!!**/node_modules" diff --git a/bun.lock b/bun.lock index 89bb37e42..a1c7a71e4 100644 --- a/bun.lock +++ b/bun.lock @@ -10,6 +10,7 @@ }, "devDependencies": { "@biomejs/biome": "2.3.11", + "@bufbuild/protoc-gen-es": "^2.10.2", "@types/bun": "^1.2.17", "@types/node": "^22.10.5", "@typescript/native-preview": "^7.0.0-dev.20260102.1", @@ -38,6 +39,9 @@ }, "dependencies": { "@anthropic-ai/sdk": "0.71.2", + "@bufbuild/protobuf": "^2.10.2", + "@connectrpc/connect": "^2.1.1", + "@connectrpc/connect-node": "^2.1.1", "@google/genai": "1.34.0", "@mistralai/mistralai": "1.10.0", "@sinclair/typebox": "^0.34.41", @@ -143,8 +147,18 @@ "@borewit/text-codec": ["@borewit/text-codec@0.2.1", "", {}, "sha512-k7vvKPbf7J2fZ5klGRD9AeKfUvojuZIQ3BT5u7Jfv+puwXkUBUT5PVyMDfJZpy30CBDXGMgw7fguK/lpOMBvgw=="], + "@bufbuild/protobuf": ["@bufbuild/protobuf@2.10.2", "", {}, "sha512-uFsRXwIGyu+r6AMdz+XijIIZJYpoWeYzILt5yZ2d3mCjQrWUTVpVD9WL/jZAbvp+Ed04rOhrsk7FiTcEDseB5A=="], + + "@bufbuild/protoc-gen-es": ["@bufbuild/protoc-gen-es@2.10.2", "", { "dependencies": { "@bufbuild/protobuf": "2.10.2", "@bufbuild/protoplugin": "2.10.2" }, "bin": { "protoc-gen-es": "bin/protoc-gen-es" } }, "sha512-vbjPsuofbtZwZXuOP7Y16CQsxrwCjuRONffmJSBEhoC7PQu/Cabp0+Fu/poLPm9CNM0tDCQA0xvgobgudaEYxQ=="], + + "@bufbuild/protoplugin": ["@bufbuild/protoplugin@2.10.2", "", { "dependencies": { "@bufbuild/protobuf": "2.10.2", "@typescript/vfs": "^1.6.2", "typescript": "5.4.5" } }, "sha512-RAWVs9tCzRqSS3tUtaFhOcauOAazCrm7tlGh0WHFq/44n5Fj6YgefdlZEPIaAK6VAA+FdOoFgtOJK2Ji5U24pw=="], + "@colors/colors": ["@colors/colors@1.6.0", "", {}, "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA=="], + "@connectrpc/connect": ["@connectrpc/connect@2.1.1", "", { "peerDependencies": { "@bufbuild/protobuf": "^2.7.0" } }, "sha512-JzhkaTvM73m2K1URT6tv53k2RwngSmCXLZJgK580qNQOXRzZRR/BCMfZw3h+90JpnG6XksP5bYT+cz0rpUzUWQ=="], + + "@connectrpc/connect-node": ["@connectrpc/connect-node@2.1.1", "", { "peerDependencies": { "@bufbuild/protobuf": "^2.7.0", "@connectrpc/connect": "2.1.1" } }, "sha512-s3TfsI1XF+n+1z6MBS9rTnFsxxR4Rw5wmdEnkQINli81ESGxcsfaEet8duzq8LVuuCupmhUsgpRo0Nv9pZkufg=="], + "@dabh/diagnostics": ["@dabh/diagnostics@2.0.8", "", { "dependencies": { "@so-ric/colorspace": "^1.1.6", "enabled": "2.0.x", "kuler": "^2.0.0" } }, "sha512-R4MSXTVnuMzGD7bzHdW2ZhhdPC/igELENcq5IjEverBvq5hn1SXCWcsi6eSsdWP0/Ur+SItRRjAktmdoX/8R/Q=="], "@emnapi/runtime": ["@emnapi/runtime@1.8.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-mehfKSMWjjNol8659Z8KxEMrdSJDDot5SXMq00dM8BN4o+CLNXQ0xH2V7EchNHV4RmbZLmmPdEaXZc5H2FXmDg=="], @@ -385,6 +399,8 @@ "@typescript/native-preview-win32-x64": ["@typescript/native-preview-win32-x64@7.0.0-dev.20260109.1", "", { "os": "win32", "cpu": "x64" }, "sha512-da44CbC8ktr741ISLvCQlz3Gv2UqO2M+rB585xCFNjcz+0IyOKkBGr9eR++f6uy46/QKFK4w44x0cK71PVqk9g=="], + "@typescript/vfs": ["@typescript/vfs@1.6.2", "", { "dependencies": { "debug": "^4.1.1" }, "peerDependencies": { "typescript": "*" } }, "sha512-hoBwJwcbKHmvd2QVebiytN1aELvpk9B74B4L1mFm/XT1Q/VOYAWl2vQ9AWRFtQq8zmz6enTpfTV8WRc4ATjW/g=="], + "@vitest/expect": ["@vitest/expect@3.2.4", "", { "dependencies": { "@types/chai": "^5.2.2", "@vitest/spy": "3.2.4", "@vitest/utils": "3.2.4", "chai": "^5.2.0", "tinyrainbow": "^2.0.0" } }, "sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig=="], "@vitest/mocker": ["@vitest/mocker@3.2.4", "", { "dependencies": { "@vitest/spy": "3.2.4", "estree-walker": "^3.0.3", "magic-string": "^0.30.17" }, "peerDependencies": { "msw": "^2.4.9", "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" }, "optionalPeers": ["msw", "vite"] }, "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ=="], @@ -913,6 +929,8 @@ "type-is": ["type-is@2.0.1", "", { "dependencies": { "content-type": "^1.0.5", "media-typer": "^1.1.0", "mime-types": "^3.0.0" } }, "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw=="], + "typescript": ["typescript@5.4.5", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ=="], + "uglify-js": ["uglify-js@3.19.3", "", { "bin": { "uglifyjs": "bin/uglifyjs" } }, "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ=="], "uint8array-extras": ["uint8array-extras@1.5.0", "", {}, "sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A=="], diff --git a/package.json b/package.json index 6705a92a5..c1334b6ad 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ }, "devDependencies": { "@biomejs/biome": "2.3.11", + "@bufbuild/protoc-gen-es": "^2.10.2", "@types/bun": "^1.2.17", "@types/node": "^22.10.5", "@typescript/native-preview": "^7.0.0-dev.20260102.1", diff --git a/packages/agent/CHANGELOG.md b/packages/agent/CHANGELOG.md index 0e88c13b5..7be6aa2de 100644 --- a/packages/agent/CHANGELOG.md +++ b/packages/agent/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog ## [Unreleased] +### Added + +- Added `cursorExecHandlers` and `cursorOnToolResult` options for local tool execution with cursor-based streaming +- Added `emitExternalEvent` method to allow external event injection into the agent state ## [4.2.3] - 2026-01-11 diff --git a/packages/agent/src/agent.ts b/packages/agent/src/agent.ts index 290555bf0..83190a90d 100644 --- a/packages/agent/src/agent.ts +++ b/packages/agent/src/agent.ts @@ -4,6 +4,8 @@ */ import { + type CursorExecHandlers, + type CursorToolResultHandler, getModel, type ImageContent, type Message, @@ -11,6 +13,7 @@ import { streamSimple, type TextContent, type ThinkingBudgets, + type ToolResultMessage, } from "@oh-my-pi/pi-ai"; import { agentLoop, agentLoopContinue } from "./agent-loop"; import type { @@ -91,6 +94,16 @@ export interface AgentOptions { * Use for late-bound UI or session state access. */ getToolContext?: () => AgentToolContext | undefined; + + /** + * Cursor exec handlers for local tool execution. + */ + cursorExecHandlers?: CursorExecHandlers; + + /** + * Cursor tool result callback for exec tool responses. + */ + cursorOnToolResult?: CursorToolResultHandler; } export class Agent { @@ -120,6 +133,8 @@ export class Agent { private _thinkingBudgets?: ThinkingBudgets; public getApiKey?: (provider: string) => Promise | string | undefined; private getToolContext?: () => AgentToolContext | undefined; + private cursorExecHandlers?: CursorExecHandlers; + private cursorOnToolResult?: CursorToolResultHandler; private runningPrompt?: Promise; private resolveRunningPrompt?: () => void; @@ -135,6 +150,8 @@ export class Agent { this._thinkingBudgets = opts.thinkingBudgets; this.getApiKey = opts.getApiKey; this.getToolContext = opts.getToolContext; + this.cursorExecHandlers = opts.cursorExecHandlers; + this.cursorOnToolResult = opts.cursorOnToolResult; } /** @@ -175,6 +192,33 @@ export class Agent { return () => this.listeners.delete(fn); } + emitExternalEvent(event: AgentEvent) { + switch (event.type) { + case "message_start": + case "message_update": + this._state.streamMessage = event.message; + break; + case "message_end": + this._state.streamMessage = null; + this.appendMessage(event.message); + break; + case "tool_execution_start": { + const pending = new Set(this._state.pendingToolCalls); + pending.add(event.toolCallId); + this._state.pendingToolCalls = pending; + break; + } + case "tool_execution_end": { + const pending = new Set(this._state.pendingToolCalls); + pending.delete(event.toolCallId); + this._state.pendingToolCalls = pending; + break; + } + } + + this.emit(event); + } + // State mutators setSystemPrompt(v: string) { this._state.systemPrompt = v; @@ -382,6 +426,24 @@ export class Agent { tools: this._state.tools, }; + const cursorOnToolResult = + this.cursorExecHandlers || this.cursorOnToolResult + ? async (message: ToolResultMessage) => { + let finalMessage = message; + if (this.cursorOnToolResult) { + try { + const updated = await this.cursorOnToolResult(message); + if (updated) { + finalMessage = updated; + } + } catch {} + } + this.emitExternalEvent({ type: "message_start", message: finalMessage }); + this.emitExternalEvent({ type: "message_end", message: finalMessage }); + return finalMessage; + } + : undefined; + const config: AgentLoopConfig = { model, reasoning, @@ -392,6 +454,8 @@ export class Agent { transformContext: this.transformContext, getApiKey: this.getApiKey, getToolContext: this.getToolContext, + cursorExecHandlers: this.cursorExecHandlers, + cursorOnToolResult, getSteeringMessages: async () => { if (this.steeringMode === "one-at-a-time") { if (this.steeringQueue.length > 0) { diff --git a/packages/ai/CHANGELOG.md b/packages/ai/CHANGELOG.md index e2a2e27ca..c41f2e4e9 100644 --- a/packages/ai/CHANGELOG.md +++ b/packages/ai/CHANGELOG.md @@ -1,8 +1,13 @@ # Changelog ## [Unreleased] + ### Added +- Added Cursor provider with support for Claude, GPT, and Gemini models via Cursor's agent API +- Added OAuth authentication flow for Cursor including login, token refresh, and expiry detection +- Added `cursor-agent` API type with streaming support and tool execution handlers +- Added Cursor model definitions including Claude 4.5, GPT-5.x, Gemini 3, and Grok variants - Added model generation script to automatically fetch and update AI model definitions from models.dev and OpenRouter APIs ## [4.2.3] - 2026-01-11 diff --git a/packages/ai/package.json b/packages/ai/package.json index c327a018a..7958d3aaf 100644 --- a/packages/ai/package.json +++ b/packages/ai/package.json @@ -18,6 +18,9 @@ }, "dependencies": { "@anthropic-ai/sdk": "0.71.2", + "@bufbuild/protobuf": "^2.10.2", + "@connectrpc/connect": "^2.1.1", + "@connectrpc/connect-node": "^2.1.1", "@google/genai": "1.34.0", "@mistralai/mistralai": "1.10.0", "@sinclair/typebox": "^0.34.41", diff --git a/packages/ai/src/index.ts b/packages/ai/src/index.ts index 5ce87e1dc..b1b71bd06 100644 --- a/packages/ai/src/index.ts +++ b/packages/ai/src/index.ts @@ -1,5 +1,6 @@ export * from "./models"; export * from "./providers/anthropic"; +export * from "./providers/cursor"; export * from "./providers/google"; export * from "./providers/google-gemini-cli"; export * from "./providers/google-vertex"; diff --git a/packages/ai/src/models.generated.ts b/packages/ai/src/models.generated.ts index 842fc20ea..c1163096a 100644 --- a/packages/ai/src/models.generated.ts +++ b/packages/ai/src/models.generated.ts @@ -433,6 +433,229 @@ export const MODELS = { maxTokens: 40000, } satisfies Model<"openai-completions">, }, + "cursor": { + "claude-4.5-opus-high": { + id: "claude-4.5-opus-high", + name: "Claude 4.5 Opus (Cursor)", + api: "cursor-agent", + provider: "cursor", + baseUrl: "https://api2.cursor.sh", + reasoning: false, + input: ["text", "image"], + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + contextWindow: 200000, + maxTokens: 64000, + } satisfies Model<"cursor-agent">, + "claude-4.5-opus-high-thinking": { + id: "claude-4.5-opus-high-thinking", + name: "Claude 4.5 Opus Thinking (Cursor)", + api: "cursor-agent", + provider: "cursor", + baseUrl: "https://api2.cursor.sh", + reasoning: true, + input: ["text", "image"], + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + contextWindow: 200000, + maxTokens: 64000, + } satisfies Model<"cursor-agent">, + "claude-4.5-sonnet": { + id: "claude-4.5-sonnet", + name: "Claude 4.5 Sonnet (Cursor)", + api: "cursor-agent", + provider: "cursor", + baseUrl: "https://api2.cursor.sh", + reasoning: false, + input: ["text", "image"], + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + contextWindow: 200000, + maxTokens: 64000, + } satisfies Model<"cursor-agent">, + "claude-4.5-sonnet-thinking": { + id: "claude-4.5-sonnet-thinking", + name: "Claude 4.5 Sonnet Thinking (Cursor)", + api: "cursor-agent", + provider: "cursor", + baseUrl: "https://api2.cursor.sh", + reasoning: true, + input: ["text", "image"], + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + contextWindow: 200000, + maxTokens: 64000, + } satisfies Model<"cursor-agent">, + "composer-1": { + id: "composer-1", + name: "Composer 1 (Cursor)", + api: "cursor-agent", + provider: "cursor", + baseUrl: "https://api2.cursor.sh", + reasoning: false, + input: ["text"], + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + contextWindow: 200000, + maxTokens: 64000, + } satisfies Model<"cursor-agent">, + "default": { + id: "default", + name: "Auto (Cursor)", + api: "cursor-agent", + provider: "cursor", + baseUrl: "https://api2.cursor.sh", + reasoning: false, + input: ["text", "image"], + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + contextWindow: 200000, + maxTokens: 64000, + } satisfies Model<"cursor-agent">, + "gemini-3-flash": { + id: "gemini-3-flash", + name: "Gemini 3 Flash (Cursor)", + api: "cursor-agent", + provider: "cursor", + baseUrl: "https://api2.cursor.sh", + reasoning: true, + input: ["text", "image"], + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + contextWindow: 1048576, + maxTokens: 65535, + } satisfies Model<"cursor-agent">, + "gemini-3-pro": { + id: "gemini-3-pro", + name: "Gemini 3 Pro (Cursor)", + api: "cursor-agent", + provider: "cursor", + baseUrl: "https://api2.cursor.sh", + reasoning: true, + input: ["text", "image"], + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + contextWindow: 1048576, + maxTokens: 65535, + } satisfies Model<"cursor-agent">, + "gpt-5.1-codex-max": { + id: "gpt-5.1-codex-max", + name: "GPT-5.1 Codex Max (Cursor)", + api: "cursor-agent", + provider: "cursor", + baseUrl: "https://api2.cursor.sh", + reasoning: true, + input: ["text", "image"], + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + contextWindow: 400000, + maxTokens: 128000, + } satisfies Model<"cursor-agent">, + "gpt-5.1-codex-max-high": { + id: "gpt-5.1-codex-max-high", + name: "GPT-5.1 Codex Max High (Cursor)", + api: "cursor-agent", + provider: "cursor", + baseUrl: "https://api2.cursor.sh", + reasoning: true, + input: ["text", "image"], + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + contextWindow: 400000, + maxTokens: 128000, + } satisfies Model<"cursor-agent">, + "gpt-5.2": { + id: "gpt-5.2", + name: "GPT-5.2 (Cursor)", + api: "cursor-agent", + provider: "cursor", + baseUrl: "https://api2.cursor.sh", + reasoning: true, + input: ["text", "image"], + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + contextWindow: 400000, + maxTokens: 128000, + } satisfies Model<"cursor-agent">, + "gpt-5.2-high": { + id: "gpt-5.2-high", + name: "GPT-5.2 High (Cursor)", + api: "cursor-agent", + provider: "cursor", + baseUrl: "https://api2.cursor.sh", + reasoning: true, + input: ["text", "image"], + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + contextWindow: 400000, + maxTokens: 128000, + } satisfies Model<"cursor-agent">, + "grok-code-fast-1": { + id: "grok-code-fast-1", + name: "Grok (Cursor)", + api: "cursor-agent", + provider: "cursor", + baseUrl: "https://api2.cursor.sh", + reasoning: false, + input: ["text"], + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + contextWindow: 32768, + maxTokens: 8192, + } satisfies Model<"cursor-agent">, + }, "github-copilot": { "claude-haiku-4.5": { id: "claude-haiku-4.5", diff --git a/packages/ai/src/providers/cursor.ts b/packages/ai/src/providers/cursor.ts new file mode 100644 index 000000000..748a0ef5f --- /dev/null +++ b/packages/ai/src/providers/cursor.ts @@ -0,0 +1,1577 @@ +import { createHash } from "node:crypto"; +import { appendFile } from "node:fs/promises"; +import http2 from "node:http2"; +import { create, fromBinary, toBinary } from "@bufbuild/protobuf"; +import { calculateCost } from "../models"; +import type { + Api, + AssistantMessage, + Context, + CursorExecHandlerResult, + CursorExecHandlers, + CursorMcpCall, + CursorToolResultHandler, + ImageContent, + Model, + StreamFunction, + StreamOptions, + TextContent, + ThinkingContent, + Tool, + ToolCall, + ToolResultMessage, +} from "../types"; +import { AssistantMessageEventStream } from "../utils/event-stream"; +import { parseStreamingJson } from "../utils/json-parse"; +import { formatErrorMessageWithRetryAfter } from "../utils/retry-after"; +import type { McpToolDefinition } from "./cursor/gen/agent_pb"; +import { + AgentClientMessageSchema, + AgentRunRequestSchema, + type AgentServerMessage, + AgentServerMessageSchema, + BackgroundShellSpawnResultSchema, + ClientHeartbeatSchema, + ConversationActionSchema, + ConversationStateStructureSchema, + DeleteErrorSchema, + DeleteRejectedSchema, + DeleteResultSchema, + DeleteSuccessSchema, + DiagnosticsErrorSchema, + DiagnosticsRejectedSchema, + DiagnosticsResultSchema, + DiagnosticsSuccessSchema, + type ExecClientMessage, + ExecClientMessageSchema, + type ExecServerMessage, + FetchErrorSchema, + FetchResultSchema, + GetBlobResultSchema, + GrepContentMatchSchema, + GrepContentResultSchema, + GrepCountResultSchema, + GrepErrorSchema, + type GrepFileCount, + GrepFileCountSchema, + GrepFileMatchSchema, + GrepFilesResultSchema, + GrepResultSchema, + GrepSuccessSchema, + type GrepUnionResult, + GrepUnionResultSchema, + KvClientMessageSchema, + type KvServerMessage, + type LsDirectoryTreeNode, + type LsDirectoryTreeNode_File, + LsDirectoryTreeNode_FileSchema, + LsDirectoryTreeNodeSchema, + LsErrorSchema, + LsRejectedSchema, + LsResultSchema, + LsSuccessSchema, + McpErrorSchema, + McpImageContentSchema, + McpResultSchema, + McpSuccessSchema, + McpTextContentSchema, + McpToolDefinitionSchema, + McpToolNotFoundSchema, + McpToolResultContentItemSchema, + ModelDetailsSchema, + ReadErrorSchema, + ReadRejectedSchema, + ReadResultSchema, + ReadSuccessSchema, + RequestContextResultSchema, + RequestContextSchema, + RequestContextSuccessSchema, + SetBlobResultSchema, + ShellFailureSchema, + ShellRejectedSchema, + ShellResultSchema, + ShellSuccessSchema, + UserMessageActionSchema, + UserMessageSchema, + WriteErrorSchema, + WriteRejectedSchema, + WriteResultSchema, + WriteShellStdinErrorSchema, + WriteShellStdinResultSchema, + WriteSuccessSchema, +} from "./cursor/gen/agent_pb"; + +export const CURSOR_API_URL = "https://api2.cursor.sh"; +export const CURSOR_CLIENT_VERSION = "cli-2026.01.09-231024f"; + +export interface CursorOptions extends StreamOptions { + customSystemPrompt?: string; + conversationId?: string; + execHandlers?: CursorExecHandlers; + onToolResult?: CursorToolResultHandler; +} + +const CONNECT_END_STREAM_FLAG = 0b00000010; + +async function appendCursorDebugLog(message: string): Promise { + const logPath = process.env.DEBUG_CURSOR_LOG; + if (!logPath) return; + try { + await appendFile(logPath, `${message}\n`); + } catch { + // Ignore debug log failures + } +} + +function logCursorDebug(message: string): void { + if (!process.env.DEBUG_CURSOR) return; + console.error(message); + void appendCursorDebugLog(message); +} + +function frameConnectMessage(data: Uint8Array, flags = 0): Buffer { + const frame = Buffer.alloc(5 + data.length); + frame[0] = flags; + frame.writeUInt32BE(data.length, 1); + frame.set(data, 5); + return frame; +} + +function parseConnectEndStream(data: Uint8Array): Error | null { + try { + const payload = JSON.parse(new TextDecoder().decode(data)); + const error = payload?.error; + if (error) { + const code = typeof error.code === "string" ? error.code : "unknown"; + const message = typeof error.message === "string" ? error.message : "Unknown error"; + return new Error(`Connect error ${code}: ${message}`); + } + return null; + } catch { + return new Error("Failed to parse Connect end stream"); + } +} + +function debugBytes(bytes: Uint8Array, asHex: boolean): string { + if (asHex) { + return Buffer.from(bytes).toString("hex"); + } + try { + const text = new TextDecoder("utf-8", { fatal: true }).decode(bytes); + if (/^[\x20-\x7E\s]*$/.test(text)) return text; + } catch {} + return Buffer.from(bytes).toString("hex"); +} + +function debugReplacer(key: string, value: unknown): unknown { + if ( + value instanceof Uint8Array || + (value && typeof value === "object" && "type" in value && value.type === "Buffer") + ) { + const bytes = value instanceof Uint8Array ? value : new Uint8Array((value as any).data); + const asHex = key === "blobId" || key === "blob_id" || key.endsWith("Id") || key.endsWith("_id"); + return debugBytes(bytes, asHex); + } + if (typeof value === "bigint") return value.toString(); + return value; +} + +export const streamCursor: StreamFunction<"cursor-agent"> = ( + model: Model<"cursor-agent">, + context: Context, + options?: CursorOptions, +): AssistantMessageEventStream => { + const stream = new AssistantMessageEventStream(); + + (async () => { + const output: AssistantMessage = { + role: "assistant", + content: [], + api: "cursor-agent" as Api, + provider: model.provider, + model: model.id, + usage: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + totalTokens: 0, + cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 }, + }, + stopReason: "stop", + timestamp: Date.now(), + }; + + let h2Client: http2.ClientHttp2Session | null = null; + let h2Request: http2.ClientHttp2Stream | null = null; + let heartbeatTimer: ReturnType | null = null; + + try { + const apiKey = options?.apiKey; + if (!apiKey) { + throw new Error("Cursor API key (access token) is required"); + } + + const { requestBytes, blobStore } = buildGrpcRequest(model, context, options); + const requestContextTools = buildMcpToolDefinitions(context.tools); + + const baseUrl = model.baseUrl || CURSOR_API_URL; + h2Client = http2.connect(baseUrl); + + h2Request = h2Client.request({ + ":method": "POST", + ":path": "/agent.v1.AgentService/Run", + "content-type": "application/connect+proto", + "connect-protocol-version": "1", + te: "trailers", + authorization: `Bearer ${apiKey}`, + "x-ghost-mode": "true", + "x-cursor-client-version": CURSOR_CLIENT_VERSION, + "x-cursor-client-type": "cli", + "x-request-id": crypto.randomUUID(), + }); + + stream.push({ type: "start", partial: output }); + + let pendingBuffer = Buffer.alloc(0); + let endStreamError: Error | null = null; + let currentTextBlock: (TextContent & { index: number }) | null = null; + let currentThinkingBlock: (ThinkingContent & { index: number }) | null = null; + let currentToolCall: (ToolCall & { index: number; partialJson: string }) | null = null; + const usageState: UsageState = { sawTokenDelta: false }; + + const state: BlockState = { + get currentTextBlock() { + return currentTextBlock; + }, + get currentThinkingBlock() { + return currentThinkingBlock; + }, + get currentToolCall() { + return currentToolCall; + }, + setTextBlock: (b) => { + currentTextBlock = b; + }, + setThinkingBlock: (b) => { + currentThinkingBlock = b; + }, + setToolCall: (t) => { + currentToolCall = t; + }, + }; + + h2Request.on("data", (chunk: Buffer) => { + pendingBuffer = Buffer.concat([pendingBuffer, chunk]); + + while (pendingBuffer.length >= 5) { + const flags = pendingBuffer[0]; + const msgLen = pendingBuffer.readUInt32BE(1); + if (pendingBuffer.length < 5 + msgLen) break; + + const messageBytes = pendingBuffer.subarray(5, 5 + msgLen); + pendingBuffer = pendingBuffer.subarray(5 + msgLen); + + if (flags & CONNECT_END_STREAM_FLAG) { + const endError = parseConnectEndStream(messageBytes); + if (endError) { + endStreamError = endError; + h2Request?.close(); + } + continue; + } + + try { + const serverMessage = fromBinary(AgentServerMessageSchema, messageBytes); + void handleServerMessage( + serverMessage, + output, + stream, + state, + blobStore, + h2Request!, + options?.execHandlers, + options?.onToolResult, + usageState, + requestContextTools, + ).catch((error) => { + logCursorDebug(`[CURSOR] Failed to handle server message: ${String(error)}`); + }); + } catch (e) { + logCursorDebug(`[CURSOR] Failed to parse server message: ${String(e)}`); + } + } + }); + + h2Request.write(frameConnectMessage(requestBytes)); + + const sendHeartbeat = () => { + if (!h2Request || h2Request.closed) { + return; + } + const heartbeatMessage = create(AgentClientMessageSchema, { + message: { case: "clientHeartbeat", value: create(ClientHeartbeatSchema, {}) }, + }); + const heartbeatBytes = toBinary(AgentClientMessageSchema, heartbeatMessage); + h2Request.write(frameConnectMessage(heartbeatBytes)); + }; + + heartbeatTimer = setInterval(sendHeartbeat, 5000); + + await new Promise((resolve, reject) => { + h2Request!.on("trailers", (trailers) => { + const status = trailers["grpc-status"]; + const msg = trailers["grpc-message"]; + if (status && status !== "0") { + reject(new Error(`gRPC error ${status}: ${decodeURIComponent(String(msg || ""))}`)); + } + }); + + h2Request!.on("end", () => { + if (endStreamError) { + reject(endStreamError); + return; + } + resolve(); + }); + + h2Request!.on("error", reject); + + if (options?.signal) { + options.signal.addEventListener("abort", () => { + h2Request?.close(); + reject(new Error("Request was aborted")); + }); + } + }); + + if (state.currentTextBlock) { + const idx = output.content.indexOf(state.currentTextBlock); + stream.push({ + type: "text_end", + contentIndex: idx, + content: state.currentTextBlock.text, + partial: output, + }); + } + if (state.currentThinkingBlock) { + const idx = output.content.indexOf(state.currentThinkingBlock); + stream.push({ + type: "thinking_end", + contentIndex: idx, + content: state.currentThinkingBlock.thinking, + partial: output, + }); + } + if (state.currentToolCall) { + const idx = output.content.indexOf(state.currentToolCall); + state.currentToolCall.arguments = parseStreamingJson(state.currentToolCall.partialJson); + delete (state.currentToolCall as any).partialJson; + delete (state.currentToolCall as any).index; + stream.push({ + type: "toolcall_end", + contentIndex: idx, + toolCall: state.currentToolCall, + partial: output, + }); + } + + calculateCost(model, output.usage); + + stream.push({ + type: "done", + reason: output.stopReason as "stop" | "length" | "toolUse", + message: output, + }); + stream.end(); + } catch (error) { + output.stopReason = options?.signal?.aborted ? "aborted" : "error"; + output.errorMessage = formatErrorMessageWithRetryAfter(error); + stream.push({ type: "error", reason: output.stopReason, error: output }); + stream.end(); + } finally { + if (heartbeatTimer) { + clearInterval(heartbeatTimer); + heartbeatTimer = null; + } + h2Request?.close(); + h2Client?.close(); + } + })(); + + return stream; +}; + +interface BlockState { + currentTextBlock: (TextContent & { index: number }) | null; + currentThinkingBlock: (ThinkingContent & { index: number }) | null; + currentToolCall: (ToolCall & { index: number; partialJson: string }) | null; + setTextBlock: (b: (TextContent & { index: number }) | null) => void; + setThinkingBlock: (b: (ThinkingContent & { index: number }) | null) => void; + setToolCall: (t: (ToolCall & { index: number; partialJson: string }) | null) => void; +} + +interface UsageState { + sawTokenDelta: boolean; +} + +async function handleServerMessage( + msg: AgentServerMessage, + output: AssistantMessage, + stream: AssistantMessageEventStream, + state: BlockState, + blobStore: Map, + h2Request: http2.ClientHttp2Stream, + execHandlers: CursorExecHandlers | undefined, + onToolResult: CursorToolResultHandler | undefined, + usageState: UsageState, + requestContextTools: McpToolDefinition[], +): Promise { + const msgCase = msg.message.case; + + if (process.env.DEBUG_CURSOR) { + const detail = + process.env.DEBUG_CURSOR === "2" + ? ` ${JSON.stringify(msg.message.value, debugReplacer, 2)?.slice(0, 2000)}` + : ""; + logCursorDebug(`[CURSOR] Server message: ${msgCase}${detail}`); + } + + if (msgCase === "interactionUpdate") { + processInteractionUpdate(msg.message.value, output, stream, state, usageState); + } else if (msgCase === "kvServerMessage") { + handleKvServerMessage(msg.message.value as KvServerMessage, blobStore, h2Request); + } else if (msgCase === "execServerMessage") { + await handleExecServerMessage( + msg.message.value as ExecServerMessage, + h2Request, + execHandlers, + onToolResult, + requestContextTools, + ); + } else if (msgCase === "conversationCheckpointUpdate") { + handleConversationCheckpointUpdate(msg.message.value, output, usageState); + } +} + +function handleKvServerMessage( + kvMsg: KvServerMessage, + blobStore: Map, + h2Request: http2.ClientHttp2Stream, +): void { + const kvCase = kvMsg.message.case; + + if (kvCase === "getBlobArgs") { + const blobId = kvMsg.message.value.blobId; + const blobIdKey = Buffer.from(blobId).toString("hex"); + + const blobData = blobStore.get(blobIdKey); + + const response = create(KvClientMessageSchema, { + id: kvMsg.id, + message: { + case: "getBlobResult", + value: create(GetBlobResultSchema, blobData ? { blobData } : {}), + }, + }); + + const kvClientMessage = create(AgentClientMessageSchema, { + message: { case: "kvClientMessage", value: response }, + }); + + const responseBytes = toBinary(AgentClientMessageSchema, kvClientMessage); + h2Request.write(frameConnectMessage(responseBytes)); + + if (process.env.DEBUG_CURSOR) { + logCursorDebug(`[CURSOR] Sent KV blob response for id: ${blobIdKey.slice(0, 40)}`); + } + } else if (kvCase === "setBlobArgs") { + const { blobId, blobData } = kvMsg.message.value; + const blobIdKey = Buffer.from(blobId).toString("hex"); + blobStore.set(blobIdKey, blobData); + + const response = create(KvClientMessageSchema, { + id: kvMsg.id, + message: { + case: "setBlobResult", + value: create(SetBlobResultSchema, {}), + }, + }); + + const kvClientMessage = create(AgentClientMessageSchema, { + message: { case: "kvClientMessage", value: response }, + }); + + const responseBytes = toBinary(AgentClientMessageSchema, kvClientMessage); + h2Request.write(frameConnectMessage(responseBytes)); + + if (process.env.DEBUG_CURSOR) { + logCursorDebug(`[CURSOR] Stored KV blob: ${blobIdKey.slice(0, 40)}`); + } + } +} + +async function handleExecServerMessage( + execMsg: ExecServerMessage, + h2Request: http2.ClientHttp2Stream, + execHandlers: CursorExecHandlers | undefined, + onToolResult: CursorToolResultHandler | undefined, + requestContextTools: McpToolDefinition[], +): Promise { + const execCase = execMsg.message.case; + if (execCase === "requestContextArgs") { + const requestContext = create(RequestContextSchema, { + rules: [], + repositoryInfo: [], + tools: requestContextTools, + gitRepos: [], + projectLayouts: [], + mcpInstructions: [], + fileContents: {}, + customSubagents: [], + }); + + const requestContextResult = create(RequestContextResultSchema, { + result: { + case: "success", + value: create(RequestContextSuccessSchema, { requestContext }), + }, + }); + + sendExecClientMessage(h2Request, execMsg, "requestContextResult", requestContextResult); + + if (process.env.DEBUG_CURSOR) { + logCursorDebug("[CURSOR] Sent request context response"); + } + return; + } + + if (!execCase) { + return; + } + + switch (execCase) { + case "readArgs": { + const args = execMsg.message.value; + const { execResult } = await resolveExecHandler( + args, + execHandlers?.read, + onToolResult, + (toolResult) => buildReadResultFromToolResult(args.path, toolResult), + (reason) => buildReadRejectedResult(args.path, reason), + (error) => buildReadErrorResult(args.path, error), + ); + sendExecClientMessage(h2Request, execMsg, "readResult", execResult); + return; + } + case "lsArgs": { + const args = execMsg.message.value; + const { execResult } = await resolveExecHandler( + args, + execHandlers?.ls, + onToolResult, + (toolResult) => buildLsResultFromToolResult(args.path, toolResult), + (reason) => buildLsRejectedResult(args.path, reason), + (error) => buildLsErrorResult(args.path, error), + ); + sendExecClientMessage(h2Request, execMsg, "lsResult", execResult); + return; + } + case "grepArgs": { + const args = execMsg.message.value; + const { execResult } = await resolveExecHandler( + args, + execHandlers?.grep, + onToolResult, + (toolResult) => buildGrepResultFromToolResult(args, toolResult), + (reason) => buildGrepErrorResult(reason), + (error) => buildGrepErrorResult(error), + ); + sendExecClientMessage(h2Request, execMsg, "grepResult", execResult); + return; + } + case "writeArgs": { + const args = execMsg.message.value; + const { execResult } = await resolveExecHandler( + args, + execHandlers?.write, + onToolResult, + (toolResult) => + buildWriteResultFromToolResult( + { + path: args.path, + fileText: args.fileText, + fileBytes: args.fileBytes, + returnFileContentAfterWrite: args.returnFileContentAfterWrite, + }, + toolResult, + ), + (reason) => buildWriteRejectedResult(args.path, reason), + (error) => buildWriteErrorResult(args.path, error), + ); + sendExecClientMessage(h2Request, execMsg, "writeResult", execResult); + return; + } + case "deleteArgs": { + const args = execMsg.message.value; + const { execResult } = await resolveExecHandler( + args, + execHandlers?.delete, + onToolResult, + (toolResult) => buildDeleteResultFromToolResult(args.path, toolResult), + (reason) => buildDeleteRejectedResult(args.path, reason), + (error) => buildDeleteErrorResult(args.path, error), + ); + sendExecClientMessage(h2Request, execMsg, "deleteResult", execResult); + return; + } + case "shellArgs": { + const args = execMsg.message.value; + const { execResult } = await resolveExecHandler( + args, + execHandlers?.shell, + onToolResult, + (toolResult) => buildShellResultFromToolResult(args, toolResult), + (reason) => buildShellRejectedResult(args.command, args.workingDirectory, reason), + (error) => buildShellFailureResult(args.command, args.workingDirectory, error), + ); + sendExecClientMessage(h2Request, execMsg, "shellResult", execResult); + return; + } + case "shellStreamArgs": { + const args = execMsg.message.value; + const execResult = buildShellRejectedResult(args.command, args.workingDirectory, "Not implemented"); + sendExecClientMessage(h2Request, execMsg, "shellResult", execResult); + return; + } + case "backgroundShellSpawnArgs": { + const args = execMsg.message.value; + const execResult = create(BackgroundShellSpawnResultSchema, { + result: { + case: "rejected", + value: create(ShellRejectedSchema, { + command: args.command, + workingDirectory: args.workingDirectory, + reason: "Not implemented", + isReadonly: false, + }), + }, + }); + sendExecClientMessage(h2Request, execMsg, "backgroundShellSpawnResult", execResult); + return; + } + case "writeShellStdinArgs": { + const execResult = create(WriteShellStdinResultSchema, { + result: { + case: "error", + value: create(WriteShellStdinErrorSchema, { + error: "Not implemented", + }), + }, + }); + sendExecClientMessage(h2Request, execMsg, "writeShellStdinResult", execResult); + return; + } + case "fetchArgs": { + const args = execMsg.message.value; + const execResult = create(FetchResultSchema, { + result: { + case: "error", + value: create(FetchErrorSchema, { + url: args.url, + error: "Not implemented", + }), + }, + }); + sendExecClientMessage(h2Request, execMsg, "fetchResult", execResult); + return; + } + case "diagnosticsArgs": { + const args = execMsg.message.value; + const { execResult } = await resolveExecHandler( + args, + execHandlers?.diagnostics, + onToolResult, + (toolResult) => buildDiagnosticsResultFromToolResult(args.path, toolResult), + (reason) => buildDiagnosticsRejectedResult(args.path, reason), + (error) => buildDiagnosticsErrorResult(args.path, error), + ); + sendExecClientMessage(h2Request, execMsg, "diagnosticsResult", execResult); + return; + } + case "mcpArgs": { + const args = execMsg.message.value; + const mcpCall = decodeMcpCall(args); + const { execResult } = await resolveExecHandler( + mcpCall, + execHandlers?.mcp, + onToolResult, + (toolResult) => buildMcpResultFromToolResult(mcpCall, toolResult), + (_reason) => buildMcpToolNotFoundResult(mcpCall), + (error) => buildMcpErrorResult(error), + ); + sendExecClientMessage(h2Request, execMsg, "mcpResult", execResult); + return; + } + default: + if (process.env.DEBUG_CURSOR) { + logCursorDebug(`[CURSOR] Unhandled exec message: ${execCase}`); + } + } +} + +function sendExecClientMessage( + h2Request: http2.ClientHttp2Stream, + execMsg: ExecServerMessage, + messageCase: ExecClientMessage["message"]["case"], + value: T, +): void { + const execClientMessage = create(ExecClientMessageSchema, { + id: execMsg.id, + execId: execMsg.execId, + message: { + case: messageCase, + value: value as any, + }, + }); + + const clientMessage = create(AgentClientMessageSchema, { + message: { case: "execClientMessage", value: execClientMessage }, + }); + + const responseBytes = toBinary(AgentClientMessageSchema, clientMessage); + h2Request.write(frameConnectMessage(responseBytes)); + + if (process.env.DEBUG_CURSOR) { + const detail = + process.env.DEBUG_CURSOR === "2" ? ` ${JSON.stringify(value, debugReplacer, 2)?.slice(0, 2000)}` : ""; + logCursorDebug(`[CURSOR] Sent exec client message: ${messageCase}${detail}`); + } +} + +async function resolveExecHandler( + args: TArgs, + handler: ((args: TArgs) => Promise>) | undefined, + onToolResult: CursorToolResultHandler | undefined, + buildFromToolResult: (toolResult: ToolResultMessage) => TResult, + buildRejected: (reason: string) => TResult, + buildError: (error: string) => TResult, +): Promise<{ execResult: TResult; toolResult?: ToolResultMessage }> { + if (!handler) { + return { execResult: buildRejected("Tool not available") }; + } + + try { + const handlerResult = await handler(args); + const { execResult, toolResult } = splitExecHandlerResult(handlerResult); + const finalToolResult = await applyToolResultHandler(toolResult, onToolResult); + + if (execResult) { + return { execResult, toolResult: finalToolResult }; + } + if (finalToolResult) { + return { execResult: buildFromToolResult(finalToolResult), toolResult: finalToolResult }; + } + return { execResult: buildRejected("Tool returned no result") }; + } catch (error) { + const message = error instanceof Error ? error.message : String(error); + return { execResult: buildError(message) }; + } +} + +function splitExecHandlerResult(result: CursorExecHandlerResult): { + execResult?: TResult; + toolResult?: ToolResultMessage; +} { + if (isToolResultMessage(result)) { + return { toolResult: result }; + } + if (result && typeof result === "object") { + const record = result as Record; + if ("execResult" in record) { + const { execResult, toolResult } = record as { + execResult: TResult; + toolResult?: ToolResultMessage; + }; + return { execResult, toolResult }; + } + if ("toolResult" in record && !isToolResultMessage(record)) { + const { result: execResult, toolResult } = record as { + result?: TResult; + toolResult?: ToolResultMessage; + }; + return { execResult, toolResult }; + } + if ("result" in record && !("$typeName" in record)) { + const { result: execResult, toolResult } = record as { + result: TResult; + toolResult?: ToolResultMessage; + }; + return { execResult, toolResult }; + } + } + return { execResult: result as TResult }; +} + +function isToolResultMessage(value: unknown): value is ToolResultMessage { + return !!value && typeof value === "object" && (value as ToolResultMessage).role === "toolResult"; +} + +async function applyToolResultHandler( + toolResult: ToolResultMessage | undefined, + onToolResult: CursorToolResultHandler | undefined, +): Promise { + if (!toolResult || !onToolResult) { + return toolResult; + } + const updated = await onToolResult(toolResult); + return updated ?? toolResult; +} + +function toolResultToText(toolResult: ToolResultMessage): string { + return toolResult.content.map((item) => (item.type === "text" ? item.text : `[${item.mimeType} image]`)).join("\n"); +} + +function toolResultWasTruncated(toolResult: ToolResultMessage): boolean { + if (!toolResult.details || typeof toolResult.details !== "object") { + return false; + } + const truncation = (toolResult.details as { truncation?: { truncated?: boolean } }).truncation; + return !!truncation?.truncated; +} + +function toolResultDetailBoolean(toolResult: ToolResultMessage, key: string): boolean { + if (!toolResult.details || typeof toolResult.details !== "object") { + return false; + } + const value = (toolResult.details as Record)[key]; + return typeof value === "boolean" ? value : false; +} + +function buildReadResultFromToolResult(path: string, toolResult: ToolResultMessage) { + const text = toolResultToText(toolResult); + if (toolResult.isError) { + return buildReadErrorResult(path, text || "Read failed"); + } + const totalLines = text ? text.split("\n").length : 0; + return create(ReadResultSchema, { + result: { + case: "success", + value: create(ReadSuccessSchema, { + path, + totalLines, + fileSize: BigInt(Buffer.byteLength(text, "utf-8")), + truncated: toolResultWasTruncated(toolResult), + output: { case: "content", value: text }, + }), + }, + }); +} + +function buildReadErrorResult(path: string, error: string) { + return create(ReadResultSchema, { + result: { + case: "error", + value: create(ReadErrorSchema, { path, error }), + }, + }); +} + +function buildReadRejectedResult(path: string, reason: string) { + return create(ReadResultSchema, { + result: { + case: "rejected", + value: create(ReadRejectedSchema, { path, reason }), + }, + }); +} + +function buildWriteResultFromToolResult( + args: { path: string; fileText?: string; fileBytes?: Uint8Array; returnFileContentAfterWrite?: boolean }, + toolResult: ToolResultMessage, +) { + const text = toolResultToText(toolResult); + if (toolResult.isError) { + return buildWriteErrorResult(args.path, text || "Write failed"); + } + const fileText = args.fileText ?? ""; + const fileSize = args.fileBytes?.length ?? Buffer.byteLength(fileText, "utf-8"); + const linesCreated = fileText ? fileText.split("\n").length : 0; + return create(WriteResultSchema, { + result: { + case: "success", + value: create(WriteSuccessSchema, { + path: args.path, + linesCreated, + fileSize, + fileContentAfterWrite: args.returnFileContentAfterWrite ? fileText : undefined, + }), + }, + }); +} + +function buildWriteErrorResult(path: string, error: string) { + return create(WriteResultSchema, { + result: { + case: "error", + value: create(WriteErrorSchema, { path, error }), + }, + }); +} + +function buildWriteRejectedResult(path: string, reason: string) { + return create(WriteResultSchema, { + result: { + case: "rejected", + value: create(WriteRejectedSchema, { path, reason }), + }, + }); +} + +function buildDeleteResultFromToolResult(path: string, toolResult: ToolResultMessage) { + const text = toolResultToText(toolResult); + if (toolResult.isError) { + return buildDeleteErrorResult(path, text || "Delete failed"); + } + return create(DeleteResultSchema, { + result: { + case: "success", + value: create(DeleteSuccessSchema, { + path, + deletedFile: path, + fileSize: BigInt(0), + prevContent: "", + }), + }, + }); +} + +function buildDeleteErrorResult(path: string, error: string) { + return create(DeleteResultSchema, { + result: { + case: "error", + value: create(DeleteErrorSchema, { path, error }), + }, + }); +} + +function buildDeleteRejectedResult(path: string, reason: string) { + return create(DeleteResultSchema, { + result: { + case: "rejected", + value: create(DeleteRejectedSchema, { path, reason }), + }, + }); +} + +function buildShellResultFromToolResult( + args: { command: string; workingDirectory: string }, + toolResult: ToolResultMessage, +) { + const output = toolResultToText(toolResult); + if (toolResult.isError) { + return buildShellFailureResult(args.command, args.workingDirectory, output || "Shell failed"); + } + return create(ShellResultSchema, { + result: { + case: "success", + value: create(ShellSuccessSchema, { + command: args.command, + workingDirectory: args.workingDirectory, + exitCode: 0, + signal: "", + stdout: output, + stderr: "", + executionTime: 0, + }), + }, + }); +} + +function buildShellFailureResult(command: string, workingDirectory: string, error: string) { + return create(ShellResultSchema, { + result: { + case: "failure", + value: create(ShellFailureSchema, { + command, + workingDirectory, + exitCode: 1, + signal: "", + stdout: "", + stderr: error, + executionTime: 0, + aborted: false, + }), + }, + }); +} + +function buildShellRejectedResult(command: string, workingDirectory: string, reason: string) { + return create(ShellResultSchema, { + result: { + case: "rejected", + value: create(ShellRejectedSchema, { + command, + workingDirectory, + reason, + isReadonly: false, + }), + }, + }); +} + +function buildLsResultFromToolResult(path: string, toolResult: ToolResultMessage) { + const text = toolResultToText(toolResult); + if (toolResult.isError) { + return buildLsErrorResult(path, text || "Ls failed"); + } + const rootPath = path || "."; + const entries = text + .split("\n") + .map((line) => line.trim()) + .filter((line) => line.length > 0 && !line.startsWith("[")); + const childrenDirs: LsDirectoryTreeNode[] = []; + const childrenFiles: LsDirectoryTreeNode_File[] = []; + + for (const entry of entries) { + const name = entry.split(" (")[0]; + if (name.endsWith("/")) { + const dirName = name.slice(0, -1); + childrenDirs.push( + create(LsDirectoryTreeNodeSchema, { + absPath: `${rootPath.replace(/\/$/, "")}/${dirName}`, + childrenDirs: [], + childrenFiles: [], + childrenWereProcessed: false, + fullSubtreeExtensionCounts: {}, + numFiles: 0, + }), + ); + } else { + childrenFiles.push(create(LsDirectoryTreeNode_FileSchema, { name })); + } + } + + const root = create(LsDirectoryTreeNodeSchema, { + absPath: rootPath, + childrenDirs, + childrenFiles, + childrenWereProcessed: true, + fullSubtreeExtensionCounts: {}, + numFiles: childrenFiles.length, + }); + + return create(LsResultSchema, { + result: { + case: "success", + value: create(LsSuccessSchema, { directoryTreeRoot: root }), + }, + }); +} + +function buildLsErrorResult(path: string, error: string) { + return create(LsResultSchema, { + result: { + case: "error", + value: create(LsErrorSchema, { path, error }), + }, + }); +} + +function buildLsRejectedResult(path: string, reason: string) { + return create(LsResultSchema, { + result: { + case: "rejected", + value: create(LsRejectedSchema, { path, reason }), + }, + }); +} + +function buildGrepResultFromToolResult( + args: { pattern: string; path?: string; outputMode?: string }, + toolResult: ToolResultMessage, +) { + const text = toolResultToText(toolResult); + if (toolResult.isError) { + return buildGrepErrorResult(text || "Grep failed"); + } + + const outputMode = args.outputMode || "content"; + const clientTruncated = toolResultDetailBoolean(toolResult, "truncated"); + const lines = text + .split("\n") + .map((line) => line.trimEnd()) + .filter((line) => line.length > 0 && !line.startsWith("[") && !line.toLowerCase().startsWith("no matches")); + + const workspaceKey = args.path || "."; + let unionResult: GrepUnionResult; + + if (outputMode === "files_with_matches") { + const files = lines; + unionResult = create(GrepUnionResultSchema, { + result: { + case: "files", + value: create(GrepFilesResultSchema, { + files, + totalFiles: files.length, + clientTruncated, + ripgrepTruncated: false, + }), + }, + }); + } else if (outputMode === "count") { + const counts = lines + .map((line) => { + const separatorIndex = line.lastIndexOf(":"); + if (separatorIndex === -1) { + return null; + } + const file = line.slice(0, separatorIndex); + const count = Number.parseInt(line.slice(separatorIndex + 1), 10); + if (!file || Number.isNaN(count)) { + return null; + } + return create(GrepFileCountSchema, { file, count }); + }) + .filter((entry): entry is GrepFileCount => entry !== null); + const totalMatches = counts.reduce((sum, entry) => sum + entry.count, 0); + unionResult = create(GrepUnionResultSchema, { + result: { + case: "count", + value: create(GrepCountResultSchema, { + counts, + totalFiles: counts.length, + totalMatches, + clientTruncated, + ripgrepTruncated: false, + }), + }, + }); + } else { + const matchMap = new Map>(); + let totalMatchedLines = 0; + + for (const line of lines) { + const matchLine = line.match(/^(.+?):(\d+):\s?(.*)$/); + const contextLine = line.match(/^(.+?)-(\d+)-\s?(.*)$/); + const match = matchLine ?? contextLine; + if (!match) { + continue; + } + const [, file, lineNumber, content] = match; + const isContextLine = Boolean(contextLine); + const list = matchMap.get(file) ?? []; + list.push({ line: Number(lineNumber), content, isContextLine }); + matchMap.set(file, list); + if (!isContextLine) { + totalMatchedLines += 1; + } + } + + const matches = Array.from(matchMap.entries()).map(([file, matches]) => + create(GrepFileMatchSchema, { + file, + matches: matches.map((entry) => + create(GrepContentMatchSchema, { + lineNumber: entry.line, + content: entry.content, + contentTruncated: false, + isContextLine: entry.isContextLine, + }), + ), + }), + ); + const totalLines = matches.reduce((sum, entry) => sum + entry.matches.length, 0); + unionResult = create(GrepUnionResultSchema, { + result: { + case: "content", + value: create(GrepContentResultSchema, { + matches, + totalLines, + totalMatchedLines, + clientTruncated, + ripgrepTruncated: false, + }), + }, + }); + } + + return create(GrepResultSchema, { + result: { + case: "success", + value: create(GrepSuccessSchema, { + pattern: args.pattern, + path: args.path || "", + outputMode, + workspaceResults: { [workspaceKey]: unionResult }, + }), + }, + }); +} + +function buildGrepErrorResult(error: string) { + return create(GrepResultSchema, { + result: { + case: "error", + value: create(GrepErrorSchema, { error }), + }, + }); +} + +function buildDiagnosticsResultFromToolResult(path: string, toolResult: ToolResultMessage) { + const text = toolResultToText(toolResult); + if (toolResult.isError) { + return buildDiagnosticsErrorResult(path, text || "Diagnostics failed"); + } + return create(DiagnosticsResultSchema, { + result: { + case: "success", + value: create(DiagnosticsSuccessSchema, { + path, + diagnostics: [], + totalDiagnostics: 0, + }), + }, + }); +} + +function buildDiagnosticsErrorResult(_path: string, error: string) { + return create(DiagnosticsResultSchema, { + result: { + case: "error", + value: create(DiagnosticsErrorSchema, { error }), + }, + }); +} + +function buildDiagnosticsRejectedResult(path: string, reason: string) { + return create(DiagnosticsResultSchema, { + result: { + case: "rejected", + value: create(DiagnosticsRejectedSchema, { path, reason }), + }, + }); +} + +function decodeMcpCall(args: { + name: string; + args: Record; + toolCallId: string; + providerIdentifier: string; + toolName: string; +}): CursorMcpCall { + const decodedArgs: Record = {}; + for (const [key, value] of Object.entries(args.args ?? {})) { + const text = new TextDecoder().decode(value); + try { + decodedArgs[key] = JSON.parse(text); + } catch { + decodedArgs[key] = text; + } + } + return { + name: args.name, + providerIdentifier: args.providerIdentifier, + toolName: args.toolName || args.name, + toolCallId: args.toolCallId, + args: decodedArgs, + rawArgs: args.args ?? {}, + }; +} + +function buildMcpResultFromToolResult(_mcpCall: CursorMcpCall, toolResult: ToolResultMessage) { + if (toolResult.isError) { + return buildMcpErrorResult(toolResultToText(toolResult) || "MCP tool failed"); + } + const content = toolResult.content.map((item) => { + if (item.type === "image") { + return create(McpToolResultContentItemSchema, { + content: { + case: "image", + value: create(McpImageContentSchema, { + data: Uint8Array.from(Buffer.from(item.data, "base64")), + mimeType: item.mimeType, + }), + }, + }); + } + return create(McpToolResultContentItemSchema, { + content: { + case: "text", + value: create(McpTextContentSchema, { text: item.text }), + }, + }); + }); + + return create(McpResultSchema, { + result: { + case: "success", + value: create(McpSuccessSchema, { + content, + isError: false, + }), + }, + }); +} + +function buildMcpToolNotFoundResult(mcpCall: CursorMcpCall) { + return create(McpResultSchema, { + result: { + case: "toolNotFound", + value: create(McpToolNotFoundSchema, { name: mcpCall.toolName, availableTools: [] }), + }, + }); +} + +function buildMcpErrorResult(error: string) { + return create(McpResultSchema, { + result: { + case: "error", + value: create(McpErrorSchema, { error }), + }, + }); +} + +function processInteractionUpdate( + update: any, + output: AssistantMessage, + stream: AssistantMessageEventStream, + state: BlockState, + usageState: UsageState, +): void { + const updateCase = update.message?.case; + + if (process.env.DEBUG_CURSOR) { + const detail = + process.env.DEBUG_CURSOR === "2" + ? ` ${JSON.stringify(update.message?.value, debugReplacer, 2)?.slice(0, 1000)}` + : ""; + logCursorDebug(`[CURSOR] Interaction update: ${updateCase}${detail}`); + } + + if (updateCase === "textDelta") { + const delta = update.message.value.text || ""; + if (!state.currentTextBlock) { + const block: TextContent & { index: number } = { + type: "text", + text: "", + index: output.content.length, + }; + output.content.push(block); + state.setTextBlock(block); + stream.push({ type: "text_start", contentIndex: output.content.length - 1, partial: output }); + } + state.currentTextBlock!.text += delta; + const idx = output.content.indexOf(state.currentTextBlock!); + stream.push({ type: "text_delta", contentIndex: idx, delta, partial: output }); + } else if (updateCase === "thinkingDelta") { + const delta = update.message.value.text || ""; + if (!state.currentThinkingBlock) { + const block: ThinkingContent & { index: number } = { + type: "thinking", + thinking: "", + index: output.content.length, + }; + output.content.push(block); + state.setThinkingBlock(block); + stream.push({ type: "thinking_start", contentIndex: output.content.length - 1, partial: output }); + } + state.currentThinkingBlock!.thinking += delta; + const idx = output.content.indexOf(state.currentThinkingBlock!); + stream.push({ type: "thinking_delta", contentIndex: idx, delta, partial: output }); + } else if (updateCase === "thinkingCompleted") { + if (state.currentThinkingBlock) { + const idx = output.content.indexOf(state.currentThinkingBlock); + delete (state.currentThinkingBlock as any).index; + stream.push({ + type: "thinking_end", + contentIndex: idx, + content: state.currentThinkingBlock.thinking, + partial: output, + }); + state.setThinkingBlock(null); + } + } else if (updateCase === "toolCallStarted") { + const toolCall = update.message.value.toolCall; + if (toolCall) { + const mcpCall = toolCall.mcpToolCall; + if (mcpCall) { + const args = mcpCall.args || {}; + const block: ToolCall & { index: number; partialJson: string } = { + type: "toolCall", + id: args.toolCallId || crypto.randomUUID(), + name: args.name || args.toolName || "", + arguments: {}, + index: output.content.length, + partialJson: "", + }; + output.content.push(block); + state.setToolCall(block); + stream.push({ type: "toolcall_start", contentIndex: output.content.length - 1, partial: output }); + } + } + } else if (updateCase === "toolCallDelta" || updateCase === "partialToolCall") { + if (state.currentToolCall) { + const delta = update.message.value.argsTextDelta || ""; + state.currentToolCall.partialJson += delta; + state.currentToolCall.arguments = parseStreamingJson(state.currentToolCall.partialJson); + const idx = output.content.indexOf(state.currentToolCall); + stream.push({ type: "toolcall_delta", contentIndex: idx, delta, partial: output }); + } + } else if (updateCase === "toolCallCompleted") { + if (state.currentToolCall) { + const toolCall = update.message.value.toolCall; + if (toolCall?.mcpToolCall?.args?.args) { + state.currentToolCall.arguments = toolCall.mcpToolCall.args.args; + } + const idx = output.content.indexOf(state.currentToolCall); + delete (state.currentToolCall as any).partialJson; + delete (state.currentToolCall as any).index; + stream.push({ type: "toolcall_end", contentIndex: idx, toolCall: state.currentToolCall, partial: output }); + state.setToolCall(null); + } + } else if (updateCase === "turnEnded") { + output.stopReason = "stop"; + } else if (updateCase === "tokenDelta") { + const tokenDelta = update.message.value; + usageState.sawTokenDelta = true; + output.usage.output += tokenDelta.tokens || 0; + output.usage.totalTokens = output.usage.input + output.usage.output; + } +} + +function handleConversationCheckpointUpdate( + checkpoint: { tokenDetails?: { usedTokens?: number } }, + output: AssistantMessage, + usageState: UsageState, +): void { + if (usageState.sawTokenDelta) { + return; + } + const usedTokens = checkpoint.tokenDetails?.usedTokens ?? 0; + if (usedTokens <= 0) { + return; + } + if (output.usage.output !== usedTokens) { + output.usage.output = usedTokens; + output.usage.totalTokens = output.usage.input + output.usage.output; + } +} + +function createBlobId(data: Uint8Array): Uint8Array { + return new Uint8Array(createHash("sha256").update(data).digest()); +} + +function buildMcpToolDefinitions(tools: Tool[] | undefined): McpToolDefinition[] { + if (!tools || tools.length === 0) { + return []; + } + + const mcpTools = tools.filter((tool) => tool.name.startsWith("mcp_")); + if (mcpTools.length === 0) { + return []; + } + + return mcpTools.map((tool) => { + const jsonSchema = tool.parameters as any; + return create(McpToolDefinitionSchema, { + name: tool.name, + description: tool.description, + providerIdentifier: "pi-agent", + toolName: tool.name, + inputSchema: new TextEncoder().encode( + JSON.stringify({ + type: "object", + properties: jsonSchema.properties || {}, + required: jsonSchema.required || [], + }), + ), + }); + }); +} + +function buildGrpcRequest( + model: Model<"cursor-agent">, + context: Context, + options?: CursorOptions, +): { requestBytes: Uint8Array; blobStore: Map } { + const blobStore = new Map(); + + const systemPromptJson = JSON.stringify({ + role: "system", + content: context.systemPrompt || "You are a helpful assistant.", + }); + const systemPromptBytes = new TextEncoder().encode(systemPromptJson); + const systemPromptId = createBlobId(systemPromptBytes); + blobStore.set(Buffer.from(systemPromptId).toString("hex"), systemPromptBytes); + + const lastMessage = context.messages[context.messages.length - 1]; + const userText = + lastMessage?.role === "user" + ? typeof lastMessage.content === "string" + ? lastMessage.content + : extractText(lastMessage.content) + : ""; + + const userMessage = create(UserMessageSchema, { + text: userText, + messageId: crypto.randomUUID(), + }); + + const action = create(ConversationActionSchema, { + action: { + case: "userMessageAction", + value: create(UserMessageActionSchema, { userMessage }), + }, + }); + + const conversationState = create(ConversationStateStructureSchema, { + rootPromptMessagesJson: [systemPromptId], + turns: [], + }); + + const modelDetails = create(ModelDetailsSchema, { + modelId: model.id, + displayModelId: model.id, + displayName: model.name, + }); + + const runRequest = create(AgentRunRequestSchema, { + conversationState, + action, + modelDetails, + conversationId: options?.conversationId || crypto.randomUUID(), + }); + + // Tools are sent later via requestContext (exec handshake) + + if (options?.customSystemPrompt) { + runRequest.customSystemPrompt = options.customSystemPrompt; + } + + const clientMessage = create(AgentClientMessageSchema, { + message: { case: "runRequest", value: runRequest }, + }); + + const requestBytes = toBinary(AgentClientMessageSchema, clientMessage); + + if (process.env.DEBUG_CURSOR) { + const toolNames = context.tools?.map((tool) => tool.name) ?? []; + const detail = + process.env.DEBUG_CURSOR === "2" + ? ` ${JSON.stringify(clientMessage.message.value, debugReplacer, 2)?.slice(0, 2000)}` + : ""; + logCursorDebug( + `[CURSOR] Built runRequest: bytes=${requestBytes.length} tools=${toolNames.length} names=${toolNames.slice(0, 20).join(",")}${detail}`, + ); + } + + return { requestBytes, blobStore }; +} + +function extractText(content: (TextContent | ImageContent)[]): string { + return content + .filter((c): c is TextContent => c.type === "text") + .map((c) => c.text) + .join("\n"); +} diff --git a/packages/ai/src/providers/cursor/gen/agent_pb.ts b/packages/ai/src/providers/cursor/gen/agent_pb.ts new file mode 100644 index 000000000..050b61686 --- /dev/null +++ b/packages/ai/src/providers/cursor/gen/agent_pb.ts @@ -0,0 +1,15274 @@ +// @generated by protoc-gen-es v2.10.2 with parameter "target=ts" +// @generated from file agent.proto (package agent.v1, syntax proto3) +/* eslint-disable */ + +import type { Message } from "@bufbuild/protobuf"; +import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; +import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; + +/** + * Describes the file agent.proto. + */ +export const file_agent: GenFile = + /*@__PURE__*/ + fileDesc( + "CgthZ2VudC5wcm90bxIIYWdlbnQudjEicgoOR2xvYlRvb2xSZXN1bHQSLAoHc3VjY2VzcxgBIAEoCzIZLmFnZW50LnYxLkdsb2JUb29sU3VjY2Vzc0gAEigKBWVycm9yGAIgASgLMhcuYWdlbnQudjEuR2xvYlRvb2xFcnJvckgAQggKBnJlc3VsdCIeCg1HbG9iVG9vbEVycm9yEg0KBWVycm9yGAEgASgJIokBCg9HbG9iVG9vbFN1Y2Nlc3MSDwoHcGF0dGVybhgBIAEoCRIMCgRwYXRoGAIgASgJEg0KBWZpbGVzGAMgAygJEhMKC3RvdGFsX2ZpbGVzGAQgASgFEhgKEGNsaWVudF90cnVuY2F0ZWQYBSABKAgSGQoRcmlwZ3JlcF90cnVuY2F0ZWQYBiABKAgiRgoMR2xvYlRvb2xDYWxsEgwKBGFyZ3MYASABKAwSKAoGcmVzdWx0GAIgASgLMhguYWdlbnQudjEuR2xvYlRvb2xSZXN1bHQibQoRUmVhZExpbnRzVG9vbENhbGwSKQoEYXJncxgBIAEoCzIbLmFnZW50LnYxLlJlYWRMaW50c1Rvb2xBcmdzEi0KBnJlc3VsdBgCIAEoCzIdLmFnZW50LnYxLlJlYWRMaW50c1Rvb2xSZXN1bHQiIgoRUmVhZExpbnRzVG9vbEFyZ3MSDQoFcGF0aHMYASADKAkigQEKE1JlYWRMaW50c1Rvb2xSZXN1bHQSMQoHc3VjY2VzcxgBIAEoCzIeLmFnZ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v1.GlobToolResult + */ +export type GlobToolResult = Message<"agent.v1.GlobToolResult"> & { + /** + * @generated from oneof agent.v1.GlobToolResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.GlobToolSuccess success = 1; + */ + value: GlobToolSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.GlobToolError error = 2; + */ + value: GlobToolError; + case: "error"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.GlobToolResult. + * Use `create(GlobToolResultSchema)` to create a new message. + */ +export const GlobToolResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 0); + +/** + * @generated from message agent.v1.GlobToolError + */ +export type GlobToolError = Message<"agent.v1.GlobToolError"> & { + /** + * @generated from field: string error = 1; + */ + error: string; +}; + +/** + * Describes the message agent.v1.GlobToolError. + * Use `create(GlobToolErrorSchema)` to create a new message. + */ +export const GlobToolErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 1); + +/** + * Only file results are needed for this tool + * + * @generated from message agent.v1.GlobToolSuccess + */ +export type GlobToolSuccess = Message<"agent.v1.GlobToolSuccess"> & { + /** + * @generated from field: string pattern = 1; + */ + pattern: string; + + /** + * @generated from field: string path = 2; + */ + path: string; + + /** + * @generated from field: repeated string files = 3; + */ + files: string[]; + + /** + * @generated from field: int32 total_files = 4; + */ + totalFiles: number; + + /** + * @generated from field: bool client_truncated = 5; + */ + clientTruncated: boolean; + + /** + * @generated from field: bool ripgrep_truncated = 6; + */ + ripgrepTruncated: boolean; +}; + +/** + * Describes the message agent.v1.GlobToolSuccess. + * Use `create(GlobToolSuccessSchema)` to create a new message. + */ +export const GlobToolSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 2); + +/** + * @generated from message agent.v1.GlobToolCall + */ +export type GlobToolCall = Message<"agent.v1.GlobToolCall"> & { + /** + * @generated from field: bytes args = 1; + */ + args: Uint8Array; + + /** + * @generated from field: agent.v1.GlobToolResult result = 2; + */ + result?: GlobToolResult; +}; + +/** + * Describes the message agent.v1.GlobToolCall. + * Use `create(GlobToolCallSchema)` to create a new message. + */ +export const GlobToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 3); + +/** + * @generated from message agent.v1.ReadLintsToolCall + */ +export type ReadLintsToolCall = Message<"agent.v1.ReadLintsToolCall"> & { + /** + * @generated from field: agent.v1.ReadLintsToolArgs args = 1; + */ + args?: ReadLintsToolArgs; + + /** + * @generated from field: agent.v1.ReadLintsToolResult result = 2; + */ + result?: ReadLintsToolResult; +}; + +/** + * Describes the message agent.v1.ReadLintsToolCall. + * Use `create(ReadLintsToolCallSchema)` to create a new message. + */ +export const ReadLintsToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 4); + +/** + * @generated from message agent.v1.ReadLintsToolArgs + */ +export type ReadLintsToolArgs = Message<"agent.v1.ReadLintsToolArgs"> & { + /** + * @generated from field: repeated string paths = 1; + */ + paths: string[]; +}; + +/** + * Describes the message agent.v1.ReadLintsToolArgs. + * Use `create(ReadLintsToolArgsSchema)` to create a new message. + */ +export const ReadLintsToolArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 5); + +/** + * @generated from message agent.v1.ReadLintsToolResult + */ +export type ReadLintsToolResult = Message<"agent.v1.ReadLintsToolResult"> & { + /** + * @generated from oneof agent.v1.ReadLintsToolResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.ReadLintsToolSuccess success = 1; + */ + value: ReadLintsToolSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.ReadLintsToolError error = 2; + */ + value: ReadLintsToolError; + case: "error"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ReadLintsToolResult. + * Use `create(ReadLintsToolResultSchema)` to create a new message. + */ +export const ReadLintsToolResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 6); + +/** + * @generated from message agent.v1.ReadLintsToolSuccess + */ +export type ReadLintsToolSuccess = Message<"agent.v1.ReadLintsToolSuccess"> & { + /** + * @generated from field: repeated agent.v1.FileDiagnostics file_diagnostics = 1; + */ + fileDiagnostics: FileDiagnostics[]; + + /** + * @generated from field: int32 total_files = 2; + */ + totalFiles: number; + + /** + * @generated from field: int32 total_diagnostics = 3; + */ + totalDiagnostics: number; +}; + +/** + * Describes the message agent.v1.ReadLintsToolSuccess. + * Use `create(ReadLintsToolSuccessSchema)` to create a new message. + */ +export const ReadLintsToolSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 7); + +/** + * @generated from message agent.v1.FileDiagnostics + */ +export type FileDiagnostics = Message<"agent.v1.FileDiagnostics"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: repeated agent.v1.DiagnosticItem diagnostics = 2; + */ + diagnostics: DiagnosticItem[]; + + /** + * @generated from field: int32 diagnostics_count = 3; + */ + diagnosticsCount: number; +}; + +/** + * Describes the message agent.v1.FileDiagnostics. + * Use `create(FileDiagnosticsSchema)` to create a new message. + */ +export const FileDiagnosticsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 8); + +/** + * @generated from message agent.v1.DiagnosticItem + */ +export type DiagnosticItem = Message<"agent.v1.DiagnosticItem"> & { + /** + * @generated from field: agent.v1.DiagnosticSeverity severity = 1; + */ + severity: DiagnosticSeverity; + + /** + * @generated from field: agent.v1.DiagnosticRange range = 2; + */ + range?: DiagnosticRange; + + /** + * @generated from field: string message = 3; + */ + message: string; + + /** + * @generated from field: string source = 4; + */ + source: string; + + /** + * @generated from field: string code = 5; + */ + code: string; + + /** + * @generated from field: bool is_stale = 6; + */ + isStale: boolean; +}; + +/** + * Describes the message agent.v1.DiagnosticItem. + * Use `create(DiagnosticItemSchema)` to create a new message. + */ +export const DiagnosticItemSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 9); + +/** + * @generated from message agent.v1.DiagnosticRange + */ +export type DiagnosticRange = Message<"agent.v1.DiagnosticRange"> & { + /** + * @generated from field: agent.v1.Position start = 1; + */ + start?: Position; + + /** + * @generated from field: agent.v1.Position end = 2; + */ + end?: Position; +}; + +/** + * Describes the message agent.v1.DiagnosticRange. + * Use `create(DiagnosticRangeSchema)` to create a new message. + */ +export const DiagnosticRangeSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 10); + +/** + * @generated from message agent.v1.ReadLintsToolError + */ +export type ReadLintsToolError = Message<"agent.v1.ReadLintsToolError"> & { + /** + * @generated from field: string error_message = 1; + */ + errorMessage: string; +}; + +/** + * Describes the message agent.v1.ReadLintsToolError. + * Use `create(ReadLintsToolErrorSchema)` to create a new message. + */ +export const ReadLintsToolErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 11); + +/** + * @generated from message agent.v1.McpToolError + */ +export type McpToolError = Message<"agent.v1.McpToolError"> & { + /** + * @generated from field: string error = 1; + */ + error: string; +}; + +/** + * Describes the message agent.v1.McpToolError. + * Use `create(McpToolErrorSchema)` to create a new message. + */ +export const McpToolErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 12); + +/** + * Result for MCP tool calls (separate from exec results) + * + * @generated from message agent.v1.McpToolResult + */ +export type McpToolResult = Message<"agent.v1.McpToolResult"> & { + /** + * @generated from oneof agent.v1.McpToolResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.McpSuccess success = 1; + */ + value: McpSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.McpToolError error = 2; + */ + value: McpToolError; + case: "error"; + } + | { + /** + * @generated from field: agent.v1.McpRejected rejected = 3; + */ + value: McpRejected; + case: "rejected"; + } + | { + /** + * @generated from field: agent.v1.McpPermissionDenied permission_denied = 4; + */ + value: McpPermissionDenied; + case: "permissionDenied"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.McpToolResult. + * Use `create(McpToolResultSchema)` to create a new message. + */ +export const McpToolResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 13); + +/** + * @generated from message agent.v1.McpToolCall + */ +export type McpToolCall = Message<"agent.v1.McpToolCall"> & { + /** + * @generated from field: agent.v1.McpArgs args = 1; + */ + args?: McpArgs; + + /** + * @generated from field: agent.v1.McpToolResult result = 2; + */ + result?: McpToolResult; +}; + +/** + * Describes the message agent.v1.McpToolCall. + * Use `create(McpToolCallSchema)` to create a new message. + */ +export const McpToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 14); + +/** + * @generated from message agent.v1.SemSearchToolCall + */ +export type SemSearchToolCall = Message<"agent.v1.SemSearchToolCall"> & { + /** + * @generated from field: agent.v1.SemSearchToolArgs args = 1; + */ + args?: SemSearchToolArgs; + + /** + * @generated from field: agent.v1.SemSearchToolResult result = 2; + */ + result?: SemSearchToolResult; +}; + +/** + * Describes the message agent.v1.SemSearchToolCall. + * Use `create(SemSearchToolCallSchema)` to create a new message. + */ +export const SemSearchToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 15); + +/** + * @generated from message agent.v1.SemSearchToolArgs + */ +export type SemSearchToolArgs = Message<"agent.v1.SemSearchToolArgs"> & { + /** + * @generated from field: string query = 1; + */ + query: string; + + /** + * @generated from field: repeated string target_directories = 2; + */ + targetDirectories: string[]; + + /** + * @generated from field: string explanation = 3; + */ + explanation: string; +}; + +/** + * Describes the message agent.v1.SemSearchToolArgs. + * Use `create(SemSearchToolArgsSchema)` to create a new message. + */ +export const SemSearchToolArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 16); + +/** + * @generated from message agent.v1.SemSearchToolResult + */ +export type SemSearchToolResult = Message<"agent.v1.SemSearchToolResult"> & { + /** + * @generated from oneof agent.v1.SemSearchToolResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.SemSearchToolSuccess success = 1; + */ + value: SemSearchToolSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.SemSearchToolError error = 2; + */ + value: SemSearchToolError; + case: "error"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.SemSearchToolResult. + * Use `create(SemSearchToolResultSchema)` to create a new message. + */ +export const SemSearchToolResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 17); + +/** + * @generated from message agent.v1.SemSearchToolSuccess + */ +export type SemSearchToolSuccess = Message<"agent.v1.SemSearchToolSuccess"> & { + /** + * @generated from field: string results = 1; + */ + results: string; + + /** + * @generated from field: repeated bytes code_results = 2; + */ + codeResults: Uint8Array[]; +}; + +/** + * Describes the message agent.v1.SemSearchToolSuccess. + * Use `create(SemSearchToolSuccessSchema)` to create a new message. + */ +export const SemSearchToolSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 18); + +/** + * @generated from message agent.v1.SemSearchToolError + */ +export type SemSearchToolError = Message<"agent.v1.SemSearchToolError"> & { + /** + * @generated from field: string error_message = 1; + */ + errorMessage: string; +}; + +/** + * Describes the message agent.v1.SemSearchToolError. + * Use `create(SemSearchToolErrorSchema)` to create a new message. + */ +export const SemSearchToolErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 19); + +/** + * @generated from message agent.v1.ListMcpResourcesToolCall + */ +export type ListMcpResourcesToolCall = Message<"agent.v1.ListMcpResourcesToolCall"> & { + /** + * @generated from field: agent.v1.ListMcpResourcesExecArgs args = 1; + */ + args?: ListMcpResourcesExecArgs; + + /** + * @generated from field: agent.v1.ListMcpResourcesExecResult result = 2; + */ + result?: ListMcpResourcesExecResult; +}; + +/** + * Describes the message agent.v1.ListMcpResourcesToolCall. + * Use `create(ListMcpResourcesToolCallSchema)` to create a new message. + */ +export const ListMcpResourcesToolCallSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 20); + +/** + * @generated from message agent.v1.ReadMcpResourceToolCall + */ +export type ReadMcpResourceToolCall = Message<"agent.v1.ReadMcpResourceToolCall"> & { + /** + * @generated from field: agent.v1.ReadMcpResourceExecArgs args = 1; + */ + args?: ReadMcpResourceExecArgs; + + /** + * @generated from field: agent.v1.ReadMcpResourceExecResult result = 2; + */ + result?: ReadMcpResourceExecResult; +}; + +/** + * Describes the message agent.v1.ReadMcpResourceToolCall. + * Use `create(ReadMcpResourceToolCallSchema)` to create a new message. + */ +export const ReadMcpResourceToolCallSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 21); + +/** + * @generated from message agent.v1.FetchToolCall + */ +export type FetchToolCall = Message<"agent.v1.FetchToolCall"> & { + /** + * @generated from field: agent.v1.FetchArgs args = 1; + */ + args?: FetchArgs; + + /** + * @generated from field: agent.v1.FetchResult result = 2; + */ + result?: FetchResult; +}; + +/** + * Describes the message agent.v1.FetchToolCall. + * Use `create(FetchToolCallSchema)` to create a new message. + */ +export const FetchToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 22); + +/** + * @generated from message agent.v1.RecordScreenToolCall + */ +export type RecordScreenToolCall = Message<"agent.v1.RecordScreenToolCall"> & { + /** + * @generated from field: agent.v1.RecordScreenArgs args = 1; + */ + args?: RecordScreenArgs; + + /** + * @generated from field: agent.v1.RecordScreenResult result = 2; + */ + result?: RecordScreenResult; +}; + +/** + * Describes the message agent.v1.RecordScreenToolCall. + * Use `create(RecordScreenToolCallSchema)` to create a new message. + */ +export const RecordScreenToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 23); + +/** + * @generated from message agent.v1.WriteShellStdinToolCall + */ +export type WriteShellStdinToolCall = Message<"agent.v1.WriteShellStdinToolCall"> & { + /** + * @generated from field: agent.v1.WriteShellStdinArgs args = 1; + */ + args?: WriteShellStdinArgs; + + /** + * @generated from field: agent.v1.WriteShellStdinResult result = 2; + */ + result?: WriteShellStdinResult; +}; + +/** + * Describes the message agent.v1.WriteShellStdinToolCall. + * Use `create(WriteShellStdinToolCallSchema)` to create a new message. + */ +export const WriteShellStdinToolCallSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 24); + +/** + * @generated from message agent.v1.ReflectArgs + */ +export type ReflectArgs = Message<"agent.v1.ReflectArgs"> & { + /** + * @generated from field: string unexpected_action_outcomes = 1; + */ + unexpectedActionOutcomes: string; + + /** + * @generated from field: string relevant_instructions = 2; + */ + relevantInstructions: string; + + /** + * @generated from field: string scenario_analysis = 3; + */ + scenarioAnalysis: string; + + /** + * @generated from field: string critical_synthesis = 4; + */ + criticalSynthesis: string; + + /** + * @generated from field: string next_steps = 5; + */ + nextSteps: string; + + /** + * @generated from field: string tool_call_id = 6; + */ + toolCallId: string; +}; + +/** + * Describes the message agent.v1.ReflectArgs. + * Use `create(ReflectArgsSchema)` to create a new message. + */ +export const ReflectArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 25); + +/** + * @generated from message agent.v1.ReflectResult + */ +export type ReflectResult = Message<"agent.v1.ReflectResult"> & { + /** + * @generated from oneof agent.v1.ReflectResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.ReflectSuccess success = 1; + */ + value: ReflectSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.ReflectError error = 2; + */ + value: ReflectError; + case: "error"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ReflectResult. + * Use `create(ReflectResultSchema)` to create a new message. + */ +export const ReflectResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 26); + +/** + * @generated from message agent.v1.ReflectSuccess + */ +export type ReflectSuccess = Message<"agent.v1.ReflectSuccess"> & {}; + +/** + * Describes the message agent.v1.ReflectSuccess. + * Use `create(ReflectSuccessSchema)` to create a new message. + */ +export const ReflectSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 27); + +/** + * @generated from message agent.v1.ReflectError + */ +export type ReflectError = Message<"agent.v1.ReflectError"> & { + /** + * @generated from field: string error = 1; + */ + error: string; +}; + +/** + * Describes the message agent.v1.ReflectError. + * Use `create(ReflectErrorSchema)` to create a new message. + */ +export const ReflectErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 28); + +/** + * @generated from message agent.v1.ReflectToolCall + */ +export type ReflectToolCall = Message<"agent.v1.ReflectToolCall"> & { + /** + * @generated from field: agent.v1.ReflectArgs args = 1; + */ + args?: ReflectArgs; + + /** + * @generated from field: agent.v1.ReflectResult result = 2; + */ + result?: ReflectResult; +}; + +/** + * Describes the message agent.v1.ReflectToolCall. + * Use `create(ReflectToolCallSchema)` to create a new message. + */ +export const ReflectToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 29); + +/** + * @generated from message agent.v1.StartGrindExecutionArgs + */ +export type StartGrindExecutionArgs = Message<"agent.v1.StartGrindExecutionArgs"> & { + /** + * Optional explanation for why the agent is requesting to begin executing. + * + * @generated from field: optional string explanation = 1; + */ + explanation?: string; + + /** + * @generated from field: string tool_call_id = 2; + */ + toolCallId: string; +}; + +/** + * Describes the message agent.v1.StartGrindExecutionArgs. + * Use `create(StartGrindExecutionArgsSchema)` to create a new message. + */ +export const StartGrindExecutionArgsSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 30); + +/** + * @generated from message agent.v1.StartGrindExecutionResult + */ +export type StartGrindExecutionResult = Message<"agent.v1.StartGrindExecutionResult"> & { + /** + * @generated from oneof agent.v1.StartGrindExecutionResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.StartGrindExecutionSuccess success = 1; + */ + value: StartGrindExecutionSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.StartGrindExecutionError error = 2; + */ + value: StartGrindExecutionError; + case: "error"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.StartGrindExecutionResult. + * Use `create(StartGrindExecutionResultSchema)` to create a new message. + */ +export const StartGrindExecutionResultSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 31); + +/** + * @generated from message agent.v1.StartGrindExecutionSuccess + */ +export type StartGrindExecutionSuccess = Message<"agent.v1.StartGrindExecutionSuccess"> & {}; + +/** + * Describes the message agent.v1.StartGrindExecutionSuccess. + * Use `create(StartGrindExecutionSuccessSchema)` to create a new message. + */ +export const StartGrindExecutionSuccessSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 32); + +/** + * @generated from message agent.v1.StartGrindExecutionError + */ +export type StartGrindExecutionError = Message<"agent.v1.StartGrindExecutionError"> & { + /** + * @generated from field: string error = 1; + */ + error: string; +}; + +/** + * Describes the message agent.v1.StartGrindExecutionError. + * Use `create(StartGrindExecutionErrorSchema)` to create a new message. + */ +export const StartGrindExecutionErrorSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 33); + +/** + * @generated from message agent.v1.StartGrindExecutionToolCall + */ +export type StartGrindExecutionToolCall = Message<"agent.v1.StartGrindExecutionToolCall"> & { + /** + * @generated from field: agent.v1.StartGrindExecutionArgs args = 1; + */ + args?: StartGrindExecutionArgs; + + /** + * @generated from field: agent.v1.StartGrindExecutionResult result = 2; + */ + result?: StartGrindExecutionResult; +}; + +/** + * Describes the message agent.v1.StartGrindExecutionToolCall. + * Use `create(StartGrindExecutionToolCallSchema)` to create a new message. + */ +export const StartGrindExecutionToolCallSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 34); + +/** + * @generated from message agent.v1.StartGrindPlanningArgs + */ +export type StartGrindPlanningArgs = Message<"agent.v1.StartGrindPlanningArgs"> & { + /** + * Optional explanation for why the agent is requesting to return to planning. + * + * @generated from field: optional string explanation = 1; + */ + explanation?: string; + + /** + * @generated from field: string tool_call_id = 2; + */ + toolCallId: string; +}; + +/** + * Describes the message agent.v1.StartGrindPlanningArgs. + * Use `create(StartGrindPlanningArgsSchema)` to create a new message. + */ +export const StartGrindPlanningArgsSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 35); + +/** + * @generated from message agent.v1.StartGrindPlanningResult + */ +export type StartGrindPlanningResult = Message<"agent.v1.StartGrindPlanningResult"> & { + /** + * @generated from oneof agent.v1.StartGrindPlanningResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.StartGrindPlanningSuccess success = 1; + */ + value: StartGrindPlanningSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.StartGrindPlanningError error = 2; + */ + value: StartGrindPlanningError; + case: "error"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.StartGrindPlanningResult. + * Use `create(StartGrindPlanningResultSchema)` to create a new message. + */ +export const StartGrindPlanningResultSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 36); + +/** + * @generated from message agent.v1.StartGrindPlanningSuccess + */ +export type StartGrindPlanningSuccess = Message<"agent.v1.StartGrindPlanningSuccess"> & {}; + +/** + * Describes the message agent.v1.StartGrindPlanningSuccess. + * Use `create(StartGrindPlanningSuccessSchema)` to create a new message. + */ +export const StartGrindPlanningSuccessSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 37); + +/** + * @generated from message agent.v1.StartGrindPlanningError + */ +export type StartGrindPlanningError = Message<"agent.v1.StartGrindPlanningError"> & { + /** + * @generated from field: string error = 1; + */ + error: string; +}; + +/** + * Describes the message agent.v1.StartGrindPlanningError. + * Use `create(StartGrindPlanningErrorSchema)` to create a new message. + */ +export const StartGrindPlanningErrorSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 38); + +/** + * @generated from message agent.v1.StartGrindPlanningToolCall + */ +export type StartGrindPlanningToolCall = Message<"agent.v1.StartGrindPlanningToolCall"> & { + /** + * @generated from field: agent.v1.StartGrindPlanningArgs args = 1; + */ + args?: StartGrindPlanningArgs; + + /** + * @generated from field: agent.v1.StartGrindPlanningResult result = 2; + */ + result?: StartGrindPlanningResult; +}; + +/** + * Describes the message agent.v1.StartGrindPlanningToolCall. + * Use `create(StartGrindPlanningToolCallSchema)` to create a new message. + */ +export const StartGrindPlanningToolCallSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 39); + +/** + * var AgentMode; (function (AgentMode) { AgentMode[AgentMode["UNSPECIFIED"] = 0] = "UNSPECIFIED"; AgentMode[AgentMode["AGENT"] = 1] = "AGENT"; AgentMode[AgentMode["ASK"] = 2] = "ASK"; AgentMode[AgentMode["PLAN"] = 3] = "PLAN"; AgentMode[AgentMode["DEBUG"] = 4] = "DEBUG"; AgentMode[AgentMode["TRIAGE"] = 5] = "TRIAGE"; AgentMode[AgentMode["PROJECT"] = 6] = "PROJECT"; })(AgentMode || (AgentMode = {})); // Retrieve enum metadata with: proto3.getEnumType(AgentMode) proto3/* int32 *\/.C.util.setEnumType(AgentMode, "agent.v1.AgentMode", [ { no: 0, name: "AGENT_MODE_UNSPECIFIED" }, { no: 1, name: "AGENT_MODE_AGENT" }, { no: 2, name: "AGENT_MODE_ASK" }, { no: 3, name: "AGENT_MODE_PLAN" }, { no: 4, name: "AGENT_MODE_DEBUG" }, { no: 5, name: "AGENT_MODE_TRIAGE" }, { no: 6, name: "AGENT_MODE_PROJECT" }, ]); + * + * @generated from message agent.v1.TaskArgs + */ +export type TaskArgs = Message<"agent.v1.TaskArgs"> & { + /** + * @generated from field: string description = 1; + */ + description: string; + + /** + * @generated from field: string prompt = 2; + */ + prompt: string; + + /** + * @generated from field: agent.v1.SubagentType subagent_type = 3; + */ + subagentType?: SubagentType; + + /** + * @generated from field: optional string model = 4; + */ + model?: string; + + /** + * @generated from field: optional string resume = 5; + */ + resume?: string; +}; + +/** + * Describes the message agent.v1.TaskArgs. + * Use `create(TaskArgsSchema)` to create a new message. + */ +export const TaskArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 40); + +/** + * @generated from message agent.v1.TaskSuccess + */ +export type TaskSuccess = Message<"agent.v1.TaskSuccess"> & { + /** + * @generated from field: repeated agent.v1.ConversationStep conversation_steps = 1; + */ + conversationSteps: ConversationStep[]; + + /** + * @generated from field: optional string agent_id = 2; + */ + agentId?: string; + + /** + * @generated from field: bool is_background = 3; + */ + isBackground: boolean; + + /** + * @generated from field: optional uint64 duration_ms = 4; + */ + durationMs?: bigint; +}; + +/** + * Describes the message agent.v1.TaskSuccess. + * Use `create(TaskSuccessSchema)` to create a new message. + */ +export const TaskSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 41); + +/** + * @generated from message agent.v1.TaskError + */ +export type TaskError = Message<"agent.v1.TaskError"> & { + /** + * @generated from field: string error = 1; + */ + error: string; +}; + +/** + * Describes the message agent.v1.TaskError. + * Use `create(TaskErrorSchema)` to create a new message. + */ +export const TaskErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 42); + +/** + * @generated from message agent.v1.TaskResult + */ +export type TaskResult = Message<"agent.v1.TaskResult"> & { + /** + * @generated from oneof agent.v1.TaskResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.TaskSuccess success = 1; + */ + value: TaskSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.TaskError error = 2; + */ + value: TaskError; + case: "error"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.TaskResult. + * Use `create(TaskResultSchema)` to create a new message. + */ +export const TaskResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 43); + +/** + * @generated from message agent.v1.TaskToolCall + */ +export type TaskToolCall = Message<"agent.v1.TaskToolCall"> & { + /** + * @generated from field: agent.v1.TaskArgs args = 1; + */ + args?: TaskArgs; + + /** + * @generated from field: agent.v1.TaskResult result = 2; + */ + result?: TaskResult; +}; + +/** + * Describes the message agent.v1.TaskToolCall. + * Use `create(TaskToolCallSchema)` to create a new message. + */ +export const TaskToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 44); + +/** + * @generated from message agent.v1.TaskToolCallDelta + */ +export type TaskToolCallDelta = Message<"agent.v1.TaskToolCallDelta"> & { + /** + * @generated from field: agent.v1.InteractionUpdate interaction_update = 1; + */ + interactionUpdate?: InteractionUpdate; +}; + +/** + * Describes the message agent.v1.TaskToolCallDelta. + * Use `create(TaskToolCallDeltaSchema)` to create a new message. + */ +export const TaskToolCallDeltaSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 45); + +/** + * Tool messages (from tool.proto) + * + * @generated from message agent.v1.ToolCall + */ +export type ToolCall = Message<"agent.v1.ToolCall"> & { + /** + * @generated from oneof agent.v1.ToolCall.tool + */ + tool: + | { + /** + * @generated from field: agent.v1.ShellToolCall shell_tool_call = 1; + */ + value: ShellToolCall; + case: "shellToolCall"; + } + | { + /** + * @generated from field: agent.v1.DeleteToolCall delete_tool_call = 3; + */ + value: DeleteToolCall; + case: "deleteToolCall"; + } + | { + /** + * @generated from field: agent.v1.GlobToolCall glob_tool_call = 4; + */ + value: GlobToolCall; + case: "globToolCall"; + } + | { + /** + * @generated from field: agent.v1.GrepToolCall grep_tool_call = 5; + */ + value: GrepToolCall; + case: "grepToolCall"; + } + | { + /** + * @generated from field: agent.v1.ReadToolCall read_tool_call = 8; + */ + value: ReadToolCall; + case: "readToolCall"; + } + | { + /** + * @generated from field: agent.v1.UpdateTodosToolCall update_todos_tool_call = 9; + */ + value: UpdateTodosToolCall; + case: "updateTodosToolCall"; + } + | { + /** + * @generated from field: agent.v1.ReadTodosToolCall read_todos_tool_call = 10; + */ + value: ReadTodosToolCall; + case: "readTodosToolCall"; + } + | { + /** + * @generated from field: agent.v1.EditToolCall edit_tool_call = 12; + */ + value: EditToolCall; + case: "editToolCall"; + } + | { + /** + * @generated from field: agent.v1.LsToolCall ls_tool_call = 13; + */ + value: LsToolCall; + case: "lsToolCall"; + } + | { + /** + * @generated from field: agent.v1.ReadLintsToolCall read_lints_tool_call = 14; + */ + value: ReadLintsToolCall; + case: "readLintsToolCall"; + } + | { + /** + * @generated from field: agent.v1.McpToolCall mcp_tool_call = 15; + */ + value: McpToolCall; + case: "mcpToolCall"; + } + | { + /** + * @generated from field: agent.v1.SemSearchToolCall sem_search_tool_call = 16; + */ + value: SemSearchToolCall; + case: "semSearchToolCall"; + } + | { + /** + * @generated from field: agent.v1.CreatePlanToolCall create_plan_tool_call = 17; + */ + value: CreatePlanToolCall; + case: "createPlanToolCall"; + } + | { + /** + * @generated from field: agent.v1.WebSearchToolCall web_search_tool_call = 18; + */ + value: WebSearchToolCall; + case: "webSearchToolCall"; + } + | { + /** + * @generated from field: agent.v1.TaskToolCall task_tool_call = 19; + */ + value: TaskToolCall; + case: "taskToolCall"; + } + | { + /** + * @generated from field: agent.v1.ListMcpResourcesToolCall list_mcp_resources_tool_call = 20; + */ + value: ListMcpResourcesToolCall; + case: "listMcpResourcesToolCall"; + } + | { + /** + * @generated from field: agent.v1.ReadMcpResourceToolCall read_mcp_resource_tool_call = 21; + */ + value: ReadMcpResourceToolCall; + case: "readMcpResourceToolCall"; + } + | { + /** + * @generated from field: agent.v1.ApplyAgentDiffToolCall apply_agent_diff_tool_call = 22; + */ + value: ApplyAgentDiffToolCall; + case: "applyAgentDiffToolCall"; + } + | { + /** + * @generated from field: agent.v1.AskQuestionToolCall ask_question_tool_call = 23; + */ + value: AskQuestionToolCall; + case: "askQuestionToolCall"; + } + | { + /** + * @generated from field: agent.v1.FetchToolCall fetch_tool_call = 24; + */ + value: FetchToolCall; + case: "fetchToolCall"; + } + | { + /** + * @generated from field: agent.v1.SwitchModeToolCall switch_mode_tool_call = 25; + */ + value: SwitchModeToolCall; + case: "switchModeToolCall"; + } + | { + /** + * @generated from field: agent.v1.ExaSearchToolCall exa_search_tool_call = 26; + */ + value: ExaSearchToolCall; + case: "exaSearchToolCall"; + } + | { + /** + * @generated from field: agent.v1.ExaFetchToolCall exa_fetch_tool_call = 27; + */ + value: ExaFetchToolCall; + case: "exaFetchToolCall"; + } + | { + /** + * @generated from field: agent.v1.GenerateImageToolCall generate_image_tool_call = 28; + */ + value: GenerateImageToolCall; + case: "generateImageToolCall"; + } + | { + /** + * @generated from field: agent.v1.RecordScreenToolCall record_screen_tool_call = 29; + */ + value: RecordScreenToolCall; + case: "recordScreenToolCall"; + } + | { + /** + * @generated from field: agent.v1.ComputerUseToolCall computer_use_tool_call = 30; + */ + value: ComputerUseToolCall; + case: "computerUseToolCall"; + } + | { + /** + * @generated from field: agent.v1.WriteShellStdinToolCall write_shell_stdin_tool_call = 31; + */ + value: WriteShellStdinToolCall; + case: "writeShellStdinToolCall"; + } + | { + /** + * @generated from field: agent.v1.ReflectToolCall reflect_tool_call = 32; + */ + value: ReflectToolCall; + case: "reflectToolCall"; + } + | { + /** + * @generated from field: agent.v1.SetupVmEnvironmentToolCall setup_vm_environment_tool_call = 33; + */ + value: SetupVmEnvironmentToolCall; + case: "setupVmEnvironmentToolCall"; + } + | { + /** + * @generated from field: agent.v1.TruncatedToolCall truncated_tool_call = 34; + */ + value: TruncatedToolCall; + case: "truncatedToolCall"; + } + | { + /** + * @generated from field: agent.v1.StartGrindExecutionToolCall start_grind_execution_tool_call = 35; + */ + value: StartGrindExecutionToolCall; + case: "startGrindExecutionToolCall"; + } + | { + /** + * @generated from field: agent.v1.StartGrindPlanningToolCall start_grind_planning_tool_call = 36; + */ + value: StartGrindPlanningToolCall; + case: "startGrindPlanningToolCall"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ToolCall. + * Use `create(ToolCallSchema)` to create a new message. + */ +export const ToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 46); + +/** + * @generated from message agent.v1.TruncatedToolCallArgs + */ +export type TruncatedToolCallArgs = Message<"agent.v1.TruncatedToolCallArgs"> & {}; + +/** + * Describes the message agent.v1.TruncatedToolCallArgs. + * Use `create(TruncatedToolCallArgsSchema)` to create a new message. + */ +export const TruncatedToolCallArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 47); + +/** + * @generated from message agent.v1.TruncatedToolCallSuccess + */ +export type TruncatedToolCallSuccess = Message<"agent.v1.TruncatedToolCallSuccess"> & {}; + +/** + * Describes the message agent.v1.TruncatedToolCallSuccess. + * Use `create(TruncatedToolCallSuccessSchema)` to create a new message. + */ +export const TruncatedToolCallSuccessSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 48); + +/** + * @generated from message agent.v1.TruncatedToolCallError + */ +export type TruncatedToolCallError = Message<"agent.v1.TruncatedToolCallError"> & { + /** + * @generated from field: string error = 1; + */ + error: string; +}; + +/** + * Describes the message agent.v1.TruncatedToolCallError. + * Use `create(TruncatedToolCallErrorSchema)` to create a new message. + */ +export const TruncatedToolCallErrorSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 49); + +/** + * @generated from message agent.v1.TruncatedToolCallResult + */ +export type TruncatedToolCallResult = Message<"agent.v1.TruncatedToolCallResult"> & { + /** + * @generated from oneof agent.v1.TruncatedToolCallResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.TruncatedToolCallSuccess success = 1; + */ + value: TruncatedToolCallSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.TruncatedToolCallError error = 2; + */ + value: TruncatedToolCallError; + case: "error"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.TruncatedToolCallResult. + * Use `create(TruncatedToolCallResultSchema)` to create a new message. + */ +export const TruncatedToolCallResultSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 50); + +/** + * Placeholder for tool calls that were truncated due to size limits. + * + * @generated from message agent.v1.TruncatedToolCall + */ +export type TruncatedToolCall = Message<"agent.v1.TruncatedToolCall"> & { + /** + * @generated from field: bytes original_step_blob_id = 1; + */ + originalStepBlobId: Uint8Array; + + /** + * unused, just matches the discriminated union for other tool calls + * + * @generated from field: agent.v1.TruncatedToolCallArgs args = 2; + */ + args?: TruncatedToolCallArgs; + + /** + * @generated from field: agent.v1.TruncatedToolCallResult result = 3; + */ + result?: TruncatedToolCallResult; +}; + +/** + * Describes the message agent.v1.TruncatedToolCall. + * Use `create(TruncatedToolCallSchema)` to create a new message. + */ +export const TruncatedToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 51); + +/** + * @generated from message agent.v1.ToolCallDelta + */ +export type ToolCallDelta = Message<"agent.v1.ToolCallDelta"> & { + /** + * @generated from oneof agent.v1.ToolCallDelta.delta + */ + delta: + | { + /** + * @generated from field: agent.v1.ShellToolCallDelta shell_tool_call_delta = 1; + */ + value: ShellToolCallDelta; + case: "shellToolCallDelta"; + } + | { + /** + * @generated from field: agent.v1.TaskToolCallDelta task_tool_call_delta = 2; + */ + value: TaskToolCallDelta; + case: "taskToolCallDelta"; + } + | { + /** + * @generated from field: agent.v1.EditToolCallDelta edit_tool_call_delta = 3; + */ + value: EditToolCallDelta; + case: "editToolCallDelta"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ToolCallDelta. + * Use `create(ToolCallDeltaSchema)` to create a new message. + */ +export const ToolCallDeltaSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 52); + +/** + * @generated from message agent.v1.ConversationStep + */ +export type ConversationStep = Message<"agent.v1.ConversationStep"> & { + /** + * @generated from oneof agent.v1.ConversationStep.message + */ + message: + | { + /** + * @generated from field: agent.v1.AssistantMessage assistant_message = 1; + */ + value: AssistantMessage; + case: "assistantMessage"; + } + | { + /** + * @generated from field: agent.v1.ToolCall tool_call = 2; + */ + value: ToolCall; + case: "toolCall"; + } + | { + /** + * @generated from field: agent.v1.ThinkingMessage thinking_message = 3; + */ + value: ThinkingMessage; + case: "thinkingMessage"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ConversationStep. + * Use `create(ConversationStepSchema)` to create a new message. + */ +export const ConversationStepSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 53); + +/** + * @generated from message agent.v1.ConversationAction + */ +export type ConversationAction = Message<"agent.v1.ConversationAction"> & { + /** + * @generated from oneof agent.v1.ConversationAction.action + */ + action: + | { + /** + * @generated from field: agent.v1.UserMessageAction user_message_action = 1; + */ + value: UserMessageAction; + case: "userMessageAction"; + } + | { + /** + * @generated from field: agent.v1.ResumeAction resume_action = 2; + */ + value: ResumeAction; + case: "resumeAction"; + } + | { + /** + * @generated from field: agent.v1.CancelAction cancel_action = 3; + */ + value: CancelAction; + case: "cancelAction"; + } + | { + /** + * @generated from field: agent.v1.SummarizeAction summarize_action = 4; + */ + value: SummarizeAction; + case: "summarizeAction"; + } + | { + /** + * @generated from field: agent.v1.ShellCommandAction shell_command_action = 5; + */ + value: ShellCommandAction; + case: "shellCommandAction"; + } + | { + /** + * @generated from field: agent.v1.StartPlanAction start_plan_action = 6; + */ + value: StartPlanAction; + case: "startPlanAction"; + } + | { + /** + * @generated from field: agent.v1.ExecutePlanAction execute_plan_action = 7; + */ + value: ExecutePlanAction; + case: "executePlanAction"; + } + | { + /** + * @generated from field: agent.v1.AsyncAskQuestionCompletionAction async_ask_question_completion_action = 8; + */ + value: AsyncAskQuestionCompletionAction; + case: "asyncAskQuestionCompletionAction"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ConversationAction. + * Use `create(ConversationActionSchema)` to create a new message. + */ +export const ConversationActionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 54); + +/** + * @generated from message agent.v1.UserMessageAction + */ +export type UserMessageAction = Message<"agent.v1.UserMessageAction"> & { + /** + * @generated from field: agent.v1.UserMessage user_message = 1; + */ + userMessage?: UserMessage; + + /** + * @generated from field: agent.v1.RequestContext request_context = 2; + */ + requestContext?: RequestContext; + + /** + * @generated from field: optional bool send_to_interaction_listener = 3; + */ + sendToInteractionListener?: boolean; +}; + +/** + * Describes the message agent.v1.UserMessageAction. + * Use `create(UserMessageActionSchema)` to create a new message. + */ +export const UserMessageActionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 55); + +/** + * @generated from message agent.v1.CancelAction + */ +export type CancelAction = Message<"agent.v1.CancelAction"> & {}; + +/** + * Describes the message agent.v1.CancelAction. + * Use `create(CancelActionSchema)` to create a new message. + */ +export const CancelActionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 56); + +/** + * @generated from message agent.v1.ResumeAction + */ +export type ResumeAction = Message<"agent.v1.ResumeAction"> & { + /** + * @generated from field: agent.v1.RequestContext request_context = 2; + */ + requestContext?: RequestContext; +}; + +/** + * Describes the message agent.v1.ResumeAction. + * Use `create(ResumeActionSchema)` to create a new message. + */ +export const ResumeActionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 57); + +/** + * @generated from message agent.v1.AsyncAskQuestionCompletionAction + */ +export type AsyncAskQuestionCompletionAction = Message<"agent.v1.AsyncAskQuestionCompletionAction"> & { + /** + * Contains the original tool call ID and the result from the user + * + * @generated from field: string original_tool_call_id = 1; + */ + originalToolCallId: string; + + /** + * @generated from field: agent.v1.AskQuestionArgs original_args = 2; + */ + originalArgs?: AskQuestionArgs; + + /** + * @generated from field: agent.v1.AskQuestionResult result = 3; + */ + result?: AskQuestionResult; +}; + +/** + * Describes the message agent.v1.AsyncAskQuestionCompletionAction. + * Use `create(AsyncAskQuestionCompletionActionSchema)` to create a new message. + */ +export const AsyncAskQuestionCompletionActionSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 58); + +/** + * @generated from message agent.v1.SummarizeAction + */ +export type SummarizeAction = Message<"agent.v1.SummarizeAction"> & {}; + +/** + * Describes the message agent.v1.SummarizeAction. + * Use `create(SummarizeActionSchema)` to create a new message. + */ +export const SummarizeActionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 59); + +/** + * @generated from message agent.v1.ShellCommandAction + */ +export type ShellCommandAction = Message<"agent.v1.ShellCommandAction"> & { + /** + * @generated from field: agent.v1.ShellCommand shell_command = 1; + */ + shellCommand?: ShellCommand; + + /** + * unique identifier for preemptive exec attachment + * + * @generated from field: string exec_id = 2; + */ + execId: string; +}; + +/** + * Describes the message agent.v1.ShellCommandAction. + * Use `create(ShellCommandActionSchema)` to create a new message. + */ +export const ShellCommandActionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 60); + +/** + * @generated from message agent.v1.StartPlanAction + */ +export type StartPlanAction = Message<"agent.v1.StartPlanAction"> & { + /** + * @generated from field: agent.v1.UserMessage user_message = 1; + */ + userMessage?: UserMessage; + + /** + * @generated from field: agent.v1.RequestContext request_context = 2; + */ + requestContext?: RequestContext; + + /** + * @generated from field: bool is_spec = 3; + */ + isSpec: boolean; +}; + +/** + * Describes the message agent.v1.StartPlanAction. + * Use `create(StartPlanActionSchema)` to create a new message. + */ +export const StartPlanActionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 61); + +/** + * @generated from message agent.v1.ExecutePlanAction + */ +export type ExecutePlanAction = Message<"agent.v1.ExecutePlanAction"> & { + /** + * @generated from field: agent.v1.RequestContext request_context = 1; + */ + requestContext?: RequestContext; + + /** + * @generated from field: optional agent.v1.ConversationPlan plan = 2; + */ + plan?: ConversationPlan; + + /** + * e.g., "cursor-plan://composerId/plan.md" + * + * @generated from field: optional string plan_file_uri = 3; + */ + planFileUri?: string; + + /** + * The actual plan content from the file + * + * @generated from field: optional string plan_file_content = 4; + */ + planFileContent?: string; +}; + +/** + * Describes the message agent.v1.ExecutePlanAction. + * Use `create(ExecutePlanActionSchema)` to create a new message. + */ +export const ExecutePlanActionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 62); + +/** + * @generated from message agent.v1.UserMessage + */ +export type UserMessage = Message<"agent.v1.UserMessage"> & { + /** + * @generated from field: string text = 1; + */ + text: string; + + /** + * @generated from field: string message_id = 2; + */ + messageId: string; + + /** + * @generated from field: optional agent.v1.SelectedContext selected_context = 3; + */ + selectedContext?: SelectedContext; + + /** + * @generated from field: int32 mode = 4; + */ + mode: number; + + /** + * @generated from field: optional bool is_simulated_msg = 5; + */ + isSimulatedMsg?: boolean; + + /** + * @generated from field: optional string best_of_n_group_id = 6; + */ + bestOfNGroupId?: string; + + /** + * @generated from field: optional bool try_use_best_of_n_promotion = 7; + */ + tryUseBestOfNPromotion?: boolean; + + /** + * @generated from field: optional string rich_text = 8; + */ + richText?: string; +}; + +/** + * Describes the message agent.v1.UserMessage. + * Use `create(UserMessageSchema)` to create a new message. + */ +export const UserMessageSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 63); + +/** + * @generated from message agent.v1.AssistantMessage + */ +export type AssistantMessage = Message<"agent.v1.AssistantMessage"> & { + /** + * @generated from field: string text = 1; + */ + text: string; +}; + +/** + * Describes the message agent.v1.AssistantMessage. + * Use `create(AssistantMessageSchema)` to create a new message. + */ +export const AssistantMessageSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 64); + +/** + * @generated from message agent.v1.ThinkingMessage + */ +export type ThinkingMessage = Message<"agent.v1.ThinkingMessage"> & { + /** + * @generated from field: string text = 1; + */ + text: string; + + /** + * @generated from field: uint32 duration_ms = 2; + */ + durationMs: number; +}; + +/** + * Describes the message agent.v1.ThinkingMessage. + * Use `create(ThinkingMessageSchema)` to create a new message. + */ +export const ThinkingMessageSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 65); + +/** + * @generated from message agent.v1.ShellCommand + */ +export type ShellCommand = Message<"agent.v1.ShellCommand"> & { + /** + * @generated from field: string command = 1; + */ + command: string; +}; + +/** + * Describes the message agent.v1.ShellCommand. + * Use `create(ShellCommandSchema)` to create a new message. + */ +export const ShellCommandSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 66); + +/** + * @generated from message agent.v1.ShellOutput + */ +export type ShellOutput = Message<"agent.v1.ShellOutput"> & { + /** + * @generated from field: string stdout = 1; + */ + stdout: string; + + /** + * @generated from field: string stderr = 2; + */ + stderr: string; + + /** + * @generated from field: int32 exit_code = 3; + */ + exitCode: number; +}; + +/** + * Describes the message agent.v1.ShellOutput. + * Use `create(ShellOutputSchema)` to create a new message. + */ +export const ShellOutputSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 67); + +/** + * @generated from message agent.v1.ConversationTurn + */ +export type ConversationTurn = Message<"agent.v1.ConversationTurn"> & { + /** + * @generated from oneof agent.v1.ConversationTurn.turn + */ + turn: + | { + /** + * @generated from field: agent.v1.AgentConversationTurn agent_conversation_turn = 1; + */ + value: AgentConversationTurn; + case: "agentConversationTurn"; + } + | { + /** + * @generated from field: agent.v1.ShellConversationTurn shell_conversation_turn = 2; + */ + value: ShellConversationTurn; + case: "shellConversationTurn"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ConversationTurn. + * Use `create(ConversationTurnSchema)` to create a new message. + */ +export const ConversationTurnSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 68); + +/** + * @generated from message agent.v1.ConversationPlan + */ +export type ConversationPlan = Message<"agent.v1.ConversationPlan"> & { + /** + * @generated from field: string plan = 1; + */ + plan: string; +}; + +/** + * Describes the message agent.v1.ConversationPlan. + * Use `create(ConversationPlanSchema)` to create a new message. + */ +export const ConversationPlanSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 69); + +/** + * @generated from message agent.v1.ConversationTurnStructure + */ +export type ConversationTurnStructure = Message<"agent.v1.ConversationTurnStructure"> & { + /** + * @generated from oneof agent.v1.ConversationTurnStructure.turn + */ + turn: + | { + /** + * @generated from field: agent.v1.AgentConversationTurnStructure agent_conversation_turn = 1; + */ + value: AgentConversationTurnStructure; + case: "agentConversationTurn"; + } + | { + /** + * @generated from field: agent.v1.ShellConversationTurnStructure shell_conversation_turn = 2; + */ + value: ShellConversationTurnStructure; + case: "shellConversationTurn"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ConversationTurnStructure. + * Use `create(ConversationTurnStructureSchema)` to create a new message. + */ +export const ConversationTurnStructureSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 70); + +/** + * @generated from message agent.v1.AgentConversationTurn + */ +export type AgentConversationTurn = Message<"agent.v1.AgentConversationTurn"> & { + /** + * @generated from field: agent.v1.UserMessage user_message = 1; + */ + userMessage?: UserMessage; + + /** + * @generated from field: repeated agent.v1.ConversationStep steps = 2; + */ + steps: ConversationStep[]; + + /** + * The request ID associated with this turn, used for analytics tracking + * + * @generated from field: optional string request_id = 3; + */ + requestId?: string; +}; + +/** + * Describes the message agent.v1.AgentConversationTurn. + * Use `create(AgentConversationTurnSchema)` to create a new message. + */ +export const AgentConversationTurnSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 71); + +/** + * @generated from message agent.v1.AgentConversationTurnStructure + */ +export type AgentConversationTurnStructure = Message<"agent.v1.AgentConversationTurnStructure"> & { + /** + * @generated from field: bytes user_message = 1; + */ + userMessage: Uint8Array; + + /** + * @generated from field: repeated bytes steps = 2; + */ + steps: Uint8Array[]; + + /** + * The request ID associated with this turn, used for analytics tracking + * + * @generated from field: optional string request_id = 3; + */ + requestId?: string; +}; + +/** + * Describes the message agent.v1.AgentConversationTurnStructure. + * Use `create(AgentConversationTurnStructureSchema)` to create a new message. + */ +export const AgentConversationTurnStructureSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 72); + +/** + * @generated from message agent.v1.ShellConversationTurn + */ +export type ShellConversationTurn = Message<"agent.v1.ShellConversationTurn"> & { + /** + * @generated from field: agent.v1.ShellCommand shell_command = 1; + */ + shellCommand?: ShellCommand; + + /** + * @generated from field: agent.v1.ShellOutput shell_output = 2; + */ + shellOutput?: ShellOutput; +}; + +/** + * Describes the message agent.v1.ShellConversationTurn. + * Use `create(ShellConversationTurnSchema)` to create a new message. + */ +export const ShellConversationTurnSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 73); + +/** + * @generated from message agent.v1.ShellConversationTurnStructure + */ +export type ShellConversationTurnStructure = Message<"agent.v1.ShellConversationTurnStructure"> & { + /** + * @generated from field: bytes shell_command = 1; + */ + shellCommand: Uint8Array; + + /** + * @generated from field: bytes shell_output = 2; + */ + shellOutput: Uint8Array; +}; + +/** + * Describes the message agent.v1.ShellConversationTurnStructure. + * Use `create(ShellConversationTurnStructureSchema)` to create a new message. + */ +export const ShellConversationTurnStructureSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 74); + +/** + * @generated from message agent.v1.ConversationSummary + */ +export type ConversationSummary = Message<"agent.v1.ConversationSummary"> & { + /** + * @generated from field: string summary = 1; + */ + summary: string; +}; + +/** + * Describes the message agent.v1.ConversationSummary. + * Use `create(ConversationSummarySchema)` to create a new message. + */ +export const ConversationSummarySchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 75); + +/** + * @generated from message agent.v1.ConversationSummaryArchive + */ +export type ConversationSummaryArchive = Message<"agent.v1.ConversationSummaryArchive"> & { + /** + * @generated from field: repeated bytes summarized_messages = 1; + */ + summarizedMessages: Uint8Array[]; + + /** + * @generated from field: string summary = 2; + */ + summary: string; + + /** + * @generated from field: uint32 window_tail = 3; + */ + windowTail: number; + + /** + * @generated from field: bytes summary_message = 4; + */ + summaryMessage: Uint8Array; +}; + +/** + * Describes the message agent.v1.ConversationSummaryArchive. + * Use `create(ConversationSummaryArchiveSchema)` to create a new message. + */ +export const ConversationSummaryArchiveSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 76); + +/** + * @generated from message agent.v1.ConversationTokenDetails + */ +export type ConversationTokenDetails = Message<"agent.v1.ConversationTokenDetails"> & { + /** + * @generated from field: uint32 used_tokens = 1; + */ + usedTokens: number; + + /** + * @generated from field: uint32 max_tokens = 2; + */ + maxTokens: number; +}; + +/** + * Describes the message agent.v1.ConversationTokenDetails. + * Use `create(ConversationTokenDetailsSchema)` to create a new message. + */ +export const ConversationTokenDetailsSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 77); + +/** + * @generated from message agent.v1.FileState + */ +export type FileState = Message<"agent.v1.FileState"> & { + /** + * Optional content. If not set or undefined, the file is considered deleted. + * + * @generated from field: optional string content = 1; + */ + content?: string; + + /** + * Optional initial content captured when the file was first tracked. If not set or undefined, the file did not exist when tracking began. + * + * @generated from field: optional string initial_content = 2; + */ + initialContent?: string; +}; + +/** + * Describes the message agent.v1.FileState. + * Use `create(FileStateSchema)` to create a new message. + */ +export const FileStateSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 78); + +/** + * @generated from message agent.v1.FileStateStructure + */ +export type FileStateStructure = Message<"agent.v1.FileStateStructure"> & { + /** + * Optional content. If not set or undefined, the file is considered deleted. + * + * @generated from field: optional bytes content = 1; + */ + content?: Uint8Array; + + /** + * Optional initial content captured when the file was first tracked. If not set or undefined, the file did not exist when tracking began. + * + * @generated from field: optional bytes initial_content = 2; + */ + initialContent?: Uint8Array; +}; + +/** + * Describes the message agent.v1.FileStateStructure. + * Use `create(FileStateStructureSchema)` to create a new message. + */ +export const FileStateStructureSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 79); + +/** + * @generated from message agent.v1.StepTiming + */ +export type StepTiming = Message<"agent.v1.StepTiming"> & { + /** + * @generated from field: uint64 duration_ms = 1; + */ + durationMs: bigint; + + /** + * @generated from field: uint64 timestamp_ms = 2; + */ + timestampMs: bigint; +}; + +/** + * Describes the message agent.v1.StepTiming. + * Use `create(StepTimingSchema)` to create a new message. + */ +export const StepTimingSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 80); + +/** + * @generated from message agent.v1.ConversationState + */ +export type ConversationState = Message<"agent.v1.ConversationState"> & { + /** + * @generated from field: repeated string root_prompt_messages_json = 1; + */ + rootPromptMessagesJson: string[]; + + /** + * @generated from field: repeated agent.v1.ConversationTurn turns = 8; + */ + turns: ConversationTurn[]; + + /** + * @generated from field: repeated agent.v1.TodoItem todos = 3; + */ + todos: TodoItem[]; + + /** + * Raw JSON stringified tool-call content parts awaiting execution + * + * @generated from field: repeated string pending_tool_calls = 4; + */ + pendingToolCalls: string[]; + + /** + * @generated from field: agent.v1.ConversationTokenDetails token_details = 5; + */ + tokenDetails?: ConversationTokenDetails; + + /** + * only for when the user explicitly asks for a summary through the summary action + * + * @generated from field: optional agent.v1.ConversationSummary summary = 6; + */ + summary?: ConversationSummary; + + /** + * @generated from field: optional agent.v1.ConversationPlan plan = 7; + */ + plan?: ConversationPlan; + + /** + * @generated from field: optional agent.v1.ConversationSummaryArchive summary_archive = 9; + */ + summaryArchive?: ConversationSummaryArchive; + + /** + * Deprecated, use summary_archives instead @deprecated summaryArchive; + * + * @generated from field: map file_states = 10; + */ + fileStates: { [key: string]: FileState }; + + /** + * @generated from field: repeated agent.v1.ConversationSummaryArchive summary_archives = 11; + */ + summaryArchives: ConversationSummaryArchive[]; +}; + +/** + * Describes the message agent.v1.ConversationState. + * Use `create(ConversationStateSchema)` to create a new message. + */ +export const ConversationStateSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 81); + +/** + * @generated from message agent.v1.SubagentPersistedState + */ +export type SubagentPersistedState = Message<"agent.v1.SubagentPersistedState"> & { + /** + * The subagent's conversation state structure + * + * @generated from field: agent.v1.ConversationStateStructure conversation_state = 1; + */ + conversationState?: ConversationStateStructure; + + /** + * Timestamp when this subagent was first created + * + * @generated from field: uint64 created_timestamp_ms = 2; + */ + createdTimestampMs: bigint; + + /** + * Timestamp when this subagent was last used (by task tool call) + * + * @generated from field: uint64 last_used_timestamp_ms = 3; + */ + lastUsedTimestampMs: bigint; + + /** + * The subagent type (e.g., computerUse, custom with name) + * + * @generated from field: agent.v1.SubagentType subagent_type = 4; + */ + subagentType?: SubagentType; +}; + +/** + * Describes the message agent.v1.SubagentPersistedState. + * Use `create(SubagentPersistedStateSchema)` to create a new message. + */ +export const SubagentPersistedStateSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 82); + +/** + * @generated from message agent.v1.ConversationStateStructure + */ +export type ConversationStateStructure = Message<"agent.v1.ConversationStateStructure"> & { + /** + * @generated from field: repeated bytes turns_old = 2; + */ + turnsOld: Uint8Array[]; + + /** + * @deprecated turnsOld = []; + * + * @generated from field: repeated bytes root_prompt_messages_json = 1; + */ + rootPromptMessagesJson: Uint8Array[]; + + /** + * @generated from field: repeated bytes turns = 8; + */ + turns: Uint8Array[]; + + /** + * @generated from field: repeated bytes todos = 3; + */ + todos: Uint8Array[]; + + /** + * Raw JSON stringified tool-call content parts awaiting execution + * + * @generated from field: repeated string pending_tool_calls = 4; + */ + pendingToolCalls: string[]; + + /** + * @generated from field: agent.v1.ConversationTokenDetails token_details = 5; + */ + tokenDetails?: ConversationTokenDetails; + + /** + * only for when the user explicitly asks for a summary through the summary action + * + * @generated from field: optional bytes summary = 6; + */ + summary?: Uint8Array; + + /** + * @generated from field: optional bytes plan = 7; + */ + plan?: Uint8Array; + + /** + * @generated from field: repeated string previous_workspace_uris = 9; + */ + previousWorkspaceUris: string[]; + + /** + * Current mode of the conversation + * + * @generated from field: optional int32 mode = 10; + */ + mode?: number; + + /** + * @generated from field: optional bytes summary_archive = 11; + */ + summaryArchive?: Uint8Array; + + /** + * @generated from field: map file_states = 12; + */ + fileStates: { [key: string]: Uint8Array }; + + /** + * Deprecated, use summary_archives instead @deprecated summaryArchive; Map of file paths to their latest content (stored as blob IDs in the KV store) Each blob contains a serialized FileState message @deprecated fileStates = {}; Map of file paths to their latest content (stored as FileStateStructure) + * + * @generated from field: map file_states_v2 = 15; + */ + fileStatesV2: { [key: string]: FileStateStructure }; + + /** + * @generated from field: repeated bytes summary_archives = 13; + */ + summaryArchives: Uint8Array[]; + + /** + * @generated from field: repeated agent.v1.StepTiming turn_timings = 14; + */ + turnTimings: StepTiming[]; + + /** + * Subagent resume tracking Map of subagent ID to the persisted subagent state (stored inline) + * + * @generated from field: map subagent_states = 16; + */ + subagentStates: { [key: string]: SubagentPersistedState }; + + /** + * Count of self-summaries generated for this conversation + * + * @generated from field: uint32 self_summary_count = 17; + */ + selfSummaryCount: number; + + /** + * Set of file paths that have been read during this conversation + * + * @generated from field: repeated string read_paths = 18; + */ + readPaths: string[]; +}; + +/** + * Describes the message agent.v1.ConversationStateStructure. + * Use `create(ConversationStateStructureSchema)` to create a new message. + */ +export const ConversationStateStructureSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 83); + +/** + * @generated from message agent.v1.ThinkingDetails + */ +export type ThinkingDetails = Message<"agent.v1.ThinkingDetails"> & {}; + +/** + * Describes the message agent.v1.ThinkingDetails. + * Use `create(ThinkingDetailsSchema)` to create a new message. + */ +export const ThinkingDetailsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 84); + +/** + * @generated from message agent.v1.ApiKeyCredentials + */ +export type ApiKeyCredentials = Message<"agent.v1.ApiKeyCredentials"> & { + /** + * @generated from field: string api_key = 1; + */ + apiKey: string; + + /** + * For OpenAI-compatible endpoints + * + * @generated from field: optional string base_url = 2; + */ + baseUrl?: string; +}; + +/** + * Describes the message agent.v1.ApiKeyCredentials. + * Use `create(ApiKeyCredentialsSchema)` to create a new message. + */ +export const ApiKeyCredentialsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 85); + +/** + * @generated from message agent.v1.AzureCredentials + */ +export type AzureCredentials = Message<"agent.v1.AzureCredentials"> & { + /** + * @generated from field: string api_key = 1; + */ + apiKey: string; + + /** + * @generated from field: string base_url = 2; + */ + baseUrl: string; + + /** + * @generated from field: string deployment = 3; + */ + deployment: string; +}; + +/** + * Describes the message agent.v1.AzureCredentials. + * Use `create(AzureCredentialsSchema)` to create a new message. + */ +export const AzureCredentialsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 86); + +/** + * @generated from message agent.v1.BedrockCredentials + */ +export type BedrockCredentials = Message<"agent.v1.BedrockCredentials"> & { + /** + * @generated from field: string access_key = 1; + */ + accessKey: string; + + /** + * @generated from field: string secret_key = 2; + */ + secretKey: string; + + /** + * @generated from field: string region = 3; + */ + region: string; + + /** + * @generated from field: optional string session_token = 4; + */ + sessionToken?: string; +}; + +/** + * Describes the message agent.v1.BedrockCredentials. + * Use `create(BedrockCredentialsSchema)` to create a new message. + */ +export const BedrockCredentialsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 87); + +/** + * @generated from message agent.v1.ModelDetails + */ +export type ModelDetails = Message<"agent.v1.ModelDetails"> & { + /** + * @generated from field: string model_id = 1; + */ + modelId: string; + + /** + * @generated from field: string display_model_id = 3; + */ + displayModelId: string; + + /** + * @generated from field: string display_name = 4; + */ + displayName: string; + + /** + * @generated from field: string display_name_short = 5; + */ + displayNameShort: string; + + /** + * @generated from field: repeated string aliases = 6; + */ + aliases: string[]; + + /** + * @generated from field: optional agent.v1.ThinkingDetails thinking_details = 2; + */ + thinkingDetails?: ThinkingDetails; + + /** + * @generated from field: optional bool max_mode = 7; + */ + maxMode?: boolean; + + /** + * @generated from oneof agent.v1.ModelDetails.credentials + */ + credentials: + | { + /** + * @generated from field: agent.v1.ApiKeyCredentials api_key_credentials = 8; + */ + value: ApiKeyCredentials; + case: "apiKeyCredentials"; + } + | { + /** + * @generated from field: agent.v1.AzureCredentials azure_credentials = 9; + */ + value: AzureCredentials; + case: "azureCredentials"; + } + | { + /** + * @generated from field: agent.v1.BedrockCredentials bedrock_credentials = 10; + */ + value: BedrockCredentials; + case: "bedrockCredentials"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ModelDetails. + * Use `create(ModelDetailsSchema)` to create a new message. + */ +export const ModelDetailsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 88); + +/** + * @generated from message agent.v1.RequestedModel + */ +export type RequestedModel = Message<"agent.v1.RequestedModel"> & { + /** + * @generated from field: string model_id = 1; + */ + modelId: string; + + /** + * @generated from field: bool max_mode = 2; + */ + maxMode: boolean; + + /** + * @generated from field: repeated agent.v1.RequestedModel_ModelParameterbytes parameters = 3; + */ + parameters: RequestedModel_ModelParameterbytes[]; + + /** + * @generated from oneof agent.v1.RequestedModel.credentials + */ + credentials: + | { + /** + * @generated from field: agent.v1.ApiKeyCredentials api_key_credentials = 4; + */ + value: ApiKeyCredentials; + case: "apiKeyCredentials"; + } + | { + /** + * @generated from field: agent.v1.AzureCredentials azure_credentials = 5; + */ + value: AzureCredentials; + case: "azureCredentials"; + } + | { + /** + * @generated from field: agent.v1.BedrockCredentials bedrock_credentials = 6; + */ + value: BedrockCredentials; + case: "bedrockCredentials"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.RequestedModel. + * Use `create(RequestedModelSchema)` to create a new message. + */ +export const RequestedModelSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 89); + +/** + * @generated from message agent.v1.RequestedModel_ModelParameterbytes + */ +export type RequestedModel_ModelParameterbytes = Message<"agent.v1.RequestedModel_ModelParameterbytes"> & { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * All paramters are encoded as strings. For boolean parameters, the value is either "true" or "false". For enum parameters, the value is one of the values in the enum. + * + * @generated from field: string value = 2; + */ + value: string; +}; + +/** + * Describes the message agent.v1.RequestedModel_ModelParameterbytes. + * Use `create(RequestedModel_ModelParameterbytesSchema)` to create a new message. + */ +export const RequestedModel_ModelParameterbytesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 90); + +/** + * @generated from message agent.v1.AgentRunRequest + */ +export type AgentRunRequest = Message<"agent.v1.AgentRunRequest"> & { + /** + * @generated from field: agent.v1.ConversationStateStructure conversation_state = 1; + */ + conversationState?: ConversationStateStructure; + + /** + * @generated from field: agent.v1.ConversationAction action = 2; + */ + action?: ConversationAction; + + /** + * TODO: Today we use model_details, but we are getting ready to deprecate that and use requested_model instead. + * + * @generated from field: agent.v1.ModelDetails model_details = 3; + */ + modelDetails?: ModelDetails; + + /** + * @generated from field: optional agent.v1.RequestedModel requested_model = 9; + */ + requestedModel?: RequestedModel; + + /** + * @generated from field: agent.v1.McpTools mcp_tools = 4; + */ + mcpTools?: McpTools; + + /** + * @generated from field: optional string conversation_id = 5; + */ + conversationId?: string; + + /** + * @generated from field: optional agent.v1.McpFileSystemOptions mcp_file_system_options = 6; + */ + mcpFileSystemOptions?: McpFileSystemOptions; + + /** + * Deprecated, use the one in RequestContext message in request_context_exec.proto instead + * + * @generated from field: optional agent.v1.SkillOptions skill_options = 7; + */ + skillOptions?: SkillOptions; + + /** + * Custom system prompt override. Allowlisted for specific teams only. + * + * @generated from field: optional string custom_system_prompt = 8; + */ + customSystemPrompt?: string; +}; + +/** + * Describes the message agent.v1.AgentRunRequest. + * Use `create(AgentRunRequestSchema)` to create a new message. + */ +export const AgentRunRequestSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 91); + +/** + * @generated from message agent.v1.TextDeltaUpdate + */ +export type TextDeltaUpdate = Message<"agent.v1.TextDeltaUpdate"> & { + /** + * @generated from field: string text = 1; + */ + text: string; +}; + +/** + * Describes the message agent.v1.TextDeltaUpdate. + * Use `create(TextDeltaUpdateSchema)` to create a new message. + */ +export const TextDeltaUpdateSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 92); + +/** + * @generated from message agent.v1.ToolCallStartedUpdate + */ +export type ToolCallStartedUpdate = Message<"agent.v1.ToolCallStartedUpdate"> & { + /** + * @generated from field: string call_id = 1; + */ + callId: string; + + /** + * @generated from field: agent.v1.ToolCall tool_call = 2; + */ + toolCall?: ToolCall; + + /** + * groups tool calls that originate from the same model provider call + * + * @generated from field: string model_call_id = 3; + */ + modelCallId: string; +}; + +/** + * Describes the message agent.v1.ToolCallStartedUpdate. + * Use `create(ToolCallStartedUpdateSchema)` to create a new message. + */ +export const ToolCallStartedUpdateSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 93); + +/** + * @generated from message agent.v1.ToolCallCompletedUpdate + */ +export type ToolCallCompletedUpdate = Message<"agent.v1.ToolCallCompletedUpdate"> & { + /** + * @generated from field: string call_id = 1; + */ + callId: string; + + /** + * @generated from field: agent.v1.ToolCall tool_call = 2; + */ + toolCall?: ToolCall; + + /** + * groups tool calls that originate from the same model provider call + * + * @generated from field: string model_call_id = 3; + */ + modelCallId: string; +}; + +/** + * Describes the message agent.v1.ToolCallCompletedUpdate. + * Use `create(ToolCallCompletedUpdateSchema)` to create a new message. + */ +export const ToolCallCompletedUpdateSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 94); + +/** + * @generated from message agent.v1.ToolCallDeltaUpdate + */ +export type ToolCallDeltaUpdate = Message<"agent.v1.ToolCallDeltaUpdate"> & { + /** + * @generated from field: string call_id = 1; + */ + callId: string; + + /** + * @generated from field: agent.v1.ToolCallDelta tool_call_delta = 2; + */ + toolCallDelta?: ToolCallDelta; + + /** + * groups tool calls that originate from the same model provider call + * + * @generated from field: string model_call_id = 3; + */ + modelCallId: string; +}; + +/** + * Describes the message agent.v1.ToolCallDeltaUpdate. + * Use `create(ToolCallDeltaUpdateSchema)` to create a new message. + */ +export const ToolCallDeltaUpdateSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 95); + +/** + * Streaming update for partial tool call arguments + * + * @generated from message agent.v1.PartialToolCallUpdate + */ +export type PartialToolCallUpdate = Message<"agent.v1.PartialToolCallUpdate"> & { + /** + * @generated from field: string call_id = 1; + */ + callId: string; + + /** + * @generated from field: agent.v1.ToolCall tool_call = 2; + */ + toolCall?: ToolCall; + + /** + * Aggregated args text so far (as JSON text). May be incomplete until final tool call. + * + * @generated from field: string args_text_delta = 3; + */ + argsTextDelta: string; + + /** + * groups tool calls that originate from the same model provider call + * + * @generated from field: string model_call_id = 4; + */ + modelCallId: string; +}; + +/** + * Describes the message agent.v1.PartialToolCallUpdate. + * Use `create(PartialToolCallUpdateSchema)` to create a new message. + */ +export const PartialToolCallUpdateSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 96); + +/** + * @generated from message agent.v1.ThinkingDeltaUpdate + */ +export type ThinkingDeltaUpdate = Message<"agent.v1.ThinkingDeltaUpdate"> & { + /** + * @generated from field: string text = 1; + */ + text: string; +}; + +/** + * Describes the message agent.v1.ThinkingDeltaUpdate. + * Use `create(ThinkingDeltaUpdateSchema)` to create a new message. + */ +export const ThinkingDeltaUpdateSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 97); + +/** + * @generated from message agent.v1.ThinkingCompletedUpdate + */ +export type ThinkingCompletedUpdate = Message<"agent.v1.ThinkingCompletedUpdate"> & { + /** + * @generated from field: int32 thinking_duration_ms = 1; + */ + thinkingDurationMs: number; +}; + +/** + * Describes the message agent.v1.ThinkingCompletedUpdate. + * Use `create(ThinkingCompletedUpdateSchema)` to create a new message. + */ +export const ThinkingCompletedUpdateSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 98); + +/** + * @generated from message agent.v1.TokenDeltaUpdate + */ +export type TokenDeltaUpdate = Message<"agent.v1.TokenDeltaUpdate"> & { + /** + * @generated from field: int32 tokens = 1; + */ + tokens: number; +}; + +/** + * Describes the message agent.v1.TokenDeltaUpdate. + * Use `create(TokenDeltaUpdateSchema)` to create a new message. + */ +export const TokenDeltaUpdateSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 99); + +/** + * @generated from message agent.v1.SummaryUpdate + */ +export type SummaryUpdate = Message<"agent.v1.SummaryUpdate"> & { + /** + * @generated from field: string summary = 1; + */ + summary: string; +}; + +/** + * Describes the message agent.v1.SummaryUpdate. + * Use `create(SummaryUpdateSchema)` to create a new message. + */ +export const SummaryUpdateSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 100); + +/** + * @generated from message agent.v1.SummaryStartedUpdate + */ +export type SummaryStartedUpdate = Message<"agent.v1.SummaryStartedUpdate"> & {}; + +/** + * Describes the message agent.v1.SummaryStartedUpdate. + * Use `create(SummaryStartedUpdateSchema)` to create a new message. + */ +export const SummaryStartedUpdateSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 101); + +/** + * @generated from message agent.v1.HeartbeatUpdate + */ +export type HeartbeatUpdate = Message<"agent.v1.HeartbeatUpdate"> & {}; + +/** + * Describes the message agent.v1.HeartbeatUpdate. + * Use `create(HeartbeatUpdateSchema)` to create a new message. + */ +export const HeartbeatUpdateSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 102); + +/** + * @generated from message agent.v1.SummaryCompletedUpdate + */ +export type SummaryCompletedUpdate = Message<"agent.v1.SummaryCompletedUpdate"> & {}; + +/** + * Describes the message agent.v1.SummaryCompletedUpdate. + * Use `create(SummaryCompletedUpdateSchema)` to create a new message. + */ +export const SummaryCompletedUpdateSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 103); + +/** + * @generated from message agent.v1.ShellOutputDeltaUpdate + */ +export type ShellOutputDeltaUpdate = Message<"agent.v1.ShellOutputDeltaUpdate"> & { + /** + * @generated from oneof agent.v1.ShellOutputDeltaUpdate.event + */ + event: + | { + /** + * @generated from field: agent.v1.ShellStreamStdout stdout = 1; + */ + value: ShellStreamStdout; + case: "stdout"; + } + | { + /** + * @generated from field: agent.v1.ShellStreamStderr stderr = 2; + */ + value: ShellStreamStderr; + case: "stderr"; + } + | { + /** + * @generated from field: agent.v1.ShellStreamExit exit = 3; + */ + value: ShellStreamExit; + case: "exit"; + } + | { + /** + * @generated from field: agent.v1.ShellStreamStart start = 4; + */ + value: ShellStreamStart; + case: "start"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ShellOutputDeltaUpdate. + * Use `create(ShellOutputDeltaUpdateSchema)` to create a new message. + */ +export const ShellOutputDeltaUpdateSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 104); + +/** + * @generated from message agent.v1.TurnEndedUpdate + */ +export type TurnEndedUpdate = Message<"agent.v1.TurnEndedUpdate"> & {}; + +/** + * Describes the message agent.v1.TurnEndedUpdate. + * Use `create(TurnEndedUpdateSchema)` to create a new message. + */ +export const TurnEndedUpdateSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 105); + +/** + * Only: user message appended update + * + * @generated from message agent.v1.UserMessageAppendedUpdate + */ +export type UserMessageAppendedUpdate = Message<"agent.v1.UserMessageAppendedUpdate"> & { + /** + * @generated from field: agent.v1.UserMessage user_message = 1; + */ + userMessage?: UserMessage; +}; + +/** + * Describes the message agent.v1.UserMessageAppendedUpdate. + * Use `create(UserMessageAppendedUpdateSchema)` to create a new message. + */ +export const UserMessageAppendedUpdateSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 106); + +/** + * @generated from message agent.v1.StepStartedUpdate + */ +export type StepStartedUpdate = Message<"agent.v1.StepStartedUpdate"> & { + /** + * @generated from field: uint64 step_id = 1; + */ + stepId: bigint; +}; + +/** + * Describes the message agent.v1.StepStartedUpdate. + * Use `create(StepStartedUpdateSchema)` to create a new message. + */ +export const StepStartedUpdateSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 107); + +/** + * @generated from message agent.v1.StepCompletedUpdate + */ +export type StepCompletedUpdate = Message<"agent.v1.StepCompletedUpdate"> & { + /** + * @generated from field: uint64 step_id = 1; + */ + stepId: bigint; + + /** + * @generated from field: int64 step_duration_ms = 2; + */ + stepDurationMs: bigint; +}; + +/** + * Describes the message agent.v1.StepCompletedUpdate. + * Use `create(StepCompletedUpdateSchema)` to create a new message. + */ +export const StepCompletedUpdateSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 108); + +/** + * @generated from message agent.v1.InteractionUpdate + */ +export type InteractionUpdate = Message<"agent.v1.InteractionUpdate"> & { + /** + * @generated from oneof agent.v1.InteractionUpdate.message + */ + message: + | { + /** + * @generated from field: agent.v1.TextDeltaUpdate text_delta = 1; + */ + value: TextDeltaUpdate; + case: "textDelta"; + } + | { + /** + * @generated from field: agent.v1.PartialToolCallUpdate partial_tool_call = 7; + */ + value: PartialToolCallUpdate; + case: "partialToolCall"; + } + | { + /** + * @generated from field: agent.v1.ToolCallDeltaUpdate tool_call_delta = 15; + */ + value: ToolCallDeltaUpdate; + case: "toolCallDelta"; + } + | { + /** + * @generated from field: agent.v1.ToolCallStartedUpdate tool_call_started = 2; + */ + value: ToolCallStartedUpdate; + case: "toolCallStarted"; + } + | { + /** + * @generated from field: agent.v1.ToolCallCompletedUpdate tool_call_completed = 3; + */ + value: ToolCallCompletedUpdate; + case: "toolCallCompleted"; + } + | { + /** + * @generated from field: agent.v1.ThinkingDeltaUpdate thinking_delta = 4; + */ + value: ThinkingDeltaUpdate; + case: "thinkingDelta"; + } + | { + /** + * @generated from field: agent.v1.ThinkingCompletedUpdate thinking_completed = 5; + */ + value: ThinkingCompletedUpdate; + case: "thinkingCompleted"; + } + | { + /** + * @generated from field: agent.v1.UserMessageAppendedUpdate user_message_appended = 6; + */ + value: UserMessageAppendedUpdate; + case: "userMessageAppended"; + } + | { + /** + * @generated from field: agent.v1.TokenDeltaUpdate token_delta = 8; + */ + value: TokenDeltaUpdate; + case: "tokenDelta"; + } + | { + /** + * @generated from field: agent.v1.SummaryUpdate summary = 9; + */ + value: SummaryUpdate; + case: "summary"; + } + | { + /** + * @generated from field: agent.v1.SummaryStartedUpdate summary_started = 10; + */ + value: SummaryStartedUpdate; + case: "summaryStarted"; + } + | { + /** + * @generated from field: agent.v1.SummaryCompletedUpdate summary_completed = 11; + */ + value: SummaryCompletedUpdate; + case: "summaryCompleted"; + } + | { + /** + * @generated from field: agent.v1.ShellOutputDeltaUpdate shell_output_delta = 12; + */ + value: ShellOutputDeltaUpdate; + case: "shellOutputDelta"; + } + | { + /** + * @generated from field: agent.v1.HeartbeatUpdate heartbeat = 13; + */ + value: HeartbeatUpdate; + case: "heartbeat"; + } + | { + /** + * @generated from field: agent.v1.TurnEndedUpdate turn_ended = 14; + */ + value: TurnEndedUpdate; + case: "turnEnded"; + } + | { + /** + * @generated from field: agent.v1.StepStartedUpdate step_started = 16; + */ + value: StepStartedUpdate; + case: "stepStarted"; + } + | { + /** + * @generated from field: agent.v1.StepCompletedUpdate step_completed = 17; + */ + value: StepCompletedUpdate; + case: "stepCompleted"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.InteractionUpdate. + * Use `create(InteractionUpdateSchema)` to create a new message. + */ +export const InteractionUpdateSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 109); + +/** + * Interaction query messages for bidirectional communication + * + * @generated from message agent.v1.InteractionQuery + */ +export type InteractionQuery = Message<"agent.v1.InteractionQuery"> & { + /** + * @generated from field: uint32 id = 1; + */ + id: number; + + /** + * @generated from oneof agent.v1.InteractionQuery.query + */ + query: + | { + /** + * @generated from field: agent.v1.WebSearchRequestQuery web_search_request_query = 2; + */ + value: WebSearchRequestQuery; + case: "webSearchRequestQuery"; + } + | { + /** + * @generated from field: agent.v1.AskQuestionInteractionQuery ask_question_interaction_query = 3; + */ + value: AskQuestionInteractionQuery; + case: "askQuestionInteractionQuery"; + } + | { + /** + * @generated from field: agent.v1.SwitchModeRequestQuery switch_mode_request_query = 4; + */ + value: SwitchModeRequestQuery; + case: "switchModeRequestQuery"; + } + | { + /** + * @generated from field: agent.v1.ExaSearchRequestQuery exa_search_request_query = 5; + */ + value: ExaSearchRequestQuery; + case: "exaSearchRequestQuery"; + } + | { + /** + * @generated from field: agent.v1.ExaFetchRequestQuery exa_fetch_request_query = 6; + */ + value: ExaFetchRequestQuery; + case: "exaFetchRequestQuery"; + } + | { + /** + * @generated from field: agent.v1.CreatePlanRequestQuery create_plan_request_query = 7; + */ + value: CreatePlanRequestQuery; + case: "createPlanRequestQuery"; + } + | { + /** + * @generated from field: agent.v1.SetupVmEnvironmentArgs setup_vm_environment_args = 8; + */ + value: SetupVmEnvironmentArgs; + case: "setupVmEnvironmentArgs"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.InteractionQuery. + * Use `create(InteractionQuerySchema)` to create a new message. + */ +export const InteractionQuerySchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 110); + +/** + * @generated from message agent.v1.InteractionResponse + */ +export type InteractionResponse = Message<"agent.v1.InteractionResponse"> & { + /** + * @generated from field: uint32 id = 1; + */ + id: number; + + /** + * @generated from oneof agent.v1.InteractionResponse.result + */ + result: + | { + /** + * @generated from field: agent.v1.WebSearchRequestResponse web_search_request_response = 2; + */ + value: WebSearchRequestResponse; + case: "webSearchRequestResponse"; + } + | { + /** + * @generated from field: agent.v1.AskQuestionInteractionResponse ask_question_interaction_response = 3; + */ + value: AskQuestionInteractionResponse; + case: "askQuestionInteractionResponse"; + } + | { + /** + * @generated from field: agent.v1.SwitchModeRequestResponse switch_mode_request_response = 4; + */ + value: SwitchModeRequestResponse; + case: "switchModeRequestResponse"; + } + | { + /** + * @generated from field: agent.v1.ExaSearchRequestResponse exa_search_request_response = 5; + */ + value: ExaSearchRequestResponse; + case: "exaSearchRequestResponse"; + } + | { + /** + * @generated from field: agent.v1.ExaFetchRequestResponse exa_fetch_request_response = 6; + */ + value: ExaFetchRequestResponse; + case: "exaFetchRequestResponse"; + } + | { + /** + * @generated from field: agent.v1.CreatePlanRequestResponse create_plan_request_response = 7; + */ + value: CreatePlanRequestResponse; + case: "createPlanRequestResponse"; + } + | { + /** + * @generated from field: agent.v1.SetupVmEnvironmentResult setup_vm_environment_result = 8; + */ + value: SetupVmEnvironmentResult; + case: "setupVmEnvironmentResult"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.InteractionResponse. + * Use `create(InteractionResponseSchema)` to create a new message. + */ +export const InteractionResponseSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 111); + +/** + * @generated from message agent.v1.AskQuestionInteractionQuery + */ +export type AskQuestionInteractionQuery = Message<"agent.v1.AskQuestionInteractionQuery"> & { + /** + * @generated from field: agent.v1.AskQuestionArgs args = 1; + */ + args?: AskQuestionArgs; + + /** + * @generated from field: string tool_call_id = 2; + */ + toolCallId: string; +}; + +/** + * Describes the message agent.v1.AskQuestionInteractionQuery. + * Use `create(AskQuestionInteractionQuerySchema)` to create a new message. + */ +export const AskQuestionInteractionQuerySchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 112); + +/** + * @generated from message agent.v1.AskQuestionInteractionResponse + */ +export type AskQuestionInteractionResponse = Message<"agent.v1.AskQuestionInteractionResponse"> & { + /** + * @generated from field: agent.v1.AskQuestionResult result = 1; + */ + result?: AskQuestionResult; +}; + +/** + * Describes the message agent.v1.AskQuestionInteractionResponse. + * Use `create(AskQuestionInteractionResponseSchema)` to create a new message. + */ +export const AskQuestionInteractionResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 113); + +/** + * @generated from message agent.v1.ClientHeartbeat + */ +export type ClientHeartbeat = Message<"agent.v1.ClientHeartbeat"> & {}; + +/** + * Describes the message agent.v1.ClientHeartbeat. + * Use `create(ClientHeartbeatSchema)` to create a new message. + */ +export const ClientHeartbeatSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 114); + +/** + * Prewarm request - sent before the actual action to prepare the backend Contains all config needed for auth, model routing, and session building The actual ConversationAction is sent separately after prewarming completes + * + * @generated from message agent.v1.PrewarmRequest + */ +export type PrewarmRequest = Message<"agent.v1.PrewarmRequest"> & { + /** + * @generated from field: agent.v1.ModelDetails model_details = 1; + */ + modelDetails?: ModelDetails; + + /** + * @generated from field: optional agent.v1.RequestedModel requested_model = 9; + */ + requestedModel?: RequestedModel; + + /** + * @generated from field: optional string conversation_id = 2; + */ + conversationId?: string; + + /** + * @generated from field: agent.v1.ConversationStateStructure conversation_state = 3; + */ + conversationState?: ConversationStateStructure; + + /** + * @generated from field: agent.v1.McpTools mcp_tools = 4; + */ + mcpTools?: McpTools; + + /** + * @generated from field: optional agent.v1.McpFileSystemOptions mcp_file_system_options = 5; + */ + mcpFileSystemOptions?: McpFileSystemOptions; + + /** + * Best-of-N context for usage billing (same fields as UserMessage) + * + * @generated from field: optional string best_of_n_group_id = 6; + */ + bestOfNGroupId?: string; + + /** + * @generated from field: optional bool try_use_best_of_n_promotion = 7; + */ + tryUseBestOfNPromotion?: boolean; + + /** + * Custom system prompt override. Allowlisted for specific teams only. + * + * @generated from field: optional string custom_system_prompt = 8; + */ + customSystemPrompt?: string; +}; + +/** + * Describes the message agent.v1.PrewarmRequest. + * Use `create(PrewarmRequestSchema)` to create a new message. + */ +export const PrewarmRequestSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 115); + +/** + * @generated from message agent.v1.ExecServerAbort + */ +export type ExecServerAbort = Message<"agent.v1.ExecServerAbort"> & { + /** + * @generated from field: uint32 id = 1; + */ + id: number; +}; + +/** + * Describes the message agent.v1.ExecServerAbort. + * Use `create(ExecServerAbortSchema)` to create a new message. + */ +export const ExecServerAbortSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 116); + +/** + * @generated from message agent.v1.ExecServerControlMessage + */ +export type ExecServerControlMessage = Message<"agent.v1.ExecServerControlMessage"> & { + /** + * @generated from oneof agent.v1.ExecServerControlMessage.message + */ + message: + | { + /** + * @generated from field: agent.v1.ExecServerAbort abort = 1; + */ + value: ExecServerAbort; + case: "abort"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ExecServerControlMessage. + * Use `create(ExecServerControlMessageSchema)` to create a new message. + */ +export const ExecServerControlMessageSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 117); + +/** + * @generated from message agent.v1.AgentClientMessage + */ +export type AgentClientMessage = Message<"agent.v1.AgentClientMessage"> & { + /** + * @generated from oneof agent.v1.AgentClientMessage.message + */ + message: + | { + /** + * @generated from field: agent.v1.AgentRunRequest run_request = 1; + */ + value: AgentRunRequest; + case: "runRequest"; + } + | { + /** + * @generated from field: agent.v1.ExecClientMessage exec_client_message = 2; + */ + value: ExecClientMessage; + case: "execClientMessage"; + } + | { + /** + * @generated from field: agent.v1.ExecClientControlMessage exec_client_control_message = 5; + */ + value: ExecClientControlMessage; + case: "execClientControlMessage"; + } + | { + /** + * @generated from field: agent.v1.KvClientMessage kv_client_message = 3; + */ + value: KvClientMessage; + case: "kvClientMessage"; + } + | { + /** + * @generated from field: agent.v1.ConversationAction conversation_action = 4; + */ + value: ConversationAction; + case: "conversationAction"; + } + | { + /** + * @generated from field: agent.v1.InteractionResponse interaction_response = 6; + */ + value: InteractionResponse; + case: "interactionResponse"; + } + | { + /** + * @generated from field: agent.v1.ClientHeartbeat client_heartbeat = 7; + */ + value: ClientHeartbeat; + case: "clientHeartbeat"; + } + | { + /** + * @generated from field: agent.v1.PrewarmRequest prewarm_request = 8; + */ + value: PrewarmRequest; + case: "prewarmRequest"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.AgentClientMessage. + * Use `create(AgentClientMessageSchema)` to create a new message. + */ +export const AgentClientMessageSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 118); + +/** + * @generated from message agent.v1.AgentServerMessage + */ +export type AgentServerMessage = Message<"agent.v1.AgentServerMessage"> & { + /** + * @generated from oneof agent.v1.AgentServerMessage.message + */ + message: + | { + /** + * @generated from field: agent.v1.InteractionUpdate interaction_update = 1; + */ + value: InteractionUpdate; + case: "interactionUpdate"; + } + | { + /** + * @generated from field: agent.v1.ExecServerMessage exec_server_message = 2; + */ + value: ExecServerMessage; + case: "execServerMessage"; + } + | { + /** + * @generated from field: agent.v1.ExecServerControlMessage exec_server_control_message = 5; + */ + value: ExecServerControlMessage; + case: "execServerControlMessage"; + } + | { + /** + * @generated from field: agent.v1.ConversationStateStructure conversation_checkpoint_update = 3; + */ + value: ConversationStateStructure; + case: "conversationCheckpointUpdate"; + } + | { + /** + * @generated from field: agent.v1.KvServerMessage kv_server_message = 4; + */ + value: KvServerMessage; + case: "kvServerMessage"; + } + | { + /** + * @generated from field: agent.v1.InteractionQuery interaction_query = 7; + */ + value: InteractionQuery; + case: "interactionQuery"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.AgentServerMessage. + * Use `create(AgentServerMessageSchema)` to create a new message. + */ +export const AgentServerMessageSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 119); + +/** + * New unary API for naming an agent from a user message + * + * @generated from message agent.v1.NameAgentRequest + */ +export type NameAgentRequest = Message<"agent.v1.NameAgentRequest"> & { + /** + * @generated from field: string user_message = 1; + */ + userMessage: string; +}; + +/** + * Describes the message agent.v1.NameAgentRequest. + * Use `create(NameAgentRequestSchema)` to create a new message. + */ +export const NameAgentRequestSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 120); + +/** + * @generated from message agent.v1.NameAgentResponse + */ +export type NameAgentResponse = Message<"agent.v1.NameAgentResponse"> & { + /** + * @generated from field: string name = 1; + */ + name: string; +}; + +/** + * Describes the message agent.v1.NameAgentResponse. + * Use `create(NameAgentResponseSchema)` to create a new message. + */ +export const NameAgentResponseSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 121); + +/** + * @generated from message agent.v1.GetUsableModelsRequest + */ +export type GetUsableModelsRequest = Message<"agent.v1.GetUsableModelsRequest"> & { + /** + * Not used right now, but can use to populate info about custom models the user passes in that we don't send down by default + * + * @generated from field: repeated string custom_model_ids = 1; + */ + customModelIds: string[]; +}; + +/** + * Describes the message agent.v1.GetUsableModelsRequest. + * Use `create(GetUsableModelsRequestSchema)` to create a new message. + */ +export const GetUsableModelsRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 122); + +/** + * @generated from message agent.v1.GetUsableModelsResponse + */ +export type GetUsableModelsResponse = Message<"agent.v1.GetUsableModelsResponse"> & { + /** + * @generated from field: repeated agent.v1.ModelDetails models = 1; + */ + models: ModelDetails[]; +}; + +/** + * Describes the message agent.v1.GetUsableModelsResponse. + * Use `create(GetUsableModelsResponseSchema)` to create a new message. + */ +export const GetUsableModelsResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 123); + +/** + * @generated from message agent.v1.GetDefaultModelForCliRequest + */ +export type GetDefaultModelForCliRequest = Message<"agent.v1.GetDefaultModelForCliRequest"> & {}; + +/** + * Describes the message agent.v1.GetDefaultModelForCliRequest. + * Use `create(GetDefaultModelForCliRequestSchema)` to create a new message. + */ +export const GetDefaultModelForCliRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 124); + +/** + * @generated from message agent.v1.GetDefaultModelForCliResponse + */ +export type GetDefaultModelForCliResponse = Message<"agent.v1.GetDefaultModelForCliResponse"> & { + /** + * @generated from field: agent.v1.ModelDetails model = 1; + */ + model?: ModelDetails; +}; + +/** + * Describes the message agent.v1.GetDefaultModelForCliResponse. + * Use `create(GetDefaultModelForCliResponseSchema)` to create a new message. + */ +export const GetDefaultModelForCliResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 125); + +/** + * Internal endpoint: returns all allowed model intents for devs + * + * @generated from message agent.v1.GetAllowedModelIntentsRequest + */ +export type GetAllowedModelIntentsRequest = Message<"agent.v1.GetAllowedModelIntentsRequest"> & {}; + +/** + * Describes the message agent.v1.GetAllowedModelIntentsRequest. + * Use `create(GetAllowedModelIntentsRequestSchema)` to create a new message. + */ +export const GetAllowedModelIntentsRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 126); + +/** + * @generated from message agent.v1.GetAllowedModelIntentsResponse + */ +export type GetAllowedModelIntentsResponse = Message<"agent.v1.GetAllowedModelIntentsResponse"> & { + /** + * @generated from field: repeated string model_intents = 1; + */ + modelIntents: string[]; +}; + +/** + * Describes the message agent.v1.GetAllowedModelIntentsResponse. + * Use `create(GetAllowedModelIntentsResponseSchema)` to create a new message. + */ +export const GetAllowedModelIntentsResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 127); + +/** + * IDE state persistence for clients (CLI / VSCode integration) Mirrors a subset of aiserver.v1.ConversationMessage.IdeEditorsState, but only contains the recently viewed files and avoids any deprecated fields. + * + * @generated from message agent.v1.IdeEditorsStateFile + */ +export type IdeEditorsStateFile = Message<"agent.v1.IdeEditorsStateFile"> & { + /** + * @generated from field: string relative_path = 1; + */ + relativePath: string; + + /** + * @generated from field: string absolute_path = 2; + */ + absolutePath: string; + + /** + * @generated from field: optional bool is_currently_focused = 3; + */ + isCurrentlyFocused?: boolean; + + /** + * @generated from field: optional int32 current_line_number = 4; + */ + currentLineNumber?: number; + + /** + * @generated from field: optional string current_line_text = 5; + */ + currentLineText?: string; + + /** + * @generated from field: optional int32 line_count = 6; + */ + lineCount?: number; +}; + +/** + * Describes the message agent.v1.IdeEditorsStateFile. + * Use `create(IdeEditorsStateFileSchema)` to create a new message. + */ +export const IdeEditorsStateFileSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 128); + +/** + * @generated from message agent.v1.IdeEditorsStateLite + */ +export type IdeEditorsStateLite = Message<"agent.v1.IdeEditorsStateLite"> & { + /** + * @generated from field: repeated agent.v1.IdeEditorsStateFile recently_viewed_files = 1; + */ + recentlyViewedFiles: IdeEditorsStateFile[]; +}; + +/** + * Describes the message agent.v1.IdeEditorsStateLite. + * Use `create(IdeEditorsStateLiteSchema)` to create a new message. + */ +export const IdeEditorsStateLiteSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 129); + +/** + * @generated from message agent.v1.ApplyAgentDiffToolCall + */ +export type ApplyAgentDiffToolCall = Message<"agent.v1.ApplyAgentDiffToolCall"> & { + /** + * @generated from field: agent.v1.ApplyAgentDiffArgs args = 1; + */ + args?: ApplyAgentDiffArgs; + + /** + * @generated from field: agent.v1.ApplyAgentDiffResult result = 2; + */ + result?: ApplyAgentDiffResult; +}; + +/** + * Describes the message agent.v1.ApplyAgentDiffToolCall. + * Use `create(ApplyAgentDiffToolCallSchema)` to create a new message. + */ +export const ApplyAgentDiffToolCallSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 130); + +/** + * @generated from message agent.v1.ApplyAgentDiffArgs + */ +export type ApplyAgentDiffArgs = Message<"agent.v1.ApplyAgentDiffArgs"> & { + /** + * @generated from field: string agent_id = 1; + */ + agentId: string; +}; + +/** + * Describes the message agent.v1.ApplyAgentDiffArgs. + * Use `create(ApplyAgentDiffArgsSchema)` to create a new message. + */ +export const ApplyAgentDiffArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 131); + +/** + * @generated from message agent.v1.ApplyAgentDiffResult + */ +export type ApplyAgentDiffResult = Message<"agent.v1.ApplyAgentDiffResult"> & { + /** + * @generated from oneof agent.v1.ApplyAgentDiffResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.ApplyAgentDiffSuccess success = 1; + */ + value: ApplyAgentDiffSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.ApplyAgentDiffError error = 2; + */ + value: ApplyAgentDiffError; + case: "error"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ApplyAgentDiffResult. + * Use `create(ApplyAgentDiffResultSchema)` to create a new message. + */ +export const ApplyAgentDiffResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 132); + +/** + * @generated from message agent.v1.ApplyAgentDiffSuccess + */ +export type ApplyAgentDiffSuccess = Message<"agent.v1.ApplyAgentDiffSuccess"> & { + /** + * @generated from field: repeated agent.v1.AppliedAgentChange applied_changes = 1; + */ + appliedChanges: AppliedAgentChange[]; +}; + +/** + * Describes the message agent.v1.ApplyAgentDiffSuccess. + * Use `create(ApplyAgentDiffSuccessSchema)` to create a new message. + */ +export const ApplyAgentDiffSuccessSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 133); + +/** + * @generated from message agent.v1.AppliedAgentChange + */ +export type AppliedAgentChange = Message<"agent.v1.AppliedAgentChange"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: int32 change_type = 2; + */ + changeType: number; + + /** + * @generated from field: optional string before_content = 3; + */ + beforeContent?: string; + + /** + * @generated from field: optional string after_content = 4; + */ + afterContent?: string; + + /** + * @generated from field: optional string error = 5; + */ + error?: string; + + /** + * Detailed result message from the execution (e.g., "Successfully deleted file: path (123 bytes)") + * + * @generated from field: optional string message_for_model = 6; + */ + messageForModel?: string; +}; + +/** + * Describes the message agent.v1.AppliedAgentChange. + * Use `create(AppliedAgentChangeSchema)` to create a new message. + */ +export const AppliedAgentChangeSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 134); + +/** + * @generated from message agent.v1.ApplyAgentDiffError + */ +export type ApplyAgentDiffError = Message<"agent.v1.ApplyAgentDiffError"> & { + /** + * @generated from field: string error = 1; + */ + error: string; + + /** + * @generated from field: repeated agent.v1.AppliedAgentChange applied_changes = 2; + */ + appliedChanges: AppliedAgentChange[]; +}; + +/** + * Describes the message agent.v1.ApplyAgentDiffError. + * Use `create(ApplyAgentDiffErrorSchema)` to create a new message. + */ +export const ApplyAgentDiffErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 135); + +/** + * @generated from message agent.v1.AskQuestionToolCall + */ +export type AskQuestionToolCall = Message<"agent.v1.AskQuestionToolCall"> & { + /** + * @generated from field: agent.v1.AskQuestionArgs args = 1; + */ + args?: AskQuestionArgs; + + /** + * @generated from field: agent.v1.AskQuestionResult result = 2; + */ + result?: AskQuestionResult; +}; + +/** + * Describes the message agent.v1.AskQuestionToolCall. + * Use `create(AskQuestionToolCallSchema)` to create a new message. + */ +export const AskQuestionToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 136); + +/** + * @generated from message agent.v1.AskQuestionArgs + */ +export type AskQuestionArgs = Message<"agent.v1.AskQuestionArgs"> & { + /** + * optional form title + * + * @generated from field: string title = 1; + */ + title: string; + + /** + * 1+ questions + * + * @generated from field: repeated agent.v1.AskQuestionArgs_Question questions = 2; + */ + questions: AskQuestionArgs_Question[]; + + /** + * if true, return immediately with async marker instead of blocking + * + * @generated from field: bool run_async = 5; + */ + runAsync: boolean; + + /** + * if set, indicates this is a synthetic completion for the original async tool call with this ID + * + * @generated from field: string async_original_tool_call_id = 6; + */ + asyncOriginalToolCallId: string; +}; + +/** + * Describes the message agent.v1.AskQuestionArgs. + * Use `create(AskQuestionArgsSchema)` to create a new message. + */ +export const AskQuestionArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 137); + +/** + * @generated from message agent.v1.AskQuestionArgs_Question + */ +export type AskQuestionArgs_Question = Message<"agent.v1.AskQuestionArgs_Question"> & { + /** + * unique, model-provided + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * the question text + * + * @generated from field: string prompt = 2; + */ + prompt: string; + + /** + * choices + * + * @generated from field: repeated agent.v1.AskQuestionArgs_Option options = 3; + */ + options: AskQuestionArgs_Option[]; + + /** + * multi-select vs single-select + * + * @generated from field: bool allow_multiple = 4; + */ + allowMultiple: boolean; +}; + +/** + * Describes the message agent.v1.AskQuestionArgs_Question. + * Use `create(AskQuestionArgs_QuestionSchema)` to create a new message. + */ +export const AskQuestionArgs_QuestionSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 138); + +/** + * @generated from message agent.v1.AskQuestionArgs_Option + */ +export type AskQuestionArgs_Option = Message<"agent.v1.AskQuestionArgs_Option"> & { + /** + * stable option id + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * display text + * + * @generated from field: string label = 2; + */ + label: string; +}; + +/** + * Describes the message agent.v1.AskQuestionArgs_Option. + * Use `create(AskQuestionArgs_OptionSchema)` to create a new message. + */ +export const AskQuestionArgs_OptionSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 139); + +/** + * Marker indicating that questions have been sent asynchronously Answers will arrive later as a separate ask_question tool call + * + * @generated from message agent.v1.AskQuestionAsync + */ +export type AskQuestionAsync = Message<"agent.v1.AskQuestionAsync"> & {}; + +/** + * Describes the message agent.v1.AskQuestionAsync. + * Use `create(AskQuestionAsyncSchema)` to create a new message. + */ +export const AskQuestionAsyncSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 140); + +/** + * @generated from message agent.v1.AskQuestionResult + */ +export type AskQuestionResult = Message<"agent.v1.AskQuestionResult"> & { + /** + * @generated from oneof agent.v1.AskQuestionResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.AskQuestionSuccess success = 1; + */ + value: AskQuestionSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.AskQuestionError error = 2; + */ + value: AskQuestionError; + case: "error"; + } + | { + /** + * @generated from field: agent.v1.AskQuestionRejected rejected = 3; + */ + value: AskQuestionRejected; + case: "rejected"; + } + | { + /** + * @generated from field: agent.v1.AskQuestionAsync async = 4; + */ + value: AskQuestionAsync; + case: "async"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.AskQuestionResult. + * Use `create(AskQuestionResultSchema)` to create a new message. + */ +export const AskQuestionResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 141); + +/** + * @generated from message agent.v1.AskQuestionSuccess + */ +export type AskQuestionSuccess = Message<"agent.v1.AskQuestionSuccess"> & { + /** + * @generated from field: repeated agent.v1.AskQuestionSuccess_Answer answers = 1; + */ + answers: AskQuestionSuccess_Answer[]; +}; + +/** + * Describes the message agent.v1.AskQuestionSuccess. + * Use `create(AskQuestionSuccessSchema)` to create a new message. + */ +export const AskQuestionSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 142); + +/** + * @generated from message agent.v1.AskQuestionSuccess_Answer + */ +export type AskQuestionSuccess_Answer = Message<"agent.v1.AskQuestionSuccess_Answer"> & { + /** + * @generated from field: string question_id = 1; + */ + questionId: string; + + /** + * empty if unanswered + * + * @generated from field: repeated string selected_option_ids = 2; + */ + selectedOptionIds: string[]; +}; + +/** + * Describes the message agent.v1.AskQuestionSuccess_Answer. + * Use `create(AskQuestionSuccess_AnswerSchema)` to create a new message. + */ +export const AskQuestionSuccess_AnswerSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 143); + +/** + * @generated from message agent.v1.AskQuestionError + */ +export type AskQuestionError = Message<"agent.v1.AskQuestionError"> & { + /** + * @generated from field: string error_message = 1; + */ + errorMessage: string; +}; + +/** + * Describes the message agent.v1.AskQuestionError. + * Use `create(AskQuestionErrorSchema)` to create a new message. + */ +export const AskQuestionErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 144); + +/** + * @generated from message agent.v1.AskQuestionRejected + */ +export type AskQuestionRejected = Message<"agent.v1.AskQuestionRejected"> & { + /** + * @generated from field: string reason = 1; + */ + reason: string; +}; + +/** + * Describes the message agent.v1.AskQuestionRejected. + * Use `create(AskQuestionRejectedSchema)` to create a new message. + */ +export const AskQuestionRejectedSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 145); + +/** + * @generated from message agent.v1.BackgroundShellSpawnArgs + */ +export type BackgroundShellSpawnArgs = Message<"agent.v1.BackgroundShellSpawnArgs"> & { + /** + * @generated from field: string command = 1; + */ + command: string; + + /** + * @generated from field: string working_directory = 2; + */ + workingDirectory: string; + + /** + * @generated from field: string tool_call_id = 3; + */ + toolCallId: string; + + /** + * @generated from field: agent.v1.ShellCommandParsingResult parsing_result = 4; + */ + parsingResult?: ShellCommandParsingResult; + + /** + * @generated from field: optional agent.v1.SandboxPolicy sandbox_policy = 5; + */ + sandboxPolicy?: SandboxPolicy; + + /** + * @generated from field: bool enable_write_shell_stdin_tool = 6; + */ + enableWriteShellStdinTool: boolean; +}; + +/** + * Describes the message agent.v1.BackgroundShellSpawnArgs. + * Use `create(BackgroundShellSpawnArgsSchema)` to create a new message. + */ +export const BackgroundShellSpawnArgsSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 146); + +/** + * Result of spawning a background shell + * + * @generated from message agent.v1.BackgroundShellSpawnResult + */ +export type BackgroundShellSpawnResult = Message<"agent.v1.BackgroundShellSpawnResult"> & { + /** + * @generated from oneof agent.v1.BackgroundShellSpawnResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.BackgroundShellSpawnSuccess success = 1; + */ + value: BackgroundShellSpawnSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.BackgroundShellSpawnError error = 2; + */ + value: BackgroundShellSpawnError; + case: "error"; + } + | { + /** + * @generated from field: agent.v1.ShellRejected rejected = 3; + */ + value: ShellRejected; + case: "rejected"; + } + | { + /** + * @generated from field: agent.v1.ShellPermissionDenied permission_denied = 4; + */ + value: ShellPermissionDenied; + case: "permissionDenied"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.BackgroundShellSpawnResult. + * Use `create(BackgroundShellSpawnResultSchema)` to create a new message. + */ +export const BackgroundShellSpawnResultSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 147); + +/** + * @generated from message agent.v1.BackgroundShellSpawnSuccess + */ +export type BackgroundShellSpawnSuccess = Message<"agent.v1.BackgroundShellSpawnSuccess"> & { + /** + * @generated from field: uint32 shell_id = 1; + */ + shellId: number; + + /** + * @generated from field: string command = 2; + */ + command: string; + + /** + * @generated from field: string working_directory = 3; + */ + workingDirectory: string; + + /** + * Process ID of the spawned shell + * + * @generated from field: optional uint32 pid = 4; + */ + pid?: number; +}; + +/** + * Describes the message agent.v1.BackgroundShellSpawnSuccess. + * Use `create(BackgroundShellSpawnSuccessSchema)` to create a new message. + */ +export const BackgroundShellSpawnSuccessSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 148); + +/** + * @generated from message agent.v1.BackgroundShellSpawnError + */ +export type BackgroundShellSpawnError = Message<"agent.v1.BackgroundShellSpawnError"> & { + /** + * @generated from field: string command = 1; + */ + command: string; + + /** + * @generated from field: string working_directory = 2; + */ + workingDirectory: string; + + /** + * @generated from field: string error = 3; + */ + error: string; +}; + +/** + * Describes the message agent.v1.BackgroundShellSpawnError. + * Use `create(BackgroundShellSpawnErrorSchema)` to create a new message. + */ +export const BackgroundShellSpawnErrorSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 149); + +/** + * @generated from message agent.v1.WriteShellStdinArgs + */ +export type WriteShellStdinArgs = Message<"agent.v1.WriteShellStdinArgs"> & { + /** + * @generated from field: uint32 shell_id = 1; + */ + shellId: number; + + /** + * @generated from field: string chars = 2; + */ + chars: string; +}; + +/** + * Describes the message agent.v1.WriteShellStdinArgs. + * Use `create(WriteShellStdinArgsSchema)` to create a new message. + */ +export const WriteShellStdinArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 150); + +/** + * @generated from message agent.v1.WriteShellStdinResult + */ +export type WriteShellStdinResult = Message<"agent.v1.WriteShellStdinResult"> & { + /** + * @generated from oneof agent.v1.WriteShellStdinResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.WriteShellStdinSuccess success = 1; + */ + value: WriteShellStdinSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.WriteShellStdinError error = 2; + */ + value: WriteShellStdinError; + case: "error"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.WriteShellStdinResult. + * Use `create(WriteShellStdinResultSchema)` to create a new message. + */ +export const WriteShellStdinResultSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 151); + +/** + * @generated from message agent.v1.WriteShellStdinSuccess + */ +export type WriteShellStdinSuccess = Message<"agent.v1.WriteShellStdinSuccess"> & { + /** + * @generated from field: uint32 shell_id = 1; + */ + shellId: number; + + /** + * @generated from field: uint32 terminal_file_length_before_input_written = 2; + */ + terminalFileLengthBeforeInputWritten: number; +}; + +/** + * Describes the message agent.v1.WriteShellStdinSuccess. + * Use `create(WriteShellStdinSuccessSchema)` to create a new message. + */ +export const WriteShellStdinSuccessSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 152); + +/** + * @generated from message agent.v1.WriteShellStdinError + */ +export type WriteShellStdinError = Message<"agent.v1.WriteShellStdinError"> & { + /** + * @generated from field: string error = 1; + */ + error: string; +}; + +/** + * Describes the message agent.v1.WriteShellStdinError. + * Use `create(WriteShellStdinErrorSchema)` to create a new message. + */ +export const WriteShellStdinErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 153); + +/** + * @generated from message agent.v1.Coordinate + */ +export type Coordinate = Message<"agent.v1.Coordinate"> & { + /** + * @generated from field: int32 x = 1; + */ + x: number; + + /** + * @generated from field: int32 y = 2; + */ + y: number; +}; + +/** + * Describes the message agent.v1.Coordinate. + * Use `create(CoordinateSchema)` to create a new message. + */ +export const CoordinateSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 154); + +/** + * Arguments for the computer-use tool + * + * @generated from message agent.v1.ComputerUseArgs + */ +export type ComputerUseArgs = Message<"agent.v1.ComputerUseArgs"> & { + /** + * @generated from field: string tool_call_id = 1; + */ + toolCallId: string; + + /** + * @generated from field: repeated agent.v1.ComputerUseAction actions = 2; + */ + actions: ComputerUseAction[]; +}; + +/** + * Describes the message agent.v1.ComputerUseArgs. + * Use `create(ComputerUseArgsSchema)` to create a new message. + */ +export const ComputerUseArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 155); + +/** + * A single computer-use action. This is our internal canonical representation. Provider-specific formats are converted to this by adapters. + * + * @generated from message agent.v1.ComputerUseAction + */ +export type ComputerUseAction = Message<"agent.v1.ComputerUseAction"> & { + /** + * @generated from oneof agent.v1.ComputerUseAction.action + */ + action: + | { + /** + * @generated from field: agent.v1.MouseMoveAction mouse_move = 1; + */ + value: MouseMoveAction; + case: "mouseMove"; + } + | { + /** + * @generated from field: agent.v1.ClickAction click = 2; + */ + value: ClickAction; + case: "click"; + } + | { + /** + * @generated from field: agent.v1.MouseDownAction mouse_down = 3; + */ + value: MouseDownAction; + case: "mouseDown"; + } + | { + /** + * @generated from field: agent.v1.MouseUpAction mouse_up = 4; + */ + value: MouseUpAction; + case: "mouseUp"; + } + | { + /** + * @generated from field: agent.v1.DragAction drag = 5; + */ + value: DragAction; + case: "drag"; + } + | { + /** + * @generated from field: agent.v1.ScrollAction scroll = 6; + */ + value: ScrollAction; + case: "scroll"; + } + | { + /** + * @generated from field: agent.v1.TypeAction type = 7; + */ + value: TypeAction; + case: "type"; + } + | { + /** + * @generated from field: agent.v1.KeyAction key = 8; + */ + value: KeyAction; + case: "key"; + } + | { + /** + * @generated from field: agent.v1.WaitAction wait = 9; + */ + value: WaitAction; + case: "wait"; + } + | { + /** + * @generated from field: agent.v1.ScreenshotAction screenshot = 10; + */ + value: ScreenshotAction; + case: "screenshot"; + } + | { + /** + * @generated from field: agent.v1.CursorPositionAction cursor_position = 11; + */ + value: CursorPositionAction; + case: "cursorPosition"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ComputerUseAction. + * Use `create(ComputerUseActionSchema)` to create a new message. + */ +export const ComputerUseActionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 156); + +/** + * Move mouse to coordinate (required) + * + * @generated from message agent.v1.MouseMoveAction + */ +export type MouseMoveAction = Message<"agent.v1.MouseMoveAction"> & { + /** + * @generated from field: agent.v1.Coordinate coordinate = 1; + */ + coordinate?: Coordinate; +}; + +/** + * Describes the message agent.v1.MouseMoveAction. + * Use `create(MouseMoveActionSchema)` to create a new message. + */ +export const MouseMoveActionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 157); + +/** + * Unified click action - coordinate: optional, clicks at current cursor if omitted - button: which mouse button (default: LEFT) - count: click count (1=single, 2=double, 3=triple, default: 1) - modifier_keys: optional, held during click (e.g., "ctrl", "shift", "ctrl+shift") + * + * @generated from message agent.v1.ClickAction + */ +export type ClickAction = Message<"agent.v1.ClickAction"> & { + /** + * @generated from field: optional agent.v1.Coordinate coordinate = 1; + */ + coordinate?: Coordinate; + + /** + * @generated from field: int32 button = 2; + */ + button: number; + + /** + * @generated from field: int32 count = 3; + */ + count: number; + + /** + * @generated from field: optional string modifier_keys = 4; + */ + modifierKeys?: string; +}; + +/** + * Describes the message agent.v1.ClickAction. + * Use `create(ClickActionSchema)` to create a new message. + */ +export const ClickActionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 158); + +/** + * Press mouse button down (for fine-grained drag control) + * + * @generated from message agent.v1.MouseDownAction + */ +export type MouseDownAction = Message<"agent.v1.MouseDownAction"> & { + /** + * @generated from field: int32 button = 1; + */ + button: number; +}; + +/** + * Describes the message agent.v1.MouseDownAction. + * Use `create(MouseDownActionSchema)` to create a new message. + */ +export const MouseDownActionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 159); + +/** + * Release mouse button (for fine-grained drag control) + * + * @generated from message agent.v1.MouseUpAction + */ +export type MouseUpAction = Message<"agent.v1.MouseUpAction"> & { + /** + * @generated from field: int32 button = 1; + */ + button: number; +}; + +/** + * Describes the message agent.v1.MouseUpAction. + * Use `create(MouseUpActionSchema)` to create a new message. + */ +export const MouseUpActionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 160); + +/** + * Drag action - path of coordinates (at least 2 points: [start, ..., end]) + * + * @generated from message agent.v1.DragAction + */ +export type DragAction = Message<"agent.v1.DragAction"> & { + /** + * @generated from field: repeated agent.v1.Coordinate path = 1; + */ + path: Coordinate[]; + + /** + * @generated from field: int32 button = 2; + */ + button: number; +}; + +/** + * Describes the message agent.v1.DragAction. + * Use `create(DragActionSchema)` to create a new message. + */ +export const DragActionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 161); + +/** + * Scroll action - coordinate: optional, scrolls at current cursor if omitted - direction: scroll direction (required) - amount: number of scroll "clicks" (default: 3) - modifier_keys: optional, held during scroll (e.g., "ctrl" for zoom) + * + * @generated from message agent.v1.ScrollAction + */ +export type ScrollAction = Message<"agent.v1.ScrollAction"> & { + /** + * @generated from field: optional agent.v1.Coordinate coordinate = 1; + */ + coordinate?: Coordinate; + + /** + * @generated from field: int32 direction = 2; + */ + direction: number; + + /** + * @generated from field: int32 amount = 3; + */ + amount: number; + + /** + * @generated from field: optional string modifier_keys = 4; + */ + modifierKeys?: string; +}; + +/** + * Describes the message agent.v1.ScrollAction. + * Use `create(ScrollActionSchema)` to create a new message. + */ +export const ScrollActionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 162); + +/** + * Type text + * + * @generated from message agent.v1.TypeAction + */ +export type TypeAction = Message<"agent.v1.TypeAction"> & { + /** + * @generated from field: string text = 1; + */ + text: string; +}; + +/** + * Describes the message agent.v1.TypeAction. + * Use `create(TypeActionSchema)` to create a new message. + */ +export const TypeActionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 163); + +/** + * Press key or key combination (xdotool-style: "ctrl+a", "Return", "Alt+Left") If hold_duration_ms is set, holds the key for that duration + * + * @generated from message agent.v1.KeyAction + */ +export type KeyAction = Message<"agent.v1.KeyAction"> & { + /** + * @generated from field: string key = 1; + */ + key: string; + + /** + * @generated from field: optional int32 hold_duration_ms = 2; + */ + holdDurationMs?: number; +}; + +/** + * Describes the message agent.v1.KeyAction. + * Use `create(KeyActionSchema)` to create a new message. + */ +export const KeyActionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 164); + +/** + * Wait for a duration + * + * @generated from message agent.v1.WaitAction + */ +export type WaitAction = Message<"agent.v1.WaitAction"> & { + /** + * @generated from field: int32 duration_ms = 1; + */ + durationMs: number; +}; + +/** + * Describes the message agent.v1.WaitAction. + * Use `create(WaitActionSchema)` to create a new message. + */ +export const WaitActionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 165); + +/** + * Take a screenshot + * + * @generated from message agent.v1.ScreenshotAction + */ +export type ScreenshotAction = Message<"agent.v1.ScreenshotAction"> & {}; + +/** + * Describes the message agent.v1.ScreenshotAction. + * Use `create(ScreenshotActionSchema)` to create a new message. + */ +export const ScreenshotActionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 166); + +/** + * Get current cursor position + * + * @generated from message agent.v1.CursorPositionAction + */ +export type CursorPositionAction = Message<"agent.v1.CursorPositionAction"> & {}; + +/** + * Describes the message agent.v1.CursorPositionAction. + * Use `create(CursorPositionActionSchema)` to create a new message. + */ +export const CursorPositionActionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 167); + +/** + * Result of computer-use execution + * + * @generated from message agent.v1.ComputerUseResult + */ +export type ComputerUseResult = Message<"agent.v1.ComputerUseResult"> & { + /** + * @generated from oneof agent.v1.ComputerUseResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.ComputerUseSuccess success = 1; + */ + value: ComputerUseSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.ComputerUseError error = 2; + */ + value: ComputerUseError; + case: "error"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ComputerUseResult. + * Use `create(ComputerUseResultSchema)` to create a new message. + */ +export const ComputerUseResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 168); + +/** + * @generated from message agent.v1.ComputerUseSuccess + */ +export type ComputerUseSuccess = Message<"agent.v1.ComputerUseSuccess"> & { + /** + * @generated from field: int32 action_count = 1; + */ + actionCount: number; + + /** + * @generated from field: int32 duration_ms = 2; + */ + durationMs: number; + + /** + * Base64 WebP at API resolution + * + * @generated from field: optional string screenshot = 3; + */ + screenshot?: string; + + /** + * @generated from field: optional string log = 4; + */ + log?: string; + + /** + * @generated from field: optional string screenshot_path = 5; + */ + screenshotPath?: string; + + /** + * In API resolution + * + * @generated from field: optional agent.v1.Coordinate cursor_position = 6; + */ + cursorPosition?: Coordinate; +}; + +/** + * Describes the message agent.v1.ComputerUseSuccess. + * Use `create(ComputerUseSuccessSchema)` to create a new message. + */ +export const ComputerUseSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 169); + +/** + * @generated from message agent.v1.ComputerUseError + */ +export type ComputerUseError = Message<"agent.v1.ComputerUseError"> & { + /** + * @generated from field: string error = 1; + */ + error: string; + + /** + * @generated from field: int32 action_count = 2; + */ + actionCount: number; + + /** + * @generated from field: int32 duration_ms = 3; + */ + durationMs: number; + + /** + * @generated from field: optional string log = 4; + */ + log?: string; + + /** + * Base64 WebP of screen state at error time + * + * @generated from field: optional string screenshot = 5; + */ + screenshot?: string; + + /** + * Path where screenshot was saved + * + * @generated from field: optional string screenshot_path = 6; + */ + screenshotPath?: string; +}; + +/** + * Describes the message agent.v1.ComputerUseError. + * Use `create(ComputerUseErrorSchema)` to create a new message. + */ +export const ComputerUseErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 170); + +/** + * @generated from message agent.v1.ComputerUseToolCall + */ +export type ComputerUseToolCall = Message<"agent.v1.ComputerUseToolCall"> & { + /** + * @generated from field: agent.v1.ComputerUseArgs args = 1; + */ + args?: ComputerUseArgs; + + /** + * @generated from field: agent.v1.ComputerUseResult result = 2; + */ + result?: ComputerUseResult; +}; + +/** + * Describes the message agent.v1.ComputerUseToolCall. + * Use `create(ComputerUseToolCallSchema)` to create a new message. + */ +export const ComputerUseToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 171); + +/** + * @generated from message agent.v1.CreatePlanToolCall + */ +export type CreatePlanToolCall = Message<"agent.v1.CreatePlanToolCall"> & { + /** + * @generated from field: agent.v1.CreatePlanArgs args = 1; + */ + args?: CreatePlanArgs; + + /** + * @generated from field: agent.v1.CreatePlanResult result = 2; + */ + result?: CreatePlanResult; +}; + +/** + * Describes the message agent.v1.CreatePlanToolCall. + * Use `create(CreatePlanToolCallSchema)` to create a new message. + */ +export const CreatePlanToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 172); + +/** + * A phase groups related todos together for project-mode plans + * + * @generated from message agent.v1.Phase + */ +export type Phase = Message<"agent.v1.Phase"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: repeated agent.v1.TodoItem todos = 2; + */ + todos: TodoItem[]; +}; + +/** + * Describes the message agent.v1.Phase. + * Use `create(PhaseSchema)` to create a new message. + */ +export const PhaseSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 173); + +/** + * @generated from message agent.v1.CreatePlanArgs + */ +export type CreatePlanArgs = Message<"agent.v1.CreatePlanArgs"> & { + /** + * @generated from field: string plan = 1; + */ + plan: string; + + /** + * @generated from field: repeated agent.v1.TodoItem todos = 2; + */ + todos: TodoItem[]; + + /** + * @generated from field: string overview = 3; + */ + overview: string; + + /** + * @generated from field: string name = 4; + */ + name: string; + + /** + * When true, uses phases instead of flat todos (mutually exclusive) + * + * @generated from field: bool is_project = 5; + */ + isProject: boolean; + + /** + * Implementation phases (only valid when is_project=true) + * + * @generated from field: repeated agent.v1.Phase phases = 6; + */ + phases: Phase[]; +}; + +/** + * Describes the message agent.v1.CreatePlanArgs. + * Use `create(CreatePlanArgsSchema)` to create a new message. + */ +export const CreatePlanArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 174); + +/** + * @generated from message agent.v1.CreatePlanResult + */ +export type CreatePlanResult = Message<"agent.v1.CreatePlanResult"> & { + /** + * URI of the plan file (returned when file_based_plan_edits is enabled) + * + * @generated from field: string plan_uri = 3; + */ + planUri: string; + + /** + * @generated from oneof agent.v1.CreatePlanResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.CreatePlanSuccess success = 1; + */ + value: CreatePlanSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.CreatePlanError error = 2; + */ + value: CreatePlanError; + case: "error"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.CreatePlanResult. + * Use `create(CreatePlanResultSchema)` to create a new message. + */ +export const CreatePlanResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 175); + +/** + * @generated from message agent.v1.CreatePlanSuccess + */ +export type CreatePlanSuccess = Message<"agent.v1.CreatePlanSuccess"> & {}; + +/** + * Describes the message agent.v1.CreatePlanSuccess. + * Use `create(CreatePlanSuccessSchema)` to create a new message. + */ +export const CreatePlanSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 176); + +/** + * @generated from message agent.v1.CreatePlanError + */ +export type CreatePlanError = Message<"agent.v1.CreatePlanError"> & { + /** + * @generated from field: string error = 1; + */ + error: string; +}; + +/** + * Describes the message agent.v1.CreatePlanError. + * Use `create(CreatePlanErrorSchema)` to create a new message. + */ +export const CreatePlanErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 177); + +/** + * Query sent from server to client to create a plan file + * + * @generated from message agent.v1.CreatePlanRequestQuery + */ +export type CreatePlanRequestQuery = Message<"agent.v1.CreatePlanRequestQuery"> & { + /** + * @generated from field: agent.v1.CreatePlanArgs args = 1; + */ + args?: CreatePlanArgs; + + /** + * @generated from field: string tool_call_id = 2; + */ + toolCallId: string; +}; + +/** + * Describes the message agent.v1.CreatePlanRequestQuery. + * Use `create(CreatePlanRequestQuerySchema)` to create a new message. + */ +export const CreatePlanRequestQuerySchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 178); + +/** + * Response from client with the created plan URI + * + * @generated from message agent.v1.CreatePlanRequestResponse + */ +export type CreatePlanRequestResponse = Message<"agent.v1.CreatePlanRequestResponse"> & { + /** + * @generated from field: agent.v1.CreatePlanResult result = 1; + */ + result?: CreatePlanResult; +}; + +/** + * Describes the message agent.v1.CreatePlanRequestResponse. + * Use `create(CreatePlanRequestResponseSchema)` to create a new message. + */ +export const CreatePlanRequestResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 179); + +/** + * @generated from message agent.v1.CursorRuleTypeGlobal + */ +export type CursorRuleTypeGlobal = Message<"agent.v1.CursorRuleTypeGlobal"> & {}; + +/** + * Describes the message agent.v1.CursorRuleTypeGlobal. + * Use `create(CursorRuleTypeGlobalSchema)` to create a new message. + */ +export const CursorRuleTypeGlobalSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 180); + +/** + * @generated from message agent.v1.CursorRuleTypeFileGlobs + */ +export type CursorRuleTypeFileGlobs = Message<"agent.v1.CursorRuleTypeFileGlobs"> & { + /** + * @generated from field: repeated string globs = 1; + */ + globs: string[]; +}; + +/** + * Describes the message agent.v1.CursorRuleTypeFileGlobs. + * Use `create(CursorRuleTypeFileGlobsSchema)` to create a new message. + */ +export const CursorRuleTypeFileGlobsSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 181); + +/** + * @generated from message agent.v1.CursorRuleTypeAgentFetched + */ +export type CursorRuleTypeAgentFetched = Message<"agent.v1.CursorRuleTypeAgentFetched"> & { + /** + * @generated from field: string description = 1; + */ + description: string; +}; + +/** + * Describes the message agent.v1.CursorRuleTypeAgentFetched. + * Use `create(CursorRuleTypeAgentFetchedSchema)` to create a new message. + */ +export const CursorRuleTypeAgentFetchedSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 182); + +/** + * @generated from message agent.v1.CursorRuleTypeManuallyAttached + */ +export type CursorRuleTypeManuallyAttached = Message<"agent.v1.CursorRuleTypeManuallyAttached"> & {}; + +/** + * Describes the message agent.v1.CursorRuleTypeManuallyAttached. + * Use `create(CursorRuleTypeManuallyAttachedSchema)` to create a new message. + */ +export const CursorRuleTypeManuallyAttachedSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 183); + +/** + * @generated from message agent.v1.CursorRuleType + */ +export type CursorRuleType = Message<"agent.v1.CursorRuleType"> & { + /** + * @generated from oneof agent.v1.CursorRuleType.type + */ + type: + | { + /** + * @generated from field: agent.v1.CursorRuleTypeGlobal global = 1; + */ + value: CursorRuleTypeGlobal; + case: "global"; + } + | { + /** + * @generated from field: agent.v1.CursorRuleTypeFileGlobs file_globbed = 2; + */ + value: CursorRuleTypeFileGlobs; + case: "fileGlobbed"; + } + | { + /** + * @generated from field: agent.v1.CursorRuleTypeAgentFetched agent_fetched = 3; + */ + value: CursorRuleTypeAgentFetched; + case: "agentFetched"; + } + | { + /** + * @generated from field: agent.v1.CursorRuleTypeManuallyAttached manually_attached = 4; + */ + value: CursorRuleTypeManuallyAttached; + case: "manuallyAttached"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.CursorRuleType. + * Use `create(CursorRuleTypeSchema)` to create a new message. + */ +export const CursorRuleTypeSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 184); + +/** + * @generated from message agent.v1.CursorRule + */ +export type CursorRule = Message<"agent.v1.CursorRule"> & { + /** + * absolute path to the .mdc file + * + * @generated from field: string full_path = 1; + */ + fullPath: string; + + /** + * rule body, trimmed to reasonable size if needed by client + * + * @generated from field: string content = 2; + */ + content: string; + + /** + * classification of rule + * + * @generated from field: agent.v1.CursorRuleType type = 3; + */ + type?: CursorRuleType; + + /** + * source of the rule + * + * @generated from field: int32 source = 4; + */ + source: number; + + /** + * Git remote origin URL for the repository containing this rule, if available. Normalized to host/path format (e.g., "github.com/owner/repo"). + * + * @generated from field: optional string git_remote_origin = 5; + */ + gitRemoteOrigin?: string; + + /** + * @generated from field: optional string parse_error = 6; + */ + parseError?: string; +}; + +/** + * Describes the message agent.v1.CursorRule. + * Use `create(CursorRuleSchema)` to create a new message. + */ +export const CursorRuleSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 185); + +/** + * @generated from message agent.v1.DeleteArgs + */ +export type DeleteArgs = Message<"agent.v1.DeleteArgs"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: string tool_call_id = 2; + */ + toolCallId: string; +}; + +/** + * Describes the message agent.v1.DeleteArgs. + * Use `create(DeleteArgsSchema)` to create a new message. + */ +export const DeleteArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 186); + +/** + * @generated from message agent.v1.DeleteResult + */ +export type DeleteResult = Message<"agent.v1.DeleteResult"> & { + /** + * @generated from oneof agent.v1.DeleteResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.DeleteSuccess success = 1; + */ + value: DeleteSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.DeleteFileNotFound file_not_found = 2; + */ + value: DeleteFileNotFound; + case: "fileNotFound"; + } + | { + /** + * @generated from field: agent.v1.DeleteNotFile not_file = 3; + */ + value: DeleteNotFile; + case: "notFile"; + } + | { + /** + * @generated from field: agent.v1.DeletePermissionDenied permission_denied = 4; + */ + value: DeletePermissionDenied; + case: "permissionDenied"; + } + | { + /** + * @generated from field: agent.v1.DeleteFileBusy file_busy = 5; + */ + value: DeleteFileBusy; + case: "fileBusy"; + } + | { + /** + * @generated from field: agent.v1.DeleteRejected rejected = 6; + */ + value: DeleteRejected; + case: "rejected"; + } + | { + /** + * @generated from field: agent.v1.DeleteError error = 7; + */ + value: DeleteError; + case: "error"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.DeleteResult. + * Use `create(DeleteResultSchema)` to create a new message. + */ +export const DeleteResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 187); + +/** + * @generated from message agent.v1.DeleteSuccess + */ +export type DeleteSuccess = Message<"agent.v1.DeleteSuccess"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: string deleted_file = 2; + */ + deletedFile: string; + + /** + * @generated from field: int64 file_size = 3; + */ + fileSize: bigint; + + /** + * @generated from field: string prev_content = 4; + */ + prevContent: string; +}; + +/** + * Describes the message agent.v1.DeleteSuccess. + * Use `create(DeleteSuccessSchema)` to create a new message. + */ +export const DeleteSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 188); + +/** + * @generated from message agent.v1.DeleteFileNotFound + */ +export type DeleteFileNotFound = Message<"agent.v1.DeleteFileNotFound"> & { + /** + * @generated from field: string path = 1; + */ + path: string; +}; + +/** + * Describes the message agent.v1.DeleteFileNotFound. + * Use `create(DeleteFileNotFoundSchema)` to create a new message. + */ +export const DeleteFileNotFoundSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 189); + +/** + * @generated from message agent.v1.DeleteNotFile + */ +export type DeleteNotFile = Message<"agent.v1.DeleteNotFile"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * "directory" or "other" + * + * @generated from field: string actual_type = 2; + */ + actualType: string; +}; + +/** + * Describes the message agent.v1.DeleteNotFile. + * Use `create(DeleteNotFileSchema)` to create a new message. + */ +export const DeleteNotFileSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 190); + +/** + * @generated from message agent.v1.DeletePermissionDenied + */ +export type DeletePermissionDenied = Message<"agent.v1.DeletePermissionDenied"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: string client_visible_error = 2; + */ + clientVisibleError: string; + + /** + * @generated from field: bool is_readonly = 3; + */ + isReadonly: boolean; +}; + +/** + * Describes the message agent.v1.DeletePermissionDenied. + * Use `create(DeletePermissionDeniedSchema)` to create a new message. + */ +export const DeletePermissionDeniedSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 191); + +/** + * @generated from message agent.v1.DeleteFileBusy + */ +export type DeleteFileBusy = Message<"agent.v1.DeleteFileBusy"> & { + /** + * @generated from field: string path = 1; + */ + path: string; +}; + +/** + * Describes the message agent.v1.DeleteFileBusy. + * Use `create(DeleteFileBusySchema)` to create a new message. + */ +export const DeleteFileBusySchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 192); + +/** + * @generated from message agent.v1.DeleteRejected + */ +export type DeleteRejected = Message<"agent.v1.DeleteRejected"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: string reason = 2; + */ + reason: string; +}; + +/** + * Describes the message agent.v1.DeleteRejected. + * Use `create(DeleteRejectedSchema)` to create a new message. + */ +export const DeleteRejectedSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 193); + +/** + * @generated from message agent.v1.DeleteError + */ +export type DeleteError = Message<"agent.v1.DeleteError"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: string error = 2; + */ + error: string; +}; + +/** + * Describes the message agent.v1.DeleteError. + * Use `create(DeleteErrorSchema)` to create a new message. + */ +export const DeleteErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 194); + +/** + * @generated from message agent.v1.DeleteToolCall + */ +export type DeleteToolCall = Message<"agent.v1.DeleteToolCall"> & { + /** + * @generated from field: agent.v1.DeleteArgs args = 1; + */ + args?: DeleteArgs; + + /** + * @generated from field: agent.v1.DeleteResult result = 2; + */ + result?: DeleteResult; +}; + +/** + * Describes the message agent.v1.DeleteToolCall. + * Use `create(DeleteToolCallSchema)` to create a new message. + */ +export const DeleteToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 195); + +/** + * @generated from message agent.v1.DiagnosticsArgs + */ +export type DiagnosticsArgs = Message<"agent.v1.DiagnosticsArgs"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: string tool_call_id = 2; + */ + toolCallId: string; +}; + +/** + * Describes the message agent.v1.DiagnosticsArgs. + * Use `create(DiagnosticsArgsSchema)` to create a new message. + */ +export const DiagnosticsArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 196); + +/** + * @generated from message agent.v1.DiagnosticsResult + */ +export type DiagnosticsResult = Message<"agent.v1.DiagnosticsResult"> & { + /** + * @generated from oneof agent.v1.DiagnosticsResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.DiagnosticsSuccess success = 1; + */ + value: DiagnosticsSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.DiagnosticsError error = 2; + */ + value: DiagnosticsError; + case: "error"; + } + | { + /** + * @generated from field: agent.v1.DiagnosticsRejected rejected = 3; + */ + value: DiagnosticsRejected; + case: "rejected"; + } + | { + /** + * @generated from field: agent.v1.DiagnosticsFileNotFound file_not_found = 4; + */ + value: DiagnosticsFileNotFound; + case: "fileNotFound"; + } + | { + /** + * @generated from field: agent.v1.DiagnosticsPermissionDenied permission_denied = 5; + */ + value: DiagnosticsPermissionDenied; + case: "permissionDenied"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.DiagnosticsResult. + * Use `create(DiagnosticsResultSchema)` to create a new message. + */ +export const DiagnosticsResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 197); + +/** + * @generated from message agent.v1.DiagnosticsSuccess + */ +export type DiagnosticsSuccess = Message<"agent.v1.DiagnosticsSuccess"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: repeated agent.v1.Diagnostic diagnostics = 2; + */ + diagnostics: Diagnostic[]; + + /** + * @generated from field: int32 total_diagnostics = 3; + */ + totalDiagnostics: number; +}; + +/** + * Describes the message agent.v1.DiagnosticsSuccess. + * Use `create(DiagnosticsSuccessSchema)` to create a new message. + */ +export const DiagnosticsSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 198); + +/** + * @generated from message agent.v1.Diagnostic + */ +export type Diagnostic = Message<"agent.v1.Diagnostic"> & { + /** + * @generated from field: int32 severity = 1; + */ + severity: number; + + /** + * @generated from field: agent.v1.Range range = 2; + */ + range?: Range; + + /** + * @generated from field: string message = 3; + */ + message: string; + + /** + * @generated from field: string source = 4; + */ + source: string; + + /** + * @generated from field: string code = 5; + */ + code: string; + + /** + * @generated from field: bool is_stale = 6; + */ + isStale: boolean; +}; + +/** + * Describes the message agent.v1.Diagnostic. + * Use `create(DiagnosticSchema)` to create a new message. + */ +export const DiagnosticSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 199); + +/** + * @generated from message agent.v1.DiagnosticsError + */ +export type DiagnosticsError = Message<"agent.v1.DiagnosticsError"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: string error = 2; + */ + error: string; +}; + +/** + * Describes the message agent.v1.DiagnosticsError. + * Use `create(DiagnosticsErrorSchema)` to create a new message. + */ +export const DiagnosticsErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 200); + +/** + * @generated from message agent.v1.DiagnosticsRejected + */ +export type DiagnosticsRejected = Message<"agent.v1.DiagnosticsRejected"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: string reason = 2; + */ + reason: string; +}; + +/** + * Describes the message agent.v1.DiagnosticsRejected. + * Use `create(DiagnosticsRejectedSchema)` to create a new message. + */ +export const DiagnosticsRejectedSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 201); + +/** + * @generated from message agent.v1.DiagnosticsFileNotFound + */ +export type DiagnosticsFileNotFound = Message<"agent.v1.DiagnosticsFileNotFound"> & { + /** + * @generated from field: string path = 1; + */ + path: string; +}; + +/** + * Describes the message agent.v1.DiagnosticsFileNotFound. + * Use `create(DiagnosticsFileNotFoundSchema)` to create a new message. + */ +export const DiagnosticsFileNotFoundSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 202); + +/** + * @generated from message agent.v1.DiagnosticsPermissionDenied + */ +export type DiagnosticsPermissionDenied = Message<"agent.v1.DiagnosticsPermissionDenied"> & { + /** + * @generated from field: string path = 1; + */ + path: string; +}; + +/** + * Describes the message agent.v1.DiagnosticsPermissionDenied. + * Use `create(DiagnosticsPermissionDeniedSchema)` to create a new message. + */ +export const DiagnosticsPermissionDeniedSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 203); + +/** + * @generated from message agent.v1.EditArgs + */ +export type EditArgs = Message<"agent.v1.EditArgs"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: optional string stream_content = 6; + */ + streamContent?: string; +}; + +/** + * Describes the message agent.v1.EditArgs. + * Use `create(EditArgsSchema)` to create a new message. + */ +export const EditArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 204); + +/** + * @generated from message agent.v1.EditResult + */ +export type EditResult = Message<"agent.v1.EditResult"> & { + /** + * @generated from oneof agent.v1.EditResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.EditSuccess success = 1; + */ + value: EditSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.EditFileNotFound file_not_found = 2; + */ + value: EditFileNotFound; + case: "fileNotFound"; + } + | { + /** + * @generated from field: agent.v1.EditReadPermissionDenied read_permission_denied = 3; + */ + value: EditReadPermissionDenied; + case: "readPermissionDenied"; + } + | { + /** + * @generated from field: agent.v1.EditWritePermissionDenied write_permission_denied = 4; + */ + value: EditWritePermissionDenied; + case: "writePermissionDenied"; + } + | { + /** + * @generated from field: agent.v1.EditRejected rejected = 6; + */ + value: EditRejected; + case: "rejected"; + } + | { + /** + * @generated from field: agent.v1.EditError error = 7; + */ + value: EditError; + case: "error"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.EditResult. + * Use `create(EditResultSchema)` to create a new message. + */ +export const EditResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 205); + +/** + * @generated from message agent.v1.EditSuccess + */ +export type EditSuccess = Message<"agent.v1.EditSuccess"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: optional int32 lines_added = 3; + */ + linesAdded?: number; + + /** + * @generated from field: optional int32 lines_removed = 4; + */ + linesRemoved?: number; + + /** + * Concatenated chunk diff strings separated by "\n...\n" + * + * @generated from field: optional string diff_string = 5; + */ + diffString?: string; + + /** + * undefined if file didn't exist before the edit + * + * @generated from field: optional string before_full_file_content = 6; + */ + beforeFullFileContent?: string; + + /** + * @generated from field: string after_full_file_content = 7; + */ + afterFullFileContent: string; + + /** + * Formatted message for display to model (resultForModel from EditTransformResult) + * + * @generated from field: optional string message = 8; + */ + message?: string; +}; + +/** + * Describes the message agent.v1.EditSuccess. + * Use `create(EditSuccessSchema)` to create a new message. + */ +export const EditSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 206); + +/** + * @generated from message agent.v1.EditFileNotFound + */ +export type EditFileNotFound = Message<"agent.v1.EditFileNotFound"> & { + /** + * @generated from field: string path = 1; + */ + path: string; +}; + +/** + * Describes the message agent.v1.EditFileNotFound. + * Use `create(EditFileNotFoundSchema)` to create a new message. + */ +export const EditFileNotFoundSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 207); + +/** + * @generated from message agent.v1.EditReadPermissionDenied + */ +export type EditReadPermissionDenied = Message<"agent.v1.EditReadPermissionDenied"> & { + /** + * @generated from field: string path = 1; + */ + path: string; +}; + +/** + * Describes the message agent.v1.EditReadPermissionDenied. + * Use `create(EditReadPermissionDeniedSchema)` to create a new message. + */ +export const EditReadPermissionDeniedSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 208); + +/** + * @generated from message agent.v1.EditWritePermissionDenied + */ +export type EditWritePermissionDenied = Message<"agent.v1.EditWritePermissionDenied"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: string error = 2; + */ + error: string; + + /** + * @generated from field: bool is_readonly = 3; + */ + isReadonly: boolean; +}; + +/** + * Describes the message agent.v1.EditWritePermissionDenied. + * Use `create(EditWritePermissionDeniedSchema)` to create a new message. + */ +export const EditWritePermissionDeniedSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 209); + +/** + * @generated from message agent.v1.EditRejected + */ +export type EditRejected = Message<"agent.v1.EditRejected"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: string reason = 2; + */ + reason: string; +}; + +/** + * Describes the message agent.v1.EditRejected. + * Use `create(EditRejectedSchema)` to create a new message. + */ +export const EditRejectedSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 210); + +/** + * @generated from message agent.v1.EditError + */ +export type EditError = Message<"agent.v1.EditError"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: string error = 2; + */ + error: string; + + /** + * @generated from field: optional string model_visible_error = 5; + */ + modelVisibleError?: string; +}; + +/** + * Describes the message agent.v1.EditError. + * Use `create(EditErrorSchema)` to create a new message. + */ +export const EditErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 211); + +/** + * @generated from message agent.v1.EditToolCall + */ +export type EditToolCall = Message<"agent.v1.EditToolCall"> & { + /** + * @generated from field: agent.v1.EditArgs args = 1; + */ + args?: EditArgs; + + /** + * @generated from field: agent.v1.EditResult result = 2; + */ + result?: EditResult; +}; + +/** + * Describes the message agent.v1.EditToolCall. + * Use `create(EditToolCallSchema)` to create a new message. + */ +export const EditToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 212); + +/** + * @generated from message agent.v1.EditToolCallDelta + */ +export type EditToolCallDelta = Message<"agent.v1.EditToolCallDelta"> & { + /** + * @generated from field: string stream_content_delta = 1; + */ + streamContentDelta: string; +}; + +/** + * Describes the message agent.v1.EditToolCallDelta. + * Use `create(EditToolCallDeltaSchema)` to create a new message. + */ +export const EditToolCallDeltaSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 213); + +/** + * @generated from message agent.v1.ExaFetchArgs + */ +export type ExaFetchArgs = Message<"agent.v1.ExaFetchArgs"> & { + /** + * @generated from field: repeated string ids = 1; + */ + ids: string[]; + + /** + * @generated from field: string tool_call_id = 2; + */ + toolCallId: string; +}; + +/** + * Describes the message agent.v1.ExaFetchArgs. + * Use `create(ExaFetchArgsSchema)` to create a new message. + */ +export const ExaFetchArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 214); + +/** + * @generated from message agent.v1.ExaFetchResult + */ +export type ExaFetchResult = Message<"agent.v1.ExaFetchResult"> & { + /** + * @generated from oneof agent.v1.ExaFetchResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.ExaFetchSuccess success = 1; + */ + value: ExaFetchSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.ExaFetchError error = 2; + */ + value: ExaFetchError; + case: "error"; + } + | { + /** + * @generated from field: agent.v1.ExaFetchRejected rejected = 3; + */ + value: ExaFetchRejected; + case: "rejected"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ExaFetchResult. + * Use `create(ExaFetchResultSchema)` to create a new message. + */ +export const ExaFetchResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 215); + +/** + * @generated from message agent.v1.ExaFetchSuccess + */ +export type ExaFetchSuccess = Message<"agent.v1.ExaFetchSuccess"> & { + /** + * @generated from field: repeated agent.v1.ExaFetchContent contents = 1; + */ + contents: ExaFetchContent[]; +}; + +/** + * Describes the message agent.v1.ExaFetchSuccess. + * Use `create(ExaFetchSuccessSchema)` to create a new message. + */ +export const ExaFetchSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 216); + +/** + * @generated from message agent.v1.ExaFetchError + */ +export type ExaFetchError = Message<"agent.v1.ExaFetchError"> & { + /** + * @generated from field: string error = 1; + */ + error: string; +}; + +/** + * Describes the message agent.v1.ExaFetchError. + * Use `create(ExaFetchErrorSchema)` to create a new message. + */ +export const ExaFetchErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 217); + +/** + * @generated from message agent.v1.ExaFetchRejected + */ +export type ExaFetchRejected = Message<"agent.v1.ExaFetchRejected"> & { + /** + * @generated from field: string reason = 1; + */ + reason: string; +}; + +/** + * Describes the message agent.v1.ExaFetchRejected. + * Use `create(ExaFetchRejectedSchema)` to create a new message. + */ +export const ExaFetchRejectedSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 218); + +/** + * @generated from message agent.v1.ExaFetchContent + */ +export type ExaFetchContent = Message<"agent.v1.ExaFetchContent"> & { + /** + * @generated from field: string title = 1; + */ + title: string; + + /** + * @generated from field: string url = 2; + */ + url: string; + + /** + * @generated from field: string text = 3; + */ + text: string; + + /** + * @generated from field: string published_date = 4; + */ + publishedDate: string; +}; + +/** + * Describes the message agent.v1.ExaFetchContent. + * Use `create(ExaFetchContentSchema)` to create a new message. + */ +export const ExaFetchContentSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 219); + +/** + * @generated from message agent.v1.ExaFetchToolCall + */ +export type ExaFetchToolCall = Message<"agent.v1.ExaFetchToolCall"> & { + /** + * @generated from field: agent.v1.ExaFetchArgs args = 1; + */ + args?: ExaFetchArgs; + + /** + * @generated from field: agent.v1.ExaFetchResult result = 2; + */ + result?: ExaFetchResult; +}; + +/** + * Describes the message agent.v1.ExaFetchToolCall. + * Use `create(ExaFetchToolCallSchema)` to create a new message. + */ +export const ExaFetchToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 220); + +/** + * @generated from message agent.v1.ExaFetchRequestQuery + */ +export type ExaFetchRequestQuery = Message<"agent.v1.ExaFetchRequestQuery"> & { + /** + * @generated from field: agent.v1.ExaFetchArgs args = 1; + */ + args?: ExaFetchArgs; +}; + +/** + * Describes the message agent.v1.ExaFetchRequestQuery. + * Use `create(ExaFetchRequestQuerySchema)` to create a new message. + */ +export const ExaFetchRequestQuerySchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 221); + +/** + * @generated from message agent.v1.ExaFetchRequestResponse + */ +export type ExaFetchRequestResponse = Message<"agent.v1.ExaFetchRequestResponse"> & { + /** + * @generated from oneof agent.v1.ExaFetchRequestResponse.result + */ + result: + | { + /** + * @generated from field: agent.v1.ExaFetchRequestResponse_Approved approved = 1; + */ + value: ExaFetchRequestResponse_Approved; + case: "approved"; + } + | { + /** + * @generated from field: agent.v1.ExaFetchRequestResponse_Rejected rejected = 2; + */ + value: ExaFetchRequestResponse_Rejected; + case: "rejected"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ExaFetchRequestResponse. + * Use `create(ExaFetchRequestResponseSchema)` to create a new message. + */ +export const ExaFetchRequestResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 222); + +/** + * @generated from message agent.v1.ExaFetchRequestResponse_Approved + */ +export type ExaFetchRequestResponse_Approved = Message<"agent.v1.ExaFetchRequestResponse_Approved"> & {}; + +/** + * Describes the message agent.v1.ExaFetchRequestResponse_Approved. + * Use `create(ExaFetchRequestResponse_ApprovedSchema)` to create a new message. + */ +export const ExaFetchRequestResponse_ApprovedSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 223); + +/** + * @generated from message agent.v1.ExaFetchRequestResponse_Rejected + */ +export type ExaFetchRequestResponse_Rejected = Message<"agent.v1.ExaFetchRequestResponse_Rejected"> & { + /** + * @generated from field: string reason = 1; + */ + reason: string; +}; + +/** + * Describes the message agent.v1.ExaFetchRequestResponse_Rejected. + * Use `create(ExaFetchRequestResponse_RejectedSchema)` to create a new message. + */ +export const ExaFetchRequestResponse_RejectedSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 224); + +/** + * @generated from message agent.v1.ExaSearchArgs + */ +export type ExaSearchArgs = Message<"agent.v1.ExaSearchArgs"> & { + /** + * @generated from field: string query = 1; + */ + query: string; + + /** + * "auto", "neural", or "keyword" + * + * @generated from field: string type = 2; + */ + type: string; + + /** + * @generated from field: int32 num_results = 3; + */ + numResults: number; + + /** + * @generated from field: string tool_call_id = 4; + */ + toolCallId: string; +}; + +/** + * Describes the message agent.v1.ExaSearchArgs. + * Use `create(ExaSearchArgsSchema)` to create a new message. + */ +export const ExaSearchArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 225); + +/** + * @generated from message agent.v1.ExaSearchResult + */ +export type ExaSearchResult = Message<"agent.v1.ExaSearchResult"> & { + /** + * @generated from oneof agent.v1.ExaSearchResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.ExaSearchSuccess success = 1; + */ + value: ExaSearchSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.ExaSearchError error = 2; + */ + value: ExaSearchError; + case: "error"; + } + | { + /** + * @generated from field: agent.v1.ExaSearchRejected rejected = 3; + */ + value: ExaSearchRejected; + case: "rejected"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ExaSearchResult. + * Use `create(ExaSearchResultSchema)` to create a new message. + */ +export const ExaSearchResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 226); + +/** + * @generated from message agent.v1.ExaSearchSuccess + */ +export type ExaSearchSuccess = Message<"agent.v1.ExaSearchSuccess"> & { + /** + * @generated from field: repeated agent.v1.ExaSearchReference references = 1; + */ + references: ExaSearchReference[]; +}; + +/** + * Describes the message agent.v1.ExaSearchSuccess. + * Use `create(ExaSearchSuccessSchema)` to create a new message. + */ +export const ExaSearchSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 227); + +/** + * @generated from message agent.v1.ExaSearchError + */ +export type ExaSearchError = Message<"agent.v1.ExaSearchError"> & { + /** + * @generated from field: string error = 1; + */ + error: string; +}; + +/** + * Describes the message agent.v1.ExaSearchError. + * Use `create(ExaSearchErrorSchema)` to create a new message. + */ +export const ExaSearchErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 228); + +/** + * @generated from message agent.v1.ExaSearchRejected + */ +export type ExaSearchRejected = Message<"agent.v1.ExaSearchRejected"> & { + /** + * @generated from field: string reason = 1; + */ + reason: string; +}; + +/** + * Describes the message agent.v1.ExaSearchRejected. + * Use `create(ExaSearchRejectedSchema)` to create a new message. + */ +export const ExaSearchRejectedSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 229); + +/** + * @generated from message agent.v1.ExaSearchReference + */ +export type ExaSearchReference = Message<"agent.v1.ExaSearchReference"> & { + /** + * @generated from field: string title = 1; + */ + title: string; + + /** + * @generated from field: string url = 2; + */ + url: string; + + /** + * @generated from field: string text = 3; + */ + text: string; + + /** + * @generated from field: string published_date = 4; + */ + publishedDate: string; +}; + +/** + * Describes the message agent.v1.ExaSearchReference. + * Use `create(ExaSearchReferenceSchema)` to create a new message. + */ +export const ExaSearchReferenceSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 230); + +/** + * @generated from message agent.v1.ExaSearchToolCall + */ +export type ExaSearchToolCall = Message<"agent.v1.ExaSearchToolCall"> & { + /** + * @generated from field: agent.v1.ExaSearchArgs args = 1; + */ + args?: ExaSearchArgs; + + /** + * @generated from field: agent.v1.ExaSearchResult result = 2; + */ + result?: ExaSearchResult; +}; + +/** + * Describes the message agent.v1.ExaSearchToolCall. + * Use `create(ExaSearchToolCallSchema)` to create a new message. + */ +export const ExaSearchToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 231); + +/** + * @generated from message agent.v1.ExaSearchRequestQuery + */ +export type ExaSearchRequestQuery = Message<"agent.v1.ExaSearchRequestQuery"> & { + /** + * @generated from field: agent.v1.ExaSearchArgs args = 1; + */ + args?: ExaSearchArgs; +}; + +/** + * Describes the message agent.v1.ExaSearchRequestQuery. + * Use `create(ExaSearchRequestQuerySchema)` to create a new message. + */ +export const ExaSearchRequestQuerySchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 232); + +/** + * @generated from message agent.v1.ExaSearchRequestResponse + */ +export type ExaSearchRequestResponse = Message<"agent.v1.ExaSearchRequestResponse"> & { + /** + * @generated from oneof agent.v1.ExaSearchRequestResponse.result + */ + result: + | { + /** + * @generated from field: agent.v1.ExaSearchRequestResponse_Approved approved = 1; + */ + value: ExaSearchRequestResponse_Approved; + case: "approved"; + } + | { + /** + * @generated from field: agent.v1.ExaSearchRequestResponse_Rejected rejected = 2; + */ + value: ExaSearchRequestResponse_Rejected; + case: "rejected"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ExaSearchRequestResponse. + * Use `create(ExaSearchRequestResponseSchema)` to create a new message. + */ +export const ExaSearchRequestResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 233); + +/** + * @generated from message agent.v1.ExaSearchRequestResponse_Approved + */ +export type ExaSearchRequestResponse_Approved = Message<"agent.v1.ExaSearchRequestResponse_Approved"> & {}; + +/** + * Describes the message agent.v1.ExaSearchRequestResponse_Approved. + * Use `create(ExaSearchRequestResponse_ApprovedSchema)` to create a new message. + */ +export const ExaSearchRequestResponse_ApprovedSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 234); + +/** + * @generated from message agent.v1.ExaSearchRequestResponse_Rejected + */ +export type ExaSearchRequestResponse_Rejected = Message<"agent.v1.ExaSearchRequestResponse_Rejected"> & { + /** + * @generated from field: string reason = 1; + */ + reason: string; +}; + +/** + * Describes the message agent.v1.ExaSearchRequestResponse_Rejected. + * Use `create(ExaSearchRequestResponse_RejectedSchema)` to create a new message. + */ +export const ExaSearchRequestResponse_RejectedSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 235); + +/** + * @generated from message agent.v1.ExecClientStreamClose + */ +export type ExecClientStreamClose = Message<"agent.v1.ExecClientStreamClose"> & { + /** + * @generated from field: uint32 id = 1; + */ + id: number; +}; + +/** + * Describes the message agent.v1.ExecClientStreamClose. + * Use `create(ExecClientStreamCloseSchema)` to create a new message. + */ +export const ExecClientStreamCloseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 236); + +/** + * @generated from message agent.v1.ExecClientThrow + */ +export type ExecClientThrow = Message<"agent.v1.ExecClientThrow"> & { + /** + * @generated from field: uint32 id = 1; + */ + id: number; + + /** + * @generated from field: string error = 2; + */ + error: string; + + /** + * @generated from field: optional string stack_trace = 3; + */ + stackTrace?: string; +}; + +/** + * Describes the message agent.v1.ExecClientThrow. + * Use `create(ExecClientThrowSchema)` to create a new message. + */ +export const ExecClientThrowSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 237); + +/** + * @generated from message agent.v1.ExecClientHeartbeat + */ +export type ExecClientHeartbeat = Message<"agent.v1.ExecClientHeartbeat"> & { + /** + * @generated from field: uint32 id = 1; + */ + id: number; +}; + +/** + * Describes the message agent.v1.ExecClientHeartbeat. + * Use `create(ExecClientHeartbeatSchema)` to create a new message. + */ +export const ExecClientHeartbeatSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 238); + +/** + * @generated from message agent.v1.ExecClientControlMessage + */ +export type ExecClientControlMessage = Message<"agent.v1.ExecClientControlMessage"> & { + /** + * @generated from oneof agent.v1.ExecClientControlMessage.message + */ + message: + | { + /** + * @generated from field: agent.v1.ExecClientStreamClose stream_close = 1; + */ + value: ExecClientStreamClose; + case: "streamClose"; + } + | { + /** + * @generated from field: agent.v1.ExecClientThrow throw = 2; + */ + value: ExecClientThrow; + case: "throw"; + } + | { + /** + * @generated from field: agent.v1.ExecClientHeartbeat heartbeat = 3; + */ + value: ExecClientHeartbeat; + case: "heartbeat"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ExecClientControlMessage. + * Use `create(ExecClientControlMessageSchema)` to create a new message. + */ +export const ExecClientControlMessageSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 239); + +/** + * Simplified span context for tracing exec calls + * + * @generated from message agent.v1.SpanContext + */ +export type SpanContext = Message<"agent.v1.SpanContext"> & { + /** + * Trace identifier (128-bit as hex string, same for all spans in a trace) + * + * @generated from field: string trace_id = 1; + */ + traceId: string; + + /** + * Unique span identifier (64-bit as hex string) + * + * @generated from field: string span_id = 2; + */ + spanId: string; + + /** + * Trace flags bit field following OTEL SPAN_FLAGS_* semantics + * + * @generated from field: optional uint32 trace_flags = 3; + */ + traceFlags?: number; + + /** + * W3C trace-state header string (optional) + * + * @generated from field: optional string trace_state = 4; + */ + traceState?: string; +}; + +/** + * Describes the message agent.v1.SpanContext. + * Use `create(SpanContextSchema)` to create a new message. + */ +export const SpanContextSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 240); + +/** + * Empty abort message for aborting running execs + * + * @generated from message agent.v1.AbortArgs + */ +export type AbortArgs = Message<"agent.v1.AbortArgs"> & {}; + +/** + * Describes the message agent.v1.AbortArgs. + * Use `create(AbortArgsSchema)` to create a new message. + */ +export const AbortArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 241); + +/** + * @generated from message agent.v1.AbortResult + */ +export type AbortResult = Message<"agent.v1.AbortResult"> & {}; + +/** + * Describes the message agent.v1.AbortResult. + * Use `create(AbortResultSchema)` to create a new message. + */ +export const AbortResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 242); + +/** + * @generated from message agent.v1.ExecServerMessage + */ +export type ExecServerMessage = Message<"agent.v1.ExecServerMessage"> & { + /** + * @generated from field: uint32 id = 1; + */ + id: number; + + /** + * Optional exec ID for attachable executions + * + * @generated from field: string exec_id = 15; + */ + execId: string; + + /** + * Optional parent span context for tracing + * + * @generated from field: optional agent.v1.SpanContext span_context = 19; + */ + spanContext?: SpanContext; + + /** + * @generated from oneof agent.v1.ExecServerMessage.message + */ + message: + | { + /** + * @generated from field: agent.v1.ShellArgs shell_args = 2; + */ + value: ShellArgs; + case: "shellArgs"; + } + | { + /** + * @generated from field: agent.v1.WriteArgs write_args = 3; + */ + value: WriteArgs; + case: "writeArgs"; + } + | { + /** + * @generated from field: agent.v1.DeleteArgs delete_args = 4; + */ + value: DeleteArgs; + case: "deleteArgs"; + } + | { + /** + * @generated from field: agent.v1.GrepArgs grep_args = 5; + */ + value: GrepArgs; + case: "grepArgs"; + } + | { + /** + * @generated from field: agent.v1.ReadArgs read_args = 7; + */ + value: ReadArgs; + case: "readArgs"; + } + | { + /** + * @generated from field: agent.v1.LsArgs ls_args = 8; + */ + value: LsArgs; + case: "lsArgs"; + } + | { + /** + * @generated from field: agent.v1.DiagnosticsArgs diagnostics_args = 9; + */ + value: DiagnosticsArgs; + case: "diagnosticsArgs"; + } + | { + /** + * @generated from field: agent.v1.RequestContextArgs request_context_args = 10; + */ + value: RequestContextArgs; + case: "requestContextArgs"; + } + | { + /** + * @generated from field: agent.v1.McpArgs mcp_args = 11; + */ + value: McpArgs; + case: "mcpArgs"; + } + | { + /** + * @generated from field: agent.v1.ShellArgs shell_stream_args = 14; + */ + value: ShellArgs; + case: "shellStreamArgs"; + } + | { + /** + * @generated from field: agent.v1.BackgroundShellSpawnArgs background_shell_spawn_args = 16; + */ + value: BackgroundShellSpawnArgs; + case: "backgroundShellSpawnArgs"; + } + | { + /** + * @generated from field: agent.v1.ListMcpResourcesExecArgs list_mcp_resources_exec_args = 17; + */ + value: ListMcpResourcesExecArgs; + case: "listMcpResourcesExecArgs"; + } + | { + /** + * @generated from field: agent.v1.ReadMcpResourceExecArgs read_mcp_resource_exec_args = 18; + */ + value: ReadMcpResourceExecArgs; + case: "readMcpResourceExecArgs"; + } + | { + /** + * @generated from field: agent.v1.FetchArgs fetch_args = 20; + */ + value: FetchArgs; + case: "fetchArgs"; + } + | { + /** + * @generated from field: agent.v1.RecordScreenArgs record_screen_args = 21; + */ + value: RecordScreenArgs; + case: "recordScreenArgs"; + } + | { + /** + * @generated from field: agent.v1.ComputerUseArgs computer_use_args = 22; + */ + value: ComputerUseArgs; + case: "computerUseArgs"; + } + | { + /** + * @generated from field: agent.v1.WriteShellStdinArgs write_shell_stdin_args = 23; + */ + value: WriteShellStdinArgs; + case: "writeShellStdinArgs"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ExecServerMessage. + * Use `create(ExecServerMessageSchema)` to create a new message. + */ +export const ExecServerMessageSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 243); + +/** + * @generated from message agent.v1.ExecClientMessage + */ +export type ExecClientMessage = Message<"agent.v1.ExecClientMessage"> & { + /** + * @generated from field: uint32 id = 1; + */ + id: number; + + /** + * Optional exec ID for attachable executions + * + * @generated from field: string exec_id = 15; + */ + execId: string; + + /** + * @generated from oneof agent.v1.ExecClientMessage.message + */ + message: + | { + /** + * @generated from field: agent.v1.ShellResult shell_result = 2; + */ + value: ShellResult; + case: "shellResult"; + } + | { + /** + * @generated from field: agent.v1.WriteResult write_result = 3; + */ + value: WriteResult; + case: "writeResult"; + } + | { + /** + * @generated from field: agent.v1.DeleteResult delete_result = 4; + */ + value: DeleteResult; + case: "deleteResult"; + } + | { + /** + * @generated from field: agent.v1.GrepResult grep_result = 5; + */ + value: GrepResult; + case: "grepResult"; + } + | { + /** + * @generated from field: agent.v1.ReadResult read_result = 7; + */ + value: ReadResult; + case: "readResult"; + } + | { + /** + * @generated from field: agent.v1.LsResult ls_result = 8; + */ + value: LsResult; + case: "lsResult"; + } + | { + /** + * @generated from field: agent.v1.DiagnosticsResult diagnostics_result = 9; + */ + value: DiagnosticsResult; + case: "diagnosticsResult"; + } + | { + /** + * @generated from field: agent.v1.RequestContextResult request_context_result = 10; + */ + value: RequestContextResult; + case: "requestContextResult"; + } + | { + /** + * @generated from field: agent.v1.McpResult mcp_result = 11; + */ + value: McpResult; + case: "mcpResult"; + } + | { + /** + * @generated from field: agent.v1.ShellStream shell_stream = 14; + */ + value: ShellStream; + case: "shellStream"; + } + | { + /** + * @generated from field: agent.v1.BackgroundShellSpawnResult background_shell_spawn_result = 16; + */ + value: BackgroundShellSpawnResult; + case: "backgroundShellSpawnResult"; + } + | { + /** + * @generated from field: agent.v1.ListMcpResourcesExecResult list_mcp_resources_exec_result = 17; + */ + value: ListMcpResourcesExecResult; + case: "listMcpResourcesExecResult"; + } + | { + /** + * @generated from field: agent.v1.ReadMcpResourceExecResult read_mcp_resource_exec_result = 18; + */ + value: ReadMcpResourceExecResult; + case: "readMcpResourceExecResult"; + } + | { + /** + * @generated from field: agent.v1.FetchResult fetch_result = 20; + */ + value: FetchResult; + case: "fetchResult"; + } + | { + /** + * @generated from field: agent.v1.RecordScreenResult record_screen_result = 21; + */ + value: RecordScreenResult; + case: "recordScreenResult"; + } + | { + /** + * @generated from field: agent.v1.ComputerUseResult computer_use_result = 22; + */ + value: ComputerUseResult; + case: "computerUseResult"; + } + | { + /** + * @generated from field: agent.v1.WriteShellStdinResult write_shell_stdin_result = 23; + */ + value: WriteShellStdinResult; + case: "writeShellStdinResult"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ExecClientMessage. + * Use `create(ExecClientMessageSchema)` to create a new message. + */ +export const ExecClientMessageSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 244); + +/** + * @generated from message agent.v1.FetchArgs + */ +export type FetchArgs = Message<"agent.v1.FetchArgs"> & { + /** + * @generated from field: string url = 1; + */ + url: string; + + /** + * @generated from field: string tool_call_id = 2; + */ + toolCallId: string; +}; + +/** + * Describes the message agent.v1.FetchArgs. + * Use `create(FetchArgsSchema)` to create a new message. + */ +export const FetchArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 245); + +/** + * @generated from message agent.v1.FetchResult + */ +export type FetchResult = Message<"agent.v1.FetchResult"> & { + /** + * @generated from oneof agent.v1.FetchResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.FetchSuccess success = 1; + */ + value: FetchSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.FetchError error = 2; + */ + value: FetchError; + case: "error"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.FetchResult. + * Use `create(FetchResultSchema)` to create a new message. + */ +export const FetchResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 246); + +/** + * @generated from message agent.v1.FetchSuccess + */ +export type FetchSuccess = Message<"agent.v1.FetchSuccess"> & { + /** + * @generated from field: string url = 1; + */ + url: string; + + /** + * @generated from field: string content = 2; + */ + content: string; + + /** + * @generated from field: int32 status_code = 3; + */ + statusCode: number; + + /** + * @generated from field: string content_type = 4; + */ + contentType: string; +}; + +/** + * Describes the message agent.v1.FetchSuccess. + * Use `create(FetchSuccessSchema)` to create a new message. + */ +export const FetchSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 247); + +/** + * @generated from message agent.v1.FetchError + */ +export type FetchError = Message<"agent.v1.FetchError"> & { + /** + * @generated from field: string url = 1; + */ + url: string; + + /** + * @generated from field: string error = 2; + */ + error: string; +}; + +/** + * Describes the message agent.v1.FetchError. + * Use `create(FetchErrorSchema)` to create a new message. + */ +export const FetchErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 248); + +/** + * @generated from message agent.v1.GenerateImageArgs + */ +export type GenerateImageArgs = Message<"agent.v1.GenerateImageArgs"> & { + /** + * @generated from field: string description = 1; + */ + description: string; + + /** + * @generated from field: optional string file_path = 2; + */ + filePath?: string; + + /** + * Optional paths to reference images to use as input for image-to-image generation + * + * @generated from field: repeated string reference_image_paths = 5; + */ + referenceImagePaths: string[]; +}; + +/** + * Describes the message agent.v1.GenerateImageArgs. + * Use `create(GenerateImageArgsSchema)` to create a new message. + */ +export const GenerateImageArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 249); + +/** + * @generated from message agent.v1.GenerateImageResult + */ +export type GenerateImageResult = Message<"agent.v1.GenerateImageResult"> & { + /** + * @generated from oneof agent.v1.GenerateImageResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.GenerateImageSuccess success = 1; + */ + value: GenerateImageSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.GenerateImageError error = 2; + */ + value: GenerateImageError; + case: "error"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.GenerateImageResult. + * Use `create(GenerateImageResultSchema)` to create a new message. + */ +export const GenerateImageResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 250); + +/** + * @generated from message agent.v1.GenerateImageSuccess + */ +export type GenerateImageSuccess = Message<"agent.v1.GenerateImageSuccess"> & { + /** + * Actual file path where the image was saved (e.g., /path/to/project/assets/image.png) + * + * @generated from field: string file_path = 1; + */ + filePath: string; + + /** + * Base64-encoded image data + * + * @generated from field: string image_data = 2; + */ + imageData: string; +}; + +/** + * Describes the message agent.v1.GenerateImageSuccess. + * Use `create(GenerateImageSuccessSchema)` to create a new message. + */ +export const GenerateImageSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 251); + +/** + * @generated from message agent.v1.GenerateImageError + */ +export type GenerateImageError = Message<"agent.v1.GenerateImageError"> & { + /** + * @generated from field: string error = 1; + */ + error: string; +}; + +/** + * Describes the message agent.v1.GenerateImageError. + * Use `create(GenerateImageErrorSchema)` to create a new message. + */ +export const GenerateImageErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 252); + +/** + * @generated from message agent.v1.GenerateImageToolCall + */ +export type GenerateImageToolCall = Message<"agent.v1.GenerateImageToolCall"> & { + /** + * @generated from field: agent.v1.GenerateImageArgs args = 1; + */ + args?: GenerateImageArgs; + + /** + * @generated from field: agent.v1.GenerateImageResult result = 2; + */ + result?: GenerateImageResult; +}; + +/** + * Describes the message agent.v1.GenerateImageToolCall. + * Use `create(GenerateImageToolCallSchema)` to create a new message. + */ +export const GenerateImageToolCallSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 253); + +/** + * @generated from message agent.v1.GrepArgs + */ +export type GrepArgs = Message<"agent.v1.GrepArgs"> & { + /** + * @generated from field: string pattern = 1; + */ + pattern: string; + + /** + * @generated from field: optional string path = 2; + */ + path?: string; + + /** + * @generated from field: optional string glob = 3; + */ + glob?: string; + + /** + * "content", "files_with_matches", "count" + * + * @generated from field: optional string output_mode = 4; + */ + outputMode?: string; + + /** + * @generated from field: optional int32 context_before = 5; + */ + contextBefore?: number; + + /** + * @generated from field: optional int32 context_after = 6; + */ + contextAfter?: number; + + /** + * @generated from field: optional int32 context = 7; + */ + context?: number; + + /** + * @generated from field: optional bool case_insensitive = 8; + */ + caseInsensitive?: boolean; + + /** + * --type + * + * @generated from field: optional string type = 9; + */ + type?: string; + + /** + * | head -N + * + * @generated from field: optional int32 head_limit = 10; + */ + headLimit?: number; + + /** + * -U --multiline-dotall + * + * @generated from field: optional bool multiline = 11; + */ + multiline?: boolean; + + /** + * --sort: "none", "path", "modified", "accessed", "created" + * + * @generated from field: optional string sort = 12; + */ + sort?: string; + + /** + * if false, use --sortr for reverse sort + * + * @generated from field: optional bool sort_ascending = 13; + */ + sortAscending?: boolean; + + /** + * @generated from field: string tool_call_id = 14; + */ + toolCallId: string; + + /** + * @generated from field: optional agent.v1.SandboxPolicy sandbox_policy = 15; + */ + sandboxPolicy?: SandboxPolicy; +}; + +/** + * Describes the message agent.v1.GrepArgs. + * Use `create(GrepArgsSchema)` to create a new message. + */ +export const GrepArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 254); + +/** + * @generated from message agent.v1.GrepResult + */ +export type GrepResult = Message<"agent.v1.GrepResult"> & { + /** + * @generated from oneof agent.v1.GrepResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.GrepSuccess success = 1; + */ + value: GrepSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.GrepError error = 2; + */ + value: GrepError; + case: "error"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.GrepResult. + * Use `create(GrepResultSchema)` to create a new message. + */ +export const GrepResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 255); + +/** + * @generated from message agent.v1.GrepError + */ +export type GrepError = Message<"agent.v1.GrepError"> & { + /** + * @generated from field: string error = 1; + */ + error: string; +}; + +/** + * Describes the message agent.v1.GrepError. + * Use `create(GrepErrorSchema)` to create a new message. + */ +export const GrepErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 256); + +/** + * @generated from message agent.v1.GrepSuccess + */ +export type GrepSuccess = Message<"agent.v1.GrepSuccess"> & { + /** + * @generated from field: string pattern = 1; + */ + pattern: string; + + /** + * @generated from field: string path = 2; + */ + path: string; + + /** + * "content", "files_with_matches", or "count" + * + * @generated from field: string output_mode = 3; + */ + outputMode: string; + + /** + * @generated from field: map workspace_results = 4; + */ + workspaceResults: { [key: string]: GrepUnionResult }; + + /** + * @generated from field: optional agent.v1.GrepUnionResult active_editor_result = 5; + */ + activeEditorResult?: GrepUnionResult; +}; + +/** + * Describes the message agent.v1.GrepSuccess. + * Use `create(GrepSuccessSchema)` to create a new message. + */ +export const GrepSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 257); + +/** + * @generated from message agent.v1.GrepUnionResult + */ +export type GrepUnionResult = Message<"agent.v1.GrepUnionResult"> & { + /** + * @generated from oneof agent.v1.GrepUnionResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.GrepCountResult count = 1; + */ + value: GrepCountResult; + case: "count"; + } + | { + /** + * @generated from field: agent.v1.GrepFilesResult files = 2; + */ + value: GrepFilesResult; + case: "files"; + } + | { + /** + * @generated from field: agent.v1.GrepContentResult content = 3; + */ + value: GrepContentResult; + case: "content"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.GrepUnionResult. + * Use `create(GrepUnionResultSchema)` to create a new message. + */ +export const GrepUnionResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 258); + +/** + * @generated from message agent.v1.GrepCountResult + */ +export type GrepCountResult = Message<"agent.v1.GrepCountResult"> & { + /** + * ordered by relevance + * + * @generated from field: repeated agent.v1.GrepFileCount counts = 1; + */ + counts: GrepFileCount[]; + + /** + * The total count of files that the client found from the ripgrep call This is a lower bound if we truncated the output from the ripgrep call itself, but is accurate if client_truncated is true (but may be more than the number of files returned to the server) + * + * @generated from field: int32 total_files = 2; + */ + totalFiles: number; + + /** + * The total count of matches that the client found from the ripgrep call This is a lower bound if we truncated the output from the ripgrep call itself, but is accurate if client_truncated is true (but may be more than the number of matches returned to the server) + * + * @generated from field: int32 total_matches = 3; + */ + totalMatches: number; + + /** + * true if the client truncated the output sent to the server + * + * @generated from field: bool client_truncated = 4; + */ + clientTruncated: boolean; + + /** + * true if we truncated the output from the ripgrep call itself + * + * @generated from field: bool ripgrep_truncated = 5; + */ + ripgrepTruncated: boolean; +}; + +/** + * Describes the message agent.v1.GrepCountResult. + * Use `create(GrepCountResultSchema)` to create a new message. + */ +export const GrepCountResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 259); + +/** + * @generated from message agent.v1.GrepFileCount + */ +export type GrepFileCount = Message<"agent.v1.GrepFileCount"> & { + /** + * @generated from field: string file = 1; + */ + file: string; + + /** + * @generated from field: int32 count = 2; + */ + count: number; +}; + +/** + * Describes the message agent.v1.GrepFileCount. + * Use `create(GrepFileCountSchema)` to create a new message. + */ +export const GrepFileCountSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 260); + +/** + * @generated from message agent.v1.GrepFilesResult + */ +export type GrepFilesResult = Message<"agent.v1.GrepFilesResult"> & { + /** + * ordered by relevance + * + * @generated from field: repeated string files = 1; + */ + files: string[]; + + /** + * The total count of files that the client found from the ripgrep call This is a lower bound if we truncated the output from the ripgrep call itself, but is accurate if client_truncated is true (but may be more than the number of files returned to the server) + * + * @generated from field: int32 total_files = 2; + */ + totalFiles: number; + + /** + * true if the client truncated the output sent to the server + * + * @generated from field: bool client_truncated = 3; + */ + clientTruncated: boolean; + + /** + * true if we truncated the output from the ripgrep call itself + * + * @generated from field: bool ripgrep_truncated = 4; + */ + ripgrepTruncated: boolean; +}; + +/** + * Describes the message agent.v1.GrepFilesResult. + * Use `create(GrepFilesResultSchema)` to create a new message. + */ +export const GrepFilesResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 261); + +/** + * @generated from message agent.v1.GrepContentResult + */ +export type GrepContentResult = Message<"agent.v1.GrepContentResult"> & { + /** + * ordered by relevance + * + * @generated from field: repeated agent.v1.GrepFileMatch matches = 1; + */ + matches: GrepFileMatch[]; + + /** + * The total count of lines that the client found from the ripgrep call This is a lower bound if we truncated the output from the ripgrep call itself, but is accurate if client_truncated is true (but may be more than the number of lines returned to the server) + * + * @generated from field: int32 total_lines = 2; + */ + totalLines: number; + + /** + * The total count of matches that the client found from the ripgrep call This is a lower bound if we truncated the output from the ripgrep call itself, but is accurate if client_truncated is true (but may be more than the number of matches returned to the server) + * + * @generated from field: int32 total_matched_lines = 3; + */ + totalMatchedLines: number; + + /** + * true if the client truncated the output sent to the server + * + * @generated from field: bool client_truncated = 4; + */ + clientTruncated: boolean; + + /** + * true if we truncated the output from the ripgrep call itself + * + * @generated from field: bool ripgrep_truncated = 5; + */ + ripgrepTruncated: boolean; +}; + +/** + * Describes the message agent.v1.GrepContentResult. + * Use `create(GrepContentResultSchema)` to create a new message. + */ +export const GrepContentResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 262); + +/** + * @generated from message agent.v1.GrepFileMatch + */ +export type GrepFileMatch = Message<"agent.v1.GrepFileMatch"> & { + /** + * @generated from field: string file = 1; + */ + file: string; + + /** + * @generated from field: repeated agent.v1.GrepContentMatch matches = 2; + */ + matches: GrepContentMatch[]; +}; + +/** + * Describes the message agent.v1.GrepFileMatch. + * Use `create(GrepFileMatchSchema)` to create a new message. + */ +export const GrepFileMatchSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 263); + +/** + * @generated from message agent.v1.GrepContentMatch + */ +export type GrepContentMatch = Message<"agent.v1.GrepContentMatch"> & { + /** + * @generated from field: int32 line_number = 1; + */ + lineNumber: number; + + /** + * @generated from field: string content = 2; + */ + content: string; + + /** + * @generated from field: bool content_truncated = 3; + */ + contentTruncated: boolean; + + /** + * true for context lines (-A/B/C) + * + * @generated from field: bool is_context_line = 4; + */ + isContextLine: boolean; +}; + +/** + * Describes the message agent.v1.GrepContentMatch. + * Use `create(GrepContentMatchSchema)` to create a new message. + */ +export const GrepContentMatchSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 264); + +/** + * @generated from message agent.v1.GrepStream + */ +export type GrepStream = Message<"agent.v1.GrepStream"> & { + /** + * @generated from field: string pattern = 1; + */ + pattern: string; +}; + +/** + * Describes the message agent.v1.GrepStream. + * Use `create(GrepStreamSchema)` to create a new message. + */ +export const GrepStreamSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 265); + +/** + * @generated from message agent.v1.GrepToolCall + */ +export type GrepToolCall = Message<"agent.v1.GrepToolCall"> & { + /** + * @generated from field: agent.v1.GrepArgs args = 1; + */ + args?: GrepArgs; + + /** + * @generated from field: agent.v1.GrepResult result = 2; + */ + result?: GrepResult; +}; + +/** + * Describes the message agent.v1.GrepToolCall. + * Use `create(GrepToolCallSchema)` to create a new message. + */ +export const GrepToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 266); + +/** + * @generated from message agent.v1.GetBlobArgs + */ +export type GetBlobArgs = Message<"agent.v1.GetBlobArgs"> & { + /** + * @generated from field: bytes blob_id = 1; + */ + blobId: Uint8Array; +}; + +/** + * Describes the message agent.v1.GetBlobArgs. + * Use `create(GetBlobArgsSchema)` to create a new message. + */ +export const GetBlobArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 267); + +/** + * @generated from message agent.v1.GetBlobResult + */ +export type GetBlobResult = Message<"agent.v1.GetBlobResult"> & { + /** + * @generated from field: optional bytes blob_data = 1; + */ + blobData?: Uint8Array; +}; + +/** + * Describes the message agent.v1.GetBlobResult. + * Use `create(GetBlobResultSchema)` to create a new message. + */ +export const GetBlobResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 268); + +/** + * @generated from message agent.v1.SetBlobArgs + */ +export type SetBlobArgs = Message<"agent.v1.SetBlobArgs"> & { + /** + * @generated from field: bytes blob_id = 1; + */ + blobId: Uint8Array; + + /** + * @generated from field: bytes blob_data = 2; + */ + blobData: Uint8Array; +}; + +/** + * Describes the message agent.v1.SetBlobArgs. + * Use `create(SetBlobArgsSchema)` to create a new message. + */ +export const SetBlobArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 269); + +/** + * @generated from message agent.v1.SetBlobResult + */ +export type SetBlobResult = Message<"agent.v1.SetBlobResult"> & { + /** + * @generated from field: optional agent.v1.Error error = 1; + */ + error?: Error; +}; + +/** + * Describes the message agent.v1.SetBlobResult. + * Use `create(SetBlobResultSchema)` to create a new message. + */ +export const SetBlobResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 270); + +/** + * @generated from message agent.v1.KvServerMessage + */ +export type KvServerMessage = Message<"agent.v1.KvServerMessage"> & { + /** + * @generated from field: uint32 id = 1; + */ + id: number; + + /** + * Span context for distributed tracing + * + * @generated from field: optional agent.v1.SpanContext span_context = 4; + */ + spanContext?: SpanContext; + + /** + * @generated from oneof agent.v1.KvServerMessage.message + */ + message: + | { + /** + * @generated from field: agent.v1.GetBlobArgs get_blob_args = 2; + */ + value: GetBlobArgs; + case: "getBlobArgs"; + } + | { + /** + * @generated from field: agent.v1.SetBlobArgs set_blob_args = 3; + */ + value: SetBlobArgs; + case: "setBlobArgs"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.KvServerMessage. + * Use `create(KvServerMessageSchema)` to create a new message. + */ +export const KvServerMessageSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 271); + +/** + * @generated from message agent.v1.KvClientMessage + */ +export type KvClientMessage = Message<"agent.v1.KvClientMessage"> & { + /** + * @generated from field: uint32 id = 1; + */ + id: number; + + /** + * @generated from oneof agent.v1.KvClientMessage.message + */ + message: + | { + /** + * @generated from field: agent.v1.GetBlobResult get_blob_result = 2; + */ + value: GetBlobResult; + case: "getBlobResult"; + } + | { + /** + * @generated from field: agent.v1.SetBlobResult set_blob_result = 3; + */ + value: SetBlobResult; + case: "setBlobResult"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.KvClientMessage. + * Use `create(KvClientMessageSchema)` to create a new message. + */ +export const KvClientMessageSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 272); + +/** + * @generated from message agent.v1.LsArgs + */ +export type LsArgs = Message<"agent.v1.LsArgs"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: repeated string ignore = 2; + */ + ignore: string[]; + + /** + * @generated from field: string tool_call_id = 3; + */ + toolCallId: string; + + /** + * @generated from field: optional agent.v1.SandboxPolicy sandbox_policy = 4; + */ + sandboxPolicy?: SandboxPolicy; + + /** + * defaults to 5000ms + * + * @generated from field: optional uint32 timeout_ms = 5; + */ + timeoutMs?: number; +}; + +/** + * Describes the message agent.v1.LsArgs. + * Use `create(LsArgsSchema)` to create a new message. + */ +export const LsArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 273); + +/** + * @generated from message agent.v1.LsResult + */ +export type LsResult = Message<"agent.v1.LsResult"> & { + /** + * @generated from oneof agent.v1.LsResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.LsSuccess success = 1; + */ + value: LsSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.LsError error = 2; + */ + value: LsError; + case: "error"; + } + | { + /** + * @generated from field: agent.v1.LsRejected rejected = 3; + */ + value: LsRejected; + case: "rejected"; + } + | { + /** + * @generated from field: agent.v1.LsTimeout timeout = 4; + */ + value: LsTimeout; + case: "timeout"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.LsResult. + * Use `create(LsResultSchema)` to create a new message. + */ +export const LsResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 274); + +/** + * @generated from message agent.v1.LsSuccess + */ +export type LsSuccess = Message<"agent.v1.LsSuccess"> & { + /** + * @generated from field: agent.v1.LsDirectoryTreeNode directory_tree_root = 1; + */ + directoryTreeRoot?: LsDirectoryTreeNode; +}; + +/** + * Describes the message agent.v1.LsSuccess. + * Use `create(LsSuccessSchema)` to create a new message. + */ +export const LsSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 275); + +/** + * @generated from message agent.v1.LsDirectoryTreeNode + */ +export type LsDirectoryTreeNode = Message<"agent.v1.LsDirectoryTreeNode"> & { + /** + * @generated from field: string abs_path = 1; + */ + absPath: string; + + /** + * @generated from field: repeated agent.v1.LsDirectoryTreeNode children_dirs = 2; + */ + childrenDirs: LsDirectoryTreeNode[]; + + /** + * @generated from field: repeated agent.v1.LsDirectoryTreeNode_File children_files = 3; + */ + childrenFiles: LsDirectoryTreeNode_File[]; + + /** + * Proto doesn't allow repeated fields to be optional, so in case of empty children arrays, this fields indicates if it happens: `true` - because directory really doesn't have any children `false` - because we stopped traversal before getting to its children + * + * @generated from field: bool children_were_processed = 4; + */ + childrenWereProcessed: boolean; + + /** + * Count of extensions in the full sub-tree + * + * @generated from field: map full_subtree_extension_counts = 5; + */ + fullSubtreeExtensionCounts: { [key: string]: number }; + + /** + * @generated from field: int32 num_files = 6; + */ + numFiles: number; +}; + +/** + * Describes the message agent.v1.LsDirectoryTreeNode. + * Use `create(LsDirectoryTreeNodeSchema)` to create a new message. + */ +export const LsDirectoryTreeNodeSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 276); + +/** + * @generated from message agent.v1.LsDirectoryTreeNode_File + */ +export type LsDirectoryTreeNode_File = Message<"agent.v1.LsDirectoryTreeNode_File"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: optional agent.v1.TerminalMetadata terminal_metadata = 2; + */ + terminalMetadata?: TerminalMetadata; +}; + +/** + * Describes the message agent.v1.LsDirectoryTreeNode_File. + * Use `create(LsDirectoryTreeNode_FileSchema)` to create a new message. + */ +export const LsDirectoryTreeNode_FileSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 277); + +/** + * @generated from message agent.v1.LsError + */ +export type LsError = Message<"agent.v1.LsError"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: string error = 2; + */ + error: string; +}; + +/** + * Describes the message agent.v1.LsError. + * Use `create(LsErrorSchema)` to create a new message. + */ +export const LsErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 278); + +/** + * @generated from message agent.v1.LsRejected + */ +export type LsRejected = Message<"agent.v1.LsRejected"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: string reason = 2; + */ + reason: string; +}; + +/** + * Describes the message agent.v1.LsRejected. + * Use `create(LsRejectedSchema)` to create a new message. + */ +export const LsRejectedSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 279); + +/** + * Returned when ls operation timed out. Contains partial results gathered before timeout. + * + * @generated from message agent.v1.LsTimeout + */ +export type LsTimeout = Message<"agent.v1.LsTimeout"> & { + /** + * @generated from field: agent.v1.LsDirectoryTreeNode directory_tree_root = 1; + */ + directoryTreeRoot?: LsDirectoryTreeNode; +}; + +/** + * Describes the message agent.v1.LsTimeout. + * Use `create(LsTimeoutSchema)` to create a new message. + */ +export const LsTimeoutSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 280); + +/** + * @generated from message agent.v1.TerminalMetadata + */ +export type TerminalMetadata = Message<"agent.v1.TerminalMetadata"> & { + /** + * @generated from field: optional string cwd = 1; + */ + cwd?: string; + + /** + * @generated from field: repeated agent.v1.TerminalMetadata_Command last_commands = 2; + */ + lastCommands: TerminalMetadata_Command[]; + + /** + * @generated from field: optional int64 last_modified_ms = 3; + */ + lastModifiedMs?: bigint; + + /** + * @generated from field: optional agent.v1.TerminalMetadata_Command current_command = 4; + */ + currentCommand?: TerminalMetadata_Command; +}; + +/** + * Describes the message agent.v1.TerminalMetadata. + * Use `create(TerminalMetadataSchema)` to create a new message. + */ +export const TerminalMetadataSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 281); + +/** + * @generated from message agent.v1.TerminalMetadata_Command + */ +export type TerminalMetadata_Command = Message<"agent.v1.TerminalMetadata_Command"> & { + /** + * @generated from field: string command = 1; + */ + command: string; + + /** + * @generated from field: optional int32 exit_code = 2; + */ + exitCode?: number; + + /** + * @generated from field: optional int64 timestamp_ms = 3; + */ + timestampMs?: bigint; + + /** + * @generated from field: optional int64 duration_ms = 4; + */ + durationMs?: bigint; +}; + +/** + * Describes the message agent.v1.TerminalMetadata_Command. + * Use `create(TerminalMetadata_CommandSchema)` to create a new message. + */ +export const TerminalMetadata_CommandSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 282); + +/** + * @generated from message agent.v1.LsToolCall + */ +export type LsToolCall = Message<"agent.v1.LsToolCall"> & { + /** + * @generated from field: agent.v1.LsArgs args = 1; + */ + args?: LsArgs; + + /** + * @generated from field: agent.v1.LsResult result = 2; + */ + result?: LsResult; +}; + +/** + * Describes the message agent.v1.LsToolCall. + * Use `create(LsToolCallSchema)` to create a new message. + */ +export const LsToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 283); + +/** + * @generated from message agent.v1.McpArgs + */ +export type McpArgs = Message<"agent.v1.McpArgs"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: map args = 2; + */ + args: { [key: string]: Uint8Array }; + + /** + * @generated from field: string tool_call_id = 3; + */ + toolCallId: string; + + /** + * @generated from field: string provider_identifier = 4; + */ + providerIdentifier: string; + + /** + * @generated from field: string tool_name = 5; + */ + toolName: string; +}; + +/** + * Describes the message agent.v1.McpArgs. + * Use `create(McpArgsSchema)` to create a new message. + */ +export const McpArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 284); + +/** + * @generated from message agent.v1.McpResult + */ +export type McpResult = Message<"agent.v1.McpResult"> & { + /** + * @generated from oneof agent.v1.McpResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.McpSuccess success = 1; + */ + value: McpSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.McpError error = 2; + */ + value: McpError; + case: "error"; + } + | { + /** + * @generated from field: agent.v1.McpRejected rejected = 3; + */ + value: McpRejected; + case: "rejected"; + } + | { + /** + * @generated from field: agent.v1.McpPermissionDenied permission_denied = 4; + */ + value: McpPermissionDenied; + case: "permissionDenied"; + } + | { + /** + * @generated from field: agent.v1.McpToolNotFound tool_not_found = 5; + */ + value: McpToolNotFound; + case: "toolNotFound"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.McpResult. + * Use `create(McpResultSchema)` to create a new message. + */ +export const McpResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 285); + +/** + * @generated from message agent.v1.McpToolNotFound + */ +export type McpToolNotFound = Message<"agent.v1.McpToolNotFound"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: repeated string available_tools = 2; + */ + availableTools: string[]; +}; + +/** + * Describes the message agent.v1.McpToolNotFound. + * Use `create(McpToolNotFoundSchema)` to create a new message. + */ +export const McpToolNotFoundSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 286); + +/** + * Text content item + * + * @generated from message agent.v1.McpTextContent + */ +export type McpTextContent = Message<"agent.v1.McpTextContent"> & { + /** + * @generated from field: string text = 1; + */ + text: string; + + /** + * Optional file location for large outputs + * + * @generated from field: optional agent.v1.OutputLocation output_location = 2; + */ + outputLocation?: OutputLocation; +}; + +/** + * Describes the message agent.v1.McpTextContent. + * Use `create(McpTextContentSchema)` to create a new message. + */ +export const McpTextContentSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 287); + +/** + * Image content item + * + * @generated from message agent.v1.McpImageContent + */ +export type McpImageContent = Message<"agent.v1.McpImageContent"> & { + /** + * Raw bytes of the image. In JSON, this will be base64-encoded. + * + * @generated from field: bytes data = 1; + */ + data: Uint8Array; + + /** + * Optional MIME type, e.g. "image/png" + * + * @generated from field: string mime_type = 2; + */ + mimeType: string; +}; + +/** + * Describes the message agent.v1.McpImageContent. + * Use `create(McpImageContentSchema)` to create a new message. + */ +export const McpImageContentSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 288); + +/** + * A single tool result content item: either text or image + * + * @generated from message agent.v1.McpToolResultContentItem + */ +export type McpToolResultContentItem = Message<"agent.v1.McpToolResultContentItem"> & { + /** + * @generated from oneof agent.v1.McpToolResultContentItem.content + */ + content: + | { + /** + * @generated from field: agent.v1.McpTextContent text = 1; + */ + value: McpTextContent; + case: "text"; + } + | { + /** + * @generated from field: agent.v1.McpImageContent image = 2; + */ + value: McpImageContent; + case: "image"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.McpToolResultContentItem. + * Use `create(McpToolResultContentItemSchema)` to create a new message. + */ +export const McpToolResultContentItemSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 289); + +/** + * Equivalent to the requested McpToolResult TypeScript type + * + * @generated from message agent.v1.McpSuccess + */ +export type McpSuccess = Message<"agent.v1.McpSuccess"> & { + /** + * @generated from field: repeated agent.v1.McpToolResultContentItem content = 1; + */ + content: McpToolResultContentItem[]; + + /** + * @generated from field: bool is_error = 2; + */ + isError: boolean; +}; + +/** + * Describes the message agent.v1.McpSuccess. + * Use `create(McpSuccessSchema)` to create a new message. + */ +export const McpSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 290); + +/** + * @generated from message agent.v1.McpError + */ +export type McpError = Message<"agent.v1.McpError"> & { + /** + * @generated from field: string error = 1; + */ + error: string; +}; + +/** + * Describes the message agent.v1.McpError. + * Use `create(McpErrorSchema)` to create a new message. + */ +export const McpErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 291); + +/** + * @generated from message agent.v1.McpRejected + */ +export type McpRejected = Message<"agent.v1.McpRejected"> & { + /** + * @generated from field: string reason = 1; + */ + reason: string; + + /** + * @generated from field: bool is_readonly = 2; + */ + isReadonly: boolean; +}; + +/** + * Describes the message agent.v1.McpRejected. + * Use `create(McpRejectedSchema)` to create a new message. + */ +export const McpRejectedSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 292); + +/** + * @generated from message agent.v1.McpPermissionDenied + */ +export type McpPermissionDenied = Message<"agent.v1.McpPermissionDenied"> & { + /** + * @generated from field: string error = 1; + */ + error: string; + + /** + * @generated from field: bool is_readonly = 2; + */ + isReadonly: boolean; +}; + +/** + * Describes the message agent.v1.McpPermissionDenied. + * Use `create(McpPermissionDeniedSchema)` to create a new message. + */ +export const McpPermissionDeniedSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 293); + +/** + * List MCP resources exec args + * + * @generated from message agent.v1.ListMcpResourcesExecArgs + */ +export type ListMcpResourcesExecArgs = Message<"agent.v1.ListMcpResourcesExecArgs"> & { + /** + * Optional server name to filter resources by + * + * @generated from field: optional string server = 1; + */ + server?: string; +}; + +/** + * Describes the message agent.v1.ListMcpResourcesExecArgs. + * Use `create(ListMcpResourcesExecArgsSchema)` to create a new message. + */ +export const ListMcpResourcesExecArgsSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 294); + +/** + * List MCP resources exec result + * + * @generated from message agent.v1.ListMcpResourcesExecResult + */ +export type ListMcpResourcesExecResult = Message<"agent.v1.ListMcpResourcesExecResult"> & { + /** + * @generated from oneof agent.v1.ListMcpResourcesExecResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.ListMcpResourcesSuccess success = 1; + */ + value: ListMcpResourcesSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.ListMcpResourcesError error = 2; + */ + value: ListMcpResourcesError; + case: "error"; + } + | { + /** + * @generated from field: agent.v1.ListMcpResourcesRejected rejected = 3; + */ + value: ListMcpResourcesRejected; + case: "rejected"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ListMcpResourcesExecResult. + * Use `create(ListMcpResourcesExecResultSchema)` to create a new message. + */ +export const ListMcpResourcesExecResultSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 295); + +/** + * @generated from message agent.v1.ListMcpResourcesExecResult_McpResource + */ +export type ListMcpResourcesExecResult_McpResource = Message<"agent.v1.ListMcpResourcesExecResult_McpResource"> & { + /** + * @generated from field: string uri = 1; + */ + uri: string; + + /** + * @generated from field: optional string name = 2; + */ + name?: string; + + /** + * @generated from field: optional string description = 3; + */ + description?: string; + + /** + * @generated from field: optional string mime_type = 4; + */ + mimeType?: string; + + /** + * Server name that provides this resource + * + * @generated from field: string server = 5; + */ + server: string; + + /** + * Additional metadata + * + * @generated from field: map annotations = 6; + */ + annotations: { [key: string]: string }; +}; + +/** + * Describes the message agent.v1.ListMcpResourcesExecResult_McpResource. + * Use `create(ListMcpResourcesExecResult_McpResourceSchema)` to create a new message. + */ +export const ListMcpResourcesExecResult_McpResourceSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 296); + +/** + * @generated from message agent.v1.ListMcpResourcesSuccess + */ +export type ListMcpResourcesSuccess = Message<"agent.v1.ListMcpResourcesSuccess"> & { + /** + * @generated from field: repeated agent.v1.ListMcpResourcesExecResult_McpResource resources = 1; + */ + resources: ListMcpResourcesExecResult_McpResource[]; +}; + +/** + * Describes the message agent.v1.ListMcpResourcesSuccess. + * Use `create(ListMcpResourcesSuccessSchema)` to create a new message. + */ +export const ListMcpResourcesSuccessSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 297); + +/** + * @generated from message agent.v1.ListMcpResourcesError + */ +export type ListMcpResourcesError = Message<"agent.v1.ListMcpResourcesError"> & { + /** + * @generated from field: string error = 1; + */ + error: string; +}; + +/** + * Describes the message agent.v1.ListMcpResourcesError. + * Use `create(ListMcpResourcesErrorSchema)` to create a new message. + */ +export const ListMcpResourcesErrorSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 298); + +/** + * @generated from message agent.v1.ListMcpResourcesRejected + */ +export type ListMcpResourcesRejected = Message<"agent.v1.ListMcpResourcesRejected"> & { + /** + * @generated from field: string reason = 1; + */ + reason: string; +}; + +/** + * Describes the message agent.v1.ListMcpResourcesRejected. + * Use `create(ListMcpResourcesRejectedSchema)` to create a new message. + */ +export const ListMcpResourcesRejectedSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 299); + +/** + * Read MCP resource exec args + * + * @generated from message agent.v1.ReadMcpResourceExecArgs + */ +export type ReadMcpResourceExecArgs = Message<"agent.v1.ReadMcpResourceExecArgs"> & { + /** + * Required server name + * + * @generated from field: string server = 1; + */ + server: string; + + /** + * Required resource URI + * + * @generated from field: string uri = 2; + */ + uri: string; + + /** + * Optional: when set, the resource will be downloaded to this path relative to the workspace, and the content will not be returned to the model. + * + * @generated from field: optional string download_path = 3; + */ + downloadPath?: string; +}; + +/** + * Describes the message agent.v1.ReadMcpResourceExecArgs. + * Use `create(ReadMcpResourceExecArgsSchema)` to create a new message. + */ +export const ReadMcpResourceExecArgsSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 300); + +/** + * Read MCP resource exec result + * + * @generated from message agent.v1.ReadMcpResourceExecResult + */ +export type ReadMcpResourceExecResult = Message<"agent.v1.ReadMcpResourceExecResult"> & { + /** + * @generated from oneof agent.v1.ReadMcpResourceExecResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.ReadMcpResourceSuccess success = 1; + */ + value: ReadMcpResourceSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.ReadMcpResourceError error = 2; + */ + value: ReadMcpResourceError; + case: "error"; + } + | { + /** + * @generated from field: agent.v1.ReadMcpResourceRejected rejected = 3; + */ + value: ReadMcpResourceRejected; + case: "rejected"; + } + | { + /** + * @generated from field: agent.v1.ReadMcpResourceNotFound not_found = 4; + */ + value: ReadMcpResourceNotFound; + case: "notFound"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ReadMcpResourceExecResult. + * Use `create(ReadMcpResourceExecResultSchema)` to create a new message. + */ +export const ReadMcpResourceExecResultSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 301); + +/** + * @generated from message agent.v1.ReadMcpResourceSuccess + */ +export type ReadMcpResourceSuccess = Message<"agent.v1.ReadMcpResourceSuccess"> & { + /** + * @generated from field: string uri = 1; + */ + uri: string; + + /** + * @generated from field: optional string name = 2; + */ + name?: string; + + /** + * @generated from field: optional string description = 3; + */ + description?: string; + + /** + * @generated from field: optional string mime_type = 4; + */ + mimeType?: string; + + /** + * Additional metadata + * + * @generated from field: map annotations = 7; + */ + annotations: { [key: string]: string }; + + /** + * If set, resource was downloaded to this path + * + * @generated from field: optional string download_path = 8; + */ + downloadPath?: string; + + /** + * @generated from oneof agent.v1.ReadMcpResourceSuccess.content + */ + content: + | { + /** + * @generated from field: string text = 5; + */ + value: string; + case: "text"; + } + | { + /** + * @generated from field: bytes blob = 6; + */ + value: Uint8Array; + case: "blob"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ReadMcpResourceSuccess. + * Use `create(ReadMcpResourceSuccessSchema)` to create a new message. + */ +export const ReadMcpResourceSuccessSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 302); + +/** + * @generated from message agent.v1.ReadMcpResourceError + */ +export type ReadMcpResourceError = Message<"agent.v1.ReadMcpResourceError"> & { + /** + * @generated from field: string uri = 1; + */ + uri: string; + + /** + * @generated from field: string error = 2; + */ + error: string; +}; + +/** + * Describes the message agent.v1.ReadMcpResourceError. + * Use `create(ReadMcpResourceErrorSchema)` to create a new message. + */ +export const ReadMcpResourceErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 303); + +/** + * @generated from message agent.v1.ReadMcpResourceRejected + */ +export type ReadMcpResourceRejected = Message<"agent.v1.ReadMcpResourceRejected"> & { + /** + * @generated from field: string uri = 1; + */ + uri: string; + + /** + * @generated from field: string reason = 2; + */ + reason: string; +}; + +/** + * Describes the message agent.v1.ReadMcpResourceRejected. + * Use `create(ReadMcpResourceRejectedSchema)` to create a new message. + */ +export const ReadMcpResourceRejectedSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 304); + +/** + * @generated from message agent.v1.ReadMcpResourceNotFound + */ +export type ReadMcpResourceNotFound = Message<"agent.v1.ReadMcpResourceNotFound"> & { + /** + * @generated from field: string uri = 1; + */ + uri: string; +}; + +/** + * Describes the message agent.v1.ReadMcpResourceNotFound. + * Use `create(ReadMcpResourceNotFoundSchema)` to create a new message. + */ +export const ReadMcpResourceNotFoundSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 305); + +/** + * @generated from message agent.v1.McpToolDefinition + */ +export type McpToolDefinition = Message<"agent.v1.McpToolDefinition"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: string provider_identifier = 4; + */ + providerIdentifier: string; + + /** + * @generated from field: string tool_name = 5; + */ + toolName: string; + + /** + * @generated from field: string description = 2; + */ + description: string; + + /** + * @generated from field: bytes input_schema = 3; + */ + inputSchema: Uint8Array; +}; + +/** + * Describes the message agent.v1.McpToolDefinition. + * Use `create(McpToolDefinitionSchema)` to create a new message. + */ +export const McpToolDefinitionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 306); + +/** + * @generated from message agent.v1.McpTools + */ +export type McpTools = Message<"agent.v1.McpTools"> & { + /** + * @generated from field: repeated agent.v1.McpToolDefinition mcp_tools = 1; + */ + mcpTools: McpToolDefinition[]; +}; + +/** + * Describes the message agent.v1.McpTools. + * Use `create(McpToolsSchema)` to create a new message. + */ +export const McpToolsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 307); + +/** + * Represents MCP-provided instructions from a specific server + * + * @generated from message agent.v1.McpInstructions + */ +export type McpInstructions = Message<"agent.v1.McpInstructions"> & { + /** + * @generated from field: string server_name = 1; + */ + serverName: string; + + /** + * @generated from field: string instructions = 2; + */ + instructions: string; +}; + +/** + * Describes the message agent.v1.McpInstructions. + * Use `create(McpInstructionsSchema)` to create a new message. + */ +export const McpInstructionsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 308); + +/** + * @generated from message agent.v1.McpDescriptor + */ +export type McpDescriptor = Message<"agent.v1.McpDescriptor"> & { + /** + * Display name of the MCP server associated with this folder. + * + * @generated from field: string server_name = 1; + */ + serverName: string; + + /** + * @generated from field: string server_identifier = 2; + */ + serverIdentifier: string; + + /** + * Absolute folder path where MCP tool descriptor JSON files are stored. + * + * @generated from field: optional string folder_path = 3; + */ + folderPath?: string; + + /** + * @generated from field: optional string server_use_instructions = 4; + */ + serverUseInstructions?: string; + + /** + * @generated from field: repeated agent.v1.McpToolDescriptor tools = 5; + */ + tools: McpToolDescriptor[]; +}; + +/** + * Describes the message agent.v1.McpDescriptor. + * Use `create(McpDescriptorSchema)` to create a new message. + */ +export const McpDescriptorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 309); + +/** + * @generated from message agent.v1.McpToolDescriptor + */ +export type McpToolDescriptor = Message<"agent.v1.McpToolDescriptor"> & { + /** + * @generated from field: string tool_name = 1; + */ + toolName: string; + + /** + * @generated from field: optional string definition_path = 2; + */ + definitionPath?: string; +}; + +/** + * Describes the message agent.v1.McpToolDescriptor. + * Use `create(McpToolDescriptorSchema)` to create a new message. + */ +export const McpToolDescriptorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 310); + +/** + * @generated from message agent.v1.McpFileSystemOptions + */ +export type McpFileSystemOptions = Message<"agent.v1.McpFileSystemOptions"> & { + /** + * @generated from field: bool enabled = 1; + */ + enabled: boolean; + + /** + * @generated from field: string workspace_project_dir = 2; + */ + workspaceProjectDir: string; + + /** + * @generated from field: repeated agent.v1.McpDescriptor mcp_descriptors = 3; + */ + mcpDescriptors: McpDescriptor[]; +}; + +/** + * Describes the message agent.v1.McpFileSystemOptions. + * Use `create(McpFileSystemOptionsSchema)` to create a new message. + */ +export const McpFileSystemOptionsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 311); + +/** + * @generated from message agent.v1.ReadArgs + */ +export type ReadArgs = Message<"agent.v1.ReadArgs"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: string tool_call_id = 2; + */ + toolCallId: string; +}; + +/** + * Describes the message agent.v1.ReadArgs. + * Use `create(ReadArgsSchema)` to create a new message. + */ +export const ReadArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 312); + +/** + * @generated from message agent.v1.ReadResult + */ +export type ReadResult = Message<"agent.v1.ReadResult"> & { + /** + * @generated from oneof agent.v1.ReadResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.ReadSuccess success = 1; + */ + value: ReadSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.ReadError error = 2; + */ + value: ReadError; + case: "error"; + } + | { + /** + * @generated from field: agent.v1.ReadRejected rejected = 3; + */ + value: ReadRejected; + case: "rejected"; + } + | { + /** + * @generated from field: agent.v1.ReadFileNotFound file_not_found = 4; + */ + value: ReadFileNotFound; + case: "fileNotFound"; + } + | { + /** + * @generated from field: agent.v1.ReadPermissionDenied permission_denied = 5; + */ + value: ReadPermissionDenied; + case: "permissionDenied"; + } + | { + /** + * @generated from field: agent.v1.ReadInvalidFile invalid_file = 6; + */ + value: ReadInvalidFile; + case: "invalidFile"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ReadResult. + * Use `create(ReadResultSchema)` to create a new message. + */ +export const ReadResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 313); + +/** + * @generated from message agent.v1.ReadSuccess + */ +export type ReadSuccess = Message<"agent.v1.ReadSuccess"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: int32 total_lines = 3; + */ + totalLines: number; + + /** + * @generated from field: int64 file_size = 4; + */ + fileSize: bigint; + + /** + * true if the content was truncated due to size limits + * + * @generated from field: bool truncated = 6; + */ + truncated: boolean; + + /** + * Returns blob ID if the output was stored in the blob store. If provided, the output is stored separately from the rest of the tool result, and since it's already in the blob store, it need not be sent back to the client -- reducing bandwidth. + * + * @generated from field: optional bytes output_blob_id = 7; + */ + outputBlobId?: Uint8Array; + + /** + * @generated from oneof agent.v1.ReadSuccess.output + */ + output: + | { + /** + * @generated from field: string content = 2; + */ + value: string; + case: "content"; + } + | { + /** + * @generated from field: bytes data = 5; + */ + value: Uint8Array; + case: "data"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ReadSuccess. + * Use `create(ReadSuccessSchema)` to create a new message. + */ +export const ReadSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 314); + +/** + * @generated from message agent.v1.ReadError + */ +export type ReadError = Message<"agent.v1.ReadError"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: string error = 2; + */ + error: string; +}; + +/** + * Describes the message agent.v1.ReadError. + * Use `create(ReadErrorSchema)` to create a new message. + */ +export const ReadErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 315); + +/** + * @generated from message agent.v1.ReadRejected + */ +export type ReadRejected = Message<"agent.v1.ReadRejected"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: string reason = 2; + */ + reason: string; +}; + +/** + * Describes the message agent.v1.ReadRejected. + * Use `create(ReadRejectedSchema)` to create a new message. + */ +export const ReadRejectedSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 316); + +/** + * @generated from message agent.v1.ReadFileNotFound + */ +export type ReadFileNotFound = Message<"agent.v1.ReadFileNotFound"> & { + /** + * @generated from field: string path = 1; + */ + path: string; +}; + +/** + * Describes the message agent.v1.ReadFileNotFound. + * Use `create(ReadFileNotFoundSchema)` to create a new message. + */ +export const ReadFileNotFoundSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 317); + +/** + * @generated from message agent.v1.ReadPermissionDenied + */ +export type ReadPermissionDenied = Message<"agent.v1.ReadPermissionDenied"> & { + /** + * @generated from field: string path = 1; + */ + path: string; +}; + +/** + * Describes the message agent.v1.ReadPermissionDenied. + * Use `create(ReadPermissionDeniedSchema)` to create a new message. + */ +export const ReadPermissionDeniedSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 318); + +/** + * @generated from message agent.v1.ReadInvalidFile + */ +export type ReadInvalidFile = Message<"agent.v1.ReadInvalidFile"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * e.g., "Path is a directory, not a file" + * + * @generated from field: string reason = 2; + */ + reason: string; +}; + +/** + * Describes the message agent.v1.ReadInvalidFile. + * Use `create(ReadInvalidFileSchema)` to create a new message. + */ +export const ReadInvalidFileSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 319); + +/** + * @generated from message agent.v1.ReadToolCall + */ +export type ReadToolCall = Message<"agent.v1.ReadToolCall"> & { + /** + * @generated from field: agent.v1.ReadToolArgs args = 1; + */ + args?: ReadToolArgs; + + /** + * @generated from field: agent.v1.ReadToolResult result = 2; + */ + result?: ReadToolResult; +}; + +/** + * Describes the message agent.v1.ReadToolCall. + * Use `create(ReadToolCallSchema)` to create a new message. + */ +export const ReadToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 320); + +/** + * @generated from message agent.v1.ReadToolArgs + */ +export type ReadToolArgs = Message<"agent.v1.ReadToolArgs"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: optional int32 offset = 2; + */ + offset?: number; + + /** + * @generated from field: optional int32 limit = 3; + */ + limit?: number; +}; + +/** + * Describes the message agent.v1.ReadToolArgs. + * Use `create(ReadToolArgsSchema)` to create a new message. + */ +export const ReadToolArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 321); + +/** + * @generated from message agent.v1.ReadToolResult + */ +export type ReadToolResult = Message<"agent.v1.ReadToolResult"> & { + /** + * @generated from oneof agent.v1.ReadToolResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.ReadToolSuccess success = 1; + */ + value: ReadToolSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.ReadToolError error = 2; + */ + value: ReadToolError; + case: "error"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ReadToolResult. + * Use `create(ReadToolResultSchema)` to create a new message. + */ +export const ReadToolResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 322); + +/** + * @generated from message agent.v1.ReadRange + */ +export type ReadRange = Message<"agent.v1.ReadRange"> & { + /** + * @generated from field: uint32 start_line = 1; + */ + startLine: number; + + /** + * @generated from field: uint32 end_line = 2; + */ + endLine: number; +}; + +/** + * Describes the message agent.v1.ReadRange. + * Use `create(ReadRangeSchema)` to create a new message. + */ +export const ReadRangeSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 323); + +/** + * @generated from message agent.v1.ReadToolSuccess + */ +export type ReadToolSuccess = Message<"agent.v1.ReadToolSuccess"> & { + /** + * @generated from field: bool is_empty = 2; + */ + isEmpty: boolean; + + /** + * @generated from field: bool exceeded_limit = 3; + */ + exceededLimit: boolean; + + /** + * @generated from field: uint32 total_lines = 4; + */ + totalLines: number; + + /** + * @generated from field: uint32 file_size = 5; + */ + fileSize: number; + + /** + * @generated from field: string path = 7; + */ + path: string; + + /** + * @generated from field: optional agent.v1.ReadRange read_range = 8; + */ + readRange?: ReadRange; + + /** + * @generated from oneof agent.v1.ReadToolSuccess.output + */ + output: + | { + /** + * @generated from field: string content = 1; + */ + value: string; + case: "content"; + } + | { + /** + * @generated from field: bytes data = 6; + */ + value: Uint8Array; + case: "data"; + } + | { + /** + * @generated from field: bytes data_blob_id = 9; + */ + value: Uint8Array; + case: "dataBlobId"; + } + | { + /** + * @generated from field: bytes content_blob_id = 10; + */ + value: Uint8Array; + case: "contentBlobId"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ReadToolSuccess. + * Use `create(ReadToolSuccessSchema)` to create a new message. + */ +export const ReadToolSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 324); + +/** + * @generated from message agent.v1.ReadToolError + */ +export type ReadToolError = Message<"agent.v1.ReadToolError"> & { + /** + * @generated from field: string error_message = 1; + */ + errorMessage: string; +}; + +/** + * Describes the message agent.v1.ReadToolError. + * Use `create(ReadToolErrorSchema)` to create a new message. + */ +export const ReadToolErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 325); + +/** + * @generated from message agent.v1.RecordScreenArgs + */ +export type RecordScreenArgs = Message<"agent.v1.RecordScreenArgs"> & { + /** + * @generated from field: int32 mode = 1; + */ + mode: number; + + /** + * @generated from field: string tool_call_id = 2; + */ + toolCallId: string; + + /** + * Custom filename for SAVE_RECORDING mode + * + * @generated from field: optional string save_as_filename = 3; + */ + saveAsFilename?: string; +}; + +/** + * Describes the message agent.v1.RecordScreenArgs. + * Use `create(RecordScreenArgsSchema)` to create a new message. + */ +export const RecordScreenArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 326); + +/** + * @generated from message agent.v1.RecordScreenResult + */ +export type RecordScreenResult = Message<"agent.v1.RecordScreenResult"> & { + /** + * @generated from oneof agent.v1.RecordScreenResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.RecordScreenStartSuccess start_success = 1; + */ + value: RecordScreenStartSuccess; + case: "startSuccess"; + } + | { + /** + * @generated from field: agent.v1.RecordScreenSaveSuccess save_success = 2; + */ + value: RecordScreenSaveSuccess; + case: "saveSuccess"; + } + | { + /** + * @generated from field: agent.v1.RecordScreenDiscardSuccess discard_success = 3; + */ + value: RecordScreenDiscardSuccess; + case: "discardSuccess"; + } + | { + /** + * @generated from field: agent.v1.RecordScreenFailure failure = 4; + */ + value: RecordScreenFailure; + case: "failure"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.RecordScreenResult. + * Use `create(RecordScreenResultSchema)` to create a new message. + */ +export const RecordScreenResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 327); + +/** + * @generated from message agent.v1.RecordScreenStartSuccess + */ +export type RecordScreenStartSuccess = Message<"agent.v1.RecordScreenStartSuccess"> & { + /** + * True if a prior recording was cancelled, false otherwise + * + * @generated from field: bool was_prior_recording_cancelled = 1; + */ + wasPriorRecordingCancelled: boolean; + + /** + * True if save_as_filename arg was passed to start tool and ignored + * + * @generated from field: bool was_save_as_filename_ignored = 2; + */ + wasSaveAsFilenameIgnored: boolean; +}; + +/** + * Describes the message agent.v1.RecordScreenStartSuccess. + * Use `create(RecordScreenStartSuccessSchema)` to create a new message. + */ +export const RecordScreenStartSuccessSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 328); + +/** + * @generated from message agent.v1.RecordScreenSaveSuccess + */ +export type RecordScreenSaveSuccess = Message<"agent.v1.RecordScreenSaveSuccess"> & { + /** + * Path to the saved recording file + * + * @generated from field: string path = 1; + */ + path: string; + + /** + * Duration of the recording in milliseconds + * + * @generated from field: int64 recording_duration_ms = 2; + */ + recordingDurationMs: bigint; + + /** + * Set if save_as_filename was invalid and default path was used instead + * + * @generated from field: optional int32 requested_file_path_rejected_reason = 3; + */ + requestedFilePathRejectedReason?: number; +}; + +/** + * Describes the message agent.v1.RecordScreenSaveSuccess. + * Use `create(RecordScreenSaveSuccessSchema)` to create a new message. + */ +export const RecordScreenSaveSuccessSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 329); + +/** + * Empty message - recording discarded successfully + * + * @generated from message agent.v1.RecordScreenDiscardSuccess + */ +export type RecordScreenDiscardSuccess = Message<"agent.v1.RecordScreenDiscardSuccess"> & {}; + +/** + * Describes the message agent.v1.RecordScreenDiscardSuccess. + * Use `create(RecordScreenDiscardSuccessSchema)` to create a new message. + */ +export const RecordScreenDiscardSuccessSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 330); + +/** + * @generated from message agent.v1.RecordScreenFailure + */ +export type RecordScreenFailure = Message<"agent.v1.RecordScreenFailure"> & { + /** + * Error message + * + * @generated from field: string error = 1; + */ + error: string; +}; + +/** + * Describes the message agent.v1.RecordScreenFailure. + * Use `create(RecordScreenFailureSchema)` to create a new message. + */ +export const RecordScreenFailureSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 331); + +/** + * @generated from message agent.v1.CursorPackagePrompt + */ +export type CursorPackagePrompt = Message<"agent.v1.CursorPackagePrompt"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: string file_path = 2; + */ + filePath: string; +}; + +/** + * Describes the message agent.v1.CursorPackagePrompt. + * Use `create(CursorPackagePromptSchema)` to create a new message. + */ +export const CursorPackagePromptSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 332); + +/** + * @generated from message agent.v1.CursorPackage + */ +export type CursorPackage = Message<"agent.v1.CursorPackage"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: string description = 2; + */ + description: string; + + /** + * @generated from field: string folder_path = 3; + */ + folderPath: string; + + /** + * @generated from field: bool enabled = 4; + */ + enabled: boolean; + + /** + * @generated from field: optional string parse_error = 5; + */ + parseError?: string; + + /** + * @generated from field: repeated agent.v1.CursorPackagePrompt prompts = 6; + */ + prompts: CursorPackagePrompt[]; + + /** + * @generated from field: string readme_file_path = 7; + */ + readmeFilePath: string; + + /** + * @generated from field: int32 package_type = 8; + */ + packageType: number; +}; + +/** + * Describes the message agent.v1.CursorPackage. + * Use `create(CursorPackageSchema)` to create a new message. + */ +export const CursorPackageSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 333); + +/** + * TODO: you should be able to override / configure this list in your .vscode settings not exactly sure what that should look like... but i guess you should be able to specify an override URL because we use URLs for identifying repos and maybe you should be able to specify additional buckets too... like in the jane street case: i guess jane street should have some default buckets + * + * @generated from message agent.v1.RepositoryIndexingInfo + */ +export type RepositoryIndexingInfo = Message<"agent.v1.RepositoryIndexingInfo"> & { + /** + * the relative path in the current workspace this is useful for locating the repo and identifying what repo a given file is in this should be unique for different repositories (I think) + * + * @generated from field: string relative_workspace_path = 1; + */ + relativeWorkspacePath: string; + + /** + * a git repo may have multiple remotes at the server we choose the remote (either origin, or the one we have embedded, or something else) invariant: len(remote_urls) == len(remote_names) + * + * @generated from field: repeated string remote_urls = 2; + */ + remoteUrls: string[]; + + /** + * @generated from field: repeated string remote_names = 3; + */ + remoteNames: string[]; + + /** + * @generated from field: string repo_name = 4; + */ + repoName: string; + + /** + * @generated from field: string repo_owner = 5; + */ + repoOwner: string; + + /** + * @generated from field: bool is_tracked = 6; + */ + isTracked: boolean; + + /** + * If this is local + * + * @generated from field: bool is_local = 7; + */ + isLocal: boolean; + + /** + * the orthogonal transform seed if sent from the client! if the client sends up the transform seed then we use that for the orthogonal transform instead of the value stored in the database + * + * @generated from field: optional double orthogonal_transform_seed = 8; + */ + orthogonalTransformSeed?: number; + + /** + * The encrypted workspace uri for the repository. + * + * @generated from field: string workspace_uri = 9; + */ + workspaceUri: string; + + /** + * The encryption key for partial paths + * + * @generated from field: string path_encryption_key = 10; + */ + pathEncryptionKey: string; +}; + +/** + * Describes the message agent.v1.RepositoryIndexingInfo. + * Use `create(RepositoryIndexingInfoSchema)` to create a new message. + */ +export const RepositoryIndexingInfoSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 334); + +/** + * @generated from message agent.v1.RequestContextArgs + */ +export type RequestContextArgs = Message<"agent.v1.RequestContextArgs"> & { + /** + * @generated from field: optional string notes_session_id = 2; + */ + notesSessionId?: string; + + /** + * @generated from field: optional string workspace_id = 3; + */ + workspaceId?: string; +}; + +/** + * Describes the message agent.v1.RequestContextArgs. + * Use `create(RequestContextArgsSchema)` to create a new message. + */ +export const RequestContextArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 335); + +/** + * @generated from message agent.v1.RequestContextResult + */ +export type RequestContextResult = Message<"agent.v1.RequestContextResult"> & { + /** + * @generated from oneof agent.v1.RequestContextResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.RequestContextSuccess success = 1; + */ + value: RequestContextSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.RequestContextError error = 2; + */ + value: RequestContextError; + case: "error"; + } + | { + /** + * @generated from field: agent.v1.RequestContextRejected rejected = 3; + */ + value: RequestContextRejected; + case: "rejected"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.RequestContextResult. + * Use `create(RequestContextResultSchema)` to create a new message. + */ +export const RequestContextResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 336); + +/** + * @generated from message agent.v1.RequestContextSuccess + */ +export type RequestContextSuccess = Message<"agent.v1.RequestContextSuccess"> & { + /** + * @generated from field: agent.v1.RequestContext request_context = 1; + */ + requestContext?: RequestContext; +}; + +/** + * Describes the message agent.v1.RequestContextSuccess. + * Use `create(RequestContextSuccessSchema)` to create a new message. + */ +export const RequestContextSuccessSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 337); + +/** + * @generated from message agent.v1.RequestContextError + */ +export type RequestContextError = Message<"agent.v1.RequestContextError"> & { + /** + * @generated from field: string error = 1; + */ + error: string; +}; + +/** + * Describes the message agent.v1.RequestContextError. + * Use `create(RequestContextErrorSchema)` to create a new message. + */ +export const RequestContextErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 338); + +/** + * @generated from message agent.v1.RequestContextRejected + */ +export type RequestContextRejected = Message<"agent.v1.RequestContextRejected"> & { + /** + * @generated from field: string reason = 1; + */ + reason: string; +}; + +/** + * Describes the message agent.v1.RequestContextRejected. + * Use `create(RequestContextRejectedSchema)` to create a new message. + */ +export const RequestContextRejectedSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 339); + +/** + * same as SelectedImage, but with the data field is the full image data + * + * @generated from message agent.v1.ImageProto + */ +export type ImageProto = Message<"agent.v1.ImageProto"> & { + /** + * @generated from field: bytes data = 1; + */ + data: Uint8Array; + + /** + * @generated from field: string uuid = 2; + */ + uuid: string; + + /** + * @generated from field: string path = 3; + */ + path: string; + + /** + * @generated from field: agent.v1.ImageProto_Dimension dimension = 4; + */ + dimension?: ImageProto_Dimension; + + /** + * @generated from field: optional string task_specific_description = 6; + */ + taskSpecificDescription?: string; + + /** + * @generated from field: string mime_type = 7; + */ + mimeType: string; +}; + +/** + * Describes the message agent.v1.ImageProto. + * Use `create(ImageProtoSchema)` to create a new message. + */ +export const ImageProtoSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 340); + +/** + * @generated from message agent.v1.ImageProto_Dimension + */ +export type ImageProto_Dimension = Message<"agent.v1.ImageProto_Dimension"> & { + /** + * @generated from field: int32 width = 1; + */ + width: number; + + /** + * @generated from field: int32 height = 2; + */ + height: number; +}; + +/** + * Describes the message agent.v1.ImageProto_Dimension. + * Use `create(ImageProto_DimensionSchema)` to create a new message. + */ +export const ImageProto_DimensionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 341); + +/** + * Git repository information for a workspace + * + * @generated from message agent.v1.GitRepoInfo + */ +export type GitRepoInfo = Message<"agent.v1.GitRepoInfo"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: string status = 2; + */ + status: string; + + /** + * @generated from field: string branch_name = 3; + */ + branchName: string; + + /** + * @generated from field: optional string remote_url = 4; + */ + remoteUrl?: string; +}; + +/** + * Describes the message agent.v1.GitRepoInfo. + * Use `create(GitRepoInfoSchema)` to create a new message. + */ +export const GitRepoInfoSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 342); + +/** + * Environment details for system prompt/context + * + * @generated from message agent.v1.RequestContextEnv + */ +export type RequestContextEnv = Message<"agent.v1.RequestContextEnv"> & { + /** + * @generated from field: string os_version = 1; + */ + osVersion: string; + + /** + * @generated from field: repeated string workspace_paths = 2; + */ + workspacePaths: string[]; + + /** + * @generated from field: string shell = 3; + */ + shell: string; + + /** + * @generated from field: bool sandbox_enabled = 5; + */ + sandboxEnabled: boolean; + + /** + * @generated from field: string terminals_folder = 7; + */ + terminalsFolder: string; + + /** + * @generated from field: string agent_shared_notes_folder = 8; + */ + agentSharedNotesFolder: string; + + /** + * @generated from field: string agent_conversation_notes_folder = 9; + */ + agentConversationNotesFolder: string; + + /** + * @generated from field: string time_zone = 10; + */ + timeZone: string; + + /** + * Project-specific folder for storing artifacts, computed client-side as ~/.cursor/projects/{slug}/ + * + * @generated from field: string project_folder = 11; + */ + projectFolder: string; + + /** + * Folder where agent conversation transcripts are stored + * + * @generated from field: string agent_transcripts_folder = 12; + */ + agentTranscriptsFolder: string; +}; + +/** + * Describes the message agent.v1.RequestContextEnv. + * Use `create(RequestContextEnvSchema)` to create a new message. + */ +export const RequestContextEnvSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 343); + +/** + * @generated from message agent.v1.DebugModeConfig + */ +export type DebugModeConfig = Message<"agent.v1.DebugModeConfig"> & { + /** + * @generated from field: string log_path = 1; + */ + logPath: string; + + /** + * @generated from field: string server_endpoint = 2; + */ + serverEndpoint: string; +}; + +/** + * Describes the message agent.v1.DebugModeConfig. + * Use `create(DebugModeConfigSchema)` to create a new message. + */ +export const DebugModeConfigSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 344); + +/** + * @generated from message agent.v1.SkillDescriptor + */ +export type SkillDescriptor = Message<"agent.v1.SkillDescriptor"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: string description = 2; + */ + description: string; + + /** + * @generated from field: string folder_path = 3; + */ + folderPath: string; + + /** + * @generated from field: bool enabled = 4; + */ + enabled: boolean; + + /** + * @generated from field: optional string parse_error = 5; + */ + parseError?: string; + + /** + * @generated from field: string readme_file_path = 6; + */ + readmeFilePath: string; + + /** + * @generated from field: int32 package_type = 7; + */ + packageType: number; +}; + +/** + * Describes the message agent.v1.SkillDescriptor. + * Use `create(SkillDescriptorSchema)` to create a new message. + */ +export const SkillDescriptorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 345); + +/** + * @generated from message agent.v1.SkillOptions + */ +export type SkillOptions = Message<"agent.v1.SkillOptions"> & { + /** + * @generated from field: repeated agent.v1.SkillDescriptor skill_descriptors = 1; + */ + skillDescriptors: SkillDescriptor[]; +}; + +/** + * Describes the message agent.v1.SkillOptions. + * Use `create(SkillOptionsSchema)` to create a new message. + */ +export const SkillOptionsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 346); + +/** + * @generated from message agent.v1.RequestContext + */ +export type RequestContext = Message<"agent.v1.RequestContext"> & { + /** + * All rules, categorized by the embedded type + * + * @generated from field: repeated agent.v1.CursorRule rules = 2; + */ + rules: CursorRule[]; + + /** + * @generated from field: agent.v1.RequestContextEnv env = 4; + */ + env?: RequestContextEnv; + + /** + * @generated from field: repeated agent.v1.RepositoryIndexingInfo repository_info = 6; + */ + repositoryInfo: RepositoryIndexingInfo[]; + + /** + * @generated from field: repeated agent.v1.McpToolDefinition tools = 7; + */ + tools: McpToolDefinition[]; + + /** + * @generated from field: optional string conversation_notes_listing = 8; + */ + conversationNotesListing?: string; + + /** + * @generated from field: optional string shared_notes_listing = 9; + */ + sharedNotesListing?: string; + + /** + * @generated from field: repeated agent.v1.GitRepoInfo git_repos = 11; + */ + gitRepos: GitRepoInfo[]; + + /** + * @generated from field: repeated agent.v1.LsDirectoryTreeNode project_layouts = 13; + */ + projectLayouts: LsDirectoryTreeNode[]; + + /** + * @generated from field: repeated agent.v1.McpInstructions mcp_instructions = 14; + */ + mcpInstructions: McpInstructions[]; + + /** + * @generated from field: optional agent.v1.DebugModeConfig debug_mode_config = 15; + */ + debugModeConfig?: DebugModeConfig; + + /** + * @generated from field: optional string cloud_rule = 16; + */ + cloudRule?: string; + + /** + * @generated from field: optional bool web_search_enabled = 17; + */ + webSearchEnabled?: boolean; + + /** + * @generated from field: optional agent.v1.SkillOptions skill_options = 18; + */ + skillOptions?: SkillOptions; + + /** + * @generated from field: optional bool repository_info_should_query_prod = 19; + */ + repositoryInfoShouldQueryProd?: boolean; + + /** + * @generated from field: map file_contents = 20; + */ + fileContents: { [key: string]: string }; + + /** + * Content of the user-intent/index.md file summarizing past conversations + * + * @generated from field: optional string user_intent_summary = 21; + */ + userIntentSummary?: string; + + /** + * Local custom subagent definitions loaded from workspace configuration + * + * @generated from field: repeated agent.v1.CustomSubagent custom_subagents = 22; + */ + customSubagents: CustomSubagent[]; + + /** + * MCP file system options for agent MCP tool descriptor access + * + * @generated from field: optional agent.v1.McpFileSystemOptions mcp_file_system_options = 23; + */ + mcpFileSystemOptions?: McpFileSystemOptions; +}; + +/** + * Describes the message agent.v1.RequestContext. + * Use `create(RequestContextSchema)` to create a new message. + */ +export const RequestContextSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 347); + +/** + * @generated from message agent.v1.SandboxPolicy + */ +export type SandboxPolicy = Message<"agent.v1.SandboxPolicy"> & { + /** + * @generated from field: int32 type = 1; + */ + type: number; + + /** + * @generated from field: optional bool network_access = 2; + */ + networkAccess?: boolean; + + /** + * @generated from field: repeated string additional_readwrite_paths = 3; + */ + additionalReadwritePaths: string[]; + + /** + * @generated from field: repeated string additional_readonly_paths = 4; + */ + additionalReadonlyPaths: string[]; + + /** + * @generated from field: optional string debug_output_dir = 5; + */ + debugOutputDir?: string; + + /** + * @generated from field: optional bool block_git_writes = 6; + */ + blockGitWrites?: boolean; + + /** + * If true, excludes default tmp paths (/tmp/, /private/tmp/, /var/folders/) from the sandbox writable paths. Useful for testing readonly behavior. + * + * @generated from field: optional bool disable_tmp_write = 7; + */ + disableTmpWrite?: boolean; +}; + +/** + * Describes the message agent.v1.SandboxPolicy. + * Use `create(SandboxPolicySchema)` to create a new message. + */ +export const SandboxPolicySchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 348); + +/** + * @generated from message agent.v1.SelectedImage + */ +export type SelectedImage = Message<"agent.v1.SelectedImage"> & { + /** + * @generated from field: string uuid = 2; + */ + uuid: string; + + /** + * @generated from field: string path = 3; + */ + path: string; + + /** + * @generated from field: agent.v1.SelectedImage_Dimension dimension = 4; + */ + dimension?: SelectedImage_Dimension; + + /** + * @generated from field: string mime_type = 7; + */ + mimeType: string; + + /** + * @generated from oneof agent.v1.SelectedImage.data_or_blob_id + */ + dataOrBlobId: + | { + /** + * @generated from field: bytes blob_id = 1; + */ + value: Uint8Array; + case: "blobId"; + } + | { + /** + * @generated from field: bytes data = 8; + */ + value: Uint8Array; + case: "data"; + } + | { + /** + * @generated from field: agent.v1.SelectedImage_BlobIdWithData blob_id_with_data = 9; + */ + value: SelectedImage_BlobIdWithData; + case: "blobIdWithData"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.SelectedImage. + * Use `create(SelectedImageSchema)` to create a new message. + */ +export const SelectedImageSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 349); + +/** + * Contains both blob_id and data together, for when the client has both and wants to populate the server-side cache without re-uploading + * + * @generated from message agent.v1.SelectedImage_BlobIdWithData + */ +export type SelectedImage_BlobIdWithData = Message<"agent.v1.SelectedImage_BlobIdWithData"> & { + /** + * @generated from field: bytes blob_id = 1; + */ + blobId: Uint8Array; + + /** + * @generated from field: bytes data = 2; + */ + data: Uint8Array; +}; + +/** + * Describes the message agent.v1.SelectedImage_BlobIdWithData. + * Use `create(SelectedImage_BlobIdWithDataSchema)` to create a new message. + */ +export const SelectedImage_BlobIdWithDataSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 350); + +/** + * @generated from message agent.v1.SelectedImage_Dimension + */ +export type SelectedImage_Dimension = Message<"agent.v1.SelectedImage_Dimension"> & { + /** + * @generated from field: int32 width = 1; + */ + width: number; + + /** + * @generated from field: int32 height = 2; + */ + height: number; +}; + +/** + * Describes the message agent.v1.SelectedImage_Dimension. + * Use `create(SelectedImage_DimensionSchema)` to create a new message. + */ +export const SelectedImage_DimensionSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 351); + +/** + * Extra context entry that can be stored inline or as a blob reference + * + * @generated from message agent.v1.ExtraContextEntry + */ +export type ExtraContextEntry = Message<"agent.v1.ExtraContextEntry"> & { + /** + * @generated from oneof agent.v1.ExtraContextEntry.data_or_blob_id + */ + dataOrBlobId: + | { + /** + * @generated from field: string data = 1; + */ + value: string; + case: "data"; + } + | { + /** + * @generated from field: bytes blob_id = 2; + */ + value: Uint8Array; + case: "blobId"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ExtraContextEntry. + * Use `create(ExtraContextEntrySchema)` to create a new message. + */ +export const ExtraContextEntrySchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 352); + +/** + * A selected file from the UI + * + * @generated from message agent.v1.SelectedFile + */ +export type SelectedFile = Message<"agent.v1.SelectedFile"> & { + /** + * @generated from field: string content = 1; + */ + content: string; + + /** + * This is the full path + * + * @generated from field: string path = 2; + */ + path: string; + + /** + * @generated from field: optional string relative_path = 3; + */ + relativePath?: string; +}; + +/** + * Describes the message agent.v1.SelectedFile. + * Use `create(SelectedFileSchema)` to create a new message. + */ +export const SelectedFileSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 353); + +/** + * A selected code selection from the UI + * + * @generated from message agent.v1.SelectedCodeSelection + */ +export type SelectedCodeSelection = Message<"agent.v1.SelectedCodeSelection"> & { + /** + * @generated from field: string content = 1; + */ + content: string; + + /** + * This is the full path + * + * @generated from field: string path = 2; + */ + path: string; + + /** + * @generated from field: optional string relative_path = 3; + */ + relativePath?: string; + + /** + * @generated from field: agent.v1.Range range = 4; + */ + range?: Range; +}; + +/** + * Describes the message agent.v1.SelectedCodeSelection. + * Use `create(SelectedCodeSelectionSchema)` to create a new message. + */ +export const SelectedCodeSelectionSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 354); + +/** + * A selected terminal from the UI + * + * @generated from message agent.v1.SelectedTerminal + */ +export type SelectedTerminal = Message<"agent.v1.SelectedTerminal"> & { + /** + * @generated from field: string content = 1; + */ + content: string; + + /** + * @generated from field: optional string title = 2; + */ + title?: string; + + /** + * @generated from field: optional string path = 3; + */ + path?: string; +}; + +/** + * Describes the message agent.v1.SelectedTerminal. + * Use `create(SelectedTerminalSchema)` to create a new message. + */ +export const SelectedTerminalSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 355); + +/** + * A selected terminal selection from the UI + * + * @generated from message agent.v1.SelectedTerminalSelection + */ +export type SelectedTerminalSelection = Message<"agent.v1.SelectedTerminalSelection"> & { + /** + * @generated from field: string content = 1; + */ + content: string; + + /** + * @generated from field: optional string title = 2; + */ + title?: string; + + /** + * @generated from field: optional string path = 3; + */ + path?: string; + + /** + * @generated from field: agent.v1.Range range = 4; + */ + range?: Range; +}; + +/** + * Describes the message agent.v1.SelectedTerminalSelection. + * Use `create(SelectedTerminalSelectionSchema)` to create a new message. + */ +export const SelectedTerminalSelectionSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 356); + +/** + * A selected folder from the UI + * + * @generated from message agent.v1.SelectedFolder + */ +export type SelectedFolder = Message<"agent.v1.SelectedFolder"> & { + /** + * This is the full path + * + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: optional string relative_path = 2; + */ + relativePath?: string; + + /** + * @generated from field: agent.v1.LsDirectoryTreeNode directory_tree = 3; + */ + directoryTree?: LsDirectoryTreeNode; +}; + +/** + * Describes the message agent.v1.SelectedFolder. + * Use `create(SelectedFolderSchema)` to create a new message. + */ +export const SelectedFolderSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 357); + +/** + * An external link manually attached by the user + * + * @generated from message agent.v1.SelectedExternalLink + */ +export type SelectedExternalLink = Message<"agent.v1.SelectedExternalLink"> & { + /** + * @generated from field: string url = 1; + */ + url: string; + + /** + * @generated from field: string uuid = 2; + */ + uuid: string; + + /** + * For local PDF files Base64-encoded PDF content + * + * @generated from field: optional string pdf_content = 3; + */ + pdfContent?: string; + + /** + * @generated from field: optional bool is_pdf = 4; + */ + isPdf?: boolean; + + /** + * @generated from field: optional string filename = 5; + */ + filename?: string; +}; + +/** + * Describes the message agent.v1.SelectedExternalLink. + * Use `create(SelectedExternalLinkSchema)` to create a new message. + */ +export const SelectedExternalLinkSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 358); + +/** + * A cursor rule manually attached by the user + * + * @generated from message agent.v1.SelectedCursorRule + */ +export type SelectedCursorRule = Message<"agent.v1.SelectedCursorRule"> & { + /** + * @generated from field: agent.v1.CursorRule rule = 1; + */ + rule?: CursorRule; +}; + +/** + * Describes the message agent.v1.SelectedCursorRule. + * Use `create(SelectedCursorRuleSchema)` to create a new message. + */ +export const SelectedCursorRuleSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 359); + +/** + * Git diff (uncommitted changes in working tree) + * + * @generated from message agent.v1.SelectedGitDiff + */ +export type SelectedGitDiff = Message<"agent.v1.SelectedGitDiff"> & { + /** + * Raw git diff output + * + * @generated from field: string content = 1; + */ + content: string; +}; + +/** + * Describes the message agent.v1.SelectedGitDiff. + * Use `create(SelectedGitDiffSchema)` to create a new message. + */ +export const SelectedGitDiffSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 360); + +/** + * Git diff from branch to main + * + * @generated from message agent.v1.SelectedGitDiffFromBranchToMain + */ +export type SelectedGitDiffFromBranchToMain = Message<"agent.v1.SelectedGitDiffFromBranchToMain"> & { + /** + * Raw git diff output + * + * @generated from field: string content = 1; + */ + content: string; +}; + +/** + * Describes the message agent.v1.SelectedGitDiffFromBranchToMain. + * Use `create(SelectedGitDiffFromBranchToMainSchema)` to create a new message. + */ +export const SelectedGitDiffFromBranchToMainSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 361); + +/** + * A git commit manually attached by the user + * + * @generated from message agent.v1.SelectedGitCommit + */ +export type SelectedGitCommit = Message<"agent.v1.SelectedGitCommit"> & { + /** + * @generated from field: string sha = 1; + */ + sha: string; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * @generated from field: optional string description = 3; + */ + description?: string; + + /** + * Raw git diff output for this commit + * + * @generated from field: string diff = 4; + */ + diff: string; +}; + +/** + * Describes the message agent.v1.SelectedGitCommit. + * Use `create(SelectedGitCommitSchema)` to create a new message. + */ +export const SelectedGitCommitSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 362); + +/** + * A pull request manually attached by the user via @mention Uses the same folder structure as ViewedPullRequest for consistency + * + * @generated from message agent.v1.SelectedPullRequest + */ +export type SelectedPullRequest = Message<"agent.v1.SelectedPullRequest"> & { + /** + * @generated from field: int32 number = 1; + */ + number: number; + + /** + * @generated from field: string url = 2; + */ + url: string; + + /** + * @generated from field: optional string title = 3; + */ + title?: string; + + /** + * Path to the folder containing PR details (diffs, metadata, etc.) + * + * @generated from field: string folder_path = 4; + */ + folderPath: string; + + /** + * Summary JSON containing file list and diff sizes (contents of summary.json) + * + * @generated from field: optional string summary_json = 5; + */ + summaryJson?: string; + + /** + * PR description/body + * + * @generated from field: optional string description = 6; + */ + description?: string; + + /** + * If set, other fields are empty and data should be fetched from the blob + * + * @generated from field: optional bytes blob_id = 7; + */ + blobId?: Uint8Array; +}; + +/** + * Describes the message agent.v1.SelectedPullRequest. + * Use `create(SelectedPullRequestSchema)` to create a new message. + */ +export const SelectedPullRequestSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 363); + +/** + * A selection from a pull request diff (for files that may not exist on disk) + * + * @generated from message agent.v1.SelectedGitPRDiffSelection + */ +export type SelectedGitPRDiffSelection = Message<"agent.v1.SelectedGitPRDiffSelection"> & { + /** + * Full URL to the pull request + * + * @generated from field: string pr_url = 1; + */ + prUrl: string; + + /** + * Path to the file within the PR + * + * @generated from field: string file_path = 2; + */ + filePath: string; + + /** + * Start line in the diff + * + * @generated from field: int32 start_line = 3; + */ + startLine: number; + + /** + * End line in the diff + * + * @generated from field: int32 end_line = 4; + */ + endLine: number; + + /** + * The diff content for this file (or selection) + * + * @generated from field: optional string diff_content = 5; + */ + diffContent?: string; + + /** + * If set, other fields are empty and data should be fetched from the blob + * + * @generated from field: optional bytes blob_id = 6; + */ + blobId?: Uint8Array; +}; + +/** + * Describes the message agent.v1.SelectedGitPRDiffSelection. + * Use `create(SelectedGitPRDiffSelectionSchema)` to create a new message. + */ +export const SelectedGitPRDiffSelectionSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 364); + +/** + * A cursor command manually attached by the user + * + * @generated from message agent.v1.SelectedCursorCommand + */ +export type SelectedCursorCommand = Message<"agent.v1.SelectedCursorCommand"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: string content = 2; + */ + content: string; +}; + +/** + * Describes the message agent.v1.SelectedCursorCommand. + * Use `create(SelectedCursorCommandSchema)` to create a new message. + */ +export const SelectedCursorCommandSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 365); + +/** + * A documentation manually attached by the user + * + * @generated from message agent.v1.SelectedDocumentation + */ +export type SelectedDocumentation = Message<"agent.v1.SelectedDocumentation"> & { + /** + * @generated from field: string doc_id = 1; + */ + docId: string; + + /** + * @generated from field: string name = 2; + */ + name: string; +}; + +/** + * Describes the message agent.v1.SelectedDocumentation. + * Use `create(SelectedDocumentationSchema)` to create a new message. + */ +export const SelectedDocumentationSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 366); + +/** + * A past chat manually attached by the user (transcript file) + * + * @generated from message agent.v1.SelectedPastChat + */ +export type SelectedPastChat = Message<"agent.v1.SelectedPastChat"> & { + /** + * @generated from field: string agent_id = 1; + */ + agentId: string; + + /** + * @generated from field: string name = 2; + */ + name: string; +}; + +/** + * Describes the message agent.v1.SelectedPastChat. + * Use `create(SelectedPastChatSchema)` to create a new message. + */ +export const SelectedPastChatSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 367); + +/** + * A call frame from a stack trace + * + * @generated from message agent.v1.CallFrame + */ +export type CallFrame = Message<"agent.v1.CallFrame"> & { + /** + * @generated from field: optional string function_name = 1; + */ + functionName?: string; + + /** + * @generated from field: optional string url = 2; + */ + url?: string; + + /** + * @generated from field: optional int32 line_number = 3; + */ + lineNumber?: number; + + /** + * @generated from field: optional int32 column_number = 4; + */ + columnNumber?: number; +}; + +/** + * Describes the message agent.v1.CallFrame. + * Use `create(CallFrameSchema)` to create a new message. + */ +export const CallFrameSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 368); + +/** + * A stack trace + * + * @generated from message agent.v1.StackTrace + */ +export type StackTrace = Message<"agent.v1.StackTrace"> & { + /** + * @generated from field: repeated agent.v1.CallFrame call_frames = 1; + */ + callFrames: CallFrame[]; + + /** + * @generated from field: optional string raw_stack_trace = 2; + */ + rawStackTrace?: string; +}; + +/** + * Describes the message agent.v1.StackTrace. + * Use `create(StackTraceSchema)` to create a new message. + */ +export const StackTraceSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 369); + +/** + * A console log entry from the runtime + * + * @generated from message agent.v1.SelectedConsoleLog + */ +export type SelectedConsoleLog = Message<"agent.v1.SelectedConsoleLog"> & { + /** + * @generated from field: string message = 1; + */ + message: string; + + /** + * * Unix timestamp in milliseconds when this log entry was created + * + * @generated from field: double timestamp = 2; + */ + timestamp: number; + + /** + * @generated from field: string level = 3; + */ + level: string; + + /** + * @generated from field: string client_name = 4; + */ + clientName: string; + + /** + * @generated from field: string session_id = 5; + */ + sessionId: string; + + /** + * @generated from field: optional agent.v1.StackTrace stack_trace = 6; + */ + stackTrace?: StackTrace; + + /** + * @generated from field: optional string object_data_json = 7; + */ + objectDataJson?: string; +}; + +/** + * Describes the message agent.v1.SelectedConsoleLog. + * Use `create(SelectedConsoleLogSchema)` to create a new message. + */ +export const SelectedConsoleLogSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 370); + +/** + * A UI element picked by the user from the runtime + * + * @generated from message agent.v1.SelectedUIElement + */ +export type SelectedUIElement = Message<"agent.v1.SelectedUIElement"> & { + /** + * @generated from field: string element = 1; + */ + element: string; + + /** + * @generated from field: string xpath = 2; + */ + xpath: string; + + /** + * @generated from field: string text_content = 3; + */ + textContent: string; + + /** + * @generated from field: string extra = 4; + */ + extra: string; + + /** + * @generated from field: optional string component = 5; + */ + component?: string; + + /** + * @generated from field: optional string component_props_json = 6; + */ + componentPropsJson?: string; +}; + +/** + * Describes the message agent.v1.SelectedUIElement. + * Use `create(SelectedUIElementSchema)` to create a new message. + */ +export const SelectedUIElementSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 371); + +/** + * A subagent selected by the user from the slash menu + * + * @generated from message agent.v1.SelectedSubagent + */ +export type SelectedSubagent = Message<"agent.v1.SelectedSubagent"> & { + /** + * @generated from field: string name = 1; + */ + name: string; +}; + +/** + * Describes the message agent.v1.SelectedSubagent. + * Use `create(SelectedSubagentSchema)` to create a new message. + */ +export const SelectedSubagentSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 372); + +/** + * Container for selected context from the UI + * + * @generated from message agent.v1.SelectedContext + */ +export type SelectedContext = Message<"agent.v1.SelectedContext"> & { + /** + * @generated from field: repeated agent.v1.SelectedImage selected_images = 1; + */ + selectedImages: SelectedImage[]; + + /** + * @generated from field: optional agent.v1.InvocationContext invocation_context = 2; + */ + invocationContext?: InvocationContext; + + /** + * Temporary hack for IDE-based context (@filename, @Diff, etc.) in background agents only. TODO: remove once proper IDE context format is implemented. + * + * @generated from field: repeated string extra_context = 3; + */ + extraContext: string[]; + + /** + * @generated from field: repeated agent.v1.ExtraContextEntry extra_context_entries = 16; + */ + extraContextEntries: ExtraContextEntry[]; + + /** + * New context types + * + * @generated from field: repeated agent.v1.SelectedFile files = 4; + */ + files: SelectedFile[]; + + /** + * @generated from field: repeated agent.v1.SelectedCodeSelection code_selections = 5; + */ + codeSelections: SelectedCodeSelection[]; + + /** + * @generated from field: repeated agent.v1.SelectedTerminal terminals = 6; + */ + terminals: SelectedTerminal[]; + + /** + * @generated from field: repeated agent.v1.SelectedTerminalSelection terminal_selections = 7; + */ + terminalSelections: SelectedTerminalSelection[]; + + /** + * @generated from field: repeated agent.v1.SelectedFolder folders = 8; + */ + folders: SelectedFolder[]; + + /** + * @generated from field: repeated agent.v1.SelectedExternalLink external_links = 9; + */ + externalLinks: SelectedExternalLink[]; + + /** + * @generated from field: repeated agent.v1.SelectedCursorRule cursor_rules = 10; + */ + cursorRules: SelectedCursorRule[]; + + /** + * @generated from field: optional agent.v1.SelectedGitDiff git_diff = 18; + */ + gitDiff?: SelectedGitDiff; + + /** + * @generated from field: optional agent.v1.SelectedGitDiffFromBranchToMain git_diff_from_branch_to_main = 11; + */ + gitDiffFromBranchToMain?: SelectedGitDiffFromBranchToMain; + + /** + * @generated from field: repeated agent.v1.SelectedCursorCommand cursor_commands = 12; + */ + cursorCommands: SelectedCursorCommand[]; + + /** + * @generated from field: repeated agent.v1.SelectedDocumentation documentations = 13; + */ + documentations: SelectedDocumentation[]; + + /** + * @generated from field: repeated agent.v1.SelectedUIElement ui_elements = 14; + */ + uiElements: SelectedUIElement[]; + + /** + * @generated from field: repeated agent.v1.SelectedConsoleLog console_logs = 15; + */ + consoleLogs: SelectedConsoleLog[]; + + /** + * @generated from field: repeated agent.v1.SelectedGitCommit git_commits = 17; + */ + gitCommits: SelectedGitCommit[]; + + /** + * @generated from field: repeated agent.v1.SelectedPastChat past_chats = 19; + */ + pastChats: SelectedPastChat[]; + + /** + * @generated from field: repeated agent.v1.SelectedGitPRDiffSelection git_pr_diff_selections = 20; + */ + gitPrDiffSelections: SelectedGitPRDiffSelection[]; + + /** + * @generated from field: repeated agent.v1.SelectedPullRequest selected_pull_requests = 21; + */ + selectedPullRequests: SelectedPullRequest[]; + + /** + * @generated from field: repeated agent.v1.SelectedSubagent selected_subagents = 22; + */ + selectedSubagents: SelectedSubagent[]; +}; + +/** + * Describes the message agent.v1.SelectedContext. + * Use `create(SelectedContextSchema)` to create a new message. + */ +export const SelectedContextSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 373); + +/** + * InvocationContext represents the context from the external app/integration that triggered this agent request. + * + * @generated from message agent.v1.InvocationContext + */ +export type InvocationContext = Message<"agent.v1.InvocationContext"> & { + /** + * @generated from oneof agent.v1.InvocationContext.data + */ + data: + | { + /** + * @generated from field: agent.v1.InvocationContext_SlackThread slack_thread = 1; + */ + value: InvocationContext_SlackThread; + case: "slackThread"; + } + | { + /** + * @generated from field: agent.v1.InvocationContext_GithubPR github_pr = 2; + */ + value: InvocationContext_GithubPR; + case: "githubPr"; + } + | { + /** + * @generated from field: agent.v1.InvocationContext_IdeState ide_state = 3; + */ + value: InvocationContext_IdeState; + case: "ideState"; + } + | { + /** + * @generated from field: bytes blob_id = 10; + */ + value: Uint8Array; + case: "blobId"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.InvocationContext. + * Use `create(InvocationContextSchema)` to create a new message. + */ +export const InvocationContextSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 374); + +/** + * @generated from message agent.v1.InvocationContext_SlackThread + */ +export type InvocationContext_SlackThread = Message<"agent.v1.InvocationContext_SlackThread"> & { + /** + * @generated from field: string thread = 1; + */ + thread: string; + + /** + * @generated from field: optional string channel_name = 2; + */ + channelName?: string; + + /** + * @generated from field: optional string channel_purpose = 3; + */ + channelPurpose?: string; + + /** + * @generated from field: optional string channel_topic = 4; + */ + channelTopic?: string; +}; + +/** + * Describes the message agent.v1.InvocationContext_SlackThread. + * Use `create(InvocationContext_SlackThreadSchema)` to create a new message. + */ +export const InvocationContext_SlackThreadSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 375); + +/** + * @generated from message agent.v1.InvocationContext_GithubPR + */ +export type InvocationContext_GithubPR = Message<"agent.v1.InvocationContext_GithubPR"> & { + /** + * @generated from field: string title = 1; + */ + title: string; + + /** + * @generated from field: string description = 2; + */ + description: string; + + /** + * @generated from field: string comments = 3; + */ + comments: string; + + /** + * @generated from field: optional string ci_failures = 4; + */ + ciFailures?: string; +}; + +/** + * Describes the message agent.v1.InvocationContext_GithubPR. + * Use `create(InvocationContext_GithubPRSchema)` to create a new message. + */ +export const InvocationContext_GithubPRSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 376); + +/** + * @generated from message agent.v1.InvocationContext_IdeState + */ +export type InvocationContext_IdeState = Message<"agent.v1.InvocationContext_IdeState"> & { + /** + * @generated from field: repeated agent.v1.InvocationContext_IdeState_File visible_files = 1; + */ + visibleFiles: InvocationContext_IdeState_File[]; + + /** + * @generated from field: repeated agent.v1.InvocationContext_IdeState_File recently_viewed_files = 2; + */ + recentlyViewedFiles: InvocationContext_IdeState_File[]; + + /** + * PRs currently being viewed in the review editor (if any) + * + * @generated from field: repeated agent.v1.InvocationContext_IdeState_ViewedPullRequest currently_viewed_prs = 3; + */ + currentlyViewedPrs: InvocationContext_IdeState_ViewedPullRequest[]; +}; + +/** + * Describes the message agent.v1.InvocationContext_IdeState. + * Use `create(InvocationContext_IdeStateSchema)` to create a new message. + */ +export const InvocationContext_IdeStateSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 377); + +/** + * @generated from message agent.v1.InvocationContext_IdeState_File + */ +export type InvocationContext_IdeState_File = Message<"agent.v1.InvocationContext_IdeState_File"> & { + /** + * This is the full path + * + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: optional string relative_path = 2; + */ + relativePath?: string; + + /** + * Present if file is currently focused + * + * @generated from field: optional agent.v1.InvocationContext_IdeState_File_CursorPosition cursor_position = 3; + */ + cursorPosition?: InvocationContext_IdeState_File_CursorPosition; + + /** + * @generated from field: int32 total_lines = 4; + */ + totalLines: number; + + /** + * Present for terminal files + * + * @generated from field: optional string active_command = 5; + */ + activeCommand?: string; +}; + +/** + * Describes the message agent.v1.InvocationContext_IdeState_File. + * Use `create(InvocationContext_IdeState_FileSchema)` to create a new message. + */ +export const InvocationContext_IdeState_FileSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 378); + +/** + * @generated from message agent.v1.InvocationContext_IdeState_File_CursorPosition + */ +export type InvocationContext_IdeState_File_CursorPosition = + Message<"agent.v1.InvocationContext_IdeState_File_CursorPosition"> & { + /** + * @generated from field: int32 line = 1; + */ + line: number; + + /** + * @generated from field: string text = 2; + */ + text: string; + }; + +/** + * Describes the message agent.v1.InvocationContext_IdeState_File_CursorPosition. + * Use `create(InvocationContext_IdeState_File_CursorPositionSchema)` to create a new message. + */ +export const InvocationContext_IdeState_File_CursorPositionSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 379); + +/** + * Information about a PR currently being viewed in a review editor + * + * @generated from message agent.v1.InvocationContext_IdeState_ViewedPullRequest + */ +export type InvocationContext_IdeState_ViewedPullRequest = + Message<"agent.v1.InvocationContext_IdeState_ViewedPullRequest"> & { + /** + * @generated from field: int32 number = 1; + */ + number: number; + + /** + * @generated from field: string url = 2; + */ + url: string; + + /** + * @generated from field: optional string title = 3; + */ + title?: string; + + /** + * Path to the folder containing PR details (diffs, metadata, etc.) + * + * @generated from field: optional string folder_path = 4; + */ + folderPath?: string; + + /** + * Summary JSON containing file list and diff sizes (contents of summary.json) + * + * @generated from field: optional string summary_json = 5; + */ + summaryJson?: string; + + /** + * PR description/body + * + * @generated from field: optional string description = 6; + */ + description?: string; + }; + +/** + * Describes the message agent.v1.InvocationContext_IdeState_ViewedPullRequest. + * Use `create(InvocationContext_IdeState_ViewedPullRequestSchema)` to create a new message. + */ +export const InvocationContext_IdeState_ViewedPullRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 380); + +/** + * @generated from message agent.v1.SetupVmEnvironmentArgs + */ +export type SetupVmEnvironmentArgs = Message<"agent.v1.SetupVmEnvironmentArgs"> & { + /** + * Command to install runtime dependencies (e.g., "npm install") + * + * @generated from field: string install_command = 2; + */ + installCommand: string; + + /** + * @generated from field: string start_command = 3; + */ + startCommand: string; +}; + +/** + * Describes the message agent.v1.SetupVmEnvironmentArgs. + * Use `create(SetupVmEnvironmentArgsSchema)` to create a new message. + */ +export const SetupVmEnvironmentArgsSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 381); + +/** + * Result of VM environment setup operations + * + * @generated from message agent.v1.SetupVmEnvironmentResult + */ +export type SetupVmEnvironmentResult = Message<"agent.v1.SetupVmEnvironmentResult"> & { + /** + * @generated from oneof agent.v1.SetupVmEnvironmentResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.SetupVmEnvironmentSuccess success = 1; + */ + value: SetupVmEnvironmentSuccess; + case: "success"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.SetupVmEnvironmentResult. + * Use `create(SetupVmEnvironmentResultSchema)` to create a new message. + */ +export const SetupVmEnvironmentResultSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 382); + +/** + * Successful VM environment setup result + * + * @generated from message agent.v1.SetupVmEnvironmentSuccess + */ +export type SetupVmEnvironmentSuccess = Message<"agent.v1.SetupVmEnvironmentSuccess"> & {}; + +/** + * Describes the message agent.v1.SetupVmEnvironmentSuccess. + * Use `create(SetupVmEnvironmentSuccessSchema)` to create a new message. + */ +export const SetupVmEnvironmentSuccessSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 383); + +/** + * Tool call structure for SetupVmEnvironment + * + * @generated from message agent.v1.SetupVmEnvironmentToolCall + */ +export type SetupVmEnvironmentToolCall = Message<"agent.v1.SetupVmEnvironmentToolCall"> & { + /** + * Arguments for the tool call + * + * @generated from field: agent.v1.SetupVmEnvironmentArgs args = 1; + */ + args?: SetupVmEnvironmentArgs; + + /** + * Result of the tool call (populated after execution) + * + * @generated from field: agent.v1.SetupVmEnvironmentResult result = 2; + */ + result?: SetupVmEnvironmentResult; +}; + +/** + * Describes the message agent.v1.SetupVmEnvironmentToolCall. + * Use `create(SetupVmEnvironmentToolCallSchema)` to create a new message. + */ +export const SetupVmEnvironmentToolCallSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 384); + +/** + * @generated from message agent.v1.ShellCommandParsingResult + */ +export type ShellCommandParsingResult = Message<"agent.v1.ShellCommandParsingResult"> & { + /** + * @generated from field: bool parsing_failed = 1; + */ + parsingFailed: boolean; + + /** + * @generated from field: repeated agent.v1.ShellCommandParsingResult_ExecutableCommand executable_commands = 2; + */ + executableCommands: ShellCommandParsingResult_ExecutableCommand[]; + + /** + * @generated from field: bool has_redirects = 3; + */ + hasRedirects: boolean; + + /** + * @generated from field: bool has_command_substitution = 4; + */ + hasCommandSubstitution: boolean; +}; + +/** + * Describes the message agent.v1.ShellCommandParsingResult. + * Use `create(ShellCommandParsingResultSchema)` to create a new message. + */ +export const ShellCommandParsingResultSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 385); + +/** + * @generated from message agent.v1.ShellCommandParsingResult_ExecutableCommandArg + */ +export type ShellCommandParsingResult_ExecutableCommandArg = + Message<"agent.v1.ShellCommandParsingResult_ExecutableCommandArg"> & { + /** + * @generated from field: string type = 1; + */ + type: string; + + /** + * @generated from field: string value = 2; + */ + value: string; + }; + +/** + * Describes the message agent.v1.ShellCommandParsingResult_ExecutableCommandArg. + * Use `create(ShellCommandParsingResult_ExecutableCommandArgSchema)` to create a new message. + */ +export const ShellCommandParsingResult_ExecutableCommandArgSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 386); + +/** + * @generated from message agent.v1.ShellCommandParsingResult_ExecutableCommand + */ +export type ShellCommandParsingResult_ExecutableCommand = + Message<"agent.v1.ShellCommandParsingResult_ExecutableCommand"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: repeated agent.v1.ShellCommandParsingResult_ExecutableCommandArg args = 2; + */ + args: ShellCommandParsingResult_ExecutableCommandArg[]; + + /** + * @generated from field: string full_text = 3; + */ + fullText: string; + }; + +/** + * Describes the message agent.v1.ShellCommandParsingResult_ExecutableCommand. + * Use `create(ShellCommandParsingResult_ExecutableCommandSchema)` to create a new message. + */ +export const ShellCommandParsingResult_ExecutableCommandSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 387); + +/** + * @generated from message agent.v1.ShellArgs + */ +export type ShellArgs = Message<"agent.v1.ShellArgs"> & { + /** + * @generated from field: string command = 1; + */ + command: string; + + /** + * @generated from field: string working_directory = 2; + */ + workingDirectory: string; + + /** + * @generated from field: int32 timeout = 3; + */ + timeout: number; + + /** + * @generated from field: string tool_call_id = 4; + */ + toolCallId: string; + + /** + * @generated from field: repeated string simple_commands = 5; + */ + simpleCommands: string[]; + + /** + * @generated from field: bool has_input_redirect = 6; + */ + hasInputRedirect: boolean; + + /** + * @generated from field: bool has_output_redirect = 7; + */ + hasOutputRedirect: boolean; + + /** + * Deprecated: use parsing_result instead @deprecated simpleCommands = []; Deprecated: use parsing_result instead @deprecated hasInputRedirect = false; Deprecated: use parsing_result instead @deprecated hasOutputRedirect = false; + * + * @generated from field: agent.v1.ShellCommandParsingResult parsing_result = 8; + */ + parsingResult?: ShellCommandParsingResult; + + /** + * @generated from field: optional agent.v1.SandboxPolicy requested_sandbox_policy = 9; + */ + requestedSandboxPolicy?: SandboxPolicy; + + /** + * If output size exceeds this threshold (in bytes), write to file instead of inline. If unset or 0, always use inline output. + * + * @generated from field: optional uint64 file_output_threshold_bytes = 10; + */ + fileOutputThresholdBytes?: bigint; + + /** + * @generated from field: bool is_background = 11; + */ + isBackground: boolean; + + /** + * @generated from field: bool skip_approval = 12; + */ + skipApproval: boolean; + + /** + * @generated from field: int32 timeout_behavior = 13; + */ + timeoutBehavior: number; + + /** + * Hard timeout: kill the command after this many ms, even if running in background + * + * @generated from field: optional int32 hard_timeout = 14; + */ + hardTimeout?: number; +}; + +/** + * Describes the message agent.v1.ShellArgs. + * Use `create(ShellArgsSchema)` to create a new message. + */ +export const ShellArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 388); + +/** + * @generated from message agent.v1.ShellResult + */ +export type ShellResult = Message<"agent.v1.ShellResult"> & { + /** + * @generated from field: optional agent.v1.SandboxPolicy sandbox_policy = 101; + */ + sandboxPolicy?: SandboxPolicy; + + /** + * Rendering is affected by this flag, pass forward from args. + * + * @generated from field: optional bool is_background = 102; + */ + isBackground?: boolean; + + /** + * Rendering is affected by this flag, pass forward from args. + * + * @generated from field: optional string terminals_folder = 103; + */ + terminalsFolder?: string; + + /** + * Process ID, used for backgrounded shells. + * + * @generated from field: optional uint32 pid = 104; + */ + pid?: number; + + /** + * @generated from oneof agent.v1.ShellResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.ShellSuccess success = 1; + */ + value: ShellSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.ShellFailure failure = 2; + */ + value: ShellFailure; + case: "failure"; + } + | { + /** + * @generated from field: agent.v1.ShellTimeout timeout = 3; + */ + value: ShellTimeout; + case: "timeout"; + } + | { + /** + * @generated from field: agent.v1.ShellRejected rejected = 4; + */ + value: ShellRejected; + case: "rejected"; + } + | { + /** + * @generated from field: agent.v1.ShellSpawnError spawn_error = 5; + */ + value: ShellSpawnError; + case: "spawnError"; + } + | { + /** + * @generated from field: agent.v1.ShellPermissionDenied permission_denied = 7; + */ + value: ShellPermissionDenied; + case: "permissionDenied"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ShellResult. + * Use `create(ShellResultSchema)` to create a new message. + */ +export const ShellResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 389); + +/** + * @generated from message agent.v1.ShellStreamStdout + */ +export type ShellStreamStdout = Message<"agent.v1.ShellStreamStdout"> & { + /** + * @generated from field: string data = 1; + */ + data: string; +}; + +/** + * Describes the message agent.v1.ShellStreamStdout. + * Use `create(ShellStreamStdoutSchema)` to create a new message. + */ +export const ShellStreamStdoutSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 390); + +/** + * @generated from message agent.v1.ShellStreamStderr + */ +export type ShellStreamStderr = Message<"agent.v1.ShellStreamStderr"> & { + /** + * @generated from field: string data = 1; + */ + data: string; +}; + +/** + * Describes the message agent.v1.ShellStreamStderr. + * Use `create(ShellStreamStderrSchema)` to create a new message. + */ +export const ShellStreamStderrSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 391); + +/** + * @generated from message agent.v1.ShellStreamExit + */ +export type ShellStreamExit = Message<"agent.v1.ShellStreamExit"> & { + /** + * @generated from field: uint32 code = 1; + */ + code: number; + + /** + * @generated from field: string cwd = 2; + */ + cwd: string; + + /** + * @generated from field: optional agent.v1.OutputLocation output_location = 3; + */ + outputLocation?: OutputLocation; + + /** + * @generated from field: bool aborted = 4; + */ + aborted: boolean; + + /** + * If aborted is true, this field indicates the reason for the abort + * + * @generated from field: optional int32 abort_reason = 5; + */ + abortReason?: number; +}; + +/** + * Describes the message agent.v1.ShellStreamExit. + * Use `create(ShellStreamExitSchema)` to create a new message. + */ +export const ShellStreamExitSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 392); + +/** + * @generated from message agent.v1.ShellStreamStart + */ +export type ShellStreamStart = Message<"agent.v1.ShellStreamStart"> & { + /** + * @generated from field: optional agent.v1.SandboxPolicy sandbox_policy = 1; + */ + sandboxPolicy?: SandboxPolicy; +}; + +/** + * Describes the message agent.v1.ShellStreamStart. + * Use `create(ShellStreamStartSchema)` to create a new message. + */ +export const ShellStreamStartSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 393); + +/** + * @generated from message agent.v1.ShellStreamBackgrounded + */ +export type ShellStreamBackgrounded = Message<"agent.v1.ShellStreamBackgrounded"> & { + /** + * @generated from field: uint32 shell_id = 1; + */ + shellId: number; + + /** + * @generated from field: string command = 2; + */ + command: string; + + /** + * @generated from field: string working_directory = 3; + */ + workingDirectory: string; + + /** + * @generated from field: optional uint32 pid = 4; + */ + pid?: number; + + /** + * The ms_to_wait value that was used for backgrounding, for display purposes + * + * @generated from field: optional int32 ms_to_wait = 5; + */ + msToWait?: number; +}; + +/** + * Describes the message agent.v1.ShellStreamBackgrounded. + * Use `create(ShellStreamBackgroundedSchema)` to create a new message. + */ +export const ShellStreamBackgroundedSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 394); + +/** + * @generated from message agent.v1.ShellStream + */ +export type ShellStream = Message<"agent.v1.ShellStream"> & { + /** + * @generated from oneof agent.v1.ShellStream.event + */ + event: + | { + /** + * @generated from field: agent.v1.ShellStreamStdout stdout = 1; + */ + value: ShellStreamStdout; + case: "stdout"; + } + | { + /** + * @generated from field: agent.v1.ShellStreamStderr stderr = 2; + */ + value: ShellStreamStderr; + case: "stderr"; + } + | { + /** + * @generated from field: agent.v1.ShellStreamExit exit = 3; + */ + value: ShellStreamExit; + case: "exit"; + } + | { + /** + * @generated from field: agent.v1.ShellStreamStart start = 4; + */ + value: ShellStreamStart; + case: "start"; + } + | { + /** + * @generated from field: agent.v1.ShellRejected rejected = 5; + */ + value: ShellRejected; + case: "rejected"; + } + | { + /** + * @generated from field: agent.v1.ShellPermissionDenied permission_denied = 6; + */ + value: ShellPermissionDenied; + case: "permissionDenied"; + } + | { + /** + * @generated from field: agent.v1.ShellStreamBackgrounded backgrounded = 7; + */ + value: ShellStreamBackgrounded; + case: "backgrounded"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ShellStream. + * Use `create(ShellStreamSchema)` to create a new message. + */ +export const ShellStreamSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 395); + +/** + * @generated from message agent.v1.OutputLocation + */ +export type OutputLocation = Message<"agent.v1.OutputLocation"> & { + /** + * Absolute path to the output file + * + * @generated from field: string file_path = 1; + */ + filePath: string; + + /** + * Size of the output in bytes + * + * @generated from field: int64 size_bytes = 2; + */ + sizeBytes: bigint; + + /** + * Number of lines in the output + * + * @generated from field: int64 line_count = 3; + */ + lineCount: bigint; +}; + +/** + * Describes the message agent.v1.OutputLocation. + * Use `create(OutputLocationSchema)` to create a new message. + */ +export const OutputLocationSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 396); + +/** + * @generated from message agent.v1.ShellSuccess + */ +export type ShellSuccess = Message<"agent.v1.ShellSuccess"> & { + /** + * @generated from field: string command = 1; + */ + command: string; + + /** + * @generated from field: string working_directory = 2; + */ + workingDirectory: string; + + /** + * @generated from field: int32 exit_code = 3; + */ + exitCode: number; + + /** + * @generated from field: string signal = 4; + */ + signal: string; + + /** + * Inline stdout - populated when write_output_to_file is false, empty when true + * + * @generated from field: string stdout = 5; + */ + stdout: string; + + /** + * Inline stderr - populated when write_output_to_file is false, empty when true + * + * @generated from field: string stderr = 6; + */ + stderr: string; + + /** + * @generated from field: int32 execution_time = 7; + */ + executionTime: number; + + /** + * File-based output - populated when write_output_to_file is true (chronologically merged stdout+stderr) + * + * @generated from field: optional agent.v1.OutputLocation output_location = 8; + */ + outputLocation?: OutputLocation; + + /** + * Used by background shell executor + * + * @generated from field: optional uint32 shell_id = 9; + */ + shellId?: number; + + /** + * @generated from field: optional string interleaved_output = 10; + */ + interleavedOutput?: string; + + /** + * Process ID, used for backgrounded shells + * + * @generated from field: optional uint32 pid = 11; + */ + pid?: number; + + /** + * The ms_to_wait value used for backgrounding (for display in result) + * + * @generated from field: optional int32 ms_to_wait = 12; + */ + msToWait?: number; +}; + +/** + * Describes the message agent.v1.ShellSuccess. + * Use `create(ShellSuccessSchema)` to create a new message. + */ +export const ShellSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 397); + +/** + * @generated from message agent.v1.ShellFailure + */ +export type ShellFailure = Message<"agent.v1.ShellFailure"> & { + /** + * @generated from field: string command = 1; + */ + command: string; + + /** + * @generated from field: string working_directory = 2; + */ + workingDirectory: string; + + /** + * @generated from field: int32 exit_code = 3; + */ + exitCode: number; + + /** + * @generated from field: string signal = 4; + */ + signal: string; + + /** + * Inline stdout - populated when write_output_to_file is false, empty when true + * + * @generated from field: string stdout = 5; + */ + stdout: string; + + /** + * Inline stderr - populated when write_output_to_file is false, empty when true + * + * @generated from field: string stderr = 6; + */ + stderr: string; + + /** + * @generated from field: int32 execution_time = 7; + */ + executionTime: number; + + /** + * File-based output - populated when write_output_to_file is true (chronologically merged stdout+stderr) + * + * @generated from field: optional agent.v1.OutputLocation output_location = 8; + */ + outputLocation?: OutputLocation; + + /** + * @generated from field: optional string interleaved_output = 9; + */ + interleavedOutput?: string; + + /** + * If the command was aborted, this indicates the reason + * + * @generated from field: optional int32 abort_reason = 10; + */ + abortReason?: number; + + /** + * Whether the command was aborted (by user or timeout) + * + * @generated from field: bool aborted = 11; + */ + aborted: boolean; +}; + +/** + * Describes the message agent.v1.ShellFailure. + * Use `create(ShellFailureSchema)` to create a new message. + */ +export const ShellFailureSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 398); + +/** + * @generated from message agent.v1.ShellTimeout + */ +export type ShellTimeout = Message<"agent.v1.ShellTimeout"> & { + /** + * @generated from field: string command = 1; + */ + command: string; + + /** + * @generated from field: string working_directory = 2; + */ + workingDirectory: string; + + /** + * @generated from field: int32 timeout_ms = 3; + */ + timeoutMs: number; +}; + +/** + * Describes the message agent.v1.ShellTimeout. + * Use `create(ShellTimeoutSchema)` to create a new message. + */ +export const ShellTimeoutSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 399); + +/** + * @generated from message agent.v1.ShellRejected + */ +export type ShellRejected = Message<"agent.v1.ShellRejected"> & { + /** + * @generated from field: string command = 1; + */ + command: string; + + /** + * @generated from field: string working_directory = 2; + */ + workingDirectory: string; + + /** + * @generated from field: string reason = 3; + */ + reason: string; + + /** + * @generated from field: bool is_readonly = 4; + */ + isReadonly: boolean; +}; + +/** + * Describes the message agent.v1.ShellRejected. + * Use `create(ShellRejectedSchema)` to create a new message. + */ +export const ShellRejectedSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 400); + +/** + * @generated from message agent.v1.ShellPermissionDenied + */ +export type ShellPermissionDenied = Message<"agent.v1.ShellPermissionDenied"> & { + /** + * @generated from field: string command = 1; + */ + command: string; + + /** + * @generated from field: string working_directory = 2; + */ + workingDirectory: string; + + /** + * @generated from field: string error = 3; + */ + error: string; + + /** + * @generated from field: bool is_readonly = 4; + */ + isReadonly: boolean; +}; + +/** + * Describes the message agent.v1.ShellPermissionDenied. + * Use `create(ShellPermissionDeniedSchema)` to create a new message. + */ +export const ShellPermissionDeniedSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 401); + +/** + * @generated from message agent.v1.ShellSpawnError + */ +export type ShellSpawnError = Message<"agent.v1.ShellSpawnError"> & { + /** + * @generated from field: string command = 1; + */ + command: string; + + /** + * @generated from field: string working_directory = 2; + */ + workingDirectory: string; + + /** + * @generated from field: string error = 3; + */ + error: string; +}; + +/** + * Describes the message agent.v1.ShellSpawnError. + * Use `create(ShellSpawnErrorSchema)` to create a new message. + */ +export const ShellSpawnErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 402); + +/** + * @generated from message agent.v1.ShellPartialResult + */ +export type ShellPartialResult = Message<"agent.v1.ShellPartialResult"> & { + /** + * @generated from field: string stdout_delta = 1; + */ + stdoutDelta: string; + + /** + * @generated from field: string stderr_delta = 2; + */ + stderrDelta: string; +}; + +/** + * Describes the message agent.v1.ShellPartialResult. + * Use `create(ShellPartialResultSchema)` to create a new message. + */ +export const ShellPartialResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 403); + +/** + * @generated from message agent.v1.ShellToolCall + */ +export type ShellToolCall = Message<"agent.v1.ShellToolCall"> & { + /** + * @generated from field: agent.v1.ShellArgs args = 1; + */ + args?: ShellArgs; + + /** + * @generated from field: agent.v1.ShellResult result = 2; + */ + result?: ShellResult; +}; + +/** + * Describes the message agent.v1.ShellToolCall. + * Use `create(ShellToolCallSchema)` to create a new message. + */ +export const ShellToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 404); + +/** + * @generated from message agent.v1.ShellToolCallStdoutDelta + */ +export type ShellToolCallStdoutDelta = Message<"agent.v1.ShellToolCallStdoutDelta"> & { + /** + * @generated from field: string content = 1; + */ + content: string; +}; + +/** + * Describes the message agent.v1.ShellToolCallStdoutDelta. + * Use `create(ShellToolCallStdoutDeltaSchema)` to create a new message. + */ +export const ShellToolCallStdoutDeltaSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 405); + +/** + * @generated from message agent.v1.ShellToolCallStderrDelta + */ +export type ShellToolCallStderrDelta = Message<"agent.v1.ShellToolCallStderrDelta"> & { + /** + * @generated from field: string content = 1; + */ + content: string; +}; + +/** + * Describes the message agent.v1.ShellToolCallStderrDelta. + * Use `create(ShellToolCallStderrDeltaSchema)` to create a new message. + */ +export const ShellToolCallStderrDeltaSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 406); + +/** + * @generated from message agent.v1.ShellToolCallDelta + */ +export type ShellToolCallDelta = Message<"agent.v1.ShellToolCallDelta"> & { + /** + * @generated from oneof agent.v1.ShellToolCallDelta.delta + */ + delta: + | { + /** + * @generated from field: agent.v1.ShellToolCallStdoutDelta stdout = 1; + */ + value: ShellToolCallStdoutDelta; + case: "stdout"; + } + | { + /** + * @generated from field: agent.v1.ShellToolCallStderrDelta stderr = 2; + */ + value: ShellToolCallStderrDelta; + case: "stderr"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ShellToolCallDelta. + * Use `create(ShellToolCallDeltaSchema)` to create a new message. + */ +export const ShellToolCallDeltaSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 407); + +/** + * @generated from message agent.v1.SubagentType + */ +export type SubagentType = Message<"agent.v1.SubagentType"> & { + /** + * @generated from oneof agent.v1.SubagentType.type + */ + type: + | { + /** + * @generated from field: agent.v1.SubagentTypeUnspecified unspecified = 1; + */ + value: SubagentTypeUnspecified; + case: "unspecified"; + } + | { + /** + * @generated from field: agent.v1.SubagentTypeComputerUse computer_use = 2; + */ + value: SubagentTypeComputerUse; + case: "computerUse"; + } + | { + /** + * @generated from field: agent.v1.SubagentTypeCustom custom = 3; + */ + value: SubagentTypeCustom; + case: "custom"; + } + | { + /** + * @generated from field: agent.v1.SubagentTypeExplore explore = 4; + */ + value: SubagentTypeExplore; + case: "explore"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.SubagentType. + * Use `create(SubagentTypeSchema)` to create a new message. + */ +export const SubagentTypeSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 408); + +/** + * Empty message for unspecified subagent type + * + * @generated from message agent.v1.SubagentTypeUnspecified + */ +export type SubagentTypeUnspecified = Message<"agent.v1.SubagentTypeUnspecified"> & {}; + +/** + * Describes the message agent.v1.SubagentTypeUnspecified. + * Use `create(SubagentTypeUnspecifiedSchema)` to create a new message. + */ +export const SubagentTypeUnspecifiedSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 409); + +/** + * Empty message for computer use subagent type + * + * @generated from message agent.v1.SubagentTypeComputerUse + */ +export type SubagentTypeComputerUse = Message<"agent.v1.SubagentTypeComputerUse"> & {}; + +/** + * Describes the message agent.v1.SubagentTypeComputerUse. + * Use `create(SubagentTypeComputerUseSchema)` to create a new message. + */ +export const SubagentTypeComputerUseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 410); + +/** + * Empty message for explore subagent type (read-only codebase exploration) + * + * @generated from message agent.v1.SubagentTypeExplore + */ +export type SubagentTypeExplore = Message<"agent.v1.SubagentTypeExplore"> & {}; + +/** + * Describes the message agent.v1.SubagentTypeExplore. + * Use `create(SubagentTypeExploreSchema)` to create a new message. + */ +export const SubagentTypeExploreSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 411); + +/** + * Custom subagent type with a name field + * + * @generated from message agent.v1.SubagentTypeCustom + */ +export type SubagentTypeCustom = Message<"agent.v1.SubagentTypeCustom"> & { + /** + * unique identifier of the custom subagent + * + * @generated from field: string name = 1; + */ + name: string; +}; + +/** + * Describes the message agent.v1.SubagentTypeCustom. + * Use `create(SubagentTypeCustomSchema)` to create a new message. + */ +export const SubagentTypeCustomSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 412); + +/** + * Custom subagent definition loaded from local workspace configuration. + * + * @generated from message agent.v1.CustomSubagent + */ +export type CustomSubagent = Message<"agent.v1.CustomSubagent"> & { + /** + * absolute path to the markdown definition file + * + * @generated from field: string full_path = 1; + */ + fullPath: string; + + /** + * unique identifier of the subagent + * + * @generated from field: string name = 2; + */ + name: string; + + /** + * short summary of the agent's specialization + * + * @generated from field: string description = 3; + */ + description: string; + + /** + * list of tool names the subagent can access + * + * @generated from field: repeated string tools = 4; + */ + tools: string[]; + + /** + * preferred model (or "inherit" to use parent's model) + * + * @generated from field: string model = 5; + */ + model: string; + + /** + * full prompt contents from the markdown file + * + * @generated from field: string prompt = 6; + */ + prompt: string; + + /** + * default permission mode for subagent execution + * + * @generated from field: int32 permission_mode = 7; + */ + permissionMode: number; +}; + +/** + * Describes the message agent.v1.CustomSubagent. + * Use `create(CustomSubagentSchema)` to create a new message. + */ +export const CustomSubagentSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 413); + +/** + * @generated from message agent.v1.SwitchModeArgs + */ +export type SwitchModeArgs = Message<"agent.v1.SwitchModeArgs"> & { + /** + * The unified mode id to switch to (agent/chat/plan/spec/debug/triage) + * + * @generated from field: string target_mode_id = 1; + */ + targetModeId: string; + + /** + * Optional explanation for why the mode switch is requested + * + * @generated from field: optional string explanation = 2; + */ + explanation?: string; + + /** + * @generated from field: string tool_call_id = 3; + */ + toolCallId: string; +}; + +/** + * Describes the message agent.v1.SwitchModeArgs. + * Use `create(SwitchModeArgsSchema)` to create a new message. + */ +export const SwitchModeArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 414); + +/** + * @generated from message agent.v1.SwitchModeResult + */ +export type SwitchModeResult = Message<"agent.v1.SwitchModeResult"> & { + /** + * @generated from oneof agent.v1.SwitchModeResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.SwitchModeSuccess success = 1; + */ + value: SwitchModeSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.SwitchModeError error = 2; + */ + value: SwitchModeError; + case: "error"; + } + | { + /** + * @generated from field: agent.v1.SwitchModeRejected rejected = 3; + */ + value: SwitchModeRejected; + case: "rejected"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.SwitchModeResult. + * Use `create(SwitchModeResultSchema)` to create a new message. + */ +export const SwitchModeResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 415); + +/** + * @generated from message agent.v1.SwitchModeSuccess + */ +export type SwitchModeSuccess = Message<"agent.v1.SwitchModeSuccess"> & { + /** + * The mode we switched from + * + * @generated from field: string from_mode_id = 1; + */ + fromModeId: string; + + /** + * The mode we switched to + * + * @generated from field: string to_mode_id = 2; + */ + toModeId: string; +}; + +/** + * Describes the message agent.v1.SwitchModeSuccess. + * Use `create(SwitchModeSuccessSchema)` to create a new message. + */ +export const SwitchModeSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 416); + +/** + * @generated from message agent.v1.SwitchModeError + */ +export type SwitchModeError = Message<"agent.v1.SwitchModeError"> & { + /** + * @generated from field: string error = 1; + */ + error: string; +}; + +/** + * Describes the message agent.v1.SwitchModeError. + * Use `create(SwitchModeErrorSchema)` to create a new message. + */ +export const SwitchModeErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 417); + +/** + * @generated from message agent.v1.SwitchModeRejected + */ +export type SwitchModeRejected = Message<"agent.v1.SwitchModeRejected"> & { + /** + * @generated from field: string reason = 1; + */ + reason: string; +}; + +/** + * Describes the message agent.v1.SwitchModeRejected. + * Use `create(SwitchModeRejectedSchema)` to create a new message. + */ +export const SwitchModeRejectedSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 418); + +/** + * @generated from message agent.v1.SwitchModeToolCall + */ +export type SwitchModeToolCall = Message<"agent.v1.SwitchModeToolCall"> & { + /** + * @generated from field: agent.v1.SwitchModeArgs args = 1; + */ + args?: SwitchModeArgs; + + /** + * @generated from field: agent.v1.SwitchModeResult result = 2; + */ + result?: SwitchModeResult; +}; + +/** + * Describes the message agent.v1.SwitchModeToolCall. + * Use `create(SwitchModeToolCallSchema)` to create a new message. + */ +export const SwitchModeToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 419); + +/** + * @generated from message agent.v1.SwitchModeRequestQuery + */ +export type SwitchModeRequestQuery = Message<"agent.v1.SwitchModeRequestQuery"> & { + /** + * @generated from field: agent.v1.SwitchModeArgs args = 1; + */ + args?: SwitchModeArgs; +}; + +/** + * Describes the message agent.v1.SwitchModeRequestQuery. + * Use `create(SwitchModeRequestQuerySchema)` to create a new message. + */ +export const SwitchModeRequestQuerySchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 420); + +/** + * @generated from message agent.v1.SwitchModeRequestResponse + */ +export type SwitchModeRequestResponse = Message<"agent.v1.SwitchModeRequestResponse"> & { + /** + * @generated from oneof agent.v1.SwitchModeRequestResponse.result + */ + result: + | { + /** + * @generated from field: agent.v1.SwitchModeRequestResponse_Approved approved = 1; + */ + value: SwitchModeRequestResponse_Approved; + case: "approved"; + } + | { + /** + * @generated from field: agent.v1.SwitchModeRequestResponse_Rejected rejected = 2; + */ + value: SwitchModeRequestResponse_Rejected; + case: "rejected"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.SwitchModeRequestResponse. + * Use `create(SwitchModeRequestResponseSchema)` to create a new message. + */ +export const SwitchModeRequestResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 421); + +/** + * @generated from message agent.v1.SwitchModeRequestResponse_Approved + */ +export type SwitchModeRequestResponse_Approved = Message<"agent.v1.SwitchModeRequestResponse_Approved"> & {}; + +/** + * Describes the message agent.v1.SwitchModeRequestResponse_Approved. + * Use `create(SwitchModeRequestResponse_ApprovedSchema)` to create a new message. + */ +export const SwitchModeRequestResponse_ApprovedSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 422); + +/** + * @generated from message agent.v1.SwitchModeRequestResponse_Rejected + */ +export type SwitchModeRequestResponse_Rejected = Message<"agent.v1.SwitchModeRequestResponse_Rejected"> & { + /** + * @generated from field: string reason = 1; + */ + reason: string; +}; + +/** + * Describes the message agent.v1.SwitchModeRequestResponse_Rejected. + * Use `create(SwitchModeRequestResponse_RejectedSchema)` to create a new message. + */ +export const SwitchModeRequestResponse_RejectedSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 423); + +/** + * @generated from message agent.v1.TodoItem + */ +export type TodoItem = Message<"agent.v1.TodoItem"> & { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: string content = 2; + */ + content: string; + + /** + * @generated from field: int32 status = 3; + */ + status: number; + + /** + * @generated from field: int64 created_at = 4; + */ + createdAt: bigint; + + /** + * @generated from field: int64 updated_at = 5; + */ + updatedAt: bigint; + + /** + * IDs of other TODOs this depends on + * + * @generated from field: repeated string dependencies = 6; + */ + dependencies: string[]; +}; + +/** + * Describes the message agent.v1.TodoItem. + * Use `create(TodoItemSchema)` to create a new message. + */ +export const TodoItemSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 424); + +/** + * UpdateTodos tool call + * + * @generated from message agent.v1.UpdateTodosToolCall + */ +export type UpdateTodosToolCall = Message<"agent.v1.UpdateTodosToolCall"> & { + /** + * @generated from field: agent.v1.UpdateTodosArgs args = 1; + */ + args?: UpdateTodosArgs; + + /** + * @generated from field: agent.v1.UpdateTodosResult result = 2; + */ + result?: UpdateTodosResult; +}; + +/** + * Describes the message agent.v1.UpdateTodosToolCall. + * Use `create(UpdateTodosToolCallSchema)` to create a new message. + */ +export const UpdateTodosToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 425); + +/** + * @generated from message agent.v1.UpdateTodosArgs + */ +export type UpdateTodosArgs = Message<"agent.v1.UpdateTodosArgs"> & { + /** + * @generated from field: repeated agent.v1.TodoItem todos = 1; + */ + todos: TodoItem[]; + + /** + * @generated from field: bool merge = 2; + */ + merge: boolean; +}; + +/** + * Describes the message agent.v1.UpdateTodosArgs. + * Use `create(UpdateTodosArgsSchema)` to create a new message. + */ +export const UpdateTodosArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 426); + +/** + * @generated from message agent.v1.UpdateTodosResult + */ +export type UpdateTodosResult = Message<"agent.v1.UpdateTodosResult"> & { + /** + * @generated from oneof agent.v1.UpdateTodosResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.UpdateTodosSuccess success = 1; + */ + value: UpdateTodosSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.UpdateTodosError error = 2; + */ + value: UpdateTodosError; + case: "error"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.UpdateTodosResult. + * Use `create(UpdateTodosResultSchema)` to create a new message. + */ +export const UpdateTodosResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 427); + +/** + * @generated from message agent.v1.UpdateTodosSuccess + */ +export type UpdateTodosSuccess = Message<"agent.v1.UpdateTodosSuccess"> & { + /** + * @generated from field: repeated agent.v1.TodoItem todos = 1; + */ + todos: TodoItem[]; + + /** + * @generated from field: int32 total_count = 2; + */ + totalCount: number; + + /** + * Whether this was a merge operation (needed for conditional rendering) + * + * @generated from field: bool was_merge = 3; + */ + wasMerge: boolean; +}; + +/** + * Describes the message agent.v1.UpdateTodosSuccess. + * Use `create(UpdateTodosSuccessSchema)` to create a new message. + */ +export const UpdateTodosSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 428); + +/** + * @generated from message agent.v1.UpdateTodosError + */ +export type UpdateTodosError = Message<"agent.v1.UpdateTodosError"> & { + /** + * @generated from field: string error = 1; + */ + error: string; +}; + +/** + * Describes the message agent.v1.UpdateTodosError. + * Use `create(UpdateTodosErrorSchema)` to create a new message. + */ +export const UpdateTodosErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 429); + +/** + * ReadTodos tool call + * + * @generated from message agent.v1.ReadTodosToolCall + */ +export type ReadTodosToolCall = Message<"agent.v1.ReadTodosToolCall"> & { + /** + * @generated from field: agent.v1.ReadTodosArgs args = 1; + */ + args?: ReadTodosArgs; + + /** + * @generated from field: agent.v1.ReadTodosResult result = 2; + */ + result?: ReadTodosResult; +}; + +/** + * Describes the message agent.v1.ReadTodosToolCall. + * Use `create(ReadTodosToolCallSchema)` to create a new message. + */ +export const ReadTodosToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 430); + +/** + * @generated from message agent.v1.ReadTodosArgs + */ +export type ReadTodosArgs = Message<"agent.v1.ReadTodosArgs"> & { + /** + * Optional: filter by status + * + * @generated from field: repeated int32 status_filter = 1; + */ + statusFilter: number[]; + + /** + * Optional: filter by IDs + * + * @generated from field: repeated string id_filter = 2; + */ + idFilter: string[]; +}; + +/** + * Describes the message agent.v1.ReadTodosArgs. + * Use `create(ReadTodosArgsSchema)` to create a new message. + */ +export const ReadTodosArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 431); + +/** + * @generated from message agent.v1.ReadTodosResult + */ +export type ReadTodosResult = Message<"agent.v1.ReadTodosResult"> & { + /** + * @generated from oneof agent.v1.ReadTodosResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.ReadTodosSuccess success = 1; + */ + value: ReadTodosSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.ReadTodosError error = 2; + */ + value: ReadTodosError; + case: "error"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ReadTodosResult. + * Use `create(ReadTodosResultSchema)` to create a new message. + */ +export const ReadTodosResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 432); + +/** + * @generated from message agent.v1.ReadTodosSuccess + */ +export type ReadTodosSuccess = Message<"agent.v1.ReadTodosSuccess"> & { + /** + * @generated from field: repeated agent.v1.TodoItem todos = 1; + */ + todos: TodoItem[]; + + /** + * @generated from field: int32 total_count = 2; + */ + totalCount: number; +}; + +/** + * Describes the message agent.v1.ReadTodosSuccess. + * Use `create(ReadTodosSuccessSchema)` to create a new message. + */ +export const ReadTodosSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 433); + +/** + * @generated from message agent.v1.ReadTodosError + */ +export type ReadTodosError = Message<"agent.v1.ReadTodosError"> & { + /** + * @generated from field: string error = 1; + */ + error: string; +}; + +/** + * Describes the message agent.v1.ReadTodosError. + * Use `create(ReadTodosErrorSchema)` to create a new message. + */ +export const ReadTodosErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 434); + +/** + * @generated from message agent.v1.Range + */ +export type Range = Message<"agent.v1.Range"> & { + /** + * @generated from field: agent.v1.Position start = 1; + */ + start?: Position; + + /** + * @generated from field: agent.v1.Position end = 2; + */ + end?: Position; +}; + +/** + * Describes the message agent.v1.Range. + * Use `create(RangeSchema)` to create a new message. + */ +export const RangeSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 435); + +/** + * @generated from message agent.v1.Position + */ +export type Position = Message<"agent.v1.Position"> & { + /** + * @generated from field: uint32 line = 1; + */ + line: number; + + /** + * @generated from field: uint32 column = 2; + */ + column: number; +}; + +/** + * Describes the message agent.v1.Position. + * Use `create(PositionSchema)` to create a new message. + */ +export const PositionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 436); + +/** + * @generated from message agent.v1.Error + */ +export type Error = Message<"agent.v1.Error"> & { + /** + * @generated from field: string message = 1; + */ + message: string; +}; + +/** + * Describes the message agent.v1.Error. + * Use `create(ErrorSchema)` to create a new message. + */ +export const ErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 437); + +/** + * @generated from message agent.v1.WebSearchArgs + */ +export type WebSearchArgs = Message<"agent.v1.WebSearchArgs"> & { + /** + * @generated from field: string search_term = 1; + */ + searchTerm: string; + + /** + * @generated from field: string tool_call_id = 2; + */ + toolCallId: string; +}; + +/** + * Describes the message agent.v1.WebSearchArgs. + * Use `create(WebSearchArgsSchema)` to create a new message. + */ +export const WebSearchArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 438); + +/** + * @generated from message agent.v1.WebSearchResult + */ +export type WebSearchResult = Message<"agent.v1.WebSearchResult"> & { + /** + * @generated from oneof agent.v1.WebSearchResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.WebSearchSuccess success = 1; + */ + value: WebSearchSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.WebSearchError error = 2; + */ + value: WebSearchError; + case: "error"; + } + | { + /** + * @generated from field: agent.v1.WebSearchRejected rejected = 3; + */ + value: WebSearchRejected; + case: "rejected"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.WebSearchResult. + * Use `create(WebSearchResultSchema)` to create a new message. + */ +export const WebSearchResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 439); + +/** + * @generated from message agent.v1.WebSearchSuccess + */ +export type WebSearchSuccess = Message<"agent.v1.WebSearchSuccess"> & { + /** + * @generated from field: repeated agent.v1.WebSearchReference references = 1; + */ + references: WebSearchReference[]; +}; + +/** + * Describes the message agent.v1.WebSearchSuccess. + * Use `create(WebSearchSuccessSchema)` to create a new message. + */ +export const WebSearchSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 440); + +/** + * @generated from message agent.v1.WebSearchError + */ +export type WebSearchError = Message<"agent.v1.WebSearchError"> & { + /** + * @generated from field: string error = 1; + */ + error: string; +}; + +/** + * Describes the message agent.v1.WebSearchError. + * Use `create(WebSearchErrorSchema)` to create a new message. + */ +export const WebSearchErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 441); + +/** + * @generated from message agent.v1.WebSearchRejected + */ +export type WebSearchRejected = Message<"agent.v1.WebSearchRejected"> & { + /** + * @generated from field: string reason = 1; + */ + reason: string; +}; + +/** + * Describes the message agent.v1.WebSearchRejected. + * Use `create(WebSearchRejectedSchema)` to create a new message. + */ +export const WebSearchRejectedSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 442); + +/** + * @generated from message agent.v1.WebSearchReference + */ +export type WebSearchReference = Message<"agent.v1.WebSearchReference"> & { + /** + * @generated from field: string title = 1; + */ + title: string; + + /** + * @generated from field: string url = 2; + */ + url: string; + + /** + * @generated from field: string chunk = 3; + */ + chunk: string; +}; + +/** + * Describes the message agent.v1.WebSearchReference. + * Use `create(WebSearchReferenceSchema)` to create a new message. + */ +export const WebSearchReferenceSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 443); + +/** + * @generated from message agent.v1.WebSearchToolCall + */ +export type WebSearchToolCall = Message<"agent.v1.WebSearchToolCall"> & { + /** + * @generated from field: agent.v1.WebSearchArgs args = 1; + */ + args?: WebSearchArgs; + + /** + * @generated from field: agent.v1.WebSearchResult result = 2; + */ + result?: WebSearchResult; +}; + +/** + * Describes the message agent.v1.WebSearchToolCall. + * Use `create(WebSearchToolCallSchema)` to create a new message. + */ +export const WebSearchToolCallSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 444); + +/** + * @generated from message agent.v1.WebSearchRequestQuery + */ +export type WebSearchRequestQuery = Message<"agent.v1.WebSearchRequestQuery"> & { + /** + * @generated from field: agent.v1.WebSearchArgs args = 1; + */ + args?: WebSearchArgs; +}; + +/** + * Describes the message agent.v1.WebSearchRequestQuery. + * Use `create(WebSearchRequestQuerySchema)` to create a new message. + */ +export const WebSearchRequestQuerySchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 445); + +/** + * @generated from message agent.v1.WebSearchRequestResponse + */ +export type WebSearchRequestResponse = Message<"agent.v1.WebSearchRequestResponse"> & { + /** + * @generated from oneof agent.v1.WebSearchRequestResponse.result + */ + result: + | { + /** + * @generated from field: agent.v1.WebSearchRequestResponse_Approved approved = 1; + */ + value: WebSearchRequestResponse_Approved; + case: "approved"; + } + | { + /** + * @generated from field: agent.v1.WebSearchRequestResponse_Rejected rejected = 2; + */ + value: WebSearchRequestResponse_Rejected; + case: "rejected"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.WebSearchRequestResponse. + * Use `create(WebSearchRequestResponseSchema)` to create a new message. + */ +export const WebSearchRequestResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 446); + +/** + * @generated from message agent.v1.WebSearchRequestResponse_Approved + */ +export type WebSearchRequestResponse_Approved = Message<"agent.v1.WebSearchRequestResponse_Approved"> & {}; + +/** + * Describes the message agent.v1.WebSearchRequestResponse_Approved. + * Use `create(WebSearchRequestResponse_ApprovedSchema)` to create a new message. + */ +export const WebSearchRequestResponse_ApprovedSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 447); + +/** + * @generated from message agent.v1.WebSearchRequestResponse_Rejected + */ +export type WebSearchRequestResponse_Rejected = Message<"agent.v1.WebSearchRequestResponse_Rejected"> & { + /** + * @generated from field: string reason = 1; + */ + reason: string; +}; + +/** + * Describes the message agent.v1.WebSearchRequestResponse_Rejected. + * Use `create(WebSearchRequestResponse_RejectedSchema)` to create a new message. + */ +export const WebSearchRequestResponse_RejectedSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 448); + +/** + * @generated from message agent.v1.WriteArgs + */ +export type WriteArgs = Message<"agent.v1.WriteArgs"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: string file_text = 2; + */ + fileText: string; + + /** + * @generated from field: string tool_call_id = 3; + */ + toolCallId: string; + + /** + * @generated from field: bool return_file_content_after_write = 4; + */ + returnFileContentAfterWrite: boolean; + + /** + * Raw binary data to write. When set, file_text is ignored and the bytes are written directly without any text processing (e.g., line ending normalization). + * + * @generated from field: bytes file_bytes = 5; + */ + fileBytes: Uint8Array; +}; + +/** + * Describes the message agent.v1.WriteArgs. + * Use `create(WriteArgsSchema)` to create a new message. + */ +export const WriteArgsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 449); + +/** + * @generated from message agent.v1.WriteResult + */ +export type WriteResult = Message<"agent.v1.WriteResult"> & { + /** + * @generated from oneof agent.v1.WriteResult.result + */ + result: + | { + /** + * @generated from field: agent.v1.WriteSuccess success = 1; + */ + value: WriteSuccess; + case: "success"; + } + | { + /** + * @generated from field: agent.v1.WritePermissionDenied permission_denied = 3; + */ + value: WritePermissionDenied; + case: "permissionDenied"; + } + | { + /** + * @generated from field: agent.v1.WriteNoSpace no_space = 4; + */ + value: WriteNoSpace; + case: "noSpace"; + } + | { + /** + * @generated from field: agent.v1.WriteError error = 5; + */ + value: WriteError; + case: "error"; + } + | { + /** + * @generated from field: agent.v1.WriteRejected rejected = 6; + */ + value: WriteRejected; + case: "rejected"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.WriteResult. + * Use `create(WriteResultSchema)` to create a new message. + */ +export const WriteResultSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 450); + +/** + * @generated from message agent.v1.WriteSuccess + */ +export type WriteSuccess = Message<"agent.v1.WriteSuccess"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: int32 lines_created = 2; + */ + linesCreated: number; + + /** + * @generated from field: int32 file_size = 3; + */ + fileSize: number; + + /** + * @generated from field: optional string file_content_after_write = 4; + */ + fileContentAfterWrite?: string; +}; + +/** + * Describes the message agent.v1.WriteSuccess. + * Use `create(WriteSuccessSchema)` to create a new message. + */ +export const WriteSuccessSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 451); + +/** + * @generated from message agent.v1.WritePermissionDenied + */ +export type WritePermissionDenied = Message<"agent.v1.WritePermissionDenied"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: string directory = 2; + */ + directory: string; + + /** + * "create_directory" or "create_file" + * + * @generated from field: string operation = 3; + */ + operation: string; + + /** + * @generated from field: string error = 4; + */ + error: string; + + /** + * @generated from field: bool is_readonly = 5; + */ + isReadonly: boolean; +}; + +/** + * Describes the message agent.v1.WritePermissionDenied. + * Use `create(WritePermissionDeniedSchema)` to create a new message. + */ +export const WritePermissionDeniedSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 452); + +/** + * @generated from message agent.v1.WriteNoSpace + */ +export type WriteNoSpace = Message<"agent.v1.WriteNoSpace"> & { + /** + * @generated from field: string path = 1; + */ + path: string; +}; + +/** + * Describes the message agent.v1.WriteNoSpace. + * Use `create(WriteNoSpaceSchema)` to create a new message. + */ +export const WriteNoSpaceSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 453); + +/** + * @generated from message agent.v1.WriteError + */ +export type WriteError = Message<"agent.v1.WriteError"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: string error = 2; + */ + error: string; +}; + +/** + * Describes the message agent.v1.WriteError. + * Use `create(WriteErrorSchema)` to create a new message. + */ +export const WriteErrorSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 454); + +/** + * @generated from message agent.v1.WriteRejected + */ +export type WriteRejected = Message<"agent.v1.WriteRejected"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: string reason = 2; + */ + reason: string; +}; + +/** + * Describes the message agent.v1.WriteRejected. + * Use `create(WriteRejectedSchema)` to create a new message. + */ +export const WriteRejectedSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 455); + +/** + * @generated from message agent.v1.BootstrapStatsigRequest + */ +export type BootstrapStatsigRequest = Message<"agent.v1.BootstrapStatsigRequest"> & { + /** + * When true, the server should evaluate gates as if dev/internal status is ignored. This is used by clients to simulate a prod user experience. + * + * @generated from field: optional bool ignore_dev_status = 1; + */ + ignoreDevStatus?: boolean; + + /** + * @generated from field: optional int32 operating_system = 2; + */ + operatingSystem?: number; +}; + +/** + * Describes the message agent.v1.BootstrapStatsigRequest. + * Use `create(BootstrapStatsigRequestSchema)` to create a new message. + */ +export const BootstrapStatsigRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 456); + +/** + * @generated from message agent.v1.PingResponse + */ +export type PingResponse = Message<"agent.v1.PingResponse"> & {}; + +/** + * Describes the message agent.v1.PingResponse. + * Use `create(PingResponseSchema)` to create a new message. + */ +export const PingResponseSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 457); + +/** + * @generated from message agent.v1.ExecRequest + */ +export type ExecRequest = Message<"agent.v1.ExecRequest"> & { + /** + * @generated from field: string command = 1; + */ + command: string; + + /** + * @generated from field: optional string cwd = 2; + */ + cwd?: string; + + /** + * @generated from field: repeated string args = 3; + */ + args: string[]; + + /** + * @generated from field: map environment = 4; + */ + environment: { [key: string]: string }; +}; + +/** + * Describes the message agent.v1.ExecRequest. + * Use `create(ExecRequestSchema)` to create a new message. + */ +export const ExecRequestSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 458); + +/** + * @generated from message agent.v1.ExecResponse + */ +export type ExecResponse = Message<"agent.v1.ExecResponse"> & { + /** + * @generated from oneof agent.v1.ExecResponse.event + */ + event: + | { + /** + * @generated from field: agent.v1.StdoutEvent stdout_event = 1; + */ + value: StdoutEvent; + case: "stdoutEvent"; + } + | { + /** + * @generated from field: agent.v1.StderrEvent stderr_event = 2; + */ + value: StderrEvent; + case: "stderrEvent"; + } + | { + /** + * @generated from field: agent.v1.ExitEvent exit_event = 3; + */ + value: ExitEvent; + case: "exitEvent"; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message agent.v1.ExecResponse. + * Use `create(ExecResponseSchema)` to create a new message. + */ +export const ExecResponseSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 459); + +/** + * @generated from message agent.v1.StdoutEvent + */ +export type StdoutEvent = Message<"agent.v1.StdoutEvent"> & { + /** + * @generated from field: string data = 1; + */ + data: string; +}; + +/** + * Describes the message agent.v1.StdoutEvent. + * Use `create(StdoutEventSchema)` to create a new message. + */ +export const StdoutEventSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 460); + +/** + * @generated from message agent.v1.StderrEvent + */ +export type StderrEvent = Message<"agent.v1.StderrEvent"> & { + /** + * @generated from field: string data = 1; + */ + data: string; +}; + +/** + * Describes the message agent.v1.StderrEvent. + * Use `create(StderrEventSchema)` to create a new message. + */ +export const StderrEventSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 461); + +/** + * @generated from message agent.v1.ExitEvent + */ +export type ExitEvent = Message<"agent.v1.ExitEvent"> & { + /** + * @generated from field: int32 exit_code = 1; + */ + exitCode: number; +}; + +/** + * Describes the message agent.v1.ExitEvent. + * Use `create(ExitEventSchema)` to create a new message. + */ +export const ExitEventSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 462); + +/** + * @generated from message agent.v1.ReadTextFileRequest + */ +export type ReadTextFileRequest = Message<"agent.v1.ReadTextFileRequest"> & { + /** + * @generated from field: string path = 1; + */ + path: string; +}; + +/** + * Describes the message agent.v1.ReadTextFileRequest. + * Use `create(ReadTextFileRequestSchema)` to create a new message. + */ +export const ReadTextFileRequestSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 463); + +/** + * @generated from message agent.v1.ReadTextFileResponse + */ +export type ReadTextFileResponse = Message<"agent.v1.ReadTextFileResponse"> & { + /** + * @generated from field: string content = 1; + */ + content: string; +}; + +/** + * Describes the message agent.v1.ReadTextFileResponse. + * Use `create(ReadTextFileResponseSchema)` to create a new message. + */ +export const ReadTextFileResponseSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 464); + +/** + * @generated from message agent.v1.WriteTextFileRequest + */ +export type WriteTextFileRequest = Message<"agent.v1.WriteTextFileRequest"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: string content = 2; + */ + content: string; +}; + +/** + * Describes the message agent.v1.WriteTextFileRequest. + * Use `create(WriteTextFileRequestSchema)` to create a new message. + */ +export const WriteTextFileRequestSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 465); + +/** + * Empty response - success is implied by RPC completion + * + * @generated from message agent.v1.WriteTextFileResponse + */ +export type WriteTextFileResponse = Message<"agent.v1.WriteTextFileResponse"> & {}; + +/** + * Describes the message agent.v1.WriteTextFileResponse. + * Use `create(WriteTextFileResponseSchema)` to create a new message. + */ +export const WriteTextFileResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 466); + +/** + * @generated from message agent.v1.ReadBinaryFileRequest + */ +export type ReadBinaryFileRequest = Message<"agent.v1.ReadBinaryFileRequest"> & { + /** + * @generated from field: string path = 1; + */ + path: string; +}; + +/** + * Describes the message agent.v1.ReadBinaryFileRequest. + * Use `create(ReadBinaryFileRequestSchema)` to create a new message. + */ +export const ReadBinaryFileRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 467); + +/** + * @generated from message agent.v1.ReadBinaryFileResponse + */ +export type ReadBinaryFileResponse = Message<"agent.v1.ReadBinaryFileResponse"> & { + /** + * @generated from field: bytes content = 1; + */ + content: Uint8Array; +}; + +/** + * Describes the message agent.v1.ReadBinaryFileResponse. + * Use `create(ReadBinaryFileResponseSchema)` to create a new message. + */ +export const ReadBinaryFileResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 468); + +/** + * @generated from message agent.v1.WriteBinaryFileRequest + */ +export type WriteBinaryFileRequest = Message<"agent.v1.WriteBinaryFileRequest"> & { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: bytes content = 2; + */ + content: Uint8Array; +}; + +/** + * Describes the message agent.v1.WriteBinaryFileRequest. + * Use `create(WriteBinaryFileRequestSchema)` to create a new message. + */ +export const WriteBinaryFileRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 469); + +/** + * Empty response - success is implied by RPC completion + * + * @generated from message agent.v1.WriteBinaryFileResponse + */ +export type WriteBinaryFileResponse = Message<"agent.v1.WriteBinaryFileResponse"> & {}; + +/** + * Describes the message agent.v1.WriteBinaryFileResponse. + * Use `create(WriteBinaryFileResponseSchema)` to create a new message. + */ +export const WriteBinaryFileResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 470); + +/** + * @generated from message agent.v1.GetWorkspaceChangesHashRequest + */ +export type GetWorkspaceChangesHashRequest = Message<"agent.v1.GetWorkspaceChangesHashRequest"> & { + /** + * @generated from field: string root_path = 1; + */ + rootPath: string; + + /** + * @generated from field: string base_ref = 2; + */ + baseRef: string; +}; + +/** + * Describes the message agent.v1.GetWorkspaceChangesHashRequest. + * Use `create(GetWorkspaceChangesHashRequestSchema)` to create a new message. + */ +export const GetWorkspaceChangesHashRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 471); + +/** + * @generated from message agent.v1.GetWorkspaceChangesHashResponse + */ +export type GetWorkspaceChangesHashResponse = Message<"agent.v1.GetWorkspaceChangesHashResponse"> & { + /** + * @generated from field: string hash = 1; + */ + hash: string; +}; + +/** + * Describes the message agent.v1.GetWorkspaceChangesHashResponse. + * Use `create(GetWorkspaceChangesHashResponseSchema)` to create a new message. + */ +export const GetWorkspaceChangesHashResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 472); + +/** + * @generated from message agent.v1.RefreshGithubAccessTokenRequest + */ +export type RefreshGithubAccessTokenRequest = Message<"agent.v1.RefreshGithubAccessTokenRequest"> & { + /** + * @generated from field: string github_access_token = 1; + */ + githubAccessToken: string; + + /** + * e.g., "github.com", "gitlab.com", "gitlab.example.com" + * + * @generated from field: string hostname = 2; + */ + hostname: string; +}; + +/** + * Describes the message agent.v1.RefreshGithubAccessTokenRequest. + * Use `create(RefreshGithubAccessTokenRequestSchema)` to create a new message. + */ +export const RefreshGithubAccessTokenRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 473); + +/** + * Empty response - success is implied by RPC completion + * + * @generated from message agent.v1.RefreshGithubAccessTokenResponse + */ +export type RefreshGithubAccessTokenResponse = Message<"agent.v1.RefreshGithubAccessTokenResponse"> & {}; + +/** + * Describes the message agent.v1.RefreshGithubAccessTokenResponse. + * Use `create(RefreshGithubAccessTokenResponseSchema)` to create a new message. + */ +export const RefreshGithubAccessTokenResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 474); + +/** + * @generated from message agent.v1.WarmRemoteAccessServerRequest + */ +export type WarmRemoteAccessServerRequest = Message<"agent.v1.WarmRemoteAccessServerRequest"> & { + /** + * @generated from field: string commit = 1; + */ + commit: string; + + /** + * @generated from field: int32 port = 2; + */ + port: number; + + /** + * @generated from field: string connection_token = 3; + */ + connectionToken: string; +}; + +/** + * Describes the message agent.v1.WarmRemoteAccessServerRequest. + * Use `create(WarmRemoteAccessServerRequestSchema)` to create a new message. + */ +export const WarmRemoteAccessServerRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 475); + +/** + * Empty response - success is implied by RPC completion + * + * @generated from message agent.v1.WarmRemoteAccessServerResponse + */ +export type WarmRemoteAccessServerResponse = Message<"agent.v1.WarmRemoteAccessServerResponse"> & {}; + +/** + * Describes the message agent.v1.WarmRemoteAccessServerResponse. + * Use `create(WarmRemoteAccessServerResponseSchema)` to create a new message. + */ +export const WarmRemoteAccessServerResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 476); + +/** + * @generated from message agent.v1.ListArtifactsRequest + */ +export type ListArtifactsRequest = Message<"agent.v1.ListArtifactsRequest"> & {}; + +/** + * Describes the message agent.v1.ListArtifactsRequest. + * Use `create(ListArtifactsRequestSchema)` to create a new message. + */ +export const ListArtifactsRequestSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 477); + +/** + * @generated from message agent.v1.ArtifactUploadMetadata + */ +export type ArtifactUploadMetadata = Message<"agent.v1.ArtifactUploadMetadata"> & { + /** + * @generated from field: string absolute_path = 1; + */ + absolutePath: string; + + /** + * @generated from field: uint64 size_bytes = 2; + */ + sizeBytes: bigint; + + /** + * @generated from field: int64 updated_at_unix_ms = 3; + */ + updatedAtUnixMs: bigint; + + /** + * @generated from field: int32 status = 4; + */ + status: number; + + /** + * @generated from field: uint64 bytes_uploaded = 5; + */ + bytesUploaded: bigint; + + /** + * @generated from field: string last_error = 6; + */ + lastError: string; + + /** + * @generated from field: uint32 upload_attempts = 7; + */ + uploadAttempts: number; + + /** + * @generated from field: int64 last_started_at_unix_ms = 8; + */ + lastStartedAtUnixMs: bigint; + + /** + * @generated from field: int64 last_finished_at_unix_ms = 9; + */ + lastFinishedAtUnixMs: bigint; + + /** + * @generated from field: string upload_id = 10; + */ + uploadId: string; +}; + +/** + * Describes the message agent.v1.ArtifactUploadMetadata. + * Use `create(ArtifactUploadMetadataSchema)` to create a new message. + */ +export const ArtifactUploadMetadataSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 478); + +/** + * @generated from message agent.v1.ListArtifactsResponse + */ +export type ListArtifactsResponse = Message<"agent.v1.ListArtifactsResponse"> & { + /** + * @generated from field: repeated agent.v1.ArtifactUploadMetadata artifacts = 1; + */ + artifacts: ArtifactUploadMetadata[]; +}; + +/** + * Describes the message agent.v1.ListArtifactsResponse. + * Use `create(ListArtifactsResponseSchema)` to create a new message. + */ +export const ListArtifactsResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 479); + +/** + * @generated from message agent.v1.UploadArtifactsRequest + */ +export type UploadArtifactsRequest = Message<"agent.v1.UploadArtifactsRequest"> & { + /** + * @generated from field: repeated agent.v1.ArtifactUploadInstruction uploads = 1; + */ + uploads: ArtifactUploadInstruction[]; +}; + +/** + * Describes the message agent.v1.UploadArtifactsRequest. + * Use `create(UploadArtifactsRequestSchema)` to create a new message. + */ +export const UploadArtifactsRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 480); + +/** + * @generated from message agent.v1.ArtifactUploadInstruction + */ +export type ArtifactUploadInstruction = Message<"agent.v1.ArtifactUploadInstruction"> & { + /** + * @generated from field: string absolute_path = 1; + */ + absolutePath: string; + + /** + * @generated from field: string upload_url = 2; + */ + uploadUrl: string; + + /** + * @generated from field: string method = 3; + */ + method: string; + + /** + * @generated from field: map headers = 4; + */ + headers: { [key: string]: string }; + + /** + * @generated from field: optional string content_type = 5; + */ + contentType?: string; + + /** + * @generated from field: optional string slack_upload_url = 6; + */ + slackUploadUrl?: string; + + /** + * @generated from field: optional string slack_file_id = 7; + */ + slackFileId?: string; +}; + +/** + * Describes the message agent.v1.ArtifactUploadInstruction. + * Use `create(ArtifactUploadInstructionSchema)` to create a new message. + */ +export const ArtifactUploadInstructionSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 481); + +/** + * @generated from message agent.v1.ArtifactUploadDispatchResult + */ +export type ArtifactUploadDispatchResult = Message<"agent.v1.ArtifactUploadDispatchResult"> & { + /** + * @generated from field: string absolute_path = 1; + */ + absolutePath: string; + + /** + * @generated from field: int32 status = 2; + */ + status: number; + + /** + * @generated from field: string message = 3; + */ + message: string; + + /** + * @generated from field: optional string slack_file_id = 4; + */ + slackFileId?: string; +}; + +/** + * Describes the message agent.v1.ArtifactUploadDispatchResult. + * Use `create(ArtifactUploadDispatchResultSchema)` to create a new message. + */ +export const ArtifactUploadDispatchResultSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 482); + +/** + * @generated from message agent.v1.UploadArtifactsResponse + */ +export type UploadArtifactsResponse = Message<"agent.v1.UploadArtifactsResponse"> & { + /** + * @generated from field: repeated agent.v1.ArtifactUploadDispatchResult results = 1; + */ + results: ArtifactUploadDispatchResult[]; +}; + +/** + * Describes the message agent.v1.UploadArtifactsResponse. + * Use `create(UploadArtifactsResponseSchema)` to create a new message. + */ +export const UploadArtifactsResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 483); + +/** + * @generated from message agent.v1.GetMcpRefreshTokensRequest + */ +export type GetMcpRefreshTokensRequest = Message<"agent.v1.GetMcpRefreshTokensRequest"> & {}; + +/** + * Describes the message agent.v1.GetMcpRefreshTokensRequest. + * Use `create(GetMcpRefreshTokensRequestSchema)` to create a new message. + */ +export const GetMcpRefreshTokensRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 484); + +/** + * @generated from message agent.v1.GetMcpRefreshTokensResponse + */ +export type GetMcpRefreshTokensResponse = Message<"agent.v1.GetMcpRefreshTokensResponse"> & { + /** + * Map from server URL to refresh token + * + * @generated from field: map refresh_tokens = 1; + */ + refreshTokens: { [key: string]: string }; +}; + +/** + * Describes the message agent.v1.GetMcpRefreshTokensResponse. + * Use `create(GetMcpRefreshTokensResponseSchema)` to create a new message. + */ +export const GetMcpRefreshTokensResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 485); + +/** + * @generated from message agent.v1.UpdateEnvironmentVariablesRequest + */ +export type UpdateEnvironmentVariablesRequest = Message<"agent.v1.UpdateEnvironmentVariablesRequest"> & { + /** + * Environment variables to manage (plaintext values). + * + * @generated from field: map env = 1; + */ + env: { [key: string]: string }; + + /** + * If true, unset previously-managed keys that are not present in `env`. + * + * @generated from field: bool replace = 2; + */ + replace: boolean; +}; + +/** + * Describes the message agent.v1.UpdateEnvironmentVariablesRequest. + * Use `create(UpdateEnvironmentVariablesRequestSchema)` to create a new message. + */ +export const UpdateEnvironmentVariablesRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 486); + +/** + * @generated from message agent.v1.UpdateEnvironmentVariablesResponse + */ +export type UpdateEnvironmentVariablesResponse = Message<"agent.v1.UpdateEnvironmentVariablesResponse"> & { + /** + * @generated from field: uint32 applied = 1; + */ + applied: number; + + /** + * @generated from field: uint32 removed = 2; + */ + removed: number; +}; + +/** + * Describes the message agent.v1.UpdateEnvironmentVariablesResponse. + * Use `create(UpdateEnvironmentVariablesResponseSchema)` to create a new message. + */ +export const UpdateEnvironmentVariablesResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_agent, 487); + +/** + * Check if an error is caused by the client disconnecting (e.g., due to timeout or abort). This includes errors like ERR_STREAM_DESTROYED which occur when the HTTP response stream is closed by the client while the server is still writing to it. function isClientDisconnectError(error) { if (!(error instanceof Error)) { return false; const code = error.code; return (code === "ERR_STREAM_DESTROYED" || code === "ERR_STREAM_PREMATURE_CLOSE" || code === "ECONNRESET" || code === "EPIPE"); ;// ../proto/dist/generated/aiserver/v1/mcp_pb.js // @ts-nocheck + * + * @generated from message agent.v1.McpOAuthStoredData + */ +export type McpOAuthStoredData = Message<"agent.v1.McpOAuthStoredData"> & { + /** + * @generated from field: string refresh_token = 1; + */ + refreshToken: string; + + /** + * @generated from field: string client_id = 2; + */ + clientId: string; + + /** + * @generated from field: optional string client_secret = 3; + */ + clientSecret?: string; + + /** + * @generated from field: repeated string redirect_uris = 4; + */ + redirectUris: string[]; +}; + +/** + * Describes the message agent.v1.McpOAuthStoredData. + * Use `create(McpOAuthStoredDataSchema)` to create a new message. + */ +export const McpOAuthStoredDataSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 488); + +/** + * @generated from message agent.v1.Frame + */ +export type Frame = Message<"agent.v1.Frame"> & { + /** + * Correlation ID + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * RPC method (e.g., "/agent.v1.ControlService/Ping") + * + * @generated from field: string method = 2; + */ + method: string; + + /** + * Serialized payload + * + * @generated from field: bytes data = 3; + */ + data: Uint8Array; + + /** + * @generated from field: int32 kind = 4; + */ + kind: number; + + /** + * Error message (kind == ERROR) + * + * @generated from field: string error = 5; + */ + error: string; +}; + +/** + * Describes the message agent.v1.Frame. + * Use `create(FrameSchema)` to create a new message. + */ +export const FrameSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 489); + +/** + * var Frame_Kind; (function (Frame_Kind) { Frame_Kind[Frame_Kind["UNSPECIFIED"] = 0] = "UNSPECIFIED"; Frame_Kind[Frame_Kind["REQUEST"] = 1] = "REQUEST"; Frame_Kind[Frame_Kind["RESPONSE"] = 2] = "RESPONSE"; Frame_Kind[Frame_Kind["ERROR"] = 3] = "ERROR"; })(Frame_Kind || (Frame_Kind = {})); // Retrieve enum metadata with: proto3.getEnumType(Frame_Kind) proto3/* int32 *\/.C.util.setEnumType(Frame_Kind, "agent.v1.Frame.Kind", [ { no: 0, name: "KIND_UNSPECIFIED" }, { no: 1, name: "KIND_REQUEST" }, { no: 2, name: "KIND_RESPONSE" }, { no: 3, name: "KIND_ERROR" }, ]); + * + * @generated from message agent.v1.Empty + */ +export type Empty = Message<"agent.v1.Empty"> & {}; + +/** + * Describes the message agent.v1.Empty. + * Use `create(EmptySchema)` to create a new message. + */ +export const EmptySchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 490); + +/** + * @generated from message agent.v1.BidiRequestId + */ +export type BidiRequestId = Message<"agent.v1.BidiRequestId"> & { + /** + * @generated from field: string request_id = 1; + */ + requestId: string; +}; + +/** + * Describes the message agent.v1.BidiRequestId. + * Use `create(BidiRequestIdSchema)` to create a new message. + */ +export const BidiRequestIdSchema: GenMessage = /*@__PURE__*/ messageDesc(file_agent, 491); + +/** + * @generated from enum agent.v1.AppliedAgentChange_ChangeType + */ +export enum AppliedAgentChange_ChangeType { + /** + * @generated from enum value: CHANGE_TYPE_UNSPECIFIED = 0; + */ + CHANGE_TYPE_UNSPECIFIED = 0, + + /** + * @generated from enum value: CHANGE_TYPE_CREATED = 1; + */ + CHANGE_TYPE_CREATED = 1, + + /** + * @generated from enum value: CHANGE_TYPE_MODIFIED = 2; + */ + CHANGE_TYPE_MODIFIED = 2, + + /** + * @generated from enum value: CHANGE_TYPE_DELETED = 3; + */ + CHANGE_TYPE_DELETED = 3, +} + +/** + * Describes the enum agent.v1.AppliedAgentChange_ChangeType. + */ +export const AppliedAgentChange_ChangeTypeSchema: GenEnum = + /*@__PURE__*/ + enumDesc(file_agent, 0); + +/** + * @generated from enum agent.v1.MouseButton + */ +export enum MouseButton { + /** + * @generated from enum value: MOUSE_BUTTON_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: MOUSE_BUTTON_LEFT = 1; + */ + LEFT = 1, + + /** + * @generated from enum value: MOUSE_BUTTON_RIGHT = 2; + */ + RIGHT = 2, + + /** + * @generated from enum value: MOUSE_BUTTON_MIDDLE = 3; + */ + MIDDLE = 3, + + /** + * @generated from enum value: MOUSE_BUTTON_BACK = 4; + */ + BACK = 4, + + /** + * @generated from enum value: MOUSE_BUTTON_FORWARD = 5; + */ + FORWARD = 5, +} + +/** + * Describes the enum agent.v1.MouseButton. + */ +export const MouseButtonSchema: GenEnum = /*@__PURE__*/ enumDesc(file_agent, 1); + +/** + * @generated from enum agent.v1.ScrollDirection + */ +export enum ScrollDirection { + /** + * @generated from enum value: SCROLL_DIRECTION_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: SCROLL_DIRECTION_UP = 1; + */ + UP = 1, + + /** + * @generated from enum value: SCROLL_DIRECTION_DOWN = 2; + */ + DOWN = 2, + + /** + * @generated from enum value: SCROLL_DIRECTION_LEFT = 3; + */ + LEFT = 3, + + /** + * @generated from enum value: SCROLL_DIRECTION_RIGHT = 4; + */ + RIGHT = 4, +} + +/** + * Describes the enum agent.v1.ScrollDirection. + */ +export const ScrollDirectionSchema: GenEnum = /*@__PURE__*/ enumDesc(file_agent, 2); + +/** + * @generated from enum agent.v1.CursorRuleSource + */ +export enum CursorRuleSource { + /** + * @generated from enum value: CURSOR_RULE_SOURCE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: CURSOR_RULE_SOURCE_TEAM = 1; + */ + TEAM = 1, + + /** + * @generated from enum value: CURSOR_RULE_SOURCE_USER = 2; + */ + USER = 2, +} + +/** + * Describes the enum agent.v1.CursorRuleSource. + */ +export const CursorRuleSourceSchema: GenEnum = /*@__PURE__*/ enumDesc(file_agent, 3); + +/** + * @generated from enum agent.v1.DiagnosticSeverity + */ +export enum DiagnosticSeverity { + /** + * @generated from enum value: DIAGNOSTIC_SEVERITY_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: DIAGNOSTIC_SEVERITY_ERROR = 1; + */ + ERROR = 1, + + /** + * @generated from enum value: DIAGNOSTIC_SEVERITY_WARNING = 2; + */ + WARNING = 2, + + /** + * @generated from enum value: DIAGNOSTIC_SEVERITY_INFORMATION = 3; + */ + INFORMATION = 3, + + /** + * @generated from enum value: DIAGNOSTIC_SEVERITY_HINT = 4; + */ + HINT = 4, +} + +/** + * Describes the enum agent.v1.DiagnosticSeverity. + */ +export const DiagnosticSeveritySchema: GenEnum = /*@__PURE__*/ enumDesc(file_agent, 4); + +/** + * @generated from enum agent.v1.RecordingMode + */ +export enum RecordingMode { + /** + * @generated from enum value: RECORDING_MODE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: RECORDING_MODE_START_RECORDING = 1; + */ + START_RECORDING = 1, + + /** + * @generated from enum value: RECORDING_MODE_SAVE_RECORDING = 2; + */ + SAVE_RECORDING = 2, + + /** + * @generated from enum value: RECORDING_MODE_DISCARD_RECORDING = 3; + */ + DISCARD_RECORDING = 3, +} + +/** + * Describes the enum agent.v1.RecordingMode. + */ +export const RecordingModeSchema: GenEnum = /*@__PURE__*/ enumDesc(file_agent, 5); + +/** + * @generated from enum agent.v1.RequestedFilePathRejectedReason + */ +export enum RequestedFilePathRejectedReason { + /** + * @generated from enum value: REQUESTED_FILE_PATH_REJECTED_REASON_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: REQUESTED_FILE_PATH_REJECTED_REASON_SLASHES_NOT_ALLOWED = 1; + */ + SLASHES_NOT_ALLOWED = 1, +} + +/** + * Describes the enum agent.v1.RequestedFilePathRejectedReason. + */ +export const RequestedFilePathRejectedReasonSchema: GenEnum = + /*@__PURE__*/ + enumDesc(file_agent, 6); + +/** + * @generated from enum agent.v1.PackageType + */ +export enum PackageType { + /** + * @generated from enum value: PACKAGE_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: PACKAGE_TYPE_CURSOR_PROJECT = 1; + */ + CURSOR_PROJECT = 1, + + /** + * @generated from enum value: PACKAGE_TYPE_CURSOR_PERSONAL = 2; + */ + CURSOR_PERSONAL = 2, + + /** + * @generated from enum value: PACKAGE_TYPE_CLAUDE_SKILL = 3; + */ + CLAUDE_SKILL = 3, + + /** + * @generated from enum value: PACKAGE_TYPE_CLAUDE_PLUGIN = 4; + */ + CLAUDE_PLUGIN = 4, +} + +/** + * Describes the enum agent.v1.PackageType. + */ +export const PackageTypeSchema: GenEnum = /*@__PURE__*/ enumDesc(file_agent, 7); + +/** + * @generated from enum agent.v1.SandboxPolicy_Type + */ +export enum SandboxPolicy_Type { + /** + * @generated from enum value: TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED = 0, + + /** + * @generated from enum value: TYPE_INSECURE_NONE = 1; + */ + TYPE_INSECURE_NONE = 1, + + /** + * @generated from enum value: TYPE_WORKSPACE_READWRITE = 2; + */ + TYPE_WORKSPACE_READWRITE = 2, + + /** + * @generated from enum value: TYPE_WORKSPACE_READONLY = 3; + */ + TYPE_WORKSPACE_READONLY = 3, +} + +/** + * Describes the enum agent.v1.SandboxPolicy_Type. + */ +export const SandboxPolicy_TypeSchema: GenEnum = /*@__PURE__*/ enumDesc(file_agent, 8); + +/** + * @generated from enum agent.v1.TimeoutBehavior + */ +export enum TimeoutBehavior { + /** + * @generated from enum value: TIMEOUT_BEHAVIOR_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: TIMEOUT_BEHAVIOR_CANCEL = 1; + */ + CANCEL = 1, + + /** + * @generated from enum value: TIMEOUT_BEHAVIOR_BACKGROUND = 2; + */ + BACKGROUND = 2, +} + +/** + * Describes the enum agent.v1.TimeoutBehavior. + */ +export const TimeoutBehaviorSchema: GenEnum = /*@__PURE__*/ enumDesc(file_agent, 9); + +/** + * @generated from enum agent.v1.ShellAbortReason + */ +export enum ShellAbortReason { + /** + * @generated from enum value: SHELL_ABORT_REASON_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: SHELL_ABORT_REASON_USER_ABORT = 1; + */ + USER_ABORT = 1, + + /** + * @generated from enum value: SHELL_ABORT_REASON_TIMEOUT = 2; + */ + TIMEOUT = 2, +} + +/** + * Describes the enum agent.v1.ShellAbortReason. + */ +export const ShellAbortReasonSchema: GenEnum = /*@__PURE__*/ enumDesc(file_agent, 10); + +/** + * @generated from enum agent.v1.CustomSubagentPermissionMode + */ +export enum CustomSubagentPermissionMode { + /** + * @generated from enum value: CUSTOM_SUBAGENT_PERMISSION_MODE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: CUSTOM_SUBAGENT_PERMISSION_MODE_DEFAULT = 1; + */ + DEFAULT = 1, + + /** + * @generated from enum value: CUSTOM_SUBAGENT_PERMISSION_MODE_READONLY = 2; + */ + READONLY = 2, +} + +/** + * Describes the enum agent.v1.CustomSubagentPermissionMode. + */ +export const CustomSubagentPermissionModeSchema: GenEnum = + /*@__PURE__*/ + enumDesc(file_agent, 11); + +/** + * @generated from enum agent.v1.TodoStatus + */ +export enum TodoStatus { + /** + * @generated from enum value: TODO_STATUS_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: TODO_STATUS_PENDING = 1; + */ + PENDING = 1, + + /** + * @generated from enum value: TODO_STATUS_IN_PROGRESS = 2; + */ + IN_PROGRESS = 2, + + /** + * @generated from enum value: TODO_STATUS_COMPLETED = 3; + */ + COMPLETED = 3, + + /** + * @generated from enum value: TODO_STATUS_CANCELLED = 4; + */ + CANCELLED = 4, +} + +/** + * Describes the enum agent.v1.TodoStatus. + */ +export const TodoStatusSchema: GenEnum = /*@__PURE__*/ enumDesc(file_agent, 12); + +/** + * @generated from enum agent.v1.ClientOS + */ +export enum ClientOS { + /** + * @generated from enum value: CLIENT_OS_UNSPECIFIED = 0; + */ + CLIENT_OS_UNSPECIFIED = 0, + + /** + * @generated from enum value: CLIENT_OS_WINDOWS = 1; + */ + CLIENT_OS_WINDOWS = 1, + + /** + * @generated from enum value: CLIENT_OS_MACOS = 2; + */ + CLIENT_OS_MACOS = 2, + + /** + * @generated from enum value: CLIENT_OS_LINUX = 3; + */ + CLIENT_OS_LINUX = 3, +} + +/** + * Describes the enum agent.v1.ClientOS. + */ +export const ClientOSSchema: GenEnum = /*@__PURE__*/ enumDesc(file_agent, 13); + +/** + * @generated from enum agent.v1.ArtifactUploadDispatchStatus + */ +export enum ArtifactUploadDispatchStatus { + /** + * @generated from enum value: ARTIFACT_UPLOAD_DISPATCH_STATUS_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: ARTIFACT_UPLOAD_DISPATCH_STATUS_ACCEPTED = 1; + */ + ACCEPTED = 1, + + /** + * @generated from enum value: ARTIFACT_UPLOAD_DISPATCH_STATUS_REJECTED = 2; + */ + REJECTED = 2, + + /** + * @generated from enum value: ARTIFACT_UPLOAD_DISPATCH_STATUS_SKIPPED_ALREADY_IN_PROGRESS = 3; + */ + SKIPPED_ALREADY_IN_PROGRESS = 3, +} + +/** + * Describes the enum agent.v1.ArtifactUploadDispatchStatus. + */ +export const ArtifactUploadDispatchStatusSchema: GenEnum = + /*@__PURE__*/ + enumDesc(file_agent, 14); + +/** + * @generated from enum agent.v1.Frame_Kind + */ +export enum Frame_Kind { + /** + * @generated from enum value: KIND_UNSPECIFIED = 0; + */ + KIND_UNSPECIFIED = 0, + + /** + * @generated from enum value: KIND_REQUEST = 1; + */ + KIND_REQUEST = 1, + + /** + * @generated from enum value: KIND_RESPONSE = 2; + */ + KIND_RESPONSE = 2, + + /** + * @generated from enum value: KIND_ERROR = 3; + */ + KIND_ERROR = 3, +} + +/** + * Describes the enum agent.v1.Frame_Kind. + */ +export const Frame_KindSchema: GenEnum = /*@__PURE__*/ enumDesc(file_agent, 15); + +/** + * @generated from enum agent.v1.BugbotDeeplinkEventKind + */ +export enum BugbotDeeplinkEventKind { + /** + * @generated from enum value: BUGBOT_DEEPLINK_EVENT_KIND_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: BUGBOT_DEEPLINK_EVENT_KIND_CLICKED = 1; + */ + CLICKED = 1, + + /** + * @generated from enum value: BUGBOT_DEEPLINK_EVENT_KIND_HANDLED_DIALOG_SHOWN = 2; + */ + HANDLED_DIALOG_SHOWN = 2, + + /** + * @generated from enum value: BUGBOT_DEEPLINK_EVENT_KIND_HANDLED_CHAT_CREATED = 3; + */ + HANDLED_CHAT_CREATED = 3, + + /** + * @generated from enum value: BUGBOT_DEEPLINK_EVENT_KIND_ERROR = 4; + */ + ERROR = 4, + + /** + * @generated from enum value: BUGBOT_DEEPLINK_EVENT_KIND_HANDLED_FIX_IN_WEB = 5; + */ + HANDLED_FIX_IN_WEB = 5, +} + +/** + * Describes the enum agent.v1.BugbotDeeplinkEventKind. + */ +export const BugbotDeeplinkEventKindSchema: GenEnum = /*@__PURE__*/ enumDesc(file_agent, 16); + +/** + * Agent Service with bidirectional streaming + * + * @generated from service agent.v1.AgentService + */ +export const AgentService: GenService<{ + /** + * @generated from rpc agent.v1.AgentService.Run + */ + run: { + methodKind: "unary"; + input: typeof AgentClientMessageSchema; + output: typeof AgentServerMessageSchema; + }; + /** + * @generated from rpc agent.v1.AgentService.RunSSE + */ + runSSE: { + methodKind: "unary"; + input: typeof BidiRequestIdSchema; + output: typeof AgentServerMessageSchema; + }; + /** + * Generate a very short, succinct agent name from the provided user message. + * + * @generated from rpc agent.v1.AgentService.NameAgent + */ + nameAgent: { + methodKind: "unary"; + input: typeof NameAgentRequestSchema; + output: typeof NameAgentResponseSchema; + }; + /** + * @generated from rpc agent.v1.AgentService.GetUsableModels + */ + getUsableModels: { + methodKind: "unary"; + input: typeof GetUsableModelsRequestSchema; + output: typeof GetUsableModelsResponseSchema; + }; + /** + * @generated from rpc agent.v1.AgentService.GetDefaultModelForCli + */ + getDefaultModelForCli: { + methodKind: "unary"; + input: typeof GetDefaultModelForCliRequestSchema; + output: typeof GetDefaultModelForCliResponseSchema; + }; + /** + * Internal endpoint: returns all allowed model intents for devs + * + * @generated from rpc agent.v1.AgentService.GetAllowedModelIntents + */ + getAllowedModelIntents: { + methodKind: "unary"; + input: typeof GetAllowedModelIntentsRequestSchema; + output: typeof GetAllowedModelIntentsResponseSchema; + }; +}> = /*@__PURE__*/ serviceDesc(file_agent, 0); + +/** + * @generated from service agent.v1.ControlService + */ +export const ControlService: GenService<{ + /** + * Spawn + * File read / write + * + * @generated from rpc agent.v1.ControlService.ReadTextFile + */ + readTextFile: { + methodKind: "unary"; + input: typeof ReadTextFileRequestSchema; + output: typeof ReadTextFileResponseSchema; + }; + /** + * @generated from rpc agent.v1.ControlService.WriteTextFile + */ + writeTextFile: { + methodKind: "unary"; + input: typeof WriteTextFileRequestSchema; + output: typeof WriteTextFileResponseSchema; + }; + /** + * Binary file read / write + * + * @generated from rpc agent.v1.ControlService.ReadBinaryFile + */ + readBinaryFile: { + methodKind: "unary"; + input: typeof ReadBinaryFileRequestSchema; + output: typeof ReadBinaryFileResponseSchema; + }; + /** + * @generated from rpc agent.v1.ControlService.WriteBinaryFile + */ + writeBinaryFile: { + methodKind: "unary"; + input: typeof WriteBinaryFileRequestSchema; + output: typeof WriteBinaryFileResponseSchema; + }; + /** + * Git + * + * @generated from rpc agent.v1.ControlService.GetWorkspaceChangesHash + */ + getWorkspaceChangesHash: { + methodKind: "unary"; + input: typeof GetWorkspaceChangesHashRequestSchema; + output: typeof GetWorkspaceChangesHashResponseSchema; + }; + /** + * @generated from rpc agent.v1.ControlService.RefreshGithubAccessToken + */ + refreshGithubAccessToken: { + methodKind: "unary"; + input: typeof RefreshGithubAccessTokenRequestSchema; + output: typeof RefreshGithubAccessTokenResponseSchema; + }; + /** + * Remote access + * + * @generated from rpc agent.v1.ControlService.WarmRemoteAccessServer + */ + warmRemoteAccessServer: { + methodKind: "unary"; + input: typeof WarmRemoteAccessServerRequestSchema; + output: typeof WarmRemoteAccessServerResponseSchema; + }; + /** + * Artifact uploads + * + * @generated from rpc agent.v1.ControlService.ListArtifacts + */ + listArtifacts: { + methodKind: "unary"; + input: typeof ListArtifactsRequestSchema; + output: typeof ListArtifactsResponseSchema; + }; + /** + * @generated from rpc agent.v1.ControlService.UploadArtifacts + */ + uploadArtifacts: { + methodKind: "unary"; + input: typeof UploadArtifactsRequestSchema; + output: typeof UploadArtifactsResponseSchema; + }; + /** + * @generated from rpc agent.v1.ControlService.GetMcpRefreshTokens + */ + getMcpRefreshTokens: { + methodKind: "unary"; + input: typeof GetMcpRefreshTokensRequestSchema; + output: typeof GetMcpRefreshTokensResponseSchema; + }; + /** + * Update the exec-daemon's environment variables for subsequent process spawns. This does NOT affect already-running processes. + * + * @generated from rpc agent.v1.ControlService.UpdateEnvironmentVariables + */ + updateEnvironmentVariables: { + methodKind: "unary"; + input: typeof UpdateEnvironmentVariablesRequestSchema; + output: typeof UpdateEnvironmentVariablesResponseSchema; + }; +}> = /*@__PURE__*/ serviceDesc(file_agent, 1); + +/** + * Agent Service with unary RPC + * + * @generated from service agent.v1.ExecService + */ +export const ExecService: GenService<{}> = /*@__PURE__*/ serviceDesc(file_agent, 2); + +/** + * @generated from service agent.v1.PrivateWorkerBridgeExternalService + */ +export const PrivateWorkerBridgeExternalService: GenService<{ + /** + * @generated from rpc agent.v1.PrivateWorkerBridgeExternalService.Connect + */ + connect: { + methodKind: "unary"; + input: typeof FrameSchema; + output: typeof FrameSchema; + }; +}> = /*@__PURE__*/ serviceDesc(file_agent, 3); + +/** + * LifecycleService is exposed by the bridge *client*, in addition to ExecService (tool calls) and ControlService (control operations "within the daemon"). It operates at a similar abstraction level as AnyrunService: it represents operations similar to creating a VM, checking out a repository, etc. + * + * @generated from service agent.v1.LifecycleService + */ +export const LifecycleService: GenService<{ + /** + * Resets a long-lived worker + * + * @generated from rpc agent.v1.LifecycleService.ResetInstance + */ + resetInstance: { + methodKind: "unary"; + input: typeof EmptySchema; + output: typeof EmptySchema; + }; + /** + * Asks worker to exit(0) so that a new worker can take his place + * + * @generated from rpc agent.v1.LifecycleService.RenewInstance + */ + renewInstance: { + methodKind: "unary"; + input: typeof EmptySchema; + output: typeof EmptySchema; + }; +}> = /*@__PURE__*/ serviceDesc(file_agent, 4); diff --git a/packages/ai/src/providers/cursor/proto/agent.proto b/packages/ai/src/providers/cursor/proto/agent.proto new file mode 100644 index 000000000..766ee0c94 --- /dev/null +++ b/packages/ai/src/providers/cursor/proto/agent.proto @@ -0,0 +1,3526 @@ +syntax = "proto3"; + +package agent.v1; + +enum AppliedAgentChange_ChangeType { + CHANGE_TYPE_UNSPECIFIED = 0; + CHANGE_TYPE_CREATED = 1; + CHANGE_TYPE_MODIFIED = 2; + CHANGE_TYPE_DELETED = 3; +} + +enum MouseButton { + MOUSE_BUTTON_UNSPECIFIED = 0; + MOUSE_BUTTON_LEFT = 1; + MOUSE_BUTTON_RIGHT = 2; + MOUSE_BUTTON_MIDDLE = 3; + MOUSE_BUTTON_BACK = 4; + MOUSE_BUTTON_FORWARD = 5; +} + +enum ScrollDirection { + SCROLL_DIRECTION_UNSPECIFIED = 0; + SCROLL_DIRECTION_UP = 1; + SCROLL_DIRECTION_DOWN = 2; + SCROLL_DIRECTION_LEFT = 3; + SCROLL_DIRECTION_RIGHT = 4; +} + +enum CursorRuleSource { + CURSOR_RULE_SOURCE_UNSPECIFIED = 0; + CURSOR_RULE_SOURCE_TEAM = 1; + CURSOR_RULE_SOURCE_USER = 2; +} + +enum DiagnosticSeverity { + DIAGNOSTIC_SEVERITY_UNSPECIFIED = 0; + DIAGNOSTIC_SEVERITY_ERROR = 1; + DIAGNOSTIC_SEVERITY_WARNING = 2; + DIAGNOSTIC_SEVERITY_INFORMATION = 3; + DIAGNOSTIC_SEVERITY_HINT = 4; +} + +enum RecordingMode { + RECORDING_MODE_UNSPECIFIED = 0; + RECORDING_MODE_START_RECORDING = 1; + RECORDING_MODE_SAVE_RECORDING = 2; + RECORDING_MODE_DISCARD_RECORDING = 3; +} + +enum RequestedFilePathRejectedReason { + REQUESTED_FILE_PATH_REJECTED_REASON_UNSPECIFIED = 0; + REQUESTED_FILE_PATH_REJECTED_REASON_SLASHES_NOT_ALLOWED = 1; +} + +enum PackageType { + PACKAGE_TYPE_UNSPECIFIED = 0; + PACKAGE_TYPE_CURSOR_PROJECT = 1; + PACKAGE_TYPE_CURSOR_PERSONAL = 2; + PACKAGE_TYPE_CLAUDE_SKILL = 3; + PACKAGE_TYPE_CLAUDE_PLUGIN = 4; +} + +enum SandboxPolicy_Type { + TYPE_UNSPECIFIED = 0; + TYPE_INSECURE_NONE = 1; + TYPE_WORKSPACE_READWRITE = 2; + TYPE_WORKSPACE_READONLY = 3; +} + +enum TimeoutBehavior { + TIMEOUT_BEHAVIOR_UNSPECIFIED = 0; + TIMEOUT_BEHAVIOR_CANCEL = 1; + TIMEOUT_BEHAVIOR_BACKGROUND = 2; +} + +enum ShellAbortReason { + SHELL_ABORT_REASON_UNSPECIFIED = 0; + SHELL_ABORT_REASON_USER_ABORT = 1; + SHELL_ABORT_REASON_TIMEOUT = 2; +} + +enum CustomSubagentPermissionMode { + CUSTOM_SUBAGENT_PERMISSION_MODE_UNSPECIFIED = 0; + CUSTOM_SUBAGENT_PERMISSION_MODE_DEFAULT = 1; + CUSTOM_SUBAGENT_PERMISSION_MODE_READONLY = 2; +} + +enum TodoStatus { + TODO_STATUS_UNSPECIFIED = 0; + TODO_STATUS_PENDING = 1; + TODO_STATUS_IN_PROGRESS = 2; + TODO_STATUS_COMPLETED = 3; + TODO_STATUS_CANCELLED = 4; +} + +enum ClientOS { + CLIENT_OS_UNSPECIFIED = 0; + CLIENT_OS_WINDOWS = 1; + CLIENT_OS_MACOS = 2; + CLIENT_OS_LINUX = 3; +} + +enum ArtifactUploadDispatchStatus { + ARTIFACT_UPLOAD_DISPATCH_STATUS_UNSPECIFIED = 0; + ARTIFACT_UPLOAD_DISPATCH_STATUS_ACCEPTED = 1; + ARTIFACT_UPLOAD_DISPATCH_STATUS_REJECTED = 2; + ARTIFACT_UPLOAD_DISPATCH_STATUS_SKIPPED_ALREADY_IN_PROGRESS = 3; +} + +enum Frame_Kind { + KIND_UNSPECIFIED = 0; + KIND_REQUEST = 1; + KIND_RESPONSE = 2; + KIND_ERROR = 3; +} + +enum BugbotDeeplinkEventKind { + BUGBOT_DEEPLINK_EVENT_KIND_UNSPECIFIED = 0; + BUGBOT_DEEPLINK_EVENT_KIND_CLICKED = 1; + BUGBOT_DEEPLINK_EVENT_KIND_HANDLED_DIALOG_SHOWN = 2; + BUGBOT_DEEPLINK_EVENT_KIND_HANDLED_CHAT_CREATED = 3; + BUGBOT_DEEPLINK_EVENT_KIND_ERROR = 4; + BUGBOT_DEEPLINK_EVENT_KIND_HANDLED_FIX_IN_WEB = 5; +} + +message GlobToolResult { + oneof result { + GlobToolSuccess success = 1; + GlobToolError error = 2; + } +} + +message GlobToolError { + string error = 1; +} + +// Only file results are needed for this tool +message GlobToolSuccess { + string pattern = 1; + string path = 2; + repeated string files = 3; + int32 total_files = 4; + bool client_truncated = 5; + bool ripgrep_truncated = 6; +} + +message GlobToolCall { + bytes args = 1; + GlobToolResult result = 2; +} + +message ReadLintsToolCall { + ReadLintsToolArgs args = 1; + ReadLintsToolResult result = 2; +} + +message ReadLintsToolArgs { + repeated string paths = 1; +} + +message ReadLintsToolResult { + oneof result { + ReadLintsToolSuccess success = 1; + ReadLintsToolError error = 2; + } +} + +message ReadLintsToolSuccess { + repeated FileDiagnostics file_diagnostics = 1; + int32 total_files = 2; + int32 total_diagnostics = 3; +} + +message FileDiagnostics { + string path = 1; + repeated DiagnosticItem diagnostics = 2; + int32 diagnostics_count = 3; +} + +message DiagnosticItem { + DiagnosticSeverity severity = 1; + DiagnosticRange range = 2; + string message = 3; + string source = 4; + string code = 5; + bool is_stale = 6; +} + +message DiagnosticRange { + Position start = 1; + Position end = 2; +} + +message ReadLintsToolError { + string error_message = 1; +} + +message McpToolError { + string error = 1; +} + +// Result for MCP tool calls (separate from exec results) +message McpToolResult { + oneof result { + McpSuccess success = 1; + McpToolError error = 2; + McpRejected rejected = 3; + McpPermissionDenied permission_denied = 4; + } +} + +message McpToolCall { + McpArgs args = 1; + McpToolResult result = 2; +} + +message SemSearchToolCall { + SemSearchToolArgs args = 1; + SemSearchToolResult result = 2; +} + +message SemSearchToolArgs { + string query = 1; + repeated string target_directories = 2; + string explanation = 3; +} + +message SemSearchToolResult { + oneof result { + SemSearchToolSuccess success = 1; + SemSearchToolError error = 2; + } +} + +message SemSearchToolSuccess { + string results = 1; + repeated bytes code_results = 2; +} + +message SemSearchToolError { + string error_message = 1; +} + +message ListMcpResourcesToolCall { + ListMcpResourcesExecArgs args = 1; + ListMcpResourcesExecResult result = 2; +} + +message ReadMcpResourceToolCall { + ReadMcpResourceExecArgs args = 1; + ReadMcpResourceExecResult result = 2; +} + +message FetchToolCall { + FetchArgs args = 1; + FetchResult result = 2; +} + +message RecordScreenToolCall { + RecordScreenArgs args = 1; + RecordScreenResult result = 2; +} + +message WriteShellStdinToolCall { + WriteShellStdinArgs args = 1; + WriteShellStdinResult result = 2; +} + +message ReflectArgs { + string unexpected_action_outcomes = 1; + string relevant_instructions = 2; + string scenario_analysis = 3; + string critical_synthesis = 4; + string next_steps = 5; + string tool_call_id = 6; +} + +message ReflectResult { + oneof result { + ReflectSuccess success = 1; + ReflectError error = 2; + } +} + +message ReflectSuccess { +} + +message ReflectError { + string error = 1; +} + +message ReflectToolCall { + ReflectArgs args = 1; + ReflectResult result = 2; +} + +message StartGrindExecutionArgs { + // Optional explanation for why the agent is requesting to begin executing. + optional string explanation = 1; + string tool_call_id = 2; +} + +message StartGrindExecutionResult { + oneof result { + StartGrindExecutionSuccess success = 1; + StartGrindExecutionError error = 2; + } +} + +message StartGrindExecutionSuccess { +} + +message StartGrindExecutionError { + string error = 1; +} + +message StartGrindExecutionToolCall { + StartGrindExecutionArgs args = 1; + StartGrindExecutionResult result = 2; +} + +message StartGrindPlanningArgs { + // Optional explanation for why the agent is requesting to return to planning. + optional string explanation = 1; + string tool_call_id = 2; +} + +message StartGrindPlanningResult { + oneof result { + StartGrindPlanningSuccess success = 1; + StartGrindPlanningError error = 2; + } +} + +message StartGrindPlanningSuccess { +} + +message StartGrindPlanningError { + string error = 1; +} + +message StartGrindPlanningToolCall { + StartGrindPlanningArgs args = 1; + StartGrindPlanningResult result = 2; +} + +// var AgentMode; (function (AgentMode) { AgentMode[AgentMode["UNSPECIFIED"] = 0] = "UNSPECIFIED"; AgentMode[AgentMode["AGENT"] = 1] = "AGENT"; AgentMode[AgentMode["ASK"] = 2] = "ASK"; AgentMode[AgentMode["PLAN"] = 3] = "PLAN"; AgentMode[AgentMode["DEBUG"] = 4] = "DEBUG"; AgentMode[AgentMode["TRIAGE"] = 5] = "TRIAGE"; AgentMode[AgentMode["PROJECT"] = 6] = "PROJECT"; })(AgentMode || (AgentMode = {})); // Retrieve enum metadata with: proto3.getEnumType(AgentMode) proto3/* int32 */.C.util.setEnumType(AgentMode, "agent.v1.AgentMode", [ { no: 0, name: "AGENT_MODE_UNSPECIFIED" }, { no: 1, name: "AGENT_MODE_AGENT" }, { no: 2, name: "AGENT_MODE_ASK" }, { no: 3, name: "AGENT_MODE_PLAN" }, { no: 4, name: "AGENT_MODE_DEBUG" }, { no: 5, name: "AGENT_MODE_TRIAGE" }, { no: 6, name: "AGENT_MODE_PROJECT" }, ]); +message TaskArgs { + string description = 1; + string prompt = 2; + SubagentType subagent_type = 3; + optional string model = 4; + optional string resume = 5; +} + +message TaskSuccess { + repeated ConversationStep conversation_steps = 1; + optional string agent_id = 2; + bool is_background = 3; + optional uint64 duration_ms = 4; +} + +message TaskError { + string error = 1; +} + +message TaskResult { + oneof result { + TaskSuccess success = 1; + TaskError error = 2; + } +} + +message TaskToolCall { + TaskArgs args = 1; + TaskResult result = 2; +} + +message TaskToolCallDelta { + InteractionUpdate interaction_update = 1; +} + +// Tool messages (from tool.proto) +message ToolCall { + oneof tool { + ShellToolCall shell_tool_call = 1; + DeleteToolCall delete_tool_call = 3; + GlobToolCall glob_tool_call = 4; + GrepToolCall grep_tool_call = 5; + ReadToolCall read_tool_call = 8; + UpdateTodosToolCall update_todos_tool_call = 9; + ReadTodosToolCall read_todos_tool_call = 10; + EditToolCall edit_tool_call = 12; + LsToolCall ls_tool_call = 13; + ReadLintsToolCall read_lints_tool_call = 14; + McpToolCall mcp_tool_call = 15; + SemSearchToolCall sem_search_tool_call = 16; + CreatePlanToolCall create_plan_tool_call = 17; + WebSearchToolCall web_search_tool_call = 18; + TaskToolCall task_tool_call = 19; + ListMcpResourcesToolCall list_mcp_resources_tool_call = 20; + ReadMcpResourceToolCall read_mcp_resource_tool_call = 21; + ApplyAgentDiffToolCall apply_agent_diff_tool_call = 22; + AskQuestionToolCall ask_question_tool_call = 23; + FetchToolCall fetch_tool_call = 24; + SwitchModeToolCall switch_mode_tool_call = 25; + ExaSearchToolCall exa_search_tool_call = 26; + ExaFetchToolCall exa_fetch_tool_call = 27; + GenerateImageToolCall generate_image_tool_call = 28; + RecordScreenToolCall record_screen_tool_call = 29; + ComputerUseToolCall computer_use_tool_call = 30; + WriteShellStdinToolCall write_shell_stdin_tool_call = 31; + ReflectToolCall reflect_tool_call = 32; + SetupVmEnvironmentToolCall setup_vm_environment_tool_call = 33; + TruncatedToolCall truncated_tool_call = 34; + StartGrindExecutionToolCall start_grind_execution_tool_call = 35; + StartGrindPlanningToolCall start_grind_planning_tool_call = 36; + } +} + +message TruncatedToolCallArgs { +} + +message TruncatedToolCallSuccess { +} + +message TruncatedToolCallError { + string error = 1; +} + +message TruncatedToolCallResult { + oneof result { + TruncatedToolCallSuccess success = 1; + TruncatedToolCallError error = 2; + } +} + +// Placeholder for tool calls that were truncated due to size limits. +message TruncatedToolCall { + bytes original_step_blob_id = 1; + // unused, just matches the discriminated union for other tool calls + TruncatedToolCallArgs args = 2; + TruncatedToolCallResult result = 3; +} + +message ToolCallDelta { + oneof delta { + ShellToolCallDelta shell_tool_call_delta = 1; + TaskToolCallDelta task_tool_call_delta = 2; + EditToolCallDelta edit_tool_call_delta = 3; + } +} + +message ConversationStep { + oneof message { + AssistantMessage assistant_message = 1; + ToolCall tool_call = 2; + ThinkingMessage thinking_message = 3; + } +} + +message ConversationAction { + oneof action { + UserMessageAction user_message_action = 1; + ResumeAction resume_action = 2; + CancelAction cancel_action = 3; + SummarizeAction summarize_action = 4; + ShellCommandAction shell_command_action = 5; + StartPlanAction start_plan_action = 6; + ExecutePlanAction execute_plan_action = 7; + AsyncAskQuestionCompletionAction async_ask_question_completion_action = 8; + } +} + +message UserMessageAction { + UserMessage user_message = 1; + RequestContext request_context = 2; + optional bool send_to_interaction_listener = 3; +} + +message CancelAction { +} + +message ResumeAction { + RequestContext request_context = 2; +} + +message AsyncAskQuestionCompletionAction { + // Contains the original tool call ID and the result from the user + string original_tool_call_id = 1; + AskQuestionArgs original_args = 2; + AskQuestionResult result = 3; +} + +message SummarizeAction { +} + +message ShellCommandAction { + ShellCommand shell_command = 1; + // unique identifier for preemptive exec attachment + string exec_id = 2; +} + +message StartPlanAction { + UserMessage user_message = 1; + RequestContext request_context = 2; + bool is_spec = 3; +} + +message ExecutePlanAction { + RequestContext request_context = 1; + optional ConversationPlan plan = 2; + // e.g., "cursor-plan://composerId/plan.md" + optional string plan_file_uri = 3; + // The actual plan content from the file + optional string plan_file_content = 4; +} + +message UserMessage { + string text = 1; + string message_id = 2; + optional SelectedContext selected_context = 3; + int32 mode = 4; + optional bool is_simulated_msg = 5; + optional string best_of_n_group_id = 6; + optional bool try_use_best_of_n_promotion = 7; + optional string rich_text = 8; +} + +message AssistantMessage { + string text = 1; +} + +message ThinkingMessage { + string text = 1; + uint32 duration_ms = 2; +} + +message ShellCommand { + string command = 1; +} + +message ShellOutput { + string stdout = 1; + string stderr = 2; + int32 exit_code = 3; +} + +message ConversationTurn { + oneof turn { + AgentConversationTurn agent_conversation_turn = 1; + ShellConversationTurn shell_conversation_turn = 2; + } +} + +message ConversationPlan { + string plan = 1; +} + +message ConversationTurnStructure { + oneof turn { + AgentConversationTurnStructure agent_conversation_turn = 1; + ShellConversationTurnStructure shell_conversation_turn = 2; + } +} + +message AgentConversationTurn { + UserMessage user_message = 1; + repeated ConversationStep steps = 2; + // The request ID associated with this turn, used for analytics tracking + optional string request_id = 3; +} + +message AgentConversationTurnStructure { + bytes user_message = 1; + repeated bytes steps = 2; + // The request ID associated with this turn, used for analytics tracking + optional string request_id = 3; +} + +message ShellConversationTurn { + ShellCommand shell_command = 1; + ShellOutput shell_output = 2; +} + +message ShellConversationTurnStructure { + bytes shell_command = 1; + bytes shell_output = 2; +} + +message ConversationSummary { + string summary = 1; +} + +message ConversationSummaryArchive { + repeated bytes summarized_messages = 1; + string summary = 2; + uint32 window_tail = 3; + bytes summary_message = 4; +} + +message ConversationTokenDetails { + uint32 used_tokens = 1; + uint32 max_tokens = 2; +} + +message FileState { + // Optional content. If not set or undefined, the file is considered deleted. + optional string content = 1; + // Optional initial content captured when the file was first tracked. If not set or undefined, the file did not exist when tracking began. + optional string initial_content = 2; +} + +message FileStateStructure { + // Optional content. If not set or undefined, the file is considered deleted. + optional bytes content = 1; + // Optional initial content captured when the file was first tracked. If not set or undefined, the file did not exist when tracking began. + optional bytes initial_content = 2; +} + +message StepTiming { + uint64 duration_ms = 1; + uint64 timestamp_ms = 2; +} + +message ConversationState { + repeated string root_prompt_messages_json = 1; + repeated ConversationTurn turns = 8; + repeated TodoItem todos = 3; + // Raw JSON stringified tool-call content parts awaiting execution + repeated string pending_tool_calls = 4; + ConversationTokenDetails token_details = 5; + // only for when the user explicitly asks for a summary through the summary action + optional ConversationSummary summary = 6; + optional ConversationPlan plan = 7; + optional ConversationSummaryArchive summary_archive = 9; + // Deprecated, use summary_archives instead @deprecated summaryArchive; + map file_states = 10; + repeated ConversationSummaryArchive summary_archives = 11; +} + +message SubagentPersistedState { + // The subagent's conversation state structure + ConversationStateStructure conversation_state = 1; + // Timestamp when this subagent was first created + uint64 created_timestamp_ms = 2; + // Timestamp when this subagent was last used (by task tool call) + uint64 last_used_timestamp_ms = 3; + // The subagent type (e.g., computerUse, custom with name) + SubagentType subagent_type = 4; +} + +message ConversationStateStructure { + repeated bytes turns_old = 2; + // @deprecated turnsOld = []; + repeated bytes root_prompt_messages_json = 1; + repeated bytes turns = 8; + repeated bytes todos = 3; + // Raw JSON stringified tool-call content parts awaiting execution + repeated string pending_tool_calls = 4; + ConversationTokenDetails token_details = 5; + // only for when the user explicitly asks for a summary through the summary action + optional bytes summary = 6; + optional bytes plan = 7; + repeated string previous_workspace_uris = 9; + // Current mode of the conversation + optional int32 mode = 10; + optional bytes summary_archive = 11; + map file_states = 12; + // Deprecated, use summary_archives instead @deprecated summaryArchive; Map of file paths to their latest content (stored as blob IDs in the KV store) Each blob contains a serialized FileState message @deprecated fileStates = {}; Map of file paths to their latest content (stored as FileStateStructure) + map file_states_v2 = 15; + repeated bytes summary_archives = 13; + repeated StepTiming turn_timings = 14; + // Subagent resume tracking Map of subagent ID to the persisted subagent state (stored inline) + map subagent_states = 16; + // Count of self-summaries generated for this conversation + uint32 self_summary_count = 17; + // Set of file paths that have been read during this conversation + repeated string read_paths = 18; +} + +message ThinkingDetails { +} + +message ApiKeyCredentials { + string api_key = 1; + // For OpenAI-compatible endpoints + optional string base_url = 2; +} + +message AzureCredentials { + string api_key = 1; + string base_url = 2; + string deployment = 3; +} + +message BedrockCredentials { + string access_key = 1; + string secret_key = 2; + string region = 3; + optional string session_token = 4; +} + +message ModelDetails { + string model_id = 1; + string display_model_id = 3; + string display_name = 4; + string display_name_short = 5; + repeated string aliases = 6; + optional ThinkingDetails thinking_details = 2; + optional bool max_mode = 7; + oneof credentials { + ApiKeyCredentials api_key_credentials = 8; + AzureCredentials azure_credentials = 9; + BedrockCredentials bedrock_credentials = 10; + } +} + +message RequestedModel { + string model_id = 1; + bool max_mode = 2; + repeated RequestedModel_ModelParameterbytes parameters = 3; + oneof credentials { + ApiKeyCredentials api_key_credentials = 4; + AzureCredentials azure_credentials = 5; + BedrockCredentials bedrock_credentials = 6; + } +} + +message RequestedModel_ModelParameterbytes { + string id = 1; + // All paramters are encoded as strings. For boolean parameters, the value is either "true" or "false". For enum parameters, the value is one of the values in the enum. + string value = 2; +} + +message AgentRunRequest { + ConversationStateStructure conversation_state = 1; + ConversationAction action = 2; + // TODO: Today we use model_details, but we are getting ready to deprecate that and use requested_model instead. + ModelDetails model_details = 3; + optional RequestedModel requested_model = 9; + McpTools mcp_tools = 4; + optional string conversation_id = 5; + optional McpFileSystemOptions mcp_file_system_options = 6; + // Deprecated, use the one in RequestContext message in request_context_exec.proto instead + optional SkillOptions skill_options = 7; + // Custom system prompt override. Allowlisted for specific teams only. + optional string custom_system_prompt = 8; +} + +message TextDeltaUpdate { + string text = 1; +} + +message ToolCallStartedUpdate { + string call_id = 1; + ToolCall tool_call = 2; + // groups tool calls that originate from the same model provider call + string model_call_id = 3; +} + +message ToolCallCompletedUpdate { + string call_id = 1; + ToolCall tool_call = 2; + // groups tool calls that originate from the same model provider call + string model_call_id = 3; +} + +message ToolCallDeltaUpdate { + string call_id = 1; + ToolCallDelta tool_call_delta = 2; + // groups tool calls that originate from the same model provider call + string model_call_id = 3; +} + +// Streaming update for partial tool call arguments +message PartialToolCallUpdate { + string call_id = 1; + ToolCall tool_call = 2; + // Aggregated args text so far (as JSON text). May be incomplete until final tool call. + string args_text_delta = 3; + // groups tool calls that originate from the same model provider call + string model_call_id = 4; +} + +message ThinkingDeltaUpdate { + string text = 1; +} + +message ThinkingCompletedUpdate { + int32 thinking_duration_ms = 1; +} + +message TokenDeltaUpdate { + int32 tokens = 1; +} + +message SummaryUpdate { + string summary = 1; +} + +message SummaryStartedUpdate { +} + +message HeartbeatUpdate { +} + +message SummaryCompletedUpdate { +} + +message ShellOutputDeltaUpdate { + oneof event { + ShellStreamStdout stdout = 1; + ShellStreamStderr stderr = 2; + ShellStreamExit exit = 3; + ShellStreamStart start = 4; + } +} + +message TurnEndedUpdate { +} + +// Only: user message appended update +message UserMessageAppendedUpdate { + UserMessage user_message = 1; +} + +message StepStartedUpdate { + uint64 step_id = 1; +} + +message StepCompletedUpdate { + uint64 step_id = 1; + int64 step_duration_ms = 2; +} + +message InteractionUpdate { + oneof message { + TextDeltaUpdate text_delta = 1; + PartialToolCallUpdate partial_tool_call = 7; + ToolCallDeltaUpdate tool_call_delta = 15; + ToolCallStartedUpdate tool_call_started = 2; + ToolCallCompletedUpdate tool_call_completed = 3; + ThinkingDeltaUpdate thinking_delta = 4; + ThinkingCompletedUpdate thinking_completed = 5; + UserMessageAppendedUpdate user_message_appended = 6; + TokenDeltaUpdate token_delta = 8; + SummaryUpdate summary = 9; + SummaryStartedUpdate summary_started = 10; + SummaryCompletedUpdate summary_completed = 11; + ShellOutputDeltaUpdate shell_output_delta = 12; + HeartbeatUpdate heartbeat = 13; + TurnEndedUpdate turn_ended = 14; + StepStartedUpdate step_started = 16; + StepCompletedUpdate step_completed = 17; + } +} + +// Interaction query messages for bidirectional communication +message InteractionQuery { + uint32 id = 1; + oneof query { + WebSearchRequestQuery web_search_request_query = 2; + AskQuestionInteractionQuery ask_question_interaction_query = 3; + SwitchModeRequestQuery switch_mode_request_query = 4; + ExaSearchRequestQuery exa_search_request_query = 5; + ExaFetchRequestQuery exa_fetch_request_query = 6; + CreatePlanRequestQuery create_plan_request_query = 7; + SetupVmEnvironmentArgs setup_vm_environment_args = 8; + } +} + +message InteractionResponse { + uint32 id = 1; + oneof result { + WebSearchRequestResponse web_search_request_response = 2; + AskQuestionInteractionResponse ask_question_interaction_response = 3; + SwitchModeRequestResponse switch_mode_request_response = 4; + ExaSearchRequestResponse exa_search_request_response = 5; + ExaFetchRequestResponse exa_fetch_request_response = 6; + CreatePlanRequestResponse create_plan_request_response = 7; + SetupVmEnvironmentResult setup_vm_environment_result = 8; + } +} + +message AskQuestionInteractionQuery { + AskQuestionArgs args = 1; + string tool_call_id = 2; +} + +message AskQuestionInteractionResponse { + AskQuestionResult result = 1; +} + +message ClientHeartbeat { +} + +// Prewarm request - sent before the actual action to prepare the backend Contains all config needed for auth, model routing, and session building The actual ConversationAction is sent separately after prewarming completes +message PrewarmRequest { + ModelDetails model_details = 1; + optional RequestedModel requested_model = 9; + optional string conversation_id = 2; + ConversationStateStructure conversation_state = 3; + McpTools mcp_tools = 4; + optional McpFileSystemOptions mcp_file_system_options = 5; + // Best-of-N context for usage billing (same fields as UserMessage) + optional string best_of_n_group_id = 6; + optional bool try_use_best_of_n_promotion = 7; + // Custom system prompt override. Allowlisted for specific teams only. + optional string custom_system_prompt = 8; +} + +message ExecServerAbort { + uint32 id = 1; +} + +message ExecServerControlMessage { + oneof message { + ExecServerAbort abort = 1; + } +} + +message AgentClientMessage { + oneof message { + AgentRunRequest run_request = 1; + ExecClientMessage exec_client_message = 2; + ExecClientControlMessage exec_client_control_message = 5; + KvClientMessage kv_client_message = 3; + ConversationAction conversation_action = 4; + InteractionResponse interaction_response = 6; + ClientHeartbeat client_heartbeat = 7; + PrewarmRequest prewarm_request = 8; + } +} + +message AgentServerMessage { + oneof message { + InteractionUpdate interaction_update = 1; + ExecServerMessage exec_server_message = 2; + ExecServerControlMessage exec_server_control_message = 5; + ConversationStateStructure conversation_checkpoint_update = 3; + KvServerMessage kv_server_message = 4; + InteractionQuery interaction_query = 7; + } +} + +// New unary API for naming an agent from a user message +message NameAgentRequest { + string user_message = 1; +} + +message NameAgentResponse { + string name = 1; +} + +message GetUsableModelsRequest { + // Not used right now, but can use to populate info about custom models the user passes in that we don't send down by default + repeated string custom_model_ids = 1; +} + +message GetUsableModelsResponse { + repeated ModelDetails models = 1; +} + +message GetDefaultModelForCliRequest { +} + +message GetDefaultModelForCliResponse { + ModelDetails model = 1; +} + +// Internal endpoint: returns all allowed model intents for devs +message GetAllowedModelIntentsRequest { +} + +message GetAllowedModelIntentsResponse { + repeated string model_intents = 1; +} + +// IDE state persistence for clients (CLI / VSCode integration) Mirrors a subset of aiserver.v1.ConversationMessage.IdeEditorsState, but only contains the recently viewed files and avoids any deprecated fields. +message IdeEditorsStateFile { + string relative_path = 1; + string absolute_path = 2; + optional bool is_currently_focused = 3; + optional int32 current_line_number = 4; + optional string current_line_text = 5; + optional int32 line_count = 6; +} + +message IdeEditorsStateLite { + repeated IdeEditorsStateFile recently_viewed_files = 1; +} + +message ApplyAgentDiffToolCall { + ApplyAgentDiffArgs args = 1; + ApplyAgentDiffResult result = 2; +} + +message ApplyAgentDiffArgs { + string agent_id = 1; +} + +message ApplyAgentDiffResult { + oneof result { + ApplyAgentDiffSuccess success = 1; + ApplyAgentDiffError error = 2; + } +} + +message ApplyAgentDiffSuccess { + repeated AppliedAgentChange applied_changes = 1; +} + +message AppliedAgentChange { + string path = 1; + int32 change_type = 2; + optional string before_content = 3; + optional string after_content = 4; + optional string error = 5; + // Detailed result message from the execution (e.g., "Successfully deleted file: path (123 bytes)") + optional string message_for_model = 6; +} + +message ApplyAgentDiffError { + string error = 1; + repeated AppliedAgentChange applied_changes = 2; +} + +message AskQuestionToolCall { + AskQuestionArgs args = 1; + AskQuestionResult result = 2; +} + +message AskQuestionArgs { + // optional form title + string title = 1; + // 1+ questions + repeated AskQuestionArgs_Question questions = 2; + // if true, return immediately with async marker instead of blocking + bool run_async = 5; + // if set, indicates this is a synthetic completion for the original async tool call with this ID + string async_original_tool_call_id = 6; +} + +message AskQuestionArgs_Question { + // unique, model-provided + string id = 1; + // the question text + string prompt = 2; + // choices + repeated AskQuestionArgs_Option options = 3; + // multi-select vs single-select + bool allow_multiple = 4; +} + +message AskQuestionArgs_Option { + // stable option id + string id = 1; + // display text + string label = 2; +} + +// Marker indicating that questions have been sent asynchronously Answers will arrive later as a separate ask_question tool call +message AskQuestionAsync { +} + +message AskQuestionResult { + oneof result { + AskQuestionSuccess success = 1; + AskQuestionError error = 2; + AskQuestionRejected rejected = 3; + AskQuestionAsync async = 4; + } +} + +message AskQuestionSuccess { + repeated AskQuestionSuccess_Answer answers = 1; +} + +message AskQuestionSuccess_Answer { + string question_id = 1; + // empty if unanswered + repeated string selected_option_ids = 2; +} + +message AskQuestionError { + string error_message = 1; +} + +message AskQuestionRejected { + string reason = 1; +} + +message BackgroundShellSpawnArgs { + string command = 1; + string working_directory = 2; + string tool_call_id = 3; + ShellCommandParsingResult parsing_result = 4; + optional SandboxPolicy sandbox_policy = 5; + bool enable_write_shell_stdin_tool = 6; +} + +// Result of spawning a background shell +message BackgroundShellSpawnResult { + oneof result { + BackgroundShellSpawnSuccess success = 1; + BackgroundShellSpawnError error = 2; + ShellRejected rejected = 3; + ShellPermissionDenied permission_denied = 4; + } +} + +message BackgroundShellSpawnSuccess { + uint32 shell_id = 1; + string command = 2; + string working_directory = 3; + // Process ID of the spawned shell + optional uint32 pid = 4; +} + +message BackgroundShellSpawnError { + string command = 1; + string working_directory = 2; + string error = 3; +} + +message WriteShellStdinArgs { + uint32 shell_id = 1; + string chars = 2; +} + +message WriteShellStdinResult { + oneof result { + WriteShellStdinSuccess success = 1; + WriteShellStdinError error = 2; + } +} + +message WriteShellStdinSuccess { + uint32 shell_id = 1; + uint32 terminal_file_length_before_input_written = 2; +} + +message WriteShellStdinError { + string error = 1; +} + +message Coordinate { + int32 x = 1; + int32 y = 2; +} + +// Arguments for the computer-use tool +message ComputerUseArgs { + string tool_call_id = 1; + repeated ComputerUseAction actions = 2; +} + +// A single computer-use action. This is our internal canonical representation. Provider-specific formats are converted to this by adapters. +message ComputerUseAction { + oneof action { + MouseMoveAction mouse_move = 1; + ClickAction click = 2; + MouseDownAction mouse_down = 3; + MouseUpAction mouse_up = 4; + DragAction drag = 5; + ScrollAction scroll = 6; + TypeAction type = 7; + KeyAction key = 8; + WaitAction wait = 9; + ScreenshotAction screenshot = 10; + CursorPositionAction cursor_position = 11; + } +} + +// Move mouse to coordinate (required) +message MouseMoveAction { + Coordinate coordinate = 1; +} + +// Unified click action - coordinate: optional, clicks at current cursor if omitted - button: which mouse button (default: LEFT) - count: click count (1=single, 2=double, 3=triple, default: 1) - modifier_keys: optional, held during click (e.g., "ctrl", "shift", "ctrl+shift") +message ClickAction { + optional Coordinate coordinate = 1; + int32 button = 2; + int32 count = 3; + optional string modifier_keys = 4; +} + +// Press mouse button down (for fine-grained drag control) +message MouseDownAction { + int32 button = 1; +} + +// Release mouse button (for fine-grained drag control) +message MouseUpAction { + int32 button = 1; +} + +// Drag action - path of coordinates (at least 2 points: [start, ..., end]) +message DragAction { + repeated Coordinate path = 1; + int32 button = 2; +} + +// Scroll action - coordinate: optional, scrolls at current cursor if omitted - direction: scroll direction (required) - amount: number of scroll "clicks" (default: 3) - modifier_keys: optional, held during scroll (e.g., "ctrl" for zoom) +message ScrollAction { + optional Coordinate coordinate = 1; + int32 direction = 2; + int32 amount = 3; + optional string modifier_keys = 4; +} + +// Type text +message TypeAction { + string text = 1; +} + +// Press key or key combination (xdotool-style: "ctrl+a", "Return", "Alt+Left") If hold_duration_ms is set, holds the key for that duration +message KeyAction { + string key = 1; + optional int32 hold_duration_ms = 2; +} + +// Wait for a duration +message WaitAction { + int32 duration_ms = 1; +} + +// Take a screenshot +message ScreenshotAction { +} + +// Get current cursor position +message CursorPositionAction { +} + +// Result of computer-use execution +message ComputerUseResult { + oneof result { + ComputerUseSuccess success = 1; + ComputerUseError error = 2; + } +} + +message ComputerUseSuccess { + int32 action_count = 1; + int32 duration_ms = 2; + // Base64 WebP at API resolution + optional string screenshot = 3; + optional string log = 4; + optional string screenshot_path = 5; + // In API resolution + optional Coordinate cursor_position = 6; +} + +message ComputerUseError { + string error = 1; + int32 action_count = 2; + int32 duration_ms = 3; + optional string log = 4; + // Base64 WebP of screen state at error time + optional string screenshot = 5; + // Path where screenshot was saved + optional string screenshot_path = 6; +} + +message ComputerUseToolCall { + ComputerUseArgs args = 1; + ComputerUseResult result = 2; +} + +message CreatePlanToolCall { + CreatePlanArgs args = 1; + CreatePlanResult result = 2; +} + +// A phase groups related todos together for project-mode plans +message Phase { + string name = 1; + repeated TodoItem todos = 2; +} + +message CreatePlanArgs { + string plan = 1; + repeated TodoItem todos = 2; + string overview = 3; + string name = 4; + // When true, uses phases instead of flat todos (mutually exclusive) + bool is_project = 5; + // Implementation phases (only valid when is_project=true) + repeated Phase phases = 6; +} + +message CreatePlanResult { + // URI of the plan file (returned when file_based_plan_edits is enabled) + string plan_uri = 3; + oneof result { + CreatePlanSuccess success = 1; + CreatePlanError error = 2; + } +} + +message CreatePlanSuccess { +} + +message CreatePlanError { + string error = 1; +} + +// Query sent from server to client to create a plan file +message CreatePlanRequestQuery { + CreatePlanArgs args = 1; + string tool_call_id = 2; +} + +// Response from client with the created plan URI +message CreatePlanRequestResponse { + CreatePlanResult result = 1; +} + +message CursorRuleTypeGlobal { +} + +message CursorRuleTypeFileGlobs { + repeated string globs = 1; +} + +message CursorRuleTypeAgentFetched { + string description = 1; +} + +message CursorRuleTypeManuallyAttached { +} + +message CursorRuleType { + oneof type { + CursorRuleTypeGlobal global = 1; + CursorRuleTypeFileGlobs file_globbed = 2; + CursorRuleTypeAgentFetched agent_fetched = 3; + CursorRuleTypeManuallyAttached manually_attached = 4; + } +} + +message CursorRule { + // absolute path to the .mdc file + string full_path = 1; + // rule body, trimmed to reasonable size if needed by client + string content = 2; + // classification of rule + CursorRuleType type = 3; + // source of the rule + int32 source = 4; + // Git remote origin URL for the repository containing this rule, if available. Normalized to host/path format (e.g., "github.com/owner/repo"). + optional string git_remote_origin = 5; + optional string parse_error = 6; +} + +message DeleteArgs { + string path = 1; + string tool_call_id = 2; +} + +message DeleteResult { + oneof result { + DeleteSuccess success = 1; + DeleteFileNotFound file_not_found = 2; + DeleteNotFile not_file = 3; + DeletePermissionDenied permission_denied = 4; + DeleteFileBusy file_busy = 5; + DeleteRejected rejected = 6; + DeleteError error = 7; + } +} + +message DeleteSuccess { + string path = 1; + string deleted_file = 2; + int64 file_size = 3; + string prev_content = 4; +} + +message DeleteFileNotFound { + string path = 1; +} + +message DeleteNotFile { + string path = 1; + // "directory" or "other" + string actual_type = 2; +} + +message DeletePermissionDenied { + string path = 1; + string client_visible_error = 2; + bool is_readonly = 3; +} + +message DeleteFileBusy { + string path = 1; +} + +message DeleteRejected { + string path = 1; + string reason = 2; +} + +message DeleteError { + string path = 1; + string error = 2; +} + +message DeleteToolCall { + DeleteArgs args = 1; + DeleteResult result = 2; +} + +message DiagnosticsArgs { + string path = 1; + string tool_call_id = 2; +} + +message DiagnosticsResult { + oneof result { + DiagnosticsSuccess success = 1; + DiagnosticsError error = 2; + DiagnosticsRejected rejected = 3; + DiagnosticsFileNotFound file_not_found = 4; + DiagnosticsPermissionDenied permission_denied = 5; + } +} + +message DiagnosticsSuccess { + string path = 1; + repeated Diagnostic diagnostics = 2; + int32 total_diagnostics = 3; +} + +message Diagnostic { + int32 severity = 1; + Range range = 2; + string message = 3; + string source = 4; + string code = 5; + bool is_stale = 6; +} + +message DiagnosticsError { + string path = 1; + string error = 2; +} + +message DiagnosticsRejected { + string path = 1; + string reason = 2; +} + +message DiagnosticsFileNotFound { + string path = 1; +} + +message DiagnosticsPermissionDenied { + string path = 1; +} + +message EditArgs { + string path = 1; + optional string stream_content = 6; +} + +message EditResult { + oneof result { + EditSuccess success = 1; + EditFileNotFound file_not_found = 2; + EditReadPermissionDenied read_permission_denied = 3; + EditWritePermissionDenied write_permission_denied = 4; + EditRejected rejected = 6; + EditError error = 7; + } +} + +message EditSuccess { + string path = 1; + optional int32 lines_added = 3; + optional int32 lines_removed = 4; + // Concatenated chunk diff strings separated by "\n...\n" + optional string diff_string = 5; + // undefined if file didn't exist before the edit + optional string before_full_file_content = 6; + string after_full_file_content = 7; + // Formatted message for display to model (resultForModel from EditTransformResult) + optional string message = 8; +} + +message EditFileNotFound { + string path = 1; +} + +message EditReadPermissionDenied { + string path = 1; +} + +message EditWritePermissionDenied { + string path = 1; + string error = 2; + bool is_readonly = 3; +} + +message EditRejected { + string path = 1; + string reason = 2; +} + +message EditError { + string path = 1; + string error = 2; + optional string model_visible_error = 5; +} + +message EditToolCall { + EditArgs args = 1; + EditResult result = 2; +} + +message EditToolCallDelta { + string stream_content_delta = 1; +} + +message ExaFetchArgs { + repeated string ids = 1; + string tool_call_id = 2; +} + +message ExaFetchResult { + oneof result { + ExaFetchSuccess success = 1; + ExaFetchError error = 2; + ExaFetchRejected rejected = 3; + } +} + +message ExaFetchSuccess { + repeated ExaFetchContent contents = 1; +} + +message ExaFetchError { + string error = 1; +} + +message ExaFetchRejected { + string reason = 1; +} + +message ExaFetchContent { + string title = 1; + string url = 2; + string text = 3; + string published_date = 4; +} + +message ExaFetchToolCall { + ExaFetchArgs args = 1; + ExaFetchResult result = 2; +} + +message ExaFetchRequestQuery { + ExaFetchArgs args = 1; +} + +message ExaFetchRequestResponse { + oneof result { + ExaFetchRequestResponse_Approved approved = 1; + ExaFetchRequestResponse_Rejected rejected = 2; + } +} + +message ExaFetchRequestResponse_Approved { +} + +message ExaFetchRequestResponse_Rejected { + string reason = 1; +} + +message ExaSearchArgs { + string query = 1; + // "auto", "neural", or "keyword" + string type = 2; + int32 num_results = 3; + string tool_call_id = 4; +} + +message ExaSearchResult { + oneof result { + ExaSearchSuccess success = 1; + ExaSearchError error = 2; + ExaSearchRejected rejected = 3; + } +} + +message ExaSearchSuccess { + repeated ExaSearchReference references = 1; +} + +message ExaSearchError { + string error = 1; +} + +message ExaSearchRejected { + string reason = 1; +} + +message ExaSearchReference { + string title = 1; + string url = 2; + string text = 3; + string published_date = 4; +} + +message ExaSearchToolCall { + ExaSearchArgs args = 1; + ExaSearchResult result = 2; +} + +message ExaSearchRequestQuery { + ExaSearchArgs args = 1; +} + +message ExaSearchRequestResponse { + oneof result { + ExaSearchRequestResponse_Approved approved = 1; + ExaSearchRequestResponse_Rejected rejected = 2; + } +} + +message ExaSearchRequestResponse_Approved { +} + +message ExaSearchRequestResponse_Rejected { + string reason = 1; +} + +message ExecClientStreamClose { + uint32 id = 1; +} + +message ExecClientThrow { + uint32 id = 1; + string error = 2; + optional string stack_trace = 3; +} + +message ExecClientHeartbeat { + uint32 id = 1; +} + +message ExecClientControlMessage { + oneof message { + ExecClientStreamClose stream_close = 1; + ExecClientThrow throw = 2; + ExecClientHeartbeat heartbeat = 3; + } +} + +// Simplified span context for tracing exec calls +message SpanContext { + // Trace identifier (128-bit as hex string, same for all spans in a trace) + string trace_id = 1; + // Unique span identifier (64-bit as hex string) + string span_id = 2; + // Trace flags bit field following OTEL SPAN_FLAGS_* semantics + optional uint32 trace_flags = 3; + // W3C trace-state header string (optional) + optional string trace_state = 4; +} + +// Empty abort message for aborting running execs +message AbortArgs { +} + +message AbortResult { +} + +message ExecServerMessage { + uint32 id = 1; + // Optional exec ID for attachable executions + string exec_id = 15; + // Optional parent span context for tracing + optional SpanContext span_context = 19; + oneof message { + ShellArgs shell_args = 2; + WriteArgs write_args = 3; + DeleteArgs delete_args = 4; + GrepArgs grep_args = 5; + ReadArgs read_args = 7; + LsArgs ls_args = 8; + DiagnosticsArgs diagnostics_args = 9; + RequestContextArgs request_context_args = 10; + McpArgs mcp_args = 11; + ShellArgs shell_stream_args = 14; + BackgroundShellSpawnArgs background_shell_spawn_args = 16; + ListMcpResourcesExecArgs list_mcp_resources_exec_args = 17; + ReadMcpResourceExecArgs read_mcp_resource_exec_args = 18; + FetchArgs fetch_args = 20; + RecordScreenArgs record_screen_args = 21; + ComputerUseArgs computer_use_args = 22; + WriteShellStdinArgs write_shell_stdin_args = 23; + } +} + +message ExecClientMessage { + uint32 id = 1; + // Optional exec ID for attachable executions + string exec_id = 15; + oneof message { + ShellResult shell_result = 2; + WriteResult write_result = 3; + DeleteResult delete_result = 4; + GrepResult grep_result = 5; + ReadResult read_result = 7; + LsResult ls_result = 8; + DiagnosticsResult diagnostics_result = 9; + RequestContextResult request_context_result = 10; + McpResult mcp_result = 11; + ShellStream shell_stream = 14; + BackgroundShellSpawnResult background_shell_spawn_result = 16; + ListMcpResourcesExecResult list_mcp_resources_exec_result = 17; + ReadMcpResourceExecResult read_mcp_resource_exec_result = 18; + FetchResult fetch_result = 20; + RecordScreenResult record_screen_result = 21; + ComputerUseResult computer_use_result = 22; + WriteShellStdinResult write_shell_stdin_result = 23; + } +} + +message FetchArgs { + string url = 1; + string tool_call_id = 2; +} + +message FetchResult { + oneof result { + FetchSuccess success = 1; + FetchError error = 2; + } +} + +message FetchSuccess { + string url = 1; + string content = 2; + int32 status_code = 3; + string content_type = 4; +} + +message FetchError { + string url = 1; + string error = 2; +} + +message GenerateImageArgs { + string description = 1; + optional string file_path = 2; + // Optional paths to reference images to use as input for image-to-image generation + repeated string reference_image_paths = 5; +} + +message GenerateImageResult { + oneof result { + GenerateImageSuccess success = 1; + GenerateImageError error = 2; + } +} + +message GenerateImageSuccess { + // Actual file path where the image was saved (e.g., /path/to/project/assets/image.png) + string file_path = 1; + // Base64-encoded image data + string image_data = 2; +} + +message GenerateImageError { + string error = 1; +} + +message GenerateImageToolCall { + GenerateImageArgs args = 1; + GenerateImageResult result = 2; +} + +message GrepArgs { + string pattern = 1; + optional string path = 2; + optional string glob = 3; + // "content", "files_with_matches", "count" + optional string output_mode = 4; + optional int32 context_before = 5; + optional int32 context_after = 6; + optional int32 context = 7; + optional bool case_insensitive = 8; + // --type + optional string type = 9; + // | head -N + optional int32 head_limit = 10; + // -U --multiline-dotall + optional bool multiline = 11; + // --sort: "none", "path", "modified", "accessed", "created" + optional string sort = 12; + // if false, use --sortr for reverse sort + optional bool sort_ascending = 13; + string tool_call_id = 14; + optional SandboxPolicy sandbox_policy = 15; +} + +message GrepResult { + oneof result { + GrepSuccess success = 1; + GrepError error = 2; + } +} + +message GrepError { + string error = 1; +} + +message GrepSuccess { + string pattern = 1; + string path = 2; + // "content", "files_with_matches", or "count" + string output_mode = 3; + map workspace_results = 4; + optional GrepUnionResult active_editor_result = 5; +} + +message GrepUnionResult { + oneof result { + GrepCountResult count = 1; + GrepFilesResult files = 2; + GrepContentResult content = 3; + } +} + +message GrepCountResult { + // ordered by relevance + repeated GrepFileCount counts = 1; + // The total count of files that the client found from the ripgrep call This is a lower bound if we truncated the output from the ripgrep call itself, but is accurate if client_truncated is true (but may be more than the number of files returned to the server) + int32 total_files = 2; + // The total count of matches that the client found from the ripgrep call This is a lower bound if we truncated the output from the ripgrep call itself, but is accurate if client_truncated is true (but may be more than the number of matches returned to the server) + int32 total_matches = 3; + // true if the client truncated the output sent to the server + bool client_truncated = 4; + // true if we truncated the output from the ripgrep call itself + bool ripgrep_truncated = 5; +} + +message GrepFileCount { + string file = 1; + int32 count = 2; +} + +message GrepFilesResult { + // ordered by relevance + repeated string files = 1; + // The total count of files that the client found from the ripgrep call This is a lower bound if we truncated the output from the ripgrep call itself, but is accurate if client_truncated is true (but may be more than the number of files returned to the server) + int32 total_files = 2; + // true if the client truncated the output sent to the server + bool client_truncated = 3; + // true if we truncated the output from the ripgrep call itself + bool ripgrep_truncated = 4; +} + +message GrepContentResult { + // ordered by relevance + repeated GrepFileMatch matches = 1; + // The total count of lines that the client found from the ripgrep call This is a lower bound if we truncated the output from the ripgrep call itself, but is accurate if client_truncated is true (but may be more than the number of lines returned to the server) + int32 total_lines = 2; + // The total count of matches that the client found from the ripgrep call This is a lower bound if we truncated the output from the ripgrep call itself, but is accurate if client_truncated is true (but may be more than the number of matches returned to the server) + int32 total_matched_lines = 3; + // true if the client truncated the output sent to the server + bool client_truncated = 4; + // true if we truncated the output from the ripgrep call itself + bool ripgrep_truncated = 5; +} + +message GrepFileMatch { + string file = 1; + repeated GrepContentMatch matches = 2; +} + +message GrepContentMatch { + int32 line_number = 1; + string content = 2; + bool content_truncated = 3; + // true for context lines (-A/B/C) + bool is_context_line = 4; +} + +message GrepStream { + string pattern = 1; +} + +message GrepToolCall { + GrepArgs args = 1; + GrepResult result = 2; +} + +message GetBlobArgs { + bytes blob_id = 1; +} + +message GetBlobResult { + optional bytes blob_data = 1; +} + +message SetBlobArgs { + bytes blob_id = 1; + bytes blob_data = 2; +} + +message SetBlobResult { + optional Error error = 1; +} + +message KvServerMessage { + uint32 id = 1; + // Span context for distributed tracing + optional SpanContext span_context = 4; + oneof message { + GetBlobArgs get_blob_args = 2; + SetBlobArgs set_blob_args = 3; + } +} + +message KvClientMessage { + uint32 id = 1; + oneof message { + GetBlobResult get_blob_result = 2; + SetBlobResult set_blob_result = 3; + } +} + +message LsArgs { + string path = 1; + repeated string ignore = 2; + string tool_call_id = 3; + optional SandboxPolicy sandbox_policy = 4; + // defaults to 5000ms + optional uint32 timeout_ms = 5; +} + +message LsResult { + oneof result { + LsSuccess success = 1; + LsError error = 2; + LsRejected rejected = 3; + LsTimeout timeout = 4; + } +} + +message LsSuccess { + LsDirectoryTreeNode directory_tree_root = 1; +} + +message LsDirectoryTreeNode { + string abs_path = 1; + repeated LsDirectoryTreeNode children_dirs = 2; + repeated LsDirectoryTreeNode_File children_files = 3; + // Proto doesn't allow repeated fields to be optional, so in case of empty children arrays, this fields indicates if it happens: `true` - because directory really doesn't have any children `false` - because we stopped traversal before getting to its children + bool children_were_processed = 4; + // Count of extensions in the full sub-tree + map full_subtree_extension_counts = 5; + int32 num_files = 6; +} + +message LsDirectoryTreeNode_File { + string name = 1; + optional TerminalMetadata terminal_metadata = 2; +} + +message LsError { + string path = 1; + string error = 2; +} + +message LsRejected { + string path = 1; + string reason = 2; +} + +// Returned when ls operation timed out. Contains partial results gathered before timeout. +message LsTimeout { + LsDirectoryTreeNode directory_tree_root = 1; +} + +message TerminalMetadata { + optional string cwd = 1; + repeated TerminalMetadata_Command last_commands = 2; + optional int64 last_modified_ms = 3; + optional TerminalMetadata_Command current_command = 4; +} + +message TerminalMetadata_Command { + string command = 1; + optional int32 exit_code = 2; + optional int64 timestamp_ms = 3; + optional int64 duration_ms = 4; +} + +message LsToolCall { + LsArgs args = 1; + LsResult result = 2; +} + +message McpArgs { + string name = 1; + map args = 2; + string tool_call_id = 3; + string provider_identifier = 4; + string tool_name = 5; +} + +message McpResult { + oneof result { + McpSuccess success = 1; + McpError error = 2; + McpRejected rejected = 3; + McpPermissionDenied permission_denied = 4; + McpToolNotFound tool_not_found = 5; + } +} + +message McpToolNotFound { + string name = 1; + repeated string available_tools = 2; +} + +// Text content item +message McpTextContent { + string text = 1; + // Optional file location for large outputs + optional OutputLocation output_location = 2; +} + +// Image content item +message McpImageContent { + // Raw bytes of the image. In JSON, this will be base64-encoded. + bytes data = 1; + // Optional MIME type, e.g. "image/png" + string mime_type = 2; +} + +// A single tool result content item: either text or image +message McpToolResultContentItem { + oneof content { + McpTextContent text = 1; + McpImageContent image = 2; + } +} + +// Equivalent to the requested McpToolResult TypeScript type +message McpSuccess { + repeated McpToolResultContentItem content = 1; + bool is_error = 2; +} + +message McpError { + string error = 1; +} + +message McpRejected { + string reason = 1; + bool is_readonly = 2; +} + +message McpPermissionDenied { + string error = 1; + bool is_readonly = 2; +} + +// List MCP resources exec args +message ListMcpResourcesExecArgs { + // Optional server name to filter resources by + optional string server = 1; +} + +// List MCP resources exec result +message ListMcpResourcesExecResult { + oneof result { + ListMcpResourcesSuccess success = 1; + ListMcpResourcesError error = 2; + ListMcpResourcesRejected rejected = 3; + } +} + +message ListMcpResourcesExecResult_McpResource { + string uri = 1; + optional string name = 2; + optional string description = 3; + optional string mime_type = 4; + // Server name that provides this resource + string server = 5; + // Additional metadata + map annotations = 6; +} + +message ListMcpResourcesSuccess { + repeated ListMcpResourcesExecResult_McpResource resources = 1; +} + +message ListMcpResourcesError { + string error = 1; +} + +message ListMcpResourcesRejected { + string reason = 1; +} + +// Read MCP resource exec args +message ReadMcpResourceExecArgs { + // Required server name + string server = 1; + // Required resource URI + string uri = 2; + // Optional: when set, the resource will be downloaded to this path relative to the workspace, and the content will not be returned to the model. + optional string download_path = 3; +} + +// Read MCP resource exec result +message ReadMcpResourceExecResult { + oneof result { + ReadMcpResourceSuccess success = 1; + ReadMcpResourceError error = 2; + ReadMcpResourceRejected rejected = 3; + ReadMcpResourceNotFound not_found = 4; + } +} + +message ReadMcpResourceSuccess { + string uri = 1; + optional string name = 2; + optional string description = 3; + optional string mime_type = 4; + // Additional metadata + map annotations = 7; + // If set, resource was downloaded to this path + optional string download_path = 8; + oneof content { + string text = 5; + bytes blob = 6; + } +} + +message ReadMcpResourceError { + string uri = 1; + string error = 2; +} + +message ReadMcpResourceRejected { + string uri = 1; + string reason = 2; +} + +message ReadMcpResourceNotFound { + string uri = 1; +} + +message McpToolDefinition { + string name = 1; + string provider_identifier = 4; + string tool_name = 5; + string description = 2; + bytes input_schema = 3; +} + +message McpTools { + repeated McpToolDefinition mcp_tools = 1; +} + +// Represents MCP-provided instructions from a specific server +message McpInstructions { + string server_name = 1; + string instructions = 2; +} + +message McpDescriptor { + // Display name of the MCP server associated with this folder. + string server_name = 1; + string server_identifier = 2; + // Absolute folder path where MCP tool descriptor JSON files are stored. + optional string folder_path = 3; + optional string server_use_instructions = 4; + repeated McpToolDescriptor tools = 5; +} + +message McpToolDescriptor { + string tool_name = 1; + optional string definition_path = 2; +} + +message McpFileSystemOptions { + bool enabled = 1; + string workspace_project_dir = 2; + repeated McpDescriptor mcp_descriptors = 3; +} + +message ReadArgs { + string path = 1; + string tool_call_id = 2; +} + +message ReadResult { + oneof result { + ReadSuccess success = 1; + ReadError error = 2; + ReadRejected rejected = 3; + ReadFileNotFound file_not_found = 4; + ReadPermissionDenied permission_denied = 5; + ReadInvalidFile invalid_file = 6; + } +} + +message ReadSuccess { + string path = 1; + int32 total_lines = 3; + int64 file_size = 4; + // true if the content was truncated due to size limits + bool truncated = 6; + // Returns blob ID if the output was stored in the blob store. If provided, the output is stored separately from the rest of the tool result, and since it's already in the blob store, it need not be sent back to the client -- reducing bandwidth. + optional bytes output_blob_id = 7; + oneof output { + string content = 2; + bytes data = 5; + } +} + +message ReadError { + string path = 1; + string error = 2; +} + +message ReadRejected { + string path = 1; + string reason = 2; +} + +message ReadFileNotFound { + string path = 1; +} + +message ReadPermissionDenied { + string path = 1; +} + +message ReadInvalidFile { + string path = 1; + // e.g., "Path is a directory, not a file" + string reason = 2; +} + +message ReadToolCall { + ReadToolArgs args = 1; + ReadToolResult result = 2; +} + +message ReadToolArgs { + string path = 1; + optional int32 offset = 2; + optional int32 limit = 3; +} + +message ReadToolResult { + oneof result { + ReadToolSuccess success = 1; + ReadToolError error = 2; + } +} + +message ReadRange { + uint32 start_line = 1; + uint32 end_line = 2; +} + +message ReadToolSuccess { + bool is_empty = 2; + bool exceeded_limit = 3; + uint32 total_lines = 4; + uint32 file_size = 5; + string path = 7; + optional ReadRange read_range = 8; + oneof output { + string content = 1; + bytes data = 6; + bytes data_blob_id = 9; + bytes content_blob_id = 10; + } +} + +message ReadToolError { + string error_message = 1; +} + +message RecordScreenArgs { + int32 mode = 1; + string tool_call_id = 2; + // Custom filename for SAVE_RECORDING mode + optional string save_as_filename = 3; +} + +message RecordScreenResult { + oneof result { + RecordScreenStartSuccess start_success = 1; + RecordScreenSaveSuccess save_success = 2; + RecordScreenDiscardSuccess discard_success = 3; + RecordScreenFailure failure = 4; + } +} + +message RecordScreenStartSuccess { + // True if a prior recording was cancelled, false otherwise + bool was_prior_recording_cancelled = 1; + // True if save_as_filename arg was passed to start tool and ignored + bool was_save_as_filename_ignored = 2; +} + +message RecordScreenSaveSuccess { + // Path to the saved recording file + string path = 1; + // Duration of the recording in milliseconds + int64 recording_duration_ms = 2; + // Set if save_as_filename was invalid and default path was used instead + optional int32 requested_file_path_rejected_reason = 3; +} + +// Empty message - recording discarded successfully +message RecordScreenDiscardSuccess { +} + +message RecordScreenFailure { + // Error message + string error = 1; +} + +message CursorPackagePrompt { + string name = 1; + string file_path = 2; +} + +message CursorPackage { + string name = 1; + string description = 2; + string folder_path = 3; + bool enabled = 4; + optional string parse_error = 5; + repeated CursorPackagePrompt prompts = 6; + string readme_file_path = 7; + int32 package_type = 8; +} + +// TODO: you should be able to override / configure this list in your .vscode settings not exactly sure what that should look like... but i guess you should be able to specify an override URL because we use URLs for identifying repos and maybe you should be able to specify additional buckets too... like in the jane street case: i guess jane street should have some default buckets +message RepositoryIndexingInfo { + // the relative path in the current workspace this is useful for locating the repo and identifying what repo a given file is in this should be unique for different repositories (I think) + string relative_workspace_path = 1; + // a git repo may have multiple remotes at the server we choose the remote (either origin, or the one we have embedded, or something else) invariant: len(remote_urls) == len(remote_names) + repeated string remote_urls = 2; + repeated string remote_names = 3; + string repo_name = 4; + string repo_owner = 5; + bool is_tracked = 6; + // If this is local + bool is_local = 7; + // the orthogonal transform seed if sent from the client! if the client sends up the transform seed then we use that for the orthogonal transform instead of the value stored in the database + optional double orthogonal_transform_seed = 8; + // The encrypted workspace uri for the repository. + string workspace_uri = 9; + // The encryption key for partial paths + string path_encryption_key = 10; +} + +message RequestContextArgs { + optional string notes_session_id = 2; + optional string workspace_id = 3; +} + +message RequestContextResult { + oneof result { + RequestContextSuccess success = 1; + RequestContextError error = 2; + RequestContextRejected rejected = 3; + } +} + +message RequestContextSuccess { + RequestContext request_context = 1; +} + +message RequestContextError { + string error = 1; +} + +message RequestContextRejected { + string reason = 1; +} + +// same as SelectedImage, but with the data field is the full image data +message ImageProto { + bytes data = 1; + string uuid = 2; + string path = 3; + ImageProto_Dimension dimension = 4; + optional string task_specific_description = 6; + string mime_type = 7; +} + +message ImageProto_Dimension { + int32 width = 1; + int32 height = 2; +} + +// Git repository information for a workspace +message GitRepoInfo { + string path = 1; + string status = 2; + string branch_name = 3; + optional string remote_url = 4; +} + +// Environment details for system prompt/context +message RequestContextEnv { + string os_version = 1; + repeated string workspace_paths = 2; + string shell = 3; + bool sandbox_enabled = 5; + string terminals_folder = 7; + string agent_shared_notes_folder = 8; + string agent_conversation_notes_folder = 9; + string time_zone = 10; + // Project-specific folder for storing artifacts, computed client-side as ~/.cursor/projects/{slug}/ + string project_folder = 11; + // Folder where agent conversation transcripts are stored + string agent_transcripts_folder = 12; +} + +message DebugModeConfig { + string log_path = 1; + string server_endpoint = 2; +} + +message SkillDescriptor { + string name = 1; + string description = 2; + string folder_path = 3; + bool enabled = 4; + optional string parse_error = 5; + string readme_file_path = 6; + int32 package_type = 7; +} + +message SkillOptions { + repeated SkillDescriptor skill_descriptors = 1; +} + +message RequestContext { + // All rules, categorized by the embedded type + repeated CursorRule rules = 2; + RequestContextEnv env = 4; + repeated RepositoryIndexingInfo repository_info = 6; + repeated McpToolDefinition tools = 7; + optional string conversation_notes_listing = 8; + optional string shared_notes_listing = 9; + repeated GitRepoInfo git_repos = 11; + repeated LsDirectoryTreeNode project_layouts = 13; + repeated McpInstructions mcp_instructions = 14; + optional DebugModeConfig debug_mode_config = 15; + optional string cloud_rule = 16; + optional bool web_search_enabled = 17; + optional SkillOptions skill_options = 18; + optional bool repository_info_should_query_prod = 19; + map file_contents = 20; + // Content of the user-intent/index.md file summarizing past conversations + optional string user_intent_summary = 21; + // Local custom subagent definitions loaded from workspace configuration + repeated CustomSubagent custom_subagents = 22; + // MCP file system options for agent MCP tool descriptor access + optional McpFileSystemOptions mcp_file_system_options = 23; +} + +message SandboxPolicy { + int32 type = 1; + optional bool network_access = 2; + repeated string additional_readwrite_paths = 3; + repeated string additional_readonly_paths = 4; + optional string debug_output_dir = 5; + optional bool block_git_writes = 6; + // If true, excludes default tmp paths (/tmp/, /private/tmp/, /var/folders/) from the sandbox writable paths. Useful for testing readonly behavior. + optional bool disable_tmp_write = 7; +} + +message SelectedImage { + string uuid = 2; + string path = 3; + SelectedImage_Dimension dimension = 4; + string mime_type = 7; + oneof data_or_blob_id { + bytes blob_id = 1; + bytes data = 8; + SelectedImage_BlobIdWithData blob_id_with_data = 9; + } +} + +// Contains both blob_id and data together, for when the client has both and wants to populate the server-side cache without re-uploading +message SelectedImage_BlobIdWithData { + bytes blob_id = 1; + bytes data = 2; +} + +message SelectedImage_Dimension { + int32 width = 1; + int32 height = 2; +} + +// Extra context entry that can be stored inline or as a blob reference +message ExtraContextEntry { + oneof data_or_blob_id { + string data = 1; + bytes blob_id = 2; + } +} + +// A selected file from the UI +message SelectedFile { + string content = 1; + // This is the full path + string path = 2; + optional string relative_path = 3; +} + +// A selected code selection from the UI +message SelectedCodeSelection { + string content = 1; + // This is the full path + string path = 2; + optional string relative_path = 3; + Range range = 4; +} + +// A selected terminal from the UI +message SelectedTerminal { + string content = 1; + optional string title = 2; + optional string path = 3; +} + +// A selected terminal selection from the UI +message SelectedTerminalSelection { + string content = 1; + optional string title = 2; + optional string path = 3; + Range range = 4; +} + +// A selected folder from the UI +message SelectedFolder { + // This is the full path + string path = 1; + optional string relative_path = 2; + LsDirectoryTreeNode directory_tree = 3; +} + +// An external link manually attached by the user +message SelectedExternalLink { + string url = 1; + string uuid = 2; + // For local PDF files Base64-encoded PDF content + optional string pdf_content = 3; + optional bool is_pdf = 4; + optional string filename = 5; +} + +// A cursor rule manually attached by the user +message SelectedCursorRule { + CursorRule rule = 1; +} + +// Git diff (uncommitted changes in working tree) +message SelectedGitDiff { + // Raw git diff output + string content = 1; +} + +// Git diff from branch to main +message SelectedGitDiffFromBranchToMain { + // Raw git diff output + string content = 1; +} + +// A git commit manually attached by the user +message SelectedGitCommit { + string sha = 1; + string message = 2; + optional string description = 3; + // Raw git diff output for this commit + string diff = 4; +} + +// A pull request manually attached by the user via @mention Uses the same folder structure as ViewedPullRequest for consistency +message SelectedPullRequest { + int32 number = 1; + string url = 2; + optional string title = 3; + // Path to the folder containing PR details (diffs, metadata, etc.) + string folder_path = 4; + // Summary JSON containing file list and diff sizes (contents of summary.json) + optional string summary_json = 5; + // PR description/body + optional string description = 6; + // If set, other fields are empty and data should be fetched from the blob + optional bytes blob_id = 7; +} + +// A selection from a pull request diff (for files that may not exist on disk) +message SelectedGitPRDiffSelection { + // Full URL to the pull request + string pr_url = 1; + // Path to the file within the PR + string file_path = 2; + // Start line in the diff + int32 start_line = 3; + // End line in the diff + int32 end_line = 4; + // The diff content for this file (or selection) + optional string diff_content = 5; + // If set, other fields are empty and data should be fetched from the blob + optional bytes blob_id = 6; +} + +// A cursor command manually attached by the user +message SelectedCursorCommand { + string name = 1; + string content = 2; +} + +// A documentation manually attached by the user +message SelectedDocumentation { + string doc_id = 1; + string name = 2; +} + +// A past chat manually attached by the user (transcript file) +message SelectedPastChat { + string agent_id = 1; + string name = 2; +} + +// A call frame from a stack trace +message CallFrame { + optional string function_name = 1; + optional string url = 2; + optional int32 line_number = 3; + optional int32 column_number = 4; +} + +// A stack trace +message StackTrace { + repeated CallFrame call_frames = 1; + optional string raw_stack_trace = 2; +} + +// A console log entry from the runtime +message SelectedConsoleLog { + string message = 1; + // * Unix timestamp in milliseconds when this log entry was created + double timestamp = 2; + string level = 3; + string client_name = 4; + string session_id = 5; + optional StackTrace stack_trace = 6; + optional string object_data_json = 7; +} + +// A UI element picked by the user from the runtime +message SelectedUIElement { + string element = 1; + string xpath = 2; + string text_content = 3; + string extra = 4; + optional string component = 5; + optional string component_props_json = 6; +} + +// A subagent selected by the user from the slash menu +message SelectedSubagent { + string name = 1; +} + +// Container for selected context from the UI +message SelectedContext { + repeated SelectedImage selected_images = 1; + optional InvocationContext invocation_context = 2; + // Temporary hack for IDE-based context (@filename, @Diff, etc.) in background agents only. TODO: remove once proper IDE context format is implemented. + repeated string extra_context = 3; + repeated ExtraContextEntry extra_context_entries = 16; + // New context types + repeated SelectedFile files = 4; + repeated SelectedCodeSelection code_selections = 5; + repeated SelectedTerminal terminals = 6; + repeated SelectedTerminalSelection terminal_selections = 7; + repeated SelectedFolder folders = 8; + repeated SelectedExternalLink external_links = 9; + repeated SelectedCursorRule cursor_rules = 10; + optional SelectedGitDiff git_diff = 18; + optional SelectedGitDiffFromBranchToMain git_diff_from_branch_to_main = 11; + repeated SelectedCursorCommand cursor_commands = 12; + repeated SelectedDocumentation documentations = 13; + repeated SelectedUIElement ui_elements = 14; + repeated SelectedConsoleLog console_logs = 15; + repeated SelectedGitCommit git_commits = 17; + repeated SelectedPastChat past_chats = 19; + repeated SelectedGitPRDiffSelection git_pr_diff_selections = 20; + repeated SelectedPullRequest selected_pull_requests = 21; + repeated SelectedSubagent selected_subagents = 22; +} + +// InvocationContext represents the context from the external app/integration that triggered this agent request. +message InvocationContext { + oneof data { + InvocationContext_SlackThread slack_thread = 1; + InvocationContext_GithubPR github_pr = 2; + InvocationContext_IdeState ide_state = 3; + bytes blob_id = 10; + } +} + +message InvocationContext_SlackThread { + string thread = 1; + optional string channel_name = 2; + optional string channel_purpose = 3; + optional string channel_topic = 4; +} + +message InvocationContext_GithubPR { + string title = 1; + string description = 2; + string comments = 3; + optional string ci_failures = 4; +} + +message InvocationContext_IdeState { + repeated InvocationContext_IdeState_File visible_files = 1; + repeated InvocationContext_IdeState_File recently_viewed_files = 2; + // PRs currently being viewed in the review editor (if any) + repeated InvocationContext_IdeState_ViewedPullRequest currently_viewed_prs = 3; +} + +message InvocationContext_IdeState_File { + // This is the full path + string path = 1; + optional string relative_path = 2; + // Present if file is currently focused + optional InvocationContext_IdeState_File_CursorPosition cursor_position = 3; + int32 total_lines = 4; + // Present for terminal files + optional string active_command = 5; +} + +message InvocationContext_IdeState_File_CursorPosition { + int32 line = 1; + string text = 2; +} + +// Information about a PR currently being viewed in a review editor +message InvocationContext_IdeState_ViewedPullRequest { + int32 number = 1; + string url = 2; + optional string title = 3; + // Path to the folder containing PR details (diffs, metadata, etc.) + optional string folder_path = 4; + // Summary JSON containing file list and diff sizes (contents of summary.json) + optional string summary_json = 5; + // PR description/body + optional string description = 6; +} + +message SetupVmEnvironmentArgs { + // Command to install runtime dependencies (e.g., "npm install") + string install_command = 2; + string start_command = 3; +} + +// Result of VM environment setup operations +message SetupVmEnvironmentResult { + oneof result { + SetupVmEnvironmentSuccess success = 1; + } +} + +// Successful VM environment setup result +message SetupVmEnvironmentSuccess { +} + +// Tool call structure for SetupVmEnvironment +message SetupVmEnvironmentToolCall { + // Arguments for the tool call + SetupVmEnvironmentArgs args = 1; + // Result of the tool call (populated after execution) + SetupVmEnvironmentResult result = 2; +} + +message ShellCommandParsingResult { + bool parsing_failed = 1; + repeated ShellCommandParsingResult_ExecutableCommand executable_commands = 2; + bool has_redirects = 3; + bool has_command_substitution = 4; +} + +message ShellCommandParsingResult_ExecutableCommandArg { + string type = 1; + string value = 2; +} + +message ShellCommandParsingResult_ExecutableCommand { + string name = 1; + repeated ShellCommandParsingResult_ExecutableCommandArg args = 2; + string full_text = 3; +} + +message ShellArgs { + string command = 1; + string working_directory = 2; + int32 timeout = 3; + string tool_call_id = 4; + repeated string simple_commands = 5; + bool has_input_redirect = 6; + bool has_output_redirect = 7; + // Deprecated: use parsing_result instead @deprecated simpleCommands = []; Deprecated: use parsing_result instead @deprecated hasInputRedirect = false; Deprecated: use parsing_result instead @deprecated hasOutputRedirect = false; + ShellCommandParsingResult parsing_result = 8; + optional SandboxPolicy requested_sandbox_policy = 9; + // If output size exceeds this threshold (in bytes), write to file instead of inline. If unset or 0, always use inline output. + optional uint64 file_output_threshold_bytes = 10; + bool is_background = 11; + bool skip_approval = 12; + int32 timeout_behavior = 13; + // Hard timeout: kill the command after this many ms, even if running in background + optional int32 hard_timeout = 14; +} + +message ShellResult { + optional SandboxPolicy sandbox_policy = 101; + // Rendering is affected by this flag, pass forward from args. + optional bool is_background = 102; + // Rendering is affected by this flag, pass forward from args. + optional string terminals_folder = 103; + // Process ID, used for backgrounded shells. + optional uint32 pid = 104; + oneof result { + ShellSuccess success = 1; + ShellFailure failure = 2; + ShellTimeout timeout = 3; + ShellRejected rejected = 4; + ShellSpawnError spawn_error = 5; + ShellPermissionDenied permission_denied = 7; + } +} + +message ShellStreamStdout { + string data = 1; +} + +message ShellStreamStderr { + string data = 1; +} + +message ShellStreamExit { + uint32 code = 1; + string cwd = 2; + optional OutputLocation output_location = 3; + bool aborted = 4; + // If aborted is true, this field indicates the reason for the abort + optional int32 abort_reason = 5; +} + +message ShellStreamStart { + optional SandboxPolicy sandbox_policy = 1; +} + +message ShellStreamBackgrounded { + uint32 shell_id = 1; + string command = 2; + string working_directory = 3; + optional uint32 pid = 4; + // The ms_to_wait value that was used for backgrounding, for display purposes + optional int32 ms_to_wait = 5; +} + +message ShellStream { + oneof event { + ShellStreamStdout stdout = 1; + ShellStreamStderr stderr = 2; + ShellStreamExit exit = 3; + ShellStreamStart start = 4; + ShellRejected rejected = 5; + ShellPermissionDenied permission_denied = 6; + ShellStreamBackgrounded backgrounded = 7; + } +} + +message OutputLocation { + // Absolute path to the output file + string file_path = 1; + // Size of the output in bytes + int64 size_bytes = 2; + // Number of lines in the output + int64 line_count = 3; +} + +message ShellSuccess { + string command = 1; + string working_directory = 2; + int32 exit_code = 3; + string signal = 4; + // Inline stdout - populated when write_output_to_file is false, empty when true + string stdout = 5; + // Inline stderr - populated when write_output_to_file is false, empty when true + string stderr = 6; + int32 execution_time = 7; + // File-based output - populated when write_output_to_file is true (chronologically merged stdout+stderr) + optional OutputLocation output_location = 8; + // Used by background shell executor + optional uint32 shell_id = 9; + optional string interleaved_output = 10; + // Process ID, used for backgrounded shells + optional uint32 pid = 11; + // The ms_to_wait value used for backgrounding (for display in result) + optional int32 ms_to_wait = 12; +} + +message ShellFailure { + string command = 1; + string working_directory = 2; + int32 exit_code = 3; + string signal = 4; + // Inline stdout - populated when write_output_to_file is false, empty when true + string stdout = 5; + // Inline stderr - populated when write_output_to_file is false, empty when true + string stderr = 6; + int32 execution_time = 7; + // File-based output - populated when write_output_to_file is true (chronologically merged stdout+stderr) + optional OutputLocation output_location = 8; + optional string interleaved_output = 9; + // If the command was aborted, this indicates the reason + optional int32 abort_reason = 10; + // Whether the command was aborted (by user or timeout) + bool aborted = 11; +} + +message ShellTimeout { + string command = 1; + string working_directory = 2; + int32 timeout_ms = 3; +} + +message ShellRejected { + string command = 1; + string working_directory = 2; + string reason = 3; + bool is_readonly = 4; +} + +message ShellPermissionDenied { + string command = 1; + string working_directory = 2; + string error = 3; + bool is_readonly = 4; +} + +message ShellSpawnError { + string command = 1; + string working_directory = 2; + string error = 3; +} + +message ShellPartialResult { + string stdout_delta = 1; + string stderr_delta = 2; +} + +message ShellToolCall { + ShellArgs args = 1; + ShellResult result = 2; +} + +message ShellToolCallStdoutDelta { + string content = 1; +} + +message ShellToolCallStderrDelta { + string content = 1; +} + +message ShellToolCallDelta { + oneof delta { + ShellToolCallStdoutDelta stdout = 1; + ShellToolCallStderrDelta stderr = 2; + } +} + +message SubagentType { + oneof type { + SubagentTypeUnspecified unspecified = 1; + SubagentTypeComputerUse computer_use = 2; + SubagentTypeCustom custom = 3; + SubagentTypeExplore explore = 4; + } +} + +// Empty message for unspecified subagent type +message SubagentTypeUnspecified { +} + +// Empty message for computer use subagent type +message SubagentTypeComputerUse { +} + +// Empty message for explore subagent type (read-only codebase exploration) +message SubagentTypeExplore { +} + +// Custom subagent type with a name field +message SubagentTypeCustom { + // unique identifier of the custom subagent + string name = 1; +} + +// Custom subagent definition loaded from local workspace configuration. +message CustomSubagent { + // absolute path to the markdown definition file + string full_path = 1; + // unique identifier of the subagent + string name = 2; + // short summary of the agent's specialization + string description = 3; + // list of tool names the subagent can access + repeated string tools = 4; + // preferred model (or "inherit" to use parent's model) + string model = 5; + // full prompt contents from the markdown file + string prompt = 6; + // default permission mode for subagent execution + int32 permission_mode = 7; +} + +message SwitchModeArgs { + // The unified mode id to switch to (agent/chat/plan/spec/debug/triage) + string target_mode_id = 1; + // Optional explanation for why the mode switch is requested + optional string explanation = 2; + string tool_call_id = 3; +} + +message SwitchModeResult { + oneof result { + SwitchModeSuccess success = 1; + SwitchModeError error = 2; + SwitchModeRejected rejected = 3; + } +} + +message SwitchModeSuccess { + // The mode we switched from + string from_mode_id = 1; + // The mode we switched to + string to_mode_id = 2; +} + +message SwitchModeError { + string error = 1; +} + +message SwitchModeRejected { + string reason = 1; +} + +message SwitchModeToolCall { + SwitchModeArgs args = 1; + SwitchModeResult result = 2; +} + +message SwitchModeRequestQuery { + SwitchModeArgs args = 1; +} + +message SwitchModeRequestResponse { + oneof result { + SwitchModeRequestResponse_Approved approved = 1; + SwitchModeRequestResponse_Rejected rejected = 2; + } +} + +message SwitchModeRequestResponse_Approved { +} + +message SwitchModeRequestResponse_Rejected { + string reason = 1; +} + +message TodoItem { + string id = 1; + string content = 2; + int32 status = 3; + int64 created_at = 4; + int64 updated_at = 5; + // IDs of other TODOs this depends on + repeated string dependencies = 6; +} + +// UpdateTodos tool call +message UpdateTodosToolCall { + UpdateTodosArgs args = 1; + UpdateTodosResult result = 2; +} + +message UpdateTodosArgs { + repeated TodoItem todos = 1; + bool merge = 2; +} + +message UpdateTodosResult { + oneof result { + UpdateTodosSuccess success = 1; + UpdateTodosError error = 2; + } +} + +message UpdateTodosSuccess { + repeated TodoItem todos = 1; + int32 total_count = 2; + // Whether this was a merge operation (needed for conditional rendering) + bool was_merge = 3; +} + +message UpdateTodosError { + string error = 1; +} + +// ReadTodos tool call +message ReadTodosToolCall { + ReadTodosArgs args = 1; + ReadTodosResult result = 2; +} + +message ReadTodosArgs { + // Optional: filter by status + repeated int32 status_filter = 1; + // Optional: filter by IDs + repeated string id_filter = 2; +} + +message ReadTodosResult { + oneof result { + ReadTodosSuccess success = 1; + ReadTodosError error = 2; + } +} + +message ReadTodosSuccess { + repeated TodoItem todos = 1; + int32 total_count = 2; +} + +message ReadTodosError { + string error = 1; +} + +message Range { + Position start = 1; + Position end = 2; +} + +message Position { + uint32 line = 1; + uint32 column = 2; +} + +message Error { + string message = 1; +} + +message WebSearchArgs { + string search_term = 1; + string tool_call_id = 2; +} + +message WebSearchResult { + oneof result { + WebSearchSuccess success = 1; + WebSearchError error = 2; + WebSearchRejected rejected = 3; + } +} + +message WebSearchSuccess { + repeated WebSearchReference references = 1; +} + +message WebSearchError { + string error = 1; +} + +message WebSearchRejected { + string reason = 1; +} + +message WebSearchReference { + string title = 1; + string url = 2; + string chunk = 3; +} + +message WebSearchToolCall { + WebSearchArgs args = 1; + WebSearchResult result = 2; +} + +message WebSearchRequestQuery { + WebSearchArgs args = 1; +} + +message WebSearchRequestResponse { + oneof result { + WebSearchRequestResponse_Approved approved = 1; + WebSearchRequestResponse_Rejected rejected = 2; + } +} + +message WebSearchRequestResponse_Approved { +} + +message WebSearchRequestResponse_Rejected { + string reason = 1; +} + +message WriteArgs { + string path = 1; + string file_text = 2; + string tool_call_id = 3; + bool return_file_content_after_write = 4; + // Raw binary data to write. When set, file_text is ignored and the bytes are written directly without any text processing (e.g., line ending normalization). + bytes file_bytes = 5; +} + +message WriteResult { + oneof result { + WriteSuccess success = 1; + WritePermissionDenied permission_denied = 3; + WriteNoSpace no_space = 4; + WriteError error = 5; + WriteRejected rejected = 6; + } +} + +message WriteSuccess { + string path = 1; + int32 lines_created = 2; + int32 file_size = 3; + optional string file_content_after_write = 4; +} + +message WritePermissionDenied { + string path = 1; + string directory = 2; + // "create_directory" or "create_file" + string operation = 3; + string error = 4; + bool is_readonly = 5; +} + +message WriteNoSpace { + string path = 1; +} + +message WriteError { + string path = 1; + string error = 2; +} + +message WriteRejected { + string path = 1; + string reason = 2; +} + +message BootstrapStatsigRequest { + // When true, the server should evaluate gates as if dev/internal status is ignored. This is used by clients to simulate a prod user experience. + optional bool ignore_dev_status = 1; + optional int32 operating_system = 2; +} + +message PingResponse { +} + +message ExecRequest { + string command = 1; + optional string cwd = 2; + repeated string args = 3; + map environment = 4; +} + +message ExecResponse { + oneof event { + StdoutEvent stdout_event = 1; + StderrEvent stderr_event = 2; + ExitEvent exit_event = 3; + } +} + +message StdoutEvent { + string data = 1; +} + +message StderrEvent { + string data = 1; +} + +message ExitEvent { + int32 exit_code = 1; +} + +message ReadTextFileRequest { + string path = 1; +} + +message ReadTextFileResponse { + string content = 1; +} + +message WriteTextFileRequest { + string path = 1; + string content = 2; +} + +// Empty response - success is implied by RPC completion +message WriteTextFileResponse { +} + +message ReadBinaryFileRequest { + string path = 1; +} + +message ReadBinaryFileResponse { + bytes content = 1; +} + +message WriteBinaryFileRequest { + string path = 1; + bytes content = 2; +} + +// Empty response - success is implied by RPC completion +message WriteBinaryFileResponse { +} + +message GetWorkspaceChangesHashRequest { + string root_path = 1; + string base_ref = 2; +} + +message GetWorkspaceChangesHashResponse { + string hash = 1; +} + +message RefreshGithubAccessTokenRequest { + string github_access_token = 1; + // e.g., "github.com", "gitlab.com", "gitlab.example.com" + string hostname = 2; +} + +// Empty response - success is implied by RPC completion +message RefreshGithubAccessTokenResponse { +} + +message WarmRemoteAccessServerRequest { + string commit = 1; + int32 port = 2; + string connection_token = 3; +} + +// Empty response - success is implied by RPC completion +message WarmRemoteAccessServerResponse { +} + +message ListArtifactsRequest { +} + +message ArtifactUploadMetadata { + string absolute_path = 1; + uint64 size_bytes = 2; + int64 updated_at_unix_ms = 3; + int32 status = 4; + uint64 bytes_uploaded = 5; + string last_error = 6; + uint32 upload_attempts = 7; + int64 last_started_at_unix_ms = 8; + int64 last_finished_at_unix_ms = 9; + string upload_id = 10; +} + +message ListArtifactsResponse { + repeated ArtifactUploadMetadata artifacts = 1; +} + +message UploadArtifactsRequest { + repeated ArtifactUploadInstruction uploads = 1; +} + +message ArtifactUploadInstruction { + string absolute_path = 1; + string upload_url = 2; + string method = 3; + map headers = 4; + optional string content_type = 5; + optional string slack_upload_url = 6; + optional string slack_file_id = 7; +} + +message ArtifactUploadDispatchResult { + string absolute_path = 1; + int32 status = 2; + string message = 3; + optional string slack_file_id = 4; +} + +message UploadArtifactsResponse { + repeated ArtifactUploadDispatchResult results = 1; +} + +message GetMcpRefreshTokensRequest { +} + +message GetMcpRefreshTokensResponse { + // Map from server URL to refresh token + map refresh_tokens = 1; +} + +message UpdateEnvironmentVariablesRequest { + // Environment variables to manage (plaintext values). + map env = 1; + // If true, unset previously-managed keys that are not present in `env`. + bool replace = 2; +} + +message UpdateEnvironmentVariablesResponse { + uint32 applied = 1; + uint32 removed = 2; +} + +// Check if an error is caused by the client disconnecting (e.g., due to timeout or abort). This includes errors like ERR_STREAM_DESTROYED which occur when the HTTP response stream is closed by the client while the server is still writing to it. function isClientDisconnectError(error) { if (!(error instanceof Error)) { return false; const code = error.code; return (code === "ERR_STREAM_DESTROYED" || code === "ERR_STREAM_PREMATURE_CLOSE" || code === "ECONNRESET" || code === "EPIPE"); ;// ../proto/dist/generated/aiserver/v1/mcp_pb.js // @ts-nocheck +message McpOAuthStoredData { + string refresh_token = 1; + string client_id = 2; + optional string client_secret = 3; + repeated string redirect_uris = 4; +} + +message Frame { + // Correlation ID + string id = 1; + // RPC method (e.g., "/agent.v1.ControlService/Ping") + string method = 2; + // Serialized payload + bytes data = 3; + int32 kind = 4; + // Error message (kind == ERROR) + string error = 5; +} + +// var Frame_Kind; (function (Frame_Kind) { Frame_Kind[Frame_Kind["UNSPECIFIED"] = 0] = "UNSPECIFIED"; Frame_Kind[Frame_Kind["REQUEST"] = 1] = "REQUEST"; Frame_Kind[Frame_Kind["RESPONSE"] = 2] = "RESPONSE"; Frame_Kind[Frame_Kind["ERROR"] = 3] = "ERROR"; })(Frame_Kind || (Frame_Kind = {})); // Retrieve enum metadata with: proto3.getEnumType(Frame_Kind) proto3/* int32 */.C.util.setEnumType(Frame_Kind, "agent.v1.Frame.Kind", [ { no: 0, name: "KIND_UNSPECIFIED" }, { no: 1, name: "KIND_REQUEST" }, { no: 2, name: "KIND_RESPONSE" }, { no: 3, name: "KIND_ERROR" }, ]); +message Empty { +} + +message BidiRequestId { + string request_id = 1; +} + +// Agent Service with bidirectional streaming +service AgentService { + rpc Run(AgentClientMessage) returns (AgentServerMessage); + rpc RunSSE(BidiRequestId) returns (AgentServerMessage); + // Generate a very short, succinct agent name from the provided user message. + rpc NameAgent(NameAgentRequest) returns (NameAgentResponse); + rpc GetUsableModels(GetUsableModelsRequest) returns (GetUsableModelsResponse); + rpc GetDefaultModelForCli(GetDefaultModelForCliRequest) returns (GetDefaultModelForCliResponse); + // Internal endpoint: returns all allowed model intents for devs + rpc GetAllowedModelIntents(GetAllowedModelIntentsRequest) returns (GetAllowedModelIntentsResponse); +} + +service ControlService { + // Spawn + // File read / write + rpc ReadTextFile(ReadTextFileRequest) returns (ReadTextFileResponse); + rpc WriteTextFile(WriteTextFileRequest) returns (WriteTextFileResponse); + // Binary file read / write + rpc ReadBinaryFile(ReadBinaryFileRequest) returns (ReadBinaryFileResponse); + rpc WriteBinaryFile(WriteBinaryFileRequest) returns (WriteBinaryFileResponse); + // Git + rpc GetWorkspaceChangesHash(GetWorkspaceChangesHashRequest) returns (GetWorkspaceChangesHashResponse); + rpc RefreshGithubAccessToken(RefreshGithubAccessTokenRequest) returns (RefreshGithubAccessTokenResponse); + // Remote access + rpc WarmRemoteAccessServer(WarmRemoteAccessServerRequest) returns (WarmRemoteAccessServerResponse); + // Artifact uploads + rpc ListArtifacts(ListArtifactsRequest) returns (ListArtifactsResponse); + rpc UploadArtifacts(UploadArtifactsRequest) returns (UploadArtifactsResponse); + rpc GetMcpRefreshTokens(GetMcpRefreshTokensRequest) returns (GetMcpRefreshTokensResponse); + // Update the exec-daemon's environment variables for subsequent process spawns. This does NOT affect already-running processes. + rpc UpdateEnvironmentVariables(UpdateEnvironmentVariablesRequest) returns (UpdateEnvironmentVariablesResponse); +} + +// Agent Service with unary RPC +service ExecService { +} + +service PrivateWorkerBridgeExternalService { + rpc Connect(Frame) returns (Frame); +} + +// LifecycleService is exposed by the bridge *client*, in addition to ExecService (tool calls) and ControlService (control operations "within the daemon"). It operates at a similar abstraction level as AnyrunService: it represents operations similar to creating a VM, checking out a repository, etc. +service LifecycleService { + // Resets a long-lived worker + rpc ResetInstance(Empty) returns (Empty); + // Asks worker to exit(0) so that a new worker can take his place + rpc RenewInstance(Empty) returns (Empty); +} diff --git a/packages/ai/src/providers/cursor/proto/buf.gen.yaml b/packages/ai/src/providers/cursor/proto/buf.gen.yaml new file mode 100644 index 000000000..e900c6e3b --- /dev/null +++ b/packages/ai/src/providers/cursor/proto/buf.gen.yaml @@ -0,0 +1,6 @@ +version: v2 +plugins: + - local: /work/pi/node_modules/.bin/protoc-gen-es + out: ../gen + opt: + - target=ts diff --git a/packages/ai/src/providers/cursor/proto/buf.yaml b/packages/ai/src/providers/cursor/proto/buf.yaml new file mode 100644 index 000000000..26e8cc089 --- /dev/null +++ b/packages/ai/src/providers/cursor/proto/buf.yaml @@ -0,0 +1,17 @@ +version: v2 +modules: + - path: . +lint: + use: + - STANDARD + except: + - COMMENT_FIELD + - COMMENT_MESSAGE + - COMMENT_ENUM + - COMMENT_ENUM_VALUE + - COMMENT_RPC + - COMMENT_SERVICE + - COMMENT_ONEOF +breaking: + use: + - FILE diff --git a/packages/ai/src/providers/cursor/proto/proto-extractor.py b/packages/ai/src/providers/cursor/proto/proto-extractor.py new file mode 100644 index 000000000..39199f8a7 --- /dev/null +++ b/packages/ai/src/providers/cursor/proto/proto-extractor.py @@ -0,0 +1,577 @@ +#!/usr/bin/env python3 +""" +Extracts protobuf definitions from bundled JavaScript generated by @bufbuild/protobuf. +Reconstructs .proto files with comments preserved. + +Usage: python proto-extractor.py +""" + +import re +import sys +from pathlib import Path +from dataclasses import dataclass, field +from typing import Optional + +SCALAR_TYPES = { + 1: "double", 2: "float", 3: "int64", 4: "uint64", 5: "int32", + 6: "fixed64", 7: "fixed32", 8: "bool", 9: "string", 10: "group", + 11: "message", 12: "bytes", 13: "uint32", 14: "enum", + 15: "sfixed32", 16: "sfixed64", 17: "sint32", 18: "sint64", +} + +WEBPACK_NOISE = [ + '__webpack_require__', 'harmony export', 'harmony import', + 'use strict', 'WEBPACK_IMPORTED_MODULE', 'binding', +] + +@dataclass +class FieldDef: + no: int + name: str + kind: str + type_ref: str + comment: str = "" + opt: bool = False + repeated: bool = False + oneof: Optional[str] = None + map_key: Optional[int] = None + +@dataclass +class MessageDef: + type_name: str + fields: list[FieldDef] = field(default_factory=list) + comment: str = "" + +@dataclass +class EnumValueDef: + name: str + no: int + comment: str = "" + +@dataclass +class EnumDef: + type_name: str + values: list[EnumValueDef] = field(default_factory=list) + comment: str = "" + +@dataclass +class MethodDef: + name: str + input_type: str + output_type: str + kind: str + comment: str = "" + +@dataclass +class ServiceDef: + type_name: str + methods: list[MethodDef] = field(default_factory=list) + comment: str = "" + +@dataclass +class ProtoFile: + path: str + package: str + syntax: str = "proto3" + messages: list[MessageDef] = field(default_factory=list) + enums: list[EnumDef] = field(default_factory=list) + services: list[ServiceDef] = field(default_factory=list) + imports: list[str] = field(default_factory=list) + + +def is_webpack_noise(text: str) -> bool: + """Check if text contains webpack bundler noise.""" + return any(noise in text for noise in WEBPACK_NOISE) + + +def extract_jsdoc_comment(text: str) -> str: + """Extract clean comment from JSDoc block, filtering webpack noise.""" + if is_webpack_noise(text): + return "" + + lines = [] + for line in text.split('\n'): + line = line.strip() + if line.startswith('*'): + line = line[1:].strip() + if line.startswith('/**') or line.endswith('*/'): + continue + if '@generated' in line: + continue + if is_webpack_noise(line): + continue + if line.startswith('case:') or '= { case:' in line: + continue + if line == '/' or line == '//' or len(line) <= 2: + continue + if line: + lines.append(line) + + result = ' '.join(lines) + if is_webpack_noise(result): + return "" + if len(result) <= 2: + return "" + return result + + +def parse_type_reference(rest: str) -> str: + """Parse the T: field to extract the type reference.""" + webpack_comment = re.search(r'T:\s*[^,]+/\*\s*\.?(\w+)\s*\*/', rest) + if webpack_comment: + return webpack_comment.group(1) + + type_match = re.search(r'T:\s*(\d+|[A-Za-z_][A-Za-z0-9_]*)', rest) + if type_match: + t = type_match.group(1) + if t.isdigit(): + return SCALAR_TYPES.get(int(t), f"scalar_{t}") + if is_webpack_noise(t) or t.startswith('_'): + return "unknown" + return t + + return "unknown" + + +def parse_field_list(fields_str: str, field_comments: dict[str, str]) -> list[FieldDef]: + """Parse the fields array from newFieldList.""" + fields = [] + pattern = r'\{\s*no:\s*(\d+)\s*,\s*name:\s*"([^"]+)"\s*,\s*kind:\s*"([^"]+)"([^}]*)\}' + + for m in re.finditer(pattern, fields_str): + no, name, kind, rest = int(m.group(1)), m.group(2), m.group(3), m.group(4) + type_ref = parse_type_reference(rest) + + fields.append(FieldDef( + no=no, + name=name, + kind=kind, + type_ref=type_ref, + comment=field_comments.get(name, ""), + opt='opt: true' in rest, + repeated='repeated: true' in rest, + oneof=m2.group(1) if (m2 := re.search(r'oneof:\s*"([^"]+)"', rest)) else None, + map_key=int(m2.group(1)) if (m2 := re.search(r'mapKey:\s*(\d+)', rest)) else None, + )) + + return fields + + +def extract_field_comments(class_body: str) -> dict[str, str]: + """Extract field comments from class property declarations.""" + comments = {} + pattern = r'/\*\*([\s\S]*?)@generated from field:[^*]*\*/\s*\n?\s*(\w+)' + + for m in re.finditer(pattern, class_body): + comment_text = extract_jsdoc_comment(m.group(1)) + field_name_camel = m.group(2) + field_name_snake = re.sub(r'([A-Z])', r'_\1', field_name_camel).lower().lstrip('_') + if comment_text and not is_webpack_noise(comment_text): + comments[field_name_snake] = comment_text + + return comments + + +def find_file_for_pos(file_ranges: dict[str, list[tuple[int, int]]], pos: int) -> str | None: + """Find which file a position belongs to.""" + for fp, segments in file_ranges.items(): + for start, end in segments: + if start <= pos < end: + return fp + return None + + +def extract_messages(content: str, file_ranges: dict[str, list[tuple[int, int]]]) -> dict[str, list[MessageDef]]: + """Extract all message definitions grouped by file.""" + messages_by_file: dict[str, list[MessageDef]] = {} + seen_types: set[str] = set() + + pattern = re.compile( + r'/\*\*([\s\S]*?)@generated from message ([^\s*]+)[\s\S]*?\*/' + r'[\s\S]*?class (\w+) extends [^{]+\{' + r'([\s\S]*?)' + r'static typeName\s*=\s*"([^"]+)"' + r'[\s\S]*?' + r'static fields\s*=\s*[^(]+\(\(\)\s*=>\s*\[([\s\S]*?)\]\)', + re.MULTILINE + ) + + for m in pattern.finditer(content): + comment_block, _, class_name, class_body, type_name, fields_str = m.groups() + pos = m.start() + + if type_name in seen_types: + continue + seen_types.add(type_name) + + file_path = find_file_for_pos(file_ranges, pos) + if not file_path: + continue + + comment = extract_jsdoc_comment(comment_block) + field_comments = extract_field_comments(class_body) + fields = parse_field_list(fields_str, field_comments) + + msg = MessageDef(type_name=type_name, fields=fields, comment=comment) + messages_by_file.setdefault(file_path, []).append(msg) + + return messages_by_file + + +def extract_enums(content: str, file_ranges: dict[str, list[tuple[int, int]]]) -> dict[str, list[EnumDef]]: + """Extract all enum definitions grouped by file.""" + enums_by_file: dict[str, list[EnumDef]] = {} + seen_types: set[str] = set() + + enum_block_pattern = re.compile( + r'/\*\*([\s\S]*?)@generated from enum ([^\s*]+)[\s\S]*?\*/' + r'[\s\S]*?' + r'setEnumType\([^,]+,\s*"([^"]+)",\s*\[([\s\S]*?)\]\)', + re.MULTILINE + ) + + for m in enum_block_pattern.finditer(content): + comment_block, _, type_name, values_str = m.groups() + pos = m.start() + + if type_name in seen_types: + continue + seen_types.add(type_name) + + file_path = find_file_for_pos(file_ranges, pos) + if not file_path: + continue + + comment = extract_jsdoc_comment(comment_block) + + values = [] + value_pattern = r'\{\s*no:\s*(\d+)\s*,\s*name:\s*"([^"]+)"\s*\}' + for vm in re.finditer(value_pattern, values_str): + values.append(EnumValueDef(no=int(vm.group(1)), name=vm.group(2))) + + enum = EnumDef(type_name=type_name, values=values, comment=comment) + enums_by_file.setdefault(file_path, []).append(enum) + + return enums_by_file + + +def resolve_webpack_type(ref: str) -> str: + """Resolve a webpack type reference like 'agent_service_pb/* AgentClientMessage */.KS'.""" + webpack_comment = re.search(r'/\*\s*(\w+)\s*\*/', ref) + if webpack_comment: + return webpack_comment.group(1) + parts = ref.replace(',', '').strip().split('.') + return parts[-1] if parts else ref + + +def extract_services(content: str, file_ranges: dict[str, list[tuple[int, int]]]) -> dict[str, list[ServiceDef]]: + """Extract all service definitions grouped by file.""" + services_by_file: dict[str, list[ServiceDef]] = {} + seen_types: set[str] = set() + + service_pattern = re.compile( + r'/\*\*([^*]|\*[^/])*@generated from service ([^\s*]+)([^*]|\*[^/])*\*/' + r'\s*(?:const|var)\s+\w+\s*=\s*\{' + r'[^}]*typeName:\s*"([^"]+)"' + r'[^}]*methods:\s*\{([\s\S]*?)\}\s*\}', + re.MULTILINE + ) + + for m in service_pattern.finditer(content): + groups = m.groups() + type_name = groups[3] # typeName + methods_str = groups[4] # methods content + pos = m.start() + + if type_name in seen_types: + continue + seen_types.add(type_name) + + file_path = find_file_for_pos(file_ranges, pos) + if not file_path: + continue + + # Extract comment from the match text before @generated + full_match = m.group(0) + comment_end = full_match.find('@generated') + comment_text = full_match[3:comment_end] if comment_end > 0 else "" + comment = extract_jsdoc_comment(comment_text) + + methods = [] + method_pattern = re.compile( + r'/\*\*([\s\S]*?)@generated from rpc [^\s*]+\.(\w+)[\s\S]*?\*/' + r'\s*\w+:\s*\{' + r'[^}]*name:\s*"([^"]+)"' + r'[^}]*I:\s*([^,]+),' + r'[^}]*O:\s*([^,]+),' + r'[^}]*kind:\s*[^.]+\.(\w+)', + re.MULTILINE + ) + + for mm in method_pattern.finditer(methods_str): + method_comment, _, name, input_ref, output_ref, kind = mm.groups() + + methods.append(MethodDef( + name=name, + input_type=resolve_webpack_type(input_ref), + output_type=resolve_webpack_type(output_ref), + kind=kind, + comment=extract_jsdoc_comment(method_comment), + )) + + svc = ServiceDef(type_name=type_name, methods=methods, comment=comment) + services_by_file.setdefault(file_path, []).append(svc) + + return services_by_file + + +def find_file_ranges(content: str) -> dict[str, tuple[int, int]]: + """Find the byte ranges for each proto file in the bundle. + + A file may appear multiple times (e.g., messages in _pb.js and services in _connect.js). + We collect all ranges and merge them so all occurrences are captured. + """ + file_pattern = re.compile( + r'// @generated from file ([^\s]+) \(package ([^,]+), syntax (\w+)\)' + ) + + matches = list(file_pattern.finditer(content)) + + file_segments: dict[str, list[tuple[int, int]]] = {} + + for i, m in enumerate(matches): + file_path = m.group(1) + start = m.start() + end = matches[i + 1].start() if i + 1 < len(matches) else len(content) + + if file_path not in file_segments: + file_segments[file_path] = [] + file_segments[file_path].append((start, end)) + + ranges = {} + for file_path, segments in file_segments.items(): + ranges[file_path] = segments + + return ranges + + +def field_to_proto(f: FieldDef, indent: str = " ") -> str: + """Convert a field definition to proto3 syntax.""" + lines = [] + + if f.comment: + lines.append(f"{indent}// {f.comment}") + + if f.kind == "map": + key_type = SCALAR_TYPES.get(f.map_key, "string") if f.map_key else "string" + lines.append(f"{indent}map<{key_type}, {f.type_ref}> {f.name} = {f.no};") + else: + prefix = "" + if f.opt: + prefix = "optional " + elif f.repeated: + prefix = "repeated " + lines.append(f"{indent}{prefix}{f.type_ref} {f.name} = {f.no};") + + return '\n'.join(lines) + + +def get_simple_name(type_name: str) -> str: + """Get a unique message name from a fully qualified type name. + + Handles nested types like 'agent.v1.Outer.Inner' by converting to 'Outer_Inner'. + """ + parts = type_name.split('.') + # Skip the package prefix (e.g., 'agent.v1') + if len(parts) > 2: + return '_'.join(parts[2:]) + return parts[-1] + + +def message_to_proto(msg: MessageDef, indent: str = "") -> str: + """Convert a message definition to proto3 syntax.""" + lines = [] + name = get_simple_name(msg.type_name) + + if msg.comment: + lines.append(f"{indent}// {msg.comment}") + + lines.append(f"{indent}message {name} {{") + + oneof_groups: dict[str, list[FieldDef]] = {} + regular_fields: list[FieldDef] = [] + + for f in msg.fields: + if f.oneof: + oneof_groups.setdefault(f.oneof, []).append(f) + else: + regular_fields.append(f) + + for f in regular_fields: + lines.append(field_to_proto(f, indent + " ")) + + for oneof_name, fields in oneof_groups.items(): + lines.append(f"{indent} oneof {oneof_name} {{") + for f in fields: + if f.comment: + lines.append(f"{indent} // {f.comment}") + lines.append(f"{indent} {f.type_ref} {f.name} = {f.no};") + lines.append(f"{indent} }}") + + lines.append(f"{indent}}}") + return '\n'.join(lines) + + +def enum_to_proto(enum: EnumDef, indent: str = "") -> str: + """Convert an enum definition to proto3 syntax.""" + lines = [] + name = get_simple_name(enum.type_name) + + if enum.comment: + lines.append(f"{indent}// {enum.comment}") + + lines.append(f"{indent}enum {name} {{") + for v in enum.values: + if v.comment: + lines.append(f"{indent} // {v.comment}") + lines.append(f"{indent} {v.name} = {v.no};") + lines.append(f"{indent}}}") + return '\n'.join(lines) + + +def service_to_proto(svc: ServiceDef, indent: str = "") -> str: + """Convert a service definition to proto3 syntax.""" + lines = [] + name = get_simple_name(svc.type_name) + + if svc.comment: + lines.append(f"{indent}// {svc.comment}") + + lines.append(f"{indent}service {name} {{") + + for m in svc.methods: + if m.comment: + lines.append(f"{indent} // {m.comment}") + + stream_in = "stream " if m.kind in ("ClientStreaming", "BiDiStreaming") else "" + stream_out = "stream " if m.kind in ("ServerStreaming", "BiDiStreaming") else "" + + lines.append(f"{indent} rpc {m.name}({stream_in}{m.input_type}) returns ({stream_out}{m.output_type});") + + lines.append(f"{indent}}}") + return '\n'.join(lines) + + +def generate_proto_file(proto: ProtoFile) -> str: + """Generate complete proto file content.""" + lines = [ + f'syntax = "{proto.syntax}";', + '', + f'package {proto.package};', + '', + ] + + for enum in proto.enums: + lines.append(enum_to_proto(enum)) + lines.append('') + + for msg in proto.messages: + lines.append(message_to_proto(msg)) + lines.append('') + + for svc in proto.services: + lines.append(service_to_proto(svc)) + lines.append('') + + return '\n'.join(lines) + + +def main(): + if len(sys.argv) < 3: + print("Usage: python proto-extractor.py ") + print("") + print("Options:") + print(" --filter= Only extract types from package (e.g., agent.v1)") + sys.exit(1) + + input_file = sys.argv[1] + output_file = Path(sys.argv[2]) + + filter_pkg = None + for arg in sys.argv[3:]: + if arg.startswith('--filter='): + filter_pkg = arg.split('=')[1] + + print(f"Reading {input_file}...", file=sys.stderr) + with open(input_file, 'r', encoding='utf-8', errors='replace') as f: + content = f.read() + + print(f"File size: {len(content) / 1024 / 1024:.2f} MB", file=sys.stderr) + + print("Finding file boundaries...", file=sys.stderr) + file_ranges = find_file_ranges(content) + print(f"Found {len(file_ranges)} proto files", file=sys.stderr) + + print("Extracting messages...", file=sys.stderr) + messages_by_file = extract_messages(content, file_ranges) + + print("Extracting enums...", file=sys.stderr) + enums_by_file = extract_enums(content, file_ranges) + + print("Extracting services...", file=sys.stderr) + services_by_file = extract_services(content, file_ranges) + + file_pattern = re.compile( + r'// @generated from file ([^\s]+) \(package ([^,]+), syntax (\w+)\)' + ) + + # Collect all messages, enums, services into one consolidated proto + all_messages: dict[str, MessageDef] = {} + all_enums: dict[str, EnumDef] = {} + all_services: dict[str, ServiceDef] = {} + seen_files: set[str] = set() + package = None + + for m in file_pattern.finditer(content): + file_path, pkg, syntax = m.groups() + if filter_pkg and not pkg.startswith(filter_pkg): + continue + if file_path in seen_files: + continue + seen_files.add(file_path) + if package is None: + package = pkg + for msg in messages_by_file.get(file_path, []): + if msg.type_name not in all_messages: + all_messages[msg.type_name] = msg + for enum in enums_by_file.get(file_path, []): + if enum.type_name not in all_enums: + all_enums[enum.type_name] = enum + for svc in services_by_file.get(file_path, []): + if svc.type_name not in all_services: + all_services[svc.type_name] = svc + + if package is None: + print("No matching proto files found", file=sys.stderr) + sys.exit(1) + + # Create consolidated proto file + consolidated = ProtoFile( + path=str(output_file), + package=package, + syntax="proto3", + messages=list(all_messages.values()), + enums=list(all_enums.values()), + services=list(all_services.values()), + ) + + output_file.parent.mkdir(parents=True, exist_ok=True) + proto_content = generate_proto_file(consolidated) + output_file.write_text(proto_content) + + print(f"\nTotal: {len(all_messages)} messages, {len(all_enums)} enums, {len(all_services)} services", file=sys.stderr) + print(f"Output written to: {output_file}", file=sys.stderr) + + +if __name__ == "__main__": + main() diff --git a/packages/ai/src/stream.ts b/packages/ai/src/stream.ts index 9db997381..c320d3ee5 100644 --- a/packages/ai/src/stream.ts +++ b/packages/ai/src/stream.ts @@ -3,6 +3,7 @@ import { homedir } from "node:os"; import { join } from "node:path"; import { supportsXhigh } from "./models"; import { type AnthropicOptions, streamAnthropic } from "./providers/anthropic"; +import { type CursorOptions, streamCursor } from "./providers/cursor"; import { type GoogleOptions, streamGoogle } from "./providers/google"; import { type GoogleGeminiCliOptions, @@ -82,6 +83,7 @@ export function getEnvApiKey(provider: any): string | undefined { zai: "ZAI_API_KEY", mistral: "MISTRAL_API_KEY", opencode: "OPENCODE_API_KEY", + cursor: "CURSOR_ACCESS_TOKEN", }; const envVar = envMap[provider]; @@ -128,6 +130,9 @@ export function stream( providerOptions as GoogleGeminiCliOptions, ); + case "cursor-agent": + return streamCursor(model as Model<"cursor-agent">, context, providerOptions as CursorOptions); + default: { // This should never be reached if all Api cases are handled const _exhaustive: never = api; @@ -185,6 +190,7 @@ function mapOptionsForApi( signal: options?.signal, apiKey: apiKey || options?.apiKey, sessionId: options?.sessionId, + execHandlers: options?.execHandlers, }; // Helper to clamp xhigh to high for providers that don't support it @@ -353,6 +359,16 @@ function mapOptionsForApi( } satisfies GoogleVertexOptions; } + case "cursor-agent": { + const execHandlers = options?.cursorExecHandlers ?? options?.execHandlers; + const onToolResult = options?.cursorOnToolResult ?? execHandlers?.onToolResult; + return { + ...base, + execHandlers, + onToolResult, + } satisfies CursorOptions; + } + default: { // Exhaustiveness check const _exhaustive: never = model.api; diff --git a/packages/ai/src/types.ts b/packages/ai/src/types.ts index 94ac57a12..be0a1816d 100644 --- a/packages/ai/src/types.ts +++ b/packages/ai/src/types.ts @@ -1,4 +1,22 @@ import type { AnthropicOptions } from "./providers/anthropic"; +import type { CursorOptions } from "./providers/cursor"; +import type { + DeleteArgs, + DeleteResult, + DiagnosticsArgs, + DiagnosticsResult, + GrepArgs, + GrepResult, + LsArgs, + LsResult, + McpResult, + ReadArgs, + ReadResult, + ShellArgs, + ShellResult, + WriteArgs, + WriteResult, +} from "./providers/cursor/gen/agent_pb"; import type { GoogleOptions } from "./providers/google"; import type { GoogleGeminiCliOptions } from "./providers/google-gemini-cli"; import type { GoogleVertexOptions } from "./providers/google-vertex"; @@ -16,7 +34,8 @@ export type Api = | "anthropic-messages" | "google-generative-ai" | "google-gemini-cli" - | "google-vertex"; + | "google-vertex" + | "cursor-agent"; export interface ApiOptionsMap { "anthropic-messages": AnthropicOptions; @@ -26,6 +45,7 @@ export interface ApiOptionsMap { "google-generative-ai": GoogleOptions; "google-gemini-cli": GoogleGeminiCliOptions; "google-vertex": GoogleVertexOptions; + "cursor-agent": CursorOptions; } // Compile-time exhaustiveness check - this will fail if ApiOptionsMap doesn't have all KnownApi keys @@ -49,6 +69,7 @@ export type KnownProvider = | "openai" | "openai-codex" | "github-copilot" + | "cursor" | "xai" | "groq" | "cerebras" @@ -80,6 +101,8 @@ export interface StreamOptions { * session-aware features. Ignored by providers that don't support it. */ sessionId?: string; + /** Cursor exec/MCP tool handlers (cursor-agent only). */ + execHandlers?: CursorExecHandlers; } // Unified options with reasoning passed to streamSimple() and completeSimple() @@ -87,6 +110,10 @@ export interface SimpleStreamOptions extends StreamOptions { reasoning?: ThinkingLevel; /** Custom token budgets for thinking levels (token-based providers only) */ thinkingBudgets?: ThinkingBudgets; + /** Cursor exec handlers for local tool execution */ + cursorExecHandlers?: CursorExecHandlers; + /** Hook to handle tool results from Cursor exec */ + cursorOnToolResult?: CursorToolResultHandler; } // Generic StreamFunction with typed options @@ -169,6 +196,33 @@ export interface ToolResultMessage { export type Message = UserMessage | AssistantMessage | ToolResultMessage; +export type CursorExecHandlerResult = { result: T; toolResult?: ToolResultMessage } | T | ToolResultMessage; + +export type CursorToolResultHandler = ( + result: ToolResultMessage, +) => ToolResultMessage | undefined | Promise; + +export interface CursorMcpCall { + name: string; + providerIdentifier: string; + toolName: string; + toolCallId: string; + args: Record; + rawArgs: Record; +} + +export interface CursorExecHandlers { + read?: (args: ReadArgs) => Promise>; + ls?: (args: LsArgs) => Promise>; + grep?: (args: GrepArgs) => Promise>; + write?: (args: WriteArgs) => Promise>; + delete?: (args: DeleteArgs) => Promise>; + shell?: (args: ShellArgs) => Promise>; + diagnostics?: (args: DiagnosticsArgs) => Promise>; + mcp?: (call: CursorMcpCall) => Promise>; + onToolResult?: CursorToolResultHandler; +} + import type { TSchema } from "@sinclair/typebox"; export interface Tool { diff --git a/packages/ai/src/utils/oauth/cursor.ts b/packages/ai/src/utils/oauth/cursor.ts new file mode 100644 index 000000000..50218af94 --- /dev/null +++ b/packages/ai/src/utils/oauth/cursor.ts @@ -0,0 +1,157 @@ +import { generatePKCE } from "./pkce"; +import type { OAuthCredentials } from "./types"; + +const CURSOR_LOGIN_URL = "https://cursor.com/loginDeepControl"; +const CURSOR_POLL_URL = "https://api2.cursor.sh/auth/poll"; +const CURSOR_REFRESH_URL = "https://api2.cursor.sh/auth/exchange_user_api_key"; + +const POLL_MAX_ATTEMPTS = 150; +const POLL_BASE_DELAY = 1000; +const POLL_MAX_DELAY = 10000; +const POLL_BACKOFF_MULTIPLIER = 1.2; + +function sleep(ms: number): Promise { + return new Promise((resolve) => setTimeout(resolve, ms)); +} + +export interface CursorAuthParams { + verifier: string; + challenge: string; + uuid: string; + loginUrl: string; +} + +export async function generateCursorAuthParams(): Promise { + const { verifier, challenge } = await generatePKCE(); + const uuid = crypto.randomUUID(); + + const params = new URLSearchParams({ + challenge, + uuid, + mode: "login", + redirectTarget: "cli", + }); + + const loginUrl = `${CURSOR_LOGIN_URL}?${params.toString()}`; + + return { verifier, challenge, uuid, loginUrl }; +} + +export async function pollCursorAuth( + uuid: string, + verifier: string, +): Promise<{ accessToken: string; refreshToken: string }> { + let delay = POLL_BASE_DELAY; + let consecutiveErrors = 0; + + for (let attempt = 0; attempt < POLL_MAX_ATTEMPTS; attempt++) { + await sleep(delay); + + try { + const response = await fetch(`${CURSOR_POLL_URL}?uuid=${uuid}&verifier=${verifier}`); + + if (response.status === 404) { + consecutiveErrors = 0; + delay = Math.min(delay * POLL_BACKOFF_MULTIPLIER, POLL_MAX_DELAY); + continue; + } + + if (response.ok) { + const data = (await response.json()) as { + accessToken: string; + refreshToken: string; + }; + return { + accessToken: data.accessToken, + refreshToken: data.refreshToken, + }; + } + + throw new Error(`Poll failed: ${response.status}`); + } catch (_error) { + consecutiveErrors++; + if (consecutiveErrors >= 3) { + throw new Error("Too many consecutive errors during Cursor auth polling"); + } + } + } + + throw new Error("Cursor authentication polling timeout"); +} + +export async function loginCursor( + onAuthUrl: (url: string) => void, + onPollStart?: () => void, +): Promise { + const { verifier, uuid, loginUrl } = await generateCursorAuthParams(); + + onAuthUrl(loginUrl); + onPollStart?.(); + + const { accessToken, refreshToken } = await pollCursorAuth(uuid, verifier); + + const expiresAt = getTokenExpiry(accessToken); + + return { + access: accessToken, + refresh: refreshToken, + expires: expiresAt, + }; +} + +export async function refreshCursorToken(apiKeyOrRefreshToken: string): Promise { + const response = await fetch(CURSOR_REFRESH_URL, { + method: "POST", + headers: { + Authorization: `Bearer ${apiKeyOrRefreshToken}`, + "Content-Type": "application/json", + }, + body: "{}", + }); + + if (!response.ok) { + const error = await response.text(); + throw new Error(`Cursor token refresh failed: ${error}`); + } + + const data = (await response.json()) as { + accessToken: string; + refreshToken: string; + }; + + const expiresAt = getTokenExpiry(data.accessToken); + + return { + access: data.accessToken, + refresh: data.refreshToken || apiKeyOrRefreshToken, + expires: expiresAt, + }; +} + +function getTokenExpiry(token: string): number { + try { + const [, payload] = token.split("."); + if (!payload) { + return Date.now() + 3600 * 1000; + } + const decoded = JSON.parse(atob(payload.replace(/-/g, "+").replace(/_/g, "/"))); + if (decoded.exp) { + return decoded.exp * 1000 - 5 * 60 * 1000; + } + } catch { + // Ignore parsing errors + } + return Date.now() + 3600 * 1000; +} + +export function isTokenExpiringSoon(token: string, thresholdSeconds = 300): boolean { + try { + const [, payload] = token.split("."); + if (!payload) return true; + const decoded = JSON.parse(atob(payload.replace(/-/g, "+").replace(/_/g, "/"))); + const currentTime = Math.floor(Date.now() / 1000); + return decoded.exp - currentTime < thresholdSeconds; + } catch { + return true; + } +} diff --git a/packages/ai/src/utils/oauth/index.ts b/packages/ai/src/utils/oauth/index.ts index e06667999..beabf2472 100644 --- a/packages/ai/src/utils/oauth/index.ts +++ b/packages/ai/src/utils/oauth/index.ts @@ -11,6 +11,14 @@ // Anthropic export { loginAnthropic, refreshAnthropicToken } from "./anthropic"; +// Cursor +export { + generateCursorAuthParams, + isTokenExpiringSoon as isCursorTokenExpiringSoon, + loginCursor, + pollCursorAuth, + refreshCursorToken, +} from "./cursor"; // GitHub Copilot export { getGitHubCopilotBaseUrl, @@ -41,6 +49,7 @@ export * from "./types"; // ============================================================================ import { refreshAnthropicToken } from "./anthropic"; +import { refreshCursorToken } from "./cursor"; import { refreshGitHubCopilotToken } from "./github-copilot"; import { refreshAntigravityToken } from "./google-antigravity"; import { refreshGoogleCloudToken } from "./google-gemini-cli"; @@ -83,6 +92,9 @@ export async function refreshOAuthToken( case "openai-codex": newCredentials = await refreshOpenAICodexToken(credentials.refresh); break; + case "cursor": + newCredentials = await refreshCursorToken(credentials.refresh); + break; default: throw new Error(`Unknown OAuth provider: ${provider}`); } @@ -153,5 +165,10 @@ export function getOAuthProviders(): OAuthProviderInfo[] { name: "Antigravity (Gemini 3, Claude, GPT-OSS)", available: true, }, + { + id: "cursor", + name: "Cursor (Claude, GPT, etc.)", + available: true, + }, ]; } diff --git a/packages/ai/src/utils/oauth/types.ts b/packages/ai/src/utils/oauth/types.ts index 245d93f6a..6adba93f2 100644 --- a/packages/ai/src/utils/oauth/types.ts +++ b/packages/ai/src/utils/oauth/types.ts @@ -13,7 +13,8 @@ export type OAuthProvider = | "github-copilot" | "google-gemini-cli" | "google-antigravity" - | "openai-codex"; + | "openai-codex" + | "cursor"; export type OAuthPrompt = { message: string; diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index 8e0867349..3cdca350f 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -1,6 +1,13 @@ # Changelog ## [Unreleased] + +### Added + +- Added Cursor provider support with browser-based OAuth authentication +- Added default model configuration for Cursor provider (claude-sonnet-4-5) +- Added execution bridge for Cursor tool calls including read, ls, grep, write, delete, shell, diagnostics, and MCP operations + ### Fixed - Improved fuzzy matching accuracy for edit operations when file and target have inconsistent indentation patterns diff --git a/packages/coding-agent/src/core/auth-storage.ts b/packages/coding-agent/src/core/auth-storage.ts index f19d6ec70..35099af92 100644 --- a/packages/coding-agent/src/core/auth-storage.ts +++ b/packages/coding-agent/src/core/auth-storage.ts @@ -9,6 +9,7 @@ import { getOAuthApiKey, loginAnthropic, loginAntigravity, + loginCursor, loginGeminiCli, loginGitHubCopilot, loginOpenAICodex, @@ -585,6 +586,12 @@ export class AuthStorage { onManualCodeInput: callbacks.onManualCodeInput, }); break; + case "cursor": + credentials = await loginCursor( + (url) => callbacks.onAuth({ url }), + callbacks.onProgress ? () => callbacks.onProgress?.("Waiting for browser authentication...") : undefined, + ); + break; default: throw new Error(`Unknown OAuth provider: ${provider}`); } diff --git a/packages/coding-agent/src/core/cursor/exec-bridge.ts b/packages/coding-agent/src/core/cursor/exec-bridge.ts new file mode 100644 index 000000000..b32e9a427 --- /dev/null +++ b/packages/coding-agent/src/core/cursor/exec-bridge.ts @@ -0,0 +1,234 @@ +import { randomUUID } from "node:crypto"; +import { rmSync, statSync } from "node:fs"; +import type { + AgentEvent, + AgentTool, + AgentToolContext, + AgentToolResult, + AgentToolUpdateCallback, +} from "@oh-my-pi/pi-agent-core"; +import type { CursorExecHandlers, CursorMcpCall, ToolResultMessage } from "@oh-my-pi/pi-ai"; +import { resolveToCwd } from "../tools/path-utils"; + +interface CursorExecBridgeOptions { + cwd: string; + tools: Map; + getToolContext?: () => AgentToolContext | undefined; + emitEvent?: (event: AgentEvent) => void; +} + +function createToolResultMessage( + toolCallId: string, + toolName: string, + result: AgentToolResult, + isError: boolean, +): ToolResultMessage { + return { + role: "toolResult", + toolCallId, + toolName, + content: result.content, + details: result.details, + isError, + timestamp: Date.now(), + }; +} + +function buildToolErrorResult(message: string): AgentToolResult { + return { + content: [{ type: "text", text: message }], + details: {}, + }; +} + +async function executeTool( + options: CursorExecBridgeOptions, + toolName: string, + toolCallId: string, + args: Record, +): Promise { + const tool = options.tools.get(toolName); + if (!tool) { + const result = buildToolErrorResult(`Tool "${toolName}" not available`); + return createToolResultMessage(toolCallId, toolName, result, true); + } + + options.emitEvent?.({ type: "tool_execution_start", toolCallId, toolName, args }); + + let result: AgentToolResult; + let isError = false; + + const onUpdate: AgentToolUpdateCallback | undefined = options.emitEvent + ? (partialResult) => { + options.emitEvent?.({ + type: "tool_execution_update", + toolCallId, + toolName, + args, + partialResult, + }); + } + : undefined; + + try { + result = await tool.execute( + toolCallId, + args as Record, + undefined, + onUpdate, + options.getToolContext?.(), + ); + } catch (error) { + const message = error instanceof Error ? error.message : String(error); + result = buildToolErrorResult(message); + isError = true; + } + + options.emitEvent?.({ type: "tool_execution_end", toolCallId, toolName, result, isError }); + + return createToolResultMessage(toolCallId, toolName, result, isError); +} + +async function executeDelete(options: CursorExecBridgeOptions, pathArg: string, toolCallId: string) { + const toolName = "delete"; + options.emitEvent?.({ type: "tool_execution_start", toolCallId, toolName, args: { path: pathArg } }); + + const absolutePath = resolveToCwd(pathArg, options.cwd); + let isError = false; + let result: AgentToolResult; + + try { + const stat = statSync(absolutePath, { throwIfNoEntry: false }); + if (!stat) { + throw new Error(`File not found: ${pathArg}`); + } + if (!stat.isFile()) { + throw new Error(`Path is not a file: ${pathArg}`); + } + + rmSync(absolutePath); + + const sizeText = stat.size ? ` (${stat.size} bytes)` : ""; + const message = `Deleted ${pathArg}${sizeText}`; + result = { content: [{ type: "text", text: message }], details: {} }; + } catch (error) { + const message = error instanceof Error ? error.message : String(error); + result = buildToolErrorResult(message); + isError = true; + } + + options.emitEvent?.({ type: "tool_execution_end", toolCallId, toolName, result, isError }); + return createToolResultMessage(toolCallId, toolName, result, isError); +} + +function decodeToolCallId(toolCallId?: string): string { + return toolCallId && toolCallId.length > 0 ? toolCallId : randomUUID(); +} + +function decodeMcpArgs(rawArgs: Record): Record { + const decoded: Record = {}; + for (const [key, value] of Object.entries(rawArgs)) { + const text = new TextDecoder().decode(value); + try { + decoded[key] = JSON.parse(text); + } catch { + decoded[key] = text; + } + } + return decoded; +} + +function formatMcpToolErrorMessage(toolName: string, availableTools: string[]): string { + const list = availableTools.length > 0 ? availableTools.join(", ") : "none"; + return `MCP tool "${toolName}" not found. Available tools: ${list}`; +} + +export function createCursorExecHandlers(options: CursorExecBridgeOptions): CursorExecHandlers { + return { + read: async (args) => { + const toolCallId = decodeToolCallId(args.toolCallId); + const toolResultMessage = await executeTool(options, "read", toolCallId, { path: args.path }); + return toolResultMessage; + }, + ls: async (args) => { + const toolCallId = decodeToolCallId(args.toolCallId); + const toolResultMessage = await executeTool(options, "ls", toolCallId, { path: args.path }); + return toolResultMessage; + }, + grep: async (args) => { + const toolCallId = decodeToolCallId(args.toolCallId); + const toolResultMessage = await executeTool(options, "grep", toolCallId, { + pattern: args.pattern, + path: args.path || undefined, + glob: args.glob || undefined, + outputMode: args.outputMode || undefined, + context: args.context ?? args.contextBefore ?? args.contextAfter ?? undefined, + ignoreCase: args.caseInsensitive || undefined, + type: args.type || undefined, + headLimit: args.headLimit ?? undefined, + multiline: args.multiline || undefined, + }); + return toolResultMessage; + }, + write: async (args) => { + const toolCallId = decodeToolCallId(args.toolCallId); + const content = args.fileText ?? new TextDecoder().decode(args.fileBytes ?? new Uint8Array()); + const toolResultMessage = await executeTool(options, "write", toolCallId, { + path: args.path, + content, + }); + return toolResultMessage; + }, + delete: async (args) => { + const toolCallId = decodeToolCallId(args.toolCallId); + const toolResultMessage = await executeDelete(options, args.path, toolCallId); + return toolResultMessage; + }, + shell: async (args) => { + const toolCallId = decodeToolCallId(args.toolCallId); + const timeoutSeconds = + args.timeout && args.timeout > 0 + ? args.timeout > 1000 + ? Math.ceil(args.timeout / 1000) + : args.timeout + : undefined; + const toolResultMessage = await executeTool(options, "bash", toolCallId, { + command: args.command, + workdir: args.workingDirectory || undefined, + timeout: timeoutSeconds, + }); + return toolResultMessage; + }, + diagnostics: async (args) => { + const toolCallId = decodeToolCallId(args.toolCallId); + const toolResultMessage = await executeTool(options, "lsp", toolCallId, { + action: "diagnostics", + file: args.path, + }); + return toolResultMessage; + }, + mcp: async (call: CursorMcpCall) => { + const toolName = call.toolName || call.name; + const toolCallId = decodeToolCallId(call.toolCallId); + const tool = options.tools.get(toolName); + if (!tool) { + const availableTools = Array.from(options.tools.keys()).filter((name) => name.startsWith("mcp_")); + const message = formatMcpToolErrorMessage(toolName, availableTools); + const toolResult: ToolResultMessage = { + role: "toolResult", + toolCallId, + toolName, + content: [{ type: "text", text: message }], + details: {}, + isError: true, + timestamp: Date.now(), + }; + return toolResult; + } + + const args = Object.keys(call.args ?? {}).length > 0 ? call.args : decodeMcpArgs(call.rawArgs ?? {}); + const toolResultMessage = await executeTool(options, toolName, toolCallId, args); + return toolResultMessage; + }, + }; +} diff --git a/packages/coding-agent/src/core/model-resolver.ts b/packages/coding-agent/src/core/model-resolver.ts index 26ac5e493..355d34fd4 100644 --- a/packages/coding-agent/src/core/model-resolver.ts +++ b/packages/coding-agent/src/core/model-resolver.ts @@ -19,6 +19,7 @@ export const defaultModelPerProvider: Record = { "google-antigravity": "gemini-3-pro-high", "google-vertex": "gemini-2.5-pro", "github-copilot": "gpt-4o", + cursor: "claude-sonnet-4-5", openrouter: "openai/gpt-5.1-codex", xai: "grok-4-fast-non-reasoning", groq: "openai/gpt-oss-120b", diff --git a/packages/coding-agent/src/core/sdk.ts b/packages/coding-agent/src/core/sdk.ts index cc0a8ff2b..c9c2651fe 100644 --- a/packages/coding-agent/src/core/sdk.ts +++ b/packages/coding-agent/src/core/sdk.ts @@ -27,7 +27,7 @@ */ import { join } from "node:path"; -import { Agent, type AgentMessage, type AgentTool, type ThinkingLevel } from "@oh-my-pi/pi-agent-core"; +import { Agent, type AgentEvent, type AgentMessage, type AgentTool, type ThinkingLevel } from "@oh-my-pi/pi-agent-core"; import type { Message, Model } from "@oh-my-pi/pi-ai"; import type { Component } from "@oh-my-pi/pi-tui"; import chalk from "chalk"; @@ -40,6 +40,7 @@ import { initializeWithSettings } from "../discovery"; import { registerAsyncCleanup } from "../modes/cleanup"; import { AgentSession } from "./agent-session"; import { AuthStorage } from "./auth-storage"; +import { createCursorExecHandlers } from "./cursor/exec-bridge"; import { type CustomCommandsLoadResult, loadCustomCommands as loadCustomCommandsInternal, @@ -854,6 +855,14 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {} } time("combineTools"); + let cursorEventEmitter: ((event: AgentEvent) => void) | undefined; + const cursorExecHandlers = createCursorExecHandlers({ + cwd, + tools: toolRegistry, + getToolContext: toolContextStore.getContext, + emitEvent: (event) => cursorEventEmitter?.(event), + }); + const rebuildSystemPrompt = async (toolNames: string[], tools: Map): Promise => { toolContextStore.setToolNames(toolNames); const defaultPrompt = await buildSystemPromptInternal({ @@ -964,7 +973,9 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {} } return key; }, + cursorExecHandlers, }); + cursorEventEmitter = (event) => agent.emitExternalEvent(event); time("createAgent"); // Restore messages if session has existing data