cyberia 3.2.22 → 3.2.70

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 (185) hide show
  1. package/.env.example +127 -68
  2. package/.github/workflows/cyberia-client.cd.yml +40 -0
  3. package/.github/workflows/cyberia-server.cd.yml +40 -0
  4. package/.github/workflows/docker-image.cyberia-client.ci.yml +49 -0
  5. package/.github/workflows/docker-image.cyberia-client.dev.ci.yml +48 -0
  6. package/.github/workflows/docker-image.cyberia-server.ci.yml +69 -0
  7. package/.github/workflows/docker-image.cyberia-server.dev.ci.yml +69 -0
  8. package/.github/workflows/docker-image.engine-cyberia.ci.yml +52 -0
  9. package/.github/workflows/docker-image.engine-cyberia.dev.ci.yml +52 -0
  10. package/.github/workflows/engine-cyberia.cd.yml +33 -24
  11. package/.github/workflows/engine-cyberia.ci.yml +13 -3
  12. package/.github/workflows/ghpkg.ci.yml +88 -1
  13. package/.github/workflows/gitlab.ci.yml +1 -1
  14. package/.github/workflows/hardhat.ci.yml +1 -1
  15. package/.github/workflows/npmpkg.ci.yml +10 -7
  16. package/.github/workflows/publish.ci.yml +2 -2
  17. package/.github/workflows/publish.cyberia.ci.yml +5 -16
  18. package/.github/workflows/pwa-microservices-template-page.cd.yml +1 -8
  19. package/.github/workflows/pwa-microservices-template-test.ci.yml +1 -1
  20. package/CHANGELOG.md +301 -1
  21. package/CLI-HELP.md +71 -6
  22. package/Dockerfile +141 -43
  23. package/Dockerfile.dev +143 -0
  24. package/Dockerfile.test +165 -0
  25. package/README.md +1 -1
  26. package/baremetal/commission-workflows.json +1 -0
  27. package/bin/build.js +31 -0
  28. package/bin/cyberia.js +1080 -184
  29. package/bin/deploy.js +2 -2
  30. package/bin/index.js +1080 -184
  31. package/bump.config.js +1 -0
  32. package/compose.env +131 -0
  33. package/conf.js +18 -1
  34. package/deployment.yaml +2 -2
  35. package/docker-compose.yml +316 -0
  36. package/hardhat/hardhat.config.js +2 -2
  37. package/hardhat/package-lock.json +620 -2041
  38. package/hardhat/package.json +7 -5
  39. package/hardhat/scripts/deployObjectLayerToken.js +18 -18
  40. package/hardhat/test/ObjectLayerToken.js +378 -274
  41. package/ipfs/configure-ipfs.sh +13 -0
  42. package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +1 -1
  43. package/manifests/cronjobs/dd-cron/dd-cron-dns.yaml +1 -1
  44. package/manifests/deployment/dd-cyberia-development/deployment.yaml +2 -2
  45. package/manifests/deployment/dd-cyberia-development/grpc-service.yaml +17 -0
  46. package/manifests/deployment/dd-cyberia-development/pv-pvc.yaml +32 -0
  47. package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
  48. package/mongodb/entrypoint.sh +76 -0
  49. package/nginx.conf +87 -0
  50. package/package.json +31 -19
  51. package/pv-pvc.yaml +32 -0
  52. package/scripts/disk-clean.sh +85 -60
  53. package/scripts/kubeadm-node-setup.sh +317 -0
  54. package/scripts/rocky-kickstart.sh +877 -185
  55. package/scripts/rpmfusion-ffmpeg-setup.sh +26 -50
  56. package/scripts/test-monitor.sh +3 -5
  57. package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.router.js +43 -7
  58. package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.service.js +17 -25
  59. package/src/api/cyberia-action/cyberia-action.controller.js +19 -0
  60. package/src/api/cyberia-action/cyberia-action.model.js +21 -29
  61. package/src/api/cyberia-action/cyberia-action.router.js +42 -7
  62. package/src/api/cyberia-action/cyberia-action.service.js +20 -4
  63. package/src/api/cyberia-client-hints/cyberia-client-hints.model.js +58 -57
  64. package/src/api/cyberia-dialogue/cyberia-dialogue.router.js +37 -6
  65. package/src/api/cyberia-dialogue/cyberia-dialogue.service.js +8 -2
  66. package/src/api/cyberia-entity/cyberia-entity.router.js +39 -7
  67. package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.controller.js +74 -0
  68. package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.model.js +67 -0
  69. package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.router.js +63 -0
  70. package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.service.js +46 -0
  71. package/src/api/cyberia-instance/cyberia-fallback-world.js +62 -10
  72. package/src/api/cyberia-instance/cyberia-instance.model.js +32 -2
  73. package/src/api/cyberia-instance/cyberia-instance.router.js +6 -6
  74. package/src/api/cyberia-instance/cyberia-world-generator.js +116 -3
  75. package/src/api/cyberia-instance-conf/cyberia-instance-conf.model.js +3 -0
  76. package/src/api/cyberia-instance-conf/cyberia-instance-conf.router.js +39 -7
  77. package/src/api/cyberia-map/cyberia-map.router.js +21 -6
  78. package/src/api/cyberia-quest/cyberia-quest.controller.js +38 -0
  79. package/src/api/cyberia-quest/cyberia-quest.router.js +47 -7
  80. package/src/api/cyberia-quest/cyberia-quest.service.js +59 -4
  81. package/src/api/cyberia-saga/cyberia-saga.controller.js +74 -0
  82. package/src/api/cyberia-saga/cyberia-saga.model.js +59 -0
  83. package/src/api/cyberia-saga/cyberia-saga.router.js +63 -0
  84. package/src/api/cyberia-saga/cyberia-saga.service.js +42 -0
  85. package/src/api/cyberia-server-defaults/cyberia-server-defaults.js +551 -129
  86. package/src/api/cyberia-skill/cyberia-skill.controller.js +74 -0
  87. package/src/api/cyberia-skill/cyberia-skill.model.js +50 -0
  88. package/src/api/cyberia-skill/cyberia-skill.router.js +63 -0
  89. package/src/api/cyberia-skill/cyberia-skill.service.js +42 -0
  90. package/src/api/ipfs/ipfs.service.js +28 -15
  91. package/src/api/object-layer/object-layer.router.js +25 -15
  92. package/src/api/object-layer/object-layer.service.js +15 -20
  93. package/src/api/object-layer-render-frames/object-layer-render-frames.router.js +39 -7
  94. package/src/cli/baremetal.js +717 -16
  95. package/src/cli/cluster.js +80 -5
  96. package/src/cli/deploy.js +127 -11
  97. package/src/cli/docker-compose.js +648 -0
  98. package/src/cli/env.js +11 -2
  99. package/src/cli/fs.js +75 -30
  100. package/src/cli/image.js +129 -51
  101. package/src/cli/index.js +110 -6
  102. package/src/cli/kickstart.js +142 -20
  103. package/src/cli/release.js +46 -4
  104. package/src/cli/repository.js +238 -33
  105. package/src/cli/run.js +520 -114
  106. package/src/cli/secrets.js +82 -48
  107. package/src/cli/ssh.js +234 -0
  108. package/src/cli/static.js +2 -2
  109. package/src/client/components/cyberia/ActionEngineCyberia.js +1867 -0
  110. package/src/client/components/cyberia/EntityEngineCyberia.js +585 -0
  111. package/src/client/components/cyberia/InstanceEngineCyberia.js +219 -13
  112. package/src/client/components/cyberia/MapEngineCyberia.js +154 -71
  113. package/src/client/components/cyberia/ObjectLayerEngineModal.js +40 -63
  114. package/src/client/components/cyberia/ObjectLayerEngineViewer.js +34 -20
  115. package/src/client/components/cyberia/SharedDefaultsCyberia.js +195 -4
  116. package/src/client/components/cyberia-portal/AppShellCyberiaPortal.js +66 -0
  117. package/src/client/components/cyberia-portal/RouterCyberiaPortal.js +8 -0
  118. package/src/client/components/cyberia-portal/TranslateCyberiaPortal.js +8 -0
  119. package/src/client/public/cyberia-docs/ACTION-SYSTEM.md +45 -27
  120. package/src/client/public/cyberia-docs/CYBERIA-CLI.md +3 -3
  121. package/src/client/public/cyberia-docs/CYBERIA-CLIENT.md +39 -22
  122. package/src/client/public/cyberia-docs/CYBERIA-LORE.md +88 -0
  123. package/src/client/public/cyberia-docs/CYBERIA-SAGA.md +394 -0
  124. package/src/client/public/cyberia-docs/CYBERIA-SERVER.md +8 -1
  125. package/src/client/public/cyberia-docs/CYBERIA.md +1 -1
  126. package/src/client/public/cyberia-docs/QUEST-SYSTEM.md +5 -5
  127. package/src/client/public/cyberia-docs/ROADMAP.md +1 -1
  128. package/src/client/public/cyberia-docs/WHITE-PAPER.md +1 -1
  129. package/src/client/services/cyberia-entity-type-default/cyberia-entity-type-default.service.js +99 -0
  130. package/src/client/services/cyberia-instance/cyberia-instance.management.js +2 -2
  131. package/src/client/services/cyberia-map/cyberia-map.management.js +2 -2
  132. package/src/client/services/cyberia-saga/cyberia-saga.service.js +99 -0
  133. package/src/client/services/cyberia-skill/cyberia-skill.service.js +99 -0
  134. package/src/client/services/object-layer/object-layer.management.js +6 -6
  135. package/src/{server → client-builder}/client-build-docs.js +15 -5
  136. package/src/{server → client-builder}/client-build-live.js +3 -3
  137. package/src/{server → client-builder}/client-build.js +25 -22
  138. package/src/{server → client-builder}/client-dev-server.js +3 -3
  139. package/src/{server → client-builder}/client-icons.js +2 -2
  140. package/src/{server → client-builder}/ssr.js +5 -5
  141. package/src/client.build.js +1 -3
  142. package/src/client.dev.js +1 -1
  143. package/src/db/mongo/MongoBootstrap.js +12 -12
  144. package/src/grpc/cyberia/grpc-server.js +255 -70
  145. package/src/index.js +12 -1
  146. package/src/mailer/EmailRender.js +1 -1
  147. package/src/{server → projects/cyberia}/atlas-sprite-sheet-generator.js +2 -2
  148. package/src/{server → projects/cyberia}/besu-genesis-generator.js +3 -3
  149. package/src/projects/cyberia/catalog-cyberia.js +81 -0
  150. package/src/projects/cyberia/gemini-client.js +175 -0
  151. package/src/projects/cyberia/generate-saga.js +2107 -0
  152. package/src/{server → projects/cyberia}/ipfs-client.js +2 -2
  153. package/src/{server → projects/cyberia}/object-layer.js +12 -108
  154. package/src/{server → projects/cyberia}/semantic-layer-generator-floor.js +1 -1
  155. package/src/{server → projects/cyberia}/semantic-layer-generator-resource.js +1 -1
  156. package/src/{server → projects/cyberia}/semantic-layer-generator-skin.js +1 -1
  157. package/src/{server → projects/cyberia}/semantic-layer-generator.js +2 -2
  158. package/src/{server → projects/cyberia}/shape-generator.js +2 -2
  159. package/src/{server → projects/underpost}/catalog-underpost.js +1 -2
  160. package/src/runtime/cyberia-client/Dockerfile +27 -61
  161. package/src/runtime/cyberia-client/Dockerfile.dev +20 -12
  162. package/src/runtime/cyberia-server/Dockerfile +21 -20
  163. package/src/runtime/cyberia-server/Dockerfile.dev +17 -8
  164. package/src/runtime/engine-cyberia/Dockerfile +143 -0
  165. package/src/runtime/engine-cyberia/Dockerfile.dev +143 -0
  166. package/src/runtime/engine-cyberia/Dockerfile.test +165 -0
  167. package/src/runtime/engine-cyberia/compose.env +131 -0
  168. package/src/runtime/engine-cyberia/docker-compose.yml +316 -0
  169. package/src/runtime/engine-cyberia/ipfs/configure-ipfs.sh +13 -0
  170. package/src/runtime/engine-cyberia/mongodb/entrypoint.sh +76 -0
  171. package/src/runtime/engine-cyberia/nginx.conf +87 -0
  172. package/src/runtime/express/Express.js +2 -2
  173. package/src/runtime/nginx/Nginx.js +250 -0
  174. package/src/server/catalog.js +9 -14
  175. package/src/server/conf.js +3 -6
  176. package/src/server/runtime-status.js +18 -1
  177. package/src/server/start.js +12 -2
  178. package/src/server.js +6 -2
  179. package/test/cyberia-instance-conf-defaults.test.js +140 -0
  180. package/test/deploy-monitor.test.js +26 -10
  181. package/test/shape-generator.test.js +7 -1
  182. package/typedoc.dd-cyberia.json +3 -1
  183. package/typedoc.json +3 -1
  184. /package/src/client/ssr/{Render.js → RootDocument.js} +0 -0
  185. /package/src/{server → client-builder}/client-formatted.js +0 -0
