mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 04:12:10 +03:00
Adds 5 new settings route handlers for CLIs introduced by plan 14 that declare configType:"custom" and need automated config file persistence: forge (~/.forge/config.toml), jcode (~/.jcode/config.json), deepseek-tui (~/.config/deepseek-tui/config.toml), smelt (~/.smelt/config.json), pi (~/.pi/config.json). Also registers the 5 tools in cliRuntime.ts path table so getCliPrimaryConfigPath() resolves their config paths correctly. Each handler follows the established pattern: requireCliToolsAuth guard on every exported method, Zod body validation on POST, buildErrorBody/ sanitizeErrorMessage on all error paths (Hard Rule #12), fs/promises only (no exec/spawn — Hard Rule #13), saveCliToolLastConfigured on success. Integration tests: 7 subtests per handler (401 without auth, 200 GET, 400 missing-baseUrl, 400 missing-model, 200 POST writes file, 200 DELETE, error sanitization + no exec/spawn static audit).