4065 Commits

Author SHA1 Message Date
Adam Weidman
6ba10692b1 feat(agents): use inject completion behavior for remote agent backgrounding
Set completionBehavior: 'inject' on remote agent executions so their
full output is reinjected into the conversation when they complete in
the background, and the task auto-dismisses from the Ctrl+B panel.
2026-03-16 18:04:33 -04:00
Adam Weidman
4f2a1ad214 feat(agents): integrate remote agent backgrounding with InjectionService
Register remote agent executions with ExecutionLifecycleService, enabling
backgrounding, subscription, and kill support. Provide a formatInjection
callback so completed background remote agent output is automatically
reinjected into the model conversation via InjectionService.
2026-03-16 18:04:33 -04:00
Adam Weidman
0215f0ddbd feat(core): enable shell background completion injection
With the idle wake-up listener in place, shell background
completions can now use 'inject' to feed output back into the
model conversation when the agent is idle.
2026-03-16 18:03:12 -04:00
Adam Weidman
b341d48a1e feat(cli): auto-restart agent on background task completion
When the agent is idle and a backgrounded execution completes, the
completion output is now automatically submitted as a new turn
instead of being silently dropped. Uses the same InjectionService
listener pattern as user steering hints.
2026-03-16 18:02:34 -04:00
Adam Weidman
aabc27c12d fix(core): set shell background completionBehavior to silent
Shell background completions are set to silent until the idle
wake-up listener is in place, otherwise injections get buffered
but never consumed when the agent is idle.
2026-03-16 17:56:58 -04:00
Adam Weidman
6362e3cc15 fix: remove duplicate rebase artifacts in executionLifecycleService
Remove duplicated import, field, method, and injection call that
were introduced by rebase conflict resolution.
2026-03-16 12:04:39 -04:00
Adam Weidman
8751910572 refactor(core): move background injection from UI to ExecutionLifecycleService
settleExecution now calls injectionService.addInjection() directly
when a backgrounded execution completes, removing the bridge useEffect
from AppContainer. The UI just wires the injection service once at init
via setInjectionService().
2026-03-16 12:04:39 -04:00
Adam Weidman
708d0e7016 feat(core): add CompletionBehavior for background task injection control
Introduce inject/notify/silent completion behaviors that control what
happens when a backgrounded execution completes:
- inject: full output injected into conversation, auto-dismiss from UI
- notify: short pointer message injected (e.g. log file path), auto-dismiss
- silent: nothing injected, stays in Ctrl+B until manually dismissed

Shell commands use 'notify' (output saved to log file), remote agents
will use 'inject' (full output reinjected). Default is 'silent' when
no formatInjection callback is provided.
2026-03-16 12:04:39 -04:00
Adam Weidman
d68cc3a88f feat(cli): make background task UI agnostic to execution type
Add onBackground event to ExecutionLifecycleService that fires when any
execution is moved to the background. The CLI subscribes to this event
and automatically registers background tasks in the UI — no per-tool
changes needed.

Any tool that calls ExecutionLifecycleService.createExecution() or
attachExecution() now automatically gets Ctrl+B support. Shell-specific
concerns (PTY log files) stay in ShellExecutionService.

Forward setExecutionIdCallback through SubAgentInvocation so agents
can expose their execution ID to the scheduler for backgrounding.

Route registerBackgroundTask and dismissBackgroundTask through
ExecutionLifecycleService instead of ShellExecutionService for
agnostic subscribe/onExit/kill support.
2026-03-16 12:04:39 -04:00
Adam Weidman
6510587725 refactor(core): replace positional execute params with ExecuteOptions bag
Collapse shellExecutionConfig and setExecutionIdCallback into a single
optional ExecuteOptions object on ToolInvocation.execute(). This avoids
forcing every tool implementation to accept shell-specific parameters
just to reach later positional args.
2026-03-16 12:01:39 -04:00
Adam Weidman
1d86b6504b test(core): add integration tests for background completion injection flow
Tests cover XML tag wrapping with safety instruction, ordering
(background completions before user hints), and source filtering
to prevent background output from leaking into user hint getters.
2026-03-16 11:57:36 -04:00
Adam Weidman
1dc55b278b fix(core): harden injection safety and listener resilience
Wrap background completion output in <background_output> XML tags with
inline instructions to treat as data, consistent with <user_input> tags
used for user steering hints.

