MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / annotateExecuteOutcome

Function annotateExecuteOutcome

packages/core/execution/src/engine.ts:91–99  ·  view source on GitHub ↗
(result: ExecuteResult)

Source from the content-addressed store, hash-verified

89 * or result content itself.
90 */
91const annotateExecuteOutcome = (result: ExecuteResult) =>
92 Effect.annotateCurrentSpan({
93 "mcp.execute.result_chars": measureResultChars(result.result),
94 "mcp.execute.log_chars": result.logs?.reduce((total, line) => total + line.length, 0) ?? 0,
95 "mcp.execute.emitted": result.output?.length ?? 0,
96 ...(result.error
97 ? { "mcp.execute.outcome": "fail", "mcp.execute.error_kind": result.errorKind ?? "unknown" }
98 : { "mcp.execute.outcome": "ok" }),
99 });
100
101const annotateExecutionOutcome = (execution: ExecutionResult) =>
102 execution.status === "paused"

Callers 2

annotateExecutionOutcomeFunction · 0.85
createExecutionEngineFunction · 0.85

Calls 1

measureResultCharsFunction · 0.85

Tested by

no test coverage detected