ktx/packages/cli/test/context
Kevin Messiaen 0e2e6c7d90
refactor(mongo-query): consolidate query types and drop unsafe cast
Route the Mongo read path through one canonical request/result shape and
remove the `as unknown as` narrowing flagged in review.

- Add optional executeQuery to KtxScanConnector and narrow by capability
  in the runner, replacing the double cast with a driver + method guard.
- Move KtxMongoQueryInput/KtxMongoQueryResult into context/scan/types.ts;
  delete the duplicate runner request type, the inline MCP-port input, and
  the KtxMongoQueryResponse alias. KtxMongoQueryArgs now extends the base.
- Inline the pass-through executeMongoQuery wrapper.
- Correct the --output default in the mongo-query and sql CLI docs: it is
  TTY/CI/KTX_OUTPUT-derived, not unconditionally pretty.
- Add tests: database override, empty result, parseLimitOption bounds,
  bigint/plural-row/empty-header rendering, and mongo_query_completed
  telemetry fields on both outcomes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ga2tvQ2YCEphmY8HM5Guzq
2026-07-11 21:19:55 +07:00
..
cache Resumable and fault-tolerant source ingest (spec #22) (#315) 2026-06-30 01:29:28 +02:00
connections feat: query_policy semantic-layer-only restricts agents to predefined semantic-layer measures (#334) 2026-07-03 08:54:17 +00:00
core fix(telemetry): classify daemon query rejections as expected, not faults (#335) 2026-07-03 22:39:34 +02:00
daemon fix(telemetry): classify daemon query rejections as expected, not faults (#335) 2026-07-03 22:39:34 +02:00
index-sync fix: read semantic sources safely (#284) 2026-06-10 14:06:13 +02:00
ingest feat(athena): first-class AWS Athena warehouse identity (SL + BI mapping) (#332) 2026-07-02 15:10:29 +02:00
llm feat: ktx batch — scan resilience, analytics SQL craft, connector hardening (#312) 2026-06-29 16:35:57 +00:00
mcp refactor(mongo-query): consolidate query types and drop unsafe cast 2026-07-11 21:19:55 +07:00
memory feat(sigma): add Sigma Computing context-source adapter (#316) 2026-07-01 01:14:57 +02:00
project feat: ktx batch — scan resilience, analytics SQL craft, connector hardening (#312) 2026-06-29 16:35:57 +00:00
prompts test: split cli tests from source tree (#216) 2026-05-26 08:49:05 +02:00
scan feat(connector): add Amazon Athena connector via Glue Data Catalog (#309) 2026-07-02 15:00:26 +02:00
search fix: read semantic sources safely (#284) 2026-06-10 14:06:13 +02:00
skills test: split cli tests from source tree (#216) 2026-05-26 08:49:05 +02:00
sl feat: query_policy semantic-layer-only restricts agents to predefined semantic-layer measures (#334) 2026-07-03 08:54:17 +00:00
sql-analysis feat(connector): add Amazon Athena connector via Glue Data Catalog (#309) 2026-07-02 15:00:26 +02:00
test refactor: enforce ktx naming and AGENTS.md compliance sweep (#289) 2026-06-11 13:49:45 +02:00
tools test: split cli tests from source tree (#216) 2026-05-26 08:49:05 +02:00
wiki feat: ktx batch — scan resilience, analytics SQL craft, connector hardening (#312) 2026-06-29 16:35:57 +00:00