Commit Graph

74 Commits

Author SHA1 Message Date
t8y2 c40683431b fix(postgres): align SSL mode behavior 2026-07-18 00:11:21 +08:00
onenewcode bb613b1712
fix(mongodb): support aggregate options and parse errors 2026-07-17 16:57:38 +08:00
Võ Văn Thành (Jay) 640e82cdc6
feat(mongo): improve completion and add distinct support 2026-07-16 18:21:10 +08:00
Abeautifulsnow badb3b61b9
feat(diagnostics): add SQL execution debug logging 2026-07-16 17:01:24 +08:00
t8y2 c19f3e201b fix(mcp): preserve SQL literals during execution 2026-07-13 20:00:01 +08:00
Guoyu Su a99a34b4ab
fix(mongodb): use dedicated count for legacy collections 2026-07-13 13:21:50 +08:00
zipg 9a09bd49cb
fix(mongodb): support array filters in updates 2026-07-12 23:13:36 +08:00
Anubis 2a92746dc0
feat(d1): add Cloudflare D1 database support 2026-07-12 22:03:57 +08:00
wuxiemian 1be66fb115
feat(safety): add production environment safeguards 2026-07-12 10:02:27 +08:00
DengQingNian e429c8945b
feat(mysql): edit column charset and collation 2026-07-10 15:13:57 +08:00
Abeautifulsnow 0674433eea
fix(mcp): disambiguate same-name connections 2026-07-10 14:44:40 +08:00
t8y2 39d956f2e8 fix(redis): skip confirmation for regular writes 2026-07-09 18:59:12 +08:00
Guoyu Su ca9e11217e
fix(mongodb): support collection drop shell command 2026-07-09 14:16:32 +08:00
onenewcode 1b13d2176b
fix(metadata): unify enum column metadata 2026-07-08 21:02:53 +08:00
二丫讲梵 fb919efe0a
fix(mcp): require auth for web backend access 2026-07-08 19:23:34 +08:00
jischeng c3893bf314
feat(spark): add Apache Spark database driver with catalog support
* feat(spark): add Apache Spark database driver

Spark Thrift Server speaks the HiveServer2 protocol, so the Spark driver
reuses the hive-jdbc agent runtime. Registers spark (agentKey=spark,
defaultPort=10015) across the manifest, DatabaseType enum, agent catalog,
SQL dialects, connection dialog, and a SparkAgent built on AbstractJdbcAgent.

* feat(spark): add catalog support and official logo

SparkAgent now supports Spark 3.4+ multi-catalog (Paimon, Lance, Iceberg)
via catalog=<name> in url_params, mirroring the StarRocks catalog flow:
- afterConnect switches to the configured catalog via USE <catalog>
- listDatabases returns the catalog name when SHOW DATABASES is empty
  (catalogs like Lance expose tables at the catalog root with no databases)
- listTables uses SHOW TABLES IN <catalog>[.<schema>] uniformly, working
  for both catalog-root tables (Lance) and catalog.schema tables (Paimon)
- setSchemaSQL qualifies USE with the catalog to prevent resetting to
  spark_catalog on schema switches
- buildJdbcUrl omits database from the URL path

Also replaces the placeholder lightning icon with the official Apache Spark
logo (spark-logo.png from spark.apache.org).

* fix(spark): use catalog-qualified DESCRIBE for column retrieval

getColumnsFromDescribe used USE <schema> + DESCRIBE <table>, which
generated USE `catalog`.`catalog` when the sidebar passed the catalog
name as the schema (Lance case where the catalog is the only node).
This failed and fell back to JDBC metadata which also returned nothing,
resulting in an empty DDL (CREATE TABLE ... ()).

Now uses DESCRIBE `catalog`.`table` directly when a catalog is
configured, bypassing USE entirely. Also fixes setSchemaSQL to treat
schema == catalog as catalog-only (no .schema suffix).

* fix(ci): add spark to metadata coverage matrix and BRIDGE_REQUIRED_TYPES

- agents/metadata-constraint-coverage.tsv: register spark as
  intentional-fallback (SHOW TABLES/SHOW DATABASES, like Hive/TDengine)
- packages/node-core/src/diagnostics.ts: add spark to
  BRIDGE_REQUIRED_TYPES (mcpMode=bridge, matches manifest)

* fix(ci): add spark to DBX_CONNECTION_TYPE_DESCRIPTION in mcp-server

