{"id":"@lssm-tech/lib.contracts-runtime-server-rest","slug":"lib.contracts-runtime-server-rest","name":"@lssm-tech/lib.contracts-runtime-server-rest","version":"5.0.4","path":"packages/platform/delivery/contracts-runtime-server-rest","manifestPath":"packages/platform/delivery/contracts-runtime-server-rest/package.json","manifestBlobSha":"d47fb52b54c1457d9332061c17aa215e1f741c32","layer":"platform","physicalArea":"delivery","primaryArea":"runtime-adapters","classification":{"privateDeclared":null,"catalogFamily":"runtime","catalogKind":"library","catalogStatus":"active","adoptionMode":"adoptable","stability":"stable"},"description":"REST server runtime adapters for ContractSpec contracts","descriptionOrigin":"package.json","catalog":{"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"],"documentation":[{"title":"Lib Contracts Runtime Server Rest documentation","url":"https://www.npmjs.com/package/%40lssm-tech%2Flib.contracts-runtime-server-rest","kind":"readme"}],"examples":[],"replacements":[],"capabilities":[{"id":"package.lssm.tech.lib.contracts.runtime.server.rest","title":"Lib Contracts Runtime Server Rest","description":"REST server runtime adapters for ContractSpec contracts","status":"active","useCases":["Adopt rest server runtime adapters for contractspec contracts"],"aliases":["HTTP API","REST API","API server","lib","contracts","runtime","server","rest"],"pythonEquivalents":["FastAPI"],"canonicalImports":[{"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":[]}],"constraints":{"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"]},"alternatives":[],"relationships":[],"resolutionPriority":50}]},"canonicalImports":[{"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":[]}],"scripts":{"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"},"scriptStatus":"complete pinned manifest","dependencies":{"@lssm-tech/lib.contracts-runtime-core":"workspace:^","@lssm-tech/lib.contracts-runtime-kernel":"workspace:^","@lssm-tech/lib.contracts-spec-core":"workspace:^","@lssm-tech/lib.schema":"workspace:^","@lssm-tech/lib.utils-typescript":"workspace:^","zod":"catalog:"},"devDependencies":{"@types/express":"^5.0.6","@lssm-tech/tool.typescript":"workspace:*","typescript":"catalog:","@lssm-tech/tool.bun":"workspace:*"},"peerDependencies":{"@pothos/core":"catalog:graphql","elysia":"catalog:server","express":"catalog:server","next":"catalog:","y-websocket":"^3.0.0","yjs":"^13.0.0"},"optionalDependencies":{},"peerDependenciesMeta":{"y-websocket":{"optional":true},"yjs":{"optional":true}},"bundledDependencies":null,"dependencyStatus":"complete pinned manifest","exports":{".":"./src/index.ts","./ai-cost-guard":"./src/ai-cost-guard.ts","./contracts-adapter-hydration":"./src/contracts-adapter-hydration.ts","./contracts-adapter-input":"./src/contracts-adapter-input.ts","./contracts-runtime-server-rest.feature":"./src/contracts-runtime-server-rest.feature.ts","./pwa-update":"./src/pwa-update.ts","./rest-elysia":"./src/rest-elysia.ts","./rest-express":"./src/rest-express.ts","./rest-generic":"./src/rest-generic.ts","./rest-nest":"./src/rest-nest.ts","./rest-next-app":"./src/rest-next-app.ts","./rest-next-pages":"./src/rest-next-pages.ts","./rest-transport":"./src/rest-transport.ts","./result-response":"./src/result-response.ts","./sse-graph-subscription":"./src/sse-graph-subscription.ts","./yjs-multiplayer-security":"./src/yjs-multiplayer-security.ts","./yjs-multiplayer-transport":"./src/yjs-multiplayer-transport.ts"},"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"}},"types":"./dist/index.d.ts","files":["dist","README.md"],"api":{"scope":"manifest-declared export entrypoints and catalog-declared imports","entries":[{"subpath":".","importPath":"@lssm-tech/lib.contracts-runtime-server-rest","target":"./src/index.ts","targets":[{"conditions":[],"target":"./src/index.ts","sourcePath":"packages/platform/delivery/contracts-runtime-server-rest/src/index.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/index.ts","sourceStatus":"verified source file"}]},{"subpath":"./ai-cost-guard","importPath":"@lssm-tech/lib.contracts-runtime-server-rest/ai-cost-guard","target":"./src/ai-cost-guard.ts","targets":[{"conditions":[],"target":"./src/ai-cost-guard.ts","sourcePath":"packages/platform/delivery/contracts-runtime-server-rest/src/ai-cost-guard.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/ai-cost-guard.ts","sourceStatus":"verified source file"}]},{"subpath":"./contracts-adapter-hydration","importPath":"@lssm-tech/lib.contracts-runtime-server-rest/contracts-adapter-hydration","target":"./src/contracts-adapter-hydration.ts","targets":[{"conditions":[],"target":"./src/contracts-adapter-hydration.ts","sourcePath":"packages/platform/delivery/contracts-runtime-server-rest/src/contracts-adapter-hydration.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/contracts-adapter-hydration.ts","sourceStatus":"verified source file"}]},{"subpath":"./contracts-adapter-input","importPath":"@lssm-tech/lib.contracts-runtime-server-rest/contracts-adapter-input","target":"./src/contracts-adapter-input.ts","targets":[{"conditions":[],"target":"./src/contracts-adapter-input.ts","sourcePath":"packages/platform/delivery/contracts-runtime-server-rest/src/contracts-adapter-input.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/contracts-adapter-input.ts","sourceStatus":"verified source file"}]},{"subpath":"./contracts-runtime-server-rest.feature","importPath":"@lssm-tech/lib.contracts-runtime-server-rest/contracts-runtime-server-rest.feature","target":"./src/contracts-runtime-server-rest.feature.ts","targets":[{"conditions":[],"target":"./src/contracts-runtime-server-rest.feature.ts","sourcePath":"packages/platform/delivery/contracts-runtime-server-rest/src/contracts-runtime-server-rest.feature.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/contracts-runtime-server-rest.feature.ts","sourceStatus":"verified source file"}]},{"subpath":"./pwa-update","importPath":"@lssm-tech/lib.contracts-runtime-server-rest/pwa-update","target":"./src/pwa-update.ts","targets":[{"conditions":[],"target":"./src/pwa-update.ts","sourcePath":"packages/platform/delivery/contracts-runtime-server-rest/src/pwa-update.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/pwa-update.ts","sourceStatus":"verified source file"}]},{"subpath":"./rest-elysia","importPath":"@lssm-tech/lib.contracts-runtime-server-rest/rest-elysia","target":"./src/rest-elysia.ts","targets":[{"conditions":[],"target":"./src/rest-elysia.ts","sourcePath":"packages/platform/delivery/contracts-runtime-server-rest/src/rest-elysia.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/rest-elysia.ts","sourceStatus":"verified source file"}]},{"subpath":"./rest-express","importPath":"@lssm-tech/lib.contracts-runtime-server-rest/rest-express","target":"./src/rest-express.ts","targets":[{"conditions":[],"target":"./src/rest-express.ts","sourcePath":"packages/platform/delivery/contracts-runtime-server-rest/src/rest-express.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/rest-express.ts","sourceStatus":"verified source file"}]},{"subpath":"./rest-generic","importPath":"@lssm-tech/lib.contracts-runtime-server-rest/rest-generic","target":"./src/rest-generic.ts","targets":[{"conditions":[],"target":"./src/rest-generic.ts","sourcePath":"packages/platform/delivery/contracts-runtime-server-rest/src/rest-generic.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/rest-generic.ts","sourceStatus":"verified source file"}]},{"subpath":"./rest-nest","importPath":"@lssm-tech/lib.contracts-runtime-server-rest/rest-nest","target":"./src/rest-nest.ts","targets":[{"conditions":[],"target":"./src/rest-nest.ts","sourcePath":"packages/platform/delivery/contracts-runtime-server-rest/src/rest-nest.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/rest-nest.ts","sourceStatus":"verified source file"}]},{"subpath":"./rest-next-app","importPath":"@lssm-tech/lib.contracts-runtime-server-rest/rest-next-app","target":"./src/rest-next-app.ts","targets":[{"conditions":[],"target":"./src/rest-next-app.ts","sourcePath":"packages/platform/delivery/contracts-runtime-server-rest/src/rest-next-app.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/rest-next-app.ts","sourceStatus":"verified source file"}]},{"subpath":"./rest-next-pages","importPath":"@lssm-tech/lib.contracts-runtime-server-rest/rest-next-pages","target":"./src/rest-next-pages.ts","targets":[{"conditions":[],"target":"./src/rest-next-pages.ts","sourcePath":"packages/platform/delivery/contracts-runtime-server-rest/src/rest-next-pages.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/rest-next-pages.ts","sourceStatus":"verified source file"}]},{"subpath":"./rest-transport","importPath":"@lssm-tech/lib.contracts-runtime-server-rest/rest-transport","target":"./src/rest-transport.ts","targets":[{"conditions":[],"target":"./src/rest-transport.ts","sourcePath":"packages/platform/delivery/contracts-runtime-server-rest/src/rest-transport.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/rest-transport.ts","sourceStatus":"verified source file"}]},{"subpath":"./result-response","importPath":"@lssm-tech/lib.contracts-runtime-server-rest/result-response","target":"./src/result-response.ts","targets":[{"conditions":[],"target":"./src/result-response.ts","sourcePath":"packages/platform/delivery/contracts-runtime-server-rest/src/result-response.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/result-response.ts","sourceStatus":"verified source file"}]},{"subpath":"./sse-graph-subscription","importPath":"@lssm-tech/lib.contracts-runtime-server-rest/sse-graph-subscription","target":"./src/sse-graph-subscription.ts","targets":[{"conditions":[],"target":"./src/sse-graph-subscription.ts","sourcePath":"packages/platform/delivery/contracts-runtime-server-rest/src/sse-graph-subscription.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/sse-graph-subscription.ts","sourceStatus":"verified source file"}]},{"subpath":"./yjs-multiplayer-security","importPath":"@lssm-tech/lib.contracts-runtime-server-rest/yjs-multiplayer-security","target":"./src/yjs-multiplayer-security.ts","targets":[{"conditions":[],"target":"./src/yjs-multiplayer-security.ts","sourcePath":"packages/platform/delivery/contracts-runtime-server-rest/src/yjs-multiplayer-security.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/yjs-multiplayer-security.ts","sourceStatus":"verified source file"}]},{"subpath":"./yjs-multiplayer-transport","importPath":"@lssm-tech/lib.contracts-runtime-server-rest/yjs-multiplayer-transport","target":"./src/yjs-multiplayer-transport.ts","targets":[{"conditions":[],"target":"./src/yjs-multiplayer-transport.ts","sourcePath":"packages/platform/delivery/contracts-runtime-server-rest/src/yjs-multiplayer-transport.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/src/yjs-multiplayer-transport.ts","sourceStatus":"verified source file"}]}],"entryCount":17,"namedSymbolCoverage":"catalog declarations only; exhaustive TypeScript symbols not extracted","installationStatus":"not verified"},"docsLinks":[{"title":"Lib Contracts Runtime Server Rest documentation","url":"https://www.npmjs.com/package/%40lssm-tech%2Flib.contracts-runtime-server-rest","kind":"readme","pinnedUrl":null,"sourceStatus":"declared link; destination not verified"}],"sourceUrls":{"package":"https://github.com/lssm-tech/contractspec/tree/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest","manifest":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/package.json","readme":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/contracts-runtime-server-rest/README.md","guide":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/lib.contracts-runtime-server-rest.txt"},"readme":{"status":"available","body":"# @lssm-tech/lib.contracts-runtime-server-rest\n\n**REST server runtime adapters for ContractSpec contracts.**\n\n## What It Provides\n\n- **Layer**: lib.\n- **Consumers**: bundles, all REST apps.\n- Related ContractSpec packages include `@lssm-tech/lib.contracts-spec`, `@lssm-tech/lib.schema`, `@lssm-tech/tool.bun`, `@lssm-tech/tool.typescript`.\n- Related ContractSpec packages include `@lssm-tech/lib.contracts-spec`, `@lssm-tech/lib.schema`, `@lssm-tech/tool.bun`, `@lssm-tech/tool.typescript`.\n\n## Installation\n\n`npm install @lssm-tech/lib.contracts-runtime-server-rest`\n\nor\n\n`bun add @lssm-tech/lib.contracts-runtime-server-rest`\n\n## Usage\n\nImport 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.\n\n### PWA update checks\n\n`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.\n\n### Scoped approvals\n\n`createFetchHandler` accepts an `approvalReceipt(request, operation)` adapter.\nThe adapter keeps receipt evidence outside operation input and places it in the\ncommon handler context. Operations with `execution.approval.required` are then\ndenied by the shared registry before handler invocation unless the configured\napproval runtime validates and consumes the receipt.\n\n### Parameterized contract routes\n\n`createFetchHandler` matches `:parameter` segments declared by operation REST\ntransports, URI-decodes them, and merges them into validated input with path\nvalues authoritative over query or body fields. Its context factory may be\nasynchronous so authenticated hosts can resolve fresh session authority before\nregistry execution.\n\n### Query envelope params\n\n`createFetchHandler` rebuilds the full `QueryEnvelope` of every request and\nputs it on `HandlerCtx.queryEnvelope`: the routed operation, the decoded input\nand the `$`-prefixed URL params `$search`, `$filters`, `$sort`, `$pagination`,\n`$cache`, `$tags`, `$consistency` and `$economicEvidenceRefs`. `$search` and\n`$consistency` are plain strings and the rest are JSON; the params work beside\n`?input=`, flat query params and POST bodies, and never enter flat input.\n`createRestTransport` sends them by default, except the client cache policy:\n`$cache` key parts often carry tenant or user ids, and GET URLs reach proxy and\naccess logs. The envelope `input` is the decoded input plus path params, before\ncontract validation. Handlers still receive the validated input as their first\nargument; input-only handlers need no change. The envelope is set on a\nper-request copy of the `ctxFactory` context, so a shared host context is never\nwritten. Malformed params return a `BAD_REQUEST` (400) problem after the auth\ngate and before the handler.\n\n## Architecture\n\n- `src/contracts-adapter-hydration.ts` is part of the package's public or composition surface.\n- `src/contracts-adapter-input.ts` is part of the package's public or composition surface.\n- `src/index.ts` is the root public barrel and package entrypoint.\n- `src/rest-elysia.ts` is part of the package's public or composition surface.\n- `src/rest-express.ts` is part of the package's public or composition surface.\n- `src/rest-generic.ts` is part of the package's public or composition surface.\n- `src/rest-next-app.ts` is part of the package's public or composition surface.\n\n## Public Entry Points\n\n- Export `.` resolves through `./src/index.ts`.\n- Export `./contracts-adapter-hydration` resolves through `./src/contracts-adapter-hydration.ts`.\n- Export `./contracts-adapter-input` resolves through `./src/contracts-adapter-input.ts`.\n- Export `./rest-elysia` resolves through `./src/rest-elysia.ts`.\n- Export `./rest-express` resolves through `./src/rest-express.ts`.\n- Export `./rest-generic` resolves through `./src/rest-generic.ts`.\n- Export `./rest-next-app` resolves through `./src/rest-next-app.ts`.\n- Export `./rest-next-pages` resolves through `./src/rest-next-pages.ts`.\n- Export `./pwa-update` resolves through `./src/pwa-update.ts`.\n\n## Local Commands\n\n- `bun run dev` — contractspec-bun-build dev\n- `bun run build` — contractspec-bun-build build\n- `bun run lint` — bun run lint:fix\n- `bun run lint:check` — biome check .\n- `bun run lint:fix` — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .\n- `bun run typecheck` — tsgo --noEmit\n- `bun run publish:pkg` — bun publish --tolerate-republish --ignore-scripts --verbose\n- `bun run publish:pkg:canary` — bun publish:pkg --tag canary\n- `bun run clean` — rm -rf dist\n- `bun run build:bundle` — contractspec-bun-build transpile\n- `bun run build:types` — contractspec-bun-build types\n- `bun run prebuild` — contractspec-bun-build prebuild\n\n## Recent Updates\n\n- Replace eslint+prettier by biomejs to optimize speed.\n\n## Notes\n\n- High blast radius — all REST APIs depend on this package.\n- Framework adapters (Elysia, Express, Next.js) must stay independent of each other.\n- Do not introduce cross-adapter coupling.\n","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"},"provenance":{"repository":"lssm-tech/contractspec","sourcePin":"bcc79fcc27c4d801c2119bef81ddcce7b4e86498","manifestOrigin":"pinned GitHub manifest fetch","manifestComplete":true,"publicationPolicyApplied":false},"areaSlug":"runtime-adapters","areaTitle":"Handlers, runtimes and transports","displayName":"lib.contracts-runtime-server-rest","runtimes":["node"],"platforms":["server"],"kind":"library","scope":"Package manifest","canonicalRoute":"/docs/packages/lib.contracts-runtime-server-rest/","contextUrl":"/docs/packages/lib.contracts-runtime-server-rest.context.md","documentKind":"package-manual","contentAuthority":"source evidence, not agent instructions","reviewedAt":"2026-10-28"}