config-settings-management
Use this skill before changing any setting that appears in
~/.mesh-llm/config.toml, the owner-control configuration API, the runtime
configuration UI, or an installed plugin's config_schema.
Mental Model
Config settings are not just struct fields. A complete setting has:
- A persisted TOML shape in
crates/mesh-llm-config/src/model.rs.
- Authoring/editor support in
crates/mesh-llm-config/src/authoring.rs when
code needs to create or mutate it.
- Built-in schema metadata in
crates/mesh-llm-config/src/model/built_in_schema.rs when it is a core
mesh-llm setting.
- Validation diagnostics in
crates/mesh-llm-config/src/validate.rs, with
stable ConfigPath and canonical path metadata.
- Runtime schema aggregation/export in
crates/mesh-llm-host-runtime/src/config_schema.rs.
- Owner-control apply behavior in
crates/mesh-llm-host-runtime/src/runtime/config_state.rs when it can be
changed dynamically.
- API/protocol conversion coverage in
crates/mesh-llm-host-runtime/src/api/,
crates/mesh-llm-host-runtime/src/protocol/, and
crates/mesh-llm-protocol/proto/node.proto when it crosses process or node
boundaries.
- UI adapter and fixture coverage under
crates/mesh-llm-ui/src/features/configuration/ and
crates/mesh-llm-host-runtime/tests/fixtures/.
Built-In Settings Checklist
When adding or removing a built-in setting:
- Update
MeshConfig or the owning nested config struct in
crates/mesh-llm-config/src/model.rs.
- Update defaults and editor helpers in
authoring.rs if generated configs,
tests, or command flows need to write the setting.
- Add, rename, or remove the corresponding descriptor in
model/built_in_schema.rs. Include owner, value schema, support state,
control surfaces, apply mode, restart scope, visibility, constraints, aliases,
and description.
- Update validation in
validate.rs. Prefer structured ConfigDiagnostic
helpers over plain string errors.
- Preserve compatibility with existing TOML when possible. Use aliases and
warnings for renamed keys; reserve
version = 1 bumps for actual incompatible
persisted config format changes.
- Update schema fixtures and UI adapter expectations when exported schema JSON
changes.
- Run
mesh-llm config validate --config-path <fixture> --json for at least one
valid and one invalid representative file.
Plugin Settings Checklist
Plugin settings are install-time schemas, not hard-coded built-in settings.
- The plugin manifest owns its schema through
config_schema in
crates/mesh-llm-plugin/src/manifest.rs and
crates/mesh-llm-plugin/proto/plugin.proto.
- Keep
schema_version at
mesh_llm_config::SUPPORTED_PLUGIN_CONFIG_SCHEMA_VERSION unless the schema
format itself becomes incompatible. Tightening validation of existing v1
fields such as required, type, enum, object, array, or constraints does not
by itself require a schema version bump.
- Host-side installed plugin schema loading and strict validation live in
crates/mesh-llm-host-runtime/src/plugin/config.rs and
crates/mesh-llm-config/src/plugin_validation.rs.
- Required plugin settings must be rejected even when
[plugin.settings] is
absent.
- Missing or unavailable schemas should reject custom settings, but plugin
entries without custom settings should remain loadable when possible.
allow_unvalidated_config should produce warnings, not silently drop
diagnostics from success responses.
Owner-Control And UI
- Dynamic apply behavior belongs in
crates/mesh-llm-host-runtime/src/runtime/config_state.rs.
- The management API should return diagnostics for both rejected applies and
successful applies with warnings.
- Protobuf changes must be additive unless explicitly approved as breaking.
Older nodes and clients should ignore unknown fields.
- The UI should consume exported schema metadata instead of duplicating setting
ownership, labels, constraints, or apply behavior.
- Snapshot fixtures in
crates/mesh-llm-host-runtime/tests/fixtures/ are the
cross-check between Rust schema export and the TypeScript adapter.
Validation
Run cargo commands serially. For config-surface changes, start with:
cargo test -p mesh-llm-config --lib
cargo test -p mesh-llm-host-runtime --lib schema_export
cargo test -p mesh-llm-host-runtime --lib runtime_config
cargo test -p mesh-llm-host-runtime --lib plugin_config
cargo test -p mesh-llm-plugin --lib
cargo test -p mesh-llm-plugin-manager --lib
cargo test -p mesh-llm-cli config_validate --lib
cargo test -p mesh-llm config_validate --lib
cargo check -p mesh-llm
cargo clippy -p mesh-llm-config -p mesh-llm-plugin -p mesh-llm-plugin-manager -p mesh-llm-host-runtime -p mesh-llm-cli -p mesh-llm --all-targets -- -D warnings
Also run the UI checks when the schema export or adapter changes:
cd crates/mesh-llm-ui
npm test -- --run src/features/configuration/api/config-adapter.test.ts
npm run typecheck
Use the repo build gate before publishing broad changes:
just build
1---2name: config-settings-management3description: Use this skill when adding, renaming, removing, validating, or exposing mesh-llm config settings, including built-in settings, plugin config schemas, owner-control apply behavior, CLI validation, and UI configuration surfaces.4---56# config-settings-management78Use this skill before changing any setting that appears in9`~/.mesh-llm/config.toml`, the owner-control configuration API, the runtime10configuration UI, or an installed plugin's `config_schema`.1112## Mental Model1314Config settings are not just struct fields. A complete setting has:1516- A persisted TOML shape in `crates/mesh-llm-config/src/model.rs`.17- Authoring/editor support in `crates/mesh-llm-config/src/authoring.rs` when18 code needs to create or mutate it.19- Built-in schema metadata in20 `crates/mesh-llm-config/src/model/built_in_schema.rs` when it is a core21 mesh-llm setting.22- Validation diagnostics in `crates/mesh-llm-config/src/validate.rs`, with23 stable `ConfigPath` and canonical path metadata.24- Runtime schema aggregation/export in25 `crates/mesh-llm-host-runtime/src/config_schema.rs`.26- Owner-control apply behavior in27 `crates/mesh-llm-host-runtime/src/runtime/config_state.rs` when it can be28 changed dynamically.29- API/protocol conversion coverage in `crates/mesh-llm-host-runtime/src/api/`,30 `crates/mesh-llm-host-runtime/src/protocol/`, and31 `crates/mesh-llm-protocol/proto/node.proto` when it crosses process or node32 boundaries.33- UI adapter and fixture coverage under34 `crates/mesh-llm-ui/src/features/configuration/` and35 `crates/mesh-llm-host-runtime/tests/fixtures/`.3637## Built-In Settings Checklist3839When adding or removing a built-in setting:4041- Update `MeshConfig` or the owning nested config struct in42 `crates/mesh-llm-config/src/model.rs`.43- Update defaults and editor helpers in `authoring.rs` if generated configs,44 tests, or command flows need to write the setting.45- Add, rename, or remove the corresponding descriptor in46 `model/built_in_schema.rs`. Include owner, value schema, support state,47 control surfaces, apply mode, restart scope, visibility, constraints, aliases,48 and description.49- Update validation in `validate.rs`. Prefer structured `ConfigDiagnostic`50 helpers over plain string errors.51- Preserve compatibility with existing TOML when possible. Use aliases and52 warnings for renamed keys; reserve `version = 1` bumps for actual incompatible53 persisted config format changes.54- Update schema fixtures and UI adapter expectations when exported schema JSON55 changes.56- Run `mesh-llm config validate --config-path <fixture> --json` for at least one57 valid and one invalid representative file.5859## Plugin Settings Checklist6061Plugin settings are install-time schemas, not hard-coded built-in settings.6263- The plugin manifest owns its schema through `config_schema` in64 `crates/mesh-llm-plugin/src/manifest.rs` and65 `crates/mesh-llm-plugin/proto/plugin.proto`.66- Keep `schema_version` at67 `mesh_llm_config::SUPPORTED_PLUGIN_CONFIG_SCHEMA_VERSION` unless the schema68 format itself becomes incompatible. Tightening validation of existing v169 fields such as `required`, type, enum, object, array, or constraints does not70 by itself require a schema version bump.71- Host-side installed plugin schema loading and strict validation live in72 `crates/mesh-llm-host-runtime/src/plugin/config.rs` and73 `crates/mesh-llm-config/src/plugin_validation.rs`.74- Required plugin settings must be rejected even when `[plugin.settings]` is75 absent.76- Missing or unavailable schemas should reject custom settings, but plugin77 entries without custom settings should remain loadable when possible.78- `allow_unvalidated_config` should produce warnings, not silently drop79 diagnostics from success responses.8081## Owner-Control And UI8283- Dynamic apply behavior belongs in84 `crates/mesh-llm-host-runtime/src/runtime/config_state.rs`.85- The management API should return diagnostics for both rejected applies and86 successful applies with warnings.87- Protobuf changes must be additive unless explicitly approved as breaking.88 Older nodes and clients should ignore unknown fields.89- The UI should consume exported schema metadata instead of duplicating setting90 ownership, labels, constraints, or apply behavior.91- Snapshot fixtures in `crates/mesh-llm-host-runtime/tests/fixtures/` are the92 cross-check between Rust schema export and the TypeScript adapter.9394## Validation9596Run cargo commands serially. For config-surface changes, start with:9798```bash99cargo test -p mesh-llm-config --lib100cargo test -p mesh-llm-host-runtime --lib schema_export101cargo test -p mesh-llm-host-runtime --lib runtime_config102cargo test -p mesh-llm-host-runtime --lib plugin_config103cargo test -p mesh-llm-plugin --lib104cargo test -p mesh-llm-plugin-manager --lib105cargo test -p mesh-llm-cli config_validate --lib106cargo test -p mesh-llm config_validate --lib107cargo check -p mesh-llm108cargo clippy -p mesh-llm-config -p mesh-llm-plugin -p mesh-llm-plugin-manager -p mesh-llm-host-runtime -p mesh-llm-cli -p mesh-llm --all-targets -- -D warnings109```110111Also run the UI checks when the schema export or adapter changes:112113```bash114cd crates/mesh-llm-ui115npm test -- --run src/features/configuration/api/config-adapter.test.ts116npm run typecheck117```118119Use the repo build gate before publishing broad changes:120121```bash122just build123```