feat(coding-agent): use pi.dev configuration schemas (#10751)

* feat(coding-agent): use pi.dev configuration schemas

* refactor(coding-agent): separate schema URL from output path

* docs(coding-agent): document published schema URLs
This commit is contained in:
Christian Klotz 2026-10-11 14:48:42 +01:00 • committed by GitHub
parent e6b9a6af5d
commit 96abe9a5ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 23 additions and 19 deletions

View file

@ -58,7 +58,7 @@ See [CLI resources](cli.md#resources) for the command-line option.
## Create a custom theme
Copy one of the [built-in themes](https://github.com/earendil-works/pi/tree/main/packages/coding-agent/src/modes/interactive/theme) or create a new JSON file conforming to the [schema](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/schemas/theme.schema.json). The built-in themes use OKHSL colors, with variables for colors that several roles share, so you can adjust a hue, saturation, or lightness directly.
Copy one of the [built-in themes](https://github.com/earendil-works/pi/tree/main/packages/coding-agent/src/modes/interactive/theme) or create a new JSON file conforming to the [schema](https://pi.dev/schemas/theme.schema.json). The built-in themes use OKHSL colors, with variables for colors that several roles share, so you can adjust a hue, saturation, or lightness directly.
1. Save the file as `<agent-dir>/themes/my-theme.json`. The agent directory defaults to `~/.pi/agent`.
2. Set its `name` to `my-theme`.
@ -95,7 +95,7 @@ Terminal default colors render as the terminal's own colors. Where Pi needs a co
Pi resolves chained variable references. A missing variable or circular reference makes the theme invalid. Pi uses truecolor when available, gamut-maps OKLCH to sRGB, and approximates colors for 256-color terminals. HTML exports convert OKHSL values to hexadecimal because CSS does not support them. If colors differ from their source values, check your terminal's truecolor detection and contrast settings. See [Configure Your Terminal](terminal-setup.md#override-detected-capabilities).
Use the [theme JSON schema](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/schemas/theme.schema.json) for the exact properties, required colors, and accepted value types.
Use the [theme JSON schema](https://pi.dev/schemas/theme.schema.json) for the exact properties, required colors, and accepted value types.
Pi reports invalid theme files during startup and `/reload`.