Commit Graph

237 Commits

Author SHA1 Message Date
can1357 4b1649aef7 Merge remote-tracking branch 'origin/farm/621c6784/fix-anthropic-tool-arg-coercion' 2026-06-07 08:46:23 +02:00
can1357 1b2373425b feat(packages/coding-agent): set 30fps stream and stabilized read groups
- Reduced shimmer-driven UI animations and borders to a 30fps cadence.
- Collapsed consecutive read tool calls into one finalized transcript block.
- Tracked visible assistant content to finalize and reset read groups correctly.
- Updated running task rows to static bullet markers with shimmer-only subagent labels.
2026-06-07 08:42:51 +02:00
roboomp 0d6913e926 fix(ai): coerced singleton array arguments
Wrapped non-string singleton values when an array field is expected so malformed Anthropic-compatible tool calls can validate instead of looping on errors.

Fixes #2026
2026-06-07 06:31:30 +00:00
can1357 6adf98fd10 feat(coding-agent): added OSC5522 enhanced paste support for local image and text inserts
- Added OSC5522 parsing and a payload controller that prefers image MIME and reassembles chunks.
- Added bracketed image-path detection and `onPasteImagePath` callback wiring in the editor.
- Added local image-path paste insertion with fallback to text paste on image-size errors.
- Added `Editor.pasteText()` and OSC5522 disable sequencing on terminal cleanup.
2026-06-07 06:43:52 +02:00
can1357 741558a6d4 feat(coding-agent): removed background mode command and runtime plumbing
- Removed the built-in `background` (`bg`) slash command and its `handleBackgroundCommand` path from the interactive flow.
- Deleted background event subscription and shutdown handling by removing `handleBackgroundEvent` from the event, input, and interactive controllers.
- Simplified `InteractiveModeContext` by dropping background-only fields and helpers such as `isBackgrounded`, background UI context creation, and background event callbacks.
2026-06-07 05:43:59 +02:00
can1357 1ebe2c7484 feat(packages/tui-and-shared-tooling-primitives): added TUI terminal support
- Made `Component.invalidate` optional in `packages/tui/src/tui.ts` and callsites.
- Added `iconOverride` support to status-line rendering in `status-line.ts`.
- Added `borderColor` and `framedBlock()` primitives in `output-block.ts` for framed output styling.
- Adjusted `renderOutputBlock()` to draw a continuous border when no header text is present.
- Added terminal checkpoint-reconciliation tests in `submit-checkpoint-reconcile.test.ts` for pinned-tail behavior.
2026-06-07 05:13:58 +02:00
can1357 6d617e89f3 refactor(tui): removed Kitty temp-file graphics transmission
- Dropped the `t=t` probe, transmission medium, and SSH gating.
- Kitty images now always transmit in-band base64.
2026-06-07 04:24:11 +02:00
can1357 f1e2e51a4b feat(coding-agent): added /fresh to reset provider state while keeping session files
- Added `AgentSession.freshSession()` to rotate provider-facing IDs and prune provider stream state.
- Added `/fresh` command handling in the builtin registry and mode command flow.
- Kept persisted session metadata intact during `/fresh` and cleared transient IDs on session switches.
- Invalidated `appendOnlyContext` and provider caches when refreshing provider state.
2026-06-07 03:37:48 +02:00
can1357 22bb6b9927 feat(tui): widened sync-output defaults with runtime DECRQM upgrade
- Enabled DEC 2026 for Alacritty/VS Code and via TERM_FEATURES Sy token.
- Stopped blanket-disabling SSH for recognized direct terminals.
- Made the DECRQM probe enable sync on a positive report, not just disable.
- Extracted synchronizedOutputUserOverride so opt-out beats force-on.
2026-06-06 23:57:34 +02:00
roboomp 67e6324ace fix(tui): reduced row flicker while typing
Changed text row repaints to overwrite first and clear only stale suffixes so non-synchronized WSL/Windows Terminal paints do not visibly blank already-rendered rows. Kept full-line pre-clears for image protocol rows and preserved exact-width row handling.\n\nFixes #2011
2026-06-06 20:28:15 +00:00
roboomp 2620d3970c docs(web-search): updated kagi description to v1 endpoint
The runtime cutover to Kagi's V1 search API landed in #1272 but
docs/tools/web_search.md still described the sunset V0 endpoint
(GET /api/v0/search with 'Authorization: Bot ...'). Realigned the
Querying and Output bullets with the actual implementation in
packages/coding-agent/src/web/kagi.ts:

- POST https://kagi.com/api/v1/search with Bearer auth and JSON body.
- recency maps to filters.after as a UTC YYYY-MM-DD string.
- Output now includes the categorized bucket merge (search/video/news/
  infobox with title tags), adjacent_question + related_search related
  questions, direct_answer-derived answer, and meta.trace requestId.

Fixes #2009
2026-06-06 18:50:37 +00:00
can1357 40ed8852b5 feat(coding-agent): added app.display.reset bound to Ctrl+L
- Added `TUI.resetDisplay()` to force an immediate full-frame replay including native scrollback.
- Moved the persistent model selector default from Ctrl+L to Alt+M, preserving existing user remaps.
- Reserved Alt+M so extensions cannot shadow the model selector shortcut.
2026-06-06 17:19:57 +02:00
can1357 dafc6e9e50 docs(tui): documented core renderer invariants and failure modes
- Added tui-core-renderer.md covering yank/corruption/flash/width faults.
- Linked the new doc from runtime internals and the tui.ts header.
- Refreshed runtime-internals to match current boot and render-intent flow.
2026-06-06 14:13:26 +02:00
can1357 f7974e0f23 Merge remote-tracking branch 'origin/farm/f646bd45/fix-windows-ctrl-enter-followup' 2026-06-06 13:38:52 +02:00
can1357 2e425b7b65 docs(coding-agent): documented auto discovery mode behavior
- Described "auto" default gating MCP tools past 40-tool threshold.
- Noted late resolution in createAgentSession after registry exists.
- Updated legacy mcp.discoveryMode mapping to MCP-only.
2026-06-06 01:14:14 +02:00
can1357 78700a2c77 feat(ollama): added OLLAMA_HOST and OLLAMA_CONTEXT_LENGTH support
- Used OLLAMA_HOST for implicit discovery when OLLAMA_BASE_URL is unset.
- Applied OLLAMA_CONTEXT_LENGTH override to discovered context budgeting.
2026-06-05 22:47:40 +02:00
can1357 a1ef5d62ec Merge remote-tracking branch 'origin/farm/f2c1d17f/fix-github-skills-discovery' 2026-06-05 11:44:46 +02:00
can1357 eb8e4f7657 feat(task): added read-summarize override for subagents
- Parsed `read-summarize` frontmatter into `readSummarize` field.
- Applied `read.summarize.enabled: false` override on isolated subagent settings.
- Disabled summarization for `explore` and `librarian` agents.
2026-06-05 11:36:13 +02:00
can1357 b8a602ac2a test(auth): switched OAuth ranking tests to weighted selection
- Replaced top-rank assertions with weighted-preference distribution checks.
- Added cases for equal-priority balancing and 2x best-bucket cap.
- Added coding-agent snapshot-cache boot and seed tests.
2026-06-05 11:15:32 +02:00
roboomp c998b5ed1c fix(keybindings): preserved existing Ctrl+Q user remaps
When a user had already bound ctrl+q to another action, the new
follow-up default still claimed the same chord and whichever handler was
registered last in InputController silently won. KeybindingsManager now
filters the new Ctrl+Q follow-up default when user config claims that
chord for another action, while preserving explicit follow-up remaps.

