MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / cli

Function cli

graph-ui/tools/smoke-w6-full.mjs:226–233  ·  view source on GitHub ↗

Ein Werkzeug ueber die CLI, mit dem HOME dieses Laufs. Wortgleich mit W4b.

(tool, payload, home)

Source from the content-addressed store, hash-verified

224
225/** Ein Werkzeug ueber die CLI, mit dem HOME dieses Laufs. Wortgleich mit W4b. */
226async function cli(tool, payload, home) {
227 const result = await run(BINARY, ['cli', tool], { env: { HOME: home }, stdin: `${JSON.stringify(payload)}\n` });
228 const line = result.out.split('\n').map((entry) => entry.trim()).filter(Boolean).pop();
229 if (result.code !== 0 || line === undefined) {
230 throw new Error(`cli ${tool} endete mit ${result.code}: ${result.err.trim().slice(-400)}`);
231 }
232 return JSON.parse(line);
233}
234
235/** Der Percentil-Wert einer Messreihe, nach der Nearest-Rank-Methode. */
236function percentile(values, p) {

Callers 1

mainFunction · 0.70

Calls 1

runFunction · 0.70

Tested by

no test coverage detected