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

Function createLogBridge

packages/kernel/runtime-quickjs/src/index.ts:295–301  ·  view source on GitHub ↗
(context: QuickJSContext, logs: string[])

Source from the content-addressed store, hash-verified

293});
294
295const createLogBridge = (context: QuickJSContext, logs: string[]): QuickJSHandle =>
296 context.newFunction("__executor_log", (levelHandle, lineHandle) => {
297 const level = context.getString(levelHandle);
298 const line = context.getString(lineHandle);
299 logs.push(`[${level}] ${line}`);
300 return context.undefined;
301 });
302
303type RunPromise = <A, E>(effect: Effect.Effect<A, E>) => Promise<A>;
304

Callers 1

evaluateInQuickJsFunction · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected