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

Function createLogBridge

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

Source from the content-addressed store, hash-verified

238});
239
240const createLogBridge = (context: QuickJSContext, logs: string[]): QuickJSHandle =>
241 context.newFunction("__executor_log", (levelHandle, lineHandle) => {
242 const level = context.getString(levelHandle);
243 const line = context.getString(lineHandle);
244 logs.push(`[${level}] ${line}`);
245 return context.undefined;
246 });
247
248type RunPromise = <A, E>(effect: Effect.Effect<A, E>) => Promise<A>;
249

Callers 1

evaluateInQuickJsFunction · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected