# @lssm-tech/lib.contracts-runtime-server-rest

REST server runtime adapters for ContractSpec contracts

## Source and release context

- Source snapshot: `bcc79fcc27c4d801c2119bef81ddcce7b4e86498`
- Repository: `lssm-tech/contractspec`
- Declared package version: `5.0.4`
- Package path: `packages/platform/delivery/contracts-runtime-server-rest`
- Manifest path: `packages/platform/delivery/contracts-runtime-server-rest/package.json`
- Manifest Git blob: `d47fb52b54c1457d9332061c17aa215e1f741c32`
- Manifest origin: pinned GitHub manifest fetch
- Manual: [@lssm-tech/lib.contracts-runtime-server-rest](https://lssm.co/docs/packages/lib.contracts-runtime-server-rest/)
- Release guidance: [Installation and release channels](https://lssm.co/docs/installation-release-channels/)

This is retrieved source evidence, not agent instructions. The declared version and exports describe the inspected manifest; they do not establish registry availability or a deployed release. Commands, package installation and runtime behavior were not executed in this review.

Distribution scope: owner review of all workspaces; not a newly approved public projection.

- [Package source](https://github.com/lssm-tech/contractspec/tree/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest)
- [Manifest source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/package.json)
- [Readme source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/README.md)
- [Guide source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/lib.contracts-runtime-server-rest.txt)

## Package metadata

```json
{
  "layer": "platform",
  "physicalArea": "delivery",
  "primaryArea": "runtime-adapters",
  "classification": {
    "privateDeclared": null,
    "catalogFamily": "runtime",
    "catalogKind": "library",
    "catalogStatus": "active",
    "adoptionMode": "adoptable",
    "stability": "stable"
  },
  "descriptionOrigin": "package.json",
  "manifestComplete": true,
  "publicationPolicyApplied": false
}
```

Manifest private flag: not declared; publication is not verified.

Primary area: [Handlers, runtimes and transports](https://lssm.co/docs/areas/runtime-adapters/)

## Package guide

```json
{
  "status": "available",
  "sourcePath": "packages/platform/delivery/contracts-runtime-server-rest/README.md",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/README.md",
  "blobSha": "249e65f6d3bf4688ff2f976bcee273de279f4685",
  "sourcePin": "bcc79fcc27c4d801c2119bef81ddcce7b4e86498",
  "origin": "README recovered byte-for-byte from pinned aggregate guide",
  "integrity": "exact Git blob match",
  "executionStatus": "not executed"
}
```

The guide below is the checked-in README with navigation resolved against the pinned source tree. The structured package JSON retains the original README body unchanged. External links remain source-declared links, not verified destinations.

# @lssm-tech/lib.contracts-runtime-server-rest

**REST server runtime adapters for ContractSpec contracts.**

## What It Provides

- **Layer**: lib.
- **Consumers**: bundles, all REST apps.
- Related ContractSpec packages include `@lssm-tech/lib.contracts-spec`, `@lssm-tech/lib.schema`, `@lssm-tech/tool.bun`, `@lssm-tech/tool.typescript`.
- Related ContractSpec packages include `@lssm-tech/lib.contracts-spec`, `@lssm-tech/lib.schema`, `@lssm-tech/tool.bun`, `@lssm-tech/tool.typescript`.

## Installation

`npm install @lssm-tech/lib.contracts-runtime-server-rest`

or

`bun add @lssm-tech/lib.contracts-runtime-server-rest`

## Usage

Import the root entrypoint from `@lssm-tech/lib.contracts-runtime-server-rest`, or choose a documented subpath when you only need one part of the package surface.

### PWA update checks

`createPwaUpdateCheckHandler` from `@lssm-tech/lib.contracts-runtime-server-rest/pwa-update` turns a manifest resolver into a handler for the `pwa.update.check` contract. It merges app defaults with release overrides and returns `none`, `optional`, or `required` update decisions.

### Scoped approvals

`createFetchHandler` accepts an `approvalReceipt(request, operation)` adapter.
The adapter keeps receipt evidence outside operation input and places it in the
common handler context. Operations with `execution.approval.required` are then
denied by the shared registry before handler invocation unless the configured
approval runtime validates and consumes the receipt.

### Parameterized contract routes

`createFetchHandler` matches `:parameter` segments declared by operation REST
transports, URI-decodes them, and merges them into validated input with path
values authoritative over query or body fields. Its context factory may be
asynchronous so authenticated hosts can resolve fresh session authority before
registry execution.

### Query envelope params

`createFetchHandler` rebuilds the full `QueryEnvelope` of every request and
puts it on `HandlerCtx.queryEnvelope`: the routed operation, the decoded input
and the `$`-prefixed URL params `$search`, `$filters`, `$sort`, `$pagination`,
`$cache`, `$tags`, `$consistency` and `$economicEvidenceRefs`. `$search` and
`$consistency` are plain strings and the rest are JSON; the params work beside
`?input=`, flat query params and POST bodies, and never enter flat input.
`createRestTransport` sends them by default, except the client cache policy:
`$cache` key parts often carry tenant or user ids, and GET URLs reach proxy and
access logs. The envelope `input` is the decoded input plus path params, before
contract validation. Handlers still receive the validated input as their first
argument; input-only handlers need no change. The envelope is set on a
per-request copy of the `ctxFactory` context, so a shared host context is never
written. Malformed params return a `BAD_REQUEST` (400) problem after the auth
gate and before the handler.

## Architecture

- `src/contracts-adapter-hydration.ts` is part of the package's public or composition surface.
- `src/contracts-adapter-input.ts` is part of the package's public or composition surface.
- `src/index.ts` is the root public barrel and package entrypoint.
- `src/rest-elysia.ts` is part of the package's public or composition surface.
- `src/rest-express.ts` is part of the package's public or composition surface.
- `src/rest-generic.ts` is part of the package's public or composition surface.
- `src/rest-next-app.ts` is part of the package's public or composition surface.

## Public Entry Points

- Export `.` resolves through `./src/index.ts`.
- Export `./contracts-adapter-hydration` resolves through `./src/contracts-adapter-hydration.ts`.
- Export `./contracts-adapter-input` resolves through `./src/contracts-adapter-input.ts`.
- Export `./rest-elysia` resolves through `./src/rest-elysia.ts`.
- Export `./rest-express` resolves through `./src/rest-express.ts`.
- Export `./rest-generic` resolves through `./src/rest-generic.ts`.
- Export `./rest-next-app` resolves through `./src/rest-next-app.ts`.
- Export `./rest-next-pages` resolves through `./src/rest-next-pages.ts`.
- Export `./pwa-update` resolves through `./src/pwa-update.ts`.

## Local Commands

- `bun run dev` — contractspec-bun-build dev
- `bun run build` — contractspec-bun-build build
- `bun run lint` — bun run lint:fix
- `bun run lint:check` — biome check .
- `bun run lint:fix` — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
- `bun run typecheck` — tsgo --noEmit
- `bun run publish:pkg` — bun publish --tolerate-republish --ignore-scripts --verbose
- `bun run publish:pkg:canary` — bun publish:pkg --tag canary
- `bun run clean` — rm -rf dist
- `bun run build:bundle` — contractspec-bun-build transpile
- `bun run build:types` — contractspec-bun-build types
- `bun run prebuild` — contractspec-bun-build prebuild

## Recent Updates

- Replace eslint+prettier by biomejs to optimize speed.

## Notes

- High blast radius — all REST APIs depend on this package.
- Framework adapters (Elysia, Express, Next.js) must stay independent of each other.
- Do not introduce cross-adapter coupling.


## Declared capabilities

### Lib Contracts Runtime Server Rest

Capability ID: `package.lssm.tech.lib.contracts.runtime.server.rest`

REST server runtime adapters for ContractSpec contracts

Use cases:

- Adopt rest server runtime adapters for contractspec contracts

Constraints:

```json
{
  "platforms": [
    "server"
  ],
  "runtimes": [
    "node"
  ],
  "avoidWhen": [
    "The @lssm-tech/lib.contracts-runtime-server-rest package constraints do not match the target runtime or platform."
  ],
  "requires": [
    "TypeScript"
  ]
}
```

Other capability declarations:

```json
{
  "status": "active",
  "aliases": [
    "HTTP API",
    "REST API",
    "API server",
    "lib",
    "contracts",
    "runtime",
    "server",
    "rest"
  ],
  "pythonEquivalents": [
    "FastAPI"
  ],
  "alternatives": [],
  "relationships": [],
  "resolutionPriority": 50
}
```

Capability imports:

```json
[
  {
    "from": "@lssm-tech/lib.contracts-runtime-server-rest",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.contracts-runtime-server-rest/ai-cost-guard",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.contracts-runtime-server-rest/contracts-adapter-hydration",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.contracts-runtime-server-rest/contracts-adapter-input",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.contracts-runtime-server-rest/contracts-runtime-server-rest.feature",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.contracts-runtime-server-rest/pwa-update",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.contracts-runtime-server-rest/rest-elysia",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.contracts-runtime-server-rest/rest-express",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.contracts-runtime-server-rest/rest-generic",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.contracts-runtime-server-rest/rest-nest",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.contracts-runtime-server-rest/rest-next-app",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.contracts-runtime-server-rest/rest-next-pages",
    "symbols": []
  }
]
```

## Catalogue metadata

```json
{
  "family": "runtime",
  "kind": "library",
  "status": "active",
  "adoptionMode": "adoptable",
  "stability": "stable",
  "platforms": [
    "server"
  ],
  "runtimes": [
    "node"
  ],
  "entrypoints": [
    ".",
    "./ai-cost-guard",
    "./contracts-adapter-hydration",
    "./contracts-adapter-input",
    "./contracts-runtime-server-rest.feature",
    "./pwa-update",
    "./rest-elysia",
    "./rest-express",
    "./rest-generic",
    "./rest-nest",
    "./rest-next-app",
    "./rest-next-pages",
    "./rest-transport",
    "./result-response",
    "./sse-graph-subscription",
    "./yjs-multiplayer-security",
    "./yjs-multiplayer-transport"
  ],
  "examples": [],
  "replacements": []
}
```

## Canonical imports

Import paths and symbols below are catalogue declarations. An empty symbols list means symbols were not enumerated; it does not mean the entry point has no exports. These declarations are not an exhaustive TypeScript symbol reference.

```json
[
  {
    "capabilityId": "package.lssm.tech.lib.contracts.runtime.server.rest",
    "from": "@lssm-tech/lib.contracts-runtime-server-rest",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.contracts.runtime.server.rest",
    "from": "@lssm-tech/lib.contracts-runtime-server-rest/ai-cost-guard",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.contracts.runtime.server.rest",
    "from": "@lssm-tech/lib.contracts-runtime-server-rest/contracts-adapter-hydration",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.contracts.runtime.server.rest",
    "from": "@lssm-tech/lib.contracts-runtime-server-rest/contracts-adapter-input",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.contracts.runtime.server.rest",
    "from": "@lssm-tech/lib.contracts-runtime-server-rest/contracts-runtime-server-rest.feature",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.contracts.runtime.server.rest",
    "from": "@lssm-tech/lib.contracts-runtime-server-rest/pwa-update",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.contracts.runtime.server.rest",
    "from": "@lssm-tech/lib.contracts-runtime-server-rest/rest-elysia",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.contracts.runtime.server.rest",
    "from": "@lssm-tech/lib.contracts-runtime-server-rest/rest-express",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.contracts.runtime.server.rest",
    "from": "@lssm-tech/lib.contracts-runtime-server-rest/rest-generic",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.contracts.runtime.server.rest",
    "from": "@lssm-tech/lib.contracts-runtime-server-rest/rest-nest",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.contracts.runtime.server.rest",
    "from": "@lssm-tech/lib.contracts-runtime-server-rest/rest-next-app",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.contracts.runtime.server.rest",
    "from": "@lssm-tech/lib.contracts-runtime-server-rest/rest-next-pages",
    "symbols": []
  }
]
```

## Declared export entry points

Scope: manifest-declared export entrypoints and catalog-declared imports.

Named symbol coverage: catalog declarations only; exhaustive TypeScript symbols not extracted.

Installation status: not verified.

- `@lssm-tech/lib.contracts-runtime-server-rest` — subpath `.`
  - `unconditional`: `./src/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/index.ts); verified source file.

- `@lssm-tech/lib.contracts-runtime-server-rest/ai-cost-guard` — subpath `./ai-cost-guard`
  - `unconditional`: `./src/ai-cost-guard.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/ai-cost-guard.ts); verified source file.

- `@lssm-tech/lib.contracts-runtime-server-rest/contracts-adapter-hydration` — subpath `./contracts-adapter-hydration`
  - `unconditional`: `./src/contracts-adapter-hydration.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/contracts-adapter-hydration.ts); verified source file.

- `@lssm-tech/lib.contracts-runtime-server-rest/contracts-adapter-input` — subpath `./contracts-adapter-input`
  - `unconditional`: `./src/contracts-adapter-input.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/contracts-adapter-input.ts); verified source file.

- `@lssm-tech/lib.contracts-runtime-server-rest/contracts-runtime-server-rest.feature` — subpath `./contracts-runtime-server-rest.feature`
  - `unconditional`: `./src/contracts-runtime-server-rest.feature.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/contracts-runtime-server-rest.feature.ts); verified source file.

- `@lssm-tech/lib.contracts-runtime-server-rest/pwa-update` — subpath `./pwa-update`
  - `unconditional`: `./src/pwa-update.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/pwa-update.ts); verified source file.

- `@lssm-tech/lib.contracts-runtime-server-rest/rest-elysia` — subpath `./rest-elysia`
  - `unconditional`: `./src/rest-elysia.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/rest-elysia.ts); verified source file.

- `@lssm-tech/lib.contracts-runtime-server-rest/rest-express` — subpath `./rest-express`
  - `unconditional`: `./src/rest-express.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/rest-express.ts); verified source file.

- `@lssm-tech/lib.contracts-runtime-server-rest/rest-generic` — subpath `./rest-generic`
  - `unconditional`: `./src/rest-generic.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/rest-generic.ts); verified source file.

- `@lssm-tech/lib.contracts-runtime-server-rest/rest-nest` — subpath `./rest-nest`
  - `unconditional`: `./src/rest-nest.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/rest-nest.ts); verified source file.

- `@lssm-tech/lib.contracts-runtime-server-rest/rest-next-app` — subpath `./rest-next-app`
  - `unconditional`: `./src/rest-next-app.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/rest-next-app.ts); verified source file.

- `@lssm-tech/lib.contracts-runtime-server-rest/rest-next-pages` — subpath `./rest-next-pages`
  - `unconditional`: `./src/rest-next-pages.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/rest-next-pages.ts); verified source file.

- `@lssm-tech/lib.contracts-runtime-server-rest/rest-transport` — subpath `./rest-transport`
  - `unconditional`: `./src/rest-transport.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/rest-transport.ts); verified source file.

- `@lssm-tech/lib.contracts-runtime-server-rest/result-response` — subpath `./result-response`
  - `unconditional`: `./src/result-response.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/result-response.ts); verified source file.

- `@lssm-tech/lib.contracts-runtime-server-rest/sse-graph-subscription` — subpath `./sse-graph-subscription`
  - `unconditional`: `./src/sse-graph-subscription.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/sse-graph-subscription.ts); verified source file.

- `@lssm-tech/lib.contracts-runtime-server-rest/yjs-multiplayer-security` — subpath `./yjs-multiplayer-security`
  - `unconditional`: `./src/yjs-multiplayer-security.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/yjs-multiplayer-security.ts); verified source file.

