RuntimeSnapshot class
Frozen snapshot of the scheduler's state at a point in time.
This is the JSON shape exposed by /api/v1/state and persisted to
.spectra/RUNTIME.json for cold-start observability.
Constructors
-
RuntimeSnapshot({required DateTime generatedAt, required List<
Map< running, required List<String, dynamic> >Map< retrying, required List<String, dynamic> >String> claimed, required List<String> completed, required Map<String, dynamic> codexTotals, required List<Map< recentEvents, required List<String, dynamic> >String> validationErrors, Map<String, String> proofOfWork = const <String, String>{}, Map<String, dynamic> ? rateLimits}) -
Creates a snapshot.
const
- RuntimeSnapshot.fromScheduler(Scheduler scheduler)
-
Builds a snapshot from a Scheduler.
factory
Properties
-
claimed
→ List<
String> -
Issue ids currently claimed by the scheduler (running or queued).
final
-
codexTotals
→ Map<
String, dynamic> -
Aggregate token + runtime totals.
final
-
completed
→ List<
String> -
Issue ids that have completed at least once.
final
- generatedAt → DateTime
-
Wall-clock time the snapshot was generated.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
proofOfWork
→ Map<
String, String> -
Proof-of-work artifact path per issue identifier for completed or
reviewable runs.
final
-
rateLimits
→ Map<
String, dynamic> ? -
Latest known rate-limit payload, when available.
final
-
recentEvents
→ List<
Map< String, dynamic> > -
Recent orchestration events (oldest first).
final
-
retrying
→ List<
Map< String, dynamic> > -
Pending retry queue.
final
-
running
→ List<
Map< String, dynamic> > -
Currently running entries.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
validationErrors
→ List<
String> -
Workflow validation errors blocking dispatch, when any.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - JSON view used by the snapshot file and HTTP API.
-
toPrettyJson(
) → String - Returns the snapshot encoded as pretty-printed JSON.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited