vortex-cli 8.2.0__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.2.0 → vortex_cli-8.3.0}/PKG-INFO +210 -7
  2. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/README.md +209 -6
  3. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/pyproject.toml +1 -1
  4. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/cli.py +245 -3
  5. vortex_cli-8.3.0/vortex/commands/file.py +573 -0
  6. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/commands/info.py +2 -0
  7. vortex_cli-8.3.0/vortex/commands/log.py +648 -0
  8. vortex_cli-8.3.0/vortex/commands/stats.py +247 -0
  9. vortex_cli-8.3.0/vortex/commands/weblog.py +387 -0
  10. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/main.py +32 -0
  11. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/models.py +36 -1
  12. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/registry.py +7 -0
  13. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/webdesign.py +337 -9
  14. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex_cli.egg-info/PKG-INFO +210 -7
  15. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex_cli.egg-info/SOURCES.txt +3 -0
  16. vortex_cli-8.2.0/vortex/commands/log.py +0 -276
  17. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/LICENSE +0 -0
  18. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/setup.cfg +0 -0
  19. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/__init__.py +0 -0
  20. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/__main__.py +0 -0
  21. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/colour.py +0 -0
  22. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/commands/__init__.py +0 -0
  23. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/commands/agenda.py +0 -0
  24. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/commands/app.py +0 -0
  25. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/commands/clean.py +0 -0
  26. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/commands/clone.py +0 -0
  27. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/commands/code.py +0 -0
  28. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/commands/compile.py +0 -0
  29. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/commands/db.py +0 -0
  30. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/commands/diff.py +0 -0
  31. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/commands/docs.py +0 -0
  32. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/commands/execute.py +0 -0
  33. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/commands/fetch.py +0 -0
  34. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/commands/keyword.py +0 -0
  35. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/commands/libs.py +0 -0
  36. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/commands/object_.py +0 -0
  37. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/commands/pull.py +0 -0
  38. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/commands/search.py +0 -0
  39. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/commands/servers.py +0 -0
  40. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/commands/use.py +0 -0
  41. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/commands/watch.py +0 -0
  42. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/constants.py +0 -0
  43. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/docs/Blackbook v2.md +0 -0
  44. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/docs/Blackbook.pdf +0 -0
  45. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/docs/index.html +0 -0
  46. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/docs/marked.min.js +0 -0
  47. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/git.py +0 -0
  48. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/lib/puakma-6.0.40.jar +0 -0
  49. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/libs.py +0 -0
  50. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/logging.py +0 -0
  51. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/output.py +0 -0
  52. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/schedule.py +0 -0
  53. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/server_options.py +0 -0
  54. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/soap.py +0 -0
  55. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/spinner.py +0 -0
  56. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/sync.py +0 -0
  57. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/util.py +0 -0
  58. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex/workspace.py +0 -0
  59. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex_cli.egg-info/dependency_links.txt +0 -0
  60. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex_cli.egg-info/entry_points.txt +0 -0
  61. {vortex_cli-8.2.0 → vortex_cli-8.3.0}/vortex_cli.egg-info/requires.txt +0 -0
  62. {vortex_cli-8.2.0 → 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.2.0
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,24 @@ 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
+
109
127
  ## Upgrading to 8.2
110
128
 
111
129
  - **`object run` runs ACTIONs, and waits.** It calls the gateway's new `POST run` (gateway
@@ -331,6 +349,13 @@ vortex db delete-column DB TABLE COLUMN --app-id ID [--yes]
331
349
  vortex agenda [list] [--app-id ID] [--json]
332
350
  vortex agenda run ID --app-id ID [--param KEY=VALUE ...] [--refresh --force] [--json]
333
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
+
334
359
  ── Workspace ────────────────────────────────────────────────────────────────
335
360
  vortex ls [app list filters] [--json] = app list --local
336
361
  vortex clone APP... [--group --reclone --all --get-resources --open-urls --timeout]
@@ -344,7 +369,10 @@ vortex code [--refresh [--reset]] [-s]
344
369
  ── Server and setup ─────────────────────────────────────────────────────────
345
370
  vortex [-s NAME] [--show-permissions] [--json] (the server's live status)
346
371
  vortex --path (the workspace path)
347
- 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]
348
376
  vortex execute CMD... | flush-cache | refresh-agenda | refresh-design APP_ID | schedule
349
377
  [--json] (alias: ex)
350
378
  vortex server list [--json]
@@ -463,6 +491,177 @@ The 8.0 flags (`--show-schedule`, `--refresh-agenda`, `--flush-cache`, `--refres
463
491
  `--run`) were removed in 8.1. `app refresh` was `app refresh-design` in 8.1.0; the old
464
492
  name still works.
465
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
+
466
665
  ### Local clones stay in sync
467
666
 
468
667
  Server commands never need a clone. When the application **is** cloned, every write runs in
@@ -739,8 +938,9 @@ one applies:
739
938
  - A write or console command never reaches it by default: when a protected server is only
740
939
  the `vortex use` default, those commands refuse to run until it is named with `-s`.
741
940
 
742
- There are no write confirmations - the gateway's roles are the protection, so run agents
743
- 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.
744
944
 
745
945
  ### Backend: gateway or webdesign
746
946
 
@@ -763,8 +963,8 @@ webdesign's `/system/webdesign.pma/vortex/<path>` - with three things in front o
763
963
  lets an id from one application be used under another (`NOT_FOUND`), and runs exactly one
764
964
  `SELECT`/`INSERT`/`UPDATE`/`DELETE` per SQL request (`SQL_NOT_ALLOWED`: DDL, `WITH`, and
765
965
  any `;`).
766
- - **Its own routes:** `whoami` (a bare `vortex`), the server log (`log`), the console (`execute`),
767
- `.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`).
768
968
 
769
969
  On a server with a blank `gateway_path`:
770
970
 
@@ -774,8 +974,11 @@ On a server with a blank `gateway_path`:
774
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 |
775
975
  | `app export` | webdesign's `ExportPMX` |
776
976
  | `vortex` (no command) | the console `status` command over SOAP (`soap_path`); `--show-permissions` says "no gateway: webdesign direct, no role checks" |
777
- | `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 |
778
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 |
779
982
  | `app import` | unavailable (`UNAVAILABLE`) |
780
983
 
781
984
  Without the gateway there are no role checks, no system-database block and no cross-app
@@ -62,6 +62,24 @@ While it is possible to use without it, this software has been purposefully desi
62
62
  java_environment_name = JavaSE-17 ; Java Execution Environment name https://docs.osgi.org/reference/eenames.html
63
63
  ```
64
64
 
65
+ ## Upgrading to 8.3
66
+
67
+ - **`vortex weblog`** reads the server's HTTP access log (`HTTPTextLog`) through the gateway:
68
+ its last lines, an older day's file, the whole file, or new lines as they are written (see
69
+ [The web log](#the-web-log)). It needs `GatewaySystem` and a gateway with `GET logs?log=web`.
70
+ - **`vortex stats`** shows each loaded addin's statistics - CPU, memory, threads, errors,
71
+ logins, HTTP traffic - from the gateway's `GET stats`, once or re-polled with `-k` (see
72
+ [Server statistics](#server-statistics)). It needs `GatewaySystem`; a gateway without the
73
+ route is refused with `NOT_EXPOSED` - update `vortex/gateway`.
74
+ - **`vortex log` reads a time window.** `--since 2h`, `--from 02:00 --to 03:00` (or full dates),
75
+ `--search TEXT`, `-n` up to 500, and `--page N` / `--all-pages` through the gateway's pager
76
+ (see [The server log](#the-server-log)). Without the new flags it prints and sends exactly
77
+ what it did before.
78
+ - **`vortex file`** lists, reads, downloads, uploads and deletes the server's files below the
79
+ Puakma root through the gateway's `files` route (see [Server files](#server-files)). It
80
+ needs `Admin` and a gateway with the `files` route; an older one refuses it with
81
+ `NOT_EXPOSED`.
82
+
65
83
  ## Upgrading to 8.2
66
84
 
67
85
  - **`object run` runs ACTIONs, and waits.** It calls the gateway's new `POST run` (gateway
@@ -287,6 +305,13 @@ vortex db delete-column DB TABLE COLUMN --app-id ID [--yes]
287
305
  vortex agenda [list] [--app-id ID] [--json]
288
306
  vortex agenda run ID --app-id ID [--param KEY=VALUE ...] [--refresh --force] [--json]
289
307
 
308
+ ── file (Admin) ─────────────────────────────────────────────────────────────
309
+ vortex file list [PATH] [--json]
310
+ vortex file get PATH [--hash --meta] [--json]
311
+ vortex file download PATH [-o DEST] [--overwrite] [--json]
312
+ vortex file upload LOCAL... --to FOLDER [--overwrite] [--json]
313
+ vortex file delete PATH [--yes] [--json]
314
+
290
315
  ── Workspace ────────────────────────────────────────────────────────────────
291
316
  vortex ls [app list filters] [--json] = app list --local
292
317
  vortex clone APP... [--group --reclone --all --get-resources --open-urls --timeout]
@@ -300,7 +325,10 @@ vortex code [--refresh [--reset]] [-s]
300
325
  ── Server and setup ─────────────────────────────────────────────────────────
301
326
  vortex [-s NAME] [--show-permissions] [--json] (the server's live status)
302
327
  vortex --path (the workspace path)
303
- vortex log [-n --source -m --errors-only|--debug-only|--info-only -k -d] [--json]
328
+ vortex log [-n --source -m --search --errors-only|--debug-only|--info-only]
329
+ [--since D | --from WHEN] [--to WHEN] [--page N | --all-pages] [-k -d] [--json]
330
+ vortex weblog [-n -m [--regex] --file NAME] [--list | --all | -o PATH | -k [-d]] [--json]
331
+ vortex stats [--addin NAME] [--key KEY] [-k [-d]] [--json]
304
332
  vortex execute CMD... | flush-cache | refresh-agenda | refresh-design APP_ID | schedule
305
333
  [--json] (alias: ex)
306
334
  vortex server list [--json]
@@ -419,6 +447,177 @@ The 8.0 flags (`--show-schedule`, `--refresh-agenda`, `--flush-cache`, `--refres
419
447
  `--run`) were removed in 8.1. `app refresh` was `app refresh-design` in 8.1.0; the old
420
448
  name still works.
421
449
 
450
+ ### The server log
451
+
452
+ `vortex log` prints the newest entries in the server log (`PMALOG`) - through the gateway's
453
+ `GET logs` (`GatewaySystem`), or with a blank `gateway_path` a query through webdesign's SQL
454
+ route.
455
+
456
+ ```
457
+ vortex log the last 10 entries
458
+ vortex log --since 2h --errors-only errors in the last two hours
459
+ vortex log --from 02:00 --to 03:00 --errors-only -n 500
460
+ what errored between 2 and 3 this morning
461
+ vortex log --from 2026-10-13 --to 2026-10-13 --search timeout
462
+ vortex log --since 1d --source agenda --all-pages -n 500 --json
463
+ vortex log -k new entries as they arrive (^C stops)
464
+ ```
465
+
466
+ - **Times are the server's clock** - the clock `PMALOG` is stamped with, the gateway compares
467
+ against, and every entry is printed in. `--from`/`--to` take `HH:MM[:SS]` (today),
468
+ `YYYY-MM-DD` (`--to` a date alone means the whole day), `YYYY-MM-DD HH:MM[:SS]`, or ISO with
469
+ an offset (`2026-10-14T02:00+10:00`, `...Z`; it needs the date) for an exact instant. Both ends are inclusive.
470
+ `--since 30m|2h|3d|1w` (or `1h30m`) counts back from the server's now.
471
+ - **The server's clock decides.** `--since`, a time alone and a time with an offset are sent
472
+ as given and resolved by the gateway on its own clock (`vortex/gateway` 0.2.0+), which
473
+ replies with the window it applied; later pages and `-k` reuse that window. A date with a
474
+ time is sent as written. An older gateway ignores what it cannot read: the CLI then takes
475
+ the server's UTC offset from that reply (every entry carries it; when nothing matched, its
476
+ default window or one `rows=1` read) and reads the page again - one request more until the
477
+ gateway is updated. Without the gateway entries carry no offset, so this machine's is
478
+ assumed.
479
+ - **`--search TEXT`** matches the message, user or server name; `-m` the message only,
480
+ `--source` the source. All are case-insensitive "contains".
481
+ - **Bounded reads.** With none of `--since`/`--from`/`--to` the gateway reads only the last
482
+ 24 hours (`PMALOG` is never pruned, and the gateway counts the matches on every request);
483
+ `--to` alone reads the 24 hours before it. `--since` goes back at most `520w`.
484
+ The summary after the table says which window was read and how many entries matched.
485
+ - **Paging** (gateway only). `-n` is the page size (max 500). `--page N` reads page N, newest
486
+ first; `--all-pages` reads every page, one request at a time, and stops after 20 (10,000
487
+ entries at `-n 500`) - narrow the window for the rest. An entry written while paging is
488
+ read twice and kept once. A blank `gateway_path` refuses both with `UNAVAILABLE`.
489
+ - **`--json`**: the same entries, oldest first. With any of the flags above the envelope also
490
+ carries `window` (`{from, to, default}` on the server's clock; `default` when the gateway's
491
+ 24-hour window applied) and, through the gateway, `pager`
492
+ (`{page, pagesRead, pages, total, rows}`). Plain `vortex log --json` is unchanged.
493
+ - **`-k`** follows new entries after the first read (it can start from a window, but not take
494
+ `--to`, `--page` or `--all-pages`).
495
+
496
+ ### The web log
497
+
498
+ `vortex weblog` prints the server's HTTP access log - the file `HTTPTextLog` names in
499
+ `puakma.config` - through the gateway's `GET logs?log=web` (`GatewaySystem`). Lines are printed
500
+ exactly as the server wrote them: their layout is the server's `HTTPLogFormat`, so the CLI
501
+ never parses them.
502
+
503
+ ```
504
+ vortex weblog the last 20 lines of today's file
505
+ vortex weblog -n 200 -m /api/ the last 200 lines containing /api/
506
+ vortex weblog -m ' 50[0-9] ' --regex
507
+ vortex weblog --list the log files, newest first
508
+ vortex weblog --file weblog_20261013.log
509
+ vortex weblog --file weblog_20261013.log -o oct13.log the whole file, saved
510
+ vortex weblog -k new lines as they are written (^C stops)
511
+ vortex weblog -k -n 0 only lines written from now on
512
+ ```
513
+
514
+ - **Tail, not search.** The gateway returns at most 256 KB per request and has no filter for
515
+ this log, so `-m` filters on this side and `-n` counts matching lines within the last
516
+ 256 KB. For older lines or a rare match, `--all` reads the whole file in 256 KB pieces
517
+ (`-o PATH` saves it instead of printing). Without `-m`, `-o` is a byte-for-byte copy: the
518
+ gateway (0.2.0+) sends the bytes; an older one sends UTF-8 text, so a byte that is not
519
+ UTF-8 arrives as U+FFFD.
520
+ - **Following.** `-k` polls every `-d` seconds (default 3) for what was written since the last
521
+ request. Without `--file` it follows whichever file is current, so a date-stamped log that
522
+ rolls over at midnight is picked up: the rest of the old file, then the new one (until the
523
+ server writes the new day's first line, the old file is read on). A line still being
524
+ written is held back until it is complete.
525
+ - **`--json`**: the tail and `--all` give `{file, size, from, lines}`; `-o` gives
526
+ `{file, size, output, bytes}`; `--list` gives `{current, files: [{name, size, lastModified,
527
+ current}]}`. With `-k`, one envelope per line `{file, line}`, as for `vortex log -k`.
528
+ - **Refusals.** `NOT_CONFIGURED`: the server writes no access log (`HTTPTextLog` is unset).
529
+ `NOT_FOUND`: no such file - only names the `HTTPTextLog` pattern can produce are reachable.
530
+ A gateway too old for `log=web` answers with the server log, which the CLI reports as such.
531
+ - **Gateway only.** webdesign cannot read files, so a server with a blank `gateway_path` is
532
+ refused before anything is sent.
533
+
534
+ ### Server statistics
535
+
536
+ `vortex stats` is a health check from the terminal: the time series each loaded addin keeps
537
+ in memory (the admin app's performance chart), through the gateway's `GET stats`
538
+ (`GatewaySystem`). One request per run, one row per statistic:
539
+
540
+ ```
541
+ $ vortex stats -s dev
542
+ dev at 2026-10-14 22:36:58 - addins: STATS, HTTP, AGENDA, WIDGIE, MAILER
543
+ Statistic Now Min Avg Max Span Trend
544
+ ------------------------------- ----- ----- ----- ----- ------ --------------------
545
+ stats.cpuusageperminute 21.5 0 2.08 14.2 61m ▁▁▁▂▂▂▁▁▁▁▁▁▁▁▁▁▁▃▁█
546
+ stats.memoryappmbinuseperminute 455 270 438 623 61m ▆▅▅█▅█▆▆▇▆▆▇▇▆██▅▅▁▃
547
+ stats.threadcountperminute 78 75 80.8 128 61m ▁▁▁▅▄▅▅▅▅▅▅▅▅▅▄▃▃█▆▃
548
+ http.bytesouttotal 83.1M
549
+ http.hitsperminute 27 13 22.2 176 61m ▁▁▂▁▆▃▁▁▁▁▁▂▁▁█▁▁▅▅▅
550
+ ...
551
+
552
+ vortex stats --addin HTTP one addin (a short name, or its class name)
553
+ vortex stats --key stats.cpuusageperminute
554
+ vortex stats -k poll every 5 seconds and reprint (^C stops)
555
+ ```
556
+
557
+ - **Columns.** `Now` is the newest period, still filling (this minute's hits so far) - or,
558
+ for a total like `http.bytesouttotal`, its value. `Min`/`Avg`/`Max` are over the periods
559
+ that have ended; `Span` is how far back the series goes, `Trend` its last 20 points. A `-`
560
+ means the statistic has no entries yet. Units are in the key (`mb`, `bytes`, `perminute`);
561
+ large numbers are shortened (`614K`, `11.4M`).
562
+ - **In memory only.** The server keeps a limited window (about the last hour of a
563
+ per-minute statistic) and starts again on a restart, so a short `Span` means a recent
564
+ restart.
565
+ - **`-k`** re-polls every `-d` seconds (default 5) and reprints, clearing the screen when the
566
+ output is a terminal.
567
+ - **`--json`**: `data` is the addins as the gateway sends them, every key present -
568
+ `[{name, class, statistics: [{key, captureType, created, lastUpdated, entries: [{from, to,
569
+ value}]}]}]` (`captureType`: `once`, `per-second`, `per-minute`, `per-hour`, `per-day`; a
570
+ `once` entry has no `from`/`to`) - and `time` (the server's clock) beside it. With `-k`, one
571
+ envelope per poll, one per line.
572
+ - **Refusals.** `NOT_FOUND`: no addin of that name is loaded (`vortex stats` lists them).
573
+ `NOT_EXPOSED`: the gateway predates `GET stats` - update `vortex/gateway`. A blank
574
+ `gateway_path` is refused before anything is sent.
575
+
576
+ ### Server files
577
+
578
+ `vortex file` works on the server's filesystem below the Puakma root (the parent of
579
+ `config/`), through the gateway's `files` route. **Admin only**, and gateway only: webdesign
580
+ cannot read or write files, so a server with a blank `gateway_path` is refused before anything
581
+ is sent.
582
+
583
+ ```
584
+ vortex file list the Puakma root: folders first, then files
585
+ vortex file list logs
586
+ vortex file get addins/readme.txt its text on stdout, its metadata on stderr
587
+ vortex file get lib/x.jar --hash --meta size, modified time and SHA-256 only
588
+ vortex file download logs/big.log -o ~/tmp/
589
+ vortex file upload a.jar b.jar --to addins --overwrite
590
+ vortex file delete addins/old.jar shown, then confirmed (--yes without a terminal)
591
+ ```
592
+
593
+ - **Paths** are relative to the Puakma root (`/` is the root itself). The gateway resolves
594
+ them canonically - symlinks and `..` followed - and anything that ends up outside the root
595
+ is `NOT_FOUND`, exactly like a path that does not exist.
596
+ - **`get`** prints the text only for a file up to 2 MB with no NUL byte in its first 8 KB,
597
+ decoded as UTF-8. Anything else is `TOO_LARGE` or `BINARY` (exit 1, with the metadata):
598
+ use `download`, which streams the exact bytes to disk at any size. `--meta` asks only for
599
+ the metadata; `--hash` adds the SHA-256.
600
+ - **`download`** writes beside the destination and moves the file into place once it has all
601
+ arrived, so a failed download leaves nothing behind. An existing local file is kept unless
602
+ `--overwrite`.
603
+ - **`upload`** sends every file in one request, into the folder under its own name (missing
604
+ folders are created). The gateway checks them all before writing any: a name already in
605
+ the folder is `EXISTS` and nothing is written, unless `--overwrite` - and then **each old
606
+ file is kept beside the new one as `name.yyyyMMddHHmmss`**, the only undo there is. The
607
+ SHA-256 the server reports is checked against the local file (`CORRUPT` otherwise).
608
+ - **`delete`** removes one file, symlink (never what it points to) or empty folder
609
+ (`NOT_EMPTY` otherwise). It is final: **no backup, no undo**. The entry is shown and
610
+ confirmed first; without a terminal `--yes` is required (`CONFIRMATION_REQUIRED`).
611
+ - `upload` and `delete` are writes: a protected default server must be named with `-s`.
612
+ - **Nothing under the root is hidden**, including `config/puakma.config` (the system database
613
+ login), keystores and `.pmx` backups. `get` prints what you ask for - nothing reads more than
614
+ the one path given.
615
+ - **`--json`**: `list` gives `{type: "dir", root, path, entries: [{name, type, size, modified,
616
+ path}], truncated?}` (at most 5000 entries); `get` gives `{type: "file", root, path, name,
617
+ size, modified, sha256?, tooLarge? | binary, text?}`; `download` gives `{path, output, size,
618
+ sha256}`; `upload` gives `{path, files: [{name, path, size, sha256, replaced, backup?}]}`;
619
+ `delete` gives `{path, type, size?}`.
620
+
422
621
  ### Local clones stay in sync
423
622
 
424
623
  Server commands never need a clone. When the application **is** cloned, every write runs in
@@ -695,8 +894,9 @@ one applies:
695
894
  - A write or console command never reaches it by default: when a protected server is only
696
895
  the `vortex use` default, those commands refuse to run until it is named with `-s`.
697
896
 
698
- There are no write confirmations - the gateway's roles are the protection, so run agents
699
- against production with an identity whose roles fit the job.
897
+ Only deletes are confirmed (`--yes` without a terminal); other writes are not - the gateway's
898
+ roles are the protection, so run agents against production with an identity whose roles fit
899
+ the job.
700
900
 
701
901
  ### Backend: gateway or webdesign
702
902
 
@@ -719,8 +919,8 @@ webdesign's `/system/webdesign.pma/vortex/<path>` - with three things in front o
719
919
  lets an id from one application be used under another (`NOT_FOUND`), and runs exactly one
720
920
  `SELECT`/`INSERT`/`UPDATE`/`DELETE` per SQL request (`SQL_NOT_ALLOWED`: DDL, `WITH`, and
721
921
  any `;`).
722
- - **Its own routes:** `whoami` (a bare `vortex`), the server log (`log`), the console (`execute`),
723
- `.pmx` export and import.
922
+ - **Its own routes:** `whoami` (a bare `vortex`), the server and web logs (`log`, `weblog`), the console (`execute`),
923
+ addin statistics (`stats`), `.pmx` export and import, and the server's files (`file`, `Admin`).
724
924
 
725
925
  On a server with a blank `gateway_path`:
726
926
 
@@ -730,8 +930,11 @@ On a server with a blank `gateway_path`:
730
930
  | `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 |
731
931
  | `app export` | webdesign's `ExportPMX` |
732
932
  | `vortex` (no command) | the console `status` command over SOAP (`soap_path`); `--show-permissions` says "no gateway: webdesign direct, no role checks" |
733
- | `log` | a `PMALOG` query through webdesign's SQL route, on the system-database connection owned by the ungrouped `puakma` application (found once per run) |
933
+ | `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 |
734
934
  | `execute` | the console command over SOAP |
935
+ | `weblog` | unavailable: webdesign cannot read the access log |
936
+ | `stats` | unavailable: webdesign has no route to the addin statistics |
937
+ | `file` | unavailable: webdesign cannot read or write files |
735
938
  | `app import` | unavailable (`UNAVAILABLE`) |
736
939
 
737
940
  Without the gateway there are no role checks, no system-database block and no cross-app
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
 
6
6
  [project]
7
7
  name = "vortex_cli"
8
- version = "8.2.0"
8
+ version = "8.3.0"
9
9
  description = "Vortex CLI"
10
10
  requires-python = ">=3.10"
11
11
  readme = { file = "README.md", content-type = "text/markdown" }