Skip to main content

Module builtin

Module builtin 

Source
Expand description

The executable capabilities this executable ships: one Rust module per capability module, each owning its typed inputs and outputs, its handlers, its benchmark cases and its module() composition; modules composes the application from them with compose_modules!, and that list is the only root composition there is. Adding a capability to an existing module touches that module’s file alone; every projection, benchmark target and generated document follows from the descriptor.

use majordomus_cli::capability::builtin;

// the application is its modules, and each module stamps its namespace on what it holds
let modules = builtin::modules();
assert!(modules.iter().any(|m| m.id.as_str() == "repository"));
for module in &modules {
    for e in &module.capabilities {
        assert_eq!(
            e.capability.id.namespace(),
            module.id.as_str(),
            "{} is composed into the wrong module",
            e.capability.id
        );
    }
}

// and `all` is the same set flattened, for a registry built without module metadata
let flattened = builtin::all().len();
assert_eq!(
    flattened,
    modules.iter().map(|m| m.capabilities.len()).sum::<usize>()
);

Re-exports§

pub use artifacts::ArtifactReport;
pub use artifacts::ArtifactState;
pub use artifacts::ArtifactTallies;
pub use artifacts::ArtifactVerdict;
pub use artifacts::ArtifactView;
pub use artifacts::ArtifactsInput;
pub use artifacts::ARTIFACTS_URI;
pub use continuity::ActiveTask;
pub use continuity::Continuity;
pub use continuity::Divergence;
pub use continuity::OpenSession;
pub use continuity::Record;
pub use continuity::CONTINUITY_URI;
pub use devtask::DevMilestoneInput;
pub use devtask::DevTaskInput;
pub use environment::EnvironmentInput;
pub use environment::EnvironmentProvenance;
pub use environment::ExplainInput;
pub use environment::ENVIRONMENT_URI;
pub use episodes::AttachInput;
pub use episodes::DetachInput;
pub use episodes::EpisodeList;
pub use gates::CompletionInput;
pub use gates::GateModelEntry;
pub use gates::GateModelReport;
pub use gates::COMPLETION_URI;
pub use gates::GATES_URI;
pub use health::Health;
pub use health::HealthCheck;
pub use health::HealthStatus;
pub use health::HEALTH_URI;
pub use knowledge_base::AgeSource;
pub use knowledge_base::KnowledgeCandidate;
pub use knowledge_base::KnowledgeCandidates;
pub use knowledge_base::KnowledgeRecord;
pub use knowledge_base::KnowledgeRecordInput;
pub use knowledge_base::KnowledgeStatus;
pub use knowledge_base::LedgerMark;
pub use knowledge_base::ReferenceResolution;
pub use knowledge_base::ResolvedReference;
pub use knowledge_base::ResolvedRelation;
pub use knowledge_base::KNOWLEDGE_CANDIDATES_URI;
pub use knowledge_base::KNOWLEDGE_STATUS_URI;
pub use lifecycle::Balance;
pub use lifecycle::ClosedSession;
pub use lifecycle::ClosedSessions;
pub use lifecycle::Episode;
pub use lifecycle::EpisodeStanding;
pub use lifecycle::Episodes;
pub use lifecycle::Orphan;
pub use lifecycle::Pointer;
pub use lifecycle::PointerLayout;
pub use lifecycle::ProviderLifecycle;
pub use lifecycle::ProviderLifecycles;
pub use lifecycle::Recovery;
pub use lifecycle::RuntimeView;
pub use lifecycle::Stranded;
pub use lifecycle::EPISODES_URI;
pub use lifecycle::RECOVERY_URI;
pub use objects::resolve;
pub use objects::AnswerView;
pub use objects::Comparison;
pub use objects::DriftedObject;
pub use objects::GetInput;
pub use objects::ListInput;
pub use objects::ObjectList;
pub use objects::ObjectStanding;
pub use objects::Resolved;
pub use objects::ResourceView;
pub use objects::SearchHit;
pub use objects::SearchInput;
pub use objects::SearchResult;
pub use objects::VerifyInput;
pub use objects::VerifyReport;
pub use objects::SEARCH_DEFAULT_LIMIT;
pub use objects::SEARCH_MAX_LIMIT;
pub use obligations::Closure;
pub use obligations::Evidence;
pub use obligations::Obligation;
pub use obligations::ObligationClosure;
pub use obligations::ObligationState;
pub use obligations::Vocabulary;
pub use obligations::CLOSURE_URI;
pub use obligations::OBLIGATIONS_URI;
pub use plan::PlanIssueFilter;
pub use plan::PlanMilestoneFilter;
pub use plan::PlanRecordInput;
pub use plan::PLAN_URI;
pub use quality::QualityAnswer;
pub use quality::QualityInput;
pub use quality::QUALITY_URI;
pub use repository::RepositoryReport;
pub use repository::REPOSITORY_URI;
pub use server::Checkouts;
pub use server::Desired;
pub use server::LeaseView;
pub use server::ServerStanding;
pub use server::ServerStatus;
pub use server::ServerStatusInput;
pub use server::ServerView;
pub use server::SERVER_URI;
pub use session_domain::IdentityReport;
pub use session_domain::MachineReport;
pub use session_domain::IDENTITY_URI;
pub use session_domain::MACHINE_URI;
pub use trace::TraceCommitInput;
pub use trace::TraceIssueInput;
pub use trace::TraceReportInput;
pub use trace::TRACEABILITY_URI;
pub use commands::CommandGraphReport;
pub use commands::CommandIndex;
pub use commands::CommandSummary;
pub use web::SurfaceReport;
pub use web::SURFACES_URI;

