Server runtime@cosantoir/elysia9 related surfaces

Elysia belongs to the same runtime contract, but it should still feel native to its own request boundary.

Plugin entry point for Bun-native Elysia services. Choose the server package when handlers, hooks, or fetch semantics are the real request boundary. The page should help you choose this surface deliberately, compare it against its lane neighbors, and keep operator proof in reach while you wire the integration.

lane family

9

Server runtime

package line

1

@cosantoir/elysia

contract vars

3

Shared across wrappers and native SDKs

operator lanes

2

Plus 2 native package families

@cosantoir/elysia@cosantoir/express@cosantoir/hono@cosantoir/fastify@cosantoir/node@cosantoir/cli@cosantoir/mcpCOSANTOIR_GATEWAY_URLCOSANTOIR_API_KEYCOSANTOIR_SITE_IDpip install cosantoircosantoir logincosantoir-mcp@cosantoir/elysia@cosantoir/express@cosantoir/hono@cosantoir/fastify@cosantoir/node@cosantoir/cli@cosantoir/mcpCOSANTOIR_GATEWAY_URLCOSANTOIR_API_KEYCOSANTOIR_SITE_IDpip install cosantoircosantoir logincosantoir-mcp

Surface fit

Choose this surface when the boundary is real, not convenient.

A better docs system tells you why this lane exists, what makes it distinct, and how it hands off to the rest of the platform.

Use this when

Choose the server package when handlers, hooks, or fetch semantics are the real request boundary.

Package line

@cosantoir/elysia

The install and contract line should stay recognizable even when the request lifecycle changes.

First proof

Protect one real route, loader, or handler first, then read the resulting headers and decision state before broadening the rollout.

Install line

Elysia package install

bash
01bun add @cosantoir/elysia @cosantoir/node
Install the surface that actually owns the request path. Do not start with a prettier abstraction and retrofit the boundary later.

Shared contract

Runtime identity

env
01COSANTOIR_GATEWAY_URL=http://localhost:4000
02COSANTOIR_API_KEY=dp_live_example
03COSANTOIR_SITE_ID=site_prod_web
These values should stay stable across framework wrappers, native SDKs, CLI probes, and MCP tools.

Contract discipline

The framework changes. The contract should not.

This is the point where the left rail, page body, and right rail need to agree: the package can change, but the gateway origin, runtime key, site id, and proof loop stay the same.

01

COSANTOIR_GATEWAY_URL

Keep this value aligned across application middleware, direct SDK probes, and operator tooling so the same request path stays explainable.

02

COSANTOIR_API_KEY

Keep this value aligned across application middleware, direct SDK probes, and operator tooling so the same request path stays explainable.

03

COSANTOIR_SITE_ID

Keep this value aligned across application middleware, direct SDK probes, and operator tooling so the same request path stays explainable.

Lane neighbors

Neighbor surfaces

A mature docs system makes adjacent choices visible. If this page is not the right boundary, the best alternative should already be in front of you.

Detailed guide

Elysia page guide

The framework-specific instructions live below, but they now sit inside a stronger system: lane fit above, contract line beside, neighbors nearby.

# Elysia Integration Elysia uses a plugin shape, so the Cosantoir wrapper stays close to the app lifecycle. ## Installation ``bash bun add @cosantoir/elysia @cosantoir/node ` ## Example `ts import { Elysia } from 'elysia'; import { createCosantoir } from '@cosantoir/node'; import { createCosantoirElysiaPlugin } from '@cosantoir/elysia'; const client = createCosantoir({ baseUrl: process.env.COSANTOIR_GATEWAY_URL!, apiKey: process.env.COSANTOIR_API_KEY!, siteId: process.env.COSANTOIR_SITE_ID! }); new Elysia().use(createCosantoirElysiaPlugin({ client })); ``

Last updated Mar 24, 2026