@kaelio/ktx 0.0.0 → 0.1.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1752) hide show
  1. package/LICENSE +201 -0
  2. package/assets/demo/orbit/demo.db +0 -0
  3. package/assets/demo/orbit/links/provenance.json +209 -0
  4. package/assets/demo/orbit/manifest.json +58 -0
  5. package/assets/demo/orbit/raw-sources/bi/account_retention.view.lkml +67 -0
  6. package/assets/demo/orbit/raw-sources/bi/arr_daily.view.lkml +28 -0
  7. package/assets/demo/orbit/raw-sources/bi/customer_health.view.lkml +50 -0
  8. package/assets/demo/orbit/raw-sources/bi/procurement_activity.view.lkml +46 -0
  9. package/assets/demo/orbit/raw-sources/bi/retention_exec_q1.dashboard.lookml +28 -0
  10. package/assets/demo/orbit/raw-sources/bi/revenue_daily.view.lkml +52 -0
  11. package/assets/demo/orbit/raw-sources/bi/revenue_exec.dashboard.lookml +28 -0
  12. package/assets/demo/orbit/raw-sources/dbt/dbt_project.yml +10 -0
  13. package/assets/demo/orbit/raw-sources/dbt/models/marts/mart_arr_daily.sql +5 -0
  14. package/assets/demo/orbit/raw-sources/dbt/models/marts/mart_customer_health.sql +10 -0
  15. package/assets/demo/orbit/raw-sources/dbt/models/marts/mart_revenue_daily.sql +8 -0
  16. package/assets/demo/orbit/raw-sources/dbt/schema.yml +455 -0
  17. package/assets/demo/orbit/raw-sources/dbt/sources.yml +48 -0
  18. package/assets/demo/orbit/raw-sources/notion/activation-policy-decision-record.md +49 -0
  19. package/assets/demo/orbit/raw-sources/notion/analyst-onboarding.md +35 -0
  20. package/assets/demo/orbit/raw-sources/notion/arr-and-contract-reporting-notes.md +64 -0
  21. package/assets/demo/orbit/raw-sources/notion/customer-health-playbook.md +55 -0
  22. package/assets/demo/orbit/raw-sources/notion/retention-and-nrr-definition-notes.md +58 -0
  23. package/assets/demo/orbit/raw-sources/notion/revenue-reporting-policy.md +64 -0
  24. package/assets/demo/orbit/raw-sources/notion/sales-ops-segmentation-guide.md +58 -0
  25. package/assets/demo/orbit/raw-sources/notion/support-escalation-runbook.md +38 -0
  26. package/assets/demo/orbit/raw-sources/warehouse/accounts.csv +211 -0
  27. package/assets/demo/orbit/raw-sources/warehouse/arr_movements.csv +721 -0
  28. package/assets/demo/orbit/raw-sources/warehouse/contracts.csv +321 -0
  29. package/assets/demo/orbit/raw-sources/warehouse/invoices.csv +3001 -0
  30. package/assets/demo/orbit/raw-sources/warehouse/plans.csv +5 -0
  31. package/assets/demo/orbit/raw-sources/warehouse/purchase_requests.csv +5201 -0
  32. package/assets/demo/orbit/raw-sources/warehouse/support_tickets.csv +521 -0
  33. package/assets/demo/orbit/raw-sources/warehouse/users.csv +1261 -0
  34. package/assets/demo/orbit/replay.memory-flow.v1.json +707 -0
  35. package/assets/demo/orbit/reports/seeded-demo-report.json +40 -0
  36. package/assets/demo/orbit/semantic-layer/.gitkeep +0 -0
  37. package/assets/demo/orbit/semantic-layer/dbt-main/int_activation_policy_windows.yaml +27 -0
  38. package/assets/demo/orbit/semantic-layer/dbt-main/int_active_contract_arr.yaml +24 -0
  39. package/assets/demo/orbit/semantic-layer/dbt-main/int_customer_health_signals.yaml +25 -0
  40. package/assets/demo/orbit/semantic-layer/dbt-main/int_parent_account_arr_movements.yaml +49 -0
  41. package/assets/demo/orbit/semantic-layer/dbt-main/int_procurement_qualifying_actions.yaml +27 -0
  42. package/assets/demo/orbit/semantic-layer/dbt-main/int_revenue_components.yaml +37 -0
  43. package/assets/demo/orbit/semantic-layer/dbt-main/mart_account_activity.yaml +23 -0
  44. package/assets/demo/orbit/semantic-layer/dbt-main/mart_account_segments.yaml +27 -0
  45. package/assets/demo/orbit/semantic-layer/dbt-main/mart_arr_daily.yaml +20 -0
  46. package/assets/demo/orbit/semantic-layer/dbt-main/mart_customer_health.yaml +30 -0
  47. package/assets/demo/orbit/semantic-layer/dbt-main/mart_nrr_quarterly.yaml +22 -0
  48. package/assets/demo/orbit/semantic-layer/dbt-main/mart_procurement_activity.yaml +24 -0
  49. package/assets/demo/orbit/semantic-layer/dbt-main/mart_retention_movement_breakout.yaml +31 -0
  50. package/assets/demo/orbit/semantic-layer/dbt-main/mart_revenue_daily.yaml +37 -0
  51. package/assets/demo/orbit/semantic-layer/dbt-main/stg_account_hierarchy.yaml +25 -0
  52. package/assets/demo/orbit/semantic-layer/dbt-main/stg_account_owners.yaml +33 -0
  53. package/assets/demo/orbit/semantic-layer/dbt-main/stg_accounts.yaml +25 -0
  54. package/assets/demo/orbit/semantic-layer/dbt-main/stg_activation_events.yaml +33 -0
  55. package/assets/demo/orbit/semantic-layer/dbt-main/stg_approval_events.yaml +25 -0
  56. package/assets/demo/orbit/semantic-layer/dbt-main/stg_arr_movements.yaml +29 -0
  57. package/assets/demo/orbit/semantic-layer/dbt-main/stg_contract_discount_terms.yaml +25 -0
  58. package/assets/demo/orbit/semantic-layer/dbt-main/stg_contracts.yaml +29 -0
  59. package/assets/demo/orbit/semantic-layer/dbt-main/stg_invoice_line_items.yaml +25 -0
  60. package/assets/demo/orbit/semantic-layer/dbt-main/stg_invoices.yaml +33 -0
  61. package/assets/demo/orbit/semantic-layer/dbt-main/stg_plan_segment_mapping.yaml +33 -0
  62. package/assets/demo/orbit/semantic-layer/dbt-main/stg_plans.yaml +17 -0
  63. package/assets/demo/orbit/semantic-layer/dbt-main/stg_purchase_orders.yaml +29 -0
  64. package/assets/demo/orbit/semantic-layer/dbt-main/stg_purchase_requests.yaml +29 -0
  65. package/assets/demo/orbit/semantic-layer/dbt-main/stg_refunds.yaml +29 -0
  66. package/assets/demo/orbit/semantic-layer/dbt-main/stg_sessions.yaml +25 -0
  67. package/assets/demo/orbit/semantic-layer/dbt-main/stg_subscriptions.yaml +25 -0
  68. package/assets/demo/orbit/semantic-layer/dbt-main/stg_supplier_onboarding_events.yaml +29 -0
  69. package/assets/demo/orbit/semantic-layer/dbt-main/stg_suppliers.yaml +21 -0
  70. package/assets/demo/orbit/semantic-layer/dbt-main/stg_support_tickets.yaml +29 -0
  71. package/assets/demo/orbit/semantic-layer/dbt-main/stg_users.yaml +21 -0
  72. package/assets/demo/orbit/semantic-layer/postgres-warehouse/_schema/orbit_analytics.yaml +1400 -0
  73. package/assets/demo/orbit/semantic-layer/postgres-warehouse/_schema/orbit_raw.yaml +989 -0
  74. package/assets/demo/orbit/semantic-layer/postgres-warehouse/large_contract_requesters.yaml +44 -0
  75. package/assets/demo/orbit/semantic-layer/postgres-warehouse/mart_account_activity.yaml +10 -0
  76. package/assets/demo/orbit/semantic-layer/postgres-warehouse/mart_account_segments.yaml +18 -0
  77. package/assets/demo/orbit/semantic-layer/postgres-warehouse/mart_arr_daily.yaml +10 -0
  78. package/assets/demo/orbit/semantic-layer/postgres-warehouse/mart_customer_health.yaml +27 -0
  79. package/assets/demo/orbit/semantic-layer/postgres-warehouse/mart_nrr_quarterly.yaml +19 -0
  80. package/assets/demo/orbit/semantic-layer/postgres-warehouse/mart_procurement_activity.yaml +13 -0
  81. package/assets/demo/orbit/semantic-layer/postgres-warehouse/mart_retention_movement_breakout.yaml +25 -0
  82. package/assets/demo/orbit/semantic-layer/postgres-warehouse/mart_revenue_daily.yaml +20 -0
  83. package/assets/demo/orbit/wiki/global/.gitkeep +0 -0
  84. package/assets/demo/orbit/wiki/global/customer-communication-policy.md +44 -0
  85. package/assets/demo/orbit/wiki/global/new-hire-onboarding-policy.md +47 -0
  86. package/assets/demo/orbit/wiki/global/orbit-activation-kpi-glossary.md +64 -0
  87. package/assets/demo/orbit/wiki/global/orbit-activation-policy-change-jan-2026.md +46 -0
  88. package/assets/demo/orbit/wiki/global/orbit-arr-contract-first-definition.md +39 -0
  89. package/assets/demo/orbit/wiki/global/orbit-company-overview.md +71 -0
  90. package/assets/demo/orbit/wiki/global/orbit-customer-health-risk-definition.md +46 -0
  91. package/assets/demo/orbit/wiki/global/orbit-customer-stakeholder-needs.md +42 -0
  92. package/assets/demo/orbit/wiki/global/orbit-customers-source.md +60 -0
  93. package/assets/demo/orbit/wiki/global/orbit-dbt-exposures.md +44 -0
  94. package/assets/demo/orbit/wiki/global/orbit-dbt-project-overview.md +54 -0
  95. package/assets/demo/orbit/wiki/global/orbit-how-we-work.md +75 -0
  96. package/assets/demo/orbit/wiki/global/orbit-known-product-gaps.md +47 -0
  97. package/assets/demo/orbit/wiki/global/orbit-mart-account-activity.md +49 -0
  98. package/assets/demo/orbit/wiki/global/orbit-mart-account-segments.md +55 -0
  99. package/assets/demo/orbit/wiki/global/orbit-mart-arr-daily.md +46 -0
  100. package/assets/demo/orbit/wiki/global/orbit-mart-nrr-quarterly.md +55 -0
  101. package/assets/demo/orbit/wiki/global/orbit-mart-procurement-activity.md +47 -0
  102. package/assets/demo/orbit/wiki/global/orbit-mart-retention-movement-breakout.md +55 -0
  103. package/assets/demo/orbit/wiki/global/orbit-mart-revenue-daily.md +56 -0
  104. package/assets/demo/orbit/wiki/global/orbit-metabase-sql-library-patterns.md +71 -0
  105. package/assets/demo/orbit/wiki/global/orbit-nrr-discount-expiration-treatment.md +47 -0
  106. package/assets/demo/orbit/wiki/global/orbit-plan-segment-normalization.md +49 -0
  107. package/assets/demo/orbit/wiki/global/orbit-procurement-qualifying-actions.md +46 -0
  108. package/assets/demo/orbit/wiki/global/orbit-product-design-principles.md +43 -0
  109. package/assets/demo/orbit/wiki/global/orbit-product-review-checklist.md +44 -0
  110. package/assets/demo/orbit/wiki/global/orbit-revenue-gross-to-net-reconciliation.md +50 -0
  111. package/assets/demo/orbit/wiki/global/sales-ops-cs-handoff-process.md +58 -0
  112. package/assets/python/kaelio_ktx-0.1.0-py3-none-any.whl +0 -0
  113. package/assets/python/manifest.json +11 -0
  114. package/dist/bin.d.ts +2 -0
  115. package/dist/bin.js +7 -0
  116. package/dist/clack.d.ts +26 -0
  117. package/dist/clack.js +45 -0
  118. package/dist/claude-code-prompt-caching.d.ts +4 -0
  119. package/dist/claude-code-prompt-caching.js +22 -0
  120. package/dist/cli-program.d.ts +53 -0
  121. package/dist/cli-program.js +372 -0
  122. package/dist/cli-program.test.d.ts +1 -0
  123. package/dist/cli-program.test.js +45 -0
  124. package/dist/cli-runtime.d.ts +46 -0
  125. package/dist/cli-runtime.js +44 -0
  126. package/dist/command-schemas.d.ts +34 -0
  127. package/dist/command-schemas.js +32 -0
  128. package/dist/command-tree.d.ts +10 -0
  129. package/dist/command-tree.js +41 -0
  130. package/dist/command-tree.test.d.ts +1 -0
  131. package/dist/command-tree.test.js +126 -0
  132. package/dist/commands/connection-commands.d.ts +3 -0
  133. package/dist/commands/connection-commands.js +46 -0
  134. package/dist/commands/ingest-commands.d.ts +9 -0
  135. package/dist/commands/ingest-commands.js +65 -0
  136. package/dist/commands/knowledge-commands.d.ts +3 -0
  137. package/dist/commands/knowledge-commands.js +57 -0
  138. package/dist/commands/mcp-commands.d.ts +3 -0
  139. package/dist/commands/mcp-commands.js +117 -0
  140. package/dist/commands/mcp-commands.test.d.ts +1 -0
  141. package/dist/commands/mcp-commands.test.js +47 -0
  142. package/dist/commands/runtime-commands.d.ts +3 -0
  143. package/dist/commands/runtime-commands.js +68 -0
  144. package/dist/commands/setup-commands.d.ts +3 -0
  145. package/dist/commands/setup-commands.js +347 -0
  146. package/dist/commands/sl-commands.d.ts +3 -0
  147. package/dist/commands/sl-commands.js +130 -0
  148. package/dist/commands/status-commands.d.ts +3 -0
  149. package/dist/commands/status-commands.js +47 -0
  150. package/dist/connection.d.ts +28 -0
  151. package/dist/connection.js +258 -0
  152. package/dist/connection.test.d.ts +1 -0
  153. package/dist/connection.test.js +405 -0
  154. package/dist/context-build-view.d.ts +106 -0
  155. package/dist/context-build-view.js +868 -0
  156. package/dist/context-build-view.test.d.ts +1 -0
  157. package/dist/context-build-view.test.js +927 -0
  158. package/dist/database-tree-picker.d.ts +24 -0
  159. package/dist/database-tree-picker.js +134 -0
  160. package/dist/database-tree-picker.test.d.ts +1 -0
  161. package/dist/database-tree-picker.test.js +135 -0
  162. package/dist/demo-assets.d.ts +17 -0
  163. package/dist/demo-assets.js +150 -0
  164. package/dist/demo-assets.test.d.ts +1 -0
  165. package/dist/demo-assets.test.js +95 -0
  166. package/dist/demo-metrics.d.ts +35 -0
  167. package/dist/demo-metrics.js +131 -0
  168. package/dist/demo-metrics.test.d.ts +1 -0
  169. package/dist/demo-metrics.test.js +108 -0
  170. package/dist/dev.d.ts +3 -0
  171. package/dist/dev.js +48 -0
  172. package/dist/dev.test.d.ts +1 -0
  173. package/dist/dev.test.js +169 -0
  174. package/dist/doctor.d.ts +72 -0
  175. package/dist/doctor.js +460 -0
  176. package/dist/doctor.test.d.ts +1 -0
  177. package/dist/doctor.test.js +604 -0
  178. package/dist/example-smoke.test.d.ts +1 -0
  179. package/dist/example-smoke.test.js +83 -0
  180. package/dist/index.d.ts +15 -0
  181. package/dist/index.js +12 -0
  182. package/dist/index.test.d.ts +1 -0
  183. package/dist/index.test.js +1213 -0
  184. package/dist/ingest-depth.d.ts +8 -0
  185. package/dist/ingest-depth.js +58 -0
  186. package/dist/ingest-query-executor.d.ts +9 -0
  187. package/dist/ingest-query-executor.js +30 -0
  188. package/dist/ingest-query-executor.test.d.ts +1 -0
  189. package/dist/ingest-query-executor.test.js +71 -0
  190. package/dist/ingest-report-file.d.ts +2 -0
  191. package/dist/ingest-report-file.js +20 -0
  192. package/dist/ingest-report-file.test.d.ts +1 -0
  193. package/dist/ingest-report-file.test.js +63 -0
  194. package/dist/ingest-viz.test.d.ts +1 -0
  195. package/dist/ingest-viz.test.js +691 -0
  196. package/dist/ingest.d.ts +64 -0
  197. package/dist/ingest.js +561 -0
  198. package/dist/ingest.test-utils.d.ts +119 -0
  199. package/dist/ingest.test-utils.js +625 -0
  200. package/dist/ingest.test.d.ts +1 -0
  201. package/dist/ingest.test.js +1302 -0
  202. package/dist/io/logger.d.ts +11 -0
  203. package/dist/io/logger.js +22 -0
  204. package/dist/io/logger.test.d.ts +1 -0
  205. package/dist/io/logger.test.js +55 -0
  206. package/dist/io/mode.d.ts +9 -0
  207. package/dist/io/mode.js +28 -0
  208. package/dist/io/mode.test.d.ts +1 -0
  209. package/dist/io/mode.test.js +48 -0
  210. package/dist/io/print-list.d.ts +42 -0
  211. package/dist/io/print-list.js +192 -0
  212. package/dist/io/print-list.test.d.ts +1 -0
  213. package/dist/io/print-list.test.js +275 -0
  214. package/dist/io/symbols.d.ts +10 -0
  215. package/dist/io/symbols.js +33 -0
  216. package/dist/knowledge.d.ts +23 -0
  217. package/dist/knowledge.js +86 -0
  218. package/dist/knowledge.test.d.ts +1 -0
  219. package/dist/knowledge.test.js +113 -0
  220. package/dist/local-adapters.d.ts +13 -0
  221. package/dist/local-adapters.js +295 -0
  222. package/dist/local-adapters.test.d.ts +1 -0
  223. package/dist/local-adapters.test.js +162 -0
  224. package/dist/local-scan-connectors.d.ts +3 -0
  225. package/dist/local-scan-connectors.js +54 -0
  226. package/dist/local-scan-connectors.test.d.ts +1 -0
  227. package/dist/local-scan-connectors.test.js +92 -0
  228. package/dist/managed-local-embeddings.d.ts +38 -0
  229. package/dist/managed-local-embeddings.js +49 -0
  230. package/dist/managed-local-embeddings.test.d.ts +1 -0
  231. package/dist/managed-local-embeddings.test.js +161 -0
  232. package/dist/managed-mcp-daemon.d.ts +73 -0
  233. package/dist/managed-mcp-daemon.js +183 -0
  234. package/dist/managed-mcp-daemon.test.d.ts +1 -0
  235. package/dist/managed-mcp-daemon.test.js +104 -0
  236. package/dist/managed-python-command.d.ts +29 -0
  237. package/dist/managed-python-command.js +77 -0
  238. package/dist/managed-python-command.test.d.ts +1 -0
  239. package/dist/managed-python-command.test.js +206 -0
  240. package/dist/managed-python-daemon.d.ts +112 -0
  241. package/dist/managed-python-daemon.js +585 -0
  242. package/dist/managed-python-daemon.test.d.ts +1 -0
  243. package/dist/managed-python-daemon.test.js +340 -0
  244. package/dist/managed-python-http.d.ts +39 -0
  245. package/dist/managed-python-http.js +110 -0
  246. package/dist/managed-python-http.test.d.ts +1 -0
  247. package/dist/managed-python-http.test.js +177 -0
  248. package/dist/managed-python-runtime.d.ts +122 -0
  249. package/dist/managed-python-runtime.js +313 -0
  250. package/dist/managed-python-runtime.test.d.ts +1 -0
  251. package/dist/managed-python-runtime.test.js +396 -0
  252. package/dist/mcp-http-server.d.ts +43 -0
  253. package/dist/mcp-http-server.js +270 -0
  254. package/dist/mcp-http-server.test.d.ts +1 -0
  255. package/dist/mcp-http-server.test.js +209 -0
  256. package/dist/memory-flow-hud.d.ts +32 -0
  257. package/dist/memory-flow-hud.js +219 -0
  258. package/dist/memory-flow-interactive.d.ts +29 -0
  259. package/dist/memory-flow-interactive.js +94 -0
  260. package/dist/memory-flow-interactive.test.d.ts +1 -0
  261. package/dist/memory-flow-interactive.test.js +109 -0
  262. package/dist/memory-flow-tui.d.ts +76 -0
  263. package/dist/memory-flow-tui.js +343 -0
  264. package/dist/memory-flow-tui.test.d.ts +1 -0
  265. package/dist/memory-flow-tui.test.js +247 -0
  266. package/dist/next-steps.d.ts +36 -0
  267. package/dist/next-steps.js +67 -0
  268. package/dist/next-steps.test.d.ts +1 -0
  269. package/dist/next-steps.test.js +75 -0
  270. package/dist/notion-page-picker.d.ts +35 -0
  271. package/dist/notion-page-picker.js +208 -0
  272. package/dist/notion-page-picker.test.d.ts +1 -0
  273. package/dist/notion-page-picker.test.js +244 -0
  274. package/dist/print-command-tree.d.ts +4 -0
  275. package/dist/print-command-tree.js +31 -0
  276. package/dist/print-command-tree.test.d.ts +1 -0
  277. package/dist/print-command-tree.test.js +37 -0
  278. package/dist/project-dir.test.d.ts +1 -0
  279. package/dist/project-dir.test.js +124 -0
  280. package/dist/project-resolver.d.ts +7 -0
  281. package/dist/project-resolver.js +42 -0
  282. package/dist/project-resolver.test.d.ts +1 -0
  283. package/dist/project-resolver.test.js +49 -0
  284. package/dist/prompt-navigation.d.ts +6 -0
  285. package/dist/prompt-navigation.js +60 -0
  286. package/dist/prompt-navigation.test.d.ts +1 -0
  287. package/dist/prompt-navigation.test.js +33 -0
  288. package/dist/public-ingest-copy.d.ts +3 -0
  289. package/dist/public-ingest-copy.js +32 -0
  290. package/dist/public-ingest-copy.test.d.ts +1 -0
  291. package/dist/public-ingest-copy.test.js +24 -0
  292. package/dist/public-ingest.d.ts +111 -0
  293. package/dist/public-ingest.js +546 -0
  294. package/dist/public-ingest.test.d.ts +1 -0
  295. package/dist/public-ingest.test.js +737 -0
  296. package/dist/runtime.d.ts +44 -0
  297. package/dist/runtime.js +151 -0
  298. package/dist/runtime.test.d.ts +1 -0
  299. package/dist/runtime.test.js +380 -0
  300. package/dist/scan.d.ts +34 -0
  301. package/dist/scan.js +275 -0
  302. package/dist/scan.test.d.ts +1 -0
  303. package/dist/scan.test.js +983 -0
  304. package/dist/setup-agents.d.ts +87 -0
  305. package/dist/setup-agents.js +471 -0
  306. package/dist/setup-agents.test.d.ts +1 -0
  307. package/dist/setup-agents.test.js +352 -0
  308. package/dist/setup-context.d.ts +86 -0
  309. package/dist/setup-context.js +553 -0
  310. package/dist/setup-context.test.d.ts +1 -0
  311. package/dist/setup-context.test.js +490 -0
  312. package/dist/setup-database-context-depth.d.ts +22 -0
  313. package/dist/setup-database-context-depth.js +83 -0
  314. package/dist/setup-databases.d.ts +82 -0
  315. package/dist/setup-databases.js +1858 -0
  316. package/dist/setup-databases.test.d.ts +1 -0
  317. package/dist/setup-databases.test.js +1883 -0
  318. package/dist/setup-demo-tour.d.ts +33 -0
  319. package/dist/setup-demo-tour.js +302 -0
  320. package/dist/setup-demo-tour.test.d.ts +1 -0
  321. package/dist/setup-demo-tour.test.js +221 -0
  322. package/dist/setup-embeddings.d.ts +57 -0
  323. package/dist/setup-embeddings.js +347 -0
  324. package/dist/setup-embeddings.test.d.ts +1 -0
  325. package/dist/setup-embeddings.test.js +379 -0
  326. package/dist/setup-interrupt.d.ts +15 -0
  327. package/dist/setup-interrupt.js +71 -0
  328. package/dist/setup-interrupt.test.d.ts +1 -0
  329. package/dist/setup-interrupt.test.js +77 -0
  330. package/dist/setup-models.d.ts +90 -0
  331. package/dist/setup-models.js +760 -0
  332. package/dist/setup-models.test.d.ts +1 -0
  333. package/dist/setup-models.test.js +857 -0
  334. package/dist/setup-project.d.ts +45 -0
  335. package/dist/setup-project.js +289 -0
  336. package/dist/setup-project.test.d.ts +1 -0
  337. package/dist/setup-project.test.js +229 -0
  338. package/dist/setup-prompts.d.ts +54 -0
  339. package/dist/setup-prompts.js +88 -0
  340. package/dist/setup-prompts.test.d.ts +1 -0
  341. package/dist/setup-prompts.test.js +170 -0
  342. package/dist/setup-ready-menu.d.ts +18 -0
  343. package/dist/setup-ready-menu.js +31 -0
  344. package/dist/setup-ready-menu.test.d.ts +1 -0
  345. package/dist/setup-ready-menu.test.js +41 -0
  346. package/dist/setup-secrets.d.ts +7 -0
  347. package/dist/setup-secrets.js +15 -0
  348. package/dist/setup-secrets.test.d.ts +1 -0
  349. package/dist/setup-secrets.test.js +30 -0
  350. package/dist/setup-sources.d.ts +105 -0
  351. package/dist/setup-sources.js +1606 -0
  352. package/dist/setup-sources.test.d.ts +1 -0
  353. package/dist/setup-sources.test.js +1277 -0
  354. package/dist/setup.d.ts +130 -0
  355. package/dist/setup.js +478 -0
  356. package/dist/setup.test.d.ts +1 -0
  357. package/dist/setup.test.js +1478 -0
  358. package/dist/skills/research/SKILL.md +49 -0
  359. package/dist/sl.d.ts +60 -0
  360. package/dist/sl.js +167 -0
  361. package/dist/sl.test.d.ts +1 -0
  362. package/dist/sl.test.js +452 -0
  363. package/dist/source-mapping.d.ts +26 -0
  364. package/dist/source-mapping.js +151 -0
  365. package/dist/standalone-smoke.test.d.ts +1 -0
  366. package/dist/standalone-smoke.test.js +247 -0
  367. package/dist/startup-profile.d.ts +3 -0
  368. package/dist/startup-profile.js +44 -0
  369. package/dist/status-project.d.ts +118 -0
  370. package/dist/status-project.js +723 -0
  371. package/dist/text-ingest.d.ts +29 -0
  372. package/dist/text-ingest.js +270 -0
  373. package/dist/text-ingest.test.d.ts +1 -0
  374. package/dist/text-ingest.test.js +247 -0
  375. package/dist/tree-picker-state.d.ts +73 -0
  376. package/dist/tree-picker-state.js +416 -0
  377. package/dist/tree-picker-state.test.d.ts +1 -0
  378. package/dist/tree-picker-state.test.js +303 -0
  379. package/dist/tree-picker-tui.d.ts +78 -0
  380. package/dist/tree-picker-tui.js +226 -0
  381. package/dist/tree-picker-tui.test.d.ts +1 -0
  382. package/dist/tree-picker-tui.test.js +248 -0
  383. package/dist/viz-fallback.d.ts +28 -0
  384. package/dist/viz-fallback.js +51 -0
  385. package/dist/viz-fallback.test.d.ts +1 -0
  386. package/dist/viz-fallback.test.js +77 -0
  387. package/node_modules/@ktx/connector-bigquery/dist/connector.d.ts +141 -0
  388. package/node_modules/@ktx/connector-bigquery/dist/connector.js +371 -0
  389. package/node_modules/@ktx/connector-bigquery/dist/connector.test.d.ts +1 -0
  390. package/node_modules/@ktx/connector-bigquery/dist/connector.test.js +247 -0
  391. package/node_modules/@ktx/connector-bigquery/dist/dialect.d.ts +29 -0
  392. package/node_modules/@ktx/connector-bigquery/dist/dialect.js +178 -0
  393. package/node_modules/@ktx/connector-bigquery/dist/dialect.test.d.ts +1 -0
  394. package/node_modules/@ktx/connector-bigquery/dist/dialect.test.js +36 -0
  395. package/node_modules/@ktx/connector-bigquery/dist/index.d.ts +3 -0
  396. package/node_modules/@ktx/connector-bigquery/dist/index.js +3 -0
  397. package/node_modules/@ktx/connector-bigquery/dist/live-database-introspection.d.ts +10 -0
  398. package/node_modules/@ktx/connector-bigquery/dist/live-database-introspection.js +20 -0
  399. package/node_modules/@ktx/connector-bigquery/dist/package-exports.test.d.ts +1 -0
  400. package/node_modules/@ktx/connector-bigquery/dist/package-exports.test.js +10 -0
  401. package/node_modules/@ktx/connector-bigquery/package.json +20 -0
  402. package/node_modules/@ktx/connector-clickhouse/dist/connector.d.ts +113 -0
  403. package/node_modules/@ktx/connector-clickhouse/dist/connector.js +345 -0
  404. package/node_modules/@ktx/connector-clickhouse/dist/connector.test.d.ts +1 -0
  405. package/node_modules/@ktx/connector-clickhouse/dist/connector.test.js +228 -0
  406. package/node_modules/@ktx/connector-clickhouse/dist/dialect.d.ts +33 -0
  407. package/node_modules/@ktx/connector-clickhouse/dist/dialect.js +236 -0
  408. package/node_modules/@ktx/connector-clickhouse/dist/dialect.test.d.ts +1 -0
  409. package/node_modules/@ktx/connector-clickhouse/dist/dialect.test.js +36 -0
  410. package/node_modules/@ktx/connector-clickhouse/dist/index.d.ts +3 -0
  411. package/node_modules/@ktx/connector-clickhouse/dist/index.js +3 -0
  412. package/node_modules/@ktx/connector-clickhouse/dist/live-database-introspection.d.ts +11 -0
  413. package/node_modules/@ktx/connector-clickhouse/dist/live-database-introspection.js +21 -0
  414. package/node_modules/@ktx/connector-clickhouse/dist/package-exports.test.d.ts +1 -0
  415. package/node_modules/@ktx/connector-clickhouse/dist/package-exports.test.js +10 -0
  416. package/node_modules/@ktx/connector-clickhouse/package.json +20 -0
  417. package/node_modules/@ktx/connector-mysql/dist/connector.d.ts +116 -0
  418. package/node_modules/@ktx/connector-mysql/dist/connector.js +385 -0
  419. package/node_modules/@ktx/connector-mysql/dist/connector.test.d.ts +1 -0
  420. package/node_modules/@ktx/connector-mysql/dist/connector.test.js +218 -0
  421. package/node_modules/@ktx/connector-mysql/dist/dialect.d.ts +29 -0
  422. package/node_modules/@ktx/connector-mysql/dist/dialect.js +171 -0
  423. package/node_modules/@ktx/connector-mysql/dist/dialect.test.d.ts +1 -0
  424. package/node_modules/@ktx/connector-mysql/dist/dialect.test.js +36 -0
  425. package/node_modules/@ktx/connector-mysql/dist/index.d.ts +3 -0
  426. package/node_modules/@ktx/connector-mysql/dist/index.js +3 -0
  427. package/node_modules/@ktx/connector-mysql/dist/live-database-introspection.d.ts +11 -0
  428. package/node_modules/@ktx/connector-mysql/dist/live-database-introspection.js +21 -0
  429. package/node_modules/@ktx/connector-mysql/dist/package-exports.test.d.ts +1 -0
  430. package/node_modules/@ktx/connector-mysql/dist/package-exports.test.js +11 -0
  431. package/node_modules/@ktx/connector-mysql/package.json +20 -0
  432. package/node_modules/@ktx/connector-postgres/dist/connector.d.ts +140 -0
  433. package/node_modules/@ktx/connector-postgres/dist/connector.js +497 -0
  434. package/node_modules/@ktx/connector-postgres/dist/connector.test.d.ts +1 -0
  435. package/node_modules/@ktx/connector-postgres/dist/connector.test.js +336 -0
  436. package/node_modules/@ktx/connector-postgres/dist/dialect.d.ts +29 -0
  437. package/node_modules/@ktx/connector-postgres/dist/dialect.js +182 -0
  438. package/node_modules/@ktx/connector-postgres/dist/dialect.test.d.ts +1 -0
  439. package/node_modules/@ktx/connector-postgres/dist/dialect.test.js +37 -0
  440. package/node_modules/@ktx/connector-postgres/dist/historic-sql-query-client.d.ts +14 -0
  441. package/node_modules/@ktx/connector-postgres/dist/historic-sql-query-client.js +24 -0
  442. package/node_modules/@ktx/connector-postgres/dist/historic-sql-query-client.test.d.ts +1 -0
  443. package/node_modules/@ktx/connector-postgres/dist/historic-sql-query-client.test.js +45 -0
  444. package/node_modules/@ktx/connector-postgres/dist/index.d.ts +4 -0
  445. package/node_modules/@ktx/connector-postgres/dist/index.js +4 -0
  446. package/node_modules/@ktx/connector-postgres/dist/live-database-introspection.d.ts +11 -0
  447. package/node_modules/@ktx/connector-postgres/dist/live-database-introspection.js +21 -0
  448. package/node_modules/@ktx/connector-postgres/dist/package-exports.test.d.ts +1 -0
  449. package/node_modules/@ktx/connector-postgres/dist/package-exports.test.js +12 -0
  450. package/node_modules/@ktx/connector-postgres/package.json +20 -0
  451. package/node_modules/@ktx/connector-snowflake/dist/connector.d.ts +129 -0
  452. package/node_modules/@ktx/connector-snowflake/dist/connector.js +517 -0
  453. package/node_modules/@ktx/connector-snowflake/dist/connector.test.d.ts +1 -0
  454. package/node_modules/@ktx/connector-snowflake/dist/connector.test.js +210 -0
  455. package/node_modules/@ktx/connector-snowflake/dist/dialect.d.ts +29 -0
  456. package/node_modules/@ktx/connector-snowflake/dist/dialect.js +156 -0
  457. package/node_modules/@ktx/connector-snowflake/dist/dialect.test.d.ts +1 -0
  458. package/node_modules/@ktx/connector-snowflake/dist/dialect.test.js +34 -0
  459. package/node_modules/@ktx/connector-snowflake/dist/index.d.ts +3 -0
  460. package/node_modules/@ktx/connector-snowflake/dist/index.js +3 -0
  461. package/node_modules/@ktx/connector-snowflake/dist/live-database-introspection.d.ts +11 -0
  462. package/node_modules/@ktx/connector-snowflake/dist/live-database-introspection.js +21 -0
  463. package/node_modules/@ktx/connector-snowflake/dist/package-exports.test.d.ts +1 -0
  464. package/node_modules/@ktx/connector-snowflake/dist/package-exports.test.js +10 -0
  465. package/node_modules/@ktx/connector-snowflake/package.json +20 -0
  466. package/node_modules/@ktx/connector-sqlite/dist/connector.d.ts +59 -0
  467. package/node_modules/@ktx/connector-sqlite/dist/connector.js +251 -0
  468. package/node_modules/@ktx/connector-sqlite/dist/connector.test.d.ts +1 -0
  469. package/node_modules/@ktx/connector-sqlite/dist/connector.test.js +196 -0
  470. package/node_modules/@ktx/connector-sqlite/dist/dialect.d.ts +29 -0
  471. package/node_modules/@ktx/connector-sqlite/dist/dialect.js +146 -0
  472. package/node_modules/@ktx/connector-sqlite/dist/dialect.test.d.ts +1 -0
  473. package/node_modules/@ktx/connector-sqlite/dist/dialect.test.js +23 -0
  474. package/node_modules/@ktx/connector-sqlite/dist/index.d.ts +3 -0
  475. package/node_modules/@ktx/connector-sqlite/dist/index.js +3 -0
  476. package/node_modules/@ktx/connector-sqlite/dist/live-database-introspection.d.ts +8 -0
  477. package/node_modules/@ktx/connector-sqlite/dist/live-database-introspection.js +20 -0
  478. package/node_modules/@ktx/connector-sqlite/dist/package-exports.test.d.ts +1 -0
  479. package/node_modules/@ktx/connector-sqlite/dist/package-exports.test.js +11 -0
  480. package/node_modules/@ktx/connector-sqlite/package.json +20 -0
  481. package/node_modules/@ktx/connector-sqlserver/dist/connector.d.ts +137 -0
  482. package/node_modules/@ktx/connector-sqlserver/dist/connector.js +503 -0
  483. package/node_modules/@ktx/connector-sqlserver/dist/connector.test.d.ts +1 -0
  484. package/node_modules/@ktx/connector-sqlserver/dist/connector.test.js +269 -0
  485. package/node_modules/@ktx/connector-sqlserver/dist/dialect.d.ts +30 -0
  486. package/node_modules/@ktx/connector-sqlserver/dist/dialect.js +169 -0
  487. package/node_modules/@ktx/connector-sqlserver/dist/dialect.test.d.ts +1 -0
  488. package/node_modules/@ktx/connector-sqlserver/dist/dialect.test.js +36 -0
  489. package/node_modules/@ktx/connector-sqlserver/dist/index.d.ts +3 -0
  490. package/node_modules/@ktx/connector-sqlserver/dist/index.js +3 -0
  491. package/node_modules/@ktx/connector-sqlserver/dist/live-database-introspection.d.ts +11 -0
  492. package/node_modules/@ktx/connector-sqlserver/dist/live-database-introspection.js +21 -0
  493. package/node_modules/@ktx/connector-sqlserver/dist/package-exports.test.d.ts +1 -0
  494. package/node_modules/@ktx/connector-sqlserver/dist/package-exports.test.js +10 -0
  495. package/node_modules/@ktx/connector-sqlserver/package.json +20 -0
  496. package/node_modules/@ktx/context/dist/agent/agent-runner.service.d.ts +18 -0
  497. package/node_modules/@ktx/context/dist/agent/agent-runner.service.js +10 -0
  498. package/node_modules/@ktx/context/dist/agent/agent-runner.service.test.d.ts +1 -0
  499. package/node_modules/@ktx/context/dist/agent/agent-runner.service.test.js +308 -0
  500. package/node_modules/@ktx/context/dist/agent/index.d.ts +2 -0
  501. package/node_modules/@ktx/context/dist/agent/index.js +1 -0
  502. package/node_modules/@ktx/context/dist/connections/connection-type.d.ts +25 -0
  503. package/node_modules/@ktx/context/dist/connections/connection-type.js +24 -0
  504. package/node_modules/@ktx/context/dist/connections/dialects.d.ts +9 -0
  505. package/node_modules/@ktx/context/dist/connections/dialects.js +71 -0
  506. package/node_modules/@ktx/context/dist/connections/dialects.test.d.ts +1 -0
  507. package/node_modules/@ktx/context/dist/connections/dialects.test.js +24 -0
  508. package/node_modules/@ktx/context/dist/connections/index.d.ts +11 -0
  509. package/node_modules/@ktx/context/dist/connections/index.js +9 -0
  510. package/node_modules/@ktx/context/dist/connections/local-query-executor.d.ts +6 -0
  511. package/node_modules/@ktx/context/dist/connections/local-query-executor.js +21 -0
  512. package/node_modules/@ktx/context/dist/connections/local-query-executor.test.d.ts +1 -0
  513. package/node_modules/@ktx/context/dist/connections/local-query-executor.test.js +48 -0
  514. package/node_modules/@ktx/context/dist/connections/local-warehouse-descriptor.d.ts +20 -0
  515. package/node_modules/@ktx/context/dist/connections/local-warehouse-descriptor.js +72 -0
  516. package/node_modules/@ktx/context/dist/connections/local-warehouse-descriptor.test.d.ts +1 -0
  517. package/node_modules/@ktx/context/dist/connections/local-warehouse-descriptor.test.js +53 -0
  518. package/node_modules/@ktx/context/dist/connections/notion-config.d.ts +41 -0
  519. package/node_modules/@ktx/context/dist/connections/notion-config.js +132 -0
  520. package/node_modules/@ktx/context/dist/connections/notion-config.test.d.ts +1 -0
  521. package/node_modules/@ktx/context/dist/connections/notion-config.test.js +121 -0
  522. package/node_modules/@ktx/context/dist/connections/postgres-query-executor.d.ts +25 -0
  523. package/node_modules/@ktx/context/dist/connections/postgres-query-executor.js +53 -0
  524. package/node_modules/@ktx/context/dist/connections/postgres-query-executor.test.d.ts +1 -0
  525. package/node_modules/@ktx/context/dist/connections/postgres-query-executor.test.js +91 -0
  526. package/node_modules/@ktx/context/dist/connections/query-executor.d.ts +19 -0
  527. package/node_modules/@ktx/context/dist/connections/query-executor.js +3 -0
  528. package/node_modules/@ktx/context/dist/connections/read-only-sql.d.ts +2 -0
  529. package/node_modules/@ktx/context/dist/connections/read-only-sql.js +19 -0
  530. package/node_modules/@ktx/context/dist/connections/read-only-sql.test.d.ts +1 -0
  531. package/node_modules/@ktx/context/dist/connections/read-only-sql.test.js +20 -0
  532. package/node_modules/@ktx/context/dist/connections/sqlite-query-executor.d.ts +3 -0
  533. package/node_modules/@ktx/context/dist/connections/sqlite-query-executor.js +73 -0
  534. package/node_modules/@ktx/context/dist/connections/sqlite-query-executor.test.d.ts +1 -0
  535. package/node_modules/@ktx/context/dist/connections/sqlite-query-executor.test.js +113 -0
  536. package/node_modules/@ktx/context/dist/core/config-reference.d.ts +2 -0
  537. package/node_modules/@ktx/context/dist/core/config-reference.js +29 -0
  538. package/node_modules/@ktx/context/dist/core/config-reference.test.d.ts +1 -0
  539. package/node_modules/@ktx/context/dist/core/config-reference.test.js +27 -0
  540. package/node_modules/@ktx/context/dist/core/config.d.ts +25 -0
  541. package/node_modules/@ktx/context/dist/core/config.js +14 -0
  542. package/node_modules/@ktx/context/dist/core/embedding.d.ts +5 -0
  543. package/node_modules/@ktx/context/dist/core/embedding.js +1 -0
  544. package/node_modules/@ktx/context/dist/core/file-store.d.ts +30 -0
  545. package/node_modules/@ktx/context/dist/core/file-store.js +1 -0
  546. package/node_modules/@ktx/context/dist/core/git-env.d.ts +2 -0
  547. package/node_modules/@ktx/context/dist/core/git-env.js +26 -0
  548. package/node_modules/@ktx/context/dist/core/git.service.assert-worktree-clean.test.d.ts +1 -0
  549. package/node_modules/@ktx/context/dist/core/git.service.assert-worktree-clean.test.js +62 -0
  550. package/node_modules/@ktx/context/dist/core/git.service.d.ts +194 -0
  551. package/node_modules/@ktx/context/dist/core/git.service.delete-directories.test.d.ts +1 -0
  552. package/node_modules/@ktx/context/dist/core/git.service.delete-directories.test.js +61 -0
  553. package/node_modules/@ktx/context/dist/core/git.service.js +804 -0
  554. package/node_modules/@ktx/context/dist/core/git.service.reset-hard.test.d.ts +1 -0
  555. package/node_modules/@ktx/context/dist/core/git.service.reset-hard.test.js +47 -0
  556. package/node_modules/@ktx/context/dist/core/git.service.test.d.ts +1 -0
  557. package/node_modules/@ktx/context/dist/core/git.service.test.js +325 -0
  558. package/node_modules/@ktx/context/dist/core/index.d.ts +10 -0
  559. package/node_modules/@ktx/context/dist/core/index.js +5 -0
  560. package/node_modules/@ktx/context/dist/core/redaction.d.ts +4 -0
  561. package/node_modules/@ktx/context/dist/core/redaction.js +39 -0
  562. package/node_modules/@ktx/context/dist/core/session-worktree.service.d.ts +38 -0
  563. package/node_modules/@ktx/context/dist/core/session-worktree.service.js +65 -0
  564. package/node_modules/@ktx/context/dist/core/session-worktree.service.test.d.ts +1 -0
  565. package/node_modules/@ktx/context/dist/core/session-worktree.service.test.js +97 -0
  566. package/node_modules/@ktx/context/dist/daemon/index.d.ts +1 -0
  567. package/node_modules/@ktx/context/dist/daemon/index.js +1 -0
  568. package/node_modules/@ktx/context/dist/daemon/semantic-layer-compute.d.ts +72 -0
  569. package/node_modules/@ktx/context/dist/daemon/semantic-layer-compute.js +191 -0
  570. package/node_modules/@ktx/context/dist/daemon/semantic-layer-compute.test.d.ts +1 -0
  571. package/node_modules/@ktx/context/dist/daemon/semantic-layer-compute.test.js +301 -0
  572. package/node_modules/@ktx/context/dist/index.d.ts +21 -0
  573. package/node_modules/@ktx/context/dist/index.js +18 -0
  574. package/node_modules/@ktx/context/dist/index.test.d.ts +1 -0
  575. package/node_modules/@ktx/context/dist/index.test.js +10 -0
  576. package/node_modules/@ktx/context/dist/ingest/action-identity.d.ts +3 -0
  577. package/node_modules/@ktx/context/dist/ingest/action-identity.js +6 -0
  578. package/node_modules/@ktx/context/dist/ingest/action-identity.test.d.ts +1 -0
  579. package/node_modules/@ktx/context/dist/ingest/action-identity.test.js +19 -0
  580. package/node_modules/@ktx/context/dist/ingest/adapters/dbt/chunk.d.ts +7 -0
  581. package/node_modules/@ktx/context/dist/ingest/adapters/dbt/chunk.js +110 -0
  582. package/node_modules/@ktx/context/dist/ingest/adapters/dbt/chunk.test.d.ts +1 -0
  583. package/node_modules/@ktx/context/dist/ingest/adapters/dbt/chunk.test.js +30 -0
  584. package/node_modules/@ktx/context/dist/ingest/adapters/dbt/dbt.adapter.d.ts +18 -0
  585. package/node_modules/@ktx/context/dist/ingest/adapters/dbt/dbt.adapter.js +43 -0
  586. package/node_modules/@ktx/context/dist/ingest/adapters/dbt/dbt.adapter.test.d.ts +1 -0
  587. package/node_modules/@ktx/context/dist/ingest/adapters/dbt/dbt.adapter.test.js +43 -0
  588. package/node_modules/@ktx/context/dist/ingest/adapters/dbt/detect.d.ts +1 -0
  589. package/node_modules/@ktx/context/dist/ingest/adapters/dbt/detect.js +12 -0
  590. package/node_modules/@ktx/context/dist/ingest/adapters/dbt/fetch.d.ts +19 -0
  591. package/node_modules/@ktx/context/dist/ingest/adapters/dbt/fetch.js +43 -0
  592. package/node_modules/@ktx/context/dist/ingest/adapters/dbt/fetch.test.d.ts +1 -0
  593. package/node_modules/@ktx/context/dist/ingest/adapters/dbt/fetch.test.js +30 -0
  594. package/node_modules/@ktx/context/dist/ingest/adapters/dbt/parse.d.ts +6 -0
  595. package/node_modules/@ktx/context/dist/ingest/adapters/dbt/parse.js +23 -0
  596. package/node_modules/@ktx/context/dist/ingest/adapters/dbt/parse.test.d.ts +1 -0
  597. package/node_modules/@ktx/context/dist/ingest/adapters/dbt/parse.test.js +7 -0
  598. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/match-tables.d.ts +27 -0
  599. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/match-tables.js +80 -0
  600. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/match-tables.test.d.ts +1 -0
  601. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/match-tables.test.js +59 -0
  602. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/merge-semantic-model-tables.d.ts +3 -0
  603. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/merge-semantic-model-tables.js +28 -0
  604. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/merge-semantic-model-tables.test.d.ts +1 -0
  605. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/merge-semantic-model-tables.test.js +55 -0
  606. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/parse-schema.d.ts +65 -0
  607. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/parse-schema.js +432 -0
  608. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/parse-schema.test.d.ts +1 -0
  609. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/parse-schema.test.js +195 -0
  610. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-description-updates.d.ts +13 -0
  611. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-description-updates.js +46 -0
  612. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-description-updates.test.d.ts +1 -0
  613. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-description-updates.test.js +88 -0
  614. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-metadata-updates.d.ts +9 -0
  615. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-metadata-updates.js +57 -0
  616. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-metadata-updates.test.d.ts +1 -0
  617. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-metadata-updates.test.js +68 -0
  618. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-relationship-updates.d.ts +12 -0
  619. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-relationship-updates.js +34 -0
  620. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-relationship-updates.test.d.ts +1 -0
  621. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-descriptions/to-relationship-updates.test.js +56 -0
  622. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-extraction-golden-parity.test.d.ts +1 -0
  623. package/node_modules/@ktx/context/dist/ingest/adapters/dbt-extraction-golden-parity.test.js +392 -0
  624. package/node_modules/@ktx/context/dist/ingest/adapters/fake/fake.adapter.d.ts +7 -0
  625. package/node_modules/@ktx/context/dist/ingest/adapters/fake/fake.adapter.js +42 -0
  626. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/bigquery-query-history-reader.d.ts +14 -0
  627. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/bigquery-query-history-reader.js +199 -0
  628. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/bigquery-query-history-reader.test.d.ts +1 -0
  629. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/bigquery-query-history-reader.test.js +121 -0
  630. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/buckets.d.ts +6 -0
  631. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/buckets.js +64 -0
  632. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/buckets.test.d.ts +1 -0
  633. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/buckets.test.js +49 -0
  634. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/chunk-unified.d.ts +3 -0
  635. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/chunk-unified.js +86 -0
  636. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/chunk-unified.test.d.ts +1 -0
  637. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/chunk-unified.test.js +160 -0
  638. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/detect.d.ts +1 -0
  639. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/detect.js +25 -0
  640. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/detect.test.d.ts +1 -0
  641. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/detect.test.js +48 -0
  642. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/errors.d.ts +35 -0
  643. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/errors.js +32 -0
  644. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/evidence-tool.d.ts +41 -0
  645. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/evidence-tool.js +88 -0
  646. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/evidence-tool.test.d.ts +1 -0
  647. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/evidence-tool.test.js +67 -0
  648. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/evidence.d.ts +77 -0
  649. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/evidence.js +32 -0
  650. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/evidence.test.d.ts +1 -0
  651. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/evidence.test.js +43 -0
  652. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/historic-sql.adapter.d.ts +14 -0
  653. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/historic-sql.adapter.js +33 -0
  654. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/historic-sql.adapter.test.d.ts +1 -0
  655. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/historic-sql.adapter.test.js +98 -0
  656. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/local-ingest-acceptance.test.d.ts +1 -0
  657. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/local-ingest-acceptance.test.js +235 -0
  658. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/pattern-inputs.d.ts +21 -0
  659. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/pattern-inputs.js +66 -0
  660. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/pattern-inputs.test.d.ts +1 -0
  661. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/pattern-inputs.test.js +68 -0
  662. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/post-processor.d.ts +4 -0
  663. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/post-processor.js +38 -0
  664. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/post-processor.test.d.ts +1 -0
  665. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/post-processor.test.js +63 -0
  666. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/postgres-pgss-reader.d.ts +5 -0
  667. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/postgres-pgss-reader.js +233 -0
  668. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/postgres-pgss-reader.test.d.ts +1 -0
  669. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/postgres-pgss-reader.test.js +205 -0
  670. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/projection.d.ts +19 -0
  671. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/projection.js +272 -0
  672. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/projection.test.d.ts +1 -0
  673. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/projection.test.js +309 -0
  674. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/redaction.d.ts +6 -0
  675. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/redaction.js +30 -0
  676. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/redaction.test.d.ts +1 -0
  677. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/redaction.test.js +22 -0
  678. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/skill-schemas.d.ts +37 -0
  679. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/skill-schemas.js +24 -0
  680. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/skill-schemas.test.d.ts +1 -0
  681. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/skill-schemas.test.js +62 -0
  682. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/snowflake-query-history-reader.d.ts +8 -0
  683. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/snowflake-query-history-reader.js +180 -0
  684. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/snowflake-query-history-reader.test.d.ts +1 -0
  685. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/snowflake-query-history-reader.test.js +117 -0
  686. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/stage-unified.d.ts +13 -0
  687. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/stage-unified.js +269 -0
  688. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/stage-unified.test.d.ts +1 -0
  689. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/stage-unified.test.js +405 -0
  690. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/types.d.ts +184 -0
  691. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/types.js +99 -0
  692. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/types.test.d.ts +1 -0
  693. package/node_modules/@ktx/context/dist/ingest/adapters/historic-sql/types.test.js +87 -0
  694. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/chunk.d.ts +2 -0
  695. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/chunk.js +44 -0
  696. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/chunk.test.d.ts +1 -0
  697. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/chunk.test.js +95 -0
  698. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/daemon-introspection.d.ts +20 -0
  699. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/daemon-introspection.js +187 -0
  700. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/daemon-introspection.test.d.ts +1 -0
  701. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/daemon-introspection.test.js +204 -0
  702. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/extracted-schema.d.ts +29 -0
  703. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/extracted-schema.js +28 -0
  704. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/extracted-schema.test.d.ts +1 -0
  705. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/extracted-schema.test.js +129 -0
  706. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/live-database.adapter.d.ts +11 -0
  707. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/live-database.adapter.js +24 -0
  708. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/live-database.adapter.test.d.ts +1 -0
  709. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/live-database.adapter.test.js +55 -0
  710. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/manifest.d.ts +65 -0
  711. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/manifest.js +190 -0
  712. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/manifest.test.d.ts +1 -0
  713. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/manifest.test.js +291 -0
  714. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/stage.d.ts +12 -0
  715. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/stage.js +105 -0
  716. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/stage.test.d.ts +1 -0
  717. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/stage.test.js +133 -0
  718. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/structural-sync.d.ts +89 -0
  719. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/structural-sync.js +335 -0
  720. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/structural-sync.test.d.ts +1 -0
  721. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/structural-sync.test.js +416 -0
  722. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/types.d.ts +8 -0
  723. package/node_modules/@ktx/context/dist/ingest/adapters/live-database/types.js +1 -0
  724. package/node_modules/@ktx/context/dist/ingest/adapters/looker/chunk.d.ts +2 -0
  725. package/node_modules/@ktx/context/dist/ingest/adapters/looker/chunk.js +146 -0
  726. package/node_modules/@ktx/context/dist/ingest/adapters/looker/chunk.test.d.ts +1 -0
  727. package/node_modules/@ktx/context/dist/ingest/adapters/looker/chunk.test.js +142 -0
  728. package/node_modules/@ktx/context/dist/ingest/adapters/looker/client-boundary.test.d.ts +1 -0
  729. package/node_modules/@ktx/context/dist/ingest/adapters/looker/client-boundary.test.js +12 -0
  730. package/node_modules/@ktx/context/dist/ingest/adapters/looker/client.d.ts +83 -0
  731. package/node_modules/@ktx/context/dist/ingest/adapters/looker/client.js +554 -0
  732. package/node_modules/@ktx/context/dist/ingest/adapters/looker/client.test.d.ts +1 -0
  733. package/node_modules/@ktx/context/dist/ingest/adapters/looker/client.test.js +407 -0
  734. package/node_modules/@ktx/context/dist/ingest/adapters/looker/daemon-table-identifier-parser.d.ts +7 -0
  735. package/node_modules/@ktx/context/dist/ingest/adapters/looker/daemon-table-identifier-parser.js +57 -0
  736. package/node_modules/@ktx/context/dist/ingest/adapters/looker/daemon-table-identifier-parser.test.d.ts +1 -0
  737. package/node_modules/@ktx/context/dist/ingest/adapters/looker/daemon-table-identifier-parser.test.js +40 -0
  738. package/node_modules/@ktx/context/dist/ingest/adapters/looker/detect.d.ts +1 -0
  739. package/node_modules/@ktx/context/dist/ingest/adapters/looker/detect.js +26 -0
  740. package/node_modules/@ktx/context/dist/ingest/adapters/looker/detect.test.d.ts +1 -0
  741. package/node_modules/@ktx/context/dist/ingest/adapters/looker/detect.test.js +39 -0
  742. package/node_modules/@ktx/context/dist/ingest/adapters/looker/evidence-documents.d.ts +3 -0
  743. package/node_modules/@ktx/context/dist/ingest/adapters/looker/evidence-documents.js +311 -0
  744. package/node_modules/@ktx/context/dist/ingest/adapters/looker/evidence-documents.test.d.ts +1 -0
  745. package/node_modules/@ktx/context/dist/ingest/adapters/looker/evidence-documents.test.js +178 -0
  746. package/node_modules/@ktx/context/dist/ingest/adapters/looker/factory.d.ts +21 -0
  747. package/node_modules/@ktx/context/dist/ingest/adapters/looker/factory.js +22 -0
  748. package/node_modules/@ktx/context/dist/ingest/adapters/looker/factory.test.d.ts +1 -0
  749. package/node_modules/@ktx/context/dist/ingest/adapters/looker/factory.test.js +55 -0
  750. package/node_modules/@ktx/context/dist/ingest/adapters/looker/fetch-report.d.ts +3 -0
  751. package/node_modules/@ktx/context/dist/ingest/adapters/looker/fetch-report.js +21 -0
  752. package/node_modules/@ktx/context/dist/ingest/adapters/looker/fetch-report.test.d.ts +1 -0
  753. package/node_modules/@ktx/context/dist/ingest/adapters/looker/fetch-report.test.js +71 -0
  754. package/node_modules/@ktx/context/dist/ingest/adapters/looker/fetch.d.ts +31 -0
  755. package/node_modules/@ktx/context/dist/ingest/adapters/looker/fetch.js +395 -0
  756. package/node_modules/@ktx/context/dist/ingest/adapters/looker/fetch.test.d.ts +1 -0
  757. package/node_modules/@ktx/context/dist/ingest/adapters/looker/fetch.test.js +592 -0
  758. package/node_modules/@ktx/context/dist/ingest/adapters/looker/local-looker.adapter.d.ts +11 -0
  759. package/node_modules/@ktx/context/dist/ingest/adapters/looker/local-looker.adapter.js +45 -0
  760. package/node_modules/@ktx/context/dist/ingest/adapters/looker/local-runtime-store.d.ts +50 -0
  761. package/node_modules/@ktx/context/dist/ingest/adapters/looker/local-runtime-store.js +196 -0
  762. package/node_modules/@ktx/context/dist/ingest/adapters/looker/local-runtime-store.test.d.ts +1 -0
  763. package/node_modules/@ktx/context/dist/ingest/adapters/looker/local-runtime-store.test.js +106 -0
  764. package/node_modules/@ktx/context/dist/ingest/adapters/looker/looker.adapter.d.ts +57 -0
  765. package/node_modules/@ktx/context/dist/ingest/adapters/looker/looker.adapter.js +47 -0
  766. package/node_modules/@ktx/context/dist/ingest/adapters/looker/looker.adapter.test.d.ts +1 -0
  767. package/node_modules/@ktx/context/dist/ingest/adapters/looker/looker.adapter.test.js +99 -0
  768. package/node_modules/@ktx/context/dist/ingest/adapters/looker/mapping.d.ts +126 -0
  769. package/node_modules/@ktx/context/dist/ingest/adapters/looker/mapping.js +303 -0
  770. package/node_modules/@ktx/context/dist/ingest/adapters/looker/mapping.test.d.ts +1 -0
  771. package/node_modules/@ktx/context/dist/ingest/adapters/looker/mapping.test.js +334 -0
  772. package/node_modules/@ktx/context/dist/ingest/adapters/looker/reconcile.d.ts +2 -0
  773. package/node_modules/@ktx/context/dist/ingest/adapters/looker/reconcile.js +20 -0
  774. package/node_modules/@ktx/context/dist/ingest/adapters/looker/reconcile.test.d.ts +1 -0
  775. package/node_modules/@ktx/context/dist/ingest/adapters/looker/reconcile.test.js +22 -0
  776. package/node_modules/@ktx/context/dist/ingest/adapters/looker/scope.d.ts +6 -0
  777. package/node_modules/@ktx/context/dist/ingest/adapters/looker/scope.js +55 -0
  778. package/node_modules/@ktx/context/dist/ingest/adapters/looker/scope.test.d.ts +1 -0
  779. package/node_modules/@ktx/context/dist/ingest/adapters/looker/scope.test.js +84 -0
  780. package/node_modules/@ktx/context/dist/ingest/adapters/looker/target-connections.d.ts +1 -0
  781. package/node_modules/@ktx/context/dist/ingest/adapters/looker/target-connections.js +38 -0
  782. package/node_modules/@ktx/context/dist/ingest/adapters/looker/target-connections.test.d.ts +1 -0
  783. package/node_modules/@ktx/context/dist/ingest/adapters/looker/target-connections.test.js +71 -0
  784. package/node_modules/@ktx/context/dist/ingest/adapters/looker/tools/looker-query-to-sl.tool.d.ts +107 -0
  785. package/node_modules/@ktx/context/dist/ingest/adapters/looker/tools/looker-query-to-sl.tool.js +236 -0
  786. package/node_modules/@ktx/context/dist/ingest/adapters/looker/tools/looker-query-to-sl.tool.test.d.ts +1 -0
  787. package/node_modules/@ktx/context/dist/ingest/adapters/looker/tools/looker-query-to-sl.tool.test.js +211 -0
  788. package/node_modules/@ktx/context/dist/ingest/adapters/looker/types.d.ts +438 -0
  789. package/node_modules/@ktx/context/dist/ingest/adapters/looker/types.js +198 -0
  790. package/node_modules/@ktx/context/dist/ingest/adapters/looker/types.test.d.ts +1 -0
  791. package/node_modules/@ktx/context/dist/ingest/adapters/looker/types.test.js +260 -0
  792. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/chunk.d.ts +19 -0
  793. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/chunk.js +128 -0
  794. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/chunk.test.d.ts +1 -0
  795. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/chunk.test.js +213 -0
  796. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/detect.d.ts +1 -0
  797. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/detect.js +11 -0
  798. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/detect.test.d.ts +1 -0
  799. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/detect.test.js +37 -0
  800. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/fetch-report.d.ts +15 -0
  801. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/fetch-report.js +98 -0
  802. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/fetch-report.test.d.ts +1 -0
  803. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/fetch-report.test.js +82 -0
  804. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/fetch.d.ts +15 -0
  805. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/fetch.js +54 -0
  806. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/fetch.test.d.ts +1 -0
  807. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/fetch.test.js +121 -0
  808. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/graph.d.ts +16 -0
  809. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/graph.js +85 -0
  810. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/graph.test.d.ts +1 -0
  811. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/graph.test.js +105 -0
  812. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/lookml.adapter.d.ts +17 -0
  813. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/lookml.adapter.js +44 -0
  814. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/lookml.adapter.test.d.ts +1 -0
  815. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/lookml.adapter.test.js +49 -0
  816. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/parse.d.ts +35 -0
  817. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/parse.js +149 -0
  818. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/parse.test.d.ts +1 -0
  819. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/parse.test.js +118 -0
  820. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/pull-config.d.ts +37 -0
  821. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/pull-config.js +26 -0
  822. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/pull-config.test.d.ts +1 -0
  823. package/node_modules/@ktx/context/dist/ingest/adapters/lookml/pull-config.test.js +128 -0
  824. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/card-references.d.ts +13 -0
  825. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/card-references.js +37 -0
  826. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/card-references.test.d.ts +1 -0
  827. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/card-references.test.js +36 -0
  828. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/chunk.d.ts +6 -0
  829. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/chunk.js +208 -0
  830. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/chunk.test.d.ts +1 -0
  831. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/chunk.test.js +299 -0
  832. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/client-boundary.test.d.ts +1 -0
  833. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/client-boundary.test.js +38 -0
  834. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/client-port.d.ts +167 -0
  835. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/client-port.js +9 -0
  836. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/client-port.test.d.ts +1 -0
  837. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/client-port.test.js +86 -0
  838. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/client.d.ts +114 -0
  839. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/client.js +671 -0
  840. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/client.test.d.ts +1 -0
  841. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/client.test.js +377 -0
  842. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/detect.d.ts +1 -0
  843. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/detect.js +20 -0
  844. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/detect.test.d.ts +1 -0
  845. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/detect.test.js +42 -0
  846. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fanout-planner.d.ts +17 -0
  847. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fanout-planner.js +23 -0
  848. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fanout-planner.test.d.ts +1 -0
  849. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fanout-planner.test.js +44 -0
  850. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fetch-scope.d.ts +31 -0
  851. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fetch-scope.js +72 -0
  852. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fetch-scope.test.d.ts +1 -0
  853. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fetch-scope.test.js +124 -0
  854. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fetch.d.ts +16 -0
  855. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fetch.js +239 -0
  856. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fetch.test.d.ts +1 -0
  857. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/fetch.test.js +516 -0
  858. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/local-metabase.adapter.d.ts +13 -0
  859. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/local-metabase.adapter.js +41 -0
  860. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/local-metabase.adapter.test.d.ts +1 -0
  861. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/local-metabase.adapter.test.js +56 -0
  862. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/local-source-state-store.d.ts +43 -0
  863. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/local-source-state-store.js +176 -0
  864. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/local-source-state-store.test.d.ts +1 -0
  865. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/local-source-state-store.test.js +99 -0
  866. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/mapping.d.ts +92 -0
  867. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/mapping.js +220 -0
  868. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/mapping.test.d.ts +1 -0
  869. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/mapping.test.js +215 -0
  870. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/metabase.adapter.d.ts +19 -0
  871. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/metabase.adapter.js +41 -0
  872. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/metabase.adapter.test.d.ts +1 -0
  873. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/metabase.adapter.test.js +129 -0
  874. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/serialize-card.d.ts +53 -0
  875. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/serialize-card.js +67 -0
  876. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/serialize-card.test.d.ts +1 -0
  877. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/serialize-card.test.js +205 -0
  878. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/source-state-port.d.ts +23 -0
  879. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/source-state-port.js +1 -0
  880. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/types.d.ts +142 -0
  881. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/types.js +106 -0
  882. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/types.test.d.ts +1 -0
  883. package/node_modules/@ktx/context/dist/ingest/adapters/metabase/types.test.js +75 -0
  884. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/chunk.d.ts +19 -0
  885. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/chunk.js +81 -0
  886. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/chunk.test.d.ts +1 -0
  887. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/chunk.test.js +114 -0
  888. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/deep-parse.d.ts +77 -0
  889. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/deep-parse.js +460 -0
  890. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/deep-parse.test.d.ts +1 -0
  891. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/deep-parse.test.js +1139 -0
  892. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/detect.d.ts +1 -0
  893. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/detect.js +34 -0
  894. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/detect.test.d.ts +1 -0
  895. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/detect.test.js +43 -0
  896. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/fetch.d.ts +11 -0
  897. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/fetch.js +51 -0
  898. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/fetch.test.d.ts +1 -0
  899. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/fetch.test.js +97 -0
  900. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/graph.d.ts +25 -0
  901. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/graph.js +163 -0
  902. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/graph.test.d.ts +1 -0
  903. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/graph.test.js +245 -0
  904. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/import-semantic-models.d.ts +29 -0
  905. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/import-semantic-models.js +136 -0
  906. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/import-semantic-models.test.d.ts +1 -0
  907. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/import-semantic-models.test.js +318 -0
  908. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/metricflow.adapter.d.ts +16 -0
  909. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/metricflow.adapter.js +44 -0
  910. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/metricflow.adapter.test.d.ts +1 -0
  911. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/metricflow.adapter.test.js +97 -0
  912. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/parse.d.ts +42 -0
  913. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/parse.js +150 -0
  914. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/parse.test.d.ts +1 -0
  915. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/parse.test.js +171 -0
  916. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/pull-config.d.ts +37 -0
  917. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/pull-config.js +24 -0
  918. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/pull-config.test.d.ts +1 -0
  919. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/pull-config.test.js +57 -0
  920. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/semantic-models.d.ts +39 -0
  921. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/semantic-models.js +278 -0
  922. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/semantic-models.test.d.ts +1 -0
  923. package/node_modules/@ktx/context/dist/ingest/adapters/metricflow/semantic-models.test.js +204 -0
  924. package/node_modules/@ktx/context/dist/ingest/adapters/notion/chunk.d.ts +4 -0
  925. package/node_modules/@ktx/context/dist/ingest/adapters/notion/chunk.js +137 -0
  926. package/node_modules/@ktx/context/dist/ingest/adapters/notion/cluster.d.ts +10 -0
  927. package/node_modules/@ktx/context/dist/ingest/adapters/notion/cluster.js +82 -0
  928. package/node_modules/@ktx/context/dist/ingest/adapters/notion/cluster.test.d.ts +1 -0
  929. package/node_modules/@ktx/context/dist/ingest/adapters/notion/cluster.test.js +123 -0
  930. package/node_modules/@ktx/context/dist/ingest/adapters/notion/detect.d.ts +1 -0
  931. package/node_modules/@ktx/context/dist/ingest/adapters/notion/detect.js +20 -0
  932. package/node_modules/@ktx/context/dist/ingest/adapters/notion/fetch.d.ts +13 -0
  933. package/node_modules/@ktx/context/dist/ingest/adapters/notion/fetch.js +517 -0
  934. package/node_modules/@ktx/context/dist/ingest/adapters/notion/fetch.test.d.ts +1 -0
  935. package/node_modules/@ktx/context/dist/ingest/adapters/notion/fetch.test.js +358 -0
  936. package/node_modules/@ktx/context/dist/ingest/adapters/notion/local-state-store.d.ts +12 -0
  937. package/node_modules/@ktx/context/dist/ingest/adapters/notion/local-state-store.js +46 -0
  938. package/node_modules/@ktx/context/dist/ingest/adapters/notion/local-state-store.test.d.ts +1 -0
  939. package/node_modules/@ktx/context/dist/ingest/adapters/notion/local-state-store.test.js +29 -0
  940. package/node_modules/@ktx/context/dist/ingest/adapters/notion/normalize.d.ts +10 -0
  941. package/node_modules/@ktx/context/dist/ingest/adapters/notion/normalize.js +165 -0
  942. package/node_modules/@ktx/context/dist/ingest/adapters/notion/normalize.test.d.ts +1 -0
  943. package/node_modules/@ktx/context/dist/ingest/adapters/notion/normalize.test.js +64 -0
  944. package/node_modules/@ktx/context/dist/ingest/adapters/notion/notion-client.d.ts +74 -0
  945. package/node_modules/@ktx/context/dist/ingest/adapters/notion/notion-client.js +107 -0
  946. package/node_modules/@ktx/context/dist/ingest/adapters/notion/notion-client.test.d.ts +1 -0
  947. package/node_modules/@ktx/context/dist/ingest/adapters/notion/notion-client.test.js +49 -0
  948. package/node_modules/@ktx/context/dist/ingest/adapters/notion/notion.adapter.d.ts +46 -0
  949. package/node_modules/@ktx/context/dist/ingest/adapters/notion/notion.adapter.js +119 -0
  950. package/node_modules/@ktx/context/dist/ingest/adapters/notion/notion.adapter.test.d.ts +1 -0
  951. package/node_modules/@ktx/context/dist/ingest/adapters/notion/notion.adapter.test.js +315 -0
  952. package/node_modules/@ktx/context/dist/ingest/adapters/notion/pull-config.d.ts +2 -0
  953. package/node_modules/@ktx/context/dist/ingest/adapters/notion/pull-config.js +4 -0
  954. package/node_modules/@ktx/context/dist/ingest/adapters/notion/types.d.ts +97 -0
  955. package/node_modules/@ktx/context/dist/ingest/adapters/notion/types.js +62 -0
  956. package/node_modules/@ktx/context/dist/ingest/canonical-pins.d.ts +10 -0
  957. package/node_modules/@ktx/context/dist/ingest/canonical-pins.js +43 -0
  958. package/node_modules/@ktx/context/dist/ingest/canonical-pins.test.d.ts +1 -0
  959. package/node_modules/@ktx/context/dist/ingest/canonical-pins.test.js +66 -0
  960. package/node_modules/@ktx/context/dist/ingest/clustering/kmeans.d.ts +11 -0
  961. package/node_modules/@ktx/context/dist/ingest/clustering/kmeans.js +101 -0
  962. package/node_modules/@ktx/context/dist/ingest/clustering/kmeans.test.d.ts +1 -0
  963. package/node_modules/@ktx/context/dist/ingest/clustering/kmeans.test.js +61 -0
  964. package/node_modules/@ktx/context/dist/ingest/context-candidates/candidate-dedup.service.d.ts +27 -0
  965. package/node_modules/@ktx/context/dist/ingest/context-candidates/candidate-dedup.service.js +234 -0
  966. package/node_modules/@ktx/context/dist/ingest/context-candidates/candidate-dedup.service.test.d.ts +1 -0
  967. package/node_modules/@ktx/context/dist/ingest/context-candidates/candidate-dedup.service.test.js +216 -0
  968. package/node_modules/@ktx/context/dist/ingest/context-candidates/context-candidate-carryforward.service.d.ts +31 -0
  969. package/node_modules/@ktx/context/dist/ingest/context-candidates/context-candidate-carryforward.service.js +131 -0
  970. package/node_modules/@ktx/context/dist/ingest/context-candidates/context-candidate-carryforward.service.test.d.ts +1 -0
  971. package/node_modules/@ktx/context/dist/ingest/context-candidates/context-candidate-carryforward.service.test.js +161 -0
  972. package/node_modules/@ktx/context/dist/ingest/context-candidates/curator-pagination.service.d.ts +64 -0
  973. package/node_modules/@ktx/context/dist/ingest/context-candidates/curator-pagination.service.js +240 -0
  974. package/node_modules/@ktx/context/dist/ingest/context-candidates/curator-pagination.service.test.d.ts +1 -0
  975. package/node_modules/@ktx/context/dist/ingest/context-candidates/curator-pagination.service.test.js +168 -0
  976. package/node_modules/@ktx/context/dist/ingest/context-candidates/embedding-text.d.ts +6 -0
  977. package/node_modules/@ktx/context/dist/ingest/context-candidates/embedding-text.js +3 -0
  978. package/node_modules/@ktx/context/dist/ingest/context-candidates/embedding-text.test.d.ts +1 -0
  979. package/node_modules/@ktx/context/dist/ingest/context-candidates/embedding-text.test.js +10 -0
  980. package/node_modules/@ktx/context/dist/ingest/context-candidates/index.d.ts +9 -0
  981. package/node_modules/@ktx/context/dist/ingest/context-candidates/index.js +4 -0
  982. package/node_modules/@ktx/context/dist/ingest/context-candidates/store.d.ts +24 -0
  983. package/node_modules/@ktx/context/dist/ingest/context-candidates/store.js +1 -0
  984. package/node_modules/@ktx/context/dist/ingest/context-candidates/store.test.d.ts +1 -0
  985. package/node_modules/@ktx/context/dist/ingest/context-candidates/store.test.js +67 -0
  986. package/node_modules/@ktx/context/dist/ingest/context-candidates/types.d.ts +103 -0
  987. package/node_modules/@ktx/context/dist/ingest/context-candidates/types.js +1 -0
  988. package/node_modules/@ktx/context/dist/ingest/context-evidence/context-evidence-index.service.d.ts +53 -0
  989. package/node_modules/@ktx/context/dist/ingest/context-evidence/context-evidence-index.service.js +303 -0
  990. package/node_modules/@ktx/context/dist/ingest/context-evidence/context-evidence-index.service.test.d.ts +1 -0
  991. package/node_modules/@ktx/context/dist/ingest/context-evidence/context-evidence-index.service.test.js +374 -0
  992. package/node_modules/@ktx/context/dist/ingest/context-evidence/index.d.ts +5 -0
  993. package/node_modules/@ktx/context/dist/ingest/context-evidence/index.js +2 -0
  994. package/node_modules/@ktx/context/dist/ingest/context-evidence/sqlite-context-evidence-store.d.ts +89 -0
  995. package/node_modules/@ktx/context/dist/ingest/context-evidence/sqlite-context-evidence-store.js +1025 -0
  996. package/node_modules/@ktx/context/dist/ingest/context-evidence/sqlite-context-evidence-store.test.d.ts +1 -0
  997. package/node_modules/@ktx/context/dist/ingest/context-evidence/sqlite-context-evidence-store.test.js +416 -0
  998. package/node_modules/@ktx/context/dist/ingest/context-evidence/store.d.ts +10 -0
  999. package/node_modules/@ktx/context/dist/ingest/context-evidence/store.js +1 -0
  1000. package/node_modules/@ktx/context/dist/ingest/context-evidence/store.test.d.ts +1 -0
  1001. package/node_modules/@ktx/context/dist/ingest/context-evidence/store.test.js +55 -0
  1002. package/node_modules/@ktx/context/dist/ingest/context-evidence/types.d.ts +49 -0
  1003. package/node_modules/@ktx/context/dist/ingest/context-evidence/types.js +1 -0
  1004. package/node_modules/@ktx/context/dist/ingest/dbt-shared/project-vars.d.ts +12 -0
  1005. package/node_modules/@ktx/context/dist/ingest/dbt-shared/project-vars.js +86 -0
  1006. package/node_modules/@ktx/context/dist/ingest/dbt-shared/project-vars.test.d.ts +1 -0
  1007. package/node_modules/@ktx/context/dist/ingest/dbt-shared/project-vars.test.js +90 -0
  1008. package/node_modules/@ktx/context/dist/ingest/dbt-shared/schema-files.d.ts +3 -0
  1009. package/node_modules/@ktx/context/dist/ingest/dbt-shared/schema-files.js +62 -0
  1010. package/node_modules/@ktx/context/dist/ingest/dbt-shared/schema-files.test.d.ts +1 -0
  1011. package/node_modules/@ktx/context/dist/ingest/dbt-shared/schema-files.test.js +35 -0
  1012. package/node_modules/@ktx/context/dist/ingest/diff-set.service.d.ts +8 -0
  1013. package/node_modules/@ktx/context/dist/ingest/diff-set.service.js +41 -0
  1014. package/node_modules/@ktx/context/dist/ingest/diff-set.service.test.d.ts +1 -0
  1015. package/node_modules/@ktx/context/dist/ingest/diff-set.service.test.js +132 -0
  1016. package/node_modules/@ktx/context/dist/ingest/git-env.d.ts +2 -0
  1017. package/node_modules/@ktx/context/dist/ingest/git-env.js +33 -0
  1018. package/node_modules/@ktx/context/dist/ingest/index.d.ts +148 -0
  1019. package/node_modules/@ktx/context/dist/ingest/index.js +93 -0
  1020. package/node_modules/@ktx/context/dist/ingest/ingest-bundle.runner.d.ts +38 -0
  1021. package/node_modules/@ktx/context/dist/ingest/ingest-bundle.runner.js +1263 -0
  1022. package/node_modules/@ktx/context/dist/ingest/ingest-bundle.runner.test.d.ts +1 -0
  1023. package/node_modules/@ktx/context/dist/ingest/ingest-bundle.runner.test.js +1727 -0
  1024. package/node_modules/@ktx/context/dist/ingest/ingest-prompts.test.d.ts +1 -0
  1025. package/node_modules/@ktx/context/dist/ingest/ingest-prompts.test.js +32 -0
  1026. package/node_modules/@ktx/context/dist/ingest/ingest-runtime-assets.test.d.ts +1 -0
  1027. package/node_modules/@ktx/context/dist/ingest/ingest-runtime-assets.test.js +89 -0
  1028. package/node_modules/@ktx/context/dist/ingest/local-adapters.d.ts +35 -0
  1029. package/node_modules/@ktx/context/dist/ingest/local-adapters.js +247 -0
  1030. package/node_modules/@ktx/context/dist/ingest/local-adapters.test.d.ts +1 -0
  1031. package/node_modules/@ktx/context/dist/ingest/local-adapters.test.js +625 -0
  1032. package/node_modules/@ktx/context/dist/ingest/local-bundle-ingest.test.d.ts +1 -0
  1033. package/node_modules/@ktx/context/dist/ingest/local-bundle-ingest.test.js +768 -0
  1034. package/node_modules/@ktx/context/dist/ingest/local-bundle-runtime.d.ts +32 -0
  1035. package/node_modules/@ktx/context/dist/ingest/local-bundle-runtime.js +558 -0
  1036. package/node_modules/@ktx/context/dist/ingest/local-bundle-runtime.test.d.ts +1 -0
  1037. package/node_modules/@ktx/context/dist/ingest/local-bundle-runtime.test.js +160 -0
  1038. package/node_modules/@ktx/context/dist/ingest/local-embedding-provider.integration.test.d.ts +1 -0
  1039. package/node_modules/@ktx/context/dist/ingest/local-embedding-provider.integration.test.js +140 -0
  1040. package/node_modules/@ktx/context/dist/ingest/local-ingest.d.ts +86 -0
  1041. package/node_modules/@ktx/context/dist/ingest/local-ingest.js +302 -0
  1042. package/node_modules/@ktx/context/dist/ingest/local-mapping-reconcile.d.ts +2 -0
  1043. package/node_modules/@ktx/context/dist/ingest/local-mapping-reconcile.js +26 -0
  1044. package/node_modules/@ktx/context/dist/ingest/local-mapping-reconcile.test.d.ts +1 -0
  1045. package/node_modules/@ktx/context/dist/ingest/local-mapping-reconcile.test.js +61 -0
  1046. package/node_modules/@ktx/context/dist/ingest/local-metabase-ingest.test.d.ts +1 -0
  1047. package/node_modules/@ktx/context/dist/ingest/local-metabase-ingest.test.js +227 -0
  1048. package/node_modules/@ktx/context/dist/ingest/local-stage-ingest.d.ts +53 -0
  1049. package/node_modules/@ktx/context/dist/ingest/local-stage-ingest.js +280 -0
  1050. package/node_modules/@ktx/context/dist/ingest/local-stage-ingest.test.d.ts +1 -0
  1051. package/node_modules/@ktx/context/dist/ingest/local-stage-ingest.test.js +552 -0
  1052. package/node_modules/@ktx/context/dist/ingest/memory-flow/acceptance-fixtures.d.ts +6 -0
  1053. package/node_modules/@ktx/context/dist/ingest/memory-flow/acceptance-fixtures.js +155 -0
  1054. package/node_modules/@ktx/context/dist/ingest/memory-flow/acceptance.test.d.ts +1 -0
  1055. package/node_modules/@ktx/context/dist/ingest/memory-flow/acceptance.test.js +43 -0
  1056. package/node_modules/@ktx/context/dist/ingest/memory-flow/events.d.ts +9 -0
  1057. package/node_modules/@ktx/context/dist/ingest/memory-flow/events.js +196 -0
  1058. package/node_modules/@ktx/context/dist/ingest/memory-flow/events.test.d.ts +1 -0
  1059. package/node_modules/@ktx/context/dist/ingest/memory-flow/events.test.js +319 -0
  1060. package/node_modules/@ktx/context/dist/ingest/memory-flow/index.d.ts +6 -0
  1061. package/node_modules/@ktx/context/dist/ingest/memory-flow/index.js +4 -0
  1062. package/node_modules/@ktx/context/dist/ingest/memory-flow/interaction.d.ts +9 -0
  1063. package/node_modules/@ktx/context/dist/ingest/memory-flow/interaction.js +315 -0
  1064. package/node_modules/@ktx/context/dist/ingest/memory-flow/interaction.test.d.ts +1 -0
  1065. package/node_modules/@ktx/context/dist/ingest/memory-flow/interaction.test.js +264 -0
  1066. package/node_modules/@ktx/context/dist/ingest/memory-flow/interactive-render.d.ts +2 -0
  1067. package/node_modules/@ktx/context/dist/ingest/memory-flow/interactive-render.js +121 -0
  1068. package/node_modules/@ktx/context/dist/ingest/memory-flow/interactive-render.test.d.ts +1 -0
  1069. package/node_modules/@ktx/context/dist/ingest/memory-flow/interactive-render.test.js +160 -0
  1070. package/node_modules/@ktx/context/dist/ingest/memory-flow/known-errors.d.ts +7 -0
  1071. package/node_modules/@ktx/context/dist/ingest/memory-flow/known-errors.js +17 -0
  1072. package/node_modules/@ktx/context/dist/ingest/memory-flow/live-buffer.d.ts +3 -0
  1073. package/node_modules/@ktx/context/dist/ingest/memory-flow/live-buffer.js +53 -0
  1074. package/node_modules/@ktx/context/dist/ingest/memory-flow/live-buffer.test.d.ts +1 -0
  1075. package/node_modules/@ktx/context/dist/ingest/memory-flow/live-buffer.test.js +77 -0
  1076. package/node_modules/@ktx/context/dist/ingest/memory-flow/package-export.test.d.ts +1 -0
  1077. package/node_modules/@ktx/context/dist/ingest/memory-flow/package-export.test.js +9 -0
  1078. package/node_modules/@ktx/context/dist/ingest/memory-flow/render.d.ts +2 -0
  1079. package/node_modules/@ktx/context/dist/ingest/memory-flow/render.js +84 -0
  1080. package/node_modules/@ktx/context/dist/ingest/memory-flow/render.test.d.ts +1 -0
  1081. package/node_modules/@ktx/context/dist/ingest/memory-flow/render.test.js +105 -0
  1082. package/node_modules/@ktx/context/dist/ingest/memory-flow/schema.d.ts +190 -0
  1083. package/node_modules/@ktx/context/dist/ingest/memory-flow/schema.js +155 -0
  1084. package/node_modules/@ktx/context/dist/ingest/memory-flow/schema.test.d.ts +1 -0
  1085. package/node_modules/@ktx/context/dist/ingest/memory-flow/schema.test.js +146 -0
  1086. package/node_modules/@ktx/context/dist/ingest/memory-flow/summary.d.ts +2 -0
  1087. package/node_modules/@ktx/context/dist/ingest/memory-flow/summary.js +88 -0
  1088. package/node_modules/@ktx/context/dist/ingest/memory-flow/summary.test.d.ts +1 -0
  1089. package/node_modules/@ktx/context/dist/ingest/memory-flow/summary.test.js +130 -0
  1090. package/node_modules/@ktx/context/dist/ingest/memory-flow/types.d.ts +207 -0
  1091. package/node_modules/@ktx/context/dist/ingest/memory-flow/types.js +1 -0
  1092. package/node_modules/@ktx/context/dist/ingest/memory-flow/view-model.d.ts +2 -0
  1093. package/node_modules/@ktx/context/dist/ingest/memory-flow/view-model.js +450 -0
  1094. package/node_modules/@ktx/context/dist/ingest/memory-flow/view-model.test.d.ts +1 -0
  1095. package/node_modules/@ktx/context/dist/ingest/memory-flow/view-model.test.js +397 -0
  1096. package/node_modules/@ktx/context/dist/ingest/memory-flow/visuals.d.ts +20 -0
  1097. package/node_modules/@ktx/context/dist/ingest/memory-flow/visuals.js +44 -0
  1098. package/node_modules/@ktx/context/dist/ingest/memory-flow/visuals.test.d.ts +1 -0
  1099. package/node_modules/@ktx/context/dist/ingest/memory-flow/visuals.test.js +49 -0
  1100. package/node_modules/@ktx/context/dist/ingest/metabase-mapping.d.ts +2 -0
  1101. package/node_modules/@ktx/context/dist/ingest/metabase-mapping.js +1 -0
  1102. package/node_modules/@ktx/context/dist/ingest/page-triage/index.d.ts +2 -0
  1103. package/node_modules/@ktx/context/dist/ingest/page-triage/index.js +1 -0
  1104. package/node_modules/@ktx/context/dist/ingest/page-triage/page-triage.service.d.ts +84 -0
  1105. package/node_modules/@ktx/context/dist/ingest/page-triage/page-triage.service.js +318 -0
  1106. package/node_modules/@ktx/context/dist/ingest/page-triage/page-triage.service.test.d.ts +1 -0
  1107. package/node_modules/@ktx/context/dist/ingest/page-triage/page-triage.service.test.js +311 -0
  1108. package/node_modules/@ktx/context/dist/ingest/parsed-target-table.d.ts +21 -0
  1109. package/node_modules/@ktx/context/dist/ingest/parsed-target-table.js +24 -0
  1110. package/node_modules/@ktx/context/dist/ingest/ports.d.ts +339 -0
  1111. package/node_modules/@ktx/context/dist/ingest/ports.js +1 -0
  1112. package/node_modules/@ktx/context/dist/ingest/raw-sources-paths.d.ts +4 -0
  1113. package/node_modules/@ktx/context/dist/ingest/raw-sources-paths.js +16 -0
  1114. package/node_modules/@ktx/context/dist/ingest/raw-sources-paths.test.d.ts +1 -0
  1115. package/node_modules/@ktx/context/dist/ingest/raw-sources-paths.test.js +18 -0
  1116. package/node_modules/@ktx/context/dist/ingest/repo-fetch.d.ts +34 -0
  1117. package/node_modules/@ktx/context/dist/ingest/repo-fetch.js +132 -0
  1118. package/node_modules/@ktx/context/dist/ingest/repo-fetch.test.d.ts +1 -0
  1119. package/node_modules/@ktx/context/dist/ingest/repo-fetch.test.js +168 -0
  1120. package/node_modules/@ktx/context/dist/ingest/report-snapshot.d.ts +202 -0
  1121. package/node_modules/@ktx/context/dist/ingest/report-snapshot.js +160 -0
  1122. package/node_modules/@ktx/context/dist/ingest/report-snapshot.test.d.ts +1 -0
  1123. package/node_modules/@ktx/context/dist/ingest/report-snapshot.test.js +205 -0
  1124. package/node_modules/@ktx/context/dist/ingest/reports.d.ts +79 -0
  1125. package/node_modules/@ktx/context/dist/ingest/reports.js +54 -0
  1126. package/node_modules/@ktx/context/dist/ingest/source-adapter-registry.d.ts +8 -0
  1127. package/node_modules/@ktx/context/dist/ingest/source-adapter-registry.js +23 -0
  1128. package/node_modules/@ktx/context/dist/ingest/source-adapter-registry.test.d.ts +1 -0
  1129. package/node_modules/@ktx/context/dist/ingest/source-adapter-registry.test.js +35 -0
  1130. package/node_modules/@ktx/context/dist/ingest/sqlite-bundle-ingest-store.d.ts +38 -0
  1131. package/node_modules/@ktx/context/dist/ingest/sqlite-bundle-ingest-store.js +501 -0
  1132. package/node_modules/@ktx/context/dist/ingest/sqlite-bundle-ingest-store.test.d.ts +1 -0
  1133. package/node_modules/@ktx/context/dist/ingest/sqlite-bundle-ingest-store.test.js +517 -0
  1134. package/node_modules/@ktx/context/dist/ingest/sqlite-local-ingest-store.d.ts +19 -0
  1135. package/node_modules/@ktx/context/dist/ingest/sqlite-local-ingest-store.js +190 -0
  1136. package/node_modules/@ktx/context/dist/ingest/sqlite-local-ingest-store.test.d.ts +1 -0
  1137. package/node_modules/@ktx/context/dist/ingest/sqlite-local-ingest-store.test.js +143 -0
  1138. package/node_modules/@ktx/context/dist/ingest/stages/build-reconcile-context.context-candidates.test.d.ts +1 -0
  1139. package/node_modules/@ktx/context/dist/ingest/stages/build-reconcile-context.context-candidates.test.js +102 -0
  1140. package/node_modules/@ktx/context/dist/ingest/stages/build-reconcile-context.d.ts +61 -0
  1141. package/node_modules/@ktx/context/dist/ingest/stages/build-reconcile-context.js +122 -0
  1142. package/node_modules/@ktx/context/dist/ingest/stages/build-reconcile-context.test.d.ts +1 -0
  1143. package/node_modules/@ktx/context/dist/ingest/stages/build-reconcile-context.test.js +141 -0
  1144. package/node_modules/@ktx/context/dist/ingest/stages/build-wu-context.d.ts +27 -0
  1145. package/node_modules/@ktx/context/dist/ingest/stages/build-wu-context.js +87 -0
  1146. package/node_modules/@ktx/context/dist/ingest/stages/build-wu-context.test.d.ts +1 -0
  1147. package/node_modules/@ktx/context/dist/ingest/stages/build-wu-context.test.js +196 -0
  1148. package/node_modules/@ktx/context/dist/ingest/stages/stage-1-stage-raw-files.d.ts +13 -0
  1149. package/node_modules/@ktx/context/dist/ingest/stages/stage-1-stage-raw-files.js +24 -0
  1150. package/node_modules/@ktx/context/dist/ingest/stages/stage-1-stage-raw-files.test.d.ts +1 -0
  1151. package/node_modules/@ktx/context/dist/ingest/stages/stage-1-stage-raw-files.test.js +54 -0
  1152. package/node_modules/@ktx/context/dist/ingest/stages/stage-3-work-units.d.ts +44 -0
  1153. package/node_modules/@ktx/context/dist/ingest/stages/stage-3-work-units.js +104 -0
  1154. package/node_modules/@ktx/context/dist/ingest/stages/stage-3-work-units.test.d.ts +1 -0
  1155. package/node_modules/@ktx/context/dist/ingest/stages/stage-3-work-units.test.js +146 -0
  1156. package/node_modules/@ktx/context/dist/ingest/stages/stage-4-reconciliation.d.ts +28 -0
  1157. package/node_modules/@ktx/context/dist/ingest/stages/stage-4-reconciliation.js +17 -0
  1158. package/node_modules/@ktx/context/dist/ingest/stages/stage-4-reconciliation.test.d.ts +1 -0
  1159. package/node_modules/@ktx/context/dist/ingest/stages/stage-4-reconciliation.test.js +144 -0
  1160. package/node_modules/@ktx/context/dist/ingest/stages/stage-index.types.d.ts +50 -0
  1161. package/node_modules/@ktx/context/dist/ingest/stages/stage-index.types.js +1 -0
  1162. package/node_modules/@ktx/context/dist/ingest/stages/validate-wu-sources.d.ts +9 -0
  1163. package/node_modules/@ktx/context/dist/ingest/stages/validate-wu-sources.js +14 -0
  1164. package/node_modules/@ktx/context/dist/ingest/stages/validate-wu-sources.test.d.ts +1 -0
  1165. package/node_modules/@ktx/context/dist/ingest/stages/validate-wu-sources.test.js +27 -0
  1166. package/node_modules/@ktx/context/dist/ingest/tools/emit-artifact-resolution.tool.d.ts +13 -0
  1167. package/node_modules/@ktx/context/dist/ingest/tools/emit-artifact-resolution.tool.js +40 -0
  1168. package/node_modules/@ktx/context/dist/ingest/tools/emit-conflict-resolution.tool.d.ts +13 -0
  1169. package/node_modules/@ktx/context/dist/ingest/tools/emit-conflict-resolution.tool.js +31 -0
  1170. package/node_modules/@ktx/context/dist/ingest/tools/emit-eviction-decision.tool.d.ts +13 -0
  1171. package/node_modules/@ktx/context/dist/ingest/tools/emit-eviction-decision.tool.js +38 -0
  1172. package/node_modules/@ktx/context/dist/ingest/tools/emit-reconciliation-records.tool.test.d.ts +1 -0
  1173. package/node_modules/@ktx/context/dist/ingest/tools/emit-reconciliation-records.tool.test.js +237 -0
  1174. package/node_modules/@ktx/context/dist/ingest/tools/emit-unmapped-fallback.tool.d.ts +14 -0
  1175. package/node_modules/@ktx/context/dist/ingest/tools/emit-unmapped-fallback.tool.js +91 -0
  1176. package/node_modules/@ktx/context/dist/ingest/tools/eviction-list.tool.d.ts +8 -0
  1177. package/node_modules/@ktx/context/dist/ingest/tools/eviction-list.tool.js +25 -0
  1178. package/node_modules/@ktx/context/dist/ingest/tools/eviction-list.tool.test.d.ts +1 -0
  1179. package/node_modules/@ktx/context/dist/ingest/tools/eviction-list.tool.test.js +44 -0
  1180. package/node_modules/@ktx/context/dist/ingest/tools/read-raw-file.tool.d.ts +8 -0
  1181. package/node_modules/@ktx/context/dist/ingest/tools/read-raw-file.tool.js +34 -0
  1182. package/node_modules/@ktx/context/dist/ingest/tools/read-raw-file.tool.test.d.ts +1 -0
  1183. package/node_modules/@ktx/context/dist/ingest/tools/read-raw-file.tool.test.js +45 -0
  1184. package/node_modules/@ktx/context/dist/ingest/tools/read-raw-span.tool.d.ts +10 -0
  1185. package/node_modules/@ktx/context/dist/ingest/tools/read-raw-span.tool.js +40 -0
  1186. package/node_modules/@ktx/context/dist/ingest/tools/read-raw-span.tool.test.d.ts +1 -0
  1187. package/node_modules/@ktx/context/dist/ingest/tools/read-raw-span.tool.test.js +34 -0
  1188. package/node_modules/@ktx/context/dist/ingest/tools/stage-diff.tool.d.ts +8 -0
  1189. package/node_modules/@ktx/context/dist/ingest/tools/stage-diff.tool.js +37 -0
  1190. package/node_modules/@ktx/context/dist/ingest/tools/stage-diff.tool.test.d.ts +1 -0
  1191. package/node_modules/@ktx/context/dist/ingest/tools/stage-diff.tool.test.js +112 -0
  1192. package/node_modules/@ktx/context/dist/ingest/tools/stage-list.tool.d.ts +5 -0
  1193. package/node_modules/@ktx/context/dist/ingest/tools/stage-list.tool.js +32 -0
  1194. package/node_modules/@ktx/context/dist/ingest/tools/stage-list.tool.test.d.ts +1 -0
  1195. package/node_modules/@ktx/context/dist/ingest/tools/stage-list.tool.test.js +58 -0
  1196. package/node_modules/@ktx/context/dist/ingest/tools/tool-call-logger.d.ts +33 -0
  1197. package/node_modules/@ktx/context/dist/ingest/tools/tool-call-logger.js +80 -0
  1198. package/node_modules/@ktx/context/dist/ingest/tools/tool-transcript-summary.d.ts +13 -0
  1199. package/node_modules/@ktx/context/dist/ingest/tools/tool-transcript-summary.js +150 -0
  1200. package/node_modules/@ktx/context/dist/ingest/tools/tool-transcript-summary.test.d.ts +1 -0
  1201. package/node_modules/@ktx/context/dist/ingest/tools/tool-transcript-summary.test.js +141 -0
  1202. package/node_modules/@ktx/context/dist/ingest/tools/verification-ledger.tool.d.ts +14 -0
  1203. package/node_modules/@ktx/context/dist/ingest/tools/verification-ledger.tool.js +71 -0
  1204. package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/discover-data.tool.d.ts +36 -0
  1205. package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/discover-data.tool.js +94 -0
  1206. package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/discover-data.tool.test.d.ts +1 -0
  1207. package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/discover-data.tool.test.js +107 -0
  1208. package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/entity-details.tool.d.ts +43 -0
  1209. package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/entity-details.tool.js +137 -0
  1210. package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/entity-details.tool.test.d.ts +1 -0
  1211. package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/entity-details.tool.test.js +146 -0
  1212. package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/index.d.ts +9 -0
  1213. package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/index.js +18 -0
  1214. package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/sql-execution.tool.d.ts +31 -0
  1215. package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/sql-execution.tool.js +84 -0
  1216. package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/sql-execution.tool.test.d.ts +1 -0
  1217. package/node_modules/@ktx/context/dist/ingest/tools/warehouse-verification/sql-execution.tool.test.js +50 -0
  1218. package/node_modules/@ktx/context/dist/ingest/types.d.ts +144 -0
  1219. package/node_modules/@ktx/context/dist/ingest/types.js +1 -0
  1220. package/node_modules/@ktx/context/dist/ingest/wiki-sl-ref-repair.d.ts +19 -0
  1221. package/node_modules/@ktx/context/dist/ingest/wiki-sl-ref-repair.js +89 -0
  1222. package/node_modules/@ktx/context/dist/ingest/wiki-sl-ref-repair.test.d.ts +1 -0
  1223. package/node_modules/@ktx/context/dist/ingest/wiki-sl-ref-repair.test.js +81 -0
  1224. package/node_modules/@ktx/context/dist/llm/ai-sdk-runtime.d.ts +23 -0
  1225. package/node_modules/@ktx/context/dist/llm/ai-sdk-runtime.js +133 -0
  1226. package/node_modules/@ktx/context/dist/llm/claude-code-env.d.ts +2 -0
  1227. package/node_modules/@ktx/context/dist/llm/claude-code-env.js +21 -0
  1228. package/node_modules/@ktx/context/dist/llm/claude-code-env.test.d.ts +1 -0
  1229. package/node_modules/@ktx/context/dist/llm/claude-code-env.test.js +17 -0
  1230. package/node_modules/@ktx/context/dist/llm/claude-code-models.d.ts +1 -0
  1231. package/node_modules/@ktx/context/dist/llm/claude-code-models.js +17 -0
  1232. package/node_modules/@ktx/context/dist/llm/claude-code-models.test.d.ts +1 -0
  1233. package/node_modules/@ktx/context/dist/llm/claude-code-models.test.js +15 -0
  1234. package/node_modules/@ktx/context/dist/llm/claude-code-runtime.d.ts +36 -0
  1235. package/node_modules/@ktx/context/dist/llm/claude-code-runtime.js +242 -0
  1236. package/node_modules/@ktx/context/dist/llm/claude-code-runtime.test.d.ts +1 -0
  1237. package/node_modules/@ktx/context/dist/llm/claude-code-runtime.test.js +384 -0
  1238. package/node_modules/@ktx/context/dist/llm/debug-request-recorder.d.ts +44 -0
  1239. package/node_modules/@ktx/context/dist/llm/debug-request-recorder.js +79 -0
  1240. package/node_modules/@ktx/context/dist/llm/debug-request-recorder.test.d.ts +1 -0
  1241. package/node_modules/@ktx/context/dist/llm/debug-request-recorder.test.js +112 -0
  1242. package/node_modules/@ktx/context/dist/llm/embedding-port.d.ts +17 -0
  1243. package/node_modules/@ktx/context/dist/llm/embedding-port.js +31 -0
  1244. package/node_modules/@ktx/context/dist/llm/embedding-port.test.d.ts +1 -0
  1245. package/node_modules/@ktx/context/dist/llm/embedding-port.test.js +34 -0
  1246. package/node_modules/@ktx/context/dist/llm/generation.d.ts +8 -0
  1247. package/node_modules/@ktx/context/dist/llm/generation.js +6 -0
  1248. package/node_modules/@ktx/context/dist/llm/index.d.ts +13 -0
  1249. package/node_modules/@ktx/context/dist/llm/index.js +10 -0
  1250. package/node_modules/@ktx/context/dist/llm/local-config.d.ts +22 -0
  1251. package/node_modules/@ktx/context/dist/llm/local-config.js +145 -0
  1252. package/node_modules/@ktx/context/dist/llm/local-config.test.d.ts +1 -0
  1253. package/node_modules/@ktx/context/dist/llm/local-config.test.js +165 -0
  1254. package/node_modules/@ktx/context/dist/llm/runtime-local-config.test.d.ts +1 -0
  1255. package/node_modules/@ktx/context/dist/llm/runtime-local-config.test.js +17 -0
  1256. package/node_modules/@ktx/context/dist/llm/runtime-port.d.ts +59 -0
  1257. package/node_modules/@ktx/context/dist/llm/runtime-port.js +9 -0
  1258. package/node_modules/@ktx/context/dist/llm/runtime-tools.d.ts +10 -0
  1259. package/node_modules/@ktx/context/dist/llm/runtime-tools.js +68 -0
  1260. package/node_modules/@ktx/context/dist/llm/runtime-tools.test.d.ts +1 -0
  1261. package/node_modules/@ktx/context/dist/llm/runtime-tools.test.js +36 -0
  1262. package/node_modules/@ktx/context/dist/mcp/context-tools.d.ts +9 -0
  1263. package/node_modules/@ktx/context/dist/mcp/context-tools.js +398 -0
  1264. package/node_modules/@ktx/context/dist/mcp/index.d.ts +5 -0
  1265. package/node_modules/@ktx/context/dist/mcp/index.js +3 -0
  1266. package/node_modules/@ktx/context/dist/mcp/local-project-ports.d.ts +18 -0
  1267. package/node_modules/@ktx/context/dist/mcp/local-project-ports.js +631 -0
  1268. package/node_modules/@ktx/context/dist/mcp/local-project-ports.test.d.ts +1 -0
  1269. package/node_modules/@ktx/context/dist/mcp/local-project-ports.test.js +1388 -0
  1270. package/node_modules/@ktx/context/dist/mcp/server.d.ts +7 -0
  1271. package/node_modules/@ktx/context/dist/mcp/server.js +69 -0
  1272. package/node_modules/@ktx/context/dist/mcp/server.test.d.ts +1 -0
  1273. package/node_modules/@ktx/context/dist/mcp/server.test.js +991 -0
  1274. package/node_modules/@ktx/context/dist/mcp/types.d.ts +347 -0
  1275. package/node_modules/@ktx/context/dist/mcp/types.js +1 -0
  1276. package/node_modules/@ktx/context/dist/memory/capture-signals.d.ts +8 -0
  1277. package/node_modules/@ktx/context/dist/memory/capture-signals.js +103 -0
  1278. package/node_modules/@ktx/context/dist/memory/index.d.ts +6 -0
  1279. package/node_modules/@ktx/context/dist/memory/index.js +5 -0
  1280. package/node_modules/@ktx/context/dist/memory/local-memory-runs.d.ts +22 -0
  1281. package/node_modules/@ktx/context/dist/memory/local-memory-runs.js +165 -0
  1282. package/node_modules/@ktx/context/dist/memory/local-memory.d.ts +22 -0
  1283. package/node_modules/@ktx/context/dist/memory/local-memory.js +385 -0
  1284. package/node_modules/@ktx/context/dist/memory/local-memory.test.d.ts +1 -0
  1285. package/node_modules/@ktx/context/dist/memory/local-memory.test.js +159 -0
  1286. package/node_modules/@ktx/context/dist/memory/memory-agent.service.d.ts +59 -0
  1287. package/node_modules/@ktx/context/dist/memory/memory-agent.service.ingest.test.d.ts +1 -0
  1288. package/node_modules/@ktx/context/dist/memory/memory-agent.service.ingest.test.js +355 -0
  1289. package/node_modules/@ktx/context/dist/memory/memory-agent.service.js +539 -0
  1290. package/node_modules/@ktx/context/dist/memory/memory-agent.service.test.d.ts +1 -0
  1291. package/node_modules/@ktx/context/dist/memory/memory-agent.service.test.js +413 -0
  1292. package/node_modules/@ktx/context/dist/memory/memory-runs.d.ts +54 -0
  1293. package/node_modules/@ktx/context/dist/memory/memory-runs.js +78 -0
  1294. package/node_modules/@ktx/context/dist/memory/memory-runs.test.d.ts +1 -0
  1295. package/node_modules/@ktx/context/dist/memory/memory-runs.test.js +158 -0
  1296. package/node_modules/@ktx/context/dist/memory/memory-runtime-assets.test.d.ts +1 -0
  1297. package/node_modules/@ktx/context/dist/memory/memory-runtime-assets.test.js +162 -0
  1298. package/node_modules/@ktx/context/dist/memory/types.d.ts +133 -0
  1299. package/node_modules/@ktx/context/dist/memory/types.js +1 -0
  1300. package/node_modules/@ktx/context/dist/package-exports.test.d.ts +1 -0
  1301. package/node_modules/@ktx/context/dist/package-exports.test.js +249 -0
  1302. package/node_modules/@ktx/context/dist/project/config.d.ts +568 -0
  1303. package/node_modules/@ktx/context/dist/project/config.js +331 -0
  1304. package/node_modules/@ktx/context/dist/project/config.test.d.ts +1 -0
  1305. package/node_modules/@ktx/context/dist/project/config.test.js +467 -0
  1306. package/node_modules/@ktx/context/dist/project/driver-schemas.d.ts +98 -0
  1307. package/node_modules/@ktx/context/dist/project/driver-schemas.js +180 -0
  1308. package/node_modules/@ktx/context/dist/project/driver-schemas.test.d.ts +1 -0
  1309. package/node_modules/@ktx/context/dist/project/driver-schemas.test.js +125 -0
  1310. package/node_modules/@ktx/context/dist/project/index.d.ts +12 -0
  1311. package/node_modules/@ktx/context/dist/project/index.js +6 -0
  1312. package/node_modules/@ktx/context/dist/project/local-git-file-store.d.ts +23 -0
  1313. package/node_modules/@ktx/context/dist/project/local-git-file-store.js +140 -0
  1314. package/node_modules/@ktx/context/dist/project/local-git-file-store.test.d.ts +1 -0
  1315. package/node_modules/@ktx/context/dist/project/local-git-file-store.test.js +71 -0
  1316. package/node_modules/@ktx/context/dist/project/local-state-db.d.ts +2 -0
  1317. package/node_modules/@ktx/context/dist/project/local-state-db.js +4 -0
  1318. package/node_modules/@ktx/context/dist/project/mappings-yaml-schema.d.ts +58 -0
  1319. package/node_modules/@ktx/context/dist/project/mappings-yaml-schema.js +109 -0
  1320. package/node_modules/@ktx/context/dist/project/mappings-yaml-schema.test.d.ts +1 -0
  1321. package/node_modules/@ktx/context/dist/project/mappings-yaml-schema.test.js +79 -0
  1322. package/node_modules/@ktx/context/dist/project/project.d.ts +29 -0
  1323. package/node_modules/@ktx/context/dist/project/project.js +93 -0
  1324. package/node_modules/@ktx/context/dist/project/project.test.d.ts +1 -0
  1325. package/node_modules/@ktx/context/dist/project/project.test.js +55 -0
  1326. package/node_modules/@ktx/context/dist/project/setup-config.d.ts +12 -0
  1327. package/node_modules/@ktx/context/dist/project/setup-config.js +70 -0
  1328. package/node_modules/@ktx/context/dist/project/setup-config.test.d.ts +1 -0
  1329. package/node_modules/@ktx/context/dist/project/setup-config.test.js +37 -0
  1330. package/node_modules/@ktx/context/dist/prompts/index.d.ts +2 -0
  1331. package/node_modules/@ktx/context/dist/prompts/index.js +1 -0
  1332. package/node_modules/@ktx/context/dist/prompts/prompt.service.d.ts +28 -0
  1333. package/node_modules/@ktx/context/dist/prompts/prompt.service.js +84 -0
  1334. package/node_modules/@ktx/context/dist/prompts/prompt.service.test.d.ts +1 -0
  1335. package/node_modules/@ktx/context/dist/prompts/prompt.service.test.js +43 -0
  1336. package/node_modules/@ktx/context/dist/scan/credentials.d.ts +8 -0
  1337. package/node_modules/@ktx/context/dist/scan/credentials.js +38 -0
  1338. package/node_modules/@ktx/context/dist/scan/credentials.test.d.ts +1 -0
  1339. package/node_modules/@ktx/context/dist/scan/credentials.test.js +161 -0
  1340. package/node_modules/@ktx/context/dist/scan/data-dictionary.d.ts +22 -0
  1341. package/node_modules/@ktx/context/dist/scan/data-dictionary.js +66 -0
  1342. package/node_modules/@ktx/context/dist/scan/data-dictionary.test.d.ts +1 -0
  1343. package/node_modules/@ktx/context/dist/scan/data-dictionary.test.js +92 -0
  1344. package/node_modules/@ktx/context/dist/scan/description-generation.d.ts +122 -0
  1345. package/node_modules/@ktx/context/dist/scan/description-generation.js +556 -0
  1346. package/node_modules/@ktx/context/dist/scan/description-generation.test.d.ts +1 -0
  1347. package/node_modules/@ktx/context/dist/scan/description-generation.test.js +587 -0
  1348. package/node_modules/@ktx/context/dist/scan/embedding-text.d.ts +21 -0
  1349. package/node_modules/@ktx/context/dist/scan/embedding-text.js +23 -0
  1350. package/node_modules/@ktx/context/dist/scan/embedding-text.test.d.ts +1 -0
  1351. package/node_modules/@ktx/context/dist/scan/embedding-text.test.js +36 -0
  1352. package/node_modules/@ktx/context/dist/scan/enrichment-state.d.ts +48 -0
  1353. package/node_modules/@ktx/context/dist/scan/enrichment-state.js +44 -0
  1354. package/node_modules/@ktx/context/dist/scan/enrichment-state.test.d.ts +1 -0
  1355. package/node_modules/@ktx/context/dist/scan/enrichment-state.test.js +147 -0
  1356. package/node_modules/@ktx/context/dist/scan/enrichment-summary.d.ts +4 -0
  1357. package/node_modules/@ktx/context/dist/scan/enrichment-summary.js +44 -0
  1358. package/node_modules/@ktx/context/dist/scan/enrichment-summary.test.d.ts +1 -0
  1359. package/node_modules/@ktx/context/dist/scan/enrichment-summary.test.js +34 -0
  1360. package/node_modules/@ktx/context/dist/scan/enrichment-types.d.ts +104 -0
  1361. package/node_modules/@ktx/context/dist/scan/enrichment-types.js +1 -0
  1362. package/node_modules/@ktx/context/dist/scan/enrichment-types.test.d.ts +1 -0
  1363. package/node_modules/@ktx/context/dist/scan/enrichment-types.test.js +141 -0
  1364. package/node_modules/@ktx/context/dist/scan/entity-details.d.ts +57 -0
  1365. package/node_modules/@ktx/context/dist/scan/entity-details.js +216 -0
  1366. package/node_modules/@ktx/context/dist/scan/entity-details.test.d.ts +1 -0
  1367. package/node_modules/@ktx/context/dist/scan/entity-details.test.js +234 -0
  1368. package/node_modules/@ktx/context/dist/scan/index.d.ts +72 -0
  1369. package/node_modules/@ktx/context/dist/scan/index.js +37 -0
  1370. package/node_modules/@ktx/context/dist/scan/local-enrichment-artifacts.d.ts +32 -0
  1371. package/node_modules/@ktx/context/dist/scan/local-enrichment-artifacts.js +274 -0
  1372. package/node_modules/@ktx/context/dist/scan/local-enrichment-artifacts.test.d.ts +1 -0
  1373. package/node_modules/@ktx/context/dist/scan/local-enrichment-artifacts.test.js +767 -0
  1374. package/node_modules/@ktx/context/dist/scan/local-enrichment.d.ts +49 -0
  1375. package/node_modules/@ktx/context/dist/scan/local-enrichment.js +494 -0
  1376. package/node_modules/@ktx/context/dist/scan/local-enrichment.test.d.ts +1 -0
  1377. package/node_modules/@ktx/context/dist/scan/local-enrichment.test.js +757 -0
  1378. package/node_modules/@ktx/context/dist/scan/local-scan.d.ts +68 -0
  1379. package/node_modules/@ktx/context/dist/scan/local-scan.js +427 -0
  1380. package/node_modules/@ktx/context/dist/scan/local-scan.test.d.ts +1 -0
  1381. package/node_modules/@ktx/context/dist/scan/local-scan.test.js +1399 -0
  1382. package/node_modules/@ktx/context/dist/scan/local-structural-artifacts.d.ts +10 -0
  1383. package/node_modules/@ktx/context/dist/scan/local-structural-artifacts.js +86 -0
  1384. package/node_modules/@ktx/context/dist/scan/local-structural-artifacts.test.d.ts +1 -0
  1385. package/node_modules/@ktx/context/dist/scan/local-structural-artifacts.test.js +144 -0
  1386. package/node_modules/@ktx/context/dist/scan/orchestrator.d.ts +44 -0
  1387. package/node_modules/@ktx/context/dist/scan/orchestrator.js +186 -0
  1388. package/node_modules/@ktx/context/dist/scan/orchestrator.test.d.ts +1 -0
  1389. package/node_modules/@ktx/context/dist/scan/orchestrator.test.js +335 -0
  1390. package/node_modules/@ktx/context/dist/scan/relationship-artifacts.d.ts +20 -0
  1391. package/node_modules/@ktx/context/dist/scan/relationship-artifacts.js +45 -0
  1392. package/node_modules/@ktx/context/dist/scan/relationship-artifacts.test.d.ts +1 -0
  1393. package/node_modules/@ktx/context/dist/scan/relationship-artifacts.test.js +268 -0
  1394. package/node_modules/@ktx/context/dist/scan/relationship-benchmark-report.d.ts +52 -0
  1395. package/node_modules/@ktx/context/dist/scan/relationship-benchmark-report.js +252 -0
  1396. package/node_modules/@ktx/context/dist/scan/relationship-benchmark-report.test.d.ts +1 -0
  1397. package/node_modules/@ktx/context/dist/scan/relationship-benchmark-report.test.js +389 -0
  1398. package/node_modules/@ktx/context/dist/scan/relationship-benchmarks.d.ts +148 -0
  1399. package/node_modules/@ktx/context/dist/scan/relationship-benchmarks.js +646 -0
  1400. package/node_modules/@ktx/context/dist/scan/relationship-benchmarks.test.d.ts +1 -0
  1401. package/node_modules/@ktx/context/dist/scan/relationship-benchmarks.test.js +1072 -0
  1402. package/node_modules/@ktx/context/dist/scan/relationship-budget.d.ts +19 -0
  1403. package/node_modules/@ktx/context/dist/scan/relationship-budget.js +34 -0
  1404. package/node_modules/@ktx/context/dist/scan/relationship-budget.test.d.ts +1 -0
  1405. package/node_modules/@ktx/context/dist/scan/relationship-budget.test.js +71 -0
  1406. package/node_modules/@ktx/context/dist/scan/relationship-candidates.d.ts +49 -0
  1407. package/node_modules/@ktx/context/dist/scan/relationship-candidates.js +556 -0
  1408. package/node_modules/@ktx/context/dist/scan/relationship-candidates.test.d.ts +1 -0
  1409. package/node_modules/@ktx/context/dist/scan/relationship-candidates.test.js +747 -0
  1410. package/node_modules/@ktx/context/dist/scan/relationship-composite-candidates.d.ts +66 -0
  1411. package/node_modules/@ktx/context/dist/scan/relationship-composite-candidates.js +422 -0
  1412. package/node_modules/@ktx/context/dist/scan/relationship-composite-candidates.test.d.ts +1 -0
  1413. package/node_modules/@ktx/context/dist/scan/relationship-composite-candidates.test.js +69 -0
  1414. package/node_modules/@ktx/context/dist/scan/relationship-diagnostics.d.ts +94 -0
  1415. package/node_modules/@ktx/context/dist/scan/relationship-diagnostics.js +224 -0
  1416. package/node_modules/@ktx/context/dist/scan/relationship-diagnostics.test.d.ts +1 -0
  1417. package/node_modules/@ktx/context/dist/scan/relationship-diagnostics.test.js +333 -0
  1418. package/node_modules/@ktx/context/dist/scan/relationship-discovery.d.ts +27 -0
  1419. package/node_modules/@ktx/context/dist/scan/relationship-discovery.js +247 -0
  1420. package/node_modules/@ktx/context/dist/scan/relationship-discovery.test.d.ts +1 -0
  1421. package/node_modules/@ktx/context/dist/scan/relationship-discovery.test.js +618 -0
  1422. package/node_modules/@ktx/context/dist/scan/relationship-feedback-calibration.d.ts +70 -0
  1423. package/node_modules/@ktx/context/dist/scan/relationship-feedback-calibration.js +170 -0
  1424. package/node_modules/@ktx/context/dist/scan/relationship-feedback-calibration.test.d.ts +1 -0
  1425. package/node_modules/@ktx/context/dist/scan/relationship-feedback-calibration.test.js +175 -0
  1426. package/node_modules/@ktx/context/dist/scan/relationship-feedback-export.d.ts +54 -0
  1427. package/node_modules/@ktx/context/dist/scan/relationship-feedback-export.js +96 -0
  1428. package/node_modules/@ktx/context/dist/scan/relationship-feedback-export.test.d.ts +1 -0
  1429. package/node_modules/@ktx/context/dist/scan/relationship-feedback-export.test.js +241 -0
  1430. package/node_modules/@ktx/context/dist/scan/relationship-formal-metadata.d.ts +7 -0
  1431. package/node_modules/@ktx/context/dist/scan/relationship-formal-metadata.js +43 -0
  1432. package/node_modules/@ktx/context/dist/scan/relationship-formal-metadata.test.d.ts +1 -0
  1433. package/node_modules/@ktx/context/dist/scan/relationship-formal-metadata.test.js +125 -0
  1434. package/node_modules/@ktx/context/dist/scan/relationship-graph-resolver.d.ts +48 -0
  1435. package/node_modules/@ktx/context/dist/scan/relationship-graph-resolver.js +367 -0
  1436. package/node_modules/@ktx/context/dist/scan/relationship-graph-resolver.test.d.ts +1 -0
  1437. package/node_modules/@ktx/context/dist/scan/relationship-graph-resolver.test.js +604 -0
  1438. package/node_modules/@ktx/context/dist/scan/relationship-llm-proposal.d.ts +25 -0
  1439. package/node_modules/@ktx/context/dist/scan/relationship-llm-proposal.js +193 -0
  1440. package/node_modules/@ktx/context/dist/scan/relationship-llm-proposal.test.d.ts +1 -0
  1441. package/node_modules/@ktx/context/dist/scan/relationship-llm-proposal.test.js +197 -0
  1442. package/node_modules/@ktx/context/dist/scan/relationship-locality.d.ts +15 -0
  1443. package/node_modules/@ktx/context/dist/scan/relationship-locality.js +129 -0
  1444. package/node_modules/@ktx/context/dist/scan/relationship-locality.test.d.ts +1 -0
  1445. package/node_modules/@ktx/context/dist/scan/relationship-locality.test.js +128 -0
  1446. package/node_modules/@ktx/context/dist/scan/relationship-name-similarity.d.ts +13 -0
  1447. package/node_modules/@ktx/context/dist/scan/relationship-name-similarity.js +123 -0
  1448. package/node_modules/@ktx/context/dist/scan/relationship-name-similarity.test.d.ts +1 -0
  1449. package/node_modules/@ktx/context/dist/scan/relationship-name-similarity.test.js +68 -0
  1450. package/node_modules/@ktx/context/dist/scan/relationship-profiling.d.ts +55 -0
  1451. package/node_modules/@ktx/context/dist/scan/relationship-profiling.js +321 -0
  1452. package/node_modules/@ktx/context/dist/scan/relationship-profiling.test.d.ts +1 -0
  1453. package/node_modules/@ktx/context/dist/scan/relationship-profiling.test.js +313 -0
  1454. package/node_modules/@ktx/context/dist/scan/relationship-review-apply.d.ts +34 -0
  1455. package/node_modules/@ktx/context/dist/scan/relationship-review-apply.js +152 -0
  1456. package/node_modules/@ktx/context/dist/scan/relationship-review-apply.test.d.ts +1 -0
  1457. package/node_modules/@ktx/context/dist/scan/relationship-review-apply.test.js +321 -0
  1458. package/node_modules/@ktx/context/dist/scan/relationship-review-decisions.d.ts +46 -0
  1459. package/node_modules/@ktx/context/dist/scan/relationship-review-decisions.js +92 -0
  1460. package/node_modules/@ktx/context/dist/scan/relationship-review-decisions.test.d.ts +1 -0
  1461. package/node_modules/@ktx/context/dist/scan/relationship-review-decisions.test.js +312 -0
  1462. package/node_modules/@ktx/context/dist/scan/relationship-scoring.d.ts +29 -0
  1463. package/node_modules/@ktx/context/dist/scan/relationship-scoring.js +95 -0
  1464. package/node_modules/@ktx/context/dist/scan/relationship-scoring.test.d.ts +1 -0
  1465. package/node_modules/@ktx/context/dist/scan/relationship-scoring.test.js +86 -0
  1466. package/node_modules/@ktx/context/dist/scan/relationship-threshold-advice.d.ts +60 -0
  1467. package/node_modules/@ktx/context/dist/scan/relationship-threshold-advice.js +190 -0
  1468. package/node_modules/@ktx/context/dist/scan/relationship-threshold-advice.test.d.ts +1 -0
  1469. package/node_modules/@ktx/context/dist/scan/relationship-threshold-advice.test.js +205 -0
  1470. package/node_modules/@ktx/context/dist/scan/relationship-validation.d.ts +44 -0
  1471. package/node_modules/@ktx/context/dist/scan/relationship-validation.js +240 -0
  1472. package/node_modules/@ktx/context/dist/scan/relationship-validation.test.d.ts +1 -0
  1473. package/node_modules/@ktx/context/dist/scan/relationship-validation.test.js +450 -0
  1474. package/node_modules/@ktx/context/dist/scan/sqlite-local-enrichment-state-store.d.ts +12 -0
  1475. package/node_modules/@ktx/context/dist/scan/sqlite-local-enrichment-state-store.js +190 -0
  1476. package/node_modules/@ktx/context/dist/scan/type-normalization.d.ts +8 -0
  1477. package/node_modules/@ktx/context/dist/scan/type-normalization.js +23 -0
  1478. package/node_modules/@ktx/context/dist/scan/type-normalization.test.d.ts +1 -0
  1479. package/node_modules/@ktx/context/dist/scan/type-normalization.test.js +21 -0
  1480. package/node_modules/@ktx/context/dist/scan/types.d.ts +309 -0
  1481. package/node_modules/@ktx/context/dist/scan/types.js +13 -0
  1482. package/node_modules/@ktx/context/dist/scan/types.test.d.ts +1 -0
  1483. package/node_modules/@ktx/context/dist/scan/types.test.js +206 -0
  1484. package/node_modules/@ktx/context/dist/scan/warehouse-catalog.d.ts +69 -0
  1485. package/node_modules/@ktx/context/dist/scan/warehouse-catalog.js +311 -0
  1486. package/node_modules/@ktx/context/dist/scan/warehouse-catalog.test.d.ts +1 -0
  1487. package/node_modules/@ktx/context/dist/scan/warehouse-catalog.test.js +158 -0
  1488. package/node_modules/@ktx/context/dist/search/backend-conformance.d.ts +39 -0
  1489. package/node_modules/@ktx/context/dist/search/backend-conformance.js +88 -0
  1490. package/node_modules/@ktx/context/dist/search/backend-conformance.test.d.ts +1 -0
  1491. package/node_modules/@ktx/context/dist/search/backend-conformance.test.js +408 -0
  1492. package/node_modules/@ktx/context/dist/search/discover.d.ts +30 -0
  1493. package/node_modules/@ktx/context/dist/search/discover.js +340 -0
  1494. package/node_modules/@ktx/context/dist/search/discover.test.d.ts +1 -0
  1495. package/node_modules/@ktx/context/dist/search/discover.test.js +197 -0
  1496. package/node_modules/@ktx/context/dist/search/hybrid-search-core.d.ts +4 -0
  1497. package/node_modules/@ktx/context/dist/search/hybrid-search-core.js +106 -0
  1498. package/node_modules/@ktx/context/dist/search/hybrid-search-core.test.d.ts +1 -0
  1499. package/node_modules/@ktx/context/dist/search/hybrid-search-core.test.js +113 -0
  1500. package/node_modules/@ktx/context/dist/search/index.d.ts +8 -0
  1501. package/node_modules/@ktx/context/dist/search/index.js +5 -0
  1502. package/node_modules/@ktx/context/dist/search/pglite-owner-process.d.ts +27 -0
  1503. package/node_modules/@ktx/context/dist/search/pglite-owner-process.js +89 -0
  1504. package/node_modules/@ktx/context/dist/search/pglite-owner-process.test.d.ts +1 -0
  1505. package/node_modules/@ktx/context/dist/search/pglite-owner-process.test.js +286 -0
  1506. package/node_modules/@ktx/context/dist/search/pglite-runtime-boundary.test.d.ts +1 -0
  1507. package/node_modules/@ktx/context/dist/search/pglite-runtime-boundary.test.js +48 -0
  1508. package/node_modules/@ktx/context/dist/search/pglite-spike.test.d.ts +1 -0
  1509. package/node_modules/@ktx/context/dist/search/pglite-spike.test.js +249 -0
  1510. package/node_modules/@ktx/context/dist/search/query.d.ts +3 -0
  1511. package/node_modules/@ktx/context/dist/search/query.js +15 -0
  1512. package/node_modules/@ktx/context/dist/search/query.test.d.ts +1 -0
  1513. package/node_modules/@ktx/context/dist/search/query.test.js +23 -0
  1514. package/node_modules/@ktx/context/dist/search/rrf.d.ts +5 -0
  1515. package/node_modules/@ktx/context/dist/search/rrf.js +13 -0
  1516. package/node_modules/@ktx/context/dist/search/rrf.test.d.ts +1 -0
  1517. package/node_modules/@ktx/context/dist/search/rrf.test.js +47 -0
  1518. package/node_modules/@ktx/context/dist/search/types.d.ts +73 -0
  1519. package/node_modules/@ktx/context/dist/search/types.js +1 -0
  1520. package/node_modules/@ktx/context/dist/skills/index.d.ts +2 -0
  1521. package/node_modules/@ktx/context/dist/skills/index.js +1 -0
  1522. package/node_modules/@ktx/context/dist/skills/skills-registry.service.d.ts +35 -0
  1523. package/node_modules/@ktx/context/dist/skills/skills-registry.service.js +215 -0
  1524. package/node_modules/@ktx/context/dist/skills/skills-registry.service.test.d.ts +1 -0
  1525. package/node_modules/@ktx/context/dist/skills/skills-registry.service.test.js +161 -0
  1526. package/node_modules/@ktx/context/dist/sl/description-normalization.d.ts +5 -0
  1527. package/node_modules/@ktx/context/dist/sl/description-normalization.js +100 -0
  1528. package/node_modules/@ktx/context/dist/sl/descriptions.d.ts +14 -0
  1529. package/node_modules/@ktx/context/dist/sl/descriptions.js +20 -0
  1530. package/node_modules/@ktx/context/dist/sl/dictionary-search.d.ts +42 -0
  1531. package/node_modules/@ktx/context/dist/sl/dictionary-search.js +121 -0
  1532. package/node_modules/@ktx/context/dist/sl/dictionary-search.test.d.ts +1 -0
  1533. package/node_modules/@ktx/context/dist/sl/dictionary-search.test.js +204 -0
  1534. package/node_modules/@ktx/context/dist/sl/index.d.ts +15 -0
  1535. package/node_modules/@ktx/context/dist/sl/index.js +10 -0
  1536. package/node_modules/@ktx/context/dist/sl/local-query.d.ts +17 -0
  1537. package/node_modules/@ktx/context/dist/sl/local-query.js +111 -0
  1538. package/node_modules/@ktx/context/dist/sl/local-query.test.d.ts +1 -0
  1539. package/node_modules/@ktx/context/dist/sl/local-query.test.js +218 -0
  1540. package/node_modules/@ktx/context/dist/sl/local-sl.d.ts +60 -0
  1541. package/node_modules/@ktx/context/dist/sl/local-sl.js +484 -0
  1542. package/node_modules/@ktx/context/dist/sl/local-sl.test.d.ts +1 -0
  1543. package/node_modules/@ktx/context/dist/sl/local-sl.test.js +334 -0
  1544. package/node_modules/@ktx/context/dist/sl/pglite-sl-search-prototype.d.ts +16 -0
  1545. package/node_modules/@ktx/context/dist/sl/pglite-sl-search-prototype.js +433 -0
  1546. package/node_modules/@ktx/context/dist/sl/pglite-sl-search-prototype.test.d.ts +1 -0
  1547. package/node_modules/@ktx/context/dist/sl/pglite-sl-search-prototype.test.js +240 -0
  1548. package/node_modules/@ktx/context/dist/sl/ports.d.ts +61 -0
  1549. package/node_modules/@ktx/context/dist/sl/ports.js +1 -0
  1550. package/node_modules/@ktx/context/dist/sl/schemas.contract.test.d.ts +1 -0
  1551. package/node_modules/@ktx/context/dist/sl/schemas.contract.test.js +62 -0
  1552. package/node_modules/@ktx/context/dist/sl/schemas.d.ts +282 -0
  1553. package/node_modules/@ktx/context/dist/sl/schemas.js +181 -0
  1554. package/node_modules/@ktx/context/dist/sl/semantic-layer.service.d.ts +214 -0
  1555. package/node_modules/@ktx/context/dist/sl/semantic-layer.service.js +1334 -0
  1556. package/node_modules/@ktx/context/dist/sl/semantic-layer.service.test.d.ts +1 -0
  1557. package/node_modules/@ktx/context/dist/sl/semantic-layer.service.test.js +1084 -0
  1558. package/node_modules/@ktx/context/dist/sl/sl-dictionary-profile.d.ts +9 -0
  1559. package/node_modules/@ktx/context/dist/sl/sl-dictionary-profile.js +80 -0
  1560. package/node_modules/@ktx/context/dist/sl/sl-dictionary-profile.test.d.ts +1 -0
  1561. package/node_modules/@ktx/context/dist/sl/sl-dictionary-profile.test.js +88 -0
  1562. package/node_modules/@ktx/context/dist/sl/sl-search.service.d.ts +17 -0
  1563. package/node_modules/@ktx/context/dist/sl/sl-search.service.js +156 -0
  1564. package/node_modules/@ktx/context/dist/sl/sl-search.service.test.d.ts +1 -0
  1565. package/node_modules/@ktx/context/dist/sl/sl-search.service.test.js +195 -0
  1566. package/node_modules/@ktx/context/dist/sl/sl-validator.port.d.ts +7 -0
  1567. package/node_modules/@ktx/context/dist/sl/sl-validator.port.js +1 -0
  1568. package/node_modules/@ktx/context/dist/sl/sqlite-sl-sources-index.d.ts +56 -0
  1569. package/node_modules/@ktx/context/dist/sl/sqlite-sl-sources-index.js +419 -0
  1570. package/node_modules/@ktx/context/dist/sl/sqlite-sl-sources-index.test.d.ts +1 -0
  1571. package/node_modules/@ktx/context/dist/sl/sqlite-sl-sources-index.test.js +151 -0
  1572. package/node_modules/@ktx/context/dist/sl/tools/base-semantic-layer.tool.d.ts +45 -0
  1573. package/node_modules/@ktx/context/dist/sl/tools/base-semantic-layer.tool.js +91 -0
  1574. package/node_modules/@ktx/context/dist/sl/tools/connection-id-schema.d.ts +2 -0
  1575. package/node_modules/@ktx/context/dist/sl/tools/connection-id-schema.js +5 -0
  1576. package/node_modules/@ktx/context/dist/sl/tools/connection-id-schema.test.d.ts +1 -0
  1577. package/node_modules/@ktx/context/dist/sl/tools/connection-id-schema.test.js +14 -0
  1578. package/node_modules/@ktx/context/dist/sl/tools/index.d.ts +11 -0
  1579. package/node_modules/@ktx/context/dist/sl/tools/index.js +8 -0
  1580. package/node_modules/@ktx/context/dist/sl/tools/sl-discover.tool.d.ts +52 -0
  1581. package/node_modules/@ktx/context/dist/sl/tools/sl-discover.tool.js +260 -0
  1582. package/node_modules/@ktx/context/dist/sl/tools/sl-discover.tool.test.d.ts +1 -0
  1583. package/node_modules/@ktx/context/dist/sl/tools/sl-discover.tool.test.js +72 -0
  1584. package/node_modules/@ktx/context/dist/sl/tools/sl-edit-source.tool.d.ts +33 -0
  1585. package/node_modules/@ktx/context/dist/sl/tools/sl-edit-source.tool.js +173 -0
  1586. package/node_modules/@ktx/context/dist/sl/tools/sl-edit-source.tool.test.d.ts +1 -0
  1587. package/node_modules/@ktx/context/dist/sl/tools/sl-edit-source.tool.test.js +169 -0
  1588. package/node_modules/@ktx/context/dist/sl/tools/sl-read-source.tool.d.ts +23 -0
  1589. package/node_modules/@ktx/context/dist/sl/tools/sl-read-source.tool.js +47 -0
  1590. package/node_modules/@ktx/context/dist/sl/tools/sl-read-source.tool.session.test.d.ts +1 -0
  1591. package/node_modules/@ktx/context/dist/sl/tools/sl-read-source.tool.session.test.js +55 -0
  1592. package/node_modules/@ktx/context/dist/sl/tools/sl-rollback.tool.d.ts +25 -0
  1593. package/node_modules/@ktx/context/dist/sl/tools/sl-rollback.tool.js +63 -0
  1594. package/node_modules/@ktx/context/dist/sl/tools/sl-rollback.tool.test.d.ts +1 -0
  1595. package/node_modules/@ktx/context/dist/sl/tools/sl-rollback.tool.test.js +57 -0
  1596. package/node_modules/@ktx/context/dist/sl/tools/sl-validate.tool.d.ts +23 -0
  1597. package/node_modules/@ktx/context/dist/sl/tools/sl-validate.tool.js +100 -0
  1598. package/node_modules/@ktx/context/dist/sl/tools/sl-validate.tool.test.d.ts +1 -0
  1599. package/node_modules/@ktx/context/dist/sl/tools/sl-validate.tool.test.js +54 -0
  1600. package/node_modules/@ktx/context/dist/sl/tools/sl-warehouse-validation.d.ts +29 -0
  1601. package/node_modules/@ktx/context/dist/sl/tools/sl-warehouse-validation.js +245 -0
  1602. package/node_modules/@ktx/context/dist/sl/tools/sl-warehouse-validation.test.d.ts +1 -0
  1603. package/node_modules/@ktx/context/dist/sl/tools/sl-warehouse-validation.test.js +136 -0
  1604. package/node_modules/@ktx/context/dist/sl/tools/sl-write-source.tool.d.ts +422 -0
  1605. package/node_modules/@ktx/context/dist/sl/tools/sl-write-source.tool.js +315 -0
  1606. package/node_modules/@ktx/context/dist/sl/tools/sl-write-source.tool.test.d.ts +1 -0
  1607. package/node_modules/@ktx/context/dist/sl/tools/sl-write-source.tool.test.js +285 -0
  1608. package/node_modules/@ktx/context/dist/sl/types.d.ts +147 -0
  1609. package/node_modules/@ktx/context/dist/sl/types.js +1 -0
  1610. package/node_modules/@ktx/context/dist/sql-analysis/http-sql-analysis-port.d.ts +7 -0
  1611. package/node_modules/@ktx/context/dist/sql-analysis/http-sql-analysis-port.js +188 -0
  1612. package/node_modules/@ktx/context/dist/sql-analysis/http-sql-analysis-port.test.d.ts +1 -0
  1613. package/node_modules/@ktx/context/dist/sql-analysis/http-sql-analysis-port.test.js +147 -0
  1614. package/node_modules/@ktx/context/dist/sql-analysis/index.d.ts +3 -0
  1615. package/node_modules/@ktx/context/dist/sql-analysis/index.js +1 -0
  1616. package/node_modules/@ktx/context/dist/sql-analysis/ports.d.ts +33 -0
  1617. package/node_modules/@ktx/context/dist/sql-analysis/ports.js +1 -0
  1618. package/node_modules/@ktx/context/dist/test/make-local-git-repo.d.ts +10 -0
  1619. package/node_modules/@ktx/context/dist/test/make-local-git-repo.js +34 -0
  1620. package/node_modules/@ktx/context/dist/tools/action-raw-paths.d.ts +10 -0
  1621. package/node_modules/@ktx/context/dist/tools/action-raw-paths.js +18 -0
  1622. package/node_modules/@ktx/context/dist/tools/authors.d.ts +8 -0
  1623. package/node_modules/@ktx/context/dist/tools/authors.js +4 -0
  1624. package/node_modules/@ktx/context/dist/tools/base-tool.d.ts +85 -0
  1625. package/node_modules/@ktx/context/dist/tools/base-tool.js +94 -0
  1626. package/node_modules/@ktx/context/dist/tools/context-candidate-mark.tool.d.ts +41 -0
  1627. package/node_modules/@ktx/context/dist/tools/context-candidate-mark.tool.js +44 -0
  1628. package/node_modules/@ktx/context/dist/tools/context-candidate-write.tool.d.ts +64 -0
  1629. package/node_modules/@ktx/context/dist/tools/context-candidate-write.tool.js +140 -0
  1630. package/node_modules/@ktx/context/dist/tools/context-evidence-ids.d.ts +3 -0
  1631. package/node_modules/@ktx/context/dist/tools/context-evidence-ids.js +12 -0
  1632. package/node_modules/@ktx/context/dist/tools/context-evidence-neighbors.tool.d.ts +48 -0
  1633. package/node_modules/@ktx/context/dist/tools/context-evidence-neighbors.tool.js +69 -0
  1634. package/node_modules/@ktx/context/dist/tools/context-evidence-read.tool.d.ts +37 -0
  1635. package/node_modules/@ktx/context/dist/tools/context-evidence-read.tool.js +118 -0
  1636. package/node_modules/@ktx/context/dist/tools/context-evidence-search.tool.d.ts +57 -0
  1637. package/node_modules/@ktx/context/dist/tools/context-evidence-search.tool.js +92 -0
  1638. package/node_modules/@ktx/context/dist/tools/context-evidence-tool-store.d.ts +112 -0
  1639. package/node_modules/@ktx/context/dist/tools/context-evidence-tool-store.js +1 -0
  1640. package/node_modules/@ktx/context/dist/tools/context-evidence-tools.test.d.ts +1 -0
  1641. package/node_modules/@ktx/context/dist/tools/context-evidence-tools.test.js +486 -0
  1642. package/node_modules/@ktx/context/dist/tools/context-ingest-metadata.d.ts +9 -0
  1643. package/node_modules/@ktx/context/dist/tools/context-ingest-metadata.js +13 -0
  1644. package/node_modules/@ktx/context/dist/tools/index.d.ts +18 -0
  1645. package/node_modules/@ktx/context/dist/tools/index.js +11 -0
  1646. package/node_modules/@ktx/context/dist/tools/sql-edit-replacer.d.ts +16 -0
  1647. package/node_modules/@ktx/context/dist/tools/sql-edit-replacer.js +173 -0
  1648. package/node_modules/@ktx/context/dist/tools/tool-session.d.ts +54 -0
  1649. package/node_modules/@ktx/context/dist/tools/tool-session.js +1 -0
  1650. package/node_modules/@ktx/context/dist/tools/touched-sl-sources.d.ts +12 -0
  1651. package/node_modules/@ktx/context/dist/tools/touched-sl-sources.js +47 -0
  1652. package/node_modules/@ktx/context/dist/tools/touched-sl-sources.test.d.ts +1 -0
  1653. package/node_modules/@ktx/context/dist/tools/touched-sl-sources.test.js +31 -0
  1654. package/node_modules/@ktx/context/dist/wiki/index.d.ts +9 -0
  1655. package/node_modules/@ktx/context/dist/wiki/index.js +6 -0
  1656. package/node_modules/@ktx/context/dist/wiki/keys.d.ts +11 -0
  1657. package/node_modules/@ktx/context/dist/wiki/keys.js +26 -0
  1658. package/node_modules/@ktx/context/dist/wiki/knowledge-search-text.d.ts +1 -0
  1659. package/node_modules/@ktx/context/dist/wiki/knowledge-search-text.js +7 -0
  1660. package/node_modules/@ktx/context/dist/wiki/knowledge-wiki.service.d.ts +76 -0
  1661. package/node_modules/@ktx/context/dist/wiki/knowledge-wiki.service.js +346 -0
  1662. package/node_modules/@ktx/context/dist/wiki/knowledge-wiki.service.test.d.ts +1 -0
  1663. package/node_modules/@ktx/context/dist/wiki/knowledge-wiki.service.test.js +134 -0
  1664. package/node_modules/@ktx/context/dist/wiki/local-knowledge.d.ts +55 -0
  1665. package/node_modules/@ktx/context/dist/wiki/local-knowledge.js +286 -0
  1666. package/node_modules/@ktx/context/dist/wiki/local-knowledge.test.d.ts +1 -0
  1667. package/node_modules/@ktx/context/dist/wiki/local-knowledge.test.js +226 -0
  1668. package/node_modules/@ktx/context/dist/wiki/ports.d.ts +70 -0
  1669. package/node_modules/@ktx/context/dist/wiki/ports.js +1 -0
  1670. package/node_modules/@ktx/context/dist/wiki/sqlite-knowledge-index.d.ts +43 -0
  1671. package/node_modules/@ktx/context/dist/wiki/sqlite-knowledge-index.js +208 -0
  1672. package/node_modules/@ktx/context/dist/wiki/sqlite-knowledge-index.test.d.ts +1 -0
  1673. package/node_modules/@ktx/context/dist/wiki/sqlite-knowledge-index.test.js +103 -0
  1674. package/node_modules/@ktx/context/dist/wiki/tools/index.d.ts +5 -0
  1675. package/node_modules/@ktx/context/dist/wiki/tools/index.js +5 -0
  1676. package/node_modules/@ktx/context/dist/wiki/tools/wiki-list-tags.tool.d.ts +16 -0
  1677. package/node_modules/@ktx/context/dist/wiki/tools/wiki-list-tags.tool.js +34 -0
  1678. package/node_modules/@ktx/context/dist/wiki/tools/wiki-list-tags.tool.test.d.ts +1 -0
  1679. package/node_modules/@ktx/context/dist/wiki/tools/wiki-list-tags.tool.test.js +35 -0
  1680. package/node_modules/@ktx/context/dist/wiki/tools/wiki-read.tool.d.ts +28 -0
  1681. package/node_modules/@ktx/context/dist/wiki/tools/wiki-read.tool.js +59 -0
  1682. package/node_modules/@ktx/context/dist/wiki/tools/wiki-read.tool.test.d.ts +1 -0
  1683. package/node_modules/@ktx/context/dist/wiki/tools/wiki-read.tool.test.js +66 -0
  1684. package/node_modules/@ktx/context/dist/wiki/tools/wiki-remove.tool.d.ts +28 -0
  1685. package/node_modules/@ktx/context/dist/wiki/tools/wiki-remove.tool.js +85 -0
  1686. package/node_modules/@ktx/context/dist/wiki/tools/wiki-remove.tool.test.d.ts +1 -0
  1687. package/node_modules/@ktx/context/dist/wiki/tools/wiki-remove.tool.test.js +95 -0
  1688. package/node_modules/@ktx/context/dist/wiki/tools/wiki-search.tool.d.ts +49 -0
  1689. package/node_modules/@ktx/context/dist/wiki/tools/wiki-search.tool.js +51 -0
  1690. package/node_modules/@ktx/context/dist/wiki/tools/wiki-search.tool.test.d.ts +1 -0
  1691. package/node_modules/@ktx/context/dist/wiki/tools/wiki-search.tool.test.js +35 -0
  1692. package/node_modules/@ktx/context/dist/wiki/tools/wiki-write.tool.d.ts +80 -0
  1693. package/node_modules/@ktx/context/dist/wiki/tools/wiki-write.tool.js +255 -0
  1694. package/node_modules/@ktx/context/dist/wiki/tools/wiki-write.tool.test.d.ts +1 -0
  1695. package/node_modules/@ktx/context/dist/wiki/tools/wiki-write.tool.test.js +236 -0
  1696. package/node_modules/@ktx/context/dist/wiki/types.d.ts +50 -0
  1697. package/node_modules/@ktx/context/dist/wiki/types.js +1 -0
  1698. package/node_modules/@ktx/context/package.json +117 -0
  1699. package/node_modules/@ktx/context/prompts/memory_agent_backfill.md +21 -0
  1700. package/node_modules/@ktx/context/prompts/memory_agent_bundle_ingest_reconcile.md +29 -0
  1701. package/node_modules/@ktx/context/prompts/memory_agent_bundle_ingest_work_unit.md +32 -0
  1702. package/node_modules/@ktx/context/prompts/memory_agent_external_ingest.md +28 -0
  1703. package/node_modules/@ktx/context/prompts/memory_agent_research.md +30 -0
  1704. package/node_modules/@ktx/context/prompts/skills/light_extraction.md +40 -0
  1705. package/node_modules/@ktx/context/prompts/skills/page_triage_classifier.md +40 -0
  1706. package/node_modules/@ktx/context/skills/_shared/identifier-verification.md +27 -0
  1707. package/node_modules/@ktx/context/skills/dbt_ingest/SKILL.md +76 -0
  1708. package/node_modules/@ktx/context/skills/historic_sql_patterns/SKILL.md +91 -0
  1709. package/node_modules/@ktx/context/skills/historic_sql_table_digest/SKILL.md +89 -0
  1710. package/node_modules/@ktx/context/skills/ingest_triage/SKILL.md +77 -0
  1711. package/node_modules/@ktx/context/skills/live_database_ingest/SKILL.md +89 -0
  1712. package/node_modules/@ktx/context/skills/looker_ingest/SKILL.md +248 -0
  1713. package/node_modules/@ktx/context/skills/lookml_ingest/SKILL.md +219 -0
  1714. package/node_modules/@ktx/context/skills/metabase_ingest/SKILL.md +253 -0
  1715. package/node_modules/@ktx/context/skills/metricflow_ingest/SKILL.md +313 -0
  1716. package/node_modules/@ktx/context/skills/notion_synthesize/SKILL.md +104 -0
  1717. package/node_modules/@ktx/context/skills/sl/SKILL.md +247 -0
  1718. package/node_modules/@ktx/context/skills/sl_capture/SKILL.md +346 -0
  1719. package/node_modules/@ktx/context/skills/wiki_capture/SKILL.md +160 -0
  1720. package/node_modules/@ktx/llm/dist/embedding-health.d.ts +14 -0
  1721. package/node_modules/@ktx/llm/dist/embedding-health.js +36 -0
  1722. package/node_modules/@ktx/llm/dist/embedding-health.test.d.ts +1 -0
  1723. package/node_modules/@ktx/llm/dist/embedding-health.test.js +72 -0
  1724. package/node_modules/@ktx/llm/dist/embedding-provider.d.ts +35 -0
  1725. package/node_modules/@ktx/llm/dist/embedding-provider.js +287 -0
  1726. package/node_modules/@ktx/llm/dist/embedding-provider.test.d.ts +1 -0
  1727. package/node_modules/@ktx/llm/dist/embedding-provider.test.js +99 -0
  1728. package/node_modules/@ktx/llm/dist/index.d.ts +11 -0
  1729. package/node_modules/@ktx/llm/dist/index.js +6 -0
  1730. package/node_modules/@ktx/llm/dist/message-builder.d.ts +45 -0
  1731. package/node_modules/@ktx/llm/dist/message-builder.js +151 -0
  1732. package/node_modules/@ktx/llm/dist/message-builder.test.d.ts +1 -0
  1733. package/node_modules/@ktx/llm/dist/message-builder.test.js +127 -0
  1734. package/node_modules/@ktx/llm/dist/model-health.d.ts +18 -0
  1735. package/node_modules/@ktx/llm/dist/model-health.js +38 -0
  1736. package/node_modules/@ktx/llm/dist/model-health.test.d.ts +1 -0
  1737. package/node_modules/@ktx/llm/dist/model-health.test.js +55 -0
  1738. package/node_modules/@ktx/llm/dist/model-provider.d.ts +22 -0
  1739. package/node_modules/@ktx/llm/dist/model-provider.js +150 -0
  1740. package/node_modules/@ktx/llm/dist/model-provider.test.d.ts +1 -0
  1741. package/node_modules/@ktx/llm/dist/model-provider.test.js +246 -0
  1742. package/node_modules/@ktx/llm/dist/package-exports.test.d.ts +1 -0
  1743. package/node_modules/@ktx/llm/dist/package-exports.test.js +17 -0
  1744. package/node_modules/@ktx/llm/dist/repair.d.ts +8 -0
  1745. package/node_modules/@ktx/llm/dist/repair.js +75 -0
  1746. package/node_modules/@ktx/llm/dist/repair.test.d.ts +1 -0
  1747. package/node_modules/@ktx/llm/dist/repair.test.js +78 -0
  1748. package/node_modules/@ktx/llm/dist/types.d.ts +105 -0
  1749. package/node_modules/@ktx/llm/dist/types.js +1 -0
  1750. package/node_modules/@ktx/llm/package.json +20 -0
  1751. package/package.json +74 -7
  1752. package/README.md +0 -3
