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

Function localFixedExecutionLayer

apps/local/src/app.ts:56–74  ·  view source on GitHub ↗
(executor: LocalExecutor)

Source from the content-addressed store, hash-verified

54 * execution model.
55 */
56const localFixedExecutionLayer = (executor: LocalExecutor): Layer.Layer<FixedExecutionProvider> =>
57 Layer.succeed(FixedExecutionProvider)({
58 executor,
59 // This engine serves the HTTP executions API (`executor call`/`resume`,
60 // the web console) — the wrap binds the "api" plane structurally.
61 engine: withExecutionAnalytics(
62 createExecutionEngine({
63 executor,
64 codeExecutor: makeQuickJsExecutor(),
65 }),
66 localAnalytics,
67 { plane: "api", toolkit: false },
68 ),
69 // The executor IS its own plugin-extension map (`executor[pluginId]`); the
70 // fixed middleware reads `executor[id]` to satisfy each plugin's
71 // `*ExtensionService` Tag per request — identical binding to the prior
72 // `composePluginHandlers(plugins, executor)` boot-bind.
73 extensions: executor,
74 });
75
76export interface LocalApiHandler {
77 /** The unified web handler: serves the typed API (at root — the Bun shell strips `/api`) + /docs. */

Callers 1

makeLocalApiHandlerFunction · 0.85

Calls 3

withExecutionAnalyticsFunction · 0.90
createExecutionEngineFunction · 0.90
makeQuickJsExecutorFunction · 0.90

Tested by

no test coverage detected