vortex-cli 6.4.0__tar.gz → 7.0.0__tar.gz

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 (63) hide show
  1. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/PKG-INFO +140 -153
  2. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/README.md +139 -152
  3. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/pyproject.toml +1 -1
  4. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/cli.py +20 -259
  5. vortex_cli-7.0.0/vortex/commands/clean.py +122 -0
  6. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/commands/clone.py +131 -146
  7. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/commands/config.py +31 -38
  8. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/commands/db.py +76 -55
  9. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/commands/delete.py +20 -49
  10. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/commands/execute.py +14 -22
  11. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/commands/export.py +22 -4
  12. vortex_cli-7.0.0/vortex/commands/import_.py +78 -0
  13. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/commands/keyword.py +72 -71
  14. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/commands/list.py +42 -35
  15. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/commands/log.py +15 -13
  16. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/commands/new.py +10 -23
  17. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/commands/schema.py +11 -13
  18. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/commands/watch.py +25 -48
  19. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/libs.py +14 -101
  20. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/main.py +9 -65
  21. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/models.py +24 -65
  22. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/util.py +7 -8
  23. vortex_cli-7.0.0/vortex/webdesign.py +1170 -0
  24. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/workspace.py +13 -13
  25. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex_cli.egg-info/PKG-INFO +140 -153
  26. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex_cli.egg-info/SOURCES.txt +0 -8
  27. vortex_cli-6.4.0/vortex/commands/agenda.py +0 -163
  28. vortex_cli-6.4.0/vortex/commands/clean.py +0 -214
  29. vortex_cli-6.4.0/vortex/commands/compile.py +0 -288
  30. vortex_cli-6.4.0/vortex/commands/import_.py +0 -29
  31. vortex_cli-6.4.0/vortex/commands/pull.py +0 -398
  32. vortex_cli-6.4.0/vortex/commands/push.py +0 -303
  33. vortex_cli-6.4.0/vortex/commands/render.py +0 -77
  34. vortex_cli-6.4.0/vortex/commands/status.py +0 -86
  35. vortex_cli-6.4.0/vortex/commands/undo.py +0 -144
  36. vortex_cli-6.4.0/vortex/gateway.py +0 -879
  37. vortex_cli-6.4.0/vortex/webdesign.py +0 -653
  38. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/LICENSE +0 -0
  39. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/setup.cfg +0 -0
  40. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/__init__.py +0 -0
  41. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/__main__.py +0 -0
  42. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/colour.py +0 -0
  43. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/commands/__init__.py +0 -0
  44. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/commands/code.py +0 -0
  45. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/commands/copy.py +0 -0
  46. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/commands/docs.py +0 -0
  47. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/commands/find.py +0 -0
  48. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/commands/grep.py +0 -0
  49. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/commands/libs.py +0 -0
  50. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/commands/use.py +0 -0
  51. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/constants.py +0 -0
  52. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/docs/Blackbook v2.md +0 -0
  53. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/docs/Blackbook.pdf +0 -0
  54. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/docs/index.html +0 -0
  55. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/docs/marked.min.js +0 -0
  56. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/lib/puakma-6.0.40.jar +0 -0
  57. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/logging.py +0 -0
  58. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/soap.py +0 -0
  59. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex/spinner.py +0 -0
  60. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex_cli.egg-info/dependency_links.txt +0 -0
  61. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex_cli.egg-info/entry_points.txt +0 -0
  62. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex_cli.egg-info/requires.txt +0 -0
  63. {vortex_cli-6.4.0 → vortex_cli-7.0.0}/vortex_cli.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vortex_cli
3
- Version: 6.4.0
3
+ Version: 7.0.0
4
4
  Summary: Vortex CLI
5
5
  Author-email: Jordan Amos <jordan.amos@gmail.com>
6
6
  License: MIT License
@@ -99,8 +99,8 @@ While it is possible to use without it, this software has been purposefully desi
99
99
  password = mypassword ; Optional - Prompted at runtime if not provided
100
100
  ; Optional
101
101
  puakma_db_conn_id = 13 ; Optional - discovered from the server when omitted
102
- backend = soap ; 'soap' (default) or 'gateway' - see The Agent Gateway below
103
- gateway_path = vortex/gateway.pma ; only used when backend = gateway
102
+ backend = soap ; 'soap' (default) or 'gateway' - see The Gateway Backend below
103
+ gateway_path = vortex/gateway.pma ; only used when backend = gateway - blank (or not installed on the server) = webdesign directly
104
104
  clone_with_resources = html,css,js ; resources with these extensions are always cloned - 'clone --get-resources' still clones ALL resources