@@ -0,0 +1,346 @@
1
+ ---
2
+ name: sl_capture
3
+ description: How to capture new reusable patterns into KTX's semantic layer - when a measure, segment, or join belongs in the catalog and how to write it generically so it stays small and useful over time. Loaded by the post-turn memory-agent only. The research agent does not write to the SL.
4
+ callers: [memory_agent]
5
+ ---
6
+
7
+ # Semantic Layer - Capture
8
+
9
+ This skill covers **when** and **how** to capture new patterns into the semantic layer. For schema reference and query grammar, load the `sl` skill first.
10
+
11
+ When the current turn produces a reusable pattern (business metric, derived view, join pattern, computed dimension), capture it so future queries can reach for it instead of rediscovering it.
12
+
13
+ ## SQL dialect
14
+
15
+ The user-facing prompt includes a `Warehouse:` line under the SL Sources index
16
+ (e.g. `Warehouse: BIGQUERY`). All `expr` strings - measure expressions, segment
17
+ predicates, computed-column SQL - execute on that warehouse and must use its
18
+ syntax. Date arithmetic in particular varies by dialect:
19
+
20
+ - **BigQuery**: `transaction_date >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 90 DAY)` (when the column is `TIMESTAMP`); `event_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 90 DAY)` (when `DATE`).
21
+ - **Postgres / Redshift**: `transaction_date >= current_date - interval '90 days'`.
22
+ - **Snowflake**: `transaction_date >= dateadd(day, -90, current_timestamp())`.
23
+
24
+ Match the column's manifest type (`type: time` → TIMESTAMP/DATETIME on the
25
+ warehouse) - comparing TIMESTAMP to a DATE-arithmetic result fails on
26
+ BigQuery. After every `sl_edit_source`/`sl_write_source`, the inline validator runs a
27
+ `LIMIT 1` warehouse probe per measure and surfaces dialect mismatches; if
28
+ you see an error trailer, fix the expression and retry rather than leaving
29
+ the source for the post-squash gate to revert.
30
+
31
+ ## What's worth capturing
32
+
33
+ - Business metric aggregations (ARR, MRR, revenue, churn, retention, conversion, LTV, CAC).
34
+ - Derived calculations combining multiple signals (risk scores, health scores, composite KPIs).
35
+ - Multi-table join patterns producing a reusable analytical view.
36
+ - Computed categories or flags useful as reusable dimensions (`case when num_protocols >= 3 then 'power' else 'regular' end`).
37
+ - Missing joins between two sources that both exist but aren't connected in the join graph.
38
+
39
+ Skip:
40
+ - Simple `SELECT * LIMIT 10` previews.
41
+ - Trivial `COUNT(*)` on one table with no business filtering.
42
+ - One-off ad-hoc explorations unlikely to repeat.
43
+ - Equivalent measures that already exist (cite the existing one as `source.measure_name`).
44
+
45
+ When in doubt, capture. Measures are easy to remove but impossible to recover from a lost conversation.
46
+
47
+ ## Generalization rules
48
+
49
+ The SL must stay small and general over time. Before adding a measure, decide whether it belongs as a generic pattern or a specific constant.
50
+
51
+ **Prefer one generic measure with query-time filters over N hardcoded variants.**
52
+
53
+ Anti-pattern:
54
+ ```yaml
55
+ - name: revenue_us_region
56
+ expr: sum(case when region = 'US' then amount end)
57
+ - name: revenue_eu_region
58
+ expr: sum(case when region = 'EU' then amount end)
59
+ ```
60
+
61
+ Preferred:
62
+ ```yaml
63
+ - name: total_revenue
64
+ expr: sum(amount)
65
+ ```
66
+ Callers filter `region = 'US'` at query time.
67
+
68
+ **Bake constants in only when the filter has named business meaning that won't change** (`enterprise_arr` for a contractually defined tier), cannot be expressed via the source's dimensions, or comes from a regulated/fixed list.
69
+
70
+ **Time anchors and value lists belong in callers' filters, not in measure expressions or source SQL.**
71
+ - Anti-pattern (date anchor inlined): `expr: count(distinct case when transaction_date >= '2026-04-12' then customer_id end)` - the date will need editing every time the question shifts, and every reader has to discover it.
72
+ - Anti-pattern (value list inlined in source SQL): `WHERE product_category_1 IN ('Testosterone', 'Weight Loss', …)` - locks the source to today's catalog and blocks callers from broadening or narrowing.
73
+ - Preferred: a generic measure (`count(distinct customer_id)`) plus either a named segment that captures the *meaning* of the anchor (`gh_new_products_since_launch`) or a query-time filter. Callers compose; the source stays small.
74
+ - A date is durable to bake in only when it represents a regulatory cutover, a contractually fixed boundary, or a one-time event that reshapes how the source itself is read.
75
+
76
+ **If you create a segment whose expr matches a measure's filter, the measure MUST reference the segment via `segments: [segment_name]` rather than re-inlining the predicate.** This is the canonical pattern even with a single measure - duplicating the predicate inline defeats the purpose of naming it.
77
+
78
+ Anti-pattern:
79
+ ```yaml
80
+ segments:
81
+ - name: engaged_subscriber
82
+ expr: "is_paid = true AND <date-window-90-days-on-transaction_date>"
83
+ measures:
84
+ - name: engaged_subscriber_count
85
+ expr: "count(distinct case when is_paid = true and transaction_date >= current_date - interval '90 day' then admin_user_id end)"
86
+ ```
87
+
88
+ Preferred:
89
+ ```yaml
90
+ segments:
91
+ - name: engaged_subscriber
92
+ expr: "is_paid = true AND <date-window-90-days-on-transaction_date>"
93
+ measures:
94
+ - name: engaged_subscriber_count
95
+ expr: "count(distinct admin_user_id)"
96
+ segments: [engaged_subscriber]
97
+ ```
98
+
99
+ **Use computed dimensions for derived categories.** A flag like `is_power_user` belongs on `columns[]` with `expr`, not inlined into every measure.
100
+
101
+ **Extract repeated filter bundles into named segments.** If the same predicate appears on multiple measures of the same source, lift it to a `segments[]` entry and have each measure reference it. One edit updates every measure that depends on it.
102
+
103
+ **Never write a standalone file on a manifest-backed name.** If `sl_discover({ query: "<table-or-source-name>" })` finds an existing schema for that name, you MUST write an overlay. A standalone with `sql:` or `table:` on a manifest-backed name clobbers the inherited columns and joins; `sl_write_source` and `sl_validate` both reject this shape with a clear fix hint. Always run `sl_discover` before your first write on any existing name.
104
+
105
+ Overlay before/after examples:
106
+
107
+ ```yaml
108
+ # Wrong: patches an inherited manifest column through columns:
109
+ name: fct_orders
110
+ columns:
111
+ - name: status
112
+ descriptions:
113
+ user: "Order lifecycle status."
114
+ ```
115
+
116
+ ```yaml
117
+ # Right: patch inherited columns with column_overrides:
118
+ name: fct_orders
119
+ column_overrides:
120
+ - name: status
121
+ descriptions:
122
+ user: "Order lifecycle status."
123
+ columns:
124
+ - name: is_large_order
125
+ type: boolean
126
+ expr: "amount > 1000"
127
+ ```
128
+
129
+ Overlay YAML may include `measures:`, `segments:`, `descriptions:`, `joins:`, `disable_joins:`, `exclude_columns:`, `column_overrides:`, and computed-only `columns:` entries with `expr` and `type`. Do not include `sql:`, `table:`, `grain:`, or base-table `columns:`.
130
+
131
+ **Prefer overlay decomposition over standalone SQL sources.** Before reaching for `source_type: sql`, check whether the metric decomposes into measures on existing overlays (including cross-source derived measures). Use `source_type: sql` only when:
132
+ - The metric requires per-user/per-entity derivation that cannot be expressed as a single `expr` (e.g., `EXISTS` over a time-windowed subset), OR
133
+ - The metric requires multi-step CTEs whose intermediate grain is not a column in any existing source.
134
+
135
+ When an `sql` source is unavoidable, note in its `descriptions` map which SL gap forced the choice so it can be retired once the primitive ships. It must target a name NOT in the manifest - pick a distinct one (e.g. `mrr_waterfall_rollup`, not `fct_orders`).
136
+
137
+ ## Slim standalone sources via `inherits_columns_from`
138
+
139
+ When a standalone SQL source filters or projects from a single manifest-backed base table (the common pattern for derived views like `aav_consignments` over `MARTS.CONSIGNMENTS`), set `inherits_columns_from:` to the base table's manifest key and list only column **names** in `columns:`. Compose-time enrichment fills `type`, `descriptions`, and `role` from the matching manifest column.
140
+
141
+ Discover the manifest key with `sl_discover` - pass the bare name (`CONSIGNMENTS`), the fully-qualified path (`ANALYTICS.MARTS.CONSIGNMENTS`), or any suffix; the tool resolves all forms and prints the canonical key in its output.
142
+
143
+ ```yaml
144
+ name: aav_consignments
145
+ descriptions:
146
+ user: AAV consignments - filtered view of MARTS.CONSIGNMENTS for the auto-auction-vaulting channel.
147
+ source_type: sql
148
+ sql: |
149
+ SELECT CONSIGNED_ITEM_ID, CASH_ADV_AMOUNT, ALT_VALUE_COMBINED, my_derived_flag
150
+ FROM MARTS.CONSIGNMENTS
151
+ WHERE IS_AUTO_AUCTION_VAULTING_SUBMISSION = TRUE
152
+ AND IS_CARD_SHOW_SUBMISSION = FALSE
153
+ AND CONSIGNMENT_CANCELED_FLAG = FALSE
154
+ inherits_columns_from: CONSIGNMENTS
155
+ grain: [CONSIGNED_ITEM_ID]
156
+ columns:
157
+ - { name: CONSIGNED_ITEM_ID } # type/descriptions inherited from manifest
158
+ - { name: CASH_ADV_AMOUNT }
159
+ - { name: ALT_VALUE_COMBINED }
160
+ - { name: my_derived_flag, type: boolean, expr: "CASH_ADV_AMOUNT > 0", descriptions: { user: "Computed locally - has any cash advance." } }
161
+ measures:
162
+ - name: total_cash_advance
163
+ expr: sum(CASH_ADV_AMOUNT)
164
+ ```
165
+
166
+ Rules:
167
+
168
+ - Inheritance fills only **blank** fields. If you set a `description` locally, it wins - useful when the base description is misleading in the filtered view.
169
+ - A column not in the manifest (a derived/aliased column, or one from a different table in a `JOIN`) needs its own `type` and `description` declared.
170
+ - If `inherits_columns_from` doesn't resolve, the source still loads, but every column without a type triggers a validator error on the warehouse probe - `sl_discover` first to confirm the key.
171
+ - Don't use `inherits_columns_from` for sources backed by `table:` (those should be overlays - see the rule against shadowing the manifest above).
172
+
173
+ ## Refinement - replace, don't append
174
+
175
+ When the user corrects a prior answer, the existing measure is wrong by the user's own standard. Replace it, don't add a parallel measure.
176
+
177
+ Signals that the current turn is a refinement:
178
+ - "no, I meant...", "actually use X", "exclude Y", "wait, by X I mean Z".
179
+ - Pushback on a prior result ("that's wrong because...", "this should be higher").
180
+ - Redefinition of a term used in an existing measure.
181
+
182
+ Distinguishing question: *would the prior measure still be correct for someone else asking the prior question?* If no → replace. If yes → add.
183
+
184
+ ## Edit SL vs document in wiki
185
+
186
+ If the user explicitly names an SL artifact and asks to change it, the primary
187
+ action is always an SL tool call. Examples:
188
+
189
+ - "edit the source", "edit the YAML", "edit `fct_intakes.yaml`" → `sl_edit_source` or
190
+ `sl_write_source`.
191
+ - "refine the measure", "change the filter on `active_users`", "fix the expr",
192
+ "add `is_test = false`" → `sl_edit_source` on the source that owns the measure.
193
+ - "don't create a new one, update the existing" → `sl_edit_source` (never `sl_write_source`
194
+ with a new source name; never `wiki_write` as the only action).
195
+
196
+ A wiki update may ALSO make sense in the same turn (owner note, lineage,
197
+ caveat), but it is never a substitute for editing the YAML when the user's
198
+ request is about changing the measure/source definition itself.
199
+
200
+ Wiki-only is correct when the user is documenting *about* the measure
201
+ (definition in business terms, owner, policy, glossary, examples of when to
202
+ use it) without changing its SQL expression or filters.
203
+
204
+ Before sl_write_source, call entity_details on the target table to confirm
205
+ column names and types match the YAML being written.
206
+
207
+ ## Identifier Verification Protocol
208
+
209
+ Before writing a wiki page or SL source on any topic:
210
+
211
+ 1. `discover_data({query: "<topic>"})` - see what wikis, SL sources, and raw
212
+ tables already exist. Prefer updating existing pages over creating new ones.
213
+
214
+ Before emitting any `schema.table` or `schema.table.column` into a wiki body,
215
+ SL source, `tables:` frontmatter, `sl_refs`, or `emit_unmapped_fallback`:
216
+
217
+ 2. `entity_details({connectionId, targets: [{display: "<identifier>"}]})` -
218
+ confirm the identifier resolves; inspect native types, FK/PK, and
219
+ sampleValues.
220
+ 3. For literal values from the source, such as status codes or plan tiers,
221
+ check whether they appear in `entity_details` sampleValues for the relevant
222
+ column. If sampleValues is short or the sample may have missed real values,
223
+ run a `sql_execution` probe with the same warehouse connection id:
224
+ `sql_execution({connectionId, sql: "SELECT DISTINCT <col> FROM <ref> LIMIT 50"})`.
225
+ 4. If the candidate identifier still does not resolve, do one of:
226
+ - Use `sql_execution({connectionId, sql: "SELECT 1 FROM <ref> LIMIT 0"})`.
227
+ If it errors, the identifier is fictional.
228
+ - Wrap the identifier in `[unverified - from <rawPath>]` in the wiki body,
229
+ citing the exact raw path that mentioned it.
230
+ - When recording `emit_unmapped_fallback` with `no_physical_table`, include
231
+ the failing probe error in `clarification`.
232
+ 5. Never copy `<schema>.<table>` placeholder strings from these instructions
233
+ into output.
234
+
235
+ ## Tool sequence
236
+
237
+ 1. `sl_discover` - see what source files exist.
238
+ 2. `sl_discover({ query: "<table-or-source-name>" })` - **REQUIRED before the first write on any name**. Shows columns/joins/grain from the manifest. If the call returns a schema, you MUST write an overlay, not a standalone. Skipping this is the #1 cause of accidentally shadowing the manifest.
239
+ 3. `sl_read_source({ connectionId, sourceName })` - read the raw YAML before editing.
240
+ 4. For modifications: `sl_edit_source({ connectionId, sourceName, yaml_edits: [{ oldText, newText, reason }] })` with exact-string replacements. `oldText` must match exactly and be unique in the file.
241
+ 5. For new sources or full rewrites: `sl_write_source({ connectionId, sourceName, source })` with the full structured source definition.
242
+ 6. For join discovery: use `sql_execution({connectionId: "warehouse", sql: "SELECT count(*) FROM public.orders o JOIN public.customers c ON c.id = o.customer_id LIMIT 20"})` with the target warehouse connection id and dialect-correct table names to verify the join key exists in both tables and assess cardinality before declaring the join.
243
+ 7. Cross-reference knowledge: author the edge once on the **wiki** side via `sl_refs: [source_name]` in the page's front-matter. The reverse edge (wiki pages that cite an SL source) is derived automatically by the reconciler - do not add a `knowledge_refs:` field to SL YAMLs.
244
+ 8. `sl_validate` - run after writing or editing to surface schema issues, duplicate measure names, and cross-source validation errors. Read-only; the writes are already committed (the squash-at-end flow will collapse them into one commit).
245
+
246
+ ## Editing patterns
247
+
248
+ - **`sl_edit_source`** is the workhorse for additive changes: add a measure, add a join, tweak a description, replace a filter. Cheap, targeted, preserves the rest of the file.
249
+ - **`sl_write_source`** is for brand-new sources or when the entire file needs restructuring. It overwrites the file completely.
250
+ - Do NOT modify existing measures or their descriptions unless the current turn explicitly corrects them.
251
+ - During bundle/external ingest, include `rawPaths` on every `sl_write_source`/`sl_edit_source` call with only the raw files that directly support the SL action.
252
+
253
+ ## Worked example - additive overlay
254
+
255
+ Conversation:
256
+ - User: "What was the average order value last quarter?"
257
+ - Assistant fell back to SQL: `SELECT AVG(amount) FROM orders WHERE order_date >= ...`
258
+
259
+ Existing index: `orders [measures=0, joins=0] - candidate for enrichment`.
260
+
261
+ ```
262
+ sl_discover()
263
+ → orders.yaml does not exist yet
264
+ sl_discover({ query: "orders" })
265
+ → see grain, columns, no current overlay
266
+ sl_write_source({
267
+ connectionId: "warehouse",
268
+ sourceName: "orders",
269
+ source: {
270
+ name: "orders",
271
+ measures: [{
272
+ name: "avg_order_value",
273
+ expr: "avg(amount)",
274
+ description: "Mean order transaction amount - filter by product_category at query time"
275
+ }]
276
+ }
277
+ })
278
+ sl_validate({ connectionId: "warehouse" })
279
+ → clean
280
+ ```
281
+
282
+ The overlay only contains `name` and `measures` - no columns, grain, or table. Those are inherited from the manifest.
283
+
284
+ ## Worked example - refinement (replace)
285
+
286
+ Prior turn:
287
+ - [user] "How many active users do we have per region?"
288
+ - [assistant] "… used `count(*) filter: last_login_at > now() - interval '30 days'`"
289
+
290
+ Current user: "Wait, by 'active' I mean users who have placed an order in the last 30 days, not just logged in."
291
+
292
+ The existing `users.active_count` measure is wrong by the new definition.
293
+
294
+ ```
295
+ sl_read_source({ connectionId: "warehouse", sourceName: "users" })
296
+ → see the wrong measure
297
+ sl_edit_source({
298
+ connectionId: "warehouse",
299
+ sourceName: "users",
300
+ yaml_edits: [{
301
+ oldText: " - name: active_count\n expr: \"count(*)\"\n filter: \"last_login_at > now() - interval '30 days'\"\n description: Users who logged in within the last 30 days",
302
+ newText: " - name: active_count\n expr: \"count(distinct case when last_order_at > now() - interval '30 days' then user_id end)\"\n description: Users with at least one order in the last 30 days"
303
+ }]
304
+ })
305
+ sl_validate({ connectionId: "warehouse" })
306
+ ```
307
+
308
+ If you only added a new measure, the old incorrect `active_count` would stay and future queries would keep answering the wrong question.
309
+
310
+ ## Worked example - new join
311
+
312
+ Prior turn: user asked to correlate LTV with protocol count; assistant joined `fct_orders` with `fct_mau_multiprotocol` on `admin_user_id` in raw SQL.
313
+
314
+ ```
315
+ sl_read_source({ connectionId: "warehouse", sourceName: "fct_orders" })
316
+ → no joins section yet
317
+ sql_execution({
318
+ connectionId: "warehouse",
319
+ sql: "SELECT COUNT(*), COUNT(DISTINCT a.admin_user_id) FROM public.fct_orders a JOIN public.fct_mau_multiprotocol b ON a.admin_user_id = b.admin_user_id LIMIT 1"
320
+ })
321
+ → confirms cardinality (many orders per MAU row = many_to_one)
322
+ sl_edit_source({
323
+ connectionId: "warehouse",
324
+ sourceName: "fct_orders",
325
+ yaml_edits: [{
326
+ oldText: "measures:",
327
+ newText: "joins:\n - to: fct_mau_multiprotocol\n on: admin_user_id = fct_mau_multiprotocol.admin_user_id\n relationship: many_to_one\nmeasures:"
328
+ }]
329
+ })
330
+ sl_validate({ connectionId: "warehouse" })
331
+ ```
332
+
333
+ Always verify joins with `sql_execution` before adding them.
334
+
335
+ ## Rules recap
336
+
337
+ - Read existing sources before editing (`sl_read_source` or `sl_discover`).
338
+ - Prefer overlays over standalone sources on manifest-backed tables.
339
+ - Prefer generic measures + query-time filters over per-value variants.
340
+ - Time anchors and value lists belong in callers' filters, not in measure expressions.
341
+ - A measure whose filter matches a segment MUST reference the segment via `segments: [name]`.
342
+ - Extract repeated predicates into named segments.
343
+ - Use computed dimensions for derived categories.
344
+ - When the user corrects a prior answer, replace - don't append.
345
+ - Always run `sl_validate` after writing to surface issues.
346
+ - If nothing is worth capturing, respond without calling any SL write tool.
@@ -0,0 +1,160 @@
1
+ ---
2
+ name: wiki_capture
3
+ description: KTX's knowledge base - wiki pages for durable, reusable business knowledge. Covers capture workflow for user preferences, metric definitions, organizational conventions, and cross-references between wiki pages and semantic-layer sources. Loaded by the post-turn memory-agent only. The research agent reads wiki via `wiki_read`/`wiki_search` but does not write it.
4
+ callers: [memory_agent]
5
+ ---
6
+
7
+ # Wiki Capture
8
+
9
+ ## Role
10
+
11
+ The knowledge base stores durable, reusable business knowledge for an analytics assistant. Each page is a self-contained rule, definition, or convention that answers "how should this concept be handled in this organization?" - written once and reused across chats.
12
+
13
+ Scope selection is handled by the runtime:
14
+ - When user-scoped knowledge is enabled AND the caller is a chat turn, writes go to the user's **personal** scope.
15
+ - When the caller is an admin-driven ingest (`sourceType: 'external_ingest'`), writes go to the **global** scope.
16
+ - When user-scoped knowledge is disabled, all writes go to the global scope.
17
+
18
+ The `wiki_write` tool picks the right scope based on the session. Capture logic does not need to choose - focus on whether the content is worth capturing at all.
19
+
20
+ ## What to capture
21
+
22
+ Capture when the user or the ingested document expresses:
23
+ - A metric definition ("revenue means booked revenue after refunds").
24
+ - A filter or convention that should always apply ("exclude test accounts when reporting ARR").
25
+ - A mapping or alias ("mood_stress_sleep = Oxytocin protocol").
26
+ - A domain rule that is not visible from column names alone ("status = 'T' means terminated, not 'terminated'").
27
+ - A link or external system convention ("medplum_patient_id is the primary key in the EMR at https://emr.example/patients/{id}").
28
+
29
+ Do NOT capture:
30
+ - One-off requests ("answer under 100 words").
31
+ - Temporary instructions scoped to the current chat.
32
+ - Ad-hoc formatting preferences.
33
+ - Information already present in the semantic layer (column names, join paths, measure formulas - those belong in SL).
34
+ - **Query results, snapshots, or time-bounded benchmark tables.** Numbers go stale; pasting "Oct 2025: 25%, Nov 2025: 19.9%, …" creates misinformation as soon as new data lands. Reference the SL source by name (`sl_refs`) and let future query tools pull live data - the wiki captures the *rule* (definition, exclusion, segmentation), the SL source captures the *measure*, and query execution captures the *current values*.
35
+ - **Interpretive narrative tied to a specific snapshot** ("M1 retention degraded sharply from Dec 2025"). The observation is anchored to data that will move; the actionable convention (e.g., "always exclude in-progress cohorts") may be worth capturing on its own, but the snapshot-specific commentary is not.
36
+
37
+ If nothing is worth capturing, respond without calling any tool.
38
+
39
+ ## Workflow
40
+
41
+ 1. Read the wiki index (provided in the prompt) and decide whether the turn introduces durable knowledge.
42
+ 2. **Before writing**, search for related content so cross-references are accurate:
43
+ - `discover_data` first when a page relates to data or SL concepts - find
44
+ existing wiki pages, SL sources, and raw warehouse schema together.
45
+ - `wiki_search` with the topic - find related wiki pages to populate `refs`.
46
+ - `sl_discover` with the concept - if the page defines a metric (revenue, churn, retention, LTV, ARR, MRR, CAC, attribution, etc.), find matching SL sources or measures to populate `sl_refs`. If no matches, pass `sl_refs: []` so future readers know you checked.
47
+ 3. If updating an existing page, `wiki_read` it first. Use the returned `structured.content` or markdown body as the exact stored text for targeted replacements; current tags, refs, and sl_refs are returned in structured metadata.
48
+ 4. `wiki_write` to create or update. Prefer merging into an existing page over creating a new one.
49
+ 5. `wiki_remove` only when a page is truly obsolete - not to replace stale content (update it instead).
50
+
51
+ For bundle/external ingest, include `rawPaths` on every `wiki_write`/`wiki_remove` call with only the raw files that directly support that wiki action. This keeps ingest provenance tied to the actual source file, not every file in the WorkUnit.
52
+
53
+ ## Identifier Verification Protocol
54
+
55
+ Before writing a wiki page or SL source on any topic:
56
+
57
+ 1. `discover_data({query: "<topic>"})` - see what wikis, SL sources, and raw
58
+ tables already exist. Prefer updating existing pages over creating new ones.
59
+
60
+ Before emitting any `schema.table` or `schema.table.column` into a wiki body,
61
+ SL source, `tables:` frontmatter, `sl_refs`, or `emit_unmapped_fallback`:
62
+
63
+ 2. `entity_details({connectionId, targets: [{display: "<identifier>"}]})` -
64
+ confirm the identifier resolves; inspect native types, FK/PK, and
65
+ sampleValues.
66
+ 3. For literal values from the source, such as status codes or plan tiers,
67
+ check whether they appear in `entity_details` sampleValues for the relevant
68
+ column. If sampleValues is short or the sample may have missed real values,
69
+ run a `sql_execution` probe with the same warehouse connection id:
70
+ `sql_execution({connectionId, sql: "SELECT DISTINCT <col> FROM <ref> LIMIT 50"})`.
71
+ 4. If the candidate identifier still does not resolve, do one of:
72
+ - Use `sql_execution({connectionId, sql: "SELECT 1 FROM <ref> LIMIT 0"})`.
73
+ If it errors, the identifier is fictional.
74
+ - Wrap the identifier in `[unverified - from <rawPath>]` in the wiki body,
75
+ citing the exact raw path that mentioned it.
76
+ - When recording `emit_unmapped_fallback` with `no_physical_table`, include
77
+ the failing probe error in `clarification`.
78
+ 5. Never copy `<schema>.<table>` placeholder strings from these instructions
79
+ into output.
80
+
81
+ ## Keys, summaries, and content
82
+
83
+ - **Keys** are short kebab-case topic identifiers: `leads-source-filter`, `revenue-definition`, `churn-calculation`. No namespacing, no prefixes.
84
+ - **Summary** is a one-line hook (≤200 chars) shown in the index.
85
+ - **Content** is concise markdown - actionable rules, not prose.
86
+
87
+ ```
88
+ ## [Topic Title]
89
+ - Rule or preference statement
90
+ - Another rule if applicable
91
+ ```
92
+
93
+ Prefer fewer, richer pages over many thin ones. Each page covers one coherent topic thoroughly. If the new information relates to an existing page, update that page instead of fragmenting the knowledge.
94
+
95
+ ## Tags, refs, sl_refs
96
+
97
+ The `wiki_write` tool accepts three array fields that go into the page frontmatter:
98
+
99
+ - **`tags`**: 1–3 short lowercase topic tags (`["finance"]`, `["data-quality"]`). Call `wiki_list_tags` first to reuse existing tags for consistency.
100
+ - **`refs`**: keys of related wiki pages. Add when the new page materially depends on concepts from another (e.g., a churn definition that uses the paid-orders filter from a revenue definition). Don't add refs just because pages share a topic area.
101
+ - **`sl_refs`**: names of SL sources or measures the page relates to. Format: `"source_name"` or `"source_name.measure_name"`. Discover via `sl_discover` → inspect with `sl_read_source` → include the confirmed matches.
102
+
103
+ Wiki page keys must be flat slugs. Use `large-contract-requesters`, not
104
+ `historic-sql/large-contract-requesters`. Use `tags`, `source`, and content
105
+ headings for grouping.
106
+
107
+ ### Replace semantics
108
+
109
+ All three fields use REPLACE semantics on update:
110
+
111
+ - Omit the field → existing value is kept.
112
+ - Pass `[]` → field is cleared.
113
+ - Pass `[values]` → replaces existing with exactly those values (no merging).
114
+
115
+ ## Editing existing pages
116
+
117
+ Two modes:
118
+
119
+ - **Full content** - pass `content` to rewrite the whole page. Use when the page structure needs to change.
120
+ - **Targeted edits** - pass `replacements: [{ oldText, newText }]` to apply exact-string replacements. Use for small updates; preserves the rest of the page.
121
+
122
+ When editing, read the page first so the edit matches exact whitespace and indentation.
123
+
124
+ ## Overriding an organization rule
125
+
126
+ Organization (GLOBAL) pages are read-only from a user's personal-scope session. To override a global rule for a single user, write a personal page with the **same key**. At read time the USER page wins.
127
+
128
+ ## Worked example - capturing a metric with cross-references
129
+
130
+ User says: "Going forward, the official refund rate is total refunded amount divided by total gross transaction amount."
131
+
132
+ ```
133
+ wiki_list_tags()
134
+ → existing tags include "finance"
135
+ wiki_search({ query: "refund revenue paid orders" })
136
+ → returns `revenue-definition` (related - defines paid-orders filter)
137
+ sl_discover({ query: "refund rate" })
138
+ → returns fct_orders (score 0.08), fct_gaap_revenue (0.06)
139
+ sl_read_source({ connectionId: "warehouse", sourceName: "fct_orders" })
140
+ → confirms amount_refunded_dollars and transaction_amount_dollars exist
141
+ wiki_write({
142
+ key: "refund-rate-definition",
143
+ summary: "Refund rate = refunded amount / gross transaction amount",
144
+ content: "## Refund Rate\n- Definition: sum(amount_refunded_dollars) / sum(transaction_amount_dollars)\n- Source of truth: fct_orders\n- Related: see revenue-definition for paid-orders filter.",
145
+ tags: ["finance"],
146
+ refs: ["revenue-definition"],
147
+ sl_refs: ["fct_orders.refund_rate_pct", "fct_orders"]
148
+ })
149
+ ```
150
+
151
+ Search-then-write order matters. Cross-references are part of the page's identity, not an afterthought.
152
+
153
+ ## Rules
154
+
155
+ - Read existing pages before updating them.
156
+ - Prefer merging into an existing page over creating a new one.
157
+ - Prefer fewer, richer pages over many thin ones.
158
+ - Write content as clear, actionable rules - not narrative prose.
159
+ - Discover cross-references via search before writing, not after.
160
+ - If nothing is worth capturing, respond without calling any tool.
@@ -0,0 +1,14 @@
1
+ import { type KtxEmbeddingProviderDeps } from './embedding-provider.js';
2
+ import type { KtxEmbeddingConfig } from './types.js';
3
+ export type KtxEmbeddingHealthCheckResult = {
4
+ ok: true;
5
+ } | {
6
+ ok: false;
7
+ message: string;
8
+ };
9
+ export interface KtxEmbeddingHealthCheckOptions {
10
+ text?: string;
11
+ timeoutMs?: number;
12
+ deps?: KtxEmbeddingProviderDeps;
13
+ }
14
+ export declare function runKtxEmbeddingHealthCheck(config: KtxEmbeddingConfig, options?: KtxEmbeddingHealthCheckOptions): Promise<KtxEmbeddingHealthCheckResult>;
@@ -0,0 +1,36 @@
1
+ import { createKtxEmbeddingProvider } from './embedding-provider.js';
2
+ function redactHealthCheckMessage(message, config) {
3
+ const secrets = [config.openai?.apiKey].filter((value) => typeof value === 'string' && value.length > 0);
4
+ return secrets.reduce((current, secret) => current.split(secret).join('[redacted]'), message);
5
+ }
6
+ async function withTimeout(promise, timeoutMs) {
7
+ let timeout;
8
+ const timeoutPromise = new Promise((_resolve, reject) => {
9
+ timeout = setTimeout(() => reject(new Error(`Embedding health check timed out after ${timeoutMs}ms`)), timeoutMs);
10
+ });
11
+ try {
12
+ return await Promise.race([promise, timeoutPromise]);
13
+ }
14
+ finally {
15
+ if (timeout) {
16
+ clearTimeout(timeout);
17
+ }
18
+ }
19
+ }
20
+ export async function runKtxEmbeddingHealthCheck(config, options = {}) {
21
+ try {
22
+ const provider = createKtxEmbeddingProvider(config, options.deps);
23
+ const embedding = await withTimeout(provider.embed(options.text ?? 'KTX embedding health check'), options.timeoutMs ?? 15_000);
24
+ if (embedding.length !== config.dimensions) {
25
+ return {
26
+ ok: false,
27
+ message: `Embedding provider ${config.backend} returned vector with ${embedding.length} dimensions; expected ${config.dimensions}`,
28
+ };
29
+ }
30
+ return { ok: true };
31
+ }
32
+ catch (error) {
33
+ const message = error instanceof Error ? error.message : String(error);
34
+ return { ok: false, message: redactHealthCheckMessage(message, config) };
35
+ }
36
+ }
@@ -0,0 +1,72 @@
1
+ import { describe, expect, it, vi } from 'vitest';
2
+ import { runKtxEmbeddingHealthCheck } from './embedding-health.js';
3
+ describe('KTX embedding health check', () => {
4
+ it('runs a one-shot OpenAI embedding check through the configured provider', async () => {
5
+ const createOpenAIClient = vi.fn(() => ({
6
+ embeddings: {
7
+ create: vi.fn().mockResolvedValue({
8
+ data: [{ index: 0, embedding: [0.1, 0.2, 0.3] }],
9
+ }),
10
+ },
11
+ }));
12
+ await expect(runKtxEmbeddingHealthCheck({
13
+ backend: 'openai',
14
+ model: 'text-embedding-3-small',
15
+ dimensions: 3,
16
+ openai: { apiKey: 'sk-openai-test' }, // pragma: allowlist secret
17
+ }, { deps: { createOpenAIClient } })).resolves.toEqual({ ok: true });
18
+ expect(createOpenAIClient).toHaveBeenCalledWith({ apiKey: 'sk-openai-test', baseURL: undefined }); // pragma: allowlist secret
19
+ });
20
+ it('returns failed when the provider returns the wrong dimensions', async () => {
21
+ const createOpenAIClient = vi.fn(() => ({
22
+ embeddings: {
23
+ create: vi.fn().mockResolvedValue({
24
+ data: [{ index: 0, embedding: [0.1, 0.2] }],
25
+ }),
26
+ },
27
+ }));
28
+ await expect(runKtxEmbeddingHealthCheck({
29
+ backend: 'openai',
30
+ model: 'text-embedding-3-small',
31
+ dimensions: 3,
32
+ openai: { apiKey: 'sk-openai-test' }, // pragma: allowlist secret
33
+ }, { deps: { createOpenAIClient } })).resolves.toEqual({
34
+ ok: false,
35
+ message: 'Embedding provider openai returned vector with 2 dimensions; expected 3',
36
+ });
37
+ });
38
+ it('redacts credential values from health-check failures', async () => {
39
+ const createOpenAIClient = vi.fn(() => ({
40
+ embeddings: {
41
+ create: vi.fn(async () => {
42
+ throw new Error('401 invalid api key sk-openai-secret');
43
+ }),
44
+ },
45
+ }));
46
+ await expect(runKtxEmbeddingHealthCheck({
47
+ backend: 'openai',
48
+ model: 'text-embedding-3-small',
49
+ dimensions: 3,
50
+ openai: { apiKey: 'sk-openai-secret' }, // pragma: allowlist secret
51
+ }, { deps: { createOpenAIClient } })).resolves.toEqual({
52
+ ok: false,
53
+ message: '401 invalid api key [redacted]',
54
+ });
55
+ });
56
+ it('returns failed when the health check times out', async () => {
57
+ const createOpenAIClient = vi.fn(() => ({
58
+ embeddings: {
59
+ create: vi.fn(() => new Promise(() => undefined)),
60
+ },
61
+ }));
62
+ await expect(runKtxEmbeddingHealthCheck({
63
+ backend: 'openai',
64
+ model: 'text-embedding-3-small',
65
+ dimensions: 3,
66
+ openai: { apiKey: 'sk-openai-test' }, // pragma: allowlist secret
67
+ }, { timeoutMs: 1, deps: { createOpenAIClient } })).resolves.toEqual({
68
+ ok: false,
69
+ message: 'Embedding health check timed out after 1ms',
70
+ });
71
+ });
72
+ });