Commit graph

2681 commits

Author SHA1 Message Date
Sumeet Agarwal
ff5148e7cc
feat(extensions): forward message and tool execution events to extensions (#1375)
The extension system currently only forwards agent_start, agent_end,
turn_start, and turn_end events. This means extensions cannot access
streaming text (token-by-token), message lifecycle, or tool execution
progress — all of which are available to internal subscribers.

This adds forwarding for the remaining 6 agent event types:
- message_start, message_update, message_end
- tool_execution_start, tool_execution_update, tool_execution_end

These follow the exact same pattern as the existing forwarded events:
new interfaces in types.ts, exports in index.ts, and else-if blocks
in _emitExtensionEvent(). The new types are included in ExtensionEvent
and automatically flow through RunnerEmitEvent (they're not in the
exclusion list).

This enables extensions to build real-time UIs, streaming WebSocket
bridges, and other integrations that need fine-grained event access.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-02-12 20:30:46 +01:00
Mario Zechner
4793f7c92d fix(coding-agent): make resolveCliModel sync, update docs and changelog 2026-02-12 19:04:51 +01:00
Armin Ronacher
56342258e1 fix(coding-agent): honor --model selection, thinking, and --api-key 2026-02-12 18:58:45 +01:00
Mario Zechner
7ccf809a5d chore(ai): add changelog entry for copilot claude messages routing 2026-02-12 18:53:04 +01:00
Nate Smyth
2419412483 refactor(ai): fix inconsistencies, trim ai code+replace tests, remove unnceccessary tool_result check 2026-02-12 18:41:12 +01:00
Nate Smyth
0a132a30a1 feat(ai): route copilot claude via anthropic messages api 2026-02-12 18:41:12 +01:00
Nate Smyth
cf1353b8e7 test(ai): cover copilot claude messages routing + headers 2026-02-12 18:41:12 +01:00
Mario Zechner
7eb969ddb1 fix(coding-agent): show unknown context usage after compaction, fix multi-compaction boundary
After compaction, context token count is unknown until the next LLM
response. Instead of showing stale pre-compaction values or heuristic
estimates, the footer now shows ?/200k.

ContextUsage.tokens and ContextUsage.percent are now number | null
(breaking change). Removed usageTokens, trailingTokens, lastUsageIndex
from ContextUsage (internal details).

Also fixed _checkCompaction() using .find() (first compaction) instead
of getLatestCompactionEntry() (latest), which caused incorrect overflow
detection with multiple compactions.

Closes #1382
2026-02-12 18:35:09 +01:00
Mario Zechner
1e88c5e463 feat(ai): add generic metadata field to StreamOptions, closes #1384
Add metadata?: Record<string, unknown> to StreamOptions so providers
can extract fields they understand. Anthropic provider extracts user_id
for abuse tracking and rate limiting. Other providers ignore it.

Based on #1384 by @7Sageer, reworked to use a generic type instead of
Anthropic-specific typing on the base interface.
2026-02-12 17:39:03 +01:00
Markus Ylisiurunen
28c0991281
Extend interleaved thinking test to Anthropic first-party provider (#1413)
* extend interleaved thinking test to Anthropic first-party provider

* switch back to global Bedrock model identifier

* set retry to 3 for both

* enable bedrock claude interleaved thinking by default and use completeSimple in test
2026-02-12 17:27:42 +01:00
PriNova
7ddb7c67a8
fix(coding-agent): correct Termux package name for fd (#1433)
The fd package is named 'fd' in Termux, not 'fd-find'.

fixes termux package name
2026-02-12 17:26:55 +01:00
mom
34878e7cc8 docs: add vacation notice to coding-agent README 2026-02-09 22:35:53 +00:00
Mario Zechner
fdcd9ab783 Add [Unreleased] section for next cycle 2026-02-09 00:17:28 +01:00
Mario Zechner
cc3eaee560 Release v0.52.9 2026-02-09 00:16:45 +01:00
Mario Zechner
c26505c55d chore(changelog): audit unreleased entries before patch release 2026-02-09 00:15:55 +01:00
Mario Zechner
f405018d51 docs(coding-agent): add custom provider example references 2026-02-09 00:02:47 +01:00
Mario Zechner
c85050bb30 docs(coding-agent): add changelog entry for local extension path parsing fix 2026-02-08 23:52:53 +01:00
Mario Zechner
88ac5ca1d9 fix(coding-agent): treat dot-prefixed extension paths as local 2026-02-08 23:52:23 +01:00
Mario Zechner
ed9255d3bd ai: update Antigravity system instruction to compact version, fix flaky tool test
- Replace verbose ANTIGRAVITY_SYSTEM_INSTRUCTION with compact version from CLIProxyAPI
- Replace bridgePrompt override with [ignore] wrapper pattern
- Switch Antigravity Gemini test model from gemini-3-flash to gemini-3-pro-high
- Rename calculator tool to math_operation (gemini-3-pro ignores schema for 'calculator')

closes #1415
2026-02-08 23:37:09 +01:00
Aliou Diallo
0c9304a49b
docs(coding-agent): fix RPC mode ctx.hasUI and unsupported methods documentation (#1411)
Update extensions.md and rpc.md to accurately reflect that ctx.hasUI is
true in RPC mode. Document missing unsupported/degraded ExtensionUIContext
methods: pasteToEditor, getAllThemes, getTheme, setTheme.

Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-02-08 23:08:36 +01:00
Emanuel Stadler
9d6fcedb91
docs: add auth.json keys to table and reference to envMap (#1412)
* docs: add auth.json keys to table and reference to envMap

* docs: adjust envMap reference links
2026-02-08 23:05:27 +01:00
Daniel Nouri
dae2eb5bfa
fix(subagent): list available agents in unknown-agent error (#1414)
The invalid-params error paths already listed available agents,
but the unknown-agent path in runSingleAgent just returned
'Unknown agent: claude' with no hint what exists.

Now: 'Unknown agent: "claude". Available agents: "worker".'

Model would guess names like "claude", "default", or skill names
like "brave-search". Now it self-corrects on the next call.

Tested with Opus 4.6: without fix, model gave up on subagent
and ran the tool calls itself instead. With fix, 1 wasted call.
2026-02-08 23:04:42 +01:00
Mario Zechner
5b36cacaf3 feat(coding-agent): add -ne, -ns, -np aliases for --no-extensions, --no-skills, --no-prompt-templates 2026-02-08 23:02:01 +01:00
Mario Zechner
afb7e5ed4c feat(coding-agent): show tool input schema in /export HTML
Include tool parameter names, types, descriptions in a collapsible
section under each tool in the export HTML. Also adds parameters to
pi.getAllTools() return value.

closes #1407, closes #1416
2026-02-08 22:58:46 +01:00
Mario Zechner
83931c53fd docs(coding-agent): add changelog entry for rg startup download 2026-02-08 22:58:01 +01:00
Mario Zechner
a6cd254471 fix(coding-agent): ensure rg is downloaded at startup alongside fd
rg was only downloaded lazily when the grep tool was invoked, but the
LLM often uses rg directly via the bash tool. Ensure both fd and rg
are downloaded at startup so they are available in PATH for all tools.

fixes #1348
2026-02-08 22:56:28 +01:00
Mario Zechner
5d361f4719 chore: audit and update changelog entries for v0.52.8..HEAD 2026-02-08 22:50:53 +01:00
Mario Zechner
1caadb2e2a fix(ai): use parametersJsonSchema for Google tool declarations, revert Antigravity opus model
- Use parametersJsonSchema instead of parameters for Gemini tool declarations
  to support full JSON Schema (anyOf, oneOf, const, etc.)
- Keep legacy parameters field for Claude models on Cloud Code Assist, where
  the API translates parameters into Anthropic's input_schema
- Revert claude-opus-4-6-thinking back to claude-opus-4-5-thinking (model
  doesn't exist on the Antigravity endpoint)

fixes #1398
2026-02-08 15:53:17 +01:00
Mario Zechner
82caf064e0 fix(coding-agent): use tar instead of unzip for .zip extraction on Windows
Windows does not ship with unzip, causing fd/rg download to fail on
first run in PowerShell. Use tar (bsdtar, available on Windows 10+)
for both .tar.gz and .zip extraction. Also adds proper error checking
on the extraction result.

fixes #1348
2026-02-08 15:53:17 +01:00
Mario Zechner
e1b56c1d28 feat(coding-agent): add ctx.reload and reload-runtime example closes #1371 2026-02-08 15:34:47 +01:00
Mario Zechner
2c3f624348 fix(ai): correct opencode context windows for Claude Sonnet 4/4.5
fixes #1383
2026-02-08 14:35:07 +01:00
mom
e10a831e56 fix(coding-agent): use ModelRegistry in custom-compaction example (fixes #1387) 2026-02-08 12:49:34 +00:00
Mario Zechner
d58d2c2da1 Add [Unreleased] section for next cycle 2026-02-07 17:51:07 +01:00
Mario Zechner
f06d31ae41 Release v0.52.8 2026-02-07 17:50:24 +01:00
Mario Zechner
f1335e9c50 docs: add missing changelog entries for commits since v0.52.7 2026-02-07 17:49:30 +01:00
Kao Félix
6a3d6fe944
feat(tui, coding-agent): add pasteToEditor to ExtensionUIContext (#1351)
Add pasteToEditor(text) method that pastes text into the editor via
bracketed paste sequences, triggering paste handling (including collapse
for large content). Unlike setEditorText which directly replaces content,
pasteToEditor routes through handleInput on the active editor component.

- Add pasteToEditor to ExtensionUIContext interface
- Add handleInput to EditorComponent interface (was missing, all
  concrete implementations already had it)
- Implement in interactive mode via bracketed paste sequence
- Add fallback in RPC mode (delegates to setEditorText)
- Document in extensions.md
2026-02-07 15:55:08 +01:00
Sviatoslav Abakumov
828c40cf68
Fix the issue of aborting retries when an extension customizes the editor (#1364)
* fix(coding-agent): update test model from opus-4-5 to opus-4-6

* fix(coding-agent): delegate onEscape/onCtrlD/onPasteImage to defaultEditor

When an extension provides a custom editor via setEditorComponent(),
onEscape, onCtrlD, and onPasteImage were copied by value from
defaultEditor. Later, when retry/compaction/branch-summary temporarily
swapped defaultEditor.onEscape to an abort handler, the custom editor
still held the stale reference, so pressing Escape during retry did
nothing.

Use closures that delegate to defaultEditor at call time, matching the
pattern from f1b1d54 which fixed the same issue for onExtensionShortcut.
2026-02-07 15:50:01 +01:00
PriNova
08e88f1036
fix(antigravity): fixes the tests for antigravitiy opus (#1369)
* feat(antigravity): update model costs and tokens, migrate compaction tests to Claude 4.6

- Update model costs for various models in `models.generated.ts` to reflect the latest pricing.
- Update maxTokens for certain models.
- Migrate compaction tests from `claude-opus-4-5-thinking` to `claude-opus-4-6-thinking` in `compaction-thinking-model.test.ts`.

* fix: remove unnecessary peer dependencies in package-lock.json

This commit removes the `peer: true` flag from several dependencies in `package-lock.json`. These dependencies (lit, tailwind-merge, tailwindcss, picomatch, @tailwindcss/typescript, vite, picomatch) do not need to be explicitly marked as peer dependencies in this context, as they are already managed as regular dependencies. Removing the `peer: true` flag simplifies the dependency graph and avoids potential conflicts during installation.
2026-02-07 15:49:30 +01:00
Sviatoslav Abakumov
3cf5e23c0d
fix(coding-agent): propagate autocomplete to custom editors (#1372)
setupAutocomplete only sets the provider on defaultEditor. When an
extension customizes the editor via setEditorComponent during
session_start, the custom editor is created before setupAutocomplete
runs, so it never receives the autocomplete provider. This breaks forced
file suggestions, slash commands, and all other completions.

Set the provider on the active editor too when it differs from the
default, covering initial load, reload, and settings changes.
2026-02-07 15:48:18 +01:00
Sviatoslav Abakumov
4c2d78f6cb
Add the kill ring and undo features to the Input component (#1373)
* feat(tui): extract KillRing and UndoStack, add to Input

Extract kill ring and undo logic from Editor into reusable classes:

- KillRing: ring buffer with accumulation for consecutive kills
- UndoStack<S>: generic stack with clone-on-push semantics

Refactor Editor to use both classes. Add kill ring (kill/yank/
yank-pop), undo with coalescing, and deleteWordForward to Input.

* feat(tui): extract handleBackspace() and handleForwardDelete()
2026-02-07 15:47:27 +01:00
Shashank Goyal
3fb33da429
feat(ai): add openrouter "auto" model alias (#1361)
Add a manually inserted "auto" model entry for OpenRouter alongside
the existing "openrouter/auto" entry, allowing users to select the
auto-routing model with a shorter identifier.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 15:35:21 +01:00
Fero
f9161c4d4e
fix(coding-agent): add package subcommand help and friendly errors (#1347)
* fix(coding-agent): add package subcommand help and friendly errors

* refactor(coding-agent): simplify package command parsing and dispatch

* fix(coding-agent): add plain git URL examples to install help
2026-02-07 03:30:28 +01:00
calvin-hpnet
2ae668823c
feat(antigravity): replace Claude Opus 4.5 with 4.6 (#1345)
Claude Opus 4.5 has been replaced by Claude Opus 4.6 on the
Antigravity (Google Cloud Code Assist) platform.

- Update model definition in generate-models.ts
- Update generated models output
2026-02-07 03:28:54 +01:00
Mario Zechner
310da43042 fix(coding-agent): refresh temporary git extension caches on cache hits 2026-02-06 22:01:49 +01:00
Mario Zechner
92fdb53c10 fix(coding-agent): run extension shutdown via clean TUI shutdown path 2026-02-06 21:37:35 +01:00
Markus Ylisiurunen
5c87303b7f
add test cases for interleaved thinking on Bedrock (#1340) 2026-02-06 21:15:59 +01:00
Mario Zechner
d39faa72d3 Add [Unreleased] section for next cycle 2026-02-06 19:20:32 +01:00
Mario Zechner
4eb15a9d11 Release v0.52.7 2026-02-06 19:19:46 +01:00
Mario Zechner
4238b07b4e Merge branch 'pr-1332-fixups'
# Conflicts:
#	packages/ai/CHANGELOG.md
2026-02-06 19:18:38 +01:00
Mario Zechner
6b2d8a77b2 (chore) Changelog update 2026-02-06 19:16:35 +01:00