diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index fc694b4..8f33ee7 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -111,12 +111,12 @@ jobs: passed=$(gh run list --workflow ci.yml --commit "$GITHUB_SHA" --status success --json databaseId --jq 'length') test "$passed" -gt 0 # checkout's shallow SHA fetch creates a local lightweight tag; retrieve the actual tag object. - git fetch --force origin refs/tags/v0.1.7:refs/tags/v0.1.7 - test "$(git rev-parse 'v0.1.7^{commit}')" = "$GITHUB_SHA" - test "$(git describe --tags --exact-match HEAD)" = v0.1.7 - test "$(git cat-file -t refs/tags/v0.1.7)" = tag - gh release create v0.1.7 --draft --verify-tag --title 'SQLX 0.1.7' --notes-file docs/release-notes.md dist/*.zip dist/manifest.json dist/SHA256SUMS dist/release-version.txt - gh release edit v0.1.7 --draft=false --latest + git fetch --force origin refs/tags/v0.1.8:refs/tags/v0.1.8 + test "$(git rev-parse 'v0.1.8^{commit}')" = "$GITHUB_SHA" + test "$(git describe --tags --exact-match HEAD)" = v0.1.8 + test "$(git cat-file -t refs/tags/v0.1.8)" = tag + gh release create v0.1.8 --draft --verify-tag --title 'SQLX 0.1.8' --notes-file docs/release-notes.md dist/*.zip dist/manifest.json dist/SHA256SUMS dist/release-version.txt + gh release edit v0.1.8 --draft=false --latest npm: needs: [assemble] if: inputs.publish @@ -132,6 +132,6 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: | - test "$GITHUB_REF_NAME" = v0.1.7 + test "$GITHUB_REF_NAME" = v0.1.8 test "$(node -p 'require("./package.json").version')" = "${GITHUB_REF_NAME#v}" npm publish --access public diff --git a/Cargo.lock b/Cargo.lock index 1867df8..1e5196f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1453,7 +1453,7 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "ottermind-sqlx" -version = "0.1.7" +version = "0.1.8" dependencies = [ "aes-gcm", "anyhow", @@ -2181,7 +2181,7 @@ dependencies = [ [[package]] name = "sqlx-driver-mysql" -version = "0.1.7" +version = "0.1.8" dependencies = [ "anyhow", "base64", @@ -2193,7 +2193,7 @@ dependencies = [ [[package]] name = "sqlx-driver-postgres" -version = "0.1.7" +version = "0.1.8" dependencies = [ "anyhow", "base64", @@ -2211,7 +2211,7 @@ dependencies = [ [[package]] name = "sqlx-protocol" -version = "0.1.7" +version = "0.1.8" dependencies = [ "anyhow", "serde", @@ -2220,7 +2220,7 @@ dependencies = [ [[package]] name = "sqlx-ui" -version = "0.1.7" +version = "0.1.8" dependencies = [ "anyhow", "axum", diff --git a/Cargo.toml b/Cargo.toml index b93d66a..0cf9f4e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ resolver = "2" members = ["crates/protocol", "crates/cli", "crates/ui", "drivers/mysql", "drivers/postgres"] [workspace.package] -version = "0.1.7" +version = "0.1.8" edition = "2021" rust-version = "1.95" license-file = "LICENSE" diff --git a/README.md b/README.md index f50ed22..a48fd2f 100644 --- a/README.md +++ b/README.md @@ -311,7 +311,7 @@ For Oracle and SQL Server, build the JDBC worker and place its driver JARs along ```sh mvn -B -f java/jdbc/pom.xml package -cp java/jdbc/target/sqlx-jdbc-0.1.7.jar target/release/sqlx-jdbc.jar +cp java/jdbc/target/sqlx-jdbc-0.1.8.jar target/release/sqlx-jdbc.jar curl -fL https://repo.maven.apache.org/maven2/com/oracle/database/jdbc/ojdbc11/23.6.0.24.10/ojdbc11-23.6.0.24.10.jar -o target/release/ojdbc.jar curl -fL https://repo.maven.apache.org/maven2/com/microsoft/sqlserver/mssql-jdbc/12.10.1.jre11/mssql-jdbc-12.10.1.jre11.jar -o target/release/mssql-jdbc.jar ``` @@ -320,7 +320,7 @@ On Windows PowerShell: ```powershell mvn -B -f java/jdbc/pom.xml package -Copy-Item java/jdbc/target/sqlx-jdbc-0.1.7.jar target/release/sqlx-jdbc.jar +Copy-Item java/jdbc/target/sqlx-jdbc-0.1.8.jar target/release/sqlx-jdbc.jar Invoke-WebRequest 'https://repo.maven.apache.org/maven2/com/oracle/database/jdbc/ojdbc11/23.6.0.24.10/ojdbc11-23.6.0.24.10.jar' -OutFile target/release/ojdbc.jar Invoke-WebRequest 'https://repo.maven.apache.org/maven2/com/microsoft/sqlserver/mssql-jdbc/12.10.1.jre11/mssql-jdbc-12.10.1.jre11.jar' -OutFile target/release/mssql-jdbc.jar ``` diff --git a/docs/release-notes.md b/docs/release-notes.md index 1b32977..ed45fed 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1,29 +1,21 @@ -SQLX 0.1.7 adds Skill targets for dsh and Pi, a way to remove a Skill installation, and clearer database errors. +SQLX 0.1.8 fixes credential redaction in the JDBC worker and documents how to connect to a local database. -## New +## Fixes -- `sqlx skill install --target dsh` installs the Skill into `~/.agents/skills`, the shared directory that dsh and Codex both read; `--target pi` installs into Pi's `~/.pi/agent/skills`. The npx installer accepts the same names, and unknown targets now list all four. -- `sqlx skill remove --path ` stops managing an installation without deleting its files, and `sqlx skill status` marks a record whose directory no longer exists with `missing: true` instead of leaving an unexplained `intact: false`. +- The JDBC worker redacted the username and password wherever they appeared, so a driver message could lose unrelated text: with the password `oracle`, the Oracle help link arrived as `https://docs.[redacted].com/error-help/db/ora-17002/`. Redaction now leaves a secret alone when it is only part of a word or a hostname, matching the CLI behaviour shipped in 0.1.7. ## Improvements -- PostgreSQL failures report the server's own message instead of `db error`, including the detail and hint fields when the server sends them. -- A connection that fails before any statement with certificate verification enabled now points at `--tls disable`. Oracle previously reported only `ORA-17002: I/O 错误: Connection closed`, which looks like a network fault rather than a TLS mismatch. -- The JDBC worker no longer writes vendor driver diagnostics to stderr when a connection fails; set `SQLX_JDBC_DEBUG=1` to see them again. -- Credential redaction keeps hostnames and ordinary words intact. A password such as `oracle` no longer rewrites `docs.oracle.com` in a driver message, and a short username no longer mangles unrelated words. - -## Fixes - -- `sqlx sql execute … | head` no longer panics with `failed printing to stdout: Broken pipe`; a closed stdout exits quietly and other write failures still fail. +- The README's first-connection section now names the MySQL, Oracle and SQL Server flags, lists the three failure messages a local container produces under the default certificate verification, and shows the `--tls disable` form for a new or existing connection. ## Upgrading From SQLX 0.1.2 or later, run `sqlx update check`, `sqlx update install`, and `sqlx update status`. Versions 0.1.0 and 0.1.1 need the [README installer](https://github.com/OtterMind/sqlx#install-the-cli) first. -CLI updates preserve running UI services and the selected plugin. This release does not change the local page plugin, so no page update is required. Downloaded components are cached per version and reused, so an upgrade only fetches components that changed. Update managed Skills separately with `sqlx skill update` after upgrading the CLI; the 0.1.7 Skill requires SQLX 0.1.7. +CLI updates preserve running UI services and the selected plugin. This release does not change the local page plugin, so no page update is required. Downloaded components are cached per version and reused, so an upgrade only fetches components that changed. Update managed Skills separately with `sqlx skill update` after upgrading the CLI; the 0.1.8 Skill requires SQLX 0.1.8. The Skill's approval rule constrains the Agent workflow only. SQLX itself still executes the supplied SQL unchanged, and an explicit result refresh still reruns the complete original batch, including any writes. Prebuilt packages are available for macOS ARM64/x64, Linux ARM64/x64, and Windows x64. macOS executables are Developer ID signed and notarized. See LICENSE and NOTICE for license conditions. -**Full Changelog**: https://github.com/OtterMind/sqlx/compare/v0.1.6...v0.1.7 +**Full Changelog**: https://github.com/OtterMind/sqlx/compare/v0.1.7...v0.1.8 diff --git a/java/jdbc/pom.xml b/java/jdbc/pom.xml index f6ed176..d0a19d7 100644 --- a/java/jdbc/pom.xml +++ b/java/jdbc/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - ai.ottermind.sqlxsqlx-jdbc0.1.7 + ai.ottermind.sqlxsqlx-jdbc0.1.8 17UTF-8 com.fasterxml.jackson.corejackson-databind2.18.6 diff --git a/packages/npm-installer/package.json b/packages/npm-installer/package.json index 5464f7c..772ec17 100644 --- a/packages/npm-installer/package.json +++ b/packages/npm-installer/package.json @@ -1,6 +1,6 @@ { "name": "@ottermind/sqlx", - "version": "0.1.7", + "version": "0.1.8", "description": "Install or update the SQLX database CLI and its agent Skill.", "license": "LicenseRef-Chat2DB", "homepage": "https://github.com/OtterMind/sqlx#readme", diff --git a/scripts/jdbc-fixture.sh b/scripts/jdbc-fixture.sh index 86b4374..237ee35 100644 --- a/scripts/jdbc-fixture.sh +++ b/scripts/jdbc-fixture.sh @@ -2,7 +2,7 @@ set -euo pipefail kind="${1:?oracle or sqlserver required}" mkdir -p target/debug -cp java/jdbc/target/sqlx-jdbc-0.1.7.jar target/debug/sqlx-jdbc.jar +cp java/jdbc/target/sqlx-jdbc-0.1.8.jar target/debug/sqlx-jdbc.jar case "$kind" in oracle) curl --fail --location --retry 3 'https://repo.maven.apache.org/maven2/com/oracle/database/jdbc/ojdbc11/23.6.0.24.10/ojdbc11-23.6.0.24.10.jar' -o target/debug/ojdbc.jar diff --git a/scripts/manifest.py b/scripts/manifest.py index 3dc36ba..5cc4348 100644 --- a/scripts/manifest.py +++ b/scripts/manifest.py @@ -2,7 +2,7 @@ import argparse,hashlib,json from pathlib import Path def main(): - p=argparse.ArgumentParser();p.add_argument('directory',type=Path);p.add_argument('--version',default='0.1.7');a=p.parse_args();components={} + p=argparse.ArgumentParser();p.add_argument('directory',type=Path);p.add_argument('--version',default='0.1.8');a=p.parse_args();components={} for path in sorted(a.directory.glob('metadata-*.json')): fragment=json.loads(path.read_text()) if set(components)&set(fragment):raise ValueError('duplicate manifest components') diff --git a/scripts/package-shared.py b/scripts/package-shared.py index 33566b2..cf00c5f 100644 --- a/scripts/package-shared.py +++ b/scripts/package-shared.py @@ -11,7 +11,7 @@ def get(url): if attempt==2:raise time.sleep(attempt+1) def main(): - p=argparse.ArgumentParser();p.add_argument('--version',default='0.1.7');p.add_argument('--output',type=Path,default=ROOT/'dist');a=p.parse_args();a.output.mkdir(parents=True,exist_ok=True) + p=argparse.ArgumentParser();p.add_argument('--version',default='0.1.8');p.add_argument('--output',type=Path,default=ROOT/'dist');a=p.parse_args();a.output.mkdir(parents=True,exist_ok=True) records={};base=f'https://github.com/OtterMind/sqlx/releases/download/v{a.version}/' def add(name,entries,entrypoint,version=None): component_version=version or a.version @@ -19,7 +19,7 @@ def add(name,entries,entrypoint,version=None): with zipfile.ZipFile(path,'w',zipfile.ZIP_DEFLATED) as z: for filename,body in entries.items():z.writestr(filename,body) # The Skill ships with the CLI, so it requires the same release; the default - # UI plugin is unchanged in 0.1.7 and keeps its 0.1.4 requirement. + # UI plugin is unchanged in 0.1.8 and keeps its 0.1.4 requirement. compat={'skill':f'>={a.version}, <0.2.0','ui-default':'>=0.1.4, <0.2.0'}.get(name,'>=0.1.1, <0.2.0') records[f'{name}:any']=dict(version=component_version,url=base+path.name,sha256=hashlib.sha256(path.read_bytes()).hexdigest(),archive='zip',entrypoint=entrypoint,cli_compat=compat,protocol_version=1) add('jdbc',{'sqlx-jdbc.jar':(ROOT/f'java/jdbc/target/sqlx-jdbc-{a.version}.jar').read_bytes(),'LICENSE':(ROOT/'LICENSE').read_bytes(),'NOTICE':(ROOT/'NOTICE').read_bytes()},'sqlx-jdbc.jar') diff --git a/scripts/package.py b/scripts/package.py index 5271b60..66a34bf 100644 --- a/scripts/package.py +++ b/scripts/package.py @@ -8,7 +8,7 @@ def archive(output,files): for source,name in files:z.write(source,name) return hashlib.sha256(output.read_bytes()).hexdigest() def main(): - p=argparse.ArgumentParser();p.add_argument('--platform',required=True);p.add_argument('--version',default='0.1.7');p.add_argument('--bin-dir',type=Path,default=ROOT/'target/release');p.add_argument('--output',type=Path,default=ROOT/'dist');a=p.parse_args() + p=argparse.ArgumentParser();p.add_argument('--platform',required=True);p.add_argument('--version',default='0.1.8');p.add_argument('--bin-dir',type=Path,default=ROOT/'target/release');p.add_argument('--output',type=Path,default=ROOT/'dist');a=p.parse_args() a.output.mkdir(parents=True,exist_ok=True);records={} suffix='.exe' if a.platform.startswith('windows-') else '' for kind,binary in [('cli','sqlx'),('mysql','sqlx-driver-mysql'),('postgres','sqlx-driver-postgres'),('ui','sqlx-ui')]: diff --git a/skills/sqlx/SKILL.md b/skills/sqlx/SKILL.md index 41eb7ba..d558d99 100644 --- a/skills/sqlx/SKILL.md +++ b/skills/sqlx/SKILL.md @@ -2,7 +2,7 @@ name: sqlx description: Manage encrypted database connections and execute SQL with the OtterMind SQLX CLI. Use for MySQL, PostgreSQL, Oracle, and SQL Server connection checks, queries, DDL, and schema inspection. This skill targets OtterMind/sqlx, not the Rust SQLx migration CLI. metadata: - cli-compat: ">=0.1.7, <0.2.0" + cli-compat: ">=0.1.8, <0.2.0" --- # SQLX diff --git a/skills/sqlx/references/install-cli.md b/skills/sqlx/references/install-cli.md index 08c6889..e9efe62 100644 --- a/skills/sqlx/references/install-cli.md +++ b/skills/sqlx/references/install-cli.md @@ -1,6 +1,6 @@ # Install OtterMind SQLX -The repository is https://github.com/OtterMind/sqlx. The supported CLI range for this Skill is `>=0.1.7, <0.2.0`. The local-page commands are not available in 0.1.0; check the actual version before using them. +The repository is https://github.com/OtterMind/sqlx. The supported CLI range for this Skill is `>=0.1.8, <0.2.0`. The local-page commands are not available in 0.1.0; check the actual version before using them. 1. Check `sqlx --version` and `sqlx --help`. An existing Rust SQLx migration tool is a different executable; preserve it and install this client into a separate user directory, using the explicit path when needed. 2. Select a release from the repository's GitHub Releases page compatible with this Skill. If no binary release is published, follow the [README source installation](https://github.com/OtterMind/sqlx#build-from-source) when the required build tools are available. Do not download another project's CLI or pretend a release exists. diff --git a/skills/sqlx/references/local-ui.md b/skills/sqlx/references/local-ui.md index 2ec59b6..1db55ac 100644 --- a/skills/sqlx/references/local-ui.md +++ b/skills/sqlx/references/local-ui.md @@ -1,6 +1,6 @@ # Local credential and result pages -This Skill requires SQLX 0.1.7. Basic local-page commands were introduced in 0.1.1; saved-datasource browsing, data refresh and session renewal were introduced in 0.1.3. Reusable local links and stable restart addresses require 0.1.4. The page is served by a separately downloaded local service and the selected UI plugin, and opens on the machine where the CLI runs. A local URL from a remote SSH environment does not automatically open the remote page on the user's computer. +This Skill requires SQLX 0.1.8. Basic local-page commands were introduced in 0.1.1; saved-datasource browsing, data refresh and session renewal were introduced in 0.1.3. Reusable local links and stable restart addresses require 0.1.4. The page is served by a separately downloaded local service and the selected UI plugin, and opens on the machine where the CLI runs. A local URL from a remote SSH environment does not automatically open the remote page on the user's computer. ## Deliver the page link diff --git a/tests/updates.py b/tests/updates.py index 584e0fa..1ef71c2 100644 --- a/tests/updates.py +++ b/tests/updates.py @@ -14,8 +14,8 @@ import zipfile ROOT = Path(__file__).resolve().parents[1] -CURRENT = "0.1.7" -NEXT = "0.1.8" +CURRENT = "0.1.8" +NEXT = "0.1.9" SUFFIX = ".exe" if os.name == "nt" else "" NAME = "sqlx" + SUFFIX CLI = ROOT / "target/debug" / NAME