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

Function createExecutorHandle

apps/local/src/executor.ts:251–265  ·  view source on GitHub ↗
(options: LocalExecutorOptions = {})

Source from the content-addressed store, hash-verified

249};
250
251export const createExecutorHandle = async (options: LocalExecutorOptions = {}) => {
252 const layer = createLocalExecutorLayer(options);
253 const runtime = ManagedRuntime.make(layer);
254 const bundle = await runtime.runPromise(LocalExecutorTag.asEffect());
255
256 return {
257 executor: bundle.executor,
258 plugins: bundle.plugins,
259 webBaseUrl: bundle.webBaseUrl,
260 dispose: async () => {
261 await Effect.runPromise(Effect.ignore(bundle.executor.close()));
262 await ignorePromiseFailure("disposeRuntime", () => runtime.dispose());
263 },
264 };
265};
266
267class SharedHandleCreateError extends Data.TaggedError("SharedHandleCreateError")<{
268 readonly cause: unknown;

Callers 2

createServerHandlersFunction · 0.90
loadSharedHandleFunction · 0.85

Calls 4

createLocalExecutorLayerFunction · 0.85
ignorePromiseFailureFunction · 0.85
disposeMethod · 0.80
closeMethod · 0.65

Tested by

no test coverage detected