Repository navigation
vsql v1.3.0
Install (Node.js 18+):
npm install -g https://github.com/PayEz-Net/vsql/releases/download/v1.3.0/vsql-1.3.0.tgz
vsql version
Re-synced with the hosted VibeSQL API, plus optional key-signing with a KeelBase secret. The routes were read from the API's source and measured on dev-93.
Changed / BREAKING
- The CLI targets the hosted VibeSQL API's routes. v1.2.0 had drifted from it on four:
query:POST /v1/query(404 on the API) →POST /v1/vsql/query. The hosted query is read-only for tenant data until row-level security lands; writes get the API's own refusal.schema update:PUT(405) with a string schema (400NOT_OBJECT) →POST /v1/schemas/{collection}withjsonSchemaas an object.insert: the document was wrapped as{ clientId, data: "<string>" }(400REQUIRED_FIELDS_MISSING) → the document itself is the body.schema show/rollback --list: readis_active/json_schema, but the API answers camelCase, so every schema looked inactive (NO_ACTIVE_SCHEMAright after a successful create). Both spellings are read now.healthuses the API's public/health.
- A self-hosted VibeSQL Server, Edge or vibesql-micro speaking
POST /v1/queryis no longer a target of this CLI. For local work, use vibesql-micro's ownvsql-micro. --client-idis ignored: the tenant comes from the credential.
Added
- Key-signing (optional, for app runtime calls): set
VIBE_CLIENT_ID(KeelBase client id) andVIBE_HMAC_KEY(KeelBase secret) and calls go through the identity service's proxy,POST {IdP}/api/vibe/proxy, HMAC-signed. Coversquery,health,schema show,rollback --listandinsert. Schema changes are refused with a secret; they usevsql login.- The secret is read from the environment only, and is never logged, written to config or passed in argv.
- Setting only one of the two variables fails loud.
vsql rows <collection> <table>(--page,--page-size) reads a table's rows back throughGET /v1/collections/{c}/tables/{t}, andvsql collectionslists your collections. Hosted SQL cannot see collection tables, so before this there was no way to read back what you wrote. Both are read-only and work with a KeelBase secret. Taken from rigpert's PR #2.VSQL_DEBUG=1prints each request's target to stderr, never a credential.config shownames the KeelBase client id when key-signing is configured, and whether the secret is set.- Tests (
npm test):- the signature is checked against vectors computed by the identity service's own verifier;
- one test per route pins the recorded contract;
- key-signing is checked for its proxy request shape, for keeping the secret off the wire and out of debug output, and for refusing DDL.
Fixed
- An unknown command (or
schema/configsubcommand) printed help and exited 0, so a typo looked like it ran. It now exits non-zero withUNKNOWN_COMMAND. - An unknown option was taken silently, with the next word as its value, so
rows --limit 3looked like it worked. It now fails withUNKNOWN_FLAG. config showin key-signing mode said "No config found. Runvsql login" under a working key-signing line. It now says a sign-in profile is not needed for key-signing.- An empty or non-JSON reply printed a raw
SyntaxErrorstack trace; it now reports the HTTP status and the start of the body.
Docs
- README: install is one line:
npm install -gof the release tarball (vsql-1.3.0.tgz, attached to the GitHub release). It is not on the npm registry. - README: it says plainly that the device approval screen does not exist yet, and how a code is approved today.