@kaelio/ktx 0.0.0 → 0.1.0-rc.0
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 +202 -0
- package/assets/demo/orbit/demo.db +0 -0
- package/assets/demo/orbit/knowledge/global/activation-policy.md +18 -0
- package/assets/demo/orbit/knowledge/global/arr-contract-first.md +18 -0
- package/assets/demo/orbit/knowledge/global/customer-health-scoring.md +20 -0
- package/assets/demo/orbit/knowledge/global/discount-expiration.md +19 -0
- package/assets/demo/orbit/knowledge/global/internal-test-exclusion.md +16 -0
- package/assets/demo/orbit/knowledge/global/nrr-retention.md +19 -0
- package/assets/demo/orbit/knowledge/global/procurement-workflows.md +17 -0
- package/assets/demo/orbit/knowledge/global/revenue-gross-to-net.md +17 -0
- package/assets/demo/orbit/knowledge/global/segment-classification.md +17 -0
- package/assets/demo/orbit/knowledge/global/support-escalation.md +17 -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/orbit_demo/accounts.yaml +44 -0
- package/assets/demo/orbit/semantic-layer/orbit_demo/arr_movements.yaml +38 -0
- package/assets/demo/orbit/semantic-layer/orbit_demo/contracts.yaml +39 -0
- package/assets/demo/orbit/semantic-layer/orbit_demo/invoices.yaml +33 -0
- package/assets/demo/orbit/semantic-layer/orbit_demo/purchase_requests.yaml +33 -0
- package/assets/demo/orbit/semantic-layer/orbit_demo/support_tickets.yaml +37 -0
- package/assets/python/kaelio_ktx-0.1.0-py3-none-any.whl +0 -0
- package/assets/python/manifest.json +11 -0
- package/dist/agent-runtime.d.ts +33 -0
- package/dist/agent-runtime.js +62 -0
- package/dist/agent-runtime.test.d.ts +1 -0
- package/dist/agent-runtime.test.js +117 -0
- package/dist/agent-search-readiness.d.ts +11 -0
- package/dist/agent-search-readiness.js +60 -0
- package/dist/agent-search-readiness.test.d.ts +1 -0
- package/dist/agent-search-readiness.test.js +40 -0
- package/dist/agent.d.ts +71 -0
- package/dist/agent.js +156 -0
- package/dist/agent.test.d.ts +1 -0
- package/dist/agent.test.js +338 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +7 -0
- package/dist/clack.d.ts +6 -0
- package/dist/clack.js +4 -0
- package/dist/cli-program.d.ts +43 -0
- package/dist/cli-program.js +195 -0
- package/dist/cli-runtime.d.ts +52 -0
- package/dist/cli-runtime.js +45 -0
- package/dist/command-schemas.d.ts +96 -0
- package/dist/command-schemas.js +80 -0
- package/dist/commands/agent-commands.d.ts +3 -0
- package/dist/commands/agent-commands.js +126 -0
- package/dist/commands/completion-commands.d.ts +3 -0
- package/dist/commands/completion-commands.js +39 -0
- package/dist/commands/connection-commands.d.ts +4 -0
- package/dist/commands/connection-commands.js +287 -0
- package/dist/commands/connection-mapping.d.ts +63 -0
- package/dist/commands/connection-mapping.js +299 -0
- package/dist/commands/connection-mapping.test.d.ts +1 -0
- package/dist/commands/connection-mapping.test.js +230 -0
- package/dist/commands/connection-metabase-commands.d.ts +3 -0
- package/dist/commands/connection-metabase-commands.js +73 -0
- package/dist/commands/connection-metabase-setup.d.ts +83 -0
- package/dist/commands/connection-metabase-setup.js +540 -0
- package/dist/commands/connection-metabase-setup.test.d.ts +1 -0
- package/dist/commands/connection-metabase-setup.test.js +894 -0
- package/dist/commands/connection-notion-commands.d.ts +3 -0
- package/dist/commands/connection-notion-commands.js +74 -0
- package/dist/commands/connection-notion-tree.d.ts +68 -0
- package/dist/commands/connection-notion-tree.js +412 -0
- package/dist/commands/connection-notion-tree.test.d.ts +1 -0
- package/dist/commands/connection-notion-tree.test.js +237 -0
- package/dist/commands/connection-notion-tui.d.ts +71 -0
- package/dist/commands/connection-notion-tui.js +224 -0
- package/dist/commands/connection-notion-tui.test.d.ts +1 -0
- package/dist/commands/connection-notion-tui.test.js +237 -0
- package/dist/commands/connection-notion.d.ts +37 -0
- package/dist/commands/connection-notion.js +203 -0
- package/dist/commands/connection-notion.test.d.ts +1 -0
- package/dist/commands/connection-notion.test.js +364 -0
- package/dist/commands/demo-commands.d.ts +10 -0
- package/dist/commands/demo-commands.js +214 -0
- package/dist/commands/demo-commands.test.d.ts +1 -0
- package/dist/commands/demo-commands.test.js +24 -0
- package/dist/commands/doctor-commands.d.ts +3 -0
- package/dist/commands/doctor-commands.js +37 -0
- package/dist/commands/ingest-commands.d.ts +9 -0
- package/dist/commands/ingest-commands.js +129 -0
- package/dist/commands/knowledge-commands.d.ts +3 -0
- package/dist/commands/knowledge-commands.js +79 -0
- package/dist/commands/public-ingest-commands.d.ts +3 -0
- package/dist/commands/public-ingest-commands.js +92 -0
- package/dist/commands/runtime-commands.d.ts +3 -0
- package/dist/commands/runtime-commands.js +87 -0
- package/dist/commands/scan-commands.d.ts +3 -0
- package/dist/commands/scan-commands.js +249 -0
- package/dist/commands/serve-commands.d.ts +3 -0
- package/dist/commands/serve-commands.js +48 -0
- package/dist/commands/setup-commands.d.ts +3 -0
- package/dist/commands/setup-commands.js +378 -0
- package/dist/commands/sl-commands.d.ts +3 -0
- package/dist/commands/sl-commands.js +129 -0
- package/dist/commands/status-commands.d.ts +3 -0
- package/dist/commands/status-commands.js +15 -0
- package/dist/completion.d.ts +12 -0
- package/dist/completion.js +272 -0
- package/dist/connection.d.ts +62 -0
- package/dist/connection.js +261 -0
- package/dist/connection.test.d.ts +1 -0
- package/dist/connection.test.js +482 -0
- package/dist/context-build-view.d.ts +42 -0
- package/dist/context-build-view.js +309 -0
- package/dist/context-build-view.test.d.ts +1 -0
- package/dist/context-build-view.test.js +225 -0
- package/dist/demo-assets.d.ts +29 -0
- package/dist/demo-assets.js +229 -0
- package/dist/demo-assets.test.d.ts +1 -0
- package/dist/demo-assets.test.js +208 -0
- package/dist/demo-full.d.ts +32 -0
- package/dist/demo-full.js +158 -0
- package/dist/demo-full.test.d.ts +1 -0
- package/dist/demo-full.test.js +168 -0
- package/dist/demo-interaction.d.ts +66 -0
- package/dist/demo-interaction.js +136 -0
- package/dist/demo-interaction.test.d.ts +1 -0
- package/dist/demo-interaction.test.js +91 -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/demo-progress.d.ts +4 -0
- package/dist/demo-progress.js +76 -0
- package/dist/demo-progress.test.d.ts +1 -0
- package/dist/demo-progress.test.js +168 -0
- package/dist/demo-replay-store.d.ts +12 -0
- package/dist/demo-replay-store.js +47 -0
- package/dist/demo-replay-store.test.d.ts +1 -0
- package/dist/demo-replay-store.test.js +50 -0
- package/dist/demo-scan.d.ts +31 -0
- package/dist/demo-scan.js +171 -0
- package/dist/demo-scan.test.d.ts +1 -0
- package/dist/demo-scan.test.js +27 -0
- package/dist/demo-seeded-inspect.d.ts +127 -0
- package/dist/demo-seeded-inspect.js +198 -0
- package/dist/demo-seeded-inspect.test.d.ts +1 -0
- package/dist/demo-seeded-inspect.test.js +108 -0
- package/dist/demo-seeded.d.ts +11 -0
- package/dist/demo-seeded.js +19 -0
- package/dist/demo-seeded.test.d.ts +1 -0
- package/dist/demo-seeded.test.js +98 -0
- package/dist/demo.d.ts +74 -0
- package/dist/demo.js +378 -0
- package/dist/demo.test.d.ts +1 -0
- package/dist/demo.test.js +506 -0
- package/dist/dev.d.ts +3 -0
- package/dist/dev.js +42 -0
- package/dist/dev.test.d.ts +1 -0
- package/dist/dev.test.js +506 -0
- package/dist/doctor.d.ts +64 -0
- package/dist/doctor.js +272 -0
- package/dist/doctor.test.d.ts +1 -0
- package/dist/doctor.test.js +339 -0
- package/dist/example-smoke.test.d.ts +1 -0
- package/dist/example-smoke.test.js +182 -0
- package/dist/historic-sql-doctor.d.ts +22 -0
- package/dist/historic-sql-doctor.js +88 -0
- package/dist/historic-sql-doctor.test.d.ts +1 -0
- package/dist/historic-sql-doctor.test.js +141 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +14 -0
- package/dist/index.test.d.ts +1 -0
- package/dist/index.test.js +1740 -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.d.ts +53 -0
- package/dist/ingest.js +288 -0
- package/dist/ingest.test.d.ts +1 -0
- package/dist/ingest.test.js +1806 -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 +27 -0
- package/dist/io/print-list.js +121 -0
- package/dist/io/print-list.test.d.ts +1 -0
- package/dist/io/print-list.test.js +147 -0
- package/dist/io/symbols.d.ts +12 -0
- package/dist/io/symbols.js +29 -0
- package/dist/knowledge.d.ts +37 -0
- package/dist/knowledge.js +58 -0
- package/dist/knowledge.test.d.ts +1 -0
- package/dist/knowledge.test.js +72 -0
- package/dist/local-adapters.d.ts +9 -0
- package/dist/local-adapters.js +169 -0
- package/dist/local-scan-connectors.d.ts +3 -0
- package/dist/local-scan-connectors.js +70 -0
- package/dist/local-scan-connectors.test.d.ts +1 -0
- package/dist/local-scan-connectors.test.js +114 -0
- package/dist/managed-local-embeddings.d.ts +36 -0
- package/dist/managed-local-embeddings.js +48 -0
- package/dist/managed-local-embeddings.test.d.ts +1 -0
- package/dist/managed-local-embeddings.test.js +154 -0
- package/dist/managed-python-command.d.ts +29 -0
- package/dist/managed-python-command.js +81 -0
- package/dist/managed-python-command.test.d.ts +1 -0
- package/dist/managed-python-command.test.js +180 -0
- package/dist/managed-python-daemon.d.ts +79 -0
- package/dist/managed-python-daemon.js +267 -0
- package/dist/managed-python-daemon.test.d.ts +1 -0
- package/dist/managed-python-daemon.test.js +196 -0
- package/dist/managed-python-http.d.ts +37 -0
- package/dist/managed-python-http.js +109 -0
- package/dist/managed-python-http.test.d.ts +1 -0
- package/dist/managed-python-http.test.js +147 -0
- package/dist/managed-python-runtime.d.ts +125 -0
- package/dist/managed-python-runtime.js +311 -0
- package/dist/managed-python-runtime.test.d.ts +1 -0
- package/dist/managed-python-runtime.test.js +373 -0
- package/dist/memory-flow-hud.d.ts +32 -0
- package/dist/memory-flow-hud.js +342 -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 +359 -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 +52 -0
- package/dist/next-steps.js +84 -0
- package/dist/next-steps.test.d.ts +1 -0
- package/dist/next-steps.test.js +106 -0
- package/dist/project-dir.d.ts +1 -0
- package/dist/project-dir.js +4 -0
- package/dist/project-dir.test.d.ts +1 -0
- package/dist/project-dir.test.js +141 -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 +38 -0
- package/dist/prompt-navigation.test.d.ts +1 -0
- package/dist/prompt-navigation.test.js +25 -0
- package/dist/public-ingest.d.ts +63 -0
- package/dist/public-ingest.js +202 -0
- package/dist/public-ingest.test.d.ts +1 -0
- package/dist/public-ingest.test.js +208 -0
- package/dist/runtime.d.ts +49 -0
- package/dist/runtime.js +135 -0
- package/dist/runtime.test.d.ts +1 -0
- package/dist/runtime.test.js +272 -0
- package/dist/scan.d.ts +100 -0
- package/dist/scan.js +516 -0
- package/dist/scan.test.d.ts +1 -0
- package/dist/scan.test.js +1751 -0
- package/dist/serve.d.ts +51 -0
- package/dist/serve.js +102 -0
- package/dist/serve.test.d.ts +1 -0
- package/dist/serve.test.js +437 -0
- package/dist/setup-agents.d.ts +86 -0
- package/dist/setup-agents.js +257 -0
- package/dist/setup-agents.test.d.ts +1 -0
- package/dist/setup-agents.test.js +132 -0
- package/dist/setup-context.d.ts +116 -0
- package/dist/setup-context.js +564 -0
- package/dist/setup-context.test.d.ts +1 -0
- package/dist/setup-context.test.js +301 -0
- package/dist/setup-databases.d.ts +80 -0
- package/dist/setup-databases.js +1041 -0
- package/dist/setup-databases.test.d.ts +1 -0
- package/dist/setup-databases.test.js +1102 -0
- package/dist/setup-embeddings.d.ts +57 -0
- package/dist/setup-embeddings.js +388 -0
- package/dist/setup-embeddings.test.d.ts +1 -0
- package/dist/setup-embeddings.test.js +366 -0
- package/dist/setup-interrupt.d.ts +15 -0
- package/dist/setup-interrupt.js +65 -0
- package/dist/setup-interrupt.test.d.ts +1 -0
- package/dist/setup-interrupt.test.js +58 -0
- package/dist/setup-models.d.ts +68 -0
- package/dist/setup-models.js +313 -0
- package/dist/setup-models.test.d.ts +1 -0
- package/dist/setup-models.test.js +482 -0
- package/dist/setup-project.d.ts +47 -0
- package/dist/setup-project.js +274 -0
- package/dist/setup-project.test.d.ts +1 -0
- package/dist/setup-project.test.js +221 -0
- package/dist/setup-ready-menu.d.ts +19 -0
- package/dist/setup-ready-menu.js +43 -0
- package/dist/setup-ready-menu.test.d.ts +1 -0
- package/dist/setup-ready-menu.test.js +35 -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 +98 -0
- package/dist/setup-sources.js +969 -0
- package/dist/setup-sources.test.d.ts +1 -0
- package/dist/setup-sources.test.js +582 -0
- package/dist/setup.d.ts +157 -0
- package/dist/setup.js +488 -0
- package/dist/setup.test.d.ts +1 -0
- package/dist/setup.test.js +1220 -0
- package/dist/sl.d.ts +59 -0
- package/dist/sl.js +98 -0
- package/dist/sl.test.d.ts +1 -0
- package/dist/sl.test.js +333 -0
- package/dist/standalone-smoke.test.d.ts +1 -0
- package/dist/standalone-smoke.test.js +714 -0
- package/dist/startup-profile.d.ts +3 -0
- package/dist/startup-profile.js +44 -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 +136 -0
- package/node_modules/@ktx/connector-bigquery/dist/connector.js +336 -0
- package/node_modules/@ktx/connector-bigquery/dist/connector.test.d.ts +1 -0
- package/node_modules/@ktx/connector-bigquery/dist/connector.test.js +238 -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 +23 -0
- package/node_modules/@ktx/connector-clickhouse/dist/connector.d.ts +113 -0
- package/node_modules/@ktx/connector-clickhouse/dist/connector.js +331 -0
- package/node_modules/@ktx/connector-clickhouse/dist/connector.test.d.ts +1 -0
- package/node_modules/@ktx/connector-clickhouse/dist/connector.test.js +236 -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 +23 -0
- package/node_modules/@ktx/connector-mysql/dist/connector.d.ts +116 -0
- package/node_modules/@ktx/connector-mysql/dist/connector.js +369 -0
- package/node_modules/@ktx/connector-mysql/dist/connector.test.d.ts +1 -0
- package/node_modules/@ktx/connector-mysql/dist/connector.test.js +226 -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 +23 -0
- package/node_modules/@ktx/connector-postgres/dist/connector.d.ts +135 -0
- package/node_modules/@ktx/connector-postgres/dist/connector.js +460 -0
- package/node_modules/@ktx/connector-postgres/dist/connector.test.d.ts +1 -0
- package/node_modules/@ktx/connector-postgres/dist/connector.test.js +289 -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 +46 -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 +23 -0
- package/node_modules/@ktx/connector-posthog/dist/connector.d.ts +90 -0
- package/node_modules/@ktx/connector-posthog/dist/connector.js +441 -0
- package/node_modules/@ktx/connector-posthog/dist/connector.test.d.ts +1 -0
- package/node_modules/@ktx/connector-posthog/dist/connector.test.js +342 -0
- package/node_modules/@ktx/connector-posthog/dist/dialect.d.ts +37 -0
- package/node_modules/@ktx/connector-posthog/dist/dialect.js +220 -0
- package/node_modules/@ktx/connector-posthog/dist/dialect.test.d.ts +1 -0
- package/node_modules/@ktx/connector-posthog/dist/dialect.test.js +34 -0
- package/node_modules/@ktx/connector-posthog/dist/index.d.ts +4 -0
- package/node_modules/@ktx/connector-posthog/dist/index.js +4 -0
- package/node_modules/@ktx/connector-posthog/dist/live-database-introspection.d.ts +12 -0
- package/node_modules/@ktx/connector-posthog/dist/live-database-introspection.js +22 -0
- package/node_modules/@ktx/connector-posthog/dist/package-exports.test.d.ts +1 -0
- package/node_modules/@ktx/connector-posthog/dist/package-exports.test.js +10 -0
- package/node_modules/@ktx/connector-posthog/dist/schema-descriptions.d.ts +3 -0
- package/node_modules/@ktx/connector-posthog/dist/schema-descriptions.js +90 -0
- package/node_modules/@ktx/connector-posthog/package.json +21 -0
- package/node_modules/@ktx/connector-snowflake/dist/connector.d.ts +128 -0
- package/node_modules/@ktx/connector-snowflake/dist/connector.js +494 -0
- package/node_modules/@ktx/connector-snowflake/dist/connector.test.d.ts +1 -0
- package/node_modules/@ktx/connector-snowflake/dist/connector.test.js +215 -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 +23 -0
- package/node_modules/@ktx/connector-sqlite/dist/connector.d.ts +61 -0
- package/node_modules/@ktx/connector-sqlite/dist/connector.js +255 -0
- package/node_modules/@ktx/connector-sqlite/dist/connector.test.d.ts +1 -0
- package/node_modules/@ktx/connector-sqlite/dist/connector.test.js +191 -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 +23 -0
- package/node_modules/@ktx/connector-sqlserver/dist/connector.d.ts +137 -0
- package/node_modules/@ktx/connector-sqlserver/dist/connector.js +482 -0
- package/node_modules/@ktx/connector-sqlserver/dist/connector.test.d.ts +1 -0
- package/node_modules/@ktx/connector-sqlserver/dist/connector.test.js +278 -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 +23 -0
- package/node_modules/@ktx/context/dist/agent/agent-runner.service.d.ts +37 -0
- package/node_modules/@ktx/context/dist/agent/agent-runner.service.js +61 -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 +304 -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 +26 -0
- package/node_modules/@ktx/context/dist/connections/connection-type.js +25 -0
- package/node_modules/@ktx/context/dist/connections/index.d.ts +9 -0
- package/node_modules/@ktx/context/dist/connections/index.js +8 -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 +49 -0
- package/node_modules/@ktx/context/dist/connections/notion-config.d.ts +37 -0
- package/node_modules/@ktx/context/dist/connections/notion-config.js +128 -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 +91 -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 +55 -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 +96 -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 +76 -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 +119 -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 +181 -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 +720 -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 +284 -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 +16 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/dbt/dbt.adapter.js +40 -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 +39 -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 +11 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/bigquery-query-history-reader.js +175 -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 +163 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/chunk.d.ts +3 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/chunk.js +75 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/chunk.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/chunk.test.js +228 -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 +37 -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 +167 -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/historic-sql.adapter.d.ts +25 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/historic-sql.adapter.js +90 -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 +259 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/postgres-pgss-query-history-reader.d.ts +8 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/postgres-pgss-query-history-reader.js +202 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/postgres-pgss-query-history-reader.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/postgres-pgss-query-history-reader.test.js +248 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/snowflake-query-history-reader.d.ts +5 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/snowflake-query-history-reader.js +165 -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 +162 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/stage-pgss-golden.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/stage-pgss-golden.test.js +107 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/stage-pgss.d.ts +37 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/stage-pgss.js +364 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/stage-pgss.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/stage-pgss.test.js +592 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/stage.d.ts +13 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/stage.js +442 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/stage.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/stage.test.js +727 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/types.d.ts +209 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/types.js +93 -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 +190 -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 +209 -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 +60 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/live-database/manifest.js +160 -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 +238 -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 +392 -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 +10 -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 +439 -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 +15 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/lookml/lookml.adapter.js +38 -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 +39 -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 +288 -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 +83 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/client.d.ts +121 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/client.js +604 -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 +305 -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 +128 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fetch.d.ts +11 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fetch.js +235 -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 +472 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/local-metabase.adapter.d.ts +10 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/local-metabase.adapter.js +45 -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 +44 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/local-source-state-store.d.ts +85 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/local-source-state-store.js +369 -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 +292 -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 +17 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metabase/metabase.adapter.js +40 -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 +21 -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 +152 -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 +14 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/metricflow.adapter.js +38 -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 +90 -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 +134 -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 +81 -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 +106 -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 +9 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/fetch.js +513 -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 +355 -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 +42 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/notion.adapter.js +108 -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 +271 -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 +96 -0
- package/node_modules/@ktx/context/dist/ingest/adapters/notion/types.js +61 -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 +65 -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 +18 -0
- package/node_modules/@ktx/context/dist/ingest/index.d.ts +139 -0
- package/node_modules/@ktx/context/dist/ingest/index.js +86 -0
- package/node_modules/@ktx/context/dist/ingest/ingest-bundle.runner.d.ts +37 -0
- package/node_modules/@ktx/context/dist/ingest/ingest-bundle.runner.js +1161 -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 +1583 -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 +61 -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 +107 -0
- package/node_modules/@ktx/context/dist/ingest/local-adapters.d.ts +26 -0
- package/node_modules/@ktx/context/dist/ingest/local-adapters.js +187 -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 +397 -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 +506 -0
- package/node_modules/@ktx/context/dist/ingest/local-bundle-runtime.d.ts +38 -0
- package/node_modules/@ktx/context/dist/ingest/local-bundle-runtime.js +436 -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 +107 -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 +93 -0
- package/node_modules/@ktx/context/dist/ingest/local-ingest.js +306 -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 +52 -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 +68 -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 +283 -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 +555 -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/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 +76 -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 +111 -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 +446 -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 +85 -0
- package/node_modules/@ktx/context/dist/ingest/page-triage/page-triage.service.js +323 -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 +472 -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 +189 -0
- package/node_modules/@ktx/context/dist/ingest/report-snapshot.js +169 -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 +206 -0
- package/node_modules/@ktx/context/dist/ingest/reports.d.ts +69 -0
- package/node_modules/@ktx/context/dist/ingest/reports.js +20 -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 +470 -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 +325 -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 +109 -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 +75 -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 +81 -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 +170 -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 +100 -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 +134 -0
- package/node_modules/@ktx/context/dist/ingest/stages/stage-4-reconciliation.d.ts +29 -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 +198 -0
- package/node_modules/@ktx/context/dist/ingest/tools/emit-unmapped-fallback.tool.d.ts +12 -0
- package/node_modules/@ktx/context/dist/ingest/tools/emit-unmapped-fallback.tool.js +41 -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 +22 -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 +50 -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 +82 -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/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 +21 -0
- package/node_modules/@ktx/context/dist/llm/generation.js +46 -0
- package/node_modules/@ktx/context/dist/llm/index.d.ts +5 -0
- package/node_modules/@ktx/context/dist/llm/index.js +4 -0
- package/node_modules/@ktx/context/dist/llm/local-config.d.ts +14 -0
- package/node_modules/@ktx/context/dist/llm/local-config.js +109 -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 +127 -0
- package/node_modules/@ktx/context/dist/mcp/context-tools.d.ts +9 -0
- package/node_modules/@ktx/context/dist/mcp/context-tools.js +324 -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 +16 -0
- package/node_modules/@ktx/context/dist/mcp/local-project-ports.js +565 -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 +984 -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 +779 -0
- package/node_modules/@ktx/context/dist/mcp/types.d.ts +317 -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 +104 -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 +23 -0
- package/node_modules/@ktx/context/dist/memory/local-memory.js +378 -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 +301 -0
- package/node_modules/@ktx/context/dist/memory/memory-agent.service.js +535 -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 +83 -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 +245 -0
- package/node_modules/@ktx/context/dist/project/config.d.ts +118 -0
- package/node_modules/@ktx/context/dist/project/config.js +346 -0
- package/node_modules/@ktx/context/dist/project/config.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/project/config.test.js +347 -0
- package/node_modules/@ktx/context/dist/project/index.d.ts +11 -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 +35 -0
- package/node_modules/@ktx/context/dist/project/mappings-yaml-schema.js +85 -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 +67 -0
- package/node_modules/@ktx/context/dist/project/project.d.ts +30 -0
- package/node_modules/@ktx/context/dist/project/project.js +90 -0
- package/node_modules/@ktx/context/dist/project/project.test.d.ts +1 -0
- package/node_modules/@ktx/context/dist/project/project.test.js +58 -0
- package/node_modules/@ktx/context/dist/project/setup-config.d.ts +8 -0
- package/node_modules/@ktx/context/dist/project/setup-config.js +41 -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 +56 -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 +103 -0
- package/node_modules/@ktx/context/dist/scan/description-generation.js +376 -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 +271 -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 +9 -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/index.d.ts +68 -0
- package/node_modules/@ktx/context/dist/scan/index.js +35 -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 +264 -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 +725 -0
- package/node_modules/@ktx/context/dist/scan/local-enrichment.d.ts +49 -0
- package/node_modules/@ktx/context/dist/scan/local-enrichment.js +497 -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 +665 -0
- package/node_modules/@ktx/context/dist/scan/local-scan.d.ts +65 -0
- package/node_modules/@ktx/context/dist/scan/local-scan.js +367 -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 +1331 -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 +145 -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 +270 -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 +1068 -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 +534 -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 +29 -0
- package/node_modules/@ktx/context/dist/scan/relationship-discovery.js +248 -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 +636 -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 +33 -0
- package/node_modules/@ktx/context/dist/scan/relationship-llm-proposal.js +197 -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 +219 -0
- package/node_modules/@ktx/context/dist/scan/relationship-locality.d.ts +15 -0
- package/node_modules/@ktx/context/dist/scan/relationship-locality.js +116 -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 +322 -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 +314 -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 +299 -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/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 +407 -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 +6 -0
- package/node_modules/@ktx/context/dist/search/index.js +4 -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 +47 -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/descriptions.d.ts +14 -0
- package/node_modules/@ktx/context/dist/sl/descriptions.js +20 -0
- package/node_modules/@ktx/context/dist/sl/index.d.ts +13 -0
- package/node_modules/@ktx/context/dist/sl/index.js +9 -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 +54 -0
- package/node_modules/@ktx/context/dist/sl/local-sl.js +443 -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 +254 -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 +431 -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 +237 -0
- package/node_modules/@ktx/context/dist/sl/ports.d.ts +60 -0
- package/node_modules/@ktx/context/dist/sl/ports.js +1 -0
- package/node_modules/@ktx/context/dist/sl/schemas.d.ts +141 -0
- package/node_modules/@ktx/context/dist/sl/schemas.js +132 -0
- package/node_modules/@ktx/context/dist/sl/semantic-layer.service.d.ts +199 -0
- package/node_modules/@ktx/context/dist/sl/semantic-layer.service.js +936 -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 +602 -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 +16 -0
- package/node_modules/@ktx/context/dist/sl/sl-search.service.js +133 -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 +142 -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 +54 -0
- package/node_modules/@ktx/context/dist/sl/sqlite-sl-sources-index.js +407 -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 +139 -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 +259 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-edit-source.tool.d.ts +31 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-edit-source.tool.js +160 -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 +147 -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 +238 -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 +115 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-write-source.tool.d.ts +296 -0
- package/node_modules/@ktx/context/dist/sl/tools/sl-write-source.tool.js +301 -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 +225 -0
- package/node_modules/@ktx/context/dist/sl/types.d.ts +111 -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 +125 -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 +50 -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 +17 -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/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 +83 -0
- package/node_modules/@ktx/context/dist/tools/base-tool.js +77 -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 +17 -0
- package/node_modules/@ktx/context/dist/tools/index.js +10 -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 +51 -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 +8 -0
- package/node_modules/@ktx/context/dist/wiki/index.js +5 -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 +343 -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 +93 -0
- package/node_modules/@ktx/context/dist/wiki/local-knowledge.d.ts +55 -0
- package/node_modules/@ktx/context/dist/wiki/local-knowledge.js +284 -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 +200 -0
- package/node_modules/@ktx/context/dist/wiki/ports.d.ts +68 -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 +206 -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 +97 -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 +18 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-list-tags.tool.js +39 -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 +36 -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 +54 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-remove.tool.d.ts +26 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-remove.tool.js +63 -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 +54 -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 +77 -0
- package/node_modules/@ktx/context/dist/wiki/tools/wiki-write.tool.js +138 -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 +147 -0
- package/node_modules/@ktx/context/dist/wiki/types.d.ts +48 -0
- package/node_modules/@ktx/context/dist/wiki/types.js +1 -0
- package/node_modules/@ktx/context/package.json +134 -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 +27 -0
- package/node_modules/@ktx/context/prompts/memory_agent_bundle_ingest_work_unit.md +28 -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 +102 -0
- package/node_modules/@ktx/context/skills/dbt_ingest/SKILL.md +34 -0
- package/node_modules/@ktx/context/skills/historic_sql_curator/SKILL.md +153 -0
- package/node_modules/@ktx/context/skills/historic_sql_ingest/SKILL.md +170 -0
- package/node_modules/@ktx/context/skills/ingest_triage/SKILL.md +77 -0
- package/node_modules/@ktx/context/skills/knowledge_capture/SKILL.md +124 -0
- package/node_modules/@ktx/context/skills/live_database_ingest/SKILL.md +58 -0
- package/node_modules/@ktx/context/skills/looker_ingest/SKILL.md +217 -0
- package/node_modules/@ktx/context/skills/lookml_ingest/SKILL.md +180 -0
- package/node_modules/@ktx/context/skills/metabase_ingest/SKILL.md +218 -0
- package/node_modules/@ktx/context/skills/metricflow_ingest/SKILL.md +274 -0
- package/node_modules/@ktx/context/skills/notion_synthesize/SKILL.md +69 -0
- package/node_modules/@ktx/context/skills/sl/SKILL.md +240 -0
- package/node_modules/@ktx/context/skills/sl_capture/SKILL.md +276 -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 +10 -0
- package/node_modules/@ktx/llm/dist/index.js +6 -0
- package/node_modules/@ktx/llm/dist/message-builder.d.ts +40 -0
- package/node_modules/@ktx/llm/dist/message-builder.js +135 -0
- package/node_modules/@ktx/llm/dist/message-builder.test.d.ts +1 -0
- package/node_modules/@ktx/llm/dist/message-builder.test.js +97 -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 +41 -0
- package/node_modules/@ktx/llm/dist/model-provider.d.ts +18 -0
- package/node_modules/@ktx/llm/dist/model-provider.js +111 -0
- package/node_modules/@ktx/llm/dist/model-provider.test.d.ts +1 -0
- package/node_modules/@ktx/llm/dist/model-provider.test.js +127 -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 +26 -0
- package/package.json +73 -7
- package/README.md +0 -3
|
@@ -0,0 +1,1161 @@
|
|
|
1
|
+
import { mkdir, readFile, rm, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { dirname, join } from 'node:path';
|
|
3
|
+
import { tool } from 'ai';
|
|
4
|
+
import pLimit from 'p-limit';
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
import { noopLogger } from '../core/index.js';
|
|
7
|
+
import { createTouchedSlSources } from '../tools/index.js';
|
|
8
|
+
import { actionTargetConnectionId } from './action-identity.js';
|
|
9
|
+
import { selectRelevantCanonicalPins } from './canonical-pins.js';
|
|
10
|
+
import { sanitizeMemoryFlowError } from './memory-flow/live-buffer.js';
|
|
11
|
+
import { buildSyncId, rawSourcesDirForSync } from './raw-sources-paths.js';
|
|
12
|
+
import { buildStageIndexFromReportBody, } from './reports.js';
|
|
13
|
+
import { buildReconcileSystemPrompt, buildReconcileToolSet, buildReconcileUserPrompt, } from './stages/build-reconcile-context.js';
|
|
14
|
+
import { buildWuSystemPrompt, buildWuToolSet, buildWuUserPrompt } from './stages/build-wu-context.js';
|
|
15
|
+
import { stageRawFilesStage1 } from './stages/stage-1-stage-raw-files.js';
|
|
16
|
+
import { executeWorkUnit } from './stages/stage-3-work-units.js';
|
|
17
|
+
import { runReconciliationStage4 } from './stages/stage-4-reconciliation.js';
|
|
18
|
+
import { validateWuTouchedSources } from './stages/validate-wu-sources.js';
|
|
19
|
+
import { createEmitArtifactResolutionTool } from './tools/emit-artifact-resolution.tool.js';
|
|
20
|
+
import { createEmitConflictResolutionTool } from './tools/emit-conflict-resolution.tool.js';
|
|
21
|
+
import { createEmitEvictionDecisionTool } from './tools/emit-eviction-decision.tool.js';
|
|
22
|
+
import { createEmitUnmappedFallbackTool } from './tools/emit-unmapped-fallback.tool.js';
|
|
23
|
+
import { createEvictionListTool } from './tools/eviction-list.tool.js';
|
|
24
|
+
import { createReadRawSpanTool } from './tools/read-raw-span.tool.js';
|
|
25
|
+
import { createStageDiffTool } from './tools/stage-diff.tool.js';
|
|
26
|
+
import { createStageListTool } from './tools/stage-list.tool.js';
|
|
27
|
+
import { wrapToolsWithLogger } from './tools/tool-call-logger.js';
|
|
28
|
+
function workUnitToMemoryFlowPlannedWorkUnit(workUnit) {
|
|
29
|
+
return {
|
|
30
|
+
unitKey: workUnit.unitKey,
|
|
31
|
+
rawFiles: workUnit.rawFiles,
|
|
32
|
+
peerFileCount: workUnit.peerFileIndex.length,
|
|
33
|
+
dependencyCount: workUnit.dependencyPaths.length,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function stageIndexWorkUnitToMemoryFlowPlannedWorkUnit(workUnit) {
|
|
37
|
+
return {
|
|
38
|
+
unitKey: workUnit.unitKey,
|
|
39
|
+
rawFiles: workUnit.rawFiles,
|
|
40
|
+
peerFileCount: 0,
|
|
41
|
+
dependencyCount: 0,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function countMemoryFlowActions(actions, target) {
|
|
45
|
+
return actions.filter((action) => action.target === target).length;
|
|
46
|
+
}
|
|
47
|
+
function reportIdFromCreateResult(result) {
|
|
48
|
+
if (!result || typeof result !== 'object' || !('id' in result)) {
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
const id = result.id;
|
|
52
|
+
return typeof id === 'string' && id.length > 0 ? id : undefined;
|
|
53
|
+
}
|
|
54
|
+
export class IngestBundleRunner {
|
|
55
|
+
deps;
|
|
56
|
+
logger;
|
|
57
|
+
chainByConnection = new Map();
|
|
58
|
+
constructor(deps) {
|
|
59
|
+
this.deps = deps;
|
|
60
|
+
this.logger = deps.logger ?? noopLogger;
|
|
61
|
+
}
|
|
62
|
+
async run(job, ctx) {
|
|
63
|
+
const key = job.connectionId;
|
|
64
|
+
const previous = this.chainByConnection.get(key);
|
|
65
|
+
if (previous) {
|
|
66
|
+
this.logger.log(`[ingest-bundle] queued behind previous job for connection=${key}`);
|
|
67
|
+
}
|
|
68
|
+
const run = (previous ?? Promise.resolve()).catch(() => undefined).then(() => this.runInner(job, ctx));
|
|
69
|
+
const chainSlot = run.finally(() => {
|
|
70
|
+
if (this.chainByConnection.get(key) === chainSlot) {
|
|
71
|
+
this.chainByConnection.delete(key);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
// Keep the chain alive but silence unhandled rejection — callers await `run` directly.
|
|
75
|
+
chainSlot.catch(() => undefined);
|
|
76
|
+
this.chainByConnection.set(key, chainSlot);
|
|
77
|
+
try {
|
|
78
|
+
const result = await run;
|
|
79
|
+
ctx?.memoryFlow?.finish('done');
|
|
80
|
+
return { ...result, jobId: job.jobId };
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
ctx?.memoryFlow?.finish('error', [sanitizeMemoryFlowError(error)]);
|
|
84
|
+
throw error;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
stageRawFilesStage1 = stageRawFilesStage1;
|
|
88
|
+
async syncKnowledgeSlRefsFromActions(connectionId, actions) {
|
|
89
|
+
if (!this.deps.knowledgeSlRefs) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const slTargetsBySourceName = new Map();
|
|
93
|
+
const wikiActionsByKey = new Map();
|
|
94
|
+
for (const action of actions) {
|
|
95
|
+
if (action.target === 'sl') {
|
|
96
|
+
const bucket = slTargetsBySourceName.get(action.key) ?? new Set();
|
|
97
|
+
bucket.add(actionTargetConnectionId(action, connectionId));
|
|
98
|
+
slTargetsBySourceName.set(action.key, bucket);
|
|
99
|
+
}
|
|
100
|
+
if (action.target === 'wiki') {
|
|
101
|
+
wikiActionsByKey.set(action.key, action);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
for (const action of wikiActionsByKey.values()) {
|
|
105
|
+
if (action.type === 'removed') {
|
|
106
|
+
await this.deps.knowledgeSlRefs.syncFromWiki({
|
|
107
|
+
wikiPageKey: action.key,
|
|
108
|
+
wikiScope: 'GLOBAL',
|
|
109
|
+
wikiScopeId: null,
|
|
110
|
+
refs: [],
|
|
111
|
+
});
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
114
|
+
const page = await this.deps.wikiService.readPage('GLOBAL', null, action.key);
|
|
115
|
+
const bareSources = [
|
|
116
|
+
...new Set((page?.frontmatter.sl_refs ?? [])
|
|
117
|
+
.map((ref) => ref.split('.')[0])
|
|
118
|
+
.filter((sourceName) => sourceName.length > 0)),
|
|
119
|
+
];
|
|
120
|
+
const refs = bareSources.flatMap((sourceName) => {
|
|
121
|
+
const targets = slTargetsBySourceName.get(sourceName);
|
|
122
|
+
if (!targets || targets.size === 0) {
|
|
123
|
+
return [{ connectionId, sourceName }];
|
|
124
|
+
}
|
|
125
|
+
return [...targets].sort().map((targetConnectionId) => ({ connectionId: targetConnectionId, sourceName }));
|
|
126
|
+
});
|
|
127
|
+
await this.deps.knowledgeSlRefs.syncFromWiki({
|
|
128
|
+
wikiPageKey: action.key,
|
|
129
|
+
wikiScope: 'GLOBAL',
|
|
130
|
+
wikiScopeId: null,
|
|
131
|
+
refs,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
async materializeOverrideSnapshot(report, ctx) {
|
|
136
|
+
const rawRoot = rawSourcesDirForSync(ctx.connectionId, ctx.sourceKey, report.body.syncId);
|
|
137
|
+
const files = await this.deps.gitService.listFilesAtHead(rawRoot);
|
|
138
|
+
if (files.length === 0) {
|
|
139
|
+
throw new Error(`override ingest: no raw-source files found for prior sync ${report.body.syncId}`);
|
|
140
|
+
}
|
|
141
|
+
const stagedDir = this.deps.storage.resolvePullDir(ctx.jobId);
|
|
142
|
+
await rm(stagedDir, { recursive: true, force: true });
|
|
143
|
+
await mkdir(stagedDir, { recursive: true });
|
|
144
|
+
for (const file of files) {
|
|
145
|
+
const relativePath = file.startsWith(`${rawRoot}/`) ? file.slice(rawRoot.length + 1) : file;
|
|
146
|
+
const absoluteTarget = join(stagedDir, relativePath);
|
|
147
|
+
await mkdir(dirname(absoluteTarget), { recursive: true });
|
|
148
|
+
await writeFile(absoluteTarget, await this.deps.gitService.getFileAtCommit(file, 'HEAD'), 'utf-8');
|
|
149
|
+
}
|
|
150
|
+
return stagedDir;
|
|
151
|
+
}
|
|
152
|
+
async loadOverrideReport(job) {
|
|
153
|
+
if (job.bundleRef.kind !== 'override') {
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
const report = await this.deps.reports.findByJobId(job.bundleRef.priorJobId);
|
|
157
|
+
if (!report) {
|
|
158
|
+
throw new Error(`override ingest: prior report ${job.bundleRef.priorJobId} not found`);
|
|
159
|
+
}
|
|
160
|
+
if (report.connectionId !== job.connectionId || report.sourceKey !== job.sourceKey) {
|
|
161
|
+
throw new Error(`override ingest: prior report ${job.bundleRef.priorJobId} belongs to ${report.connectionId}/${report.sourceKey}, not ${job.connectionId}/${job.sourceKey}`);
|
|
162
|
+
}
|
|
163
|
+
return report;
|
|
164
|
+
}
|
|
165
|
+
async resolveStagedDir(ref, ctx) {
|
|
166
|
+
if (ref.kind === 'upload') {
|
|
167
|
+
return this.deps.storage.resolveUploadDir(ref.uploadId);
|
|
168
|
+
}
|
|
169
|
+
if (ref.kind === 'override') {
|
|
170
|
+
throw new Error('override bundle refs must be materialized from the prior report snapshot');
|
|
171
|
+
}
|
|
172
|
+
const stagedDir = this.deps.storage.resolvePullDir(ctx.jobId);
|
|
173
|
+
await mkdir(stagedDir, { recursive: true });
|
|
174
|
+
const adapter = this.deps.registry.get(ctx.sourceKey);
|
|
175
|
+
if (!adapter.fetch) {
|
|
176
|
+
throw new Error(`source adapter '${ctx.sourceKey}' does not support scheduled_pull (no fetch() method)`);
|
|
177
|
+
}
|
|
178
|
+
await adapter.fetch(ref.config, stagedDir, { connectionId: ctx.connectionId, sourceKey: ctx.sourceKey });
|
|
179
|
+
return stagedDir;
|
|
180
|
+
}
|
|
181
|
+
buildCommitMessage(job, syncId, diffSummary, failedWUs) {
|
|
182
|
+
const diff = `+${diffSummary.added}/~${diffSummary.modified}/-${diffSummary.deleted}/=${diffSummary.unchanged}`;
|
|
183
|
+
const failed = failedWUs.length > 0 ? `; failed WUs: ${failedWUs.join(', ')}` : '';
|
|
184
|
+
return `ingest(${job.sourceKey}): ${job.jobId} syncId=${syncId} diff=${diff}${failed}`;
|
|
185
|
+
}
|
|
186
|
+
async buildWikiIndex() {
|
|
187
|
+
const pages = await this.deps.knowledgeIndex?.listPagesForUser('system');
|
|
188
|
+
if (!pages || pages.length === 0) {
|
|
189
|
+
return '(empty)';
|
|
190
|
+
}
|
|
191
|
+
return `## Knowledge Pages\n${pages.map((page) => `- ${page.page_key}: ${page.summary}`).join('\n')}`;
|
|
192
|
+
}
|
|
193
|
+
async buildSlIndex(connectionIds) {
|
|
194
|
+
const blocks = await Promise.all(connectionIds.map(async (connectionId) => {
|
|
195
|
+
try {
|
|
196
|
+
const files = await this.deps.semanticLayerService.listFilesForConnection(connectionId);
|
|
197
|
+
const names = files.filter((f) => !f.startsWith('_schema/')).map((f) => f.replace(/\.yaml$/, ''));
|
|
198
|
+
const body = names.length > 0 ? names.join('\n') : '(no sources yet)';
|
|
199
|
+
return `## ${connectionId}\n${body}`;
|
|
200
|
+
}
|
|
201
|
+
catch {
|
|
202
|
+
return `## ${connectionId}\n(empty)`;
|
|
203
|
+
}
|
|
204
|
+
}));
|
|
205
|
+
return blocks.join('\n\n');
|
|
206
|
+
}
|
|
207
|
+
resolveContextCuratorBudget(bundleRef, stageIndex) {
|
|
208
|
+
const rawConfig = bundleRef.kind === 'scheduled_pull' && bundleRef.config && typeof bundleRef.config === 'object'
|
|
209
|
+
? bundleRef.config
|
|
210
|
+
: {};
|
|
211
|
+
const configuredCreates = typeof rawConfig.maxKnowledgeCreatesPerRun === 'number' ? rawConfig.maxKnowledgeCreatesPerRun : 5;
|
|
212
|
+
const configuredUpdates = typeof rawConfig.maxKnowledgeUpdatesPerRun === 'number' ? rawConfig.maxKnowledgeUpdatesPerRun : 20;
|
|
213
|
+
const wikiActions = stageIndex.workUnits.flatMap((wu) => wu.actions).filter((action) => action.target === 'wiki');
|
|
214
|
+
const usedCreates = wikiActions.filter((action) => action.type === 'created').length;
|
|
215
|
+
const usedUpdates = wikiActions.filter((action) => action.type === 'updated').length;
|
|
216
|
+
return {
|
|
217
|
+
creates: Math.max(0, configuredCreates - usedCreates),
|
|
218
|
+
updates: Math.max(0, configuredUpdates - usedUpdates),
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
buildFailedWorkUnitOutcome(wu, error) {
|
|
222
|
+
return {
|
|
223
|
+
unitKey: wu.unitKey,
|
|
224
|
+
status: 'failed',
|
|
225
|
+
reason: error instanceof Error ? error.message : String(error),
|
|
226
|
+
preSha: '',
|
|
227
|
+
postSha: '',
|
|
228
|
+
actions: [],
|
|
229
|
+
touchedSlSources: [],
|
|
230
|
+
slDisallowed: wu.slDisallowed,
|
|
231
|
+
slDisallowedReason: wu.slDisallowedReason,
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
formatWorkUnitFailure(outcome) {
|
|
235
|
+
return `WorkUnit ${outcome.unitKey} failed: ${outcome.reason ?? 'unknown failure'}`;
|
|
236
|
+
}
|
|
237
|
+
filterWorkUnitsForTriage(workUnits, triageResult) {
|
|
238
|
+
if (!triageResult?.enabled) {
|
|
239
|
+
return workUnits;
|
|
240
|
+
}
|
|
241
|
+
return workUnits.filter((wu) => wu.rawFiles.some((rawPath) => triageResult.fullRawPaths.has(rawPath)));
|
|
242
|
+
}
|
|
243
|
+
async runInner(job, ctx) {
|
|
244
|
+
const syncId = buildSyncId(new Date(), job.jobId);
|
|
245
|
+
const memoryFlow = ctx?.memoryFlow;
|
|
246
|
+
const baseSha = await this.deps.lockingService.withLock('config:repo', () => this.deps.gitService.revParseHead());
|
|
247
|
+
if (!baseSha) {
|
|
248
|
+
throw new Error('ingest-bundle: config repo has no HEAD');
|
|
249
|
+
}
|
|
250
|
+
const transcriptDir = this.deps.storage.resolveTranscriptDir(job.jobId);
|
|
251
|
+
const transcriptSummaries = new Map();
|
|
252
|
+
const recordTranscriptEntry = (path) => (entry) => {
|
|
253
|
+
const current = transcriptSummaries.get(entry.wuKey) ??
|
|
254
|
+
{
|
|
255
|
+
unitKey: entry.wuKey,
|
|
256
|
+
path,
|
|
257
|
+
toolCallCount: 0,
|
|
258
|
+
errorCount: 0,
|
|
259
|
+
toolNames: new Set(),
|
|
260
|
+
};
|
|
261
|
+
current.toolCallCount += 1;
|
|
262
|
+
current.errorCount += entry.error ? 1 : 0;
|
|
263
|
+
current.toolNames.add(entry.toolName);
|
|
264
|
+
transcriptSummaries.set(entry.wuKey, current);
|
|
265
|
+
};
|
|
266
|
+
const overrideReport = await this.loadOverrideReport(job);
|
|
267
|
+
const stage1 = ctx?.startPhase(0.08);
|
|
268
|
+
await stage1?.updateProgress(0.0, 'Fetching source files');
|
|
269
|
+
const adapter = this.deps.registry.get(job.sourceKey);
|
|
270
|
+
const stagedDir = overrideReport
|
|
271
|
+
? await this.materializeOverrideSnapshot(overrideReport, {
|
|
272
|
+
connectionId: job.connectionId,
|
|
273
|
+
sourceKey: job.sourceKey,
|
|
274
|
+
jobId: job.jobId,
|
|
275
|
+
})
|
|
276
|
+
: await this.resolveStagedDir(job.bundleRef, {
|
|
277
|
+
connectionId: job.connectionId,
|
|
278
|
+
sourceKey: job.sourceKey,
|
|
279
|
+
jobId: job.jobId,
|
|
280
|
+
});
|
|
281
|
+
const fetchReport = adapter.readFetchReport ? await adapter.readFetchReport(stagedDir) : null;
|
|
282
|
+
const scopeDescriptor = adapter.describeScope ? await adapter.describeScope(stagedDir) : null;
|
|
283
|
+
const sessionWorktree = await this.deps.lockingService.withLock('config:repo', () => this.deps.sessionWorktreeService.create(job.jobId, baseSha));
|
|
284
|
+
let cleanupOutcome = 'crash';
|
|
285
|
+
try {
|
|
286
|
+
const { currentHashes, rawDirInWorktree } = await this.stageRawFilesStage1({
|
|
287
|
+
stagedDir,
|
|
288
|
+
worktreeRoot: sessionWorktree.workdir,
|
|
289
|
+
connectionId: job.connectionId,
|
|
290
|
+
sourceKey: job.sourceKey,
|
|
291
|
+
syncId,
|
|
292
|
+
});
|
|
293
|
+
memoryFlow?.update({
|
|
294
|
+
connectionId: job.connectionId,
|
|
295
|
+
adapter: job.sourceKey,
|
|
296
|
+
sourceDir: stagedDir,
|
|
297
|
+
syncId,
|
|
298
|
+
});
|
|
299
|
+
memoryFlow?.emit({
|
|
300
|
+
type: 'source_acquired',
|
|
301
|
+
adapter: job.sourceKey,
|
|
302
|
+
trigger: job.trigger,
|
|
303
|
+
fileCount: currentHashes.size,
|
|
304
|
+
});
|
|
305
|
+
memoryFlow?.emit({ type: 'scope_detected', fingerprint: scopeDescriptor?.fingerprint ?? null });
|
|
306
|
+
memoryFlow?.emit({ type: 'raw_snapshot_written', syncId, rawFileCount: currentHashes.size });
|
|
307
|
+
await sessionWorktree.git.commitFiles([rawDirInWorktree], `ingest(${job.sourceKey}): stage raw files syncId=${syncId}`, this.deps.storage.systemGitAuthor.name, this.deps.storage.systemGitAuthor.email);
|
|
308
|
+
await stage1?.updateProgress(0.5, 'Checking what changed');
|
|
309
|
+
const diffSet = await this.deps.diffSetService.compute(job.connectionId, job.sourceKey, currentHashes, scopeDescriptor ? scopeDescriptor.isPathInScope.bind(scopeDescriptor) : undefined);
|
|
310
|
+
const diffSummary = {
|
|
311
|
+
added: diffSet.added.length,
|
|
312
|
+
modified: diffSet.modified.length,
|
|
313
|
+
deleted: diffSet.deleted.length,
|
|
314
|
+
unchanged: diffSet.unchanged.length,
|
|
315
|
+
};
|
|
316
|
+
memoryFlow?.emit({ type: 'diff_computed', ...diffSummary });
|
|
317
|
+
const runRow = await this.deps.runs.create({
|
|
318
|
+
jobId: job.jobId,
|
|
319
|
+
connectionId: job.connectionId,
|
|
320
|
+
sourceKey: job.sourceKey,
|
|
321
|
+
syncId,
|
|
322
|
+
trigger: job.trigger,
|
|
323
|
+
scopeFingerprint: scopeDescriptor?.fingerprint ?? null,
|
|
324
|
+
});
|
|
325
|
+
memoryFlow?.update({ runId: runRow.id });
|
|
326
|
+
const ingestToolMetadata = {
|
|
327
|
+
runId: runRow.id,
|
|
328
|
+
jobId: job.jobId,
|
|
329
|
+
syncId,
|
|
330
|
+
sourceKey: job.sourceKey,
|
|
331
|
+
};
|
|
332
|
+
await stage1?.updateProgress(1.0, `${diffSet.added.length} new, ${diffSet.modified.length} changed, ${diffSet.deleted.length} removed`);
|
|
333
|
+
const detected = await adapter.detect(stagedDir);
|
|
334
|
+
if (!detected) {
|
|
335
|
+
await this.deps.runs.markFailed(runRow.id);
|
|
336
|
+
throw new Error(`source adapter '${job.sourceKey}' did not recognize staged dir`);
|
|
337
|
+
}
|
|
338
|
+
let contextReport = null;
|
|
339
|
+
if (adapter.evidenceIndexing === 'documents' && this.deps.contextEvidenceIndex) {
|
|
340
|
+
contextReport = await this.deps.contextEvidenceIndex.indexStagedDir({
|
|
341
|
+
stagedDir,
|
|
342
|
+
runId: runRow.id,
|
|
343
|
+
connectionId: job.connectionId,
|
|
344
|
+
sourceKey: job.sourceKey,
|
|
345
|
+
syncId,
|
|
346
|
+
diffSet,
|
|
347
|
+
currentHashes,
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
const stage2 = ctx?.startPhase(0.04);
|
|
351
|
+
await stage2?.updateProgress(0.0, 'Planning updates');
|
|
352
|
+
let workUnits = [];
|
|
353
|
+
let eviction;
|
|
354
|
+
let unresolvedCards;
|
|
355
|
+
let sourceContextReport;
|
|
356
|
+
let parseArtifacts;
|
|
357
|
+
let postProcessorOutcome;
|
|
358
|
+
let reconcileNotes = [];
|
|
359
|
+
let triageResult = null;
|
|
360
|
+
if (overrideReport) {
|
|
361
|
+
eviction =
|
|
362
|
+
overrideReport.body.evictionInputs.length > 0
|
|
363
|
+
? { deletedRawPaths: overrideReport.body.evictionInputs }
|
|
364
|
+
: undefined;
|
|
365
|
+
unresolvedCards = overrideReport.body.unresolvedCards;
|
|
366
|
+
await stage2?.updateProgress(1.0, `Loaded prior report ${overrideReport.jobId} for override reconciliation`);
|
|
367
|
+
}
|
|
368
|
+
else {
|
|
369
|
+
const chunk = await adapter.chunk(stagedDir, diffSet);
|
|
370
|
+
workUnits = chunk.workUnits;
|
|
371
|
+
eviction = chunk.eviction;
|
|
372
|
+
unresolvedCards = chunk.unresolvedCards;
|
|
373
|
+
sourceContextReport = chunk.contextReport;
|
|
374
|
+
parseArtifacts = chunk.parseArtifacts;
|
|
375
|
+
reconcileNotes = chunk.reconcileNotes ?? [];
|
|
376
|
+
triageResult =
|
|
377
|
+
contextReport && adapter.triageSupported && this.deps.pageTriage
|
|
378
|
+
? await this.deps.pageTriage.triageRun({
|
|
379
|
+
stagedDir,
|
|
380
|
+
runId: runRow.id,
|
|
381
|
+
connectionId: job.connectionId,
|
|
382
|
+
sourceKey: job.sourceKey,
|
|
383
|
+
syncId,
|
|
384
|
+
jobId: job.jobId,
|
|
385
|
+
diffSet,
|
|
386
|
+
adapter,
|
|
387
|
+
})
|
|
388
|
+
: null;
|
|
389
|
+
workUnits = this.filterWorkUnitsForTriage(workUnits, triageResult);
|
|
390
|
+
if (adapter.clusterWorkUnits && workUnits.length > 0) {
|
|
391
|
+
workUnits = await adapter.clusterWorkUnits({
|
|
392
|
+
workUnits,
|
|
393
|
+
stagedDir,
|
|
394
|
+
embedding: this.deps.embedding,
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
await stage2?.updateProgress(1.0, `Planned ${workUnits.length} update${workUnits.length === 1 ? '' : 's'}`);
|
|
398
|
+
}
|
|
399
|
+
const targetConnectionIds = new Set([job.connectionId]);
|
|
400
|
+
if (!overrideReport && adapter.listTargetConnectionIds) {
|
|
401
|
+
for (const connectionId of await adapter.listTargetConnectionIds(stagedDir)) {
|
|
402
|
+
targetConnectionIds.add(connectionId);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
if (overrideReport) {
|
|
406
|
+
for (const wu of overrideReport.body.workUnits) {
|
|
407
|
+
for (const action of wu.actions) {
|
|
408
|
+
if (action.target === 'sl' && action.targetConnectionId) {
|
|
409
|
+
targetConnectionIds.add(action.targetConnectionId);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
for (const touched of wu.touchedSlSources) {
|
|
413
|
+
targetConnectionIds.add(touched.connectionId);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
const slConnectionIds = [...targetConnectionIds].sort();
|
|
418
|
+
// Build shared per-job context.
|
|
419
|
+
const [wikiIndex, slIndex] = await Promise.all([this.buildWikiIndex(), this.buildSlIndex(slConnectionIds)]);
|
|
420
|
+
const baseFraming = await this.deps.promptService.loadPrompt('memory_agent_bundle_ingest_work_unit');
|
|
421
|
+
const wuSkillNames = Array.from(new Set([...adapter.skillNames, 'ingest_triage', 'sl_capture', 'knowledge_capture']));
|
|
422
|
+
const wuSkills = await this.deps.skillsRegistry.listSkills(wuSkillNames, 'memory_agent');
|
|
423
|
+
const skillsPrompt = this.deps.skillsRegistry.buildSkillsPrompt(wuSkills, 'memory_agent');
|
|
424
|
+
const canonicalPins = await this.deps.canonicalPins.listPins(slConnectionIds);
|
|
425
|
+
const workUnitOutcomes = [];
|
|
426
|
+
const failedWorkUnits = [];
|
|
427
|
+
const stageIndex = overrideReport
|
|
428
|
+
? buildStageIndexFromReportBody(job.jobId, overrideReport.connectionId, overrideReport.body)
|
|
429
|
+
: {
|
|
430
|
+
jobId: job.jobId,
|
|
431
|
+
connectionId: job.connectionId,
|
|
432
|
+
workUnits: [],
|
|
433
|
+
conflictsResolved: [],
|
|
434
|
+
evictionsApplied: [],
|
|
435
|
+
unmappedFallbacks: [],
|
|
436
|
+
artifactResolutions: [],
|
|
437
|
+
};
|
|
438
|
+
const memoryFlowPlannedWorkUnits = overrideReport
|
|
439
|
+
? stageIndex.workUnits.map(stageIndexWorkUnitToMemoryFlowPlannedWorkUnit)
|
|
440
|
+
: workUnits.map(workUnitToMemoryFlowPlannedWorkUnit);
|
|
441
|
+
memoryFlow?.update({ plannedWorkUnits: memoryFlowPlannedWorkUnits });
|
|
442
|
+
memoryFlow?.emit({
|
|
443
|
+
type: 'chunks_planned',
|
|
444
|
+
chunkCount: memoryFlowPlannedWorkUnits.length,
|
|
445
|
+
workUnitCount: memoryFlowPlannedWorkUnits.length,
|
|
446
|
+
evictionCount: eviction?.deletedRawPaths.length ?? 0,
|
|
447
|
+
});
|
|
448
|
+
const stage3 = ctx?.startPhase(0.6);
|
|
449
|
+
await stage3?.updateProgress(0.0, `Processing ${workUnits.length} update${workUnits.length === 1 ? '' : 's'}`);
|
|
450
|
+
this.logger.log(`[ingest-bundle] job=${job.jobId} tool-call transcripts: ${transcriptDir}/`);
|
|
451
|
+
if (!overrideReport) {
|
|
452
|
+
const workUnitSettings = {
|
|
453
|
+
maxConcurrency: this.deps.settings.workUnitMaxConcurrency ?? 1,
|
|
454
|
+
stepBudget: this.deps.settings.workUnitStepBudget ?? 40,
|
|
455
|
+
failureMode: this.deps.settings.workUnitFailureMode ?? 'continue',
|
|
456
|
+
};
|
|
457
|
+
const limitWorkUnit = pLimit(workUnitSettings.maxConcurrency);
|
|
458
|
+
const workUnitOutcomesByIndex = [];
|
|
459
|
+
let completedWorkUnits = 0;
|
|
460
|
+
let abortRequested = false;
|
|
461
|
+
const runSingleWorkUnit = async (wu) => {
|
|
462
|
+
const session = {
|
|
463
|
+
userId: 'system',
|
|
464
|
+
chatId: wu.unitKey,
|
|
465
|
+
userMessage: `ingest(${job.sourceKey}) WU=${wu.unitKey}`,
|
|
466
|
+
connectionId: job.connectionId,
|
|
467
|
+
userScopedEnabled: false,
|
|
468
|
+
forceGlobalScope: true,
|
|
469
|
+
touchedSlSources: createTouchedSlSources(),
|
|
470
|
+
preHead: sessionWorktree.baseSha,
|
|
471
|
+
};
|
|
472
|
+
const sessionActions = [];
|
|
473
|
+
const scopedWikiService = this.deps.wikiService.forWorktree(sessionWorktree.workdir);
|
|
474
|
+
const scopedSemanticLayerService = this.deps.semanticLayerService.forWorktree(sessionWorktree.workdir);
|
|
475
|
+
const toolSession = {
|
|
476
|
+
connectionId: job.connectionId,
|
|
477
|
+
isWorktreeScoped: true,
|
|
478
|
+
preHead: sessionWorktree.baseSha,
|
|
479
|
+
touchedSlSources: session.touchedSlSources,
|
|
480
|
+
actions: sessionActions,
|
|
481
|
+
semanticLayerService: scopedSemanticLayerService,
|
|
482
|
+
wikiService: scopedWikiService,
|
|
483
|
+
configService: sessionWorktree.config,
|
|
484
|
+
gitService: sessionWorktree.git,
|
|
485
|
+
ingest: ingestToolMetadata,
|
|
486
|
+
};
|
|
487
|
+
const slValidationDeps = {
|
|
488
|
+
semanticLayerService: scopedSemanticLayerService,
|
|
489
|
+
connections: this.deps.connections,
|
|
490
|
+
configService: sessionWorktree.config,
|
|
491
|
+
gitService: sessionWorktree.git,
|
|
492
|
+
slSourcesRepository: this.deps.slSourcesRepository,
|
|
493
|
+
probeRowCount: this.deps.settings.probeRowCount,
|
|
494
|
+
};
|
|
495
|
+
const wuToolset = this.deps.toolsetFactory.createIngestWuToolset(toolSession, {
|
|
496
|
+
includeContextEvidenceTools: adapter.evidenceIndexing === 'documents' && !!contextReport,
|
|
497
|
+
});
|
|
498
|
+
const wuToolContext = {
|
|
499
|
+
sourceId: 'ingest',
|
|
500
|
+
messageId: `${job.jobId}-wu-${wu.unitKey}`,
|
|
501
|
+
userId: 'system',
|
|
502
|
+
connectionId: job.connectionId,
|
|
503
|
+
ingest: ingestToolMetadata,
|
|
504
|
+
session: toolSession,
|
|
505
|
+
};
|
|
506
|
+
const skillsLoadedPerWu = [];
|
|
507
|
+
const loadSkillTool = {
|
|
508
|
+
load_skill: tool({
|
|
509
|
+
description: 'Load a skill to get specialized instructions. Call this when a skill listed in the system prompt matches the current task.',
|
|
510
|
+
inputSchema: z.object({ name: z.string() }),
|
|
511
|
+
execute: async ({ name }) => {
|
|
512
|
+
const skill = await this.deps.skillsRegistry.getSkill(name, 'memory_agent');
|
|
513
|
+
if (!skill) {
|
|
514
|
+
const available = (await this.deps.skillsRegistry.listSkills('memory_agent')).map((s) => s.name).join(', ') ||
|
|
515
|
+
'(none)';
|
|
516
|
+
return `Skill "${name}" not available. Available: ${available}`;
|
|
517
|
+
}
|
|
518
|
+
const body = await readFile(join(skill.path, 'SKILL.md'), 'utf-8');
|
|
519
|
+
if (!skillsLoadedPerWu.includes(skill.name)) {
|
|
520
|
+
skillsLoadedPerWu.push(skill.name);
|
|
521
|
+
}
|
|
522
|
+
return {
|
|
523
|
+
name: skill.name,
|
|
524
|
+
skillDirectory: skill.path,
|
|
525
|
+
content: this.deps.skillsRegistry.stripFrontmatter(body),
|
|
526
|
+
};
|
|
527
|
+
},
|
|
528
|
+
}),
|
|
529
|
+
};
|
|
530
|
+
const priorProvenance = await this.deps.provenance.findLatestArtifactsForRawPaths(job.connectionId, job.sourceKey, wu.rawFiles);
|
|
531
|
+
const wuEmitUnmappedFallbackTool = {
|
|
532
|
+
emit_unmapped_fallback: createEmitUnmappedFallbackTool({
|
|
533
|
+
stageIndex,
|
|
534
|
+
allowedPaths: new Set(wu.rawFiles),
|
|
535
|
+
}),
|
|
536
|
+
};
|
|
537
|
+
const systemPrompt = buildWuSystemPrompt({
|
|
538
|
+
baseFraming,
|
|
539
|
+
skillsPrompt,
|
|
540
|
+
syncId,
|
|
541
|
+
sourceKey: job.sourceKey,
|
|
542
|
+
canonicalPins,
|
|
543
|
+
});
|
|
544
|
+
memoryFlow?.emit({
|
|
545
|
+
type: 'work_unit_started',
|
|
546
|
+
unitKey: wu.unitKey,
|
|
547
|
+
skills: wuSkillNames,
|
|
548
|
+
stepBudget: workUnitSettings.stepBudget,
|
|
549
|
+
});
|
|
550
|
+
return executeWorkUnit({
|
|
551
|
+
sessionWorktreeGit: sessionWorktree.git,
|
|
552
|
+
agentRunner: this.deps.agentRunner,
|
|
553
|
+
validateTouchedSources: (touched) => validateWuTouchedSources({ ...slValidationDeps, slValidator: this.deps.slValidator }, touched),
|
|
554
|
+
resetHardTo: (targetSha) => sessionWorktree.git.resetHardTo(targetSha),
|
|
555
|
+
buildSystemPrompt: () => systemPrompt,
|
|
556
|
+
buildUserPrompt: (wuInner) => buildWuUserPrompt({ wu: wuInner, wikiIndex, slIndex, priorProvenance }),
|
|
557
|
+
buildToolSet: (wuInner) => wrapToolsWithLogger(buildWuToolSet({
|
|
558
|
+
sourceKey: job.sourceKey,
|
|
559
|
+
stagedDir,
|
|
560
|
+
wu: wuInner,
|
|
561
|
+
loadSkillTool,
|
|
562
|
+
emitUnmappedFallbackTool: wuEmitUnmappedFallbackTool,
|
|
563
|
+
toolsetTools: wuToolset.toAiSdkTools(wuToolContext),
|
|
564
|
+
}), join(transcriptDir, `${wuInner.unitKey}.jsonl`), wuInner.unitKey, { onEntry: recordTranscriptEntry(join(transcriptDir, `${wuInner.unitKey}.jsonl`)) }),
|
|
565
|
+
captureSession: session,
|
|
566
|
+
sessionActions,
|
|
567
|
+
modelRole: 'candidateExtraction',
|
|
568
|
+
stepBudget: workUnitSettings.stepBudget,
|
|
569
|
+
sourceKey: job.sourceKey,
|
|
570
|
+
connectionId: job.connectionId,
|
|
571
|
+
jobId: job.jobId,
|
|
572
|
+
onStepFinish: ({ stepIndex, stepBudget }) => {
|
|
573
|
+
memoryFlow?.emit({ type: 'work_unit_step', unitKey: wu.unitKey, stepIndex, stepBudget });
|
|
574
|
+
},
|
|
575
|
+
}, wu);
|
|
576
|
+
};
|
|
577
|
+
if (workUnits.length === 0) {
|
|
578
|
+
await stage3?.updateProgress(1.0, '0 of 0 work units complete');
|
|
579
|
+
}
|
|
580
|
+
try {
|
|
581
|
+
await Promise.all(workUnits.map((wu, index) => limitWorkUnit(async () => {
|
|
582
|
+
if (abortRequested) {
|
|
583
|
+
return;
|
|
584
|
+
}
|
|
585
|
+
let outcome;
|
|
586
|
+
try {
|
|
587
|
+
outcome = await runSingleWorkUnit(wu);
|
|
588
|
+
}
|
|
589
|
+
catch (error) {
|
|
590
|
+
outcome = this.buildFailedWorkUnitOutcome(wu, error);
|
|
591
|
+
}
|
|
592
|
+
workUnitOutcomesByIndex[index] = outcome;
|
|
593
|
+
for (const action of outcome.actions) {
|
|
594
|
+
memoryFlow?.emit({
|
|
595
|
+
type: 'candidate_action',
|
|
596
|
+
unitKey: outcome.unitKey,
|
|
597
|
+
target: action.target,
|
|
598
|
+
action: action.type,
|
|
599
|
+
key: action.key,
|
|
600
|
+
});
|
|
601
|
+
}
|
|
602
|
+
memoryFlow?.emit({
|
|
603
|
+
type: 'work_unit_finished',
|
|
604
|
+
unitKey: outcome.unitKey,
|
|
605
|
+
status: outcome.status,
|
|
606
|
+
...(outcome.reason ? { reason: outcome.reason } : {}),
|
|
607
|
+
});
|
|
608
|
+
completedWorkUnits += 1;
|
|
609
|
+
await stage3?.updateProgress(completedWorkUnits / workUnits.length, `${completedWorkUnits} of ${workUnits.length} work units complete`);
|
|
610
|
+
if (outcome.status === 'failed') {
|
|
611
|
+
this.logger.warn(`[ingest-bundle] WU=${outcome.unitKey} failed: ${outcome.reason}`);
|
|
612
|
+
if (workUnitSettings.failureMode === 'abort') {
|
|
613
|
+
abortRequested = true;
|
|
614
|
+
throw new Error(this.formatWorkUnitFailure(outcome));
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
})));
|
|
618
|
+
}
|
|
619
|
+
catch (error) {
|
|
620
|
+
await this.deps.runs.markFailed(runRow.id);
|
|
621
|
+
throw error;
|
|
622
|
+
}
|
|
623
|
+
workUnitOutcomes.push(...workUnitOutcomesByIndex.filter((outcome) => Boolean(outcome)));
|
|
624
|
+
failedWorkUnits.push(...workUnitOutcomes.filter((outcome) => outcome.status === 'failed').map((outcome) => outcome.unitKey));
|
|
625
|
+
// Complete the typed Stage Index from the outcomes once, and use it for
|
|
626
|
+
// Stage 4, provenance writes (Phase G), and the report body (Phase F3).
|
|
627
|
+
stageIndex.workUnits = workUnitOutcomes.map((o) => ({
|
|
628
|
+
unitKey: o.unitKey,
|
|
629
|
+
rawFiles: workUnits.find((w) => w.unitKey === o.unitKey)?.rawFiles ?? [],
|
|
630
|
+
status: o.status,
|
|
631
|
+
reason: o.reason,
|
|
632
|
+
actions: o.actions,
|
|
633
|
+
touchedSlSources: o.touchedSlSources,
|
|
634
|
+
slDisallowed: o.slDisallowed,
|
|
635
|
+
slDisallowedReason: o.slDisallowedReason,
|
|
636
|
+
}));
|
|
637
|
+
}
|
|
638
|
+
const carryForwardResult = contextReport && this.deps.contextCandidateCarryforward
|
|
639
|
+
? await this.deps.contextCandidateCarryforward.carryForward({
|
|
640
|
+
runId: runRow.id,
|
|
641
|
+
connectionId: job.connectionId,
|
|
642
|
+
sourceKey: job.sourceKey,
|
|
643
|
+
})
|
|
644
|
+
: null;
|
|
645
|
+
const dedupResult = contextReport && this.deps.candidateDedup ? await this.deps.candidateDedup.deduplicateRun(runRow.id) : null;
|
|
646
|
+
// Stage 4 — reconciliation. Shares scoped wiki/SL with a fresh CaptureSession
|
|
647
|
+
// so reconciliation writes land in the same worktree Stage 3 used.
|
|
648
|
+
const reconcileSession = {
|
|
649
|
+
userId: 'system',
|
|
650
|
+
chatId: `${job.jobId}-reconcile`,
|
|
651
|
+
userMessage: `reconcile(${job.sourceKey})`,
|
|
652
|
+
connectionId: job.connectionId,
|
|
653
|
+
userScopedEnabled: false,
|
|
654
|
+
forceGlobalScope: true,
|
|
655
|
+
touchedSlSources: createTouchedSlSources(),
|
|
656
|
+
preHead: await sessionWorktree.git.revParseHead(),
|
|
657
|
+
};
|
|
658
|
+
const reconcileActions = [];
|
|
659
|
+
const rcScopedWiki = this.deps.wikiService.forWorktree(sessionWorktree.workdir);
|
|
660
|
+
const rcScopedSl = this.deps.semanticLayerService.forWorktree(sessionWorktree.workdir);
|
|
661
|
+
const rcToolSession = {
|
|
662
|
+
connectionId: job.connectionId,
|
|
663
|
+
isWorktreeScoped: true,
|
|
664
|
+
preHead: reconcileSession.preHead,
|
|
665
|
+
touchedSlSources: reconcileSession.touchedSlSources,
|
|
666
|
+
actions: reconcileActions,
|
|
667
|
+
semanticLayerService: rcScopedSl,
|
|
668
|
+
wikiService: rcScopedWiki,
|
|
669
|
+
configService: sessionWorktree.config,
|
|
670
|
+
gitService: sessionWorktree.git,
|
|
671
|
+
ingest: ingestToolMetadata,
|
|
672
|
+
evictionDecisions: [],
|
|
673
|
+
};
|
|
674
|
+
const rcToolset = this.deps.toolsetFactory.createIngestWuToolset(rcToolSession, {
|
|
675
|
+
includeContextEvidenceTools: adapter.evidenceIndexing === 'documents' && !!contextReport,
|
|
676
|
+
});
|
|
677
|
+
const rcToolContext = {
|
|
678
|
+
sourceId: 'ingest',
|
|
679
|
+
messageId: `${job.jobId}-reconcile`,
|
|
680
|
+
userId: 'system',
|
|
681
|
+
connectionId: job.connectionId,
|
|
682
|
+
ingest: ingestToolMetadata,
|
|
683
|
+
session: rcToolSession,
|
|
684
|
+
};
|
|
685
|
+
const rcLoadSkill = {
|
|
686
|
+
load_skill: tool({
|
|
687
|
+
description: 'Load a skill.',
|
|
688
|
+
inputSchema: z.object({ name: z.string() }),
|
|
689
|
+
execute: async ({ name }) => {
|
|
690
|
+
const skill = await this.deps.skillsRegistry.getSkill(name, 'memory_agent');
|
|
691
|
+
if (!skill) {
|
|
692
|
+
return `Skill "${name}" not found`;
|
|
693
|
+
}
|
|
694
|
+
const body = await readFile(join(skill.path, 'SKILL.md'), 'utf-8');
|
|
695
|
+
return { name: skill.name, content: this.deps.skillsRegistry.stripFrontmatter(body) };
|
|
696
|
+
},
|
|
697
|
+
}),
|
|
698
|
+
};
|
|
699
|
+
const allStagedPaths = new Set([...currentHashes.keys()]);
|
|
700
|
+
const rcRawSpanTool = { read_raw_span: createReadRawSpanTool({ stagedDir, allowedPaths: allStagedPaths }) };
|
|
701
|
+
const rcStageListTool = { stage_list: createStageListTool({ stageIndex }) };
|
|
702
|
+
const rcStageDiffTool = { stage_diff: createStageDiffTool({ stageIndex }) };
|
|
703
|
+
const rcEvictionListTool = {
|
|
704
|
+
eviction_list: createEvictionListTool({
|
|
705
|
+
provenance: this.deps.provenance,
|
|
706
|
+
connectionId: job.connectionId,
|
|
707
|
+
sourceKey: job.sourceKey,
|
|
708
|
+
deletedRawPaths: eviction?.deletedRawPaths ?? [],
|
|
709
|
+
}),
|
|
710
|
+
};
|
|
711
|
+
const rcEmitConflictResolutionTool = {
|
|
712
|
+
emit_conflict_resolution: createEmitConflictResolutionTool({ stageIndex }),
|
|
713
|
+
};
|
|
714
|
+
const rcEmitEvictionDecisionTool = {
|
|
715
|
+
emit_eviction_decision: createEmitEvictionDecisionTool({
|
|
716
|
+
stageIndex,
|
|
717
|
+
deletedRawPaths: eviction?.deletedRawPaths ?? [],
|
|
718
|
+
}),
|
|
719
|
+
};
|
|
720
|
+
const rcEmitArtifactResolutionTool = {
|
|
721
|
+
emit_artifact_resolution: createEmitArtifactResolutionTool({
|
|
722
|
+
stageIndex,
|
|
723
|
+
allowedPaths: allStagedPaths,
|
|
724
|
+
}),
|
|
725
|
+
};
|
|
726
|
+
const rcEmitUnmappedFallbackTool = {
|
|
727
|
+
emit_unmapped_fallback: createEmitUnmappedFallbackTool({
|
|
728
|
+
stageIndex,
|
|
729
|
+
allowedPaths: allStagedPaths,
|
|
730
|
+
}),
|
|
731
|
+
};
|
|
732
|
+
const reconcileBaseFraming = await this.deps.promptService.loadPrompt('memory_agent_bundle_ingest_reconcile');
|
|
733
|
+
const reconcileSkills = await this.deps.skillsRegistry.listSkills(Array.from(new Set(['ingest_triage', 'sl_capture', 'knowledge_capture', ...(adapter.reconcileSkillNames ?? [])])), 'memory_agent');
|
|
734
|
+
const reconcileSkillsPrompt = this.deps.skillsRegistry.buildSkillsPrompt(reconcileSkills, 'memory_agent');
|
|
735
|
+
const relevantCanonicalPins = selectRelevantCanonicalPins(stageIndex, canonicalPins);
|
|
736
|
+
const stage4 = ctx?.startPhase(0.16);
|
|
737
|
+
const hasCandidateReconcileWork = (dedupResult?.representatives.length ?? 0) > 0;
|
|
738
|
+
const hasReconcileWork = stageIndex.workUnits.some((wu) => wu.actions.length > 0) ||
|
|
739
|
+
(eviction?.deletedRawPaths.length ?? 0) > 0 ||
|
|
740
|
+
hasCandidateReconcileWork;
|
|
741
|
+
if (hasReconcileWork || overrideReport) {
|
|
742
|
+
await stage4?.updateProgress(0.0, 'Reconciling results');
|
|
743
|
+
}
|
|
744
|
+
let curatorReport = null;
|
|
745
|
+
let curatorWarnings = [];
|
|
746
|
+
let reconcileOutcome;
|
|
747
|
+
if (contextReport && this.deps.curatorPagination) {
|
|
748
|
+
const curatorOutcome = await this.deps.curatorPagination.reconcile({
|
|
749
|
+
runId: runRow.id,
|
|
750
|
+
sourceKey: job.sourceKey,
|
|
751
|
+
jobId: job.jobId,
|
|
752
|
+
stageIndex,
|
|
753
|
+
evictionUnit: eviction,
|
|
754
|
+
representatives: dedupResult?.representatives ?? [],
|
|
755
|
+
initialBudget: this.resolveContextCuratorBudget(job.bundleRef, stageIndex),
|
|
756
|
+
modelRole: 'curator',
|
|
757
|
+
buildSystemPrompt: () => buildReconcileSystemPrompt({
|
|
758
|
+
baseFraming: reconcileBaseFraming,
|
|
759
|
+
skillsPrompt: reconcileSkillsPrompt,
|
|
760
|
+
syncId,
|
|
761
|
+
sourceKey: job.sourceKey,
|
|
762
|
+
canonicalPins: relevantCanonicalPins,
|
|
763
|
+
}),
|
|
764
|
+
buildUserPrompt: ({ summary, items, runState }) => buildReconcileUserPrompt(stageIndex, eviction, { summary, items }, reconcileNotes, runState),
|
|
765
|
+
buildToolSet: (_passNumber) => wrapToolsWithLogger(buildReconcileToolSet({
|
|
766
|
+
loadSkillTool: rcLoadSkill,
|
|
767
|
+
stageListTool: rcStageListTool,
|
|
768
|
+
stageDiffTool: rcStageDiffTool,
|
|
769
|
+
evictionListTool: rcEvictionListTool,
|
|
770
|
+
emitConflictResolutionTool: rcEmitConflictResolutionTool,
|
|
771
|
+
emitEvictionDecisionTool: rcEmitEvictionDecisionTool,
|
|
772
|
+
emitArtifactResolutionTool: rcEmitArtifactResolutionTool,
|
|
773
|
+
emitUnmappedFallbackTool: rcEmitUnmappedFallbackTool,
|
|
774
|
+
readRawSpanTool: rcRawSpanTool,
|
|
775
|
+
toolsetTools: rcToolset.toAiSdkTools(rcToolContext),
|
|
776
|
+
}), join(transcriptDir, 'reconcile.jsonl'), 'reconcile', { onEntry: recordTranscriptEntry(join(transcriptDir, 'reconcile.jsonl')) }),
|
|
777
|
+
getReconciliationActions: () => reconcileActions,
|
|
778
|
+
onStepFinish: stage4
|
|
779
|
+
? ({ passNumber, stepIndex, stepBudget }) => {
|
|
780
|
+
void stage4.updateProgress(stepIndex / stepBudget, `Reconciling results · pass ${passNumber} step ${stepIndex}`);
|
|
781
|
+
}
|
|
782
|
+
: undefined,
|
|
783
|
+
});
|
|
784
|
+
curatorReport = curatorOutcome.report;
|
|
785
|
+
curatorWarnings = curatorOutcome.warnings;
|
|
786
|
+
reconcileOutcome = {
|
|
787
|
+
skipped: curatorOutcome.skipped,
|
|
788
|
+
stopReason: curatorOutcome.stopReason,
|
|
789
|
+
error: curatorOutcome.error,
|
|
790
|
+
};
|
|
791
|
+
}
|
|
792
|
+
else {
|
|
793
|
+
reconcileOutcome = await runReconciliationStage4({
|
|
794
|
+
stageIndex,
|
|
795
|
+
evictionUnit: eviction,
|
|
796
|
+
agentRunner: this.deps.agentRunner,
|
|
797
|
+
buildSystemPrompt: () => buildReconcileSystemPrompt({
|
|
798
|
+
baseFraming: reconcileBaseFraming,
|
|
799
|
+
skillsPrompt: reconcileSkillsPrompt,
|
|
800
|
+
syncId,
|
|
801
|
+
sourceKey: job.sourceKey,
|
|
802
|
+
canonicalPins: relevantCanonicalPins,
|
|
803
|
+
}),
|
|
804
|
+
buildUserPrompt: (idx, ev) => buildReconcileUserPrompt(idx, ev, undefined, reconcileNotes),
|
|
805
|
+
buildToolSet: () => wrapToolsWithLogger(buildReconcileToolSet({
|
|
806
|
+
loadSkillTool: rcLoadSkill,
|
|
807
|
+
stageListTool: rcStageListTool,
|
|
808
|
+
stageDiffTool: rcStageDiffTool,
|
|
809
|
+
evictionListTool: rcEvictionListTool,
|
|
810
|
+
emitConflictResolutionTool: rcEmitConflictResolutionTool,
|
|
811
|
+
emitEvictionDecisionTool: rcEmitEvictionDecisionTool,
|
|
812
|
+
emitArtifactResolutionTool: rcEmitArtifactResolutionTool,
|
|
813
|
+
emitUnmappedFallbackTool: rcEmitUnmappedFallbackTool,
|
|
814
|
+
readRawSpanTool: rcRawSpanTool,
|
|
815
|
+
toolsetTools: rcToolset.toAiSdkTools(rcToolContext),
|
|
816
|
+
}), join(transcriptDir, 'reconcile.jsonl'), 'reconcile', { onEntry: recordTranscriptEntry(join(transcriptDir, 'reconcile.jsonl')) }),
|
|
817
|
+
modelRole: 'reconcile',
|
|
818
|
+
stepBudget: 60,
|
|
819
|
+
sourceKey: job.sourceKey,
|
|
820
|
+
jobId: job.jobId,
|
|
821
|
+
force: !!overrideReport,
|
|
822
|
+
onStepFinish: stage4
|
|
823
|
+
? ({ stepIndex, stepBudget }) => {
|
|
824
|
+
void stage4.updateProgress(stepIndex / stepBudget, `Reconciling results · step ${stepIndex}`);
|
|
825
|
+
}
|
|
826
|
+
: undefined,
|
|
827
|
+
});
|
|
828
|
+
}
|
|
829
|
+
const candidateSummaryAfterReconcile = contextReport && this.deps.contextEvidenceCandidates
|
|
830
|
+
? await this.deps.contextEvidenceCandidates.getCandidateSummary(runRow.id)
|
|
831
|
+
: null;
|
|
832
|
+
memoryFlow?.emit({
|
|
833
|
+
type: 'reconciliation_finished',
|
|
834
|
+
conflictCount: stageIndex.conflictsResolved.length,
|
|
835
|
+
fallbackCount: stageIndex.unmappedFallbacks.length,
|
|
836
|
+
});
|
|
837
|
+
await stage4?.updateProgress(1.0, reconcileOutcome.skipped ? 'No reconciliation needed' : 'Reconciled');
|
|
838
|
+
const postProcessor = this.deps.postProcessors?.[job.sourceKey];
|
|
839
|
+
if (postProcessor) {
|
|
840
|
+
const stagePostProcessor = ctx?.startPhase(0.04);
|
|
841
|
+
await stagePostProcessor?.updateProgress(0.0, 'Running deterministic imports');
|
|
842
|
+
try {
|
|
843
|
+
const result = await postProcessor.run({
|
|
844
|
+
connectionId: job.connectionId,
|
|
845
|
+
sourceKey: job.sourceKey,
|
|
846
|
+
syncId,
|
|
847
|
+
jobId: job.jobId,
|
|
848
|
+
runId: runRow.id,
|
|
849
|
+
workdir: sessionWorktree.workdir,
|
|
850
|
+
parseArtifacts,
|
|
851
|
+
});
|
|
852
|
+
postProcessorOutcome = {
|
|
853
|
+
sourceKey: job.sourceKey,
|
|
854
|
+
status: result.errors.length > 0 && result.touchedSources.length === 0 ? 'failed' : 'success',
|
|
855
|
+
result: result.result,
|
|
856
|
+
errors: result.errors,
|
|
857
|
+
warnings: result.warnings,
|
|
858
|
+
touchedSources: result.touchedSources,
|
|
859
|
+
};
|
|
860
|
+
await stagePostProcessor?.updateProgress(1.0, 'Deterministic imports complete');
|
|
861
|
+
}
|
|
862
|
+
catch (error) {
|
|
863
|
+
postProcessorOutcome = {
|
|
864
|
+
sourceKey: job.sourceKey,
|
|
865
|
+
status: 'failed',
|
|
866
|
+
errors: [error instanceof Error ? error.message : String(error)],
|
|
867
|
+
warnings: [],
|
|
868
|
+
touchedSources: [],
|
|
869
|
+
};
|
|
870
|
+
await this.deps.runs.markFailed(runRow.id);
|
|
871
|
+
throw error;
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
// Stage 6 — squash commit
|
|
875
|
+
const stage6 = ctx?.startPhase(0.04);
|
|
876
|
+
await stage6?.updateProgress(0.0, 'Saving changes');
|
|
877
|
+
try {
|
|
878
|
+
await sessionWorktree.git.assertWorktreeClean();
|
|
879
|
+
}
|
|
880
|
+
catch (error) {
|
|
881
|
+
await this.deps.runs.markFailed(runRow.id);
|
|
882
|
+
throw error;
|
|
883
|
+
}
|
|
884
|
+
const commitMessage = this.buildCommitMessage(job, syncId, diffSummary, failedWorkUnits);
|
|
885
|
+
const squashResult = await this.deps.lockingService.withLock('config:repo', async () => {
|
|
886
|
+
const preSquashSha = await this.deps.gitService.revParseHead();
|
|
887
|
+
const merge = await this.deps.gitService.squashMergeIntoMain(sessionWorktree.branch, this.deps.storage.systemGitAuthor.name, this.deps.storage.systemGitAuthor.email, commitMessage);
|
|
888
|
+
return { preSquashSha, merge };
|
|
889
|
+
});
|
|
890
|
+
const mergeResult = squashResult.merge;
|
|
891
|
+
if (!mergeResult.ok) {
|
|
892
|
+
await this.deps.runs.markFailed(runRow.id);
|
|
893
|
+
throw new Error(`squash merge conflict: ${mergeResult.conflictPaths.join(', ')}`);
|
|
894
|
+
}
|
|
895
|
+
const commitSha = mergeResult.touchedPaths.length === 0 ? null : mergeResult.squashSha;
|
|
896
|
+
const memoryFlowSavedActions = stageIndex.workUnits.flatMap((wu) => wu.actions).concat(reconcileActions);
|
|
897
|
+
memoryFlow?.emit({
|
|
898
|
+
type: 'saved',
|
|
899
|
+
commitSha,
|
|
900
|
+
wikiCount: countMemoryFlowActions(memoryFlowSavedActions, 'wiki'),
|
|
901
|
+
slCount: countMemoryFlowActions(memoryFlowSavedActions, 'sl'),
|
|
902
|
+
});
|
|
903
|
+
await stage6?.updateProgress(1.0, commitSha ? `Saved changes (${commitSha.slice(0, 8)})` : 'No changes to save');
|
|
904
|
+
// Sync the shared `knowledge` index from the squashed diff in a single
|
|
905
|
+
// transaction. If this throws, the run fails and no partial index state
|
|
906
|
+
// survives (thanks to the transactional upsert in applyDiffTransactional).
|
|
907
|
+
if (commitSha) {
|
|
908
|
+
// Multi-file squash → omit path so the handler diffs the whole commit
|
|
909
|
+
// (a comma-joined pathspec would match nothing and the job would no-op).
|
|
910
|
+
const pathFilter = mergeResult.touchedPaths.length === 1 ? mergeResult.touchedPaths[0] : '';
|
|
911
|
+
await this.deps.commitMessages.enqueueForExternalCommit({ commitHash: commitSha }, commitMessage, pathFilter);
|
|
912
|
+
await this.deps.wikiService.syncFromCommit(squashResult.preSquashSha, commitSha, runRow.id);
|
|
913
|
+
await this.syncKnowledgeSlRefsFromActions(job.connectionId, memoryFlowSavedActions);
|
|
914
|
+
const touchedConnections = [
|
|
915
|
+
...new Set(memoryFlowSavedActions
|
|
916
|
+
.filter((action) => action.target === 'sl')
|
|
917
|
+
.map((action) => actionTargetConnectionId(action, job.connectionId))
|
|
918
|
+
.concat((postProcessorOutcome?.touchedSources ?? []).map((source) => source.connectionId))),
|
|
919
|
+
].sort();
|
|
920
|
+
for (const connectionId of touchedConnections) {
|
|
921
|
+
try {
|
|
922
|
+
const allSources = await this.deps.semanticLayerService.loadAllSources(connectionId);
|
|
923
|
+
await this.deps.slSearchService.indexSources(connectionId, allSources);
|
|
924
|
+
}
|
|
925
|
+
catch (err) {
|
|
926
|
+
this.logger.warn(`[ingest-bundle] post-squash SL reindex failed for connection=${connectionId}: ${err instanceof Error ? err.message : String(err)}`);
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
const stage5 = ctx?.startPhase(0.04);
|
|
931
|
+
await stage5?.updateProgress(0.0, 'Recording history');
|
|
932
|
+
// Provenance rows: per-artifact when the WU emitted actions, plus a `skipped`
|
|
933
|
+
// fallback for raw files that produced nothing so the next DiffSet still sees
|
|
934
|
+
// them.
|
|
935
|
+
const provenanceRows = [];
|
|
936
|
+
const actionToType = (a) => {
|
|
937
|
+
if (a.target === 'wiki') {
|
|
938
|
+
return 'wiki_written';
|
|
939
|
+
}
|
|
940
|
+
// SL action: 'created' → source_created; 'updated' → measure_added (coarse-grained;
|
|
941
|
+
// action.detail preserves the finer distinction for the report body).
|
|
942
|
+
return a.type === 'created' ? 'source_created' : 'measure_added';
|
|
943
|
+
};
|
|
944
|
+
const producedPaths = new Set();
|
|
945
|
+
for (const wu of stageIndex.workUnits) {
|
|
946
|
+
for (const rawPath of wu.rawFiles) {
|
|
947
|
+
const hash = currentHashes.get(rawPath) ?? 'unknown';
|
|
948
|
+
for (const action of wu.actions) {
|
|
949
|
+
provenanceRows.push({
|
|
950
|
+
connectionId: job.connectionId,
|
|
951
|
+
sourceKey: job.sourceKey,
|
|
952
|
+
syncId,
|
|
953
|
+
rawPath,
|
|
954
|
+
rawContentHash: hash,
|
|
955
|
+
artifactKind: action.target,
|
|
956
|
+
artifactKey: action.key,
|
|
957
|
+
targetConnectionId: action.target === 'sl' ? (action.targetConnectionId ?? null) : null,
|
|
958
|
+
artifactContentHash: null,
|
|
959
|
+
actionType: actionToType(action),
|
|
960
|
+
});
|
|
961
|
+
producedPaths.add(rawPath);
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
for (const resolution of stageIndex.artifactResolutions ?? []) {
|
|
966
|
+
const hash = currentHashes.get(resolution.rawPath) ?? 'unknown';
|
|
967
|
+
provenanceRows.push({
|
|
968
|
+
connectionId: job.connectionId,
|
|
969
|
+
sourceKey: job.sourceKey,
|
|
970
|
+
syncId,
|
|
971
|
+
rawPath: resolution.rawPath,
|
|
972
|
+
rawContentHash: hash,
|
|
973
|
+
artifactKind: resolution.artifactKind,
|
|
974
|
+
artifactKey: resolution.artifactKey,
|
|
975
|
+
targetConnectionId: null,
|
|
976
|
+
artifactContentHash: null,
|
|
977
|
+
actionType: resolution.actionType,
|
|
978
|
+
});
|
|
979
|
+
producedPaths.add(resolution.rawPath);
|
|
980
|
+
}
|
|
981
|
+
for (const [rawPath, hash] of currentHashes) {
|
|
982
|
+
if (producedPaths.has(rawPath)) {
|
|
983
|
+
continue;
|
|
984
|
+
}
|
|
985
|
+
provenanceRows.push({
|
|
986
|
+
connectionId: job.connectionId,
|
|
987
|
+
sourceKey: job.sourceKey,
|
|
988
|
+
syncId,
|
|
989
|
+
rawPath,
|
|
990
|
+
rawContentHash: hash,
|
|
991
|
+
artifactKind: null,
|
|
992
|
+
artifactKey: null,
|
|
993
|
+
targetConnectionId: null,
|
|
994
|
+
artifactContentHash: null,
|
|
995
|
+
actionType: 'skipped',
|
|
996
|
+
});
|
|
997
|
+
}
|
|
998
|
+
await this.deps.provenance.insertMany(provenanceRows);
|
|
999
|
+
memoryFlow?.emit({ type: 'provenance_recorded', rowCount: provenanceRows.length });
|
|
1000
|
+
await stage5?.updateProgress(1.0, `Recorded ${provenanceRows.length} history entr${provenanceRows.length === 1 ? 'y' : 'ies'}`);
|
|
1001
|
+
const stage7 = ctx?.startPhase(0.04);
|
|
1002
|
+
await stage7?.updateProgress(0.0, 'Wrapping up');
|
|
1003
|
+
const reportProvenanceRows = provenanceRows.map(({ rawPath, artifactKind, artifactKey, actionType, targetConnectionId }) => ({
|
|
1004
|
+
rawPath,
|
|
1005
|
+
artifactKind,
|
|
1006
|
+
artifactKey,
|
|
1007
|
+
targetConnectionId: targetConnectionId ?? null,
|
|
1008
|
+
actionType,
|
|
1009
|
+
}));
|
|
1010
|
+
const reportToolTranscripts = Array.from(transcriptSummaries.values()).map((summary) => ({
|
|
1011
|
+
unitKey: summary.unitKey,
|
|
1012
|
+
path: summary.path,
|
|
1013
|
+
toolCallCount: summary.toolCallCount,
|
|
1014
|
+
errorCount: summary.errorCount,
|
|
1015
|
+
toolNames: Array.from(summary.toolNames).sort(),
|
|
1016
|
+
}));
|
|
1017
|
+
const capturedMemoryFlow = memoryFlow?.snapshot();
|
|
1018
|
+
const reportMemoryFlow = capturedMemoryFlow
|
|
1019
|
+
? {
|
|
1020
|
+
...capturedMemoryFlow,
|
|
1021
|
+
metadata: {
|
|
1022
|
+
schemaVersion: 1,
|
|
1023
|
+
mode: 'full',
|
|
1024
|
+
origin: 'captured',
|
|
1025
|
+
timing: 'captured',
|
|
1026
|
+
capturedAt: new Date().toISOString(),
|
|
1027
|
+
sourceReportId: null,
|
|
1028
|
+
sourceReportPath: null,
|
|
1029
|
+
fallbackReason: null,
|
|
1030
|
+
},
|
|
1031
|
+
}
|
|
1032
|
+
: undefined;
|
|
1033
|
+
const reportBody = {
|
|
1034
|
+
syncId,
|
|
1035
|
+
diffSummary,
|
|
1036
|
+
fetch: fetchReport ?? undefined,
|
|
1037
|
+
commitSha,
|
|
1038
|
+
workUnits: stageIndex.workUnits.map((wu) => ({
|
|
1039
|
+
unitKey: wu.unitKey,
|
|
1040
|
+
rawFiles: wu.rawFiles,
|
|
1041
|
+
status: wu.status,
|
|
1042
|
+
reason: wu.reason,
|
|
1043
|
+
actions: wu.actions,
|
|
1044
|
+
touchedSlSources: wu.touchedSlSources,
|
|
1045
|
+
slDisallowed: wu.slDisallowed,
|
|
1046
|
+
slDisallowedReason: wu.slDisallowedReason,
|
|
1047
|
+
})),
|
|
1048
|
+
failedWorkUnits,
|
|
1049
|
+
reconciliationSkipped: reconcileOutcome.skipped,
|
|
1050
|
+
conflictsResolved: stageIndex.conflictsResolved,
|
|
1051
|
+
evictionsApplied: stageIndex.evictionsApplied,
|
|
1052
|
+
unmappedFallbacks: stageIndex.unmappedFallbacks,
|
|
1053
|
+
artifactResolutions: stageIndex.artifactResolutions ?? [],
|
|
1054
|
+
evictionInputs: eviction?.deletedRawPaths ?? [],
|
|
1055
|
+
reconciliationActions: reconcileActions,
|
|
1056
|
+
evictionDecisions: rcToolSession.evictionDecisions ?? [],
|
|
1057
|
+
unresolvedCards: unresolvedCards ?? [],
|
|
1058
|
+
supersededBy: null,
|
|
1059
|
+
overrideOf: overrideReport?.jobId ?? null,
|
|
1060
|
+
provenanceRows: reportProvenanceRows,
|
|
1061
|
+
toolTranscripts: reportToolTranscripts,
|
|
1062
|
+
postProcessor: postProcessorOutcome,
|
|
1063
|
+
...(reportMemoryFlow ? { memoryFlow: reportMemoryFlow } : {}),
|
|
1064
|
+
context: contextReport
|
|
1065
|
+
? {
|
|
1066
|
+
documentsIndexed: contextReport.documentsIndexed,
|
|
1067
|
+
chunksIndexed: contextReport.chunksIndexed,
|
|
1068
|
+
documentsDeleted: contextReport.documentsDeleted,
|
|
1069
|
+
embeddingFailures: contextReport.embeddingFailures,
|
|
1070
|
+
candidatesCreated: candidateSummaryAfterReconcile?.total ?? 0,
|
|
1071
|
+
candidatesPromoted: candidateSummaryAfterReconcile?.promoted ?? 0,
|
|
1072
|
+
candidatesRejected: candidateSummaryAfterReconcile?.rejected ?? 0,
|
|
1073
|
+
triage: triageResult?.report,
|
|
1074
|
+
dedup: dedupResult?.enabled
|
|
1075
|
+
? {
|
|
1076
|
+
candidatesIn: dedupResult.candidatesIn,
|
|
1077
|
+
clustersOut: dedupResult.clustersOut,
|
|
1078
|
+
mergedCount: dedupResult.mergedCount,
|
|
1079
|
+
largestClusterSize: dedupResult.largestClusterSize,
|
|
1080
|
+
embeddingFailures: dedupResult.embeddingFailures,
|
|
1081
|
+
}
|
|
1082
|
+
: undefined,
|
|
1083
|
+
curator: curatorReport ?? undefined,
|
|
1084
|
+
knowledgeCreates: stageIndex.workUnits
|
|
1085
|
+
.flatMap((wu) => wu.actions)
|
|
1086
|
+
.concat(reconcileActions)
|
|
1087
|
+
.filter((action) => action.target === 'wiki' && action.type === 'created').length,
|
|
1088
|
+
knowledgeUpdates: stageIndex.workUnits
|
|
1089
|
+
.flatMap((wu) => wu.actions)
|
|
1090
|
+
.concat(reconcileActions)
|
|
1091
|
+
.filter((action) => action.target === 'wiki' && action.type === 'updated').length,
|
|
1092
|
+
capped: sourceContextReport?.capped ?? false,
|
|
1093
|
+
warnings: [
|
|
1094
|
+
...new Set([
|
|
1095
|
+
...contextReport.warnings,
|
|
1096
|
+
...(sourceContextReport?.warnings ?? []),
|
|
1097
|
+
...(triageResult?.warnings ?? []),
|
|
1098
|
+
...(carryForwardResult?.warnings ?? []),
|
|
1099
|
+
...(dedupResult?.warnings ?? []),
|
|
1100
|
+
...curatorWarnings,
|
|
1101
|
+
]),
|
|
1102
|
+
],
|
|
1103
|
+
}
|
|
1104
|
+
: undefined,
|
|
1105
|
+
};
|
|
1106
|
+
const createdReport = await this.deps.reports.create({
|
|
1107
|
+
runId: runRow.id,
|
|
1108
|
+
jobId: job.jobId,
|
|
1109
|
+
connectionId: job.connectionId,
|
|
1110
|
+
sourceKey: job.sourceKey,
|
|
1111
|
+
body: reportBody,
|
|
1112
|
+
});
|
|
1113
|
+
const reportId = reportIdFromCreateResult(createdReport);
|
|
1114
|
+
memoryFlow?.update({
|
|
1115
|
+
...(reportId ? { reportId, reportPath: reportId } : {}),
|
|
1116
|
+
});
|
|
1117
|
+
memoryFlow?.emit({
|
|
1118
|
+
type: 'report_created',
|
|
1119
|
+
runId: runRow.id,
|
|
1120
|
+
...(reportId ? { reportPath: reportId } : {}),
|
|
1121
|
+
});
|
|
1122
|
+
if (overrideReport) {
|
|
1123
|
+
await this.deps.reports.markSuperseded(overrideReport.jobId, job.jobId);
|
|
1124
|
+
}
|
|
1125
|
+
if (contextReport && this.deps.contextEvidenceIndex) {
|
|
1126
|
+
await this.deps.contextEvidenceIndex.publishSync({
|
|
1127
|
+
connectionId: job.connectionId,
|
|
1128
|
+
sourceKey: job.sourceKey,
|
|
1129
|
+
syncId,
|
|
1130
|
+
diffSet,
|
|
1131
|
+
});
|
|
1132
|
+
}
|
|
1133
|
+
// Stage 7 — status
|
|
1134
|
+
await this.deps.runs.markCompleted(runRow.id, diffSummary, fetchReport?.status === 'partial' ? 'partial' : 'completed');
|
|
1135
|
+
if (job.bundleRef.kind === 'scheduled_pull') {
|
|
1136
|
+
await adapter.onPullSucceeded?.({
|
|
1137
|
+
connectionId: job.connectionId,
|
|
1138
|
+
sourceKey: job.sourceKey,
|
|
1139
|
+
syncId,
|
|
1140
|
+
trigger: job.trigger,
|
|
1141
|
+
completedAt: new Date(),
|
|
1142
|
+
stagedDir,
|
|
1143
|
+
});
|
|
1144
|
+
}
|
|
1145
|
+
await stage7?.updateProgress(1.0, 'Done');
|
|
1146
|
+
cleanupOutcome = 'success';
|
|
1147
|
+
return {
|
|
1148
|
+
runId: runRow.id,
|
|
1149
|
+
syncId,
|
|
1150
|
+
diffSummary,
|
|
1151
|
+
workUnitCount: workUnits.length,
|
|
1152
|
+
failedWorkUnits,
|
|
1153
|
+
artifactsWritten: provenanceRows.filter((r) => r.actionType !== 'skipped').length,
|
|
1154
|
+
commitSha,
|
|
1155
|
+
};
|
|
1156
|
+
}
|
|
1157
|
+
finally {
|
|
1158
|
+
await this.deps.sessionWorktreeService.cleanup(sessionWorktree, cleanupOutcome);
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
}
|