PatchbayCatalogDigest class final
A stable content digest of the command surface an App declares.
It answers one question a consumer cannot otherwise answer cheaply: did the App's declared capabilities change? Diffing two catalogs by hand is noise — registration order and formatting move on their own — so the digest is computed over a canonical form that ignores both.
What it covers, and why not more. Only commands. The catalog also
carries uiTargets, but those are the targets currently registered,
which is mount state: navigating to another screen changes the set without
anything about the App's declared surface changing. A digest that flips on
navigation is a digest consumers learn to ignore. schemaVersion is
excluded for the opposite reason — it is protocol-owned and constant, so
including it would make the digest move on a protocol bump that changed
nothing the consumer declared.
covers travels on the wire precisely so the name catalogDigest is not a
promise the value does not keep: a reader is told which region was hashed
rather than having to assume, and a later version can widen the coverage
without any reader silently comparing two different things.
Constructors
-
PatchbayCatalogDigest({required String algorithm, required List<
String> covers, required String value, bool coversFullyRead = true}) -
const
- PatchbayCatalogDigest.ofCommands(Object? commands)
-
Digests the
commandsarray of a catalog.factory
Properties
- algorithm → String
-
Names the hash function. Not an enum on the wire: a reader that meets an
algorithm it cannot compute has to say so and move on, not throw.
final
-
covers
→ List<
String> -
The catalog regions this digest was computed over.
final
- coversFullyRead → bool
-
Whether every entry of the wire
coversarray was readable as a scope name. False means covers under-reports what the host claimed.final - hashCode → int
-
The hash code for this object.
no setterinherited
- isRecomputable → bool
-
Whether a reader of this protocol version can recompute the digest and
therefore judge whether it matches the catalog it arrived with.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → String
-
Lowercase hex, no algorithm prefix — algorithm already carries that.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromJson(
Object? value) → PatchbayCatalogDigest? - Reads a digest a host served, or null when there is none to read.