{"_id":"@anvailabs/sandhi","_rev":"10-1f2da269f836140cf18293796fd6660b","name":"@anvailabs/sandhi","dist-tags":{"latest":"0.10.1"},"versions":{"0.5.0":{"name":"@anvailabs/sandhi","version":"0.5.0","keywords":["llm","gateway","usage","metering","attribution","ai"],"license":"Apache-2.0","_id":"@anvailabs/sandhi@0.5.0","maintainers":[{"name":"anvai-labs","email":"singhvjd@gmail.com"}],"homepage":"https://github.com/anvai-labs/sandhi#readme","bugs":{"url":"https://github.com/anvai-labs/sandhi/issues"},"dist":{"shasum":"361e870453543f39a4ae5fb9ee988c479fb2a1c9","tarball":"https://registry.npmjs.org/@anvailabs/sandhi/-/sandhi-0.5.0.tgz","fileCount":20,"integrity":"sha512-7AV9P6ZiIxxNVACysYv81NDzRhxd33DsBaogqnfiHCPTjK0EvPRVq6JAlwAlQl6TUcc8NOpuTJ7IdqKTj5RKEA==","signatures":[{"sig":"MEYCIQCNjvQN/FmK+tZVzomZMrraJYyHF/PQIAF6Qa4BZApjZwIhAJ2QVrnECp0uiogi1Aa3IbNISzgbu3J8Ge6cUEfjc8tm","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":107068636},"main":"sandhi.js","napi":{"name":"sandhi","triples":{"defaults":true,"additional":["aarch64-apple-darwin","aarch64-unknown-linux-gnu"]}},"types":"sandhi.d.ts","engines":{"node":">= 16"},"scripts":{"test":"node --test __test__/gateway.test.mjs","build":"napi build --platform --release","build:debug":"napi build --platform"},"_npmUser":{"name":"anvai-labs","email":"singhvjd@gmail.com"},"repository":{"url":"git+https://github.com/anvai-labs/sandhi.git","type":"git"},"_npmVersion":"10.9.3","description":"Sandhi — the metering layer for AI agents (Node binding): in-process virtual keys, budgets, and neutral usage-event metering.","directories":{},"_nodeVersion":"22.19.0","_hasShrinkwrap":false,"devDependencies":{"@napi-rs/cli":"^2.18.4"},"optionalDependencies":{"@anvailabs/sandhi-darwin-x64":"0.5.0","@anvailabs/sandhi-darwin-arm64":"0.5.0","@anvailabs/sandhi-linux-x64-gnu":"0.5.0","@anvailabs/sandhi-win32-x64-msvc":"0.5.0","@anvailabs/sandhi-linux-arm64-gnu":"0.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sandhi_0.5.0_1788405134344_0.27812034639067607","host":"s3://npm-registry-packages-npm-production"}},"0.5.1":{"name":"@anvailabs/sandhi","version":"0.5.1","keywords":["llm","gateway","usage","metering","attribution","ai"],"license":"Apache-2.0","_id":"@anvailabs/sandhi@0.5.1","maintainers":[{"name":"anvai-labs","email":"singhvjd@gmail.com"}],"homepage":"https://github.com/anvai-labs/sandhi#readme","bugs":{"url":"https://github.com/anvai-labs/sandhi/issues"},"dist":{"shasum":"529b3a98bf2afe37155b7cee65280645cb133205","tarball":"https://registry.npmjs.org/@anvailabs/sandhi/-/sandhi-0.5.1.tgz","fileCount":19,"integrity":"sha512-aSUyP6K2kR9vcv4v2pwBziGG4JPFokwd4M076DcMPUX10Jz24znJz623J2b9XIcwjT6gj5H7x6kXd3iG7Xa2tA==","signatures":[{"sig":"MEYCIQDJ9teFvEW+0nw5bud9H4auhObYIBAsiBecLQ/R8QzvQgIhAOusszEIVjyCa4Jbc+aC8QHfWtwqvhp+X5ZlF2oYifpr","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17752982},"main":"sandhi.js","napi":{"name":"sandhi","triples":{"defaults":true,"additional":["aarch64-apple-darwin","aarch64-unknown-linux-gnu"]}},"types":"sandhi.d.ts","engines":{"node":">= 16"},"scripts":{"test":"node --test __test__/gateway.test.mjs","build":"napi build --platform --release","build:debug":"napi build --platform"},"_npmUser":{"name":"anvai-labs","email":"singhvjd@gmail.com"},"repository":{"url":"git+https://github.com/anvai-labs/sandhi.git","type":"git"},"_npmVersion":"10.9.3","description":"Sandhi — the metering layer for AI agents (Node binding): in-process virtual keys, budgets, and neutral usage-event metering.","directories":{},"_nodeVersion":"22.19.0","_hasShrinkwrap":false,"devDependencies":{"@napi-rs/cli":"^2.18.4"},"_npmOperationalInternal":{"tmp":"tmp/sandhi_0.5.1_1788454120248_0.962875550237563","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@anvailabs/sandhi","version":"0.6.0","keywords":["llm","gateway","usage","metering","attribution","ai"],"license":"Apache-2.0","_id":"@anvailabs/sandhi@0.6.0","maintainers":[{"name":"anvai-labs","email":"singhvjd@gmail.com"}],"homepage":"https://github.com/anvai-labs/sandhi#readme","bugs":{"url":"https://github.com/anvai-labs/sandhi/issues"},"dist":{"shasum":"b99b69753eceba3b6ac30423b0d65fe168935419","tarball":"https://registry.npmjs.org/@anvailabs/sandhi/-/sandhi-0.6.0.tgz","fileCount":7,"integrity":"sha512-H3cNXNuK0oGmgotFQ5wAp/DVwmpGHB7l9jFRT2TonUSThd9xIf1ZidzI7K5vOoZuj2lboGyhZChUxhVs+Dftcw==","signatures":[{"sig":"MEQCIDqS0D0KaNpkLRWUcBD8oQAbgjPlBvQTp1YTrPnHwdduAiA3tTNLx8nVQFO9KjYXFTYxYRAgZiW2vJ8/dMgMtkbNMA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anvailabs%2fsandhi@0.6.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":32567},"main":"sandhi.js","napi":{"name":"sandhi","triples":{"defaults":false,"additional":["aarch64-apple-darwin","x86_64-unknown-linux-gnu"]}},"_from":"file:/home/runner/work/sandhi/sandhi/dist-npm/anvailabs-sandhi-0.6.0.tgz","types":"sandhi.d.ts","engines":{"node":">= 16"},"scripts":{"test":"node --test __test__/gateway.test.mjs","build":"napi build --platform --release","build:debug":"napi build --platform"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4891c9d5-d3bb-471f-9cc4-00b766448c18"}},"_resolved":"/home/runner/work/sandhi/sandhi/dist-npm/anvailabs-sandhi-0.6.0.tgz","_integrity":"sha512-H3cNXNuK0oGmgotFQ5wAp/DVwmpGHB7l9jFRT2TonUSThd9xIf1ZidzI7K5vOoZuj2lboGyhZChUxhVs+Dftcw==","repository":{"url":"git+https://github.com/anvai-labs/sandhi.git","type":"git"},"_npmVersion":"11.19.0","description":"Sandhi — the metering layer for AI agents (Node binding): in-process virtual keys, budgets, and neutral usage-event metering.","directories":{},"_nodeVersion":"24.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@napi-rs/cli":"^2.18.4"},"optionalDependencies":{"@anvailabs/sandhi-darwin-arm64":"0.6.0","@anvailabs/sandhi-linux-x64-gnu":"0.6.0"},"_npmOperationalInternal":{"tmp":"tmp/sandhi_0.6.0_1788843685123_0.04268848587865648","host":"s3://npm-registry-packages-npm-production"}},"0.6.1":{"name":"@anvailabs/sandhi","version":"0.6.1","keywords":["llm","gateway","usage","metering","attribution","ai"],"license":"Apache-2.0","_id":"@anvailabs/sandhi@0.6.1","maintainers":[{"name":"anvai-labs","email":"singhvjd@gmail.com"}],"homepage":"https://github.com/anvai-labs/sandhi#readme","bugs":{"url":"https://github.com/anvai-labs/sandhi/issues"},"dist":{"shasum":"e5dd60c66762c320f71a6ea157e5218ce5201dfd","tarball":"https://registry.npmjs.org/@anvailabs/sandhi/-/sandhi-0.6.1.tgz","fileCount":7,"integrity":"sha512-Vitm4J2BFyzt4ovvxvvmGs213wejX1pSpc4bbwGKJYPL6p3GhCHYpSKLsbAom9vsxsUUgB256+l7QmM0J4SW+w==","signatures":[{"sig":"MEUCIDx4V4zU9SUlbIydx3onMhsWPR7tVNsXqc/nzdppV3VYAiEA0sJuYlU78JUd4RHz9j8P+4NFinsDCmpdpynpIRzuvnY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anvailabs%2fsandhi@0.6.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":32567},"main":"sandhi.js","napi":{"name":"sandhi","triples":{"defaults":false,"additional":["aarch64-apple-darwin","x86_64-unknown-linux-gnu"]}},"_from":"file:/home/runner/work/sandhi/sandhi/dist-npm/anvailabs-sandhi-0.6.1.tgz","types":"sandhi.d.ts","engines":{"node":">= 16"},"scripts":{"test":"node --test __test__/gateway.test.mjs","build":"napi build --platform --release","build:debug":"napi build --platform"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4891c9d5-d3bb-471f-9cc4-00b766448c18"}},"_resolved":"/home/runner/work/sandhi/sandhi/dist-npm/anvailabs-sandhi-0.6.1.tgz","_integrity":"sha512-Vitm4J2BFyzt4ovvxvvmGs213wejX1pSpc4bbwGKJYPL6p3GhCHYpSKLsbAom9vsxsUUgB256+l7QmM0J4SW+w==","repository":{"url":"git+https://github.com/anvai-labs/sandhi.git","type":"git"},"_npmVersion":"11.19.0","description":"Sandhi — the metering layer for AI agents (Node binding): in-process virtual keys, budgets, and neutral usage-event metering.","directories":{},"_nodeVersion":"24.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@napi-rs/cli":"^2.18.4"},"optionalDependencies":{"@anvailabs/sandhi-darwin-arm64":"0.6.1","@anvailabs/sandhi-linux-x64-gnu":"0.6.1"},"_npmOperationalInternal":{"tmp":"tmp/sandhi_0.6.1_1788884985539_0.10011071809360494","host":"s3://npm-registry-packages-npm-production"}},"0.7.0":{"name":"@anvailabs/sandhi","version":"0.7.0","keywords":["llm","gateway","usage","metering","attribution","ai"],"license":"Apache-2.0","_id":"@anvailabs/sandhi@0.7.0","maintainers":[{"name":"anvai-labs","email":"singhvjd@gmail.com"}],"homepage":"https://github.com/anvai-labs/sandhi#readme","bugs":{"url":"https://github.com/anvai-labs/sandhi/issues"},"dist":{"shasum":"0eb5d3c3cd400c26752159e668d759b344af838a","tarball":"https://registry.npmjs.org/@anvailabs/sandhi/-/sandhi-0.7.0.tgz","fileCount":7,"integrity":"sha512-+Id6tfHDjmcgzp76IC6sB2FAEP/F/fpBDNZyWmp329CiGVs8T+rTpm0hBrxy57WAAXWrQzbymDH7W07BHbu+5A==","signatures":[{"sig":"MEUCIGziMkqmnzzM+iRKS9qqt9Yg9Aas1TkbPuGXZ764ZirqAiEAi124HQuWUSpqE0FPdva0AGr/GxiwXgsHlkpiIB++CeA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQDNiTdyGOcHLQxkmQ28LFhL7yN59njBn8c19+5A3dHu/AIhALucoQf2LTjRZNrLKWKCZdJmihiLuMhOPSfp+27bBcs+","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anvailabs%2fsandhi@0.7.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":32859},"main":"sandhi.js","napi":{"name":"sandhi","triples":{"defaults":false,"additional":["aarch64-apple-darwin","x86_64-unknown-linux-gnu"]}},"_from":"file:/home/runner/work/sandhi/sandhi/dist-npm/anvailabs-sandhi-0.7.0.tgz","types":"sandhi.d.ts","engines":{"node":">= 16"},"scripts":{"test":"node --test __test__/gateway.test.mjs","build":"napi build --platform --release","build:debug":"napi build --platform"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4891c9d5-d3bb-471f-9cc4-00b766448c18"}},"_resolved":"/home/runner/work/sandhi/sandhi/dist-npm/anvailabs-sandhi-0.7.0.tgz","_integrity":"sha512-+Id6tfHDjmcgzp76IC6sB2FAEP/F/fpBDNZyWmp329CiGVs8T+rTpm0hBrxy57WAAXWrQzbymDH7W07BHbu+5A==","repository":{"url":"git+https://github.com/anvai-labs/sandhi.git","type":"git"},"_npmVersion":"11.19.0","description":"Sandhi — the metering layer for AI agents (Node binding): in-process virtual keys, budgets, and neutral usage-event metering.","directories":{},"_nodeVersion":"24.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@napi-rs/cli":"^2.18.4"},"optionalDependencies":{"@anvailabs/sandhi-darwin-arm64":"0.7.0","@anvailabs/sandhi-linux-x64-gnu":"0.7.0"},"_npmOperationalInternal":{"tmp":"tmp/sandhi_0.7.0_1789636636844_0.01217126428865778","host":"s3://npm-registry-packages-npm-production"}},"0.8.0":{"name":"@anvailabs/sandhi","version":"0.8.0","keywords":["llm","gateway","usage","metering","attribution","ai"],"license":"Apache-2.0","_id":"@anvailabs/sandhi@0.8.0","maintainers":[{"name":"anvai-labs","email":"singhvjd@gmail.com"}],"homepage":"https://github.com/anvai-labs/sandhi#readme","bugs":{"url":"https://github.com/anvai-labs/sandhi/issues"},"dist":{"shasum":"c16636b98d43f45e8d0344a1e898caf42bf91bde","tarball":"https://registry.npmjs.org/@anvailabs/sandhi/-/sandhi-0.8.0.tgz","fileCount":7,"integrity":"sha512-YF+UNUnjgIZwzBjfqzWmsMp7iA2PwjxKTKL6a7r7b2SysXK3WtAVawsyOD7MQtqvz8T1gzNCK1GW0+N/W/bSmw==","signatures":[{"sig":"MEUCIFwoBD2oAVTfBjJElb42v+FKVR2JXL6VITmYGCYu0UqsAiEA/fWCJrybOpJmavZJ5aM94G9ow+PncgYcFbZmGXJqkj4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCICYkqcsVszuH2h2O1Z9eoYu1Q+4ogjx+rEdu9jS9nK7BAiB1K5OxklWdot7hxfKAIAj1DHUclfnhmBvf+/nexe+Kxw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anvailabs%2fsandhi@0.8.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":34062},"main":"sandhi.js","napi":{"name":"sandhi","triples":{"defaults":false,"additional":["aarch64-apple-darwin","x86_64-unknown-linux-gnu"]}},"_from":"file:/home/runner/work/sandhi/sandhi/dist-npm/anvailabs-sandhi-0.8.0.tgz","types":"sandhi.d.ts","engines":{"node":">= 16"},"scripts":{"test":"node --test __test__/gateway.test.mjs","build":"napi build --platform --release","build:debug":"napi build --platform"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4891c9d5-d3bb-471f-9cc4-00b766448c18"}},"_resolved":"/home/runner/work/sandhi/sandhi/dist-npm/anvailabs-sandhi-0.8.0.tgz","_integrity":"sha512-YF+UNUnjgIZwzBjfqzWmsMp7iA2PwjxKTKL6a7r7b2SysXK3WtAVawsyOD7MQtqvz8T1gzNCK1GW0+N/W/bSmw==","repository":{"url":"git+https://github.com/anvai-labs/sandhi.git","type":"git"},"_npmVersion":"11.19.0","description":"Sandhi — the metering layer for AI agents (Node binding): in-process virtual keys, budgets, and neutral usage-event metering.","directories":{},"_nodeVersion":"24.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@napi-rs/cli":"^2.18.4"},"optionalDependencies":{"@anvailabs/sandhi-darwin-arm64":"0.8.0","@anvailabs/sandhi-linux-x64-gnu":"0.8.0"},"_npmOperationalInternal":{"tmp":"tmp/sandhi_0.8.0_1790133173595_0.5409976827803475","host":"s3://npm-registry-packages-npm-production"}},"0.9.0":{"name":"@anvailabs/sandhi","version":"0.9.0","keywords":["llm","gateway","usage","metering","attribution","ai"],"license":"Apache-2.0","_id":"@anvailabs/sandhi@0.9.0","maintainers":[{"name":"anvai-labs","email":"singhvjd@gmail.com"}],"homepage":"https://github.com/anvai-labs/sandhi#readme","bugs":{"url":"https://github.com/anvai-labs/sandhi/issues"},"dist":{"shasum":"7c9b972d020c4d511dccb75439e149688029191d","tarball":"https://registry.npmjs.org/@anvailabs/sandhi/-/sandhi-0.9.0.tgz","fileCount":7,"integrity":"sha512-pSPZvByjUVAha2FvHrPot5jQ27XaGTnegQKn6CTi9hHwcHdvDQaI0PRXi9RBnJimiMu+Tlr8+EHnMyGlIH7kXg==","signatures":[{"sig":"MEQCIAuk27ss+1FtHrkWVWhYqGlzHuIuYxFEjdsvnJSQoOWsAiBYC721qUF+rwycT99TJnRZWWoA8KJ2ee+NwaYOn1uxAg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQDc19jUgcKNhMf8onQW8vxrzuau6LybRmy1hvr8itCSWgIgJNmPARwf5OEZzsCvRzxesXOpAY7jvROb5PerYeo+ktA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anvailabs%2fsandhi@0.9.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":34062},"main":"sandhi.js","napi":{"name":"sandhi","triples":{"defaults":false,"additional":["aarch64-apple-darwin","x86_64-unknown-linux-gnu"]}},"_from":"file:/home/runner/work/sandhi/sandhi/dist-npm/anvailabs-sandhi-0.9.0.tgz","types":"sandhi.d.ts","engines":{"node":">= 16"},"scripts":{"test":"node --test __test__/gateway.test.mjs","build":"napi build --platform --release","build:debug":"napi build --platform"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4891c9d5-d3bb-471f-9cc4-00b766448c18"}},"_resolved":"/home/runner/work/sandhi/sandhi/dist-npm/anvailabs-sandhi-0.9.0.tgz","_integrity":"sha512-pSPZvByjUVAha2FvHrPot5jQ27XaGTnegQKn6CTi9hHwcHdvDQaI0PRXi9RBnJimiMu+Tlr8+EHnMyGlIH7kXg==","repository":{"url":"git+https://github.com/anvai-labs/sandhi.git","type":"git"},"_npmVersion":"11.19.0","description":"Sandhi — the metering layer for AI agents (Node binding): in-process virtual keys, budgets, and neutral usage-event metering.","directories":{},"_nodeVersion":"24.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@napi-rs/cli":"^2.18.4"},"optionalDependencies":{"@anvailabs/sandhi-darwin-arm64":"0.9.0","@anvailabs/sandhi-linux-x64-gnu":"0.9.0"},"_npmOperationalInternal":{"tmp":"tmp/sandhi_0.9.0_1790146336188_0.9415940391823205","host":"s3://npm-registry-packages-npm-production"}},"0.9.1":{"name":"@anvailabs/sandhi","version":"0.9.1","keywords":["llm","gateway","usage","metering","attribution","ai"],"license":"Apache-2.0","_id":"@anvailabs/sandhi@0.9.1","maintainers":[{"name":"anvai-labs","email":"singhvjd@gmail.com"}],"homepage":"https://github.com/anvai-labs/sandhi#readme","bugs":{"url":"https://github.com/anvai-labs/sandhi/issues"},"dist":{"shasum":"fba4d294ca6956f78f7ca767dd7394cfe10fd28c","tarball":"https://registry.npmjs.org/@anvailabs/sandhi/-/sandhi-0.9.1.tgz","fileCount":7,"integrity":"sha512-jOT/Z0abh8amZt8naqfrhnkrCQrBsUBGqE+I4dvpRdn8txjQ7bKarNkFS5Fu3U5zgibHKnihg+OLjTSAWCseOw==","signatures":[{"sig":"MEYCIQC5dTdRsmmWBdt0eF3Yud/s4GyUVemEH8fA1SIM0zFRWwIhALk/AoeWamrIgjrx2OpVoqClIjq5dEUV2U1BuSXfoSX6","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIHeScu5SuTLIBxpfvQWKvhz86Cvpj9upzKKJOuOZUuj0AiEAt+GmoxKa9GOOH/DAdbU/K+B7akncD3fgXVhkekFkUU4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anvailabs%2fsandhi@0.9.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":34062},"main":"sandhi.js","napi":{"name":"sandhi","triples":{"defaults":false,"additional":["aarch64-apple-darwin","x86_64-unknown-linux-gnu"]}},"_from":"file:/home/runner/work/sandhi/sandhi/dist-npm/anvailabs-sandhi-0.9.1.tgz","types":"sandhi.d.ts","engines":{"node":">= 16"},"scripts":{"test":"node --test __test__/gateway.test.mjs","build":"napi build --platform --release","build:debug":"napi build --platform"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4891c9d5-d3bb-471f-9cc4-00b766448c18"}},"_resolved":"/home/runner/work/sandhi/sandhi/dist-npm/anvailabs-sandhi-0.9.1.tgz","_integrity":"sha512-jOT/Z0abh8amZt8naqfrhnkrCQrBsUBGqE+I4dvpRdn8txjQ7bKarNkFS5Fu3U5zgibHKnihg+OLjTSAWCseOw==","repository":{"url":"git+https://github.com/anvai-labs/sandhi.git","type":"git"},"_npmVersion":"11.19.0","description":"Sandhi — the metering layer for AI agents (Node binding): in-process virtual keys, budgets, and neutral usage-event metering.","directories":{},"_nodeVersion":"24.21.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@napi-rs/cli":"^2.18.4"},"optionalDependencies":{"@anvailabs/sandhi-darwin-arm64":"0.9.1","@anvailabs/sandhi-linux-x64-gnu":"0.9.1"},"_npmOperationalInternal":{"tmp":"tmp/sandhi_0.9.1_1790182711613_0.9883458632934816","host":"s3://npm-registry-packages-npm-production"}},"0.10.0":{"name":"@anvailabs/sandhi","version":"0.10.0","keywords":["llm","gateway","usage","metering","attribution","ai"],"license":"Apache-2.0","_id":"@anvailabs/sandhi@0.10.0","maintainers":[{"name":"anvai-labs","email":"singhvjd@gmail.com"}],"homepage":"https://github.com/anvai-labs/sandhi#readme","bugs":{"url":"https://github.com/anvai-labs/sandhi/issues"},"dist":{"shasum":"27591c94d73aae640813a2695520ed1e3024ddd0","tarball":"https://registry.npmjs.org/@anvailabs/sandhi/-/sandhi-0.10.0.tgz","fileCount":7,"integrity":"sha512-vsBOUY1B/adC7SURN3NSfdxvaRrQB437S2HXkMnA89T5uuI62Cp0LMykZr19YlZRPHNXGJdu7qvpe80YSA9zrg==","signatures":[{"sig":"MEQCID4trlNHkQePZ76+6w4zdhCh+/GBPsDEjt11wVxrcsHIAiAExQLPVjmsiDUK7iyJpdA7naOLqEIUyoNVyuOJfdrKdw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCOVQMDKhL4dEiwh09uOhXiGzGNU0mjB5dXhcpz1yej/QIhANDmC2kjv6pBbc7jJeaLjjsr5M4ueizJAGD1f2yUcuTv","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anvailabs%2fsandhi@0.10.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":34065},"main":"sandhi.js","napi":{"name":"sandhi","triples":{"defaults":false,"additional":["aarch64-apple-darwin","x86_64-unknown-linux-gnu"]}},"_from":"file:/home/runner/work/sandhi/sandhi/dist-npm/anvailabs-sandhi-0.10.0.tgz","types":"sandhi.d.ts","engines":{"node":">= 16"},"scripts":{"test":"node --test __test__/gateway.test.mjs","build":"napi build --platform --release","build:debug":"napi build --platform"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4891c9d5-d3bb-471f-9cc4-00b766448c18"}},"_resolved":"/home/runner/work/sandhi/sandhi/dist-npm/anvailabs-sandhi-0.10.0.tgz","_integrity":"sha512-vsBOUY1B/adC7SURN3NSfdxvaRrQB437S2HXkMnA89T5uuI62Cp0LMykZr19YlZRPHNXGJdu7qvpe80YSA9zrg==","repository":{"url":"git+https://github.com/anvai-labs/sandhi.git","type":"git"},"_npmVersion":"11.19.0","description":"Sandhi — the metering layer for AI agents (Node binding): in-process virtual keys, budgets, and neutral usage-event metering.","directories":{},"_nodeVersion":"24.21.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@napi-rs/cli":"^2.18.4"},"optionalDependencies":{"@anvailabs/sandhi-darwin-arm64":"0.10.0","@anvailabs/sandhi-linux-x64-gnu":"0.10.0"},"_npmOperationalInternal":{"tmp":"tmp/sandhi_0.10.0_1790263384549_0.9548989950030344","host":"s3://npm-registry-packages-npm-production"}},"0.10.1":{"_id":"@anvailabs/sandhi@0.10.1","bugs":{"url":"https://github.com/anvai-labs/sandhi/issues"},"dist":{"shasum":"685267d49e383591adf2dd00194d9a0ebdd1d1c7","tarball":"https://registry.npmjs.org/@anvailabs/sandhi/-/sandhi-0.10.1.tgz","fileCount":7,"integrity":"sha512-XqQ2VqaPs1k4eG46i/uPuiptjXSZEVWCcE4jprmHXpKTeZRn5dbpY779WWLxrqLYHtE3mYirw+u2e/0yfNNiZw==","signatures":[{"sig":"MEYCIQDaLlG6wQCyd9lVVHeLjO/wUp+26TaigwxC9POePecU9AIhAIJmpHP/vDefJQNsQt9slQz354oIGEH8K05CUU8UTJ5v","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDV7HaXf3UxEijhR3fbwkB112K/nl1VVoLoscQkm/kB/AIhAMZTKQ+nKgzAbbmMdvxDZyREw8+WaeQBIo3wm7+4pegh"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anvailabs%2fsandhi@0.10.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":34065},"main":"sandhi.js","name":"@anvailabs/sandhi","napi":{"name":"sandhi","triples":{"defaults":false,"additional":["aarch64-apple-darwin","x86_64-unknown-linux-gnu"]}},"_from":"file:/home/runner/work/sandhi/sandhi/dist-npm/anvailabs-sandhi-0.10.1.tgz","types":"sandhi.d.ts","engines":{"node":">= 16"},"license":"Apache-2.0","scripts":{"test":"node --test __test__/gateway.test.mjs","build":"napi build --platform --release","build:debug":"napi build --platform"},"version":"0.10.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4891c9d5-d3bb-471f-9cc4-00b766448c18"}},"homepage":"https://github.com/anvai-labs/sandhi#readme","keywords":["llm","gateway","usage","metering","attribution","ai"],"_resolved":"/home/runner/work/sandhi/sandhi/dist-npm/anvailabs-sandhi-0.10.1.tgz","_integrity":"sha512-XqQ2VqaPs1k4eG46i/uPuiptjXSZEVWCcE4jprmHXpKTeZRn5dbpY779WWLxrqLYHtE3mYirw+u2e/0yfNNiZw==","repository":{"url":"git+https://github.com/anvai-labs/sandhi.git","type":"git"},"_npmVersion":"11.19.0","description":"Sandhi — the metering layer for AI agents (Node binding): in-process virtual keys, budgets, and neutral usage-event metering.","directories":{},"maintainers":[{"name":"anvai-labs","email":"singhvjd@gmail.com"}],"_nodeVersion":"24.21.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@napi-rs/cli":"^2.18.4"},"optionalDependencies":{"@anvailabs/sandhi-darwin-arm64":"0.10.1","@anvailabs/sandhi-linux-x64-gnu":"0.10.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sandhi_0.10.1_1790290751201_0.9039981730880393"}}},"time":{"created":"2026-09-03T03:12:14.030Z","modified":"2026-09-24T22:59:11.607Z","0.5.0":"2026-09-03T03:12:16.248Z","0.5.1":"2026-09-03T16:48:40.493Z","0.6.0":"2026-09-08T05:01:25.263Z","0.6.1":"2026-09-08T16:29:45.663Z","0.7.0":"2026-09-17T09:17:16.925Z","0.8.0":"2026-09-23T03:12:53.681Z","0.9.0":"2026-09-23T06:52:16.268Z","0.9.1":"2026-09-23T16:58:31.702Z","0.10.0":"2026-09-24T15:23:04.666Z","0.10.1":"2026-09-24T22:59:11.282Z"},"bugs":{"url":"https://github.com/anvai-labs/sandhi/issues"},"license":"Apache-2.0","homepage":"https://github.com/anvai-labs/sandhi#readme","keywords":["llm","gateway","usage","metering","attribution","ai"],"repository":{"url":"git+https://github.com/anvai-labs/sandhi.git","type":"git"},"description":"Sandhi — the metering layer for AI agents (Node binding): in-process virtual keys, budgets, and neutral usage-event metering.","maintainers":[{"name":"anvai-labs","email":"singhvjd@gmail.com"}],"readme":"# @anvailabs/sandhi\n\nNode binding for [**Sandhi**](https://github.com/anvai-labs/sandhi) — *the metering layer for\nAI agents*. The Rust core runs in-process through napi-rs. It exposes **metering** (virtual keys,\nbudgets, neutral usage-event emission — zero network hop) and a typed persistent provider runtime.\n\n```bash\n# The npm package is not published yet; build the binding from a source checkout.\ncd bindings/node\nnpm ci\nnpm run build\nnpm test\n```\n\n```js\nimport { Gateway, parseUsage } from \"./sandhi.js\";\n\nconst gw = new Gateway(\"usage.jsonl\");                 // events append as JSONL (+ in-memory)\ngw.addVirtualKey(\"vk_alice\", \"alice\", \"platform\", \"anthropic\");\ngw.setBudget(\"group:platform\", 1_000_000);\n\n// ... you make your own provider call and get the raw response JSON ...\nconst event = gw.meter(\"vk_alice\", \"anthropic\", \"claude-x\", responseJson, \"conv_7\");\n// event.tokensIn, event.cacheReadTokens, event.subjectId, ...\ngw.spent(\"group:platform\");                            // budget recorded\ngw.checkBudget(\"group:platform\", 5000);                // true/false\n\nparseUsage(\"openai\", responseJson);                    // { tokensIn, tokensOut, cache* }\n```\n\n### Custom / unknown providers (host escape hatch)\n\nFor a provider Sandhi doesn't natively parse, do your own parsing and pass the counts:\n\n```js\ngw.meterTokens(\"vk_alice\", \"myprovider\", \"model\", tokensIn, tokensOut);\n```\n\n`meter()` parses usage **at the source** (same Rust parsers as the proxy), attributes it to the\nvirtual key's subject/group, records the budget, emits the neutral event, and returns it.\nUnknown key or bad JSON → throws.\n\n### Usage snapshots (in-process aggregation)\n\n```js\nconst rows = JSON.parse(gw.usageSnapshotJson(\"subject\"));   // busiest subject first\nrows[0].billable_tokens;                                    // what budgets enforce on\nJSON.parse(gw.usageSnapshotJson(\"total\"))[0];               // one grand-total row\nJSON.parse(gw.usageSnapshotJson(\"session\", 256));           // bound distinct keys to 256\n```\n\nFolds the events recorded so far into\n[`usage-aggregate.v1`](https://github.com/anvai-labs/sandhi/blob/main/schemas/usage-aggregate.v1.schema.json)\nrows for one dimension — `subject` (`user`), `group`, `provider`, `model`, `key`\n(`virtual_key`), `session`, or `total` — using the same fold the reverse proxy, the `sandhi` CLI,\nand the dashboard read. Neutral units only, never dollars. The rows are the schema'd contract\nshape (snake_case), not napi camelCase. The optional second argument caps distinct keys (default\n1024); everything past it folds into a single `\"(overflow)\"` row, so a long-lived process loses\nper-key detail but never the sum. Unknown dimension → throws.\n\n### Provider transport (in-process)\n\nReuse a provider handle so its HTTP pool, retry policy, timeouts, and circuit breaker survive across\ncalls. Inputs and outputs are serialized Sandhi chat-contract v1 documents rather than\nprovider-native JSON:\n\n```js\nimport { ProviderRuntime } from \"./sandhi.js\";\n\nconst runtime = new ProviderRuntime();\nconst provider = runtime.provider(\"openrouter\", \"openai/gpt-4o\", API_KEY);\nconst request = JSON.stringify({\n  schema_version: \"1\",\n  model: \"openai/gpt-4o\",\n  messages: [{ role: \"user\", content: \"hello\" }],\n});\n\nconst response = JSON.parse(await provider.completeJson(request));\nfor await (const eventJson of provider.streamJson(request)) {\n  const event = JSON.parse(eventJson); // response_start, text_delta, usage, finish, ...\n}\n```\n\n`completeJson` accepts an optional second JSON-string argument containing per-call wire headers;\n`streamJson` accepts the same argument and returns an async iterable. Transport-owned headers and\ncredentials cannot be overridden. Invalid documents fail before network I/O; provider failures\nthrow `SandhiProviderError` with a structured `ProviderErrorV1` payload.\n\nCanonical streams may emit accounting-only `usage` events before content or after a\nnumeric usage snapshot. When `usage.completeness` is `\"unavailable\"` and a valid\n`cache_read_observation` is present, merge that metadata without adding its counters or replacing the last\nnumeric snapshot/completeness. It is not a second final usage verdict. These events\npreserve evidence for consumers that stop reading after content; transparent and\ntranslated provider wire responses are unchanged.\n\nApache-2.0. The transport surface links `sandhi-providers` (async HTTP stack) into the addon.\n","readmeFilename":"README.md"}