Expand description
The canonical policy, typed: .ai/repo/policy.yaml and the profiles beside it. The
policy is the one canonical input of the provider projections; the shell tool reads the
same file with the same subset reader, so the two agree byte for byte on what a
projection is and which hash it carries.
Structs§
- Context
Policy context:of the policy, the part the projections need.- Exemption
Class - One exemption class: a named reason work may proceed under no intent.
- Freshness
Policy session.freshness:of the policy: how old a continuation record may be before it stops being current.- Intent
Policy intent:— the binding a start is held to (ADR 0111).- Knowledge
Policy knowledge:of the policy: the bounds on the review queue of derived knowledge records.- Loaded
Policy - The policy as loaded: the typed value, where it came from, and the hash the stamps carry.
- Policy
- The policy, typed to what the projections consume. Every other key is carried through
unread: the policy schema under
share/schemas/majordomus/policy/policy.v1.schema.jsonowns the full shape. - Profiles
Policy profiles:of the policy, the part the projections need.- Projection
- One declared provider projection:
projections[]in the policy. - Server
Policy server:— what a lease contest is judged by.- Session
Policy session:— what the episode boundary does beyond drawing itself.
Enums§
- Binding
Mode - How strictly a start is held to its binding.
- Projection
Mode - How a projection owns its target.
Constants§
- POLICY_
SECTION - The manifest section that holds the policy file.
- PROFILES_
SECTION - The manifest section that holds the profiles directory.
Functions§
- is_
safe_ relative - A path is inside
rootafter lexical normalisation: no absolute path, no..component, nothing empty. - normal_
form - The normal form of a file in the layer’s YAML subset, which the policy hash covers in
place of its bytes: trailing spaces, tabs and carriage returns dropped; blank lines and
whole-line comments dropped; a trailing comment (a
#after a space or tab) dropped from a line that holds no quote, since inside a quoted scalar#may be text. Indentation, order and every value are kept, and every line ends in a newline. - profile_
files - The profile files,
<profiles>/*.yaml, sorted by name. An absent directory is no profile, not an error. - repository_
providers_ dir - The repository-relative directory where a repository may override a provider template.
- sha256_
bytes_ hex - Hex SHA-256 of arbitrary bytes: the same digest
sha256_hextakes, for content that is not necessarily text. A file the repository tracks may hold anything, and decoding it to hash it would be a decision about its encoding that nothing here is entitled to make. - sha256_
hex - Hex SHA-256 of a text.