MCPcopy Index your code
hub / github.com/callstack/agent-device / assertSnapshotSessionRecord

Function assertSnapshotSessionRecord

src/daemon/snapshot-runtime.ts:317–326  ·  view source on GitHub ↗
(
  record: CommandSessionRecord,
)

Source from the content-addressed store, hash-verified

315}
316
317function assertSnapshotSessionRecord(
318 record: CommandSessionRecord,
319): CommandSessionRecord & { snapshot: NonNullable<CommandSessionRecord['snapshot']> } {
320 if (!record.snapshot) {
321 throw new AppError('UNKNOWN', 'snapshot runtime did not produce session state');
322 }
323 return record as CommandSessionRecord & {
324 snapshot: NonNullable<CommandSessionRecord['snapshot']>;
325 };
326}
327
328function toRecordedSnapshotRuntimeResult(record: SnapshotRuntimeRecord): Record<string, unknown> {
329 if (record.kind === 'snapshot') {

Callers 1

createSnapshotRuntimeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected