Commit Graph

8099 Commits

Author SHA1 Message Date
roboomp 3c3cb2a76b docs(coding-agent): synced omp docs coverage
Added root omp docs for memory_edit, learn, manage_skill, generate_image, and tts, plus package-level coverage for user-facing README-only CLIs.

Added a docs-index freshness check to package check and made gen:bundle generate and reset the docs embed itself.

Fixes #3934
2026-06-30 23:53:42 +00:00
can1357 ebdc7280cb chore: bump version to 16.2.10 2026-07-01 00:54:29 +02:00
can1357 c7fa7f5285 test(coding-agent): reset history storage between test runs
- Reset the HistoryStorage singleton instance in the afterEach hooks of multiple issue reproduction tests.
2026-07-01 00:52:50 +02:00
can1357 bdb33a184d feat(coding-agent/modes): tracked and migrate stream-key placeholders for tool calls
- Added `#streamTurnNonce` to prevent aborted streaming turns from corrupting content indexes of subsequent messages.
- Implemented temporary stream-key generation using content position and turn nonces for previewing tool calls without native IDs.
- Added migration logic to key pending tool previews by their real ID and rekey `ToolArgsRevealController` once the real ID is parsed.
2026-07-01 00:34:21 +02:00
can1357 3cb25ddaac fix: resolved bun segfaults by implementing custom timeout helpers
- Replaced native `AbortSignal.timeout` calls with self-clearing timeout helper functions across model discovery.
- Added `withTimeoutSignal`, `withCatalogDiscoveryTimeout`, and `withOpenAICompatibleDiscoveryTimeout` helpers to manage cancellable fetch timeouts.
- Supported `timeoutMs` options throughout the Ollama, Llama.cpp, LiteLLM, vLLM, LM Studio, and OpenAI-compatible discovery processes.
- Documented the fix addressing Bun garbage collection segfaults caused by uncancellable timeout signals.
2026-07-01 00:13:18 +02:00
can1357 e6140f1b55 Merge remote-tracking branch 'origin/farm/f8778fdf/ruff-lsp-windows-venv-scripts' 2026-06-30 23:57:27 +02:00
can1357 f56e563fa9 Merge remote-tracking branch 'origin/farm/2b86e599/agent-thinkinglevel-precedence' 2026-06-30 23:53:15 +02:00
can1357 daf3aaa508 feat(pi-natives): implemented two-pass search to partially grep large files
- Introduced a two-pass file processing architecture with `ReadPolicy` and `FileOutcome` state tracking.
- Deferred oversized files to a second pass where only their leading segment is read and searched.
- Integrated the two-pass processing logic into both sequential and native parallel grep execution paths.
- Updated agent tool definitions and user-visible messages to reflect partial coverage of large files instead of skipping them.
2026-06-30 23:37:49 +02:00
can1357 112317bc8e fix(coding-agent): resolved duplicate todo reminders in terminal scrollback
- Anchors the incomplete-todo reminder block inside the scrollback transcript instead of a floating live container.
- Eliminates duplicate reminder copies piling up in terminal scrollback during terminal reflows.
- Removes the dedicated `todoReminderContainer` and simplifies state synchronization on todo reload.
- Updates tests to verify sequential reminders commit as separate blocks and are left intact when tools succeed.
2026-06-30 23:32:58 +02:00
can1357 31d9fb1145 refactor: consolidated filesystem traversal into a dedicated library
- Replaced custom fast-walk and fs-cache implementations in pi-natives with a new dedicated pi-walker library.
- Integrated the thread-safe, parallel pi-walker library across pi-natives, pi-shell, pi-uu-grep, and uu-find.
- Rewrote file search, fuzzy finding, and glob-matching logic to leverage pi-walker configurations and visitor traits.
- Optimized shell process tracking in pi-shell by replacing global descendant-diff logic with an isolated, per-run SpawnRegistry.
- Added parallel rayon-based walking and optimized fast paths for directory scanning and entry classification.
2026-06-30 23:25:50 +02:00
roboomp ad6748ebe7 fix(lsp): covered setup.cfg and pyrightconfig venv lookup
Added setup.cfg and pyrightconfig.json to PYTHON_ROOT_MARKERS so pyright, basedpyright, and pylsp project shapes also probe Windows .venv/Scripts before PATH fallback.