Modules§

artifacts
The artifacts module: what majordomus generate writes, read back.
commands
The commands module: the command graph, projected.
commit
The commit module: what this repository holds a commit to, what the working tree would commit, and which scope the history gives a set of paths.
continuity
The continuity module: what this checkout’s lifecycle is holding right now — the open episode, the record the next worker would resume from, the newest progress note, what is blocking acceptance, and whether the provider’s events actually reach the tool.
dashboard
The dashboard module: the Overview of the Dashboard Suite, as a projection of the capabilities that already answer each of its facts (ADR 0088).
devtask
The devtask module: an issue and a milestone read as executable development scopes.
economics
The economics module: token economics, measured, projected. Every capability here is a read of crate::economics — the one calculator — so the command line, HTTP, the OpenAPI document, MCP and the Cockpit show the same metric, value, class and sample count, because none of them computes one.
entity
The entity module: every object of the layer as an addressable, cross-linked node.
environment
The environment module: what this checkout is, as a capability.
episodes
The episodes module: the execution episode of a client that has no provider hooks, opened and closed by the MCP connection itself (ADR 0103).
evidence
The evidence module: from a claim to the run that proves it, and back.
gates
The gates module: completion as a state the repository decides.
health
The health module: whether what this process serves is healthy, answered by the engines that already decide it rather than by checks written a second time here.
intent_realization
The intent_realization module: which work realises which intent, and why an intent stands where it stands.
intents
The intents module:
knowledge_base
The knowledge_base module: what the knowledge deriver left for review and whether it is still writing — the candidate records awaiting promotion, one record by id with every reference it names resolved, and the derivation status of this checkout judged against session.freshness.
lifecycle
The lifecycle module: the episode lifecycle as something a person can watch.
mcp
The mcp module: the MCP projection of this registry, described as one typed value.
objects
The objects module: the declarative objects of the repository’s layer, listed, read and searched, and the one resolution of a majordomus:// URI that objects.get and the MCP resource read share.
obligations
The obligations module: what a task owes before it may be called completed, and whether the evidence that discharged each one still describes this tree.
observatory
The observatory module: what the Observatory (/ui/observatory) may carry to a place where no mesh runs, and the recording the repository carries there (ADR 0158, I2678).
pack
The pack module: the tracked tree as token-bounded text shards for a reader whose file search indexes text, with nothing in it that is not source.
plan
The plan module: the milestone and issue model’s derivations, projected.
quality
The quality module: what this executable’s own public surface is held to, answered through every transport the surface is measured against.
reasoning
The reasoning module: provider-independent reasoning, projected (ADR 0098).
recover
The recover module: the stray files of the record stores, classified by evidence and swept exactly once.
release
The release module: the changelog, the version, and the compatibility analysis behind it — all three derived.
repository
The repository module: what the repository and this process’s index are.
rules
The rules module: from a rule to what proves it, and back.
served
The served module: whether a deployment serves the commit it was meant to, observed from outside and recorded as evidence a later reader can re-judge.
server
The server module: the shared server of this checkout, and of every other checkout of the same git repository — what each lease says, whether the server it names answers, and whether what answers is the code on disk.
session_domain
The session_domain module: the typed session domain, projected.
skills
The skills module: every skill as a proven capability, derived.
trace
The trace module: the work graph above the branch, both ways.
web
The web module: the surfaces this repository exposes over HTTP, answered from the resolution the process is already serving from.

Structs§

