Documentation
¶
Overview ¶
Package registry is the Registry module: a read-only browser for the Registry, the records of what exists (projects, tools, agents, skills, documents...) and how they relate. Kinds with their schemas, records per kind, a record's fields, relations, revisions and pending review, the review queue and the Registry's diagnostics.
It only reads. Every call it makes is one of the Registry's read tools on the Tether gateway (allowed, below); nothing else is reachable through it. Changes and review decisions are the owner's, made by the agent with the registry_* tools the Tether module gives it, so the agent is told which record is in front (the slot's Knowledge) and the owner can say "approve this one".
Registry records are a Cite kind too (cite.go): `registry:<id>` in any text is a chip that opens the record here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Change ¶
type Change struct {
Path string `json:"path"`
// Op is added, removed or changed.
Op string `json:"op"`
Before string `json:"before,omitempty"`
After string `json:"after,omitempty"`
}
Change is one field that differs between two revisions, by its path in the record.
type Detail ¶
type Detail struct {
Record json.RawMessage `json:"record"`
Brief brief `json:"brief"`
Publication string `json:"publication"`
Outgoing []Edge `json:"outgoing"`
Incoming []Edge `json:"incoming"`
Revisions []Revision `json:"revisions"`
MoreHistory bool `json:"more_history,omitempty"`
Errors map[string]string `json:"errors,omitempty"`
}
Detail is a record whole, with its relations both ways and its history.
type Edge ¶
type Edge struct {
ID string `json:"id"`
Hash string `json:"hash,omitempty"`
Relation struct {
Type string `json:"type"`
From Ref `json:"from"`
To Ref `json:"to"`
Status string `json:"status,omitempty"`
Source string `json:"source,omitempty"`
Weight *float64 `json:"weight,omitempty"`
} `json:"relation"`
Inverse string `json:"inverse,omitempty"`
TargetState string `json:"target_state,omitempty"`
ProposedBy string `json:"proposed_by,omitempty"`
ReviewedBy string `json:"reviewed_by,omitempty"`
}
Edge is one relation as the Registry returns it.
type Kind ¶
type Kind struct {
Kind string `json:"kind"`
Schemas []string `json:"schemas"`
Count int `json:"count"`
// More: there are more records than were counted.
More bool `json:"more,omitempty"`
}
Kind is one record kind: its schema versions and how many records it has.
type Overview ¶
type Overview struct {
Publication string `json:"publication"`
Kinds []Kind `json:"kinds"`
Edges json.RawMessage `json:"edges,omitempty"`
Reviews []brief `json:"reviews"`
Diagnostics json.RawMessage `json:"diagnostics,omitempty"`
Total int `json:"total"`
AsOf string `json:"as_of,omitempty"`
Errors map[string]string `json:"errors,omitempty"`
}
Overview is the left of the window: kinds with counts, the relation types, the review queue and the diagnostics. A part that failed has its error in Errors and the rest stands.
type Page ¶
type Page struct {
Records []brief `json:"records"`
Cursor string `json:"cursor,omitempty"`
HasMore bool `json:"has_more"`
AsOf string `json:"as_of,omitempty"`
}
Page is one page of records.
type Ref ¶
type Ref struct {
Authority string `json:"authority"`
Kind string `json:"kind"`
ID string `json:"id"`
URI string `json:"uri,omitempty"`
}
Ref is one end of a relation: {authority, kind, id}. A local one's authority is "registry" and its id is the record's canonical id.
type Review ¶
type Review struct {
State string `json:"state,omitempty"`
QueueState string `json:"queue_state,omitempty"`
DefinitionHash string `json:"definition_hash,omitempty"`
ProposedBy string `json:"proposed_by,omitempty"`
ReviewedBy string `json:"reviewed_by,omitempty"`
ReviewedAt string `json:"reviewed_at,omitempty"`
Reason string `json:"reason,omitempty"`
}
Review is a record's review, as the Registry keeps it (tools have one).
type Revision ¶
type Revision struct {
RevisionID string `json:"revision_id"`
VersionToken string `json:"version_token,omitempty"`
Sequence int64 `json:"sequence"`
UpdatedAt string `json:"updated_at,omitempty"`
Lifecycle string `json:"lifecycle,omitempty"`
Publication string `json:"publication,omitempty"`
PublishedAt string `json:"published_at,omitempty"`
Name string `json:"name,omitempty"`
}
Revision is one entry of a record's history.