mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-19 08:28:06 +02:00
feat(cli): self-provision pinned uv and defer MCP Python runtime install (#297)
Fixes a production crash-loop (PostHog issue 019eb68e): ktx mcp start --foreground on a uv-less container eagerly installed the managed Python runtime at boot, failed, and was restarted by its supervisor every ~62s (122 exceptions from one install). - MCP server factory now wires a lazy semantic-layer compute port that defers the runtime install to the first call, mirroring the already-lazy SQL-analysis port; the server boots and serves non-Python tools without the runtime. - ktx no longer requires uv on PATH: it downloads its own pinned, sha256-verified uv build under the runtime root (KTX_RUNTIME_ROOT aware), always musl-static on Linux. PATH uv is never consulted. - uv is acquired before the version dir is wiped, so a failed download cannot destroy an existing runtime. - Acquisition failures (offline, intercepted download, unsupported platform) throw KtxExpectedError and stay out of Error Tracking; a missing binary inside a checksum-verified archive remains a plain Error. - scripts/refresh-uv-manifest.mjs regenerates the pinned manifest (packages/cli/src/managed-uv-release.ts) on uv bumps. - Setup consent prompt now discloses the uv download; docs updated.
This commit is contained in:
parent
663eaff940
commit
feb0818444
11 changed files with 731 additions and 72 deletions
|
|
@ -48,6 +48,11 @@ directory. Use it from any directory to generate editor or agent schema files.
|
|||
| `stop` | Stop the **ktx** daemon |
|
||||
| `status` | Show managed Python runtime status and readiness checks |
|
||||
|
||||
`install` is self-contained: **ktx** downloads its own pinned, checksum-verified
|
||||
`uv` build under the runtime root and uses it to provision Python and the
|
||||
runtime wheel. Nothing needs to be installed on `PATH` first; the host only
|
||||
needs network access to `github.com` during the first install.
|
||||
|
||||
## `admin runtime` Options
|
||||
|
||||
| Flag | Description | Default |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue