Skip to content

feat(sdk): add listen() AsyncGenerator + applyScenario/validateScenario#32

Merged
George-iam merged 1 commit intomainfrom
feat/listen-apply-scenario-20260314
Mar 14, 2026
Merged

feat(sdk): add listen() AsyncGenerator + applyScenario/validateScenario#32
George-iam merged 1 commit intomainfrom
feat/listen-apply-scenario-20260314

Conversation

@George-iam
Copy link
Contributor

Summary

  • listen(address): AsyncGenerator that streams agent intents via SSE — yields IntentEvent objects, handles reconnection, filters by to_agent address.
  • applyScenario() / validateScenario(): apply or validate a scenario bundle against the gateway.
  • Tests: full test coverage in test/client.test.ts using mock HTTP servers.

Test plan

  • npm test passes
  • listen() streams events and terminates cleanly on signal
  • applyScenario() POSTs to /v1/scenarios/apply and returns result

Made with Cursor

… delivery

Implements listen() method on AxmeClient that connects to
GET /v1/agents/{address}/intents/stream via SSE, auto-advances the
since cursor on reconnect, respects timeoutMs deadline, and strips the
agent:// scheme prefix. Also adds TIMED_OUT to terminal status set and
refactors SSE parsing to shared parseSseEvents helper. 8 new tests added.

Made-with: Cursor
@George-iam George-iam merged commit 2078b8c into main Mar 14, 2026
1 check passed
@George-iam George-iam deleted the feat/listen-apply-scenario-20260314 branch March 14, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant