Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

Add tool-loop and stream pipeline tests

8 months ago

e703e1b
Authored
mweinbach2/20/2026, 2:15:01 PM
Add comprehensive tests covering multi-step tool loops, stream part forwarding, abort/error handling, MCP cleanup, and usage reporting. Three new test files were introduced: test/agent.toolloop.test.ts (unit tests for createRunTurn behavior and stream handling), test/server.toolstream.test.ts (end-to-end WebSocket server tests ensuring model_stream_chunk ordering and turn usage/events), and test/session.stream-pipeline.test.ts (session pipeline tests mapping SDK stream parts to server protocol chunks). Tests include helpers and mocks for streamText, MCP tooling, observability, and runTurn to validate ordering, indices, rawPart forwarding, and edge cases.

Parente7a2623

3 files changed
  • test/agent.toolloop.test.ts+715−0
  • test/server.toolstream.test.ts+302−0
  • test/session.stream-pipeline.test.ts+695−0