Commit Graph

1891 Commits

Author SHA1 Message Date
can1357 2e33e436b4 feat: switched to native text sanitization, removed Bun.stripANSI
- Added `sanitizeText` function to pi-natives that strips ANSI escape sequences, removes control characters and lone surrogates, and normalizes line endings.
- Moved `sanitizeText` function from `@oh-my-pi/pi-utils` to `@oh-my-pi/pi-natives` for better code organization and native performance.
- Added line length clamping (4000 characters) to bash and Python execution output to prevent excessively long lines.
- Replaced internal `#normalizeOutput` methods with `sanitizeText` utility function in bash and Python execution components.
- Fixed bash interactive tool to gracefully handle malformed output chunks by normalizing them with `sanitizeText`.
- Simplified documentation by removing WASM terminology from package descriptions and comments.
2026-02-14 03:25:13 +01:00
can1357 2aa156060b feat(coding-agent/memories): isolated memory storage by project working directory to prevent cross-project contamination
- Modified memory storage to isolate memories by project working directory, preventing cross-project memory contamination.
- Added encodeProjectPath function to safely encode working directory paths for use in memory storage directory names.
- Updated getMemoryRoot function to accept cwd parameter and include encoded project path in memory directory structure.
- Updated clearMemoryData function signature to accept cwd parameter for project-specific memory cleanup.
- Updated test fixtures to use project-aware memory root paths.
2026-02-14 02:35:56 +01:00
can1357 aff638f24a fix(coding-agent/config): added ENOENT error check for keybindings config loading
- Added check for ENOENT errors when loading keybindings config to silently return empty config instead of logging warnings for missing files.
2026-02-14 02:29:24 +01:00
can1357 596130e452 fix(coding-agent): fixed Cloudflare markdown handling and output sanitization for agents
- Fixed binary output handling in bash-interactive sessions by sanitizing terminal output before truncation.
- Fixed fetch tool to prevent treating HTML content as plain text or markdown by adding content-type validation.
- Fixed output truncation notice to correctly display byte limit using maxBytes field.
- Fixed Cloudflare compression-related corrupted bytes issue by disabling HTTP compression negotiation in web scraper.
- Improved error handling in bash-interactive output appending with fallback normalization.
2026-02-14 02:24:25 +01:00
can1357 3d19d7fb16 chore: bump version to 12.3.0 2026-02-14 02:03:11 +01:00
can1357 4571e505d9 feat(coding-agent): implemented codex-style memory system with two-phase extraction and consolidation pipeline
- Added autonomous memory extraction and consolidation system with two-phase pipeline for extracting durable knowledge and consolidating into reusable skills.
- Added /memory slash command with subcommands (view, clear, reset, enqueue, rebuild) for inspecting and managing memory maintenance.
- Added configurable memory settings including concurrency limits, lease timeouts, token budgets, and rollout age constraints.
- Added memory injection payload that includes learned context in system prompts with operational rules for reading and using memory artifacts.
- Improved system prompt building to support memory guidance injection and enhanced error handling in resolvePromptInput function for multiline input.
2026-02-14 02:02:48 +01:00
can1357 c5478ebca7 chore: bump version to 12.2.1 2026-02-14 01:05:38 +01:00
can1357 2e34b37b53 chore: bump version to 12.2.0 2026-02-14 00:59:18 +01:00
can1357 87010ea61e feat: added WebSocket retry logic with configurable budget and enum-based transport policy
- Added automatic retry logic for WebSocket stream closures before response completion with configurable retry budget.
- Changed `providers.openaiWebsockets` setting from boolean to enum with values 'auto', 'off', 'on' for more granular WebSocket policy control.
- Implemented WebSocket stream retry mechanism that attempts reconnection before falling back to SSE transport when retry budget is exhausted.
- Fixed WebSocket stream retry logic to properly handle mid-stream connection closures and preferWebsockets option handling.
- Added helper functions isCodexWebSocketTransportError() and isCodexWebSocketRetryableStreamError() to classify WebSocket errors.
- Reorganized imports across multiple files for better code organization and consistency.
2026-02-14 00:58:42 +01:00
can1357 9176aa96ae fix(coding-agent/tools): improved fetch tool error reporting and response metadata handling
- Improved error reporting in fetch tool to include HTTP status codes when URL fetching fails.
- Fixed fetch tool to preserve actual response metadata (finalUrl, contentType) instead of defaults when requests fail.
2026-02-14 00:28:37 +01:00
can1357 26f0eb378c feat: added WebSocket session state management and retry logic with idle timeout detection
- Added `providerSessionState` option to share provider state map for session-scoped transport and session caches.
- Added WebSocket retry logic with configurable retry budget and delays via environment variables.
- Added WebSocket idle timeout detection to prevent hanging connections.
- Added WebSocket v2 beta header support for newer protocol versions.
- Added WebSocket handshake header capture to extract and replay session metadata.
- Implemented automatic cleanup of provider session state resources on session disposal.
2026-02-14 00:26:04 +01:00
can1357 7bf5664690 feat: added WebSocket transport support for OpenAI Codex with SSE fallback
- Added WebSocket transport support for OpenAI Codex responses with automatic fallback to SSE on connection failure.
- Added preferWebsockets option to Agent and Model configurations to hint that WebSocket transport should be preferred when supported by provider implementations.
- Added prewarmOpenAICodexResponses() function to pre-establish WebSocket connections for improved performance.
- Added getProviderDetails() function and getOpenAICodexTransportDetails() function to expose transport state and provider configuration information.
- Added provider details display in session info showing active provider configuration and authentication details.
- Added OpenAI websockets setting to enable WebSocket transport preference for OpenAI Codex models in coding agent configuration.
2026-02-14 00:01:25 +01:00
can1357 d1e16d2101 refactor: implemented $PWD > cwd to prevent macOS symlink resolution
- Replaced all direct `process.cwd()` calls with `getProjectDir()` utility function across 40+ files to centralize project directory resolution logic.
- Added `getProjectDir()` and `setProjectDir()` functions to `@oh-my-pi/pi-utils/dirs` module to provide abstracted project directory management.
- Made `SessionManager.list()` method asynchronous to support asynchronous session discovery operations.
- Updated default working directory resolution throughout codebase to use `getProjectDir()` instead of `process.cwd()` for improved project directory detection.
2026-02-13 23:40:02 +01:00
can1357 f8e915e14e fix(coding-agent/modes): added abort and wait logic for active compaction before starting new session
- Added abort and wait logic for active compaction before starting new session to prevent race conditions.
2026-02-13 19:37:10 +01:00
can1357 db48d3270f fix(coding-agent/tools): fixed heredocs by preserving internal spacing in bash normalization
- Removed aggressive whitespace normalization that was breaking heredocs and indentation-sensitive scripts.
- Preserved internal spacing and tabs in bash command normalization to support heredocs and indentation-sensitive scripts.
- Added test cases for internal spacing preservation and heredoc indentation handling.
2026-02-13 18:49:38 +01:00
can1357 3bd1bc1e26 perf(coding-agent): improved git context loading with configurable timeouts and parallel queries
- Improved git context loading performance with configurable timeouts and parallel status/commit queries.
- Enhanced git context reliability with better error handling for timeout and command failures.
- Refactored git command execution to use Bun.spawn with timeout handling instead of shell command wrapper.
2026-02-13 18:49:26 +01:00
can1357 c305872ddc feat(coding-agent): added real-time OAuth provider authentication validation with status indicators
- Added real-time OAuth provider authentication validation with visual status indicators (checking, valid, invalid).
- Added `validateAuth` and `requestRender` options to OAuthSelectorComponent for custom authentication validation and UI refresh callbacks.
- Changed OAuth provider selector to display live authentication status instead of static login state.
- Updated logout flow to refresh OAuth provider authentication state before showing selector.
2026-02-13 18:33:21 +01:00
can1357 0658940410 test(coding-agent/tools): updated python execution test to use full session file path
- Updated python execution test to use full session file path with .jsonl extension instead of hardcoded filename.
2026-02-13 18:06:57 +01:00
can1357 828cbcff33 chore: bump version to 12.1.1 2026-02-13 16:04:25 +01:00
can1357 9647181774 chore: added GitHub templates, triage command, updated license and package metadata
- Added issue templates (bug report, feature request, question) with provider/platform dropdowns
- Added PR template and security policy
- Added /triage Claude command for automated issue classification
- Updated LICENSE to include Can Boluk copyright
- Updated author/contributors across all package.json files
- Added homepage, bugs, keywords, engines to all packages
- Created platform:wsl label for WSL-specific issues
2026-02-13 16:03:15 +01:00
can1357 5f95cd891a chore: bump version to 12.1.0 2026-02-13 15:43:23 +01:00
can1357 a61cde0644 feat: added optional cache parameter to glob/grep/fuzzyFind and improved fs cache handling
- Added optional `cache` parameter to `glob()`, `grep()`, and `fuzzyFind()` functions to enable shared filesystem scan caching.
- Added new `invalidateFsScanCache()` function to allow manual invalidation of filesystem scan cache entries.
- Improved filesystem path canonicalization in cache invalidation logic to handle relative paths and non-existent paths more robustly.
- Fixed variable shadowing bug in grep's `match_ext` method where extension parameter was compared against itself.
- Added early return optimization in glob when `maxResults` is zero to avoid unnecessary filesystem scanning.
2026-02-13 15:42:31 +01:00
can1357 08e9c685f3 refactor(dirs): restructured environment variable access and simplified configuration in test suite
- Refactored environment variable access to use dedicated getter/setter functions in test suite.
- Simplified configuration constants by removing ompConfig dependency and using hardcoded values.
- Introduced module-level caching for agent directory and subdirectory paths to improve performance.
- Added setAgentDir() function to manage agent directory updates and cache invalidation.
- Reorganized dirs.ts with logical section headers and consolidated subdirectory functions using helper utilities.
- Updated directory accessor functions to accept optional agentDir parameter for flexibility.
2026-02-13 15:26:06 +01:00
can1357 fb72f5d6a6 refactor: restructured filesystem scan cache integration and extracted discovery profiles
- Refactored filesystem scan cache integration to use pre-scanned entries from fs_cache module instead of manual directory walking in grep.rs.
- Extracted filesystem scan cache invalidation helpers into dedicated fs-cache-invalidation.ts module with three functions: invalidateFsScanAfterWrite, invalidateFsScanAfterDelete, and invalidateFsScanAfterRename.
- Centralized file mention discovery profile configuration into getMentionCandidateDiscoveryProfile() function for improved maintainability.
- Added comprehensive documentation of filesystem-scan cache architecture contract including cache key specifications, TTL policies, and invalidation patterns.
- Updated CHANGELOG.md to document filesystem scan cache invalidation helpers and named discovery profile for file mention candidates.
2026-02-13 15:06:32 +01:00
can1357 fcd7ff4f84 refactor(dirs): centralized directory path utilities into @oh-my-pi/pi-utils/dirs module
- Extracted directory path utilities from multiple packages into a centralized '@oh-my-pi/pi-utils/dirs' module.
- Moved 30+ path helper functions (getAgentDir, getConfigRootDir, getPluginsDir, getMCPConfigPath, etc.) from scattered locations into a single shared utility module.
- Consolidated APP_NAME, CONFIG_DIR_NAME, and VERSION constants into the centralized dirs module for reuse across packages.
- Updated 70+ import statements across packages/ai, packages/coding-agent, packages/stats, and packages/tui to use the new centralized module.
- Removed local path construction logic and replaced with utility function calls for improved maintainability and consistency.
- Deleted packages/coding-agent/src/extensibility/plugins/paths.ts as its functions were moved to the centralized dirs module.
2026-02-13 15:06:05 +01:00
can1357 402713a1ee refactor(natives): centralized fs scan cache with invalidation and fd module
- Extracted shared fs_cache.rs from glob.rs: global TTL policy (env-configurable),
 cache-aware scanning, empty-result fast recheck (~200ms), explicit invalidation API
