@carllee1983/dbcli 11.0.0 → 12.1.0

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 (37) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/.cursor/rules/dbcli.mdc +46 -0
  4. package/.cursor/skills/dbcli/reference.md +59 -3
  5. package/.cursor-plugin/plugin.json +1 -1
  6. package/.github/skills/dbcli/SKILL.md +46 -0
  7. package/.github/skills/dbcli/reference.md +59 -3
  8. package/CHANGELOG.md +88 -0
  9. package/README.md +16 -13
  10. package/assets/SKILL.md +46 -0
  11. package/assets/reference.md +59 -3
  12. package/assets/tasks/README.md +1 -1
  13. package/assets/tasks/analyze-table-perf.md +1 -1
  14. package/assets/tasks/audit-permissions.md +1 -1
  15. package/assets/tasks/connection-health.md +1 -2
  16. package/assets/tasks/design-review.md +1 -1
  17. package/assets/tasks/diagnose-slow-query.md +1 -1
  18. package/assets/tasks/migration-review.md +5 -3
  19. package/assets/tasks/mongo-safe-backfill.md +1 -1
  20. package/assets/tasks/mongo-schema-drift-review.md +1 -1
  21. package/assets/tasks/orm-drift-review.md +1 -1
  22. package/assets/tasks/pr-database-review.md +1 -1
  23. package/assets/tasks/safe-backfill-verify.md +1 -1
  24. package/assets/tasks/safe-backfill.md +13 -7
  25. package/assets/tasks/schema-drift-review.md +1 -1
  26. package/assets/tasks/slow-endpoint-investigation.md +1 -1
  27. package/dist/cli-runtime.mjs +15485 -23622
  28. package/dist/cli.mjs +2 -1
  29. package/dist/core.d.ts +629 -554
  30. package/dist/core.mjs +6243 -6080
  31. package/gemini-extension.json +1 -1
  32. package/package.json +2 -1
  33. package/plugins/dbcli-agent/.codex-plugin/plugin.json +1 -1
  34. package/plugins/dbcli-agent/skills/dbcli/SKILL.md +46 -0
  35. package/plugins/dbcli-agent/skills/dbcli/reference.md +59 -3
  36. package/skills/dbcli/SKILL.md +46 -0
  37. package/skills/dbcli/reference.md +59 -3
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dbcli-agent",
3
- "version": "11.0.0",
3
+ "version": "12.1.0",
4
4
  "description": "Database CLI skill and command reference for AI agents.",
5
5
  "contextFileName": "AGENTS.md"
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carllee1983/dbcli",
3
- "version": "11.0.0",
3
+ "version": "12.1.0",
4
4
  "description": "Database CLI for AI agents",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -69,6 +69,7 @@
69
69
  "prepublishOnly": "bun run build",
70
70
  "audit": "bun run scripts/audit.ts",
71
71
  "release:check": "bash scripts/release-check.sh",
72
+ "release:extras": "bash scripts/release-extras.sh",
72
73
  "plugin:sync": "bun run scripts/sync-plugin-assets.ts --write",
73
74
  "plugin:check": "bun run scripts/sync-plugin-assets.ts",
74
75
  "manifest:sync": "bun run scripts/check-plugin-manifests.ts --write",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dbcli-agent",
3
- "version": "11.0.0",
3
+ "version": "12.1.0",
4
4
  "description": "Database CLI skill and command reference for AI agents",
