Expand description
SettingsFacade - the seam between the settings MCP tools and the
config machinery. The production impl (ProdSettingsFacade) reads the
document the settings page draws and routes every write through the
workspaceโs held-write registry; the mock returns preloaded results so the
tool tests can assert argument handling and error surfacing without a
config.
Re-exportsยง
use std::sync::Arc;๐use std::sync::Weak;๐use forge_primitives::settings::SettingsEditOp;๐use forge_primitives::settings::SettingsWriteAsk;๐use forge_primitives::settings::SettingsWriteChange;๐use forge_primitives::settings::SettingsWriteEnding;๐use forge_primitives::EffectClass;๐use forge_primitives::SettingsEditRequest;๐use serde_json::Value;๐use uuid::Uuid;๐use crate::SessionSlot;๐use crate::workspace::Workspace;๐
Structsยง
- Prod
Settings ๐Facade - Resolve
OnDrop ๐ - Settles the held write as abandoned if the awaiting future is dropped before the write is settled - the calling session died mid-wait, or its connection went. The registryโs own teardown sweep covers a session that goes without running this drop; this covers a cancelled call on a live session. Settling twice is a no-op in the registry.
- Settings
SetItem ๐ - One key and its new value, as
settings__sethands them through. - Settings
Value ๐ - One keyโs effective value, with what a caller needs to act on it.
Enumsยง
- Settings
Error ๐ - Why a settings read or write did not happen, in the words the tool hands the caller.
- Settings
Write ๐Outcome - What a write did, which is what the agentโs result says.
Traitsยง
- Settings
Facade ๐ - The settings toolsโ view of the workspace.