blockmine 1.21.0 → 1.23.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/.claude/agents/README.md +469 -0
- package/.claude/agents/auth-route-debugger.md +118 -0
- package/.claude/agents/auth-route-tester.md +93 -0
- package/.claude/agents/auto-error-resolver.md +97 -0
- package/.claude/agents/build-optimizer.md +236 -0
- package/.claude/agents/code-architecture-reviewer.md +83 -0
- package/.claude/agents/code-refactor-master.md +94 -0
- package/.claude/agents/cost-optimizer.md +134 -0
- package/.claude/agents/deployment-orchestrator.md +113 -0
- package/.claude/agents/documentation-architect.md +82 -0
- package/.claude/agents/frontend-error-fixer.md +77 -0
- package/.claude/agents/iac-code-generator.md +71 -0
- package/.claude/agents/incident-responder.md +346 -0
- package/.claude/agents/infrastructure-architect.md +31 -0
- package/.claude/agents/kubernetes-specialist.md +56 -0
- package/.claude/agents/migration-planner.md +181 -0
- package/.claude/agents/network-architect.md +196 -0
- package/.claude/agents/plan-reviewer.md +52 -0
- package/.claude/agents/refactor-planner.md +63 -0
- package/.claude/agents/security-scanner.md +102 -0
- package/.claude/agents/web-research-specialist.md +78 -0
- package/.claude/commands/cost-analysis.md +315 -0
- package/.claude/commands/dev-docs-update.md +55 -0
- package/.claude/commands/dev-docs.md +51 -0
- package/.claude/commands/incident-debug.md +247 -0
- package/.claude/commands/infra-plan.md +81 -0
- package/.claude/commands/migration-plan.md +478 -0
- package/.claude/commands/route-research-for-testing.md +37 -0
- package/.claude/commands/security-review.md +66 -0
- package/.claude/hooks/CONFIG.md +448 -0
- package/.claude/hooks/README.md +163 -0
- package/.claude/hooks/SKILL_ACTIVATION_COMPLETE.md +226 -0
- package/.claude/hooks/WINDOWS_HOOKS_README.md +151 -0
- package/.claude/hooks/add-skill-activation-banners.ts +132 -0
- package/.claude/hooks/comprehensive-skill-test.ts +1315 -0
- package/.claude/hooks/error-handling-reminder.sh +12 -0
- package/.claude/hooks/error-handling-reminder.ts +222 -0
- package/.claude/hooks/k8s-manifest-validator.sh +56 -0
- package/.claude/hooks/package-lock.json +556 -0
- package/.claude/hooks/package.json +16 -0
- package/.claude/hooks/post-tool-use-tracker.ps1 +174 -0
- package/.claude/hooks/post-tool-use-tracker.sh +183 -0
- package/.claude/hooks/security-policy-check.sh +247 -0
- package/.claude/hooks/skill-activation-prompt.ps1 +10 -0
- package/.claude/hooks/skill-activation-prompt.sh +10 -0
- package/.claude/hooks/skill-activation-prompt.ts +141 -0
- package/.claude/hooks/stop-build-check-enhanced.sh +130 -0
- package/.claude/hooks/terraform-validator.sh +53 -0
- package/.claude/hooks/test-input.json +7 -0
- package/.claude/hooks/test-skill-activation.ts +427 -0
- package/.claude/hooks/trigger-build-resolver.sh +79 -0
- package/.claude/hooks/tsc-check.sh +173 -0
- package/.claude/hooks/tsconfig.json +19 -0
- package/.claude/settings.json +59 -0
- package/.claude/settings.local.json +36 -14
- package/.claude/skills/README.md +507 -0
- package/.claude/skills/api-engineering/SKILL.md +63 -0
- package/.claude/skills/api-engineering/resources/api-versioning.md +88 -0
- package/.claude/skills/api-engineering/resources/graphql-patterns.md +106 -0
- package/.claude/skills/api-engineering/resources/rate-limiting.md +118 -0
- package/.claude/skills/api-engineering/resources/rest-api-design.md +105 -0
- package/.claude/skills/backend-dev-guidelines/SKILL.md +306 -0
- package/.claude/skills/backend-dev-guidelines/resources/architecture-overview.md +451 -0
- package/.claude/skills/backend-dev-guidelines/resources/async-and-errors.md +307 -0
- package/.claude/skills/backend-dev-guidelines/resources/complete-examples.md +638 -0
- package/.claude/skills/backend-dev-guidelines/resources/configuration.md +275 -0
- package/.claude/skills/backend-dev-guidelines/resources/database-patterns.md +224 -0
- package/.claude/skills/backend-dev-guidelines/resources/middleware-guide.md +213 -0
- package/.claude/skills/backend-dev-guidelines/resources/routing-and-controllers.md +756 -0
- package/.claude/skills/backend-dev-guidelines/resources/sentry-and-monitoring.md +336 -0
- package/.claude/skills/backend-dev-guidelines/resources/services-and-repositories.md +789 -0
- package/.claude/skills/backend-dev-guidelines/resources/testing-guide.md +235 -0
- package/.claude/skills/backend-dev-guidelines/resources/validation-patterns.md +754 -0
- package/.claude/skills/budget-and-cost-management/SKILL.md +850 -0
- package/.claude/skills/build-engineering/SKILL.md +431 -0
- package/.claude/skills/build-engineering/resources/artifact-repositories.md +72 -0
- package/.claude/skills/build-engineering/resources/build-caching.md +96 -0
- package/.claude/skills/build-engineering/resources/build-pipelines.md +105 -0
- package/.claude/skills/build-engineering/resources/build-security.md +95 -0
- package/.claude/skills/build-engineering/resources/build-systems.md +389 -0
- package/.claude/skills/build-engineering/resources/compilation-optimization.md +201 -0
- package/.claude/skills/build-engineering/resources/dependency-management.md +73 -0
- package/.claude/skills/build-engineering/resources/monorepo-builds.md +110 -0
- package/.claude/skills/build-engineering/resources/performance-optimization.md +113 -0
- package/.claude/skills/build-engineering/resources/reproducible-builds.md +82 -0
- package/.claude/skills/cloud-engineering/SKILL.md +675 -0
- package/.claude/skills/cloud-engineering/resources/aws-patterns.md +742 -0
- package/.claude/skills/cloud-engineering/resources/azure-patterns.md +714 -0
- package/.claude/skills/cloud-engineering/resources/cleared-cloud-environments.md +987 -0
- package/.claude/skills/cloud-engineering/resources/cloud-cost-optimization.md +757 -0
- package/.claude/skills/cloud-engineering/resources/cloud-networking.md +1058 -0
- package/.claude/skills/cloud-engineering/resources/cloud-security-tools.md +1530 -0
- package/.claude/skills/cloud-engineering/resources/cloud-security.md +990 -0
- package/.claude/skills/cloud-engineering/resources/gcp-patterns.md +758 -0
- package/.claude/skills/cloud-engineering/resources/migration-strategies.md +820 -0
- package/.claude/skills/cloud-engineering/resources/multi-cloud-strategies.md +670 -0
- package/.claude/skills/cloud-engineering/resources/oci-patterns.md +1198 -0
- package/.claude/skills/cloud-engineering/resources/serverless-patterns.md +795 -0
- package/.claude/skills/cloud-engineering/resources/well-architected-frameworks.md +966 -0
- package/.claude/skills/cybersecurity/SKILL.md +409 -0
- package/.claude/skills/cybersecurity/resources/security-architecture.md +266 -0
- package/.claude/skills/database-engineering/SKILL.md +61 -0
- package/.claude/skills/database-engineering/resources/backup-and-recovery.md +72 -0
- package/.claude/skills/database-engineering/resources/database-replication.md +63 -0
- package/.claude/skills/database-engineering/resources/postgresql-fundamentals.md +70 -0
- package/.claude/skills/database-engineering/resources/query-optimization.md +68 -0
- package/.claude/skills/devsecops/SKILL.md +374 -0
- package/.claude/skills/devsecops/resources/ci-cd-security.md +204 -0
- package/.claude/skills/devsecops/resources/compliance-automation.md +530 -0
- package/.claude/skills/devsecops/resources/compliance-frameworks.md +2322 -0
- package/.claude/skills/devsecops/resources/container-security.md +915 -0
- package/.claude/skills/devsecops/resources/cspm-integration.md +1440 -0
- package/.claude/skills/devsecops/resources/policy-enforcement.md +619 -0
- package/.claude/skills/devsecops/resources/secrets-management.md +755 -0
- package/.claude/skills/devsecops/resources/security-monitoring.md +146 -0
- package/.claude/skills/devsecops/resources/security-scanning.md +887 -0
- package/.claude/skills/devsecops/resources/security-testing.md +203 -0
- package/.claude/skills/devsecops/resources/supply-chain-security.md +518 -0
- package/.claude/skills/devsecops/resources/vulnerability-management.md +481 -0
- package/.claude/skills/devsecops/resources/zero-trust-architecture.md +177 -0
- package/.claude/skills/documentation-as-code/SKILL.md +323 -0
- package/.claude/skills/documentation-as-code/resources/api-documentation.md +90 -0
- package/.claude/skills/documentation-as-code/resources/changelog-management.md +79 -0
- package/.claude/skills/documentation-as-code/resources/diagram-generation.md +44 -0
- package/.claude/skills/documentation-as-code/resources/docs-as-code-workflow.md +99 -0
- package/.claude/skills/documentation-as-code/resources/documentation-automation.md +68 -0
- package/.claude/skills/documentation-as-code/resources/documentation-sites.md +79 -0
- package/.claude/skills/documentation-as-code/resources/markdown-best-practices.md +162 -0
- package/.claude/skills/documentation-as-code/resources/openapi-specification.md +77 -0
- package/.claude/skills/documentation-as-code/resources/readme-engineering.md +60 -0
- package/.claude/skills/documentation-as-code/resources/technical-writing-guide.md +202 -0
- package/.claude/skills/engineering-management/SKILL.md +356 -0
- package/.claude/skills/engineering-management/resources/career-ladders.md +609 -0
- package/.claude/skills/engineering-management/resources/hiring-and-assessment.md +555 -0
- package/.claude/skills/engineering-management/resources/one-on-one-guides.md +609 -0
- package/.claude/skills/engineering-management/resources/resource-planning.md +557 -0
- package/.claude/skills/engineering-management/resources/team-organization-patterns.md +491 -0
- package/.claude/skills/engineering-management/resources/technical-interviews.md +474 -0
- package/.claude/skills/engineering-operations-management/SKILL.md +817 -0
- package/.claude/skills/error-tracking/SKILL.md +379 -0
- package/.claude/skills/frontend-dev-guidelines/SKILL.md +403 -0
- package/.claude/skills/frontend-dev-guidelines/resources/common-patterns.md +331 -0
- package/.claude/skills/frontend-dev-guidelines/resources/complete-examples.md +872 -0
- package/.claude/skills/frontend-dev-guidelines/resources/component-patterns.md +502 -0
- package/.claude/skills/frontend-dev-guidelines/resources/data-fetching.md +767 -0
- package/.claude/skills/frontend-dev-guidelines/resources/file-organization.md +502 -0
- package/.claude/skills/frontend-dev-guidelines/resources/loading-and-error-states.md +501 -0
- package/.claude/skills/frontend-dev-guidelines/resources/performance.md +406 -0
- package/.claude/skills/frontend-dev-guidelines/resources/routing-guide.md +364 -0
- package/.claude/skills/frontend-dev-guidelines/resources/styling-guide.md +428 -0
- package/.claude/skills/frontend-dev-guidelines/resources/typescript-standards.md +418 -0
- package/.claude/skills/general-it-engineering/SKILL.md +393 -0
- package/.claude/skills/general-it-engineering/resources/asset-management.md +712 -0
- package/.claude/skills/general-it-engineering/resources/automation-orchestration.md +817 -0
- package/.claude/skills/general-it-engineering/resources/business-continuity.md +786 -0
- package/.claude/skills/general-it-engineering/resources/change-management.md +715 -0
- package/.claude/skills/general-it-engineering/resources/enterprise-monitoring.md +729 -0
- package/.claude/skills/general-it-engineering/resources/help-desk-operations.md +738 -0
- package/.claude/skills/general-it-engineering/resources/incident-service-management.md +834 -0
- package/.claude/skills/general-it-engineering/resources/it-governance.md +753 -0
- package/.claude/skills/general-it-engineering/resources/itil-framework.md +503 -0
- package/.claude/skills/general-it-engineering/resources/service-management.md +669 -0
- package/.claude/skills/infrastructure-architecture/SKILL.md +328 -0
- package/.claude/skills/infrastructure-architecture/resources/architecture-decision-records.md +505 -0
- package/.claude/skills/infrastructure-architecture/resources/architecture-patterns.md +528 -0
- package/.claude/skills/infrastructure-architecture/resources/capacity-planning.md +453 -0
- package/.claude/skills/infrastructure-architecture/resources/cleared-environment-architecture.md +773 -0
- package/.claude/skills/infrastructure-architecture/resources/cost-architecture.md +499 -0
- package/.claude/skills/infrastructure-architecture/resources/data-architecture.md +501 -0
- package/.claude/skills/infrastructure-architecture/resources/disaster-recovery.md +535 -0
- package/.claude/skills/infrastructure-architecture/resources/migration-architecture.md +512 -0
- package/.claude/skills/infrastructure-architecture/resources/multi-region-design.md +608 -0
- package/.claude/skills/infrastructure-architecture/resources/reference-architectures.md +562 -0
- package/.claude/skills/infrastructure-architecture/resources/security-architecture.md +538 -0
- package/.claude/skills/infrastructure-architecture/resources/system-design-principles.md +489 -0
- package/.claude/skills/infrastructure-architecture/resources/workload-classification.md +1000 -0
- package/.claude/skills/infrastructure-strategy/SKILL.md +924 -0
- package/.claude/skills/network-engineering/SKILL.md +385 -0
- package/.claude/skills/network-engineering/resources/dns-management.md +738 -0
- package/.claude/skills/network-engineering/resources/load-balancing.md +820 -0
- package/.claude/skills/network-engineering/resources/network-architecture.md +546 -0
- package/.claude/skills/network-engineering/resources/network-security.md +921 -0
- package/.claude/skills/network-engineering/resources/network-troubleshooting.md +749 -0
- package/.claude/skills/network-engineering/resources/routing-switching.md +373 -0
- package/.claude/skills/network-engineering/resources/sdn-networking.md +695 -0
- package/.claude/skills/network-engineering/resources/service-mesh-networking.md +777 -0
- package/.claude/skills/network-engineering/resources/tcp-ip-protocols.md +444 -0
- package/.claude/skills/network-engineering/resources/vpn-connectivity.md +672 -0
- package/.claude/skills/observability-engineering/SKILL.md +101 -0
- package/.claude/skills/observability-engineering/resources/apm-tools.md +97 -0
- package/.claude/skills/observability-engineering/resources/correlation-strategies.md +87 -0
- package/.claude/skills/observability-engineering/resources/distributed-tracing.md +98 -0
- package/.claude/skills/observability-engineering/resources/logs-aggregation.md +118 -0
- package/.claude/skills/observability-engineering/resources/observability-cost-optimization.md +141 -0
- package/.claude/skills/observability-engineering/resources/opentelemetry.md +110 -0
- package/.claude/skills/platform-engineering/SKILL.md +555 -0
- package/.claude/skills/platform-engineering/resources/architecture-overview.md +600 -0
- package/.claude/skills/platform-engineering/resources/container-orchestration.md +916 -0
- package/.claude/skills/platform-engineering/resources/cost-optimization.md +634 -0
- package/.claude/skills/platform-engineering/resources/developer-platforms.md +670 -0
- package/.claude/skills/platform-engineering/resources/gitops-automation.md +650 -0
- package/.claude/skills/platform-engineering/resources/infrastructure-as-code.md +778 -0
- package/.claude/skills/platform-engineering/resources/infrastructure-standards.md +708 -0
- package/.claude/skills/platform-engineering/resources/multi-tenancy.md +602 -0
- package/.claude/skills/platform-engineering/resources/platform-security.md +711 -0
- package/.claude/skills/platform-engineering/resources/resource-management.md +592 -0
- package/.claude/skills/platform-engineering/resources/service-mesh.md +628 -0
- package/.claude/skills/release-engineering/SKILL.md +393 -0
- package/.claude/skills/release-engineering/resources/artifact-management.md +108 -0
- package/.claude/skills/release-engineering/resources/build-optimization.md +84 -0
- package/.claude/skills/release-engineering/resources/ci-cd-pipelines.md +411 -0
- package/.claude/skills/release-engineering/resources/deployment-strategies.md +197 -0
- package/.claude/skills/release-engineering/resources/pipeline-security.md +62 -0
- package/.claude/skills/release-engineering/resources/progressive-delivery.md +83 -0
- package/.claude/skills/release-engineering/resources/release-automation.md +68 -0
- package/.claude/skills/release-engineering/resources/release-orchestration.md +77 -0
- package/.claude/skills/release-engineering/resources/rollback-strategies.md +66 -0
- package/.claude/skills/release-engineering/resources/versioning-strategies.md +59 -0
- package/.claude/skills/route-tester/SKILL.md +392 -0
- package/.claude/skills/skill-developer/ADVANCED.md +197 -0
- package/.claude/skills/skill-developer/HOOK_MECHANISMS.md +306 -0
- package/.claude/skills/skill-developer/PATTERNS_LIBRARY.md +152 -0
- package/.claude/skills/skill-developer/SKILL.md +430 -0
- package/.claude/skills/skill-developer/SKILL_RULES_REFERENCE.md +315 -0
- package/.claude/skills/skill-developer/TRIGGER_TYPES.md +305 -0
- package/.claude/skills/skill-developer/TROUBLESHOOTING.md +514 -0
- package/.claude/skills/skill-rules.json +2940 -0
- package/.claude/skills/sre/SKILL.md +464 -0
- package/.claude/skills/sre/resources/alerting-best-practices.md +282 -0
- package/.claude/skills/sre/resources/capacity-planning.md +226 -0
- package/.claude/skills/sre/resources/chaos-engineering.md +193 -0
- package/.claude/skills/sre/resources/disaster-recovery.md +232 -0
- package/.claude/skills/sre/resources/incident-management.md +436 -0
- package/.claude/skills/sre/resources/observability-stack.md +240 -0
- package/.claude/skills/sre/resources/on-call-runbooks.md +167 -0
- package/.claude/skills/sre/resources/performance-optimization.md +108 -0
- package/.claude/skills/sre/resources/reliability-patterns.md +183 -0
- package/.claude/skills/sre/resources/slo-sli-sla.md +464 -0
- package/.claude/skills/sre/resources/toil-reduction.md +145 -0
- package/.claude/skills/systems-engineering/SKILL.md +648 -0
- package/.claude/skills/systems-engineering/resources/automation-patterns.md +771 -0
- package/.claude/skills/systems-engineering/resources/configuration-management.md +998 -0
- package/.claude/skills/systems-engineering/resources/linux-administration.md +672 -0
- package/.claude/skills/systems-engineering/resources/networking-fundamentals.md +982 -0
- package/.claude/skills/systems-engineering/resources/performance-tuning.md +871 -0
- package/.claude/skills/systems-engineering/resources/powershell-scripting.md +482 -0
- package/.claude/skills/systems-engineering/resources/security-hardening.md +739 -0
- package/.claude/skills/systems-engineering/resources/shell-scripting.md +915 -0
- package/.claude/skills/systems-engineering/resources/storage-management.md +628 -0
- package/.claude/skills/systems-engineering/resources/system-monitoring.md +787 -0
- package/.claude/skills/systems-engineering/resources/troubleshooting-guide.md +753 -0
- package/.claude/skills/systems-engineering/resources/windows-administration.md +738 -0
- package/.claude/skills/technical-leadership/SKILL.md +728 -0
- package/CHANGELOG.md +102 -42
- package/CLAUDE.md +284 -0
- package/README.md +315 -71
- package/backend/docs/SECRETS_DOCUMENTATION.md +327 -0
- package/backend/jest.config.js +59 -0
- package/backend/package-lock.json +6801 -0
- package/backend/package.json +24 -4
- package/backend/prisma/migrations/20251026104609_add_websocket_api/migration.sql +33 -0
- package/backend/prisma/migrations/20251116111851_add_execution_trace/migration.sql +22 -0
- package/backend/prisma/migrations/20251120154914_add_panel_api_keys/migration.sql +21 -0
- package/backend/prisma/migrations/20251121110241_add_proxy_table/migration.sql +45 -0
- package/backend/prisma/migrations/migration_lock.toml +2 -2
- package/backend/prisma/schema.prisma +103 -1
- package/backend/src/__tests__/core/DependencyService.test.js +336 -0
- package/backend/src/__tests__/core/UserService.test.js +875 -0
- package/backend/src/__tests__/repositories/BaseRepository.test.js +146 -0
- package/backend/src/__tests__/repositories/BotRepository.test.js +118 -0
- package/backend/src/__tests__/repositories/CommandRepository.test.js +132 -0
- package/backend/src/__tests__/repositories/EventGraphRepository.test.js +93 -0
- package/backend/src/__tests__/repositories/GroupRepository.test.js +155 -0
- package/backend/src/__tests__/repositories/PermissionRepository.test.js +130 -0
- package/backend/src/__tests__/repositories/PluginRepository.test.js +107 -0
- package/backend/src/__tests__/repositories/ServerRepository.test.js +80 -0
- package/backend/src/__tests__/repositories/UserRepository.test.js +128 -0
- package/backend/src/__tests__/secretsFilter.test.js +425 -0
- package/backend/src/__tests__/services/BotLifecycleService.test.js +416 -0
- package/backend/src/__tests__/services/BotProcessManager.test.js +285 -0
- package/backend/src/__tests__/services/CacheManager.test.js +125 -0
- package/backend/src/__tests__/services/CommandExecutionService.test.js +460 -0
- package/backend/src/__tests__/services/ResourceMonitorService.test.js +207 -0
- package/backend/src/__tests__/services/TelemetryService.test.js +291 -0
- package/backend/src/__tests__/setup.js +25 -0
- package/backend/src/ai/plugin-assistant-system-prompt.md +788 -0
- package/backend/src/api/middleware/auth.js +27 -0
- package/backend/src/api/middleware/botAccess.js +7 -3
- package/backend/src/api/middleware/panelApiAuth.js +135 -0
- package/backend/src/api/routes/aiAssistant.js +995 -0
- package/backend/src/api/routes/apiKeys.js +181 -0
- package/backend/src/api/routes/auth.js +669 -633
- package/backend/src/api/routes/botCommands.js +107 -0
- package/backend/src/api/routes/botGroups.js +165 -0
- package/backend/src/api/routes/botHistory.js +108 -0
- package/backend/src/api/routes/botPermissions.js +99 -0
- package/backend/src/api/routes/botStatus.js +36 -0
- package/backend/src/api/routes/botUsers.js +162 -0
- package/backend/src/api/routes/bots.js +2451 -2360
- package/backend/src/api/routes/eventGraphs.js +4 -1
- package/backend/src/api/routes/logs.js +13 -3
- package/backend/src/api/routes/panel.js +66 -66
- package/backend/src/api/routes/panelApiKeys.js +179 -0
- package/backend/src/api/routes/pluginIde.js +1715 -135
- package/backend/src/api/routes/plugins.js +376 -218
- package/backend/src/api/routes/proxies.js +130 -0
- package/backend/src/api/routes/search.js +4 -0
- package/backend/src/api/routes/servers.js +20 -3
- package/backend/src/api/routes/settings.js +5 -0
- package/backend/src/api/routes/system.js +174 -0
- package/backend/src/api/routes/traces.js +131 -0
- package/backend/src/config/debug.config.js +36 -0
- package/backend/src/container.js +82 -0
- package/backend/src/core/BotHistoryStore.js +180 -0
- package/backend/src/core/BotManager.js +149 -868
- package/backend/src/core/BotManager.old.js +1093 -0
- package/backend/src/core/BotProcess.js +850 -191
- package/backend/src/core/EventGraphManager.js +194 -198
- package/backend/src/core/GraphExecutionEngine.js +709 -57
- package/backend/src/core/MessageQueue.js +39 -12
- package/backend/src/core/NodeRegistry.js +37 -1134
- package/backend/src/core/PluginLoader.js +99 -5
- package/backend/src/core/PluginManager.js +126 -15
- package/backend/src/core/PrismaService.js +32 -0
- package/backend/src/core/TaskScheduler.js +1 -1
- package/backend/src/core/UserService.js +3 -3
- package/backend/src/core/__tests__/PrismaService.test.js +24 -0
- package/backend/src/core/commands/README.md +305 -0
- package/backend/src/core/commands/dev.js +13 -7
- package/backend/src/core/commands/ping.js +10 -4
- package/backend/src/core/commands/whois.js +63 -0
- package/backend/src/core/config/validation.js +27 -0
- package/backend/src/core/constants/graphTypes.js +21 -0
- package/backend/src/core/node-registries/actions.js +202 -0
- package/backend/src/core/node-registries/arrays.js +155 -0
- package/backend/src/core/node-registries/bot.js +23 -0
- package/backend/src/core/node-registries/data.js +290 -0
- package/backend/src/core/node-registries/debug.js +26 -0
- package/backend/src/core/node-registries/events.js +201 -0
- package/backend/src/core/node-registries/flow.js +139 -0
- package/backend/src/core/node-registries/logic.js +62 -0
- package/backend/src/core/node-registries/math.js +42 -0
- package/backend/src/core/node-registries/objects.js +98 -0
- package/backend/src/core/node-registries/strings.js +187 -0
- package/backend/src/core/node-registries/time.js +113 -0
- package/backend/src/core/node-registries/type.js +25 -0
- package/backend/src/core/node-registries/users.js +79 -0
- package/backend/src/core/nodes/{action_bot_look_at.js → actions/bot_look_at.js} +36 -36
- package/backend/src/core/nodes/{action_bot_set_variable.js → actions/bot_set_variable.js} +32 -32
- package/backend/src/core/nodes/actions/create_command.js +189 -0
- package/backend/src/core/nodes/actions/delete_command.js +92 -0
- package/backend/src/core/nodes/{action_send_log.js → actions/send_log.js} +28 -23
- package/backend/src/core/nodes/{action_send_message.js → actions/send_message.js} +32 -32
- package/backend/src/core/nodes/actions/send_websocket_response.js +33 -0
- package/backend/src/core/nodes/actions/update_command.js +133 -0
- package/backend/src/core/nodes/arrays/get_next.js +35 -0
- package/backend/src/core/nodes/arrays/join.js +28 -0
- package/backend/src/core/nodes/{data_cast.js → data/cast.js} +10 -1
- package/backend/src/core/nodes/data/datetime_literal.js +27 -0
- package/backend/src/core/nodes/data/entity_info.js +69 -0
- package/backend/src/core/nodes/data/get_nearby_entities.js +32 -0
- package/backend/src/core/nodes/data/get_nearby_players.js +64 -0
- package/backend/src/core/nodes/{data_get_user_field.js → data/get_user_field.js} +1 -1
- package/backend/src/core/nodes/data/type_check.js +53 -0
- package/backend/src/core/nodes/{debug_log.js → debug/log.js} +16 -16
- package/backend/src/core/nodes/{flow_branch.js → flow/branch.js} +15 -15
- package/backend/src/core/nodes/{flow_break.js → flow/break.js} +14 -14
- package/backend/src/core/nodes/flow/delay.js +43 -0
- package/backend/src/core/nodes/{flow_for_each.js → flow/for_each.js} +39 -39
- package/backend/src/core/nodes/{flow_sequence.js → flow/sequence.js} +16 -16
- package/backend/src/core/nodes/{flow_switch.js → flow/switch.js} +47 -47
- package/backend/src/core/nodes/{flow_while.js → flow/while.js} +1 -1
- package/backend/src/core/nodes/logic/__tests__/compare.test.js +83 -0
- package/backend/src/core/nodes/logic/not.js +22 -0
- package/backend/src/core/nodes/math/__tests__/operation.test.js +65 -0
- package/backend/src/core/nodes/strings/__tests__/concat.test.js +89 -0
- package/backend/src/core/nodes/{string_starts_with.js → strings/starts_with.js} +1 -1
- package/backend/src/core/nodes/strings/to_lower.js +22 -0
- package/backend/src/core/nodes/strings/to_upper.js +22 -0
- package/backend/src/core/nodes/time/__tests__/now.test.js +24 -0
- package/backend/src/core/nodes/time/add.js +33 -0
- package/backend/src/core/nodes/time/compare.js +35 -0
- package/backend/src/core/nodes/time/diff.js +29 -0
- package/backend/src/core/nodes/time/format.js +32 -0
- package/backend/src/core/nodes/time/now.js +18 -0
- package/backend/src/core/nodes/type/to_string.js +32 -0
- package/backend/src/core/nodes/{user_check_blacklist.js → users/check_blacklist.js} +37 -37
- package/backend/src/core/nodes/{user_get_groups.js → users/get_groups.js} +36 -36
- package/backend/src/core/nodes/{user_get_permissions.js → users/get_permissions.js} +36 -36
- package/backend/src/core/nodes/{user_set_blacklist.js → users/set_blacklist.js} +37 -37
- package/backend/src/core/services/BotLifecycleService.js +835 -0
- package/backend/src/core/services/BotProcessManager.js +163 -0
- package/backend/src/core/services/CacheManager.js +111 -0
- package/backend/src/core/services/CommandExecutionService.js +430 -0
- package/backend/src/core/services/DebugSessionManager.js +347 -0
- package/backend/src/core/services/GraphCollaborationManager.js +501 -0
- package/backend/src/core/services/MinecraftBotManager.js +259 -0
- package/backend/src/core/services/MinecraftViewerService.js +216 -0
- package/backend/src/core/services/ResourceMonitorService.js +90 -0
- package/backend/src/core/services/TelemetryService.js +124 -0
- package/backend/src/core/services/TraceCollectorService.js +545 -0
- package/backend/src/core/services/ValidationService.js +132 -0
- package/backend/src/core/services/__tests__/ValidationService.test.js +148 -0
- package/backend/src/core/services.js +20 -5
- package/backend/src/core/system/CommandContext.js +84 -0
- package/backend/src/core/system/RuntimeCommandRegistry.js +116 -0
- package/backend/src/core/system/Transport.js +74 -0
- package/backend/src/core/utils/__tests__/jsonParser.test.js +44 -0
- package/backend/src/core/utils/jsonParser.js +18 -0
- package/backend/src/core/utils/secretsFilter.js +262 -0
- package/backend/src/core/utils/variableParser.js +89 -0
- package/backend/src/core/validation/__tests__/nodeSchemas.test.js +175 -0
- package/backend/src/core/validation/nodeSchemas.js +112 -0
- package/backend/src/lib/prisma.js +2 -4
- package/backend/src/real-time/botApi/handlers/commandHandlers.js +28 -0
- package/backend/src/real-time/botApi/handlers/graphHandlers.js +99 -0
- package/backend/src/real-time/botApi/handlers/graphWebSocketHandlers.js +147 -0
- package/backend/src/real-time/botApi/handlers/index.js +43 -0
- package/backend/src/real-time/botApi/handlers/messageHandlers.js +66 -0
- package/backend/src/real-time/botApi/handlers/statusHandlers.js +17 -0
- package/backend/src/real-time/botApi/handlers/userHandlers.js +141 -0
- package/backend/src/real-time/botApi/index.js +40 -0
- package/backend/src/real-time/botApi/middleware.js +79 -0
- package/backend/src/real-time/botApi/utils.js +65 -0
- package/backend/src/real-time/panelNamespace.js +387 -0
- package/backend/src/real-time/presence.js +7 -2
- package/backend/src/real-time/socketHandler.js +400 -5
- package/backend/src/repositories/BaseRepository.js +43 -0
- package/backend/src/repositories/BotRepository.js +42 -0
- package/backend/src/repositories/CommandRepository.js +53 -0
- package/backend/src/repositories/EventGraphRepository.js +40 -0
- package/backend/src/repositories/GroupRepository.js +69 -0
- package/backend/src/repositories/PermissionRepository.js +48 -0
- package/backend/src/repositories/PluginRepository.js +42 -0
- package/backend/src/repositories/ServerRepository.js +27 -0
- package/backend/src/repositories/UserRepository.js +48 -0
- package/backend/src/server.js +21 -0
- package/backend/src/test-refactor.js +85 -0
- package/frontend/dist/assets/index-B1serztM.js +11210 -0
- package/frontend/dist/assets/index-t6K1u4OV.css +32 -0
- package/frontend/dist/index.html +2 -2
- package/frontend/package-lock.json +9437 -0
- package/frontend/package.json +8 -5
- package/package.json +3 -2
- 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/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/frontend/dist/assets/index-B9GedHEa.js +0 -8352
- package/frontend/dist/assets/index-zLiy9MDx.css +0 -1
- package/nul +0 -0
- /package/backend/src/core/nodes/{action_http_request.js → actions/http_request.js} +0 -0
- /package/backend/src/core/nodes/{array_add_element.js → arrays/add_element.js} +0 -0
- /package/backend/src/core/nodes/{array_contains.js → arrays/contains.js} +0 -0
- /package/backend/src/core/nodes/{array_find_index.js → arrays/find_index.js} +0 -0
- /package/backend/src/core/nodes/{array_get_by_index.js → arrays/get_by_index.js} +0 -0
- /package/backend/src/core/nodes/{array_get_random_element.js → arrays/get_random_element.js} +0 -0
- /package/backend/src/core/nodes/{array_remove_by_index.js → arrays/remove_by_index.js} +0 -0
- /package/backend/src/core/nodes/{bot_get_position.js → bot/get_position.js} +0 -0
- /package/backend/src/core/nodes/{data_array_literal.js → data/array_literal.js} +0 -0
- /package/backend/src/core/nodes/{data_boolean_literal.js → data/boolean_literal.js} +0 -0
- /package/backend/src/core/nodes/{data_get_argument.js → data/get_argument.js} +0 -0
- /package/backend/src/core/nodes/{data_get_bot_look.js → data/get_bot_look.js} +0 -0
- /package/backend/src/core/nodes/{data_get_entity_field.js → data/get_entity_field.js} +0 -0
- /package/backend/src/core/nodes/{data_get_server_players.js → data/get_server_players.js} +0 -0
- /package/backend/src/core/nodes/{data_get_variable.js → data/get_variable.js} +0 -0
- /package/backend/src/core/nodes/{data_length.js → data/length.js} +0 -0
- /package/backend/src/core/nodes/{data_make_object.js → data/make_object.js} +0 -0
- /package/backend/src/core/nodes/{data_number_literal.js → data/number_literal.js} +0 -0
- /package/backend/src/core/nodes/{data_string_literal.js → data/string_literal.js} +0 -0
- /package/backend/src/core/nodes/{logic_compare.js → logic/compare.js} +0 -0
- /package/backend/src/core/nodes/{logic_operation.js → logic/operation.js} +0 -0
- /package/backend/src/core/nodes/{math_operation.js → math/operation.js} +0 -0
- /package/backend/src/core/nodes/{math_random_number.js → math/random_number.js} +0 -0
- /package/backend/src/core/nodes/{object_create.js → objects/create.js} +0 -0
- /package/backend/src/core/nodes/{object_delete.js → objects/delete.js} +0 -0
- /package/backend/src/core/nodes/{object_get.js → objects/get.js} +0 -0
- /package/backend/src/core/nodes/{object_has_key.js → objects/has_key.js} +0 -0
- /package/backend/src/core/nodes/{object_set.js → objects/set.js} +0 -0
- /package/backend/src/core/nodes/{string_concat.js → strings/concat.js} +0 -0
- /package/backend/src/core/nodes/{string_contains.js → strings/contains.js} +0 -0
- /package/backend/src/core/nodes/{string_ends_with.js → strings/ends_with.js} +0 -0
- /package/backend/src/core/nodes/{string_equals.js → strings/equals.js} +0 -0
- /package/backend/src/core/nodes/{string_length.js → strings/length.js} +0 -0
- /package/backend/src/core/nodes/{string_matches.js → strings/matches.js} +0 -0
- /package/backend/src/core/nodes/{string_split.js → strings/split.js} +0 -0
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
const validationService = require('./services/ValidationService');
|
|
2
|
+
const { GRAPH_TYPES } = require('./constants/graphTypes');
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
5
|
* @typedef {object} NodePin
|
|
3
6
|
* @property {string} id - Уникальный идентификатор пина (например, "exec", "data_result").
|
|
@@ -34,7 +37,12 @@ class NodeRegistry {
|
|
|
34
37
|
if (!nodeConfig.type) {
|
|
35
38
|
throw new Error('Node type is required');
|
|
36
39
|
}
|
|
37
|
-
|
|
40
|
+
|
|
41
|
+
const validation = validationService.validateNode(nodeConfig, 'NodeRegistry');
|
|
42
|
+
if (validation.shouldSkip) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
|
|
38
46
|
if (this.nodes.has(nodeConfig.type)) {
|
|
39
47
|
console.warn(`Node type '${nodeConfig.type}' is already registered. Overriding.`);
|
|
40
48
|
}
|
|
@@ -68,7 +76,7 @@ class NodeRegistry {
|
|
|
68
76
|
getNodesByCategory(graphType) {
|
|
69
77
|
const result = {};
|
|
70
78
|
for (const node of this.nodes.values()) {
|
|
71
|
-
if (node.graphType ===
|
|
79
|
+
if (node.graphType === GRAPH_TYPES.ALL || node.graphType === graphType) {
|
|
72
80
|
if (!result[node.category]) {
|
|
73
81
|
result[node.category] = [];
|
|
74
82
|
}
|
|
@@ -89,1144 +97,39 @@ class NodeRegistry {
|
|
|
89
97
|
|
|
90
98
|
/**
|
|
91
99
|
* Регистрирует базовую библиотеку узлов.
|
|
100
|
+
* Автоматически обнаруживает и загружает все файлы из директории node-registries.
|
|
92
101
|
* @private
|
|
93
102
|
*/
|
|
94
103
|
_registerBaseNodes() {
|
|
95
|
-
const
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
this.registerNodeType({
|
|
119
|
-
type: 'event:chat',
|
|
120
|
-
name: 'Событие: Сообщение в чате',
|
|
121
|
-
label: '💬 Сообщение в чате',
|
|
122
|
-
description: 'Срабатывает, когда в чат приходит сообщение.',
|
|
123
|
-
category: 'События',
|
|
124
|
-
graphType: event,
|
|
125
|
-
isEvent: true,
|
|
126
|
-
pins: {
|
|
127
|
-
inputs: [],
|
|
128
|
-
outputs: [
|
|
129
|
-
{ id: 'exec', type: 'Exec', name: 'Выполнить' },
|
|
130
|
-
{ id: 'username', type: 'String', name: 'Игрок' },
|
|
131
|
-
{ id: 'message', type: 'String', name: 'Сообщение' },
|
|
132
|
-
{ id: 'chatType', type: 'String', name: 'Тип чата' },
|
|
133
|
-
]
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
this.registerNodeType({
|
|
138
|
-
type: 'event:raw_message',
|
|
139
|
-
name: 'Событие: Сырое сообщение',
|
|
140
|
-
label: '📝 Сырое сообщение',
|
|
141
|
-
description: 'Срабатывает при получении любого сообщения в сыром виде (до парсинга).',
|
|
142
|
-
category: 'События',
|
|
143
|
-
graphType: event,
|
|
144
|
-
isEvent: true,
|
|
145
|
-
pins: {
|
|
146
|
-
inputs: [],
|
|
147
|
-
outputs: [
|
|
148
|
-
{ id: 'exec', type: 'Exec', name: 'Выполнить' },
|
|
149
|
-
{ id: 'rawText', type: 'String', name: 'Сырой текст' },
|
|
150
|
-
]
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
this.registerNodeType({
|
|
155
|
-
type: 'event:playerJoined',
|
|
156
|
-
label: '👋 Игрок зашел',
|
|
157
|
-
category: 'События',
|
|
158
|
-
description: 'Срабатывает, когда игрок заходит на сервер.',
|
|
159
|
-
graphType: event,
|
|
160
|
-
pins: {
|
|
161
|
-
inputs: [],
|
|
162
|
-
outputs: [
|
|
163
|
-
{ id: 'exec', name: 'Выполнить', type: 'Exec' },
|
|
164
|
-
{ id: 'user', name: 'Пользователь', type: 'User' },
|
|
165
|
-
]
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
this.registerNodeType({
|
|
170
|
-
type: 'event:playerLeft',
|
|
171
|
-
label: '🚪 Игрок вышел',
|
|
172
|
-
category: 'События',
|
|
173
|
-
description: 'Срабатывает, когда игрок покидает сервер.',
|
|
174
|
-
graphType: event,
|
|
175
|
-
pins: {
|
|
176
|
-
inputs: [],
|
|
177
|
-
outputs: [
|
|
178
|
-
{ id: 'exec', name: 'Выполнить', type: 'Exec' },
|
|
179
|
-
{ id: 'user', name: 'Пользователь', type: 'User' },
|
|
180
|
-
]
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
this.registerNodeType({
|
|
185
|
-
type: 'event:entitySpawn',
|
|
186
|
-
label: '📦 Сущность появилась',
|
|
187
|
-
category: 'События',
|
|
188
|
-
description: 'Вызывается, когда новая сущность появляется в поле зрения бота.',
|
|
189
|
-
graphType: event,
|
|
190
|
-
pins: {
|
|
191
|
-
inputs: [],
|
|
192
|
-
outputs: [
|
|
193
|
-
{ id: 'exec', name: 'Выполнить', type: 'Exec' },
|
|
194
|
-
{ id: 'entity', name: 'Сущность', type: 'Object' }
|
|
195
|
-
]
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
|
|
199
|
-
this.registerNodeType({
|
|
200
|
-
type: 'event:entityMoved',
|
|
201
|
-
label: '🧍 Сущность подвинулась',
|
|
202
|
-
category: 'События',
|
|
203
|
-
description: 'Вызывается, когда любая сущность перемещается.',
|
|
204
|
-
graphType: event,
|
|
205
|
-
pins: {
|
|
206
|
-
inputs: [],
|
|
207
|
-
outputs: [
|
|
208
|
-
{ id: 'exec', name: 'Выполнить', type: 'Exec' },
|
|
209
|
-
{ id: 'entity', name: 'Сущность', type: 'Object' }
|
|
210
|
-
]
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
|
|
214
|
-
this.registerNodeType({
|
|
215
|
-
type: 'event:entityGone',
|
|
216
|
-
label: '❌ Сущность исчезла',
|
|
217
|
-
category: 'События',
|
|
218
|
-
description: 'Вызывается, когда сущность пропадает из зоны видимости бота.',
|
|
219
|
-
graphType: event,
|
|
220
|
-
pins: {
|
|
221
|
-
inputs: [],
|
|
222
|
-
outputs: [
|
|
223
|
-
{ id: 'exec', name: 'Выполнить', type: 'Exec' },
|
|
224
|
-
{ id: 'entity', name: 'Сущность', type: 'Object' }
|
|
225
|
-
]
|
|
226
|
-
}
|
|
227
|
-
});
|
|
228
|
-
|
|
229
|
-
this.registerNodeType({
|
|
230
|
-
type: 'flow:branch',
|
|
231
|
-
label: '↔️ Ветвление (Branch)',
|
|
232
|
-
category: 'Поток',
|
|
233
|
-
description: 'if/else логика',
|
|
234
|
-
graphType: all,
|
|
235
|
-
executor: require('./nodes/flow_branch').execute,
|
|
236
|
-
pins: {
|
|
237
|
-
inputs: [
|
|
238
|
-
{ id: 'exec', name: 'Выполнить', type: 'Exec', required: true },
|
|
239
|
-
{ id: 'condition', name: 'Условие', type: 'Boolean', required: true }
|
|
240
|
-
],
|
|
241
|
-
outputs: [
|
|
242
|
-
{ id: 'exec_true', name: 'True', type: 'Exec' },
|
|
243
|
-
{ id: 'exec_false', name: 'False', type: 'Exec' }
|
|
244
|
-
]
|
|
245
|
-
}
|
|
246
|
-
});
|
|
247
|
-
|
|
248
|
-
this.registerNodeType({
|
|
249
|
-
type: 'flow:sequence',
|
|
250
|
-
label: '⛓️ Последовательность',
|
|
251
|
-
category: 'Поток',
|
|
252
|
-
description: 'Выполняет действия по очереди',
|
|
253
|
-
graphType: all,
|
|
254
|
-
executor: require('./nodes/flow_sequence').execute,
|
|
255
|
-
pins: {
|
|
256
|
-
inputs: [
|
|
257
|
-
{ id: 'exec', name: 'Выполнить', type: 'Exec', required: true }
|
|
258
|
-
],
|
|
259
|
-
outputs: [
|
|
260
|
-
{ id: 'exec_0', name: '0', type: 'Exec' },
|
|
261
|
-
{ id: 'exec_1', name: '1', type: 'Exec' }
|
|
262
|
-
]
|
|
263
|
-
}
|
|
264
|
-
});
|
|
265
|
-
|
|
266
|
-
this.registerNodeType({
|
|
267
|
-
type: 'flow:for_each',
|
|
268
|
-
label: '🔁 Перебор массива (цикл)',
|
|
269
|
-
category: 'Поток',
|
|
270
|
-
description: 'Выполняет "Тело цикла" для каждого элемента в "Массиве".',
|
|
271
|
-
graphType: all,
|
|
272
|
-
executor: require('./nodes/flow_for_each').execute,
|
|
273
|
-
pins: {
|
|
274
|
-
inputs: [
|
|
275
|
-
{ id: 'exec', name: 'Выполнить', type: 'Exec', required: true },
|
|
276
|
-
{ id: 'array', name: 'Массив', type: 'Array', required: true }
|
|
277
|
-
],
|
|
278
|
-
outputs: [
|
|
279
|
-
{ id: 'loop_body', name: 'Тело цикла', type: 'Exec' },
|
|
280
|
-
{ id: 'element', name: 'Элемент', type: 'Any' },
|
|
281
|
-
{ id: 'index', name: 'Индекс', type: 'Number' },
|
|
282
|
-
{ id: 'completed', name: 'Завершено', type: 'Exec' }
|
|
283
|
-
]
|
|
284
|
-
}
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
this.registerNodeType({
|
|
288
|
-
type: 'flow:while',
|
|
289
|
-
label: '🔁 Цикл While',
|
|
290
|
-
category: 'Поток',
|
|
291
|
-
description: 'Выполняет "Тело цикла" пока условие истинно.',
|
|
292
|
-
graphType: all,
|
|
293
|
-
executor: require('./nodes/flow_while').execute,
|
|
294
|
-
evaluator: require('./nodes/flow_while').evaluate,
|
|
295
|
-
pins: {
|
|
296
|
-
inputs: [
|
|
297
|
-
{ id: 'exec', name: 'Выполнить', type: 'Exec', required: true },
|
|
298
|
-
{ id: 'condition', name: 'Условие', type: 'Boolean', required: true }
|
|
299
|
-
],
|
|
300
|
-
outputs: [
|
|
301
|
-
{ id: 'loop_body', name: 'Тело цикла', type: 'Exec' },
|
|
302
|
-
{ id: 'iteration', name: 'Итерация', type: 'Number' },
|
|
303
|
-
{ id: 'completed', name: 'Завершено', type: 'Exec' }
|
|
304
|
-
]
|
|
305
|
-
}
|
|
306
|
-
});
|
|
307
|
-
|
|
308
|
-
this.registerNodeType({
|
|
309
|
-
type: 'flow:break',
|
|
310
|
-
label: '🛑 Выйти из цикла',
|
|
311
|
-
category: 'Поток',
|
|
312
|
-
description: 'Немедленно прерывает выполнение цикла (For Each Loop) и передает управление на его выход Completed.',
|
|
313
|
-
graphType: all,
|
|
314
|
-
executor: require('./nodes/flow_break').execute,
|
|
315
|
-
pins: {
|
|
316
|
-
inputs: [
|
|
317
|
-
{ id: 'exec', name: 'Выполнить', type: 'Exec', required: true }
|
|
318
|
-
],
|
|
319
|
-
outputs: []
|
|
320
|
-
}
|
|
321
|
-
});
|
|
322
|
-
|
|
323
|
-
this.registerNodeType({
|
|
324
|
-
type: 'action:send_message',
|
|
325
|
-
label: '🗣️ Отправить сообщение',
|
|
326
|
-
category: 'Действия',
|
|
327
|
-
description: 'Отправляет сообщение в чат. Поддерживает переменные в формате {varName}',
|
|
328
|
-
graphType: all,
|
|
329
|
-
dynamicPins: true,
|
|
330
|
-
executor: require('./nodes/action_send_message').execute,
|
|
331
|
-
pins: {
|
|
332
|
-
inputs: [
|
|
333
|
-
{ id: 'exec', name: 'Выполнить', type: 'Exec', required: true },
|
|
334
|
-
{ id: 'chat_type', name: 'Тип чата', type: 'String', required: true },
|
|
335
|
-
{ id: 'message', name: 'Сообщение', type: 'String', required: true },
|
|
336
|
-
{ id: 'recipient', name: 'Адресат', type: 'String', required: false }
|
|
337
|
-
],
|
|
338
|
-
outputs: [
|
|
339
|
-
{ id: 'exec', name: 'Выполнено', type: 'Exec' }
|
|
340
|
-
]
|
|
341
|
-
}
|
|
342
|
-
});
|
|
343
|
-
|
|
344
|
-
this.registerNodeType({
|
|
345
|
-
type: 'action:send_log',
|
|
346
|
-
label: '📝 Записать в лог (веб)',
|
|
347
|
-
category: 'Действия',
|
|
348
|
-
description: 'Отправляет сообщение в консоль на странице бота.',
|
|
349
|
-
graphType: all,
|
|
350
|
-
executor: require('./nodes/action_send_log').execute,
|
|
351
|
-
pins: {
|
|
352
|
-
inputs: [
|
|
353
|
-
{ id: 'exec', name: 'Выполнить', type: 'Exec', required: true },
|
|
354
|
-
{ id: 'message', name: 'Сообщение', type: 'String', required: true },
|
|
355
|
-
],
|
|
356
|
-
outputs: [
|
|
357
|
-
{ id: 'exec', name: 'Выполнено', type: 'Exec' },
|
|
358
|
-
]
|
|
359
|
-
}
|
|
360
|
-
});
|
|
361
|
-
|
|
362
|
-
this.registerNodeType({
|
|
363
|
-
type: 'action:bot_look_at',
|
|
364
|
-
label: '🤖 Бот: Посмотреть на',
|
|
365
|
-
category: 'Действия',
|
|
366
|
-
description: 'Поворачивает голову бота в сторону координат или сущности.',
|
|
367
|
-
graphType: all,
|
|
368
|
-
executor: require('./nodes/action_bot_look_at').execute,
|
|
369
|
-
pins: {
|
|
370
|
-
inputs: [
|
|
371
|
-
{ id: 'exec', name: 'Выполнить', type: 'Exec', required: true },
|
|
372
|
-
{ id: 'target', name: 'Цель (Позиция/Сущность)', type: 'Object', required: true },
|
|
373
|
-
{ id: 'add_y', name: 'Прибавить к Y', type: 'Number', required: false }
|
|
374
|
-
],
|
|
375
|
-
outputs: [
|
|
376
|
-
{ id: 'exec', name: 'Выполнено', type: 'Exec' }
|
|
377
|
-
]
|
|
378
|
-
}
|
|
379
|
-
});
|
|
380
|
-
|
|
381
|
-
this.registerNodeType({
|
|
382
|
-
type: 'action:bot_set_variable',
|
|
383
|
-
label: '💾 Записать переменную',
|
|
384
|
-
category: 'Действия',
|
|
385
|
-
description: 'Сохраняет значение в переменную графа.',
|
|
386
|
-
graphType: all,
|
|
387
|
-
executor: require('./nodes/action_bot_set_variable').execute,
|
|
388
|
-
pins: {
|
|
389
|
-
inputs: [
|
|
390
|
-
{ id: 'exec', name: 'Выполнить', type: 'Exec', required: true },
|
|
391
|
-
{ id: 'name', name: 'Имя', type: 'String', required: true },
|
|
392
|
-
{ id: 'value', name: 'Значение', type: 'Wildcard', required: true },
|
|
393
|
-
{ id: 'persist', name: 'Хранить в БД?', type: 'Boolean', required: false }
|
|
394
|
-
],
|
|
395
|
-
outputs: [
|
|
396
|
-
{ id: 'exec', name: 'Выполнено', type: 'Exec' }
|
|
397
|
-
]
|
|
398
|
-
}
|
|
399
|
-
});
|
|
400
|
-
|
|
401
|
-
this.registerNodeType({
|
|
402
|
-
type: 'action:http_request',
|
|
403
|
-
label: '🌐 HTTP-запрос',
|
|
404
|
-
category: 'Действия',
|
|
405
|
-
description: 'Выполняет HTTP-запрос (GET, POST, PUT, DELETE и т.д.) и возвращает ответ.',
|
|
406
|
-
graphType: all,
|
|
407
|
-
executor: require('./nodes/action_http_request').execute,
|
|
408
|
-
pins: {
|
|
409
|
-
inputs: [
|
|
410
|
-
{ id: 'exec', name: 'Выполнить', type: 'Exec', required: true },
|
|
411
|
-
{ id: 'url', name: 'URL', type: 'String', required: true },
|
|
412
|
-
{ id: 'method', name: 'Метод', type: 'String', required: false },
|
|
413
|
-
{ id: 'headers', name: 'Заголовки (JSON)', type: 'String', required: false },
|
|
414
|
-
{ id: 'body', name: 'Тело (JSON)', type: 'Wildcard', required: false },
|
|
415
|
-
{ id: 'timeout', name: 'Таймаут (мс)', type: 'Number', required: false }
|
|
416
|
-
],
|
|
417
|
-
outputs: [
|
|
418
|
-
{ id: 'exec', name: 'Успех', type: 'Exec' },
|
|
419
|
-
{ id: 'exec_error', name: 'Ошибка', type: 'Exec' },
|
|
420
|
-
{ id: 'status', name: 'Статус', type: 'Number' },
|
|
421
|
-
{ id: 'response', name: 'Ответ', type: 'Wildcard' },
|
|
422
|
-
{ id: 'response_headers', name: 'Заголовки ответа', type: 'Object' },
|
|
423
|
-
{ id: 'success', name: 'Успешно', type: 'Boolean' },
|
|
424
|
-
{ id: 'error', name: 'Ошибка', type: 'String' }
|
|
425
|
-
]
|
|
426
|
-
}
|
|
427
|
-
});
|
|
428
|
-
|
|
429
|
-
this.registerNodeType({
|
|
430
|
-
type: 'data:get_argument',
|
|
431
|
-
label: '📥 Получить аргумент',
|
|
432
|
-
category: 'Данные',
|
|
433
|
-
description: 'Получает значение аргумента команды по его имени.',
|
|
434
|
-
graphType: command,
|
|
435
|
-
evaluator: require('./nodes/data_get_argument').evaluate,
|
|
436
|
-
data: {
|
|
437
|
-
argumentName: {
|
|
438
|
-
type: 'argument',
|
|
439
|
-
label: 'Аргумент'
|
|
104
|
+
const fs = require('fs');
|
|
105
|
+
const path = require('path');
|
|
106
|
+
|
|
107
|
+
const registriesDir = path.join(__dirname, 'node-registries');
|
|
108
|
+
|
|
109
|
+
try {
|
|
110
|
+
// Получаем все файлы .js из директории node-registries
|
|
111
|
+
const files = fs.readdirSync(registriesDir)
|
|
112
|
+
.filter(file => file.endsWith('.js'));
|
|
113
|
+
|
|
114
|
+
// Загружаем и регистрируем ноды из каждого файла
|
|
115
|
+
for (const file of files) {
|
|
116
|
+
try {
|
|
117
|
+
const registry = require(path.join(registriesDir, file));
|
|
118
|
+
|
|
119
|
+
if (typeof registry.registerNodes === 'function') {
|
|
120
|
+
registry.registerNodes(this);
|
|
121
|
+
} else {
|
|
122
|
+
console.warn(`NodeRegistry: Файл ${file} не экспортирует функцию registerNodes`);
|
|
123
|
+
}
|
|
124
|
+
} catch (error) {
|
|
125
|
+
console.error(`NodeRegistry: Ошибка загрузки реестра из ${file}:`, error.message);
|
|
440
126
|
}
|
|
441
|
-
},
|
|
442
|
-
pins: {
|
|
443
|
-
inputs: [],
|
|
444
|
-
outputs: [
|
|
445
|
-
{ id: 'value', name: 'Значение', type: 'Any' },
|
|
446
|
-
{ id: 'exists', name: 'Существует', type: 'Boolean' }
|
|
447
|
-
]
|
|
448
|
-
}
|
|
449
|
-
});
|
|
450
|
-
|
|
451
|
-
this.registerNodeType({
|
|
452
|
-
type: 'data:get_variable',
|
|
453
|
-
label: '📤 Получить переменную',
|
|
454
|
-
category: 'Данные',
|
|
455
|
-
description: 'Получает значение переменной графа.',
|
|
456
|
-
graphType: all,
|
|
457
|
-
evaluator: require('./nodes/data_get_variable').evaluate,
|
|
458
|
-
pins: {
|
|
459
|
-
inputs: [],
|
|
460
|
-
outputs: [
|
|
461
|
-
{ id: 'value', name: 'Значение', type: 'Wildcard' }
|
|
462
|
-
]
|
|
463
|
-
}
|
|
464
|
-
});
|
|
465
|
-
|
|
466
|
-
this.registerNodeType({
|
|
467
|
-
type: 'data:get_entity_field',
|
|
468
|
-
label: '📦 Получить поле сущности',
|
|
469
|
-
category: 'Данные',
|
|
470
|
-
description: 'Получает определенное поле из объекта сущности (например, "position.x", "username").',
|
|
471
|
-
graphType: all,
|
|
472
|
-
evaluator: require('./nodes/data_get_entity_field').evaluate,
|
|
473
|
-
pins: {
|
|
474
|
-
inputs: [
|
|
475
|
-
{ id: 'entity', name: 'Сущность', type: 'Object', required: true },
|
|
476
|
-
],
|
|
477
|
-
outputs: [
|
|
478
|
-
{ id: 'username', name: 'Никнейм', type: 'String' },
|
|
479
|
-
{ id: 'type', name: 'Тип', type: 'String' },
|
|
480
|
-
{ id: 'position', name: 'Позиция', type: 'Object' },
|
|
481
|
-
{ id: 'isValid', name: 'Валидна', type: 'Boolean' },
|
|
482
|
-
]
|
|
483
|
-
}
|
|
484
|
-
});
|
|
485
|
-
|
|
486
|
-
this.registerNodeType({
|
|
487
|
-
type: 'data:string_literal',
|
|
488
|
-
label: '📜 Строка',
|
|
489
|
-
category: 'Данные',
|
|
490
|
-
description: 'Текстовое значение с поддержкой переменных. Используйте {имя} для вставки значений.',
|
|
491
|
-
graphType: all,
|
|
492
|
-
dynamicPins: true,
|
|
493
|
-
evaluator: require('./nodes/data_string_literal').evaluate,
|
|
494
|
-
pins: {
|
|
495
|
-
inputs: [],
|
|
496
|
-
outputs: [
|
|
497
|
-
{ id: 'value', name: 'Значение', type: 'String' }
|
|
498
|
-
]
|
|
499
|
-
}
|
|
500
|
-
});
|
|
501
|
-
|
|
502
|
-
this.registerNodeType({
|
|
503
|
-
type: 'data:number_literal',
|
|
504
|
-
label: '🔢 Число',
|
|
505
|
-
category: 'Данные',
|
|
506
|
-
description: 'Простое числовое значение.',
|
|
507
|
-
graphType: all,
|
|
508
|
-
evaluator: require('./nodes/data_number_literal').evaluate,
|
|
509
|
-
pins: {
|
|
510
|
-
inputs: [
|
|
511
|
-
{ id: 'value', name: 'Значение', type: 'Number', required: true }
|
|
512
|
-
],
|
|
513
|
-
outputs: [
|
|
514
|
-
{ id: 'value', name: 'Значение', type: 'Number' }
|
|
515
|
-
]
|
|
516
|
-
}
|
|
517
|
-
});
|
|
518
|
-
|
|
519
|
-
this.registerNodeType({
|
|
520
|
-
type: 'data:boolean_literal',
|
|
521
|
-
label: '✔️ Булево',
|
|
522
|
-
category: 'Данные',
|
|
523
|
-
description: 'Значение Истина/Ложь.',
|
|
524
|
-
graphType: all,
|
|
525
|
-
evaluator: require('./nodes/data_boolean_literal').evaluate,
|
|
526
|
-
pins: {
|
|
527
|
-
inputs: [
|
|
528
|
-
{ id: 'value', name: 'Значение', type: 'Boolean', required: true }
|
|
529
|
-
],
|
|
530
|
-
outputs: [
|
|
531
|
-
{ id: 'value', name: 'Значение', type: 'Boolean' }
|
|
532
|
-
]
|
|
533
|
-
}
|
|
534
|
-
});
|
|
535
|
-
|
|
536
|
-
this.registerNodeType({
|
|
537
|
-
type: 'data:array_literal',
|
|
538
|
-
label: '📋 Массив',
|
|
539
|
-
category: 'Массив',
|
|
540
|
-
description: 'Создает массив из элементов.',
|
|
541
|
-
graphType: all,
|
|
542
|
-
dynamicPins: true,
|
|
543
|
-
evaluator: require('./nodes/data_array_literal').evaluate,
|
|
544
|
-
pins: {
|
|
545
|
-
inputs: [],
|
|
546
|
-
outputs: [
|
|
547
|
-
{ id: 'value', name: 'Массив', type: 'Array' }
|
|
548
|
-
]
|
|
549
|
-
}
|
|
550
|
-
});
|
|
551
|
-
|
|
552
|
-
this.registerNodeType({
|
|
553
|
-
type: 'data:make_object',
|
|
554
|
-
label: '🏗️ Собрать объект',
|
|
555
|
-
category: 'Данные',
|
|
556
|
-
description: 'Создает JSON-объект из пар ключ-значение.',
|
|
557
|
-
graphType: all,
|
|
558
|
-
dynamicPins: true,
|
|
559
|
-
evaluator: require('./nodes/data_make_object').evaluate,
|
|
560
|
-
pins: {
|
|
561
|
-
inputs: [],
|
|
562
|
-
outputs: [
|
|
563
|
-
{ id: 'value', name: 'Объект', type: 'Object' }
|
|
564
|
-
]
|
|
565
|
-
}
|
|
566
|
-
});
|
|
567
|
-
|
|
568
|
-
this.registerNodeType({
|
|
569
|
-
type: 'data:cast',
|
|
570
|
-
label: '✨ Приведение типов',
|
|
571
|
-
category: 'Данные',
|
|
572
|
-
description: 'Приводит входящее значение к указанному целевому типу.',
|
|
573
|
-
graphType: all,
|
|
574
|
-
evaluator: require('./nodes/data_cast').evaluate,
|
|
575
|
-
pins: {
|
|
576
|
-
inputs: [
|
|
577
|
-
{ id: 'value', name: 'Значение', type: 'Wildcard', required: true }
|
|
578
|
-
],
|
|
579
|
-
outputs: [
|
|
580
|
-
{ id: 'value', name: 'Значение', type: 'Wildcard' }
|
|
581
|
-
]
|
|
582
|
-
}
|
|
583
|
-
});
|
|
584
|
-
|
|
585
|
-
this.registerNodeType({
|
|
586
|
-
type: 'data:length',
|
|
587
|
-
label: '📏 Размер (длина)',
|
|
588
|
-
category: 'Массив',
|
|
589
|
-
graphType: 'all',
|
|
590
|
-
description: 'Возвращает количество элементов в массиве или длину строки.',
|
|
591
|
-
evaluator: require('./nodes/data_length').evaluate,
|
|
592
|
-
pins: {
|
|
593
|
-
inputs: [
|
|
594
|
-
{ id: 'data', name: 'Массив или Строка', type: 'Any', required: true }
|
|
595
|
-
],
|
|
596
|
-
outputs: [
|
|
597
|
-
{ id: 'length', name: 'Длина', type: 'Number' }
|
|
598
|
-
]
|
|
599
|
-
}
|
|
600
|
-
});
|
|
601
|
-
|
|
602
|
-
this.registerNodeType({
|
|
603
|
-
type: 'string:contains',
|
|
604
|
-
label: '🔍 Строка: Содержит',
|
|
605
|
-
category: 'Строки',
|
|
606
|
-
description: 'Проверяет, содержит ли одна строка другую.',
|
|
607
|
-
graphType: all,
|
|
608
|
-
executor: require('./nodes/string_contains').execute,
|
|
609
|
-
evaluator: require('./nodes/string_contains').evaluate,
|
|
610
|
-
pins: {
|
|
611
|
-
inputs: [
|
|
612
|
-
{ id: 'exec', name: 'Exec', type: 'Exec', required: true },
|
|
613
|
-
{ id: 'haystack', name: 'Строка', type: 'String', required: true },
|
|
614
|
-
{ id: 'needle', name: 'Подстрока', type: 'String', required: true },
|
|
615
|
-
{ id: 'case_sensitive', name: 'Учет регистра', type: 'Boolean', required: false }
|
|
616
|
-
],
|
|
617
|
-
outputs: [
|
|
618
|
-
{ id: 'exec', name: 'Exec', type: 'Exec' },
|
|
619
|
-
{ id: 'result', name: 'Результат', type: 'Boolean' }
|
|
620
|
-
]
|
|
621
|
-
}
|
|
622
|
-
});
|
|
623
|
-
|
|
624
|
-
this.registerNodeType({
|
|
625
|
-
type: 'string:matches',
|
|
626
|
-
label: '🔎 Строка: Совпадает с RegEx',
|
|
627
|
-
category: 'Строки',
|
|
628
|
-
description: 'Проверяет, совпадает ли строка с регулярным выражением.',
|
|
629
|
-
graphType: all,
|
|
630
|
-
executor: require('./nodes/string_matches').execute,
|
|
631
|
-
evaluator: require('./nodes/string_matches').evaluate,
|
|
632
|
-
pins: {
|
|
633
|
-
inputs: [
|
|
634
|
-
{ id: 'exec', name: 'Exec', type: 'Exec', required: true },
|
|
635
|
-
{ id: 'string', name: 'Строка', type: 'String', required: true },
|
|
636
|
-
{ id: 'regex', name: 'RegEx', type: 'String', required: true }
|
|
637
|
-
],
|
|
638
|
-
outputs: [
|
|
639
|
-
{ id: 'exec', name: 'Exec', type: 'Exec' },
|
|
640
|
-
{ id: 'result', name: 'Результат', type: 'Boolean' }
|
|
641
|
-
]
|
|
642
|
-
}
|
|
643
|
-
});
|
|
644
|
-
|
|
645
|
-
this.registerNodeType({
|
|
646
|
-
type: 'string:equals',
|
|
647
|
-
label: 'Строка: Равно',
|
|
648
|
-
category: 'Строки',
|
|
649
|
-
description: 'Проверяет, равны ли строки (с учетом/без учета регистра).',
|
|
650
|
-
graphType: all,
|
|
651
|
-
executor: require('./nodes/string_equals').execute,
|
|
652
|
-
evaluator: require('./nodes/string_equals').evaluate,
|
|
653
|
-
pins: {
|
|
654
|
-
inputs: [
|
|
655
|
-
{ id: 'exec', name: 'Exec', type: 'Exec', required: true },
|
|
656
|
-
{ id: 'a', name: 'A', type: 'String', required: true },
|
|
657
|
-
{ id: 'b', name: 'B', type: 'String', required: true },
|
|
658
|
-
{ id: 'case_sensitive', name: 'Учет регистра', type: 'Boolean', required: false }
|
|
659
|
-
],
|
|
660
|
-
outputs: [
|
|
661
|
-
{ id: 'exec', name: 'Exec', type: 'Exec' },
|
|
662
|
-
{ id: 'result', name: 'Результат', type: 'Boolean' }
|
|
663
|
-
]
|
|
664
|
-
}
|
|
665
|
-
});
|
|
666
|
-
|
|
667
|
-
this.registerNodeType({
|
|
668
|
-
type: 'string:starts_with',
|
|
669
|
-
label: 'Строка: Начинается с',
|
|
670
|
-
category: 'Строки',
|
|
671
|
-
description: 'Проверяет, начинается ли строка с указанной подстроки.',
|
|
672
|
-
graphType: all,
|
|
673
|
-
executor: require('./nodes/string_starts_with').execute,
|
|
674
|
-
evaluator: require('./nodes/string_starts_with').evaluate,
|
|
675
|
-
pins: {
|
|
676
|
-
inputs: [
|
|
677
|
-
{ id: 'exec', name: 'Exec', type: 'Exec', required: true },
|
|
678
|
-
{ id: 'string', name: 'Строка', type: 'String', required: true },
|
|
679
|
-
{ id: 'prefix', name: 'Префикс', type: 'String', required: true },
|
|
680
|
-
{ id: 'case_sensitive', name: 'Учет регистра', type: 'Boolean', required: false }
|
|
681
|
-
],
|
|
682
|
-
outputs: [
|
|
683
|
-
{ id: 'exec', name: 'Exec', type: 'Exec' },
|
|
684
|
-
{ id: 'result', name: 'Результат', type: 'Boolean' }
|
|
685
|
-
]
|
|
686
127
|
}
|
|
687
|
-
});
|
|
688
128
|
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
description: 'Проверяет, заканчивается ли строка указанной подстрокой.',
|
|
694
|
-
graphType: all,
|
|
695
|
-
executor: require('./nodes/string_ends_with').execute,
|
|
696
|
-
evaluator: require('./nodes/string_ends_with').evaluate,
|
|
697
|
-
pins: {
|
|
698
|
-
inputs: [
|
|
699
|
-
{ id: 'exec', name: 'Exec', type: 'Exec', required: true },
|
|
700
|
-
{ id: 'string', name: 'Строка', type: 'String', required: true },
|
|
701
|
-
{ id: 'suffix', name: 'Суффикс', type: 'String', required: true },
|
|
702
|
-
{ id: 'case_sensitive', name: 'Учет регистра', type: 'Boolean', required: false }
|
|
703
|
-
],
|
|
704
|
-
outputs: [
|
|
705
|
-
{ id: 'exec', name: 'Exec', type: 'Exec' },
|
|
706
|
-
{ id: 'result', name: 'Результат', type: 'Boolean' }
|
|
707
|
-
]
|
|
708
|
-
}
|
|
709
|
-
});
|
|
710
|
-
|
|
711
|
-
this.registerNodeType({
|
|
712
|
-
type: 'string:length',
|
|
713
|
-
label: 'Строка: Длина',
|
|
714
|
-
category: 'Строки',
|
|
715
|
-
description: 'Возвращает количество символов в строке.',
|
|
716
|
-
graphType: all,
|
|
717
|
-
executor: require('./nodes/string_length').execute,
|
|
718
|
-
evaluator: require('./nodes/string_length').evaluate,
|
|
719
|
-
pins: {
|
|
720
|
-
inputs: [
|
|
721
|
-
{ id: 'exec', name: 'Exec', type: 'Exec', required: true },
|
|
722
|
-
{ id: 'string', name: 'Строка', type: 'String', required: true }
|
|
723
|
-
],
|
|
724
|
-
outputs: [
|
|
725
|
-
{ id: 'exec', name: 'Exec', type: 'Exec' },
|
|
726
|
-
{ id: 'length', name: 'Длина', type: 'Number' }
|
|
727
|
-
]
|
|
728
|
-
}
|
|
729
|
-
});
|
|
730
|
-
|
|
731
|
-
this.registerNodeType({
|
|
732
|
-
type: 'string:split',
|
|
733
|
-
label: 'Строка: Разделить',
|
|
734
|
-
category: 'Строки',
|
|
735
|
-
description: 'Разделяет строку на массив подстрок по разделителю.',
|
|
736
|
-
graphType: all,
|
|
737
|
-
executor: require('./nodes/string_split').execute,
|
|
738
|
-
evaluator: require('./nodes/string_split').evaluate,
|
|
739
|
-
pins: {
|
|
740
|
-
inputs: [
|
|
741
|
-
{ id: 'exec', name: 'Exec', type: 'Exec', required: true },
|
|
742
|
-
{ id: 'string', name: 'Строка', type: 'String', required: true },
|
|
743
|
-
{ id: 'separator', name: 'Разделитель', type: 'String', required: true }
|
|
744
|
-
],
|
|
745
|
-
outputs: [
|
|
746
|
-
{ id: 'exec', name: 'Exec', type: 'Exec' },
|
|
747
|
-
{ id: 'array', name: 'Массив', type: 'Array' }
|
|
748
|
-
]
|
|
749
|
-
}
|
|
750
|
-
});
|
|
751
|
-
|
|
752
|
-
this.registerNodeType({
|
|
753
|
-
type: 'string:concat',
|
|
754
|
-
label: 'Строка: Объединить',
|
|
755
|
-
category: 'Строки',
|
|
756
|
-
description: 'Объединяет две или более строки в одну.',
|
|
757
|
-
graphType: all,
|
|
758
|
-
dynamicPins: true,
|
|
759
|
-
evaluator: require('./nodes/string_concat').evaluate,
|
|
760
|
-
pins: {
|
|
761
|
-
inputs: [],
|
|
762
|
-
outputs: [
|
|
763
|
-
{ id: 'result', name: 'Результат', type: 'String' }
|
|
764
|
-
]
|
|
765
|
-
}
|
|
766
|
-
});
|
|
767
|
-
|
|
768
|
-
this.registerNodeType({
|
|
769
|
-
type: 'math:operation',
|
|
770
|
-
label: '🔢 Математика',
|
|
771
|
-
category: 'Математика',
|
|
772
|
-
description: 'Выполняет математическую операцию над двумя числами.',
|
|
773
|
-
graphType: all,
|
|
774
|
-
evaluator: require('./nodes/math_operation').evaluate,
|
|
775
|
-
pins: {
|
|
776
|
-
inputs: [
|
|
777
|
-
{ id: 'a', name: 'A', type: 'Number', required: true },
|
|
778
|
-
{ id: 'b', name: 'B', type: 'Number', required: true }
|
|
779
|
-
],
|
|
780
|
-
outputs: [
|
|
781
|
-
{ id: 'result', name: 'Результат', type: 'Number' }
|
|
782
|
-
]
|
|
783
|
-
}
|
|
784
|
-
});
|
|
785
|
-
|
|
786
|
-
this.registerNodeType({
|
|
787
|
-
type: 'logic:operation',
|
|
788
|
-
label: '💡 Логика',
|
|
789
|
-
category: 'Логика',
|
|
790
|
-
description: 'Выполняет логическую операцию. Для НЕ (NOT) используется только вход А.',
|
|
791
|
-
graphType: all,
|
|
792
|
-
dynamicPins: true,
|
|
793
|
-
evaluator: require('./nodes/logic_operation').evaluate,
|
|
794
|
-
pins: {
|
|
795
|
-
inputs: [
|
|
796
|
-
{ id: 'a', name: 'A', type: 'Boolean', required: true },
|
|
797
|
-
{ id: 'b', name: 'B', type: 'Boolean', required: true }
|
|
798
|
-
],
|
|
799
|
-
outputs: [
|
|
800
|
-
{ id: 'result', name: 'Результат', type: 'Boolean' }
|
|
801
|
-
]
|
|
802
|
-
}
|
|
803
|
-
});
|
|
804
|
-
|
|
805
|
-
this.registerNodeType({
|
|
806
|
-
type: 'debug:log',
|
|
807
|
-
label: '🐞 Отладка (консоль)',
|
|
808
|
-
category: 'Отладка',
|
|
809
|
-
description: 'Выводит значение в консоль терминала, где запущен бот.',
|
|
810
|
-
graphType: all,
|
|
811
|
-
executor: require('./nodes/debug_log').execute,
|
|
812
|
-
pins: {
|
|
813
|
-
inputs: [
|
|
814
|
-
{ id: 'exec', name: 'Exec', type: 'Exec' },
|
|
815
|
-
{ id: 'value', name: 'Значение', type: 'Wildcard', required: true }
|
|
816
|
-
],
|
|
817
|
-
outputs: [
|
|
818
|
-
{ id: 'exec', name: 'Exec', type: 'Exec' }
|
|
819
|
-
]
|
|
820
|
-
}
|
|
821
|
-
});
|
|
822
|
-
|
|
823
|
-
this.registerNodeType({
|
|
824
|
-
type: 'math:random_number',
|
|
825
|
-
label: '🎲 Случайное число',
|
|
826
|
-
category: 'Математика',
|
|
827
|
-
graphType: 'all',
|
|
828
|
-
description: 'Генерирует случайное число в заданном диапазоне.',
|
|
829
|
-
evaluator: require('./nodes/math_random_number').evaluate,
|
|
830
|
-
pins: {
|
|
831
|
-
inputs: [
|
|
832
|
-
{ id: 'min', name: 'Мин', type: 'Number' },
|
|
833
|
-
{ id: 'max', name: 'Макс', type: 'Number' }
|
|
834
|
-
],
|
|
835
|
-
outputs: [{ id: 'result', name: 'Результат', type: 'Number' }]
|
|
836
|
-
}
|
|
837
|
-
});
|
|
838
|
-
|
|
839
|
-
this.registerNodeType({
|
|
840
|
-
type: 'array:get_random_element',
|
|
841
|
-
label: '🎲 Случайный элемент',
|
|
842
|
-
category: 'Массив',
|
|
843
|
-
graphType: 'all',
|
|
844
|
-
description: 'Возвращает случайный элемент из массива и его индекс.',
|
|
845
|
-
evaluator: require('./nodes/array_get_random_element').evaluate,
|
|
846
|
-
pins: {
|
|
847
|
-
inputs: [
|
|
848
|
-
{ id: 'array', name: 'Массив', type: 'Array', required: true }
|
|
849
|
-
],
|
|
850
|
-
outputs: [
|
|
851
|
-
{ id: 'element', name: 'Элемент', type: 'Any' },
|
|
852
|
-
{ id: 'index', name: 'Индекс', type: 'Number' }
|
|
853
|
-
]
|
|
854
|
-
}
|
|
855
|
-
});
|
|
856
|
-
|
|
857
|
-
this.registerNodeType({
|
|
858
|
-
type: 'array:contains',
|
|
859
|
-
label: '🔍 Массив: Содержит',
|
|
860
|
-
category: 'Массив',
|
|
861
|
-
description: 'Проверяет, содержит ли массив указанный элемент и возвращает его индекс.',
|
|
862
|
-
graphType: all,
|
|
863
|
-
evaluator: require('./nodes/array_contains').evaluate,
|
|
864
|
-
pins: {
|
|
865
|
-
inputs: [
|
|
866
|
-
{ id: 'array', name: 'Массив', type: 'Array', required: true },
|
|
867
|
-
{ id: 'element', name: 'Элемент', type: 'Wildcard', required: true }
|
|
868
|
-
],
|
|
869
|
-
outputs: [
|
|
870
|
-
{ id: 'result', name: 'Найден', type: 'Boolean' },
|
|
871
|
-
{ id: 'index', name: 'Индекс', type: 'Number' }
|
|
872
|
-
]
|
|
873
|
-
}
|
|
874
|
-
});
|
|
875
|
-
|
|
876
|
-
this.registerNodeType({
|
|
877
|
-
type: 'array:get_by_index',
|
|
878
|
-
label: '📦 Элемент по индексу',
|
|
879
|
-
category: 'Массив',
|
|
880
|
-
description: 'Получает элемент массива по его индексу.',
|
|
881
|
-
graphType: all,
|
|
882
|
-
evaluator: require('./nodes/array_get_by_index').evaluate,
|
|
883
|
-
pins: {
|
|
884
|
-
inputs: [
|
|
885
|
-
{ id: 'array', name: 'Массив', type: 'Array', required: true },
|
|
886
|
-
{ id: 'index', name: 'Индекс', type: 'Number', required: true }
|
|
887
|
-
],
|
|
888
|
-
outputs: [
|
|
889
|
-
{ id: 'element', name: 'Элемент', type: 'Any' }
|
|
890
|
-
]
|
|
891
|
-
}
|
|
892
|
-
});
|
|
893
|
-
|
|
894
|
-
this.registerNodeType({
|
|
895
|
-
type: 'array:add_element',
|
|
896
|
-
label: '➕ Добавить элемент',
|
|
897
|
-
category: 'Массив',
|
|
898
|
-
description: 'Добавляет элемент в конец массива.',
|
|
899
|
-
graphType: all,
|
|
900
|
-
evaluator: require('./nodes/array_add_element').evaluate,
|
|
901
|
-
pins: {
|
|
902
|
-
inputs: [
|
|
903
|
-
{ id: 'array', name: 'Массив', type: 'Array', required: true },
|
|
904
|
-
{ id: 'element', name: 'Элемент', type: 'Wildcard', required: true }
|
|
905
|
-
],
|
|
906
|
-
outputs: [
|
|
907
|
-
{ id: 'result', name: 'Новый массив', type: 'Array' }
|
|
908
|
-
]
|
|
909
|
-
}
|
|
910
|
-
});
|
|
911
|
-
|
|
912
|
-
this.registerNodeType({
|
|
913
|
-
type: 'array:remove_by_index',
|
|
914
|
-
label: '➖ Удалить по индексу',
|
|
915
|
-
category: 'Массив',
|
|
916
|
-
description: 'Удаляет элемент из массива по его индексу.',
|
|
917
|
-
graphType: all,
|
|
918
|
-
evaluator: require('./nodes/array_remove_by_index').evaluate,
|
|
919
|
-
pins: {
|
|
920
|
-
inputs: [
|
|
921
|
-
{ id: 'array', name: 'Массив', type: 'Array', required: true },
|
|
922
|
-
{ id: 'index', name: 'Индекс', type: 'Number', required: true }
|
|
923
|
-
],
|
|
924
|
-
outputs: [
|
|
925
|
-
{ id: 'result', name: 'Новый массив', type: 'Array' }
|
|
926
|
-
]
|
|
927
|
-
}
|
|
928
|
-
});
|
|
929
|
-
|
|
930
|
-
this.registerNodeType({
|
|
931
|
-
type: 'array:find_index',
|
|
932
|
-
label: '🔍 Найти индекс',
|
|
933
|
-
category: 'Массив',
|
|
934
|
-
description: 'Находит индекс элемента в массиве (или -1 если не найден).',
|
|
935
|
-
graphType: all,
|
|
936
|
-
evaluator: require('./nodes/array_find_index').evaluate,
|
|
937
|
-
pins: {
|
|
938
|
-
inputs: [
|
|
939
|
-
{ id: 'array', name: 'Массив', type: 'Array', required: true },
|
|
940
|
-
{ id: 'element', name: 'Элемент', type: 'Wildcard', required: true }
|
|
941
|
-
],
|
|
942
|
-
outputs: [
|
|
943
|
-
{ id: 'index', name: 'Индекс', type: 'Number' }
|
|
944
|
-
]
|
|
945
|
-
}
|
|
946
|
-
});
|
|
947
|
-
|
|
948
|
-
this.registerNodeType({
|
|
949
|
-
type: 'object:create',
|
|
950
|
-
label: '🏗️ Создать объект',
|
|
951
|
-
category: 'Объект',
|
|
952
|
-
description: 'Создает объект из пар ключ-значение.',
|
|
953
|
-
graphType: all,
|
|
954
|
-
dynamicPins: true,
|
|
955
|
-
evaluator: require('./nodes/object_create').evaluate,
|
|
956
|
-
pins: {
|
|
957
|
-
inputs: [],
|
|
958
|
-
outputs: [
|
|
959
|
-
{ id: 'object', name: 'Объект', type: 'Object' }
|
|
960
|
-
]
|
|
961
|
-
}
|
|
962
|
-
});
|
|
963
|
-
|
|
964
|
-
this.registerNodeType({
|
|
965
|
-
type: 'object:get',
|
|
966
|
-
label: '📤 Получить значение',
|
|
967
|
-
category: 'Объект',
|
|
968
|
-
description: 'Получает значение по ключу из объекта.',
|
|
969
|
-
graphType: all,
|
|
970
|
-
evaluator: require('./nodes/object_get').evaluate,
|
|
971
|
-
pins: {
|
|
972
|
-
inputs: [
|
|
973
|
-
{ id: 'object', name: 'Объект', type: 'Object', required: true },
|
|
974
|
-
{ id: 'key', name: 'Ключ', type: 'String', required: true }
|
|
975
|
-
],
|
|
976
|
-
outputs: [
|
|
977
|
-
{ id: 'value', name: 'Значение', type: 'Any' }
|
|
978
|
-
]
|
|
979
|
-
}
|
|
980
|
-
});
|
|
981
|
-
|
|
982
|
-
this.registerNodeType({
|
|
983
|
-
type: 'object:set',
|
|
984
|
-
label: '➕ Добавить/Изменить ключ',
|
|
985
|
-
category: 'Объект',
|
|
986
|
-
description: 'Добавляет или изменяет значение по ключу в объекте.',
|
|
987
|
-
graphType: all,
|
|
988
|
-
evaluator: require('./nodes/object_set').evaluate,
|
|
989
|
-
pins: {
|
|
990
|
-
inputs: [
|
|
991
|
-
{ id: 'object', name: 'Объект', type: 'Object', required: true },
|
|
992
|
-
{ id: 'key', name: 'Ключ', type: 'String', required: true },
|
|
993
|
-
{ id: 'value', name: 'Значение', type: 'Any', required: true }
|
|
994
|
-
],
|
|
995
|
-
outputs: [
|
|
996
|
-
{ id: 'new_object', name: 'Новый объект', type: 'Object' }
|
|
997
|
-
]
|
|
998
|
-
}
|
|
999
|
-
});
|
|
1000
|
-
|
|
1001
|
-
this.registerNodeType({
|
|
1002
|
-
type: 'object:delete',
|
|
1003
|
-
label: '➖ Удалить ключ',
|
|
1004
|
-
category: 'Объект',
|
|
1005
|
-
description: 'Удаляет ключ из объекта.',
|
|
1006
|
-
graphType: all,
|
|
1007
|
-
evaluator: require('./nodes/object_delete').evaluate,
|
|
1008
|
-
pins: {
|
|
1009
|
-
inputs: [
|
|
1010
|
-
{ id: 'object', name: 'Объект', type: 'Object', required: true },
|
|
1011
|
-
{ id: 'key', name: 'Ключ', type: 'String', required: true }
|
|
1012
|
-
],
|
|
1013
|
-
outputs: [
|
|
1014
|
-
{ id: 'new_object', name: 'Новый объект', type: 'Object' }
|
|
1015
|
-
]
|
|
1016
|
-
}
|
|
1017
|
-
});
|
|
1018
|
-
|
|
1019
|
-
this.registerNodeType({
|
|
1020
|
-
type: 'object:has_key',
|
|
1021
|
-
label: '🔍 Проверить ключ',
|
|
1022
|
-
category: 'Объект',
|
|
1023
|
-
description: 'Проверяет наличие ключа в объекте и возвращает значение.',
|
|
1024
|
-
graphType: all,
|
|
1025
|
-
evaluator: require('./nodes/object_has_key').evaluate,
|
|
1026
|
-
pins: {
|
|
1027
|
-
inputs: [
|
|
1028
|
-
{ id: 'object', name: 'Объект', type: 'Object', required: true },
|
|
1029
|
-
{ id: 'key', name: 'Ключ', type: 'String', required: true }
|
|
1030
|
-
],
|
|
1031
|
-
outputs: [
|
|
1032
|
-
{ id: 'result', name: 'Найден', type: 'Boolean' },
|
|
1033
|
-
{ id: 'value', name: 'Значение', type: 'Any' }
|
|
1034
|
-
]
|
|
1035
|
-
}
|
|
1036
|
-
});
|
|
1037
|
-
|
|
1038
|
-
this.registerNodeType({
|
|
1039
|
-
type: 'data:get_server_players',
|
|
1040
|
-
label: '👥 Список игроков',
|
|
1041
|
-
category: 'Данные',
|
|
1042
|
-
graphType: 'all',
|
|
1043
|
-
description: 'Возвращает массив с именами всех игроков на сервере.',
|
|
1044
|
-
evaluator: require('./nodes/data_get_server_players').evaluate,
|
|
1045
|
-
pins: {
|
|
1046
|
-
inputs: [],
|
|
1047
|
-
outputs: [
|
|
1048
|
-
{ id: 'players', name: 'Игроки', type: 'Array' }
|
|
1049
|
-
]
|
|
1050
|
-
}
|
|
1051
|
-
});
|
|
1052
|
-
|
|
1053
|
-
this.registerNodeType({
|
|
1054
|
-
type: 'logic:compare',
|
|
1055
|
-
label: '⎗ Сравнение',
|
|
1056
|
-
category: 'Логика',
|
|
1057
|
-
description: 'Сравнивает два значения.',
|
|
1058
|
-
graphType: all,
|
|
1059
|
-
evaluator: require('./nodes/logic_compare').evaluate,
|
|
1060
|
-
pins: {
|
|
1061
|
-
inputs: [
|
|
1062
|
-
{ id: 'a', name: 'A', type: 'Wildcard' },
|
|
1063
|
-
{ id: 'b', name: 'B', type: 'Wildcard' }
|
|
1064
|
-
],
|
|
1065
|
-
outputs: [
|
|
1066
|
-
{ id: 'result', name: 'Результат', type: 'Boolean' }
|
|
1067
|
-
]
|
|
1068
|
-
}
|
|
1069
|
-
});
|
|
1070
|
-
|
|
1071
|
-
this.registerNodeType({
|
|
1072
|
-
type: 'bot:get_position',
|
|
1073
|
-
label: '🤖 Позиция бота',
|
|
1074
|
-
category: 'Бот',
|
|
1075
|
-
description: 'Возвращает текущую позицию бота в мире.',
|
|
1076
|
-
graphType: all,
|
|
1077
|
-
evaluator: require('./nodes/bot_get_position').evaluate,
|
|
1078
|
-
pins: {
|
|
1079
|
-
inputs: [],
|
|
1080
|
-
outputs: [
|
|
1081
|
-
{ id: 'position', name: 'Позиция', type: 'Object' }
|
|
1082
|
-
]
|
|
1083
|
-
}
|
|
1084
|
-
});
|
|
1085
|
-
|
|
1086
|
-
// Пользователи
|
|
1087
|
-
this.registerNodeType({
|
|
1088
|
-
type: 'user:check_blacklist',
|
|
1089
|
-
label: '❓ В черном списке?',
|
|
1090
|
-
category: 'Пользователи',
|
|
1091
|
-
description: 'Проверяет, находится ли пользователь в черном списке.',
|
|
1092
|
-
graphType: all,
|
|
1093
|
-
evaluator: require('./nodes/user_check_blacklist').evaluate,
|
|
1094
|
-
pins: {
|
|
1095
|
-
inputs: [
|
|
1096
|
-
{ id: 'user', name: 'Пользователь', type: 'User', required: true }
|
|
1097
|
-
],
|
|
1098
|
-
outputs: [
|
|
1099
|
-
{ id: 'is_blacklisted', name: 'В ЧС', type: 'Boolean' }
|
|
1100
|
-
]
|
|
1101
|
-
}
|
|
1102
|
-
});
|
|
1103
|
-
|
|
1104
|
-
this.registerNodeType({
|
|
1105
|
-
type: 'user:set_blacklist',
|
|
1106
|
-
label: '🚫 Установить ЧС',
|
|
1107
|
-
category: 'Пользователи',
|
|
1108
|
-
description: 'Добавляет или убирает пользователя из черного списка.',
|
|
1109
|
-
graphType: all,
|
|
1110
|
-
executor: require('./nodes/user_set_blacklist').execute,
|
|
1111
|
-
pins: {
|
|
1112
|
-
inputs: [
|
|
1113
|
-
{ id: 'exec', name: 'Выполнить', type: 'Exec', required: true },
|
|
1114
|
-
{ id: 'user', name: 'Пользователь', type: 'User', required: true },
|
|
1115
|
-
{ id: 'blacklist_status', name: 'Статус ЧС', type: 'Boolean', required: true }
|
|
1116
|
-
],
|
|
1117
|
-
outputs: [
|
|
1118
|
-
{ id: 'exec', name: 'Далее', type: 'Exec' },
|
|
1119
|
-
{ id: 'updated_user', name: 'Обновленный пользователь', type: 'User' }
|
|
1120
|
-
]
|
|
1121
|
-
}
|
|
1122
|
-
});
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
this.registerNodeType({
|
|
1126
|
-
type: 'user:get_groups',
|
|
1127
|
-
label: '👥 Получить группы',
|
|
1128
|
-
category: 'Пользователь',
|
|
1129
|
-
description: 'Возвращает массив названий групп, в которых состоит пользователь.',
|
|
1130
|
-
graphType: all,
|
|
1131
|
-
evaluator: require('./nodes/user_get_groups').evaluate,
|
|
1132
|
-
pins: {
|
|
1133
|
-
inputs: [
|
|
1134
|
-
{ id: 'user', name: 'Пользователь', type: 'User', required: true }
|
|
1135
|
-
],
|
|
1136
|
-
outputs: [
|
|
1137
|
-
{ id: 'groups', name: 'Группы', type: 'Array' }
|
|
1138
|
-
]
|
|
1139
|
-
}
|
|
1140
|
-
});
|
|
1141
|
-
|
|
1142
|
-
this.registerNodeType({
|
|
1143
|
-
type: 'user:get_permissions',
|
|
1144
|
-
label: '🔑 Получить права',
|
|
1145
|
-
category: 'Пользователь',
|
|
1146
|
-
description: 'Возвращает массив прав пользователя.',
|
|
1147
|
-
graphType: all,
|
|
1148
|
-
evaluator: require('./nodes/user_get_permissions').evaluate,
|
|
1149
|
-
pins: {
|
|
1150
|
-
inputs: [
|
|
1151
|
-
{ id: 'user', name: 'Пользователь', type: 'User', required: true }
|
|
1152
|
-
],
|
|
1153
|
-
outputs: [
|
|
1154
|
-
{ id: 'permissions', name: 'Права', type: 'Array' }
|
|
1155
|
-
]
|
|
1156
|
-
}
|
|
1157
|
-
});
|
|
1158
|
-
|
|
1159
|
-
this.registerNodeType({
|
|
1160
|
-
type: 'data:get_user_field',
|
|
1161
|
-
label: '👤 Данные пользователя',
|
|
1162
|
-
category: 'Данные',
|
|
1163
|
-
description: 'Получает различные данные из объекта пользователя.',
|
|
1164
|
-
graphType: all,
|
|
1165
|
-
evaluator: require('./nodes/data_get_user_field').evaluate,
|
|
1166
|
-
pins: {
|
|
1167
|
-
inputs: [
|
|
1168
|
-
{ id: 'user', name: 'Пользователь', type: 'User', required: true }
|
|
1169
|
-
],
|
|
1170
|
-
outputs: [
|
|
1171
|
-
{ id: 'username', name: 'Никнейм', type: 'String' },
|
|
1172
|
-
{ id: 'groups', name: 'Группы', type: 'Array' },
|
|
1173
|
-
{ id: 'permissions', name: 'Права', type: 'Array' },
|
|
1174
|
-
{ id: 'isBlacklisted', name: 'В черном списке', type: 'Boolean' },
|
|
1175
|
-
]
|
|
1176
|
-
}
|
|
1177
|
-
});
|
|
1178
|
-
|
|
1179
|
-
this.registerNodeType({
|
|
1180
|
-
type: 'event:botDied',
|
|
1181
|
-
label: '💀 Бот умер',
|
|
1182
|
-
category: 'События',
|
|
1183
|
-
description: 'Срабатывает, когда бот умирает.',
|
|
1184
|
-
graphType: event,
|
|
1185
|
-
pins: {
|
|
1186
|
-
inputs: [],
|
|
1187
|
-
outputs: [
|
|
1188
|
-
{ id: 'exec', name: 'Выполнить', type: 'Exec' },
|
|
1189
|
-
]
|
|
1190
|
-
}
|
|
1191
|
-
});
|
|
1192
|
-
|
|
1193
|
-
this.registerNodeType({
|
|
1194
|
-
type: 'event:health',
|
|
1195
|
-
label: '❤️ Здоровье/Голод изменилось',
|
|
1196
|
-
category: 'События',
|
|
1197
|
-
description: 'Срабатывает при изменении здоровья, голода или насыщения бота.',
|
|
1198
|
-
graphType: event,
|
|
1199
|
-
pins: {
|
|
1200
|
-
inputs: [],
|
|
1201
|
-
outputs: [
|
|
1202
|
-
{ id: 'exec', name: 'Выполнить', type: 'Exec' },
|
|
1203
|
-
{ id: 'health', name: 'Здоровье', type: 'Number' },
|
|
1204
|
-
{ id: 'food', name: 'Голод', type: 'Number' },
|
|
1205
|
-
{ id: 'saturation', name: 'Насыщение', type: 'Number' }
|
|
1206
|
-
]
|
|
1207
|
-
}
|
|
1208
|
-
});
|
|
1209
|
-
|
|
1210
|
-
this.registerNodeType({
|
|
1211
|
-
type: 'flow:switch',
|
|
1212
|
-
label: '🔄 Switch (свитч)',
|
|
1213
|
-
category: 'Поток',
|
|
1214
|
-
description: 'Выполняет разные действия в зависимости от значения. Автоматически определяет тип сравнения.',
|
|
1215
|
-
graphType: all,
|
|
1216
|
-
dynamicPins: true,
|
|
1217
|
-
executor: require('./nodes/flow_switch').execute,
|
|
1218
|
-
pins: {
|
|
1219
|
-
inputs: [
|
|
1220
|
-
{ id: 'exec', name: 'Выполнить', type: 'Exec', required: true },
|
|
1221
|
-
{ id: 'value', name: 'Значение', type: 'Wildcard', required: true }
|
|
1222
|
-
],
|
|
1223
|
-
outputs: [
|
|
1224
|
-
{ id: 'default', name: 'Default', type: 'Exec' }
|
|
1225
|
-
]
|
|
1226
|
-
}
|
|
1227
|
-
});
|
|
1228
|
-
|
|
1229
|
-
console.log(`NodeRegistry: Registered ${this.nodes.size} base nodes`);
|
|
129
|
+
console.log(`NodeRegistry: Registered ${this.nodes.size} base nodes from ${files.length} registries`);
|
|
130
|
+
} catch (error) {
|
|
131
|
+
console.error('NodeRegistry: Ошибка чтения директории node-registries:', error.message);
|
|
132
|
+
}
|
|
1230
133
|
}
|
|
1231
134
|
|
|
1232
135
|
getNodesByTypes(types) {
|