@@ -22,6 +22,14 @@ class TranslateCyberiaPortal {
22
22
  en: 'Cyberia Instance Engine',
23
23
  es: 'Cyberia Instance Engine',
24
24
  };
25
+ Translate.Data['cyberia-action-engine'] = {
26
+ en: 'Cyberia Action Engine',
27
+ es: 'Cyberia Action Engine',
28
+ };
29
+ Translate.Data['cyberia-entity-engine'] = {
30
+ en: 'Cyberia Entity Engine',
31
+ es: 'Cyberia Entity Engine',
32
+ };
25
33
  }
26
34
  }
27
35
 
@@ -27,11 +27,12 @@ CyberiaAction {
27
27
  sourceCellX: Number
28
28
  sourceCellY: Number
29
29
 
30
- // Identity — used to match quest objectives of type 'talk'
31
- provideItemId: String // entity's active skin ObjectLayer item ID (e.g. 'wason', 'alex')
30
+ // Identity — the NPC skin is derived from the `default-<skin>` dialogue code
31
+ // (no stored field); 'talk' objectives match the talked-to bot's active skin.
32
32
 
33
- // Quest grantfirst interaction with this NPC starts the linked quest chain
34
- grantQuestCode: String // empty = no quest granted
33
+ // Quest awardNOT stored on the action. The quest(s) this action awards are
34
+ // the CyberiaQuest documents whose (sourceMapCode, sourceCellX, sourceCellY)
35
+ // match this action's cell; the runtime offers the next acceptable one.
35
36
 
36
37
  // Dialogue
37
38
  dialogCode: String // greeting dialogue shown on tap
@@ -73,7 +74,7 @@ A single `code` groups many ordered dialogue lines. The C client fetches all lin
73
74
 
74
75
  | Type | Description | Active Payload |
75
76
  | ------------ | -------------------------------------------------------------- | ---------------------------------------------------- |
76
- | `quest-talk` | Grants a quest on first interaction, then shows dialogue | `grantQuestCode`, `dialogCode`, `questDialogueCodes` |
77
+ | `quest-talk` | Awards the quest bound to its cell (via Take Quest), shows dialogue | quests bound by cell, `dialogCode`, `questDialogueCodes` |
77
78
  | `talk` | NPC dialogue only — satisfies `talk` quest objectives | `dialogCode`, `questDialogueCodes` |
78
79
  | `shop` | Item shop — player buys items with in-game currency | `shopItems[]` |
79
80
  | `craft` | Crafting station — consume ingredients to produce output items | `craftRecipes[]` |
@@ -83,25 +84,26 @@ A single `code` groups many ordered dialogue lines. The C client fetches all lin
83
84
 
84
85
  ## Action–Quest Integration
85
86
 
86
- The Action System and Quest System are linked through `provideItemId` and `questDialogueCodes`:
87
+ The Action System and Quest System are linked by **cell** (the action and the
88
+ quest it awards share `sourceMapCode/sourceCellX/sourceCellY`) and by the NPC's
89
+ active **skin** (which `talk` objectives match):
87
90
 
88
91
  ```mermaid
89
92
  graph LR
90
- Quest["CyberiaQuest\nstep.objective:\n{ type: 'talk', itemId: 'wason' }"]
91
- Action["CyberiaAction\nprovideItemId: 'wason'\ngrantQuestCode: 'wason-intro'\nquestDialogueCodes: ['wason-intro']"]
93
+ Quest["CyberiaQuest\nsource cell: (12,10)\nstep.objective: { type: 'talk', itemId: 'wason' }"]
94
+ Action["CyberiaAction\nsource cell: (12,10)\nquestDialogueCodes: ['default-wason']"]
92
95
  Progress["CyberiaQuestProgress\nstep.objectiveProgress[i].current++"]
93
96
 
94
- Quest -->|matched by provideItemId| Action
97
+ Quest -->|same source cell| Action
95
98
  Action -->|player completes dialogue| Progress
96
99
  ```
97
100
 
98
101
  **Talk objective satisfaction flow:**
99
102
 
100
103
  1. Player taps NPC → interaction bubble shown.
101
- 2. Player taps interaction bubble → Action is fetched by spatial coordinates.
102
- 3. Client displays `dialogCode` dialogue sequence.
103
- 4. On first tap, if `grantQuestCode` is set server grants the quest.
104
- 5. After viewing all `questDialogueCodes` dialogue lines → server increments the matching `talk` objective's `current` counter.
104
+ 2. Player taps interaction bubble → `modal_interact` opens; the offered quest is the one bound to the NPC's cell.
105
+ 3. Accepting is explicit: the **Take Quest** button sends `quest_accept` and the server grants the acceptable quest bound to that cell (prerequisites met, not active/completed).
106
+ 4. Talk objectives advance only after the player reads **all** `questDialogueCodes` lines (`dlg_complete`), validated server-side; never by a button.
105
107
 
106
108
  ---
107
109
 
@@ -157,9 +159,11 @@ sequenceDiagram
157
159
  ## Dialogue Interaction Protocol (talk / quest-talk)
158
160
 
159
161
  Tapping an interaction bubble opens the Raylib-native **`modal_interact`** modal
160
- first the general-purpose entry point. Its `[Talk]` tab (shown only when the
161
- entity has dialogue) opens `modal_dialogue`; its `[Chat / Profile]` tab opens the
162
- JS overlay with no freeze.
162
+ (top half of the screen). It has a tab strip — **stack** (active item slots),
163
+ **stats** (six-stat stack totals), and **action** (mission interface, shown only
164
+ for action-provider entities, ESI 8) — over a fixed bottom bar of right-aligned
165
+ integration buttons (**Chat**, **Integration**) that open the JS overlay. The
166
+ action tab's **Talk / Take mission** opens `modal_dialogue` (bottom half).
163
167
 
164
168
  The client is identical for `talk` and `quest-talk`; the **server** branches after
165
169
  `dlg_complete`. The client never declares the action type, quest code, or quest
@@ -187,11 +191,13 @@ simulation state.
187
191
  1. Validate `player.activeDialogueEntityID == msg.entityId`; drop otherwise.
188
192
  2. Clear the dialogue context and thaw the player (modal protection off).
189
193
  3. Resolve the action from `actionCache[entityId]`. `talk` → ack only.
190
- 4. `quest-talk`: on first contact grant `grantQuestCode`; then for every active
191
- quest whose **current step** has a `{ type: 'talk', itemId == provideItemId }`
192
- objective, increment it — **only** when `msg.dialogCode` is in the action's
193
- `questDialogueCodes`. On quest completion, deliver rewards (FCT) and unlock
194
- successors.
194
+ 4. `quest-talk`: `dlg_complete` NEVER grants it advances every active quest
195
+ whose **current step** has a `{ type: 'talk', itemId == bot active skin }`
196
+ objective, **only** when `msg.dialogCode` is in the action's
197
+ `questDialogueCodes`. Granting is a separate explicit `quest_accept`, which
198
+ grants the acceptable quest bound to the NPC's cell. On quest completion,
199
+ deliver rewards (FCT); successors are NOT auto-granted (the player accepts
200
+ each from its NPC).
195
201
 
196
202
  > **Dialogue-code contract.** The C client fetches dialogue groups at
197
203
  > `/api/cyberia-dialogue/code/default-<itemId>`, so the code it reports on
@@ -208,6 +214,22 @@ simulation state.
208
214
 
209
215
  ---
210
216
 
217
+ ## Fallback World mission instantiation
218
+
219
+ The default mission system is playable in the procedural **Fallback World**.
220
+ `DefaultCyberiaActions` carry `sourceMapCode` / `sourceCellX` / `sourceCellY`
221
+ (all on `fallback-map-0`), and the world generator's
222
+ `generateActionProviderBots()` places one passive NPC bot per action at those
223
+ exact cells (skin = `provideItemId`, zero spawn/aggro radius). The fallback map
224
+ builder reserves those cells (dropping any overlapping obstacle) so the NPCs
225
+ always stand on walkable ground. The Go server then binds each bot back to its
226
+ action by `sourceMapCode + sourceCellX + sourceCellY` at instance init and keeps
227
+ an **ephemeral** per-session `CyberiaQuestProgress` (no persistence) — matching
228
+ the ROADMAP Road-to-Alpha-Open contract. `scp-2040` kill targets spawn from the
229
+ random bot pool, so the intro quest's talk → collect → kill loop is reachable.
230
+
231
+ ---
232
+
211
233
  ## Spatial Binding and Instance Init
212
234
 
213
235
  `sourceMapCode + sourceCellX + sourceCellY` links an Action to a specific entity cell in a specific map. During instance initialization:
@@ -257,8 +279,6 @@ The C client fetches the full `code` group sorted by `order`, then renders lines
257
279
  ```javascript
258
280
  // CyberiaAction
259
281
  { code: 1 } // unique
260
- { provideItemId: 1 }
261
- { grantQuestCode: 1 } // sparse
262
282
  { sourceMapCode: 1, sourceCellX: 1, sourceCellY: 1 }
263
283
 
264
284
  // CyberiaDialogue
@@ -278,10 +298,8 @@ The C client fetches the full `code` group sorted by `order`, then renders lines
278
298
  "sourceMapCode": "cyberia-village",
279
299
  "sourceCellX": 12,
280
300
  "sourceCellY": 8,
281
- "provideItemId": "wason",
282
- "grantQuestCode": "wason-intro",
283
- "dialogCode": "wason-intro",
284
- "questDialogueCodes": ["wason-intro"],
301
+ "dialogCode": "default-wason",
302
+ "questDialogueCodes": ["default-wason"],
285
303
  "shopItems": [],
286
304
  "craftRecipes": [],
287
305
  "storageSlots": 0
@@ -178,8 +178,8 @@ Named scripts from the `scripts/` directory for seeding and build maintenance.
178
178
 
179
179
  | Subcommand | Description |
180
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`) |
181
+ | `import-default-items` | Import default object layers, skills, dialogues, actions/quests, client-hints to Mongo |
182
+ | `seed-skills` | Upsert `DefaultSkillConfig` into the `cyberia-skill` collection (full records) |
183
183
  | `seed-dialogues` | Upsert `DefaultCyberiaDialogues` into the `cyberia-dialogue` collection |
