blockmine 1.24.0 → 1.27.0
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/CHANGELOG.md +76 -1
- package/README.en.md +427 -0
- package/README.md +40 -0
- package/backend/package.json +2 -2
- package/backend/prisma/migrations/20260328173000_add_plugin_source_ref/migration.sql +2 -0
- package/backend/prisma/migrations/migration_lock.toml +2 -2
- package/backend/prisma/schema.prisma +2 -0
- package/backend/src/ai/plugin-assistant-system-prompt.md +664 -5
- package/backend/src/api/routes/apiKeys.js +8 -0
- package/backend/src/api/routes/bots.js +271 -9
- package/backend/src/api/routes/eventGraphs.js +151 -1
- package/backend/src/api/routes/health.js +38 -0
- package/backend/src/api/routes/nodeRegistry.js +63 -0
- package/backend/src/api/routes/plugins.js +254 -29
- package/backend/src/api/routes/servers.js +14 -2
- package/backend/src/container.js +11 -8
- package/backend/src/core/BotCommandLoader.js +161 -0
- package/backend/src/core/BotConnection.js +125 -0
- package/backend/src/core/BotEventHandlers.js +234 -0
- package/backend/src/core/BotIPCHandler.js +445 -0
- package/backend/src/core/BotManager.js +15 -7
- package/backend/src/core/BotProcess.js +169 -140
- package/backend/src/core/EventGraphManager.js +7 -3
- package/backend/src/core/GraphDebugHandler.js +229 -0
- package/backend/src/core/GraphDebugIPC.js +117 -0
- package/backend/src/core/GraphExecutionEngine.js +545 -978
- package/backend/src/core/GraphTraversal.js +80 -0
- package/backend/src/core/GraphValidation.js +73 -0
- package/backend/src/core/NodeDefinition.js +138 -0
- package/backend/src/core/NodeRegistry.js +153 -141
- package/backend/src/core/PluginLoader.js +83 -3
- package/backend/src/core/PluginManager.js +346 -35
- package/backend/src/core/RewindSignal.js +9 -0
- package/backend/src/core/config/ConfigValidator.js +72 -0
- package/backend/src/core/config/FeatureFlags.js +52 -0
- package/backend/src/core/config/__tests__/ConfigValidator.test.js +232 -0
- package/backend/src/core/domain/entities/Bot.js +39 -0
- package/backend/src/core/domain/entities/Command.js +41 -0
- package/backend/src/core/domain/entities/EventGraph.js +39 -0
- package/backend/src/core/domain/entities/Plugin.js +45 -0
- package/backend/src/core/domain/entities/User.js +40 -0
- package/backend/src/core/domain/services/DependencyResolver.js +168 -0
- package/backend/src/core/domain/services/GraphValidator.js +117 -0
- package/backend/src/core/domain/services/PermissionChecker.js +34 -0
- package/backend/src/core/domain/services/__tests__/DependencyResolver.test.js +126 -0
- package/backend/src/core/domain/valueObjects/BotConfig.js +27 -0
- package/backend/src/core/domain/valueObjects/DependencyGraph.js +86 -0
- package/backend/src/core/domain/valueObjects/PluginManifest.js +36 -0
- package/backend/src/core/errors/BaseError.js +29 -0
- package/backend/src/core/errors/ErrorHandler.js +81 -0
- package/backend/src/core/errors/__tests__/ErrorHandler.test.js +188 -0
- package/backend/src/core/errors/index.js +68 -0
- package/backend/src/core/infrastructure/BatchingUtility.js +66 -0
- package/backend/src/core/infrastructure/CircuitBreaker.js +103 -0
- package/backend/src/core/infrastructure/ConnectionPool.js +81 -0
- package/backend/src/core/infrastructure/RateLimiter.js +64 -0
- package/backend/src/core/infrastructure/__tests__/BatchingUtility.test.js +86 -0
- package/backend/src/core/infrastructure/__tests__/CircuitBreaker.test.js +156 -0
- package/backend/src/core/infrastructure/__tests__/ConnectionPool.test.js +146 -0
- package/backend/src/core/infrastructure/__tests__/RateLimiter.test.js +171 -0
- package/backend/src/core/ipc/botApiFactory.js +72 -0
- package/backend/src/core/ipc/ipcMessageTypes.js +115 -0
- package/backend/src/core/logging/AuditLogger.js +61 -0
- package/backend/src/core/logging/StructuredLogger.js +80 -0
- package/backend/src/core/logging/__tests__/StructuredLogger.test.js +213 -0
- package/backend/src/core/logging/index.js +7 -0
- package/backend/src/core/metrics/MetricsCollector.js +104 -0
- package/backend/src/core/metrics/__tests__/MetricsCollector.test.js +131 -0
- package/backend/src/core/node-registries/actionsNodes.js +191 -0
- package/backend/src/core/node-registries/arraysNodes.js +152 -0
- package/backend/src/core/node-registries/botNodes.js +48 -0
- package/backend/src/core/node-registries/containerNodes.js +141 -0
- package/backend/src/core/node-registries/dataNodes.js +284 -0
- package/backend/src/core/node-registries/debugNodes.js +23 -0
- package/backend/src/core/node-registries/eventsNodes.js +223 -0
- package/backend/src/core/node-registries/flowNodes.js +151 -0
- package/backend/src/core/node-registries/furnaceNodes.js +123 -0
- package/backend/src/core/node-registries/index.js +108 -0
- package/backend/src/core/node-registries/inventory.js +102 -106
- package/backend/src/core/node-registries/logicNodes.js +54 -0
- package/backend/src/core/node-registries/mathNodes.js +38 -0
- package/backend/src/core/node-registries/navigationNodes.js +109 -0
- package/backend/src/core/node-registries/objectsNodes.js +90 -0
- package/backend/src/core/node-registries/stringsNodes.js +165 -0
- package/backend/src/core/node-registries/timeNodes.js +105 -0
- package/backend/src/core/node-registries/typeNodes.js +22 -0
- package/backend/src/core/node-registries/usersNodes.js +126 -0
- package/backend/src/core/nodes/arrays/shuffle.js +14 -0
- package/backend/src/core/nodes/bot/get_name.js +8 -0
- package/backend/src/core/nodes/bot/stop_bot.js +5 -0
- package/backend/src/core/nodes/container/open.js +101 -111
- package/backend/src/core/nodes/data/store_read.js +26 -0
- package/backend/src/core/nodes/data/store_write.js +23 -0
- package/backend/src/core/nodes/event/call_event.js +31 -0
- package/backend/src/core/nodes/event/custom_event.js +8 -0
- package/backend/src/core/nodes/flow/timer.js +35 -0
- package/backend/src/core/nodes/inventory/drop.js +73 -65
- package/backend/src/core/nodes/inventory/equip.js +54 -45
- package/backend/src/core/nodes/inventory/select_slot.js +48 -46
- package/backend/src/core/nodes/navigation/follow.js +54 -51
- package/backend/src/core/nodes/navigation/go_to.js +41 -53
- package/backend/src/core/nodes/navigation/go_to_entity.js +65 -69
- package/backend/src/core/nodes/navigation/go_to_player.js +65 -70
- package/backend/src/core/nodes/navigation/stop.js +17 -26
- package/backend/src/core/nodes/users/add_to_group.js +24 -0
- package/backend/src/core/nodes/users/check_permission.js +26 -0
- package/backend/src/core/nodes/users/remove_from_group.js +24 -0
- package/backend/src/core/services/BotIPCMessageRouter.js +337 -0
- package/backend/src/core/services/BotLifecycleService.js +43 -450
- package/backend/src/core/services/CacheManager.js +83 -23
- package/backend/src/core/services/CrashRestartManager.js +42 -0
- package/backend/src/core/services/DebugSessionManager.js +114 -12
- package/backend/src/core/services/EventGraphService.js +69 -0
- package/backend/src/core/services/MinecraftBotManager.js +9 -1
- package/backend/src/core/services/PluginManagementService.js +84 -0
- package/backend/src/core/services/TestModeContext.js +65 -0
- package/backend/src/core/services/__tests__/CacheManager.test.js +168 -0
- package/backend/src/core/services.js +1 -11
- package/backend/src/core/validation/InputValidator.js +167 -0
- package/backend/src/core/validation/__tests__/InputValidator.test.js +296 -0
- package/backend/src/real-time/botApi/index.js +1 -1
- package/backend/src/real-time/socketHandler.js +26 -0
- package/backend/src/server.js +21 -6
- package/frontend/dist/assets/browser-ponyfill-D8y0Ty7C.js +2 -0
- package/frontend/dist/assets/index-CFJLS0dk.css +32 -0
- package/frontend/dist/assets/index-D91UGNMG.js +11260 -0
- package/frontend/dist/flags/en.svg +32 -0
- package/frontend/dist/flags/ru.svg +5 -0
- package/frontend/dist/index.html +2 -2
- package/frontend/dist/locales/en/admin.json +100 -0
- package/frontend/dist/locales/en/api-keys.json +58 -0
- package/frontend/dist/locales/en/bots.json +113 -0
- package/frontend/dist/locales/en/common.json +53 -0
- package/frontend/dist/locales/en/configuration.json +22 -0
- package/frontend/dist/locales/en/console.json +10 -0
- package/frontend/dist/locales/en/dashboard.json +85 -0
- package/frontend/dist/locales/en/dialogs.json +70 -0
- package/frontend/dist/locales/en/event-graphs.json +50 -0
- package/frontend/dist/locales/en/graph-store.json +70 -0
- package/frontend/dist/locales/en/login.json +36 -0
- package/frontend/dist/locales/en/management.json +192 -0
- package/frontend/dist/locales/en/minecraft-viewer.json +27 -0
- package/frontend/dist/locales/en/nodes.json +1132 -0
- package/frontend/dist/locales/en/permissions.json +50 -0
- package/frontend/dist/locales/en/plugin-detail.json +69 -0
- package/frontend/dist/locales/en/plugins.json +329 -0
- package/frontend/dist/locales/en/proxies.json +81 -0
- package/frontend/dist/locales/en/servers.json +39 -0
- package/frontend/dist/locales/en/setup.json +19 -0
- package/frontend/dist/locales/en/sidebar.json +195 -0
- package/frontend/dist/locales/en/tasks.json +62 -0
- package/frontend/dist/locales/en/visual-editor.json +418 -0
- package/frontend/dist/locales/en/websocket.json +86 -0
- package/frontend/dist/locales/ru/admin.json +100 -0
- package/frontend/dist/locales/ru/api-keys.json +58 -0
- package/frontend/dist/locales/ru/bots.json +113 -0
- package/frontend/dist/locales/ru/common.json +49 -0
- package/frontend/dist/locales/ru/configuration.json +22 -0
- package/frontend/dist/locales/ru/console.json +10 -0
- package/frontend/dist/locales/ru/dashboard.json +85 -0
- package/frontend/dist/locales/ru/dialogs.json +70 -0
- package/frontend/dist/locales/ru/event-graphs.json +50 -0
- package/frontend/dist/locales/ru/graph-store.json +70 -0
- package/frontend/dist/locales/ru/login.json +36 -0
- package/frontend/dist/locales/ru/management.json +192 -0
- package/frontend/dist/locales/ru/minecraft-viewer.json +30 -0
- package/frontend/dist/locales/ru/nodes.json +1131 -0
- package/frontend/dist/locales/ru/permissions.json +50 -0
- package/frontend/dist/locales/ru/plugin-detail.json +49 -0
- package/frontend/dist/locales/ru/plugins.json +209 -0
- package/frontend/dist/locales/ru/proxies.json +81 -0
- package/frontend/dist/locales/ru/servers.json +39 -0
- package/frontend/dist/locales/ru/setup.json +19 -0
- package/frontend/dist/locales/ru/sidebar.json +195 -0
- package/frontend/dist/locales/ru/tasks.json +62 -0
- package/frontend/dist/locales/ru/visual-editor.json +420 -0
- package/frontend/dist/locales/ru/websocket.json +86 -0
- package/frontend/dist/monacoeditorwork/css.worker.bundle.js +7 -7
- package/frontend/dist/monacoeditorwork/html.worker.bundle.js +7 -7
- package/frontend/dist/monacoeditorwork/json.worker.bundle.js +7 -7
- package/frontend/dist/monacoeditorwork/ts.worker.bundle.js +3 -3
- package/frontend/package.json +6 -0
- package/nul +12 -0
- package/package.json +3 -3
- package/screen/3dviewer.png +0 -0
- package/screen/console.png +0 -0
- package/screen/dashboard.png +0 -0
- package/screen/graph_collabe.png +0 -0
- package/screen/graph_live_debug.png +0 -0
- package/screen/language_selector.png +0 -0
- package/screen/management_command.png +0 -0
- package/screen/node_debug_trace.png +0 -0
- package/screen/plugin_/320/276/320/261/320/267/320/276/321/200.png +0 -0
- package/screen/websocket.png +0 -0
- package/screen//320/275/320/260/321/201/321/202/321/200/320/276/320/271/320/272/320/270_/320/276/321/202/320/264/320/265/320/273/321/214/320/275/321/213/321/205_/320/272/320/276/320/274/320/260/320/275/320/264_/320/272/320/260/320/266/320/264/321/203_/320/272/320/276/320/274/320/260/320/275/320/273/320/264/321/203_/320/274/320/276/320/266/320/275/320/276_/320/275/320/260/321/201/321/202/321/200/320/260/320/270/320/262/320/260/321/202/321/214.png +0 -0
- package/screen//320/277/320/273/320/260/320/275/320/270/321/200/320/276/320/262/321/211/320/270/320/272_/320/274/320/276/320/266/320/275/320/276_/320/267/320/260/320/264/320/260/320/262/320/260/321/202/321/214_/320/264/320/265/320/271/321/201/321/202/320/262/320/270/321/217_/320/277/320/276_/320/262/321/200/320/265/320/274/320/265/320/275/320/270.png +0 -0
- package/.claude/agents/README.md +0 -469
- package/.claude/agents/auth-route-debugger.md +0 -118
- package/.claude/agents/auth-route-tester.md +0 -93
- package/.claude/agents/auto-error-resolver.md +0 -97
- package/.claude/agents/build-optimizer.md +0 -236
- package/.claude/agents/code-architect.md +0 -34
- package/.claude/agents/code-architecture-reviewer.md +0 -83
- package/.claude/agents/code-explorer.md +0 -51
- package/.claude/agents/code-refactor-master.md +0 -94
- package/.claude/agents/code-reviewer.md +0 -46
- package/.claude/agents/cost-optimizer.md +0 -134
- package/.claude/agents/deployment-orchestrator.md +0 -113
- package/.claude/agents/documentation-architect.md +0 -82
- package/.claude/agents/frontend-error-fixer.md +0 -77
- package/.claude/agents/iac-code-generator.md +0 -71
- package/.claude/agents/incident-responder.md +0 -346
- package/.claude/agents/infrastructure-architect.md +0 -31
- package/.claude/agents/kubernetes-specialist.md +0 -56
- package/.claude/agents/migration-planner.md +0 -181
- package/.claude/agents/network-architect.md +0 -196
- package/.claude/agents/plan-reviewer.md +0 -52
- package/.claude/agents/refactor-planner.md +0 -63
- package/.claude/agents/security-scanner.md +0 -102
- package/.claude/agents/web-research-specialist.md +0 -78
- package/.claude/commands/cost-analysis.md +0 -315
- package/.claude/commands/dev-docs-update.md +0 -55
- package/.claude/commands/dev-docs.md +0 -51
- package/.claude/commands/feature-dev.md +0 -125
- package/.claude/commands/incident-debug.md +0 -247
- package/.claude/commands/infra-plan.md +0 -81
- package/.claude/commands/migration-plan.md +0 -478
- package/.claude/commands/route-research-for-testing.md +0 -37
- package/.claude/commands/security-review.md +0 -66
- package/.claude/hooks/CONFIG.md +0 -448
- package/.claude/hooks/README.md +0 -163
- package/.claude/hooks/SKILL_ACTIVATION_COMPLETE.md +0 -226
- package/.claude/hooks/WINDOWS_HOOKS_README.md +0 -151
- package/.claude/hooks/add-skill-activation-banners.ts +0 -132
- package/.claude/hooks/comprehensive-skill-test.ts +0 -1315
- package/.claude/hooks/error-handling-reminder.sh +0 -12
- package/.claude/hooks/error-handling-reminder.ts +0 -222
- package/.claude/hooks/k8s-manifest-validator.sh +0 -56
- package/.claude/hooks/package-lock.json +0 -556
- package/.claude/hooks/package.json +0 -16
- package/.claude/hooks/post-tool-use-tracker.ps1 +0 -174
- package/.claude/hooks/post-tool-use-tracker.sh +0 -183
- package/.claude/hooks/security-policy-check.sh +0 -247
- package/.claude/hooks/skill-activation-prompt.ps1 +0 -10
- package/.claude/hooks/skill-activation-prompt.sh +0 -10
- package/.claude/hooks/skill-activation-prompt.ts +0 -141
- package/.claude/hooks/stop-build-check-enhanced.sh +0 -130
- package/.claude/hooks/terraform-validator.sh +0 -53
- package/.claude/hooks/test-input.json +0 -7
- package/.claude/hooks/test-skill-activation.ts +0 -427
- package/.claude/hooks/trigger-build-resolver.sh +0 -79
- package/.claude/hooks/tsc-check.sh +0 -173
- package/.claude/hooks/tsconfig.json +0 -19
- package/.claude/settings.json +0 -59
- package/.claude/settings.local.json +0 -67
- package/.claude/skills/README.md +0 -507
- package/.claude/skills/api-engineering/SKILL.md +0 -63
- package/.claude/skills/api-engineering/resources/api-versioning.md +0 -88
- package/.claude/skills/api-engineering/resources/graphql-patterns.md +0 -106
- package/.claude/skills/api-engineering/resources/rate-limiting.md +0 -118
- package/.claude/skills/api-engineering/resources/rest-api-design.md +0 -105
- package/.claude/skills/backend-dev-guidelines/SKILL.md +0 -306
- package/.claude/skills/backend-dev-guidelines/resources/architecture-overview.md +0 -451
- package/.claude/skills/backend-dev-guidelines/resources/async-and-errors.md +0 -307
- package/.claude/skills/backend-dev-guidelines/resources/complete-examples.md +0 -638
- package/.claude/skills/backend-dev-guidelines/resources/configuration.md +0 -275
- package/.claude/skills/backend-dev-guidelines/resources/database-patterns.md +0 -224
- package/.claude/skills/backend-dev-guidelines/resources/middleware-guide.md +0 -213
- package/.claude/skills/backend-dev-guidelines/resources/routing-and-controllers.md +0 -756
- package/.claude/skills/backend-dev-guidelines/resources/sentry-and-monitoring.md +0 -336
- package/.claude/skills/backend-dev-guidelines/resources/services-and-repositories.md +0 -789
- package/.claude/skills/backend-dev-guidelines/resources/testing-guide.md +0 -235
- package/.claude/skills/backend-dev-guidelines/resources/validation-patterns.md +0 -754
- package/.claude/skills/budget-and-cost-management/SKILL.md +0 -850
- package/.claude/skills/build-engineering/SKILL.md +0 -431
- package/.claude/skills/build-engineering/resources/artifact-repositories.md +0 -72
- package/.claude/skills/build-engineering/resources/build-caching.md +0 -96
- package/.claude/skills/build-engineering/resources/build-pipelines.md +0 -105
- package/.claude/skills/build-engineering/resources/build-security.md +0 -95
- package/.claude/skills/build-engineering/resources/build-systems.md +0 -389
- package/.claude/skills/build-engineering/resources/compilation-optimization.md +0 -201
- package/.claude/skills/build-engineering/resources/dependency-management.md +0 -73
- package/.claude/skills/build-engineering/resources/monorepo-builds.md +0 -110
- package/.claude/skills/build-engineering/resources/performance-optimization.md +0 -113
- package/.claude/skills/build-engineering/resources/reproducible-builds.md +0 -82
- package/.claude/skills/cloud-engineering/SKILL.md +0 -675
- package/.claude/skills/cloud-engineering/resources/aws-patterns.md +0 -742
- package/.claude/skills/cloud-engineering/resources/azure-patterns.md +0 -714
- package/.claude/skills/cloud-engineering/resources/cleared-cloud-environments.md +0 -987
- package/.claude/skills/cloud-engineering/resources/cloud-cost-optimization.md +0 -757
- package/.claude/skills/cloud-engineering/resources/cloud-networking.md +0 -1058
- package/.claude/skills/cloud-engineering/resources/cloud-security-tools.md +0 -1530
- package/.claude/skills/cloud-engineering/resources/cloud-security.md +0 -990
- package/.claude/skills/cloud-engineering/resources/gcp-patterns.md +0 -758
- package/.claude/skills/cloud-engineering/resources/migration-strategies.md +0 -820
- package/.claude/skills/cloud-engineering/resources/multi-cloud-strategies.md +0 -670
- package/.claude/skills/cloud-engineering/resources/oci-patterns.md +0 -1198
- package/.claude/skills/cloud-engineering/resources/serverless-patterns.md +0 -795
- package/.claude/skills/cloud-engineering/resources/well-architected-frameworks.md +0 -966
- package/.claude/skills/cybersecurity/SKILL.md +0 -409
- package/.claude/skills/cybersecurity/resources/security-architecture.md +0 -266
- package/.claude/skills/database-engineering/SKILL.md +0 -61
- package/.claude/skills/database-engineering/resources/backup-and-recovery.md +0 -72
- package/.claude/skills/database-engineering/resources/database-replication.md +0 -63
- package/.claude/skills/database-engineering/resources/postgresql-fundamentals.md +0 -70
- package/.claude/skills/database-engineering/resources/query-optimization.md +0 -68
- package/.claude/skills/devsecops/SKILL.md +0 -374
- package/.claude/skills/devsecops/resources/ci-cd-security.md +0 -204
- package/.claude/skills/devsecops/resources/compliance-automation.md +0 -530
- package/.claude/skills/devsecops/resources/compliance-frameworks.md +0 -2322
- package/.claude/skills/devsecops/resources/container-security.md +0 -915
- package/.claude/skills/devsecops/resources/cspm-integration.md +0 -1440
- package/.claude/skills/devsecops/resources/policy-enforcement.md +0 -619
- package/.claude/skills/devsecops/resources/secrets-management.md +0 -755
- package/.claude/skills/devsecops/resources/security-monitoring.md +0 -146
- package/.claude/skills/devsecops/resources/security-scanning.md +0 -887
- package/.claude/skills/devsecops/resources/security-testing.md +0 -203
- package/.claude/skills/devsecops/resources/supply-chain-security.md +0 -518
- package/.claude/skills/devsecops/resources/vulnerability-management.md +0 -481
- package/.claude/skills/devsecops/resources/zero-trust-architecture.md +0 -177
- package/.claude/skills/documentation-as-code/SKILL.md +0 -323
- package/.claude/skills/documentation-as-code/resources/api-documentation.md +0 -90
- package/.claude/skills/documentation-as-code/resources/changelog-management.md +0 -79
- package/.claude/skills/documentation-as-code/resources/diagram-generation.md +0 -44
- package/.claude/skills/documentation-as-code/resources/docs-as-code-workflow.md +0 -99
- package/.claude/skills/documentation-as-code/resources/documentation-automation.md +0 -68
- package/.claude/skills/documentation-as-code/resources/documentation-sites.md +0 -79
- package/.claude/skills/documentation-as-code/resources/markdown-best-practices.md +0 -162
- package/.claude/skills/documentation-as-code/resources/openapi-specification.md +0 -77
- package/.claude/skills/documentation-as-code/resources/readme-engineering.md +0 -60
- package/.claude/skills/documentation-as-code/resources/technical-writing-guide.md +0 -202
- package/.claude/skills/engineering-management/SKILL.md +0 -356
- package/.claude/skills/engineering-management/resources/career-ladders.md +0 -609
- package/.claude/skills/engineering-management/resources/hiring-and-assessment.md +0 -555
- package/.claude/skills/engineering-management/resources/one-on-one-guides.md +0 -609
- package/.claude/skills/engineering-management/resources/resource-planning.md +0 -557
- package/.claude/skills/engineering-management/resources/team-organization-patterns.md +0 -491
- package/.claude/skills/engineering-management/resources/technical-interviews.md +0 -474
- package/.claude/skills/engineering-operations-management/SKILL.md +0 -817
- package/.claude/skills/error-tracking/SKILL.md +0 -379
- package/.claude/skills/frontend-design/SKILL.md +0 -42
- package/.claude/skills/frontend-dev-guidelines/SKILL.md +0 -403
- package/.claude/skills/frontend-dev-guidelines/resources/common-patterns.md +0 -331
- package/.claude/skills/frontend-dev-guidelines/resources/complete-examples.md +0 -872
- package/.claude/skills/frontend-dev-guidelines/resources/component-patterns.md +0 -502
- package/.claude/skills/frontend-dev-guidelines/resources/data-fetching.md +0 -767
- package/.claude/skills/frontend-dev-guidelines/resources/file-organization.md +0 -502
- package/.claude/skills/frontend-dev-guidelines/resources/loading-and-error-states.md +0 -501
- package/.claude/skills/frontend-dev-guidelines/resources/performance.md +0 -406
- package/.claude/skills/frontend-dev-guidelines/resources/routing-guide.md +0 -364
- package/.claude/skills/frontend-dev-guidelines/resources/styling-guide.md +0 -428
- package/.claude/skills/frontend-dev-guidelines/resources/typescript-standards.md +0 -418
- package/.claude/skills/general-it-engineering/SKILL.md +0 -393
- package/.claude/skills/general-it-engineering/resources/asset-management.md +0 -712
- package/.claude/skills/general-it-engineering/resources/automation-orchestration.md +0 -817
- package/.claude/skills/general-it-engineering/resources/business-continuity.md +0 -786
- package/.claude/skills/general-it-engineering/resources/change-management.md +0 -715
- package/.claude/skills/general-it-engineering/resources/enterprise-monitoring.md +0 -729
- package/.claude/skills/general-it-engineering/resources/help-desk-operations.md +0 -738
- package/.claude/skills/general-it-engineering/resources/incident-service-management.md +0 -834
- package/.claude/skills/general-it-engineering/resources/it-governance.md +0 -753
- package/.claude/skills/general-it-engineering/resources/itil-framework.md +0 -503
- package/.claude/skills/general-it-engineering/resources/service-management.md +0 -669
- package/.claude/skills/infrastructure-architecture/SKILL.md +0 -328
- package/.claude/skills/infrastructure-architecture/resources/architecture-decision-records.md +0 -505
- package/.claude/skills/infrastructure-architecture/resources/architecture-patterns.md +0 -528
- package/.claude/skills/infrastructure-architecture/resources/capacity-planning.md +0 -453
- package/.claude/skills/infrastructure-architecture/resources/cleared-environment-architecture.md +0 -773
- package/.claude/skills/infrastructure-architecture/resources/cost-architecture.md +0 -499
- package/.claude/skills/infrastructure-architecture/resources/data-architecture.md +0 -501
- package/.claude/skills/infrastructure-architecture/resources/disaster-recovery.md +0 -535
- package/.claude/skills/infrastructure-architecture/resources/migration-architecture.md +0 -512
- package/.claude/skills/infrastructure-architecture/resources/multi-region-design.md +0 -608
- package/.claude/skills/infrastructure-architecture/resources/reference-architectures.md +0 -562
- package/.claude/skills/infrastructure-architecture/resources/security-architecture.md +0 -538
- package/.claude/skills/infrastructure-architecture/resources/system-design-principles.md +0 -489
- package/.claude/skills/infrastructure-architecture/resources/workload-classification.md +0 -1000
- package/.claude/skills/infrastructure-strategy/SKILL.md +0 -924
- package/.claude/skills/network-engineering/SKILL.md +0 -385
- package/.claude/skills/network-engineering/resources/dns-management.md +0 -738
- package/.claude/skills/network-engineering/resources/load-balancing.md +0 -820
- package/.claude/skills/network-engineering/resources/network-architecture.md +0 -546
- package/.claude/skills/network-engineering/resources/network-security.md +0 -921
- package/.claude/skills/network-engineering/resources/network-troubleshooting.md +0 -749
- package/.claude/skills/network-engineering/resources/routing-switching.md +0 -373
- package/.claude/skills/network-engineering/resources/sdn-networking.md +0 -695
- package/.claude/skills/network-engineering/resources/service-mesh-networking.md +0 -777
- package/.claude/skills/network-engineering/resources/tcp-ip-protocols.md +0 -444
- package/.claude/skills/network-engineering/resources/vpn-connectivity.md +0 -672
- package/.claude/skills/node-development/SKILL.md +0 -317
- package/.claude/skills/observability-engineering/SKILL.md +0 -101
- package/.claude/skills/observability-engineering/resources/apm-tools.md +0 -97
- package/.claude/skills/observability-engineering/resources/correlation-strategies.md +0 -87
- package/.claude/skills/observability-engineering/resources/distributed-tracing.md +0 -98
- package/.claude/skills/observability-engineering/resources/logs-aggregation.md +0 -118
- package/.claude/skills/observability-engineering/resources/observability-cost-optimization.md +0 -141
- package/.claude/skills/observability-engineering/resources/opentelemetry.md +0 -110
- package/.claude/skills/platform-engineering/SKILL.md +0 -555
- package/.claude/skills/platform-engineering/resources/architecture-overview.md +0 -600
- package/.claude/skills/platform-engineering/resources/container-orchestration.md +0 -916
- package/.claude/skills/platform-engineering/resources/cost-optimization.md +0 -634
- package/.claude/skills/platform-engineering/resources/developer-platforms.md +0 -670
- package/.claude/skills/platform-engineering/resources/gitops-automation.md +0 -650
- package/.claude/skills/platform-engineering/resources/infrastructure-as-code.md +0 -778
- package/.claude/skills/platform-engineering/resources/infrastructure-standards.md +0 -708
- package/.claude/skills/platform-engineering/resources/multi-tenancy.md +0 -602
- package/.claude/skills/platform-engineering/resources/platform-security.md +0 -711
- package/.claude/skills/platform-engineering/resources/resource-management.md +0 -592
- package/.claude/skills/platform-engineering/resources/service-mesh.md +0 -628
- package/.claude/skills/release-engineering/SKILL.md +0 -393
- package/.claude/skills/release-engineering/resources/artifact-management.md +0 -108
- package/.claude/skills/release-engineering/resources/build-optimization.md +0 -84
- package/.claude/skills/release-engineering/resources/ci-cd-pipelines.md +0 -411
- package/.claude/skills/release-engineering/resources/deployment-strategies.md +0 -197
- package/.claude/skills/release-engineering/resources/pipeline-security.md +0 -62
- package/.claude/skills/release-engineering/resources/progressive-delivery.md +0 -83
- package/.claude/skills/release-engineering/resources/release-automation.md +0 -68
- package/.claude/skills/release-engineering/resources/release-orchestration.md +0 -77
- package/.claude/skills/release-engineering/resources/rollback-strategies.md +0 -66
- package/.claude/skills/release-engineering/resources/versioning-strategies.md +0 -59
- package/.claude/skills/route-tester/SKILL.md +0 -392
- package/.claude/skills/skill-developer/ADVANCED.md +0 -197
- package/.claude/skills/skill-developer/HOOK_MECHANISMS.md +0 -306
- package/.claude/skills/skill-developer/PATTERNS_LIBRARY.md +0 -152
- package/.claude/skills/skill-developer/SKILL.md +0 -430
- package/.claude/skills/skill-developer/SKILL_RULES_REFERENCE.md +0 -315
- package/.claude/skills/skill-developer/TRIGGER_TYPES.md +0 -305
- package/.claude/skills/skill-developer/TROUBLESHOOTING.md +0 -514
- package/.claude/skills/skill-rules.json +0 -2989
- package/.claude/skills/sre/SKILL.md +0 -464
- package/.claude/skills/sre/resources/alerting-best-practices.md +0 -282
- package/.claude/skills/sre/resources/capacity-planning.md +0 -226
- package/.claude/skills/sre/resources/chaos-engineering.md +0 -193
- package/.claude/skills/sre/resources/disaster-recovery.md +0 -232
- package/.claude/skills/sre/resources/incident-management.md +0 -436
- package/.claude/skills/sre/resources/observability-stack.md +0 -240
- package/.claude/skills/sre/resources/on-call-runbooks.md +0 -167
- package/.claude/skills/sre/resources/performance-optimization.md +0 -108
- package/.claude/skills/sre/resources/reliability-patterns.md +0 -183
- package/.claude/skills/sre/resources/slo-sli-sla.md +0 -464
- package/.claude/skills/sre/resources/toil-reduction.md +0 -145
- package/.claude/skills/systems-engineering/SKILL.md +0 -648
- package/.claude/skills/systems-engineering/resources/automation-patterns.md +0 -771
- package/.claude/skills/systems-engineering/resources/configuration-management.md +0 -998
- package/.claude/skills/systems-engineering/resources/linux-administration.md +0 -672
- package/.claude/skills/systems-engineering/resources/networking-fundamentals.md +0 -982
- package/.claude/skills/systems-engineering/resources/performance-tuning.md +0 -871
- package/.claude/skills/systems-engineering/resources/powershell-scripting.md +0 -482
- package/.claude/skills/systems-engineering/resources/security-hardening.md +0 -739
- package/.claude/skills/systems-engineering/resources/shell-scripting.md +0 -915
- package/.claude/skills/systems-engineering/resources/storage-management.md +0 -628
- package/.claude/skills/systems-engineering/resources/system-monitoring.md +0 -787
- package/.claude/skills/systems-engineering/resources/troubleshooting-guide.md +0 -753
- package/.claude/skills/systems-engineering/resources/windows-administration.md +0 -738
- package/.claude/skills/technical-leadership/SKILL.md +0 -728
- package/backend/docs/SECRETS_DOCUMENTATION.md +0 -327
- package/backend/package-lock.json +0 -6801
- package/backend/src/core/node-registries/actions.js +0 -202
- package/backend/src/core/node-registries/arrays.js +0 -155
- package/backend/src/core/node-registries/bot.js +0 -23
- package/backend/src/core/node-registries/container.js +0 -162
- package/backend/src/core/node-registries/data.js +0 -290
- package/backend/src/core/node-registries/debug.js +0 -26
- package/backend/src/core/node-registries/events.js +0 -201
- package/backend/src/core/node-registries/flow.js +0 -139
- package/backend/src/core/node-registries/furnace.js +0 -143
- package/backend/src/core/node-registries/logic.js +0 -62
- package/backend/src/core/node-registries/math.js +0 -42
- package/backend/src/core/node-registries/navigation.js +0 -111
- package/backend/src/core/node-registries/objects.js +0 -98
- package/backend/src/core/node-registries/strings.js +0 -187
- package/backend/src/core/node-registries/time.js +0 -113
- package/backend/src/core/node-registries/type.js +0 -25
- package/backend/src/core/node-registries/users.js +0 -79
- package/frontend/dist/assets/index-BC-NbKXi.css +0 -32
- package/frontend/dist/assets/index-DqJXZMHY.js +0 -11266
|
@@ -6,12 +6,14 @@ const { Vec3 } = require('vec3');
|
|
|
6
6
|
const { PrismaClient } = require('@prisma/client');
|
|
7
7
|
const { loadCommands } = require('./system/CommandRegistry');
|
|
8
8
|
const { getRuntimeCommandRegistry } = require('./system/RuntimeCommandRegistry');
|
|
9
|
-
const { initializePlugins } = require('./PluginLoader');
|
|
9
|
+
const { initializePlugins, ensurePluginDependencies } = require('./PluginLoader');
|
|
10
10
|
const MessageQueue = require('./MessageQueue');
|
|
11
11
|
const Command = require('./system/Command');
|
|
12
12
|
const { parseArguments } = require('./system/parseArguments');
|
|
13
13
|
const GraphExecutionEngine = require('./GraphExecutionEngine');
|
|
14
14
|
const NodeRegistry = require('./NodeRegistry');
|
|
15
|
+
const { createBotApi } = require('./ipc/botApiFactory');
|
|
16
|
+
const { MessageTypes, EventTypes } = require('./ipc/ipcMessageTypes');
|
|
15
17
|
|
|
16
18
|
const UserService = require('./UserService');
|
|
17
19
|
const PermissionManager = require('./ipc/PermissionManager.stub.js');
|
|
@@ -40,7 +42,7 @@ JSON.parse = function (text, reviver) {
|
|
|
40
42
|
|
|
41
43
|
function sendLog(content) {
|
|
42
44
|
if (process.send) {
|
|
43
|
-
process.send({ type:
|
|
45
|
+
process.send({ type: MessageTypes.BOT.LOG, content });
|
|
44
46
|
} else {
|
|
45
47
|
console.log(`[ChildProcess Log] ${content}`);
|
|
46
48
|
}
|
|
@@ -49,7 +51,6 @@ function sendLog(content) {
|
|
|
49
51
|
|
|
50
52
|
function sendEvent(eventName, eventArgs) {
|
|
51
53
|
if (process.send) {
|
|
52
|
-
// Добавляем информацию о боте (позицию) во все события
|
|
53
54
|
const enrichedArgs = {
|
|
54
55
|
...eventArgs,
|
|
55
56
|
botEntity: bot && bot.entity ? {
|
|
@@ -58,7 +59,7 @@ function sendEvent(eventName, eventArgs) {
|
|
|
58
59
|
pitch: bot.entity.pitch
|
|
59
60
|
} : null
|
|
60
61
|
};
|
|
61
|
-
process.send({ type:
|
|
62
|
+
process.send({ type: MessageTypes.BOT.EVENT, eventType: eventName, args: enrichedArgs });
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
65
|
|
|
@@ -145,7 +146,7 @@ function handleIncomingCommand(type, username, message) {
|
|
|
145
146
|
|
|
146
147
|
if (process.send) {
|
|
147
148
|
process.send({
|
|
148
|
-
type:
|
|
149
|
+
type: MessageTypes.COMMAND.VALIDATE_AND_RUN,
|
|
149
150
|
commandName: commandInstance.name,
|
|
150
151
|
username,
|
|
151
152
|
args: processedArgs,
|
|
@@ -159,17 +160,17 @@ function handleIncomingCommand(type, username, message) {
|
|
|
159
160
|
}
|
|
160
161
|
|
|
161
162
|
process.on('message', async (message) => {
|
|
162
|
-
if (message.type ===
|
|
163
|
+
if (message.type === MessageTypes.PLUGIN.UI_START_UPDATES) {
|
|
163
164
|
const { pluginName } = message;
|
|
164
165
|
const state = pluginUiState.get(pluginName);
|
|
165
166
|
if (state && process.send) {
|
|
166
167
|
process.send({
|
|
167
|
-
type:
|
|
168
|
+
type: MessageTypes.PLUGIN.UI_DATA,
|
|
168
169
|
plugin: pluginName,
|
|
169
170
|
payload: state
|
|
170
171
|
});
|
|
171
172
|
}
|
|
172
|
-
} else if (message.type ===
|
|
173
|
+
} else if (message.type === MessageTypes.USER.ACTION_RESPONSE) {
|
|
173
174
|
if (pendingRequests.has(message.requestId)) {
|
|
174
175
|
const { resolve, reject } = pendingRequests.get(message.requestId);
|
|
175
176
|
if (message.error) {
|
|
@@ -179,16 +180,26 @@ process.on('message', async (message) => {
|
|
|
179
180
|
}
|
|
180
181
|
pendingRequests.delete(message.requestId);
|
|
181
182
|
}
|
|
182
|
-
} else if (message.type ===
|
|
183
|
+
} else if (message.type === MessageTypes.USER.CREDENTIALS_OPERATION_RESPONSE) {
|
|
184
|
+
if (pendingRequests.has(message.requestId)) {
|
|
185
|
+
const { resolve, reject } = pendingRequests.get(message.requestId);
|
|
186
|
+
if (message.error) {
|
|
187
|
+
reject(new Error(message.error));
|
|
188
|
+
} else {
|
|
189
|
+
resolve(message.payload);
|
|
190
|
+
}
|
|
191
|
+
pendingRequests.delete(message.requestId);
|
|
192
|
+
}
|
|
193
|
+
} else if (message.type === MessageTypes.SYSTEM.GET_PLAYER_LIST) {
|
|
183
194
|
const playerList = bot ? Object.keys(bot.players) : [];
|
|
184
195
|
if (process.send) {
|
|
185
196
|
process.send({
|
|
186
|
-
type:
|
|
197
|
+
type: MessageTypes.SYSTEM.GET_PLAYER_LIST_RESPONSE,
|
|
187
198
|
requestId: message.requestId,
|
|
188
199
|
payload: { players: playerList }
|
|
189
200
|
});
|
|
190
201
|
}
|
|
191
|
-
} else if (message.type ===
|
|
202
|
+
} else if (message.type === MessageTypes.SYSTEM.GET_NEARBY_ENTITIES) {
|
|
192
203
|
const entities = [];
|
|
193
204
|
if (bot && bot.entities) {
|
|
194
205
|
const centerPos = message.payload?.position || bot.entity?.position;
|
|
@@ -215,12 +226,12 @@ process.on('message', async (message) => {
|
|
|
215
226
|
|
|
216
227
|
if (process.send) {
|
|
217
228
|
process.send({
|
|
218
|
-
type:
|
|
229
|
+
type: MessageTypes.SYSTEM.GET_NEARBY_ENTITIES_RESPONSE,
|
|
219
230
|
requestId: message.requestId,
|
|
220
231
|
payload: { entities }
|
|
221
232
|
});
|
|
222
233
|
}
|
|
223
|
-
} else if (message.type ===
|
|
234
|
+
} else if (message.type === MessageTypes.VIEWER.GET_STATE) {
|
|
224
235
|
if (bot && process.send) {
|
|
225
236
|
let blocks = undefined;
|
|
226
237
|
|
|
@@ -287,12 +298,12 @@ process.on('message', async (message) => {
|
|
|
287
298
|
};
|
|
288
299
|
|
|
289
300
|
process.send({
|
|
290
|
-
type:
|
|
301
|
+
type: MessageTypes.VIEWER.STATE_RESPONSE,
|
|
291
302
|
requestId: message.requestId,
|
|
292
303
|
payload: state
|
|
293
304
|
});
|
|
294
305
|
}
|
|
295
|
-
} else if (message.type ===
|
|
306
|
+
} else if (message.type === MessageTypes.VIEWER.CONTROL) {
|
|
296
307
|
const { command } = message;
|
|
297
308
|
if (!bot) return;
|
|
298
309
|
|
|
@@ -357,58 +368,12 @@ process.on('message', async (message) => {
|
|
|
357
368
|
} catch (error) {
|
|
358
369
|
sendLog(`[Viewer] Control error: ${error.message}`);
|
|
359
370
|
}
|
|
360
|
-
} else if (message.type ===
|
|
361
|
-
// Выполнение event графа в child process
|
|
371
|
+
} else if (message.type === MessageTypes.GRAPH.EXECUTE_EVENT_GRAPH) {
|
|
362
372
|
const { botId, graph, eventType, eventArgs } = message;
|
|
363
373
|
|
|
364
374
|
try {
|
|
365
|
-
|
|
366
375
|
const playerList = bot ? Object.keys(bot.players) : [];
|
|
367
|
-
const botApi = {
|
|
368
|
-
sendMessage: (chatType, message, recipient) => {
|
|
369
|
-
if (!bot || !bot.messageQueue) {
|
|
370
|
-
sendLog('[EventGraph] Bot not ready');
|
|
371
|
-
return;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
bot.messageQueue.enqueue(chatType, message, recipient);
|
|
375
|
-
},
|
|
376
|
-
executeCommand: (command) => {
|
|
377
|
-
if (!bot || !bot.messageQueue) {
|
|
378
|
-
sendLog('[EventGraph] Bot not ready');
|
|
379
|
-
return;
|
|
380
|
-
}
|
|
381
|
-
bot.messageQueue.enqueue('command', command);
|
|
382
|
-
},
|
|
383
|
-
lookAt: async (x, y, z) => {
|
|
384
|
-
if (!bot) return;
|
|
385
|
-
const target = new Vec3(x, y, z);
|
|
386
|
-
await bot.lookAt(target);
|
|
387
|
-
},
|
|
388
|
-
navigate: async (x, y, z) => {
|
|
389
|
-
if (!bot || !bot.pathfinder) return;
|
|
390
|
-
const goal = new (require('mineflayer-pathfinder').goals.GoalBlock)(x, y, z);
|
|
391
|
-
await bot.pathfinder.goto(goal);
|
|
392
|
-
},
|
|
393
|
-
attack: (entityId) => {
|
|
394
|
-
if (!bot) return;
|
|
395
|
-
const entity = bot.entities[entityId];
|
|
396
|
-
if (entity) bot.attack(entity);
|
|
397
|
-
},
|
|
398
|
-
follow: (username) => {
|
|
399
|
-
if (!bot || !bot.pathfinder) return;
|
|
400
|
-
const player = bot.players[username];
|
|
401
|
-
if (player && player.entity) {
|
|
402
|
-
const goal = new (require('mineflayer-pathfinder').goals.GoalFollow)(player.entity, 3);
|
|
403
|
-
bot.pathfinder.setGoal(goal, true);
|
|
404
|
-
}
|
|
405
|
-
},
|
|
406
|
-
stopFollow: () => {
|
|
407
|
-
if (bot && bot.pathfinder) {
|
|
408
|
-
bot.pathfinder.setGoal(null);
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
};
|
|
376
|
+
const botApi = createBotApi(bot, { enableLogging: true });
|
|
412
377
|
|
|
413
378
|
const context = {
|
|
414
379
|
bot: bot, // Полный mineflayer bot
|
|
@@ -436,7 +401,7 @@ process.on('message', async (message) => {
|
|
|
436
401
|
sendLog(`[EventGraph] Error executing ${eventType} graph: ${error.message}`);
|
|
437
402
|
sendLog(`[EventGraph] Stack: ${error.stack}`);
|
|
438
403
|
}
|
|
439
|
-
} else if (message.type ===
|
|
404
|
+
} else if (message.type === MessageTypes.BOT.START) {
|
|
440
405
|
const config = message.config;
|
|
441
406
|
sendLog(`[System] Получена команда на запуск бота ${config.username}...`);
|
|
442
407
|
try {
|
|
@@ -503,6 +468,9 @@ process.on('message', async (message) => {
|
|
|
503
468
|
bot.sendLog = sendLog;
|
|
504
469
|
bot.messageQueue = new MessageQueue(bot);
|
|
505
470
|
|
|
471
|
+
// Plugin Registry для экспорта API между плагинами
|
|
472
|
+
bot.pluginRegistry = new Map();
|
|
473
|
+
|
|
506
474
|
const installedPluginNames = config.plugins.map(p => p.name);
|
|
507
475
|
bot.api = {
|
|
508
476
|
Command: Command,
|
|
@@ -511,7 +479,7 @@ process.on('message', async (message) => {
|
|
|
511
479
|
if (type === 'websocket') {
|
|
512
480
|
if (process.send) {
|
|
513
481
|
process.send({
|
|
514
|
-
type:
|
|
482
|
+
type: MessageTypes.WEBSOCKET.SEND_MESSAGE,
|
|
515
483
|
payload: {
|
|
516
484
|
botId: bot.config.id,
|
|
517
485
|
message: message,
|
|
@@ -620,7 +588,7 @@ process.on('message', async (message) => {
|
|
|
620
588
|
|
|
621
589
|
if (process.send) {
|
|
622
590
|
process.send({
|
|
623
|
-
type:
|
|
591
|
+
type: MessageTypes.COMMAND.REGISTER,
|
|
624
592
|
commandConfig: {
|
|
625
593
|
name: command.name,
|
|
626
594
|
description: command.description,
|
|
@@ -651,7 +619,7 @@ process.on('message', async (message) => {
|
|
|
651
619
|
|
|
652
620
|
if (process.send) {
|
|
653
621
|
process.send({
|
|
654
|
-
type:
|
|
622
|
+
type: MessageTypes.USER.REQUEST_ACTION,
|
|
655
623
|
requestId,
|
|
656
624
|
payload: {
|
|
657
625
|
targetUsername: username,
|
|
@@ -778,15 +746,97 @@ process.on('message', async (message) => {
|
|
|
778
746
|
|
|
779
747
|
if (process.send) {
|
|
780
748
|
process.send({
|
|
781
|
-
type:
|
|
749
|
+
type: MessageTypes.PLUGIN.UI_DATA,
|
|
782
750
|
plugin: pluginName,
|
|
783
751
|
payload: newState
|
|
784
752
|
});
|
|
785
753
|
}
|
|
754
|
+
},
|
|
755
|
+
|
|
756
|
+
// === Методы для управления credentials ===
|
|
757
|
+
updateCredentials: async ({ username, password }) => {
|
|
758
|
+
return new Promise((resolve, reject) => {
|
|
759
|
+
const requestId = uuidv4();
|
|
760
|
+
pendingRequests.set(requestId, { resolve, reject });
|
|
761
|
+
|
|
762
|
+
if (process.send) {
|
|
763
|
+
process.send({
|
|
764
|
+
type: MessageTypes.BOT.UPDATE_CREDENTIALS,
|
|
765
|
+
requestId,
|
|
766
|
+
payload: {
|
|
767
|
+
botId: bot.config.id,
|
|
768
|
+
username,
|
|
769
|
+
password
|
|
770
|
+
}
|
|
771
|
+
});
|
|
772
|
+
} else {
|
|
773
|
+
reject(new Error('IPC channel is not available.'));
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
setTimeout(() => {
|
|
777
|
+
if (pendingRequests.has(requestId)) {
|
|
778
|
+
reject(new Error('Request to update credentials timed out.'));
|
|
779
|
+
pendingRequests.delete(requestId);
|
|
780
|
+
}
|
|
781
|
+
}, 10000);
|
|
782
|
+
});
|
|
783
|
+
},
|
|
784
|
+
|
|
785
|
+
restart: async () => {
|
|
786
|
+
return new Promise((resolve, reject) => {
|
|
787
|
+
const requestId = uuidv4();
|
|
788
|
+
pendingRequests.set(requestId, { resolve, reject });
|
|
789
|
+
|
|
790
|
+
if (process.send) {
|
|
791
|
+
process.send({
|
|
792
|
+
type: MessageTypes.BOT.RESTART,
|
|
793
|
+
requestId,
|
|
794
|
+
payload: {
|
|
795
|
+
botId: bot.config.id
|
|
796
|
+
}
|
|
797
|
+
});
|
|
798
|
+
} else {
|
|
799
|
+
reject(new Error('IPC channel is not available.'));
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
setTimeout(() => {
|
|
803
|
+
if (pendingRequests.has(requestId)) {
|
|
804
|
+
reject(new Error('Request to restart bot timed out.'));
|
|
805
|
+
pendingRequests.delete(requestId);
|
|
806
|
+
}
|
|
807
|
+
}, 10000);
|
|
808
|
+
});
|
|
809
|
+
},
|
|
810
|
+
|
|
811
|
+
changeCredentials: async ({ username, password }) => {
|
|
812
|
+
return new Promise((resolve, reject) => {
|
|
813
|
+
const requestId = uuidv4();
|
|
814
|
+
pendingRequests.set(requestId, { resolve, reject });
|
|
815
|
+
|
|
816
|
+
if (process.send) {
|
|
817
|
+
process.send({
|
|
818
|
+
type: MessageTypes.BOT.CHANGE_CREDENTIALS,
|
|
819
|
+
requestId,
|
|
820
|
+
payload: {
|
|
821
|
+
botId: bot.config.id,
|
|
822
|
+
username,
|
|
823
|
+
password
|
|
824
|
+
}
|
|
825
|
+
});
|
|
826
|
+
} else {
|
|
827
|
+
reject(new Error('IPC channel is not available.'));
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
setTimeout(() => {
|
|
831
|
+
if (pendingRequests.has(requestId)) {
|
|
832
|
+
reject(new Error('Request to change credentials timed out.'));
|
|
833
|
+
pendingRequests.delete(requestId);
|
|
834
|
+
}
|
|
835
|
+
}, 10000);
|
|
836
|
+
});
|
|
786
837
|
}
|
|
787
838
|
};
|
|
788
839
|
|
|
789
|
-
// Упрощенный alias для отправки сообщений (используется в командах и нодах)
|
|
790
840
|
bot.sendMessage = (type, message, username) => {
|
|
791
841
|
bot.api.sendMessage(type, message, username);
|
|
792
842
|
};
|
|
@@ -797,7 +847,7 @@ process.on('message', async (message) => {
|
|
|
797
847
|
const processApi = {
|
|
798
848
|
appendLog: (botId, message) => {
|
|
799
849
|
if (process.send) {
|
|
800
|
-
process.send({ type:
|
|
850
|
+
process.send({ type: MessageTypes.BOT.LOG, content: message });
|
|
801
851
|
}
|
|
802
852
|
}
|
|
803
853
|
};
|
|
@@ -895,7 +945,7 @@ process.on('message', async (message) => {
|
|
|
895
945
|
if (process.send) {
|
|
896
946
|
for (const cmd of bot.commands.values()) {
|
|
897
947
|
process.send({
|
|
898
|
-
type:
|
|
948
|
+
type: MessageTypes.COMMAND.REGISTER,
|
|
899
949
|
commandConfig: {
|
|
900
950
|
name: cmd.name,
|
|
901
951
|
description: cmd.description,
|
|
@@ -909,6 +959,7 @@ process.on('message', async (message) => {
|
|
|
909
959
|
}
|
|
910
960
|
}
|
|
911
961
|
|
|
962
|
+
await ensurePluginDependencies(config.plugins, sendLog);
|
|
912
963
|
await initializePlugins(bot, config.plugins, prisma);
|
|
913
964
|
sendLog('[System] Все системы инициализированы.');
|
|
914
965
|
|
|
@@ -932,7 +983,7 @@ process.on('message', async (message) => {
|
|
|
932
983
|
|
|
933
984
|
if (process.send && rawMessageText.trim()) {
|
|
934
985
|
process.send({
|
|
935
|
-
type:
|
|
986
|
+
type: MessageTypes.VIEWER.CHAT,
|
|
936
987
|
payload: {
|
|
937
988
|
rawText: rawMessageText,
|
|
938
989
|
timestamp: Date.now()
|
|
@@ -954,12 +1005,22 @@ process.on('message', async (message) => {
|
|
|
954
1005
|
|
|
955
1006
|
bot.on('chat', (username, message) => {
|
|
956
1007
|
if (messageHandledByCustomParser) return;
|
|
957
|
-
|
|
1008
|
+
bot.events.emit('chat:message', {
|
|
1009
|
+
username,
|
|
1010
|
+
message,
|
|
1011
|
+
type: EventTypes.CHAT,
|
|
1012
|
+
raw: message
|
|
1013
|
+
});
|
|
958
1014
|
});
|
|
959
1015
|
|
|
960
1016
|
bot.on('whisper', (username, message) => {
|
|
961
1017
|
if (messageHandledByCustomParser) return;
|
|
962
|
-
|
|
1018
|
+
bot.events.emit('chat:message', {
|
|
1019
|
+
username,
|
|
1020
|
+
message,
|
|
1021
|
+
type: EventTypes.WHISPER,
|
|
1022
|
+
raw: message
|
|
1023
|
+
});
|
|
963
1024
|
});
|
|
964
1025
|
|
|
965
1026
|
bot.on('userAction', async ({ action, target, ...data }) => {
|
|
@@ -990,8 +1051,8 @@ process.on('message', async (message) => {
|
|
|
990
1051
|
}
|
|
991
1052
|
sendLog('[Event: login] Успешно залогинился!');
|
|
992
1053
|
if (process.send && !botReadySent) {
|
|
993
|
-
process.send({ type:
|
|
994
|
-
process.send({ type:
|
|
1054
|
+
process.send({ type: MessageTypes.BOT.READY });
|
|
1055
|
+
process.send({ type: MessageTypes.BOT.STATUS, status: 'running' });
|
|
995
1056
|
botReadySent = true;
|
|
996
1057
|
}
|
|
997
1058
|
});
|
|
@@ -1010,7 +1071,13 @@ process.on('message', async (message) => {
|
|
|
1010
1071
|
|
|
1011
1072
|
bot.on('kicked', (reason) => {
|
|
1012
1073
|
let reasonText;
|
|
1013
|
-
|
|
1074
|
+
if (typeof reason === 'string') {
|
|
1075
|
+
try { reasonText = JSON.parse(reason).text || reason; } catch (e) { reasonText = reason; }
|
|
1076
|
+
} else if (reason && typeof reason === 'object') {
|
|
1077
|
+
reasonText = reason.text || reason.message || reason.reason || JSON.stringify(reason);
|
|
1078
|
+
} else {
|
|
1079
|
+
reasonText = String(reason);
|
|
1080
|
+
}
|
|
1014
1081
|
sendLog(`[Event: kicked] Меня кикнули. Причина: ${reasonText}.`);
|
|
1015
1082
|
process.exit(0);
|
|
1016
1083
|
});
|
|
@@ -1084,7 +1151,7 @@ process.on('message', async (message) => {
|
|
|
1084
1151
|
// Отправка события для viewer
|
|
1085
1152
|
if (process.send) {
|
|
1086
1153
|
process.send({
|
|
1087
|
-
type:
|
|
1154
|
+
type: MessageTypes.VIEWER.SPAWN,
|
|
1088
1155
|
payload: {
|
|
1089
1156
|
position: bot.entity?.position,
|
|
1090
1157
|
yaw: bot.entity?.yaw,
|
|
@@ -1097,7 +1164,7 @@ process.on('message', async (message) => {
|
|
|
1097
1164
|
bot.on('health', () => {
|
|
1098
1165
|
if (process.send) {
|
|
1099
1166
|
process.send({
|
|
1100
|
-
type:
|
|
1167
|
+
type: MessageTypes.VIEWER.HEALTH,
|
|
1101
1168
|
payload: {
|
|
1102
1169
|
health: bot.health,
|
|
1103
1170
|
food: bot.food
|
|
@@ -1109,7 +1176,7 @@ process.on('message', async (message) => {
|
|
|
1109
1176
|
bot.on('move', () => {
|
|
1110
1177
|
if (process.send) {
|
|
1111
1178
|
process.send({
|
|
1112
|
-
type:
|
|
1179
|
+
type: MessageTypes.VIEWER.MOVE,
|
|
1113
1180
|
payload: {
|
|
1114
1181
|
position: bot.entity?.position,
|
|
1115
1182
|
yaw: bot.entity?.yaw,
|
|
@@ -1145,7 +1212,7 @@ process.on('message', async (message) => {
|
|
|
1145
1212
|
sendLog(`[CRITICAL] Критическая ошибка при создании бота: ${err.stack}`);
|
|
1146
1213
|
process.exit(1);
|
|
1147
1214
|
}
|
|
1148
|
-
} else if (message.type ===
|
|
1215
|
+
} else if (message.type === MessageTypes.CONFIG.RELOAD) {
|
|
1149
1216
|
sendLog('[System] Received config:reload command. Reloading configuration...');
|
|
1150
1217
|
try {
|
|
1151
1218
|
const newConfig = await fetchNewConfig(bot.config.id, prisma);
|
|
@@ -1162,7 +1229,7 @@ process.on('message', async (message) => {
|
|
|
1162
1229
|
} catch (error) {
|
|
1163
1230
|
sendLog(`[System] Error reloading configuration: ${error.message}`);
|
|
1164
1231
|
}
|
|
1165
|
-
} else if (message.type ===
|
|
1232
|
+
} else if (message.type === MessageTypes.BOT.STOP) {
|
|
1166
1233
|
if (connectionTimeout) {
|
|
1167
1234
|
clearTimeout(connectionTimeout);
|
|
1168
1235
|
connectionTimeout = null;
|
|
@@ -1170,12 +1237,12 @@ process.on('message', async (message) => {
|
|
|
1170
1237
|
botReadySent = false;
|
|
1171
1238
|
if (bot) bot.quit();
|
|
1172
1239
|
else process.exit(0);
|
|
1173
|
-
} else if (message.type ===
|
|
1240
|
+
} else if (message.type === MessageTypes.CHAT.CHAT) {
|
|
1174
1241
|
if (bot && bot.entity) {
|
|
1175
1242
|
const { message: msg, chatType, username } = message.payload;
|
|
1176
1243
|
bot.messageQueue.enqueue(chatType, msg, username);
|
|
1177
1244
|
}
|
|
1178
|
-
} else if (message.type ===
|
|
1245
|
+
} else if (message.type === MessageTypes.COMMAND.REGISTER_TEMP) {
|
|
1179
1246
|
// Регистрация временной команды из главного процесса
|
|
1180
1247
|
const { commandData } = message;
|
|
1181
1248
|
|
|
@@ -1207,7 +1274,7 @@ process.on('message', async (message) => {
|
|
|
1207
1274
|
} catch (error) {
|
|
1208
1275
|
sendLog(`[BotProcess] Ошибка регистрации временной команды: ${error.message}`);
|
|
1209
1276
|
}
|
|
1210
|
-
} else if (message.type ===
|
|
1277
|
+
} else if (message.type === MessageTypes.COMMAND.UNREGISTER_TEMP) {
|
|
1211
1278
|
const { commandName, aliases } = message;
|
|
1212
1279
|
|
|
1213
1280
|
try {
|
|
@@ -1225,7 +1292,7 @@ process.on('message', async (message) => {
|
|
|
1225
1292
|
} catch (error) {
|
|
1226
1293
|
sendLog(`[BotProcess] Ошибка удаления временной команды: ${error.message}`);
|
|
1227
1294
|
}
|
|
1228
|
-
} else if (message.type ===
|
|
1295
|
+
} else if (message.type === MessageTypes.GRAPH.EXECUTE_HANDLER) {
|
|
1229
1296
|
const { commandName, username, args, typeChat } = message;
|
|
1230
1297
|
const commandInstance = bot.commands.get(commandName);
|
|
1231
1298
|
if (commandInstance) {
|
|
@@ -1248,7 +1315,7 @@ process.on('message', async (message) => {
|
|
|
1248
1315
|
}
|
|
1249
1316
|
})();
|
|
1250
1317
|
}
|
|
1251
|
-
} else if (message.type ===
|
|
1318
|
+
} else if (message.type === MessageTypes.GRAPH.EXECUTE_COMMAND_REQUEST) {
|
|
1252
1319
|
const { requestId, payload } = message;
|
|
1253
1320
|
const { commandName, args, username, typeChat } = payload;
|
|
1254
1321
|
|
|
@@ -1272,7 +1339,7 @@ process.on('message', async (message) => {
|
|
|
1272
1339
|
if (typeChat === 'websocket') {
|
|
1273
1340
|
result = await commandInstance.handler(context);
|
|
1274
1341
|
if (process.send) {
|
|
1275
|
-
process.send({ type:
|
|
1342
|
+
process.send({ type: MessageTypes.GRAPH.EXECUTE_COMMAND_RESPONSE, requestId, result });
|
|
1276
1343
|
}
|
|
1277
1344
|
} else {
|
|
1278
1345
|
commandInstance.handler(context).catch(e => {
|
|
@@ -1301,7 +1368,7 @@ process.on('message', async (message) => {
|
|
|
1301
1368
|
result = sendMessageCalled ? resultFromSendMessage : returnValue;
|
|
1302
1369
|
|
|
1303
1370
|
if (process.send) {
|
|
1304
|
-
process.send({ type:
|
|
1371
|
+
process.send({ type: MessageTypes.GRAPH.EXECUTE_COMMAND_RESPONSE, requestId, result });
|
|
1305
1372
|
}
|
|
1306
1373
|
} finally {
|
|
1307
1374
|
bot.sendMessage = originalSendMessage;
|
|
@@ -1316,15 +1383,15 @@ process.on('message', async (message) => {
|
|
|
1316
1383
|
|
|
1317
1384
|
} catch (error) {
|
|
1318
1385
|
if (process.send) {
|
|
1319
|
-
process.send({ type:
|
|
1386
|
+
process.send({ type: MessageTypes.GRAPH.EXECUTE_COMMAND_RESPONSE, requestId, error: error.message });
|
|
1320
1387
|
}
|
|
1321
1388
|
}
|
|
1322
1389
|
})();
|
|
1323
|
-
} else if (message.type ===
|
|
1390
|
+
} else if (message.type === MessageTypes.USER.INVALIDATE_USER_CACHE) {
|
|
1324
1391
|
if (message.username && bot && bot.config) {
|
|
1325
1392
|
UserService.clearCache(message.username, bot.config.id);
|
|
1326
1393
|
}
|
|
1327
|
-
} else if (message.type ===
|
|
1394
|
+
} else if (message.type === MessageTypes.USER.INVALIDATE_ALL_USER_CACHE) {
|
|
1328
1395
|
if (bot && bot.config) {
|
|
1329
1396
|
for (const [cacheKey, user] of UserService.cache.entries()) {
|
|
1330
1397
|
if (cacheKey.startsWith(`${bot.config.id}:`)) {
|
|
@@ -1333,7 +1400,7 @@ process.on('message', async (message) => {
|
|
|
1333
1400
|
}
|
|
1334
1401
|
sendLog(`[BotProcess] Кэш пользователей очищен для бота ${bot.config.id}`);
|
|
1335
1402
|
}
|
|
1336
|
-
} else if (message.type ===
|
|
1403
|
+
} else if (message.type === MessageTypes.COMMAND.HANDLE_PERMISSION_ERROR) {
|
|
1337
1404
|
const { commandName, username, typeChat } = message;
|
|
1338
1405
|
const commandInstance = bot.commands.get(commandName);
|
|
1339
1406
|
if (commandInstance) {
|
|
@@ -1343,7 +1410,7 @@ process.on('message', async (message) => {
|
|
|
1343
1410
|
bot.api.sendMessage(typeChat, `У вас нет прав для выполнения команды ${commandName}.`, username);
|
|
1344
1411
|
}
|
|
1345
1412
|
}
|
|
1346
|
-
} else if (message.type ===
|
|
1413
|
+
} else if (message.type === MessageTypes.COMMAND.HANDLE_WRONG_CHAT) {
|
|
1347
1414
|
const { commandName, username, typeChat } = message;
|
|
1348
1415
|
const commandInstance = bot.commands.get(commandName);
|
|
1349
1416
|
if (commandInstance) {
|
|
@@ -1353,7 +1420,7 @@ process.on('message', async (message) => {
|
|
|
1353
1420
|
bot.api.sendMessage('private', `Команду ${commandName} нельзя использовать в этом типе чата - ${typeChat}.`, username);
|
|
1354
1421
|
}
|
|
1355
1422
|
}
|
|
1356
|
-
} else if (message.type ===
|
|
1423
|
+
} else if (message.type === MessageTypes.COMMAND.HANDLE_COOLDOWN) {
|
|
1357
1424
|
const { commandName, username, typeChat, timeLeft } = message;
|
|
1358
1425
|
const commandInstance = bot.commands.get(commandName);
|
|
1359
1426
|
if (commandInstance) {
|
|
@@ -1363,7 +1430,7 @@ process.on('message', async (message) => {
|
|
|
1363
1430
|
bot.api.sendMessage(typeChat, `Команду ${commandName} можно будет использовать через ${timeLeft} сек.`, username);
|
|
1364
1431
|
}
|
|
1365
1432
|
}
|
|
1366
|
-
} else if (message.type ===
|
|
1433
|
+
} else if (message.type === MessageTypes.COMMAND.HANDLE_BLACKLIST) {
|
|
1367
1434
|
const { commandName, username, typeChat } = message;
|
|
1368
1435
|
const commandInstance = bot.commands.get(commandName);
|
|
1369
1436
|
if (commandInstance) {
|
|
@@ -1371,12 +1438,12 @@ process.on('message', async (message) => {
|
|
|
1371
1438
|
commandInstance.onBlacklisted(bot, typeChat, { username });
|
|
1372
1439
|
}
|
|
1373
1440
|
}
|
|
1374
|
-
} else if (message.type ===
|
|
1441
|
+
} else if (message.type === MessageTypes.CHAT.SEND_MESSAGE) {
|
|
1375
1442
|
const { typeChat, message: msg, username } = message;
|
|
1376
1443
|
if (bot && bot.api) {
|
|
1377
1444
|
bot.api.sendMessage(typeChat, msg, username);
|
|
1378
1445
|
}
|
|
1379
|
-
} else if (message.type ===
|
|
1446
|
+
} else if (message.type === MessageTypes.CHAT.ACTION) {
|
|
1380
1447
|
if (message.name === 'lookAt' && bot && message.payload.position) {
|
|
1381
1448
|
const { x, y, z } = message.payload.position;
|
|
1382
1449
|
if (typeof x === 'number' && typeof y === 'number' && typeof z === 'number') {
|
|
@@ -1385,7 +1452,7 @@ process.on('message', async (message) => {
|
|
|
1385
1452
|
sendLog(`[BotProcess] Ошибка lookAt: получены невалидные координаты: ${JSON.stringify(message.payload.position)}`);
|
|
1386
1453
|
}
|
|
1387
1454
|
}
|
|
1388
|
-
} else if (message.type ===
|
|
1455
|
+
} else if (message.type === MessageTypes.PLUGINS.RELOAD) {
|
|
1389
1456
|
sendLog('[System] Получена команда на перезагрузку плагинов...');
|
|
1390
1457
|
const newConfig = await fetchNewConfig(bot.config.id, prisma);
|
|
1391
1458
|
if (newConfig) {
|
|
@@ -1399,12 +1466,11 @@ process.on('message', async (message) => {
|
|
|
1399
1466
|
} else {
|
|
1400
1467
|
sendLog('[System] Не удалось получить новую конфигурацию для перезагрузки плагинов.');
|
|
1401
1468
|
}
|
|
1402
|
-
} else if (message.type ===
|
|
1469
|
+
} else if (message.type === MessageTypes.SERVER.COMMAND) {
|
|
1403
1470
|
if (bot && bot.messageQueue && message.payload && message.payload.command) {
|
|
1404
1471
|
bot.messageQueue.enqueue('command', message.payload.command);
|
|
1405
1472
|
}
|
|
1406
|
-
} else if (message.type ===
|
|
1407
|
-
// Выполнение event графа в child process
|
|
1473
|
+
} else if (message.type === MessageTypes.GRAPH.EXECUTE_EVENT_GRAPH) {
|
|
1408
1474
|
const { graph, eventType, eventArgs } = message;
|
|
1409
1475
|
|
|
1410
1476
|
try {
|
|
@@ -1419,44 +1485,7 @@ process.on('message', async (message) => {
|
|
|
1419
1485
|
return;
|
|
1420
1486
|
}
|
|
1421
1487
|
|
|
1422
|
-
const botApi =
|
|
1423
|
-
sendMessage: (chatType, messageText, recipient) => {
|
|
1424
|
-
if (!bot || !bot.messageQueue) return;
|
|
1425
|
-
bot.messageQueue.enqueue(chatType, messageText, recipient);
|
|
1426
|
-
},
|
|
1427
|
-
executeCommand: (command) => {
|
|
1428
|
-
if (!bot || !bot.messageQueue) return;
|
|
1429
|
-
bot.messageQueue.enqueue('command', command);
|
|
1430
|
-
},
|
|
1431
|
-
lookAt: async (x, y, z) => {
|
|
1432
|
-
if (!bot) return;
|
|
1433
|
-
const target = new Vec3(x, y, z);
|
|
1434
|
-
await bot.lookAt(target);
|
|
1435
|
-
},
|
|
1436
|
-
navigate: async (x, y, z) => {
|
|
1437
|
-
if (!bot || !bot.pathfinder) return;
|
|
1438
|
-
const goal = new (require('mineflayer-pathfinder').goals.GoalBlock)(x, y, z);
|
|
1439
|
-
await bot.pathfinder.goto(goal);
|
|
1440
|
-
},
|
|
1441
|
-
attack: (entityId) => {
|
|
1442
|
-
if (!bot) return;
|
|
1443
|
-
const entity = bot.entities[entityId];
|
|
1444
|
-
if (entity) bot.attack(entity);
|
|
1445
|
-
},
|
|
1446
|
-
follow: (username) => {
|
|
1447
|
-
if (!bot || !bot.pathfinder) return;
|
|
1448
|
-
const player = bot.players[username];
|
|
1449
|
-
if (player && player.entity) {
|
|
1450
|
-
const goal = new (require('mineflayer-pathfinder').goals.GoalFollow)(player.entity, 3);
|
|
1451
|
-
bot.pathfinder.setGoal(goal, true);
|
|
1452
|
-
}
|
|
1453
|
-
},
|
|
1454
|
-
stopFollow: () => {
|
|
1455
|
-
if (bot && bot.pathfinder) {
|
|
1456
|
-
bot.pathfinder.setGoal(null);
|
|
1457
|
-
}
|
|
1458
|
-
}
|
|
1459
|
-
};
|
|
1488
|
+
const botApi = createBotApi(bot);
|
|
1460
1489
|
|
|
1461
1490
|
const players = bot ? Object.keys(bot.players) : [];
|
|
1462
1491
|
|
|
@@ -7,14 +7,18 @@ const botHistoryStore = require('./BotHistoryStore');
|
|
|
7
7
|
const prisma = prismaService.getClient();
|
|
8
8
|
|
|
9
9
|
class EventGraphManager {
|
|
10
|
-
constructor(
|
|
11
|
-
this.
|
|
10
|
+
constructor() {
|
|
11
|
+
this._botManager = null;
|
|
12
12
|
this.activeGraphs = new Map();
|
|
13
13
|
this.graphStates = new Map();
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
get botManager() {
|
|
17
|
+
return this._botManager;
|
|
18
|
+
}
|
|
19
|
+
|
|
16
20
|
setBotManager(botManager) {
|
|
17
|
-
this.
|
|
21
|
+
this._botManager = botManager;
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
async loadGraphsForBot(botId) {
|