Skip to main content

Module pack

Module pack 

Source
Expand description

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.

Two capabilities. pack.plan is the verdict before anything is written: what a profile of share/archive.yaml carries, what it leaves out and why, how it is cut into shards and every reason it cannot be built. pack.verify reads a pack that was written and refuses one whose files are not what its manifest names, or that carries a binary, an artifact, a link, a worktree or a leak. Writing the pack is majordomus pack build, which the command line alone offers, because every projection of the registry is read-only. The selection and the judgement live in crate::pack.

use majordomus_cli::capability::builtin::modules;
let m = modules().into_iter().find(|m| m.id.as_str() == "pack").unwrap();
let ids: Vec<&str> = m.capabilities.iter().map(|c| c.capability.id.as_str()).collect();
assert_eq!(ids, ["pack.plan", "pack.verify"]);

Structs§

PackPlanInput
The input of pack.plan: which profile of share/archive.yaml to plan, or the distribution’s default one when none is named.
PackVerifyInput
The input of pack.verify: the directory of a pack that was written, which must lie inside the repository it was built from.

Functions§

module
The module: pack.plan and pack.verify, each exposed over MCP, HTTP and the command line; writing a pack stays with majordomus pack build.