postgresai 0.17.0-dev.3 → 0.17.0-dev.5

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.
package/README.md CHANGED
@@ -186,14 +186,16 @@ pgai connect 'postgresql://postgres:<password>@<host>:5432/postgres'
186
186
  ```
187
187
 
188
188
  It signs you in if needed, creates the `postgres_ai_mon` role (with an admin URL; otherwise it
189
- prints the SQL), provisions monitoring in PostgresAI Cloud, waits, and prints the dashboard URL.
190
- Safe to re-run. For ClickHouse Managed Postgres add `--clickhouse-key <key-id>:<key-secret>`
189
+ prints the SQL), provisions monitoring in PostgresAI Cloud, runs the express checkup (the checks
190
+ of `pgai checkup`, as `postgres_ai_mon`) while the box starts and prints its findings (in JSON:
191
+ `checkup`), waits, and prints the dashboard URL. Safe to re-run; a `--clickhouse-key` given on a
192
+ re-run is checked, and a rejected one is `action_required`. For ClickHouse Managed Postgres add `--clickhouse-key <key-id>:<key-secret>`
191
193
  (a Basic Service API Reader key) for CPU, memory and disk. `--self-hosted` runs the stack on this
192
194
  machine instead. When stdout is not a terminal the result is JSON with `status`, `dashboard_url`
193
195
  and `next`. Then: `pgai databases`, `pgai status <name>`, `pgai disconnect <name>`.
194
196
 
195
197
  `pgai init` is the same for a person at a terminal: it signs in, asks for the database URL (and,
196
- for ClickHouse, the API key, which is not shown as typed), then runs `pgai connect`. Without a
198
+ for ClickHouse, the API key; neither is shown as typed), then runs `pgai connect`. Without a
197
199
  terminal, or with `--json`, it only points to `pgai connect`.
198
200
 
199
201
  | Option | |
@@ -201,6 +203,7 @@ terminal, or with `--json`, it only points to `pgai connect`.
201
203
  | `--provider <provider>` | `clickhouse`, `rds`, `supabase` or `self-managed`; default: detected from the host |
202
204
  | `--clickhouse-key <key-id>:<key-secret>` | ClickHouse Cloud API key, for CPU, memory and disk |
203
205
  | `--self-hosted` | run the stack on this machine (`mon local-install`) instead of PostgresAI Cloud |
206
+ | `--reset-password` | `postgres_ai_mon` exists and its password is lost: set a new one (see below) |
204
207
  | `--wait <minutes>` | how long to wait for the monitoring box; `0` does not wait (default 20) |
205
208
  | `-y, --yes` | never prompt (`connect` does not start the browser sign-in; `disconnect` does not ask) |
206
209
  | `--json` | JSON output, also on a terminal |
@@ -214,10 +217,12 @@ terminal, or with `--json`, it only points to `pgai connect`.
214
217
  | `CLICKHOUSE_KEY_ID` + `CLICKHOUSE_KEY_SECRET` | instead of `--clickhouse-key`; read for ClickHouse hosts only |
215
218
 
216
219
  `postgres_ai_mon` is one role for the whole server, so `connect` never changes the password of an
217
- existing one. If the role exists and you do not have its password, change it explicitly and
218
- update every monitoring box that uses it:
219
- `pgai prepare-db <admin-url> --reset-password --password <new-password>`, then
220
- `PGAI_MON_PASSWORD=<new-password> pgai connect <admin-url>`.
220
+ existing one. If the role exists and you do not have its password (a reconnect after
221
+ `pgai disconnect`, say), `pgai connect <admin-url> --reset-password` sets a new one
222
+ (`PGAI_MON_PASSWORD`, else generated). It is refused while another database on the same server (the same host name, in this
223
+ organization) is monitored with the role, with `--self-hosted`, and for a database already
224
+ connected. Anything else that logs in as `postgres_ai_mon` (another organization, another host
225
+ name for the same server, a connect running at the same time) needs the new password.
221
226
 
222
227
  When the role exists (an admin URL with `PGAI_MON_PASSWORD`, or the role's own URL), `connect`
223
228
  also logs in once as `postgres_ai_mon` with a random password, to learn whether the server checks
@@ -247,6 +252,8 @@ timeout, the role stays: a monitoring box may be starting with it.)
247
252
  An admin URL without a database connects to `PGDATABASE`, or else to the database named like the
248
253
  user; the name of the connected database (`<host>[:<port>]/<database>`) uses that database.
249
254
 
255
+ `pgai connect`, `pgai status` and `pgai databases` use the same words:
256
+
250
257
  | `status` | Meaning | Exit code |
251
258
  |---|---|---|
252
259
  | `connected` | monitoring works; `dashboard_url` is set | 0 |
@@ -703,8 +710,8 @@ PGPASSWORD=... postgresai checkup \
703
710
 
704
711
  ```json
705
712
  {
706
- "H002": { "contract_version": "1.0.0", "checkId": "H002", "...": "..." },
707
- "F003": { "contract_version": "1.0.0", "checkId": "F003", "...": "..." }
713
+ "H002": { "contract_version": "1.1.0", "checkId": "H002", "...": "..." },
714
+ "F003": { "contract_version": "1.1.0", "checkId": "F003", "...": "..." }
708
715
  }
709
716
  ```
710
717
 
@@ -815,7 +822,7 @@ A consumer should accept any report whose `contract_version` shares its **major*
815
822
  and has a **minor ≥** the minimum it was built against. Pin the major, tolerate
816
823
  additive minors, and treat a major bump as a required review.
817
824
 
818
- The current contract version is **`1.0.0`**.
825
+ The current contract version is **`1.1.0`** (1.1.0: a node result without data carries `available` and `reason`).
819
826
 
820
827
  ### Envelope fields
821
828