mirror of
https://github.com/Kaelio/ktx.git
synced 2026-07-04 10:52:13 +02:00
refactor: enforce ktx naming and AGENTS.md compliance sweep (#289)
Align the tree with AGENTS.md/CLAUDE.md conventions: - Rewrite user-facing strings, docs, and tests to lowercase `ktx` (no bare uppercase `KTX` tokens remain outside literal identifiers). - Drop the legacy `historicSql` migration path and its now-unused helpers, per the no-backward-compat rule. - Remove `as unknown as` / `any` casts: narrow `BaseTool` generics to `z.ZodObject`, add a typed `createLookerClient`, and delete the dead `getParametersSchema`/`toAnthropicFormat` pre-AI-SDK helpers. - Use `InvalidArgumentError` for Commander parse failures. - Finish the adapter→connector prose conversion in the `ktx.yaml` docs while keeping the literal `adapters` config key.
This commit is contained in:
parent
005c5fc860
commit
00cdf2de90
237 changed files with 844 additions and 974 deletions
|
|
@ -17,7 +17,7 @@ describe('memory-flow acceptance scenarios', () => {
|
|||
it('renders a completed replay with a clear saved-memory completion line', () => {
|
||||
const output = renderScenario(successfulReplayScenario());
|
||||
|
||||
expect(output).toContain('KTX memory flow warehouse/metricflow done');
|
||||
expect(output).toContain('ktx memory flow warehouse/metricflow done');
|
||||
expect(output).toContain('Saved 3 memories from 4 raw files: 2 wiki pages, 1 SL updates.');
|
||||
expect(output).toContain('Commit: abc12345 Run: run-success Report: ingest-report.json');
|
||||
});
|
||||
|
|
@ -48,7 +48,7 @@ describe('memory-flow acceptance scenarios', () => {
|
|||
it('renders no ANSI color codes in the text fallback for terminals without color support', () => {
|
||||
const output = renderScenario(successfulReplayScenario(), 80);
|
||||
|
||||
expect(output).toContain('KTX memory flow warehouse/metricflow done');
|
||||
expect(output).toContain('ktx memory flow warehouse/metricflow done');
|
||||
expect(output).not.toMatch(/\u001b\[[0-9;]*m/);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import type { MemoryFlowInteractionState, MemoryFlowViewModel } from '../../../.
|
|||
|
||||
function view(): MemoryFlowViewModel {
|
||||
return {
|
||||
title: 'KTX memory flow warehouse/metricflow running',
|
||||
title: 'ktx memory flow warehouse/metricflow running',
|
||||
subtitle: 'Run run-1 Sync sync-1',
|
||||
status: 'running',
|
||||
activeLine: 'active: WorkUnit orders step 2/4',
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import type { MemoryFlowViewModel } from '../../../../src/context/ingest/memory-
|
|||
|
||||
function view(): MemoryFlowViewModel {
|
||||
return {
|
||||
title: 'KTX memory flow warehouse/metricflow done',
|
||||
title: 'ktx memory flow warehouse/metricflow done',
|
||||
subtitle: 'Run run-1 Sync sync-1',
|
||||
status: 'done',
|
||||
activeLine: 'active: complete',
|
||||
|
|
@ -128,7 +128,7 @@ describe('renderMemoryFlowInteractive', () => {
|
|||
|
||||
const output = renderMemoryFlowInteractive(view(), state, { terminalWidth: 140 });
|
||||
|
||||
expect(output).toContain('KTX memory flow warehouse/metricflow done');
|
||||
expect(output).toContain('ktx memory flow warehouse/metricflow done');
|
||||
expect(output).toContain('OK SOURCE -> OK CHUNKS -> !! WORKUNITS -> OK ACTIONS -> !! GATES -> OK SAVED');
|
||||
expect(output).toContain('[WORKUNITS]');
|
||||
expect(output).toContain('> orders');
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { renderMemoryFlowReplay } from '../../../../src/context/ingest/memory-fl
|
|||
|
||||
function view(): MemoryFlowViewModel {
|
||||
return {
|
||||
title: 'KTX memory flow warehouse/metricflow done',
|
||||
title: 'ktx memory flow warehouse/metricflow done',
|
||||
subtitle: 'Run run-1 Sync sync-1',
|
||||
status: 'done',
|
||||
activeLine: 'active: complete',
|
||||
|
|
@ -79,7 +79,7 @@ describe('renderMemoryFlowReplay', () => {
|
|||
'OK SOURCE -> OK CHUNKS -> !! WORKUNITS -> OK ACTIONS -> !! GATES -> OK SAVED',
|
||||
);
|
||||
expect(renderMemoryFlowReplay(view(), { terminalWidth: 140 })).toMatchInlineSnapshot(`
|
||||
"KTX memory flow warehouse/metricflow done
|
||||
"ktx memory flow warehouse/metricflow done
|
||||
active: complete
|
||||
Run run-1 Sync sync-1
|
||||
OK SOURCE -> OK CHUNKS -> !! WORKUNITS -> OK ACTIONS -> !! GATES -> OK SAVED
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ describe('buildMemoryFlowViewModel', () => {
|
|||
it('builds six readable columns from replay events', () => {
|
||||
const view = buildMemoryFlowViewModel(replayInput());
|
||||
|
||||
expect(view.title).toBe('KTX memory flow warehouse/metricflow done');
|
||||
expect(view.title).toBe('ktx memory flow warehouse/metricflow done');
|
||||
expect(view.activeLine).toBe('active: complete');
|
||||
expect(view.columns.map((column) => column.id)).toEqual([
|
||||
'source',
|
||||
|
|
@ -179,7 +179,7 @@ describe('buildMemoryFlowViewModel', () => {
|
|||
details: { actions: [], provenance: [], transcripts: [] },
|
||||
});
|
||||
|
||||
expect(view.title).toBe('KTX memory flow Warehouse + dbt + BI + Docs done');
|
||||
expect(view.title).toBe('ktx memory flow Warehouse + dbt + BI + Docs done');
|
||||
expect(view.columns.find((column) => column.id === 'source')?.counters[0]).toBe('Warehouse, dbt, BI, Docs');
|
||||
expect(view.completionLine).toContain('Saved 16 memories from 29 raw files');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ function viewWithStatuses(statuses: Array<'waiting' | 'active' | 'complete' | 'w
|
|||
const ids = ['source', 'chunks', 'workUnits', 'actions', 'gates', 'saved'] as const;
|
||||
|
||||
return {
|
||||
title: 'KTX memory flow warehouse/metricflow running',
|
||||
title: 'ktx memory flow warehouse/metricflow running',
|
||||
subtitle: 'Run run-1 Sync sync-1',
|
||||
status: 'running',
|
||||
activeLine: 'active: WorkUnit orders',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue