MCPcopy Create free account
hub / github.com/apache/maka / mergeShellRunStateWithDiagnostics

Function mergeShellRunStateWithDiagnostics

packages/core/src/shell-run-result.ts:364–381  ·  view source on GitHub ↗
(
  current: ShellRunToolResult | undefined,
  candidate: ShellRunToolResult,
  context: string,
  report: ShellRunMergeDiagnosticReporter = reportShellRunMergeDiagnostic,
)

Source from the content-addressed store, hash-verified

362 report?: ShellRunMergeDiagnosticReporter,
363): ShellRunStateMerge;
364export function mergeShellRunStateWithDiagnostics(
365 current: ShellRunToolResult | undefined,
366 candidate: ShellRunToolResult,
367 context: string,
368 report: ShellRunMergeDiagnosticReporter = reportShellRunMergeDiagnostic,
369): ShellRunStateMerge {
370 const merged = mergeShellRunState(current, candidate);
371 if (merged.invariantViolation) {
372 report({
373 context,
374 violation: merged.invariantViolation,
375 ...(current ? { currentRef: current.ref, currentRevision: current.revision } : {}),
376 candidateRef: candidate.ref,
377 candidateRevision: candidate.revision,
378 });
379 }
380 return merged;
381}
382
383export function mergeShellRunUpdate(
384 current: ShellRunUpdate | undefined,

Callers 7

applyShellRunResultFunction · 0.90
mergeLiveOverPersistedFunction · 0.90
foldShellRunUpdatesFunction · 0.90
mergeShellRunUpdateFunction · 0.85

Calls 2

mergeShellRunStateFunction · 0.85
reportFunction · 0.50

Tested by

no test coverage detected