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

Function makeExecutor

apps/local/src/mcp-browser-resume.test.ts:79–105  ·  view source on GitHub ↗
(tmpDir: string)

Source from the content-addressed store, hash-verified

77}));
78
79const makeExecutor = async (tmpDir: string): Promise<Executor> => {
80 const plugins = [approvalPlugin()] as const;
81 const sqlite = await createSqliteFumaDb({
82 tables: collectTables(),
83 namespace: "executor_local_browser_resume_test",
84 path: join(tmpDir, "data.db"),
85 });
86 const executor = await Effect.runPromise(
87 createExecutor({
88 tenant: Tenant.make(`test-${randomBytes(4).toString("hex")}`),
89 subject: Subject.make("local"),
90 db: sqlite.db,
91 plugins,
92 onElicitation: "accept-all",
93 }),
94 );
95
96 const close = executor.close;
97 return {
98 ...executor,
99 close: () =>
100 Effect.gen(function* () {
101 yield* close();
102 yield* Effect.promise(() => sqlite.close());
103 }),
104 };
105};
106
107const makeMcpFetch = (executor: Executor) => {
108 const engine = createExecutionEngine({

Callers 1

Calls 6

createSqliteFumaDbFunction · 0.90
createExecutorFunction · 0.90
collectTablesFunction · 0.85
toStringMethod · 0.80
closeMethod · 0.65
closeFunction · 0.50

Tested by

no test coverage detected