Skip to content

SessionCommand ​

Category: Commands

Source: session_command.dart

Classes ​

SessionSummary ​

Constructor ​

dart
const SessionSummary({
    required this.meta,
    required this.sessionDir,
    required this.patchPath,
    required this.patchSizeBytes,
  })
dart
factory SessionSummary.from(SessionMeta meta, Environment env)

Properties ​

PropertyTypeDescription
metaSessionMeta
sessionDirString
patchPathString?
patchSizeBytesint?
okbool
messageString
branchString?
rejectedFilesList<String>
inPlacerequired SessionSummary session, required String targetDir, String? branch, bool
patchPathfinal
inRepofinal
amfinal
applyfinal
rejectedfinal
nameString get
descriptionString get
nameString get
descriptionString get
directfinal
byIdfinal
errorsvar
warningsvar
metaFilefinal
transcriptfinal
linesfinal
nameString get
descriptionString get
matchesfinal
nameString get
descriptionString get
nameString get
descriptionString get
nameString get
descriptionString get
nameString get
descriptionString get
nameString get
descriptionString get
nameString get
descriptionString get
nameString get
descriptionString get
nameString get
descriptionString get
nameString get
descriptionString get
nameString get
descriptionString get
nameString get
descriptionString get

Methods ​

`const SessionApplyResult({ ​
required this.ok,
required this.message,
this.branch,
this.rejectedFiles = const [],

})`

`return SessionApplyResult( ​
ok: false,
message:
    'git am and git apply both failed. Inspect rejections or apply '
    'manually:\n  ${apply.stderr.toString().trim().split('\n').join('\n  ')}',
branch: branch,
rejectedFiles: rejected,

)`

Future<int> run() ​
throw UsageException('session not found: $value', 'glue session validate') ​
Future<int> run() ​
Future<int> run() ​
Future<int> run() ​
Future<int> run() ​
Future<int> run() ​

SessionApplyResult ​

Constructor ​

dart
const SessionApplyResult({
    required this.ok,
    required this.message,
    this.branch,
    this.rejectedFiles = const [],
  })

Properties ​

PropertyTypeDescription
okbool
messageString
branchString?
rejectedFilesList<String>

SessionCommand ​

Constructor ​

dart
SessionCommand()

Properties ​

PropertyTypeDescription
nameString get
descriptionString get
nameString get
descriptionString get

SessionValidateCommand ​

Constructor ​

dart
SessionValidateCommand()

Properties ​

PropertyTypeDescription
nameString get
descriptionString get
nameString get
descriptionString get

Methods ​

Future<int> run() ​

SessionListCommand ​

Properties ​

PropertyTypeDescription
nameString get
descriptionString get
nameString get
descriptionString get

Methods ​

Future<int> run() ​

SessionShowCommand ​

Properties ​

PropertyTypeDescription
nameString get
descriptionString get
nameString get
descriptionString get

Methods ​

Future<int> run() ​

SessionDiffCommand ​

Properties ​

PropertyTypeDescription
nameString get
descriptionString get
nameString get
descriptionString get

Methods ​

Future<int> run() ​

SessionApplyCommand ​

Constructor ​

dart
SessionApplyCommand()

Properties ​

PropertyTypeDescription
nameString get
descriptionString get
nameString get
descriptionString get

Methods ​

Future<int> run() ​

SessionExportCommand ​

Constructor ​

dart
SessionExportCommand()

Properties ​

PropertyTypeDescription
nameString get
descriptionString get
nameString get
descriptionString get

Methods ​

Future<int> run() ​

Functions ​

List<SessionSummary> listSessions(Environment env) ​

glue session … — list, inspect, apply, and export the runtime.mbox patches produced by cloud sessions.

Phase 3 of docs/plans/2026-05-19-cloud-runtimes-correctness-plan.md. The mbox itself is captured at session shutdown (see cli/lib/src/app.dart _captureRuntimePatch); these are the host-side commands that turn it into something useful. Loads all sessions from the on-disk store sorted by start time descending. Sessions without a runtime patch on disk are still listed — call sites distinguish via [SessionSummary.patchPath].

`Future<SessionApplyResult> applySessionPatch({ ​

required SessionSummary session, required String targetDir, String? branch, bool inPlace = false, })`

Applies a session's runtime.mbox to [targetDir] using git am --3way. When [branch] is provided (Q6 default behavior — glue session apply always creates a branch unless --in-place), a fresh branch is created from the current HEAD and switched to before applying.

Released under the MIT License.