theus-cli-linux-arm64 1.2.2 → 1.4.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/README.md +50 -11
- package/RELEASE.json +6 -6
- package/bin/theus +0 -0
- package/package.json +1 -1
- package/vendor/higiene-motor/PARCHES.md +244 -0
- package/vendor/higiene-motor/audit_dir.py +166 -0
- package/vendor/higiene-motor/audit_lib.py +333 -0
- package/vendor/higiene-motor/audit_website.py +635 -0
- package/vendor/higiene-motor/av_meta.py +498 -0
- package/vendor/higiene-motor/check_staged.py +71 -0
- package/vendor/higiene-motor/clean_ctrlregen.py +212 -0
- package/vendor/higiene-motor/clean_file.py +237 -0
- package/vendor/higiene-motor/clean_image.py +218 -0
- package/vendor/higiene-motor/clean_staged.py +143 -0
- package/vendor/higiene-motor/clean_text.py +108 -0
- package/vendor/higiene-motor/common.py +486 -0
- package/vendor/higiene-motor/container_meta.py +2522 -0
- package/vendor/higiene-motor/detect_gumbel.py +308 -0
- package/vendor/higiene-motor/detect_text_watermark.py +613 -0
- package/vendor/higiene-motor/format_dispatch.py +157 -0
- package/vendor/higiene-motor/hook_written_file.py +253 -0
- package/vendor/higiene-motor/image_meta.py +2171 -0
- package/vendor/higiene-motor/inspect_file.py +138 -0
- package/vendor/higiene-motor/inspect_image.py +72 -0
- package/vendor/higiene-motor/inspect_text.py +86 -0
- package/vendor/higiene-motor/markdiffusion_harness.py +533 -0
- package/vendor/higiene-motor/rewrite_text.py +737 -0
- package/vendor/higiene-motor/score_stylometry.py +460 -0
- package/vendor/higiene-motor/score_synthid.py +165 -0
- package/vendor/higiene-motor/server.py +1059 -0
- package/vendor/higiene-motor/synthid_score_server.py +176 -0
- package/vendor/higiene-motor/text_detectors.py +433 -0
- package/vendor/higiene-motor/text_unicode.py +730 -0
- package/vendor/theus-arsenal/.arsenal-nombres-ola2.json +0 -6
- package/vendor/theus-arsenal/.arsenal-nombres-ola3.json +0 -72
- package/vendor/theus-arsenal/.mailmap +0 -2
- package/vendor/theus-arsenal/.theus-plugin/marketplace.json +0 -25
- package/vendor/theus-arsenal/.theus-plugin/plugin.json +0 -20
- package/vendor/theus-arsenal/AUTHORS.md +0 -8
- package/vendor/theus-arsenal/CLEANROOM_REPLACEMENT_PLAN.md +0 -11
- package/vendor/theus-arsenal/LICENSE +0 -26
- package/vendor/theus-arsenal/PROVENANCE.md +0 -9
- package/vendor/theus-arsenal/README.md +0 -41
- package/vendor/theus-arsenal/THIRD_PARTY.md +0 -80
- package/vendor/theus-arsenal/agents/actualizador-docs.md +0 -123
- package/vendor/theus-arsenal/agents/analista-comentarios.md +0 -53
- package/vendor/theus-arsenal/agents/analista-conversaciones.md +0 -60
- package/vendor/theus-arsenal/agents/analista-tests-pr.md +0 -53
- package/vendor/theus-arsenal/agents/analista-tipos.md +0 -49
- package/vendor/theus-arsenal/agents/arquitecto-accesibilidad.md +0 -148
- package/vendor/theus-arsenal/agents/arquitecto-codigo.md +0 -79
- package/vendor/theus-arsenal/agents/arquitecto-homelab.md +0 -90
- package/vendor/theus-arsenal/agents/arquitecto-redes.md +0 -116
- package/vendor/theus-arsenal/agents/arquitecto-sistemas.md +0 -219
- package/vendor/theus-arsenal/agents/bifurcador-opensource.md +0 -206
- package/vendor/theus-arsenal/agents/cazador-fallos-silenciosos.md +0 -58
- package/vendor/theus-arsenal/agents/consultor-documentacion.md +0 -76
- package/vendor/theus-arsenal/agents/diagnosticador-redes.md +0 -135
- package/vendor/theus-arsenal/agents/ejecutor-e2e.md +0 -96
- package/vendor/theus-arsenal/agents/empaquetador-opensource.md +0 -257
- package/vendor/theus-arsenal/agents/escaner-secretos.md +0 -196
- package/vendor/theus-arsenal/agents/especialista-seo.md +0 -70
- package/vendor/theus-arsenal/agents/estratega-marketing.md +0 -158
- package/vendor/theus-arsenal/agents/evaluador-agentes.md +0 -214
- package/vendor/theus-arsenal/agents/evaluador-harness.md +0 -217
- package/vendor/theus-arsenal/agents/explorador-codigo.md +0 -79
- package/vendor/theus-arsenal/agents/extractor-specs.md +0 -214
- package/vendor/theus-arsenal/agents/generador-harness.md +0 -139
- package/vendor/theus-arsenal/agents/guia-tdd.md +0 -99
- package/vendor/theus-arsenal/agents/jefe-de-gabinete.md +0 -162
- package/vendor/theus-arsenal/agents/limpiador-refactors.md +0 -93
- package/vendor/theus-arsenal/agents/optimizador-rendimiento.md +0 -454
- package/vendor/theus-arsenal/agents/planificador-harness.md +0 -107
- package/vendor/theus-arsenal/agents/planificador.md +0 -221
- package/vendor/theus-arsenal/agents/resolutor-apps-harmonyos.md +0 -181
- package/vendor/theus-arsenal/agents/resolutor-builds-cpp.md +0 -98
- package/vendor/theus-arsenal/agents/resolutor-builds-dart.md +0 -209
- package/vendor/theus-arsenal/agents/resolutor-builds-django.md +0 -253
- package/vendor/theus-arsenal/agents/resolutor-builds-go.md +0 -102
- package/vendor/theus-arsenal/agents/resolutor-builds-java.md +0 -274
- package/vendor/theus-arsenal/agents/resolutor-builds-kotlin.md +0 -128
- package/vendor/theus-arsenal/agents/resolutor-builds-pytorch.md +0 -128
- package/vendor/theus-arsenal/agents/resolutor-builds-react.md +0 -214
- package/vendor/theus-arsenal/agents/resolutor-builds-rust.md +0 -156
- package/vendor/theus-arsenal/agents/resolutor-builds-swift.md +0 -169
- package/vendor/theus-arsenal/agents/resolutor-builds.md +0 -122
- package/vendor/theus-arsenal/agents/revisor-bd.md +0 -97
- package/vendor/theus-arsenal/agents/revisor-codigo.md +0 -291
- package/vendor/theus-arsenal/agents/revisor-config-red.md +0 -116
- package/vendor/theus-arsenal/agents/revisor-cpp.md +0 -80
- package/vendor/theus-arsenal/agents/revisor-csharp.md +0 -109
- package/vendor/theus-arsenal/agents/revisor-django.md +0 -168
- package/vendor/theus-arsenal/agents/revisor-fastapi.md +0 -82
- package/vendor/theus-arsenal/agents/revisor-flutter.md +0 -251
- package/vendor/theus-arsenal/agents/revisor-go.md +0 -84
- package/vendor/theus-arsenal/agents/revisor-java.md +0 -192
- package/vendor/theus-arsenal/agents/revisor-kotlin.md +0 -171
- package/vendor/theus-arsenal/agents/revisor-ml.md +0 -159
- package/vendor/theus-arsenal/agents/revisor-php.md +0 -108
- package/vendor/theus-arsenal/agents/revisor-python.md +0 -106
- package/vendor/theus-arsenal/agents/revisor-react.md +0 -166
- package/vendor/theus-arsenal/agents/revisor-rust.md +0 -102
- package/vendor/theus-arsenal/agents/revisor-seguridad.md +0 -116
- package/vendor/theus-arsenal/agents/revisor-software-clinico.md +0 -95
- package/vendor/theus-arsenal/agents/revisor-swift.md +0 -115
- package/vendor/theus-arsenal/agents/revisor-typescript.md +0 -123
- package/vendor/theus-arsenal/agents/revisor-vue.md +0 -205
- package/vendor/theus-arsenal/agents/simplificador-codigo.md +0 -55
- package/vendor/theus-arsenal/commands/actualizar-docs.md +0 -88
- package/vendor/theus-arsenal/commands/actualizar-mapas-codigo.md +0 -78
- package/vendor/theus-arsenal/commands/aprender-evaluar.md +0 -109
- package/vendor/theus-arsenal/commands/aprender.md +0 -74
- package/vendor/theus-arsenal/commands/arreglar-build.md +0 -66
- package/vendor/theus-arsenal/commands/bucle-multiperspectiva.md +0 -153
- package/vendor/theus-arsenal/commands/build-cpp.md +0 -173
- package/vendor/theus-arsenal/commands/build-flutter.md +0 -164
- package/vendor/theus-arsenal/commands/build-go.md +0 -183
- package/vendor/theus-arsenal/commands/build-gradle.md +0 -75
- package/vendor/theus-arsenal/commands/build-kotlin.md +0 -176
- package/vendor/theus-arsenal/commands/build-react.md +0 -187
- package/vendor/theus-arsenal/commands/build-rust.md +0 -187
- package/vendor/theus-arsenal/commands/campana-marketing.md +0 -125
- package/vendor/theus-arsenal/commands/checkpoint.md +0 -78
- package/vendor/theus-arsenal/commands/cobertura-tests.md +0 -73
- package/vendor/theus-arsenal/commands/configurar-gestor-paquetes.md +0 -86
- package/vendor/theus-arsenal/commands/consulta.md +0 -164
- package/vendor/theus-arsenal/commands/control-calidad.md +0 -50
- package/vendor/theus-arsenal/commands/crear-skill.md +0 -77
- package/vendor/theus-arsenal/commands/enrutar-modelo.md +0 -30
- package/vendor/theus-arsenal/commands/epica-desbloquear.md +0 -17
- package/vendor/theus-arsenal/commands/epica-descomponer.md +0 -22
- package/vendor/theus-arsenal/commands/epica-publicar.md +0 -21
- package/vendor/theus-arsenal/commands/epica-reclamar.md +0 -25
- package/vendor/theus-arsenal/commands/epica-revisar.md +0 -22
- package/vendor/theus-arsenal/commands/epica-sincronizar.md +0 -21
- package/vendor/theus-arsenal/commands/epica-validar.md +0 -21
- package/vendor/theus-arsenal/commands/evolucionar.md +0 -176
- package/vendor/theus-arsenal/commands/funcionalidad.md +0 -49
- package/vendor/theus-arsenal/commands/guardar-sesion.md +0 -278
- package/vendor/theus-arsenal/commands/harness-build.md +0 -111
- package/vendor/theus-arsenal/commands/harness-diseno.md +0 -46
- package/vendor/theus-arsenal/commands/informe-costos.md +0 -90
- package/vendor/theus-arsenal/commands/iniciar-bucle.md +0 -36
- package/vendor/theus-arsenal/commands/instintos-estado.md +0 -53
- package/vendor/theus-arsenal/commands/instintos-exportar.md +0 -69
- package/vendor/theus-arsenal/commands/instintos-importar.md +0 -120
- package/vendor/theus-arsenal/commands/lienzo-planes.md +0 -48
- package/vendor/theus-arsenal/commands/limpiar-refactor.md +0 -84
- package/vendor/theus-arsenal/commands/modo-seguro.md +0 -96
- package/vendor/theus-arsenal/commands/orq-agregar-funcionalidad.md +0 -36
- package/vendor/theus-arsenal/commands/orq-cambiar-funcionalidad.md +0 -38
- package/vendor/theus-arsenal/commands/orq-construir-mvp.md +0 -36
- package/vendor/theus-arsenal/commands/orq-corregir-defecto.md +0 -40
- package/vendor/theus-arsenal/commands/orq-refinar-codigo.md +0 -44
- package/vendor/theus-arsenal/commands/orq-revisar.md +0 -135
- package/vendor/theus-arsenal/commands/plan-prd.md +0 -160
- package/vendor/theus-arsenal/commands/plan.md +0 -198
- package/vendor/theus-arsenal/commands/podar.md +0 -31
- package/vendor/theus-arsenal/commands/pr.md +0 -181
- package/vendor/theus-arsenal/commands/promover.md +0 -41
- package/vendor/theus-arsenal/commands/proyectos.md +0 -33
- package/vendor/theus-arsenal/commands/prp-commit.md +0 -112
- package/vendor/theus-arsenal/commands/prp-implementar.md +0 -385
- package/vendor/theus-arsenal/commands/prp-planificar.md +0 -501
- package/vendor/theus-arsenal/commands/reanudar-sesion.md +0 -160
- package/vendor/theus-arsenal/commands/revisar-codigo.md +0 -289
- package/vendor/theus-arsenal/commands/revisar-cpp.md +0 -132
- package/vendor/theus-arsenal/commands/revisar-fastapi.md +0 -39
- package/vendor/theus-arsenal/commands/revisar-flutter.md +0 -115
- package/vendor/theus-arsenal/commands/revisar-go.md +0 -148
- package/vendor/theus-arsenal/commands/revisar-kotlin.md +0 -140
- package/vendor/theus-arsenal/commands/revisar-pr.md +0 -37
- package/vendor/theus-arsenal/commands/revisar-python.md +0 -297
- package/vendor/theus-arsenal/commands/revisar-react.md +0 -170
- package/vendor/theus-arsenal/commands/revisar-rust.md +0 -142
- package/vendor/theus-arsenal/commands/revisar-vue.md +0 -174
- package/vendor/theus-arsenal/commands/salud-skills.md +0 -52
- package/vendor/theus-arsenal/commands/sesiones.md +0 -345
- package/vendor/theus-arsenal/commands/test-cpp.md +0 -252
- package/vendor/theus-arsenal/commands/test-flutter.md +0 -143
- package/vendor/theus-arsenal/commands/test-go.md +0 -268
- package/vendor/theus-arsenal/commands/test-kotlin.md +0 -312
- package/vendor/theus-arsenal/commands/test-react.md +0 -265
- package/vendor/theus-arsenal/commands/test-rust.md +0 -309
- package/vendor/theus-arsenal/commands/vigilancia-canary.md +0 -43
- package/vendor/theus-arsenal/hooks/hooks.json +0 -274
- package/vendor/theus-arsenal/package.json +0 -6
- package/vendor/theus-arsenal/rules/angular/coding-style.md +0 -182
- package/vendor/theus-arsenal/rules/angular/hooks.md +0 -25
- package/vendor/theus-arsenal/rules/angular/patterns.md +0 -249
- package/vendor/theus-arsenal/rules/angular/security.md +0 -87
- package/vendor/theus-arsenal/rules/angular/testing.md +0 -164
- package/vendor/theus-arsenal/rules/arkts/coding-style.md +0 -153
- package/vendor/theus-arsenal/rules/arkts/hooks.md +0 -80
- package/vendor/theus-arsenal/rules/arkts/patterns.md +0 -236
- package/vendor/theus-arsenal/rules/arkts/security.md +0 -141
- package/vendor/theus-arsenal/rules/arkts/testing.md +0 -126
- package/vendor/theus-arsenal/rules/common/agents.md +0 -49
- package/vendor/theus-arsenal/rules/common/code-review.md +0 -123
- package/vendor/theus-arsenal/rules/common/coding-style.md +0 -90
- package/vendor/theus-arsenal/rules/common/development-workflow.md +0 -44
- package/vendor/theus-arsenal/rules/common/git-workflow.md +0 -24
- package/vendor/theus-arsenal/rules/common/hooks.md +0 -32
- package/vendor/theus-arsenal/rules/common/patterns.md +0 -31
- package/vendor/theus-arsenal/rules/common/performance.md +0 -53
- package/vendor/theus-arsenal/rules/common/security.md +0 -29
- package/vendor/theus-arsenal/rules/common/testing.md +0 -57
- package/vendor/theus-arsenal/rules/cpp/coding-style.md +0 -44
- package/vendor/theus-arsenal/rules/cpp/hooks.md +0 -39
- package/vendor/theus-arsenal/rules/cpp/patterns.md +0 -51
- package/vendor/theus-arsenal/rules/cpp/security.md +0 -51
- package/vendor/theus-arsenal/rules/cpp/testing.md +0 -44
- package/vendor/theus-arsenal/rules/csharp/coding-style.md +0 -72
- package/vendor/theus-arsenal/rules/csharp/hooks.md +0 -25
- package/vendor/theus-arsenal/rules/csharp/patterns.md +0 -50
- package/vendor/theus-arsenal/rules/csharp/security.md +0 -58
- package/vendor/theus-arsenal/rules/csharp/testing.md +0 -50
- package/vendor/theus-arsenal/rules/dart/coding-style.md +0 -159
- package/vendor/theus-arsenal/rules/dart/hooks.md +0 -68
- package/vendor/theus-arsenal/rules/dart/patterns.md +0 -261
- package/vendor/theus-arsenal/rules/dart/security.md +0 -135
- package/vendor/theus-arsenal/rules/dart/testing.md +0 -215
- package/vendor/theus-arsenal/rules/fsharp/coding-style.md +0 -112
- package/vendor/theus-arsenal/rules/fsharp/hooks.md +0 -26
- package/vendor/theus-arsenal/rules/fsharp/patterns.md +0 -111
- package/vendor/theus-arsenal/rules/fsharp/security.md +0 -76
- package/vendor/theus-arsenal/rules/fsharp/testing.md +0 -62
- package/vendor/theus-arsenal/rules/golang/coding-style.md +0 -32
- package/vendor/theus-arsenal/rules/golang/hooks.md +0 -17
- package/vendor/theus-arsenal/rules/golang/patterns.md +0 -45
- package/vendor/theus-arsenal/rules/golang/security.md +0 -34
- package/vendor/theus-arsenal/rules/golang/testing.md +0 -31
- package/vendor/theus-arsenal/rules/java/coding-style.md +0 -114
- package/vendor/theus-arsenal/rules/java/hooks.md +0 -18
- package/vendor/theus-arsenal/rules/java/patterns.md +0 -147
- package/vendor/theus-arsenal/rules/java/security.md +0 -101
- package/vendor/theus-arsenal/rules/java/testing.md +0 -133
- package/vendor/theus-arsenal/rules/kotlin/coding-style.md +0 -86
- package/vendor/theus-arsenal/rules/kotlin/hooks.md +0 -17
- package/vendor/theus-arsenal/rules/kotlin/patterns.md +0 -146
- package/vendor/theus-arsenal/rules/kotlin/security.md +0 -82
- package/vendor/theus-arsenal/rules/kotlin/testing.md +0 -128
- package/vendor/theus-arsenal/rules/nuxt/coding-style.md +0 -47
- package/vendor/theus-arsenal/rules/nuxt/hooks.md +0 -39
- package/vendor/theus-arsenal/rules/nuxt/patterns.md +0 -54
- package/vendor/theus-arsenal/rules/nuxt/security.md +0 -48
- package/vendor/theus-arsenal/rules/nuxt/testing.md +0 -49
- package/vendor/theus-arsenal/rules/php/coding-style.md +0 -40
- package/vendor/theus-arsenal/rules/php/hooks.md +0 -24
- package/vendor/theus-arsenal/rules/php/patterns.md +0 -33
- package/vendor/theus-arsenal/rules/php/security.md +0 -37
- package/vendor/theus-arsenal/rules/php/testing.md +0 -38
- package/vendor/theus-arsenal/rules/python/coding-style.md +0 -42
- package/vendor/theus-arsenal/rules/python/fastapi.md +0 -58
- package/vendor/theus-arsenal/rules/python/hooks.md +0 -19
- package/vendor/theus-arsenal/rules/python/patterns.md +0 -39
- package/vendor/theus-arsenal/rules/python/security.md +0 -30
- package/vendor/theus-arsenal/rules/python/testing.md +0 -38
- package/vendor/theus-arsenal/rules/react/coding-style.md +0 -109
- package/vendor/theus-arsenal/rules/react/hooks.md +0 -187
- package/vendor/theus-arsenal/rules/react/patterns.md +0 -194
- package/vendor/theus-arsenal/rules/react/security.md +0 -180
- package/vendor/theus-arsenal/rules/react/testing.md +0 -208
- package/vendor/theus-arsenal/rules/react-native/accessibility.md +0 -55
- package/vendor/theus-arsenal/rules/react-native/coding-style.md +0 -71
- package/vendor/theus-arsenal/rules/react-native/hooks.md +0 -28
- package/vendor/theus-arsenal/rules/react-native/patterns.md +0 -88
- package/vendor/theus-arsenal/rules/react-native/performance.md +0 -45
- package/vendor/theus-arsenal/rules/react-native/production-readiness.md +0 -51
- package/vendor/theus-arsenal/rules/react-native/security.md +0 -43
- package/vendor/theus-arsenal/rules/react-native/testing.md +0 -52
- package/vendor/theus-arsenal/rules/ruby/coding-style.md +0 -46
- package/vendor/theus-arsenal/rules/ruby/hooks.md +0 -37
- package/vendor/theus-arsenal/rules/ruby/patterns.md +0 -44
- package/vendor/theus-arsenal/rules/ruby/security.md +0 -51
- package/vendor/theus-arsenal/rules/ruby/testing.md +0 -51
- package/vendor/theus-arsenal/rules/rust/coding-style.md +0 -151
- package/vendor/theus-arsenal/rules/rust/hooks.md +0 -16
- package/vendor/theus-arsenal/rules/rust/patterns.md +0 -168
- package/vendor/theus-arsenal/rules/rust/security.md +0 -141
- package/vendor/theus-arsenal/rules/rust/testing.md +0 -154
- package/vendor/theus-arsenal/rules/swift/coding-style.md +0 -47
- package/vendor/theus-arsenal/rules/swift/hooks.md +0 -20
- package/vendor/theus-arsenal/rules/swift/patterns.md +0 -66
- package/vendor/theus-arsenal/rules/swift/security.md +0 -33
- package/vendor/theus-arsenal/rules/swift/testing.md +0 -45
- package/vendor/theus-arsenal/rules/typescript/coding-style.md +0 -199
- package/vendor/theus-arsenal/rules/typescript/hooks.md +0 -22
- package/vendor/theus-arsenal/rules/typescript/patterns.md +0 -52
- package/vendor/theus-arsenal/rules/typescript/security.md +0 -28
- package/vendor/theus-arsenal/rules/typescript/testing.md +0 -18
- package/vendor/theus-arsenal/rules/vue/coding-style.md +0 -54
- package/vendor/theus-arsenal/rules/vue/hooks.md +0 -45
- package/vendor/theus-arsenal/rules/vue/patterns.md +0 -56
- package/vendor/theus-arsenal/rules/vue/security.md +0 -46
- package/vendor/theus-arsenal/rules/vue/testing.md +0 -53
- package/vendor/theus-arsenal/rules/web/coding-style.md +0 -108
- package/vendor/theus-arsenal/rules/web/design-quality.md +0 -75
- package/vendor/theus-arsenal/rules/web/hooks.md +0 -141
- package/vendor/theus-arsenal/rules/web/patterns.md +0 -91
- package/vendor/theus-arsenal/rules/web/performance.md +0 -76
- package/vendor/theus-arsenal/rules/web/security.md +0 -69
- package/vendor/theus-arsenal/rules/web/testing.md +0 -67
- package/vendor/theus-arsenal/scripts/hooks/bash-hook-dispatcher.js +0 -192
- package/vendor/theus-arsenal/scripts/hooks/block-no-verify.js +0 -556
- package/vendor/theus-arsenal/scripts/hooks/check-console-log.js +0 -92
- package/vendor/theus-arsenal/scripts/hooks/check-hook-enabled.js +0 -16
- package/vendor/theus-arsenal/scripts/hooks/config-protection.js +0 -171
- package/vendor/theus-arsenal/scripts/hooks/design-quality-check.js +0 -132
- package/vendor/theus-arsenal/scripts/hooks/doc-file-warning.js +0 -110
- package/vendor/theus-arsenal/scripts/hooks/modo-seguro.js +0 -158
- package/vendor/theus-arsenal/scripts/hooks/notificacion-escritorio.js +0 -208
- package/vendor/theus-arsenal/scripts/hooks/plugin-hook-bootstrap.js +0 -280
- package/vendor/theus-arsenal/scripts/hooks/post-bash-command-log.js +0 -87
- package/vendor/theus-arsenal/scripts/hooks/post-bash-dispatcher.js +0 -24
- package/vendor/theus-arsenal/scripts/hooks/post-bash-pr-created.js +0 -60
- package/vendor/theus-arsenal/scripts/hooks/post-edit-accumulator.js +0 -94
- package/vendor/theus-arsenal/scripts/hooks/post-edit-console-warn.js +0 -54
- package/vendor/theus-arsenal/scripts/hooks/post-edit-format.js +0 -110
- package/vendor/theus-arsenal/scripts/hooks/post-edit-typecheck.js +0 -98
- package/vendor/theus-arsenal/scripts/hooks/pre-bash-commit-quality.js +0 -447
- package/vendor/theus-arsenal/scripts/hooks/pre-bash-dev-server-block.js +0 -232
- package/vendor/theus-arsenal/scripts/hooks/pre-bash-dispatcher.js +0 -27
- package/vendor/theus-arsenal/scripts/hooks/pre-compact.js +0 -101
- package/vendor/theus-arsenal/scripts/hooks/pretooluse-visible-output.js +0 -49
- package/vendor/theus-arsenal/scripts/hooks/quality-gate.js +0 -168
- package/vendor/theus-arsenal/scripts/hooks/run-with-flags.js +0 -271
- package/vendor/theus-arsenal/scripts/hooks/salud-mcp.js +0 -749
- package/vendor/theus-arsenal/scripts/hooks/seguimiento-costos.js +0 -161
- package/vendor/theus-arsenal/scripts/hooks/session-end.js +0 -340
- package/vendor/theus-arsenal/scripts/hooks/session-start.js +0 -906
- package/vendor/theus-arsenal/scripts/hooks/stop-format-typecheck.js +0 -263
- package/vendor/theus-arsenal/scripts/hooks/suggest-compact.js +0 -286
- package/vendor/theus-arsenal/scripts/hooks/theus-context-monitor.js +0 -289
- package/vendor/theus-arsenal/scripts/hooks/verificacion-factual.js +0 -1278
- package/vendor/theus-arsenal/scripts/lib/agent-data-home.js +0 -96
- package/vendor/theus-arsenal/scripts/lib/cost-estimate.js +0 -66
- package/vendor/theus-arsenal/scripts/lib/hook-flags.js +0 -79
- package/vendor/theus-arsenal/scripts/lib/llm-summary.js +0 -185
- package/vendor/theus-arsenal/scripts/lib/loopback-guard.js +0 -54
- package/vendor/theus-arsenal/scripts/lib/observer-sessions.js +0 -237
- package/vendor/theus-arsenal/scripts/lib/package-manager.d.ts +0 -120
- package/vendor/theus-arsenal/scripts/lib/package-manager.js +0 -434
- package/vendor/theus-arsenal/scripts/lib/path-safety.js +0 -86
- package/vendor/theus-arsenal/scripts/lib/plan-canvas/markdown.js +0 -285
- package/vendor/theus-arsenal/scripts/lib/plan-canvas/sdk.js +0 -238
- package/vendor/theus-arsenal/scripts/lib/plan-canvas/server.js +0 -534
- package/vendor/theus-arsenal/scripts/lib/plan-canvas/sessions.js +0 -274
- package/vendor/theus-arsenal/scripts/lib/plan-canvas/ui.js +0 -546
- package/vendor/theus-arsenal/scripts/lib/project-detect.js +0 -451
- package/vendor/theus-arsenal/scripts/lib/resolve-formatter.js +0 -193
- package/vendor/theus-arsenal/scripts/lib/resolve-theus-root.js +0 -101
- package/vendor/theus-arsenal/scripts/lib/session-aliases.d.ts +0 -138
- package/vendor/theus-arsenal/scripts/lib/session-aliases.js +0 -483
- package/vendor/theus-arsenal/scripts/lib/session-bridge.js +0 -155
- package/vendor/theus-arsenal/scripts/lib/session-manager.d.ts +0 -137
- package/vendor/theus-arsenal/scripts/lib/session-manager.js +0 -555
- package/vendor/theus-arsenal/scripts/lib/shell-split.js +0 -86
- package/vendor/theus-arsenal/scripts/lib/shell-substitution.js +0 -501
- package/vendor/theus-arsenal/scripts/lib/skill-evolution/dashboard.js +0 -414
- package/vendor/theus-arsenal/scripts/lib/skill-evolution/health.js +0 -285
- package/vendor/theus-arsenal/scripts/lib/skill-evolution/index.js +0 -22
- package/vendor/theus-arsenal/scripts/lib/skill-evolution/provenance.js +0 -200
- package/vendor/theus-arsenal/scripts/lib/skill-evolution/tracker.js +0 -157
- package/vendor/theus-arsenal/scripts/lib/skill-evolution/versioning.js +0 -246
- package/vendor/theus-arsenal/scripts/lib/transcript-context.js +0 -232
- package/vendor/theus-arsenal/scripts/lib/utils.d.ts +0 -205
- package/vendor/theus-arsenal/scripts/lib/utils.js +0 -658
- package/vendor/theus-arsenal/scripts/plan-canvas.js +0 -341
- package/vendor/theus-arsenal/scripts/setup-package-manager.js +0 -46
- package/vendor/theus-arsenal/scripts/skills-health.js +0 -143
- package/vendor/theus-arsenal/skills/a11y-frontend/SKILL.md +0 -444
- package/vendor/theus-arsenal/skills/accesibilidad/SKILL.md +0 -144
- package/vendor/theus-arsenal/skills/acelerador-throughput-datos/SKILL.md +0 -72
- package/vendor/theus-arsenal/skills/agente-scraper-datos/SKILL.md +0 -771
- package/vendor/theus-arsenal/skills/analisis-plataformas-competencia/SKILL.md +0 -137
- package/vendor/theus-arsenal/skills/api-x/SKILL.md +0 -233
- package/vendor/theus-arsenal/skills/aprendizaje-continuo-v2/SKILL.md +0 -335
- package/vendor/theus-arsenal/skills/aprendizaje-continuo-v2/agents/observer-loop.sh +0 -374
- package/vendor/theus-arsenal/skills/aprendizaje-continuo-v2/agents/observer.md +0 -188
- package/vendor/theus-arsenal/skills/aprendizaje-continuo-v2/agents/session-guardian.sh +0 -153
- package/vendor/theus-arsenal/skills/aprendizaje-continuo-v2/agents/start-observer.sh +0 -253
- package/vendor/theus-arsenal/skills/aprendizaje-continuo-v2/config.json +0 -8
- package/vendor/theus-arsenal/skills/aprendizaje-continuo-v2/hooks/observe.sh +0 -594
- package/vendor/theus-arsenal/skills/aprendizaje-continuo-v2/scripts/detect-project.sh +0 -325
- package/vendor/theus-arsenal/skills/aprendizaje-continuo-v2/scripts/instinct-cli.py +0 -1918
- package/vendor/theus-arsenal/skills/aprendizaje-continuo-v2/scripts/lib/arsenal-dir.sh +0 -23
- package/vendor/theus-arsenal/skills/aprendizaje-continuo-v2/scripts/test_parse_instinct.py +0 -1420
- package/vendor/theus-arsenal/skills/arquitectura-hexagonal/SKILL.md +0 -275
- package/vendor/theus-arsenal/skills/arquitectura-limpia-android/SKILL.md +0 -340
- package/vendor/theus-arsenal/skills/arquitectura-pipelines-recomendacion/SKILL.md +0 -112
- package/vendor/theus-arsenal/skills/atlas-datos-prediccion/SKILL.md +0 -53
- package/vendor/theus-arsenal/skills/auditoria-arquitectura-agentes/SKILL.md +0 -257
- package/vendor/theus-arsenal/skills/auditoria-produccion/SKILL.md +0 -180
- package/vendor/theus-arsenal/skills/auditoria-rutas-clic/SKILL.md +0 -243
- package/vendor/theus-arsenal/skills/autoevaluacion-agente/SKILL.md +0 -180
- package/vendor/theus-arsenal/skills/autoevaluacion-agente/examples/high-score-example.md +0 -89
- package/vendor/theus-arsenal/skills/autoevaluacion-agente/examples/low-score-example.md +0 -87
- package/vendor/theus-arsenal/skills/autoevaluacion-agente/references/evaluation-criteria.md +0 -71
- package/vendor/theus-arsenal/skills/autoevaluacion-agente/references/hook-integration.md +0 -90
- package/vendor/theus-arsenal/skills/autoevaluacion-agente/scripts/evaluate.py +0 -409
- package/vendor/theus-arsenal/skills/autoevaluacion-agente/templates/evaluation-report.md +0 -86
- package/vendor/theus-arsenal/skills/automatizacion-ssh-netmiko/SKILL.md +0 -176
- package/vendor/theus-arsenal/skills/base-datos-pubmed/SKILL.md +0 -174
- package/vendor/theus-arsenal/skills/base-datos-uspto/SKILL.md +0 -173
- package/vendor/theus-arsenal/skills/benchmark/SKILL.md +0 -92
- package/vendor/theus-arsenal/skills/bitacora-crecimiento/SKILL.md +0 -120
- package/vendor/theus-arsenal/skills/bucle-verificacion/SKILL.md +0 -125
- package/vendor/theus-arsenal/skills/buscar-primero/SKILL.md +0 -184
- package/vendor/theus-arsenal/skills/busqueda-exa/SKILL.md +0 -111
- package/vendor/theus-arsenal/skills/cache-por-hash/SKILL.md +0 -160
- package/vendor/theus-arsenal/skills/campana-marketing/SKILL.md +0 -118
- package/vendor/theus-arsenal/skills/capacidad-producto/SKILL.md +0 -138
- package/vendor/theus-arsenal/skills/cazador-vulnerabilidades/SKILL.md +0 -104
- package/vendor/theus-arsenal/skills/compactacion-estrategica/SKILL.md +0 -115
- package/vendor/theus-arsenal/skills/comparador-baskets-prediccion/SKILL.md +0 -69
- package/vendor/theus-arsenal/skills/compras-energia/SKILL.md +0 -206
- package/vendor/theus-arsenal/skills/concurrencia-swift-6-2/SKILL.md +0 -224
- package/vendor/theus-arsenal/skills/consejo/SKILL.md +0 -201
- package/vendor/theus-arsenal/skills/construccion-harness-agentes/SKILL.md +0 -78
- package/vendor/theus-arsenal/skills/constructor-conectores/SKILL.md +0 -119
- package/vendor/theus-arsenal/skills/constructor-equipos/SKILL.md +0 -169
- package/vendor/theus-arsenal/skills/consulta-documentacion/SKILL.md +0 -92
- package/vendor/theus-arsenal/skills/consultas-genomicas-gget/SKILL.md +0 -170
- package/vendor/theus-arsenal/skills/contacto-inversores/SKILL.md +0 -95
- package/vendor/theus-arsenal/skills/corrutinas-flows-kotlin/SKILL.md +0 -284
- package/vendor/theus-arsenal/skills/creacion-video-remotion/SKILL.md +0 -46
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/3d.md +0 -86
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/animations.md +0 -29
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/assets/charts-bar-chart.tsx +0 -173
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/assets/text-animations-typewriter.tsx +0 -100
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/assets/text-animations-word-highlight.tsx +0 -108
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/assets.md +0 -78
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/audio.md +0 -172
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/calculate-metadata.md +0 -104
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/can-decode.md +0 -75
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/charts.md +0 -58
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/compositions.md +0 -146
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/display-captions.md +0 -126
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/extract-frames.md +0 -229
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/fonts.md +0 -152
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/get-audio-duration.md +0 -58
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/get-video-dimensions.md +0 -68
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/get-video-duration.md +0 -58
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/gifs.md +0 -138
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/images.md +0 -130
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/import-srt-captions.md +0 -67
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/lottie.md +0 -67
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/measuring-dom-nodes.md +0 -34
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/measuring-text.md +0 -143
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/sequencing.md +0 -106
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/tailwind.md +0 -11
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/text-animations.md +0 -20
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/timing.md +0 -179
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/transcribe-captions.md +0 -19
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/transitions.md +0 -122
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/trimming.md +0 -52
- package/vendor/theus-arsenal/skills/creacion-video-remotion/rules/videos.md +0 -171
- package/vendor/theus-arsenal/skills/cumplimiento-aduanero/SKILL.md +0 -270
- package/vendor/theus-arsenal/skills/cumplimiento-hipaa/SKILL.md +0 -78
- package/vendor/theus-arsenal/skills/datos-sensibles-salud/SKILL.md +0 -149
- package/vendor/theus-arsenal/skills/decimales-tokens-evm/SKILL.md +0 -128
- package/vendor/theus-arsenal/skills/decisiones-arquitectura/SKILL.md +0 -206
- package/vendor/theus-arsenal/skills/demos-ui/SKILL.md +0 -469
- package/vendor/theus-arsenal/skills/desarrollo-por-intencion/SKILL.md +0 -369
- package/vendor/theus-arsenal/skills/descubrimiento-marca/SKILL.md +0 -149
- package/vendor/theus-arsenal/skills/descubrimiento-marca/references/10_proposito-porque.md +0 -42
- package/vendor/theus-arsenal/skills/descubrimiento-marca/references/20_posicionamiento.md +0 -47
- package/vendor/theus-arsenal/skills/descubrimiento-marca/references/30_audiencia-nicho.md +0 -53
- package/vendor/theus-arsenal/skills/descubrimiento-marca/references/40_personalidad-arquetipo.md +0 -61
- package/vendor/theus-arsenal/skills/descubrimiento-marca/references/50_voz-tono.md +0 -62
- package/vendor/theus-arsenal/skills/descubrimiento-marca/references/60_narrativa-historia.md +0 -54
- package/vendor/theus-arsenal/skills/descubrimiento-marca/references/70_tension-fundador.md +0 -50
- package/vendor/theus-arsenal/skills/descubrimiento-marca/references/90_SINTESIS.md +0 -133
- package/vendor/theus-arsenal/skills/descubrimiento-plugins-laravel/SKILL.md +0 -230
- package/vendor/theus-arsenal/skills/destilado-reglas/SKILL.md +0 -263
- package/vendor/theus-arsenal/skills/destilado-reglas/scripts/scan-rules.sh +0 -58
- package/vendor/theus-arsenal/skills/destilado-reglas/scripts/scan-skills.sh +0 -129
- package/vendor/theus-arsenal/skills/diagnostico-bgp/SKILL.md +0 -170
- package/vendor/theus-arsenal/skills/direccion-estetica/SKILL.md +0 -220
- package/vendor/theus-arsenal/skills/direccion-estetica/references/taxonomia-generos.md +0 -89
- package/vendor/theus-arsenal/skills/diseno-api/SKILL.md +0 -522
- package/vendor/theus-arsenal/skills/diseno-liquid-glass/SKILL.md +0 -282
- package/vendor/theus-arsenal/skills/e2e-escritorio-windows/SKILL.md +0 -879
- package/vendor/theus-arsenal/skills/edicion-video/SKILL.md +0 -289
- package/vendor/theus-arsenal/skills/enfoque-producto/SKILL.md +0 -91
- package/vendor/theus-arsenal/skills/entornos-flox/SKILL.md +0 -493
- package/vendor/theus-arsenal/skills/estandares-codigo/SKILL.md +0 -548
- package/vendor/theus-arsenal/skills/estandares-cpp/SKILL.md +0 -727
- package/vendor/theus-arsenal/skills/estandares-java/SKILL.md +0 -389
- package/vendor/theus-arsenal/skills/estilo-legado/SKILL.md +0 -149
- package/vendor/theus-arsenal/skills/estructura-informes-competencia/SKILL.md +0 -95
- package/vendor/theus-arsenal/skills/evaluacion-academica/SKILL.md +0 -165
- package/vendor/theus-arsenal/skills/explorador-skills/SKILL.md +0 -129
- package/vendor/theus-arsenal/skills/flujo-git/SKILL.md +0 -714
- package/vendor/theus-arsenal/skills/flujo-ingenieria-ml/SKILL.md +0 -343
- package/vendor/theus-arsenal/skills/flujo-tdd/SKILL.md +0 -584
- package/vendor/theus-arsenal/skills/forja-personas/SKILL.md +0 -298
- package/vendor/theus-arsenal/skills/forja-personas/gacha.py +0 -224
- package/vendor/theus-arsenal/skills/forja-personas/gacha.sh +0 -5
- package/vendor/theus-arsenal/skills/forja-personas/references/avatar-style.md +0 -123
- package/vendor/theus-arsenal/skills/forja-personas/references/boundary-rules.md +0 -53
- package/vendor/theus-arsenal/skills/forja-personas/references/error-handling.md +0 -53
- package/vendor/theus-arsenal/skills/forja-personas/references/identity-tension.md +0 -48
- package/vendor/theus-arsenal/skills/forja-personas/references/naming-system.md +0 -39
- package/vendor/theus-arsenal/skills/forja-personas/references/output-template.md +0 -166
- package/vendor/theus-arsenal/skills/fundamentos-animacion/SKILL.md +0 -296
- package/vendor/theus-arsenal/skills/generacion-iconos-ios/SKILL.md +0 -156
- package/vendor/theus-arsenal/skills/generacion-iconos-ios/scripts/generate_icons.swift +0 -258
- package/vendor/theus-arsenal/skills/generacion-iconos-ios/scripts/iconify_gen.sh +0 -235
- package/vendor/theus-arsenal/skills/gestion-excepciones-logisticas/SKILL.md +0 -208
- package/vendor/theus-arsenal/skills/gestion-transportistas/SKILL.md +0 -204
- package/vendor/theus-arsenal/skills/guia-adopcion-ml/SKILL.md +0 -64
- package/vendor/theus-arsenal/skills/harness-agente-autonomo/SKILL.md +0 -252
- package/vendor/theus-arsenal/skills/harness-eval-clinico/SKILL.md +0 -212
- package/vendor/theus-arsenal/skills/harness-evaluacion/SKILL.md +0 -296
- package/vendor/theus-arsenal/skills/harness-generador-evaluador/SKILL.md +0 -254
- package/vendor/theus-arsenal/skills/homelab-diseno-red/SKILL.md +0 -120
- package/vendor/theus-arsenal/skills/homelab-dns-pihole/SKILL.md +0 -264
- package/vendor/theus-arsenal/skills/homelab-preparacion-red/SKILL.md +0 -144
- package/vendor/theus-arsenal/skills/homelab-segmentacion-vlan/SKILL.md +0 -307
- package/vendor/theus-arsenal/skills/homelab-vpn-wireguard/SKILL.md +0 -299
- package/vendor/theus-arsenal/skills/ingenieria-agentica/SKILL.md +0 -96
- package/vendor/theus-arsenal/skills/inspeccion-animaciones-blender/SKILL.md +0 -164
- package/vendor/theus-arsenal/skills/instaladores-python/SKILL.md +0 -820
- package/vendor/theus-arsenal/skills/integracion-jira/SKILL.md +0 -307
- package/vendor/theus-arsenal/skills/inteligencia-leads/SKILL.md +0 -312
- package/vendor/theus-arsenal/skills/inteligencia-leads/agents/agente-enriquecimiento.md +0 -87
- package/vendor/theus-arsenal/skills/inteligencia-leads/agents/mapeador-mutuos.md +0 -76
- package/vendor/theus-arsenal/skills/inteligencia-leads/agents/puntuador-senales.md +0 -60
- package/vendor/theus-arsenal/skills/inteligencia-leads/agents/redactor-outreach.md +0 -102
- package/vendor/theus-arsenal/skills/inteligencia-mercados-prediccion/SKILL.md +0 -53
- package/vendor/theus-arsenal/skills/introspeccion-agente/SKILL.md +0 -150
- package/vendor/theus-arsenal/skills/inventario-skills/SKILL.md +0 -194
- package/vendor/theus-arsenal/skills/inventario-skills/scripts/quick-diff.sh +0 -87
- package/vendor/theus-arsenal/skills/inventario-skills/scripts/save-results.sh +0 -57
- package/vendor/theus-arsenal/skills/inventario-skills/scripts/scan.sh +0 -170
- package/vendor/theus-arsenal/skills/investigacion-mercado/SKILL.md +0 -87
- package/vendor/theus-arsenal/skills/investigacion-oraculos-prediccion/SKILL.md +0 -59
- package/vendor/theus-arsenal/skills/investigacion-profunda/SKILL.md +0 -161
- package/vendor/theus-arsenal/skills/keccak256-nodejs/SKILL.md +0 -100
- package/vendor/theus-arsenal/skills/libro-decisiones-recursivo/SKILL.md +0 -82
- package/vendor/theus-arsenal/skills/lienzo-planes/SKILL.md +0 -111
- package/vendor/theus-arsenal/skills/limpieza-configuracion/SKILL.md +0 -116
- package/vendor/theus-arsenal/skills/logistica-inversa-devoluciones/SKILL.md +0 -241
- package/vendor/theus-arsenal/skills/manejo-errores/SKILL.md +0 -375
- package/vendor/theus-arsenal/skills/materiales-inversores/SKILL.md +0 -101
- package/vendor/theus-arsenal/skills/memoria-por-proyecto/SKILL.md +0 -170
- package/vendor/theus-arsenal/skills/memoria-por-proyecto/commands/forget.mjs +0 -44
- package/vendor/theus-arsenal/skills/memoria-por-proyecto/commands/info.mjs +0 -24
- package/vendor/theus-arsenal/skills/memoria-por-proyecto/commands/init.mjs +0 -152
- package/vendor/theus-arsenal/skills/memoria-por-proyecto/commands/list.mjs +0 -40
- package/vendor/theus-arsenal/skills/memoria-por-proyecto/commands/migrate.mjs +0 -214
- package/vendor/theus-arsenal/skills/memoria-por-proyecto/commands/resume.mjs +0 -36
- package/vendor/theus-arsenal/skills/memoria-por-proyecto/commands/save.mjs +0 -210
- package/vendor/theus-arsenal/skills/memoria-por-proyecto/commands/shared.mjs +0 -402
- package/vendor/theus-arsenal/skills/memoria-por-proyecto/hooks/session-start.mjs +0 -238
- package/vendor/theus-arsenal/skills/metodologia-benchmarks/SKILL.md +0 -131
- package/vendor/theus-arsenal/skills/migraciones-bd/SKILL.md +0 -430
- package/vendor/theus-arsenal/skills/modelos-fundacionales-en-dispositivo/SKILL.md +0 -244
- package/vendor/theus-arsenal/skills/modo-seguro/SKILL.md +0 -86
- package/vendor/theus-arsenal/skills/motion-avanzado/SKILL.md +0 -592
- package/vendor/theus-arsenal/skills/motor-de-contenido/SKILL.md +0 -136
- package/vendor/theus-arsenal/skills/no-conformidades-calidad/SKILL.md +0 -249
- package/vendor/theus-arsenal/skills/onboarding-codigo/SKILL.md +0 -244
- package/vendor/theus-arsenal/skills/operaciones-agentes-empresariales/SKILL.md +0 -51
- package/vendor/theus-arsenal/skills/operaciones-conocimiento/SKILL.md +0 -159
- package/vendor/theus-arsenal/skills/operaciones-correo/SKILL.md +0 -123
- package/vendor/theus-arsenal/skills/operaciones-facturacion/SKILL.md +0 -142
- package/vendor/theus-arsenal/skills/operaciones-flujo-proyectos/SKILL.md +0 -110
- package/vendor/theus-arsenal/skills/operaciones-github/SKILL.md +0 -143
- package/vendor/theus-arsenal/skills/operaciones-google-workspace/SKILL.md +0 -100
- package/vendor/theus-arsenal/skills/operaciones-investigacion/SKILL.md +0 -124
- package/vendor/theus-arsenal/skills/operaciones-mensajes/SKILL.md +0 -103
- package/vendor/theus-arsenal/skills/operaciones-terminal/SKILL.md +0 -110
- package/vendor/theus-arsenal/skills/optimizacion-benchmark/SKILL.md +0 -70
- package/vendor/theus-arsenal/skills/optimizacion-costos-llm/SKILL.md +0 -182
- package/vendor/theus-arsenal/skills/optimizador-conexiones/SKILL.md +0 -191
- package/vendor/theus-arsenal/skills/optimizador-paralelismo/SKILL.md +0 -75
- package/vendor/theus-arsenal/skills/optimizador-prompts/SKILL.md +0 -374
- package/vendor/theus-arsenal/skills/orq-agregar-funcionalidad/SKILL.md +0 -37
- package/vendor/theus-arsenal/skills/orq-cambiar-funcionalidad/SKILL.md +0 -36
- package/vendor/theus-arsenal/skills/orq-construir-mvp/SKILL.md +0 -38
- package/vendor/theus-arsenal/skills/orq-corregir-defecto/SKILL.md +0 -36
- package/vendor/theus-arsenal/skills/orq-pipeline/SKILL.md +0 -134
- package/vendor/theus-arsenal/skills/orq-refinar-codigo/SKILL.md +0 -49
- package/vendor/theus-arsenal/skills/orquestacion-equipos-agentes/SKILL.md +0 -117
- package/vendor/theus-arsenal/skills/pagos-agentes-x402/SKILL.md +0 -237
- package/vendor/theus-arsenal/skills/patrones-angular/SKILL.md +0 -153
- package/vendor/theus-arsenal/skills/patrones-angular/references/angular-animations.md +0 -160
- package/vendor/theus-arsenal/skills/patrones-angular/references/angular-aria.md +0 -410
- package/vendor/theus-arsenal/skills/patrones-angular/references/cli.md +0 -86
- package/vendor/theus-arsenal/skills/patrones-angular/references/component-harnesses.md +0 -59
- package/vendor/theus-arsenal/skills/patrones-angular/references/component-styling.md +0 -91
- package/vendor/theus-arsenal/skills/patrones-angular/references/components.md +0 -117
- package/vendor/theus-arsenal/skills/patrones-angular/references/creating-services.md +0 -97
- package/vendor/theus-arsenal/skills/patrones-angular/references/data-resolvers.md +0 -69
- package/vendor/theus-arsenal/skills/patrones-angular/references/define-routes.md +0 -67
- package/vendor/theus-arsenal/skills/patrones-angular/references/defining-providers.md +0 -72
- package/vendor/theus-arsenal/skills/patrones-angular/references/di-fundamentals.md +0 -120
- package/vendor/theus-arsenal/skills/patrones-angular/references/e2e-testing.md +0 -56
- package/vendor/theus-arsenal/skills/patrones-angular/references/effects.md +0 -83
- package/vendor/theus-arsenal/skills/patrones-angular/references/hierarchical-injectors.md +0 -43
- package/vendor/theus-arsenal/skills/patrones-angular/references/host-elements.md +0 -80
- package/vendor/theus-arsenal/skills/patrones-angular/references/injection-context.md +0 -63
- package/vendor/theus-arsenal/skills/patrones-angular/references/inputs.md +0 -101
- package/vendor/theus-arsenal/skills/patrones-angular/references/linked-signal.md +0 -59
- package/vendor/theus-arsenal/skills/patrones-angular/references/loading-strategies.md +0 -61
- package/vendor/theus-arsenal/skills/patrones-angular/references/mcp.md +0 -67
- package/vendor/theus-arsenal/skills/patrones-angular/references/navigate-to-routes.md +0 -69
- package/vendor/theus-arsenal/skills/patrones-angular/references/outputs.md +0 -86
- package/vendor/theus-arsenal/skills/patrones-angular/references/reactive-forms.md +0 -122
- package/vendor/theus-arsenal/skills/patrones-angular/references/rendering-strategies.md +0 -44
- package/vendor/theus-arsenal/skills/patrones-angular/references/resource.md +0 -77
- package/vendor/theus-arsenal/skills/patrones-angular/references/route-animations.md +0 -56
- package/vendor/theus-arsenal/skills/patrones-angular/references/route-guards.md +0 -52
- package/vendor/theus-arsenal/skills/patrones-angular/references/router-lifecycle.md +0 -45
- package/vendor/theus-arsenal/skills/patrones-angular/references/router-testing.md +0 -87
- package/vendor/theus-arsenal/skills/patrones-angular/references/show-routes-with-outlets.md +0 -68
- package/vendor/theus-arsenal/skills/patrones-angular/references/signal-forms.md +0 -795
- package/vendor/theus-arsenal/skills/patrones-angular/references/signals-overview.md +0 -94
- package/vendor/theus-arsenal/skills/patrones-angular/references/tailwind-css.md +0 -69
- package/vendor/theus-arsenal/skills/patrones-angular/references/template-driven-forms.md +0 -114
- package/vendor/theus-arsenal/skills/patrones-angular/references/testing-fundamentals.md +0 -65
- package/vendor/theus-arsenal/skills/patrones-animacion/SKILL.md +0 -432
- package/vendor/theus-arsenal/skills/patrones-backend/SKILL.md +0 -560
- package/vendor/theus-arsenal/skills/patrones-cdss-clinico/SKILL.md +0 -249
- package/vendor/theus-arsenal/skills/patrones-cisco-ios/SKILL.md +0 -148
- package/vendor/theus-arsenal/skills/patrones-clickhouse/SKILL.md +0 -443
- package/vendor/theus-arsenal/skills/patrones-compose-multiplatform/SKILL.md +0 -298
- package/vendor/theus-arsenal/skills/patrones-dart-flutter/SKILL.md +0 -566
- package/vendor/theus-arsenal/skills/patrones-despliegue/SKILL.md +0 -426
- package/vendor/theus-arsenal/skills/patrones-django/SKILL.md +0 -739
- package/vendor/theus-arsenal/skills/patrones-django-celery/SKILL.md +0 -456
- package/vendor/theus-arsenal/skills/patrones-docker/SKILL.md +0 -363
- package/vendor/theus-arsenal/skills/patrones-dotnet/SKILL.md +0 -321
- package/vendor/theus-arsenal/skills/patrones-emr-clinico/SKILL.md +0 -168
- package/vendor/theus-arsenal/skills/patrones-fastapi/SKILL.md +0 -513
- package/vendor/theus-arsenal/skills/patrones-frontend/SKILL.md +0 -655
- package/vendor/theus-arsenal/skills/patrones-go/SKILL.md +0 -674
- package/vendor/theus-arsenal/skills/patrones-jpa/SKILL.md +0 -156
- package/vendor/theus-arsenal/skills/patrones-kotlin/SKILL.md +0 -717
- package/vendor/theus-arsenal/skills/patrones-kotlin-exposed/SKILL.md +0 -724
- package/vendor/theus-arsenal/skills/patrones-kotlin-ktor/SKILL.md +0 -694
- package/vendor/theus-arsenal/skills/patrones-kubernetes/SKILL.md +0 -754
- package/vendor/theus-arsenal/skills/patrones-laravel/SKILL.md +0 -414
- package/vendor/theus-arsenal/skills/patrones-mcp/SKILL.md +0 -66
- package/vendor/theus-arsenal/skills/patrones-mysql/SKILL.md +0 -420
- package/vendor/theus-arsenal/skills/patrones-nestjs/SKILL.md +0 -229
- package/vendor/theus-arsenal/skills/patrones-nextjs/SKILL.md +0 -56
- package/vendor/theus-arsenal/skills/patrones-nuxt4/SKILL.md +0 -99
- package/vendor/theus-arsenal/skills/patrones-perl/SKILL.md +0 -508
- package/vendor/theus-arsenal/skills/patrones-postgres/SKILL.md +0 -141
- package/vendor/theus-arsenal/skills/patrones-prisma/SKILL.md +0 -399
- package/vendor/theus-arsenal/skills/patrones-python/SKILL.md +0 -750
- package/vendor/theus-arsenal/skills/patrones-pytorch/SKILL.md +0 -400
- package/vendor/theus-arsenal/skills/patrones-quarkus/SKILL.md +0 -729
- package/vendor/theus-arsenal/skills/patrones-react/SKILL.md +0 -339
- package/vendor/theus-arsenal/skills/patrones-react-native/SKILL.md +0 -325
- package/vendor/theus-arsenal/skills/patrones-redis/SKILL.md +0 -401
- package/vendor/theus-arsenal/skills/patrones-rust/SKILL.md +0 -504
- package/vendor/theus-arsenal/skills/patrones-springboot/SKILL.md +0 -314
- package/vendor/theus-arsenal/skills/patrones-swiftui/SKILL.md +0 -261
- package/vendor/theus-arsenal/skills/patrones-tinystruct/SKILL.md +0 -281
- package/vendor/theus-arsenal/skills/patrones-tinystruct/references/architecture.md +0 -90
- package/vendor/theus-arsenal/skills/patrones-tinystruct/references/data-handling.md +0 -60
- package/vendor/theus-arsenal/skills/patrones-tinystruct/references/database.md +0 -99
- package/vendor/theus-arsenal/skills/patrones-tinystruct/references/routing.md +0 -64
- package/vendor/theus-arsenal/skills/patrones-tinystruct/references/system-usage.md +0 -97
- package/vendor/theus-arsenal/skills/patrones-tinystruct/references/testing.md +0 -72
- package/vendor/theus-arsenal/skills/patrones-vite/SKILL.md +0 -449
- package/vendor/theus-arsenal/skills/patrones-vue/SKILL.md +0 -469
- package/vendor/theus-arsenal/skills/persistencia-actores-swift/SKILL.md +0 -148
- package/vendor/theus-arsenal/skills/pipeline-opensource/SKILL.md +0 -254
- package/vendor/theus-arsenal/skills/planificacion-demanda-inventario/SKILL.md +0 -236
- package/vendor/theus-arsenal/skills/planificador-trades-prediccion/SKILL.md +0 -60
- package/vendor/theus-arsenal/skills/plano-tecnico/SKILL.md +0 -102
- package/vendor/theus-arsenal/skills/presentaciones-html/SKILL.md +0 -189
- package/vendor/theus-arsenal/skills/presentaciones-html/STYLE_PRESETS.md +0 -330
- package/vendor/theus-arsenal/skills/presentaciones-html/animation-patterns.md +0 -122
- package/vendor/theus-arsenal/skills/presentaciones-html/html-template.md +0 -419
- package/vendor/theus-arsenal/skills/presentaciones-html/scripts/export-pdf.sh +0 -418
- package/vendor/theus-arsenal/skills/presentaciones-html/scripts/extract-pptx.py +0 -96
- package/vendor/theus-arsenal/skills/presentaciones-html/viewport-base.css +0 -153
- package/vendor/theus-arsenal/skills/presupuesto-contexto/SKILL.md +0 -263
- package/vendor/theus-arsenal/skills/procesamiento-documentos-nutrient/SKILL.md +0 -168
- package/vendor/theus-arsenal/skills/programacion-produccion/SKILL.md +0 -220
- package/vendor/theus-arsenal/skills/publicacion-cruzada/SKILL.md +0 -117
- package/vendor/theus-arsenal/skills/publicador-social/SKILL.md +0 -121
- package/vendor/theus-arsenal/skills/puerta-de-entrega/SKILL.md +0 -164
- package/vendor/theus-arsenal/skills/puerta-de-entrega/hooks/puerta-entrega.py +0 -242
- package/vendor/theus-arsenal/skills/pulir-interfaces/SKILL.md +0 -126
- package/vendor/theus-arsenal/skills/qa-navegador/SKILL.md +0 -103
- package/vendor/theus-arsenal/skills/ranking-grafo-social/SKILL.md +0 -153
- package/vendor/theus-arsenal/skills/recuperacion-iterativa/SKILL.md +0 -236
- package/vendor/theus-arsenal/skills/redaccion-articulos/SKILL.md +0 -81
- package/vendor/theus-arsenal/skills/regex-vs-llm/SKILL.md +0 -221
- package/vendor/theus-arsenal/skills/regresion-codigo-ia/SKILL.md +0 -388
- package/vendor/theus-arsenal/skills/rendimiento-react/SKILL.md +0 -567
- package/vendor/theus-arsenal/skills/revision-codigo-flutter-dart/SKILL.md +0 -442
- package/vendor/theus-arsenal/skills/revision-literatura-cientifica/SKILL.md +0 -191
- package/vendor/theus-arsenal/skills/revision-multiperspectiva/SKILL.md +0 -302
- package/vendor/theus-arsenal/skills/revision-riesgo-prediccion/SKILL.md +0 -56
- package/vendor/theus-arsenal/skills/revision-seguridad/SKILL.md +0 -505
- package/vendor/theus-arsenal/skills/revision-seguridad/cloud-infrastructure-security.md +0 -361
- package/vendor/theus-arsenal/skills/runtime-bun/SKILL.md +0 -83
- package/vendor/theus-arsenal/skills/salud-codigo-codescene/SKILL.md +0 -163
- package/vendor/theus-arsenal/skills/salud-interfaces-red/SKILL.md +0 -143
- package/vendor/theus-arsenal/skills/seguimiento-costos/SKILL.md +0 -122
- package/vendor/theus-arsenal/skills/seguridad-agentes-trading/SKILL.md +0 -145
- package/vendor/theus-arsenal/skills/seguridad-amm-defi/SKILL.md +0 -166
- package/vendor/theus-arsenal/skills/seguridad-django/SKILL.md +0 -648
- package/vendor/theus-arsenal/skills/seguridad-laravel/SKILL.md +0 -945
- package/vendor/theus-arsenal/skills/seguridad-perl/SKILL.md +0 -507
- package/vendor/theus-arsenal/skills/seguridad-quarkus/SKILL.md +0 -474
- package/vendor/theus-arsenal/skills/seguridad-springboot/SKILL.md +0 -279
- package/vendor/theus-arsenal/skills/seo/SKILL.md +0 -166
- package/vendor/theus-arsenal/skills/sistema-diseno/SKILL.md +0 -81
- package/vendor/theus-arsenal/skills/sistema-operativo-agentico/SKILL.md +0 -375
- package/vendor/theus-arsenal/skills/sistemas-latencia-critica/SKILL.md +0 -65
- package/vendor/theus-arsenal/skills/tdd-django/SKILL.md +0 -735
- package/vendor/theus-arsenal/skills/tdd-laravel/SKILL.md +0 -673
- package/vendor/theus-arsenal/skills/tdd-quarkus/SKILL.md +0 -817
- package/vendor/theus-arsenal/skills/tdd-springboot/SKILL.md +0 -165
- package/vendor/theus-arsenal/skills/testing-cpp/SKILL.md +0 -328
- package/vendor/theus-arsenal/skills/testing-csharp/SKILL.md +0 -321
- package/vendor/theus-arsenal/skills/testing-e2e/SKILL.md +0 -325
- package/vendor/theus-arsenal/skills/testing-go/SKILL.md +0 -719
- package/vendor/theus-arsenal/skills/testing-kotlin/SKILL.md +0 -829
- package/vendor/theus-arsenal/skills/testing-perl/SKILL.md +0 -479
- package/vendor/theus-arsenal/skills/testing-protocolos-di-swift/SKILL.md +0 -196
- package/vendor/theus-arsenal/skills/testing-python/SKILL.md +0 -815
- package/vendor/theus-arsenal/skills/testing-react/SKILL.md +0 -421
- package/vendor/theus-arsenal/skills/testing-rust/SKILL.md +0 -506
- package/vendor/theus-arsenal/skills/tours-de-codigo/SKILL.md +0 -252
- package/vendor/theus-arsenal/skills/traduccion-documentos-visado/SKILL.md +0 -121
- package/vendor/theus-arsenal/skills/ui-a-vue/SKILL.md +0 -141
- package/vendor/theus-arsenal/skills/validacion-config-red/SKILL.md +0 -211
- package/vendor/theus-arsenal/skills/verificacion-django/SKILL.md +0 -470
- package/vendor/theus-arsenal/skills/verificacion-factual/SKILL.md +0 -142
- package/vendor/theus-arsenal/skills/verificacion-laravel/SKILL.md +0 -184
- package/vendor/theus-arsenal/skills/verificacion-quarkus/SKILL.md +0 -485
- package/vendor/theus-arsenal/skills/verificacion-springboot/SKILL.md +0 -237
- package/vendor/theus-arsenal/skills/videodb/SKILL.md +0 -374
- package/vendor/theus-arsenal/skills/videodb/reference/api-reference.md +0 -550
- package/vendor/theus-arsenal/skills/videodb/reference/capture-reference.md +0 -407
- package/vendor/theus-arsenal/skills/videodb/reference/capture.md +0 -101
- package/vendor/theus-arsenal/skills/videodb/reference/editor.md +0 -443
- package/vendor/theus-arsenal/skills/videodb/reference/generative.md +0 -331
- package/vendor/theus-arsenal/skills/videodb/reference/rtstream-reference.md +0 -564
- package/vendor/theus-arsenal/skills/videodb/reference/rtstream.md +0 -65
- package/vendor/theus-arsenal/skills/videodb/reference/search.md +0 -230
- package/vendor/theus-arsenal/skills/videodb/reference/streaming.md +0 -406
- package/vendor/theus-arsenal/skills/videodb/reference/use-cases.md +0 -118
- package/vendor/theus-arsenal/skills/videodb/scripts/ws_listener.py +0 -279
- package/vendor/theus-arsenal/skills/videos-manim/SKILL.md +0 -91
- package/vendor/theus-arsenal/skills/videos-manim/assets/network_graph_scene.py +0 -52
- package/vendor/theus-arsenal/skills/vigilancia-canary/SKILL.md +0 -108
- package/vendor/theus-arsenal/skills/voz-de-marca/SKILL.md +0 -106
|
@@ -1,658 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Funciones utilitarias multiplataforma para hooks y scripts de Theus
|
|
3
|
-
* Funciona en Windows, macOS y Linux
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
const fs = require('fs');
|
|
7
|
-
const path = require('path');
|
|
8
|
-
const os = require('os');
|
|
9
|
-
const crypto = require('crypto');
|
|
10
|
-
const { execSync, spawnSync } = require('child_process');
|
|
11
|
-
|
|
12
|
-
// Detección de plataforma
|
|
13
|
-
const isWindows = process.platform === 'win32';
|
|
14
|
-
const isMacOS = process.platform === 'darwin';
|
|
15
|
-
const isLinux = process.platform === 'linux';
|
|
16
|
-
const SESSION_DATA_DIR_NAME = 'session-data';
|
|
17
|
-
const LEGACY_SESSIONS_DIR_NAME = 'sessions';
|
|
18
|
-
const {
|
|
19
|
-
resolveAgentDataHome,
|
|
20
|
-
} = require('./agent-data-home');
|
|
21
|
-
const WINDOWS_RESERVED_SESSION_IDS = new Set([
|
|
22
|
-
'CON', 'PRN', 'AUX', 'NUL',
|
|
23
|
-
'COM1', 'COM2', 'COM3', 'COM4', 'COM5', 'COM6', 'COM7', 'COM8', 'COM9',
|
|
24
|
-
'LPT1', 'LPT2', 'LPT3', 'LPT4', 'LPT5', 'LPT6', 'LPT7', 'LPT8', 'LPT9'
|
|
25
|
-
]);
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Obtiene el directorio home del usuario (multiplataforma)
|
|
29
|
-
*/
|
|
30
|
-
function getHomeDir() {
|
|
31
|
-
const explicitHome = process.env.HOME || process.env.USERPROFILE;
|
|
32
|
-
if (explicitHome && explicitHome.trim().length > 0) {
|
|
33
|
-
return path.resolve(explicitHome);
|
|
34
|
-
}
|
|
35
|
-
return os.homedir();
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Raíz de datos del agente Theus para persistencia de memoria
|
|
40
|
-
* (ver scripts/lib/agent-data-home.js).
|
|
41
|
-
*/
|
|
42
|
-
function getAgentDataHome() {
|
|
43
|
-
return resolveAgentDataHome();
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Obtiene el directorio de configuración de Theus
|
|
48
|
-
* (alias de getAgentDataHome por compatibilidad).
|
|
49
|
-
*/
|
|
50
|
-
function getTheusDir() {
|
|
51
|
-
return getAgentDataHome();
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Obtiene el directorio de sesiones
|
|
57
|
-
*/
|
|
58
|
-
function getSessionsDir() {
|
|
59
|
-
return path.join(getTheusDir(), SESSION_DATA_DIR_NAME);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Obtiene el directorio de sesiones heredado (formato antiguo)
|
|
64
|
-
*/
|
|
65
|
-
function getLegacySessionsDir() {
|
|
66
|
-
return path.join(getTheusDir(), LEGACY_SESSIONS_DIR_NAME);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Obtiene todos los directorios de sesiones a explorar, el canónico primero
|
|
71
|
-
*/
|
|
72
|
-
function getSessionSearchDirs() {
|
|
73
|
-
return Array.from(new Set([getSessionsDir(), getLegacySessionsDir()]));
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Obtiene el directorio de skills aprendidas
|
|
78
|
-
*/
|
|
79
|
-
function getLearnedSkillsDir() {
|
|
80
|
-
return path.join(getTheusDir(), 'skills', 'learned');
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Obtiene el directorio temporal (multiplataforma)
|
|
85
|
-
*/
|
|
86
|
-
function getTempDir() {
|
|
87
|
-
return os.tmpdir();
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Garantiza que un directorio exista (lo crea si no)
|
|
92
|
-
* @param {string} dirPath - Ruta del directorio a crear
|
|
93
|
-
* @returns {string} La ruta del directorio
|
|
94
|
-
* @throws {Error} Si el directorio no puede crearse (p. ej., permiso denegado)
|
|
95
|
-
*/
|
|
96
|
-
function ensureDir(dirPath) {
|
|
97
|
-
try {
|
|
98
|
-
if (!fs.existsSync(dirPath)) {
|
|
99
|
-
fs.mkdirSync(dirPath, { recursive: true });
|
|
100
|
-
}
|
|
101
|
-
} catch (err) {
|
|
102
|
-
// EEXIST es aceptable (condición de carrera con otro proceso creándolo)
|
|
103
|
-
if (err.code !== 'EEXIST') {
|
|
104
|
-
throw new Error(`No se pudo crear el directorio '${dirPath}': ${err.message}`);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
return dirPath;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Obtiene la fecha actual en formato YYYY-MM-DD
|
|
112
|
-
*/
|
|
113
|
-
function getDateString() {
|
|
114
|
-
const now = new Date();
|
|
115
|
-
const year = now.getFullYear();
|
|
116
|
-
const month = String(now.getMonth() + 1).padStart(2, '0');
|
|
117
|
-
const day = String(now.getDate()).padStart(2, '0');
|
|
118
|
-
return `${year}-${month}-${day}`;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Obtiene la hora actual en formato HH:MM
|
|
123
|
-
*/
|
|
124
|
-
function getTimeString() {
|
|
125
|
-
const now = new Date();
|
|
126
|
-
const hours = String(now.getHours()).padStart(2, '0');
|
|
127
|
-
const minutes = String(now.getMinutes()).padStart(2, '0');
|
|
128
|
-
return `${hours}:${minutes}`;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Obtiene el nombre del repositorio git
|
|
133
|
-
*/
|
|
134
|
-
function getGitRepoName() {
|
|
135
|
-
const result = runCommand('git rev-parse --show-toplevel');
|
|
136
|
-
if (!result.success) return null;
|
|
137
|
-
return path.basename(result.output);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Obtiene el nombre del proyecto a partir del repo git o del directorio actual
|
|
142
|
-
*/
|
|
143
|
-
function getProjectName() {
|
|
144
|
-
const repoName = getGitRepoName();
|
|
145
|
-
if (repoName) return repoName;
|
|
146
|
-
return path.basename(process.cwd()) || null;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Sanitiza una cadena para usarla como segmento de nombre de archivo de sesión.
|
|
151
|
-
* Reemplaza los caracteres inválidos por guiones, colapsa repeticiones, elimina
|
|
152
|
-
* guiones al inicio/final y quita los puntos iniciales para que nombres de
|
|
153
|
-
* directorios ocultos como ".theus" se mapeen limpiamente a "theus".
|
|
154
|
-
*
|
|
155
|
-
* Las entradas puramente no ASCII reciben un hash estable de 8 caracteres para
|
|
156
|
-
* que nombres distintos no colapsen al mismo id de sesión de respaldo. Las
|
|
157
|
-
* entradas de escritura mixta conservan su parte ASCII y ganan un sufijo hash
|
|
158
|
-
* corto para desambiguar.
|
|
159
|
-
*/
|
|
160
|
-
function sanitizeSessionId(raw) {
|
|
161
|
-
if (!raw || typeof raw !== 'string') return null;
|
|
162
|
-
|
|
163
|
-
const hasNonAscii = Array.from(raw).some(char => char.codePointAt(0) > 0x7f);
|
|
164
|
-
const normalized = raw.replace(/^\.+/, '');
|
|
165
|
-
const sanitized = normalized
|
|
166
|
-
.replace(/[^a-zA-Z0-9_-]/g, '-')
|
|
167
|
-
.replace(/-{2,}/g, '-')
|
|
168
|
-
.replace(/^-+|-+$/g, '');
|
|
169
|
-
|
|
170
|
-
if (sanitized.length > 0) {
|
|
171
|
-
const suffix = crypto.createHash('sha256').update(normalized).digest('hex').slice(0, 6);
|
|
172
|
-
if (WINDOWS_RESERVED_SESSION_IDS.has(sanitized.toUpperCase())) {
|
|
173
|
-
return `${sanitized}-${suffix}`;
|
|
174
|
-
}
|
|
175
|
-
if (!hasNonAscii) return sanitized;
|
|
176
|
-
return `${sanitized}-${suffix}`;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
const meaningful = normalized.replace(/[\s\p{P}]/gu, '');
|
|
180
|
-
if (meaningful.length === 0) return null;
|
|
181
|
-
|
|
182
|
-
return crypto.createHash('sha256').update(normalized).digest('hex').slice(0, 8);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* Obtiene el id corto de sesión a partir del `session_id` que el motor Theus
|
|
187
|
-
* entrega a los hooks por stdin (JSON). No existe una variable de entorno con
|
|
188
|
-
* el id de sesión: el hook debe leer el JSON de stdin y pasar aquí el campo
|
|
189
|
-
* `session_id`.
|
|
190
|
-
*
|
|
191
|
-
* Devuelve los últimos 8 caracteres del id; si no hay id, cae al nombre
|
|
192
|
-
* sanitizado del proyecto y luego al valor de respaldo.
|
|
193
|
-
*
|
|
194
|
-
* @param {string} [fallback='default'] - Valor de respaldo final
|
|
195
|
-
* @param {string} [sessionId] - `session_id` leído del JSON de stdin del hook
|
|
196
|
-
*/
|
|
197
|
-
function getSessionIdShort(fallback = 'default', sessionId = '') {
|
|
198
|
-
if (sessionId && typeof sessionId === 'string' && sessionId.length > 0) {
|
|
199
|
-
const sanitized = sanitizeSessionId(sessionId.slice(-8));
|
|
200
|
-
if (sanitized) return sanitized;
|
|
201
|
-
}
|
|
202
|
-
return sanitizeSessionId(getProjectName()) || sanitizeSessionId(fallback) || 'default';
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* Obtiene la fecha y hora actuales en formato YYYY-MM-DD HH:MM:SS
|
|
207
|
-
*/
|
|
208
|
-
function getDateTimeString() {
|
|
209
|
-
const now = new Date();
|
|
210
|
-
const year = now.getFullYear();
|
|
211
|
-
const month = String(now.getMonth() + 1).padStart(2, '0');
|
|
212
|
-
const day = String(now.getDate()).padStart(2, '0');
|
|
213
|
-
const hours = String(now.getHours()).padStart(2, '0');
|
|
214
|
-
const minutes = String(now.getMinutes()).padStart(2, '0');
|
|
215
|
-
const seconds = String(now.getSeconds()).padStart(2, '0');
|
|
216
|
-
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Busca archivos que coincidan con un patrón en un directorio
|
|
221
|
-
* (alternativa multiplataforma a find)
|
|
222
|
-
* @param {string} dir - Directorio donde buscar
|
|
223
|
-
* @param {string} pattern - Patrón de archivo (p. ej., "*.tmp", "*.md")
|
|
224
|
-
* @param {object} options - Opciones { maxAge: días, recursive: boolean }
|
|
225
|
-
*/
|
|
226
|
-
function findFiles(dir, pattern, options = {}) {
|
|
227
|
-
if (!dir || typeof dir !== 'string') return [];
|
|
228
|
-
if (!pattern || typeof pattern !== 'string') return [];
|
|
229
|
-
|
|
230
|
-
const { maxAge = null, recursive = false } = options;
|
|
231
|
-
const results = [];
|
|
232
|
-
|
|
233
|
-
if (!fs.existsSync(dir)) {
|
|
234
|
-
return results;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
// Escapa todos los caracteres especiales de regex y luego convierte los
|
|
238
|
-
// comodines glob. El orden importa: primero escapar especiales, luego
|
|
239
|
-
// convertir * y ? a sus equivalentes regex.
|
|
240
|
-
const regexPattern = pattern
|
|
241
|
-
.replace(/[.+^${}()|[\]\\]/g, '\\$&')
|
|
242
|
-
.replace(/\*/g, '.*')
|
|
243
|
-
.replace(/\?/g, '.');
|
|
244
|
-
const regex = new RegExp(`^${regexPattern}$`);
|
|
245
|
-
|
|
246
|
-
function searchDir(currentDir) {
|
|
247
|
-
try {
|
|
248
|
-
const entries = fs.readdirSync(currentDir, { withFileTypes: true });
|
|
249
|
-
|
|
250
|
-
for (const entry of entries) {
|
|
251
|
-
const fullPath = path.join(currentDir, entry.name);
|
|
252
|
-
|
|
253
|
-
if (entry.isFile() && regex.test(entry.name)) {
|
|
254
|
-
let stats;
|
|
255
|
-
try {
|
|
256
|
-
stats = fs.statSync(fullPath);
|
|
257
|
-
} catch {
|
|
258
|
-
continue; // Archivo borrado entre readdir y stat
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
if (maxAge !== null) {
|
|
262
|
-
const ageInDays = (Date.now() - stats.mtimeMs) / (1000 * 60 * 60 * 24);
|
|
263
|
-
if (ageInDays <= maxAge) {
|
|
264
|
-
results.push({ path: fullPath, mtime: stats.mtimeMs });
|
|
265
|
-
}
|
|
266
|
-
} else {
|
|
267
|
-
results.push({ path: fullPath, mtime: stats.mtimeMs });
|
|
268
|
-
}
|
|
269
|
-
} else if (entry.isDirectory() && recursive) {
|
|
270
|
-
searchDir(fullPath);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
} catch (_err) {
|
|
274
|
-
// Ignorar errores de permisos
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
searchDir(dir);
|
|
279
|
-
|
|
280
|
-
// Ordenar por fecha de modificación (más reciente primero)
|
|
281
|
-
results.sort((a, b) => b.mtime - a.mtime);
|
|
282
|
-
|
|
283
|
-
return results;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* Lee JSON desde stdin (para la entrada de los hooks)
|
|
288
|
-
* @param {object} options - Opciones
|
|
289
|
-
* @param {number} options.timeoutMs - Timeout en milisegundos (por defecto: 5000).
|
|
290
|
-
* Evita que los hooks queden colgados indefinidamente si stdin nunca se cierra.
|
|
291
|
-
* @returns {Promise<object>} Objeto JSON parseado, u objeto vacío si stdin está vacío
|
|
292
|
-
*/
|
|
293
|
-
async function readStdinJson(options = {}) {
|
|
294
|
-
const { timeoutMs = 5000, maxSize = 1024 * 1024 } = options;
|
|
295
|
-
|
|
296
|
-
return new Promise((resolve) => {
|
|
297
|
-
let data = '';
|
|
298
|
-
let settled = false;
|
|
299
|
-
|
|
300
|
-
const timer = setTimeout(() => {
|
|
301
|
-
if (!settled) {
|
|
302
|
-
settled = true;
|
|
303
|
-
// Limpia los listeners de stdin para que el event loop pueda salir
|
|
304
|
-
process.stdin.removeAllListeners('data');
|
|
305
|
-
process.stdin.removeAllListeners('end');
|
|
306
|
-
process.stdin.removeAllListeners('error');
|
|
307
|
-
if (process.stdin.unref) process.stdin.unref();
|
|
308
|
-
// Resuelve con lo acumulado hasta ahora en lugar de quedar colgado
|
|
309
|
-
try {
|
|
310
|
-
resolve(data.trim() ? JSON.parse(data) : {});
|
|
311
|
-
} catch {
|
|
312
|
-
resolve({});
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
}, timeoutMs);
|
|
316
|
-
|
|
317
|
-
process.stdin.setEncoding('utf8');
|
|
318
|
-
process.stdin.on('data', chunk => {
|
|
319
|
-
if (data.length < maxSize) {
|
|
320
|
-
data += chunk;
|
|
321
|
-
}
|
|
322
|
-
});
|
|
323
|
-
|
|
324
|
-
process.stdin.on('end', () => {
|
|
325
|
-
if (settled) return;
|
|
326
|
-
settled = true;
|
|
327
|
-
clearTimeout(timer);
|
|
328
|
-
try {
|
|
329
|
-
resolve(data.trim() ? JSON.parse(data) : {});
|
|
330
|
-
} catch {
|
|
331
|
-
// Consistente con la ruta de timeout: resuelve con objeto vacío
|
|
332
|
-
// para que los hooks no fallen con entrada malformada
|
|
333
|
-
resolve({});
|
|
334
|
-
}
|
|
335
|
-
});
|
|
336
|
-
|
|
337
|
-
process.stdin.on('error', () => {
|
|
338
|
-
if (settled) return;
|
|
339
|
-
settled = true;
|
|
340
|
-
clearTimeout(timer);
|
|
341
|
-
// Resuelve con objeto vacío para que los hooks no fallen ante errores de stdin
|
|
342
|
-
resolve({});
|
|
343
|
-
});
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* Escribe en stderr (visible para el usuario en la terminal de Theus)
|
|
349
|
-
*/
|
|
350
|
-
function log(message) {
|
|
351
|
-
console.error(message);
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
/**
|
|
355
|
-
* Escribe en stdout (se devuelve al agente)
|
|
356
|
-
*/
|
|
357
|
-
function output(data) {
|
|
358
|
-
if (typeof data === 'object') {
|
|
359
|
-
console.log(JSON.stringify(data));
|
|
360
|
-
} else {
|
|
361
|
-
console.log(data);
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* Lee un archivo de texto de forma segura
|
|
367
|
-
*/
|
|
368
|
-
function readFile(filePath) {
|
|
369
|
-
try {
|
|
370
|
-
return fs.readFileSync(filePath, 'utf8');
|
|
371
|
-
} catch {
|
|
372
|
-
return null;
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* Escribe un archivo de texto
|
|
378
|
-
*/
|
|
379
|
-
function writeFile(filePath, content) {
|
|
380
|
-
ensureDir(path.dirname(filePath));
|
|
381
|
-
fs.writeFileSync(filePath, content, 'utf8');
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
/**
|
|
385
|
-
* Agrega contenido al final de un archivo de texto
|
|
386
|
-
*/
|
|
387
|
-
function appendFile(filePath, content) {
|
|
388
|
-
ensureDir(path.dirname(filePath));
|
|
389
|
-
fs.appendFileSync(filePath, content, 'utf8');
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
/**
|
|
393
|
-
* Comprueba si un comando existe en el PATH
|
|
394
|
-
* Usa spawnSync para prevenir inyección de comandos
|
|
395
|
-
*/
|
|
396
|
-
function commandExists(cmd) {
|
|
397
|
-
// Valida el nombre del comando: solo alfanuméricos, guion, guion bajo y punto
|
|
398
|
-
if (!/^[a-zA-Z0-9_.-]+$/.test(cmd)) {
|
|
399
|
-
return false;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
try {
|
|
403
|
-
if (isWindows) {
|
|
404
|
-
// Usa spawnSync para evitar la interpolación de shell
|
|
405
|
-
const result = spawnSync('where', [cmd], { stdio: 'pipe' });
|
|
406
|
-
return result.status === 0;
|
|
407
|
-
} else {
|
|
408
|
-
const result = spawnSync('which', [cmd], { stdio: 'pipe' });
|
|
409
|
-
return result.status === 0;
|
|
410
|
-
}
|
|
411
|
-
} catch {
|
|
412
|
-
return false;
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
/**
|
|
417
|
-
* Ejecuta un comando y devuelve su salida
|
|
418
|
-
*
|
|
419
|
-
* NOTA DE SEGURIDAD: esta función ejecuta comandos de shell. Úsala solo con
|
|
420
|
-
* comandos confiables y fijos en el código. Nunca pases entrada controlada
|
|
421
|
-
* por el usuario directamente. Para entrada del usuario, usa spawnSync con
|
|
422
|
-
* arreglos de argumentos.
|
|
423
|
-
*
|
|
424
|
-
* @param {string} cmd - Comando a ejecutar (debe ser confiable/fijo en el código)
|
|
425
|
-
* @param {object} options - Opciones de execSync
|
|
426
|
-
*/
|
|
427
|
-
function runCommand(cmd, options = {}) {
|
|
428
|
-
// Lista de permitidos: solo prefijos de comando conocidos como seguros
|
|
429
|
-
const allowedPrefixes = ['git ', 'node ', 'npx ', 'which ', 'where '];
|
|
430
|
-
if (!allowedPrefixes.some(prefix => cmd.startsWith(prefix))) {
|
|
431
|
-
return { success: false, output: 'runCommand bloqueado: prefijo de comando no reconocido' };
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
// Rechaza metacaracteres de shell. $() y las comillas invertidas se evalúan
|
|
435
|
-
// dentro de comillas dobles, así que se bloquean $ y ` en cualquier parte
|
|
436
|
-
// de cmd. Los demás operadores (;|&) son literales dentro de comillas, por
|
|
437
|
-
// lo que solo se revisan las porciones sin comillas.
|
|
438
|
-
const unquoted = cmd.replace(/"[^"]*"/g, '').replace(/'[^']*'/g, '');
|
|
439
|
-
if (/[;|&\n]/.test(unquoted) || /[`$]/.test(cmd)) {
|
|
440
|
-
return { success: false, output: 'runCommand bloqueado: metacaracteres de shell no permitidos' };
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
try {
|
|
444
|
-
const result = execSync(cmd, {
|
|
445
|
-
encoding: 'utf8',
|
|
446
|
-
stdio: ['pipe', 'pipe', 'pipe'],
|
|
447
|
-
...options
|
|
448
|
-
});
|
|
449
|
-
return { success: true, output: result.trim() };
|
|
450
|
-
} catch (err) {
|
|
451
|
-
return { success: false, output: err.stderr || err.message };
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
/**
|
|
456
|
-
* Comprueba si el directorio actual es un repositorio git
|
|
457
|
-
*/
|
|
458
|
-
function isGitRepo() {
|
|
459
|
-
return runCommand('git rev-parse --git-dir').success;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
/**
|
|
463
|
-
* Obtiene los archivos modificados según git, opcionalmente filtrados por patrones regex
|
|
464
|
-
* @param {string[]} patterns - Arreglo de patrones regex (como cadenas) para filtrar
|
|
465
|
-
* archivos. Los patrones inválidos se omiten silenciosamente.
|
|
466
|
-
* @returns {string[]} Arreglo de rutas de archivos modificados
|
|
467
|
-
*/
|
|
468
|
-
function getGitModifiedFiles(patterns = []) {
|
|
469
|
-
if (!isGitRepo()) return [];
|
|
470
|
-
|
|
471
|
-
const result = runCommand('git diff --name-only HEAD');
|
|
472
|
-
if (!result.success) return [];
|
|
473
|
-
|
|
474
|
-
let files = result.output.split('\n').filter(Boolean);
|
|
475
|
-
|
|
476
|
-
if (patterns.length > 0) {
|
|
477
|
-
// Precompila los patrones, omitiendo los inválidos
|
|
478
|
-
const compiled = [];
|
|
479
|
-
for (const pattern of patterns) {
|
|
480
|
-
if (typeof pattern !== 'string' || pattern.length === 0) continue;
|
|
481
|
-
try {
|
|
482
|
-
compiled.push(new RegExp(pattern));
|
|
483
|
-
} catch {
|
|
484
|
-
// Omite patrones regex inválidos
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
if (compiled.length > 0) {
|
|
488
|
-
files = files.filter(file => compiled.some(regex => regex.test(file)));
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
return files;
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
/**
|
|
496
|
-
* Reemplaza texto en un archivo (alternativa multiplataforma a sed)
|
|
497
|
-
* @param {string} filePath - Ruta del archivo
|
|
498
|
-
* @param {string|RegExp} search - Patrón a buscar. Los patrones tipo cadena
|
|
499
|
-
* reemplazan SOLO la primera coincidencia; usa un RegExp con la bandera `g`
|
|
500
|
-
* para reemplazo global.
|
|
501
|
-
* @param {string} replace - Cadena de reemplazo
|
|
502
|
-
* @param {object} options - Opciones
|
|
503
|
-
* @param {boolean} options.all - Si es true y search es una cadena, reemplaza
|
|
504
|
-
* TODAS las coincidencias (usa String.replaceAll). Se ignora para RegExp.
|
|
505
|
-
* @returns {boolean} true si el archivo se escribió, false si hubo error
|
|
506
|
-
*/
|
|
507
|
-
function replaceInFile(filePath, search, replace, options = {}) {
|
|
508
|
-
const content = readFile(filePath);
|
|
509
|
-
if (content === null) return false;
|
|
510
|
-
|
|
511
|
-
try {
|
|
512
|
-
let newContent;
|
|
513
|
-
if (options.all && typeof search === 'string') {
|
|
514
|
-
newContent = content.replaceAll(search, replace);
|
|
515
|
-
} else {
|
|
516
|
-
newContent = content.replace(search, replace);
|
|
517
|
-
}
|
|
518
|
-
writeFile(filePath, newContent);
|
|
519
|
-
return true;
|
|
520
|
-
} catch (err) {
|
|
521
|
-
log(`[Utils] replaceInFile falló para ${filePath}: ${err.message}`);
|
|
522
|
-
return false;
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
/**
|
|
527
|
-
* Cuenta las ocurrencias de un patrón en un archivo
|
|
528
|
-
* @param {string} filePath - Ruta del archivo
|
|
529
|
-
* @param {string|RegExp} pattern - Patrón a contar. Las cadenas se tratan como
|
|
530
|
-
* patrones regex globales. Las instancias RegExp se usan tal cual, pero se
|
|
531
|
-
* fuerza la bandera global para garantizar un conteo correcto.
|
|
532
|
-
* @returns {number} Número de coincidencias encontradas
|
|
533
|
-
*/
|
|
534
|
-
function countInFile(filePath, pattern) {
|
|
535
|
-
const content = readFile(filePath);
|
|
536
|
-
if (content === null) return 0;
|
|
537
|
-
|
|
538
|
-
let regex;
|
|
539
|
-
try {
|
|
540
|
-
if (pattern instanceof RegExp) {
|
|
541
|
-
// Siempre crea un RegExp nuevo para evitar estado lastIndex compartido;
|
|
542
|
-
// garantiza la bandera global
|
|
543
|
-
regex = new RegExp(pattern.source, pattern.flags.includes('g') ? pattern.flags : pattern.flags + 'g');
|
|
544
|
-
} else if (typeof pattern === 'string') {
|
|
545
|
-
regex = new RegExp(pattern, 'g');
|
|
546
|
-
} else {
|
|
547
|
-
return 0;
|
|
548
|
-
}
|
|
549
|
-
} catch {
|
|
550
|
-
return 0; // Patrón regex inválido
|
|
551
|
-
}
|
|
552
|
-
const matches = content.match(regex);
|
|
553
|
-
return matches ? matches.length : 0;
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
/**
|
|
557
|
-
* Elimina todas las secuencias de escape ANSI de una cadena.
|
|
558
|
-
*
|
|
559
|
-
* Maneja:
|
|
560
|
-
* - Secuencias CSI: \x1b[ … <letra> (colores, movimiento del cursor, borrado, etc.)
|
|
561
|
-
* - Secuencias OSC: \x1b] … BEL/ST (títulos de ventana, hipervínculos)
|
|
562
|
-
* - Selección de charset: \x1b(B
|
|
563
|
-
* - ESC + una letra: \x1b <letra> (p. ej. \x1bM para índice inverso)
|
|
564
|
-
*
|
|
565
|
-
* @param {string} str - Cadena de entrada que posiblemente contenga códigos ANSI
|
|
566
|
-
* @returns {string} Cadena limpia sin secuencias de escape
|
|
567
|
-
*/
|
|
568
|
-
function stripAnsi(str) {
|
|
569
|
-
if (typeof str !== 'string') return '';
|
|
570
|
-
// eslint-disable-next-line no-control-regex
|
|
571
|
-
return str.replace(/\x1b(?:\[[0-9;?]*[A-Za-z]|\][^\x07\x1b]*(?:\x07|\x1b\\)|\([A-Z]|[A-Z])/g, '');
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
/**
|
|
575
|
-
* Busca un patrón en un archivo y devuelve las líneas coincidentes con su número de línea
|
|
576
|
-
*/
|
|
577
|
-
function grepFile(filePath, pattern) {
|
|
578
|
-
const content = readFile(filePath);
|
|
579
|
-
if (content === null) return [];
|
|
580
|
-
|
|
581
|
-
let regex;
|
|
582
|
-
try {
|
|
583
|
-
if (pattern instanceof RegExp) {
|
|
584
|
-
// Siempre crea un RegExp nuevo sin la bandera 'g' para prevenir problemas
|
|
585
|
-
// de estado con lastIndex al usar .test() en un bucle (la bandera g hace
|
|
586
|
-
// que .test() sea con estado, alternando acierto/fallo en líneas
|
|
587
|
-
// coincidentes consecutivas)
|
|
588
|
-
const flags = pattern.flags.replace('g', '');
|
|
589
|
-
regex = new RegExp(pattern.source, flags);
|
|
590
|
-
} else {
|
|
591
|
-
regex = new RegExp(pattern);
|
|
592
|
-
}
|
|
593
|
-
} catch {
|
|
594
|
-
return []; // Patrón regex inválido
|
|
595
|
-
}
|
|
596
|
-
const lines = content.split('\n');
|
|
597
|
-
const results = [];
|
|
598
|
-
|
|
599
|
-
lines.forEach((line, index) => {
|
|
600
|
-
if (regex.test(line)) {
|
|
601
|
-
results.push({ lineNumber: index + 1, content: line });
|
|
602
|
-
}
|
|
603
|
-
});
|
|
604
|
-
|
|
605
|
-
return results;
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
module.exports = {
|
|
609
|
-
// Información de plataforma
|
|
610
|
-
isWindows,
|
|
611
|
-
isMacOS,
|
|
612
|
-
isLinux,
|
|
613
|
-
|
|
614
|
-
// Directorios
|
|
615
|
-
getHomeDir,
|
|
616
|
-
getAgentDataHome,
|
|
617
|
-
getTheusDir,
|
|
618
|
-
getSessionsDir,
|
|
619
|
-
getLegacySessionsDir,
|
|
620
|
-
getSessionSearchDirs,
|
|
621
|
-
getLearnedSkillsDir,
|
|
622
|
-
getTempDir,
|
|
623
|
-
ensureDir,
|
|
624
|
-
|
|
625
|
-
// Fecha/Hora
|
|
626
|
-
getDateString,
|
|
627
|
-
getTimeString,
|
|
628
|
-
getDateTimeString,
|
|
629
|
-
|
|
630
|
-
// Sesión/Proyecto
|
|
631
|
-
sanitizeSessionId,
|
|
632
|
-
getSessionIdShort,
|
|
633
|
-
getGitRepoName,
|
|
634
|
-
getProjectName,
|
|
635
|
-
|
|
636
|
-
// Operaciones con archivos
|
|
637
|
-
findFiles,
|
|
638
|
-
readFile,
|
|
639
|
-
writeFile,
|
|
640
|
-
appendFile,
|
|
641
|
-
replaceInFile,
|
|
642
|
-
countInFile,
|
|
643
|
-
grepFile,
|
|
644
|
-
|
|
645
|
-
// Sanitización de cadenas
|
|
646
|
-
stripAnsi,
|
|
647
|
-
|
|
648
|
-
// E/S de hooks
|
|
649
|
-
readStdinJson,
|
|
650
|
-
log,
|
|
651
|
-
output,
|
|
652
|
-
|
|
653
|
-
// Sistema
|
|
654
|
-
commandExists,
|
|
655
|
-
runCommand,
|
|
656
|
-
isGitRepo,
|
|
657
|
-
getGitModifiedFiles
|
|
658
|
-
};
|