105
105
  lib_path = ; optional extra jars to add to the classpath (the server's own jars are downloaded automatically - see 'vortex libs')
106
106
  workspace_folders = ~/dev/shared,notes ; extra folders to mount in the generated .code-workspace files. Relative paths resolve against the workspace root. Under [DEFAULT] they are added to every workspace; here they apply to this server's workspace (and the global one)
@@ -108,33 +108,47 @@ While it is possible to use without it, this software has been purposefully desi
108
108
  java_environment_name = JavaSE-17 ; Java Execution Environment name https://docs.osgi.org/reference/eenames.html
109
109
  ```
110
110
 
111
- ## Upgrading to 6.3
112
-
113
- - **`vortex push` only uploads what changed.** On a `backend = gateway` server the push first
114
- reads the server's element hashes and skips every file that already matches - a full-app push
115
- that used to re-send (and journal) hundreds of identical files now sends the few that differ.
116
- `--all` restores the old push-everything behaviour; `backend = soap` still pushes everything.
117
- - **Uploads run concurrently** - up to `--jobs N` elements at once (default 8; `-j 1` is the
118
- old one-at-a-time push). A Java element's source and class still go in that order, and a
119
- failed source stops that element's class from being uploaded over it.
120
- - **`push --name` prefers an exact match.** Previously `--name dashboard` also pushed a
121
- `Dashboard` element; now the case-insensitive match only applies when nothing matches exactly.
111
+ ## Upgrading to 7.0
112
+
113
+ 7.0 replaces the gateway backend with a pass-through to webdesign and removes commands.
114
+
115
+ `backend = gateway` still means the **`vortex/gateway`** Puakma application at `gateway_path`
116
+ (default `vortex/gateway.pma`), but that application has been replaced: it is now a
117
+ permission wrapper around `system/webdesign`'s `vortex` JSON API, reached at
118
+ `{gateway_path}/api/...`. The old gateway's own endpoints (the undo journal, element hashes,
119
+ windowed downloads, status, agenda, render) are gone. `backend = soap` is unchanged.
120
+
121
+ - **The gateway is optional.** On a server where nothing answers at `gateway_path` (or it is
122
+ blank), `backend = gateway` talks to `system/webdesign`'s `vortex` API directly. A server
123
+ still running the OLD gateway has no `api` action there, so it is treated the same way -
124
+ install the new gateway to get its role checks back.
125
+ - **Removed commands:** `push`, `pull`, `undo`, `status`, `agenda` (and
126
+ `config --show-server`), `render`, and `compile` with its `build` alias. The gateway keeps no
127
+ server-side journal and no element hashes, so there is no undo and no incremental pull (a
128
+ fresh `vortex clone` replaces it). On a gateway server **`vortex watch` is the deploy
129
+ path**; the `.class` files it uploads come from the IDE's build into `zbin/`.
130
+ - **`vortex import` works on `backend = gateway`** (the gateway's `import` route): it always
131
+ creates a new application, and its scheduled actions start disabled.
132
+ - **`vortex list`** keeps the Version column but loses Last Modified, and on a gateway
133
+ server it cannot hide inactive applications (the inventory has no `DisableApp` flag).
134
+ - **`vortex db --sql`** runs through the application that owns the connection, so that
135
+ application must be cloned. There is no server dry run for `--update`.
136
+ - **Roles** are `Admin`, `GatewayDesignRead`, `GatewayDesignWrite`, `GatewayDBRead`,
137
+ `GatewayDBWrite` and `GatewaySystem` (`GatewayLogRead` is gone - the log needs
138
+ `GatewaySystem`). `vortex config --check-gateway` shows which ones you hold.
122
139
 
123
140
  ## Upgrading to 6.0
124
141
 
125
142
  6.0 is additive - **the default behaviour is unchanged**. Every server keeps using the SOAP
126
143
  designer path unless you opt it in.
127
144
 
128
- - **New optional backend: the agent gateway.** Set `backend = gateway` on a server definition
129
- to route supported operations through the `vortex/gateway` Puakma application instead of
130
- SOAPDesigner. The default is `backend = soap`, which never contacts the gateway at all - so
131
- servers without it installed are unaffected. See [The Agent Gateway](#the-agent-gateway).
132
- - **New commands**: `status`, `agenda`, `push`, `pull`, `render` and `undo`. `agenda`, `pull`,
133
- `render` and `undo` require `backend = gateway`; `status` and `push` fall back to the
134
- existing paths.
135
- - **`puakma_db_conn_id` is now optional.** When omitted it is discovered from the server on
136
- both backends. Existing configs that set it explicitly keep working.
137
- - **`vortex list` gains Version and Last Modified columns** when run against a gateway server.
145
+ - **New optional backend: the gateway.** Set `backend = gateway` on a server definition to
146
+ route operations through a gateway Puakma application instead of SOAPDesigner. The default
147
+ is `backend = soap`, which never contacts the gateway at all - so servers without it
148
+ installed are unaffected. See [The Gateway Backend](#the-gateway-backend).
149
+ - **`puakma_db_conn_id` is now optional.** When omitted it is discovered from the server
150
+ (over SOAP - nothing on the gateway backend needs it). Existing configs that set it
151
+ explicitly keep working.
138
152
 
139
153
  ## Upgrading to 5.0
140
154
 
@@ -147,9 +161,6 @@ designer path unless you opt it in.
147
161
  - **`vortex watch` now watches every cloned app across all servers** and uploads each change to
148
162
  the server it was cloned from. Use `--server` for the old single-server behaviour, and mark
149
163
  production definitions `protected = true` so they are never watched by accident.
150
- - **`vortex compile` now uses the Eclipse compiler (ecj)** - the same compiler the VS Code Java
151
- extension uses - downloaded once per workspace. `--javac PATH` forces javac. `compile
152
- --upload` is now a full refresh (uploads every compiled class, not just changed ones).
153
164
  - `find`, `grep` and `vortex list --local` now search all cloned apps unless `--server` is
154
165
  given, and ID-taking commands infer their server from local clones (see below).
155
166
 
@@ -166,19 +177,9 @@ For a full list of commands see `--help`.
166
177
  - `watch`: Watch the workspace for changes to Design Objects and automatically upload them to the server each app was cloned from. Watches all servers at once unless `--server` is given.
167
178
  - `clean`: Delete the locally cloned Puakma Application directories in the workspace.
168
179
  Takes optional `APP_ID`s to clean just those clones (all of the server's, if none are
169
- given). Deletes immediately and needs no network - there is no undo. With `--check`
170
- it first asks the server for its design element hashes and refuses to delete a clone
171
- holding local changes the server doesn't have, naming each file; that needs a
172
- reachable `backend=gateway` server, and a clone it can't verify is refused rather
173
- than silently deleted.
174
- - `config`: View and manage configuration. `--check-gateway` reports the agent gateway negotiation and which gateway roles your identity holds.
180
+ given). Deletes immediately and needs no network - there is no undo.
181
+ - `config`: View and manage configuration. `--check-gateway` shows the server's backend and, for `backend = gateway`, who the gateway thinks you are and which gateway roles you hold.
175
182
  - `log`: View the server log.
176
- - `status`: Show the server status - via the agent gateway when available, otherwise the raw console `status` output.
177
- - `agenda`: List every scheduled action with its decoded schedule, last and next run, and whether it is overdue (read-only, gateway only).
178
- - `push`: Upload local design files (source, compiled classes, pages, resources) to the server without a watch session - journaled and deploy-confirmed when routed via the gateway. On a gateway server only files whose content differs from the server's are uploaded (compared by the server's element hashes; `--all` pushes everything), and elements upload concurrently (`--jobs N`, default 8) while each Java element's source always lands before its class. `--name` matches exactly first, case-insensitively only when nothing matches exactly.
179
- - `pull`: Refresh cloned applications in place via the gateway's incremental sync - only elements changed since the last sync are downloaded. Refuses to overwrite locally modified files without `--force`.
180
- - `render`: Render a PAGE server-side as your identity and print it (or `--out FILE`) - see a change without a browser login (gateway only).
181
- - `undo`: The server-side undo journal. No arguments lists journal entries; with an entry id it dry-runs a restore, and `--confirm` writes the journaled version back (gateway only).
182
183
  - `find`: Find Design Objects of cloned applications by name.
183
184
  - `grep`: Search the contents of cloned Design Objects using a Regular Expression.
184
185
  - `new`: Create new Design Objects, Applications, or Keywords. Use `--update <ID>` to update instead. Run without flags to launch an interactive wizard.
@@ -187,16 +188,16 @@ For a full list of commands see `--help`.
187
188
  - `delete`: Delete Design Objects by ID.
188
189
  - `db`: Interact with Database Connections. Accepts `--server`/`-s` like other commands for one-off queries against another server.
189
190
  - `schema`: Manage the Puakma data dictionary (PMATABLE/ATTRIBUTE): record table/column definitions and print the DDL to run by hand. Never executes DDL.
190
- - `compile` (or `build`): Compile an application's Java Design Objects into `zbin/` using the Eclipse compiler (ecj).
191
191
  - `libs`: Show or refresh the per-server Java library cache (each server's `puakma.jar` and shared libraries, downloaded from the server itself).
192
192
  - `docs`: Open the Tornado Server Blackbook.
193
- - `execute`: Execute a command on the server.
193
+ - `execute`: Execute a command on the server (e.g. `vortex execute status`).
194
+ - `export` / `import`: Export applications as `.pmx` files, and create an application from one.
194
195
 
195
196
  ### Keyword values and secrets
196
197
 
197
198
  Keywords are an application's live configuration, and in practice they hold credentials in
198
199
  cleartext - API keys, passwords, vendor secrets, signing keys. `vortex keyword` therefore
199
- **redacts by default**, following the same precedent as `vortex config --show-server`:
200
+ **redacts by default**:
200
201
 
201
202
  ```
202
203
  vortex keyword 9 # list every Keyword (secrets redacted)
@@ -222,8 +223,9 @@ vortex keyword 9 --reveal # print secret values in full
222
223
 
223
224
  An update always prints the prior value beside the new one and waits for `[Y/y]` on stdin
224
225
  before writing; on a `protected = true` server the server name must also be typed back
225
- (`--yes` does not bypass that). The write uses the gateway's keyword upsert, so it never
226
- inserts a duplicate KEYWORD row.
226
+ (`--yes` does not bypass that). The write is an upsert done by vortex: it never inserts a
227
+ duplicate KEYWORD row, and it folds any existing duplicates of the name into the oldest one.
228
+ `keyword` needs `backend = gateway`.
227
229
 
228
230
  Reading does **not** require the application to be cloned locally - diagnosing a bad
229
231
  configuration value should not depend on having a working copy.
@@ -268,7 +270,7 @@ apps from several servers at the same time:
268
270
  server it was cloned from. One terminal, all servers. Log lines are prefixed
269
271
  with the server name (e.g. `[dev] Upload DATA of ...`). Use `--server` to
270
272
  watch a single server only.
271
- - Commands that take IDs (`clone`, `export`, `compile`, `delete`, `copy`) work
273
+ - Commands that take IDs (`clone`, `export`, `delete`, `copy`) work
272
274
  out the server on their own: IDs can be qualified as `SERVER:ID`
273
275
  (e.g. `vortex export dev:123`), and unqualified IDs are resolved against your
274
276
  locally cloned apps. If an ID exists on more than one server, vortex stops
@@ -279,11 +281,8 @@ apps from several servers at the same time:
279
281
  a time, and cloning or cleaning is refused while a watch is running (stop
280
282
  the watch first - a clone under a running watch adds directories the
281
283
  watcher doesn't know about). Finer-grained commands that alter design
282
- elements (`delete`, `copy`, `new`, `compile --upload`) lock
283
- per-application: they are refused for apps a watch is watching and run
284
- concurrently otherwise. `push` and `pull` lock the same way - per
285
- application, never workspace-wide - so they can run against one app while
286
- a watch holds others.
284
+ elements (`delete`, `copy`, `new`) lock per-application: they are refused
285
+ for apps a watch is watching and run concurrently otherwise.
287
286
  - In VS Code, app folders are listed in per-server blocks (`dev: group/app`,
288
287
  ...) with the server's jars on the Java classpath (see them in the Java
289
288
  Projects view). vscode-java's classpath settings are
@@ -321,29 +320,31 @@ Set `protected = true` on a server definition (e.g. production) to make it
321
320
  hard to change by accident:
322
321
 
323
322
  - Write operations (`delete`, `copy`, `new`, `import`, `db --update`,
324
- `execute`, `schema` changes, `compile --upload`) require the server name to
323
+ `execute`, `keyword --values`, `schema` changes) require the server name to
325
324
  be typed back to continue. This is deliberately **not** bypassed by `--yes`.
