Files
plugins/packages/fingerprint
yetone 529929fd93 fingerprint 0.2.2: an account named 北冥 pins its samples, and the job file names the account (#615)
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.
2026-11-02 07:20:47 +08:00
..

Magpie Fingerprint

简体中文 · Magpie · lm-detector

Investigate suspected model substitution directly in Magpie. Compare numeric response fingerprints across providers or repeat a run after a service changes. The page reuses Magpie’s configured models and gateway; the pinned lmfpd-sdk detector ranks nearby reference-bank models. Rankings are evidence for investigation, not proof of model identity.

Fingerprint workspace (explicit demo data)

  • Select up to 24 models across providers, with the same three challenges per batch.
  • Reuse Magpie authentication and native endpoint metadata; optionally pin an account.
  • Follow live sample counts, cancel work, and inspect the actual response route.
  • Compare ranked candidates, including partial and unscorable outcomes.
  • Keep raw replies and data versions in local history; export or copy JSON.
  • Magpie's native page bridge, controls and design tokens; follows the host's theme and language.
  • Compact model lists, keyboard-accessible view tabs, and narrow-screen layouts.

Install

Install Fingerprint from Plugins → Discover, or use the CLI. Requires a current Magpie release with page.service support and Bun 1.4.2+:

magpie plugin add @magpie-community/page-fingerprint

Open Fingerprint in the sidebar, or choose Fingerprint from a provider's menu. Starting a detection sends three requests per selected model and uses that provider's quota.

Development

Run these commands from packages/fingerprint/. Source, tests and the built dist/ assets are checked in. Installation and the offline tests do not need package downloads: vendor/lmfpd-sdk pins the MIT SDK at 0.2.0. Only rebuilding the UI and running the type checker require the development dependencies. Direct build-tool versions are exact in package.json; bun.lock fixes the complete dependency graph using registry.npmjs.org. Builds use Bun 1.4.4. There are no install/pack lifecycle scripts. After a source change, rebuild and commit the resulting dist/ files.

The standalone project and release history are at KaranocaVe/magpie-fingerprint.

bun run rebuild
bun start

rebuild installs with --frozen-lockfile --ignore-scripts in an isolated copy, runs typecheck/tests/build, and copies dist/ back. This avoids Bun resolving the parent monorepo's workspaces; its temporary directory is removed on completion. In a standalone copy of this package, bun install --frozen-lockfile --registry https://registry.npmjs.org and bun run check produce the same build.

The plugin page service listens on 3488 by default and uses Magpie's gateway at http://127.0.0.1:3425. Opening or refreshing the page never downloads reference data. Download reference data explicitly fetches a fresh snapshot; starting a run downloads one only when no usable snapshot is cached. There is no background refresh. The default primary source is https://lm.ikale.io/data/; its fallback is https://cdn.jsdmirror.com/npm/lmfpd-data@latest/. These hosts see the client's IP address. Reference downloads carry no provider credentials, model ids, prompts or replies. Only an explicitly started job sends sampling prompts through the configured gateway. See integration.md for gateway authentication, magpie web, environment variables, local reference sources, and the explicit --demo fixture.

Scope and limits

The first release supports numeric fingerprinting. Each run retains its loaded reference snapshot and records its builtAt value. The remote reference data is not version-pinned or authenticated by a locally pinned hash; the fallback uses @latest. Runs use three shared challenges per batch, bounded work, and cancellation. It records proposed, observed, and failed evidence separately; it does not prove provider identity, authenticate a model, or infer hidden tokenizers. --demo runs an isolated illustrative workflow without model calls.

Magpie middleware and protocol adapters still apply. A changed actual provider/model invalidates that target's aggregate score. Account pinning is optional; it does not turn a routed channel into an upstream identity guarantee. Tokenizer probing is deferred.

MIT licensed. Third-party notices are in THIRD_PARTY_NOTICES.md.