blockmine 1.24.0 → 1.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/README.en.md +427 -0
- package/README.md +40 -0
- package/backend/cli.js +1 -1
- package/backend/src/ai/plugin-assistant-system-prompt.md +664 -5
- package/backend/src/api/routes/bots.js +13 -0
- package/backend/src/api/routes/servers.js +14 -2
- package/backend/src/core/BotProcess.js +98 -2
- package/backend/src/core/PluginLoader.js +83 -3
- package/backend/src/core/PluginManager.js +75 -5
- package/backend/src/core/services/BotLifecycleService.js +186 -2
- package/backend/src/server.js +11 -1
- package/frontend/dist/assets/browser-ponyfill-DN7pwmHT.js +2 -0
- package/frontend/dist/assets/index-LSy71uwm.js +11261 -0
- package/frontend/dist/assets/index-SfhKxI4-.css +32 -0
- package/frontend/dist/flags/en.svg +32 -0
- package/frontend/dist/flags/ru.svg +5 -0
- package/frontend/dist/index.html +2 -2
- package/frontend/dist/locales/en/admin.json +100 -0
- package/frontend/dist/locales/en/api-keys.json +58 -0
- package/frontend/dist/locales/en/bots.json +110 -0
- package/frontend/dist/locales/en/common.json +47 -0
- package/frontend/dist/locales/en/configuration.json +22 -0
- package/frontend/dist/locales/en/console.json +10 -0
- package/frontend/dist/locales/en/dashboard.json +85 -0
- package/frontend/dist/locales/en/dialogs.json +70 -0
- package/frontend/dist/locales/en/event-graphs.json +50 -0
- package/frontend/dist/locales/en/graph-store.json +70 -0
- package/frontend/dist/locales/en/login.json +34 -0
- package/frontend/dist/locales/en/management.json +114 -0
- package/frontend/dist/locales/en/minecraft-viewer.json +27 -0
- package/frontend/dist/locales/en/nodes.json +1077 -0
- package/frontend/dist/locales/en/permissions.json +50 -0
- package/frontend/dist/locales/en/plugin-detail.json +49 -0
- package/frontend/dist/locales/en/plugins.json +110 -0
- package/frontend/dist/locales/en/proxies.json +81 -0
- package/frontend/dist/locales/en/servers.json +39 -0
- package/frontend/dist/locales/en/setup.json +17 -0
- package/frontend/dist/locales/en/sidebar.json +27 -0
- package/frontend/dist/locales/en/tasks.json +62 -0
- package/frontend/dist/locales/en/visual-editor.json +219 -0
- package/frontend/dist/locales/en/websocket.json +86 -0
- package/frontend/dist/locales/ru/admin.json +100 -0
- package/frontend/dist/locales/ru/api-keys.json +58 -0
- package/frontend/dist/locales/ru/bots.json +110 -0
- package/frontend/dist/locales/ru/common.json +49 -0
- package/frontend/dist/locales/ru/configuration.json +22 -0
- package/frontend/dist/locales/ru/console.json +10 -0
- package/frontend/dist/locales/ru/dashboard.json +85 -0
- package/frontend/dist/locales/ru/dialogs.json +70 -0
- package/frontend/dist/locales/ru/event-graphs.json +50 -0
- package/frontend/dist/locales/ru/graph-store.json +70 -0
- package/frontend/dist/locales/ru/login.json +34 -0
- package/frontend/dist/locales/ru/management.json +114 -0
- package/frontend/dist/locales/ru/minecraft-viewer.json +27 -0
- package/frontend/dist/locales/ru/nodes.json +1077 -0
- package/frontend/dist/locales/ru/permissions.json +50 -0
- package/frontend/dist/locales/ru/plugin-detail.json +49 -0
- package/frontend/dist/locales/ru/plugins.json +110 -0
- package/frontend/dist/locales/ru/proxies.json +81 -0
- package/frontend/dist/locales/ru/servers.json +39 -0
- package/frontend/dist/locales/ru/setup.json +17 -0
- package/frontend/dist/locales/ru/sidebar.json +27 -0
- package/frontend/dist/locales/ru/tasks.json +62 -0
- package/frontend/dist/locales/ru/visual-editor.json +221 -0
- package/frontend/dist/locales/ru/websocket.json +86 -0
- package/frontend/dist/monacoeditorwork/css.worker.bundle.js +7 -7
- package/frontend/dist/monacoeditorwork/html.worker.bundle.js +7 -7
- package/frontend/dist/monacoeditorwork/json.worker.bundle.js +7 -7
- package/frontend/dist/monacoeditorwork/ts.worker.bundle.js +3 -3
- package/frontend/package.json +4 -0
- package/package.json +1 -1
- package/screen/3dviewer.png +0 -0
- package/screen/console.png +0 -0
- package/screen/dashboard.png +0 -0
- package/screen/graph_collabe.png +0 -0
- package/screen/graph_live_debug.png +0 -0
- package/screen/language_selector.png +0 -0
- package/screen/management_command.png +0 -0
- package/screen/node_debug_trace.png +0 -0
- package/screen/plugin_/320/276/320/261/320/267/320/276/321/200.png +0 -0
- package/screen/websocket.png +0 -0
- package/screen//320/275/320/260/321/201/321/202/321/200/320/276/320/271/320/272/320/270_/320/276/321/202/320/264/320/265/320/273/321/214/320/275/321/213/321/205_/320/272/320/276/320/274/320/260/320/275/320/264_/320/272/320/260/320/266/320/264/321/203_/320/272/320/276/320/274/320/260/320/275/320/273/320/264/321/203_/320/274/320/276/320/266/320/275/320/276_/320/275/320/260/321/201/321/202/321/200/320/260/320/270/320/262/320/260/321/202/321/214.png +0 -0
- package/screen//320/277/320/273/320/260/320/275/320/270/321/200/320/276/320/262/321/211/320/270/320/272_/320/274/320/276/320/266/320/275/320/276_/320/267/320/260/320/264/320/260/320/262/320/260/321/202/321/214_/320/264/320/265/320/271/321/201/321/202/320/262/320/270/321/217_/320/277/320/276_/320/262/321/200/320/265/320/274/320/265/320/275/320/270.png +0 -0
- package/.claude/agents/README.md +0 -469
- package/.claude/agents/auth-route-debugger.md +0 -118
- package/.claude/agents/auth-route-tester.md +0 -93
- package/.claude/agents/auto-error-resolver.md +0 -97
- package/.claude/agents/build-optimizer.md +0 -236
- package/.claude/agents/code-architect.md +0 -34
- package/.claude/agents/code-architecture-reviewer.md +0 -83
- package/.claude/agents/code-explorer.md +0 -51
- package/.claude/agents/code-refactor-master.md +0 -94
- package/.claude/agents/code-reviewer.md +0 -46
- package/.claude/agents/cost-optimizer.md +0 -134
- package/.claude/agents/deployment-orchestrator.md +0 -113
- package/.claude/agents/documentation-architect.md +0 -82
- package/.claude/agents/frontend-error-fixer.md +0 -77
- package/.claude/agents/iac-code-generator.md +0 -71
- package/.claude/agents/incident-responder.md +0 -346
- package/.claude/agents/infrastructure-architect.md +0 -31
- package/.claude/agents/kubernetes-specialist.md +0 -56
- package/.claude/agents/migration-planner.md +0 -181
- package/.claude/agents/network-architect.md +0 -196
- package/.claude/agents/plan-reviewer.md +0 -52
- package/.claude/agents/refactor-planner.md +0 -63
- package/.claude/agents/security-scanner.md +0 -102
- package/.claude/agents/web-research-specialist.md +0 -78
- package/.claude/commands/cost-analysis.md +0 -315
- package/.claude/commands/dev-docs-update.md +0 -55
- package/.claude/commands/dev-docs.md +0 -51
- package/.claude/commands/feature-dev.md +0 -125
- package/.claude/commands/incident-debug.md +0 -247
- package/.claude/commands/infra-plan.md +0 -81
- package/.claude/commands/migration-plan.md +0 -478
- package/.claude/commands/route-research-for-testing.md +0 -37
- package/.claude/commands/security-review.md +0 -66
- package/.claude/hooks/CONFIG.md +0 -448
- package/.claude/hooks/README.md +0 -163
- package/.claude/hooks/SKILL_ACTIVATION_COMPLETE.md +0 -226
- package/.claude/hooks/WINDOWS_HOOKS_README.md +0 -151
- package/.claude/hooks/add-skill-activation-banners.ts +0 -132
- package/.claude/hooks/comprehensive-skill-test.ts +0 -1315
- package/.claude/hooks/error-handling-reminder.sh +0 -12
- package/.claude/hooks/error-handling-reminder.ts +0 -222
- package/.claude/hooks/k8s-manifest-validator.sh +0 -56
- package/.claude/hooks/package-lock.json +0 -556
- package/.claude/hooks/package.json +0 -16
- package/.claude/hooks/post-tool-use-tracker.ps1 +0 -174
- package/.claude/hooks/post-tool-use-tracker.sh +0 -183
- package/.claude/hooks/security-policy-check.sh +0 -247
- package/.claude/hooks/skill-activation-prompt.ps1 +0 -10
- package/.claude/hooks/skill-activation-prompt.sh +0 -10
- package/.claude/hooks/skill-activation-prompt.ts +0 -141
- package/.claude/hooks/stop-build-check-enhanced.sh +0 -130
- package/.claude/hooks/terraform-validator.sh +0 -53
- package/.claude/hooks/test-input.json +0 -7
- package/.claude/hooks/test-skill-activation.ts +0 -427
- package/.claude/hooks/trigger-build-resolver.sh +0 -79
- package/.claude/hooks/tsc-check.sh +0 -173
- package/.claude/hooks/tsconfig.json +0 -19
- package/.claude/settings.json +0 -59
- package/.claude/settings.local.json +0 -67
- package/.claude/skills/README.md +0 -507
- package/.claude/skills/api-engineering/SKILL.md +0 -63
- package/.claude/skills/api-engineering/resources/api-versioning.md +0 -88
- package/.claude/skills/api-engineering/resources/graphql-patterns.md +0 -106
- package/.claude/skills/api-engineering/resources/rate-limiting.md +0 -118
- package/.claude/skills/api-engineering/resources/rest-api-design.md +0 -105
- package/.claude/skills/backend-dev-guidelines/SKILL.md +0 -306
- package/.claude/skills/backend-dev-guidelines/resources/architecture-overview.md +0 -451
- package/.claude/skills/backend-dev-guidelines/resources/async-and-errors.md +0 -307
- package/.claude/skills/backend-dev-guidelines/resources/complete-examples.md +0 -638
- package/.claude/skills/backend-dev-guidelines/resources/configuration.md +0 -275
- package/.claude/skills/backend-dev-guidelines/resources/database-patterns.md +0 -224
- package/.claude/skills/backend-dev-guidelines/resources/middleware-guide.md +0 -213
- package/.claude/skills/backend-dev-guidelines/resources/routing-and-controllers.md +0 -756
- package/.claude/skills/backend-dev-guidelines/resources/sentry-and-monitoring.md +0 -336
- package/.claude/skills/backend-dev-guidelines/resources/services-and-repositories.md +0 -789
- package/.claude/skills/backend-dev-guidelines/resources/testing-guide.md +0 -235
- package/.claude/skills/backend-dev-guidelines/resources/validation-patterns.md +0 -754
- package/.claude/skills/budget-and-cost-management/SKILL.md +0 -850
- package/.claude/skills/build-engineering/SKILL.md +0 -431
- package/.claude/skills/build-engineering/resources/artifact-repositories.md +0 -72
- package/.claude/skills/build-engineering/resources/build-caching.md +0 -96
- package/.claude/skills/build-engineering/resources/build-pipelines.md +0 -105
- package/.claude/skills/build-engineering/resources/build-security.md +0 -95
- package/.claude/skills/build-engineering/resources/build-systems.md +0 -389
- package/.claude/skills/build-engineering/resources/compilation-optimization.md +0 -201
- package/.claude/skills/build-engineering/resources/dependency-management.md +0 -73
- package/.claude/skills/build-engineering/resources/monorepo-builds.md +0 -110
- package/.claude/skills/build-engineering/resources/performance-optimization.md +0 -113
- package/.claude/skills/build-engineering/resources/reproducible-builds.md +0 -82
- package/.claude/skills/cloud-engineering/SKILL.md +0 -675
- package/.claude/skills/cloud-engineering/resources/aws-patterns.md +0 -742
- package/.claude/skills/cloud-engineering/resources/azure-patterns.md +0 -714
- package/.claude/skills/cloud-engineering/resources/cleared-cloud-environments.md +0 -987
- package/.claude/skills/cloud-engineering/resources/cloud-cost-optimization.md +0 -757
- package/.claude/skills/cloud-engineering/resources/cloud-networking.md +0 -1058
- package/.claude/skills/cloud-engineering/resources/cloud-security-tools.md +0 -1530
- package/.claude/skills/cloud-engineering/resources/cloud-security.md +0 -990
- package/.claude/skills/cloud-engineering/resources/gcp-patterns.md +0 -758
- package/.claude/skills/cloud-engineering/resources/migration-strategies.md +0 -820
- package/.claude/skills/cloud-engineering/resources/multi-cloud-strategies.md +0 -670
- package/.claude/skills/cloud-engineering/resources/oci-patterns.md +0 -1198
- package/.claude/skills/cloud-engineering/resources/serverless-patterns.md +0 -795
- package/.claude/skills/cloud-engineering/resources/well-architected-frameworks.md +0 -966
- package/.claude/skills/cybersecurity/SKILL.md +0 -409
- package/.claude/skills/cybersecurity/resources/security-architecture.md +0 -266
- package/.claude/skills/database-engineering/SKILL.md +0 -61
- package/.claude/skills/database-engineering/resources/backup-and-recovery.md +0 -72
- package/.claude/skills/database-engineering/resources/database-replication.md +0 -63
- package/.claude/skills/database-engineering/resources/postgresql-fundamentals.md +0 -70
- package/.claude/skills/database-engineering/resources/query-optimization.md +0 -68
- package/.claude/skills/devsecops/SKILL.md +0 -374
- package/.claude/skills/devsecops/resources/ci-cd-security.md +0 -204
- package/.claude/skills/devsecops/resources/compliance-automation.md +0 -530
- package/.claude/skills/devsecops/resources/compliance-frameworks.md +0 -2322
- package/.claude/skills/devsecops/resources/container-security.md +0 -915
- package/.claude/skills/devsecops/resources/cspm-integration.md +0 -1440
- package/.claude/skills/devsecops/resources/policy-enforcement.md +0 -619
- package/.claude/skills/devsecops/resources/secrets-management.md +0 -755
- package/.claude/skills/devsecops/resources/security-monitoring.md +0 -146
- package/.claude/skills/devsecops/resources/security-scanning.md +0 -887
- package/.claude/skills/devsecops/resources/security-testing.md +0 -203
- package/.claude/skills/devsecops/resources/supply-chain-security.md +0 -518
- package/.claude/skills/devsecops/resources/vulnerability-management.md +0 -481
- package/.claude/skills/devsecops/resources/zero-trust-architecture.md +0 -177
- package/.claude/skills/documentation-as-code/SKILL.md +0 -323
- package/.claude/skills/documentation-as-code/resources/api-documentation.md +0 -90
- package/.claude/skills/documentation-as-code/resources/changelog-management.md +0 -79
- package/.claude/skills/documentation-as-code/resources/diagram-generation.md +0 -44
- package/.claude/skills/documentation-as-code/resources/docs-as-code-workflow.md +0 -99
- package/.claude/skills/documentation-as-code/resources/documentation-automation.md +0 -68
- package/.claude/skills/documentation-as-code/resources/documentation-sites.md +0 -79
- package/.claude/skills/documentation-as-code/resources/markdown-best-practices.md +0 -162
- package/.claude/skills/documentation-as-code/resources/openapi-specification.md +0 -77
- package/.claude/skills/documentation-as-code/resources/readme-engineering.md +0 -60
- package/.claude/skills/documentation-as-code/resources/technical-writing-guide.md +0 -202
- package/.claude/skills/engineering-management/SKILL.md +0 -356
- package/.claude/skills/engineering-management/resources/career-ladders.md +0 -609
- package/.claude/skills/engineering-management/resources/hiring-and-assessment.md +0 -555
- package/.claude/skills/engineering-management/resources/one-on-one-guides.md +0 -609
- package/.claude/skills/engineering-management/resources/resource-planning.md +0 -557
- package/.claude/skills/engineering-management/resources/team-organization-patterns.md +0 -491
- package/.claude/skills/engineering-management/resources/technical-interviews.md +0 -474
- package/.claude/skills/engineering-operations-management/SKILL.md +0 -817
- package/.claude/skills/error-tracking/SKILL.md +0 -379
- package/.claude/skills/frontend-design/SKILL.md +0 -42
- package/.claude/skills/frontend-dev-guidelines/SKILL.md +0 -403
- package/.claude/skills/frontend-dev-guidelines/resources/common-patterns.md +0 -331
- package/.claude/skills/frontend-dev-guidelines/resources/complete-examples.md +0 -872
- package/.claude/skills/frontend-dev-guidelines/resources/component-patterns.md +0 -502
- package/.claude/skills/frontend-dev-guidelines/resources/data-fetching.md +0 -767
- package/.claude/skills/frontend-dev-guidelines/resources/file-organization.md +0 -502
- package/.claude/skills/frontend-dev-guidelines/resources/loading-and-error-states.md +0 -501
- package/.claude/skills/frontend-dev-guidelines/resources/performance.md +0 -406
- package/.claude/skills/frontend-dev-guidelines/resources/routing-guide.md +0 -364
- package/.claude/skills/frontend-dev-guidelines/resources/styling-guide.md +0 -428
- package/.claude/skills/frontend-dev-guidelines/resources/typescript-standards.md +0 -418
- package/.claude/skills/general-it-engineering/SKILL.md +0 -393
- package/.claude/skills/general-it-engineering/resources/asset-management.md +0 -712
- package/.claude/skills/general-it-engineering/resources/automation-orchestration.md +0 -817
- package/.claude/skills/general-it-engineering/resources/business-continuity.md +0 -786
- package/.claude/skills/general-it-engineering/resources/change-management.md +0 -715
- package/.claude/skills/general-it-engineering/resources/enterprise-monitoring.md +0 -729
- package/.claude/skills/general-it-engineering/resources/help-desk-operations.md +0 -738
- package/.claude/skills/general-it-engineering/resources/incident-service-management.md +0 -834
- package/.claude/skills/general-it-engineering/resources/it-governance.md +0 -753
- package/.claude/skills/general-it-engineering/resources/itil-framework.md +0 -503
- package/.claude/skills/general-it-engineering/resources/service-management.md +0 -669
- package/.claude/skills/infrastructure-architecture/SKILL.md +0 -328
- package/.claude/skills/infrastructure-architecture/resources/architecture-decision-records.md +0 -505
- package/.claude/skills/infrastructure-architecture/resources/architecture-patterns.md +0 -528
- package/.claude/skills/infrastructure-architecture/resources/capacity-planning.md +0 -453
- package/.claude/skills/infrastructure-architecture/resources/cleared-environment-architecture.md +0 -773
- package/.claude/skills/infrastructure-architecture/resources/cost-architecture.md +0 -499
- package/.claude/skills/infrastructure-architecture/resources/data-architecture.md +0 -501
- package/.claude/skills/infrastructure-architecture/resources/disaster-recovery.md +0 -535
- package/.claude/skills/infrastructure-architecture/resources/migration-architecture.md +0 -512
- package/.claude/skills/infrastructure-architecture/resources/multi-region-design.md +0 -608
- package/.claude/skills/infrastructure-architecture/resources/reference-architectures.md +0 -562
- package/.claude/skills/infrastructure-architecture/resources/security-architecture.md +0 -538
- package/.claude/skills/infrastructure-architecture/resources/system-design-principles.md +0 -489
- package/.claude/skills/infrastructure-architecture/resources/workload-classification.md +0 -1000
- package/.claude/skills/infrastructure-strategy/SKILL.md +0 -924
- package/.claude/skills/network-engineering/SKILL.md +0 -385
- package/.claude/skills/network-engineering/resources/dns-management.md +0 -738
- package/.claude/skills/network-engineering/resources/load-balancing.md +0 -820
- package/.claude/skills/network-engineering/resources/network-architecture.md +0 -546
- package/.claude/skills/network-engineering/resources/network-security.md +0 -921
- package/.claude/skills/network-engineering/resources/network-troubleshooting.md +0 -749
- package/.claude/skills/network-engineering/resources/routing-switching.md +0 -373
- package/.claude/skills/network-engineering/resources/sdn-networking.md +0 -695
- package/.claude/skills/network-engineering/resources/service-mesh-networking.md +0 -777
- package/.claude/skills/network-engineering/resources/tcp-ip-protocols.md +0 -444
- package/.claude/skills/network-engineering/resources/vpn-connectivity.md +0 -672
- package/.claude/skills/node-development/SKILL.md +0 -317
- package/.claude/skills/observability-engineering/SKILL.md +0 -101
- package/.claude/skills/observability-engineering/resources/apm-tools.md +0 -97
- package/.claude/skills/observability-engineering/resources/correlation-strategies.md +0 -87
- package/.claude/skills/observability-engineering/resources/distributed-tracing.md +0 -98
- package/.claude/skills/observability-engineering/resources/logs-aggregation.md +0 -118
- package/.claude/skills/observability-engineering/resources/observability-cost-optimization.md +0 -141
- package/.claude/skills/observability-engineering/resources/opentelemetry.md +0 -110
- package/.claude/skills/platform-engineering/SKILL.md +0 -555
- package/.claude/skills/platform-engineering/resources/architecture-overview.md +0 -600
- package/.claude/skills/platform-engineering/resources/container-orchestration.md +0 -916
- package/.claude/skills/platform-engineering/resources/cost-optimization.md +0 -634
- package/.claude/skills/platform-engineering/resources/developer-platforms.md +0 -670
- package/.claude/skills/platform-engineering/resources/gitops-automation.md +0 -650
- package/.claude/skills/platform-engineering/resources/infrastructure-as-code.md +0 -778
- package/.claude/skills/platform-engineering/resources/infrastructure-standards.md +0 -708
- package/.claude/skills/platform-engineering/resources/multi-tenancy.md +0 -602
- package/.claude/skills/platform-engineering/resources/platform-security.md +0 -711
- package/.claude/skills/platform-engineering/resources/resource-management.md +0 -592
- package/.claude/skills/platform-engineering/resources/service-mesh.md +0 -628
- package/.claude/skills/release-engineering/SKILL.md +0 -393
- package/.claude/skills/release-engineering/resources/artifact-management.md +0 -108
- package/.claude/skills/release-engineering/resources/build-optimization.md +0 -84
- package/.claude/skills/release-engineering/resources/ci-cd-pipelines.md +0 -411
- package/.claude/skills/release-engineering/resources/deployment-strategies.md +0 -197
- package/.claude/skills/release-engineering/resources/pipeline-security.md +0 -62
- package/.claude/skills/release-engineering/resources/progressive-delivery.md +0 -83
- package/.claude/skills/release-engineering/resources/release-automation.md +0 -68
- package/.claude/skills/release-engineering/resources/release-orchestration.md +0 -77
- package/.claude/skills/release-engineering/resources/rollback-strategies.md +0 -66
- package/.claude/skills/release-engineering/resources/versioning-strategies.md +0 -59
- package/.claude/skills/route-tester/SKILL.md +0 -392
- package/.claude/skills/skill-developer/ADVANCED.md +0 -197
- package/.claude/skills/skill-developer/HOOK_MECHANISMS.md +0 -306
- package/.claude/skills/skill-developer/PATTERNS_LIBRARY.md +0 -152
- package/.claude/skills/skill-developer/SKILL.md +0 -430
- package/.claude/skills/skill-developer/SKILL_RULES_REFERENCE.md +0 -315
- package/.claude/skills/skill-developer/TRIGGER_TYPES.md +0 -305
- package/.claude/skills/skill-developer/TROUBLESHOOTING.md +0 -514
- package/.claude/skills/skill-rules.json +0 -2989
- package/.claude/skills/sre/SKILL.md +0 -464
- package/.claude/skills/sre/resources/alerting-best-practices.md +0 -282
- package/.claude/skills/sre/resources/capacity-planning.md +0 -226
- package/.claude/skills/sre/resources/chaos-engineering.md +0 -193
- package/.claude/skills/sre/resources/disaster-recovery.md +0 -232
- package/.claude/skills/sre/resources/incident-management.md +0 -436
- package/.claude/skills/sre/resources/observability-stack.md +0 -240
- package/.claude/skills/sre/resources/on-call-runbooks.md +0 -167
- package/.claude/skills/sre/resources/performance-optimization.md +0 -108
- package/.claude/skills/sre/resources/reliability-patterns.md +0 -183
- package/.claude/skills/sre/resources/slo-sli-sla.md +0 -464
- package/.claude/skills/sre/resources/toil-reduction.md +0 -145
- package/.claude/skills/systems-engineering/SKILL.md +0 -648
- package/.claude/skills/systems-engineering/resources/automation-patterns.md +0 -771
- package/.claude/skills/systems-engineering/resources/configuration-management.md +0 -998
- package/.claude/skills/systems-engineering/resources/linux-administration.md +0 -672
- package/.claude/skills/systems-engineering/resources/networking-fundamentals.md +0 -982
- package/.claude/skills/systems-engineering/resources/performance-tuning.md +0 -871
- package/.claude/skills/systems-engineering/resources/powershell-scripting.md +0 -482
- package/.claude/skills/systems-engineering/resources/security-hardening.md +0 -739
- package/.claude/skills/systems-engineering/resources/shell-scripting.md +0 -915
- package/.claude/skills/systems-engineering/resources/storage-management.md +0 -628
- package/.claude/skills/systems-engineering/resources/system-monitoring.md +0 -787
- package/.claude/skills/systems-engineering/resources/troubleshooting-guide.md +0 -753
- package/.claude/skills/systems-engineering/resources/windows-administration.md +0 -738
- package/.claude/skills/technical-leadership/SKILL.md +0 -728
- package/backend/docs/SECRETS_DOCUMENTATION.md +0 -327
- package/frontend/dist/assets/index-BC-NbKXi.css +0 -32
- package/frontend/dist/assets/index-DqJXZMHY.js +0 -11266
|
@@ -1,427 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { readFileSync } from 'fs';
|
|
3
|
-
import { join, dirname } from 'path';
|
|
4
|
-
import { fileURLToPath } from 'url';
|
|
5
|
-
import { exec } from 'child_process';
|
|
6
|
-
import { promisify } from 'util';
|
|
7
|
-
|
|
8
|
-
const execAsync = promisify(exec);
|
|
9
|
-
|
|
10
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
-
const __dirname = dirname(__filename);
|
|
12
|
-
|
|
13
|
-
interface TestCase {
|
|
14
|
-
domain: string;
|
|
15
|
-
prompt: string;
|
|
16
|
-
expectedSkills: string[];
|
|
17
|
-
description: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const TEST_CASES: TestCase[] = [
|
|
21
|
-
// Development Skills
|
|
22
|
-
{
|
|
23
|
-
domain: "Backend Development",
|
|
24
|
-
prompt: "I need to create a new API endpoint for user authentication",
|
|
25
|
-
expectedSkills: ["backend-dev-guidelines"],
|
|
26
|
-
description: "API endpoint creation"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
domain: "Backend Development",
|
|
30
|
-
prompt: "How do I implement middleware for request validation?",
|
|
31
|
-
expectedSkills: ["backend-dev-guidelines"],
|
|
32
|
-
description: "Middleware implementation"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
domain: "Backend Development",
|
|
36
|
-
prompt: "I want to add a new route to my Express server",
|
|
37
|
-
expectedSkills: ["backend-dev-guidelines"],
|
|
38
|
-
description: "Express routing"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
domain: "Frontend Development",
|
|
42
|
-
prompt: "Create a React component for displaying user profiles",
|
|
43
|
-
expectedSkills: ["frontend-dev-guidelines"],
|
|
44
|
-
description: "React component creation"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
domain: "Frontend Development",
|
|
48
|
-
prompt: "I need to add a modal dialog with MUI",
|
|
49
|
-
expectedSkills: ["frontend-dev-guidelines"],
|
|
50
|
-
description: "MUI component usage"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
domain: "Frontend Development",
|
|
54
|
-
prompt: "How do I use Suspense for data fetching?",
|
|
55
|
-
expectedSkills: ["frontend-dev-guidelines"],
|
|
56
|
-
description: "Suspense pattern"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
domain: "Error Tracking",
|
|
60
|
-
prompt: "I need to add Sentry error tracking to my service",
|
|
61
|
-
expectedSkills: ["error-tracking", "backend-dev-guidelines"],
|
|
62
|
-
description: "Sentry integration"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
domain: "Error Tracking",
|
|
66
|
-
prompt: "How do I capture exceptions in my controllers?",
|
|
67
|
-
expectedSkills: ["error-tracking", "backend-dev-guidelines"],
|
|
68
|
-
description: "Exception capture"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
domain: "Route Testing",
|
|
72
|
-
prompt: "I want to test my API routes with authentication",
|
|
73
|
-
expectedSkills: ["route-tester", "backend-dev-guidelines"],
|
|
74
|
-
description: "Authenticated route testing"
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
// Infrastructure Skills
|
|
78
|
-
{
|
|
79
|
-
domain: "Cloud Engineering",
|
|
80
|
-
prompt: "I need to deploy my application to AWS",
|
|
81
|
-
expectedSkills: ["cloud-engineering"],
|
|
82
|
-
description: "AWS deployment"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
domain: "Cloud Engineering",
|
|
86
|
-
prompt: "How do I set up a serverless architecture with Lambda?",
|
|
87
|
-
expectedSkills: ["cloud-engineering"],
|
|
88
|
-
description: "Serverless with Lambda"
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
domain: "Cloud Engineering",
|
|
92
|
-
prompt: "What's the best way to optimize cloud costs?",
|
|
93
|
-
expectedSkills: ["cloud-engineering", "budget-and-cost-management"],
|
|
94
|
-
description: "Cloud cost optimization"
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
domain: "Cloud Engineering",
|
|
98
|
-
prompt: "We need to deploy to Azure Government cloud for FedRAMP compliance",
|
|
99
|
-
expectedSkills: ["cloud-engineering", "devsecops"],
|
|
100
|
-
description: "Government cloud with compliance"
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
domain: "Kubernetes",
|
|
104
|
-
prompt: "I need to set up a Kubernetes cluster for production",
|
|
105
|
-
expectedSkills: ["platform-engineering"],
|
|
106
|
-
description: "Kubernetes setup"
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
domain: "Kubernetes",
|
|
110
|
-
prompt: "How do I configure Helm charts for my application?",
|
|
111
|
-
expectedSkills: ["platform-engineering"],
|
|
112
|
-
description: "Helm configuration"
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
domain: "Security",
|
|
116
|
-
prompt: "I need to implement security scanning in my CI/CD pipeline",
|
|
117
|
-
expectedSkills: ["devsecops"],
|
|
118
|
-
description: "Security scanning setup"
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
domain: "Security",
|
|
122
|
-
prompt: "How do I secure container images?",
|
|
123
|
-
expectedSkills: ["devsecops"],
|
|
124
|
-
description: "Container security"
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
domain: "Security",
|
|
128
|
-
prompt: "We need to pass a CMMC audit",
|
|
129
|
-
expectedSkills: ["devsecops"],
|
|
130
|
-
description: "CMMC compliance"
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
domain: "SRE",
|
|
134
|
-
prompt: "I need to define SLOs for our service",
|
|
135
|
-
expectedSkills: ["sre"],
|
|
136
|
-
description: "SLO definition"
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
domain: "SRE",
|
|
140
|
-
prompt: "How do I set up monitoring and alerting?",
|
|
141
|
-
expectedSkills: ["sre", "observability-engineering"],
|
|
142
|
-
description: "Monitoring setup"
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
domain: "SRE",
|
|
146
|
-
prompt: "We're having an outage, how do I debug?",
|
|
147
|
-
expectedSkills: ["sre"],
|
|
148
|
-
description: "Incident response"
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
domain: "Architecture",
|
|
152
|
-
prompt: "I need to design a multi-region architecture",
|
|
153
|
-
expectedSkills: ["infrastructure-architecture"],
|
|
154
|
-
description: "Multi-region design"
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
domain: "Architecture",
|
|
158
|
-
prompt: "How do I write an ADR for our system?",
|
|
159
|
-
expectedSkills: ["infrastructure-architecture"],
|
|
160
|
-
description: "ADR creation"
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
domain: "Architecture",
|
|
164
|
-
prompt: "We need disaster recovery planning",
|
|
165
|
-
expectedSkills: ["infrastructure-architecture"],
|
|
166
|
-
description: "DR planning"
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
domain: "Database",
|
|
170
|
-
prompt: "My PostgreSQL queries are slow",
|
|
171
|
-
expectedSkills: ["database-engineering"],
|
|
172
|
-
description: "Query optimization"
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
domain: "Database",
|
|
176
|
-
prompt: "How do I set up database replication?",
|
|
177
|
-
expectedSkills: ["database-engineering"],
|
|
178
|
-
description: "Database replication"
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
domain: "Observability",
|
|
182
|
-
prompt: "I need to implement distributed tracing",
|
|
183
|
-
expectedSkills: ["observability-engineering"],
|
|
184
|
-
description: "Distributed tracing"
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
domain: "Observability",
|
|
188
|
-
prompt: "How do I set up OpenTelemetry?",
|
|
189
|
-
expectedSkills: ["observability-engineering"],
|
|
190
|
-
description: "OpenTelemetry setup"
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
domain: "API Design",
|
|
194
|
-
prompt: "I'm designing a GraphQL API",
|
|
195
|
-
expectedSkills: ["api-engineering"],
|
|
196
|
-
description: "GraphQL design"
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
domain: "API Design",
|
|
200
|
-
prompt: "How do I implement rate limiting for my API?",
|
|
201
|
-
expectedSkills: ["api-engineering", "backend-dev-guidelines"],
|
|
202
|
-
description: "Rate limiting"
|
|
203
|
-
},
|
|
204
|
-
|
|
205
|
-
// Management Skills
|
|
206
|
-
{
|
|
207
|
-
domain: "Engineering Management",
|
|
208
|
-
prompt: "I need to hire a senior engineer",
|
|
209
|
-
expectedSkills: ["engineering-management"],
|
|
210
|
-
description: "Hiring process"
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
domain: "Engineering Management",
|
|
214
|
-
prompt: "How do I structure my team for better productivity?",
|
|
215
|
-
expectedSkills: ["engineering-management"],
|
|
216
|
-
description: "Team structure"
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
domain: "Engineering Management",
|
|
220
|
-
prompt: "I need to prepare for 1-on-1s with my reports",
|
|
221
|
-
expectedSkills: ["engineering-management"],
|
|
222
|
-
description: "1-on-1 preparation"
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
domain: "Technical Leadership",
|
|
226
|
-
prompt: "My team wants to rewrite everything in Rust",
|
|
227
|
-
expectedSkills: ["technical-leadership"],
|
|
228
|
-
description: "Technology decision"
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
domain: "Technical Leadership",
|
|
232
|
-
prompt: "Should we adopt microservices architecture?",
|
|
233
|
-
expectedSkills: ["technical-leadership", "infrastructure-architecture"],
|
|
234
|
-
description: "Architecture decision"
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
domain: "Technical Leadership",
|
|
238
|
-
prompt: "How do I evaluate this technical proposal?",
|
|
239
|
-
expectedSkills: ["technical-leadership"],
|
|
240
|
-
description: "Proposal evaluation"
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
domain: "Infrastructure Strategy",
|
|
244
|
-
prompt: "Should we build or buy our authentication system?",
|
|
245
|
-
expectedSkills: ["infrastructure-strategy"],
|
|
246
|
-
description: "Build vs buy decision"
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
domain: "Infrastructure Strategy",
|
|
250
|
-
prompt: "I need to create a 3-year infrastructure roadmap",
|
|
251
|
-
expectedSkills: ["infrastructure-strategy"],
|
|
252
|
-
description: "Multi-year roadmap"
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
domain: "Budget Management",
|
|
256
|
-
prompt: "Our AWS bill is too high, how do I reduce costs?",
|
|
257
|
-
expectedSkills: ["budget-and-cost-management", "cloud-engineering"],
|
|
258
|
-
description: "Cost reduction"
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
domain: "Budget Management",
|
|
262
|
-
prompt: "I need to prepare an infrastructure budget request",
|
|
263
|
-
expectedSkills: ["budget-and-cost-management"],
|
|
264
|
-
description: "Budget planning"
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
domain: "Operations Management",
|
|
268
|
-
prompt: "How do I set up an on-call rotation?",
|
|
269
|
-
expectedSkills: ["engineering-operations-management"],
|
|
270
|
-
description: "On-call setup"
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
domain: "Operations Management",
|
|
274
|
-
prompt: "We need to write a postmortem for the outage",
|
|
275
|
-
expectedSkills: ["engineering-operations-management", "sre"],
|
|
276
|
-
description: "Postmortem process"
|
|
277
|
-
},
|
|
278
|
-
|
|
279
|
-
// Skill Development
|
|
280
|
-
{
|
|
281
|
-
domain: "Skill Development",
|
|
282
|
-
prompt: "How do I create a new Claude Code skill?",
|
|
283
|
-
expectedSkills: ["skill-developer"],
|
|
284
|
-
description: "Skill creation"
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
domain: "Skill Development",
|
|
288
|
-
prompt: "I need to modify skill-rules.json",
|
|
289
|
-
expectedSkills: ["skill-developer"],
|
|
290
|
-
description: "Skill rules modification"
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
domain: "Skill Development",
|
|
294
|
-
prompt: "How do skill triggers work?",
|
|
295
|
-
expectedSkills: ["skill-developer"],
|
|
296
|
-
description: "Skill triggers understanding"
|
|
297
|
-
},
|
|
298
|
-
|
|
299
|
-
// Mixed/Complex Scenarios
|
|
300
|
-
{
|
|
301
|
-
domain: "Full Stack Project",
|
|
302
|
-
prompt: "I'm building a web app with React frontend and Express backend",
|
|
303
|
-
expectedSkills: ["frontend-dev-guidelines", "backend-dev-guidelines"],
|
|
304
|
-
description: "Full stack development"
|
|
305
|
-
},
|
|
306
|
-
{
|
|
307
|
-
domain: "Cloud Migration",
|
|
308
|
-
prompt: "We need to migrate our monolith to microservices on AWS",
|
|
309
|
-
expectedSkills: ["cloud-engineering", "infrastructure-architecture"],
|
|
310
|
-
description: "Cloud migration planning"
|
|
311
|
-
},
|
|
312
|
-
{
|
|
313
|
-
domain: "Secure Production",
|
|
314
|
-
prompt: "I need to deploy to production with security scanning and monitoring",
|
|
315
|
-
expectedSkills: ["devsecops", "platform-engineering", "observability-engineering"],
|
|
316
|
-
description: "Secure production deployment"
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
domain: "Compliance & Cloud",
|
|
320
|
-
prompt: "Deploy HIPAA-compliant healthcare app to AWS",
|
|
321
|
-
expectedSkills: ["cloud-engineering", "devsecops"],
|
|
322
|
-
description: "Compliance cloud deployment"
|
|
323
|
-
},
|
|
324
|
-
];
|
|
325
|
-
|
|
326
|
-
async function testHook(prompt: string): Promise<string> {
|
|
327
|
-
const projectDir = join(__dirname, '..', '..');
|
|
328
|
-
const hookScript = join(__dirname, 'skill-activation-prompt.sh');
|
|
329
|
-
const input = JSON.stringify({
|
|
330
|
-
session_id: "test-session",
|
|
331
|
-
prompt: prompt,
|
|
332
|
-
cwd: process.cwd(),
|
|
333
|
-
permission_mode: "acceptEdits",
|
|
334
|
-
transcript_path: "/tmp/test"
|
|
335
|
-
});
|
|
336
|
-
|
|
337
|
-
try {
|
|
338
|
-
const { stdout } = await execAsync(`export CLAUDE_PROJECT_DIR="${projectDir}" && echo '${input.replace(/'/g, "'\\''")}' | ${hookScript}`);
|
|
339
|
-
return stdout;
|
|
340
|
-
} catch (error: any) {
|
|
341
|
-
return error.stdout || '';
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
function extractSkillsFromOutput(output: string): string[] {
|
|
346
|
-
const skills: string[] = [];
|
|
347
|
-
const lines = output.split('\n');
|
|
348
|
-
|
|
349
|
-
for (const line of lines) {
|
|
350
|
-
if (line.trim().startsWith('→')) {
|
|
351
|
-
const match = line.match(/→\s*([a-z-]+)/);
|
|
352
|
-
if (match) {
|
|
353
|
-
skills.push(match[1]);
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
return skills;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
async function runTests() {
|
|
362
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
363
|
-
console.log('🧪 COMPREHENSIVE SKILL ACTIVATION TESTING');
|
|
364
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
|
|
365
|
-
|
|
366
|
-
let passed = 0;
|
|
367
|
-
let failed = 0;
|
|
368
|
-
let warnings = 0;
|
|
369
|
-
|
|
370
|
-
for (const testCase of TEST_CASES) {
|
|
371
|
-
console.log(`\n📝 Testing: ${testCase.domain} - ${testCase.description}`);
|
|
372
|
-
console.log(` Prompt: "${testCase.prompt}"`);
|
|
373
|
-
console.log(` Expected skills: ${testCase.expectedSkills.join(', ')}`);
|
|
374
|
-
|
|
375
|
-
const output = await testHook(testCase.prompt);
|
|
376
|
-
const detectedSkills = extractSkillsFromOutput(output);
|
|
377
|
-
|
|
378
|
-
console.log(` Detected skills: ${detectedSkills.length > 0 ? detectedSkills.join(', ') : 'none'}`);
|
|
379
|
-
|
|
380
|
-
// Check if at least one expected skill was detected
|
|
381
|
-
const hasExpectedSkill = testCase.expectedSkills.some(expected =>
|
|
382
|
-
detectedSkills.includes(expected)
|
|
383
|
-
);
|
|
384
|
-
|
|
385
|
-
if (hasExpectedSkill) {
|
|
386
|
-
console.log(` ✅ PASS - Detected expected skill(s)`);
|
|
387
|
-
passed++;
|
|
388
|
-
|
|
389
|
-
// Warn if extra skills detected
|
|
390
|
-
const extraSkills = detectedSkills.filter(s => !testCase.expectedSkills.includes(s));
|
|
391
|
-
if (extraSkills.length > 0) {
|
|
392
|
-
console.log(` ⚠️ Additional skills detected: ${extraSkills.join(', ')}`);
|
|
393
|
-
warnings++;
|
|
394
|
-
}
|
|
395
|
-
} else if (detectedSkills.length === 0) {
|
|
396
|
-
console.log(` ❌ FAIL - No skills detected`);
|
|
397
|
-
failed++;
|
|
398
|
-
} else {
|
|
399
|
-
console.log(` ⚠️ PARTIAL - Detected different skills: ${detectedSkills.join(', ')}`);
|
|
400
|
-
warnings++;
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
console.log('\n');
|
|
405
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
406
|
-
console.log('📊 TEST RESULTS');
|
|
407
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
408
|
-
console.log(` Total Tests: ${TEST_CASES.length}`);
|
|
409
|
-
console.log(` ✅ Passed: ${passed}`);
|
|
410
|
-
console.log(` ❌ Failed: ${failed}`);
|
|
411
|
-
console.log(` ⚠️ Warnings: ${warnings}`);
|
|
412
|
-
console.log(` Success Rate: ${((passed / TEST_CASES.length) * 100).toFixed(1)}%`);
|
|
413
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
|
|
414
|
-
|
|
415
|
-
if (failed > 0) {
|
|
416
|
-
console.log('⚠️ Some tests failed. Review the skill-rules.json patterns.');
|
|
417
|
-
process.exit(1);
|
|
418
|
-
} else {
|
|
419
|
-
console.log('✅ All tests passed! Skill activation system is working correctly.');
|
|
420
|
-
process.exit(0);
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
runTests().catch(err => {
|
|
425
|
-
console.error('Error running tests:', err);
|
|
426
|
-
process.exit(1);
|
|
427
|
-
});
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
echo "Hook triggered at $(date)" >> /tmp/claude-hook-debug.log
|
|
3
|
-
echo "Args: $@" >> /tmp/claude-hook-debug.log
|
|
4
|
-
echo "Stdin:" >> /tmp/claude-hook-debug.log
|
|
5
|
-
cat >> /tmp/claude-hook-debug.log
|
|
6
|
-
|
|
7
|
-
# Add detailed debugging
|
|
8
|
-
echo "=== DEBUG SECTION ===" >> /tmp/claude-hook-debug.log
|
|
9
|
-
echo "CLAUDE_PROJECT_DIR: $CLAUDE_PROJECT_DIR" >> /tmp/claude-hook-debug.log
|
|
10
|
-
echo "Current working directory: $(pwd)" >> /tmp/claude-hook-debug.log
|
|
11
|
-
|
|
12
|
-
# Define the service directories to check
|
|
13
|
-
services_dirs=("email" "exports" "form" "frontend" "projects" "uploads" "users" "utilities" "events" "database")
|
|
14
|
-
services_with_changes=()
|
|
15
|
-
|
|
16
|
-
# Check each service directory for git changes
|
|
17
|
-
for service in "${services_dirs[@]}"; do
|
|
18
|
-
service_path="$CLAUDE_PROJECT_DIR/$service"
|
|
19
|
-
echo "Checking service: $service at $service_path" >> /tmp/claude-hook-debug.log
|
|
20
|
-
|
|
21
|
-
# Check if directory exists and is a git repo
|
|
22
|
-
if [ -d "$service_path" ] && [ -d "$service_path/.git" ]; then
|
|
23
|
-
echo " -> Is a git repository" >> /tmp/claude-hook-debug.log
|
|
24
|
-
|
|
25
|
-
# Check for changes in this specific repo
|
|
26
|
-
cd "$service_path"
|
|
27
|
-
git_status=$(git status --porcelain 2>/dev/null)
|
|
28
|
-
|
|
29
|
-
if [ -n "$git_status" ]; then
|
|
30
|
-
echo " -> Has changes:" >> /tmp/claude-hook-debug.log
|
|
31
|
-
echo "$git_status" | sed 's/^/ /' >> /tmp/claude-hook-debug.log
|
|
32
|
-
services_with_changes+=("$service")
|
|
33
|
-
else
|
|
34
|
-
echo " -> No changes" >> /tmp/claude-hook-debug.log
|
|
35
|
-
fi
|
|
36
|
-
else
|
|
37
|
-
echo " -> Not a git repository or doesn't exist" >> /tmp/claude-hook-debug.log
|
|
38
|
-
fi
|
|
39
|
-
done
|
|
40
|
-
|
|
41
|
-
# Return to original directory
|
|
42
|
-
cd "$CLAUDE_PROJECT_DIR"
|
|
43
|
-
|
|
44
|
-
echo "Services with changes: ${services_with_changes[@]}" >> /tmp/claude-hook-debug.log
|
|
45
|
-
|
|
46
|
-
if [[ ${#services_with_changes[@]} -gt 0 ]]; then
|
|
47
|
-
services_list=$(IFS=', '; echo "${services_with_changes[*]}")
|
|
48
|
-
echo "Changes detected in: $services_list — triggering build-error-resolver..." >> /tmp/claude-hook-debug.log
|
|
49
|
-
echo "Changes detected in: $services_list — triggering build-error-resolver..." >&2
|
|
50
|
-
|
|
51
|
-
# Use the correct Claude CLI syntax - try different options
|
|
52
|
-
echo "Attempting to run claude with sub-agent..." >> /tmp/claude-hook-debug.log
|
|
53
|
-
|
|
54
|
-
# Try different possible syntaxes for sub-agents
|
|
55
|
-
if command -v claude >/dev/null 2>&1; then
|
|
56
|
-
# Option 1: Try direct agent invocation
|
|
57
|
-
claude --agent build-error-resolver <<EOF 2>> /tmp/claude-hook-debug.log
|
|
58
|
-
Build and fix errors in these specific services only: ${services_list}
|
|
59
|
-
|
|
60
|
-
Focus on these services in the monorepo structure. Each service has its own build process.
|
|
61
|
-
EOF
|
|
62
|
-
|
|
63
|
-
# If that fails, try alternative syntax
|
|
64
|
-
if [ $? -ne 0 ]; then
|
|
65
|
-
echo "First attempt failed, trying alternative syntax..." >> /tmp/claude-hook-debug.log
|
|
66
|
-
claude chat "Use the build-error-resolver agent to build and fix errors in: ${services_list}" 2>> /tmp/claude-hook-debug.log
|
|
67
|
-
fi
|
|
68
|
-
else
|
|
69
|
-
echo "Claude CLI not found in PATH" >> /tmp/claude-hook-debug.log
|
|
70
|
-
fi
|
|
71
|
-
|
|
72
|
-
echo "Claude command completed with exit code: $?" >> /tmp/claude-hook-debug.log
|
|
73
|
-
else
|
|
74
|
-
echo "No services with changes detected — skipping build-error-resolver." >> /tmp/claude-hook-debug.log
|
|
75
|
-
echo "No services with changes detected — skipping build-error-resolver." >&2
|
|
76
|
-
fi
|
|
77
|
-
|
|
78
|
-
echo "=== END DEBUG SECTION ===" >> /tmp/claude-hook-debug.log
|
|
79
|
-
exit 0
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# TSC Hook with Visible Output
|
|
4
|
-
# Uses stderr for visibility in Claude Code main interface
|
|
5
|
-
|
|
6
|
-
export CLAUDE_PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$HOME/project}"
|
|
7
|
-
HOOK_INPUT=$(cat)
|
|
8
|
-
SESSION_ID="${session_id:-default}"
|
|
9
|
-
CACHE_DIR="$HOME/.claude/tsc-cache/$SESSION_ID"
|
|
10
|
-
|
|
11
|
-
# Create cache directory
|
|
12
|
-
mkdir -p "$CACHE_DIR"
|
|
13
|
-
|
|
14
|
-
# Extract tool name and input
|
|
15
|
-
TOOL_NAME=$(echo "$HOOK_INPUT" | jq -r '.tool_name // ""')
|
|
16
|
-
TOOL_INPUT=$(echo "$HOOK_INPUT" | jq -r '.tool_input // {}')
|
|
17
|
-
|
|
18
|
-
# Function to get repo for a file
|
|
19
|
-
get_repo_for_file() {
|
|
20
|
-
local file_path="$1"
|
|
21
|
-
local relative_path="${file_path#$CLAUDE_PROJECT_DIR/}"
|
|
22
|
-
|
|
23
|
-
if [[ "$relative_path" =~ ^([^/]+)/ ]]; then
|
|
24
|
-
local repo="${BASH_REMATCH[1]}"
|
|
25
|
-
case "$repo" in
|
|
26
|
-
email|exports|form|frontend|projects|uploads|users|utilities|events|database)
|
|
27
|
-
echo "$repo"
|
|
28
|
-
return 0
|
|
29
|
-
;;
|
|
30
|
-
esac
|
|
31
|
-
fi
|
|
32
|
-
echo ""
|
|
33
|
-
return 1
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
# Function to detect the correct TSC command for a repo
|
|
37
|
-
get_tsc_command() {
|
|
38
|
-
local repo_path="$1"
|
|
39
|
-
cd "$repo_path" 2>/dev/null || return 1
|
|
40
|
-
|
|
41
|
-
if [ -f "tsconfig.app.json" ]; then
|
|
42
|
-
echo "npx tsc --project tsconfig.app.json --noEmit"
|
|
43
|
-
elif [ -f "tsconfig.build.json" ]; then
|
|
44
|
-
echo "npx tsc --project tsconfig.build.json --noEmit"
|
|
45
|
-
elif [ -f "tsconfig.json" ]; then
|
|
46
|
-
if grep -q '"references"' tsconfig.json 2>/dev/null; then
|
|
47
|
-
if [ -f "tsconfig.app.json" ]; then
|
|
48
|
-
echo "npx tsc --project tsconfig.app.json --noEmit"
|
|
49
|
-
elif [ -f "tsconfig.src.json" ]; then
|
|
50
|
-
echo "npx tsc --project tsconfig.src.json --noEmit"
|
|
51
|
-
else
|
|
52
|
-
echo "npx tsc --build --noEmit"
|
|
53
|
-
fi
|
|
54
|
-
else
|
|
55
|
-
echo "npx tsc --noEmit"
|
|
56
|
-
fi
|
|
57
|
-
else
|
|
58
|
-
echo "npx tsc --noEmit"
|
|
59
|
-
fi
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
# Function to run TSC check
|
|
63
|
-
run_tsc_check() {
|
|
64
|
-
local repo="$1"
|
|
65
|
-
local repo_path="$CLAUDE_PROJECT_DIR/$repo"
|
|
66
|
-
local cache_file="$CACHE_DIR/$repo-tsc-cmd.cache"
|
|
67
|
-
|
|
68
|
-
cd "$repo_path" 2>/dev/null || return 1
|
|
69
|
-
|
|
70
|
-
# Get or cache the TSC command for this repo
|
|
71
|
-
local tsc_cmd
|
|
72
|
-
if [ -f "$cache_file" ] && [ -z "$FORCE_DETECT" ]; then
|
|
73
|
-
tsc_cmd=$(cat "$cache_file")
|
|
74
|
-
else
|
|
75
|
-
tsc_cmd=$(get_tsc_command "$repo_path")
|
|
76
|
-
echo "$tsc_cmd" > "$cache_file"
|
|
77
|
-
fi
|
|
78
|
-
|
|
79
|
-
eval "$tsc_cmd" 2>&1
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
# Only process file modification tools
|
|
83
|
-
case "$TOOL_NAME" in
|
|
84
|
-
Write|Edit|MultiEdit)
|
|
85
|
-
# Extract file paths
|
|
86
|
-
if [ "$TOOL_NAME" = "MultiEdit" ]; then
|
|
87
|
-
FILE_PATHS=$(echo "$TOOL_INPUT" | jq -r '.edits[].file_path // empty')
|
|
88
|
-
else
|
|
89
|
-
FILE_PATHS=$(echo "$TOOL_INPUT" | jq -r '.file_path // empty')
|
|
90
|
-
fi
|
|
91
|
-
|
|
92
|
-
# Collect repos that need checking (only for TS/JS files)
|
|
93
|
-
REPOS_TO_CHECK=$(echo "$FILE_PATHS" | grep -E '\.(ts|tsx|js|jsx)$' | while read -r file_path; do
|
|
94
|
-
if [ -n "$file_path" ]; then
|
|
95
|
-
repo=$(get_repo_for_file "$file_path")
|
|
96
|
-
[ -n "$repo" ] && echo "$repo"
|
|
97
|
-
fi
|
|
98
|
-
done | sort -u | tr '\n' ' ')
|
|
99
|
-
|
|
100
|
-
# Trim whitespace
|
|
101
|
-
REPOS_TO_CHECK=$(echo "$REPOS_TO_CHECK" | xargs)
|
|
102
|
-
|
|
103
|
-
if [ -n "$REPOS_TO_CHECK" ]; then
|
|
104
|
-
ERROR_COUNT=0
|
|
105
|
-
ERROR_OUTPUT=""
|
|
106
|
-
FAILED_REPOS=""
|
|
107
|
-
|
|
108
|
-
# Output to stderr for visibility
|
|
109
|
-
echo "⚡ TypeScript check on: $REPOS_TO_CHECK" >&2
|
|
110
|
-
|
|
111
|
-
for repo in $REPOS_TO_CHECK; do
|
|
112
|
-
echo -n " Checking $repo... " >&2
|
|
113
|
-
|
|
114
|
-
# Run the check and capture output
|
|
115
|
-
CHECK_OUTPUT=$(run_tsc_check "$repo" 2>&1)
|
|
116
|
-
CHECK_EXIT_CODE=$?
|
|
117
|
-
|
|
118
|
-
# Check for TypeScript errors in output
|
|
119
|
-
if [ $CHECK_EXIT_CODE -ne 0 ] || echo "$CHECK_OUTPUT" | grep -q "error TS"; then
|
|
120
|
-
echo "❌ Errors found" >&2
|
|
121
|
-
ERROR_COUNT=$((ERROR_COUNT + 1))
|
|
122
|
-
FAILED_REPOS="$FAILED_REPOS $repo"
|
|
123
|
-
ERROR_OUTPUT="${ERROR_OUTPUT}
|
|
124
|
-
|
|
125
|
-
=== Errors in $repo ===
|
|
126
|
-
$CHECK_OUTPUT"
|
|
127
|
-
else
|
|
128
|
-
echo "✅ OK" >&2
|
|
129
|
-
fi
|
|
130
|
-
done
|
|
131
|
-
|
|
132
|
-
# If errors were found, show them and save for agent
|
|
133
|
-
if [ $ERROR_COUNT -gt 0 ]; then
|
|
134
|
-
# Save error information for the agent
|
|
135
|
-
echo "$ERROR_OUTPUT" > "$CACHE_DIR/last-errors.txt"
|
|
136
|
-
echo "$FAILED_REPOS" > "$CACHE_DIR/affected-repos.txt"
|
|
137
|
-
|
|
138
|
-
# Save the TSC commands used for each repo
|
|
139
|
-
echo "# TSC Commands by Repo" > "$CACHE_DIR/tsc-commands.txt"
|
|
140
|
-
for repo in $FAILED_REPOS; do
|
|
141
|
-
cmd=$(cat "$CACHE_DIR/$repo-tsc-cmd.cache" 2>/dev/null || echo "npx tsc --noEmit")
|
|
142
|
-
echo "$repo: $cmd" >> "$CACHE_DIR/tsc-commands.txt"
|
|
143
|
-
done
|
|
144
|
-
|
|
145
|
-
# Output to stderr for visibility
|
|
146
|
-
{
|
|
147
|
-
echo ""
|
|
148
|
-
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
149
|
-
echo "🚨 TypeScript errors found in $ERROR_COUNT repo(s): $FAILED_REPOS"
|
|
150
|
-
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
151
|
-
echo ""
|
|
152
|
-
echo "👉 IMPORTANT: Use the auto-error-resolver agent to fix the errors"
|
|
153
|
-
echo ""
|
|
154
|
-
echo "WE DO NOT LEAVE A MESS BEHIND"
|
|
155
|
-
echo "Error Preview:"
|
|
156
|
-
echo "$ERROR_OUTPUT" | grep "error TS" | head -10
|
|
157
|
-
echo ""
|
|
158
|
-
if [ $(echo "$ERROR_OUTPUT" | grep -c "error TS") -gt 10 ]; then
|
|
159
|
-
echo "... and $(($(echo "$ERROR_OUTPUT" | grep -c "error TS") - 10)) more errors"
|
|
160
|
-
fi
|
|
161
|
-
} >&2
|
|
162
|
-
|
|
163
|
-
# Exit with code 1 to make stderr visible
|
|
164
|
-
exit 1
|
|
165
|
-
fi
|
|
166
|
-
fi
|
|
167
|
-
;;
|
|
168
|
-
esac
|
|
169
|
-
|
|
170
|
-
# Cleanup old cache directories (older than 7 days)
|
|
171
|
-
find "$HOME/.claude/tsc-cache" -maxdepth 1 -type d -mtime +7 -exec rm -rf {} \; 2>/dev/null || true
|
|
172
|
-
|
|
173
|
-
exit 0
|