326
325
  - `vortex watch` skips protected servers unless `--include-protected` is
327
326
  given, so saving a file can never hot-deploy to production by accident.
328
327
 
329
- ### The Agent Gateway
330
-
331
- The **agent gateway** is a JSON API served by the Puakma server itself - a companion Puakma
332
- application (`vortex/gateway`) that you deploy to a server. Where SOAPDesigner is a transport,
333
- the gateway is a transport *plus* the guarantees only server-side code can enforce:
334
-
335
- - **Role-gated operations** - every endpoint requires one declared application role, checked on
336
- the server. Roles are rows in *that server's* copy of the app, so a grant on dev confers
337
- nothing on prod.
338
- - **An undo journal** - destructive design writes snapshot the element first (bytes, metadata,
339
- design params). `vortex undo` lists those snapshots and restores any of them; deleted
340
- elements are recreatable.
341
- - **Dry-run by default** - `undo`, element deletes, single-statement DML and whole-server
342
- refresh do nothing without an explicit confirmation.
343
- - **Deploy confirmation** - writes reply with the sizes and hashes of what is really on the
344
- server now.
345
- - **Database guardrails** - the Puakma system database is unreachable through it, and DDL is
346
- never executed, only generated as text.
328
+ ### The Gateway Backend
329
+
330
+ `backend = gateway` sends every request through **the gateway** - a small Puakma application
331
+ (`vortex/gateway`) that you deploy to a server - or, where it is not installed, straight to
332
+ `system/webdesign` (see below). The gateway is `system/webdesign`'s `vortex`
333
+ JSON API at a different address: a request to `https://<host>/vortex/gateway.pma/api/<path>`
334
+ is webdesign's `/system/webdesign.pma/vortex/<path>` - same path, method, body and reply -
335
+ with three things added in front of it:
336
+
337
+ - **Role checks.** Every route needs one role, checked on the server: `GatewayDesignRead`
338
+ (inventory, clone, keywords, libraries), `GatewayDesignWrite` (design, keyword and
339
+ dictionary writes), `GatewayDBRead` (`SELECT`, connections), `GatewayDBWrite` (`INSERT`,
340
+ `UPDATE`, `DELETE`), `GatewaySystem` (log, console, export, import) and `Admin` (everything,
341
+ including creating applications). Write implies read. Roles are rows in *that server's*
342
+ copy of the app, so a grant on dev confers nothing on prod. A route the gateway does not map
343
+ is refused.
344
+ - **Guards.** The gateway never addresses the Puakma system database, never lets an id from
345
+ one application be used under another, and runs exactly one `SELECT`/`INSERT`/`UPDATE`/`DELETE` per SQL request (DDL, `WITH`, and any
346
+ `;` are refused).
347
+ - **Its own routes** for the server log, console, `.pmx` export/import and `whoami`.
347
348
 
