Commit Graph

3302 Commits

Author SHA1 Message Date
can1357 018de9fdd9 chore: bump version to 13.7.2 2026-03-04 01:09:50 +01:00
can1357 29a1f6f483 fix(coding-agent): corrected tab escaping in tool output rendering
- Applied tab escaping to tool output rendering to prevent display misalignment.
- Imported replaceTabs utility and applied it consistently across 4 output rendering paths.
2026-03-04 01:08:30 +01:00
can1357 bce8d4e4c9 feat(coding-agent): added Kagi login and cleaner search formatting
- Added `/login <provider>` command for direct OAuth provider login with automatic selector routing.
- Added Kagi API key authentication support as new OAuth provider across ai and coding-agent packages.
- Added optional `providerId` parameter to `showOAuthSelector()` for direct provider selection without manual input.
- Simplified web search result formatting by removing empty sections (Answer, Sources, Meta, Related).
- Fixed MCP tool schema dereferencing and Ajv validation warnings for non-standard format keywords.
- Refactored OAuth login/logout logic into extracted handler methods for improved maintainability.
2026-03-04 01:08:09 +01:00
can1357 a25d5b8f42 fix(coding-agent/task): corrected tab handling in error message rendering
- Added tab replacement to error message rendering to prevent display corruption.
2026-03-04 00:59:16 +01:00
Miroslav Drbal [ApoC] a0fe672ca2 fix: dereference MCP tool schema $ref/$defs and suppress Ajv format warnings (#276)
- Add dereferenceJsonSchema() that inlines local $ref pointers and strips
  $defs/definitions from MCP tool schemas before they reach LLM providers.
  Previously, Anthropic's convertTools() extracted only properties/required,
  dropping $defs and leaving dangling $ref — the LLM never saw the actual
  type definitions (e.g. SourceAnchorInput enum values from nucleus).

- Silence Ajv logger (logger: false) on all three instances that use
  strict: false. MCP servers may declare non-standard format keywords
  (e.g. "uint") that caused console.warn() to corrupt TUI output.

- Cache compiled Ajv validators per schema object identity in validation.ts,
  eliminating redundant recompilation on every tool call.

Co-authored-by: Miroslav Drbal <miroslav.drbal@gendigital.com>
2026-03-03 22:52:41 +01:00
can1357 8d33fed6e4 chore: bump version to 13.7.1 2026-03-03 22:39:04 +01:00
can1357 5dc1d2e4f0 chore: removed cargo check with minimal-versions from check:rs script
- Removed the `cargo check -Z minimal-versions --workspace` command from the check:rs npm script to streamline the Rust validation pipeline.
2026-03-03 19:43:07 +01:00
can1357 5ee777b234 feat(stats): added lenient JSONL parsing to handle malformed session entries
- Introduced parseSessionEntriesLenient function that skips over malformed JSON lines and continues parsing valid entries. Updated parseSessionFile to use lenient parsing instead of throwing on parse errors. Updated getSessionEntry to use lenient parsing for robustness when reading session files.

Fixes #273
2026-03-03 19:40:47 +01:00
绫 7c41f133d5 fix(coding-agent): make skill ordering deterministic in prompts (#274) 2026-03-03 19:40:12 +01:00
can1357 9216723f41 chore: bump version to 13.7.0 2026-03-03 15:20:34 +01:00
can1357 9e41918923 chore: reformat 2026-03-03 15:20:24 +01:00
can1357 05ec88de97 docs(coding-agent/prompts): shortened hashline prompt by consolidating rules and examples
- Condensed five detailed rules into four concise ones with clearer guidance on inclusive `end`, indentation, and verification.
- Simplified JSON examples to single-line format for brevity.
- Merged and refocused examples to highlight common pitfalls: boundary inclusion, block scope, sibling spacing, and anchor disambiguation.
2026-03-03 15:17:36 +01:00
can1357 140ab36bed fix(coding-agent): prevent selector option overflow
Fixes #272
2026-03-03 15:12:50 +01:00
can1357 b5a471d8db feat(ask): add back and forward multi-question navigation
Fixes #262
2026-03-03 15:09:46 +01:00
daandden 2369ee4d9b fix(mcp): show resolved MCP config paths in UI labels (#263)
* fix(coding-agent): show resolved MCP config paths in labels

* fix(coding-agent): harden MCP path label shortening

* fix: restore bun check command behavior

* chore: restore original check script

* refactor(coding-agent): removed mcp-path-labels module

Fixes #264

---------

Co-authored-by: Vũ Anh Nguyễn <vu.anh.nguyen@mgm-tp.com>
Co-authored-by: can1357 <me@can.ac>
2026-03-03 14:45:12 +01:00
daandden 60086d8a49 fix(ask): restore ask timeout auto-select behavior (#269)
* fix(coding-agent): restore ask timeout auto-select behavior

Fixes #266

* fix(coding-agent): derive ask timeout from ui timeout events

* fix(coding-agent): enforce ask timeout during custom input

* fix(ask): preserve sub-second timeout precision in interactive flow

* fix(ask): reset hook input timeout on user activity

* fix(ask): keep expiration timeout when refreshing tick interval

* fix(ask): auto-select deterministic default on timeout

Fixes #266

---------

Co-authored-by: Vũ Anh Nguyễn <vu.anh.nguyen@mgm-tp.com>
Co-authored-by: can1357 <me@can.ac>
2026-03-03 14:45:06 +01:00
daandden 9c245d9f8d feat(grep): add gitignore toggle support (#270)
* docs: map existing codebase

* feat(grep): add gitignore toggle support

Thread gitignore option through coding-agent schema, TS native bindings, and Rust grep scan paths.

Add native and tool tests for default behavior and gitignore:false behavior.

Fixes #267

* chore: remove tracked .planning artifacts

* style(rust): format grep scan call

* feat(grep): add gitignore toggle for ignored files

Fixes #267

---------

Co-authored-by: Vũ Anh Nguyễn <vu.anh.nguyen@mgm-tp.com>
Co-authored-by: can1357 <me@can.ac>
2026-03-03 14:44:58 +01:00
can1357 9ac976a5b3 feat(status-line): display token-per-second metric
Fixes #261
2026-03-03 14:32:02 +01:00
can1357 45e5bc9632 chore: remove rustup npm package 2026-03-03 14:24:37 +01:00
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 8983704b3d fix(tui): corrected cursor positioning when content shrinks to empty
- Corrected cursor positioning when content shrinks to empty without clearOnShrink enabled.
- Added regression test for empty content rendering to prevent future cursor positioning issues.
2026-03-03 06:08:50 +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 10ee8fa107 chore(deps): updated dependencies and model configurations
- Updated dev dependencies including biome, TypeScript native preview, and lint-staged to latest versions.
- Updated AI package dependencies for Anthropic SDK, AWS Bedrock, and Zod with relaxed version constraints.
- Updated models.json with new model entries, removed premiumMultiplier fields from GitHub Copilot models, and corrected maxTokens and cost values for various providers.
- Added appearance and projfs export paths to natives package and updated peer dependency version for swarm-extension.
2026-03-03 05:06:10 +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 f3bd8bfc15 fix(ai): add Gemini 3.1 Pro for gemini-cli and 3.x matching
fixes #253
2026-03-03 04:00:42 +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 5afe2b66a9 refactor(tui): simplified cursor positioning and viewport rendering logic
- Removed height tracking and viewport repaint path, consolidating to single fullRender function for all major redraws.
- Simplified cursor movement calculations using relative positioning instead of screen-relative addressing.
- Removed lastCursorSequence deduplication and moveToScreenPosition helper, reducing complexity while maintaining IME cursor positioning.
Fixes #243
2026-03-03 03:55:38 +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
Corentin AZAIS adeb778404 fix(stats): include subtask session files in usage stats (#256)
listSessionFiles() only performed a flat readdir, missing subtask JSONL
files nested inside artifact subdirectories. Switch to recursive readdir
to discover .jsonl files at any depth.

Also fix extractFolderFromPath() to derive the project folder via
path.relative from the sessions root instead of regex on basename, which
returned the artifact directory name for nested paths.

Fixes #250
2026-03-03 03:23:38 +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