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

Function applyShellRunUpdateToTranscript

packages/cli/src/pi-transcript.ts:301–310  ·  view source on GitHub ↗
(
  state: MakaPiTranscriptState,
  sourceToolCallId: string,
  update: Extract<ToolResultContent, { kind: 'shell_run' }>,
)

Source from the content-addressed store, hash-verified

299}
300
301export function applyShellRunUpdateToTranscript(
302 state: MakaPiTranscriptState,
303 sourceToolCallId: string,
304 update: Extract<ToolResultContent, { kind: 'shell_run' }>,
305): boolean {
306 const tool = findToolEntry(state, sourceToolCallId);
307 if (!tool || tool.toolName !== 'Bash') return false;
308 if (tool.result?.kind === 'shell_run' && tool.result.ref !== update.ref) return false;
309 return applyShellRunResult(tool, update);
310}
311
312export function replaceTranscriptWithStoredMessages(
313 state: MakaPiTranscriptState,

Calls 2

findToolEntryFunction · 0.85
applyShellRunResultFunction · 0.85

Tested by

no test coverage detected