Commit Graph

429 Commits

Author SHA1 Message Date
can1357 67f6518e42 feat: enhanced tool robustness, improve authentication flow, and update API parameters
- Implement JSON repair and strict argument validation to sanitize raw payloads and redact sensitive information from agent event logs.
- Add automatic authentication fallback for benchmark model resolution to ensure consistent performance testing across providers.
- Refactor search tool API parameters by replacing `i` with a case-sensitive `case` boolean flag for clarity.
- Update session history formatting to ensure empty objects are consistently serialized as `{}` instead of empty strings.
2026-06-19 16:46:07 +02:00
can1357 0393bc6697 feat(coding-agent): removed timeout parameter from find tool
- Removed the customizable `timeout` parameter from the tool schema and implementation.
- Fixed the timeout duration to 5 seconds to simplify tool usage.
- Updated documentation and error messages to advise narrowing search patterns instead of adjusting timeouts.
2026-06-19 16:06:16 +02:00
can1357 b877464575 refactor(coding-agent): migrated UI chrome to rounded box corners
- Switch all UI components and tests from sharp box corners (`boxSharp`) to rounded ones (`boxRound`).
- Update `Theme` to re-export sharp junction symbols (tees and cross) under `boxRound` to ensure consistent divider rendering in rounded boxes.
- Remove outdated architectural notes regarding forced tool-choice queues in documentation.
2026-06-19 07:57:15 +02:00
can1357 63b2c9603a refactor(snapcompact): replaced legacy frame pinning with full text-sourced re-rendering
- Removed legacy `pinnedFrames` logic and state, simplifying compaction to unconditionally re-render from the full source archive.
- Updated `historyBlocks` to reliably order archive regions (text head, imaged middle, text tail) based on the re-rendered state.
- Updated documentation and summary templates to reflect the transition to text-first compaction and the use of the new `FILES` section.
2026-06-19 07:48:46 +02:00
can1357 b137764f0c feat: implemented text-first foveated snapcompact archive layout
- Implemented text-first archive structure that incorporates bounded source text with foveated image frames (HQ edges, LQ middle) to improve context quality.
- Updated snapcompact core logic to use `historyBlocks` for reconstruction, transitioning away from reliance on previous PNG frame inheritance.
- Increased default frame limits to 80 and adjusted token estimation constants (5024) to enhance context budget accuracy.
- Added `pruneToolDescriptions` and improved multi-block summary token estimation to optimize tool spec usage.
2026-06-19 07:38:54 +02:00
can1357 256587bbbe ux(coding-agent): standardized elision indicators in scraper output
- Replaced inconsistent list truncation messages with a standardized `[...N items elided...]` format across all scrapers.
- Updated documentation reference to use consistent variable naming convention.
2026-06-19 04:51:39 +02:00
can1357 c224ef4df5 feat: standardized elision markers and improve transcript viewer robustness
- Standardized elision markers across all tool outputs and filters to use cohesive `[...N [type] elided...]`, `[...Nln elided...]`, and `[...xB elided...]` syntax.
- Updated documentation, prompts, and test expectations to reflect the unified elision format.
- Improved transcript viewer robustness by preventing content aliasing through path-inclusive signature hashing.
- Added logic to clear stale transcript content when associated session files are deleted, accompanied by verifying test cases.
2026-06-19 04:35:18 +02:00
can1357 29d250fae2 feat(coding-agent): supported advisor transcript persistence
- Implemented `AdvisorTranscriptRecorder` to persist advisor sessions to append-only `__advisor.jsonl` files.
- Integrated transcript recording into agent sessions with managed flushing, atomic file switching, and synthetic turn attribution.
- Restricted advisor-kind agents by excluding them from rosters, history protocols, messaging, and interactive agent commands.
- Reserved the `__advisor` filename stem across the output manager and task registry to prevent task ID collisions.
2026-06-19 03:50:00 +02:00
can1357 8588aa5802 refactor(coding-agent/slash-commands): removed collab qrcode slash commands
- Removed qrcode and qrcode-view subcommands from the collab command.
- Updated showCollabLink to always trigger QR code display.
- Refactored internal verb logic to simplify session sharing flow.
2026-06-19 01:30:26 +02:00
Bin Jin e91d2cc776 feat(collab): added QR links and split web UI URL support
- Added collab.webUrl and rendered browser links as web UI wrappers whose fragments carry relay links.
- Added one-shot /collab qrcode and /collab qrcode-view commands with terminal QR rendering.
- Updated coding-agent and collab-web parsers to prefer parseable wrapper fragments while preserving legacy links.
- Added regression tests and changelog entries for split-host collab links and QR commands.
2026-06-19 01:21:21 +02:00
can1357 746efd0c29 fix(tui): resolved leak of re-encoded control bytes during bracketed paste
- Centralized decoding of tmux's `extended-keys` control sequences (`csi-u` and `xterm` formats) into a shared utility.
- Updated the multi-line editor and single-line input to use this decoder, preventing escape tails (e.g., `[27;5;106~`) from leaking into the text buffer.
- Added parity to the single-line input by explicitly stripping any remaining control characters after decoding to ensure data integrity.
2026-06-18 19:54:22 +02:00
can1357 ea492f6903 refactor(deps): removed fflate dependency
- Removed the `fflate` dependency in favor of using `node:zlib` for ZIP operations.
- Updated documentation and internal code comments to reflect the transition to native `node:zlib` DEFLATE support.
2026-06-18 19:52:59 +02:00
can1357 021d82ac1f feat(coding-agent): consolidated and optimize archive handling
- Centralized archive operations into a new `utils/zip.ts` module with unified support for ZIP, tar, and tar.gz formats.
- Optimized ZIP reading using lazy, ranged central-directory access and implemented ZIP64 support for large files.
- Hardened archive extraction with directory traversal protection and configured memory limits for loading and extraction.
- Refactored tool-specific logic to utilize the new centralized utility and deleted the redundant `archive-reader.ts`.
2026-06-18 19:21:37 +02:00
can1357 9382439b52 feat(cli): add retry keybinding (#2899) 2026-06-18 02:48:29 +02:00
can1357 0919aeadea feat(coding-agent): add startup splash setting (#2884) 2026-06-18 02:48:29 +02:00
can1357 05ecadcdc9 docs(coding-agent): document ACP approval mode (#2905) 2026-06-18 02:46:48 +02:00
can1357 92855e3daa refactor(coding-agent/web): derived search provider order and labels from common options
- Derived the `SEARCH_PROVIDER_ORDER`, `SEARCH_PROVIDER_PREFERENCES`, and `SEARCH_PROVIDER_LABELS` metadata dynamically from a single `SEARCH_PROVIDER_OPTIONS` source of truth.
- Reprioritized the default search provider sequence, shifting higher-order choices like Perplexity, Gemini, and Anthropic ahead of Tavily and Brave.
- Updated documentation to reflect the new search provider evaluation order.
2026-06-18 00:59:55 +02:00
can1357 a050474af7 feat: migrated validation schemas and tool definitions from Zod to ArkType
- Migrated all wire protocol, schema definitions, and tools validation from Zod to ArkType across multiple packages.
- Updated extension runtimes, custom tools loader, and TypeBox compatibility shim to expose and use ArkType instances.
- Added a comprehensive ArkType migration guide, validation parity tests, and helper utilities.
- Removed redundant PDF asset routing and parsing implementations from the read tool.
2026-06-18 00:59:53 +02:00
can1357 d4317d3d20 feat(ai): consolidated OpenAI-family streaming and add OpenRouter API support
This change introduces a new `openrouter` API type and extensively refactors OpenAI-family streaming providers, centralizing shared logic and improving robustness.

Key changes include:
- **Unified OpenAI-family Logic:** Consolidated core utilities, compat resolution, request shaping, and stream processing into `openai-shared.ts`, reducing duplication across `openai-completions`, `openai-responses`, and `openai-codex-responses`.
- **OpenRouter API Type:** Introduced a dedicated `openrouter` API type with dual-surface compatibility, allowing it to dispatch requests as either OpenAI Chat Completions or Responses.
- **Enhanced Provider Integration:**
    - Improved Perplexity search to leverage shared OpenAI streaming transports, including API-key fallback to OpenRouter and support for Perplexity's Responses API.
    - Integrated xAI-specific logic directly into the shared `stream.ts` dispatch, removing the dedicated `xai-responses` provider.
    - Refined credential parsing for Google Gemini CLI and handling of Azure deployment names.
- **Robustness & Consistency:** Improved error handling for Codex, standardized output token parameter resolution, and ensured consistent application of reasoning suppression across all Chat Completions dialects.
- **New Documentation:** Added `provider-endpoint-constraints.md` to detail endpoint-specific behaviors and quirks for various providers.
- **Telemetry & Debugging:** Extended telemetry propagation to advisor calls and overflow compaction tasks. Improved debugging for Codex WebSocket failures and stream error messages.
- **Tooling & Security:** Updated browser stealth scripts to prevent detection and added a new `ts-no-inline-cast-access` TTSR rule.
2026-06-17 21:36:48 +02:00
roboomp 88c883c64a docs(coding-agent): documented acp approval mode
Added ACP-specific approval-mode guidance covering config inheritance, yolo launch flags, client permission handling, and headless prompt behavior.

Fixes #2900
2026-06-17 18:47:53 +00:00
KamijoToma 6116b97a54 Add retry keybinding 2026-06-18 01:51:11 +08:00
can1357 020dd5f821 feat(coding-agent/tools): added PDF embedded-image read support to the read tool
- Added PDF member read syntax (`doc.pdf:<member>`) and trailing-colon listing.
- Added asset-read handling to serve extracted PDF images as inline image content.
- Added PDF image extraction caching keyed by size and mtime with marker files for retries.
- Added basename validation that rejects unknown/traversal-like PDF members and shows available names.
2026-06-17 17:20:09 +02:00
Alexander Kirilin 8f6982eb83 feat(coding-agent): add startup splash setting 2026-06-17 10:28:07 -04:00
can1357 54d212ec33 feat(coding-agent): added advisor immune-turn window for concern/blocker interruptions
- Tracked completed primary turns in `AgentSession` and started an immune-turn window after each interrupting advisor steer.
- Routed follow-on `concern`/`blocker` notes to the aside channel while the immune window is active, while preserving prior auto-resume-suppressed handling.
- Added the `advisor.immuneTurns` setting and tests for immune-turn detection and delivery-channel decisions.
2026-06-17 13:21:47 +02:00
ben c93774f892 fix(coding-agent): implement session stop hook semantics 2026-06-17 12:26:52 +02:00
ben b7ac4b4c43 fix(coding-agent): use session stop extension event 2026-06-17 12:26:01 +02:00
ben 8e45ed9016 fix(coding-agent): add subagent stop extension event 2026-06-17 12:26:00 +02:00
Can Bölük b7fe6f61a1 Merge branch 'main' into fix/litellm-base-url 2026-06-17 11:37:28 +02:00
can1357 d5b3c78132 chore: update docs 2026-06-17 04:37:39 +02:00
Alexander Kirilin 11e6eb0c2c fix(litellm): support LITELLM_BASE_URL 2026-06-16 20:54:55 -04:00
can1357 ce9db56066 feat(coding-agent): added advisor CLI flag for runtime advisor enabling
- Added a new `--advisor` flag to argument parsing and launch flag definitions.
- Applied the parsed `advisor` flag as a runtime-only override of `advisor.enabled` during startup.
- Updated advisor-related docs and added parseArgs tests for `--advisor` behavior and position handling.
2026-06-17 02:14:11 +02:00
can1357 e5975373c3 Merge remote-tracking branch 'origin/farm/cced21e6/hooks-pre-discovery' 2026-06-17 00:22:51 +02:00
roboomp 20f78c4693 fix(coding-agent): loaded discovered hook factories
Included JS and TS hookCapability results in extension path discovery so hooks under hooks/pre and hooks/post bind to the extension runner without explicit settings entries.

Fixes #2796
2026-06-16 19:44:28 +00:00
can1357 508a9f543e feat: removed render_mermaid tool and added width-aware Mermaid clipping
- Removed render_mermaid from tool discovery, task definitions, and registries.
- Removed renderMermaid setting and prompt/docs references tied to the deleted tool.
- Added maxWidth and theme color options to Mermaid ASCII resolution in markdown flow.
- Re-rendered Mermaid ASCII in both directions and clipped output to available width.
2026-06-16 21:32:39 +02:00
can1357 5bce7ed6df feat: added advisory transcript formatting and one-shot benchmark metrics
- Introduced advisory note output as `<advisory>` tags with optional severity and guidance.
- Updated session transcript formatting to `### Session update` and inline watched role labels.
- Added shared `escapeXmlText` utility and escaped XML-sensitive text in advisor outputs.
- Added one-shot success run token metrics and one-shot statistics reporting.
2026-06-16 18:34:50 +02:00
can1357 52713aa224 Merge PR #2741: fix(tui): stop Warp resize feedback-loop redraw storm
Break the Warp resize feedback-loop redraw storm by env-pinning resize classification. Merge resolves the issue-2088 test against #2755 by keeping the CMUX env-clearing setup and adding #2741's TERM_PROGRAM/PI_TUI_RESIZE_IN_PLACE neutralizers.
2026-06-16 14:53:38 +02:00
can1357 0c3154039b Merge PR #2734: fix(coding-agent): load GitHub Copilot instruction rules
Load .github/instructions/*.instructions.md as rules. Includes review fix c509a5d59c: split comma-separated applyTo via parseCSV and treat **/* as an always-apply glob.
2026-06-16 14:52:40 +02:00
sorphwer 89fb1b0a49 fix(tui): stop Warp resize feedback-loop redraw storm
The non-multiplexer resize fast path borrows the alternate screen for
throwaway drag frames. Warp reports a terminal height one row different
for the alt buffer, so each alt enter/leave emits a fresh SIGWINCH that
re-enters the fast path — a self-sustaining loop that floods ED3 full
repaints with completely stable geometry (observed ~130
fullPaint(clearScrollback) frames over 15s, continuing after the drag
stopped). PI_FORCE_SYNC_OUTPUT cannot help (it is a loop, not tearing);
tmux works because the multiplexer path never toggles the alt buffer.

Route resize through the in-place repaint path (no alt-screen borrow, no
ED3 rewrap) for multiplexers and for terminals that re-report size on
alt-screen toggles, via resizeRepaintsInPlace(). Default-on for Warp,
overridable with PI_TUI_RESIZE_IN_PLACE=1|0. Tradeoff matches a
multiplexer: scrollback above the window keeps its old wrap.

Tests assert no alt-screen borrow / no ED3 across a Warp resize burst and
that the override toggles both ways; existing direct-terminal resize
tests now pin TERM_PROGRAM so they stay deterministic under Warp.
2026-06-16 12:27:53 +08:00
roboomp 063ce1ba00 fix(coding-agent): loaded github instruction rules
Added GitHub Copilot instruction-file discovery to the github rule provider path, mapping applyTo frontmatter into always-apply or glob-scoped rules and avoiding duplicate always-apply prompt content when context imports the same file.\n\nFixes #2731
2026-06-16 02:30:58 +00:00
ryjm 18f11f5bfc feat(ast): add Emacs Lisp tree-sitter support
Register tree-sitter-elisp in the shared AST language registry so
.el files infer the emacs-lisp grammar across blockRangeAt,
summarizeCode, astGrep/astEdit, and native aliases.

This fixes edit-tool block operations on top-level Emacs Lisp forms
instead of returning unsupported-language block errors.

- Add canonical emacs-lisp aliases and .el extension inference.
- Teach summaries to fold Lisp forms without grouping arbitrary lists.
- Map .el rendering and highlighting aliases through coding-agent/native.
- Cover defun, ERT, use-package, with-eval-after-load, pcase,
  summary, astMatch, astEdit, and edit-tool insertion paths.
- Document the language and update package changelogs.
2026-06-15 18:41:24 -07:00
can1357 b1c0243bab fix(coding-agent): fixed advisor auto-resume suppression for user interruptions
- Passed USER_INTERRUPT_LABEL through abort paths in collab, ACP, RPC, runtime, and SDK flows.
- Added userInitiated to synthetic continue inputs and session prompt calls.
- Suppressed advisor auto-resume during user aborts and preserved queued concerns.
- Cleared suppression on user prompts and reclaimed parked advisor cards on abort settle.
2026-06-15 20:51:56 +02:00
can1357 15184332b8 Merge PR #1173: feat(marketplace): prefer .omp-plugin/marketplace.json catalog path 2026-06-15 19:46:14 +02:00
can1357 fcde870bc0 Merge PR #2636: Add Umans AI Coding Plan provider 2026-06-15 19:46:11 +02:00
can1357 dbf4c734fc feat(coding-agent): added advisor backlog sync and end-of-turn callback support
- Added awaited `onTurnEnd` and `setOnTurnEnd` wiring for turn-end callbacks.
- Added `advisor.syncBacklog` settings (off/1/3/5) and documented 30-second catch-up caps.
- Fixed advisor runtime backlog handling with failure counters, waiters, and retry requeue.
- Updated agent sessions to enqueue advisor updates on turn end and removed direct `turn_end` branch logic.
2026-06-15 17:25:04 +02:00
can1357 e53778d43d feat(ai-dialect): added in-band thinking parsing and rendering for multiple AI dialects
- Added in-band thinking scanners for Gemini, Gemma, Kimi, and Pi dialects.
- Updated assistant rendering to emit dialect-specific thinking blocks and keep tool calls outside them.
- Added parseThinking:false handling and fixed split-thinking leakage into replies.
- Updated transcript parsing to accumulate and emit thinkingStart, thinkingDelta, and thinkingEnd events.
- Updated scanner/tokenization docs and changelog with breaking notes for in-band thinking channels.
- Added cross-dialect tests for thought-channel parsing, rendering, and streaming parity.
2026-06-15 14:17:12 +02:00
oldschoola ac8a8fe057 Merge remote-tracking branch 'origin/main' into oldschoola/umans 2026-06-15 03:59:48 -07:00
oldschoola 7d721dc420 Add Umans AI Coding Plan provider 2026-06-15 03:58:20 -07:00
can1357 f40e528073 fix(agent/compaction): skipped truncating tiny tool outputs during pruning
- Added a 50-token minimum floor constant for pruning decisions.
- Allowed non-superseded, non-useless tool results below that floor to avoid truncation.
2026-06-15 12:45:21 +02:00
can1357 2de2926320 feat: added Gemini and Gemma in-band tool syntax support in runtime
- Added Gemini and Gemma syntax routing by model family and owned syntax env values.
- Added Gemini and Gemma in-band parsers for tool_code and token-based tool_call streams.
- Added rendering support for Gemini fenced tool_code/tool_outputs and Gemma tool tokens.
- Fixed parsing edge cases for comments, string escapes, nested args, and truncated blocks.
2026-06-15 11:40:55 +02:00
can1357 d6c51fe69a feat: hashline .= as seperator 2026-06-15 10:46:45 +02:00