theus-cli-darwin-x64 0.2.84
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/LICENSE +42 -0
- package/README.md +295 -0
- package/RELEASE.json +18 -0
- package/assets/brand-official/v1.0/logo/theus-lockup-negative-official.png +0 -0
- package/assets/brand-official/v1.0/logo/theus-lockup-primary-dark-official.png +0 -0
- package/assets/fonts/satoshi/satoshi-300.woff2 +0 -0
- package/assets/fonts/satoshi/satoshi-400.woff2 +0 -0
- package/assets/fonts/satoshi/satoshi-500.woff2 +0 -0
- package/assets/fonts/satoshi/satoshi-700.woff2 +0 -0
- package/assets/fonts/satoshi/satoshi-900.woff2 +0 -0
- package/assets/windows-store/Square150x150Logo.png +0 -0
- package/assets/windows-store/Square44x44Logo.png +0 -0
- package/assets/windows-store/StoreLogo.png +0 -0
- package/assets/windows-store/theus-store-icon-master.png +0 -0
- package/bin/theus +0 -0
- package/package.json +18 -0
- package/vendor/theus-arsenal/.arsenal-nombres-ola2.json +6 -0
- package/vendor/theus-arsenal/.arsenal-nombres-ola3.json +72 -0
- package/vendor/theus-arsenal/.mailmap +2 -0
- package/vendor/theus-arsenal/.theus-plugin/marketplace.json +25 -0
- package/vendor/theus-arsenal/.theus-plugin/plugin.json +20 -0
- package/vendor/theus-arsenal/AUTHORS.md +8 -0
- package/vendor/theus-arsenal/CLEANROOM_REPLACEMENT_PLAN.md +11 -0
- package/vendor/theus-arsenal/LICENSE +26 -0
- package/vendor/theus-arsenal/PROVENANCE.md +9 -0
- package/vendor/theus-arsenal/README.md +41 -0
- package/vendor/theus-arsenal/THIRD_PARTY.md +80 -0
- package/vendor/theus-arsenal/agents/actualizador-docs.md +123 -0
- package/vendor/theus-arsenal/agents/analista-comentarios.md +53 -0
- package/vendor/theus-arsenal/agents/analista-conversaciones.md +60 -0
- package/vendor/theus-arsenal/agents/analista-tests-pr.md +53 -0
- package/vendor/theus-arsenal/agents/analista-tipos.md +49 -0
- package/vendor/theus-arsenal/agents/arquitecto-accesibilidad.md +148 -0
- package/vendor/theus-arsenal/agents/arquitecto-codigo.md +79 -0
- package/vendor/theus-arsenal/agents/arquitecto-homelab.md +90 -0
- package/vendor/theus-arsenal/agents/arquitecto-redes.md +116 -0
- package/vendor/theus-arsenal/agents/arquitecto-sistemas.md +219 -0
- package/vendor/theus-arsenal/agents/bifurcador-opensource.md +206 -0
- package/vendor/theus-arsenal/agents/cazador-fallos-silenciosos.md +58 -0
- package/vendor/theus-arsenal/agents/consultor-documentacion.md +76 -0
- package/vendor/theus-arsenal/agents/diagnosticador-redes.md +135 -0
- package/vendor/theus-arsenal/agents/ejecutor-e2e.md +96 -0
- package/vendor/theus-arsenal/agents/empaquetador-opensource.md +257 -0
- package/vendor/theus-arsenal/agents/escaner-secretos.md +196 -0
- package/vendor/theus-arsenal/agents/especialista-seo.md +70 -0
- package/vendor/theus-arsenal/agents/estratega-marketing.md +158 -0
- package/vendor/theus-arsenal/agents/evaluador-agentes.md +214 -0
- package/vendor/theus-arsenal/agents/evaluador-harness.md +217 -0
- package/vendor/theus-arsenal/agents/explorador-codigo.md +79 -0
- package/vendor/theus-arsenal/agents/extractor-specs.md +214 -0
- package/vendor/theus-arsenal/agents/generador-harness.md +139 -0
- package/vendor/theus-arsenal/agents/guia-tdd.md +99 -0
- package/vendor/theus-arsenal/agents/jefe-de-gabinete.md +162 -0
- package/vendor/theus-arsenal/agents/limpiador-refactors.md +93 -0
- package/vendor/theus-arsenal/agents/optimizador-rendimiento.md +454 -0
- package/vendor/theus-arsenal/agents/planificador-harness.md +107 -0
- package/vendor/theus-arsenal/agents/planificador.md +221 -0
- package/vendor/theus-arsenal/agents/resolutor-apps-harmonyos.md +181 -0
- package/vendor/theus-arsenal/agents/resolutor-builds-cpp.md +98 -0
- package/vendor/theus-arsenal/agents/resolutor-builds-dart.md +209 -0
- package/vendor/theus-arsenal/agents/resolutor-builds-django.md +253 -0
- package/vendor/theus-arsenal/agents/resolutor-builds-go.md +102 -0
- package/vendor/theus-arsenal/agents/resolutor-builds-java.md +274 -0
- package/vendor/theus-arsenal/agents/resolutor-builds-kotlin.md +128 -0
- package/vendor/theus-arsenal/agents/resolutor-builds-pytorch.md +128 -0
- package/vendor/theus-arsenal/agents/resolutor-builds-react.md +214 -0
- package/vendor/theus-arsenal/agents/resolutor-builds-rust.md +156 -0
- package/vendor/theus-arsenal/agents/resolutor-builds-swift.md +169 -0
- package/vendor/theus-arsenal/agents/resolutor-builds.md +122 -0
- package/vendor/theus-arsenal/agents/revisor-bd.md +97 -0
- package/vendor/theus-arsenal/agents/revisor-codigo.md +291 -0
- package/vendor/theus-arsenal/agents/revisor-config-red.md +116 -0
- package/vendor/theus-arsenal/agents/revisor-cpp.md +80 -0
- package/vendor/theus-arsenal/agents/revisor-csharp.md +109 -0
- package/vendor/theus-arsenal/agents/revisor-django.md +168 -0
- package/vendor/theus-arsenal/agents/revisor-fastapi.md +82 -0
- package/vendor/theus-arsenal/agents/revisor-flutter.md +251 -0
- package/vendor/theus-arsenal/agents/revisor-go.md +84 -0
- package/vendor/theus-arsenal/agents/revisor-java.md +192 -0
- package/vendor/theus-arsenal/agents/revisor-kotlin.md +171 -0
- package/vendor/theus-arsenal/agents/revisor-ml.md +159 -0
- package/vendor/theus-arsenal/agents/revisor-php.md +108 -0
- package/vendor/theus-arsenal/agents/revisor-python.md +106 -0
- package/vendor/theus-arsenal/agents/revisor-react.md +166 -0
- package/vendor/theus-arsenal/agents/revisor-rust.md +102 -0
- package/vendor/theus-arsenal/agents/revisor-seguridad.md +116 -0
- package/vendor/theus-arsenal/agents/revisor-software-clinico.md +95 -0
- package/vendor/theus-arsenal/agents/revisor-swift.md +115 -0
- package/vendor/theus-arsenal/agents/revisor-typescript.md +123 -0
- package/vendor/theus-arsenal/agents/revisor-vue.md +205 -0
- package/vendor/theus-arsenal/agents/simplificador-codigo.md +55 -0
- package/vendor/theus-arsenal/commands/actualizar-docs.md +88 -0
- package/vendor/theus-arsenal/commands/actualizar-mapas-codigo.md +78 -0
- package/vendor/theus-arsenal/commands/aprender-evaluar.md +109 -0
- package/vendor/theus-arsenal/commands/aprender.md +74 -0
- package/vendor/theus-arsenal/commands/arreglar-build.md +66 -0
- package/vendor/theus-arsenal/commands/bucle-multiperspectiva.md +153 -0
- package/vendor/theus-arsenal/commands/build-cpp.md +173 -0
- package/vendor/theus-arsenal/commands/build-flutter.md +164 -0
- package/vendor/theus-arsenal/commands/build-go.md +183 -0
- package/vendor/theus-arsenal/commands/build-gradle.md +75 -0
- package/vendor/theus-arsenal/commands/build-kotlin.md +176 -0
- package/vendor/theus-arsenal/commands/build-react.md +187 -0
- package/vendor/theus-arsenal/commands/build-rust.md +187 -0
- package/vendor/theus-arsenal/commands/campana-marketing.md +125 -0
- package/vendor/theus-arsenal/commands/checkpoint.md +78 -0
- package/vendor/theus-arsenal/commands/cobertura-tests.md +73 -0
- package/vendor/theus-arsenal/commands/configurar-gestor-paquetes.md +86 -0
- package/vendor/theus-arsenal/commands/consulta.md +164 -0
- package/vendor/theus-arsenal/commands/control-calidad.md +50 -0
- package/vendor/theus-arsenal/commands/crear-skill.md +77 -0
- package/vendor/theus-arsenal/commands/enrutar-modelo.md +30 -0
- package/vendor/theus-arsenal/commands/epica-desbloquear.md +17 -0
- package/vendor/theus-arsenal/commands/epica-descomponer.md +22 -0
- package/vendor/theus-arsenal/commands/epica-publicar.md +21 -0
- package/vendor/theus-arsenal/commands/epica-reclamar.md +25 -0
- package/vendor/theus-arsenal/commands/epica-revisar.md +22 -0
- package/vendor/theus-arsenal/commands/epica-sincronizar.md +21 -0
- package/vendor/theus-arsenal/commands/epica-validar.md +21 -0
- package/vendor/theus-arsenal/commands/evolucionar.md +176 -0
- package/vendor/theus-arsenal/commands/funcionalidad.md +49 -0
- package/vendor/theus-arsenal/commands/guardar-sesion.md +278 -0
- package/vendor/theus-arsenal/commands/harness-build.md +111 -0
- package/vendor/theus-arsenal/commands/harness-diseno.md +46 -0
- package/vendor/theus-arsenal/commands/informe-costos.md +90 -0
- package/vendor/theus-arsenal/commands/iniciar-bucle.md +36 -0
- package/vendor/theus-arsenal/commands/instintos-estado.md +53 -0
- package/vendor/theus-arsenal/commands/instintos-exportar.md +69 -0
- package/vendor/theus-arsenal/commands/instintos-importar.md +120 -0
- package/vendor/theus-arsenal/commands/lienzo-planes.md +48 -0
- package/vendor/theus-arsenal/commands/limpiar-refactor.md +84 -0
- package/vendor/theus-arsenal/commands/modo-seguro.md +96 -0
- package/vendor/theus-arsenal/commands/orq-agregar-funcionalidad.md +36 -0
- package/vendor/theus-arsenal/commands/orq-cambiar-funcionalidad.md +38 -0
- package/vendor/theus-arsenal/commands/orq-construir-mvp.md +36 -0
- package/vendor/theus-arsenal/commands/orq-corregir-defecto.md +40 -0
- package/vendor/theus-arsenal/commands/orq-refinar-codigo.md +44 -0
- package/vendor/theus-arsenal/commands/orq-revisar.md +135 -0
- package/vendor/theus-arsenal/commands/plan-prd.md +160 -0
- package/vendor/theus-arsenal/commands/plan.md +198 -0
- package/vendor/theus-arsenal/commands/podar.md +31 -0
- package/vendor/theus-arsenal/commands/pr.md +181 -0
- package/vendor/theus-arsenal/commands/promover.md +41 -0
- package/vendor/theus-arsenal/commands/proyectos.md +33 -0
- package/vendor/theus-arsenal/commands/prp-commit.md +112 -0
- package/vendor/theus-arsenal/commands/prp-implementar.md +385 -0
- package/vendor/theus-arsenal/commands/prp-planificar.md +501 -0
- package/vendor/theus-arsenal/commands/reanudar-sesion.md +160 -0
- package/vendor/theus-arsenal/commands/revisar-codigo.md +289 -0
- package/vendor/theus-arsenal/commands/revisar-cpp.md +132 -0
- package/vendor/theus-arsenal/commands/revisar-fastapi.md +39 -0
- package/vendor/theus-arsenal/commands/revisar-flutter.md +115 -0
- package/vendor/theus-arsenal/commands/revisar-go.md +148 -0
- package/vendor/theus-arsenal/commands/revisar-kotlin.md +140 -0
- package/vendor/theus-arsenal/commands/revisar-pr.md +37 -0
- package/vendor/theus-arsenal/commands/revisar-python.md +297 -0
- package/vendor/theus-arsenal/commands/revisar-react.md +170 -0
- package/vendor/theus-arsenal/commands/revisar-rust.md +142 -0
- package/vendor/theus-arsenal/commands/revisar-vue.md +174 -0
- package/vendor/theus-arsenal/commands/salud-skills.md +52 -0
- package/vendor/theus-arsenal/commands/sesiones.md +345 -0
- package/vendor/theus-arsenal/commands/test-cpp.md +252 -0
- package/vendor/theus-arsenal/commands/test-flutter.md +143 -0
- package/vendor/theus-arsenal/commands/test-go.md +268 -0
- package/vendor/theus-arsenal/commands/test-kotlin.md +312 -0
- package/vendor/theus-arsenal/commands/test-react.md +265 -0
- package/vendor/theus-arsenal/commands/test-rust.md +309 -0
- package/vendor/theus-arsenal/commands/vigilancia-canary.md +43 -0
- package/vendor/theus-arsenal/hooks/hooks.json +274 -0
- package/vendor/theus-arsenal/package.json +6 -0
- package/vendor/theus-arsenal/rules/angular/coding-style.md +182 -0
- package/vendor/theus-arsenal/rules/angular/hooks.md +25 -0
- package/vendor/theus-arsenal/rules/angular/patterns.md +249 -0
- package/vendor/theus-arsenal/rules/angular/security.md +87 -0
- package/vendor/theus-arsenal/rules/angular/testing.md +164 -0
- package/vendor/theus-arsenal/rules/arkts/coding-style.md +153 -0
- package/vendor/theus-arsenal/rules/arkts/hooks.md +80 -0
- package/vendor/theus-arsenal/rules/arkts/patterns.md +236 -0
- package/vendor/theus-arsenal/rules/arkts/security.md +141 -0
- package/vendor/theus-arsenal/rules/arkts/testing.md +126 -0
- package/vendor/theus-arsenal/rules/common/agents.md +49 -0
- package/vendor/theus-arsenal/rules/common/code-review.md +123 -0
- package/vendor/theus-arsenal/rules/common/coding-style.md +90 -0
- package/vendor/theus-arsenal/rules/common/development-workflow.md +44 -0
- package/vendor/theus-arsenal/rules/common/git-workflow.md +24 -0
- package/vendor/theus-arsenal/rules/common/hooks.md +32 -0
- package/vendor/theus-arsenal/rules/common/patterns.md +31 -0
- package/vendor/theus-arsenal/rules/common/performance.md +53 -0
- package/vendor/theus-arsenal/rules/common/security.md +29 -0
- package/vendor/theus-arsenal/rules/common/testing.md +57 -0
- package/vendor/theus-arsenal/rules/cpp/coding-style.md +44 -0
- package/vendor/theus-arsenal/rules/cpp/hooks.md +39 -0
- package/vendor/theus-arsenal/rules/cpp/patterns.md +51 -0
- package/vendor/theus-arsenal/rules/cpp/security.md +51 -0
- package/vendor/theus-arsenal/rules/cpp/testing.md +44 -0
- package/vendor/theus-arsenal/rules/csharp/coding-style.md +72 -0
- package/vendor/theus-arsenal/rules/csharp/hooks.md +25 -0
- package/vendor/theus-arsenal/rules/csharp/patterns.md +50 -0
- package/vendor/theus-arsenal/rules/csharp/security.md +58 -0
- package/vendor/theus-arsenal/rules/csharp/testing.md +50 -0
- package/vendor/theus-arsenal/rules/dart/coding-style.md +159 -0
- package/vendor/theus-arsenal/rules/dart/hooks.md +68 -0
- package/vendor/theus-arsenal/rules/dart/patterns.md +261 -0
- package/vendor/theus-arsenal/rules/dart/security.md +135 -0
- package/vendor/theus-arsenal/rules/dart/testing.md +215 -0
- package/vendor/theus-arsenal/rules/fsharp/coding-style.md +112 -0
- package/vendor/theus-arsenal/rules/fsharp/hooks.md +26 -0
- package/vendor/theus-arsenal/rules/fsharp/patterns.md +111 -0
- package/vendor/theus-arsenal/rules/fsharp/security.md +76 -0
- package/vendor/theus-arsenal/rules/fsharp/testing.md +62 -0
- package/vendor/theus-arsenal/rules/golang/coding-style.md +32 -0
- package/vendor/theus-arsenal/rules/golang/hooks.md +17 -0
- package/vendor/theus-arsenal/rules/golang/patterns.md +45 -0
- package/vendor/theus-arsenal/rules/golang/security.md +34 -0
- package/vendor/theus-arsenal/rules/golang/testing.md +31 -0
- package/vendor/theus-arsenal/rules/java/coding-style.md +114 -0
- package/vendor/theus-arsenal/rules/java/hooks.md +18 -0
- package/vendor/theus-arsenal/rules/java/patterns.md +147 -0
- package/vendor/theus-arsenal/rules/java/security.md +101 -0
- package/vendor/theus-arsenal/rules/java/testing.md +133 -0
- package/vendor/theus-arsenal/rules/kotlin/coding-style.md +86 -0
- package/vendor/theus-arsenal/rules/kotlin/hooks.md +17 -0
- package/vendor/theus-arsenal/rules/kotlin/patterns.md +146 -0
- package/vendor/theus-arsenal/rules/kotlin/security.md +82 -0
- package/vendor/theus-arsenal/rules/kotlin/testing.md +128 -0
- package/vendor/theus-arsenal/rules/nuxt/coding-style.md +47 -0
- package/vendor/theus-arsenal/rules/nuxt/hooks.md +39 -0
- package/vendor/theus-arsenal/rules/nuxt/patterns.md +54 -0
- package/vendor/theus-arsenal/rules/nuxt/security.md +48 -0
- package/vendor/theus-arsenal/rules/nuxt/testing.md +49 -0
- package/vendor/theus-arsenal/rules/php/coding-style.md +40 -0
- package/vendor/theus-arsenal/rules/php/hooks.md +24 -0
- package/vendor/theus-arsenal/rules/php/patterns.md +33 -0
- package/vendor/theus-arsenal/rules/php/security.md +37 -0
- package/vendor/theus-arsenal/rules/php/testing.md +38 -0
- package/vendor/theus-arsenal/rules/python/coding-style.md +42 -0
- package/vendor/theus-arsenal/rules/python/fastapi.md +58 -0
- package/vendor/theus-arsenal/rules/python/hooks.md +19 -0
- package/vendor/theus-arsenal/rules/python/patterns.md +39 -0
- package/vendor/theus-arsenal/rules/python/security.md +30 -0
- package/vendor/theus-arsenal/rules/python/testing.md +38 -0
- package/vendor/theus-arsenal/rules/react/coding-style.md +109 -0
- package/vendor/theus-arsenal/rules/react/hooks.md +187 -0
- package/vendor/theus-arsenal/rules/react/patterns.md +194 -0
- package/vendor/theus-arsenal/rules/react/security.md +180 -0
- package/vendor/theus-arsenal/rules/react/testing.md +208 -0
- package/vendor/theus-arsenal/rules/react-native/accessibility.md +55 -0
- package/vendor/theus-arsenal/rules/react-native/coding-style.md +71 -0
- package/vendor/theus-arsenal/rules/react-native/hooks.md +28 -0
- package/vendor/theus-arsenal/rules/react-native/patterns.md +88 -0
- package/vendor/theus-arsenal/rules/react-native/performance.md +45 -0
- package/vendor/theus-arsenal/rules/react-native/production-readiness.md +51 -0
- package/vendor/theus-arsenal/rules/react-native/security.md +43 -0
- package/vendor/theus-arsenal/rules/react-native/testing.md +52 -0
- package/vendor/theus-arsenal/rules/ruby/coding-style.md +46 -0
- package/vendor/theus-arsenal/rules/ruby/hooks.md +37 -0
- package/vendor/theus-arsenal/rules/ruby/patterns.md +44 -0
- package/vendor/theus-arsenal/rules/ruby/security.md +51 -0
- package/vendor/theus-arsenal/rules/ruby/testing.md +51 -0
- package/vendor/theus-arsenal/rules/rust/coding-style.md +151 -0
- package/vendor/theus-arsenal/rules/rust/hooks.md +16 -0
- package/vendor/theus-arsenal/rules/rust/patterns.md +168 -0
- package/vendor/theus-arsenal/rules/rust/security.md +141 -0
- package/vendor/theus-arsenal/rules/rust/testing.md +154 -0
- package/vendor/theus-arsenal/rules/swift/coding-style.md +47 -0
- package/vendor/theus-arsenal/rules/swift/hooks.md +20 -0
- package/vendor/theus-arsenal/rules/swift/patterns.md +66 -0
- package/vendor/theus-arsenal/rules/swift/security.md +33 -0
- package/vendor/theus-arsenal/rules/swift/testing.md +45 -0
- package/vendor/theus-arsenal/rules/typescript/coding-style.md +199 -0
- package/vendor/theus-arsenal/rules/typescript/hooks.md +22 -0
- package/vendor/theus-arsenal/rules/typescript/patterns.md +52 -0
- package/vendor/theus-arsenal/rules/typescript/security.md +28 -0
- package/vendor/theus-arsenal/rules/typescript/testing.md +18 -0
- package/vendor/theus-arsenal/rules/vue/coding-style.md +54 -0
- package/vendor/theus-arsenal/rules/vue/hooks.md +45 -0
- package/vendor/theus-arsenal/rules/vue/patterns.md +56 -0
- package/vendor/theus-arsenal/rules/vue/security.md +46 -0
- package/vendor/theus-arsenal/rules/vue/testing.md +53 -0
- package/vendor/theus-arsenal/rules/web/coding-style.md +108 -0
- package/vendor/theus-arsenal/rules/web/design-quality.md +75 -0
- package/vendor/theus-arsenal/rules/web/hooks.md +141 -0
- package/vendor/theus-arsenal/rules/web/patterns.md +91 -0
- package/vendor/theus-arsenal/rules/web/performance.md +76 -0
- package/vendor/theus-arsenal/rules/web/security.md +69 -0
- package/vendor/theus-arsenal/rules/web/testing.md +67 -0
- package/vendor/theus-arsenal/scripts/hooks/bash-hook-dispatcher.js +192 -0
- package/vendor/theus-arsenal/scripts/hooks/block-no-verify.js +556 -0
- package/vendor/theus-arsenal/scripts/hooks/check-console-log.js +92 -0
- package/vendor/theus-arsenal/scripts/hooks/check-hook-enabled.js +16 -0
- package/vendor/theus-arsenal/scripts/hooks/config-protection.js +171 -0
- package/vendor/theus-arsenal/scripts/hooks/design-quality-check.js +132 -0
- package/vendor/theus-arsenal/scripts/hooks/doc-file-warning.js +110 -0
- package/vendor/theus-arsenal/scripts/hooks/modo-seguro.js +158 -0
- package/vendor/theus-arsenal/scripts/hooks/notificacion-escritorio.js +208 -0
- package/vendor/theus-arsenal/scripts/hooks/plugin-hook-bootstrap.js +280 -0
- package/vendor/theus-arsenal/scripts/hooks/post-bash-command-log.js +87 -0
- package/vendor/theus-arsenal/scripts/hooks/post-bash-dispatcher.js +24 -0
- package/vendor/theus-arsenal/scripts/hooks/post-bash-pr-created.js +60 -0
- package/vendor/theus-arsenal/scripts/hooks/post-edit-accumulator.js +94 -0
- package/vendor/theus-arsenal/scripts/hooks/post-edit-console-warn.js +54 -0
- package/vendor/theus-arsenal/scripts/hooks/post-edit-format.js +110 -0
- package/vendor/theus-arsenal/scripts/hooks/post-edit-typecheck.js +98 -0
- package/vendor/theus-arsenal/scripts/hooks/pre-bash-commit-quality.js +447 -0
- package/vendor/theus-arsenal/scripts/hooks/pre-bash-dev-server-block.js +232 -0
- package/vendor/theus-arsenal/scripts/hooks/pre-bash-dispatcher.js +27 -0
- package/vendor/theus-arsenal/scripts/hooks/pre-compact.js +101 -0
- package/vendor/theus-arsenal/scripts/hooks/pretooluse-visible-output.js +49 -0
- package/vendor/theus-arsenal/scripts/hooks/quality-gate.js +168 -0
- package/vendor/theus-arsenal/scripts/hooks/run-with-flags.js +271 -0
- package/vendor/theus-arsenal/scripts/hooks/salud-mcp.js +749 -0
- package/vendor/theus-arsenal/scripts/hooks/seguimiento-costos.js +161 -0
- package/vendor/theus-arsenal/scripts/hooks/session-end.js +340 -0
- package/vendor/theus-arsenal/scripts/hooks/session-start.js +906 -0
- package/vendor/theus-arsenal/scripts/hooks/stop-format-typecheck.js +263 -0
- package/vendor/theus-arsenal/scripts/hooks/suggest-compact.js +286 -0
- package/vendor/theus-arsenal/scripts/hooks/theus-context-monitor.js +289 -0
- package/vendor/theus-arsenal/scripts/hooks/verificacion-factual.js +1278 -0
- package/vendor/theus-arsenal/scripts/lib/agent-data-home.js +96 -0
- package/vendor/theus-arsenal/scripts/lib/cost-estimate.js +66 -0
- package/vendor/theus-arsenal/scripts/lib/hook-flags.js +79 -0
- package/vendor/theus-arsenal/scripts/lib/llm-summary.js +185 -0
- package/vendor/theus-arsenal/scripts/lib/loopback-guard.js +54 -0
- package/vendor/theus-arsenal/scripts/lib/observer-sessions.js +237 -0
- package/vendor/theus-arsenal/scripts/lib/package-manager.d.ts +120 -0
- package/vendor/theus-arsenal/scripts/lib/package-manager.js +434 -0
- package/vendor/theus-arsenal/scripts/lib/path-safety.js +86 -0
- package/vendor/theus-arsenal/scripts/lib/plan-canvas/markdown.js +285 -0
- package/vendor/theus-arsenal/scripts/lib/plan-canvas/sdk.js +238 -0
- package/vendor/theus-arsenal/scripts/lib/plan-canvas/server.js +534 -0
- package/vendor/theus-arsenal/scripts/lib/plan-canvas/sessions.js +274 -0
- package/vendor/theus-arsenal/scripts/lib/plan-canvas/ui.js +546 -0
- package/vendor/theus-arsenal/scripts/lib/project-detect.js +451 -0
- package/vendor/theus-arsenal/scripts/lib/resolve-formatter.js +193 -0
- package/vendor/theus-arsenal/scripts/lib/resolve-theus-root.js +101 -0
- package/vendor/theus-arsenal/scripts/lib/session-aliases.d.ts +138 -0
- package/vendor/theus-arsenal/scripts/lib/session-aliases.js +483 -0
- package/vendor/theus-arsenal/scripts/lib/session-bridge.js +155 -0
- package/vendor/theus-arsenal/scripts/lib/session-manager.d.ts +137 -0
- package/vendor/theus-arsenal/scripts/lib/session-manager.js +555 -0
- package/vendor/theus-arsenal/scripts/lib/shell-split.js +86 -0
- package/vendor/theus-arsenal/scripts/lib/shell-substitution.js +501 -0
- package/vendor/theus-arsenal/scripts/lib/skill-evolution/dashboard.js +414 -0
- package/vendor/theus-arsenal/scripts/lib/skill-evolution/health.js +285 -0
- package/vendor/theus-arsenal/scripts/lib/skill-evolution/index.js +22 -0
- package/vendor/theus-arsenal/scripts/lib/skill-evolution/provenance.js +200 -0
- package/vendor/theus-arsenal/scripts/lib/skill-evolution/tracker.js +157 -0
- package/vendor/theus-arsenal/scripts/lib/skill-evolution/versioning.js +246 -0
- package/vendor/theus-arsenal/scripts/lib/transcript-context.js +232 -0
- package/vendor/theus-arsenal/scripts/lib/utils.d.ts +205 -0
- package/vendor/theus-arsenal/scripts/lib/utils.js +658 -0
- package/vendor/theus-arsenal/scripts/plan-canvas.js +341 -0
- package/vendor/theus-arsenal/scripts/setup-package-manager.js +46 -0
- package/vendor/theus-arsenal/scripts/skills-health.js +143 -0
- package/vendor/theus-arsenal/skills/a11y-frontend/SKILL.md +444 -0
- package/vendor/theus-arsenal/skills/accesibilidad/SKILL.md +144 -0
- package/vendor/theus-arsenal/skills/acelerador-throughput-datos/SKILL.md +72 -0
- package/vendor/theus-arsenal/skills/agente-scraper-datos/SKILL.md +771 -0
- package/vendor/theus-arsenal/skills/analisis-plataformas-competencia/SKILL.md +137 -0
- package/vendor/theus-arsenal/skills/api-x/SKILL.md +233 -0
- package/vendor/theus-arsenal/skills/aprendizaje-continuo-v2/SKILL.md +335 -0
- package/vendor/theus-arsenal/skills/aprendizaje-continuo-v2/agents/observer-loop.sh +374 -0
- package/vendor/theus-arsenal/skills/aprendizaje-continuo-v2/agents/observer.md +188 -0
- package/vendor/theus-arsenal/skills/aprendizaje-continuo-v2/agents/session-guardian.sh +153 -0
- package/vendor/theus-arsenal/skills/aprendizaje-continuo-v2/agents/start-observer.sh +253 -0
- package/vendor/theus-arsenal/skills/aprendizaje-continuo-v2/config.json +8 -0
- package/vendor/theus-arsenal/skills/aprendizaje-continuo-v2/hooks/observe.sh +594 -0
- package/vendor/theus-arsenal/skills/aprendizaje-continuo-v2/scripts/detect-project.sh +325 -0
- package/vendor/theus-arsenal/skills/aprendizaje-continuo-v2/scripts/instinct-cli.py +1918 -0
- package/vendor/theus-arsenal/skills/aprendizaje-continuo-v2/scripts/lib/arsenal-dir.sh +23 -0
- package/vendor/theus-arsenal/skills/aprendizaje-continuo-v2/scripts/test_parse_instinct.py +1420 -0
- package/vendor/theus-arsenal/skills/arquitectura-hexagonal/SKILL.md +275 -0
- package/vendor/theus-arsenal/skills/arquitectura-limpia-android/SKILL.md +340 -0
- package/vendor/theus-arsenal/skills/arquitectura-pipelines-recomendacion/SKILL.md +112 -0
- package/vendor/theus-arsenal/skills/atlas-datos-prediccion/SKILL.md +53 -0
- package/vendor/theus-arsenal/skills/auditoria-arquitectura-agentes/SKILL.md +257 -0
- package/vendor/theus-arsenal/skills/auditoria-produccion/SKILL.md +180 -0
- package/vendor/theus-arsenal/skills/auditoria-rutas-clic/SKILL.md +243 -0
- package/vendor/theus-arsenal/skills/autoevaluacion-agente/SKILL.md +180 -0
- package/vendor/theus-arsenal/skills/autoevaluacion-agente/examples/high-score-example.md +89 -0
- package/vendor/theus-arsenal/skills/autoevaluacion-agente/examples/low-score-example.md +87 -0
- package/vendor/theus-arsenal/skills/autoevaluacion-agente/references/evaluation-criteria.md +71 -0
- package/vendor/theus-arsenal/skills/autoevaluacion-agente/references/hook-integration.md +90 -0
- package/vendor/theus-arsenal/skills/autoevaluacion-agente/scripts/evaluate.py +409 -0
- package/vendor/theus-arsenal/skills/autoevaluacion-agente/templates/evaluation-report.md +86 -0
- package/vendor/theus-arsenal/skills/automatizacion-ssh-netmiko/SKILL.md +176 -0
- package/vendor/theus-arsenal/skills/base-datos-pubmed/SKILL.md +174 -0
- package/vendor/theus-arsenal/skills/base-datos-uspto/SKILL.md +173 -0
- package/vendor/theus-arsenal/skills/benchmark/SKILL.md +92 -0
- package/vendor/theus-arsenal/skills/bitacora-crecimiento/SKILL.md +120 -0
- package/vendor/theus-arsenal/skills/bucle-verificacion/SKILL.md +125 -0
- package/vendor/theus-arsenal/skills/buscar-primero/SKILL.md +184 -0
- package/vendor/theus-arsenal/skills/busqueda-exa/SKILL.md +111 -0
- package/vendor/theus-arsenal/skills/cache-por-hash/SKILL.md +160 -0
- package/vendor/theus-arsenal/skills/campana-marketing/SKILL.md +118 -0
- package/vendor/theus-arsenal/skills/capacidad-producto/SKILL.md +138 -0
- package/vendor/theus-arsenal/skills/cazador-vulnerabilidades/SKILL.md +104 -0
- package/vendor/theus-arsenal/skills/compactacion-estrategica/SKILL.md +115 -0
- package/vendor/theus-arsenal/skills/comparador-baskets-prediccion/SKILL.md +69 -0
- package/vendor/theus-arsenal/skills/compras-energia/SKILL.md +206 -0
- package/vendor/theus-arsenal/skills/concurrencia-swift-6-2/SKILL.md +224 -0
- package/vendor/theus-arsenal/skills/consejo/SKILL.md +201 -0
- package/vendor/theus-arsenal/skills/construccion-harness-agentes/SKILL.md +78 -0
- package/vendor/theus-arsenal/skills/constructor-conectores/SKILL.md +119 -0
- package/vendor/theus-arsenal/skills/constructor-equipos/SKILL.md +169 -0
- package/vendor/theus-arsenal/skills/consulta-documentacion/SKILL.md +92 -0
- package/vendor/theus-arsenal/skills/consultas-genomicas-gget/SKILL.md +170 -0
- package/vendor/theus-arsenal/skills/contacto-inversores/SKILL.md +95 -0
- package/vendor/theus-arsenal/skills/corrutinas-flows-kotlin/SKILL.md +284 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/SKILL.md +46 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/3d.md +86 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/animations.md +29 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/assets/charts-bar-chart.tsx +173 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/assets/text-animations-typewriter.tsx +100 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/assets/text-animations-word-highlight.tsx +108 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/assets.md +78 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/audio.md +172 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/calculate-metadata.md +104 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/can-decode.md +75 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/charts.md +58 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/compositions.md +146 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/display-captions.md +126 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/extract-frames.md +229 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/fonts.md +152 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/get-audio-duration.md +58 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/get-video-dimensions.md +68 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/get-video-duration.md +58 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/gifs.md +138 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/images.md +130 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/import-srt-captions.md +67 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/lottie.md +67 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/measuring-dom-nodes.md +34 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/measuring-text.md +143 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/sequencing.md +106 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/tailwind.md +11 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/text-animations.md +20 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/timing.md +179 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/transcribe-captions.md +19 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/transitions.md +122 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/trimming.md +52 -0
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/videos.md +171 -0
- package/vendor/theus-arsenal/skills/cumplimiento-aduanero/SKILL.md +270 -0
- package/vendor/theus-arsenal/skills/cumplimiento-hipaa/SKILL.md +78 -0
- package/vendor/theus-arsenal/skills/datos-sensibles-salud/SKILL.md +149 -0
- package/vendor/theus-arsenal/skills/decimales-tokens-evm/SKILL.md +128 -0
- package/vendor/theus-arsenal/skills/decisiones-arquitectura/SKILL.md +206 -0
- package/vendor/theus-arsenal/skills/demos-ui/SKILL.md +469 -0
- package/vendor/theus-arsenal/skills/desarrollo-por-intencion/SKILL.md +369 -0
- package/vendor/theus-arsenal/skills/descubrimiento-marca/SKILL.md +149 -0
- package/vendor/theus-arsenal/skills/descubrimiento-marca/references/10_proposito-porque.md +42 -0
- package/vendor/theus-arsenal/skills/descubrimiento-marca/references/20_posicionamiento.md +47 -0
- package/vendor/theus-arsenal/skills/descubrimiento-marca/references/30_audiencia-nicho.md +53 -0
- package/vendor/theus-arsenal/skills/descubrimiento-marca/references/40_personalidad-arquetipo.md +61 -0
- package/vendor/theus-arsenal/skills/descubrimiento-marca/references/50_voz-tono.md +62 -0
- package/vendor/theus-arsenal/skills/descubrimiento-marca/references/60_narrativa-historia.md +54 -0
- package/vendor/theus-arsenal/skills/descubrimiento-marca/references/70_tension-fundador.md +50 -0
- package/vendor/theus-arsenal/skills/descubrimiento-marca/references/90_SINTESIS.md +133 -0
- package/vendor/theus-arsenal/skills/descubrimiento-plugins-laravel/SKILL.md +230 -0
- package/vendor/theus-arsenal/skills/destilado-reglas/SKILL.md +263 -0
- package/vendor/theus-arsenal/skills/destilado-reglas/scripts/scan-rules.sh +58 -0
- package/vendor/theus-arsenal/skills/destilado-reglas/scripts/scan-skills.sh +129 -0
- package/vendor/theus-arsenal/skills/diagnostico-bgp/SKILL.md +170 -0
- package/vendor/theus-arsenal/skills/direccion-estetica/SKILL.md +220 -0
- package/vendor/theus-arsenal/skills/direccion-estetica/references/taxonomia-generos.md +89 -0
- package/vendor/theus-arsenal/skills/diseno-api/SKILL.md +522 -0
- package/vendor/theus-arsenal/skills/diseno-liquid-glass/SKILL.md +282 -0
- package/vendor/theus-arsenal/skills/e2e-escritorio-windows/SKILL.md +879 -0
- package/vendor/theus-arsenal/skills/edicion-video/SKILL.md +289 -0
- package/vendor/theus-arsenal/skills/enfoque-producto/SKILL.md +91 -0
- package/vendor/theus-arsenal/skills/entornos-flox/SKILL.md +493 -0
- package/vendor/theus-arsenal/skills/estandares-codigo/SKILL.md +548 -0
- package/vendor/theus-arsenal/skills/estandares-cpp/SKILL.md +727 -0
- package/vendor/theus-arsenal/skills/estandares-java/SKILL.md +389 -0
- package/vendor/theus-arsenal/skills/estilo-legado/SKILL.md +149 -0
- package/vendor/theus-arsenal/skills/estructura-informes-competencia/SKILL.md +95 -0
- package/vendor/theus-arsenal/skills/evaluacion-academica/SKILL.md +165 -0
- package/vendor/theus-arsenal/skills/explorador-skills/SKILL.md +129 -0
- package/vendor/theus-arsenal/skills/flujo-git/SKILL.md +714 -0
- package/vendor/theus-arsenal/skills/flujo-ingenieria-ml/SKILL.md +343 -0
- package/vendor/theus-arsenal/skills/flujo-tdd/SKILL.md +584 -0
- package/vendor/theus-arsenal/skills/forja-personas/SKILL.md +298 -0
- package/vendor/theus-arsenal/skills/forja-personas/gacha.py +224 -0
- package/vendor/theus-arsenal/skills/forja-personas/gacha.sh +5 -0
- package/vendor/theus-arsenal/skills/forja-personas/references/avatar-style.md +123 -0
- package/vendor/theus-arsenal/skills/forja-personas/references/boundary-rules.md +53 -0
- package/vendor/theus-arsenal/skills/forja-personas/references/error-handling.md +53 -0
- package/vendor/theus-arsenal/skills/forja-personas/references/identity-tension.md +48 -0
- package/vendor/theus-arsenal/skills/forja-personas/references/naming-system.md +39 -0
- package/vendor/theus-arsenal/skills/forja-personas/references/output-template.md +166 -0
- package/vendor/theus-arsenal/skills/fundamentos-animacion/SKILL.md +296 -0
- package/vendor/theus-arsenal/skills/generacion-iconos-ios/SKILL.md +156 -0
- package/vendor/theus-arsenal/skills/generacion-iconos-ios/scripts/generate_icons.swift +258 -0
- package/vendor/theus-arsenal/skills/generacion-iconos-ios/scripts/iconify_gen.sh +235 -0
- package/vendor/theus-arsenal/skills/gestion-excepciones-logisticas/SKILL.md +208 -0
- package/vendor/theus-arsenal/skills/gestion-transportistas/SKILL.md +204 -0
- package/vendor/theus-arsenal/skills/guia-adopcion-ml/SKILL.md +64 -0
- package/vendor/theus-arsenal/skills/harness-agente-autonomo/SKILL.md +252 -0
- package/vendor/theus-arsenal/skills/harness-eval-clinico/SKILL.md +212 -0
- package/vendor/theus-arsenal/skills/harness-evaluacion/SKILL.md +296 -0
- package/vendor/theus-arsenal/skills/harness-generador-evaluador/SKILL.md +254 -0
- package/vendor/theus-arsenal/skills/homelab-diseno-red/SKILL.md +120 -0
- package/vendor/theus-arsenal/skills/homelab-dns-pihole/SKILL.md +264 -0
- package/vendor/theus-arsenal/skills/homelab-preparacion-red/SKILL.md +144 -0
- package/vendor/theus-arsenal/skills/homelab-segmentacion-vlan/SKILL.md +307 -0
- package/vendor/theus-arsenal/skills/homelab-vpn-wireguard/SKILL.md +299 -0
- package/vendor/theus-arsenal/skills/ingenieria-agentica/SKILL.md +96 -0
- package/vendor/theus-arsenal/skills/inspeccion-animaciones-blender/SKILL.md +164 -0
- package/vendor/theus-arsenal/skills/instaladores-python/SKILL.md +820 -0
- package/vendor/theus-arsenal/skills/integracion-jira/SKILL.md +307 -0
- package/vendor/theus-arsenal/skills/inteligencia-leads/SKILL.md +312 -0
- package/vendor/theus-arsenal/skills/inteligencia-leads/agents/agente-enriquecimiento.md +87 -0
- package/vendor/theus-arsenal/skills/inteligencia-leads/agents/mapeador-mutuos.md +76 -0
- package/vendor/theus-arsenal/skills/inteligencia-leads/agents/puntuador-senales.md +60 -0
- package/vendor/theus-arsenal/skills/inteligencia-leads/agents/redactor-outreach.md +102 -0
- package/vendor/theus-arsenal/skills/inteligencia-mercados-prediccion/SKILL.md +53 -0
- package/vendor/theus-arsenal/skills/introspeccion-agente/SKILL.md +150 -0
- package/vendor/theus-arsenal/skills/inventario-skills/SKILL.md +194 -0
- package/vendor/theus-arsenal/skills/inventario-skills/scripts/quick-diff.sh +87 -0
- package/vendor/theus-arsenal/skills/inventario-skills/scripts/save-results.sh +57 -0
- package/vendor/theus-arsenal/skills/inventario-skills/scripts/scan.sh +170 -0
- package/vendor/theus-arsenal/skills/investigacion-mercado/SKILL.md +87 -0
- package/vendor/theus-arsenal/skills/investigacion-oraculos-prediccion/SKILL.md +59 -0
- package/vendor/theus-arsenal/skills/investigacion-profunda/SKILL.md +161 -0
- package/vendor/theus-arsenal/skills/keccak256-nodejs/SKILL.md +100 -0
- package/vendor/theus-arsenal/skills/libro-decisiones-recursivo/SKILL.md +82 -0
- package/vendor/theus-arsenal/skills/lienzo-planes/SKILL.md +111 -0
- package/vendor/theus-arsenal/skills/limpieza-configuracion/SKILL.md +116 -0
- package/vendor/theus-arsenal/skills/logistica-inversa-devoluciones/SKILL.md +241 -0
- package/vendor/theus-arsenal/skills/manejo-errores/SKILL.md +375 -0
- package/vendor/theus-arsenal/skills/materiales-inversores/SKILL.md +101 -0
- package/vendor/theus-arsenal/skills/memoria-por-proyecto/SKILL.md +170 -0
- package/vendor/theus-arsenal/skills/memoria-por-proyecto/commands/forget.mjs +44 -0
- package/vendor/theus-arsenal/skills/memoria-por-proyecto/commands/info.mjs +24 -0
- package/vendor/theus-arsenal/skills/memoria-por-proyecto/commands/init.mjs +152 -0
- package/vendor/theus-arsenal/skills/memoria-por-proyecto/commands/list.mjs +40 -0
- package/vendor/theus-arsenal/skills/memoria-por-proyecto/commands/migrate.mjs +214 -0
- package/vendor/theus-arsenal/skills/memoria-por-proyecto/commands/resume.mjs +36 -0
- package/vendor/theus-arsenal/skills/memoria-por-proyecto/commands/save.mjs +210 -0
- package/vendor/theus-arsenal/skills/memoria-por-proyecto/commands/shared.mjs +402 -0
- package/vendor/theus-arsenal/skills/memoria-por-proyecto/hooks/session-start.mjs +238 -0
- package/vendor/theus-arsenal/skills/metodologia-benchmarks/SKILL.md +131 -0
- package/vendor/theus-arsenal/skills/migraciones-bd/SKILL.md +430 -0
- package/vendor/theus-arsenal/skills/modelos-fundacionales-en-dispositivo/SKILL.md +244 -0
- package/vendor/theus-arsenal/skills/modo-seguro/SKILL.md +86 -0
- package/vendor/theus-arsenal/skills/motion-avanzado/SKILL.md +592 -0
- package/vendor/theus-arsenal/skills/motor-de-contenido/SKILL.md +136 -0
- package/vendor/theus-arsenal/skills/no-conformidades-calidad/SKILL.md +249 -0
- package/vendor/theus-arsenal/skills/onboarding-codigo/SKILL.md +244 -0
- package/vendor/theus-arsenal/skills/operaciones-agentes-empresariales/SKILL.md +51 -0
- package/vendor/theus-arsenal/skills/operaciones-conocimiento/SKILL.md +159 -0
- package/vendor/theus-arsenal/skills/operaciones-correo/SKILL.md +123 -0
- package/vendor/theus-arsenal/skills/operaciones-facturacion/SKILL.md +142 -0
- package/vendor/theus-arsenal/skills/operaciones-flujo-proyectos/SKILL.md +110 -0
- package/vendor/theus-arsenal/skills/operaciones-github/SKILL.md +143 -0
- package/vendor/theus-arsenal/skills/operaciones-google-workspace/SKILL.md +100 -0
- package/vendor/theus-arsenal/skills/operaciones-investigacion/SKILL.md +124 -0
- package/vendor/theus-arsenal/skills/operaciones-mensajes/SKILL.md +103 -0
- package/vendor/theus-arsenal/skills/operaciones-terminal/SKILL.md +110 -0
- package/vendor/theus-arsenal/skills/optimizacion-benchmark/SKILL.md +70 -0
- package/vendor/theus-arsenal/skills/optimizacion-costos-llm/SKILL.md +182 -0
- package/vendor/theus-arsenal/skills/optimizador-conexiones/SKILL.md +191 -0
- package/vendor/theus-arsenal/skills/optimizador-paralelismo/SKILL.md +75 -0
- package/vendor/theus-arsenal/skills/optimizador-prompts/SKILL.md +374 -0
- package/vendor/theus-arsenal/skills/orq-agregar-funcionalidad/SKILL.md +37 -0
- package/vendor/theus-arsenal/skills/orq-cambiar-funcionalidad/SKILL.md +36 -0
- package/vendor/theus-arsenal/skills/orq-construir-mvp/SKILL.md +38 -0
- package/vendor/theus-arsenal/skills/orq-corregir-defecto/SKILL.md +36 -0
- package/vendor/theus-arsenal/skills/orq-pipeline/SKILL.md +134 -0
- package/vendor/theus-arsenal/skills/orq-refinar-codigo/SKILL.md +49 -0
- package/vendor/theus-arsenal/skills/orquestacion-equipos-agentes/SKILL.md +117 -0
- package/vendor/theus-arsenal/skills/pagos-agentes-x402/SKILL.md +237 -0
- package/vendor/theus-arsenal/skills/patrones-angular/SKILL.md +153 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/angular-animations.md +160 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/angular-aria.md +410 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/cli.md +86 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/component-harnesses.md +59 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/component-styling.md +91 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/components.md +117 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/creating-services.md +97 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/data-resolvers.md +69 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/define-routes.md +67 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/defining-providers.md +72 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/di-fundamentals.md +120 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/e2e-testing.md +56 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/effects.md +83 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/hierarchical-injectors.md +43 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/host-elements.md +80 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/injection-context.md +63 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/inputs.md +101 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/linked-signal.md +59 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/loading-strategies.md +61 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/mcp.md +67 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/navigate-to-routes.md +69 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/outputs.md +86 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/reactive-forms.md +122 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/rendering-strategies.md +44 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/resource.md +77 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/route-animations.md +56 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/route-guards.md +52 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/router-lifecycle.md +45 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/router-testing.md +87 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/show-routes-with-outlets.md +68 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/signal-forms.md +795 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/signals-overview.md +94 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/tailwind-css.md +69 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/template-driven-forms.md +114 -0
- package/vendor/theus-arsenal/skills/patrones-angular/references/testing-fundamentals.md +65 -0
- package/vendor/theus-arsenal/skills/patrones-animacion/SKILL.md +432 -0
- package/vendor/theus-arsenal/skills/patrones-backend/SKILL.md +560 -0
- package/vendor/theus-arsenal/skills/patrones-cdss-clinico/SKILL.md +249 -0
- package/vendor/theus-arsenal/skills/patrones-cisco-ios/SKILL.md +148 -0
- package/vendor/theus-arsenal/skills/patrones-clickhouse/SKILL.md +443 -0
- package/vendor/theus-arsenal/skills/patrones-compose-multiplatform/SKILL.md +298 -0
- package/vendor/theus-arsenal/skills/patrones-dart-flutter/SKILL.md +566 -0
- package/vendor/theus-arsenal/skills/patrones-despliegue/SKILL.md +426 -0
- package/vendor/theus-arsenal/skills/patrones-django/SKILL.md +739 -0
- package/vendor/theus-arsenal/skills/patrones-django-celery/SKILL.md +456 -0
- package/vendor/theus-arsenal/skills/patrones-docker/SKILL.md +363 -0
- package/vendor/theus-arsenal/skills/patrones-dotnet/SKILL.md +321 -0
- package/vendor/theus-arsenal/skills/patrones-emr-clinico/SKILL.md +168 -0
- package/vendor/theus-arsenal/skills/patrones-fastapi/SKILL.md +513 -0
- package/vendor/theus-arsenal/skills/patrones-frontend/SKILL.md +655 -0
- package/vendor/theus-arsenal/skills/patrones-go/SKILL.md +674 -0
- package/vendor/theus-arsenal/skills/patrones-jpa/SKILL.md +156 -0
- package/vendor/theus-arsenal/skills/patrones-kotlin/SKILL.md +717 -0
- package/vendor/theus-arsenal/skills/patrones-kotlin-exposed/SKILL.md +724 -0
- package/vendor/theus-arsenal/skills/patrones-kotlin-ktor/SKILL.md +694 -0
- package/vendor/theus-arsenal/skills/patrones-kubernetes/SKILL.md +754 -0
- package/vendor/theus-arsenal/skills/patrones-laravel/SKILL.md +414 -0
- package/vendor/theus-arsenal/skills/patrones-mcp/SKILL.md +66 -0
- package/vendor/theus-arsenal/skills/patrones-mysql/SKILL.md +420 -0
- package/vendor/theus-arsenal/skills/patrones-nestjs/SKILL.md +229 -0
- package/vendor/theus-arsenal/skills/patrones-nextjs/SKILL.md +56 -0
- package/vendor/theus-arsenal/skills/patrones-nuxt4/SKILL.md +99 -0
- package/vendor/theus-arsenal/skills/patrones-perl/SKILL.md +508 -0
- package/vendor/theus-arsenal/skills/patrones-postgres/SKILL.md +141 -0
- package/vendor/theus-arsenal/skills/patrones-prisma/SKILL.md +399 -0
- package/vendor/theus-arsenal/skills/patrones-python/SKILL.md +750 -0
- package/vendor/theus-arsenal/skills/patrones-pytorch/SKILL.md +400 -0
- package/vendor/theus-arsenal/skills/patrones-quarkus/SKILL.md +729 -0
- package/vendor/theus-arsenal/skills/patrones-react/SKILL.md +339 -0
- package/vendor/theus-arsenal/skills/patrones-react-native/SKILL.md +325 -0
- package/vendor/theus-arsenal/skills/patrones-redis/SKILL.md +401 -0
- package/vendor/theus-arsenal/skills/patrones-rust/SKILL.md +504 -0
- package/vendor/theus-arsenal/skills/patrones-springboot/SKILL.md +314 -0
- package/vendor/theus-arsenal/skills/patrones-swiftui/SKILL.md +261 -0
- package/vendor/theus-arsenal/skills/patrones-tinystruct/SKILL.md +281 -0
- package/vendor/theus-arsenal/skills/patrones-tinystruct/references/architecture.md +90 -0
- package/vendor/theus-arsenal/skills/patrones-tinystruct/references/data-handling.md +60 -0
- package/vendor/theus-arsenal/skills/patrones-tinystruct/references/database.md +99 -0
- package/vendor/theus-arsenal/skills/patrones-tinystruct/references/routing.md +64 -0
- package/vendor/theus-arsenal/skills/patrones-tinystruct/references/system-usage.md +97 -0
- package/vendor/theus-arsenal/skills/patrones-tinystruct/references/testing.md +72 -0
- package/vendor/theus-arsenal/skills/patrones-vite/SKILL.md +449 -0
- package/vendor/theus-arsenal/skills/patrones-vue/SKILL.md +469 -0
- package/vendor/theus-arsenal/skills/persistencia-actores-swift/SKILL.md +148 -0
- package/vendor/theus-arsenal/skills/pipeline-opensource/SKILL.md +254 -0
- package/vendor/theus-arsenal/skills/planificacion-demanda-inventario/SKILL.md +236 -0
- package/vendor/theus-arsenal/skills/planificador-trades-prediccion/SKILL.md +60 -0
- package/vendor/theus-arsenal/skills/plano-tecnico/SKILL.md +102 -0
- package/vendor/theus-arsenal/skills/presentaciones-html/SKILL.md +189 -0
- package/vendor/theus-arsenal/skills/presentaciones-html/STYLE_PRESETS.md +330 -0
- package/vendor/theus-arsenal/skills/presentaciones-html/animation-patterns.md +122 -0
- package/vendor/theus-arsenal/skills/presentaciones-html/html-template.md +419 -0
- package/vendor/theus-arsenal/skills/presentaciones-html/scripts/export-pdf.sh +418 -0
- package/vendor/theus-arsenal/skills/presentaciones-html/scripts/extract-pptx.py +96 -0
- package/vendor/theus-arsenal/skills/presentaciones-html/viewport-base.css +153 -0
- package/vendor/theus-arsenal/skills/presupuesto-contexto/SKILL.md +263 -0
- package/vendor/theus-arsenal/skills/procesamiento-documentos-nutrient/SKILL.md +168 -0
- package/vendor/theus-arsenal/skills/programacion-produccion/SKILL.md +220 -0
- package/vendor/theus-arsenal/skills/publicacion-cruzada/SKILL.md +117 -0
- package/vendor/theus-arsenal/skills/publicador-social/SKILL.md +121 -0
- package/vendor/theus-arsenal/skills/puerta-de-entrega/SKILL.md +164 -0
- package/vendor/theus-arsenal/skills/puerta-de-entrega/hooks/puerta-entrega.py +242 -0
- package/vendor/theus-arsenal/skills/pulir-interfaces/SKILL.md +126 -0
- package/vendor/theus-arsenal/skills/qa-navegador/SKILL.md +103 -0
- package/vendor/theus-arsenal/skills/ranking-grafo-social/SKILL.md +153 -0
- package/vendor/theus-arsenal/skills/recuperacion-iterativa/SKILL.md +236 -0
- package/vendor/theus-arsenal/skills/redaccion-articulos/SKILL.md +81 -0
- package/vendor/theus-arsenal/skills/regex-vs-llm/SKILL.md +221 -0
- package/vendor/theus-arsenal/skills/regresion-codigo-ia/SKILL.md +388 -0
- package/vendor/theus-arsenal/skills/rendimiento-react/SKILL.md +567 -0
- package/vendor/theus-arsenal/skills/revision-codigo-flutter-dart/SKILL.md +442 -0
- package/vendor/theus-arsenal/skills/revision-literatura-cientifica/SKILL.md +191 -0
- package/vendor/theus-arsenal/skills/revision-multiperspectiva/SKILL.md +302 -0
- package/vendor/theus-arsenal/skills/revision-riesgo-prediccion/SKILL.md +56 -0
- package/vendor/theus-arsenal/skills/revision-seguridad/SKILL.md +505 -0
- package/vendor/theus-arsenal/skills/revision-seguridad/cloud-infrastructure-security.md +361 -0
- package/vendor/theus-arsenal/skills/runtime-bun/SKILL.md +83 -0
- package/vendor/theus-arsenal/skills/salud-codigo-codescene/SKILL.md +163 -0
- package/vendor/theus-arsenal/skills/salud-interfaces-red/SKILL.md +143 -0
- package/vendor/theus-arsenal/skills/seguimiento-costos/SKILL.md +122 -0
- package/vendor/theus-arsenal/skills/seguridad-agentes-trading/SKILL.md +145 -0
- package/vendor/theus-arsenal/skills/seguridad-amm-defi/SKILL.md +166 -0
- package/vendor/theus-arsenal/skills/seguridad-django/SKILL.md +648 -0
- package/vendor/theus-arsenal/skills/seguridad-laravel/SKILL.md +945 -0
- package/vendor/theus-arsenal/skills/seguridad-perl/SKILL.md +507 -0
- package/vendor/theus-arsenal/skills/seguridad-quarkus/SKILL.md +474 -0
- package/vendor/theus-arsenal/skills/seguridad-springboot/SKILL.md +279 -0
- package/vendor/theus-arsenal/skills/seo/SKILL.md +166 -0
- package/vendor/theus-arsenal/skills/sistema-diseno/SKILL.md +81 -0
- package/vendor/theus-arsenal/skills/sistema-operativo-agentico/SKILL.md +375 -0
- package/vendor/theus-arsenal/skills/sistemas-latencia-critica/SKILL.md +65 -0
- package/vendor/theus-arsenal/skills/tdd-django/SKILL.md +735 -0
- package/vendor/theus-arsenal/skills/tdd-laravel/SKILL.md +673 -0
- package/vendor/theus-arsenal/skills/tdd-quarkus/SKILL.md +817 -0
- package/vendor/theus-arsenal/skills/tdd-springboot/SKILL.md +165 -0
- package/vendor/theus-arsenal/skills/testing-cpp/SKILL.md +328 -0
- package/vendor/theus-arsenal/skills/testing-csharp/SKILL.md +321 -0
- package/vendor/theus-arsenal/skills/testing-e2e/SKILL.md +325 -0
- package/vendor/theus-arsenal/skills/testing-go/SKILL.md +719 -0
- package/vendor/theus-arsenal/skills/testing-kotlin/SKILL.md +829 -0
- package/vendor/theus-arsenal/skills/testing-perl/SKILL.md +479 -0
- package/vendor/theus-arsenal/skills/testing-protocolos-di-swift/SKILL.md +196 -0
- package/vendor/theus-arsenal/skills/testing-python/SKILL.md +815 -0
- package/vendor/theus-arsenal/skills/testing-react/SKILL.md +421 -0
- package/vendor/theus-arsenal/skills/testing-rust/SKILL.md +506 -0
- package/vendor/theus-arsenal/skills/tours-de-codigo/SKILL.md +252 -0
- package/vendor/theus-arsenal/skills/traduccion-documentos-visado/SKILL.md +121 -0
- package/vendor/theus-arsenal/skills/ui-a-vue/SKILL.md +141 -0
- package/vendor/theus-arsenal/skills/validacion-config-red/SKILL.md +211 -0
- package/vendor/theus-arsenal/skills/verificacion-django/SKILL.md +470 -0
- package/vendor/theus-arsenal/skills/verificacion-factual/SKILL.md +142 -0
- package/vendor/theus-arsenal/skills/verificacion-laravel/SKILL.md +184 -0
- package/vendor/theus-arsenal/skills/verificacion-quarkus/SKILL.md +485 -0
- package/vendor/theus-arsenal/skills/verificacion-springboot/SKILL.md +237 -0
- package/vendor/theus-arsenal/skills/videodb/SKILL.md +374 -0
- package/vendor/theus-arsenal/skills/videodb/reference/api-reference.md +550 -0
- package/vendor/theus-arsenal/skills/videodb/reference/capture-reference.md +407 -0
- package/vendor/theus-arsenal/skills/videodb/reference/capture.md +101 -0
- package/vendor/theus-arsenal/skills/videodb/reference/editor.md +443 -0
- package/vendor/theus-arsenal/skills/videodb/reference/generative.md +331 -0
- package/vendor/theus-arsenal/skills/videodb/reference/rtstream-reference.md +564 -0
- package/vendor/theus-arsenal/skills/videodb/reference/rtstream.md +65 -0
- package/vendor/theus-arsenal/skills/videodb/reference/search.md +230 -0
- package/vendor/theus-arsenal/skills/videodb/reference/streaming.md +406 -0
- package/vendor/theus-arsenal/skills/videodb/reference/use-cases.md +118 -0
- package/vendor/theus-arsenal/skills/videodb/scripts/ws_listener.py +279 -0
- package/vendor/theus-arsenal/skills/videos-manim/SKILL.md +91 -0
- package/vendor/theus-arsenal/skills/videos-manim/assets/network_graph_scene.py +52 -0
- package/vendor/theus-arsenal/skills/vigilancia-canary/SKILL.md +108 -0
- package/vendor/theus-arsenal/skills/voz-de-marca/SKILL.md +106 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Hook de proteccion de configuracion
|
|
4
|
+
*
|
|
5
|
+
* Bloquea modificaciones a archivos de configuracion de linters/formateadores.
|
|
6
|
+
* Los agentes suelen modificarlos para que las verificaciones pasen en lugar
|
|
7
|
+
* de corregir el codigo real. Este hook redirige al agente a arreglar el
|
|
8
|
+
* codigo fuente.
|
|
9
|
+
*
|
|
10
|
+
* Codigos de salida:
|
|
11
|
+
* 0 = permitir (no es un archivo de configuracion, o es su creacion inicial)
|
|
12
|
+
* 2 = bloquear (se intento modificar un archivo de configuracion existente)
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
'use strict';
|
|
16
|
+
|
|
17
|
+
const fs = require('fs');
|
|
18
|
+
const path = require('path');
|
|
19
|
+
|
|
20
|
+
const MAX_STDIN = 1024 * 1024;
|
|
21
|
+
let raw = '';
|
|
22
|
+
|
|
23
|
+
const PROTECTED_FILES = new Set([
|
|
24
|
+
// ESLint (config legada + flat config v9, JS/TS/MJS/CJS)
|
|
25
|
+
'.eslintrc',
|
|
26
|
+
'.eslintrc.js',
|
|
27
|
+
'.eslintrc.cjs',
|
|
28
|
+
'.eslintrc.json',
|
|
29
|
+
'.eslintrc.yml',
|
|
30
|
+
'.eslintrc.yaml',
|
|
31
|
+
'eslint.config.js',
|
|
32
|
+
'eslint.config.mjs',
|
|
33
|
+
'eslint.config.cjs',
|
|
34
|
+
'eslint.config.ts',
|
|
35
|
+
'eslint.config.mts',
|
|
36
|
+
'eslint.config.cts',
|
|
37
|
+
// Prettier (todas las variantes de config, incluida ESM)
|
|
38
|
+
'.prettierrc',
|
|
39
|
+
'.prettierrc.js',
|
|
40
|
+
'.prettierrc.cjs',
|
|
41
|
+
'.prettierrc.json',
|
|
42
|
+
'.prettierrc.yml',
|
|
43
|
+
'.prettierrc.yaml',
|
|
44
|
+
'prettier.config.js',
|
|
45
|
+
'prettier.config.cjs',
|
|
46
|
+
'prettier.config.mjs',
|
|
47
|
+
// Biome
|
|
48
|
+
'biome.json',
|
|
49
|
+
'biome.jsonc',
|
|
50
|
+
// Ruff (Python)
|
|
51
|
+
'.ruff.toml',
|
|
52
|
+
'ruff.toml',
|
|
53
|
+
// Nota: pyproject.toml NO se incluye aqui de forma intencional porque
|
|
54
|
+
// contiene metadatos del proyecto junto a la config del linter. Bloquear
|
|
55
|
+
// todas sus ediciones impediria cambios legitimos de dependencias.
|
|
56
|
+
// Shell / Style / Markdown
|
|
57
|
+
'.shellcheckrc',
|
|
58
|
+
'.stylelintrc',
|
|
59
|
+
'.stylelintrc.json',
|
|
60
|
+
'.stylelintrc.yml',
|
|
61
|
+
'.markdownlint.json',
|
|
62
|
+
'.markdownlint.yaml',
|
|
63
|
+
'.markdownlintrc'
|
|
64
|
+
]);
|
|
65
|
+
|
|
66
|
+
function parseInput(inputOrRaw) {
|
|
67
|
+
if (typeof inputOrRaw === 'string') {
|
|
68
|
+
try {
|
|
69
|
+
return inputOrRaw.trim() ? JSON.parse(inputOrRaw) : {};
|
|
70
|
+
} catch {
|
|
71
|
+
return {};
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return inputOrRaw && typeof inputOrRaw === 'object' ? inputOrRaw : {};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* run() exportable para ejecucion en el mismo proceso via run-with-flags.js.
|
|
80
|
+
* Evita los ~50-100 ms de sobrecoste de spawnSync cuando esta disponible.
|
|
81
|
+
*/
|
|
82
|
+
function run(inputOrRaw, options = {}) {
|
|
83
|
+
if (options.truncated) {
|
|
84
|
+
return {
|
|
85
|
+
exitCode: 2,
|
|
86
|
+
stderr:
|
|
87
|
+
`BLOQUEADO: la entrada del hook supero ${options.maxStdin || MAX_STDIN} bytes. ` +
|
|
88
|
+
'No se omite la proteccion de configuracion con un payload truncado. ' +
|
|
89
|
+
'Reintenta con una edicion mas pequena o deshabilita temporalmente el hook config-protection.'
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const input = parseInput(inputOrRaw);
|
|
94
|
+
const filePath = input?.tool_input?.file_path || input?.tool_input?.file || '';
|
|
95
|
+
if (!filePath) return { exitCode: 0 };
|
|
96
|
+
|
|
97
|
+
const basename = path.basename(filePath);
|
|
98
|
+
if (PROTECTED_FILES.has(basename)) {
|
|
99
|
+
// Permitir la creacion inicial: no hay config existente que debilitar.
|
|
100
|
+
// El proposito del hook es bloquear modificaciones; escribir un archivo
|
|
101
|
+
// de configuracion nuevo en un proyecto que no tiene ninguno es una via
|
|
102
|
+
// de arranque legitima (p. ej. scaffolding de ESLint en un repo nuevo).
|
|
103
|
+
//
|
|
104
|
+
// Fallar cerrado ante cualquier error de stat distinto de ENOENT. Se usa
|
|
105
|
+
// lstatSync para que un symlink en la ruta protegida se trate como
|
|
106
|
+
// presente aunque su destino falte: un symlink colgante en, p. ej.,
|
|
107
|
+
// .eslintrc.js sigue representando una entrada de configuracion
|
|
108
|
+
// existente que un agente no debe reemplazar en silencio.
|
|
109
|
+
// fs.existsSync se tragaria EACCES/EPERM como false; lstatSync expone el
|
|
110
|
+
// codigo de error para tratar como ausente solo el genuino "ruta no
|
|
111
|
+
// encontrada" (ENOENT).
|
|
112
|
+
let exists = true;
|
|
113
|
+
try {
|
|
114
|
+
fs.lstatSync(filePath);
|
|
115
|
+
// lstat tuvo exito: algo (archivo, directorio o symlink) existe aqui.
|
|
116
|
+
} catch (err) {
|
|
117
|
+
if (err && err.code === 'ENOENT') {
|
|
118
|
+
exists = false;
|
|
119
|
+
}
|
|
120
|
+
// Cualquier otro error (EACCES, EPERM, ELOOP, etc.) deja exists=true
|
|
121
|
+
// para que la proteccion nunca se debilite en silencio.
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (!exists) {
|
|
125
|
+
return { exitCode: 0 };
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return {
|
|
129
|
+
exitCode: 2,
|
|
130
|
+
stderr:
|
|
131
|
+
`BLOQUEADO: no se permite modificar ${basename}. ` +
|
|
132
|
+
'Corrige el codigo fuente para satisfacer las reglas del linter/formateador ' +
|
|
133
|
+
'en lugar de debilitar la configuracion. Si es un cambio de configuracion ' +
|
|
134
|
+
'legitimo, deshabilita temporalmente el hook config-protection.'
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return { exitCode: 0 };
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
module.exports = { run };
|
|
142
|
+
|
|
143
|
+
// Respaldo por stdin para ejecucion via spawnSync
|
|
144
|
+
let truncated = /^(1|true|yes)$/i.test(String(process.env.THEUS_HOOK_INPUT_TRUNCATED || ''));
|
|
145
|
+
process.stdin.setEncoding('utf8');
|
|
146
|
+
process.stdin.on('data', chunk => {
|
|
147
|
+
if (raw.length < MAX_STDIN) {
|
|
148
|
+
const remaining = MAX_STDIN - raw.length;
|
|
149
|
+
raw += chunk.substring(0, remaining);
|
|
150
|
+
if (chunk.length > remaining) truncated = true;
|
|
151
|
+
} else {
|
|
152
|
+
truncated = true;
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
process.stdin.on('end', () => {
|
|
157
|
+
const result = run(raw, {
|
|
158
|
+
truncated,
|
|
159
|
+
maxStdin: Number(process.env.THEUS_HOOK_INPUT_MAX_BYTES) || MAX_STDIN
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
if (result.stderr) {
|
|
163
|
+
process.stderr.write(result.stderr + '\n');
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
if (result.exitCode === 2) {
|
|
167
|
+
process.exit(2);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
process.stdout.write(raw);
|
|
171
|
+
});
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Hook PostToolUse: recordatorio ligero de calidad de diseño frontend.
|
|
4
|
+
*
|
|
5
|
+
* Es autocontenido dentro de Theus. No llama a modelos remotos ni instala
|
|
6
|
+
* paquetes. Su objetivo es detectar deriva hacia UI genérica evidente y
|
|
7
|
+
* mantener las ediciones de frontend alineadas con los estándares de diseño
|
|
8
|
+
* más exigentes de Theus.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
const fs = require('fs');
|
|
14
|
+
const path = require('path');
|
|
15
|
+
|
|
16
|
+
const FRONTEND_EXTENSIONS = /\.(astro|css|html|jsx|scss|svelte|tsx|vue)$/i;
|
|
17
|
+
const MAX_STDIN = 1024 * 1024;
|
|
18
|
+
|
|
19
|
+
const GENERIC_SIGNALS = [
|
|
20
|
+
{ pattern: /\bget started\b/i, label: 'copy de CTA "Get Started"' },
|
|
21
|
+
{ pattern: /\blearn more\b/i, label: 'copy de CTA "Learn more"' },
|
|
22
|
+
{ pattern: /\bgrid-cols-(3|4)\b/, label: 'grilla uniforme de múltiples tarjetas' },
|
|
23
|
+
{ pattern: /\bbg-gradient-to-[trbl]/, label: 'uso de utilidad de gradiente de plantilla' },
|
|
24
|
+
{ pattern: /\btext-center\b/, label: 'indicios de layout centrado por defecto' },
|
|
25
|
+
{ pattern: /\bfont-(sans|inter)\b/i, label: 'utilidad de fuente por defecto' },
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
const CHECKLIST = [
|
|
29
|
+
'jerarquía visual con contraste real',
|
|
30
|
+
'ritmo de espaciado intencional',
|
|
31
|
+
'profundidad, capas o superposición',
|
|
32
|
+
'estados hover y focus con propósito',
|
|
33
|
+
'color y tipografía que se sientan específicos',
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
function getFilePaths(input) {
|
|
37
|
+
const toolInput = input?.tool_input || {};
|
|
38
|
+
if (toolInput.file_path) {
|
|
39
|
+
return [String(toolInput.file_path)];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (Array.isArray(toolInput.edits)) {
|
|
43
|
+
return toolInput.edits
|
|
44
|
+
.map(edit => String(edit?.file_path || ''))
|
|
45
|
+
.filter(Boolean);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return [];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function readContent(filePath) {
|
|
52
|
+
try {
|
|
53
|
+
return fs.readFileSync(path.resolve(filePath), 'utf8');
|
|
54
|
+
} catch {
|
|
55
|
+
return '';
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function detectSignals(content) {
|
|
60
|
+
return GENERIC_SIGNALS.filter(signal => signal.pattern.test(content)).map(signal => signal.label);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function buildWarning(frontendPaths, findings) {
|
|
64
|
+
const pathLines = frontendPaths.map(fp => ` - ${fp}`).join('\n');
|
|
65
|
+
const signalLines = findings.length > 0
|
|
66
|
+
? findings.map(item => ` - ${item}`).join('\n')
|
|
67
|
+
: ' - no se detectaron cadenas obvias de plantilla enlatada';
|
|
68
|
+
|
|
69
|
+
return [
|
|
70
|
+
'[Hook] REVISIÓN DE DISEÑO: se modificaron archivos de frontend:',
|
|
71
|
+
pathLines,
|
|
72
|
+
'[Hook] Revisa que no haya deriva hacia lo genérico/plantilla. El frontend debe tener:',
|
|
73
|
+
CHECKLIST.map(item => ` - ${item}`).join('\n'),
|
|
74
|
+
'[Hook] Señales heurísticas:',
|
|
75
|
+
signalLines,
|
|
76
|
+
].join('\n');
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function run(inputOrRaw) {
|
|
80
|
+
let input;
|
|
81
|
+
let rawInput = inputOrRaw;
|
|
82
|
+
|
|
83
|
+
try {
|
|
84
|
+
if (typeof inputOrRaw === 'string') {
|
|
85
|
+
rawInput = inputOrRaw;
|
|
86
|
+
input = inputOrRaw.trim() ? JSON.parse(inputOrRaw) : {};
|
|
87
|
+
} else {
|
|
88
|
+
input = inputOrRaw || {};
|
|
89
|
+
rawInput = JSON.stringify(inputOrRaw ?? {});
|
|
90
|
+
}
|
|
91
|
+
} catch {
|
|
92
|
+
return { exitCode: 0, stdout: typeof rawInput === 'string' ? rawInput : '' };
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const filePaths = getFilePaths(input);
|
|
96
|
+
const frontendPaths = filePaths.filter(filePath => FRONTEND_EXTENSIONS.test(filePath));
|
|
97
|
+
|
|
98
|
+
if (frontendPaths.length === 0) {
|
|
99
|
+
return { exitCode: 0, stdout: typeof rawInput === 'string' ? rawInput : '' };
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const findings = [];
|
|
103
|
+
for (const filePath of frontendPaths) {
|
|
104
|
+
const content = readContent(filePath);
|
|
105
|
+
findings.push(...detectSignals(content));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return {
|
|
109
|
+
exitCode: 0,
|
|
110
|
+
stdout: typeof rawInput === 'string' ? rawInput : '',
|
|
111
|
+
stderr: buildWarning(frontendPaths, findings),
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
module.exports = { run };
|
|
116
|
+
|
|
117
|
+
if (require.main === module) {
|
|
118
|
+
let raw = '';
|
|
119
|
+
process.stdin.setEncoding('utf8');
|
|
120
|
+
process.stdin.on('data', chunk => {
|
|
121
|
+
if (raw.length < MAX_STDIN) {
|
|
122
|
+
const remaining = MAX_STDIN - raw.length;
|
|
123
|
+
raw += chunk.substring(0, remaining);
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
process.stdin.on('end', () => {
|
|
127
|
+
const result = run(raw);
|
|
128
|
+
if (result.stderr) process.stderr.write(`${result.stderr}\n`);
|
|
129
|
+
process.stdout.write(typeof result.stdout === 'string' ? result.stdout : raw);
|
|
130
|
+
process.exit(Number.isInteger(result.exitCode) ? result.exitCode : 0);
|
|
131
|
+
});
|
|
132
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Hook de aviso por archivos de documentación ad-hoc (PreToolUse - Write)
|
|
4
|
+
*
|
|
5
|
+
* Usa un enfoque de lista de denegación: solo avisa ante nombres de archivo
|
|
6
|
+
* de documentación ad-hoc conocidos (NOTES, TODO, SCRATCH, etc.) fuera de
|
|
7
|
+
* directorios estructurados. Esto evita falsos positivos en flujos de trabajo
|
|
8
|
+
* legítimos con mucho markdown (specs, ADRs, definiciones de comandos,
|
|
9
|
+
* archivos de skills, etc.).
|
|
10
|
+
*
|
|
11
|
+
* Código de salida 0 siempre (solo avisa, nunca bloquea).
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
'use strict';
|
|
15
|
+
|
|
16
|
+
const path = require('path');
|
|
17
|
+
const { buildPreToolUseAdditionalContext } = require('./pretooluse-visible-output');
|
|
18
|
+
|
|
19
|
+
const MAX_STDIN = 1024 * 1024;
|
|
20
|
+
|
|
21
|
+
// Nombres ad-hoc conocidos que indican archivos improvisados/de borrador
|
|
22
|
+
// (sensible a mayúsculas, solo en mayúsculas)
|
|
23
|
+
const ADHOC_FILENAMES = /^(NOTES|TODO|SCRATCH|TEMP|DRAFT|BRAINSTORM|SPIKE|DEBUG|WIP)\.(md|txt)$/;
|
|
24
|
+
|
|
25
|
+
// Directorios estructurados donde incluso los nombres ad-hoc son intencionales
|
|
26
|
+
const STRUCTURED_DIRS = /(^|\/)(docs|\.theus|\.github|commands|skills|benchmarks|templates|\.history|memory)\//;
|
|
27
|
+
|
|
28
|
+
function isSuspiciousDocPath(filePath) {
|
|
29
|
+
const normalized = filePath.replace(/\\/g, '/');
|
|
30
|
+
const basename = path.basename(normalized);
|
|
31
|
+
|
|
32
|
+
// Solo inspecciona archivos .md y .txt (sensible a mayúsculas, consistente con ADHOC_FILENAMES)
|
|
33
|
+
if (!/\.(md|txt)$/.test(basename)) return false;
|
|
34
|
+
|
|
35
|
+
// Solo marca nombres ad-hoc conocidos
|
|
36
|
+
if (!ADHOC_FILENAMES.test(basename)) return false;
|
|
37
|
+
|
|
38
|
+
// Permite nombres ad-hoc dentro de directorios estructurados (uso intencional)
|
|
39
|
+
if (STRUCTURED_DIRS.test(normalized)) return false;
|
|
40
|
+
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* run() exportable para ejecución en el mismo proceso vía run-with-flags.js.
|
|
46
|
+
* Evita la sobrecarga de ~50-100ms de spawnSync cuando está disponible.
|
|
47
|
+
*/
|
|
48
|
+
function run(inputOrRaw, _options = {}) {
|
|
49
|
+
let input;
|
|
50
|
+
try {
|
|
51
|
+
input = typeof inputOrRaw === 'string'
|
|
52
|
+
? (inputOrRaw.trim() ? JSON.parse(inputOrRaw) : {})
|
|
53
|
+
: (inputOrRaw || {});
|
|
54
|
+
} catch {
|
|
55
|
+
return { exitCode: 0 };
|
|
56
|
+
}
|
|
57
|
+
const filePath = String(input?.tool_input?.file_path || '');
|
|
58
|
+
|
|
59
|
+
if (filePath && isSuspiciousDocPath(filePath)) {
|
|
60
|
+
return {
|
|
61
|
+
exitCode: 0,
|
|
62
|
+
additionalContext: [
|
|
63
|
+
'[Hook] AVISO: se detectó un nombre de archivo de documentación ad-hoc',
|
|
64
|
+
`[Hook] Archivo: ${filePath}`,
|
|
65
|
+
'[Hook] Considera usar una ruta estructurada (p. ej. docs/, .theus/, skills/, .github/, benchmarks/, templates/)',
|
|
66
|
+
],
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return { exitCode: 0 };
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Punto de entrada por stdin para ejecución directa/spawnSync: lee el payload
|
|
75
|
+
* del hook desde stdin (con tope MAX_STDIN), ejecuta la política y escribe el
|
|
76
|
+
* resultado PreToolUse en stdout. Solo debe ejecutarse cuando se invoca
|
|
77
|
+
* directamente, nunca al hacer require(), para no filtrar los listeners de
|
|
78
|
+
* stdin hacia un proceso padre que cargue este hook en el mismo proceso.
|
|
79
|
+
*/
|
|
80
|
+
function main() {
|
|
81
|
+
let data = '';
|
|
82
|
+
process.stdin.setEncoding('utf8');
|
|
83
|
+
process.stdin.on('data', c => {
|
|
84
|
+
if (data.length < MAX_STDIN) {
|
|
85
|
+
const remaining = MAX_STDIN - data.length;
|
|
86
|
+
data += c.substring(0, remaining);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
process.stdin.on('end', () => {
|
|
91
|
+
const result = run(data);
|
|
92
|
+
|
|
93
|
+
if (result.stderr) {
|
|
94
|
+
process.stderr.write(result.stderr + '\n');
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (Object.prototype.hasOwnProperty.call(result, 'additionalContext')) {
|
|
98
|
+
process.stdout.write(buildPreToolUseAdditionalContext(result.additionalContext));
|
|
99
|
+
} else {
|
|
100
|
+
process.stdout.write(data);
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
module.exports = { run, main };
|
|
106
|
+
|
|
107
|
+
// Respaldo por stdin para ejecución con spawnSync — solo al invocarse directamente, no vía require()
|
|
108
|
+
if (require.main === module) {
|
|
109
|
+
main();
|
|
110
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Hook PreToolUse del modo seguro (matcher: Bash|Write|Edit).
|
|
4
|
+
*
|
|
5
|
+
* Lee el estado en <data home del arsenal>/modo-seguro.json (por defecto
|
|
6
|
+
* ~/.theus/arsenal/modo-seguro.json, gestionado por el comando /modo-seguro):
|
|
7
|
+
*
|
|
8
|
+
* { "mode": "off" | "cuidadoso" | "congelado" | "guardian",
|
|
9
|
+
* "dir": "<directorio permitido para escrituras>",
|
|
10
|
+
* "allowReadAll": true,
|
|
11
|
+
* "updatedAt": "<ISO UTC>" }
|
|
12
|
+
*
|
|
13
|
+
* Comportamiento:
|
|
14
|
+
* - "off" o archivo inexistente → permite todo (exit 0).
|
|
15
|
+
* - "cuidadoso" → bloquea los patrones destructivos en comandos Bash.
|
|
16
|
+
* - "congelado" → bloquea Write/Edit fuera del directorio `dir`.
|
|
17
|
+
* - "guardian" → aplica ambas protecciones.
|
|
18
|
+
*
|
|
19
|
+
* Bloqueo = exit 2 con el motivo en stderr (español) + registro en
|
|
20
|
+
* <data home del arsenal>/modo-seguro.log. Cualquier error interno degrada a
|
|
21
|
+
* permitir (exit 0): la protección nunca debe romper el CLI, y un estado
|
|
22
|
+
* corrupto equivale a modo off (se avisa por stderr sin bloquear).
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
const fs = require('fs');
|
|
26
|
+
const path = require('path');
|
|
27
|
+
const { resolveAgentDataHome } = require('../lib/agent-data-home');
|
|
28
|
+
|
|
29
|
+
const MAX_STDIN = 1024 * 1024;
|
|
30
|
+
|
|
31
|
+
const MODOS_VALIDOS = new Set(['off', 'cuidadoso', 'congelado', 'guardian']);
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Patrones destructivos vigilados en modo cuidadoso/guardian.
|
|
35
|
+
* Deben mantenerse alineados con la lista documentada en
|
|
36
|
+
* skills/modo-seguro/SKILL.md.
|
|
37
|
+
*/
|
|
38
|
+
const PATRONES_DESTRUCTIVOS = [
|
|
39
|
+
{ re: /\bsudo\s+rm\b/, motivo: 'sudo rm — borrado con privilegios de administrador' },
|
|
40
|
+
{ re: /\brm\b(?=[^\n|;&]*\s-\w*r)(?=[^\n|;&]*\s-\w*f)/, motivo: 'rm con -r y -f — borrado recursivo forzado' },
|
|
41
|
+
{ re: /\bgit\s+push\b[^\n]*(\s--force(-with-lease)?\b|\s-f\b)/, motivo: 'git push forzado — puede sobrescribir historia remota' },
|
|
42
|
+
{ re: /\bgit\s+reset\s+--hard\b/, motivo: 'git reset --hard — descarta cambios locales sin recuperación' },
|
|
43
|
+
{ re: /\bgit\s+checkout\s+(--\s+)?\.(\s|$)/, motivo: 'git checkout . — descarta todos los cambios del árbol de trabajo' },
|
|
44
|
+
{ re: /\bdrop\s+(table|database)\b/i, motivo: 'DROP TABLE/DATABASE — borrado de datos en la base' },
|
|
45
|
+
{ re: /\bdocker\s+system\s+prune\b/, motivo: 'docker system prune — borra contenedores/imágenes/volúmenes' },
|
|
46
|
+
{ re: /\bkubectl\s+delete\b/, motivo: 'kubectl delete — borra recursos del clúster' },
|
|
47
|
+
{ re: /\bchmod\s+(-\w+\s+)*777\b/, motivo: 'chmod 777 — permisos totalmente abiertos' },
|
|
48
|
+
{ re: /\bnpm\s+publish\b/, motivo: 'npm publish — publicación accidental de paquete' },
|
|
49
|
+
{ re: /--no-verify\b/, motivo: '--no-verify — omite los hooks de verificación' },
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
function leerStdin() {
|
|
53
|
+
return new Promise(resolve => {
|
|
54
|
+
let raw = '';
|
|
55
|
+
process.stdin.setEncoding('utf8');
|
|
56
|
+
process.stdin.on('data', chunk => {
|
|
57
|
+
if (raw.length < MAX_STDIN) raw += chunk.substring(0, MAX_STDIN - raw.length);
|
|
58
|
+
});
|
|
59
|
+
process.stdin.on('end', () => resolve(raw));
|
|
60
|
+
process.stdin.on('error', () => resolve(raw));
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function cargarEstado(dataHome) {
|
|
65
|
+
const stateFile = path.join(dataHome, 'modo-seguro.json');
|
|
66
|
+
if (!fs.existsSync(stateFile)) return { mode: 'off' };
|
|
67
|
+
try {
|
|
68
|
+
const parsed = JSON.parse(fs.readFileSync(stateFile, 'utf8'));
|
|
69
|
+
const mode = String(parsed?.mode || 'off').toLowerCase();
|
|
70
|
+
if (!MODOS_VALIDOS.has(mode)) {
|
|
71
|
+
process.stderr.write(`[modo-seguro] Modo desconocido "${mode}" en ${stateFile}; se trata como off\n`);
|
|
72
|
+
return { mode: 'off' };
|
|
73
|
+
}
|
|
74
|
+
return { ...parsed, mode };
|
|
75
|
+
} catch (error) {
|
|
76
|
+
process.stderr.write(`[modo-seguro] Estado ilegible en ${stateFile} (${error.message}); se trata como off\n`);
|
|
77
|
+
return { mode: 'off' };
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function registrar(dataHome, entrada) {
|
|
82
|
+
try {
|
|
83
|
+
fs.mkdirSync(dataHome, { recursive: true });
|
|
84
|
+
fs.appendFileSync(
|
|
85
|
+
path.join(dataHome, 'modo-seguro.log'),
|
|
86
|
+
`${JSON.stringify({ ts: new Date().toISOString(), ...entrada })}\n`,
|
|
87
|
+
'utf8',
|
|
88
|
+
);
|
|
89
|
+
} catch {
|
|
90
|
+
// El registro nunca debe impedir el bloqueo ni la ejecución.
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function bloquear(dataHome, estado, detalle, motivo, sugerencia) {
|
|
95
|
+
registrar(dataHome, { mode: estado.mode, ...detalle, motivo });
|
|
96
|
+
process.stderr.write(
|
|
97
|
+
`[modo seguro: ${estado.mode}] Acción bloqueada: ${motivo}.\n` +
|
|
98
|
+
`${sugerencia}\n` +
|
|
99
|
+
`Para desactivar las protecciones usa /modo-seguro off.\n`,
|
|
100
|
+
);
|
|
101
|
+
process.exit(2);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
async function main() {
|
|
105
|
+
let input = {};
|
|
106
|
+
try {
|
|
107
|
+
const raw = (await leerStdin()).trim();
|
|
108
|
+
if (raw) input = JSON.parse(raw);
|
|
109
|
+
} catch {
|
|
110
|
+
process.exit(0);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const dataHome = resolveAgentDataHome();
|
|
114
|
+
const estado = cargarEstado(dataHome);
|
|
115
|
+
if (estado.mode === 'off') process.exit(0);
|
|
116
|
+
|
|
117
|
+
const tool = String(input.tool_name || '');
|
|
118
|
+
const vigilaComandos = estado.mode === 'cuidadoso' || estado.mode === 'guardian';
|
|
119
|
+
const vigilaEscrituras = estado.mode === 'congelado' || estado.mode === 'guardian';
|
|
120
|
+
|
|
121
|
+
if (tool === 'Bash' && vigilaComandos) {
|
|
122
|
+
const command = String(input.tool_input?.command || '');
|
|
123
|
+
for (const patron of PATRONES_DESTRUCTIVOS) {
|
|
124
|
+
if (patron.re.test(command)) {
|
|
125
|
+
bloquear(
|
|
126
|
+
dataHome,
|
|
127
|
+
estado,
|
|
128
|
+
{ tool, command: command.slice(0, 500) },
|
|
129
|
+
patron.motivo,
|
|
130
|
+
'Si de verdad necesitas ejecutarlo, hazlo tú a mano en tu terminal o ajusta el comando a una variante más segura.',
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if ((tool === 'Write' || tool === 'Edit') && vigilaEscrituras) {
|
|
137
|
+
const filePath = String(input.tool_input?.file_path || '');
|
|
138
|
+
if (filePath) {
|
|
139
|
+
const permitido = path.resolve(String(estado.dir || input.cwd || process.cwd()));
|
|
140
|
+
const destino = path.resolve(String(input.cwd || process.cwd()), filePath);
|
|
141
|
+
const relativo = path.relative(permitido, destino);
|
|
142
|
+
const fuera = relativo === '' ? false : relativo.startsWith('..') || path.isAbsolute(relativo);
|
|
143
|
+
if (fuera) {
|
|
144
|
+
bloquear(
|
|
145
|
+
dataHome,
|
|
146
|
+
estado,
|
|
147
|
+
{ tool, file: destino },
|
|
148
|
+
`escritura fuera del directorio permitido (${permitido})`,
|
|
149
|
+
'Trabaja dentro del directorio permitido o cambia el directorio con /modo-seguro.',
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
process.exit(0);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
main().catch(() => process.exit(0));
|