@kaelio/ktx 0.0.0 → 0.1.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/assets/demo/orbit/demo.db +0 -0
- package/assets/demo/orbit/links/provenance.json +209 -0
- package/assets/demo/orbit/manifest.json +58 -0
- package/assets/demo/orbit/raw-sources/bi/account_retention.view.lkml +67 -0
- package/assets/demo/orbit/raw-sources/bi/arr_daily.view.lkml +28 -0
- package/assets/demo/orbit/raw-sources/bi/customer_health.view.lkml +50 -0
- package/assets/demo/orbit/raw-sources/bi/procurement_activity.view.lkml +46 -0
- package/assets/demo/orbit/raw-sources/bi/retention_exec_q1.dashboard.lookml +28 -0
- package/assets/demo/orbit/raw-sources/bi/revenue_daily.view.lkml +52 -0
- package/assets/demo/orbit/raw-sources/bi/revenue_exec.dashboard.lookml +28 -0
- package/assets/demo/orbit/raw-sources/dbt/dbt_project.yml +10 -0
- package/assets/demo/orbit/raw-sources/dbt/models/marts/mart_arr_daily.sql +5 -0
- package/assets/demo/orbit/raw-sources/dbt/models/marts/mart_customer_health.sql +10 -0
- package/assets/demo/orbit/raw-sources/dbt/models/marts/mart_revenue_daily.sql +8 -0
- package/assets/demo/orbit/raw-sources/dbt/schema.yml +455 -0
- package/assets/demo/orbit/raw-sources/dbt/sources.yml +48 -0
- package/assets/demo/orbit/raw-sources/notion/activation-policy-decision-record.md +49 -0
- package/assets/demo/orbit/raw-sources/notion/analyst-onboarding.md +35 -0
- package/assets/demo/orbit/raw-sources/notion/arr-and-contract-reporting-notes.md +64 -0
- package/assets/demo/orbit/raw-sources/notion/customer-health-playbook.md +55 -0
- package/assets/demo/orbit/raw-sources/notion/retention-and-nrr-definition-notes.md +58 -0
- package/assets/demo/orbit/raw-sources/notion/revenue-reporting-policy.md +64 -0
- package/assets/demo/orbit/raw-sources/notion/sales-ops-segmentation-guide.md +58 -0
- package/assets/demo/orbit/raw-sources/notion/support-escalation-runbook.md +38 -0
- package/assets/demo/orbit/raw-sources/warehouse/accounts.csv +211 -0
- package/assets/demo/orbit/raw-sources/warehouse/arr_movements.csv +721 -0
- package/assets/demo/orbit/raw-sources/warehouse/contracts.csv +321 -0
- package/assets/demo/orbit/raw-sources/warehouse/invoices.csv +3001 -0
- package/assets/demo/orbit/raw-sources/warehouse/plans.csv +5 -0
- package/assets/demo/orbit/raw-sources/warehouse/purchase_requests.csv +5201 -0
- package/assets/demo/orbit/raw-sources/warehouse/support_tickets.csv +521 -0
- package/assets/demo/orbit/raw-sources/warehouse/users.csv +1261 -0
- package/assets/demo/orbit/replay.memory-flow.v1.json +707 -0
- package/assets/demo/orbit/reports/seeded-demo-report.json +40 -0
- package/assets/demo/orbit/semantic-layer/.gitkeep +0 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/int_activation_policy_windows.yaml +27 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/int_active_contract_arr.yaml +24 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/int_customer_health_signals.yaml +25 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/int_parent_account_arr_movements.yaml +49 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/int_procurement_qualifying_actions.yaml +27 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/int_revenue_components.yaml +37 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/mart_account_activity.yaml +23 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/mart_account_segments.yaml +27 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/mart_arr_daily.yaml +20 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/mart_customer_health.yaml +30 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/mart_nrr_quarterly.yaml +22 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/mart_procurement_activity.yaml +24 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/mart_retention_movement_breakout.yaml +31 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/mart_revenue_daily.yaml +37 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/stg_account_hierarchy.yaml +25 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/stg_account_owners.yaml +33 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/stg_accounts.yaml +25 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/stg_activation_events.yaml +33 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/stg_approval_events.yaml +25 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/stg_arr_movements.yaml +29 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/stg_contract_discount_terms.yaml +25 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/stg_contracts.yaml +29 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/stg_invoice_line_items.yaml +25 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/stg_invoices.yaml +33 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/stg_plan_segment_mapping.yaml +33 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/stg_plans.yaml +17 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/stg_purchase_orders.yaml +29 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/stg_purchase_requests.yaml +29 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/stg_refunds.yaml +29 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/stg_sessions.yaml +25 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/stg_subscriptions.yaml +25 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/stg_supplier_onboarding_events.yaml +29 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/stg_suppliers.yaml +21 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/stg_support_tickets.yaml +29 -0
- package/assets/demo/orbit/semantic-layer/dbt-main/stg_users.yaml +21 -0
- package/assets/demo/orbit/semantic-layer/postgres-warehouse/_schema/orbit_analytics.yaml +1400 -0
- package/assets/demo/orbit/semantic-layer/postgres-warehouse/_schema/orbit_raw.yaml +989 -0
- package/assets/demo/orbit/semantic-layer/postgres-warehouse/large_contract_requesters.yaml +44 -0
- package/assets/demo/orbit/semantic-layer/postgres-warehouse/mart_account_activity.yaml +10 -0
- package/assets/demo/orbit/semantic-layer/postgres-warehouse/mart_account_segments.yaml +18 -0
- package/assets/demo/orbit/semantic-layer/postgres-warehouse/mart_arr_daily.yaml +10 -0
- package/assets/demo/orbit/semantic-layer/postgres-warehouse/mart_customer_health.yaml +27 -0
- package/assets/demo/orbit/semantic-layer/postgres-warehouse/mart_nrr_quarterly.yaml +19 -0
- package/assets/demo/orbit/semantic-layer/postgres-warehouse/mart_procurement_activity.yaml +13 -0
- package/assets/demo/orbit/semantic-layer/postgres-warehouse/mart_retention_movement_breakout.yaml +25 -0
- package/assets/demo/orbit/semantic-layer/postgres-warehouse/mart_revenue_daily.yaml +20 -0
- package/assets/demo/orbit/wiki/global/.gitkeep +0 -0
- package/assets/demo/orbit/wiki/global/customer-communication-policy.md +44 -0
- package/assets/demo/orbit/wiki/global/new-hire-onboarding-policy.md +47 -0
- package/assets/demo/orbit/wiki/global/orbit-activation-kpi-glossary.md +64 -0
- package/assets/demo/orbit/wiki/global/orbit-activation-policy-change-jan-2026.md +46 -0
- package/assets/demo/orbit/wiki/global/orbit-arr-contract-first-definition.md +39 -0
- package/assets/demo/orbit/wiki/global/orbit-company-overview.md +71 -0
- package/assets/demo/orbit/wiki/global/orbit-customer-health-risk-definition.md +46 -0
- package/assets/demo/orbit/wiki/global/orbit-customer-stakeholder-needs.md +42 -0
- package/assets/demo/orbit/wiki/global/orbit-customers-source.md +60 -0
- package/assets/demo/orbit/wiki/global/orbit-dbt-exposures.md +44 -0
- package/assets/demo/orbit/wiki/global/orbit-dbt-project-overview.md +54 -0
- package/assets/demo/orbit/wiki/global/orbit-how-we-work.md +75 -0
- package/assets/demo/orbit/wiki/global/orbit-known-product-gaps.md +47 -0
- package/assets/demo/orbit/wiki/global/orbit-mart-account-activity.md +49 -0
- package/assets/demo/orbit/wiki/global/orbit-mart-account-segments.md +55 -0
- package/assets/demo/orbit/wiki/global/orbit-mart-arr-daily.md +46 -0
- package/assets/demo/orbit/wiki/global/orbit-mart-nrr-quarterly.md +55 -0
- package/assets/demo/orbit/wiki/global/orbit-mart-procurement-activity.md +47 -0
- package/assets/demo/orbit/wiki/global/orbit-mart-retention-movement-breakout.md +55 -0
- package/assets/demo/orbit/wiki/global/orbit-mart-revenue-daily.md +56 -0
- package/assets/demo/orbit/wiki/global/orbit-metabase-sql-library-patterns.md +71 -0
- package/assets/demo/orbit/wiki/global/orbit-nrr-discount-expiration-treatment.md +47 -0
- package/assets/demo/orbit/wiki/global/orbit-plan-segment-normalization.md +49 -0
- package/assets/demo/orbit/wiki/global/orbit-procurement-qualifying-actions.md +46 -0
- package/assets/demo/orbit/wiki/global/orbit-product-design-principles.md +43 -0
- package/assets/demo/orbit/wiki/global/orbit-product-review-checklist.md +44 -0
- package/assets/demo/orbit/wiki/global/orbit-revenue-gross-to-net-reconciliation.md +50 -0
- package/assets/demo/orbit/wiki/global/sales-ops-cs-handoff-process.md +58 -0
- package/assets/python/kaelio_ktx-0.1.0-py3-none-any.whl +0 -0
- package/assets/python/manifest.json +11 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +7 -0
- package/dist/clack.d.ts +26 -0
- package/dist/clack.js +45 -0
- package/dist/claude-code-prompt-caching.d.ts +4 -0
- package/dist/claude-code-prompt-caching.js +22 -0
- package/dist/cli-program.d.ts +53 -0
- package/dist/cli-program.js +372 -0
- package/dist/cli-program.test.d.ts +1 -0
- package/dist/cli-program.test.js +45 -0
- package/dist/cli-runtime.d.ts +46 -0
- package/dist/cli-runtime.js +44 -0
- package/dist/command-schemas.d.ts +34 -0
- package/dist/command-schemas.js +32 -0
- package/dist/command-tree.d.ts +10 -0
- package/dist/command-tree.js +41 -0
- package/dist/command-tree.test.d.ts +1 -0
- package/dist/command-tree.test.js +126 -0
- package/dist/commands/connection-commands.d.ts +3 -0
- package/dist/commands/connection-commands.js +46 -0
- package/dist/commands/ingest-commands.d.ts +9 -0
- package/dist/commands/ingest-commands.js +65 -0
- package/dist/commands/knowledge-commands.d.ts +3 -0
- package/dist/commands/knowledge-commands.js +57 -0
- package/dist/commands/mcp-commands.d.ts +3 -0
- package/dist/commands/mcp-commands.js +117 -0
- package/dist/commands/mcp-commands.test.d.ts +1 -0
- package/dist/commands/mcp-commands.test.js +47 -0
- package/dist/commands/runtime-commands.d.ts +3 -0
- package/dist/commands/runtime-commands.js +68 -0
- package/dist/commands/setup-commands.d.ts +3 -0
- package/dist/commands/setup-commands.js +347 -0
- package/dist/commands/sl-commands.d.ts +3 -0
- package/dist/commands/sl-commands.js +130 -0
- package/dist/commands/status-commands.d.ts +3 -0
- package/dist/commands/status-commands.js +47 -0
- package/dist/connection.d.ts +28 -0
- package/dist/connection.js +258 -0
- package/dist/connection.test.d.ts +1 -0
- package/dist/connection.test.js +405 -0
- package/dist/context-build-view.d.ts +106 -0
- package/dist/context-build-view.js +868 -0
- package/dist/context-build-view.test.d.ts +1 -0
- package/dist/context-build-view.test.js +927 -0
- package/dist/database-tree-picker.d.ts +24 -0
- package/dist/database-tree-picker.js +134 -0
- package/dist/database-tree-picker.test.d.ts +1 -0
- package/dist/database-tree-picker.test.js +135 -0
- package/dist/demo-assets.d.ts +17 -0
- package/dist/demo-assets.js +150 -0
- package/dist/demo-assets.test.d.ts +1 -0
- package/dist/demo-assets.test.js +95 -0
- package/dist/demo-metrics.d.ts +35 -0
- package/dist/demo-metrics.js +131 -0
- package/dist/demo-metrics.test.d.ts +1 -0
- package/dist/demo-metrics.test.js +108 -0
- package/dist/dev.d.ts +3 -0
- package/dist/dev.js +48 -0
- package/dist/dev.test.d.ts +1 -0
- package/dist/dev.test.js +169 -0
- package/dist/doctor.d.ts +72 -0
- package/dist/doctor.js +460 -0
- package/dist/doctor.test.d.ts +1 -0
- package/dist/doctor.test.js +604 -0
- package/dist/example-smoke.test.d.ts +1 -0
- package/dist/example-smoke.test.js +83 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +12 -0
- package/dist/index.test.d.ts +1 -0
- package/dist/index.test.js +1213 -0
- package/dist/ingest-depth.d.ts +8 -0
- package/dist/ingest-depth.js +58 -0
- package/dist/ingest-query-executor.d.ts +9 -0
- package/dist/ingest-query-executor.js +30 -0
- package/dist/ingest-query-executor.test.d.ts +1 -0
- package/dist/ingest-query-executor.test.js +71 -0
- package/dist/ingest-report-file.d.ts +2 -0
- package/dist/ingest-report-file.js +20 -0
- package/dist/ingest-report-file.test.d.ts +1 -0
- package/dist/ingest-report-file.test.js +63 -0
- package/dist/ingest-viz.test.d.ts +1 -0
- package/dist/ingest-viz.test.js +691 -0
- package/dist/ingest.d.ts +64 -0
- package/dist/ingest.js +561 -0
- package/dist/ingest.test-utils.d.ts +119 -0
- package/dist/ingest.test-utils.js +625 -0
- package/dist/ingest.test.d.ts +1 -0
- package/dist/ingest.test.js +1302 -0
- package/dist/io/logger.d.ts +11 -0
- package/dist/io/logger.js +22 -0
- package/dist/io/logger.test.d.ts +1 -0
- package/dist/io/logger.test.js +55 -0
- package/dist/io/mode.d.ts +9 -0
- package/dist/io/mode.js +28 -0
- package/dist/io/mode.test.d.ts +1 -0
- package/dist/io/mode.test.js +48 -0
- package/dist/io/print-list.d.ts +42 -0
- package/dist/io/print-list.js +192 -0
- package/dist/io/print-list.test.d.ts +1 -0
- package/dist/io/print-list.test.js +275 -0
- package/dist/io/symbols.d.ts +10 -0
- package/dist/io/symbols.js +33 -0
- package/dist/knowledge.d.ts +23 -0
- package/dist/knowledge.js +86 -0
- package/dist/knowledge.test.d.ts +1 -0
- package/dist/knowledge.test.js +113 -0
- package/dist/local-adapters.d.ts +13 -0
- package/dist/local-adapters.js +295 -0
- package/dist/local-adapters.test.d.ts +1 -0
- package/dist/local-adapters.test.js +162 -0
- package/dist/local-scan-connectors.d.ts +3 -0
- package/dist/local-scan-connectors.js +54 -0
- package/dist/local-scan-connectors.test.d.ts +1 -0
- package/dist/local-scan-connectors.test.js +92 -0
- package/dist/managed-local-embeddings.d.ts +38 -0
- package/dist/managed-local-embeddings.js +49 -0
- package/dist/managed-local-embeddings.test.d.ts +1 -0
- package/dist/managed-local-embeddings.test.js +161 -0
- package/dist/managed-mcp-daemon.d.ts +73 -0
- package/dist/managed-mcp-daemon.js +183 -0
- package/dist/managed-mcp-daemon.test.d.ts +1 -0
- package/dist/managed-mcp-daemon.test.js +104 -0
- package/dist/managed-python-command.d.ts +29 -0
- package/dist/managed-python-command.js +77 -0
- package/dist/managed-python-command.test.d.ts +1 -0
- package/dist/managed-python-command.test.js +206 -0
- package/dist/managed-python-daemon.d.ts +112 -0
- package/dist/managed-python-daemon.js +585 -0
- package/dist/managed-python-daemon.test.d.ts +1 -0
- package/dist/managed-python-daemon.test.js +340 -0
- package/dist/managed-python-http.d.ts +39 -0
- package/dist/managed-python-http.js +110 -0
- package/dist/managed-python-http.test.d.ts +1 -0
- package/dist/managed-python-http.test.js +177 -0
- package/dist/managed-python-runtime.d.ts +122 -0
- package/dist/managed-python-runtime.js +313 -0
- package/dist/managed-python-runtime.test.d.ts +1 -0
- package/dist/managed-python-runtime.test.js +396 -0
- package/dist/mcp-http-server.d.ts +43 -0
- package/dist/mcp-http-server.js +270 -0
- package/dist/mcp-http-server.test.d.ts +1 -0
- package/dist/mcp-http-server.test.js +209 -0
- package/dist/memory-flow-hud.d.ts +32 -0
- package/dist/memory-flow-hud.js +219 -0
- package/dist/memory-flow-interactive.d.ts +29 -0
- package/dist/memory-flow-interactive.js +94 -0
- package/dist/memory-flow-interactive.test.d.ts +1 -0
- package/dist/memory-flow-interactive.test.js +109 -0
- package/dist/memory-flow-tui.d.ts +76 -0
- package/dist/memory-flow-tui.js +343 -0
- package/dist/memory-flow-tui.test.d.ts +1 -0
- package/dist/memory-flow-tui.test.js +247 -0
- package/dist/next-steps.d.ts +36 -0
- package/dist/next-steps.js +67 -0
- package/dist/next-steps.test.d.ts +1 -0
- package/dist/next-steps.test.js +75 -0
- package/dist/notion-page-picker.d.ts +35 -0
- package/dist/notion-page-picker.js +208 -0
- package/dist/notion-page-picker.test.d.ts +1 -0
- package/dist/notion-page-picker.test.js +244 -0
- package/dist/print-command-tree.d.ts +4 -0
- package/dist/print-command-tree.js +31 -0
- package/dist/print-command-tree.test.d.ts +1 -0
- package/dist/print-command-tree.test.js +37 -0
- package/dist/project-dir.test.d.ts +1 -0
- package/dist/project-dir.test.js +124 -0
- package/dist/project-resolver.d.ts +7 -0
- package/dist/project-resolver.js +42 -0
- package/dist/project-resolver.test.d.ts +1 -0
- package/dist/project-resolver.test.js +49 -0
- package/dist/prompt-navigation.d.ts +6 -0
- package/dist/prompt-navigation.js +60 -0
- package/dist/prompt-navigation.test.d.ts +1 -0
- package/dist/prompt-navigation.test.js +33 -0
- package/dist/public-ingest-copy.d.ts +3 -0
- package/dist/public-ingest-copy.js +32 -0
- package/dist/public-ingest-copy.test.d.ts +1 -0
- package/dist/public-ingest-copy.test.js +24 -0
- package/dist/public-ingest.d.ts +111 -0
- package/dist/public-ingest.js +546 -0
- package/dist/public-ingest.test.d.ts +1 -0
- package/dist/public-ingest.test.js +737 -0
- package/dist/runtime.d.ts +44 -0
- package/dist/runtime.js +151 -0
- package/dist/runtime.test.d.ts +1 -0
- package/dist/runtime.test.js +380 -0
- package/dist/scan.d.ts +34 -0
- package/dist/scan.js +275 -0
- package/dist/scan.test.d.ts +1 -0
- package/dist/scan.test.js +983 -0
- package/dist/setup-agents.d.ts +87 -0
- package/dist/setup-agents.js +471 -0
- package/dist/setup-agents.test.d.ts +1 -0
- package/dist/setup-agents.test.js +352 -0
- package/dist/setup-context.d.ts +86 -0
- package/dist/setup-context.js +553 -0
- package/dist/setup-context.test.d.ts +1 -0
- package/dist/setup-context.test.js +490 -0
- package/dist/setup-database-context-depth.d.ts +22 -0
- package/dist/setup-database-context-depth.js +83 -0
- package/dist/setup-databases.d.ts +82 -0
- package/dist/setup-databases.js +1858 -0
- package/dist/setup-databases.test.d.ts +1 -0
- package/dist/setup-databases.test.js +1883 -0
- package/dist/setup-demo-tour.d.ts +33 -0
- package/dist/setup-demo-tour.js +302 -0
- package/dist/setup-demo-tour.test.d.ts +1 -0
- package/dist/setup-demo-tour.test.js +221 -0
- package/dist/setup-embeddings.d.ts +57 -0
- package/dist/setup-embeddings.js +347 -0
- package/dist/setup-embeddings.test.d.ts +1 -0
- package/dist/setup-embeddings.test.js +379 -0
- package/dist/setup-interrupt.d.ts +15 -0
- package/dist/setup-interrupt.js +71 -0
- package/dist/setup-interrupt.test.d.ts +1 -0
- package/dist/setup-interrupt.test.js +77 -0
- package/dist/setup-models.d.ts +90 -0
- package/dist/setup-models.js +760 -0
- package/dist/setup-models.test.d.ts +1 -0
- package/dist/setup-models.test.js +857 -0
- package/dist/setup-project.d.ts +45 -0
- package/dist/setup-project.js +289 -0
- package/dist/setup-project.test.d.ts +1 -0
- package/dist/setup-project.test.js +229 -0
- package/dist/setup-prompts.d.ts +54 -0
- package/dist/setup-prompts.js +88 -0
- package/dist/setup-prompts.test.d.ts +1 -0
- package/dist/setup-prompts.test.js +170 -0
- package/dist/setup-ready-menu.d.ts +18 -0
- package/dist/setup-ready-menu.js +31 -0
- package/dist/setup-ready-menu.test.d.ts +1 -0
- package/dist/setup-ready-menu.test.js +41 -0
- package/dist/setup-secrets.d.ts +7 -0
- package/dist/setup-secrets.js +15 -0
- package/dist/setup-secrets.test.d.ts +1 -0
- package/dist/setup-secrets.test.js +30 -0
- package/dist/setup-sources.d.ts +105 -0
- package/dist/setup-sources.js +1606 -0
- package/dist/setup-sources.test.d.ts +1 -0
- package/dist/setup-sources.test.js +1277 -0
- package/dist/setup.d.ts +130 -0
- package/dist/setup.js +478 -0
- package/dist/setup.test.d.ts +1 -0
- package/dist/setup.test.js +1478 -0
- package/dist/skills/research/SKILL.md +49 -0
- package/dist/sl.d.ts +60 -0
- package/dist/sl.js +167 -0
- package/dist/sl.test.d.ts +1 -0
- package/dist/sl.test.js +452 -0
- package/dist/source-mapping.d.ts +26 -0
- package/dist/source-mapping.js +151 -0
- package/dist/standalone-smoke.test.d.ts +1 -0
- package/dist/standalone-smoke.test.js +247 -0
- package/dist/startup-profile.d.ts +3 -0
- package/dist/startup-profile.js +44 -0
- package/dist/status-project.d.ts +118 -0
- package/dist/status-project.js +723 -0
- package/dist/text-ingest.d.ts +29 -0
- package/dist/text-ingest.js +270 -0
- package/dist/text-ingest.test.d.ts +1 -0
- package/dist/text-ingest.test.js +247 -0
- package/dist/tree-picker-state.d.ts +73 -0
- package/dist/tree-picker-state.js +416 -0
- package/dist/tree-picker-state.test.d.ts +1 -0
- package/dist/tree-picker-state.test.js +303 -0
- package/dist/tree-picker-tui.d.ts +78 -0
- package/dist/tree-picker-tui.js +226 -0
- package/dist/tree-picker-tui.test.d.ts +1 -0
- package/dist/tree-picker-tui.test.js +248 -0
- package/dist/viz-fallback.d.ts +28 -0
- package/dist/viz-fallback.js +51 -0
- package/dist/viz-fallback.test.d.ts +1 -0
- package/dist/viz-fallback.test.js +77 -0
- package/node_modules/@ktx/connector-bigquery/dist/connector.d.ts +141 -0
- package/node_modules/@ktx/connector-bigquery/dist/connector.js +371 -0
- package/node_modules/@ktx/connector-bigquery/dist/connector.test.d.ts +1 -0
- package/node_modules/@ktx/connector-bigquery/dist/connector.test.js +247 -0
- package/node_modules/@ktx/connector-bigquery/dist/dialect.d.ts +29 -0
- package/node_modules/@ktx/connector-bigquery/dist/dialect.js +178 -0
- package/node_modules/@ktx/connector-bigquery/dist/dialect.test.d.ts +1 -0
- package/node_modules/@ktx/connector-bigquery/dist/dialect.test.js +36 -0
- package/node_modules/@ktx/connector-bigquery/dist/index.d.ts +3 -0
- package/node_modules/@ktx/connector-bigquery/dist/index.js +3 -0
- package/node_modules/@ktx/connector-bigquery/dist/live-database-introspection.d.ts +10 -0
- package/node_modules/@ktx/connector-bigquery/dist/live-database-introspection.js +20 -0
- package/node_modules/@ktx/connector-bigquery/dist/package-exports.test.d.ts +1 -0
- package/node_modules/@ktx/connector-bigquery/dist/package-exports.test.js +10 -0
- package/node_modules/@ktx/connector-bigquery/package.json +20 -0
- package/node_modules/@ktx/connector-clickhouse/dist/connector.d.ts +113 -0
- package/node_modules/@ktx/connector-clickhouse/dist/connector.js +345 -0
- package/node_modules/@ktx/connector-clickhouse/dist/connector.test.d.ts +1 -0
- package/node_modules/@ktx/connector-clickhouse/dist/connector.test.js +228 -0
- package/node_modules/@ktx/connector-clickhouse/dist/dialect.d.ts +33 -0
- package/node_modules/@ktx/connector-clickhouse/dist/dialect.js +236 -0
- package/node_modules/@ktx/connector-clickhouse/dist/dialect.test.d.ts +1 -0
- package/node_modules/@ktx/connector-clickhouse/dist/dialect.test.js +36 -0
- package/node_modules/@ktx/connector-clickhouse/dist/index.d.ts +3 -0
- package/node_modules/@ktx/connector-clickhouse/dist/index.js +3 -0
- package/node_modules/@ktx/connector-clickhouse/dist/live-database-introspection.d.ts +11 -0
- package/node_modules/@ktx/connector-clickhouse/dist/live-database-introspection.js +21 -0
- package/node_modules/@ktx/connector-clickhouse/dist/package-exports.test.d.ts +1 -0
- package/node_modules/@ktx/connector-clickhouse/dist/package-exports.test.js +10 -0
- package/node_modules/@ktx/connector-clickhouse/package.json +20 -0
- package/node_modules/@ktx/connector-mysql/dist/connector.d.ts +116 -0
- package/node_modules/@ktx/connector-mysql/dist/connector.js +385 -0
- package/node_modules/@ktx/connector-mysql/dist/connector.test.d.ts +1 -0
- package/node_modules/@ktx/connector-mysql/dist/connector.test.js +218 -0
- package/node_modules/@ktx/connector-mysql/dist/dialect.d.ts +29 -0
- package/node_modules/@ktx/connector-mysql/dist/dialect.js +171 -0
- package/node_modules/@ktx/connector-mysql/dist/dialect.test.d.ts +1 -0
- package/node_modules/@ktx/connector-mysql/dist/dialect.test.js +36 -0
- package/node_modules/@ktx/connector-mysql/dist/index.d.ts +3 -0
- package/node_modules/@ktx/connector-mysql/dist/index.js +3 -0
- package/node_modules/@ktx/connector-mysql/dist/live-database-introspection.d.ts +11 -0
- package/node_modules/@ktx/connector-mysql/dist/live-database-introspection.js +21 -0
- package/node_modules/@ktx/connector-mysql/dist/package-exports.test.d.ts +1 -0
- package/node_modules/@ktx/connector-mysql/dist/package-exports.test.js +11 -0
- package/node_modules/@ktx/connector-mysql/package.json +20 -0
- package/node_modules/@ktx/connector-postgres/dist/connector.d.ts +140 -0
- package/node_modules/@ktx/connector-postgres/dist/connector.js +497 -0
- package/node_modules/@ktx/connector-postgres/dist/connector.test.d.ts +1 -0
- package/node_modules/@ktx/connector-postgres/dist/connector.test.js +336 -0
- package/node_modules/@ktx/connector-postgres/dist/dialect.d.ts +29 -0
- package/node_modules/@ktx/connector-postgres/dist/dialect.js +182 -0
- package/node_modules/@ktx/connector-postgres/dist/dialect.test.d.ts +1 -0
- package/node_modules/@ktx/connector-postgres/dist/dialect.test.js +37 -0
- package/node_modules/@ktx/connector-postgres/dist/historic-sql-query-client.d.ts +14 -0
- package/node_modules/@ktx/connector-postgres/dist/historic-sql-query-client.js +24 -0
- package/node_modules/@ktx/connector-postgres/dist/historic-sql-query-client.test.d.ts +1 -0
- package/node_modules/@ktx/connector-postgres/dist/historic-sql-query-client.test.js +45 -0
- package/node_modules/@ktx/connector-postgres/dist/index.d.ts +4 -0
- package/node_modules/@ktx/connector-postgres/dist/index.js +4 -0
- package/node_modules/@ktx/connector-postgres/dist/live-database-introspection.d.ts +11 -0
- package/node_modules/@ktx/connector-postgres/dist/live-database-introspection.js +21 -0
- package/node_modules/@ktx/connector-postgres/dist/package-exports.test.d.ts +1 -0
- package/node_modules/@ktx/connector-postgres/dist/package-exports.test.js +12 -0
- package/node_modules/@ktx/connector-postgres/package.json +20 -0
- package/node_modules/@ktx/connector-snowflake/dist/connector.d.ts +129 -0
- package/node_modules/@ktx/connector-snowflake/dist/connector.js +517 -0
- package/node_modules/@ktx/connector-snowflake/dist/connector.test.d.ts +1 -0
- package/node_modules/@ktx/connector-snowflake/dist/connector.test.js +210 -0
- package/node_modules/@ktx/connector-snowflake/dist/dialect.d.ts +29 -0
- package/node_modules/@ktx/connector-snowflake/dist/dialect.js +156 -0
- package/node_modules/@ktx/connector-snowflake/dist/dialect.test.d.ts +1 -0
- package/node_modules/@ktx/connector-snowflake/dist/dialect.test.js +34 -0
- package/node_modules/@ktx/connector-snowflake/dist/index.d.ts +3 -0
- package/node_modules/@ktx/connector-snowflake/dist/index.js +3 -0
- package/node_modules/@ktx/connector-snowflake/dist/live-database-introspection.d.ts +11 -0
- package/node_modules/@ktx/connector-snowflake/dist/live-database-introspection.js +21 -0
- package/node_modules/@ktx/connector-snowflake/dist/package-exports.test.d.ts +1 -0
- package/node_modules/@ktx/connector-snowflake/dist/package-exports.test.js +10 -0
- package/node_modules/@ktx/connector-snowflake/package.json +20 -0
- package/node_modules/@ktx/connector-sqlite/dist/connector.d.ts +59 -0
- package/node_modules/@ktx/connector-sqlite/dist/connector.js +251 -0
- package/node_modules/@ktx/connector-sqlite/dist/connector.test.d.ts +1 -0
- package/node_modules/@ktx/connector-sqlite/dist/connector.test.js +196 -0
- package/node_modules/@ktx/connector-sqlite/dist/dialect.d.ts +29 -0
- package/node_modules/@ktx/connector-sqlite/dist/dialect.js +146 -0
- package/node_modules/@ktx/connector-sqlite/dist/dialect.test.d.ts +1 -0
- package/node_modules/@ktx/connector-sqlite/dist/dialect.test.js +23 -0
- package/node_modules/@ktx/connector-sqlite/dist/index.d.ts +3 -0
- package/node_modules/@ktx/connector-sqlite/dist/index.js +3 -0
- package/node_modules/@ktx/connector-sqlite/dist/live-database-introspection.d.ts +8 -0
- package/node_modules/@ktx/connector-sqlite/dist/live-database-introspection.js +20 -0
- package/node_modules/@ktx/connector-sqlite/dist/package-exports.test.d.ts +1 -0
- package/node_modules/@ktx/connector-sqlite/dist/package-exports.test.js +11 -0
- package/node_modules/@ktx/connector-sqlite/package.json +20 -0
- package/node_modules/@ktx/connector-sqlserver/dist/connector.d.ts +137 -0
- package/node_modules/@ktx/connector-sqlserver/dist/connector.js +503 -0
- package/node_modules/@ktx/connector-sqlserver/dist/connector.test.d.ts +1 -0
- package/node_modules/@ktx/connector-sqlserver/dist/connector.test.js +269 -0
- package/node_modules/@ktx/connector-sqlserver/dist/dialect.d.ts +30 -0
- package/node_modules/@ktx/connector-sqlserver/dist/dialect.js +169 -0
- package/node_modules/@ktx/connector-sqlserver/dist/dialect.test.d.ts +1 -0
- package/node_modules/@ktx/connector-sqlserver/dist/dialect.test.js +36 -0
- package/node_modules/@ktx/connector-sqlserver/dist/index.d.ts +3 -0
- package/node_modules/@ktx/connector-sqlserver/dist/index.js +3 -0
- package/node_modules/@ktx/connector-sqlserver/dist/live-database-introspection.d.ts +11 -0
- package/node_modules/@ktx/connector-sqlserver/dist/live-database-introspection.js +21 -0
- package/node_modules/@ktx/connector-sqlserver/dist/package-exports.test.d.ts +1 -0
- package/node_modules/@ktx/connector-sqlserver/dist/package-exports.test.js +10 -0
- package/node_modules/@ktx/connector-sqlserver/package.json +20 -0
- package/node_modules/@ktx/context/dist/agent/agent-runner.service.d.ts +18 -0
- package/node_modules/@ktx/context/dist/agent/agent-runner.service.js +10 -0
- package/node_modules/@ktx/context/dist/agent/agent-runner.service.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/agent/agent-runner.service.test.js +308 -0
- package/node_modules/@ktx/context/dist/agent/index.d.ts +2 -0
- package/node_modules/@ktx/context/dist/agent/index.js +1 -0
- package/node_modules/@ktx/context/dist/connections/connection-type.d.ts +25 -0
- package/node_modules/@ktx/context/dist/connections/connection-type.js +24 -0
- package/node_modules/@ktx/context/dist/connections/dialects.d.ts +9 -0
- package/node_modules/@ktx/context/dist/connections/dialects.js +71 -0
- package/node_modules/@ktx/context/dist/connections/dialects.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/connections/dialects.test.js +24 -0
- package/node_modules/@ktx/context/dist/connections/index.d.ts +11 -0
- package/node_modules/@ktx/context/dist/connections/index.js +9 -0
- package/node_modules/@ktx/context/dist/connections/local-query-executor.d.ts +6 -0
- package/node_modules/@ktx/context/dist/connections/local-query-executor.js +21 -0
- package/node_modules/@ktx/context/dist/connections/local-query-executor.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/connections/local-query-executor.test.js +48 -0
- package/node_modules/@ktx/context/dist/connections/local-warehouse-descriptor.d.ts +20 -0
- package/node_modules/@ktx/context/dist/connections/local-warehouse-descriptor.js +72 -0
- package/node_modules/@ktx/context/dist/connections/local-warehouse-descriptor.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/connections/local-warehouse-descriptor.test.js +53 -0
- package/node_modules/@ktx/context/dist/connections/notion-config.d.ts +41 -0
- package/node_modules/@ktx/context/dist/connections/notion-config.js +132 -0
- package/node_modules/@ktx/context/dist/connections/notion-config.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/connections/notion-config.test.js +121 -0
- package/node_modules/@ktx/context/dist/connections/postgres-query-executor.d.ts +25 -0
- package/node_modules/@ktx/context/dist/connections/postgres-query-executor.js +53 -0
- package/node_modules/@ktx/context/dist/connections/postgres-query-executor.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/connections/postgres-query-executor.test.js +91 -0
- package/node_modules/@ktx/context/dist/connections/query-executor.d.ts +19 -0
- package/node_modules/@ktx/context/dist/connections/query-executor.js +3 -0
- package/node_modules/@ktx/context/dist/connections/read-only-sql.d.ts +2 -0
- package/node_modules/@ktx/context/dist/connections/read-only-sql.js +19 -0
- package/node_modules/@ktx/context/dist/connections/read-only-sql.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/connections/read-only-sql.test.js +20 -0
- package/node_modules/@ktx/context/dist/connections/sqlite-query-executor.d.ts +3 -0
- package/node_modules/@ktx/context/dist/connections/sqlite-query-executor.js +73 -0
- package/node_modules/@ktx/context/dist/connections/sqlite-query-executor.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/connections/sqlite-query-executor.test.js +113 -0
- package/node_modules/@ktx/context/dist/core/config-reference.d.ts +2 -0
- package/node_modules/@ktx/context/dist/core/config-reference.js +29 -0
- package/node_modules/@ktx/context/dist/core/config-reference.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/core/config-reference.test.js +27 -0
- package/node_modules/@ktx/context/dist/core/config.d.ts +25 -0
- package/node_modules/@ktx/context/dist/core/config.js +14 -0
- package/node_modules/@ktx/context/dist/core/embedding.d.ts +5 -0
- package/node_modules/@ktx/context/dist/core/embedding.js +1 -0
- package/node_modules/@ktx/context/dist/core/file-store.d.ts +30 -0
- package/node_modules/@ktx/context/dist/core/file-store.js +1 -0
- package/node_modules/@ktx/context/dist/core/git-env.d.ts +2 -0
- package/node_modules/@ktx/context/dist/core/git-env.js +26 -0
- package/node_modules/@ktx/context/dist/core/git.service.assert-worktree-clean.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/core/git.service.assert-worktree-clean.test.js +62 -0
- package/node_modules/@ktx/context/dist/core/git.service.d.ts +194 -0
- package/node_modules/@ktx/context/dist/core/git.service.delete-directories.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/core/git.service.delete-directories.test.js +61 -0
- package/node_modules/@ktx/context/dist/core/git.service.js +804 -0
- package/node_modules/@ktx/context/dist/core/git.service.reset-hard.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/core/git.service.reset-hard.test.js +47 -0
- package/node_modules/@ktx/context/dist/core/git.service.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/core/git.service.test.js +325 -0
- package/node_modules/@ktx/context/dist/core/index.d.ts +10 -0
- package/node_modules/@ktx/context/dist/core/index.js +5 -0
- package/node_modules/@ktx/context/dist/core/redaction.d.ts +4 -0
- package/node_modules/@ktx/context/dist/core/redaction.js +39 -0
- package/node_modules/@ktx/context/dist/core/session-worktree.service.d.ts +38 -0
- package/node_modules/@ktx/context/dist/core/session-worktree.service.js +65 -0
- package/node_modules/@ktx/context/dist/core/session-worktree.service.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/core/session-worktree.service.test.js +97 -0
- package/node_modules/@ktx/context/dist/daemon/index.d.ts +1 -0
- package/node_modules/@ktx/context/dist/daemon/index.js +1 -0
- package/node_modules/@ktx/context/dist/daemon/semantic-layer-compute.d.ts +72 -0
- package/node_modules/@ktx/context/dist/daemon/semantic-layer-compute.js +191 -0
- package/node_modules/@ktx/context/dist/daemon/semantic-layer-compute.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/daemon/semantic-layer-compute.test.js +301 -0
- package/node_modules/@ktx/context/dist/index.d.ts +21 -0
- package/node_modules/@ktx/context/dist/index.js +18 -0
- package/node_modules/@ktx/context/dist/index.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/index.test.js +10 -0
- package/node_modules/@ktx/context/dist/ingest/action-identity.d.ts +3 -0
- package/node_modules/@ktx/context/dist/ingest/action-identity.js +6 -0
- package/node_modules/@ktx/context/dist/ingest/action-identity.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/action-identity.test.js +19 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt/chunk.d.ts +7 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt/chunk.js +110 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt/chunk.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt/chunk.test.js +30 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt/dbt.adapter.d.ts +18 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt/dbt.adapter.js +43 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt/dbt.adapter.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt/dbt.adapter.test.js +43 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt/detect.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt/detect.js +12 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt/fetch.d.ts +19 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt/fetch.js +43 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt/fetch.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt/fetch.test.js +30 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt/parse.d.ts +6 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt/parse.js +23 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt/parse.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt/parse.test.js +7 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/match-tables.d.ts +27 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/match-tables.js +80 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/match-tables.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/match-tables.test.js +59 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/merge-semantic-model-tables.d.ts +3 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/merge-semantic-model-tables.js +28 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/merge-semantic-model-tables.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/merge-semantic-model-tables.test.js +55 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/parse-schema.d.ts +65 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/parse-schema.js +432 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/parse-schema.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/parse-schema.test.js +195 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-description-updates.d.ts +13 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-description-updates.js +46 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-description-updates.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-description-updates.test.js +88 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-metadata-updates.d.ts +9 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-metadata-updates.js +57 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-metadata-updates.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-metadata-updates.test.js +68 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-relationship-updates.d.ts +12 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-relationship-updates.js +34 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-relationship-updates.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-relationship-updates.test.js +56 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-extraction-golden-parity.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt-extraction-golden-parity.test.js +392 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/fake/fake.adapter.d.ts +7 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/fake/fake.adapter.js +42 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/bigquery-query-history-reader.d.ts +14 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/bigquery-query-history-reader.js +199 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/bigquery-query-history-reader.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/bigquery-query-history-reader.test.js +121 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/buckets.d.ts +6 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/buckets.js +64 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/buckets.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/buckets.test.js +49 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/chunk-unified.d.ts +3 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/chunk-unified.js +86 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/chunk-unified.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/chunk-unified.test.js +160 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/detect.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/detect.js +25 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/detect.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/detect.test.js +48 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/errors.d.ts +35 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/errors.js +32 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/evidence-tool.d.ts +41 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/evidence-tool.js +88 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/evidence-tool.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/evidence-tool.test.js +67 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/evidence.d.ts +77 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/evidence.js +32 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/evidence.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/evidence.test.js +43 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/historic-sql.adapter.d.ts +14 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/historic-sql.adapter.js +33 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/historic-sql.adapter.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/historic-sql.adapter.test.js +98 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/local-ingest-acceptance.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/local-ingest-acceptance.test.js +235 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/pattern-inputs.d.ts +21 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/pattern-inputs.js +66 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/pattern-inputs.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/pattern-inputs.test.js +68 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/post-processor.d.ts +4 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/post-processor.js +38 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/post-processor.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/post-processor.test.js +63 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/postgres-pgss-reader.d.ts +5 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/postgres-pgss-reader.js +233 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/postgres-pgss-reader.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/postgres-pgss-reader.test.js +205 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/projection.d.ts +19 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/projection.js +272 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/projection.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/projection.test.js +309 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/redaction.d.ts +6 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/redaction.js +30 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/redaction.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/redaction.test.js +22 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/skill-schemas.d.ts +37 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/skill-schemas.js +24 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/skill-schemas.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/skill-schemas.test.js +62 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/snowflake-query-history-reader.d.ts +8 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/snowflake-query-history-reader.js +180 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/snowflake-query-history-reader.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/snowflake-query-history-reader.test.js +117 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/stage-unified.d.ts +13 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/stage-unified.js +269 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/stage-unified.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/stage-unified.test.js +405 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/types.d.ts +184 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/types.js +99 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/types.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/types.test.js +87 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/chunk.d.ts +2 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/chunk.js +44 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/chunk.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/chunk.test.js +95 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/daemon-introspection.d.ts +20 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/daemon-introspection.js +187 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/daemon-introspection.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/daemon-introspection.test.js +204 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/extracted-schema.d.ts +29 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/extracted-schema.js +28 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/extracted-schema.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/extracted-schema.test.js +129 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/live-database.adapter.d.ts +11 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/live-database.adapter.js +24 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/live-database.adapter.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/live-database.adapter.test.js +55 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/manifest.d.ts +65 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/manifest.js +190 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/manifest.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/manifest.test.js +291 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/stage.d.ts +12 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/stage.js +105 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/stage.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/stage.test.js +133 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/structural-sync.d.ts +89 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/structural-sync.js +335 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/structural-sync.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/structural-sync.test.js +416 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/types.d.ts +8 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/types.js +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/chunk.d.ts +2 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/chunk.js +146 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/chunk.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/chunk.test.js +142 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/client-boundary.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/client-boundary.test.js +12 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/client.d.ts +83 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/client.js +554 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/client.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/client.test.js +407 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/daemon-table-identifier-parser.d.ts +7 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/daemon-table-identifier-parser.js +57 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/daemon-table-identifier-parser.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/daemon-table-identifier-parser.test.js +40 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/detect.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/detect.js +26 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/detect.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/detect.test.js +39 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/evidence-documents.d.ts +3 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/evidence-documents.js +311 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/evidence-documents.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/evidence-documents.test.js +178 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/factory.d.ts +21 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/factory.js +22 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/factory.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/factory.test.js +55 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/fetch-report.d.ts +3 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/fetch-report.js +21 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/fetch-report.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/fetch-report.test.js +71 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/fetch.d.ts +31 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/fetch.js +395 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/fetch.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/fetch.test.js +592 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/local-looker.adapter.d.ts +11 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/local-looker.adapter.js +45 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/local-runtime-store.d.ts +50 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/local-runtime-store.js +196 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/local-runtime-store.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/local-runtime-store.test.js +106 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/looker.adapter.d.ts +57 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/looker.adapter.js +47 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/looker.adapter.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/looker.adapter.test.js +99 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/mapping.d.ts +126 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/mapping.js +303 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/mapping.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/mapping.test.js +334 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/reconcile.d.ts +2 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/reconcile.js +20 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/reconcile.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/reconcile.test.js +22 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/scope.d.ts +6 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/scope.js +55 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/scope.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/scope.test.js +84 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/target-connections.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/target-connections.js +38 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/target-connections.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/target-connections.test.js +71 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/tools/looker-query-to-sl.tool.d.ts +107 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/tools/looker-query-to-sl.tool.js +236 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/tools/looker-query-to-sl.tool.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/tools/looker-query-to-sl.tool.test.js +211 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/types.d.ts +438 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/types.js +198 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/types.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/looker/types.test.js +260 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/chunk.d.ts +19 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/chunk.js +128 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/chunk.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/chunk.test.js +213 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/detect.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/detect.js +11 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/detect.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/detect.test.js +37 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/fetch-report.d.ts +15 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/fetch-report.js +98 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/fetch-report.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/fetch-report.test.js +82 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/fetch.d.ts +15 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/fetch.js +54 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/fetch.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/fetch.test.js +121 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/graph.d.ts +16 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/graph.js +85 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/graph.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/graph.test.js +105 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/lookml.adapter.d.ts +17 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/lookml.adapter.js +44 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/lookml.adapter.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/lookml.adapter.test.js +49 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/parse.d.ts +35 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/parse.js +149 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/parse.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/parse.test.js +118 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/pull-config.d.ts +37 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/pull-config.js +26 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/pull-config.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/pull-config.test.js +128 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/card-references.d.ts +13 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/card-references.js +37 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/card-references.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/card-references.test.js +36 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/chunk.d.ts +6 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/chunk.js +208 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/chunk.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/chunk.test.js +299 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/client-boundary.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/client-boundary.test.js +38 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/client-port.d.ts +167 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/client-port.js +9 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/client-port.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/client-port.test.js +86 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/client.d.ts +114 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/client.js +671 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/client.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/client.test.js +377 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/detect.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/detect.js +20 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/detect.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/detect.test.js +42 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fanout-planner.d.ts +17 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fanout-planner.js +23 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fanout-planner.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fanout-planner.test.js +44 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fetch-scope.d.ts +31 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fetch-scope.js +72 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fetch-scope.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fetch-scope.test.js +124 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fetch.d.ts +16 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fetch.js +239 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fetch.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fetch.test.js +516 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/local-metabase.adapter.d.ts +13 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/local-metabase.adapter.js +41 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/local-metabase.adapter.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/local-metabase.adapter.test.js +56 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/local-source-state-store.d.ts +43 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/local-source-state-store.js +176 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/local-source-state-store.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/local-source-state-store.test.js +99 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/mapping.d.ts +92 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/mapping.js +220 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/mapping.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/mapping.test.js +215 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/metabase.adapter.d.ts +19 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/metabase.adapter.js +41 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/metabase.adapter.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/metabase.adapter.test.js +129 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/serialize-card.d.ts +53 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/serialize-card.js +67 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/serialize-card.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/serialize-card.test.js +205 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/source-state-port.d.ts +23 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/source-state-port.js +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/types.d.ts +142 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/types.js +106 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/types.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/types.test.js +75 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/chunk.d.ts +19 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/chunk.js +81 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/chunk.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/chunk.test.js +114 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/deep-parse.d.ts +77 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/deep-parse.js +460 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/deep-parse.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/deep-parse.test.js +1139 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/detect.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/detect.js +34 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/detect.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/detect.test.js +43 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/fetch.d.ts +11 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/fetch.js +51 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/fetch.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/fetch.test.js +97 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/graph.d.ts +25 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/graph.js +163 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/graph.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/graph.test.js +245 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/import-semantic-models.d.ts +29 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/import-semantic-models.js +136 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/import-semantic-models.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/import-semantic-models.test.js +318 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/metricflow.adapter.d.ts +16 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/metricflow.adapter.js +44 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/metricflow.adapter.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/metricflow.adapter.test.js +97 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/parse.d.ts +42 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/parse.js +150 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/parse.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/parse.test.js +171 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/pull-config.d.ts +37 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/pull-config.js +24 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/pull-config.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/pull-config.test.js +57 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/semantic-models.d.ts +39 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/semantic-models.js +278 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/semantic-models.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/semantic-models.test.js +204 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/chunk.d.ts +4 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/chunk.js +137 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/cluster.d.ts +10 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/cluster.js +82 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/cluster.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/cluster.test.js +123 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/detect.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/detect.js +20 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/fetch.d.ts +13 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/fetch.js +517 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/fetch.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/fetch.test.js +358 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/local-state-store.d.ts +12 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/local-state-store.js +46 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/local-state-store.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/local-state-store.test.js +29 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/normalize.d.ts +10 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/normalize.js +165 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/normalize.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/normalize.test.js +64 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/notion-client.d.ts +74 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/notion-client.js +107 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/notion-client.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/notion-client.test.js +49 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/notion.adapter.d.ts +46 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/notion.adapter.js +119 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/notion.adapter.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/notion.adapter.test.js +315 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/pull-config.d.ts +2 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/pull-config.js +4 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/types.d.ts +97 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/types.js +62 -0
- package/node_modules/@ktx/context/dist/ingest/canonical-pins.d.ts +10 -0
- package/node_modules/@ktx/context/dist/ingest/canonical-pins.js +43 -0
- package/node_modules/@ktx/context/dist/ingest/canonical-pins.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/canonical-pins.test.js +66 -0
- package/node_modules/@ktx/context/dist/ingest/clustering/kmeans.d.ts +11 -0
- package/node_modules/@ktx/context/dist/ingest/clustering/kmeans.js +101 -0
- package/node_modules/@ktx/context/dist/ingest/clustering/kmeans.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/clustering/kmeans.test.js +61 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/candidate-dedup.service.d.ts +27 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/candidate-dedup.service.js +234 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/candidate-dedup.service.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/candidate-dedup.service.test.js +216 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/context-candidate-carryforward.service.d.ts +31 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/context-candidate-carryforward.service.js +131 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/context-candidate-carryforward.service.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/context-candidate-carryforward.service.test.js +161 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/curator-pagination.service.d.ts +64 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/curator-pagination.service.js +240 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/curator-pagination.service.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/curator-pagination.service.test.js +168 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/embedding-text.d.ts +6 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/embedding-text.js +3 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/embedding-text.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/embedding-text.test.js +10 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/index.d.ts +9 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/index.js +4 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/store.d.ts +24 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/store.js +1 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/store.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/store.test.js +67 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/types.d.ts +103 -0
- package/node_modules/@ktx/context/dist/ingest/context-candidates/types.js +1 -0
- package/node_modules/@ktx/context/dist/ingest/context-evidence/context-evidence-index.service.d.ts +53 -0
- package/node_modules/@ktx/context/dist/ingest/context-evidence/context-evidence-index.service.js +303 -0
- package/node_modules/@ktx/context/dist/ingest/context-evidence/context-evidence-index.service.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/context-evidence/context-evidence-index.service.test.js +374 -0
- package/node_modules/@ktx/context/dist/ingest/context-evidence/index.d.ts +5 -0
- package/node_modules/@ktx/context/dist/ingest/context-evidence/index.js +2 -0
- package/node_modules/@ktx/context/dist/ingest/context-evidence/sqlite-context-evidence-store.d.ts +89 -0
- package/node_modules/@ktx/context/dist/ingest/context-evidence/sqlite-context-evidence-store.js +1025 -0
- package/node_modules/@ktx/context/dist/ingest/context-evidence/sqlite-context-evidence-store.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/context-evidence/sqlite-context-evidence-store.test.js +416 -0
- package/node_modules/@ktx/context/dist/ingest/context-evidence/store.d.ts +10 -0
- package/node_modules/@ktx/context/dist/ingest/context-evidence/store.js +1 -0
- package/node_modules/@ktx/context/dist/ingest/context-evidence/store.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/context-evidence/store.test.js +55 -0
- package/node_modules/@ktx/context/dist/ingest/context-evidence/types.d.ts +49 -0
- package/node_modules/@ktx/context/dist/ingest/context-evidence/types.js +1 -0
- package/node_modules/@ktx/context/dist/ingest/dbt-shared/project-vars.d.ts +12 -0
- package/node_modules/@ktx/context/dist/ingest/dbt-shared/project-vars.js +86 -0
- package/node_modules/@ktx/context/dist/ingest/dbt-shared/project-vars.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/dbt-shared/project-vars.test.js +90 -0
- package/node_modules/@ktx/context/dist/ingest/dbt-shared/schema-files.d.ts +3 -0
- package/node_modules/@ktx/context/dist/ingest/dbt-shared/schema-files.js +62 -0
- package/node_modules/@ktx/context/dist/ingest/dbt-shared/schema-files.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/dbt-shared/schema-files.test.js +35 -0
- package/node_modules/@ktx/context/dist/ingest/diff-set.service.d.ts +8 -0
- package/node_modules/@ktx/context/dist/ingest/diff-set.service.js +41 -0
- package/node_modules/@ktx/context/dist/ingest/diff-set.service.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/diff-set.service.test.js +132 -0
- package/node_modules/@ktx/context/dist/ingest/git-env.d.ts +2 -0
- package/node_modules/@ktx/context/dist/ingest/git-env.js +33 -0
- package/node_modules/@ktx/context/dist/ingest/index.d.ts +148 -0
- package/node_modules/@ktx/context/dist/ingest/index.js +93 -0
- package/node_modules/@ktx/context/dist/ingest/ingest-bundle.runner.d.ts +38 -0
- package/node_modules/@ktx/context/dist/ingest/ingest-bundle.runner.js +1263 -0
- package/node_modules/@ktx/context/dist/ingest/ingest-bundle.runner.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/ingest-bundle.runner.test.js +1727 -0
- package/node_modules/@ktx/context/dist/ingest/ingest-prompts.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/ingest-prompts.test.js +32 -0
- package/node_modules/@ktx/context/dist/ingest/ingest-runtime-assets.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/ingest-runtime-assets.test.js +89 -0
- package/node_modules/@ktx/context/dist/ingest/local-adapters.d.ts +35 -0
- package/node_modules/@ktx/context/dist/ingest/local-adapters.js +247 -0
- package/node_modules/@ktx/context/dist/ingest/local-adapters.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/local-adapters.test.js +625 -0
- package/node_modules/@ktx/context/dist/ingest/local-bundle-ingest.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/local-bundle-ingest.test.js +768 -0
- package/node_modules/@ktx/context/dist/ingest/local-bundle-runtime.d.ts +32 -0
- package/node_modules/@ktx/context/dist/ingest/local-bundle-runtime.js +558 -0
- package/node_modules/@ktx/context/dist/ingest/local-bundle-runtime.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/local-bundle-runtime.test.js +160 -0
- package/node_modules/@ktx/context/dist/ingest/local-embedding-provider.integration.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/local-embedding-provider.integration.test.js +140 -0
- package/node_modules/@ktx/context/dist/ingest/local-ingest.d.ts +86 -0
- package/node_modules/@ktx/context/dist/ingest/local-ingest.js +302 -0
- package/node_modules/@ktx/context/dist/ingest/local-mapping-reconcile.d.ts +2 -0
- package/node_modules/@ktx/context/dist/ingest/local-mapping-reconcile.js +26 -0
- package/node_modules/@ktx/context/dist/ingest/local-mapping-reconcile.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/local-mapping-reconcile.test.js +61 -0
- package/node_modules/@ktx/context/dist/ingest/local-metabase-ingest.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/local-metabase-ingest.test.js +227 -0
- package/node_modules/@ktx/context/dist/ingest/local-stage-ingest.d.ts +53 -0
- package/node_modules/@ktx/context/dist/ingest/local-stage-ingest.js +280 -0
- package/node_modules/@ktx/context/dist/ingest/local-stage-ingest.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/local-stage-ingest.test.js +552 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/acceptance-fixtures.d.ts +6 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/acceptance-fixtures.js +155 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/acceptance.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/acceptance.test.js +43 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/events.d.ts +9 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/events.js +196 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/events.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/events.test.js +319 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/index.d.ts +6 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/index.js +4 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/interaction.d.ts +9 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/interaction.js +315 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/interaction.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/interaction.test.js +264 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/interactive-render.d.ts +2 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/interactive-render.js +121 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/interactive-render.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/interactive-render.test.js +160 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/known-errors.d.ts +7 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/known-errors.js +17 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/live-buffer.d.ts +3 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/live-buffer.js +53 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/live-buffer.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/live-buffer.test.js +77 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/package-export.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/package-export.test.js +9 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/render.d.ts +2 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/render.js +84 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/render.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/render.test.js +105 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/schema.d.ts +190 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/schema.js +155 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/schema.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/schema.test.js +146 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/summary.d.ts +2 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/summary.js +88 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/summary.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/summary.test.js +130 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/types.d.ts +207 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/types.js +1 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/view-model.d.ts +2 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/view-model.js +450 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/view-model.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/view-model.test.js +397 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/visuals.d.ts +20 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/visuals.js +44 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/visuals.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/memory-flow/visuals.test.js +49 -0
- package/node_modules/@ktx/context/dist/ingest/metabase-mapping.d.ts +2 -0
- package/node_modules/@ktx/context/dist/ingest/metabase-mapping.js +1 -0
- package/node_modules/@ktx/context/dist/ingest/page-triage/index.d.ts +2 -0
- package/node_modules/@ktx/context/dist/ingest/page-triage/index.js +1 -0
- package/node_modules/@ktx/context/dist/ingest/page-triage/page-triage.service.d.ts +84 -0
- package/node_modules/@ktx/context/dist/ingest/page-triage/page-triage.service.js +318 -0
- package/node_modules/@ktx/context/dist/ingest/page-triage/page-triage.service.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/page-triage/page-triage.service.test.js +311 -0
- package/node_modules/@ktx/context/dist/ingest/parsed-target-table.d.ts +21 -0
- package/node_modules/@ktx/context/dist/ingest/parsed-target-table.js +24 -0
- package/node_modules/@ktx/context/dist/ingest/ports.d.ts +339 -0
- package/node_modules/@ktx/context/dist/ingest/ports.js +1 -0
- package/node_modules/@ktx/context/dist/ingest/raw-sources-paths.d.ts +4 -0
- package/node_modules/@ktx/context/dist/ingest/raw-sources-paths.js +16 -0
- package/node_modules/@ktx/context/dist/ingest/raw-sources-paths.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/raw-sources-paths.test.js +18 -0
- package/node_modules/@ktx/context/dist/ingest/repo-fetch.d.ts +34 -0
- package/node_modules/@ktx/context/dist/ingest/repo-fetch.js +132 -0
- package/node_modules/@ktx/context/dist/ingest/repo-fetch.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/repo-fetch.test.js +168 -0
- package/node_modules/@ktx/context/dist/ingest/report-snapshot.d.ts +202 -0
- package/node_modules/@ktx/context/dist/ingest/report-snapshot.js +160 -0
- package/node_modules/@ktx/context/dist/ingest/report-snapshot.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/report-snapshot.test.js +205 -0
- package/node_modules/@ktx/context/dist/ingest/reports.d.ts +79 -0
- package/node_modules/@ktx/context/dist/ingest/reports.js +54 -0
- package/node_modules/@ktx/context/dist/ingest/source-adapter-registry.d.ts +8 -0
- package/node_modules/@ktx/context/dist/ingest/source-adapter-registry.js +23 -0
- package/node_modules/@ktx/context/dist/ingest/source-adapter-registry.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/source-adapter-registry.test.js +35 -0
- package/node_modules/@ktx/context/dist/ingest/sqlite-bundle-ingest-store.d.ts +38 -0
- package/node_modules/@ktx/context/dist/ingest/sqlite-bundle-ingest-store.js +501 -0
- package/node_modules/@ktx/context/dist/ingest/sqlite-bundle-ingest-store.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/sqlite-bundle-ingest-store.test.js +517 -0
- package/node_modules/@ktx/context/dist/ingest/sqlite-local-ingest-store.d.ts +19 -0
- package/node_modules/@ktx/context/dist/ingest/sqlite-local-ingest-store.js +190 -0
- package/node_modules/@ktx/context/dist/ingest/sqlite-local-ingest-store.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/sqlite-local-ingest-store.test.js +143 -0
- package/node_modules/@ktx/context/dist/ingest/stages/build-reconcile-context.context-candidates.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/stages/build-reconcile-context.context-candidates.test.js +102 -0
- package/node_modules/@ktx/context/dist/ingest/stages/build-reconcile-context.d.ts +61 -0
- package/node_modules/@ktx/context/dist/ingest/stages/build-reconcile-context.js +122 -0
- package/node_modules/@ktx/context/dist/ingest/stages/build-reconcile-context.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/stages/build-reconcile-context.test.js +141 -0
- package/node_modules/@ktx/context/dist/ingest/stages/build-wu-context.d.ts +27 -0
- package/node_modules/@ktx/context/dist/ingest/stages/build-wu-context.js +87 -0
- package/node_modules/@ktx/context/dist/ingest/stages/build-wu-context.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/stages/build-wu-context.test.js +196 -0
- package/node_modules/@ktx/context/dist/ingest/stages/stage-1-stage-raw-files.d.ts +13 -0
- package/node_modules/@ktx/context/dist/ingest/stages/stage-1-stage-raw-files.js +24 -0
- package/node_modules/@ktx/context/dist/ingest/stages/stage-1-stage-raw-files.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/stages/stage-1-stage-raw-files.test.js +54 -0
- package/node_modules/@ktx/context/dist/ingest/stages/stage-3-work-units.d.ts +44 -0
- package/node_modules/@ktx/context/dist/ingest/stages/stage-3-work-units.js +104 -0
- package/node_modules/@ktx/context/dist/ingest/stages/stage-3-work-units.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/stages/stage-3-work-units.test.js +146 -0
- package/node_modules/@ktx/context/dist/ingest/stages/stage-4-reconciliation.d.ts +28 -0
- package/node_modules/@ktx/context/dist/ingest/stages/stage-4-reconciliation.js +17 -0
- package/node_modules/@ktx/context/dist/ingest/stages/stage-4-reconciliation.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/stages/stage-4-reconciliation.test.js +144 -0
- package/node_modules/@ktx/context/dist/ingest/stages/stage-index.types.d.ts +50 -0
- package/node_modules/@ktx/context/dist/ingest/stages/stage-index.types.js +1 -0
- package/node_modules/@ktx/context/dist/ingest/stages/validate-wu-sources.d.ts +9 -0
- package/node_modules/@ktx/context/dist/ingest/stages/validate-wu-sources.js +14 -0
- package/node_modules/@ktx/context/dist/ingest/stages/validate-wu-sources.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/stages/validate-wu-sources.test.js +27 -0
- package/node_modules/@ktx/context/dist/ingest/tools/emit-artifact-resolution.tool.d.ts +13 -0
- package/node_modules/@ktx/context/dist/ingest/tools/emit-artifact-resolution.tool.js +40 -0
- package/node_modules/@ktx/context/dist/ingest/tools/emit-conflict-resolution.tool.d.ts +13 -0
- package/node_modules/@ktx/context/dist/ingest/tools/emit-conflict-resolution.tool.js +31 -0
- package/node_modules/@ktx/context/dist/ingest/tools/emit-eviction-decision.tool.d.ts +13 -0
- package/node_modules/@ktx/context/dist/ingest/tools/emit-eviction-decision.tool.js +38 -0
- package/node_modules/@ktx/context/dist/ingest/tools/emit-reconciliation-records.tool.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/tools/emit-reconciliation-records.tool.test.js +237 -0
- package/node_modules/@ktx/context/dist/ingest/tools/emit-unmapped-fallback.tool.d.ts +14 -0
- package/node_modules/@ktx/context/dist/ingest/tools/emit-unmapped-fallback.tool.js +91 -0
- package/node_modules/@ktx/context/dist/ingest/tools/eviction-list.tool.d.ts +8 -0
- package/node_modules/@ktx/context/dist/ingest/tools/eviction-list.tool.js +25 -0
- package/node_modules/@ktx/context/dist/ingest/tools/eviction-list.tool.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/tools/eviction-list.tool.test.js +44 -0
- package/node_modules/@ktx/context/dist/ingest/tools/read-raw-file.tool.d.ts +8 -0
- package/node_modules/@ktx/context/dist/ingest/tools/read-raw-file.tool.js +34 -0
- package/node_modules/@ktx/context/dist/ingest/tools/read-raw-file.tool.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/tools/read-raw-file.tool.test.js +45 -0
- package/node_modules/@ktx/context/dist/ingest/tools/read-raw-span.tool.d.ts +10 -0
- package/node_modules/@ktx/context/dist/ingest/tools/read-raw-span.tool.js +40 -0
- package/node_modules/@ktx/context/dist/ingest/tools/read-raw-span.tool.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/tools/read-raw-span.tool.test.js +34 -0
- package/node_modules/@ktx/context/dist/ingest/tools/stage-diff.tool.d.ts +8 -0
- package/node_modules/@ktx/context/dist/ingest/tools/stage-diff.tool.js +37 -0
- package/node_modules/@ktx/context/dist/ingest/tools/stage-diff.tool.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/tools/stage-diff.tool.test.js +112 -0
- package/node_modules/@ktx/context/dist/ingest/tools/stage-list.tool.d.ts +5 -0
- package/node_modules/@ktx/context/dist/ingest/tools/stage-list.tool.js +32 -0
- package/node_modules/@ktx/context/dist/ingest/tools/stage-list.tool.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/tools/stage-list.tool.test.js +58 -0
- package/node_modules/@ktx/context/dist/ingest/tools/tool-call-logger.d.ts +33 -0
- package/node_modules/@ktx/context/dist/ingest/tools/tool-call-logger.js +80 -0
- package/node_modules/@ktx/context/dist/ingest/tools/tool-transcript-summary.d.ts +13 -0
- package/node_modules/@ktx/context/dist/ingest/tools/tool-transcript-summary.js +150 -0
- package/node_modules/@ktx/context/dist/ingest/tools/tool-transcript-summary.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/tools/tool-transcript-summary.test.js +141 -0
- package/node_modules/@ktx/context/dist/ingest/tools/verification-ledger.tool.d.ts +14 -0
- package/node_modules/@ktx/context/dist/ingest/tools/verification-ledger.tool.js +71 -0
- package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/discover-data.tool.d.ts +36 -0
- package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/discover-data.tool.js +94 -0
- package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/discover-data.tool.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/discover-data.tool.test.js +107 -0
- package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/entity-details.tool.d.ts +43 -0
- package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/entity-details.tool.js +137 -0
- package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/entity-details.tool.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/entity-details.tool.test.js +146 -0
- package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/index.d.ts +9 -0
- package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/index.js +18 -0
- package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/sql-execution.tool.d.ts +31 -0
- package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/sql-execution.tool.js +84 -0
- package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/sql-execution.tool.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/sql-execution.tool.test.js +50 -0
- package/node_modules/@ktx/context/dist/ingest/types.d.ts +144 -0
- package/node_modules/@ktx/context/dist/ingest/types.js +1 -0
- package/node_modules/@ktx/context/dist/ingest/wiki-sl-ref-repair.d.ts +19 -0
- package/node_modules/@ktx/context/dist/ingest/wiki-sl-ref-repair.js +89 -0
- package/node_modules/@ktx/context/dist/ingest/wiki-sl-ref-repair.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/wiki-sl-ref-repair.test.js +81 -0
- package/node_modules/@ktx/context/dist/llm/ai-sdk-runtime.d.ts +23 -0
- package/node_modules/@ktx/context/dist/llm/ai-sdk-runtime.js +133 -0
- package/node_modules/@ktx/context/dist/llm/claude-code-env.d.ts +2 -0
- package/node_modules/@ktx/context/dist/llm/claude-code-env.js +21 -0
- package/node_modules/@ktx/context/dist/llm/claude-code-env.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/llm/claude-code-env.test.js +17 -0
- package/node_modules/@ktx/context/dist/llm/claude-code-models.d.ts +1 -0
- package/node_modules/@ktx/context/dist/llm/claude-code-models.js +17 -0
- package/node_modules/@ktx/context/dist/llm/claude-code-models.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/llm/claude-code-models.test.js +15 -0
- package/node_modules/@ktx/context/dist/llm/claude-code-runtime.d.ts +36 -0
- package/node_modules/@ktx/context/dist/llm/claude-code-runtime.js +242 -0
- package/node_modules/@ktx/context/dist/llm/claude-code-runtime.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/llm/claude-code-runtime.test.js +384 -0
- package/node_modules/@ktx/context/dist/llm/debug-request-recorder.d.ts +44 -0
- package/node_modules/@ktx/context/dist/llm/debug-request-recorder.js +79 -0
- package/node_modules/@ktx/context/dist/llm/debug-request-recorder.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/llm/debug-request-recorder.test.js +112 -0
- package/node_modules/@ktx/context/dist/llm/embedding-port.d.ts +17 -0
- package/node_modules/@ktx/context/dist/llm/embedding-port.js +31 -0
- package/node_modules/@ktx/context/dist/llm/embedding-port.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/llm/embedding-port.test.js +34 -0
- package/node_modules/@ktx/context/dist/llm/generation.d.ts +8 -0
- package/node_modules/@ktx/context/dist/llm/generation.js +6 -0
- package/node_modules/@ktx/context/dist/llm/index.d.ts +13 -0
- package/node_modules/@ktx/context/dist/llm/index.js +10 -0
- package/node_modules/@ktx/context/dist/llm/local-config.d.ts +22 -0
- package/node_modules/@ktx/context/dist/llm/local-config.js +145 -0
- package/node_modules/@ktx/context/dist/llm/local-config.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/llm/local-config.test.js +165 -0
- package/node_modules/@ktx/context/dist/llm/runtime-local-config.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/llm/runtime-local-config.test.js +17 -0
- package/node_modules/@ktx/context/dist/llm/runtime-port.d.ts +59 -0
- package/node_modules/@ktx/context/dist/llm/runtime-port.js +9 -0
- package/node_modules/@ktx/context/dist/llm/runtime-tools.d.ts +10 -0
- package/node_modules/@ktx/context/dist/llm/runtime-tools.js +68 -0
- package/node_modules/@ktx/context/dist/llm/runtime-tools.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/llm/runtime-tools.test.js +36 -0
- package/node_modules/@ktx/context/dist/mcp/context-tools.d.ts +9 -0
- package/node_modules/@ktx/context/dist/mcp/context-tools.js +398 -0
- package/node_modules/@ktx/context/dist/mcp/index.d.ts +5 -0
- package/node_modules/@ktx/context/dist/mcp/index.js +3 -0
- package/node_modules/@ktx/context/dist/mcp/local-project-ports.d.ts +18 -0
- package/node_modules/@ktx/context/dist/mcp/local-project-ports.js +631 -0
- package/node_modules/@ktx/context/dist/mcp/local-project-ports.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/mcp/local-project-ports.test.js +1388 -0
- package/node_modules/@ktx/context/dist/mcp/server.d.ts +7 -0
- package/node_modules/@ktx/context/dist/mcp/server.js +69 -0
- package/node_modules/@ktx/context/dist/mcp/server.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/mcp/server.test.js +991 -0
- package/node_modules/@ktx/context/dist/mcp/types.d.ts +347 -0
- package/node_modules/@ktx/context/dist/mcp/types.js +1 -0
- package/node_modules/@ktx/context/dist/memory/capture-signals.d.ts +8 -0
- package/node_modules/@ktx/context/dist/memory/capture-signals.js +103 -0
- package/node_modules/@ktx/context/dist/memory/index.d.ts +6 -0
- package/node_modules/@ktx/context/dist/memory/index.js +5 -0
- package/node_modules/@ktx/context/dist/memory/local-memory-runs.d.ts +22 -0
- package/node_modules/@ktx/context/dist/memory/local-memory-runs.js +165 -0
- package/node_modules/@ktx/context/dist/memory/local-memory.d.ts +22 -0
- package/node_modules/@ktx/context/dist/memory/local-memory.js +385 -0
- package/node_modules/@ktx/context/dist/memory/local-memory.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/memory/local-memory.test.js +159 -0
- package/node_modules/@ktx/context/dist/memory/memory-agent.service.d.ts +59 -0
- package/node_modules/@ktx/context/dist/memory/memory-agent.service.ingest.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/memory/memory-agent.service.ingest.test.js +355 -0
- package/node_modules/@ktx/context/dist/memory/memory-agent.service.js +539 -0
- package/node_modules/@ktx/context/dist/memory/memory-agent.service.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/memory/memory-agent.service.test.js +413 -0
- package/node_modules/@ktx/context/dist/memory/memory-runs.d.ts +54 -0
- package/node_modules/@ktx/context/dist/memory/memory-runs.js +78 -0
- package/node_modules/@ktx/context/dist/memory/memory-runs.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/memory/memory-runs.test.js +158 -0
- package/node_modules/@ktx/context/dist/memory/memory-runtime-assets.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/memory/memory-runtime-assets.test.js +162 -0
- package/node_modules/@ktx/context/dist/memory/types.d.ts +133 -0
- package/node_modules/@ktx/context/dist/memory/types.js +1 -0
- package/node_modules/@ktx/context/dist/package-exports.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/package-exports.test.js +249 -0
- package/node_modules/@ktx/context/dist/project/config.d.ts +568 -0
- package/node_modules/@ktx/context/dist/project/config.js +331 -0
- package/node_modules/@ktx/context/dist/project/config.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/project/config.test.js +467 -0
- package/node_modules/@ktx/context/dist/project/driver-schemas.d.ts +98 -0
- package/node_modules/@ktx/context/dist/project/driver-schemas.js +180 -0
- package/node_modules/@ktx/context/dist/project/driver-schemas.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/project/driver-schemas.test.js +125 -0
- package/node_modules/@ktx/context/dist/project/index.d.ts +12 -0
- package/node_modules/@ktx/context/dist/project/index.js +6 -0
- package/node_modules/@ktx/context/dist/project/local-git-file-store.d.ts +23 -0
- package/node_modules/@ktx/context/dist/project/local-git-file-store.js +140 -0
- package/node_modules/@ktx/context/dist/project/local-git-file-store.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/project/local-git-file-store.test.js +71 -0
- package/node_modules/@ktx/context/dist/project/local-state-db.d.ts +2 -0
- package/node_modules/@ktx/context/dist/project/local-state-db.js +4 -0
- package/node_modules/@ktx/context/dist/project/mappings-yaml-schema.d.ts +58 -0
- package/node_modules/@ktx/context/dist/project/mappings-yaml-schema.js +109 -0
- package/node_modules/@ktx/context/dist/project/mappings-yaml-schema.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/project/mappings-yaml-schema.test.js +79 -0
- package/node_modules/@ktx/context/dist/project/project.d.ts +29 -0
- package/node_modules/@ktx/context/dist/project/project.js +93 -0
- package/node_modules/@ktx/context/dist/project/project.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/project/project.test.js +55 -0
- package/node_modules/@ktx/context/dist/project/setup-config.d.ts +12 -0
- package/node_modules/@ktx/context/dist/project/setup-config.js +70 -0
- package/node_modules/@ktx/context/dist/project/setup-config.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/project/setup-config.test.js +37 -0
- package/node_modules/@ktx/context/dist/prompts/index.d.ts +2 -0
- package/node_modules/@ktx/context/dist/prompts/index.js +1 -0
- package/node_modules/@ktx/context/dist/prompts/prompt.service.d.ts +28 -0
- package/node_modules/@ktx/context/dist/prompts/prompt.service.js +84 -0
- package/node_modules/@ktx/context/dist/prompts/prompt.service.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/prompts/prompt.service.test.js +43 -0
- package/node_modules/@ktx/context/dist/scan/credentials.d.ts +8 -0
- package/node_modules/@ktx/context/dist/scan/credentials.js +38 -0
- package/node_modules/@ktx/context/dist/scan/credentials.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/credentials.test.js +161 -0
- package/node_modules/@ktx/context/dist/scan/data-dictionary.d.ts +22 -0
- package/node_modules/@ktx/context/dist/scan/data-dictionary.js +66 -0
- package/node_modules/@ktx/context/dist/scan/data-dictionary.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/data-dictionary.test.js +92 -0
- package/node_modules/@ktx/context/dist/scan/description-generation.d.ts +122 -0
- package/node_modules/@ktx/context/dist/scan/description-generation.js +556 -0
- package/node_modules/@ktx/context/dist/scan/description-generation.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/description-generation.test.js +587 -0
- package/node_modules/@ktx/context/dist/scan/embedding-text.d.ts +21 -0
- package/node_modules/@ktx/context/dist/scan/embedding-text.js +23 -0
- package/node_modules/@ktx/context/dist/scan/embedding-text.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/embedding-text.test.js +36 -0
- package/node_modules/@ktx/context/dist/scan/enrichment-state.d.ts +48 -0
- package/node_modules/@ktx/context/dist/scan/enrichment-state.js +44 -0
- package/node_modules/@ktx/context/dist/scan/enrichment-state.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/enrichment-state.test.js +147 -0
- package/node_modules/@ktx/context/dist/scan/enrichment-summary.d.ts +4 -0
- package/node_modules/@ktx/context/dist/scan/enrichment-summary.js +44 -0
- package/node_modules/@ktx/context/dist/scan/enrichment-summary.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/enrichment-summary.test.js +34 -0
- package/node_modules/@ktx/context/dist/scan/enrichment-types.d.ts +104 -0
- package/node_modules/@ktx/context/dist/scan/enrichment-types.js +1 -0
- package/node_modules/@ktx/context/dist/scan/enrichment-types.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/enrichment-types.test.js +141 -0
- package/node_modules/@ktx/context/dist/scan/entity-details.d.ts +57 -0
- package/node_modules/@ktx/context/dist/scan/entity-details.js +216 -0
- package/node_modules/@ktx/context/dist/scan/entity-details.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/entity-details.test.js +234 -0
- package/node_modules/@ktx/context/dist/scan/index.d.ts +72 -0
- package/node_modules/@ktx/context/dist/scan/index.js +37 -0
- package/node_modules/@ktx/context/dist/scan/local-enrichment-artifacts.d.ts +32 -0
- package/node_modules/@ktx/context/dist/scan/local-enrichment-artifacts.js +274 -0
- package/node_modules/@ktx/context/dist/scan/local-enrichment-artifacts.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/local-enrichment-artifacts.test.js +767 -0
- package/node_modules/@ktx/context/dist/scan/local-enrichment.d.ts +49 -0
- package/node_modules/@ktx/context/dist/scan/local-enrichment.js +494 -0
- package/node_modules/@ktx/context/dist/scan/local-enrichment.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/local-enrichment.test.js +757 -0
- package/node_modules/@ktx/context/dist/scan/local-scan.d.ts +68 -0
- package/node_modules/@ktx/context/dist/scan/local-scan.js +427 -0
- package/node_modules/@ktx/context/dist/scan/local-scan.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/local-scan.test.js +1399 -0
- package/node_modules/@ktx/context/dist/scan/local-structural-artifacts.d.ts +10 -0
- package/node_modules/@ktx/context/dist/scan/local-structural-artifacts.js +86 -0
- package/node_modules/@ktx/context/dist/scan/local-structural-artifacts.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/local-structural-artifacts.test.js +144 -0
- package/node_modules/@ktx/context/dist/scan/orchestrator.d.ts +44 -0
- package/node_modules/@ktx/context/dist/scan/orchestrator.js +186 -0
- package/node_modules/@ktx/context/dist/scan/orchestrator.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/orchestrator.test.js +335 -0
- package/node_modules/@ktx/context/dist/scan/relationship-artifacts.d.ts +20 -0
- package/node_modules/@ktx/context/dist/scan/relationship-artifacts.js +45 -0
- package/node_modules/@ktx/context/dist/scan/relationship-artifacts.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/relationship-artifacts.test.js +268 -0
- package/node_modules/@ktx/context/dist/scan/relationship-benchmark-report.d.ts +52 -0
- package/node_modules/@ktx/context/dist/scan/relationship-benchmark-report.js +252 -0
- package/node_modules/@ktx/context/dist/scan/relationship-benchmark-report.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/relationship-benchmark-report.test.js +389 -0
- package/node_modules/@ktx/context/dist/scan/relationship-benchmarks.d.ts +148 -0
- package/node_modules/@ktx/context/dist/scan/relationship-benchmarks.js +646 -0
- package/node_modules/@ktx/context/dist/scan/relationship-benchmarks.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/relationship-benchmarks.test.js +1072 -0
- package/node_modules/@ktx/context/dist/scan/relationship-budget.d.ts +19 -0
- package/node_modules/@ktx/context/dist/scan/relationship-budget.js +34 -0
- package/node_modules/@ktx/context/dist/scan/relationship-budget.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/relationship-budget.test.js +71 -0
- package/node_modules/@ktx/context/dist/scan/relationship-candidates.d.ts +49 -0
- package/node_modules/@ktx/context/dist/scan/relationship-candidates.js +556 -0
- package/node_modules/@ktx/context/dist/scan/relationship-candidates.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/relationship-candidates.test.js +747 -0
- package/node_modules/@ktx/context/dist/scan/relationship-composite-candidates.d.ts +66 -0
- package/node_modules/@ktx/context/dist/scan/relationship-composite-candidates.js +422 -0
- package/node_modules/@ktx/context/dist/scan/relationship-composite-candidates.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/relationship-composite-candidates.test.js +69 -0
- package/node_modules/@ktx/context/dist/scan/relationship-diagnostics.d.ts +94 -0
- package/node_modules/@ktx/context/dist/scan/relationship-diagnostics.js +224 -0
- package/node_modules/@ktx/context/dist/scan/relationship-diagnostics.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/relationship-diagnostics.test.js +333 -0
- package/node_modules/@ktx/context/dist/scan/relationship-discovery.d.ts +27 -0
- package/node_modules/@ktx/context/dist/scan/relationship-discovery.js +247 -0
- package/node_modules/@ktx/context/dist/scan/relationship-discovery.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/relationship-discovery.test.js +618 -0
- package/node_modules/@ktx/context/dist/scan/relationship-feedback-calibration.d.ts +70 -0
- package/node_modules/@ktx/context/dist/scan/relationship-feedback-calibration.js +170 -0
- package/node_modules/@ktx/context/dist/scan/relationship-feedback-calibration.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/relationship-feedback-calibration.test.js +175 -0
- package/node_modules/@ktx/context/dist/scan/relationship-feedback-export.d.ts +54 -0
- package/node_modules/@ktx/context/dist/scan/relationship-feedback-export.js +96 -0
- package/node_modules/@ktx/context/dist/scan/relationship-feedback-export.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/relationship-feedback-export.test.js +241 -0
- package/node_modules/@ktx/context/dist/scan/relationship-formal-metadata.d.ts +7 -0
- package/node_modules/@ktx/context/dist/scan/relationship-formal-metadata.js +43 -0
- package/node_modules/@ktx/context/dist/scan/relationship-formal-metadata.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/relationship-formal-metadata.test.js +125 -0
- package/node_modules/@ktx/context/dist/scan/relationship-graph-resolver.d.ts +48 -0
- package/node_modules/@ktx/context/dist/scan/relationship-graph-resolver.js +367 -0
- package/node_modules/@ktx/context/dist/scan/relationship-graph-resolver.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/relationship-graph-resolver.test.js +604 -0
- package/node_modules/@ktx/context/dist/scan/relationship-llm-proposal.d.ts +25 -0
- package/node_modules/@ktx/context/dist/scan/relationship-llm-proposal.js +193 -0
- package/node_modules/@ktx/context/dist/scan/relationship-llm-proposal.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/relationship-llm-proposal.test.js +197 -0
- package/node_modules/@ktx/context/dist/scan/relationship-locality.d.ts +15 -0
- package/node_modules/@ktx/context/dist/scan/relationship-locality.js +129 -0
- package/node_modules/@ktx/context/dist/scan/relationship-locality.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/relationship-locality.test.js +128 -0
- package/node_modules/@ktx/context/dist/scan/relationship-name-similarity.d.ts +13 -0
- package/node_modules/@ktx/context/dist/scan/relationship-name-similarity.js +123 -0
- package/node_modules/@ktx/context/dist/scan/relationship-name-similarity.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/relationship-name-similarity.test.js +68 -0
- package/node_modules/@ktx/context/dist/scan/relationship-profiling.d.ts +55 -0
- package/node_modules/@ktx/context/dist/scan/relationship-profiling.js +321 -0
- package/node_modules/@ktx/context/dist/scan/relationship-profiling.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/relationship-profiling.test.js +313 -0
- package/node_modules/@ktx/context/dist/scan/relationship-review-apply.d.ts +34 -0
- package/node_modules/@ktx/context/dist/scan/relationship-review-apply.js +152 -0
- package/node_modules/@ktx/context/dist/scan/relationship-review-apply.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/relationship-review-apply.test.js +321 -0
- package/node_modules/@ktx/context/dist/scan/relationship-review-decisions.d.ts +46 -0
- package/node_modules/@ktx/context/dist/scan/relationship-review-decisions.js +92 -0
- package/node_modules/@ktx/context/dist/scan/relationship-review-decisions.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/relationship-review-decisions.test.js +312 -0
- package/node_modules/@ktx/context/dist/scan/relationship-scoring.d.ts +29 -0
- package/node_modules/@ktx/context/dist/scan/relationship-scoring.js +95 -0
- package/node_modules/@ktx/context/dist/scan/relationship-scoring.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/relationship-scoring.test.js +86 -0
- package/node_modules/@ktx/context/dist/scan/relationship-threshold-advice.d.ts +60 -0
- package/node_modules/@ktx/context/dist/scan/relationship-threshold-advice.js +190 -0
- package/node_modules/@ktx/context/dist/scan/relationship-threshold-advice.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/relationship-threshold-advice.test.js +205 -0
- package/node_modules/@ktx/context/dist/scan/relationship-validation.d.ts +44 -0
- package/node_modules/@ktx/context/dist/scan/relationship-validation.js +240 -0
- package/node_modules/@ktx/context/dist/scan/relationship-validation.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/relationship-validation.test.js +450 -0
- package/node_modules/@ktx/context/dist/scan/sqlite-local-enrichment-state-store.d.ts +12 -0
- package/node_modules/@ktx/context/dist/scan/sqlite-local-enrichment-state-store.js +190 -0
- package/node_modules/@ktx/context/dist/scan/type-normalization.d.ts +8 -0
- package/node_modules/@ktx/context/dist/scan/type-normalization.js +23 -0
- package/node_modules/@ktx/context/dist/scan/type-normalization.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/type-normalization.test.js +21 -0
- package/node_modules/@ktx/context/dist/scan/types.d.ts +309 -0
- package/node_modules/@ktx/context/dist/scan/types.js +13 -0
- package/node_modules/@ktx/context/dist/scan/types.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/types.test.js +206 -0
- package/node_modules/@ktx/context/dist/scan/warehouse-catalog.d.ts +69 -0
- package/node_modules/@ktx/context/dist/scan/warehouse-catalog.js +311 -0
- package/node_modules/@ktx/context/dist/scan/warehouse-catalog.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/scan/warehouse-catalog.test.js +158 -0
- package/node_modules/@ktx/context/dist/search/backend-conformance.d.ts +39 -0
- package/node_modules/@ktx/context/dist/search/backend-conformance.js +88 -0
- package/node_modules/@ktx/context/dist/search/backend-conformance.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/search/backend-conformance.test.js +408 -0
- package/node_modules/@ktx/context/dist/search/discover.d.ts +30 -0
- package/node_modules/@ktx/context/dist/search/discover.js +340 -0
- package/node_modules/@ktx/context/dist/search/discover.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/search/discover.test.js +197 -0
- package/node_modules/@ktx/context/dist/search/hybrid-search-core.d.ts +4 -0
- package/node_modules/@ktx/context/dist/search/hybrid-search-core.js +106 -0
- package/node_modules/@ktx/context/dist/search/hybrid-search-core.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/search/hybrid-search-core.test.js +113 -0
- package/node_modules/@ktx/context/dist/search/index.d.ts +8 -0
- package/node_modules/@ktx/context/dist/search/index.js +5 -0
- package/node_modules/@ktx/context/dist/search/pglite-owner-process.d.ts +27 -0
- package/node_modules/@ktx/context/dist/search/pglite-owner-process.js +89 -0
- package/node_modules/@ktx/context/dist/search/pglite-owner-process.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/search/pglite-owner-process.test.js +286 -0
- package/node_modules/@ktx/context/dist/search/pglite-runtime-boundary.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/search/pglite-runtime-boundary.test.js +48 -0
- package/node_modules/@ktx/context/dist/search/pglite-spike.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/search/pglite-spike.test.js +249 -0
- package/node_modules/@ktx/context/dist/search/query.d.ts +3 -0
- package/node_modules/@ktx/context/dist/search/query.js +15 -0
- package/node_modules/@ktx/context/dist/search/query.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/search/query.test.js +23 -0
- package/node_modules/@ktx/context/dist/search/rrf.d.ts +5 -0
- package/node_modules/@ktx/context/dist/search/rrf.js +13 -0
- package/node_modules/@ktx/context/dist/search/rrf.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/search/rrf.test.js +47 -0
- package/node_modules/@ktx/context/dist/search/types.d.ts +73 -0
- package/node_modules/@ktx/context/dist/search/types.js +1 -0
- package/node_modules/@ktx/context/dist/skills/index.d.ts +2 -0
- package/node_modules/@ktx/context/dist/skills/index.js +1 -0
- package/node_modules/@ktx/context/dist/skills/skills-registry.service.d.ts +35 -0
- package/node_modules/@ktx/context/dist/skills/skills-registry.service.js +215 -0
- package/node_modules/@ktx/context/dist/skills/skills-registry.service.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/skills/skills-registry.service.test.js +161 -0
- package/node_modules/@ktx/context/dist/sl/description-normalization.d.ts +5 -0
- package/node_modules/@ktx/context/dist/sl/description-normalization.js +100 -0
- package/node_modules/@ktx/context/dist/sl/descriptions.d.ts +14 -0
- package/node_modules/@ktx/context/dist/sl/descriptions.js +20 -0
- package/node_modules/@ktx/context/dist/sl/dictionary-search.d.ts +42 -0
- package/node_modules/@ktx/context/dist/sl/dictionary-search.js +121 -0
- package/node_modules/@ktx/context/dist/sl/dictionary-search.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/sl/dictionary-search.test.js +204 -0
- package/node_modules/@ktx/context/dist/sl/index.d.ts +15 -0
- package/node_modules/@ktx/context/dist/sl/index.js +10 -0
- package/node_modules/@ktx/context/dist/sl/local-query.d.ts +17 -0
- package/node_modules/@ktx/context/dist/sl/local-query.js +111 -0
- package/node_modules/@ktx/context/dist/sl/local-query.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/sl/local-query.test.js +218 -0
- package/node_modules/@ktx/context/dist/sl/local-sl.d.ts +60 -0
- package/node_modules/@ktx/context/dist/sl/local-sl.js +484 -0
- package/node_modules/@ktx/context/dist/sl/local-sl.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/sl/local-sl.test.js +334 -0
- package/node_modules/@ktx/context/dist/sl/pglite-sl-search-prototype.d.ts +16 -0
- package/node_modules/@ktx/context/dist/sl/pglite-sl-search-prototype.js +433 -0
- package/node_modules/@ktx/context/dist/sl/pglite-sl-search-prototype.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/sl/pglite-sl-search-prototype.test.js +240 -0
- package/node_modules/@ktx/context/dist/sl/ports.d.ts +61 -0
- package/node_modules/@ktx/context/dist/sl/ports.js +1 -0
- package/node_modules/@ktx/context/dist/sl/schemas.contract.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/sl/schemas.contract.test.js +62 -0
- package/node_modules/@ktx/context/dist/sl/schemas.d.ts +282 -0
- package/node_modules/@ktx/context/dist/sl/schemas.js +181 -0
- package/node_modules/@ktx/context/dist/sl/semantic-layer.service.d.ts +214 -0
- package/node_modules/@ktx/context/dist/sl/semantic-layer.service.js +1334 -0
- package/node_modules/@ktx/context/dist/sl/semantic-layer.service.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/sl/semantic-layer.service.test.js +1084 -0
- package/node_modules/@ktx/context/dist/sl/sl-dictionary-profile.d.ts +9 -0
- package/node_modules/@ktx/context/dist/sl/sl-dictionary-profile.js +80 -0
- package/node_modules/@ktx/context/dist/sl/sl-dictionary-profile.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/sl/sl-dictionary-profile.test.js +88 -0
- package/node_modules/@ktx/context/dist/sl/sl-search.service.d.ts +17 -0
- package/node_modules/@ktx/context/dist/sl/sl-search.service.js +156 -0
- package/node_modules/@ktx/context/dist/sl/sl-search.service.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/sl/sl-search.service.test.js +195 -0
- package/node_modules/@ktx/context/dist/sl/sl-validator.port.d.ts +7 -0
- package/node_modules/@ktx/context/dist/sl/sl-validator.port.js +1 -0
- package/node_modules/@ktx/context/dist/sl/sqlite-sl-sources-index.d.ts +56 -0
- package/node_modules/@ktx/context/dist/sl/sqlite-sl-sources-index.js +419 -0
- package/node_modules/@ktx/context/dist/sl/sqlite-sl-sources-index.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/sl/sqlite-sl-sources-index.test.js +151 -0
- package/node_modules/@ktx/context/dist/sl/tools/base-semantic-layer.tool.d.ts +45 -0
- package/node_modules/@ktx/context/dist/sl/tools/base-semantic-layer.tool.js +91 -0
- package/node_modules/@ktx/context/dist/sl/tools/connection-id-schema.d.ts +2 -0
- package/node_modules/@ktx/context/dist/sl/tools/connection-id-schema.js +5 -0
- package/node_modules/@ktx/context/dist/sl/tools/connection-id-schema.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/sl/tools/connection-id-schema.test.js +14 -0
- package/node_modules/@ktx/context/dist/sl/tools/index.d.ts +11 -0
- package/node_modules/@ktx/context/dist/sl/tools/index.js +8 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-discover.tool.d.ts +52 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-discover.tool.js +260 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-discover.tool.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-discover.tool.test.js +72 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-edit-source.tool.d.ts +33 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-edit-source.tool.js +173 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-edit-source.tool.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-edit-source.tool.test.js +169 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-read-source.tool.d.ts +23 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-read-source.tool.js +47 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-read-source.tool.session.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-read-source.tool.session.test.js +55 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-rollback.tool.d.ts +25 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-rollback.tool.js +63 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-rollback.tool.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-rollback.tool.test.js +57 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-validate.tool.d.ts +23 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-validate.tool.js +100 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-validate.tool.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-validate.tool.test.js +54 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-warehouse-validation.d.ts +29 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-warehouse-validation.js +245 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-warehouse-validation.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-warehouse-validation.test.js +136 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-write-source.tool.d.ts +422 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-write-source.tool.js +315 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-write-source.tool.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-write-source.tool.test.js +285 -0
- package/node_modules/@ktx/context/dist/sl/types.d.ts +147 -0
- package/node_modules/@ktx/context/dist/sl/types.js +1 -0
- package/node_modules/@ktx/context/dist/sql-analysis/http-sql-analysis-port.d.ts +7 -0
- package/node_modules/@ktx/context/dist/sql-analysis/http-sql-analysis-port.js +188 -0
- package/node_modules/@ktx/context/dist/sql-analysis/http-sql-analysis-port.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/sql-analysis/http-sql-analysis-port.test.js +147 -0
- package/node_modules/@ktx/context/dist/sql-analysis/index.d.ts +3 -0
- package/node_modules/@ktx/context/dist/sql-analysis/index.js +1 -0
- package/node_modules/@ktx/context/dist/sql-analysis/ports.d.ts +33 -0
- package/node_modules/@ktx/context/dist/sql-analysis/ports.js +1 -0
- package/node_modules/@ktx/context/dist/test/make-local-git-repo.d.ts +10 -0
- package/node_modules/@ktx/context/dist/test/make-local-git-repo.js +34 -0
- package/node_modules/@ktx/context/dist/tools/action-raw-paths.d.ts +10 -0
- package/node_modules/@ktx/context/dist/tools/action-raw-paths.js +18 -0
- package/node_modules/@ktx/context/dist/tools/authors.d.ts +8 -0
- package/node_modules/@ktx/context/dist/tools/authors.js +4 -0
- package/node_modules/@ktx/context/dist/tools/base-tool.d.ts +85 -0
- package/node_modules/@ktx/context/dist/tools/base-tool.js +94 -0
- package/node_modules/@ktx/context/dist/tools/context-candidate-mark.tool.d.ts +41 -0
- package/node_modules/@ktx/context/dist/tools/context-candidate-mark.tool.js +44 -0
- package/node_modules/@ktx/context/dist/tools/context-candidate-write.tool.d.ts +64 -0
- package/node_modules/@ktx/context/dist/tools/context-candidate-write.tool.js +140 -0
- package/node_modules/@ktx/context/dist/tools/context-evidence-ids.d.ts +3 -0
- package/node_modules/@ktx/context/dist/tools/context-evidence-ids.js +12 -0
- package/node_modules/@ktx/context/dist/tools/context-evidence-neighbors.tool.d.ts +48 -0
- package/node_modules/@ktx/context/dist/tools/context-evidence-neighbors.tool.js +69 -0
- package/node_modules/@ktx/context/dist/tools/context-evidence-read.tool.d.ts +37 -0
- package/node_modules/@ktx/context/dist/tools/context-evidence-read.tool.js +118 -0
- package/node_modules/@ktx/context/dist/tools/context-evidence-search.tool.d.ts +57 -0
- package/node_modules/@ktx/context/dist/tools/context-evidence-search.tool.js +92 -0
- package/node_modules/@ktx/context/dist/tools/context-evidence-tool-store.d.ts +112 -0
- package/node_modules/@ktx/context/dist/tools/context-evidence-tool-store.js +1 -0
- package/node_modules/@ktx/context/dist/tools/context-evidence-tools.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/tools/context-evidence-tools.test.js +486 -0
- package/node_modules/@ktx/context/dist/tools/context-ingest-metadata.d.ts +9 -0
- package/node_modules/@ktx/context/dist/tools/context-ingest-metadata.js +13 -0
- package/node_modules/@ktx/context/dist/tools/index.d.ts +18 -0
- package/node_modules/@ktx/context/dist/tools/index.js +11 -0
- package/node_modules/@ktx/context/dist/tools/sql-edit-replacer.d.ts +16 -0
- package/node_modules/@ktx/context/dist/tools/sql-edit-replacer.js +173 -0
- package/node_modules/@ktx/context/dist/tools/tool-session.d.ts +54 -0
- package/node_modules/@ktx/context/dist/tools/tool-session.js +1 -0
- package/node_modules/@ktx/context/dist/tools/touched-sl-sources.d.ts +12 -0
- package/node_modules/@ktx/context/dist/tools/touched-sl-sources.js +47 -0
- package/node_modules/@ktx/context/dist/tools/touched-sl-sources.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/tools/touched-sl-sources.test.js +31 -0
- package/node_modules/@ktx/context/dist/wiki/index.d.ts +9 -0
- package/node_modules/@ktx/context/dist/wiki/index.js +6 -0
- package/node_modules/@ktx/context/dist/wiki/keys.d.ts +11 -0
- package/node_modules/@ktx/context/dist/wiki/keys.js +26 -0
- package/node_modules/@ktx/context/dist/wiki/knowledge-search-text.d.ts +1 -0
- package/node_modules/@ktx/context/dist/wiki/knowledge-search-text.js +7 -0
- package/node_modules/@ktx/context/dist/wiki/knowledge-wiki.service.d.ts +76 -0
- package/node_modules/@ktx/context/dist/wiki/knowledge-wiki.service.js +346 -0
- package/node_modules/@ktx/context/dist/wiki/knowledge-wiki.service.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/wiki/knowledge-wiki.service.test.js +134 -0
- package/node_modules/@ktx/context/dist/wiki/local-knowledge.d.ts +55 -0
- package/node_modules/@ktx/context/dist/wiki/local-knowledge.js +286 -0
- package/node_modules/@ktx/context/dist/wiki/local-knowledge.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/wiki/local-knowledge.test.js +226 -0
- package/node_modules/@ktx/context/dist/wiki/ports.d.ts +70 -0
- package/node_modules/@ktx/context/dist/wiki/ports.js +1 -0
- package/node_modules/@ktx/context/dist/wiki/sqlite-knowledge-index.d.ts +43 -0
- package/node_modules/@ktx/context/dist/wiki/sqlite-knowledge-index.js +208 -0
- package/node_modules/@ktx/context/dist/wiki/sqlite-knowledge-index.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/wiki/sqlite-knowledge-index.test.js +103 -0
- package/node_modules/@ktx/context/dist/wiki/tools/index.d.ts +5 -0
- package/node_modules/@ktx/context/dist/wiki/tools/index.js +5 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-list-tags.tool.d.ts +16 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-list-tags.tool.js +34 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-list-tags.tool.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-list-tags.tool.test.js +35 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-read.tool.d.ts +28 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-read.tool.js +59 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-read.tool.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-read.tool.test.js +66 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-remove.tool.d.ts +28 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-remove.tool.js +85 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-remove.tool.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-remove.tool.test.js +95 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-search.tool.d.ts +49 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-search.tool.js +51 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-search.tool.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-search.tool.test.js +35 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-write.tool.d.ts +80 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-write.tool.js +255 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-write.tool.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-write.tool.test.js +236 -0
- package/node_modules/@ktx/context/dist/wiki/types.d.ts +50 -0
- package/node_modules/@ktx/context/dist/wiki/types.js +1 -0
- package/node_modules/@ktx/context/package.json +117 -0
- package/node_modules/@ktx/context/prompts/memory_agent_backfill.md +21 -0
- package/node_modules/@ktx/context/prompts/memory_agent_bundle_ingest_reconcile.md +29 -0
- package/node_modules/@ktx/context/prompts/memory_agent_bundle_ingest_work_unit.md +32 -0
- package/node_modules/@ktx/context/prompts/memory_agent_external_ingest.md +28 -0
- package/node_modules/@ktx/context/prompts/memory_agent_research.md +30 -0
- package/node_modules/@ktx/context/prompts/skills/light_extraction.md +40 -0
- package/node_modules/@ktx/context/prompts/skills/page_triage_classifier.md +40 -0
- package/node_modules/@ktx/context/skills/_shared/identifier-verification.md +27 -0
- package/node_modules/@ktx/context/skills/dbt_ingest/SKILL.md +76 -0
- package/node_modules/@ktx/context/skills/historic_sql_patterns/SKILL.md +91 -0
- package/node_modules/@ktx/context/skills/historic_sql_table_digest/SKILL.md +89 -0
- package/node_modules/@ktx/context/skills/ingest_triage/SKILL.md +77 -0
- package/node_modules/@ktx/context/skills/live_database_ingest/SKILL.md +89 -0
- package/node_modules/@ktx/context/skills/looker_ingest/SKILL.md +248 -0
- package/node_modules/@ktx/context/skills/lookml_ingest/SKILL.md +219 -0
- package/node_modules/@ktx/context/skills/metabase_ingest/SKILL.md +253 -0
- package/node_modules/@ktx/context/skills/metricflow_ingest/SKILL.md +313 -0
- package/node_modules/@ktx/context/skills/notion_synthesize/SKILL.md +104 -0
- package/node_modules/@ktx/context/skills/sl/SKILL.md +247 -0
- package/node_modules/@ktx/context/skills/sl_capture/SKILL.md +346 -0
- package/node_modules/@ktx/context/skills/wiki_capture/SKILL.md +160 -0
- package/node_modules/@ktx/llm/dist/embedding-health.d.ts +14 -0
- package/node_modules/@ktx/llm/dist/embedding-health.js +36 -0
- package/node_modules/@ktx/llm/dist/embedding-health.test.d.ts +1 -0
- package/node_modules/@ktx/llm/dist/embedding-health.test.js +72 -0
- package/node_modules/@ktx/llm/dist/embedding-provider.d.ts +35 -0
- package/node_modules/@ktx/llm/dist/embedding-provider.js +287 -0
- package/node_modules/@ktx/llm/dist/embedding-provider.test.d.ts +1 -0
- package/node_modules/@ktx/llm/dist/embedding-provider.test.js +99 -0
- package/node_modules/@ktx/llm/dist/index.d.ts +11 -0
- package/node_modules/@ktx/llm/dist/index.js +6 -0
- package/node_modules/@ktx/llm/dist/message-builder.d.ts +45 -0
- package/node_modules/@ktx/llm/dist/message-builder.js +151 -0
- package/node_modules/@ktx/llm/dist/message-builder.test.d.ts +1 -0
- package/node_modules/@ktx/llm/dist/message-builder.test.js +127 -0
- package/node_modules/@ktx/llm/dist/model-health.d.ts +18 -0
- package/node_modules/@ktx/llm/dist/model-health.js +38 -0
- package/node_modules/@ktx/llm/dist/model-health.test.d.ts +1 -0
- package/node_modules/@ktx/llm/dist/model-health.test.js +55 -0
- package/node_modules/@ktx/llm/dist/model-provider.d.ts +22 -0
- package/node_modules/@ktx/llm/dist/model-provider.js +150 -0
- package/node_modules/@ktx/llm/dist/model-provider.test.d.ts +1 -0
- package/node_modules/@ktx/llm/dist/model-provider.test.js +246 -0
- package/node_modules/@ktx/llm/dist/package-exports.test.d.ts +1 -0
- package/node_modules/@ktx/llm/dist/package-exports.test.js +17 -0
- package/node_modules/@ktx/llm/dist/repair.d.ts +8 -0
- package/node_modules/@ktx/llm/dist/repair.js +75 -0
- package/node_modules/@ktx/llm/dist/repair.test.d.ts +1 -0
- package/node_modules/@ktx/llm/dist/repair.test.js +78 -0
- package/node_modules/@ktx/llm/dist/types.d.ts +105 -0
- package/node_modules/@ktx/llm/dist/types.js +1 -0
- package/node_modules/@ktx/llm/package.json +20 -0
- package/package.json +74 -7
- package/README.md +0 -3
|
@@ -0,0 +1,1478 @@
|
|
|
1
|
+
import { execFile } from 'node:child_process';
|
|
2
|
+
import { mkdir, mkdtemp, readFile, rm, stat, writeFile } from 'node:fs/promises';
|
|
3
|
+
import { tmpdir } from 'node:os';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
import { promisify } from 'node:util';
|
|
6
|
+
import { writeKtxSetupState } from '@ktx/context/project';
|
|
7
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
8
|
+
import { localFakeBundleReport, persistLocalBundleReport } from './ingest.test-utils.js';
|
|
9
|
+
import { contextBuildCommands, writeKtxSetupContextState } from './setup-context.js';
|
|
10
|
+
import { runDemoTour } from './setup-demo-tour.js';
|
|
11
|
+
import { formatKtxSetupStatus, readKtxSetupStatus, runKtxSetup } from './setup.js';
|
|
12
|
+
vi.mock('./setup-demo-tour.js', () => ({
|
|
13
|
+
runDemoTour: vi.fn(async () => 0),
|
|
14
|
+
}));
|
|
15
|
+
const execFileAsync = promisify(execFile);
|
|
16
|
+
function makeIo() {
|
|
17
|
+
let stdout = '';
|
|
18
|
+
let stderr = '';
|
|
19
|
+
return {
|
|
20
|
+
io: {
|
|
21
|
+
stdout: {
|
|
22
|
+
write: (chunk) => {
|
|
23
|
+
stdout += chunk;
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
stderr: {
|
|
27
|
+
write: (chunk) => {
|
|
28
|
+
stderr += chunk;
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
stdout: () => stdout,
|
|
33
|
+
stderr: () => stderr,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
describe('setup status', () => {
|
|
37
|
+
let tempDir;
|
|
38
|
+
beforeEach(async () => {
|
|
39
|
+
tempDir = await mkdtemp(join(tmpdir(), 'ktx-setup-status-'));
|
|
40
|
+
});
|
|
41
|
+
afterEach(async () => {
|
|
42
|
+
await rm(tempDir, { recursive: true, force: true });
|
|
43
|
+
});
|
|
44
|
+
it('reports a missing project without creating files', async () => {
|
|
45
|
+
const status = await readKtxSetupStatus(tempDir);
|
|
46
|
+
expect(status).toMatchObject({
|
|
47
|
+
project: { path: tempDir, ready: false },
|
|
48
|
+
llm: { ready: false },
|
|
49
|
+
embeddings: { ready: false },
|
|
50
|
+
databases: [],
|
|
51
|
+
sources: [],
|
|
52
|
+
context: { ready: false, status: 'not_started' },
|
|
53
|
+
agents: [],
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
it('reports deterministic default embeddings as not setup-ready', async () => {
|
|
57
|
+
await mkdir(tempDir, { recursive: true });
|
|
58
|
+
await writeFile(join(tempDir, 'ktx.yaml'), [
|
|
59
|
+
'llm:',
|
|
60
|
+
' provider:',
|
|
61
|
+
' backend: anthropic',
|
|
62
|
+
' anthropic:',
|
|
63
|
+
' api_key: env:ANTHROPIC_API_KEY', // pragma: allowlist secret
|
|
64
|
+
' models:',
|
|
65
|
+
' default: claude-sonnet-4-6',
|
|
66
|
+
'ingest:',
|
|
67
|
+
' embeddings:',
|
|
68
|
+
' backend: deterministic',
|
|
69
|
+
' model: deterministic',
|
|
70
|
+
' dimensions: 8',
|
|
71
|
+
'connections: {}',
|
|
72
|
+
].join('\n'), 'utf-8');
|
|
73
|
+
await expect(readKtxSetupStatus(tempDir)).resolves.toMatchObject({
|
|
74
|
+
project: { path: tempDir, ready: true },
|
|
75
|
+
llm: { backend: 'anthropic', ready: true, model: 'claude-sonnet-4-6' },
|
|
76
|
+
embeddings: { backend: 'deterministic', ready: false, model: 'deterministic', dimensions: 8 },
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
it.each([
|
|
80
|
+
{
|
|
81
|
+
backend: 'vertex',
|
|
82
|
+
providerLines: [' backend: vertex', ' vertex:', ' project: kaelio-dev', ' location: us-east5'],
|
|
83
|
+
model: 'claude-sonnet-4-6',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
backend: 'gateway',
|
|
87
|
+
providerLines: [' backend: gateway', ' gateway:', ' api_key: env:AI_GATEWAY_API_KEY'],
|
|
88
|
+
model: 'anthropic/claude-sonnet-4-6',
|
|
89
|
+
},
|
|
90
|
+
])('reports configured $backend llm backends as setup-ready', async (fixture) => {
|
|
91
|
+
await mkdir(tempDir, { recursive: true });
|
|
92
|
+
await writeFile(join(tempDir, 'ktx.yaml'), [
|
|
93
|
+
'llm:',
|
|
94
|
+
' provider:',
|
|
95
|
+
...fixture.providerLines,
|
|
96
|
+
' models:',
|
|
97
|
+
` default: ${fixture.model}`,
|
|
98
|
+
'connections: {}',
|
|
99
|
+
].join('\n'), 'utf-8');
|
|
100
|
+
await expect(readKtxSetupStatus(tempDir)).resolves.toMatchObject({
|
|
101
|
+
llm: { backend: fixture.backend, ready: true, model: fixture.model },
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
it('uses setup database connection ids when present', async () => {
|
|
105
|
+
await writeFile(join(tempDir, 'ktx.yaml'), [
|
|
106
|
+
'setup:',
|
|
107
|
+
' database_connection_ids:',
|
|
108
|
+
' - warehouse',
|
|
109
|
+
' - analytics',
|
|
110
|
+
'connections:',
|
|
111
|
+
' warehouse:',
|
|
112
|
+
' driver: postgres',
|
|
113
|
+
' url: env:WAREHOUSE_URL',
|
|
114
|
+
'ingest:',
|
|
115
|
+
' embeddings:',
|
|
116
|
+
' backend: openai',
|
|
117
|
+
' model: text-embedding-3-small',
|
|
118
|
+
' dimensions: 1536',
|
|
119
|
+
' openai:',
|
|
120
|
+
' api_key: env:OPENAI_API_KEY', // pragma: allowlist secret
|
|
121
|
+
].join('\n'), 'utf-8');
|
|
122
|
+
await writeKtxSetupState(tempDir, { completed_steps: ['project', 'databases'] });
|
|
123
|
+
await expect(readKtxSetupStatus(tempDir)).resolves.toMatchObject({
|
|
124
|
+
databases: [
|
|
125
|
+
{ connectionId: 'warehouse', ready: true },
|
|
126
|
+
{ connectionId: 'analytics', ready: false },
|
|
127
|
+
],
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
it('reports selected databases as ready only after the database setup step is complete', async () => {
|
|
131
|
+
await writeFile(join(tempDir, 'ktx.yaml'), [
|
|
132
|
+
'setup:',
|
|
133
|
+
' database_connection_ids:',
|
|
134
|
+
' - warehouse',
|
|
135
|
+
'connections:',
|
|
136
|
+
' warehouse:',
|
|
137
|
+
' driver: postgres',
|
|
138
|
+
' url: env:DATABASE_URL',
|
|
139
|
+
'',
|
|
140
|
+
].join('\n'), 'utf-8');
|
|
141
|
+
await writeKtxSetupState(tempDir, { completed_steps: ['project'] });
|
|
142
|
+
await expect(readKtxSetupStatus(tempDir)).resolves.toMatchObject({
|
|
143
|
+
databases: [{ connectionId: 'warehouse', ready: false }],
|
|
144
|
+
});
|
|
145
|
+
await writeFile(join(tempDir, 'ktx.yaml'), [
|
|
146
|
+
'setup:',
|
|
147
|
+
' database_connection_ids:',
|
|
148
|
+
' - warehouse',
|
|
149
|
+
'connections:',
|
|
150
|
+
' warehouse:',
|
|
151
|
+
' driver: postgres',
|
|
152
|
+
' url: env:DATABASE_URL',
|
|
153
|
+
'',
|
|
154
|
+
].join('\n'), 'utf-8');
|
|
155
|
+
await writeKtxSetupState(tempDir, { completed_steps: ['project', 'databases'] });
|
|
156
|
+
await expect(readKtxSetupStatus(tempDir)).resolves.toMatchObject({
|
|
157
|
+
databases: [{ connectionId: 'warehouse', ready: true }],
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
it('reports source status from configured source connections', async () => {
|
|
161
|
+
await writeFile(join(tempDir, 'ktx.yaml'), [
|
|
162
|
+
'setup:',
|
|
163
|
+
' database_connection_ids: []',
|
|
164
|
+
'connections:',
|
|
165
|
+
' docs:',
|
|
166
|
+
' driver: notion',
|
|
167
|
+
' auth_token_ref: env:NOTION_TOKEN',
|
|
168
|
+
' crawl_mode: all_accessible',
|
|
169
|
+
' warehouse:',
|
|
170
|
+
' driver: postgres',
|
|
171
|
+
' url: env:DATABASE_URL',
|
|
172
|
+
'',
|
|
173
|
+
].join('\n'), 'utf-8');
|
|
174
|
+
await writeKtxSetupState(tempDir, { completed_steps: ['project', 'sources'] });
|
|
175
|
+
await expect(readKtxSetupStatus(tempDir)).resolves.toMatchObject({
|
|
176
|
+
sources: [{ connectionId: 'docs', type: 'notion', ready: true }],
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
it('reports agent status from the install manifest', async () => {
|
|
180
|
+
await mkdir(join(tempDir, '.ktx', 'agents'), { recursive: true });
|
|
181
|
+
await writeFile(join(tempDir, 'ktx.yaml'), 'connections: {}\n', 'utf-8');
|
|
182
|
+
await writeFile(join(tempDir, '.ktx/agents/install-manifest.json'), JSON.stringify({
|
|
183
|
+
version: 1,
|
|
184
|
+
projectDir: tempDir,
|
|
185
|
+
installedAt: '2026-05-07T00:00:00.000Z',
|
|
186
|
+
installs: [{ target: 'codex', scope: 'project', mode: 'cli' }],
|
|
187
|
+
entries: [],
|
|
188
|
+
}, null, 2), 'utf-8');
|
|
189
|
+
await expect(readKtxSetupStatus(tempDir)).resolves.toMatchObject({
|
|
190
|
+
agents: [{ target: 'codex', scope: 'project', ready: true }],
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
it('reports setup-managed context build status and commands', async () => {
|
|
194
|
+
await writeFile(join(tempDir, 'ktx.yaml'), [
|
|
195
|
+
'setup:',
|
|
196
|
+
' database_connection_ids:',
|
|
197
|
+
' - warehouse',
|
|
198
|
+
'connections:',
|
|
199
|
+
' warehouse:',
|
|
200
|
+
' driver: postgres',
|
|
201
|
+
' url: env:DATABASE_URL',
|
|
202
|
+
'llm:',
|
|
203
|
+
' provider:',
|
|
204
|
+
' backend: anthropic',
|
|
205
|
+
' models:',
|
|
206
|
+
' default: claude-sonnet-4-6',
|
|
207
|
+
'ingest:',
|
|
208
|
+
' embeddings:',
|
|
209
|
+
' backend: openai',
|
|
210
|
+
' model: text-embedding-3-small',
|
|
211
|
+
' dimensions: 1536',
|
|
212
|
+
'',
|
|
213
|
+
].join('\n'), 'utf-8');
|
|
214
|
+
await writeKtxSetupState(tempDir, {
|
|
215
|
+
completed_steps: ['project', 'llm', 'embeddings', 'databases', 'sources'],
|
|
216
|
+
});
|
|
217
|
+
await writeKtxSetupContextState(tempDir, {
|
|
218
|
+
runId: 'setup-context-local-abc123',
|
|
219
|
+
status: 'stale',
|
|
220
|
+
startedAt: '2026-05-09T10:00:00.000Z',
|
|
221
|
+
updatedAt: '2026-05-09T10:01:00.000Z',
|
|
222
|
+
primarySourceConnectionIds: ['warehouse'],
|
|
223
|
+
contextSourceConnectionIds: [],
|
|
224
|
+
reportIds: [],
|
|
225
|
+
artifactPaths: [],
|
|
226
|
+
retryableFailedTargets: [],
|
|
227
|
+
commands: contextBuildCommands(tempDir, 'setup-context-local-abc123'),
|
|
228
|
+
failureReason: 'Previous foreground context build did not finish. Rerun setup or ktx ingest.',
|
|
229
|
+
});
|
|
230
|
+
await expect(readKtxSetupStatus(tempDir)).resolves.toMatchObject({
|
|
231
|
+
context: {
|
|
232
|
+
ready: false,
|
|
233
|
+
status: 'stale',
|
|
234
|
+
runId: 'setup-context-local-abc123',
|
|
235
|
+
statusCommand: `ktx status --project-dir ${tempDir}`,
|
|
236
|
+
detail: 'Previous foreground context build did not finish. Rerun setup or ktx ingest.',
|
|
237
|
+
},
|
|
238
|
+
});
|
|
239
|
+
});
|
|
240
|
+
it('reports Vertex LLM and context ready after a successful Metabase ingest report', async () => {
|
|
241
|
+
await writeFile(join(tempDir, 'ktx.yaml'), [
|
|
242
|
+
'setup:',
|
|
243
|
+
' database_connection_ids:',
|
|
244
|
+
' - warehouse',
|
|
245
|
+
'connections:',
|
|
246
|
+
' warehouse:',
|
|
247
|
+
' driver: postgres',
|
|
248
|
+
' url: env:DATABASE_URL',
|
|
249
|
+
' metabase:',
|
|
250
|
+
' driver: metabase',
|
|
251
|
+
' api_url: https://metabase.example.test',
|
|
252
|
+
' api_key_ref: env:METABASE_API_KEY',
|
|
253
|
+
' warehouse_connection_id: warehouse',
|
|
254
|
+
'llm:',
|
|
255
|
+
' provider:',
|
|
256
|
+
' backend: vertex',
|
|
257
|
+
' vertex:',
|
|
258
|
+
' project: kaelio-dev',
|
|
259
|
+
' location: us-east5',
|
|
260
|
+
' models:',
|
|
261
|
+
' default: claude-sonnet-4-6',
|
|
262
|
+
'ingest:',
|
|
263
|
+
' embeddings:',
|
|
264
|
+
' backend: deterministic',
|
|
265
|
+
' model: deterministic',
|
|
266
|
+
' dimensions: 8',
|
|
267
|
+
'',
|
|
268
|
+
].join('\n'), 'utf-8');
|
|
269
|
+
await writeKtxSetupState(tempDir, { completed_steps: ['project', 'databases', 'sources'] });
|
|
270
|
+
await persistLocalBundleReport(tempDir, localFakeBundleReport('metabase-job-1', {
|
|
271
|
+
connectionId: 'warehouse',
|
|
272
|
+
sourceKey: 'metabase',
|
|
273
|
+
}));
|
|
274
|
+
const status = await readKtxSetupStatus(tempDir);
|
|
275
|
+
const rendered = formatKtxSetupStatus(status);
|
|
276
|
+
expect(status.llm).toMatchObject({ backend: 'vertex', ready: true, model: 'claude-sonnet-4-6' });
|
|
277
|
+
expect(status.context).toMatchObject({ ready: true, status: 'completed' });
|
|
278
|
+
expect(rendered).toContain('LLM ready: yes (claude-sonnet-4-6)');
|
|
279
|
+
expect(rendered).toContain('KTX context built: yes');
|
|
280
|
+
});
|
|
281
|
+
it('formats plain and JSON setup status payloads', async () => {
|
|
282
|
+
const status = await readKtxSetupStatus(tempDir);
|
|
283
|
+
const rendered = formatKtxSetupStatus(status);
|
|
284
|
+
expect(rendered).toContain(`No KTX project found at ${tempDir}.`);
|
|
285
|
+
expect(rendered).toContain('Check another project: ktx --project-dir <folder> status');
|
|
286
|
+
expect(rendered).toContain('Or from that folder: ktx status');
|
|
287
|
+
expect(rendered).toContain('Create a new KTX project here: ktx setup');
|
|
288
|
+
expect(rendered).not.toContain('Project ready: no');
|
|
289
|
+
expect(JSON.parse(JSON.stringify(status))).toMatchObject({ project: { path: tempDir, ready: false } });
|
|
290
|
+
});
|
|
291
|
+
it('prints the readiness checklist for an existing project', async () => {
|
|
292
|
+
await writeFile(join(tempDir, 'ktx.yaml'), 'connections: {}\n', 'utf-8');
|
|
293
|
+
const rendered = formatKtxSetupStatus(await readKtxSetupStatus(tempDir));
|
|
294
|
+
expect(rendered).toContain(`KTX project: ${tempDir}`);
|
|
295
|
+
expect(rendered).toContain('Project ready: yes');
|
|
296
|
+
expect(rendered).toContain('LLM ready: no');
|
|
297
|
+
expect(rendered).toContain('Databases configured: no');
|
|
298
|
+
expect(rendered).not.toContain(['Primary sources', 'configured'].join(' '));
|
|
299
|
+
expect(rendered).toContain('KTX context built: no');
|
|
300
|
+
expect(rendered).not.toContain('No KTX project found.');
|
|
301
|
+
});
|
|
302
|
+
it('prints the setup shell intro for auto-created run mode', async () => {
|
|
303
|
+
const testIo = makeIo();
|
|
304
|
+
await expect(runKtxSetup({
|
|
305
|
+
command: 'run',
|
|
306
|
+
projectDir: tempDir,
|
|
307
|
+
mode: 'auto',
|
|
308
|
+
agents: false,
|
|
309
|
+
skipAgents: true,
|
|
310
|
+
inputMode: 'disabled',
|
|
311
|
+
yes: true,
|
|
312
|
+
cliVersion: '0.2.0',
|
|
313
|
+
skipLlm: true,
|
|
314
|
+
skipEmbeddings: true,
|
|
315
|
+
databaseSchemas: [],
|
|
316
|
+
skipDatabases: true,
|
|
317
|
+
skipSources: true,
|
|
318
|
+
}, testIo.io)).resolves.toBe(0);
|
|
319
|
+
expect(testIo.stdout()).toContain('KTX setup');
|
|
320
|
+
expect(testIo.stdout()).toContain(`Project: ${tempDir}`);
|
|
321
|
+
expect(testIo.stdout()).toContain('Project ready: yes');
|
|
322
|
+
expect(testIo.stdout()).toContain('What you can do next:');
|
|
323
|
+
expect(testIo.stdout()).toContain('Connect data, then build context.');
|
|
324
|
+
expect(testIo.stdout()).toContain('ktx setup');
|
|
325
|
+
expect(testIo.stdout()).not.toContain('ktx agent context --json');
|
|
326
|
+
expect(testIo.stdout()).not.toContain('Optional MCP:');
|
|
327
|
+
expect(testIo.stderr()).toBe('');
|
|
328
|
+
});
|
|
329
|
+
it('shows demo near the bottom of the first setup intent menu before project creation', async () => {
|
|
330
|
+
const testIo = makeIo();
|
|
331
|
+
const select = vi.fn(async (options) => {
|
|
332
|
+
const labels = options.options.map((option) => option.label);
|
|
333
|
+
expect(labels).toEqual([
|
|
334
|
+
'Set up KTX for my data',
|
|
335
|
+
'Check setup status',
|
|
336
|
+
'Explore a pre-built KTX project',
|
|
337
|
+
'Exit',
|
|
338
|
+
]);
|
|
339
|
+
expect(labels.indexOf('Explore a pre-built KTX project')).toBe(labels.length - 2);
|
|
340
|
+
return 'exit';
|
|
341
|
+
});
|
|
342
|
+
const cancel = vi.fn();
|
|
343
|
+
await expect(runKtxSetup({
|
|
344
|
+
command: 'run',
|
|
345
|
+
projectDir: tempDir,
|
|
346
|
+
mode: 'auto',
|
|
347
|
+
agents: false,
|
|
348
|
+
skipAgents: false,
|
|
349
|
+
inputMode: 'auto',
|
|
350
|
+
yes: false,
|
|
351
|
+
cliVersion: '0.2.0',
|
|
352
|
+
skipLlm: false,
|
|
353
|
+
skipEmbeddings: false,
|
|
354
|
+
databaseSchemas: [],
|
|
355
|
+
skipDatabases: false,
|
|
356
|
+
skipSources: false,
|
|
357
|
+
showEntryMenu: true,
|
|
358
|
+
}, testIo.io, { entryMenuDeps: { prompts: { select, cancel } } })).resolves.toBe(0);
|
|
359
|
+
expect(select).toHaveBeenCalledWith(expect.objectContaining({ message: 'What do you want to do?' }));
|
|
360
|
+
expect(cancel).toHaveBeenCalledWith('Setup cancelled.');
|
|
361
|
+
});
|
|
362
|
+
it('shows agent connection only when the selected setup project exists', async () => {
|
|
363
|
+
const missingIo = makeIo();
|
|
364
|
+
const existingIo = makeIo();
|
|
365
|
+
const missingSelect = vi.fn(async (options) => {
|
|
366
|
+
expect(options.options.map((option) => option.label)).not.toContain('Connect a coding agent to KTX');
|
|
367
|
+
return 'exit';
|
|
368
|
+
});
|
|
369
|
+
const existingSelect = vi.fn(async (options) => {
|
|
370
|
+
const labels = options.options.map((option) => option.label);
|
|
371
|
+
expect(labels).toEqual([
|
|
372
|
+
'Resume or change an existing setup',
|
|
373
|
+
'Create a new KTX project',
|
|
374
|
+
'Connect a coding agent to KTX',
|
|
375
|
+
'Check setup status',
|
|
376
|
+
'Explore a pre-built KTX project',
|
|
377
|
+
'Exit',
|
|
378
|
+
]);
|
|
379
|
+
return 'exit';
|
|
380
|
+
});
|
|
381
|
+
await expect(runKtxSetup({
|
|
382
|
+
command: 'run',
|
|
383
|
+
projectDir: tempDir,
|
|
384
|
+
mode: 'auto',
|
|
385
|
+
agents: false,
|
|
386
|
+
skipAgents: false,
|
|
387
|
+
inputMode: 'auto',
|
|
388
|
+
yes: false,
|
|
389
|
+
cliVersion: '0.2.0',
|
|
390
|
+
skipLlm: false,
|
|
391
|
+
skipEmbeddings: false,
|
|
392
|
+
databaseSchemas: [],
|
|
393
|
+
skipDatabases: false,
|
|
394
|
+
skipSources: false,
|
|
395
|
+
showEntryMenu: true,
|
|
396
|
+
}, missingIo.io, { entryMenuDeps: { prompts: { select: missingSelect, cancel: vi.fn() } } })).resolves.toBe(0);
|
|
397
|
+
await writeFile(join(tempDir, 'ktx.yaml'), 'connections: {}\n', 'utf-8');
|
|
398
|
+
await expect(runKtxSetup({
|
|
399
|
+
command: 'run',
|
|
400
|
+
projectDir: tempDir,
|
|
401
|
+
mode: 'auto',
|
|
402
|
+
agents: false,
|
|
403
|
+
skipAgents: false,
|
|
404
|
+
inputMode: 'auto',
|
|
405
|
+
yes: false,
|
|
406
|
+
cliVersion: '0.2.0',
|
|
407
|
+
skipLlm: false,
|
|
408
|
+
skipEmbeddings: false,
|
|
409
|
+
databaseSchemas: [],
|
|
410
|
+
skipDatabases: false,
|
|
411
|
+
skipSources: false,
|
|
412
|
+
showEntryMenu: true,
|
|
413
|
+
}, existingIo.io, { entryMenuDeps: { prompts: { select: existingSelect, cancel: vi.fn() } } })).resolves.toBe(0);
|
|
414
|
+
expect(missingSelect).toHaveBeenCalledTimes(1);
|
|
415
|
+
expect(existingSelect).toHaveBeenCalledTimes(1);
|
|
416
|
+
});
|
|
417
|
+
it('lets Back from project selection return to the first setup intent menu', async () => {
|
|
418
|
+
const entryChoices = ['setup', 'exit'];
|
|
419
|
+
const entryPrompts = {
|
|
420
|
+
select: vi.fn(async () => entryChoices.shift() ?? 'exit'),
|
|
421
|
+
cancel: vi.fn(),
|
|
422
|
+
};
|
|
423
|
+
const projectPrompts = {
|
|
424
|
+
select: vi.fn(async () => 'back'),
|
|
425
|
+
text: vi.fn(),
|
|
426
|
+
cancel: vi.fn(),
|
|
427
|
+
};
|
|
428
|
+
await expect(runKtxSetup({
|
|
429
|
+
command: 'run',
|
|
430
|
+
projectDir: tempDir,
|
|
431
|
+
mode: 'auto',
|
|
432
|
+
agents: false,
|
|
433
|
+
skipAgents: true,
|
|
434
|
+
inputMode: 'auto',
|
|
435
|
+
yes: false,
|
|
436
|
+
cliVersion: '0.2.0',
|
|
437
|
+
skipLlm: true,
|
|
438
|
+
skipEmbeddings: true,
|
|
439
|
+
databaseSchemas: [],
|
|
440
|
+
skipDatabases: true,
|
|
441
|
+
skipSources: true,
|
|
442
|
+
showEntryMenu: true,
|
|
443
|
+
}, makeIo().io, {
|
|
444
|
+
entryMenuDeps: { prompts: entryPrompts },
|
|
445
|
+
project: { prompts: projectPrompts },
|
|
446
|
+
})).resolves.toBe(0);
|
|
447
|
+
expect(projectPrompts.select).toHaveBeenCalledWith(expect.objectContaining({
|
|
448
|
+
message: 'Where should KTX create the project?',
|
|
449
|
+
options: expect.arrayContaining([expect.objectContaining({ value: 'back', label: 'Back' })]),
|
|
450
|
+
}));
|
|
451
|
+
expect(projectPrompts.select).toHaveBeenCalledWith(expect.objectContaining({
|
|
452
|
+
message: 'Where should KTX create the project?',
|
|
453
|
+
options: expect.not.arrayContaining([expect.objectContaining({ value: 'exit', label: 'Exit' })]),
|
|
454
|
+
}));
|
|
455
|
+
expect(entryPrompts.select).toHaveBeenCalledTimes(2);
|
|
456
|
+
expect(entryPrompts.cancel).toHaveBeenCalledWith('Setup cancelled.');
|
|
457
|
+
expect(projectPrompts.cancel).not.toHaveBeenCalled();
|
|
458
|
+
await expect(stat(join(tempDir, 'ktx.yaml'))).rejects.toThrow();
|
|
459
|
+
});
|
|
460
|
+
it('lets Back from new project creation return to the first setup intent menu', async () => {
|
|
461
|
+
const existingConfig = 'connections: {}\n';
|
|
462
|
+
await writeFile(join(tempDir, 'ktx.yaml'), existingConfig, 'utf-8');
|
|
463
|
+
const entryChoices = ['new-project', 'exit'];
|
|
464
|
+
const entryPrompts = {
|
|
465
|
+
select: vi.fn(async () => entryChoices.shift() ?? 'exit'),
|
|
466
|
+
cancel: vi.fn(),
|
|
467
|
+
};
|
|
468
|
+
const projectPrompts = {
|
|
469
|
+
select: vi.fn(async () => 'back'),
|
|
470
|
+
text: vi.fn(),
|
|
471
|
+
cancel: vi.fn(),
|
|
472
|
+
};
|
|
473
|
+
await expect(runKtxSetup({
|
|
474
|
+
command: 'run',
|
|
475
|
+
projectDir: tempDir,
|
|
476
|
+
mode: 'auto',
|
|
477
|
+
agents: false,
|
|
478
|
+
skipAgents: true,
|
|
479
|
+
inputMode: 'auto',
|
|
480
|
+
yes: false,
|
|
481
|
+
cliVersion: '0.2.0',
|
|
482
|
+
skipLlm: true,
|
|
483
|
+
skipEmbeddings: true,
|
|
484
|
+
databaseSchemas: [],
|
|
485
|
+
skipDatabases: true,
|
|
486
|
+
skipSources: true,
|
|
487
|
+
showEntryMenu: true,
|
|
488
|
+
}, makeIo().io, {
|
|
489
|
+
entryMenuDeps: { prompts: entryPrompts },
|
|
490
|
+
project: { prompts: projectPrompts },
|
|
491
|
+
})).resolves.toBe(0);
|
|
492
|
+
expect(projectPrompts.select).toHaveBeenCalledWith(expect.objectContaining({
|
|
493
|
+
message: 'Where should KTX create the project?',
|
|
494
|
+
options: expect.arrayContaining([expect.objectContaining({ value: 'back', label: 'Back' })]),
|
|
495
|
+
}));
|
|
496
|
+
expect(entryPrompts.select).toHaveBeenCalledTimes(2);
|
|
497
|
+
expect(entryPrompts.cancel).toHaveBeenCalledWith('Setup cancelled.');
|
|
498
|
+
expect(projectPrompts.cancel).not.toHaveBeenCalled();
|
|
499
|
+
await expect(readFile(join(tempDir, 'ktx.yaml'), 'utf-8')).resolves.toBe(existingConfig);
|
|
500
|
+
});
|
|
501
|
+
it('creates a separate project when the existing setup menu chooses new project', async () => {
|
|
502
|
+
const existingProjectDir = join(tempDir, 'existing');
|
|
503
|
+
const newProjectDir = join(tempDir, 'fresh');
|
|
504
|
+
await mkdir(existingProjectDir, { recursive: true });
|
|
505
|
+
const existingConfig = 'connections: {}\n';
|
|
506
|
+
await writeFile(join(existingProjectDir, 'ktx.yaml'), existingConfig, 'utf-8');
|
|
507
|
+
const projectChoices = ['custom', 'create'];
|
|
508
|
+
const projectPrompts = {
|
|
509
|
+
select: vi.fn(async () => projectChoices.shift() ?? 'exit'),
|
|
510
|
+
text: vi.fn(async () => newProjectDir),
|
|
511
|
+
cancel: vi.fn(),
|
|
512
|
+
};
|
|
513
|
+
const model = vi.fn(async (args) => ({
|
|
514
|
+
status: 'skipped',
|
|
515
|
+
projectDir: args.projectDir,
|
|
516
|
+
}));
|
|
517
|
+
const embeddings = vi.fn(async (args) => ({
|
|
518
|
+
status: 'skipped',
|
|
519
|
+
projectDir: args.projectDir,
|
|
520
|
+
}));
|
|
521
|
+
const databases = vi.fn(async (args) => ({
|
|
522
|
+
status: 'skipped',
|
|
523
|
+
projectDir: args.projectDir,
|
|
524
|
+
}));
|
|
525
|
+
const sources = vi.fn(async (args) => ({
|
|
526
|
+
status: 'skipped',
|
|
527
|
+
projectDir: args.projectDir,
|
|
528
|
+
}));
|
|
529
|
+
await expect(runKtxSetup({
|
|
530
|
+
command: 'run',
|
|
531
|
+
projectDir: existingProjectDir,
|
|
532
|
+
mode: 'auto',
|
|
533
|
+
agents: false,
|
|
534
|
+
skipAgents: true,
|
|
535
|
+
inputMode: 'auto',
|
|
536
|
+
yes: false,
|
|
537
|
+
cliVersion: '0.2.0',
|
|
538
|
+
skipLlm: true,
|
|
539
|
+
skipEmbeddings: true,
|
|
540
|
+
databaseSchemas: [],
|
|
541
|
+
skipDatabases: true,
|
|
542
|
+
skipSources: true,
|
|
543
|
+
showEntryMenu: true,
|
|
544
|
+
}, makeIo().io, {
|
|
545
|
+
entryMenuDeps: { prompts: { select: vi.fn(async () => 'new-project'), cancel: vi.fn() } },
|
|
546
|
+
project: { prompts: projectPrompts },
|
|
547
|
+
model,
|
|
548
|
+
embeddings,
|
|
549
|
+
databases,
|
|
550
|
+
sources,
|
|
551
|
+
})).resolves.toBe(0);
|
|
552
|
+
expect(projectPrompts.text).toHaveBeenCalledWith(expect.objectContaining({
|
|
553
|
+
message: 'Project folder path\n│ Press Escape to go back.\n│',
|
|
554
|
+
placeholder: './analytics-ktx, ~/analytics-ktx, or /Users/you/projects/analytics-ktx',
|
|
555
|
+
}));
|
|
556
|
+
expect(projectPrompts.select).toHaveBeenCalledWith(expect.objectContaining({ message: 'Where should KTX create the project?' }));
|
|
557
|
+
await expect(stat(join(newProjectDir, 'ktx.yaml'))).resolves.toBeDefined();
|
|
558
|
+
await expect(readFile(join(existingProjectDir, 'ktx.yaml'), 'utf-8')).resolves.toBe(existingConfig);
|
|
559
|
+
expect(model).toHaveBeenCalledWith(expect.objectContaining({ projectDir: newProjectDir }), expect.anything());
|
|
560
|
+
expect(embeddings).toHaveBeenCalledWith(expect.objectContaining({ projectDir: newProjectDir }), expect.anything());
|
|
561
|
+
expect(databases).toHaveBeenCalledWith(expect.objectContaining({ projectDir: newProjectDir }), expect.anything());
|
|
562
|
+
expect(sources).toHaveBeenCalledWith(expect.objectContaining({ projectDir: newProjectDir }), expect.anything());
|
|
563
|
+
});
|
|
564
|
+
it('does not print navigation instructions immediately after confirming new project creation', async () => {
|
|
565
|
+
const existingProjectDir = join(tempDir, 'existing');
|
|
566
|
+
const newProjectDir = join(tempDir, 'fresh');
|
|
567
|
+
await mkdir(existingProjectDir, { recursive: true });
|
|
568
|
+
await writeFile(join(existingProjectDir, 'ktx.yaml'), 'connections: {}\n', 'utf-8');
|
|
569
|
+
const projectChoices = ['custom', 'create'];
|
|
570
|
+
const projectPrompts = {
|
|
571
|
+
select: vi.fn(async () => projectChoices.shift() ?? 'exit'),
|
|
572
|
+
text: vi.fn(async () => newProjectDir),
|
|
573
|
+
cancel: vi.fn(),
|
|
574
|
+
};
|
|
575
|
+
const model = vi.fn(async (args) => {
|
|
576
|
+
expect(args.showPromptInstructions).toBe(false);
|
|
577
|
+
return { status: 'skipped', projectDir: args.projectDir };
|
|
578
|
+
});
|
|
579
|
+
const testIo = makeIo();
|
|
580
|
+
await expect(runKtxSetup({
|
|
581
|
+
command: 'run',
|
|
582
|
+
projectDir: existingProjectDir,
|
|
583
|
+
mode: 'auto',
|
|
584
|
+
agents: false,
|
|
585
|
+
skipAgents: true,
|
|
586
|
+
inputMode: 'auto',
|
|
587
|
+
yes: false,
|
|
588
|
+
cliVersion: '0.2.0',
|
|
589
|
+
skipLlm: false,
|
|
590
|
+
skipEmbeddings: true,
|
|
591
|
+
databaseSchemas: [],
|
|
592
|
+
skipDatabases: true,
|
|
593
|
+
skipSources: true,
|
|
594
|
+
showEntryMenu: true,
|
|
595
|
+
}, testIo.io, {
|
|
596
|
+
entryMenuDeps: { prompts: { select: vi.fn(async () => 'new-project'), cancel: vi.fn() } },
|
|
597
|
+
project: { prompts: projectPrompts },
|
|
598
|
+
model,
|
|
599
|
+
})).resolves.toBe(0);
|
|
600
|
+
expect(testIo.stdout()).toContain(`Project: ${newProjectDir}\n`);
|
|
601
|
+
expect(testIo.stdout()).not.toContain('Use Up/Down to move, Enter to confirm the current selection, choose Back to return to the previous step, Ctrl+C to exit.');
|
|
602
|
+
});
|
|
603
|
+
it('runs the demo tour when the first setup intent menu chooses demo', async () => {
|
|
604
|
+
const testIo = makeIo();
|
|
605
|
+
await expect(runKtxSetup({
|
|
606
|
+
command: 'run',
|
|
607
|
+
projectDir: tempDir,
|
|
608
|
+
mode: 'auto',
|
|
609
|
+
agents: false,
|
|
610
|
+
skipAgents: false,
|
|
611
|
+
inputMode: 'auto',
|
|
612
|
+
yes: false,
|
|
613
|
+
cliVersion: '0.2.0',
|
|
614
|
+
skipLlm: false,
|
|
615
|
+
skipEmbeddings: false,
|
|
616
|
+
databaseSchemas: [],
|
|
617
|
+
skipDatabases: false,
|
|
618
|
+
skipSources: false,
|
|
619
|
+
showEntryMenu: true,
|
|
620
|
+
}, testIo.io, { entryMenuDeps: { prompts: { select: vi.fn(async () => 'demo'), cancel: vi.fn() } } })).resolves.toBe(0);
|
|
621
|
+
expect(runDemoTour).toHaveBeenCalledWith({ inputMode: 'auto' }, testIo.io, expect.objectContaining({}));
|
|
622
|
+
});
|
|
623
|
+
it('creates a project through run mode when --new is selected', async () => {
|
|
624
|
+
const testIo = makeIo();
|
|
625
|
+
await expect(runKtxSetup({
|
|
626
|
+
command: 'run',
|
|
627
|
+
projectDir: tempDir,
|
|
628
|
+
mode: 'new',
|
|
629
|
+
agents: false,
|
|
630
|
+
skipAgents: true,
|
|
631
|
+
inputMode: 'disabled',
|
|
632
|
+
yes: false,
|
|
633
|
+
cliVersion: '0.2.0',
|
|
634
|
+
skipLlm: true,
|
|
635
|
+
skipEmbeddings: true,
|
|
636
|
+
databaseSchemas: [],
|
|
637
|
+
skipDatabases: true,
|
|
638
|
+
skipSources: true,
|
|
639
|
+
}, testIo.io)).resolves.toBe(0);
|
|
640
|
+
await expect(stat(join(tempDir, 'ktx.yaml'))).resolves.toBeDefined();
|
|
641
|
+
expect(await readFile(join(tempDir, 'ktx.yaml'), 'utf-8')).not.toContain('completed_steps:');
|
|
642
|
+
await expect(readFile(join(tempDir, '.ktx', 'setup', 'state.json'), 'utf-8')).resolves.toBe(`${JSON.stringify({ completed_steps: ['project', 'sources'] }, null, 2)}\n`);
|
|
643
|
+
expect(testIo.stdout()).toContain('KTX setup');
|
|
644
|
+
expect(testIo.stdout()).toContain(`Project: ${tempDir}`);
|
|
645
|
+
expect(testIo.stdout()).toContain('Project ready: yes');
|
|
646
|
+
expect(testIo.stderr()).toBe('');
|
|
647
|
+
});
|
|
648
|
+
it('returns nonzero when project selection is missing in no-input mode even when optional sections are skipped', async () => {
|
|
649
|
+
const testIo = makeIo();
|
|
650
|
+
await expect(runKtxSetup({
|
|
651
|
+
command: 'run',
|
|
652
|
+
projectDir: tempDir,
|
|
653
|
+
mode: 'auto',
|
|
654
|
+
agents: false,
|
|
655
|
+
skipAgents: true,
|
|
656
|
+
inputMode: 'disabled',
|
|
657
|
+
yes: false,
|
|
658
|
+
cliVersion: '0.2.0',
|
|
659
|
+
skipLlm: true,
|
|
660
|
+
skipEmbeddings: true,
|
|
661
|
+
databaseSchemas: [],
|
|
662
|
+
skipDatabases: true,
|
|
663
|
+
skipSources: true,
|
|
664
|
+
}, testIo.io)).resolves.toBe(1);
|
|
665
|
+
expect(testIo.stderr()).toContain('Missing setup choice');
|
|
666
|
+
await expect(stat(join(tempDir, 'ktx.yaml'))).rejects.toThrow();
|
|
667
|
+
});
|
|
668
|
+
it('returns nonzero when project selection is missing in non-interactive setup', async () => {
|
|
669
|
+
const testIo = makeIo();
|
|
670
|
+
await expect(runKtxSetup({
|
|
671
|
+
command: 'run',
|
|
672
|
+
projectDir: tempDir,
|
|
673
|
+
mode: 'auto',
|
|
674
|
+
agents: false,
|
|
675
|
+
skipAgents: true,
|
|
676
|
+
inputMode: 'disabled',
|
|
677
|
+
yes: false,
|
|
678
|
+
cliVersion: '0.2.0',
|
|
679
|
+
skipLlm: false,
|
|
680
|
+
skipEmbeddings: true,
|
|
681
|
+
databaseSchemas: [],
|
|
682
|
+
skipDatabases: true,
|
|
683
|
+
skipSources: true,
|
|
684
|
+
}, testIo.io)).resolves.toBe(1);
|
|
685
|
+
expect(testIo.stderr()).toContain('Missing setup choice');
|
|
686
|
+
await expect(stat(join(tempDir, 'ktx.yaml'))).rejects.toThrow();
|
|
687
|
+
});
|
|
688
|
+
it('runs the Anthropic model step after project selection succeeds', async () => {
|
|
689
|
+
const testIo = makeIo();
|
|
690
|
+
const model = vi.fn(async () => ({ status: 'ready', projectDir: tempDir }));
|
|
691
|
+
await expect(runKtxSetup({
|
|
692
|
+
command: 'run',
|
|
693
|
+
projectDir: tempDir,
|
|
694
|
+
mode: 'new',
|
|
695
|
+
agents: false,
|
|
696
|
+
skipAgents: true,
|
|
697
|
+
inputMode: 'disabled',
|
|
698
|
+
yes: false,
|
|
699
|
+
cliVersion: '0.2.0',
|
|
700
|
+
anthropicApiKeyEnv: 'ANTHROPIC_API_KEY', // pragma: allowlist secret
|
|
701
|
+
anthropicModel: 'claude-sonnet-4-6',
|
|
702
|
+
skipLlm: false,
|
|
703
|
+
skipEmbeddings: true,
|
|
704
|
+
databaseSchemas: [],
|
|
705
|
+
skipDatabases: true,
|
|
706
|
+
skipSources: true,
|
|
707
|
+
}, testIo.io, { model })).resolves.toBe(0);
|
|
708
|
+
expect(model).toHaveBeenCalledWith(expect.objectContaining({
|
|
709
|
+
projectDir: tempDir,
|
|
710
|
+
inputMode: 'disabled',
|
|
711
|
+
anthropicApiKeyEnv: 'ANTHROPIC_API_KEY', // pragma: allowlist secret
|
|
712
|
+
anthropicModel: 'claude-sonnet-4-6',
|
|
713
|
+
skipLlm: false,
|
|
714
|
+
}), testIo.io);
|
|
715
|
+
});
|
|
716
|
+
it('passes Vertex AI model setup args after project selection succeeds', async () => {
|
|
717
|
+
const testIo = makeIo();
|
|
718
|
+
const model = vi.fn(async () => ({ status: 'ready', projectDir: tempDir }));
|
|
719
|
+
await expect(runKtxSetup({
|
|
720
|
+
command: 'run',
|
|
721
|
+
projectDir: tempDir,
|
|
722
|
+
mode: 'new',
|
|
723
|
+
agents: false,
|
|
724
|
+
skipAgents: true,
|
|
725
|
+
inputMode: 'disabled',
|
|
726
|
+
yes: false,
|
|
727
|
+
cliVersion: '0.2.0',
|
|
728
|
+
llmBackend: 'vertex',
|
|
729
|
+
vertexProject: 'local-gcp-project',
|
|
730
|
+
vertexLocation: 'us-east5',
|
|
731
|
+
anthropicModel: 'claude-sonnet-4-6',
|
|
732
|
+
skipLlm: false,
|
|
733
|
+
skipEmbeddings: true,
|
|
734
|
+
databaseSchemas: [],
|
|
735
|
+
skipDatabases: true,
|
|
736
|
+
skipSources: true,
|
|
737
|
+
}, testIo.io, { model })).resolves.toBe(0);
|
|
738
|
+
expect(model).toHaveBeenCalledWith(expect.objectContaining({
|
|
739
|
+
projectDir: tempDir,
|
|
740
|
+
inputMode: 'disabled',
|
|
741
|
+
llmBackend: 'vertex',
|
|
742
|
+
vertexProject: 'local-gcp-project',
|
|
743
|
+
vertexLocation: 'us-east5',
|
|
744
|
+
anthropicModel: 'claude-sonnet-4-6',
|
|
745
|
+
skipLlm: false,
|
|
746
|
+
}), testIo.io);
|
|
747
|
+
});
|
|
748
|
+
it('runs the embedding setup step after the model step succeeds', async () => {
|
|
749
|
+
const testIo = makeIo();
|
|
750
|
+
const model = vi.fn(async () => ({ status: 'ready', projectDir: tempDir }));
|
|
751
|
+
const embeddings = vi.fn(async () => ({ status: 'ready', projectDir: tempDir }));
|
|
752
|
+
await expect(runKtxSetup({
|
|
753
|
+
command: 'run',
|
|
754
|
+
projectDir: tempDir,
|
|
755
|
+
mode: 'new',
|
|
756
|
+
agents: false,
|
|
757
|
+
skipAgents: true,
|
|
758
|
+
inputMode: 'disabled',
|
|
759
|
+
yes: true,
|
|
760
|
+
cliVersion: '0.2.0',
|
|
761
|
+
anthropicApiKeyEnv: 'ANTHROPIC_API_KEY', // pragma: allowlist secret
|
|
762
|
+
anthropicModel: 'claude-sonnet-4-6',
|
|
763
|
+
skipLlm: false,
|
|
764
|
+
embeddingBackend: 'openai',
|
|
765
|
+
embeddingApiKeyEnv: 'OPENAI_API_KEY', // pragma: allowlist secret
|
|
766
|
+
skipEmbeddings: false,
|
|
767
|
+
databaseSchemas: [],
|
|
768
|
+
skipDatabases: true,
|
|
769
|
+
skipSources: true,
|
|
770
|
+
}, testIo.io, { model, embeddings })).resolves.toBe(0);
|
|
771
|
+
expect(embeddings).toHaveBeenCalledWith(expect.objectContaining({
|
|
772
|
+
projectDir: tempDir,
|
|
773
|
+
inputMode: 'disabled',
|
|
774
|
+
cliVersion: '0.2.0',
|
|
775
|
+
runtimeInstallPolicy: 'auto',
|
|
776
|
+
embeddingBackend: 'openai',
|
|
777
|
+
embeddingApiKeyEnv: 'OPENAI_API_KEY', // pragma: allowlist secret
|
|
778
|
+
skipEmbeddings: false,
|
|
779
|
+
}), testIo.io);
|
|
780
|
+
});
|
|
781
|
+
it('passes no-input runtime policy to the embeddings step', async () => {
|
|
782
|
+
const io = makeIo();
|
|
783
|
+
const embeddings = vi.fn(async () => ({ status: 'failed', projectDir: tempDir }));
|
|
784
|
+
await expect(runKtxSetup({
|
|
785
|
+
command: 'run',
|
|
786
|
+
projectDir: tempDir,
|
|
787
|
+
mode: 'new',
|
|
788
|
+
agents: false,
|
|
789
|
+
agentScope: 'project',
|
|
790
|
+
skipAgents: true,
|
|
791
|
+
inputMode: 'disabled',
|
|
792
|
+
yes: false,
|
|
793
|
+
cliVersion: '0.2.0',
|
|
794
|
+
skipLlm: true,
|
|
795
|
+
skipEmbeddings: false,
|
|
796
|
+
databaseSchemas: [],
|
|
797
|
+
skipDatabases: true,
|
|
798
|
+
skipSources: true,
|
|
799
|
+
}, io.io, { embeddings })).resolves.toBe(1);
|
|
800
|
+
expect(embeddings).toHaveBeenCalledWith(expect.objectContaining({
|
|
801
|
+
cliVersion: '0.2.0',
|
|
802
|
+
runtimeInstallPolicy: 'never',
|
|
803
|
+
}), io.io);
|
|
804
|
+
});
|
|
805
|
+
it('lets Back from embedding setup return to the model step instead of exiting', async () => {
|
|
806
|
+
const testIo = makeIo();
|
|
807
|
+
const modelResults = [
|
|
808
|
+
{ status: 'ready', projectDir: tempDir },
|
|
809
|
+
{ status: 'back', projectDir: tempDir },
|
|
810
|
+
];
|
|
811
|
+
const model = vi.fn(async () => modelResults.shift() ?? { status: 'back', projectDir: tempDir });
|
|
812
|
+
const embeddings = vi.fn(async () => ({ status: 'back', projectDir: tempDir }));
|
|
813
|
+
await expect(runKtxSetup({
|
|
814
|
+
command: 'run',
|
|
815
|
+
projectDir: tempDir,
|
|
816
|
+
mode: 'new',
|
|
817
|
+
agents: false,
|
|
818
|
+
skipAgents: true,
|
|
819
|
+
inputMode: 'auto',
|
|
820
|
+
yes: false,
|
|
821
|
+
cliVersion: '0.2.0',
|
|
822
|
+
skipLlm: false,
|
|
823
|
+
skipEmbeddings: false,
|
|
824
|
+
databaseSchemas: [],
|
|
825
|
+
skipDatabases: true,
|
|
826
|
+
skipSources: true,
|
|
827
|
+
}, testIo.io, { model, embeddings })).resolves.toBe(0);
|
|
828
|
+
expect(model).toHaveBeenCalledTimes(2);
|
|
829
|
+
expect(model).toHaveBeenNthCalledWith(2, expect.objectContaining({ forcePrompt: true }), testIo.io);
|
|
830
|
+
expect(embeddings).toHaveBeenCalledTimes(1);
|
|
831
|
+
});
|
|
832
|
+
it('lets Back from database selection return to embedding setup', async () => {
|
|
833
|
+
const testIo = makeIo();
|
|
834
|
+
const modelResults = [
|
|
835
|
+
{ status: 'ready', projectDir: tempDir },
|
|
836
|
+
{ status: 'back', projectDir: tempDir },
|
|
837
|
+
];
|
|
838
|
+
const model = vi.fn(async () => modelResults.shift() ?? { status: 'back', projectDir: tempDir });
|
|
839
|
+
const embeddingResults = [
|
|
840
|
+
{ status: 'ready', projectDir: tempDir },
|
|
841
|
+
{ status: 'back', projectDir: tempDir },
|
|
842
|
+
];
|
|
843
|
+
const embeddings = vi.fn(async () => embeddingResults.shift() ?? { status: 'back', projectDir: tempDir });
|
|
844
|
+
const databasePrompts = {
|
|
845
|
+
multiselect: vi.fn(async () => ['back']),
|
|
846
|
+
select: vi.fn(async () => 'back'),
|
|
847
|
+
text: vi.fn(),
|
|
848
|
+
password: vi.fn(),
|
|
849
|
+
cancel: vi.fn(),
|
|
850
|
+
};
|
|
851
|
+
await expect(runKtxSetup({
|
|
852
|
+
command: 'run',
|
|
853
|
+
projectDir: tempDir,
|
|
854
|
+
mode: 'new',
|
|
855
|
+
agents: false,
|
|
856
|
+
skipAgents: true,
|
|
857
|
+
inputMode: 'auto',
|
|
858
|
+
yes: false,
|
|
859
|
+
cliVersion: '0.2.0',
|
|
860
|
+
skipLlm: false,
|
|
861
|
+
skipEmbeddings: false,
|
|
862
|
+
databaseSchemas: [],
|
|
863
|
+
skipDatabases: false,
|
|
864
|
+
skipSources: true,
|
|
865
|
+
}, testIo.io, {
|
|
866
|
+
model,
|
|
867
|
+
embeddings,
|
|
868
|
+
databasesDeps: { prompts: databasePrompts },
|
|
869
|
+
})).resolves.toBe(0);
|
|
870
|
+
expect(databasePrompts.select).not.toHaveBeenCalled();
|
|
871
|
+
expect(embeddings).toHaveBeenCalledTimes(2);
|
|
872
|
+
expect(embeddings).toHaveBeenNthCalledWith(2, expect.objectContaining({ forcePrompt: true }), testIo.io);
|
|
873
|
+
expect(testIo.stderr()).not.toContain('No databases selected.');
|
|
874
|
+
});
|
|
875
|
+
it('lets Back from the first setup step return to the entry menu instead of exiting', async () => {
|
|
876
|
+
await writeFile(join(tempDir, 'ktx.yaml'), 'connections: {}\n', 'utf-8');
|
|
877
|
+
const testIo = makeIo();
|
|
878
|
+
const entryChoices = ['setup', 'exit'];
|
|
879
|
+
const entryPrompts = {
|
|
880
|
+
select: vi.fn(async () => entryChoices.shift() ?? 'exit'),
|
|
881
|
+
cancel: vi.fn(),
|
|
882
|
+
};
|
|
883
|
+
const model = vi.fn(async () => ({ status: 'back', projectDir: tempDir }));
|
|
884
|
+
await expect(runKtxSetup({
|
|
885
|
+
command: 'run',
|
|
886
|
+
projectDir: tempDir,
|
|
887
|
+
mode: 'auto',
|
|
888
|
+
agents: false,
|
|
889
|
+
skipAgents: true,
|
|
890
|
+
inputMode: 'auto',
|
|
891
|
+
yes: false,
|
|
892
|
+
cliVersion: '0.2.0',
|
|
893
|
+
skipLlm: false,
|
|
894
|
+
skipEmbeddings: true,
|
|
895
|
+
databaseSchemas: [],
|
|
896
|
+
skipDatabases: true,
|
|
897
|
+
skipSources: true,
|
|
898
|
+
showEntryMenu: true,
|
|
899
|
+
}, testIo.io, {
|
|
900
|
+
entryMenuDeps: { prompts: entryPrompts },
|
|
901
|
+
model,
|
|
902
|
+
})).resolves.toBe(0);
|
|
903
|
+
expect(entryPrompts.select).toHaveBeenCalledTimes(2);
|
|
904
|
+
expect(entryPrompts.cancel).toHaveBeenCalledWith('Setup cancelled.');
|
|
905
|
+
expect(model).toHaveBeenCalledTimes(1);
|
|
906
|
+
});
|
|
907
|
+
it('runs database setup after embeddings succeed', async () => {
|
|
908
|
+
const testIo = makeIo();
|
|
909
|
+
const model = vi.fn(async () => ({ status: 'ready', projectDir: tempDir }));
|
|
910
|
+
const embeddings = vi.fn(async () => ({ status: 'ready', projectDir: tempDir }));
|
|
911
|
+
const databases = vi.fn(async () => ({
|
|
912
|
+
status: 'ready',
|
|
913
|
+
projectDir: tempDir,
|
|
914
|
+
connectionIds: ['warehouse'],
|
|
915
|
+
}));
|
|
916
|
+
await expect(runKtxSetup({
|
|
917
|
+
command: 'run',
|
|
918
|
+
projectDir: tempDir,
|
|
919
|
+
mode: 'new',
|
|
920
|
+
agents: false,
|
|
921
|
+
skipAgents: true,
|
|
922
|
+
inputMode: 'disabled',
|
|
923
|
+
yes: false,
|
|
924
|
+
cliVersion: '0.2.0',
|
|
925
|
+
anthropicApiKeyEnv: 'ANTHROPIC_API_KEY', // pragma: allowlist secret
|
|
926
|
+
anthropicModel: 'claude-sonnet-4-6',
|
|
927
|
+
skipLlm: false,
|
|
928
|
+
embeddingBackend: 'openai',
|
|
929
|
+
embeddingApiKeyEnv: 'OPENAI_API_KEY', // pragma: allowlist secret
|
|
930
|
+
skipEmbeddings: false,
|
|
931
|
+
databaseDrivers: ['postgres'],
|
|
932
|
+
databaseConnectionId: 'warehouse',
|
|
933
|
+
databaseUrl: 'env:DATABASE_URL',
|
|
934
|
+
databaseSchemas: ['public'],
|
|
935
|
+
enableQueryHistory: true,
|
|
936
|
+
queryHistoryWindowDays: 30,
|
|
937
|
+
queryHistoryMinExecutions: 12,
|
|
938
|
+
queryHistoryServiceAccountPatterns: ['^svc_'],
|
|
939
|
+
queryHistoryRedactionPatterns: ['(?i)secret'],
|
|
940
|
+
skipDatabases: false,
|
|
941
|
+
skipSources: true,
|
|
942
|
+
}, testIo.io, { model, embeddings, databases })).resolves.toBe(0);
|
|
943
|
+
expect(databases).toHaveBeenCalledWith(expect.objectContaining({
|
|
944
|
+
projectDir: tempDir,
|
|
945
|
+
inputMode: 'disabled',
|
|
946
|
+
databaseDrivers: ['postgres'],
|
|
947
|
+
databaseConnectionId: 'warehouse',
|
|
948
|
+
databaseUrl: 'env:DATABASE_URL',
|
|
949
|
+
databaseSchemas: ['public'],
|
|
950
|
+
enableQueryHistory: true,
|
|
951
|
+
queryHistoryWindowDays: 30,
|
|
952
|
+
queryHistoryMinExecutions: 12,
|
|
953
|
+
queryHistoryServiceAccountPatterns: ['^svc_'],
|
|
954
|
+
queryHistoryRedactionPatterns: ['(?i)secret'],
|
|
955
|
+
skipDatabases: false,
|
|
956
|
+
}), testIo.io);
|
|
957
|
+
});
|
|
958
|
+
it('runs sources after database setup', async () => {
|
|
959
|
+
const calls = [];
|
|
960
|
+
const io = makeIo();
|
|
961
|
+
await writeFile(join(tempDir, 'ktx.yaml'), ['connections: {}', ''].join('\n'), 'utf-8');
|
|
962
|
+
await expect(runKtxSetup({
|
|
963
|
+
command: 'run',
|
|
964
|
+
projectDir: tempDir,
|
|
965
|
+
mode: 'existing',
|
|
966
|
+
agents: false,
|
|
967
|
+
skipAgents: true,
|
|
968
|
+
inputMode: 'disabled',
|
|
969
|
+
yes: true,
|
|
970
|
+
cliVersion: '0.2.0',
|
|
971
|
+
skipLlm: true,
|
|
972
|
+
skipEmbeddings: true,
|
|
973
|
+
skipDatabases: true,
|
|
974
|
+
skipSources: true,
|
|
975
|
+
databaseSchemas: [],
|
|
976
|
+
}, io.io, {
|
|
977
|
+
model: async () => {
|
|
978
|
+
calls.push('model');
|
|
979
|
+
return { status: 'skipped', projectDir: tempDir };
|
|
980
|
+
},
|
|
981
|
+
embeddings: async () => {
|
|
982
|
+
calls.push('embeddings');
|
|
983
|
+
return { status: 'skipped', projectDir: tempDir };
|
|
984
|
+
},
|
|
985
|
+
databases: async () => {
|
|
986
|
+
calls.push('databases');
|
|
987
|
+
return { status: 'skipped', projectDir: tempDir };
|
|
988
|
+
},
|
|
989
|
+
sources: async (args) => {
|
|
990
|
+
expect(args.runInitialSourceIngest).toBe(false);
|
|
991
|
+
calls.push('sources');
|
|
992
|
+
return { status: 'skipped', projectDir: tempDir };
|
|
993
|
+
},
|
|
994
|
+
})).resolves.toBe(0);
|
|
995
|
+
expect(calls).toEqual(['model', 'embeddings', 'databases', 'sources']);
|
|
996
|
+
});
|
|
997
|
+
it.each([
|
|
998
|
+
{
|
|
999
|
+
backend: 'vertex',
|
|
1000
|
+
providerLines: [' backend: vertex', ' vertex:', ' project: kaelio-dev', ' location: us-east5'],
|
|
1001
|
+
model: 'claude-sonnet-4-6',
|
|
1002
|
+
},
|
|
1003
|
+
{
|
|
1004
|
+
backend: 'gateway',
|
|
1005
|
+
providerLines: [' backend: gateway', ' gateway:', ' api_key: env:AI_GATEWAY_API_KEY'],
|
|
1006
|
+
model: 'anthropic/claude-sonnet-4-6',
|
|
1007
|
+
},
|
|
1008
|
+
])('adds a dbt source in non-interactive setup with existing $backend llm config', async (fixture) => {
|
|
1009
|
+
const io = makeIo();
|
|
1010
|
+
await writeFile(join(tempDir, 'ktx.yaml'), [
|
|
1011
|
+
'setup:',
|
|
1012
|
+
' database_connection_ids:',
|
|
1013
|
+
' - warehouse',
|
|
1014
|
+
'connections:',
|
|
1015
|
+
' warehouse:',
|
|
1016
|
+
' driver: postgres',
|
|
1017
|
+
' url: env:WAREHOUSE_URL',
|
|
1018
|
+
'llm:',
|
|
1019
|
+
' provider:',
|
|
1020
|
+
...fixture.providerLines,
|
|
1021
|
+
' models:',
|
|
1022
|
+
` default: ${fixture.model}`,
|
|
1023
|
+
].join('\n'), 'utf-8');
|
|
1024
|
+
await writeKtxSetupState(tempDir, { completed_steps: ['project', 'databases'] });
|
|
1025
|
+
await expect(runKtxSetup({
|
|
1026
|
+
command: 'run',
|
|
1027
|
+
projectDir: tempDir,
|
|
1028
|
+
mode: 'existing',
|
|
1029
|
+
agents: false,
|
|
1030
|
+
skipAgents: true,
|
|
1031
|
+
inputMode: 'disabled',
|
|
1032
|
+
yes: true,
|
|
1033
|
+
cliVersion: '0.2.0',
|
|
1034
|
+
skipLlm: false,
|
|
1035
|
+
skipEmbeddings: true,
|
|
1036
|
+
skipDatabases: true,
|
|
1037
|
+
source: 'dbt',
|
|
1038
|
+
sourceConnectionId: 'dbt-main',
|
|
1039
|
+
sourceGitUrl: 'https://github.com/Kaelio/klo-dbt-demo',
|
|
1040
|
+
sourceBranch: 'main',
|
|
1041
|
+
sourceProjectName: 'orbit_analytics',
|
|
1042
|
+
sourceWarehouseConnectionId: 'warehouse',
|
|
1043
|
+
skipSources: false,
|
|
1044
|
+
databaseSchemas: [],
|
|
1045
|
+
}, io.io, {
|
|
1046
|
+
sourcesDeps: { validateDbt: vi.fn(async () => ({ ok: true, detail: 'dbt project valid' })) },
|
|
1047
|
+
context: vi.fn(async () => ({ status: 'ready', projectDir: tempDir, runId: 'setup-context-test' })),
|
|
1048
|
+
})).resolves.toBe(0);
|
|
1049
|
+
expect(io.stderr()).not.toContain('Anthropic');
|
|
1050
|
+
expect(await readFile(join(tempDir, 'ktx.yaml'), 'utf-8')).toContain('dbt-main:');
|
|
1051
|
+
});
|
|
1052
|
+
it('does not fail context build when prerequisites were explicitly skipped and agents are skipped', async () => {
|
|
1053
|
+
const calls = [];
|
|
1054
|
+
const io = makeIo();
|
|
1055
|
+
await writeFile(join(tempDir, 'ktx.yaml'), [
|
|
1056
|
+
'connections:',
|
|
1057
|
+
' warehouse:',
|
|
1058
|
+
' driver: postgres',
|
|
1059
|
+
' url: env:DEMO_DATABASE_URL',
|
|
1060
|
+
'',
|
|
1061
|
+
].join('\n'), 'utf-8');
|
|
1062
|
+
await expect(runKtxSetup({
|
|
1063
|
+
command: 'run',
|
|
1064
|
+
projectDir: tempDir,
|
|
1065
|
+
mode: 'existing',
|
|
1066
|
+
agents: false,
|
|
1067
|
+
skipAgents: true,
|
|
1068
|
+
inputMode: 'disabled',
|
|
1069
|
+
yes: true,
|
|
1070
|
+
cliVersion: '0.2.0',
|
|
1071
|
+
skipLlm: true,
|
|
1072
|
+
skipEmbeddings: true,
|
|
1073
|
+
skipDatabases: true,
|
|
1074
|
+
skipSources: true,
|
|
1075
|
+
databaseSchemas: [],
|
|
1076
|
+
}, io.io, {
|
|
1077
|
+
model: async () => {
|
|
1078
|
+
calls.push('model');
|
|
1079
|
+
return { status: 'skipped', projectDir: tempDir };
|
|
1080
|
+
},
|
|
1081
|
+
embeddings: async () => {
|
|
1082
|
+
calls.push('embeddings');
|
|
1083
|
+
return { status: 'skipped', projectDir: tempDir };
|
|
1084
|
+
},
|
|
1085
|
+
databases: async () => {
|
|
1086
|
+
calls.push('databases');
|
|
1087
|
+
return { status: 'skipped', projectDir: tempDir };
|
|
1088
|
+
},
|
|
1089
|
+
sources: async () => {
|
|
1090
|
+
calls.push('sources');
|
|
1091
|
+
return { status: 'skipped', projectDir: tempDir };
|
|
1092
|
+
},
|
|
1093
|
+
})).resolves.toBe(0);
|
|
1094
|
+
expect(calls).toEqual(['model', 'embeddings', 'databases', 'sources']);
|
|
1095
|
+
expect(io.stderr()).not.toContain('KTX cannot build agent-ready context yet.');
|
|
1096
|
+
});
|
|
1097
|
+
it('runs context after sources and before agents in full setup', async () => {
|
|
1098
|
+
const calls = [];
|
|
1099
|
+
const io = makeIo();
|
|
1100
|
+
await writeFile(join(tempDir, 'ktx.yaml'), ['connections: {}', ''].join('\n'), 'utf-8');
|
|
1101
|
+
await expect(runKtxSetup({
|
|
1102
|
+
command: 'run',
|
|
1103
|
+
projectDir: tempDir,
|
|
1104
|
+
mode: 'existing',
|
|
1105
|
+
agents: false,
|
|
1106
|
+
inputMode: 'disabled',
|
|
1107
|
+
yes: true,
|
|
1108
|
+
cliVersion: '0.2.0',
|
|
1109
|
+
skipLlm: true,
|
|
1110
|
+
skipEmbeddings: true,
|
|
1111
|
+
skipDatabases: true,
|
|
1112
|
+
skipSources: true,
|
|
1113
|
+
skipAgents: false,
|
|
1114
|
+
databaseSchemas: [],
|
|
1115
|
+
}, io.io, {
|
|
1116
|
+
model: async () => {
|
|
1117
|
+
calls.push('model');
|
|
1118
|
+
return { status: 'skipped', projectDir: tempDir };
|
|
1119
|
+
},
|
|
1120
|
+
embeddings: async () => {
|
|
1121
|
+
calls.push('embeddings');
|
|
1122
|
+
return { status: 'skipped', projectDir: tempDir };
|
|
1123
|
+
},
|
|
1124
|
+
databases: async () => {
|
|
1125
|
+
calls.push('databases');
|
|
1126
|
+
return { status: 'skipped', projectDir: tempDir };
|
|
1127
|
+
},
|
|
1128
|
+
sources: async () => {
|
|
1129
|
+
calls.push('sources');
|
|
1130
|
+
return { status: 'skipped', projectDir: tempDir };
|
|
1131
|
+
},
|
|
1132
|
+
context: async () => {
|
|
1133
|
+
calls.push('context');
|
|
1134
|
+
return { status: 'ready', projectDir: tempDir, runId: 'setup-context-local-test' };
|
|
1135
|
+
},
|
|
1136
|
+
agents: async () => {
|
|
1137
|
+
calls.push('agents');
|
|
1138
|
+
return {
|
|
1139
|
+
status: 'ready',
|
|
1140
|
+
projectDir: tempDir,
|
|
1141
|
+
installs: [{ target: 'codex', scope: 'project', mode: 'cli' }],
|
|
1142
|
+
};
|
|
1143
|
+
},
|
|
1144
|
+
})).resolves.toBe(0);
|
|
1145
|
+
expect(calls).toEqual(['model', 'embeddings', 'databases', 'sources', 'context', 'agents']);
|
|
1146
|
+
});
|
|
1147
|
+
it('commits setup config changes written by later setup steps', async () => {
|
|
1148
|
+
const io = makeIo();
|
|
1149
|
+
await expect(runKtxSetup({
|
|
1150
|
+
command: 'run',
|
|
1151
|
+
projectDir: tempDir,
|
|
1152
|
+
mode: 'new',
|
|
1153
|
+
agents: false,
|
|
1154
|
+
inputMode: 'disabled',
|
|
1155
|
+
yes: true,
|
|
1156
|
+
cliVersion: '0.2.0',
|
|
1157
|
+
skipLlm: true,
|
|
1158
|
+
skipEmbeddings: true,
|
|
1159
|
+
skipDatabases: true,
|
|
1160
|
+
skipSources: true,
|
|
1161
|
+
skipAgents: false,
|
|
1162
|
+
databaseSchemas: [],
|
|
1163
|
+
}, io.io, {
|
|
1164
|
+
model: async () => ({ status: 'skipped', projectDir: tempDir }),
|
|
1165
|
+
embeddings: async () => ({ status: 'skipped', projectDir: tempDir }),
|
|
1166
|
+
databases: async () => {
|
|
1167
|
+
const configPath = join(tempDir, 'ktx.yaml');
|
|
1168
|
+
const current = await readFile(configPath, 'utf-8');
|
|
1169
|
+
await writeFile(configPath, current.replace('connections: {}', ['connections:', ' warehouse:', ' driver: postgres', ' url: env:DATABASE_URL'].join('\n')), 'utf-8');
|
|
1170
|
+
return { status: 'skipped', projectDir: tempDir };
|
|
1171
|
+
},
|
|
1172
|
+
sources: async () => ({ status: 'skipped', projectDir: tempDir }),
|
|
1173
|
+
context: async () => ({ status: 'ready', projectDir: tempDir, runId: 'setup-context-local-test' }),
|
|
1174
|
+
agents: async () => ({
|
|
1175
|
+
status: 'ready',
|
|
1176
|
+
projectDir: tempDir,
|
|
1177
|
+
installs: [{ target: 'codex', scope: 'project', mode: 'cli' }],
|
|
1178
|
+
}),
|
|
1179
|
+
})).resolves.toBe(0);
|
|
1180
|
+
const { stdout } = await execFileAsync('git', ['-C', tempDir, 'status', '--short', '--', 'ktx.yaml']);
|
|
1181
|
+
expect(stdout).toBe('');
|
|
1182
|
+
const committedConfig = await execFileAsync('git', ['-C', tempDir, 'show', 'HEAD:ktx.yaml']);
|
|
1183
|
+
expect(committedConfig.stdout).toContain('warehouse:');
|
|
1184
|
+
});
|
|
1185
|
+
it('runs agent setup after context succeeds in --agents mode', async () => {
|
|
1186
|
+
const calls = [];
|
|
1187
|
+
const io = makeIo();
|
|
1188
|
+
await writeFile(join(tempDir, 'ktx.yaml'), ['connections: {}', ''].join('\n'), 'utf-8');
|
|
1189
|
+
await expect(runKtxSetup({
|
|
1190
|
+
command: 'run',
|
|
1191
|
+
projectDir: tempDir,
|
|
1192
|
+
mode: 'existing',
|
|
1193
|
+
agents: true,
|
|
1194
|
+
target: 'codex',
|
|
1195
|
+
agentScope: 'project',
|
|
1196
|
+
inputMode: 'disabled',
|
|
1197
|
+
yes: true,
|
|
1198
|
+
cliVersion: '0.2.0',
|
|
1199
|
+
skipLlm: true,
|
|
1200
|
+
skipEmbeddings: true,
|
|
1201
|
+
skipDatabases: true,
|
|
1202
|
+
skipSources: true,
|
|
1203
|
+
skipAgents: false,
|
|
1204
|
+
databaseSchemas: [],
|
|
1205
|
+
}, io.io, {
|
|
1206
|
+
model: async () => ({ status: 'skipped', projectDir: tempDir }),
|
|
1207
|
+
embeddings: async () => ({ status: 'skipped', projectDir: tempDir }),
|
|
1208
|
+
databases: async () => ({ status: 'skipped', projectDir: tempDir }),
|
|
1209
|
+
sources: async () => ({ status: 'skipped', projectDir: tempDir }),
|
|
1210
|
+
context: async () => {
|
|
1211
|
+
calls.push('context');
|
|
1212
|
+
return { status: 'ready', projectDir: tempDir, runId: 'setup-context-local-test' };
|
|
1213
|
+
},
|
|
1214
|
+
agents: async () => {
|
|
1215
|
+
calls.push('agents');
|
|
1216
|
+
return {
|
|
1217
|
+
status: 'ready',
|
|
1218
|
+
projectDir: tempDir,
|
|
1219
|
+
installs: [{ target: 'codex', scope: 'project', mode: 'cli' }],
|
|
1220
|
+
};
|
|
1221
|
+
},
|
|
1222
|
+
})).resolves.toBe(0);
|
|
1223
|
+
expect(calls).toEqual(['context', 'agents']);
|
|
1224
|
+
});
|
|
1225
|
+
it('does not install agents when non-interactive --agents finds context incomplete', async () => {
|
|
1226
|
+
const io = makeIo();
|
|
1227
|
+
const agents = vi.fn(async () => ({
|
|
1228
|
+
status: 'ready',
|
|
1229
|
+
projectDir: tempDir,
|
|
1230
|
+
installs: [{ target: 'codex', scope: 'project', mode: 'cli' }],
|
|
1231
|
+
}));
|
|
1232
|
+
await writeFile(join(tempDir, 'ktx.yaml'), ['connections: {}', ''].join('\n'), 'utf-8');
|
|
1233
|
+
await expect(runKtxSetup({
|
|
1234
|
+
command: 'run',
|
|
1235
|
+
projectDir: tempDir,
|
|
1236
|
+
mode: 'existing',
|
|
1237
|
+
agents: true,
|
|
1238
|
+
target: 'codex',
|
|
1239
|
+
agentScope: 'project',
|
|
1240
|
+
inputMode: 'disabled',
|
|
1241
|
+
yes: true,
|
|
1242
|
+
cliVersion: '0.2.0',
|
|
1243
|
+
skipLlm: true,
|
|
1244
|
+
skipEmbeddings: true,
|
|
1245
|
+
skipDatabases: true,
|
|
1246
|
+
skipSources: true,
|
|
1247
|
+
skipAgents: false,
|
|
1248
|
+
databaseSchemas: [],
|
|
1249
|
+
}, io.io, {
|
|
1250
|
+
context: async () => ({ status: 'skipped', projectDir: tempDir }),
|
|
1251
|
+
agents,
|
|
1252
|
+
})).resolves.toBe(1);
|
|
1253
|
+
expect(agents).not.toHaveBeenCalled();
|
|
1254
|
+
expect(io.stderr()).toContain('KTX context is not ready for agents.');
|
|
1255
|
+
});
|
|
1256
|
+
it('routes a ready project menu selection to agent setup', async () => {
|
|
1257
|
+
const calls = [];
|
|
1258
|
+
const io = makeIo();
|
|
1259
|
+
await mkdir(join(tempDir, '.ktx', 'agents'), { recursive: true });
|
|
1260
|
+
await writeFile(join(tempDir, 'ktx.yaml'), [
|
|
1261
|
+
'setup:',
|
|
1262
|
+
' database_connection_ids: []',
|
|
1263
|
+
'connections: {}',
|
|
1264
|
+
'llm:',
|
|
1265
|
+
' provider:',
|
|
1266
|
+
' backend: anthropic',
|
|
1267
|
+
' models:',
|
|
1268
|
+
' default: claude-sonnet-4-6',
|
|
1269
|
+
'ingest:',
|
|
1270
|
+
' embeddings:',
|
|
1271
|
+
' backend: openai',
|
|
1272
|
+
' model: text-embedding-3-small',
|
|
1273
|
+
' dimensions: 1536',
|
|
1274
|
+
'',
|
|
1275
|
+
].join('\n'), 'utf-8');
|
|
1276
|
+
await writeKtxSetupState(tempDir, {
|
|
1277
|
+
completed_steps: ['project', 'llm', 'embeddings', 'sources', 'context', 'agents'],
|
|
1278
|
+
});
|
|
1279
|
+
await writeFile(join(tempDir, '.ktx/agents/install-manifest.json'), JSON.stringify({
|
|
1280
|
+
version: 1,
|
|
1281
|
+
projectDir: tempDir,
|
|
1282
|
+
installedAt: '2026-05-07T00:00:00.000Z',
|
|
1283
|
+
installs: [{ target: 'codex', scope: 'project', mode: 'cli' }],
|
|
1284
|
+
entries: [],
|
|
1285
|
+
}, null, 2), 'utf-8');
|
|
1286
|
+
await writeKtxSetupContextState(tempDir, {
|
|
1287
|
+
runId: 'setup-context-local-ready',
|
|
1288
|
+
status: 'completed',
|
|
1289
|
+
startedAt: '2026-05-09T10:00:00.000Z',
|
|
1290
|
+
updatedAt: '2026-05-09T10:02:00.000Z',
|
|
1291
|
+
completedAt: '2026-05-09T10:02:00.000Z',
|
|
1292
|
+
primarySourceConnectionIds: [],
|
|
1293
|
+
contextSourceConnectionIds: [],
|
|
1294
|
+
reportIds: [],
|
|
1295
|
+
artifactPaths: [],
|
|
1296
|
+
retryableFailedTargets: [],
|
|
1297
|
+
commands: contextBuildCommands(tempDir, 'setup-context-local-ready'),
|
|
1298
|
+
});
|
|
1299
|
+
await expect(runKtxSetup({
|
|
1300
|
+
command: 'run',
|
|
1301
|
+
projectDir: tempDir,
|
|
1302
|
+
mode: 'existing',
|
|
1303
|
+
agents: false,
|
|
1304
|
+
inputMode: 'auto',
|
|
1305
|
+
yes: false,
|
|
1306
|
+
cliVersion: '0.2.0',
|
|
1307
|
+
skipLlm: false,
|
|
1308
|
+
skipEmbeddings: false,
|
|
1309
|
+
skipDatabases: false,
|
|
1310
|
+
skipSources: false,
|
|
1311
|
+
skipAgents: false,
|
|
1312
|
+
databaseSchemas: [],
|
|
1313
|
+
}, io.io, {
|
|
1314
|
+
readyMenuDeps: { prompts: { select: vi.fn(async () => 'agents'), cancel: vi.fn() } },
|
|
1315
|
+
model: async (args) => {
|
|
1316
|
+
expect(args.skipLlm).toBe(true);
|
|
1317
|
+
return { status: 'skipped', projectDir: tempDir };
|
|
1318
|
+
},
|
|
1319
|
+
embeddings: async (args) => {
|
|
1320
|
+
expect(args.skipEmbeddings).toBe(true);
|
|
1321
|
+
return { status: 'skipped', projectDir: tempDir };
|
|
1322
|
+
},
|
|
1323
|
+
databases: async (args) => {
|
|
1324
|
+
expect(args.skipDatabases).toBe(true);
|
|
1325
|
+
return { status: 'skipped', projectDir: tempDir };
|
|
1326
|
+
},
|
|
1327
|
+
sources: async (args) => {
|
|
1328
|
+
expect(args.skipSources).toBe(true);
|
|
1329
|
+
return { status: 'skipped', projectDir: tempDir };
|
|
1330
|
+
},
|
|
1331
|
+
agents: async () => {
|
|
1332
|
+
calls.push('agents');
|
|
1333
|
+
return {
|
|
1334
|
+
status: 'ready',
|
|
1335
|
+
projectDir: tempDir,
|
|
1336
|
+
installs: [{ target: 'codex', scope: 'project', mode: 'cli' }],
|
|
1337
|
+
};
|
|
1338
|
+
},
|
|
1339
|
+
})).resolves.toBe(0);
|
|
1340
|
+
expect(calls).toEqual(['agents']);
|
|
1341
|
+
});
|
|
1342
|
+
it('skips to agent setup when context is ready but agents are not configured', async () => {
|
|
1343
|
+
const calls = [];
|
|
1344
|
+
const io = makeIo();
|
|
1345
|
+
await writeFile(join(tempDir, 'ktx.yaml'), [
|
|
1346
|
+
'setup:',
|
|
1347
|
+
' database_connection_ids: []',
|
|
1348
|
+
'connections: {}',
|
|
1349
|
+
'llm:',
|
|
1350
|
+
' provider:',
|
|
1351
|
+
' backend: anthropic',
|
|
1352
|
+
' models:',
|
|
1353
|
+
' default: claude-sonnet-4-6',
|
|
1354
|
+
'ingest:',
|
|
1355
|
+
' embeddings:',
|
|
1356
|
+
' backend: openai',
|
|
1357
|
+
' model: text-embedding-3-small',
|
|
1358
|
+
' dimensions: 1536',
|
|
1359
|
+
'',
|
|
1360
|
+
].join('\n'), 'utf-8');
|
|
1361
|
+
await writeKtxSetupState(tempDir, {
|
|
1362
|
+
completed_steps: ['project', 'llm', 'embeddings', 'sources', 'context'],
|
|
1363
|
+
});
|
|
1364
|
+
await writeKtxSetupContextState(tempDir, {
|
|
1365
|
+
runId: 'setup-context-local-ready',
|
|
1366
|
+
status: 'completed',
|
|
1367
|
+
startedAt: '2026-05-09T10:00:00.000Z',
|
|
1368
|
+
updatedAt: '2026-05-09T10:02:00.000Z',
|
|
1369
|
+
completedAt: '2026-05-09T10:02:00.000Z',
|
|
1370
|
+
primarySourceConnectionIds: [],
|
|
1371
|
+
contextSourceConnectionIds: [],
|
|
1372
|
+
reportIds: [],
|
|
1373
|
+
artifactPaths: [],
|
|
1374
|
+
retryableFailedTargets: [],
|
|
1375
|
+
commands: contextBuildCommands(tempDir, 'setup-context-local-ready'),
|
|
1376
|
+
});
|
|
1377
|
+
const readyMenuSelect = vi.fn();
|
|
1378
|
+
await expect(runKtxSetup({
|
|
1379
|
+
command: 'run',
|
|
1380
|
+
projectDir: tempDir,
|
|
1381
|
+
mode: 'existing',
|
|
1382
|
+
agents: false,
|
|
1383
|
+
inputMode: 'auto',
|
|
1384
|
+
yes: false,
|
|
1385
|
+
cliVersion: '0.2.0',
|
|
1386
|
+
skipLlm: false,
|
|
1387
|
+
skipEmbeddings: false,
|
|
1388
|
+
skipDatabases: false,
|
|
1389
|
+
skipSources: false,
|
|
1390
|
+
skipAgents: false,
|
|
1391
|
+
databaseSchemas: [],
|
|
1392
|
+
}, io.io, {
|
|
1393
|
+
readyMenuDeps: { prompts: { select: readyMenuSelect, cancel: vi.fn() } },
|
|
1394
|
+
model: async (args) => {
|
|
1395
|
+
expect(args.skipLlm).toBe(true);
|
|
1396
|
+
return { status: 'skipped', projectDir: tempDir };
|
|
1397
|
+
},
|
|
1398
|
+
embeddings: async (args) => {
|
|
1399
|
+
expect(args.skipEmbeddings).toBe(true);
|
|
1400
|
+
return { status: 'skipped', projectDir: tempDir };
|
|
1401
|
+
},
|
|
1402
|
+
databases: async (args) => {
|
|
1403
|
+
expect(args.skipDatabases).toBe(true);
|
|
1404
|
+
return { status: 'skipped', projectDir: tempDir };
|
|
1405
|
+
},
|
|
1406
|
+
sources: async (args) => {
|
|
1407
|
+
expect(args.skipSources).toBe(true);
|
|
1408
|
+
return { status: 'skipped', projectDir: tempDir };
|
|
1409
|
+
},
|
|
1410
|
+
agents: async () => {
|
|
1411
|
+
calls.push('agents');
|
|
1412
|
+
return {
|
|
1413
|
+
status: 'ready',
|
|
1414
|
+
projectDir: tempDir,
|
|
1415
|
+
installs: [{ target: 'codex', scope: 'project', mode: 'cli' }],
|
|
1416
|
+
};
|
|
1417
|
+
},
|
|
1418
|
+
})).resolves.toBe(0);
|
|
1419
|
+
expect(readyMenuSelect).not.toHaveBeenCalled();
|
|
1420
|
+
expect(calls).toEqual(['agents']);
|
|
1421
|
+
});
|
|
1422
|
+
it('runs only project resolution, context gate, and agent setup in --agents mode', async () => {
|
|
1423
|
+
const io = makeIo();
|
|
1424
|
+
const context = vi.fn(async () => ({ status: 'ready', projectDir: tempDir, runId: 'setup-context-local-test' }));
|
|
1425
|
+
const agents = vi.fn(async () => ({
|
|
1426
|
+
status: 'ready',
|
|
1427
|
+
projectDir: tempDir,
|
|
1428
|
+
installs: [{ target: 'universal', scope: 'project', mode: 'cli' }],
|
|
1429
|
+
}));
|
|
1430
|
+
await expect(runKtxSetup({
|
|
1431
|
+
command: 'run',
|
|
1432
|
+
projectDir: tempDir,
|
|
1433
|
+
mode: 'new',
|
|
1434
|
+
agents: true,
|
|
1435
|
+
target: 'universal',
|
|
1436
|
+
agentScope: 'project',
|
|
1437
|
+
inputMode: 'disabled',
|
|
1438
|
+
yes: true,
|
|
1439
|
+
cliVersion: '0.2.0',
|
|
1440
|
+
skipLlm: false,
|
|
1441
|
+
skipEmbeddings: false,
|
|
1442
|
+
skipDatabases: false,
|
|
1443
|
+
skipSources: false,
|
|
1444
|
+
skipAgents: false,
|
|
1445
|
+
databaseSchemas: [],
|
|
1446
|
+
}, io.io, {
|
|
1447
|
+
model: async () => {
|
|
1448
|
+
throw new Error('model should not run');
|
|
1449
|
+
},
|
|
1450
|
+
context,
|
|
1451
|
+
agents,
|
|
1452
|
+
})).resolves.toBe(0);
|
|
1453
|
+
expect(context).toHaveBeenCalledTimes(1);
|
|
1454
|
+
expect(agents).toHaveBeenCalledTimes(1);
|
|
1455
|
+
});
|
|
1456
|
+
it('does not run embedding setup when the model step fails', async () => {
|
|
1457
|
+
const testIo = makeIo();
|
|
1458
|
+
const model = vi.fn(async () => ({ status: 'failed', projectDir: tempDir }));
|
|
1459
|
+
const embeddings = vi.fn(async () => ({ status: 'ready', projectDir: tempDir }));
|
|
1460
|
+
await expect(runKtxSetup({
|
|
1461
|
+
command: 'run',
|
|
1462
|
+
projectDir: tempDir,
|
|
1463
|
+
mode: 'new',
|
|
1464
|
+
agents: false,
|
|
1465
|
+
skipAgents: true,
|
|
1466
|
+
inputMode: 'disabled',
|
|
1467
|
+
yes: false,
|
|
1468
|
+
cliVersion: '0.2.0',
|
|
1469
|
+
anthropicApiKeyEnv: 'ANTHROPIC_API_KEY', // pragma: allowlist secret
|
|
1470
|
+
anthropicModel: 'claude-sonnet-4-6',
|
|
1471
|
+
skipLlm: false,
|
|
1472
|
+
skipEmbeddings: false,
|
|
1473
|
+
databaseSchemas: [],
|
|
1474
|
+
skipDatabases: true,
|
|
1475
|
+
}, testIo.io, { model, embeddings })).resolves.toBe(1);
|
|
1476
|
+
expect(embeddings).not.toHaveBeenCalled();
|
|
1477
|
+
});
|
|
1478
|
+
});
|