CommandSessionRecord class

Snapshot of a single session, persisted by the runtime so subsequent commands can reference the currently-opened app, last snapshot, etc.

Mirrors CommandSessionRecord in src/runtime-contract.ts. The deviceSerial field is a Dart-port-only addition (see BackendCommandContext doc).

Constructors

CommandSessionRecord({required String name, String? appId, String? appBundleId, String? appName, String? backendSessionId, SnapshotState? snapshot, String? deviceSerial, Map<String, Object?>? metadata})
const
CommandSessionRecord.fromJson(Map<String, Object?> json)
Deserialise from the shape produced by toJson. The snapshot field is never re-hydrated (see toJson note); callers re-capture it.
factory

Properties

appBundleId String?
final
appId String?
final
appName String?
final
backendSessionId String?
final
deviceSerial String?
final
hashCode int
The hash code for this object.
no setterinherited
metadata Map<String, Object?>?
final
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
snapshot SnapshotState?
final

Methods

copyWith({String? appId, String? appBundleId, String? appName, String? backendSessionId, SnapshotState? snapshot, String? deviceSerial, Map<String, Object?>? metadata, Set<String> clearFields = const {}}) CommandSessionRecord
Returns a copy with any subset of fields replaced. To clear a nullable field to null, include its name in clearFields (passing null as the value is indistinguishable from "not specified" in Dart's optional named-parameter semantics — verifier finding from 2026-04-23).
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