diff --git a/README.md b/README.md index 82dc880c..7a70cd3e 100644 --- a/README.md +++ b/README.md @@ -206,8 +206,14 @@ npx ktx runtime status npx ktx runtime doctor npx ktx runtime start npx ktx runtime stop +npx ktx runtime prune --dry-run +npx ktx runtime prune --yes ``` +Use `runtime prune --dry-run` to preview stale runtime directories from older +CLI versions. Add `--yes` to remove those stale directories after daemon +processes are stopped. + Commands such as `npx @kaelio/ktx sl query ... --yes` can install the core runtime lazily from the bundled wheel. Local embeddings remain lazy; prepare them only when you select local `sentence-transformers` embeddings: diff --git a/examples/package-artifacts/README.md b/examples/package-artifacts/README.md index dc4cdcbe..bd5704db 100644 --- a/examples/package-artifacts/README.md +++ b/examples/package-artifacts/README.md @@ -14,7 +14,9 @@ generated local project. The managed Python runtime smoke isolates `KTX_RUNTIME_ROOT`, verifies `ktx runtime status`, runs `ktx sl query --yes` to install the core runtime from the bundled wheel, checks `ktx runtime doctor`, starts and reuses the managed -daemon, and stops it. +daemon, stops it, previews a stale runtime with `ktx runtime prune --dry-run`, +verifies confirmation is required, and removes the stale runtime with +`ktx runtime prune --yes`. The Python smoke project still installs the Python artifacts directly because it verifies the standalone Python distributions that feed the bundled runtime diff --git a/scripts/examples-docs.test.mjs b/scripts/examples-docs.test.mjs index 16b97ad1..671ec89a 100644 --- a/scripts/examples-docs.test.mjs +++ b/scripts/examples-docs.test.mjs @@ -146,6 +146,8 @@ describe('standalone example docs', () => { assert.match(rootReadme, /ktx runtime doctor/); assert.match(rootReadme, /ktx runtime start/); assert.match(rootReadme, /ktx runtime stop/); + assert.match(rootReadme, /ktx runtime prune --dry-run/); + assert.match(rootReadme, /ktx runtime prune --yes/); assert.match(rootReadme, /ktx serve --mcp stdio/); assert.doesNotMatch(rootReadme, /uv run ktx-daemon serve-http/); assert.doesNotMatch(rootReadme, /--semantic-compute-url http:\/\/127\.0\.0\.1:8765/); @@ -158,6 +160,8 @@ describe('standalone example docs', () => { assert.match(readme, /managed Python runtime/); assert.match(readme, /ktx runtime status/); assert.match(readme, /ktx runtime doctor/); + assert.match(readme, /ktx runtime prune --dry-run/); + assert.match(readme, /ktx runtime prune --yes/); assert.doesNotMatch(readme, /@ktx\/context/); assert.doesNotMatch(readme, /@ktx\/cli/); assert.doesNotMatch(readme, /python -m ktx_daemon semantic-validate/);