Commit Graph

2410 Commits

Author SHA1 Message Date
can1357 223613479a fix(coding-agent): resolve resumable session lookup
Fixes #268
2026-03-03 14:22:53 +01:00
can1357 883a93ce55 fix(ai): recover on additional 413 overflow variants
Fixes #271
2026-03-03 14:15:18 +01:00
can1357 65aae89215 chore: bump version to 13.6.2 2026-03-03 06:09:35 +01:00
can1357 6357b245a5 fix: corrected resource tracking and context cleanup across MCP and virtualization layers
- Fixed resource refresh tracking by storing connection references alongside promises to prevent stale deduplication.
- Fixed update target resolution to explicitly handle missing ompPath and use path.resolve() for consistent normalization.
- Added error handling and logging in Smithery registry detail fetching to gracefully handle failures and track issues.
- Fixed virtualization context cleanup in error paths to prevent partially-started instances from remaining active.
- Fixed API key retrieval to use dynamic provider configuration instead of hardcoded provider string.
- Enhanced test utilities to capture and verify request parameters for improved test coverage and debugging.
2026-03-03 06:07:22 +01:00
can1357 1f78e7fa13 chore: cleanup package level stuff 2026-03-03 05:44:53 +01:00
can1357 ce74ff08a1 chore: bump version to 13.6.1 2026-03-03 05:35:11 +01:00
can1357 0611e97dbc fix(ai,coding-agent): resolve copilot endpoint at provider layer
Fixes #260
2026-03-03 05:33:56 +01:00
can1357 b0fef96800 fix(coding-agent): harden omp update install-target detection
Use Bun-native command execution and PATH-prioritized resolution so updates apply to the installation users actually invoke.\n\nFixes #247
2026-03-03 05:29:26 +01:00
can1357 990be89394 chore: bump version to 13.6.0 2026-03-03 04:53:24 +01:00
can1357 31afd70edc docs(coding-agent): update MCP guide for smithery commands and sse transport 2026-03-03 04:51:13 +01:00
can1357 9935b9b351 feat(internal-urls): added mcp:// protocol for MCP resource access via read tool
- Added mcp:// internal URL protocol for reading MCP server resources via the read tool.
- Removed read_resource tool; MCP resource reading now integrated into read tool with mcp:// URLs.
- Implemented McpProtocolHandler with URI template matching for resolving MCP server resources.
- Updated MCP resource notifications to recommend read(path="mcp://<uri>") syntax.
2026-03-03 04:48:37 +01:00
Dev Ned c22ba6b49c feat: implemented Smithery Registry for MCP search (#96)
* Implemented Smithery MCP Searchable Registry

* refactor(coding-agent): consolidated MCP registry search and improve error handling

- Extracted `parseCommandArgs` and `stripControlChars` utilities to reduce duplication in MCP command controller. Replaced custom URL opening logic with centralized `openPath` utility across OAuth and registry flows.
- Enhanced Smithery auth error handling to gracefully degrade on file read failures with logging instead of throwing, and improved chmod error reporting. Normalized Smithery API base URL to strip trailing slashes.
- Improved registry search pagination to fetch multiple pages until sufficient results are found, with semantic mode support to preserve API relevance ranking. Deduplicated entries by identity key and applied local sorting only in non-semantic mode.

---------

Co-authored-by: can1357 <me@can.ac>
2026-03-03 04:48:23 +01:00
can1357 ff73fdf18c fix(coding-agent/utils): fixed Bun.spawn options for opening paths
- Added stdin: "ignore" to prevent stdin from being inherited by spawned process.
- Removed windowsHide option which is not supported by Bun.spawn.
2026-03-03 04:16:17 +01:00
can1357 a88dd79f9c feat(task): surface explicit abort reasons for subagent results
- Add a dedicated abortReason field to SingleResult and thread it through task execution paths so aborted subagents show actionable context instead of a generic badge.
- Populate abortReason for signal cancellation, pre-start cancellation, submit_result aborted status, and missing submit_result after reminders

Fixes #248
2026-03-03 04:14:04 +01:00
haram 801553b118 Implement fuse-projfs as an alternative to fuse-overlay for Windows. (#244)
* Implement fuse-projfs to use ProjFS on WIndows.

* fix(pi-natives): prevent ProjFS session key mismatch and start race

---------

Co-authored-by: can1357 <me@can.ac>
2026-03-03 04:12:30 +01:00
can1357 7ce8b6d5df fix(coding-agent): render hook selector/input inline instead of as overlay popup
Reverts the overlay change from 0d3bef3f1 that caused the plan mode
approval dialog to float over the plan content, making it unreadable.

Fixes #240
2026-03-03 04:03:59 +01:00
can1357 f6553a00ff fix(coding-agent): guard stale MCP subscription post-actions 2026-03-03 04:00:30 +01:00
can1357 7b4ab548c0 fix: corrected URI template expansion and MCP notification epoch handling
- Fixed URI template matching to handle empty string expansions in MCP resource queries.
- Fixed LM Studio URL validation to preserve invalid baseUrl instead of applying localhost fallback.
- Fixed MCP notification epoch handling to prevent unsubscribe calls when old subscriptions resolve after re-enabling.
- Extracted hardcoded LM Studio base URL to named constant for improved maintainability.
- Refactored notification epoch check logic for improved code clarity and readability.
2026-03-03 03:56:30 +01:00
can1357 019c593782 fix: resolve merged regression set across coding-agent and ai
- Normalize LM Studio discovery URLs to avoid duplicated /v1 segments
- Harden status-line PR cache with branch+repo context validation and guarded async writes
- Apply Foundry auth precedence correctly and preserve system trust roots when custom CA is provided
- Split Copilot premium multiplier handling by plan tier while preserving agent-initiated zero billing
- Catch MCP notification refresh failures and route read_resource via deterministic full template matching
- Add regression tests for each fix cluster and keep targeted suites green
2026-03-03 03:39:19 +01:00
can1357 3b0f86bd92 fix(prompts): clarified range selection guidance to prevent orphaned braces
- Clarified range selection guidance for hashline tool to prevent orphaned braces and duplication errors.
- Updated example to demonstrate correct end-range boundary inclusion in replace operations.
2026-03-03 03:31:29 +01:00
Sage Grigull 02ebc5e8e1 add LM Studio support (#259)
* feat: Add LM Studio as a supported model provider with OpenAI-compatible API fetching and discovery.

Add LM Studio as a supported AI provider with optional API key, environment variables, and discovery.

* feat: Add rustup as a dev dependency.

* fix: Refine LM Studio API key handling to conditionally send authorization headers during model discovery based on whether the key is a default local token or a custom key, and add new tests.

* feat: Enhance OAuth token and account ID resolution for model providers in the model registry.

* rebase for packages/ai/CHANGELOG.md

* feat: improve implicit model discovery to independently auto-detect Ollama and LM Studio, and refine LM Studio base URL handling.

---------

Co-authored-by: Can Bölük <can1357@users.noreply.github.com>
2026-03-03 03:26:57 +01:00
Miroslav Drbal [ApoC] 63b203b937 feat(mcp): resource notifications, subscriptions, and read_resource builtin tool (#254)
* feat(mcp): resource notifications, subscriptions, and read_resource builtin tool

- Add MCP resource subscription lifecycle (subscribe/unsubscribe on connect/disconnect)
- Wire mcp.notifications setting with live toggle support
- Add debounced followUp injection for resource change notifications
- Add global read_resource builtin tool with server resolution by URI/template scheme
- Add MCP prompt commands (buildMCPPromptCommands) with array content support
- Add server instructions injection into system prompt with attribution
- Add mcp.notificationDebounceMs configurable setting

Client (client.ts):
  listResources, listResourceTemplates, readResource with pagination
  subscribeToResources, unsubscribeFromResources
  listPrompts, getPrompt, serverSupportsPrompts
  serverSupportsResources, serverSupportsResourceSubscriptions

Manager (manager.ts):
  Notification dispatch with subscribed-URI guard
  Concurrent refresh deduplication via pending promise map
  setNotificationsEnabled with subscribe/unsubscribe toggle

Tests:
  client-resources.test.ts (31 tests)
  client-prompts.test.ts (20 tests)
  mcp-read-resource.test.ts (13 tests)

* fix(mcp): address PR review - eager prompt init and stale subscription cleanup

P1: Make setOnPromptsChanged eagerly fire for servers that already
have prompts loaded. The callback is registered after MCP discovery
has already loaded prompts and fired the hook, so without this the
handler is never called on the common startup path. The fix is in
the manager itself (not the caller), eliminating the race condition
regardless of when the callback is wired.

P2: Unsubscribe removed resource URIs on resource refresh.
refreshServerResources was subscribing to the new URI set and
overwriting #subscribedResources without unsubscribing URIs that
were previously subscribed but no longer present, leaving stale
subscriptions active on the server.

* fix(mcp): add resources and prompts to /mcp help text and subcommand completions

* feat(mcp): add /mcp notifications command

Shows per-server notification capabilities with subscription state:
- Lists supported notification types (tools/list_changed, resources/list_changed,
  prompts/list_changed) with check marks
- Shows resources/subscribe status with active subscription count
- Lists subscribed URIs with green ticks when notifications are enabled
- Displays overall enabled/disabled state (mcp.notifications setting)

* fix(mcp): address PR review comments on race conditions and stale state

- Await subscribe/unsubscribe in refreshServerResources so the refresh
  promise doesn't resolve before subscriptions are settled, preventing
  a second refresh from racing and overwriting tracking state (P2 #3)

- Guard setNotificationsEnabled subscribe .then() against a disable
  that happens while the subscribe request is in-flight (P2 #5)

- Re-check mcp.notifications setting inside debounce setTimeout
  callback so toggling off mid-window actually suppresses the
  follow-up message (P2 #4)

- Fire onToolsChanged and onPromptsChanged callbacks in
  disconnectServer so stale slash commands and tool registrations
  are cleaned up when a server is removed (P2 #2)

---------

Co-authored-by: Miroslav Drbal <miroslav.drbal@gendigital.com>
2026-03-03 03:26:07 +01:00
maximhar 7ea7b53783 feat(copilot): track premium requests with model multipliers (#255)
* Track Copilot premium requests with model multipliers

* refactor(copilot): source premium multipliers from models.json

* feat(copilot): add gpt-5.3-codex bundled model

* fix(stats): round premium request totals in summary

* fix(stats): round premium requests in sync summary
2026-03-03 03:26:00 +01:00
AK 4b651a95e9 add azure foundry support for claude code (#257) 2026-03-03 03:25:07 +01:00
Kevin Loftis 5ee80f3a36 feat: Add PR number segment to status bar (#258)
* Add PR number segment to status bar

Add a new 'pr' status line segment that shows the GitHub PR number
(e.g., #1234) as a clickable OSC 8 hyperlink when the current branch
has an associated pull request.

- Async lookup via 'gh pr view', cached per branch
- Invalidates on branch change via .git/HEAD watcher
- Falls back to hidden segment when no PR exists or gh unavailable
- Supports all theme presets (unicode, nerd font, ascii)
- Added to all preset layouts after the git segment

* Skip PR lookup on default branch, resolve dynamically

* Extract git-utils, add tests for parseGitHubRepo and parseDefaultBranch

* Fix PR lookup race condition, invalidation churn, and dotted repo names

- Guard #cachedPr writes against branch change during in-flight lookup
- Stop clearing PR cache in invalidate() (only .git/HEAD watcher should)
- Allow dots in GitHub repo names in parseGitHubRepo regex

* Simplify PR lookup: use gh pr view, try upstream/HEAD for default branch

- Replace gh pr list --head with gh pr view (requires gh repo set-default)
- Remove manual remote URL resolution — gh handles it
- Default branch detection falls back to upstream/HEAD when origin/HEAD is unset
2026-03-03 03:24:15 +01:00
HvC 0d2c5540db perf (pi-natives) : ast, fd, pty changes for performance (#252)
* perf (pi-natives -> fuzzy finder): precomputed query chars + fewer allocations in scoring

* restored fs-cache identity (oops)

* perf(pi-natives -> ast): parsed ast files once for multi-pattern search

* perf(pi-natives -> PTY waitloop tinto timed wait): reduced pty polling with timed waits

* fix codex suggestions

* surface websocket option

* ast in compile cancellation

* formatting and pty busy loop fix

---------

Co-authored-by: Brit <lol@no.com>
2026-03-03 03:23:25 +01:00
can1357 d5d56ab872 chore: bump version to 13.5.8 2026-03-02 21:17:28 +01:00
can1357 29005b90f9 fix(ai): corrected schema compatibility for Antigravity tool parameters
- Fixed schema compatibility issue by sanitizing patternProperties in tool parameters during Antigravity format conversion.
- Added sanitizeSchemaForCCA utility to remove unsupported schema properties when rewriting tools to legacy parameters format.
- Added test case verifying patternProperties removal during tool parameter conversion.
- Added PEP 563 forward reference support to Python prelude for improved type annotation compatibility.
2026-03-02 21:17:06 +01:00
can1357 03143aa5f1 chore: bump version to 13.5.7 2026-03-02 17:02:44 +01:00
maximhar 3119bfced5 fix(coding-agent): add explicit initiator attribution for Copilot headers (#246)
* fix(coding-agent): add explicit initiator attribution

Use message-level attribution for Copilot X-Initiator with role-based fallback, and persist attribution across custom/hook session paths.

Fixes #237

* fix(coding-agent): preserve legacy custom attribution fallback

* fix(coding-agent): remove async-result role special-case

* fix(coding-agent): inherit before_agent_start attribution from prompt

* test(coding-agent): tighten typing in attribution regressions
2026-03-02 17:01:44 +01:00
luke 09a768250b fix(ai): separate cache_control placement from system block construction (#245)
buildAnthropicSystemBlocks was unconditionally adding cache_control to system
blocks for OAuth cloaking. This triggered the early-return guard in
applyPromptCaching, which bailed before placing cache_control on conversation
messages. Result: only the system prompt (~21K tokens) was cached; conversation
history was sent as fresh uncached input every turn, dropping cache hit rate
from ~98% to ~40%.

Fix: make cache_control in buildAnthropicSystemBlocks opt-in via a cacheControl
option. The main streaming path (buildParams) omits it since applyPromptCaching
handles all cache breakpoint placement. External callers like the Anthropic
search provider that bypass applyPromptCaching pass cacheControl explicitly.

The guard in applyPromptCaching now only checks messages (for external callers
that pre-place breakpoints), not system/tool blocks.

Also removes dead hasCacheControlInBlocks function.

Introduced by: e7daffdda (feat: Claude fingerprint hardening)
Verified: cache hit rate restored from 20.8% to 99.3%.
2026-03-02 13:24:16 +01:00
HvC 28d9de74ce Implement Windows Sixel support and terminal capability checks (#241)
* windows sixel imp

* windows sixel imp, terminal capability check, pessimistic sixel selection

* fix codex suggestions

---------

Co-authored-by: Brit <lol@no.com>
2026-03-01 22:23:05 +01:00
can1357 9af71f5f61 feat(oauth-flow): enabled Codex identity for OAuth client registration
- Updated OAuth client name from 'oh-my-pi MCP' to 'Codex' for dynamic client registration.
- Added test coverage for OAuth client registration with Codex identity.
2026-03-01 20:51:51 +01:00
can1357 e201d69d19 chore: bump version to 13.5.6 2026-03-01 20:30:51 +01:00
can1357 67cbcfb8b0 test(coding-agent): removed faulty exit plan mode event controller test
- Deleted the event-controller-exit-plan-mode.test.ts file that contained an unreliable test for exit_plan_mode tool handling.
2026-03-01 20:30:32 +01:00
can1357 4e0f8aace0 fix(coding-agent): corrected exit_plan_mode to abort turn before approval
- Fixed exit_plan_mode handler to abort active agent turn before opening plan approval selector, ensuring proper session cleanup.
- Added test to verify abort is called before handleExitPlanModeTool in exit_plan_mode event handling.
2026-03-01 20:29:31 +01:00
can1357 e49f880cd9 chore: bump version to 13.5.5 2026-03-01 20:08:02 +01:00
luke 204f565f11 feat(coding-agent): add Kagi web search provider (#238)
- Add KagiProvider implementation (Search API v0)
- Register kagi in SearchProviderId type, provider map, and fallback order
- Add kagi to tool schema enum, SearchParams type, and settings UI
- Register KAGI_API_KEY in service provider map
- Update CHANGELOG
2026-03-01 19:40:40 +01:00
can1357 70dddada4f chore: bump version to 13.5.4 2026-03-01 15:51:56 +01:00
can1357 f1a63a5ed1 refactor(coding-agent/cli): restructured agents unpack to support user and project directories
- Replaced `getConfigDirs()` with `getAgentDir()` to resolve user agent directory at `~/.omp/agent/agents` by default.
- Added `--user` and `--project` flags to control target directory, with `--project` exporting to `./.omp/agents`.
- Updated help text and examples to document the new directory resolution behavior.
2026-03-01 15:51:11 +01:00
can1357 c87e909ea9 feat(coding-agent/cli): added agents unpack command to export bundled subagents
- Implemented `omp agents unpack` CLI subcommand to write bundled agent definitions to the local .omp/agents directory. Added support for --force flag to overwrite existing files and --dir flag to specify custom output directory. Integrated agents command into CLI router with JSON output option for programmatic use.
2026-03-01 15:49:20 +01:00
can1357 a21533de79 fix(coding-agent/web): improved retry logic for Gemini API with rate limit budgeting
- Added exponential backoff retry mechanism with configurable max retries for transient failures. Implemented rate limit budget tracking to prevent excessive delays on 429 responses. Fixed HTTP status propagation to prevent network errors from being retried when explicit HTTP failures occur.
2026-03-01 15:46:35 +01:00
can1357 4ae3568947 Merge branch 'fix/gemini-429-rotation' 2026-03-01 15:45:21 +01:00
can1357 d8d9a89d58 feat: stop passing AGENTS.md to subagents
Fixes #233
2026-03-01 15:44:55 +01:00
can1357 2551dc04a2 feat(mcp): added MCP OAuth server metadata discovery with header parsing
- Added `authServerUrl` field to `AuthDetectionResult` to capture MCP OAuth server metadata.
- Added `extractMcpAuthServerUrl()` function to parse and validate `Mcp-Auth-Server` header URLs from OAuth errors.
- Enhanced `discoverOAuthEndpoints()` to accept optional `authServerUrl` parameter and query `/.well-known/oauth-protected-resource` endpoint.
- Improved OAuth metadata extraction to handle multiple `clientId` field variations (`clientId`, `default_client_id`, `public_client_id`).
- Extracted metadata parsing logic into reusable `findEndpoints()` helper function supporting multiple OAuth metadata formats.
- Added comprehensive test coverage for OAuth endpoint discovery, header parsing, and error validation.

Fixes #235
2026-03-01 15:26:52 +01:00
n24q02m 06e25f0952 fix: revert aggressive rate limit rotation (Option A) 2026-03-01 17:58:26 +07:00
can1357 eaa8f72845 chore: bump version to 13.5.3 2026-03-01 11:41:08 +01:00
can1357 0a3c192d7d fix(pi-natives): bound shell reader shutdown wait
Fixes #230
2026-03-01 11:40:25 +01:00
can1357 05ffa7ede1 fix(coding-agent): normalize Exa MCP tool payload parsing
Fixes #229
2026-03-01 11:36:34 +01:00
can1357 6c55076fe4 docs(coding-agent/prompts): removed incorrect indentation example from hashline documentation
- Deleted the 'Bad' example that incorrectly demonstrated guessing indentation as spaces instead of using actual tabs.
- Kept the 'Good' example that correctly shows using real tab characters in JSON to match file indentation.
2026-03-01 11:32:30 +01:00