dbagent-cli 0.8.3__tar.gz → 0.8.4__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.
Files changed (81) hide show
  1. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/PKG-INFO +1 -1
  2. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/__init__.py +1 -1
  3. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/ui/console.py +54 -19
  4. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent_cli.egg-info/PKG-INFO +1 -1
  5. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/pyproject.toml +1 -1
  6. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/README.md +0 -0
  7. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/agent/confidence.py +0 -0
  8. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/agent/conversation.py +0 -0
  9. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/agent/doctor.py +0 -0
  10. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/agent/error_classifier.py +0 -0
  11. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/agent/generator.py +0 -0
  12. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/agent/pipeline.py +0 -0
  13. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/agent/recommender.py +0 -0
  14. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/agent/validator.py +0 -0
  15. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/cli.py +0 -0
  16. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/config.py +0 -0
  17. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/connectors/base.py +0 -0
  18. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/connectors/factory.py +0 -0
  19. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/connectors/mongo.py +0 -0
  20. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/connectors/relational.py +0 -0
  21. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/execution/__init__.py +0 -0
  22. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/execution/cache.py +0 -0
  23. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/execution/changeset.py +0 -0
  24. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/execution/cost.py +0 -0
  25. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/execution/recovery.py +0 -0
  26. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/execution/sandbox.py +0 -0
  27. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/execution/streaming.py +0 -0
  28. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/llm/anthropic_provider.py +0 -0
  29. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/llm/auto_setup.py +0 -0
  30. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/llm/base.py +0 -0
  31. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/llm/deepseek_provider.py +0 -0
  32. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/llm/factory.py +0 -0
  33. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/llm/gemini_provider.py +0 -0
  34. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/llm/groq_provider.py +0 -0
  35. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/llm/mistral_provider.py +0 -0
  36. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/llm/mock_provider.py +0 -0
  37. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/llm/ollama_provider.py +0 -0
  38. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/llm/openai_provider.py +0 -0
  39. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/llm/openrouter_provider.py +0 -0
  40. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/schema/cache.py +0 -0
  41. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/schema/formatter.py +0 -0
  42. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/schema/graph.py +0 -0
  43. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/schema/models.py +0 -0
  44. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/schema/retriever.py +0 -0
  45. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/schema/selector.py +0 -0
  46. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/security/__init__.py +0 -0
  47. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/security/audit.py +0 -0
  48. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/security/environment.py +0 -0
  49. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/security/masking.py +0 -0
  50. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/security/modes.py +0 -0
  51. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/security/rbac.py +0 -0
  52. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/semantic/__init__.py +0 -0
  53. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/semantic/dictionary.py +0 -0
  54. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/semantic/templates.py +0 -0
  55. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/sql/__init__.py +0 -0
  56. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/sql/optimizer.py +0 -0
  57. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/sql/validator.py +0 -0
  58. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/ui/chat_screen.py +0 -0
  59. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/ui/grid_window.py +0 -0
  60. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/ui/viewer.py +0 -0
  61. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent/ui/visualizer.py +0 -0
  62. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent_cli.egg-info/SOURCES.txt +0 -0
  63. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent_cli.egg-info/dependency_links.txt +0 -0
  64. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent_cli.egg-info/entry_points.txt +0 -0
  65. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent_cli.egg-info/requires.txt +0 -0
  66. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/dbagent_cli.egg-info/top_level.txt +0 -0
  67. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/setup.cfg +0 -0
  68. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/tests/test_cache.py +0 -0
  69. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/tests/test_cli.py +0 -0
  70. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/tests/test_connectors.py +0 -0
  71. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/tests/test_direct_sql.py +0 -0
  72. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/tests/test_doctor_and_viz.py +0 -0
  73. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/tests/test_generator.py +0 -0
  74. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/tests/test_graph.py +0 -0
  75. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/tests/test_providers.py +0 -0
  76. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/tests/test_recovery.py +0 -0
  77. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/tests/test_safety.py +0 -0
  78. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/tests/test_sandbox.py +0 -0
  79. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/tests/test_schema.py +0 -0
  80. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/tests/test_security.py +0 -0
  81. {dbagent_cli-0.8.3 → dbagent_cli-0.8.4}/tests/test_semantic.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dbagent-cli
3
- Version: 0.8.3
3
+ Version: 0.8.4
4
4
  Summary: Enterprise AI Database Copilot, Schema Graph Introspector & Autonomous Recovery Agent (CLI)
