Commit Graph

29 Commits

Author SHA1 Message Date
can1357 606f9ac1f5 Merge remote-tracking branch 'origin/main' into pr-586-r2
# Conflicts:
#	packages/coding-agent/CHANGELOG.md
2026-04-01 15:33:13 +02:00
David Dembeck eaf28b341d fix(ai): omp commit fails with HTTP 400 on OpenAI-compatible endpoints when reasoning enabled (#577)
* fix(ai): Added developer role support for reasoning-enabled OpenAI models

- Added supportsDeveloperRole function to check developer role support based on provider and base URL.
- Updated system prompt role logic to use developer role only when supported.
- Improved reasoning content handling with provider-specific role enforcement.

* feat(ai): Added developer role support for reasoning models with provider fallback

- Exported supportsDeveloperRole function to enable cross-provider usage.
- Updated Azure provider to check developer role support before assignment.
- Implemented system role fallback when developer role is unsupported.
- Fixed role assignment to use developer role when supported.

* feat(ai): added support for Azure OpenAI inference endpoint

- Allow Azure OpenAI Inference endpoint (azure.com/openai) via `includes()` matching on baseUrl, enabling broader Azure-compatibility.

* test: add test file for developer role handler in OpenAI responses provider

* fix(ai): fixed developer role validation to reject custom base URLs

- Changed supportsDeveloperRole to use base URL pattern matching instead of provider short-circuit.
- Added tests to verify developer role support returns false for custom proxy base URLs.

* fix(ai): Updated GitHub Copilot endpoint detection

- Expands GitHub Copilot endpoint detection to support multiple GitHub Copilot enterprise and copilot-api domains.
- Adds 3 new test scenarios wrapping unsupported/correct patterns for github-copilot provider endpoints.

* chore(ci): Add *.tmp pattern in OS section

- Adds *.tmp to ignore all temporary files with .tmp extension
- Groups with other OS temp files (.DS_Store)

* docs(ai): Consolidate changelog entry for developer role fix

* feat(ai/providers): Added baseUrl resolution support across OpenAI providers

- Resolve baseUrl before buildParams calls in azure-openai-responses.ts for correct system role logic.
- Add baseUrl resolution to openai-responses.ts and openai-completions.ts.
- Add optional resolvedBaseUrl to getCompat function for better compatibility detection.
- Update supportsDeveloperRole to accept both Model objects and baseUrl strings.
2026-04-01 04:41:29 +02:00
Miroslav Drbal 05966c8910 feat(coding-agent): marketplace plugin project scope
Plugins can now be installed at user scope (global) or project scope
(per-project, higher capability priority). Scope is encoded in registry
file location, not a metadata field:

  user:    ~/.omp/plugins/installed_plugins.json
  project: <nearest-project>/.omp/plugins/installed_plugins.json
  cache:   ~/.omp/plugins/cache/plugins/  (shared, path-referenced)

Project root discovery: resolveActiveProjectRegistryPath(cwd) walks up
from cwd looking for the nearest .omp/ directory, falling back to the
nearest .git root. This is the single resolver used by install, uninstall,
list, upgrade, discovery, and doctor.

Discovery: listClaudePluginRoots(home, cwd?) reads both registries when
cwd is provided. Project entries shadow user entries for the same plugin
ID. Cache key is canonical ("${home}:${resolvedProjectPath}") so nested
cwds within the same project share a cache entry.

Manager changes:
- installPlugin({ scope? }): routes registry reads/writes by scope;
  checks collectReferencedPaths() across both registries before deleting
  any cached plugin dir to prevent cross-scope data loss
- uninstallPlugin(id, scope?), setPluginEnabled(id, enabled, scope?),
  upgradePlugin(id, scope?): throw a disambiguation error when the plugin
  exists in both scopes and no scope is specified
- upgradePluginAcrossScopes(id): new; upgrades all scopes the plugin is
  installed in; returns InstalledPluginEntry[]
- upgradeAllPlugins(): uses upgradePluginAcrossScopes; result includes scope
- listInstalledPlugins(): returns InstalledPluginSummary[] merged from both
  registries; user entries marked shadowedBy: "project" when overridden

CLI: omp plugin install|uninstall|upgrade|enable|disable --scope user|project
Slash: /marketplace install [--scope user|project] name@marketplace
MarketplaceManager constructed with projectInstalledRegistryPath in all
CLI handlers and builtin-registry.ts via resolveActiveProjectRegistryPath.

.gitignore: .omp/plugins/ added (local runtime state, not committed).
preloadPluginRoots/clearClaudePluginRootsCache carry cwd through for LSP.
main.ts passes getProjectDir() at startup.

Tests: 226 pass across 13 files. New: project-scope.test.ts (resolver
walk-up, .git fallback, null return, canonical path, shadow precedence);
manager scope tests (registry isolation, disambiguation errors, cross-scope
cache-ref protection, upgradePluginAcrossScopes, shadowedBy marking).

fixes #581
2026-03-31 17:43:09 +02:00
Emil Sit 47b2664adc build(coding-agent): generate docs index as build artifact
- Add 'prepack' script so bun publish regenerates the index before packing
- Add root-level 'prepare' script so bun install regenerates after cloning
- Gitignore and untrack docs-index.generated.ts
- Remove 'docs' from package.json 'files'

fixes #116
2026-02-20 10:11:52 +01:00
can1357 638398b61c chore: reorganize .gitignore, mv .claude/ to .omp/ 2026-02-19 07:53:31 +01:00
can1357 a155d98f9f feat(coding-agent): auto-switch dark/light theme via SIGWINCH
Replace single `theme` setting with `theme.dark` and `theme.light`.
Auto-detection is always on — COLORFGBG determines which slot to use.
On SIGWINCH, re-check COLORFGBG and switch themes if background changed.
Old `theme` setting auto-migrated using luminance detection.

Fixes #65
2026-02-15 10:20:11 +01:00
Dev Ned 7e4bedf18b Runtime MCP support (#17)
* + /mcp

- Reloads MCP manager in runtime state (no restart needed) and syncs with mcp.json.
- Handles OAuth discovery/auth flow automatically for auth-required servers.
- Validates server names and config shape before saving.
- Persists OAuth credentials in auth storage and links them to MCP config.
- Provides immediate connection checks and clear status messages.
- Supports enable/disable, reauth, and unauth flows that are easy to get wrong by hand.

* active agent tool registry runtime reload + token support for bearer auth http based transport

* +session rebind on succesful connection

* fix(coding-agent): address /mcp check failures

---------

Co-authored-by: can1357 <me@can.ac>
2026-02-10 14:09:41 +01:00
can1357 eabbde0c8a feat(natives): migrated native bindings from WASM to Node.js N-API with ripgrep-backed grep module
- Migrated native bindings from WebAssembly (wasm-bindgen) to Node.js N-API architecture for improved performance and platform support.
- Replaced worker pool-based async architecture with synchronous native addon calls, eliminating thread overhead and simplifying the API.
- Added new grep module with ripgrep-backed filesystem search supporting parallel processing, glob filtering, and context line extraction.
- Updated build system to compile Rust crates to platform-specific .node binaries instead of WASM modules.
- Removed WASI implementation and worker pool infrastructure no longer needed with N-API native bindings.
- Updated CI/CD pipeline to build native addons for multiple platforms (Linux x64/arm64, macOS x64/arm64, Windows x64) and include them in releases.
2026-01-31 18:02:56 +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 cc91f80e99 feat: added toolChoice support and optimized TUI
- Added ToolChoice type and toolChoice parameter support across all AI providers (OpenAI, Azure OpenAI, Anthropic, Google) enabling fine-grained control over tool/function selection during LLM calls.
- Added toolChoice override capability to Agent.prompt() method and session prompt options allowing callers to control tool selection behavior per request.
- Added provider-specific tool choice mapping functions (mapAnthropicToolChoice, mapGoogleToolChoice, mapOpenAiToolChoice) to normalize tool choice formats across different LLM APIs.
- Removed kernel heartbeat/ping mechanism from PythonKernel, simplifying health monitoring by relying on direct isAlive() checks instead of periodic HTTP requests.
2026-01-28 02:53:58 +01:00
can1357 79079e6ecd feat(coding-agent): added plan mode with approval workflow and tool gating
- Plan mode provides structured workflow where agents propose plans for user approval before execution.
- Added plan:// internal URL protocol for accessing plan files and injecting plan-mode context into subagent prompts.
- Added plan mode toggle shortcut and paused status indicator in status line.
- Fixed plan reference injection to properly pass workflow state to plan-mode system prompts.
- Improved autocomplete fuzzy matching to support subsequence matching for skill suggestions.
2026-01-25 19:35:26 +01:00
can1357 5a601bb0c0 feat: added Windows ARM64 support and streaming WASM loading with base64 fallback
- Added Windows ARM64 binary support and architecture detection in installers.
- Updated WASM loading to use streaming with base64 fallback for binary compatibility.
- Moved TTSR settings to dedicated tab and expanded abbreviation to Time Traveling Stream Rules.
- Added comprehensive install testing infrastructure with Docker validation.
- Updated package name from @oh-my-pi/omp-coding-agent to @oh-my-pi/pi-coding-agent.
2026-01-19 01:23:27 +01:00
can1357 d620f07c1e feat(coding-agent/core): added Python gateway coordinator with shared resource management
- Added shared Python gateway coordinator with file locking and automatic resource management.
- Added comprehensive Git helpers and line-based operations to Python prelude.
- Enhanced /status command to display Python gateway, LSP servers, and MCP connections.
- Changed default Python tool mode from ipy-only to both for shell execution support.
- Fixed Python tool proxy execution and signal handling in worker processes.
2026-01-18 19:54:35 +01:00
can1357 100061accb chore: merged in upstream changes
- Added ExtensionRuntime shared state with async extension factory support
- Introduced pluggable tool operations (BashOperations, FileOperations, etc.) for remote execution
- Added new CLI flags: --no-tools, --no-extensions, --no-skills
- Added login dialog, countdown timer, and component barrel export
- Added blockImages and thinkingBudgets settings
- Refactored stdin handling with StdinBuffer for improved key parsing
- Updated DEVELOPMENT.md with new architecture documentation
2026-01-10 06:32:51 +01:00
can1357 856ed87b76 chore: removed test temp images from tracking, removed broken test script 2026-01-04 16:24:08 +01:00
can1357 a67dae275a chore: add release command for claude 2026-01-03 04:11:48 +01:00
can1357 560c9670a8 feat: added MCP support and plugin system for external tool integration
- Added MCP (Model Context Protocol) support with stdio and HTTP transports for external tool integration.
- Implemented plugin system with install, enable, configure, and doctor commands for extensibility.
- Added 22 Exa MCP tools for web search, LinkedIn, company research, and websets operations.
- Introduced LSP tool with rust-analyzer support for code intelligence (diagnostics, hover, references, code actions).
- Added task tool for delegating work to specialized subagents with parallel execution support.
- Implemented web_search and web_fetch tools with Anthropic and Perplexity provider support.
2026-01-02 17:54:42 +01:00
Mario Zechner aa632c295d Remove test files, add out.html to gitignore 2026-01-01 21:50:32 +01:00
Mario Zechner 3d92a1e240 Clean-up 2025-12-30 22:42:22 +01:00
Mario Zechner b2be48bab3 Add out.jsonl to gitignore 2025-12-20 21:34:18 +01:00
Mario Zechner 372bed5615 Release v0.23.4 2025-12-18 16:56:50 +01:00
Mario Zechner cd323f6bc2 Add .opencode to gitignore 2025-12-17 16:06:53 +01:00
Mario Zechner 278a37f1a8 mom: remove dynamic timestamp from system prompt for better cache hits 2025-12-11 12:26:59 +01:00
Markus Ylisiurunen 9d7d7b6a25 support appending content to the system prompt via cli argument 2025-12-05 09:25:10 +02:00
Mario Zechner 0329440f26 fix: file @ autocomplete performance using fd
- Replace slow synchronous directory walking with fd for fuzzy file search
- Auto-download fd to ~/.pi/agent/tools/ if not found in PATH
- Performance improved from ~900ms to ~10ms per keystroke on large repos
- Remove minimatch dependency from tui package
- Graceful degradation if fd unavailable (empty results)

Fixes #69
2025-11-28 23:38:44 +01:00
Mario Zechner b67c10dfb1 feat: add cross-browser extension with AI reading assistant
- Create Pi Reader browser extension for Chrome/Firefox
- Chrome uses Side Panel API, Firefox uses Sidebar Action API
- Supports both browsers with separate manifests and unified codebase
- Built with mini-lit components and Tailwind CSS v4
- Features model selection dialog with Ollama support
- Hot reload development server watches both browser builds
- Add useDefineForClassFields: false to fix LitElement reactivity
2025-10-01 04:33:56 +02:00
Mario Zechner 9c3f32b91e feat(ai): Add models.generated.ts with 181 tool-capable models
- Generated from OpenRouter API and models.dev
- Includes models from Google, OpenAI, Anthropic, xAI, Groq, Cerebras, OpenRouter
- Provides type-safe model selection with autocomplete
2025-08-29 23:20:53 +02:00
Mario Zechner da66a97ea7 feat(ai): Add auto-generated TypeScript models with factory function
- Generate models.generated.ts from models.json with proper types
- Categorize providers: OpenAI (Responses), OpenAI-compatible, Anthropic, Gemini
- Create createLLM() factory with TypeScript overloads for type safety
- Auto-detect base URLs and environment variables for providers
- Support 353 models across 39 providers with full autocompletion
- Exclude generated file from git (rebuilt on npm build)
2025-08-25 21:31:29 +02:00
Mario Zechner a74c5da112 Initial monorepo setup with npm workspaces and dual TypeScript configuration
- Set up npm workspaces for three packages: pi-tui, pi-agent, and pi (pods)
- Implemented dual TypeScript configuration:
  - Root tsconfig.json with path mappings for development and type checking
  - Package-specific tsconfig.build.json for clean production builds
- Configured lockstep versioning with sync script for inter-package dependencies
- Added comprehensive documentation for development and publishing workflows
- All packages at version 0.5.0 ready for npm publishing
2025-08-09 17:18:38 +02:00