databao-context-engine 0.1.3__py3-none-any.whl → 0.1.4.dev1__py3-none-any.whl

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 (22) hide show
  1. databao_context_engine/build_sources/plugin_execution.py +1 -1
  2. databao_context_engine/cli/add_datasource_config.py +1 -1
  3. databao_context_engine/cli/info.py +1 -0
  4. databao_context_engine/introspection/property_extract.py +10 -25
  5. databao_context_engine/mcp/mcp_server.py +10 -7
  6. databao_context_engine/plugins/base_db_plugin.py +5 -2
  7. databao_context_engine/plugins/databases/athena_introspector.py +1 -1
  8. databao_context_engine/plugins/databases/clickhouse_introspector.py +1 -1
  9. databao_context_engine/plugins/databases/duckdb_introspector.py +2 -4
  10. databao_context_engine/plugins/databases/introspection_model_builder.py +1 -1
  11. databao_context_engine/plugins/databases/mssql_introspector.py +2 -2
  12. databao_context_engine/plugins/databases/mysql_introspector.py +1 -1
  13. databao_context_engine/plugins/databases/snowflake_introspector.py +1 -1
  14. databao_context_engine/plugins/duckdb_tools.py +18 -0
  15. databao_context_engine/plugins/resources/parquet_introspector.py +5 -16
  16. databao_context_engine/project/info.py +3 -0
  17. {databao_context_engine-0.1.3.dist-info → databao_context_engine-0.1.4.dev1.dist-info}/METADATA +2 -2
  18. {databao_context_engine-0.1.3.dist-info → databao_context_engine-0.1.4.dev1.dist-info}/RECORD +20 -21
  19. {databao_context_engine-0.1.3.dist-info → databao_context_engine-0.1.4.dev1.dist-info}/WHEEL +1 -1
  20. databao_context_engine/mcp/all_results_tool.py +0 -5
  21. databao_context_engine/mcp/retrieve_tool.py +0 -14
  22. {databao_context_engine-0.1.3.dist-info → databao_context_engine-0.1.4.dev1.dist-info}/entry_points.txt +0 -0
@@ -2,13 +2,13 @@ from dataclasses import dataclass
2
2
  from datetime import datetime
3
3
  from typing import Any, cast
4
4
 
5
+ from databao_context_engine.datasources.types import DatasourceId, PreparedConfig, PreparedDatasource
5
6
  from databao_context_engine.pluginlib.build_plugin import (
6
7
  BuildDatasourcePlugin,
7
8
  BuildFilePlugin,
8
9
  BuildPlugin,
9
10
  )
10
11
  from databao_context_engine.pluginlib.plugin_utils import execute_datasource_plugin, execute_file_plugin
11
- from databao_context_engine.datasources.types import PreparedConfig, PreparedDatasource, DatasourceId
12
12
 
13
13
 
14
14
  @dataclass()
@@ -6,11 +6,11 @@ from typing import Any
6
6
  import click
7
7
 
8
8
  from databao_context_engine import (
9
+ ConfigPropertyDefinition,
9
10
  DatabaoContextPluginLoader,
10
11
  DatabaoContextProjectManager,
11
12
  DatasourceId,
12
13
  DatasourceType,
13
- ConfigPropertyDefinition,
14
14
  )
15
15
  from databao_context_engine.pluginlib.config import ConfigUnionPropertyDefinition
16
16
 
@@ -15,6 +15,7 @@ def _generate_info_string(command_info: DceInfo) -> str:
15
15
  info_lines = []
16
16
  info_lines.append(f"Databao context engine version: {command_info.version}")
17
17
  info_lines.append(f"Databao context engine storage dir: {command_info.dce_path}")
18
+ info_lines.append(f"Databao context engine plugins: {command_info.plugin_ids}")
18
19
 
19
20
  info_lines.append("")
20
21
 
@@ -1,15 +1,15 @@
1
1
  import types
2
2
  from dataclasses import MISSING, fields, is_dataclass
3
- from typing import Annotated, Any, ForwardRef, Union, get_origin, get_type_hints, get_args
3
+ from typing import Annotated, Any, ForwardRef, Union, get_args, get_origin, get_type_hints
4
4
 
5
- from pydantic import BaseModel, _internal
5
+ from pydantic import BaseModel
6
6
  from pydantic_core import PydanticUndefinedType
7
7
 
