Commit Graph

16 Commits

Author SHA1 Message Date
Adam Weidman 3d76c80da5 test(core): validate external AbortSignal propagation through LocalSubagentSession
The existing abort test mocked the executor to always reject, meaning it
would pass even if the abort wiring was broken. Add a test that actually
fires the caller's AbortSignal and asserts it propagates through the
abortListener -> session.abort() -> internal AbortController -> executor
chain.
2026-03-26 16:28:01 -04:00
Adam Weidman f1a3387160 feat(core): wrap local and remote subagents behind AgentProtocol/AgentSession
Introduce LocalSubagentProtocol and RemoteSubagentProtocol that implement
AgentProtocol, wrapping LocalAgentExecutor and A2A client streaming
respectively. LocalSubagentSession and RemoteSubagentSession extend
AgentSession and are the public entry points.

- LocalSubagentProtocol: translates SubagentActivityEvent -> AgentEvent
  (THOUGHT_CHUNK->message/thought, TOOL_CALL_START->tool_request,
  TOOL_CALL_END->tool_response, ERROR->error). Accepts optional
  rawActivityCallback for rich SubagentProgress display without losing
  displayName/errorType detail that AgentEvent types do not carry.

- RemoteSubagentProtocol: wraps A2A sendMessageStream, maintains
  contextId/taskId session state, tracks SubagentProgress per chunk
  for error recovery, and returns a ToolResult with proper
  SubagentProgress as returnDisplay.

- LocalSubagentInvocation: now uses LocalSubagentSession internally,
  preserving all existing SubagentProgress display logic via
  rawActivityCallback. External AbortSignal wired through session.abort().

- RemoteAgentInvocation: now uses RemoteSubagentSession, subscribing
  to message events for live progress updates.

- SubagentToolWrapper and SubagentTool: add optional onAgentEvent
  callback for future parent session observability (currently unused,
  wired through invocation constructors to avoid a second pass later).

- index.ts: export LocalSubagentSession and RemoteSubagentSession.

No behavioral change to SubagentProgress display or ToolResult output.
2026-03-26 12:09:47 -04:00
Abhi a1f9af3fa7 fix(core): accurately reflect subagent tool failure in UI (#23187) 2026-03-24 01:56:00 +00:00
Dev Randalpura cca595971d fix(core): add sanitization to sub agent thoughts and centralize utilities (#22828) 2026-03-20 19:19:18 +00:00
Abhi 5fa14dbe42 feat(core): resilient subagent tool rejection with contextual feedback (#22951) 2026-03-19 01:09:37 +00:00
Christian Gunderman 0082e1ec97 Fix issue where subagent thoughts are appended. (#22975) 2026-03-18 19:20:31 +00:00
Abhi be7c7bb83d fix(cli): resolve subagent grouping and UI state persistence (#22252) 2026-03-18 03:11:20 +00:00
Abhi 3bf4f885d8 feat(core): simplify subagent success UI and improve early termination display (#21917) 2026-03-11 21:11:07 +00:00
joshualitt 20a226a5ab feat(core): Thread AgentLoopContext through core. (#21944) 2026-03-11 01:12:59 +00:00
nityam 28af4e127f fix: merge duplicate imports in packages/core (3/4) (#20928) 2026-03-04 00:12:59 +00:00
Christian Gunderman 7ca3a33f8b Subagent activity UX. (#17570) 2026-03-02 21:04:31 +00:00
Abhi acb7f577de chore(lint): fix lint errors seen when running npm run lint (#19844) 2026-02-21 18:33:25 +00:00
joshualitt 27d21f9921 feat(core): Have subagents use a JSON schema type for input. (#17152) 2026-01-22 00:56:01 +00:00
joshualitt d66ec38f82 feat(core): Align internal agent settings with configs exposed through settings.json (#16458) 2026-01-13 22:31:34 +00:00
Abhi 12c7c9cc42 feat(core,cli): enforce mandatory MessageBus injection (Phase 3 Hard Migration) (#15776) 2026-01-04 22:11:43 +00:00
Adam Weidman d02f3f6809 feat(core): introduce remote agent infrastructure and rename local executor (#15110) 2025-12-17 17:06:38 +00:00