{"versions":{"0.1.0":{"name":"@tokenlens/helpers","version":"0.1.0","private":false,"description":"Helpers for context windows, usage normalization, compaction, and cost estimation.","type":"module","sideEffects":false,"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./context":{"types":"./dist/context.d.ts","default":"./dist/context.js"},"./simple":{"types":"./dist/simple.d.ts","default":"./dist/simple.js"},"./conversation":{"types":"./dist/conversation.d.ts","default":"./dist/conversation.js"}},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/xn1cklas/tokenlens.git","directory":"packages/helpers"},"keywords":["ai","llm","helpers","context window","usage normalization","pricing","cost estimation","model registry"],"author":{"name":"Nicklas Scharpff","email":"hi@n1cklas.com","url":"https://n1cklas.com"},"license":"MIT","bugs":{"url":"https://github.com/xn1cklas/tokenlens/issues"},"homepage":"https://github.com/xn1cklas/tokenlens/tree/HEAD/packages/helpers#readme","dependencies":{"@tokenlens/core":"0.1.0","@tokenlens/fetch":"0.1.0"},"devDependencies":{"typescript":"^5.9.2","vitest":"^1.6.1"},"scripts":{"prebuild":"rm -rf dist","build":"tsc","typecheck":"tsc --noEmit","test":"vitest","test:run":"vitest run"},"_id":"@tokenlens/helpers@0.1.0","_integrity":"sha512-gcKY3pCmG2HWircPZLo5KezQem5yUH0xJM74meZuevo9K9TRt9Dp8CwAN30xcPojQIQ6YY/G6dpKWHqP5vlmaA==","_resolved":"/private/var/folders/nr/h4ytbdsn2kjb89jlv81b99wr0000gn/T/cfd31e3b05be4dbd3632944c53d64d1c/tokenlens-helpers-0.1.0.tgz","_from":"file:tokenlens-helpers-0.1.0.tgz","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-gcKY3pCmG2HWircPZLo5KezQem5yUH0xJM74meZuevo9K9TRt9Dp8CwAN30xcPojQIQ6YY/G6dpKWHqP5vlmaA==","shasum":"0ff630041d28e71abfc20a5b1852c09881d902dd","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@tokenlens/helpers/-/helpers-0.1.0.tgz","fileCount":13,"unpackedSize":33021,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC2qav9D4H5GfV1VFcX4C9G9URFiHexqi2denuKdlNihAIgAjcvrFF5m3eufu02rdEXh4rUG9elVwSvkkR4T5/wls0="}],"size":7807},"_npmUser":{"name":"anonymous","email":"hi@n1cklas.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"hi@n1cklas.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/helpers_0.1.0_1757596785734_0.3608718585870321"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-09-11T13:19:45.893Z","publish_time":1757596785893,"_source_registry_name":"default","contributors":[]},"1.0.0-beta.0":{"name":"@tokenlens/helpers","version":"1.0.0-beta.0","private":false,"description":"Helpers for context windows, usage normalization, compaction, and cost estimation.","type":"module","sideEffects":false,"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./context":{"types":"./dist/context.d.ts","default":"./dist/context.js"},"./simple":{"types":"./dist/simple.d.ts","default":"./dist/simple.js"},"./conversation":{"types":"./dist/conversation.d.ts","default":"./dist/conversation.js"}},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/xn1cklas/tokenlens.git","directory":"packages/helpers"},"keywords":["ai","llm","helpers","context window","usage normalization","pricing","cost estimation","model registry"],"author":{"name":"Nicklas Scharpff","email":"hi@n1cklas.com","url":"https://n1cklas.com"},"license":"MIT","bugs":{"url":"https://github.com/xn1cklas/tokenlens/issues"},"homepage":"https://github.com/xn1cklas/tokenlens/tree/HEAD/packages/helpers#readme","dependencies":{"@tokenlens/core":"1.0.0-beta.0","@tokenlens/fetch":"1.0.0-beta.0"},"devDependencies":{"typescript":"^5.9.2","vitest":"^1.6.1"},"scripts":{"prebuild":"rm -rf dist","build":"tsc","typecheck":"tsc --noEmit","test":"vitest","test:run":"vitest run"},"_id":"@tokenlens/helpers@1.0.0-beta.0","readmeFilename":"README.md","_integrity":"sha512-eaPvh63HUEVWDG60zbp4PWa5ghGYBCcglyTxVkPisd+xFED9Df+KhO3RbztwmhHgpM2Xloz9tBZ4lhck9/GH/w==","_resolved":"/private/var/folders/nr/h4ytbdsn2kjb89jlv81b99wr0000gn/T/e2ab0daa2384a2b7f6a29f834fcfdb6f/tokenlens-helpers-1.0.0-beta.0.tgz","_from":"file:tokenlens-helpers-1.0.0-beta.0.tgz","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-eaPvh63HUEVWDG60zbp4PWa5ghGYBCcglyTxVkPisd+xFED9Df+KhO3RbztwmhHgpM2Xloz9tBZ4lhck9/GH/w==","shasum":"647b152dd272fc982bb0bb045ca12d4259035d47","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@tokenlens/helpers/-/helpers-1.0.0-beta.0.tgz","fileCount":13,"unpackedSize":46024,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBWQkXVp+V6uXelVGoO7jVdlKR5evQfg3T+WLDEv73JQAiARyr64g5GJfhO3R1+/FU+uhkrXijHzaz/ARn32lV38nA=="}],"size":9985},"_npmUser":{"name":"anonymous","email":"hi@n1cklas.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"hi@n1cklas.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/helpers_1.0.0-beta.0_1757604581178_0.6490674198673891"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-09-11T15:29:41.382Z","publish_time":1757604581382,"_source_registry_name":"default","contributors":[]},"1.0.0-beta.1":{"name":"@tokenlens/helpers","version":"1.0.0-beta.1","private":false,"description":"Helpers for context windows, usage normalization, compaction, and cost estimation.","type":"module","sideEffects":false,"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./context":{"types":"./dist/context.d.ts","default":"./dist/context.js"},"./simple":{"types":"./dist/simple.d.ts","default":"./dist/simple.js"},"./conversation":{"types":"./dist/conversation.d.ts","default":"./dist/conversation.js"}},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/xn1cklas/tokenlens.git","directory":"packages/helpers"},"keywords":["ai","llm","helpers","context window","usage normalization","pricing","cost estimation","model registry"],"author":{"name":"Nicklas Scharpff","email":"hi@n1cklas.com","url":"https://n1cklas.com"},"license":"MIT","bugs":{"url":"https://github.com/xn1cklas/tokenlens/issues"},"homepage":"https://github.com/xn1cklas/tokenlens/tree/HEAD/packages/helpers#readme","dependencies":{"@tokenlens/core":"1.0.0-beta.1","@tokenlens/fetch":"1.0.0-beta.0"},"devDependencies":{"typescript":"^5.9.2","vitest":"^1.6.1"},"scripts":{"prebuild":"rm -rf dist","build":"tsc","typecheck":"tsc --noEmit","test":"vitest","test:run":"vitest run"},"_id":"@tokenlens/helpers@1.0.0-beta.1","readmeFilename":"README.md","_integrity":"sha512-m4pOjssxhQutCtEbuATGFPyAgqRY8NY15p3a955Gfs2xCCJWgsTdCOVtM+i38BaM4Y1jQ7OEWup5c4H7WKJq4Q==","_resolved":"/private/var/folders/nr/h4ytbdsn2kjb89jlv81b99wr0000gn/T/e3c5cb33b0927eb8f8fc9af9fe4efb5e/tokenlens-helpers-1.0.0-beta.1.tgz","_from":"file:tokenlens-helpers-1.0.0-beta.1.tgz","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-m4pOjssxhQutCtEbuATGFPyAgqRY8NY15p3a955Gfs2xCCJWgsTdCOVtM+i38BaM4Y1jQ7OEWup5c4H7WKJq4Q==","shasum":"51a932ac81ad52f6cc2d5a18e7bbf63bd57a720a","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@tokenlens/helpers/-/helpers-1.0.0-beta.1.tgz","fileCount":13,"unpackedSize":45323,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHJN1SuauEMsnQJ1RookGMKzcC8iSQYLN6O90WJrMtHFAiEAoWlgjkSKTMjC4OzTHiCWmQehR7aKY8ZVBTojhKzbpgQ="}],"size":9745},"_npmUser":{"name":"anonymous","email":"hi@n1cklas.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"hi@n1cklas.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/helpers_1.0.0-beta.1_1757664298966_0.5882347965263961"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-09-12T08:04:59.163Z","publish_time":1757664299163,"_source_registry_name":"default","contributors":[]},"1.0.0-beta.2":{"name":"@tokenlens/helpers","version":"1.0.0-beta.2","private":false,"description":"Helpers for context windows, usage normalization, compaction, and cost estimation.","type":"module","sideEffects":false,"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./context":{"types":"./dist/context.d.ts","default":"./dist/context.js"},"./simple":{"types":"./dist/simple.d.ts","default":"./dist/simple.js"},"./conversation":{"types":"./dist/conversation.d.ts","default":"./dist/conversation.js"}},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/xn1cklas/tokenlens.git","directory":"packages/helpers"},"keywords":["ai","llm","helpers","context window","usage normalization","pricing","cost estimation","model registry"],"author":{"name":"Nicklas Scharpff","email":"hi@n1cklas.com","url":"https://n1cklas.com"},"license":"MIT","bugs":{"url":"https://github.com/xn1cklas/tokenlens/issues"},"homepage":"https://github.com/xn1cklas/tokenlens/tree/HEAD/packages/helpers#readme","dependencies":{"@tokenlens/core":"1.0.0-beta.2","@tokenlens/fetch":"1.0.0-beta.1"},"devDependencies":{"typescript":"^5.9.2","vitest":"^1.6.1"},"scripts":{"prebuild":"rm -rf dist","build":"tsc","typecheck":"tsc --noEmit","test":"vitest","test:run":"vitest run"},"_id":"@tokenlens/helpers@1.0.0-beta.2","readmeFilename":"README.md","_integrity":"sha512-w0vdNAh3EtrPGFxTTjHWW1E+iJAvp+JwK2kghktQmqlSYk8N10La8lLb4trh3MM42gx6ytlyub+Zf0q6/txNpg==","_resolved":"/private/var/folders/nr/h4ytbdsn2kjb89jlv81b99wr0000gn/T/9a05499cb96a5429cf14ff882b4bd4a1/tokenlens-helpers-1.0.0-beta.2.tgz","_from":"file:tokenlens-helpers-1.0.0-beta.2.tgz","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-w0vdNAh3EtrPGFxTTjHWW1E+iJAvp+JwK2kghktQmqlSYk8N10La8lLb4trh3MM42gx6ytlyub+Zf0q6/txNpg==","shasum":"11d57975736eab495d0ed2a3480f96cbddd0ee2d","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@tokenlens/helpers/-/helpers-1.0.0-beta.2.tgz","fileCount":13,"unpackedSize":45323,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD8KhlLV15Tr/NtZkhQX/mUzr3bjgZG3L5yw1TwW0/sRgIhAIX0n1k2BkFfC23sMj9scz2MzPDteAuhx6a+8kjL2CPc"}],"size":9742},"_npmUser":{"name":"anonymous","email":"hi@n1cklas.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"hi@n1cklas.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/helpers_1.0.0-beta.2_1757665455465_0.8728513163963958"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-09-12T08:24:15.642Z","publish_time":1757665455642,"_source_registry_name":"default","contributors":[]},"1.3.0":{"name":"@tokenlens/helpers","version":"1.3.0","private":false,"description":"Helpers for context windows, usage normalization, compaction, and cost estimation.","type":"module","sideEffects":false,"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./context":{"types":"./dist/context.d.ts","default":"./dist/context.js"},"./simple":{"types":"./dist/simple.d.ts","default":"./dist/simple.js"},"./conversation":{"types":"./dist/conversation.d.ts","default":"./dist/conversation.js"}},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/xn1cklas/tokenlens.git","directory":"packages/helpers"},"keywords":["ai","llm","helpers","context window","usage normalization","pricing","cost estimation","model registry"],"author":{"name":"Nicklas Scharpff","email":"hi@n1cklas.com","url":"https://n1cklas.com"},"license":"MIT","bugs":{"url":"https://github.com/xn1cklas/tokenlens/issues"},"homepage":"https://github.com/xn1cklas/tokenlens/tree/HEAD/packages/helpers#readme","dependencies":{"@tokenlens/core":"1.3.0","@tokenlens/fetch":"1.3.0"},"devDependencies":{"typescript":"^5.9.2","vitest":"^1.6.1"},"scripts":{"prebuild":"rm -rf dist","build":"tsc","typecheck":"tsc --noEmit","test":"vitest","test:run":"vitest run"},"_id":"@tokenlens/helpers@1.3.0","_integrity":"sha512-GWe4p9OHYppr7moqyM3Y4NH+kVGCOFpN+voaXgKgvvMBo6Z97Pu17fgCHet10Ls8r4X/tPkb/yHCWP7Ktssu/w==","_resolved":"/private/var/folders/nr/h4ytbdsn2kjb89jlv81b99wr0000gn/T/adea23f91786fb471af1b435444aac73/tokenlens-helpers-1.3.0.tgz","_from":"file:tokenlens-helpers-1.3.0.tgz","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-GWe4p9OHYppr7moqyM3Y4NH+kVGCOFpN+voaXgKgvvMBo6Z97Pu17fgCHet10Ls8r4X/tPkb/yHCWP7Ktssu/w==","shasum":"fe112d366fabb94e8767284fedbafc5944fe8ec6","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@tokenlens/helpers/-/helpers-1.3.0.tgz","fileCount":13,"unpackedSize":45302,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGpNlNgAm48pqA2H3uns7tV/xisY94W7XvXcp1sQWgKdAiAVEVk3rQh3ncunki5t/EAlpA43F5Jm/AIsfdhLFrko6g=="}],"size":9739},"_npmUser":{"name":"anonymous","email":"hi@n1cklas.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"hi@n1cklas.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/helpers_1.3.0_1758282480878_0.4586135644304108"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-09-19T11:48:01.062Z","publish_time":1758282481062,"_source_registry_name":"default","contributors":[]},"1.3.1":{"name":"@tokenlens/helpers","version":"1.3.1","private":false,"description":"Helpers for context windows, usage normalization, compaction, and cost estimation.","type":"module","sideEffects":false,"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./context":{"types":"./dist/context.d.ts","default":"./dist/context.js"},"./simple":{"types":"./dist/simple.d.ts","default":"./dist/simple.js"},"./conversation":{"types":"./dist/conversation.d.ts","default":"./dist/conversation.js"}},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/xn1cklas/tokenlens.git","directory":"packages/helpers"},"keywords":["ai","llm","helpers","context window","usage normalization","pricing","cost estimation","model registry"],"author":{"name":"Nicklas Scharpff","email":"hi@n1cklas.com","url":"https://n1cklas.com"},"license":"MIT","bugs":{"url":"https://github.com/xn1cklas/tokenlens/issues"},"homepage":"https://github.com/xn1cklas/tokenlens/tree/HEAD/packages/helpers#readme","dependencies":{"@tokenlens/fetch":"1.3.0","@tokenlens/core":"1.3.0"},"devDependencies":{"typescript":"^5.9.2","vitest":"^1.6.1"},"scripts":{"prebuild":"rm -rf dist","build":"tsc","typecheck":"tsc --noEmit","test":"vitest","test:run":"vitest run"},"_id":"@tokenlens/helpers@1.3.1","_integrity":"sha512-t6yL8N6ES8337E6eVSeH4hCKnPdWkZRFpupy9w5E66Q9IeqQ9IO7XQ6gh12JKjvWiRHuyyJ8MBP5I549Cr41EQ==","_resolved":"/private/var/folders/nr/h4ytbdsn2kjb89jlv81b99wr0000gn/T/2b8cdc34d091d178790094cf9321def2/tokenlens-helpers-1.3.1.tgz","_from":"file:tokenlens-helpers-1.3.1.tgz","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-t6yL8N6ES8337E6eVSeH4hCKnPdWkZRFpupy9w5E66Q9IeqQ9IO7XQ6gh12JKjvWiRHuyyJ8MBP5I549Cr41EQ==","shasum":"4ac3374cf9dde7f52110fe76f73fc5f311d6c92c","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@tokenlens/helpers/-/helpers-1.3.1.tgz","fileCount":13,"unpackedSize":45332,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCPeZm+Y+ZWCiz97WXtGCpkP6Dro5XUAomBl/F3e279NwIga4sO7yer6DCAs/xx67Wy4CdRyC5kUJ6PQ0tOQ7YptoE="}],"size":9742},"_npmUser":{"name":"anonymous","email":"hi@n1cklas.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"hi@n1cklas.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/helpers_1.3.1_1758288590093_0.7933163923774007"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-09-19T13:29:50.309Z","publish_time":1758288590309,"_source_registry_name":"default","contributors":[]},"2.0.0-alpha.1":{"name":"@tokenlens/helpers","version":"2.0.0-alpha.1","private":false,"description":"Helpers for context windows, usage normalization, compaction, and cost estimation.","type":"module","sideEffects":false,"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/xn1cklas/tokenlens.git","directory":"packages/helpers"},"keywords":["ai","llm","helpers","context window","usage normalization","pricing","cost estimation","model registry"],"author":{"name":"Nicklas Scharpff","email":"hi@n1cklas.com","url":"https://n1cklas.com"},"license":"MIT","bugs":{"url":"https://github.com/xn1cklas/tokenlens/issues"},"homepage":"https://github.com/xn1cklas/tokenlens/tree/HEAD/packages/helpers#readme","dependencies":{"@tokenlens/core":"2.0.0-alpha.1"},"devDependencies":{"typescript":"^5.9.2"},"scripts":{"prebuild":"rm -rf dist","build":"tsc","typecheck":"tsc --noEmit","test":"vitest --config ../../vitest.config.ts --project helpers","test:run":"vitest run --config ../../vitest.config.ts --project helpers"},"_id":"@tokenlens/helpers@2.0.0-alpha.1","readmeFilename":"README.md","_integrity":"sha512-Qqgr+7wpjhAPeLdLS4cN9RHjuUnPY6mTIFHvfG/QvqRIlKUMF2kciEg+n+rQM8PPjjxsWVAnoPcpU4Lw2VRqHw==","_resolved":"/private/var/folders/nr/h4ytbdsn2kjb89jlv81b99wr0000gn/T/b005cdfdc7fd719da76363b490af3442/tokenlens-helpers-2.0.0-alpha.1.tgz","_from":"file:tokenlens-helpers-2.0.0-alpha.1.tgz","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-Qqgr+7wpjhAPeLdLS4cN9RHjuUnPY6mTIFHvfG/QvqRIlKUMF2kciEg+n+rQM8PPjjxsWVAnoPcpU4Lw2VRqHw==","shasum":"243e580d85a5845a895e95e2f8bc8c24c69b07e0","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@tokenlens/helpers/-/helpers-2.0.0-alpha.1.tgz","fileCount":11,"unpackedSize":14683,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCnKPMa8vFUjscf9IK009RRXsCZYyYfXqMikq5IzZ4NQwIhAJ83x/CtdHDpJP3IQdfr3c9qlcceJ1ua6hLInDzz5Nc6"}],"size":4763},"_npmUser":{"name":"anonymous","email":"hi@n1cklas.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"hi@n1cklas.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/helpers_2.0.0-alpha.1_1758822362658_0.8139987906709181"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-09-25T17:46:02.850Z","publish_time":1758822362850,"_source_registry_name":"default","contributors":[]},"2.0.0-alpha.2":{"name":"@tokenlens/helpers","version":"2.0.0-alpha.2","private":false,"description":"Helpers for context windows, usage normalization, compaction, and cost estimation.","type":"module","sideEffects":false,"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/xn1cklas/tokenlens.git","directory":"packages/helpers"},"keywords":["ai","llm","helpers","context window","usage normalization","pricing","cost estimation","model registry"],"author":{"name":"Nicklas Scharpff","email":"hi@n1cklas.com","url":"https://n1cklas.com"},"license":"MIT","bugs":{"url":"https://github.com/xn1cklas/tokenlens/issues"},"homepage":"https://github.com/xn1cklas/tokenlens/tree/HEAD/packages/helpers#readme","dependencies":{"@tokenlens/core":"2.0.0-alpha.2"},"devDependencies":{"typescript":"^5.9.2"},"scripts":{"prebuild":"rm -rf dist","build":"tsc","typecheck":"tsc --noEmit","test":"vitest --config ../../vitest.config.ts --project helpers","test:run":"vitest run --config ../../vitest.config.ts --project helpers"},"_id":"@tokenlens/helpers@2.0.0-alpha.2","readmeFilename":"README.md","_integrity":"sha512-F8j8uWNa2I/2HBIl8YyxYQknpCnhfRZ5FAs+mfSBrBGggUz+gF6q5zoiyZSq6uRiZjRoxVozFIVYM+4S+X0ErQ==","_resolved":"/private/var/folders/nr/h4ytbdsn2kjb89jlv81b99wr0000gn/T/f0bdf4b4362d23dc124e1f0ef8b7734f/tokenlens-helpers-2.0.0-alpha.2.tgz","_from":"file:tokenlens-helpers-2.0.0-alpha.2.tgz","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-F8j8uWNa2I/2HBIl8YyxYQknpCnhfRZ5FAs+mfSBrBGggUz+gF6q5zoiyZSq6uRiZjRoxVozFIVYM+4S+X0ErQ==","shasum":"36e9ffc37e4d93ff81b801af4f8631a7a51be787","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@tokenlens/helpers/-/helpers-2.0.0-alpha.2.tgz","fileCount":11,"unpackedSize":14590,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGw5opJgMuRXLRElIFhOkrSkjcKYPD8Tx1x41sD11QS/AiAjbYdG5ijG9PlIfe3JDLDAu2PYxA3fGY6Gi3KKgEp//w=="}],"size":4743},"_npmUser":{"name":"anonymous","email":"hi@n1cklas.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"hi@n1cklas.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/helpers_2.0.0-alpha.2_1758824056769_0.07130939753557386"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-09-25T18:14:17.021Z","publish_time":1758824057021,"_source_registry_name":"default","contributors":[]},"2.0.0-alpha.3":{"name":"@tokenlens/helpers","version":"2.0.0-alpha.3","private":false,"description":"Helpers for context windows, usage normalization, compaction, and cost estimation.","type":"module","sideEffects":false,"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/xn1cklas/tokenlens.git","directory":"packages/helpers"},"keywords":["ai","llm","helpers","context window","usage normalization","pricing","cost estimation","model registry"],"author":{"name":"Nicklas Scharpff","email":"hi@n1cklas.com","url":"https://n1cklas.com"},"license":"MIT","bugs":{"url":"https://github.com/xn1cklas/tokenlens/issues"},"homepage":"https://github.com/xn1cklas/tokenlens/tree/HEAD/packages/helpers#readme","dependencies":{"@tokenlens/core":"2.0.0-alpha.3"},"devDependencies":{"typescript":"^5.9.2"},"scripts":{"prebuild":"rm -rf dist","build":"tsc","typecheck":"tsc --noEmit","test":"vitest --config ../../vitest.config.ts --project helpers","test:run":"vitest run --config ../../vitest.config.ts --project helpers"},"_id":"@tokenlens/helpers@2.0.0-alpha.3","readmeFilename":"README.md","_integrity":"sha512-n9DosGQPkp0uFqR/egt1N0j04zOz/KTRFug15U4mB9atRuttyMaMBJ9oLuqQZEFad092PoAjDcT38yO2mbFoYw==","_resolved":"/private/var/folders/nr/h4ytbdsn2kjb89jlv81b99wr0000gn/T/72139410b3aa0817f059d747f595394a/tokenlens-helpers-2.0.0-alpha.3.tgz","_from":"file:tokenlens-helpers-2.0.0-alpha.3.tgz","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-n9DosGQPkp0uFqR/egt1N0j04zOz/KTRFug15U4mB9atRuttyMaMBJ9oLuqQZEFad092PoAjDcT38yO2mbFoYw==","shasum":"a6f43914c6934c0639e83f69c17904c992e860e5","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@tokenlens/helpers/-/helpers-2.0.0-alpha.3.tgz","fileCount":23,"unpackedSize":31987,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCegELgBusXRsZn8CfFUJyqpnzmeV82F36ItbDoVgb2TgIhAPFTZwYLjOshSZkmSy2CQDTp+UCJs0MnNA4R6cXdQ6en"}],"size":9782},"_npmUser":{"name":"anonymous","email":"hi@n1cklas.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"hi@n1cklas.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/helpers_2.0.0-alpha.3_1759613441928_0.8593506600670391"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-10-04T21:30:42.139Z","publish_time":1759613442139,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"alpha":"2.0.0-alpha.3","beta":"1.0.0-beta.2","latest":"1.3.1"},"name":"@tokenlens/helpers","time":{"created":"2025-09-11T13:19:57.459Z","modified":"2025-10-04T21:30:58.239Z","0.1.0":"2025-09-11T13:19:45.893Z","1.0.0-beta.0":"2025-09-11T15:29:41.382Z","1.0.0-beta.1":"2025-09-12T08:04:59.163Z","1.0.0-beta.2":"2025-09-12T08:24:15.642Z","1.3.0":"2025-09-19T11:48:01.062Z","1.3.1":"2025-09-19T13:29:50.309Z","2.0.0-alpha.1":"2025-09-25T17:46:02.850Z","2.0.0-alpha.2":"2025-09-25T18:14:17.021Z","2.0.0-alpha.3":"2025-10-04T21:30:42.139Z"},"readme":"@tokenlens/helpers\n==================\n\n[![npm version](https://img.shields.io/npm/v/%40tokenlens%2Fhelpers.svg)](https://www.npmjs.com/package/@tokenlens/helpers)\n[![npm downloads](https://img.shields.io/npm/dm/%40tokenlens%2Fhelpers.svg)](https://www.npmjs.com/package/@tokenlens/helpers)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](../../LICENSE)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.x-blue.svg)](https://www.typescriptlang.org/)\n\n\n![TokenLens overview](https://raw.githubusercontent.com/xn1cklas/tokenlens/HEAD/assets/tokenlens.png)\n\nUtility helpers focused on context caps and rough cost estimation.\nDI‑first: pass `providers` from `fetchModels()` (or `getModels()` for a static set).\n\n\nInstall\n- npm: `npm i @tokenlens/helpers`\n- pnpm: `pnpm add @tokenlens/helpers`\n- yarn: `yarn add @tokenlens/helpers`\n\nFocused Exports\n- Context: `getContext({ modelId, providers })`\n- Cost: `getTokenCosts({ modelId, usage, providers })`\n- Combined: `getUsage({ modelId, usage, providers, reserveOutput? })`\n- Types: `ContextData`, `TokenCosts`, `UsageData`\n\nDeprecated (use focused exports instead)\n- Context: `getContextWindow`, `remainingContext`, `percentRemaining`, `fitsContext`\n- Usage: `normalizeUsage`, `breakdownTokens`, `consumedTokens`\n- Cost: `estimateCost`\n- Compaction: `shouldCompact`, `contextHealth`, `tokensToCompact`\n- Conversation: `sumUsage`, `estimateConversationCost`, `computeContextRot`, `nextTurnBudget`\n- DI: `sourceFromModels`, `sourceFromCatalog`, `selectStaticModels`\n\nUsage\n```\nimport { fetchModels } from 'tokenlens';\nimport { getContext, getTokenCosts, getUsage } from '@tokenlens/helpers';\n\nconst openai = await fetchModels('openai');\nconst modelId = 'openai/gpt-4o-mini';\nconst usage = { prompt_tokens: 1000, completion_tokens: 500 };\n\nconst { maxInput, maxOutput, maxTotal } = getContext(modelId, openai);\nconst {\n  inputUSD,\n  outputUSD,\n  reasoningUSD,\n  cacheReadUSD,\n  cacheWriteUSD,\n  totalUSD,\n} = getTokenCosts(modelId, usage, openai);\nconst summary = getUsage(modelId, usage, openai);\n```\n\nNotes\n- IDs can be `provider/model`, `provider:id`, or providerless `model`.\n- Version dots normalize to dashes in the model segment.\n- Cost outputs are estimates based on models.dev pricing fields. For authoritative cost numbers, read pricing and usage metrics from your model provider's API responses at runtime.\n\nBack‑compat via `tokenlens`\n```\nimport { getContext, getTokenCosts, getUsage } from 'tokenlens';\n// These wrappers inject a default providers set if not supplied.\n```\n\nLicense\nMIT","users":{}}