blockmine 1.20.0 → 1.22.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 +55 -0
- package/.claude/settings.local.json +28 -3
- 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 +90 -39
- package/README.md +94 -0
- package/backend/docs/SECRETS_DOCUMENTATION.md +327 -0
- package/backend/jest.config.js +59 -0
- package/backend/package-lock.json +6129 -0
- package/backend/package.json +16 -4
- package/backend/prisma/migrations/20251026104609_add_websocket_api/migration.sql +33 -0
- package/backend/prisma/schema.prisma +33 -0
- 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 +411 -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/api/routes/apiKeys.js +181 -0
- package/backend/src/api/routes/bots.js +49 -7
- package/backend/src/api/routes/plugins.js +2 -1
- package/backend/src/api/routes/system.js +174 -0
- package/backend/src/container.js +82 -0
- package/backend/src/core/BotManager.js +142 -871
- package/backend/src/core/BotManager.old.js +1093 -0
- package/backend/src/core/BotProcess.js +1092 -850
- package/backend/src/core/BreakLoopSignal.js +8 -0
- package/backend/src/core/EventGraphManager.js +280 -193
- package/backend/src/core/GraphExecutionEngine.js +321 -928
- package/backend/src/core/MessageQueue.js +27 -6
- package/backend/src/core/NodeRegistry.js +37 -991
- package/backend/src/core/PluginManager.js +62 -12
- package/backend/src/core/PrismaService.js +32 -0
- 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 +132 -0
- package/backend/src/core/node-registries/arrays.js +137 -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 +187 -0
- package/backend/src/core/node-registries/flow.js +139 -0
- package/backend/src/core/node-registries/logic.js +45 -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 +153 -0
- package/backend/src/core/node-registries/time.js +113 -0
- package/backend/src/core/node-registries/users.js +79 -0
- package/backend/src/core/nodes/actions/bot_look_at.js +36 -0
- package/backend/src/core/nodes/actions/bot_set_variable.js +32 -0
- package/backend/src/core/nodes/actions/http_request.js +98 -0
- package/backend/src/core/nodes/actions/send_log.js +28 -0
- package/backend/src/core/nodes/actions/send_message.js +32 -0
- package/backend/src/core/nodes/actions/send_websocket_response.js +33 -0
- package/backend/src/core/nodes/arrays/add_element.js +23 -0
- package/backend/src/core/nodes/arrays/contains.js +40 -0
- package/backend/src/core/nodes/arrays/find_index.js +23 -0
- package/backend/src/core/nodes/arrays/get_by_index.js +23 -0
- package/backend/src/core/nodes/arrays/get_next.js +35 -0
- package/backend/src/core/nodes/arrays/get_random_element.js +32 -0
- package/backend/src/core/nodes/arrays/remove_by_index.js +30 -0
- package/backend/src/core/nodes/bot/get_position.js +20 -0
- package/backend/src/core/nodes/data/array_literal.js +31 -0
- package/backend/src/core/nodes/data/boolean_literal.js +21 -0
- package/backend/src/core/nodes/data/cast.js +42 -0
- 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_argument.js +23 -0
- package/backend/src/core/nodes/data/get_bot_look.js +14 -0
- package/backend/src/core/nodes/data/get_entity_field.js +18 -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_server_players.js +18 -0
- package/backend/src/core/nodes/data/get_user_field.js +40 -0
- package/backend/src/core/nodes/data/get_variable.js +23 -0
- package/backend/src/core/nodes/data/length.js +25 -0
- package/backend/src/core/nodes/data/make_object.js +31 -0
- package/backend/src/core/nodes/data/number_literal.js +21 -0
- package/backend/src/core/nodes/data/string_literal.js +34 -0
- package/backend/src/core/nodes/data/type_check.js +53 -0
- package/backend/src/core/nodes/debug/log.js +16 -0
- package/backend/src/core/nodes/flow/branch.js +15 -0
- package/backend/src/core/nodes/flow/break.js +14 -0
- package/backend/src/core/nodes/flow/delay.js +43 -0
- package/backend/src/core/nodes/flow/for_each.js +39 -0
- package/backend/src/core/nodes/flow/sequence.js +16 -0
- package/backend/src/core/nodes/flow/switch.js +47 -0
- package/backend/src/core/nodes/flow/while.js +64 -0
- package/backend/src/core/nodes/logic/__tests__/compare.test.js +83 -0
- package/backend/src/core/nodes/logic/compare.js +33 -0
- package/backend/src/core/nodes/logic/operation.js +35 -0
- package/backend/src/core/nodes/math/__tests__/operation.test.js +65 -0
- package/backend/src/core/nodes/math/operation.js +31 -0
- package/backend/src/core/nodes/math/random_number.js +43 -0
- package/backend/src/core/nodes/objects/create.js +40 -0
- package/backend/src/core/nodes/objects/delete.js +26 -0
- package/backend/src/core/nodes/objects/get.js +23 -0
- package/backend/src/core/nodes/objects/has_key.js +30 -0
- package/backend/src/core/nodes/objects/set.js +27 -0
- package/backend/src/core/nodes/strings/__tests__/concat.test.js +89 -0
- package/backend/src/core/nodes/strings/concat.js +27 -0
- package/backend/src/core/nodes/strings/contains.js +41 -0
- package/backend/src/core/nodes/strings/ends_with.js +43 -0
- package/backend/src/core/nodes/strings/equals.js +36 -0
- package/backend/src/core/nodes/strings/length.js +36 -0
- package/backend/src/core/nodes/strings/matches.js +39 -0
- package/backend/src/core/nodes/strings/split.js +37 -0
- package/backend/src/core/nodes/strings/starts_with.js +43 -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/users/check_blacklist.js +37 -0
- package/backend/src/core/nodes/users/get_groups.js +36 -0
- package/backend/src/core/nodes/users/get_permissions.js +36 -0
- package/backend/src/core/nodes/users/set_blacklist.js +37 -0
- package/backend/src/core/services/BotLifecycleService.js +596 -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 +351 -0
- package/backend/src/core/services/ResourceMonitorService.js +90 -0
- package/backend/src/core/services/TelemetryService.js +124 -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/Transport.js +78 -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 +54 -0
- package/backend/src/real-time/socketHandler.js +6 -2
- 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 +3 -0
- package/backend/src/test-refactor.js +85 -0
- package/frontend/dist/assets/index-CfTo92bP.css +1 -0
- package/frontend/dist/assets/index-CiFD5X9Z.js +8344 -0
- package/frontend/dist/index.html +2 -2
- package/frontend/package.json +1 -5
- package/package.json +2 -1
- package/frontend/dist/assets/index-BFd7YoAj.css +0 -1
- package/frontend/dist/assets/index-CMMutadc.js +0 -8352
- package/nul +0 -0
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
const { GRAPH_TYPES } = require('../constants/graphTypes');
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Регистрация нод категории "События"
|
|
5
|
+
*/
|
|
6
|
+
function registerNodes(registry) {
|
|
7
|
+
registry.registerNodeType({
|
|
8
|
+
type: 'event:command',
|
|
9
|
+
label: '▶️ При выполнении команды',
|
|
10
|
+
category: 'События',
|
|
11
|
+
description: 'Стартовая точка для графа команды.',
|
|
12
|
+
graphType: GRAPH_TYPES.ALL, // нужно что бы события можно было расширять делая систему событий более комплексную объединяю функии команды и так далее
|
|
13
|
+
pins: {
|
|
14
|
+
inputs: [],
|
|
15
|
+
outputs: [
|
|
16
|
+
{ id: 'exec', name: 'Выполнить', type: 'Exec' },
|
|
17
|
+
{ id: 'command_name', name: 'Имя команды', type: 'String' },
|
|
18
|
+
{ id: 'user', name: 'Пользователь', type: 'User' },
|
|
19
|
+
{ id: 'args', name: 'Аргументы', type: 'Object' },
|
|
20
|
+
{ id: 'chat_type', name: 'Тип чата', type: 'String' },
|
|
21
|
+
{ id: 'success', name: 'Успешно', type: 'Boolean', description: 'Возвращает true, если команда не попала на ошибку (нет прав, кулдаун, неверный тип чата и т.д.)' }
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
registry.registerNodeType({
|
|
27
|
+
type: 'event:chat',
|
|
28
|
+
name: 'Событие: Сообщение в чате',
|
|
29
|
+
label: '💬 Сообщение в чате',
|
|
30
|
+
description: 'Срабатывает, когда в чат приходит сообщение.',
|
|
31
|
+
category: 'События',
|
|
32
|
+
graphType: GRAPH_TYPES.EVENT,
|
|
33
|
+
isEvent: true,
|
|
34
|
+
pins: {
|
|
35
|
+
inputs: [],
|
|
36
|
+
outputs: [
|
|
37
|
+
{ id: 'exec', type: 'Exec', name: 'Выполнить' },
|
|
38
|
+
{ id: 'username', type: 'String', name: 'Игрок' },
|
|
39
|
+
{ id: 'message', type: 'String', name: 'Сообщение' },
|
|
40
|
+
{ id: 'chatType', type: 'String', name: 'Тип чата' },
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
registry.registerNodeType({
|
|
46
|
+
type: 'event:raw_message',
|
|
47
|
+
name: 'Событие: Сырое сообщение',
|
|
48
|
+
label: '📝 Сырое сообщение',
|
|
49
|
+
description: 'Срабатывает при получении любого сообщения в сыром виде (до парсинга).',
|
|
50
|
+
category: 'События',
|
|
51
|
+
graphType: GRAPH_TYPES.EVENT,
|
|
52
|
+
isEvent: true,
|
|
53
|
+
pins: {
|
|
54
|
+
inputs: [],
|
|
55
|
+
outputs: [
|
|
56
|
+
{ id: 'exec', type: 'Exec', name: 'Выполнить' },
|
|
57
|
+
{ id: 'rawText', type: 'String', name: 'Сырой текст' },
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
registry.registerNodeType({
|
|
63
|
+
type: 'event:playerJoined',
|
|
64
|
+
label: '👋 Игрок зашел',
|
|
65
|
+
category: 'События',
|
|
66
|
+
description: 'Срабатывает, когда игрок заходит на сервер.',
|
|
67
|
+
graphType: GRAPH_TYPES.EVENT,
|
|
68
|
+
pins: {
|
|
69
|
+
inputs: [],
|
|
70
|
+
outputs: [
|
|
71
|
+
{ id: 'exec', name: 'Выполнить', type: 'Exec' },
|
|
72
|
+
{ id: 'user', name: 'Пользователь', type: 'User' },
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
registry.registerNodeType({
|
|
78
|
+
type: 'event:playerLeft',
|
|
79
|
+
label: '🚪 Игрок вышел',
|
|
80
|
+
category: 'События',
|
|
81
|
+
description: 'Срабатывает, когда игрок покидает сервер.',
|
|
82
|
+
graphType: GRAPH_TYPES.EVENT,
|
|
83
|
+
pins: {
|
|
84
|
+
inputs: [],
|
|
85
|
+
outputs: [
|
|
86
|
+
{ id: 'exec', name: 'Выполнить', type: 'Exec' },
|
|
87
|
+
{ id: 'user', name: 'Пользователь', type: 'User' },
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
registry.registerNodeType({
|
|
93
|
+
type: 'event:entitySpawn',
|
|
94
|
+
label: '📦 Сущность появилась',
|
|
95
|
+
category: 'События',
|
|
96
|
+
description: 'Вызывается, когда новая сущность появляется в поле зрения бота.',
|
|
97
|
+
graphType: GRAPH_TYPES.EVENT,
|
|
98
|
+
pins: {
|
|
99
|
+
inputs: [],
|
|
100
|
+
outputs: [
|
|
101
|
+
{ id: 'exec', name: 'Выполнить', type: 'Exec' },
|
|
102
|
+
{ id: 'entity', name: 'Сущность', type: 'Object' }
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
registry.registerNodeType({
|
|
108
|
+
type: 'event:entityMoved',
|
|
109
|
+
label: '🧍 Сущность подвинулась',
|
|
110
|
+
category: 'События',
|
|
111
|
+
description: 'Вызывается, когда любая сущность перемещается.',
|
|
112
|
+
graphType: GRAPH_TYPES.EVENT,
|
|
113
|
+
pins: {
|
|
114
|
+
inputs: [],
|
|
115
|
+
outputs: [
|
|
116
|
+
{ id: 'exec', name: 'Выполнить', type: 'Exec' },
|
|
117
|
+
{ id: 'entity', name: 'Сущность', type: 'Object' }
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
registry.registerNodeType({
|
|
123
|
+
type: 'event:entityGone',
|
|
124
|
+
label: '❌ Сущность исчезла',
|
|
125
|
+
category: 'События',
|
|
126
|
+
description: 'Вызывается, когда сущность пропадает из зоны видимости бота.',
|
|
127
|
+
graphType: GRAPH_TYPES.EVENT,
|
|
128
|
+
pins: {
|
|
129
|
+
inputs: [],
|
|
130
|
+
outputs: [
|
|
131
|
+
{ id: 'exec', name: 'Выполнить', type: 'Exec' },
|
|
132
|
+
{ id: 'entity', name: 'Сущность', type: 'Object' }
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
registry.registerNodeType({
|
|
138
|
+
type: 'event:botDied',
|
|
139
|
+
label: '💀 Бот умер',
|
|
140
|
+
category: 'События',
|
|
141
|
+
description: 'Срабатывает, когда бот умирает.',
|
|
142
|
+
graphType: GRAPH_TYPES.EVENT,
|
|
143
|
+
pins: {
|
|
144
|
+
inputs: [],
|
|
145
|
+
outputs: [
|
|
146
|
+
{ id: 'exec', name: 'Выполнить', type: 'Exec' },
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
registry.registerNodeType({
|
|
152
|
+
type: 'event:health',
|
|
153
|
+
label: '❤️ Здоровье/Голод изменилось',
|
|
154
|
+
category: 'События',
|
|
155
|
+
description: 'Срабатывает при изменении здоровья, голода или насыщения бота.',
|
|
156
|
+
graphType: GRAPH_TYPES.EVENT,
|
|
157
|
+
pins: {
|
|
158
|
+
inputs: [],
|
|
159
|
+
outputs: [
|
|
160
|
+
{ id: 'exec', name: 'Выполнить', type: 'Exec' },
|
|
161
|
+
{ id: 'health', name: 'Здоровье', type: 'Number' },
|
|
162
|
+
{ id: 'food', name: 'Голод', type: 'Number' },
|
|
163
|
+
{ id: 'saturation', name: 'Насыщение', type: 'Number' }
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
registry.registerNodeType({
|
|
169
|
+
type: 'event:websocket_call',
|
|
170
|
+
label: '📡 Вызов из WebSocket API',
|
|
171
|
+
category: 'События',
|
|
172
|
+
description: 'Срабатывает, когда граф вызывается через WebSocket API методом callGraph().',
|
|
173
|
+
graphType: GRAPH_TYPES.EVENT,
|
|
174
|
+
pins: {
|
|
175
|
+
inputs: [],
|
|
176
|
+
outputs: [
|
|
177
|
+
{ id: 'exec', name: 'Выполнить', type: 'Exec' },
|
|
178
|
+
{ id: 'graphName', name: 'Имя графа', type: 'String' },
|
|
179
|
+
{ id: 'data', name: 'Данные', type: 'Object' },
|
|
180
|
+
{ id: 'socketId', name: 'Socket ID', type: 'String' },
|
|
181
|
+
{ id: 'keyPrefix', name: 'API ключ (префикс)', type: 'String' }
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
module.exports = { registerNodes };
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
const { GRAPH_TYPES } = require('../constants/graphTypes');
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Регистрация нод категории "Управление потоком" (Поток)
|
|
5
|
+
*/
|
|
6
|
+
function registerNodes(registry) {
|
|
7
|
+
registry.registerNodeType({
|
|
8
|
+
type: 'flow:branch',
|
|
9
|
+
label: '↔️ Ветвление (Branch)',
|
|
10
|
+
category: 'Поток',
|
|
11
|
+
description: 'if/else логика',
|
|
12
|
+
graphType: GRAPH_TYPES.ALL,
|
|
13
|
+
executor: require('../nodes/flow/branch').execute,
|
|
14
|
+
pins: {
|
|
15
|
+
inputs: [
|
|
16
|
+
{ id: 'exec', name: 'Выполнить', type: 'Exec', required: true },
|
|
17
|
+
{ id: 'condition', name: 'Условие', type: 'Boolean', required: true }
|
|
18
|
+
],
|
|
19
|
+
outputs: [
|
|
20
|
+
{ id: 'exec_true', name: 'True', type: 'Exec' },
|
|
21
|
+
{ id: 'exec_false', name: 'False', type: 'Exec' }
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
registry.registerNodeType({
|
|
27
|
+
type: 'flow:sequence',
|
|
28
|
+
label: '⛓️ Последовательность',
|
|
29
|
+
category: 'Поток',
|
|
30
|
+
description: 'Выполняет действия по очереди',
|
|
31
|
+
graphType: GRAPH_TYPES.ALL,
|
|
32
|
+
executor: require('../nodes/flow/sequence').execute,
|
|
33
|
+
pins: {
|
|
34
|
+
inputs: [
|
|
35
|
+
{ id: 'exec', name: 'Выполнить', type: 'Exec', required: true }
|
|
36
|
+
],
|
|
37
|
+
outputs: [
|
|
38
|
+
{ id: 'exec_0', name: '0', type: 'Exec' },
|
|
39
|
+
{ id: 'exec_1', name: '1', type: 'Exec' }
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
registry.registerNodeType({
|
|
45
|
+
type: 'flow:for_each',
|
|
46
|
+
label: '🔁 Перебор массива (цикл)',
|
|
47
|
+
category: 'Поток',
|
|
48
|
+
description: 'Выполняет "Тело цикла" для каждого элемента в "Массиве".',
|
|
49
|
+
graphType: GRAPH_TYPES.ALL,
|
|
50
|
+
executor: require('../nodes/flow/for_each').execute,
|
|
51
|
+
pins: {
|
|
52
|
+
inputs: [
|
|
53
|
+
{ id: 'exec', name: 'Выполнить', type: 'Exec', required: true },
|
|
54
|
+
{ id: 'array', name: 'Массив', type: 'Array', required: true }
|
|
55
|
+
],
|
|
56
|
+
outputs: [
|
|
57
|
+
{ id: 'loop_body', name: 'Тело цикла', type: 'Exec' },
|
|
58
|
+
{ id: 'element', name: 'Элемент', type: 'Any' },
|
|
59
|
+
{ id: 'index', name: 'Индекс', type: 'Number' },
|
|
60
|
+
{ id: 'completed', name: 'Завершено', type: 'Exec' }
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
registry.registerNodeType({
|
|
66
|
+
type: 'flow:while',
|
|
67
|
+
label: '🔁 Цикл While',
|
|
68
|
+
category: 'Поток',
|
|
69
|
+
description: 'Выполняет "Тело цикла" пока условие истинно.',
|
|
70
|
+
graphType: GRAPH_TYPES.ALL,
|
|
71
|
+
executor: require('../nodes/flow/while').execute,
|
|
72
|
+
evaluator: require('../nodes/flow/while').evaluate,
|
|
73
|
+
pins: {
|
|
74
|
+
inputs: [
|
|
75
|
+
{ id: 'exec', name: 'Выполнить', type: 'Exec', required: true },
|
|
76
|
+
{ id: 'condition', name: 'Условие', type: 'Boolean', required: true }
|
|
77
|
+
],
|
|
78
|
+
outputs: [
|
|
79
|
+
{ id: 'loop_body', name: 'Тело цикла', type: 'Exec' },
|
|
80
|
+
{ id: 'iteration', name: 'Итерация', type: 'Number' },
|
|
81
|
+
{ id: 'completed', name: 'Завершено', type: 'Exec' }
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
registry.registerNodeType({
|
|
87
|
+
type: 'flow:break',
|
|
88
|
+
label: '🛑 Выйти из цикла',
|
|
89
|
+
category: 'Поток',
|
|
90
|
+
description: 'Немедленно прерывает выполнение цикла (For Each Loop) и передает управление на его выход Completed.',
|
|
91
|
+
graphType: GRAPH_TYPES.ALL,
|
|
92
|
+
executor: require('../nodes/flow/break').execute,
|
|
93
|
+
pins: {
|
|
94
|
+
inputs: [
|
|
95
|
+
{ id: 'exec', name: 'Выполнить', type: 'Exec', required: true }
|
|
96
|
+
],
|
|
97
|
+
outputs: []
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
registry.registerNodeType({
|
|
102
|
+
type: 'flow:delay',
|
|
103
|
+
label: '⏱️ Задержка',
|
|
104
|
+
category: 'Поток',
|
|
105
|
+
description: 'Ожидает указанное количество миллисекунд, затем продолжает выполнение.',
|
|
106
|
+
graphType: GRAPH_TYPES.ALL,
|
|
107
|
+
executor: require('../nodes/flow/delay').execute,
|
|
108
|
+
pins: {
|
|
109
|
+
inputs: [
|
|
110
|
+
{ id: 'exec', name: 'Выполнить', type: 'Exec', required: true },
|
|
111
|
+
{ id: 'delay', name: 'Задержка (мс)', type: 'Number', required: false }
|
|
112
|
+
],
|
|
113
|
+
outputs: [
|
|
114
|
+
{ id: 'exec', name: 'Далее', type: 'Exec' }
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
registry.registerNodeType({
|
|
120
|
+
type: 'flow:switch',
|
|
121
|
+
label: '🔄 Switch (свитч)',
|
|
122
|
+
category: 'Поток',
|
|
123
|
+
description: 'Выполняет разные действия в зависимости от значения. Автоматически определяет тип сравнения.',
|
|
124
|
+
graphType: GRAPH_TYPES.ALL,
|
|
125
|
+
dynamicPins: true,
|
|
126
|
+
executor: require('../nodes/flow/switch').execute,
|
|
127
|
+
pins: {
|
|
128
|
+
inputs: [
|
|
129
|
+
{ id: 'exec', name: 'Выполнить', type: 'Exec', required: true },
|
|
130
|
+
{ id: 'value', name: 'Значение', type: 'Wildcard', required: true }
|
|
131
|
+
],
|
|
132
|
+
outputs: [
|
|
133
|
+
{ id: 'default', name: 'Default', type: 'Exec' }
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
module.exports = { registerNodes };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const { GRAPH_TYPES } = require('../constants/graphTypes');
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Регистрация нод категории "Логика"
|
|
5
|
+
*/
|
|
6
|
+
function registerNodes(registry) {
|
|
7
|
+
registry.registerNodeType({
|
|
8
|
+
type: 'logic:operation',
|
|
9
|
+
label: '💡 Логика',
|
|
10
|
+
category: 'Логика',
|
|
11
|
+
description: 'Выполняет логическую операцию. Для НЕ (NOT) используется только вход А.',
|
|
12
|
+
graphType: GRAPH_TYPES.ALL,
|
|
13
|
+
dynamicPins: true,
|
|
14
|
+
evaluator: require('../nodes/logic/operation').evaluate,
|
|
15
|
+
pins: {
|
|
16
|
+
inputs: [
|
|
17
|
+
{ id: 'a', name: 'A', type: 'Boolean', required: true },
|
|
18
|
+
{ id: 'b', name: 'B', type: 'Boolean', required: true }
|
|
19
|
+
],
|
|
20
|
+
outputs: [
|
|
21
|
+
{ id: 'result', name: 'Результат', type: 'Boolean' }
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
registry.registerNodeType({
|
|
27
|
+
type: 'logic:compare',
|
|
28
|
+
label: '⎗ Сравнение',
|
|
29
|
+
category: 'Логика',
|
|
30
|
+
description: 'Сравнивает два значения.',
|
|
31
|
+
graphType: GRAPH_TYPES.ALL,
|
|
32
|
+
evaluator: require('../nodes/logic/compare').evaluate,
|
|
33
|
+
pins: {
|
|
34
|
+
inputs: [
|
|
35
|
+
{ id: 'a', name: 'A', type: 'Wildcard' },
|
|
36
|
+
{ id: 'b', name: 'B', type: 'Wildcard' }
|
|
37
|
+
],
|
|
38
|
+
outputs: [
|
|
39
|
+
{ id: 'result', name: 'Результат', type: 'Boolean' }
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
module.exports = { registerNodes };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const { GRAPH_TYPES } = require('../constants/graphTypes');
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Регистрация нод категории "Математика"
|
|
5
|
+
*/
|
|
6
|
+
function registerNodes(registry) {
|
|
7
|
+
registry.registerNodeType({
|
|
8
|
+
type: 'math:operation',
|
|
9
|
+
label: '🔢 Математика',
|
|
10
|
+
category: 'Математика',
|
|
11
|
+
description: 'Выполняет математическую операцию над двумя числами.',
|
|
12
|
+
graphType: GRAPH_TYPES.ALL,
|
|
13
|
+
evaluator: require('../nodes/math/operation').evaluate,
|
|
14
|
+
pins: {
|
|
15
|
+
inputs: [
|
|
16
|
+
{ id: 'a', name: 'A', type: 'Number', required: true },
|
|
17
|
+
{ id: 'b', name: 'B', type: 'Number', required: true }
|
|
18
|
+
],
|
|
19
|
+
outputs: [
|
|
20
|
+
{ id: 'result', name: 'Результат', type: 'Number' }
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
registry.registerNodeType({
|
|
26
|
+
type: 'math:random_number',
|
|
27
|
+
label: '🎲 Случайное число',
|
|
28
|
+
category: 'Математика',
|
|
29
|
+
graphType: GRAPH_TYPES.ALL,
|
|
30
|
+
description: 'Генерирует случайное число в заданном диапазоне.',
|
|
31
|
+
evaluator: require('../nodes/math/random_number').evaluate,
|
|
32
|
+
pins: {
|
|
33
|
+
inputs: [
|
|
34
|
+
{ id: 'min', name: 'Мин', type: 'Number' },
|
|
35
|
+
{ id: 'max', name: 'Макс', type: 'Number' }
|
|
36
|
+
],
|
|
37
|
+
outputs: [{ id: 'result', name: 'Результат', type: 'Number' }]
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
module.exports = { registerNodes };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
const { GRAPH_TYPES } = require('../constants/graphTypes');
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Регистрация нод категории "Объекты"
|
|
5
|
+
*/
|
|
6
|
+
function registerNodes(registry) {
|
|
7
|
+
registry.registerNodeType({
|
|
8
|
+
type: 'object:create',
|
|
9
|
+
label: '🏗️ Создать объект',
|
|
10
|
+
category: 'Объект',
|
|
11
|
+
description: 'Создает объект из пар ключ-значение.',
|
|
12
|
+
graphType: GRAPH_TYPES.ALL,
|
|
13
|
+
dynamicPins: true,
|
|
14
|
+
evaluator: require('../nodes/objects/create').evaluate,
|
|
15
|
+
pins: {
|
|
16
|
+
inputs: [],
|
|
17
|
+
outputs: [
|
|
18
|
+
{ id: 'object', name: 'Объект', type: 'Object' }
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
registry.registerNodeType({
|
|
24
|
+
type: 'object:get',
|
|
25
|
+
label: '📤 Получить значение',
|
|
26
|
+
category: 'Объект',
|
|
27
|
+
description: 'Получает значение по ключу из объекта.',
|
|
28
|
+
graphType: GRAPH_TYPES.ALL,
|
|
29
|
+
evaluator: require('../nodes/objects/get').evaluate,
|
|
30
|
+
pins: {
|
|
31
|
+
inputs: [
|
|
32
|
+
{ id: 'object', name: 'Объект', type: 'Object', required: true },
|
|
33
|
+
{ id: 'key', name: 'Ключ', type: 'String', required: true }
|
|
34
|
+
],
|
|
35
|
+
outputs: [
|
|
36
|
+
{ id: 'value', name: 'Значение', type: 'Any' }
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
registry.registerNodeType({
|
|
42
|
+
type: 'object:set',
|
|
43
|
+
label: '➕ Добавить/Изменить ключ',
|
|
44
|
+
category: 'Объект',
|
|
45
|
+
description: 'Добавляет или изменяет значение по ключу в объекте.',
|
|
46
|
+
graphType: GRAPH_TYPES.ALL,
|
|
47
|
+
evaluator: require('../nodes/objects/set').evaluate,
|
|
48
|
+
pins: {
|
|
49
|
+
inputs: [
|
|
50
|
+
{ id: 'object', name: 'Объект', type: 'Object', required: true },
|
|
51
|
+
{ id: 'key', name: 'Ключ', type: 'String', required: true },
|
|
52
|
+
{ id: 'value', name: 'Значение', type: 'Any', required: true }
|
|
53
|
+
],
|
|
54
|
+
outputs: [
|
|
55
|
+
{ id: 'new_object', name: 'Новый объект', type: 'Object' }
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
registry.registerNodeType({
|
|
61
|
+
type: 'object:delete',
|
|
62
|
+
label: '➖ Удалить ключ',
|
|
63
|
+
category: 'Объект',
|
|
64
|
+
description: 'Удаляет ключ из объекта.',
|
|
65
|
+
graphType: GRAPH_TYPES.ALL,
|
|
66
|
+
evaluator: require('../nodes/objects/delete').evaluate,
|
|
67
|
+
pins: {
|
|
68
|
+
inputs: [
|
|
69
|
+
{ id: 'object', name: 'Объект', type: 'Object', required: true },
|
|
70
|
+
{ id: 'key', name: 'Ключ', type: 'String', required: true }
|
|
71
|
+
],
|
|
72
|
+
outputs: [
|
|
73
|
+
{ id: 'new_object', name: 'Новый объект', type: 'Object' }
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
registry.registerNodeType({
|
|
79
|
+
type: 'object:has_key',
|
|
80
|
+
label: '🔍 Проверить ключ',
|
|
81
|
+
category: 'Объект',
|
|
82
|
+
description: 'Проверяет наличие ключа в объекте и возвращает значение.',
|
|
83
|
+
graphType: GRAPH_TYPES.ALL,
|
|
84
|
+
evaluator: require('../nodes/objects/has_key').evaluate,
|
|
85
|
+
pins: {
|
|
86
|
+
inputs: [
|
|
87
|
+
{ id: 'object', name: 'Объект', type: 'Object', required: true },
|
|
88
|
+
{ id: 'key', name: 'Ключ', type: 'String', required: true }
|
|
89
|
+
],
|
|
90
|
+
outputs: [
|
|
91
|
+
{ id: 'result', name: 'Найден', type: 'Boolean' },
|
|
92
|
+
{ id: 'value', name: 'Значение', type: 'Any' }
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
module.exports = { registerNodes };
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
const { GRAPH_TYPES } = require('../constants/graphTypes');
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Регистрация нод категории "Строки"
|
|
5
|
+
*/
|
|
6
|
+
function registerNodes(registry) {
|
|
7
|
+
registry.registerNodeType({
|
|
8
|
+
type: 'string:contains',
|
|
9
|
+
label: '🔍 Строка содержит',
|
|
10
|
+
category: 'Строки',
|
|
11
|
+
description: 'Проверяет, содержит ли одна строка другую.',
|
|
12
|
+
graphType: GRAPH_TYPES.ALL,
|
|
13
|
+
evaluator: require('../nodes/strings/contains').evaluate,
|
|
14
|
+
pins: {
|
|
15
|
+
inputs: [
|
|
16
|
+
{ id: 'haystack', name: 'Строка', type: 'String', required: true },
|
|
17
|
+
{ id: 'needle', name: 'Подстрока', type: 'String', required: true },
|
|
18
|
+
{ id: 'case_sensitive', name: 'Учет регистра', type: 'Boolean', required: false }
|
|
19
|
+
],
|
|
20
|
+
outputs: [
|
|
21
|
+
{ id: 'result', name: 'Содержит?', type: 'Boolean' }
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
registry.registerNodeType({
|
|
27
|
+
type: 'string:matches',
|
|
28
|
+
label: '🔎 RegEx совпадает',
|
|
29
|
+
category: 'Строки',
|
|
30
|
+
description: 'Проверяет совпадение с регулярным выражением.',
|
|
31
|
+
graphType: GRAPH_TYPES.ALL,
|
|
32
|
+
evaluator: require('../nodes/strings/matches').evaluate,
|
|
33
|
+
pins: {
|
|
34
|
+
inputs: [
|
|
35
|
+
{ id: 'string', name: 'Строка', type: 'String', required: true },
|
|
36
|
+
{ id: 'regex', name: 'RegEx', type: 'String', required: true }
|
|
37
|
+
],
|
|
38
|
+
outputs: [
|
|
39
|
+
{ id: 'result', name: 'Совпадает?', type: 'Boolean' }
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
registry.registerNodeType({
|
|
45
|
+
type: 'string:equals',
|
|
46
|
+
label: '🔤 Строка равна',
|
|
47
|
+
category: 'Строки',
|
|
48
|
+
description: 'Проверяет равенство двух строк.',
|
|
49
|
+
graphType: GRAPH_TYPES.ALL,
|
|
50
|
+
evaluator: require('../nodes/strings/equals').evaluate,
|
|
51
|
+
pins: {
|
|
52
|
+
inputs: [
|
|
53
|
+
{ id: 'a', name: 'A', type: 'String', required: true },
|
|
54
|
+
{ id: 'b', name: 'B', type: 'String', required: true },
|
|
55
|
+
{ id: 'case_sensitive', name: 'Учет регистра', type: 'Boolean', required: false }
|
|
56
|
+
],
|
|
57
|
+
outputs: [
|
|
58
|
+
{ id: 'result', name: 'Равны?', type: 'Boolean' }
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
registry.registerNodeType({
|
|
64
|
+
type: 'string:starts_with',
|
|
65
|
+
label: '▶️ Начинается с',
|
|
66
|
+
category: 'Строки',
|
|
67
|
+
description: 'Проверяет, начинается ли строка с подстроки.',
|
|
68
|
+
graphType: GRAPH_TYPES.ALL,
|
|
69
|
+
evaluator: require('../nodes/strings/starts_with').evaluate,
|
|
70
|
+
pins: {
|
|
71
|
+
inputs: [
|
|
72
|
+
{ id: 'string', name: 'Строка', type: 'String', required: true },
|
|
73
|
+
{ id: 'prefix', name: 'Префикс', type: 'String', required: true },
|
|
74
|
+
{ id: 'case_sensitive', name: 'Учет регистра', type: 'Boolean', required: false }
|
|
75
|
+
],
|
|
76
|
+
outputs: [
|
|
77
|
+
{ id: 'result', name: 'Начинается?', type: 'Boolean' }
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
registry.registerNodeType({
|
|
83
|
+
type: 'string:ends_with',
|
|
84
|
+
label: '◀️ Заканчивается на',
|
|
85
|
+
category: 'Строки',
|
|
86
|
+
description: 'Проверяет, заканчивается ли строка подстрокой.',
|
|
87
|
+
graphType: GRAPH_TYPES.ALL,
|
|
88
|
+
evaluator: require('../nodes/strings/ends_with').evaluate,
|
|
89
|
+
pins: {
|
|
90
|
+
inputs: [
|
|
91
|
+
{ id: 'string', name: 'Строка', type: 'String', required: true },
|
|
92
|
+
{ id: 'suffix', name: 'Суффикс', type: 'String', required: true },
|
|
93
|
+
{ id: 'case_sensitive', name: 'Учет регистра', type: 'Boolean', required: false }
|
|
94
|
+
],
|
|
95
|
+
outputs: [
|
|
96
|
+
{ id: 'result', name: 'Заканчивается?', type: 'Boolean' }
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
registry.registerNodeType({
|
|
102
|
+
type: 'string:length',
|
|
103
|
+
label: '📏 Длина строки',
|
|
104
|
+
category: 'Строки',
|
|
105
|
+
description: 'Возвращает количество символов.',
|
|
106
|
+
graphType: GRAPH_TYPES.ALL,
|
|
107
|
+
evaluator: require('../nodes/strings/length').evaluate,
|
|
108
|
+
pins: {
|
|
109
|
+
inputs: [
|
|
110
|
+
{ id: 'string', name: 'Строка', type: 'String', required: true }
|
|
111
|
+
],
|
|
112
|
+
outputs: [
|
|
113
|
+
{ id: 'length', name: 'Длина', type: 'Number' }
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
registry.registerNodeType({
|
|
119
|
+
type: 'string:split',
|
|
120
|
+
label: '✂️ Разделить строку',
|
|
121
|
+
category: 'Строки',
|
|
122
|
+
description: 'Разделяет строку на массив по разделителю.',
|
|
123
|
+
graphType: GRAPH_TYPES.ALL,
|
|
124
|
+
evaluator: require('../nodes/strings/split').evaluate,
|
|
125
|
+
pins: {
|
|
126
|
+
inputs: [
|
|
127
|
+
{ id: 'string', name: 'Строка', type: 'String', required: true },
|
|
128
|
+
{ id: 'separator', name: 'Разделитель', type: 'String', required: true }
|
|
129
|
+
],
|
|
130
|
+
outputs: [
|
|
131
|
+
{ id: 'array', name: 'Массив', type: 'Array' }
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
registry.registerNodeType({
|
|
137
|
+
type: 'string:concat',
|
|
138
|
+
label: 'Строка: Объединить',
|
|
139
|
+
category: 'Строки',
|
|
140
|
+
description: 'Объединяет две или более строки в одну.',
|
|
141
|
+
graphType: GRAPH_TYPES.ALL,
|
|
142
|
+
dynamicPins: true,
|
|
143
|
+
evaluator: require('../nodes/strings/concat').evaluate,
|
|
144
|
+
pins: {
|
|
145
|
+
inputs: [],
|
|
146
|
+
outputs: [
|
|
147
|
+
{ id: 'result', name: 'Результат', type: 'String' }
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
module.exports = { registerNodes };
|