{"_id":"@adaptivemcp/extension","_rev":"9-abc1b3bad854498b0a068c075b3baf20","name":"@adaptivemcp/extension","dist-tags":{"latest":"0.4.0"},"versions":{"0.2.0":{"name":"@adaptivemcp/extension","version":"0.2.0","_id":"@adaptivemcp/extension@0.2.0","maintainers":[{"name":"kemalelmizan","email":"kemalelmizan@gmail.com"}],"dist":{"shasum":"b09bbc3b3b4c8308f41120061e988b4e40de2dce","tarball":"https://registry.npmjs.org/@adaptivemcp/extension/-/extension-0.2.0.tgz","fileCount":13,"integrity":"sha512-imYBqNbn3cdpARSceAxHN9GJD3P28oFZ9mnz7/S3nPMMl4ejiPxkSYU+6xV1OPmD7y46I+418bDyVcn/JgzfUw==","signatures":[{"sig":"MEUCIDJX8ZMNtI6iFOgHgsyGlUgL7lCKfgDuHFodnGoYJWS/AiEA8OGggjmIB32n7ABb1Exlz4yPEHC/k0/R7Ght/RZkD68=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12151},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"b9dccae7f134e038a09c1b9e11db8afbfa674ac8","scripts":{"test":"vitest run --config ../../vitest.config.ts","build":"tsc -p tsconfig.json"},"_npmUser":{"name":"kemalelmizan","email":"kemalelmizan@gmail.com"},"_npmVersion":"12.0.1","description":"Adaptive MCP extension: derives the YAML tools-metadata view from the SQLite SSOT and serves it to MCP clients.","directories":{},"_nodeVersion":"26.5.0","dependencies":{"js-yaml":"^4.1.0","@adaptivemcp/spec":"workspace:*","@adaptivemcp/memory":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.0","typescript":"^5.6.0","@types/node":"^22.0.0","@types/js-yaml":"^4.0.9"},"_npmOperationalInternal":{"tmp":"tmp/extension_0.2.0_1784422736203_0.4582184727304186","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@adaptivemcp/extension","version":"0.2.1","_id":"@adaptivemcp/extension@0.2.1","maintainers":[{"name":"kemalelmizan","email":"kemalelmizan@gmail.com"}],"dist":{"shasum":"cfd72b91295f40348a538663d17521140cbdac99","tarball":"https://registry.npmjs.org/@adaptivemcp/extension/-/extension-0.2.1.tgz","fileCount":14,"integrity":"sha512-gKs7JgwIsaeJaGgEgq2eVGfLQpxyihk17fx3R8dSlZfNTA/UrRo4q5TFXa5033A09Kah7V+wP8QBubhRxSH5LQ==","signatures":[{"sig":"MEUCIDPLckgI0yn/wvcUvOiiQYcEHyig1PN8IfvmuyU4MLYyAiEAozUstTmKXg85pzn4NWr7C8SEgvX4eS+2SF8kJ4Alxkc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14386},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"ab944f02101e63d3ee95f2f22e737b56193be024","scripts":{"test":"vitest run --config ../../vitest.config.ts","build":"tsc -p tsconfig.json"},"_npmUser":{"name":"kemalelmizan","email":"kemalelmizan@gmail.com"},"_npmVersion":"12.0.1","description":"Adaptive MCP extension: derives the YAML tools-metadata view from the SQLite SSOT and serves it to MCP clients.","directories":{},"_nodeVersion":"26.5.0","dependencies":{"js-yaml":"^4.1.0","@adaptivemcp/spec":"workspace:*","@adaptivemcp/memory":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.0","typescript":"^5.6.0","@types/node":"^22.0.0","@types/js-yaml":"^4.0.9"},"_npmOperationalInternal":{"tmp":"tmp/extension_0.2.1_1784423849814_0.41956641062490263","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@adaptivemcp/extension","version":"0.2.2","license":"MIT","_id":"@adaptivemcp/extension@0.2.2","maintainers":[{"name":"kemalelmizan","email":"kemalelmizan@gmail.com"}],"dist":{"shasum":"5d75ec40a042943a6009a3f784d9f3f454ac588c","tarball":"https://registry.npmjs.org/@adaptivemcp/extension/-/extension-0.2.2.tgz","fileCount":14,"integrity":"sha512-eTnE6sU/rraUzcY/D02CdcHn9lBNBba5drHqn7VDUGS9CcTauv2ZP3TUWPiQu8yB5B/u1O8GaeN6qMkUKpwXlA==","signatures":[{"sig":"MEQCIGGsncGuKCVKHqoR2ISTk6NgYi/+q5JehaKg92rEyZcmAiBxhkempEKkDyXiHTD50YUr30OG8ENPUVReyGoay5VwSA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14411},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"1e65d4d6c3ddd569340aea01b27469c545474896","scripts":{"test":"vitest run --config ../../vitest.config.ts","build":"tsc -p tsconfig.json"},"_npmUser":{"name":"kemalelmizan","email":"kemalelmizan@gmail.com"},"_npmVersion":"12.0.1","description":"Adaptive MCP extension: derives the YAML tools-metadata view from the SQLite SSOT and serves it to MCP clients.","directories":{},"_nodeVersion":"26.5.0","dependencies":{"js-yaml":"^4.1.0","@adaptivemcp/spec":"workspace:*","@adaptivemcp/memory":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.0","typescript":"^5.6.0","@types/node":"^22.0.0","@types/js-yaml":"^4.0.9"},"_npmOperationalInternal":{"tmp":"tmp/extension_0.2.2_1784432916154_0.1300661927925757","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@adaptivemcp/extension","version":"0.2.3","license":"MIT","_id":"@adaptivemcp/extension@0.2.3","maintainers":[{"name":"kemalelmizan","email":"kemalelmizan@gmail.com"}],"dist":{"shasum":"bb14de9777a6aba22018e6ab069b200e64831292","tarball":"https://registry.npmjs.org/@adaptivemcp/extension/-/extension-0.2.3.tgz","fileCount":14,"integrity":"sha512-c89hK3rW175n2CmMwuNRvfvZI1tsiEoMzx+UkIUghktTj19ja+vp4voiEw7zYnO6LkNGXZ/cMVtgu3tTpUdWDQ==","signatures":[{"sig":"MEUCIQDFVZhfS1s33yNPRKROd/cd0qPH+chvEtNyjAD5GNFpHQIgcbRuXd4ZyogSobsVZsH6e7FxOGVTwlIHNAhHGLToQGM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14408},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"507cfadb2e49ddec1f96ce96023d3bd8f01c17a1","scripts":{"test":"vitest run --config ../../vitest.config.ts","build":"tsc -p tsconfig.json"},"_npmUser":{"name":"kemalelmizan","email":"kemalelmizan@gmail.com"},"_npmVersion":"12.0.1","description":"Adaptive MCP extension: derives the YAML tools-metadata view from the SQLite store and serves it to MCP clients.","directories":{},"_nodeVersion":"26.5.0","dependencies":{"js-yaml":"^4.1.0","@adaptivemcp/spec":"workspace:*","@adaptivemcp/memory":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.0","typescript":"^5.6.0","@types/node":"^22.0.0","@types/js-yaml":"^4.0.9"},"_npmOperationalInternal":{"tmp":"tmp/extension_0.2.3_1784442197109_0.8919479413268407","host":"s3://npm-registry-packages-npm-production"}},"0.2.4":{"name":"@adaptivemcp/extension","version":"0.2.4","license":"MIT","_id":"@adaptivemcp/extension@0.2.4","maintainers":[{"name":"kemalelmizan","email":"kemalelmizan@gmail.com"}],"dist":{"shasum":"a1f7c4d7e5d40070e2cfdfb9d4d2d7a7cf005347","tarball":"https://registry.npmjs.org/@adaptivemcp/extension/-/extension-0.2.4.tgz","fileCount":14,"integrity":"sha512-Ulp6JeDbJ1UGjtI9zX0UNOfxYgvM/o1ZLkTcP1QZIF/Yeho53eOpWmyE4yM7E9VJex8+2RJYO3euG8b9VFq+CA==","signatures":[{"sig":"MEQCIAlrqFhqifowxnlqLiDFCOYcabkHGDgyVkROX80cf/YgAiBVjlXH9QlrVfy6zYUm6Nsf7Mp5qsfcXrl1JPimYNQ00Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14359},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"72b57ab2c6e3a08fc0a5446bb57e8bd75dd51477","scripts":{"test":"vitest run --config ../../vitest.config.ts","build":"tsc -p tsconfig.json"},"_npmUser":{"name":"kemalelmizan","email":"kemalelmizan@gmail.com"},"_npmVersion":"12.0.1","description":"Adaptive MCP extension: derives the YAML tools-metadata view from the SQLite store and serves it to MCP clients.","directories":{},"_nodeVersion":"26.5.0","dependencies":{"js-yaml":"^4.1.0","@adaptivemcp/spec":"workspace:*","@adaptivemcp/memory":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.0","typescript":"^5.6.0","@types/node":"^22.0.0","@types/js-yaml":"^4.0.9"},"_npmOperationalInternal":{"tmp":"tmp/extension_0.2.4_1784448367918_0.11286253940369773","host":"s3://npm-registry-packages-npm-production"}},"0.2.5":{"name":"@adaptivemcp/extension","version":"0.2.5","license":"MIT","_id":"@adaptivemcp/extension@0.2.5","maintainers":[{"name":"kemalelmizan","email":"kemalelmizan@gmail.com"}],"dist":{"shasum":"6d1e81c07979b326f6dc9ff315479fb22c2bb923","tarball":"https://registry.npmjs.org/@adaptivemcp/extension/-/extension-0.2.5.tgz","fileCount":14,"integrity":"sha512-gRc7tcMwkj2UwNVNYT4NLd14QV41F6p3yaKBgzq/lKELQc/3CLzgbXcgWeL/1ZPmU3/PO4CTJJJvUtwFqxKVqQ==","signatures":[{"sig":"MEUCIQCaW3cgok97nDnsidReRP833f7J/vw8KnfNvfsxypE9igIgd+WxoMCeho6EQgpiPoq+dGrE4noHU7OXJqQ3RONQATQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14399},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"00b51e676ad298a079f5de73e5cbea411fae39f2","scripts":{"test":"vitest run --config ../../vitest.config.ts","build":"tsc -p tsconfig.json"},"_npmUser":{"name":"kemalelmizan","email":"kemalelmizan@gmail.com"},"_npmVersion":"12.0.1","description":"Adaptive MCP extension: derives the YAML tools-metadata view from the SQLite store and serves it to MCP clients.","directories":{},"_nodeVersion":"26.5.0","dependencies":{"js-yaml":"^4.1.0","@adaptivemcp/spec":"workspace:*","@adaptivemcp/memory":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.0","typescript":"^5.6.0","@types/node":"^22.0.0","@types/js-yaml":"^4.0.9"},"_npmOperationalInternal":{"tmp":"tmp/extension_0.2.5_1784457345096_0.09130630787261107","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@adaptivemcp/extension","version":"0.3.0","license":"MIT","_id":"@adaptivemcp/extension@0.3.0","maintainers":[{"name":"kemalelmizan","email":"kemalelmizan@gmail.com"}],"dist":{"shasum":"104f6549383d19d8c0801cbaf681407f3e33c117","tarball":"https://registry.npmjs.org/@adaptivemcp/extension/-/extension-0.3.0.tgz","fileCount":14,"integrity":"sha512-mUVJXlWo5bT3WrOmPMl+2Gxgxb7T0PMDSz5YJhxnuk2Ac84R9VFB4KLdafwOcw/6Dfy8Ot3C/nKnQfhlaDRqWg==","signatures":[{"sig":"MEQCIBPh+9u0DPAzb0H2haAbNW22BdOpHbAUTI8xCPmZNgKlAiANcCd6jpAmWw11PqJC5mT3zHtmtXeCuXMgJUiapXb7Eg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18468},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"773ebf5b2d6899e60cc08127e23a42e16a396777","scripts":{"test":"vitest run --config ../../vitest.config.ts","build":"tsc -p tsconfig.json"},"_npmUser":{"name":"kemalelmizan","email":"kemalelmizan@gmail.com"},"_npmVersion":"12.0.1","description":"Adaptive MCP extension: derives the YAML tools-metadata view from the SQLite store and serves it to MCP clients.","directories":{},"_nodeVersion":"26.5.0","dependencies":{"js-yaml":"^4.1.0","@adaptivemcp/spec":"workspace:*","@adaptivemcp/memory":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.0","typescript":"^5.6.0","@types/node":"^22.0.0","@types/js-yaml":"^4.0.9"},"_npmOperationalInternal":{"tmp":"tmp/extension_0.3.0_1784465864461_0.35459333119156966","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@adaptivemcp/extension","version":"0.3.1","license":"MIT","_id":"@adaptivemcp/extension@0.3.1","maintainers":[{"name":"kemalelmizan","email":"kemalelmizan@gmail.com"}],"dist":{"shasum":"2b6dabe9b3882c4fa0c1cbcb5adb1f80b7c542cf","tarball":"https://registry.npmjs.org/@adaptivemcp/extension/-/extension-0.3.1.tgz","fileCount":14,"integrity":"sha512-JudCJ+RMoJQRaXe66SZ84UHPihvsrYncxoAMUY5ozkDTQMmELlA6boIOeivf7ie6x7BS4BTVeGi/A9KViJ+vuQ==","signatures":[{"sig":"MEYCIQC/S3vD2rAg3xG2xhCm+r1Yl5//bpUrC7ZfM/fM/IdmUQIhAP7wODc8Y5cRkPz1u4aPI39FJJftKeQGO89yeAadgqrf","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23778},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"2fedddfd603e8eae0a65921261103c1ca0d2f8e4","scripts":{"test":"vitest run --config ../../vitest.config.ts","build":"tsc -p tsconfig.json"},"_npmUser":{"name":"kemalelmizan","email":"kemalelmizan@gmail.com"},"_npmVersion":"12.0.1","description":"Adaptive MCP extension: derives the YAML tools-metadata view from the SQLite store and serves it to MCP clients.","directories":{},"_nodeVersion":"26.5.0","dependencies":{"js-yaml":"^4.1.0","@adaptivemcp/spec":"workspace:*","@adaptivemcp/memory":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.0","typescript":"^5.6.0","@types/node":"^22.0.0","@types/js-yaml":"^4.0.9"},"_npmOperationalInternal":{"tmp":"tmp/extension_0.3.1_1784467549075_0.9234962022013045","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"_id":"@adaptivemcp/extension@0.4.0","dist":{"shasum":"f3bffabbc4395412a972b2f9d3005002d063b7d0","tarball":"https://registry.npmjs.org/@adaptivemcp/extension/-/extension-0.4.0.tgz","fileCount":14,"integrity":"sha512-a90z7KDWJWdJfL43UQcHCMN9iUeACeuy84o2KWiJC1lHpKO094S5BqorTHfNlgwtEkY8XpP3u3IiZ0ed60ezBg==","signatures":[{"sig":"MEUCIQC+91rIVhyomEzcj6AtRN6PD1oCHl2HnTGikof/sdZrsQIgVG5bZ9aFh3cpve7PyLLqOfyUx4qLmUSyp91yNf5HkyM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEg9RHAz0wbWLQ6Pvj1G+f78BhcezhXIor+OjzGIICRMAiBd+3XazhSxPqZduoA9g2baGlCzoqwHtHIq71cdI/jdUw=="}],"unpackedSize":60980},"main":"./dist/index.js","name":"@adaptivemcp/extension","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"9ee97159d0137dc23b6a02008def6faa0f857092","license":"MIT","scripts":{"test":"vitest run --config ../../vitest.config.ts","build":"tsc -p tsconfig.json"},"version":"0.4.0","_npmUser":{"name":"kemalelmizan","email":"kemalelmizan@gmail.com"},"_npmVersion":"12.1.0","description":"Adaptive MCP extension: derives the YAML tools-metadata view from the SQLite store and serves it to MCP clients.","directories":{},"maintainers":[{"name":"kemalelmizan","email":"kemalelmizan@gmail.com"}],"_nodeVersion":"26.10.0","dependencies":{"js-yaml":"^4.3.2","@adaptivemcp/spec":"workspace:*","@adaptivemcp/memory":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.0","typescript":"^5.6.0","@types/node":"^22.0.0","@types/js-yaml":"^4.0.9"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/extension_0.4.0_1790580303052_0.4347699901877622"}}},"time":{"created":"2026-07-19T00:58:56.102Z","modified":"2026-09-28T07:25:03.429Z","0.2.0":"2026-07-19T00:58:56.334Z","0.2.1":"2026-07-19T01:17:29.941Z","0.2.2":"2026-07-19T03:48:36.272Z","0.2.3":"2026-07-19T06:23:17.258Z","0.2.4":"2026-07-19T08:06:08.066Z","0.2.5":"2026-07-19T10:35:45.253Z","0.3.0":"2026-07-19T12:57:44.602Z","0.3.1":"2026-07-19T13:25:49.239Z","0.4.0":"2026-09-28T07:25:03.130Z"},"license":"MIT","description":"Adaptive MCP extension: derives the YAML tools-metadata view from the SQLite store and serves it to MCP clients.","maintainers":[{"name":"kemalelmizan","email":"kemalelmizan@gmail.com"}],"readme":"# @adaptivemcp/extension\n\nAdaptive MCP extension: derives the YAML `tools-metadata` view from the SQLite\nstore and serves it to MCP clients.\n\nThis is the **one** package that touches the MCP protocol surface. It exposes a\nsingle resource, `dev.adaptivemcp/tools-metadata` (mime type `application/yaml`),\nas proposed in our extension draft. A server publishes it to **govern** tool adaptation\n(annotations, budgets, required approvals); clients read it, learn, and report\nobservations back.\n\n## Install\n\n```bash\nnpm i @adaptivemcp/extension\n```\n\nRequires **Node 22+** (Node 26 recommended).\n\n## Usage\n\n```ts\nimport { MemoryStore } from \"@adaptivemcp/memory\";\nimport { ExtensionController } from \"@adaptivemcp/extension\";\nimport { TOOLS_METADATA_EXTENSION } from \"@adaptivemcp/spec\";\n\nconst store = new MemoryStore({ path: \":memory:\" });\nconst controller = new ExtensionController({\n  memory: store,\n  yamlPath: \"tools-metadata.yaml\", // optional: persist the derived view\n});\n\n// After telemetry/evaluation have populated the store:\nconst doc = controller.sync();        // recompute + write yamlPath (if set)\nconst yaml = controller.resourceText(); // the YAML string for the MCP resource\nconst uri = controller.resourceUri();   // \"dev.adaptivemcp/tools-metadata\"\n\nconsole.log(uri === TOOLS_METADATA_EXTENSION); // true\n```\n\n## API\n\n| Method | Purpose |\n| --- | --- |\n| `sync()` | Recompute the YAML view from the store; write to `yamlPath` if configured. Returns the document. |\n| `view()` | Read the current view without writing to disk. |\n| `resourceUri()` | The stable `dev.adaptivemcp/tools-metadata` URI. |\n| `resourceText()` | The YAML string served by the MCP resource. |\n| `annotate(toolName, annotation)` | Write a static annotation into the store. |\n\n## Advertising in `initialize`\n\nThe `@modelcontextprotocol/sdk` (v1.29) includes `extensions` in its\n`ServerCapabilities` schema, so a server can advertise the extension via\n`capabilities.extensions`. The example server instead registers the resource\ndirectly via `server.registerResource(...)`, the standard MCP approach\nthat degrades gracefully on any host that ignores unknown resources.\n\n## License\n\nReleased under the [MIT License](../../LICENSE). Copyright (c) 2026 Kemal Elmizan.\n","readmeFilename":"README.md"}