Commit Graph

6166 Commits

Author SHA1 Message Date
Adam Weidman
c0981bda23 chore(core): remove redundant getters from config in agent-tool branch 2026-05-13 14:31:52 -04:00
Adam Weidman
1d65ae6882 chore(core): use renamed isAgentSessionSubagentEnabled getter in agent-tool 2026-05-13 14:31:52 -04:00
Adam Weidman
1566b5196d chore(core): match remote-session-invocation test to remote-invocation branch 2026-05-13 14:31:52 -04:00
Adam Weidman
3aad77a957 chore(core): revert remote-session-invocation test changes in agent-tool branch 2026-05-13 14:31:52 -04:00
Adam Weidman
989035328d chore(core): revert registry changes in agent-tool branch 2026-05-13 14:31:51 -04:00
Adam Weidman
490799741e chore(core): remove duplicate agent warning from registry in agent-tool branch 2026-05-13 14:31:51 -04:00
Adam Weidman
88c481def0 feat(core): wire AgentSession invocations into agent-tool behind feature flag
Add agentSessionSubagentEnabled setting under experimental.adk that
routes subagent invocations through LocalSessionInvocation and
RemoteSessionInvocation instead of legacy executors. When disabled
(default), all behavior is unchanged.

- Add agentSessionSubagentEnabled to ADKSettings, Config, and settings schema
- Thread onAgentEvent callback through AgentTool → DelegateInvocation
- Route local/remote agents to session invocations when flag is enabled
- Browser agent always uses BrowserAgentInvocation regardless of flag
- Copy local protocol files needed for the session invocation path
2026-05-13 14:31:51 -04:00
Adam Weidman
db3bdaefcc feat(core): composite sessionState key + duplicate agent name warning
Two changes:

1. RemoteSessionInvocation now uses a composite key (name::targetUrl)
   for the static sessionState map. This ensures agents with the same
   name but different endpoints maintain independent A2A state. Falls
   back to name-only when no URL can be derived.

2. AgentRegistry.registerAgent now emits a visible warning when a
   different definition tries to register under an existing name.
   Override still proceeds to preserve existing precedence order
   (user → project → extension). The warning surfaces potential
   naming conflicts to users.
2026-05-13 14:31:51 -04:00
Adam Weidman
ca5d4a2129 feat(core): rename getter to isAgentSessionSubagentEnabled 2026-05-13 13:47:42 -04:00
Adam Weidman
0986535a84 chore(core): remove redundant getAgentSessionSubagentEnabled method 2026-05-13 13:47:42 -04:00
Adam Weidman
b1ab327672 feat(core): add more getters related to agent session flag 2026-05-13 13:47:41 -04:00
Adam Weidman
cb338a37cc feat(cli): add agentSessionSubagentEnabled to settings schema and tests 2026-05-13 13:47:41 -04:00
Adam Weidman
9f4ada0795 feat(core): add adk.agentSessionSubagentEnabled experimental flag 2026-05-13 13:47:41 -04:00
Adam Weidman
05746666b6 fix(core): add optional chaining for optional abortSignal in RemoteSessionInvocation 2026-05-13 13:45:49 -04:00
Adam Weidman
44d75ddee0 fix(core): use SubagentState enum in remote session invocation tests 2026-05-12 23:49:49 -04:00
Adam Weidman
3ede28c6be test(core): add tests for composite session key in RemoteSessionInvocation 2026-05-12 17:50:36 -04:00
Adam Weidman
d398cdb59c docs(core): update comments for composite session key in RemoteSessionInvocation 2026-05-12 17:31:25 -04:00
Adam Weidman
25e2673cd2 feat(core): use composite key for remote session state 2026-05-12 17:28:56 -04:00
Adam Weidman
42ac315d87 refactor(core): use SubagentState enum in RemoteSessionInvocation 2026-05-12 15:37:09 -04:00
Adam Weidman
3f97e7e7a4 feat(core): add RemoteSessionInvocation — session-based remote agent invocation
New invocation class that delegates to RemoteSubagentSession instead of
directly managing A2A client streaming. Existing RemoteAgentInvocation is
untouched — this will be wired in behind a feature flag in a later PR.

Key behaviors:
- Static sessionState map persists A2A contextId/taskId across invocations
- Subscribes to session message events for live SubagentProgress updates
- Detects post-getResult abort and surfaces proper error state
- Includes partial output in error display via getLatestProgress()
- Properly cleans up abort listeners and subscriptions in finally block