5
5
  Author: Santhosh Gupta
6
6
  Requires-Python: >=3.9
@@ -2,5 +2,5 @@
2
2
  DB-Agent: Universal Database Introspection and Script Generation AI Agent (CLI).
3
3
  """
4
4
 
5
- __version__ = "0.8.3"
5
+ __version__ = "0.8.4"
6
6
  __author__ = "Santhosh Gupta"
@@ -81,16 +81,18 @@ def print_results_table(
81
81
  col_page: int = 1,
82
82
  cols_per_page: Optional[int] = None,
83
83
  show_all: bool = False,
84
+ max_rows_display: int = 15,
84
85
  ) -> None:
85
86
  """
86
87
  Print query results in a clean, readable Rich table.
87
- Dynamically scales column count based on terminal zoom-out/width.
88
+ Dynamically scales column count and limits vertical rows to fit viewport.
88
89
  """
89
90
  if not columns or not rows:
90
91
  console.print("[dim]Query returned 0 rows.[/dim]\n")
91
92
  return
92
93
 
93
94
  total_cols = len(columns)
95
+ total_rows = len(rows)
94
96
  term_width = console.width or 120
95
97
  auto_cols = max(8, term_width // 16)
96
98
 
@@ -110,12 +112,14 @@ def print_results_table(
110
112
  if total_pages > 1 and not show_all:
111
113
  tbl_title += f" [dim](Cols {start_idx + 1}–{end_idx} of {total_cols} | Page {current_page}/{total_pages})[/dim]"
112
114
 
113
- table = Table(title=tbl_title, show_header=True, header_style="bold magenta", border_style="dim")
115
+ table = Table(title=tbl_title, show_header=True, header_style="bold cyan", border_style="dim")
114
116
 
115
117
  for col in display_cols:
116
118
  table.add_column(str(col), overflow="ellipsis", max_width=35)
117
119
 
118
- for row in rows:
120
+ display_rows = rows if (show_all or total_rows <= max_rows_display) else rows[:max_rows_display]
121
+
122
+ for row in display_rows:
119
123
  row_vals = []
120
124
  for col in display_cols:
121
125
  v = row.get(col)
@@ -128,11 +132,17 @@ def print_results_table(
128
132
  console.print("")
129
133
  console.print(table)
130
134
 
135
+ footer_items = []
136
+ if total_rows > max_rows_display and not show_all:
137
+ footer_items.append(f"[bold green]Showing {len(display_rows)} of {total_rows} rows[/bold green]")
138
+ footer_items.append("[dim]⚡ Type [bold white]:scroll[/bold white] for scroller · [bold white]:all[/bold white] to show all · [bold white]:window[/bold white] for GUI[/dim]")
139
+ else:
140
+ footer_items.append(f"[bold green]Total rows:[/bold green] {total_rows}")
141
+
131
142
  if total_pages > 1 and not show_all:
132
- console.print(
133
- f"[dim]⚡ [bold]:window[/bold] (GUI scroll window) | [bold]:page <1-{total_pages}>[/bold] | [bold]:card[/bold] (vertical) | [bold]:wide[/bold] (zoom-out)[/dim]"
134
- )
135
- console.print(f"[bold green]Total rows:[/bold green] {len(rows)}\n")
143
+ footer_items.append(f"[dim]· [bold]:page <1-{total_pages}>[/bold] | [bold]:card[/bold] (vertical)[/dim]")
144
+
145
+ console.print(" ".join(footer_items) + "\n")
136
146
 
137
147
 
138
148
  def print_results_vertical(
@@ -162,35 +172,60 @@ def print_results_vertical(
162
172
 
163
173
  def open_interactive_scroller(columns: List[str], rows: List[Dict[str, Any]]) -> None:
164
174
  """
