Expand description
The class catalogue and the effective-config document.
One table lists every key the loader accepts, the area it draws in and
when an edit to it takes effect; each entry also resolves its own value
from a LoadedConfig. The reload summary and the settings page both
read that table, so a key cannot be live in one and next-session in the
other.
Re-exportsยง
use std::collections::BTreeSet;๐use std::path::Path;๐use forge_primitives::settings::SettingsTotals;๐use forge_primitives::EditKind;๐use forge_primitives::EffectClass;๐use forge_primitives::SettingKind;๐use forge_primitives::SettingsArea;๐use forge_primitives::SettingsDocument;๐use forge_primitives::SettingsEdit;๐use forge_primitives::SettingsKey;๐use serde_json::json;๐use crate::config::ConfigReload;๐use crate::config::DEFAULT_HANDOFF_AFTER_COMPACTIONS;๐use crate::config::DEFAULT_HANDOFF_AT_PERCENT;๐use crate::config::DEFAULT_MAX_WORKERS_PER_PROJECT;๐use crate::config::LoadedConfig;๐use crate::config::LoadedProject;๐use crate::config::format_session_duration;๐
Structsยง
- Area
Spec - One areaโs fixed identity: the id the page keys on, the name it draws, and the line under it.
- Catalogue
KeyTarget ๐ - One catalogue patternโs own metadata, for a key the config does not set and therefore emits no row for.
- Config
Key - One accepted key: its pattern, the area it draws in, its class, and the rows it resolves to for a load.
- Edit
Spec ๐ - One keyโs edit metadata, in the catalogueโs own static form.
- KeyRow ๐
- One row a catalogued key resolves to: a concrete path (with the instance where the table repeats) and the effective value.
- Settings
Target ๐ - One key a settings tool can address: the document row the writer would locate, with everything an edit needs to be built and validated.
Constantsยง
- ACCOUNT_
KEYS ๐ - AREAS
- The sub-navโs areas, in the order it draws them.
[browser]rides with the server that hosts it;[dictate]and[tts]share the voice area, because they are the two directions of one conversation. - BOOLEAN ๐
- CLIENT_
KEYS ๐ - CONNECTOR_
KEYS ๐ - DICTATE_
BINDS ๐ - DICTATE_
CONTEXTS ๐ - DICTATE_
KEYS ๐ - DICTATE_
MODES ๐ - DICTATE_
STRUCTURES ๐ - DICTATE_
STYLINGS ๐ - DOCUMENT_
KEYS ๐ - ENV_
KEYS ๐ - GATEWAY_
KEYS ๐ - HANDOFF_
KEYS ๐ - LIST ๐
- MODEL_
KEYS ๐ - NUMBER ๐
- PERMISSION_
MODES ๐ - PROJECT_
KEYS ๐ - PROVIDERS ๐
- SERVER_
KEYS ๐ - SESSION_
KEYS ๐ - TERMINAL_
KEYS ๐ - TEXT ๐
- TTS_
KEYS ๐ - The speaking roleโs keys: the other direction of the same voice area.
- USAGE_
KEYS ๐
Functionsยง
- all_
keys ๐ - catalogue_
target ๐ - The catalogue entry a pattern names, or
Nonewhen it is not a key the loader accepts. - changed_
paths ๐ - choice ๐
- diff ๐
- The reload summary, derived from the same rows the page draws: a key reported as moved and the class the page chips it with are one tableโs.
- document ๐
- The whole document for one load, every catalogued key resolved.
- edit_
kind_ ๐name - The name of a valueโs edit control, as the index states its type.
- edit_
spec ๐ - The control and the entry a catalogued key belongs to. The default is a plain text field; a numeric, boolean, list or choice key is named here, and a test holds each edit kind to the value kind the resolver draws.
- edit_
wire ๐ - enum_
name ๐ - flag ๐
- index_
instances ๐ - The instance names a repeated catalogue key takes, for the callerโs own reach: its projectโs keys list its project alone, and the global accounts, workspaces and models list every one this config declares.
- index_
row_ ๐in_ reach - Whether a row is one the callerโs reach covers: its own projectโs rows and its own orgโs, so another projectโs set key does not mark the callerโs index as set.
- index_
text ๐ - The compact catalogue an agent reads: sections and keys with type, whether the config sets one, and when an edit lands. No value crosses, so this is the shape of the file without its contents.
- index_
value_ ๐set - Whether a rowโs value is one the reader would act on. The resolvers draw โnot setโ for an unset optional that has no row of its own (a modelโs window), so that placeholder is not a setting either.
- instance ๐
- The longest of
namesthe path names afterprefix, and the key tail that follows it. - instances_
exist ๐ - Whether the instance names a pattern took all exist in
config. - key_
leaf ๐ - The keyโs own name from a tail that may start with a repeated table:
model_slugs.glm-5.3-flashnames the slug, not the table. - last_
segment ๐ - list ๐
- named ๐
- number ๐
- org_
names ๐ - org_
project ๐ - owning_
org ๐ - The org a concrete path belongs to, when it is one of the orgโs own keys
(
orgs.<org>.browser_profile, the orgโs Slack binding) rather than a projectโs. A read from another org is refused by name like another projectโs key is: the orgโs settings shape every project in it, and the org segment is ownership even though the planโs sentence names projects. - owning_
project ๐ - The project a concrete path belongs to, when the path is one of a projectโs keys. The configโs own names are matched, longest first, so a project name containing a dot stays one name.
- project_
path ๐ - provider_
label ๐ - required ๐
- resolve_
target ๐ - The target a callerโs path names for a read or a write.
- sorted_
keys ๐ - split_
row ๐ - The instance names and the keyโs own name for one row.
- synthetic_
key ๐ - The row a writer locates for a key the document does not carry: its
pattern and path are the editโs own, and only the fields
set_keyreads are populated. - target ๐
- The document row a concrete path names, or
Nonewhen the path is no key this load resolves.settings__getandsettings__settake a path exactly as the row states it - never a catalogue pattern, which has no value and no instance to write. - text ๐
- text_
set ๐ - An optional settingโs raw value: the value when the file set it, and
nullwhen it did not. The effective built-in is the pageโs to draw, so the clientโs axes path never reads a display default back as a setting.