Commit Graph

809 Commits

Author SHA1 Message Date
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 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 3e47a7c3d5 fix(ai): restored claude.ai anthropic authorize url
Fixes #38
2026-02-13 14:20:39 +01:00
can1357 733a46c226 fix(coding-agent): discovered ollama models at runtime 2026-02-13 12:56:22 +01:00
can1357 f2b2b25528 Merge remote-tracking branch 'origin/main' 2026-02-13 12:27:41 +01:00
can1357 345e5d4f84 fix(ai): fixed cloud code assist claude schema sanitization
Fixes #45.
2026-02-13 12:27:12 +01:00
Drazen Urch 79a8d224f0 fix(ai): always include reasoning.encrypted_content for reasoning models (#50)
When store is false, OpenAI does not persist response items server-side.
Previously, encrypted_content was only requested when reasoningEffort or
reasoningSummary options were explicitly set. Without it, reasoning items
are serialized with just their ID, causing 404 errors on subsequent turns
when OpenAI cannot resolve the ID reference.

Fixes #41
2026-02-13 09:33:47 +01:00
can1357 787aac026b chore: bump version to 12.0.0 2026-02-12 20:30:39 +01:00
can1357 3cc603a426 feat(ai): added GPT-5.3, MiniMax M2.5, Llama 3.1, and Qwen3 VL models
- Added GPT-5.3 Codex Spark model with 128K context window and extended reasoning capabilities.
- Added MiniMax M2.5 and M2.5 Lightning models via OpenAI-compatible API (minimax-code and minimax-code-cn providers).
- Added MiniMax M2.5 and M2.5 Lightning models via Anthropic API (minimax and minimax-cn providers).
- Added Llama 3.1 8B model via Cerebras API.
- Added MiniMax M2.5 model via OpenRouter and Vercel AI Gateway.
- Added Qwen3 VL 32B Instruct multimodal model via OpenRouter.
2026-02-12 20:29:06 +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
Bowen Dwelle 7a3f63eb4a fix(ai): Use glm-4.7 for Z.AI validation (#40)
The Z.AI login flow was hardcoded to validate API keys using the 'glm-5'
model. However, the Z.AI Coding Plan, which this login is for, currently
provides access to 'glm-4.7', with 'glm-5' being rolled out incrementally.

This caused login to fail for users who did not yet have 'glm-5' access.

This change updates the validation model to 'glm-4.7' to match the model
available in the Coding Plan.

Fixes #39
2026-02-12 18:59:05 +01:00
can1357 1587b4b880 chore: bump version to 11.14.5 2026-02-12 15:26:34 +01:00
can1357 35dd7b9060 chore: bump version to 11.14.4 2026-02-12 12:10:06 +01:00
can1357 94b6b40fb9 chore: bump version to 11.14.3 2026-02-12 09:27:01 +01:00
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 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 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 66923df045 chore: bump version to 11.12.0 2026-02-12 00:33:51 +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 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
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 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 61591ea21c chore: bump version to 11.11.0 2026-02-10 22:17:45 +01:00
can1357 4e8fa51616 feat(ai): added TypeScript types and simplified model function signatures
- Added TypeScript type declarations for models.json to provide better IDE support and type safety.
- Simplified type signatures for getModel() and getModels() functions by removing complex generic type inference in favor of simpler, more maintainable typing.
- Updated google-antigravity provider model ordering and metadata, including renamed Gemini 2.5 Flash (Thinking) model and expanded input types for claude-opus-4-5-thinking.
- Refactored test helper code in context-overflow.test.ts to improve code clarity and type safety.
2026-02-10 22:17:29 +01:00
can1357 1845e96d13 feat(ai): migrated models export from TypeScript to JSON format and updated dependencies
- Migrated models export from TypeScript module to JSON format, changing the public API from importing MODELS from './models.generated' to importing from './models.json' with JSON import assertion.
- Updated @anthropic-ai/sdk dependency from ^0.72.1 to ^0.74.0.
- Simplified model generation script by replacing 49 lines of TypeScript code generation with direct JSON serialization.
- Updated @types/bun devDependency from ^1.3.8 to ^1.3.9 across all packages.
- Removed models.generated.ts exclusion from biome.json linting configuration.
2026-02-10 22:01:35 +01:00
can1357 e1014d57bc chore: bump version to 11.10.4 2026-02-10 19:45:16 +01:00
can1357 f10574567e chore: bump version to 11.10.3 2026-02-10 19:31:10 +01:00
can1357 14355bb39c chore: bump version to 11.10.2 2026-02-10 19:27:34 +01:00
can1357 a728bb08f8 chore: bump version to 11.10.1 2026-02-10 19:19:29 +01:00
can1357 b016092e9b chore: bump version to 11.10.0 2026-02-10 18:46:35 +01:00
can1357 0ca5449f3b feat(ai): added Kimi K2 models and fixed Claude context window limits
- Added support for Kimi K2, K2 Turbo Preview, and K2.5 models with reasoning capabilities.
- Fixed Claude Opus 4.6 context window to 200K across all providers (was incorrectly set to 1M).
- Fixed Claude Sonnet 4 context window to 200K across multiple providers (was incorrectly set to 1M).
- Improved Kimi Code model fetching to merge fallback models not returned by the API endpoint.
2026-02-10 16:08:53 +01:00
can1357 812cb25e8d chore: bump version to 11.9.0 2026-02-10 14:33:07 +01:00
can1357 df56d791b3 chore: bump version to 11.8.3 2026-02-10 07:56:14 +01:00
can1357 acf8ab5225 style: stylistic changes 2026-02-10 07:39:39 +01:00
can1357 7b884cbd20 chore: bump version to 11.8.2 2026-02-10 04:10:01 +01:00
can1357 9629411e9c chore: bump version to 11.8.1 2026-02-10 03:36:48 +01:00
can1357 8eae325a9f chore: bump version to 11.8.0 2026-02-10 03:15:33 +01:00
can1357 1c84a70417 fix(coding-agent): backported pi-mono changes (9ce00079..34878e)
packages/ai:
- feat: added OpenAI Codex stream test
- fix: google-gemini-cli provider cleanup
- fix: google-shared provider improvements
- fix: amazon-bedrock provider fix
- fix: openai-codex-responses provider fix
- chore: regenerated models

packages/coding-agent:
- feat: extension API reload method and UI sub-protocol
- feat: tilde expansion in custom skill directories
- feat: RPC mode reload support
- feat: tools-manager improvements
- fix: CLI args updates
- docs: extensions and RPC documentation updates

packages/tui:
- feat: kill-ring and undo-stack modules
- feat: editor enhancements (kill/yank, undo/redo)
- feat: input component improvements

packages/agent:
- test: agent test additions
2026-02-10 03:15:19 +01:00