StockRabbit (#615): with the WorkBuddy account 北冥 picked, every sample failed with "Header 'X-Magpie-Account' has invalid value", since fetch refuses a header value that isn't ASCII. The saved job also didn't say which account it ran on. - gateway.ts: accountHeader() sends printable ASCII as it is and any other name percent-encoded; magpie v0.1.2658 (ad53a23dc) decodes it. The account list now names an account by its alias or user, not by the provider's display name. - detector.ts: a target's account resolves to the account's id (by id or a unique name for that model's provider), and the job keeps config.account / config.accountName and results[].target.account / accountName. Jobs written before 0.2.2 have neither and load unchanged. - web: the result card names the account. - integration.md: the header's encoding and a Job files section. Run (mote, sandbox HOME): bun install --frozen-lockfile, bun run typecheck, bun test (36 pass, 0 fail), bun run build, bun scripts/check.mjs (exit 0). tests/account.test.ts runs the server against a fake gateway whose quotas list 北冥: an 0.2.1 job loads unchanged, a run pinned to 北冥 reaches the gateway as %E5%8C%97%E5%86%A5 on every request, and the job file names 北冥. The page on mote in Chromium and WebKit at 420px against the same fake gateway: the picker shows "北冥 · workbuddy", 12 requests carry the encoded header, the card says 北冥. Broken by hand: accountHeader returning the raw name turns account.test red (no request reaches the gateway pinned). Not tried: a real WorkBuddy account, Windows, the page in a language other than English.
98 lines
2.4 KiB
JSON
98 lines
2.4 KiB
JSON
{
|
|
"name": "@magpie-community/page-fingerprint",
|
|
"version": "0.2.2",
|
|
"description": "Check for suspected model substitution with numeric response fingerprints in Magpie, powered by lm-detector.",
|
|
"type": "module",
|
|
"license": "MIT",
|
|
"main": "dist/plugin.js",
|
|
"files": [
|
|
"dist",
|
|
"page",
|
|
"README.md",
|
|
"README.zh-CN.md",
|
|
"LICENSE",
|
|
"integration.md",
|
|
"THIRD_PARTY_NOTICES.md"
|
|
],
|
|
"engines": {
|
|
"bun": ">=1.4.2"
|
|
},
|
|
"scripts": {
|
|
"dev": "bun --watch src/cli.ts",
|
|
"start": "bun src/cli.ts",
|
|
"build": "bun scripts/build.ts",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "bun test",
|
|
"check": "bun run typecheck && bun run test && bun run build",
|
|
"format": "prettier --write src web scripts tests page *.json *.ts *.md",
|
|
"rebuild": "bun scripts/rebuild.ts"
|
|
},
|
|
"magpie": {
|
|
"page": {
|
|
"title": "Fingerprint",
|
|
"titles": {
|
|
"zh": "模型指纹",
|
|
"zh-TW": "模型指紋",
|
|
"ja": "モデル指紋",
|
|
"de": "Modell-Fingerabdruck"
|
|
},
|
|
"file": "page/index.html",
|
|
"service": {
|
|
"port": 3488,
|
|
"option": "port"
|
|
}
|
|
},
|
|
"actions": [
|
|
{
|
|
"id": "fingerprint",
|
|
"menu": "provider",
|
|
"title": "Fingerprint",
|
|
"titles": {
|
|
"zh": "检测指纹",
|
|
"zh-TW": "檢測指紋",
|
|
"ja": "指紋を検査",
|
|
"de": "Fingerabdruck prüfen"
|
|
}
|
|
}
|
|
],
|
|
"options": {
|
|
"port": 3488
|
|
},
|
|
"permissions": []
|
|
},
|
|
"devDependencies": {
|
|
"react": "19.3.1",
|
|
"react-dom": "19.3.1",
|
|
"@phosphor-icons/react": "2.1.10",
|
|
"@types/bun": "1.4.4",
|
|
"@types/react": "19.3.0",
|
|
"@types/react-dom": "19.3.0",
|
|
"@vitejs/plugin-react": "5.2.0",
|
|
"prettier": "3.9.10",
|
|
"typescript": "5.9.3",
|
|
"vite": "7.3.7"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/magpie-community/plugins.git",
|
|
"directory": "packages/fingerprint"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/magpie-community/plugins/issues"
|
|
},
|
|
"author": "KaranocaVe (https://github.com/KaranocaVe)",
|
|
"homepage": "https://github.com/KaranocaVe/magpie-fingerprint#readme",
|
|
"keywords": [
|
|
"magpie",
|
|
"magpie-page",
|
|
"magpie-plugin",
|
|
"llm",
|
|
"fingerprint",
|
|
"model-detection"
|
|
],
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
"packageManager": "bun@1.4.4"
|
|
}
|