Commit Graph

2012 Commits

Author SHA1 Message Date
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 554a4dcd18 chore: bump version to 12.9.0 2026-02-17 09:57:50 +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 41f461ed39 chore: bump version to 12.8.2 2026-02-17 05:44:45 +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 ae19f1e27f chore: bump version to 12.8.1 2026-02-16 21:13:34 +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 7fd1ebdfc1 chore: bump version to 12.8.0 2026-02-16 19:37:58 +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 b6a5bd8c9a fix(natives): hardened pty timeout handling
Fixes #88
2026-02-16 18:54:38 +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 0d49ddbc8a fix(compaction): updated test for 15% reserve token floor 2026-02-16 18:33:04 +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
can1357 f193dc85b0 feat(session/compaction): limited file operation summary to 20 files per category with omitted count
- Implemented file operation summary limiting to 20 files per category with indication of omitted files when exceeded.
- Added truncateFileList() helper function to limit file arrays and append ellipsis message showing omitted file count.
- Added stripFileOperationTags() helper function to remove XML file operation tags from summary strings.
- Introduced upsertFileOperations() function to merge base summary with file operations by stripping old tags and concatenating new ones.
- Refactored branch-summarization and compaction modules to use new upsertFileOperations() function instead of formatFileOperations().
2026-02-16 18:33:03 +01:00
can1357 a2db7789b7 feat(coding-agent): implemented automatic context promotion to larger models when approaching limits
- Added automatic context promotion feature that switches to larger-context models when approaching context limits.
- Added 'contextPromotion.enabled' setting to control automatic model promotion with default value of enabled.
- Added 'contextPromotion.thresholdPercent' setting to configure context usage threshold for triggering promotion with default value of 90%.
- Implemented context promotion logic in AgentSession that monitors token usage and automatically switches models when threshold is exceeded.
- Added provider session cleanup during model switches to properly handle session state transitions.
- Added comprehensive test coverage for context promotion functionality including threshold-based promotion and non-promotion scenarios.
2026-02-16 18:33:03 +01:00
can1357 a4f845a465 feat: added CPU variant support for x64 native addons with AVX2/baseline fallback
- Added CPU variant support for x64 native addons with modern (AVX2/x86-64-v3) and baseline (x86-64-v2) variants, enabling automatic fallback when modern variants are unavailable.
- Added automatic AVX2 CPU detection on Linux, macOS, and Windows platforms to select appropriate native addon variant at runtime.
- Updated native addon filename scheme to include CPU variant suffix (e.g., pi_natives.linux-x64-modern.node) for x64 platforms.
- Updated CLI update mechanism to support downloading and installing multiple native addon variants per platform with fallback support.
- Removed fallback untagged pi_natives.node binary creation; platform and variant-tagged binaries are now required.
2026-02-16 18:33:03 +01:00
can1357 2e45297c43 docs(docs): moved documentation to root docs directory and updated all references
- Moved documentation files from packages/coding-agent/docs/ to root docs/ directory to flatten the documentation structure.
- Updated all internal documentation links to account for the new file locations, adjusting relative paths to maintain correct references across the monorepo.
- Updated README.md and issue template configuration to reference documentation at the new root docs/ location instead of packages/coding-agent/docs/.
2026-02-16 18:33:03 +01:00
can1357 63ec7b6667 docs(coding-agent): added comprehensive technical documentation for coding agent internals
- Added comprehensive technical documentation for bash tool runtime covering execution surfaces, pipeline stages, PTY/non-PTY modes, output handling, and operational caveats.
- Added documentation for blob and artifact storage architecture including content-addressed blobs, session-scoped artifacts, persistence mechanisms, and URL access models.
- Added documentation for Gemini manifest extension discovery covering directory scanning, manifest parsing, name normalization, and precedence rules.
- Added 13 additional technical documentation files covering MCP runtime lifecycle, server tool authoring, retry policies, notebook runtime, plugin management, provider streaming, rulebook matching, session operations, slash commands, task agent discovery, TTSR injection, and TUI internals.
2026-02-16 18:33:02 +01:00
can1357 35dbf43670 feat(coding-agent/web): added Brave web search provider with recency filtering and API integration
- Added Brave web search provider with support for query, result count, and recency filtering.
- Added BRAVE_API_KEY environment variable configuration for Brave search authentication.
- Updated web search provider priority order to include Brave as second-highest priority after Exa.
- Extended recency filter support to Brave search provider alongside Perplexity.
- Implemented BraveProvider class with API integration, response mapping, and parameter validation.
- Added helper functions for recency mapping, result clamping, and snippet building in Brave provider.
2026-02-16 18:33:02 +01:00
can1357 82d6caf0b6 docs(coding-agent): restructured documentation from guides to technical implementation references
- Restructured documentation from user-facing guides to technical implementation references across 18 files in packages/coding-agent/docs.
- Reorganized compaction.md, config-usage.md, custom-tools.md, and extensions.md to emphasize architecture and integration patterns over step-by-step tutorials.
- Expanded environment-variables.md, extension-loading.md, fs-scan-cache-architecture.md, and python-repl.md with detailed runtime behavior and implementation details.
- Consolidated hooks.md, rpc.md, sdk.md, and theme.md from comprehensive reference documentation to focused technical specifications.
- Refined session.md, session-tree-plan.md, skills.md, tree.md, and tui.md to clarify runtime behavior, discovery mechanisms, and technical contracts.
2026-02-16 18:33:02 +01:00
can1357 5882215f49 feat(coding-agent/web): added pagination support for GitHub issue comments with partial result display
- Added pagination support for fetching GitHub issue comments, allowing retrieval of all comments beyond the initial 50-comment limit.
- Added comment count display showing partial results when not all comments could be fetched (e.g., '5 of 10 comments').
- Changed GitHub issue comment fetching to use paginated API requests with 100 comments per page instead of single request with 50-comment limit.
- Extracted comment fetching logic into dedicated fetchGitHubIssueComments function for improved code organization.
- Added GitHubIssueComment interface to provide type safety for comment data structures.
2026-02-16 18:33:02 +01:00
luk 9728a157cf fix(coding-agent): conditionally define render methods on RegisteredToolAdapter
RegisteredToolAdapter previously defined renderCall/renderResult as
prototype methods that unconditionally delegated to the underlying
definition. When the definition had no renderers, these methods still
existed on the instance, causing ToolExecutionComponent to enter the
custom-renderer path, receive undefined, and silently discard tool
result text — extensions without renderers showed blank output.