Also adds initialState param and getSessionState() to
RemoteSubagentProtocol/RemoteSubagentSession for cross-invocation
state persistence.
2026-05-12 15:37:09 -04:00
Adam Weidman
c236bc3c4d refactor: address review follow-ups for local protocol 2026-05-12 15:37:08 -04:00
Adam Weidman
71fef59bcb refactor: address review comments for local protocol 2026-05-12 15:37:08 -04:00
Adam Weidman
34d41c3e8d refactor(core): use SubagentState enum in LocalSessionInvocation 2026-05-12 15:36:36 -04:00
Adam Weidman
0b3b5abca3 test(core): verify warning log in content-utils fallback test 2026-05-12 15:20:33 -04:00
Adam Weidman
696bf57ba6 Merge remote-tracking branch 'origin/main' into agent-session/local-invocation 2026-05-12 15:18:02 -04:00
Adam Weidman
e5b39b319e fix(core): restore fallback serialization in content-utils to avoid throwing 2026-05-12 15:03:17 -04:00
Adam Weidman
c987b99394 refactor(core): introduce SubagentState enum for progress (#26934) 2026-05-12 18:58:25 +00:00
Adam Weidman
7bf9d0152f Add safe string handling for activity data properties
Use typeof check and trim to avoid displaying 'undefined' for missing properties in THOUGHT_CHUNK, TOOL_CALL_START, TOOL_CALL_END, and ERROR events.

TAG=agy
CONV=d4b1d79a-226d-4301-8d60-bdb5d4701569
2026-05-12 14:46:06 -04:00
Adam Weidman
666d1d2d52 fix(core): fix imports in local-session-invocation test 2026-05-12 14:46:06 -04:00
Adam Weidman
a10284350f feat(core): add LocalSessionInvocation — session-based local subagent invocation
New invocation class that delegates to LocalSubagentSession instead of
directly using LocalAgentExecutor. Existing LocalSubagentInvocation is
untouched — this will be wired in behind a feature flag in a later PR.
2026-05-12 14:46:06 -04:00
Adam Weidman
aa1d1c6524 refactor: address review follow-ups for local protocol 2026-05-12 14:46:06 -04:00
Adam Weidman
dc3c7994d1 refactor: address review comments for local protocol 2026-05-12 14:46:06 -04:00
Adam Weidman
405b02e4b0 refactor(core,cli): fix missed enum usages in SubagentProgressDisplay and tests 2026-05-12 14:45:11 -04:00
Coco Sheng
c4973d01da ci: actively triage missing priority labels and intelligently clean up conflicting labels (#26865) 2026-05-12 18:33:55 +00:00
Adam Weidman
9c026f3408 refactor(cli): complete SubagentState enum migration in SubagentGroupDisplay 2026-05-12 14:28:33 -04:00
kevinjwang1
27a39b04b0 Enable NumericalRouter when using dynamic model configs (#26929) 2026-05-12 18:06:21 +00:00
Adam Weidman
206e11e49d refactor(cli): update UI components and tests to use SubagentState enum 2026-05-12 13:50:30 -04:00
Sandy Tao
ebe15553a9 Exclude extension context from skill extraction agent (#26879) 2026-05-12 10:45:19 -07:00
Adam Weidman
435c483b3a refactor(core): update remaining files to use SubagentState enum 2026-05-12 13:45:17 -04:00
Adam Weidman
086337784a refactor(core): introduce SubagentState enum for progress 2026-05-12 13:44:28 -04:00
Yulong Wu
bc730b2c0f fix (telemetry): inject quota_project_id to prevent fallback to default oauth client (#26698)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
2026-05-12 17:02:15 +00:00
Gal Zahavi
9fe8643552 chore: update checkout action configuration in workflows (#26897) 2026-05-12 16:58:37 +00:00
joshualitt
07792f98cd feat(context): Introduce adaptive token calculator to more accurately calculate content sizes. (#26888) 2026-05-12 15:51:20 +00:00
Coco Sheng
7a9ed4c20a fix: respect explicit model selection after Flash quota exhaustion (#26759) (#26872) 2026-05-12 14:26:50 +00:00
Kuroda Kayn
11a9edc808 fix(cli): restore resume for legacy sessions (#26577)
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
2026-05-12 00:28:47 +00:00
Adam Weidman
24b98ade86 fix(cli): enable adk non-interactive session (#26895) 2026-05-11 23:38:23 +00:00
Eswar809
9f759f97a2 fix(core): ignore .pak and .rpa game archive formats by default (#26884)
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
2026-05-11 21:58:08 +00:00
Franco Pieri
9ff7304391 Allow Enter to select session while in search mode in /resume (#21523)
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
2026-05-11 21:46:00 +00:00
Neil Nair
84fc5cd533 Fix/vscode run current file ts (#22894)
Co-authored-by: Spencer <spencertang@google.com>
2026-05-11 21:21:42 +00:00
Daniel Weis
e1b3ce5b36 revert 6b9b778d82 (#26893) 2026-05-11 21:07:54 +00:00