Guard listener iteration in InjectionService.addInjection and
ExecutionLifecycleService.settleExecution with try/catch so a throwing
listener doesn't block subsequent listeners or crash the caller.
2026-03-16 11:00:52 -04:00
Adam Weidman
2727a871c3 fix(core): source-aware injection getters, fix unshift ordering, remove dead code
Rename getUserHints/getUserHintsAfter/getLatestHintIndex to
getInjections/getInjectionsAfter/getLatestInjectionIndex with optional
source filter so bg completions don't get formatted as user hints.

Swap unshift ordering so bg completions appear before user hints in the
message — the model sees context before the user's reaction to it.

Remove unused getLastUserHintAt().
2026-03-15 22:16:38 -04:00
Adam Weidman
8fcb18996a refactor(core): unify InjectionService API to single onInjection interface
Remove legacy onUserHint/offUserHint/addUserHint methods. All callers
now use addInjection(text, source) and onInjection/offInjection with
source-based filtering where needed.
2026-03-15 21:38:11 -04:00
Adam Weidman
f46a1c7e8b refactor(core): move background completion consumption from UI to agent loop
The agent loop in local-executor now listens via onInjection (all sources)
instead of onUserHint (steering only), picking up background completions
between turns. This removes the separate bg completion useEffect, refs,
state, and callback from AppContainer entirely.
2026-03-15 15:43:34 -04:00
Adam Weidman
8b7321ea8d refactor(core): move background injection wiring from UI to backend
Wire ExecutionLifecycleService.setInjectionService() in Config constructor
so backgrounded executions inject directly via settleExecution instead of
routing through a useEffect bridge in AppContainer.
2026-03-15 15:11:13 -04:00
Adam Weidman
931b80206b refactor(core): rename UserHintService to InjectionService and add background completion support
Rename UserHintService to InjectionService as a generic, source-agnostic
injection mechanism. InjectionService supports typed sources ('user_steering'
and 'background_completion') with source-specific gating — user_steering
respects the model steering toggle while background_completion always fires.

Add background completion lifecycle to ExecutionLifecycleService: tracks
backgrounded executions, fires onBackgroundComplete listeners when they
settle, and supports FormatInjectionFn callbacks so execution creators
control how their output is formatted for reinjection.