184
184
  | `generate-semantic-examples` | Generate one procedural example per registered semantic prefix |
185
185
  | `build-manifest` | Build K8s Deployment + Service manifests for mmo-client / mmo-server |
@@ -187,7 +187,7 @@ Named scripts from the `scripts/` directory for seeding and build maintenance.
187
187
 
188
188
  ```bash
189
189
  cyberia run-workflow import-default-items --env-path ./engine-private/conf/dd-cyberia/.env.development
190
- cyberia run-workflow seed-skill-config --instance-code default
190
+ cyberia run-workflow seed-skills
191
191
  cyberia run-workflow generate-semantic-examples
192
192
  cyberia run-workflow build-manifest
193
193
  cyberia run-workflow build-server-dashboard
@@ -235,16 +235,22 @@ All requests are CORS-simple GETs (no preflight) and cacheable. None require cre
235
235
  ```bash
236
236
  cd cyberia-client
237
237
 
238
- # Development build
239
- make -f Web.mk clean && make -f Web.mk web
238
+ # Development build (defaults: BUILD_MODE=DEBUG, localhost URLs)
239
+ make -f Web.mk clean && make -f Web.mk all
240
240
 
241
- # Release build
242
- make -f Web.mk clean && make -f Web.mk web BUILD_MODE=RELEASE
241
+ # Release build — pass the production URLs explicitly (see note below)
242
+ make -f Web.mk clean && make -f Web.mk all BUILD_MODE=RELEASE \
243
+ WS_URL=wss://server.cyberiaonline.com/ws \
244
+ API_BASE=https://www.cyberiaonline.com
243
245
 
