maintainer source realm
Package maintainer models an AI agent stewarding a versioned on-chain package — without ever letting it deploy on its...
Package maintainer models an AI agent stewarding a versioned on-chain package — without ever letting it deploy on its own authority.
The agent can do the tedious, valuable parts: open a version proposal, collect reviews, record CI test attestations, write release notes, deprecate a vulnerable version, keep a compatibility matrix. What it cannot do is ship. Approval is gated by an explicit, machine-checked policy:
Example
1tests pass AND ≥ MinReviewers independent reviews AND
2every review scores ≥ MinScore AND the challenge window has elapsed
This is the difference between "an agent with commit access" and "an agent that drives a process a human (or a DAO, or a policy) still gates." The realm records *approved* releases; the actual package publish is a separate, deliberately human/authority step.
1
9
func AddReview
crossing ActionAddReview records a reviewer's score. Reviewers must be independent of the proposer, and each address reviews at most once.
func Approve
crossing ActionApprove promotes a proposal to a release iff every policy condition holds. It panics with the first unmet condition — the policy is the gate, not a suggestion.
func AttestTests
crossing ActionAttestTests records whether CI's test suite passed for the proposal.
func Deprecate
crossing ActionDeprecate flags a released version (e.g. a vulnerability was found).
func IsDeprecated
ActionIsDeprecated reports whether a released version is deprecated.
func LatestVersion
ActionLatestVersion returns the most recently released version, or "".
func Propose
crossing ActionPropose opens a version proposal with a challenge window of the given number of blocks (during which reviews accrue and approval is blocked).
func Render
Render shows the release matrix + open proposals, or one proposal at :<id>.
func GetProposal
ActionGetProposal returns a copy of a proposal.
3
type Proposal
struct 1type Proposal struct {
2 ID uint64
3 Version string
4 ArtifactHash string // commitment to the package source
5 Proposer address
6 Reviews []Review
7 TestsPass bool
8 TestsAttestor address
9 OpenedAt int64
10 ChallengeUntil int64 // approval blocked until height passes this
11 Approved bool
12 ApprovedAt int64
13}Proposal is a candidate new version working its way toward approval.
type Release
structRelease is an approved (and possibly later deprecated) version.
type Review
structReview is one reviewer's score for a proposal.
4
- chain stdlib
- chain/runtime stdlib
- gno.land/p/nt/ufmt/v0 package
- strings stdlib