fingerprint 0.1.0: a page that checks whether a model answers like the one it claims to be (#516)

Adds the Fingerprint page plugin (packages/fingerprint): it checks whether a model behind the local magpie gateway answers like the model it claims to be.

Reviewed at 531ca11f4 (KaranocaVe). Run at that head merged with main 848497c, through mote-run on the Mac mini with Bun 1.4.2:
- bun run rebuild from the committed bun.lock (frozen, --ignore-scripts): typecheck, 30/30 tests, build; diff -r against the committed dist/ is empty.
- HOME=$(mktemp -d) bun test: 3838 pass, 0 fail. bun scripts/check.mjs: exit 0.
- Offline preload refusing every non-loopback fetch/socket: 30/30, nothing refused.
- Broken by hand, each red: ensureDetector() in bootstrap, dropping ttl: Infinity, validating the job after the download.

Maintainer decision: the reference data comes from two third-party hosts (lm.ikale.io, cdn.jsdmirror.com), only on an explicit Download or a valid job, and both are named on the page, in registry.json and the READMEs. It is data used locally to rank candidates and is sent nowhere; the @latest fallback has no pinned hash, so a bad snapshot would rank wrongly, which the page states.

Not on npm yet (E404): magpie installs it from the dist branch until an owner publishes the first version.
This commit is contained in:
KaranocaVe
2026-10-31 02:00:33 +08:00
committed by GitHub
parent 9d4c7ce558
commit 00f4d84b8f
65 changed files with 10141 additions and 0 deletions
+2
View File
@@ -100,6 +100,8 @@
{"package": "@magpie-community/tools-layerfs", "name": "LayerFS", "kind": "tools", "community": true, "summary": {"en": "LayerFS workspaces for every agent: deduplicated checkpoints and branches behind stable filesystem paths, instead of a fresh copy of the tree for every agent.", "zh": "给每个 agent 的 LayerFS 工作区:稳定的文件系统路径背后是可去重的检查点与分支,而不是每个 agent 各复制一棵项目树。"}},
{ "package": "@magpie-community/page-usage", "name": "Usage Glance", "kind": "page", "community": true,
"summary": { "en": "A page in magpie's window with calls, errors, tokens and cost for today, 7 or 30 days, and the models behind them. Reads only your usage summary.", "zh": "在 magpie 窗口里一眼看到今天、7 天或 30 天的调用、错误、token、费用和对应模型。只读取用量汇总。" } },
{ "package": "@magpie-community/page-fingerprint", "name": "Fingerprint", "kind": "page", "community": true,
"summary": { "en": "Check for suspected model substitution by comparing response fingerprints across Magpie providers. Uses lm-detector with shared challenges, local evidence history and JSON export; sampling uses provider quota. Reference data is downloaded on demand from lm.ikale.io, falling back to cdn.jsdmirror.com.", "zh": "在 Magpie 内检测响应指纹,为疑似模型替换提供核查线索。基于 lm-detector,支持跨渠道共享挑战、保留本地证据与 JSON 导出;采样会消耗模型额度。参考库按需从 lm.ikale.io 下载,备用源为 cdn.jsdmirror.com。" } },
{ "package": "@magpie-community/page-chat", "name": "Chat", "kind": "page", "community": true,
"summary": { "en": "A chat page in magpie's window by Magic_zero: talk to magpie's own models with your MCP servers, instructions and skills, images and LaTeX. Runs a local service on 127.0.0.1 that only its own page can use.", "zh": "Magic_zero 做的 magpie 窗口内「对话」页面:用 magpie 自己的模型聊天,带上你的 MCP 服务器、指令和技能,支持图片与 LaTeX。本地服务只在 127.0.0.1,只给自己的页面用。" } },
{ "package": "@magpie-community/page-agent-office", "name": "Agent Office", "kind": "page", "community": true,