The sanitizeSchemaForGoogle function was incorrectly stripping property
names like "pattern" and "format" from tool schemas because they matched
JSON Schema keywords in UNSUPPORTED_SCHEMA_FIELDS. This caused errors
like "required fields ['pattern'] are not defined in the schema properties"
when using tools like grep/find with Google's Cloud Code Assist API.
Modified the sanitization to track when processing inside a "properties"
object, only stripping schema keywords at the schema level, not when
they appear as property names.
- Added 12 new unsupported JSON Schema fields to Google provider sanitization including patternProperties, additionalProperties, min/max constraints, pattern, and format.
- Removed unsupported JSON Schema constraints from tool schemas to ensure Google AI compatibility.
- Fixed Google provider schema sanitization to collapse anyOf/oneOf with const values into enum arrays.
- Fixed const-to-enum conversion to infer type from const value when type is not specified.
- Changed review finding priority format from numeric (0-3) to string labels (P0-P3).
- Replaced Type.Union with Type.Literal patterns with StringEnum helper across tool schemas.
- Added const modifier to StringEnum generic type parameter for improved TypeScript type inference.
- Consolidated priority metadata into single PRIORITY_INFO record with exported getPriorityInfo function.
- Exported sanitizeSchemaForGoogle utility function for public use.
- Added filtering of unsupported JSON Schema fields ($schema, $ref, $defs, format, examples, etc.) in Google provider schema sanitization.
- Added handling to ignore unsupported additionalProperties: false in Google provider.
- Removed format: date-time from timestamp type conversion in JTD to JSON Schema transformation.
- Added schema validation tests to verify tool schemas don't contain problematic JSON Schema features.
- Reorganized system prompt to display context, environment, and tools sections before discipline guidelines.
- Added FrontmatterError custom error class and FrontmatterOptions interface for improved error handling.
- Enhanced parseFrontmatter function with source, fallback, normalize, and fatal options for better error context.
- Updated all parseFrontmatter call sites to include source file information for better error messages.
- Fixed frontmatter parsing to properly report source location when YAML parsing fails.
- Updated system prompt to show file paths more clearly in output.
- Added template sections for systemPromptCustomization, environment, and tools in system prompt.
- Added todo_write tool for creating and managing structured task lists during coding sessions.
- Added persistent todo panel above the editor that displays task progress with Ctrl+T toggle.
- Added grouped display for consecutive Read tool calls in a compact tree view.
- Changed system prompt to use more direct, field-oriented language with emphasis on verification and assumptions.
- Changed Ctrl+Enter to insert newline when not streaming, and Ctrl+T from toggling thinking blocks to toggling todo list.
- Replaced yaml package dependency with Bun's built-in YAML parser and extracted frontmatter parsing to dedicated module.
- Changed temporary model selector keybinding from Ctrl+Y to Alt+P to avoid conflicts.
- Fixed Alt+Enter to insert newline when not streaming instead of submitting.
- Fixed Cursor provider to avoid advertising Edit tool, using full-file Write instead.
- Added Ctrl+Enter support for inserting newlines in TUI editor using Kitty and legacy terminal formats.
- Removed duplicate Ctrl+Y handler and refactored input controller to use trimmedText variable.
- Added grouped display for consecutive Read tool calls, showing multiple file reads in a compact tree view.
- Changed Read tool result display to hide content by default, showing only file path and status.
- Changed expand hint text from 'Ctrl+O to expand' to 'Ctrl+O for more'.
- Added ReadToolGroupComponent class to group multiple Read tool executions together in a single display.
- Renamed getStyledStatusIcon to formatStatusIcon for consistency with other format functions.
- Refactored formatExpandHint function signature to put theme parameter first and make expanded/hasMore optional.
- Increased default bash output preview from 5 to 10 lines when collapsed.
- Updated expanded bash output view to show full untruncated output when available.
- Added fullOutput field to BashToolDetails to preserve complete output for expanded view.
- Exported BASH_DEFAULT_PREVIEW_LINES constant for consistent preview line configuration.
- Added thinkingLevel field to agent frontmatter allowing subagents to override thinking level with clamping to model capabilities.
- Added structured output schema to reviewer agent ensuring consistent review output format with findings, correctness verdict, and confidence.
- Expanded system prompt with defensive reasoning guidance including assumption checks, edge case awareness, and completion reflex inhibition.
- Consolidated expandPath, parseFrontmatter, and parseAgentFields utilities into discovery/helpers module eliminating code duplication across loaders.
- Replaced silent error handling with logger.warn calls across config parsing, migrations, extension loading, and OAuth refresh failures.
- Added Cursor AI provider with HTTP/2 streaming support using Connect protocol and protobuf binary serialization.
- Added OAuth authentication flow for Cursor including browser-based login, token refresh, and expiry detection.
- Added 14 Cursor model definitions including Claude 4.5, GPT 5.x, Gemini 3, and Grok variants.
- Added execution bridge for Cursor tool calls supporting read, ls, grep, write, delete, shell, diagnostics, and MCP operations.
- Added cursorExecHandlers and cursorOnToolResult options to Agent for local tool execution with cursor-based streaming.
- Added emitExternalEvent method to Agent class for external event injection into agent state.
- Added model generation script to automatically fetch and update AI model definitions from models.dev and OpenRouter APIs.
- Implemented support for multiple providers including Anthropic, Google, OpenAI, Groq, Cerebras, xAI, Mistral, OpenCode, GitHub Copilot, OpenRouter, Google Vertex, and Cursor.
- Updated generated file comment to reference bun instead of npm for running the script.
- Added fallback matching without indent depth when file and target have inconsistent indentation patterns.
- Refactored fuzzy matching logic into findBestFuzzyMatchCore helper function.
- Added comprehensive test suite for findEditMatch covering exact matching, tab/space normalization, and edge cases.
- Changed default for `hidden` option in find tool from `false` to `true`, now including hidden files by default.
- Added test job to publish workflow that runs before build.
- Added persistent cache storage table with expiry support to AgentStorage.
- Added getCache, setCache, and cleanExpiredCache methods for cache operations.
- Added persistent DB caching for Codex usage data that survives application restarts.
- Updated AuthStorage to use two-tier caching (memory + DB) for Codex usage.
- Converted SettingsManager.create(), loadSettings(), discoverSkills(), loadSlashCommands(), buildSystemPrompt(), loadSkills(), loadProjectContextFiles(), and getShellConfig() from synchronous to asynchronous APIs.
- Changed capability provider load() method from supporting both sync and async to async-only by removing loadSync().
- Removed fs property from LoadContext interface in capability types.
- Added new fs.ts module with caching layer for filesystem operations using readFile, readDirEntries, readDir, walkUp, and cache management functions.
- Refactored all discovery providers (builtin, claude, cline, codex, cursor, gemini, github, mcp-json, ssh, vscode, windsurf) to use async file operations with Promise.all for parallel loading.
- Added serialize()/fromSerialized() to AuthStorage and ModelRegistry for
passing credentials and models to subagent workers without re-discovery
- Extended worker protocol with MCP tool call proxying (mcp_tool_call request,
mcp_tool_result response) enabling subagents to use parent's MCP connections
- Added MCPToolMetadata to pass tool schemas from parent to worker
- Updated executor to handle MCP proxy calls and pass serialized data in payload
- Updated worker to use serialized auth/models when available and create MCP
proxy tools that route calls through parent
- Extended ToolSession with authStorage, modelRegistry, and mcpManager fields
- Threaded context from sdk.ts through task tool to executor
Benefits:
- Reduced ~200-500ms startup latency per subagent (skips auth/model discovery)
- Single MCP connection pool (no redundant MCP server processes)
- Clean bidirectional protocol with timeout and abort support for MCP calls
- Added `--no-lsp` CLI flag to disable LSP tools, formatting, diagnostics, and warmup for a session.
- Added `enableLsp` option to session configuration for programmatic control of LSP features.
- Added `enableLsp` property to ToolSession interface to propagate LSP state to tools.
- Modified tool filtering logic to exclude LSP tool when disabled.
- Disabled LSP for subtasks spawned via the task tool.
- Extracted skill loading logic into reusable `loadSkillsFromDir` helper function to eliminate code duplication across builtin, claude, and codex discovery providers.
- Refactored builtin provider to use new `loadSkillsFromDir` helper instead of inline `loadSkillsRecursive` function.
- Refactored claude provider to use new `loadSkillsFromDir` helper, reducing function from 78 lines to 25 lines.
- Refactored codex provider to use new `loadSkillsFromDir` helper, consolidating duplicate skill transformation and frontmatter parsing logic.
- Updated extension module discovery to skip `node_modules` directories in addition to hidden directories.
- Added guideline to Task tool documentation about isolating file scopes for concurrent agents to prevent conflicts.
- Added automatic discovery and pre-listing of AGENTS.md files in the system prompt.
- Eliminated runtime searching for AGENTS.md files by providing an authoritative list upfront.
- Added buildAgentsMdSearch function to scan for AGENTS.md files at prompt build time.
- Added listAgentsMdFiles helper with glob pattern matching and node_modules filtering.
- Updated Task tool documentation to emphasize that subagents have no access to conversation history and require all relevant context to be explicitly passed.
- Revised task agent prompt to clarify that subagents have full tool access and can make file edits, run commands, and create files.
- Replaced example in Task tool docs with a more realistic refactoring scenario demonstrating context passing.
- Switched OpenAI Codex to use bundled system prompt matching opencode upstream.
- Changed OpenAI Codex originator identifier from 'codex_cli_rs' to 'opencode'.
- Added User-Agent header with version, platform, and architecture information to Codex requests.
- Removed dynamic GitHub-based instruction fetching and caching logic in favor of static inline instructions.
- Removed buildCodexPiBridge function and pi-codex-bridge module, replacing with inline BRIDGE constant.
- Removed Codex injection info from HTML session exports.