Fixes #3916
2026-06-30 20:26:39 +00:00
roboomp ae0ae68e14 fix(lsp): included ruff-only roots for venv lookup
Extended Python local-bin gating to Ruff-only root marker files so Windows virtualenv Scripts launchers are found before PATH fallback.

Fixes #3916
2026-06-30 20:21:10 +00:00
roboomp e4561d64fa fix(coding-agent): restored subagent thinking precedence
Agent frontmatter thinkingLevel now wins over model role suffix thinking when both are configured.

Fixes #3915
2026-06-30 20:15:04 +00:00
roboomp 15c889941c fix(lsp): detected windows python venv scripts
Added Windows virtualenv Scripts directories to local LSP command resolution so project-local Ruff launchers are discovered before PATH fallback.

Fixes #3916
2026-06-30 20:14:46 +00:00
can1357 126e3adf72 feat(vendor/brush-core): added spawn observer hook for tracking launched external processes
- Added a `SpawnObserver` trait to intercept freshly spawned external command PIDs and process group IDs.
- Exposed `set_spawn_observer` and `spawn_observer` on `ExecutionParameters` to allow tracking process lifecycles.
- Triggered the observer on successful external command execution unless the process is detached or reparented.
2026-06-30 21:27:27 +02:00
can1357 3d0d20c746 fix(coding-agent/utils): cleared ambient git environment variables in git spawns
- Added a helper to build the Git process environment that explicitly clears common ambient Git environment variables.
- Applied the new environment builder to both async and synchronous Git commands to prevent environment bleeding from parent processes.
2026-06-30 20:43:15 +02:00
can1357 407c44547b feat(coding-agent/modes): opened the in-session resume picker in a fullscreen overlay
- Migrated the `/resume` session selector from an inline component to a fullscreen overlay.
- Enabled alternate screen buffer borrowing and mouse tracking support for the picker.
- Ensured proper cleanup of the fullscreen overlay during normal termination or shutdown.
- Configured the selector layout to pin keybinding hints and the footer to the bottom of the screen.
2026-06-30 20:39:45 +02:00
can1357 f1453d72ae refactor(catalog): restructured model generation to prune redundant compatibility fields
- Introduced a model canonicalization helper to strip redundant model compatibility fields that match defaults.
- Regenerated the models catalog JSON to eliminate over eight hundred lines of redundant compatibility specifications.
- Updated the variant collapse logic to rebuild models using the projected compatibility configurations.
- Added a missing type annotation to a test environment variable to resolve a compilation warning.
2026-06-30 20:26:37 +02:00
can1357 7b1525075a feat(catalog): updated model catalog configurations and pricing
- Added configurations for `anthropic/claude-sonnet-5` under openrouter, vercel-ai-gateway, and zenmux providers.
- Reduced model pricing and cost structure rates for `anthropic/claude-sonnet-5`.
- Removed `trustExplicitThinkingOnly` compatibility flag from several Claude and Gemini model entries.
- Removed legacy `disableStrictTools` property from model definitions and updated tests.
- Fixed model builder variant collapse logic to properly map `compatConfig` to `compat`.
- Sanitized environment variables in git-clone test helpers to avoid host-leakage in test runs.
2026-06-30 20:21:42 +02:00
can1357 f7df67ad72 Merge remote-tracking branch 'origin/farm/df125a92/fix-skill-slash-replace-prompt' 2026-06-30 20:17:24 +02:00
roboomp c7c6e98bb3 fix(coding-agent): preserved bash and python tool precedence around skills
Extended the mid-prompt /skill:<name> parser exclusions to also defer
to the bash tool (!cmd / !!cmd) and the python tool ($ cmd / $$ cmd
followed by ASCII whitespace), so drafts like '!echo /skill:reviewer'
are no longer consumed as skill invocations before the local-execution
branches of the interactive submit path get to dispatch them.

