@buaa_smat/hometrans 26.0.1 → 26.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -7
- package/agents/code-reviewer.md +25 -138
- package/dist/cli/index.js +4 -1
- package/dist/cli/init.js +131 -26
- package/dist/cli/uninstall.js +5 -5
- package/dist/platform/language.js +77 -0
- package/env-requirements.json +30 -5
- package/i18n/FILE-NAMES.md +9 -0
- package/i18n/agents/code-reviewer.md +364 -0
- package/i18n/agents/model-render-worker.md +38 -0
- package/i18n/agents/specgen-worker.md +18 -0
- package/i18n/commands/hometrans.md +17 -0
- package/i18n/skills/a2h-app-migrate/SKILL.md +198 -0
- package/i18n/skills/a2h-app-migrate/references/config.example.json +28 -0
- package/i18n/skills/a2h-app-migrate/references/specs.example.json +19 -0
- package/i18n/skills/a2h-app-migrate/references/stage-map.md +50 -0
- package/i18n/skills/a2h-app-migrate/references/workflow.yaml +1760 -0
- package/i18n/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +114 -0
- package/i18n/skills/a2h-app-migrate/scripts/env_preflight.mjs +1588 -0
- package/i18n/skills/a2h-app-migrate/scripts/human_review_gate.mjs +657 -0
- package/i18n/skills/a2h-app-migrate/scripts/validate_workflow.mjs +541 -0
- package/i18n/skills/a2h-app-migrate/test/test_android_index.mjs +131 -0
- package/i18n/skills/a2h-app-migrate/test/test_arch_done.mjs +54 -0
- package/i18n/skills/a2h-app-migrate/test/test_build_fixer_contract.mjs +98 -0
- package/i18n/skills/a2h-app-migrate/test/test_config_example.mjs +42 -0
- package/i18n/skills/a2h-app-migrate/test/test_ensure_utg_snapshot.mjs +147 -0
- package/i18n/skills/a2h-app-migrate/test/test_env_requirements.mjs +698 -0
- package/i18n/skills/a2h-app-migrate/test/test_finalize.mjs +89 -0
- package/i18n/skills/a2h-app-migrate/test/test_image_probe.mjs +120 -0
- package/i18n/skills/a2h-app-migrate/test/test_interaction.mjs +122 -0
- package/i18n/skills/a2h-app-migrate/test/test_preflight_report.mjs +93 -0
- package/i18n/skills/a2h-app-migrate/test/test_resume_plan.mjs +219 -0
- package/i18n/skills/a2h-app-migrate/test/test_resume_summary.mjs +196 -0
- package/i18n/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +100 -0
- package/i18n/skills/a2h-app-migrate/test/test_run_dir.mjs +488 -0
- package/i18n/skills/a2h-app-migrate/test/test_skill_doc.mjs +144 -0
- package/i18n/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +146 -0
- package/i18n/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +161 -0
- package/i18n/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +76 -0
- package/i18n/skills/a2h-app-migrate/test/test_ui_batch_gate.mjs +226 -0
- package/i18n/skills/a2h-app-migrate/test/test_user_facing_progress.mjs +43 -0
- package/i18n/skills/a2h-app-migrate/test/test_utg_static_done.mjs +171 -0
- package/i18n/skills/a2h-app-migrate/test/test_validate_workflow_bilingual.mjs +87 -0
- package/i18n/skills/a2h-arch-generate/SKILL.md +375 -0
- package/i18n/skills/a2h-arch-generate/examples/reconcile-existing-project.md +107 -0
- package/i18n/skills/a2h-arch-generate/examples/simple-conversion-backend.md +70 -0
- package/i18n/skills/a2h-arch-generate/references/arkts-mvvm-v2.md +1407 -0
- package/i18n/skills/a2h-arch-generate/references/artifact-contracts.generate.md +120 -0
- package/i18n/skills/a2h-arch-generate/references/artifact-contracts.reconcile.md +123 -0
- package/i18n/skills/a2h-arch-generate/references/bpta-layered-architecture-design.md +88 -0
- package/i18n/skills/a2h-arch-generate/references/database-schema-recovery.md +107 -0
- package/i18n/skills/a2h-arch-generate/references/existing-target-annotation.md +68 -0
- package/i18n/skills/a2h-arch-generate/references/harmony-project-inspection.md +150 -0
- package/i18n/skills/a2h-arch-generate/references/harmony-target-architecture.md +94 -0
- package/i18n/skills/a2h-arch-generate/references/homegraph-workflow.md +120 -0
- package/i18n/skills/a2h-arch-generate/references/source-baseline.md +93 -0
- package/i18n/skills/a2h-arch-generate/scripts/generate_source_baseline.mjs +360 -0
- package/i18n/skills/a2h-arch-generate/scripts/inspect_harmony_target.mjs +798 -0
- package/i18n/skills/a2h-arch-generate/scripts/lib/contract_terms.mjs +40 -0
- package/i18n/skills/a2h-arch-generate/scripts/module_create/generate.mjs +639 -0
- package/i18n/skills/a2h-arch-generate/scripts/module_create/testdata/reconcile-layer-PROJECT_DESIGN.md +47 -0
- package/i18n/skills/a2h-arch-generate/scripts/module_create/testdata/single-entry-PROJECT_DESIGN.md +15 -0
- package/i18n/skills/a2h-arch-generate/scripts/module_create/testdata/three-layer-PROJECT_DESIGN.md +36 -0
- package/i18n/skills/a2h-arch-generate/scripts/module_create/testdata/verification-report.md +150 -0
- package/i18n/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/pages.json +5 -0
- package/i18n/skills/a2h-arch-generate/scripts/tests/e2e/run_e2e.mjs +548 -0
- package/i18n/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +1261 -0
- package/i18n/skills/a2h-arch-generate/scripts/tests/test_module_templates.mjs +70 -0
- package/i18n/skills/a2h-arch-generate/scripts/validate_architecture_docs.mjs +851 -0
- package/i18n/skills/a2h-arch-generate/scripts/validate_data_docs.mjs +982 -0
- package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +9 -0
- package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +192 -0
- package/i18n/skills/a2h-arkts-logic-coder/references/spec-design.md +303 -0
- package/i18n/skills/a2h-arkts-logic-coder/scripts/design/move_spec_technical_reference.mjs +162 -0
- package/i18n/skills/a2h-arkts-logic-coder/scripts/design/validate_spec_design_output.mjs +298 -0
- package/i18n/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +587 -0
- package/i18n/skills/a2h-arkts-logic-coder/scripts/test_check_units.ts +149 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/golden/move_design.md +18 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/golden/move_design_crlf.md +18 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/golden/move_spec.md +7 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/golden/validate_issue_file.md +12 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/golden/validate_issues.json +57 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/test_spec_design_scripts.mjs +547 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +352 -0
- package/i18n/skills/a2h-batch-ui-align/SKILL.md +323 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/alignment.md +31 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/build.md +13 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/canvas.md +17 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/dynamics.md +27 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/geometry.md +80 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/interaction.md +22 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/resources.md +87 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/state-v1.md +29 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/state.md +14 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +57 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/window.md +29 -0
- package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +705 -0
- package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +417 -0
- package/i18n/skills/a2h-batch-ui-align/references/incremental-scope.md +139 -0
- package/i18n/skills/a2h-batch-ui-align/references/lottie-integration.md +43 -0
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +2549 -0
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +560 -0
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +148 -0
- package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_decorator-quickref.md +220 -0
- package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_paradigm-selection.md +28 -0
- package/i18n/skills/a2h-batch-ui-align/references/step3-capture.md +216 -0
- package/i18n/skills/a2h-batch-ui-align/references/step4-prepare.md +203 -0
- package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +210 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/android_parse_fast.ts +2005 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +1748 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/databinding_analyzer_design.md +79 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/detect_paradigm.mjs +245 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/draw_coverage.mjs +264 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +1787 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/gen_rule_docs.mjs +100 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/generate_pages_json.mjs +612 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/group_pack.mjs +1836 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/image_probe.mjs +405 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/measure_pack.ts +1406 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +1226 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +1220 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/state_doc.mjs +412 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/core/cli.ts +134 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/core/i18n.ts +18 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/main.ts +173 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +629 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/android_immersive.ts +125 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +67 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/block_comment_break.ts +64 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/blur_mirrored.ts +134 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/builder_call_sites.ts +242 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/builder_invokes_callback.ts +136 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/canvas.ts +255 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/color_string.ts +109 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/column_shrink.ts +154 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/constant_coordinate.ts +39 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/container_align.ts +140 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/entry_root_builtin.ts +69 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/entry_route.ts +114 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/fixed_size_safe_area.ts +103 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/format_string.ts +157 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/framework_dialog.ts +110 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/framework_picker.ts +115 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +551 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_content.ts +138 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +374 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/offset_in_scroll.ts +163 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/orphan_component.ts +119 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +119 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/page_reachability.ts +94 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/path_commands_vp.ts +50 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +80 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/popup_menu.ts +137 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/r_template_string.ts +37 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/request_permission.ts +98 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/resource_as_string.ts +68 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +97 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/safe_area_clipping.ts +168 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_delta.ts +178 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/sdk_api.ts +195 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/shared_chrome.ts +73 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_blur.ts +95 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/shell_content.ts +198 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/stack_occluding.ts +118 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/state_decorators.ts +73 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/state_name_shadows.ts +93 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/string_quote_leak.ts +73 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/surface_stroke.ts +50 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +123 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/track_getter.ts +132 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +53 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/window_mode.ts +67 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_a11y.test.mjs +598 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_blur.test.mjs +217 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_builder_calls.test.mjs +323 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_fidelity.test.mjs +507 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +427 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_occlusion_offset_format.test.mjs +372 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_review_fixes.test.mjs +298 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rules.test.mjs +365 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_scroll_padding_raster.test.mjs +262 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_weight_color.test.mjs +473 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +560 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/draw_coverage.test.mjs +245 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/export_ui_info.test.mjs +742 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/generate_pages_json.test.mjs +123 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/group_pack.test.mjs +363 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/image_probe.test.mjs +243 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +324 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/occlusion.test.mjs +102 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +325 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +48 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +387 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/static_check_registry.test.mjs +122 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/text_color_diff.test.mjs +250 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/text_color_diff.mjs +470 -0
- package/i18n/skills/a2h-coldstart-smoke-gate/SKILL.md +59 -0
- package/i18n/skills/a2h-dashboard-render/SKILL.md +73 -0
- package/i18n/skills/a2h-dashboard-render/references/artifact-contract.jsonc +117 -0
- package/i18n/skills/a2h-dashboard-render/references/artifact-registry-spec.md +67 -0
- package/i18n/skills/a2h-dashboard-render/references/dashboard-guide.md +91 -0
- package/i18n/skills/a2h-dashboard-render/references/dashboard.config.example.json +19 -0
- package/i18n/skills/a2h-dashboard-render/scripts/dashboard.mjs +3245 -0
- package/i18n/skills/a2h-dashboard-render/scripts/device_capture.mjs +2048 -0
- package/i18n/skills/a2h-dashboard-render/test/fixtures/page_capture/expected.json +156 -0
- package/i18n/skills/a2h-dashboard-render/test/fixtures/page_capture/hmos.json +1 -0
- package/i18n/skills/a2h-dashboard-render/test/fixtures/page_capture/list.xml +1 -0
- package/i18n/skills/a2h-dashboard-render/test/test_artifact_contract.mjs +168 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_architecture.mjs +118 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_build.mjs +93 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_i18n.mjs +154 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_node.mjs +1369 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_spec_pipeline.mjs +318 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_ui_pipeline.mjs +81 -0
- package/i18n/skills/a2h-dashboard-render/test/test_device_capture_env.mjs +115 -0
- package/i18n/skills/a2h-dashboard-render/test/test_device_capture_policy.mjs +411 -0
- package/i18n/skills/a2h-dashboard-render/test/test_page_capture.mjs +147 -0
- package/i18n/skills/a2h-dashboard-render/test/test_usage_readers.mjs +512 -0
- package/i18n/skills/a2h-fix-build-errors/SKILL.md +304 -0
- package/i18n/skills/a2h-fix-build-errors/references/arkts-strict-patterns.md +219 -0
- package/i18n/skills/a2h-fix-build-errors/references/rdb-entity-pattern.md +131 -0
- package/i18n/skills/a2h-module-semantic-docs/SKILL.md +227 -0
- package/i18n/skills/a2h-module-semantic-docs/test/golden/module_structure.json +187 -0
- package/i18n/skills/a2h-module-semantic-docs/test/golden/module_understanding.json +351 -0
- package/i18n/skills/a2h-module-semantic-docs/test/golden/module_update_plan.json +495 -0
- package/i18n/skills/a2h-module-semantic-docs/test/golden/project_directory_structure.json +157 -0
- package/i18n/skills/a2h-module-semantic-docs/test/test_scan_and_commit.mjs +388 -0
- package/i18n/skills/a2h-page-specgen/SKILL.md +136 -0
- package/i18n/skills/a2h-page-specgen/references/body-language.md +177 -0
- package/i18n/skills/a2h-page-specgen/references/gates.md +262 -0
- package/i18n/skills/a2h-page-specgen/references/page-inventory.md +173 -0
- package/i18n/skills/a2h-page-specgen/references/spec-template.md +207 -0
- package/i18n/skills/a2h-page-specgen/scripts/facts-build.mjs +1504 -0
- package/i18n/skills/a2h-page-specgen/scripts/footprint.mjs +1528 -0
- package/i18n/skills/a2h-page-specgen/scripts/gate.mjs +576 -0
- package/i18n/skills/a2h-page-specgen/scripts/interactions.mjs +138 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/contracts.mjs +262 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/hg.mjs +176 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/prose.mjs +248 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/reach.mjs +53 -0
- package/i18n/skills/a2h-page-specgen/scripts/prepare.mjs +506 -0
- package/i18n/skills/a2h-page-specgen/scripts/render.mjs +299 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +616 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +234 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/facts.test.mjs +1166 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +74 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/facts/i18n/zh.js.txt +8 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-b+zh+Hans/strings.xml +7 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-zh/strings.xml +8 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/utg/click_paths.json +28 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +758 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fsx.test.mjs +32 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +54 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/gate.test.mjs +271 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/helpers.mjs +54 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/hg.test.mjs +171 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/integration.test.mjs +301 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +83 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +139 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/keys.test.mjs +774 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +1011 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +77 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prose.test.mjs +419 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/reach.test.mjs +93 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +323 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +546 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/render.test.mjs +511 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/submit.test.mjs +701 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/utg-io.test.mjs +90 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +1765 -0
- package/i18n/skills/a2h-resource-convert/SKILL.md +367 -0
- package/i18n/skills/a2h-resource-convert/references/code-vector-icon-rules.md +335 -0
- package/i18n/skills/a2h-resource-convert/references/incremental-page-migration.md +251 -0
- package/i18n/skills/a2h-resource-convert/references/lottie-conversion-rules.md +219 -0
- package/i18n/skills/a2h-resource-convert/references/resource-mapping-rules.md +493 -0
- package/i18n/skills/a2h-resource-convert/references/step4-resource-types.md +249 -0
- package/i18n/skills/a2h-resource-convert/references/step7-report-template.md +217 -0
- package/i18n/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +2532 -0
- package/i18n/skills/a2h-resource-convert/scripts/tests/docs_only_i18n.test.mjs +44 -0
- package/i18n/skills/a2h-spec-design-pipeline/SKILL.md +278 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/coding-loop.md +260 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/merge-queue.md +163 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/scripts.md +44 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/specs.example.json +19 -0
- package/i18n/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +589 -0
- package/i18n/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +506 -0
- package/i18n/skills/a2h-spec-generate/SKILL.md +375 -0
- package/i18n/skills/a2h-spec-generate/references/batch-mode.md +215 -0
- package/i18n/skills/a2h-spec-generate/references/delete-blast-radius.md +3 -0
- package/i18n/skills/a2h-spec-generate/references/dispatch-watchdog.md +150 -0
- package/i18n/skills/a2h-spec-generate/references/fusion-task-contract.md +184 -0
- package/i18n/skills/a2h-spec-generate/references/input-formats.md +27 -0
- package/i18n/skills/a2h-spec-generate/references/library-evidence.md +3 -0
- package/i18n/skills/a2h-spec-generate/references/method-discipline.md +64 -0
- package/i18n/skills/a2h-spec-generate/references/optional-gates.json +45 -0
- package/i18n/skills/a2h-spec-generate/references/recall-guide.md +84 -0
- package/i18n/skills/a2h-spec-generate/references/recall-terse.md +3 -0
- package/i18n/skills/a2h-spec-generate/references/recall-uniapp.md +10 -0
- package/i18n/skills/a2h-spec-generate/references/requirement-scope.md +122 -0
- package/i18n/skills/a2h-spec-generate/references/review-checklist.md +22 -0
- package/i18n/skills/a2h-spec-generate/references/spec-sample-complex.md +80 -0
- package/i18n/skills/a2h-spec-generate/references/spec-sample-transfer.md +43 -0
- package/i18n/skills/a2h-spec-generate/references/spec-samples.md +65 -0
- package/i18n/skills/a2h-spec-generate/references/specs.schema.json +85 -0
- package/i18n/skills/a2h-spec-generate/references/synthesis-rules.md +145 -0
- package/i18n/skills/a2h-spec-generate/references/transfer-file.md +5 -0
- package/i18n/skills/a2h-spec-generate/references/transfer-socket.md +5 -0
- package/i18n/skills/a2h-spec-generate/references/worker-rules.md +129 -0
- package/i18n/skills/a2h-spec-generate/scripts/check-fused-spec.mjs +702 -0
- package/i18n/skills/a2h-spec-generate/scripts/check_spec.ts +515 -0
- package/i18n/skills/a2h-spec-generate/scripts/collect-specs.mjs +727 -0
- package/i18n/skills/a2h-spec-generate/scripts/feature-stem.mjs +151 -0
- package/i18n/skills/a2h-spec-generate/scripts/parse_requirements.ts +515 -0
- package/i18n/skills/a2h-spec-generate/scripts/prepare-facts.mjs +313 -0
- package/i18n/skills/a2h-spec-generate/scripts/publish-specs.mjs +354 -0
- package/i18n/skills/a2h-spec-generate/scripts/regroup-by-page.mjs +669 -0
- package/i18n/skills/a2h-spec-generate/scripts/render-tasks.mjs +385 -0
- package/i18n/skills/a2h-spec-generate/scripts/report.mjs +136 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/build.ts +2217 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/component-variants.ts +845 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/policy.ts +572 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/traceability.ts +580 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/req-model/build.ts +1265 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/area-facts.ts +1057 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/behavior-seed.ts +565 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/library-evidence.ts +544 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/navigation-guard.ts +363 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/schema.ts +317 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/selfcheck.ts +707 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/spec-bindings.ts +436 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/task-contract.ts +608 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/contracts.ts +650 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/task-contract.ts +178 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/tree-sitter-adapter.ts +923 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/model/finalize.ts +912 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/model/task.ts +279 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/requirement-scope.ts +163 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/source-index/homegraph.ts +1039 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/validation/req-text.ts +256 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fixtures/fusion-run.ts +243 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-area-facts.test.ts +576 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-detectors.test.ts +176 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-e2e.test.ts +103 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-schema.test.ts +111 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-selfcheck.test.ts +307 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-contract.test.ts +340 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-finalize.test.ts +1857 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-navigation-guard.test.ts +262 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-prepare.test.ts +722 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-scope.test.ts +339 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-selfcheck.test.ts +1253 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-spec.test.ts +608 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/model-scope.test.ts +411 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/model-task-contract.test.ts +300 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/model-v4.test.ts +1061 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/uniapp-scanner.test.ts +159 -0
- package/i18n/skills/a2h-spec-generate/template/REQ.txt +22 -0
- package/i18n/skills/a2h-spec-generate/template/REQ.xlsx +0 -0
- package/i18n/skills/a2h-spec-generate/test/check-fused-spec.test.mjs +847 -0
- package/i18n/skills/a2h-spec-generate/test/check-spec.test.ts +415 -0
- package/i18n/skills/a2h-spec-generate/test/collect-specs.test.mjs +808 -0
- package/i18n/skills/a2h-spec-generate/test/feature-stem.test.mjs +157 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/components/MyCard.vue +9 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/feature/editor/index.vue +1 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/detail/index.vue +1 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/home/index.vue +33 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/settings/index.vue +1 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages.json +23 -0
- package/i18n/skills/a2h-spec-generate/test/inspect-uniapp.test.mjs +54 -0
- package/i18n/skills/a2h-spec-generate/test/prepare-facts.test.mjs +41 -0
- package/i18n/skills/a2h-spec-generate/test/publish-specs.test.mjs +295 -0
- package/i18n/skills/a2h-spec-generate/test/regroup-by-page.test.mjs +354 -0
- package/i18n/skills/a2h-spec-generate/test/render-tasks.test.mjs +596 -0
- package/i18n/skills/a2h-spec-generate/test/report.test.mjs +47 -0
- package/i18n/skills/a2h-utg-explorer/SKILL.md +120 -0
- package/i18n/skills/a2h-utg-explorer/references/architecture.md +279 -0
- package/i18n/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +918 -0
- package/i18n/skills/a2h-utg-explorer/scripts/final_utg.mjs +446 -0
- package/i18n/skills/a2h-utg-explorer/scripts/hint_check.mjs +147 -0
- package/i18n/skills/a2h-utg-explorer/scripts/hint_source.mjs +119 -0
- package/i18n/skills/a2h-utg-explorer/scripts/recover_b.mjs +550 -0
- package/i18n/skills/a2h-utg-explorer/scripts/recover_d.mjs +380 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/attest.test.mjs +66 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/compose_identity.test.mjs +302 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/content_wait.test.mjs +207 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/direct_launch.test.mjs +130 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/final_utg.test.mjs +135 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/generalization_fixes.test.mjs +252 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/hint_check.test.mjs +129 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +492 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +199 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/overflow_prefix.test.mjs +327 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/overlay_identity.test.mjs +204 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/page_identity_tiers.test.mjs +393 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/pager_navigation.test.mjs +119 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/panel_routes.test.mjs +208 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/pipeline.test.mjs +240 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/recover_b.test.mjs +173 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/recover_d.test.mjs +280 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/robustness_fixes.test.mjs +345 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/runner_capabilities.test.mjs +194 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/semantics.test.mjs +102 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/state_ambiguity.test.mjs +92 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/twin_opener.test.mjs +119 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/variant_strings.test.mjs +63 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +1412 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +2037 -0
- package/i18n/skills/a2h-utg-static/SKILL.md +368 -0
- package/i18n/skills/a2h-utg-static/references/ui-elements-static-utg-schema.md +248 -0
- package/i18n/skills/a2h-utg-static/references/view-interactions.md +215 -0
- package/i18n/skills/a2h-utg-static/scripts/assemble.mjs +2120 -0
- package/i18n/skills/a2h-utg-static/scripts/audit.mjs +268 -0
- package/i18n/skills/a2h-utg-static/scripts/click_paths.mjs +609 -0
- package/i18n/skills/a2h-utg-static/scripts/compose_body_text.mjs +250 -0
- package/i18n/skills/a2h-utg-static/scripts/compose_titles.mjs +374 -0
- package/i18n/skills/a2h-utg-static/scripts/compose_widgets.mjs +498 -0
- package/i18n/skills/a2h-utg-static/scripts/fragment_nav.mjs +1137 -0
- package/i18n/skills/a2h-utg-static/scripts/hybrid_scope.mjs +660 -0
- package/i18n/skills/a2h-utg-static/scripts/interaction_sites.mjs +267 -0
- package/i18n/skills/a2h-utg-static/scripts/label_resolve.mjs +913 -0
- package/i18n/skills/a2h-utg-static/scripts/nl_hints.mjs +517 -0
- package/i18n/skills/a2h-utg-static/scripts/presenter_nav.mjs +490 -0
- package/i18n/skills/a2h-utg-static/scripts/static_prior.mjs +956 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/regression_matrix.mjs +1261 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_callee_string_default.mjs +30 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_chrome_tokens.mjs +60 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_commented_out_trigger.mjs +111 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +108 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_vm_nav.mjs +289 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_disabled_guard.mjs +42 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_drawer_panel_gesture.mjs +140 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_fresh_branch_guard.mjs +49 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hint_language.mjs +136 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_bundle_attribution.mjs +74 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_bundled_pages.mjs +181 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +293 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_title_renders.mjs +118 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_label_accessor_forms.mjs +187 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_label_source.mjs +70 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_launch_intent_guard.mjs +67 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_login_interceptor.mjs +368 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_mode_and_cb_param.mjs +172 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +44 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_nl_hint_grammar.mjs +42 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_nl_hints_gate.mjs +85 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_nl_hints_off_path.mjs +67 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_non_gesture_step_flag.mjs +62 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_preference_widgets.mjs +48 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_read_text_crlf.mjs +41 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_sealed_dialog_state.mjs +148 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_state_specific_hop.mjs +130 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_synthetic_label_identity.mjs +51 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_template_title.mjs +61 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_ui_elements_flow_filter.mjs +110 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_data_table.mjs +340 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_relative_url.mjs +125 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +231 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_viewpage_nav.mjs +340 -0
- package/i18n/skills/a2h-utg-static/scripts/uniapp_nav.mjs +1351 -0
- package/i18n/skills/a2h-utg-static/scripts/uniapp_widgets.mjs +244 -0
- package/i18n/skills/a2h-utg-static/tools/convert_static_utg_to_ui_elements.ts +769 -0
- package/package.json +13 -160
- package/platforms/deveco/agents/code-reviewer.frontmatter.md +1 -1
- package/platforms/opencode/agents/code-reviewer.frontmatter.md +1 -1
- package/skills/a2h-app-migrate/SKILL.md +17 -6
- package/skills/a2h-app-migrate/references/config.example.json +1 -0
- package/skills/a2h-app-migrate/references/stage-map.md +3 -1
- package/skills/a2h-app-migrate/references/workflow.yaml +138 -47
- package/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +1 -2
- package/skills/a2h-app-migrate/scripts/env_preflight.mjs +105 -39
- package/skills/a2h-app-migrate/scripts/human_review_gate.mjs +7 -8
- package/skills/a2h-app-migrate/scripts/ledger.mjs +17 -5
- package/skills/a2h-app-migrate/scripts/resume_plan.mjs +43 -7
- package/skills/a2h-app-migrate/scripts/run_dir.mjs +127 -41
- package/skills/a2h-app-migrate/scripts/spec_layout.mjs +2 -0
- package/skills/a2h-app-migrate/scripts/validate_workflow.mjs +38 -0
- package/skills/a2h-app-migrate/test/test_android_index.mjs +131 -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 +98 -0
- package/skills/a2h-app-migrate/test/test_config_example.mjs +42 -0
- package/skills/a2h-app-migrate/test/test_devecocli_docs_preflight.mjs +32 -0
- package/skills/a2h-app-migrate/test/test_ensure_utg_snapshot.mjs +147 -0
- package/skills/a2h-app-migrate/test/test_entry_guards.mjs +102 -0
- package/skills/a2h-app-migrate/test/test_env_requirements.mjs +698 -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_i18n_engine_mirror.mjs +51 -0
- package/skills/a2h-app-migrate/test/test_image_probe.mjs +120 -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 +111 -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 +93 -0
- package/skills/a2h-app-migrate/test/test_resume_plan.mjs +219 -0
- package/skills/a2h-app-migrate/test/test_resume_summary.mjs +196 -0
- package/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +100 -0
- package/skills/a2h-app-migrate/test/test_run_dir.mjs +488 -0
- package/skills/a2h-app-migrate/test/test_skill_doc.mjs +144 -0
- package/skills/a2h-app-migrate/test/test_spec_engine_acceptance.mjs +94 -0
- package/skills/a2h-app-migrate/test/test_spec_engine_contract.mjs +147 -0
- package/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +146 -0
- package/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +161 -0
- package/skills/a2h-app-migrate/test/test_spec_pipeline_done.mjs +344 -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_uniapp_preflight.mjs +83 -0
- package/skills/a2h-app-migrate/test/test_user_facing_progress.mjs +43 -0
- package/skills/a2h-app-migrate/test/test_utg_dirs.mjs +41 -0
- package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +178 -0
- package/skills/a2h-app-migrate/test/test_validate_races.mjs +50 -0
- package/skills/a2h-app-migrate/test/test_validate_workflow_bilingual.mjs +87 -0
- package/skills/a2h-arch-generate/SKILL.md +1 -1
- package/skills/a2h-arch-generate/references/database-schema-recovery.md +2 -2
- package/skills/a2h-arch-generate/references/harmony-project-inspection.md +8 -8
- package/skills/a2h-arch-generate/references/homegraph-workflow.md +15 -6
- package/skills/a2h-arch-generate/references/module-evidence-subagent.md +2 -2
- package/skills/a2h-arch-generate/references/source-baseline.md +2 -2
- package/skills/a2h-arch-generate/scripts/generate_source_baseline.mjs +35 -46
- package/skills/a2h-arch-generate/scripts/inspect_harmony_target.mjs +33 -40
- package/skills/a2h-arch-generate/scripts/module_create/generate.mjs +2 -3
- 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 +1260 -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_module_templates.mjs +70 -0
- package/skills/a2h-arch-generate/scripts/tests/test_router.mjs +138 -0
- package/skills/a2h-arch-generate/scripts/validate_architecture_docs.mjs +2 -5
- package/skills/a2h-arkts-logic-coder/SKILL.md +21 -2
- package/skills/a2h-arkts-logic-coder/references/ISSUES.md +1 -0
- package/skills/a2h-arkts-logic-coder/references/code-generation.md +62 -0
- package/skills/a2h-arkts-logic-coder/references/spec-design.md +4 -0
- package/skills/a2h-arkts-logic-coder/scripts/design/validate_spec_design_output.mjs +22 -25
- package/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +583 -0
- package/skills/a2h-arkts-logic-coder/test/golden/inspect_happy.json +20 -0
- package/skills/a2h-arkts-logic-coder/test/golden/move_design.md +18 -0
- package/skills/a2h-arkts-logic-coder/test/golden/move_design_crlf.md +18 -0
- package/skills/a2h-arkts-logic-coder/test/golden/move_spec.md +7 -0
- package/skills/a2h-arkts-logic-coder/test/golden/resolve_cases.json +36 -0
- package/skills/a2h-arkts-logic-coder/test/golden/validate_issue_file.md +12 -0
- package/skills/a2h-arkts-logic-coder/test/golden/validate_issues.json +57 -0
- package/skills/a2h-arkts-logic-coder/test/test_spec_design_scripts.mjs +547 -0
- package/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +352 -0
- package/skills/a2h-batch-ui-align/SKILL.md +6 -4
- package/skills/a2h-batch-ui-align/references/cards/geometry.md +1 -1
- package/skills/a2h-batch-ui-align/references/cards/resources.md +4 -0
- package/skills/a2h-batch-ui-align/references/cards/widgets.md +22 -3
- package/skills/a2h-batch-ui-align/references/checker-rules.md +66 -3
- package/skills/a2h-batch-ui-align/references/conversion-procedure.md +45 -8
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +7 -5
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +2 -2
- package/skills/a2h-batch-ui-align/references/step4-prepare.md +4 -2
- package/skills/a2h-batch-ui-align/references/step5-convert.md +7 -5
- package/skills/a2h-batch-ui-align/scripts/android_parse_fast.ts +6 -7
- package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +84 -7
- package/skills/a2h-batch-ui-align/scripts/draw_coverage.mjs +264 -0
- package/skills/a2h-batch-ui-align/scripts/evidence_gate.mjs +229 -0
- package/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +1 -2
- package/skills/a2h-batch-ui-align/scripts/generate_pages_json.mjs +4 -5
- package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +88 -26
- package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +305 -12
- package/skills/a2h-batch-ui-align/scripts/image_probe.mjs +231 -54
- package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +8 -9
- package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +18 -5
- package/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +103 -3
- package/skills/a2h-batch-ui-align/scripts/static_check/core/android.ts +231 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/core/i18n.ts +1 -5
- package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +14 -8
- package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +8 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/android_immersive.ts +3 -3
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/blur_mirrored.ts +2 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/builder_invokes_callback.ts +84 -19
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/color_string.ts +11 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/constant_coordinate.ts +2 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/framework_dialog.ts +110 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/framework_picker.ts +5 -5
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_content.ts +2 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +66 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +119 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/popup_menu.ts +81 -8
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_delta.ts +178 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +123 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/window_mode.ts +2 -3
- package/skills/a2h-batch-ui-align/scripts/static_check/scan_file.ts +6 -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_a11y.test.mjs +598 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_align_tint.test.mjs +312 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_blur.test.mjs +217 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_builder_calls.test.mjs +323 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_canvas_pct.test.mjs +312 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_fidelity.test.mjs +507 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +427 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_occlusion_offset_format.test.mjs +372 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_review_fixes.test.mjs +298 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rule_smoke.test.mjs +235 -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_scroll_padding_raster.test.mjs +262 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_scroll_safearea.test.mjs +742 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_shell.test.mjs +91 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_theme.test.mjs +86 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_weight_color.test.mjs +473 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +567 -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/detect_paradigm.test.mjs +260 -0
- package/skills/a2h-batch-ui-align/scripts/tests/draw_coverage.test.mjs +244 -0
- package/skills/a2h-batch-ui-align/scripts/tests/evidence_gate.test.mjs +420 -0
- package/skills/a2h-batch-ui-align/scripts/tests/export_scroll_states.test.mjs +31 -0
- package/skills/a2h-batch-ui-align/scripts/tests/export_ui_info.test.mjs +742 -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 +363 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +1628 -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/image_probe.test.mjs +243 -0
- package/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +324 -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 +325 -0
- package/skills/a2h-batch-ui-align/scripts/tests/shell_contract.test.mjs +297 -0
- package/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +48 -0
- package/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +387 -0
- package/skills/a2h-batch-ui-align/scripts/tests/static_check_registry.test.mjs +122 -0
- package/skills/a2h-batch-ui-align/scripts/tests/test_bfs_exit.ts +49 -0
- package/skills/a2h-batch-ui-align/scripts/tests/text_color_diff.test.mjs +250 -0
- package/skills/a2h-dashboard-render/scripts/dashboard.mjs +12 -14
- package/skills/a2h-dashboard-render/scripts/device_capture.mjs +29 -30
- 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 +168 -0
- package/skills/a2h-dashboard-render/test/test_cli_check_registry.mjs +99 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_architecture.mjs +118 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_build.mjs +93 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_i18n.mjs +203 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_node.mjs +1369 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_spec_pipeline.mjs +318 -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 +411 -0
- package/skills/a2h-dashboard-render/test/test_page_capture.mjs +147 -0
- package/skills/a2h-dashboard-render/test/test_usage_readers.mjs +512 -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-page-specgen/SKILL.md +136 -0
- package/skills/a2h-page-specgen/references/body-language.md +177 -0
- package/skills/a2h-page-specgen/references/evidence.md +70 -0
- package/skills/a2h-page-specgen/references/execution-model.md +255 -0
- package/skills/a2h-page-specgen/references/footprint-and-grouping.md +250 -0
- package/skills/a2h-page-specgen/references/gates.md +255 -0
- package/skills/a2h-page-specgen/references/page-inventory.md +173 -0
- package/skills/a2h-page-specgen/references/spec-template.md +207 -0
- package/skills/a2h-page-specgen/scripts/dispatch.mjs +209 -0
- package/skills/a2h-page-specgen/scripts/facts-build.mjs +1504 -0
- package/skills/a2h-page-specgen/scripts/finalize.mjs +422 -0
- package/skills/a2h-page-specgen/scripts/footprint.mjs +1528 -0
- package/skills/a2h-page-specgen/scripts/gate.mjs +558 -0
- package/skills/a2h-page-specgen/scripts/interactions.mjs +137 -0
- package/skills/a2h-page-specgen/scripts/inventory.mjs +269 -0
- package/skills/a2h-page-specgen/scripts/lib/contracts.mjs +255 -0
- package/skills/a2h-page-specgen/scripts/lib/deps-source.mjs +399 -0
- package/skills/a2h-page-specgen/scripts/lib/draft-store.mjs +137 -0
- package/skills/a2h-page-specgen/scripts/lib/footprint-roles.mjs +278 -0
- package/skills/a2h-page-specgen/scripts/lib/fsx.mjs +79 -0
- package/skills/a2h-page-specgen/scripts/lib/hg.mjs +175 -0
- package/skills/a2h-page-specgen/scripts/lib/ledger.mjs +355 -0
- package/skills/a2h-page-specgen/scripts/lib/prose.mjs +234 -0
- package/skills/a2h-page-specgen/scripts/lib/reach.mjs +53 -0
- package/skills/a2h-page-specgen/scripts/lib/source-text.mjs +391 -0
- package/skills/a2h-page-specgen/scripts/lib/symbols.mjs +125 -0
- package/skills/a2h-page-specgen/scripts/lib/utg-io.mjs +110 -0
- package/skills/a2h-page-specgen/scripts/lib/waker-event-store.mjs +658 -0
- package/skills/a2h-page-specgen/scripts/prepare.mjs +492 -0
- package/skills/a2h-page-specgen/scripts/render.mjs +317 -0
- package/skills/a2h-page-specgen/scripts/report.mjs +7 -0
- package/skills/a2h-page-specgen/scripts/submission.mjs +532 -0
- package/skills/a2h-page-specgen/scripts/submit.mjs +79 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/README.md +77 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +590 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/cases.example.json +57 -0
- package/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +207 -0
- package/skills/a2h-page-specgen/scripts/test/dispatch.test.mjs +258 -0
- package/skills/a2h-page-specgen/scripts/test/facts.test.mjs +1164 -0
- package/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +74 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Api.kt +20 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/BothAnnotations.kt +28 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Cache.kt +7 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Comments.kt +26 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Mmkv.kt +7 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Models.kt +19 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Pair.kt +7 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Prefs.kt +9 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Room.kt +11 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Sample.kt +43 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Templates.kt +34 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Timeouts.kt +8 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/androidTest/Helper.kt +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/build.gradle.kts +16 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/i18n/en.js.txt +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/i18n/zh.js.txt +4 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/libs.versions.toml +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/package.json +10 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values/strings.xml +10 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-b+zh+Hans/strings.xml +4 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-land/strings.xml +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-night/strings.xml +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-v21/strings.xml +4 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-zh/strings.xml +4 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/test/Legacy.kt +4 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/weather.proto +11 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-container/src/AppPreferences.kt +13 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-container/src/SettingsViewModel.kt +16 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-dao/src/UserDao.kt +28 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-moko/i18n/src/commonMain/moko-resources/base/strings.xml +6 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-moko/i18n/src/commonMain/moko-resources/fil/strings.xml +6 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/res/values/arrays.xml +25 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/res/values/strings.xml +10 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/res/xml/prefs.xml +27 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/Api.java +19 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/Datastore.kt +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/Settings.java +13 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/forecast.js +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/store.js +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-receiver/src/BasePreferences.kt +13 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-receiver/src/Screen.kt +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-receiver/src/UiPreferences.kt +8 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-retrofit/src/AuthAPI.kt +26 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/AndroidManifest.xml +20 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/feature/auth/navigation/ScreenRoute.kt +8 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/pages.json +19 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/components/Widget.vue +11 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/pages/detail/detail.vue +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/pages/index/index.vue +24 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/store/userStore.js +11 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/uni_modules/uview-ui/components/u-thing.js +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp.mkdb.mjs +144 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +94 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/MainFragment.java +6 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ManyListeners.java +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/PlainActivity.java +3 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/utg/click_paths.json +28 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/utg/fold-chain/utg.json +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/utg/utg.json +34 -0
- package/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +758 -0
- package/skills/a2h-page-specgen/scripts/test/footprint-roles.test.mjs +172 -0
- package/skills/a2h-page-specgen/scripts/test/fsx.test.mjs +32 -0
- package/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +54 -0
- package/skills/a2h-page-specgen/scripts/test/gate.test.mjs +222 -0
- package/skills/a2h-page-specgen/scripts/test/helpers.mjs +54 -0
- package/skills/a2h-page-specgen/scripts/test/hg.test.mjs +171 -0
- package/skills/a2h-page-specgen/scripts/test/integration.test.mjs +301 -0
- package/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +45 -0
- package/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +139 -0
- package/skills/a2h-page-specgen/scripts/test/keys.test.mjs +774 -0
- package/skills/a2h-page-specgen/scripts/test/ledger.test.mjs +464 -0
- package/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +1011 -0
- package/skills/a2h-page-specgen/scripts/test/prepare-index.test.mjs +120 -0
- package/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +68 -0
- package/skills/a2h-page-specgen/scripts/test/prose.test.mjs +390 -0
- package/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +167 -0
- package/skills/a2h-page-specgen/scripts/test/reach.test.mjs +93 -0
- package/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +323 -0
- package/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +546 -0
- package/skills/a2h-page-specgen/scripts/test/render.test.mjs +503 -0
- package/skills/a2h-page-specgen/scripts/test/source-text.test.mjs +181 -0
- package/skills/a2h-page-specgen/scripts/test/submit.test.mjs +701 -0
- package/skills/a2h-page-specgen/scripts/test/utg-io.test.mjs +90 -0
- package/skills/a2h-page-specgen/scripts/test/waker-event-store.test.mjs +1365 -0
- package/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +1765 -0
- package/skills/a2h-page-specgen/scripts/test/waker.test.mjs +1979 -0
- package/skills/a2h-page-specgen/scripts/test/watchdog.test.mjs +313 -0
- package/skills/a2h-page-specgen/scripts/waker.mjs +1234 -0
- package/skills/a2h-page-specgen/scripts/watchdog.mjs +298 -0
- package/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +49 -51
- 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-resource-convert/scripts/tests/docs_only_i18n.test.mjs +44 -0
- package/skills/a2h-spec-design-pipeline/SKILL.md +79 -78
- package/skills/a2h-spec-design-pipeline/references/coding-loop.md +51 -12
- package/skills/a2h-spec-design-pipeline/references/execution-model.md +24 -6
- package/skills/a2h-spec-design-pipeline/references/final-report-template.md +3 -2
- package/skills/a2h-spec-design-pipeline/references/initialization.md +15 -4
- package/skills/a2h-spec-design-pipeline/references/merge-queue.md +82 -41
- package/skills/a2h-spec-design-pipeline/references/resolver-prompt.md +61 -0
- package/skills/a2h-spec-design-pipeline/references/scripts.md +19 -10
- package/skills/a2h-spec-design-pipeline/references/shared-layer.md +267 -0
- package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +61 -8
- package/skills/a2h-spec-design-pipeline/references/static-defect-gate.md +62 -13
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleMeta.json +8 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleSet.json +8 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-cn.md +55 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-en.md +60 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/HttpExtraDataEmptyStringCheck.js +488 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/index.js +11 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/package.json +17 -0
- package/skills/a2h-spec-design-pipeline/scripts/branch_landed.ts +12 -38
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/evidence.mjs +40 -5
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/fold.mjs +18 -0
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/landing.mjs +74 -0
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/progress.mjs +1 -1
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/wait.mjs +1 -1
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/worktree.mjs +2 -2
- package/skills/a2h-spec-design-pipeline/scripts/dispatch.mjs +128 -5
- package/skills/a2h-spec-design-pipeline/scripts/ensure_wt_index.ts +98 -35
- package/skills/a2h-spec-design-pipeline/scripts/homecheck_scan.ts +218 -37
- package/skills/a2h-spec-design-pipeline/scripts/lib/shared_classes.ts +113 -0
- package/skills/a2h-spec-design-pipeline/scripts/lib/shared_docs.ts +202 -0
- package/skills/a2h-spec-design-pipeline/scripts/lib/wiring.ts +58 -0
- package/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +6 -7
- package/skills/a2h-spec-design-pipeline/scripts/resolve_wiring.ts +3 -0
- package/skills/a2h-spec-design-pipeline/scripts/resolver_prompt.ts +348 -0
- package/skills/a2h-spec-design-pipeline/scripts/scan_shared.ts +642 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_commands.mjs +15 -5
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_e2e.mjs +7 -2
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_evidence.mjs +104 -1
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_fold.mjs +24 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_landing.mjs +394 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_progress.mjs +24 -1
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_wait.mjs +14 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_wt_index.ts +163 -5
- package/skills/a2h-spec-design-pipeline/scripts/test_homecheck_scan.ts +15 -7
- package/skills/a2h-spec-design-pipeline/scripts/test_resolve_wiring.ts +14 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_resolver_prompt.ts +350 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_scan_shared.ts +996 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_classes.ts +80 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_docs.ts +205 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_docs.ts +121 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_e2e.ts +85 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_validate_shared_manifest.ts +720 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_wiring.ts +40 -0
- package/skills/a2h-spec-design-pipeline/scripts/validate_shared_manifest.ts +566 -0
- package/skills/a2h-spec-generate/SKILL.md +87 -21
- package/skills/a2h-spec-generate/references/batch-mode.md +78 -17
- package/skills/a2h-spec-generate/references/dispatch-watchdog.md +150 -0
- package/skills/a2h-spec-generate/references/fusion-task-contract.md +7 -0
- package/skills/a2h-spec-generate/references/review-checklist.md +1 -0
- package/skills/a2h-spec-generate/references/synthesis-rules.md +4 -2
- package/skills/a2h-spec-generate/references/worker-rules.md +6 -3
- package/skills/a2h-spec-generate/scripts/check-fused-spec.mjs +4 -5
- package/skills/a2h-spec-generate/scripts/check_spec.ts +145 -14
- package/skills/a2h-spec-generate/scripts/collect-specs.mjs +261 -19
- package/skills/a2h-spec-generate/scripts/dispatch-watch.mjs +1168 -0
- package/skills/a2h-spec-generate/scripts/feature-stem.mjs +1 -2
- package/skills/a2h-spec-generate/scripts/publish-specs.mjs +1 -2
- package/skills/a2h-spec-generate/scripts/regroup-by-page.mjs +1 -2
- package/skills/a2h-spec-generate/scripts/render-tasks.mjs +25 -46
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/build.ts +26 -27
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/component-variants.ts +3 -6
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/policy.ts +31 -32
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/traceability.ts +2 -3
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/req-model/build.ts +15 -26
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/area-facts.ts +102 -81
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/behavior-seed.ts +39 -19
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/library-evidence.ts +12 -13
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/navigation-guard.ts +363 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/task-contract.ts +35 -196
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/contracts.ts +3 -1
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/task-contract.ts +22 -96
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/tree-sitter-adapter.ts +3 -4
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/contracts.ts +1 -1
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/finalize.ts +74 -7
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/prepare.ts +51 -7
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/task.ts +42 -111
- package/skills/a2h-spec-generate/scripts/reqgen/src/requirement-scope.ts +1 -20
- package/skills/a2h-spec-generate/scripts/reqgen/src/source-index/homegraph.ts +1 -2
- package/skills/a2h-spec-generate/scripts/reqgen/src/validation/req-text.ts +3 -4
- 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/fixtures/fusion-run.ts +243 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fixtures/zip.ts +63 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-area-facts.test.ts +650 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-detectors.test.ts +176 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-e2e.test.ts +103 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-schema.test.ts +111 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-seed.test.ts +195 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-selfcheck.test.ts +307 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-contract.test.ts +347 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-finalize.test.ts +1948 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-library-evidence.test.ts +239 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-navigation-guard.test.ts +277 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-prepare.test.ts +844 -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 +1253 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-spec.test.ts +608 -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 +411 -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 +300 -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/test/zip.test.ts +61 -0
- package/skills/a2h-spec-generate/test/check-fused-spec.test.mjs +879 -0
- package/skills/a2h-spec-generate/test/check-spec.test.ts +430 -0
- package/skills/a2h-spec-generate/test/collect-specs.test.mjs +811 -0
- package/skills/a2h-spec-generate/test/detect-project.test.mjs +37 -0
- package/skills/a2h-spec-generate/test/dispatch-watch.test.mjs +606 -0
- package/skills/a2h-spec-generate/test/ensure-index.test.mjs +230 -0
- package/skills/a2h-spec-generate/test/feature-stem.test.mjs +157 -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/prepare-facts.test.mjs +41 -0
- package/skills/a2h-spec-generate/test/publication-verdict.test.mjs +182 -0
- package/skills/a2h-spec-generate/test/publish-specs.test.mjs +295 -0
- package/skills/a2h-spec-generate/test/regroup-by-page.test.mjs +354 -0
- package/skills/a2h-spec-generate/test/render-tasks.test.mjs +596 -0
- package/skills/a2h-spec-generate/test/report.test.mjs +47 -0
- package/skills/a2h-utg-explorer/references/architecture.md +4 -0
- package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +64 -80
- package/skills/a2h-utg-explorer/scripts/hint_check.mjs +1 -2
- package/skills/a2h-utg-explorer/scripts/recover.mjs +1 -1
- package/skills/a2h-utg-explorer/scripts/rejudge.mjs +5 -3
- package/skills/a2h-utg-explorer/scripts/tests/attest.test.mjs +66 -0
- package/skills/a2h-utg-explorer/scripts/tests/calendar_round_fixes.test.mjs +244 -0
- package/skills/a2h-utg-explorer/scripts/tests/chain.test.mjs +45 -0
- package/skills/a2h-utg-explorer/scripts/tests/compose_identity.test.mjs +302 -0
- package/skills/a2h-utg-explorer/scripts/tests/content_wait.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 +231 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_health.test.mjs +160 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_locale_identity.test.mjs +77 -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 +137 -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/fresh_state_plan.test.mjs +78 -0
- package/skills/a2h-utg-explorer/scripts/tests/generalization_fixes.test.mjs +252 -0
- package/skills/a2h-utg-explorer/scripts/tests/hint_check.test.mjs +129 -0
- package/skills/a2h-utg-explorer/scripts/tests/holds_without_data_parity.test.mjs +26 -0
- package/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +492 -0
- package/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +199 -0
- package/skills/a2h-utg-explorer/scripts/tests/launch_failure.test.mjs +40 -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 +327 -0
- package/skills/a2h-utg-explorer/scripts/tests/overlay_identity.test.mjs +204 -0
- package/skills/a2h-utg-explorer/scripts/tests/page_identity_tiers.test.mjs +393 -0
- package/skills/a2h-utg-explorer/scripts/tests/pager_navigation.test.mjs +119 -0
- package/skills/a2h-utg-explorer/scripts/tests/panel_routes.test.mjs +208 -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 +280 -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 +454 -0
- package/skills/a2h-utg-explorer/scripts/tests/runner_capabilities.test.mjs +194 -0
- package/skills/a2h-utg-explorer/scripts/tests/scope.test.mjs +229 -0
- package/skills/a2h-utg-explorer/scripts/tests/scroll_sweep.test.mjs +336 -0
- package/skills/a2h-utg-explorer/scripts/tests/semantics.test.mjs +102 -0
- package/skills/a2h-utg-explorer/scripts/tests/snapshot_integrity.test.mjs +142 -0
- package/skills/a2h-utg-explorer/scripts/tests/state_ambiguity.test.mjs +92 -0
- package/skills/a2h-utg-explorer/scripts/tests/string_tables_twin_ties.test.mjs +83 -0
- package/skills/a2h-utg-explorer/scripts/tests/tar_fixture.mjs +12 -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/adapters.mjs +13 -3
- package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +107 -65
- package/skills/a2h-utg-explorer/scripts/utg_explorer/strings.mjs +155 -0
- package/skills/a2h-utg-static/scripts/assemble.mjs +28 -3
- package/skills/a2h-utg-static/scripts/click_paths.mjs +19 -20
- package/skills/a2h-utg-static/scripts/compose_overlay.mjs +102 -2
- package/skills/a2h-utg-static/scripts/fragment_nav.mjs +2 -3
- package/skills/a2h-utg-static/scripts/nl_hints.mjs +2 -3
- package/skills/a2h-utg-static/scripts/presenter_nav.mjs +1 -2
- package/skills/a2h-utg-static/scripts/route_interceptor.mjs +21 -7
- package/skills/a2h-utg-static/scripts/static_prior.mjs +26 -29
- package/skills/a2h-utg-static/scripts/tests/test_activity_gates.mjs +84 -0
- package/skills/a2h-utg-static/scripts/tests/test_login_interceptor.mjs +38 -0
- package/skills/a2h-utg-static/scripts/tests/test_route_token_words.mjs +29 -1
- package/skills/a2h-app-migrate/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-app-migrate/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-arch-generate/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-arch-generate/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-arkts-logic-coder/scripts/design/i18n-term.d.mts +0 -5
- package/skills/a2h-arkts-logic-coder/scripts/design/i18n-term.mjs +0 -54
- package/skills/a2h-batch-ui-align/references/source-only-tier.md +0 -38
- package/skills/a2h-batch-ui-align/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-batch-ui-align/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-dashboard-render/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-dashboard-render/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-resource-convert/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-resource-convert/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-spec-design-pipeline/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-spec-design-pipeline/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-spec-design-pipeline/scripts/test_i18n_term.ts +0 -70
- package/skills/a2h-spec-generate/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-spec-generate/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-spec-generate/scripts/reqgen/src/i18n-term.d.mts +0 -5
- package/skills/a2h-spec-generate/scripts/reqgen/src/i18n-term.mjs +0 -54
- package/skills/a2h-utg-explorer/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-utg-explorer/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-utg-static/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-utg-static/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-utg-static/scripts/tests/test_i18n_term.mjs +0 -155
|
@@ -125,6 +125,10 @@ variant JSON 必填 `id`、`requires`、`fixtures`、`probes`、`cleanup`;可
|
|
|
125
125
|
- **前缀熔断**(`prefix_memo`,默认开):同一次运行里,某任务的“启动 + 前 n 步 replay”因确定性原因失败后(`selector-not-found-after-bounded-scroll`、`replay-target-unverified:`、`ambiguous selector`、`list-item:`、单一滚动容器缺失),共享这个前缀的后续任务按“启动方式(清数据的 fresh / 未清的 warm)+ 落地页”判断:落地页可预知时(fresh 启动;warm 启动落在启动链页面上,或无启动链时连续两次 warm 启动落地相同)在清数据和启动之前就直接记 `failed`,否则启动一次、越过启动页(Splash)、在 `launchBridge` 之前取落地页再判断,相同才记 `failed`,原因相同,并带 `prefix_failed_from`(首个失败的任务)、`prefix_key`、`replay_index`、`prefix_before`(该步开始时的观察)。证据指向首次失败的那次观察。B 类抽取按 `replay_index` 和 `prefix_before` 定位失败步,这些任务与首个任务归入同一项,审阅一次即可。设备异常等瞬时失败不熔断。
|
|
126
126
|
- **意外弹窗(interruption)**:控件树唯一根节点面积 < `modal_max_screen_share`(默认 0.85)且含可点控件,即视为浮层(AlertDialog、权限、评分、按流量刷新确认等)。浮层若不是当前任务的源页、目标页或 `source_context`,在选择器查找前、每次搜索滚动后、回放到源页后各检查一次,并依次处理:先用 `interruption_rules`(`{id?, when: <rule>, action}`);其次,被测应用自己的首启同意弹窗(text 或 content_desc 含隐私政策/用户协议/服务协议等,`CONSENT_RE`;WebView 正文只出现在 content_desc;节点无 package 视为本应用)点确认控件接受:`android:id/button1`(按完整 id 匹配;文字为「不同意」「拒绝」「退出」等拒绝义时不算,`CONSENT_DECLINE_RE`),没有时取自定义布局里非勾选类(CheckBox/Switch 等)、整段文字为「同意」「同意并继续」「我同意」「接受」/ Agree / Accept 的唯一节点(`CONSENT_POSITIVE_RE`,整段匹配,「不同意」「我已阅读并同意」不算);只有确认控件存在但不可点时才先勾选 CheckBox(「我已阅读并同意」):优先勾文字含同意/已阅读的第一个(每次勾一个,两个必勾框分两次勾;勾选不占 `max_interruption_dismissals` 次数),否则只在仅有一个未勾选框时勾它,多个都不含同意字样(「接收推送」)时不猜(`consent_default`,默认开,事件 `rule: consent-default`)。已认定是同意弹窗、找不到可点的确认控件,且弹窗上有拒绝出口(`android:id/button2`,或整段文字为「不同意」「拒绝并退出」等的控件,`CONSENT_DECLINE_RE`)时,不退回 Back/button2,原样留着,记一条 `outcome: unresolved` 的事件;没有拒绝出口的(「登录即同意《用户协议》」的一键登录半屏弹层)仍走通用的 Back。只在启动后、除弹窗处理和等待/滚动外还没做过任何动作时生效(`_launched`,`atom()` 维护;启动失败、每个任务开始和 `run()` 开始时清零):这是应用自己弹出的首启弹窗;任务点击后才出现的含协议字样的弹窗(「撤回同意」「注销账号」「登录即同意」)是对那次点击的确认,仍走 Back/button2。同意点击无效果时不再重试、也不退回 Back;再其次 Back,Back 关不掉时点 `android:id/button2`。同意弹窗不能走 Back/button2:Back 会关闭 Activity,button2 通常是「拒绝并退出」(where2study 11-04 实测:每个任务清数据后都遇到该弹窗,64 个任务 0 个确认)。确认控件文字不在上述范围内时,写一条 `interruption_rules`;每个浮层最多处理 `max_interruption_dismissals` 次(默认 2)。每次处理记一条 `interruption` 事件,内容包括前 6 段文字和所用动作,可用来补写规则。
|
|
127
127
|
- **上滑不越过起点**:查找控件时,先向下滚,再向上滚回到起点就停(`_backAtOrigin`),不再多滑一次。列表顶部再上滑就是下拉刷新(SwipeRefreshLayout 等,开源 app 普遍使用),会触发联网、按流量提示等弹窗。AntennaPod 第 1 轮因此有 35/65 个任务失败、只覆盖 7 页。起点在列表中部、需要往上找时,设 `search_above_origin: true`。
|
|
128
|
+
- **Pager 的 Tab 页**(2026-11-10,CoolMall 实测:分类/购物车两个 Tab 一直没截到):
|
|
129
|
+
- 到达方式:`pager-swipe` 边若有点击路径提示「点击「X」标签」,就编译成点这个 Tab,任意页码一次点击即可到达;没有提示时才左右滑,每隔一页滑一次(`repeat` = 两页 `pager_index` 之差)。
|
|
130
|
+
- 滑动起点:非抽屉的滑动从离边 1/5 屏宽处起滑,避开系统返回手势区;只有抽屉(`from_edge`)贴边起滑。
|
|
131
|
+
- 页面识别:`tabLabelOf` 能从「…标签切换到…页」这类提示里取出 `tab_label`。底部一行里有两个以上已知 Tab 名时,整行(Compose NavigationBar)不计入正文,Tab 名「购物车」不会再把分类页认成商品详情。
|
|
128
132
|
- **框架文字本地化**:`More options` 等 AppCompat 无障碍文字按 `--locale` 生成本地化选择器,保留英文作为后备。
|
|
129
133
|
- **不可驱动入口**:`external-surface` 入口编译为 `entry-requires-external-surface`;安装包中不存在的组件记为 `unsupported: entry-component-not-installed`,均为适配器限制而非页面不可达。
|
|
130
134
|
- **存储**:`events.jsonl` 逐事件追加;`campaign.json` 最多每 `save_interval` 秒(默认 15)及每个任务结论时重写,避免大 campaign 每个动作全量序列化。
|
|
@@ -16,15 +16,17 @@
|
|
|
16
16
|
* Python tuples returned by functions are arrays ([steps, reason], [prefix, last, reason]).
|
|
17
17
|
* `compile_tasks.LOCALE = x` in Python is `setLocale(x)` here.
|
|
18
18
|
*/
|
|
19
|
-
import * as fs from 'node:fs';
|
|
20
19
|
import * as path from 'node:path';
|
|
21
20
|
import { pathToFileURL } from 'node:url';
|
|
22
21
|
import {
|
|
23
22
|
jsonLoads, jsonDumps, readText, atomicWriteText, get, truthy, pyStr, pyStrip, pyRe, reSearch, reFindall,
|
|
24
|
-
reSub, reFullmatch, reEscape, tupleKey, sortedStr, sortedBy,
|
|
23
|
+
reSub, reFullmatch, reEscape, tupleKey, sortedStr, sortedBy, sha256Hex, dset, keysOf, deepCopy,
|
|
25
24
|
pJoin, pParent, pIsFile, pyPrint, ArgumentParser, runMain, PyFloat, or,
|
|
26
25
|
} from './utg_explorer/_py.mjs';
|
|
27
26
|
import { STATE_KINDS, applyStateAnchors, buildCatalog, stateHost } from './utg_explorer/semantics.mjs';
|
|
27
|
+
import { valuesDirRank, loadStringTables as loadStrings, deviceTextsIn, MAX_DEVICE_TEXTS } from './utg_explorer/strings.mjs';
|
|
28
|
+
|
|
29
|
+
export { valuesDirRank };
|
|
28
30
|
import { panelRoutes } from './panel_routes.mjs';
|
|
29
31
|
|
|
30
32
|
// ------------------------------------------------------------------ small python helpers
|
|
@@ -81,92 +83,29 @@ export function setLocale(locale) { LOCALE = locale; }
|
|
|
81
83
|
// translation) becomes the text the DEVICE shows: value -> resource keys -> device-locale value.
|
|
82
84
|
// Android resource qualifiers only; no per-app vocabulary.
|
|
83
85
|
let STRINGS = { device: new Map(), keysByValue: new Map() };
|
|
84
|
-
const _PRUNE_DIRS = new Set(['build', '.git', '.gradle', '.idea', 'node_modules', 'test', 'androidTest', '.cxx']);
|
|
85
|
-
const _STRING_EL = /<string\s+name="([^"]+)"[^>]*>([\s\S]*?)<\/string>/g;
|
|
86
|
-
const _XML_ENT = { lt: '<', gt: '>', amp: '&', quot: '"', apos: "'" };
|
|
87
|
-
|
|
88
|
-
/** squash(text): the comparable form of a UI string (entities, escapes, tags, whitespace). */
|
|
89
|
-
export function squashUiText(s) {
|
|
90
|
-
return pyStr(s).replace(/<!\[CDATA\[([\s\S]*?)\]\]>/g, '$1').replace(/<[^>]+>/g, '')
|
|
91
|
-
.replace(/&(lt|gt|amp|quot|apos);/g, (_, e) => _XML_ENT[e]).replace(/\\(['"@?])/g, '$1')
|
|
92
|
-
.replace(/\\n/g, ' ').replace(/\s+/g, ' ').trim()
|
|
93
|
-
.replace(/^"(.*)"$/, '$1');
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/** Locale rank of a `values[-qualifiers]` dir for `locale`: 2 lang+region, 1 lang, 0 neutral, -1 other language. */
|
|
97
|
-
export function valuesDirRank(dirName, locale) {
|
|
98
|
-
const [lang, region] = pyStr(locale).replaceAll('_', '-').split('-');
|
|
99
|
-
const quals = pyStr(dirName).split('-').slice(1);
|
|
100
|
-
let qLang = null; let qRegion = null;
|
|
101
|
-
if (quals[0] && quals[0].startsWith('b+')) {
|
|
102
|
-
const p = quals[0].split('+'); qLang = p[1] ?? null; qRegion = p[2] ?? null;
|
|
103
|
-
} else if (quals[0] && /^[a-z]{2,3}$/.test(quals[0])) {
|
|
104
|
-
qLang = quals[0];
|
|
105
|
-
if (quals[1] && /^r[A-Z]{2}$/.test(quals[1])) { qRegion = quals[1].slice(1); }
|
|
106
|
-
}
|
|
107
|
-
if (qLang === null) { return 0; }
|
|
108
|
-
if (qLang.toLowerCase() !== pyStr(lang).toLowerCase()) { return -1; }
|
|
109
|
-
if (qRegion === null) { return 1; }
|
|
110
|
-
return region && qRegion.toUpperCase() === region.toUpperCase() ? 2 : -1;
|
|
111
|
-
}
|
|
112
86
|
|
|
113
|
-
/**
|
|
114
|
-
function stringFiles(project) {
|
|
115
|
-
const out = []; const stack = [project];
|
|
116
|
-
while (stack.length) {
|
|
117
|
-
const cur = stack.pop();
|
|
118
|
-
let entries;
|
|
119
|
-
try { entries = fs.readdirSync(cur, { withFileTypes: true }); } catch { continue; }
|
|
120
|
-
const base = path.basename(cur);
|
|
121
|
-
const isValues = base.startsWith('values') && path.basename(path.dirname(cur)) === 'res';
|
|
122
|
-
for (const e of entries) {
|
|
123
|
-
if (e.isDirectory()) { if (!_PRUNE_DIRS.has(e.name)) { stack.push(path.join(cur, e.name)); } }
|
|
124
|
-
else if (isValues && e.name.endsWith('.xml')) { out.push([base, path.join(cur, e.name)]); }
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
return out.sort((a, b) => cmpStr(a[1], b[1]));
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/** load_string_tables(project, locale): device-locale value per key + every locale's value -> keys. */
|
|
87
|
+
/** load_string_tables(project, locale): the app's string tables for the device locale (utg_explorer/strings.mjs). */
|
|
131
88
|
export function loadStringTables(project, locale) {
|
|
132
|
-
|
|
133
|
-
if (truthy(project)) {
|
|
134
|
-
for (const [dirName, file] of stringFiles(project)) {
|
|
135
|
-
let text;
|
|
136
|
-
try { text = fs.readFileSync(file, 'utf8'); } catch { continue; }
|
|
137
|
-
const r = valuesDirRank(dirName, locale);
|
|
138
|
-
for (const m of text.matchAll(_STRING_EL)) {
|
|
139
|
-
const key = m[1]; const value = squashUiText(m[2]);
|
|
140
|
-
if (!value) { continue; }
|
|
141
|
-
if (!keysByValue.has(value)) { keysByValue.set(value, new Set()); }
|
|
142
|
-
keysByValue.get(value).add(key);
|
|
143
|
-
if (r >= 0 && r >= (rank.get(key) ?? -1)) { device.set(key, value); rank.set(key, r); }
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
STRINGS = { device, keysByValue };
|
|
89
|
+
STRINGS = loadStrings(project, locale);
|
|
148
90
|
return STRINGS;
|
|
149
91
|
}
|
|
150
92
|
|
|
151
|
-
export const MAX_TRANSLATIONS =
|
|
93
|
+
export const MAX_TRANSLATIONS = MAX_DEVICE_TEXTS;
|
|
152
94
|
|
|
153
95
|
/**
|
|
154
96
|
* device_texts(label, keys=()): the device-locale text(s) of a label written in any app locale.
|
|
155
97
|
* A known resource key is exact. Otherwise every key carrying that value is a candidate; when they
|
|
156
98
|
* translate differently all (at most MAX_TRANSLATIONS) are returned -- a wrong tap cannot forge a
|
|
157
|
-
* page, because the landing page is still verified by its own identity anchors.
|
|
99
|
+
* page, because the landing page is still verified by its own identity anchors. One line, as a
|
|
100
|
+
* selector text: whitespace runs (an aapt `\n`) become one space.
|
|
158
101
|
*/
|
|
159
102
|
export function deviceTexts(label, keys = []) {
|
|
160
103
|
const out = [];
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
for (const k of keys) { if (truthy(k) && owners.has(pyStr(k))) { push(STRINGS.device.get(pyStr(k)), v); } }
|
|
167
|
-
if (out.length) { return out; }
|
|
168
|
-
for (const k of sortedStr(owners)) { push(STRINGS.device.get(k), v); }
|
|
169
|
-
return out.length <= MAX_TRANSLATIONS ? out : [];
|
|
104
|
+
for (const d of deviceTextsIn(STRINGS, or(label, ''), keys)) {
|
|
105
|
+
const t = d.replace(/\s+/g, ' ').trim();
|
|
106
|
+
if (t && !out.includes(t)) { out.push(t); }
|
|
107
|
+
}
|
|
108
|
+
return out;
|
|
170
109
|
}
|
|
171
110
|
|
|
172
111
|
/** framework_localized(text). */
|
|
@@ -293,6 +232,7 @@ export function _stripReachedContext(hint, prevHint) {
|
|
|
293
232
|
|
|
294
233
|
export const _TAB_RE = pyRe("[「『“\"']([^」』”\"']+)[」』”\"']\\s*(?:标签页|标签|选项卡|tab\\b)", 'i');
|
|
295
234
|
export const _TAB_PREFIX_RE = pyRe("(?:标签页|标签|选项卡|\\btab)\\s*[「『“\"']([^」』”\"']+)[」』”\"']", 'i');
|
|
235
|
+
const _TAB_SWITCH_TAIL = /^(?:并|以)?(?:切换到|切换至|进入|打开|显示|跳转到|跳转至|来到)(?:(?!并|后|再|点击|然后)[^,,;;。]){0,20}?(?:页面|页|界面|tab)?$/i; // pyStrip below already ate a final 页
|
|
296
236
|
const finditer = (re, s) => [...s.matchAll(new RegExp(re.source, re.flags.replace('g', '') + 'g'))];
|
|
297
237
|
|
|
298
238
|
/** tab_label_of(hint): caption of the tab a hop SELECTS, when the hint's last clause names it. */
|
|
@@ -305,7 +245,11 @@ export function tabLabelOf(hint) {
|
|
|
305
245
|
const m = finditer(re, lc);
|
|
306
246
|
if (m.length) {
|
|
307
247
|
const end = m[m.length - 1].index + m[m.length - 1][0].length;
|
|
308
|
-
|
|
248
|
+
// The tab is the hop's target when nothing follows it, or only the page it switches to
|
|
249
|
+
// (measured CoolMall 11-07: 「点击底部导航栏的「分类」标签切换到分类页。」 lost tab_label, so the
|
|
250
|
+
// reached Category tab could not be verified). An action inside the tab (中点击…) still rejects.
|
|
251
|
+
const rest = pyStrip(lc.slice(end), ' 页中');
|
|
252
|
+
if (!rest || _TAB_SWITCH_TAIL.test(rest)) { return m[m.length - 1][1]; }
|
|
309
253
|
}
|
|
310
254
|
}
|
|
311
255
|
return null;
|
|
@@ -434,7 +378,9 @@ export function compileReplayStep(step, catalog) {
|
|
|
434
378
|
direction = hit ? hit[1] : null;
|
|
435
379
|
}
|
|
436
380
|
if (['left', 'right', 'up', 'down', 'start', 'end'].includes(direction)) {
|
|
437
|
-
|
|
381
|
+
// A drawer opens from the screen edge; anything else starts inside it (system back-gesture zone).
|
|
382
|
+
const drawer = gesture === 'open-drawer' || /drawer/i.test(pyStr(or(get(step, 'mechanism'), '')));
|
|
383
|
+
return [{ type: 'screen_swipe', direction, target_id: get(step, 'target_id'), ...(drawer ? { from_edge: true } : {}) }, null];
|
|
438
384
|
}
|
|
439
385
|
return [null, 'unsupported-swipe-gesture'];
|
|
440
386
|
}
|
|
@@ -703,6 +649,34 @@ function compileEdge(ctx, edge, i) {
|
|
|
703
649
|
launchChain, launchPage, route });
|
|
704
650
|
}
|
|
705
651
|
|
|
652
|
+
/**
|
|
653
|
+
* Pages a pager swipe edge moves across: |target pager_index - source pager_index|, where the
|
|
654
|
+
* source's index is its own pager-swipe edge from the same pager; when the source is the host it is the
|
|
655
|
+
* pager's `initial_page` (compose_overlay derives the swipe direction from it), 0 when absent.
|
|
656
|
+
*/
|
|
657
|
+
export function pagerDistance(edges, edge) {
|
|
658
|
+
const index = (e, d) => { const v = Number(get(or(get(e, 'args'), {}), 'pager_index', d)); return Number.isInteger(v) ? v : d; };
|
|
659
|
+
const idx = index(edge, -1);
|
|
660
|
+
if (idx < 0) { return 1; }
|
|
661
|
+
const own = (edges || []).find((l) => get(l, 'target') === get(edge, 'source') && get(l, 'mechanism') === 'pager-swipe'
|
|
662
|
+
&& get(l, 'trigger') === get(edge, 'trigger'));
|
|
663
|
+
return Math.max(1, Math.abs(idx - (own ? index(own, 0) : _pagerStart(edges, edge))));
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* The page a pager shows when its host opens: `initial_page` (utg-static writes it since PR #129).
|
|
668
|
+
* A graph from before that has none: the sibling edge needing no swipe (`action: 'default'`,
|
|
669
|
+
* compose_overlay's mark for the initial page) gives it; 0 when neither is there.
|
|
670
|
+
*/
|
|
671
|
+
export function _pagerStart(edges, edge) {
|
|
672
|
+
const ip = Number(get(or(get(edge, 'args'), {}), 'initial_page', NaN));
|
|
673
|
+
if (Number.isInteger(ip)) { return ip; }
|
|
674
|
+
const home = (edges || []).find((l) => get(l, 'source') === get(edge, 'source') && get(l, 'mechanism') === 'pager-swipe'
|
|
675
|
+
&& get(l, 'trigger') === get(edge, 'trigger') && get(or(get(l, 'args'), {}), 'action') === 'default');
|
|
676
|
+
const v = Number(get(or(get(home, 'args'), {}), 'pager_index', 0));
|
|
677
|
+
return Number.isInteger(v) ? v : 0;
|
|
678
|
+
}
|
|
679
|
+
|
|
706
680
|
function compileEdgeTail(ctx, s) {
|
|
707
681
|
const { campaign, paths, catalog } = ctx;
|
|
708
682
|
const { edge, i, source, target, u, ue, triggerId, instructionStep, issues, replay, sourceLaunch, sourceContext,
|
|
@@ -762,9 +736,19 @@ function compileEdgeTail(ctx, s) {
|
|
|
762
736
|
const edgeAction = pyStr(or(get(u, 'action'), get(targetStep, 'action')) ?? '').replaceAll('-', '_');
|
|
763
737
|
const gesture = or(hintKind, edgeAction === 'long_press' ? 'long_click_candidates' : 'click_candidates');
|
|
764
738
|
// The edge IS a swipe (a drawer opened by an edge swipe): the gesture is the executable part.
|
|
765
|
-
|
|
739
|
+
// A pager page whose hint names the tab to tap is reached by that tap: one tap reaches any index,
|
|
740
|
+
// and swiping from the main screen reached index 1 at most (measured CoolMall 11-07: Cart, index 2,
|
|
741
|
+
// and Me, index 3, compiled to one left swipe each and were never reached).
|
|
742
|
+
// Only a label the click-path hint itself gave (hintKind set) names a tab on screen; a label from
|
|
743
|
+
// the static edge or ui_elements (the pager branch name) does not.
|
|
744
|
+
const hintedTap = edge.mechanism === 'pager-swipe' && truthy(hintKind) && truthy(selectors) && truthy(label);
|
|
745
|
+
if (!automatic && !hintedTap && pyStr(or(get(u, 'action'), '')).startsWith('swipe')) {
|
|
766
746
|
const [swiped] = compileReplayStep(dictWith(u, { action: get(u, 'action'), target_id: target }), catalog);
|
|
767
|
-
if (truthy(swiped) && get(swiped, 'type') === 'screen_swipe') {
|
|
747
|
+
if (truthy(swiped) && get(swiped, 'type') === 'screen_swipe') {
|
|
748
|
+
listAction = swiped; selectors = null;
|
|
749
|
+
const steps = pagerDistance(ctx.edges, edge);
|
|
750
|
+
if (steps > 1) { listAction = dictWith(listAction, { repeat: steps }); }
|
|
751
|
+
}
|
|
768
752
|
}
|
|
769
753
|
const action = automatic ? { type: 'wait', seconds: new PyFloat(0.5), automatic: true }
|
|
770
754
|
: truthy(listAction) ? listAction
|
|
@@ -836,7 +820,7 @@ export function main(argv = process.argv.slice(2)) {
|
|
|
836
820
|
|| AUTO_TRIGGERS.includes(pyStr(or(get(e, 'trigger'), '')).split('@')[0]))
|
|
837
821
|
.map((e) => `${get(e, 'source')}|${get(e, 'target')}`));
|
|
838
822
|
const ctx = { a, campaign, paths, edgeHints, ui, uiEdges, staticNodes, catalog, obligations, launchValues, seen: new Set(), byKey: new Map(),
|
|
839
|
-
panelRoutes: panelRoutes(graph, a.project), autoEdgeSet };
|
|
823
|
+
panelRoutes: panelRoutes(graph, a.project), autoEdgeSet, edges };
|
|
840
824
|
let tasks = [];
|
|
841
825
|
edges.forEach((edge, i) => {
|
|
842
826
|
if (!truthy(get(edge, 'source')) || !truthy(get(edge, 'target'))) { return; }
|
|
@@ -21,14 +21,13 @@ import * as path from 'node:path';
|
|
|
21
21
|
import { pathToFileURL } from 'node:url';
|
|
22
22
|
import { _QUOTED, hintSteps } from './compile_tasks.mjs';
|
|
23
23
|
import { sourceTextIndex, onlyInComment } from './hint_source.mjs';
|
|
24
|
-
import { term } from './i18n-term.mjs';
|
|
25
24
|
|
|
26
25
|
// Quoted targets stay in the app's UI language; the no-gesture marker follows the install
|
|
27
26
|
// language (compile_tasks _NO_GESTURE accepts both forms).
|
|
28
27
|
export const RULES = 'Every clause with a tap/long-press verb must quote its on-screen target ' +
|
|
29
28
|
'(「设置」, “Settings”, \'Settings\') or name it as 〔id:resource_name〕, or be an any-row phrase ' +
|
|
30
29
|
'(任意一个…条目 / the first row). Swipe/drag/type clauses need a quoted target. Start a hint with ' +
|
|
31
|
-
`${
|
|
30
|
+
`${'(无需点击)'} when the page opens without a gesture. Put extra explanation in parentheses, ` +
|
|
32
31
|
'which the compiler strips. A quoted target is the EXACT text or contentDescription the user ' +
|
|
33
32
|
'sees (a string resource value or a string literal in code), never a KDoc/comment description ' +
|
|
34
33
|
'(contentDescription = "Logo" is quoted 「Logo」, not 「应用Logo」). A target shown only after ' +
|
|
@@ -384,7 +384,7 @@ export function apply(doc, graph, project, pkg, root) {
|
|
|
384
384
|
const answers = new Map(load(pJoin(root, 'recovery_answers.json')).map((a) => [a.key, a]));
|
|
385
385
|
// Re-resolve first with the current catalog, WITHOUT learned rules.
|
|
386
386
|
const paths = clickPathsOf(doc);
|
|
387
|
-
const cat = augmentCatalog(buildCatalog(graph, project, '
|
|
387
|
+
const cat = augmentCatalog(buildCatalog(graph, project, truthy(get(doc, 'locale')) ? doc.locale : 'en'), paths, null, get(doc, 'state_anchors'));
|
|
388
388
|
const obs = new Map(); const prior = new Map();
|
|
389
389
|
for (const e of doc.events) {
|
|
390
390
|
if (e.kind === 'observation') {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* rejudge.mjs <campaign> --static <utg.json> --project <src> --package <app id>
|
|
8
8
|
*
|
|
9
9
|
* Exports: freshIdentity, clickPathsOf, rejudge, appendEvents, main
|
|
10
|
-
* rejudge(doc, graph, project, package, locale=
|
|
10
|
+
* rejudge(doc, graph, project, package, locale=doc.locale) -> [new events, stats]
|
|
11
11
|
*/
|
|
12
12
|
import * as path from 'node:path';
|
|
13
13
|
import { pathToFileURL } from 'node:url';
|
|
@@ -41,7 +41,9 @@ export function clickPathsOf(doc) {
|
|
|
41
41
|
const valuesOf = (o) => keysOf(o).map((k) => o[k]);
|
|
42
42
|
const findLast = (arr, pred) => { for (let i = arr.length - 1; i >= 0; i--) { if (pred(arr[i])) { return arr[i]; } } return null; };
|
|
43
43
|
|
|
44
|
-
export function rejudge(doc, graph, project, pkg, locale =
|
|
44
|
+
export function rejudge(doc, graph, project, pkg, locale = null) {
|
|
45
|
+
// the device locale the campaign was compiled for (compile_tasks --locale), not a fixed one
|
|
46
|
+
locale = truthy(locale) ? locale : (truthy(get(doc, 'locale')) ? doc.locale : 'en');
|
|
45
47
|
const paths = clickPathsOf(doc);
|
|
46
48
|
const cat = augmentCatalog(buildCatalog(graph, project, locale), paths, get(doc, 'learned_page_rules'), get(doc, 'state_anchors'));
|
|
47
49
|
dset(doc, 'page_catalog', cat);
|
|
@@ -189,7 +191,7 @@ export function main(argv = process.argv.slice(2)) {
|
|
|
189
191
|
const ap = new ArgumentParser();
|
|
190
192
|
ap.add_argument('campaign'); ap.add_argument('--static', { required: true });
|
|
191
193
|
ap.add_argument('--project', { required: true }); ap.add_argument('--package', { required: true });
|
|
192
|
-
ap.add_argument('--locale', { default:
|
|
194
|
+
ap.add_argument('--locale', { default: null });
|
|
193
195
|
const a = ap.parse_args(argv);
|
|
194
196
|
const root = a.campaign;
|
|
195
197
|
const doc = jsonLoads(readText(pJoin(root, 'campaign.json'), { encoding: 'utf-8' }));
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// Port of tests/test_attest.py: trigger-chain and reviewer attestations stay apart from mapping.
|
|
2
|
+
import { test, describe } from 'node:test';
|
|
3
|
+
import assert from 'node:assert/strict';
|
|
4
|
+
import * as recover from '../recover.mjs';
|
|
5
|
+
import { audit } from '../audit.mjs';
|
|
6
|
+
import { tabLabelOf } from '../compile_tasks.mjs';
|
|
7
|
+
import { attestedIds, triggerAttests } from '../utg_explorer/attest.mjs';
|
|
8
|
+
|
|
9
|
+
const PKG = 'app';
|
|
10
|
+
const CAT = { 'fragment:Src': { widget_ids: ['list'] }, 'fragment:Twin': { widget_ids: ['filterRows', 'confirmButton'] } };
|
|
11
|
+
const TASK = { task_id: 'edge-1', source_static: 'fragment:Src', target_static: 'fragment:Twin', action: { static_trigger_id: 'butFilter' } };
|
|
12
|
+
const BEFORE = { observation_id: 'b', package: PKG, nodes: [{ resource_id: 'app:id/list' }] };
|
|
13
|
+
const AFTER = { observation_id: 'a', package: PKG,
|
|
14
|
+
nodes: [{ resource_id: 'app:id/filterRows' }, { resource_id: 'app:id/confirmButton' }],
|
|
15
|
+
static_resolution: { status: 'verified', static_id: 'fragment:Other', reason: 'own-layout-ids' } };
|
|
16
|
+
const TAP = { type: 'click', selector: { resource_name: 'butFilter' } };
|
|
17
|
+
|
|
18
|
+
describe('TriggerChain', () => {
|
|
19
|
+
test('own trigger and layout attest over a weak twin verdict', () => {
|
|
20
|
+
const [ok, basis] = triggerAttests(TASK, BEFORE, AFTER, TAP, CAT, PKG, true);
|
|
21
|
+
assert.equal(ok, true);
|
|
22
|
+
assert.deepEqual(basis.layout_ids, ['confirmButton', 'filterRows']);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
test('refusals', () => {
|
|
26
|
+
const cases = [
|
|
27
|
+
[{ type: 'click', selector: { text: 'Filter' } }, AFTER, true], // not the trigger control
|
|
28
|
+
[TAP, AFTER, false], // source not exact
|
|
29
|
+
[TAP, { ...AFTER, package: 'android' }, true], // other app
|
|
30
|
+
[TAP, { ...AFTER, static_resolution: { status: 'verified', static_id: 'fragment:Other', reason: 'unique-modal-title' } }, true], // strong other
|
|
31
|
+
[TAP, { ...AFTER, nodes: [{ resource_id: 'app:id/filterRows' }] }, true], // one of two ids
|
|
32
|
+
];
|
|
33
|
+
for (const [action, after, exact] of cases) {
|
|
34
|
+
assert.equal(triggerAttests(TASK, BEFORE, after, action, CAT, PKG, exact)[0], false);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
describe('ReviewAttestation', () => {
|
|
40
|
+
test('reviewer attests only app screens not strongly claimed', () => {
|
|
41
|
+
const item = { page: 'fragment:Twin', examples: [{ observation_id: 'a' }, { observation_id: 'x' }] };
|
|
42
|
+
const obs = { a: AFTER, x: { ...AFTER, package: 'com.android.settings' } };
|
|
43
|
+
const [att] = recover.validateAttest(item, { verdict: 'attest', examples: ['a'], reason: '两行筛选' }, obs, PKG);
|
|
44
|
+
assert.deepEqual(att.map((a) => a.observation_id), ['a']);
|
|
45
|
+
assert.equal(recover.validateAttest(item, { verdict: 'attest', examples: ['x'], reason: 'r' }, obs, PKG)[0], null);
|
|
46
|
+
assert.equal(recover.validateAttest(item, { verdict: 'attest', examples: ['a'] }, obs, PKG)[0], null);
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
describe('Reporting', () => {
|
|
51
|
+
test('attested nodes are counted apart from mapped', () => {
|
|
52
|
+
const doc = { nodes: [{ id: 'fragment:Src' }, { id: 'fragment:Twin' }], edges: [], tasks: [], phases: [], page_catalog: {},
|
|
53
|
+
events: [{ id: '1', kind: 'attestation', environment_id: 'e', payload: { static_id: 'fragment:Twin', basis: 'trigger-chain' } }] };
|
|
54
|
+
const r = audit(doc);
|
|
55
|
+
assert.deepEqual([r.mapped_static_nodes, r.attested_static_nodes], [0, 1]);
|
|
56
|
+
assert.deepEqual(attestedIds(doc, new Set(['fragment:Twin'])), {});
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
describe('TabCaption', () => {
|
|
61
|
+
test('both word orders', () => {
|
|
62
|
+
assert.equal(tabLabelOf('点击顶部标签「译者」'), '译者');
|
|
63
|
+
assert.equal(tabLabelOf('在「统计」页顶部点击「年」标签'), '年');
|
|
64
|
+
assert.equal(tabLabelOf('在「统计」页的「下载」标签中点击任意一个条目'), null);
|
|
65
|
+
});
|
|
66
|
+
});
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
// Fixes from a Simple Calendar campaign (round 1: 0/106 then 60 selector-not-found failures):
|
|
2
|
+
// a launcher alias whose target class is not exported, a stack trace cut to its frames, a search
|
|
3
|
+
// that never scrolled on a screen with several scrollable views, a dialog left open by one task
|
|
4
|
+
// hiding the next task's controls, and a stored setting (week view) reshaping every later launch.
|
|
5
|
+
import { test, describe, beforeEach, afterEach } from 'node:test';
|
|
6
|
+
import assert from 'node:assert/strict';
|
|
7
|
+
import { Runner, deps } from '../utg_explorer/task_runner.mjs';
|
|
8
|
+
import { headTail, DeviceAdapter } from '../utg_explorer/adapters.mjs';
|
|
9
|
+
import { monotonic } from '../utg_explorer/_py.mjs';
|
|
10
|
+
|
|
11
|
+
const PKG = 'com.x';
|
|
12
|
+
const root = (b = [0, 0, 1080, 2400]) => ({ class: 'android.widget.FrameLayout', visible: true, package: PKG, parent_index: null, bounds: b });
|
|
13
|
+
|
|
14
|
+
function runner(app, config = {}, phase = { id: 'p', requires: [], obligations: [] }) {
|
|
15
|
+
const r = Object.create(Runner.prototype);
|
|
16
|
+
r.args = { budget: 1000, max_tasks: 100 };
|
|
17
|
+
r.config = { package: PKG, max_scrolls_per_task: 4, launch_ready_seconds: 0, selector_wait_seconds: 0, ...config };
|
|
18
|
+
r.phase = phase; r.env = phase.id; r.used = 0; r.stage = 'initial';
|
|
19
|
+
r.doc = { tasks: [], events: [] };
|
|
20
|
+
r.deadline = monotonic() + 60;
|
|
21
|
+
r.device = app; r.catalog = {}; r.coverage = 'edges'; r.covered = new Set();
|
|
22
|
+
const emitted = [];
|
|
23
|
+
r.emit = (kind, payload) => { const e = { id: String(r.doc.events.length), kind, payload }; emitted.push(e); r.doc.events.push(e); return e; };
|
|
24
|
+
r.save = () => {};
|
|
25
|
+
r.capture = () => { r.current = app.observe(); return r.current; };
|
|
26
|
+
r.grantRuntimePermissions = () => [[], []];
|
|
27
|
+
r.launchBridge = () => {};
|
|
28
|
+
r.capture();
|
|
29
|
+
return [r, emitted];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
describe('headTail', () => {
|
|
33
|
+
test('keeps the exception line a long stack trace starts with', () => {
|
|
34
|
+
const frames = Array.from({ length: 80 }, (_, i) => `\tat com.android.server.wm.ActivityStarter.f${i}(ActivityStarter.java:${i})`);
|
|
35
|
+
const text = ['Starting: Intent { cmp=com.x/.Splash }',
|
|
36
|
+
'java.lang.SecurityException: Permission Denial: starting Intent { cmp=com.x/.Splash } not exported from uid 2000', ...frames].join('\n');
|
|
37
|
+
const out = headTail(text, 1200);
|
|
38
|
+
assert.ok(out.length <= 1200);
|
|
39
|
+
assert.match(out, /SecurityException: Permission Denial.*not exported/);
|
|
40
|
+
assert.match(out, /f79\(ActivityStarter\.java:79\)$/);
|
|
41
|
+
assert.equal(headTail('short', 1200), 'short');
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
describe('launcher launch', () => {
|
|
46
|
+
const DENIED = 'Exception occurred while executing \'start\':\njava.lang.SecurityException: Permission Denial: '
|
|
47
|
+
+ 'starting Intent { cmp=com.x/.Splash } not exported from uid 2000\n\tat com.android.server.wm.ActivityStarter.f(ActivityStarter.java:1)';
|
|
48
|
+
/** `refuse`: components the shell cannot start. */
|
|
49
|
+
const device = (cfg, refuse = []) => {
|
|
50
|
+
const d = Object.create(DeviceAdapter.prototype);
|
|
51
|
+
d.config = { package: 'com.x', ...cfg };
|
|
52
|
+
d.calls = [];
|
|
53
|
+
d._shell = (...a) => { d.calls.push(a); return refuse.includes(a.at(-1)) ? DENIED : 'Status: ok'; };
|
|
54
|
+
return d;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
test('a launcher launch the shell cannot start falls back to config.launch_component', () => {
|
|
58
|
+
const d = device({ launch_component: 'com.x/com.x.Splash.Orange' }, ['com.x/com.x.Splash']);
|
|
59
|
+
d._launch({ type: 'launch', component_fqn: 'com.x.Splash', restart: true, launcher: true });
|
|
60
|
+
assert.deepEqual(d.calls.map((c) => c.at(-1)), ['com.x/com.x.Splash', 'com.x/com.x.Splash.Orange']);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
test('a second launcher that starts keeps its own FQN', () => {
|
|
64
|
+
const d = device({ launch_component: 'com.x/com.x.Main' });
|
|
65
|
+
d._launch({ type: 'launch', component_fqn: 'com.x.QuickNote', restart: true, launcher: true });
|
|
66
|
+
assert.deepEqual(d.calls.map((c) => c.at(-1)), ['com.x/com.x.QuickNote']);
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
test('a non-launcher launch that fails is not redirected', () => {
|
|
70
|
+
const d = device({ launch_component: 'com.x/com.x.Splash.Orange' }, ['com.x/com.x.Main']);
|
|
71
|
+
assert.throws(() => d._launch({ type: 'launch', component_fqn: 'com.x.Main', restart: true }), /not exported/);
|
|
72
|
+
assert.equal(d.calls.length, 1);
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
describe('search scrolls with several scrollable views', () => {
|
|
77
|
+
let saved;
|
|
78
|
+
beforeEach(() => { saved = deps.observationMatchesStatic; });
|
|
79
|
+
afterEach(() => { deps.observationMatchesStatic = saved; });
|
|
80
|
+
|
|
81
|
+
/** A pager (does not move), an hours column and an events list; the target is two scrolls down the list. */
|
|
82
|
+
class Week {
|
|
83
|
+
constructor() { Object.assign(this, { n: 0, list: 0, acts: [] }); }
|
|
84
|
+
act(a) {
|
|
85
|
+
this.acts.push(a);
|
|
86
|
+
if (a.type === 'scroll' && a.selector.resource_id === PKG + ':id/events') {
|
|
87
|
+
this.list = Math.max(0, this.list + (a.direction === 'down' ? 1 : -1));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
settle() {}
|
|
91
|
+
observe() {
|
|
92
|
+
this.n += 1;
|
|
93
|
+
const nodes = [root(),
|
|
94
|
+
{ class: 'w4.i', scrollable: true, clickable: true, visible: true, package: PKG, parent_index: 0, bounds: [208, 231, 1080, 2161] },
|
|
95
|
+
{ class: 'android.widget.ScrollView', resource_id: PKG + ':id/hours', scrollable: true, visible: true, package: PKG, parent_index: 0, bounds: [0, 338, 208, 2163] },
|
|
96
|
+
{ class: 'android.widget.ScrollView', resource_id: PKG + ':id/events', scrollable: true, visible: true, package: PKG, parent_index: 0, bounds: [208, 338, 1080, 2161] },
|
|
97
|
+
{ class: 'android.widget.TextView', text: 'row ' + this.list, visible: true, package: PKG, parent_index: 3, bounds: [208, 400, 1080, 500] }];
|
|
98
|
+
if (this.list >= 2) { nodes.push({ class: 'android.widget.Button', text: 'Target', clickable: true, visible: true, package: PKG, parent_index: 3, bounds: [208, 600, 1080, 700] }); }
|
|
99
|
+
return { observation_id: 'o' + this.n, package: PKG, activity: 'A', window: 'main', nodes, device_info: { width_px: 1080, height_px: 2400 } };
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
test('the largest container that does not move gives way to the next one', () => {
|
|
104
|
+
const app = new Week();
|
|
105
|
+
const [r] = runner(app);
|
|
106
|
+
r.seek({ type: 'click_candidates', selectors: [{ text: 'Target' }] }, 't', 'target');
|
|
107
|
+
const scrolls = app.acts.filter((a) => a.type === 'scroll').map((a) => a.selector.resource_id ?? a.selector.class);
|
|
108
|
+
assert.equal(scrolls[0], 'w4.i');
|
|
109
|
+
assert.ok(scrolls.includes(PKG + ':id/events'));
|
|
110
|
+
assert.deepEqual(app.acts.at(-1), { type: 'click', selector: { text: 'Target' } });
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
describe('search container identity and motion', () => {
|
|
115
|
+
/** Two pager pages each holding `list` (same id); only the second, visible copy moves; rows have no text. */
|
|
116
|
+
class Pager {
|
|
117
|
+
constructor() { Object.assign(this, { n: 0, off: 0, acts: [] }); }
|
|
118
|
+
act(a) {
|
|
119
|
+
this.acts.push(a);
|
|
120
|
+
if (a.type === 'scroll' && a.selector.class === 'android.widget.ScrollView' && a.selector.index === 1) { this.off += 1; }
|
|
121
|
+
}
|
|
122
|
+
settle() {}
|
|
123
|
+
observe() {
|
|
124
|
+
this.n += 1;
|
|
125
|
+
const list = (x) => ({ class: 'android.widget.ScrollView', resource_id: PKG + ':id/list', scrollable: true, visible: true,
|
|
126
|
+
package: PKG, parent_index: 0, bounds: [x, 200, x + 1000, 2000] });
|
|
127
|
+
const nodes = [root(), list(0), list(40)];
|
|
128
|
+
// Text-less rows: only their bounds move.
|
|
129
|
+
for (let i = 0; i < 3; i++) {
|
|
130
|
+
nodes.push({ class: 'android.widget.ImageView', clickable: true, visible: true, package: PKG, parent_index: 2,
|
|
131
|
+
bounds: [40, 300 + 200 * i - 150 * this.off, 1040, 480 + 200 * i - 150 * this.off] });
|
|
132
|
+
}
|
|
133
|
+
if (this.off >= 2) { nodes.push({ class: 'android.widget.Button', text: 'Target', clickable: true, visible: true, package: PKG, parent_index: 2, bounds: [40, 1500, 1040, 1600] }); }
|
|
134
|
+
return { observation_id: 'o' + this.n, package: PKG, activity: 'A', window: 'main', nodes, device_info: { width_px: 1080, height_px: 2400 } };
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
test('same-id copies are addressed one by one, and a bounds-only move counts as moving', () => {
|
|
139
|
+
const app = new Pager();
|
|
140
|
+
const [r] = runner(app);
|
|
141
|
+
r.seek({ type: 'click_candidates', selectors: [{ text: 'Target' }] }, 't', 'target');
|
|
142
|
+
const scrolls = app.acts.filter((a) => a.type === 'scroll').map((a) => a.selector);
|
|
143
|
+
assert.ok(scrolls.every((s) => s.index !== undefined), 'same-id containers use class+index');
|
|
144
|
+
assert.ok(scrolls.some((s) => s.index === 1));
|
|
145
|
+
assert.deepEqual(app.acts.at(-1), { type: 'click', selector: { text: 'Target' } });
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
/** An immobile pager and a list, both id-less `View`s; scrolling the list shows a `View` header above both. */
|
|
149
|
+
class Shifting {
|
|
150
|
+
constructor() { Object.assign(this, { n: 0, off: 0, acts: [], last: [] }); }
|
|
151
|
+
act(a) {
|
|
152
|
+
this.acts.push(a);
|
|
153
|
+
if (a.type !== 'scroll') { return; }
|
|
154
|
+
const same = this.last.filter((x) => x.class === a.selector.class).sort((p, q) => p.bounds[1] - q.bounds[1] || p.bounds[0] - q.bounds[0]);
|
|
155
|
+
if (same[a.selector.index]?.bounds[1] === 338) { this.off += 1; }
|
|
156
|
+
}
|
|
157
|
+
settle() {}
|
|
158
|
+
observe() {
|
|
159
|
+
this.n += 1;
|
|
160
|
+
const V = 'android.view.View';
|
|
161
|
+
const nodes = [root(),
|
|
162
|
+
{ class: V, scrollable: true, clickable: true, visible: true, package: PKG, parent_index: 0, bounds: [0, 231, 1080, 2161] },
|
|
163
|
+
{ class: V, scrollable: true, visible: true, package: PKG, parent_index: 0, bounds: [0, 338, 1080, 1500] },
|
|
164
|
+
{ class: 'android.widget.TextView', text: 'row ' + this.off, visible: true, package: PKG, parent_index: 2, bounds: [0, 400, 1080, 500] }];
|
|
165
|
+
if (this.off >= 1) { nodes.push({ class: V, visible: true, package: PKG, parent_index: 0, bounds: [0, 100, 1080, 200] }); }
|
|
166
|
+
if (this.off >= 3) { nodes.push({ class: 'android.widget.Button', text: 'Target', clickable: true, visible: true, package: PKG, parent_index: 2, bounds: [0, 600, 1080, 700] }); }
|
|
167
|
+
this.last = nodes;
|
|
168
|
+
return { observation_id: 'o' + this.n, package: PKG, activity: 'A', window: 'main', nodes, device_info: { width_px: 1080, height_px: 2400 } };
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
test('an immobile container stays ruled out when a scroll shifts its class index', () => {
|
|
173
|
+
const app = new Shifting();
|
|
174
|
+
const [r] = runner(app);
|
|
175
|
+
r.seek({ type: 'click_candidates', selectors: [{ text: 'Target' }] }, 't', 'target');
|
|
176
|
+
// pager (index 0, does not move), then the list three times; the pager is not retried as index 1.
|
|
177
|
+
assert.equal(app.acts.filter((a) => a.type === 'scroll').length, 4);
|
|
178
|
+
assert.deepEqual(app.acts.at(-1), { type: 'click', selector: { text: 'Target' } });
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
describe('source relaunches under a leftover dialog', () => {
|
|
183
|
+
let saved;
|
|
184
|
+
beforeEach(() => {
|
|
185
|
+
saved = deps.observationMatchesStatic;
|
|
186
|
+
deps.observationMatchesStatic = (o, ident) => [ident === 'activity:Settings', 'exact-page'];
|
|
187
|
+
});
|
|
188
|
+
afterEach(() => { deps.observationMatchesStatic = saved; });
|
|
189
|
+
|
|
190
|
+
class Settings {
|
|
191
|
+
constructor(dialog) { Object.assign(this, { n: 0, dialog, acts: [] }); }
|
|
192
|
+
act(a) { this.acts.push(a); if (a.type === 'launch' || a.type === 'clear_app_data') { this.dialog = false; } }
|
|
193
|
+
settle() {}
|
|
194
|
+
observe() {
|
|
195
|
+
this.n += 1;
|
|
196
|
+
const nodes = this.dialog
|
|
197
|
+
? [root([28, 694, 1052, 1642]), { class: 'android.widget.RadioButton', text: 'Large', clickable: true, visible: true, package: PKG, parent_index: 0, bounds: [60, 800, 1000, 900] }]
|
|
198
|
+
: [root(), { class: 'android.widget.TextView', text: 'Font size', clickable: true, visible: true, package: PKG, parent_index: 0, bounds: [0, 300, 1080, 400] }];
|
|
199
|
+
return { observation_id: 'o' + this.n, package: PKG, activity: 'Settings', window: 'main', nodes, device_info: { width_px: 1080, height_px: 2400 } };
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
const task = { task_id: 't', source_static: 'activity:Settings', source_launch: { type: 'launch', component_fqn: 'com.x.Splash', restart: true }, replay: [], action: {} };
|
|
203
|
+
|
|
204
|
+
test('a dialog over the source page is not the source: relaunch', () => {
|
|
205
|
+
const app = new Settings(true);
|
|
206
|
+
const [r] = runner(app);
|
|
207
|
+
r.source(task);
|
|
208
|
+
assert.equal(app.acts.filter((a) => a.type === 'launch').length, 1);
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
test('the bare source page is reused without a launch', () => {
|
|
212
|
+
const app = new Settings(false);
|
|
213
|
+
const [r] = runner(app);
|
|
214
|
+
r.source(task);
|
|
215
|
+
assert.equal(app.acts.length, 0);
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
test('reset_between_tasks clears data before the launch, even on the source page', () => {
|
|
219
|
+
const app = new Settings(false);
|
|
220
|
+
const [r] = runner(app, { reset_between_tasks: ['p'], fixtures: { p: [] } });
|
|
221
|
+
r.source(task);
|
|
222
|
+
assert.deepEqual(app.acts.map((a) => a.type), ['clear_app_data', 'launch']);
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
test('reset_between_tasks clears once per task: a second source() of the same task only relaunches', () => {
|
|
226
|
+
const app = new Settings(false);
|
|
227
|
+
const [r] = runner(app, { reset_between_tasks: ['p'], fixtures: { p: [] } });
|
|
228
|
+
r.source(task);
|
|
229
|
+
r.source(task); // _runTask calls source() again after a sweep left the page scrolled
|
|
230
|
+
assert.deepEqual(app.acts.map((a) => a.type), ['clear_app_data', 'launch', 'launch']);
|
|
231
|
+
r.source({ ...task, task_id: 'sweep:activity:Settings' }); // a backlog sweep is its own visit
|
|
232
|
+
assert.equal(app.acts.filter((a) => a.type === 'clear_app_data').length, 2);
|
|
233
|
+
r._clearedFor = null; // the task loop resets the marker for each attempt
|
|
234
|
+
r.source(task);
|
|
235
|
+
assert.equal(app.acts.filter((a) => a.type === 'clear_app_data').length, 3);
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
test('reset_between_tasks leaves a phase with fixtures alone', () => {
|
|
239
|
+
const app = new Settings(false);
|
|
240
|
+
const [r] = runner(app, { reset_between_tasks: true, fixtures: { p: [{ type: 'restore_app_data', archive: 'x.tar' }] } });
|
|
241
|
+
r.source(task);
|
|
242
|
+
assert.equal(app.acts.length, 0);
|
|
243
|
+
});
|
|
244
|
+
});
|