Dev

Merged
H3
2mo ago
+394-27

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 communicationProtocols registrations stay shared for process-wide state.
  • Factory registrations take precedence over instance registrations of the same type.
  • Bumps @utcp/sdk and @utcp/mcp to 1.2.0; @utcp/mcp now requires @utcp/sdk ^1.2.0.
  • Tests cover per-client instances, shared instances, registration precedence, and isolated teardown.