Commit Graph

1430 Commits

Author SHA1 Message Date
can1357 4dac726c8d feat(coding-agent): added streaming text preview with real-time delta updates
- Added streaming text preview during agent specification generation with real-time text delta updates.
- Added `onRequestRender` callback to agent dashboard for async UI re-renders on state changes.
- Improved system prompt preview rendering with text wrapping and line count indicators.
- Enhanced agent creation flow to display generation status hint and reordered spec review before input form.
2026-02-19 05:13:33 +01:00
can1357 e403ab698c feat(coding-agent): introduced AI-powered agent creation with architect model
- Added AI-powered agent creation flow with architect model for generating custom agent specifications from natural language requests.
- Added keyboard shortcuts (N for new agent, R for regenerate) and scope selection (project/user) for agent creation workflow.
- Added model suggestions UI and success/error notices to agent dashboard for improved creation feedback.
- Added system prompts for agent-creation-architect and agent-creation-user roles with 6-step methodology and JSON schema validation.
- Added file persistence with YAML frontmatter for storing agent specifications at project or user scope.
2026-02-19 05:07:26 +01:00
can1357 69664396a8 fix(tui): fixed history navigation visibility and paging
Fixes #99
2026-02-19 05:06:10 +01:00
can1357 e2bb5041d2 feat(coding-agent): add Agent Control Center dashboard
Closes #93
2026-02-19 04:56:52 +01:00
can1357 50eeaed282 fix: hardened codex session state and cleared tui shrink artifacts 2026-02-19 04:33:45 +01:00
can1357 9fd37c0f0f fix(coding-agent): prevented enter from clearing hook editor
Handle plain Enter/Return in HookEditorComponent as newline input so the editor no longer triggers the submit-reset path when no onSubmit handler is wired.

Ctrl+Enter submit behavior remains unchanged.

Fixes #100
2026-02-19 04:12:54 +01:00
can1357 f85e880f52 fix(coding-agent): lazy-load puppeteer to avoid cosmiconfig crash
Puppeteer uses cosmiconfig to search for its configuration at import time. cosmiconfig walks up from CWD parsing every package.json it finds. If any package.json in the search path has invalid JSON, the strict parse-json parser throws synchronously
during module evaluation, surfacing as an uncaught exception that crashes the entire process.
2026-02-18 19:14:50 +01:00
can1357 8c4023b9ed refactor(ai): extracted provider descriptor helpers to reduce boilerplate
- Extracted provider descriptor helper functions (descriptor, catalog, catalogDescriptor, simpleModelsDevDescriptor, openAiCompletionsDescriptor, anthropicMessagesDescriptor) to reduce boilerplate across 47+ provider definitions.
- Refactored model generation script to simplify OAuth credential lifecycle by moving storage cleanup to finally block and parallelizing special discovery sources with Promise.all().
- Consolidated provider validation logic in model registry into reusable validateProviderConfiguration() function with context-aware validation modes.
- Reorganized models.json structure to place contextWindow and maxTokens before compat field for consistency across all provider entries.
2026-02-18 17:48:00 +01:00
can1357 ba6f668644 fix(coding-agent): prevented auto-compaction after handoff 2026-02-18 17:48:00 +01:00
can1357 a4e704dbcf refactor(ai/provider-models): restructured provider models to unified descriptor pattern with priority sorting
- Unified provider descriptors into single source of truth in descriptors.ts module for runtime and catalog discovery.
- Consolidated model generation script to use declarative CatalogProviderDescriptor interface, reducing code duplication.
- Refactored model registry and selector to use descriptor pattern with priority-based sorting and version extraction.
- Added priority field to Model interface enabling provider-assigned model prioritization in discovery and selection.
- Added support for Synthetic model provider in web search command and improved model sorting by priority and version.
2026-02-18 17:48:00 +01:00
can1357 4011d7f565 feat(web-search): added Synthetic web-search + fixed Anthropic
- Implemented API client for the Synthetic web search provider.
- Configured Synthetic as a selectable option for web searches.
- Integrated Synthetic into the automatic provider fallback chain.
Fixes #102
2026-02-18 17:48:00 +01:00
can1357 e4a3648654 fix(ai): add Bearer auth header and fix web search tool name for OAuth
- Set Authorization: Bearer header in buildAnthropicHeaders when using OAuth
  (raw fetch path was sending no credentials)
- Use plain web_search tool name instead of prefixed web_search_20250305
  (Anthropic API rejects the prefixed name)
- Remove dead applySearchToolPrefix function and unused import

Fixes #102
2026-02-18 17:47:59 +01:00
can1357 53ee943c38 refactor(ai): migrated model policies to declarative provider descriptors
- Extracted model post-processing policies into dedicated model-policies module for improved testability and maintainability.
- Refactored model generation script to use declarative provider descriptors instead of 620+ lines of inline provider-specific logic.
- Consolidated provider model manager initialization to use descriptor-driven iteration, eliminating 29+ individual conditional blocks.
- Removed static bundled models for Ollama and vLLM from models.json to rely on dynamic discovery instead.
2026-02-18 17:47:59 +01:00
can1357 a1efc5f4e1 refactor(coding-agent): simplified error handling and import organization
- Reorganized import statements in openai-compat.ts for consistency.
- Consolidated multi-line ternary expression into single line in openai-compat.ts.
- Simplified AgentBusyError instantiation to use default message.
- Updated test assertion to check error type instead of message content.
2026-02-18 17:47:59 +01:00
can1357 e6f8001d9e feat: added 11 AI providers with OAuth and $pickenv() fallback support
- Added support for 11 new AI providers (Hugging Face, NVIDIA, Together, Ollama, LiteLLM, Xiaomi, Moonshot, Venice, Qwen Portal, vLLM, Cloudflare AI Gateway) with API key authentication and login flows.
- Implemented $pickenv() utility for environment variable fallback chains, enabling multi-key resolution for providers with alternative credential names.
- Extended KnownProvider and OAuthProvider types to include all 11 new providers with corresponding model manager functions and OAuth handlers.
- Expanded models.json with thousands of new model entries across all new providers and replaced deprecated opencode provider with cloudflare-ai-gateway.
- Refactored model generation script to use unified fetchProviderModelsFromCatalog() and centralized API key resolution for all providers.
2026-02-18 17:47:59 +01:00
can1357 e88facfc80 feat(coding-agent): added AgentBusyError with auto-retry for concurrent operations
- Added AgentBusyError exception class for concurrent operation handling across agent packages.
- Added automatic retry logic with 30-second timeout for agent prompts when agent is busy.
- Changed concurrent operation errors from generic Error to AgentBusyError for better error handling.
- Fixed model discovery to use default refresh mode instead of explicit 'online' parameter.
2026-02-18 17:47:59 +01:00
can1357 eb13a5f956 refactor(coding-agent): migrated model priorities to external JSON configuration
- Extracted model priority configuration from TypeScript constants to external priority.json file.
- Updated agent prompts (reviewer, explore, plan) to reference new model tier aliases (pi/slow, pi/smol, pi/plan).
- Removed hardcoded SMOL_MODEL_PRIORITY and SLOW_MODEL_PRIORITY constants from model-resolver.ts.
- Improved prompt formatting with consistent newlines and whitespace in agent configuration files.
2026-02-18 17:47:58 +01:00
Can Bölük d3bbfd05fd Merge pull request #98 from masonc15/feat/autocomplete-max-visible-setting
feat(coding-agent): expose autocomplete max items setting
2026-02-18 16:08:08 +01:00
can1357 bad4db1365 fix(models): aligned synthetic/cerebras auth and discovery 2026-02-18 15:43:46 +01:00
Gary Trakhman 270bc44f76 Fix lints 2026-02-18 15:43:46 +01:00
Colin Mason b55e6901f3 fix(coding-agent): coerce autocomplete setting values in runtime handler 2026-02-18 09:40:19 -05:00
Colin Mason bf0bcf73e2 feat(coding-agent): expose autocomplete max items setting
Wire the existing TUI autocompleteMaxVisible plumbing into the
declarative settings system so it appears in /settings under the
Input tab. Users can pick from 3/5/7/10/15/20 items; the TUI editor
clamps to 3-20 regardless.

