agent_sdk_testing library
Test support for suites that drive the Agent SDK transports with no model behind them: a fake CLI server that speaks the wire, the spawnable fixture scripts a standalone transport can start, the deadlines a spawning test bounds itself with, and a Node for the live suites.
A separate entry point, as tom_github_api's testing.dart is: a product
build has no reason to link it.
Classes
- FakeAiServer
- ReservedPort
- A loopback port that is held but not served — "VS Code is not running" on a port nobody else can take.
Enums
- FakeAiServerBehaviour
- How a scripted server should answer a query.
Constants
- agentSdkNodeEnvVar → const String
- Overrides the search with an explicit interpreter.
- readyPrefix → const String
- The ready line the standalone transport waits for.
- spawnStartupTimeout → const Duration
- How long a spawned fixture may take to print its ready line.
- spawnTestTimeout → const Duration
- The harness bound for a test that spawns a child.
Properties
- spawnDeadlinesAreOrdered → bool
-
The invariant, as a value a test can assert rather than a comment a reader
has to trust.
no setter
Functions
-
agentSdkFixtureScript(
String name) → String -
The path of the spawnable fixture
<name>.dartthis package ships for tests —fake_ai_server(scripted answers) orecho_ai_server(answers with the prompt it received) — for a standalone transport to start as its server script, with a Dart CLI standing in for Node. -
findNodeForTests(
) → String? - A Node ≥ requiredNodeMajorVersion, or null when the machine has none.