@buaa_smat/hometrans 0.1.20 → 26.0.0-devecocli.2
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/agents/build-fixer.md +406 -0
- package/agents/code-reviewer.md +461 -496
- package/agents/model-render-worker.md +34 -0
- package/agents/model-worker.md +23 -0
- package/agents/specgen-worker.md +18 -0
- package/commands/hometrans.md +17 -0
- package/devecocli-plugin/common.ts +2203 -0
- package/devecocli-plugin/install.ts +61 -0
- package/devecocli-plugin/uninstall.ts +26 -0
- package/devecocli-plugin/update.ts +66 -0
- package/index.js +1418 -0
- package/package.json +81 -64
- package/platforms/atomcode/agents/build-fixer.frontmatter.md +6 -0
- package/platforms/atomcode/agents/code-reviewer.frontmatter.md +6 -0
- package/platforms/atomcode/agents/model-render-worker.frontmatter.md +6 -0
- package/platforms/atomcode/agents/model-worker.frontmatter.md +6 -0
- package/platforms/atomcode/agents/specgen-worker.frontmatter.md +6 -0
- package/platforms/deveco/agents/build-fixer.frontmatter.md +5 -0
- package/platforms/deveco/agents/code-reviewer.frontmatter.md +5 -0
- package/platforms/deveco/agents/model-render-worker.frontmatter.md +5 -0
- package/platforms/deveco/agents/model-worker.frontmatter.md +5 -0
- package/platforms/deveco/agents/specgen-worker.frontmatter.md +5 -0
- package/platforms/opencode/agents/build-fixer.frontmatter.md +5 -0
- package/platforms/opencode/agents/code-reviewer.frontmatter.md +5 -0
- package/platforms/opencode/agents/model-render-worker.frontmatter.md +5 -0
- package/platforms/opencode/agents/model-worker.frontmatter.md +5 -0
- package/platforms/opencode/agents/specgen-worker.frontmatter.md +5 -0
- package/plugin.jsonc +12 -0
- package/skills/a2h-app-migrate/SKILL.md +181 -0
- package/skills/a2h-app-migrate/references/config.example.json +27 -0
- package/skills/a2h-app-migrate/references/specs.example.json +19 -0
- package/skills/a2h-app-migrate/references/stage-map.md +33 -0
- package/skills/a2h-app-migrate/references/workflow.yaml +1600 -0
- package/skills/a2h-app-migrate/scripts/android_index.mjs +109 -0
- package/skills/a2h-app-migrate/scripts/check_arch_done.mjs +80 -0
- package/skills/a2h-app-migrate/scripts/check_module_docs_done.mjs +95 -0
- package/skills/a2h-app-migrate/scripts/check_signing.mjs +152 -0
- package/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +114 -0
- package/skills/a2h-app-migrate/scripts/check_spec_pipeline_done.mjs +277 -0
- package/skills/a2h-app-migrate/scripts/check_ui_batch_done.mjs +77 -0
- package/skills/a2h-app-migrate/scripts/check_utg_static_done.mjs +147 -0
- package/skills/a2h-app-migrate/scripts/cli_values.mjs +32 -0
- package/skills/a2h-app-migrate/scripts/env_preflight.mjs +1388 -0
- package/skills/a2h-app-migrate/scripts/human_review_gate.mjs +651 -0
- package/skills/a2h-app-migrate/scripts/infer_android_root.mjs +53 -0
- package/skills/a2h-app-migrate/scripts/json_io.mjs +35 -0
- package/skills/a2h-app-migrate/scripts/ledger.mjs +104 -0
- package/skills/a2h-app-migrate/scripts/lib-yaml-lite.mjs +288 -0
- package/skills/a2h-app-migrate/scripts/paths_preflight.mjs +713 -0
- package/skills/a2h-app-migrate/scripts/resume_plan.mjs +205 -0
- package/skills/a2h-app-migrate/scripts/reuse_static_utg.mjs +121 -0
- package/skills/a2h-app-migrate/scripts/run_dir.mjs +212 -0
- package/skills/a2h-app-migrate/scripts/spec_layout.mjs +30 -0
- package/skills/a2h-app-migrate/scripts/validate_workflow.mjs +455 -0
- package/skills/a2h-app-migrate/test/test_android_index.mjs +80 -0
- package/skills/a2h-app-migrate/test/test_apk_preflight.mjs +63 -0
- package/skills/a2h-app-migrate/test/test_arch_done.mjs +54 -0
- package/skills/a2h-app-migrate/test/test_build_fixer_contract.mjs +92 -0
- package/skills/a2h-app-migrate/test/test_config_example.mjs +42 -0
- package/skills/a2h-app-migrate/test/test_entry_guards.mjs +93 -0
- package/skills/a2h-app-migrate/test/test_env_requirements.mjs +505 -0
- package/skills/a2h-app-migrate/test/test_finalize.mjs +89 -0
- package/skills/a2h-app-migrate/test/test_gate_checkpoint.mjs +146 -0
- package/skills/a2h-app-migrate/test/test_hmos_fingerprint.mjs +68 -0
- package/skills/a2h-app-migrate/test/test_infer_android_root.mjs +91 -0
- package/skills/a2h-app-migrate/test/test_interaction.mjs +122 -0
- package/skills/a2h-app-migrate/test/test_json_io.mjs +32 -0
- package/skills/a2h-app-migrate/test/test_leaf_questions.mjs +109 -0
- package/skills/a2h-app-migrate/test/test_module_docs_done.mjs +53 -0
- package/skills/a2h-app-migrate/test/test_parse_args.mjs +69 -0
- package/skills/a2h-app-migrate/test/test_preflight_report.mjs +83 -0
- package/skills/a2h-app-migrate/test/test_resume_plan.mjs +144 -0
- package/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +100 -0
- package/skills/a2h-app-migrate/test/test_run_dir.mjs +315 -0
- package/skills/a2h-app-migrate/test/test_skill_doc.mjs +133 -0
- package/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +133 -0
- package/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +158 -0
- package/skills/a2h-app-migrate/test/test_spec_pipeline_done.mjs +181 -0
- package/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +76 -0
- package/skills/a2h-app-migrate/test/test_ui_batch_done.mjs +53 -0
- package/skills/a2h-app-migrate/test/test_ui_batch_gate.mjs +226 -0
- package/skills/a2h-app-migrate/test/test_utg_dirs.mjs +39 -0
- package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +168 -0
- package/skills/a2h-app-migrate/test/test_validate_races.mjs +50 -0
- package/skills/a2h-arch-generate/SKILL.md +375 -0
- package/skills/a2h-arch-generate/examples/reconcile-existing-project.md +107 -0
- package/skills/a2h-arch-generate/examples/simple-conversion-android.md +103 -0
- package/skills/a2h-arch-generate/examples/simple-conversion-backend.md +70 -0
- package/skills/a2h-arch-generate/examples/simple-conversion-uniapp.md +106 -0
- package/skills/a2h-arch-generate/references/artifact-contracts.generate.md +120 -0
- package/skills/a2h-arch-generate/references/artifact-contracts.reconcile.md +123 -0
- package/skills/a2h-arch-generate/references/bpta-layered-architecture-design.md +88 -0
- package/skills/a2h-arch-generate/references/clustering-guidance.md +33 -0
- package/skills/a2h-arch-generate/references/database-schema-recovery.md +107 -0
- package/skills/a2h-arch-generate/references/existing-target-annotation.md +68 -0
- package/skills/a2h-arch-generate/references/harmony-project-inspection.md +150 -0
- package/skills/a2h-arch-generate/references/harmony-target-architecture.md +94 -0
- package/skills/a2h-arch-generate/references/homegraph-workflow.md +120 -0
- package/skills/a2h-arch-generate/references/module-evidence-subagent.md +45 -0
- package/skills/a2h-arch-generate/references/reconciliation-model.md +204 -0
- package/skills/a2h-arch-generate/references/scope-policy.md +28 -0
- package/skills/a2h-arch-generate/references/semantic-review.md +65 -0
- package/skills/a2h-arch-generate/references/source-baseline.md +93 -0
- package/skills/a2h-arch-generate/references/source-ecosystems.md +54 -0
- package/skills/a2h-arch-generate/references/transformation-model.md +78 -0
- package/skills/a2h-arch-generate/scripts/check_module_staleness.mjs +284 -0
- package/skills/a2h-arch-generate/scripts/cleanup_intermediates.mjs +260 -0
- package/skills/a2h-arch-generate/scripts/compute_processing_order.mjs +325 -0
- package/skills/a2h-arch-generate/scripts/create_project.mjs +149 -0
- package/skills/a2h-arch-generate/scripts/dump_core_facts.mjs +151 -0
- package/skills/a2h-arch-generate/scripts/extract_core_components.mjs +167 -0
- package/skills/a2h-arch-generate/scripts/generate_source_baseline.mjs +363 -0
- package/skills/a2h-arch-generate/scripts/generate_state.mjs +60 -0
- package/skills/a2h-arch-generate/scripts/inspect_and_route.mjs +326 -0
- package/skills/a2h-arch-generate/scripts/inspect_android_project.mjs +3739 -0
- package/skills/a2h-arch-generate/scripts/inspect_harmony_target.mjs +800 -0
- package/skills/a2h-arch-generate/scripts/inspect_project.mjs +251 -0
- package/skills/a2h-arch-generate/scripts/inspect_uniapp_project.mjs +809 -0
- package/skills/a2h-arch-generate/scripts/lib/py_compat.mjs +1454 -0
- package/skills/a2h-arch-generate/scripts/module_create/create.mjs +136 -0
- package/skills/a2h-arch-generate/scripts/module_create/generate.mjs +636 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/build-profile.json5 +33 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/hvigorfile.ts +6 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/obfuscation-rules.txt +23 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/oh-package.json5 +10 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/ets/applicationability/ApplicationAbility.ets +43 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/ets/pages/Index.ets +23 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/module.json5 +26 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/element/color.json +8 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/element/float.json +8 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/element/string.json +16 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/media/background.png +0 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/media/foreground.png +0 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/media/layered_image.json +7 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/media/startIcon.png +0 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/profile/main_pages.json +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/mock/mock-config.json5 +2 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/ohosTest/ets/test/Ability.test.ets +35 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/ohosTest/ets/test/List.test.ets +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/ohosTest/module.json5 +11 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/test/List.test.ets +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/test/LocalUnit.test.ets +33 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/Index.ets +1 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/build-profile.json5 +36 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/hvigorfile.ts +6 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/obfuscation-rules.txt +23 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/oh-package.json5 +9 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/main/ets/components/MainPage.ets +19 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/main/module.json5 +9 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/main/resources/base/element/float.json +8 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/main/resources/base/element/string.json +8 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/ohosTest/ets/test/Ability.test.ets +35 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/ohosTest/ets/test/List.test.ets +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/ohosTest/module.json5 +11 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/test/List.test.ets +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/test/LocalUnit.test.ets +33 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/Index.ets +1 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/build-profile.json5 +36 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/consumer-rules.txt +0 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/hvigorfile.ts +6 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/obfuscation-rules.txt +23 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/oh-package.json5 +10 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/main/ets/pages/Index.ets +20 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/main/ets/utils/Calc.ets +3 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/main/module.json5 +12 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/main/resources/base/element/float.json +8 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/main/resources/base/element/string.json +8 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/main/resources/base/profile/main_pages.json +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/ohosTest/ets/test/Ability.test.ets +35 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/ohosTest/ets/test/List.test.ets +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/ohosTest/module.json5 +11 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/test/List.test.ets +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/test/LocalUnit.test.ets +33 -0
- package/skills/a2h-arch-generate/scripts/module_create/testdata/reconcile-layer-PROJECT_DESIGN.md +47 -0
- package/skills/a2h-arch-generate/scripts/module_create/testdata/single-entry-PROJECT_DESIGN.md +15 -0
- package/skills/a2h-arch-generate/scripts/module_create/testdata/three-layer-PROJECT_DESIGN.md +36 -0
- package/skills/a2h-arch-generate/scripts/module_create/testdata/verification-report.md +150 -0
- package/skills/a2h-arch-generate/scripts/resolve_android_stores.mjs +529 -0
- package/skills/a2h-arch-generate/scripts/scaffold_project.mjs +230 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/app/build.gradle +11 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/app/src/main/AndroidManifest.xml +12 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/app/src/main/java/com/example/notes/MainActivity.kt +8 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/app/src/main/java/com/example/notes/NotesStore.kt +17 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/build.gradle +3 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/settings.gradle +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/AppScope/app.json5 +8 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/build-profile.json5 +14 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/common/utils/build-profile.json5 +7 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/common/utils/oh-package.json5 +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/common/utils/src/main/ets/utils/Format.ets +3 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/home/build-profile.json5 +7 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/home/oh-package.json5 +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/home/src/main/ets/pages/Home.ets +3 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/sync/build-profile.json5 +7 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/sync/oh-package.json5 +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/sync/src/main/ets/engine/SyncEngine.ets +3 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/hvigorfile.ts +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/oh-package.json5 +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/products/app/build-profile.json5 +7 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/products/app/oh-package.json5 +9 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/products/app/src/main/ets/pages/Index.ets +7 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/App.vue +10 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/manifest.json +6 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/pages/index/index.vue +16 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/pages.json +5 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/run_e2e.mjs +548 -0
- package/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +1122 -0
- package/skills/a2h-arch-generate/scripts/tests/test_cleanup.mjs +191 -0
- package/skills/a2h-arch-generate/scripts/tests/test_console_encoding.mjs +52 -0
- package/skills/a2h-arch-generate/scripts/tests/test_git_root.mjs +34 -0
- package/skills/a2h-arch-generate/scripts/tests/test_router.mjs +138 -0
- package/skills/a2h-arch-generate/scripts/validate_architecture_docs.mjs +829 -0
- package/skills/a2h-arch-generate/scripts/validate_data_docs.mjs +937 -0
- package/skills/a2h-arch-generate/scripts/validate_homegraph_artifacts.mjs +542 -0
- package/skills/a2h-arch-generate/scripts/validate_incremental_docs.mjs +415 -0
- package/skills/a2h-arkts-logic-coder/SKILL.md +125 -0
- package/skills/a2h-arkts-logic-coder/references/ISSUES.md +6 -0
- package/skills/a2h-arkts-logic-coder/references/code-generation.md +124 -0
- package/skills/a2h-arkts-logic-coder/scripts/check_module_scope.ts +224 -0
- package/skills/a2h-arkts-logic-coder/scripts/check_mvvm.ts +377 -0
- package/skills/a2h-arkts-logic-coder/scripts/stop_check_hook.ts +443 -0
- package/skills/a2h-arkts-logic-coder/scripts/test_check_scripts.ts +211 -0
- package/skills/a2h-arkts-logic-coder/scripts/test_worktree_compat.ts +81 -0
- package/skills/a2h-batch-ui-align/SKILL.md +309 -0
- package/skills/a2h-batch-ui-align/assets/ColorUtils.ets +81 -0
- package/skills/a2h-batch-ui-align/flowchart.html +271 -0
- package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/conversion-procedure.md +523 -661
- package/skills/a2h-batch-ui-align/references/incremental-scope.md +139 -0
- package/skills/a2h-batch-ui-align/references/lottie-integration.md +43 -0
- package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +8 -8
- package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +3 -0
- package/skills/a2h-batch-ui-align/references/source-only-tier.md +32 -0
- package/skills/a2h-batch-ui-align/references/step3-capture.md +211 -0
- package/skills/a2h-batch-ui-align/references/step4-prepare.md +192 -0
- package/skills/a2h-batch-ui-align/references/step5-convert.md +202 -0
- package/skills/a2h-batch-ui-align/scripts/agent_cli.mjs +572 -0
- package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/scripts/android_parse_fast.ts +246 -39
- package/skills/a2h-batch-ui-align/scripts/answers_check.mjs +86 -0
- package/skills/a2h-batch-ui-align/scripts/arkts_static_check.ts +2689 -0
- package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +1656 -0
- package/skills/a2h-batch-ui-align/scripts/databinding_analyzer_design.md +79 -0
- package/skills/a2h-batch-ui-align/scripts/detach.mjs +258 -0
- package/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +1524 -0
- package/skills/a2h-batch-ui-align/scripts/generate_pages_json.mjs +612 -0
- package/skills/a2h-batch-ui-align/scripts/group_commit.mjs +166 -0
- package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +1437 -0
- package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +1869 -0
- package/skills/a2h-batch-ui-align/scripts/group_watch.mjs +696 -0
- package/skills/a2h-batch-ui-align/scripts/harmony_index.mjs +218 -0
- package/skills/a2h-batch-ui-align/scripts/host_env.mjs +208 -0
- package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +1229 -0
- package/skills/a2h-batch-ui-align/scripts/occlusion.mjs +141 -0
- package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +1124 -0
- package/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +996 -0
- package/skills/a2h-batch-ui-align/scripts/tests/agent_cli.test.mjs +217 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_align_tint.test.mjs +253 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rules.test.mjs +365 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_shell.test.mjs +72 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_weight_color.test.mjs +353 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +345 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set_scope.test.mjs +290 -0
- package/skills/a2h-batch-ui-align/scripts/tests/color_utils_asset.test.mjs +74 -0
- package/skills/a2h-batch-ui-align/scripts/tests/export_ui_info.test.mjs +507 -0
- package/skills/a2h-batch-ui-align/scripts/tests/generate_pages_json.test.mjs +123 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_commit.test.mjs +126 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_pack.test.mjs +189 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +1451 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_watch.test.mjs +215 -0
- package/skills/a2h-batch-ui-align/scripts/tests/harmony_index.test.mjs +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/host_env.test.mjs +115 -0
- package/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +170 -0
- package/skills/a2h-batch-ui-align/scripts/tests/occlusion.test.mjs +102 -0
- package/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +244 -0
- package/skills/a2h-batch-ui-align/scripts/tests/shell_contract.test.mjs +130 -0
- package/skills/a2h-batch-ui-align/scripts/tests/test_bfs_exit.ts +49 -0
- package/skills/a2h-coldstart-smoke-gate/SKILL.md +57 -0
- package/skills/a2h-dashboard-render/SKILL.md +65 -0
- package/skills/a2h-dashboard-render/references/artifact-contract.jsonc +147 -0
- package/skills/a2h-dashboard-render/references/artifact-registry-spec.md +67 -0
- package/skills/a2h-dashboard-render/references/dashboard.config.example.json +19 -0
- package/skills/a2h-dashboard-render/references//347/234/213/346/235/277/350/257/264/346/230/216.md +83 -0
- package/skills/a2h-dashboard-render/scripts/artifact_contract.mjs +138 -0
- package/skills/a2h-dashboard-render/scripts/check-registry.mjs +87 -0
- package/skills/a2h-dashboard-render/scripts/dashboard.mjs +3215 -0
- package/skills/a2h-dashboard-render/scripts/device_capture.mjs +2010 -0
- package/skills/a2h-dashboard-render/scripts/page_capture.mjs +828 -0
- package/skills/a2h-dashboard-render/scripts/usage_readers.mjs +459 -0
- package/skills/a2h-dashboard-render/scripts/usage_worker.mjs +13 -0
- package/skills/a2h-dashboard-render/test/fixtures/page_capture/broken.xml +1 -0
- package/skills/a2h-dashboard-render/test/fixtures/page_capture/expected.json +156 -0
- package/skills/a2h-dashboard-render/test/fixtures/page_capture/hmos.json +1 -0
- package/skills/a2h-dashboard-render/test/fixtures/page_capture/list.xml +1 -0
- package/skills/a2h-dashboard-render/test/fixtures/page_capture/nested_scroll.xml +1 -0
- package/skills/a2h-dashboard-render/test/test_artifact_contract.mjs +170 -0
- package/skills/a2h-dashboard-render/test/test_cli_check_registry.mjs +99 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_architecture.mjs +182 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_build.mjs +64 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_node.mjs +1172 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_spec_pipeline.mjs +251 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_ui_pipeline.mjs +81 -0
- package/skills/a2h-dashboard-render/test/test_device_capture_env.mjs +115 -0
- package/skills/a2h-dashboard-render/test/test_device_capture_policy.mjs +303 -0
- package/skills/a2h-dashboard-render/test/test_page_capture.mjs +147 -0
- package/skills/a2h-dashboard-render/test/test_usage_readers.mjs +444 -0
- package/skills/{hmos-fix-build-errors → a2h-fix-build-errors}/SKILL.md +305 -293
- package/skills/a2h-module-semantic-docs/SKILL.md +227 -0
- package/skills/a2h-module-semantic-docs/scripts/commit_module_state.mjs +168 -0
- package/skills/a2h-module-semantic-docs/scripts/lib/py_compat.mjs +688 -0
- package/skills/a2h-module-semantic-docs/scripts/scan_modules.mjs +1021 -0
- package/skills/a2h-module-semantic-docs/test/golden/module_structure.json +187 -0
- package/skills/a2h-module-semantic-docs/test/golden/module_understanding.json +351 -0
- package/skills/a2h-module-semantic-docs/test/golden/module_update_plan.json +495 -0
- package/skills/a2h-module-semantic-docs/test/golden/project_directory_structure.json +157 -0
- package/skills/a2h-module-semantic-docs/test/test_scan_and_commit.mjs +388 -0
- package/skills/a2h-resource-convert/SKILL.md +369 -0
- package/skills/{hmos-resources-convert → a2h-resource-convert}/references/code-vector-icon-rules.md +4 -4
- package/skills/{hmos-resources-convert → a2h-resource-convert}/references/conversion-rules.md +16 -5
- package/skills/a2h-resource-convert/references/incremental-page-migration.md +251 -0
- package/skills/{hmos-resources-convert → a2h-resource-convert}/references/lottie-conversion-rules.md +17 -17
- package/skills/{hmos-resources-convert → a2h-resource-convert}/references/resource-mapping-rules.md +15 -4
- package/skills/a2h-resource-convert/references/step3_5-dependency-filter.md +54 -0
- package/skills/a2h-resource-convert/references/step4-qualifiers-and-values.md +142 -0
- package/skills/a2h-resource-convert/references/step4-resource-types.md +249 -0
- package/skills/a2h-resource-convert/references/step5-reference-resolution.md +154 -0
- package/skills/a2h-resource-convert/references/step7-report-template.md +217 -0
- package/skills/{hmos-resources-convert → a2h-resource-convert}/references/xml-drawable-to-svg-rules.md +38 -0
- package/skills/{hmos-resources-convert → a2h-resource-convert}/scripts/a2h_resource_convert.ts +456 -90
- package/skills/a2h-resource-convert/scripts/a2h_resource_incremental.ts +1072 -0
- package/skills/a2h-resource-convert/scripts/app_identity.ts +947 -0
- package/skills/{hmos-resources-convert → a2h-resource-convert}/scripts/code_vector_icons.ts +19 -3
- package/skills/a2h-resource-convert/scripts/extract_page_resources.ts +989 -0
- package/skills/a2h-resource-convert/scripts/extract_project_resources.ts +1464 -0
- package/skills/a2h-resource-convert/scripts/tests/adaptive_icon.test.mjs +182 -0
- package/skills/a2h-resource-convert/scripts/tests/app_identity.test.mjs +206 -0
- package/skills/a2h-spec-design/SKILL.md +336 -0
- package/skills/a2h-spec-design/scripts/inspect_spec_design_inputs.mjs +146 -0
- package/skills/a2h-spec-design/scripts/lib/py_compat.mjs +481 -0
- package/skills/a2h-spec-design/scripts/move_spec_technical_reference.mjs +159 -0
- package/skills/a2h-spec-design/scripts/resolve_module_design.mjs +102 -0
- package/skills/a2h-spec-design/scripts/validate_spec_design_output.mjs +285 -0
- package/skills/a2h-spec-design/test/golden/inspect_happy.json +20 -0
- package/skills/a2h-spec-design/test/golden/move_design.md +18 -0
- package/skills/a2h-spec-design/test/golden/move_design_crlf.md +18 -0
- package/skills/a2h-spec-design/test/golden/move_spec.md +7 -0
- package/skills/a2h-spec-design/test/golden/resolve_cases.json +36 -0
- package/skills/a2h-spec-design/test/golden/validate_issue_file.md +12 -0
- package/skills/a2h-spec-design/test/golden/validate_issues.json +57 -0
- package/skills/a2h-spec-design/test/test_spec_design_scripts.mjs +381 -0
- package/skills/a2h-spec-design-pipeline/SKILL.md +228 -0
- package/skills/a2h-spec-design-pipeline/package.json +4 -0
- package/skills/a2h-spec-design-pipeline/references/coding-loop.md +63 -0
- package/skills/a2h-spec-design-pipeline/references/execution-model.md +69 -0
- package/skills/a2h-spec-design-pipeline/references/final-report-template.md +24 -0
- package/skills/a2h-spec-design-pipeline/references/initialization.md +57 -0
- package/skills/a2h-spec-design-pipeline/references/merge-queue.md +21 -0
- package/skills/a2h-spec-design-pipeline/references/scripts.md +27 -0
- package/skills/a2h-spec-design-pipeline/references/specs.example.json +19 -0
- package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +21 -0
- package/skills/a2h-spec-design-pipeline/scripts/atomic_write.ts +42 -0
- package/skills/a2h-spec-design-pipeline/scripts/audit_claims.ts +252 -0
- package/skills/a2h-spec-design-pipeline/scripts/branch_landed.ts +77 -0
- package/skills/a2h-spec-design-pipeline/scripts/deps_ready.ts +195 -0
- package/skills/a2h-spec-design-pipeline/scripts/ensure_wt_index.ts +651 -0
- package/skills/a2h-spec-design-pipeline/scripts/git_baseline.ts +124 -0
- package/skills/a2h-spec-design-pipeline/scripts/inflight.mjs +944 -0
- package/skills/a2h-spec-design-pipeline/scripts/lib/bgcli.mjs +95 -0
- package/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +502 -0
- package/skills/a2h-spec-design-pipeline/scripts/plan_waves.ts +475 -0
- package/skills/a2h-spec-design-pipeline/scripts/reconcile.mjs +218 -0
- package/skills/a2h-spec-design-pipeline/scripts/resolve_wiring.ts +164 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_atomic_write.ts +44 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_audit_claims.ts +301 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_bgcli.mjs +64 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_branch_landed.ts +87 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_deps_ready.ts +265 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_wt_index.ts +675 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_git_baseline.ts +105 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_inflight.mjs +452 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +375 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_plan_waves.ts +561 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_reconcile.mjs +182 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_resolve_wiring.ts +138 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_watchdog.mjs +289 -0
- package/skills/a2h-spec-design-pipeline/scripts/watchdog.mjs +441 -0
- package/skills/a2h-spec-generate/SKILL.md +285 -0
- package/skills/a2h-spec-generate/package.json +9 -0
- package/skills/a2h-spec-generate/references/batch-mode.md +151 -0
- package/skills/a2h-spec-generate/references/delete-blast-radius.md +3 -0
- package/skills/a2h-spec-generate/references/fusion-task-contract.md +114 -0
- package/skills/a2h-spec-generate/references/input-formats.md +27 -0
- package/skills/a2h-spec-generate/references/library-evidence.md +3 -0
- package/skills/a2h-spec-generate/references/method-discipline.md +64 -0
- package/skills/a2h-spec-generate/references/optional-gates.json +45 -0
- package/skills/a2h-spec-generate/references/recall-guide.md +83 -0
- package/skills/a2h-spec-generate/references/recall-terse.md +3 -0
- package/skills/a2h-spec-generate/references/recall-uniapp.md +10 -0
- package/skills/a2h-spec-generate/references/requirement-scope.md +122 -0
- package/skills/a2h-spec-generate/references/review-checklist.md +21 -0
- package/skills/a2h-spec-generate/references/spec-sample-complex.md +80 -0
- package/skills/a2h-spec-generate/references/spec-sample-transfer.md +43 -0
- package/skills/a2h-spec-generate/references/spec-samples.md +65 -0
- package/skills/a2h-spec-generate/references/specs.schema.json +79 -0
- package/skills/a2h-spec-generate/references/synthesis-rules.md +143 -0
- package/skills/a2h-spec-generate/references/transfer-file.md +5 -0
- package/skills/a2h-spec-generate/references/transfer-socket.md +5 -0
- package/skills/a2h-spec-generate/references/worker-rules.md +126 -0
- package/skills/a2h-spec-generate/scripts/check-fused-spec.mjs +514 -0
- package/skills/a2h-spec-generate/scripts/check_spec.ts +361 -0
- package/skills/a2h-spec-generate/scripts/collect-specs.mjs +470 -0
- package/skills/a2h-spec-generate/scripts/detect-project.mjs +271 -0
- package/skills/a2h-spec-generate/scripts/ensure-index.mjs +188 -0
- package/skills/a2h-spec-generate/scripts/feature-stem.mjs +150 -0
- package/skills/a2h-spec-generate/scripts/inspect-uniapp.mjs +733 -0
- package/skills/{hmos-spec-generate → a2h-spec-generate}/scripts/parse_requirements.ts +1 -1
- package/skills/a2h-spec-generate/scripts/prepare-facts.mjs +307 -0
- package/skills/a2h-spec-generate/scripts/publication-verdict.mjs +171 -0
- package/skills/a2h-spec-generate/scripts/publish-specs.mjs +280 -0
- package/skills/a2h-spec-generate/scripts/render-tasks.mjs +399 -0
- package/skills/a2h-spec-generate/scripts/report.mjs +132 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/dashboard.html +149 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-api.js +49 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-code-view.js +140 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-format.js +16 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-handoff.js +42 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-splitters.js +78 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-state.js +47 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-tree.js +194 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-virtual-list.js +118 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz.css +245 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz.html +99 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz.js +220 -0
- package/skills/a2h-spec-generate/scripts/reqgen/package-lock.json +47 -0
- package/skills/a2h-spec-generate/scripts/reqgen/package.json +23 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/agent-render/serve.ts +95 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/callback-call-sites.ts +82 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/area-ownership.ts +496 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/build.ts +2217 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/callback-flow.ts +386 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/component-variants.ts +845 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/index.ts +24 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/index.ts +22 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/policy.ts +572 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/traceability.ts +580 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/req-model/build.ts +1270 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/req-model/index.ts +10 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/req-model/projection.ts +804 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/req-model/render-projection.ts +51 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/source-facts/android-interaction-registry.ts +286 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/source-facts/builder.ts +453 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/source-facts/compose-api-registry.ts +526 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/source-facts/index.ts +15 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/connector/index.ts +1 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/connector/utg-inbound.ts +763 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/area-graph.ts +383 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/artifact.ts +68 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/common.ts +88 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/diagnostic.ts +64 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/gap-audit.ts +113 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/index.ts +12 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/name-traceability.ts +108 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/raw-fact.ts +377 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/req-model.ts +238 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/run.ts +134 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/semantic-completeness.ts +35 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/source-facts.ts +48 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/utg.ts +133 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/core/output-guard.ts +42 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/core/stable-id.ts +118 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/cross-area-tally-cli.ts +179 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/dashboard-cli.ts +188 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/dump/dump.ts +1184 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/dump/index.ts +1 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/dump-cli.ts +373 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/area-facts.ts +1014 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/area-output.ts +32 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/schema.ts +142 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/selfcheck.ts +312 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/spec-bindings.ts +310 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/task-contract.ts +685 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/graph/paths.ts +575 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/homegraph-cli.ts +50 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/android-resource-resolver.ts +391 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/androidx-preference-contracts.ts +44 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/contracts.ts +640 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/cross-area.ts +207 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/finalizer.ts +1297 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/identity.ts +186 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/index.ts +16 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/planner.ts +312 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/preference-enrichment.ts +793 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/raw-facts.ts +355 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/rules.ts +271 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/scanner.ts +666 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/schema.ts +365 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/stable-key.ts +144 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/task-contract.ts +301 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/tree-sitter-adapter.ts +923 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/uniapp-utg-adapter.ts +543 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/xml-adapter.ts +262 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/assemble.ts +2079 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/contracts.ts +157 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/finalize.ts +809 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/index.ts +17 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/io.ts +165 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/prepare.ts +806 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/query.ts +360 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/seeds.ts +218 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/spec-bindings-sidecar.ts +240 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/task.ts +359 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model-cli.ts +500 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/pipeline/index.ts +7 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/pipeline/output.ts +307 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/requirement-scope.ts +172 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/source-cov/index.ts +1 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/source-cov/source-cov.ts +176 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/source-index/homegraph.ts +1039 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/validation/area-graph.ts +490 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/validation/index.ts +23 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/validation/req-model.ts +957 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/validation/req-text.ts +248 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/validation/semantic-area-graph.ts +1600 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/validation/types.ts +10 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/artifact-data.ts +201 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-api.ts +74 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-code-view.ts +180 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-format.ts +18 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-handoff.ts +55 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-splitters.ts +78 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-state.ts +66 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-tree.ts +232 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-virtual-list.ts +179 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz.ts +240 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/contracts.d.ts +86 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/index.ts +3 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/server.ts +239 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/source-project.ts +316 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz-cli.ts +200 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/control-fact-join.test.ts +50 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/control-name-uniapp.test.ts +75 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/cross-area-anchor.test.ts +256 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-area-facts.test.ts +576 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-contract.test.ts +290 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-finalize.test.ts +1323 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-prepare.test.ts +574 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-scope.test.ts +339 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-selfcheck.test.ts +831 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-spec.test.ts +548 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/model-cli-blockers.test.ts +117 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/model-scope.test.ts +396 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/model-seeds.test.ts +175 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/model-task-contract.test.ts +298 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/model-v4.test.ts +1061 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/specgen-completeness.test.ts +286 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/stagem-stored-path.test.ts +25 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/uniapp-scanner.test.ts +159 -0
- package/skills/a2h-spec-generate/scripts/reqgen/tsconfig.json +16 -0
- package/skills/a2h-spec-generate/scripts/reqgen/tsconfig.viz-client.json +12 -0
- package/skills/a2h-spec-generate/test/check-fused-spec.test.mjs +632 -0
- package/skills/a2h-spec-generate/test/check-spec.test.ts +200 -0
- package/skills/a2h-spec-generate/test/collect-specs.test.mjs +538 -0
- package/skills/a2h-spec-generate/test/detect-project.test.mjs +37 -0
- package/skills/a2h-spec-generate/test/ensure-index.test.mjs +45 -0
- package/skills/a2h-spec-generate/test/feature-stem.test.mjs +147 -0
- package/skills/a2h-spec-generate/test/fixtures/android/app/src/main/AndroidManifest.xml +3 -0
- package/skills/a2h-spec-generate/test/fixtures/android/build.gradle +3 -0
- package/skills/a2h-spec-generate/test/fixtures/android/settings.gradle +3 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/package.json +9 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/App.vue +8 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/components/MyCard.vue +9 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/feature/editor/index.vue +1 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/main.ts +6 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/manifest.json +4 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/detail/index.vue +1 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/home/index.vue +33 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/settings/index.vue +1 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages.json +23 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/services/items.ts +3 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/tsconfig.json +8 -0
- package/skills/a2h-spec-generate/test/fixtures/unknown/README.txt +1 -0
- package/skills/a2h-spec-generate/test/inspect-uniapp.test.mjs +54 -0
- package/skills/a2h-spec-generate/test/publication-verdict.test.mjs +157 -0
- package/skills/a2h-spec-generate/test/publish-specs.test.mjs +282 -0
- package/skills/a2h-spec-generate/test/render-tasks.test.mjs +593 -0
- package/skills/a2h-utg-explorer/SKILL.md +120 -0
- package/skills/a2h-utg-explorer/assets/final_viewer.html +64 -0
- package/skills/a2h-utg-explorer/assets/u2.LICENSE +21 -0
- package/skills/a2h-utg-explorer/assets/u2.NOTICE +25 -0
- package/skills/a2h-utg-explorer/assets/u2.jar +0 -0
- package/skills/a2h-utg-explorer/references/architecture.md +270 -0
- package/skills/a2h-utg-explorer/references/protocol.md +9 -0
- package/skills/a2h-utg-explorer/scripts/app_settings.mjs +143 -0
- package/skills/a2h-utg-explorer/scripts/audit.mjs +167 -0
- package/skills/a2h-utg-explorer/scripts/close_phases.mjs +66 -0
- package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +749 -0
- package/skills/a2h-utg-explorer/scripts/d_prereqs.mjs +597 -0
- package/skills/a2h-utg-explorer/scripts/device_health.mjs +227 -0
- package/skills/a2h-utg-explorer/scripts/direct_launch.mjs +276 -0
- package/skills/a2h-utg-explorer/scripts/evidence.mjs +108 -0
- package/skills/a2h-utg-explorer/scripts/final_utg.mjs +376 -0
- package/skills/a2h-utg-explorer/scripts/hint_check.mjs +89 -0
- package/skills/a2h-utg-explorer/scripts/plan.mjs +258 -0
- package/skills/a2h-utg-explorer/scripts/promote_dynamic.mjs +170 -0
- package/skills/a2h-utg-explorer/scripts/recover.mjs +467 -0
- package/skills/a2h-utg-explorer/scripts/recover_b.mjs +542 -0
- package/skills/a2h-utg-explorer/scripts/recover_d.mjs +302 -0
- package/skills/a2h-utg-explorer/scripts/rejudge.mjs +203 -0
- package/skills/a2h-utg-explorer/scripts/report.mjs +143 -0
- package/skills/a2h-utg-explorer/scripts/run_cycle.mjs +831 -0
- package/skills/a2h-utg-explorer/scripts/run_device.mjs +137 -0
- package/skills/a2h-utg-explorer/scripts/tests/attest.test.mjs +66 -0
- package/skills/a2h-utg-explorer/scripts/tests/chain.test.mjs +45 -0
- package/skills/a2h-utg-explorer/scripts/tests/compose_identity.test.mjs +207 -0
- package/skills/a2h-utg-explorer/scripts/tests/coverage_rules.test.mjs +104 -0
- package/skills/a2h-utg-explorer/scripts/tests/d_prereqs.test.mjs +223 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_health.test.mjs +88 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_lock_retry.test.mjs +187 -0
- package/skills/a2h-utg-explorer/scripts/tests/direct_launch.test.mjs +130 -0
- package/skills/a2h-utg-explorer/scripts/tests/explorer_review_fixes.test.mjs +136 -0
- package/skills/a2h-utg-explorer/scripts/tests/final_utg.test.mjs +135 -0
- package/skills/a2h-utg-explorer/scripts/tests/first_round_phases.test.mjs +16 -0
- package/skills/a2h-utg-explorer/scripts/tests/generalization_fixes.test.mjs +251 -0
- package/skills/a2h-utg-explorer/scripts/tests/hint_check.test.mjs +42 -0
- package/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +162 -0
- package/skills/a2h-utg-explorer/scripts/tests/node_coverage.test.mjs +193 -0
- package/skills/a2h-utg-explorer/scripts/tests/overflow_prefix.test.mjs +204 -0
- package/skills/a2h-utg-explorer/scripts/tests/page_identity_tiers.test.mjs +355 -0
- package/skills/a2h-utg-explorer/scripts/tests/pipeline.test.mjs +240 -0
- package/skills/a2h-utg-explorer/scripts/tests/recover.test.mjs +212 -0
- package/skills/a2h-utg-explorer/scripts/tests/recover_b.test.mjs +173 -0
- package/skills/a2h-utg-explorer/scripts/tests/recover_d.test.mjs +207 -0
- package/skills/a2h-utg-explorer/scripts/tests/review_fixes.test.mjs +213 -0
- package/skills/a2h-utg-explorer/scripts/tests/robustness_fixes.test.mjs +345 -0
- package/skills/a2h-utg-explorer/scripts/tests/run_cycle.test.mjs +453 -0
- package/skills/a2h-utg-explorer/scripts/tests/runner_capabilities.test.mjs +131 -0
- package/skills/a2h-utg-explorer/scripts/tests/scope.test.mjs +229 -0
- package/skills/a2h-utg-explorer/scripts/tests/scroll_sweep.test.mjs +321 -0
- package/skills/a2h-utg-explorer/scripts/tests/semantics.test.mjs +102 -0
- package/skills/a2h-utg-explorer/scripts/tests/twin_opener.test.mjs +119 -0
- package/skills/a2h-utg-explorer/scripts/tests/u2_backend.test.mjs +346 -0
- package/skills/a2h-utg-explorer/scripts/tests/ui_state_anchors.test.mjs +112 -0
- package/skills/a2h-utg-explorer/scripts/tests/variant_strings.test.mjs +63 -0
- package/skills/a2h-utg-explorer/scripts/tests/worklist_parts.test.mjs +24 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/_device_io.mjs +244 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/_py.mjs +2097 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/adapters.mjs +1213 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/attest.mjs +63 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/chain.mjs +63 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/coverage.mjs +89 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/device_lock.mjs +46 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +1136 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +1513 -0
- package/skills/a2h-utg-explorer/scripts/variant.mjs +75 -0
- package/skills/a2h-utg-explorer/scripts/worklist_parts.mjs +122 -0
- package/skills/a2h-utg-static/SKILL.md +361 -0
- package/skills/a2h-utg-static/config.json +19 -0
- package/skills/a2h-utg-static/references/extractors.md +217 -0
- package/skills/a2h-utg-static/references/ui-elements-static-utg-schema.md +248 -0
- package/skills/a2h-utg-static/references/view-interactions.md +215 -0
- package/skills/a2h-utg-static/scripts/_graph.mjs +361 -0
- package/skills/a2h-utg-static/scripts/_py.mjs +2177 -0
- package/skills/a2h-utg-static/scripts/_spawn.mjs +45 -0
- package/skills/a2h-utg-static/scripts/activity_nav.mjs +738 -0
- package/skills/a2h-utg-static/scripts/activity_widgets.mjs +254 -0
- package/skills/a2h-utg-static/scripts/adapter_nav.mjs +229 -0
- package/skills/a2h-utg-static/scripts/androidfragment_nav.mjs +208 -0
- package/skills/a2h-utg-static/scripts/assemble.mjs +2065 -0
- package/skills/a2h-utg-static/scripts/audit.mjs +268 -0
- package/skills/a2h-utg-static/scripts/carry_answers.mjs +201 -0
- package/skills/a2h-utg-static/scripts/click_paths.mjs +594 -0
- package/skills/a2h-utg-static/scripts/compose_body_text.mjs +172 -0
- package/skills/a2h-utg-static/scripts/compose_merge.mjs +263 -0
- package/skills/a2h-utg-static/scripts/compose_nav.mjs +1216 -0
- package/skills/a2h-utg-static/scripts/compose_navbar_nav.mjs +238 -0
- package/skills/a2h-utg-static/scripts/compose_overlay.mjs +2760 -0
- package/skills/a2h-utg-static/scripts/compose_titles.mjs +365 -0
- package/skills/a2h-utg-static/scripts/compose_widgets.mjs +498 -0
- package/skills/a2h-utg-static/scripts/dialog_listener_nav.mjs +237 -0
- package/skills/a2h-utg-static/scripts/dialogshow_nav.mjs +308 -0
- package/skills/a2h-utg-static/scripts/fragfactory_nav.mjs +170 -0
- package/skills/a2h-utg-static/scripts/fragment_nav.mjs +1136 -0
- package/skills/a2h-utg-static/scripts/guard_subjects.mjs +162 -0
- package/skills/a2h-utg-static/scripts/hg_query.mjs +137 -0
- package/skills/a2h-utg-static/scripts/host_resolve.mjs +393 -0
- package/skills/a2h-utg-static/scripts/hybrid_bundle.mjs +165 -0
- package/skills/a2h-utg-static/scripts/hybrid_pages.mjs +713 -0
- package/skills/a2h-utg-static/scripts/hybrid_scope.mjs +660 -0
- package/skills/a2h-utg-static/scripts/interaction_sites.mjs +267 -0
- package/skills/a2h-utg-static/scripts/io_utils.mjs +59 -0
- package/skills/a2h-utg-static/scripts/label_resolve.mjs +864 -0
- package/skills/a2h-utg-static/scripts/launch_extras.mjs +91 -0
- package/skills/a2h-utg-static/scripts/layout_resolve.mjs +148 -0
- package/skills/a2h-utg-static/scripts/manifest.mjs +483 -0
- package/skills/a2h-utg-static/scripts/measure/measure_corpus.mjs +297 -0
- package/skills/a2h-utg-static/scripts/measure/measure_guards.mjs +98 -0
- package/skills/a2h-utg-static/scripts/media_browse_nav.mjs +356 -0
- package/skills/a2h-utg-static/scripts/menu_nav.mjs +603 -0
- package/skills/a2h-utg-static/scripts/navactions_nav.mjs +255 -0
- package/skills/a2h-utg-static/scripts/nl_hints.mjs +453 -0
- package/skills/a2h-utg-static/scripts/orphan_overlay_nav.mjs +89 -0
- package/skills/a2h-utg-static/scripts/phase_plan.mjs +108 -0
- package/skills/a2h-utg-static/scripts/phase_planner.mjs +119 -0
- package/skills/a2h-utg-static/scripts/plaindialog_nav.mjs +411 -0
- package/skills/a2h-utg-static/scripts/preference_nav.mjs +761 -0
- package/skills/a2h-utg-static/scripts/preference_widgets.mjs +142 -0
- package/skills/a2h-utg-static/scripts/presenter_nav.mjs +490 -0
- package/skills/a2h-utg-static/scripts/registry_nav.mjs +288 -0
- package/skills/a2h-utg-static/scripts/run_pipeline.mjs +870 -0
- package/skills/a2h-utg-static/scripts/scope_utils.mjs +430 -0
- package/skills/a2h-utg-static/scripts/screen_merge.mjs +287 -0
- package/skills/a2h-utg-static/scripts/screen_nav.mjs +279 -0
- package/skills/a2h-utg-static/scripts/single_host_nav.mjs +291 -0
- package/skills/a2h-utg-static/scripts/starter_nav.mjs +198 -0
- package/skills/a2h-utg-static/scripts/state_guard.mjs +579 -0
- package/skills/a2h-utg-static/scripts/static_prior.mjs +904 -0
- package/skills/a2h-utg-static/scripts/tests/_zipw.mjs +28 -0
- package/skills/a2h-utg-static/scripts/tests/probe_autoload.mjs +108 -0
- package/skills/a2h-utg-static/scripts/tests/probe_layout_fragments.mjs +90 -0
- package/skills/a2h-utg-static/scripts/tests/probe_unknown_scope.mjs +61 -0
- package/skills/a2h-utg-static/scripts/tests/regression_matrix.mjs +1261 -0
- package/skills/a2h-utg-static/scripts/tests/test_activity_alias_launcher.mjs +90 -0
- package/skills/a2h-utg-static/scripts/tests/test_activity_supertype_chain.mjs +106 -0
- package/skills/a2h-utg-static/scripts/tests/test_bottom_sheet_container.mjs +58 -0
- package/skills/a2h-utg-static/scripts/tests/test_branch_guard.mjs +19 -0
- package/skills/a2h-utg-static/scripts/tests/test_callee_string_default.mjs +30 -0
- package/skills/a2h-utg-static/scripts/tests/test_carry_answers.mjs +103 -0
- package/skills/a2h-utg-static/scripts/tests/test_chrome_tokens.mjs +60 -0
- package/skills/a2h-utg-static/scripts/tests/test_commented_out_trigger.mjs +111 -0
- package/skills/a2h-utg-static/scripts/tests/test_commit_scope.mjs +113 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_file_private_route.mjs +117 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_nested_graph.mjs +166 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_route_holder_collision.mjs +112 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_vm_nav.mjs +267 -0
- package/skills/a2h-utg-static/scripts/tests/test_custom_source_root.mjs +71 -0
- package/skills/a2h-utg-static/scripts/tests/test_defensive_null_guard.mjs +77 -0
- package/skills/a2h-utg-static/scripts/tests/test_dialog_orphan_entries.mjs +99 -0
- package/skills/a2h-utg-static/scripts/tests/test_dialog_page_owner.mjs +69 -0
- package/skills/a2h-utg-static/scripts/tests/test_dialogshow_builder_forms.mjs +96 -0
- package/skills/a2h-utg-static/scripts/tests/test_dialogshow_java_factory.mjs +37 -0
- package/skills/a2h-utg-static/scripts/tests/test_disabled_guard.mjs +42 -0
- package/skills/a2h-utg-static/scripts/tests/test_drawer_panel_gesture.mjs +140 -0
- package/skills/a2h-utg-static/scripts/tests/test_edge_dedupe_by_gesture.mjs +111 -0
- package/skills/a2h-utg-static/scripts/tests/test_edge_provenance_lint.mjs +70 -0
- package/skills/a2h-utg-static/scripts/tests/test_enclosing_gesture.mjs +69 -0
- package/skills/a2h-utg-static/scripts/tests/test_external_surface_roots.mjs +43 -0
- package/skills/a2h-utg-static/scripts/tests/test_find_package_indirect.mjs +67 -0
- package/skills/a2h-utg-static/scripts/tests/test_forwarding_wrapper.mjs +38 -0
- package/skills/a2h-utg-static/scripts/tests/test_fragment_containment.mjs +85 -0
- package/skills/a2h-utg-static/scripts/tests/test_fragment_helper_trigger.mjs +92 -0
- package/skills/a2h-utg-static/scripts/tests/test_graph.mjs +55 -0
- package/skills/a2h-utg-static/scripts/tests/test_guard_clause.mjs +86 -0
- package/skills/a2h-utg-static/scripts/tests/test_hint_language.mjs +119 -0
- package/skills/a2h-utg-static/scripts/tests/test_host_kind_by_chain.mjs +68 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_bundle_attribution.mjs +74 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_bundled_pages.mjs +181 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +293 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_title_renders.mjs +118 -0
- package/skills/a2h-utg-static/scripts/tests/test_interaction_sites.mjs +272 -0
- package/skills/a2h-utg-static/scripts/tests/test_item_data_instance.mjs +51 -0
- package/skills/a2h-utg-static/scripts/tests/test_kotlin_fn_spans.mjs +69 -0
- package/skills/a2h-utg-static/scripts/tests/test_label_accessor_forms.mjs +187 -0
- package/skills/a2h-utg-static/scripts/tests/test_label_source.mjs +70 -0
- package/skills/a2h-utg-static/scripts/tests/test_launch_intent_guard.mjs +67 -0
- package/skills/a2h-utg-static/scripts/tests/test_layout_declared_fragment.mjs +103 -0
- package/skills/a2h-utg-static/scripts/tests/test_listener_call_forms.mjs +79 -0
- package/skills/a2h-utg-static/scripts/tests/test_listener_receiver_binding.mjs +47 -0
- package/skills/a2h-utg-static/scripts/tests/test_manifest_exported_default.mjs +40 -0
- package/skills/a2h-utg-static/scripts/tests/test_manifest_filters_modules.mjs +84 -0
- package/skills/a2h-utg-static/scripts/tests/test_manifest_srcfile.mjs +68 -0
- package/skills/a2h-utg-static/scripts/tests/test_mode_and_cb_param.mjs +172 -0
- package/skills/a2h-utg-static/scripts/tests/test_module_namespace.mjs +33 -0
- package/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +44 -0
- package/skills/a2h-utg-static/scripts/tests/test_multiple_entry_contracts.mjs +80 -0
- package/skills/a2h-utg-static/scripts/tests/test_nav_graph_xml.mjs +35 -0
- package/skills/a2h-utg-static/scripts/tests/test_nl_hint_grammar.mjs +42 -0
- package/skills/a2h-utg-static/scripts/tests/test_nl_hints_gate.mjs +85 -0
- package/skills/a2h-utg-static/scripts/tests/test_node_id_collision.mjs +57 -0
- package/skills/a2h-utg-static/scripts/tests/test_non_gesture_step_flag.mjs +62 -0
- package/skills/a2h-utg-static/scripts/tests/test_out_of_scope_and_settings.mjs +72 -0
- package/skills/a2h-utg-static/scripts/tests/test_overload_and_climb.mjs +86 -0
- package/skills/a2h-utg-static/scripts/tests/test_pager_page_source.mjs +78 -0
- package/skills/a2h-utg-static/scripts/tests/test_pager_position_zero.mjs +65 -0
- package/skills/a2h-utg-static/scripts/tests/test_pager_variant_guard.mjs +172 -0
- package/skills/a2h-utg-static/scripts/tests/test_pipeline_llm_phases.mjs +107 -0
- package/skills/a2h-utg-static/scripts/tests/test_plain_dialog_nodes.mjs +167 -0
- package/skills/a2h-utg-static/scripts/tests/test_plaindialog_shared_anchor.mjs +117 -0
- package/skills/a2h-utg-static/scripts/tests/test_preference_click_nav.mjs +98 -0
- package/skills/a2h-utg-static/scripts/tests/test_preference_host_binding.mjs +87 -0
- package/skills/a2h-utg-static/scripts/tests/test_preference_nesting.mjs +183 -0
- package/skills/a2h-utg-static/scripts/tests/test_preference_widgets.mjs +48 -0
- package/skills/a2h-utg-static/scripts/tests/test_read_text_crlf.mjs +41 -0
- package/skills/a2h-utg-static/scripts/tests/test_resolver_tier_parity.mjs +126 -0
- package/skills/a2h-utg-static/scripts/tests/test_result_launcher.mjs +142 -0
- package/skills/a2h-utg-static/scripts/tests/test_review_fixes.mjs +135 -0
- package/skills/a2h-utg-static/scripts/tests/test_route_token_words.mjs +66 -0
- package/skills/a2h-utg-static/scripts/tests/test_same_name_decl_scope.mjs +236 -0
- package/skills/a2h-utg-static/scripts/tests/test_scope_utils.mjs +85 -0
- package/skills/a2h-utg-static/scripts/tests/test_sealed_dialog_state.mjs +148 -0
- package/skills/a2h-utg-static/scripts/tests/test_shared_overlay_split.mjs +63 -0
- package/skills/a2h-utg-static/scripts/tests/test_slug_parity.mjs +58 -0
- package/skills/a2h-utg-static/scripts/tests/test_starter_node_id.mjs +41 -0
- package/skills/a2h-utg-static/scripts/tests/test_state_guard_arity.mjs +109 -0
- package/skills/a2h-utg-static/scripts/tests/test_state_guard_commented_candidates.mjs +68 -0
- package/skills/a2h-utg-static/scripts/tests/test_state_guard_model_gates.mjs +127 -0
- package/skills/a2h-utg-static/scripts/tests/test_state_specific_hop.mjs +130 -0
- package/skills/a2h-utg-static/scripts/tests/test_synthetic_label_identity.mjs +51 -0
- package/skills/a2h-utg-static/scripts/tests/test_template_method_layout.mjs +81 -0
- package/skills/a2h-utg-static/scripts/tests/test_template_title.mjs +58 -0
- package/skills/a2h-utg-static/scripts/tests/test_trigger_id_spelling.mjs +68 -0
- package/skills/a2h-utg-static/scripts/tests/test_ui_elements_action_override.mjs +91 -0
- package/skills/a2h-utg-static/scripts/tests/test_ui_elements_flow_filter.mjs +110 -0
- package/skills/a2h-utg-static/scripts/tests/test_ui_elements_nl_hint_key.mjs +89 -0
- package/skills/a2h-utg-static/scripts/tests/test_uiless_host_fold.mjs +98 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +231 -0
- package/skills/a2h-utg-static/scripts/tests/test_view_click_refs.mjs +104 -0
- package/skills/a2h-utg-static/scripts/tests/test_view_id_label.mjs +69 -0
- package/skills/a2h-utg-static/scripts/tests/test_view_interactions.mjs +346 -0
- package/skills/a2h-utg-static/scripts/tests/test_viewpage_nav.mjs +273 -0
- package/skills/a2h-utg-static/scripts/tests/test_vm_nav_helper_navigate.mjs +98 -0
- package/skills/a2h-utg-static/scripts/tests/test_widget_class_scope.mjs +92 -0
- package/skills/a2h-utg-static/scripts/tests/test_window_nav_kotlin.mjs +158 -0
- package/skills/a2h-utg-static/scripts/tests/test_worklist_parts.mjs +65 -0
- package/skills/a2h-utg-static/scripts/uniapp_nav.mjs +1119 -0
- package/skills/a2h-utg-static/scripts/uniapp_widgets.mjs +244 -0
- package/skills/a2h-utg-static/scripts/utg_html.mjs +721 -0
- package/skills/a2h-utg-static/scripts/view_interactions.mjs +799 -0
- package/skills/a2h-utg-static/scripts/view_widgets.mjs +512 -0
- package/skills/a2h-utg-static/scripts/viewpage_nav.mjs +485 -0
- package/skills/a2h-utg-static/scripts/vm_nav.mjs +422 -0
- package/skills/a2h-utg-static/scripts/window_nav.mjs +240 -0
- package/skills/a2h-utg-static/scripts/worklist_parts.mjs +154 -0
- package/skills/a2h-utg-static/tools/convert_static_utg_to_ui_elements.ts +769 -0
- package/skills/a2h-utg-static/tools/package.json +3 -0
- package/README.md +0 -445
- package/agents/logic-coder.md +0 -224
- package/agents/logic-context-builder.md +0 -212
- package/agents/scripts/hmos-precheck/backends/arkts.mjs +0 -567
- package/agents/scripts/hmos-precheck/backends/arkts_diff.mjs +0 -159
- package/agents/scripts/hmos-precheck/backends/arkts_project_rules.mjs +0 -398
- package/agents/scripts/hmos-precheck/backends/codelinter.mjs +0 -250
- package/agents/scripts/hmos-precheck/backends/project_integrity.mjs +0 -321
- package/agents/scripts/hmos-precheck/backends/static_precheck.mjs +0 -247
- package/agents/scripts/hmos-precheck/core/config.mjs +0 -184
- package/agents/scripts/hmos-precheck/core/diagnostic_scope.mjs +0 -20
- package/agents/scripts/hmos-precheck/core/process_adapter.mjs +0 -47
- package/agents/scripts/hmos-precheck/core/project_catalog.mjs +0 -50
- package/agents/scripts/hmos-precheck/core/result_projection.mjs +0 -147
- package/agents/scripts/hmos-precheck/core/scope_plan.mjs +0 -131
- package/agents/scripts/hmos-precheck/core/sdk_context.mjs +0 -67
- package/agents/scripts/hmos-precheck/docs/architecture.md +0 -37
- package/agents/scripts/hmos-precheck/docs/performance-optimization.md +0 -28
- package/agents/scripts/hmos-precheck/docs/upstream-reference.json +0 -19
- package/agents/scripts/hmos-precheck/docs/validation.md +0 -50
- package/agents/scripts/hmos-precheck/index.mjs +0 -17
- package/agents/scripts/hmos-precheck/invocation.mjs +0 -231
- package/agents/scripts/hmos-precheck/rules/rule_case_matrix.csv +0 -32
- package/agents/scripts/hmos-precheck/rules/rule_inventory.csv +0 -64
- package/agents/scripts/hmos-precheck/rules/rule_inventory.mjs +0 -59
- package/agents/scripts/hmos-precheck/rules/rule_policy.mjs +0 -54
- package/agents/scripts/platform_query.mjs +0 -626
- package/agents/scripts/platform_query.test.mjs +0 -422
- package/agents/self-test-fixer.md +0 -298
- package/agents/self-tester.md +0 -55
- package/agents/test-case-generation-generator.md +0 -317
- package/agents/test-case-generation-validator.md +0 -231
- package/dist/cli/config-store.js +0 -310
- package/dist/cli/config.js +0 -44
- package/dist/cli/env-vars.js +0 -127
- package/dist/cli/index.js +0 -56
- package/dist/cli/init.js +0 -1187
- package/dist/cli/uninstall.js +0 -427
- package/dist/utils/regex.js +0 -8
- package/env-requirements.json +0 -179
- package/resource/choose_editor.png +0 -0
- package/resource/convert_pipeline_process.svg +0 -103
- package/resource/project_architecture.svg +0 -122
- package/resource/set_environment.png +0 -0
- package/resource/set_multimodel.png +0 -0
- package/resource/set_sdk.png +0 -0
- package/resource/title_dark.png +0 -0
- package/skills/hmos-batch-ui-align/SKILL.md +0 -413
- package/skills/hmos-batch-ui-align/scripts/arkts_static_check.ts +0 -1592
- package/skills/hmos-batch-ui-align/scripts/measure_pack.ts +0 -752
- package/skills/hmos-convert-pipeline/SKILL.md +0 -486
- package/skills/hmos-incremental-ui-align/README.md +0 -251
- package/skills/hmos-incremental-ui-align/SKILL.md +0 -375
- package/skills/hmos-incremental-ui-align/diff_analysis.md +0 -53
- package/skills/hmos-incremental-ui-align/page_align.md +0 -62
- package/skills/hmos-incremental-ui-align/references/Comparison_Template.md +0 -38
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Link/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/217/214/345/220/221/345/220/214/346/255/245.md +0 -648
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Observed/350/243/205/351/245/260/345/231/250/345/222/214@ObjectLink/350/243/205/351/245/260/345/231/250/357/274/232/345/265/214/345/245/227/347/261/273/345/257/271/350/261/241/345/261/236/346/200/247/345/217/230/345/214/226.md +0 -2089
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Prop/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/215/225/345/220/221/345/220/214/346/255/245.md +0 -1033
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Provide/350/243/205/351/245/260/345/231/250/345/222/214@Consume/350/243/205/351/245/260/345/231/250/357/274/232/344/270/216/345/220/216/344/273/243/347/273/204/344/273/266/345/217/214/345/220/221/345/220/214/346/255/245.md +0 -1183
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@State/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/347/212/266/346/200/201.md +0 -576
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Track/350/243/205/351/245/260/345/231/250/357/274/232class/345/257/271/350/261/241/345/261/236/346/200/247/347/272/247/346/233/264/346/226/260.md +0 -297
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Watch/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/346/233/264/346/224/271/351/200/232/347/237/245.md +0 -395
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/AppStorage/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200/347/232/204UI/347/212/266/346/200/201/345/255/230/345/202/250.md +0 -903
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/Environment/357/274/232/350/256/276/345/244/207/347/216/257/345/242/203/346/237/245/350/257/242.md +0 -106
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/LocalStorage/357/274/232/351/241/265/351/235/242/347/272/247UI/347/212/266/346/200/201/345/255/230/345/202/250.md +0 -1178
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/MVVM/346/250/241/345/274/217V1.md +0 -911
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/PersistentStorage/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md +0 -355
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243//347/256/241/347/220/206/345/272/224/347/224/250/346/213/245/346/234/211/347/232/204/347/212/266/346/200/201/346/246/202/350/277/260.md +0 -11
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/!!/350/257/255/346/263/225/357/274/232/345/217/214/345/220/221/347/273/221/345/256/232.md +0 -206
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Computed/350/243/205/351/245/260/345/231/250/357/274/232/350/256/241/347/256/227/345/261/236/346/200/247.md +0 -373
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Event/350/243/205/351/245/260/345/231/250/357/274/232/350/247/204/350/214/203/347/273/204/344/273/266/350/276/223/345/207/272.md +0 -158
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Local/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/351/203/250/347/212/266/346/200/201.md +0 -750
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Monitor/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/344/277/256/346/224/271/345/274/202/346/255/245/347/233/221/345/220/254.md +0 -1704
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@ObservedV2/350/243/205/351/245/260/345/231/250/345/222/214@Trace/350/243/205/351/245/260/345/231/250/357/274/232/347/261/273/345/261/236/346/200/247/345/217/230/345/214/226/350/247/202/346/265/213.md +0 -1012
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Once/350/243/205/351/245/260/345/231/250/357/274/232/345/210/235/345/247/213/345/214/226/345/220/214/346/255/245/344/270/200/346/254/241.md +0 -164
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Param/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/244/226/351/203/250/350/276/223/345/205/245.md +0 -840
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Provider/350/243/205/351/245/260/345/231/250/345/222/214@Consumer/350/243/205/351/245/260/345/231/250/357/274/232/350/267/250/347/273/204/344/273/266/345/261/202/347/272/247/345/217/214/345/220/221/345/220/214/346/255/245.md +0 -856
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Type/350/243/205/351/245/260/345/231/250/357/274/232/346/240/207/350/256/260/347/261/273/345/261/236/346/200/247/347/232/204/347/261/273/345/236/213.md +0 -83
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/AppStorageV2/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200UI/347/212/266/346/200/201/345/255/230/345/202/250.md +0 -294
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/PersistenceV2/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md +0 -1220
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/_/350/214/203/345/274/217/351/200/211/346/213/251/350/257/264/346/230/216.md +0 -47
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2//347/212/266/346/200/201/347/256/241/347/220/206V1/345/220/221V2/350/277/201/347/247/273/344/270/216/346/267/267/347/224/250/346/214/207/345/257/274.md +0 -840
- package/skills/hmos-incremental-ui-align/references/State_Model_Template.md +0 -74
- package/skills/hmos-incremental-ui-align/references/UI_Analysis_Template.md +0 -34
- package/skills/hmos-incremental-ui-align/references/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +0 -2533
- package/skills/hmos-incremental-ui-align/references/android-to-harmonyOS-ui-interaction-mapping-reference.md +0 -555
- package/skills/hmos-incremental-ui-align/references/android-to-harmonyOS-ui-layout-mapping-reference.md +0 -117
- package/skills/hmos-incremental-ui-align/scripts/app_feature_verify.ts +0 -937
- package/skills/hmos-incremental-ui-align/scripts/extract_checklist.ts +0 -343
- package/skills/hmos-incremental-ui-align/scripts/navigation-capure.md +0 -76
- package/skills/hmos-incremental-ui-align/scripts/page_capture.ts +0 -977
- package/skills/hmos-incremental-ui-align/scripts/page_capture_burst.ts +0 -188
- package/skills/hmos-integration-test/README.md +0 -341
- package/skills/hmos-integration-test/SKILL.md +0 -464
- package/skills/hmos-integration-test/scripts/report-tool.ts +0 -791
- package/skills/hmos-integration-test/scripts/resolve-metadata-tool.ts +0 -125
- package/skills/hmos-integration-test/scripts/self-test-runner.ts +0 -756
- package/skills/hmos-integration-test/scripts/testcases-tool.ts +0 -239
- package/skills/hmos-resources-convert/SKILL.md +0 -891
- package/skills/hmos-spec-generate/SKILL.md +0 -404
- package/skills/hmos-test-case-generation/README.md +0 -241
- package/skills/hmos-test-case-generation/SKILL.md +0 -324
- package/skills/hmos-test-case-generation/references/contract.md +0 -315
- package/skills/hmos-test-case-generation/references/review-notes-template.md +0 -84
- package/skills/hmos-test-case-generation/references/ui-elements-schema.md +0 -142
- package/skills/hmos-test-case-generation/tools/convert_to_ui_elements.ts +0 -550
- package/skills/hmos-test-case-generation/tools/validate.ts +0 -1312
- package/tools/bfs-crawl/README.md +0 -73
- package/tools/bfs-crawl/android_viewtree_bfs_crawler.ts +0 -1662
- /package/skills/{hmos-batch-ui-align/references/mvvm-v2/MVVM/346/250/241/345/274/217/357/274/210V2/357/274/211.md" → a2h-arch-generate/references/arkts-mvvm-v2.md} +0 -0
- /package/{README.en.md → skills/a2h-arch-generate/scripts/module_create/har/consumer-rules.txt} +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/@Link/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/217/214/345/220/221/345/220/214/346/255/245.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/@Observed/350/243/205/351/245/260/345/231/250/345/222/214@ObjectLink/350/243/205/351/245/260/345/231/250/357/274/232/345/265/214/345/245/227/347/261/273/345/257/271/350/261/241/345/261/236/346/200/247/345/217/230/345/214/226.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/@Prop/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/215/225/345/220/221/345/220/214/346/255/245.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/@Provide/350/243/205/351/245/260/345/231/250/345/222/214@Consume/350/243/205/351/245/260/345/231/250/357/274/232/344/270/216/345/220/216/344/273/243/347/273/204/344/273/266/345/217/214/345/220/221/345/220/214/346/255/245.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/@State/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/347/212/266/346/200/201.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/@Track/350/243/205/351/245/260/345/231/250/357/274/232class/345/257/271/350/261/241/345/261/236/346/200/247/347/272/247/346/233/264/346/226/260.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/@Watch/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/346/233/264/346/224/271/351/200/232/347/237/245.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/AppStorage/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200/347/232/204UI/347/212/266/346/200/201/345/255/230/345/202/250.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/Environment/357/274/232/350/256/276/345/244/207/347/216/257/345/242/203/346/237/245/350/257/242.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/LocalStorage/357/274/232/351/241/265/351/235/242/347/272/247UI/347/212/266/346/200/201/345/255/230/345/202/250.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/MVVM/346/250/241/345/274/217/357/274/210V1/357/274/211.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/PersistentStorage/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm//347/256/241/347/220/206/345/272/224/347/224/250/346/213/245/346/234/211/347/232/204/347/212/266/346/200/201/346/246/202/350/277/260.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/!!/350/257/255/346/263/225/357/274/232/345/217/214/345/220/221/347/273/221/345/256/232.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Computed/350/243/205/351/245/260/345/231/250/357/274/232/350/256/241/347/256/227/345/261/236/346/200/247.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Event/350/243/205/351/245/260/345/231/250/357/274/232/350/247/204/350/214/203/347/273/204/344/273/266/350/276/223/345/207/272.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Local/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/351/203/250/347/212/266/346/200/201.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Monitor/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/344/277/256/346/224/271/345/274/202/346/255/245/347/233/221/345/220/254.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@ObservedV2/350/243/205/351/245/260/345/231/250/345/222/214@Trace/350/243/205/351/245/260/345/231/250/357/274/232/347/261/273/345/261/236/346/200/247/345/217/230/345/214/226/350/247/202/346/265/213.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Once/350/243/205/351/245/260/345/231/250/357/274/232/345/210/235/345/247/213/345/214/226/345/220/214/346/255/245/344/270/200/346/254/241.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Param/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/244/226/351/203/250/350/276/223/345/205/245.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Provider/350/243/205/351/245/260/345/231/250/345/222/214@Consumer/350/243/205/351/245/260/345/231/250/357/274/232/350/267/250/347/273/204/344/273/266/345/261/202/347/272/247/345/217/214/345/220/221/345/220/214/346/255/245.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Type/350/243/205/351/245/260/345/231/250/357/274/232/346/240/207/350/256/260/347/261/273/345/261/236/346/200/247/347/232/204/347/261/273/345/236/213.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/AppStorageV2/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200UI/347/212/266/346/200/201/345/255/230/345/202/250.md" +0 -0
- /package/skills/{hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2 → a2h-batch-ui-align/references/mvvm-v2}/MVVM/346/250/241/345/274/217/357/274/210V2/357/274/211.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/PersistenceV2/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/_/350/214/203/345/274/217/351/200/211/346/213/251/350/257/264/346/230/216.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/_/350/243/205/351/245/260/345/231/250/351/200/237/346/237/245.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2//347/212/266/346/200/201/347/256/241/347/220/206V1/345/220/221V2/350/277/201/347/247/273/344/270/216/346/267/267/347/224/250/346/214/207/345/257/274.md" +0 -0
- /package/skills/{hmos-fix-build-errors → a2h-fix-build-errors}/references/arkts-strict-patterns.md +0 -0
- /package/skills/{hmos-fix-build-errors → a2h-fix-build-errors}/references/known-patterns.md +0 -0
- /package/skills/{hmos-fix-build-errors → a2h-fix-build-errors}/references/rdb-entity-pattern.md +0 -0
- /package/skills/{hmos-resources-convert → a2h-resource-convert}/references/dependency-analysis-rules.md +0 -0
- /package/skills/{hmos-resources-convert → a2h-resource-convert}/scripts/svg_fidelity_check.ts +0 -0
- /package/skills/{hmos-spec-generate → a2h-spec-generate}/template/REQ.txt +0 -0
- /package/skills/{hmos-spec-generate → a2h-spec-generate}/template/REQ.xlsx +0 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: a2h-utg-explorer
|
|
3
|
+
description: Build a state-aware Android UTG by compiling a static UTG into phased obligations, running deterministic or external explorers, and merging only evidence-backed observations and transitions. Use for maximum page/edge coverage across login, permission, empty/populated, network, and device states.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Android UTG Explorer
|
|
7
|
+
|
|
8
|
+
Use this skill after `a2h-utg-static` (or with an existing static `utg.json`). It is an orchestrator, not a page-specific crawler.
|
|
9
|
+
|
|
10
|
+
## Run it end to end, without pausing
|
|
11
|
+
|
|
12
|
+
The first round and every recovery class (A → retry → B/C → adopt → D → direct launch → report) run as ONE uninterrupted cycle. Never stop between stages to ask the user whether to continue; stop only for a genuine blocker (an account, another build, hardware). Drive it with:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
node scripts/run_cycle.mjs <campaign> --config <config.json> --static <utg.json> \
|
|
16
|
+
--project <src> --package <app id> [--part-size 8] [--budget-per-task 6] [--max-rounds 2] [--skip D] [--later-rounds direct|all] [--review overlap|serial] [--retry-failed]
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Stdout JSON appears only when the call ends; follow a running call in `<campaign>/cycle_progress.jsonl` (one JSON line per stage start/end, device phase start/end with its result, and call start/end/failure).
|
|
20
|
+
|
|
21
|
+
All stages, D included, run by default without asking the user. D needs `config.snapshot_dir` (and, for recipes that add feeds or other served files, `fixture_server_dir`, with `scripts/d_prereqs.mjs serve <dir> --config <config.json>` running: it picks the port, writes `fixture_server_url` for the device, sets up `adb reverse` on a real device, and `d_prereqs.mjs check` / `release` confirm it is up and drop the reverse afterwards); the cycle takes the base snapshot itself with `d_prereqs.mjs snapshot` when the directory has none (a `.tar` via `run-as` for a debuggable build, otherwise a `.replay.json` step chain rebuilt by `pm clear` + replay; see architecture.md), and skips D with a recorded reason when `snapshot_dir` is unset. `--skip D` (or `direct`) is an opt-out: it marks that stage done without running it and lists it under `skipped` in the output, for a run where the user has asked not to change app data.
|
|
22
|
+
|
|
23
|
+
Each call advances as far as existing answers allow. It prints `waiting`: the worklist parts that still need answers, each with the `answers` path its reviewer must write. Reviews overlap (`--review overlap`, the default). Every stage of the round is extracted up front, so `waiting` lists the parts of **all** of them at once. The stages still apply and run on the device in order. `blocked_on` names the worklists the next stage needs. Then, immediately:
|
|
24
|
+
|
|
25
|
+
1. Dispatch one parallel reviewer agent per waiting part not yet dispatched (all in one message), the parts of `blocked_on` first. Tell each to copy every item's `key` verbatim, to save its answers file (a list, or `{"items": [...]}`) incrementally every ~4 items, and to rely on component trees, opening at most one screenshot per item.
|
|
26
|
+
2. **Watchdog**: a part with no answers file after ~15 minutes, or an agent that ended with a connection error, is re-dispatched (resume the agent, or a new one on the same part) without asking. Dropped connections are normal; plan for them.
|
|
27
|
+
3. Re-run `run_cycle.mjs` as soon as the parts of the `blocked_on` worklists are in, while the other reviewers keep going. It merges, applies, runs the device phases and stops at the next stage that waits. Repeat until it prints `"finished": true`.
|
|
28
|
+
- A stage extracted before the earlier stages' device phases ran is re-extracted once its answers are in. Answers to items still offered are kept as `<x>_answers.seed.json`, and covered items are dropped. Only new items come back in `waiting`.
|
|
29
|
+
- A `waiting` entry with `error` holds answers that do not merge; fix those parts.
|
|
30
|
+
|
|
31
|
+
`--review serial` lists one stage at a time.
|
|
32
|
+
|
|
33
|
+
**Device watchdog.** Before every device phase the cycle runs `scripts/device_health.mjs ensure`. That is a bounded `adb shell echo`, and when the device does not answer it escalates: `adb reconnect`, then an adb server restart, then an emulator restart. Every step has a timeout.
|
|
34
|
+
- The emulator restart happens only when `config.emulator.avd` is set: `emu kill`, a detached cold start (`-no-snapshot-load`) on the same port, then a wait for `sys.boot_completed` within `boot_timeout_s` (300). A real device is never restarted.
|
|
35
|
+
- A phase that died because the device went away runs once more after recovery.
|
|
36
|
+
- A device that never comes back ends the call with `DeviceDown`, and that phase is not marked done. Restart the cycle once the device is back.
|
|
37
|
+
- While another explorer holds the device lock, `ensure` skips every recovery step (reconnect, adb restart, emulator restart would break its run) and reports it busy. The call ends with `DeviceDown` the same way, and a scheduled restart between rounds is skipped and noted.
|
|
38
|
+
- A stage that runs past `UTG_STAGE_TIMEOUT_S` is killed. The cycle then kills what it left running (on Windows: `taskkill /T`, then its orphaned `adb shell` children) and removes the adb forwards it held.
|
|
39
|
+
- `config.emulator.restart_every_h` restarts the emulator between rounds before it degrades. Measured on AntennaPod 10-15: after 9 h the emulator stopped answering, and ~45 min passed before anyone noticed.
|
|
40
|
+
|
|
41
|
+
Never restart the emulator from a foreground shell yourself: `device_health.mjs ensure --config <config.json> [--restart]` does it within a bounded time.
|
|
42
|
+
|
|
43
|
+
**Answers carried across rounds.** At the end of a round, its direct-launch answers that schedule nothing (`skip` and the like) are kept with the item they answered. In the next round an unchanged item is merged from them and offered to no reviewer; `carried` in the cycle state counts them. A `launch` answer is reviewed again, because its node is still uncovered, so the launch failed. An item whose label, kind, `declared_at` or click path changed is reviewed again too. Measured on AntennaPod 10-15: round 2 re-reviewed all 78 items from scratch in 63 min.
|
|
44
|
+
|
|
45
|
+
Phase budgets are sized to their task counts (`--budget-per-task`), so a phase does not stop early and need a rerun. A phase's cleanup never counts against its budget. A device phase that still fails after the first round is recorded under `failed_phases` and skipped, and the rest of its stage runs. `MAX_PHASE_FAILS` (3) failures in a row still end the call. Its `error` keeps the first and last 300 characters. A device lock held by another explorer is waited for (`config.device_lock_wait_s`, default 300 s); one still held ends the call with `DeviceDown` naming the owner (`Another explorer owns this device: pid N, campaign <path>, since <time>`), and the phase is not marked done. Such a phase is never listed in `failed_phases`; a plain re-run of the cycle runs it. Never hand-edit `cycle_state.json`: after a device failure listed in `failed_phases` is fixed, `--retry-failed` runs those phases again at the start of the call, even when their stage is already done, then rebuilds the report. One that fails again is listed again. Every apply and phase is checkpointed in `cycle_state.json`, so a re-run after a crash never re-applies a stage or re-runs a finished phase.
|
|
46
|
+
|
|
47
|
+
The cycle repeats while a round still adds a covered node, up to `--max-rounds`:
|
|
48
|
+
- Round 1 runs A–D and direct launch.
|
|
49
|
+
- Later rounds run direct launch only (`--later-rounds direct`, the default), because a second A–D round has been measured as hours of review for a few captures. `--later-rounds all` repeats A–D in every round.
|
|
50
|
+
|
|
51
|
+
Every pass writes `<campaign>/capture_pending.json`. Its fields are `pending` (the static node ids the cycle can still capture), `reviews` (the answers files it waits on), `final` and `finished`. While a pass runs (`running: true`), `reviews` keeps the list the last finished pass computed (`reviews_at`). Before the last round's direct-launch answers, `pending` lists every uncovered in-scope node; after them, only the nodes answered `launch`. A consumer may treat any node not listed as final.
|
|
52
|
+
|
|
53
|
+
The steps below describe the individual stages that `run_cycle.mjs` runs.
|
|
54
|
+
|
|
55
|
+
1. Create a campaign with `scripts/plan.mjs <static-utg> <campaign-dir> [--environment ...]`. Inspect the generated phase/state plan while writing config.json (fixtures and probes for each phase); this is not a stop to ask the user.
|
|
56
|
+
2. Compile with `scripts/compile_tasks.mjs <static-utg> <campaign-dir> --project <source-project> --locale <device-locale>`. Adjacent click_paths/ui_elements files are loaded automatically.
|
|
57
|
+
Automatic/non-gesture and default-page steps require no selector; tap, long-press, double-tap and bounded screen-swipe steps compile to native actions. A static `trigger_id` compiles as a package-independent Android resource-name selector (the runtime adapter matches the tail of `package:id/name`), so campaigns remain valid across application-id/build variants.
|
|
58
|
+
A `code-name` label is never treated as live text: it must have an explicit NL hint, a real catalog label, or a structural `trigger_id`; otherwise the task is `needs_external` with a precise compile issue. Every `needs_external` task carries `compile_issues` explaining the exact missing evidence. Source-owned Preference rows and dialog titles form an automatic page catalog; no app-specific mapping table is needed for these surfaces.
|
|
59
|
+
Text selectors are emitted in the **device** locale: every static label is mapped through the project's `res/values*/strings.xml` (by its `label_key` when known, else by value) to the `--locale` value, with the original text kept as a fallback candidate — so a static pass that resolved labels in another language still taps the right control.
|
|
60
|
+
Pages that inflate the same layout (`layout-twin`) are resolved by their static opener: if the screen before was verified as a page with an edge to exactly one twin, that twin is verified (`layout-twin-opener`); `rejudge`/`recover apply` re-apply this to recorded evidence.
|
|
61
|
+
Source recovery presses Back only when it can land on the task's source: the source must be a static ancestor of the current verified page (`opened_from`, a menu's owner, a panel's host), and the page must not be one where a Back has already left the app (learned from the event log, so it carries across phases and rounds); otherwise it relaunches directly. A fixture's `snapshot_app_data` / `save_replay` step whose archive already exists (written by an earlier run of the same phase) is kept and skipped, never overwritten.
|
|
62
|
+
3. Configure device serial, package, launch_component, state probes and fixtures in `config.json`. Keep app data in campaign configuration. `page_rules[].family` may name a static node id; a unique positive rule then becomes auditable static mapping evidence. Unknown family ids remain dynamic-only. Never equate an incoming click label with the landing page; unresolved/ambiguous identity remains a gap.
|
|
63
|
+
4. Run `node scripts/run_device.mjs <campaign-dir> --config <config.json> --phase <phase-id> --tasks --budget 50`. Device I/O defaults to the fast path (u2 backend via the bundled `assets/u2.jar`, persistent adb shell, stable-UI settle; no extra install, see architecture.md to opt out). Screenshots always come from `adb exec-out screencap -p`. Keep one device session serialized; every action captures before/after package, window, UI tree, screenshot, and outcome. UIAutomator dumps use bounded retry by default (`ui_dump_retries: 3`, configurable) and verify the remote file before pulling it; transient dump/pull/parse failures are classified separately. Use verified fixtures to enter each phase rather than carrying state between unrelated phases.
|
|
64
|
+
5. Run `scripts/report.mjs <campaign-dir>` for a baseline audit, then perform the recovery cycle below for every unresolved obligation. Do not stop at the first report or treat a screenshot count as page coverage.
|
|
65
|
+
6. Supplement remaining gaps with `scripts/variant.mjs <campaign-dir> <variant.json> --config <config.json>`: verified fixtures, selected targets, bounded discovery routes, and explicit cleanup. For generic discovery, opt in with `discovery.enabled`, finite depth/state/action bounds, and positive `allow_actions` rules; unlisted actions are denied unless `allow_unlisted_actions` is explicitly true. Discovered endpoints remain separate from confirmed static edges. External adapters must emit `utg-event/1`; replay imported discoveries before confirming edges.
|
|
66
|
+
7. Run `scripts/report.mjs <campaign-dir> [--static <newer-utg.json>]` again after recovery and variants to export audit.json, gaps.json, runtime UTG, gallery (index.html), and merged `utg.final.json` / interactive `utg.html`. Compare the final mapped node/edge counts with the baseline and account for every remaining gap. Click nodes for state-specific viewport screenshots and component trees. Preserve every observation; deduplicate visible trees only for display, never stitch unrelated states. Full scroll coverage is claimed only per node, by a `scroll_sweep` whose outcome is `complete` (see "Scroll sweep" below). Newer static graphs retain the campaign snapshot and edge provenance.
|
|
67
|
+
8. Budgets count every atomic action. Attempt exhaustion with unresolved obligations is `exhausted-with-gaps`, not full coverage. An orphan means a missing route, not a login requirement.
|
|
68
|
+
|
|
69
|
+
## Required recovery cycle
|
|
70
|
+
|
|
71
|
+
Use the existing screenshots, UI trees, action history, static page ownership, source declarations, and click paths before collecting more screenshots. The agent reviews the generated worklists and writes the corresponding answer JSON itself; do not leave a worklist unanswered merely because its script calls the reviewer a model. Read [references/architecture.md](references/architecture.md) for answer schemas and validation rules. Record `cannot-tell` or `unreachable` with source evidence when the available evidence cannot support a rule or gesture. Never infer a landing page solely from the incoming click label.
|
|
72
|
+
|
|
73
|
+
1. **A: recover page identity offline.** Run `node scripts/recover.mjs extract <campaign-dir> --static <static-utg> --project <source-project> --package <app-package>`. For each `recovery_worklist.json` item, inspect its example screenshots and trees, the page's source and layouts, and conflicting captures. Write `recovery_answers.json` using source-owned positive anchors and any needed negative anchors. A `modal_title` anchor matches source text only in a dialog's `alertTitle` or `dialog_title`, avoiding a same-text preference row or menu item. Run `node scripts/recover.mjs apply <campaign-dir> --static <static-utg> --project <source-project> --package <app-package>`, then `node scripts/report.mjs <campaign-dir>`. Inspect `recovery_report.json`: repair rejected answers where evidence permits; leave genuinely ambiguous captures unresolved. Applying accepted rules rejudges all observations and can recover downstream replay obligations without device input. Skip `apply` when the worklist is empty.
|
|
74
|
+
2. **Retry newly recognized replay hops.** Run `node scripts/recover_b.mjs retry-identities <campaign-dir> --config <config.json>` after A. It places tasks whose failed replay capture now proves the expected page into `recA-*` phases without altering their gestures. Execute every phase in `recovery_a_retry_phases.txt` with `run_device.mjs --tasks`, then report. Do not train a new gesture for an identity failure already resolved by A. A retry that gets one hop further can fail there on identity again: re-extract A, answer the new items, apply and retry again (`run_cycle.mjs` does this up to `A_PASSES` = 3 times per round). Such failures belong to A, not to B.
|
|
75
|
+
3. **B and C: recover actions.** After A retries, run `node scripts/recover_b.mjs extract <campaign-dir> --static <static-utg> --project <source-project>` and the same command with `--class C`. Review the failed-step screenshot/tree, static trigger, source window and available controls; write `recovery_b_answers.json` and `recovery_c_answers.json`. For each nonempty class, run `node scripts/recover_b.mjs apply <campaign-dir> --config <config.json> --class <B-or-C>` (substitute `B` or `C`). Execute every phase listed in its `recovery_b_phases.txt` or `recovery_c_phases.txt` with `node scripts/run_device.mjs <campaign-dir> --config <config.json> --phase <phase-id> --tasks --budget <bounded-budget>`. Then run `node scripts/recover_b.mjs adopt <campaign-dir>` and `node scripts/report.mjs <campaign-dir>`. Only device-confirmed steps become learned steps; a proposed gesture is not coverage.
|
|
76
|
+
4. **D: recover data states.** Run `node scripts/recover_d.mjs extract <campaign-dir> --config <config.json>` after B/C verdicts. `recovery_d_worklist.json` holds keyed `items`: one per B/C item answered `unreachable`, and one per group of phases sharing the same `requires`, covering phases already `blocked` and still-`pending` phases that the config gives no fixture or probe. Large worklists split with `worklist_parts.mjs` like A–C. Answer each item by `key` with `verdict: "recipe"` (`tasks` default to the item's) or `verdict: "skipped"` and the reason; recipe ids and new fixture file names start with the item key. Write recipes only for states constructible with verified in-app steps and positive probes. When a recipe depends on background work with a network constraint (e.g. WorkManager requiring connectivity), verify that Android considers the device network `VALIDATED`; fixture-server reachability alone does not satisfy that constraint. Probe a source-backed completion signal, not text that also appears while the work is still pending. Run `node scripts/recover_d.mjs apply <campaign-dir> --config <config.json>`, execute the phases in `recovery_d_phases.txt`, then rerun the report. Record account, hardware, external-app, or build-flavor requirements that cannot be established in this environment as explicit limitations.
|
|
77
|
+
5. If recovered identities expose new B/C candidates, or verified state fixtures expose new tasks, repeat the affected extraction and replay while evidence-backed candidates remain and the device budget permits. Finish with the final report and the remaining gap reasons. Do not force-match unresolved screenshots or count unsupported tasks as confirmed pages.
|
|
78
|
+
|
|
79
|
+
6. **Direct launch for pages no route reached.** Run `node scripts/direct_launch.mjs extract <campaign> --static <static-utg> --project <source-project>`. It lists each uncovered page and the exported Activities with the intent extras their own source reads (for example a host's fragment-selector key, an item id or a mode flag). Answer `direct_launch_answers.json` with `launch` (component, extras from `reads_extras` with values taken from source, at most 5 class-B steps, the configured phase whose state the page needs, and the dispatching source line) or `skip`. Then run `direct_launch.mjs apply <campaign> --config <config.json>` and execute `direct_launch_phases.txt`. These tasks confirm the page's own capture only and write no edge mapping. The report lists pages confirmed only this way under `mapped_via_direct_launch`. Build flavors, accounts, hardware and source-dead branches cannot be launched; record them as `skip`. A host Activity whose own source reads no intent extra, and whose bare launch was already verified to show one of its child pages, is answered `skip` by `extract` itself (`auto_skipped` in the worklist, `auto: true` in `direct_launch_report.json`). A reviewer could only reach that verdict, since any key would be invented, so reviewing such an item is pure cost.
|
|
80
|
+
|
|
81
|
+
7. **Promote recurring unmapped surfaces (Window-class gap, dynamic side).** After the final round — or whenever `export_ui_info` reports many unmapped dynamic observations — run `node scripts/promote_dynamic.mjs extract <campaign> --static <static-utg> [--min-cluster 3]`. It clusters the observations no static node claimed (mapped ones and probe/restore sweep frames excluded) by view signature and writes `dynamic_promote_worklist.json`: per cluster the sample screenshot, tree excerpt, activity, host hints (last mapped page before each observation) and widget ids. Answer `dynamic_promote_answers.json` (raw array): `real-surface` (label, host node, identity rule whose anchors appear in the tree AND cite project source, widget_ids) only when the cluster carries anchors no mapped page has; scroll frames / viewport variants / transient chain screens are `variant-of:<node>` or `duplicate-of:<node>`; system chrome (IME, system assistants, gesture hints) is `noise`. `promote_dynamic.mjs apply <campaign> --static <static-utg>` appends accepted surfaces as kind `window` nodes (provenance `dynamic-discovery`) plus host `open-overlay` edges to the static workspace's `nodes.jsonl`/`edges.jsonl` and `utg.json`; the next `export_ui_info` then maps their observations and `build_conversion_set` converts them (single host → overlay member of the host group). With `a2h-utg-static`'s `window_nav.mjs` (convention-bearing popups, static side) this closes the Window-class coverage gap: statics catch what source declares, promotion catches what actually rendered.
|
|
82
|
+
|
|
83
|
+
## Evidence classes in the report
|
|
84
|
+
|
|
85
|
+
- **Mapped** (counted): a capture verified as the page by a source-owned anchor, including selected-tab captions (`标签「X」` / `「X」标签` hints), learned rules and source relations.
|
|
86
|
+
- **Mapped via direct launch** (counted as a page, no edge): see step 6.
|
|
87
|
+
- **Attested** (NOT counted, listed separately): either a `trigger-chain` (the edge's own trigger control was tapped on the exact source page, and the target's own layout ids newly appeared, with no strong anchor claiming another page), or a reviewer's `attest` verdict in recovery A when the screenshot clearly shows the page but no checkable rule can separate it from a twin. Never fold attested pages into the mapped total.
|
|
88
|
+
|
|
89
|
+
## Runner vocabulary for twins and gestures
|
|
90
|
+
|
|
91
|
+
Selectors may scope twins that share id and text: `{"resource_name": "<button_id>", "within": {"resource_name": "<container_id>"}}` (descendant of exactly one container) or `{"text": "<label>", "index": 1}` (N-th match in reading order). Class B/C/D and direct-launch steps may use `drag` (`selector` → `to`, via `input draganddrop`) for ItemTouchHelper reordering, and `scroll` with `direction` `left`/`right` for horizontal strips. Selector search also scrolls horizontal containers once the vertical search fails. A launch whose UI is not ready is retried once (`launch_retries`).
|
|
92
|
+
|
|
93
|
+
## Scoped campaigns (incremental)
|
|
94
|
+
|
|
95
|
+
`plan.mjs <utg.json> <campaign> --scope <scope.json | id,id,…>` limits a campaign to the listed static nodes plus the nodes living on them, transitively: `embedded_in` / `host_node`, else for a menu / ui-state / mode / panel the page its `…@<Host>` suffix names, else the source of its first inbound edge (`plan.mjs` `hostResolver`, the same rules as a2h-batch-ui-align `Graph.directHost`). The scope is stored as `campaign.json` `scope` (`scope_request` keeps the ids as given); unknown ids are refused. `--extend --scope` replaces it, `--scope ""` clears it, and `--extend` alone re-resolves `scope_request` over the newer static UTG (a scoped id it no longer has is a warning).
|
|
96
|
+
|
|
97
|
+
Every node outside the scope is settled, whatever the coverage mode:
|
|
98
|
+
- the runner skips a task whose target is outside (`task_skipped`, reason `target-out-of-scope`), and such a node is not a missing phase obligation. Routes to scoped pages still pass through the others;
|
|
99
|
+
- the A, B/C, D and direct-launch extracts keep only items naming an in-scope node (`coverage.mjs` `nodeFilter`); D offers no blocked phase without an in-scope task;
|
|
100
|
+
- `capture_pending.json` `pending` lists only uncovered scoped nodes;
|
|
101
|
+
- the scroll-sweep backlog skips mapped pages outside the scope, and launch-rooted `discovery` does not run;
|
|
102
|
+
- another round is started only on progress inside the scope (`audit.json` `mapped_scope_nodes`).
|
|
103
|
+
|
|
104
|
+
Review and device time therefore scale with the scope, not the app. No model key is involved.
|
|
105
|
+
|
|
106
|
+
## Coverage mode (default: nodes)
|
|
107
|
+
|
|
108
|
+
The goal by default is pairing every static node with its own screenshot and component tree; edge verification is secondary. In node mode, the default, the runner skips any task whose target node already has a capture verified as that node, recording a `task_skipped` event, not a failure. Coverage grows during a phase, so a node first captured on a replay hop retires its own tasks. Relation-confirmed nodes (host/default-child) are not covered, because their own screen was never captured. `recover.mjs extract`, `recover_b.mjs extract` / `retry-identities` and `recover_d.mjs extract` likewise keep only items that can add an uncovered node.
|
|
109
|
+
|
|
110
|
+
**Scroll sweep (default on).** Whenever a page is verified at a safe point (a task's source page before its action, a confirmed target, a direct-launch target) and has not been swept, the runner scrolls its largest visible, app-owned, vertical scroll container (≥ `sweep_min_height_px`, default 200; an id-less container whose class is shared is selected by class plus reading-order `index`) downward, capturing each swipe, until two consecutive screens are identical (`complete`) or `max_sweep_scrolls` (default 20) frames are taken (`truncated`). It then scrolls back to the top. Leaving the page (different activity, window or package, or the container no longer resolving alone) ends the sweep as `aborted`. A page that could not be restored is marked dirty, and the next task relaunches instead of reusing it. Before discovery, pages mapped in the phase but never swept are reached through a compiled task of the phase and swept (`sweep-backlog`, else `unreached`). Each sweep writes one `scroll_sweep` event (frames in order, container, outcome, `also_covers` for child pages that resolved below the fold). Sweep actions use task id `sweep:<page>` and count against `max_campaign_actions`, not `max_tasks`. A sweep never fails a task. `final_utg.mjs` binds the frames to the swept page as `evidence.scroll`. Set `"scroll_sweep": false` to opt out.
|
|
111
|
+
|
|
112
|
+
For edge verification, set `"coverage_mode": "edges"` in config.json or pass `run_device.mjs --coverage edges`; the command line overrides config. Pass `--all-items` to the recovery extracts to keep items whose target is already covered.
|
|
113
|
+
|
|
114
|
+
Split large A/B/C worklists for parallel reviewers with `node scripts/worklist_parts.mjs split <worklist.json> --size 10`, then merge with `worklist_parts.mjs merge <worklist.json> [--seed <carried answers>]`. Merge refuses missing, duplicate or unknown keys. Review D as a single worklist. Run device phases in the foreground when host memory is short, because background shells can be reaped while the session is idle. Events carry `ts` (epoch seconds) for stage timing.
|
|
115
|
+
|
|
116
|
+
The trade-off is that edges whose target is already covered are not attempted, so a node-mode campaign verifies fewer edges. Node mode typically reaches almost the same nodes as edge mode with markedly fewer verified edges and about half the device time. Run an edge-mode pass (`--coverage edges`, `--all-items`) afterwards if edges are needed.
|
|
117
|
+
|
|
118
|
+
Read [references/protocol.md](references/protocol.md) for the event contract and state/phase model. `scripts/utg_explorer/adapters.mjs` provides ADB/UIAutomator and safe external-command adapters; it has no AutoGLM dependency.
|
|
119
|
+
|
|
120
|
+
Read [references/architecture.md](references/architecture.md) for implementation boundaries and runnable configuration. Import with `node scripts/evidence.mjs <campaign-dir> --events <events.jsonl>` or `--droidbot <output-dir> --environment <environment-id>`. Export is `utg.runtime.json`.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="zh-CN"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
|
3
|
+
<title>UTG · 静态结构与动态证据</title>
|
|
4
|
+
<style>
|
|
5
|
+
*{box-sizing:border-box}body{margin:0;font:14px system-ui,sans-serif;color:#223047;background:#f3f5f8}header{padding:16px 22px;background:#14263f;color:white}h1{font-size:20px;margin:0 0 8px}header p{margin:0;color:#c4d6ec}button,input,select{font:inherit;padding:7px;border:1px solid #b8c6d6;border-radius:5px;background:white}button,a{cursor:pointer}button:hover{background:#e9f2ff}nav{display:flex;gap:12px;align-items:center;padding:10px 20px;flex-wrap:wrap}main{display:grid;grid-template-columns:minmax(460px,1fr) minmax(420px,44%);height:calc(100vh - 155px);min-height:500px}.graph{position:relative;overflow:hidden;background:#fff;border:1px solid #d7dfe8}svg{width:100%;height:100%;touch-action:none}aside{overflow:auto;padding:20px;border-left:1px solid #ccd7e4;background:#f8fafc}h2{font-size:18px;overflow-wrap:anywhere}h3{font-size:15px}code{overflow-wrap:anywhere;font-size:12px}small,.muted{color:#63758b}.legend{position:absolute;bottom:10px;left:12px;background:#ffffffed;padding:8px;border-radius:6px;pointer-events:none}.node{cursor:pointer}.node text{font:12px system-ui;fill:#263b53}.edge{stroke:#c9d2df;stroke-width:1.2}.confirmed{stroke:#24977c;stroke-width:2}.observed{stroke:#c48a37;stroke-dasharray:5 4}.selected circle{stroke:#14263f;stroke-width:4}.toolbar{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.thumbs{display:flex;overflow:auto;gap:8px;margin:12px 0}.thumbs button{min-width:84px;max-width:110px}.thumbs img{width:72px;height:90px;object-fit:contain}.thumbs .active{border:2px solid #2872ba}.shot{width:100%;max-height:580px;object-fit:contain;background:#e7edf3;border-radius:8px}.card{background:white;border:1px solid #d8e0e9;border-radius:7px;padding:12px;margin:12px 0}.notice{background:#fff4da;padding:10px;border-radius:5px;line-height:1.6}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px;max-height:400px;overflow:auto}a{color:#175b9b}.tree{max-height:390px;overflow:auto;font:12px ui-monospace,monospace}.tree summary{padding:4px;overflow-wrap:anywhere}.tree details{margin-left:12px}label{display:inline-flex;align-items:center;gap:5px}#count{font-size:12px}#zoom{min-width:65px}@media(max-width:850px){main{display:block;height:auto}.graph{height:450px}aside{max-height:none}nav{padding:8px}}
|
|
6
|
+
</style>
|
|
7
|
+
<header><h1>UTG · 静态结构与动态证据</h1><p id="summary"></p></header>
|
|
8
|
+
<nav><input id="search" placeholder="搜索页面名称或 ID" aria-label="搜索节点"><select id="filter" aria-label="节点过滤"><option value="all">全部静态节点</option><option value="captured">有抓取证据</option><option value="missing">静态未抓到</option></select><label><input type="checkbox" id="dynamic">动态未映射节点</label><label><input type="checkbox" id="runtime">显示运行时连线</label><button id="fit">适应画布</button><button id="plus">放大</button><button id="minus">缩小</button><span id="count"></span></nav>
|
|
9
|
+
<main><div class="graph"><svg id="graph" aria-label="UTG 节点图"><defs><marker id="arrow" viewBox="0 0 10 10" refX="25" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="#8798ae"/></marker></defs><g id="scene"></g></svg><div class="legend">● 绿色:有证据 ● 灰色:静态候选 ● 橙色:动态未映射<br>实线:静态边(绿线已确认) 虚线:观察到的运行时跳转<br>滚轮缩放 · 拖动画布 · 点击节点查看截图</div></div><aside id="detail"><h2>选择一个节点</h2><p>查看状态、滚动视口、截图和对应组件树。</p></aside></main>
|
|
10
|
+
<script id="utg-data" type="application/json">__UTG_DATA__</script>
|
|
11
|
+
<script>
|
|
12
|
+
'use strict';
|
|
13
|
+
const data=JSON.parse(document.getElementById('utg-data').textContent),byId=new Map(data.nodes.map(n=>[n.id,n])),caps=data.captures;
|
|
14
|
+
const $=id=>document.getElementById(id),NS='http://www.w3.org/2000/svg';
|
|
15
|
+
const el=(tag,text,cls)=>{const e=document.createElement(tag);if(text!==undefined)e.textContent=text;if(cls)e.className=cls;return e};
|
|
16
|
+
const svgEl=(tag,attrs)=>{const e=document.createElementNS(NS,tag);for(const[k,v]of Object.entries(attrs))e.setAttribute(k,v);return e};
|
|
17
|
+
const safeURL=value=>{if(!value)return '';try{const u=new URL(value,location.href);return ['file:','http:','https:'].includes(u.protocol)?u.href:''}catch{return ''}};
|
|
18
|
+
function assetLink(asset,label){if(!asset?.exists)return el('span',label+':文件缺失','muted');const a=el('a',label);a.href=safeURL(asset.url);a.target='_blank';a.rel='noopener';return a}
|
|
19
|
+
const meta=data.metadata;
|
|
20
|
+
$('summary').textContent=`静态节点并集 ${meta.static_union_nodes} · 有抓取证据 ${meta.captured_static_nodes} · 原始观察 ${meta.capture_count} · 动态未映射候选 ${meta.dynamic_nodes}`;
|
|
21
|
+
let selected=null,panX=30,panY=30,scale=1,positions=new Map(),shown=[];
|
|
22
|
+
function transform(){$('scene').setAttribute('transform',`translate(${panX},${panY}) scale(${scale})`)}
|
|
23
|
+
function draw(){
|
|
24
|
+
const query=$('search').value.toLowerCase(),filter=$('filter').value;
|
|
25
|
+
shown=data.nodes.filter(n=>($('dynamic').checked||n.evidence.origin!=='dynamic-only')&&(!query||(n.id+' '+n.label).toLowerCase().includes(query))&&(filter==='all'||(filter==='captured'?n.evidence.capture_count>0:n.evidence.capture_count===0)));
|
|
26
|
+
const ids=new Set(shown.map(n=>n.id)),edges=data.links.filter(e=>ids.has(e.source)&&ids.has(e.target)&&($('runtime').checked||e.mechanism!=='runtime-observed'));
|
|
27
|
+
// Directed breadth layers; disconnected/cyclic components get their own roots.
|
|
28
|
+
const adj=new Map(shown.map(n=>[n.id,[]])),incoming=new Map(shown.map(n=>[n.id,0]));
|
|
29
|
+
for(const e of edges){if(e.source===e.target||e.mechanism==='runtime-observed')continue;adj.get(e.source).push(e.target);incoming.set(e.target,incoming.get(e.target)+1)}
|
|
30
|
+
const depth=new Map(),queue=[];for(const n of shown)if(incoming.get(n.id)===0){depth.set(n.id,0);queue.push(n.id)}
|
|
31
|
+
function traverse(){for(let i=0;i<queue.length;i++){const id=queue[i];for(const next of adj.get(id))if(!depth.has(next)){depth.set(next,depth.get(id)+1);queue.push(next)}}}
|
|
32
|
+
traverse();for(const n of shown)if(!depth.has(n.id)){depth.set(n.id,0);queue.length=0;queue.push(n.id);traverse()}
|
|
33
|
+
const rows=new Map();positions=new Map();for(const n of shown){const d=depth.get(n.id),row=rows.get(d)||0;rows.set(d,row+1);positions.set(n.id,{x:60+d*300,y:40+row*66})}
|
|
34
|
+
const scene=$('scene');scene.replaceChildren();for(const e of edges){const a=positions.get(e.source),b=positions.get(e.target);if(a===b)continue;const line=svgEl('line',{x1:a.x,y1:a.y,x2:b.x,y2:b.y,class:'edge '+(e.evidence.coverage||''),'marker-end':'url(#arrow)'});const title=svgEl('title',{});title.textContent=`${e.source} → ${e.target}\n${e.mechanism||''} / ${e.evidence.coverage}`;line.append(title);scene.append(line)}
|
|
35
|
+
for(const n of shown){const p=positions.get(n.id),g=svgEl('g',{class:'node'+(n.id===selected?' selected':''),transform:`translate(${p.x},${p.y})`,tabindex:0,role:'button','aria-label':n.label||n.id,'data-node-id':n.id});const color=n.evidence.origin==='dynamic-only'?'#d79a39':n.evidence.capture_count?'#259c80':'#aab5c3';g.append(svgEl('circle',{r:11,fill:color}));const txt=svgEl('text',{x:18,y:4});const label=n.label||n.id;txt.textContent=label.length>31?label.slice(0,30)+'…':label;g.append(txt);const title=svgEl('title',{});title.textContent=n.id;g.append(title);g.onclick=e=>{e.stopPropagation();selectNode(n.id)};g.onkeydown=e=>{if(e.key==='Enter')selectNode(n.id)};scene.append(g)}
|
|
36
|
+
$('count').textContent=`显示 ${shown.length} 个节点 / ${edges.length} 条边`;transform();
|
|
37
|
+
}
|
|
38
|
+
function fit(){if(!positions.size)return;const box=$('graph').getBoundingClientRect(),w=Math.max(...[...positions.values()].map(p=>p.x))+250,h=Math.max(...[...positions.values()].map(p=>p.y))+40;scale=Math.min(1.3,(box.width-35)/w,(box.height-30)/h);panX=20;panY=15;transform()}
|
|
39
|
+
function selectNode(id){selected=id;draw();const n=byId.get(id),panel=$('detail');panel.replaceChildren(el('h2',n.label||id),el('code',id));panel.append(el('p',`${n.kind||''} · ${n.evidence.coverage} · ${n.evidence.capture_count} 次观察 / ${n.evidence.viewport_count} 个去重视口`));
|
|
40
|
+
const notice=el('div','每张截图对应一次现场组件树。视口按采集先后排列,不保证从页顶到页底;未证明整页已遍历完。不同状态不拼接,所有原始观察均保留。','notice');panel.append(notice);
|
|
41
|
+
if(n.evidence.origin==='campaign-snapshot')panel.append(el('p','此节点只在抓取时的静态快照中存在,所选新静态图中未找到同 ID。','notice'));
|
|
42
|
+
if(!n.evidence.capture_ids.length){panel.append(el('p','尚无匹配的抓取证据;保留静态节点。'));}else{
|
|
43
|
+
const selector=el('select');selector.id='variant';selector.setAttribute('aria-label','选择状态');for(const v of n.evidence.variants){const o=el('option',`${v.environment_id} · ${JSON.stringify(v.state)} · ${v.viewports.length} 个视口`);o.value=v.id;selector.append(o)}panel.append(selector);const box=el('div');panel.append(box);selector.onchange=()=>showVariant(n,n.evidence.variants.find(v=>v.id===selector.value),box);showVariant(n,n.evidence.variants[0],box);
|
|
44
|
+
}
|
|
45
|
+
const connections=el('details'),sum=el('summary','相邻节点');connections.append(sum);const neighbors=new Set();for(const edge of data.links){if(edge.source===id)neighbors.add(edge.target);if(edge.target===id)neighbors.add(edge.source)}for(const other of neighbors){if(other===id)continue;const b=el('button',byId.get(other)?.label||other);b.onclick=()=>selectNode(other);connections.append(b)}panel.append(connections);
|
|
46
|
+
const details=el('details');details.append(el('summary','静态属性及版本来源'),el('pre',JSON.stringify(n.evidence.static_versions,null,2)));panel.append(details);
|
|
47
|
+
if(n.runtime_widget_status){
|
|
48
|
+
const wd=el('details'),ws=Object.values(n.runtime_widget_status),matched=ws.filter(x=>x.status==='matched').length,ambiguous=ws.filter(x=>x.status==='ambiguous').length;
|
|
49
|
+
wd.append(el('summary',`静态控件对齐(${matched}/${ws.length} 已匹配,${ambiguous} 个歧义)`));
|
|
50
|
+
const table=el('div','');
|
|
51
|
+
for(const s of ws){const item=el('details','');const title=s.static.widget||s.static.view_id||`控件 ${s.widget_index}`;item.append(el('summary',`${title} · ${s.status} · ${Math.round(s.confidence*100)}%`));const p=el('p',`采集:${s.capture_ids.length} · 未匹配:${s.unmatched_capture_ids.length} · 歧义:${s.ambiguous.length}`,'muted');item.append(p);const pre=el('pre',JSON.stringify({static:s.static,matches:s.matches,enabled_states:s.enabled_states,clickable_states:s.clickable_states,checked_states:s.checked_states,selected_states:s.selected_states,ambiguous:s.ambiguous},null,2));item.append(pre);table.append(item)}
|
|
52
|
+
wd.append(table);panel.append(wd);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function showVariant(node,variant,box){box.replaceChildren();const toolbar=el('div',undefined,'toolbar'),mode=el('select');mode.id='capture-mode';for(const [value,label] of [['views','去重视口'],['all','所有原始观察']]){const o=el('option',label);o.value=value;mode.append(o)}toolbar.append(mode);box.append(toolbar);const thumbs=el('div',undefined,'thumbs'),detail=el('div');box.append(thumbs,detail);
|
|
56
|
+
function render(){const ids=mode.value==='all'?node.evidence.capture_ids.filter(id=>caps[id].variant_id===variant.id):variant.viewports.map(v=>v.representative_capture);thumbs.replaceChildren();ids.forEach((id,i)=>{const c=caps[id],b=el('button');b.setAttribute('aria-label',`视口 ${i+1}`);if(c.screenshot?.exists){const img=el('img');img.src=safeURL(c.screenshot.url);img.loading='lazy';img.alt=`视口 ${i+1}`;b.append(img)}b.append(el('div',String(i+1)));b.onclick=()=>{for(const sibling of thumbs.children)sibling.classList.remove('active');b.classList.add('active');showCapture(c,detail,i,ids.length)};thumbs.append(b)});thumbs.firstChild?.click()}mode.onchange=render;render();
|
|
57
|
+
}
|
|
58
|
+
function showCapture(c,box,index,count){box.replaceChildren(el('p',`${index+1} / ${count} · ${c.observation_id}`,'muted'));if(c.screenshot?.exists){const a=assetLink(c.screenshot,'');const img=el('img',undefined,'shot');img.id='screenshot';img.src=safeURL(c.screenshot.url);img.alt=`${c.node_id} 截图`;a.append(img);box.append(a)}else box.append(el('p','截图文件缺失','notice'));const links=el('div',undefined,'toolbar');links.append(assetLink(c.screenshot,'打开原图'),assetLink(c.tree,'打开原始组件树'));box.append(links);box.append(el('p','进入动作:'+JSON.stringify(c.incoming_action||{})+' · '+(c.resolution.reason||'未映射'),'muted'));
|
|
59
|
+
const tree=el('details');tree.id='component-tree';tree.append(el('summary',`组件树(${c.nodes.length} 个组件)`));const content=el('div',undefined,'tree');tree.append(content);tree.addEventListener('toggle',()=>{if(!tree.open||content.childNodes.length)return;const entries=c.nodes.map((n,i)=>{const d=el('details'),title=[n.class?.split('.').pop(),n.resource_id,n.text||n.content_desc].filter(Boolean).join(' · ');d.append(el('summary',title||`组件 ${i}`),el('pre',JSON.stringify(n,null,2)));return d});entries.forEach((d,i)=>{const p=c.nodes[i].parent_index;if(Number.isInteger(p)&&p>=0&&p<i)entries[p].append(d);else content.append(d)});});box.append(tree);
|
|
60
|
+
}
|
|
61
|
+
$('search').oninput=draw;$('filter').onchange=draw;$('dynamic').onchange=draw;$('runtime').onchange=draw;$('fit').onclick=fit;$('plus').onclick=()=>{scale=Math.min(4,scale*1.3);transform()};$('minus').onclick=()=>{scale=Math.max(.02,scale/1.3);transform()};
|
|
62
|
+
let drag=null;const svg=$('graph');svg.addEventListener('pointerdown',e=>{if(e.target.closest('.node'))return;drag={x:e.clientX,y:e.clientY,px:panX,py:panY};svg.setPointerCapture(e.pointerId)});svg.addEventListener('pointermove',e=>{if(drag){panX=drag.px+e.clientX-drag.x;panY=drag.py+e.clientY-drag.y;transform()}});svg.addEventListener('pointerup',()=>drag=null);svg.addEventListener('pointercancel',()=>drag=null);svg.addEventListener('wheel',e=>{e.preventDefault();const r=svg.getBoundingClientRect(),x=e.clientX-r.left,y=e.clientY-r.top,next=Math.max(.02,Math.min(4,scale*Math.exp(-e.deltaY*.001)));panX=x-(x-panX)*next/scale;panY=y-(y-panY)*next/scale;scale=next;transform()},{passive:false});
|
|
63
|
+
draw();fit();const first=shown.find(n=>n.evidence.capture_count);if(first)selectNode(first.id);
|
|
64
|
+
</script></html>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017 openatx
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
u2.jar — third-party notice
|
|
2
|
+
|
|
3
|
+
Origin
|
|
4
|
+
The uiautomator2 Python package (openatx), release 3.7.0:
|
|
5
|
+
https://github.com/openatx/uiautomator2/tree/3.7.0 (uiautomator2/assets/u2.jar)
|
|
6
|
+
assets/version.json in that release lists "u2.jar": "0.4.0".
|
|
7
|
+
Server source: https://github.com/openatx/android-uiautomator-server
|
|
8
|
+
Copied unmodified.
|
|
9
|
+
sha256 0b74e83c55f443539a9f76f5ce023a51466b764b1100e4097a897053fdfc0eb6
|
|
10
|
+
size 3,707,333 bytes
|
|
11
|
+
|
|
12
|
+
Licenses
|
|
13
|
+
uiautomator2 / android-uiautomator-server MIT see u2.LICENSE
|
|
14
|
+
The jar also bundles, under their own licenses:
|
|
15
|
+
JUnit 4 EPL-1.0 LICENSE-junit.txt inside the jar
|
|
16
|
+
AndroidX (activity, appcompat, core, fragment, lifecycle, ...; versions in
|
|
17
|
+
META-INF/androidx.*.version inside the jar)
|
|
18
|
+
Apache-2.0 https://www.apache.org/licenses/LICENSE-2.0
|
|
19
|
+
jsonrpc4j 1.5.0 (briandilley/jsonrpc4j) MIT https://github.com/briandilley/jsonrpc4j
|
|
20
|
+
Jackson (jackson-core / databind / annotations)
|
|
21
|
+
Apache-2.0 https://github.com/FasterXML/jackson
|
|
22
|
+
NanoHTTPD BSD-3-Clause https://github.com/NanoHttpd/nanohttpd
|
|
23
|
+
|
|
24
|
+
The jar is redistributed as-is. It is pushed to the Android device under test
|
|
25
|
+
(/data/local/tmp/u2.jar) and run there; nothing in this skill links against it.
|
|
Binary file
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
# 状态化抓取架构
|
|
2
|
+
|
|
3
|
+
```mermaid
|
|
4
|
+
flowchart LR
|
|
5
|
+
S[静态 UTG 与原分阶段计划] --> P[plan.mjs 分配状态义务]
|
|
6
|
+
P --> F[fixture 准备与正向探针验证]
|
|
7
|
+
F --> D[run_device.mjs 有界执行]
|
|
8
|
+
X[外部探索器] --> E[evidence.mjs 证据导入]
|
|
9
|
+
D --> E
|
|
10
|
+
E --> G[运行时 UTG]
|
|
11
|
+
G --> A[audit.mjs 覆盖缺口]
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
页面、状态与环境分开保存。多个 guard 属于同一个前置条件集合,不能只取第一个。计划复用静态目录的 `phase_plan_nodes.json`,保留 BYPASS 等原始提示,但不会据此宣布页面不可达。
|
|
15
|
+
|
|
16
|
+
## 文件与职责
|
|
17
|
+
|
|
18
|
+
|文件|职责|
|
|
19
|
+
|---|---|
|
|
20
|
+
|plan.mjs|静态图和旧计划转成状态阶段、节点/边义务与 plan.md|
|
|
21
|
+
|compile_tasks.mjs|读取 click_paths/ui_elements,把每条静态边编译成 selectors、回放路径和 guard 约束|
|
|
22
|
+
|utg_explorer/semantics.mjs|自动解析源码 Preference XML、本地化字符串和 Activity;按模态标题或页面自身控件组合唯一识别|
|
|
23
|
+
|utg_explorer/task_runner.mjs|校验父页面后复用、双向有界滚动、原子动作预算、任务结果和静态映射|
|
|
24
|
+
|report.mjs|独立校验证据引用、唯一节点/边覆盖率、缺口分类、离线截图画廊|
|
|
25
|
+
|variant.mjs|根据缺口克隆状态阶段,配置准备动作、正向探针、补充路线与恢复动作|
|
|
26
|
+
|final_utg.mjs + assets/final_viewer.html|静态版本并集、动态证据挂载、离线节点图、多视口截图与组件树|
|
|
27
|
+
|run_device.mjs|设备互斥、fixture、状态探针、操作前记账、前后抓取、有界退出|
|
|
28
|
+
|utg_explorer/adapters.mjs|ADB/UIAutomator、可选 android layout、外部进程协议、DroidBot 原始状态导入|
|
|
29
|
+
|evidence.mjs|外部事件验证、重复事件消除、按环境与状态保留运行时图|
|
|
30
|
+
|audit.mjs|观察数量、完整过渡与阶段状态汇总|
|
|
31
|
+
|
|
32
|
+
## 配置示例
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"serial": "emulator-5554",
|
|
37
|
+
"page_rules": [{"id":"home", "family":"home", "activity":"example.MainActivity", "all":[{"resource_id":"example:id/home"}]}],
|
|
38
|
+
"state_rules": [{"id":"authenticated", "activity":"example.MainActivity", "all":[{"resource_id":"example:id/account"}], "values":{"auth":"logged_in"}}],
|
|
39
|
+
"phase_probes": {"p0-fresh":[{"activity":"example.MainActivity"}]},
|
|
40
|
+
"fixtures": {},
|
|
41
|
+
"actions": {"p0-fresh":[{"type":"click","selector":{"resource_id":"example:id/settings"}}, {"type":"back"}]}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**默认启用下面三项加速**(`DeviceAdapter.DEFAULTS`),campaign 配置中的同名字段优先。恢复旧行为:`{"layout_backend": "uiautomator", "adb_persistent_shell": false, "settle_mode": "fixed"}`。u2 服务端随 skill 分发(`assets/u2.jar`,uiautomator2 3.7.0 的 u2.jar 0.4.0,MIT,见 `assets/u2.LICENSE`),无需额外安装;服务端起不来时报 `ui-dump-failed: u2 …`,按瞬时设备错误分类。
|
|
46
|
+
|
|
47
|
+
`"layout_backend": "u2"`:控件树改由设备上常驻的 uiautomator2 服务提供(`utg_explorer/adapters.mjs` 推送 `assets/u2.jar` 到 `/data/local/tmp`,以 `app_process` 启动,经 `adb forward` 走 JSON-RPC `dumpWindowHierarchy`;截图在所有后端都用 `adb exec-out screencap -p`),只取当前活动窗口,和 `uiautomator dump` 的范围一致。前台 Activity 和输入仍走 adb。在模拟器上实测,每次观察从约 2.6–2.9s 降到约 0.4s。它占用设备唯一的 UiAutomation 连接,进程退出时自动停止;运行期间不能同时使用 Fastbot 或 `uiautomator dump`。
|
|
48
|
+
|
|
49
|
+
另外两项(同样默认开启,可单独关闭):
|
|
50
|
+
|
|
51
|
+
- `"adb_persistent_shell": true`:所有 `_shell` 命令(dumpsys、input、am)复用一个常驻 `adb shell`,每条命令从约 160ms 降到约 15–20ms。退出码和 stderr 的报错方式不变;shell 断开或超时报为可重试的设备错误,下次调用自动重连。`exec-out`/`exec-in`/`pull` 仍单独起进程。
|
|
52
|
+
- `"settle_mode": "stable"`(仅 u2 后端):动作后不再固定睡 `settle_seconds`,而是轮询当前窗口控件树,连续两次相同即返回;`settle_seconds` 仍是上限。`settle_min_seconds`(默认 0.1)是最短等待,`settle_poll_seconds`(默认 0.05)是轮询间隔。控件树不变但画面仍在变化的动画(纯绘制、视频)检测不到,需要时调大 `settle_min_seconds`。
|
|
53
|
+
|
|
54
|
+
实测(Anki 首页,打开菜单 / 返回交替 10 步,`settle_seconds=0.8`,每步含前后观察):adb 7.03s → u2 1.96s → 加常驻 shell 1.37s → 再加 stable 0.84s,各配置判定结果一致。
|
|
55
|
+
|
|
56
|
+
这里的包名、resource-id 和 fixture 是每次 campaign 的输入,不进入通用脚本。登录凭据可使用 input 的 `value_env` 字段引用环境变量;截图和布局本身可能含账户内容,应保存在测试工作区。
|
|
57
|
+
|
|
58
|
+
`phase_probes` 在 fixture 后检查阶段入口;`--tasks` 的 `invariant_probes` 在每条任务开始前检查,不默认复用入口探针。入口页面的 preview、首页标题等锚点不适合作为全阶段约束,否则正常导航会被当成状态漂移。前台识别使用完整 `dumpsys window`,无焦点字段时回退到 resumed Activity。
|
|
59
|
+
|
|
60
|
+
`state_anchors`:页内状态(`ui-state` / `mode` 节点,如日历的日/周/月/年、查询页的班车/事件)不参与页面身份判定,只在宿主页已判定的观测上按锚点区分:`{"<状态节点 id>": {"all": [{"resource_name": "calendar_year_view"}], "none": [...]}}`,选择器与 `learned_rules` 相同。命中的观测额外记一条 `method: ui-state-anchor` 的 mapping,最终 UTG 把该截图同时挂到状态节点;同一宿主的两个状态同时命中则都不算。运行时写入 campaign 的 `state_anchors`,后续 compile / rejudge / report 沿用。recovery A 为状态节点学到的规则同样转为状态锚点,不再与宿主规则抢身份。tab 自身常常不带 `selected`,锚点应取只在该状态出现的内容控件。
|
|
61
|
+
|
|
62
|
+
`page_rules[].family` 可以直接使用静态节点 ID。只有规则包含 Activity 或正向控件锚点、全局唯一命中且该 ID 存在于静态 catalog 时,运行时观察才映射到静态节点;配置中的临时 family 不会抬高静态覆盖。
|
|
63
|
+
静态 `host-activity` 是导航上下文而不是独立截图页:只在运行时 Activity 与静态组件精确相等时允许它作为边的 source,同时保留当前 Fragment 的页面身份,避免为了确认容器边而错误覆盖子页面映射。
|
|
64
|
+
|
|
65
|
+
通用有界探索为显式 opt-in,示例:
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"discovery": {
|
|
70
|
+
"p0-fresh": {
|
|
71
|
+
"enabled": true,
|
|
72
|
+
"max_depth": 3,
|
|
73
|
+
"max_states": 30,
|
|
74
|
+
"max_expansions": 60,
|
|
75
|
+
"max_actions_per_state": 8,
|
|
76
|
+
"allow_actions": [{"all": [{"resource_id": "example:id/navigation"}]}]
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
没有 `allow_actions` 时默认不点击未列出的控件;只有明确设置 `allow_unlisted_actions:true` 才会枚举所有唯一、可操作控件。探索结果保留为 discovery 证据,只有成功重放并通过页面身份校验的静态任务才能确认静态边。
|
|
83
|
+
|
|
84
|
+
外部包装程序接收两个文件参数,读取 request.json,写入 `{"events": [...]}` 到 response.json。配置示例:`{"argv":["python","wrapper.py","{request}","{response}"],"timeout":120,"budget":100}`。运行 `evidence.mjs <campaign> --external-config <config> --environment <id>`。Maestro/Appium/CDP 等需要针对工具版本编写包装程序,当前并未附带这些工具的专用实现。DroidBot 已有原始 states 导入器,仅导入具有截图的观察,不猜造点击边。
|
|
85
|
+
|
|
86
|
+
## 实际边界
|
|
87
|
+
|
|
88
|
+
当前实现能把静态边编译为有界 selector/replay 任务,跳过非手势/default 路径步骤,回放 tap/long-press/double-tap/screen-swipe,对可见列表项执行有限滚动,并审计映射的前后观察和动作引用;它仍不能保证每个源代码标签都有运行时控件。尚未实现自动状态 fixture 合成、SQLite 并发事务及通用快照恢复。不可解析的标签进入带明确 `compile_issues` 的 `needs_external`,失败任务保留证据,不会被宣称完成。campaign 保存使用同目录唯一临时文件、原子替换和有限退避,以容忍 Windows 上的短暂读锁。
|
|
89
|
+
|
|
90
|
+
默认不清除应用数据、不执行付费、不猜测登录。状态探针不通过就保留 blocked。ADB backup 在现代 Android 上不能作为通用恢复机制;可复现状态应使用明确 fixture 或测试模拟器快照,恢复后再次验证。
|
|
91
|
+
|
|
92
|
+
运行时结构指纹只能用于候选去重,不证明语义页面相同;动态观察不自动增加静态覆盖率。动作执行成功也不等于目标页面确认。当前 audit 仅汇总已记录事实,尚不宣称全部页面已覆盖。
|
|
93
|
+
|
|
94
|
+
`--tasks` 使用新的 task_runner。每次启动、返回、滚动和点击均计入预算并留下前后证据。父页必须重新匹配源码签名,失败后不会盲按返回复用。OS 文件锁随进程释放,不使用 Windows `os.kill(pid, 0)` 探测。自动映射比较所有候选:列表入口文字不能证明弹窗打开;modal title 命中多个节点时保留歧义;无标题 PreferenceScreen 由至少两个自身行标签及其中一个独有标签识别。报告保留源码中只存在于 XML 注释的候选,不删除分母美化覆盖率。
|
|
95
|
+
|
|
96
|
+
## 状态补抓与静态图外路线
|
|
97
|
+
|
|
98
|
+
variant JSON 必填 `id`、`requires`、`fixtures`、`probes`、`cleanup`;可选 `from_phase`、`targets`、`only_unconfirmed`、`basis`。默认只克隆原阶段未确认且非注释误报的任务。该命令只能在设备执行停止后运行,避免覆盖运行中的 campaign。
|
|
99
|
+
|
|
100
|
+
`routes` 是 `[{"id":"route-name","actions":[...]}]`,各路线应从明确的启动或恢复动作开始,并使用 `{"type":"assert","rule":{"all":[{"resource_id":"example:id/expected"}]}}` 验证关键检查点。可用原子操作及 click_candidates;动作的可选 `when` 使用同样的正向规则。路线按顺序执行,单条失败记录 route_result 后继续下一条,仍受动作和时间预算约束。
|
|
101
|
+
|
|
102
|
+
`cleanup` 在 finally 执行,并以断言证明恢复。应预留动作预算;不能恢复时保留错误,不能声称已恢复。report 输出 discoveries.json 和路线截图,路线终点不自动计入静态覆盖。跨状态同一静态边只计一次,截图画廊按静态节点和环境分别展示。
|
|
103
|
+
|
|
104
|
+
## 最终 UTG 与长页面
|
|
105
|
+
|
|
106
|
+
`node scripts/final_utg.mjs <campaign> [--static <newer-utg.json>]` 可单独导出,report 也会调用。默认使用 campaign 内嵌静态快照;指定新静态图时保留节点 ID 并集和两版原属性,边按完整语义属性合并。边确认必须匹配原任务的静态边索引、实际起终点和动作证据;不按新图索引套用旧证据。
|
|
107
|
+
|
|
108
|
+
`utg.final.json` 和面向通用消费者的 `utg.json` 保持相同内容:标准 `nodes/links` 加上 captures、runtime_transitions、issues 和 metadata。节点 evidence 中包含 capture_ids、variants、cover_capture、capture_count 和 viewport_count。带有静态 `widgets` 的节点还会有 `runtime_widget_status`,按静态控件保存匹配状态、匹配规则、运行时索引、截图 ID、坐标和 enabled/clickable/checked/selected 状态;`matched`、`ambiguous` 和 `unseen` 都是有效结果,不会把缺少运行时控件视为成功。匹配优先资源 ID,其次控件名到资源 ID,最后文本/content-desc,只有唯一最高分候选才确认。variants 按环境及抽象状态分组,viewports 按包含位置的可见组件树指纹去重;capture_ids 始终保留所有原始观察。每个 capture 有截图和原树相对路径、标准化 nodes(含 parent_index)、采集顺序、进入动作和识别依据。未映射观察保留为动态候选节点,不抬高静态覆盖。
|
|
109
|
+
|
|
110
|
+
长页面采用多视口证据,而非覆盖同名截图或默认拼接。utg.html 可切换状态、视口、所有原始观察,点击原图放大,展开对应组件树。相同组件树下图像可能变化,因此仍可查看每次原始采集。现有抓取为目标导航采集,不能证明已经从页顶滚至页底;多图不能等同完整长截图。离线 HTML 内嵌数据,无 CDN 或 fetch,分享时需带上 artifacts 目录。
|
|
111
|
+
|
|
112
|
+
## 补充能力(2026-09 AntennaPod 回归修复)
|
|
113
|
+
|
|
114
|
+
- **NL hint 编译**:`nl_hints` 中 `「」`/`“”`/`'…'` 引用的屏幕文字按子句顺序编译为多步点击;中间步(如底部栏「更多」弹出菜单)标记 `intermediate` 不校验页面;“任意一个/第一个…行/项/封面”编译为 `click_list_item`(点击唯一可滚动列表的首个可操作行);`〔id:name〕` 编译为资源 ID 选择器;以“(无需点击)”开头的提示视为自动步。与上一跳重复的前导描述子句会被去除,避免重复点击。
|
|
115
|
+
- **`restore_app_data` fixture**:`{"type":"restore_app_data","archive":"<tar>","clear_dirs":[...]}` 以 `run-as` 恢复可调试包的私有数据快照(先 force-stop),用于可重复地进入“有订阅/正在播放”等内容阶段;快照是 campaign 输入,不自动生成。
|
|
116
|
+
- **不可调试包的回放快照**:`run-as` 不可用时(release 包、闭源 APK),快照改为 `<name>.replay.json`,内容是从清空数据开始重建该状态的步骤链。恢复 = `clear_app_data`(`pm clear`,同时重置运行时权限)→ 启动 → 重放步骤链;保存 = `save_replay`(步骤链 + 本配方步骤,只写 `snapshot_dir`,不覆盖)。D 配方的输出与其 base 同类;步骤链总长上限 60。`d_prereqs.mjs snapshot` 自动探测 `run-as` 选择模式,`config.snapshot_mode`(`auto`/`tar`/`replay`)可强制指定。
|
|
117
|
+
- **启动隔离**:`restart` 启动附加 `-f 0x10008000`(NEW_TASK|CLEAR_TASK),避免应用任务栈中残留的系统设置/浏览器页挡在“新启动”前面;带 `component_fqn` 的隐式 VIEW/action 意图会以 `-n` 固定到目标组件。
|
|
118
|
+
- **页面识别补充层级**:不同包名的前台页一律 `foreign-package`,不映射静态节点。包名以**抓到的控件树**为准(节点 `package` 多数票,`semantics.tree_package`),不以 `dumpsys window` 的前台组件为准:后者会滞后,刚启动或弹出系统选择器时它仍报本应用的 Activity,而 dump 下来的是文件选择器或桌面。以前这类观察会被 `exact-activity` 误判为本应用页面。观察记录的 `package` 字段即树的包名;二者不一致时,前台组件的包名另存为 `component_package`。`rejudge.mjs` 会按同一规则重判旧证据;偏好行只取 `android:id/title`(排除底部导航等常驻栏文字);工具栏标题唯一匹配 `unique-toolbar-title`(含 Compose 顶栏:无 Toolbar 类、无 id 的标题 TextView,位于窗口顶部 12% 内、不在可滚动容器中、同一父节点下左侧有可点击的导航图标,`semantics._composeTopBarTitle`);页面自身布局 ID 唯一组合 `own-layout-ids`(优先使用静态 `layout_ids`);运行时标题的弹窗按自身布局 ID 识别。字符串与偏好 XML 按全项目模块解析。
|
|
119
|
+
- **源页复用**:仅在精确页面身份匹配时复用当前界面;宿主 Activity 组件匹配不再视为已在源页。自动子区块(embedded section)无自身锚点时,可凭 `source_context`(最后一个手势目标)确认。
|
|
120
|
+
- **`overflow_openers`**:配置的正向规则(如底部栏“更多”)在选择器找不到且滚动无果后各尝试一次,未命中则返回。除配置项外,运行器还会从活动自己的路线里**派生** opener:取各任务 replay 中距启动 `derived_opener_depth`(默认 1)步以内、且后面还有步骤的 `intermediate` 跳转的选择器组,按出现次数排序,最多 `max_derived_overflow_openers`(默认 4)个。一条路线已经要先点开的容器(底部栏“更多”、工具栏菜单),其他路线漏写这一步时也能被找到。不写任何应用专属词汇。
|
|
121
|
+
- 点了 opener 仍没找到目标时:界面有变化才按 Back;如果 opener 换了 Activity,或进到一个不属于浮层类(menu/dialog/panel/overlay/ui-state/mode)的已验证页面,说明它是导航而不是容器,本次运行不再尝试它。
|
|
122
|
+
- **前缀熔断**(`prefix_memo`,默认开):同一次运行里,某任务的“启动 + 前 n 步 replay”因确定性原因失败后(`selector-not-found-after-bounded-scroll`、`replay-target-unverified:`、`ambiguous selector`、`list-item:`、单一滚动容器缺失),共享这个前缀的后续任务不再启动应用,直接记 `failed`,原因相同,并带 `prefix_failed_from`(首个失败的任务)、`prefix_key`、`replay_index`、`prefix_before`(该步开始时的观察)。证据指向首次失败的那次观察。B 类抽取按 `replay_index` 和 `prefix_before` 定位失败步,这些任务与首个任务归入同一项,审阅一次即可。设备异常等瞬时失败不熔断。
|
|
123
|
+
- **意外弹窗(interruption)**:控件树唯一根节点面积 < `modal_max_screen_share`(默认 0.85)且含可点控件,即视为浮层(AlertDialog、权限、评分、按流量刷新确认等)。浮层若不是当前任务的源页、目标页或 `source_context`,在选择器查找前、每次搜索滚动后、回放到源页后各检查一次,并依次处理:先用 `interruption_rules`(`{id?, when: <rule>, action}`),其次 Back,Back 关不掉时点 `android:id/button2`;每个浮层最多处理 `max_interruption_dismissals` 次(默认 2)。每次处理记一条 `interruption` 事件,内容包括前 6 段文字和所用动作,可用来补写规则。
|
|
124
|
+
- **上滑不越过起点**:查找控件时,先向下滚,再向上滚回到起点就停(`_backAtOrigin`),不再多滑一次。列表顶部再上滑就是下拉刷新(SwipeRefreshLayout 等,开源 app 普遍使用),会触发联网、按流量提示等弹窗。AntennaPod 第 1 轮因此有 35/65 个任务失败、只覆盖 7 页。起点在列表中部、需要往上找时,设 `search_above_origin: true`。
|
|
125
|
+
- **框架文字本地化**:`More options` 等 AppCompat 无障碍文字按 `--locale` 生成本地化选择器,保留英文作为后备。
|
|
126
|
+
- **不可驱动入口**:`external-surface` 入口编译为 `entry-requires-external-surface`;安装包中不存在的组件记为 `unsupported: entry-component-not-installed`,均为适配器限制而非页面不可达。
|
|
127
|
+
- **存储**:`events.jsonl` 逐事件追加;`campaign.json` 最多每 `save_interval` 秒(默认 15)及每个任务结论时重写,避免大 campaign 每个动作全量序列化。
|
|
128
|
+
|
|
129
|
+
## 阶段划分与不可运行阶段(2026-09-29)
|
|
130
|
+
|
|
131
|
+
- **任务级前置条件不再切分阶段**:`plan.mjs` 的 `TASK_LEVEL_KINDS`(`ui-state`,以及 `launch-intent:` 守卫)只记录在任务的 `task_preconditions` 上,不参与阶段分组。流程内状态(已输入文字、已打开筛选)由手势序列在同一环境中达到;启动参数由任务自身的启动动作携带。AntennaPod 上阶段数从 63 降为 19。失败时 `task_result.unmet_preconditions` 标明未达到的流程内状态。
|
|
132
|
+
- **启动参数**:静态守卫带 `launch_extras`(键常量已解析为字面量、访问器类型、分支决定的布尔值)。`compile_tasks.mjs --launch-values <json>` 为只有 campaign 知道的值(例如某个单集 id)提供取值,可附 `requires` 让任务落到该值存在的阶段;缺少取值时编译为 `launch-extra-value-required:<key>`,不猜测。适配器按类型生成 `--ez/--el/--ei/--es` 参数并做字符白名单校验。
|
|
133
|
+
- **`close_phases.mjs`**:设备阶段结束后运行,把没有 fixture/探针的阶段标为 `blocked`,原因写明未满足的前置条件和其中的已编译任务数,报告不再显示为 `pending`。判定函数 `unrunnable(phase, config)` 也被 D 类抽取复用,让 D 在这一步之前就能看到这些阶段。
|
|
134
|
+
|
|
135
|
+
## 模型介入恢复 · A 类:离线学习页面身份(2026-09-29)
|
|
136
|
+
|
|
137
|
+
目标未确认、以及回放中间页未能确认的任务,证据已经在(动作前后截图、组件树),缺的只是身份结论。`recover.mjs` 让模型看截图、组件树和源码,提出识别规则;规则经确定性校验才会被采用,模型的判断本身不作为证据。
|
|
138
|
+
|
|
139
|
+
1. `recover.mjs extract <campaign> --static <utg.json> --project <src> --package <app>`:按“期望到达的静态页”聚合成 `recovery_worklist.json`。每项最多 3 张示例截图,附裁剪后的组件树(已去掉被遮挡的节点)、当前判定和依据,以及该页的声明文件、布局文件、标题和控件 ID。
|
|
140
|
+
2. 审阅方写 `recovery_answers.json`,每项给出 `verdict`(is-target / not-target / cannot-tell)、属于目标的示例、规则(`all`/`none` 选择器,每个只含 resource_name、text、content_desc 之一),以及每个锚点的 `file:line` 证据。
|
|
141
|
+
3. `recover.mjs apply ...` 逐条校验:
|
|
142
|
+
- **来源**:锚点值必须出现在引用的行上;ID 只能来自该页自己的声明文件或布局文件,文字只能来自字符串资源或该页自己的文件。运行时数据(标题、日期、数量)进不了源码,因此不可能成为锚点。
|
|
143
|
+
- **覆盖**:规则能匹配审阅方指认的所有示例。
|
|
144
|
+
- **专一**:规则不能匹配任何已被判定为其他页的截图(该页的宿主或自动子页除外),也不能匹配其他应用的截图。
|
|
145
|
+
- **互斥**:不能与已采纳的其他页规则同时命中。
|
|
146
|
+
- 审阅方只能推翻弱判定(`own-layout-ids` / `best-layout-cover` / `unique-toolbar-title`),不能推翻模态标题、偏好行、选中标签这类强判定。
|
|
147
|
+
4. 通过的规则写入 `campaign.learned_page_rules`,在识别时作为最先检查的一层(`learned-rule:<id>`)。随后 `rejudge.mjs` 用新目录重判全部证据:只在动作前后截图都满足源页和目标页时才补确认;原有确认不再成立的会撤回。`recovery_report.json` 列出每条规则的采纳结果或拒绝原因。
|
|
148
|
+
|
|
149
|
+
`rejudge.mjs` 可单独运行(等同于原先的临时脚本 `reresolve.py`),`compile_tasks.mjs` 在重新编译时会带上已学习的规则。
|
|
150
|
+
|
|
151
|
+
## 多步手势的边(2026-09-29)
|
|
152
|
+
|
|
153
|
+
一条静态边在设备上往往是几步手势,例如“页面 → 对话框”要先打开溢出菜单再点菜单项。中间的菜单是路过的界面,不是这条边的源页,所以单个动作的前后截图证明不了这条边。`utg_explorer/chain.mjs` 规定用一串动作来证明,满足以下条件才算成立:
|
|
154
|
+
- 所有动作属于同一任务、同一环境;
|
|
155
|
+
- 动作首尾相接:上一个动作的 after 就是下一个动作的 before;
|
|
156
|
+
- 第一个动作之前的截图显示源页,最后一个动作之后的截图显示目标页。
|
|
157
|
+
|
|
158
|
+
中间截图显示什么都可以,它们只是路径,不作为任何页面的证据。
|
|
159
|
+
|
|
160
|
+
运行器从目标阶段的第一个动作(前置点击、打开溢出菜单、滚动)开始记录 `action_chain`,审计和最终 UTG 用同一套规则校验。对旧证据,`rejudge.mjs` 会沿着该任务自己的目标阶段动作向回追溯到源页截图,补记成完整链路(`supersedes` 指向被取代的旧记录)。追溯不会越过回放和恢复动作,因为那些动作是走向源页的,不属于这条边。
|
|
161
|
+
|
|
162
|
+
## 模型介入恢复 · B 类:失败步骤的新手势(2026-09-29)
|
|
163
|
+
|
|
164
|
+
适用于任务在设备上卡在某一步的情况:控件找不到、“点任意一行”没有行或出现多个列表、选择器匹配到多个控件、回放途中的中间页认不出。卡住那一刻的屏幕截图已经记录下来。`recover_b.mjs` 让模型读取这张截图和组件树,以及这条边背后的代码,提出能完成这一步的手势。模型的建议本身不算证据,必须在设备上确认后才会被采纳。
|
|
165
|
+
|
|
166
|
+
1. **`recover_b.mjs extract <campaign> --static <utg.json> --project <src>`**
|
|
167
|
+
- 按“卡住的步骤 + 当时的页面”分组,生成 `recovery_b_worklist.json`。
|
|
168
|
+
- 每项包含:目标(要到达的中间页,或要完成的边)、失败的原步骤和原因、这一步开始前的截图与组件树、失败时的截图、触发代码窗口、目的页的文件。
|
|
169
|
+
2. **审阅方写 `recovery_b_answers.json`**
|
|
170
|
+
- 给出 1 到 5 步手势,只能从运行器现有的动作里选:按资源 ID、文字或描述点击或长按,点唯一列表的第一行,返回,滚动页面,等待。
|
|
171
|
+
- 也可以回答 `unreachable`(在这个状态下到不了)或 `cannot-tell`(无法判断)。
|
|
172
|
+
3. **`recover_b.mjs apply ... --config <config>`**:先离线校验。
|
|
173
|
+
- 第一步的选择器必须在“这一步开始前”的截图里恰好匹配一个可见控件。
|
|
174
|
+
- 只允许上面列出的动作类型,选择器只能包含一个键。
|
|
175
|
+
- 手势不能与原来失败的步骤相同。
|
|
176
|
+
- 通过校验的手势按任务替换原步骤:回放阶段失败就替换 `replay` 中对应那一跳,最后一步保留这一跳原来的页面身份,前面几步标为中间步骤;目标阶段失败就替换 `prelude` 和 `action`。然后以任务原来的快照另建 `recB-<阶段>` 重试阶段(`variant.add_variant` 的 `task_overrides`)。
|
|
177
|
+
4. **在设备上运行这些阶段**:运行器的检查照常进行,每次点击都要唯一匹配、不猜坐标,落地页必须由识别规则确认。
|
|
178
|
+
5. **`recover_b.mjs adopt`**:只把设备上确认成功的替换写入 `campaign.learned_task_steps`。`compile_tasks.mjs` 下次编译时会把它们应用到同一任务上。
|
|
179
|
+
|
|
180
|
+
运行器新增 `scroll_page` 动作:在当前屏幕上找唯一的可滚动容器来滚动。找不到或有多个时直接拒绝。
|
|
181
|
+
|
|
182
|
+
**整页滚动采集(scroll sweep,默认开启,`scroll_sweep: false` 关闭)。** 页面在安全点被验证后会做一次整页滚动采集,并且每页只做一次。安全点有三类:任务的 source 页在执行动作之前、已确认的 target 页、direct-launch 的目标页。
|
|
183
|
+
|
|
184
|
+
- **选容器:** 取最大的可见、未被遮挡、属于本应用的纵向 scrollable 节点,高度不低于 `sweep_min_height_px`,并且它的 selector 要能单独匹配到它。没有 id 且 class 不唯一的容器(如 Compose 页面的 scrollable `android.view.View`)用 class 加阅读顺序 `index` 定位。横向容器、ViewPager,以及高度不足的内层滚动区都不参与,后者记入 `unswept_containers`。
|
|
185
|
+
- **过程:** 每次下滑后采集一帧,直到相邻两帧的可见树签名(含 bounds,因此折叠头部这类只改高度的变化也算一帧)相同,记为 `complete`。帧数达到 `max_sweep_scrolls`(默认 20)时记为 `truncated`。中途离开页面记为 `aborted`。设备异常或预算耗尽时,采集只是结束并被记录,不会让当前任务失败。
|
|
186
|
+
- **复位:** 结束后上滑回到初始签名。复位失败时把页面标记为 dirty,`source()` 会重启进入,而不是复用这个已滚动的页面。
|
|
187
|
+
- **补扫:** phase 结束前,对本环境已映射但尚未采集的页面,借本 phase 的已编译任务导航过去再补扫(`sweep-backlog`)。导航失败记为 `unreached`。
|
|
188
|
+
- **事件:** 每次采集写一条 `scroll_sweep` 事件,字段为 static_id、origin_observation、frames(有序)、container、outcome、restored、also_covers、unswept_containers。动作的 task_id 为 `sweep:<page>`,audit 和 chain 校验不会把它当作计划任务。
|
|
189
|
+
- **final_utg:** sweep 帧一律归到被采集的页面。即使首屏以下的帧被识别成嵌入子页面,或因为锚点滚出屏幕而未映射,也照样归到该页。capture 上带 `sweep.index`,节点上写 `evidence.scroll`。`metadata.scroll_completeness` 改为 `per-node`,并附 `scroll_sweeps` 计数。
|
|
190
|
+
|
|
191
|
+
## 模型介入恢复 · C 类:找出触发控件(2026-09-29)
|
|
192
|
+
|
|
193
|
+
静态分析在代码里找到了一条边(源页 → 目标页),但不知道屏幕上哪个控件会触发它,比如代码分发的跳转,或者提示里没有带引号的文字。这类任务编译后状态为“无法执行”。`recover_b.mjs --class C` 复用 B 类的整套流程,只有两点不同:
|
|
194
|
+
|
|
195
|
+
- **`extract --class C`**:挑出无法执行、且源页已有确认截图的任务,优先用该任务所在阶段的截图,其次用任意阶段的。截图作为 `screen_before`,同时附上触发代码、审阅提示和静态边参数。手表模块、外部界面这类入口不参与。源页从未被确认过的任务留到下一轮。
|
|
196
|
+
- **`apply --class C`**:通过校验的手势作为这个任务的 `prelude` 和 `action`,并把任务状态置为 `compiled`,但只在 `recC-*` 变体阶段里生效(`variant.add_variant` 允许用覆盖字段让任务变为可执行)。设备确认后,`adopt` 会把它写进 `learned_task_steps`,下次编译时这个任务就直接可执行。
|
|
197
|
+
|
|
198
|
+
## 模型介入恢复 · D 类:构造所需的数据状态(2026-09-29)
|
|
199
|
+
|
|
200
|
+
有些边在代码里存在,但只在测试快照没有的状态下才会出现,比如已下载的单集、未订阅的播客、刷新失败、搜索结果。B、C 类的审阅方已经把这些标为 `unreachable`,并从源码读出了出现的条件。`recover_d.mjs` 让模型给出一份**配方**来在应用内构造这种状态,具体包括:
|
|
201
|
+
- 从哪个已有快照开始;
|
|
202
|
+
- 在应用内执行哪些步骤。动作词汇与 B 类相同,并新增 `type`(向前一步点过的输入框输入 ASCII 文字)和 `key`(只允许 ENTER、SEARCH、TAB、DEL);
|
|
203
|
+
- 可选:向本地测试 feed 服务器**新增**文件,但不能修改已有文件;
|
|
204
|
+
- 可选:`probe_steps`,走到能看到该状态的界面;
|
|
205
|
+
- 证明状态已具备的正向探针。
|
|
206
|
+
|
|
207
|
+
每份配方作为 `recD-<id>` 变体阶段执行,顺序为:
|
|
208
|
+
1. 恢复基础快照;
|
|
209
|
+
2. 启动应用;
|
|
210
|
+
3. 执行配方步骤;
|
|
211
|
+
4. `snapshot_app_data`:停止应用,把私有数据保存为 `<snapshot_dir>/recD-<id>.tar`,已存在的归档不会被覆盖;
|
|
212
|
+
5. 重新启动应用;
|
|
213
|
+
6. 执行 `probe_steps`;
|
|
214
|
+
7. 检查探针;
|
|
215
|
+
8. 运行任务。
|
|
216
|
+
|
|
217
|
+
探针不通过时阶段会阻塞,任务不会运行。生成的归档可以作为之后任何活动的测试快照。需要真实账号、外部服务、其他构建变体或系统文件选择器的项目,放入 `skipped` 并说明原因。
|
|
218
|
+
|
|
219
|
+
运行器新增的动作:
|
|
220
|
+
- `key`:白名单按键;
|
|
221
|
+
- `snapshot_app_data`:只能写入 `config.snapshot_dir`。
|
|
222
|
+
|
|
223
|
+
`report.md` 新增两节:
|
|
224
|
+
- **运行器能力缺口**:审阅方证明边存在,但运行器在自身规则内做不到,比如时间窗口短于一次观察;
|
|
225
|
+
- **源码确认不可达的边**。
|
|
226
|
+
|
|
227
|
+
B、C 类的步骤词汇也同步加入了 `type` 和 `key`。
|
|
228
|
+
|
|
229
|
+
### 工作清单与答案(2026-10-15)
|
|
230
|
+
|
|
231
|
+
D 的工作清单是带 `key` 的 `items`,可以用 `worklist_parts.mjs` 拆分:
|
|
232
|
+
- `requirement`(键 `b-<B 键>` / `c-<C 键>`):一个被 B/C 判为 `unreachable` 的项,带上它的任务和条件。
|
|
233
|
+
- `blocked-phases`(键 `p-<哈希>`):`requires` 相同的一组阶段,一个状态即可同时解锁。收入的阶段包括已 `blocked` 的,以及仍是 `pending`、但 config 里缺 fixture 或探针的(与 `close_phases.mjs` 的 `unrunnable` 同一判定)。之前 D 只收 `blocked`,而 `close_phases` 在整轮结束时才运行,所以 D 抽取时这些阶段从未进入清单。
|
|
234
|
+
- 按任务数从多到少排列。
|
|
235
|
+
|
|
236
|
+
每项按 `key` 作答:
|
|
237
|
+
- `{"key", "verdict": "recipe", "id", "base", "steps", "probes", ...}`:不写 `tasks` 时默认取该项的任务。
|
|
238
|
+
- `{"key", "verdict": "skipped", "reason"}`:写入报告的 `skipped`,不当作被拒配方。
|
|
239
|
+
- 配方 id 和新增 fixture 文件名以项的键开头,并行作答的各份不会冲突;重复的配方 id 会被拒绝。
|
|
240
|
+
- 不带 `key` 的旧格式配方列表仍然可用。
|
|
241
|
+
|
|
242
|
+
## 节点覆盖模式(2026-10-04,默认)
|
|
243
|
+
|
|
244
|
+
目标是“每个静态节点都有自己的截图和组件树”时使用。按边规划时,一个节点有几条入边就会被跑几次;恢复各类也会反复审阅目标页早已截到的项。以 AntennaPod(APL1_explore_1003)实测:469 个任务结果里,140 个开始时目标页已有截图;B、C、D 中目标页已有截图的分别是 24/53、29/38、39/55。
|
|
245
|
+
|
|
246
|
+
- **默认是节点模式**。要按边验证时,config.json 设 `"coverage_mode": "edges"`,或 `run_device.mjs --coverage edges`(命令行优先于 config)。
|
|
247
|
+
- **“已覆盖”的定义**(`utg_explorer/coverage.mjs` 中的 `covered_static_ids`):某个 `mapping` 事件对应的观察,其当前的 `static_resolution` 已验证为该节点,与 audit.mjs 统计 mapped 的规则相同。经源码关系确认的节点(宿主、默认子页、同布局孪生页)不算,因为它自己的界面从未被截到。
|
|
248
|
+
- **运行器**:任务的目标节点已覆盖时,记一条 `task_skipped`(`reason: target-already-covered`),不执行、也不记为失败。覆盖集合在阶段中实时增长,回放途中截到的节点会让它自己的任务也跳过。阶段原因里会写出跳过数和覆盖模式。
|
|
249
|
+
- **恢复各类的提取**:默认只保留能增加未覆盖节点的项;加 `--all-items` 保留全部(按边模式)。`--unmapped-only` 仍可写,与默认相同。
|
|
250
|
+
- A 类:页面本身未覆盖,或它挡住的任务的目标未覆盖。
|
|
251
|
+
- B 类:修复的回放跳转目标或边的目标未覆盖。
|
|
252
|
+
- C 类:边的目标未覆盖。
|
|
253
|
+
- D 类:需求或被阻塞阶段中有未覆盖目标的任务。
|
|
254
|
+
- `retry-identities`:同样过滤。
|
|
255
|
+
- **审阅拆分**:`worklist_parts.mjs split <worklist> --size 10` 把 A、B、C、D 和直接启动的工作清单拆成小份并行审阅,`merge [--seed]` 合并;缺项、重复、未知键都会拒绝。D 类先按状态归组再拆(见 D 类一节)。
|
|
256
|
+
- **事件时间戳**:每个事件带 `ts`(epoch 秒),报告可以据此计算阶段耗时;读取方忽略该字段。
|
|
257
|
+
|
|
258
|
+
在 APL1 记录上离线回放(不重跑设备)的结果:
|
|
259
|
+
|
|
260
|
+
| 指标 | 结果 |
|
|
261
|
+
|---|---|
|
|
262
|
+
| 任务内截图(运行时身份) | 少 26% |
|
|
263
|
+
| 任务内截图(离线规则提前可用) | 少 35% |
|
|
264
|
+
| 其中 C、D 类 | 少约 75% |
|
|
265
|
+
| 跳过的 138 个任务导致丢失的节点 | 1 个(`menu:feeditemlist_context`,它自己的任务不会被跳过,仍会尝试) |
|
|
266
|
+
| 工作清单 B/C/D | 53/38/55 项 → 38/15/29 项 |
|
|
267
|
+
|
|
268
|
+
代价是目标已覆盖的边不再尝试,验证的边会变少;需要边时再补跑一轮按边的任务。
|
|
269
|
+
|
|
270
|
+
设备实测(AntennaPod,APNODE_1004 对比 APL1_explore_1003):节点模式确认 114/141 页、验证 166/412 边,设备时间约 50 分钟;按边模式为 115/141 页、254/412 边、约 107 分钟。少的一个页面是 `menu:feeditemlist_context`,与离线回放的预测一致。
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Protocol and plan
|
|
2
|
+
|
|
3
|
+
The campaign is `static contract -> state/phase obligations -> serialized adapters -> evidence store -> fused UTG -> audit`.
|
|
4
|
+
|
|
5
|
+
An event is `{schema:"utg-event/1", id, kind, environment_id, payload, evidence[]}`. `observation` contains `observation_id`, package/activity/window, normalized `nodes`, `identity` and artifact paths. `action_result` contains `task_id`, `outcome`, `before`, `after`, and `reason`. `mapping` and `edge_mapping` retain source and confidence. A dynamic edge is confirmed only when both observations and the action are present.
|
|
6
|
+
|
|
7
|
+
An environment is an abstract state vector such as `auth=logged_out`, `content=empty`, `camera=granted`, `network=offline`. Create a new environment only when a static guard or runtime evidence requires it; do not enumerate a Cartesian product. Each phase has prerequisites, fixtures, obligations, a bounded retry budget, and an explicit terminal reason (`completed`, `blocked`, `unsupported`, `budget-exhausted`, or `pending`).
|
|
8
|
+
|
|
9
|
+
External tools use a wrapper with separate request/response JSON files. Their observations are `unmapped` until a configured positive rule or deterministic replay proves identity. Preserve raw traces and provenance.
|