Skip to main content

Module json

Module json 

Source
Expand description

The serialisable view layer behind --json (SP5b design §3.1 to §3.7).

Every document is a struct whose field order is its JSON member order; an absent value is null, never a missing member, so a consumer sees the same members on every run.

Structs§

AgentRefView
An agent field of a repository entry.
AgentResolutionView
One agent’s resolution within the status document.
AgentView
One registry entry of the agents document.
AgentsDocument
The agents document.
CapabilityView
One capability claim.
CheckView
One record of a doctor document.
DoctorCounts
The per-status counts of a doctor document; every key is always present.
DoctorDocument
The doctor document (SP5c design §6).
EvidenceView
The evidence the adapter’s claims rest on.
ExecutableView
An agent’s executable evidence.
MappingView
The mapping entry that applies to the current repository.
MechanismView
How the agent is pointed at the profile.
PresenceView
A profile’s presence: the token, plus the twin’s spelling when the state is conflict.
ProfileRefView
A profile a repository entry names, and whether its directory exists.
ProfileView
One profile and the agents materialized for it.
ProfilesDocument
The profiles (and list) document.
RepositoriesDocument
The repositories document.
RepositoryView
One stored repository mapping with its classification.
ResolveDocument
The resolve document.
StatusDocument
The status document.

Constants§

TOOL_VERSION
The tool_version member of every document.

Functions§

agent_view
The JSON view of one registry entry and its executable status.
agents
Builds the agents document from registry metadata and each agent’s executable status.
capability_token
The closed JSON token for a capability.
doctor
executable_view
The JSON view of one executable status.
profiles
Builds the profiles document; with an agent, only rows that materialize it, each row unchanged.
render
Two-space pretty print plus a trailing newline.
repositories
Builds the repositories document; the entries arrive sorted and keep their order.
repository_view
The JSON view of one classified repository entry.
resolve
source_token
The closed JSON token for a resolution source (the text label is for humans).
state_token
The closed JSON token for a capability state.
status
support_token
The closed JSON token for a support level.