refactor(settings): declare settings once and admit them per setting
Ā
TH
38m ago+1480+1480+0123456789012345678901234567890123456789-1779-1779-0123456789012345678901234567890123456789
Summary
settings now declares every setting once and lets admission check support per setting.
- One table.
contracts/src/settings-catalog.tsholds each setting's forms, app source, app scope and help. CLI/daemon parsing (one parser), usage, the invalid-args message,settingsAppScope, the client type, the MCPsettingenum andsettings --helpderive from it. - Per-setting admission. Owners declare
settingsRuntimeOperationFacts({ target, unsupported, write, read }); admission checks the requested setting before binding, so a refusal never expires the ref frame. Each owner's fact record is keyed by the setting list its dispatch switch is exhaustive over, so the two cannot drift. This removes the daemon's pre-admission refusals and the Apple leaf guards (ADR 0019 note added). pollUntilSettledinhost-kit/retryreplaces the Android alert and fill-verification loops.
Public changes (CHANGELOG): an unserved setting answers UNSUPPORTED_OPERATION with the owner's reason, replacing macOS INVALID_ARGS and setting-unsupported-on-leaf; the parser refuses a permission action or mode its target does not take and stray extra arguments; Android alert wait 0 reports a visible alert.
agent-device settings wifi on --platform macos # UNSUPPORTED_OPERATION, reason unsupported-platform-leaf
51 files, +1480/ā1779: over the 2,500-line gross guide; one migration kept as one PR on request, net ā299.
Validation
pnpm check:affected --runpassed at38bfc3a60.- Live run at
38bfc3a60on an Android 15 emulator, an iPhone 17 Pro simulator (iOS 27.0) and the macOS host; transcript in the PR comments.
š¤ Generated with Claude Code