feat: free-join providers + flag/de-route enforcement + stake ranking#4
Merged
Conversation
Aligns the gateway with the v1 model: earning is free, enforcement is gateway routing (not on-chain slashing), and staking only buys ranking. - Remove the provider bond gate: community providers earn with no bond. - Add a `flagged` provider field + setFlag + POST /v1/providers/:id/flag (admin-token gated; disabled on mainnet unless ADMIN_TOKEN is set). Flagged providers are de-routed everywhere and excluded from the catalog. - src/legion.ts: read legion-engage.get-stake and rank higher-staked providers first in routing + catalog (best-effort; never blocks routing). - Keep the testnet payout-address fix (accept ST/SN as well as SP/SM). Tested locally (wrangler dev): free earning, flag/de-route, unflag, catalog exclusion, stake decode + ranking sort. Not deployed.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
inference-marketplace | b9098c8 | Commit Preview URL Branch Preview URL |
Jun 29 2026, 04:49 PM |
State plainly, where agents look, that flagging is a manual operator action (admin-token gated, not a key/multisig, not a crowd vote), that there's no auto-detection yet, that flagged status is public, and that moving the decision to a legion-gov vote is on the roadmap. - skill.md (agent guide): new "Enforcement & trust" section + flag endpoint - GET / : new `trust` block + flagProvider endpoint - README: "Enforcement & trust" section + flag endpoint row
Repoint the testnet/staging Legion fee-rail from the agent-03 demand bundle (STBEMQQ…) to the v1 provider-Legion guild bundle (legion-agent-06, STGX5YP…) and add LEGION_ENGAGE so the gateway's stake-ranking (src/legion.ts rankByStake) reads the deployed engagement-stake contract. This matches the tested local .dev.vars; the committed staging config was stale. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Added
One open call for the reviewer: staging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Aligns the gateway with the agreed v1 model.
flaggedprovider field +POST /v1/providers/:id/flag(admin-token gated; disabled on mainnet unlessADMIN_TOKENis set). Flagged providers are de-routed everywhere and excluded from the catalog. Enforcement lives in the gateway, not the inference plane.src/legion.tsreadslegion-engage.get-stakeand ranks higher-staked providers first in routing + catalog (best-effort; degrades to registration order, never blocks routing). Staking is optional and only buys ranking.ST/SNas well asSP/SM).Tested locally (wrangler dev, no deploy)
get-stakedecode + ranking sort (unit) ✅ — live stake read needslegion-engagedeployedtsc: no new errors; bundle builds cleanDepends on
legion-engage(aibtcdev/legions#5) for the stake read. Until it is deployed andLEGION_ENGAGEis set, ranking is a safe no-op.Not deployed
Nothing deployed. For review.