${HOME}-style shell expansions and prose-leading $ characters (which
pythonCommandPrefixLength already declines) keep matching mid-prompt
skills as before.

Fixes #3913
2026-06-30 16:29:35 +00:00
roboomp b318b29ea7 style: bun run fix 2026-06-30 16:22:16 +00:00
roboomp 71e3316d69 fix(coding-agent): preserved slash command precedence around skills
Restricted mid-prompt /skill:<name> parsing to non-slash drafts so
builtin/custom slash-command arguments such as /compact /skill:foo are
not intercepted before the command dispatcher runs.

Added parser and RPC dispatch regression coverage for the precedence
case while keeping leading /skill:<name> (including leading whitespace)
working.

Fixes #3913
2026-06-30 16:22:07 +00:00
roboomp 93198b34da style: bun run fix 2026-06-30 16:13:05 +00:00
roboomp 095392d144 fix(tui,coding-agent): preserved draft when accepting mid-prompt /skill: autocomplete
The mid-prompt slash skill autocomplete added in #3654 replaced the
entire editor draft with /skill:<name> on accept so the dispatcher
(which only matched leading /skill:) would still fire. That wiped
every keystroke the user had typed before reaching for the skill.

Insert the /skill:<name> token at the cursor in the TUI editor —
replacing only the partial /sk slash token, leaving prose before and
after intact — and extend the skill-command parser so a /skill:<name>
token surrounded by whitespace is recognized as an invocation too,
with the surrounding prose threaded through to the skill as args.

The parser change is shared across all three dispatch sites
(interactive TUI, ACP, RPC) via a new parseSkillInvocation helper
in extensibility/skills, so the three Map<string,string> /
session.skills lookups stay aligned on the same parse.

Fixes #3913
2026-06-30 16:12:53 +00:00
can1357 b6c9747d45 chore: bump version to 16.2.9 2026-06-30 18:01:59 +02:00
can1357 ac19fc1050 chore: update changelogs 2026-06-30 17:59:58 +02:00
can1357 e3b956275f Merge remote-tracking branch 'origin/farm/3d40f8e4/homebrew-darwin-arm64-tiny-runtime' 2026-06-30 17:59:39 +02:00
can1357 213fdca795 feat(coding-agent/prompts): simplified system prompt verification and delivery constraints
- Removed instructions prohibiting mocks and testing defaults in favor of using a tester agent when available.
- Streamlined delivery contract rules by removing the explicit instruction against suppressing tests.
- Updated verification claim guidelines to emphasize smoke testing.
2026-06-30 17:59:18 +02:00
can1357 bdfc21df43 feat(coding-agent/tiny): added llama3.2:3b local tiny model option
- Added the `llama3.2:3b` model configuration pointing to the quantized `onnx-community/Llama-3.2-3B-Instruct-ONNX` repository.
- Registered the model in both the available local models registry and list of valid memory model values.
- Documented the new option as a shipped local model choice in the documentation and changelog.
2026-06-30 17:59:10 +02:00
can1357 3c012a6c54 Merge remote-tracking branch 'origin/farm/a3e74c54/preserve-auto-model-thinking' 2026-06-30 17:54:52 +02:00
can1357 3aa47d2ab9 fix(coding-agent): matched persisted messages by key identity during mid-run compaction
- Replaced the map-based persisted message index with a Set of key identities.
- Removed the message content equality check during branch verification to avoid false out-of-order skips when display-side content variants are present.
2026-06-30 17:44:09 +02:00
can1357 e0bacbf2ec feat(coding-agent/modes): deferred handling streamed tool calls without an ID
- Skipped processing tool calls in the event controller streaming message when the tool ID is missing.
- Prevented creating orphaned empty placeholder cards caused by empty IDs during early Anthropic and OpenAI tool block streaming.
2026-06-30 17:38:41 +02:00
can1357 f1063cdfbb feat(catalog): added capability flags and thinking support for Claude Sonnet 5
- Added an `isAnthropicAdaptiveGenAtLeast` utility to classify adaptive-thinking Claude generations at or above a given version threshold.
- Enabled adaptive thinking display, sampling restrictions, and mid-conversation system message flags for Claude Sonnet 5+ models.
- Updated Bedrock and OpenRouter adaptive reasoning effort maps to support five-tier scales on Sonnet 5+ models.
2026-06-30 16:41:42 +02:00
can1357 6b7d7e6e7e feat(coding-agent): injected loop-guard redirect notices during thinking loop retries
- Added a hidden system notice prompt to instruct the model to break repetitive behaviors when a thinking or response loop is detected.
- Injected the redirect notice into the retried turn's context when resetting the active context after a loop retry.
- Added unit tests to verify the custom redirect message is appended, configured as non-displaying, and visible in subsequent LLM contexts.
2026-06-30 16:36:49 +02:00
roboomp 083d1f5a8e fix(release): pinned tiny transformers version
- Added the Transformers.js version define to release-built binaries.
- Covered the release dry-run command so Homebrew assets keep the tiny runtime pin.

