patchbay_client library

Opt-in Dart client surface for patchbay_cli (PB-050-13, DG-050-07).

Import this library only to hold a Patchbay connection open from Dart code. Driving the App as a tool — commands, exit codes, stable JSON — belongs to the patchbay executable and its --json contract, not here.

The surface is a closed list of eight symbols. Nothing else in this package is public: launcher, session, trace, doctor, REPL, manifest and permission implementations are executable internals, and every test clock, random source, starter and factory seam stays inside src/. Growing this list is a design decision, not an implementation one — it requires an accepted proposal and a golden update, never a convenience export.

Classes

PatchbayClient
One open connection to a running App, whatever transport reached it.
PatchbayRuntimeIdentity
One host's answer to the identity handshake.
PatchbaySnapshotDiffClient
Optional client surface for the separately capability-gated diff request.
PatchbaySnapshotRequest
Validated request for one snapshot field selection, optionally waited on.

Functions

connectPatchbayDirect({required Uri endpoint, required String bearerToken, required int schemaVersion, required String applicationId, required String appInstanceId, Duration timeout = const Duration(seconds: 60)}) PatchbayClient
Connects to a running App over the explicitly enabled direct HTTP transport.
connectPatchbayVmService(Uri serviceUri, {PatchbayRuntimeIdentity? expectedIdentity}) Future<PatchbayClient>
Connects to a running App over its VM Service URI.

Exceptions / Errors

PatchbayProtocolException
The App answered, and the answer broke the protocol.
PatchbayTransportException
The App could not be reached, or stopped answering mid-request.