Skip to content

Expose settings read and write over RPC #314

Description

@m-aebrer

Summary

The planned web dashboard (#307) includes a settings tab ("model/provider choices and dreb-relevant runtime settings", with explicit validation errors). RPC mode currently offers write-only, per-runtime toggles and no way to read effective settings or persist defaults. This issue adds a typed settings read/write surface over RPC.

Current Behavior

  • RPC exposes per-runtime setters only: set_thinking_level, set_steering_mode, set_follow_up_mode, set_auto_compaction, set_auto_retry, set_model.
  • There is no RPC command to read current/effective settings (a client cannot even render current steering mode without tracking every write).
  • Persistent defaults (SettingsManager: default provider/model, default thinking level, steering/follow-up modes, compaction enabled, retry enabled, etc.) are not writable over RPC — runtime setters do not persist across restarts unless the underlying AgentSession method persists them.

Proposed Behavior

  • New RPC command get_settings returning a typed snapshot of dashboard-relevant effective settings: default provider/model, default thinking level, steering mode, follow-up mode, compaction enabled, retry enabled (exact list to be finalized against the UX spec from Design dreb dashboard UX/UI for TUI feature parity #311, but this set is the known-needed core).
  • Typed write command(s) for persistent defaults backed by SettingsManager — either individual commands mirroring the existing setter style or a single set_settings with a strictly validated typed payload. No generic string key/value writes.
  • Validation failures return explicit RPC errors; no silent fallback or clamping.

Acceptance Criteria

  • get_settings command and typed response added to rpc-types.ts and handled in rpc-mode.ts.
  • Typed persistent writes for at least: default provider/model, default thinking level, steering mode, follow-up mode, compaction enabled, retry enabled.
  • Writes persist via SettingsManager and are reflected in subsequent get_settings reads and fresh runtimes.
  • Invalid values produce descriptive errors.
  • RpcClient gains corresponding methods.
  • Tests cover read, write, persistence, and validation-error paths.
  • docs/rpc.md documents the settings surface.

Context

Technical Notes

  • core/settings-manager.ts already has typed getters/setters for everything listed — this is plumbing plus DTO design, not new settings logic.
  • Distinguish clearly between per-runtime state (existing commands, unchanged) and persistent defaults (new). get_settings should make the distinction legible to clients, since the dashboard settings tab will surface both.
  • TUI-specific settings (themes, hardware cursor, editor padding, buddy) are out of scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Important for workflow completenessenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions