hivemind-admin-panel 0.1.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 (58) hide show
  1. hivemind_admin_panel-0.1.0/LICENSE +79 -0
  2. hivemind_admin_panel-0.1.0/PKG-INFO +160 -0
  3. hivemind_admin_panel-0.1.0/README.md +120 -0
  4. hivemind_admin_panel-0.1.0/hivemind_admin_panel/__init__.py +91 -0
  5. hivemind_admin_panel-0.1.0/hivemind_admin_panel/__main__.py +267 -0
  6. hivemind_admin_panel-0.1.0/hivemind_admin_panel/_auth.py +162 -0
  7. hivemind_admin_panel-0.1.0/hivemind_admin_panel/_chat.py +146 -0
  8. hivemind_admin_panel-0.1.0/hivemind_admin_panel/_metrics.py +84 -0
  9. hivemind_admin_panel-0.1.0/hivemind_admin_panel/_persona_chat.py +111 -0
  10. hivemind_admin_panel-0.1.0/hivemind_admin_panel/acl_config.json +84 -0
  11. hivemind_admin_panel-0.1.0/hivemind_admin_panel/api.py +4882 -0
  12. hivemind_admin_panel-0.1.0/hivemind_admin_panel/persona.json +12 -0
  13. hivemind_admin_panel-0.1.0/hivemind_admin_panel/plugins_config.json +266 -0
  14. hivemind_admin_panel-0.1.0/hivemind_admin_panel/static/css/style.css +898 -0
  15. hivemind_admin_panel-0.1.0/hivemind_admin_panel/static/index.html +1650 -0
  16. hivemind_admin_panel-0.1.0/hivemind_admin_panel/static/js/app.js +4516 -0
  17. hivemind_admin_panel-0.1.0/hivemind_admin_panel/static/js/i18n.js +47 -0
  18. hivemind_admin_panel-0.1.0/hivemind_admin_panel/version.py +17 -0
  19. hivemind_admin_panel-0.1.0/hivemind_admin_panel.egg-info/PKG-INFO +160 -0
  20. hivemind_admin_panel-0.1.0/hivemind_admin_panel.egg-info/SOURCES.txt +56 -0
  21. hivemind_admin_panel-0.1.0/hivemind_admin_panel.egg-info/dependency_links.txt +1 -0
  22. hivemind_admin_panel-0.1.0/hivemind_admin_panel.egg-info/entry_points.txt +2 -0
  23. hivemind_admin_panel-0.1.0/hivemind_admin_panel.egg-info/requires.txt +22 -0
  24. hivemind_admin_panel-0.1.0/hivemind_admin_panel.egg-info/top_level.txt +1 -0
  25. hivemind_admin_panel-0.1.0/pyproject.toml +47 -0
  26. hivemind_admin_panel-0.1.0/requirements.txt +18 -0
  27. hivemind_admin_panel-0.1.0/setup.cfg +4 -0
  28. hivemind_admin_panel-0.1.0/tests/test_agents_servers.py +50 -0
  29. hivemind_admin_panel-0.1.0/tests/test_auth.py +23 -0
  30. hivemind_admin_panel-0.1.0/tests/test_auth_sessions.py +57 -0
  31. hivemind_admin_panel-0.1.0/tests/test_bridges.py +59 -0
  32. hivemind_admin_panel-0.1.0/tests/test_chat.py +109 -0
  33. hivemind_admin_panel-0.1.0/tests/test_client_acls.py +73 -0
  34. hivemind_admin_panel-0.1.0/tests/test_clients.py +76 -0
  35. hivemind_admin_panel-0.1.0/tests/test_concurrency.py +50 -0
  36. hivemind_admin_panel-0.1.0/tests/test_config.py +36 -0
  37. hivemind_admin_panel-0.1.0/tests/test_config_backups.py +70 -0
  38. hivemind_admin_panel-0.1.0/tests/test_database.py +63 -0
  39. hivemind_admin_panel-0.1.0/tests/test_health.py +103 -0
  40. hivemind_admin_panel-0.1.0/tests/test_launch.py +82 -0
  41. hivemind_admin_panel-0.1.0/tests/test_live_tap.py +66 -0
  42. hivemind_admin_panel-0.1.0/tests/test_monitoring.py +24 -0
  43. hivemind_admin_panel-0.1.0/tests/test_observability.py +35 -0
  44. hivemind_admin_panel-0.1.0/tests/test_ops.py +43 -0
  45. hivemind_admin_panel-0.1.0/tests/test_ovos_bus.py +57 -0
  46. hivemind_admin_panel-0.1.0/tests/test_pairing_bulk.py +45 -0
  47. hivemind_admin_panel-0.1.0/tests/test_persona_activate.py +23 -0
  48. hivemind_admin_panel-0.1.0/tests/test_persona_chat.py +96 -0
  49. hivemind_admin_panel-0.1.0/tests/test_persona_config.py +30 -0
  50. hivemind_admin_panel-0.1.0/tests/test_personas.py +76 -0
  51. hivemind_admin_panel-0.1.0/tests/test_plugin_lifecycle.py +74 -0
  52. hivemind_admin_panel-0.1.0/tests/test_plugins.py +61 -0
  53. hivemind_admin_panel-0.1.0/tests/test_presets.py +104 -0
  54. hivemind_admin_panel-0.1.0/tests/test_security_config.py +42 -0
  55. hivemind_admin_panel-0.1.0/tests/test_setup_security.py +131 -0
  56. hivemind_admin_panel-0.1.0/tests/test_smoke.py +52 -0
  57. hivemind_admin_panel-0.1.0/tests/test_tags_setup.py +22 -0
  58. hivemind_admin_panel-0.1.0/tests/test_topology_qr.py +36 -0
