Commit Graph
773 Commits
Author SHA1 Message Date
can1357 dbe2995df4 fix(ai/providers): preserved property names matching schema keywords in Google sanitization
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.
2026-01-12 02:50:39 +01:00
can1357 ef607b921d chore: bump version to 4.4.9 2026-01-12 01:28:30 +01:00
can1357 5f080866d2 fix(ai): extended Google provider JSON Schema sanitization with 12 additional unsupported fields
- 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.
2026-01-12 01:25:28 +01:00
can1357 827841d19f fix(ai/providers): fixed schema sanitization and standardized priority format to string labels
- 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.
2026-01-12 01:02:47 +01:00
can1357 bb9c3e1d61 chore: bump version to 4.4.5 2026-01-12 00:09:49 +01:00
can1357 b4782538c3 feat(ai): improved Google provider schema sanitization and added schema validation tests
- 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.
2026-01-12 00:07:36 +01:00
can1357 45060a5f5a feat(coding-agent): improved frontmatter parsing with better error handling and source context
- 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.
2026-01-11 23:55:33 +01:00
can1357 03876d0360 feat(coding-agent): added todo_write tool, persistent todo panel, grouped Read display, and refactored prompts
- 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.
2026-01-11 23:33:27 +01:00
can1357 8ba0498eb7 fix(coding-agent): fixed keybindings and input handling for TUI editor and Cursor provider
- 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.
2026-01-11 22:59:04 +01:00
can1357 c11b2f9058 feat(coding-agent): added grouped display and compact tree view for consecutive Read tool calls
- 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.
2026-01-11 16:23:42 +01:00
can1357 18bb7c3855 feat(coding-agent): improved bash output preview with 10-line default and full output in expanded view
- 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.
2026-01-11 15:25:34 +01:00
can1357 b682b35e9b style(coding-agent/core): adjusted whitespace in diagnostic tree branch formatting
- Adjusted whitespace in diagnostic tree branch formatting.
2026-01-11 15:01:39 +01:00
can1357 5e9ef021bb feat: enhanced subagent config, reviewer output schema, and consolidated discovery helpers
- 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.
2026-01-11 14:09:18 +01:00
can1357 242f319cfc feat(cursor): added Cursor AI provider with OAuth, HTTP/2 streaming, and tool execution bridge
- 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.
2026-01-11 07:42:41 +01:00
can1357 27e337e347 fix(coding-agent): added fallback matching for inconsistent indentation and refactored fuzzy matching logic
- 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.
2026-01-11 07:32:39 +01:00
can1357 4cef97d29a feat: changed find tool to include hidden files by default, added test job to publish workflow
- 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.
2026-01-11 04:33:22 +01:00
can1357 fcb056c341 fix(coding-agent): initialized serialized auth storage 2026-01-11 04:32:18 +01:00
can1357 2a1529801f feat(coding-agent/core): added persistent DB cache with expiry support for Codex usage data
- 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.
2026-01-11 04:27:01 +01:00
can1357 e6d33e0a48 feat(coding-agent): converted capability loading and discovery providers to async APIs with caching fs layer
- 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.
2026-01-11 04:26:43 +01:00
can1357 d6af8e7da7 feat(coding-agent): propagated discovery metadata and proxied MCP calls through parent for subagents
- 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
2026-01-11 03:39:01 +01:00
can1357 68bd2f1f07 refactor(coding-agent/prompts): consolidated planner agent into plan agent with structured 4-phase planning process
- Consolidated 'planner' agent functionality into the 'plan' agent.
- Enhanced 'plan' agent with structured 4-phase planning process (Understand, Explore, Design, Produce Plan).
- Added parallel exploration support via 'explore' agent spawning to 'plan' agent.
- Improved 'plan' agent output format with concrete implementation plan examples.
- Removed 'planner' agent command template from embedded commands.
- Deleted planner.md agent prompt file.
2026-01-11 03:38:06 +01:00
can1357 cc52799844 feat(coding-agent): disabled LSP for subtasks spawned via the task tool
- 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.
2026-01-11 03:27:27 +01:00
can1357 2844d6ece8 refactor(discovery): extracted skill loading logic into reusable helper to eliminate duplication
- 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.
2026-01-11 03:07:28 +01:00
can1357 2090f4345a perf(coding-agent/core): optimized agent behavior by pre-listing AGENTS.md files in system prompt
- 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.
2026-01-11 02:55:58 +01:00
can1357 ef97ffc322 docs(coding-agent/prompts): improved Task tool docs to clarify subagent context isolation and tool access
- 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.
2026-01-11 02:28:29 +01:00
can1357 50119740c0 feat(ai/providers): switched OpenAI Codex to bundled system prompt and removed dynamic instruction fetching
- 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.
2026-01-11 02:09:35 +01:00
can1357 e8b109a83b feat(coding-agent): made data parameter optional in complete tool when aborting
- Made `data` parameter optional in `complete` tool when aborting, while still requiring it for successful completions.
2026-01-11 01:17:10 +01:00
can1357 0a9dd36e3d fix(multi): corrected auth messaging and google tool schemas 2026-01-11 01:06:05 +01:00
can1357 0729d340b7 fix(coding-agent): repaired autocomplete cancel redraw 2026-01-11 00:50:48 +01:00
can1357 8267008014 feat(coding-agent): added planner built-in agent for implementation planning
Adds a comprehensive planning agent using slow models that:
- Follows 4-phase workflow: Understand, Explore, Design, Produce Plan
- Can spawn explore agents for parallel codebase search
- Outputs structured plans with changes, sequence, edge cases, verification
2026-01-11 00:50:04 +01:00
can1357 f1d2664476 feat: removed leftover agent commands and improved file autocomplete behavior
- Removed built-in agent commands: 'architect-plan', 'implement', and 'implement-with-critic' from coding-agent.
- Improved file autocomplete to show directory listing when typing '@' with no query.
- Added fallback to prefix matching when fuzzy search returns no results for file autocomplete.
- Fixed 'fd' tool detection to automatically find 'fd' or 'fdfind' in PATH when not explicitly configured.
2026-01-11 00:44:48 +01:00
can1357 9900c30014 chore: bump version to 4.2.0 2026-01-11 00:37:36 +01:00
can1357 7faa151de0 refactor(coding-agent): migrated prompt system to Handlebars templating and reorganized prompt files
- Removed rulebook tool and migrated rules loading to use read tool instead.
- Reorganized prompt files into subdirectories: agents/, compaction/, and system/.
- Added Handlebars helpers for template rendering including list, join, table, codeblock, xml, when, pluralize, and arithmetic operations.
- Migrated prompt template rendering from simple string replacement to Handlebars-style templating with structured data objects.
- Refactored system prompt generation to pass structured data instead of pre-formatted strings.
- Removed rulebookRules property from ToolSession interface and updated all test files accordingly.
2026-01-11 00:36:15 +01:00
can1357 1c93809f59 feat(coding-agent): added /dump command for clipboard transcript export
- Added new `/dump` slash command to copy full session transcript to clipboard.
- Separated `/export` and `/dump` commands with distinct responsibilities, removing clipboard copy functionality from `/export`.
- Implemented handleDumpCommand() method in command controller to manage clipboard operations independently.
2026-01-11 00:31:23 +01:00
can1357 24f0e41db7 refactor(interactive): restructured interactive-mode.ts into separate controller and utility classes
- Extracted CommandController class handling slash commands and user-initiated actions from interactive-mode.ts.
- Extracted EventController class handling AgentSessionEvent processing from interactive-mode.ts.
- Extracted ExtensionUiController class managing TUI-based UI context for extensions and hooks from interactive-mode.ts.
- Extracted InputController class handling keyboard input and editor interactions from interactive-mode.ts.
- Extracted SelectorController class managing UI selector components from interactive-mode.ts.
- Extracted UiHelpers and VoiceManager utility classes from interactive-mode.ts.
2026-01-11 00:05:34 +01:00
can1357 efc3d9f775 perf(coding-agent): deferred history database writes to eliminate message submission lag 2026-01-10 23:54:29 +01:00
can1357 25fc2160bf feat(coding-agent): added automatic Nerd Fonts detection for popular terminals with env override
- Added automatic Nerd Fonts detection for iTerm, WezTerm, Kitty, Ghostty, and Alacritty terminals.
- Added NERD_FONTS environment variable override to manually control Nerd Fonts symbol preset with '1' or '0' values.
- Changed symbolPreset default to automatically use 'nerd' when Nerd Fonts are detected, otherwise 'unicode'.
- Added hasNerdFonts() function with caching to detect terminal Nerd Fonts support.
- Changed CustomShareFn return type from void to undefined in union type.
2026-01-10 23:51:08 +01:00
can1357 bb2752e16a feat(coding-agent): added Handlebars templating engine for prompt rendering with layout optimization
- Integrated Handlebars templating engine with custom {{arg}} helper for positional arguments in prompt templates.
- Changed prompt template rendering to use Handlebars instead of simple string replacement.
- Added prompt layout optimization that normalizes indentation and collapses excessive blank lines.
- Added conditional rendering support in system prompt to hide empty context blocks.
- Updated all tool descriptions and prompt templates to use centralized renderPromptTemplate function.
- Added handlebars@4.7.8 as a new dependency with neo-async, source-map, and wordwrap transitive dependencies.
2026-01-10 23:50:28 +01:00
can1357 899c69d72b feat(coding-agent/core): hardened database permissions and improved auth/settings migration with legacy fallbacks
- Added hardened file permissions on agent database directory (700) and database file (600) for improved security.
- Changed auth migration to merge credentials per-provider instead of skipping when any credentials exist.
- Added migration of settings from legacy settings.json file to SQLite database storage.
- Added fallback to legacy auth.json for OAuth credentials when not found in primary storage.
- Added hardenPermissions method to set restrictive chmod on database directory and file.
2026-01-10 23:39:03 +01:00
can1357 09427086d9 feat(coding-agent): migrated settings and auth storage from JSON files to SQLite database
- Migrated settings and auth credential storage from JSON files (settings.json, auth.json) to SQLite database (agent.db).
- Added AgentStorage class implementing unified SQLite storage with WAL mode, schema versioning, and prepared statement caching.
- Added storage-migration module to handle one-time migration from legacy JSON files to SQLite with backup creation.
- Updated credential migration message to reference agent.db instead of auth.json.
- Removed file locking mechanism from AuthStorage since SQLite handles concurrency natively.
- Added getAgentDbPath() config function returning path to SQLite database file.
2026-01-10 23:24:35 +01:00
can1357 7e10c29792 fix(coding-agent): fixed theme variable resolution to handle references without $ prefix
- Fixed theme variable resolution to properly handle variable references without $ prefix.
- Added early return for empty strings and hex color values in theme resolution.
2026-01-10 23:06:34 +01:00
can1357 6797ad08cd feat(coding-agent): added custom share script support, renamed Glob to Find, improved prompts and docs
- Added custom share script support at ~/.omp/agent/share.ts to replace default GitHub Gist sharing.
- Renamed Glob tool to Find tool throughout prompts and documentation.
- Updated project context formatting to use XML-style tags for clearer structure.
- Refined bash tool guidance to prefer dedicated tools over bash for file operations.
- Updated system prompt with clearer tone guidelines emphasizing directness and conciseness.
- Enhanced verification guidance to prefer external feedback loops like tests and linters.
2026-01-10 23:04:38 +01:00
can1357 70af6c525c docs(coding-agent): improved system prompt with clearer tone, planning, and verification guidelines
- Updated system prompt with clearer tone guidelines emphasizing directness and conciseness.
- Revised workflow instructions to require explicit planning for non-trivial tasks.
- Enhanced verification guidance to prefer external feedback loops like tests and linters.
- Added explicit alignment and prohibited behavior sections to improve response quality.
2026-01-10 22:55:15 +01:00
can1357 691b65d953 feat(coding-agent): added persistent prompt history with SQLite FTS5 storage and Ctrl+R search
- Added persistent prompt history with SQLite-backed storage using FTS5 for efficient text searching.
- Added Ctrl+R keybinding to search through prompt history in interactive mode.
- Added HistoryStorage class with singleton pattern, deduplication, and prepared statements for database operations.
- Added HistorySearchComponent with scrollable results list, keyboard navigation, and selection highlighting.
- Added setHistoryStorage() method to Editor class for saving and restoring history across sessions.
2026-01-10 18:48:17 +01:00
can1357 f48bc666d9 fix(coding-agent): fixed credential blocking logic to check remaining available credentials
- Fixed credential blocking logic to correctly check for remaining available credentials instead of always returning true.
2026-01-10 18:02:36 +01:00
can1357 ba618c75eb feat(coding-agent): added multi-credential usage limit detection and automatic fallback switching
- Added usage limit error detection with regex pattern matching in agent sessions.
- Implemented Codex usage API integration for proactive limit checking with caching.
- Added credential backoff tracking to temporarily skip rate-limited accounts.
- Implemented multi-credential usage-aware selection with automatic fallback.
- Added automatic mid-session credential switching when usage limits are reached.
- Changed credential selection from session-sticky to deterministic FNV-1a hashing with priority ordering.
2026-01-10 16:54:21 +01:00
can1357 48a9900784 feat: added extension UI customization APIs, SDK exports, CLI flags, and fixed clipboard/resize bugs
- Added setFooter(), setHeader(), and setEditorComponent() methods to ExtensionUIContext for custom UI components.
- Exported InteractiveModeOptions type and numerous UI components for programmatic SDK usage.
- Added --no-tools flag to disable all built-in tools and --no-extensions flag to disable extension discovery.
- Changed bash tool output truncation to recalculate on terminal resize instead of using cached width.
- Fixed Wayland clipboard copy (wl-copy) no longer blocking when the process doesn't exit promptly.
- Updated model pricing and renamed nex-agi/deepseek-v3.1-nex-n1 model removing :free suffix.
2026-01-10 07:11:01 +01:00
can1357 ce84c3c6f1 feat(ai): fixed Anthropic OAuth, token refresh, thinking mode, and added betas option
- Added betas option to AnthropicOptions for passing custom Anthropic beta feature flags.
- Changed Anthropic OAuth tool naming to use 'proxy_' prefix instead of mapping to Claude Code tool names.
- Added Claude Code headers for all Anthropic requests, not just OAuth tokens.
- Fixed Anthropic OAuth code parsing to accept full redirect URLs in addition to raw authorization codes.
- Fixed Anthropic token refresh to preserve existing refresh token when server doesn't return a new one.
- Fixed thinking mode being disabled when tool_choice forces a specific tool, and auto-adjusted max_tokens when thinking budget is set.
2026-01-10 06:38:37 +01:00
can1357 100061accb chore: merged in upstream changes
- Added ExtensionRuntime shared state with async extension factory support
- Introduced pluggable tool operations (BashOperations, FileOperations, etc.) for remote execution
- Added new CLI flags: --no-tools, --no-extensions, --no-skills
- Added login dialog, countdown timer, and component barrel export
- Added blockImages and thinkingBudgets settings
- Refactored stdin handling with StdinBuffer for improved key parsing
- Updated DEVELOPMENT.md with new architecture documentation
2026-01-10 06:32:51 +01:00
can1357 28eda1493c chore: bump version to 3.37.0 2026-01-10 04:16:06 +01:00