Move render methods to instance properties assigned only when the
definition actually provides them, so the absence check in
ToolExecutionComponent works correctly.
2026-02-16 17:19:36 +00:00
can1357 25de46f16d docs: update README 2026-02-16 14:04:14 +00:00
can1357 81bf013d37 chore: bump version to 12.7.6 2026-02-16 15:02:50 +01:00
can1357 2214a9a62c feat(coding-agent/config): fix spark priority 2026-02-16 15:02:16 +01:00
can1357 045d2894ff chore: bump version to 12.7.5 2026-02-16 14:37:24 +01:00
can1357 9fcfb83fe0 feat(coding-agent/config): updated model selection with additional variants for fast and comprehensive discovery
- Updated SMOL_MODEL_PRIORITY to include additional model variants (gpt-5.3-spark, cerebras/zai-glm-4.7, haiku-4-5, haiku-4.5) for improved fast model discovery.
- Updated SLOW_MODEL_PRIORITY to include additional model variants (gpt-5.3-codex, gpt-5.3, gpt-5.1-codex, gpt-5.1, opus-4.6, opus-4-6, opus-4.5, opus-4-5, opus-4.1, opus-4-1) for improved comprehensive model discovery.
2026-02-16 14:36:36 +01:00
can1357 5d966ec439 chore: bump version to 12.7.4 2026-02-16 14:26:53 +01:00
can1357 2845b8b58b fix(coding-agent/prompts): fixed codex stopping before turn finish
- Fixed system prompt to enforce tool calls on every turn until task completion, preventing premature stopping before turn finish.
- Reorganized contract and diligence sections to clarify inviolable rules and completion requirements.
- Consolidated redundant completion guidance and removed duplicate prime directive language.
2026-02-16 14:26:39 +01:00
can1357 9d5f3f2ab7 docs(coding-agent/prompts): clarified contract rules requiring tool calls per turn and forbidding standalone updates
- Clarified contract rule 2 to explicitly require at least one tool call per turn unless task is complete.
- Added new contract rule 3 forbidding standalone progress updates without task continuation.
- Renumbered subsequent contract rules 3-7 to 4-8 to accommodate new rule.
- Reinforced critical section guidance with same tool call requirement for turn validity.
2026-02-16 14:18:34 +01:00
can1357 1186b408f4 chore: bump version to 12.7.3 2026-02-16 13:44:08 +01:00