dbagent-cli 0.3.2__tar.gz → 0.3.3__tar.gz
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.
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/PKG-INFO +2 -2
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/__init__.py +1 -1
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/agent/recommender.py +19 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/cli.py +2 -4
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent_cli.egg-info/PKG-INFO +2 -2
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/pyproject.toml +2 -2
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/README.md +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/agent/confidence.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/agent/conversation.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/agent/doctor.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/agent/error_classifier.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/agent/generator.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/agent/pipeline.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/agent/validator.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/config.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/connectors/base.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/connectors/factory.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/connectors/mongo.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/connectors/relational.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/execution/__init__.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/execution/cache.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/execution/changeset.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/execution/cost.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/execution/recovery.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/execution/sandbox.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/execution/streaming.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/llm/auto_setup.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/llm/base.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/llm/factory.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/llm/gemini_provider.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/llm/groq_provider.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/llm/mock_provider.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/llm/ollama_provider.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/llm/openrouter_provider.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/schema/cache.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/schema/formatter.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/schema/graph.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/schema/models.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/schema/retriever.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/schema/selector.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/security/__init__.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/security/audit.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/security/environment.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/security/masking.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/security/modes.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/security/rbac.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/semantic/__init__.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/semantic/dictionary.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/semantic/templates.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/sql/__init__.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/sql/optimizer.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/sql/validator.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/ui/console.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/ui/viewer.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent/ui/visualizer.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent_cli.egg-info/SOURCES.txt +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent_cli.egg-info/dependency_links.txt +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent_cli.egg-info/entry_points.txt +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent_cli.egg-info/requires.txt +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/dbagent_cli.egg-info/top_level.txt +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/setup.cfg +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/tests/test_cache.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/tests/test_cli.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/tests/test_connectors.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/tests/test_doctor_and_viz.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/tests/test_generator.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/tests/test_graph.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/tests/test_recovery.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/tests/test_safety.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/tests/test_sandbox.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/tests/test_schema.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/tests/test_security.py +0 -0
- {dbagent_cli-0.3.2 → dbagent_cli-0.3.3}/tests/test_semantic.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dbagent-cli
|
|
3
|
-
Version: 0.3.
|
|
4
|
-
Summary: Enterprise AI Database Copilot with
|
|
3
|
+
Version: 0.3.3
|
|
4
|
+
Summary: Enterprise AI Database Copilot with Instant Schema Caching & Zero-Latency Chat (CLI)
|
|
5
5
|
Author: Santhosh Gupta
|
|
6
6
|
Requires-Python: >=3.9
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
@@ -59,3 +59,22 @@ class QueryRecommender:
|
|
|
59
59
|
suggestions.append(f"Count total rows in `{tables[0].name}`")
|
|
60
60
|
|
|
61
61
|
return suggestions[:max_suggestions]
|
|
62
|
+
|
|
63
|
+
@classmethod
|
|
64
|
+
def generate_from_table_names(cls, table_names: List[str], max_suggestions: int = 3) -> List[str]:
|
|
65
|
+
"""Instant zero-query recommendation generator from table names (<0.01ms)."""
|
|
66
|
+
suggestions: List[str] = []
|
|
67
|
+
user_tables = [t for t in table_names if any(w in t.lower() for w in ["user", "customer", "account", "member"])]
|
|
68
|
+
if user_tables:
|
|
69
|
+
suggestions.append(f"List top 10 most recent records from `{user_tables[0]}`")
|
|
70
|
+
event_tables = [t for t in table_names if any(w in t.lower() for w in ["event", "log", "audit", "activity", "history", "camera", "device", "order"])]
|
|
71
|
+
if event_tables:
|
|
72
|
+
suggestions.append(f"Count total records in `{event_tables[0]}`")
|
|
73
|
+
for t in table_names:
|
|
74
|
+
if len(suggestions) >= max_suggestions:
|
|
75
|
+
break
|
|
76
|
+
candidate = f"Show recent rows from `{t}`"
|
|
77
|
+
if candidate not in suggestions:
|
|
78
|
+
suggestions.append(candidate)
|
|
79
|
+
return suggestions[:max_suggestions]
|
|
80
|
+
|
|
@@ -357,15 +357,13 @@ def chat_command(
|
|
|
357
357
|
console.print(f"[bold cyan]AI:[/bold cyan] {llm.name} | [bold yellow]Mode:[/bold yellow] {current_mode.value}")
|
|
358
358
|
console.print("[dim]Type your question in plain English or use colon commands (e.g. :help, :tables, :doctor).[/dim]")
|
|
359
359
|
|
|
360
|
-
# Display AI recommendations on connect (instant
|
|
360
|
+
# Display AI recommendations on connect (instant <0.1ms with zero network overhead)
|
|
361
361
|
try:
|
|
362
362
|
cached_schema = cache_mgr.load_cached_schema(db_url)
|
|
363
363
|
if cached_schema:
|
|
364
364
|
recs = QueryRecommender.generate_recommendations(cached_schema, max_suggestions=3)
|
|
365
365
|
else:
|
|
366
|
-
|
|
367
|
-
quick_schema = connector.inspect_schema(table_names=quick_tables, include_samples=False, max_samples=0)
|
|
368
|
-
recs = QueryRecommender.generate_recommendations(quick_schema, max_suggestions=3)
|
|
366
|
+
recs = QueryRecommender.generate_from_table_names(table_names, max_suggestions=3)
|
|
369
367
|
if recs:
|
|
370
368
|
console.print("\n[bold cyan]💡 Try asking:[/bold cyan]")
|
|
371
369
|
for r in recs:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dbagent-cli
|
|
3
|
-
Version: 0.3.
|
|
4
|
-
Summary: Enterprise AI Database Copilot with
|
|
3
|
+
Version: 0.3.3
|
|
4
|
+
Summary: Enterprise AI Database Copilot with Instant Schema Caching & Zero-Latency Chat (CLI)
|
|
5
5
|
Author: Santhosh Gupta
|
|
6
6
|
Requires-Python: >=3.9
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "dbagent-cli"
|
|
7
|
-
version = "0.3.
|
|
8
|
-
description = "Enterprise AI Database Copilot with
|
|
7
|
+
version = "0.3.3"
|
|
8
|
+
description = "Enterprise AI Database Copilot with Instant Schema Caching & Zero-Latency Chat (CLI)"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
11
11
|
authors = [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|