vortex-cli 8.1.1__tar.gz → 8.3.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 (62) hide show
  1. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/PKG-INFO +284 -15
  2. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/README.md +283 -14
  3. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/pyproject.toml +1 -1
  4. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/cli.py +245 -3
  5. vortex_cli-8.3.0/vortex/commands/agenda.py +403 -0
  6. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/commands/execute.py +0 -6
  7. vortex_cli-8.3.0/vortex/commands/file.py +573 -0
  8. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/commands/info.py +2 -0
  9. vortex_cli-8.3.0/vortex/commands/log.py +648 -0
  10. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/commands/object_.py +58 -26
  11. vortex_cli-8.3.0/vortex/commands/stats.py +247 -0
  12. vortex_cli-8.3.0/vortex/commands/weblog.py +387 -0
  13. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/main.py +42 -1
  14. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/models.py +36 -1
  15. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/registry.py +11 -0
  16. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/webdesign.py +353 -10
  17. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex_cli.egg-info/PKG-INFO +284 -15
  18. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex_cli.egg-info/SOURCES.txt +4 -0
  19. vortex_cli-8.1.1/vortex/commands/log.py +0 -276
  20. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/LICENSE +0 -0
  21. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/setup.cfg +0 -0
  22. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/__init__.py +0 -0
  23. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/__main__.py +0 -0
  24. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/colour.py +0 -0
  25. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/commands/__init__.py +0 -0
  26. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/commands/app.py +0 -0
  27. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/commands/clean.py +0 -0
  28. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/commands/clone.py +0 -0
  29. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/commands/code.py +0 -0
  30. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/commands/compile.py +0 -0
  31. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/commands/db.py +0 -0
  32. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/commands/diff.py +0 -0
  33. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/commands/docs.py +0 -0
  34. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/commands/fetch.py +0 -0
  35. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/commands/keyword.py +0 -0
  36. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/commands/libs.py +0 -0
  37. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/commands/pull.py +0 -0
  38. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/commands/search.py +0 -0
  39. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/commands/servers.py +0 -0
  40. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/commands/use.py +0 -0
  41. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/commands/watch.py +0 -0
  42. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/constants.py +0 -0
  43. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/docs/Blackbook v2.md +0 -0
  44. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/docs/Blackbook.pdf +0 -0
  45. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/docs/index.html +0 -0
  46. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/docs/marked.min.js +0 -0
  47. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/git.py +0 -0
  48. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/lib/puakma-6.0.40.jar +0 -0
  49. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/libs.py +0 -0
  50. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/logging.py +0 -0
  51. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/output.py +0 -0
  52. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/schedule.py +0 -0
  53. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/server_options.py +0 -0
  54. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/soap.py +0 -0
  55. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/spinner.py +0 -0
  56. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/sync.py +0 -0
  57. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/util.py +0 -0
  58. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex/workspace.py +0 -0
  59. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex_cli.egg-info/dependency_links.txt +0 -0
  60. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex_cli.egg-info/entry_points.txt +0 -0
  61. {vortex_cli-8.1.1 → vortex_cli-8.3.0}/vortex_cli.egg-info/requires.txt +0 -0
  62. {vortex_cli-8.1.1 → vortex_cli-8.3.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: 8.1.1
3
+ Version: 8.3.0
4
4
  Summary: Vortex CLI
5
5
  Author-email: Jordan Amos <jordan.amos@gmail.com>
6
6
  License: MIT License
@@ -106,6 +106,36 @@ While it is possible to use without it, this software has been purposefully desi
106
106
  java_environment_name = JavaSE-17 ; Java Execution Environment name https://docs.osgi.org/reference/eenames.html
107
107
  ```
108
108
 
109
+ ## Upgrading to 8.3
110
+
111
+ - **`vortex weblog`** reads the server's HTTP access log (`HTTPTextLog`) through the gateway:
112
+ its last lines, an older day's file, the whole file, or new lines as they are written (see
113
+ [The web log](#the-web-log)). It needs `GatewaySystem` and a gateway with `GET logs?log=web`.
114
+ - **`vortex stats`** shows each loaded addin's statistics - CPU, memory, threads, errors,
115
+ logins, HTTP traffic - from the gateway's `GET stats`, once or re-polled with `-k` (see
116
+ [Server statistics](#server-statistics)). It needs `GatewaySystem`; a gateway without the
117
+ route is refused with `NOT_EXPOSED` - update `vortex/gateway`.
118
+ - **`vortex log` reads a time window.** `--since 2h`, `--from 02:00 --to 03:00` (or full dates),
119
+ `--search TEXT`, `-n` up to 500, and `--page N` / `--all-pages` through the gateway's pager
120
+ (see [The server log](#the-server-log)). Without the new flags it prints and sends exactly
121
+ what it did before.
122
+ - **`vortex file`** lists, reads, downloads, uploads and deletes the server's files below the
123
+ Puakma root through the gateway's `files` route (see [Server files](#server-files)). It
124
+ needs `Admin` and a gateway with the `files` route; an older one refuses it with
125
+ `NOT_EXPOSED`.
126
+
127
+ ## Upgrading to 8.2
128
+
129
+ - **`object run` runs ACTIONs, and waits.** It calls the gateway's new `POST run` (gateway
130
+ `AppVersion` 0.1.4 or later) instead of sending `tell agenda run` to the console, and
131
+ reports how long the action took, its reply and any exception (see
132
+ [Running an action](#running-an-action)). An older gateway refuses it with `NOT_EXPOSED`.
133
+ It no longer accepts a SCHEDULED_ACTION.
134
+ - **`vortex agenda`** lists the scheduled actions AGENDA has loaded and queues one with
135
+ `agenda run`, refusing the cases where AGENDA would silently do nothing (see
136
+ [The agenda](#the-agenda)). It replaces both `object run` on a scheduled action and
137
+ `vortex execute tell agenda run ...`.
138
+
109
139
  ## Upgrading to 8.1
110
140
 
111
141
  8.1 does two things. It replaces `vortex config` with plain top-level commands that read
@@ -289,7 +319,7 @@ vortex object list [QUERY] [--app-id ID [--local]] [--strict --inherits-from|-
289
319
  --ids-only --show-params --type T...] [--json]
290
320
  vortex object grep PATTERN [--app-id ID] [--output-paths|--output-apps]
291
321
  [--include-resources|--type T...] [--json]
292
- vortex object run ID --app-id ID
322
+ vortex object run ID --app-id ID [--output] [--json]
293
323
  vortex object delete ID... --app-id ID [--yes]
294
324
 
295
325
  ── keyword ──────────────────────────────────────────────────────────────────
@@ -315,6 +345,17 @@ vortex db update-column DB TABLE COLUMN --app-id ID [--name --type --size --desc
315
345
  --cascade-delete|--no-cascade-delete]
316
346
  vortex db delete-column DB TABLE COLUMN --app-id ID [--yes]
317
347
 
348
+ ── agenda ───────────────────────────────────────────────────────────────────
349
+ vortex agenda [list] [--app-id ID] [--json]
350
+ vortex agenda run ID --app-id ID [--param KEY=VALUE ...] [--refresh --force] [--json]
351
+
352
+ ── file (Admin) ─────────────────────────────────────────────────────────────
353
+ vortex file list [PATH] [--json]
354
+ vortex file get PATH [--hash --meta] [--json]
355
+ vortex file download PATH [-o DEST] [--overwrite] [--json]
356
+ vortex file upload LOCAL... --to FOLDER [--overwrite] [--json]
357
+ vortex file delete PATH [--yes] [--json]
358
+
318
359
  ── Workspace ────────────────────────────────────────────────────────────────
319
360
  vortex ls [app list filters] [--json] = app list --local
320
361
  vortex clone APP... [--group --reclone --all --get-resources --open-urls --timeout]
@@ -328,7 +369,10 @@ vortex code [--refresh [--reset]] [-s]
328
369
  ── Server and setup ─────────────────────────────────────────────────────────
329
370
  vortex [-s NAME] [--show-permissions] [--json] (the server's live status)
330
371
  vortex --path (the workspace path)
331
- vortex log [-n --source -m --errors-only|--debug-only|--info-only -k -d] [--json]
372
+ vortex log [-n --source -m --search --errors-only|--debug-only|--info-only]
373
+ [--since D | --from WHEN] [--to WHEN] [--page N | --all-pages] [-k -d] [--json]
374
+ vortex weblog [-n -m [--regex] --file NAME] [--list | --all | -o PATH | -k [-d]] [--json]
375
+ vortex stats [--addin NAME] [--key KEY] [-k [-d]] [--json]
332
376
  vortex execute CMD... | flush-cache | refresh-agenda | refresh-design APP_ID | schedule
333
377
  [--json] (alias: ex)
334
378
  vortex server list [--json]
@@ -412,7 +456,7 @@ addins match:
412
456
 
413
457
  | Shortcut | Sends | Effect |
414
458
  |---|---|---|
415
- | `schedule` | `tell agenda schedule` | lists every scheduled action and its next run |
459
+ | `schedule` | `tell agenda schedule` | lists every scheduled action and its next run (raw text; `vortex agenda` parses it) |
416
460
  | `refresh-agenda` | `tell agenda refresh` | AGENDA rereads every schedule now |
417
461
  | `refresh-design APP_ID` | `tell agenda run /<webdesign_path>/RefreshDesign?&AppID=N` | rebuilds the application's design from its template, as `app refresh` does (a clone is then out of date) |
418
462
  | `flush-cache` | `tell http cache flush` | clears the design cache and all action class loaders |
@@ -420,17 +464,204 @@ addins match:
420
464
  `tell http flush cache` is **not** a valid command: the HTTP addin only matches
421
465
  `cache flush`, and anything else does nothing, silently. Use `flush-cache`.
422
466
 
423
- Two console operations act on one application or object, so they also live with those nouns:
424
-
425
- | Command | Sends |
426
- |---|---|
427
- | `vortex app refresh APP_ID` | `tell agenda run /<webdesign_path>/RefreshDesign?&AppID=N` - rebuilds the design from its template (a clone is then out of date) |
428
- | `vortex object run ID --app-id N` | `tell agenda run /group/app.pma/name` - runs an ACTION or SCHEDULED_ACTION now |
467
+ `vortex app refresh APP_ID` also lives with its noun: it sends
468
+ `tell agenda run /<webdesign_path>/RefreshDesign?&AppID=N`, which rebuilds the design from its
469
+ template (a clone is then out of date).
470
+
471
+ ### Running an action
472
+
473
+ `vortex object run ID --app-id N` runs an ACTION now, as your identity, and waits for it:
474
+ the gateway's `POST run` (`GatewaySystem`) loads the action's class, executes it and replies
475
+ with how long it took, its redirect, content type and reply size. `--output` also prints the
476
+ action's reply (its buffer, as text). An action that throws exits 1 with `ACTION_FAILED` and
477
+ the exception; a path with no compiled ACTION is `NOT_FOUND`.
478
+
479
+ - **ACTIONs only.** A SCHEDULED_ACTION (or any other type) is `WRONG_TYPE`. Scheduled
480
+ actions are queued with AGENDA: `vortex agenda run ID --app-id N` ([The agenda](#the-agenda)).
481
+ - **No client connection.** The action's `getOutputStream()` is null, as under AGENDA, so it
482
+ must buffer its reply (`write`/`setBuffer`); one that streams unconditionally fails with
483
+ the NullPointerException as its result.
484
+ - **Synchronous.** The CLI waits up to 300 s. Behind Cloudflare (prod) the request is cut
485
+ at about 100 s; the action still finishes on the server - check `vortex log`.
486
+ - **Gateway required.** It needs a gateway with the `run` route; an older gateway refuses with
487
+ `NOT_EXPOSED`. Earlier versions of `object run` sent `tell agenda run`, which only reached
488
+ scheduled actions on AGENDA's list and did nothing, silently, for an ACTION.
429
489
 
430
490
  The 8.0 flags (`--show-schedule`, `--refresh-agenda`, `--flush-cache`, `--refresh-design`,
431
491
  `--run`) were removed in 8.1. `app refresh` was `app refresh-design` in 8.1.0; the old
432
492
  name still works.
433
493
 
494
+ ### The server log
495
+
496
+ `vortex log` prints the newest entries in the server log (`PMALOG`) - through the gateway's
497
+ `GET logs` (`GatewaySystem`), or with a blank `gateway_path` a query through webdesign's SQL
498
+ route.
499
+
500
+ ```
501
+ vortex log the last 10 entries
502
+ vortex log --since 2h --errors-only errors in the last two hours
503
+ vortex log --from 02:00 --to 03:00 --errors-only -n 500
504
+ what errored between 2 and 3 this morning
505
+ vortex log --from 2026-10-13 --to 2026-10-13 --search timeout
506
+ vortex log --since 1d --source agenda --all-pages -n 500 --json
507
+ vortex log -k new entries as they arrive (^C stops)
508
+ ```
509
+
510
+ - **Times are the server's clock** - the clock `PMALOG` is stamped with, the gateway compares
511
+ against, and every entry is printed in. `--from`/`--to` take `HH:MM[:SS]` (today),
512
+ `YYYY-MM-DD` (`--to` a date alone means the whole day), `YYYY-MM-DD HH:MM[:SS]`, or ISO with
513
+ an offset (`2026-10-14T02:00+10:00`, `...Z`; it needs the date) for an exact instant. Both ends are inclusive.
514
+ `--since 30m|2h|3d|1w` (or `1h30m`) counts back from the server's now.
515
+ - **The server's clock decides.** `--since`, a time alone and a time with an offset are sent
516
+ as given and resolved by the gateway on its own clock (`vortex/gateway` 0.2.0+), which
517
+ replies with the window it applied; later pages and `-k` reuse that window. A date with a
518
+ time is sent as written. An older gateway ignores what it cannot read: the CLI then takes
519
+ the server's UTC offset from that reply (every entry carries it; when nothing matched, its
520
+ default window or one `rows=1` read) and reads the page again - one request more until the
521
+ gateway is updated. Without the gateway entries carry no offset, so this machine's is
522
+ assumed.
523
+ - **`--search TEXT`** matches the message, user or server name; `-m` the message only,
524
+ `--source` the source. All are case-insensitive "contains".
525
+ - **Bounded reads.** With none of `--since`/`--from`/`--to` the gateway reads only the last
526
+ 24 hours (`PMALOG` is never pruned, and the gateway counts the matches on every request);
527
+ `--to` alone reads the 24 hours before it. `--since` goes back at most `520w`.
528
+ The summary after the table says which window was read and how many entries matched.
529
+ - **Paging** (gateway only). `-n` is the page size (max 500). `--page N` reads page N, newest
530
+ first; `--all-pages` reads every page, one request at a time, and stops after 20 (10,000
531
+ entries at `-n 500`) - narrow the window for the rest. An entry written while paging is
532
+ read twice and kept once. A blank `gateway_path` refuses both with `UNAVAILABLE`.
533
+ - **`--json`**: the same entries, oldest first. With any of the flags above the envelope also
534
+ carries `window` (`{from, to, default}` on the server's clock; `default` when the gateway's
535
+ 24-hour window applied) and, through the gateway, `pager`
536
+ (`{page, pagesRead, pages, total, rows}`). Plain `vortex log --json` is unchanged.
537
+ - **`-k`** follows new entries after the first read (it can start from a window, but not take
538
+ `--to`, `--page` or `--all-pages`).
539
+
540
+ ### The web log
541
+
542
+ `vortex weblog` prints the server's HTTP access log - the file `HTTPTextLog` names in
543
+ `puakma.config` - through the gateway's `GET logs?log=web` (`GatewaySystem`). Lines are printed
544
+ exactly as the server wrote them: their layout is the server's `HTTPLogFormat`, so the CLI
545
+ never parses them.
546
+
547
+ ```
548
+ vortex weblog the last 20 lines of today's file
549
+ vortex weblog -n 200 -m /api/ the last 200 lines containing /api/
550
+ vortex weblog -m ' 50[0-9] ' --regex
551
+ vortex weblog --list the log files, newest first
552
+ vortex weblog --file weblog_20261013.log
553
+ vortex weblog --file weblog_20261013.log -o oct13.log the whole file, saved
554
+ vortex weblog -k new lines as they are written (^C stops)
555
+ vortex weblog -k -n 0 only lines written from now on
556
+ ```
557
+
558
+ - **Tail, not search.** The gateway returns at most 256 KB per request and has no filter for
559
+ this log, so `-m` filters on this side and `-n` counts matching lines within the last
560
+ 256 KB. For older lines or a rare match, `--all` reads the whole file in 256 KB pieces
561
+ (`-o PATH` saves it instead of printing). Without `-m`, `-o` is a byte-for-byte copy: the
562
+ gateway (0.2.0+) sends the bytes; an older one sends UTF-8 text, so a byte that is not
563
+ UTF-8 arrives as U+FFFD.
564
+ - **Following.** `-k` polls every `-d` seconds (default 3) for what was written since the last
565
+ request. Without `--file` it follows whichever file is current, so a date-stamped log that
566
+ rolls over at midnight is picked up: the rest of the old file, then the new one (until the
567
+ server writes the new day's first line, the old file is read on). A line still being
568
+ written is held back until it is complete.
569
+ - **`--json`**: the tail and `--all` give `{file, size, from, lines}`; `-o` gives
570
+ `{file, size, output, bytes}`; `--list` gives `{current, files: [{name, size, lastModified,
571
+ current}]}`. With `-k`, one envelope per line `{file, line}`, as for `vortex log -k`.
572
+ - **Refusals.** `NOT_CONFIGURED`: the server writes no access log (`HTTPTextLog` is unset).
573
+ `NOT_FOUND`: no such file - only names the `HTTPTextLog` pattern can produce are reachable.
574
+ A gateway too old for `log=web` answers with the server log, which the CLI reports as such.
575
+ - **Gateway only.** webdesign cannot read files, so a server with a blank `gateway_path` is
576
+ refused before anything is sent.
577
+
578
+ ### Server statistics
579
+
580
+ `vortex stats` is a health check from the terminal: the time series each loaded addin keeps
581
+ in memory (the admin app's performance chart), through the gateway's `GET stats`
582
+ (`GatewaySystem`). One request per run, one row per statistic:
583
+
584
+ ```
585
+ $ vortex stats -s dev
586
+ dev at 2026-10-14 22:36:58 - addins: STATS, HTTP, AGENDA, WIDGIE, MAILER
587
+ Statistic Now Min Avg Max Span Trend
588
+ ------------------------------- ----- ----- ----- ----- ------ --------------------
589
+ stats.cpuusageperminute 21.5 0 2.08 14.2 61m ▁▁▁▂▂▂▁▁▁▁▁▁▁▁▁▁▁▃▁█
590
+ stats.memoryappmbinuseperminute 455 270 438 623 61m ▆▅▅█▅█▆▆▇▆▆▇▇▆██▅▅▁▃
591
+ stats.threadcountperminute 78 75 80.8 128 61m ▁▁▁▅▄▅▅▅▅▅▅▅▅▅▄▃▃█▆▃
592
+ http.bytesouttotal 83.1M
593
+ http.hitsperminute 27 13 22.2 176 61m ▁▁▂▁▆▃▁▁▁▁▁▂▁▁█▁▁▅▅▅
594
+ ...
595
+
596
+ vortex stats --addin HTTP one addin (a short name, or its class name)
597
+ vortex stats --key stats.cpuusageperminute
598
+ vortex stats -k poll every 5 seconds and reprint (^C stops)
599
+ ```
600
+
601
+ - **Columns.** `Now` is the newest period, still filling (this minute's hits so far) - or,
602
+ for a total like `http.bytesouttotal`, its value. `Min`/`Avg`/`Max` are over the periods
603
+ that have ended; `Span` is how far back the series goes, `Trend` its last 20 points. A `-`
604
+ means the statistic has no entries yet. Units are in the key (`mb`, `bytes`, `perminute`);
605
+ large numbers are shortened (`614K`, `11.4M`).
606
+ - **In memory only.** The server keeps a limited window (about the last hour of a
607
+ per-minute statistic) and starts again on a restart, so a short `Span` means a recent
608
+ restart.
609
+ - **`-k`** re-polls every `-d` seconds (default 5) and reprints, clearing the screen when the
610
+ output is a terminal.
611
+ - **`--json`**: `data` is the addins as the gateway sends them, every key present -
612
+ `[{name, class, statistics: [{key, captureType, created, lastUpdated, entries: [{from, to,
613
+ value}]}]}]` (`captureType`: `once`, `per-second`, `per-minute`, `per-hour`, `per-day`; a
614
+ `once` entry has no `from`/`to`) - and `time` (the server's clock) beside it. With `-k`, one
615
+ envelope per poll, one per line.
616
+ - **Refusals.** `NOT_FOUND`: no addin of that name is loaded (`vortex stats` lists them).
617
+ `NOT_EXPOSED`: the gateway predates `GET stats` - update `vortex/gateway`. A blank
618
+ `gateway_path` is refused before anything is sent.
619
+
620
+ ### Server files
621
+
622
+ `vortex file` works on the server's filesystem below the Puakma root (the parent of
623
+ `config/`), through the gateway's `files` route. **Admin only**, and gateway only: webdesign
624
+ cannot read or write files, so a server with a blank `gateway_path` is refused before anything
625
+ is sent.
626
+
627
+ ```
628
+ vortex file list the Puakma root: folders first, then files
629
+ vortex file list logs
630
+ vortex file get addins/readme.txt its text on stdout, its metadata on stderr
631
+ vortex file get lib/x.jar --hash --meta size, modified time and SHA-256 only
632
+ vortex file download logs/big.log -o ~/tmp/
633
+ vortex file upload a.jar b.jar --to addins --overwrite
634
+ vortex file delete addins/old.jar shown, then confirmed (--yes without a terminal)
635
+ ```
636
+
637
+ - **Paths** are relative to the Puakma root (`/` is the root itself). The gateway resolves
638
+ them canonically - symlinks and `..` followed - and anything that ends up outside the root
639
+ is `NOT_FOUND`, exactly like a path that does not exist.
640
+ - **`get`** prints the text only for a file up to 2 MB with no NUL byte in its first 8 KB,
641
+ decoded as UTF-8. Anything else is `TOO_LARGE` or `BINARY` (exit 1, with the metadata):
642
+ use `download`, which streams the exact bytes to disk at any size. `--meta` asks only for
643
+ the metadata; `--hash` adds the SHA-256.
644
+ - **`download`** writes beside the destination and moves the file into place once it has all
645
+ arrived, so a failed download leaves nothing behind. An existing local file is kept unless
646
+ `--overwrite`.
647
+ - **`upload`** sends every file in one request, into the folder under its own name (missing
648
+ folders are created). The gateway checks them all before writing any: a name already in
649
+ the folder is `EXISTS` and nothing is written, unless `--overwrite` - and then **each old
650
+ file is kept beside the new one as `name.yyyyMMddHHmmss`**, the only undo there is. The
651
+ SHA-256 the server reports is checked against the local file (`CORRUPT` otherwise).
652
+ - **`delete`** removes one file, symlink (never what it points to) or empty folder
653
+ (`NOT_EMPTY` otherwise). It is final: **no backup, no undo**. The entry is shown and
654
+ confirmed first; without a terminal `--yes` is required (`CONFIRMATION_REQUIRED`).
655
+ - `upload` and `delete` are writes: a protected default server must be named with `-s`.
656
+ - **Nothing under the root is hidden**, including `config/puakma.config` (the system database
657
+ login), keystores and `.pmx` backups. `get` prints what you ask for - nothing reads more than
658
+ the one path given.
659
+ - **`--json`**: `list` gives `{type: "dir", root, path, entries: [{name, type, size, modified,
660
+ path}], truncated?}` (at most 5000 entries); `get` gives `{type: "file", root, path, name,
661
+ size, modified, sha256?, tooLarge? | binary, text?}`; `download` gives `{path, output, size,
662
+ sha256}`; `upload` gives `{path, files: [{name, path, size, sha256, replaced, backup?}]}`;
663
+ `delete` gives `{path, type, size?}`.
664
+
434
665
  ### Local clones stay in sync
435
666
 
436
667
  Server commands never need a clone. When the application **is** cloned, every write runs in
@@ -573,6 +804,40 @@ vortex object get 7901 --app-id 62 # the parsed schedule
573
804
  starts; if that lands between the command's read and write, the old `LastRun` is written
574
805
  back and the action may run one interval early.
575
806
 
807
+ ### The agenda
808
+
809
+ AGENDA has no API beyond its console commands, so `vortex agenda` sends them through the same
810
+ console route as `vortex execute` (the gateway's `POST console`, `GatewaySystem`, or the SOAP
811
+ console without the gateway) and parses the text they answer.
812
+
813
+ ```
814
+ vortex agenda -s dev # = agenda list
815
+ vortex agenda list --app-id 9 -s dev
816
+ vortex agenda run 7825 --app-id 60 -s dev [--param AppID=12] [--refresh] [--force]
817
+ ```
818
+
819
+ - **`list`** - `tell agenda schedule`: every scheduled action AGENDA has **loaded**, by next
820
+ run (server time), with the waitlist and AGENDA's counts (running, waitlisted, scheduled,
821
+ max at once). An action with empty `Options` is loaded as *on demand only*. Not listed: an
822
+ action with `Schedule=N`, one in a disabled application or an application with scheduled
823
+ actions disabled, and one created or renamed since AGENDA's last refresh (every 15
824
+ minutes). AGENDA says how many actions are running, never which.
825
+ - **`run`** - queues a SCHEDULED_ACTION: `tell agenda run /group/app.pma/Name[?&KEY=VALUE...]`.
826
+ It runs as the system session when one of AGENDA's slots is free; its result is only in
827
+ `vortex log`. AGENDA answers that command with nothing, whatever it did, so `run` checks
828
+ first and sends nothing when AGENDA would not run it:
829
+ - `NOT_ON_AGENDA` - the action has `Schedule=N` (give it a schedule first), or it is not on
830
+ the loaded list. `--refresh` sends `tell agenda refresh` and checks again (for an action
831
+ created or renamed in the last 15 minutes).
832
+ - `ALREADY_QUEUED` - it is already waitlisted; AGENDA would skip it.
833
+ - `PREFIX_COLLISION` - AGENDA matches the path by prefix and queues it once per matching
834
+ item, so `.../SyncAll` would also match an item `.../Sync` and run twice. `--force` sends
835
+ it anyway.
836
+ - `WRONG_TYPE` - not a SCHEDULED_ACTION (an ACTION is run with `vortex object run`).
837
+ - A queued run moves the action's next scheduled run (AGENDA resets it), and it can't be
838
+ stopped from here (`vortex execute tell agenda stop /group/app.pma/Name` asks the action to
839
+ quit; it has to check for that itself).
840
+
576
841
  ### Keyword values and secrets
577
842
 
578
843
  Keywords are an application's live configuration, and in practice they hold credentials in
@@ -673,8 +938,9 @@ one applies:
673
938
  - A write or console command never reaches it by default: when a protected server is only
674
939
  the `vortex use` default, those commands refuse to run until it is named with `-s`.
675
940
 
676
- There are no write confirmations - the gateway's roles are the protection, so run agents
677
- against production with an identity whose roles fit the job.
941
+ Only deletes are confirmed (`--yes` without a terminal); other writes are not - the gateway's
942
+ roles are the protection, so run agents against production with an identity whose roles fit
943
+ the job.
678
944
 
679
945
  ### Backend: gateway or webdesign
680
946
 
@@ -697,8 +963,8 @@ webdesign's `/system/webdesign.pma/vortex/<path>` - with three things in front o
697
963
  lets an id from one application be used under another (`NOT_FOUND`), and runs exactly one
698
964
  `SELECT`/`INSERT`/`UPDATE`/`DELETE` per SQL request (`SQL_NOT_ALLOWED`: DDL, `WITH`, and
699
965
  any `;`).
700
- - **Its own routes:** `whoami` (a bare `vortex`), the server log (`log`), the console (`execute`),
701
- `.pmx` export and import.
966
+ - **Its own routes:** `whoami` (a bare `vortex`), the server and web logs (`log`, `weblog`), the console (`execute`),
967
+ addin statistics (`stats`), `.pmx` export and import, and the server's files (`file`, `Admin`).
702
968
 
703
969
  On a server with a blank `gateway_path`:
704
970
 
@@ -708,8 +974,11 @@ On a server with a blank `gateway_path`:
708
974
  | `db query` | a CLI-side guard replaces the gateway's: one `SELECT`/`INSERT`/`UPDATE`/`DELETE` statement, refused otherwise with `SQL_NOT_ALLOWED` before anything is sent |
709
975
  | `app export` | webdesign's `ExportPMX` |
710
976
  | `vortex` (no command) | the console `status` command over SOAP (`soap_path`); `--show-permissions` says "no gateway: webdesign direct, no role checks" |
711
- | `log` | a `PMALOG` query through webdesign's SQL route, on the system-database connection owned by the ungrouped `puakma` application (found once per run) |
977
+ | `log` | a `PMALOG` query through webdesign's SQL route, on the system-database connection owned by the ungrouped `puakma` application (found once per run); `--since`/`--from`/`--to`/`--search` go into the query, `--page`/`--all-pages` are refused |
712
978
  | `execute` | the console command over SOAP |
979
+ | `weblog` | unavailable: webdesign cannot read the access log |
980
+ | `stats` | unavailable: webdesign has no route to the addin statistics |
981
+ | `file` | unavailable: webdesign cannot read or write files |
713
982
  | `app import` | unavailable (`UNAVAILABLE`) |
714
983
 
715
984
  Without the gateway there are no role checks, no system-database block and no cross-app