cyberia 3.2.9 → 3.2.12

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 (169) hide show
  1. package/.github/workflows/engine-cyberia.cd.yml +6 -0
  2. package/.github/workflows/npmpkg.ci.yml +1 -0
  3. package/.github/workflows/pwa-microservices-template-test.ci.yml +1 -1
  4. package/.github/workflows/release.cd.yml +1 -0
  5. package/.vscode/extensions.json +9 -9
  6. package/.vscode/settings.json +20 -4
  7. package/CHANGELOG.md +213 -1
  8. package/CLI-HELP.md +92 -23
  9. package/README.md +190 -348
  10. package/bin/build.js +24 -8
  11. package/bin/build.template.js +187 -0
  12. package/bin/cyberia.js +229 -52
  13. package/bin/deploy.js +12 -2
  14. package/bin/index.js +229 -52
  15. package/bump.config.js +26 -0
  16. package/conf.js +130 -24
  17. package/deployment.yaml +4 -2
  18. package/hardhat/package-lock.json +113 -144
  19. package/hardhat/package.json +4 -3
  20. package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +1 -1
  21. package/manifests/cronjobs/dd-cron/dd-cron-dns.yaml +1 -1
  22. package/manifests/deployment/dd-cyberia-development/deployment.yaml +4 -2
  23. package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
  24. package/manifests/deployment/dd-test-development/deployment.yaml +4 -2
  25. package/manifests/kind-config-dev.yaml +8 -0
  26. package/manifests/lxd/lxd-admin-profile.yaml +12 -3
  27. package/manifests/mongodb/pv-pvc.yaml +44 -8
  28. package/manifests/mongodb/statefulset.yaml +55 -68
  29. package/manifests/mongodb-4.4/headless-service.yaml +10 -0
  30. package/manifests/mongodb-4.4/kustomization.yaml +3 -1
  31. package/manifests/mongodb-4.4/mongodb-nodeport.yaml +17 -0
  32. package/manifests/mongodb-4.4/pv-pvc.yaml +10 -14
  33. package/manifests/mongodb-4.4/statefulset.yaml +79 -0
  34. package/manifests/mongodb-4.4/storage-class.yaml +9 -0
  35. package/manifests/valkey/statefulset.yaml +1 -1
  36. package/manifests/valkey/valkey-nodeport.yaml +17 -0
  37. package/package.json +27 -15
  38. package/scripts/ipxe-setup.sh +52 -49
  39. package/scripts/k3s-node-setup.sh +81 -46
  40. package/scripts/lxd-vm-setup.sh +193 -8
  41. package/scripts/maas-nat-firewalld.sh +145 -0
  42. package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.router.js +38 -33
  43. package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.service.js +16 -16
  44. package/src/api/core/core.router.js +19 -14
  45. package/src/api/core/core.service.js +5 -5
  46. package/src/api/crypto/crypto.router.js +18 -12
  47. package/src/api/crypto/crypto.service.js +3 -3
  48. package/src/api/cyberia-action/cyberia-action.model.js +1 -1
  49. package/src/api/cyberia-action/cyberia-action.router.js +22 -18
  50. package/src/api/cyberia-action/cyberia-action.service.js +5 -5
  51. package/src/api/cyberia-client-hints/cyberia-client-hints.controller.js +74 -0
  52. package/src/api/cyberia-client-hints/cyberia-client-hints.model.js +99 -0
  53. package/src/api/cyberia-client-hints/cyberia-client-hints.router.js +98 -0
  54. package/src/api/cyberia-client-hints/cyberia-client-hints.service.js +152 -0
  55. package/src/api/cyberia-dialogue/cyberia-dialogue.router.js +25 -20
  56. package/src/api/cyberia-dialogue/cyberia-dialogue.service.js +6 -6
  57. package/src/api/cyberia-entity/cyberia-entity.router.js +22 -18
  58. package/src/api/cyberia-entity/cyberia-entity.service.js +5 -5
  59. package/src/api/cyberia-instance/cyberia-fallback-world.js +79 -4
  60. package/src/api/cyberia-instance/cyberia-instance.router.js +57 -52
  61. package/src/api/cyberia-instance/cyberia-instance.service.js +10 -10
  62. package/src/api/cyberia-instance/cyberia-world-generator.js +3 -3
  63. package/src/api/cyberia-instance-conf/cyberia-instance-conf.model.js +14 -48
  64. package/src/api/cyberia-instance-conf/cyberia-instance-conf.router.js +22 -18
  65. package/src/api/cyberia-instance-conf/cyberia-instance-conf.service.js +5 -5
  66. package/src/api/cyberia-map/cyberia-map.router.js +35 -30
  67. package/src/api/cyberia-map/cyberia-map.service.js +7 -7
  68. package/src/api/cyberia-quest/cyberia-quest.model.js +1 -1
  69. package/src/api/cyberia-quest/cyberia-quest.router.js +22 -18
  70. package/src/api/cyberia-quest/cyberia-quest.service.js +5 -5
  71. package/src/api/cyberia-quest-progress/cyberia-quest-progress.router.js +22 -18
  72. package/src/api/cyberia-quest-progress/cyberia-quest-progress.service.js +5 -5
  73. package/src/api/cyberia-server-defaults/cyberia-server-defaults.js +451 -0
  74. package/src/api/default/default.router.js +22 -18
  75. package/src/api/default/default.service.js +5 -5
  76. package/src/api/document/document.router.js +28 -23
  77. package/src/api/document/document.service.js +100 -23
  78. package/src/api/file/file.router.js +19 -13
  79. package/src/api/file/file.service.js +9 -7
  80. package/src/api/instance/instance.router.js +29 -24
  81. package/src/api/instance/instance.service.js +6 -6
  82. package/src/api/ipfs/ipfs.router.js +21 -16
  83. package/src/api/ipfs/ipfs.service.js +8 -8
  84. package/src/api/object-layer/object-layer.router.js +512 -507
  85. package/src/api/object-layer/object-layer.service.js +17 -14
  86. package/src/api/object-layer-render-frames/object-layer-render-frames.router.js +22 -18
  87. package/src/api/object-layer-render-frames/object-layer-render-frames.service.js +5 -5
  88. package/src/api/test/test.router.js +17 -12
  89. package/src/api/types.js +24 -0
  90. package/src/api/user/guest.service.js +5 -4
  91. package/src/api/user/user.router.js +297 -288
  92. package/src/api/user/user.service.js +100 -35
  93. package/src/cli/baremetal.js +132 -101
  94. package/src/cli/cluster.js +700 -232
  95. package/src/cli/db.js +59 -60
  96. package/src/cli/deploy.js +216 -137
  97. package/src/cli/fs.js +13 -3
  98. package/src/cli/index.js +80 -15
  99. package/src/cli/ipfs.js +4 -6
  100. package/src/cli/kubectl.js +4 -1
  101. package/src/cli/lxd.js +1099 -223
  102. package/src/cli/monitor.js +9 -3
  103. package/src/cli/release.js +334 -140
  104. package/src/cli/repository.js +68 -23
  105. package/src/cli/run.js +193 -49
  106. package/src/cli/secrets.js +11 -2
  107. package/src/cli/test.js +9 -3
  108. package/src/client/Default.index.js +9 -3
  109. package/src/client/components/core/Auth.js +5 -0
  110. package/src/client/components/core/ClientEvents.js +76 -0
  111. package/src/client/components/core/EventBus.js +4 -0
  112. package/src/client/components/core/Modal.js +82 -41
  113. package/src/client/components/core/PanelForm.js +56 -52
  114. package/src/client/components/core/Worker.js +162 -363
  115. package/src/client/components/cyberia/MapEngineCyberia.js +1 -1
  116. package/src/client/components/cyberia/SharedDefaultsCyberia.js +330 -0
  117. package/src/client/public/cyberia-docs/ARCHITECTURE.md +50 -410
  118. package/src/client/public/cyberia-docs/CYBERIA-CLI.md +114 -327
  119. package/src/client/public/cyberia-docs/CYBERIA-CLIENT.md +200 -222
  120. package/src/client/public/cyberia-docs/CYBERIA-SERVER.md +203 -185
  121. package/src/client/public/cyberia-docs/CYBERIA.md +259 -0
  122. package/src/client/public/cyberia-docs/OFF-CHAIN-ECONOMY.md +2 -2
  123. package/src/client/public/cyberia-docs/ROADMAP.md +1 -1
  124. package/src/client/public/cyberia-docs/UNDERPOST-PLATFORM.md +106 -0
  125. package/src/client/public/cyberia-docs/WHITE-PAPER.md +1 -1
  126. package/src/client/services/cyberia-client-hints/cyberia-client-hints.service.js +99 -0
  127. package/src/client/ssr/views/CyberiaServerMetrics.js +982 -0
  128. package/src/client/sw/core.sw.js +174 -112
  129. package/src/db/DataBaseProvider.js +115 -15
  130. package/src/db/mariadb/MariaDB.js +2 -1
  131. package/src/db/mongo/MongoBootstrap.js +657 -0
  132. package/src/db/mongo/MongooseDB.js +129 -21
  133. package/src/grpc/cyberia/grpc-server.js +25 -57
  134. package/src/index.js +1 -1
  135. package/src/runtime/cyberia-client/Dockerfile +24 -3
  136. package/src/runtime/cyberia-client/Dockerfile.dev +82 -0
  137. package/src/runtime/cyberia-server/Dockerfile +29 -4
  138. package/src/runtime/cyberia-server/Dockerfile.dev +71 -0
  139. package/src/runtime/express/Express.js +2 -2
  140. package/src/runtime/wp/Wp.js +8 -5
  141. package/src/server/auth.js +2 -2
  142. package/src/server/client-build-docs.js +1 -1
  143. package/src/server/client-build.js +94 -129
  144. package/src/server/conf.js +86 -83
  145. package/src/server/process.js +180 -19
  146. package/src/server/proxy.js +9 -2
  147. package/src/server/runtime.js +1 -1
  148. package/src/server/start.js +17 -5
  149. package/src/server/valkey.js +2 -0
  150. package/src/ws/IoInterface.js +16 -16
  151. package/src/ws/core/channels/core.ws.chat.js +11 -11
  152. package/src/ws/core/channels/core.ws.mailer.js +29 -29
  153. package/src/ws/core/channels/core.ws.stream.js +19 -19
  154. package/src/ws/core/core.ws.connection.js +8 -8
  155. package/src/ws/core/core.ws.server.js +6 -5
  156. package/src/ws/default/channels/default.ws.main.js +10 -10
  157. package/src/ws/default/default.ws.connection.js +4 -4
  158. package/src/ws/default/default.ws.server.js +4 -3
  159. package/bin/file.js +0 -202
  160. package/bin/vs.js +0 -74
  161. package/bin/zed.js +0 -84
  162. package/src/api/cyberia-instance-conf/cyberia-instance-conf.defaults.js +0 -574
  163. package/src/client/components/cyberia-portal/CommonCyberiaPortal.js +0 -467
  164. package/src/client/ssr/email/DefaultRecoverEmail.js +0 -21
  165. package/src/client/ssr/email/DefaultVerifyEmail.js +0 -17
  166. package/src/client/ssr/pages/CyberiaServerMetrics.js +0 -461
  167. /package/src/client/ssr/{offline → views}/Maintenance.js +0 -0
  168. /package/src/client/ssr/{offline → views}/NoNetworkConnection.js +0 -0
  169. /package/src/client/ssr/{pages → views}/Test.js +0 -0
