

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# HttpApi Route Patterns23Use `HttpApiBuilder.group(...)` for normal HTTP endpoints, including streaming HTTP responses such as server-sent events. Handlers should yield stable services once while building the handler layer, then close over those services in endpoint implementations.45```ts6export const sessionHandlers = HttpApiBuilder.group(InstanceHttpApi, "session", (handlers) =>7 Effect.gen(function* () {8 const session = yield* Session.Service910 return handlers.handle("list", () => session.list())11 }),12)13```1415For SSE endpoints, stay in `HttpApiBuilder.group(...)` and return `HttpServerResponse.stream(...)` from the handler. Annotate the endpoint success schema with `HttpApiSchema.asText({ contentType: "text/event-stream" })` so OpenAPI documents the stream content type.1617Use `HttpApiBuilder.group(...)` with `handleRaw(...)` for declared endpoints that need the raw request or response, including WebSocket upgrade routes. This keeps endpoint middleware, routing context, and OpenAPI metadata on one typed route tree.1819```ts20export const ptyConnectHandlers = HttpApiBuilder.group(PtyConnectApi, "pty-connect", (handlers) =>21 Effect.gen(function* () {22 const pty = yield* Pty.Service2324 return handlers.handleRaw("connect", (ctx) => connectPty(ctx.request, pty))25 }),26)27```2829Use raw `HttpRouter.use(...)` only for routes outside the declared API surface, such as a catch-all UI fallback.3031Avoid `Effect.provide(SomeLayer)` inside request handlers or raw route callbacks. Stable layers should be provided once at the application/layer boundary, not rebuilt or scoped per request.3233Avoid `HttpRouter.provideRequest(...)` unless the dependency is intentionally request-level. Prefer `HttpRouter.use(...)` for stable app services.3435Use `Effect.provideService(...)` in middleware only for request-derived context, such as `WorkspaceRouteContext`, `InstanceRef`, or `WorkspaceRef`. Do not use it to smuggle stable services through request effects when they can be yielded at layer construction.3637Public JSON errors should be explicit `Schema.ErrorClass` contracts declared on each endpoint. Use built-in `HttpApiError.*` classes only when their empty/tagged body is the intended wire shape; for SDK-visible errors with messages, define an API error schema such as `ApiNotFoundError` and fail with that exact declared error. Keep domain and storage services free of HttpApi types, and translate expected domain errors at the handler boundary.3839When adding middleware, declare endpoint-contract middleware on the owning `HttpApiGroup` and provide its implementation layer at the assembly boundary in `server.ts`. Keep router middleware for truly raw fallback routes or global transport policy.40
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| anomalyco/opencodeAGENTS.md · 195k | AGENTS.md | testlint-formatstyletypes+3 | 80/100 | 13 days ago | |
| anomalyco/opencodepackages/app/AGENTS.md · 195k | AGENTS.md | style | 60/100 | 7 days ago | |
| anomalyco/opencodepackages/app/e2e/AGENTS.md · 195k | AGENTS.md | teststyledo-not | 54/100 | 8 days ago | |
| anomalyco/opencodepackages/app/e2e/performance/AGENTS.md · 195k | AGENTS.md | no sections | 16/100 | 13 days ago | |
| anomalyco/opencodepackages/codemode/AGENTS.md · 195k | AGENTS.md | api | 43/100 | 13 days ago | |
| anomalyco/opencodepackages/core/src/tool/AGENTS.md · 195k | AGENTS.md | stylesecurity | 58/100 | 13 days ago | |
| anomalyco/opencodepackages/desktop/AGENTS.md · 195k | AGENTS.md | style | 34/100 | 7 days ago | |
| anomalyco/opencodepackages/effect-drizzle-sqlite/AGENTS.md · 195k | AGENTS.md | database | 38/100 | 13 days ago | |
| anomalyco/opencodepackages/llm/AGENTS.md · 195k | AGENTS.md | stylearchtesting-strategygit+1 | 57/100 | 13 days ago | |
| anomalyco/opencodepackages/opencode/test/AGENTS.md · 195k | AGENTS.md | teststylearchtesting-strategy+1 | 81/100 | 13 days ago | |
| anomalyco/opencodepackages/opencode/test/server/AGENTS.md · 195k | AGENTS.md | teststyleapi | 38/100 | 13 days ago | |
| anomalyco/opencodepackages/schema/AGENTS.md · 195k | AGENTS.md | styletypesdatabaseapi+1 | 65/100 | 13 days ago | |
| anomalyco/opencodepackages/session-ui/AGENTS.md · 195k | AGENTS.md | no sections | 30/100 | 10 days ago | |
| anomalyco/opencodepackages/ui/AGENTS.md · 195k | AGENTS.md | style | 34/100 | 7 days ago | |
| anomalyco/opencodepackages/opencode/AGENTS.md · 195k | AGENTS.md | styledatabaseapido-not | 81/100 | 13 days ago | |
| anomalyco/opencodepackages/opencode/src/session/llm/AGENTS.md · 195k | AGENTS.md | arch | 61/100 | 13 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 200k | AGENTS.md | buildteststylearch+3 | 100/100 | 13 days ago | |
| aaif-goose/gooseAGENTS.md · 53k | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 7 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 13 days ago | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | 13 days ago | |
| elastic/elasticsearchx-pack/plugin/inference/AGENTS.md · 78k | AGENTS.md | buildtestlint-formatstyle+3 | 100/100 | 13 days ago | |
| bagisto/bagistoAGENTS.md · 28k | AGENTS.md | setupbuildteststyle+7 | 100/100 | 6 days ago | |
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 67k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 12 days ago | |
| trick77/agents-md-syncAGENTS.md · 2 | AGENTS.md | setupbuildteststyle+5 | 100/100 | 13 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/anomalyco-opencode-packages-opencode-src-server-routes-instance-httpapi-agents)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.
Directory