Dev
Merged
H3
2mo ago+394+394+012345678901234567890123456789-27-27-01234567890123456789
Summary by cubic
Adds per-client communication protocol factories to @utcp/sdk for protocols whose state belongs to one client rather than the process. Each UtcpClient now owns the instances it creates from factories, and both close() and a failed create() tear down only those own instances — shared registrations (HTTP OAuth cache, etc.) are left running for every other client.
- When
create()fails after making instances, those instances are still closed before the error propagates instead of being orphaned. - Closing waits for every owned protocol even when one rejects, then surfaces the failures together instead of returning early.
Migration
- Existing
communicationProtocolsregistrations stay shared for process-wide state. - Factory registrations take precedence over instance registrations of the same type.
- Bumps
@utcp/sdkand@utcp/mcpto1.2.0;@utcp/mcpnow requires@utcp/sdk^1.2.0. - Tests cover per-client instances, shared instances, registration precedence, and isolated teardown.