ktx/packages/cli
Andrey Avtomonov 8a50601582
fix(cli): make connection-not-configured errors actionable and expected (#301)
The MCP sql_execution/sl_query tools and the `ktx sql` CLI threw a plain Error naming no valid connection ids when an agent passed an unconfigured connectionId (or omitted it with multiple connections). The message reached the agent verbatim but gave it nothing to correct with, so it re-guessed for days, and each correct caller-driven rejection filed in PostHog Error Tracking as a ktx fault (issue 019eb10c, 8 occurrences on one install).

Add a shared resolver (resolveConfiguredConnection / resolveRequiredConnectionId) that throws KtxExpectedError listing the configured connections, and route the three SQL-execution call sites through it. Expected-error classification keeps these out of Error Tracking while the actionable message lets agents self-correct.
2026-06-15 14:38:44 +02:00
..
assets/demo/orbit Polish documentation copy (#98) 2026-05-14 12:43:14 -04:00
scripts chore(workspace): gate dead-code with knip production mode (#196) 2026-05-21 15:28:58 +02:00
src fix(cli): make connection-not-configured errors actionable and expected (#301) 2026-06-15 14:38:44 +02:00
test fix(cli): make connection-not-configured errors actionable and expected (#301) 2026-06-15 14:38:44 +02:00
package.json chore(release): 0.12.0 [skip ci] 2026-06-12 16:45:18 +00:00
tsconfig.json chore(workspace): gate dead-code with knip production mode (#196) 2026-05-21 15:28:58 +02:00
tsconfig.test.json test: split cli tests from source tree (#216) 2026-05-26 08:49:05 +02:00
vitest.config.ts test: split cli tests from source tree (#216) 2026-05-26 08:49:05 +02:00