AnnounceInput
The input of peers.announce: what the calling peer is working on.
BuildReport
What this executable is: enough to tell two builds apart without asking a repository.
CancelReport
The answer of executions.cancel.
CapabilitiesInput
The input of capabilities.list: optional filters by kind and by projection.
CapabilityList
The answer of capabilities.list: the matching capabilities, summarised, and the registry counted.
CapabilitySummary
One capability as a listing shows it: everything the descriptor says except its two schemas, which capabilities.describe answers for one capability. A listing of a repository’s registry runs to hundreds of entries; their schemas would be megabytes of the same object view repeated.
ClassifyInput
Which path to judge.
ContractView
A directory contract as the document declares it, before anything is inherited.
DeploymentCheck
Whether the deployments this repository declares would work, decided locally: against the capability registry this process built and the workspace it sits in.
DeploymentList
Every deployment the layer declares.
DeploymentView
One deployment as this process reads it, with where it came from.
DescribeInput
The input of capabilities.describe: which capability.
DirectoriesInput
Which directories to answer for, and how much of the hierarchy to resolve.
DirectoryNode
One directory of the layer, what it owes, and what applies to it.
DirectoryReport
The layer’s directories, what each owes, and the contracts that apply.
DirectoryTallies
How many directories are in each state.
DistributionReport
The distribution, as a person or a script asks for it.
EffectiveEntry
One contract in a directory’s effective chain, in the order it is applied.
Empty
No input.
EventHistory
The answer of executions.events: one page of an execution’s retained history.
ExecutionLinks
Where to read more about one execution, in this server’s own terms.
ExecutionList
The answer of executions.list.
ExecutionView
One execution with the links to everything else about it.
GetDeploymentInput
The input of deploy.get: which deployment.
GraphInput
Which graph to derive.
GraphList
Every graph this executable derives.
InstallCheck
One check: what was asked, what was seen, and — when it does not hold — why, and the command that changes it. The cause and next fields exist so that a report is actionable without a second document; a check that fails without naming its remedy is a diagnostic nobody can act on.
InstallabilityReport
Whether the advertised one-line installation works right now, and if not, what is missing.
MeshIdentityReport
The answer of mesh.identity: this machine’s node identity, public half only.
ModelsFilter
The input of models.list: optional narrowing. Everything empty lists everything.
ModelsReport
The answer of models.list.
NodeList
The answer of mesh.nodes: every node this process has observed.
ObjectSummary
One object, summarised for a listing.
ObjectView
One declarative object of the repository’s layer, as a client reads it.
PeerList
The answer of peers.list: every worker of this repository, from every checkout’s board.
ProtocolReport
The answer of executions.protocol: the live channel’s whole contract, derived from the types that implement it.
RegisterInput
The input of mesh.register: one signed envelope, exactly as the wire carries it.
ReleaseArtifactInput
Which artifact a target and a tag name.
ReleaseArtifactView
The artifact a target and a tag name, and the directory it unpacks into.
ReleaseView
One release, as every projection shows it.
ReleasesReport
The releases this repository recorded, and the one an unpinned installation resolves to.
RouteInput
The input of models.route: what the task needs, in transport-friendly scalars (require is comma-separated so a GET query string can carry it).
ScopeReport
The scope: the declaration as read, its origin, and every tracked file against it.
TargetView
One target, as every projection shows it: what it is, what it is called in prose, and the artifact name the naming function derives for a tag yet to be chosen.
VendorView
One vendor with whether its credential is configured — presence of the named environment variable and nothing more. No value is read.
WorktreeInspectInput
A branch to inspect.
WorktreeStatusInput
Where to answer from.

Enums§

CheckState
The state of one check in the installability report. Three states and no more: a check either holds, does not, or could not be made from what this process can see.
DirectoryState
Whether a directory of the layer carries the contract it owes.

Constants§

DEPLOYMENTS_URI
The URI under which the deployments are read as one MCP resource.
DEVCONTEXT_POLICY_URI
The URI under which the compiler’s own rules are read as an MCP resource.
DIRECTORIES_URI
The URI under which directories.list is read as an MCP resource.
EXECUTIONS_URI
The MCP resource the list of executions is read at.
EXECUTION_PROTOCOL_URI
The MCP resource the live channel’s own contract is read at.
GRAPHS_URI
The URI under which graph.list is read as an MCP resource.
MESH_URI
The MCP resource mesh.status is projected as.
MODELS_URI
The MCP resource models.list is projected as.
SCOPE_URI
The URI under which repository.scope is read as an MCP resource.
WORKTREES_URI
The URI under which the topology is read as an MCP resource.

Functions§

all
Every executable of every module, flattened, for a registry built without module metadata (tests, benchmarks, doctests). The application builds from modules.
modules
The application: its modules, in one place. A new module is one line here; a new capability in an existing module is no line here.
normalise_path
A repository-relative path as the scope judges it: forward slashes, no ./, no trailing slash. Absolute paths and parent segments are refused.