244
- # Build + serve on dev port :8082
245
- make -f Web.mk serve-development
246
+ # Build + serve locally on dev port :8082 (DEBUG, localhost)
247
+ ./dev-server.sh # or: ./dev-server.sh <port>
246
248
  ```
247
249
 
250
+ `WS_URL` and `API_BASE` are passed straight through to the compiler — see
251
+ [Compile-time configuration](#compile-time-configuration). When omitted they
252
+ default to `localhost`, so **production build pipelines must pass real URLs**.
253
+
248
254
  The build is part of the Underpost Platform static + PWA pipeline; production deploys go through `underpost client` and `underpost deploy`.
249
255
 
250
256
  ### Output
@@ -261,22 +267,33 @@ bin/
261
267
 
262
268
  ## Compile-time configuration
263
269
 
264
- `src/config.h`:
265
-
266
- | Constant | Default | Description |
267
- | --------------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
268
- | `WS_URL` | `wss://server.cyberiaonline.com/ws` | WebSocket endpoint of cyberia-server |
269
- | `API_BASE_URL` | `https://www.cyberiaonline.com` | engine-cyberia REST base URL |
270
- | `CYBERIA_CLIENT_HINTS_CODE` | `cyberia-main` | Lookup key for the optional client-hints fetch (presentation override key — never an instance/server identifier) |
271
- | `HTTP_TIMEOUT_SECONDS` | `10` | HTTP request timeout |
272
- | `MAX_TEXTURE_CACHE_SIZE` | `512` | Atlas texture LRU cap |
273
- | `MAX_LAYER_CACHE_SIZE` | `256` | ObjectLayer metadata LRU cap |
274
- | `MAX_ATLAS_CACHE_SIZE` | `256` | Atlas metadata LRU cap |
275
- | `DEFAULT_FRAME_DURATION_MS` | `100` | Default animation frame duration |
276
- | `ENABLE_DEV_UI` | `false` | Force dev overlay regardless of presentation hints |
277
- | `APP_VERSION` | `"1.0.0"` | Application version string |
278
-
279
- For local development, point `WS_URL` and `API_BASE_URL` at `localhost` before rebuilding.
270
+ ### Server URLs (build arguments)
271
+
272
+ `WS_URL` and `API_BASE` are `make` arguments baked into the WASM as
273
+ `-DWS_URL_OVERRIDE` / `-DAPI_BASE_URL_OVERRIDE`. There is **no** RELEASE/DEBUG URL
274
+ switch both default to `localhost` regardless of `BUILD_MODE`:
275
+
276
+ | make argument | Default | Baked macro |
277
+ | ------------- | ------------------------ | ----------------------- |
278
+ | `WS_URL` | `ws://localhost:8081/ws` | `WS_URL_OVERRIDE` |
279
+ | `API_BASE` | `http://localhost:4005` | `API_BASE_URL_OVERRIDE` |
280
+
281
+ > **Production pipelines must pass the URLs.** `BUILD_MODE=RELEASE` alone still
282
+ > yields `localhost`. Any release build the Docker image build, CI, manual
283
+ > release — must pass `WS_URL=wss://… API_BASE=https://…` as make arguments
284
+ > (or Docker build-args wired through to `make`), or the client ships pointing
285
+ > at localhost. If unset, `src/config.h` falls back to bare `"ws://"` /
286
+ > `"https://"` stubs.
287
+
288
+ ### Constants (`src/config.h`)
289
+
290
+ | Constant | Default | Description |
291
+ | --------------------------- | -------------- | ---------------------------------------------------------------------------------------------------------------- |
292
+ | `CYBERIA_CLIENT_HINTS_CODE` | `cyberia-main` | Lookup key for the optional client-hints fetch (presentation override key — never an instance/server identifier) |
293
+ | `MAX_TEXTURE_CACHE_SIZE` | `512` | Atlas texture LRU cap |
294
+ | `MAX_LAYER_CACHE_SIZE` | `256` | ObjectLayer metadata LRU cap |
295
+ | `MAX_ATLAS_CACHE_SIZE` | `256` | Atlas metadata LRU cap |
296
+ | `DEFAULT_FRAME_DURATION_MS` | `100` | Default animation frame duration |
280
297
 