@@ -0,0 +1,79 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
10
+
11
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
12
+
13
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
14
+
15
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
16
+
17
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
18
+
19
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
20
+
21
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
22
+
23
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
24
+
25
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
26
+
27
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
28
+
29
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
30
+
31
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
32
+
33
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
34
+
35
+ (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
36
+
37
+ (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
38
+
39
+ (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
40
+
41
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
42
+
43
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44
+
45
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46
+
47
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48
+
49
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50
+
51
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52
+
53
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54
+
55
+ END OF TERMS AND CONDITIONS
56
+
57
+ APPENDIX: How to apply the Apache License to your work.
58
+
59
+ To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
60
+
61
+ Copyright [yyyy] [name of copyright owner]
62
+
63
+ Licensed under the Apache License, Version 2.0 (the "License");
64
+ you may not use this file except in compliance with the License.
65
+ You may obtain a copy of the License at
66
+
67
+ http://www.apache.org/licenses/LICENSE-2.0
68
+
69
+ Unless required by applicable law or agreed to in writing, software
70
+ distributed under the License is distributed on an "AS IS" BASIS,
71
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
72
+ See the License for the specific language governing permissions and
73
+ limitations under the License.
74
+
75
+ ----------------------------------------------------------------------
76
+
77
+ Copyright (C) 2026 Casimiro Ferreira
78
+
79
+ SPDX-License-Identifier: Apache-2.0
@@ -0,0 +1,160 @@
1
+ Metadata-Version: 2.4
2
+ Name: hivemind-admin-panel
3
+ Version: 0.1.0
4
+ Summary: Web-based admin panel for HiveMind-core: manage clients, ACLs, plugins, databases and personas
5
+ Author-email: Casimiro Ferreira <jarbasai@mailfence.com>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/JarbasHiveMind/hivemind-admin-panel
8
+ Project-URL: Source, https://github.com/JarbasHiveMind/hivemind-admin-panel
9
+ Keywords: hivemind,ovos,admin,web ui,fastapi
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Requires-Python: >=3.10
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: hivemind-core<5.0.0,>=4.6.1a1
20
+ Requires-Dist: hivemind-bus-client<1.0.0,>=0.9.0
21
+ Requires-Dist: hivemind-plugin-manager<1.0.0,>=0.7.1a1
22
+ Requires-Dist: ovos-plugin-manager<3.0.0,>=2.6.1a2
23
+ Requires-Dist: ovos-utils<1.0.0,>=0.3.0
24
+ Requires-Dist: fastapi>=0.110.0
25
+ Requires-Dist: uvicorn>=0.27.0
26
+ Requires-Dist: python-multipart>=0.0.9
27
+ Requires-Dist: pydantic>=2.0.0
28
+ Requires-Dist: websocket-client>=1.7.0
29
+ Requires-Dist: qrcode<9.0,>=7.0
30
+ Requires-Dist: requests>=2.25.0
31
+ Provides-Extra: test
32
+ Requires-Dist: pytest; extra == "test"
33
+ Requires-Dist: pytest-cov; extra == "test"
34
+ Requires-Dist: httpx; extra == "test"
35
+ Provides-Extra: dev
36
+ Requires-Dist: pytest; extra == "dev"
37
+ Requires-Dist: pytest-cov; extra == "dev"
38
+ Requires-Dist: httpx; extra == "dev"
39
+ Dynamic: license-file
40
+
41
+ # HiveMind Admin Panel
42
+
43
+ Web-based administration panel for [HiveMind-core](https://github.com/JarbasHiveMind/HiveMind-core)
44
+ — a FastAPI backend and single-page web UI for running and managing a HiveMind hub.
45
+
46
+ It ships as a **standalone, optional package**. It's the single launcher: it starts
47
+ `hivemind-core` in-process and serves the admin UI, so you run **one** command and
48
+ get a hub plus a place to administer it.
49
+
50
+ ![Dashboard](docs/img/dashboard.png)
51
+
52
+ ## Features
53
+
54
+ - **Clients & access keys** — create, list, update, revoke; bulk ops; reveal
55
+ credentials; **QR pairing** for one-tap satellite onboarding.
56
+ - **Per-client ACLs** — allow message types, skills, and intents; toggle
57
+ escalate / propagate and admin flags; apply ACL templates.
58
+ - **Test Chat** — an in-browser chat that **impersonates any client**, talking
59
+ through the hub to whatever agent is behind it. Exercises the real path: the
60
+ client's ACL, routing, and the agent's reply.
61
+ - **Chat bridges** — provision a ready client for Matrix / Twitch / Mattermost /
62
+ DeltaChat / HackChat bridges and see them labelled in the topology.
63
+ - **Security** — a forced first-run password change, a dashboard security
64
+ self-check, session tokens, `admin`/`operator` roles, and an audit trail.
65
+ - **Monitor** — live metrics, an SSE event feed, the hub log tail, and the audit log.
66
+ - **Topology** — an interactive mesh graph (hub ↔ satellites) with online status.
67
+ - **Personas & agents** — manage personas (modern `handlers` schema), a **multi-turn
68
+ memory-aware** test chat, **configurable + installable memory modules**, and
69
+ pre-activation validation; browse the agent-engine taxonomy.
70
+ - **Plugin lifecycle** — install, **upgrade**, and **uninstall** plugins (with an
71
+ active-module guard) and see installed versions.
72
+ - **Plugin presets** — named, reusable `{module, config}` for STT/TTS/WW/VAD/agent/
73
+ network (local plugin or OVOS-server pointer); author once, test, and select.
74
+ - **Config safety** — `server.json` is snapshotted before every change; diff and
75
+ one-click **revert** from the Operations page.
76
+ - **OVOS servers** — register and health-check external persona/STT/TTS/translate servers.
77
+ - **Plugins & databases** — discover/install network/agent/database & OVOS plugins
78
+ (via uv); JSON / SQLite / Redis backends with profiles, tests, and migration.
79
+ - **Ops** — backup/restore, admission-policy editor, self-signed TLS certs.
80
+
81
+ ## Install
82
+
83
+ ```bash
84
+ pip install hivemind-admin-panel
85
+ ```
86
+
87
+ ## Quickstart
88
+
89
+ `hivemind-admin-panel` is the single launcher — it starts hivemind-core in-process
90
+ and serves the admin UI. You do **not** run `hivemind-core` separately.
91
+
92
+ ```bash
93
+ hivemind-admin-panel --host 127.0.0.1 --port 8100
94
+ # open http://127.0.0.1:8100 (first login: admin / admin — you'll be forced to change it)
95
+ ```
96
+
97
+ **Panel only** (manage on-disk config/database without starting a hub):
98
+
99
+ ```bash
100
+ hivemind-admin-panel --no-core --host 127.0.0.1 --port 8100
101
+ ```
102
+
103
+ **Docker Compose** (hivemind-core + admin panel + Redis):
104
+
105
+ ```bash
106
+ docker compose up --build
107
+ # open http://127.0.0.1:8100 (edit docker/server.json to set admin_pass first)
108
+ ```
109
+
110
+ > The hub bridges to an **agent backend** (an OVOS messagebus by default) for
111
+ > answers. Without one reachable, the panel stays up and tells you the satellite
112
+ > listener isn't ready — see [Troubleshooting](docs/troubleshooting.md).
113
+
114
+ ## Screenshots
115
+
116
+ | Test Chat (impersonate a client) | Mesh topology |
117
+ |---|---|
118
+ | [![Test Chat](docs/img/test-chat.png)](docs/img/test-chat.png) | [![Topology](docs/img/topology.png)](docs/img/topology.png) |
119
+
120
+ | Forced first-run security | Provision a chat bridge |
121
+ |---|---|
122
+ | [![First-run gate](docs/img/first-run-gate.png)](docs/img/first-run-gate.png) | [![Add bridge](docs/img/add-bridge.png)](docs/img/add-bridge.png) |
123
+
124
+ ## Credentials
125
+
126
+ HTTP Basic / bearer auth, read from `~/.config/hivemind-core/server.json`
127
+ (`admin_user` / `admin_pass`, both default `admin`). On first login with the
128
+ default password the panel **forces** a change and stores it hashed (PBKDF2). It
129
+ can install packages and migrate databases — keep it on `127.0.0.1` or behind a
130
+ trusted reverse proxy. See [docs/security.md](docs/security.md).
131
+
132
+ ## Documentation
133
+
134
+ Full docs in [`docs/`](docs/index.md) — a zero-to-hero path for newcomers and a
135
+ reference track for advanced devs.
136
+
137
+ **Newcomers:** [Concepts](docs/concepts.md) · [Getting started](docs/getting-started.md) ·
138
+ [Tutorial](docs/tutorial.md) · [Glossary](docs/glossary.md) ·
139
+ [Troubleshooting](docs/troubleshooting.md)
140
+
141
+ **Operate:** [Running](docs/running.md) · [CLI](docs/cli.md) ·
142
+ [Configuration](docs/configuration.md) · [Operations](docs/operations.md) ·
143
+ [Security](docs/security.md) · [Deployment](docs/deployment.md) ·
144
+ [OVOS servers](docs/ovos-servers.md) · [Chat bridges](docs/bridges.md) ·
145
+ [Test Chat](docs/test-chat.md) · [Plugin presets](docs/presets.md)
146
+
147
+ **Develop:** [Architecture](docs/architecture.md) · [Extending](docs/extending.md) ·
148
+ [API reference](docs/api-reference.md) · [Development](docs/development.md) ·
149
+ [Roadmap](docs/roadmap.md)
150
+
151
+ ## Relationship to HiveMind-core
152
+
153
+ The panel was extracted from core so it has its own release cadence and stays an
154
+ optional, separately-deployable admin plane. It is the launcher: it starts a
155
+ `hivemind-core` in-process and keeps a live reference to it, so core needs no
156
+ admin-specific code. See [docs/architecture.md](docs/architecture.md).
157
+
158
+ ## License
159
+
160
+ Apache-2.0. See [LICENSE](LICENSE).
@@ -0,0 +1,120 @@
1
+ # HiveMind Admin Panel
2
+
3
+ Web-based administration panel for [HiveMind-core](https://github.com/JarbasHiveMind/HiveMind-core)
4
+ — a FastAPI backend and single-page web UI for running and managing a HiveMind hub.
5
+
6
+ It ships as a **standalone, optional package**. It's the single launcher: it starts
7
+ `hivemind-core` in-process and serves the admin UI, so you run **one** command and
8
+ get a hub plus a place to administer it.
9
+
10
+ ![Dashboard](docs/img/dashboard.png)
11
+
12
+ ## Features
13
+
14
+ - **Clients & access keys** — create, list, update, revoke; bulk ops; reveal
15
+ credentials; **QR pairing** for one-tap satellite onboarding.
16
+ - **Per-client ACLs** — allow message types, skills, and intents; toggle
17
+ escalate / propagate and admin flags; apply ACL templates.
18
+ - **Test Chat** — an in-browser chat that **impersonates any client**, talking
19
+ through the hub to whatever agent is behind it. Exercises the real path: the
20
+ client's ACL, routing, and the agent's reply.
21
+ - **Chat bridges** — provision a ready client for Matrix / Twitch / Mattermost /
22
+ DeltaChat / HackChat bridges and see them labelled in the topology.
23
+ - **Security** — a forced first-run password change, a dashboard security
24
+ self-check, session tokens, `admin`/`operator` roles, and an audit trail.
25
+ - **Monitor** — live metrics, an SSE event feed, the hub log tail, and the audit log.
26
+ - **Topology** — an interactive mesh graph (hub ↔ satellites) with online status.
27
+ - **Personas & agents** — manage personas (modern `handlers` schema), a **multi-turn
28
+ memory-aware** test chat, **configurable + installable memory modules**, and
29
+ pre-activation validation; browse the agent-engine taxonomy.
30
+ - **Plugin lifecycle** — install, **upgrade**, and **uninstall** plugins (with an
31
+ active-module guard) and see installed versions.
32
+ - **Plugin presets** — named, reusable `{module, config}` for STT/TTS/WW/VAD/agent/
33
+ network (local plugin or OVOS-server pointer); author once, test, and select.
34
+ - **Config safety** — `server.json` is snapshotted before every change; diff and
35
+ one-click **revert** from the Operations page.
36
+ - **OVOS servers** — register and health-check external persona/STT/TTS/translate servers.
37
+ - **Plugins & databases** — discover/install network/agent/database & OVOS plugins
38
+ (via uv); JSON / SQLite / Redis backends with profiles, tests, and migration.
39
+ - **Ops** — backup/restore, admission-policy editor, self-signed TLS certs.
40
+
41
+ ## Install
42
+
43
+ ```bash
44
+ pip install hivemind-admin-panel
45
+ ```
46
+
47
+ ## Quickstart
48
+
49
+ `hivemind-admin-panel` is the single launcher — it starts hivemind-core in-process
50
+ and serves the admin UI. You do **not** run `hivemind-core` separately.
51
+
52
+ ```bash
53
+ hivemind-admin-panel --host 127.0.0.1 --port 8100
54
+ # open http://127.0.0.1:8100 (first login: admin / admin — you'll be forced to change it)
55
+ ```
56
+
57
+ **Panel only** (manage on-disk config/database without starting a hub):
58
+
59
+ ```bash
60
+ hivemind-admin-panel --no-core --host 127.0.0.1 --port 8100
61
+ ```
62
+
63
+ **Docker Compose** (hivemind-core + admin panel + Redis):
64
+
65
+ ```bash
66
+ docker compose up --build
67
+ # open http://127.0.0.1:8100 (edit docker/server.json to set admin_pass first)
68
+ ```
69
+
70
+ > The hub bridges to an **agent backend** (an OVOS messagebus by default) for
71
+ > answers. Without one reachable, the panel stays up and tells you the satellite
72
+ > listener isn't ready — see [Troubleshooting](docs/troubleshooting.md).
73
+
74
+ ## Screenshots
75
+
76
+ | Test Chat (impersonate a client) | Mesh topology |
77
+ |---|---|
78
+ | [![Test Chat](docs/img/test-chat.png)](docs/img/test-chat.png) | [![Topology](docs/img/topology.png)](docs/img/topology.png) |
79
+
80
+ | Forced first-run security | Provision a chat bridge |
81
+ |---|---|
82
+ | [![First-run gate](docs/img/first-run-gate.png)](docs/img/first-run-gate.png) | [![Add bridge](docs/img/add-bridge.png)](docs/img/add-bridge.png) |
83
+
84
+ ## Credentials
85
+
86
+ HTTP Basic / bearer auth, read from `~/.config/hivemind-core/server.json`
87
+ (`admin_user` / `admin_pass`, both default `admin`). On first login with the
88
+ default password the panel **forces** a change and stores it hashed (PBKDF2). It
89
+ can install packages and migrate databases — keep it on `127.0.0.1` or behind a
90
+ trusted reverse proxy. See [docs/security.md](docs/security.md).
91
+
92
+ ## Documentation
93
+
94
+ Full docs in [`docs/`](docs/index.md) — a zero-to-hero path for newcomers and a
95
+ reference track for advanced devs.
96
+
97
+ **Newcomers:** [Concepts](docs/concepts.md) · [Getting started](docs/getting-started.md) ·
98
+ [Tutorial](docs/tutorial.md) · [Glossary](docs/glossary.md) ·
99
+ [Troubleshooting](docs/troubleshooting.md)
100
+
101
+ **Operate:** [Running](docs/running.md) · [CLI](docs/cli.md) ·
102
+ [Configuration](docs/configuration.md) · [Operations](docs/operations.md) ·
103
+ [Security](docs/security.md) · [Deployment](docs/deployment.md) ·
104
+ [OVOS servers](docs/ovos-servers.md) · [Chat bridges](docs/bridges.md) ·
105
+ [Test Chat](docs/test-chat.md) · [Plugin presets](docs/presets.md)
106
+
107
+ **Develop:** [Architecture](docs/architecture.md) · [Extending](docs/extending.md) ·
108
+ [API reference](docs/api-reference.md) · [Development](docs/development.md) ·
109
+ [Roadmap](docs/roadmap.md)
110
+
111
+ ## Relationship to HiveMind-core
112
+
113
+ The panel was extracted from core so it has its own release cadence and stays an
114
+ optional, separately-deployable admin plane. It is the launcher: it starts a
115
+ `hivemind-core` in-process and keeps a live reference to it, so core needs no
116
+ admin-specific code. See [docs/architecture.md](docs/architecture.md).
117
+
118
+ ## License
119
+
120
+ Apache-2.0. See [LICENSE](LICENSE).
@@ -0,0 +1,91 @@
1
+ # hivemind-admin-panel
2
+ # Copyright (C) 2026 Casimiro Ferreira
3
+ # SPDX-License-Identifier: Apache-2.0
4
+ """HiveMind Admin - Web-based management UI for HiveMind-core.
5
+
6
+ This module provides a web-based administration interface for HiveMind-core,
7
+ allowing management of clients, permissions, and server configuration via
8
+ a REST API and web UI.
9
+
10
+ When launched with the in-process hivemind-core (the default), this module gets
11
+ direct access to internal HiveMind-core objects for real-time monitoring.
12
+ """
13
+
14
+ from typing import TYPE_CHECKING
15
+
16
+ from ovos_utils import create_daemon
17
+ from ovos_utils.log import LOG
18
+
19
+ if TYPE_CHECKING:
20
+ from hivemind_core.service import HiveMindService
21
+ from hivemind_core.database import ClientDatabase
22
+ from hivemind_core.protocol import HiveMindListenerProtocol
23
+
24
+ __version__ = "0.2.0"
25
+ __all__ = ["start_admin_server", "init_injected_objects", "get_admin_app"]
26
+
27
+
28
+ def init_injected_objects(
29
+ service: "HiveMindService" = None,
30
+ db: "ClientDatabase" = None,
31
+ protocol: "HiveMindListenerProtocol" = None,
32
+ startup_error: Exception = None
33
+ ) -> None:
34
+ """Initialize admin with direct access to core objects.
35
+
36
+ Args:
37
+ service: HiveMindService instance.
38
+ db: ClientDatabase instance.
39
+ protocol: HiveMindListenerProtocol instance.
40
+ startup_error: Exception if core failed to start.
41
+ """
42
+ from hivemind_admin_panel.api import init_injected_objects as _init
43
+ _init(service=service, db=db, protocol=protocol, logger=LOG, startup_error=startup_error)
44
+
45
+
46
+ def start_admin_server(
47
+ host: str = "127.0.0.1",
48
+ port: int = 8000,
49
+ reload: bool = False,
50
+ ) -> None:
51
+ """Start the HiveMind Admin web server.
52
+
53
+ This function starts a uvicorn server hosting the FastAPI admin interface.
54
+ It should be called after hivemind-core service is running.
55
+
56
+ Args:
57
+ host: Host to bind the server (default: 127.0.0.1).
58
+ port: Port to bind the server (default: 8000).
59
+ reload: Enable auto-reload for development (default: False).
60
+
61
+ Note:
62
+ This function runs the server in a daemon thread and returns
63
+ immediately. The server will shut down when the main process exits.
64
+ """
65
+ import uvicorn
66
+ from hivemind_admin_panel.__main__ import app
67
+
68
+ def _run_server():
69
+ LOG.info(f"Starting HiveMind Admin UI at http://{host}:{port}")
70
+ LOG.info("Change admin credentials in ~/.config/hivemind-core/server.json (admin_user, admin_pass)")
71
+ uvicorn.run(
72
+ app,
73
+ host=host,
74
+ port=port,
75
+ reload=reload,
76
+ log_level="info",
77
+ )
78
+
79
+ # Run server in daemon thread
80
+ create_daemon(_run_server)
81
+ LOG.info("HiveMind Admin server thread started")
82
+
83
+
84
+ def get_admin_app():
85
+ """Get the FastAPI app instance for admin UI.
86
+
87
+ Returns:
88
+ FastAPI app configured with all admin routes.
89
+ """
90
+ from hivemind_admin_panel.api import get_admin_app
91
+ return get_admin_app()