348
349
  Opt in per server:
349
350
 
@@ -354,67 +355,70 @@ backend = gateway ; default is 'soap', which never contacts the gatew
354
355
  ; gateway_path = vortex/gateway.pma (this is the default)
355
356
  ```
356
357
 
357
- With `backend = gateway`, `watch`/`push` uploads, `delete`, `log`, `status`, `db`, `execute`
358
- and the journal commands route through it, and `agenda`, `pull`, `render` and `undo` become
359
- available. Everything the gateway does not offer goes to the **webdesign vortex API** (the
360
- JSON action served by `system/webdesign`) - see [SOAP-free on backend = gateway](#soap-free-on-backend--gateway).
361
- A `backend = gateway` server never talks to SOAPDesigner at all. Check what you are talking
362
- to and what you may do:
358
+ A `backend = gateway` server never talks to SOAPDesigner. Check what you are talking to and
359
+ what you may do:
363
360
 
364
361
  ```
365
362
  vortex config --check-gateway -s dev
366
363
  ```
367
364
 
368
- **There is no fallback in either direction, by design.** A gateway refusal (for example, your
369
- identity lacks the required role) is reported as an error - vortex never quietly retries the
370
- same operation over SOAP, because that would let anyone with SOAP access bypass every role,
371
- journal and guardrail above. Likewise `backend = soap` never contacts the gateway. The one
372
- deliberate exception is the gateway application's *own* deployments, which never go through
373
- the gateway (webdesign on `backend = gateway`, SOAP on `backend = soap`) so that a broken
374
- gateway deploy never needs the gateway to fix itself.
365
+ **The gateway is optional; it is a pass-through with role checks.** The first command that
366
+ needs it asks the gateway's `whoami`, once per run:
367
+
368
+ - **The gateway answers:** every request goes through it.
369
+ - **Nothing is installed at `gateway_path`** (a plain HTTP 404), or `gateway_path` is blank:
370
+ every request goes straight to `system/webdesign`'s `vortex` API instead. That grants
371
+ nothing extra - webdesign's own access control still applies. The commands that exist
372
+ only in the gateway (`log`, `execute`, `import`) fail with a message saying they need it;
373
+ `export` uses webdesign's `ExportPMX` directly.
374
+ - **The gateway is installed but says no or is down** (a refusal, a login page, a 5xx, a
375
+ timeout): that is an error, never a detour around it. A refusal names the code and, for a
376
+ missing role, the role.
377
+
378
+ There is never a fallback to SOAP, and `backend = soap` never contacts the gateway. Platform
379
+ applications (`system/*`, `vortex/*` - the gateway itself included - and `puakma`) are not
380
+ special-cased: `GatewayDesignWrite` writes them like any other application, which is how the
381
+ gateway is redeployed through itself.
375
382
 
376
- The gateway application is **not bundled with this CLI** - deploy it to a server with
377
- `vortex export` / `vortex import`, then run its `Setup` scheduled action. It ships its own
378
- `API.md`, `README.md` and `DECISIONS.md` as DOCUMENTATION design elements, so once installed
379
- the running server documents its own endpoints, roles and setup steps.
383
+ There is **no undo**: the gateway keeps no journal of what a write replaced. Deletes and uploads
384
+ are final.
385
+
386
+ The gateway is **not bundled with this CLI** - deploy it to a server with `vortex export` /
387
+ `vortex import` and grant its roles in webdesign's security UI. Its DOCUMENTATION element
388
+ describes every route, role and refusal code.
380
389
 
381
390
  > **Note:** the gateway's roles are only a real boundary for an identity whose *sole* route to
382
391
  > the server is the gateway. Any identity that can reach `system/webdesign` or deploy code can
383
392
  > grant itself any role. Keep webdesign access for operators; agent identities should not have
384
393
  > it.
385
394
 
386
- ### SOAP-free on `backend = gateway`
387
-
388
- SOAPDesigner is legacy. On a `backend = gateway` server the commands the gateway does not
389
- cover use the JSON API of `system/webdesign`'s `vortex` action instead - with the same
390
- credentials, and the webdesign app's own ACL. SOAP is used only when a server is explicitly
391
- `backend = soap`. The data dictionary (`schema`, `db --list/--schema`) is the exception that
392
- proves the rule: the gateway's `dictionary` endpoint runs that same webdesign `vortex` action
393
- server-side behind `GatewayDBRead`/`GatewayDBWrite`, so an agent identity with no webdesign
394
- access gets a clean role answer rather than a login page, and a change to `vortex.java`
395
- needs no change to the gateway.
396
-
397
- | Command | `backend = gateway` | `backend = soap` |
395
+ | Command | `backend = gateway` (through the gateway, or webdesign directly without it) | `backend = soap` |
398
396
  |---|---|---|
399
- | `push`, `watch` (modify), `compile --upload` | gateway `upload` (journalled); the gateway app itself: webdesign `PUT design` | SOAP `uploadDesign` |
400
- | `watch` (create / delete) | webdesign `POST` / `DELETE design` | SOAP |
401
- | `delete` | gateway `delete` (journalled); the gateway app itself: webdesign | SOAP |
402
- | `copy`, `new object` | webdesign `POST`/`PUT design`, `PUT design/params` | SOAP |
403
- | `new app` | webdesign `POST vortex` | SOAP `saveApplication` |
404
- | `new keyword` | gateway `keyword` (upsert) | SOAP `saveKeyword` |
405
- | `keyword` (read) | gateway `download` (metadata window; `GatewayDesignRead`) | **unsupported** - SOAP has no keyword read call |
406
- | `keyword --values` (write) | gateway `keyword` (upsert) | **unsupported** |
407
- | `schema`, `db --list`, `db --schema` | gateway `dictionary` (webdesign's `database`/`table`/`column` routes run server-side; `GatewayDBRead`/`GatewayDBWrite`) | SOAP SQL + `savePuakma*` |
408
- | `export` | webdesign `ExportPMX` action | SOAP `downloadPmx` |
409
- | `import` | **still SOAP** - webdesign has no import route yet | SOAP `uploadPmx` |
410
- | `db --sql`, `list`, `log`, `execute`, `status`, `clone`, `pull` | gateway | SOAP |
411
-
412
- Where the webdesign API behaves differently from SOAP, the CLI compensates so the commands
397
+ | `clone` | `GET {app}` - the whole application in one request | SOAP |
398
+ | `list` | `GET` inventory | SOAP SQL |
399
+ | `watch` (modify) | `GET` + `PUT {app}/design/{id}` | SOAP `uploadDesign` |
400
+ | `watch` (create / delete), `copy`, `new object` | `POST`/`PUT`/`DELETE {app}/design`, `PUT design/params` | SOAP |
401
+ | `delete` | `DELETE {app}/design/{id}` | SOAP |
402
+ | `new app` | `POST` (Admin) | SOAP `saveApplication` |
403
+ | `keyword`, `new keyword` | `{app}/keywords` routes; the upsert is done by vortex | read **unsupported** - SOAP has no keyword read call; `new keyword` SOAP `saveKeyword` |
404
+ | `schema`, `db --list`, `db --schema` | `{app}/database/{conn}/table[/column]` routes | SOAP SQL + `savePuakma*` |
405
+ | `db --sql` | `POST {app}/database/{conn}/sql` (the owning app must be cloned) | SOAP |
406
+ | `log` | `GET logs` (needs the gateway) | SOAP SQL |
407
+ | `execute` | `POST console` (needs the gateway) | SOAP |
408
+ | `export` | `GET export` (webdesign `ExportPMX` without the gateway) | SOAP `downloadPmx` |
409
+ | `import` | `POST import` (needs the gateway; always a new app; scheduled actions start disabled) | SOAP `uploadPmx` |
410
+ | `libs` | `GET libraries`, `GET systemjar` | webdesign's `vortex` API directly |
411
+
412
+ Where webdesign's API behaves differently from SOAP, the CLI compensates so the commands
413
413
  behave as they did. The differences that remain visible:
414
414
 
415
415
  - **Design element writes are whole-row.** The CLI reads the row back first and re-sends what
416
416
  it does not model (the other blob, `Options`), so a `DATA`-only upload never wipes source.
417
417
  One consequence: every write is one extra `GET`.
418
+ - **A clone transfers every resource.** `GET {app}` has no filter, so `clone_with_resources`
419
+ and `--get-resources` only decide what is written to disk and kept in the manifest.
420
+ - **A clone has no Java class version**, so `watch` does not check a `.class` file's version
421
+ against the server's on a gateway server.
418
422
  - **Renaming with `new object --update --name` does not rewrite references.** SOAP's
419
423
  `updateDesignObject` also updated design params in the app that referred to the old name;
420
424
  the webdesign route does not. Fix `OpenAction`/`ParentPage`-style params by hand after a rename.
@@ -423,16 +427,16 @@ behave as they did. The differences that remain visible:
423
427
  `savePuakmaAttribute2` had them). `--default`/`--position` are refused with a message;
424
428
  `--ref TABLE.COLUMN` records the table and warns. Updates leave existing values untouched.
425
429
  Extend `POST`/`PUT .../column` in webdesign's `vortex.java` to lift this.
430
+ - **`db --sql` runs one statement and has no dry run.** Only a `SELECT` runs without
431
+ `--update`; row columns may come back in any order.
432
+ - **`list` shows inactive applications** (the inventory has no `DisableApp` flag), and a group
433
+ clone skips only inherited applications.
426
434
  - **Every write flushes the application's design cache**, where SOAP flushed one element.
427
- - **No per-application `Developer` role check** - the webdesign app's ACL is the boundary. An
428
- identity that can reach `system/webdesign` can edit every application through it.
429
435
  - **`db --list` orders by table name** (SOAP's `SELECT DISTINCT` had no order); `--schema`
430
436
  output is identical.
431
437
  - **Database-name resolution is app-scoped.** `schema`/`db --list` find the connection whose
432
438
  dictionary holds the tables (as SOAP did by `pmatable` count), asking locally cloned
433
439
  applications first and scanning the server inventory only if none of them has it.
434
- - **`import` remains SOAP** on every backend until webdesign gains a PMX import route
435
- (`SaveImportPMX` is a multipart UI form, not an API).
436
440
 
437
441
  ### Interactive Wizards
438
442
 
@@ -466,49 +470,32 @@ vortex -y new object --name MyAction --app-id 10 --type action
466
470
  Note: `--yes` never bypasses the typed confirmation for servers marked
467
471
  `protected = true`.
468
472
 
469
- ### Compiling Java Design Objects
470
-
471
- `vortex compile` (alias `build`) compiles an application's Java Design Objects into `zbin/`
472
- with the **Eclipse compiler (ecj)** - the same compiler the VS Code Java extension uses,
473
- downloaded once per workspace into `config/.tools/`. It runs via the `java` from `java_home`
474
- in the server config, then `$JAVA_HOME`, then `PATH`; `--release` is derived from the
475
- application's Java class version. ecj matters because Tornado loads each class from its own
476
- design element: `'$'` **classes (`Foo$1.class`) are never uploaded to the server**, and unlike
477
- javac, ecj compiles a `switch` over an enum into the class itself rather than a synthetic
478
- `Foo$1.class`. Classes that still produce `$` files (genuine anonymous/inner classes) are
479
- reported and **excluded from upload** - they would throw `NoClassDefFoundError` on the server.
480
- If ecj can't be downloaded (offline), javac is used with a warning; `--javac PATH` forces
481
- javac explicitly.
482
-
483
- ```
484
- vortex compile # compile all locally cloned apps for the server
485
- vortex compile 13 # compile one app
486
- vortex compile 13 --upload # also upload ALL compiled classes (full server refresh)
487
- ```
473
+ ### Java Design Objects and `zbin/`
488
474
 
489
- While `vortex watch` is running, `--upload` isn't needed: saving a Java source uploads the
490
- SOURCE, and the VS Code Java extension's incremental build (which **is** the Eclipse
491
- compiler, ecj - the same compiler `vortex compile` downloads) writes the class files into
492
- `zbin/`, where watch picks them up and uploads the DATA - always, even when the bytes are
493
- unchanged, so a source change is always paired with its class on the server. `'$'`
494
- nested-class files are never uploaded - a class compiled alongside `$` siblings is refused
495
- with an error since it would fail on the server.
496
- Use `vortex compile` for full-application rebuilds without the IDE.
475
+ The server runs compiled classes, not source. While `vortex watch` is running, saving a Java
476
+ source uploads the SOURCE, and the VS Code Java extension's incremental build (the Eclipse
477
+ compiler) writes the class files into `zbin/`, where watch picks them up and uploads the
478
+ DATA. It always does, even when the bytes are unchanged, so a source change is always paired
479
+ with its class on the server. `'$'` nested-class files (`Foo$1.class`) are never uploaded - Tornado
480
+ loads each class from its own design element - and a class compiled alongside `$` siblings is
481
+ refused with an error, since it would fail on the server. Refactor anonymous/inner classes
482
+ into top-level SHARED_CODE classes.
497
483
 
498
484
  ### Server-Provided Java Libraries
499
485
 
500
- Compilation and IDE IntelliSense need the Puakma framework jar and the server's shared
486
+ The IDE's Java build and IntelliSense need the Puakma framework jar and the server's shared
501
487
  libraries on the classpath. Instead of maintaining local copies, vortex downloads them from
502
488
  each server's `webdesign` application (the `vortex` API's `systemjar` and `libraries`
503
- endpoints) and caches them per server under `<workspace>/<host>/.lib/`:
489
+ endpoints - through the gateway on `backend = gateway` when it is installed, which needs
490
+ `GatewayDesignRead`) and
491
+ caches them per server under `<workspace>/<host>/.lib/`:
504
492
 
505
- - The cache is filled automatically the first time it's needed - on `clone`, `watch` and
506
- `compile` - and never re-downloaded unless you ask.
493
+ - The cache is filled automatically the first time it's needed - on `clone` and `watch` -
494
+ and never re-downloaded unless you ask.
507
495
  - `vortex libs` shows what's cached for each server; `vortex libs --refresh` re-downloads
508
496
  (add `-s <server>` for one server), e.g. after a server upgrade.
509
- - `javac` (via `vortex compile`) and each app folder's VS Code Java settings use the app's
510
- own server's cached jars, so identical class names on different servers/versions never
511
- cross-contaminate.
497
+ - Each server's VS Code workspace (`vortex code -s <server>`) uses that server's own cached
498
+ jars, so identical class names on different servers/versions never cross-contaminate.
512
499
  - Servers whose `webdesign` app doesn't provide the `vortex` API yet fall back to the
513
500
  `puakma.jar` bundled with vortex-cli plus any `lib_path` entries, with a warning.
514
501
  - `vortex clean` keeps each host's `.lib` cache so the jars don't need
@@ -530,6 +517,6 @@ vortex schema mydb --ddl invoice # print CREATE TABLE from the dictionary
530
517
  ```
531
518
 
532
519
  On a `backend = gateway` server the dictionary is reached through webdesign's vortex API via
533
- the gateway's `dictionary` endpoint (`GatewayDBRead` to read, `GatewayDBWrite` to change).
534
- That API cannot record `--default` or `--position` (refused) nor the column half of `--ref`
535
- (warned) - see [SOAP-free on backend = gateway](#soap-free-on-backend--gateway).
520
+ the gateway (`GatewayDBRead` to read, `GatewayDesignWrite` to change - dictionary rows are design
521
+ metadata; no DDL ever runs). That API cannot record `--default` or `--position` (refused) nor
522
+ the column half of `--ref` (warned) - see [The Gateway Backend](#the-gateway-backend).