Fixes #3904
2026-06-30 14:30:23 +00:00
roboomp 51da3add83 fix(coding-agent): preserved auto thinking across plan approval
Captured the configured thinking selector when entering plan mode so approving a plan restores auto instead of the provisional concrete effort. Reloaded DEFAULT(auto) badges from defaultThinkingLevel and covered the plan-approval handoff plus /model display.

Fixes #3901
2026-06-30 14:28:07 +00:00
can1357 f50caede0b test(coding-agent): added integration tests for STT submit trigger behaviors
- Added comprehensive integration tests verifying Speech-to-Text submit triggers in STTController under different configuration settings.
- Cleaned up unused imports and types from the stt-controller source file.
- Documented Speech-to-Text submit trigger updates and programmatic editor submission changes in package changelogs.
2026-06-30 16:25:34 +02:00
can1357 224000ea1a Merge remote-tracking branch 'origin/farm/bfaba2dc/fix-mcp-oauth-escape-cancel' 2026-06-30 16:18:39 +02:00
can1357 ca070bf09f Merge remote-tracking branch 'origin/farm/3b8dc673/guard-v8-setflags-on-bun' 2026-06-30 16:18:00 +02:00
can1357 168bdae5da feat(coding-agent): introduced automatic dictation submission triggers
- Added `stt.submitTrigger` setting to control automatic dictation submission.
- Introduced `evaluateSubmitTrigger` to process sentence punctuation and spoken cues.
- Integrated trigger evaluation into batch and streaming `STTController` pipelines.
- Implemented trailing word trimming to strip trigger words like "submit" before sending.
- Added comprehensive unit tests for all trigger evaluation behaviors.
2026-06-30 16:16:39 +02:00
can1357 720fb3f120 feat(coding-agent): replaced the oracle subagent with a new tester subagent
- Removed the oracle agent prompt configuration and its references across the codebase.
- Added a new tester agent prompt markdown file with directives for test authoring and techniques.
- Registered the new tester agent in the task runner while removing the oracle agent.
- Renamed the quick-task agent configuration and prompt references to sonic.
2026-06-30 16:16:39 +02:00
can1357 6c1152647c refactor(coding-agent): renamed the quick_task subagent to sonic
- Renamed references to the `quick_task` subagent to `sonic` across docs, agent definitions, prompts, and test files.
- Updated the parallel file analysis tool to spawn `sonic` subagents instead of `quick_task`.
- Documented the breaking change in the changelog along with additions and removals of other built-in subagents.
2026-06-30 16:16:39 +02:00
can1357 9ccd83a13d feat(coding-agent): made the agent parameter optional with a default value
- Updated task tool schemas to default the `agent` parameter to `'task'`.
- Normalized missing or empty `agent` values to `'task'` during execution handling to support direct programmatic callers.
- Replaced references to the old `quick_task` worker type with `sonic`.
- Simplified prompt instructions by removing deprecated single-spawn context constraints and status polling notes.
2026-06-30 16:16:39 +02:00
can1357 2c75ee5d38 Merge remote-tracking branch 'origin/farm/bcae1c50/fix-mcp-oauth-port-fallback' 2026-06-30 16:15:56 +02:00
roboomp 0ef430a39f fix(debug): guarded v8.setFlagsFromString call so CPU profiler works on Bun
The CPU profiler called node:v8 setFlagsFromString("--allow-natives-syntax")
unconditionally and crashed on Bun (oven-sh/bun#1702), surfacing as
"Failed to start profiler: node:v8 setFlagsFromString is not yet
implemented in Bun". The flag is only needed for ad-hoc V8 natives such
as %GetOptimizationStatus, not for the CDP Profiler session that actually
collects samples — so swallow the error and let the inspector path run.

Added a Bun-runtime regression test that would have caught the crash:
without the guard, startCpuProfile() throws before returning a session.

Fixes #3897
2026-06-30 12:47:07 +00:00
roboomp 3106a15f7d fix(mcp): raced oauth login against cancellation
Esc and wizard abort signals now race the MCP OAuth login promise directly, so cancellation wins even before OAuthCallbackFlow reaches its callback wait and registers an abort listener. OAuthCallbackFlow also checks pre-aborted signals before opening/waiting on the callback server and its wait path handles already-aborted signals.

Threaded the abort signal into MCP OAuth fetches so dynamic client registration, metadata discovery, authorization probes, and token exchange unblock promptly when the user cancels.

Added a regression test where MCPOAuthFlow.login never observes ctrl.signal, matching the pre-wait race called out in review.

Fixes #3888
2026-06-30 10:21:26 +00:00
roboomp 6f65772093 fix(mcp/oauth): preserved random-port fallback for fresh dynamic-client-registration flows
PR review pointed out that the unconditional opt-out blocks the safe case: when no static `client_id` is set, `MCPOAuthFlow.#tryRegisterClient` does DCR with whichever loopback URI we actually bound, so the provider issues a `client_id` tied to the fallback port and the authorize request is accepted. First-install users whose default port 3000 is busy could no longer authenticate.

Gate `allowPortFallback` on `staticClientIdFromConfig(config) === undefined`: pinned client ids (config-supplied or embedded in the authorization URL) keep the strict-port behavior that fixes #3887; unresolved client ids fall back as before. Factored the static client-id resolution into a module-level helper so `MCPOAuthFlow.#resolveClientId` and `resolveCallbackOptions` share the same logic.

Added an oauth-flow.test.ts case that wires a mock registration endpoint + occupies the preferred port and asserts the fallback URI is what DCR registers and what the authorize request advertises. Tightened the existing strict-port test's title to call out the static-clientId trigger.
2026-06-30 10:13:38 +00:00
roboomp 4300f46039 style: bun run fix 2026-06-30 10:08:21 +00:00
roboomp a6b2bac882 fix(mcp): made Esc cancel /mcp reauth and /mcp add OAuth flow
#handleOAuthFlow now installs an editor.onEscape hook that aborts its
AbortController, and accepts an external abortSignal so the add-wizard
can thread its own controller through (the wizard owns focus and absorbs
Esc itself). Cancellation surfaces as MCPOAuthCancelledError, which the
reauth and add catches translate into a neutral status line instead of
the generic OAuth failure banner. Disambiguated from the existing 5-min
timeout via a userCancelled flag so timeouts still read as errors.

The wizard intercepts Esc/Ctrl+C while #oauthAbort is set so its own
"Press Esc to cancel" advertisement now matches the behaviour, and
renames its error heading + tip when the failure is a user cancel. Also
fixed the misleading "(Press Ctrl+C to cancel)" message in the chat
transcript onAuth block to say "Press Esc" — Ctrl+C is bound to the
editor clear action, not interrupt.

Fixes #3888
2026-06-30 10:07:05 +00:00