(tmpDir: string)
| 77 | })); |
| 78 | |
| 79 | const 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 | |
| 107 | const makeMcpFetch = (executor: Executor) => { |
| 108 | const engine = createExecutionEngine({ |
no test coverage detected