/** * The host addendum: a second managed region whose *content* belongs to the * consumer. * * Harnery's orientation block is deliberately generic, because it ships to * every consumer (ADR 0007's portability split, ADR 0008's ~80-line budget). A * project with real coordination policy of its own therefore had nowhere * machine-managed to put it, and ended up hand-maintaining it next to the * block, where nothing kept the two in step. * * The fix is declarative rather than programmatic. A consumer names a file: * * // .harnery/config.jsonc * { "instructions": { "hostAddendumFile": ".agents/host-instructions.md" } } * * and harnery gives that file's contents the same lifecycle as its own block: * spliced on `init`, refreshed when the file changes, reported by * `init --check`, removed by `deinit` or by deleting the config entry. Harnery * never parses, renders, or reasons about what the file says, which is what * keeps the arrangement portable: the mechanism is generic even though every * consumer's content is not. * * Exposing the splicer as a public primitive instead would have pushed the * whole lifecycle onto each host, since `init` and `deinit` are registered * inside harnery and every consumer would have had to wrap or replace them and * reimplement apply, check, and remove. The config key keeps one implementation * of all four. * * Every failure here is raised before the caller writes anything. */ /** Dotted config key naming the addendum source, quoted in every error. */ export declare const HOST_ADDENDUM_KEY = "instructions.hostAddendumFile"; /** A host addendum that cannot be used. Callers abort before writing. */ export declare class HostAddendumError extends Error { constructor(message: string); } export type HostAddendum = { configured: false; } | { configured: true; relPath: string; body: string; }; /** * Resolve the configured addendum, or report that there is none. * * Absent config, absent key, and explicit `null` all mean "not configured", * which is how a consumer turns the addendum off: delete the key and re-run * `init`. Anything else that cannot become a readable file inside the project * throws, because the alternative is an agent-facing instruction file that * quietly lost a section the host believes is still there. */ export declare function readHostAddendum(projectRoot: string): HostAddendum; //# sourceMappingURL=host-addendum.d.ts.map