From e18054d4101b37207b47131d3ba4ceb4df0a7704 Mon Sep 17 00:00:00 2001 From: zgq Date: Sun, 20 Sep 2026 18:23:55 +0800 Subject: [PATCH] Prepare SQLX v0.1.7 release --- .github/workflows/packages.yml | 14 +++++++------- Cargo.lock | 10 +++++----- Cargo.toml | 2 +- README.md | 6 +++--- docs/release-notes.md | 20 +++++++++++++------- java/jdbc/pom.xml | 2 +- packages/npm-installer/package.json | 2 +- scripts/jdbc-fixture.sh | 2 +- scripts/manifest.py | 2 +- scripts/package-shared.py | 4 ++-- scripts/package.py | 2 +- skills/sqlx/SKILL.md | 2 +- skills/sqlx/references/install-cli.md | 2 +- skills/sqlx/references/local-ui.md | 2 +- tests/updates.py | 4 ++-- 15 files changed, 41 insertions(+), 35 deletions(-) diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index e54c03b..fc694b4 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.6:refs/tags/v0.1.6 - test "$(git rev-parse 'v0.1.6^{commit}')" = "$GITHUB_SHA" - test "$(git describe --tags --exact-match HEAD)" = v0.1.6 - test "$(git cat-file -t refs/tags/v0.1.6)" = tag - gh release create v0.1.6 --draft --verify-tag --title 'SQLX 0.1.6' --notes-file docs/release-notes.md dist/*.zip dist/manifest.json dist/SHA256SUMS dist/release-version.txt - gh release edit v0.1.6 --draft=false --latest + 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 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.6 + test "$GITHUB_REF_NAME" = v0.1.7 test "$(node -p 'require("./package.json").version')" = "${GITHUB_REF_NAME#v}" npm publish --access public diff --git a/Cargo.lock b/Cargo.lock index 0e5f611..1867df8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1453,7 +1453,7 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "ottermind-sqlx" -version = "0.1.6" +version = "0.1.7" dependencies = [ "aes-gcm", "anyhow", @@ -2181,7 +2181,7 @@ dependencies = [ [[package]] name = "sqlx-driver-mysql" -version = "0.1.6" +version = "0.1.7" dependencies = [ "anyhow", "base64", @@ -2193,7 +2193,7 @@ dependencies = [ [[package]] name = "sqlx-driver-postgres" -version = "0.1.6" +version = "0.1.7" dependencies = [ "anyhow", "base64", @@ -2211,7 +2211,7 @@ dependencies = [ [[package]] name = "sqlx-protocol" -version = "0.1.6" +version = "0.1.7" dependencies = [ "anyhow", "serde", @@ -2220,7 +2220,7 @@ dependencies = [ [[package]] name = "sqlx-ui" -version = "0.1.6" +version = "0.1.7" dependencies = [ "anyhow", "axum", diff --git a/Cargo.toml b/Cargo.toml index 340f7f6..b93d66a 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.6" +version = "0.1.7" edition = "2021" rust-version = "1.95" license-file = "LICENSE" diff --git a/README.md b/README.md index 67b80f5..dd9fd86 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ export PATH="$HOME/.local/bin:$PATH" sqlx --version ``` -The installer verifies the release manifest, `SHA256SUMS`, and the downloaded archive before installing. It puts the CLI in the same user-level location as the platform installers and installs the Skill into `./sqlx`; use `--target codex`, `--target claude`, or `--target ` to place the Skill somewhere else. Node.js is required only to run the installer: the CLI itself has no Node.js runtime dependency. +The installer verifies the release manifest, `SHA256SUMS`, and the downloaded archive before installing. It puts the CLI in the same user-level location as the platform installers and installs the Skill into `./sqlx`; use `--target codex`, `--target claude`, `--target dsh`, `--target pi`, or `--target ` to place the Skill somewhere else. Node.js is required only to run the installer: the CLI itself has no Node.js runtime dependency. macOS and Linux install to `~/.local/bin`; Windows x64 installs to `%LOCALAPPDATA%\Programs\SQLX`. Add that directory to your persistent PATH, as in the platform sections below. When it is missing from PATH, the `npx` installer prints the exact line for the current shell together with the profile change that keeps it. @@ -303,7 +303,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.6.jar target/release/sqlx-jdbc.jar +cp java/jdbc/target/sqlx-jdbc-0.1.7.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 ``` @@ -312,7 +312,7 @@ On Windows PowerShell: ```powershell mvn -B -f java/jdbc/pom.xml package -Copy-Item java/jdbc/target/sqlx-jdbc-0.1.6.jar target/release/sqlx-jdbc.jar +Copy-Item java/jdbc/target/sqlx-jdbc-0.1.7.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 6147722..1b32977 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1,23 +1,29 @@ -SQLX 0.1.6 adds a command that downloads database workers and the local UI ahead of time, and reports download progress, speed and elapsed time. +SQLX 0.1.7 adds Skill targets for dsh and Pi, a way to remove a Skill installation, and clearer database errors. ## New -- `sqlx prefetch ` downloads what would otherwise be fetched during the first query or page: `mysql`, `postgres`, `oracle`, `sqlserver`, `ui`, `skill` or `all`. Each component reports `downloaded`, `already_installed`, `unavailable` or `failed`; `oracle` and `sqlserver` include the shared JDBC runner and JRE, and `all` covers every component. The command exits non-zero when a component fails and can be re-run to continue with the components that are already installed. +- `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`. ## Improvements -- Every download (database worker, JDBC runtime, UI engine, UI plugin, Skill and release manifest) prints progress with speed and estimated time on stderr, followed by `Downloaded … in 12.3s (390 KB/s)`. An interrupted transfer is retried up to three times instead of failing immediately, and a failed command explains that it can be re-run. -- A slow transfer is no longer killed after five minutes. The transfer budget is 30 minutes, so a component can finish on a slow connection; the progress line shows that it is still moving. Progress is refreshed only when stderr is a terminal, so piped JSON output is unchanged. -- The shipped Skill now states which resources download on first use, roughly how large they are, and how to prefetch them when the network is slow. +- 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. ## 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.6 Skill requires SQLX 0.1.6. +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. 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.5...v0.1.6 +**Full Changelog**: https://github.com/OtterMind/sqlx/compare/v0.1.6...v0.1.7 diff --git a/java/jdbc/pom.xml b/java/jdbc/pom.xml index 085ce28..f6ed176 100644 --- a/java/jdbc/pom.xml +++ b/java/jdbc/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - ai.ottermind.sqlxsqlx-jdbc0.1.6 + ai.ottermind.sqlxsqlx-jdbc0.1.7 17UTF-8 com.fasterxml.jackson.corejackson-databind2.18.6 diff --git a/packages/npm-installer/package.json b/packages/npm-installer/package.json index a8f1ea0..5464f7c 100644 --- a/packages/npm-installer/package.json +++ b/packages/npm-installer/package.json @@ -1,6 +1,6 @@ { "name": "@ottermind/sqlx", - "version": "0.1.6", + "version": "0.1.7", "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 0abb630..86b4374 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.6.jar target/debug/sqlx-jdbc.jar +cp java/jdbc/target/sqlx-jdbc-0.1.7.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 e70a0fa..3dc36ba 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.6');a=p.parse_args();components={} + p=argparse.ArgumentParser();p.add_argument('directory',type=Path);p.add_argument('--version',default='0.1.7');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 b64a7c3..33566b2 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.6');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.7');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.6 and keeps its 0.1.4 requirement. + # UI plugin is unchanged in 0.1.7 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 34f31b9..5271b60 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.6');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.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() 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 86175c5..41eb7ba 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.6, <0.2.0" + cli-compat: ">=0.1.7, <0.2.0" --- # SQLX diff --git a/skills/sqlx/references/install-cli.md b/skills/sqlx/references/install-cli.md index 5498118..08c6889 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.6, <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.7, <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 2002282..2ec59b6 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.6. 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.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. ## Deliver the page link diff --git a/tests/updates.py b/tests/updates.py index 48e5449..584e0fa 100644 --- a/tests/updates.py +++ b/tests/updates.py @@ -14,8 +14,8 @@ import zipfile ROOT = Path(__file__).resolve().parents[1] -CURRENT = "0.1.6" -NEXT = "0.1.7" +CURRENT = "0.1.7" +NEXT = "0.1.8" SUFFIX = ".exe" if os.name == "nt" else "" NAME = "sqlx" + SUFFIX CLI = ROOT / "target/debug" / NAME