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

Function recordActionEntry

src/daemon/session-action-recorder.ts:15–39  ·  view source on GitHub ↗
(session: SessionState, entry: RecordActionEntry)

Source from the content-addressed store, hash-verified

13};
14
15export function recordActionEntry(session: SessionState, entry: RecordActionEntry): void {
16 if (entry.flags?.noRecord) return;
17 if (entry.flags?.saveScript) {
18 session.recordSession = true;
19 if (typeof entry.flags.saveScript === 'string') {
20 session.saveScriptPath = expandSessionPath(entry.flags.saveScript);
21 }
22 }
23 session.actions.push({
24 ts: Date.now(),
25 command: entry.command,
26 positionals: entry.positionals,
27 runtime: entry.runtime,
28 flags: sanitizeFlags(entry.flags),
29 result: entry.result,
30 });
31 emitDiagnostic({
32 level: 'debug',
33 phase: 'record_action',
34 data: {
35 command: entry.command,
36 session: session.name,
37 },
38 });
39}
40
41const SANITIZED_FLAG_KEYS = [
42 'platform',

Callers 1

recordActionMethod · 0.90

Calls 4

expandSessionPathFunction · 0.90
emitDiagnosticFunction · 0.90
sanitizeFlagsFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected