Commit Graph

2542 Commits

Author SHA1 Message Date
can1357 0caef39a0f chore: bump version to 11.14.2 2026-02-12 08:40:50 +01:00
can1357 a4b619bde4 feat(ai/providers): added claude-code-20250219 to Claude beta defaults configuration
- Added claude-code-20250219 to Claude beta defaults configuration.
2026-02-12 08:40:42 +01:00
can1357 da6558b13b chore: bump version to 11.14.1 2026-02-12 08:38:17 +01:00
can1357 531f8e7f4a chore: updated Claude Code to v2.1.39 with improved reliability and OAuth enhancements
- Updated Claude Code version header to 2.1.39 and runtime version to v24.13.1.
- Increased request timeout from 60s to 600s for improved reliability on slower connections.
- Reordered Accept-Encoding header values to prioritize Brotli compression.
- Updated OAuth endpoints to use platform.claude.com and expanded scopes to include user:sessions:claude_code and user:mcp_servers.
- Removed deprecated beta features claude-code-20250219 and fine-grained-tool-streaming-2025-05-14.
- Improved Bun binary detection and update process with version verification and environment variable checking.
2026-02-12 08:35:15 +01:00
can1357 857abcc321 chore: bump version to 11.14.0 2026-02-12 04:47:42 +01:00
can1357 af20324d62 feat(coding-agent/lsp): added SwiftLint linter client with JSON reporter and bash.virtualTerminal setting
- Added SwiftLint linter client with JSON reporter support for Swift file linting.
- Changed SwiftLint configuration to use 'lint' command with JSON reporter for structured output.
- Changed bash.virtualTerminal default setting from 'on' to 'off' for standard non-interactive execution.
- Implemented SwiftLintClient with lint() method that executes swiftlint with JSON output and converts violations to LSP diagnostics.
- Added bash.virtualTerminal settings option with 'on' (PTY-backed interactive) and 'off' (standard non-interactive) values.
2026-02-12 04:47:24 +01:00
can1357 3d29303296 refactor(coding-agent/modes): restructured tool argument cloning and preview diff injection logic
- Extracted tool arguments cloning logic into dedicated `cloneToolArgs` helper function to improve code reusability.
- Moved preview diff injection logic from `computeHashlineDiff` callback into new `#getCallArgsForRender` method to centralize argument transformation for rendering.
- Applied `cloneToolArgs` to constructor and `updateArgs` method to ensure tool arguments are properly cloned on assignment.
2026-02-12 04:37:25 +01:00
can1357 2c7a32f28c feat(pty): added PTY-backed interactive command execution with streaming output support
- Added PTY (pseudo-terminal) backed interactive command execution with streaming output support via PtySession class in pi-natives.
- Added PtyStartOptions and PtyRunResult types to configure and report PTY session execution status.
- Added write(), resize(), and kill() methods to PtySession for interactive control of running commands.
- Added interactive bash execution via PTY with real-time terminal rendering and input forwarding in bash-interactive tool.
- Added --no-pty CLI flag and PI_NO_PTY environment variable to disable PTY-based interactive bash execution.
- Added bash.virtualTerminal setting to control PTY-backed interactive execution behavior.
2026-02-12 04:34:24 +01:00
can1357 cf864bbf7e feat(coding-agent/lsp): added sourcekit-lsp language server support for Swift files
- Added sourcekit-lsp language server support for Swift files with configuration for command execution and root marker detection.
2026-02-12 03:21:46 +01:00
can1357 baa788879c chore(ai): updated model configurations and sorted Antigravity models alphabetically
- Sorted Antigravity models alphabetically in generated models.json and generation script.
- Updated Antigravity model configurations with corrected model IDs, names, and parameters.
- Fixed qwen/qwen3-max-thinking maxTokens from 4096 to 202752 to match context window.
2026-02-12 02:48:23 +01:00
can1357 e40dbc4892 chore: bump version to 11.13.1 2026-02-12 02:39:58 +01:00
can1357 df7a45b774 feat(coding-agent): added /move command to relocate sessions to different working directories
- Added /move slash command to allow users to relocate sessions to different working directories.
- Added moveTo() method to SessionManager for programmatic session relocation with file system operations and rollback support.
- Added refreshSlashCommandState() method to InteractiveMode for dynamic slash command reloading when changing directories.
- Added setSlashCommands() method to AgentSession to allow external management of file-based slash commands.
- Added handleMoveCommand() handler in command-controller to process /move commands with validation and error handling.
2026-02-12 02:38:59 +01:00
can1357 57becd56ee fix(brush): prevented zombie processes by tracking reap state and implementing Drop trait
- Added zombie process prevention by tracking reap state and implementing Drop trait to ensure processes are properly cleaned up.
- Enabled kill_on_drop for tokio child processes to automatically terminate processes when handles are dropped.
- Improved process termination logic to check reap state before attempting kill operations and properly track completion.
2026-02-12 02:38:57 +01:00
can1357 2e0cbf9f4c feat(oauth): added Perplexity OAuth authentication with native macOS app extraction and email OTP flows
- Added Perplexity OAuth authentication support with native macOS app extraction and email OTP login flows.
- Implemented loginPerplexity and refreshPerplexityToken functions for OAuth token management.
- Created PerplexitySocket class providing Socket.IO v4 client over Engine.IO v4 WebSocket transport with RPC support.
- Added OAuth authentication to Perplexity web search provider with automatic token refresh and SSE streaming support.
- Extended SearchResponse interface with authMode field to track authentication method (oauth or api_key).
- Changed PerplexityProvider.isAvailable() to async to support OAuth token availability checking.
2026-02-12 02:31:58 +01:00
can1357 d0045f77d3 chore: bump version to 11.13.0 2026-02-12 01:12:25 +01:00
can1357 da455e63fd feat: removed .pi configuration directory alias in favor of .omp
- Removed support for `.pi` configuration directory alias in favor of `.omp` across all packages.
- Updated all configuration paths and references from `.pi` to `.omp` in user and project directories.
- Refactored configuration discovery in builtin.ts to simplify directory traversal logic and remove multi-alias support.
- Simplified Python module discovery to use single directory paths instead of arrays of aliases.
- Updated debug and crash log paths from `.pi/agent/` to `.omp/agent/` in TUI package.
2026-02-12 01:12:03 +01:00
can1357 f5c828c147 fix(coding-agent): stop importing creds from legacy dirs 2026-02-12 00:55:55 +01:00
can1357 a44ae81262 refactor(coding-agent): extracted cross-platform path opening logic into unified utility function
- Extracted cross-platform URL and file path opening logic into a unified `openPath` utility function.
- Removed duplicate platform-specific browser opening code from five modules (stats-cli, debug, login-dialog, command-controller, mcp-command-controller) and replaced with calls to the centralized utility.
- Simplified error handling by delegating platform detection and command execution to the reusable utility function.
2026-02-12 00:55:09 +01:00
can1357 66923df045 chore: bump version to 11.12.0 2026-02-12 00:33:51 +01:00
can1357 c4446526c2 refactor(pi-natives): improved safety documentation and refactored OS distro detection logic
- Added SAFETY comments documenting unsafe block invariants in process child collection.
- Refactored nested if statement to use let-else guard clause pattern in OS distro detection.
2026-02-12 00:32:59 +01:00
can1357 1f3d3c3a81 fix(ai): validate new provider api keys and prompt cancel keys 2026-02-12 00:29:57 +01:00
can1357 ebab346561 fix(pr-merge): fixed copilot initiator and provider login regressions 2026-02-12 00:25:11 +01:00
Chris Watson 0f519ec965 fix: respect X-Initiator header from model config in GitHub Copilot providers
The GitHub Copilot providers were unconditionally overriding the X-Initiator
header based on message role. This prevented the subagent fix from working
because subagents send the task as a user message.

