Skip to content

Settings foundation: typed registry and CLI management #153

Description

@SarthakWade

Problem

Headless has one local preference, startup-presentation, implemented directly in the CLI with macOS UserDefaults. There is no central schema, Linux persistence, discovery command, reset behavior, or classification of settings that agents may change.

Proposed contract

Define a typed settings registry with key, type, default, platform scope, validation, restart behavior, and access class. Expose:

headless config list
headless config describe KEY
headless config get KEY
headless config set KEY VALUE
headless config reset KEY

Use UserDefaults on macOS and an XDG config file with mode 0600 in a 0700 directory on Linux. Migrate startup-presentation without losing its current value.

Boundaries

Security invariants are policies, not settings. The registry must never allow arbitrary JavaScript, TCP control, unsafe schemes, downloads, sandbox weakening, or bypassing sensitive-diagnostics gates. Unknown keys and invalid values fail closed. Settings must be classified as agent-readable, agent-writable, or user-only.

This changes the agent-facing contract and requires an architecture-decision entry before implementation.

Acceptance criteria

  • One schema drives parsing, help, defaults, validation, and storage.
  • CLI coverage includes list, describe, get, set, reset, unknown keys, invalid values, and platform-specific keys.
  • Writes are atomic and permissions are verified on Linux.
  • Existing startup-presentation behavior and tests remain compatible.
  • COMMANDS, phase documentation, and capabilities are updated from authoritative sources.
  • Protocol, runtime, build, and relevant E2E suites pass.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliCLI parser, help, capabilitiesarea:core-protocolHeadlessProtocol: wire protocol, validation, transportpriority:mediumScheduled, not blockingstatus:needs-designRequires an architecture-decision entry firsttype:featureNew capability or command

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions