Commit Graph

11613 Commits

Author SHA1 Message Date
Mathews-Tom d5d3f2fcd7 Merge remote-tracking branch 'upstream/main' into feat/secret-friendly-names 2026-07-01 00:34:03 +05:30
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 6c552e39cf fix(utils): handled unquoted YAML plain scalars containing colon-space in frontmatter
- Added preprocessing to quote ambiguous plain scalars containing a colon-space sequence when standard YAML parsing fails.
- Preserves the parsed types of unaffected fields and prevents fallback warnings for common unquoted description strings.
- Added tests to verify successful recovery of unquoted values and continued fallback warning coverage for unrecoverable syntax.
2026-06-30 17:44:19 +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 51dbf94bc6 Merge remote-tracking branch 'origin/farm/40204cd0/harden-tool-call-json-parse-errors' 2026-06-30 16:17:31 +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 5cc84db4c4 feat(tui): enabled programmatic form submission via editor APIs
- Added a public `submit()` method to the `Editor` class to trigger form submission.
- Updated the `EditorComponent` interface to expose an optional `submit()` method.
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 43ad3cd910 feat(catalog): updated the model catalog with new providers and configurations
- Added `gemma-4-31b` to the `cerebras` provider catalog.
- Added `meituan/longcat-2.0` and `hf:moonshotai/Kimi-K2.7-Code` as available models.
- Enabled reasoning and thinking effort configuration for `nanogpt`'s `deepseek/deepseek-r1`.
- Removed `claude-opus-4-6-fast`, `hf:Qwen/Qwen3.5-397B-A17B`, and `hf:zai-org/GLM-4.7` models.
- Standardized synthetic model display names to include their organization namespace.
- Adjusted context window parameters for `hf:MiniMaxAI/MiniMax-M3`.
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 83f901d05f fix(ai): stripped transient flag for llama.cpp tool-call parse errors
- Added LLAMA_CPP_TOOL_CALL_PARSE_PATTERN and cleared Flag.Transient inside classifyMessage so the agent-level auto-retry no longer replays the same prompt against the same broken model state.

- Consolidated the duplicated detection pattern in the Ollama provider and the user-facing error rewrite to reuse the shared flags constant.

- Added a regression assertion that the finalized errorId is not Transient and not AIError.retriable for the malformed tool-call response.
2026-06-30 13:34:33 +00:00
roboomp 650d34f111 fix(utils): preserved long retry hint fail-fast
- Restored the fetchWithRetry early return for Retry-After and quota hints larger than maxDelayMs.

- Added coverage so oversized provider retry hints do not sleep and retry internally.
2026-06-30 13:24:47 +00:00
roboomp cd6ba0214f fix(ai): hardened ollama malformed tool-call handling
- Added a fetchWithRetry response-body gate so deterministic 5xx provider failures can skip retry delays.

- Stopped retrying llama.cpp malformed tool-call JSON responses from local Ollama and surfaced recovery guidance.

- Covered the Ollama parse-failure path and generic retry gate behavior.

Fixes #3899
2026-06-30 13:20:11 +00: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
roboomp d2c767507b fix(mcp/oauth): failed fast when callback port is busy instead of advertising a random one
When the MCP OAuth callback server's preferred port (default 3000) was unavailable, `OAuthCallbackFlow.#startCallbackServer` silently bound a random port and forwarded the mismatched `redirect_uri` to the authorization server. Providers that validate redirect URIs against a registered callback (e.g. Atlassian) returned an opaque HTTP 500, leaving the local flow waiting for a callback that never arrived until the 5-minute timeout fired.

Added `OAuthCallbackFlowOptions.allowPortFallback` (default `true`, preserving every existing AI-provider flow) and threaded `allowPortFallback: false` through `MCPOAuthFlow`'s `resolveCallbackOptions`. With fallback disabled, login now throws a `ConfigurationError` that names the busy port and the remediation (free the port, or set `oauth.callbackPort`/`oauth.redirectUri` in `mcp.json`) before opening the browser. The existing `oauth.redirectUri`-strict path is reworded along the same lines so callers see one consistent message family.