165
- Interactive Column Scroller allowing seamless navigation through wide tables.
175
+ Interactive 2D Scroller allowing seamless navigation through both long rows and wide columns.
166
176
  """
167
177
  if not columns or not rows:
168
178
  console.print("[dim]No data to display.[/dim]\n")
169
179
  return
170
180
 
171
181
  cols_per_page = 6
182
+ rows_per_page = 15
172
183
  total_cols = len(columns)
173
- total_pages = max(1, math.ceil(total_cols / cols_per_page))
174
- current_page = 1
184
+ total_rows = len(rows)
185
+ total_col_pages = max(1, math.ceil(total_cols / cols_per_page))
186
+ total_row_pages = max(1, math.ceil(total_rows / rows_per_page))
187
+
188
+ current_col_page = 1
189
+ current_row_page = 1
175
190
 
176
191
  from rich.prompt import Prompt
177
192
 
178
- console.print(f"\n[bold cyan]─── Interactive Multi-Column Scroller ({total_cols} columns, {len(rows)} rows) ───[/bold cyan]")
193
+ console.print(f"\n[bold cyan]─── 📜 Interactive 2D Scroller ({total_rows} rows × {total_cols} columns) ───[/bold cyan]")
179
194
  while True:
180
- print_results_table(columns, rows, title="Column Scroller", col_page=current_page, cols_per_page=cols_per_page)
195
+ start_row = (current_row_page - 1) * rows_per_page
196
+ end_row = min(start_row + rows_per_page, total_rows)
197
+ page_rows = rows[start_row:end_row]
198
+
199
+ print_results_table(
200
+ columns=columns,
201
+ rows=page_rows,
202
+ title=f"Scroller [dim](Rows {start_row + 1}–{end_row} of {total_rows} · Page {current_row_page}/{total_row_pages})[/dim]",
203
+ col_page=current_col_page,
204
+ cols_per_page=cols_per_page,
205
+ show_all=False,
206
+ max_rows_display=rows_per_page,
207
+ )
181
208
 
182
- console.print(f"[bold cyan]Scroller Navigation:[/bold cyan] [bold]n[/bold]=Next Cols | [bold]p[/bold]=Prev Cols | [bold]1-{total_pages}[/bold]=Jump to Page | [bold]c[/bold]=Vertical Cards | [bold]q[/bold]=Exit Scroller")
183
- choice = Prompt.ask("[dim]scroller>[/dim]", default="n").strip().lower()
209
+ console.print(f"[bold cyan]Navigation:[/bold cyan] [bold]d[/bold]=Next Rows | [bold]u[/bold]=Prev Rows | [bold]n[/bold]=Next Cols | [bold]p[/bold]=Prev Cols | [bold]c[/bold]=Cards | [bold]q[/bold]=Exit")
210
+ choice = Prompt.ask("[dim]scroller>[/dim]", default="d").strip().lower()
184
211
 
185
212
  if choice in ("q", "quit", "exit", "back"):
186
213
  console.print("[dim]Exited scroller.[/dim]\n")
187
214
  break
188
- elif choice in ("n", "next", ""):
189
- current_page = 1 if current_page >= total_pages else current_page + 1
190
- elif choice in ("p", "prev", "previous"):
191
- current_page = total_pages if current_page <= 1 else current_page - 1
215
+ elif choice in ("d", "down", "next-row", ""):
216
+ current_row_page = 1 if current_row_page >= total_row_pages else current_row_page + 1
217
+ elif choice in ("u", "up", "prev-row"):
218
+ current_row_page = total_row_pages if current_row_page <= 1 else current_row_page - 1
219
+ elif choice in ("n", "next", "right", ">"):
220
+ current_col_page = 1 if current_col_page >= total_col_pages else current_col_page + 1
221
+ elif choice in ("p", "prev", "left", "<"):
222
+ current_col_page = total_col_pages if current_col_page <= 1 else current_col_page - 1
223
+ elif choice.isdigit():
224
+ val = int(choice)
225
+ if 1 <= val <= total_row_pages:
226
+ current_row_page = val
192
227
  elif choice in ("c", "card", "v", "vertical"):
193
- print_results_vertical(columns, rows)
228
+ print_results_vertical(columns, page_rows)
194
229
  Prompt.ask("[dim]Press Enter to return to scroller...[/dim]")
195
230
  else:
196
231
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dbagent-cli
3
- Version: 0.8.3
3
+ Version: 0.8.4
4
4
  Summary: Enterprise AI Database Copilot, Schema Graph Introspector & Autonomous Recovery Agent (CLI)
5
5
  Author: Santhosh Gupta
6
6
  Requires-Python: >=3.9
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "dbagent-cli"
7
- version = "0.8.3"
7
+ version = "0.8.4"
8
8
  description = "Enterprise AI Database Copilot, Schema Graph Introspector & Autonomous Recovery Agent (CLI)"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
File without changes
File without changes
File without changes