theus-cli-linux-x64 1.2.1 → 1.3.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 +15 -0
- package/RELEASE.json +6 -6
- package/bin/theus +0 -0
- package/package.json +1 -1
- package/vendor/chrome-extension/README.md +142 -0
- package/vendor/chrome-extension/background.js +540 -0
- package/vendor/chrome-extension/cdp-core.js +400 -0
- package/vendor/chrome-extension/cdp-core.test.ts +321 -0
- package/vendor/chrome-extension/cdp.js +672 -0
- package/vendor/chrome-extension/icons/icon128.png +0 -0
- package/vendor/chrome-extension/icons/icon16.png +0 -0
- package/vendor/chrome-extension/icons/icon32.png +0 -0
- package/vendor/chrome-extension/icons/icon48.png +0 -0
- package/vendor/chrome-extension/manifest.json +36 -0
- package/vendor/chrome-extension/popup.html +78 -0
- package/vendor/chrome-extension/popup.js +47 -0
- package/vendor/chrome-extension/recorder.js +316 -0
- 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
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Zero-LLM statistical & stylometric AI-text detector.
|
|
3
|
+
|
|
4
|
+
Evaluates text for high-frequency AI cadence markers, sentence-length
|
|
5
|
+
burstiness variance, lexical diversity (MATTR), and structural uniformity.
|
|
6
|
+
Stdlib-only, no PyTorch or external model dependencies.
|
|
7
|
+
|
|
8
|
+
Exit codes:
|
|
9
|
+
0 clean (score < threshold)
|
|
10
|
+
1 suspicious / AI stylometric signals detected (score >= threshold)
|
|
11
|
+
2 bad input (missing file, binary data, bad args)
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import argparse
|
|
17
|
+
import math
|
|
18
|
+
import re
|
|
19
|
+
import sys
|
|
20
|
+
from collections import Counter
|
|
21
|
+
from dataclasses import dataclass, field
|
|
22
|
+
from pathlib import Path
|
|
23
|
+
from typing import Any
|
|
24
|
+
|
|
25
|
+
SCRIPTS_DIR = Path(__file__).resolve().parent
|
|
26
|
+
sys.path.insert(0, str(SCRIPTS_DIR))
|
|
27
|
+
|
|
28
|
+
from common import ( # noqa: E402
|
|
29
|
+
classify_finding_confidence,
|
|
30
|
+
emit_json,
|
|
31
|
+
read_text_input,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
DEFAULT_THRESHOLD = 0.65
|
|
35
|
+
MIN_SAMPLE_WORDS = 30
|
|
36
|
+
FULL_WEIGHT_WORDS = 100
|
|
37
|
+
|
|
38
|
+
# High-frequency formulaic transition markers, hedging verbs, and structural
|
|
39
|
+
# boilerplate commonly overrepresented in AI-generated text across frontier LLMs.
|
|
40
|
+
AI_PHRASE_PATTERNS: tuple[tuple[str, str, float], ...] = (
|
|
41
|
+
# (regex_pattern, human_label, weight)
|
|
42
|
+
(r"\bdelve(?:s|d)?\s+into\b", "delve into", 1.2),
|
|
43
|
+
(r"\ba\s+testament\s+to\b", "a testament to", 1.1),
|
|
44
|
+
(r"\brich\s+tapestry(?:\s+of)?\b", "rich tapestry", 1.3),
|
|
45
|
+
(r"\bplays?\s+a\s+(?:pivotal|crucial|vital|key)\s+role\b", "plays a pivotal/crucial role", 1.0),
|
|
46
|
+
(
|
|
47
|
+
r"\bin\s+(?:today'?s|the)\s+(?:(?:fast-paced|ever-evolving|digital|rapidly\s+changing)\s+)*(?:world|landscape|era|environment)\b",
|
|
48
|
+
"in today's fast-paced world/landscape",
|
|
49
|
+
1.4,
|
|
50
|
+
),
|
|
51
|
+
(
|
|
52
|
+
r"\bit\s+is\s+(?:important|essential|crucial|worth\s+noting)\s+to\s+(?:note|remember|consider|highlight)\b",
|
|
53
|
+
"it is important/crucial to note",
|
|
54
|
+
0.9,
|
|
55
|
+
),
|
|
56
|
+
(
|
|
57
|
+
r"\bnot\s+only\b[\w\s,]+\bbut\s+(?:also\s+)?(?:serves\s+to|acts\s+as|highlights)\b",
|
|
58
|
+
"not only ... but also serves to",
|
|
59
|
+
0.8,
|
|
60
|
+
),
|
|
61
|
+
(
|
|
62
|
+
r"\bserve(?:s|d)?\s+as\s+a\s+(?:beacon|reminder|catalyst|cornerstone)\b",
|
|
63
|
+
"serves as a beacon/catalyst/cornerstone",
|
|
64
|
+
1.1,
|
|
65
|
+
),
|
|
66
|
+
(
|
|
67
|
+
r"\bunderscore(?:s|d)?\s+the\s+(?:importance|need|significance)\b",
|
|
68
|
+
"underscores the importance/need",
|
|
69
|
+
0.9,
|
|
70
|
+
),
|
|
71
|
+
(
|
|
72
|
+
r"\bfoster(?:s|ing|ed)?\s+a\s+(?:sense|culture|deeper\s+understanding)\b",
|
|
73
|
+
"fosters a sense/culture",
|
|
74
|
+
0.9,
|
|
75
|
+
),
|
|
76
|
+
(
|
|
77
|
+
r"\bseamlessly\s+(?:integrates?|integrated|blends?|combine[sd]?)\b",
|
|
78
|
+
"seamlessly integrates/blends",
|
|
79
|
+
1.0,
|
|
80
|
+
),
|
|
81
|
+
(
|
|
82
|
+
r"\bnavigat(?:e|ing|es|ed)\s+the\s+(?:complexities|intricacies|nuances)\b",
|
|
83
|
+
"navigating the complexities/nuances",
|
|
84
|
+
1.0,
|
|
85
|
+
),
|
|
86
|
+
(r"\bmultifaceted\s+(?:nature|approach|landscape)\b", "multifaceted nature/approach", 1.0),
|
|
87
|
+
(r"\bharness(?:ing|ed|es)?\s+the\s+power\s+of\b", "harnessing the power of", 1.0),
|
|
88
|
+
(r"\ba\s+myriad\s+of\b", "a myriad of", 0.8),
|
|
89
|
+
(r"\bparadigm\s+shift\b", "paradigm shift", 0.9),
|
|
90
|
+
(r"\bholistic\s+(?:approach|view|perspective)\b", "holistic approach/perspective", 0.9),
|
|
91
|
+
(r"\bin\s+conclusion\b[,\s]", "in conclusion", 0.8),
|
|
92
|
+
(r"\bto\s+summarize\b[,\s]", "to summarize", 0.8),
|
|
93
|
+
(r"\bultimately\b[,\s]", "ultimately,", 0.6),
|
|
94
|
+
(r"\bfurthermore\b[,\s]", "furthermore,", 0.6),
|
|
95
|
+
(r"\bmoreover\b[,\s]", "moreover,", 0.6),
|
|
96
|
+
(r"\bas\s+an\s+ai\b", "as an AI", 1.5),
|
|
97
|
+
(r"\bi\s+hope\s+this\s+helps\b", "I hope this helps", 1.2),
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
RE_SENTENCE_SPLIT = re.compile(r"(?<=[.!?])\s+(?=[A-Z0-9\"'(\[])")
|
|
101
|
+
RE_WORDS = re.compile(r"\b[\w'-]+\b", re.UNICODE)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
@dataclass
|
|
105
|
+
class MarkerMatch:
|
|
106
|
+
phrase: str
|
|
107
|
+
count: int
|
|
108
|
+
weight: float
|
|
109
|
+
samples: list[str] = field(default_factory=list)
|
|
110
|
+
|
|
111
|
+
def to_dict(self) -> dict[str, Any]:
|
|
112
|
+
return {
|
|
113
|
+
"phrase": self.phrase,
|
|
114
|
+
"count": self.count,
|
|
115
|
+
"weight": self.weight,
|
|
116
|
+
"samples": self.samples,
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
@dataclass
|
|
121
|
+
class StylometryReport:
|
|
122
|
+
path: str
|
|
123
|
+
word_count: int
|
|
124
|
+
sentence_count: int
|
|
125
|
+
burstiness_cv: float | None
|
|
126
|
+
lexical_diversity: float
|
|
127
|
+
ai_ngram_density: float
|
|
128
|
+
matched_markers: list[dict[str, Any]]
|
|
129
|
+
score: float
|
|
130
|
+
confidence_level: str # CLEAN | LOW | MEDIUM | HIGH
|
|
131
|
+
status: str # ok | insufficient_length
|
|
132
|
+
findings: list[str] = field(default_factory=list)
|
|
133
|
+
notes: list[str] = field(default_factory=list)
|
|
134
|
+
|
|
135
|
+
def to_dict(self) -> dict[str, Any]:
|
|
136
|
+
return {
|
|
137
|
+
"path": self.path,
|
|
138
|
+
"word_count": self.word_count,
|
|
139
|
+
"sentence_count": self.sentence_count,
|
|
140
|
+
"burstiness_cv": round(self.burstiness_cv, 4)
|
|
141
|
+
if self.burstiness_cv is not None
|
|
142
|
+
else None,
|
|
143
|
+
"lexical_diversity": round(self.lexical_diversity, 4),
|
|
144
|
+
"ai_ngram_density": round(self.ai_ngram_density, 4),
|
|
145
|
+
"matched_markers": self.matched_markers,
|
|
146
|
+
"score": round(self.score, 4),
|
|
147
|
+
"confidence_level": self.confidence_level,
|
|
148
|
+
"status": self.status,
|
|
149
|
+
"findings": self.findings,
|
|
150
|
+
"findings_confidence": [classify_finding_confidence(f) for f in self.findings],
|
|
151
|
+
"notes": self.notes,
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
def extract_sentences(text: str) -> list[str]:
|
|
156
|
+
"""Split text into sentences while ignoring blank lines and code block markers."""
|
|
157
|
+
clean_lines = []
|
|
158
|
+
in_code_block = False
|
|
159
|
+
for line in text.splitlines():
|
|
160
|
+
trimmed = line.strip()
|
|
161
|
+
if trimmed.startswith("```"):
|
|
162
|
+
in_code_block = not in_code_block
|
|
163
|
+
continue
|
|
164
|
+
if in_code_block or not trimmed:
|
|
165
|
+
continue
|
|
166
|
+
clean_lines.append(trimmed)
|
|
167
|
+
|
|
168
|
+
raw_text = "\n".join(clean_lines)
|
|
169
|
+
if not raw_text.strip():
|
|
170
|
+
return []
|
|
171
|
+
|
|
172
|
+
chunks = re.split(r"(?<=[.!?])\s+|\n+", raw_text)
|
|
173
|
+
sentences = [s.strip() for s in chunks if s.strip()]
|
|
174
|
+
return sentences
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
def extract_words(text: str) -> list[str]:
|
|
178
|
+
"""Extract normalized alphanumeric word tokens."""
|
|
179
|
+
return [w.lower() for w in RE_WORDS.findall(text)]
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
def compute_burstiness(sentences: list[str]) -> tuple[float, float, float | None]:
|
|
183
|
+
"""Compute mean sentence word length, standard deviation, and coefficient of variation (CV).
|
|
184
|
+
|
|
185
|
+
CV is ``None`` when it cannot be measured (no sentences, or fewer than two
|
|
186
|
+
with words): a one-or-zero-sample CV is undefined, and reporting it as 0.0
|
|
187
|
+
made the caller's tiering read "perfectly uniform" — the strongest
|
|
188
|
+
LLM-likeness signal — for text whose body yielded no sentences at all (#132).
|
|
189
|
+
"""
|
|
190
|
+
if not sentences:
|
|
191
|
+
return 0.0, 0.0, None
|
|
192
|
+
|
|
193
|
+
lengths = [len(extract_words(s)) for s in sentences]
|
|
194
|
+
lengths = [L for L in lengths if L > 0]
|
|
195
|
+
if len(lengths) < 2:
|
|
196
|
+
mean_len = float(lengths[0]) if lengths else 0.0
|
|
197
|
+
return mean_len, 0.0, None
|
|
198
|
+
|
|
199
|
+
mean_len = sum(lengths) / len(lengths)
|
|
200
|
+
variance = sum((x - mean_len) ** 2 for x in lengths) / (len(lengths) - 1)
|
|
201
|
+
std_dev = math.sqrt(variance)
|
|
202
|
+
cv = (std_dev / mean_len) if mean_len > 0 else 0.0
|
|
203
|
+
return mean_len, std_dev, cv
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
def compute_mattr(words: list[str], window_size: int = 50) -> float:
|
|
207
|
+
"""Compute Moving-Average Type-Token Ratio (MATTR) across sliding windows."""
|
|
208
|
+
n = len(words)
|
|
209
|
+
if n == 0:
|
|
210
|
+
return 0.0
|
|
211
|
+
if n <= window_size:
|
|
212
|
+
return len(set(words)) / n
|
|
213
|
+
|
|
214
|
+
total_ttr = 0.0
|
|
215
|
+
num_windows = n - window_size + 1
|
|
216
|
+
# Sliding window counts
|
|
217
|
+
current_window = Counter(words[:window_size])
|
|
218
|
+
total_ttr += len(current_window) / window_size
|
|
219
|
+
|
|
220
|
+
for i in range(1, num_windows):
|
|
221
|
+
leaving_word = words[i - 1]
|
|
222
|
+
entering_word = words[i + window_size - 1]
|
|
223
|
+
|
|
224
|
+
current_window[leaving_word] -= 1
|
|
225
|
+
if current_window[leaving_word] == 0:
|
|
226
|
+
del current_window[leaving_word]
|
|
227
|
+
|
|
228
|
+
current_window[entering_word] += 1
|
|
229
|
+
total_ttr += len(current_window) / window_size
|
|
230
|
+
|
|
231
|
+
return total_ttr / num_windows
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
def scan_ai_phrases(text: str) -> list[MarkerMatch]:
|
|
235
|
+
"""Find and tally high-frequency AI cadence phrases."""
|
|
236
|
+
matches: list[MarkerMatch] = []
|
|
237
|
+
for pattern, label, weight in AI_PHRASE_PATTERNS:
|
|
238
|
+
found_spans = []
|
|
239
|
+
for m in re.finditer(pattern, text, re.IGNORECASE):
|
|
240
|
+
found_spans.append(m.group(0))
|
|
241
|
+
if found_spans:
|
|
242
|
+
matches.append(
|
|
243
|
+
MarkerMatch(
|
|
244
|
+
phrase=label,
|
|
245
|
+
count=len(found_spans),
|
|
246
|
+
weight=weight,
|
|
247
|
+
samples=found_spans[:3],
|
|
248
|
+
)
|
|
249
|
+
)
|
|
250
|
+
return matches
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
def score_text_stylometry(text: str, path: str = "<text>") -> StylometryReport:
|
|
254
|
+
"""Run full multi-dimensional stylometric analysis and return a structured report."""
|
|
255
|
+
words = extract_words(text)
|
|
256
|
+
word_count = len(words)
|
|
257
|
+
sentences = extract_sentences(text)
|
|
258
|
+
sentence_count = len(sentences)
|
|
259
|
+
|
|
260
|
+
findings: list[str] = []
|
|
261
|
+
notes: list[str] = []
|
|
262
|
+
|
|
263
|
+
# 1. Length Guard
|
|
264
|
+
if word_count < MIN_SAMPLE_WORDS:
|
|
265
|
+
marker_matches = scan_ai_phrases(text)
|
|
266
|
+
for m in marker_matches:
|
|
267
|
+
findings.append(f"AI phrase marker '{m.phrase}' found ({m.count}x)")
|
|
268
|
+
notes.append(
|
|
269
|
+
f"Sample contains {word_count} words; statistical stylometry is uncalibrated below {MIN_SAMPLE_WORDS} words"
|
|
270
|
+
)
|
|
271
|
+
return StylometryReport(
|
|
272
|
+
path=path,
|
|
273
|
+
word_count=word_count,
|
|
274
|
+
sentence_count=sentence_count,
|
|
275
|
+
burstiness_cv=None,
|
|
276
|
+
lexical_diversity=compute_mattr(words),
|
|
277
|
+
ai_ngram_density=0.0,
|
|
278
|
+
matched_markers=[m.to_dict() for m in marker_matches],
|
|
279
|
+
score=0.0,
|
|
280
|
+
confidence_level="CLEAN",
|
|
281
|
+
status="insufficient_length",
|
|
282
|
+
findings=findings,
|
|
283
|
+
notes=notes,
|
|
284
|
+
)
|
|
285
|
+
|
|
286
|
+
# 2. Metric Calculations
|
|
287
|
+
_, _, cv = compute_burstiness(sentences)
|
|
288
|
+
mattr = compute_mattr(words)
|
|
289
|
+
marker_matches = scan_ai_phrases(text)
|
|
290
|
+
|
|
291
|
+
# N-gram density: weighted marker instances per 100 words
|
|
292
|
+
total_marker_weight = sum(m.count * m.weight for m in marker_matches)
|
|
293
|
+
ngram_density = (total_marker_weight / (word_count / 100.0)) if word_count > 0 else 0.0
|
|
294
|
+
|
|
295
|
+
# 3. Component Sub-scores (0.0 to 1.0)
|
|
296
|
+
# Burstiness subscore: low CV (<0.35) is strongly characteristic of LLMs; high CV (>0.60) is human
|
|
297
|
+
burstiness_score: float | None
|
|
298
|
+
if cv is None:
|
|
299
|
+
# Fewer than two parseable sentences: burstiness is unmeasurable, not
|
|
300
|
+
# maximally LLM-like. The composite renormalizes over the remaining
|
|
301
|
+
# components instead of crediting the strongest signal (#132).
|
|
302
|
+
burstiness_score = None
|
|
303
|
+
elif cv < 0.25:
|
|
304
|
+
burstiness_score = 0.95
|
|
305
|
+
elif cv < 0.35:
|
|
306
|
+
burstiness_score = 0.80
|
|
307
|
+
elif cv < 0.45:
|
|
308
|
+
burstiness_score = 0.50
|
|
309
|
+
elif cv < 0.55:
|
|
310
|
+
burstiness_score = 0.25
|
|
311
|
+
else:
|
|
312
|
+
burstiness_score = 0.05
|
|
313
|
+
|
|
314
|
+
# N-gram subscore: >1.5 weighted matches per 100 words is very high
|
|
315
|
+
if ngram_density >= 2.0:
|
|
316
|
+
ngram_score = 1.0
|
|
317
|
+
elif ngram_density >= 1.0:
|
|
318
|
+
ngram_score = 0.75
|
|
319
|
+
elif ngram_density >= 0.5:
|
|
320
|
+
ngram_score = 0.45
|
|
321
|
+
elif ngram_density > 0:
|
|
322
|
+
ngram_score = 0.20
|
|
323
|
+
else:
|
|
324
|
+
ngram_score = 0.0
|
|
325
|
+
|
|
326
|
+
# Lexical uniformity subscore: LLMs cluster tightly around MATTR 0.65-0.78 for 50-word windows
|
|
327
|
+
diversity_score = 0.4 if 0.68 <= mattr <= 0.76 else 0.1
|
|
328
|
+
|
|
329
|
+
# 4. Composite Scoring & Small-Sample Dampening
|
|
330
|
+
if burstiness_score is None:
|
|
331
|
+
notes.append(
|
|
332
|
+
"Sentence burstiness unavailable (fewer than 2 parsed sentences — e.g. body wrapped in a code fence); composite renormalized over AI-phrase density and lexical diversity"
|
|
333
|
+
)
|
|
334
|
+
raw_composite = ((ngram_score * 0.45) + (diversity_score * 0.10)) / 0.55
|
|
335
|
+
else:
|
|
336
|
+
raw_composite = (burstiness_score * 0.45) + (ngram_score * 0.45) + (diversity_score * 0.10)
|
|
337
|
+
|
|
338
|
+
# Dampening factor: scales smoothly from 0.4 at MIN_SAMPLE_WORDS up to 1.0 at FULL_WEIGHT_WORDS
|
|
339
|
+
if word_count < FULL_WEIGHT_WORDS:
|
|
340
|
+
dampener = 0.4 + 0.6 * (
|
|
341
|
+
(word_count - MIN_SAMPLE_WORDS) / (FULL_WEIGHT_WORDS - MIN_SAMPLE_WORDS)
|
|
342
|
+
)
|
|
343
|
+
notes.append(
|
|
344
|
+
f"Sample word count ({word_count}) is in calibration range ({MIN_SAMPLE_WORDS}-{FULL_WEIGHT_WORDS}); score dampened by factor {dampener:.2f}"
|
|
345
|
+
)
|
|
346
|
+
else:
|
|
347
|
+
dampener = 1.0
|
|
348
|
+
|
|
349
|
+
final_score = min(1.0, max(0.0, raw_composite * dampener))
|
|
350
|
+
|
|
351
|
+
# 5. Classify Findings & Confidence Tiers
|
|
352
|
+
if marker_matches:
|
|
353
|
+
for m in marker_matches:
|
|
354
|
+
findings.append(f"AI cadence phrase '{m.phrase}' ({m.count}x)")
|
|
355
|
+
|
|
356
|
+
if cv is not None and cv < 0.35 and sentence_count >= 3:
|
|
357
|
+
findings.append(f"Unnaturally uniform sentence cadence (CV={cv:.2f} < 0.35)")
|
|
358
|
+
|
|
359
|
+
if ngram_density >= 1.0:
|
|
360
|
+
findings.append(f"Elevated AI formulaic transition density ({ngram_density:.2f}/100w)")
|
|
361
|
+
|
|
362
|
+
if final_score >= 0.75:
|
|
363
|
+
confidence = "HIGH"
|
|
364
|
+
elif final_score >= 0.50:
|
|
365
|
+
confidence = "MEDIUM"
|
|
366
|
+
elif final_score >= 0.25:
|
|
367
|
+
confidence = "LOW"
|
|
368
|
+
else:
|
|
369
|
+
confidence = "CLEAN"
|
|
370
|
+
|
|
371
|
+
return StylometryReport(
|
|
372
|
+
path=path,
|
|
373
|
+
word_count=word_count,
|
|
374
|
+
sentence_count=sentence_count,
|
|
375
|
+
burstiness_cv=cv,
|
|
376
|
+
lexical_diversity=mattr,
|
|
377
|
+
ai_ngram_density=ngram_density,
|
|
378
|
+
matched_markers=[m.to_dict() for m in marker_matches],
|
|
379
|
+
score=final_score,
|
|
380
|
+
confidence_level=confidence,
|
|
381
|
+
status="ok",
|
|
382
|
+
findings=findings,
|
|
383
|
+
notes=notes,
|
|
384
|
+
)
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
def print_human_stylometry_report(report: StylometryReport, explain: bool = False) -> None:
|
|
388
|
+
"""Print clean human-readable output to stdout."""
|
|
389
|
+
print(f"=== Stylometric AI-Text Report: {report.path} ===")
|
|
390
|
+
print(f"Status: {report.status}")
|
|
391
|
+
print(f"Confidence Level: {report.confidence_level}")
|
|
392
|
+
print(f"AI Probability: {report.score * 100:.1f}% (score: {report.score:.3f})")
|
|
393
|
+
print(f"Word Count: {report.word_count}")
|
|
394
|
+
print(f"Sentence Count: {report.sentence_count}")
|
|
395
|
+
cv_display = (
|
|
396
|
+
f"{report.burstiness_cv:.3f}"
|
|
397
|
+
if report.burstiness_cv is not None
|
|
398
|
+
else "n/a (fewer than 2 sentences)"
|
|
399
|
+
)
|
|
400
|
+
print(f"Sentence CV: {cv_display}")
|
|
401
|
+
print(f"Lexical Diversity: {report.lexical_diversity:.3f} (MATTR)")
|
|
402
|
+
print(f"AI Marker Density: {report.ai_ngram_density:.3f} / 100 words")
|
|
403
|
+
|
|
404
|
+
if report.findings:
|
|
405
|
+
print("\nFindings:")
|
|
406
|
+
for f in report.findings:
|
|
407
|
+
print(f" - {f}")
|
|
408
|
+
|
|
409
|
+
if explain and report.matched_markers:
|
|
410
|
+
print("\nMatched Phrases Detail:")
|
|
411
|
+
for m in report.matched_markers:
|
|
412
|
+
print(f" * {m['phrase']} (occurrences: {m['count']}, weight: {m['weight']})")
|
|
413
|
+
if m.get("samples"):
|
|
414
|
+
print(f' sample: "{m["samples"][0]}"')
|
|
415
|
+
|
|
416
|
+
if report.notes:
|
|
417
|
+
print("\nNotes:")
|
|
418
|
+
for n in report.notes:
|
|
419
|
+
print(f" * {n}")
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
def main() -> int:
|
|
423
|
+
p = argparse.ArgumentParser(
|
|
424
|
+
description=__doc__,
|
|
425
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
426
|
+
)
|
|
427
|
+
p.add_argument("path", nargs="?", default="-", help="Text file to score ('-' for stdin)")
|
|
428
|
+
p.add_argument(
|
|
429
|
+
"--threshold",
|
|
430
|
+
type=float,
|
|
431
|
+
default=DEFAULT_THRESHOLD,
|
|
432
|
+
help=f"Score threshold to trigger exit code 1 (default: {DEFAULT_THRESHOLD})",
|
|
433
|
+
)
|
|
434
|
+
p.add_argument("--json", action="store_true", help="Emit JSON output")
|
|
435
|
+
p.add_argument(
|
|
436
|
+
"--explain", action="store_true", help="Include detailed matched phrase breakdown"
|
|
437
|
+
)
|
|
438
|
+
|
|
439
|
+
args = p.parse_args()
|
|
440
|
+
|
|
441
|
+
# Read input
|
|
442
|
+
text = read_text_input(args.path)
|
|
443
|
+
if text is None:
|
|
444
|
+
return 2
|
|
445
|
+
|
|
446
|
+
input_label = "<stdin>" if args.path == "-" else args.path
|
|
447
|
+
report = score_text_stylometry(text, path=input_label)
|
|
448
|
+
|
|
449
|
+
if args.json:
|
|
450
|
+
emit_json(report.to_dict())
|
|
451
|
+
else:
|
|
452
|
+
print_human_stylometry_report(report, explain=args.explain)
|
|
453
|
+
|
|
454
|
+
if report.score >= args.threshold:
|
|
455
|
+
return 1
|
|
456
|
+
return 0
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
if __name__ == "__main__":
|
|
460
|
+
sys.exit(main())
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Optional SynthID pixel-domain scorer backed by an external reverse-SynthID checkout.
|
|
3
|
+
|
|
4
|
+
This script does NOT vendor upstream code. It imports the scorer from a
|
|
5
|
+
user-provided checkout (https://github.com/aloshdenny/reverse-SynthID) at
|
|
6
|
+
runtime, using that environment's optional dependencies (numpy, opencv,
|
|
7
|
+
scipy, PyWavelets, scikit-learn, Pillow).
|
|
8
|
+
|
|
9
|
+
Exit codes:
|
|
10
|
+
0 scored successfully
|
|
11
|
+
1 scorer runtime error
|
|
12
|
+
2 bad input (missing/unreadable image, bad args)
|
|
13
|
+
3 scorer unavailable (not configured / missing deps / missing codebook)
|
|
14
|
+
|
|
15
|
+
The scoring logic lives in :func:score_file so the CLI and the HTTP
|
|
16
|
+
sidecar (synthid_score_server.py) share one implementation.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
from __future__ import annotations
|
|
20
|
+
|
|
21
|
+
import argparse
|
|
22
|
+
import contextlib
|
|
23
|
+
import json
|
|
24
|
+
import os
|
|
25
|
+
import sys
|
|
26
|
+
from pathlib import Path
|
|
27
|
+
from typing import Any
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def resolve_upstream(raw: str | None) -> Path | None:
|
|
31
|
+
if not raw:
|
|
32
|
+
return None
|
|
33
|
+
upstream = Path(raw).expanduser().resolve()
|
|
34
|
+
if not upstream.is_dir():
|
|
35
|
+
return None
|
|
36
|
+
return upstream
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def score_file(
|
|
40
|
+
path: Path,
|
|
41
|
+
*,
|
|
42
|
+
upstream_dir: str | None = None,
|
|
43
|
+
codebook: Path | None = None,
|
|
44
|
+
model: str | None = None,
|
|
45
|
+
) -> tuple[int, dict[str, Any] | None]:
|
|
46
|
+
"""Score *path* with the reverse-SynthID extractor.
|
|
47
|
+
|
|
48
|
+
Returns (exit_code, payload) matching the CLI exit-code contract:
|
|
49
|
+
0 = scored (payload present), 2 = bad input (payload None),
|
|
50
|
+
3 = scorer unavailable (payload None). Errors are printed to stderr so
|
|
51
|
+
callers parsing stdout JSON are never corrupted.
|
|
52
|
+
"""
|
|
53
|
+
if not path.is_file():
|
|
54
|
+
print(f"not a file: {path}", file=sys.stderr)
|
|
55
|
+
return 2, None
|
|
56
|
+
|
|
57
|
+
raw_upstream = upstream_dir or os.environ.get("REVERSE_SYNTHID_DIR")
|
|
58
|
+
upstream = resolve_upstream(str(raw_upstream) if raw_upstream else None)
|
|
59
|
+
if upstream is None:
|
|
60
|
+
print(
|
|
61
|
+
"SynthID scorer not configured: set REVERSE_SYNTHID_DIR or pass --upstream-dir",
|
|
62
|
+
file=sys.stderr,
|
|
63
|
+
)
|
|
64
|
+
return 3, None
|
|
65
|
+
|
|
66
|
+
extraction = upstream / "src" / "extraction"
|
|
67
|
+
if not extraction.is_dir():
|
|
68
|
+
print(f"upstream extraction dir not found: {extraction}", file=sys.stderr)
|
|
69
|
+
return 3, None
|
|
70
|
+
|
|
71
|
+
codebook_path = codebook or upstream / "artifacts" / "spectral_codebook_v4.npz"
|
|
72
|
+
codebook_path = Path(codebook_path).expanduser().resolve()
|
|
73
|
+
if not codebook_path.is_file():
|
|
74
|
+
print(f"codebook not found: {codebook_path}", file=sys.stderr)
|
|
75
|
+
return 3, None
|
|
76
|
+
|
|
77
|
+
sys.path.insert(0, str(extraction))
|
|
78
|
+
try:
|
|
79
|
+
import cv2
|
|
80
|
+
from robust_extractor import RobustSynthIDExtractor
|
|
81
|
+
from synthid_bypass_v4 import SpectralCodebookV4
|
|
82
|
+
except ImportError as e:
|
|
83
|
+
print(f"optional scorer dependencies missing: {e}", file=sys.stderr)
|
|
84
|
+
return 3, None
|
|
85
|
+
|
|
86
|
+
try:
|
|
87
|
+
img = cv2.imread(str(path))
|
|
88
|
+
if img is None:
|
|
89
|
+
print(f"could not load image: {path}", file=sys.stderr)
|
|
90
|
+
return 2, None
|
|
91
|
+
rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
|
|
92
|
+
|
|
93
|
+
# Upstream prints progress ("CodebookV4 loaded: ...") straight to
|
|
94
|
+
# stdout, which corrupts --json for any caller that parses us
|
|
95
|
+
# (image_meta.py json.loads our stdout). Keep stdout ours alone.
|
|
96
|
+
with contextlib.redirect_stdout(sys.stderr):
|
|
97
|
+
codebook_v4 = SpectralCodebookV4()
|
|
98
|
+
codebook_v4.load(str(codebook_path))
|
|
99
|
+
|
|
100
|
+
extractor = RobustSynthIDExtractor()
|
|
101
|
+
result = extractor.detect_from_v4_codebook(rgb, codebook_v4, model=model)
|
|
102
|
+
except Exception as e:
|
|
103
|
+
print(f"scorer error: {e}", file=sys.stderr)
|
|
104
|
+
return 1, None
|
|
105
|
+
|
|
106
|
+
payload = {
|
|
107
|
+
"available": True,
|
|
108
|
+
"upstream_dir": str(upstream),
|
|
109
|
+
"codebook": str(codebook_path),
|
|
110
|
+
"model": model,
|
|
111
|
+
"profile_key": result.details.get("profile_key"),
|
|
112
|
+
"exact_match": result.details.get("exact_match"),
|
|
113
|
+
"is_watermarked": result.is_watermarked,
|
|
114
|
+
"confidence": result.confidence,
|
|
115
|
+
"phase_match": result.phase_match,
|
|
116
|
+
"per_channel_scores": result.details.get("per_channel_scores"),
|
|
117
|
+
"per_channel_n": result.details.get("per_channel_n"),
|
|
118
|
+
"multi_scale_consistency": result.multi_scale_consistency,
|
|
119
|
+
}
|
|
120
|
+
return 0, payload
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def main() -> int:
|
|
124
|
+
p = argparse.ArgumentParser(description=__doc__)
|
|
125
|
+
p.add_argument("path", type=Path, help="Image to score (PNG/JPEG/etc.)")
|
|
126
|
+
p.add_argument(
|
|
127
|
+
"--upstream-dir",
|
|
128
|
+
type=Path,
|
|
129
|
+
default=None,
|
|
130
|
+
help="reverse-SynthID checkout root (default: $REVERSE_SYNTHID_DIR)",
|
|
131
|
+
)
|
|
132
|
+
p.add_argument(
|
|
133
|
+
"--codebook",
|
|
134
|
+
type=Path,
|
|
135
|
+
default=None,
|
|
136
|
+
help="spectral_codebook_v4.npz path (default: <upstream>/artifacts/)",
|
|
137
|
+
)
|
|
138
|
+
p.add_argument("--model", type=str, default=None, help="Optional model hint")
|
|
139
|
+
p.add_argument("--json", action="store_true", help="Emit JSON on stdout")
|
|
140
|
+
args = p.parse_args()
|
|
141
|
+
|
|
142
|
+
code, payload = score_file(
|
|
143
|
+
args.path,
|
|
144
|
+
upstream_dir=str(args.upstream_dir) if args.upstream_dir else None,
|
|
145
|
+
codebook=args.codebook,
|
|
146
|
+
model=args.model,
|
|
147
|
+
)
|
|
148
|
+
if code != 0:
|
|
149
|
+
return code
|
|
150
|
+
|
|
151
|
+
if args.json:
|
|
152
|
+
json.dump(payload, sys.stdout, indent=2)
|
|
153
|
+
sys.stdout.write("\n")
|
|
154
|
+
else:
|
|
155
|
+
label = "yes" if payload["is_watermarked"] else "no"
|
|
156
|
+
print(f"SynthID score: confidence {payload['confidence']:.3f} (watermarked: {label})")
|
|
157
|
+
print(f" phase_match: {payload['phase_match']:.3f}")
|
|
158
|
+
if payload.get("profile_key"):
|
|
159
|
+
print(f" profile: {payload['profile_key']}")
|
|
160
|
+
|
|
161
|
+
return 0
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
if __name__ == "__main__":
|
|
165
|
+
raise SystemExit(main())
|