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

Function readResultState

packages/kernel/runtime-quickjs/src/index.ts:217–228  ·  view source on GitHub ↗
(
  context: QuickJSContext,
  handle: QuickJSHandle,
)

Source from the content-addressed store, hash-verified

215};
216
217const readResultState = (
218 context: QuickJSContext,
219 handle: QuickJSHandle,
220): {
221 settled: boolean;
222 value: unknown;
223 error: unknown;
224} => ({
225 settled: readPropDump(context, handle, "settled") === true,
226 value: readPropDump(context, handle, "v"),
227 error: readPropDump(context, handle, "e"),
228});
229
230const createLogBridge = (context: QuickJSContext, logs: string[]): QuickJSHandle =>
231 context.newFunction("__executor_log", (levelHandle, lineHandle) => {

Callers 1

evaluateInQuickJsFunction · 0.85

Calls 1

readPropDumpFunction · 0.85

Tested by

no test coverage detected