Commit Graph

4 Commits

Author SHA1 Message Date
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