diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 430aa729..b3ec6793 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -44,7 +44,7 @@ body: - Connector (SQL Server) - Connector (SQLite) - Python semantic layer - - Python daemon + - KTX daemon - Docs - Other validations: diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 5b2f8502..f4304878 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -24,7 +24,7 @@ body: - Connectors - Context engine - Python semantic layer - - Python daemon + - KTX daemon - Docs - Other validations: diff --git a/AGENTS.md b/AGENTS.md index a5447c9d..f6ce3d98 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -69,7 +69,7 @@ KTX is a pnpm + uv workspace. - LLM package: `packages/llm` - Database connectors: `packages/connector-*` - Python semantic layer: `python/ktx-sl` -- Python daemon: `python/ktx-daemon` +- KTX daemon: `python/ktx-daemon` - Examples and fixtures: `examples/` - Workspace scripts: `scripts/` - Local agent skills and internal planning docs are private overlays. Do not @@ -134,7 +134,7 @@ shared contracts or package exports are affected. test file - TypeScript dead-code tooling/config changes: `pnpm run dead-code` - Python semantic layer: `uv run pytest python/ktx-sl/tests -q` -- Python daemon: `uv run pytest python/ktx-daemon/tests -q` +- KTX daemon: `uv run pytest python/ktx-daemon/tests -q` - Python files: also run `uv run pre-commit run --files [FILES]` when pre-commit is configured diff --git a/codecov.yml b/codecov.yml index 0ff83e2f..a599cd3d 100644 --- a/codecov.yml +++ b/codecov.yml @@ -97,7 +97,7 @@ component_management: paths: - python/ktx-sl/semantic_layer/** - component_id: py_daemon - name: Python daemon + name: KTX daemon paths: - python/ktx-daemon/src/ktx_daemon/** diff --git a/docs-site/content/agents-setup.md b/docs-site/content/agents-setup.md index 24614ea8..4fcaeb3f 100644 --- a/docs-site/content/agents-setup.md +++ b/docs-site/content/agents-setup.md @@ -146,7 +146,7 @@ Success requires (canonical shape - supersedes the example in the docs): Do **not** run `--deep` ingest in this flow - that requires LLM time and is out of scope. -### Optional: directly probe the embeddings daemon +### Optional: directly probe the KTX daemon If the user asks for stronger verification that `sentence-transformers` is actually serving (not just that setup said "ok"), do all of: @@ -155,7 +155,7 @@ If the user asks for stronger verification that `sentence-transformers` is actua 3. `curl -sS http://127.0.0.1:/health` → expect HTTP 200 with `{"status":"healthy",…}`. 4. `curl -sS -X POST http://127.0.0.1:/embeddings/compute -H 'content-type: application/json' -d '{"text":"hello"}'` → expect `{"embedding": [...384 floats...]}`. -Discover the port from setup's log line `Started KTX local embeddings daemon: http://127.0.0.1:` or from the daemon's OpenAPI at `GET /openapi.json`. Note: the routes are `/health` and `/embeddings/compute` - not `/healthz` or `/embeddings`. +Discover the port from setup's log line `Started KTX daemon: http://127.0.0.1:` or from the daemon's OpenAPI at `GET /openapi.json`. Note: the routes are `/health` and `/embeddings/compute` - not `/healthz` or `/embeddings`. ## Phase 6 - Final report @@ -167,7 +167,7 @@ KTX SETUP COMPLETE Project: LLM: / Embeddings: / -Runtime: managed Python ✓ (if sentence-transformers daemon was started) +Runtime: managed Python ✓ (if the KTX daemon was started) Connections: - () status=ok schemas=[…] tables= diff --git a/docs-site/content/docs/cli-reference/ktx-admin.mdx b/docs-site/content/docs/cli-reference/ktx-admin.mdx index c7df5461..966eac5a 100644 --- a/docs-site/content/docs/cli-reference/ktx-admin.mdx +++ b/docs-site/content/docs/cli-reference/ktx-admin.mdx @@ -44,8 +44,8 @@ directory. Use it from any directory to generate editor or agent schema files. | Subcommand | Description | |-----------|-------------| | `install` | Install the bundled Python runtime wheel into the managed runtime | -| `start` | Start the KTX-managed Python HTTP daemon | -| `stop` | Stop the KTX-managed Python HTTP daemon | +| `start` | Start the KTX daemon | +| `stop` | Stop the KTX daemon | | `status` | Show managed Python runtime status and readiness checks | ## `admin runtime` Options diff --git a/docs-site/content/docs/community/contributing.mdx b/docs-site/content/docs/community/contributing.mdx index 63b08cd6..bf66f546 100644 --- a/docs-site/content/docs/community/contributing.mdx +++ b/docs-site/content/docs/community/contributing.mdx @@ -25,7 +25,7 @@ documentation, connector coverage, and examples. | Context engine | `packages/context`, including project config, ingest orchestration, and semantic search | | Connectors | `packages/connector-*`, plus connector-specific tests and integration docs | | Python semantic layer | `python/ktx-sl` for planning and SQL generation | -| Python daemon | `python/ktx-daemon` for the portable runtime API | +| KTX daemon | `python/ktx-daemon` for the portable runtime API | | Documentation | `docs-site/content/docs` for public docs and `docs-site/tests` for docs behavior | ## Development setup diff --git a/examples/README.md b/examples/README.md index e84d9330..f18440b2 100644 --- a/examples/README.md +++ b/examples/README.md @@ -27,7 +27,7 @@ warehouse credential. `postgres-historic/` is a manual Docker-backed smoke for Postgres query-history ingest via `pg_stat_statements`. It verifies setup, staged -query-history artifacts, managed daemon batch SQL analysis, bounded pattern +query-history artifacts, KTX daemon batch SQL analysis, bounded pattern WorkUnit shards, and no-WorkUnit idempotency for unchanged bucketed table inputs and pattern shards. diff --git a/examples/package-artifacts/README.md b/examples/package-artifacts/README.md index ed72f13f..7fa39fb3 100644 --- a/examples/package-artifacts/README.md +++ b/examples/package-artifacts/README.md @@ -14,7 +14,7 @@ generated local project. The managed Python runtime smoke requires `uv` on `PATH`, isolates `KTX_RUNTIME_ROOT`, verifies `ktx admin runtime status`, runs `ktx sl query --yes` to install the core runtime from the bundled wheel, checks `ktx admin runtime status`, -starts and reuses the managed daemon, and stops it. +starts and reuses the KTX daemon, and stops it. The artifact manifest contains the public `@kaelio/ktx` npm tarball and the bundled `kaelio-ktx` runtime wheel. The smoke does not install standalone diff --git a/packages/cli/src/commands/runtime-commands.ts b/packages/cli/src/commands/runtime-commands.ts index 12af875c..ef0d06cc 100644 --- a/packages/cli/src/commands/runtime-commands.ts +++ b/packages/cli/src/commands/runtime-commands.ts @@ -38,7 +38,7 @@ export function registerRuntimeCommands(program: Command, context: KtxCliCommand runtime .command('start') - .description('Start the KTX-managed Python HTTP daemon') + .description('Start the KTX daemon') .addOption(createRuntimeFeatureOption()) .option('--force', 'Restart even when a matching daemon is already running', false) .action(async (options: { feature: RuntimeFeature; force?: boolean }, command: CommandWithGlobalOptions) => { @@ -53,7 +53,7 @@ export function registerRuntimeCommands(program: Command, context: KtxCliCommand runtime .command('stop') - .description('Stop the KTX-managed Python HTTP daemon') + .description('Stop the KTX daemon') .option('--all', 'Stop all KTX daemon processes recorded or discoverable on this machine', false) .action(async (options: { all?: boolean }, command: CommandWithGlobalOptions) => { await runRuntimeArgs(context, { diff --git a/packages/cli/src/context-build-view.ts b/packages/cli/src/context-build-view.ts index 74aee915..7f47e33f 100644 --- a/packages/cli/src/context-build-view.ts +++ b/packages/cli/src/context-build-view.ts @@ -706,7 +706,7 @@ function failedStepDetail(result: KtxPublicIngestTargetResult): string | null { const INTERNAL_FAILURE_LINE_RE = /^(Report|Run|Job|Status|Adapter|Connection|Sync|Mode|Dry run|Diff|Tasks|Work units|Failed tasks|Saved memory|Provenance rows):\s*/; const ACTIONABLE_FAILURE_LINE_RE = - /^(Missing bundled Python runtime manifest|KTX Python runtime is required|KTX managed daemon|Error:|Failed\b|Could not\b|Cannot\b)/; + /^(Missing bundled Python runtime manifest|KTX Python runtime is required|KTX daemon HTTP|Error:|Failed\b|Could not\b|Cannot\b)/; function trimErrorPrefix(line: string): string { return line.replace(/^Error:\s*/, ''); diff --git a/packages/cli/src/ingest.test.ts b/packages/cli/src/ingest.test.ts index 8dbad0e9..d3451e0c 100644 --- a/packages/cli/src/ingest.test.ts +++ b/packages/cli/src/ingest.test.ts @@ -1334,7 +1334,7 @@ describe('runKtxIngest', () => { ); }); - it('passes managed daemon options to adapters and pull-config options when no explicit daemon URL is set', async () => { + it('passes KTX daemon options to adapters and pull-config options when no explicit daemon URL is set', async () => { const projectDir = join(tempDir, 'managed-daemon-ingest-project'); await initKtxProject({ projectDir }); await writeWarehouseConfig(projectDir); diff --git a/packages/cli/src/managed-local-embeddings.test.ts b/packages/cli/src/managed-local-embeddings.test.ts index 85fa00c9..fead0655 100644 --- a/packages/cli/src/managed-local-embeddings.test.ts +++ b/packages/cli/src/managed-local-embeddings.test.ts @@ -117,7 +117,7 @@ describe('managedLocalEmbeddingProjectConfig', () => { }); describe('managedLocalEmbeddingHealthConfig', () => { - it('uses the active managed daemon URL for the immediate health check', () => { + it('uses the active KTX daemon URL for the immediate health check', () => { expect( managedLocalEmbeddingHealthConfig({ baseUrl: 'http://127.0.0.1:61234', @@ -134,7 +134,7 @@ describe('managedLocalEmbeddingHealthConfig', () => { }); describe('ensureManagedLocalEmbeddingsDaemon', () => { - it('ensures the local-embeddings feature and starts the managed daemon', async () => { + it('ensures the local-embeddings feature and starts the KTX daemon', async () => { const io = makeIo(); const ensureRuntime = vi.fn(async () => runtime()); const startDaemon = vi.fn(async () => daemonResult('started')); @@ -169,7 +169,7 @@ describe('ensureManagedLocalEmbeddingsDaemon', () => { features: ['local-embeddings'], force: false, }); - expect(io.stderr()).toContain('Started KTX local embeddings daemon: http://127.0.0.1:61234'); + expect(io.stderr()).toContain('Started KTX daemon: http://127.0.0.1:61234'); }); it('reuses an already running daemon without reporting a new start', async () => { @@ -184,6 +184,6 @@ describe('ensureManagedLocalEmbeddingsDaemon', () => { startDaemon: vi.fn(async () => daemonResult('reused')), }); - expect(io.stderr()).toContain('Using KTX local embeddings daemon: http://127.0.0.1:61234'); + expect(io.stderr()).toContain('Using KTX daemon: http://127.0.0.1:61234'); }); }); diff --git a/packages/cli/src/managed-local-embeddings.ts b/packages/cli/src/managed-local-embeddings.ts index f485a942..d9a1c309 100644 --- a/packages/cli/src/managed-local-embeddings.ts +++ b/packages/cli/src/managed-local-embeddings.ts @@ -89,7 +89,7 @@ export async function ensureManagedLocalEmbeddingsDaemon( }); const verb = daemon.status === 'started' ? 'Started' : 'Using'; - options.io.stderr.write(`${verb} KTX local embeddings daemon: ${daemon.baseUrl}\n`); + options.io.stderr.write(`${verb} KTX daemon: ${daemon.baseUrl}\n`); return { baseUrl: daemon.baseUrl, diff --git a/packages/cli/src/managed-python-daemon.test.ts b/packages/cli/src/managed-python-daemon.test.ts index 8797fb8f..d56a27b1 100644 --- a/packages/cli/src/managed-python-daemon.test.ts +++ b/packages/cli/src/managed-python-daemon.test.ts @@ -125,7 +125,7 @@ function daemonOptionsBase(root: string) { } as const; } -describe('managed Python daemon lifecycle', () => { +describe('KTX daemon lifecycle', () => { let tempDir: string; beforeEach(async () => { diff --git a/packages/cli/src/managed-python-daemon.ts b/packages/cli/src/managed-python-daemon.ts index bcf7b446..e36435c3 100644 --- a/packages/cli/src/managed-python-daemon.ts +++ b/packages/cli/src/managed-python-daemon.ts @@ -325,7 +325,7 @@ async function waitForHealth(input: { return; } lastDetail = finalHealth.detail; - throw new Error(`KTX Python daemon failed to start: ${lastDetail}. stderr: ${input.state.stderrLog}`); + throw new Error(`KTX daemon failed to start: ${lastDetail}. stderr: ${input.state.stderrLog}`); } async function removeState(layout: ManagedPythonDaemonLayout): Promise { @@ -705,7 +705,7 @@ export async function startManagedPythonDaemon( ); child.unref(); if (!child.pid) { - throw new Error(`KTX Python daemon did not report a pid. stderr: ${layout.daemonStderrPath}`); + throw new Error(`KTX daemon did not report a pid. stderr: ${layout.daemonStderrPath}`); } const state: ManagedPythonDaemonState = { schemaVersion: 1, diff --git a/packages/cli/src/managed-python-http.test.ts b/packages/cli/src/managed-python-http.test.ts index 84d70cf8..73cae844 100644 --- a/packages/cli/src/managed-python-http.test.ts +++ b/packages/cli/src/managed-python-http.test.ts @@ -57,7 +57,7 @@ describe('createManagedPythonDaemonBaseUrlResolver', () => { features: ['core'], force: false, }); - expect(testIo.stderr()).toContain('Started KTX Python daemon: http://127.0.0.1:61234'); + expect(testIo.stderr()).toContain('Started KTX daemon: http://127.0.0.1:61234'); }); it('reports daemon reuse without reinstalling after the first resolved URL', async () => { @@ -86,7 +86,7 @@ describe('createManagedPythonDaemonBaseUrlResolver', () => { expect(ensureRuntime).toHaveBeenCalledTimes(1); expect(startDaemon).toHaveBeenCalledTimes(1); - expect(testIo.stderr()).toContain('Using existing KTX Python daemon: http://127.0.0.1:61234'); + expect(testIo.stderr()).toContain('Using existing KTX daemon: http://127.0.0.1:61234'); }); }); @@ -104,8 +104,8 @@ describe('createManagedDaemonHttpJsonRunner', () => { }); }); -describe('managed daemon ingest ports', () => { - it('creates a Looker table parser backed by the managed daemon runner', async () => { +describe('KTX daemon ingest ports', () => { + it('creates a Looker table parser backed by the KTX daemon runner', async () => { const requestJson = vi.fn(async () => ({ results: { 'model.explore': { @@ -135,7 +135,7 @@ describe('managed daemon ingest ports', () => { }); }); - it('creates a SQL analysis port backed by the managed daemon runner', async () => { + it('creates a SQL analysis port backed by the KTX daemon runner', async () => { const requestJson = vi.fn(async () => ({ fingerprint: 'select-orders', normalized_sql: 'SELECT * FROM public.orders WHERE id = ?', @@ -157,7 +157,7 @@ describe('managed daemon ingest ports', () => { }); }); - it('routes SQL batch analysis through the managed daemon runner', async () => { + it('routes SQL batch analysis through the KTX daemon runner', async () => { const requestJson = vi.fn(async () => ({ results: { orders: { diff --git a/packages/cli/src/managed-python-http.ts b/packages/cli/src/managed-python-http.ts index 8496a9c9..e45caabb 100644 --- a/packages/cli/src/managed-python-http.ts +++ b/packages/cli/src/managed-python-http.ts @@ -70,7 +70,7 @@ function normalizedBaseUrl(baseUrl: string): string { function parseJsonObject(raw: string, path: string): Record { const parsed = JSON.parse(raw) as unknown; if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) { - throw new Error(`KTX managed daemon HTTP ${path} returned non-object JSON`); + throw new Error(`KTX daemon HTTP ${path} returned non-object JSON`); } return parsed as Record; } @@ -101,7 +101,7 @@ export async function postManagedDaemonJson( const text = Buffer.concat(chunks).toString('utf8'); const statusCode = response.statusCode ?? 0; if (statusCode < 200 || statusCode >= 300) { - reject(new Error(`KTX managed daemon HTTP ${path} failed with ${statusCode}: ${text}`)); + reject(new Error(`KTX daemon HTTP ${path} failed with ${statusCode}: ${text}`)); return; } try { @@ -142,7 +142,7 @@ export function createManagedPythonDaemonBaseUrlResolver( force: false, }); const verb = daemon.status === 'started' ? 'Started' : 'Using existing'; - options.io.stderr.write(`${verb} KTX Python daemon: ${daemon.baseUrl}\n`); + options.io.stderr.write(`${verb} KTX daemon: ${daemon.baseUrl}\n`); cachedBaseUrl = daemon.baseUrl; return cachedBaseUrl; }; diff --git a/packages/cli/src/public-ingest.ts b/packages/cli/src/public-ingest.ts index 2c0a2856..3b49f629 100644 --- a/packages/cli/src/public-ingest.ts +++ b/packages/cli/src/public-ingest.ts @@ -679,7 +679,7 @@ function createCapturedPublicIngestIo(): CapturedPublicIngestIo { const INTERNAL_STATUS_LINE_RE = /^(Report|Run|Job|Status|Adapter|Connection|Sync|Diff|Tasks|Work units|Failed tasks|Saved memory|Provenance rows):\s*/; const ACTIONABLE_FAILURE_LINE_RE = - /^(Missing bundled Python runtime manifest|KTX Python runtime is required|KTX managed daemon|Error:|Failed\b|Could not\b|Cannot\b)/; + /^(Missing bundled Python runtime manifest|KTX Python runtime is required|KTX daemon HTTP|Error:|Failed\b|Could not\b|Cannot\b)/; const RUNTIME_BACKED_RETRY_LINE_RE = /^Then retry the runtime-backed KTX command\.?$/; function trimErrorPrefix(line: string): string { diff --git a/packages/cli/src/runtime-requirements.ts b/packages/cli/src/runtime-requirements.ts index 1e35d90e..8594de7a 100644 --- a/packages/cli/src/runtime-requirements.ts +++ b/packages/cli/src/runtime-requirements.ts @@ -94,7 +94,7 @@ export function resolveProjectRuntimeRequirements( requirements.push({ feature: 'core', reason: 'database-introspection', - detail: 'Database introspection fallback uses the Python daemon.', + detail: 'Database introspection fallback uses the KTX daemon.', }); } diff --git a/packages/cli/src/runtime.test.ts b/packages/cli/src/runtime.test.ts index e4a7883f..266359e4 100644 --- a/packages/cli/src/runtime.test.ts +++ b/packages/cli/src/runtime.test.ts @@ -109,7 +109,7 @@ describe('runKtxRuntime', () => { expect(io.stderr()).toBe(''); }); - it('starts the managed Python daemon and prints the base URL', async () => { + it('starts the KTX daemon and prints the base URL', async () => { const io = makeIo(); const deps: KtxRuntimeDeps = { startDaemon: vi.fn(async (): Promise => ({ @@ -160,14 +160,14 @@ describe('runKtxRuntime', () => { features: ['local-embeddings'], force: true, }); - expect(io.stdout()).toContain('Started KTX Python daemon'); + expect(io.stdout()).toContain('Started KTX daemon'); expect(io.stdout()).toContain('url: http://127.0.0.1:61234'); expect(io.stdout()).toContain('pid: 4242'); expect(io.stdout()).toContain('features: core, local-embeddings'); expect(io.stdout()).toContain('stderr: /work/proj/.ktx/runtime/daemon.stderr.log'); }); - it('stops the managed Python daemon', async () => { + it('stops the KTX daemon', async () => { const io = makeIo(); const deps: KtxRuntimeDeps = { stopDaemon: vi.fn(async (): Promise => ({ @@ -208,11 +208,11 @@ describe('runKtxRuntime', () => { ).resolves.toBe(0); expect(deps.stopDaemon).toHaveBeenCalledWith({ cliVersion: '0.2.0', projectDir: '/work/proj' }); - expect(io.stdout()).toContain('Stopped KTX Python daemon'); + expect(io.stdout()).toContain('Stopped KTX daemon'); expect(io.stdout()).toContain('pid: 4242'); }); - it('stops all discovered Python daemons and reports the summary', async () => { + it('stops all discovered KTX daemons and reports the summary', async () => { const io = makeIo(); const deps: KtxRuntimeDeps = { stopAllDaemons: vi.fn(async (): Promise => ({ @@ -231,7 +231,7 @@ describe('runKtxRuntime', () => { ).resolves.toBe(0); expect(deps.stopAllDaemons).toHaveBeenCalledWith({ cliVersion: '0.2.0', projectDir: '/work/proj' }); - expect(io.stdout()).toContain('Stopped 2 KTX Python daemons'); + expect(io.stdout()).toContain('Stopped 2 KTX daemons'); expect(io.stdout()).toContain('pid: 4242 source: state url: http://127.0.0.1:61234'); expect(io.stdout()).toContain('pid: 5252 source: process url: http://127.0.0.1:8765'); }); @@ -259,7 +259,7 @@ describe('runKtxRuntime', () => { runKtxRuntime({ command: 'stop', cliVersion: '0.2.0', projectDir: '/work/proj', all: true }, io.io, deps), ).resolves.toBe(1); - expect(io.stderr()).toContain('Stopped 0 KTX Python daemons; failed 1'); + expect(io.stderr()).toContain('Stopped 0 KTX daemons; failed 1'); expect(io.stderr()).toContain('pid: 4242 source: state url: http://127.0.0.1:61234'); expect(io.stderr()).toContain('process scan: ps failed'); }); diff --git a/packages/cli/src/runtime.ts b/packages/cli/src/runtime.ts index 5630163f..ad978bd5 100644 --- a/packages/cli/src/runtime.ts +++ b/packages/cli/src/runtime.ts @@ -56,7 +56,7 @@ function writeInstallResult(io: KtxCliIo, result: ManagedPythonRuntimeInstallRes function writeDaemonStart(io: KtxCliIo, result: ManagedPythonDaemonStartResult): void { const verb = result.status === 'reused' ? 'Using existing' : 'Started'; - io.stdout.write(`${verb} KTX Python daemon\n`); + io.stdout.write(`${verb} KTX daemon\n`); io.stdout.write(`url: ${result.baseUrl}\n`); io.stdout.write(`pid: ${result.state.pid}\n`); io.stdout.write(`version: ${result.state.version}\n`); @@ -68,10 +68,10 @@ function writeDaemonStart(io: KtxCliIo, result: ManagedPythonDaemonStartResult): function writeDaemonStop(io: KtxCliIo, result: ManagedPythonDaemonStopResult): void { if (result.status === 'already-stopped') { - io.stdout.write('KTX Python daemon already stopped\n'); + io.stdout.write('KTX daemon already stopped\n'); return; } - io.stdout.write('Stopped KTX Python daemon\n'); + io.stdout.write('Stopped KTX daemon\n'); io.stdout.write(`pid: ${result.state?.pid ?? 'unknown'}\n`); io.stdout.write(`state: ${result.layout.daemonStatePath}\n`); } @@ -94,11 +94,11 @@ function writeDaemonStopAll(io: KtxCliIo, result: ManagedPythonDaemonStopAllResu result.failed.length === 0 && result.scanErrors.length === 0 ) { - io.stdout.write('No KTX Python daemons found\n'); + io.stdout.write('No KTX daemons found\n'); return 0; } if (failed === 0) { - io.stdout.write(`Stopped ${result.stopped.length} KTX Python daemons\n`); + io.stdout.write(`Stopped ${result.stopped.length} KTX daemons\n`); if (result.stale.length > 0) { io.stdout.write(`Cleaned ${result.stale.length} stale daemon states\n`); } @@ -111,7 +111,7 @@ function writeDaemonStopAll(io: KtxCliIo, result: ManagedPythonDaemonStopAllResu return 0; } io.stderr.write( - `Stopped ${result.stopped.length} KTX Python daemons; failed ${result.failed.length}${ + `Stopped ${result.stopped.length} KTX daemons; failed ${result.failed.length}${ result.stale.length > 0 ? `; cleaned stale ${result.stale.length}` : '' }\n`, ); diff --git a/packages/cli/src/scan.test.ts b/packages/cli/src/scan.test.ts index 8fa51130..9863be12 100644 --- a/packages/cli/src/scan.test.ts +++ b/packages/cli/src/scan.test.ts @@ -376,7 +376,7 @@ describe('runKtxScan', () => { expect(io.stdout()).not.toContain('/~'); }); - it('passes managed daemon options to local ingest adapters when no explicit daemon URL is set', async () => { + it('passes KTX daemon options to local ingest adapters when no explicit daemon URL is set', async () => { await initKtxProject({ projectDir: tempDir }); const createLocalIngestAdapters = vi.fn(() => []); const runLocalScan = vi.fn( diff --git a/packages/cli/src/setup-embeddings.test.ts b/packages/cli/src/setup-embeddings.test.ts index 36df256a..cbbb5562 100644 --- a/packages/cli/src/setup-embeddings.test.ts +++ b/packages/cli/src/setup-embeddings.test.ts @@ -361,7 +361,7 @@ describe('setup embeddings step', () => { ); expect(result.status).toBe('failed'); - expect(io.stderr()).toContain('Recent local embeddings daemon stderr:'); + expect(io.stderr()).toContain('Recent KTX daemon stderr:'); expect(io.stderr()).toContain('daemon traceback line 6'); expect(io.stderr()).toContain('daemon traceback line 45'); expect(io.stderr()).not.toContain('daemon traceback line 5'); @@ -391,7 +391,7 @@ describe('setup embeddings step', () => { ); expect(result.status).toBe('failed'); - expect(io.stderr()).not.toContain('Recent local embeddings daemon stderr:'); + expect(io.stderr()).not.toContain('Recent KTX daemon stderr:'); }); it('uses fixed OpenAI defaults and only asks for credentials when OpenAI is selected', async () => { diff --git a/packages/cli/src/setup-embeddings.ts b/packages/cli/src/setup-embeddings.ts index 442b67bc..a114d3ac 100644 --- a/packages/cli/src/setup-embeddings.ts +++ b/packages/cli/src/setup-embeddings.ts @@ -312,7 +312,7 @@ function localEmbeddingSetupMessage(message: string, stderrTail: string[] = []): 'The first run may download Python packages and the all-MiniLM-L6-v2 model.', ]; if (stderrTail.length > 0) { - lines.push('Recent local embeddings daemon stderr:', ...stderrTail); + lines.push('Recent KTX daemon stderr:', ...stderrTail); } return lines.join('\n'); } diff --git a/packages/cli/src/setup-runtime.test.ts b/packages/cli/src/setup-runtime.test.ts index 1d739423..b1e3411f 100644 --- a/packages/cli/src/setup-runtime.test.ts +++ b/packages/cli/src/setup-runtime.test.ts @@ -97,7 +97,7 @@ describe('runKtxSetupRuntimeStep', () => { expect(io.stderr()).toContain('ktx admin runtime install --yes'); }); - it('starts the managed local embeddings daemon for configured sentence-transformers embeddings', async () => { + it('starts the KTX daemon for configured sentence-transformers embeddings', async () => { const io = makeIo(); const ensureLocalEmbeddings = vi.fn(async () => ({ baseUrl: 'http://127.0.0.1:61234', diff --git a/scripts/local-embeddings-runtime-smoke.mjs b/scripts/local-embeddings-runtime-smoke.mjs index 6c9c6ed0..6b1787be 100644 --- a/scripts/local-embeddings-runtime-smoke.mjs +++ b/scripts/local-embeddings-runtime-smoke.mjs @@ -346,7 +346,7 @@ export async function runLocalEmbeddingsRuntimeSmoke(options = {}) { 900_000, ); validateEmbeddingResponse(embeddingResponse, 384); - process.stdout.write('KTX local embeddings daemon computed a 384-dimensional embedding\n'); + process.stdout.write('KTX daemon computed a 384-dimensional embedding\n'); const setup = await run(commands[5].command, commands[5].args, { cwd: installDir, @@ -369,7 +369,7 @@ export async function runLocalEmbeddingsRuntimeSmoke(options = {}) { }); requireSuccess(commands[6].label, stop); daemonStarted = false; - requireOutput(commands[6].label, stop, /Stopped KTX Python daemon/); + requireOutput(commands[6].label, stop, /Stopped KTX daemon/); process.stdout.write('KTX local embeddings runtime smoke verified\n'); } finally { diff --git a/scripts/local-embeddings-runtime-smoke.test.mjs b/scripts/local-embeddings-runtime-smoke.test.mjs index 1b5cbfdd..ca14e0df 100644 --- a/scripts/local-embeddings-runtime-smoke.test.mjs +++ b/scripts/local-embeddings-runtime-smoke.test.mjs @@ -129,13 +129,13 @@ describe('localEmbeddingsSmokeCommands', () => { describe('parseDaemonBaseUrl', () => { it('extracts the daemon URL from runtime start output', () => { assert.equal( - parseDaemonBaseUrl('Started KTX Python daemon\nurl: http://127.0.0.1:61234\nfeatures: local-embeddings\n'), + parseDaemonBaseUrl('Started KTX daemon\nurl: http://127.0.0.1:61234\nfeatures: local-embeddings\n'), 'http://127.0.0.1:61234', ); }); it('rejects output without a daemon URL', () => { - assert.throws(() => parseDaemonBaseUrl('Started KTX Python daemon\n'), /Daemon URL was not printed/); + assert.throws(() => parseDaemonBaseUrl('Started KTX daemon\n'), /Daemon URL was not printed/); }); }); diff --git a/scripts/package-artifacts.mjs b/scripts/package-artifacts.mjs index 96a04bf0..18a098bb 100644 --- a/scripts/package-artifacts.mjs +++ b/scripts/package-artifacts.mjs @@ -804,19 +804,19 @@ try { const runtimeStart = await run('pnpm', ['exec', 'ktx', 'admin', 'runtime', 'start']); requireSuccess('ktx admin runtime start', runtimeStart); daemonStarted = true; - requireOutput('ktx admin runtime start', runtimeStart, /Started KTX Python daemon/); + requireOutput('ktx admin runtime start', runtimeStart, /Started KTX daemon/); requireOutput('ktx admin runtime start', runtimeStart, /url: http:\\/\\/127\\.0\\.0\\.1:\\d+/); requireOutput('ktx admin runtime start', runtimeStart, /features: core/); const runtimeStartReuse = await run('pnpm', ['exec', 'ktx', 'admin', 'runtime', 'start']); requireSuccess('ktx admin runtime start reuse', runtimeStartReuse); - requireOutput('ktx admin runtime start reuse', runtimeStartReuse, /Using existing KTX Python daemon/); + requireOutput('ktx admin runtime start reuse', runtimeStartReuse, /Using existing KTX daemon/); requireOutput('ktx admin runtime start reuse', runtimeStartReuse, /features: core/); const runtimeStop = await run('pnpm', ['exec', 'ktx', 'admin', 'runtime', 'stop']); requireSuccess('ktx admin runtime stop', runtimeStop); daemonStarted = false; - requireOutput('ktx admin runtime stop', runtimeStop, /Stopped KTX Python daemon/); + requireOutput('ktx admin runtime stop', runtimeStop, /Stopped KTX daemon/); process.stdout.write('ktx admin runtime daemon lifecycle verified\\n'); const structuralScan = await run('pnpm', ['exec', 'ktx', 'ingest', 'warehouse', diff --git a/scripts/package-artifacts.test.mjs b/scripts/package-artifacts.test.mjs index 384eeb65..0104b836 100644 --- a/scripts/package-artifacts.test.mjs +++ b/scripts/package-artifacts.test.mjs @@ -502,7 +502,7 @@ describe('verification snippets', () => { assert.match(source, /status: ready/); assert.match(source, /ktx admin runtime start/); assert.match(source, /ktx admin runtime start reuse/); - assert.match(source, /Using existing KTX Python daemon/); + assert.match(source, /Using existing KTX daemon/); assert.match(source, /ktx admin runtime stop/); assert.doesNotMatch(source, /ktx admin runtime prune/); assert.doesNotMatch(source, /staleRuntimeDir/);