qodalis-cli-server-plugin-admin 1.0.0b32__tar.gz → 1.0.0b34__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.
- qodalis_cli_server_plugin_admin-1.0.0b34/PKG-INFO +809 -0
- qodalis_cli_server_plugin_admin-1.0.0b34/README.md +783 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/pyproject.toml +2 -2
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/__init__.py +29 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/cli_admin_builder.py +130 -3
- qodalis_cli_server_plugin_admin-1.0.0b34/qodalis_cli_admin/controllers/updates_controller.py +62 -0
- qodalis_cli_server_plugin_admin-1.0.0b32/qodalis_cli_admin/dashboard/assets/Badge-nmFjKF1h.js → qodalis_cli_server_plugin_admin-1.0.0b34/qodalis_cli_admin/dashboard/assets/Badge-CDTWsmdr.js +1 -1
- qodalis_cli_server_plugin_admin-1.0.0b32/qodalis_cli_admin/dashboard/assets/ButtonGroup-BGrKcSx4.js → qodalis_cli_server_plugin_admin-1.0.0b34/qodalis_cli_admin/dashboard/assets/ButtonGroup-CFjbUq5d.js +1 -1
- qodalis_cli_server_plugin_admin-1.0.0b32/qodalis_cli_admin/dashboard/assets/ChipList-Dbgul4Mj.js → qodalis_cli_server_plugin_admin-1.0.0b34/qodalis_cli_admin/dashboard/assets/ChipList-MZcDa2mS.js +1 -1
- qodalis_cli_server_plugin_admin-1.0.0b32/qodalis_cli_admin/dashboard/assets/CommandsPage-DJ5LFCoc.js → qodalis_cli_server_plugin_admin-1.0.0b34/qodalis_cli_admin/dashboard/assets/CommandsPage-DBivaRDl.js +1 -1
- qodalis_cli_server_plugin_admin-1.0.0b32/qodalis_cli_admin/dashboard/assets/ConfigInput-CZN2vEwy.js → qodalis_cli_server_plugin_admin-1.0.0b34/qodalis_cli_admin/dashboard/assets/ConfigInput-BFtb_9Jg.js +1 -1
- qodalis_cli_server_plugin_admin-1.0.0b32/qodalis_cli_admin/dashboard/assets/ConfigPage-C0Ntt-kp.js → qodalis_cli_server_plugin_admin-1.0.0b34/qodalis_cli_admin/dashboard/assets/ConfigPage-st5Adxrp.js +2 -2
- qodalis_cli_server_plugin_admin-1.0.0b32/qodalis_cli_admin/dashboard/assets/DataTable-GXA3iZq9.js → qodalis_cli_server_plugin_admin-1.0.0b34/qodalis_cli_admin/dashboard/assets/DataTable-xsZdHi0Y.js +1 -1
- qodalis_cli_server_plugin_admin-1.0.0b32/qodalis_cli_admin/dashboard/assets/EventsPage-DzwiKZps.js → qodalis_cli_server_plugin_admin-1.0.0b34/qodalis_cli_admin/dashboard/assets/EventsPage-FYjruTP4.js +2 -2
- qodalis_cli_server_plugin_admin-1.0.0b32/qodalis_cli_admin/dashboard/assets/LogsPage-CuqPb5np.js → qodalis_cli_server_plugin_admin-1.0.0b34/qodalis_cli_admin/dashboard/assets/LogsPage-BC_PDpX4.js +1 -1
- qodalis_cli_server_plugin_admin-1.0.0b34/qodalis_cli_admin/dashboard/assets/NotificationsPage-DZTeF37R.js +1 -0
- qodalis_cli_server_plugin_admin-1.0.0b34/qodalis_cli_admin/dashboard/assets/PluginDetailsPage-qpuSeI7v.js +1 -0
- qodalis_cli_server_plugin_admin-1.0.0b34/qodalis_cli_admin/dashboard/assets/PluginsPage-BfXbeLO5.js +32 -0
- qodalis_cli_server_plugin_admin-1.0.0b32/qodalis_cli_admin/dashboard/assets/TerminalPage-CWJcCMIT.js → qodalis_cli_server_plugin_admin-1.0.0b34/qodalis_cli_admin/dashboard/assets/TerminalPage-yKYcsMn2.js +1 -1
- qodalis_cli_server_plugin_admin-1.0.0b34/qodalis_cli_admin/dashboard/assets/index-BjpQmvia.js +65 -0
- qodalis_cli_server_plugin_admin-1.0.0b32/qodalis_cli_admin/dashboard/assets/index-CY1WPG8S.css → qodalis_cli_server_plugin_admin-1.0.0b34/qodalis_cli_admin/dashboard/assets/index-C_kafYN7.css +1 -1
- qodalis_cli_server_plugin_admin-1.0.0b32/qodalis_cli_admin/dashboard/assets/pluginPath-CKVB4X1p.js → qodalis_cli_server_plugin_admin-1.0.0b34/qodalis_cli_admin/dashboard/assets/pluginPath-BRoAjsx_.js +1 -1
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/dashboard/index.html +2 -2
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/services/dashboard_marketplace.py +23 -5
- qodalis_cli_server_plugin_admin-1.0.0b34/qodalis_cli_admin/services/plugins_folder.py +93 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/services/server_plugin_marketplace.py +126 -14
- qodalis_cli_server_plugin_admin-1.0.0b34/qodalis_cli_admin/services/update_checker.py +541 -0
- qodalis_cli_server_plugin_admin-1.0.0b34/qodalis_cli_admin/services/updates_mcp.py +60 -0
- qodalis_cli_server_plugin_admin-1.0.0b32/PKG-INFO +0 -24
- qodalis_cli_server_plugin_admin-1.0.0b32/qodalis_cli_admin/dashboard/assets/PluginDetailsPage-wDOLJ6Hy.js +0 -1
- qodalis_cli_server_plugin_admin-1.0.0b32/qodalis_cli_admin/dashboard/assets/PluginsPage-BJS2tecd.js +0 -3
- qodalis_cli_server_plugin_admin-1.0.0b32/qodalis_cli_admin/dashboard/assets/index-BquDpLoS.js +0 -65
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/.gitignore +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/auth/__init__.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/auth/auth_controller.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/auth/auth_middleware.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/auth/jwt_service.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/commands/__init__.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/commands/admin_command.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/commands/admin_restart_command.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/commands/admin_server_plugins_command.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/controllers/__init__.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/controllers/config_controller.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/controllers/dashboard_marketplace_controller.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/controllers/logs_controller.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/controllers/plugins_controller.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/controllers/server_marketplace_controller.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/controllers/status_controller.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/controllers/ws_clients_controller.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/dashboard/assets/commandInfo-B_4x--N6.js +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/dashboard/assets/paging-CCKbuXJo.js +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/dashboard/assets/wasm/qodalis_cli_wasm_bg.wasm +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/dashboard/qodalis-icon.svg +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/dashboard_resolver.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/services/__init__.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/services/admin_branding.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/services/admin_config.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/services/admin_config_providers.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/services/admin_theme.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/services/dashboard_plugin_config.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/services/log_ring_buffer.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/services/module_registry.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/services/status_history.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/services/system_memory.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/services/time_range.py +0 -0
- {qodalis_cli_server_plugin_admin-1.0.0b32 → qodalis_cli_server_plugin_admin-1.0.0b34}/qodalis_cli_admin/spa_static_files.py +0 -0
|
@@ -0,0 +1,809 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: qodalis-cli-server-plugin-admin
|
|
3
|
+
Version: 1.0.0b34
|
|
4
|
+
Summary: Admin dashboard plugin for Qodalis CLI servers
|
|
5
|
+
Project-URL: Homepage, https://github.com/qodalis-solutions/cli-server-python
|
|
6
|
+
Project-URL: Repository, https://github.com/qodalis-solutions/cli-server-python
|
|
7
|
+
Project-URL: Issues, https://github.com/qodalis-solutions/cli-server-python/issues
|
|
8
|
+
Author-email: Nicolae Lupei <nicolae.lupei@qodalis.com>
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
Keywords: admin,cli,dashboard,plugin,qodalis
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Requires-Dist: fastapi>=0.100.0
|
|
21
|
+
Requires-Dist: packaging>=22.0
|
|
22
|
+
Requires-Dist: psutil>=5.9.0
|
|
23
|
+
Requires-Dist: pyjwt>=2.0.0
|
|
24
|
+
Requires-Dist: qodalis-cli-server-abstractions>=1.0.0b23
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
# qodalis-cli-server-plugin-admin
|
|
28
|
+
|
|
29
|
+
Admin dashboard plugin for [Qodalis CLI Server (Python)](https://github.com/qodalis-solutions/cli-server-python). Provides a JWT-authenticated REST API for server monitoring, plugin management, configuration, log streaming, and an optional single-page dashboard UI.
|
|
30
|
+
|
|
31
|
+
## Install
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pip install qodalis-cli-server-plugin-admin
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Quick Start
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
from qodalis_cli import create_cli_server
|
|
41
|
+
from qodalis_cli_admin import CliAdminBuilder, AdminBuildDeps
|
|
42
|
+
|
|
43
|
+
result = create_cli_server(configure=lambda builder: builder)
|
|
44
|
+
|
|
45
|
+
admin_plugin = (
|
|
46
|
+
CliAdminBuilder()
|
|
47
|
+
.set_credentials("myuser", "mypassword")
|
|
48
|
+
.set_jwt_secret("my-secret-key")
|
|
49
|
+
.build(deps=AdminBuildDeps(
|
|
50
|
+
registry=result.registry,
|
|
51
|
+
event_socket_manager=result.event_socket_manager,
|
|
52
|
+
builder=result.builder,
|
|
53
|
+
))
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
# Using create_cli_server:
|
|
57
|
+
result.mount_plugin(admin_plugin)
|
|
58
|
+
|
|
59
|
+
# Or on an existing FastAPI app:
|
|
60
|
+
result.app.include_router(admin_plugin.router, prefix=admin_plugin.prefix)
|
|
61
|
+
if admin_plugin.dashboard_app:
|
|
62
|
+
result.app.mount(admin_plugin.dashboard_prefix, admin_plugin.dashboard_app)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Once mounted, every log line the plugin captures is published on the server's event bus as `log:entry` (`timestamp`,
|
|
66
|
+
`level`, `message`, `source`; audience `logs:read`), which the dashboard's Logs page follows live. `AdminBuildDeps`
|
|
67
|
+
takes `event_bus` to name a bus, or `broadcast_fn` (an async function receiving the JSON message) to send the entries
|
|
68
|
+
yourself.
|
|
69
|
+
|
|
70
|
+
## Configuration
|
|
71
|
+
|
|
72
|
+
Credentials can be set via the builder or environment variables:
|
|
73
|
+
|
|
74
|
+
| Environment Variable | Default | Description |
|
|
75
|
+
|---|---|---|
|
|
76
|
+
| `QCLI_ADMIN_USERNAME` | `admin` | Admin login username |
|
|
77
|
+
| `QCLI_ADMIN_PASSWORD` | `admin` | Admin login password |
|
|
78
|
+
| `QCLI_ADMIN_JWT_SECRET` | (auto) | JWT signing secret |
|
|
79
|
+
|
|
80
|
+
## REST API
|
|
81
|
+
|
|
82
|
+
All endpoints are mounted at the plugin's built-in prefix (`/api/v1/qcli`). Except for `/auth/mode` and `/auth/login`, all endpoints require a valid JWT token.
|
|
83
|
+
|
|
84
|
+
| Method | Endpoint | Description |
|
|
85
|
+
|---|---|---|
|
|
86
|
+
| GET | `/auth/mode` | Public. Which sign-in the dashboard shows: `{ "mode": "password" \| "external", "signInUrl": string \| null }` |
|
|
87
|
+
| POST | `/auth/login` | Authenticate and receive a JWT token (501 in external mode) |
|
|
88
|
+
| GET | `/auth/me` | Get current authenticated user info |
|
|
89
|
+
| GET | `/status` | Server status, uptime, process memory (`memoryUsageMb`), the machine's memory (`systemMemoryTotalMb`, `systemMemoryUsedMb`, `memoryLimited`), connected clients, enabled features |
|
|
90
|
+
| GET | `/status/history?minutes=` | Status samples (every 15 s, kept 24 h in memory), oldest first: `memoryMb`, `systemMemoryUsedMb`, `systemMemoryTotalMb`, `cpuPercent`, `activeWsConnections`, `activeShellSessions`; `minutes` defaults to 60, clamped to 1..1440 |
|
|
91
|
+
| GET | `/plugins` | List registered plugin modules |
|
|
92
|
+
| GET | `/plugins/installed` | List the installed server plugin packages (`id`, `name`, `version`, `description`) |
|
|
93
|
+
| GET | `/plugins/{id}` | One plugin module by name (ignoring case); 404 `PLUGIN_NOT_FOUND` |
|
|
94
|
+
| POST | `/plugins/{id}/toggle` | Enable or disable a plugin module |
|
|
95
|
+
| GET | `/config` | The store providers use unless they have their own and the server's config providers the caller may see (`config:read`), each with its `storage` and, when it saves to a store, its `store`: `{"defaultStore": {"kind", "title", "detail", "persistent"}, "providers": [...]}` |
|
|
96
|
+
| GET | `/config/{provider}` | One config provider, with its `store` |
|
|
97
|
+
| PATCH | `/config/{provider}/{section}` | Change settings (`config:write`): `{"changes": {...}, "version": "3"}`; 400 per-key errors, 409 stale version |
|
|
98
|
+
| GET | `/logs` | Retrieve buffered log entries: `?level=` (one or comma-separated `DEBUG`, `INFO`, `WARN`, `ERROR`), `search=` (message or source), `service=`, `from=`/`to=` (ISO 8601, no offset = UTC), `limit=`, `offset=`; answers `entries`, `total`, `limit`, `offset`, `hasMore`, `store` (`memory`), `persistent` (`false`), `services` (`[]`) |
|
|
99
|
+
| GET | `/logs/histogram` | Buffered log entries per level in equal time columns: `?from=&to=&buckets=` (default the last 24 h in 24 columns, `buckets` clamped to 1..200) with the filters of `/logs` |
|
|
100
|
+
| GET | `/ws/clients` | List connected WebSocket clients |
|
|
101
|
+
|
|
102
|
+
`systemMemoryTotalMb` is the RAM the server can use: the container (cgroup) limit when one is set below the installed RAM (`memory.max`, v1 `memory.limit_in_bytes`), then `memoryLimited` is true, otherwise the installed RAM (`psutil.virtual_memory().total`). `systemMemoryUsedMb` is the memory in use: the container's usage when limited (`memory.current`, v1 `memory.usage_in_bytes`), otherwise total minus available (`psutil.virtual_memory().available`, MemAvailable of `/proc/meminfo` on Linux). Each is null when it cannot be read.
|
|
103
|
+
|
|
104
|
+
The status sampler runs with the app's lifespan once the plugin is mounted (`result.mount_plugin(admin)`), first
|
|
105
|
+
sample at start, and is cancelled on shutdown. `cpuPercent` is the process CPU time over the last interval as a
|
|
106
|
+
percentage of one core (`null` for the first sample). Bad `from`/`to`/`buckets`/`level`/`minutes` values answer
|
|
107
|
+
`400 { "error": "..." }`.
|
|
108
|
+
|
|
109
|
+
With the users plugin (`set_users_plugin(...)`), the dashboard signs in through it (sessions, lockout, audit) and
|
|
110
|
+
needs the `admin:access` permission; the static `QCLI_ADMIN_USERNAME`/`QCLI_ADMIN_PASSWORD` are only used without it.
|
|
111
|
+
|
|
112
|
+
### Sign in with the host app's session
|
|
113
|
+
|
|
114
|
+
The full setup (adapter, middleware order, permissions) is in [Use with your app's sign-in](../../README.md#use-with-your-apps-sign-in).
|
|
115
|
+
|
|
116
|
+
When the users plugin delegates authentication to your application (`CliUsersBuilder().set_auth_adapter(...)`), it
|
|
117
|
+
sets the server option `external_authentication` when mounted and the dashboard runs in **external** mode:
|
|
118
|
+
|
|
119
|
+
- `GET /api/v1/qcli/auth/mode` answers `{ "mode": "external", "signInUrl": "<sign_in_url>" }` with
|
|
120
|
+
`Cache-Control: no-store`. It is public, also on protected servers, so the dashboard can call it before anyone signs
|
|
121
|
+
in. Otherwise it answers `"password"`.
|
|
122
|
+
- The dashboard hides its username/password form and shows "Sign in at `<signInUrl>`" with a Retry button (or tells
|
|
123
|
+
users to sign in through the host application when no sign-in URL is set). Any 401 leads to that screen.
|
|
124
|
+
- `POST /api/v1/qcli/auth/login` signs no one in: it answers `501` with `code: "EXTERNAL_AUTH"`, a message pointing
|
|
125
|
+
to the host's sign-in and `signInUrl`. The static admin credentials are never accepted in this mode.
|
|
126
|
+
- The admin routes accept whatever your adapter accepts (for example the bearer token handed over below) and still
|
|
127
|
+
need `admin:access` (`is_admin=True` grants it).
|
|
128
|
+
|
|
129
|
+
```python
|
|
130
|
+
admin_plugin = (
|
|
131
|
+
CliAdminBuilder()
|
|
132
|
+
.set_users_plugin(users_plugin)
|
|
133
|
+
.set_sign_in_url("https://app.example.com/sign-in")
|
|
134
|
+
.build(deps)
|
|
135
|
+
)
|
|
136
|
+
result.mount_plugin(admin_plugin) # reads result.options.external_authentication
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
`set_sign_in_url()` takes an absolute `http`/`https` URL or a root-relative path (`/sign-in`); anything else (for
|
|
140
|
+
example `javascript:` or `//host`) raises `ValueError` in `build()`. The mode is read from the server's options:
|
|
141
|
+
`mount_plugin` hands them to the plugin; when you include the router yourself, pass
|
|
142
|
+
`AdminBuildDeps(server_options=result.options, ...)`.
|
|
143
|
+
|
|
144
|
+
**Coming back.** The dashboard (1.0.0-beta.23 and later) sends users to the sign-in URL with the dashboard page they
|
|
145
|
+
were on (for example a terminal link's approval page): it fills `{returnTo}` in the URL
|
|
146
|
+
(`https://app.example.com/sign-in?next={returnTo}`), or appends a `returnTo=` parameter. After signing the user in,
|
|
147
|
+
the host opens that URL with `#token=<host bearer token>` (see the handoff below).
|
|
148
|
+
|
|
149
|
+
**Handoff.** Send signed-in users to the dashboard with your bearer token in the URL fragment:
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
/qcli/admin/#token=<host bearer token>
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
A fragment is never sent to servers or written to access logs. The dashboard reads it on startup, stores it as its
|
|
156
|
+
admin token, removes it from the address bar (`history.replaceState`) and sends it as `Authorization: Bearer …` on
|
|
157
|
+
every API call, where your external auth adapter validates it like any other request from your app.
|
|
158
|
+
|
|
159
|
+
```python
|
|
160
|
+
# Host app: the adapter accepts the app's own JWT.
|
|
161
|
+
async def host_auth(request):
|
|
162
|
+
claims = await verify_jwt(request.headers.get("authorization")) # your own validation
|
|
163
|
+
if claims is None:
|
|
164
|
+
return None
|
|
165
|
+
return ExternalAuthResult(
|
|
166
|
+
user=User(id=claims["sub"], name=claims["name"], email=claims.get("email", "")),
|
|
167
|
+
is_admin="admin" in claims.get("roles", []),
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
users_plugin = CliUsersBuilder().set_auth_adapter(host_auth).build()
|
|
171
|
+
admin_plugin = CliAdminBuilder().set_users_plugin(users_plugin) \
|
|
172
|
+
.set_sign_in_url("/sign-in?returnUrl=%2Fadmin%2Fconsole").build(deps)
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
```ts
|
|
176
|
+
// Host front end: an "Open console" button for a signed-in admin.
|
|
177
|
+
window.location.href = `/qcli/admin/#token=${encodeURIComponent(accessToken)}`;
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
When the token expires, the next API call answers 401 and the dashboard shows the sign-in screen; after signing in
|
|
181
|
+
again, the host repeats the handoff.
|
|
182
|
+
|
|
183
|
+
## Config providers
|
|
184
|
+
|
|
185
|
+
The `/config` routes serve the server's config providers (`builder.config`; see the
|
|
186
|
+
[server README](https://github.com/qodalis-solutions/cli-server-python#config-providers)). The plugin adds two: `auth`
|
|
187
|
+
(read-only: the dashboard's sign-in mode, the admin username, whether the default credentials or an explicit JWT
|
|
188
|
+
secret are in use, the sign-in URL; never a password or the secret) and `logs` (the log buffer's `capacity`,
|
|
189
|
+
100-100000, and its lowest level `minLevel`, changeable at runtime; kept in the server's default config store, or in
|
|
190
|
+
its own with `CliAdminBuilder().set_config_store(store)`). They are registered with the server when the
|
|
191
|
+
plugin is built (`config_providers` on the result). On a server protected by the users plugin the routes need
|
|
192
|
+
`config:read` (GET) and `config:write` (PATCH); a users session's permissions are checked too, while the static admin
|
|
193
|
+
of password mode may do everything. The former `GET`/`PUT /config` and `AdminConfig.get_config_sections`/
|
|
194
|
+
`update_settings` are gone: the free settings live in the `custom` provider.
|
|
195
|
+
|
|
196
|
+
## Command modules
|
|
197
|
+
|
|
198
|
+
The Plugins page also lists the command modules, each with its commands and a switch that disables them
|
|
199
|
+
(`/api/v1/qcli/plugins`). A module added with `builder.add_module(...)` is listed with its name, version, description
|
|
200
|
+
and `icon` (one emoji or an image URL). Commands registered on their own (`builder.add_processor(...)`) are listed
|
|
201
|
+
under the module their `module` attribute names (ignoring case); without such a module, the group takes its version
|
|
202
|
+
and description from the commands' package (empty for the application's own code). To describe such a group, add a
|
|
203
|
+
module of the same name with no processors of its own:
|
|
204
|
+
|
|
205
|
+
```python
|
|
206
|
+
class ShopModule(CliModule):
|
|
207
|
+
name = "shop"
|
|
208
|
+
version = "1.0.0"
|
|
209
|
+
description = "Shop administration"
|
|
210
|
+
icon = "🛒"
|
|
211
|
+
processors = [] # StatsCommand etc. set module = "shop"
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
builder.add_module(ShopModule()).add_processor(StatsCommand()).add_processor(OrdersCommand())
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## Installed plugins
|
|
218
|
+
|
|
219
|
+
The dashboard's Plugins page lists the server plugins the host installed: the core server, and each plugin package
|
|
220
|
+
mounted with `result.mount_plugin(...)` (users, admin, jobs) or added through the builder (`add_module`,
|
|
221
|
+
`set_file_storage_provider`, `add_filesystem`, `add_data_explorer_provider`), with the distribution's version and
|
|
222
|
+
summary. A plugin of your own lists itself:
|
|
223
|
+
|
|
224
|
+
```python
|
|
225
|
+
builder.add_installed_plugin("acme-cli-billing") # a distribution name
|
|
226
|
+
builder.add_installed_plugin(BillingModule()) # or an object of the package
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
The status reports the `audit` feature when the audit plugin is installed (the dashboard's Audit page; the users plugin
|
|
230
|
+
mounts it), and `jobs`
|
|
231
|
+
when the jobs plugin is.
|
|
232
|
+
|
|
233
|
+
## Dashboard
|
|
234
|
+
|
|
235
|
+
The plugin can serve an optional SPA dashboard. Install the `@qodalis/cli-server-dashboard` npm package and the plugin will auto-detect the built assets, or set a custom path via `set_dashboard_path()`.
|
|
236
|
+
|
|
237
|
+
## Dashboard plugins from the marketplace
|
|
238
|
+
|
|
239
|
+
A *dashboard plugin* is an npm package whose bundle is a dashboard extension (`extension.js`, optional
|
|
240
|
+
`extension.css`, built with `@qodalis/cli-server-dashboard-kit`'s `defineExtension`), listed in the
|
|
241
|
+
[plugin marketplace](https://plugins.qodalis.com) with `kind: "dashboard"`. The admin plugin lists them, installs,
|
|
242
|
+
updates and removes them at runtime, and serves them from the server's own origin. A plugin runs inside the dashboard
|
|
243
|
+
with the signed-in user's rights, so by default only verified publishers' plugins can be installed. The marketplace is
|
|
244
|
+
on by default; the same contract and JSON as the Node and .NET servers.
|
|
245
|
+
|
|
246
|
+
```python
|
|
247
|
+
from qodalis_cli_admin import CliAdminBuilder, DashboardMarketplaceOptions
|
|
248
|
+
|
|
249
|
+
admin = (
|
|
250
|
+
CliAdminBuilder()
|
|
251
|
+
.set_users_plugin(users_plugin)
|
|
252
|
+
.set_marketplace(DashboardMarketplaceOptions(
|
|
253
|
+
url="https://plugins.qodalis.com", # default
|
|
254
|
+
install="verified", # default; "listed": any listed version; "off": browse only
|
|
255
|
+
dir="./qcli-data/dashboard-plugins", # default: <data_dir>/dashboard-plugins
|
|
256
|
+
))
|
|
257
|
+
.build(AdminBuildDeps(registry=..., event_socket_manager=..., builder=...))
|
|
258
|
+
)
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
| Option | Default | Description |
|
|
262
|
+
|---|---|---|
|
|
263
|
+
| `url` | `https://plugins.qodalis.com` | The marketplace (its public API at `/api/v1/qcli/marketplace`) |
|
|
264
|
+
| `install` | `verified` | `verified`: listed versions of verified publishers only; `listed`: any listed version; `off`: browse only |
|
|
265
|
+
| `dir` | `<data_dir>/dashboard-plugins` | Where installed plugins are kept: the server's `data_dir` (`CliServerOptions(data_dir=...)`, else `QCLI_DATA_DIR`, else `./qcli-data`), so one option moves every folder; an explicit `dir` wins |
|
|
266
|
+
| `fetch` | the standard library (`urllib`, in a thread) | The HTTP client for the marketplace and the CDNs: `async fetch(url, headers, timeout) -> MarketplaceResponse(status, body, headers)` (tests pass a fake) |
|
|
267
|
+
| `cdns` | jsDelivr, unpkg | Where bundles are downloaded from, in order |
|
|
268
|
+
| `timeout` | `15` | Timeout of each request, in seconds |
|
|
269
|
+
|
|
270
|
+
`set_marketplace` also takes a dict of these fields. `set_marketplace(False)` serves none of the routes below, adds no
|
|
271
|
+
`admin dashboard` command and loads no installed plugin. An invalid `url` or `install` raises `ValueError` in `build`.
|
|
272
|
+
|
|
273
|
+
The folders must be writable. When one cannot be created or written (a container running as a non-root user with the
|
|
274
|
+
default `./qcli-data` in a read-only app folder), the plugin logs one WARNING at startup naming it, and installing,
|
|
275
|
+
updating or removing a dashboard or server plugin answers 500 with the folder and what to set:
|
|
276
|
+
`{ "error": "cannot write the plugins folder /app/qcli-data/dashboard-plugins: permission denied (EACCES). Set data_dir (or QCLI_DATA_DIR) to a writable folder" }`
|
|
277
|
+
(with an explicit `dir`: `Set the marketplace's dir to a writable folder`). `admin dashboard install` and `admin
|
|
278
|
+
plugins install` print it as `Error: ...`. Only the folder and the error code are named.
|
|
279
|
+
|
|
280
|
+
**Installing** reads the plugin (`GET /plugins/{name}` of the marketplace) and takes the newest listed version this
|
|
281
|
+
dashboard runs (`dashboardApi` 1 or less) unless one is given, checks the trust policy, downloads each file of the
|
|
282
|
+
version record (`files: [{ path, integrity, size }]`, read from `/plugins/{name}/versions/{version}` when the details
|
|
283
|
+
leave them out) from jsDelivr, then unpkg (5 MB at most each), and checks its bytes against the marketplace's `sha384-`
|
|
284
|
+
integrity before anything is written: a mismatch on every CDN is a 502 and stores nothing. The files are stored as
|
|
285
|
+
`<dir>/<name>/<version>/extension.js|css` (a scoped name `@scope/name` as the directory `@scope+name`; names and
|
|
286
|
+
versions are validated, so nothing leaves `dir`) and listed in `<dir>/installed.json`, written atomically (a temporary
|
|
287
|
+
file renamed over it). Changes run one at a time.
|
|
288
|
+
|
|
289
|
+
```json
|
|
290
|
+
{
|
|
291
|
+
"plugins": [
|
|
292
|
+
{
|
|
293
|
+
"name": "@qodalis/cli-dashboard-module-jobs",
|
|
294
|
+
"version": "1.1.0",
|
|
295
|
+
"id": "jobs",
|
|
296
|
+
"title": "Jobs",
|
|
297
|
+
"icon": "⏱️",
|
|
298
|
+
"files": [
|
|
299
|
+
{ "file": "extension.js", "path": "dist/extension.js", "integrity": "sha384-…", "size": 48211 },
|
|
300
|
+
{ "file": "extension.css", "path": "dist/extension.css", "integrity": "sha384-…", "size": 5120 }
|
|
301
|
+
],
|
|
302
|
+
"installedAt": "2026-11-25T10:04:05.123Z",
|
|
303
|
+
"installedBy": "admin",
|
|
304
|
+
"config": { "entries": [{ "key": "refreshSeconds", "type": "number", "default": 30, "validation": { "min": 5, "max": 3600 } }] }
|
|
305
|
+
}
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
`config` (the installed version's settings, see [Settings of dashboard plugins](#settings-of-dashboard-plugins)) is
|
|
311
|
+
absent for a plugin without settings.
|
|
312
|
+
|
|
313
|
+
The plugin is then registered as a dashboard extension at once (no restart): its page id is the package's suffix for
|
|
314
|
+
`@qodalis/cli-dashboard-module-<id>`, else the extension's own id (`extension.id` of the version record, then of the
|
|
315
|
+
plugin), else the package name without its scope and `cli-dashboard-` prefix. An id another extension already has is a
|
|
316
|
+
409. Its files are served at `/qcli/modules/<id>/extension.js|css` (no sign-in, `Cache-Control: no-cache` with an ETag,
|
|
317
|
+
the entry carrying `?v=<hash>`; the plugin's `asset_routes`, mounted by `mount_plugin`), and
|
|
318
|
+
`GET /dashboard/extensions` lists it with `source: "marketplace"`. An update keeps the page id and deletes the
|
|
319
|
+
previous version's files (updating to the installed version does nothing); a removal unregisters the page and deletes
|
|
320
|
+
the files. `installedBy` is the signed-in user, `anonymous` for a command on a server without sign-in.
|
|
321
|
+
|
|
322
|
+
At startup the plugin registers what `installed.json` lists, without the marketplace; a plugin whose files are missing
|
|
323
|
+
or no longer match their integrity, or whose id another extension took, is skipped with a warning. Plugins mounted
|
|
324
|
+
after the admin plugin cannot take a marketplace page's id, so mount the admin plugin after the plugins with pages of
|
|
325
|
+
their own.
|
|
326
|
+
|
|
327
|
+
Every change is audited (`dashboard.plugin.install`, `dashboard.plugin.update`, `dashboard.plugin.remove`: target the
|
|
328
|
+
package, `properties: { name, version, id, previousVersion?, config?, configDropped? }`, the keys of the settings
|
|
329
|
+
given and dropped) in the server's audit log (the users plugin mounts it;
|
|
330
|
+
or the store set with `builder.set_config_audit_store`) and published as `dashboard:extensions-changed`
|
|
331
|
+
(`{ action, name, version, id, previousVersion? }`, audience `admin:access`), so open dashboards reload their pages.
|
|
332
|
+
|
|
333
|
+
### Settings of dashboard plugins
|
|
334
|
+
|
|
335
|
+
A dashboard plugin may declare settings with defaults, in the config providers' entry model: `qodalis.config.entries`
|
|
336
|
+
of its package.json, published by the marketplace as `config: { entries }` of the version record:
|
|
337
|
+
|
|
338
|
+
```json
|
|
339
|
+
{
|
|
340
|
+
"entries": [
|
|
341
|
+
{ "key": "refreshSeconds", "label": "Refresh every", "type": "number", "default": 30, "validation": { "min": 5, "max": 3600 } },
|
|
342
|
+
{ "key": "columns", "type": "string[]", "default": ["name", "status"] },
|
|
343
|
+
{ "key": "mode", "type": "enum", "default": "compact", "validation": { "options": ["compact", "full"] } }
|
|
344
|
+
]
|
|
345
|
+
}
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
Types `string`, `number`, `boolean`, `string[]`, `enum`, `json`, `duration` and `url`, **never `secret`** (a dashboard
|
|
349
|
+
plugin runs in the browser: it cannot keep one). Keys match `^[a-zA-Z][a-zA-Z0-9_.-]{0,63}$`, at most 50 entries, an
|
|
350
|
+
`enum` has `validation.options`, every default passes its own validation, at most 32 KB of JSON. The marketplace
|
|
351
|
+
rejects versions breaking these rules; the server checks them again (`parse_dashboard_plugin_config`), and a version
|
|
352
|
+
whose settings fail installs **without settings**, the response carrying
|
|
353
|
+
`"warnings": ["the settings of <name>@<version> are invalid and were ignored: <reason>"]`. Settings missing from the
|
|
354
|
+
details' versions are read from the version record.
|
|
355
|
+
|
|
356
|
+
The admin plugin registers the config provider **`dashboard-plugins`** ("Dashboard plugins", writable,
|
|
357
|
+
`DashboardPluginsConfigProvider`) with **one section per installed plugin with settings**: the section id is the page
|
|
358
|
+
id, its title the plugin's title, its entries the installed version's with their defaults. A plugin without settings
|
|
359
|
+
gets no section. Its store is resolved like every provider's: the host's store for `dashboard-plugins`
|
|
360
|
+
(`CliServerOptions(config=CliServerConfigOptions(stores={"dashboard-plugins": store}))`,
|
|
361
|
+
`builder.set_config_store(store, "dashboard-plugins")`), else the default store, else memory.
|
|
362
|
+
`GET /api/v1/qcli/config/dashboard-plugins`:
|
|
363
|
+
|
|
364
|
+
```json
|
|
365
|
+
{
|
|
366
|
+
"id": "dashboard-plugins",
|
|
367
|
+
"title": "Dashboard plugins",
|
|
368
|
+
"description": "Settings of the dashboard plugins installed from the marketplace",
|
|
369
|
+
"order": 85,
|
|
370
|
+
"writable": true,
|
|
371
|
+
"storage": { "kind": "store", "description": "Changes are saved to its config store", "sources": [] },
|
|
372
|
+
"store": { "kind": "file", "title": "JSON file", "detail": "qcli-config.json", "persistent": true },
|
|
373
|
+
"sections": [
|
|
374
|
+
{
|
|
375
|
+
"id": "tickets",
|
|
376
|
+
"title": "Tickets",
|
|
377
|
+
"description": "@acme/cli-dashboard-tickets@1.0.0",
|
|
378
|
+
"mutable": true,
|
|
379
|
+
"version": "1",
|
|
380
|
+
"allowCustomKeys": false,
|
|
381
|
+
"entries": [
|
|
382
|
+
{ "key": "refreshSeconds", "label": "Refresh every", "description": "", "type": "number", "value": 60, "default": 30, "source": "file", "mutable": true, "requiresRestart": false, "sensitive": false, "validation": { "min": 5, "max": 3600 } },
|
|
383
|
+
{ "key": "columns", "label": "columns", "description": "", "type": "string[]", "value": ["name", "status"], "default": ["name", "status"], "source": "default", "mutable": true, "requiresRestart": false, "sensitive": false },
|
|
384
|
+
{ "key": "mode", "label": "mode", "description": "", "type": "enum", "value": "compact", "default": "compact", "source": "default", "mutable": true, "requiresRestart": false, "sensitive": false, "validation": { "options": ["compact", "full"] } }
|
|
385
|
+
]
|
|
386
|
+
}
|
|
387
|
+
]
|
|
388
|
+
}
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
Settings are changed like any other: `PATCH /api/v1/qcli/config/dashboard-plugins/<id>` (`config:write`), `config set
|
|
392
|
+
dashboard-plugins.<id>.<key> <value>`, MCP `config_set`; the same validation (400 with per-key errors), versions (409),
|
|
393
|
+
audit (`config.update`) and `config:changed` event.
|
|
394
|
+
|
|
395
|
+
- **Install**: `POST /installed` takes `config: { key: value }`, checked against the version's settings **before
|
|
396
|
+
anything is downloaded or stored** (400 `{ "error": "validation failed", "errors": { "refreshSeconds": "must be at
|
|
397
|
+
least 5", "nope": "unknown setting" } }`; `config must be an object` for anything else) and stored with the install
|
|
398
|
+
(`null` keeps the default). Values left in the store for that page id by an earlier install are cleared.
|
|
399
|
+
Install-time values need `dashboard:install`, not `config:write`.
|
|
400
|
+
- **Update**: `PUT /installed/{name}` takes `config` too, checked against the new version's settings. Stored values
|
|
401
|
+
whose key the new version still has and whose value it still accepts are kept, the others deleted and listed in the
|
|
402
|
+
response as `configDropped` (`[]` when none); a value given for a key replaces it, `null` resets it. The same version
|
|
403
|
+
with `config` applies the values. A version without settings removes the section.
|
|
404
|
+
- **Remove**: deletes the section and every value stored for it.
|
|
405
|
+
- **Restart**: the sections are re-created from `installed.json` (it keeps each installed version's `config`), so
|
|
406
|
+
they come back offline with their stored values.
|
|
407
|
+
- Changing stored values publishes `config:changed` (`{ provider: "dashboard-plugins", section, keys, version,
|
|
408
|
+
requiresRestart: false, store, user }`, audience `config:read`).
|
|
409
|
+
|
|
410
|
+
The page reads its values from `GET /installed/{name}/config` (`admin:access`): the stored values over the defaults
|
|
411
|
+
and the section's version, `{ "values": {}, "version": null }` for a plugin without settings, 404 when not installed:
|
|
412
|
+
|
|
413
|
+
```json
|
|
414
|
+
{ "values": { "refreshSeconds": 60, "columns": ["name", "status"], "mode": "compact" }, "version": "1" }
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
### Marketplace API
|
|
418
|
+
|
|
419
|
+
Mounted at `/api/v1/qcli/dashboard/marketplace`. Reading needs `admin:access`; `POST`, `PUT` and `DELETE` need
|
|
420
|
+
`dashboard:install` (core catalog, group Server; the static admin of password sign-in holds every permission). Errors
|
|
421
|
+
are `{ "error": "..." }` (with `errors`, per key, when settings are refused).
|
|
422
|
+
|
|
423
|
+
| Method | Endpoint | Description |
|
|
424
|
+
|---|---|---|
|
|
425
|
+
| GET | `/` | `{ "marketplaceUrl": "https://plugins.qodalis.com", "install": "verified", "dashboardApi": 1 }` |
|
|
426
|
+
| GET | `/plugins?query=&page=&pageSize=` | The marketplace's list asked with `kind=dashboard&dashboardApi=1` (`{ items, total, page, pageSize }`); items of another kind are dropped (an older marketplace ignores `kind`; `total` is then the number of dashboard items), each item annotated (below); 502 `{ "error": "marketplace unreachable" }` |
|
|
427
|
+
| GET | `/plugins/{name}` | One plugin with its `versions`, annotated; each version also `allowed` and `blockedReason`; 404 when not listed |
|
|
428
|
+
| GET | `/installed` | The installed plugins (below); `updateAvailable` when the marketplace answers |
|
|
429
|
+
| GET | `/installed/{name}/config` | `{ values, version }`: the values of its settings (stored over defaults) and the section's version; `{ values: {}, version: null }` without settings |
|
|
430
|
+
| POST | `/installed` | `{ name, version?, config? }`: 201 with the installed plugin (`warnings` when its settings were ignored); 400 invalid name or version, `needs dashboard API 2`, `validation failed` with `errors`; 403 `publisher not verified`, `install disabled`; 404 unknown plugin or version; 409 already installed, id taken; 502 `marketplace unreachable`, `integrity mismatch: <path>`, `download failed: <path>` |
|
|
431
|
+
| PUT | `/installed/{name}` | `{ version?, config? }`: updates (default: the newest fitting version), same checks; the plugin with `configDropped`; 404 when not installed |
|
|
432
|
+
| DELETE | `/installed/{name}` | Removes the plugin and its settings; 404 when not installed |
|
|
433
|
+
|
|
434
|
+
Scoped names go in the path raw (`/installed/@acme/tickets`) or encoded (`/installed/%40acme%2Ftickets`).
|
|
435
|
+
|
|
436
|
+
A `GET /plugins` item is the marketplace's item plus:
|
|
437
|
+
|
|
438
|
+
```json
|
|
439
|
+
{
|
|
440
|
+
"name": "@qodalis/cli-dashboard-module-jobs",
|
|
441
|
+
"kind": "dashboard",
|
|
442
|
+
"publisher": { "name": "@qodalis", "verified": true },
|
|
443
|
+
"version": "1.1.0",
|
|
444
|
+
"installed": { "version": "1.0.0" },
|
|
445
|
+
"updateAvailable": true,
|
|
446
|
+
"allowed": true,
|
|
447
|
+
"requires": { "serverPackage": "qodalis-cli-server-plugin-jobs", "installed": true }
|
|
448
|
+
}
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
`installed` is null when not installed; `blockedReason` (only when `allowed` is false) is `install disabled`,
|
|
452
|
+
`unverified publisher` or `needs dashboard API <n>` (a version of the details may also be `version flagged`);
|
|
453
|
+
`requires` is null when the plugin names no Python server package (`serverPackages.python`, or the `pypi` entry of
|
|
454
|
+
the list form `[{ "ecosystem": "pypi", "name": ... }]`), else whether the server has it (`GET /plugins/installed`).
|
|
455
|
+
|
|
456
|
+
`GET /installed`:
|
|
457
|
+
|
|
458
|
+
```json
|
|
459
|
+
[
|
|
460
|
+
{
|
|
461
|
+
"name": "@qodalis/cli-dashboard-module-jobs",
|
|
462
|
+
"version": "1.1.0",
|
|
463
|
+
"title": "Jobs",
|
|
464
|
+
"icon": "⏱️",
|
|
465
|
+
"id": "jobs",
|
|
466
|
+
"installedAt": "2026-11-25T10:04:05.123Z",
|
|
467
|
+
"installedBy": "admin",
|
|
468
|
+
"hasConfig": false,
|
|
469
|
+
"updateAvailable": false
|
|
470
|
+
}
|
|
471
|
+
]
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
`hasConfig`: the plugin has settings (the section `dashboard-plugins.<id>`).
|
|
475
|
+
|
|
476
|
+
## Server plugins from the marketplace
|
|
477
|
+
|
|
478
|
+
Server plugins (`kind: "server"` in the [plugin marketplace](https://plugins.qodalis.com)) have a package per server
|
|
479
|
+
platform; this server installs the **Python** one (`platforms.python`) at runtime, into
|
|
480
|
+
`<data dir>/server-plugins`, and loads it at the next start (see the server's README,
|
|
481
|
+
[Server plugins installed from code or the dashboard](../../README.md#server-plugins-installed-from-code-or-the-dashboard)).
|
|
482
|
+
The same `set_marketplace` options as dashboard plugins, plus:
|
|
483
|
+
|
|
484
|
+
```python
|
|
485
|
+
CliAdminBuilder().set_marketplace(DashboardMarketplaceOptions(
|
|
486
|
+
install="verified", # verified publishers only (default), "listed", or "off"
|
|
487
|
+
pypi_url="https://pypi.org", # the package index (JSON API /pypi/<name>/<version>/json)
|
|
488
|
+
trusted_dependencies=["httpx", "acme-*"], # dependencies a plugin may bring when the marketplace pins none
|
|
489
|
+
pip=None, # runs pip (default: sys.executable -m pip; tests pass a fake)
|
|
490
|
+
))
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
An install (`POST /installed` or `admin plugins install <name>[@version]`), refused before anything is stored when a
|
|
494
|
+
check fails:
|
|
495
|
+
|
|
496
|
+
1. The plugin must be a server plugin with a Python package, allowed by the trust policy, installable at runtime
|
|
497
|
+
(`autoInstall`), its version's server range satisfied (`serverVersion` is sent to the marketplace), and not set up
|
|
498
|
+
by the host (409 `already installed by the host`).
|
|
499
|
+
2. The wheel is one the marketplace lists for the version (`files`: the exact filename, a pure-Python wheel first, else
|
|
500
|
+
the most specific one for this Python; an older marketplace without `files`: the PyPI wheel of its `integrity`). Its
|
|
501
|
+
sha256 must match the marketplace's and PyPI's (502 `integrity mismatch`), and a version the marketplace lists no
|
|
502
|
+
wheel of for this Python is refused (502): PyPI's hash alone is never enough.
|
|
503
|
+
3. The wheel must be that package and version, declare a `qodalis_cli.plugins` entry point and accept this server's
|
|
504
|
+
version in its `Requires-Dist` on `qodalis-cli-server` / `qodalis-cli-server-abstractions` (400 otherwise).
|
|
505
|
+
4. Its **dependencies**: the server's own packages and those the server's environment satisfies are never installed
|
|
506
|
+
(another version of one is refused, 400 `incompatible dependency`). When the version record pins them
|
|
507
|
+
(`dependencies: [{ id, version, integrity, range }]`, sha256), pip installs exactly those with
|
|
508
|
+
`--require-hashes --no-deps` from a generated requirements file; a requirement without a pin is refused. Without
|
|
509
|
+
pins the server resolves the whole tree itself from PyPI (the newest version with a wheel for this Python, each
|
|
510
|
+
package's own `Requires-Dist`, extras and markers applied) and every package of it must be one
|
|
511
|
+
`trusted_dependencies` allows (names, or prefixes `acme-*`), else 400 `untrusted dependency: <name> (needed by
|
|
512
|
+
…)`; pip then installs exactly that tree with `--require-hashes --no-deps` (PyPI's sha256 of its wheels), so it
|
|
513
|
+
brings nothing unchecked. A conflict is refused (400 `conflicting dependency`), and so is any requirement with a
|
|
514
|
+
URL (`name @ https://…`, 400 `direct-URL dependency refused`), pinned or trusted. Only wheels (`--only-binary
|
|
515
|
+
:all:`).
|
|
516
|
+
5. `pip install --target <staging> --no-deps <wheel>` (and the dependencies) runs in a staging directory; anything pip
|
|
517
|
+
brought that the server's environment has is dropped, the rest moved into `<data dir>/server-plugins` (the wheel
|
|
518
|
+
kept in `wheels/`).
|
|
519
|
+
|
|
520
|
+
A package the server's environment already has (the filesystem plugin, which the server depends on) is **enabled**
|
|
521
|
+
without a download: recorded with `"bundled": true` and loaded from the environment; it is updated with the server.
|
|
522
|
+
|
|
523
|
+
Every change is recorded in `installed.json`, marks a restart as required (`plugin:<name>`, cleared when the list is
|
|
524
|
+
back to what runs: [Restart](../../README.md#restart)), is audited as `server.plugin.install|update|remove`
|
|
525
|
+
(`{ name, package, version, previousVersion? }`) and published as `server:plugins-changed` (audience `admin:access`).
|
|
526
|
+
A removal deletes the files listed in the package's `RECORD` (its dependencies stay); the plugin runs until a restart.
|
|
527
|
+
|
|
528
|
+
`installed.json`:
|
|
529
|
+
|
|
530
|
+
```json
|
|
531
|
+
{ "plugins": [{
|
|
532
|
+
"name": "weather", "package": "qodalis-cli-server-plugin-weather", "version": "1.0.0b31",
|
|
533
|
+
"integrity": "sha256-…", "file": "qodalis_cli_server_plugin_weather-1.0.0b31-py3-none-any.whl",
|
|
534
|
+
"title": "Weather", "icon": "🌤️", "description": "…", "installedAt": "2026-11-26T10:04:05.123Z", "installedBy": "root",
|
|
535
|
+
"settings": "weather", "status": "needs-configuration", "missing": ["settings.defaultLocation"], "error": "…"
|
|
536
|
+
}] }
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
### Server marketplace API
|
|
540
|
+
|
|
541
|
+
Mounted at `/api/v1/qcli/server/marketplace`. Reading needs `admin:access`; changes need **`plugins:install`** (core
|
|
542
|
+
catalog, group Server). Errors are `{ "error": "..." }`.
|
|
543
|
+
|
|
544
|
+
| Method | Endpoint | Description |
|
|
545
|
+
|---|---|---|
|
|
546
|
+
| GET | `/` | `{ marketplaceUrl, install, platform: "python", serverVersion, enabled }` |
|
|
547
|
+
| GET | `/plugins?query=&page=&pageSize=&platform=` | The marketplace's server plugins: `platform` `this` (default: asked with `kind=server&platform=python&serverVersion=`), `all` (`kind=server`, every server plugin), `node`, `python` or `dotnet` (passed on as `platform=`), 400 for anything else; a plugin without a Python package is listed with `platform: null`, `allowed: false`, `blockedReason: "not available for python"`. Each with `platform` (`{ package, latest, installed, compatible, reason? }`), `otherPlatforms`, `autoInstall`, `needsConfiguration`, `updateAvailable`, `allowed`, `blockedReason` |
|
|
548
|
+
| GET | `/plugins/{name}` | One plugin with its platforms and versions (Python versions with `allowed` and `blockedReason`) |
|
|
549
|
+
| GET | `/installed` | The installed plugins: `status` `loaded`, `pending` (runs after a restart), `needs-configuration` (`missing`), `failed` (`error`), `skipped` or `removed` (still running), `loadedVersion` (the version this process runs, also while it waits for its settings), `settings` (its settings provider, `config get <id>`, once it registered one), `updateAvailable` |
|
|
550
|
+
| POST | `/installed` | `{ name, version? }`: 202 with the plugin, `restartRequired` and `needsConfiguration` (its settings to fill in after the restart) |
|
|
551
|
+
| PUT | `/installed/{name}` | `{ version? }`: 202 with `previousVersion` (200 `changed: false` when it already is that version) |
|
|
552
|
+
| DELETE | `/installed/{name}` | 202 with the removed plugin |
|
|
553
|
+
|
|
554
|
+
## Updates
|
|
555
|
+
|
|
556
|
+
With the marketplace on, the admin plugin checks for updates every 6 hours (a job `updates:check` of the jobs plugin
|
|
557
|
+
when one is mounted, else a task; the first check 60 s after the app started, or once the last result is 6 hours old):
|
|
558
|
+
dashboard and server plugins installed from the marketplace with a newer version (updated from the dashboard),
|
|
559
|
+
plugins the host adds in code whose package has a newer version (with the install command per platform), and a newer
|
|
560
|
+
`qodalis-cli-server` on PyPI. Each update is a notification (`update:*`, permission `updates:read`), resolved once it
|
|
561
|
+
no longer applies or right after the plugin is updated or removed. The last result is kept in
|
|
562
|
+
`<data_dir>/updates.json`; a category that does not answer keeps its last items and says so in `error`.
|
|
563
|
+
|
|
564
|
+
```python
|
|
565
|
+
CliAdminBuilder().set_update_checks({"interval": 3 * 3600, "initial_delay": 120}) # seconds
|
|
566
|
+
CliAdminBuilder().set_update_checks(False) # no periodic checks; Check now still works
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
| Route | Answer |
|
|
570
|
+
|---|---|
|
|
571
|
+
| `GET /api/v1/qcli/updates` | The last result: `{ checkedAt, checking, error?, server, dashboardPlugins, serverPlugins, codePlugins, count }` |
|
|
572
|
+
| `POST /api/v1/qcli/updates/check` | Checks now (a check already running is joined) and answers the new result; 502 `{ error }` when the check fails |
|
|
573
|
+
|
|
574
|
+
Both need the admin sign-in and, on a protected server, `updates:read` or `plugins:install` (403
|
|
575
|
+
`forbidden: missing permission updates:read`). The MCP tool `updates_list` (`{ check? }`) answers the same.
|
|
576
|
+
|
|
577
|
+
## Color scheme
|
|
578
|
+
|
|
579
|
+
Match the dashboard to your own design with `set_theme()`:
|
|
580
|
+
|
|
581
|
+
```python
|
|
582
|
+
admin_plugin = (
|
|
583
|
+
CliAdminBuilder()
|
|
584
|
+
.set_credentials("admin", "my-secret-password")
|
|
585
|
+
.set_theme({
|
|
586
|
+
"mode": "system",
|
|
587
|
+
"light": {
|
|
588
|
+
"primary": "#2a6bba", "primaryHover": "#1f5596", "accent": "#2a6bba",
|
|
589
|
+
"background": "#f1f6fa", "backgroundAccent": "#f1f6fa", "surface": "#ffffff",
|
|
590
|
+
"border": "#d9e3ec", "heading": "#142231", "text": "#142231", "muted": "#5d6f82",
|
|
591
|
+
},
|
|
592
|
+
"dark": {
|
|
593
|
+
"primary": "#4f9be0", "primaryHover": "#3f8ad3", "onPrimary": "#0d1823", "accent": "#4f9be0",
|
|
594
|
+
"background": "#0d1823", "backgroundAccent": "#0d1823", "surface": "#13212f", "popover": "#13212f",
|
|
595
|
+
"border": "#22364a", "text": "#e6eef6", "muted": "#93a6b9",
|
|
596
|
+
},
|
|
597
|
+
})
|
|
598
|
+
.build(deps)
|
|
599
|
+
)
|
|
600
|
+
```
|
|
601
|
+
|
|
602
|
+
Token keys are camelCase as on the wire, or snake_case (`primary_hover`). `set_theme()` raises `ValueError` on an
|
|
603
|
+
invalid theme; `validate_admin_theme()` and `ADMIN_THEME_TOKENS` are exported.
|
|
604
|
+
|
|
605
|
+
`mode` is `dark` (default), `light`, or `system` to follow the browser's `prefers-color-scheme`. Each scheme takes any
|
|
606
|
+
subset of the tokens below; the ones you leave out keep their defaults.
|
|
607
|
+
|
|
608
|
+
Values must be plain CSS colors: hex (`#rgb`, `#rgba`, `#rrggbb`, `#rrggbbaa`), a color function with numeric arguments
|
|
609
|
+
(`rgb()`, `rgba()`, `hsl()`, `hsla()`, `hwb()`, `lab()`, `lch()`, `oklab()`, `oklch()`) or a named color. Anything else
|
|
610
|
+
(an unknown mode or token, `var()`, `url()`, `;` ...) is rejected at startup with an error naming the token, so a theme
|
|
611
|
+
cannot inject CSS.
|
|
612
|
+
|
|
613
|
+
The plugin serves the validated scheme at `GET /qcli/admin/theme.json` (public, like the dashboard files, since the
|
|
614
|
+
sign-in page uses it), e.g. `{"mode":"system","dark":{"primary":"#4f9be0"},"light":{"primary":"#2a6bba"}}`. The
|
|
615
|
+
dashboard applies it before its first render.
|
|
616
|
+
|
|
617
|
+
The defaults match the Qodalis CLI panel: its grays, indigo accent with the violet glow, and status colors in dark; the same palette for light backgrounds in light.
|
|
618
|
+
|
|
619
|
+
| Token | CSS variable | Used for | Dark default | Light default |
|
|
620
|
+
| --- | --- | --- | --- | --- |
|
|
621
|
+
| `primary` | `--qcli-primary` | Primary buttons, active navigation, toggles, focus rings | `#818cf8` | `#4f46e5` |
|
|
622
|
+
| `primaryHover` | `--qcli-primary-hover` | Primary buttons on hover | `#a5b4fc` | `#4338ca` |
|
|
623
|
+
| `onPrimary` | `--qcli-on-primary` | Text and icons on `primary` | `#111827` | `#ffffff` |
|
|
624
|
+
| `accent` | `--qcli-accent` | Highlighted text: links, command names, active items | `#a78bfa` | `#7c3aed` |
|
|
625
|
+
| `background` | `--qcli-background` | Page background | `#111827` | `#f9fafb` |
|
|
626
|
+
| `backgroundAccent` | `--qcli-background-accent` | Start of the page background gradient (set it to `background` for a flat page) | `#1f2937` | `#eef2ff` |
|
|
627
|
+
| `sidebar` | `--qcli-sidebar` | Sidebar background | `#1f2937` | `#ffffff` |
|
|
628
|
+
| `surface` | `--qcli-surface` | Cards, panels and tables | `rgba(255, 255, 255, 0.04)` | `#ffffff` |
|
|
629
|
+
| `popover` | `--qcli-popover` | Dialogs and dropdown menus (opaque) | `#1f2937` | `#ffffff` |
|
|
630
|
+
| `control` | `--qcli-control` | Inputs, secondary buttons, chips | `rgba(255, 255, 255, 0.06)` | `rgba(17, 24, 39, 0.05)` |
|
|
631
|
+
| `controlHover` | `--qcli-control-hover` | Inputs and secondary buttons on hover | `rgba(255, 255, 255, 0.1)` | `rgba(17, 24, 39, 0.1)` |
|
|
632
|
+
| `border` | `--qcli-border` | Borders and dividers | `#374151` | `#e5e7eb` |
|
|
633
|
+
| `overlay` | `--qcli-overlay` | Backdrop behind dialogs | `rgba(0, 0, 0, 0.6)` | `rgba(17, 24, 39, 0.45)` |
|
|
634
|
+
| `heading` | `--qcli-heading` | Headings and values | `#ffffff` | `#111827` |
|
|
635
|
+
| `text` | `--qcli-text` | Body text | `rgba(255, 255, 255, 0.87)` | `#1f2937` |
|
|
636
|
+
| `muted` | `--qcli-muted` | Secondary text and labels | `rgba(255, 255, 255, 0.6)` | `#4b5563` |
|
|
637
|
+
| `subtle` | `--qcli-subtle` | Hints, placeholders, timestamps | `rgba(255, 255, 255, 0.4)` | `#6b7280` |
|
|
638
|
+
| `success` | `--qcli-success` | Success states | `#3fb950` | `#1a7f37` |
|
|
639
|
+
| `warning` | `--qcli-warning` | Warning states | `#f0883e` | `#bc4c00` |
|
|
640
|
+
| `error` | `--qcli-error` | Errors and destructive actions | `#f85149` | `#cf222e` |
|
|
641
|
+
| `info` | `--qcli-info` | Informational states | `#58a6ff` | `#0969da` |
|
|
642
|
+
|
|
643
|
+
## Name and icon
|
|
644
|
+
|
|
645
|
+
By default the dashboard is "Qodalis Cli Admin" with the Qodalis Solutions logo. An application that ships it
|
|
646
|
+
under its own name sets `set_branding()`:
|
|
647
|
+
|
|
648
|
+
```python
|
|
649
|
+
CliAdminBuilder().set_branding({
|
|
650
|
+
"name": "RateBell", # browser tab, sidebar, sign-in page
|
|
651
|
+
"icon_url": "/favicon.svg", # http(s) URL, root-relative path or base64 data:image URL
|
|
652
|
+
"cli_name": "RateBell CLI", # the terminal's welcome banner
|
|
653
|
+
})
|
|
654
|
+
```
|
|
655
|
+
|
|
656
|
+
Anything left unset keeps the Qodalis default. The terminal's copyright line, docs link and `version` stay Qodalis
|
|
657
|
+
CLI's. The values are served with the color scheme at `/qcli/admin/theme.json`; `set_branding()` raises
|
|
658
|
+
`ValueError` on an invalid value.
|
|
659
|
+
|
|
660
|
+
## Dependencies
|
|
661
|
+
|
|
662
|
+
- `PyJWT>=2.0.0`
|
|
663
|
+
- `fastapi>=0.100.0`
|
|
664
|
+
- `psutil>=5.9.0`
|
|
665
|
+
|
|
666
|
+
## Terminal commands
|
|
667
|
+
|
|
668
|
+
The plugin brings the `admin` command (registered by `mount_plugin`, which also lets the module registry filter the
|
|
669
|
+
executor). It reads the same services as the admin routes. On a protected server every sub-command needs
|
|
670
|
+
`admin:access`; `admin logs` also needs `logs:read`, `admin dashboard install|update|remove` also
|
|
671
|
+
`dashboard:install`, `admin restart` (but not `admin restart status`) `server:restart`. Server settings are the core
|
|
672
|
+
[`config`](../../README.md#config-providers) command; a dashboard plugin's settings are changed after its install
|
|
673
|
+
with `config set dashboard-plugins.<id>.<key> <value>` (`config:write`). Lists take `--json` (the payload of the matching route).
|
|
674
|
+
|
|
675
|
+
| Command | Permission | Does |
|
|
676
|
+
|---|---|---|
|
|
677
|
+
| `admin`, `admin status [--json]` | `admin:access` | Server package and version, platform, uptime, memory, CPU, connections, commands, jobs, features (`GET /status`) |
|
|
678
|
+
| `admin status --history [--minutes 60] [--json]` | `admin:access` | Summary of the status samples of the last minutes (1-1440): count, min/avg/max memory and CPU, peak connections (`GET /status/history`) |
|
|
679
|
+
| `admin plugins`, `admin plugins list [--json]` | `admin:access` | Command modules: id, name, version, enabled or disabled, commands (`GET /plugins`) |
|
|
680
|
+
| `admin plugins enable <id>`, `admin plugins disable <id>` | `admin:access` | Turns a module's commands on or off, like `POST /plugins/{id}/toggle` but idempotent (`... is already enabled.`); the `admin` module itself cannot be disabled from the terminal |
|
|
681
|
+
| `admin clients [--json]` | `admin:access` | Connected WebSocket clients: id, type, connected since, address (`GET /ws/clients`) |
|
|
682
|
+
| `admin logs [--level warn,error] [--search <text>] [--service <source>] [--since 5m\|1h\|7d\|<ISO date>] [-n 50] [--json]` | `admin:access`, `logs:read` | The newest matching log entries (1-1000), oldest first, from the log buffer (`--service` matches the logger name) |
|
|
683
|
+
| `admin dashboard`, `admin dashboard list [--json]` | `admin:access` | The dashboard plugins installed from the marketplace: page id, package, version (and whether an update is available), when and by whom (`GET /dashboard/marketplace/installed`) |
|
|
684
|
+
| `admin dashboard search [<query>] [--json]` | `admin:access` | The marketplace's dashboard plugins: package, version, publisher, installed / installable / blocked and why, a missing server plugin (`GET /dashboard/marketplace/plugins`) |
|
|
685
|
+
| `admin dashboard info <name> [--json]` | `admin:access` | An installed plugin: page, files, and its settings with their values, defaults and rules (`*` marks a changed value) |
|
|
686
|
+
| `admin dashboard install <name>[@version] [--config '<json>']` | `admin:access`, `dashboard:install` | Installs the newest version this dashboard runs, or the one given, with values for its settings, with the API's checks (`POST /dashboard/marketplace/installed`) |
|
|
687
|
+
| `admin dashboard update <name> [--config '<json>']` | `admin:access`, `dashboard:install` | Updates to the newest version, reporting the settings it drops (`PUT /dashboard/marketplace/installed/{name}`) |
|
|
688
|
+
| `admin dashboard remove <name>` | `admin:access`, `dashboard:install` | Removes the page, its files and its settings (`DELETE /dashboard/marketplace/installed/{name}`) |
|
|
689
|
+
| `admin restart [--yes] [--reason <text>]` | `admin:access`, `server:restart` | Without `--yes` (server commands cannot ask): the changes waiting for a restart and how to confirm; with it, restarts the server like `POST /server/restart` (audited with `via: command`) |
|
|
690
|
+
| `admin restart status [--json]` | `admin:access` | Start time, restart mode and supervisor (or why it cannot restart), the pending changes (`GET /server/restart`) |
|
|
691
|
+
|
|
692
|
+
On a server without the users plugin, `/execute` is open, and so are these commands. To follow the log live, use
|
|
693
|
+
`server logs` of the web CLI plugin `@qodalis/cli-server-logs` (the `/ws/v1/qcli/logs` socket, `logs:read`).
|
|
694
|
+
|
|
695
|
+
```text
|
|
696
|
+
$ admin status
|
|
697
|
+
Server qodalis-cli-server 1.0.0b31
|
|
698
|
+
Platform python 3.13.1 (Linux 6.8.0)
|
|
699
|
+
Uptime 2 h 5 min (since 2026-11-25 08:00:00)
|
|
700
|
+
Memory 84.2 MB (process) · machine 9.8 GB of 16 GB used (61%)
|
|
701
|
+
CPU 1.3%
|
|
702
|
+
Connections 2 WebSocket, 0 shell
|
|
703
|
+
Commands 41
|
|
704
|
+
Jobs 0
|
|
705
|
+
Features filesystem, jobs, audit
|
|
706
|
+
|
|
707
|
+
$ admin status --history --minutes 15
|
|
708
|
+
Last 15 min: 60 sample(s) every 15 s, 2026-11-25 09:50:00 to 2026-11-25 10:04:45
|
|
709
|
+
Memory min 80.1 MB avg 82.4 MB max 85.3 MB
|
|
710
|
+
CPU min 0.2% avg 1.1% max 5.4%
|
|
711
|
+
Peak 3 WebSocket, 1 shell
|
|
712
|
+
|
|
713
|
+
$ admin plugins disable weather
|
|
714
|
+
Disabled weather (1 command).
|
|
715
|
+
|
|
716
|
+
$ admin logs --level warn,error -n 2
|
|
717
|
+
Last 2 of 7 entries
|
|
718
|
+
2026-11-25 10:01:12 WARN [jobs] cleanup took 12 s
|
|
719
|
+
2026-11-25 10:03:40 ERROR [db] connection timeout
|
|
720
|
+
|
|
721
|
+
$ admin dashboard search
|
|
722
|
+
Package Version Publisher Status
|
|
723
|
+
@qodalis/cli-dashboard-module-jobs 1.1.0 @qodalis (verified) installable
|
|
724
|
+
@acme/cli-dashboard-tickets 2.0.0 @acme blocked: unverified publisher
|
|
725
|
+
|
|
726
|
+
$ admin dashboard install @qodalis/cli-dashboard-module-jobs@1.0.0
|
|
727
|
+
Installed @qodalis/cli-dashboard-module-jobs@1.0.0: the dashboard page "Jobs" (/x/jobs).
|
|
728
|
+
|
|
729
|
+
$ admin dashboard
|
|
730
|
+
1 dashboard plugin(s) from https://plugins.qodalis.com (install: verified)
|
|
731
|
+
ID Package Version Installed By
|
|
732
|
+
jobs @qodalis/cli-dashboard-module-jobs 1.0.0 (update available) 2026-11-25 10:04:05 admin
|
|
733
|
+
|
|
734
|
+
$ admin dashboard update @qodalis/cli-dashboard-module-jobs
|
|
735
|
+
Updated @qodalis/cli-dashboard-module-jobs from 1.0.0 to 1.1.0.
|
|
736
|
+
|
|
737
|
+
$ admin dashboard remove @qodalis/cli-dashboard-module-jobs
|
|
738
|
+
Removed @qodalis/cli-dashboard-module-jobs@1.1.0 (the page jobs).
|
|
739
|
+
|
|
740
|
+
$ admin dashboard install @acme/cli-dashboard-tickets
|
|
741
|
+
Error: publisher not verified
|
|
742
|
+
|
|
743
|
+
$ admin dashboard install @acme/cli-dashboard-tickets --config '{"refreshSeconds":1,"mode":"huge"}'
|
|
744
|
+
Error: validation failed
|
|
745
|
+
refreshSeconds: must be at least 5
|
|
746
|
+
mode: must be one of: compact, full
|
|
747
|
+
|
|
748
|
+
$ admin dashboard install @acme/cli-dashboard-tickets --config '{"refreshSeconds":60}'
|
|
749
|
+
Installed @acme/cli-dashboard-tickets@1.0.0: the dashboard page "Tickets" (/x/tickets).
|
|
750
|
+
Its settings: admin dashboard info @acme/cli-dashboard-tickets
|
|
751
|
+
|
|
752
|
+
$ admin dashboard info @acme/cli-dashboard-tickets
|
|
753
|
+
@acme/cli-dashboard-tickets@1.0.0
|
|
754
|
+
Page Tickets (/x/tickets)
|
|
755
|
+
Installed 2026-11-25 10:04:05 by admin
|
|
756
|
+
Files extension.js (48211 bytes), extension.css (5120 bytes)
|
|
757
|
+
Settings (config set dashboard-plugins.tickets.<key> <value>; version 1):
|
|
758
|
+
Key Value Type Default Rule
|
|
759
|
+
refreshSeconds 60 * number 30 min 5; max 3600
|
|
760
|
+
columns ["name","status"] string[] ["name","status"] -
|
|
761
|
+
mode compact enum compact one of compact, full
|
|
762
|
+
* changed from the default
|
|
763
|
+
|
|
764
|
+
$ config set dashboard-plugins.tickets.mode full
|
|
765
|
+
Updated dashboard-plugins.tickets.mode = full (version 2)
|
|
766
|
+
|
|
767
|
+
$ admin dashboard update @acme/cli-dashboard-tickets --config '{"theme":"dark"}'
|
|
768
|
+
Updated @acme/cli-dashboard-tickets from 1.0.0 to 2.0.0.
|
|
769
|
+
Settings dropped (the new version no longer accepts them): refreshSeconds, mode
|
|
770
|
+
Its settings: admin dashboard info @acme/cli-dashboard-tickets
|
|
771
|
+
|
|
772
|
+
$ admin restart
|
|
773
|
+
1 change(s) take effect after a restart:
|
|
774
|
+
- CORS: Mode changed (config, since 2026-11-25 10:04:05)
|
|
775
|
+
Restart mode: self (starts itself again)
|
|
776
|
+
Run admin restart --yes [--reason "<why>"] to restart the server now.
|
|
777
|
+
|
|
778
|
+
$ admin restart --yes --reason "apply CORS"
|
|
779
|
+
Restarting the server to apply 1 pending change(s) (self mode). The connection drops and comes back once it runs again.
|
|
780
|
+
|
|
781
|
+
$ admin restart status
|
|
782
|
+
Running since 2026-11-25 10:06:12
|
|
783
|
+
Restart mode: exit (exits for docker to start it again)
|
|
784
|
+
No changes are waiting for a restart.
|
|
785
|
+
```
|
|
786
|
+
|
|
787
|
+
### `admin plugins search|installed|install|update|remove`
|
|
788
|
+
|
|
789
|
+
Server plugins from the marketplace (`search` and `installed` need `admin:access`; changes `plugins:install`):
|
|
790
|
+
|
|
791
|
+
```text
|
|
792
|
+
> admin plugins install weather
|
|
793
|
+
Installed weather: qodalis-cli-server-plugin-weather==1.0.0b31.
|
|
794
|
+
Restart the server to apply it: admin restart (or the dashboard).
|
|
795
|
+
|
|
796
|
+
> admin plugins installed
|
|
797
|
+
1 server plugin(s) from https://plugins.qodalis.com (install: verified)
|
|
798
|
+
Plugin Package Version Status Installed By
|
|
799
|
+
weather qodalis-cli-server-plugin-weather 1.0.0b31 pending restart 2026-11-26 10:04:05 root
|
|
800
|
+
```
|
|
801
|
+
|
|
802
|
+
`admin plugins search <query>` lists the plugin, this server's package, its version, platforms, publisher and whether
|
|
803
|
+
it can be installed (`blocked: <reason>`, or the settings to set after the install); `--platform this|all|node|python|dotnet`
|
|
804
|
+
lists another platform's plugins (default `this`); `update <name>[@version]`,
|
|
805
|
+
`remove <name>`. Lists take `--json`.
|
|
806
|
+
|
|
807
|
+
## License
|
|
808
|
+
|
|
809
|
+
MIT
|