governance.DOMAINconstno test imports itconst DOMAIN: RegExpA DNS name: labels of letters, digits and dashes, at least two of them.
The profiles of the services a machine of a small fleet runs, and the rules their fields obey. A profile is data: it carries no secret and runs nothing.
import { PORTS, NAME } from "./profiles.ts";
NAME.test("prime"); // true
PORTS.min; // 1024governance.DOMAINconstno test imports itconst DOMAIN: RegExpA DNS name: labels of letters, digits and dashes, at least two of them.
governance.MAILBOXconstno test imports itconst MAILBOX: RegExpA mailbox: local part and domain, no display name.
governance.MARKERconstno test imports itconst MARKER: "managed by archon"The marker a DNS record of a profile carries in its comment, so that a plan removes only what a profile made.
governance.NAMEconstno test imports itconst NAME: RegExpA name of a machine, a cluster or a mailbox tag: lowercase letters, digits and dashes, starting with a letter.
governance.PORTSconstno test imports itconst PORTS: { readonly min: 1024; readonly max: 65535; }The ports a service of a machine listens on, without the privileged ones.
governance.CertificateProfiletypeno test imports ittype CertificateProfile = {
readonly machine: string;
/** The names the certificate is for, the first is its name on… (485 characters)type CertificateProfile = {
readonly machine: string;
/** The names the certificate is for, the first is its name on the disk. */
readonly names: readonly string[];
/** The address of the account's mail, where the authority writes. */
readonly contact: string;
/** The ACME directory: Let's Encrypt's production unless the profile says another. */
readonly directory: string;
/** The DNS plugin of certbot that answers the challenge. */
readonly dns: "cloudflare";
};A certificate by DNS-01 from an ACME authority.
governance.DnsProfiletypeno test imports ittype DnsProfile = {
readonly zone: string;
readonly records: readonly DnsRecord[];
};The records a profile wants in a zone, and the names it claims (a name it lists is its own whatever its records say).
governance.DnsRecordtypeno test imports ittype DnsRecord = {
readonly type: "A" | "AAAA" | "CNAME" | "TXT" | "MX";
readonly name: string;
readonly content: string;
readonly ttl: number;
readonly proxied: boolean;
};A record of a DNS zone.
governance.MailRelayProfiletypeno test imports ittype MailRelayProfile = {
readonly machine: string;
/** The name the machine says in the mail it sends, `<machine>.<… (505 characters)type MailRelayProfile = {
readonly machine: string;
/** The name the machine says in the mail it sends, `<machine>.<tag>.<domain>`: given as its parts. */
readonly tag: string;
readonly domain: string;
/** Where mail for local accounts (root, ops, cron) goes. */
readonly mailbox: string;
/** The relay, `host:port` over implicit TLS. */
readonly relay: string;
/** The user name of SASL; the secret is a file on the machine, and only its path is here. */
readonly saslUser: string;
};A send-only mail relay: Postfix as a null client that sends everything through the relay of the fleet's mail provider.
governance.McpAccessProfiletypeno test imports ittype McpAccessProfile = {
readonly machine: string;
/** The account the keys log in as. */
readonly user: string;
/** The program the forced command runs. */
readonly program: string;
readonly keys: readonly { readonly name: string; readonly publicKey: string; readonly role: "read-only" | "full"; readonly from?: readonly string[] }[];
};The program a machine serves as a tool server over ssh (MCP), and the keys that may call it: each key runs only <program> mcp, with --read-only where it may only read.
governance.PostgresProfiletypeno test imports ittype PostgresProfile = {
/** The subject (machine) it is for. */
readonly machine: string;
/** The major version: the archive's own (18 on Ubuntu 26.04). */
readonly version: number;
readonly port: number;
/** The addresses it listens on: `localhost` or addresses of the machine. */
readonly listen: readonly string[];
};A PostgreSQL cluster, the one Ubuntu's package makes (<version>/main).
DOMAINconstno test imports itconst DOMAIN: RegExpA DNS name: labels of letters, digits and dashes, at least two of them.
MAILBOXconstno test imports itconst MAILBOX: RegExpA mailbox: local part and domain, no display name.
MARKERconstno test imports itconst MARKER: "managed by archon"The marker a DNS record of a profile carries in its comment, so that a plan removes only what a profile made.
NAMEconstno test imports itconst NAME: RegExpA name of a machine, a cluster or a mailbox tag: lowercase letters, digits and dashes, starting with a letter.
PORTSconstno test imports itconst PORTS: { readonly min: 1024; readonly max: 65535; }The ports a service of a machine listens on, without the privileged ones.
CertificateProfiletypeno test imports ittype CertificateProfile = {
readonly machine: string;
/** The names the certificate is for, the first is its name on… (485 characters)type CertificateProfile = {
readonly machine: string;
/** The names the certificate is for, the first is its name on the disk. */
readonly names: readonly string[];
/** The address of the account's mail, where the authority writes. */
readonly contact: string;
/** The ACME directory: Let's Encrypt's production unless the profile says another. */
readonly directory: string;
/** The DNS plugin of certbot that answers the challenge. */
readonly dns: "cloudflare";
};A certificate by DNS-01 from an ACME authority.
DnsProfiletypeno test imports ittype DnsProfile = {
readonly zone: string;
readonly records: readonly DnsRecord[];
};The records a profile wants in a zone, and the names it claims (a name it lists is its own whatever its records say).
DnsRecordtypeno test imports ittype DnsRecord = {
readonly type: "A" | "AAAA" | "CNAME" | "TXT" | "MX";
readonly name: string;
readonly content: string;
readonly ttl: number;
readonly proxied: boolean;
};A record of a DNS zone.
MailRelayProfiletypeno test imports ittype MailRelayProfile = {
readonly machine: string;
/** The name the machine says in the mail it sends, `<machine>.<… (505 characters)type MailRelayProfile = {
readonly machine: string;
/** The name the machine says in the mail it sends, `<machine>.<tag>.<domain>`: given as its parts. */
readonly tag: string;
readonly domain: string;
/** Where mail for local accounts (root, ops, cron) goes. */
readonly mailbox: string;
/** The relay, `host:port` over implicit TLS. */
readonly relay: string;
/** The user name of SASL; the secret is a file on the machine, and only its path is here. */
readonly saslUser: string;
};A send-only mail relay: Postfix as a null client that sends everything through the relay of the fleet's mail provider.
McpAccessProfiletypeno test imports ittype McpAccessProfile = {
readonly machine: string;
/** The account the keys log in as. */
readonly user: string;
/** The program the forced command runs. */
readonly program: string;
readonly keys: readonly { readonly name: string; readonly publicKey: string; readonly role: "read-only" | "full"; readonly from?: readonly string[] }[];
};The program a machine serves as a tool server over ssh (MCP), and the keys that may call it: each key runs only <program> mcp, with --read-only where it may only read.
PostgresProfiletypeno test imports ittype PostgresProfile = {
/** The subject (machine) it is for. */
readonly machine: string;
/** The major version: the archive's own (18 on Ubuntu 26.04). */
readonly version: number;
readonly port: number;
/** The addresses it listens on: `localhost` or addresses of the machine. */
readonly listen: readonly string[];
};A PostgreSQL cluster, the one Ubuntu's package makes (<version>/main).