Expand description
Dotted keys over the config tree (session.tool_profile,
agents.build.model, mcp_servers."my.server".command).
Read side: lookup, leaves, render work on the serialized
crate::Config (toml::Value), and redact hides secret values.
Write side: [set_in_document] changes one key of a TOML document and
keeps every other key, comment and blank line as it was.
A segment that meets an array picks an element: a number is an index,
anything else the table whose name equals it (agents.build).
Constants§
- REDACTED
- Printed in place of a secret value.
Functions§
- format_
key - The dotted form of
path, quoting segments that are not bare keys. - is_
secret_ key - True when the key at
pathholds a secret: the last segment is (or ends in_plus) one of api_key, apikey, token, secret, password, webhook, webhook_url, authorization; or it iskeyunderproviders; or it sits directly in aheaderstable. - leaves
- Every leaf under
rootwith its path, sorted by path. Tables recurse, and so do arrays of tables (each element by itsname, else its index); scalars, other arrays and empty tables are leaves. - lookup
- The value at
path, if any. - parse_
key - Split a dotted key into segments (TOML dotted-key syntax, so a segment
with a dot in it is quoted:
models."gpt-4.1"). - redact
value, found atpath, with every secret string under it replaced byREDACTED.${NAME}references are kept.- render
- A value for people: strings bare, tables as a TOML document, the rest as a TOML literal.