{"_id":"@ambiten/adapter-runtime","_rev":"3-f381890348bd36141a2ef49bfa698f82","name":"@ambiten/adapter-runtime","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@ambiten/adapter-runtime","version":"1.0.0","keywords":[],"author":"","license":"ISC","_id":"@ambiten/adapter-runtime@1.0.0","maintainers":[{"name":"abimongo","email":"padave805@gmail.com"}],"homepage":"https://ambiten.dev","bugs":{"url":"https://github.com/AmbitenHQ/ambiten/issues"},"dist":{"shasum":"27d17acecafb03e10b216761bf7c8ff89f38db8c","tarball":"https://registry.npmjs.org/@ambiten/adapter-runtime/-/adapter-runtime-1.0.0.tgz","fileCount":15,"integrity":"sha512-hgOIXj24irx5uPFeGA1Mrmlxi/SMeue5ttsg4ow97Ns5HF3l6nTO+plbh84S/q+9IDH8eRCz9pgrZWt+VIVBcQ==","signatures":[{"sig":"MEUCIGoK4ewo4+aJAG/kzYcfGL26JX2Ko3lQC4w1I+F+DA4lAiEAp+GNA9CtaT+Urk13GLecTS1oVWSSJ4Svq+OnPz2/82o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15097},"main":"./dist/index.js","_from":"file:ambiten-adapter-runtime-1.0.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.11.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"scripts":{"test":"jest --detectOpenHandles --coverage","build":"pnpm -r run build:rtime","clean":"rimraf dist","release":"pnpm changeset version","changeset":"pnpm run changeset","build:rtime":"tsc -b tsconfig.json --force"},"_npmUser":{"name":"abimongo","email":"padave805@gmail.com"},"_resolved":"/tmp/0e4c349eab1e0e65a603979e1abd241c/ambiten-adapter-runtime-1.0.0.tgz","_integrity":"sha512-hgOIXj24irx5uPFeGA1Mrmlxi/SMeue5ttsg4ow97Ns5HF3l6nTO+plbh84S/q+9IDH8eRCz9pgrZWt+VIVBcQ==","repository":{"url":"git+https://github.com/AmbitenHQ/ambiten.git","type":"git","directory":"packages/adapter-runtime"},"_npmVersion":"11.17.0","description":"Runtime utilities for Ambiten multi-tenancy adapters","directories":{},"sideEffects":false,"_nodeVersion":"22.22.3","dependencies":{"@ambiten/core":"1.0.0","@ambiten/adapter-types":"1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.4.9","typescript":"^6.0.2","@types/jest":"^29.5.14","@types/node":"^25.5.0","@testing-library/jest-dom":"^6.9.1"},"_npmOperationalInternal":{"tmp":"tmp/adapter-runtime_1.0.0_1781347258327_0.7095272316826047","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@ambiten/adapter-runtime","version":"1.0.1","keywords":[],"author":"","license":"ISC","_id":"@ambiten/adapter-runtime@1.0.1","maintainers":[{"name":"abimongo","email":"padave805@gmail.com"}],"homepage":"https://docs.ambiten.dev","bugs":{"url":"https://github.com/AmbitenHQ/ambiten/issues"},"dist":{"shasum":"e900b761d31fc18c2bb2080bd6b99292f81f7310","tarball":"https://registry.npmjs.org/@ambiten/adapter-runtime/-/adapter-runtime-1.0.1.tgz","fileCount":15,"integrity":"sha512-ZUIR6iZa1VRok7GT2eBRgwM8OhuNrn4Z/n5BdtCKHetM/3yVbKYIu6dEY4JSzmwjXH8sllpxhLyop+/n2/ElCA==","signatures":[{"sig":"MEQCIHR4IrD/tKQQa5DAEtIdWQpqbIUFbKOB1zKow+t8np21AiAZo1f0ImC8j2DrWOkFic8QborO3iRTgGLFhGQozzb3LA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15167},"main":"./dist/index.js","_from":"file:ambiten-adapter-runtime-1.0.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.11.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"scripts":{"test":"jest --detectOpenHandles --coverage","build":"pnpm -r run build:rtime","clean":"rimraf dist","release":"pnpm changeset version","changeset":"pnpm run changeset","build:rtime":"tsc -b tsconfig.json --force"},"_npmUser":{"name":"abimongo","email":"padave805@gmail.com"},"_resolved":"/tmp/eee9b1f87dad16fe61305b7b3440a997/ambiten-adapter-runtime-1.0.1.tgz","_integrity":"sha512-ZUIR6iZa1VRok7GT2eBRgwM8OhuNrn4Z/n5BdtCKHetM/3yVbKYIu6dEY4JSzmwjXH8sllpxhLyop+/n2/ElCA==","repository":{"url":"git+https://github.com/AmbitenHQ/ambiten.git","type":"git","directory":"packages/adapter-runtime"},"_npmVersion":"12.0.2","description":"Runtime utilities for Ambiten multi-tenancy adapters","directories":{},"sideEffects":false,"_nodeVersion":"22.23.2","dependencies":{"@ambiten/adapter-types":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.4.9","typescript":"^6.0.2","@types/jest":"^29.5.14","@types/node":"^25.5.0","@ambiten/core":"1.2.1","@testing-library/jest-dom":"^6.9.1"},"peerDependencies":{"@ambiten/core":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/adapter-runtime_1.0.1_1789148266817_0.5282047437344601","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@ambiten/adapter-runtime","version":"1.0.2","description":"Runtime utilities for Ambiten multi-tenancy adapters","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/esm/index.d.ts","publishConfig":{"access":"public"},"sideEffects":false,"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.js"}}},"keywords":[],"author":"","license":"ISC","repository":{"type":"git","url":"git+https://github.com/AmbitenHQ/ambiten.git","directory":"packages/adapter-runtime"},"bugs":{"url":"https://github.com/AmbitenHQ/ambiten/issues"},"homepage":"https://docs.ambiten.dev","dependencies":{"@ambiten/adapter-types":"^1.0.1"},"peerDependencies":{"@ambiten/core":"^1.2.4"},"devDependencies":{"@testing-library/jest-dom":"^6.9.1","@types/jest":"^29.5.14","@types/node":"^25.5.0","jest":"^29.7.0","ts-jest":"^29.4.9","typescript":"^6.0.2","@ambiten/core":"1.2.4"},"engines":{"node":">=20.11.0"},"scripts":{"build:esm":"tsc -b tsconfig.esm.json --force","build:cjs":"tsc -b tsconfig.json --force && node scripts/fix-esm-extensions.mjs","build":"pnpm run clean && pnpm run build:esm && pnpm run build:cjs","test":"jest --detectOpenHandles --coverage","changeset":"pnpm run changeset","clean":"rimraf dist && rimraf ../../.cache/tsbuildinfo/adapter-runtime","release":"pnpm changeset version","postbuild:esm":"node scripts/add-esm-type.js"},"_id":"@ambiten/adapter-runtime@1.0.2","_integrity":"sha512-LV/phRwtLdQHFs6ta36woZ5K18s6ZgugeCrcu/8IecPIxncC4w4cxLMgVsNTcG38oRZfrcLNOuM0s4woqR2h4g==","_resolved":"/tmp/a472e5385293970ec83ede7fcf14c983/ambiten-adapter-runtime-1.0.2.tgz","_from":"file:ambiten-adapter-runtime-1.0.2.tgz","_nodeVersion":"22.23.2","_npmVersion":"12.0.2","dist":{"integrity":"sha512-LV/phRwtLdQHFs6ta36woZ5K18s6ZgugeCrcu/8IecPIxncC4w4cxLMgVsNTcG38oRZfrcLNOuM0s4woqR2h4g==","shasum":"ad0b0815285e7740ba88e8ff536dd4fa94304d9b","tarball":"https://registry.npmjs.org/@ambiten/adapter-runtime/-/adapter-runtime-1.0.2.tgz","fileCount":26,"unpackedSize":25083,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDH7RJgRKqWdiaxJb6uIXPizGVVIzWr2T+mEO1QL0DIyAiEA3aSIyOPmKHU8Uaox5hYdL0qn7OzIuRP4pDbp/PjGg1Y="}]},"_npmUser":{"name":"abimongo","email":"padave805@gmail.com"},"directories":{},"maintainers":[{"name":"abimongo","email":"padave805@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/adapter-runtime_1.0.2_1789377683669_0.5323230197489313"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-13T10:40:58.060Z","modified":"2026-09-14T09:21:23.999Z","1.0.0":"2026-06-13T10:40:58.484Z","1.0.1":"2026-09-11T17:37:46.940Z","1.0.2":"2026-09-14T09:21:23.788Z"},"bugs":{"url":"https://github.com/AmbitenHQ/ambiten/issues"},"license":"ISC","homepage":"https://docs.ambiten.dev","keywords":[],"repository":{"type":"git","url":"git+https://github.com/AmbitenHQ/ambiten.git","directory":"packages/adapter-runtime"},"description":"Runtime utilities for Ambiten multi-tenancy adapters","maintainers":[{"name":"abimongo","email":"padave805@gmail.com"}],"readme":"<div style=\"display: flex; align-items: center;\">\n<p >\n  <img\n    src=\"https://raw.githubusercontent.com/AmbitenHQ/ambiten/main/assets/ambiten-mark-192x192.png\"\n    width=\"56\"\n    alt=\"Ambiten\"\n  />  \n</p> <h2> @ambiten/adapter-runtime</h2>\n</div>\n\n<p align=\"center\">\n  <strong>Shared execution runtime for Ambiten adapters.</strong>\n</p>\n\n<p align=\"center\">\n  Provides the execution boundary, context propagation, tenant resolution, transaction coordination, and runtime lifecycle primitives used by the Ambiten adapter ecosystem.\n</p>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/@ambiten/adapter-runtime\">\n    <img src=\"https://img.shields.io/npm/v/@ambiten/adapter-runtime?style=flat-square\" alt=\"npm version\" />\n  </a>\n  <!-- <a href=\"https://ambiten.dev\">\n    <img src=\"https://img.shields.io/badge/docs-ambiten.dev-22c55e?style=flat-square\" alt=\"documentation\" />\n  </a> -->\n    <a href=\"https://github.com/AmbitenHQ/ambiten/stargazers\">\n    <img src=\"https://img.shields.io/github/stars/AmbitenHQ/ambiten?style=flat-square&color=1E88E5\" alt=\"GitHub stars\" />\n  </a>\n</p>\n\n---\n\n## Overview\n\n`@ambiten/adapter-runtime` is the shared execution layer that powers the Ambiten adapter ecosystem.\n\nIt provides the common runtime infrastructure used by framework integrations such as Express, Fastify, NestJS, GraphQL, and AWS Lambda.\n\nMost applications will never interact with this package directly. Instead, it operates behind the scenes to establish execution boundaries, propagate runtime context, coordinate transactions, resolve tenants, and maintain execution continuity across different environments.\n\nThe purpose of the package is to ensure that every adapter participates in the same runtime model regardless of framework or deployment target.\n\n## Installation\n\nThis package is installed automatically by Ambiten adapter packages and typically does not need to be added manually.\n\n```bash\nnpm install @ambiten/adapter-runtime\n```\n\n## Runtime Responsibility\n\nThe adapter runtime exists between the framework layer and the Ambiten runtime.\n\n```text\nIncoming Request\n        ↓\nFramework Adapter\n        ↓\nAdapter Runtime\n        ↓\nAmbitenContext\n        ↓\nModels & Services\n        ↓\nMongoDB\n```\n\nThe framework adapter establishes the entry point.\n\nThe adapter runtime establishes the execution boundary.\n\nThe Ambiten runtime then carries execution state throughout the remainder of the operation.\n\n## What the Runtime Provides\n\nThe adapter runtime provides the shared capabilities required by all adapter implementations.\n\nExecution context can be established consistently regardless of whether a request originates from Express, Fastify, GraphQL, NestJS, Lambda, or future adapter integrations.\n\nTenant resolution, request metadata propagation, transaction coordination, runtime instrumentation, and execution lifecycle management are all handled through a common runtime contract.\n\nThis allows adapter implementations to remain lightweight while sharing the same operational behavior.\n\n## Context Propagation\n\nOne of the primary responsibilities of the runtime is maintaining execution continuity.\n\n```text\nRequest\n   ↓\nExecution Boundary\n   ↓\nAmbitenContext\n   ↓\nServices\n   ↓\nModels\n```\n\nOnce context has been established, runtime state remains available throughout middleware, services, repositories, transactions, asynchronous operations, and model execution.\n\nThis allows application code to remain focused on business behavior rather than infrastructure plumbing.\n\n## Multi-Tenancy\n\nThe runtime provides shared tenant resolution primitives used by all Ambiten adapters.\n\n```text\nRequest\n   ↓\nTenant Resolution\n   ↓\nRuntime Context\n   ↓\nTenant-Aware Execution\n```\n\nThis ensures tenant-aware behavior remains consistent regardless of framework choice.\n\n## Transaction Coordination\n\nThe runtime also provides the execution mechanisms required for transaction-aware operations.\n\nTransaction state can propagate through the active runtime context, allowing multiple model operations to participate in a shared execution boundary without manual session management.\n\nThis behavior remains consistent across all supported adapters.\n\n## Who Should Use This Package?\n\nMost developers should use one of the framework-specific adapters:\n\n* `@ambiten/adapter-express`\n* `@ambiten/adapter-fastify`\n* `@ambiten/adapter-nestjs`\n* `@ambiten/adapter-graphql`\n* `@ambiten/adapter-lambda`\n\nDirect usage of `@ambiten/adapter-runtime` is generally reserved for adapter authors, framework integrations, and advanced runtime extensions.\n\n## Documentation\n\nComplete documentation is available at:\n\nhttps://docs.ambiten.dev\n\n## Related Packages\n\n* `@ambiten/core`\n* `@ambiten/adapter-express`\n* `@ambiten/adapter-fastify`\n* `@ambiten/adapter-nestjs`\n* `@ambiten/adapter-graphql`\n* `@ambiten/adapter-lambda`\n\n## License\n\nMIT\n","readmeFilename":"README.md"}