- Add autocompleteMaxVisible to SETTINGS_SCHEMA (number, default 5)
- Add OPTION_PROVIDERS entry for the submenu dropdown
- Handle runtime side-effect in selector-controller
- Set initial value from settings on editor construction
- Add tests for default, runtime, persistence, and config loading
2026-02-18 09:40:16 -05:00
can1357 40fa09a488 fix(coding-agent): removed native addon asset requirement in updater
Fixes #101
2026-02-18 15:14:42 +01:00
can1357 ba1e3f8a07 fix(coding-agent): expanded internal url resolution and hardened memory protocol
Fixes #54
Fixes #74
2026-02-18 15:14:21 +01:00
can1357 a5d26bb5f5 feat(react-edit-benchmark): migrated benchmark to directory-based fixtures with RPC resource management
- Added `--no-rules` CLI flag to coding-agent to disable rules discovery and loading.
- Added `rules` option to CreateAgentSessionOptions to allow custom rules configuration.
- Added `sessionDir` option to RpcClientOptions and implemented Symbol.dispose() for resource cleanup.
- Removed tarball-based task loading; migrated to directory-based fixtures with required inputDir and expectedDir properties.
- Refactored runner to use RpcClient resource management with `using` statement and simplified fixture handling.
- Consolidated type definitions and removed tarball.ts module in favor of streamlined task interface.
2026-02-18 05:14:19 +01:00
can1357 95c9bc4f52 fix(coding-agent): fixed ttsr injection persistence timing 2026-02-18 02:03:47 +01:00
can1357 9a8fa69aa0 feat(ai): enhanced model discovery and robustness
- Improved cache authority logic for dynamic model fetching.
- Added model filtering for OpenAI-compatible non-response endpoints.
- Updated `ModelRegistry` auth sentinel from `""` to `kNoAuth` (`"N/A"`).
- Made API response parsing more robust across multiple providers.
2026-02-18 01:56:13 +01:00
can1357 2249529e70 feat(coding-agent): added TTSR injection tracking and deduplication
- Added TTSR injection tracking with per-turn recording and deduplication to prevent repeated rule injections within the same turn.
- Changed TTSR message format to use custom message type with metadata fields for improved injection tracking and session persistence.
- Fixed TTSR repeat-after-gap mode to correctly restore injected rules from previous sessions and recalculate gap thresholds.
- Added test suite with 6 test cases covering TTSR repeat modes (once, after-gap, restored) and injection deduplication behavior.
2026-02-18 01:53:02 +01:00
can1357 bc69fd207d feat: implemented dynamic model resolution across all providers with ModelManager API
- Added ModelManager API with createModelManager() factory for managing bundled and dynamically discovered models with configurable refresh strategies.
- Exported discovery utilities for fetching models from Antigravity, Codex, Cursor, Gemini, and OpenAI-compatible endpoints with provider-specific model manager configuration helpers.
- Renamed public API functions for clarity: getModel() -> getBundledModel(), getModels() -> getBundledModels(), getProviders() -> getBundledProviders().
- Added on-disk model caching with TTL-based invalidation and resolveProviderModels() function for runtime model resolution with source precedence.
- Refactored model discovery script to dynamically fetch models from Codex, Cursor, and Antigravity using OAuth credentials instead of hardcoded lists.
2026-02-18 01:38:05 +01:00
can1357 09f6c5d7bb feat(coding-agent): implemented scoped TTSR rules with interrupt modes and unified discovery
- Added scoped TTSR rule matching with condition and scope fields supporting file globs and tool-specific filtering.
- Added ttsr.interruptMode setting to control when TTSR rules interrupt agent responses (never/prose-only/tool-only/always).
- Added support for loading rules, prompts, and commands from ~/.agent/ directory with fallback to ~/.agents/.
- Refactored rule discovery across all providers to use unified buildRuleFromMarkdown helper and per-stream-key buffering.
- Enhanced TTSR pattern matching to respect tool-specific scope filters and normalize file paths in glob matching.
2026-02-17 23:40:13 +01:00
tctev 68673ad528 feat(coding-agent): set claude-sonnet-4-6 as default anthropic model 2026-02-17 21:01:15 +01:00
can1357 6fa0a685b5 refactor(coding-agent/tools): fixed double wrapped tools and improved tool wrapping logic
- Refactored tool wrapping logic from array-based function to per-tool wrapper with guard clause to prevent double-wrapping.
- Replaced Proxy-based tool wrapping with Object.defineProperties to preserve property access behavior and private fields on original tool objects.
- Consolidated tool wrapping into createTools function, removing intermediate wrapping step from sdk.ts.
- Extracted FETCH_DEFAULT_MAX_LINES constant to fetch.ts for local use instead of importing from truncate module.
- Converted else-if control flow to separate if statement for artifactId check in notice formatting logic.
2026-02-17 09:57:24 +01:00
can1357 64c374a910 feat(coding-agent/discovery): added OpenCode discovery provider with config loading and MCP/skills/commands support
- Added OpenCode discovery provider that loads configuration from ~/.config/opencode/ and .opencode/ directories.
- Added support for loading MCP servers from opencode.json mcp key with stdio and HTTP transport types.
- Added support for loading skills from ~/.config/opencode/skills/ and .opencode/skills/ directories.
- Added support for loading slash commands from ~/.config/opencode/commands/ and .opencode/commands/ directories with frontmatter parsing.
- Added support for loading extension modules (plugins) from ~/.config/opencode/plugins/ and .opencode/plugins/ directories.
- Added support for loading context files (AGENTS.md) and settings from OpenCode configuration.
2026-02-17 09:36:23 +01:00
can1357 25231d0723 feat: exported terminal ID utilities and improved session directory naming
- Exported `getTerminalId()` and `getTtyPath()` functions from tui package for obtaining stable terminal identifiers with support for TTY device paths and terminal multiplexers.
- Improved path display in status line to strip both `/work/` and `~/Projects/` prefixes when abbreviating paths.
- Refactored session directory naming to use single-dash format for home-relative paths and double-dash format for absolute paths, with automatic migration of legacy session directories on first access.
- Implemented TTY ID utilities in tui package with platform-specific TTY path resolution using /proc/self/fd/0 on Linux, dlopen on macOS/BSD, and libc on other Unix systems.
- Added macOS path standardization to strip `/private` prefix from paths when both original and stripped paths resolve to the same location.
2026-02-17 09:23:30 +01:00
can1357 d6f7dc6815 feat: removed system-info API and rebuilt environment info generation with OS APIs only
- Removed the `getSystemInfo` API and `SystemInfo` type from package exports by deleting the `system-info` Rust/TS modules, dropping the `system_info` crate module, and removing top-level `system-info` re-exports.
- Updated environment information generation to no longer rely on native system-info data, sourcing distro and kernel values from built-in `os` APIs instead and removing the `Disk` field from produced environment entries.
- Adjusted native binding validation to stop requiring `getSystemInfo`, reflecting the new binding contract after API removal.
- Added startup-debug instrumentation behind `PI_DEBUG_STARTUP` that traces native addon loading, extraction, AVX2 detection, and environment info/GPU caching steps for diagnostics.
2026-02-17 05:43:54 +01:00
can1357 008879103d fix(coding-agent/session): fixed agent promotion by removing redundant duplicate candidate logic
- Removed redundant agent promotion logic that was adding duplicate candidates with larger context windows.
2026-02-16 21:13:10 +01:00
can1357 c0912708c1 refactor(coding-agent): centralized builtin slash command registry 2026-02-16 19:36:56 +01:00
can1357 fee42ed7f0 refactor(coding-agent): switch secrets config from JSON to YAML 2026-02-16 19:26:35 +01:00
can1357 262ca202a7 fix(coding-agent): use /changelog full subcommand instead of --full flag 2026-02-16 19:24:08 +01:00
can1357 f399b8e323 fix(coding-agent): fixes for PRs 80, 82, 85
- Parse --full as exact token in /changelog command
- Scope MCP disabled list to discovered servers only
- Guard malformed disabledServers config field
- Parse regex literal /pattern/flags syntax in secret entries
- Prevent infinite loop on zero-length regex matches
- Replace longer plain secrets before shorter prefixes
- Default secrets.enabled to false
2026-02-16 19:23:37 +01:00
can1357 a079a2d66a Merge branch 'pr-90' 2026-02-16 19:19:55 +01:00
can1357 647a688d24 Merge branch 'pr-85'
# Conflicts:
#	packages/coding-agent/CHANGELOG.md
#	packages/coding-agent/README.md
2026-02-16 19:19:52 +01:00
can1357 4bfa3b0c08 Merge branch 'pr-82' 2026-02-16 19:19:21 +01:00
can1357 734bfd0ea5 Merge branch 'pr-80'
# Conflicts:
#	packages/coding-agent/CHANGELOG.md
2026-02-16 19:19:18 +01:00
can1357 fe27bc4cf2 feat: enhanced regex sanitization, LSP client messaging, and native addon installation
- Added support for braced escape sequences (\p{...}, \P{...}, \x{...}, \u{...}) in regex pattern sanitization to properly preserve unicode property escapes and hex escapes.
- Improved LSP client message writing by simplifying header encoding and refactoring abort signal handling with the untilAborted utility.
- Enhanced native addon installation script to dynamically fetch release tags from GitHub API instead of using hardcoded versions.
- Relaxed native addon validation to only error when no addons are found rather than when any are missing, improving flexibility in addon availability.
2026-02-16 18:33:05 +01:00
can1357 0bbe52dee7 feat(coding-agent): changed context promotion to trigger on overflow errors instead of threshold
- Changed context promotion to trigger on context overflow errors instead of a configurable threshold percentage.
- Removed the contextPromotion.thresholdPercent configuration setting.
- Updated context promotion to retry immediately on the promoted model without requiring compaction.
- Refactored context promotion logic to attempt promotion before compaction in the overflow handling flow.
- Updated agent session to merge context promotion checks into the compaction method for unified overflow handling.
- Updated tests to reflect overflow-based promotion triggering instead of threshold-based promotion.
2026-02-16 18:33:05 +01:00
can1357 5dbf4922b8 feat(coding-agent/config): changed default grep context lines from 1 before/3 after to 0 before/0 after
- Changed default grep context lines from 1 before/3 after to 0 before/0 after for more focused search results.
2026-02-16 18:33:05 +01:00
can1357 0419a9e01f feat(coding-agent/lsp): fixed LSP cancellation with abort signal support for file operations and requests
- Added abort signal support to LSP file operations (ensureFileOpen, refreshFile) enabling cancellation of long-running file operations.
- Added abort signal propagation through LSP request handlers (definition, references, hover, symbols, rename) with $/cancelRequest notification support.
- Added shouldBypassAutocompleteOnEscape callback to custom editor allowing parent components to override escape key handling behavior.
- Changed escape key handling in custom editor to respect bypass callback, enabling global escape handling during active operations.
- Fixed LSP operations to properly handle abort signals and throw ToolAbortError when operations are cancelled, with input controller bypassing autocomplete during streaming/loading states.
2026-02-16 18:33:04 +01:00
can1357 a61ee16b65 feat(ai): implemented context promotion target model property for improved fallback handling
- Added contextPromotionTarget model property to specify preferred fallback model when context promotion is triggered.
- Added automatic context promotion target assignment for Spark models to their base model equivalents.
- Updated Qwen model context window and max token limits for improved accuracy.
- Updated o1 model context window from 256000 to 262144 tokens and max tokens from 64000 to 65536 tokens.
- Implemented context promotion logic to use configured contextPromotionTarget when available instead of role-based model resolution.
2026-02-16 18:33:04 +01:00
can1357 14beadd9b5 feat(coding-agent/session): enforced minimum 15% context window floor for session compaction reserves
- Added effectiveReserveTokens() function to enforce a minimum 15% context window floor for session compaction reserve calculations.
- Updated shouldCompact() to use effectiveReserveTokens() instead of raw configured reserve, ensuring more predictable compaction behavior regardless of configuration.
2026-02-16 18:33:03 +01:00