nb5p (Discord #feedback, 10-31): the 模型指纹 page stays blank in the desktop app while `magpie web` (Chromium) shows it. Cause, Linux: magpie frames a plugin page in <iframe sandbox="allow-scripts">, so the service document has an opaque origin. WebKitGTK (2.52.6, magpie's Linux window) then matches nothing to CSP 'self', and the service's policy was 'self' alone for scripts, styles and images: the bundle was never requested. Chromium and macOS WebKit match 'self' there, so web mode and the Mac app worked. The service now names its own validated listener (http://127.0.0.1:<port> or localhost:<port>) and, when proxied, the validated launcher origin, in every fetch directive. Nothing else is allowed: script-src keeps its nonce and no 'unsafe-inline', and object-src/base-uri/form-action are 'none'. Two Windows faults on the same path: - boot.js took the window's http://wails.localhost for a remote web page and showed "upgrade magpie" instead of going to the local service. Every *.localhost, localhost, ::1 and 127.x now count as this computer (the service still checks Host and Origin and its bearer token). - server.ts kept assets inside ui/ with startsWith(resolve(uiDir) + "/"), which never holds for backslash paths, so every asset was a 404 on Windows, in web mode too. It now uses path.relative, and still refuses .., encoded .. and a backslash escape. integration.md says the same about the CSP. dist rebuilt with Bun 1.4.2 on mote (the old source rebuilt to the committed dist byte for byte, so the dist diff is only this change). Run: - mote (macOS 27): bun run build, typecheck, bun test: 33 pass. - win-run (Windows 11): bun test: 33 pass. - Linux, the real app: a dev magpie (-tags dev,gtk3) in WSL magpie-desktop under a sandbox HOME, with this plugin installed. Old plugin: the frame reached the service and no script ran, blank. New: the service page rendered and connected to magpie. - macOS, a WKWebView with a wails:// scheme over a real dev backend on mote, sandboxed frame: renders with the old and the new policy. Broken by hand: - the new CSP test is red on the old server.ts (no own origin in script-src etc.); - the boot test for wails.localhost is red on the old boot.js; - the asset test is red on Windows with the old containment check. Not tried: the real Windows Wails app (WebView2) end to end, and the reporter's own machine; their platform isn't stated, and Linux is the one where this reproduces.
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.
- 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.
