Commit Graph

1203 Commits

Author SHA1 Message Date
can1357 66ea245f2d fix(tui): reload todos when switching sessions or navigating tree 2026-01-12 07:15:39 +01:00
can1357 7f459214c1 fix(tui): align todo list 'more' indicator with item indentation 2026-01-12 07:09:12 +01:00
can1357 e29f0017af feat(agent): add todoCompletion setting to remind agent of incomplete todos 2026-01-12 07:05:01 +01:00
can1357 7003c7c605 chore(tui): use π prefix in terminal title 2026-01-12 06:53:10 +01:00
can1357 a90b6a0f8f fix(compaction): skip to next model when retry delay exceeds 30s 2026-01-12 06:53:07 +01:00
can1357 b5a0fe9ec4 fix(task): respect explicit provider prefix in model resolution 2026-01-12 06:52:59 +01:00
can1357 700281d8a8 fix(tui): render single-file reads inline 2026-01-12 06:51:50 +01:00
can1357 f615586257 chore: bump version to 4.6.0 2026-01-12 03:19:08 +01:00
can1357 741ab06ed2 feat: port upstream improvements from pi-mono (f1b64b9d..6730b4fa)
TUI:
- Add fuzzy matching module (moved from coding-agent)
- Remove Kitty protocol query timeout (fixes shift+enter delays)
- Add bracketed paste check for key release/repeat detection
- Rendering optimizations (only re-render changed lines)
- Add backslash+enter newline fallback, getExpandedText()
- Refactor input.ts to use keybindings manager

Coding-agent:
- Add /skill:name slash commands with enableSkillCommands setting
- Add cwd to SessionInfo for session list display
- Improve tree selector with custom summarization instructions
- Add dequeue (Alt+Up) to restore all queued messages at once
- Add shutdown request handling for extensions
- Component invalidate() fixes for theme changes
2026-01-12 03:18:30 +01:00
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 93dde7dc13 chore: bump version to 4.5.0 2026-01-12 01:33:14 +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 b5fbd0980f chore: bump version to 4.4.8 2026-01-12 01:03:13 +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 c32d728910 chore: bump version to 4.4.6 2026-01-12 00:20:46 +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 1a945367e6 chore: bump version to 4.4.4 2026-01-11 23:34:23 +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 fc92a7105e chore: bump version to 4.3.2 2026-01-11 15:25:46 +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 ec611c5eac chore: bump version to 4.3.1 2026-01-11 14:37:46 +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 ff744750ac chore: bump version to 4.3.0 2026-01-11 08:45:49 +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 17b7e7217b feat(ai/scripts): added model generation script to fetch AI model definitions from external APIs
- 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.
2026-01-11 07:36:36 +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 9044a5bd2c chore: bump version to 4.2.3 2026-01-11 04:38:09 +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 9599173cf1 chore: bump version to 4.2.2 2026-01-11 04:31:01 +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 2f2ef613a1 chore: bump version to 4.2.1 2026-01-11 03:13:09 +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