agentcompass routes on the AgentCompass v0.6.0 engine: four capability
categories, quota-economy seat ordering and data gates. With no caller
profile, a request keeps the model the client asked for. External
scoring stays off unless allowExternalScorer and a scorer base URL are
both set. The reference ships in the package. This supersedes #791.
Run at 52a98632, merged onto main, on WSL (Ubuntu 24.04) with
HOME=$(mktemp -d):
- npm test in packages/agentcompass: 140 pass, 0 fail
- bun scripts/check.mjs agentcompass: ok
- Read the diff for new I/O: src/ has no fetch outside the opt-in
scorer, and no spawn, env read or disk access.
- The docs' scorer example was checked against scorerOptionsOf and
resolveClassifier.
Not tried: a real Magpie gateway routing live traffic through it.
Co-authored-by: akiiwa-games <akiiwa-games@users.noreply.github.com>
agentcompass 0.1.3. `:minimal` and `:ultra` are read as efforts. `ultra` maps to the model's Max, or to the policy table's max when the model has no curve. `minimal` sits below the model's Low, and is clamped by a step floor and the burn scale. `none`/`off` stay in the policy. Quota is scaled through `burnScale` rather than the raw tables. A model with no curve (glm-5.3) uses the policy table's Low. A request that nothing routes now falls back through `fallbackToBestExcluded`, in both the middleware and the hooks. The fallback's tiers are: below the floor only, then seeing models, then the rest. The README (en/zh) notes that the fallback can override the visual, unhealthy, context and quota constraints.
Reviewed head: ff614f0316ab5b1a07bcc68afd11b69bb6e892d3 (merge-base 42331f64 = origin/main).
Run on mote (mote-run, HOME=$(mktemp -d)):
- packages/agentcompass `node --test`: 44 pass. `bun test`: 44 pass.
- repo `bun test`: 6188 pass, 20 skip, 0 fail. `bun scripts/check.mjs`: exit 0.
- PR CI (test, on-npm): green on ff614f0.
Broken by hand. All 16 went red:
- A-H turned 9.13 red: ability-only fallback, no floor-only tier, no seeing tier, onlyBelowFloor from the floor alone, tier order flipped, no fallback in middleware, no fallback in hooks, old middleware retry condition.
- I (quota from the raw tables) and J (below-Low scaling from the model's own Low) turned 9.12 red.
- K (no ultra to own max) turned 9.10 and 9.12 red.
- L (no ultra to policy max) turned 9.11 and 9.12 red.
- M (no step floor) and N (no burn clamp) turned 9.11 red.
- O (old EFFORT_ORDER) turned 9.10, 9.11 and 9.13 red.
- P (none/off out of the policy) turned 8.12, 9.11 and 9.13 red.
Version 0.1.2 to 0.1.3 sits on main's 0.1.2 and on dist's latest (tgz 0.1.2). The package is not on npm, so it ships through the dist branch.
Not tried: a real magpie gateway routing through 0.1.3.
Syncs Mode A's scoring with AgentCompass v0.3.8 (akiiwa-games/AgentCompass, accounts.json and scripts/allocator.py): ability floors routine 2.3 / hard 3.1, `ability_score_origin` (graded from max(floor, origin)), `critical_headroom_by_difficulty` {frontier: 0.1}, the tool_execution route floor {hard: 2.7}, the 13 effort curves and `effort_ability`/`effort_burn`, and 54bb51e's work-kind inference (COMPUTER_USE_PHRASES, CODE_FILE_RE guard, "translation of", the code-file/debug skip). `extractRequestFacts().hasComputerUse` uses the same phrases and guard, so continuity's GUI `capability_outgrown` no longer fires on bare "gui", "desktop app", "keyboard", "桌面", "键盘". Version 0.1.2.
Reviewed at head 4ff38ce1d (previous review at 4de283991; the 4ff38ce diff drops the four screenshot phrases and adds tests 8.9 to 8.12).
Checked against upstream v0.3.8 (e30836e7) by script: all 13 curves in 8.12's table and `effort_ability`/`effort_burn` equal accounts.json; COMPUTER_USE_PHRASES equals allocator.py:1088 exactly.
Run at 4ff38ce1d on mote (macOS, Bun 1.4.2, Node 22.22.0): `bun test` 40 pass 0 fail; `node --test test/router.test.mjs` 40 pass; `bun scripts/check.mjs agentcompass` exit 0. PR CI (test, on-npm) green.
Broken by hand at 4ff38ce1d, one at a time, each red:
- origin = floor -> 8.9
- CODE_FILE_RE guard off in inferKindFromObjective -> 8.10
- bare "keyboard"/"mouse" in COMPUTER_USE_PHRASES -> 8.10, 8.11
- "translation of" -> "translation" -> 8.10
- namesCode out of the translation skip -> 8.10
- hasComputerUse without the guard, or on GUI_WORDS -> 8.10, 8.11
- "take a screenshot" or "截屏操作" put back -> 8.10
- opus xhigh ability, carbon medium burn, effort_ability.xhigh, effort_burn.max changed -> 8.12
- criticalHeadroom ignoring the table -> 8.7; abilityFloor ignoring the route -> 8.8
Not tried: real routing traffic through a live magpie gateway.
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.