Vergil Lai
799d20a2cf
添加 Manticore Search 支持 ( #1145 )
...
* 添加 Manticore Search 支持
* 更新 Manticore Search 文档
2026-06-13 20:23:36 +08:00
t8y2
6c57169162
feat(mcp): add one-click install/upgrade button
2026-06-13 20:05:46 +08:00
LC
2d98b9fdd2
feat(sqlite): add database backup action
...
* feat(sqlite): add database backup action
* fix(sqlite): sanitize default backup file name
2026-06-13 18:39:12 +08:00
t8y2
0b9aef1ca8
feat(settings): split driver store paths
2026-06-13 17:27:58 +08:00
t8y2
d974ad5533
feat(settings): add custom driver store path with migration
2026-06-13 16:54:04 +08:00
t8y2
d091b0db85
feat(sidebar): reveal local db file in OS file manager
2026-06-13 16:00:47 +08:00
t8y2
30afcb8e69
fix(sidebar): page large table groups
2026-06-13 13:40:36 +08:00
t8y2
a7ba5b42ef
chore: remove duplicate imports and BOM from PR #1122
2026-06-12 19:58:32 +08:00
skyler
abacac3c07
feat(ai): agent loop Phase 2 — SQL execution tools, risk classification, and streaming tool calls
...
feat(ai): agent loop Phase 2 — SQL execution tools, risk classification, and streaming tool calls
2026-06-12 19:56:36 +08:00
t8y2
484658c6b7
feat(ai): streaming probe for connection test with latency measurement
2026-06-12 19:29:55 +08:00
runstone
094412d956
fix error
2026-06-12 19:00:27 +08:00
runstone
40f0f98540
Merge branch 'main' of https://github.com/Abeautifulsnow/dbx into feat/ai-agent-loop-phase1
2026-06-12 18:52:05 +08:00
runstone
100124da3e
feat(ai): Phase 2 SQL 风险分类 + Agent 模式工具调用结果渲染
...
后端:
- 新增 sql_risk.rs:基于 sqlparser AST 的 SQL 风险分类(ReadOnly/Write/Ddl/Transaction)
- agent_tools.rs:新增 execute_query 和 get_sample_data 工具,写操作/DDL 被风险分类阻止
- agent_loop.rs:支持 is_agent_mode 参数,Agent 模式下暴露全部工具,Ask 模式仅暴露只读工具
- agent_loop/web/tauri:mode 参数全链路传递(前端→HTTP→Tauri→Rust)
前端:
- AiAgentStepItem 接口扩展:toolName/toolArgs/toolResult/isError 字段
- AiAssistant.vue:工具调用结果实时+最终渲染,SQL 查询结果/错误信息展示
- ai.ts/http.ts/tauri.ts:mode 参数透传到后端
2026-06-12 17:42:23 +08:00
polemp
ef5ed05ae7
feat(schema-diff): professional DDL diff view with deployment-aware colors and custom themes ( #1112 )
...
Co-authored-by: Sam <14344444@@qq.com>
2026-06-12 17:14:05 +08:00
Abeautifulsnow
082e3bb4eb
feat(ai): add agent tool calling loop
2026-06-12 13:18:36 +08:00
runstone
453169ae45
Merge branch 'main' of https://github.com/Abeautifulsnow/dbx into feat/ai-agent-loop-phase1
2026-06-12 12:00:47 +08:00
t8y2
a4bd62005b
feat(redis): add all search mode
2026-06-12 11:32:56 +08:00
runstone
91f1206783
Merge branch 'main' of https://github.com/Abeautifulsnow/dbx into feat/ai-agent-loop-phase1
2026-06-12 08:48:50 +08:00
haipengno1
7de0de2313
实现 Redis 的查询功能
2026-06-12 00:20:17 +08:00
t8y2
57d03c2f08
feat(sidebar): support nested groups
2026-06-11 22:35:00 +08:00
t8y2
70f7b464b7
feat(jdbc): install drivers from Maven bundles
2026-06-11 21:41:37 +08:00
t8y2
7923f4915e
fix(elasticsearch): apply document filters in browser
2026-06-11 18:56:38 +08:00
runstone
9ab41795d6
@
...
feat(ai): add agent loop with tool calling, fix connection routing and Gemini compatibility
## 背景说明
将 dbx AI 助手从单次 SQL 文本生成器升级为具备 tool calling 的数据库 Agent。
Phase 1 实现 Agent Loop 框架 + 只读工具(list_tables、get_columns)。
参考:Pi agent-core,.trellis/tasks/06-11-feat-ai-agent-loop-tool-calling-upgrade
## 修改内容
- 新增 agent_loop.rs:Agent Loop 核心,支持 OpenAI/Claude/Gemini Provider 的 tool calling,最大 10 轮,Ollama 自动降级为 text-only
- 新增 agent_tools.rs:read_only_tools (list_tables, get_columns) 的工具定义与执行器
- 新增 agent_events.rs:AgentEvent/ToolCall/ToolResult/ToolDefinition 类型定义
- 修改 ai.rs:AiMessage 新增 tool_call_id 字段
- 修改 lib.rs:注册 agent_events、agent_loop、agent_tools 模块
- 修改 routes/ai.rs & commands/ai.rs:新增 ai_agent_stream SSE 端点
- 修改 tauri.ts & http.ts:新增 AgentEvent 类型与 aiAgentStream 函数
- 修改 api.ts:注册 aiAgentStream 转发
- 修改 ai.ts:新增 runAgentStream,AiContext 增加 connectionId 字段
- 修改 AiAssistant.vue:接入 runAgentStream,解析 AgentEvent 渲染工具调用步骤
- 修改 en.ts / zh-CN.ts:新增 agentSteps 国际化文案
## 修复的问题
- [#I01] connectionName 误传为 connectionId → add connectionId to AiContext
- [#I02] agent loop 取消操作无效 → add cancel checks before each turn
- [#C01] TODO 缺少 issue 引用 → add PRD reference to TODO
- [#C02] stream_with_tools 命名不准确 → add clarifying doc comment
- [#C03] Gemini functionResponse.name 解析错误 → fix tool_call_id format and extraction
## 测试建议
- execute_get_columns:合法表名/空表名/SQL 注入字符拒绝
- call_openai_with_tools:空 choices/空 tool_calls/非 JSON arguments
- call_gemini_with_tools:空 candidates/parts 无 functionCall
- runAgentStream:有效 connectionId 正常调用
@
2026-06-11 18:27:24 +08:00
t8y2
a81286fed7
feat(build): gate DuckDB behind optional feature, support --no-default-features
2026-06-11 13:58:44 +08:00
t8y2
3f58526df8
fix(mcp): add back use std::env, use compile-time #[cfg] for locate_mcp_bin
2026-06-10 21:31:52 +08:00
Doracoin
7234d9ebd3
fix(desktop): Improve shell Node detection for MCP startup
...
Thanks for the detailed investigation and fix!
2026-06-10 21:30:44 +08:00
t8y2
20622bc762
fix: resolve clippy warnings and missing redis_key_separator field
2026-06-10 20:05:20 +08:00
John Jin
0bd07ccf46
feat: add InfluxDB support ( #980 )
2026-06-10 14:37:53 +08:00
t8y2
1545224d34
fix: add missing read_only field and resolve clippy warnings
2026-06-10 12:55:39 +08:00
t8y2
bfec556e9b
feat(readonly): add read-only mode for all database connections
...
- Add read_only field to ConnectionConfig with backward-compatible serde defaults
- SQL classifier with first-keyword + embedded keyword defense layers
- PRAGMA white-listing for safe read-only operations
- Guard all write entry points: SQL, Mongo, Redis, etcd, MCP Bridge
- 16 unit tests covering edge cases (CTE, case insensitivity, string masking)
- 7-language i18n support
- Fast-fail at command/route level before pool creation
Closes #889
2026-06-10 11:58:18 +08:00
t8y2
2f5469ce6d
fix(oracle): add listener driver hint
2026-06-10 11:37:45 +08:00
runstone
a440415e86
feat(readonly): add read-only mode for all database connections
...
## Background
Add a read-only toggle for database connections that blocks all write
operations (INSERT, UPDATE, DELETE, DROP, etc.) when enabled, allowing
only read queries (SELECT, SHOW, EXPLAIN, etc.). Closes #889 .
## Changes
### Data Model
- Added `read_only: bool` field to ConnectionConfig (Rust struct, TS
interfaces, and ConnectionConfigData deserialization layer)
- Used `#[serde(default, skip_serializing_if = "is_false")]` for
backward/forward compatibility with existing configs
### Frontend UI
- Added "Read Only" checkbox in connection dialog
- 7-language i18n support (en/es/it/pt-BR/zh-CN/zh-TW)
### SQL Classification (query_execution_sql.rs)
- Added `is_write_sql()` with two-layer defense:
- Layer 1: First-keyword check (must start with known read keyword)
- Layer 2: Embedded dangerous keyword detection (catches CTE-wrapped
writes like `WITH ... AS (DELETE FROM ...)`)
- `FROM` keyword supported as DuckDB SELECT-less syntax indicator
- Added `check_read_only()` returning descriptive error with connection name
- Added 16 unit tests covering: pure reads/writes, CTE, case insensitivity,
string literal masking, comment stripping, stored procedure calls, edge cases
### SQL Execution Guards (query.rs / transfer.rs)
- Added `check_read_only_for_connection()` and `_multi()` helper functions
with lazy name clone (only allocates when read_only is true)
- 6 interception points: `do_execute`, MySQL batch, SQL Server batch,
DuckDB batch, transaction execution, transfer execution
### Non-SQL Write Guards — Tauri Commands
- Added `ensure_connection_writable()` helper (connection.rs)
- Mongo: 6 write entry points (insert/update/delete, single + batch)
- Redis: 15 write entry points (SET, DEL, HSET, HDEL, LPUSH, LSET, LREM,
SADD, SREM, ZADD, ZREM, EXPIRE, FLUSHDB, delete_keys, execute_command)
- execute_command uses RedisCommandSafety classification to allow
safe read commands through raw command interface
- etcd: 2 write entry points (put, delete)
- sql_file: SQL file execution guarded
- MCP Bridge: 4 write entry points (Insert/Update/Delete/SQL query)
### Non-SQL Write Guards — Web API
- Local `ensure_writable()` helper in each route module
- Redis: 12 write endpoints including classified execute_command
- Mongo: 6 write endpoints
- etcd: 2 write endpoints
- sql_file, table_import, transfer: early rejection
### Test Updates
- Updated ConnectionConfig construction in 7 test files with
`read_only: false` initialization
## Defense-in-Depth
- Layer 1: Command/Route-level early rejection (saves resources)
- Layer 2: Core SQL classifier (`is_write_sql` — first keyword + embedded scan)
- Layer 3: Core execution-time interception (do_execute/transfer/transaction)
2026-06-10 10:58:52 +08:00
t8y2
d0bf6c3b53
feat(redis): persist command history across sessions ( #933 )
2026-06-10 04:34:45 +08:00
t8y2
d08385e75f
feat: add Turso/libSQL database support
...
Turso is a distributed SQLite database built on libSQL, offering HTTP-based
connectivity with auth token authentication. This change adds full support:
- New DatabaseType::Turso and PoolKind::Turso variants
- TursoClient driver using libSQL HTTP pipeline API (/v2/pipeline)
- Bearer token auth via password or url_params (auth_token=)
- Multi-statement batch pipeline for transactional integrity
- Standalone BEGIN/COMMIT/ROLLBACK treated as no-ops (pipeline is auto-commit)
- Full metadata support: tables, columns, indexes, foreign keys, triggers, DDL
- Frontend: connection form, SQL completion (SQLite syntax), capability sets
- Built-in databases (SQLite/Turso/DuckDB/RQLite/Access) placed first in selector
- Unit tests (15) + integration tests against live libsql-server (12)
- Single connection pool, skips TCP probe
Closes #948
2026-06-10 04:18:05 +08:00
t8y2
2a424b6f75
fix: add parent folder for SQL sync directory, show toast when no sync dir set
2026-06-10 02:59:00 +08:00
t8y2
9ffa4c41d9
feat: add SQL library panel with folder/file management, rename, and sync support
2026-06-10 02:46:10 +08:00
DengQingNian
35692bc53b
feat(redis): add TTL, structured entries, Stream and JSON support to create key dialog ( #947 )
...
Thanks @DengQingNian! Great feature — TTL, structured entries, Stream, and JSON support for Redis key creation.
2026-06-09 22:08:08 +08:00
二丫讲梵
41758e6bb1
✨ feat(connection): 增加可见数据库选择功能 ( #944 )
...
感谢 @eryajf 的贡献!此功能允许用户在创建或编辑连接时选择可见的数据库,支持多种数据库类型。
2026-06-09 20:56:39 +08:00
t8y2
699281c7a6
fix(ci): remove brittle source-text assertion tests
...
These tests checked for specific code patterns in source files via
include_str!, making them fail whenever unrelated code introduced
the same patterns elsewhere. They tested how code is written rather
than what it does.
2026-06-09 18:58:28 +08:00
t8y2
348f39ff35
perf(tauri): move blocking command work off async runtime
2026-06-09 17:53:07 +08:00
cl1107
3995524e5d
feat(import): 添加 DataGrip 连接导入支持 ( #936 )
...
- 新增 datagripImport 模块解析 XML 配置
- 支持从 macOS Keychain 自动填充密码
- 添加 Keychain 读取的 Tauri 命令
- 更新多语言翻译文件
- 集成到侧边栏导入流程中
2026-06-09 16:45:59 +08:00
t8y2
29bfe3f1c3
feat(mcp): enforce visible_databases filter in MCP bridge handlers
...
Add check_visible_database() helper and apply it to list_tables,
describe_table, and execute_query handlers to prevent MCP tools
from accessing databases outside the user's visibility whitelist.
2026-06-09 13:28:38 +08:00
t8y2
2a7b26baad
fix: add missing idle_timeout_secs in ConnectionConfig constructors and fix clippy warnings
2026-06-09 11:56:39 +08:00
James-Leong
171c7cd8d7
fix(ssh): prevent duplicate SSH tunnels from concurrent pool creation ( #891 )
...
start_tunnel() and start_chain() had a check-then-act race condition:
multiple concurrent callers could all see an empty cache and each
spawn a new SSH tunnel. The tunnel that lost the insert race was
orphaned, causing queries routed through it to fail.
Use double-check locking with stale entry eviction: hold the lock for
the cache lookup, release it during the slow SSH handshake, then
re-check under the lock before inserting. If another caller already
created the tunnel, abort the duplicate and return the existing port.
Also check handle liveness on cache hits so that callers don't get a
dead port back when the background tunnel task has exited.
Add a matching re-check in the MongoDB connection pool creation path.
Add idle_timeout_secs connection option (default 60s) to preempt
server-side connection idle timeouts that cause "unexpected end of
file" errors on pooled MongoDB connections.
Reject MongoDB queries in the generic SQL execution path before any
pool or session-key creation. Previously, a typo in a MongoDB shell
command would fall through to executeMulti / execute_sql_statement,
which called get_or_create_pool_for_session and leaked a session-scoped
MongoDB Client (and SSH tunnel resources) before eventually returning
"Use MongoDB-specific commands".
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-09 10:29:42 +08:00
t8y2
9dfc2ba294
feat: support H2 file connections
2026-06-08 20:09:27 +08:00
t8y2
465ed195cf
fix(sql): decode opened SQL files with charset fallback
2026-06-08 17:45:09 +08:00
t8y2
afc8d8f3c1
fix(mysql): preserve session variables across query runs
2026-06-08 12:39:18 +08:00
t8y2
b777cddde5
feat: add user-facing debug logs
2026-06-08 12:16:49 +08:00
Quinlevi
897e6998fd
feat(dameng): full DM8 database support
...
Adds Dameng DM8 explain/autotrace support and user-management SQL support, with backend autotrace safety checks and escaped CREATE USER SQL.
2026-06-08 02:07:00 +08:00
t8y2
e6062b2b07
feat(etcd): add agent-backed etcd support
2026-06-08 00:58:42 +08:00