Skip to content

add postgresql and mysql integrations - #73

Merged
hkonsti merged 1 commit into
mainfrom
hkonsti/database-connectors
Oct 13, 2026
Merged

hkonsti merged 1 commit into
mainfrom
hkonsti/database-connectors

Conversation

@hkonsti

@hkonsti hkonsti commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Adds PostgreSQL and MySQL (MariaDB too) as two integrations on one code path. A database is connected with its host, port, database, user, password and encryption, signing in first with a Test connection like the mailbox form; agents get its tables as a tree, a table holding its rows, each written as "column: value" lines and found again by its primary key, and a query tool that runs one statement that reads inside a read-only transaction, 200 rows back as JSON lines.

The host is resolved and checked before connecting, so a connection can't be pointed at something on the api's own network: private addresses are refused unless the new ALLOW_PRIVATE_HOSTS variable says otherwise, and the connection goes to the checked address with the typed host used for certificate verification. MySQL's read-only transaction lets DDL through, so the statement check (one statement, starting with SELECT, WITH, SHOW, EXPLAIN, DESCRIBE, TABLE or VALUES) is what keeps a query to reading; the docs ask for a read-only database user as well.

Along the way: a collection's read action became optional and a new command can be marked readOnly, for the queries collection; the api's error envelope now carries message where an error has one, so agents see the database's own words; Bun's SQL client is given an explicit URL, since with only host and port fields it merges the api's own DATABASE_URL query parameters into the connection. Both databases were tested end to end against local Postgres 17 and MariaDB 10.11 servers with TLS, and the pages checked in a browser.


Open workspace in Conductor

a database is connected with its host, port, database, user, password and encryption, checked by signing in first. agents get its tables as a tree of rows, written as column: value lines and found by primary key, and a query tool that runs one statement that reads inside a read-only transaction. the host is resolved and private addresses refused unless ALLOW_PRIVATE_HOSTS is set.
@hkonsti
hkonsti merged commit 3832184 into main Oct 13, 2026
2 checks passed
@hkonsti
hkonsti deleted the hkonsti/database-connectors branch October 13, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant