Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

AcpRegistryCatalog.ts

22 lines839 Bytes

1import * as Effect from "effect/Effect";
2import * as Layer from "effect/Layer";
3import * as Path from "effect/Path";
4​
5import * as ServerConfig from "../config.ts";
6import * as AcpRegistrySupport from "./acp/AcpRegistrySupport.ts";
7import * as AcpRegistryRuntimeCoordinator from "./acp/AcpRegistryRuntimeCoordinator.ts";
8​
9/** Server-lifetime ACP Registry catalog shared by setup, snapshots, and turn launch. */
10export const layer = Layer.merge(
11 Layer.unwrap(
12 Effect.gen(function* () {
13 const config = yield* ServerConfig.ServerConfig;
14 const path = yield* Path.Path;
15 return AcpRegistrySupport.AcpRegistryCatalog.layer({
16 cacheDir: config.providerStatusCacheDir,
17 toolsDir: path.join(config.baseDir, "tools"),
18 });
19 }),
20 ),
21 AcpRegistryRuntimeCoordinator.AcpRegistryRuntimeCoordinator.layer,
22);