MCPcopy Create free account
hub / github.com/Noumena-Network/code / interpretCommandResult

Function interpretCommandResult

src/tools/PowerShellTool/commandSemantics.ts:130–142  ·  view source on GitHub ↗
(
  command: string,
  exitCode: number,
  stdout: string,
  stderr: string,
)

Source from the content-addressed store, hash-verified

128 * Interpret command result based on semantic rules
129 */
130export function interpretCommandResult(
131 command: string,
132 exitCode: number,
133 stdout: string,
134 stderr: string,
135): {
136 isError: boolean
137 message?: string
138} {
139 const baseCommand = heuristicallyExtractBaseCommand(command)
140 const semantic = COMMAND_SEMANTICS.get(baseCommand) ?? DEFAULT_SEMANTIC
141 return semantic(exitCode, stdout, stderr)
142}

Callers 1

callFunction · 0.70

Calls 2

getMethod · 0.45

Tested by

no test coverage detected