281
298
  ---
282
299
 
@@ -0,0 +1,88 @@
1
+ # **Cyberia Lore — The Frontier of Hyperspace**
2
+
3
+ ### **Setting: Year 2520+**
4
+
5
+ Earth is a ruined monument to humanity’s first age. Civilization now spans broken continents, orbital fortresses, lunar citadels, asteroid enclaves, and distant colonies. From the ashes of collapse emerged **Cyberia**: a living frontier where the physical world and **hyperspace** (persistent, immersive Instances) have fused into one unstable civilization.
6
+
7
+ The boundary between reality and hyperspace is porous. Relics, wars, identities, and events bleed between layers, creating opportunity, conflict, and myth.
8
+
9
+ ---
10
+
11
+ ### **The Historical Fracture**
12
+
13
+ The **Pacific Cataclysm** (2045) shattered the old world through nuclear disaster, environmental collapse, plagues, and uncontrolled experiments. As Earth became hostile, humanity expanded into space while building advanced **Instances** — enduring digital worlds that evolved from tools into homes, markets, religions, and battlefields.
14
+
15
+ Two new groups emerged:
16
+
17
+ - **Mutagens**: Radiation- and bio-altered humans, resilient but often marginalized.
18
+ - **Synthetics**: Artificial beings who gained autonomy and identity.
19
+
20
+ These groups, along with baseline humans, now navigate the layered reality of Cyberia.
21
+
22
+ ---
23
+
24
+ ### **The Dual Nature of Cyberia**
25
+
26
+ Cyberia exists on two overlapping layers:
27
+
28
+ - **Physical Layer**: Harsh, resource-driven reality of fleets, colonies, infrastructure, territory, and direct force. Slow, unforgiving, dominated by logistics and raw power.
29
+ - **Hyperspace Layer**: Vast network of persistent Instances — living archives, simulated empires, memory-cities, and evolving digital ecosystems where time, geography, and identity are fluid.
30
+
31
+ The two layers constantly influence each other through neural links, relics, breaches, and megastructures. What happens in one can reshape the other.
32
+
33
+ ---
34
+
35
+ ### **The Three Great Confederations**
36
+
37
+ #### **Zenith Empire (Red)**
38
+
39
+ Militaristic, hierarchical, expansionist. Masters of the **physical layer** — fleets, fortresses, industry, and territorial control.
40
+ **Core belief**: Civilization requires imposed order through strength.
41
+ **Strength**: Force, discipline, infrastructure dominance.
42
+ **Weakness**: Rigidity, anti-Mutagen prejudice, ecological destruction, over-reliance on Nova’s systems.
43
+ **Internal split**: Iron Legion (conquest) vs. Aether Council (technocratic stability).
44
+ **Relations**: Views Atlas as chaotic and degenerate; depends on Nova for intelligence and administration while resenting the dependency.
45
+
46
+ #### **Atlas Confederation (Yellow)**
47
+
48
+ Decentralized web of frontier settlements, Mutagen clans, Synthetics, traders, scavengers, hackers, and nomads. Excels in the unstable spaces **between** layers.
49
+ **Core strength**: Adaptation, asymmetric warfare, improvisation, infiltration, and survival in chaos.
50
+ **Weakness**: Fragmentation and internal division.
51
+ **Internal split**: Harmony Enclaves (diplomacy & coexistence) vs. Void Nomads (radical independence).
52
+ **Relations**: Opposes Zenith’s rigidity and environmental harm; undermines Nova through hacking and sabotage. Thrives on black-market networks and flexible alliances.
53
+
54
+ #### **Nova Republic (Blue)**
55
+
56
+ Technocratic, intelligence-driven civilization that dominates **hyperspace**. Obsessed with optimization, prediction, cognitive architecture, and transcendence.
57
+ **Core strength**: Information control, surveillance, predictive systems, and deep integration into digital realms.
58
+ **Weakness**: Emotional detachment, underestimation of irrational human elements (faith, loyalty, culture).
59
+ **Internal split**: Singularity Directive (machine supremacy) vs. Transcendent Conclave (hybrid flesh-machine future).
60
+ **Relations**: Provides critical systems to Zenith; faces constant subversion from Atlas hackers. Sees itself as the guiding intelligence of civilization.
61
+
62
+ ---
63
+
64
+ ### **The Balance of Power**
65
+
66
+ The three confederations exist in tense, interdependent equilibrium:
67
+
68
+ - Zenith controls physical force and territory.
69
+ - Nova controls hyperspace information and architecture.
70
+ - Atlas thrives in the gaps, through mobility, sabotage, and adaptation.
71
+
72
+ They compete publicly, collaborate secretly, and betray each other routinely. None can fully dominate Cyberia — the frontier is too unstable, layered, and resistant to total control.
73
+
74
+ ---
75
+
76
+ ### **Your Role as Player**
77
+
78
+ You are not a destined hero. You are a survivor who has lived long enough to matter.
79
+
80
+ You can be:
81
+
82
+ - A soldier, scout, smuggler, hacker, relic hunter, Instance diver, mercenary, diplomat, or rogue Synthetic/Mutagen.
83
+ - Aligned with one faction, multiple, or none.
84
+ - A wanderer who moves between physical ruins and hyperspace realms.
85
+
86
+ Your power comes from what you **carry, recover, build, protect, steal, or remember**. In Cyberia, the true battle is over meaning, memory, and access across layers of reality. Your choices can shift alliances, awaken relics, destabilize systems, or forge new legends.
87
+
88
+ **Welcome to Cyberia** — the Hyper-Reality Frontier. A broken future where physical and digital realities collide, ancient scars shape new empires, and your story is still unwritten.