Fixes #3887
2026-06-30 10:05:24 +00:00
can1357 5bc68f57cd chore: bump version to 16.2.8 2026-06-30 11:58:55 +02:00
can1357 2185ec147a Merge remote-tracking branch 'origin/farm/50987903/preserve-hashline-bom' 2026-06-30 11:40:23 +02:00
can1357 63ff563eca feat(coding-agent): relaxed bash tool constraints and simplified critical instructions
- Removed prohibitions against using grep, rg, ls, find, head, tail, and redirections in the bash tool.
- Clarified in output specifications that stderr is merged into stdout.
2026-06-30 10:56:39 +02:00
can1357 5b026d304f fix(coding-agent): recovered from auto-compaction dead-ends using shake elisions
- Added a last-resort recovery step to run `shake("elide")` on oversized message tails when auto-compaction cannot otherwise free enough context.
- Re-tests the context headroom and auto-continue predicates after a successful rescue before falling back to pausing maintenance.
- Updated the dead-end warning message to suggest running `/shake images` for irreducible, image-only tails.
2026-06-30 10:48:04 +02:00
can1357 dd8b2cfbd8 Merge remote-tracking branch 'origin/farm/f07fefbd/fix-tool-args-reveal-initial-frame' 2026-06-30 10:26:01 +02:00
roboomp 8297f1a313 style: bun run fix 2026-06-30 08:05:01 +00:00
roboomp 88be72e4d4 fix(coding-agent): seed tool-args reveal with the partial JSON already in hand
ToolArgsRevealController.setTarget initialized new entries with revealed=0, so the first message_update returned { __partialJson: "" } even when the provider had already parsed a complete chunk. For renderers without exposeRawPartialJson (e.g. write), the throttled re-parse + cached displayArgs short-circuited every subsequent setTarget, leaving the preview body blank until tool_execution_end.

Seed revealed with the full incoming partialJson length on entry creation (clamped to a surrogate-safe boundary). The first frame now carries the parsed path/content immediately; subsequent message_updates extend target and the reveal ticks pace only the newly arrived bytes — no field is ever truncated because the seeded prefix is the longest the entry has seen so far.

Fixes #3881
2026-06-30 08:04:49 +00:00
can1357 fc24a70f5e Merge branch 'farm/ad81bc64/retry-anthropic-internal-server-error'
fix(compaction): cap snapcompact frame payloads (#3866)

Bound rebuilt snapcompact image payloads by a per-request base64 byte
budget so long sessions stop re-sending multi-megabyte standing image
archives on every provider request; auto-compaction falls back to
context-full summaries when snapcompact output is too large.

Resolved snapcompact.ts conflict against the main font-rendering refactor
by keeping both renderabilityProbeText and the frame-budget helpers.
Fixed historyBlocks to emit the omitted-frame notice before the kept
(newer) images, since the byte budget drops the oldest frames — keeping
reconstructed blocks oldest-to-newest (addresses Codex P2 review).

Fixes #3792
2026-06-30 09:59:03 +02:00
can1357 324941914b Merge remote-tracking branch 'origin/farm/0e3e890a/fix-review-schema-violation-overall-correctness' 2026-06-30 09:51:01 +02:00
can1357 1fdd6886b4 Merge remote-tracking branch 'origin/farm/29ae960b/grep-json-array-paths' 2026-06-30 09:50:52 +02:00
can1357 92894a7b8f Merge remote-tracking branch 'origin/farm/aa90ede0/local-llm-stream-timeout-config' 2026-06-30 09:50:37 +02:00
can1357 dcc7a1ce2c feat(coding-agent/discovery): added Go syntax and API discovery rules
- Added eight new Go-specific rules to the discovery package.
- Registered the new Go rules in the default rule source index.
- Covered the new Go AST matching conditions with test cases in `builtin-defaults.test.ts`.
2026-06-30 09:49:59 +02:00
roboomp 00b3cd3f92 style: bun run fix 2026-06-30 07:07:58 +00:00
roboomp 2c8b723083 fix(coding-agent): forwarded stream timeout settings
Forwarded persisted provider stream timeout settings into model requests so slow local LLM streams can widen or disable first-event and idle watchdogs without environment variables.

Fixes #3878
2026-06-30 07:07:41 +00:00
roboomp 695c67f21d style: bun run fix 2026-06-30 06:33:02 +00:00
roboomp 7595c8c2a4 fix(tools): accepted json-array grep paths
Normalized string-encoded JSON arrays in grep/search path handling so direct execute paths match validated tool-call behavior.

Added regression coverage for direct GrepTool.execute paths supplied as a JSON-array-shaped string.

Fixes #3873
2026-06-30 06:32:43 +00:00