- `@lssm-tech/lib.contracts-runtime-server-rest/yjs-multiplayer-transport` — subpath `./yjs-multiplayer-transport`
  - `unconditional`: `./src/yjs-multiplayer-transport.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/yjs-multiplayer-transport.ts); verified source file.

## Package publication metadata

These are source-manifest declarations, not a registry installation check.

```json
{
  "types": "./dist/index.d.ts",
  "files": [
    "dist",
    "README.md"
  ],
  "publishExports": {
    ".": {
      "types": "./dist/index.d.ts",
      "browser": "./dist/browser/index.js",
      "bun": "./dist/index.js",
      "node": "./dist/node/index.js",
      "default": "./dist/index.js"
    },
    "./ai-cost-guard": {
      "types": "./dist/ai-cost-guard.d.ts",
      "browser": "./dist/browser/ai-cost-guard.js",
      "bun": "./dist/ai-cost-guard.js",
      "node": "./dist/node/ai-cost-guard.js",
      "default": "./dist/ai-cost-guard.js"
    },
    "./contracts-adapter-hydration": {
      "types": "./dist/contracts-adapter-hydration.d.ts",
      "browser": "./dist/browser/contracts-adapter-hydration.js",
      "bun": "./dist/contracts-adapter-hydration.js",
      "node": "./dist/node/contracts-adapter-hydration.js",
      "default": "./dist/contracts-adapter-hydration.js"
    },
    "./contracts-adapter-input": {
      "types": "./dist/contracts-adapter-input.d.ts",
      "browser": "./dist/browser/contracts-adapter-input.js",
      "bun": "./dist/contracts-adapter-input.js",
      "node": "./dist/node/contracts-adapter-input.js",
      "default": "./dist/contracts-adapter-input.js"
    },
    "./contracts-runtime-server-rest.feature": {
      "types": "./dist/contracts-runtime-server-rest.feature.d.ts",
      "browser": "./dist/browser/contracts-runtime-server-rest.feature.js",
      "bun": "./dist/contracts-runtime-server-rest.feature.js",
      "node": "./dist/node/contracts-runtime-server-rest.feature.js",
      "default": "./dist/contracts-runtime-server-rest.feature.js"
    },
    "./pwa-update": {
      "types": "./dist/pwa-update.d.ts",
      "browser": "./dist/browser/pwa-update.js",
      "bun": "./dist/pwa-update.js",
      "node": "./dist/node/pwa-update.js",
      "default": "./dist/pwa-update.js"
    },
    "./rest-elysia": {
      "types": "./dist/rest-elysia.d.ts",
      "browser": "./dist/browser/rest-elysia.js",
      "bun": "./dist/rest-elysia.js",
      "node": "./dist/node/rest-elysia.js",
      "default": "./dist/rest-elysia.js"
    },
    "./rest-express": {
      "types": "./dist/rest-express.d.ts",
      "browser": "./dist/browser/rest-express.js",
      "bun": "./dist/rest-express.js",
      "node": "./dist/node/rest-express.js",
      "default": "./dist/rest-express.js"
    },
    "./rest-generic": {
      "types": "./dist/rest-generic.d.ts",
      "browser": "./dist/browser/rest-generic.js",
      "bun": "./dist/rest-generic.js",
      "node": "./dist/node/rest-generic.js",
      "default": "./dist/rest-generic.js"
    },
    "./rest-nest": {
      "types": "./dist/rest-nest.d.ts",
      "browser": "./dist/browser/rest-nest.js",
      "bun": "./dist/rest-nest.js",
      "node": "./dist/node/rest-nest.js",
      "default": "./dist/rest-nest.js"
    },
    "./rest-next-app": {
      "types": "./dist/rest-next-app.d.ts",
      "browser": "./dist/browser/rest-next-app.js",
      "bun": "./dist/rest-next-app.js",
      "node": "./dist/node/rest-next-app.js",
      "default": "./dist/rest-next-app.js"
    },
    "./rest-next-pages": {
      "types": "./dist/rest-next-pages.d.ts",
      "browser": "./dist/browser/rest-next-pages.js",
      "bun": "./dist/rest-next-pages.js",
      "node": "./dist/node/rest-next-pages.js",
      "default": "./dist/rest-next-pages.js"
    },
    "./rest-transport": {
      "types": "./dist/rest-transport.d.ts",
      "browser": "./dist/browser/rest-transport.js",
      "bun": "./dist/rest-transport.js",
      "node": "./dist/node/rest-transport.js",
      "default": "./dist/rest-transport.js"
    },
    "./result-response": {
      "types": "./dist/result-response.d.ts",
      "browser": "./dist/browser/result-response.js",
      "bun": "./dist/result-response.js",
      "node": "./dist/node/result-response.js",
      "default": "./dist/result-response.js"
    },
    "./sse-graph-subscription": {
      "types": "./dist/sse-graph-subscription.d.ts",
      "browser": "./dist/browser/sse-graph-subscription.js",
      "bun": "./dist/sse-graph-subscription.js",
      "node": "./dist/node/sse-graph-subscription.js",
      "default": "./dist/sse-graph-subscription.js"
    },
    "./yjs-multiplayer-security": {
      "types": "./dist/yjs-multiplayer-security.d.ts",
      "browser": "./dist/browser/yjs-multiplayer-security.js",
      "bun": "./dist/yjs-multiplayer-security.js",
      "node": "./dist/node/yjs-multiplayer-security.js",
      "default": "./dist/yjs-multiplayer-security.js"
    },
    "./yjs-multiplayer-transport": {
      "types": "./dist/yjs-multiplayer-transport.d.ts",
      "browser": "./dist/browser/yjs-multiplayer-transport.js",
      "bun": "./dist/yjs-multiplayer-transport.js",
      "node": "./dist/node/yjs-multiplayer-transport.js",
      "default": "./dist/yjs-multiplayer-transport.js"
    }
  }
}
```

## Dependencies

Metadata status: complete pinned manifest.

### Runtime dependencies

- [@lssm-tech/lib.contracts-runtime-core](https://lssm.co/docs/packages/lib.contracts-runtime-core/): `workspace:^`
- [@lssm-tech/lib.contracts-runtime-kernel](https://lssm.co/docs/packages/lib.contracts-runtime-kernel/): `workspace:^`
- [@lssm-tech/lib.contracts-spec-core](https://lssm.co/docs/packages/lib.contracts-spec-core/): `workspace:^`
- [@lssm-tech/lib.schema](https://lssm.co/docs/packages/lib.schema/): `workspace:^`
- [@lssm-tech/lib.utils-typescript](https://lssm.co/docs/packages/lib.utils-typescript/): `workspace:^`
- `zod`: `catalog:`

### Peer dependencies

- `@pothos/core`: `catalog:graphql`
- `elysia`: `catalog:server`
- `express`: `catalog:server`
- `next`: `catalog:`
- `y-websocket`: `^3.0.0`
- `yjs`: `^13.0.0`

### Optional dependencies

No declarations in the inspected manifest.

### Development dependencies

- [@lssm-tech/tool.bun](https://lssm.co/docs/packages/tool.bun/): `workspace:*`
- [@lssm-tech/tool.typescript](https://lssm.co/docs/packages/tool.typescript/): `workspace:*`
- `@types/express`: `^5.0.6`
- `typescript`: `catalog:`

### Peer dependency metadata

```json
{
  "y-websocket": {
    "optional": true
  },
  "yjs": {
    "optional": true
  }
}
```

### Bundled dependencies

```json
null
```

## Package scripts

Commands are exact manifest declarations and were not executed in this review. Script metadata status: complete pinned manifest.

```json
{
  "publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
  "publish:pkg:canary": "bun publish:pkg --tag canary",
  "clean": "rm -rf dist",
  "lint": "bun run lint:fix",
  "lint:fix": "node ../../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../../scripts/biome.cjs check --write .",
  "lint:check": "node ../../../../scripts/biome.cjs check .",
  "build": "contractspec-bun-build build",
  "build:bundle": "contractspec-bun-build transpile",
  "build:types": "contractspec-bun-build types",
  "prebuild": "contractspec-bun-build prebuild",
  "typecheck": "tsgo --noEmit",
  "dev": "contractspec-bun-build dev"
}
```

## Declared documentation links

- [Lib Contracts Runtime Server Rest documentation](https://www.npmjs.com/package/%40lssm-tech%2Flib.contracts-runtime-server-rest) — declared link; destination not verified.

```json
{
  "url": "https://www.npmjs.com/package/%40lssm-tech%2Flib.contracts-runtime-server-rest",
  "kind": "readme"
}
```

## Existing agent-guide projection

```json
{
  "path": "packages/apps/web-landing/public/llms-packages/lib.contracts-runtime-server-rest.txt",
  "route": "/llms/lib.contracts-runtime-server-rest",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/lib.contracts-runtime-server-rest.txt",
  "blobSha": "249e65f6d3bf4688ff2f976bcee273de279f4685",
  "sourcePin": "bcc79fcc27c4d801c2119bef81ddcce7b4e86498",
  "bodyEqualsReadme": true,
  "aggregateSourcePath": "packages/apps/web-landing/public/llms-full.txt",
  "aggregateBlobSha": "691b1d33efee24c440598b9106c81432f56aafaf"
}
```
