ergonexProgramfunctionfunction ergonexProgram(host: ProgramHost): Programergonex as a Headless program, for the host it runs on.
The program ergonex as Headless' tree (commons 0001-ergonex FR-001, FR-003; commons headless 0003-headless-output FR-001): its commands and branches, each declared with the facts of its action, its options, operands and examples, and the data Headless configures itself with (the name and version, the prefix of the variables, the codes it explains, the secrets it redacts, the command it runs where none is given). ergonexProgram(host) is the one place the tree is made; the command line runs it (ergonex.ts), and anything that describes a program (a documentation lens, a tool server) reads it.
ergonexProgramfunctionfunction ergonexProgram(host: ProgramHost): Programergonex as a Headless program, for the host it runs on.
modulesOffunctionno test imports itfunction modulesOf(nodes: readonly Node[]): readonly ErgonexModule[]The words of the program's own tree, for the modules a command lists and the snippet of a shell: each top-level word with its summary and the words below it.
TREEconstno test imports itconst TREE: readonly Entry[]The tree of the program, in the order the help lists it.
Entrytypeno test imports ittype Entry =
| { readonly kind: "command"; readonly make: Make }
| { readonly kind: "branch"; readonly name: string; readonly summary: string; readonly children: readonly Make[] };An entry of the program's tree: a command, or a branch of commands, each made for a host. Tagged, so that a switch over it is exhaustive.
ProgramHosttypeno test imports ittype ProgramHost = Omit<Host, "builtins">;What the host needs of the tree before it is made: the modules its commands list are the words of the tree itself.