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

Function toRuntimeSessionRecord

src/daemon/runtime-session.ts:10–26  ·  view source on GitHub ↗
(
  session: SessionState | undefined,
  name: string,
  options: RuntimeSessionRecordOptions = {},
)

Source from the content-addressed store, hash-verified

8};
9
10function toRuntimeSessionRecord(
11 session: SessionState | undefined,
12 name: string,
13 options: RuntimeSessionRecordOptions = {},
14): CommandSessionRecord | undefined {
15 if (!session) return undefined;
16 return {
17 name,
18 appBundleId: session.appBundleId,
19 appName: session.appName,
20 ...(options.includeSnapshot === true ? { snapshot: session.snapshot } : {}),
21 metadata: {
22 surface: session.surface,
23 ...(options.metadata ?? {}),
24 },
25 };
26}
27
28export function createDaemonRuntimeSessionStore(params: {
29 sessionName: string;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected