H2: every seat contract says each verb's description

A tools program that serves a seat's verbs as tools reads a verb's
description from the generated contract, one copy taken from seat.json,
instead of writing it again. Generated again in all five folders by
mesh-delivery's seatgen (feat/47-H2 b65b6173), which now writes
VerbDescription; seatgen -check clean, every package's vet and tests green.

Builds: design 47 H2 H-A-449
This commit is contained in:
2026-11-22 02:36:36 +01:00
parent e6ed560e48
commit 2dfdcc3316
15 changed files with 326 additions and 10 deletions
@@ -20,7 +20,7 @@ const Form = 1
// whose fields changed while its forms did not (design 47 H2 §780).
const (
generatedForms = "1"
generatedFieldsDigest = "a6eedea7a2806712696e7b491a8a643a1dc054ab6ab1d97dce0de7f015c92243"
generatedFieldsDigest = "AgainAnswer=7538f2f5e68e ConfirmAnswer=7538f2f5e68e Enrolment=ce9d7d79b28a EnrolmentExpiredEvent=4dde8efb6998 EnrolmentIssuedEvent=4dde8efb6998 EnrolmentRefusedEvent=4dde8efb6998 EnrolmentRevokedEvent=4dde8efb6998 EnrolmentsByAddressAddressValue=524d3056537d EnrolmentsByNodeNodeValue=4dde8efb6998 IssueAnswer=7538f2f5e68e NodeEnrolledEvent=4dde8efb6998 RedeemAnswer=1aa043e59eac RevokeAnswer=7538f2f5e68e TokensAnswer=7538f2f5e68e"
)
const (
@@ -45,6 +45,26 @@ func Verbs() []string {
return []string{VerbIssue, VerbRedeem, VerbConfirm, VerbRevoke, VerbTokens, VerbAgain}
}
// VerbDescription is a verb's description as the seat's definition says it, "" for a verb the seat does not serve or
// does not describe (design 47 H2 H-A-449).
func VerbDescription(verb string) string {
switch verb {
case VerbIssue:
return "Issue a one-time token for a new machine, on the operator's Approve: refused at once, naming every finding, for a name that is not a node name or that a node record, a placement key or an open enrolment holds, and for every call before the controller's lease is handed away. Otherwise reserves the lowest free private-network address, asks the operator under the seat's own name and, on the warrant, adds the node to placement with its tunnel key, asks the vault for the token and says enrolment-issued. The token itself is read only through tokens."
case VerbRedeem:
return "Spend a token: asked by a joining node-engine dialled as enrol.<node> alone, with the public halves of its keys and its identity key's proof over them. Spends the token, asks the vault for the node's account and certificate, writes the node into placement, and answers the account sealed to the node, its certificate and the vault's public half, signed by the vault. Asked again with the same keys it finishes what is not done and answers the same; with other keys it is refused."
case VerbConfirm:
return "Confirm an enrolment: asked by the node-engine dialled as its own node login alone, the runtime's proof of that caller being the confirmation. Says node-enrolled and ends the enrolment."
case VerbRevoke:
return "End an enrolment at any stage, with why, without an Approve: withdraws an open ask, deletes the node's key and its address, has the vault retire an account it already minted for it, records the act as a hand act and says enrolment-revoked."
case VerbTokens:
return "Read every open enrolment, or one: its stage, expiry, ask and revision, the bucket's fill against its cap. For a node at live, its token sealed to the operator key, asked of the vault at that moment and relayed as the vault sealed it. With history, the ended enrolments from the seat's events, as far back as the events are kept."
case VerbAgain:
return "Raise an issue's ask again when the operator's channel does not hold it, and nothing more."
}
return ""
}
// Events is every event published on the seat's subject: a new copy each call.
func Events() []string {
return []string{EventEnrolmentIssued, EventNodeEnrolled, EventEnrolmentRefused, EventEnrolmentRevoked, EventEnrolmentExpired}