Addresses code review on #1905.
2026-06-05 05:40:29 +00:00
roboomp a4be51f08c fix(discovery): scan .github/skills via the github provider
The github provider registered context-files (.github/copilot-instructions.md)
and instructions (.github/instructions/*.instructions.md), but no skills
capability — so .github/skills/<name>/SKILL.md, the layout GitHub documents
for Copilot Agent Skills, was silently never discovered. The skill://
URL resolved to 'Available: none' and nothing surfaced in the system prompt.

Register a skill capability on the github provider (priority 30, project-only)
pointing at .github/skills/ and reuse scanSkillsFromDir with
requireDescription: true to match the Agent Skills spec and the sibling
native/omp-plugins providers. Pin the wiring with a discovery test that
loads the skills capability scoped to the github provider against a temp
cwd containing a SKILL.md, and a negative case that drops a skill missing
a description.

Fixes #1906
2026-06-05 05:36:05 +00:00
roboomp 590799b0af fix(extensions): reserved ctrl+q so extensions can't shadow the follow-up default
ExtensionRunner#getShortcuts() accepted ctrl+q because #RESERVED_SHORTCUTS
predated the new default, and InputController registers extension
shortcuts before the followUp keybinding, so the editor's custom-key
map silently overwrote the extension handler. Now ctrl+q is reserved
alongside the other built-in chords and the extension authoring docs
list it as such.

Addresses code review on #1905.
2026-06-05 05:34:06 +00:00
roboomp 8a2dae0c48 fix(keybindings): added Ctrl+Q as default follow-up shortcut
Windows Terminal does not deliver a distinct Ctrl+Enter event to console
apps, so the existing `app.message.followUp` default never fired there.
Ctrl+Q (the chord GitHub Copilot CLI uses for the same action) is added
as the primary default and works in every terminal we ship to; Ctrl+Enter
is kept as a secondary chord so users on Kitty/iTerm2/WezTerm/Ghostty
(where it does deliver) keep the existing muscle memory.

Fixes #1903
2026-06-05 05:29:12 +00:00
roboomp aacf29e1de fix(coding-agent): kept exa mcp fallback out of auto chain
Reviewer noted that an unconditional ExaProvider.isAvailable steered the auto chain into the public MCP fallback before any later-configured provider could run. Restored the credential-gated isAvailable, then split out isExplicitlyAvailable so resolveProviderChain still routes an explicit Exa selection through MCP without affecting other providers.\n\nRefs #1860
2026-06-04 13:28:14 +00:00
roboomp cb2d5b859a fix(coding-agent): restored exa mcp fallback
Restored Exa's unauthenticated MCP fallback when neither auth storage nor EXA_API_KEY provides credentials. Preserved API-key search ordering and bounded the MCP request with the web-search hard timeout. Updated provider copy and regression coverage for the no-key path.\n\nFixes #1860
2026-06-04 13:18:08 +00:00
Can Bölük 9f7c36c36b Merge pull request #1702 from basedcorp99/feat/cmux-terminal-id
Add cmux terminal surface detection to getTerminalId
2026-06-04 06:13:25 +03:00
Can Bölük 35b86492d0 Merge pull request #1685 from daandden/fix-web-search-tui-providers
Fix web search provider TUI options
2026-06-04 06:12:58 +03:00
can1357 dc4aeb7b88 refactor(coding-agent): renamed todo_write tool to todo
- Renamed `TodoWriteTool` to `TodoTool` and its source/prompt files.
- Updated tool registration, schema, renderers, and gating to `todo`.
- Adjusted cursor provider native tool names and tests to match.
- Renamed strike-animation constants and `todo-error-reminder` type.
2026-06-04 02:45:30 +02:00
can1357 5e17edf1ec refactor(coding-agent): restructured session text slicing to use unified head/tail reads
- Replaced SessionStorage readTextPrefix/readTextSuffix with readTextSlices.
- Added peekFileEnds utility to read bounded file head/tail in one handle.
- Updated session-manager list/recent reads to consume unified head/tail slices.
- Expanded storage tests for head/tail and UTF-8-boundary slice extraction.
2026-06-04 02:07:34 +02:00
can1357 86c56d6472 feat(tui): added DECCARA fill optimizer with OSC 66 and DEC 2026/2048
- Added a Kitty-only DECCARA optimizer painting solid bg panels as rectangles, with `PI_NO_DECCARA` kill switch.
- Added OSC 66 text-sizing width handling to slicing, truncation, and wrapping.
- Added DECRQM probes for DEC 2026 sync output and 2048 in-band resize.
- Added structured OSC 99 notification formatting.
2026-06-04 00:27:20 +02:00
can1357 4905e142c1 feat(tui): added PI_NO_SYNC_OUTPUT opt-out for DEC 2026 synchronized output
- Added `PI_NO_SYNC_OUTPUT=1` env var to disable DEC 2026 wrappers while keeping autowrap guards active around paints.
- Removed Termux-specific height-change no-op; all non-multiplexer resizes now repaint to prevent phantom blank rows.
- Added `linux-normal-vteNoSync-small` stress scenario and issue-1765 regression tests.
2026-06-03 11:30:48 +02:00
basedcorp99 3bcc02a19e Prefer cmux surfaces over host terminal ids 2026-06-02 13:18:01 +02:00
Vu Anh Nguyen 035845ca97 Fix web search provider TUI options 2026-06-02 18:17:22 +07:00
roboomp 5174ba0155 fix(tui): registered ctrl-v image paste on windows
Kept Ctrl+V as a default clipboard-image paste shortcut on Windows while preserving Alt+V as the Windows Terminal-safe fallback.

Updated keybinding docs and regression coverage for the platform-specific default.

Fixes #1708
2026-06-02 11:15:09 +00:00
basedcorp99 3520e58df3 Merge remote-tracking branch 'upstream/main' into feat/cmux-terminal-id 2026-06-02 12:11:45 +02:00
basedcorp99 b93be377ba pretty 2026-06-02 12:10:21 +02:00
basedcorp99 656e855e4a Add CMUX_SURFACE_ID to docs
Follow-up to CMUX_SURFACE_ID env var support — document it alongside
KITTY_WINDOW_ID, TMUX_PANE, etc. in environment-variables.md and
session-switching-and-recent-listing.md.
2026-06-02 11:52:19 +02:00
can1357 fbed7d1787 fix: expanded tool argument parsing to accept delimiter-separated paths
- Expanded path parsing to split top-level comma, semicolon, and whitespace entries.
- Updated find/search and scope resolution to apply delimiter expansion before path-spec validation.
- Updated read tool fallback to try split path parts before raising missing-path errors.
- Coerced bare string arguments into singleton arrays for array-typed schemas.
2026-06-02 11:14:02 +02:00
can1357 3c398c7eb1 Merge remote-tracking branch 'origin/farm/48a24745/fix-anthropic-custom-headers-web-search' 2026-06-02 10:11:24 +02:00
can1357 53b998fc9c Merge remote-tracking branch 'origin/farm/1e6f50e9/document-anthropic-search-env-vars' 2026-06-02 10:11:15 +02:00
roboomp b3bcf966ee fix(coding-agent): resolve exa credentials through auth storage
ExaProvider.isAvailable() and searchExa() now consult AuthStorage so Exa credentials configured through the broker/credential store work alongside EXA_API_KEY, matching the other API-key search providers.

Refs #1695
2026-06-02 08:00:35 +00:00
roboomp b3ec588921 fix(coding-agent): honored Anthropic search base URL for fallback auth
- Passed ANTHROPIC_SEARCH_BASE_URL through to Anthropic web search calls that use authStorage fallback credentials instead of only applying it with ANTHROPIC_SEARCH_API_KEY.
- Added regression coverage asserting fallback Anthropic credentials use the search-specific base URL.
- Updated the environment and web_search docs to reflect the actual credential and base URL resolution order.

Fixes #1694
2026-06-02 07:57:34 +00:00
roboomp 963bdebf53 fix(coding-agent): require exa api key for web search
Exa web search no longer advertises availability without EXA_API_KEY and searchExa fails before attempting unauthenticated MCP.

Fixes #1695
2026-06-02 07:54:19 +00:00
roboomp 4bd0fe573c fix(anthropic): forward ANTHROPIC_CUSTOM_HEADERS for non-Foundry enterprise gateways
The Anthropic web search path built request headers via buildAnthropicSearchHeaders, which never threaded model headers through buildAnthropicHeaders, so ANTHROPIC_CUSTOM_HEADERS was dropped from every web-search request regardless of mode. The streaming path's resolveAnthropicCustomHeaders also gated on isFoundryEnabled(), so users with a corporate ANTHROPIC_BASE_URL + ANTHROPIC_CUSTOM_HEADERS (e.g. X-Gateway-Key) got 401s on web_search unless they set CLAUDE_CODE_USE_FOUNDRY=true.

Loosen the resolver to also apply when ANTHROPIC_BASE_URL points to a non-Anthropic host, export the baseUrl-keyed variant, and have buildAnthropicSearchHeaders pass the resolved custom headers as modelHeaders so search and streaming paths behave identically. Stock api.anthropic.com (no Foundry) still omits the headers.

Fixes #1693
2026-06-02 07:52:37 +00:00
roboomp 5b1e5a5c4a docs: documented ANTHROPIC_SEARCH_API_KEY and ANTHROPIC_SEARCH_BASE_URL
- Expanded the existing entries in docs/environment-variables.md so the override-semantics ('search-only, isolates from main ANTHROPIC_API_KEY / ANTHROPIC_BASE_URL / FOUNDRY_BASE_URL') are spelled out, and added a usage note for enterprise-gateway split routing.
- Surfaced the search-only env vars (ANTHROPIC_SEARCH_API_KEY / ANTHROPIC_SEARCH_BASE_URL / ANTHROPIC_SEARCH_MODEL) in the Anthropic provider section of docs/tools/web_search.md, where users were already looking.
- Added ANTHROPIC_SEARCH_BASE_URL alongside ANTHROPIC_SEARCH_API_KEY in 'omp --help' so the pair shows up together in the CLI env-var summary.

Fixes #1694
2026-06-02 07:49:59 +00:00
Can Bölük ad8017cb5a Merge pull request #1673 from can1357/farm/6d6ea973/document-system-md-templating-contract
docs: documented SYSTEM.md / APPEND_SYSTEM.md customization contract
2026-06-02 09:28:34 +03:00
can1357 384a206737 refactor(task): replaced numeric-prefix ids with name-first agent output ids
- Changed `AgentOutputManager` to use requested names verbatim, adding `-2`/`-3` suffixes only on repeats (e.g. `Anna`, `Anna-2`).
- Renamed main agent id from `0-Main` to `Main`; nested ids now use dot notation without numeric prefix (e.g. `Parent.Child`).
- Updated task widget to render dotted hierarchy as `Parent>Child` breadcrumb without leading index.
- Resume scan now tracks seen names instead of a counter to avoid clobbering prior outputs.
2026-06-02 06:50:03 +02:00
roboomp 21264b6d6a docs: clarified skills with custom system prompts
- Added guidance that generated skills/rules/tool inventory live in prompt block 0.
- Documented APPEND_SYSTEM.md as the supported way to customize while preserving automatic skill discovery.
- Noted that SYSTEM.md users must hard-code skill instructions if they replace block 0.

Fixes #1671
2026-06-02 02:41:32 +00:00
roboomp 8ae2a47165 docs: corrected SYSTEM.md discovery: no ancestor walk-up
- Removed the (walk-up) annotation on project SYSTEM.md lookup.
- Documented that findConfigFile only checks <cwd>/.omp etc., not ancestors.
- Clarified that the capability-layer walk-up exists but its output is never rendered by the default template under normal CLI startup.

Fixes #1671
2026-06-02 00:51:13 +00:00
roboomp 111c466382 docs: corrected SYSTEM.md prompt block semantics
- Documented that CLI SYSTEM.md replaces only prompt block 0 and keeps defaultPrompt.slice(1).
- Clarified append prompt ordering with and without a custom system prompt.
- Corrected deduplication wording to distinguish CLI block replacement from internal buildSystemPrompt dedupe.

Fixes #1671
2026-06-02 00:48:52 +00:00