Wire AppContainer to route background completions through InjectionService
and submit them to the model when idle, independent of model steering.
2026-03-12 13:23:52 -04:00
Abhi
cd7dced951
feat(core): implement model-driven parallel tool scheduler (#21933) 2026-03-12 17:03:44 +00:00
Spencer
73c589f9e3
feat(cli): allow safe tools to execute concurrently while agent is busy (#21988) 2026-03-12 16:03:53 +00:00
Adam Weidman
4b76fe0061
feat(core): add google credentials provider for remote agents (#21024) 2026-03-12 15:39:59 +00:00
Gaurav
867dc0fdda
feat(telemetry): add Clearcut instrumentation for AI credits billing events (#22153) 2026-03-12 15:16:27 +00:00
Michael Ramos
7506b00488
fix(core): handle policy ALLOW for exit_plan_mode (#21802) 2026-03-12 14:43:40 +00:00
Jaisal K Jain
34709dc62d
fix(cli): validate --model argument at startup (#21393)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-03-12 14:38:54 +00:00
Abhi
8432bcee75
fix(core): resolve MCP tool FQN validation, schema export, and wildcards in subagents (#22069) 2026-03-12 14:17:36 +00:00
Jack Wotherspoon
a38aaa47fb
chore: remove unnecessary log for themes (#22165) 2026-03-12 13:51:36 +00:00
Sehoon Shon
18e8dd768a
feat(ui): Do not show Ultra users /upgrade hint (#22154) (#22156) 2026-03-12 13:46:58 +00:00
Jack Wotherspoon
45faf4d31b
fix: register themes on extension load not start (#22148) 2026-03-12 13:38:09 +00:00
Aditya Bijalwan
333475c41f
feat(browser): implement input blocker overlay during automation (#21132)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Gaurav <39389231+gsquared94@users.noreply.github.com>
Co-authored-by: Gaurav Ghosh <gaghosh@google.com>
2026-03-12 11:29:57 +00:00
Sri Pasumarthi
41d4f59f5e
feat: Display pending and confirming tool calls (#22106)
Co-authored-by: Spencer <spencertang@google.com>
2026-03-12 05:57:37 +00:00
Adam Weidman
10ab958378
refactor(core): extract ExecutionLifecycleService for tool backgrounding (#21717) 2026-03-12 04:03:54 +00:00
Bryan Morgan
949e85ca55
feat(core): differentiate User-Agent for a2a-server and ACP clients (#22059) 2026-03-12 02:31:59 +00:00
Spencer
f090736ebc
fix(core): secure argsPattern and revert WEB_FETCH_TOOL_NAME escalation (#22104)
Co-authored-by: Taylor Mullen <ntaylormullen@google.com>
2026-03-12 02:26:21 +00:00
N. Taylor Mullen
7380424782
fix(policy): ensure user policies are loaded when policyPaths is empty (#22090) 2026-03-11 23:58:58 +00:00
N. Taylor Mullen
f368e80baf
fix(cli): resolve skill uninstall failure when skill name is updated (#22085) 2026-03-11 23:23:20 +00:00
N. Taylor Mullen
4a6d1fad9d
fix(core): propagate subagent context to policy engine (#22086) 2026-03-11 23:01:45 +00:00
Gal Zahavi
e3b3b71c14
feat(core): implement SandboxManager interface and config schema (#21774)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-03-11 21:42:50 +00:00
krishdef7
926dddf0bf
fix(hooks): fix BeforeAgent/AfterAgent inconsistencies (#18514) (#21383)
Co-authored-by: Spencer <spencertang@google.com>
2026-03-11 21:40:11 +00:00
nityam
352bbc36c0
merge duplicate imports packages/cli/src subtask3 (#22056) 2026-03-11 21:21:40 +00:00
Abhi
3bf4f885d8
feat(core): simplify subagent success UI and improve early termination display (#21917) 2026-03-11 21:11:07 +00:00
Spencer
775bcbf3a6
fix(core): silently retry API errors up to 3 times before halting session (#21989) 2026-03-11 20:40:06 +00:00
nityam
be16caece2
merge duplicate imports packages/cli/src subtask2 (#22051) 2026-03-11 20:14:12 +00:00
M Junaid Shaukat
e802776c96
feat(core): support custom base URL via env vars (#21561)
Co-authored-by: Spencer <spencertang@google.com>
2026-03-11 20:10:29 +00:00
Sehoon Shon
b7578eba7d
fix(core): preserve dynamic tool descriptions on session resume (#18835)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-03-11 19:38:54 +00:00
Spencer
b87718d1ff
fix(policy): remove unnecessary escapeRegex from pattern builders (#21921) 2026-03-11 19:31:55 +00:00
Aishanee Shah
067e09a40b
feat(telemetry): implement retry attempt telemetry for network related retries (#22027)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-03-11 18:55:48 +00:00
Sehoon Shon
36ce2ba96e
fix(core): enable numerical routing for api key users (#21977) 2026-03-11 18:54:52 +00:00
Ali Anari
08e174a05c
feat(ui): add vim yank/paste (y/p/P) with unnamed register (#22026)
Co-authored-by: Jacob Richman <jacob314@gmail.com>
2026-03-11 18:43:42 +00:00
Yuna Seol
df8b399bb4
feat(core): include initiationMethod in conversation interaction telemetry (#22054)
Co-authored-by: Yuna Seol <yunaseol@google.com>
2026-03-11 18:38:15 +00:00
Sehoon Shon
41f1ea4672
fix(core): handle EISDIR in robustRealpath on Windows (#21984) 2026-03-11 18:22:10 +00:00
Sehoon Shon
58557ba786
perf(core): parallelize user quota and experiments fetching in refreshAuth (#21648) 2026-03-11 18:00:16 +00:00