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
package/bump.config.js CHANGED
@@ -17,6 +17,7 @@ export default {
17
17
  'package-lock.json',
18
18
  // engine-private confs are git-ignored and visited only if present at bump time.
19
19
  'engine-private/conf/**/package.json',
20
+ 'scripts/*',
20
21
  ],
21
22
  commit: false,
22
23
  tag: false,
package/compose.env ADDED
@@ -0,0 +1,131 @@
1
+ # Working env-file for the Cyberia ecosystem compose stack (custom workflow).
2
+ # Used as-is by the CLI (not generated). Set real credentials here, then run:
3
+ # underpost docker-compose --up --deploy-id dd-cyberia --docker-compose-id cyberia
4
+ #
5
+ # Loaded explicitly via --env-file so container service-discovery values (the
6
+ # Docker network hostnames below) are not overridden by any host-local .env.
7
+
8
+ # --- Ecosystem images (dev variants, published by docker-image.*.dev.ci.yml) --
9
+ # This stack is development-only, so it uses the `-dev` images built from the
10
+ # Dockerfile.dev variants (debug builds + live-inspection tooling).
11
+ MONGO_IMAGE=mongo:latest
12
+ VALKEY_IMAGE=valkey/valkey:latest
13
+ ENGINE_CYBERIA_IMAGE=underpost/engine-cyberia-dev
14
+ ENGINE_CYBERIA_TAG=v3.2.70
15
+ CYBERIA_SERVER_IMAGE=underpost/cyberia-server-dev
16
+ CYBERIA_SERVER_TAG=v3.2.70
17
+ CYBERIA_CLIENT_IMAGE=underpost/cyberia-client-dev
18
+ CYBERIA_CLIENT_TAG=v3.2.70
19
+ PROXY_IMAGE=nginx:stable-alpine
20
+ IPFS_IMAGE=ipfs/kubo:latest
21
+ IPFS_CLUSTER_IMAGE=ipfs/ipfs-cluster:latest
22
+
23
+ # --- Private-repo bootstrap (engine-cyberia clones the private dd-cyberia conf) -
24
+ # The engine-cyberia image ships only the underpost CLI; at start it runs the
25
+ # `underpost start --build` bootstrap, which clones ${GITHUB_USERNAME}/engine-cyberia.
26
+ GITHUB_USERNAME=underpostnet
27
+ GITHUB_TOKEN=change_me_private_repo_token
28
+
29
+ # --- MongoDB (translation of Secret mongodb-secret) --------------------------
30
+ MONGO_INITDB_ROOT_USERNAME=admin
31
+ MONGO_INITDB_ROOT_PASSWORD=change_me_dev_password
32
+
33
+ # --- Application DB / cache connection (Docker service discovery, not localhost)
34
+ NODE_ENV=development
35
+ DB_PROVIDER=mongoose
36
+ DB_HOST=mongodb://mongodb:27017
37
+ DB_REPLICA_SET=rs0
38
+ DB_AUTH_SOURCE=admin
39
+ VALKEY_HOST=valkey-service
40
+ VALKEY_PORT=6379
41
+
42
+ # --- Cyberia instance wiring (compose service DNS) ---------------------------
43
+ # cyberia-server -> engine-cyberia authority endpoints. INTERNAL only: these use
44
+ # the docker service DNS (engine-cyberia) and must never leak to browser clients.
45
+ INSTANCE_CODE=amethyst-strata-expansion
46
+ ENGINE_API_BASE_URL=http://engine-cyberia:4005
47
+ ENGINE_GRPC_ADDRESS=engine-cyberia:50051
48
+
49
+ # Client-visible Content Authority origin, forwarded to browser/Raylib clients
50
+ # for every engine-cyberia content/asset/metadata request. Host-reachable
51
+ # (docker publishes engine-cyberia :4005). Distinct from ENGINE_API_BASE_URL:
52
+ # the two responsibilities must never overwrite each other.
53
+ ENGINE_PUBLIC_URL=http://localhost:4005
54
+ ENGINE_GRPC_RELOAD_INTERVAL_SEC=300
55
+
56
+ # cyberia-server logging. This is the dev stack, so default to DEBUG. Set
57
+ # CYBERIA_SERVER_LOG_LEVEL (debug|info|warn|error) to override the APP_ENV
58
+ # fallback without touching APP_ENV.
59
+ CYBERIA_SERVER_APP_ENV=development
60
+ CYBERIA_SERVER_LOG_LEVEL=
61
+
62
+ # --- engine-cyberia runtime env (loaded into the container via env_file) -----
63
+ # The dd-cyberia engine (engine-private/conf/dd-cyberia/conf.server.json) needs
64
+ # these to boot: DB auth + per-site DB names, the base PORT (the cyberia host is
65
+ # assigned PORT+1 = 4005, which the healthcheck/nginx target), JWT, and mailer.
66
+ # Secrets are DEV PLACEHOLDERS — no real credentials ship in the public image.
67
+ PORT=4004
68
+ NODE_OPTIONS=--max-old-space-size=8192
69
+ BASE_API=api
70
+ DEFAULT_DEPLOY_ID=dd-cyberia
71
+ DEPLOY_ID=dd-cyberia
72
+ DEFAULT_DEPLOY_HOST=www.cyberiaonline.com
73
+ DEFAULT_DEPLOY_PATH=/
74
+ DISABLE_API_RATE_LIMIT=true
75
+ DOTENV_CONFIG_QUIET=true
76
+ ACCESS_EXPIRE_MINUTES=1440
77
+ REFRESH_EXPIRE_MINUTES=5
78
+ DEV_PROXY_PORT_OFFSET=0
79
+ JWT_SECRET=change_me_dev_jwt_secret
80
+
81
+ # DB auth (must match the MONGO_INITDB_ROOT_* creds above) + per-site DB names.
82
+ DB_USER=admin
83
+ DB_PASSWORD=change_me_dev_password
84
+
85
+ DB_NAME_CYBERIA=cyberia
86
+
87
+ # Mailer / SMTP (dev placeholders — mailer stays inert without real creds).
88
+ MAILER_SENDER_NAME=CYBERIA
89
+ MAILER_SENDER_EMAIL=noreply@example.com
90
+ SMTP_HOST=smtp.example.com
91
+ SMTP_PORT=465
92
+ SMTP_AUTH_USER=change_me
93
+ SMTP_AUTH_PASS=change_me
94
+ MAILER_SENDER_NAME_CYBERIA=CYBERIA
95
+ MAILER_SENDER_EMAIL_CYBERIA=noreply@example.com
96
+ SMTP_HOST_CYBERIA=smtp.example.com
97
+ SMTP_PORT_CYBERIA=465
98
+ SMTP_AUTH_USER_CYBERIA=change_me
99
+ SMTP_AUTH_PASS_CYBERIA=change_me
100
+
101
+ # Third-party integrations (dev placeholders).
102
+ CLOUDINARY_CLOUD_NAME=change_me
103
+ CLOUDINARY_API_KEY=change_me
104
+ CLOUDINARY_API_SECRET=change_me
105
+ GEMINI_API_KEY=change_me
106
+ HUGGINGFACE_API_KEY=change_me
107
+ DEFAULT_ADMIN_EMAIL=admin@example.com
108
+ DEFAULT_ADMIN_PASSWORD=change_me
109
+
110
+ # --- IPFS endpoints ----------------------------------------------------------
111
+ # Kubo (content plane) is the `ipfs` service; the Cluster REST API (:9094, pin
112
+ # replication) is the `ipfs-cluster` service. Override only to target a
113
+ # different node.
114
+ IPFS_API_URL=http://ipfs:5001
115
+ IPFS_GATEWAY_URL=http://ipfs:8080
116
+ IPFS_CLUSTER_API_URL=http://ipfs-cluster:9094
117
+ # 32-byte hex shared secret for the ipfs-cluster consensus (dev default is set
118
+ # in docker-compose.yml). Override for a real/shared cluster.
119
+ # CLUSTER_SECRET=
120
+
121
+ # --- Host-published ports ----------------------------------------------------
122
+ PROXY_HTTP_PORT=80
123
+ IPFS_API_PORT=5001
124
+ IPFS_GATEWAY_PORT=8080
125
+ IPFS_CLUSTER_API_PORT=9094
126
+ MONGO_HOST_PORT=27017
127
+ VALKEY_NODEPORT=32079
128
+ ENGINE_CYBERIA_REST_PORT=4005
129
+ ENGINE_CYBERIA_GRPC_PORT=50051
130
+ CYBERIA_SERVER_PORT=8081
131
+ CYBERIA_CLIENT_PORT=8082
package/conf.js CHANGED
@@ -177,6 +177,8 @@ const DefaultConf = /**/ {
177
177
  'ObjectLayerEngineModal',
178
178
  'ObjectLayerEngineViewer',
179
179
  'InstanceEngineCyberia',
180
+ 'ActionEngineCyberia',
181
+ 'EntityEngineCyberia',
180
182
  ],
