kimi-code/packages
liruifengv 8d251f8ab4
feat(config): tolerate invalid config.toml sections instead of failing startup (#689)
* feat(config): tolerate invalid config.toml sections instead of failing startup

Schema errors now drop only the offending sections (single entries for
providers/models) with a warning, so a typo no longer prevents startup or
drops the login state. TOML syntax errors still fail fast with the parse
location. Mid-run reloads keep the last good config when the file breaks.

Warnings surface via the new getConfigDiagnostics API: as a startup notice
in the TUI, on stderr in print mode, and in the status bar after /new.

Write paths stay strict so a broken file is never silently rewritten, and
now fail with a short actionable message instead of raw validation JSON;
the /provider TUI flow and the kimi provider CLI report these errors
instead of crashing on an unhandled rejection.

* fix(config): keep entry-keyed sections when one entry has multiple issues

A providers/models entry with several validation issues was deleted by the
first issue, and the remaining issues from the same safeParse pass then
escalated to deleting the entire section — one badly-typed custom provider
could drop every provider, including the managed OAuth login. Issues on
entry-keyed sections now only ever target the entry itself; once it is
gone, later issues are no-ops.
2026-06-12 15:56:13 +08:00
..
acp-adapter chore: use raw query imports for prompt sources (#682) 2026-06-12 11:47:44 +08:00
agent-core feat(config): tolerate invalid config.toml sections instead of failing startup (#689) 2026-06-12 15:56:13 +08:00
kaos ci: release packages (#629) 2026-06-12 10:54:44 +08:00
kosong ci: release packages (#629) 2026-06-12 10:54:44 +08:00
migration-legacy chore: use raw query imports for prompt sources (#682) 2026-06-12 11:47:44 +08:00
node-sdk feat(config): tolerate invalid config.toml sections instead of failing startup (#689) 2026-06-12 15:56:13 +08:00
oauth test: redact internal endpoint fixtures (#688) 2026-06-12 15:05:26 +08:00
protocol chore: use raw query imports for prompt sources (#682) 2026-06-12 11:47:44 +08:00
telemetry feat: rework permission decision policies (#26) 2026-05-27 20:07:24 +08:00