With `enableDecisionProvider: true` the plugin now gives a keyless `auth` hook for provider `agentcompass` beside its config entry. magpie's host lists, signs in and serves only a provider an auth hook names, and posts System One to `<loader baseURL>/systemone` through the loader's fetch. 0.1.0 had the config entry only, so with the option on there was no Classifier option, `magpie plugin login agentcompass` failed, and `/v1/systemone` returned 404 (akiiwa-games/magpie-agentcompass-router#1). The loader's fetch answers `/systemone` only and gives 404 for every other path. With the option off nothing is registered. Mode A is unchanged. The README gives the model names for each install source and the order: option, restart, login. Version 0.1.1.
The capability-curve sync from the first push was taken out to go in its own PR. The README's CR bytes went with it.
What was run at b3cbc52dd (WSL magpie-desktop, Bun 1.4.2, Node 22):
- `bun test` in packages/agentcompass: 34 pass. `node --test test/router.test.mjs`: 34/34.
- `bun scripts/check.mjs`: every package and registry.json pass.
- Broken by hand: 0.1.0's src/index.js with this head's tests fails 4 and 4d ("magpie plugin list must show the agentcompass provider").
- The diff since review 496773a47: allocator.js, catalog.js and profiler-core.js are byte-equal to origin/main; index.js and package.json are byte-equal to the reviewed 496773a47; `grep -c $'\r' README.md` gives 0.
- A real magpie (origin/main 1826c4bd9, `go build -tags gtk3`) in a sandbox HOME/XDG on port 3511, using plugin add <dir>, options, login, list, serve, then POST /v1/systemone:
- 0.1.0 with the option on: "no plugin signs in to agentcompass", then 404 "magpie has no Jev provider".
- 0.1.1 with the option off: no provider and a 404.
- 0.1.1 with the option on: "signed in to AgentCompass", then "agentcompass (AgentCompass, 1 models) signed in", then a 200 with work_kind debug_review.
- PR CI: test and on-npm pass.
Not tried: the market (npm) install, since the package is not on npm yet. A Routing Group in the GUI.
New package @magpie-community/gateway-agentcompass 0.1.0 (akiiwa-games, #670): a gateway middleware that profiles a request and routes `agentcompass` / `agentcompass/*` to a model and effort within the user's own candidateModels. Only `model` and the effort field change; nothing is added to the prompt; no network unless the user sets allowExternalScorer: true plus a URL.
Reviewed at head 3bdea54 (rebased on 7ea6119), after three review rounds.
Run on mote (macOS), at 3bdea54:
- `bun scripts/check.mjs agentcompass`: ok.
- packages/agentcompass `node --test test/router.test.mjs`: 33 pass, 0 fail.
- Every network test passes a mock fetch; the one that doesn't (9.5) replaces globalThis.fetch with a thrower.
Broken by hand, each turned a test red:
- carrier deletes in middleware.js removed: 9.3 and 9.6 red.
- the 400 reject for a virtual model with no candidates replaced by `return undefined`: 9.2 red.
- MAX_NOISE_STRIP_CHARS / MAX_USER_TURN_CHARS set to 1e12: 9.9 red.
- an unclaimed request that carries the key made to return a mutated body: 9.6 red.
Read: the carrier is no longer read from the body (useRouteCarrier, carrierFromBody and the profile branch are gone); DEFAULT_GATEWAY_CANDIDATES is gone; no process.env, no default URL, quotas.json only from an explicit path.
Not tried: the plugin in magpie's real moejs runtime at this head (the review of 9d22371 did that; the changes since are the ones above), and a real gateway with real accounts. Leftover header comments in scorer-live.js, quota.js, catalog.js and allocator.js still say `magpie.hooks`; harmless, to tidy in a later version.