ktx/packages/context/src
Andrey Avtomonov b3be54e3fa
refactor(context): validate ktx.yaml with Zod and surface issues in status (#91)
* refactor(context): validate ktx.yaml with Zod and surface issues in status

- Replace hand-rolled ktx.yaml parsing with a strict Zod schema and
  derive KtxProjectConfig types from it.
- Add validateKtxProjectConfig returning structured KtxConfigIssue[]
  with migration hints for deprecated keys (ingest.llm,
  scan.enrichment.backend, etc.).
- Wire ktx status/doctor to run validation, render schema issues in
  plain and JSON output, and add a Config row to project status.
- Update the orbit example to camelCase scan.relationships keys to
  match the schema.

* fix(context): tolerate legacy setup.completed_steps and optional driver

- Accept and drop the legacy setup.completed_steps field so existing
  ktx.yaml files migrated from older versions still load.
- Make connections.<id>.driver optional in the schema; runtime code
  already produces a clear "no driver" error at use time.

* feat(cli): add ktx status --validate to run only ktx.yaml schema validation

- New --validate flag dispatches a focused runKtxDoctor 'validate' branch
  that reads ktx.yaml, runs validateKtxProjectConfig, and skips LLM,
  connection, embedding, and query-history checks.
- Plain output prints a single Config row; JSON output emits
  {ok: true} on success or the existing invalid_config / missing_project
  shapes on failure.
2026-05-14 15:36:35 +02:00
..
agent feat: merge ingest and scan 2026-05-14 01:43:06 +02:00
connections fix: clean up ktx yaml config parameters (#75) 2026-05-14 01:27:31 +02:00
core feat(context): add warehouse verification tools (#46) 2026-05-13 13:43:23 +02:00
daemon rename klo to ktx 2026-05-10 23:51:24 +02:00
ingest fix(llm): wire prompt caching through all Anthropic call sites (#90) 2026-05-14 15:36:27 +02:00
llm fix: align KTX agent tools and repair handling (#73) 2026-05-14 00:57:51 +02:00
mcp fix: stop requiring readonly connection config (#71) 2026-05-13 19:37:25 +02:00
memory fix: stop requiring readonly connection config (#71) 2026-05-13 19:37:25 +02:00
project refactor(context): validate ktx.yaml with Zod and surface issues in status (#91) 2026-05-14 15:36:35 +02:00
prompts rename klo to ktx 2026-05-10 23:51:24 +02:00
scan fix(llm): wire prompt caching through all Anthropic call sites (#90) 2026-05-14 15:36:27 +02:00
search refactor: remove legacy compatibility paths (#64) 2026-05-13 15:55:00 +02:00
skills feat: rename project wiki directory (#66) 2026-05-13 16:05:58 +02:00
sl fix: align KTX agent tools and repair handling (#73) 2026-05-14 00:57:51 +02:00
sql-analysis feat: add sql analysis batch port 2026-05-11 17:03:22 +02:00
test rename klo to ktx 2026-05-10 23:51:24 +02:00
tools refactor: remove legacy compatibility paths (#64) 2026-05-13 15:55:00 +02:00
wiki feat: rename project wiki directory (#66) 2026-05-13 16:05:58 +02:00
index.test.ts rename klo to ktx 2026-05-10 23:51:24 +02:00
index.ts fix(llm): wire prompt caching through all Anthropic call sites (#90) 2026-05-14 15:36:27 +02:00
package-exports.test.ts fix(llm): wire prompt caching through all Anthropic call sites (#90) 2026-05-14 15:36:27 +02:00