Now the providers check if X-Initiator is already set in the model headers
before applying the default logic. This allows the sdk.ts fix to properly
mark subagent requests as agent-initiated.
2026-02-12 00:20:43 +01:00
Chris Watson 483497bdcd fix: send X-Initiator: agent header for GitHub Copilot subagent sessions 2026-02-12 00:20:43 +01:00
Chris Watson f4a4aad60d feat(ai): add MiniMax Coding Plan to OAuth login menu
Add MiniMax Coding Plan providers to the interactive login menu:
- minimax-code (International): https://api.minimax.io/v1
- minimax-code-cn (China): https://api.minimaxi.com/v1

Both use API key flow (not OAuth):
- Opens browser to https://platform.minimax.io/subscribe/coding-plan
- User subscribes and pastes API key back to CLI
- API keys stored as OAuth credentials with never-expire timestamp
2026-02-12 00:20:40 +01:00
Chris Watson cf97ef0650 feat(ai): add MiniMax Coding Plan provider
Add support for MiniMax Coding Plan with OpenAI-compatible API:
- New providers: minimax-code (international) and minimax-code-cn (China)
- Environment variables: MINIMAX_CODE_API_KEY and MINIMAX_CODE_CN_API_KEY
- Uses thinkingFormat: 'zai' for reasoning compatibility
- Models: MiniMax-M2, MiniMax-M2.1, MiniMax-M2.1-lightning
- Base URLs: https://api.minimax.io/v1 (intl), https://api.minimaxi.com/v1 (CN)

