Files
ai-kit/package.json
T
CatoandClaude 30003a6999 feat(usage-log): one line per model call for every app on a box; a reader and a summary (1.27.0) (#113)
About $567 went to Google on 10-11 Nov 2026 and nobody could say which app
spent it, on what, or when: each app counted its own calls in its own
process, or not at all.

The chain walk now reports every link it touches (app, vendor, model;
served, failed with status and kind, or refused with the spend rule; tokens
and time when known; never content). With AI_USAGE_DIR set the event is
appended to <dir>/<UTC day>.jsonl through process.getBuiltinModule, so the
package root stays importable in a browser bundle. readUsageDay and
summariseUsage give the per-vendor and per-app picture.

test/usage-log.test.js: the three outcomes from a real walk, the file sink,
null for could-not-look, torn lines, a throwing sink, the summary.


Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-13 10:05:53 +01:00

140 lines
3.4 KiB
JSON

{
"name": "@bitbaum/ai-kit",
"version": "1.27.0",
"license": "MIT",
"author": "Mao Nakamoto",
"homepage": "https://github.com/bitbaum/ai-kit#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/bitbaum/ai-kit.git"
},
"bugs": {
"url": "https://github.com/bitbaum/ai-kit/issues"
},
"keywords": [
"ai",
"llm",
"form-fill",
"fallback",
"failover",
"health-check",
"free-tier",
"rate-limit",
"quota",
"usage",
"fair-share",
"groq",
"openrouter"
],
"type": "module",
"sideEffects": false,
"packageManager": "pnpm@11.25.0",
"engines": {
"node": ">=20"
},
"publishConfig": {
"access": "public",
"provenance": true
},
"files": [
"dist",
"dist-cjs",
"src"
],
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./sse": {
"types": "./dist/sse.d.ts",
"default": "./dist/sse.js"
},
"./forms": {
"types": "./dist/forms.d.ts",
"default": "./dist/forms.js"
},
"./react": {
"types": "./dist/react.d.ts",
"default": "./dist/react.js"
},
"./server": {
"types": "./dist/server.d.ts",
"default": "./dist/server.js"
},
"./registry": {
"types": "./dist/registry.d.ts",
"require": "./dist-cjs/registry.js",
"default": "./dist/registry.js"
},
"./web": {
"types": "./dist/web/index.d.ts",
"default": "./dist/web/index.js"
},
"./mcp": {
"types": "./dist/mcp.d.ts",
"default": "./dist/mcp.js"
},
"./capability": {
"types": "./dist/capability/index.d.ts",
"default": "./dist/capability/index.js"
},
"./grounding": {
"types": "./dist/grounding/index.d.ts",
"require": "./dist-cjs/grounding/index.js",
"default": "./dist/grounding/index.js"
},
"./byok": {
"types": "./dist/byok.d.ts",
"default": "./dist/byok.js"
},
"./seal": {
"types": "./dist/seal.d.ts",
"default": "./dist/seal.js"
},
"./byok-probe": {
"types": "./dist/byok-probe.d.ts",
"default": "./dist/byok-probe.js"
},
"./images": {
"types": "./dist/images.d.ts",
"default": "./dist/images.js"
}
},
"scripts": {
"build": "tsc -p tsconfig.json && tsc -p tsconfig.cjs.json && node -e \"require('fs').writeFileSync('dist-cjs/package.json', JSON.stringify({type:'commonjs'})+'\\n')\"",
"lint": "eslint .",
"typecheck": "tsc -p tsconfig.json --noEmit",
"test": "node --test test/*.test.js",
"check:catalog": "pnpm run build && node scripts/check-catalog.mjs",
"check:vision": "pnpm run build && node scripts/probe-vision.mjs",
"smoke": "pnpm run build && node scripts/smoke.mjs",
"verify": "pnpm run format:check && pnpm run lint && pnpm run typecheck && pnpm run build && pnpm test",
"prepare": "pnpm run build",
"format": "prettier --write .",
"format:check": "prettier --check ."
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@types/node": "^26.6.6",
"eslint": "^10.14.0",
"globals": "^17.14.0",
"prettier": "3.9.10",
"typescript": "^6.0.3",
"typescript-eslint": "^8.72.1"
},
"dependencies": {
"@mozilla/readability": "^0.6.0",
"ai-forms": "^0.1.3",
"linkedom": "^0.18.15"
},
"peerDependencies": {
"react": ">=18"
},
"peerDependenciesMeta": {
"react": {
"optional": true
}
}
}