PROGRAMconstno test imports itconst PROGRAM: "archon"The name of the program.
The assembled command: one archon program made from the plugins a fleet gives it (archon-tool, archon-server, ...), through the composition of Headless. The host is archon: the program, its ladder of tiers (public, operator, administrator) and one verb of its own, plugins, which lists what was assembled. A conflict between plugins is a value, never a winner, and a run says which plugin contributed the command it ran. A fleet is the composition root: it imports the plugins it wants and calls main.
import { assemble } from "./mod.ts";
assemble([], "1.0.0").kind; // "ok"PROGRAMconstno test imports itconst PROGRAM: "archon"The name of the program.
TIER_VARIABLEconstconst TIER_VARIABLE: "ARCHON_TIER"The variable that says which tier the caller holds.
archonHostfunctionfunction archonHost(version: string, plugins: readonly Plugin[]): ProgramConfigThe host: the program archon with the one verb plugins, which lists the plugins assembled.
assemblefunctionfunction assemble(plugins: readonly Plugin[], version: string): Result<Composed, readonly CompositionError[]>The program archon from its plugins, or every conflict between them.
heldTierfunctionfunction heldTier(env: (name: string) => string | undefined): { readonly tier: TierName; } | { readonly unknown: string; }The tier a caller holds from the environment, or the word that is not a tier of the ladder.
MainDepstypeno test imports ittype MainDeps = {
readonly env: (name: string) => string | undefined;
readonly out: (text: string) => void;
readonly err: (text: string) => void;
};What main is given: the environment, and where the report and the problems go. The program of a fleet reads them from its process; a test passes its own.
mainfunctionfunction main(plugins: readonly Plugin[], version: string, argv: readonly string[], deps: MainDeps): Promise<number>Runs archon with the plugins and the words after its name; returns the exit status (2 for a tier that is not one, 3 where the plugins cannot be assembled).