The Coding Plan is a subscription-based service separate from regular MiniMax API.
2026-02-12 00:19:33 +01:00
Chris Watson 1793b155cd docs(ai): add Z-AI to supported providers list in README 2026-02-12 00:19:00 +01:00
Chris Watson 103174ba13 feat(ai): add Z.AI (GLM Coding Plan) as login provider
Add support for z.ai's GLM Coding Plan as a provider accessible via `/login`.
Implements API key-based authentication similar to Kimi Code.

Changes:
- Create login flow in `utils/oauth/zai.ts` with browser redirect to API keys page
- Add API key storage methods (`saveApiKey`, `getApiKey`) to CliAuthStorage
- Register Z.AI in OAuth provider types, exports, and CLI handler
- Add GLM-5 model to Z.AI provider

Users can now authenticate with:
 bunx @oh-my-pi/pi-ai login zai
2026-02-12 00:19:00 +01:00
luk 20098888a0 fix(coding-agent): always include extension-registered tools in initial tool set
Extension-registered tools were excluded when --tools filter was active.
Include them unconditionally alongside custom tools.
2026-02-12 00:19:00 +01:00
can1357 193724d1d4 refactor(coding-agent): restructured hashline format and simplified test infrastructure
- Changed hashline format separator from two spaces to pipe character (|) throughout codebase for consistency.
- Simplified ollama installation checks in test files by replacing execSync with Bun.which() and inverting PI_NO_LOCAL_LLM to PI_LOCAL_LLM environment variable.
- Added early return guards in test beforeAll hooks to skip tests when required tools (ollama, magick) are unavailable.
- Added debug instrumentation to system prompt building via PI_DEBUG_STARTUP environment variable for startup performance monitoring.
- Removed prompt cache retention assertion from openai-codex streaming test.
2026-02-12 00:12:59 +01:00
can1357 833811be59 feat(coding-agent): improved system info collection with macOS detection and optional values
- Added macOS marketing name detection to system information collection for both Rust and TypeScript implementations.
- Changed system info functions to return optional values instead of fallback strings, improving data accuracy.
- Refactored GPU caching to be independent from other system info, reducing unnecessary cache invalidation.
- Updated environment info collection to filter out undefined values, providing cleaner system prompt output.
2026-02-11 20:42:25 +01:00
can1357 f10f60c786 feat(coding-agent): refactored file display mode handling and improved hashline format readability
- Changed hashline display format separator from pipe to two spaces for improved readability.
- Removed `lines` and `hashes` parameters from read tool in favor of automatic file display mode resolution.
- Added `resolveFileDisplayMode` utility to centralize file display mode configuration logic.
- Integrated file display mode settings into grep and read tools for consistent output formatting.
- Consolidated tool parameter types to use schema-derived types via Typebox `Static` utility.
- Updated parseLineRef to handle both legacy pipe-separator and new two-space hashline formats.
2026-02-11 12:11:08 +01:00
can1357 bcf5e05c17 chore(react-edit-benchmark/runs): updated benchmark reports for 15 models with new test results and variants
- Removed outdated benchmark reports from previous test runs across multiple models and edit variants.
- Added new benchmark reports for Claude Haiku 4.5, Claude Sonnet 4.5, Deepseek V3.2, Devstral Medium, Gemini 3 Flash, GLM-4.5-Air, GPT-5.1-Codex-Mini, GPT-5.2-Codex, Grok-4-1-Fast, Grok-4-Fast-Non-Reasoning, Grok-Code-Fast-1, Kimi K2.5, Minimax M2.1, Qwen Turbo, and Zai-GLM-4.7 models across hashline, patch, and replace edit variants.
- Updated benchmark test results with improved task success rates and edit success metrics across all tested models.
2026-02-11 10:51:28 +01:00
can1357 f47113b88f docs: added comprehensive documentation for Browser Tool, Native Engine, and vendored Rust crates
- Added documentation for Browser Tool (Puppeteer with Stealth) with 25+ actions, accessibility snapshots, 14 stealth plugins, user agent spoofing, and selector flexibility.
- Added comprehensive documentation for Native Engine (Rust N-API) with detailed module breakdown covering grep, shell, text, keys, highlight, glob, task, ps, prof, system_info, image, clipboard, and html modules.
- Updated package descriptions to reflect N-API bindings instead of WASM bindings for pi-natives.
- Added documentation for vendored Rust crates (brush-core-vendored and brush-builtins-vendored) used for embedded bash execution.
2026-02-11 10:24:42 +01:00
can1357 fce033cbed fix(coding-agent/tools): fixed resource leak and async support in browser query handler
- Fixed resource leak in browser query handler by properly disposing owned proxy elements for non-winning candidates.
- Fixed script evaluation to support async functions and await expressions in browser evaluate operations.
- Removed unused maxLines parameter from buildMutationPreviewAgainstOriginal function and simplified preview generation logic.
2026-02-11 09:56:10 +01:00
can1357 209a5c464f chore(react-edit-benchmark): updated runner tool arguments to remove 'ls' skill and add '--no-skills' flag
- [ { "text": "Updated runner tool arguments from 'read,edit,write,ls' to 'read,edit,write' with '--no-skills' flag in single task execution.", "user_visible": false }, { "text": "Updated runner tool arguments from 'read,edit,write,ls' to 'read,edit,write' with '--no-skills' flag in batch execution.", "user_visible": false } ], "issue_refs">.
2026-02-11 09:38:32 +01:00
can1357 ad5ac9d7b4 docs(coding-agent/prompts): simplified system prompt guidance by removing verbose assumption formatting
- Simplified system prompt guidance by removing verbose assumption formatting instructions.
2026-02-11 09:27:23 +01:00
can1357 2707546434 feat(coding-agent): enhanced hashline edits with replace operation, validation, and field renames
- Added new `replace` hashline edit operation for substring-style fuzzy text replacement without line references, with optional `all` flag for replace-all behavior.
- Added `noopEdits` array to `applyHashlineEdits` return value to report edits that produced no changes, including edit index, location, and current content for diagnostics.
- Added validation to detect and reject hashline edits using wrong-format fields (`old_text`/`new_text` from replace mode, `diff` from patch mode) with helpful error messages.
- Renamed hashline edit operation keys from `single`/`range`/`insertAfter` to `set_line`/`replace_lines`/`insert_after` for clearer semantics.
- Enhanced error messages for wrong-format hashline edits to guide users toward correct operation syntax.
2026-02-11 09:18:28 +01:00
can1357 a28a565ead feat(coding-agent/patch): enhanced hashline edit validation and error recovery with deduplication and format checking
- Added noopEdits array to applyHashlineEdits return type to track edits that produce no changes.
- Added validation to reject edits with wrong-format fields (old_text/new_text from replace mode, diff from patch mode) that indicate model confusion.
- Added additionalProperties tolerance to hashline edit schemas to allow flexible field handling.
- Added deduplication logic to remove duplicate edits targeting the same line(s) with identical destination content.
- Improved error handling for missing end fields in edit ranges by returning single-line specs instead of requiring both start and end.
- Enhanced no-op error recovery guidance in prompts with detailed instructions to re-read file and function context after consecutive no-op errors.
2026-02-11 09:03:48 +01:00
can1357 8d685b0880 feat(react-edit-benchmark): added zero-tool-call retry logic and config parameters to benchmark runners
- Added `noOpRetryLimit` and `mutationScopeWindow` configuration parameters to benchmark config.
- Implemented zero-tool-call retry logic in single task runner to automatically retry when model produces no tool calls, up to the configured limit.
- Implemented zero-tool-call retry logic in batched task runner to automatically retry when model produces no tool calls, up to the configured limit.
- Removed unused `_formatEditArgs` function from report module.
- Removed preventable failure diagnostics reporting from benchmark report generation.
2026-02-11 08:12:10 +01:00
can1357 9ff078bdfd fix(coding-agent/patch): removed whitespace preservation override logic in patch application
- Removed whitespace preservation logic that was overriding model-generated formatting choices in patch application.
- Deleted `preserveWhitespaceOnlyLines` and `preserveWhitespaceOnlyLinesLoose` functions that were incorrectly reverting intentional formatting changes.
- Updated test to reflect that model whitespace choices are now respected without override.
2026-02-11 08:12:09 +01:00
can1357 21b53881fd fix(ai): fixed retry handling and error content in Anthropic tool results
- Increased CODEX_MAX_RETRIES from 2 to 5 to improve reliability on transient failures.
- Added parsing of retry delay from error response body text (e.g., 'Please try again in 225ms') when retry-after headers are unavailable.
- Ensured Anthropic tool_result content is never empty when is_error is true by providing fallback error message.
2026-02-11 08:12:09 +01:00
can1357 72ac7891ec refactor(coding-agent): restructured hashline edits: renamed operations and improved diagnostics
- Renamed hashline edit operation types from replaceLine/replaceLines to single/range for improved clarity.
- Renamed content field to replacement in hashline edit operations to better reflect its purpose.
- Enhanced no-op edit diagnostics to perform line-by-line comparisons and distinguish between identical and normalized replacements.
- Improved error messages for hashline edits to clarify differences between literal identical content and whitespace-normalized content.
- Removed timeout-retries configuration option from react-edit-benchmark CLI and simplified retry logic.
- Updated all test cases and documentation to reflect renamed hashline edit operation types and fields.
2026-02-11 08:12:09 +01:00
can1357 1bebc8c6fd chore: expanded Biome configuration to include TypeScript files in package root directories
- Expanded Biome configuration to include TypeScript files in package root directories with new glob pattern `packages/*/*.ts`.
2026-02-11 08:12:09 +01:00
can1357 6c5fa149da feat(coding-agent): removed insertBefore and substr hashline edit operations
- Removed insertBefore and substr hashline edit operations, simplifying the edit API to support only replaceLine, replaceLines, and insertAfter operations.
- Updated hashline edit schema and type definitions to remove insertBefore and substr operation types from the ParsedRefs union and edit validation logic.
- Removed insertBefore and substr test cases from hashline test suite, including tests for insert-before functionality, anchor echo stripping, and substring matching.
- Updated benchmark runner to refactor edit operations from src/dst format to discriminated union types (replaceLine, replaceLines, insertAfter) and adjusted insertAfter line references.
2026-02-11 08:12:08 +01:00
can1357 4c0cba5984 feat(coding-agent): enhanced hashline edit tool with whitespace normalization, error recovery, and diagnostic improvements
- Added remaps property to HashlineMismatchError to store a map of stale references to their corrected versions with quick fix suggestions.
- Added diagnostic output for no-op edits that displays target lines from failed edit operations to help users understand why edits had no effect.
- Added computeLineHash and parseLineRef helper functions to public exports for use in diagnostic and validation logic.
- Enhanced error messages in HashlineMismatchError with quick fix suggestions showing stale references and their corrected versions.
- Updated hashline edit tool documentation with critical guidelines on preserving formatting, recovery procedures, and pre-submission verification checklist.
2026-02-11 08:12:08 +01:00
can1357 269f7de483 feat(coding-agent): redesigned hashline edit API with discriminated unions and improved hash algorithm
- Redesigned hashline edit API to use discriminated union variants (replaceLine, replaceLines, insertAfter, insertBefore, substr) instead of nested src/dst structure.
- Changed hash algorithm from xxHash64 hex to xxHash32 base36 encoding and increased hash length from 2 to 3 characters.
- Added substr edit variant to match and replace content by unique substring when line hashes are unavailable.
- Implemented line relocation heuristics to resolve stale line references when hash uniquely identifies a moved line.
- Moved substr needle search from edit application phase to pre-validation phase for earlier error detection.
- Migrated hashline edit type definitions from manual TypeScript interfaces to schema-derived types using Static<typeof schema> pattern.
2026-02-11 08:12:08 +01:00
can1357 bf9ee97d22 feat(coding-agent/patch): added substr source specification for substring-based line matching in patches
- Added `substr` source specification kind to match and replace lines by unique substring without requiring line-hash references.
- Implemented substring matching logic in hashline edits with validation for uniqueness and error handling for not-found and ambiguous cases.
- Added schema definition and type guards for the new `substr` operation type across patch system.
2026-02-11 08:12:07 +01:00
can1357 3e90682970 feat(react-edit-benchmark): enhanced error messages with mutation previews and improved file verification
- Added mutation preview hints to error messages when edits fail with 'No changes made' errors, showing line numbers, hashes, and added/removed lines.
- Changed formatter to pin JavaScript fixtures to the flow parser to avoid parser-dependent formatting drift.
- Added whitespace preservation logic to treat whitespace-only differences as passing in file verification.
2026-02-11 08:12:07 +01:00
can1357 ffdc44e8f1 feat(coding-agent): removed substring source specification from hashline edits and simplified SrcSpec type
- Removed substring source specification kind from hashline edits, requiring users to use line-hash references instead.
- Simplified SrcSpec type to use generic type parameter for line references, removing substring variant from union.
- Updated react-edit-benchmark to use --max-tasks option for deterministic task sampling and changed default batch sizes to 1.
2026-02-11 08:12:07 +01:00