{"_id":"@airnauts/airside-core","_rev":"7-39d1a0943e1a140bc2247d81834f9590","name":"@airnauts/airside-core","dist-tags":{"latest":"0.10.1"},"versions":{"0.8.0":{"name":"@airnauts/airside-core","version":"0.8.0","keywords":["comments","commenting","annotations","feedback","airnauts","zod","openapi"],"author":{"name":"Airnauts"},"license":"MIT","_id":"@airnauts/airside-core@0.8.0","maintainers":[{"name":"jkrzemie","email":"hello@airnauts.com"},{"name":"mateuszpaulski","email":"mateusz@airnauts.com"}],"homepage":"https://github.com/Airnauts/airside#readme","bugs":{"url":"https://github.com/Airnauts/airside/issues"},"dist":{"shasum":"808c10ec46ba2f756c48d49453a940e62be7871d","tarball":"https://registry.npmjs.org/@airnauts/airside-core/-/airside-core-0.8.0.tgz","fileCount":50,"integrity":"sha512-gtvmaqZ6cc5aShntL+qtqPyVGcbkrVG0s6sOewacU4MsmVYMEDdKftBTHAyk+DDOiFn6qdeVuYHC6trkY/jIIA==","signatures":[{"sig":"MEUCIQDkKjT8PKbzSoANxBLq7Y/LSS+510hVqgm/dLjNz+hwvQIgQknbUe7haDgct3qpBrA8nKC+shuhyqNR9WZv2RwPQ4Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":163932},"type":"module","_from":"file:airnauts-airside-core-0.8.0.tgz","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsup && tsc --build --force && tsx scripts/emit-openapi.ts","typecheck":"tsc --build","emit:openapi":"tsx scripts/emit-openapi.ts"},"_npmUser":{"name":"mateuszpaulski","email":"mateusz@airnauts.com"},"_resolved":"/tmp/95faffdc8890eb0d156375f102ccc58b/airnauts-airside-core-0.8.0.tgz","_integrity":"sha512-gtvmaqZ6cc5aShntL+qtqPyVGcbkrVG0s6sOewacU4MsmVYMEDdKftBTHAyk+DDOiFn6qdeVuYHC6trkY/jIIA==","repository":{"url":"git+https://github.com/Airnauts/airside.git","type":"git","directory":"packages/core"},"_npmVersion":"10.9.8","description":"Framework-agnostic core for the Airnauts embeddable commenting tool: zod schemas, page-key normalization, the scoring/threshold policy, and the OpenAPI contract.","directories":{},"_nodeVersion":"22.22.3","dependencies":{"zod":"^4.4.3","zod-openapi":"^5.4.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.22.3","@scalar/openapi-parser":"^0.28.5"},"_npmOperationalInternal":{"tmp":"tmp/airside-core_0.8.0_1781601750663_0.15241653291124546","host":"s3://npm-registry-packages-npm-production"}},"0.8.1":{"name":"@airnauts/airside-core","version":"0.8.1","keywords":["comments","commenting","annotations","feedback","airnauts","zod","openapi"],"author":{"name":"Airnauts"},"license":"MIT","_id":"@airnauts/airside-core@0.8.1","maintainers":[{"name":"jkrzemie","email":"hello@airnauts.com"},{"name":"mateuszpaulski","email":"mateusz@airnauts.com"}],"homepage":"https://github.com/Airnauts/airside#readme","bugs":{"url":"https://github.com/Airnauts/airside/issues"},"dist":{"shasum":"c78cde48c7de50d630af806798437604c2fa409d","tarball":"https://registry.npmjs.org/@airnauts/airside-core/-/airside-core-0.8.1.tgz","fileCount":50,"integrity":"sha512-v7zqgfIsR3VQNEgtoeLBO2NQhT386Rs58C+oZWnUE8z9ooj0pnPjSSr2x+Dz2sNOfEs/lUq0XB9S9nQHORZvpg==","signatures":[{"sig":"MEUCIHb2y07fsNVLLGvsb2IbygRptr6EgJmR9HSUZ56cCny7AiEAxwCgB4zZSRT3m5JINIVBVRHg/7YvDJo4WdFbELpA+ss=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":164373},"type":"module","_from":"file:airnauts-airside-core-0.8.1.tgz","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsup && tsc --build --force && tsx scripts/emit-openapi.ts","typecheck":"tsc --build","emit:openapi":"tsx scripts/emit-openapi.ts"},"_npmUser":{"name":"mateuszpaulski","email":"mateusz@airnauts.com"},"_resolved":"/tmp/6d1bd8e7388c0a53db96cb28e5394998/airnauts-airside-core-0.8.1.tgz","_integrity":"sha512-v7zqgfIsR3VQNEgtoeLBO2NQhT386Rs58C+oZWnUE8z9ooj0pnPjSSr2x+Dz2sNOfEs/lUq0XB9S9nQHORZvpg==","repository":{"url":"git+https://github.com/Airnauts/airside.git","type":"git","directory":"packages/core"},"_npmVersion":"10.9.8","description":"Framework-agnostic core for the Airnauts embeddable commenting tool: zod schemas, page-key normalization, the scoring/threshold policy, and the OpenAPI contract.","directories":{},"_nodeVersion":"22.22.3","dependencies":{"zod":"^4.4.3","zod-openapi":"^5.4.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.22.3","@scalar/openapi-parser":"^0.28.5"},"_npmOperationalInternal":{"tmp":"tmp/airside-core_0.8.1_1781606536125_0.9983272669120211","host":"s3://npm-registry-packages-npm-production"}},"0.8.2":{"name":"@airnauts/airside-core","version":"0.8.2","keywords":["comments","commenting","annotations","feedback","airnauts","zod","openapi"],"author":{"name":"Airnauts"},"license":"MIT","_id":"@airnauts/airside-core@0.8.2","maintainers":[{"name":"jkrzemie","email":"hello@airnauts.com"},{"name":"mateuszpaulski","email":"mateusz@airnauts.com"}],"homepage":"https://github.com/Airnauts/airside#readme","bugs":{"url":"https://github.com/Airnauts/airside/issues"},"dist":{"shasum":"9ba64081f55083d69795ab17f0bcdbd32260e3ad","tarball":"https://registry.npmjs.org/@airnauts/airside-core/-/airside-core-0.8.2.tgz","fileCount":50,"integrity":"sha512-eecDtdOJctJ0jS2PDCnU0KsscYY1DOJfs4pW4LksI0zh3GzJlt2nmTlgfaatDqsUocZu4pLdXHkfM4vAltWi7A==","signatures":[{"sig":"MEUCIQDgWPxrYso6QVot34dUqsF1Tul6OfHLK0o8CHGrpF/5VAIgIoeOYQRVXfXJvS1TENB9oQbxBL7/QJrrdCgXaM5w11o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":164373},"type":"module","_from":"file:airnauts-airside-core-0.8.2.tgz","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsup && tsc --build --force && tsx scripts/emit-openapi.ts","typecheck":"tsc --build","emit:openapi":"tsx scripts/emit-openapi.ts"},"_npmUser":{"name":"mateuszpaulski","email":"mateusz@airnauts.com"},"_resolved":"/tmp/58d3bc7c540003466beb82e07d806563/airnauts-airside-core-0.8.2.tgz","_integrity":"sha512-eecDtdOJctJ0jS2PDCnU0KsscYY1DOJfs4pW4LksI0zh3GzJlt2nmTlgfaatDqsUocZu4pLdXHkfM4vAltWi7A==","repository":{"url":"git+https://github.com/Airnauts/airside.git","type":"git","directory":"packages/core"},"_npmVersion":"10.9.8","description":"Framework-agnostic core for the Airnauts embeddable commenting tool: zod schemas, page-key normalization, the scoring/threshold policy, and the OpenAPI contract.","directories":{},"_nodeVersion":"22.22.3","dependencies":{"zod":"^4.4.3","zod-openapi":"^5.4.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.22.3","@scalar/openapi-parser":"^0.28.5"},"_npmOperationalInternal":{"tmp":"tmp/airside-core_0.8.2_1781610337189_0.2664263204772719","host":"s3://npm-registry-packages-npm-production"}},"0.9.0":{"name":"@airnauts/airside-core","version":"0.9.0","keywords":["comments","commenting","annotations","feedback","airnauts","zod","openapi"],"author":{"name":"Airnauts"},"license":"MIT","_id":"@airnauts/airside-core@0.9.0","maintainers":[{"name":"jkrzemie","email":"hello@airnauts.com"},{"name":"mateuszpaulski","email":"mateusz@airnauts.com"}],"homepage":"https://github.com/Airnauts/airside#readme","bugs":{"url":"https://github.com/Airnauts/airside/issues"},"dist":{"shasum":"9b1fa08d52a33cc867dfa3d8cc1362878d1d78da","tarball":"https://registry.npmjs.org/@airnauts/airside-core/-/airside-core-0.9.0.tgz","fileCount":50,"integrity":"sha512-s4ChSpSrPY5ADAk598obMNIvqrWoZ8L3heagGBf/ccTz1CGelHQDDEvdJlnL+lYeDnae1tZTz44wJnx4qrV/dg==","signatures":[{"sig":"MEUCIQDDAw4RX6zow+RatZdNB6zD83pNpDojOcLjhUNbht6mzQIgX6L7mqM0JHAgwqTA5vZ8q0yDVj6kmhGAly1Ca+w8o9c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":164373},"type":"module","_from":"file:airnauts-airside-core-0.9.0.tgz","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsup && tsc --build --force && tsx scripts/emit-openapi.ts","typecheck":"tsc --build","emit:openapi":"tsx scripts/emit-openapi.ts"},"_npmUser":{"name":"mateuszpaulski","email":"mateusz@airnauts.com"},"_resolved":"/tmp/57622d1c65ede94b6fe745daf569a9ae/airnauts-airside-core-0.9.0.tgz","_integrity":"sha512-s4ChSpSrPY5ADAk598obMNIvqrWoZ8L3heagGBf/ccTz1CGelHQDDEvdJlnL+lYeDnae1tZTz44wJnx4qrV/dg==","repository":{"url":"git+https://github.com/Airnauts/airside.git","type":"git","directory":"packages/core"},"_npmVersion":"10.9.8","description":"Framework-agnostic core for the Airnauts embeddable commenting tool: zod schemas, page-key normalization, the scoring/threshold policy, and the OpenAPI contract.","directories":{},"_nodeVersion":"22.22.3","dependencies":{"zod":"^4.4.3","zod-openapi":"^5.4.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.22.3","@scalar/openapi-parser":"^0.28.5"},"_npmOperationalInternal":{"tmp":"tmp/airside-core_0.9.0_1781622015994_0.060431343695981576","host":"s3://npm-registry-packages-npm-production"}},"0.9.1":{"name":"@airnauts/airside-core","version":"0.9.1","keywords":["comments","commenting","annotations","feedback","airnauts","zod","openapi"],"author":{"name":"Airnauts"},"license":"MIT","_id":"@airnauts/airside-core@0.9.1","maintainers":[{"name":"jkrzemie","email":"hello@airnauts.com"},{"name":"mateuszpaulski","email":"mateusz@airnauts.com"}],"homepage":"https://github.com/Airnauts/airside#readme","bugs":{"url":"https://github.com/Airnauts/airside/issues"},"dist":{"shasum":"1c86b6bea624d0134945dcb861bea98ba933060b","tarball":"https://registry.npmjs.org/@airnauts/airside-core/-/airside-core-0.9.1.tgz","fileCount":50,"integrity":"sha512-D+Thyx4AkyiqyaqP6l1Ie5YRGbrvJgGcX8ih086zjmr7XiIG+1B/pzk1C8uIjgDMAa/gRdV1cXVXS/NtVqMPjA==","signatures":[{"sig":"MEQCIGsIBEZ/g9zaqGw/CzgnM0nC1z8nVIPBNYYuhR+xxYe4AiAYtSV8c2lXqsXzgNdPbimZHK9sXyNL8ZipqWY/Oqh9PQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":164373},"type":"module","_from":"file:airnauts-airside-core-0.9.1.tgz","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsup && tsc --build --force && tsx scripts/emit-openapi.ts","typecheck":"tsc --build","emit:openapi":"tsx scripts/emit-openapi.ts"},"_npmUser":{"name":"mateuszpaulski","email":"mateusz@airnauts.com"},"_resolved":"/tmp/39239cbfeeafc0a2dc0f4f9399c8d4f3/airnauts-airside-core-0.9.1.tgz","_integrity":"sha512-D+Thyx4AkyiqyaqP6l1Ie5YRGbrvJgGcX8ih086zjmr7XiIG+1B/pzk1C8uIjgDMAa/gRdV1cXVXS/NtVqMPjA==","repository":{"url":"git+https://github.com/Airnauts/airside.git","type":"git","directory":"packages/core"},"_npmVersion":"10.9.8","description":"Framework-agnostic core for the Airnauts embeddable commenting tool: zod schemas, page-key normalization, the scoring/threshold policy, and the OpenAPI contract.","directories":{},"_nodeVersion":"22.22.3","dependencies":{"zod":"^4.4.3","zod-openapi":"^5.4.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.22.3","@scalar/openapi-parser":"^0.28.5"},"_npmOperationalInternal":{"tmp":"tmp/airside-core_0.9.1_1781770413880_0.6566199622805473","host":"s3://npm-registry-packages-npm-production"}},"0.10.0":{"name":"@airnauts/airside-core","version":"0.10.0","keywords":["comments","commenting","annotations","feedback","airnauts","zod","openapi"],"author":{"name":"Airnauts"},"license":"MIT","_id":"@airnauts/airside-core@0.10.0","maintainers":[{"name":"jkrzemie","email":"hello@airnauts.com"},{"name":"mateuszpaulski","email":"mateusz@airnauts.com"}],"homepage":"https://github.com/Airnauts/airside#readme","bugs":{"url":"https://github.com/Airnauts/airside/issues"},"dist":{"shasum":"2d06ab2301985f168f2104faf20ca6e7cf6cb540","tarball":"https://registry.npmjs.org/@airnauts/airside-core/-/airside-core-0.10.0.tgz","fileCount":50,"integrity":"sha512-cnxcv5Q+HBEkgL+AeO4Yz/G06dww/bq9JZznAsGYW8fIluXU5yBmSkKAmcroN0H5Bf//N7Cv6UuPAeFD7jwPXQ==","signatures":[{"sig":"MEUCIQC+GpPFdY4a6Pi4FpGpf6Xa/Sewd4RfU3S1nRy4LCOvXwIgb3iaaFI7UpFv6dNl6kTr3awICLOsVVcH1cn4CYyrtzc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":168278},"type":"module","_from":"file:airnauts-airside-core-0.10.0.tgz","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsup && tsc --build --force && tsx scripts/emit-openapi.ts","typecheck":"tsc --build","emit:openapi":"tsx scripts/emit-openapi.ts"},"_npmUser":{"name":"mateuszpaulski","email":"mateusz@airnauts.com"},"_resolved":"/tmp/d0e95d2b5ad51b757fa67557ac2d7786/airnauts-airside-core-0.10.0.tgz","_integrity":"sha512-cnxcv5Q+HBEkgL+AeO4Yz/G06dww/bq9JZznAsGYW8fIluXU5yBmSkKAmcroN0H5Bf//N7Cv6UuPAeFD7jwPXQ==","repository":{"url":"git+https://github.com/Airnauts/airside.git","type":"git","directory":"packages/core"},"_npmVersion":"10.9.8","description":"Framework-agnostic core for the Airnauts embeddable commenting tool: zod schemas, page-key normalization, the scoring/threshold policy, and the OpenAPI contract.","directories":{},"_nodeVersion":"22.23.0","dependencies":{"zod":"^4.4.3","zod-openapi":"^5.4.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.22.3","@scalar/openapi-parser":"^0.28.5"},"_npmOperationalInternal":{"tmp":"tmp/airside-core_0.10.0_1782730555711_0.22765600383343698","host":"s3://npm-registry-packages-npm-production"}},"0.10.1":{"name":"@airnauts/airside-core","version":"0.10.1","description":"Framework-agnostic core for the Airnauts embeddable commenting tool: zod schemas, page-key normalization, the scoring/threshold policy, and the OpenAPI contract.","keywords":["comments","commenting","annotations","feedback","airnauts","zod","openapi"],"license":"MIT","author":{"name":"Airnauts"},"homepage":"https://github.com/Airnauts/airside#readme","repository":{"type":"git","url":"git+https://github.com/Airnauts/airside.git","directory":"packages/core"},"bugs":{"url":"https://github.com/Airnauts/airside/issues"},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"publishConfig":{"access":"public"},"dependencies":{"zod":"^4.4.3","zod-openapi":"^5.4.6"},"devDependencies":{"@scalar/openapi-parser":"^0.28.5","tsx":"^4.22.3"},"scripts":{"build":"tsup && tsc --build --force && tsx scripts/emit-openapi.ts","typecheck":"tsc --build","test":"vitest run","emit:openapi":"tsx scripts/emit-openapi.ts"},"_id":"@airnauts/airside-core@0.10.1","_integrity":"sha512-Mp96ynfQquqXXPHWWJczatJYMxu92MRp3Y8pSraZykBsu05LrpCVqNIxyrWlj/aotZ4ULrotGS8Q+wdvMr9QfA==","_resolved":"/tmp/64acaab0f42728bec0bd4034f1f16ad9/airnauts-airside-core-0.10.1.tgz","_from":"file:airnauts-airside-core-0.10.1.tgz","_nodeVersion":"22.23.0","_npmVersion":"10.9.8","dist":{"integrity":"sha512-Mp96ynfQquqXXPHWWJczatJYMxu92MRp3Y8pSraZykBsu05LrpCVqNIxyrWlj/aotZ4ULrotGS8Q+wdvMr9QfA==","shasum":"9e6509d9b68799f646823d0181d8eb2488662e34","tarball":"https://registry.npmjs.org/@airnauts/airside-core/-/airside-core-0.10.1.tgz","fileCount":50,"unpackedSize":168278,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAaxJ32SeMqhbM/mNiF6JULECJxgyM7vYYQ4EndwZnTYAiAqrpERUF0u5ZS8eb+bMpxArf+86FywLh1Jpf+nkjNQTA=="}]},"_npmUser":{"name":"mateuszpaulski","email":"mateusz@airnauts.com"},"directories":{},"maintainers":[{"name":"jkrzemie","email":"hello@airnauts.com"},{"name":"mateuszpaulski","email":"mateusz@airnauts.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/airside-core_0.10.1_1782737641992_0.8264445963272165"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-16T09:22:30.428Z","modified":"2026-06-29T12:54:02.287Z","0.8.0":"2026-06-16T09:22:30.785Z","0.8.1":"2026-06-16T10:42:16.256Z","0.8.2":"2026-06-16T11:45:37.353Z","0.9.0":"2026-06-16T15:00:16.125Z","0.9.1":"2026-06-18T08:13:34.007Z","0.10.0":"2026-06-29T10:55:55.854Z","0.10.1":"2026-06-29T12:54:02.149Z"},"bugs":{"url":"https://github.com/Airnauts/airside/issues"},"author":{"name":"Airnauts"},"license":"MIT","homepage":"https://github.com/Airnauts/airside#readme","keywords":["comments","commenting","annotations","feedback","airnauts","zod","openapi"],"repository":{"type":"git","url":"git+https://github.com/Airnauts/airside.git","directory":"packages/core"},"description":"Framework-agnostic core for the Airnauts embeddable commenting tool: zod schemas, page-key normalization, the scoring/threshold policy, and the OpenAPI contract.","maintainers":[{"name":"jkrzemie","email":"hello@airnauts.com"},{"name":"mateuszpaulski","email":"mateusz@airnauts.com"}],"readme":"<p align=\"center\">\n  <a href=\"https://github.com/Airnauts/airside\">\n    <picture>\n      <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/Airnauts/airside/main/assets/airside-logo-dark.svg\">\n      <img src=\"https://raw.githubusercontent.com/Airnauts/airside/main/assets/airside-logo-light.svg\" alt=\"Airside\" height=\"40\">\n    </picture>\n  </a>\n  <h1 align=\"center\">\nEmbeddable Commenting Tool\n</h1>\n</p>\n\n# @airnauts/airside-core\n\nFramework-agnostic core for [Airside](https://github.com/Airnauts/airside): Zod schemas, page-key normalization, the anchor scoring/threshold policy, and the HTTP contract types shared by the client and server.\n\nMost consumers get this transitively via `@airnauts/airside-client` or `@airnauts/airside-server`. Install it directly only when you need the shared types in code that sits outside those packages.\n\n## Installation\n\n```bash\npnpm add @airnauts/airside-core\n# or\nnpm install @airnauts/airside-core\n```\n\n## Quick start\n\n```ts\nimport { normalizePageKey, threadLink, DEFAULT_THREAD_PARAM } from '@airnauts/airside-core'\n\n// Canonical page identity key (origin + pathname, trailing slash stripped)\nconst key = normalizePageKey('https://example.com/page/?q=1')\n// → \"https://example.com/page\"\n\n// Build a deep-link URL that focuses a thread when the page is opened\nconst url = threadLink('https://example.com/page', 'thread-abc123')\n// → \"https://example.com/page?airside-thread=thread-abc123\"\n```\n\n## API reference\n\n### Page key\n\n| Export | Signature / value |\n|---|---|\n| `normalizePageKey` | `(url: string \\| URL) => string` — `origin + pathname`, trailing slash stripped, hash and query excluded |\n| `PageKeyFn` | `type PageKeyFn = (url: string) => string` |\n\n### Deep-link\n\n| Export | Signature / value |\n|---|---|\n| `threadLink` | `(pageUrl: string, threadId: string, param?: string) => string` — appends `?<param>=<id>` to the page URL |\n| `DEFAULT_THREAD_PARAM` | `\"airside-thread\"` |\n\n### Anchor scoring (pure policy)\n\nThese are consumed by `@airnauts/airside-client` to implement re-matching. Integrators building custom anchoring can use them directly.\n\n| Export | Description |\n|---|---|\n| `scoreCandidate(stored, candidate)` | Score a candidate `Signals` object against the stored anchor signals; returns `ScoreResult { total, components, excluded }` |\n| `decide(scored, opts?)` | Pick the best match from an array of `{ ref, score }` entries; returns `Decision<T>` — `{ kind: 'anchored', winner, score }` or `{ kind: 'orphaned', reason }` |\n| `locateQuote(haystack, ctx)` | Find character offsets for a `QuoteContext` within a text string; returns `QuoteOffsets { start, end }` or `null` |\n| `DEFAULT_WEIGHTS` | Default scoring weights (stable attr +0.40, text +0.25, class +0.15, role +0.10, sibling +0.05, ancestor +0.05) |\n| `DEFAULT_THRESHOLDS` | `{ accept: 0.60, margin: 0.10 }` |\n\n### HTTP contract\n\nThese types describe the wire API served by `@airnauts/airside-server` and consumed by the client. They are defined as Zod schemas and exported both as schemas and as TypeScript types.\n\n**Request bodies / queries:**\n\n| Export | Description |\n|---|---|\n| `CreateThreadBody` | POST `/threads` body |\n| `ListThreadsQuery` | GET `/threads` query params |\n| `AddCommentBody` | POST `/threads/:id/comments` body |\n| `SetThreadStatusBody` | PATCH `/threads/:id` body |\n| `RefreshAnchorBody` | PATCH `/threads/:id/anchor` body |\n| `ThreadIdParam` | `:id` path param |\n| `ThreadActionParam` | `:id` + `:actionId` path params |\n\n**Responses:**\n\n| Export | Description |\n|---|---|\n| `ThreadListResponse` | `{ threads: ThreadListItem[]; nextCursor: string \\| null }` |\n\n**Domain types:**\n\n`Thread`, `Comment`, `Attachment`, `ThreadListItem`, `Anchor`, `Signals`, `Author`, `CaptureContext`, `Provenance`, `ExternalLink`, `ThreadStatus`, `AnchorState`, `ExtensionSlot`, `ThreadActionDescriptor`\n\n**OpenAPI:**\n\n| Export | Description |\n|---|---|\n| `buildOpenApiDocument()` | Returns the full OpenAPI 3.1 document object (served by the server at `GET /openapi.json`) |\n| `operations` | The frozen route table (`Operation[]`) |\n| `Operation` | Route descriptor type |\n\n**Wire constants:**\n\n| Export | Value |\n|---|---|\n| `KEY_HEADER_NAME` | `\"x-airside-key\"` |\n| `ERROR_CODES` | Tuple of all error code strings |\n| `ERROR_STATUS` | `Record<ErrorCode, number>` mapping codes to HTTP status |\n| `ErrorCode` | Union of all error code strings |\n| `ErrorResponse` | Zod schema for the error wire shape |\n\n### Branded ID types\n\n`ThreadId`, `CommentId`, `AuthorId`, `AttachmentId` — branded Zod string schemas; use these as the type for IDs in custom adapters.\n\n## Requirements\n\n- Node.js ≥ 18 (or any runtime that provides `URL`)\n- No DOM or Node-specific APIs — fully isomorphic\n\n## Related packages\n\nThis is the shared contract layer for the `@airnauts/airside-*` suite:\n\n- **`@airnauts/airside-client`** — widget engine and React wrapper\n- **`@airnauts/airside-server`** — HTTP server, use cases, and adapter interfaces\n- **`@airnauts/airside-adapter-mongo`** — MongoDB persistence\n- **`@airnauts/airside-adapter-postgres`** — PostgreSQL persistence\n- **`@airnauts/airside-storage-vercel-blob`** — Vercel Blob file storage\n- **`@airnauts/airside-storage-fs`** — filesystem file storage\n\nSee [docs/architecture.md](https://github.com/Airnauts/airside/blob/main/docs/architecture.md) for the full system design.\n\n## License\n\nMIT © Airnauts\n","readmeFilename":"README.md"}