- Moved fuzzyFind from grep.rs into dedicated fd.rs module using shared scan cache
- Removed per-call cacheTtlMs from GlobOptions and FuzzyFindOptions (global policy)
- Added invalidateFsScanCache NAPI export, wired into write/edit tools after mutations
- Cleaned up TS callers: file-mentions, autocomplete, tests no longer own cache semantics
2026-02-13 14:57:24 +01:00
can1357 d2f61099fa fix(natives): unified fuzzy file search scoring and cache 2026-02-13 14:31:43 +01:00
can1357 d3e6839b07 fix(coding-agent/patch): removed misleading quickfix suggestions from stale ref error messages
- Removed misleading quickfix suggestions from stale ref error messages.
2026-02-13 14:23:59 +01:00
can1357 6530cc5834 feat(coding-agent/tools): enhanced bash execution environment with non-interactive defaults
- Enhanced bash execution environment with comprehensive non-interactive defaults for pagers, editors, package managers, and tooling to prevent command blocking and interactive prompts.
- Updated interactive bash terminal UI label from 'InteractiveTerm' to 'Console' for improved clarity.
2026-02-13 14:07:38 +01:00
can1357 3ade89fd1f fix(coding-agent): added fuzzy @file auto-read matching
Fixes #57
2026-02-13 14:07:38 +01:00
can1357 4c399f018a docs(coding-agent): added comprehensive models.yml provider
- Added comprehensive `models.yml` provider integration guide documenting custom model registration, provider overrides, API adapters, merge behavior, and practical integration patterns for Ollama, vLLM, LM Studio, and proxy endpoints.
- Updated README to reference new `models.yml` documentation and clarified that `models.json` is still supported for legacy configurations.
- Updated CHANGELOG to document the new models.yml guide and configuration format migration.
2026-02-13 13:39:50 +01:00
can1357 1b24d4d655 fix(coding-agent): moved hook status line above editor input 2026-02-13 13:26:17 +01:00
can1357 21f5914121 fix(coding-agent): auto-discover ollama without config
Fixes #52.
2026-02-13 12:57:53 +01:00
can1357 733a46c226 fix(coding-agent): discovered ollama models at runtime 2026-02-13 12:56:22 +01:00
Can Bölük 7965f330e7 Merge pull request #49 from kylesnowschwartz/feat/claude-plugins-discovery
feat(coding-agent): add Claude Code marketplace plugin discovery
2026-02-13 12:33:52 +01:00
can1357 9482a57135 fix(coding-agent): fixed plugin registry validation and precedence 2026-02-13 12:33:14 +01:00
can1357 02bf493ba8 fix(coding-agent): handled fully exhausted oauth rotation
Fixes #55.
2026-02-13 12:28:46 +01:00
can1357 0db2f4a7c9 fix(coding-agent): added managed venv fallback for python setup
Fixes #47.
2026-02-13 12:28:35 +01:00
Chris Watson 71bde186f4 feat(coding-agent): default minimax providers to MiniMax M2.5 (#53) 2026-02-13 09:32:52 +01:00
kylesnowschwartz 7a6b42353e fix(coding-agent): respect plugin scope and handle multiple registry entries
- P1: Use root.scope instead of hardcoded 'user' level in claude-plugins provider
- P2: Iterate all registry entries per plugin ID, not just first one
- P3: Add home parameter to discoverAgents() for test isolation
- P4: Add test coverage for claude-plugins discovery (12 tests)
- P5: Cache listClaudePluginRoots results to avoid repeated parsing

Addresses issues found in adversarial review of PR #49
2026-02-13 11:11:05 +13:00
kylesnowschwartz 842bf84a2b feat(coding-agent): add Claude Code marketplace plugin discovery
Add discovery provider that loads skills, commands, hooks, tools, and
agents from ~/.claude/plugins/cache/ based on installed_plugins.json.

- Add parseClaudePluginsRegistry() and listClaudePluginRoots() helpers
- Create claude-plugins.ts provider with priority 70 (below claude.ts)
- Register provider for skills, slash-commands, hooks, and tools
- Integrate plugin agents into task/discovery.ts

Closes #48
2026-02-13 10:23:15 +13:00
can1357 3dbd6b6f02 fix(coding-agent): make tool tests format-agnostic for hashline output 2026-02-12 20:32:13 +01:00
can1357 787aac026b chore: bump version to 12.0.0 2026-02-12 20:30:39 +01:00
can1357 cae5aaa3cc feat(coding-agent): changed default edit mode to hashline and enabled hash line reading
- Changed default edit mode from `patch` to `hashline` for more precise code modifications.
- Changed `readHashLines` setting default from false to true to enable hash line reading by default.
2026-02-12 20:29:58 +01:00
can1357 412ab9ea00 fix(coding-agent,ai): resolve issues #33, #34, #35, #37
- show help instead of crashing on `omp setup` with no args
- show runtime-discovered MCP servers in `/mcp list`
- remove deprecated Anthropic model entries from models.json
- sort models by recency in model selector
2026-02-12 20:29:06 +01:00
can1357 1587b4b880 chore: bump version to 11.14.5 2026-02-12 15:26:34 +01:00
can1357 c7c0a1e7b7 build: bumped @biomejs/biome from 2.3.14 to 2.3.15
- Bumped @biomejs/biome from 2.3.14 to 2.3.15.
2026-02-12 15:26:24 +01:00
can1357 95b05ca644 fix(coding-agent): add Bun runtime errata guard for OSC sequence width bug
Detects known Bun.stringWidth mishandling of OSC sequences at startup
and exits with a clear upgrade message instead of crashing in the TUI
render path.

Fixes #31
2026-02-12 15:25:13 +01:00
can1357 35dd7b9060 chore: bump version to 11.14.4 2026-02-12 12:10:06 +01:00
can1357 c518e24678 fix(coding-agent/mcp): added type assertion to OAuth metadata response for type safety
- Added type assertion to OAuth metadata response to ensure proper type safety.
2026-02-12 12:09:48 +01:00