181
183
  core: [
182
184
  'CommonJs',
@@ -259,6 +261,8 @@ const DefaultConf = /**/ {
259
261
  { path: '/cyberia-map-engine', client: 'CyberiaPortal', ssr: 'CyberiaPortal' },
260
262
  { path: '/cyberia-instance-engine', client: 'CyberiaPortal', ssr: 'CyberiaPortal' },
261
263
  { path: '/docs', client: 'CyberiaPortal', ssr: 'CyberiaPortal' },
264
+ { path: '/cyberia-action-engine', client: 'CyberiaPortal', ssr: 'CyberiaPortal' },
265
+ { path: '/cyberia-entity-engine', client: 'CyberiaPortal', ssr: 'CyberiaPortal' },
262
266
  ],
263
267
  dists: [
264
268
  {
@@ -324,7 +328,10 @@ const DefaultConf = /**/ {
324
328
  'cyberia-quest',
325
329
  'cyberia-quest-progress',
326
330
  'cyberia-action',
331
+ 'cyberia-skill',
332
+ 'cyberia-entity-type-default',
327
333
  'cyberia-client-hints',
334
+ 'cyberia-saga',
328
335
  ],
329
336
  },
330
337
  cryptokoyn: {
@@ -680,7 +687,7 @@ const DefaultConf = /**/ {
680
687
  '/': {
681
688
  client: 'underpost',
682
689
  runtime: 'nodejs',
683
- apis: ['user', 'file', 'test', 'document', 'cyberia-quest', 'cyberia-quest-progress', 'cyberia-action'],
690
+ apis: ['user', 'file', 'test', 'document'],
684
691
  apiBaseProxyPath: null,
685
692
  apiBaseHost: null,
686
693
  origins: [],
@@ -741,7 +748,10 @@ const DefaultConf = /**/ {
741
748
  'cyberia-quest',
742
749
  'cyberia-quest-progress',
743
750
  'cyberia-action',
751
+ 'cyberia-skill',
752
+ 'cyberia-entity-type-default',
744
753
  'cyberia-client-hints',
754
+ 'cyberia-saga',
745
755
  ],
746
756
  ws: 'core',
747
757
  peer: true,
@@ -761,6 +771,9 @@ const DefaultConf = /**/ {
761
771
  './src/client/public/cyberia-docs/CYBERIA-SERVER.md',
762
772
  './src/client/public/cyberia-docs/CYBERIA-CLIENT.md',
763
773
  './src/client/public/cyberia-docs/CYBERIA-CLI.md',
774
+ './src/client/public/cyberia-docs/CYBERIA-LORE.md',
775
+ './src/client/public/cyberia-docs/CYBERIA-SAGA.md',
776
+ './src/client/public/cyberia-docs/ROADMAP.md',
764
777
  './src/client/public/cyberia-docs/UNDERPOST-PLATFORM.md',
765
778
  ],
766
779
  },
@@ -820,6 +833,8 @@ const DefaultConf = /**/ {
820
833
  'cyberia-quest',
821
834
  'cyberia-quest-progress',
822
835
  'cyberia-action',
836
+ 'cyberia-skill',
837
+ 'cyberia-entity-type-default',
823
838
  ],
824
839
  origins: [],
825
840
  ws: 'core',
@@ -874,6 +889,8 @@ const DefaultConf = /**/ {
874
889
  'cyberia-quest',
875
890
  'cyberia-quest-progress',
876
891
  'cyberia-action',
892
+ 'cyberia-skill',
893
+ 'cyberia-entity-type-default',
877
894
  ],
878
895
  origins: [],
879
896
  ws: 'core',
package/deployment.yaml CHANGED
@@ -20,7 +20,7 @@ spec:
20
20
  spec:
21
21
  containers:
22
22
  - name: dd-cyberia-development-blue
23
- image: underpost/underpost-engine:v3.2.22
23
+ image: underpost/underpost-engine:v3.2.70
24
24
  imagePullPolicy: IfNotPresent
25
25
  envFrom:
26
26
  - secretRef:
@@ -229,7 +229,7 @@ spec:
229
229
  spec:
230
230
  containers:
231
231
  - name: dd-cyberia-development-green
232
- image: underpost/underpost-engine:v3.2.22
232
+ image: underpost/underpost-engine:v3.2.70
233
233
  imagePullPolicy: IfNotPresent
234
234
  envFrom:
235
235
  - secretRef:
@@ -0,0 +1,316 @@
1
+ # Cyberia ecosystem Docker Compose stack — canonical custom workflow.
2
+ #
3
+ # Orchestrates the entire Cyberia MMORPG on the underpost platform base
4
+ # (MongoDB + Valkey), then replaces the default engine template with the Cyberia
5
+ # content-authority engine and its two custom instances, fronted by an nginx
6
+ # reverse proxy — the same topology as the root docker-compose.yml, specialized
7
+ # for the dd-cyberia deploy.
8
+ #
9
+ # Canonical location (custom docker-compose workflow):
10
+ # engine-private/conf/dd-cyberia/docker-compose/cyberia/
11
+ # ├── docker-compose.yml (this file)
12
+ # ├── compose.env (working env-file, used as-is — not generated)
13
+ # ├── nginx.conf (reverse-proxy config, used as-is — not generated)
14
+ # └── mongodb/entrypoint.sh (only generated infra: replica-set bootstrap)
15
+ # All bind mounts below are relative to this directory: the CLI runs compose
16
+ # with `--project-directory` pinned here (see src/cli/docker-compose.js).
17
+ #
18
+ # Architecture boundaries (see CLAUDE.md "Cyberia architecture boundaries"):
19
+ # engine-cyberia — content, validation, persistence, gRPC(:50051)+REST(:4005)
20
+ # data services, asset metadata. The authority layer.
21
+ # cyberia-server — authoritative real-time simulation / tick processing (Go).
22
+ # cyberia-client — rendering, input, prediction, presentation (WASM bundle).
23
+ #
24
+ # Usage:
25
+ # underpost docker-compose --up --deploy-id dd-cyberia --docker-compose-id cyberia
26
+ # (or the docker:cyberia:* npm scripts). The engine-cyberia image bakes the
27
+ # dd-cyberia build at image-build time, so no private-repo credentials are
28
+ # required at container start.
29
+
30
+ name: dd-cyberia
31
+
32
+ services:
33
+ # --- MongoDB -------------------------------------------------------------
34
+ # Identical bootstrap to the root docker-compose.yml: replSet rs0, keyFile
35
+ # cluster auth, replica-set + root-user init over the loopback localhost
36
+ # exception. Uses ./mongodb/entrypoint.sh, generated into this canonical dir
37
+ # by `underpost docker-compose --generate --docker-compose-id cyberia ...`.
38
+ mongodb:
39
+ image: ${MONGO_IMAGE:-mongo:latest}
40
+ container_name: dd-cyberia-mongodb
41
+ entrypoint: ['bash', '/docker-init/entrypoint.sh']
42
+ environment:
43
+ MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME:?set MONGO_INITDB_ROOT_USERNAME in compose.env}
44
+ MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD:?set MONGO_INITDB_ROOT_PASSWORD in compose.env}
45
+ DB_REPLICA_SET: ${DB_REPLICA_SET:-rs0}
46
+ volumes:
47
+ - ./mongodb:/docker-init:ro
48
+ - mongodb-keyfile:/opt/keyfile
49
+ - mongodb-data:/data/db
50
+ networks:
51
+ - dd-cyberia-internal
52
+ expose:
53
+ - '27017'
54
+ ports:
55
+ - '${MONGO_HOST_PORT:-27017}:27017'
56
+ healthcheck:
57
+ test:
58
+ - CMD-SHELL
59
+ - >
60
+ mongosh --quiet -u "$$MONGO_INITDB_ROOT_USERNAME" -p "$$MONGO_INITDB_ROOT_PASSWORD"
61
+ --authenticationDatabase admin --eval "db.hello().isWritablePrimary" | grep -q true
62
+ interval: 10s
63
+ timeout: 5s
64
+ retries: 20
65
+ start_period: 60s
66
+ restart: unless-stopped
67
+
68
+ # --- Valkey --------------------------------------------------------------
69
+ valkey-service:
70
+ image: ${VALKEY_IMAGE:-valkey/valkey:latest}
71
+ container_name: dd-cyberia-valkey
72
+ command: ['valkey-server', '--port', '6379', '--bind', '0.0.0.0', '--protected-mode', 'no']
73
+ volumes:
74
+ - valkey-data:/data
75
+ networks:
76
+ - dd-cyberia-internal
77
+ expose:
78
+ - '6379'
79
+ ports:
80
+ - '${VALKEY_NODEPORT:-32079}:6379'
81
+ healthcheck:
82
+ test: ['CMD', 'valkey-cli', '-p', '6379', 'ping']
83
+ interval: 10s
84
+ timeout: 5s
85
+ retries: 10
86
+ start_period: 10s
87
+ restart: unless-stopped
88
+
89
+ # --- IPFS (Kubo daemon) --------------------------------------------------
90
+ # Content plane: add / pin / cat / files (MFS). The engine reaches it at
91
+ # http://ipfs:5001 (RPC) and http://ipfs:8080 (gateway) via the
92
+ # IPFS_API_URL / IPFS_GATEWAY_URL overrides in compose.env. The init hook
93
+ # binds the API/gateway to 0.0.0.0 (default is loopback-only) so both the
94
+ # engine and the ipfs-cluster service can reach the daemon.
95
+ ipfs:
96
+ image: ${IPFS_IMAGE:-ipfs/kubo:latest}
97
+ container_name: dd-cyberia-ipfs
98
+ volumes:
99
+ - ./ipfs/configure-ipfs.sh:/container-init.d/001-configure-ipfs.sh:ro
100
+ - ipfs-data:/data/ipfs
101
+ networks:
102
+ - dd-cyberia-internal
103
+ expose:
104
+ - '5001'
105
+ - '8080'
106
+ - '4001'
107
+ ports:
108
+ - '${IPFS_API_PORT:-5001}:5001'
109
+ - '${IPFS_GATEWAY_PORT:-8080}:8080'
110
+ healthcheck:
111
+ test: ['CMD-SHELL', 'ipfs --api=/ip4/127.0.0.1/tcp/5001 id >/dev/null 2>&1 || exit 1']
112
+ interval: 15s
113
+ timeout: 5s
114
+ retries: 5
115
+ start_period: 40s
116
+ restart: unless-stopped
117
+
118
+ # --- IPFS Cluster (pin orchestration) ------------------------------------
119
+ # Single-node dev equivalent of manifests/ipfs (StatefulSet ipfs-cluster).
120
+ # Serves the Cluster REST API on :9094 (ipfs-client.js IPFS_CLUSTER_API_URL);
121
+ # the engine POSTs /pins/<cid> here to replicate pins. It drives the shared
122
+ # Kubo daemon above via CLUSTER_IPFSHTTP_NODEMULTIADDRESS and starts only once
123
+ # Kubo is healthy, so the engine (which waits for this service to be healthy)
124
+ # never races an unreachable cluster.
125
+ ipfs-cluster:
126
+ image: ${IPFS_CLUSTER_IMAGE:-ipfs/ipfs-cluster:latest}
127
+ container_name: dd-cyberia-ipfs-cluster
128
+ depends_on:
129
+ ipfs:
130
+ condition: service_healthy
131
+ environment:
132
+ CLUSTER_PEERNAME: dd-cyberia-cluster
133
+ # 32-byte hex shared secret. Fixed dev default keeps the cluster identity
134
+ # stable across restarts; override in compose.env for anything shared.
135
+ CLUSTER_SECRET: ${CLUSTER_SECRET:-0e1d2c3b4a59687778695a4b3c2d1e0f0e1d2c3b4a59687778695a4b3c2d1e0f}
136
+ CLUSTER_IPFSHTTP_NODEMULTIADDRESS: /dns4/ipfs/tcp/5001
137
+ CLUSTER_RESTAPI_HTTPLISTENMULTIADDRESS: /ip4/0.0.0.0/tcp/9094
138
+ CLUSTER_CRDT_TRUSTEDPEERS: '*'
139
+ volumes:
140
+ - ipfs-cluster-data:/data/ipfs-cluster
141
+ networks:
142
+ - dd-cyberia-internal
143
+ expose:
144
+ - '9094'
145
+ - '9096'
146
+ ports:
147
+ - '${IPFS_CLUSTER_API_PORT:-9094}:9094'
148
+ healthcheck:
149
+ test: ['CMD-SHELL', 'ipfs-cluster-ctl --host /ip4/127.0.0.1/tcp/9094 id >/dev/null 2>&1 || exit 1']
150
+ interval: 15s
151
+ timeout: 5s
152
+ retries: 5
153
+ start_period: 40s
154
+ restart: unless-stopped
155
+
156
+ # --- engine-cyberia (content authority) ----------------------------------
157
+ # The underpost Node engine for deploy dd-cyberia. The image bakes the
158
+ # dd-cyberia build at image-build time (see src/runtime/engine-cyberia/
159
+ # Dockerfile), so the container start only runs `underpost start --run`.
160
+ # Serves the portal/REST/WS on 4005 and the engine gRPC data service on
161
+ # 50051 (conf.server.json www.cyberiaonline.com.grpc).
162
+ engine-cyberia:
163
+ image: ${ENGINE_CYBERIA_IMAGE:-underpost/engine-cyberia-dev}:${ENGINE_CYBERIA_TAG:-v3.2.70}
164
+ container_name: dd-cyberia-engine
165
+ command:
166
+ - /bin/sh
167
+ - -c
168
+ - >
169
+ node bin/cyberia ol --drop &&
170
+ node bin/cyberia run-workflow drop-db &&
171
+ node bin/cyberia instance amethyst-strata-expansion --import &&
172
+ underpost start --run dd-cyberia development
173
+ env_file:
174
+ - ./compose.env
175
+ environment:
176
+ NODE_ENV: ${NODE_ENV:-development}
177
+ DB_PROVIDER: ${DB_PROVIDER:-mongoose}
178
+ DB_HOST: ${DB_HOST:-mongodb://mongodb:27017}
179
+ DB_REPLICA_SET: ${DB_REPLICA_SET:-rs0}
180
+ DB_AUTH_SOURCE: ${DB_AUTH_SOURCE:-admin}
181
+ DB_USER: ${MONGO_INITDB_ROOT_USERNAME:?}
182
+ DB_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD:?}
183
+ VALKEY_HOST: ${VALKEY_HOST:-valkey-service}
184
+ VALKEY_PORT: ${VALKEY_PORT:-6379}
185
+ networks:
186
+ - dd-cyberia-internal
187
+ expose:
188
+ - '4005'
189
+ - '50051'
190
+ ports:
191
+ - '${ENGINE_CYBERIA_REST_PORT:-4005}:4005'
192
+ - '${ENGINE_CYBERIA_GRPC_PORT:-50051}:50051'
193
+ healthcheck:
194
+ test: ['CMD-SHELL', "timeout 2 bash -c '</dev/tcp/127.0.0.1/4005' || exit 1"]
195
+ interval: 15s
196
+ timeout: 5s
197
+ retries: 5
198
+ # The dd-cyberia build is baked into the image; start just runs the
199
+ # engine, so a moderate start_period covers DB connect + listen.
200
+ start_period: 120s
201
+ depends_on:
202
+ mongodb:
203
+ condition: service_healthy
204
+ valkey-service:
205
+ condition: service_healthy
206
+ ipfs:
207
+ condition: service_healthy
208
+ ipfs-cluster:
209
+ condition: service_healthy
210
+ restart: unless-stopped
211
+
212
+ # --- cyberia-server (authoritative simulation) ---------------------------
213
+ # Go MMO runtime. Reads the engine authority endpoints from the environment
214
+ # (compose service DNS) instead of the K8s {{grpc-service-dns}} template used
215
+ # in conf.instances.json. Uses the published image's default ENTRYPOINT.
216
+ cyberia-server:
217
+ image: ${CYBERIA_SERVER_IMAGE:-underpost/cyberia-server-dev}:${CYBERIA_SERVER_TAG:-v3.2.70}
218
+ container_name: dd-cyberia-server
219
+ environment:
220
+ INSTANCE_CODE: ${INSTANCE_CODE:-FOREST}
221
+ ENGINE_API_BASE_URL: ${ENGINE_API_BASE_URL:-http://engine-cyberia:4005}
222
+ ENGINE_PUBLIC_URL: ${ENGINE_PUBLIC_URL:-http://localhost:4005}
223
+ ENGINE_GRPC_ADDRESS: ${ENGINE_GRPC_ADDRESS:-engine-cyberia:50051}
224
+ ENGINE_GRPC_RELOAD_INTERVAL_SEC: ${ENGINE_GRPC_RELOAD_INTERVAL_SEC:-300}
225
+ STATIC_DIR: ${CYBERIA_SERVER_STATIC_DIR:-/home/dd/engine/cyberia-server/public}
226
+ APP_ENV: ${CYBERIA_SERVER_APP_ENV:-development}
227
+ LOG_LEVEL: ${CYBERIA_SERVER_LOG_LEVEL:-}
228
+ networks:
229
+ - dd-cyberia-internal
230
+ expose:
231
+ - '8081'
232
+ ports:
233
+ - '${CYBERIA_SERVER_PORT:-8081}:8081'
234
+ healthcheck:
235
+ test: ['CMD-SHELL', "timeout 2 bash -c '</dev/tcp/127.0.0.1/8081' || exit 1"]
236
+ interval: 15s
237
+ timeout: 5s
238
+ retries: 5
239
+ start_period: 30s
240
+ depends_on:
241
+ engine-cyberia:
242
+ condition: service_healthy
243
+ restart: unless-stopped
244
+
245
+ # --- cyberia-client (presentation) ---------------------------------------
246
+ # Python static-file server for the pre-built WASM bundle. The -dev image's
247
+ # docker-driver.py defaults to CYBERIA_PORT=8082; override to 8081 so the whole
248
+ # ecosystem (nginx upstream, healthcheck) stays on a single internal port.
249
+ cyberia-client:
250
+ image: ${CYBERIA_CLIENT_IMAGE:-underpost/cyberia-client-dev}:${CYBERIA_CLIENT_TAG:-v3.2.70}
251
+ container_name: dd-cyberia-client
252
+ environment:
253
+ CYBERIA_PORT: '8081'
254
+ networks:
255
+ - dd-cyberia-internal
256
+ expose:
257
+ - '8081'
258
+ ports:
259
+ - '${CYBERIA_CLIENT_PORT:-8082}:8081'
260
+ healthcheck:
261
+ test: ['CMD-SHELL', "timeout 2 bash -c '</dev/tcp/127.0.0.1/8081' || exit 1"]
262
+ interval: 15s
263
+ timeout: 5s
264
+ retries: 5
265
+ start_period: 20s
266
+ # Last stage of the sequential chain: only start once cyberia-server is
267
+ # healthy (which itself gates on engine-cyberia -> mongodb/valkey).
268
+ depends_on:
269
+ cyberia-server:
270
+ condition: service_healthy
271
+ restart: unless-stopped
272
+
273
+ # --- Reverse proxy -------------------------------------------------------
274
+ # Routes the three cyberiaonline.com hosts to their upstreams with websocket
275
+ # upgrade support. Config source of truth: ./nginx.conf (this dir).
276
+ proxy:
277
+ image: ${PROXY_IMAGE:-nginx:stable-alpine}
278
+ container_name: dd-cyberia-proxy
279
+ volumes:
280
+ - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
281
+ networks:
282
+ - dd-cyberia-internal
283
+ ports:
284
+ - '${PROXY_HTTP_PORT:-80}:80'
285
+ healthcheck:
286
+ test: ['CMD', 'wget', '-q', '-O', '-', 'http://127.0.0.1/healthz']
287
+ interval: 15s
288
+ timeout: 5s
289
+ retries: 5
290
+ start_period: 10s
291
+ # Fronts the stack only after every tier reports healthy.
292
+ depends_on:
293
+ engine-cyberia:
294
+ condition: service_healthy
295
+ cyberia-server:
296
+ condition: service_healthy
297
+ cyberia-client:
298
+ condition: service_healthy
299
+ restart: unless-stopped
300
+
301
+ networks:
302
+ dd-cyberia-internal:
303
+ name: dd-cyberia-internal
304
+ driver: bridge
305
+
306
+ volumes:
307
+ mongodb-data:
308
+ name: dd-cyberia-mongodb-data
309
+ mongodb-keyfile:
310
+ name: dd-cyberia-mongodb-keyfile
311
+ valkey-data:
312
+ name: dd-cyberia-valkey-data
313
+ ipfs-data:
314
+ name: dd-cyberia-ipfs-data
315
+ ipfs-cluster-data:
316
+ name: dd-cyberia-ipfs-cluster-data
@@ -6,7 +6,7 @@
6
6
  // Compatible with: Hardhat 3.x + Ethers v6 + hardhat-toolbox-mocha-ethers
7
7
 
8
8
  import { defineConfig } from 'hardhat/config';
9
- import hardhatToolboxMochaEthers from '@nomicfoundation/hardhat-toolbox-mocha-ethers';
9
+ import hardhatToolboxViem from '@nomicfoundation/hardhat-toolbox-viem';
10
10
  import dotenv from 'dotenv';
11
11
  import fs from 'fs-extra';
12
12
  import path from 'path';
@@ -45,7 +45,7 @@ const coinbaseKey = readPrivateKey('../engine-private/eth-networks/besu/coinbase
45
45
 
46
46
  /** @type import('hardhat/config').HardhatUserConfig */
47
47
  const config = defineConfig({
48
- plugins: [hardhatToolboxMochaEthers],
48
+ plugins: [hardhatToolboxViem],
49
49
 
50
50
  // ── Solidity ────────────────────────────────────────────────────────────────
51
51
  solidity: {