Files
ai-kit/package.json
T
ce95a19b5b fix(grounding): a markdown table is not a fabrication (#54)
A live answer laid its findings out as a table and was reported as fabricating.
Every claim in it was cited and correct; the flagged "novel proper nouns" were:

    Item
    Item Status Notes Pending

Those are the header cells of `| Category | Item | Status | Notes |`. A pipe is
not a word character, so it was not a boundary — the header tokenised as one
capitalised run, and the run then continued past the row break into the FIRST
CELL OF THE NEXT ROW to produce a phrase that appears nowhere on screen.

This is the worst direction for this check to fail in. FleetCrown now renders a
prominent "some of this is not backed by your records" warning on a flagged
answer, so a false positive does not merely add noise — it teaches the operator
to dismiss the warning, which costs more than the fabrication the check exists
to catch. A grounding check that cries wolf is worse than one that is absent,
because absence is at least legible.

Fix: pipes become line breaks alongside the existing code-fence stripping. A
cell is its own utterance and a run must not span two of them.

Recall is barely touched, and the test says so. Splitting per cell makes each
header word cell-initial, and sentence-initial single words were ALREADY skipped
for exactly this reason ("Rotate the key" must not flag "Rotate"). A fabrication
inside a cell still trips its remaining tokens — pinned by a test asserting that
"Program Manager at Impact Hub Zurich" in a table cell is caught as both the
composite run and its individual tokens. If that test ever goes quiet, this
boundary has become a blindfold.

Found by reading the grounding verdict on a real production answer rather than
by testing the parser, which is the only way this shape shows up: it needs a
model that chose a table, and every unit fixture used prose.

239 tests, up from 236.

Co-authored-by: Cato <georgy.butaev@revamp-it.ch>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-12 12:37:49 -07:00

112 lines
2.7 KiB
JSON

{
"name": "@bitbaum/ai-kit",
"version": "1.4.2",
"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",
"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"
},
"./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"
},
"./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"
}
},
"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",
"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.5.0",
"eslint": "^10.10.0",
"globals": "^17.12.0",
"prettier": "3.9.6",
"typescript": "^6.0.3",
"typescript-eslint": "^8.70.0"
},
"dependencies": {
"ai-forms": "^0.1.2"
},
"peerDependencies": {
"react": ">=18"
},
"peerDependenciesMeta": {
"react": {
"optional": true
}
}
}