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
|
@@ -0,0 +1,648 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Systems engineering and administration covering Linux and Windows administration, networking fundamentals, performance tuning, configuration management (Ansible/Chef/Puppet), system monitoring, shell scripting (bash/PowerShell), and troubleshooting. Use when managing Linux or Windows systems, optimizing performance, automating operations, or debugging system issues. (project)
|
|
3
|
+
---
|
|
4
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
5
|
+
🎯 SKILL ACTIVATED: systems-engineering
|
|
6
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# Systems Engineering & Administration
|
|
10
|
+
|
|
11
|
+
Comprehensive guide for Linux and Windows system administration, networking, performance optimization, configuration management, and operational automation. This skill provides production-tested patterns for managing infrastructure at scale across both platforms.
|
|
12
|
+
|
|
13
|
+
## When to Use This Skill
|
|
14
|
+
|
|
15
|
+
Automatically activates when working on:
|
|
16
|
+
- Linux or Windows Server administration and configuration
|
|
17
|
+
- System performance tuning and optimization
|
|
18
|
+
- Configuration management (Ansible, Chef, Puppet, DSC)
|
|
19
|
+
- Shell scripting automation (bash, PowerShell)
|
|
20
|
+
- System monitoring and observability setup
|
|
21
|
+
- Security hardening and compliance
|
|
22
|
+
- Storage management and backup strategies
|
|
23
|
+
- Active Directory and Group Policy (Windows)
|
|
24
|
+
- System troubleshooting and debugging
|
|
25
|
+
|
|
26
|
+
## Overview
|
|
27
|
+
|
|
28
|
+
**Purpose:** Enable teams to build, configure, and maintain robust infrastructure with automation, monitoring, and performance optimization on both Linux and Windows platforms.
|
|
29
|
+
|
|
30
|
+
**Scope:**
|
|
31
|
+
- Linux and Windows Server administration
|
|
32
|
+
- Networking fundamentals (TCP/IP, DNS, load balancing, firewalls)
|
|
33
|
+
- Performance tuning and optimization (both platforms)
|
|
34
|
+
- Configuration management (Ansible, Chef, Puppet, DSC)
|
|
35
|
+
- System monitoring and observability
|
|
36
|
+
- Shell scripting and automation (bash, PowerShell)
|
|
37
|
+
- Troubleshooting and debugging
|
|
38
|
+
- Security hardening (Linux and Windows)
|
|
39
|
+
- Storage management (LVM, Windows Storage Spaces)
|
|
40
|
+
- Operational excellence
|
|
41
|
+
|
|
42
|
+
**This skill is for:**
|
|
43
|
+
- Systems engineers managing Linux and Windows infrastructure
|
|
44
|
+
- DevOps engineers automating operations across platforms
|
|
45
|
+
- SREs optimizing system performance
|
|
46
|
+
- IT administrators maintaining servers (Linux/Windows)
|
|
47
|
+
- Platform engineers building foundational services
|
|
48
|
+
|
|
49
|
+
## Quick Start Checklist
|
|
50
|
+
|
|
51
|
+
When starting a systems engineering task:
|
|
52
|
+
|
|
53
|
+
- [ ] Identify system requirements (OS, resources, networking)
|
|
54
|
+
- [ ] Plan infrastructure topology and dependencies
|
|
55
|
+
- [ ] Implement configuration management for reproducibility
|
|
56
|
+
- [ ] Set up monitoring and alerting
|
|
57
|
+
- [ ] Configure logging and log aggregation
|
|
58
|
+
- [ ] Implement security hardening (firewall, SELinux, patches)
|
|
59
|
+
- [ ] Document runbooks and procedures
|
|
60
|
+
- [ ] Test disaster recovery procedures
|
|
61
|
+
- [ ] Implement backup strategy
|
|
62
|
+
- [ ] Plan capacity and performance optimization
|
|
63
|
+
|
|
64
|
+
## Core Concepts
|
|
65
|
+
|
|
66
|
+
### 1. Linux System Architecture
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
70
|
+
│ User Space │
|
|
71
|
+
│ ┌────────────┬─────────────┬──────────────┬──────────────┐ │
|
|
72
|
+
│ │ Applications│ Libraries │ System Utils │ Shells │ │
|
|
73
|
+
│ └────────────┴─────────────┴──────────────┴──────────────┘ │
|
|
74
|
+
├─────────────────────────────────────────────────────────────┤
|
|
75
|
+
│ Kernel Space │
|
|
76
|
+
│ ┌────────────┬─────────────┬──────────────┬──────────────┐ │
|
|
77
|
+
│ │ Process │ Memory │ File System │ Network │ │
|
|
78
|
+
│ │ Management │ Management │ Management │ Stack │ │
|
|
79
|
+
│ └────────────┴─────────────┴──────────────┴──────────────┘ │
|
|
80
|
+
├─────────────────────────────────────────────────────────────┤
|
|
81
|
+
│ Hardware Layer │
|
|
82
|
+
│ ┌────────────┬─────────────┬──────────────┬──────────────┐ │
|
|
83
|
+
│ │ CPU │ RAM │ Storage │ Network │ │
|
|
84
|
+
│ │ │ │ │ Interfaces │ │
|
|
85
|
+
│ └────────────┴─────────────┴──────────────┴──────────────┘ │
|
|
86
|
+
└─────────────────────────────────────────────────────────────┘
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### 2. systemd Service Management
|
|
90
|
+
|
|
91
|
+
**Service Lifecycle:**
|
|
92
|
+
```
|
|
93
|
+
┌──────────┐ systemctl start ┌──────────┐
|
|
94
|
+
│ │ ──────────────────→ │ │
|
|
95
|
+
│ Inactive │ │ Active │
|
|
96
|
+
│ │ ←────────────────── │ │
|
|
97
|
+
└──────────┘ systemctl stop └──────────┘
|
|
98
|
+
↓ ↓
|
|
99
|
+
└─────→ systemctl enable ──────→ (starts on boot)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Key Commands:**
|
|
103
|
+
```bash
|
|
104
|
+
# Service management
|
|
105
|
+
systemctl start nginx
|
|
106
|
+
systemctl stop nginx
|
|
107
|
+
systemctl restart nginx
|
|
108
|
+
systemctl reload nginx
|
|
109
|
+
systemctl status nginx
|
|
110
|
+
|
|
111
|
+
# Enable/disable at boot
|
|
112
|
+
systemctl enable nginx
|
|
113
|
+
systemctl disable nginx
|
|
114
|
+
|
|
115
|
+
# View logs
|
|
116
|
+
journalctl -u nginx
|
|
117
|
+
journalctl -u nginx -f # Follow
|
|
118
|
+
journalctl -u nginx --since "1 hour ago"
|
|
119
|
+
|
|
120
|
+
# List all services
|
|
121
|
+
systemctl list-units --type=service
|
|
122
|
+
systemctl list-unit-files --type=service
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### 3. Networking Stack
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
129
|
+
│ Layer 7: Application (HTTP, DNS, SSH, FTP) │
|
|
130
|
+
├─────────────────────────────────────────────────────────────┤
|
|
131
|
+
│ Layer 4: Transport (TCP, UDP) │
|
|
132
|
+
├─────────────────────────────────────────────────────────────┤
|
|
133
|
+
│ Layer 3: Network (IP, ICMP, Routing) │
|
|
134
|
+
├─────────────────────────────────────────────────────────────┤
|
|
135
|
+
│ Layer 2: Data Link (Ethernet, MAC addresses) │
|
|
136
|
+
├─────────────────────────────────────────────────────────────┤
|
|
137
|
+
│ Layer 1: Physical (Cables, NICs) │
|
|
138
|
+
└─────────────────────────────────────────────────────────────┘
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Common Network Operations:**
|
|
142
|
+
```bash
|
|
143
|
+
# Interface management
|
|
144
|
+
ip addr show
|
|
145
|
+
ip link show
|
|
146
|
+
ip route show
|
|
147
|
+
|
|
148
|
+
# Network connectivity
|
|
149
|
+
ping -c 4 google.com
|
|
150
|
+
traceroute google.com
|
|
151
|
+
mtr google.com # Continuous traceroute
|
|
152
|
+
|
|
153
|
+
# DNS lookup
|
|
154
|
+
dig example.com
|
|
155
|
+
nslookup example.com
|
|
156
|
+
host example.com
|
|
157
|
+
|
|
158
|
+
# Port scanning
|
|
159
|
+
nmap -sT localhost
|
|
160
|
+
ss -tuln # Show listening ports
|
|
161
|
+
netstat -tuln # Legacy alternative
|
|
162
|
+
|
|
163
|
+
# Network statistics
|
|
164
|
+
ss -s
|
|
165
|
+
netstat -i
|
|
166
|
+
iftop # Real-time bandwidth
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### 4. Performance Monitoring
|
|
170
|
+
|
|
171
|
+
**System Resource Overview:**
|
|
172
|
+
```bash
|
|
173
|
+
# CPU
|
|
174
|
+
top
|
|
175
|
+
htop
|
|
176
|
+
mpstat 1 # CPU stats per second
|
|
177
|
+
pidstat 1 # Per-process CPU
|
|
178
|
+
|
|
179
|
+
# Memory
|
|
180
|
+
free -h
|
|
181
|
+
vmstat 1
|
|
182
|
+
cat /proc/meminfo
|
|
183
|
+
|
|
184
|
+
# Disk I/O
|
|
185
|
+
iostat -x 1
|
|
186
|
+
iotop
|
|
187
|
+
df -h # Disk usage
|
|
188
|
+
du -sh /var/* # Directory sizes
|
|
189
|
+
|
|
190
|
+
# Network
|
|
191
|
+
iftop
|
|
192
|
+
nethogs
|
|
193
|
+
sar -n DEV 1 # Network stats
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## Common Patterns
|
|
197
|
+
|
|
198
|
+
### Pattern 1: Ansible Automation
|
|
199
|
+
|
|
200
|
+
**Directory Structure:**
|
|
201
|
+
```
|
|
202
|
+
ansible/
|
|
203
|
+
├── ansible.cfg
|
|
204
|
+
├── inventory/
|
|
205
|
+
│ ├── production/
|
|
206
|
+
│ │ ├── hosts
|
|
207
|
+
│ │ └── group_vars/
|
|
208
|
+
│ │ ├── all.yml
|
|
209
|
+
│ │ ├── webservers.yml
|
|
210
|
+
│ │ └── databases.yml
|
|
211
|
+
│ └── staging/
|
|
212
|
+
│ └── hosts
|
|
213
|
+
├── roles/
|
|
214
|
+
│ ├── common/
|
|
215
|
+
│ │ ├── tasks/
|
|
216
|
+
│ │ │ └── main.yml
|
|
217
|
+
│ │ ├── handlers/
|
|
218
|
+
│ │ │ └── main.yml
|
|
219
|
+
│ │ ├── templates/
|
|
220
|
+
│ │ ├── files/
|
|
221
|
+
│ │ └── vars/
|
|
222
|
+
│ │ └── main.yml
|
|
223
|
+
│ ├── nginx/
|
|
224
|
+
│ └── postgres/
|
|
225
|
+
├── playbooks/
|
|
226
|
+
│ ├── site.yml
|
|
227
|
+
│ ├── webservers.yml
|
|
228
|
+
│ └── database.yml
|
|
229
|
+
└── group_vars/
|
|
230
|
+
└── all.yml
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
**Example Playbook:**
|
|
234
|
+
```yaml
|
|
235
|
+
# playbooks/webservers.yml
|
|
236
|
+
---
|
|
237
|
+
- name: Configure web servers
|
|
238
|
+
hosts: webservers
|
|
239
|
+
become: yes
|
|
240
|
+
vars:
|
|
241
|
+
nginx_port: 80
|
|
242
|
+
app_user: webapp
|
|
243
|
+
|
|
244
|
+
tasks:
|
|
245
|
+
- name: Update apt cache
|
|
246
|
+
apt:
|
|
247
|
+
update_cache: yes
|
|
248
|
+
cache_valid_time: 3600
|
|
249
|
+
|
|
250
|
+
- name: Install nginx
|
|
251
|
+
apt:
|
|
252
|
+
name: nginx
|
|
253
|
+
state: present
|
|
254
|
+
|
|
255
|
+
- name: Configure nginx
|
|
256
|
+
template:
|
|
257
|
+
src: nginx.conf.j2
|
|
258
|
+
dest: /etc/nginx/nginx.conf
|
|
259
|
+
owner: root
|
|
260
|
+
group: root
|
|
261
|
+
mode: '0644'
|
|
262
|
+
notify: Reload nginx
|
|
263
|
+
|
|
264
|
+
- name: Ensure nginx is running
|
|
265
|
+
systemd:
|
|
266
|
+
name: nginx
|
|
267
|
+
state: started
|
|
268
|
+
enabled: yes
|
|
269
|
+
|
|
270
|
+
- name: Configure firewall
|
|
271
|
+
ufw:
|
|
272
|
+
rule: allow
|
|
273
|
+
port: '{{ nginx_port }}'
|
|
274
|
+
proto: tcp
|
|
275
|
+
|
|
276
|
+
handlers:
|
|
277
|
+
- name: Reload nginx
|
|
278
|
+
systemd:
|
|
279
|
+
name: nginx
|
|
280
|
+
state: reloaded
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### Pattern 2: System Hardening
|
|
284
|
+
|
|
285
|
+
**Security Baseline Script:**
|
|
286
|
+
```bash
|
|
287
|
+
#!/bin/bash
|
|
288
|
+
# system-hardening.sh
|
|
289
|
+
# Implements CIS benchmark controls
|
|
290
|
+
|
|
291
|
+
set -euo pipefail
|
|
292
|
+
|
|
293
|
+
echo "=== System Hardening Script ==="
|
|
294
|
+
|
|
295
|
+
# 1. Update system
|
|
296
|
+
echo "[1/10] Updating system packages..."
|
|
297
|
+
apt-get update && apt-get upgrade -y
|
|
298
|
+
|
|
299
|
+
# 2. Configure firewall
|
|
300
|
+
echo "[2/10] Configuring firewall..."
|
|
301
|
+
ufw default deny incoming
|
|
302
|
+
ufw default allow outgoing
|
|
303
|
+
ufw allow 22/tcp # SSH
|
|
304
|
+
ufw allow 80/tcp # HTTP
|
|
305
|
+
ufw allow 443/tcp # HTTPS
|
|
306
|
+
ufw --force enable
|
|
307
|
+
|
|
308
|
+
# 3. Disable unnecessary services
|
|
309
|
+
echo "[3/10] Disabling unnecessary services..."
|
|
310
|
+
systemctl disable avahi-daemon 2>/dev/null || true
|
|
311
|
+
systemctl disable cups 2>/dev/null || true
|
|
312
|
+
systemctl stop avahi-daemon 2>/dev/null || true
|
|
313
|
+
systemctl stop cups 2>/dev/null || true
|
|
314
|
+
|
|
315
|
+
# 4. Configure SSH hardening
|
|
316
|
+
echo "[4/10] Hardening SSH configuration..."
|
|
317
|
+
cat > /etc/ssh/sshd_config.d/99-hardening.conf <<EOF
|
|
318
|
+
PermitRootLogin no
|
|
319
|
+
PasswordAuthentication no
|
|
320
|
+
PubkeyAuthentication yes
|
|
321
|
+
X11Forwarding no
|
|
322
|
+
MaxAuthTries 3
|
|
323
|
+
MaxSessions 2
|
|
324
|
+
ClientAliveInterval 300
|
|
325
|
+
ClientAliveCountMax 2
|
|
326
|
+
Protocol 2
|
|
327
|
+
EOF
|
|
328
|
+
systemctl restart sshd
|
|
329
|
+
|
|
330
|
+
# 5. Set password policy
|
|
331
|
+
echo "[5/10] Configuring password policy..."
|
|
332
|
+
cat > /etc/security/pwquality.conf <<EOF
|
|
333
|
+
minlen = 14
|
|
334
|
+
dcredit = -1
|
|
335
|
+
ucredit = -1
|
|
336
|
+
ocredit = -1
|
|
337
|
+
lcredit = -1
|
|
338
|
+
EOF
|
|
339
|
+
|
|
340
|
+
# 6. Configure auditd
|
|
341
|
+
echo "[6/10] Setting up audit logging..."
|
|
342
|
+
apt-get install -y auditd audispd-plugins
|
|
343
|
+
systemctl enable auditd
|
|
344
|
+
systemctl start auditd
|
|
345
|
+
|
|
346
|
+
# 7. Kernel hardening
|
|
347
|
+
echo "[7/10] Applying kernel hardening..."
|
|
348
|
+
cat > /etc/sysctl.d/99-hardening.conf <<EOF
|
|
349
|
+
# IP forwarding
|
|
350
|
+
net.ipv4.ip_forward = 0
|
|
351
|
+
|
|
352
|
+
# SYN flood protection
|
|
353
|
+
net.ipv4.tcp_syncookies = 1
|
|
354
|
+
|
|
355
|
+
# ICMP redirects
|
|
356
|
+
net.ipv4.conf.all.accept_redirects = 0
|
|
357
|
+
net.ipv4.conf.default.accept_redirects = 0
|
|
358
|
+
|
|
359
|
+
# Source routing
|
|
360
|
+
net.ipv4.conf.all.accept_source_route = 0
|
|
361
|
+
net.ipv4.conf.default.accept_source_route = 0
|
|
362
|
+
|
|
363
|
+
# Log martians
|
|
364
|
+
net.ipv4.conf.all.log_martians = 1
|
|
365
|
+
|
|
366
|
+
# Ignore ICMP ping
|
|
367
|
+
net.ipv4.icmp_echo_ignore_all = 0
|
|
368
|
+
|
|
369
|
+
# IPv6
|
|
370
|
+
net.ipv6.conf.all.disable_ipv6 = 1
|
|
371
|
+
net.ipv6.conf.default.disable_ipv6 = 1
|
|
372
|
+
EOF
|
|
373
|
+
sysctl -p /etc/sysctl.d/99-hardening.conf
|
|
374
|
+
|
|
375
|
+
# 8. File permissions
|
|
376
|
+
echo "[8/10] Setting secure file permissions..."
|
|
377
|
+
chmod 600 /etc/ssh/sshd_config
|
|
378
|
+
chmod 644 /etc/passwd
|
|
379
|
+
chmod 640 /etc/shadow
|
|
380
|
+
chmod 640 /etc/gshadow
|
|
381
|
+
|
|
382
|
+
# 9. Install security tools
|
|
383
|
+
echo "[9/10] Installing security tools..."
|
|
384
|
+
apt-get install -y \
|
|
385
|
+
fail2ban \
|
|
386
|
+
rkhunter \
|
|
387
|
+
aide
|
|
388
|
+
|
|
389
|
+
# Configure fail2ban
|
|
390
|
+
systemctl enable fail2ban
|
|
391
|
+
systemctl start fail2ban
|
|
392
|
+
|
|
393
|
+
# 10. Set up automatic updates
|
|
394
|
+
echo "[10/10] Configuring automatic security updates..."
|
|
395
|
+
apt-get install -y unattended-upgrades
|
|
396
|
+
dpkg-reconfigure -plow unattended-upgrades
|
|
397
|
+
|
|
398
|
+
echo "=== System Hardening Complete ==="
|
|
399
|
+
echo "Please review /var/log/system-hardening.log for details"
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
### Pattern 3: Performance Tuning
|
|
403
|
+
|
|
404
|
+
**Performance Analysis Script:**
|
|
405
|
+
```bash
|
|
406
|
+
#!/bin/bash
|
|
407
|
+
# performance-check.sh
|
|
408
|
+
# Analyzes system performance and provides recommendations
|
|
409
|
+
|
|
410
|
+
echo "=== System Performance Analysis ==="
|
|
411
|
+
echo ""
|
|
412
|
+
|
|
413
|
+
# CPU Analysis
|
|
414
|
+
echo "--- CPU Information ---"
|
|
415
|
+
echo "CPU Model: $(grep 'model name' /proc/cpuinfo | head -1 | cut -d: -f2 | xargs)"
|
|
416
|
+
echo "CPU Cores: $(nproc)"
|
|
417
|
+
echo "Load Average (1m, 5m, 15m): $(uptime | awk -F'load average:' '{print $2}')"
|
|
418
|
+
|
|
419
|
+
CPU_USAGE=$(top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print 100 - $1}')
|
|
420
|
+
echo "CPU Usage: ${CPU_USAGE}%"
|
|
421
|
+
|
|
422
|
+
if (( $(echo "$CPU_USAGE > 80" | bc -l) )); then
|
|
423
|
+
echo "⚠ WARNING: High CPU usage detected"
|
|
424
|
+
echo "Top CPU consumers:"
|
|
425
|
+
ps aux --sort=-%cpu | head -6
|
|
426
|
+
fi
|
|
427
|
+
|
|
428
|
+
echo ""
|
|
429
|
+
|
|
430
|
+
# Memory Analysis
|
|
431
|
+
echo "--- Memory Information ---"
|
|
432
|
+
free -h
|
|
433
|
+
MEMORY_USAGE=$(free | grep Mem | awk '{print ($3/$2) * 100.0}')
|
|
434
|
+
echo "Memory Usage: ${MEMORY_USAGE}%"
|
|
435
|
+
|
|
436
|
+
if (( $(echo "$MEMORY_USAGE > 90" | bc -l) )); then
|
|
437
|
+
echo "⚠ WARNING: High memory usage detected"
|
|
438
|
+
echo "Top memory consumers:"
|
|
439
|
+
ps aux --sort=-%mem | head -6
|
|
440
|
+
fi
|
|
441
|
+
|
|
442
|
+
echo ""
|
|
443
|
+
|
|
444
|
+
# Disk I/O Analysis
|
|
445
|
+
echo "--- Disk I/O Information ---"
|
|
446
|
+
iostat -x 1 2 | tail -n +4
|
|
447
|
+
|
|
448
|
+
echo ""
|
|
449
|
+
|
|
450
|
+
# Network Analysis
|
|
451
|
+
echo "--- Network Information ---"
|
|
452
|
+
echo "Network Interfaces:"
|
|
453
|
+
ip -brief addr show
|
|
454
|
+
|
|
455
|
+
echo ""
|
|
456
|
+
echo "Network Connections:"
|
|
457
|
+
ss -s
|
|
458
|
+
|
|
459
|
+
echo ""
|
|
460
|
+
echo "Top Bandwidth Consumers:"
|
|
461
|
+
netstat -tunap 2>/dev/null | grep ESTABLISHED | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -rn | head -5
|
|
462
|
+
|
|
463
|
+
echo ""
|
|
464
|
+
echo "=== Performance Analysis Complete ==="
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
## Resource Files
|
|
468
|
+
|
|
469
|
+
For detailed guidance on specific topics, see:
|
|
470
|
+
|
|
471
|
+
### Linux Administration
|
|
472
|
+
- **[linux-administration.md](resources/linux-administration.md)** - systemd, user management, package managers, LVM, file systems, boot process
|
|
473
|
+
- **[storage-management.md](resources/storage-management.md)** - LVM operations, RAID, file systems, backups, snapshots, capacity planning
|
|
474
|
+
- **[shell-scripting.md](resources/shell-scripting.md)** - Bash scripting patterns, error handling, testing, best practices
|
|
475
|
+
|
|
476
|
+
### Windows Administration
|
|
477
|
+
- **[windows-administration.md](resources/windows-administration.md)** - Windows Server, Active Directory, GPO, IIS, services, registry, security hardening
|
|
478
|
+
- **[powershell-scripting.md](resources/powershell-scripting.md)** - PowerShell fundamentals, scripting, DSC, remote management, best practices
|
|
479
|
+
|
|
480
|
+
### Networking
|
|
481
|
+
- **[networking-fundamentals.md](resources/networking-fundamentals.md)** - TCP/IP, DNS, load balancers, firewalls, routing, network debugging
|
|
482
|
+
- **[security-hardening.md](resources/security-hardening.md)** - OS hardening, CIS benchmarks, firewall, SELinux/AppArmor, SSH, audit logging
|
|
483
|
+
|
|
484
|
+
### Performance & Troubleshooting
|
|
485
|
+
- **[performance-tuning.md](resources/performance-tuning.md)** - CPU optimization, memory tuning, disk I/O, network performance, profiling tools
|
|
486
|
+
- **[troubleshooting-guide.md](resources/troubleshooting-guide.md)** - Debugging methodology, diagnostic tools, common issues, log analysis
|
|
487
|
+
|
|
488
|
+
### Automation & Configuration
|
|
489
|
+
- **[configuration-management.md](resources/configuration-management.md)** - Ansible playbooks, Chef cookbooks, Puppet manifests, DSC, best practices
|
|
490
|
+
- **[automation-patterns.md](resources/automation-patterns.md)** - Cron jobs, systemd timers, Task Scheduler, idempotency, error handling
|
|
491
|
+
|
|
492
|
+
### Monitoring
|
|
493
|
+
- **[system-monitoring.md](resources/system-monitoring.md)** - Log aggregation, metrics collection, dashboards, alerting, monitoring best practices
|
|
494
|
+
|
|
495
|
+
## Best Practices
|
|
496
|
+
|
|
497
|
+
### System Administration
|
|
498
|
+
|
|
499
|
+
1. **Automation First:**
|
|
500
|
+
- Use configuration management tools
|
|
501
|
+
- Version control all configurations
|
|
502
|
+
- Implement Infrastructure as Code
|
|
503
|
+
- Automate repetitive tasks
|
|
504
|
+
- Document automation procedures
|
|
505
|
+
|
|
506
|
+
2. **Security:**
|
|
507
|
+
- Principle of least privilege
|
|
508
|
+
- Regular security updates
|
|
509
|
+
- Implement firewall rules
|
|
510
|
+
- Enable audit logging
|
|
511
|
+
- Use SSH keys, disable password auth
|
|
512
|
+
|
|
513
|
+
3. **Monitoring:**
|
|
514
|
+
- Comprehensive system monitoring
|
|
515
|
+
- Centralized logging
|
|
516
|
+
- Proactive alerting
|
|
517
|
+
- Regular performance reviews
|
|
518
|
+
- Capacity planning
|
|
519
|
+
|
|
520
|
+
### Configuration Management
|
|
521
|
+
|
|
522
|
+
1. **Idempotency:**
|
|
523
|
+
- Ensure scripts can run multiple times safely
|
|
524
|
+
- Check state before making changes
|
|
525
|
+
- Use declarative configurations
|
|
526
|
+
- Test thoroughly before production
|
|
527
|
+
|
|
528
|
+
2. **Version Control:**
|
|
529
|
+
- Store all configs in Git
|
|
530
|
+
- Use branches for testing
|
|
531
|
+
- Tag releases
|
|
532
|
+
- Document changes in commit messages
|
|
533
|
+
|
|
534
|
+
3. **Testing:**
|
|
535
|
+
- Test in staging environment
|
|
536
|
+
- Use linters (ansible-lint, shellcheck)
|
|
537
|
+
- Implement smoke tests
|
|
538
|
+
- Rollback procedures ready
|
|
539
|
+
|
|
540
|
+
### Performance Optimization
|
|
541
|
+
|
|
542
|
+
1. **Measure First:**
|
|
543
|
+
- Baseline performance metrics
|
|
544
|
+
- Identify bottlenecks before optimizing
|
|
545
|
+
- Use profiling tools
|
|
546
|
+
- Monitor after changes
|
|
547
|
+
|
|
548
|
+
2. **Incremental Changes:**
|
|
549
|
+
- One change at a time
|
|
550
|
+
- Measure impact
|
|
551
|
+
- Document tuning parameters
|
|
552
|
+
- Rollback if degraded
|
|
553
|
+
|
|
554
|
+
3. **Right-Sizing:**
|
|
555
|
+
- Match resources to workload
|
|
556
|
+
- Monitor utilization
|
|
557
|
+
- Scale when needed
|
|
558
|
+
- Avoid over-provisioning
|
|
559
|
+
|
|
560
|
+
## Anti-Patterns to Avoid
|
|
561
|
+
|
|
562
|
+
❌ **Manual configuration** - Not repeatable, error-prone
|
|
563
|
+
❌ **Root login enabled** - Security vulnerability
|
|
564
|
+
❌ **No monitoring** - Can't detect issues
|
|
565
|
+
❌ **No backups** - Risk of data loss
|
|
566
|
+
❌ **Outdated packages** - Security vulnerabilities
|
|
567
|
+
❌ **Single point of failure** - No redundancy
|
|
568
|
+
❌ **No documentation** - Knowledge silos
|
|
569
|
+
❌ **Direct production changes** - Should use config management
|
|
570
|
+
❌ **Ignoring logs** - Miss critical information
|
|
571
|
+
❌ **No testing** - Changes break production
|
|
572
|
+
|
|
573
|
+
## Common Tasks
|
|
574
|
+
|
|
575
|
+
### Task: Configure New Linux Server
|
|
576
|
+
|
|
577
|
+
1. Initial setup and security hardening
|
|
578
|
+
2. Configure firewall rules
|
|
579
|
+
3. Set up SSH key authentication
|
|
580
|
+
4. Install and configure monitoring agent
|
|
581
|
+
5. Configure log forwarding
|
|
582
|
+
6. Apply configuration management
|
|
583
|
+
7. Install required packages
|
|
584
|
+
8. Configure backups
|
|
585
|
+
9. Document server in inventory
|
|
586
|
+
10. Test and validate
|
|
587
|
+
|
|
588
|
+
### Task: Troubleshoot Performance Issue
|
|
589
|
+
|
|
590
|
+
1. Identify symptoms (slow response, high CPU)
|
|
591
|
+
2. Check system metrics (CPU, memory, disk, network)
|
|
592
|
+
3. Review logs for errors
|
|
593
|
+
4. Identify resource bottleneck
|
|
594
|
+
5. Analyze top processes
|
|
595
|
+
6. Check for configuration issues
|
|
596
|
+
7. Implement fix or optimization
|
|
597
|
+
8. Monitor after changes
|
|
598
|
+
9. Document root cause and solution
|
|
599
|
+
|
|
600
|
+
### Task: Automate with Ansible
|
|
601
|
+
|
|
602
|
+
1. Design automation workflow
|
|
603
|
+
2. Create inventory file
|
|
604
|
+
3. Write playbook and roles
|
|
605
|
+
4. Test in development environment
|
|
606
|
+
5. Use ansible-lint for validation
|
|
607
|
+
6. Test in staging environment
|
|
608
|
+
7. Document playbook purpose and variables
|
|
609
|
+
8. Deploy to production
|
|
610
|
+
9. Monitor execution
|
|
611
|
+
10. Update runbooks
|
|
612
|
+
|
|
613
|
+
## Integration Points
|
|
614
|
+
|
|
615
|
+
This skill integrates with:
|
|
616
|
+
- **platform-engineering**: Container hosts, Kubernetes nodes, infrastructure automation
|
|
617
|
+
- **devsecops**: Security scanning, hardening, compliance checks
|
|
618
|
+
- **sre**: System reliability, performance optimization, incident response
|
|
619
|
+
- **cloud-engineering**: Cloud VM management, networking, hybrid cloud
|
|
620
|
+
- **release-engineering**: Deployment automation, server provisioning
|
|
621
|
+
|
|
622
|
+
## Triggers and Activation
|
|
623
|
+
|
|
624
|
+
This skill activates when you:
|
|
625
|
+
- Work with Linux systems or servers
|
|
626
|
+
- Configure networking or firewalls
|
|
627
|
+
- Write shell scripts or automation
|
|
628
|
+
- Troubleshoot system issues
|
|
629
|
+
- Tune performance or optimize resources
|
|
630
|
+
- Implement configuration management (Ansible, Chef, Puppet)
|
|
631
|
+
- Set up monitoring or logging
|
|
632
|
+
- Manage storage or file systems
|
|
633
|
+
|
|
634
|
+
## Next Steps
|
|
635
|
+
|
|
636
|
+
For your specific task:
|
|
637
|
+
1. Identify the systems engineering requirements
|
|
638
|
+
2. Review relevant patterns and best practices
|
|
639
|
+
3. Choose appropriate tools and automation approach
|
|
640
|
+
4. Implement with configuration management
|
|
641
|
+
5. Test thoroughly in non-production
|
|
642
|
+
6. Monitor and iterate based on feedback
|
|
643
|
+
|
|
644
|
+
---
|
|
645
|
+
|
|
646
|
+
**Total Resources:** 10 detailed guides covering all aspects of systems engineering
|
|
647
|
+
**Pattern Library:** 100+ production-tested patterns for Linux administration and automation
|
|
648
|
+
**Maintained by:** Systems Engineering team based on real-world production experience
|