Expand description
Per-provider trust state (enable/disable controls).
Trust decisions are local and user-owned. State is persisted under
$SYNAPS_BASE_DIR/extensions/trust.json. Enabled-by-default semantics:
a provider with no entry is considered enabled. Users explicitly
disable providers they distrust.
Structs§
Functions§
- disable_
provider - Record a disabled decision. Replaces any existing entry for the runtime_id.
- enable_
provider - Re-enable a previously disabled provider. Removes the entry.
- is_
provider_ enabled - Returns true if the runtime_id is permitted to be routed (i.e. NOT disabled). Default: true (enabled when absent).
- load_
trust_ state - Load the persisted state. Missing file →
Default::default(). IO errors → Err. Malformed JSON → Err with a descriptive message. - save_
trust_ state - Persist the state. Creates parent dirs if needed. Atomic via tempfile + rename.
- trust_
file_ path - Path to the trust file under the active base dir. Caller is responsible for creating parent directories when writing.