- packages/core/api: HttpApi contract with ToolsApi + SecretsApi groups SDK tagged errors pass through directly with status annotations (ToolNotFoundError→404, PolicyDeniedError→403, etc.) - apps/server: API handler implementation via HttpApiBuilder Exports createApiHandler() for reuse (no baked-in server runtime) Handlers are pure pass-through — no manual error catching - apps/web: Vite + React frontend served on same port as API Vite plugin forwards /v1/*, /docs, /openapi.json to Effect handler effect-atom integration: AtomHttpApi.Tag typed client, query/mutation atoms RegistryProvider + useAtomValue with Result pattern matching - Catalog pins @effect/platform, platform-bun, platform-node, cluster - All 9 packages typecheck clean
Showing the changes to packages/core/api/src/api.ts (1 of 26 files). Show all
Unified · Split
| @@ -0,0 +1,14 @@ | |||
| 1 | import { HttpApi, OpenApi } from "@effect/platform"; | ||
| 2 | |||
| 3 | import { ToolsApi } from "./tools/api"; | ||
| 4 | import { SecretsApi } from "./secrets/api"; | ||
| 5 | |||
| 6 | export const ExecutorApi = HttpApi.make("executor") | ||
| 7 | .add(ToolsApi) | ||
| 8 | .add(SecretsApi) | ||
| 9 | .annotateContext( | ||
| 10 | OpenApi.annotations({ | ||
| 11 | title: "Executor API", | ||
| 12 | description: "Tool execution platform API", | ||
| 13 | }), | ||
| 14 | ); | ||