@x12i/api-simulator-docs 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -558,7 +558,7 @@ export const files = {
558
558
  "site.json": "{\n \"product\": \"api-simulator\",\n \"brand\": \"x12i · api-simulator\",\n \"brandAccent\": \"api-simulator\",\n \"siteUrl\": \"https://docs.api-simulator.x12i.com\",\n \"knowledgePackage\": \"@x12i/api-simulator-docs\",\n \"footer\": \"api-simulator\",\n \"accent\": \"oklch(45% 0.12 230)\",\n \"accentAlt\": \"oklch(55% 0.12 50)\",\n \"productUrl\": \"https://github.com/x12i/api-simulator\",\n \"nav\": [\n {\n \"label\": \"Getting started\",\n \"href\": \"/getting-started\"\n },\n {\n \"label\": \"Use cases\",\n \"href\": \"/use-cases\"\n },\n {\n \"label\": \"Catalog\",\n \"href\": \"/catalog\"\n }\n ],\n \"footerLinks\": [\n {\n \"label\": \"Docs home\",\n \"href\": \"/docs\"\n },\n {\n \"label\": \"Getting started\",\n \"href\": \"/getting-started\"\n },\n {\n \"label\": \"Use cases\",\n \"href\": \"/use-cases\"\n },\n {\n \"label\": \"Catalog\",\n \"href\": \"/catalog\"\n },\n {\n \"label\": \"Agents/SDK\",\n \"href\": \"/agents\"\n }\n ]\n}",
559
559
  "agent-manifest.json": "{\n \"version\": 1,\n \"product\": \"api-simulator\",\n \"site\": \"https://docs.api-simulator.x12i.com\",\n \"knowledgePackage\": \"@x12i/api-simulator-docs\",\n \"roles\": [\n \"developers\"\n ],\n \"books\": [\n {\n \"id\": \"00-overview\",\n \"audiences\": [\n \"developers\"\n ],\n \"md\": {\n \"developers\": \"downloads/books/00-overview/developers.md\"\n },\n \"pdf\": {\n \"developers\": null\n },\n \"chapters\": {\n \"developers\": \"downloads/books/00-overview/developers.chapters.json\"\n }\n },\n {\n \"id\": \"01-behaviors\",\n \"audiences\": [\n \"developers\"\n ],\n \"md\": {\n \"developers\": \"downloads/books/01-behaviors/developers.md\"\n },\n \"pdf\": {\n \"developers\": null\n },\n \"chapters\": {\n \"developers\": \"downloads/books/01-behaviors/developers.chapters.json\"\n }\n },\n {\n \"id\": \"02-adapters\",\n \"audiences\": [\n \"developers\"\n ],\n \"md\": {\n \"developers\": \"downloads/books/02-adapters/developers.md\"\n },\n \"pdf\": {\n \"developers\": null\n },\n \"chapters\": {\n \"developers\": \"downloads/books/02-adapters/developers.chapters.json\"\n }\n },\n {\n \"id\": \"03-package-simulators\",\n \"audiences\": [\n \"developers\"\n ],\n \"md\": {\n \"developers\": \"downloads/books/03-package-simulators/developers.md\"\n },\n \"pdf\": {\n \"developers\": null\n },\n \"chapters\": {\n \"developers\": \"downloads/books/03-package-simulators/developers.chapters.json\"\n }\n },\n {\n \"id\": \"04-playground-studio\",\n \"audiences\": [\n \"developers\"\n ],\n \"md\": {\n \"developers\": \"downloads/books/04-playground-studio/developers.md\"\n },\n \"pdf\": {\n \"developers\": null\n },\n \"chapters\": {\n \"developers\": \"downloads/books/04-playground-studio/developers.chapters.json\"\n }\n }\n ],\n \"useCases\": [\n {\n \"id\": \"orient-simulator\",\n \"title\": \"Orient on api-simulator\",\n \"md\": \"downloads/use-cases/orient-simulator.md\",\n \"path\": [\n {\n \"bookId\": \"00-overview\",\n \"audience\": \"developers\",\n \"chapters\": [\n \"1-what-it-is\",\n \"2-install\",\n \"3-minimal-example\",\n \"4-where-to-go-next\"\n ]\n }\n ]\n },\n {\n \"id\": \"define-three-behaviors\",\n \"title\": \"Define the three endpoint behaviors\",\n \"md\": \"downloads/use-cases/define-three-behaviors.md\",\n \"path\": [\n {\n \"bookId\": \"01-behaviors\",\n \"audience\": \"developers\",\n \"chapters\": [\n \"1-fixed\",\n \"2-relative\",\n \"3-simulation-function\",\n \"4-dispatch\",\n \"5-endpoint-contract\"\n ]\n }\n ]\n },\n {\n \"id\": \"expose-node-service\",\n \"title\": \"Expose a Node.js HTTP service\",\n \"md\": \"downloads/use-cases/expose-node-service.md\",\n \"path\": [\n {\n \"bookId\": \"02-adapters\",\n \"audience\": \"developers\",\n \"chapters\": [\n \"1-node-http-adapter\",\n \"2-http-process-compliance-local-services\",\n \"3-multiple-apis\",\n \"7-express-and-fastify\"\n ]\n }\n ]\n },\n {\n \"id\": \"ship-package-simulator\",\n \"title\": \"Ship a package simulator\",\n \"md\": \"downloads/use-cases/ship-package-simulator.md\",\n \"path\": [\n {\n \"bookId\": \"03-package-simulators\",\n \"audience\": \"developers\",\n \"chapters\": [\n \"1-what-a-package-simulator-is\",\n \"2-recommended-structure\",\n \"4-with-static-memorix\"\n ]\n },\n {\n \"bookId\": \"02-adapters\",\n \"audience\": \"developers\",\n \"chapters\": [\n \"2-http-process-compliance-local-services\"\n ]\n }\n ]\n },\n {\n \"id\": \"run-playground-studio\",\n \"title\": \"Run Playground and Studio\",\n \"md\": \"downloads/use-cases/run-playground-studio.md\",\n \"path\": [\n {\n \"bookId\": \"04-playground-studio\",\n \"audience\": \"developers\",\n \"chapters\": [\n \"1-two-surfaces\",\n \"2-run-locally\",\n \"3-ports\",\n \"4-product-rule\"\n ]\n }\n ]\n },\n {\n \"id\": \"library-demo-rest\",\n \"title\": \"Build a plain REST package simulator\",\n \"md\": \"downloads/use-cases/library-demo-rest.md\",\n \"path\": [\n {\n \"bookId\": \"03-package-simulators\",\n \"audience\": \"developers\",\n \"chapters\": [\n \"1-what-a-package-simulator-is\",\n \"3-plain-rest-library-demo\"\n ]\n },\n {\n \"bookId\": \"01-behaviors\",\n \"audience\": \"developers\",\n \"chapters\": [\n \"2-relative\",\n \"3-simulation-function\"\n ]\n }\n ]\n }\n ]\n}",
560
560
  "downloads/books/00-overview/developers.chapters.json": "[\n {\n \"slug\": \"preamble\",\n \"title\": \"Introduction\",\n \"level\": 2,\n \"order\": 0\n },\n {\n \"slug\": \"1-what-it-is\",\n \"title\": \"1. What it is\",\n \"level\": 2,\n \"order\": 1\n },\n {\n \"slug\": \"2-install\",\n \"title\": \"2. Install\",\n \"level\": 2,\n \"order\": 2\n },\n {\n \"slug\": \"3-minimal-example\",\n \"title\": \"3. Minimal example\",\n \"level\": 2,\n \"order\": 3\n },\n {\n \"slug\": \"4-where-to-go-next\",\n \"title\": \"4. Where to go next\",\n \"level\": 2,\n \"order\": 4\n }\n]",
561
- "downloads/books/00-overview/developers.md": "# Overview — Developers\n\n**Audience:** Engineers installing and evaluating `@x12i/api-simulator`. \n**Related:** [Behaviors](../01-behaviors/developers/BOOK.md) · [Package simulators](../03-package-simulators/developers/BOOK.md)\n\n---\n\n## 1. What it is\n\nCore TypeScript framework for building simulated API services.\n\nEach endpoint defines **exactly one** behavior:\n\n1. `fixed` — always return the configured response.\n2. `relative` — render a configured JSON response using values from the request and API-local data.\n3. `simulation` — run a function that receives the matched request and returns a response.\n\nThe core is transport-agnostic. It can be called directly from tests, wrapped by Fastify/Express, or exposed through the included Node.js HTTP adapter.\n\n**Data and metadata:** this package does **not** load fixtures from disk, MongoDB, Memorix, or HTTP. Consumers pass an in-memory `SimulatorDefinition` (`api.data` + endpoints). Optional helpers (`createStore`, OpenAPI) still take data you supply. Product-owned **package simulators** ship their own logic, data, and (when needed) Memorix fixtures.\n\n---\n\n## 2. Install\n\n```bash\nnpm install @x12i/api-simulator\n```\n\nRequires Node.js 20+.\n\n---\n\n## 3. Minimal example\n\n```ts\nimport { createApiSimulator } from '@x12i/api-simulator';\n\nconst simulator = createApiSimulator({\n apis: [\n {\n id: 'objects-api',\n basePath: '/api/v1',\n data: {\n children: [\n {\n id: 'child-1',\n parentId: '{{request.params.parentId}}'\n },\n {\n id: 'child-2',\n parentId: '{{request.params.parentId}}'\n }\n ]\n },\n endpoints: [\n {\n id: 'health',\n method: 'GET',\n path: '/health',\n behavior: {\n type: 'fixed',\n response: {\n status: 200,\n body: { status: 'ok' }\n }\n }\n },\n {\n id: 'list-children',\n method: 'GET',\n path: '/parents/:parentId/children',\n behavior: {\n type: 'relative',\n response: {\n body: {\n parentId: '{{request.params.parentId}}',\n items: '{{data.children}}'\n }\n }\n }\n },\n {\n id: 'calculate-score',\n method: 'POST',\n path: '/score',\n behavior: {\n type: 'simulation',\n handler: ({ request }) => {\n const values = (request.body as { values: number[] }).values;\n return {\n body: {\n score: values.reduce((sum, value) => sum + value, 0)\n }\n };\n }\n }\n }\n ]\n }\n ]\n});\n```\n\n---\n\n## 4. Where to go next\n\n- Try the **Playground** app (anonymous, ~30-second first dispatch).\n- Author projects in **Studio** (local-first).\n- Follow [`examples/library-demo/TUTORIAL.md`](../../../examples/library-demo/TUTORIAL.md) for a guided REST walkthrough.\n- Or [`examples/flowstate-simulator/TUTORIAL.md`](../../../examples/flowstate-simulator/TUTORIAL.md) to compose with `@x12i/static-memorix`.\n- Use cases: `orient-simulator`, `define-three-behaviors`, `ship-package-simulator`.\n",
561
+ "downloads/books/00-overview/developers.md": "# Overview — Developers\n\n**Audience:** Engineers installing and evaluating `@x12i/api-simulator`. \n**Related:** [Behaviors](../01-behaviors/developers/BOOK.md) · [Package simulators](../03-package-simulators/developers/BOOK.md)\n\n---\n\n## 1. What it is\n\nCore TypeScript framework for building simulated API services.\n\nEach endpoint defines **exactly one** behavior:\n\n1. `fixed` — always return the configured response.\n2. `relative` — render a configured JSON response using values from the request and API-local data.\n3. `simulation` — run a function that receives the matched request and returns a response.\n\nThe core is transport-agnostic. It can be called directly from tests, wrapped by Fastify/Express, or exposed through the included Node.js HTTP adapter.\n\n**Data and metadata:** this package does **not** load fixtures from disk, MongoDB, Memorix, or HTTP. Consumers pass an in-memory `SimulatorDefinition` (`api.data` + endpoints). Optional helpers (`createStore`, OpenAPI) still take data you supply. Product-owned **package simulators** ship their own logic, data, and (when needed) Memorix fixtures.\n\n---\n\n## 2. Install\n\n```bash\nnpm install @x12i/api-simulator\n```\n\nRequires Node.js 20+.\n\nFor agents and assembled use-case / book markdown packs (devDependency only):\n\n```bash\nnpm i -D @x12i/api-simulator-docs\n```\n\nThen: `npx api-simulator-docs list-use-cases` · `npx api-simulator-docs use-case orient-simulator`.\n\n---\n\n## 3. Minimal example\n\n```ts\nimport { createApiSimulator } from '@x12i/api-simulator';\n\nconst simulator = createApiSimulator({\n apis: [\n {\n id: 'objects-api',\n basePath: '/api/v1',\n data: {\n children: [\n {\n id: 'child-1',\n parentId: '{{request.params.parentId}}'\n },\n {\n id: 'child-2',\n parentId: '{{request.params.parentId}}'\n }\n ]\n },\n endpoints: [\n {\n id: 'health',\n method: 'GET',\n path: '/health',\n behavior: {\n type: 'fixed',\n response: {\n status: 200,\n body: { status: 'ok' }\n }\n }\n },\n {\n id: 'list-children',\n method: 'GET',\n path: '/parents/:parentId/children',\n behavior: {\n type: 'relative',\n response: {\n body: {\n parentId: '{{request.params.parentId}}',\n items: '{{data.children}}'\n }\n }\n }\n },\n {\n id: 'calculate-score',\n method: 'POST',\n path: '/score',\n behavior: {\n type: 'simulation',\n handler: ({ request }) => {\n const values = (request.body as { values: number[] }).values;\n return {\n body: {\n score: values.reduce((sum, value) => sum + value, 0)\n }\n };\n }\n }\n }\n ]\n }\n ]\n});\n```\n\n---\n\n## 4. Where to go next\n\n- Try the **Playground** app (anonymous, ~30-second first dispatch).\n- Author projects in **Studio** (local-first).\n- Follow [`examples/library-demo/TUTORIAL.md`](../../../examples/library-demo/TUTORIAL.md) for a guided REST walkthrough.\n- Or [`examples/flowstate-simulator/TUTORIAL.md`](../../../examples/flowstate-simulator/TUTORIAL.md) to compose with `@x12i/static-memorix`.\n- Use cases: `orient-simulator`, `define-three-behaviors`, `ship-package-simulator` (`npm i -D @x12i/api-simulator-docs`).\n",
562
562
  "downloads/books/01-behaviors/developers.chapters.json": "[\n {\n \"slug\": \"preamble\",\n \"title\": \"Introduction\",\n \"level\": 2,\n \"order\": 0\n },\n {\n \"slug\": \"1-fixed\",\n \"title\": \"1. Fixed\",\n \"level\": 2,\n \"order\": 1\n },\n {\n \"slug\": \"2-relative\",\n \"title\": \"2. Relative\",\n \"level\": 2,\n \"order\": 2\n },\n {\n \"slug\": \"3-simulation-function\",\n \"title\": \"3. Simulation function\",\n \"level\": 2,\n \"order\": 3\n },\n {\n \"slug\": \"4-dispatch\",\n \"title\": \"4. Dispatch\",\n \"level\": 2,\n \"order\": 4\n },\n {\n \"slug\": \"5-endpoint-contract\",\n \"title\": \"5. Endpoint contract\",\n \"level\": 2,\n \"order\": 5\n },\n {\n \"slug\": \"6-artificial-latency\",\n \"title\": \"6. Artificial latency\",\n \"level\": 2,\n \"order\": 6\n },\n {\n \"slug\": \"7-raw-responses\",\n \"title\": \"7. Raw responses\",\n \"level\": 2,\n \"order\": 7\n },\n {\n \"slug\": \"8-path-patterns\",\n \"title\": \"8. Path patterns\",\n \"level\": 2,\n \"order\": 8\n }\n]",
563
563
  "downloads/books/01-behaviors/developers.md": "# Behaviors and Dispatch — Developers\n\n**Audience:** Engineers defining endpoint behaviors and calling `dispatch`. \n**Related:** [Overview](../00-overview/developers/BOOK.md) · [Adapters](../02-adapters/developers/BOOK.md)\n\n---\n\n## 1. Fixed\n\nUse fixed behavior for health endpoints, stable metadata, constants, and simple fixtures.\n\n```ts\n{\n id: 'capabilities',\n method: 'GET',\n path: '/capabilities',\n behavior: {\n type: 'fixed',\n response: {\n status: 200,\n headers: { 'x-simulator': 'true' },\n body: { features: ['read', 'search'] }\n }\n }\n}\n```\n\n---\n\n## 2. Relative\n\nRelative behavior starts with configured JSON, then resolves tokens against the matched request and the API's internal `data` object.\n\nSupported token roots:\n\n- `{{request.params.parentId}}`\n- `{{request.query.page}}`\n- `{{request.headers.x-tenant-id}}`\n- `{{request.body.customer.id}}`\n- `{{data.children}}`\n- Array indexes, such as `{{data.users[0].id}}`\n\n```ts\n{\n id: 'children',\n method: 'GET',\n path: '/parents/:parentId/children',\n behavior: {\n type: 'relative',\n response: {\n body: {\n parentId: '{{request.params.parentId}}',\n items: '{{data.children}}'\n }\n }\n }\n}\n```\n\nA token occupying the entire string preserves its original type. Therefore, `{{request.body.limit}}` can produce a number and `{{data.children}}` can produce an array. A token embedded inside text is converted to a string:\n\n```ts\n{ message: 'Children for parent {{request.params.parentId}}' }\n```\n\nTokens inside API-local data are rendered too. This lets a reusable internal fixture inherit an identifier from the incoming request:\n\n```ts\ndata: {\n children: [\n { id: 'child-1', parentId: '{{request.params.parentId}}' }\n ]\n}\n```\n\nRelative behavior is strict by default. A missing token throws `TemplateResolutionError`. Set `strict: false` to leave unresolved tokens unchanged.\n\n---\n\n## 3. Simulation function\n\nUse a simulation function when output needs conditions, calculations, validation, generated values, branching, or error responses.\n\n```ts\n{\n id: 'quote',\n method: 'POST',\n path: '/quote',\n behavior: {\n type: 'simulation',\n handler: async ({ request, data, apiId, endpointId }) => {\n const quantity = Number((request.body as { quantity: number }).quantity);\n const unitPrice = Number(data.unitPrice);\n\n return {\n status: 201,\n body: {\n apiId,\n endpointId,\n quantity,\n unitPrice,\n total: quantity * unitPrice\n }\n };\n }\n }\n}\n```\n\n---\n\n## 4. Dispatch\n\n```ts\nconst result = await simulator.dispatch({\n method: 'GET',\n path: '/api/v1/parents/parent-42/children'\n});\n\nconsole.log(result.response.body);\n```\n\n`dispatch()` throws `EndpointNotFoundError` when nothing matches. `tryDispatch()` returns `undefined` instead.\n\n---\n\n## 5. Endpoint contract\n\n```ts\ntype EndpointDefinition = {\n id: string;\n method: HttpMethod;\n path: string;\n enabled?: boolean;\n delayMs?: number;\n behavior:\n | { type: 'fixed'; response: SimulatorResponse }\n | { type: 'relative'; response: SimulatorResponse; strict?: boolean }\n | { type: 'simulation'; handler: SimulationFunction };\n};\n```\n\nThe discriminated `behavior` union is the core guarantee: an endpoint cannot validly have two behaviors, and it cannot omit its behavior.\n\n---\n\n## 6. Artificial latency\n\n```ts\n{\n id: 'slow-search',\n method: 'GET',\n path: '/search',\n delayMs: 750,\n behavior: {\n type: 'fixed',\n response: { body: { items: [] } }\n }\n}\n```\n\n---\n\n## 7. Raw responses\n\n```ts\nimport { RawResponseBody, createApiSimulator } from '@x12i/api-simulator';\n\n// In a simulation handler:\nreturn {\n body: new RawResponseBody('<h1>hello</h1>', 'text/html; charset=utf-8')\n};\n```\n\nTransport adapters write `RawResponseBody` verbatim instead of `JSON.stringify`.\n\n---\n\n## 8. Path patterns\n\nSupports `:id`, `:id(\\\\d+)`, and optional `:slug?` segments. Static routes are matched before parameter routes, so `/users/me` wins over `/users/:id`.\n",
564
564
  "downloads/books/02-adapters/developers.chapters.json": "[\n {\n \"slug\": \"preamble\",\n \"title\": \"Introduction\",\n \"level\": 2,\n \"order\": 0\n },\n {\n \"slug\": \"1-node-http-adapter\",\n \"title\": \"1. Node HTTP adapter\",\n \"level\": 2,\n \"order\": 1\n },\n {\n \"slug\": \"2-http-process-compliance-local-services\",\n \"title\": \"2. HTTP process compliance (local services)\",\n \"level\": 2,\n \"order\": 2\n },\n {\n \"slug\": \"3-multiple-apis\",\n \"title\": \"3. Multiple APIs\",\n \"level\": 2,\n \"order\": 3\n },\n {\n \"slug\": \"4-in-memory-store\",\n \"title\": \"4. In-memory store\",\n \"level\": 2,\n \"order\": 4\n },\n {\n \"slug\": \"5-openapi-skeletons\",\n \"title\": \"5. OpenAPI skeletons\",\n \"level\": 2,\n \"order\": 5\n },\n {\n \"slug\": \"6-fetch-adapter\",\n \"title\": \"6. Fetch adapter\",\n \"level\": 2,\n \"order\": 6\n },\n {\n \"slug\": \"7-express-and-fastify\",\n \"title\": \"7. Express and Fastify\",\n \"level\": 2,\n \"order\": 7\n },\n {\n \"slug\": \"8-auth-and-rate-limits\",\n \"title\": \"8. Auth and rate limits\",\n \"level\": 2,\n \"order\": 8\n },\n {\n \"slug\": \"9-cors-host-and-validators\",\n \"title\": \"9. CORS host and validators\",\n \"level\": 2,\n \"order\": 9\n },\n {\n \"slug\": \"10-record-and-replay\",\n \"title\": \"10. Record and replay\",\n \"level\": 2,\n \"order\": 10\n },\n {\n \"slug\": \"11-node-body-parsers\",\n \"title\": \"11. Node body parsers\",\n \"level\": 2,\n \"order\": 11\n },\n {\n \"slug\": \"12-simulator-options\",\n \"title\": \"12. Simulator options\",\n \"level\": 2,\n \"order\": 12\n }\n]",
@@ -570,7 +570,7 @@ export const files = {
570
570
  "downloads/use-cases/define-three-behaviors.md": "# Define the three endpoint behaviors\n\n> **Use case id:** `define-three-behaviors`\n> **Goal:** Author fixed, relative, and simulation endpoints and dispatch them from tests or adapters.\n> **Audiences:** developers\n> **Tags:** behaviors, dispatch\n\n## Reading path\n\n1. **Behaviors and Dispatch** (developers) → chapters: `1-fixed`, `2-relative`, `3-simulation-function`, `4-dispatch`, `5-endpoint-contract`\n\n## From: Behaviors and Dispatch — 1. Fixed\n\nUse fixed behavior for health endpoints, stable metadata, constants, and simple fixtures.\n\n```ts\n{\n id: 'capabilities',\n method: 'GET',\n path: '/capabilities',\n behavior: {\n type: 'fixed',\n response: {\n status: 200,\n headers: { 'x-simulator': 'true' },\n body: { features: ['read', 'search'] }\n }\n }\n}\n```\n\n---\n\n## From: Behaviors and Dispatch — 2. Relative\n\nRelative behavior starts with configured JSON, then resolves tokens against the matched request and the API's internal `data` object.\n\nSupported token roots:\n\n- `{{request.params.parentId}}`\n- `{{request.query.page}}`\n- `{{request.headers.x-tenant-id}}`\n- `{{request.body.customer.id}}`\n- `{{data.children}}`\n- Array indexes, such as `{{data.users[0].id}}`\n\n```ts\n{\n id: 'children',\n method: 'GET',\n path: '/parents/:parentId/children',\n behavior: {\n type: 'relative',\n response: {\n body: {\n parentId: '{{request.params.parentId}}',\n items: '{{data.children}}'\n }\n }\n }\n}\n```\n\nA token occupying the entire string preserves its original type. Therefore, `{{request.body.limit}}` can produce a number and `{{data.children}}` can produce an array. A token embedded inside text is converted to a string:\n\n```ts\n{ message: 'Children for parent {{request.params.parentId}}' }\n```\n\nTokens inside API-local data are rendered too. This lets a reusable internal fixture inherit an identifier from the incoming request:\n\n```ts\ndata: {\n children: [\n { id: 'child-1', parentId: '{{request.params.parentId}}' }\n ]\n}\n```\n\nRelative behavior is strict by default. A missing token throws `TemplateResolutionError`. Set `strict: false` to leave unresolved tokens unchanged.\n\n---\n\n## From: Behaviors and Dispatch — 3. Simulation function\n\nUse a simulation function when output needs conditions, calculations, validation, generated values, branching, or error responses.\n\n```ts\n{\n id: 'quote',\n method: 'POST',\n path: '/quote',\n behavior: {\n type: 'simulation',\n handler: async ({ request, data, apiId, endpointId }) => {\n const quantity = Number((request.body as { quantity: number }).quantity);\n const unitPrice = Number(data.unitPrice);\n\n return {\n status: 201,\n body: {\n apiId,\n endpointId,\n quantity,\n unitPrice,\n total: quantity * unitPrice\n }\n };\n }\n }\n}\n```\n\n---\n\n## From: Behaviors and Dispatch — 4. Dispatch\n\n```ts\nconst result = await simulator.dispatch({\n method: 'GET',\n path: '/api/v1/parents/parent-42/children'\n});\n\nconsole.log(result.response.body);\n```\n\n`dispatch()` throws `EndpointNotFoundError` when nothing matches. `tryDispatch()` returns `undefined` instead.\n\n---\n\n## From: Behaviors and Dispatch — 5. Endpoint contract\n\n```ts\ntype EndpointDefinition = {\n id: string;\n method: HttpMethod;\n path: string;\n enabled?: boolean;\n delayMs?: number;\n behavior:\n | { type: 'fixed'; response: SimulatorResponse }\n | { type: 'relative'; response: SimulatorResponse; strict?: boolean }\n | { type: 'simulation'; handler: SimulationFunction };\n};\n```\n\nThe discriminated `behavior` union is the core guarantee: an endpoint cannot validly have two behaviors, and it cannot omit its behavior.\n\n---\n\n## Also see\n\n- **Behaviors and Dispatch** (`01-behaviors`) — The three endpoint behaviors, dispatch APIs, contracts, latency, raw bodies, and path patterns.\n- **Adapters and Helpers** (`02-adapters`) — Expose simulators over HTTP, compose helpers, and plug into Express, Fastify, or fetch runtimes.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
571
571
  "downloads/use-cases/expose-node-service.md": "# Expose a Node.js HTTP service\n\n> **Use case id:** `expose-node-service`\n> **Goal:** Wrap a simulator with the Node HTTP adapter, and for processes that bind a port use @x12i/core-service (/health, /_live).\n> **Audiences:** developers\n> **Tags:** node, http, adapters, core-service\n\n## Reading path\n\n1. **Adapters and Helpers** (developers) → chapters: `1-node-http-adapter`, `2-http-process-compliance-local-services`, `3-multiple-apis`, `7-express-and-fastify`\n\n## From: Adapters and Helpers — 1. Node HTTP adapter\n\n```ts\nimport { createServer } from 'node:http';\nimport { createNodeHttpHandler } from '@x12i/api-simulator/node';\n\ncreateServer(createNodeHttpHandler(simulator)).listen(5520);\n```\n\nThe adapter:\n\n- parses URL path and query values;\n- normalizes request headers to lowercase keys (values may be `string | string[]`);\n- parses JSON, urlencoded, and text bodies by default; returns `Buffer` for binary;\n- returns `404` when no simulated endpoint matches;\n- returns `500` when rendering or simulation fails;\n- limits request bodies to 1 MiB by default;\n- writes `RawResponseBody` verbatim (HTML/XML/CSV/binary).\n\nThe `./node` adapter is **transport-only**. It does not bind ports, serve `/_live`, or print a compliance banner. Processes that **listen on HTTP** should wrap it with `@x12i/core-service` (next section).\n\n---\n\n## From: Adapters and Helpers — 2. HTTP process compliance (local services)\n\nAny example or package simulator that **binds an HTTP port** should use [`@x12i/core-service`](https://www.npmjs.com/package/@x12i/core-service) (pulls `@x12i/api-live-view`; uses `@x12i/ports-manager`).\n\nProduct contract (current **`@x12i/memorix-docs`**, not old memorix-ebooks):\n\n- Use case **`http-process-compliance`**\n- Building Services (developers) → **HTTP process compliance (local services)**\n- Deep reference: package READMEs for `core-service`, `ports-manager`, `api-live-view`\n\nThis repo applies that contract in zone **`api-simulator` (5520–5539)** — not Memorix’s 5100–5119.\n\n| Surface | Role |\n|--------|------|\n| Port from zone map | `scripts/api-simulator-ports.mjs` / `createSimulatorHttp` |\n| `GET /health` | Process liveness |\n| `/_live` | In-process request rings (api-live-view) |\n| `x-correlation-id` | Request/response correlation |\n| Startup banner | origin · health · live · docs |\n\nShared helper:\n\n```js\nimport { createSimulatorHttp } from '../../scripts/create-simulator-http.mjs';\n\nconst { core, announce } = createSimulatorHttp({\n id: 'my-simulator',\n title: 'My package simulator',\n portKey: 'api', // or flowstate / libraryDemo\n portEnv: 'API_SIMULATOR_API_PORT'\n});\n\nconst server = createServer(async (req, res) => {\n if (await core.tryHandleCore(req, res)) return;\n await createNodeHttpHandler(simulator)(req, res);\n});\n\nawait announce(server);\n```\n\nPublished `@x12i/api-simulator` stays **zero runtime dependencies**. Remote *clients* do not install these kits; *servers that bind* do.\n\n---\n\n## From: Adapters and Helpers — 3. Multiple APIs\n\nA single simulator can expose many APIs. Each API has its own `id`, optional `basePath`, internal `data`, and endpoints.\n\n```ts\nconst simulator = createApiSimulator({\n apis: [crmApi, billingApi, identityApi]\n});\n```\n\nDuplicate `METHOD + full path` routes are rejected during startup. Structurally ambiguous routes such as `/users/:id` and `/users/:name` are also rejected. Static routes are matched before parameter routes.\n\n---\n\n## From: Adapters and Helpers — 7. Express and Fastify\n\n```ts\n// Express\napp.use(async (req, res) => {\n const match = await simulator.tryDispatch({\n method: req.method,\n path: req.path,\n headers: req.headers,\n query: req.query,\n body: req.body\n });\n if (!match) return res.status(404).json({ error: 'NOT_FOUND' });\n res.status(match.response.status ?? 200).set(match.response.headers ?? {}).send(match.response.body);\n});\n```\n\n---\n\n## Also see\n\n- **Adapters and Helpers** (`02-adapters`) — Expose simulators over HTTP, compose helpers, and plug into Express, Fastify, or fetch runtimes.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
572
572
  "downloads/use-cases/library-demo-rest.md": "# Build a plain REST package simulator\n\n> **Use case id:** `library-demo-rest`\n> **Goal:** Follow the library-demo path: data modules, relative/simulation endpoints, no Memorix.\n> **Audiences:** developers\n> **Tags:** examples, rest, tutorial\n\n## Reading path\n\n1. **Package Simulators** (developers) → chapters: `1-what-a-package-simulator-is`, `3-plain-rest-library-demo`\n1. **Behaviors and Dispatch** (developers) → chapters: `2-relative`, `3-simulation-function`\n\n## From: Package Simulators — 1. What a package simulator is\n\nA **package simulator** is a small product-owned package that uses `@x12i/api-simulator` as the engine and ships its own:\n\n- **logic** — `simulation` handlers (and optional `createStore` state)\n- **data** — seeds under `api.data` and/or fixture JSON\n- **metadata** — when the product speaks Memorix, declarative packs and explorer fixtures\n\nThe core library stays **zero runtime dependencies** and does not load data or metadata from disk, MongoDB, or HTTP. Your package (or an example like `examples/flowstate-simulator`) owns that.\n\n---\n\n## From: Package Simulators — 3. Plain REST library-demo\n\nIf the API is ordinary REST (no Memorix), follow [`examples/library-demo/TUTORIAL.md`](../../../examples/library-demo/TUTORIAL.md):\n\n1. Data modules seed `api.data` / `createStore`.\n2. Relative endpoints for list/read shapes; simulation handlers for writes and branching.\n3. `createApiSimulator` + optional Node HTTP entry — **no** `@x12i/static-memorix`.\n\nRunnable reference: [`examples/library-demo/`](../../../examples/library-demo).\n\n---\n\n## From: Behaviors and Dispatch — 2. Relative\n\nRelative behavior starts with configured JSON, then resolves tokens against the matched request and the API's internal `data` object.\n\nSupported token roots:\n\n- `{{request.params.parentId}}`\n- `{{request.query.page}}`\n- `{{request.headers.x-tenant-id}}`\n- `{{request.body.customer.id}}`\n- `{{data.children}}`\n- Array indexes, such as `{{data.users[0].id}}`\n\n```ts\n{\n id: 'children',\n method: 'GET',\n path: '/parents/:parentId/children',\n behavior: {\n type: 'relative',\n response: {\n body: {\n parentId: '{{request.params.parentId}}',\n items: '{{data.children}}'\n }\n }\n }\n}\n```\n\nA token occupying the entire string preserves its original type. Therefore, `{{request.body.limit}}` can produce a number and `{{data.children}}` can produce an array. A token embedded inside text is converted to a string:\n\n```ts\n{ message: 'Children for parent {{request.params.parentId}}' }\n```\n\nTokens inside API-local data are rendered too. This lets a reusable internal fixture inherit an identifier from the incoming request:\n\n```ts\ndata: {\n children: [\n { id: 'child-1', parentId: '{{request.params.parentId}}' }\n ]\n}\n```\n\nRelative behavior is strict by default. A missing token throws `TemplateResolutionError`. Set `strict: false` to leave unresolved tokens unchanged.\n\n---\n\n## From: Behaviors and Dispatch — 3. Simulation function\n\nUse a simulation function when output needs conditions, calculations, validation, generated values, branching, or error responses.\n\n```ts\n{\n id: 'quote',\n method: 'POST',\n path: '/quote',\n behavior: {\n type: 'simulation',\n handler: async ({ request, data, apiId, endpointId }) => {\n const quantity = Number((request.body as { quantity: number }).quantity);\n const unitPrice = Number(data.unitPrice);\n\n return {\n status: 201,\n body: {\n apiId,\n endpointId,\n quantity,\n unitPrice,\n total: quantity * unitPrice\n }\n };\n }\n }\n}\n```\n\n---\n\n## Also see\n\n- **Package Simulators** (`03-package-simulators`) — Ship logic, data, and optional Memorix fixtures in a product package — with or without static-memorix.\n- **Behaviors and Dispatch** (`01-behaviors`) — The three endpoint behaviors, dispatch APIs, contracts, latency, raw bodies, and path patterns.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
573
- "downloads/use-cases/orient-simulator.md": "# Orient on api-simulator\n\n> **Use case id:** `orient-simulator`\n> **Goal:** Understand what the library does, install it, and run a minimal three-behavior example.\n> **Audiences:** developers\n> **Tags:** start-here, overview\n\n## Reading path\n\n1. **Overview** (developers) → chapters: `1-what-it-is`, `2-install`, `3-minimal-example`, `4-where-to-go-next`\n\n## From: Overview — 1. What it is\n\nCore TypeScript framework for building simulated API services.\n\nEach endpoint defines **exactly one** behavior:\n\n1. `fixed` — always return the configured response.\n2. `relative` — render a configured JSON response using values from the request and API-local data.\n3. `simulation` — run a function that receives the matched request and returns a response.\n\nThe core is transport-agnostic. It can be called directly from tests, wrapped by Fastify/Express, or exposed through the included Node.js HTTP adapter.\n\n**Data and metadata:** this package does **not** load fixtures from disk, MongoDB, Memorix, or HTTP. Consumers pass an in-memory `SimulatorDefinition` (`api.data` + endpoints). Optional helpers (`createStore`, OpenAPI) still take data you supply. Product-owned **package simulators** ship their own logic, data, and (when needed) Memorix fixtures.\n\n---\n\n## From: Overview — 2. Install\n\n```bash\nnpm install @x12i/api-simulator\n```\n\nRequires Node.js 20+.\n\n---\n\n## From: Overview — 3. Minimal example\n\n```ts\nimport { createApiSimulator } from '@x12i/api-simulator';\n\nconst simulator = createApiSimulator({\n apis: [\n {\n id: 'objects-api',\n basePath: '/api/v1',\n data: {\n children: [\n {\n id: 'child-1',\n parentId: '{{request.params.parentId}}'\n },\n {\n id: 'child-2',\n parentId: '{{request.params.parentId}}'\n }\n ]\n },\n endpoints: [\n {\n id: 'health',\n method: 'GET',\n path: '/health',\n behavior: {\n type: 'fixed',\n response: {\n status: 200,\n body: { status: 'ok' }\n }\n }\n },\n {\n id: 'list-children',\n method: 'GET',\n path: '/parents/:parentId/children',\n behavior: {\n type: 'relative',\n response: {\n body: {\n parentId: '{{request.params.parentId}}',\n items: '{{data.children}}'\n }\n }\n }\n },\n {\n id: 'calculate-score',\n method: 'POST',\n path: '/score',\n behavior: {\n type: 'simulation',\n handler: ({ request }) => {\n const values = (request.body as { values: number[] }).values;\n return {\n body: {\n score: values.reduce((sum, value) => sum + value, 0)\n }\n };\n }\n }\n }\n ]\n }\n ]\n});\n```\n\n---\n\n## From: Overview — 4. Where to go next\n\n- Try the **Playground** app (anonymous, ~30-second first dispatch).\n- Author projects in **Studio** (local-first).\n- Follow [`examples/library-demo/TUTORIAL.md`](../../../examples/library-demo/TUTORIAL.md) for a guided REST walkthrough.\n- Or [`examples/flowstate-simulator/TUTORIAL.md`](../../../examples/flowstate-simulator/TUTORIAL.md) to compose with `@x12i/static-memorix`.\n- Use cases: `orient-simulator`, `define-three-behaviors`, `ship-package-simulator`.\n\n## Also see\n\n- **Overview** (`00-overview`) — Install, a minimal three-behavior example, and where to go next.\n- **Behaviors and Dispatch** (`01-behaviors`) — The three endpoint behaviors, dispatch APIs, contracts, latency, raw bodies, and path patterns.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
573
+ "downloads/use-cases/orient-simulator.md": "# Orient on api-simulator\n\n> **Use case id:** `orient-simulator`\n> **Goal:** Understand what the library does, install it, and run a minimal three-behavior example.\n> **Audiences:** developers\n> **Tags:** start-here, overview\n\n## Reading path\n\n1. **Overview** (developers) → chapters: `1-what-it-is`, `2-install`, `3-minimal-example`, `4-where-to-go-next`\n\n## From: Overview — 1. What it is\n\nCore TypeScript framework for building simulated API services.\n\nEach endpoint defines **exactly one** behavior:\n\n1. `fixed` — always return the configured response.\n2. `relative` — render a configured JSON response using values from the request and API-local data.\n3. `simulation` — run a function that receives the matched request and returns a response.\n\nThe core is transport-agnostic. It can be called directly from tests, wrapped by Fastify/Express, or exposed through the included Node.js HTTP adapter.\n\n**Data and metadata:** this package does **not** load fixtures from disk, MongoDB, Memorix, or HTTP. Consumers pass an in-memory `SimulatorDefinition` (`api.data` + endpoints). Optional helpers (`createStore`, OpenAPI) still take data you supply. Product-owned **package simulators** ship their own logic, data, and (when needed) Memorix fixtures.\n\n---\n\n## From: Overview — 2. Install\n\n```bash\nnpm install @x12i/api-simulator\n```\n\nRequires Node.js 20+.\n\nFor agents and assembled use-case / book markdown packs (devDependency only):\n\n```bash\nnpm i -D @x12i/api-simulator-docs\n```\n\nThen: `npx api-simulator-docs list-use-cases` · `npx api-simulator-docs use-case orient-simulator`.\n\n---\n\n## From: Overview — 3. Minimal example\n\n```ts\nimport { createApiSimulator } from '@x12i/api-simulator';\n\nconst simulator = createApiSimulator({\n apis: [\n {\n id: 'objects-api',\n basePath: '/api/v1',\n data: {\n children: [\n {\n id: 'child-1',\n parentId: '{{request.params.parentId}}'\n },\n {\n id: 'child-2',\n parentId: '{{request.params.parentId}}'\n }\n ]\n },\n endpoints: [\n {\n id: 'health',\n method: 'GET',\n path: '/health',\n behavior: {\n type: 'fixed',\n response: {\n status: 200,\n body: { status: 'ok' }\n }\n }\n },\n {\n id: 'list-children',\n method: 'GET',\n path: '/parents/:parentId/children',\n behavior: {\n type: 'relative',\n response: {\n body: {\n parentId: '{{request.params.parentId}}',\n items: '{{data.children}}'\n }\n }\n }\n },\n {\n id: 'calculate-score',\n method: 'POST',\n path: '/score',\n behavior: {\n type: 'simulation',\n handler: ({ request }) => {\n const values = (request.body as { values: number[] }).values;\n return {\n body: {\n score: values.reduce((sum, value) => sum + value, 0)\n }\n };\n }\n }\n }\n ]\n }\n ]\n});\n```\n\n---\n\n## From: Overview — 4. Where to go next\n\n- Try the **Playground** app (anonymous, ~30-second first dispatch).\n- Author projects in **Studio** (local-first).\n- Follow [`examples/library-demo/TUTORIAL.md`](../../../examples/library-demo/TUTORIAL.md) for a guided REST walkthrough.\n- Or [`examples/flowstate-simulator/TUTORIAL.md`](../../../examples/flowstate-simulator/TUTORIAL.md) to compose with `@x12i/static-memorix`.\n- Use cases: `orient-simulator`, `define-three-behaviors`, `ship-package-simulator` (`npm i -D @x12i/api-simulator-docs`).\n\n## Also see\n\n- **Overview** (`00-overview`) — Install, a minimal three-behavior example, and where to go next.\n- **Behaviors and Dispatch** (`01-behaviors`) — The three endpoint behaviors, dispatch APIs, contracts, latency, raw bodies, and path patterns.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
574
574
  "downloads/use-cases/run-playground-studio.md": "# Run Playground and Studio\n\n> **Use case id:** `run-playground-studio`\n> **Goal:** Start the local UI apps, know the port map, and understand the product rule.\n> **Audiences:** developers\n> **Tags:** ui, playground, studio\n\n## Reading path\n\n1. **Playground and Studio** (developers) → chapters: `1-two-surfaces`, `2-run-locally`, `3-ports`, `4-product-rule`\n\n## From: Playground and Studio — 1. Two surfaces\n\nTwo separate UI apps over `@x12i/api-simulator`. They are **not** one merged workspace.\n\n| Surface | Job | Mindset |\n|---|---|---|\n| Playground (`apps/playground`) | Try a request in ~30 seconds | Ephemeral, session-only |\n| Studio (`apps/studio`) | Author and own a simulator | Persistent (IndexedDB), exportable |\n\nPlayground **Open in Studio** hands off the current definition via `sessionStorage`.\n\n---\n\n## From: Playground and Studio — 2. Run locally\n\nFrom the repo root (after `npm install` and `npm run build`):\n\n```bash\nnpm run build\nnpm run dev -w @x12i/playground # http://127.0.0.1:5523\nnpm run dev -w @x12i/studio # http://127.0.0.1:5521\n```\n\nOr use the root aliases: `npm run dev:playground` / `npm run dev:studio`.\n\n---\n\n## From: Playground and Studio — 3. Ports\n\nPorts come from [`@x12i/ports-manager`](https://www.npmjs.com/package/@x12i/ports-manager) zone **`api-simulator`** (5520–5539, even = API, odd = UI). Wrapper: [`scripts/api-simulator-ports.mjs`](../../../scripts/api-simulator-ports.mjs).\n\n| Name | Port | Role |\n|------|------|------|\n| `api` / library-demo / codegen | 5520 | API |\n| `studio` (Vite) | 5521 | UI |\n| `flowstate` compose server | 5522 | API |\n| `playground` (Vite) | 5523 | UI |\n\n```bash\nnpx x12i-ports zone api-simulator\n```\n\n**UI apps vs API processes:** Playground and Studio are Vite **UI** processes (odd ports). They do not need `@x12i/core-service` `/_live`. Example **API** processes that bind even ports (library-demo, FlowState compose, `node-server`) use `@x12i/core-service` for `/health` and `/_live` — see [Adapters — HTTP process compliance](../02-adapters/developers/BOOK.md#2-http-process-compliance-local-services).\n\n---\n\n## From: Playground and Studio — 4. Product rule\n\nBoth apps edit a UI model that maps to `SimulatorDefinition` / endpoint behaviors. The library remains the API of record; the UIs generate and preview — they do not invent a parallel DSL.\n\n---\n\n## Also see\n\n- **Playground and Studio** (`04-playground-studio`) — Two UI apps over the same library: ephemeral Playground and local-first Studio.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
575
575
  "downloads/use-cases/ship-package-simulator.md": "# Ship a package simulator\n\n> **Use case id:** `ship-package-simulator`\n> **Goal:** Structure a product-owned package with logic, data, optional static-memorix composition, and core-service on the HTTP entry.\n> **Audiences:** developers\n> **Tags:** packages, memorix, core-service\n\n## Reading path\n\n1. **Package Simulators** (developers) → chapters: `1-what-a-package-simulator-is`, `2-recommended-structure`, `4-with-static-memorix`\n1. **Adapters and Helpers** (developers) → chapters: `2-http-process-compliance-local-services`\n\n## From: Package Simulators — 1. What a package simulator is\n\nA **package simulator** is a small product-owned package that uses `@x12i/api-simulator` as the engine and ships its own:\n\n- **logic** — `simulation` handlers (and optional `createStore` state)\n- **data** — seeds under `api.data` and/or fixture JSON\n- **metadata** — when the product speaks Memorix, declarative packs and explorer fixtures\n\nThe core library stays **zero runtime dependencies** and does not load data or metadata from disk, MongoDB, or HTTP. Your package (or an example like `examples/flowstate-simulator`) owns that.\n\n---\n\n## From: Package Simulators — 2. Recommended structure\n\n```text\nmy-provider-simulator/\n├─ mocks/ # optional — shared with static-memorix when used\n│ ├─ data/\n│ ├─ metadata/\n│ └─ metadata-packs/\n├─ src/\n│ ├─ data/ # seeds for api.data / createStore\n│ ├─ simulations/ # package-specific handlers\n│ ├─ api.ts # createApiSimulator({ apis: [...] })\n│ ├─ memorix.ts # optional — buildServer({ MOCKS_DIR })\n│ └─ server.ts # Node/HTTP entry: core-service + tryDispatch ± forward\n└─ package.json\n```\n\nKeep provider-specific data and simulation logic outside `@x12i/api-simulator`. The core remains the reusable engine.\n\nHTTP entrypoints that bind a port use [`@x12i/core-service`](https://www.npmjs.com/package/@x12i/core-service) (see [Adapters — HTTP process compliance](../02-adapters/developers/BOOK.md#2-http-process-compliance-local-services)). Shared helper in this repo: [`scripts/create-simulator-http.mjs`](../../../scripts/create-simulator-http.mjs).\n\n---\n\n## From: Package Simulators — 4. With static-memorix\n\nFor Memorix Explorer (`/api/explorer/*`) and Metadata (`/api/metadata/*`) parity without MongoDB/Redis, compose [`@x12i/static-memorix`](https://www.npmjs.com/package/@x12i/static-memorix):\n\n1. Keep a shared `mocks/` tree (`data/`, `metadata/`, `metadata-packs/`).\n2. Load seeds into package REST via small helpers (see the FlowState example’s `src/bridge.mjs`).\n3. Run `buildServer()` / `startServer()` with `MOCKS_DIR` pointing at that tree.\n4. Serve one port with `@x12i/core-service`: `tryHandleCore` → `tryDispatch` package routes → forward misses to static-memorix (`inject`).\n\n| Surface | Owner |\n|--------|--------|\n| `/health`, `/_live` | `@x12i/core-service` (zone `api-simulator`) |\n| `/api/v1/<your-product>/*` | `@x12i/api-simulator` endpoints in your package |\n| `/api/explorer/*`, `/api/metadata/*` | `@x12i/static-memorix` (`MOCKS_DIR` → shared `mocks/`) |\n\n**Org scope:** `x-memorix-org-id` may be sent for client realism; it is a **no-op for isolation** in this simulator (not `memorix-service`).\n\nstatic-memorix is not a substitute for full `memorix-service` (pipelines, relationship materialize, abstract reverse-write, etc.).\n\n---\n\n## From: Adapters and Helpers — 2. HTTP process compliance (local services)\n\nAny example or package simulator that **binds an HTTP port** should use [`@x12i/core-service`](https://www.npmjs.com/package/@x12i/core-service) (pulls `@x12i/api-live-view`; uses `@x12i/ports-manager`).\n\nProduct contract (current **`@x12i/memorix-docs`**, not old memorix-ebooks):\n\n- Use case **`http-process-compliance`**\n- Building Services (developers) → **HTTP process compliance (local services)**\n- Deep reference: package READMEs for `core-service`, `ports-manager`, `api-live-view`\n\nThis repo applies that contract in zone **`api-simulator` (5520–5539)** — not Memorix’s 5100–5119.\n\n| Surface | Role |\n|--------|------|\n| Port from zone map | `scripts/api-simulator-ports.mjs` / `createSimulatorHttp` |\n| `GET /health` | Process liveness |\n| `/_live` | In-process request rings (api-live-view) |\n| `x-correlation-id` | Request/response correlation |\n| Startup banner | origin · health · live · docs |\n\nShared helper:\n\n```js\nimport { createSimulatorHttp } from '../../scripts/create-simulator-http.mjs';\n\nconst { core, announce } = createSimulatorHttp({\n id: 'my-simulator',\n title: 'My package simulator',\n portKey: 'api', // or flowstate / libraryDemo\n portEnv: 'API_SIMULATOR_API_PORT'\n});\n\nconst server = createServer(async (req, res) => {\n if (await core.tryHandleCore(req, res)) return;\n await createNodeHttpHandler(simulator)(req, res);\n});\n\nawait announce(server);\n```\n\nPublished `@x12i/api-simulator` stays **zero runtime dependencies**. Remote *clients* do not install these kits; *servers that bind* do.\n\n---\n\n## Also see\n\n- **Package Simulators** (`03-package-simulators`) — Ship logic, data, and optional Memorix fixtures in a product package — with or without static-memorix.\n- **Adapters and Helpers** (`02-adapters`) — Expose simulators over HTTP, compose helpers, and plug into Express, Fastify, or fetch runtimes.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n"
576
576
  };
@@ -1 +1 @@
1
- {"version":3,"file":"bundle.js","sourceRoot":"","sources":["../../src/generated/bundle.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,OAAO,GAAG;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WAAW,EAAE,glCAAglC;IAC7lC,qBAAqB,EAAE,w3KAAw3K;IAC/4K,sDAAsD,EAAE,olBAAolB;IAC5oB,2CAA2C,EAAE,g0GAAg0G;IAC72G,uDAAuD,EAAE,8jCAA8jC;IACvnC,4CAA4C,EAAE,onIAAonI;IAClqI,sDAAsD,EAAE,qsDAAqsD;IAC7vD,2CAA2C,EAAE,i2LAAi2L;IAC94L,gEAAgE,EAAE,kzBAAkzB;IACp3B,qDAAqD,EAAE,mvHAAmvH;IAC1yH,+DAA+D,EAAE,osBAAosB;IACrwB,oDAAoD,EAAE,2qEAA2qE;IACjuE,+CAA+C,EAAE,8oIAA8oI;IAC/rI,4CAA4C,EAAE,6pIAA6pI;IAC3sI,0CAA0C,EAAE,ojIAAojI;IAChmI,yCAAyC,EAAE,22HAA22H;IACt5H,8CAA8C,EAAE,umFAAumF;IACvpF,+CAA+C,EAAE,+5KAA+5K;CACj9K,CAAC"}
1
+ {"version":3,"file":"bundle.js","sourceRoot":"","sources":["../../src/generated/bundle.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,OAAO,EAAE;QACP;YACE,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE,YAAY;YACrB,SAAS,EAAE,2BAA2B;YACtC,aAAa,EAAE,8GAA8G;SAC9H;KACF;IACD,UAAU,EAAE;QACV;YACE,IAAI,EAAE,eAAe;YACrB,MAAM,EAAE,eAAe;YACvB,SAAS,EAAE,8EAA8E;YACzF,aAAa,EAAE,iFAAiF;YAChG,OAAO,EAAE,SAAS;SACnB;KACF;IACD,OAAO,EAAE;QACP;YACE,IAAI,EAAE,aAAa;YACnB,UAAU,EAAE,eAAe;YAC3B,WAAW,EAAE;gBACX,YAAY;aACb;YACD,QAAQ,EAAE,WAAW;YACrB,QAAQ,EAAE,oBAAoB;YAC9B,OAAO,EAAE,UAAU;YACnB,UAAU,EAAE,uBAAuB;YACnC,OAAO,EAAE,kEAAkE;YAC3E,MAAM,EA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pF,+CAA+C,EAAE,+5KAA+5K;CACj9K,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x12i/api-simulator-docs",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "api-simulator docs knowledge SDK — install as a devDependency only. Catalog, use cases, and markdown packs for humans and agents.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -28,7 +28,7 @@
28
28
  "node": ">=20"
29
29
  },
30
30
  "dependencies": {
31
- "@x12i/docify-core": "^1.0.1",
31
+ "@x12i/docify-core": "^1.0.2",
32
32
  "@x12i/docify-sdk": "^1.0.1"
33
33
  },
34
34
  "devDependencies": {