Skip to main content

Module facade

Module facade 

Source
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ยง

ProdSettingsFacade ๐Ÿ”’
ResolveOnDrop ๐Ÿ”’
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.
SettingsSetItem ๐Ÿ”’
One key and its new value, as settings__set hands them through.
SettingsValue ๐Ÿ”’
One keyโ€™s effective value, with what a caller needs to act on it.

Enumsยง

SettingsError ๐Ÿ”’
Why a settings read or write did not happen, in the words the tool hands the caller.
SettingsWriteOutcome ๐Ÿ”’
What a write did, which is what the agentโ€™s result says.

Traitsยง

SettingsFacade ๐Ÿ”’
The settings toolsโ€™ view of the workspace.