8
8
  from databao_context_engine.pluginlib.config import (
9
9
  ConfigPropertyAnnotation,
10
10
  ConfigPropertyDefinition,
11
- ConfigUnionPropertyDefinition,
12
11
  ConfigSinglePropertyDefinition,
12
+ ConfigUnionPropertyDefinition,
13
13
  )
14
14
 
15
15
 
@@ -59,18 +59,14 @@ def _get_property_list_from_dataclass(parent_type: type) -> list[ConfigPropertyD
59
59
  raise ValueError(f"{parent_type} is not a dataclass")
60
60
 
61
61
  dataclass_fields = fields(parent_type)
62
+ type_hints = get_type_hints(parent_type, include_extras=True)
62
63
 
63
64
  result = []
64
65
  for field in dataclass_fields:
65
66
  has_field_default = field.default is not None and field.default != MISSING
66
67
 
67
- if isinstance(field.type, str):
68
- try:
69
- property_type = _evaluate_type_string(field.type)
70
- except Exception:
71
- continue
72
- else:
73
- property_type = field.type
68
+ # Use the type hints if the field type wasn't resolved (aka. if it is a ForwardRef or a str)
69
+ property_type = type_hints[field.name] if isinstance(field.type, ForwardRef | str) else field.type
74
70
 
75
71
  property_for_field = _create_property(
76
72
  property_type=property_type,
@@ -89,6 +85,10 @@ def _get_property_list_from_pydantic_base_model(parent_type: type):
89
85
  if not issubclass(parent_type, BaseModel):
90
86
  raise ValueError(f"{parent_type} is not a Pydantic BaseModel")
91
87
 
88
+ if any(isinstance(field.annotation, ForwardRef) for field in parent_type.model_fields.values()):
89
+ # If any field's future type wasn't resolved yet, we rebuild the model to resolve them
90
+ parent_type.model_rebuild(force=True)
91
+
92
92
  pydantic_fields = parent_type.model_fields
93
93
  result = []
94
94
 
@@ -214,18 +214,3 @@ def compute_default_value(
214
214
  return str(property_default)
215
215
 
216
216
  return None
217
-
218
-
219
- def _evaluate_type_string(property_type: str) -> type:
220
- try:
221
- # Using a pydantic internal function for this, to avoid having to implement type evaluation manually...
222
- return _internal._typing_extra.eval_type(property_type)
223
- except Exception as initial_error:
224
- try:
225
- # Try to convert it ourselves if Pydantic didn't work
226
- return ForwardRef(property_type)._evaluate( # type: ignore[return-value]
227
- globalns=globals(), localns=locals(), recursive_guard=frozenset()
228
- )
229
- except Exception as e:
230
- # Ignore if we didn't manage to convert the str to a type
231
- raise e from initial_error
@@ -1,5 +1,6 @@
1
1
  import logging
2
2
  from contextlib import asynccontextmanager
3
+ from datetime import date
3
4
  from pathlib import Path
4
5
  from typing import Literal
5
6
 
@@ -7,8 +8,6 @@ from mcp.server import FastMCP
7
8
  from mcp.types import ToolAnnotations
8
9
 
9
10
  from databao_context_engine import DatabaoContextEngine
10
- from databao_context_engine.mcp.all_results_tool import run_all_results_tool
11
- from databao_context_engine.mcp.retrieve_tool import run_retrieve_tool
12
11
 
13
12
  logger = logging.getLogger(__name__)
14
13
 
@@ -41,19 +40,23 @@ class McpServer:
41
40
  annotations=ToolAnnotations(readOnlyHint=True, idempotentHint=True, openWorldHint=False),
42
41
  )
43
42
  def all_results_tool():
44
- return run_all_results_tool(self._databao_context_engine)
43
+ return self._databao_context_engine.get_all_contexts_formatted()
45
44
 
46
45
  @mcp.tool(
47
46
  description="Retrieve the context built from various resources, including databases, dbt tools, plain and structured files, to retrieve relevant information",
48
47
  annotations=ToolAnnotations(readOnlyHint=True, idempotentHint=True, openWorldHint=False),
49
48
  )
50
49
  def retrieve_tool(text: str, limit: int | None):
51
- return run_retrieve_tool(
52
- databao_context_engine=self._databao_context_engine,
53
- text=text,
54
- limit=limit or 50,
50
+ retrieve_results = self._databao_context_engine.search_context(
51
+ retrieve_text=text, limit=limit, export_to_file=False
55
52
  )
56
53
 
54
+ display_results = [context_search_result.context_result for context_search_result in retrieve_results]
55
+
56
+ display_results.append(f"\nToday's date is {date.today()}")
57
+
58
+ return "\n".join(display_results)
59
+
57
60
  return mcp
58
61
 
59
62
  def run(self, transport: McpTransport):
@@ -1,6 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
- from typing import Any, TypeVar
3
+ from typing import Annotated, Any, TypeVar
4
4
 
5
5
  from pydantic import BaseModel, ConfigDict, Field
6
6
 
@@ -8,6 +8,7 @@ from databao_context_engine.pluginlib.build_plugin import (
8
8
  BuildDatasourcePlugin,
9
9
  EmbeddableChunk,
10
10
  )
11
+ from databao_context_engine.pluginlib.config import ConfigPropertyAnnotation
11
12
  from databao_context_engine.plugins.databases.base_introspector import BaseIntrospector
12
13
  from databao_context_engine.plugins.databases.database_chunker import build_database_chunks
13
14
  from databao_context_engine.plugins.databases.introspection_scope import IntrospectionScope
@@ -17,7 +18,9 @@ class BaseDatabaseConfigFile(BaseModel):
17
18
  model_config = ConfigDict(populate_by_name=True)
18
19
  name: str | None = Field(default=None)
19
20
  type: str
20
- introspection_scope: IntrospectionScope | None = Field(default=None, alias="introspection-scope")
21
+ introspection_scope: Annotated[
22
+ IntrospectionScope | None, ConfigPropertyAnnotation(ignored_for_config_wizard=True)
23
+ ] = Field(default=None, alias="introspection-scope")
21
24
 
22
25
 
23
26
  T = TypeVar("T", bound=BaseDatabaseConfigFile)
@@ -1,6 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
- from typing import Any, Annotated
3
+ from typing import Annotated, Any
4
4
 
5
5
  from pyathena import connect
6
6
  from pyathena.cursor import DictCursor
@@ -1,6 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
- from typing import Any, Annotated
3
+ from typing import Annotated, Any
4
4
 
5
5
  import clickhouse_connect
6
6
  from pydantic import BaseModel, Field
@@ -7,6 +7,7 @@ from databao_context_engine.plugins.base_db_plugin import BaseDatabaseConfigFile
7
7
  from databao_context_engine.plugins.databases.base_introspector import BaseIntrospector, SQLQuery
8
8
  from databao_context_engine.plugins.databases.databases_types import DatabaseSchema
9
9
  from databao_context_engine.plugins.databases.introspection_model_builder import IntrospectionModelBuilder
10
+ from databao_context_engine.plugins.duckdb_tools import fetchall_dicts
10
11
 
11
12
 
12
13
  class DuckDBConfigFile(BaseDatabaseConfigFile):
@@ -319,7 +320,4 @@ class DuckDBIntrospector(BaseIntrospector[DuckDBConfigFile]):
319
320
 
320
321
  def _fetchall_dicts(self, connection, sql: str, params) -> list[dict]:
321
322
  cur = connection.cursor()
322
- cur.execute(sql, params or [])
323
- columns = [desc[0].lower() for desc in cur.description] if cur.description else []
324
- rows = cur.fetchall()
325
- return [dict(zip(columns, row)) for row in rows]
323
+ return fetchall_dicts(cur, sql, params)
@@ -5,13 +5,13 @@ from databao_context_engine.plugins.databases.databases_types import (
5
5
  CheckConstraint,
6
6
  DatabaseColumn,
7
7
  DatabasePartitionInfo,
8
+ DatabaseSchema,
8
9
  DatabaseTable,
9
10
  DatasetKind,
10
11
  ForeignKey,
11
12
  ForeignKeyColumnMap,
12
13
  Index,
13
14
  KeyConstraint,
14
- DatabaseSchema,
15
15
  )
16
16
 
17
17
 
@@ -1,9 +1,9 @@
1
1
  from __future__ import annotations
2
2
 
3
- from typing import Any, Mapping, Annotated
3
+ from typing import Annotated, Any, Mapping
4
4
 
5
5
  from mssql_python import connect # type: ignore[import-untyped]
6
- from pydantic import Field, BaseModel
6
+ from pydantic import BaseModel, Field
7
7
 
8
8
  from databao_context_engine.pluginlib.config import ConfigPropertyAnnotation
9
9
  from databao_context_engine.plugins.base_db_plugin import BaseDatabaseConfigFile
@@ -1,4 +1,4 @@
1
- from typing import Any, Annotated
1
+ from typing import Annotated, Any
2
2
 
3
3
  import pymysql
4
4
  from pydantic import BaseModel, Field
@@ -1,6 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
- from typing import Any, Dict, List, Annotated
3
+ from typing import Annotated, Any, Dict, List
4
4
 
5
5
  import snowflake.connector
6
6
  from pydantic import BaseModel, Field
@@ -0,0 +1,18 @@
1
+ from typing import Any
2
+
3
+ from databao_context_engine.pluginlib.config import DuckDBSecret
4
+
5
+
6
+ def generate_create_secret_sql(secret_name, duckdb_secret: DuckDBSecret) -> str:
7
+ parameters = [("type", duckdb_secret.type)] + list(duckdb_secret.properties.items())
8
+ return f"""CREATE SECRET {secret_name} (
9
+ {", ".join([f"{k} '{v}'" for (k, v) in parameters])}
10
+ );
11
+ """
12
+
13
+
14
+ def fetchall_dicts(cur, sql: str, params=None) -> list[dict[str, Any]]:
15
+ cur.execute(sql, params or [])
16
+ columns = [desc[0].lower() for desc in cur.description] if cur.description else []
17
+ rows = cur.fetchall()
18
+ return [dict(zip(columns, row)) for row in rows]
@@ -10,6 +10,7 @@ from duckdb import DuckDBPyConnection
10
10
  from pydantic import BaseModel, Field
11
11
 
12
12
  from databao_context_engine.pluginlib.config import DuckDBSecret
13
+ from databao_context_engine.plugins.duckdb_tools import fetchall_dicts, generate_create_secret_sql
13
14
 
14
15
  parquet_type = "resources/parquet"
15
16
 
@@ -49,14 +50,6 @@ class ParquetIntrospectionResult:
49
50
  files: list[ParquetFile]
50
51
 
51
52
 
52
- def generate_create_secret_sql(secret_name, duckdb_secret: DuckDBSecret) -> str:
53
- parameters = [("type", duckdb_secret.type)] + list(duckdb_secret.properties.items())
54
- return f"""CREATE SECRET {secret_name} (
55
- {", ".join([f"{k} {v}" for (k, v) in parameters])}
56
- );
57
- """
58
-
59
-
60
53
  @contextlib.contextmanager
61
54
  def _create_secret(conn: DuckDBPyConnection, duckdb_secret: DuckDBSecret):
62
55
  secret_name = duckdb_secret.name or "gen_secret_" + str(uuid.uuid4()).replace("-", "_")
@@ -97,10 +90,9 @@ class ParquetIntrospector:
97
90
  with self._connect(file_config) as conn:
98
91
  with conn.cursor() as cur:
99
92
  resolved_url = _resolve_url(file_config)
100
- cur.execute(f"SELECT * FROM parquet_file_metadata('{resolved_url}') LIMIT 1")
101
- columns = [desc[0].lower() for desc in cur.description] if cur.description else []
102
- rows = cur.fetchall()
103
- parquet_file_metadata = [dict(zip(columns, row)) for row in rows]
93
+ parquet_file_metadata = fetchall_dicts(
94
+ cur, f"SELECT * FROM parquet_file_metadata('{resolved_url}') LIMIT 1"
95
+ )
104
96
  if not parquet_file_metadata:
105
97
  raise ValueError(f"No parquet files found by url {resolved_url}")
106
98
  if not parquet_file_metadata or not parquet_file_metadata[0]["file_name"]:
@@ -110,10 +102,7 @@ class ParquetIntrospector:
110
102
  with self._connect(file_config) as conn:
111
103
  with conn.cursor() as cur:
112
104
  resolved_url = _resolve_url(file_config)
113
- cur.execute(f"SELECT * from parquet_metadata('{resolved_url}')")
114
- cols = [desc[0].lower() for desc in cur.description] if cur.description else []
115
- rows = cur.fetchall()
116
- file_metas = [dict(zip(cols, row)) for row in rows]
105
+ file_metas = fetchall_dicts(cur, f"SELECT * from parquet_metadata('{resolved_url}')")
117
106
 
118
107
  columns_per_file: dict[str, dict[int, ParquetColumn]] = defaultdict(defaultdict)
119
108
  for file_meta in file_metas:
@@ -3,6 +3,7 @@ from importlib.metadata import version
3
3
  from pathlib import Path
4
4
  from uuid import UUID
5
5
 
6
+ from databao_context_engine.plugins.plugin_loader import load_plugins
6
7
  from databao_context_engine.project.layout import validate_project_dir
7
8
  from databao_context_engine.system.properties import get_dce_path
8
9
 
@@ -34,6 +35,7 @@ class DceInfo:
34
35
 
35
36
  version: str
36
37
  dce_path: Path
38
+ plugin_ids: list[str]
37
39
 
38
40
  project_info: DceProjectInfo
39
41
 
@@ -50,6 +52,7 @@ def get_databao_context_engine_info(project_dir: Path) -> DceInfo:
50
52
  return DceInfo(
51
53
  version=get_dce_version(),
52
54
  dce_path=get_dce_path(),
55
+ plugin_ids=[plugin.id for plugin in load_plugins().values()],
53
56
  project_info=_get_project_info(project_dir),
54
57
  )
55
58
 
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: databao-context-engine
3
- Version: 0.1.3
4
- Summary: Add your description here
3
+ Version: 0.1.4.dev1
4
+ Summary: Semantic context for your LLMs — generated automatically
5
5
  Requires-Dist: click>=8.3.0
6
6
  Requires-Dist: duckdb>=1.4.3
7
7
  Requires-Dist: pyyaml>=6.0.3
@@ -4,12 +4,12 @@ databao_context_engine/build_sources/build_runner.py,sha256=YXU-EJoJ5nzGePrvWA8n
4
4
  databao_context_engine/build_sources/build_service.py,sha256=eywJzpvZUVrj-JYxXii_kxhTBzVUT0xfbNtdAFcpGWQ,1624
5
5
  databao_context_engine/build_sources/build_wiring.py,sha256=7Jw78gCy57Zy0e5nUnAqQmPdTkW6tztlHnQmRJ1cNkE,3192
6
6
  databao_context_engine/build_sources/export_results.py,sha256=E3HP4uaQKYDrmAJKFWwDT190j7ZKfO791_pjKebTMQM,1773
7
- databao_context_engine/build_sources/plugin_execution.py,sha256=dcnnZN-JQxmpHMCVdA6pUtbJwfJRHNmaWnu1f0ySL6M,2211
7
+ databao_context_engine/build_sources/plugin_execution.py,sha256=Icl2oJeyL98aD8m0unmnRdtCOtaZE6iRGtmCUFA_eYk,2211
8
8
  databao_context_engine/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- databao_context_engine/cli/add_datasource_config.py,sha256=ukgore2ZG1Gen2A8LCoweOxuNhcVonhT3p_nYbtyAow,6371
9
+ databao_context_engine/cli/add_datasource_config.py,sha256=ESAIkLb_g2Bg-WjorZ6JFSwxh23SY-g1T699_fxip54,6371
10
10
  databao_context_engine/cli/commands.py,sha256=ntqoThbplgrHPtDy5kKna1Cz_iu8UKJQG6q7G6UmsCs,7106
11
11
  databao_context_engine/cli/datasources.py,sha256=kHbXhEnDVaYXTRAE3WeaDGohH1Y9cwyYjjcycQ8eh1U,2376
12
- databao_context_engine/cli/info.py,sha256=xX9io82Nzl-k7Xcds8WLTGzzBYorEYh10TlFJvXquyg,1119
12
+ databao_context_engine/cli/info.py,sha256=2iegfvRAxMae3KkWMDu-BOnljeJMVQ5u8P5k_8nOKpc,1203
13
13
  databao_context_engine/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  databao_context_engine/config/log_config.yaml,sha256=hH2NPumufcyig8L-7Z_DbLQ88_G2N6CAEl5fvHafeAw,360
15
15
  databao_context_engine/config/logging.py,sha256=66k7x3ftEdHx-CKqbOss4pqZfGn4nMFv7AzVPs9aVnY,1525
@@ -26,7 +26,7 @@ databao_context_engine/event_journal/writer.py,sha256=abkl2SPHYzO8XAUsjbtrcXm6WQ
26
26
  databao_context_engine/generate_configs_schemas.py,sha256=OBX1Motg_d-fmZCUnDoF-3c8dYbDcTOJmhD7F0WJHH8,3017
27
27
  databao_context_engine/init_project.py,sha256=enLvYOd5MpGYVdWly7DuLMzPLUEE6130bEuxh0YZft8,1496
28
28
  databao_context_engine/introspection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
- databao_context_engine/introspection/property_extract.py,sha256=61cTxGBUgb9px-hA-S-e5Ex68GjNoNoN3HgwuaGK6ss,8223
29
+ databao_context_engine/introspection/property_extract.py,sha256=m7DL8SWNIipi8uE9q4k3TDvlga9YeKyKh85CvFt_fqI,7816
30
30
  databao_context_engine/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
31
  databao_context_engine/llm/config.py,sha256=geIygR-9maeKbvmcO5J3iNZXKS4LZc7zpKYyaH8vCoI,463
32
32
  databao_context_engine/llm/descriptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -42,10 +42,8 @@ databao_context_engine/llm/runtime.py,sha256=jf_sPDF4s_fChFj2enLcEIBXIWjSjaYNh-l
42
42
  databao_context_engine/llm/service.py,sha256=rM_DrF2F7NylxBhtfVGporUcv91eR_nF1mF--Zxh2tc,5978
43
43
  databao_context_engine/main.py,sha256=3gWwEc9GZJUFANJtW9Fx4smVzib_sDtFkBGPILjisaI,350
44
44
  databao_context_engine/mcp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
45
- databao_context_engine/mcp/all_results_tool.py,sha256=rwd19nhydLtjxaNaYEKQuJkQwuEID0o_1YdwvvyIhls,200
46
45
  databao_context_engine/mcp/mcp_runner.py,sha256=bnB2a-_P1zOlDBqpyFIq4n2hWkfwqb6G7dHb3-3Q2I0,468
47
- databao_context_engine/mcp/mcp_server.py,sha256=p8FZxqa43ZzWuz8EYJn70RLE0a8-eoPH7Pb2QJ7mmiI,2133
48
- databao_context_engine/mcp/retrieve_tool.py,sha256=U5K5okX7DyrKQ_-1nZ6YOP_oUjIBLEv7JFjz3f-eJMw,611
46
+ databao_context_engine/mcp/mcp_server.py,sha256=fXkl-LSXjWQwYoranWgBUh5qrIcTv3ZOJvKfbnf0HwM,2231
49
47
  databao_context_engine/plugin_loader.py,sha256=2vq7rCNQuxQvnGqF758Ke2IzCO-11dLD2lH8BKP1b68,4829
50
48
  databao_context_engine/pluginlib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
49
  databao_context_engine/pluginlib/build_plugin.py,sha256=v90JU4JRqYb4BbMvx833lPVafBUOE7Bhpt8SOWdBrZU,4105
@@ -53,23 +51,24 @@ databao_context_engine/pluginlib/config.py,sha256=fAu1AuxSFI6LOoAyvwuFE5p11bOsHp
53
51
  databao_context_engine/pluginlib/plugin_utils.py,sha256=f76ksdMUG3Wy4KOytUYxLMrq9iOHytu3QF8wc5NzzJE,2471
54
52
  databao_context_engine/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
53
  databao_context_engine/plugins/athena_db_plugin.py,sha256=53Dui_V7MunJ3jmyYEAmkZofuHtQP-Ic3bNhsxTwAyc,456
56
- databao_context_engine/plugins/base_db_plugin.py,sha256=uuzKSEtszKnxL-cBg5ya6TxQHq8oqlIicUbZlkoyxlI,1562
54
+ databao_context_engine/plugins/base_db_plugin.py,sha256=NkDR7aHqskoBwtOJbfiMdn_nWNe94lbq_ZbciiDbfiI,1733
57
55
  databao_context_engine/plugins/clickhouse_db_plugin.py,sha256=4J1CNoeWPRvgmgkww7CQALxTP5D9eSLl1TpDRgwHBew,509
58
56
  databao_context_engine/plugins/databases/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
59
- databao_context_engine/plugins/databases/athena_introspector.py,sha256=O8CfPzj5y0gCLBAjte8bvo7F9c2PGH6ldP6uq8_0Wt4,5702
57
+ databao_context_engine/plugins/databases/athena_introspector.py,sha256=--F8sbtPdcCUtDfMzx85_zH0sBlArJigM6Aa1mmn00w,5702
60
58
  databao_context_engine/plugins/databases/base_introspector.py,sha256=aXMWJ13LdYs1pSaGIhtA8zefe-oXlmzM6X_Ur8ZbMok,5760
61
- databao_context_engine/plugins/databases/clickhouse_introspector.py,sha256=QfXLaA6gr0pdSLiaC3Mri_JohhRGgjw1rCJxLsHJOqk,6353
59
+ databao_context_engine/plugins/databases/clickhouse_introspector.py,sha256=6EyV46QR9UhcClnmBNxRzxgShvedbOo58p77hPFcK2s,6353
62
60
  databao_context_engine/plugins/databases/database_chunker.py,sha256=dn9Mb9Sw4f8IwBe9RtukQGT0yyKLQt5i4tjvsrFh1ew,2100
63
61
  databao_context_engine/plugins/databases/databases_types.py,sha256=kYZEaFa_cnROg_n1k7tIonoC2VunLBe5SQR47GOt_8k,2579
64
- databao_context_engine/plugins/databases/duckdb_introspector.py,sha256=ymcvEM6zodZBY92xjamyZHJBrA2Jk1sFTZetqxR80Pg,11430
65
- databao_context_engine/plugins/databases/introspection_model_builder.py,sha256=nfQLKVbwaWY12lnWrpCoVY2rolW263IwvWg7NkLjtk0,10350
62
+ databao_context_engine/plugins/databases/duckdb_introspector.py,sha256=temeOVxUY46vOgHZ9g-ra0n5thCEthvGTD7g3dZJkBk,11332
63
+ databao_context_engine/plugins/databases/introspection_model_builder.py,sha256=-i7e4jqwdcsu3NnS-LHVSH_DrG3riN09KX3SDHAGF0c,10350
66
64
  databao_context_engine/plugins/databases/introspection_scope.py,sha256=0BZAAmVTiHifOzeuQkCsGKrGRnZCPHRCLqam5nQqr88,2225
67
65
  databao_context_engine/plugins/databases/introspection_scope_matcher.py,sha256=gseF4j-SD-7SSPMDlDqHUOTI3tPSaOGKJgp42WDVlsY,3605
68
- databao_context_engine/plugins/databases/mssql_introspector.py,sha256=Pnu9LpEXZn7qUH0ANHeijynamX6dLJveHrK0tOy1PII,18793
69
- databao_context_engine/plugins/databases/mysql_introspector.py,sha256=IoiAjzUuJwkjAXPw-X7LBRfKoY3Y2WHrHzEeXNfdF9A,14504
66
+ databao_context_engine/plugins/databases/mssql_introspector.py,sha256=mw6z3YUKQ5hzFFWpNhx5NYrOG6tfQIclWESvdcUhIoY,18793
67
+ databao_context_engine/plugins/databases/mysql_introspector.py,sha256=Y77snyZkTT5elL7bsbzjUeffugLl_v1NB4yMQFRbCso,14504
70
68
  databao_context_engine/plugins/databases/postgresql_introspector.py,sha256=tHsQNWJLHcH4GUYwmXSf5mY6XIMhvtpUbGgwmWfljpw,17489
71
- databao_context_engine/plugins/databases/snowflake_introspector.py,sha256=6AYsJNfhT6rAJYBH7A-_ukjtLxi-0p2Dsz9b6cda4U4,12005
69
+ databao_context_engine/plugins/databases/snowflake_introspector.py,sha256=K3v25O-jMybM9Iey5Wqub5oGLjcHsSaKDu4VXWMzu70,12005
72
70
  databao_context_engine/plugins/duckdb_db_plugin.py,sha256=uumf9kXz6U-6QbX0i1ChHHxxvdq5_di3gTNpVDUCYdg,451
71
+ databao_context_engine/plugins/duckdb_tools.py,sha256=46rctnTxDPAhHtaiTp1DxMuuDuRKrtKWJFSSM2w7uUU,645
73
72
  databao_context_engine/plugins/mssql_db_plugin.py,sha256=YVor2QMDuL6XOLT8RFPOgs1Uhj1ZVYoFP5DApDJFPaE,446
74
73
  databao_context_engine/plugins/mysql_db_plugin.py,sha256=wy8HTiYuE8GTxfoc5gdrinEYv7NWHGrslzaAzruQecY,446
75
74
  databao_context_engine/plugins/parquet_plugin.py,sha256=qlpzQmiEwpb8Jma50HoIvljGV5ZiWkZU7GSiGV7M6kc,1181
@@ -77,11 +76,11 @@ databao_context_engine/plugins/plugin_loader.py,sha256=Nx_OYGf9t3XKb_JV4Om9fCOuL
77
76
  databao_context_engine/plugins/postgresql_db_plugin.py,sha256=PwLErcbqixsgz4Tqoift0uyerUqP_OaRzMaMAn0TE5A,486
78
77
  databao_context_engine/plugins/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
79
78
  databao_context_engine/plugins/resources/parquet_chunker.py,sha256=R9WCOBqpKRTVN6t5eeOm_mmnKBOxvjIiQ9zTc8vnUb4,848
80
- databao_context_engine/plugins/resources/parquet_introspector.py,sha256=_nB85_cSeFAHbnYlGPP_apRFkUQ6j24Efv-KNtOF2tM,6149
79
+ databao_context_engine/plugins/resources/parquet_introspector.py,sha256=dnf_rLQYd9RWIevl64_8ddhXO5AFQhcuOWQiaRCOeYM,5639
81
80
  databao_context_engine/plugins/snowflake_db_plugin.py,sha256=ApiVE212DU9F4Zj1HPof6JQ66n4LUeYRRwhlTWRCxek,486
82
81
  databao_context_engine/plugins/unstructured_files_plugin.py,sha256=TWV3fluusizul2YEN-YZ-K-C3s5W-5B8353-bjP53L8,2424
83
82
  databao_context_engine/project/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
84
- databao_context_engine/project/info.py,sha256=XcDB2tKlsM6PCKapXEB3fLIHPSWUR3XlNjnKWLyJ92s,2313
83
+ databao_context_engine/project/info.py,sha256=3chVSZ4pV2EsYJSeVfOYTK746POlJImciIBOvrQuYbc,2479
85
84
  databao_context_engine/project/init_project.py,sha256=QiLalH--BMQGB-c2WBbPAUKBinDbO0cJkmilUfqPAuI,3970
86
85
  databao_context_engine/project/layout.py,sha256=7ThzqnFejMogBV8c6Mt-Md4GO-kdzYNrmhhBTalYvps,4295
87
86
  databao_context_engine/project/project_config.py,sha256=rI-Wkll7lca7RlYIaFScs5CIKIZ8uujtKRxSjibGIt8,1132
@@ -120,7 +119,7 @@ databao_context_engine/system/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
120
119
  databao_context_engine/system/properties.py,sha256=mQ7-_PZeYSESYn1cMUQ0IK7rJEnbhc7t4WesFjAgo-Q,429
121
120
  databao_context_engine/templating/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
122
121
  databao_context_engine/templating/renderer.py,sha256=W2-0IGStAp6oxANmsKs_Z-UoIR6Gt_c4ILYFa3Hruo4,662
123
- databao_context_engine-0.1.3.dist-info/WHEEL,sha256=eycQt0QpYmJMLKpE3X9iDk8R04v2ZF0x82ogq-zP6bQ,79
124
- databao_context_engine-0.1.3.dist-info/entry_points.txt,sha256=5EeQJ1W8zEFh4HuF1bs2zBeoP408oiwuM9UrkJiurgI,138
125
- databao_context_engine-0.1.3.dist-info/METADATA,sha256=81FImIbcFo2PNXdEHjECQzrL7wCMTBpUc51Px6Fv7Go,3329
126
- databao_context_engine-0.1.3.dist-info/RECORD,,
122
+ databao_context_engine-0.1.4.dev1.dist-info/WHEEL,sha256=5w2T7AS2mz1-rW9CNagNYWRCaB0iQqBMYLwKdlgiR4Q,78
123
+ databao_context_engine-0.1.4.dev1.dist-info/entry_points.txt,sha256=5EeQJ1W8zEFh4HuF1bs2zBeoP408oiwuM9UrkJiurgI,138
124
+ databao_context_engine-0.1.4.dev1.dist-info/METADATA,sha256=43INtHVdc-AdDCHzRA-bHxGP66x_-kaXbKi1ZSapp3M,3367
125
+ databao_context_engine-0.1.4.dev1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: uv 0.9.24
2
+ Generator: uv 0.9.7
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,5 +0,0 @@
1
- from databao_context_engine import DatabaoContextEngine
2
-
3
-
4
- def run_all_results_tool(databao_context_engine: DatabaoContextEngine) -> str:
5
- return databao_context_engine.get_all_contexts_formatted()
@@ -1,14 +0,0 @@
1
- import datetime
2
-
3
- from databao_context_engine import DatabaoContextEngine
4
-
5
-
6
- def run_retrieve_tool(*, databao_context_engine: DatabaoContextEngine, text: str, limit: int | None = None) -> str:
7
- """Execute the retrieve flow for MCP and return the matching display texts."""
8
- retrieve_results = databao_context_engine.search_context(retrieve_text=text, limit=limit, export_to_file=False)
9
-
10
- display_results = [context_search_result.context_result for context_search_result in retrieve_results]
11
-
12
- display_results.append(f"\nToday's date is {datetime.date.today()}")
13
-
14
- return "\n".join(display_results)