@buaa_smat/hometrans 26.0.2 → 26.0.4
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 +8 -7
- package/agents/code-reviewer.md +111 -154
- 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 +436 -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 +206 -0
- package/i18n/skills/a2h-app-migrate/references/config.example.json +28 -0
- package/i18n/skills/a2h-app-migrate/references/feature-scope.md +121 -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 +2007 -0
- package/i18n/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +187 -0
- package/i18n/skills/a2h-app-migrate/scripts/env_preflight.mjs +1656 -0
- package/i18n/skills/a2h-app-migrate/scripts/human_review_gate.mjs +728 -0
- package/i18n/skills/a2h-app-migrate/scripts/validate_workflow.mjs +541 -0
- package/i18n/skills/a2h-app-migrate/test/test_android_index.mjs +143 -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 +713 -0
- package/i18n/skills/a2h-app-migrate/test/test_finalize.mjs +117 -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 +271 -0
- package/i18n/skills/a2h-app-migrate/test/test_resume_summary.mjs +222 -0
- package/i18n/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +136 -0
- package/i18n/skills/a2h-app-migrate/test/test_run_dir.mjs +552 -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 +263 -0
- package/i18n/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +165 -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 +207 -0
- package/i18n/skills/a2h-app-migrate/test/test_validate_workflow_bilingual.mjs +87 -0
- package/i18n/skills/a2h-arch-generate/SKILL.md +378 -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 +131 -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/SKILL.md +304 -0
- package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +10 -0
- package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +249 -0
- package/i18n/skills/a2h-arkts-logic-coder/references/spec-design.md +344 -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 +877 -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 +597 -0
- package/i18n/skills/a2h-batch-ui-align/SKILL.md +372 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/alignment.md +35 -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 +85 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/interaction.md +23 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/resources.md +89 -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 +62 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/window.md +30 -0
- package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +930 -0
- package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +420 -0
- package/i18n/skills/a2h-batch-ui-align/references/incremental-scope.md +158 -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 +2552 -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 +175 -0
- package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_decorator-quickref.md +251 -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 +232 -0
- package/i18n/skills/a2h-batch-ui-align/references/step4-prepare.md +206 -0
- package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +232 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/android_parse_fast.ts +2005 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/branch_coverage.mjs +155 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +2118 -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 +1805 -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 +1959 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +147 -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 +1632 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +1300 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +1234 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/state_doc.mjs +417 -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 +216 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +615 -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 +49 -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/dialog_backboard.ts +91 -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/event_default_click.ts +179 -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/hit_test.ts +339 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/image_source.ts +84 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/input_traps.ts +249 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +780 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_host.ts +145 -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 +408 -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/overlay_binds.ts +56 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_string.ts +96 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +179 -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 +81 -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/relative_container_height.ts +102 -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 +147 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/runtime_traps.ts +440 -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 +127 -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/swiper_index.ts +65 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +184 -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/waterflow_sections.ts +231 -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_input_runtime.test.mjs +514 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +651 -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_overlay_lottie.test.mjs +199 -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/branch_coverage.test.mjs +116 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +693 -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 +326 -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 +356 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +60 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +395 -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 +62 -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 +2050 -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 +265 -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 +239 -0
- package/i18n/skills/a2h-page-specgen/references/behavior-ledger.md +1174 -0
- package/i18n/skills/a2h-page-specgen/references/body-language.md +179 -0
- package/i18n/skills/a2h-page-specgen/references/gates.md +329 -0
- package/i18n/skills/a2h-page-specgen/references/page-inventory.md +220 -0
- package/i18n/skills/a2h-page-specgen/references/scenario-authoring.md +274 -0
- package/i18n/skills/a2h-page-specgen/references/spec-example.md +312 -0
- package/i18n/skills/a2h-page-specgen/references/spec-template.md +210 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-audit.mjs +2436 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +1833 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-model.mjs +181 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +1205 -0
- package/i18n/skills/a2h-page-specgen/scripts/entry-evidence.mjs +1123 -0
- package/i18n/skills/a2h-page-specgen/scripts/facts-build.mjs +1613 -0
- package/i18n/skills/a2h-page-specgen/scripts/footprint.mjs +1650 -0
- package/i18n/skills/a2h-page-specgen/scripts/gate.mjs +864 -0
- package/i18n/skills/a2h-page-specgen/scripts/interactions.mjs +346 -0
- package/i18n/skills/a2h-page-specgen/scripts/inventory.mjs +371 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/contracts.mjs +155 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +235 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/hg.mjs +684 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/homegraph-process.mjs +102 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/homegraph-query.mjs +161 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/operation-reviews.mjs +913 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/prose.mjs +252 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/reach.mjs +53 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/semantic-detail.mjs +353 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/source-text.mjs +497 -0
- package/i18n/skills/a2h-page-specgen/scripts/operation-evidence.mjs +1542 -0
- package/i18n/skills/a2h-page-specgen/scripts/prepare.mjs +864 -0
- package/i18n/skills/a2h-page-specgen/scripts/render.mjs +276 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +897 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.json +25 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.json +47 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +2694 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +726 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +108 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.review.md +65 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +267 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.json +57 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/branch-checklist.md +32 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/gate-results.json +22 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/manifest.json +111 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/portability.test.mjs +141 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/review.md +22 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +553 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/android-entry-evidence.test.mjs +585 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +755 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-group.test.mjs +546 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-post.test.mjs +655 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +1234 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-component-gate.test.mjs +520 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +1516 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-finalize.test.mjs +759 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +630 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-model.test.mjs +118 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +798 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-regression.test.mjs +886 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +205 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +475 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/facts.test.mjs +1205 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +271 -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/uniapp-source/App.vue +1 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-conflict-record.json +17 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-record.json +17 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/manifest.json +3 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages/list/index.vue +80 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages.json +14 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/source-record.json +15 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/components/RefreshPanel.vue +15 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/composables/useRefresh.ts +50 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/pages/help/index.vue +9 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/state/store.ts +4 -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 +1029 -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 +143 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/gate.test.mjs +1121 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +332 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/helpers.mjs +188 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/hg.test.mjs +549 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/homegraph-process-fixture.mjs +130 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/homegraph-query.test.mjs +288 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/integration.test.mjs +368 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +348 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +250 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/keys.test.mjs +776 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +1002 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +1103 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-homegraph-reproduction.mjs +365 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-homegraph.test.mjs +569 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-pipeline.test.mjs +326 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +240 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prose.test.mjs +427 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +531 -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 +418 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +1782 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/render.test.mjs +536 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/review-followup.test.mjs +467 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/semantic-detail.test.mjs +949 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/submit.test.mjs +1239 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/uniapp-operation-evidence.test.mjs +639 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/utg-footprint-contract.test.mjs +274 -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 +1801 -0
- package/i18n/skills/a2h-resource-convert/SKILL.md +375 -0
- package/i18n/skills/a2h-resource-convert/references/code-vector-icon-rules.md +336 -0
- package/i18n/skills/a2h-resource-convert/references/incremental-page-migration.md +272 -0
- package/i18n/skills/a2h-resource-convert/references/lottie-conversion-rules.md +226 -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 +251 -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 +2596 -0
- package/i18n/skills/a2h-resource-convert/scripts/lottie_hosts.ts +415 -0
- package/i18n/skills/a2h-resource-convert/scripts/tests/docs_only_i18n.test.mjs +44 -0
- package/i18n/skills/a2h-resource-convert/scripts/tests/lottie_hosts.test.mjs +222 -0
- package/i18n/skills/a2h-spec-design-pipeline/SKILL.md +238 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/coding-loop.md +358 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/homegraph-cli.md +307 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/initialization.md +103 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/merge-queue.md +266 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/post-loop.md +23 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/review-loop.md +71 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/scripts.md +55 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/specs.example.json +19 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/state-and-resume.md +246 -0
- package/i18n/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +752 -0
- package/i18n/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +661 -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 +126 -0
- package/i18n/skills/a2h-utg-explorer/references/architecture.md +282 -0
- package/i18n/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +908 -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/hybrid_route_cdp.mjs +376 -0
- package/i18n/skills/a2h-utg-explorer/scripts/recover_b.mjs +550 -0
- package/i18n/skills/a2h-utg-explorer/scripts/recover_d.mjs +647 -0
- package/i18n/skills/a2h-utg-explorer/scripts/seed_recipes.mjs +426 -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/diagnostics.test.mjs +252 -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/hybrid_route_identity.test.mjs +146 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +614 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +214 -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/seed_recipes.test.mjs +261 -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/diagnostics.mjs +196 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/hybrid_route.mjs +140 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +1562 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +47 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +2714 -0
- package/i18n/skills/a2h-utg-static/SKILL.md +372 -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 +2190 -0
- package/i18n/skills/a2h-utg-static/scripts/audit.mjs +268 -0
- package/i18n/skills/a2h-utg-static/scripts/click_paths.mjs +720 -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/data_model.mjs +590 -0
- package/i18n/skills/a2h-utg-static/scripts/data_producers.mjs +431 -0
- package/i18n/skills/a2h-utg-static/scripts/fragment_nav.mjs +1137 -0
- package/i18n/skills/a2h-utg-static/scripts/hybrid_scope.mjs +705 -0
- package/i18n/skills/a2h-utg-static/scripts/interaction_sites.mjs +267 -0
- package/i18n/skills/a2h-utg-static/scripts/label_resolve.mjs +958 -0
- package/i18n/skills/a2h-utg-static/scripts/lib/hybrid-provenance.mjs +201 -0
- package/i18n/skills/a2h-utg-static/scripts/lib/uniapp-routes.mjs +195 -0
- package/i18n/skills/a2h-utg-static/scripts/nl_hints.mjs +545 -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 +125 -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_data_model.mjs +120 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_data_producers.mjs +113 -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_provenance.mjs +150 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +457 -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 +78 -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_routes.mjs +161 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +330 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_utg_specgen_boundary.mjs +45 -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 +1394 -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 +11 -161
- 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 +31 -12
- package/skills/a2h-app-migrate/references/config.example.json +1 -0
- package/skills/a2h-app-migrate/references/feature-scope.md +121 -0
- package/skills/a2h-app-migrate/references/stage-map.md +4 -2
- package/skills/a2h-app-migrate/references/workflow.yaml +427 -103
- package/skills/a2h-app-migrate/scripts/android_index.mjs +35 -8
- package/skills/a2h-app-migrate/scripts/check_module_docs_done.mjs +39 -1
- package/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +78 -6
- package/skills/a2h-app-migrate/scripts/check_spec_pipeline_done.mjs +144 -9
- package/skills/a2h-app-migrate/scripts/check_ui_batch_done.mjs +14 -1
- package/skills/a2h-app-migrate/scripts/check_utg_static_done.mjs +46 -5
- package/skills/a2h-app-migrate/scripts/diagnose.mjs +162 -0
- package/skills/a2h-app-migrate/scripts/env_preflight.mjs +178 -44
- package/skills/a2h-app-migrate/scripts/feature_scope.mjs +347 -0
- package/skills/a2h-app-migrate/scripts/human_review_gate.mjs +81 -11
- package/skills/a2h-app-migrate/scripts/infer_android_root.mjs +17 -1
- package/skills/a2h-app-migrate/scripts/ledger.mjs +80 -10
- package/skills/a2h-app-migrate/scripts/migration_manifest.mjs +351 -0
- package/skills/a2h-app-migrate/scripts/paths_preflight.mjs +9 -23
- package/skills/a2h-app-migrate/scripts/resume_plan.mjs +72 -12
- package/skills/a2h-app-migrate/scripts/reuse_static_utg.mjs +33 -1
- package/skills/a2h-app-migrate/scripts/run_dir.mjs +137 -41
- package/skills/a2h-app-migrate/scripts/scope_model.mjs +255 -0
- package/skills/a2h-app-migrate/scripts/scope_report.mjs +128 -0
- package/skills/a2h-app-migrate/scripts/source_fp.mjs +120 -0
- 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 +143 -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 +713 -0
- package/skills/a2h-app-migrate/test/test_feature_scope.mjs +217 -0
- package/skills/a2h-app-migrate/test/test_finalize.mjs +117 -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_incremental_acceptance.mjs +145 -0
- package/skills/a2h-app-migrate/test/test_incremental_phase2.mjs +223 -0
- package/skills/a2h-app-migrate/test/test_incremental_phase2_acceptance.mjs +157 -0
- package/skills/a2h-app-migrate/test/test_incremental_profile.mjs +84 -0
- package/skills/a2h-app-migrate/test/test_infer_android_root.mjs +101 -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 +150 -0
- package/skills/a2h-app-migrate/test/test_migration_manifest.mjs +225 -0
- package/skills/a2h-app-migrate/test/test_module_docs_done.mjs +86 -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 +271 -0
- package/skills/a2h-app-migrate/test/test_resume_summary.mjs +222 -0
- package/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +136 -0
- package/skills/a2h-app-migrate/test/test_run_dir.mjs +552 -0
- package/skills/a2h-app-migrate/test/test_scope_model.mjs +172 -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 +155 -0
- package/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +263 -0
- package/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +165 -0
- package/skills/a2h-app-migrate/test/test_spec_pipeline_done.mjs +511 -0
- package/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +76 -0
- package/skills/a2h-app-migrate/test/test_ui_batch_capture_audit.mjs +106 -0
- package/skills/a2h-app-migrate/test/test_ui_batch_done.mjs +65 -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 +214 -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 +20 -17
- 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 +25 -14
- package/skills/a2h-arch-generate/references/module-evidence-subagent.md +2 -2
- package/skills/a2h-arch-generate/references/source-baseline.md +4 -4
- package/skills/a2h-arch-generate/scripts/cleanup_intermediates.mjs +34 -3
- package/skills/a2h-arch-generate/scripts/create_project.mjs +24 -1
- package/skills/a2h-arch-generate/scripts/generate_source_baseline.mjs +35 -46
- package/skills/a2h-arch-generate/scripts/inspect_and_route.mjs +29 -5
- 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 +208 -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 +164 -0
- package/skills/a2h-arch-generate/scripts/validate_architecture_docs.mjs +2 -5
- package/skills/a2h-arch-generate/scripts/validate_incremental_docs.mjs +4 -2
- package/skills/a2h-arkts-logic-coder/SKILL.md +163 -15
- package/skills/a2h-arkts-logic-coder/references/ISSUES.md +3 -1
- package/skills/a2h-arkts-logic-coder/references/code-generation.md +120 -1
- package/skills/a2h-arkts-logic-coder/references/spec-design.md +46 -11
- 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 +873 -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 +596 -0
- package/skills/a2h-batch-ui-align/SKILL.md +78 -26
- package/skills/a2h-batch-ui-align/assets/ColorUtils.ets +16 -2
- package/skills/a2h-batch-ui-align/references/cards/alignment.md +5 -1
- package/skills/a2h-batch-ui-align/references/cards/geometry.md +6 -1
- package/skills/a2h-batch-ui-align/references/cards/interaction.md +2 -1
- package/skills/a2h-batch-ui-align/references/cards/resources.md +9 -3
- package/skills/a2h-batch-ui-align/references/cards/widgets.md +27 -3
- package/skills/a2h-batch-ui-align/references/cards/window.md +2 -1
- package/skills/a2h-batch-ui-align/references/checker-rules.md +301 -13
- package/skills/a2h-batch-ui-align/references/conversion-procedure.md +53 -13
- package/skills/a2h-batch-ui-align/references/host-dispatch.md +2 -0
- package/skills/a2h-batch-ui-align/references/incremental-scope.md +28 -9
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +14 -9
- 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/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +28 -1
- package/skills/a2h-batch-ui-align/references/state-mgmt/_/350/243/205/351/245/260/345/231/250/351/200/237/346/237/245.md +30 -0
- package/skills/a2h-batch-ui-align/references/step3-capture.md +25 -6
- package/skills/a2h-batch-ui-align/references/step4-prepare.md +7 -2
- package/skills/a2h-batch-ui-align/references/step5-convert.md +33 -9
- package/skills/a2h-batch-ui-align/scripts/android_parse_fast.ts +6 -7
- package/skills/a2h-batch-ui-align/scripts/branch_coverage.mjs +155 -0
- package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +463 -22
- package/skills/a2h-batch-ui-align/scripts/capture_audit.mjs +474 -0
- package/skills/a2h-batch-ui-align/scripts/capture_fast.mjs +665 -0
- package/skills/a2h-batch-ui-align/scripts/capture_verify.mjs +552 -0
- package/skills/a2h-batch-ui-align/scripts/detach.mjs +5 -2
- package/skills/a2h-batch-ui-align/scripts/draw_coverage.mjs +264 -0
- package/skills/a2h-batch-ui-align/scripts/evidence_gate.mjs +263 -0
- package/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +20 -3
- package/skills/a2h-batch-ui-align/scripts/generate_pages_json.mjs +4 -5
- package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +220 -35
- package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +517 -41
- package/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +147 -0
- package/skills/a2h-batch-ui-align/scripts/image_probe.mjs +231 -54
- package/skills/a2h-batch-ui-align/scripts/list_existing.mjs +141 -0
- package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +239 -14
- package/skills/a2h-batch-ui-align/scripts/page_gap.mjs +210 -0
- package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +98 -11
- package/skills/a2h-batch-ui-align/scripts/progress_identity.mjs +208 -0
- package/skills/a2h-batch-ui-align/scripts/scroll_verdict.mjs +62 -0
- package/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +118 -4
- package/skills/a2h-batch-ui-align/scripts/shell_requests.mjs +273 -0
- package/skills/a2h-batch-ui-align/scripts/state_doc.mjs +9 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/core/android.ts +231 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/core/baseline.ts +79 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/core/i18n.ts +1 -5
- package/skills/a2h-batch-ui-align/scripts/static_check/core/parse.ts +90 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/core/scan.ts +44 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +61 -12
- package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +32 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +3 -17
- 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/attr_chain.ts +1 -19
- 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/dialog_backboard.ts +91 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/event_default_click.ts +179 -0
- 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/hit_test.ts +339 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/image_source.ts +84 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/input_traps.ts +249 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +234 -5
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_host.ts +145 -0
- 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 +110 -12
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_binds.ts +56 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_string.ts +96 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +179 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +3 -2
- 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/relative_container_height.ts +102 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +54 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/runtime_traps.ts +440 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -23
- 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/swiper_index.ts +65 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +184 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/waterflow_sections.ts +231 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +4 -4
- 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 +30 -2
- package/skills/a2h-batch-ui-align/scripts/tests/agent_cli.test.mjs +231 -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_baseline.test.mjs +129 -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_coolmall_runtime2.test.mjs +697 -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_hit_test.test.mjs +298 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_input_runtime.test.mjs +514 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +651 -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_overlay_lottie.test.mjs +199 -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 +269 -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_runtime_api.test.mjs +346 -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_theme_runtime.test.mjs +95 -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/branch_coverage.test.mjs +116 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +693 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set_scope.test.mjs +291 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_audit.test.mjs +179 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_fast.test.mjs +56 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_gate.test.mjs +197 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_review_fixes.test.mjs +322 -0
- package/skills/a2h-batch-ui-align/scripts/tests/color_utils_asset.test.mjs +93 -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 +435 -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/fixtures/icon_drift_search_sheet/SearchMenuDialog.buggy.ets +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/meta.json +21 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/screenshot.png +0 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/view.xml +35 -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_pack_evidence.test.mjs +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +1782 -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/icon_coverage.test.mjs +314 -0
- package/skills/a2h-batch-ui-align/scripts/tests/image_probe.test.mjs +243 -0
- package/skills/a2h-batch-ui-align/scripts/tests/list_existing.test.mjs +157 -0
- package/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +326 -0
- package/skills/a2h-batch-ui-align/scripts/tests/occlusion.test.mjs +102 -0
- package/skills/a2h-batch-ui-align/scripts/tests/page_gap.test.mjs +115 -0
- package/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +356 -0
- package/skills/a2h-batch-ui-align/scripts/tests/progress_identity.test.mjs +174 -0
- package/skills/a2h-batch-ui-align/scripts/tests/shell_contract.test.mjs +302 -0
- package/skills/a2h-batch-ui-align/scripts/tests/shell_requests.test.mjs +158 -0
- package/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +60 -0
- package/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +395 -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-coldstart-smoke-gate/SKILL.md +7 -4
- 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_device_locale_dialogs.mjs +17 -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/SKILL.md +51 -13
- package/skills/a2h-module-semantic-docs/scripts/scan_modules.mjs +66 -11
- 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_incremental_fingerprint.mjs +94 -0
- package/skills/a2h-module-semantic-docs/test/test_scan_and_commit.mjs +388 -0
- package/skills/a2h-page-specgen/SKILL.md +240 -0
- package/skills/a2h-page-specgen/references/behavior-ledger.md +1170 -0
- package/skills/a2h-page-specgen/references/body-language.md +179 -0
- package/skills/a2h-page-specgen/references/evidence.md +105 -0
- package/skills/a2h-page-specgen/references/execution-model.md +364 -0
- package/skills/a2h-page-specgen/references/footprint-and-grouping.md +255 -0
- package/skills/a2h-page-specgen/references/gates.md +323 -0
- package/skills/a2h-page-specgen/references/page-inventory.md +220 -0
- package/skills/a2h-page-specgen/references/scenario-authoring.md +272 -0
- package/skills/a2h-page-specgen/references/spec-example.md +312 -0
- package/skills/a2h-page-specgen/references/spec-template.md +210 -0
- package/skills/a2h-page-specgen/scripts/behavior-audit.mjs +2436 -0
- package/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +1833 -0
- package/skills/a2h-page-specgen/scripts/behavior-model.mjs +181 -0
- package/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +1205 -0
- package/skills/a2h-page-specgen/scripts/dispatch.mjs +212 -0
- package/skills/a2h-page-specgen/scripts/entry-evidence.mjs +1123 -0
- package/skills/a2h-page-specgen/scripts/facts-build.mjs +1613 -0
- package/skills/a2h-page-specgen/scripts/finalize.mjs +825 -0
- package/skills/a2h-page-specgen/scripts/footprint.mjs +1650 -0
- package/skills/a2h-page-specgen/scripts/gate.mjs +848 -0
- package/skills/a2h-page-specgen/scripts/interactions.mjs +344 -0
- package/skills/a2h-page-specgen/scripts/inventory.mjs +371 -0
- package/skills/a2h-page-specgen/scripts/lib/contracts.mjs +155 -0
- package/skills/a2h-page-specgen/scripts/lib/deps-source.mjs +399 -0
- package/skills/a2h-page-specgen/scripts/lib/draft-store.mjs +229 -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/graph-evidence.mjs +235 -0
- package/skills/a2h-page-specgen/scripts/lib/hg.mjs +683 -0
- package/skills/a2h-page-specgen/scripts/lib/homegraph-process.mjs +102 -0
- package/skills/a2h-page-specgen/scripts/lib/homegraph-query.mjs +161 -0
- package/skills/a2h-page-specgen/scripts/lib/ledger.mjs +478 -0
- package/skills/a2h-page-specgen/scripts/lib/main-module.mjs +24 -0
- package/skills/a2h-page-specgen/scripts/lib/operation-reviews.mjs +913 -0
- package/skills/a2h-page-specgen/scripts/lib/prose.mjs +238 -0
- package/skills/a2h-page-specgen/scripts/lib/reach.mjs +53 -0
- package/skills/a2h-page-specgen/scripts/lib/recovery-policy.mjs +28 -0
- package/skills/a2h-page-specgen/scripts/lib/scope.mjs +355 -0
- package/skills/a2h-page-specgen/scripts/lib/semantic-detail.mjs +353 -0
- package/skills/a2h-page-specgen/scripts/lib/source-text.mjs +497 -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/operation-evidence.mjs +1542 -0
- package/skills/a2h-page-specgen/scripts/prepare.mjs +840 -0
- package/skills/a2h-page-specgen/scripts/render.mjs +294 -0
- package/skills/a2h-page-specgen/scripts/report.mjs +340 -0
- package/skills/a2h-page-specgen/scripts/submission.mjs +697 -0
- package/skills/a2h-page-specgen/scripts/submit.mjs +85 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/README.md +77 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +871 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.java +15 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.json +26 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.java +36 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.json +43 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +2694 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +726 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +108 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.review.md +65 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +265 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.java +47 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.json +54 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/branch-checklist.md +32 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/gate-results.json +22 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/manifest.json +111 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/portability.test.mjs +141 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/review.md +22 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +515 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/cases.example.json +57 -0
- package/skills/a2h-page-specgen/scripts/test/android-entry-evidence.test.mjs +585 -0
- package/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +755 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-group.test.mjs +543 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-post.test.mjs +652 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +1231 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-component-gate.test.mjs +494 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +1513 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-finalize.test.mjs +758 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +623 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-model.test.mjs +116 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +795 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-regression.test.mjs +883 -0
- package/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +205 -0
- package/skills/a2h-page-specgen/scripts/test/dispatch.test.mjs +258 -0
- package/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +475 -0
- package/skills/a2h-page-specgen/scripts/test/facts.test.mjs +1203 -0
- package/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +243 -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 +112 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanels.java +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanels.kt +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanelsKotlinForms.kt +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ChildContent.java +6 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ComposeLifecycle.kt +26 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/LifecycleCallAndOverride.java +10 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/LifecycleHooks.kt +31 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/MainFragment.java +6 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ManyLifecycleHooks.kt +12 -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/src/RefreshOnResume.java +7 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/RefreshResultNoise.kt +36 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/SelectionView.java +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ShowPage.vue +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ThirdPartyLifecycle.kt +25 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/fragment_detail.xml +1 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/App.vue +1 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-conflict-record.json +17 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-record.json +17 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/manifest.json +3 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages/list/index.vue +80 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages.json +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/source-record.json +15 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/components/RefreshPanel.vue +15 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/composables/useRefresh.ts +50 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/pages/help/index.vue +9 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/state/store.ts +4 -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 +1029 -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 +143 -0
- package/skills/a2h-page-specgen/scripts/test/gate.test.mjs +1078 -0
- package/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +332 -0
- package/skills/a2h-page-specgen/scripts/test/helpers.mjs +188 -0
- package/skills/a2h-page-specgen/scripts/test/hg.test.mjs +549 -0
- package/skills/a2h-page-specgen/scripts/test/homegraph-process-fixture.mjs +130 -0
- package/skills/a2h-page-specgen/scripts/test/homegraph-query.test.mjs +288 -0
- package/skills/a2h-page-specgen/scripts/test/integration.test.mjs +368 -0
- package/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +310 -0
- package/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +250 -0
- package/skills/a2h-page-specgen/scripts/test/keys.test.mjs +776 -0
- package/skills/a2h-page-specgen/scripts/test/ledger-lock.test.mjs +77 -0
- package/skills/a2h-page-specgen/scripts/test/ledger.test.mjs +464 -0
- package/skills/a2h-page-specgen/scripts/test/main-module.test.mjs +43 -0
- package/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +1002 -0
- package/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +1103 -0
- package/skills/a2h-page-specgen/scripts/test/prepare-homegraph-reproduction.mjs +365 -0
- package/skills/a2h-page-specgen/scripts/test/prepare-homegraph.test.mjs +569 -0
- package/skills/a2h-page-specgen/scripts/test/prepare-index.test.mjs +160 -0
- package/skills/a2h-page-specgen/scripts/test/prepare-pipeline.test.mjs +326 -0
- package/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +236 -0
- package/skills/a2h-page-specgen/scripts/test/prose.test.mjs +398 -0
- package/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +531 -0
- package/skills/a2h-page-specgen/scripts/test/reach.test.mjs +93 -0
- package/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +418 -0
- package/skills/a2h-page-specgen/scripts/test/recovery-policy.test.mjs +14 -0
- package/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +1782 -0
- package/skills/a2h-page-specgen/scripts/test/render.test.mjs +546 -0
- package/skills/a2h-page-specgen/scripts/test/report.test.mjs +296 -0
- package/skills/a2h-page-specgen/scripts/test/review-followup.test.mjs +467 -0
- package/skills/a2h-page-specgen/scripts/test/scope.test.mjs +292 -0
- package/skills/a2h-page-specgen/scripts/test/semantic-detail.test.mjs +949 -0
- package/skills/a2h-page-specgen/scripts/test/source-text.test.mjs +181 -0
- package/skills/a2h-page-specgen/scripts/test/submit.test.mjs +1231 -0
- package/skills/a2h-page-specgen/scripts/test/uniapp-operation-evidence.test.mjs +639 -0
- package/skills/a2h-page-specgen/scripts/test/utg-footprint-contract.test.mjs +274 -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 +1801 -0
- package/skills/a2h-page-specgen/scripts/test/waker.test.mjs +1993 -0
- package/skills/a2h-page-specgen/scripts/test/watchdog.test.mjs +342 -0
- package/skills/a2h-page-specgen/scripts/waker.mjs +1301 -0
- package/skills/a2h-page-specgen/scripts/watchdog.mjs +299 -0
- package/skills/a2h-resource-convert/SKILL.md +9 -1
- package/skills/a2h-resource-convert/references/code-vector-icon-rules.md +2 -1
- package/skills/a2h-resource-convert/references/incremental-page-migration.md +23 -2
- package/skills/a2h-resource-convert/references/lottie-conversion-rules.md +7 -0
- package/skills/a2h-resource-convert/references/step4-resource-types.md +2 -0
- package/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +115 -53
- package/skills/a2h-resource-convert/scripts/a2h_resource_incremental.ts +68 -0
- package/skills/a2h-resource-convert/scripts/code_vector_icons.ts +45 -3
- package/skills/a2h-resource-convert/scripts/extract_page_resources.ts +42 -5
- package/skills/a2h-resource-convert/scripts/lottie_hosts.ts +415 -0
- package/skills/a2h-resource-convert/scripts/lottie_refs.ts +398 -0
- package/skills/a2h-resource-convert/scripts/merge_mapping.ts +316 -0
- package/skills/a2h-resource-convert/scripts/svg_fidelity_check.ts +2 -1
- 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/code_vector_guard.test.mjs +75 -0
- package/skills/a2h-resource-convert/scripts/tests/docs_only_i18n.test.mjs +44 -0
- package/skills/a2h-resource-convert/scripts/tests/lottie_hosts.test.mjs +222 -0
- package/skills/a2h-resource-convert/scripts/tests/lottie_incremental.test.mjs +178 -0
- package/skills/a2h-resource-convert/scripts/tests/merge_mapping.test.mjs +201 -0
- package/skills/a2h-spec-design-pipeline/SKILL.md +98 -121
- package/skills/a2h-spec-design-pipeline/references/coding-loop.md +170 -45
- package/skills/a2h-spec-design-pipeline/references/execution-model.md +62 -12
- package/skills/a2h-spec-design-pipeline/references/final-report-template.md +6 -4
- package/skills/a2h-spec-design-pipeline/references/homegraph-cli.md +229 -0
- package/skills/a2h-spec-design-pipeline/references/initialization.md +49 -6
- package/skills/a2h-spec-design-pipeline/references/merge-queue.md +198 -54
- package/skills/a2h-spec-design-pipeline/references/permission-index.json +206 -0
- package/skills/a2h-spec-design-pipeline/references/post-loop.md +23 -0
- package/skills/a2h-spec-design-pipeline/references/resolver-prompt.md +67 -0
- package/skills/a2h-spec-design-pipeline/references/review-loop.md +46 -0
- package/skills/a2h-spec-design-pipeline/references/scripts.md +47 -14
- package/skills/a2h-spec-design-pipeline/references/shared-layer.md +390 -0
- package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +148 -29
- package/skills/a2h-spec-design-pipeline/references/static-defect-gate.md +104 -24
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleMeta.json +18 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleSet.json +16 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/README.md +47 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-param-contract.json +31 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-permission-map.json +698 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-cn.md +96 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-en.md +103 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-cn.md +124 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-en.md +138 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-cn.md +106 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-en.md +113 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ApiPermissionDeclaredCheck.js +705 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ArkUIRuntimePitfallCheck.js +1063 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/PlatformApiContractCheck.js +473 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/platform/ExtraDataSubCheck.js +485 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/index.js +13 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/package.json +18 -0
- package/skills/a2h-spec-design-pipeline/scripts/branch_landed.ts +12 -38
- package/skills/a2h-spec-design-pipeline/scripts/check_design_map.ts +108 -0
- package/skills/a2h-spec-design-pipeline/scripts/check_permissions.ts +420 -0
- package/skills/a2h-spec-design-pipeline/scripts/check_review_evidence.ts +45 -0
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/evidence.mjs +95 -7
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/fold.mjs +156 -7
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/landing.mjs +71 -0
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/progress.mjs +22 -3
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/reconcile.mjs +63 -4
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/wait.mjs +33 -3
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/worktree.mjs +2 -2
- package/skills/a2h-spec-design-pipeline/scripts/dispatch.mjs +232 -13
- package/skills/a2h-spec-design-pipeline/scripts/ensure_index.ts +866 -0
- package/skills/a2h-spec-design-pipeline/scripts/fixtures/homecheck-stub.cjs +47 -0
- package/skills/a2h-spec-design-pipeline/scripts/homecheck_scan.ts +220 -44
- 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 +178 -14
- package/skills/a2h-spec-design-pipeline/scripts/resolve_wiring.ts +3 -0
- package/skills/a2h-spec-design-pipeline/scripts/resolver_prompt.ts +368 -0
- package/skills/a2h-spec-design-pipeline/scripts/scan_shared.ts +642 -0
- package/skills/a2h-spec-design-pipeline/scripts/sync_permission_index.ts +340 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_api_permission_declared.ts +281 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_arkui_runtime_pitfall.ts +690 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_check_design_map.ts +46 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_check_permissions.ts +201 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_commands.mjs +42 -8
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_e2e.mjs +27 -9
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_evidence.mjs +242 -9
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_fold.mjs +192 -7
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_landing.mjs +531 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_progress.mjs +49 -1
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_reconcile.mjs +92 -4
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_wait.mjs +51 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_index.ts +572 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_index_real.ts +56 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_homecheck_scan.ts +17 -10
- package/skills/a2h-spec-design-pipeline/scripts/test_homegraph_docs.ts +217 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_permission_index.ts +214 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +155 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_platform_api_contract.ts +308 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_resolve_wiring.ts +14 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_resolver_prompt.ts +401 -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 +165 -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 +89 -23
- 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/specs.schema.json +24 -11
- 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/ensure-index.mjs +1 -2
- 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 +229 -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/SKILL.md +9 -3
- package/skills/a2h-utg-explorer/references/architecture.md +7 -0
- package/skills/a2h-utg-explorer/scripts/audit.mjs +8 -2
- package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +120 -85
- package/skills/a2h-utg-explorer/scripts/direct_launch.mjs +47 -2
- package/skills/a2h-utg-explorer/scripts/hint_check.mjs +1 -2
- package/skills/a2h-utg-explorer/scripts/hybrid_route_cdp.mjs +376 -0
- package/skills/a2h-utg-explorer/scripts/plan.mjs +8 -0
- package/skills/a2h-utg-explorer/scripts/recover.mjs +1 -1
- package/skills/a2h-utg-explorer/scripts/recover_d.mjs +288 -21
- package/skills/a2h-utg-explorer/scripts/rejudge.mjs +5 -3
- package/skills/a2h-utg-explorer/scripts/report.mjs +89 -0
- package/skills/a2h-utg-explorer/scripts/run_cycle.mjs +67 -10
- package/skills/a2h-utg-explorer/scripts/run_device.mjs +10 -2
- package/skills/a2h-utg-explorer/scripts/seed_recipes.mjs +426 -0
- package/skills/a2h-utg-explorer/scripts/tests/attest.test.mjs +66 -0
- package/skills/a2h-utg-explorer/scripts/tests/blank_wait.test.mjs +126 -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/default_override.test.mjs +109 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_health.test.mjs +160 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_locale_dialogs.test.mjs +29 -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/diagnostics.test.mjs +254 -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/foreground_spelling.test.mjs +155 -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/hybrid_route.test.mjs +120 -0
- package/skills/a2h-utg-explorer/scripts/tests/hybrid_route_identity.test.mjs +146 -0
- package/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +614 -0
- package/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +214 -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/pr169_review_fixes.test.mjs +218 -0
- package/skills/a2h-utg-explorer/scripts/tests/pr191_review_fixes.test.mjs +292 -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/recover_d_grounding.test.mjs +164 -0
- package/skills/a2h-utg-explorer/scripts/tests/replay_reroute.test.mjs +143 -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 +458 -0
- package/skills/a2h-utg-explorer/scripts/tests/run_cycle_follow.test.mjs +35 -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/seed_recipes.test.mjs +261 -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 +135 -7
- package/skills/a2h-utg-explorer/scripts/utg_explorer/diagnostics.mjs +196 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/hybrid_route.mjs +140 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +245 -69
- package/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +47 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/strings.mjs +164 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +718 -42
- package/skills/a2h-utg-explorer/scripts/variant.mjs +57 -11
- package/skills/a2h-utg-static/SKILL.md +6 -2
- package/skills/a2h-utg-static/scripts/assemble.mjs +93 -3
- package/skills/a2h-utg-static/scripts/click_paths.mjs +135 -25
- package/skills/a2h-utg-static/scripts/compose_body_text.mjs +3 -3
- package/skills/a2h-utg-static/scripts/compose_overlay.mjs +110 -3
- package/skills/a2h-utg-static/scripts/compose_titles.mjs +5 -5
- package/skills/a2h-utg-static/scripts/compose_widgets.mjs +4 -4
- package/skills/a2h-utg-static/scripts/data_model.mjs +590 -0
- package/skills/a2h-utg-static/scripts/data_producers.mjs +431 -0
- package/skills/a2h-utg-static/scripts/fragment_nav.mjs +2 -3
- package/skills/a2h-utg-static/scripts/hybrid_scope.mjs +46 -1
- package/skills/a2h-utg-static/scripts/label_resolve.mjs +49 -4
- package/skills/a2h-utg-static/scripts/lib/hybrid-provenance.mjs +201 -0
- package/skills/a2h-utg-static/scripts/lib/uniapp-routes.mjs +195 -0
- package/skills/a2h-utg-static/scripts/menu_nav.mjs +1 -1
- package/skills/a2h-utg-static/scripts/nl_hints.mjs +34 -7
- 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/run_pipeline.mjs +86 -4
- 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_carry_answers.mjs +30 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +18 -0
- package/skills/a2h-utg-static/scripts/tests/test_data_model.mjs +120 -0
- package/skills/a2h-utg-static/scripts/tests/test_data_producers.mjs +114 -0
- package/skills/a2h-utg-static/scripts/tests/test_guard_kinds_locale.mjs +12 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_provenance.mjs +150 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +165 -1
- package/skills/a2h-utg-static/scripts/tests/test_library_activity.mjs +45 -0
- package/skills/a2h-utg-static/scripts/tests/test_login_interceptor.mjs +38 -0
- package/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +35 -1
- package/skills/a2h-utg-static/scripts/tests/test_nl_hints_default_override.mjs +50 -0
- package/skills/a2h-utg-static/scripts/tests/test_pipeline_llm_phases.mjs +21 -0
- package/skills/a2h-utg-static/scripts/tests/test_pr169_review_fixes.mjs +172 -0
- package/skills/a2h-utg-static/scripts/tests/test_redirect_path_cost.mjs +136 -0
- package/skills/a2h-utg-static/scripts/tests/test_route_token_words.mjs +29 -1
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_route_jump.mjs +175 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_routes.mjs +161 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +99 -0
- package/skills/a2h-utg-static/scripts/tests/test_utg_specgen_boundary.mjs +45 -0
- package/skills/a2h-utg-static/scripts/tests/test_vm_nav_helper_navigate.mjs +21 -0
- package/skills/a2h-utg-static/scripts/uniapp_nav.mjs +112 -69
- package/skills/a2h-utg-static/scripts/vm_nav.mjs +9 -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/ensure_wt_index.ts +0 -885
- 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_ensure_wt_index.ts +0 -856
- 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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* task_runner.mjs — port of task_runner.py. Verified parent recovery, finite selector search,
|
|
3
3
|
* scroll sweeps and evidence-backed mappings. Synchronous like the Python.
|
|
4
4
|
*
|
|
5
|
-
* Exports: deviceLock, DeviceBusy, lockOwner, lockWait, LOCK_WAIT_S, BudgetExhausted, _isHorizontal, _viewSig, TRANSIENT_DEVICE_RE, Runner,
|
|
5
|
+
* Exports: deviceLock, DeviceBusy, lockOwner, lockWait, LOCK_WAIT_S, BudgetExhausted, _isHorizontal, _viewSig, TRANSIENT_DEVICE_RE, fixtureStepTarget, Runner,
|
|
6
6
|
* runCampaignPhase, deps (indirection used by tests to replace imported functions,
|
|
7
7
|
* e.g. deps.observationMatchesStatic, like monkeypatching the Python module global)
|
|
8
8
|
*
|
|
@@ -35,11 +35,14 @@ import {
|
|
|
35
35
|
} from './_py.mjs';
|
|
36
36
|
import { deviceLockPath, LOCK_GRACE_S, holderGone, myStartMs } from './device_lock.mjs';
|
|
37
37
|
import {
|
|
38
|
-
DeviceAdapter, AdapterError, atomicWriteJson, event, readJson, matching, observationKey, ruleMatches, tarProblem,
|
|
38
|
+
DeviceAdapter, AdapterError, atomicWriteJson, event, readJson, matching, observationKey, ruleMatches, rowToggle, tarProblem,
|
|
39
39
|
} from './adapters.mjs';
|
|
40
40
|
import { applyStateAnchors, observationMatchesStatic, resolvePage, occludedIndices, resolveTwinByOpener, backCanReach, uiStatesOf, normalized, isInputNode } from './semantics.mjs';
|
|
41
41
|
import { coverageMode, coveredStaticIds, scopeOf } from './coverage.mjs';
|
|
42
|
+
import { COLLAPSE_MIN_CASCADE, collapsedPrefixes, collapseNote, emptyStateComponents, emptyStateShown } from './diagnostics.mjs';
|
|
43
|
+
import { loadStringTables, deviceTextsIn } from './strings.mjs';
|
|
42
44
|
import { triggerAttests } from './attest.mjs';
|
|
45
|
+
import { fallbackScope } from './state_phase.mjs';
|
|
43
46
|
|
|
44
47
|
/** Indirection for functions tests replace (Python patches module globals). */
|
|
45
48
|
export const deps = { observationMatchesStatic, resolvePage, triggerAttests };
|
|
@@ -219,8 +222,39 @@ export function grantRuntimePermissions(device, config) {
|
|
|
219
222
|
export const TRANSIENT_DEVICE_RE = new RegExp(
|
|
220
223
|
"Can't find service|Cannot identify foreground window|device '[^']+' not found|"
|
|
221
224
|
+ 'device offline|error: closed|device-timeout|ui-dump-(?:failed|remote-missing)|Foreground changed during capture');
|
|
225
|
+
/**
|
|
226
|
+
* Route-jump failure codes (hybrid_route_cdp.mjs, carried as `hybrid-route[<code>]: ...`). DOWN codes
|
|
227
|
+
* are deterministic and settle the phase's remaining route tasks; TRANSIENT codes are retried.
|
|
228
|
+
*/
|
|
229
|
+
export const ROUTE_DOWN_CODES = new Set(['no-devtools-socket', 'uni-absent']);
|
|
230
|
+
export const ROUTE_TRANSIENT_CODES = new Set(['cdp-transient', 'adb-error', 'deadline']);
|
|
231
|
+
/** The code of a `hybrid-route[<code>]: ...` adapter error, else null. */
|
|
232
|
+
export function routeErrorCode(msg) {
|
|
233
|
+
const m = /hybrid-route\[([\w-]+)\]/.exec(String(msg));
|
|
234
|
+
return m ? m[1] : null;
|
|
235
|
+
}
|
|
236
|
+
/** The adapter's error for a foreground that moved between a capture's first and last read. */
|
|
237
|
+
const FOREGROUND_MOVED_RE = /Foreground changed during capture/;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* What a failed fixture step acted on, for its `fixture-step-failed` reason: the selector(s) of a
|
|
241
|
+
* tap, else the launch target (component / component_fqn / uri / intent action). A launch has no
|
|
242
|
+
* selector, so the reason read `launch ""` and hid which component failed (yd-weather 11-14).
|
|
243
|
+
*/
|
|
244
|
+
export function fixtureStepTarget(action) {
|
|
245
|
+
for (const k of ['selectors', 'selector', 'component', 'component_fqn', 'uri', 'action']) {
|
|
246
|
+
if (truthy(get(action, k))) { return action[k]; }
|
|
247
|
+
}
|
|
248
|
+
return '';
|
|
249
|
+
}
|
|
222
250
|
|
|
223
251
|
const isVisible = (n) => truthy(get(n, 'visible', true));
|
|
252
|
+
/** Blank waits in a row that ran out before blank frames stop being waited on (Runner.awaitContent). */
|
|
253
|
+
const BLANK_RUN_OUTS = 3;
|
|
254
|
+
/** The distinct visible texts / content descriptions of a capture (at most 200), for a revision item. */
|
|
255
|
+
const visibleTexts = (observation) => [...new Set(get(observation ?? {}, 'nodes', []).filter((n) => isVisible(n))
|
|
256
|
+
.flatMap((n) => [get(n, 'text'), get(n, 'content_desc')]).filter((t) => truthy(t)).map((t) => pyStr(t).trim())
|
|
257
|
+
.filter((t) => t.length > 0))].slice(0, 200);
|
|
224
258
|
/** A consent CheckBox's own label (「我已阅读并同意」), as against an optional one (「接收推送」). */
|
|
225
259
|
const CONSENT_BOX_RE = /同意|已阅读|agree|accept/i;
|
|
226
260
|
/**
|
|
@@ -230,7 +264,9 @@ const CONSENT_BOX_RE = /同意|已阅读|agree|accept/i;
|
|
|
230
264
|
*/
|
|
231
265
|
const CONSENT_POSITIVE_RE = /^(?:我)?(?:同意|接受)(?:并(?:继续|使用|进入|开始使用))?$|^(?:i )?(?:agree|accept)(?:(?: and| &) (?:continue|proceed))?$/i;
|
|
232
266
|
/** A label that declines or leaves: an app may put that on button1, so its id alone does not make it the accept. */
|
|
233
|
-
const CONSENT_DECLINE_RE
|
|
267
|
+
const CONSENT_DECLINE_RE =/不同意|拒绝|退出|取消|暂不|disagree|decline|reject|refuse|exit|quit|cancel|not now/i;
|
|
268
|
+
/** A system dialog's button that stops it coming back: 「不再显示」, "Don't show again". */
|
|
269
|
+
const SYSTEM_DIALOG_SUPPRESS_RE = /^(?:不再显示|不再提示|下次不再提示|don['’]?t show again|do not show again|never show again)$/i;
|
|
234
270
|
/** A toggle (CheckBox, Switch, ...): pressing it ticks, it does not accept, even when its label is 「同意」. */
|
|
235
271
|
const isToggle = (n) => [true, 'true'].includes(get(n, 'checkable'))
|
|
236
272
|
|| /(?:CheckBox|Switch|RadioButton|ToggleButton|CheckedTextView)$/.test(pyStr(get(n, 'class', '')));
|
|
@@ -375,9 +411,84 @@ export function navigatedAway(before, after, catalog = {}) {
|
|
|
375
411
|
return !OVERLAY_KINDS.has(kind);
|
|
376
412
|
}
|
|
377
413
|
|
|
414
|
+
/**
|
|
415
|
+
* rowGroups(nodes): containers whose children include at least 3 visible clickable rows of one class
|
|
416
|
+
* and similar height (within 25%), stacked vertically: a list the dump does not flag scrollable.
|
|
417
|
+
* Measured (coolmall 2026-11-16): a region picker sheet's LazyColumn of provinces reported no
|
|
418
|
+
* `scrollable`, so a list step there found no list at all.
|
|
419
|
+
*/
|
|
420
|
+
export function rowGroups(nodes) {
|
|
421
|
+
const kids = new Map();
|
|
422
|
+
nodes.forEach((n, i) => { const p = get(n, 'parent_index'); if (p !== null && p !== undefined) { if (!kids.has(p)) { kids.set(p, []); } kids.get(p).push(i); } });
|
|
423
|
+
const hasText = (i, d = 0) => d < 4 && (pyStr(get(nodes[i], 'text', '')).trim() !== '' || (kids.get(i) || []).some((k) => hasText(k, d + 1)));
|
|
424
|
+
const rootW = (() => { const b = get(nodes[0] || {}, 'bounds', []); return b.length === 4 ? b[2] - b[0] : 0; })();
|
|
425
|
+
const out = [];
|
|
426
|
+
for (const [p, ks] of kids) {
|
|
427
|
+
const rows = ks.map((i) => nodes[i]).filter((n) => isVisible(n) && truthy(get(n, 'clickable')) && get(n, 'bounds', []).length === 4);
|
|
428
|
+
// One or two rows (a picker level with one city): every child a full-width clickable row with
|
|
429
|
+
// text, in a container at least half the screen wide; a tab strip, a drag handle or a scrim is not.
|
|
430
|
+
const cb = get(nodes[p] || {}, 'bounds', []);
|
|
431
|
+
if (rows.length && rows.length < 3) {
|
|
432
|
+
const w = cb.length === 4 ? cb[2] - cb[0] : 0;
|
|
433
|
+
const ok = rows.length === ks.length && w > 0 && (!rootW || w >= 0.5 * rootW)
|
|
434
|
+
&& rows.every((r) => r.bounds[2] - r.bounds[0] >= 0.9 * w) && ks.every((i) => hasText(i));
|
|
435
|
+
if (ok) { out.push(p); }
|
|
436
|
+
continue;
|
|
437
|
+
}
|
|
438
|
+
if (rows.length < 3) { continue; }
|
|
439
|
+
const cls = pyStr(get(rows[0], 'class', ''));
|
|
440
|
+
if (!rows.every((r) => pyStr(get(r, 'class', '')) === cls)) { continue; }
|
|
441
|
+
const hs = rows.map((r) => r.bounds[3] - r.bounds[1]).sort((a, b) => a - b);
|
|
442
|
+
const tops = rows.map((r) => r.bounds[1]);
|
|
443
|
+
const stacked = tops.every((t, k) => k === 0 || t >= tops[k - 1]);
|
|
444
|
+
// the last row may be cut by the screen edge: compare the full ones
|
|
445
|
+
const full = hs.slice(Math.min(1, hs.length - 3));
|
|
446
|
+
if (stacked && full[0] >= 0.75 * full.at(-1)) { out.push(p); }
|
|
447
|
+
}
|
|
448
|
+
return out;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* sameTemplateRows(nodes, idx): true when the nodes at `idx` are one control repeated by a row
|
|
453
|
+
* template: each lies in a different child ("row") of their deepest common ancestor, every row has
|
|
454
|
+
* the same class tree (texts ignored), and the control sits at the same child path in each. A
|
|
455
|
+
* list's rows qualify; two different buttons that share a label (a tab and a row button, a toolbar
|
|
456
|
+
* and a dialog) never do. Measured (coolmall 2026-11-16): a coupon sheet's 「立即领取」 per coupon
|
|
457
|
+
* failed three tasks as an ambiguous selector though any row opens the same login page.
|
|
458
|
+
*/
|
|
459
|
+
export function sameTemplateRows(nodes, idx) {
|
|
460
|
+
if (idx.length < 2 || idx.some((i) => !(i >= 0 && i < nodes.length))) { return false; }
|
|
461
|
+
const parent = (i) => { const p = get(nodes[i], 'parent_index'); return p === null || p === undefined || !(p >= 0 && p < nodes.length) ? null : p; };
|
|
462
|
+
const chain = (i) => { const out = []; let c = i; const seen = new Set(); while (c !== null && !seen.has(c)) { seen.add(c); out.push(c); c = parent(c); } return out; };
|
|
463
|
+
const chains = idx.map(chain);
|
|
464
|
+
const common = chains[0].find((a) => chains.every((c) => c.includes(a)));
|
|
465
|
+
if (common === undefined || idx.includes(common)) { return false; }
|
|
466
|
+
const rows = chains.map((c) => c[c.indexOf(common) - 1]);
|
|
467
|
+
if (new Set(rows).size !== rows.length) { return false; }
|
|
468
|
+
const kids = new Map();
|
|
469
|
+
nodes.forEach((n, i) => { const p = parent(i); if (p !== null) { if (!kids.has(p)) { kids.set(p, []); } kids.get(p).push(i); } });
|
|
470
|
+
const shape = (i) => `${pyStr(get(nodes[i], 'class', ''))}(${(kids.get(i) || []).map(shape).join(',')})`;
|
|
471
|
+
const pathIn = (row, i) => { const out = []; let c = i; while (c !== row) { const p = parent(c); out.push((kids.get(p) || []).indexOf(c)); c = p; } return out.join('/'); };
|
|
472
|
+
const s0 = shape(rows[0]); const p0 = pathIn(rows[0], idx[0]);
|
|
473
|
+
return rows.every((r, k) => shape(r) === s0 && pathIn(r, idx[k]) === p0);
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* writesData(text): a control label that writes to the app's backend when tapped (claim a coupon, add
|
|
478
|
+
* to cart, buy, delete, follow...). Such a control is never chosen by the runner's own loosening (a
|
|
479
|
+
* repeated row control taken by index, a list row probed) unless `config.allow_data_writes` is true.
|
|
480
|
+
* With the switch off a write is the costly mistake, so any label holding a write verb counts
|
|
481
|
+
* (「领取优惠券」「确认支付」「取消关注」「删除订单」「Add to wishlist」), except a label that names a
|
|
482
|
+
* place to go: a 「我的…」 entry or a page of records (「…记录」「…历史」「…列表」「…中心」「…明细」),
|
|
483
|
+
* which only opens a page.
|
|
484
|
+
*/
|
|
485
|
+
export const WRITE_LABEL_RE = /领取|领券|加购|加入购物车|购买|抢购|下单|提交|支付|付款|删除|收藏|关注|点赞|兑换|签到|确认收货|取消订单|^\s*\+|\b(?:add to|buy|purchase|claim|redeem|delete|remove|submit|pay|order now|place order|follow|unfollow|like|favou?rite|wishlist|subscribe)\b/i;
|
|
486
|
+
export const NAV_LABEL_RE = /^\s*我的|(?:记录|历史|列表|中心|明细|日历|规则|说明|攻略|详情|管理)\s*(?:\(\d+\))?\s*$|^\s*my\b|\b(?:history|records?|list|center|centre|details?|rules|calendar)\s*$/i;
|
|
487
|
+
export function writesData(text) { return typeof text === 'string' && WRITE_LABEL_RE.test(text) && !NAV_LABEL_RE.test(text); }
|
|
488
|
+
|
|
378
489
|
/** Failure reasons that repeat for every task replaying the same prefix in the same environment. */
|
|
379
490
|
export const PREFIX_FAILURES = ['selector-not-found-after-bounded-scroll', 'replay-target-unverified:',
|
|
380
|
-
'ambiguous selector', 'list-item:', 'Scroll requires one visible scrollable container'];
|
|
491
|
+
'ambiguous selector', 'list-item:', 'Scroll requires one visible scrollable container', 'needs-data:', 'needs-network:'];
|
|
381
492
|
|
|
382
493
|
/** Key of a task's launch plus its first `n` replay steps. */
|
|
383
494
|
export function prefixKey(task, n) {
|
|
@@ -504,6 +615,27 @@ export class Runner {
|
|
|
504
615
|
* an upper layer paints over (the host page under a full-screen fragment) is not this page's.
|
|
505
616
|
* a2h-batch-ui-align export_ui_info.mjs placeholderTexts applies the same test to the export.
|
|
506
617
|
*/
|
|
618
|
+
/**
|
|
619
|
+
* A capture of the app under test with nothing on it yet: its own visible nodes carry no text,
|
|
620
|
+
* no content description and none is clickable. A tap that opens a page captures the frame
|
|
621
|
+
* between the two (the old page gone, the new one not yet laid out), and such a frame resolves
|
|
622
|
+
* to no page, so looksLoading (verified pages only) never waited on it. Measured (coolmall
|
|
623
|
+
* 2026-11-18): every goods-list row tap captured a 38-node frame of bare Views and the list probe
|
|
624
|
+
* judged at once that no row opened the goods page; the same tap followed by a 4 s wait landed
|
|
625
|
+
* on it. Another app's foreground (a launcher, a system dialog) is not this.
|
|
626
|
+
*/
|
|
627
|
+
looksBlank(observation) {
|
|
628
|
+
const pkg = get(this.config, 'package');
|
|
629
|
+
if (!truthy(pkg) || get(observation, 'package') !== pkg) { return false; }
|
|
630
|
+
const own = get(observation, 'nodes', []).filter((n) => isVisible(n) && get(n, 'package', pkg) === pkg);
|
|
631
|
+
const blank = !own.some((n) => truthy(get(n, 'clickable')) || pyStr(get(n, 'text', '') ?? '').trim()
|
|
632
|
+
|| pyStr(get(n, 'content_desc', '') ?? '').trim());
|
|
633
|
+
// Only for an app that has shown a labelled screen: one whose tree never carries text (a canvas
|
|
634
|
+
// or a Flutter app without semantics) is blank on every capture and would pay the wait on each.
|
|
635
|
+
if (!blank) { this._appShowedText = true; return false; }
|
|
636
|
+
return this._appShowedText === true;
|
|
637
|
+
}
|
|
638
|
+
|
|
507
639
|
looksLoading(observation) {
|
|
508
640
|
const resolution = get(observation, 'static_resolution', {});
|
|
509
641
|
if (get(resolution, 'status') !== 'verified') { return false; }
|
|
@@ -563,7 +695,9 @@ export class Runner {
|
|
|
563
695
|
if (resolution.status === 'verified') {
|
|
564
696
|
Object.assign(observation.identity, { family: resolution.static_id, status: 'verified', basis: resolution.anchors, reason: resolution.reason });
|
|
565
697
|
}
|
|
566
|
-
if (
|
|
698
|
+
if (resolution.status === 'verified') { this._lastVerified = resolution.static_id; }
|
|
699
|
+
if (this.looksBlank(observation)) { Object.assign(observation, { loading: true, blank: true }); }
|
|
700
|
+
else if (this.looksLoading(observation)) { observation.loading = true; }
|
|
567
701
|
// Seen loaded: its loading passes, so a wait that ran out there was a slow load (awaitContent).
|
|
568
702
|
// Only the first run-out is forgiven: a page that runs out again after that flips between
|
|
569
703
|
// a loading-looking and a loaded view (a spinner a scroll hides) and keeps its zero wait.
|
|
@@ -614,17 +748,28 @@ export class Runner {
|
|
|
614
748
|
* page stays (an empty state, a sparse screen, a spinner or a literal `%s` that never goes), and
|
|
615
749
|
* every later action landing on it would pay the full wait. A page seen loaded since loads
|
|
616
750
|
* slowly rather than never (a slow first fetch), so its next visit waits again.
|
|
751
|
+
* A blank frame that resolves to no page (looksBlank) waits `blank_wait_seconds` (default 6):
|
|
752
|
+
* with no page to remember it by, one that stayed blank must not cut the wait of the next,
|
|
753
|
+
* unrelated transition. Once BLANK_RUN_OUTS blank waits in a row have run out from one origin (the
|
|
754
|
+
* Activity and the last page verified before the frame), blank frames there are how that screen
|
|
755
|
+
* looks (an image viewer, a canvas) and are no longer waited on; other origins still wait.
|
|
617
756
|
*/
|
|
618
757
|
awaitContent(observation) {
|
|
619
758
|
let current = observation;
|
|
620
759
|
if (!current || !current.loading) { return current; }
|
|
621
760
|
const stuck = (this._loadingStuck ??= new Set());
|
|
622
761
|
const sid = () => get(get(current, 'static_resolution', {}), 'static_id');
|
|
623
|
-
const
|
|
762
|
+
const blankOnly = truthy(current.blank) && !truthy(sid());
|
|
763
|
+
const runOuts = (this._blankRunOuts ??= new Map());
|
|
764
|
+
// counted per transition origin: the Activity and the last page verified before the blank frame
|
|
765
|
+
const origin = `${pyStr(get(current, 'activity', ''))}|${pyStr(this._lastVerified ?? '')}`;
|
|
766
|
+
const wait = blankOnly ? ((runOuts.get(origin) ?? 0) >= BLANK_RUN_OUTS ? 0 : toFloat(get(this.config, 'blank_wait_seconds', 6)))
|
|
767
|
+
: stuck.has(sid()) ? 0 : toFloat(get(this.config, 'content_wait_seconds', 10));
|
|
624
768
|
const deadline = monotonic() + Math.max(0, wait);
|
|
625
769
|
while (current.loading && monotonic() < deadline) { sleep(0.5); current = this.capture(); }
|
|
770
|
+
if (blankOnly && wait > 0) { runOuts.set(origin, truthy(current.blank) ? (runOuts.get(origin) ?? 0) + 1 : 0); }
|
|
626
771
|
if (current.loading) {
|
|
627
|
-
if (wait > 0) { stuck.add(sid()); }
|
|
772
|
+
if (wait > 0 && truthy(sid())) { stuck.add(sid()); }
|
|
628
773
|
this.mapCapture(current);
|
|
629
774
|
}
|
|
630
775
|
return current;
|
|
@@ -638,12 +783,13 @@ export class Runner {
|
|
|
638
783
|
get(n, 'package') === pkg && isVisible(n) && truthy(get(n, 'clickable')));
|
|
639
784
|
}
|
|
640
785
|
|
|
641
|
-
atom(action, taskId, purpose) {
|
|
786
|
+
atom(action, taskId, purpose, { restoring: inRestore = false } = {}) {
|
|
642
787
|
const lifetime = this.doc.events.filter((e) => e.kind === 'attempt_started' && truthy(get(e.payload, 'atomic'))).length;
|
|
643
788
|
// A phase's cleanup runs after its budget is spent by design: restoring the
|
|
644
789
|
// environment never counts against it (measured: a recD phase that used its whole
|
|
645
790
|
// budget then threw from its cleanup, which run_cycle took as a fatal stage error).
|
|
646
|
-
|
|
791
|
+
// `inRestore`: a dismissal made on behalf of a restore (cleanup's launch met a dialog) shares its exemption.
|
|
792
|
+
const restoring = (purpose === 'restore' || inRestore) && lifetime < toInt(get(this.config, 'max_campaign_actions', 1800));
|
|
647
793
|
if (!restoring && (this.used >= this.args.budget || lifetime >= toInt(get(this.config, 'max_campaign_actions', 1800)) || monotonic() >= this.deadline)) {
|
|
648
794
|
throw new BudgetExhausted('atomic-action/time budget exhausted');
|
|
649
795
|
}
|
|
@@ -654,19 +800,22 @@ export class Runner {
|
|
|
654
800
|
const started = this.emit('attempt_started', { task_id: taskId, atomic: true, purpose, action, before: before.observation_id });
|
|
655
801
|
this.device.act(action, before);
|
|
656
802
|
this.device.settle();
|
|
657
|
-
|
|
658
|
-
|
|
803
|
+
const isLaunch = get(action, 'type') === 'launch';
|
|
804
|
+
// One budget per launch atom for captures the launch's own foreground moves spoil (launchCapture).
|
|
805
|
+
const moves = isLaunch ? { left: Math.max(0, toInt(get(this.config, 'launch_transition_captures', 3))) } : null;
|
|
806
|
+
let after = isLaunch ? this.launchCapture(taskId, moves) : this.capture();
|
|
807
|
+
if (isLaunch) {
|
|
659
808
|
this.dirty = false;
|
|
660
809
|
const waitS = Math.max(0.0, toFloat(get(this.config, 'launch_ready_seconds', 8)));
|
|
661
810
|
let deadline = monotonic() + waitS;
|
|
662
|
-
|
|
811
|
+
after = this.waitAppUi(deadline, taskId, after, purpose, moves);
|
|
663
812
|
for (let k = 0; k < toInt(get(this.config, 'launch_retries', 1)); k++) {
|
|
664
813
|
if (this.appUiReady()) { break; }
|
|
665
814
|
this.device.act(action, after);
|
|
666
815
|
this.device.settle();
|
|
667
816
|
deadline = monotonic() + waitS;
|
|
668
|
-
after = this.
|
|
669
|
-
|
|
817
|
+
after = this.launchCapture(taskId, moves);
|
|
818
|
+
after = this.waitAppUi(deadline, taskId, after, purpose, moves);
|
|
670
819
|
}
|
|
671
820
|
if (!this.appUiReady()) { throw new AdapterError('launch-ui-not-ready'); }
|
|
672
821
|
}
|
|
@@ -680,9 +829,26 @@ export class Runner {
|
|
|
680
829
|
before: before.observation_id, after: after.observation_id, action });
|
|
681
830
|
}
|
|
682
831
|
|
|
683
|
-
choose(action) {
|
|
832
|
+
choose(action, { alternates = true } = {}) {
|
|
684
833
|
const isCand = Object.hasOwn(CANDIDATE_KINDS, get(action, 'type'));
|
|
685
834
|
const candidates = isCand ? get(action, 'selectors', []) : [get(action, 'selector', {})];
|
|
835
|
+
const found = this._choose(action, isCand, candidates);
|
|
836
|
+
if (found || !alternates) { return found; }
|
|
837
|
+
// No candidate on screen: the same resources' other values (textAlternatesOf), as extra candidates.
|
|
838
|
+
const extra = [];
|
|
839
|
+
for (const s of candidates) {
|
|
840
|
+
for (const k of ['text', 'content_desc']) {
|
|
841
|
+
if (typeof get(s, k) !== 'string') { continue; }
|
|
842
|
+
for (const alt of this.textAlternatesOf(s[k])) {
|
|
843
|
+
const sel = { ...s, [k]: alt };
|
|
844
|
+
if (!extra.some((x) => jsonDumps(x, { sort_keys: true }) === jsonDumps(sel, { sort_keys: true }))) { extra.push(sel); }
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
return extra.length ? this._choose(action, isCand, extra) : found;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
_choose(action, isCand, candidates) {
|
|
686
852
|
let ambiguous = false;
|
|
687
853
|
const hidden = occludedIndices(this.current.nodes);
|
|
688
854
|
const live = this.current.nodes.map((n, i) => (!hidden.has(i) ? n : { visible: false }));
|
|
@@ -699,6 +865,26 @@ export class Runner {
|
|
|
699
865
|
if (hits.length > 1) {
|
|
700
866
|
const scoped = { ...selector, actionable: true };
|
|
701
867
|
if (matching(live, scoped).length === 1) { return { type: kindOf(), selector: scoped }; }
|
|
868
|
+
// The same control in every row of one list (a 「立即领取」 per coupon): any row's opens the
|
|
869
|
+
// same page, so the first is taken by its index, never by coordinates (sameTemplateRows).
|
|
870
|
+
// Not a control that writes data (a coupon's claim, a row's add-to-cart) unless writes are allowed.
|
|
871
|
+
const writes = [selector.text, selector.content_desc, ...hits.flatMap((h) => [get(h, 'text'), get(h, 'content_desc')])].some(writesData);
|
|
872
|
+
if (!Object.hasOwn(selector, 'index') && (!writes || get(this.config, 'allow_data_writes') === true)
|
|
873
|
+
&& sameTemplateRows(this.current.nodes, hits.map((h) => live.indexOf(h)))) {
|
|
874
|
+
return { type: kindOf(), selector: { ...selector, index: 0 } };
|
|
875
|
+
}
|
|
876
|
+
// A record's own text (a seeding recipe's state label, `record_label`): records are listed in
|
|
877
|
+
// a vertical list, so a match inside a horizontal strip (a filter tab of the same words) is
|
|
878
|
+
// not it. One left: taken by its index among the matches, top-down like `matching`.
|
|
879
|
+
if (truthy(get(action, 'record_label')) && !Object.hasOwn(selector, 'index')) {
|
|
880
|
+
const inStrip = (n) => { let p = get(n, 'parent_index'); for (let d = 0; d < 12 && p !== null && p !== undefined && p >= 0; d++) {
|
|
881
|
+
const a = this.current.nodes[p]; if (truthy(get(a, 'scrollable')) && _isHorizontal(a)) { return true; } p = get(a, 'parent_index'); } return false; };
|
|
882
|
+
const keep = hits.filter((h) => !inStrip(h));
|
|
883
|
+
if (keep.length === 1) {
|
|
884
|
+
const ordered = sortedBy(matching(live, selector), (n) => { const b = get(n, 'bounds', [0, 0]); return [b[1], b[0]]; });
|
|
885
|
+
return { type: kindOf(), selector: { ...selector, index: ordered.indexOf(keep[0]) } };
|
|
886
|
+
}
|
|
887
|
+
}
|
|
702
888
|
}
|
|
703
889
|
ambiguous = ambiguous || hits.length > 1;
|
|
704
890
|
}
|
|
@@ -706,6 +892,107 @@ export class Runner {
|
|
|
706
892
|
return permissionGrant(live, candidates, kindOf());
|
|
707
893
|
}
|
|
708
894
|
|
|
895
|
+
/**
|
|
896
|
+
* Several lists hold rows and the step names the page a row opens (`target_id`): tap the first row
|
|
897
|
+
* of each, most rows first, until one lands on that page; Back after a row that opened another.
|
|
898
|
+
* At most `max_list_probes` (default 3) lists. Measured (coolmall 2026-11-16): the home page's
|
|
899
|
+
* flash-sale row, category strip and goods grid failed three tasks with 「expected one list,
|
|
900
|
+
* found 3」 although every goods list opened the same detail page. The landing page is checked
|
|
901
|
+
* by its own identity, so a wrong list is never taken for the right one.
|
|
902
|
+
*/
|
|
903
|
+
probeLists(target, tapRow, taskId) {
|
|
904
|
+
const lists = this.listCandidates();
|
|
905
|
+
const before = this.current;
|
|
906
|
+
const origin = get(get(before, 'static_resolution', {}), 'status') === 'verified' ? before.static_resolution.static_id : null;
|
|
907
|
+
let last = null;
|
|
908
|
+
for (let [k, [, row]] of lists.slice(0, Math.max(1, toInt(get(this.config, 'max_list_probes', 3)))).entries()) {
|
|
909
|
+
if (k > 0) {
|
|
910
|
+
if (origin === null) { throw new AdapterError('list-item: the probing page is unverified, so a return to it cannot be checked'); }
|
|
911
|
+
// Back only when the last row left the page: a row that stays (a category chip switching a tab) must not exit it.
|
|
912
|
+
if (!this.at(origin)) { this.atom({ type: 'back' }, taskId, 'list-probe-back'); }
|
|
913
|
+
if (!this.at(origin)) { throw new AdapterError(`list-item: could not return to ${origin} after probing a list`); }
|
|
914
|
+
row = this.listCandidates()[k]?.[1] ?? row;
|
|
915
|
+
}
|
|
916
|
+
last = tapRow(row);
|
|
917
|
+
if (this.at(target)) {
|
|
918
|
+
if (typeof this.emit === 'function') { this.emit('list_probe', { task_id: taskId, target, chosen: k, lists: lists.length }); }
|
|
919
|
+
return last;
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
throw new AdapterError(`list-item: none of ${lists.length} lists opened ${target}`);
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* [listIndex, firstActionableRow] of every visible list holding rows, most rows first, then top-down.
|
|
927
|
+
* Nested scrollables that offer the same first row are one list (a page container around its grid).
|
|
928
|
+
*/
|
|
929
|
+
listCandidates() {
|
|
930
|
+
const out = [];
|
|
931
|
+
for (const li of this._listContainers()) {
|
|
932
|
+
const rows = this._rowsOf(li);
|
|
933
|
+
if (rows.length) { out.push([li, sortedBy(rows, (n) => [n.bounds[1], n.bounds[0]])[0], rows.length]); }
|
|
934
|
+
}
|
|
935
|
+
const seen = new Set();
|
|
936
|
+
return sortedBy(out, (x) => [-x[2], x[1].bounds[1], x[1].bounds[0]])
|
|
937
|
+
.filter(([, r]) => { const k = JSON.stringify(r.bounds); if (seen.has(k)) { return false; } seen.add(k); return true; })
|
|
938
|
+
.map(([li, r]) => [li, r]);
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
_listContainers() {
|
|
942
|
+
const nodes = this.current.nodes;
|
|
943
|
+
const adapterCls = ['RecyclerView', 'ListView', 'GridView'];
|
|
944
|
+
const hasKids = new Set(nodes.map((c) => get(c, 'parent_index')));
|
|
945
|
+
const lists = [];
|
|
946
|
+
nodes.forEach((n, i) => { if (isVisible(n) && adapterCls.some((c) => pyStr(get(n, 'class', '')).endsWith(c)) && hasKids.has(i)) { lists.push(i); } });
|
|
947
|
+
if (lists.length === 1) { return lists; }
|
|
948
|
+
const scrollables = [];
|
|
949
|
+
nodes.forEach((n, i) => { if (truthy(get(n, 'scrollable')) && isVisible(n)) { scrollables.push(i); } });
|
|
950
|
+
return scrollables.length ? scrollables : rowGroups(nodes);
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
_rowsOf(li) {
|
|
954
|
+
const nodes = this.current.nodes;
|
|
955
|
+
const kidsOf = (i) => nodes.map((n, j) => [n, j]).filter(([n]) => get(n, 'parent_index') === i).map(([, j]) => j);
|
|
956
|
+
// a row's own button that writes data (「领取」「加购」) is never the row to probe, unless writes are allowed.
|
|
957
|
+
// A control's label is its own text, else the texts below it (up to 4 levels, not inside another
|
|
958
|
+
// clickable, which is a control of its own): a button labelled by a nested text is a writer when
|
|
959
|
+
// every such text is; a card holding a title, a price and a 「加购」 is not.
|
|
960
|
+
const allowWrites = get(this.config, 'allow_data_writes') === true;
|
|
961
|
+
const textsOf = (k) => [get(nodes[k], 'text'), get(nodes[k], 'content_desc')].filter((t) => typeof t === 'string' && t.trim());
|
|
962
|
+
const labelsOf = (j) => {
|
|
963
|
+
const own = textsOf(j);
|
|
964
|
+
if (own.length) { return own; }
|
|
965
|
+
const out = []; let level = kidsOf(j);
|
|
966
|
+
for (let d = 0; d < 4 && level.length; d++) {
|
|
967
|
+
const next = [];
|
|
968
|
+
for (const k of level) {
|
|
969
|
+
if (truthy(get(nodes[k], 'clickable')) || truthy(get(nodes[k], 'long-clickable'))) { continue; }
|
|
970
|
+
out.push(...textsOf(k)); next.push(...kidsOf(k));
|
|
971
|
+
}
|
|
972
|
+
level = next;
|
|
973
|
+
}
|
|
974
|
+
return out;
|
|
975
|
+
};
|
|
976
|
+
const writer = (j) => {
|
|
977
|
+
if (allowWrites || !(truthy(get(nodes[j], 'clickable')) || truthy(get(nodes[j], 'long-clickable')))) { return false; }
|
|
978
|
+
const ls = labelsOf(j);
|
|
979
|
+
return ls.length > 0 && ls.every(writesData);
|
|
980
|
+
};
|
|
981
|
+
const actionableRow = (ci) => {
|
|
982
|
+
const cands = [ci, ...kidsOf(ci)];
|
|
983
|
+
for (const c of kidsOf(ci)) { cands.push(...kidsOf(c)); }
|
|
984
|
+
for (const j of cands) {
|
|
985
|
+
const n = nodes[j];
|
|
986
|
+
if (j !== ci && writer(j)) { continue; }
|
|
987
|
+
if ((truthy(get(n, 'clickable')) || truthy(get(n, 'long-clickable'))) && isVisible(n)
|
|
988
|
+
&& !['ImageButton', 'FloatingActionButton'].some((c) => pyStr(get(n, 'class', '')).endsWith(c))
|
|
989
|
+
&& get(n, 'bounds', []).length === 4 && n.bounds[3] > n.bounds[1]) { return n; }
|
|
990
|
+
}
|
|
991
|
+
return null;
|
|
992
|
+
};
|
|
993
|
+
return kidsOf(li).map(actionableRow).filter((r) => truthy(r));
|
|
994
|
+
}
|
|
995
|
+
|
|
709
996
|
listItem() {
|
|
710
997
|
const nodes = this.current.nodes;
|
|
711
998
|
const adapterCls = ['RecyclerView', 'ListView', 'GridView'];
|
|
@@ -716,6 +1003,7 @@ export class Runner {
|
|
|
716
1003
|
lists = [];
|
|
717
1004
|
nodes.forEach((n, i) => { if (truthy(get(n, 'scrollable')) && isVisible(n)) { lists.push(i); } });
|
|
718
1005
|
}
|
|
1006
|
+
if (!lists.length) { lists = rowGroups(nodes); }
|
|
719
1007
|
const idxOf = (n) => nodes.findIndex((m) => pyEq(m, n)); // list.index uses ==
|
|
720
1008
|
const actionableRow = (child) => {
|
|
721
1009
|
const cands = [child, ...nodes.filter((n) => get(n, 'parent_index') === idxOf(child))];
|
|
@@ -829,7 +1117,7 @@ export class Runner {
|
|
|
829
1117
|
* required boxes, then the accept), up to `limit` ticks.
|
|
830
1118
|
* Each dismissal is an `interruption` event. Returns true when something was dismissed.
|
|
831
1119
|
*/
|
|
832
|
-
clearInterruption(taskId) {
|
|
1120
|
+
clearInterruption(taskId, { restoring = false } = {}) {
|
|
833
1121
|
const limit = toInt(get(this.config, 'max_interruption_dismissals', 2));
|
|
834
1122
|
let dismissed = false;
|
|
835
1123
|
let ticks = 0;
|
|
@@ -848,23 +1136,103 @@ export class Runner {
|
|
|
848
1136
|
texts: texts.slice(0, 6).map((t) => cpSlice(pyStr(t), 0, 80)), outcome: 'unresolved' });
|
|
849
1137
|
break;
|
|
850
1138
|
}
|
|
851
|
-
|
|
852
|
-
|
|
1139
|
+
const system = !rule && !consent ? this.systemDialogAction() : null;
|
|
1140
|
+
let action = rule ? rule.action : (consent ?? system ?? { type: 'back' });
|
|
1141
|
+
if (!rule && !consent && !system && k > 0 && matching(this.current.nodes, { resource_name: 'button2' }).length === 1) {
|
|
853
1142
|
action = { type: 'click', selector: { resource_name: 'button2' } };
|
|
854
1143
|
}
|
|
855
1144
|
const tick = consent !== null && isToggle(matching(this.current.nodes, consent.selector)[0] ?? {});
|
|
856
|
-
const result = this.atom(action, taskId, 'dismiss-interruption');
|
|
1145
|
+
const result = this.atom(action, taskId, 'dismiss-interruption', { restoring });
|
|
857
1146
|
this.emit('interruption', { task_id: taskId, observation_id: before, bounds, action,
|
|
858
|
-
rule: rule ? get(rule, 'id', null) : (consent ? 'consent-default' :
|
|
1147
|
+
rule: rule ? get(rule, 'id', null) : (consent ? 'consent-default' : (system ? 'system-dialog-default' : null)),
|
|
1148
|
+
texts: texts.slice(0, 6).map((t) => cpSlice(pyStr(t), 0, 80)),
|
|
859
1149
|
outcome: result.payload.outcome });
|
|
860
1150
|
// A rule or a consent click that did nothing would do nothing again; Back/button2 would leave.
|
|
861
|
-
if (result.payload.outcome === 'no_effect' && (rule || consent)) { break; }
|
|
1151
|
+
if (result.payload.outcome === 'no_effect' && (rule || consent || system)) { break; }
|
|
862
1152
|
if (tick && ticks < limit) { ticks += 1; }
|
|
863
1153
|
dismissed = dismissed || result.payload.outcome === 'succeeded';
|
|
864
1154
|
}
|
|
865
1155
|
return dismissed;
|
|
866
1156
|
}
|
|
867
1157
|
|
|
1158
|
+
/**
|
|
1159
|
+
* Whether the app under test is the resumed activity but a system window (package `android`:
|
|
1160
|
+
* the 16 KB page-size compatibility dialog, a "keeps stopping" dialog) is what the dump shows.
|
|
1161
|
+
* Measured (jingmo 2026-11-16): on an x86_64 emulator the 「Android 应用兼容性」 dialog covered
|
|
1162
|
+
* MainActivity after every launch; appUiReady never held, so each launch re-captured for
|
|
1163
|
+
* launch_ready_seconds, relaunched, waited again and threw launch-ui-not-ready: every task
|
|
1164
|
+
* aborted and covered stayed 0. The activity (and `component_package`) still name the app.
|
|
1165
|
+
*/
|
|
1166
|
+
coveredBySystemDialog() {
|
|
1167
|
+
const pkg = get(this.config, 'package');
|
|
1168
|
+
const cur = or(this.current, {});
|
|
1169
|
+
const shown = get(cur, 'package');
|
|
1170
|
+
if (!truthy(pkg) || !truthy(shown) || shown === pkg) { return false; }
|
|
1171
|
+
return get(cur, 'component_package') === pkg || pyStr(or(get(cur, 'activity'), '')).startsWith(pkg + '.');
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
/**
|
|
1175
|
+
* The click that closes a system dialog over the app for good: its positive button
|
|
1176
|
+
* (android:id/button1) when it is labelled 「不再显示」 / "Don't show again", so the dialog does
|
|
1177
|
+
* not return on the next relaunch. Any other system dialog keeps the generic dismissal (Back).
|
|
1178
|
+
* Returns the click action, or null.
|
|
1179
|
+
*/
|
|
1180
|
+
systemDialogAction() {
|
|
1181
|
+
if (!this.coveredBySystemDialog()) { return null; }
|
|
1182
|
+
const hits = matching(get(this.current, 'nodes', []), { resource_id: 'android:id/button1' });
|
|
1183
|
+
if (hits.length !== 1) { return null; }
|
|
1184
|
+
const label = normalized(or(get(hits[0], 'text'), get(hits[0], 'content_desc'), ''));
|
|
1185
|
+
return SYSTEM_DIALOG_SUPPRESS_RE.test(label) ? { type: 'click', selector: { resource_id: 'android:id/button1' } } : null;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
/**
|
|
1189
|
+
* Wait for the app's own UI after a launch until `deadline`. A system dialog over the app
|
|
1190
|
+
* (coveredBySystemDialog) is dismissed instead of waited out, at most `max_interruption_dismissals`
|
|
1191
|
+
* times per wait: a dialog that returns at once (no 「不再显示」 to silence it) would otherwise spend
|
|
1192
|
+
* the action budget until the deadline. After that the wait only polls. A launch made by a
|
|
1193
|
+
* restore (`purpose`) keeps its budget exemption for the dismissals. With `moves` (a launch's
|
|
1194
|
+
* budget, see launchCapture) a capture the launch's own foreground move spoils is retried.
|
|
1195
|
+
* Returns the latest observation.
|
|
1196
|
+
*/
|
|
1197
|
+
waitAppUi(deadline, taskId, after, purpose = null, moves = null) {
|
|
1198
|
+
const cap = toInt(get(this.config, 'max_interruption_dismissals', 2));
|
|
1199
|
+
const restoring = purpose === 'restore';
|
|
1200
|
+
let cleared = 0;
|
|
1201
|
+
while (!this.appUiReady() && monotonic() < deadline) {
|
|
1202
|
+
// Every attempt counts toward the cap, not only a successful one: a dialog that ignores Back
|
|
1203
|
+
// and button2 would otherwise be pressed on every poll, spend the action budget, and the
|
|
1204
|
+
// press landing just after it closes could leave the app.
|
|
1205
|
+
if (cleared < cap && this.coveredBySystemDialog()) {
|
|
1206
|
+
cleared += 1;
|
|
1207
|
+
if (this.clearInterruption(taskId, { restoring })) { after = this.current; continue; }
|
|
1208
|
+
}
|
|
1209
|
+
sleep(0.5);
|
|
1210
|
+
after = moves ? this.launchCapture(taskId, moves) : this.capture();
|
|
1211
|
+
}
|
|
1212
|
+
return after;
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
/**
|
|
1216
|
+
* capture() while a launch brings its UI up. The foreground moves there by design: the
|
|
1217
|
+
* starting window gives way to the activity, a SplashActivity hands over to the main one. A
|
|
1218
|
+
* capture that straddles such a move throws `Foreground changed during capture`; under a launch
|
|
1219
|
+
* it is retried, spending `moves.left` (launch_transition_captures, default 3, one budget per
|
|
1220
|
+
* launch atom). The budget is a count, not a time: on a slow device one capture outlasts the
|
|
1221
|
+
* whole launch_ready_seconds wait (measured yd-weather 11-14: ~30 s per capture, 8 s wait), so a
|
|
1222
|
+
* deadline would stop the retry before it ran. Any other error, or a move once the budget is
|
|
1223
|
+
* spent, is thrown as before. Each retry emits `launch_foreground_moved`.
|
|
1224
|
+
*/
|
|
1225
|
+
launchCapture(taskId, moves) {
|
|
1226
|
+
for (;;) {
|
|
1227
|
+
try { return this.capture(); } catch (e) {
|
|
1228
|
+
if (!(e instanceof AdapterError) || !FOREGROUND_MOVED_RE.test(errStr(e)) || moves.left <= 0) { throw e; }
|
|
1229
|
+
moves.left -= 1;
|
|
1230
|
+
this.emit('launch_foreground_moved', { task_id: taskId, retries_left: moves.left, reason: s200(e) });
|
|
1231
|
+
sleep(0.5);
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
|
|
868
1236
|
/**
|
|
869
1237
|
* The app's own first-launch consent dialog (privacy policy / user agreement): Back closes the
|
|
870
1238
|
* Activity and its negative button is "decline and exit", so the generic dismissal leaves the
|
|
@@ -1068,17 +1436,31 @@ export class Runner {
|
|
|
1068
1436
|
if (others.length) { payload.unswept_containers = others; }
|
|
1069
1437
|
const maxScrolls = toInt(get(this.config, 'max_sweep_scrolls', 20));
|
|
1070
1438
|
let lastSig = _viewSig(origin);
|
|
1071
|
-
let outcome = 'truncated'; let swipes = 0;
|
|
1439
|
+
let outcome = 'truncated'; let swipes = 0; let effective = 0;
|
|
1072
1440
|
try {
|
|
1073
1441
|
while (swipes <= maxScrolls) {
|
|
1074
1442
|
this.atom({ type: 'scroll', selector, direction: 'down' }, taskId, purpose);
|
|
1075
1443
|
swipes += 1;
|
|
1076
|
-
|
|
1077
|
-
if (still === null) {
|
|
1444
|
+
let still = this._surfaceSelector(origin, selector, node);
|
|
1445
|
+
if (still === null) {
|
|
1446
|
+
// A lazy list can change its node count / indices during the swipe without the page
|
|
1447
|
+
// being left. Re-observe once and resolve the container again before declaring an exit.
|
|
1448
|
+
sleep(0.5);
|
|
1449
|
+
try { this.capture({ acceptLoading: true }); } catch { /* keep the last observation */ }
|
|
1450
|
+
still = this._surfaceSelector(origin, selector, node);
|
|
1451
|
+
if (still === null) { outcome = 'aborted'; payload.abort_reason = 'left-page'; break; }
|
|
1452
|
+
}
|
|
1078
1453
|
selector = still;
|
|
1079
1454
|
const sig = _viewSig(this.current);
|
|
1080
|
-
if (sig === lastSig) {
|
|
1081
|
-
|
|
1455
|
+
if (sig === lastSig) {
|
|
1456
|
+
// No movement: either the page end (after a real scroll) or a container that never
|
|
1457
|
+
// moved. `complete` with 0 frames used to claim the page end and hid every below-fold
|
|
1458
|
+
// section; keep the two apart.
|
|
1459
|
+
outcome = effective > 0 ? 'complete' : 'no-effect';
|
|
1460
|
+
break;
|
|
1461
|
+
}
|
|
1462
|
+
effective += 1;
|
|
1463
|
+
if (payload.frames.length >= maxScrolls) { outcome = 'truncated'; break; }
|
|
1082
1464
|
lastSig = sig;
|
|
1083
1465
|
payload.frames.push(this.current.observation_id);
|
|
1084
1466
|
const r = get(this.current, 'static_resolution', {});
|
|
@@ -1093,6 +1475,7 @@ export class Runner {
|
|
|
1093
1475
|
}
|
|
1094
1476
|
payload.outcome = outcome;
|
|
1095
1477
|
payload.swipes = swipes;
|
|
1478
|
+
payload.effective = effective;
|
|
1096
1479
|
if (outcome !== 'aborted' || get(payload, 'abort_reason') !== 'left-page') {
|
|
1097
1480
|
payload.restored = this._sweepRestore(origin, selector, node, taskId);
|
|
1098
1481
|
} else { payload.restored = false; }
|
|
@@ -1210,12 +1593,27 @@ export class Runner {
|
|
|
1210
1593
|
}
|
|
1211
1594
|
const type = get(action, 'type');
|
|
1212
1595
|
if (type === 'click_list_item' || type === 'long_click_list_item') {
|
|
1213
|
-
const row = this.listItem();
|
|
1214
|
-
const b = row.bounds;
|
|
1215
1596
|
const kind = type.startsWith('long') ? 'long_click_point' : 'click_point';
|
|
1216
|
-
const
|
|
1217
|
-
|
|
1218
|
-
|
|
1597
|
+
const tapRow = (row) => {
|
|
1598
|
+
const b = row.bounds; const rowInfo = {};
|
|
1599
|
+
for (const k of ['class', 'resource_id', 'text', 'content_desc', 'bounds']) { rowInfo[k] = get(row, k); }
|
|
1600
|
+
return this.atom({ type: kind, x: Math.floor((b[0] + b[2]) / 2), y: Math.floor((b[1] + b[3]) / 2), row: rowInfo }, taskId, purpose);
|
|
1601
|
+
};
|
|
1602
|
+
// Rows filled from the network or a database arrive after the page itself (measured, coolmall:
|
|
1603
|
+
// the home page's goods were not yet in the tree when the step ran): wait, bounded, for a row.
|
|
1604
|
+
const until = monotonic() + Math.max(0, toFloat(get(this.config, 'list_wait_seconds', 6)));
|
|
1605
|
+
while (!this.listCandidates().length && !this.emptyFailure() && monotonic() < until) { sleep(0.5); this.capture({ acceptLoading: true }); }
|
|
1606
|
+
let row;
|
|
1607
|
+
try { row = this.listItem(); } catch (e) {
|
|
1608
|
+
if (!(e instanceof AdapterError)) { throw e; }
|
|
1609
|
+
const empty = this.emptyFailure();
|
|
1610
|
+
if (empty) { throw empty; }
|
|
1611
|
+
if (/^list-item: expected one list, found (?:[2-9]|\d{2,})/.test(errStr(e)) && truthy(get(action, 'target_id'))) {
|
|
1612
|
+
return this.probeLists(action.target_id, tapRow, taskId);
|
|
1613
|
+
}
|
|
1614
|
+
throw e;
|
|
1615
|
+
}
|
|
1616
|
+
return tapRow(row);
|
|
1219
1617
|
}
|
|
1220
1618
|
if (type === 'scroll_page') {
|
|
1221
1619
|
const sideways = ['left', 'right'].includes(get(action, 'direction'));
|
|
@@ -1223,6 +1621,15 @@ export class Runner {
|
|
|
1223
1621
|
if (conts.length !== 1) { throw new AdapterError('Scroll requires one visible scrollable container'); }
|
|
1224
1622
|
return this.atom({ type: 'scroll', selector: scrollSel(conts[0], this.current.nodes), direction: get(action, 'direction', 'down') }, taskId, purpose);
|
|
1225
1623
|
}
|
|
1624
|
+
if (type === 'toggle_on') {
|
|
1625
|
+
// the two-state control in the row titled `label`: tapped only when it is off
|
|
1626
|
+
const i = rowToggle(this.current.nodes, get(action, 'label'));
|
|
1627
|
+
if (i === null) { throw new AdapterError(`toggle: no single two-state control in the row 「${pyStr(get(action, 'label'))}」`); }
|
|
1628
|
+
const n = this.current.nodes[i];
|
|
1629
|
+
if (truthy(get(n, 'checked'))) { return null; }
|
|
1630
|
+
const b = n.bounds;
|
|
1631
|
+
return this.atom({ type: 'click_point', x: Math.floor((b[0] + b[2]) / 2), y: Math.floor((b[1] + b[3]) / 2), row: { class: get(n, 'class'), bounds: b } }, taskId, purpose);
|
|
1632
|
+
}
|
|
1226
1633
|
if (!Object.hasOwn(CANDIDATE_KINDS, type)) { return this.atom(action, taskId, purpose); }
|
|
1227
1634
|
let selected = this.choose(action);
|
|
1228
1635
|
if (selected) { return this.atom(selected, taskId, purpose); }
|
|
@@ -1230,6 +1637,17 @@ export class Runner {
|
|
|
1230
1637
|
selected = this.choose(action);
|
|
1231
1638
|
if (selected) { return this.atom(selected, taskId, purpose); }
|
|
1232
1639
|
}
|
|
1640
|
+
const between = this.betweenNeighbors(action);
|
|
1641
|
+
if (between) { return this.atom(between, taskId, purpose); }
|
|
1642
|
+
// A soft keyboard left up by the last input covers the bottom of the page (a form's submit
|
|
1643
|
+
// button): close it, never with a bare Back, and look again. Measured (coolmall 2026-11-16):
|
|
1644
|
+
// the address form's 「保存」 was missing from the tree while the keyboard was shown.
|
|
1645
|
+
if (this.current.nodes.some((n) => /EditText|TextField|AutoComplete/.test(pyStr(get(n, 'class', ''))))
|
|
1646
|
+
&& typeof this.device?._imeShown === 'function' && this.device._imeShown()) {
|
|
1647
|
+
this.atom({ type: 'hide_ime' }, taskId, 'hide-ime');
|
|
1648
|
+
selected = this.choose(action);
|
|
1649
|
+
if (selected) { return this.atom(selected, taskId, purpose); }
|
|
1650
|
+
}
|
|
1233
1651
|
if (!this.appUiReady()) { throw new AdapterError('selector unavailable on non-app/empty UI'); }
|
|
1234
1652
|
// Content that loads after the page is ready (a list filled from the network or a database):
|
|
1235
1653
|
// look again while the screen is still changing, for a bounded time, before scrolling. A
|
|
@@ -1303,7 +1721,108 @@ export class Runner {
|
|
|
1303
1721
|
// Close only what the opener opened; an opener with no visible effect needs no Back.
|
|
1304
1722
|
if (observationKey(this.current) !== key) { this.atom({ type: 'back' }, taskId, 'search-overflow-close'); }
|
|
1305
1723
|
}
|
|
1306
|
-
throw new AdapterError('selector-not-found-after-bounded-scroll');
|
|
1724
|
+
throw this.emptyFailure() ?? new AdapterError('selector-not-found-after-bounded-scroll');
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
/**
|
|
1728
|
+
* A form field whose label the screen does not expose (a picker field under a transparent click
|
|
1729
|
+
* layer: only a text-less clickable shows): when the step names the labels of the fields before and
|
|
1730
|
+
* after it (`neighbors`, from the static form order), the one text-less clickable lying between
|
|
1731
|
+
* them, horizontally overlapping them, is tapped by its centre. Measured (coolmall 2026-11-16): the
|
|
1732
|
+
* address form's 「省市区」 field showed as a bare clickable View between 「手机号」 and 「详细地址」.
|
|
1733
|
+
* -> a click_point action, or null.
|
|
1734
|
+
*/
|
|
1735
|
+
betweenNeighbors(action) {
|
|
1736
|
+
const nb = get(action, 'neighbors');
|
|
1737
|
+
if (!Array.isArray(nb) || nb.length !== 2) { return null; }
|
|
1738
|
+
const nodes = this.current.nodes;
|
|
1739
|
+
const find = (t) => { if (!t) { return null; } const h = nodes.filter((n) => isVisible(n) && pyStr(get(n, 'text', '')).trim() === t); return h.length === 1 ? h[0] : null; };
|
|
1740
|
+
const [prev, next] = [find(nb[0]), find(nb[1])];
|
|
1741
|
+
if (!prev && !next) { return null; }
|
|
1742
|
+
const top = prev ? prev.bounds[3] : 0;
|
|
1743
|
+
const bottom = next ? next.bounds[1] : Infinity;
|
|
1744
|
+
const ref = prev || next;
|
|
1745
|
+
const hits = nodes.filter((n) => isVisible(n) && truthy(get(n, 'clickable')) && !pyStr(get(n, 'text', '')).trim()
|
|
1746
|
+
&& !pyStr(get(n, 'content_desc') ?? get(n, 'content-desc') ?? '').trim() && get(n, 'bounds', []).length === 4
|
|
1747
|
+
&& n.bounds[1] >= top - 8 && n.bounds[3] <= bottom + 8 && n.bounds[0] < ref.bounds[2] && n.bounds[2] > ref.bounds[0]
|
|
1748
|
+
&& (n.bounds[3] - n.bounds[1]) > 20);
|
|
1749
|
+
if (hits.length !== 1) { return null; }
|
|
1750
|
+
const b = hits[0].bounds;
|
|
1751
|
+
return { type: 'click_point', x: Math.floor((b[0] + b[2]) / 2), y: Math.floor((b[1] + b[3]) / 2), row: { class: get(hits[0], 'class'), bounds: b, between: nb } };
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
/**
|
|
1755
|
+
* The failure to report instead of a missing selector or list row when the screen shows one of the
|
|
1756
|
+
* app's empty-state components (diagnostics.emptyStateShown): `needs-data:<page> (texts)`, or
|
|
1757
|
+
* `needs-network:` for a failed load. The path may be right; the data it needs is not there.
|
|
1758
|
+
*/
|
|
1759
|
+
emptyFailure() {
|
|
1760
|
+
const comps = (this._emptyComponents ??= emptyStateComponents(get(this.doc, 'nodes', [])));
|
|
1761
|
+
const shown = emptyStateShown(this.current, comps);
|
|
1762
|
+
if (!shown) { return null; }
|
|
1763
|
+
const page = get(get(this.current, 'static_resolution', {}), 'status') === 'verified'
|
|
1764
|
+
? this.current.static_resolution.static_id : `activity:${get(this.current, 'activity') ?? ''}`;
|
|
1765
|
+
return new AdapterError(`needs-${shown.kind}:${page} (${shown.texts.join(' / ')})`);
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
/**
|
|
1769
|
+
* Other values of the resources a selector text belongs to (strings.deviceTextsIn): a key
|
|
1770
|
+
* two modules define differently resolves to one of them on the device, by the merge order of the
|
|
1771
|
+
* build. Measured (coolmall 2026-11-15): a recipe tapped 「手机号码」 (feature/user) while the device
|
|
1772
|
+
* showed 「手机号」 (feature/main wins, declared first), and the phase ran none of its tasks.
|
|
1773
|
+
*/
|
|
1774
|
+
textAlternatesOf(text) {
|
|
1775
|
+
if (this._stringTables === undefined) {
|
|
1776
|
+
const project = get(this.doc, 'source_project');
|
|
1777
|
+
this._stringTables = null;
|
|
1778
|
+
if (truthy(project)) { try { this._stringTables = loadStringTables(project, get(this.doc, 'locale', 'en')); } catch { /* none */ } }
|
|
1779
|
+
}
|
|
1780
|
+
return this._stringTables ? deviceTextsIn(this._stringTables, text || '') : [];
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
/**
|
|
1784
|
+
* The key of a proven route: the phase environment, the start (`fresh` / `warm`), the page the
|
|
1785
|
+
* launch landed on, and the page reached. A route proven from one start and landing replays only
|
|
1786
|
+
* from the same: a first-run page or cleared data changes what the same taps do.
|
|
1787
|
+
*/
|
|
1788
|
+
routeKey(page, start = this._start, landing = this._landing) { return [this.env, start, landing, page].join('\u0000'); }
|
|
1789
|
+
|
|
1790
|
+
/**
|
|
1791
|
+
* recordRoute(page, steps): the replay steps, run from this task's own launch, that the device
|
|
1792
|
+
* verified as reaching `page` (not merely attested). The first route proven to a page is kept for
|
|
1793
|
+
* the rest of the run. Only from a launch made for the current task: a task that started on a page
|
|
1794
|
+
* an earlier task left has no launch the steps start from.
|
|
1795
|
+
*/
|
|
1796
|
+
recordRoute(page, steps) {
|
|
1797
|
+
if (!truthy(page) || this._launchedFor === undefined || !Array.isArray(steps) || !steps.length) { return; }
|
|
1798
|
+
const routes = (this._routes ??= new Map());
|
|
1799
|
+
const k = this.routeKey(page);
|
|
1800
|
+
if (!routes.has(k)) { routes.set(k, structuredClone(steps)); }
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
/**
|
|
1804
|
+
* rerouteTask(task, i, start, landing, reason): the task with replay steps 0..i (whose last hop
|
|
1805
|
+
* names the page it opens) replaced by a route this run proved reaches that page from the same
|
|
1806
|
+
* start and landing, or null. Each task is rerouted once: the substitute carries `rerouted_from`.
|
|
1807
|
+
* A failure (an ambiguous selector, a control not found, a list that opened another page) then
|
|
1808
|
+
* repeats for none of the tasks sharing that prefix. Measured (coolmall 2026-11-18): logged-out
|
|
1809
|
+
* tasks replayed a coupon claim to reach Login (an ambiguous selector) while other tasks of the run
|
|
1810
|
+
* had reached Login, and every task behind that hop failed or was cut by the prefix memo.
|
|
1811
|
+
*/
|
|
1812
|
+
rerouteTask(task, i, start, landing, reason) {
|
|
1813
|
+
if (!truthy(get(this.config, 'reroute_replay', true)) || truthy(get(task, 'rerouted_from'))) { return null; }
|
|
1814
|
+
const replay = or(get(task, 'replay'), []);
|
|
1815
|
+
const page = get(replay[i] ?? {}, 'target_id');
|
|
1816
|
+
if (!truthy(page) || truthy(get(replay[i], 'intermediate'))) { return null; }
|
|
1817
|
+
const route = (this._routes ?? new Map()).get(this.routeKey(page, start, landing));
|
|
1818
|
+
if (!route || jsonDumps(route, { sort_keys: true }) === jsonDumps(replay.slice(0, i + 1), { sort_keys: true })) { return null; }
|
|
1819
|
+
const alt = { ...task, replay: [...structuredClone(route), ...replay.slice(i + 1)], rerouted_from: { replay_index: i, reason } };
|
|
1820
|
+
this.emit('replay_rerouted', { task_id: task.task_id, page, replay_index: i, reason, route_steps: route.length,
|
|
1821
|
+
start, landing, observation_id: get(or(this.current, {}), 'observation_id') });
|
|
1822
|
+
// the substitute launches again: from cleared data when this one did
|
|
1823
|
+
if (start === 'fresh' && this._clearedFor === task.task_id) { this._clearedFor = undefined; }
|
|
1824
|
+
this._launchedFor = undefined;
|
|
1825
|
+
return alt;
|
|
1307
1826
|
}
|
|
1308
1827
|
|
|
1309
1828
|
source(task) {
|
|
@@ -1346,24 +1865,34 @@ export class Runner {
|
|
|
1346
1865
|
const memo = truthy(get(this.config, 'prefix_memo', true)) ? (this._prefixFailures ??= new Map()) : null;
|
|
1347
1866
|
const replay = mget(task, 'replay');
|
|
1348
1867
|
const start = this.resetsBetweenTasks() && this._clearedFor !== task.task_id ? 'fresh' : 'warm';
|
|
1868
|
+
// A failed prefix with a proven route to the page its failing hop opens is replayed through that
|
|
1869
|
+
// route instead (rerouteTask); the reroute runs after the memo check, from the next launch.
|
|
1870
|
+
let reroute = null;
|
|
1349
1871
|
const memoHit = (landing) => {
|
|
1350
1872
|
if (!memo || landing === undefined) { return; }
|
|
1351
1873
|
for (let n = 1; n <= replay.length; n++) {
|
|
1352
1874
|
const k = prefixKey(task, n);
|
|
1353
1875
|
const e = memo.get(k);
|
|
1354
|
-
if (e && e.start === start && e.landing === landing) {
|
|
1876
|
+
if (e && e.start === start && e.landing === landing) {
|
|
1877
|
+
reroute = this.rerouteTask(task, e.replay_index, start, landing, e.reason);
|
|
1878
|
+
if (reroute) { return; }
|
|
1879
|
+
throw new PrefixFailed(e, k);
|
|
1880
|
+
}
|
|
1355
1881
|
}
|
|
1356
1882
|
};
|
|
1357
1883
|
const last = (this._lastLanding ??= {})[start];
|
|
1358
1884
|
const chain = or(get(task, 'launch_chain'), []);
|
|
1359
1885
|
if (last && (start === 'fresh' || (chain.length ? chain.includes(last.landing) : last.repeated))) { memoHit(last.landing); }
|
|
1886
|
+
if (reroute) { return this.source(reroute); }
|
|
1360
1887
|
this.resetBetweenTasks(task.task_id);
|
|
1361
1888
|
this.atom(launch, task.task_id, 'recover');
|
|
1362
1889
|
this.waitLaunchPage(task);
|
|
1363
1890
|
this._landing = landingOf(this.current);
|
|
1364
1891
|
this._start = start;
|
|
1892
|
+
this._launchedFor = task.task_id;
|
|
1365
1893
|
this._lastLanding[start] = { landing: this._landing, repeated: last?.landing === this._landing };
|
|
1366
1894
|
memoHit(this._landing);
|
|
1895
|
+
if (reroute) { return this.source(reroute); }
|
|
1367
1896
|
this.launchBridge(task, { waited: true });
|
|
1368
1897
|
const attested = new Set();
|
|
1369
1898
|
let passedSoFar = 0;
|
|
@@ -1384,6 +1913,8 @@ export class Runner {
|
|
|
1384
1913
|
throw new AdapterError('replay-target-unverified:' + step.target_id);
|
|
1385
1914
|
}
|
|
1386
1915
|
attested.add(step.target_id);
|
|
1916
|
+
} else {
|
|
1917
|
+
this.recordRoute(step.target_id, replay.slice(0, i + 1));
|
|
1387
1918
|
}
|
|
1388
1919
|
} catch (e) {
|
|
1389
1920
|
const msg = errStr(e);
|
|
@@ -1391,6 +1922,10 @@ export class Runner {
|
|
|
1391
1922
|
memo.set(prefixKey(task, i + 1), { reason: msg, task_id: task.task_id, replay_index: i, start: this._start, landing: this._landing,
|
|
1392
1923
|
observation_id: get(or(this.current, {}), 'observation_id'), before_id: stepStart });
|
|
1393
1924
|
}
|
|
1925
|
+
if (e instanceof AdapterError && PREFIX_FAILURES.some((r) => msg.startsWith(r))) {
|
|
1926
|
+
const alt = this.rerouteTask(task, i, this._start, this._landing, msg);
|
|
1927
|
+
if (alt) { return this.source(alt); }
|
|
1928
|
+
}
|
|
1394
1929
|
throw e;
|
|
1395
1930
|
}
|
|
1396
1931
|
}
|
|
@@ -1400,6 +1935,26 @@ export class Runner {
|
|
|
1400
1935
|
if (!this.at(source)) { this.clearInterruption(task.task_id); }
|
|
1401
1936
|
if (!this.at(source)) {
|
|
1402
1937
|
const ctx = get(task, 'source_context');
|
|
1938
|
+
// With no replay the launch alone must have opened the chain. Its deepest anchored page is
|
|
1939
|
+
// checkable, so an anchorless source behind it is not taken on the activity's word while
|
|
1940
|
+
// that page is missing (measured, weather 2026-11-14: the settings tap lost from the path,
|
|
1941
|
+
// every preference-dialog task passed on MainActivity and scrolled the main screen).
|
|
1942
|
+
// Only a screen read as other pages proves the launch fell short: verified as a page outside the
|
|
1943
|
+
// chain's tail, or ambiguous among such pages only. A default child that fills the host (its
|
|
1944
|
+
// widgets gone from the dump) is unmapped, and is left to the checks below.
|
|
1945
|
+
const chain = or(get(task, 'launch_chain'), []);
|
|
1946
|
+
const chainHost = replay.length ? undefined : [...chain].reverse().find((p) => p !== source && !this.anchorless(p));
|
|
1947
|
+
const tailIds = chain.slice(chain.indexOf(chainHost));
|
|
1948
|
+
const outside = (id) => truthy(id) && id !== source && !tailIds.includes(id);
|
|
1949
|
+
const shown = or(get(this.current, 'static_resolution'), {});
|
|
1950
|
+
const shownCands = or(get(shown, 'candidates'), []).map((c) => get(c, 'static_id'));
|
|
1951
|
+
const elsewhere = get(shown, 'status') === 'verified' ? outside(get(shown, 'static_id'))
|
|
1952
|
+
: get(shown, 'status') === 'ambiguous' && shownCands.length > 0 && shownCands.every(outside);
|
|
1953
|
+
if (chainHost !== undefined && elsewhere && !this.at(chainHost)) {
|
|
1954
|
+
this.emit('source_chain_missing', { task_id: task.task_id, source, missing: chainHost,
|
|
1955
|
+
observation_id: get(or(this.current, {}), 'observation_id') });
|
|
1956
|
+
throw new AdapterError('source-unverified:' + source);
|
|
1957
|
+
}
|
|
1403
1958
|
if (!(this.anchorless(source) && (attested.has(source)
|
|
1404
1959
|
|| (truthy(ctx) && (this.at(ctx) || this.transientSuccessor(ctx, source, task.task_id)))
|
|
1405
1960
|
|| (!replay.length && this.launchedInto(source, task.task_id))))) {
|
|
@@ -1417,12 +1972,16 @@ export class Runner {
|
|
|
1417
1972
|
* Not a control of the target page itself (its own label in the catalog): there an absent control
|
|
1418
1973
|
* is below the fold, behind a reveal or still loading, and the gesture is still owed. The caller
|
|
1419
1974
|
* offers only the leading hops, before any replay gesture ran.
|
|
1975
|
+
* `entry_cues` are not the target's own: they are the opener's control texts, on the page before
|
|
1976
|
+
* it. Measured (coolmall 2026-11-15): Main's cues 「跳过」「开始体验」 read as Main's own controls, the
|
|
1977
|
+
* hop was never passed, and a recovery phase standing on Home failed 20 of 20 tasks behind it.
|
|
1420
1978
|
*/
|
|
1421
1979
|
replayStepPassed(step) {
|
|
1422
1980
|
if (!Object.hasOwn(CANDIDATE_KINDS, get(step, 'type')) && !['click', 'long_click'].includes(get(step, 'type'))) { return false; }
|
|
1423
1981
|
if (truthy(get(step, 'intermediate')) || !truthy(get(step, 'target_id')) || !this.at(step.target_id)) { return false; }
|
|
1424
1982
|
const labels = [get(step, 'static_label'), ...or(get(step, 'static_label_alt'), [])].filter(truthy).map((l) => pyStr(l).trim());
|
|
1425
|
-
const own = Object.
|
|
1983
|
+
const own = Object.entries(or(get(this.catalog, step.target_id), {})).filter(([k]) => k !== 'entry_cues')
|
|
1984
|
+
.flatMap(([, v]) => (Array.isArray(v) ? v : [v]))
|
|
1426
1985
|
.filter((v) => typeof v === 'string').map((v) => v.trim());
|
|
1427
1986
|
if (labels.some((l) => own.includes(l))) { return false; }
|
|
1428
1987
|
try { return !this.choose(step); } catch (e) { if (e instanceof AdapterError) { return false; } throw e; }
|
|
@@ -1719,7 +2278,11 @@ export class Runner {
|
|
|
1719
2278
|
}
|
|
1720
2279
|
|
|
1721
2280
|
_runFixtures() {
|
|
2281
|
+
let skip = 0;
|
|
2282
|
+
// a gesture ran since the last launch / restore: later hops are owed, never "already passed"
|
|
2283
|
+
let gestured = false;
|
|
1722
2284
|
for (const action of get(get(this.config, 'fixtures', {}), this.phase.id, [])) {
|
|
2285
|
+
if (skip > 0) { skip -= 1; continue; }
|
|
1723
2286
|
// A fixture's own save step only exists to hand its state to later phases. When the phase
|
|
1724
2287
|
// runs again (next round, resume) the archive is the one this fixture already wrote: keep it
|
|
1725
2288
|
// (never overwrite) and continue, instead of blocking the phase on its own artifact.
|
|
@@ -1743,6 +2306,26 @@ export class Runner {
|
|
|
1743
2306
|
}
|
|
1744
2307
|
continue;
|
|
1745
2308
|
}
|
|
2309
|
+
// `skip_unless { rule, count }`: the next `count` steps run only when the screen matches `rule`
|
|
2310
|
+
// (a seeding recipe creates a record only while its list page shows the empty state, so a
|
|
2311
|
+
// rerun never makes a second one).
|
|
2312
|
+
if (get(action, 'type') === 'skip_unless') {
|
|
2313
|
+
if (!ruleMatches(this.current, get(action, 'rule', {}))) {
|
|
2314
|
+
const n = Math.max(0, toInt(get(action, 'count', 0)));
|
|
2315
|
+
this.emit('fixture_steps_skipped', { phase: this.phase.id, count: n, rule: action.rule, observation_id: get(this.current, 'observation_id') });
|
|
2316
|
+
skip = n;
|
|
2317
|
+
}
|
|
2318
|
+
continue;
|
|
2319
|
+
}
|
|
2320
|
+
// A recipe step compiled from a click path (it names its target page) whose page is already up
|
|
2321
|
+
// and whose control is gone: a first-run hop the warm launch has passed (replayStepPassed).
|
|
2322
|
+
if (!gestured && truthy(get(action, 'target_id')) && this.replayStepPassed(action)) {
|
|
2323
|
+
this.emit('replay_step_passed', { task_id: 'fixture:' + this.phase.id, target_id: action.target_id, observation_id: get(this.current, 'observation_id') });
|
|
2324
|
+
continue;
|
|
2325
|
+
}
|
|
2326
|
+
const at = get(action, 'type');
|
|
2327
|
+
if (['launch', 'clear_app_data', 'restore_app_data'].includes(at)) { gestured = false; }
|
|
2328
|
+
else if (!['wait', 'snapshot_app_data', 'save_replay'].includes(at)) { gestured = true; }
|
|
1746
2329
|
try {
|
|
1747
2330
|
this.seek(action, 'fixture:' + this.phase.id, 'prepare');
|
|
1748
2331
|
if (['clear_app_data', 'restore_app_data'].includes(get(action, 'type'))) { this.grantRuntimePermissions(); }
|
|
@@ -1753,7 +2336,13 @@ export class Runner {
|
|
|
1753
2336
|
this.seek(action, 'fixture:' + this.phase.id, 'prepare');
|
|
1754
2337
|
} catch (exc2) {
|
|
1755
2338
|
if (!(exc2 instanceof AdapterError)) { throw exc2; }
|
|
1756
|
-
const sel =
|
|
2339
|
+
const sel = fixtureStepTarget(action);
|
|
2340
|
+
// What the screen did show: recover_d.mjs stepFailures offers the recipe back so its steps
|
|
2341
|
+
// can be rewritten from evidence. Measured (coolmall 2026-11-18): a login recipe tapped
|
|
2342
|
+
// 「请输入手机号码」 on a screen whose field read 「请输入手机号」, and the phase stayed blocked.
|
|
2343
|
+
this.emit('fixture_step_failed', { phase: this.phase.id, step: get(action, 'type'), part: get(action, 'recipe_part', null), selector: sel,
|
|
2344
|
+
observation_id: get(this.current, 'observation_id'), activity: get(this.current, 'activity'),
|
|
2345
|
+
visible_texts: visibleTexts(this.current) });
|
|
1757
2346
|
this._block(`fixture-step-failed: ${pyStr(get(action, 'type'))} ${cpSlice(jsonDumps(sel, { ensure_ascii: false }), 0, 80)}: ${errStr(exc2)}`);
|
|
1758
2347
|
return false;
|
|
1759
2348
|
}
|
|
@@ -1768,7 +2357,20 @@ export class Runner {
|
|
|
1768
2357
|
const tasks = get(this.doc, 'tasks', []).filter((t) => t.phase === this.phase.id);
|
|
1769
2358
|
const probesFor = get(get(this.config, 'phase_probes', {}), this.phase.id);
|
|
1770
2359
|
if (truthy(this.phase.requires) && !truthy(probesFor)) {
|
|
1771
|
-
|
|
2360
|
+
const fallback = fallbackScope(this.config, this.phase, probesFor, this.doc);
|
|
2361
|
+
if (fallback === null) {
|
|
2362
|
+
return this._block('unresolved prerequisites: ' + this.phase.requires.join(', '));
|
|
2363
|
+
}
|
|
2364
|
+
this.emit('state_probe_missing', { phase: this.phase.id, requires: this.phase.requires, fallback });
|
|
2365
|
+
}
|
|
2366
|
+
// A phase that writes to the backend (a seeding recipe) runs only while the switch is still on:
|
|
2367
|
+
// turning `allow_data_writes` off after scheduling stops it on the next run. `writes_data` decides;
|
|
2368
|
+
// a recS- phase with no flag at all was scheduled before the flag existed (seed_recipes apply
|
|
2369
|
+
// backfills it on its next run) and counts as writing until then.
|
|
2370
|
+
const writes = get(this.phase, 'writes_data');
|
|
2371
|
+
const legacySeed = (writes === undefined || writes === null) && String(this.phase.id).startsWith('recS-');
|
|
2372
|
+
if ((writes === true || legacySeed) && get(this.config, 'allow_data_writes') !== true) {
|
|
2373
|
+
return this._block('data-writes-disabled: config.allow_data_writes is not true');
|
|
1772
2374
|
}
|
|
1773
2375
|
this.prepareEnvironment();
|
|
1774
2376
|
if (!this._runFixtures()) { return undefined; }
|
|
@@ -1777,15 +2379,13 @@ export class Runner {
|
|
|
1777
2379
|
// What the screen did show: recover_d.mjs offers it back so the probe can be rewritten from
|
|
1778
2380
|
// evidence. Measured (ydweather): the recipe reached Main, but its probe asked for a sticky
|
|
1779
2381
|
// title that is never in the tree at rest, and Main stayed uncaptured.
|
|
1780
|
-
const shown = [...new Set(get(this.current, 'nodes', []).filter((n) => isVisible(n))
|
|
1781
|
-
.flatMap((n) => [get(n, 'text'), get(n, 'content_desc')]).filter((t) => truthy(t)).map((t) => pyStr(t).trim())
|
|
1782
|
-
.filter((t) => t.length > 0))].slice(0, 200);
|
|
1783
2382
|
this.emit('state_probe_failed', { phase: this.phase.id, observation_id: get(this.current, 'observation_id'),
|
|
1784
|
-
activity: get(this.current, 'activity'), visible_texts:
|
|
2383
|
+
activity: get(this.current, 'activity'), visible_texts: visibleTexts(this.current), probes });
|
|
1785
2384
|
return this._block('state-probe-failed');
|
|
1786
2385
|
}
|
|
1787
2386
|
this.emit('environment_verified', { phase: this.phase.id, observation_id: this.current.observation_id,
|
|
1788
|
-
scope: truthy(probes) ? 'configured probes'
|
|
2387
|
+
scope: truthy(probes) ? 'configured probes'
|
|
2388
|
+
: (truthy(this.phase.requires) ? fallbackScope(this.config, this.phase, probes, this.doc) : 'existing state, no guard assumed') });
|
|
1789
2389
|
this.phase.status = 'running'; this.save();
|
|
1790
2390
|
let routeFailures = 0;
|
|
1791
2391
|
for (const route of get(get(this.config, 'routes', {}), this.phase.id, [])) {
|
|
@@ -1804,6 +2404,7 @@ export class Runner {
|
|
|
1804
2404
|
this.emit('route_result', { route_id: route.id, outcome: 'failed', reason: errStr(e), observation_id: this.current.observation_id });
|
|
1805
2405
|
}
|
|
1806
2406
|
}
|
|
2407
|
+
const runStart = this.doc.events.length;
|
|
1807
2408
|
const starts = counter(this.doc.events.filter((e) => e.kind === 'task_started').map((e) => e.payload.task_id));
|
|
1808
2409
|
const phaseTaskIds = new Set(tasks.map((t) => t.task_id));
|
|
1809
2410
|
const done = new Set(this.doc.events.filter((e) => e.kind === 'task_result' && e.payload.outcome === 'confirmed'
|
|
@@ -1834,12 +2435,26 @@ export class Runner {
|
|
|
1834
2435
|
}
|
|
1835
2436
|
const invariants = get(get(this.config, 'invariant_probes', {}), this.phase.id, []);
|
|
1836
2437
|
if (truthy(invariants) && !invariants.every((p) => ruleMatches(this.current, p))) { return this._block('state-drift'); }
|
|
2438
|
+
const isRoute = get(task, 'purpose') === 'route-launch' || get(task.action, 'type') === 'route';
|
|
2439
|
+
// A route task that cannot run (capture disabled, route down for this phase) is settled
|
|
2440
|
+
// without starting it: no task_started, no attempt spent, so a later run still gets it.
|
|
2441
|
+
const routeBlocked = isRoute ? this.routeUnavailable() : null;
|
|
2442
|
+
if (routeBlocked) {
|
|
2443
|
+
this.emit('task_result', { task_id: ident, outcome: 'unsupported', reason: routeBlocked, target_static: task.target_static });
|
|
2444
|
+
continue;
|
|
2445
|
+
}
|
|
1837
2446
|
scheduled += 1; starts.set(ident, (starts.get(ident) ?? 0) + 1);
|
|
1838
2447
|
this.emit('task_started', { task_id: ident, target_static: task.target_static });
|
|
1839
2448
|
this.keep = [task.source_static, task.target_static, get(task, 'source_context')].filter((x) => truthy(x));
|
|
1840
2449
|
this._launched = false; // only a launch of this task's own opens the consent window
|
|
1841
2450
|
this._clearedFor = null; // every attempt of a task starts from cleared data (resetBetweenTasks)
|
|
1842
2451
|
if (get(task, 'purpose') === 'direct-launch') { this.runDirect(task, done); continue; }
|
|
2452
|
+
if (isRoute) {
|
|
2453
|
+
const how = this.runRoute(task, done, transient);
|
|
2454
|
+
if (how === 'retry') { starts.set(ident, starts.get(ident) - 1); tasks.push(task); }
|
|
2455
|
+
if (how === DEVICE_UNAVAILABLE) { return this._block(DEVICE_UNAVAILABLE); }
|
|
2456
|
+
continue;
|
|
2457
|
+
}
|
|
1843
2458
|
try {
|
|
1844
2459
|
this._runTask(task, ident, done);
|
|
1845
2460
|
} catch (exc) {
|
|
@@ -1897,16 +2512,77 @@ export class Runner {
|
|
|
1897
2512
|
.map((e) => get(e.payload, 'static_id')));
|
|
1898
2513
|
const missing = this.phase.obligations.filter((o) => o.type === 'node' && !mapped.has(o.id) && !this.scopeExcludes(o.id));
|
|
1899
2514
|
const resolved = new Set([...done, ...skipped]).size;
|
|
2515
|
+
// One failed prefix the memo reused for many tasks: name it, the phase ran little of itself.
|
|
2516
|
+
const byId = new Map(get(this.doc, 'tasks', []).map((t) => [t.task_id, t]));
|
|
2517
|
+
for (const t of tasks) { byId.set(t.task_id, t); }
|
|
2518
|
+
const collapses = collapsedPrefixes(this.doc.events.slice(runStart), byId,
|
|
2519
|
+
{ env: this.env, min: toInt(get(this.config, 'collapse_min_cascade', COLLAPSE_MIN_CASCADE)) });
|
|
2520
|
+
for (const c of collapses) { this.emit('phase_collapsed', { phase: this.phase.id, ...c }); }
|
|
1900
2521
|
Object.assign(this.phase, {
|
|
1901
2522
|
status: resolved === tasks.length && !missing.length && !routeFailures ? 'completed' : 'exhausted-with-gaps',
|
|
1902
2523
|
reason: `${done.size}/${tasks.length} tasks confirmed; ${skipped.size} skipped (target already covered or out of scope); `
|
|
1903
2524
|
+ `${missing.length} node obligations missing; ${routeFailures} routes failed; `
|
|
1904
|
-
+ `discovery=${pyStr(get(discovery, 'outcome', 'disabled'))}; coverage=${this.coverage}
|
|
2525
|
+
+ `discovery=${pyStr(get(discovery, 'outcome', 'disabled'))}; coverage=${this.coverage}`
|
|
2526
|
+
+ collapses.map((c) => `; COLLAPSED: ${collapseNote(c)}`).join(''),
|
|
1905
2527
|
});
|
|
2528
|
+
if (collapses.length) { this.phase.collapsed = collapses.map(({ targets, ...c }) => c); }
|
|
1906
2529
|
this.save();
|
|
1907
2530
|
return undefined;
|
|
1908
2531
|
}
|
|
1909
2532
|
|
|
2533
|
+
/**
|
|
2534
|
+
* A uni-app route-jump task: one page = one route inside the shared WebView host, so there is
|
|
2535
|
+
* no Activity to launch and no in-app click path to replay. `route` (DeviceAdapter) executes
|
|
2536
|
+
* uni.reLaunch / uni.switchTab through the WebView, then the normal capture/mapping pipeline
|
|
2537
|
+
* identifies the landing page by its route token.
|
|
2538
|
+
*/
|
|
2539
|
+
runRoute(task, done, transient = new Map()) {
|
|
2540
|
+
const ident = task.task_id;
|
|
2541
|
+
this.stage = 'target';
|
|
2542
|
+
try {
|
|
2543
|
+
if (get(this.current, 'package') !== mget(this.config, 'package')) {
|
|
2544
|
+
this.atom({ type: 'launch', component: mget(this.config, 'launch_component'), restart: true }, ident, 'route');
|
|
2545
|
+
}
|
|
2546
|
+
this.seek(task.action, ident, 'target');
|
|
2547
|
+
} catch (exc) {
|
|
2548
|
+
if (exc instanceof BudgetExhausted) { throw exc; }
|
|
2549
|
+
const msg = errStr(exc);
|
|
2550
|
+
const code = routeErrorCode(msg);
|
|
2551
|
+
// Only a deterministic cause takes the route down for the rest of the phase (no DevTools
|
|
2552
|
+
// socket while adb works; uni absent in every target that answered).
|
|
2553
|
+
if (ROUTE_DOWN_CODES.has(code)) {
|
|
2554
|
+
this._hybridRouteDown = msg;
|
|
2555
|
+
this.emit('hybrid_route_unavailable', { task_id: ident, reason: msg, code });
|
|
2556
|
+
} else if (ROUTE_TRANSIENT_CODES.has(code) || TRANSIENT_DEVICE_RE.test(msg)) {
|
|
2557
|
+
// A CDP/adb hiccup: retry the task like a transient device error (_runTask's handling).
|
|
2558
|
+
const device = TRANSIENT_DEVICE_RE.test(msg);
|
|
2559
|
+
const recovered = device ? this.waitDevice() : true;
|
|
2560
|
+
transient.set(ident, (transient.get(ident) ?? 0) + 1);
|
|
2561
|
+
const retrying = recovered && transient.get(ident) <= toInt(get(this.config, 'max_device_retries', 1));
|
|
2562
|
+
this.emit('task_result', { task_id: ident, outcome: device ? 'device-error' : 'failed', stage: 'target',
|
|
2563
|
+
reason: cpSlice(msg, 0, 200), transient: true, ...(retrying ? { retrying: true } : {}), target_static: task.target_static });
|
|
2564
|
+
if (retrying) { return 'retry'; }
|
|
2565
|
+
return recovered ? undefined : DEVICE_UNAVAILABLE;
|
|
2566
|
+
}
|
|
2567
|
+
this.emit('task_result', { task_id: ident, outcome: 'failed', stage: 'target', reason: msg,
|
|
2568
|
+
target_static: task.target_static, observation_id: get(or(this.current, {}), 'observation_id') });
|
|
2569
|
+
return undefined;
|
|
2570
|
+
}
|
|
2571
|
+
const confirmed = this.at(task.target_static);
|
|
2572
|
+
if (confirmed) { done.add(ident); }
|
|
2573
|
+
this.emit('task_result', { task_id: ident, outcome: confirmed ? 'confirmed' : 'target-unverified',
|
|
2574
|
+
purpose: 'route-launch', target_static: task.target_static, observation_id: this.current.observation_id });
|
|
2575
|
+
if (confirmed) { this.sweep(task.target_static); }
|
|
2576
|
+
return undefined;
|
|
2577
|
+
}
|
|
2578
|
+
|
|
2579
|
+
/** Why a route task cannot run in this phase (capture disabled / route down), else null. */
|
|
2580
|
+
routeUnavailable() {
|
|
2581
|
+
if (get(this.config, 'hybrid_route_capture', true) === false) { return 'hybrid-route-capture disabled'; }
|
|
2582
|
+
if (this._hybridRouteDown) { return 'hybrid-route unavailable earlier in this phase: ' + this._hybridRouteDown; }
|
|
2583
|
+
return null;
|
|
2584
|
+
}
|
|
2585
|
+
|
|
1910
2586
|
_runTask(task, ident, done) {
|
|
1911
2587
|
this.stage = 'source';
|
|
1912
2588
|
this.source(task);
|