mirror of
https://github.com/bitbaum/ai-kit.git
synced 2026-12-04 07:50:33 +01:00
The unknown-citation rule is described in this file as catching "the strongest possible signal of fabrication — it invents its own proof". It matched /\[[FD]\d+\]/ — ASCII brackets only — and models do not reliably write those. Observed 2026-09-13, two models on Groq, both unprompted, from a prompt whose every example used [F1]: openai/gpt-oss-120b The most recent feedback was on project Heidi【F3】. groq/compound-mini ...concerned project **Heidi**【F3】. An ASCII-only match does not flag those as bad citations. It does not SEE them. So `【F9】` on a turn holding three records sails straight past the rule, while `[F9]` is caught — a hole opened by a character variant, in the one check whose whole job is invented proof. Nothing else covers it. A false citation hung on an otherwise attested claim trips neither the proper-noun rule nor the number rule: every name and number in the sentence really is in the records. Only the proof is invented, and that is exactly the shape a reader is least able to check. Brackets are normalised before matching — fullwidth 【】, lenticular 〔〕 and fullwidth square []. Every substitution is one character for one character, so offsets into the normalised copy still address the original, and the violation reports the citation VERBATIM. Telling an author their `[F9]` is wrong when they wrote `【F9】` sends them looking for a string that is not in their answer. Proved by mutation: dropping the normalisation fails the new fullwidth test and nothing else, which is the point — the rest of the suite could not see this. 263 tests pass, verify green. Claude-Session: https://claude.ai/code/session_01Nm2REqtdsVsvjukBU2maCz Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
112 lines
2.7 KiB
JSON
112 lines
2.7 KiB
JSON
{
|
|
"name": "@bitbaum/ai-kit",
|
|
"version": "1.7.1",
|
|
"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
|
|
}
|
|
}
|
|
}
|