Commit Graph

74 Commits

Author SHA1 Message Date
can1357 1f6c61ac3a feat(ai): added OpenCode Zen provider and updated AI model configurations
- Added OpenCode Zen provider with API key-based authentication supporting multiple AI models.
- Added four new free models via OpenCode provider: glm-4.7-free, kimi-k2.5-free, minimax-m2.1-free, and trinity-large-preview-free.
- Added glm-4.7-flash model via Zai provider.
- Updated pricing and configuration for multiple models across Kimi, MiniMax, OpenRouter, Anthropic, Vercel AI Gateway, and Zai providers.
- Removed google/gemini-2.0-flash-exp:free from OpenRouter and stealth models from Vercel AI Gateway.
2026-01-31 02:11:23 +01:00
can1357 37d5b69250 feat(highlight): replaced cli-highlight with rust-based syntax highlighting
- Added native syntax highlighting module powered by syntect library with ANSI color output support.
- Implemented highlightCode() function that applies syntax highlighting to code with language detection and customizable color themes.
- Implemented supportsLanguage() function to check if a given programming language is supported for syntax highlighting.
- Implemented getSupportedLanguages() function that returns list of all supported language identifiers.
- Replaced cli-highlight dependency with native syntect-based highlighting in coding-agent theme module.
- Added comprehensive language alias mappings supporting 50+ programming languages including TypeScript, Python, Rust, Go, C/C++, and web languages.
2026-01-29 12:01:11 +01:00
can1357 32bc2b8d02 fix: fixed LSP server display, file streaming, and slash command autocomplete; reorganized npm scripts
- Fixed LSP servers showing as 'unknown' in status display when server warmup fails by using index-based lookup to correctly extract server name and file types.
- Fixed Read tool loading entire file into memory when offset/limit was specified by implementing streaming line-by-line processing that only collects requested range.
- Fixed slash command autocomplete applying stale completions when typing quickly by adding staleness check before applying completion on Enter/Return.
- Reorganized npm scripts to follow consistent naming pattern with separate TypeScript and Rust variants for check, lint, fmt, and fix operations.
- Updated release script to properly handle Rust workspace version updates in Cargo.toml files and regenerate lockfiles.
2026-01-29 10:57:20 +01:00
can1357 978b93ba62 refactor: migrated native tools to WASM-based implementation
- Consolidated grep, find, and image processing into a new `@oh-my-pi/pi-natives` WASM package.
- Eliminated subprocess overhead and simplified JS tool implementations.
- Updated CI to include Rust workspace, linting, formatting, and WASM build steps.
- Documented `Promise.withResolvers()` and `using` declarations for wasm-bindgen.
2026-01-29 09:29:21 +01:00
can1357 e94514e4f2 build(deps): updated dependencies across packages including protoc-gen-es, typebox, and other libraries
- Updated @bufbuild/protoc-gen-es from ^2.10.2 to ^2.11.0.
- Updated @types/bun from ^1.2.18 to ^1.3.7.
- Updated prettier from ^3.8.0 to ^3.8.1.
- Updated @sinclair/typebox from ^0.34.46 to ^0.34.48 across multiple packages.
- Updated @bufbuild/protobuf from ^2.10.2 to ^2.11.0 in packages/ai.
- Updated multiple dependencies including chalk, diff, file-type, zod, winston, recharts, and mime-types to their latest patch and minor versions.
2026-01-28 13:27:58 +01:00
can1357 a91330bae0 feat(ai): added Kimi Code provider integration with OAuth and token management
- Added Kimi Code provider integration with OAuth device authorization flow and token management.
- Added four new Kimi Code models (kimi-for-coding, kimi-k2, kimi-k2-turbo-preview, kimi-k2.5) with reasoning support and 262K context window.
- Added kimiUsageProvider for fetching and caching Kimi Code API usage quota information.
- Added kimi-code login command to CLI for OAuth authentication with Kimi Code.
- Updated openai-completions provider to support Kimi-specific headers and cached token formats.
- Updated MiniMax-M2 model pricing: input 1.2->0.6, output 1.2->3, cacheRead 0.6->0.1.
2026-01-28 13:22:19 +01:00
can1357 ec463fe7c7 chore(scripts): updated Bun engine requirement to 1.3.7 and added version validation
- Updated minimum Bun engine requirement from 1.2.0 to 1.3.7 across root and coding-agent packages.
- Added Bun version validation to install.ps1 with Get-BunVersion, Test-BunVersion, and Assert-BunVersion functions to enforce minimum version requirement.
- Added Bun version validation to install.sh with version_ge and require_bun_version functions to enforce minimum version requirement.
2026-01-28 04:10:00 +01:00
can1357 938beca49e chore: bump version to 8.6.0 2026-01-27 23:26:38 +01:00
can1357 d9a3291641 feat(deps): replaced external JSON/JSONL and text utilities with Bun built-in APIs
- Replaced external JSON/JSONL parsing libraries with Bun's built-in JSON5 and JSONL APIs across all packages.
- Removed dependencies: json5, ndjson, get-east-asian-width, json-stringify-safe, split2, through2, and @types/ndjson.
- Replaced custom text width and ANSI wrapping implementations with Bun.stringWidth() and Bun.wrapAnsi() APIs.
- Updated Bun type definitions from ^1.2.17 to ^1.2.18 and bun-types from ^1.3.5 to ^1.3.7.
- Refactored JSONL parsing throughout codebase to use Bun.JSONL.parse() and Bun.JSONL.parseChunk() with improved buffer management and error handling.
- Updated test assertions to use Bun.stringWidth() for dynamic width calculations instead of hardcoded values.
2026-01-27 19:18:58 +01:00
can1357 bdeefa6caa chore: bump version to 8.2.0 2026-01-24 04:29:25 +01:00
can1357 779ca4872b style(deps): migrated from Prettier to Biome and updated formatting rules
- Removed Prettier configuration files (.prettierignore and .prettierrc) and migrated formatting to Biome.
- Updated Biome configuration from version 2.3.11 to 2.3.12 and changed arrowParentheses rule from 'always' to 'asNeeded'.
- Pinned @biomejs/biome dependency to exact version 2.3.12 in package.json and bun.lock.
- Applied consistent arrow function formatting across 489 files by removing unnecessary parentheses around single parameters.
- Removed blank lines after comment blocks and reorganized imports for consistency across the codebase.
2026-01-24 04:20:19 +01:00
can1357 e22d123009 refactor(fs): migrated remaining sync file operations to async
- Converted readdirSync, readFileSync, and statSync to async readdir, readFile, stat across skills and agent discovery.
- Made scanDirectoryForSkills async and refactored custom directory scanning to use Promise.all for concurrent processing.
- Updated agent discovery to use fs/promises for async file reading and refactored helper patterns.
- Added AgentParsingError exception class for better error handling during agent parsing.
- Added filesystem error type guards (isEnoent, isEacces, isPerm, etc.) to pi-utils for safe error checking.
- Added color manipulation utilities to pi-utils for accessibility features.
- Added color-blind mode setting to settings manager.
- Migrated plugins, settings, and config modules from sync to async file operations.
- Updated error handling to use new pi-utils type guards for type-safe checking.
2026-01-24 03:18:03 +01:00
can1357 f66e5dba9b build(config): refactored build and TypeScript configuration with Bun loaders
- Removed WASM generation script; use Bun `wasm?raw` loader for imports.
- Added bunfig.toml with loaders for `.md`, `.py`, and `.wasm?raw` text imports.
- Added types/assets/index.d.ts for global TypeScript module declarations.
- Unified TypeScript configuration with tsgo-based checking across monorepo.
- Removed build and WASM steps from install and publish pipelines.
2026-01-24 00:03:52 +01:00
can1357 fcbfab765b refactor: consolidated module import paths
- Removed custom TypeScript path aliases and the associated transformation script.
- Replaced aliased imports with direct `@oh-my-pi` package imports for improved clarity.
- Simplified internal module references by removing explicit `/index` suffixes.
2026-01-23 21:01:13 +01:00
can1357 0fe761dc4b build(deps): refactored TypeScript and package configuration across monorepo
- Added tsconfig.publish.json files to all packages with optimized publish-time configuration.
- Updated all package.json scripts with prepublishOnly hooks for correct type checking during publish.
- Added @oh-my-pi/omp-stats path mappings to root tsconfig.json for consistent imports.
- Added WASM generation script for photon module and integrated into install:dev script.
2026-01-23 13:46:06 +01:00
can1357 7b5af2dd9f refactor(build): migrated imports to path aliases with per-package tsconfig support
- converted relative imports to path aliases ($c/*, $ai/*, $tui/*, etc.) across all packages
- added per-package tsconfig.json with complete path mappings for runtime resolution
- set importModuleSpecifier to non-relative for IDE auto-import preferences
- updated dev script to run from monorepo root for consistent path resolution
2026-01-23 11:56:32 +01:00
can1357 2273cf80d7 chore(coding-agent): added format-prompts script and standardized prompt formatting
- Added format-prompts script for standardizing prompt file formatting across the codebase.
- Updated system prompt tags from `<required>`/`<antipatterns>` to `<important>`/`<avoid>` for clarity.
- Enhanced prompt formatting by removing blank lines after colons and around blocks for consistency.
- Standardized whitespace handling across all prompt files to improve readability.
2026-01-23 07:03:46 +01:00
can1357 4c04c688d7 feat(omp-stats): added CLI stats command for omp-stats functionality
- Added stats command to CLI for accessing omp-stats functionality.
- Updated omp-stats package metadata with keywords and README.
2026-01-21 10:58:33 +01:00
can1357 f06d289338 feat(coding-agent): added normative patch generation for edit tool canonicalization
- Added normative patch generation for canonicalizing edit tool output.
- Implemented tool call argument rewriting for session history persistence.
- Enhanced patch applicator to support normalized patch input processing.
- Updated agent and AI types to include normative input parameters.
- Removed tar-stream dependency and replaced with Bun.Archive for benchmark package.
2026-01-19 16:16:55 +01:00
can1357 7a081e1c7c feat: added React mutation testing package and coding-agent improvements
- Added new @oh-my-pi/react-edit-benchmark package for React source code mutation testing.
- Added --no-title flag to disable automatic session title generation in coding-agent.
- Changed default behavior of read tool to omit line numbers by default.
- Added environment variable support for edit tool configuration and fuzzy matching.
- Updated test files to use import.meta.dir for ES module compatibility.
- Added Prettier configuration and CI improvements for private package handling.
2026-01-19 16:16:55 +01:00
can1357 ac151519c1 feat: port upstream changes from pi-mono (72047c05..55769e75)
AI provider fixes:
- Fixed Claude tool prefix matching and Gemini 3 unsigned tool handling
- Added Bedrock thinking budget guardrails and tool id sanitization
- Added tool argument coercion and Codex response retry logic

TUI improvements:
- Improved Kitty key handling and editor behavior (scrolling, padding, kill ring)

Coding agent changes:
- Added extension input interception, compaction helpers, and UI updates
- Added session forking prompt for cross-project sessions
- Added APPEND_SYSTEM discovery, piped stdin print mode, and key hint exports

Docs:
- Updated pi-mono sync point
2026-01-18 17:52:58 +01:00
can1357 242f319cfc feat(cursor): added Cursor AI provider with OAuth, HTTP/2 streaming, and tool execution bridge
- Added Cursor AI provider with HTTP/2 streaming support using Connect protocol and protobuf binary serialization.
- Added OAuth authentication flow for Cursor including browser-based login, token refresh, and expiry detection.
- Added 14 Cursor model definitions including Claude 4.5, GPT 5.x, Gemini 3, and Grok variants.
- Added execution bridge for Cursor tool calls supporting read, ls, grep, write, delete, shell, diagnostics, and MCP operations.
- Added cursorExecHandlers and cursorOnToolResult options to Agent for local tool execution with cursor-based streaming.
- Added emitExternalEvent method to Agent class for external event injection into agent state.
2026-01-11 07:42:41 +01:00
can1357 753be5d87f feat: introduced Worker-based subagent execution with BUILTIN_TOOLS registry
- Added ToolSession interface and Bun Worker-based subagent execution replacing subprocess spawning.
- Added BUILTIN_TOOLS registry and createTools factory function replacing individual tool exports.
- Added toolNames parameter for filtering which built-in tools to include in agent sessions.
- Removed deprecated tool exports (codingTools, readOnlyTools, createCodingTools, createReadOnlyTools).
- Removed subagent custom tool example and question custom tool example.
2026-01-07 03:03:34 +01:00
can1357 5919b0df94 refactor: switched to upstream @mariozechner/pi-ai and removed unused packages
- Replaced local @oh-my-pi/pi-ai with upstream @mariozechner/pi-ai@0.37.4
- Added sessionId support to agent for provider caching (OpenAI Codex)
- Deleted packages/ai (now using upstream)
- Deleted packages/mom (unused)
- Deleted packages/web-ui (unused)
2026-01-06 22:25:24 +00:00
can1357 0315cef75d refactor(coding-agent): extracted shared render-utils to eliminate duplication
- Added shared render-utils module with standardized formatting functions for truncation, bytes, tokens, duration, and tree rendering.
- Extracted resolveOmpCommand() helper to centralize cross-platform subprocess command resolution.
- Consolidated duplicate utility functions across grep, find, ls, notebook, ask, output, exa, lsp, and web search renderers.
- Updated web search tool to support 'auto' as explicit provider option for auto-detection.
2026-01-05 07:35:35 +01:00
can1357 856ed87b76 chore: removed test temp images from tracking, removed broken test script 2026-01-04 16:24:08 +01:00
can1357 77bca78dd3 chore: migrated release script to TypeScript 2026-01-04 16:16:29 +01:00
can1357 0654e5e477 fix(coding-agent): corrected /status column alignment across all sections
- Fixed /status command output to use consistent column alignment across all sections.
- Refactored status rendering to collect all line sections before calculating max width.
- Renamed dev:install script to install:dev for consistency.
2026-01-03 18:38:33 +01:00
can1357 790a5370bb feat: renamed binary from pi to omp with config migration support
- Renamed CLI binary and package from 'pi' to 'omp' across all platforms and installers.
- Changed environment variable prefix from PI_* to OMP_* with automatic migration support.
- Changed configuration directory from ~/.pi/ to ~/.omp/ with multi-path fallback discovery.
- Added getConfigDirPaths(), findConfigFile(), and readConfigFile() functions for config resolution across .omp, .pi, and .claude directories.
2026-01-03 15:54:45 +01:00
can1357 200df0d86f feat(scripts): added --source and --binary flags for install method control
- Added --source and --binary flags to control installation method in install scripts.
- Enabled automatic bun detection with fallback to prebuilt binary for default installation.
- Added bun-based installation option that installs bun automatically if needed.
- Documented new installer options in README with usage examples.
2026-01-03 14:43:33 +01:00
can1357 1a14429312 docs: restructured README with animated webp demos 2026-01-03 10:23:45 +01:00
can1357 86bfa2dd9c fix(hooks): use lint-staged to avoid index.lock race condition 2026-01-03 06:43:10 +01:00
can1357 754da171a4 feat: added interactive /review command with multi-mode selection
- Added interactive /review command with mode selection for base
branch, uncommitted changes, specific commit, or custom
instructions.
- Added subprocess tool registry for extracting and rendering tool
data from subprocess agents.
- Added combined review result rendering with verdict and findings
tree structure.
- Changed bundled commands to be overridable by user/project
commands with same name.
- Removed findings_count parameter from submit_review tool in
favor of automatic counting.
- Added fix npm script for auto-fixable lint issues with unsafe
fixes.
2026-01-03 06:39:04 +01:00
can1357 afcae56269 build(deps): added tsgo for faster type checking across packages
- Added @typescript/native-preview dependency to enable faster type checking with tsgo.
- Updated check scripts across packages to use tsgo instead of tsc for improved performance.
- Extended root check script to include coding-agent package type checking.
2026-01-02 22:18:45 +01:00
can1357 2be354322d chore: renamed package scope to @oh-my-pi for consistent branding
- Renamed npm package scope from @mariozechner to @oh-my-pi across all packages for consistent branding.
- Removed packages/pods directory and all related pod management functionality.
- Updated import paths and module declarations throughout codebase to reflect new package names.
- Reformatted code with consistent trailing comma removal and ternary operator alignment.
2026-01-02 18:08:23 +01:00
can1357 aa37aafde8 build: added dev:install script to streamline workspace setup
- Added dev:install script to streamline local development setup across all workspace packages.
2026-01-02 15:13:27 +01:00
can1357 b85d3f6aa4 merge(pi/main): integrate upstream changes through v0.31.1
Merged 53 commits from pi/main including:
- Export HTML rewrite with tree sidebar and /share command
- Hooks API enhancements (custom status, editor, session management)
- Edit diff preview before tool execution
- TUI fixes (Unicode format chars, OSC 8 hyperlinks, emoji optimization)
- Gemini CLI rate limit retry with server-provided delay
- Various bug fixes and documentation updates

Resolved conflicts by preserving Bun migration (spawn→Bun.spawn,
fs→Bun.file) while accepting upstream's new features and APIs.
2026-01-02 14:34:27 +01:00
can1357 1cee37cf92 build: migrated from Node.js to Bun for native TypeScript support
- Migrated from Node.js to Bun runtime to leverage native TypeScript execution and faster startup times.
- Replaced npm with bun package manager and updated lockfile format.
- Converted Node.js APIs (child_process, fs, readline) to Bun equivalents across all packages.
- Updated shebang lines from node/tsx to bun for CLI entry points.
- Removed TypeScript build step by using source files directly as package entry points.
- Updated CI workflows to use Bun instead of Node.js for installation and testing.
2026-01-02 13:46:05 +01:00
Mario Zechner a79fabb324 Remove proxy package
The proxy functionality is now handled by web-ui's createStreamFn
with external proxy servers.
2025-12-30 22:42:21 +01:00
Mario Zechner ee8dd7f182 Add release script
Usage: npm run release:patch|minor|major

Automates:
- Check for uncommitted changes
- Bump version
- Update CHANGELOGs: [Unreleased] -> [version] - date
- Commit and tag
- Publish to npm
- Add new [Unreleased] sections
- Push
2025-12-30 22:42:21 +01:00
Mario Zechner 7716d70d4e Version updates 2025-12-30 22:42:18 +01:00
Mario Zechner e7ad9738fc WIP: Remove global state from pi-ai OAuth/API key handling
- Remove setApiKey, resolveApiKey, and global apiKeys Map from stream.ts
- Rename getApiKey to getApiKeyFromEnv (only checks env vars)
- Remove OAuth storage layer (storage.ts deleted)
- OAuth login/refresh functions now return credentials instead of saving
- getOAuthApiKey/refreshOAuthToken now take credentials as params
- Add test/oauth.ts helper for ai package tests
- Simplify root npm run check (single biome + tsgo pass)
- Remove redundant check scripts from most packages
- Add web-ui and coding-agent examples to biome/tsgo includes

coding-agent still has compile errors - needs refactoring for new API
2025-12-25 01:01:03 +01:00
Mario Zechner ee700034e0 Switch to more stable, oldder tsgo, switch all check scripts to tsgo 2025-12-18 15:20:41 +01:00
Mario Zechner e71c3d8d6e Update tsgo, switch to tsc for agent package, as tsgo hangs on Alpine in Docker x86 2025-12-18 15:02:03 +01:00
Mario Zechner ce697e0345 Fix version scripts: clean reinstall to avoid npm workspace bug 2025-12-09 21:56:22 +01:00
Mario Zechner b5db6532c5 Run npm install after version bumps to sync package-lock.json 2025-12-09 21:52:51 +01:00
Mario Zechner 62a606744c Simplify compaction: remove proactive abort, use Agent.continue() for retry
- Add agentLoopContinue() to pi-ai for resuming from existing context
- Add Agent.continue() method and transport.continue() interface
- Simplify AgentSession compaction to two cases: overflow (auto-retry) and threshold (no retry)
- Remove proactive mid-turn compaction abort
- Merge turn prefix summary into main summary
- Add isCompacting property to AgentSession and RPC state
- Block input during compaction in interactive mode
- Show compaction count on session resume
- Rename RPC.md to rpc.md for consistency

Related to #128
2025-12-09 21:43:49 +01:00
Mario Zechner c6fd9eeeaa Fix tsgo type issues: update tsgo, fix ReasoningEffort import, remove broken enum-test 2025-12-08 22:59:13 +01:00
Mario Zechner f9e694861e chore: bump version to 0.12.6 2025-12-03 17:12:27 +01:00
Mario Zechner 92f3aaefb7 Add web-ui/example to workspaces, remove CI workaround 2025-12-03 14:27:02 +01:00