@@ -1,417 +1,204 @@
1
- <p align="center">
2
- <img src="https://www.cyberiaonline.com/assets/splash/apple-touch-icon-precomposed.png" alt="CYBERIA Network Object Layer Engine"/>
3
- </p>
4
-
5
- <div align="center">
6
-
7
- ### CYBERIA
8
-
9
- **Network Object Layers**
10
-
11
- _Stackable Rendering Layers as a Unified Tokenized Reality_
12
-
13
- [![Version](https://img.shields.io/npm/v/cyberia.svg)](https://www.npmjs.org/package/cyberia)
14
-
15
- </div>
16
-
17
1
  # Cyberia CLI
18
2
 
19
- **Path:** `bin/cyberia.js`
20
-
21
- ---
22
-
23
- ## Overview
24
-
25
- The Cyberia CLI (`cyberia`) is an extension of the **Underpost CLI** specifically for the Cyberia MMORPG ecosystem. Underpost is the end-to-end bare-metal infrastructure platform for general-purpose applications; `cyberia` extends it with tooling for the game's content pipeline, economy, and MMO engine toolchain. Unrecognized commands are transparently passed through to `underpost` for infrastructure operations.
26
-
27
- The CLI manages:
28
-
29
- - **Object Layer (`ol`)** — import, generate, and manage game item definitions and sprite atlases.
30
- - **Instance (`instance`)** — export/import/seed game instance data (maps, entities, configs).
31
- - **Chain (`chain`)** — Hyperledger Besu deployment and ERC-1155 ObjectLayerToken lifecycle.
32
- - **Run-Workflow (`run-workflow`)** — execute named operational scripts (seed defaults, build manifests).
33
-
34
- ---
3
+ `cyberia` (`bin/cyberia.js`) is the Cyberia-specific extension layer on top of the `underpost` CLI. Use
4
+ it for MMO content and extension workflows; use `underpost` for the shared platform, deployment, and
5
+ infrastructure surface. Unrecognized commands pass through to `underpost`.
35
6
 
36
- ## Global Usage
7
+ This page is intentionally command-first: keep it aligned with the shipped CLI surface and avoid
8
+ repeating architecture prose unless it changes command behavior.
37
9
 
38
10
  ```bash
39
11
  node bin/cyberia.js <command> [subcommand] [options]
40
- # or if installed globally:
12
+ # or, installed globally:
41
13
  cyberia <command> [subcommand] [options]
42
14
  ```
43
15
 
16
+ | Command | Purpose |
17
+ | -------------- | --------------------------------------------------------------------- |
18
+ | `ol` | object-layer content import, procedural generation, atlas/sprite work |
19
+ | `instance` | export / import / drop a Cyberia instance and its related documents |
20
+ | `client-hints` | per-instance presentation hints (palette, camera, status icons) |
21
+ | `chain` | Hyperledger Besu network + ERC-1155 `ObjectLayerToken` lifecycle |
22
+ | `run-workflow` | named operational scripts (seed defaults, build manifests/dashboard) |
23
+
24
+ Most data commands resolve the target DB from `DEFAULT_DEPLOY_ID` / `DEFAULT_DEPLOY_HOST` /
25
+ `DEFAULT_DEPLOY_PATH` in the `--env-path` file (default `./.env`). `--dev` forces the deploy's
26
+ `.env.development` (localhost IPFS, etc.); `--mongo-host` overrides the Mongo host.
27
+
44
28
  ---
45
29
 
46
- ## `cyberia ol` — Object Layer Management
30
+ ## `cyberia ol` — object layer
47
31
 
48
- Manages the Object Layer content pipeline: import PNG assets, generate procedural layers, build atlas sprite sheets, and push to IPFS/MongoDB.
32
+ Import PNG assets, generate procedural layers, build atlas sprite sheets, push to IPFS + MongoDB.
49
33
 
50
34
  ```bash
51
35
  cyberia ol [item-id] [options]
52
36
  ```
53
37
 
54
- ### Options
55
-
56
- | Option | Description |
57
- | ------------------------------- | --------------------------------------------------------------------------------------------- |
58
- | `--import` | Import specific item-id(s) (comma-separated) from the PNG asset directory into MongoDB + IPFS |
59
- | `--import-types [types]` | Batch import by type (e.g. `skin,floor`) or `all` |
60
- | `--generate` | Generate procedural layers for a semantic item-id (see Semantic Registry below) |
61
- | `--count <n>` | Shape element count multiplier for `--generate` (default: `3`) |
62
- | `--seed <seed>` | Deterministic seed string for `--generate` (e.g. `fx-42`) |
63
- | `--frame-index <n>` | Starting frame index for `--generate` (default: `0`) |
64
- | `--frame-count <n>` | Number of frames to generate for `--generate` (default: `1`) |
65
- | `--density <0..1>` | Shape density factor for `--generate` (default: `0.5`) |
66
- | `--to-atlas-sprite-sheet [dim]` | Convert ObjectLayer frames to a consolidated atlas PNG |
67
- | `--show-atlas-sprite-sheet` | Display the atlas PNG for the given item-id |
68
- | `--show-frame [dir_frame]` | View a single frame (e.g. `08_0`; default: `08_0`) |
69
- | `--drop` | Drop existing data before importing |
70
- | `--client-public` | With `--drop`: also remove static client asset folders |
71
- | `--git-clean` | With `--drop`: run clean on the cyberia asset directory |
72
- | `--dev` | Force development env (uses `.env.development` for localhost IPFS) |
73
- | `--env-path <path>` | Path to `.env` file (e.g. `./engine-private/conf/dd-cyberia/.env.development`) |
74
- | `--mongo-host <host>` | MongoDB host override |
75
- | `--storage-file-path <path>` | Storage filter JSON path override |
76
-
77
- ### Examples
38
+ | Option | Description |
39
+ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
40
+ | `--import` | Import specific item-id(s), comma-separated, from the asset directory |
41
+ | `--import-types [types]` | Batch import by type (e.g. `skin,floors`) or `all` |
42
+ | `--generate` | Generate procedural layers from a semantic item-id (e.g. `floor-desert`) |
43
+ | `--count <n>` / `--density <0..1>` | Shape count multiplier (default `3`) / density (default `0.5`) |
44
+ | `--seed <seed>` | Deterministic seed for `--generate` (e.g. `fx-42`) |
45
+ | `--frame-index <n>` / `--frame-count <n>` | Start frame (default `0`) / frame count (default `1`) |
46
+ | `--to-atlas-sprite-sheet [dim]` | Build a consolidated atlas PNG for the item |
47
+ | `--show-frame [dir_frame]` | View one frame (e.g. `08_0`; default `08_0`) |
48
+ | `--show-atlas-sprite-sheet` | Display the atlas PNG for the item |
49
+ | `--drop` | Drop existing data before importing (or standalone) |
50
+ | `--client-public` / `--git-clean` | With `--drop`: also remove static asset folders / run clean |
51
+ | `--env-path <path>` · `--mongo-host <host>` · `--dev` · `--storage-file-path <path>` | env / DB / dev / filter overrides |
78
52
 
79
53
  ```bash
80
- # Import a single item from PNG source
81
- cyberia ol hatchet --import --env-path ./engine-private/conf/dd-cyberia/.env.development
54
+ # Import specific items
55
+ cyberia ol hatchet,sword --import --env-path ./engine-private/conf/dd-cyberia/.env.development
82
56
 
83
- # Import all items of type 'skin' and 'floor'
84
- cyberia ol --import-types skin,floor
85
-
86
- # Import all types
57
+ # Batch import by type, or everything
58
+ cyberia ol --import-types skin,floors
87
59
  cyberia ol --import-types all
88
60
 
89
- # Generate a procedural floor tile (desert biome, seed fx-42)
61
+ # Procedural generation
90
62
  cyberia ol floor-desert --generate --seed fx-42
63
+ cyberia ol floor-grass --generate --frame-count 4 --count 5 --density 0.7
91
64
 
92
- # Generate 4 frames of a procedural floor with custom count and density
93
- cyberia ol floor-grass --generate --frame-count 4 --count 5 --density 0.7
94
-
95
- # Generate a character skin
96
- cyberia ol skin-dark-001 --generate --seed my-seed
97
-
98
- # View a specific frame of an item
99
- cyberia ol hatchet --show-frame 08_0
100
-
101
- # Rebuild atlas sprite sheet for an item
65
+ # Atlas / inspect
102
66
  cyberia ol hatchet --to-atlas-sprite-sheet
67
+ cyberia ol hatchet --show-frame 08_0
103
68
 
104
- # Drop and re-import a single item
105
- cyberia ol hatchet --drop --import
106
- ```
107
-
108
- ---
109
-
110
- ## Semantic Item-ID Registry
111
-
112
- The `--generate` flag uses item-id prefixes to look up a procedural descriptor from the semantic registry.
113
-
114
- ### Floor Prefixes
115
-
116
- | Prefix | Biome | Description |
117
- | -------------- | ------ | ----------------------------------------------- |
118
- | `floor-desert` | Desert | Sandy, arid tile with warm yellow/brown palette |
119
- | `floor-grass` | Grass | Meadow tile with green/earth tones |
120
- | `floor-water` | Water | Ocean/lake tile with blue/teal palette |
121
- | `floor-stone` | Stone | Rock/cobble tile with grey palette |
122
- | `floor-lava` | Lava | Magma tile with red/orange palette |
123
-
124
- ### Skin Prefixes
125
-
126
- | Prefix | Description |
127
- | -------------- | ----------------------------------------------- |
128
- | `skin-random` | Fully random skin tone and hair |
129
- | `skin-dark` | Dark skin tones |
130
- | `skin-light` | Light / pale skin tones |
131
- | `skin-vivid` | Vivid / exotic hair colours (blue, red, green…) |
132
- | `skin-natural` | Natural hair colours (brown, blond, grey…) |
133
- | `skin-shaved` | Shaved / bald head — no hair |
134
-
135
- ### Resource Prefixes
136
-
137
- Resource prefixes follow the pattern `resource-{biome}-{shape}`:
138
-
139
- | Shape Family | Description |
140
- | ------------ | -------------------------------------- |
141
- | `petal` | Parabolic arc shapes — coloured petals |
142
- | `stone` | Hard, angular mineral shapes |
143
- | `polygon` | Crystal/geometric faceted shapes |
144
- | `thread` | Thin, wispy Bézier lines |
145
-
146
- **Biomes:** `desert`, `grass`, `water`, `stone`, `lava`
147
-
148
- **Full matrix (20 prefixes):**
149
-
150
- ```
151
- resource-desert-petal resource-grass-petal resource-water-petal
152
- resource-desert-stone resource-grass-stone resource-water-stone
153
- resource-desert-polygon resource-grass-polygon resource-water-polygon
154
- resource-desert-thread resource-grass-thread resource-water-thread
155
-
156
- resource-stone-petal resource-lava-petal
157
- resource-stone-stone resource-lava-stone
158
- resource-stone-polygon resource-lava-polygon
159
- resource-stone-thread resource-lava-thread
69
+ # Drop + re-import a single item, including static folders
70
+ cyberia ol hatchet --drop --client-public --import
160
71
  ```
161
72
 
162
73
  ---
163
74
 
164
- ## `cyberia instance` — Instance Management
75
+ ## `cyberia instance` — instance data
165
76
 
166
- Manages game instance documents (maps, entities, actions, quests, skill config) in MongoDB.
77
+ Export / import / drop a game instance and its related maps, entities, actions, quests, and object
78
+ layers in MongoDB.
167
79
 
168
80
  ```bash
169
81
  cyberia instance [instance-code] [options]
170
82
  ```
171
83
 
172
- ### Options
173
-
174
- | Option | Description |
175
- | --------------------- | ----------------------------------------------------------------------------------------------------------------- |
176
- | `--export [path]` | Export instance and all related documents to a backup directory |
177
- | `--import [path]` | Import instance documents from a backup directory (upsert, preserves UUIDs) |
178
- | `--conf` | With `--export`/`--import`: only process instance and instance-conf documents (skip maps, entities, ObjectLayers) |
179
- | `--drop` | Drop all documents associated with the instance code |
180
- | `--env-path <path>` | Path to `.env` file |
181
- | `--mongo-host <host>` | MongoDB host override |
182
- | `--dev` | Force development environment |
183
-
184
- ### Examples
84
+ | Option | Description |
85
+ | ----------------------------------------------------- | ----------------------------------------------------------------------- |
86
+ | `--export [path]` | Export instance and related documents to a backup directory |
87
+ | `--import [path]` | Import from a backup directory (upsert, preserves UUIDs) |
88
+ | `--conf` | With `--export`/`--import`: only `cyberia-instance.json` + `-conf.json` |
89
+ | `--drop` | Drop all documents associated with the instance code |
90
+ | `--env-path <path>` · `--mongo-host <host>` · `--dev` | env / DB / dev overrides |
185
91
 
186
92
  ```bash
187
- # Export instance to backup
188
- cyberia instance cyberia-main --export ./backups/cyberia-main
189
-
190
- # Import instance from backup
191
- cyberia instance cyberia-main --import ./backups/cyberia-main
192
-
193
- # Drop instance data
194
- cyberia instance cyberia-main --drop
93
+ cyberia instance FOREST --export ./backups/FOREST
94
+ cyberia instance FOREST --import ./backups/FOREST
95
+ cyberia instance FOREST --drop
195
96
  ```
196
97
 
197
98
  ---
198
99
 
199
- ## `cyberia chain` — Blockchain Lifecycle
200
-
201
- Full lifecycle management for the Hyperledger Besu network and `ObjectLayerToken` ERC-1155 contract.
202
-
203
- ### Network Commands
100
+ ## `cyberia client-hints` — presentation hints
204
101
 
205
- #### `cyberia chain deploy`
206
-
207
- Deploy a new Hyperledger Besu IBFT2 network to Kubernetes:
208
-
209
- ```bash
210
- cyberia chain deploy [options]
211
- ```
212
-
213
- | Option | Default | Description |
214
- | ------------------------ | -------------------------- | ----------------------------------------- |
215
- | `--validators <n>` | `4` | Number of IBFT2 validators |
216
- | `--chain-id <id>` | `777771` | EVM chain ID |
217
- | `--block-period <s>` | `5` | IBFT2 block period in seconds |
218
- | `--epoch-length <n>` | `30000` | IBFT2 epoch length |
219
- | `--besu-image <img>` | `hyperledger/besu:24.12.1` | Besu container image |
220
- | `--node-port-rpc <port>` | `30545` | Kubernetes NodePort for JSON-RPC |
221
- | `--node-port-ws <port>` | `30546` | Kubernetes NodePort for WebSocket |
222
- | `--namespace <ns>` | `besu` | Kubernetes namespace |
223
- | `--pull-image` | — | Pull Besu images before deploying |
224
- | `--skip-generate` | — | Use existing `manifests/besu/` as-is |
225
- | `--skip-wait` | — | Skip waiting for validators to be Running |
226
-
227
- #### `cyberia chain remove`
228
-
229
- Remove the Besu network from Kubernetes:
102
+ Manage the per-instance `CyberiaClientHints` document (palette, camera, status icons, interpolation).
103
+ These are presentation overrides only — never an instance or server identifier.
230
104
 
231
105
  ```bash
232
- cyberia chain remove [--namespace besu] [--clean-keys] [--clean-manifests]
106
+ cyberia client-hints [instance-code] [options]
233
107
  ```
234
108
 
235
- #### `cyberia chain generate-manifests`
236
-
237
- Generate Kubernetes manifests without deploying:
109
+ | Option | Description |
110
+ | ----------------------------------------------------- | ----------------------------------------------- |
111
+ | `--seed-defaults` | Upsert canonical presentation-hint defaults |
112
+ | `--export [path]` | Export the hints document to JSON |
113
+ | `--import [path]` | Upsert hints from a JSON file |
114
+ | `--drop` | Remove the hints document for the instance code |
115
+ | `--env-path <path>` · `--mongo-host <host>` · `--dev` | env / DB / dev overrides |
238
116
 
239
117
  ```bash
240
- cyberia chain generate-manifests [options] # same options as deploy
118
+ cyberia client-hints cyberia-main --seed-defaults
119
+ cyberia client-hints cyberia-main --export ./client-hints-cyberia-main.json
241
120
  ```
242
121
 
243
122
  ---
244
123
 
245
- ### Contract Commands
246
-
247
- #### `cyberia chain compile`
248
-
249
- Compile the Solidity contracts:
250
-
251
- ```bash
252
- cyberia chain compile
253
- ```
124
+ ## `cyberia chain` — Besu + ObjectLayerToken
254
125
 
255
- #### `cyberia chain deploy-contract`
126
+ Hyperledger Besu IBFT2 network and ERC-1155 `ObjectLayerToken` (CKY) lifecycle.
256
127
 
257
- Deploy `ObjectLayerToken` to a Besu network (mints 10M CKY to the coinbase address):
128
+ ### Network
258
129
 
259
130
  ```bash
260
- cyberia chain deploy-contract --network besu-k8s
131
+ cyberia chain deploy [options] # deploy IBFT2 network to Kubernetes
132
+ cyberia chain generate-manifests [opts] # generate manifests without deploying (same options)
133
+ cyberia chain remove [--namespace besu] [--clean-keys] [--clean-manifests]
261
134
  ```
262
135
 
263
- | Option | Default | Description |
264
- | ------------------ | ---------- | ------------------------------------------------------------ |
265
- | `--network <name>` | `besu-k8s` | Hardhat network name (`besu-ibft2`, `besu-qbft`, `besu-k8s`) |
136
+ Key `deploy` options: `--validators <n>` (4) · `--chain-id <id>` (777771) · `--block-period <s>` (5) ·
137
+ `--epoch-length <n>` (30000) · `--besu-image <img>` · `--node-port-rpc <port>` (30545) ·
138
+ `--node-port-ws <port>` (30546) · `--namespace <ns>` (besu) · `--pull-image` · `--skip-generate` ·
139
+ `--skip-wait`.
266
140
 
267
- #### `cyberia chain test`
268
-
269
- Run the Hardhat contract test suite:
141
+ ### Contract
270
142
 
271
143
  ```bash
144
+ cyberia chain compile
272
145
  cyberia chain test
146
+ cyberia chain deploy-contract --network besu-k8s # deploys ObjectLayerToken, mints initial CKY
273
147
  ```
274
148
 
275
- ---
276
-
277
- ### Key Management
278
-
279
- #### `cyberia chain key-gen`
280
-
281
- Generate a new secp256k1 Ethereum key pair for the coinbase deployer account:
282
-
283
- ```bash
284
- cyberia chain key-gen
285
- # Output: address + private key + key file written to engine-private/
286
- ```
287
-
288
- #### `cyberia chain set-coinbase`
289
-
290
- Set the active coinbase key used for contract deployment and minting:
149
+ ### Keys
291
150
 
292
151
  ```bash
152
+ cyberia chain key-gen # new secp256k1 deployer key
293
153
  cyberia chain set-coinbase --private-key 0xYOUR_KEY
294
154
  cyberia chain set-coinbase --from-file ./engine-private/eth-networks/besu/<address>.key.json
295
155
  ```
296
156
 
297
- ---
298
-
299
- ### Token Commands
300
-
301
- #### `cyberia chain register`
302
-
303
- Register a single Object Layer item on-chain:
304
-
305
- ```bash
306
- cyberia chain register <item-id> [options]
307
- ```
308
-
309
- | Option | Default | Description |
310
- | ---------------------- | ---------- | ----------------------------------------------------- |
311
- | `--from-db` | — | Resolve canonical IPFS CID from MongoDB (recommended) |
312
- | `--metadata-cid <cid>` | `""` | Manual CID override (ignored when `--from-db` is set) |
313
- | `--supply <n>` | `1` | Initial token supply (1 = NFT, >1 = semi-fungible) |
314
- | `--network <name>` | `besu-k8s` | Hardhat network name |
315
- | `--env-path <path>` | `./.env` | Path to `.env` file |
316
- | `--mongo-host <host>` | — | MongoDB host override |
317
-
318
- ```bash
319
- # Register unique NFT item (non-fungible)
320
- cyberia chain register legendary-hatchet --from-db --supply 1
321
-
322
- # Register stackable resource (semi-fungible)
323
- cyberia chain register gold-ore --from-db --supply 1000000
324
- ```
325
-
326
- #### `cyberia chain batch-register`
327
-
328
- Register multiple items in a single batch transaction:
329
-
330
- ```bash
331
- cyberia chain batch-register --from-db --items '[{"itemId":"wood","supply":500000},{"itemId":"stone","supply":500000}]'
332
- ```
333
-
334
- #### `cyberia chain mint`
335
-
336
- Mint additional tokens for an existing token ID:
337
-
338
- ```bash
339
- cyberia chain mint --token-id 0 --to 0xABCD...1234 --amount 1000000000000000000000
340
- cyberia chain mint --token-id <tokenId> --to <address> --amount <uint256>
341
- ```
342
-
343
- #### `cyberia chain balance`
344
-
345
- Query the token balance of an address:
346
-
347
- ```bash
348
- cyberia chain balance --address 0xABCD...1234 --token-id 0
349
- ```
350
-
351
- #### `cyberia chain transfer`
352
-
353
- Transfer tokens between addresses:
157
+ ### Tokens
354
158
 
355
159
  ```bash
160
+ cyberia chain register <item-id> --from-db --supply 1 # 1 = NFT, >1 = semi-fungible
161
+ cyberia chain batch-register --from-db --items '[{"itemId":"wood","supply":500000}]'
162
+ cyberia chain mint --token-id 0 --to 0xABCD... --amount 1000000000000000000000
356
163
  cyberia chain transfer --from 0x... --to 0x... --token-id 0 --amount 1000
357
- ```
358
-
359
- #### `cyberia chain burn`
360
-
361
- Burn tokens from an address:
362
-
363
- ```bash
364
- cyberia chain burn --token-id 0 --amount 500 --address 0x...
365
- ```
366
-
367
- #### `cyberia chain status`
368
-
369
- Query chain and contract status:
370
-
371
- ```bash
372
- cyberia chain status [--network besu-k8s]
373
- # Outputs: chain ID, block number, CKY total supply, deployer address, pause state
374
- ```
375
-
376
- #### `cyberia chain pause` / `cyberia chain unpause`
377
-
378
- Emergency transfer freeze / resume (owner only):
379
-
380
- ```bash
381
- cyberia chain pause [--network besu-k8s]
164
+ cyberia chain burn --token-id 0 --address 0x... --amount 500
165
+ cyberia chain balance --address 0xABCD... --token-id 0
166
+ cyberia chain status [--network besu-k8s] # chain id, block, supply, pause state
167
+ cyberia chain pause [--network besu-k8s] # owner-only transfer freeze / resume
382
168
  cyberia chain unpause [--network besu-k8s]
383
169
  ```
384
170
 
171
+ `--from-db` resolves the canonical IPFS CID from MongoDB (recommended over manual `--metadata-cid`).
172
+
385
173
  ---
386
174
 
387
- ## `cyberia run-workflow` — Operational Scripts
175
+ ## `cyberia run-workflow` — operational scripts
388
176
 
389
- Pre-built operational workflows for seeding and maintenance:
177
+ Named scripts from the `scripts/` directory for seeding and build maintenance.
390
178
 
391
- | Subcommand | Description |
392
- | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
393
- | `import-default-items` | Import the canonical default item set (`DefaultCyberiaItems`) into MongoDB + IPFS, then seed skill config and dialogues |
394
- | `seed-skill-config` | Upsert `DefaultSkillConfig` into `CyberiaInstanceConf` for the target instance |
395
- | `seed-dialogues` | Upsert `DefaultCyberiaDialogues` (NPC dialogue lines) into the `cyberia-dialogue` collection |
396
- | `generate-semantic-examples` | Generate procedural examples for skin prefixes (`skin-*`); floor and resource generation is available but commented out by default |
397
- | `build-manifest` | Build Kubernetes Deployment + Service YAML manifests for mmo-client and mmo-server instances (kubeadm + kind variants) |
179
+ | Subcommand | Description |
180
+ | ---------------------------- | ----------------------------------------------------------------------------------- |
181
+ | `import-default-items` | Import default object layers, skill config, dialogues, client-hints to Mongo |
182
+ | `seed-skill-config` | Upsert `DefaultSkillConfig` into a `CyberiaInstance` (`--instance-code`) |
183
+ | `seed-dialogues` | Upsert `DefaultCyberiaDialogues` into the `cyberia-dialogue` collection |
184
+ | `generate-semantic-examples` | Generate one procedural example per registered semantic prefix |
185
+ | `build-manifest` | Build K8s Deployment + Service manifests for mmo-client / mmo-server |
186
+ | `build-server-dashboard` | Build the static cyberia-server metrics/status dashboard (`--dev`, `--output-path`) |
398
187
 
399
188
  ```bash
400
189
  cyberia run-workflow import-default-items --env-path ./engine-private/conf/dd-cyberia/.env.development
401
- cyberia run-workflow seed-skill-config --env-path ./engine-private/conf/dd-cyberia/.env.development
190
+ cyberia run-workflow seed-skill-config --instance-code default
191
+ cyberia run-workflow generate-semantic-examples
402
192
  cyberia run-workflow build-manifest
193
+ cyberia run-workflow build-server-dashboard
403
194
  ```
404
195
 
405
196
  ---
406
197
 
407
- ## Environment Variables
408
-
409
- The CLI respects the following environment variables (typically loaded from an `--env-path` file):
198
+ ## Operational rules
410
199
 
411
- | Variable | Description |
412
- | --------------------- | ---------------------------------------------------------------- |
413
- | `DEFAULT_DEPLOY_ID` | Engine deployment ID resolves to `engine-private/conf/{id}/` |
414
- | `DEFAULT_DEPLOY_HOST` | Deploy host (used to index the conf object) |
415
- | `DEFAULT_DEPLOY_PATH` | Deploy path (used to index the conf object) |
416
- | `MONGODB_URI` | MongoDB connection string (loaded from conf if not set directly) |
417
- | `IPFS_API_URL` | IPFS API URL for pinning (e.g. `http://localhost:5001`) |
200
+ - Preserve public CLI entrypoints and command names unless a change is intentionally breaking.
201
+ - Reuse existing helpers for config loading, env resolution, path normalization, and deploy selection.
202
+ - Prefer one source of truth for generated manifests, deploy IDs, runtime choice, and asset metadata.
203
+ - Treat generated artifacts (atlases, manifests, dashboard HTML) as outputs only; never hand-edit them.
204
+ - `engine-private/` is a private external dependency; never assume its contents exist locally.