ktx/python/ktx-daemon
semantic-release-bot 48676c74fa chore(release): 0.10.0 [skip ci]
## [0.10.0](https://github.com/Kaelio/ktx/compare/v0.9.0...v0.10.0) (2026-06-08)

### Features

* add GitHub star nudges to CLI build view and docs sidebar ([#271](https://github.com/Kaelio/ktx/issues/271)) ([795a974](795a97485a))
* **cli:** add channel-aware update notifier ([#265](https://github.com/Kaelio/ktx/issues/265)) ([698efdc](698efdcef8))
* **cli:** add ingest LLM rate-limit governor with paced retries ([#261](https://github.com/Kaelio/ktx/issues/261)) ([c3d8ced](c3d8cedb0b))
* **mysql:** implement columnStats using INFORMATION_SCHEMA.STATISTICS ([#233](https://github.com/Kaelio/ktx/issues/233)) ([18245c2](18245c2373))
* **setup:** apply per-role LLM model presets, remove --llm-model ([#268](https://github.com/Kaelio/ktx/issues/268)) ([2c18a62](2c18a62de4))
* **setup:** wizard prompt tweaks and quieter query-history filter output ([#259](https://github.com/Kaelio/ktx/issues/259)) ([c2beaf7](c2beaf7d55))
* **telemetry:** collect PostHog $exception error reports in CLI and daemon ([#262](https://github.com/Kaelio/ktx/issues/262)) ([fb7b94b](fb7b94b60e))

### Bug Fixes

* **docs-site:** stop doubling the /ktx basePath on alias-host redirects ([#263](https://github.com/Kaelio/ktx/issues/263)) ([d3e20df](d3e20df1d5))
* **ingest:** drive work-unit progress from tool calls, not turn counts ([#269](https://github.com/Kaelio/ktx/issues/269)) ([2896f9f](2896f9fb91))
* **sl:** stop baking drift-prone counts into overlay summaries ([#270](https://github.com/Kaelio/ktx/issues/270)) ([5232578](5232578d44))
* **telemetry:** preserve driver error class and code in connection_test ([#260](https://github.com/Kaelio/ktx/issues/260)) ([ec7edf8](ec7edf8f50))

### Documentation

* add serving-phase diagram to the introduction page ([#264](https://github.com/Kaelio/ktx/issues/264)) ([377f21a](377f21acd7))
* minor README and docs-site touch-ups ([#266](https://github.com/Kaelio/ktx/issues/266)) ([bf1fe97](bf1fe9748e))
* **site:** add Products dropdown to ktx docs navbar ([#267](https://github.com/Kaelio/ktx/issues/267)) ([dc39eb7](dc39eb7ef9))

### Other Changes

* refresh star history chart [skip ci] ([0d0ea55](0d0ea55184))
* refresh star history chart [skip ci] ([2914407](2914407f09))
* refresh star history chart [skip ci] ([d142274](d14227468b))
* refresh star history chart [skip ci] ([5a88210](5a8821073b))
* refresh star history chart [skip ci] ([8eb1cd3](8eb1cd3e79))
2026-06-08 14:47:15 +00:00
..
src/ktx_daemon feat(telemetry): collect PostHog $exception error reports in CLI and daemon (#262) 2026-06-05 19:36:21 +02:00
tests feat(telemetry): collect PostHog $exception error reports in CLI and daemon (#262) 2026-06-05 19:36:21 +02:00
pyproject.toml chore(release): 0.10.0 [skip ci] 2026-06-08 14:47:15 +00:00
README.md chore(workspace): gate dead-code with knip production mode (#196) 2026-05-21 15:28:58 +02:00

ktx-daemon

ktx-daemon is the portable Python compute package for KTX.

It supports portable compute in two modes:

  • One-shot commands, used by default by the @kaelio/ktx CLI.
  • An explicit HTTP server for long-running local MCP sessions.

One-shot semantic query

printf '%s\n' '{"sources":[],"query":{"measures":[],"dimensions":[]},"dialect":"postgres"}' \
  | ktx-daemon semantic-query

One-shot source generation

Generate semantic-layer sources from schema scan data:

printf '%s\n' '{"tables":[{"name":"orders","db":"public","columns":[{"name":"id","type":"integer","primary_key":true}]}],"links":[],"dialect":"postgres"}' \
  | ktx-daemon semantic-generate-sources

One-shot database introspection

Introspect a Postgres database schema:

printf '%s\n' '{"connection_id":"warehouse","driver":"postgres","url":"postgresql://readonly@example.test/warehouse","schemas":["public"]}' \
  | ktx-daemon database-introspect

One-shot LookML parsing

Parse LookML projects into resolved, KSL-ready structures:

printf '%s\n' '{"files":[{"path":"views/orders.view.lkml","content":"view: orders { sql_table_name: public.orders ;; measure: order_count { type: count } }"}],"dialect":"postgres"}' \
  | ktx-daemon lookml-parse

One-shot embeddings

Compute text embeddings locally:

printf '%s\n' '{"text":"hello"}' \
  | ktx-daemon embedding-compute

Compute text embeddings locally in bulk:

printf '%s\n' '{"texts":["hello","world"]}' \
  | ktx-daemon embedding-compute-bulk

One-shot code execution

Execute Python code with the current in-process boundary:

printf '%s\n' '{"code":"result = 1 + 2"}' \
  | ktx-daemon code-execute

HTTP compute server

Start the HTTP compute server with code execution disabled:

ktx-daemon serve-http --host 127.0.0.1 --port 8765

Enable HTTP code execution explicitly:

ktx-daemon serve-http --host 127.0.0.1 --port 8765 --enable-code-execution

Available HTTP endpoints:

  • GET /health
  • POST /database/introspect
  • POST /embeddings/compute
  • POST /embeddings/compute-bulk
  • POST /lookml/parse
  • POST /semantic-layer/generate-sources
  • POST /semantic-layer/query
  • POST /semantic-layer/validate
  • POST /code/execute when --enable-code-execution is passed

The HTTP server exposes Postgres database introspection, LookML parsing, local embedding compute, and semantic-layer compute for source generation, query compilation, and validation. Code execution is off by default. When enabled, it runs Python exec in the daemon process with the same in-process boundary as the one-shot code-execute command and does not provide OS-level sandboxing.

HTTP code execution uses the standalone KTX boundary. It does not forward caller authorization headers to a host app and does not connect scratchpad or visualization helpers to host application APIs.