cyberia 3.2.5 → 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.
- package/.github/workflows/engine-cyberia.cd.yml +8 -2
- package/.github/workflows/npmpkg.ci.yml +1 -0
- package/.github/workflows/pwa-microservices-template-test.ci.yml +1 -1
- package/.github/workflows/release.cd.yml +2 -2
- package/.vscode/extensions.json +9 -9
- package/.vscode/settings.json +20 -4
- package/CHANGELOG.md +563 -1
- package/CLI-HELP.md +130 -34
- package/Dockerfile +0 -4
- package/README.md +194 -607
- package/bin/build.js +42 -12
- package/bin/build.template.js +187 -0
- package/bin/cyberia.js +1367 -281
- package/bin/deploy.js +582 -3
- package/bin/index.js +1367 -281
- package/bump.config.js +26 -0
- package/conf.js +195 -111
- package/deployment.yaml +6 -222
- package/hardhat/package-lock.json +118 -149
- package/hardhat/package.json +5 -4
- package/jsconfig.json +1 -1
- package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +2 -2
- package/manifests/cronjobs/dd-cron/dd-cron-dns.yaml +2 -2
- package/manifests/deployment/dd-cyberia-development/deployment.yaml +6 -222
- package/manifests/deployment/dd-cyberia-development/proxy.yaml +10 -118
- package/manifests/deployment/dd-default-development/deployment.yaml +2 -6
- package/manifests/deployment/dd-test-development/deployment.yaml +138 -66
- package/manifests/deployment/dd-test-development/proxy.yaml +41 -5
- package/manifests/kind-config-dev.yaml +8 -0
- package/manifests/lxd/lxd-admin-profile.yaml +12 -3
- package/manifests/mongodb/pv-pvc.yaml +44 -8
- package/manifests/mongodb/statefulset.yaml +55 -68
- package/manifests/mongodb-4.4/headless-service.yaml +10 -0
- package/manifests/mongodb-4.4/kustomization.yaml +3 -1
- package/manifests/mongodb-4.4/mongodb-nodeport.yaml +17 -0
- package/manifests/mongodb-4.4/pv-pvc.yaml +10 -14
- package/manifests/mongodb-4.4/statefulset.yaml +79 -0
- package/manifests/mongodb-4.4/storage-class.yaml +9 -0
- package/manifests/valkey/statefulset.yaml +1 -1
- package/manifests/valkey/valkey-nodeport.yaml +17 -0
- package/package.json +45 -24
- package/proxy.yaml +10 -118
- package/scripts/ipxe-setup.sh +52 -49
- package/scripts/k3s-node-setup.sh +83 -48
- package/scripts/lxd-vm-setup.sh +193 -8
- package/scripts/maas-nat-firewalld.sh +145 -0
- package/scripts/nat-iptables.sh +103 -18
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.controller.js +18 -18
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.model.js +7 -14
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.router.js +38 -33
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.service.js +91 -36
- package/src/api/core/core.controller.js +10 -10
- package/src/api/core/core.router.js +19 -14
- package/src/api/core/core.service.js +15 -15
- package/src/api/crypto/crypto.controller.js +8 -8
- package/src/api/crypto/crypto.router.js +18 -12
- package/src/api/crypto/crypto.service.js +11 -11
- package/src/api/cyberia-action/cyberia-action.controller.js +74 -0
- package/src/api/cyberia-action/cyberia-action.model.js +87 -0
- package/src/api/cyberia-action/cyberia-action.router.js +31 -0
- package/src/api/cyberia-action/cyberia-action.service.js +42 -0
- package/src/api/cyberia-client-hints/cyberia-client-hints.controller.js +74 -0
- package/src/api/cyberia-client-hints/cyberia-client-hints.model.js +99 -0
- package/src/api/cyberia-client-hints/cyberia-client-hints.router.js +98 -0
- package/src/api/cyberia-client-hints/cyberia-client-hints.service.js +152 -0
- package/src/api/cyberia-dialogue/cyberia-dialogue.controller.js +13 -13
- package/src/api/cyberia-dialogue/cyberia-dialogue.model.js +11 -11
- package/src/api/cyberia-dialogue/cyberia-dialogue.router.js +25 -20
- package/src/api/cyberia-dialogue/cyberia-dialogue.service.js +22 -22
- package/src/api/cyberia-entity/cyberia-entity.controller.js +10 -10
- package/src/api/cyberia-entity/cyberia-entity.router.js +22 -18
- package/src/api/cyberia-entity/cyberia-entity.service.js +15 -15
- package/src/api/cyberia-instance/cyberia-fallback-world.js +83 -198
- package/src/api/cyberia-instance/cyberia-instance.controller.js +14 -14
- package/src/api/cyberia-instance/cyberia-instance.model.js +3 -0
- package/src/api/cyberia-instance/cyberia-instance.router.js +57 -52
- package/src/api/cyberia-instance/cyberia-instance.service.js +32 -67
- package/src/api/cyberia-instance/cyberia-portal-connector.js +20 -246
- package/src/api/cyberia-instance/cyberia-world-generator.js +505 -0
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.controller.js +10 -10
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.model.js +18 -49
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.router.js +22 -18
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.service.js +19 -15
- package/src/api/cyberia-map/cyberia-map.controller.js +10 -10
- package/src/api/cyberia-map/cyberia-map.router.js +35 -30
- package/src/api/cyberia-map/cyberia-map.service.js +17 -17
- package/src/api/cyberia-quest/cyberia-quest.controller.js +74 -0
- package/src/api/cyberia-quest/cyberia-quest.model.js +67 -0
- package/src/api/cyberia-quest/cyberia-quest.router.js +31 -0
- package/src/api/cyberia-quest/cyberia-quest.service.js +42 -0
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.controller.js +74 -0
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.model.js +49 -0
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.router.js +31 -0
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.service.js +42 -0
- package/src/api/cyberia-server-defaults/cyberia-server-defaults.js +451 -0
- package/src/api/default/default.controller.js +10 -10
- package/src/api/default/default.router.js +22 -18
- package/src/api/default/default.service.js +15 -15
- package/src/api/document/document.controller.js +12 -12
- package/src/api/document/document.model.js +10 -16
- package/src/api/document/document.router.js +28 -23
- package/src/api/document/document.service.js +100 -23
- package/src/api/file/file.controller.js +8 -8
- package/src/api/file/file.model.js +10 -10
- package/src/api/file/file.router.js +19 -13
- package/src/api/file/file.service.js +45 -43
- package/src/api/instance/instance.controller.js +10 -10
- package/src/api/instance/instance.model.js +4 -10
- package/src/api/instance/instance.router.js +29 -24
- package/src/api/instance/instance.service.js +16 -16
- package/src/api/ipfs/ipfs.controller.js +12 -12
- package/src/api/ipfs/ipfs.model.js +4 -13
- package/src/api/ipfs/ipfs.router.js +21 -16
- package/src/api/ipfs/ipfs.service.js +22 -36
- package/src/api/object-layer/object-layer.controller.js +12 -12
- package/src/api/object-layer/object-layer.model.js +4 -17
- package/src/api/object-layer/object-layer.router.js +512 -507
- package/src/api/object-layer/object-layer.service.js +29 -26
- package/src/api/object-layer-render-frames/object-layer-render-frames.controller.js +10 -10
- package/src/api/object-layer-render-frames/object-layer-render-frames.model.js +6 -16
- package/src/api/object-layer-render-frames/object-layer-render-frames.router.js +22 -18
- package/src/api/object-layer-render-frames/object-layer-render-frames.service.js +19 -15
- package/src/api/test/test.controller.js +8 -8
- package/src/api/test/test.router.js +17 -12
- package/src/api/test/test.service.js +8 -8
- package/src/api/types.js +24 -0
- package/src/api/user/guest.service.js +100 -0
- package/src/api/user/user.controller.js +6 -6
- package/src/api/user/user.model.js +8 -13
- package/src/api/user/user.router.js +297 -288
- package/src/api/user/user.service.js +103 -55
- package/src/cli/baremetal.js +132 -101
- package/src/cli/cluster.js +732 -217
- package/src/cli/db.js +106 -62
- package/src/cli/deploy.js +260 -149
- package/src/cli/fs.js +90 -9
- package/src/cli/image.js +43 -1
- package/src/cli/index.js +106 -16
- package/src/cli/ipfs.js +4 -6
- package/src/cli/kubectl.js +4 -1
- package/src/cli/lxd.js +1099 -223
- package/src/cli/monitor.js +9 -3
- package/src/cli/release.js +336 -86
- package/src/cli/repository.js +136 -53
- package/src/cli/run.js +599 -76
- package/src/cli/secrets.js +11 -2
- package/src/cli/ssh.js +1 -1
- package/src/cli/static.js +43 -115
- package/src/cli/test.js +9 -3
- package/src/client/Cryptokoyn.index.js +18 -21
- package/src/client/CyberiaPortal.index.js +19 -23
- package/src/client/Default.index.js +30 -36
- package/src/client/Itemledger.index.js +20 -26
- package/src/client/Underpost.index.js +19 -23
- package/src/client/components/core/404.js +4 -4
- package/src/client/components/core/500.js +4 -4
- package/src/client/components/core/Account.js +73 -60
- package/src/client/components/core/AgGrid.js +23 -33
- package/src/client/components/core/Alert.js +12 -13
- package/src/client/components/core/AppStore.js +1 -1
- package/src/client/components/core/Auth.js +40 -37
- package/src/client/components/core/Badge.js +7 -13
- package/src/client/components/core/BtnIcon.js +15 -17
- package/src/client/components/core/CalendarCore.js +42 -63
- package/src/client/components/core/Chat.js +13 -15
- package/src/client/components/core/ClientEvents.js +163 -0
- package/src/client/components/core/ColorPaletteElement.js +309 -0
- package/src/client/components/core/Content.js +17 -14
- package/src/client/components/core/Css.js +15 -71
- package/src/client/components/core/CssCore.js +12 -16
- package/src/client/components/core/D3Chart.js +4 -4
- package/src/client/components/core/Docs.js +64 -91
- package/src/client/components/core/DropDown.js +69 -91
- package/src/client/components/core/EventBus.js +96 -0
- package/src/client/components/core/EventsUI.js +14 -17
- package/src/client/components/core/FileExplorer.js +96 -228
- package/src/client/components/core/FullScreen.js +47 -75
- package/src/client/components/core/Input.js +24 -69
- package/src/client/components/core/Keyboard.js +25 -18
- package/src/client/components/core/KeyboardAvoidance.js +145 -0
- package/src/client/components/core/LoadingAnimation.js +25 -31
- package/src/client/components/core/LogIn.js +41 -41
- package/src/client/components/core/LogOut.js +23 -14
- package/src/client/components/core/Modal.js +544 -219
- package/src/client/components/core/NotificationManager.js +14 -18
- package/src/client/components/core/Panel.js +54 -50
- package/src/client/components/core/PanelForm.js +81 -177
- package/src/client/components/core/Polyhedron.js +110 -214
- package/src/client/components/core/PublicProfile.js +39 -32
- package/src/client/components/core/Recover.js +48 -44
- package/src/client/components/core/Responsive.js +88 -32
- package/src/client/components/core/RichText.js +9 -18
- package/src/client/components/core/Router.js +24 -3
- package/src/client/components/core/SearchBox.js +37 -37
- package/src/client/components/core/SignUp.js +39 -30
- package/src/client/components/core/SocketIo.js +31 -2
- package/src/client/components/core/SocketIoHandler.js +6 -6
- package/src/client/components/core/ToggleSwitch.js +8 -20
- package/src/client/components/core/ToolTip.js +5 -17
- package/src/client/components/core/Translate.js +56 -59
- package/src/client/components/core/Validator.js +26 -16
- package/src/client/components/core/Wallet.js +15 -26
- package/src/client/components/core/Worker.js +211 -276
- package/src/client/components/core/windowGetDimensions.js +7 -7
- package/src/client/components/cryptokoyn/{MenuCryptokoyn.js → AppShellCryptokoyn.js} +57 -57
- package/src/client/components/cryptokoyn/CssCryptokoyn.js +15 -15
- package/src/client/components/cryptokoyn/LogInCryptokoyn.js +6 -4
- package/src/client/components/cryptokoyn/LogOutCryptokoyn.js +6 -4
- package/src/client/components/cryptokoyn/RouterCryptokoyn.js +37 -0
- package/src/client/components/cryptokoyn/SettingsCryptokoyn.js +4 -4
- package/src/client/components/cryptokoyn/SignUpCryptokoyn.js +6 -4
- package/src/client/components/cyberia/InstanceEngineCyberia.js +141 -60
- package/src/client/components/cyberia/MapEngineCyberia.js +691 -214
- package/src/client/components/cyberia/ObjectLayerEngine.js +19 -0
- package/src/client/components/cyberia/ObjectLayerEngineModal.js +1204 -94
- package/src/client/components/cyberia/ObjectLayerEngineViewer.js +196 -298
- package/src/client/components/cyberia/SharedDefaultsCyberia.js +330 -0
- package/src/client/components/cyberia-portal/{MenuCyberiaPortal.js → AppShellCyberiaPortal.js} +102 -102
- package/src/client/components/cyberia-portal/CssCyberiaPortal.js +15 -15
- package/src/client/components/cyberia-portal/LogInCyberiaPortal.js +6 -4
- package/src/client/components/cyberia-portal/LogOutCyberiaPortal.js +6 -4
- package/src/client/components/cyberia-portal/MainBodyCyberiaPortal.js +4 -4
- package/src/client/components/cyberia-portal/RouterCyberiaPortal.js +60 -0
- package/src/client/components/cyberia-portal/SettingsCyberiaPortal.js +4 -4
- package/src/client/components/cyberia-portal/SignUpCyberiaPortal.js +6 -4
- package/src/client/components/cyberia-portal/TranslateCyberiaPortal.js +4 -4
- package/src/client/components/default/{MenuDefault.js → AppShellDefault.js} +87 -87
- package/src/client/components/default/CssDefault.js +12 -12
- package/src/client/components/default/LogInDefault.js +6 -4
- package/src/client/components/default/LogOutDefault.js +6 -4
- package/src/client/components/default/RouterDefault.js +47 -0
- package/src/client/components/default/SettingsDefault.js +4 -4
- package/src/client/components/default/SignUpDefault.js +6 -4
- package/src/client/components/default/TranslateDefault.js +3 -3
- package/src/client/components/itemledger/{MenuItemledger.js → AppShellItemledger.js} +57 -57
- package/src/client/components/itemledger/CssItemledger.js +15 -15
- package/src/client/components/itemledger/LogInItemledger.js +6 -4
- package/src/client/components/itemledger/LogOutItemledger.js +6 -4
- package/src/client/components/itemledger/RouterItemledger.js +38 -0
- package/src/client/components/itemledger/SettingsItemledger.js +4 -4
- package/src/client/components/itemledger/SignUpItemledger.js +6 -4
- package/src/client/components/itemledger/TranslateItemledger.js +3 -3
- package/src/client/components/underpost/{MenuUnderpost.js → AppShellUnderpost.js} +88 -88
- package/src/client/components/underpost/CssUnderpost.js +14 -14
- package/src/client/components/underpost/CyberpunkBloggerUnderpost.js +4 -4
- package/src/client/components/underpost/DocumentSearchProvider.js +1 -1
- package/src/client/components/underpost/LabGalleryUnderpost.js +12 -15
- package/src/client/components/underpost/LogInUnderpost.js +6 -4
- package/src/client/components/underpost/LogOutUnderpost.js +6 -4
- package/src/client/components/underpost/RouterUnderpost.js +45 -0
- package/src/client/components/underpost/SettingsUnderpost.js +4 -4
- package/src/client/components/underpost/SignUpUnderpost.js +6 -4
- package/src/client/components/underpost/TranslateUnderpost.js +4 -4
- package/src/client/public/cyberia-docs/ACTION-SYSTEM.md +235 -0
- package/src/client/public/cyberia-docs/ARCHITECTURE.md +83 -0
- package/src/client/public/cyberia-docs/CYBERIA-CLI.md +204 -0
- package/src/client/public/cyberia-docs/CYBERIA-CLIENT.md +291 -0
- package/src/client/public/cyberia-docs/CYBERIA-SERVER.md +278 -0
- package/src/client/public/cyberia-docs/CYBERIA.md +259 -0
- package/src/client/public/cyberia-docs/ENTITY-PROFILE.md +241 -0
- package/src/client/public/cyberia-docs/HARDHAT-MODULE.md +300 -0
- package/src/client/public/cyberia-docs/OFF-CHAIN-ECONOMY.md +279 -0
- package/src/client/public/cyberia-docs/QUEST-SYSTEM.md +206 -0
- package/src/client/public/cyberia-docs/ROADMAP.md +240 -0
- package/src/client/public/cyberia-docs/UNDERPOST-PLATFORM.md +106 -0
- package/src/client/public/cyberia-docs/WHITE-PAPER.md +732 -0
- package/src/client/services/atlas-sprite-sheet/atlas-sprite-sheet.service.js +14 -20
- package/src/client/services/core/core.service.js +17 -49
- package/src/client/services/crypto/crypto.service.js +8 -13
- package/src/client/services/cyberia-action/cyberia-action.service.js +99 -0
- package/src/client/services/cyberia-client-hints/cyberia-client-hints.service.js +99 -0
- package/src/client/services/cyberia-dialogue/cyberia-dialogue.service.js +10 -16
- package/src/client/services/cyberia-entity/cyberia-entity.management.js +5 -5
- package/src/client/services/cyberia-entity/cyberia-entity.service.js +10 -16
- package/src/client/services/cyberia-instance/cyberia-instance.management.js +6 -6
- package/src/client/services/cyberia-instance/cyberia-instance.service.js +12 -18
- package/src/client/services/cyberia-instance-conf/cyberia-instance-conf.service.js +10 -16
- package/src/client/services/cyberia-map/cyberia-map.management.js +6 -6
- package/src/client/services/cyberia-map/cyberia-map.service.js +12 -18
- package/src/client/services/cyberia-quest/cyberia-quest.service.js +99 -0
- package/src/client/services/cyberia-quest-progress/cyberia-quest-progress.service.js +99 -0
- package/src/client/services/default/default.management.js +159 -267
- package/src/client/services/default/default.service.js +10 -16
- package/src/client/services/document/document.service.js +14 -19
- package/src/client/services/file/file.service.js +8 -13
- package/src/client/services/instance/instance.management.js +5 -5
- package/src/client/services/instance/instance.service.js +10 -15
- package/src/client/services/ipfs/ipfs.service.js +12 -18
- package/src/client/services/object-layer/object-layer.management.js +12 -12
- package/src/client/services/object-layer/object-layer.service.js +20 -26
- package/src/client/services/object-layer-render-frames/object-layer-render-frames.service.js +10 -16
- package/src/client/services/test/test.service.js +8 -13
- package/src/client/services/user/guest.service.js +86 -0
- package/src/client/services/user/user.management.js +5 -5
- package/src/client/services/user/user.service.js +14 -20
- package/src/client/ssr/body/404.js +3 -3
- package/src/client/ssr/body/500.js +3 -3
- package/src/client/ssr/body/CacheControl.js +5 -2
- package/src/client/ssr/body/DefaultSplashScreen.js +19 -12
- package/src/client/ssr/body/UnderpostDefaultSplashScreen.js +13 -6
- package/src/client/ssr/head/PwaItemledger.js +197 -60
- package/src/client/ssr/mailer/DefaultRecoverEmail.js +19 -20
- package/src/client/ssr/mailer/DefaultVerifyEmail.js +15 -16
- package/src/client/ssr/views/CyberiaServerMetrics.js +982 -0
- package/src/client/ssr/{offline → views}/Maintenance.js +12 -11
- package/src/client/ssr/{offline → views}/NoNetworkConnection.js +3 -3
- package/src/client/ssr/{pages → views}/Test.js +2 -2
- package/src/client/sw/core.sw.js +274 -0
- package/src/db/DataBaseProvider.js +115 -15
- package/src/db/mariadb/MariaDB.js +2 -1
- package/src/db/mongo/MongoBootstrap.js +657 -0
- package/src/db/mongo/MongooseDB.js +129 -21
- package/src/grpc/cyberia/grpc-server.js +185 -105
- package/src/index.js +1 -1
- package/src/runtime/cyberia-client/Dockerfile +101 -0
- package/src/runtime/cyberia-client/Dockerfile.dev +82 -0
- package/src/runtime/cyberia-server/Dockerfile +62 -0
- package/src/runtime/cyberia-server/Dockerfile.dev +71 -0
- package/src/runtime/express/Dockerfile +4 -4
- package/src/runtime/express/Express.js +2 -2
- package/src/runtime/lampp/Dockerfile +8 -7
- package/src/runtime/wp/Dockerfile +11 -17
- package/src/runtime/wp/Wp.js +8 -5
- package/src/server/atlas-sprite-sheet-generator.js +4 -2
- package/src/server/auth.js +2 -2
- package/src/server/client-build-docs.js +46 -47
- package/src/server/client-build.js +371 -132
- package/src/server/client-formatted.js +47 -16
- package/src/server/conf.js +91 -87
- package/src/server/data-query.js +32 -20
- package/src/server/dns.js +22 -0
- package/src/server/ipfs-client.js +232 -91
- package/src/server/object-layer.js +1 -6
- package/src/server/process.js +192 -45
- package/src/server/proxy.js +9 -2
- package/src/server/runtime.js +1 -1
- package/src/server/semantic-layer-generator-floor.js +11 -51
- package/src/server/semantic-layer-generator-resource.js +259 -0
- package/src/server/semantic-layer-generator-skin.js +41 -171
- package/src/server/semantic-layer-generator.js +122 -14
- package/src/server/shape-generator.js +108 -0
- package/src/server/start.js +34 -8
- package/src/server/valkey.js +143 -235
- package/src/ws/IoInterface.js +16 -16
- package/src/ws/core/channels/core.ws.chat.js +11 -11
- package/src/ws/core/channels/core.ws.mailer.js +29 -29
- package/src/ws/core/channels/core.ws.stream.js +19 -19
- package/src/ws/core/core.ws.connection.js +8 -8
- package/src/ws/core/core.ws.server.js +6 -5
- package/src/ws/default/channels/default.ws.main.js +10 -10
- package/src/ws/default/default.ws.connection.js +4 -4
- package/src/ws/default/default.ws.server.js +4 -3
- package/tsconfig.docs.json +15 -0
- package/typedoc.dd-cyberia.json +29 -0
- package/typedoc.json +29 -0
- package/WHITE-PAPER.md +0 -1540
- package/bin/file.js +0 -196
- package/bin/vs.js +0 -74
- package/bin/zed.js +0 -84
- package/hardhat/README.md +0 -531
- package/hardhat/WHITE-PAPER.md +0 -1540
- package/jsdoc.dd-cyberia.json +0 -68
- package/jsdoc.json +0 -68
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.defaults.js +0 -413
- package/src/api/object-layer/README.md +0 -672
- package/src/client/components/core/ColorPalette.js +0 -5267
- package/src/client/components/core/JoyStick.js +0 -80
- package/src/client/components/cryptokoyn/RoutesCryptokoyn.js +0 -39
- package/src/client/components/cyberia-portal/CommonCyberiaPortal.js +0 -223
- package/src/client/components/cyberia-portal/RoutesCyberiaPortal.js +0 -62
- package/src/client/components/cyberia-portal/ServerCyberiaPortal.js +0 -136
- package/src/client/components/default/RoutesDefault.js +0 -49
- package/src/client/components/itemledger/RoutesItemledger.js +0 -40
- package/src/client/components/underpost/RoutesUnderpost.js +0 -47
- package/src/client/ssr/email/DefaultRecoverEmail.js +0 -21
- package/src/client/ssr/email/DefaultVerifyEmail.js +0 -17
- package/src/client/ssr/pages/CyberiaServerMetrics.js +0 -461
- package/src/client/sw/default.sw.js +0 -127
- package/src/client/sw/template.sw.js +0 -84
- package/src/grpc/cyberia/OFF_CHAIN_ECONOMY.md +0 -305
- package/src/grpc/cyberia/README.md +0 -326
|
@@ -6,8 +6,9 @@ import { RouterReady } from '../core/Router.js';
|
|
|
6
6
|
import { s } from '../core/VanillaJs.js';
|
|
7
7
|
import { commonUserGuard } from '../core/CommonJs.js';
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
class LogInUnderpost {
|
|
10
|
+
static async instance() {
|
|
11
|
+
LogIn.onLogin(async (options) => {
|
|
11
12
|
const { token, user } = options;
|
|
12
13
|
|
|
13
14
|
AppStoreUnderpost.Data.user.main.model.user = user;
|
|
@@ -15,9 +16,10 @@ const LogInUnderpost = async function () {
|
|
|
15
16
|
await RouterReady;
|
|
16
17
|
await PanelForm.Data['underpost-panel'].updatePanel();
|
|
17
18
|
if (s(`.main-btn-cloud`) && commonUserGuard(user.role)) s(`.main-btn-cloud`).classList.remove('hide');
|
|
18
|
-
};
|
|
19
|
+
}, { key: 'LogInUnderpost' });
|
|
19
20
|
const { user } = await Auth.sessionIn();
|
|
20
21
|
AppStoreUnderpost.Data.user.main.model.user = user;
|
|
21
|
-
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
22
24
|
|
|
23
25
|
export { LogInUnderpost };
|
|
@@ -3,13 +3,15 @@ import { AppStoreUnderpost } from './AppStoreUnderpost.js';
|
|
|
3
3
|
import { PanelForm } from '../core/PanelForm.js';
|
|
4
4
|
import { s } from '../core/VanillaJs.js';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
class LogOutUnderpost {
|
|
7
|
+
static async instance() {
|
|
8
|
+
LogOut.onLogout(async (result = { user: { _id: '' } }) => {
|
|
8
9
|
AppStoreUnderpost.Data.user.main.model.user = result.user;
|
|
9
10
|
|
|
10
11
|
PanelForm.Data['underpost-panel'].updatePanel();
|
|
11
12
|
if (s(`.main-btn-cloud`)) s(`.main-btn-cloud`).classList.add('hide');
|
|
12
|
-
};
|
|
13
|
-
}
|
|
13
|
+
}, { key: 'LogOutUnderpost' });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
14
16
|
|
|
15
17
|
export { LogOutUnderpost };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { loggerFactory } from '../core/Logger.js';
|
|
2
|
+
import { Modal } from '../core/Modal.js';
|
|
3
|
+
import { s } from '../core/VanillaJs.js';
|
|
4
|
+
|
|
5
|
+
const logger = loggerFactory(import.meta);
|
|
6
|
+
|
|
7
|
+
const BannerAppTemplate = html`underpost.net`;
|
|
8
|
+
|
|
9
|
+
class RouterUnderpost {
|
|
10
|
+
static routes() {
|
|
11
|
+
return {
|
|
12
|
+
'/': {
|
|
13
|
+
title: 'Home',
|
|
14
|
+
render: () => Modal.onHomeRouterEvent(),
|
|
15
|
+
},
|
|
16
|
+
'/contracultura-cyberpunk': {
|
|
17
|
+
title: 'contracultura-cyberpunk',
|
|
18
|
+
render: () => s(`.main-btn-contracultura-cyberpunk`).click(),
|
|
19
|
+
},
|
|
20
|
+
'/lab-gallery': { title: 'lab-gallery', render: () => s(`.main-btn-lab-gallery`).click() },
|
|
21
|
+
'/log-in': { title: 'log-in', render: () => s(`.main-btn-log-in`).click() },
|
|
22
|
+
'/sign-up': { title: 'sign-up', render: () => s(`.main-btn-sign-up`).click() },
|
|
23
|
+
'/log-out': {
|
|
24
|
+
title: 'log-out',
|
|
25
|
+
render: () => s(`.main-btn-log-out`).click(),
|
|
26
|
+
},
|
|
27
|
+
'/account': {
|
|
28
|
+
title: 'account',
|
|
29
|
+
render: () => s(`.main-btn-account`).click(),
|
|
30
|
+
},
|
|
31
|
+
'/u': { title: 'public-profile', render: () => s(`.main-btn-public-profile`).click() },
|
|
32
|
+
'/settings': { title: 'settings', render: () => s(`.main-btn-settings`).click() },
|
|
33
|
+
'/recover': { title: 'recover', render: () => s(`.main-btn-recover`).click() },
|
|
34
|
+
'/content': { title: 'content', render: () => s(`.main-btn-content`).click() },
|
|
35
|
+
'/cloud': { title: 'cloud', render: () => s(`.main-btn-cloud`).click() },
|
|
36
|
+
'/polyhedron': { title: 'polyhedron', render: () => s(`.main-btn-polyhedron`).click() },
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
static instance() {
|
|
41
|
+
return { Routes: RouterUnderpost.routes };
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { RouterUnderpost, BannerAppTemplate };
|
|
@@ -3,14 +3,14 @@ import { FullScreen } from '../core/FullScreen.js';
|
|
|
3
3
|
import { Translate } from '../core/Translate.js';
|
|
4
4
|
import { Worker } from '../core/Worker.js';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
class SettingsUnderpost {
|
|
7
|
+
static async instance() {
|
|
8
8
|
let render = await FullScreen.RenderSetting();
|
|
9
9
|
render += await Css.RenderSetting();
|
|
10
10
|
render += await Translate.RenderSetting();
|
|
11
11
|
render += await Worker.RenderSetting();
|
|
12
12
|
return render;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
15
|
|
|
16
16
|
export { SettingsUnderpost };
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { SignUp } from '../core/SignUp.js';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
class SignUpUnderpost {
|
|
4
|
+
static instance() {
|
|
5
|
+
SignUp.onSignup(async (options) => {
|
|
5
6
|
const { user } = options;
|
|
6
|
-
};
|
|
7
|
-
}
|
|
7
|
+
}, { key: 'SignUpUnderpost' });
|
|
8
|
+
}
|
|
9
|
+
}
|
|
8
10
|
|
|
9
11
|
export { SignUpUnderpost };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Translate } from '../core/Translate.js';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
class TranslateUnderpost {
|
|
4
|
+
static async instance() {
|
|
5
5
|
Translate.Data['contracultura-cyberpunk'] = { en: 'Contracultura Cyberpunk', es: 'Contracultura Cyberpunk' };
|
|
6
6
|
Translate.Data['lab-gallery'] = { en: 'Lab Gallery', es: 'Lab Gallery' };
|
|
7
|
-
}
|
|
8
|
-
}
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
9
|
|
|
10
10
|
export { TranslateUnderpost };
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# Action System
|
|
2
|
+
|
|
3
|
+
**Module:** `src/api/cyberia-action` · `src/api/cyberia-dialogue`
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
The Action System defines how NPC entities interact with players. An **Action** is a spatial, typed payload attached to a map entity that the player activates by tapping the NPC. Actions drive dialogue, shops, crafting, storage, and quest grant events.
|
|
10
|
+
|
|
11
|
+
> **Implementation status — Pre-alpha:** The CyberiaAction and CyberiaDialogue MongoDB schemas and Engine REST API (`src/api/cyberia-action`, `src/api/cyberia-dialogue`) are defined. Go server integration (NPC tap routing to action handlers, shop/craft transaction processing, quest grant on dialogue completion) is planned for the **Alpha milestone**. The `freeze_start`/`freeze_end` WS messages for modal protection are implemented in the Go server today.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Data Model
|
|
16
|
+
|
|
17
|
+
### CyberiaAction Schema
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
CyberiaAction {
|
|
21
|
+
code: String // stable unique slug
|
|
22
|
+
type: String // see Action Types below
|
|
23
|
+
label: String // display label on interaction button
|
|
24
|
+
|
|
25
|
+
// Spatial origin — NPC entity cell providing this action
|
|
26
|
+
sourceMapCode: String
|
|
27
|
+
sourceCellX: Number
|
|
28
|
+
sourceCellY: Number
|
|
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')
|
|
32
|
+
|
|
33
|
+
// Quest grant — first interaction with this NPC starts the linked quest chain
|
|
34
|
+
grantQuestCode: String // empty = no quest granted
|
|
35
|
+
|
|
36
|
+
// Dialogue
|
|
37
|
+
dialogCode: String // greeting dialogue shown on tap
|
|
38
|
+
questDialogueCodes: [String] // ordered dialogue codes that satisfy 'talk' quest objectives
|
|
39
|
+
|
|
40
|
+
// Type-specific payloads:
|
|
41
|
+
shopItems: [{
|
|
42
|
+
itemId: String // ObjectLayer item ID being sold
|
|
43
|
+
priceItemId: String // currency item ID (default: 'coin')
|
|
44
|
+
priceQty: Number // price quantity
|
|
45
|
+
}]
|
|
46
|
+
|
|
47
|
+
craftRecipes: [{
|
|
48
|
+
outputItems: [{ itemId: String, qty: Number }]
|
|
49
|
+
ingredients: [{ itemId: String, qty: Number }]
|
|
50
|
+
}]
|
|
51
|
+
|
|
52
|
+
storageSlots: Number // storage capacity (type='storage' only)
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### CyberiaDialogue Schema
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
CyberiaDialogue {
|
|
60
|
+
code: String // grouping key (e.g. "wason-intro")
|
|
61
|
+
order: Number // 0-based sequence within the group
|
|
62
|
+
speaker: String // display name above the dialogue line
|
|
63
|
+
text: String // dialogue line content
|
|
64
|
+
mood: String // emotion hint: neutral | angry | sad | happy | ...
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
A single `code` groups many ordered dialogue lines. The C client fetches all lines for a given code in one request, then displays them sequentially.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Action Types
|
|
73
|
+
|
|
74
|
+
| Type | Description | Active Payload |
|
|
75
|
+
| ------------ | -------------------------------------------------------------- | ---------------------------------------------------- |
|
|
76
|
+
| `quest-talk` | Grants a quest on first interaction, then shows dialogue | `grantQuestCode`, `dialogCode`, `questDialogueCodes` |
|
|
77
|
+
| `talk` | NPC dialogue only — satisfies `talk` quest objectives | `dialogCode`, `questDialogueCodes` |
|
|
78
|
+
| `shop` | Item shop — player buys items with in-game currency | `shopItems[]` |
|
|
79
|
+
| `craft` | Crafting station — consume ingredients to produce output items | `craftRecipes[]` |
|
|
80
|
+
| `storage` | Personal item storage vault | `storageSlots` |
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Action–Quest Integration
|
|
85
|
+
|
|
86
|
+
The Action System and Quest System are linked through `provideItemId` and `questDialogueCodes`:
|
|
87
|
+
|
|
88
|
+
```mermaid
|
|
89
|
+
graph LR
|
|
90
|
+
Quest["CyberiaQuest\nstep.objective:\n{ type: 'talk', itemId: 'wason' }"]
|
|
91
|
+
Action["CyberiaAction\nprovideItemId: 'wason'\ngrantQuestCode: 'wason-intro'\nquestDialogueCodes: ['wason-intro']"]
|
|
92
|
+
Progress["CyberiaQuestProgress\nstep.objectiveProgress[i].current++"]
|
|
93
|
+
|
|
94
|
+
Quest -->|matched by provideItemId| Action
|
|
95
|
+
Action -->|player completes dialogue| Progress
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**Talk objective satisfaction flow:**
|
|
99
|
+
|
|
100
|
+
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.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Shop Transaction Flow
|
|
109
|
+
|
|
110
|
+
```mermaid
|
|
111
|
+
sequenceDiagram
|
|
112
|
+
participant P as Player
|
|
113
|
+
participant G as Go Server
|
|
114
|
+
participant E as Engine (Node.js)
|
|
115
|
+
|
|
116
|
+
P->>G: Tap shop NPC
|
|
117
|
+
G->>E: GET /api/cyberia-action?sourceMapCode=...&sourceCellX=...
|
|
118
|
+
E-->>G: CyberiaAction { type: 'shop', shopItems: [...] }
|
|
119
|
+
G-->>P: init_data → shop payload (item list + prices)
|
|
120
|
+
P-->>G: FrozenInteractionState (modal open)
|
|
121
|
+
|
|
122
|
+
P->>G: Buy request { itemId, quantity }
|
|
123
|
+
G->>E: GET player coin balance
|
|
124
|
+
Note over G: balance >= price * quantity?
|
|
125
|
+
G->>E: Deduct coins + grant item to inventory
|
|
126
|
+
G-->>P: FCT: CoinLoss + ItemGain events
|
|
127
|
+
G-->>P: ThawPlayer (modal close allowed)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Craft Transaction Flow
|
|
133
|
+
|
|
134
|
+
```mermaid
|
|
135
|
+
sequenceDiagram
|
|
136
|
+
participant P as Player
|
|
137
|
+
participant G as Go Server
|
|
138
|
+
participant E as Engine (Node.js)
|
|
139
|
+
participant BC as ObjectLayerToken
|
|
140
|
+
|
|
141
|
+
P->>G: Tap craft NPC
|
|
142
|
+
G-->>P: FrozenInteractionState
|
|
143
|
+
P->>G: Craft request { recipeIndex }
|
|
144
|
+
Note over G: Verify player has all ingredients
|
|
145
|
+
G->>E: Deduct ingredient quantities from inventory
|
|
146
|
+
G->>E: Grant output items to inventory
|
|
147
|
+
opt Item has on-chain token (ERC-1155)
|
|
148
|
+
G->>BC: burn(ingredientTokenId, qty) per ingredient
|
|
149
|
+
G->>BC: mint(outputTokenId, qty)
|
|
150
|
+
end
|
|
151
|
+
G-->>P: FCT: ItemLoss per ingredient + ItemGain per output
|
|
152
|
+
G-->>P: ThawPlayer
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Spatial Binding and Instance Init
|
|
158
|
+
|
|
159
|
+
`sourceMapCode + sourceCellX + sourceCellY` links an Action to a specific entity cell in a specific map. During instance initialization:
|
|
160
|
+
|
|
161
|
+
1. `instance_loader.go` reads each `CyberiaEntity` at its `initCellX/initCellY`.
|
|
162
|
+
2. For entities with matching Action source coordinates, the Go server attaches the Action payload to the runtime entity.
|
|
163
|
+
3. The entity's `entityStatus` is set to `action-provider` (ESI id=8) — the bouncing chat icon renders above its nameplate.
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Dialogue System
|
|
168
|
+
|
|
169
|
+
Dialogue groups allow multi-line sequential NPC speech:
|
|
170
|
+
|
|
171
|
+
```json
|
|
172
|
+
[
|
|
173
|
+
{
|
|
174
|
+
"code": "wason-intro",
|
|
175
|
+
"order": 0,
|
|
176
|
+
"speaker": "Wason",
|
|
177
|
+
"text": "Young traveler... you've finally arrived.",
|
|
178
|
+
"mood": "neutral"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"code": "wason-intro",
|
|
182
|
+
"order": 1,
|
|
183
|
+
"speaker": "Wason",
|
|
184
|
+
"text": "The village is in danger. I need your help.",
|
|
185
|
+
"mood": "sad"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"code": "wason-intro",
|
|
189
|
+
"order": 2,
|
|
190
|
+
"speaker": "Wason",
|
|
191
|
+
"text": "Collect 5 herbs from the forest and return to me.",
|
|
192
|
+
"mood": "neutral"
|
|
193
|
+
}
|
|
194
|
+
]
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
The C client fetches the full `code` group sorted by `order`, then renders lines one at a time in `modal_dialogue.c`. The player advances through lines by tapping.
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Indexes
|
|
202
|
+
|
|
203
|
+
```javascript
|
|
204
|
+
// CyberiaAction
|
|
205
|
+
{ code: 1 } // unique
|
|
206
|
+
{ provideItemId: 1 }
|
|
207
|
+
{ grantQuestCode: 1 } // sparse
|
|
208
|
+
{ sourceMapCode: 1, sourceCellX: 1, sourceCellY: 1 }
|
|
209
|
+
|
|
210
|
+
// CyberiaDialogue
|
|
211
|
+
{ code: 1 }
|
|
212
|
+
{ code: 1, order: 1 }
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Example Action Document
|
|
218
|
+
|
|
219
|
+
```json
|
|
220
|
+
{
|
|
221
|
+
"code": "wason-npc",
|
|
222
|
+
"type": "quest-talk",
|
|
223
|
+
"label": "Talk",
|
|
224
|
+
"sourceMapCode": "cyberia-village",
|
|
225
|
+
"sourceCellX": 12,
|
|
226
|
+
"sourceCellY": 8,
|
|
227
|
+
"provideItemId": "wason",
|
|
228
|
+
"grantQuestCode": "wason-intro",
|
|
229
|
+
"dialogCode": "wason-intro",
|
|
230
|
+
"questDialogueCodes": ["wason-intro"],
|
|
231
|
+
"shopItems": [],
|
|
232
|
+
"craftRecipes": [],
|
|
233
|
+
"storageSlots": 0
|
|
234
|
+
}
|
|
235
|
+
```
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Cyberia Architecture
|
|
2
|
+
|
|
3
|
+
Cyberia is the MMO extension that runs on top of Underpost Platform. Keep the model simple:
|
|
4
|
+
|
|
5
|
+
- Underpost Platform provides the toolchain, deployment surface, PWA delivery, and base infrastructure.
|
|
6
|
+
- `engine-cyberia` is the content authority.
|
|
7
|
+
- `cyberia-server` is the authoritative simulation.
|
|
8
|
+
- `cyberia-client` is the presentation runtime.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## System map
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
Underpost Platform
|
|
16
|
+
-> toolchain, deploy, PWA build, static delivery, monitoring
|
|
17
|
+
|
|
18
|
+
engine-cyberia (Node.js)
|
|
19
|
+
-> content, validation, persistence, gRPC/REST data services, asset metadata
|
|
20
|
+
-> feeds cyberia-server and cyberia-client
|
|
21
|
+
|
|
22
|
+
cyberia-server (Go)
|
|
23
|
+
-> authoritative simulation and tick processing
|
|
24
|
+
-> feeds cyberia-client over WebSocket
|
|
25
|
+
|
|
26
|
+
cyberia-client (C/WASM)
|
|
27
|
+
-> rendering, input, prediction, presentation
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Responsibility split
|
|
33
|
+
|
|
34
|
+
| Service | Owns | Must not own |
|
|
35
|
+
| ---------------- | ------------------------------------------------------------------------- | --------------------------------------------- |
|
|
36
|
+
| `engine-cyberia` | content, validation, persistence, gRPC/REST data services, asset metadata | authoritative simulation, render policy |
|
|
37
|
+
| `cyberia-server` | authoritative simulation, world tick, gameplay mutation, AOI replication | content authority, presentation metadata |
|
|
38
|
+
| `cyberia-client` | rendering, input, prediction, interpolation, presentation | authoritative world state, gameplay authority |
|
|
39
|
+
|
|
40
|
+
Two boundaries are non-negotiable:
|
|
41
|
+
|
|
42
|
+
- Do not move authoritative logic into the client.
|
|
43
|
+
- Do not move content-authority logic into the Go runtime.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Data flow
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
engine-cyberia --gRPC--> cyberia-server --WebSocket--> cyberia-client
|
|
51
|
+
engine-cyberia --REST-------------------------------> cyberia-client
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
- `engine-cyberia` publishes world content, validation rules, persistence-backed data, and asset metadata.
|
|
55
|
+
- `cyberia-server` loads authoritative world data, advances the simulation tick, and emits per-player AOI snapshots.
|
|
56
|
+
- `cyberia-client` sends typed input commands upstream and renders the result locally with prediction and interpolation.
|
|
57
|
+
|
|
58
|
+
There is one source of truth per concern:
|
|
59
|
+
|
|
60
|
+
- Content and world configuration: `engine-cyberia`
|
|
61
|
+
- Real-time authoritative state: `cyberia-server`
|
|
62
|
+
- Presentation and local interaction: `cyberia-client`
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Operational guardrails
|
|
67
|
+
|
|
68
|
+
- Prefer one source of truth for config, deploy IDs, runtime selection, startup behavior, and generated assets.
|
|
69
|
+
- Reuse existing helpers and conventions instead of creating parallel implementations.
|
|
70
|
+
- Do not duplicate parsing, env resolution, or path normalization logic across modules.
|
|
71
|
+
- Treat generated artifacts as outputs only; never hand-edit them.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Health states
|
|
76
|
+
|
|
77
|
+
| State | Meaning |
|
|
78
|
+
| ---------- | -------------------------------------------------------------------- |
|
|
79
|
+
| `healthy` | all three Cyberia services are up and connected |
|
|
80
|
+
| `degraded` | at least one service is reconnecting or unavailable |
|
|
81
|
+
| `standby` | gameplay is paused because the full three-service set is not healthy |
|
|
82
|
+
|
|
83
|
+
This is the model to document, operate, and monitor against.
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# Cyberia CLI
|
|
2
|
+
|
|
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`.
|
|
6
|
+
|
|
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.
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
node bin/cyberia.js <command> [subcommand] [options]
|
|
12
|
+
# or, installed globally:
|
|
13
|
+
cyberia <command> [subcommand] [options]
|
|
14
|
+
```
|
|
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
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## `cyberia ol` — object layer
|
|
31
|
+
|
|
32
|
+
Import PNG assets, generate procedural layers, build atlas sprite sheets, push to IPFS + MongoDB.
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
cyberia ol [item-id] [options]
|
|
36
|
+
```
|
|
37
|
+
|
|
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 |
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Import specific items
|
|
55
|
+
cyberia ol hatchet,sword --import --env-path ./engine-private/conf/dd-cyberia/.env.development
|
|
56
|
+
|
|
57
|
+
# Batch import by type, or everything
|
|
58
|
+
cyberia ol --import-types skin,floors
|
|
59
|
+
cyberia ol --import-types all
|
|
60
|
+
|
|
61
|
+
# Procedural generation
|
|
62
|
+
cyberia ol floor-desert --generate --seed fx-42
|
|
63
|
+
cyberia ol floor-grass --generate --frame-count 4 --count 5 --density 0.7
|
|
64
|
+
|
|
65
|
+
# Atlas / inspect
|
|
66
|
+
cyberia ol hatchet --to-atlas-sprite-sheet
|
|
67
|
+
cyberia ol hatchet --show-frame 08_0
|
|
68
|
+
|
|
69
|
+
# Drop + re-import a single item, including static folders
|
|
70
|
+
cyberia ol hatchet --drop --client-public --import
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## `cyberia instance` — instance data
|
|
76
|
+
|
|
77
|
+
Export / import / drop a game instance and its related maps, entities, actions, quests, and object
|
|
78
|
+
layers in MongoDB.
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
cyberia instance [instance-code] [options]
|
|
82
|
+
```
|
|
83
|
+
|
|
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 |
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
cyberia instance FOREST --export ./backups/FOREST
|
|
94
|
+
cyberia instance FOREST --import ./backups/FOREST
|
|
95
|
+
cyberia instance FOREST --drop
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## `cyberia client-hints` — presentation hints
|
|
101
|
+
|
|
102
|
+
Manage the per-instance `CyberiaClientHints` document (palette, camera, status icons, interpolation).
|
|
103
|
+
These are presentation overrides only — never an instance or server identifier.
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
cyberia client-hints [instance-code] [options]
|
|
107
|
+
```
|
|
108
|
+
|
|
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 |
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
cyberia client-hints cyberia-main --seed-defaults
|
|
119
|
+
cyberia client-hints cyberia-main --export ./client-hints-cyberia-main.json
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## `cyberia chain` — Besu + ObjectLayerToken
|
|
125
|
+
|
|
126
|
+
Hyperledger Besu IBFT2 network and ERC-1155 `ObjectLayerToken` (CKY) lifecycle.
|
|
127
|
+
|
|
128
|
+
### Network
|
|
129
|
+
|
|
130
|
+
```bash
|
|
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]
|
|
134
|
+
```
|
|
135
|
+
|
|
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`.
|
|
140
|
+
|
|
141
|
+
### Contract
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
cyberia chain compile
|
|
145
|
+
cyberia chain test
|
|
146
|
+
cyberia chain deploy-contract --network besu-k8s # deploys ObjectLayerToken, mints initial CKY
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Keys
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
cyberia chain key-gen # new secp256k1 deployer key
|
|
153
|
+
cyberia chain set-coinbase --private-key 0xYOUR_KEY
|
|
154
|
+
cyberia chain set-coinbase --from-file ./engine-private/eth-networks/besu/<address>.key.json
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Tokens
|
|
158
|
+
|
|
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
|
|
163
|
+
cyberia chain transfer --from 0x... --to 0x... --token-id 0 --amount 1000
|
|
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
|
|
168
|
+
cyberia chain unpause [--network besu-k8s]
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
`--from-db` resolves the canonical IPFS CID from MongoDB (recommended over manual `--metadata-cid`).
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## `cyberia run-workflow` — operational scripts
|
|
176
|
+
|
|
177
|
+
Named scripts from the `scripts/` directory for seeding and build maintenance.
|
|
178
|
+
|
|
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`) |
|
|
187
|
+
|
|
188
|
+
```bash
|
|
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
|
|
191
|
+
cyberia run-workflow generate-semantic-examples
|
|
192
|
+
cyberia run-workflow build-manifest
|
|
193
|
+
cyberia run-workflow build-server-dashboard
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Operational rules
|
|
199
|
+
|
|
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.
|