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

Function shellRunContent

packages/runtime/src/shell-run-tool-result.ts:56–67  ·  view source on GitHub ↗
(
  record: ShellRunRecord,
  operation?: ShellRunOperation,
)

Source from the content-addressed store, hash-verified

54}
55
56export function shellRunContent(
57 record: ShellRunRecord,
58 operation?: ShellRunOperation,
59): ShellRunToolResult {
60 const state = shellRunSnapshotContent(record);
61 if (!operation) return state;
62 if (operation.kind === 'stop') return { ...state, operation };
63 if (state.mode !== 'pty') {
64 throw new Error('PTY control operation requires PTY ShellRun state');
65 }
66 return { ...state, operation };
67}
68
69export function compactShellRunContent(record: ShellRunRecord): ShellRunToolResult {
70 return shellRunStateContent(record);

Callers 7

runBackgroundBashMethod · 0.85
writeStdinMethod · 0.85
stopBackgroundTaskMethod · 0.85
resourceDetailMethod · 0.85
writeStdinWithoutLiveMethod · 0.85
stopWithoutLiveMethod · 0.85

Calls 1

shellRunSnapshotContentFunction · 0.85

Tested by

no test coverage detected