The driver-manifest test asserts every manifest dbType appears in the
MCP server's connection type description string.
2026-07-07 14:36:22 +08:00
t8y2 5c37c0ad0d fix(mysql): disable TLS by default 2026-07-06 10:10:30 +08:00
onenewcode 91c77e53c4
feat(mongodb): support collection stats shell commands
Add db.coll.stats() / dataSize() / storageSize(scale) / totalIndexSize()
so these MongoDB shell commands return a result grid instead of the
"Use MongoDB shell-style commands" error (issue #2529).

- backend: collStats via mongo_driver.collection_stats, wired through
  mongo_ops, the dbx-web /mongo/collection-stats route, the tauri
  mongo_collection_stats command, and the MCP data bridge
- node-core: parseMongoCollectionStatsCommand + result formatter and
  executeQuery dispatch (web build + MCP path)
- desktop: mirror the parser/executor/autocomplete in mongoShellCommand.ts,
  queryStore.ts, api/tauri/http facade, and mongoCompletion.ts
- tests for the parser, result formatter, and completion entries

Close #2529
2026-07-03 21:32:29 +08:00
t8y2 cabe89a19b fix(mongodb): support legacy count helpers 2026-07-03 13:25:36 +08:00
Tony Tang 23b9228f82
feat(connection): add StarRocks TLS support 2026-07-02 16:37:20 +08:00
onenewcode 93eeeaa9c6
feat(mongo): add dropIndex and dropIndexes support across full stack 2026-07-01 17:53:09 +08:00
onenewcode b90e4fd64e
feat(mongodb): support createIndex shell command (#2187) 2026-06-30 21:34:58 +08:00
t8y2 25dcbeb7e4 feat(oscar): add OSCAR database support 2026-06-30 20:07:55 +08:00
Guoyu Su 7a5984a1fd
fix(mongodb): support shell projection and db.version 2026-06-29 00:27:27 +08:00
t8y2 23b44cc2b9 fix(mcp): add direct Redis command execution 2026-06-26 22:27:31 +08:00
林剑凛 bebed75265
fix(check): stabilize pnpm check on Windows 2026-06-26 17:55:58 +08:00
lexmin0412 c2376494d3
feat(vector): add ChromaDB support 2026-06-26 01:41:36 +08:00
t8y2 dbf9cae4c0 fix(mcp): route GaussDB through desktop bridge 2026-06-25 22:52:03 +08:00
Oleksandr Liakhevych 034cce47e0
fix(ai): Codex CLI provider reliability fixes for DBX Desktop
* fix(ai): resolve Codex CLI from shell PATH on macOS

* fix(ai): hide Codex CLI subprocess windows on Windows

* feat(ai): allow to set environment variable for Codex CLI

* fix(ai): parse Codex MCP tool events

* fix(mcp): honor Postgres TLS settings in direct queries
2026-06-25 22:31:14 +08:00
miracle 0effda91b3
feat(zookeeper): add agent client browsing and node management 2026-06-25 00:40:48 +08:00
t8y2 bf9ef4365b feat(vector): add weaviate support 2026-06-25 00:31:27 +08:00
t8y2 bc49bbbbfa fix(mongo): parse newline chained find calls 2026-06-24 23:21:06 +08:00
t8y2 d91f1fbb38 fix(mcp): use linux local data dir 2026-06-24 15:51:10 +08:00
luoianun 8cc7a35c1a feat: add PrestoSQL connector 2026-06-23 01:27:08 +08:00
t8y2 c9ab2fb60a fix(ci): sync diagnostics and AI sampling 2026-06-19 14:49:34 +08:00
t8y2 26cc2fdc4c fix: pass numeric precision/scale fields through bridge column mapping 2026-06-18 00:48:59 +08:00
t8y2 00541291e3 feat(ssh): support custom SSH agent socket path 2026-06-18 00:15:08 +08:00
xcstatus 417a48ccfe
fix(mcp): route ssh transport layers through desktop bridge 2026-06-17 22:06:33 +08:00
t8y2 000c236619 feat(connection): add keepalive interval 2026-06-16 10:23:49 +08:00
John Jin 1afc271c18
feat: add QuestDB support
Thanks @ptma!
2026-06-14 22:58:05 +08:00
t8y2 213162aad3 fix(mcp): support DBX_DATA_DIR env for portable mode 2026-06-13 20:45:58 +08:00
Vergil Lai 799d20a2cf
添加 Manticore Search 支持 (#1145)
* 添加 Manticore Search 支持

* 更新 Manticore Search 文档
2026-06-13 20:23:36 +08:00
haipengno1 6265571182
feat(ssh): add ssh-agent authentication support (#1023)
Thanks for adding ssh-agent support, this is a great addition!
2026-06-11 00:39:30 +08:00
t8y2 d353d4673f feat(redis): add configurable key namespace separator 2026-06-10 17:46:48 +08:00
t8y2 8a458f1432 fix: add InfluxDB to agent catalog and bridge types 2026-06-10 14:46:08 +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
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 edba8214b5 feat: show username/password fields for Access database connections 2026-06-10 08:37:18 +08:00
t8y2 1be4c6afcc fix: resolve clippy, typecheck, and test failures in CI (#933) 2026-06-10 04:40:23 +08:00
t8y2 a5659d7637 fix(mongodb): support getIndexes shell command 2026-06-08 01:25:44 +08:00