5
5
  "author": {
6
6
  "name": "Carl Lee",
@@ -152,6 +152,14 @@ dbcli capabilities check --require schema.read,query.read # gate your wo
152
152
  dbcli capabilities check --require data.delete --format json # machine-readable
153
153
  ```
154
154
 
155
+ `connection.tls` derives support from the engine matrix and maps to existing
156
+ connection command surfaces, supporting PostgreSQL, MySQL and MariaDB. It adds
157
+ no TLS subcommand. Check with
158
+ `dbcli capabilities check --require connection.tls --format json`.
159
+ `available` establishes tool support only, not TLS configuration, readable CA,
160
+ a successful handshake or authorization. Catalog/check stay offline, read no CA
161
+ and change no configuration. Older binaries without this ID return `unknown`.
162
+
155
163
  For a copyable Bun/TypeScript consumer with strict parsing, schema pins, exit handling,
156
164
  Operation Envelope handling, Task Pack `safety.requires`, and correlation/evidence guidance,
157
165
  start with `assets/integration-kit/README.md`.
@@ -326,6 +334,44 @@ or `doctor` / `status` reports a missing or invalid config, follow this flow.
326
334
  > If a `.dbcli` already contains `{"$env": "..."}` references, **do not** rerun
327
335
  > `init` to "fill them in" — the env-ref form is intentional for CI/multi-env.
328
336
 
337
+ ### PostgreSQL, MySQL and MariaDB verified TLS
338
+
339
+ When verified TLS is required, use the named `init` entry with both
340
+ `--sql-tls verify-full --sql-tls-ca <path>`. PostgreSQL, MySQL and MariaDB support this SQL
341
+ contract; explicit requests on other engines fail. The saved
342
+ `sqlTls: { mode: 'verify-full', caPath: '/absolute/path/root-ca.pem' }` uses an
343
+ absolute literal PEM path; `init` resolves relative paths from cwd. CA environment
344
+ references are unsupported. Existing host/user environment references and profiles
345
+ without `sqlTls` keep their behavior. V1 directory/v2 reads, normal `init` import
346
+ from a V1 directory and `migrateV1ToV2` preserve TLS. Legacy V1 single-file TLS
347
+ profiles remain readable/usable in human mode; automatic `init` import refuses
348
+ before connecting or writing, preserving the original. Migrate that case by
349
+ creating a verified named profile in a separate config directory, verifying it,
350
+ then selecting it; preserve `sqlTls` throughout.
351
+
352
+ Ambient TLS settings cannot weaken verification or supply another profile’s trust.
353
+ Each connection reloads its own CA and verifies encryption, trust, validity and the
354
+ configured DNS/IP identity; explicit SQL TLS refuses Unix sockets. Failures stop
355
+ before the user query. Repair the CA, hostname or certificate; keep verification
356
+ and TLS required. On binary rollback, stop TLS-required workflows or retain a
357
+ supporting version: older binaries may strip `sqlTls`. Local fixture evidence does
358
+ not establish real RDS acceptance. Configured permitted reads work in agent mode;
359
+ `init` and other configuration changes remain refused.
360
+
361
+ For TLS error recovery, repair certificates while retaining TLS, then explicitly
362
+ select `--config <path>` or `--global`; v2 also requires `--use <name>` or
363
+ `DBCLI_CONNECTION`. The selected profile must retain `sqlTls.mode: verify-full`.
364
+ Missing, ambiguous or plaintext selections block live steps. Saved envelopes
365
+ redact original selectors, so current targeting does not establish original
366
+ provenance. Apply and verification use the current CLI binary. Example:
367
+
368
+ ```bash
369
+ bun run src/cli.ts --config .dbcli --use verified-mysql recover --apply --format json
370
+ ```
371
+
372
+ For the complete configuration, example and failure contract, read
373
+ [SQL verified TLS](reference.md#verified-tls-for-postgresql-mysql-and-mariadb).
374
+
329
375
  ### Decision tree (ask before writing)
330
376
 
331
377
  1. **What is the connection name?** Every new connection uses named v2, even
@@ -157,7 +157,7 @@ Without a TTY, with `--no-interactive`, or when `--use-env-refs` plus all five `
157
157
 
158
158
  New initialization always creates named v2 configuration, including plain `init` and explicit `--config` paths; it no longer creates an unnamed v1 configuration. Existing v1 configurations remain readable and their established named v2 import is retained. The first explicitly named connection is still the default in a new registry; adding a connection preserves an existing registry's default or no-default state. An explicitly chosen duplicate name still requires interactive overwrite confirmation or `--force`; a noninteractive duplicate without `--force`, or a declined confirmation, leaves files untouched. `--remove` and `--rename` do not ask for a new connection name.
159
159
 
160
- **Key options:** `--system`, `--permission`, `--use-env-refs`, `--skip-test`, `--no-interactive`, `--force`, `--conn-name <name>`, `--env-file <path>`, `--remove <name>`, `--rename <old:new>`
160
+ **Key options:** `--sql-tls verify-full`, `--sql-tls-ca <path>`, `--system`, `--permission`, `--use-env-refs`, `--skip-test`, `--no-interactive`, `--force`, `--conn-name <name>`, `--env-file <path>`, `--remove <name>`, `--rename <old:new>`
161
161
 
162
162
  **Environment-reference options:** `--env-host <var>`, `--env-port <var>`, `--env-user <var>`, `--env-password <var>`, `--env-database <var>`
163
163
 
@@ -193,6 +193,57 @@ Use root-level `--global` with `init`, `use`, `status`, `query`, or any other co
193
193
 
194
194
  > **AI agent note on `--use-env-refs`:** If an existing `.dbcli` config contains `{"$env": "DB_HOST"}` style references, the connection values are read from environment variables at runtime. Do NOT re-run `init` to replace these references with actual values — the env-ref format is intentional for CI/CD and multi-environment setups.
195
195
 
196
+ #### Verified TLS for PostgreSQL, MySQL and MariaDB
197
+
198
+ Use both SQL TLS flags when creating a named PostgreSQL, MySQL or MariaDB profile. This example prompts for the password and tests the connection before saving:
199
+
200
+ ```bash
201
+ dbcli init --conn-name verified-pg --system postgresql \
202
+ --host db.example.com --port 5432 --user reader --name appdb \
203
+ --permission query-only --sql-tls verify-full --sql-tls-ca ./certs/root-ca.pem
204
+ dbcli --use verified-pg blacklist list
205
+ dbcli --use verified-pg schema public.events --format json
206
+ dbcli --use verified-pg query "SELECT id FROM public.events LIMIT 10" --format json
207
+ ```
208
+
209
+ MySQL and MariaDB use the same flags, with separate named profiles and CA paths. Select the corresponding profile, then check blacklist and schema before an authorized query:
210
+
211
+ ```bash
212
+ dbcli init --conn-name verified-mysql --system mysql \
213
+ --host mysql.example.com --port 3306 --user reader --name appdb \
214
+ --permission query-only --sql-tls verify-full --sql-tls-ca ./certs/mysql-ca.pem
215
+ dbcli init --conn-name verified-mariadb --system mariadb \
216
+ --host mariadb.example.com --port 3306 --user reader --name appdb \
217
+ --permission query-only --sql-tls verify-full --sql-tls-ca ./certs/mariadb-ca.pem
218
+ ```
219
+
220
+ Replace the host, database and table with your authorized target; confirm real columns through schema before querying. The saved connection includes this dedicated SQL object (shown as a connection fragment):
221
+
222
+ ```json
223
+ {
224
+ "sqlTls": {
225
+ "mode": "verify-full",
226
+ "caPath": "/absolute/path/to/certs/root-ca.pem"
227
+ }
228
+ }
229
+ ```
230
+
231
+ `--sql-tls verify-full` and `--sql-tls-ca <path>` are required together. Empty values, other modes and unsupported engines fail explicitly. PostgreSQL, MySQL and MariaDB support this SQL TLS contract; all other engines reject an explicit request. MongoDB's `tls` and Elasticsearch's TLS settings remain separate. Existing profiles without `sqlTls` keep their previous behavior; no global TLS policy is added. V1 directory and v2 profile reads, normal `init` import from a V1 directory to v2, and the public `migrateV1ToV2` helper preserve the TLS object. A legacy V1 single-file TLS profile remains readable and usable in human mode, but automatic `init` import explicitly refuses it before connecting or writing and leaves the original untouched. For that case, create a verified named profile in a separate configuration directory, verify it, then select it; preserve `sqlTls` throughout migration.
232
+
233
+ `init` resolves a relative CA path against its current working directory before saving. Saved `caPath` must be a nonempty absolute literal path to a PEM CA bundle; it accepts no environment-variable reference. Existing environment references in host/user and other supported fields remain usable. Explicit TLS uses only the selected profile’s CA and identity settings; ambient TLS settings cannot weaken verification or supply another profile’s trust. Each new connection reads the CA bundle again; an unreadable, empty or invalid bundle stops before connecting. `--skip-test` skips only the initialization test, not verification on subsequent use.
234
+
235
+ `verify-full` requires encryption, a trusted certificate chain, valid certificate dates and certificate identity matching the configured DNS name or IP address. Unix sockets are refused for explicit SQL TLS. Untrusted, expired or mismatched certificates and servers without TLS fail before the user query; there is no plaintext retry or verification downgrade. Correct the CA, target hostname or certificate validity before retrying. A cipher alone does not prove identity verification.
236
+
237
+ For TLS error recovery, keep TLS configured and repair the CA, hostname or certificate first. Then deliberately select the configuration with `--config <path>` (or `--global`) and, for v2, the named profile with `--use <name>` (`DBCLI_CONNECTION` is also accepted). The selected profile must still have `sqlTls.mode: verify-full`; missing, ambiguous or plaintext selections block live recovery steps instead of falling back to a default plaintext connection. Saved recovery envelopes redact the original selectors: your current selection is deliberate targeting, not proof of the original target. Recovery apply and verification use the current CLI binary, avoiding an older `dbcli` on PATH. For the MySQL example above:
238
+
239
+ ```bash
240
+ bun run src/cli.ts --config .dbcli --use verified-mysql recover --apply --format json
241
+ ```
242
+
243
+ Permitted reads through an already configured profile remain usable in agent mode; `init` and other configuration mutations remain refused under `DBCLI_AGENT_MODE=1`. TLS does not bypass explicit production selection, native database authorization, permission, blacklist, write-gate or audit controls.
244
+
245
+ For binary rollback, stop workflows that require verified TLS or keep a supporting version. Older binaries may strip `sqlTls`; retaining the profile after downgrading does not preserve the guarantee. Removing TLS settings or retrying in plaintext cannot restore compliance. Local isolated PostgreSQL, MySQL and MariaDB fixture results are not evidence of real RDS acceptance; RDS remains unverified.
246
+
196
247
  ### use
197
248
 
198
249
  Set, clear, or display the default database connection (v2 multi-connection config).
@@ -1731,6 +1782,8 @@ Every actionable block carries machine-readable next steps so an agent can move
1731
1782
 
1732
1783
  ### capabilities
1733
1784
 
1785
+ `connection.tls` reports PostgreSQL, MySQL and MariaDB support from the engine capability matrix and maps to the existing connection command surfaces; it adds no TLS subcommand. Check with `dbcli --use verified-pg capabilities check --require connection.tls --format json`. `available` means tool support only: it does not prove that this profile configures TLS, the CA is readable, the handshake succeeds, or the operation is authorized. Catalog/check remain offline, read no CA bundle, perform no handshake and change no configuration. Other engines do not report this capability as available; older binaries without the ID return `unknown`. Configuration mutation still requires its own authorization.
1786
+
1734
1787
  Discovery. Lists the static dbcli capability catalog — what this tool can do,
1735
1788
  described in a versioned shape an external Skill can parse before it starts
1736
1789
  working. It never opens a database connection and never writes anything.
@@ -1868,8 +1921,11 @@ at execution time, and no human has agreed to anything. `admin` in a config file
1868
1921
  is a permission level, not a DBA sign-off.
1869
1922
 
1870
1923
  `schema.read` is available under `DBCLI_AGENT_MODE=1`, and `dbcli schema` runs
1871
- there: storing the schema cache is not a configuration change. Agent mode still
1872
- refuses every change to connection identity, permission and credentials.
1924
+ there: storing the schema cache is not a configuration change. `blacklist.read`
1925
+ (`blacklist list`) is available there too, so read-only Task Packs that inspect
1926
+ the blacklist can plan; `blacklist.manage`, which adds and removes rules, is
1927
+ refused. Agent mode still refuses every change to connection identity,
1928
+ permission and credentials.
1873
1929
 
1874
1930
  **Permission:** query-only+ (no connection is made)
1875
1931
 
@@ -152,6 +152,14 @@ dbcli capabilities check --require schema.read,query.read # gate your wo
152
152
  dbcli capabilities check --require data.delete --format json # machine-readable
153
153
  ```
154
154
 
155
+ `connection.tls` derives support from the engine matrix and maps to existing
156
+ connection command surfaces, supporting PostgreSQL, MySQL and MariaDB. It adds
157
+ no TLS subcommand. Check with
158
+ `dbcli capabilities check --require connection.tls --format json`.
159
+ `available` establishes tool support only, not TLS configuration, readable CA,
160
+ a successful handshake or authorization. Catalog/check stay offline, read no CA
161
+ and change no configuration. Older binaries without this ID return `unknown`.
162
+
155
163
  For a copyable Bun/TypeScript consumer with strict parsing, schema pins, exit handling,
156
164
  Operation Envelope handling, Task Pack `safety.requires`, and correlation/evidence guidance,
157
165
  start with `assets/integration-kit/README.md`.
@@ -326,6 +334,44 @@ or `doctor` / `status` reports a missing or invalid config, follow this flow.
326
334
  > If a `.dbcli` already contains `{"$env": "..."}` references, **do not** rerun
327
335
  > `init` to "fill them in" — the env-ref form is intentional for CI/multi-env.
328
336
 
337
+ ### PostgreSQL, MySQL and MariaDB verified TLS
338
+
339
+ When verified TLS is required, use the named `init` entry with both
340
+ `--sql-tls verify-full --sql-tls-ca <path>`. PostgreSQL, MySQL and MariaDB support this SQL
341
+ contract; explicit requests on other engines fail. The saved
342
+ `sqlTls: { mode: 'verify-full', caPath: '/absolute/path/root-ca.pem' }` uses an
343
+ absolute literal PEM path; `init` resolves relative paths from cwd. CA environment
344
+ references are unsupported. Existing host/user environment references and profiles
345
+ without `sqlTls` keep their behavior. V1 directory/v2 reads, normal `init` import
346
+ from a V1 directory and `migrateV1ToV2` preserve TLS. Legacy V1 single-file TLS
347
+ profiles remain readable/usable in human mode; automatic `init` import refuses
348
+ before connecting or writing, preserving the original. Migrate that case by
349
+ creating a verified named profile in a separate config directory, verifying it,
350
+ then selecting it; preserve `sqlTls` throughout.
351
+
352
+ Ambient TLS settings cannot weaken verification or supply another profile’s trust.
353
+ Each connection reloads its own CA and verifies encryption, trust, validity and the
354
+ configured DNS/IP identity; explicit SQL TLS refuses Unix sockets. Failures stop
355
+ before the user query. Repair the CA, hostname or certificate; keep verification
356
+ and TLS required. On binary rollback, stop TLS-required workflows or retain a
357
+ supporting version: older binaries may strip `sqlTls`. Local fixture evidence does
358
+ not establish real RDS acceptance. Configured permitted reads work in agent mode;
359
+ `init` and other configuration changes remain refused.
360
+
361
+ For TLS error recovery, repair certificates while retaining TLS, then explicitly
362
+ select `--config <path>` or `--global`; v2 also requires `--use <name>` or
363
+ `DBCLI_CONNECTION`. The selected profile must retain `sqlTls.mode: verify-full`.
364
+ Missing, ambiguous or plaintext selections block live steps. Saved envelopes
365
+ redact original selectors, so current targeting does not establish original
366
+ provenance. Apply and verification use the current CLI binary. Example:
367
+
368
+ ```bash
369
+ bun run src/cli.ts --config .dbcli --use verified-mysql recover --apply --format json
370
+ ```
371
+
372
+ For the complete configuration, example and failure contract, read
373
+ [SQL verified TLS](reference.md#verified-tls-for-postgresql-mysql-and-mariadb).
374
+
329
375
  ### Decision tree (ask before writing)
330
376
 
331
377
  1. **What is the connection name?** Every new connection uses named v2, even
@@ -157,7 +157,7 @@ Without a TTY, with `--no-interactive`, or when `--use-env-refs` plus all five `
157
157
 
158
158
  New initialization always creates named v2 configuration, including plain `init` and explicit `--config` paths; it no longer creates an unnamed v1 configuration. Existing v1 configurations remain readable and their established named v2 import is retained. The first explicitly named connection is still the default in a new registry; adding a connection preserves an existing registry's default or no-default state. An explicitly chosen duplicate name still requires interactive overwrite confirmation or `--force`; a noninteractive duplicate without `--force`, or a declined confirmation, leaves files untouched. `--remove` and `--rename` do not ask for a new connection name.
159
159
 
160
- **Key options:** `--system`, `--permission`, `--use-env-refs`, `--skip-test`, `--no-interactive`, `--force`, `--conn-name <name>`, `--env-file <path>`, `--remove <name>`, `--rename <old:new>`
160
+ **Key options:** `--sql-tls verify-full`, `--sql-tls-ca <path>`, `--system`, `--permission`, `--use-env-refs`, `--skip-test`, `--no-interactive`, `--force`, `--conn-name <name>`, `--env-file <path>`, `--remove <name>`, `--rename <old:new>`
161
161
 
162
162
  **Environment-reference options:** `--env-host <var>`, `--env-port <var>`, `--env-user <var>`, `--env-password <var>`, `--env-database <var>`
163
163
 
@@ -193,6 +193,57 @@ Use root-level `--global` with `init`, `use`, `status`, `query`, or any other co
193
193
 
194
194
  > **AI agent note on `--use-env-refs`:** If an existing `.dbcli` config contains `{"$env": "DB_HOST"}` style references, the connection values are read from environment variables at runtime. Do NOT re-run `init` to replace these references with actual values — the env-ref format is intentional for CI/CD and multi-environment setups.
195
195
 
196
+ #### Verified TLS for PostgreSQL, MySQL and MariaDB
197
+
198
+ Use both SQL TLS flags when creating a named PostgreSQL, MySQL or MariaDB profile. This example prompts for the password and tests the connection before saving:
199
+
200
+ ```bash
201
+ dbcli init --conn-name verified-pg --system postgresql \
202
+ --host db.example.com --port 5432 --user reader --name appdb \
203
+ --permission query-only --sql-tls verify-full --sql-tls-ca ./certs/root-ca.pem
204
+ dbcli --use verified-pg blacklist list
205
+ dbcli --use verified-pg schema public.events --format json
206
+ dbcli --use verified-pg query "SELECT id FROM public.events LIMIT 10" --format json
207
+ ```
208
+
209
+ MySQL and MariaDB use the same flags, with separate named profiles and CA paths. Select the corresponding profile, then check blacklist and schema before an authorized query:
210
+
211
+ ```bash
212
+ dbcli init --conn-name verified-mysql --system mysql \
213
+ --host mysql.example.com --port 3306 --user reader --name appdb \
214
+ --permission query-only --sql-tls verify-full --sql-tls-ca ./certs/mysql-ca.pem
215
+ dbcli init --conn-name verified-mariadb --system mariadb \
216
+ --host mariadb.example.com --port 3306 --user reader --name appdb \
217
+ --permission query-only --sql-tls verify-full --sql-tls-ca ./certs/mariadb-ca.pem
218
+ ```
219
+
220
+ Replace the host, database and table with your authorized target; confirm real columns through schema before querying. The saved connection includes this dedicated SQL object (shown as a connection fragment):
221
+
222
+ ```json
223
+ {
224
+ "sqlTls": {
225
+ "mode": "verify-full",
226
+ "caPath": "/absolute/path/to/certs/root-ca.pem"
227
+ }
228
+ }
229
+ ```
230
+
231
+ `--sql-tls verify-full` and `--sql-tls-ca <path>` are required together. Empty values, other modes and unsupported engines fail explicitly. PostgreSQL, MySQL and MariaDB support this SQL TLS contract; all other engines reject an explicit request. MongoDB's `tls` and Elasticsearch's TLS settings remain separate. Existing profiles without `sqlTls` keep their previous behavior; no global TLS policy is added. V1 directory and v2 profile reads, normal `init` import from a V1 directory to v2, and the public `migrateV1ToV2` helper preserve the TLS object. A legacy V1 single-file TLS profile remains readable and usable in human mode, but automatic `init` import explicitly refuses it before connecting or writing and leaves the original untouched. For that case, create a verified named profile in a separate configuration directory, verify it, then select it; preserve `sqlTls` throughout migration.
232
+
233
+ `init` resolves a relative CA path against its current working directory before saving. Saved `caPath` must be a nonempty absolute literal path to a PEM CA bundle; it accepts no environment-variable reference. Existing environment references in host/user and other supported fields remain usable. Explicit TLS uses only the selected profile’s CA and identity settings; ambient TLS settings cannot weaken verification or supply another profile’s trust. Each new connection reads the CA bundle again; an unreadable, empty or invalid bundle stops before connecting. `--skip-test` skips only the initialization test, not verification on subsequent use.
234
+
235
+ `verify-full` requires encryption, a trusted certificate chain, valid certificate dates and certificate identity matching the configured DNS name or IP address. Unix sockets are refused for explicit SQL TLS. Untrusted, expired or mismatched certificates and servers without TLS fail before the user query; there is no plaintext retry or verification downgrade. Correct the CA, target hostname or certificate validity before retrying. A cipher alone does not prove identity verification.
236
+
237
+ For TLS error recovery, keep TLS configured and repair the CA, hostname or certificate first. Then deliberately select the configuration with `--config <path>` (or `--global`) and, for v2, the named profile with `--use <name>` (`DBCLI_CONNECTION` is also accepted). The selected profile must still have `sqlTls.mode: verify-full`; missing, ambiguous or plaintext selections block live recovery steps instead of falling back to a default plaintext connection. Saved recovery envelopes redact the original selectors: your current selection is deliberate targeting, not proof of the original target. Recovery apply and verification use the current CLI binary, avoiding an older `dbcli` on PATH. For the MySQL example above:
238
+
239
+ ```bash
240
+ bun run src/cli.ts --config .dbcli --use verified-mysql recover --apply --format json
241
+ ```
242
+
243
+ Permitted reads through an already configured profile remain usable in agent mode; `init` and other configuration mutations remain refused under `DBCLI_AGENT_MODE=1`. TLS does not bypass explicit production selection, native database authorization, permission, blacklist, write-gate or audit controls.
244
+
245
+ For binary rollback, stop workflows that require verified TLS or keep a supporting version. Older binaries may strip `sqlTls`; retaining the profile after downgrading does not preserve the guarantee. Removing TLS settings or retrying in plaintext cannot restore compliance. Local isolated PostgreSQL, MySQL and MariaDB fixture results are not evidence of real RDS acceptance; RDS remains unverified.
246
+
196
247
  ### use
197
248
 
198
249
  Set, clear, or display the default database connection (v2 multi-connection config).
@@ -1731,6 +1782,8 @@ Every actionable block carries machine-readable next steps so an agent can move
1731
1782
 
1732
1783
  ### capabilities
1733
1784
 
1785
+ `connection.tls` reports PostgreSQL, MySQL and MariaDB support from the engine capability matrix and maps to the existing connection command surfaces; it adds no TLS subcommand. Check with `dbcli --use verified-pg capabilities check --require connection.tls --format json`. `available` means tool support only: it does not prove that this profile configures TLS, the CA is readable, the handshake succeeds, or the operation is authorized. Catalog/check remain offline, read no CA bundle, perform no handshake and change no configuration. Other engines do not report this capability as available; older binaries without the ID return `unknown`. Configuration mutation still requires its own authorization.
1786
+
1734
1787
  Discovery. Lists the static dbcli capability catalog — what this tool can do,
1735
1788
  described in a versioned shape an external Skill can parse before it starts
1736
1789
  working. It never opens a database connection and never writes anything.
@@ -1868,8 +1921,11 @@ at execution time, and no human has agreed to anything. `admin` in a config file
1868
1921
  is a permission level, not a DBA sign-off.
1869
1922
 
1870
1923
  `schema.read` is available under `DBCLI_AGENT_MODE=1`, and `dbcli schema` runs
1871
- there: storing the schema cache is not a configuration change. Agent mode still
1872
- refuses every change to connection identity, permission and credentials.
1924
+ there: storing the schema cache is not a configuration change. `blacklist.read`
1925
+ (`blacklist list`) is available there too, so read-only Task Packs that inspect
1926
+ the blacklist can plan; `blacklist.manage`, which adds and removes rules, is
1927
+ refused. Agent mode still refuses every change to connection identity,
1928
+ permission and credentials.
1873
1929
 
1874
1930
  **Permission:** query-only+ (no connection is made)
1875
1931