MCPcopy
hub / github.com/callstack/agent-device / recordSnapshotRuntimeAction

Function recordSnapshotRuntimeAction

src/daemon/snapshot-runtime.ts:301–315  ·  view source on GitHub ↗
(params: {
  req: DaemonRequest;
  sessionName: string;
  sessionStore: SessionStore;
  result: SnapshotRuntimeRecord;
})

Source from the content-addressed store, hash-verified

299}
300
301function recordSnapshotRuntimeAction(params: {
302 req: DaemonRequest;
303 sessionName: string;
304 sessionStore: SessionStore;
305 result: SnapshotRuntimeRecord;
306}): void {
307 const session = params.sessionStore.get(params.sessionName);
308 if (!session) return;
309 params.sessionStore.recordAction(session, {
310 command: params.req.command,
311 positionals: params.req.positionals ?? [],
312 flags: params.req.flags ?? {},
313 result: toRecordedSnapshotRuntimeResult(params.result),
314 });
315}
316
317function assertSnapshotSessionRecord(
318 record: CommandSessionRecord,

Callers 1

Calls 3

getMethod · 0.80
recordActionMethod · 0.80

Tested by

no test coverage detected