pub struct Config {
pub agent_instructions: Option<String>,
pub frozen_pages: Vec<PathBuf>,
pub ignored_types: Vec<String>,
pub schemas: BTreeMap<String, Schema>,
}Expand description
The parsed structured content of a store’s DB.md config file.
All four parts are optional in the source; absent parts fall back to spec
defaults. Produced by parse_db_md.
Fields§
§agent_instructions: Option<String>Body of the ## Agent instructions section — free-form prose passed to
the agent’s system prompt.
frozen_pages: Vec<PathBuf>## Policies → ### Frozen pages: store-relative paths the toolkit
refuses to write (POLICY_FROZEN_PAGE).
ignored_types: Vec<String>## Policies → ### Ignored types: type names the curator never
synthesizes (still readable as ambient context).
schemas: BTreeMap<String, Schema>## Schemas → one entry per ### <type> sub-section.
Implementations§
Source§impl Config
impl Config
Sourcepub fn frozen_match(&self, target: &Path) -> Option<PathBuf>
pub fn frozen_match(&self, target: &Path) -> Option<PathBuf>
The ### Frozen pages entry that matches a store-relative target, if
any. The single frozen-page matcher every write surface must funnel
through so the policy is enforced identically on write / fm set /
fm init / link / rename / format.
Comparison is normalized so a policy line and a write target match regardless of incidental spelling differences:
/path separators on every OS,- a single leading
./dropped, - a trailing
.mddropped on both sides —parse_db_mdstores frozen entries verbatim, so an operator who writes the natural extensionless spelling (records/decisions/q1) must protect the file (records/decisions/q1.md) exactly as the.mdspelling does.
Returns the matched config entry verbatim (its original spelling) so the
caller can name it in the POLICY_FROZEN_PAGE refusal.
Sourcepub fn is_frozen(&self, target: &Path) -> bool
pub fn is_frozen(&self, target: &Path) -> bool
True if target (store-relative) is a frozen page. Convenience wrapper
over Config::frozen_match for callers that only need presence.