@buaa_smat/hometrans 26.0.2 → 26.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -6
- package/agents/code-reviewer.md +25 -138
- package/dist/cli/index.js +4 -1
- package/dist/cli/init.js +131 -26
- package/dist/cli/uninstall.js +5 -5
- package/dist/platform/language.js +77 -0
- package/env-requirements.json +30 -5
- package/i18n/FILE-NAMES.md +9 -0
- package/i18n/agents/code-reviewer.md +364 -0
- package/i18n/agents/model-render-worker.md +38 -0
- package/i18n/agents/specgen-worker.md +18 -0
- package/i18n/commands/hometrans.md +17 -0
- package/i18n/skills/a2h-app-migrate/SKILL.md +198 -0
- package/i18n/skills/a2h-app-migrate/references/config.example.json +28 -0
- package/i18n/skills/a2h-app-migrate/references/specs.example.json +19 -0
- package/i18n/skills/a2h-app-migrate/references/stage-map.md +50 -0
- package/i18n/skills/a2h-app-migrate/references/workflow.yaml +1760 -0
- package/i18n/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +114 -0
- package/i18n/skills/a2h-app-migrate/scripts/env_preflight.mjs +1588 -0
- package/i18n/skills/a2h-app-migrate/scripts/human_review_gate.mjs +657 -0
- package/i18n/skills/a2h-app-migrate/scripts/validate_workflow.mjs +541 -0
- package/i18n/skills/a2h-app-migrate/test/test_android_index.mjs +131 -0
- package/i18n/skills/a2h-app-migrate/test/test_arch_done.mjs +54 -0
- package/i18n/skills/a2h-app-migrate/test/test_build_fixer_contract.mjs +98 -0
- package/i18n/skills/a2h-app-migrate/test/test_config_example.mjs +42 -0
- package/i18n/skills/a2h-app-migrate/test/test_ensure_utg_snapshot.mjs +147 -0
- package/i18n/skills/a2h-app-migrate/test/test_env_requirements.mjs +698 -0
- package/i18n/skills/a2h-app-migrate/test/test_finalize.mjs +89 -0
- package/i18n/skills/a2h-app-migrate/test/test_image_probe.mjs +120 -0
- package/i18n/skills/a2h-app-migrate/test/test_interaction.mjs +122 -0
- package/i18n/skills/a2h-app-migrate/test/test_preflight_report.mjs +93 -0
- package/i18n/skills/a2h-app-migrate/test/test_resume_plan.mjs +219 -0
- package/i18n/skills/a2h-app-migrate/test/test_resume_summary.mjs +196 -0
- package/i18n/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +100 -0
- package/i18n/skills/a2h-app-migrate/test/test_run_dir.mjs +488 -0
- package/i18n/skills/a2h-app-migrate/test/test_skill_doc.mjs +144 -0
- package/i18n/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +146 -0
- package/i18n/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +161 -0
- package/i18n/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +76 -0
- package/i18n/skills/a2h-app-migrate/test/test_ui_batch_gate.mjs +226 -0
- package/i18n/skills/a2h-app-migrate/test/test_user_facing_progress.mjs +43 -0
- package/i18n/skills/a2h-app-migrate/test/test_utg_static_done.mjs +171 -0
- package/i18n/skills/a2h-app-migrate/test/test_validate_workflow_bilingual.mjs +87 -0
- package/i18n/skills/a2h-arch-generate/SKILL.md +375 -0
- package/i18n/skills/a2h-arch-generate/examples/reconcile-existing-project.md +107 -0
- package/i18n/skills/a2h-arch-generate/examples/simple-conversion-backend.md +70 -0
- package/i18n/skills/a2h-arch-generate/references/arkts-mvvm-v2.md +1407 -0
- package/i18n/skills/a2h-arch-generate/references/artifact-contracts.generate.md +120 -0
- package/i18n/skills/a2h-arch-generate/references/artifact-contracts.reconcile.md +123 -0
- package/i18n/skills/a2h-arch-generate/references/bpta-layered-architecture-design.md +88 -0
- package/i18n/skills/a2h-arch-generate/references/database-schema-recovery.md +107 -0
- package/i18n/skills/a2h-arch-generate/references/existing-target-annotation.md +68 -0
- package/i18n/skills/a2h-arch-generate/references/harmony-project-inspection.md +150 -0
- package/i18n/skills/a2h-arch-generate/references/harmony-target-architecture.md +94 -0
- package/i18n/skills/a2h-arch-generate/references/homegraph-workflow.md +120 -0
- package/i18n/skills/a2h-arch-generate/references/source-baseline.md +93 -0
- package/i18n/skills/a2h-arch-generate/scripts/generate_source_baseline.mjs +360 -0
- package/i18n/skills/a2h-arch-generate/scripts/inspect_harmony_target.mjs +798 -0
- package/i18n/skills/a2h-arch-generate/scripts/lib/contract_terms.mjs +40 -0
- package/i18n/skills/a2h-arch-generate/scripts/module_create/generate.mjs +639 -0
- package/i18n/skills/a2h-arch-generate/scripts/module_create/testdata/reconcile-layer-PROJECT_DESIGN.md +47 -0
- package/i18n/skills/a2h-arch-generate/scripts/module_create/testdata/single-entry-PROJECT_DESIGN.md +15 -0
- package/i18n/skills/a2h-arch-generate/scripts/module_create/testdata/three-layer-PROJECT_DESIGN.md +36 -0
- package/i18n/skills/a2h-arch-generate/scripts/module_create/testdata/verification-report.md +150 -0
- package/i18n/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/pages.json +5 -0
- package/i18n/skills/a2h-arch-generate/scripts/tests/e2e/run_e2e.mjs +548 -0
- package/i18n/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +1261 -0
- package/i18n/skills/a2h-arch-generate/scripts/tests/test_module_templates.mjs +70 -0
- package/i18n/skills/a2h-arch-generate/scripts/validate_architecture_docs.mjs +851 -0
- package/i18n/skills/a2h-arch-generate/scripts/validate_data_docs.mjs +982 -0
- package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +9 -0
- package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +192 -0
- package/i18n/skills/a2h-arkts-logic-coder/references/spec-design.md +303 -0
- package/i18n/skills/a2h-arkts-logic-coder/scripts/design/move_spec_technical_reference.mjs +162 -0
- package/i18n/skills/a2h-arkts-logic-coder/scripts/design/validate_spec_design_output.mjs +298 -0
- package/i18n/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +587 -0
- package/i18n/skills/a2h-arkts-logic-coder/scripts/test_check_units.ts +149 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/golden/move_design.md +18 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/golden/move_design_crlf.md +18 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/golden/move_spec.md +7 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/golden/validate_issue_file.md +12 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/golden/validate_issues.json +57 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/test_spec_design_scripts.mjs +547 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +352 -0
- package/i18n/skills/a2h-batch-ui-align/SKILL.md +323 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/alignment.md +31 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/build.md +13 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/canvas.md +17 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/dynamics.md +27 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/geometry.md +80 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/interaction.md +22 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/resources.md +87 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/state-v1.md +29 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/state.md +14 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +57 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/window.md +29 -0
- package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +705 -0
- package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +417 -0
- package/i18n/skills/a2h-batch-ui-align/references/incremental-scope.md +139 -0
- package/i18n/skills/a2h-batch-ui-align/references/lottie-integration.md +43 -0
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +2549 -0
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +560 -0
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +148 -0
- package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_decorator-quickref.md +220 -0
- package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_paradigm-selection.md +28 -0
- package/i18n/skills/a2h-batch-ui-align/references/step3-capture.md +216 -0
- package/i18n/skills/a2h-batch-ui-align/references/step4-prepare.md +203 -0
- package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +210 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/android_parse_fast.ts +2005 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +1748 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/databinding_analyzer_design.md +79 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/detect_paradigm.mjs +245 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/draw_coverage.mjs +264 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +1787 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/gen_rule_docs.mjs +100 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/generate_pages_json.mjs +612 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/group_pack.mjs +1836 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/image_probe.mjs +405 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/measure_pack.ts +1406 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +1226 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +1220 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/state_doc.mjs +412 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/core/cli.ts +134 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/core/i18n.ts +18 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/main.ts +173 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +629 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/android_immersive.ts +125 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +67 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/block_comment_break.ts +64 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/blur_mirrored.ts +134 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/builder_call_sites.ts +242 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/builder_invokes_callback.ts +136 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/canvas.ts +255 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/color_string.ts +109 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/column_shrink.ts +154 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/constant_coordinate.ts +39 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/container_align.ts +140 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/entry_root_builtin.ts +69 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/entry_route.ts +114 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/fixed_size_safe_area.ts +103 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/format_string.ts +157 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/framework_dialog.ts +110 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/framework_picker.ts +115 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +551 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_content.ts +138 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +374 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/offset_in_scroll.ts +163 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/orphan_component.ts +119 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +119 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/page_reachability.ts +94 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/path_commands_vp.ts +50 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +80 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/popup_menu.ts +137 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/r_template_string.ts +37 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/request_permission.ts +98 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/resource_as_string.ts +68 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +97 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/safe_area_clipping.ts +168 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_delta.ts +178 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/sdk_api.ts +195 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/shared_chrome.ts +73 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_blur.ts +95 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/shell_content.ts +198 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/stack_occluding.ts +118 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/state_decorators.ts +73 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/state_name_shadows.ts +93 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/string_quote_leak.ts +73 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/surface_stroke.ts +50 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +123 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/track_getter.ts +132 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +53 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/window_mode.ts +67 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_a11y.test.mjs +598 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_blur.test.mjs +217 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_builder_calls.test.mjs +323 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_fidelity.test.mjs +507 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +427 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_occlusion_offset_format.test.mjs +372 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_review_fixes.test.mjs +298 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rules.test.mjs +365 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_scroll_padding_raster.test.mjs +262 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_weight_color.test.mjs +473 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +560 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/draw_coverage.test.mjs +245 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/export_ui_info.test.mjs +742 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/generate_pages_json.test.mjs +123 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/group_pack.test.mjs +363 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/image_probe.test.mjs +243 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +324 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/occlusion.test.mjs +102 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +325 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +48 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +387 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/static_check_registry.test.mjs +122 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/text_color_diff.test.mjs +250 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/text_color_diff.mjs +470 -0
- package/i18n/skills/a2h-coldstart-smoke-gate/SKILL.md +59 -0
- package/i18n/skills/a2h-dashboard-render/SKILL.md +73 -0
- package/i18n/skills/a2h-dashboard-render/references/artifact-contract.jsonc +117 -0
- package/i18n/skills/a2h-dashboard-render/references/artifact-registry-spec.md +67 -0
- package/i18n/skills/a2h-dashboard-render/references/dashboard-guide.md +91 -0
- package/i18n/skills/a2h-dashboard-render/references/dashboard.config.example.json +19 -0
- package/i18n/skills/a2h-dashboard-render/scripts/dashboard.mjs +3245 -0
- package/i18n/skills/a2h-dashboard-render/scripts/device_capture.mjs +2048 -0
- package/i18n/skills/a2h-dashboard-render/test/fixtures/page_capture/expected.json +156 -0
- package/i18n/skills/a2h-dashboard-render/test/fixtures/page_capture/hmos.json +1 -0
- package/i18n/skills/a2h-dashboard-render/test/fixtures/page_capture/list.xml +1 -0
- package/i18n/skills/a2h-dashboard-render/test/test_artifact_contract.mjs +168 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_architecture.mjs +118 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_build.mjs +93 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_i18n.mjs +154 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_node.mjs +1369 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_spec_pipeline.mjs +318 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_ui_pipeline.mjs +81 -0
- package/i18n/skills/a2h-dashboard-render/test/test_device_capture_env.mjs +115 -0
- package/i18n/skills/a2h-dashboard-render/test/test_device_capture_policy.mjs +411 -0
- package/i18n/skills/a2h-dashboard-render/test/test_page_capture.mjs +147 -0
- package/i18n/skills/a2h-dashboard-render/test/test_usage_readers.mjs +512 -0
- package/i18n/skills/a2h-fix-build-errors/SKILL.md +304 -0
- package/i18n/skills/a2h-fix-build-errors/references/arkts-strict-patterns.md +219 -0
- package/i18n/skills/a2h-fix-build-errors/references/rdb-entity-pattern.md +131 -0
- package/i18n/skills/a2h-module-semantic-docs/SKILL.md +227 -0
- package/i18n/skills/a2h-module-semantic-docs/test/golden/module_structure.json +187 -0
- package/i18n/skills/a2h-module-semantic-docs/test/golden/module_understanding.json +351 -0
- package/i18n/skills/a2h-module-semantic-docs/test/golden/module_update_plan.json +495 -0
- package/i18n/skills/a2h-module-semantic-docs/test/golden/project_directory_structure.json +157 -0
- package/i18n/skills/a2h-module-semantic-docs/test/test_scan_and_commit.mjs +388 -0
- package/i18n/skills/a2h-page-specgen/SKILL.md +136 -0
- package/i18n/skills/a2h-page-specgen/references/body-language.md +177 -0
- package/i18n/skills/a2h-page-specgen/references/gates.md +262 -0
- package/i18n/skills/a2h-page-specgen/references/page-inventory.md +173 -0
- package/i18n/skills/a2h-page-specgen/references/spec-template.md +207 -0
- package/i18n/skills/a2h-page-specgen/scripts/facts-build.mjs +1504 -0
- package/i18n/skills/a2h-page-specgen/scripts/footprint.mjs +1528 -0
- package/i18n/skills/a2h-page-specgen/scripts/gate.mjs +576 -0
- package/i18n/skills/a2h-page-specgen/scripts/interactions.mjs +138 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/contracts.mjs +262 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/hg.mjs +176 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/prose.mjs +248 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/reach.mjs +53 -0
- package/i18n/skills/a2h-page-specgen/scripts/prepare.mjs +506 -0
- package/i18n/skills/a2h-page-specgen/scripts/render.mjs +299 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +616 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +234 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/facts.test.mjs +1166 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +74 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/facts/i18n/zh.js.txt +8 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-b+zh+Hans/strings.xml +7 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-zh/strings.xml +8 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/utg/click_paths.json +28 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +758 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fsx.test.mjs +32 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +54 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/gate.test.mjs +271 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/helpers.mjs +54 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/hg.test.mjs +171 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/integration.test.mjs +301 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +83 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +139 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/keys.test.mjs +774 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +1011 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +77 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prose.test.mjs +419 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/reach.test.mjs +93 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +323 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +546 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/render.test.mjs +511 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/submit.test.mjs +701 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/utg-io.test.mjs +90 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +1765 -0
- package/i18n/skills/a2h-resource-convert/SKILL.md +367 -0
- package/i18n/skills/a2h-resource-convert/references/code-vector-icon-rules.md +335 -0
- package/i18n/skills/a2h-resource-convert/references/incremental-page-migration.md +251 -0
- package/i18n/skills/a2h-resource-convert/references/lottie-conversion-rules.md +219 -0
- package/i18n/skills/a2h-resource-convert/references/resource-mapping-rules.md +493 -0
- package/i18n/skills/a2h-resource-convert/references/step4-resource-types.md +249 -0
- package/i18n/skills/a2h-resource-convert/references/step7-report-template.md +217 -0
- package/i18n/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +2532 -0
- package/i18n/skills/a2h-resource-convert/scripts/tests/docs_only_i18n.test.mjs +44 -0
- package/i18n/skills/a2h-spec-design-pipeline/SKILL.md +278 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/coding-loop.md +260 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/merge-queue.md +163 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/scripts.md +44 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/specs.example.json +19 -0
- package/i18n/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +589 -0
- package/i18n/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +506 -0
- package/i18n/skills/a2h-spec-generate/SKILL.md +375 -0
- package/i18n/skills/a2h-spec-generate/references/batch-mode.md +215 -0
- package/i18n/skills/a2h-spec-generate/references/delete-blast-radius.md +3 -0
- package/i18n/skills/a2h-spec-generate/references/dispatch-watchdog.md +150 -0
- package/i18n/skills/a2h-spec-generate/references/fusion-task-contract.md +184 -0
- package/i18n/skills/a2h-spec-generate/references/input-formats.md +27 -0
- package/i18n/skills/a2h-spec-generate/references/library-evidence.md +3 -0
- package/i18n/skills/a2h-spec-generate/references/method-discipline.md +64 -0
- package/i18n/skills/a2h-spec-generate/references/optional-gates.json +45 -0
- package/i18n/skills/a2h-spec-generate/references/recall-guide.md +84 -0
- package/i18n/skills/a2h-spec-generate/references/recall-terse.md +3 -0
- package/i18n/skills/a2h-spec-generate/references/recall-uniapp.md +10 -0
- package/i18n/skills/a2h-spec-generate/references/requirement-scope.md +122 -0
- package/i18n/skills/a2h-spec-generate/references/review-checklist.md +22 -0
- package/i18n/skills/a2h-spec-generate/references/spec-sample-complex.md +80 -0
- package/i18n/skills/a2h-spec-generate/references/spec-sample-transfer.md +43 -0
- package/i18n/skills/a2h-spec-generate/references/spec-samples.md +65 -0
- package/i18n/skills/a2h-spec-generate/references/specs.schema.json +85 -0
- package/i18n/skills/a2h-spec-generate/references/synthesis-rules.md +145 -0
- package/i18n/skills/a2h-spec-generate/references/transfer-file.md +5 -0
- package/i18n/skills/a2h-spec-generate/references/transfer-socket.md +5 -0
- package/i18n/skills/a2h-spec-generate/references/worker-rules.md +129 -0
- package/i18n/skills/a2h-spec-generate/scripts/check-fused-spec.mjs +702 -0
- package/i18n/skills/a2h-spec-generate/scripts/check_spec.ts +515 -0
- package/i18n/skills/a2h-spec-generate/scripts/collect-specs.mjs +727 -0
- package/i18n/skills/a2h-spec-generate/scripts/feature-stem.mjs +151 -0
- package/i18n/skills/a2h-spec-generate/scripts/parse_requirements.ts +515 -0
- package/i18n/skills/a2h-spec-generate/scripts/prepare-facts.mjs +313 -0
- package/i18n/skills/a2h-spec-generate/scripts/publish-specs.mjs +354 -0
- package/i18n/skills/a2h-spec-generate/scripts/regroup-by-page.mjs +669 -0
- package/i18n/skills/a2h-spec-generate/scripts/render-tasks.mjs +385 -0
- package/i18n/skills/a2h-spec-generate/scripts/report.mjs +136 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/build.ts +2217 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/component-variants.ts +845 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/policy.ts +572 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/traceability.ts +580 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/req-model/build.ts +1265 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/area-facts.ts +1057 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/behavior-seed.ts +565 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/library-evidence.ts +544 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/navigation-guard.ts +363 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/schema.ts +317 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/selfcheck.ts +707 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/spec-bindings.ts +436 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/task-contract.ts +608 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/contracts.ts +650 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/task-contract.ts +178 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/tree-sitter-adapter.ts +923 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/model/finalize.ts +912 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/model/task.ts +279 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/requirement-scope.ts +163 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/source-index/homegraph.ts +1039 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/validation/req-text.ts +256 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fixtures/fusion-run.ts +243 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-area-facts.test.ts +576 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-detectors.test.ts +176 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-e2e.test.ts +103 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-schema.test.ts +111 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-selfcheck.test.ts +307 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-contract.test.ts +340 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-finalize.test.ts +1857 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-navigation-guard.test.ts +262 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-prepare.test.ts +722 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-scope.test.ts +339 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-selfcheck.test.ts +1253 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-spec.test.ts +608 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/model-scope.test.ts +411 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/model-task-contract.test.ts +300 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/model-v4.test.ts +1061 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/uniapp-scanner.test.ts +159 -0
- package/i18n/skills/a2h-spec-generate/template/REQ.txt +22 -0
- package/i18n/skills/a2h-spec-generate/template/REQ.xlsx +0 -0
- package/i18n/skills/a2h-spec-generate/test/check-fused-spec.test.mjs +847 -0
- package/i18n/skills/a2h-spec-generate/test/check-spec.test.ts +415 -0
- package/i18n/skills/a2h-spec-generate/test/collect-specs.test.mjs +808 -0
- package/i18n/skills/a2h-spec-generate/test/feature-stem.test.mjs +157 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/components/MyCard.vue +9 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/feature/editor/index.vue +1 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/detail/index.vue +1 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/home/index.vue +33 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/settings/index.vue +1 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages.json +23 -0
- package/i18n/skills/a2h-spec-generate/test/inspect-uniapp.test.mjs +54 -0
- package/i18n/skills/a2h-spec-generate/test/prepare-facts.test.mjs +41 -0
- package/i18n/skills/a2h-spec-generate/test/publish-specs.test.mjs +295 -0
- package/i18n/skills/a2h-spec-generate/test/regroup-by-page.test.mjs +354 -0
- package/i18n/skills/a2h-spec-generate/test/render-tasks.test.mjs +596 -0
- package/i18n/skills/a2h-spec-generate/test/report.test.mjs +47 -0
- package/i18n/skills/a2h-utg-explorer/SKILL.md +120 -0
- package/i18n/skills/a2h-utg-explorer/references/architecture.md +279 -0
- package/i18n/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +918 -0
- package/i18n/skills/a2h-utg-explorer/scripts/final_utg.mjs +446 -0
- package/i18n/skills/a2h-utg-explorer/scripts/hint_check.mjs +147 -0
- package/i18n/skills/a2h-utg-explorer/scripts/hint_source.mjs +119 -0
- package/i18n/skills/a2h-utg-explorer/scripts/recover_b.mjs +550 -0
- package/i18n/skills/a2h-utg-explorer/scripts/recover_d.mjs +380 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/attest.test.mjs +66 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/compose_identity.test.mjs +302 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/content_wait.test.mjs +207 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/direct_launch.test.mjs +130 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/final_utg.test.mjs +135 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/generalization_fixes.test.mjs +252 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/hint_check.test.mjs +129 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +492 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +199 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/overflow_prefix.test.mjs +327 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/overlay_identity.test.mjs +204 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/page_identity_tiers.test.mjs +393 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/pager_navigation.test.mjs +119 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/panel_routes.test.mjs +208 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/pipeline.test.mjs +240 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/recover_b.test.mjs +173 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/recover_d.test.mjs +280 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/robustness_fixes.test.mjs +345 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/runner_capabilities.test.mjs +194 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/semantics.test.mjs +102 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/state_ambiguity.test.mjs +92 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/twin_opener.test.mjs +119 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/variant_strings.test.mjs +63 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +1412 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +2037 -0
- package/i18n/skills/a2h-utg-static/SKILL.md +368 -0
- package/i18n/skills/a2h-utg-static/references/ui-elements-static-utg-schema.md +248 -0
- package/i18n/skills/a2h-utg-static/references/view-interactions.md +215 -0
- package/i18n/skills/a2h-utg-static/scripts/assemble.mjs +2120 -0
- package/i18n/skills/a2h-utg-static/scripts/audit.mjs +268 -0
- package/i18n/skills/a2h-utg-static/scripts/click_paths.mjs +609 -0
- package/i18n/skills/a2h-utg-static/scripts/compose_body_text.mjs +250 -0
- package/i18n/skills/a2h-utg-static/scripts/compose_titles.mjs +374 -0
- package/i18n/skills/a2h-utg-static/scripts/compose_widgets.mjs +498 -0
- package/i18n/skills/a2h-utg-static/scripts/fragment_nav.mjs +1137 -0
- package/i18n/skills/a2h-utg-static/scripts/hybrid_scope.mjs +660 -0
- package/i18n/skills/a2h-utg-static/scripts/interaction_sites.mjs +267 -0
- package/i18n/skills/a2h-utg-static/scripts/label_resolve.mjs +913 -0
- package/i18n/skills/a2h-utg-static/scripts/nl_hints.mjs +517 -0
- package/i18n/skills/a2h-utg-static/scripts/presenter_nav.mjs +490 -0
- package/i18n/skills/a2h-utg-static/scripts/static_prior.mjs +956 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/regression_matrix.mjs +1261 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_callee_string_default.mjs +30 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_chrome_tokens.mjs +60 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_commented_out_trigger.mjs +111 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +108 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_vm_nav.mjs +289 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_disabled_guard.mjs +42 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_drawer_panel_gesture.mjs +140 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_fresh_branch_guard.mjs +49 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hint_language.mjs +136 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_bundle_attribution.mjs +74 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_bundled_pages.mjs +181 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +293 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_title_renders.mjs +118 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_label_accessor_forms.mjs +187 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_label_source.mjs +70 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_launch_intent_guard.mjs +67 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_login_interceptor.mjs +368 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_mode_and_cb_param.mjs +172 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +44 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_nl_hint_grammar.mjs +42 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_nl_hints_gate.mjs +85 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_nl_hints_off_path.mjs +67 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_non_gesture_step_flag.mjs +62 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_preference_widgets.mjs +48 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_read_text_crlf.mjs +41 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_sealed_dialog_state.mjs +148 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_state_specific_hop.mjs +130 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_synthetic_label_identity.mjs +51 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_template_title.mjs +61 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_ui_elements_flow_filter.mjs +110 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_data_table.mjs +340 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_relative_url.mjs +125 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +231 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_viewpage_nav.mjs +340 -0
- package/i18n/skills/a2h-utg-static/scripts/uniapp_nav.mjs +1351 -0
- package/i18n/skills/a2h-utg-static/scripts/uniapp_widgets.mjs +244 -0
- package/i18n/skills/a2h-utg-static/tools/convert_static_utg_to_ui_elements.ts +769 -0
- package/package.json +13 -160
- package/platforms/deveco/agents/code-reviewer.frontmatter.md +1 -1
- package/platforms/opencode/agents/code-reviewer.frontmatter.md +1 -1
- package/skills/a2h-app-migrate/SKILL.md +17 -6
- package/skills/a2h-app-migrate/references/config.example.json +1 -0
- package/skills/a2h-app-migrate/references/stage-map.md +3 -1
- package/skills/a2h-app-migrate/references/workflow.yaml +138 -47
- package/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +1 -2
- package/skills/a2h-app-migrate/scripts/env_preflight.mjs +105 -39
- package/skills/a2h-app-migrate/scripts/human_review_gate.mjs +7 -8
- package/skills/a2h-app-migrate/scripts/ledger.mjs +17 -5
- package/skills/a2h-app-migrate/scripts/resume_plan.mjs +43 -7
- package/skills/a2h-app-migrate/scripts/run_dir.mjs +127 -41
- package/skills/a2h-app-migrate/scripts/spec_layout.mjs +2 -0
- package/skills/a2h-app-migrate/scripts/validate_workflow.mjs +38 -0
- package/skills/a2h-app-migrate/test/test_android_index.mjs +131 -0
- package/skills/a2h-app-migrate/test/test_apk_preflight.mjs +63 -0
- package/skills/a2h-app-migrate/test/test_arch_done.mjs +54 -0
- package/skills/a2h-app-migrate/test/test_build_fixer_contract.mjs +98 -0
- package/skills/a2h-app-migrate/test/test_config_example.mjs +42 -0
- package/skills/a2h-app-migrate/test/test_devecocli_docs_preflight.mjs +32 -0
- package/skills/a2h-app-migrate/test/test_ensure_utg_snapshot.mjs +147 -0
- package/skills/a2h-app-migrate/test/test_entry_guards.mjs +102 -0
- package/skills/a2h-app-migrate/test/test_env_requirements.mjs +698 -0
- package/skills/a2h-app-migrate/test/test_finalize.mjs +89 -0
- package/skills/a2h-app-migrate/test/test_gate_checkpoint.mjs +146 -0
- package/skills/a2h-app-migrate/test/test_hmos_fingerprint.mjs +68 -0
- package/skills/a2h-app-migrate/test/test_i18n_engine_mirror.mjs +51 -0
- package/skills/a2h-app-migrate/test/test_image_probe.mjs +120 -0
- package/skills/a2h-app-migrate/test/test_infer_android_root.mjs +91 -0
- package/skills/a2h-app-migrate/test/test_interaction.mjs +122 -0
- package/skills/a2h-app-migrate/test/test_json_io.mjs +32 -0
- package/skills/a2h-app-migrate/test/test_leaf_questions.mjs +111 -0
- package/skills/a2h-app-migrate/test/test_module_docs_done.mjs +53 -0
- package/skills/a2h-app-migrate/test/test_parse_args.mjs +69 -0
- package/skills/a2h-app-migrate/test/test_preflight_report.mjs +93 -0
- package/skills/a2h-app-migrate/test/test_resume_plan.mjs +219 -0
- package/skills/a2h-app-migrate/test/test_resume_summary.mjs +196 -0
- package/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +100 -0
- package/skills/a2h-app-migrate/test/test_run_dir.mjs +488 -0
- package/skills/a2h-app-migrate/test/test_skill_doc.mjs +144 -0
- package/skills/a2h-app-migrate/test/test_spec_engine_acceptance.mjs +94 -0
- package/skills/a2h-app-migrate/test/test_spec_engine_contract.mjs +147 -0
- package/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +146 -0
- package/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +161 -0
- package/skills/a2h-app-migrate/test/test_spec_pipeline_done.mjs +344 -0
- package/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +76 -0
- package/skills/a2h-app-migrate/test/test_ui_batch_done.mjs +53 -0
- package/skills/a2h-app-migrate/test/test_ui_batch_gate.mjs +226 -0
- package/skills/a2h-app-migrate/test/test_uniapp_preflight.mjs +83 -0
- package/skills/a2h-app-migrate/test/test_user_facing_progress.mjs +43 -0
- package/skills/a2h-app-migrate/test/test_utg_dirs.mjs +41 -0
- package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +178 -0
- package/skills/a2h-app-migrate/test/test_validate_races.mjs +50 -0
- package/skills/a2h-app-migrate/test/test_validate_workflow_bilingual.mjs +87 -0
- package/skills/a2h-arch-generate/SKILL.md +1 -1
- package/skills/a2h-arch-generate/references/database-schema-recovery.md +2 -2
- package/skills/a2h-arch-generate/references/harmony-project-inspection.md +8 -8
- package/skills/a2h-arch-generate/references/homegraph-workflow.md +15 -6
- package/skills/a2h-arch-generate/references/module-evidence-subagent.md +2 -2
- package/skills/a2h-arch-generate/references/source-baseline.md +2 -2
- package/skills/a2h-arch-generate/scripts/generate_source_baseline.mjs +35 -46
- package/skills/a2h-arch-generate/scripts/inspect_harmony_target.mjs +33 -40
- package/skills/a2h-arch-generate/scripts/module_create/generate.mjs +2 -3
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/app/build.gradle +11 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/app/src/main/AndroidManifest.xml +12 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/app/src/main/java/com/example/notes/MainActivity.kt +8 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/app/src/main/java/com/example/notes/NotesStore.kt +17 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/build.gradle +3 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/settings.gradle +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/AppScope/app.json5 +8 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/build-profile.json5 +14 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/common/utils/build-profile.json5 +7 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/common/utils/oh-package.json5 +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/common/utils/src/main/ets/utils/Format.ets +3 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/home/build-profile.json5 +7 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/home/oh-package.json5 +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/home/src/main/ets/pages/Home.ets +3 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/sync/build-profile.json5 +7 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/sync/oh-package.json5 +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/sync/src/main/ets/engine/SyncEngine.ets +3 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/hvigorfile.ts +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/oh-package.json5 +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/products/app/build-profile.json5 +7 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/products/app/oh-package.json5 +9 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/products/app/src/main/ets/pages/Index.ets +7 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/App.vue +10 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/manifest.json +6 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/pages/index/index.vue +16 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/pages.json +5 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/run_e2e.mjs +548 -0
- package/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +1260 -0
- package/skills/a2h-arch-generate/scripts/tests/test_cleanup.mjs +191 -0
- package/skills/a2h-arch-generate/scripts/tests/test_console_encoding.mjs +52 -0
- package/skills/a2h-arch-generate/scripts/tests/test_git_root.mjs +34 -0
- package/skills/a2h-arch-generate/scripts/tests/test_module_templates.mjs +70 -0
- package/skills/a2h-arch-generate/scripts/tests/test_router.mjs +138 -0
- package/skills/a2h-arch-generate/scripts/validate_architecture_docs.mjs +2 -5
- package/skills/a2h-arkts-logic-coder/SKILL.md +21 -2
- package/skills/a2h-arkts-logic-coder/references/ISSUES.md +1 -0
- package/skills/a2h-arkts-logic-coder/references/code-generation.md +62 -0
- package/skills/a2h-arkts-logic-coder/references/spec-design.md +4 -0
- package/skills/a2h-arkts-logic-coder/scripts/design/validate_spec_design_output.mjs +22 -25
- package/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +583 -0
- package/skills/a2h-arkts-logic-coder/test/golden/inspect_happy.json +20 -0
- package/skills/a2h-arkts-logic-coder/test/golden/move_design.md +18 -0
- package/skills/a2h-arkts-logic-coder/test/golden/move_design_crlf.md +18 -0
- package/skills/a2h-arkts-logic-coder/test/golden/move_spec.md +7 -0
- package/skills/a2h-arkts-logic-coder/test/golden/resolve_cases.json +36 -0
- package/skills/a2h-arkts-logic-coder/test/golden/validate_issue_file.md +12 -0
- package/skills/a2h-arkts-logic-coder/test/golden/validate_issues.json +57 -0
- package/skills/a2h-arkts-logic-coder/test/test_spec_design_scripts.mjs +547 -0
- package/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +352 -0
- package/skills/a2h-batch-ui-align/SKILL.md +6 -4
- package/skills/a2h-batch-ui-align/references/cards/geometry.md +1 -1
- package/skills/a2h-batch-ui-align/references/cards/resources.md +4 -0
- package/skills/a2h-batch-ui-align/references/cards/widgets.md +22 -3
- package/skills/a2h-batch-ui-align/references/checker-rules.md +66 -3
- package/skills/a2h-batch-ui-align/references/conversion-procedure.md +45 -8
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +7 -5
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +2 -2
- package/skills/a2h-batch-ui-align/references/step4-prepare.md +4 -2
- package/skills/a2h-batch-ui-align/references/step5-convert.md +7 -5
- package/skills/a2h-batch-ui-align/scripts/android_parse_fast.ts +6 -7
- package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +84 -7
- package/skills/a2h-batch-ui-align/scripts/draw_coverage.mjs +264 -0
- package/skills/a2h-batch-ui-align/scripts/evidence_gate.mjs +229 -0
- package/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +1 -2
- package/skills/a2h-batch-ui-align/scripts/generate_pages_json.mjs +4 -5
- package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +88 -26
- package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +305 -12
- package/skills/a2h-batch-ui-align/scripts/image_probe.mjs +231 -54
- package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +8 -9
- package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +18 -5
- package/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +103 -3
- package/skills/a2h-batch-ui-align/scripts/static_check/core/android.ts +231 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/core/i18n.ts +1 -5
- package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +14 -8
- package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +8 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/android_immersive.ts +3 -3
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/blur_mirrored.ts +2 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/builder_invokes_callback.ts +84 -19
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/color_string.ts +11 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/constant_coordinate.ts +2 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/framework_dialog.ts +110 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/framework_picker.ts +5 -5
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_content.ts +2 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +66 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +119 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/popup_menu.ts +81 -8
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_delta.ts +178 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +123 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/window_mode.ts +2 -3
- package/skills/a2h-batch-ui-align/scripts/static_check/scan_file.ts +6 -0
- package/skills/a2h-batch-ui-align/scripts/tests/agent_cli.test.mjs +217 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_a11y.test.mjs +598 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_align_tint.test.mjs +312 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_blur.test.mjs +217 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_builder_calls.test.mjs +323 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_canvas_pct.test.mjs +312 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_fidelity.test.mjs +507 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +427 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_occlusion_offset_format.test.mjs +372 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_review_fixes.test.mjs +298 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rule_smoke.test.mjs +235 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rules.test.mjs +365 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_scroll_padding_raster.test.mjs +262 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_scroll_safearea.test.mjs +742 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_shell.test.mjs +91 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_theme.test.mjs +86 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_weight_color.test.mjs +473 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +567 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set_scope.test.mjs +290 -0
- package/skills/a2h-batch-ui-align/scripts/tests/color_utils_asset.test.mjs +74 -0
- package/skills/a2h-batch-ui-align/scripts/tests/detect_paradigm.test.mjs +260 -0
- package/skills/a2h-batch-ui-align/scripts/tests/draw_coverage.test.mjs +244 -0
- package/skills/a2h-batch-ui-align/scripts/tests/evidence_gate.test.mjs +420 -0
- package/skills/a2h-batch-ui-align/scripts/tests/export_scroll_states.test.mjs +31 -0
- package/skills/a2h-batch-ui-align/scripts/tests/export_ui_info.test.mjs +742 -0
- package/skills/a2h-batch-ui-align/scripts/tests/generate_pages_json.test.mjs +123 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_commit.test.mjs +126 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_pack.test.mjs +363 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +1628 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_watch.test.mjs +215 -0
- package/skills/a2h-batch-ui-align/scripts/tests/harmony_index.test.mjs +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/host_env.test.mjs +115 -0
- package/skills/a2h-batch-ui-align/scripts/tests/image_probe.test.mjs +243 -0
- package/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +324 -0
- package/skills/a2h-batch-ui-align/scripts/tests/occlusion.test.mjs +102 -0
- package/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +325 -0
- package/skills/a2h-batch-ui-align/scripts/tests/shell_contract.test.mjs +297 -0
- package/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +48 -0
- package/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +387 -0
- package/skills/a2h-batch-ui-align/scripts/tests/static_check_registry.test.mjs +122 -0
- package/skills/a2h-batch-ui-align/scripts/tests/test_bfs_exit.ts +49 -0
- package/skills/a2h-batch-ui-align/scripts/tests/text_color_diff.test.mjs +250 -0
- package/skills/a2h-dashboard-render/scripts/dashboard.mjs +12 -14
- package/skills/a2h-dashboard-render/scripts/device_capture.mjs +29 -30
- package/skills/a2h-dashboard-render/test/fixtures/page_capture/broken.xml +1 -0
- package/skills/a2h-dashboard-render/test/fixtures/page_capture/expected.json +156 -0
- package/skills/a2h-dashboard-render/test/fixtures/page_capture/hmos.json +1 -0
- package/skills/a2h-dashboard-render/test/fixtures/page_capture/list.xml +1 -0
- package/skills/a2h-dashboard-render/test/fixtures/page_capture/nested_scroll.xml +1 -0
- package/skills/a2h-dashboard-render/test/test_artifact_contract.mjs +168 -0
- package/skills/a2h-dashboard-render/test/test_cli_check_registry.mjs +99 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_architecture.mjs +118 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_build.mjs +93 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_i18n.mjs +203 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_node.mjs +1369 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_spec_pipeline.mjs +318 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_ui_pipeline.mjs +81 -0
- package/skills/a2h-dashboard-render/test/test_device_capture_env.mjs +115 -0
- package/skills/a2h-dashboard-render/test/test_device_capture_policy.mjs +411 -0
- package/skills/a2h-dashboard-render/test/test_page_capture.mjs +147 -0
- package/skills/a2h-dashboard-render/test/test_usage_readers.mjs +512 -0
- package/skills/a2h-module-semantic-docs/test/golden/module_structure.json +187 -0
- package/skills/a2h-module-semantic-docs/test/golden/module_understanding.json +351 -0
- package/skills/a2h-module-semantic-docs/test/golden/module_update_plan.json +495 -0
- package/skills/a2h-module-semantic-docs/test/golden/project_directory_structure.json +157 -0
- package/skills/a2h-module-semantic-docs/test/test_scan_and_commit.mjs +388 -0
- package/skills/a2h-page-specgen/SKILL.md +136 -0
- package/skills/a2h-page-specgen/references/body-language.md +177 -0
- package/skills/a2h-page-specgen/references/evidence.md +70 -0
- package/skills/a2h-page-specgen/references/execution-model.md +255 -0
- package/skills/a2h-page-specgen/references/footprint-and-grouping.md +250 -0
- package/skills/a2h-page-specgen/references/gates.md +255 -0
- package/skills/a2h-page-specgen/references/page-inventory.md +173 -0
- package/skills/a2h-page-specgen/references/spec-template.md +207 -0
- package/skills/a2h-page-specgen/scripts/dispatch.mjs +209 -0
- package/skills/a2h-page-specgen/scripts/facts-build.mjs +1504 -0
- package/skills/a2h-page-specgen/scripts/finalize.mjs +422 -0
- package/skills/a2h-page-specgen/scripts/footprint.mjs +1528 -0
- package/skills/a2h-page-specgen/scripts/gate.mjs +558 -0
- package/skills/a2h-page-specgen/scripts/interactions.mjs +137 -0
- package/skills/a2h-page-specgen/scripts/inventory.mjs +269 -0
- package/skills/a2h-page-specgen/scripts/lib/contracts.mjs +255 -0
- package/skills/a2h-page-specgen/scripts/lib/deps-source.mjs +399 -0
- package/skills/a2h-page-specgen/scripts/lib/draft-store.mjs +137 -0
- package/skills/a2h-page-specgen/scripts/lib/footprint-roles.mjs +278 -0
- package/skills/a2h-page-specgen/scripts/lib/fsx.mjs +79 -0
- package/skills/a2h-page-specgen/scripts/lib/hg.mjs +175 -0
- package/skills/a2h-page-specgen/scripts/lib/ledger.mjs +355 -0
- package/skills/a2h-page-specgen/scripts/lib/prose.mjs +234 -0
- package/skills/a2h-page-specgen/scripts/lib/reach.mjs +53 -0
- package/skills/a2h-page-specgen/scripts/lib/source-text.mjs +391 -0
- package/skills/a2h-page-specgen/scripts/lib/symbols.mjs +125 -0
- package/skills/a2h-page-specgen/scripts/lib/utg-io.mjs +110 -0
- package/skills/a2h-page-specgen/scripts/lib/waker-event-store.mjs +658 -0
- package/skills/a2h-page-specgen/scripts/prepare.mjs +492 -0
- package/skills/a2h-page-specgen/scripts/render.mjs +317 -0
- package/skills/a2h-page-specgen/scripts/report.mjs +7 -0
- package/skills/a2h-page-specgen/scripts/submission.mjs +532 -0
- package/skills/a2h-page-specgen/scripts/submit.mjs +79 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/README.md +77 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +590 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/cases.example.json +57 -0
- package/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +207 -0
- package/skills/a2h-page-specgen/scripts/test/dispatch.test.mjs +258 -0
- package/skills/a2h-page-specgen/scripts/test/facts.test.mjs +1164 -0
- package/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +74 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Api.kt +20 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/BothAnnotations.kt +28 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Cache.kt +7 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Comments.kt +26 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Mmkv.kt +7 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Models.kt +19 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Pair.kt +7 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Prefs.kt +9 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Room.kt +11 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Sample.kt +43 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Templates.kt +34 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Timeouts.kt +8 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/androidTest/Helper.kt +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/build.gradle.kts +16 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/i18n/en.js.txt +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/i18n/zh.js.txt +4 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/libs.versions.toml +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/package.json +10 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values/strings.xml +10 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-b+zh+Hans/strings.xml +4 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-land/strings.xml +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-night/strings.xml +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-v21/strings.xml +4 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-zh/strings.xml +4 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/test/Legacy.kt +4 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/weather.proto +11 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-container/src/AppPreferences.kt +13 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-container/src/SettingsViewModel.kt +16 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-dao/src/UserDao.kt +28 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-moko/i18n/src/commonMain/moko-resources/base/strings.xml +6 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-moko/i18n/src/commonMain/moko-resources/fil/strings.xml +6 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/res/values/arrays.xml +25 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/res/values/strings.xml +10 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/res/xml/prefs.xml +27 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/Api.java +19 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/Datastore.kt +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/Settings.java +13 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/forecast.js +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/store.js +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-receiver/src/BasePreferences.kt +13 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-receiver/src/Screen.kt +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-receiver/src/UiPreferences.kt +8 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-retrofit/src/AuthAPI.kt +26 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/AndroidManifest.xml +20 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/feature/auth/navigation/ScreenRoute.kt +8 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/pages.json +19 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/components/Widget.vue +11 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/pages/detail/detail.vue +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/pages/index/index.vue +24 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/store/userStore.js +11 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/uni_modules/uview-ui/components/u-thing.js +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp.mkdb.mjs +144 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +94 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/MainFragment.java +6 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ManyListeners.java +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/PlainActivity.java +3 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/utg/click_paths.json +28 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/utg/fold-chain/utg.json +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/utg/utg.json +34 -0
- package/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +758 -0
- package/skills/a2h-page-specgen/scripts/test/footprint-roles.test.mjs +172 -0
- package/skills/a2h-page-specgen/scripts/test/fsx.test.mjs +32 -0
- package/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +54 -0
- package/skills/a2h-page-specgen/scripts/test/gate.test.mjs +222 -0
- package/skills/a2h-page-specgen/scripts/test/helpers.mjs +54 -0
- package/skills/a2h-page-specgen/scripts/test/hg.test.mjs +171 -0
- package/skills/a2h-page-specgen/scripts/test/integration.test.mjs +301 -0
- package/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +45 -0
- package/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +139 -0
- package/skills/a2h-page-specgen/scripts/test/keys.test.mjs +774 -0
- package/skills/a2h-page-specgen/scripts/test/ledger.test.mjs +464 -0
- package/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +1011 -0
- package/skills/a2h-page-specgen/scripts/test/prepare-index.test.mjs +120 -0
- package/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +68 -0
- package/skills/a2h-page-specgen/scripts/test/prose.test.mjs +390 -0
- package/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +167 -0
- package/skills/a2h-page-specgen/scripts/test/reach.test.mjs +93 -0
- package/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +323 -0
- package/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +546 -0
- package/skills/a2h-page-specgen/scripts/test/render.test.mjs +503 -0
- package/skills/a2h-page-specgen/scripts/test/source-text.test.mjs +181 -0
- package/skills/a2h-page-specgen/scripts/test/submit.test.mjs +701 -0
- package/skills/a2h-page-specgen/scripts/test/utg-io.test.mjs +90 -0
- package/skills/a2h-page-specgen/scripts/test/waker-event-store.test.mjs +1365 -0
- package/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +1765 -0
- package/skills/a2h-page-specgen/scripts/test/waker.test.mjs +1979 -0
- package/skills/a2h-page-specgen/scripts/test/watchdog.test.mjs +313 -0
- package/skills/a2h-page-specgen/scripts/waker.mjs +1234 -0
- package/skills/a2h-page-specgen/scripts/watchdog.mjs +298 -0
- package/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +49 -51
- package/skills/a2h-resource-convert/scripts/tests/adaptive_icon.test.mjs +182 -0
- package/skills/a2h-resource-convert/scripts/tests/app_identity.test.mjs +206 -0
- package/skills/a2h-resource-convert/scripts/tests/docs_only_i18n.test.mjs +44 -0
- package/skills/a2h-spec-design-pipeline/SKILL.md +79 -78
- package/skills/a2h-spec-design-pipeline/references/coding-loop.md +51 -12
- package/skills/a2h-spec-design-pipeline/references/execution-model.md +24 -6
- package/skills/a2h-spec-design-pipeline/references/final-report-template.md +3 -2
- package/skills/a2h-spec-design-pipeline/references/initialization.md +15 -4
- package/skills/a2h-spec-design-pipeline/references/merge-queue.md +82 -41
- package/skills/a2h-spec-design-pipeline/references/resolver-prompt.md +61 -0
- package/skills/a2h-spec-design-pipeline/references/scripts.md +19 -10
- package/skills/a2h-spec-design-pipeline/references/shared-layer.md +267 -0
- package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +61 -8
- package/skills/a2h-spec-design-pipeline/references/static-defect-gate.md +62 -13
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleMeta.json +8 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleSet.json +8 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-cn.md +55 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-en.md +60 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/HttpExtraDataEmptyStringCheck.js +488 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/index.js +11 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/package.json +17 -0
- package/skills/a2h-spec-design-pipeline/scripts/branch_landed.ts +12 -38
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/evidence.mjs +40 -5
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/fold.mjs +18 -0
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/landing.mjs +74 -0
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/progress.mjs +1 -1
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/wait.mjs +1 -1
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/worktree.mjs +2 -2
- package/skills/a2h-spec-design-pipeline/scripts/dispatch.mjs +128 -5
- package/skills/a2h-spec-design-pipeline/scripts/ensure_wt_index.ts +98 -35
- package/skills/a2h-spec-design-pipeline/scripts/homecheck_scan.ts +218 -37
- package/skills/a2h-spec-design-pipeline/scripts/lib/shared_classes.ts +113 -0
- package/skills/a2h-spec-design-pipeline/scripts/lib/shared_docs.ts +202 -0
- package/skills/a2h-spec-design-pipeline/scripts/lib/wiring.ts +58 -0
- package/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +6 -7
- package/skills/a2h-spec-design-pipeline/scripts/resolve_wiring.ts +3 -0
- package/skills/a2h-spec-design-pipeline/scripts/resolver_prompt.ts +348 -0
- package/skills/a2h-spec-design-pipeline/scripts/scan_shared.ts +642 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_commands.mjs +15 -5
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_e2e.mjs +7 -2
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_evidence.mjs +104 -1
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_fold.mjs +24 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_landing.mjs +394 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_progress.mjs +24 -1
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_wait.mjs +14 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_wt_index.ts +163 -5
- package/skills/a2h-spec-design-pipeline/scripts/test_homecheck_scan.ts +15 -7
- package/skills/a2h-spec-design-pipeline/scripts/test_resolve_wiring.ts +14 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_resolver_prompt.ts +350 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_scan_shared.ts +996 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_classes.ts +80 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_docs.ts +205 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_docs.ts +121 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_e2e.ts +85 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_validate_shared_manifest.ts +720 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_wiring.ts +40 -0
- package/skills/a2h-spec-design-pipeline/scripts/validate_shared_manifest.ts +566 -0
- package/skills/a2h-spec-generate/SKILL.md +87 -21
- package/skills/a2h-spec-generate/references/batch-mode.md +78 -17
- package/skills/a2h-spec-generate/references/dispatch-watchdog.md +150 -0
- package/skills/a2h-spec-generate/references/fusion-task-contract.md +7 -0
- package/skills/a2h-spec-generate/references/review-checklist.md +1 -0
- package/skills/a2h-spec-generate/references/synthesis-rules.md +4 -2
- package/skills/a2h-spec-generate/references/worker-rules.md +6 -3
- package/skills/a2h-spec-generate/scripts/check-fused-spec.mjs +4 -5
- package/skills/a2h-spec-generate/scripts/check_spec.ts +145 -14
- package/skills/a2h-spec-generate/scripts/collect-specs.mjs +261 -19
- package/skills/a2h-spec-generate/scripts/dispatch-watch.mjs +1168 -0
- package/skills/a2h-spec-generate/scripts/feature-stem.mjs +1 -2
- package/skills/a2h-spec-generate/scripts/publish-specs.mjs +1 -2
- package/skills/a2h-spec-generate/scripts/regroup-by-page.mjs +1 -2
- package/skills/a2h-spec-generate/scripts/render-tasks.mjs +25 -46
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/build.ts +26 -27
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/component-variants.ts +3 -6
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/policy.ts +31 -32
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/traceability.ts +2 -3
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/req-model/build.ts +15 -26
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/area-facts.ts +102 -81
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/behavior-seed.ts +39 -19
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/library-evidence.ts +12 -13
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/navigation-guard.ts +363 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/task-contract.ts +35 -196
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/contracts.ts +3 -1
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/task-contract.ts +22 -96
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/tree-sitter-adapter.ts +3 -4
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/contracts.ts +1 -1
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/finalize.ts +74 -7
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/prepare.ts +51 -7
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/task.ts +42 -111
- package/skills/a2h-spec-generate/scripts/reqgen/src/requirement-scope.ts +1 -20
- package/skills/a2h-spec-generate/scripts/reqgen/src/source-index/homegraph.ts +1 -2
- package/skills/a2h-spec-generate/scripts/reqgen/src/validation/req-text.ts +3 -4
- package/skills/a2h-spec-generate/scripts/reqgen/test/control-fact-join.test.ts +50 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/control-name-uniapp.test.ts +75 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/cross-area-anchor.test.ts +256 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fixtures/fusion-run.ts +243 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fixtures/zip.ts +63 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-area-facts.test.ts +650 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-detectors.test.ts +176 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-e2e.test.ts +103 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-schema.test.ts +111 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-seed.test.ts +195 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-selfcheck.test.ts +307 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-contract.test.ts +347 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-finalize.test.ts +1948 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-library-evidence.test.ts +239 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-navigation-guard.test.ts +277 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-prepare.test.ts +844 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-scope.test.ts +339 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-selfcheck.test.ts +1253 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-spec.test.ts +608 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/model-cli-blockers.test.ts +117 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/model-scope.test.ts +411 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/model-seeds.test.ts +175 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/model-task-contract.test.ts +300 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/model-v4.test.ts +1061 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/specgen-completeness.test.ts +286 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/stagem-stored-path.test.ts +25 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/uniapp-scanner.test.ts +159 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/zip.test.ts +61 -0
- package/skills/a2h-spec-generate/test/check-fused-spec.test.mjs +879 -0
- package/skills/a2h-spec-generate/test/check-spec.test.ts +430 -0
- package/skills/a2h-spec-generate/test/collect-specs.test.mjs +811 -0
- package/skills/a2h-spec-generate/test/detect-project.test.mjs +37 -0
- package/skills/a2h-spec-generate/test/dispatch-watch.test.mjs +606 -0
- package/skills/a2h-spec-generate/test/ensure-index.test.mjs +230 -0
- package/skills/a2h-spec-generate/test/feature-stem.test.mjs +157 -0
- package/skills/a2h-spec-generate/test/fixtures/android/app/src/main/AndroidManifest.xml +3 -0
- package/skills/a2h-spec-generate/test/fixtures/android/build.gradle +3 -0
- package/skills/a2h-spec-generate/test/fixtures/android/settings.gradle +3 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/package.json +9 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/App.vue +8 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/components/MyCard.vue +9 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/feature/editor/index.vue +1 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/main.ts +6 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/manifest.json +4 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/detail/index.vue +1 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/home/index.vue +33 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/settings/index.vue +1 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages.json +23 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/services/items.ts +3 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/tsconfig.json +8 -0
- package/skills/a2h-spec-generate/test/fixtures/unknown/README.txt +1 -0
- package/skills/a2h-spec-generate/test/inspect-uniapp.test.mjs +54 -0
- package/skills/a2h-spec-generate/test/prepare-facts.test.mjs +41 -0
- package/skills/a2h-spec-generate/test/publication-verdict.test.mjs +182 -0
- package/skills/a2h-spec-generate/test/publish-specs.test.mjs +295 -0
- package/skills/a2h-spec-generate/test/regroup-by-page.test.mjs +354 -0
- package/skills/a2h-spec-generate/test/render-tasks.test.mjs +596 -0
- package/skills/a2h-spec-generate/test/report.test.mjs +47 -0
- package/skills/a2h-utg-explorer/references/architecture.md +4 -0
- package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +64 -80
- package/skills/a2h-utg-explorer/scripts/hint_check.mjs +1 -2
- package/skills/a2h-utg-explorer/scripts/recover.mjs +1 -1
- package/skills/a2h-utg-explorer/scripts/rejudge.mjs +5 -3
- package/skills/a2h-utg-explorer/scripts/tests/attest.test.mjs +66 -0
- package/skills/a2h-utg-explorer/scripts/tests/calendar_round_fixes.test.mjs +244 -0
- package/skills/a2h-utg-explorer/scripts/tests/chain.test.mjs +45 -0
- package/skills/a2h-utg-explorer/scripts/tests/compose_identity.test.mjs +302 -0
- package/skills/a2h-utg-explorer/scripts/tests/content_wait.test.mjs +207 -0
- package/skills/a2h-utg-explorer/scripts/tests/coverage_rules.test.mjs +104 -0
- package/skills/a2h-utg-explorer/scripts/tests/d_prereqs.test.mjs +231 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_health.test.mjs +160 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_locale_identity.test.mjs +77 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_lock_retry.test.mjs +187 -0
- package/skills/a2h-utg-explorer/scripts/tests/direct_launch.test.mjs +130 -0
- package/skills/a2h-utg-explorer/scripts/tests/explorer_review_fixes.test.mjs +137 -0
- package/skills/a2h-utg-explorer/scripts/tests/final_utg.test.mjs +135 -0
- package/skills/a2h-utg-explorer/scripts/tests/first_round_phases.test.mjs +16 -0
- package/skills/a2h-utg-explorer/scripts/tests/fresh_state_plan.test.mjs +78 -0
- package/skills/a2h-utg-explorer/scripts/tests/generalization_fixes.test.mjs +252 -0
- package/skills/a2h-utg-explorer/scripts/tests/hint_check.test.mjs +129 -0
- package/skills/a2h-utg-explorer/scripts/tests/holds_without_data_parity.test.mjs +26 -0
- package/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +492 -0
- package/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +199 -0
- package/skills/a2h-utg-explorer/scripts/tests/launch_failure.test.mjs +40 -0
- package/skills/a2h-utg-explorer/scripts/tests/node_coverage.test.mjs +193 -0
- package/skills/a2h-utg-explorer/scripts/tests/overflow_prefix.test.mjs +327 -0
- package/skills/a2h-utg-explorer/scripts/tests/overlay_identity.test.mjs +204 -0
- package/skills/a2h-utg-explorer/scripts/tests/page_identity_tiers.test.mjs +393 -0
- package/skills/a2h-utg-explorer/scripts/tests/pager_navigation.test.mjs +119 -0
- package/skills/a2h-utg-explorer/scripts/tests/panel_routes.test.mjs +208 -0
- package/skills/a2h-utg-explorer/scripts/tests/pipeline.test.mjs +240 -0
- package/skills/a2h-utg-explorer/scripts/tests/recover.test.mjs +212 -0
- package/skills/a2h-utg-explorer/scripts/tests/recover_b.test.mjs +173 -0
- package/skills/a2h-utg-explorer/scripts/tests/recover_d.test.mjs +280 -0
- package/skills/a2h-utg-explorer/scripts/tests/review_fixes.test.mjs +213 -0
- package/skills/a2h-utg-explorer/scripts/tests/robustness_fixes.test.mjs +345 -0
- package/skills/a2h-utg-explorer/scripts/tests/run_cycle.test.mjs +454 -0
- package/skills/a2h-utg-explorer/scripts/tests/runner_capabilities.test.mjs +194 -0
- package/skills/a2h-utg-explorer/scripts/tests/scope.test.mjs +229 -0
- package/skills/a2h-utg-explorer/scripts/tests/scroll_sweep.test.mjs +336 -0
- package/skills/a2h-utg-explorer/scripts/tests/semantics.test.mjs +102 -0
- package/skills/a2h-utg-explorer/scripts/tests/snapshot_integrity.test.mjs +142 -0
- package/skills/a2h-utg-explorer/scripts/tests/state_ambiguity.test.mjs +92 -0
- package/skills/a2h-utg-explorer/scripts/tests/string_tables_twin_ties.test.mjs +83 -0
- package/skills/a2h-utg-explorer/scripts/tests/tar_fixture.mjs +12 -0
- package/skills/a2h-utg-explorer/scripts/tests/twin_opener.test.mjs +119 -0
- package/skills/a2h-utg-explorer/scripts/tests/u2_backend.test.mjs +346 -0
- package/skills/a2h-utg-explorer/scripts/tests/ui_state_anchors.test.mjs +112 -0
- package/skills/a2h-utg-explorer/scripts/tests/variant_strings.test.mjs +63 -0
- package/skills/a2h-utg-explorer/scripts/tests/worklist_parts.test.mjs +24 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/adapters.mjs +13 -3
- package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +107 -65
- package/skills/a2h-utg-explorer/scripts/utg_explorer/strings.mjs +155 -0
- package/skills/a2h-utg-static/scripts/assemble.mjs +28 -3
- package/skills/a2h-utg-static/scripts/click_paths.mjs +19 -20
- package/skills/a2h-utg-static/scripts/compose_overlay.mjs +102 -2
- package/skills/a2h-utg-static/scripts/fragment_nav.mjs +2 -3
- package/skills/a2h-utg-static/scripts/nl_hints.mjs +2 -3
- package/skills/a2h-utg-static/scripts/presenter_nav.mjs +1 -2
- package/skills/a2h-utg-static/scripts/route_interceptor.mjs +21 -7
- package/skills/a2h-utg-static/scripts/static_prior.mjs +26 -29
- package/skills/a2h-utg-static/scripts/tests/test_activity_gates.mjs +84 -0
- package/skills/a2h-utg-static/scripts/tests/test_login_interceptor.mjs +38 -0
- package/skills/a2h-utg-static/scripts/tests/test_route_token_words.mjs +29 -1
- package/skills/a2h-app-migrate/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-app-migrate/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-arch-generate/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-arch-generate/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-arkts-logic-coder/scripts/design/i18n-term.d.mts +0 -5
- package/skills/a2h-arkts-logic-coder/scripts/design/i18n-term.mjs +0 -54
- package/skills/a2h-batch-ui-align/references/source-only-tier.md +0 -38
- package/skills/a2h-batch-ui-align/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-batch-ui-align/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-dashboard-render/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-dashboard-render/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-resource-convert/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-resource-convert/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-spec-design-pipeline/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-spec-design-pipeline/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-spec-design-pipeline/scripts/test_i18n_term.ts +0 -70
- package/skills/a2h-spec-generate/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-spec-generate/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-spec-generate/scripts/reqgen/src/i18n-term.d.mts +0 -5
- package/skills/a2h-spec-generate/scripts/reqgen/src/i18n-term.mjs +0 -54
- package/skills/a2h-utg-explorer/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-utg-explorer/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-utg-static/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-utg-static/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-utg-static/scripts/tests/test_i18n_term.mjs +0 -155
|
@@ -13,14 +13,16 @@
|
|
|
13
13
|
* per-process string hash), the JS order is the node order of the capture.
|
|
14
14
|
*/
|
|
15
15
|
import {
|
|
16
|
-
get, truthy, pyStr,
|
|
16
|
+
get, truthy, pyStr, pyStrip, sortedStr, sortedBy, pyMax, pyRe, reEscape,
|
|
17
17
|
pathStr, pJoin, pResolve, pIsFile, pIsDir, pSuffix, pName, pParent, pParents, pStem, pGlob,
|
|
18
18
|
pOrder, pKey, pRelativeParts, pIsRelativeTo, etParse, XmlParseError, readText, dset, reFindall,
|
|
19
19
|
} from './_py.mjs';
|
|
20
|
+
import { normalized, androidValue, decodeAndroidString, valuesDirRank, loadStringTables, deviceTextsIn, MAX_DEVICE_TEXTS } from './strings.mjs';
|
|
21
|
+
|
|
22
|
+
export { normalized, androidValue, decodeAndroidString, valuesDirRank, MAX_DEVICE_TEXTS };
|
|
20
23
|
|
|
21
24
|
export const ANDROID = '{http://schemas.android.com/apk/res/android}';
|
|
22
25
|
|
|
23
|
-
const WS_RUN = pyRe('\\s+', 'g');
|
|
24
26
|
const S = (v) => pyStr(v);
|
|
25
27
|
const g = (o, k, d = null) => get(o, k, d);
|
|
26
28
|
const vis = (n) => truthy(g(n, 'visible', true));
|
|
@@ -34,12 +36,6 @@ const parentOf = (n) => { const p = g(n, 'parent_index'); return p === undefined
|
|
|
34
36
|
/** A text input (EditText and subclasses, AutoCompleteTextView, SearchView's SearchAutoComplete): its text is the user's. */
|
|
35
37
|
export const isInputNode = (n) => /(?:EditText|AutoCompleteTextView|SearchAutoComplete)$/.test(S(g(n, 'class', '')));
|
|
36
38
|
|
|
37
|
-
/** normalized(text): NFKC, whitespace runs -> ' ', strip, then rstrip('.…'). */
|
|
38
|
-
export function normalized(text) {
|
|
39
|
-
const s = S(truthy(text) ? text : '');
|
|
40
|
-
return pyRstrip(pyStrip(nfkc(s).replace(WS_RUN, ' ')), '.…');
|
|
41
|
-
}
|
|
42
|
-
|
|
43
39
|
const isBuildPath = (p, project) => (pRelativeParts(p, project) ?? []).includes('build');
|
|
44
40
|
|
|
45
41
|
/**
|
|
@@ -54,49 +50,6 @@ export function androidUnescape(value) {
|
|
|
54
50
|
});
|
|
55
51
|
}
|
|
56
52
|
|
|
57
|
-
/**
|
|
58
|
-
* aapt's one pass over an (already entity-decoded, markup-free) strings.xml value: an unescaped
|
|
59
|
-
* `"` toggles a quoted run and is dropped (`Tap "OK" now` shows `Tap OK now`); outside quotes
|
|
60
|
-
* whitespace runs collapse to one space and the ends are trimmed; a backslash escape is always
|
|
61
|
-
* literal (`"C:\\"` shows `C:\`). Same rule as a2h-utg-static label_resolve.aaptText (a test
|
|
62
|
-
* compares the two), so the explorer catalog and the static UTG read every value alike.
|
|
63
|
-
*/
|
|
64
|
-
export function androidValue(value) {
|
|
65
|
-
const s = S(value);
|
|
66
|
-
let out = ''; let quoted = false; let space = false;
|
|
67
|
-
for (let i = 0; i < s.length; i++) {
|
|
68
|
-
const c = s[i];
|
|
69
|
-
if (c === '\\' && i + 1 < s.length) {
|
|
70
|
-
const u = /^u([0-9a-fA-F]{4})/.exec(s.slice(i + 1, i + 6));
|
|
71
|
-
if (u) { out += String.fromCharCode(parseInt(u[1], 16)); i += 5; }
|
|
72
|
-
else { const d = s[i + 1]; out += d === 'n' ? '\n' : d === 't' ? '\t' : d; i += 1; }
|
|
73
|
-
space = false;
|
|
74
|
-
} else if (c === '"') {
|
|
75
|
-
quoted = !quoted;
|
|
76
|
-
} else if (!quoted && /\s/.test(c)) {
|
|
77
|
-
if (out && !space) { out += ' '; space = true; }
|
|
78
|
-
} else {
|
|
79
|
-
out += c; space = false;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return space ? out.slice(0, -1) : out;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
const _XML_ENTITY = { amp: '&', lt: '<', gt: '>', quot: '"', apos: "'" };
|
|
86
|
-
|
|
87
|
-
/** A raw strings.xml value (CDATA, inline markup, entities) as aapt renders it. */
|
|
88
|
-
export function decodeAndroidString(raw) {
|
|
89
|
-
// one pass: CDATA content is literal text, untouched by the markup strip and entity decoding
|
|
90
|
-
const s = S(raw).replace(/<!\[CDATA\[([\s\S]*?)\]\]>|<[^>]*>|&(#x[0-9a-fA-F]+|#\d+|amp|lt|gt|quot|apos);/g, (m, cdata, e) => {
|
|
91
|
-
if (cdata !== undefined) { return cdata; }
|
|
92
|
-
if (e === undefined) { return ''; }
|
|
93
|
-
if (e[0] !== '#') { return _XML_ENTITY[e]; }
|
|
94
|
-
const cp = e[1] === 'x' ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10);
|
|
95
|
-
return Number.isFinite(cp) && cp >= 0 && cp <= 0x10ffff ? String.fromCodePoint(cp) : m;
|
|
96
|
-
});
|
|
97
|
-
return androidValue(s);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
53
|
/** build_catalog(graph, project=None, locale='en'). */
|
|
101
54
|
const _STRING_ROW = /<string\s+name="([^"]+)"[^>]*>([\s\S]*?)<\/string>/g;
|
|
102
55
|
|
|
@@ -130,6 +83,18 @@ export function _variantOverrides(project) {
|
|
|
130
83
|
return out;
|
|
131
84
|
}
|
|
132
85
|
|
|
86
|
+
/**
|
|
87
|
+
* deviceTextsOf(project, locale) -> (text) => [device-locale texts]. The static layer renders every
|
|
88
|
+
* text in the default / Chinese strings (a2h-utg-static loadProjectStrings skips `values-en`), while the
|
|
89
|
+
* device shows its own locale. Measured (coolmall, en device): splash "青商城" rendered "CoolMall", login
|
|
90
|
+
* "验证码登录" rendered "SMS Login"; no body anchor ever matched and 112 captures stayed unmapped.
|
|
91
|
+
* Value -> resource keys (any locale) -> the key's device-locale value; the original is kept.
|
|
92
|
+
*/
|
|
93
|
+
export function deviceTextsOf(project, locale) {
|
|
94
|
+
const tables = loadStringTables(project, locale);
|
|
95
|
+
return (t) => deviceTextsIn(tables, t);
|
|
96
|
+
}
|
|
97
|
+
|
|
133
98
|
export function buildCatalog(graph, project = null, locale = 'en') {
|
|
134
99
|
const nodes = g(graph, 'nodes', []);
|
|
135
100
|
project = truthy(project) ? pResolve(project) : null;
|
|
@@ -357,6 +322,15 @@ export function buildCatalog(graph, project = null, locale = 'en') {
|
|
|
357
322
|
}
|
|
358
323
|
}
|
|
359
324
|
}
|
|
325
|
+
// Static titles / hint titles / body texts in the device locale too (before the shared-title and
|
|
326
|
+
// unique-claim passes below, so a translation is claimed like its source text).
|
|
327
|
+
const deviceTexts = deviceTextsOf(project, locale);
|
|
328
|
+
const plus = (xs, norm) => [...new Set([...xs, ...xs.flatMap((t) => deviceTexts(t).map(norm))])];
|
|
329
|
+
for (const item of Object.values(catalog)) {
|
|
330
|
+
item.titles = plus(item.titles, (x) => x);
|
|
331
|
+
item.hint_titles = plus(item.hint_titles, (x) => x);
|
|
332
|
+
item.body_titles = plus(item.body_titles, normalized);
|
|
333
|
+
}
|
|
360
334
|
}
|
|
361
335
|
// Shared titles: a title / hint title / own body text that 2+ screens render (twins built on one
|
|
362
336
|
// scaffold: every feature's "Bookmarks" page). Not an anchor by itself -- resolvePage offers the
|
|
@@ -414,6 +388,8 @@ export function buildCatalog(graph, project = null, locale = 'en') {
|
|
|
414
388
|
}
|
|
415
389
|
}
|
|
416
390
|
for (const item of Object.values(catalog)) {
|
|
391
|
+
// every own source text, before the app-wide unique filter: _twinContrast compares twins on it
|
|
392
|
+
item.source_texts = sortedStr(new Set([...item.body_titles, ...item.titles.map(normalized), ...item.hint_titles.map(normalized)]));
|
|
417
393
|
item.body_titles = item.body_titles.filter((t) => claims.get(t) === 1 && !item.titles.map(normalized).includes(t));
|
|
418
394
|
}
|
|
419
395
|
// A prefix is an anchor only when no text or prefix of another page starts with it.
|
|
@@ -469,10 +445,11 @@ export function _overlayLeadTitleCandidates(nodes, catalog, observation) {
|
|
|
469
445
|
* _body_text_candidates(nodes, catalog, observation): pages whose own fixed source texts are on
|
|
470
446
|
* screen. The page with the most visible anchors wins; a tie is ambiguous.
|
|
471
447
|
*/
|
|
472
|
-
export function _bodyTextCandidates(nodes, catalog, observation) {
|
|
448
|
+
export function _bodyTextCandidates(nodes, catalog, observation, tabBar = null) {
|
|
473
449
|
const shown = new Set();
|
|
450
|
+
tabBar ??= _composeTabBarNodes(nodes, catalog); // resolvePage passes the set it already built
|
|
474
451
|
for (const n of nodes) {
|
|
475
|
-
if (!vis(n)) { continue; }
|
|
452
|
+
if (!vis(n) || tabBar.has(n)) { continue; }
|
|
476
453
|
for (const k of ['text', 'content_desc']) { if (truthy(g(n, k))) { shown.add(normalized(n[k])); } }
|
|
477
454
|
}
|
|
478
455
|
if (!shown.size) { return []; }
|
|
@@ -683,9 +660,19 @@ export function resolvePage(observation, catalog, configuredIdentity = null, opt
|
|
|
683
660
|
return { status: 'verified', static_id: learned[0], reason: 'learned-rule:' + rule.id,
|
|
684
661
|
anchors: rule.all.map((s) => Object.values(s)[0]) };
|
|
685
662
|
}
|
|
686
|
-
|
|
687
|
-
|
|
663
|
+
// Several learned rules at once decide nothing: the source tiers below still may. Measured
|
|
664
|
+
// (coolmall): UserAgreement / PrivacyPolicy rules ("User Agreement" / "Privacy Policy") both hit the
|
|
665
|
+
// consent line of every login and register page, and returning here left 14 captures ambiguous.
|
|
666
|
+
const learnedTie = learned.length > 1 ? learned.map((i) => ({ static_id: i, reason: 'learned-rule' })) : null;
|
|
667
|
+
const verdict = _resolveBySource(observation, nodes, catalog);
|
|
668
|
+
if (learnedTie && verdict.status !== 'verified' && !(verdict.status === 'ambiguous' && verdict.candidates.length)) {
|
|
669
|
+
return { status: 'ambiguous', candidates: learnedTie };
|
|
688
670
|
}
|
|
671
|
+
return verdict;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
/** resolvePage's source-anchor tiers (after configured and learned rules). */
|
|
675
|
+
function _resolveBySource(observation, nodes, catalog) {
|
|
689
676
|
const rid = (n) => S(g(n, 'resource_id', ''));
|
|
690
677
|
const modalTitles = textSet(nodes, (n) => ['alertTitle', 'dialog_title'].includes(tail(rid(n))));
|
|
691
678
|
const frameworkRows = textSet(nodes, (n) => tail(rid(n)) === 'title' && rid(n).endsWith(':id/title'));
|
|
@@ -701,7 +688,8 @@ export function resolvePage(observation, catalog, configuredIdentity = null, opt
|
|
|
701
688
|
}
|
|
702
689
|
return false;
|
|
703
690
|
};
|
|
704
|
-
const
|
|
691
|
+
const tabBar = _composeTabBarNodes(nodes, catalog);
|
|
692
|
+
const bodyText = textSet(nodes, (n) => !inNavBar(n) && !tabBar.has(n) && !endsWithAny(S(g(n, 'class', '')), ['.Button', 'MaterialButton', 'ImageButton']));
|
|
705
693
|
const prefRows = frameworkRows.size >= 2 ? frameworkRows : bodyText;
|
|
706
694
|
let candidates = []; let weakBody = null;
|
|
707
695
|
if (modalTitles.size) {
|
|
@@ -738,7 +726,7 @@ export function resolvePage(observation, catalog, configuredIdentity = null, opt
|
|
|
738
726
|
if (!candidates.length) { candidates = _ownWidgetCandidates(nodes, catalog, observation); }
|
|
739
727
|
if (!candidates.length) { candidates = _overlayLeadTitleCandidates(nodes, catalog, observation); }
|
|
740
728
|
if (!candidates.length) {
|
|
741
|
-
candidates = _bodyTextCandidates(nodes, catalog, observation);
|
|
729
|
+
candidates = _bodyTextCandidates(nodes, catalog, observation, tabBar);
|
|
742
730
|
if (candidates.length === 1 && candidates[0].weak) {
|
|
743
731
|
weakBody = candidates[0].weak; candidates = [];
|
|
744
732
|
}
|
|
@@ -759,7 +747,7 @@ export function resolvePage(observation, catalog, configuredIdentity = null, opt
|
|
|
759
747
|
const twins = _sharedTitleCandidates(nodes, catalog, observation);
|
|
760
748
|
const ids = new Set(twins.map((c) => c.static_id));
|
|
761
749
|
if (twins.length >= 2 && !(weakBody || []).some((c) => ids.has(g(c, 'static_id')))) {
|
|
762
|
-
return { status: 'ambiguous', candidates: twins };
|
|
750
|
+
return _twinContrast(nodes, twins, catalog) ?? { status: 'ambiguous', candidates: twins };
|
|
763
751
|
}
|
|
764
752
|
}
|
|
765
753
|
if (candidates.length === 1) { return { status: 'verified', ...candidates[0] }; }
|
|
@@ -857,6 +845,36 @@ export function _sharedTitleCandidates(nodes, catalog, observation) {
|
|
|
857
845
|
.map((i) => ({ static_id: i, reason: 'shared-title-twin', anchors }));
|
|
858
846
|
}
|
|
859
847
|
|
|
848
|
+
/** Texts on screen that tell shared-title twins apart: at least this many, or one this long. */
|
|
849
|
+
export const TWIN_CONTRAST_MIN = 2;
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* Shared-title twins told apart among THEMSELVES. The app-wide unique filter drops a text every
|
|
853
|
+
* feature's index page renders ("收藏列表", "阅读更多"), so it never anchored the index -- yet among
|
|
854
|
+
* one feature's twins (index / read / show built on one shared panel) only the index renders it.
|
|
855
|
+
* Measured (jingmo): 7 groups (成语, 歌词, 诗歌, 谚语, 句子, 诗文名句, 诗文) stayed ambiguous this way.
|
|
856
|
+
* A twin is chosen only when TWIN_CONTRAST_MIN shown texts (or one of BODY_ANCHOR_MIN_CHARS) are in its
|
|
857
|
+
* source and in no other candidate's, and no other candidate qualifies the same way.
|
|
858
|
+
* Null when that does not single one out: the opener rule then decides.
|
|
859
|
+
*/
|
|
860
|
+
export function _twinContrast(nodes, twins, catalog) {
|
|
861
|
+
const shown = new Set();
|
|
862
|
+
for (const n of nodes) {
|
|
863
|
+
if (!vis(n)) { continue; }
|
|
864
|
+
for (const k of ['text', 'content_desc']) { if (truthy(g(n, k))) { shown.add(normalized(n[k])); } }
|
|
865
|
+
}
|
|
866
|
+
const texts = new Map(twins.map((c) => [c.static_id, new Set(g(g(catalog, c.static_id, {}), 'source_texts', []) || [])]));
|
|
867
|
+
const fits = [];
|
|
868
|
+
for (const c of twins) {
|
|
869
|
+
const own = [...shown].filter((t) => texts.get(c.static_id).has(t)
|
|
870
|
+
&& twins.every((o) => o.static_id === c.static_id || !texts.get(o.static_id).has(t)));
|
|
871
|
+
if (own.length >= TWIN_CONTRAST_MIN || own.some((t) => [...t].length >= BODY_ANCHOR_MIN_CHARS)) {
|
|
872
|
+
fits.push({ ...c, reason: 'twin-contrast', anchors: sortedStr(new Set([...(g(c, 'anchors', []) || []), ...own])) });
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
return fits.length === 1 ? { status: 'verified', ...fits[0] } : null;
|
|
876
|
+
}
|
|
877
|
+
|
|
860
878
|
/** Bar titles on screen: a TextView in a Toolbar (3 levels) or a Compose top bar title. */
|
|
861
879
|
function _barTitles(nodes) {
|
|
862
880
|
const inToolbar = (n) => {
|
|
@@ -1010,23 +1028,47 @@ export const TAB_BAR_MIN_LABELS = 3;
|
|
|
1010
1028
|
* unmapped. Among the pages titled that way, pager pages win: the standalone route sharing the
|
|
1011
1029
|
* title (compose-route:Cart, with a back icon) does not show the tab row.
|
|
1012
1030
|
*/
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1031
|
+
/** Text nodes of the bottom tab row: ≥ TAB_BAR_MIN_LABELS labels on one line, outside any scroller. */
|
|
1032
|
+
export function _bottomTabRow(nodes) {
|
|
1033
|
+
const [, height] = _extent(nodes);
|
|
1034
|
+
if (!(height > 0)) { return []; }
|
|
1016
1035
|
const free = (n) => {
|
|
1017
1036
|
let idx = parentOf(n);
|
|
1018
1037
|
for (let k = 0; k < 8 && inRange(idx, nodes); k++) { if (truthy(g(nodes[idx], 'scrollable'))) { return false; } idx = parentOf(nodes[idx]); }
|
|
1019
1038
|
return true;
|
|
1020
1039
|
};
|
|
1021
|
-
const texts = nodes.filter((n) => vis(n) && truthy(g(n, 'text')) && bnds(n).length === 4);
|
|
1022
1040
|
// The tab row sits outside the pager; the title is the page's own, inside the (scrollable) pager.
|
|
1023
|
-
const bottom =
|
|
1041
|
+
const bottom = nodes.filter((n) => vis(n) && truthy(g(n, 'text')) && bnds(n).length === 4
|
|
1042
|
+
&& bnds(n)[1] >= (1 - TOP_BAR_BAND) * height && free(n));
|
|
1024
1043
|
const mid = (n) => (bnds(n)[1] + bnds(n)[3]) / 2;
|
|
1025
|
-
const
|
|
1044
|
+
const out = new Set();
|
|
1026
1045
|
for (const n of bottom) {
|
|
1027
1046
|
const row = bottom.filter((c) => Math.abs(mid(c) - mid(n)) <= 0.01 * height);
|
|
1028
|
-
if (row.length >= TAB_BAR_MIN_LABELS) { row.forEach((c) =>
|
|
1047
|
+
if (row.length >= TAB_BAR_MIN_LABELS) { row.forEach((c) => out.add(c)); }
|
|
1029
1048
|
}
|
|
1049
|
+
return [...out];
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
/**
|
|
1053
|
+
* The bottom tab row's nodes when at least two of its labels are catalog tab labels: a Compose
|
|
1054
|
+
* NavigationBar, which inNavBar (View classes) cannot see. Measured (CoolMall 11-07): its 「购物车」
|
|
1055
|
+
* label counted as body text of GoodsRoutes.Detail, so the reached Category tab verified as the goods
|
|
1056
|
+
* page and neither exact-page nor attestedArrival held. A goods page's own bottom bar
|
|
1057
|
+
* (购物车 / 加入购物车 / 立即购买) shares at most one tab label and stays body text.
|
|
1058
|
+
*/
|
|
1059
|
+
export function _composeTabBarNodes(nodes, catalog) {
|
|
1060
|
+
const labels = new Set(Object.values(catalog).map((p) => g(p, 'tab_label')).filter((t) => truthy(t)).map(normalized));
|
|
1061
|
+
if (labels.size < 2) { return new Set(); }
|
|
1062
|
+
const row = _bottomTabRow(nodes);
|
|
1063
|
+
const known = row.filter((n) => labels.has(normalized(n.text)));
|
|
1064
|
+
return known.length >= 2 ? new Set(row) : new Set();
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
export function _tabTitleCandidates(nodes, catalog, observation) {
|
|
1068
|
+
const [width, height] = _extent(nodes);
|
|
1069
|
+
if (!(width > 0 && height > 0)) { return []; }
|
|
1070
|
+
const texts = nodes.filter((n) => vis(n) && truthy(g(n, 'text')) && bnds(n).length === 4);
|
|
1071
|
+
const tabs = new Set(_bottomTabRow(nodes).map((c) => normalized(c.text)));
|
|
1030
1072
|
if (!tabs.size) { return []; }
|
|
1031
1073
|
const titles = new Set(texts.filter((n) => bnds(n)[3] <= TOP_BAR_BAND * height
|
|
1032
1074
|
&& Math.abs((bnds(n)[0] + bnds(n)[2]) / 2 - width / 2) <= CENTERED_TITLE_TOLERANCE * width)
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* strings.mjs — the app's string resources as the device shows them. Shared by compile_tasks
|
|
3
|
+
* (tap selectors) and semantics (catalog anchors), so both read one strings.xml value alike:
|
|
4
|
+
* one scan scope, one decoding (aapt's), one comparison key, one rule for which file wins a key.
|
|
5
|
+
*
|
|
6
|
+
* Exports: normalized, androidValue, decodeAndroidString, valuesDirRank, sourceSetOf, stringFiles,
|
|
7
|
+
* loadStringTables, deviceTextsIn, MAX_DEVICE_TEXTS
|
|
8
|
+
*/
|
|
9
|
+
import * as fs from 'node:fs';
|
|
10
|
+
import * as path from 'node:path';
|
|
11
|
+
import { pyStr, nfkc, pyStrip, pyRstrip, pyRe, sortedStr, cmpStr, truthy } from './_py.mjs';
|
|
12
|
+
|
|
13
|
+
const S = (v) => pyStr(v);
|
|
14
|
+
const WS_RUN = pyRe('\\s+', 'g');
|
|
15
|
+
|
|
16
|
+
/** normalized(text): NFKC, whitespace runs -> ' ', strip, then rstrip('.…'). */
|
|
17
|
+
export function normalized(text) {
|
|
18
|
+
const s = S(truthy(text) ? text : '');
|
|
19
|
+
return pyRstrip(pyStrip(nfkc(s).replace(WS_RUN, ' ')), '.…');
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* aapt's one pass over an (already entity-decoded, markup-free) strings.xml value: an unescaped
|
|
24
|
+
* `"` toggles a quoted run and is dropped (`Tap "OK" now` shows `Tap OK now`); outside quotes
|
|
25
|
+
* whitespace runs collapse to one space and the ends are trimmed; a backslash escape is always
|
|
26
|
+
* literal (`"C:\\"` shows `C:\`). Same rule as a2h-utg-static label_resolve.aaptText (a test
|
|
27
|
+
* compares the two), so the explorer catalog and the static UTG read every value alike.
|
|
28
|
+
*/
|
|
29
|
+
export function androidValue(value) {
|
|
30
|
+
const s = S(value);
|
|
31
|
+
let out = ''; let quoted = false; let space = false;
|
|
32
|
+
for (let i = 0; i < s.length; i++) {
|
|
33
|
+
const c = s[i];
|
|
34
|
+
if (c === '\\' && i + 1 < s.length) {
|
|
35
|
+
const u = /^u([0-9a-fA-F]{4})/.exec(s.slice(i + 1, i + 6));
|
|
36
|
+
if (u) { out += String.fromCharCode(parseInt(u[1], 16)); i += 5; }
|
|
37
|
+
else { const d = s[i + 1]; out += d === 'n' ? '\n' : d === 't' ? '\t' : d; i += 1; }
|
|
38
|
+
space = false;
|
|
39
|
+
} else if (c === '"') {
|
|
40
|
+
quoted = !quoted;
|
|
41
|
+
} else if (!quoted && /\s/.test(c)) {
|
|
42
|
+
if (out && !space) { out += ' '; space = true; }
|
|
43
|
+
} else {
|
|
44
|
+
out += c; space = false;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return space ? out.slice(0, -1) : out;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const _XML_ENTITY = { amp: '&', lt: '<', gt: '>', quot: '"', apos: "'" };
|
|
51
|
+
|
|
52
|
+
/** A raw strings.xml value (CDATA, inline markup, entities) as aapt renders it. */
|
|
53
|
+
export function decodeAndroidString(raw) {
|
|
54
|
+
// one pass: CDATA content is literal text, untouched by the markup strip and entity decoding
|
|
55
|
+
const s = S(raw).replace(/<!\[CDATA\[([\s\S]*?)\]\]>|<[^>]*>|&(#x[0-9a-fA-F]+|#\d+|amp|lt|gt|quot|apos);/g, (m, cdata, e) => {
|
|
56
|
+
if (cdata !== undefined) { return cdata; }
|
|
57
|
+
if (e === undefined) { return ''; }
|
|
58
|
+
if (e[0] !== '#') { return _XML_ENTITY[e]; }
|
|
59
|
+
const cp = e[1] === 'x' ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10);
|
|
60
|
+
return Number.isFinite(cp) && cp >= 0 && cp <= 0x10ffff ? String.fromCodePoint(cp) : m;
|
|
61
|
+
});
|
|
62
|
+
return androidValue(s);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** Locale rank of a `values[-qualifiers]` dir for `locale`: 2 lang+region, 1 lang, 0 neutral, -1 other language. */
|
|
66
|
+
export function valuesDirRank(dirName, locale) {
|
|
67
|
+
const [lang, region] = S(locale).replaceAll('_', '-').split('-');
|
|
68
|
+
const quals = S(dirName).split('-').slice(1);
|
|
69
|
+
let qLang = null; let qRegion = null;
|
|
70
|
+
if (quals[0] && quals[0].startsWith('b+')) {
|
|
71
|
+
const p = quals[0].split('+'); qLang = p[1] ?? null; qRegion = p[2] ?? null;
|
|
72
|
+
} else if (quals[0] && /^[a-z]{2,3}$/.test(quals[0])) {
|
|
73
|
+
qLang = quals[0];
|
|
74
|
+
if (quals[1] && /^r[A-Z]{2}$/.test(quals[1])) { qRegion = quals[1].slice(1); }
|
|
75
|
+
}
|
|
76
|
+
if (qLang === null) { return 0; }
|
|
77
|
+
if (qLang.toLowerCase() !== S(lang).toLowerCase()) { return -1; }
|
|
78
|
+
if (qRegion === null) { return 1; }
|
|
79
|
+
return region && qRegion.toUpperCase() === region.toUpperCase() ? 2 : -1;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** The Gradle source set a `res/values*` dir belongs to (`.../src/<set>/res/...`); `main` outside `src/`. */
|
|
83
|
+
export function sourceSetOf(valuesDir) {
|
|
84
|
+
const parts = S(valuesDir).split(/[\\/]+/);
|
|
85
|
+
const i = parts.lastIndexOf('res');
|
|
86
|
+
return i >= 2 && parts[i - 2] === 'src' ? parts[i - 1] : 'main';
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const _PRUNE_DIRS = new Set(['build', '.git', '.gradle', '.idea', 'node_modules', 'test', 'androidTest', '.cxx']);
|
|
90
|
+
|
|
91
|
+
/** Every res/values*\/*.xml under `project` (build / test source sets pruned) -> [[valuesDir, file]], path order. */
|
|
92
|
+
export function stringFiles(project) {
|
|
93
|
+
const out = []; const stack = [S(project)];
|
|
94
|
+
while (stack.length) {
|
|
95
|
+
const cur = stack.pop();
|
|
96
|
+
let entries;
|
|
97
|
+
try { entries = fs.readdirSync(cur, { withFileTypes: true }); } catch { continue; }
|
|
98
|
+
const isValues = path.basename(cur).startsWith('values') && path.basename(path.dirname(cur)) === 'res';
|
|
99
|
+
for (const e of entries) {
|
|
100
|
+
if (e.isDirectory()) { if (!_PRUNE_DIRS.has(e.name)) { stack.push(path.join(cur, e.name)); } }
|
|
101
|
+
else if (isValues && e.name.endsWith('.xml')) { out.push([cur, path.join(cur, e.name)]); }
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return out.sort((a, b) => cmpStr(a[1], b[1]));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const _STRING_EL = /<string\s+name="([^"]+)"[^>]*>([\s\S]*?)<\/string>/g;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* loadStringTables(project, locale) -> {device: Map(key -> device-locale value), keysByValue:
|
|
111
|
+
* Map(normalized value in any locale -> Set(keys))}. Which file gives a key its device value: the
|
|
112
|
+
* best locale rank (valuesDirRank); at equal rank the `main` source set, which every build variant
|
|
113
|
+
* shares (a variant's own value is added by semantics._variantOverrides); between two other source
|
|
114
|
+
* sets, the first in path order. Never the scan order.
|
|
115
|
+
*/
|
|
116
|
+
export function loadStringTables(project, locale) {
|
|
117
|
+
const device = new Map(); const best = new Map(); const keysByValue = new Map();
|
|
118
|
+
if (!truthy(project)) { return { device, keysByValue }; }
|
|
119
|
+
for (const [dir, file] of stringFiles(project)) {
|
|
120
|
+
const r = valuesDirRank(path.basename(dir), locale);
|
|
121
|
+
const score = r < 0 ? -1 : 2 * r + (sourceSetOf(dir) === 'main' ? 1 : 0);
|
|
122
|
+
let text;
|
|
123
|
+
try { text = fs.readFileSync(file, 'utf8'); } catch { continue; }
|
|
124
|
+
for (const m of text.matchAll(_STRING_EL)) {
|
|
125
|
+
const key = m[1]; const value = decodeAndroidString(m[2]).trim();
|
|
126
|
+
if (!value) { continue; }
|
|
127
|
+
const nv = normalized(value);
|
|
128
|
+
if (!keysByValue.has(nv)) { keysByValue.set(nv, new Set()); }
|
|
129
|
+
keysByValue.get(nv).add(key);
|
|
130
|
+
if (score >= 0 && score > (best.get(key) ?? -1)) { device.set(key, value); best.set(key, score); }
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return { device, keysByValue };
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** Most device-locale texts one source text may stand for (a value several keys share). */
|
|
137
|
+
export const MAX_DEVICE_TEXTS = 3;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* deviceTextsIn(tables, text, keys=[]) -> the device-locale text(s) of `text` written in any app
|
|
141
|
+
* locale, never `text` itself. A known resource key of that value is exact. Otherwise every key
|
|
142
|
+
* carrying the value is a candidate; when they translate differently all (at most
|
|
143
|
+
* MAX_DEVICE_TEXTS) are returned, beyond that none.
|
|
144
|
+
*/
|
|
145
|
+
export function deviceTextsIn(tables, text, keys = []) {
|
|
146
|
+
const nt = normalized(text);
|
|
147
|
+
const owners = tables.keysByValue.get(nt);
|
|
148
|
+
if (!owners) { return []; }
|
|
149
|
+
const out = [];
|
|
150
|
+
const push = (k) => { const d = tables.device.get(k); if (truthy(d) && normalized(d) !== nt && !out.includes(d)) { out.push(d); } };
|
|
151
|
+
for (const k of keys) { if (truthy(k) && owners.has(S(k))) { push(S(k)); } }
|
|
152
|
+
if (out.length) { return out; }
|
|
153
|
+
for (const k of sortedStr(owners)) { push(k); }
|
|
154
|
+
return out.length <= MAX_DEVICE_TEXTS ? out : [];
|
|
155
|
+
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* Exports:
|
|
10
10
|
* HERE _LOGIN_TEST_RE _FUN_DECL_RE load sid _SOURCE_CALLSITE _compressSourcePath slug _GUARD_KINDS
|
|
11
11
|
* normalizeGuard _inferGuardKind _INSTANCE_ROUTE_SUFFIXES _PAY_ROUTE_TOKENS _ENV_ROUTE_TOKENS
|
|
12
|
-
* _LOGIN_ROUTE_TOKENS _identWords _hasToken _cjk _CODE_NAME_TAIL_A _isCodeName _isScreenText
|
|
12
|
+
* _LOGIN_ROUTE_TOKENS _AUTH_ENTRY_ROUTE_TOKENS _isAuthEntryRoute _identWords _hasToken _cjk _CODE_NAME_TAIL_A _isCodeName _isScreenText
|
|
13
13
|
* _buildFnDeclarationIndex(-> Map name -> [path, offset]) _TOOLBAR_TAG_RE _XML_TITLE_ATTR_RE
|
|
14
14
|
* _XML_TEXT_ATTR_RE _STRING_REF_RE_A _resolveXmlString _findLayoutFiles(-> Map) _layoutTitle
|
|
15
15
|
* _viewOwnTitle _BARE_LAYOUT_TAGS _LAYOUT_HOST_TAGS _XML_TAG_RE _isBareContainerLayout
|
|
@@ -194,6 +194,27 @@ export const _PAY_ROUTE_TOKENS = ['PRO', 'PAY', 'PAYMENT', 'PAYWALL', 'ACTIVATE'
|
|
|
194
194
|
'DONATE', 'DONATION', 'SUBSCRIBE', 'SUBSCRIPTION'];
|
|
195
195
|
export const _ENV_ROUTE_TOKENS = ['GOOGLE_PLAY', 'GPLAY', 'FLYME', 'MEIZU', 'WINDOWS_PLATFORM'];
|
|
196
196
|
export const _LOGIN_ROUTE_TOKENS = ['LOGIN', 'REGISTER', 'SIGN_IN', 'SIGNIN', 'ACCOUNT'];
|
|
197
|
+
/** Auth-entry words: a route named this way IS the login / sign-up flow, shown to a logged-out user,
|
|
198
|
+
* so its in-edge guard is `logged-out` (a fresh install reaches it). `ACCOUNT` alone (`account_settings`)
|
|
199
|
+
* stays a needs-login page. Matched only as the name's LAST word (see _isAuthEntryRoute). */
|
|
200
|
+
export const _AUTH_ENTRY_ROUTE_TOKENS = ['LOGIN', 'REGISTER', 'SIGN_IN', 'SIGNIN'];
|
|
201
|
+
const _PAGE_SUFFIX_WORDS = new Set(['SCREEN', 'ROUTE', 'ACTIVITY', 'FRAGMENT', 'PAGE', 'VIEW']);
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Whether `routeKey` names the login / sign-up page itself: an auth-entry token must END the last
|
|
205
|
+
* dotted member, after dropping page suffixes (`Screen`, `Route`, `Activity`, …). `AccountLogin`,
|
|
206
|
+
* `SmsLoginScreen`, `AuthRoutes.Register` qualify; `LoginHistory`, `LoginDevices`, `ChangeLoginPassword`,
|
|
207
|
+
* `RegisterDevice`, `SignInCalendar` (daily check-in) do not — the word only qualifies what they are,
|
|
208
|
+
* and they need a logged-in user. A bare `DailySignIn` check-in page is indistinguishable by name.
|
|
209
|
+
*/
|
|
210
|
+
export function _isAuthEntryRoute(routeKey) {
|
|
211
|
+
const words = _identWords(pyStr(truthy(routeKey) ? routeKey : '').split('.').at(-1), true);
|
|
212
|
+
while (words.length > 1 && _PAGE_SUFFIX_WORDS.has(words.at(-1))) { words.pop(); }
|
|
213
|
+
return _AUTH_ENTRY_ROUTE_TOKENS.some((t) => {
|
|
214
|
+
const tw = _identWords(t, false);
|
|
215
|
+
return words.length >= tw.length && tw.every((w, j) => words[words.length - tw.length + j] === w);
|
|
216
|
+
});
|
|
217
|
+
}
|
|
197
218
|
|
|
198
219
|
/**
|
|
199
220
|
* Upper-cased words of an identifier: split on every non-alphanumeric run (snake_case, kebab-case,
|
|
@@ -1664,14 +1685,18 @@ export function enrichNodesAndEdges(nodes, edges, project = null, strings = null
|
|
|
1664
1685
|
else if (_hasToken(routeKey, _ENV_ROUTE_TOKENS)) { kind = 'build-flavor'; }
|
|
1665
1686
|
else if (_hasToken(routeKey, _LOGIN_ROUTE_TOKENS)) { kind = 'login'; }
|
|
1666
1687
|
else if (_hasToken(routeKey, _INSTANCE_ROUTE_SUFFIXES)) { kind = 'data-state'; }
|
|
1667
|
-
if (kind) {
|
|
1688
|
+
if (kind) {
|
|
1689
|
+
const guard = { text: `inferred:${routeKey}`, kind };
|
|
1690
|
+
if (kind === 'login' && _isAuthEntryRoute(routeKey)) { dset(guard, 'polarity', 'logged-out'); }
|
|
1691
|
+
dset(e, 'guard', guard);
|
|
1692
|
+
}
|
|
1668
1693
|
}
|
|
1669
1694
|
|
|
1670
1695
|
// --- 4b. centralized login interceptor (route_interceptor.mjs) ----------
|
|
1671
1696
|
// Runs after the backfill so a pay / data-state guard an edge already earned is kept; the login
|
|
1672
1697
|
// precondition then rides on the protected node's required_state instead.
|
|
1673
1698
|
if (truthy(project)) {
|
|
1674
|
-
const found = findLoginInterceptor(_projectSources(project), _LOGIN_TEST_RE, readTextSmart, routeResolver(nodes));
|
|
1699
|
+
const found = findLoginInterceptor(_projectSources(project), _LOGIN_TEST_RE, readTextSmart, routeResolver(nodes), project);
|
|
1675
1700
|
if (found && found.refused) {
|
|
1676
1701
|
pyPrintErr(`[assemble] login interceptor refused: ${found.refused}`);
|
|
1677
1702
|
} else if (found) {
|
|
@@ -23,7 +23,6 @@ import {
|
|
|
23
23
|
tupleKey, errStr, pyLen,
|
|
24
24
|
} from './_py.mjs';
|
|
25
25
|
import { loadProjectStrings } from './label_resolve.mjs';
|
|
26
|
-
import { term } from './i18n-term.mjs';
|
|
27
26
|
|
|
28
27
|
// ------------------------------------------------------------------ local Python-compat helpers
|
|
29
28
|
|
|
@@ -121,13 +120,13 @@ export function _pageName(nodeId, nodes) {
|
|
|
121
120
|
return _splitCamel(base);
|
|
122
121
|
}
|
|
123
122
|
|
|
124
|
-
// path_text is business text in the installed language
|
|
123
|
+
// path_text is business text in the installed language; the quoted labels and page
|
|
125
124
|
// names inside it stay as the app renders them.
|
|
126
125
|
export const _ACTION_VERB = {
|
|
127
|
-
tap:
|
|
128
|
-
double_tap:
|
|
129
|
-
'swipe-left':
|
|
130
|
-
'swipe-up':
|
|
126
|
+
tap: '点击',
|
|
127
|
+
double_tap: '双击', long_press: '长按',
|
|
128
|
+
'swipe-left': '左滑', 'swipe-right': '右滑',
|
|
129
|
+
'swipe-up': '上滑', 'swipe-down': '下滑',
|
|
131
130
|
};
|
|
132
131
|
|
|
133
132
|
export const _MODAL_KINDS = ['dialog', 'sheet', 'menu', 'bottom-sheet', 'popup'];
|
|
@@ -139,15 +138,15 @@ const inList = (x, list) => list.some((y) => pyEq(x, y));
|
|
|
139
138
|
/** The arrival clause after a step (`,进入 X 页面` / `, enters the X page`). `page` may be the
|
|
140
139
|
* literal `{page}` placeholder, which then survives for the caller to fill. */
|
|
141
140
|
function _arrive(kind, page) {
|
|
142
|
-
if (inList(kind, _MODAL_KINDS)) { return
|
|
143
|
-
if (inList(kind, _PAGE_KINDS)) { return
|
|
144
|
-
return
|
|
141
|
+
if (inList(kind, _MODAL_KINDS)) { return `,弹出 ${page}`; }
|
|
142
|
+
if (inList(kind, _PAGE_KINDS)) { return `,进入 ${page} 页面`; }
|
|
143
|
+
return `,进入 ${page}`;
|
|
145
144
|
}
|
|
146
145
|
|
|
147
146
|
export function _arrivalPhrase(action, label, kind) {
|
|
148
147
|
const verb = typeof action === 'string' && Object.hasOwn(_ACTION_VERB, action) ? _ACTION_VERB[action] : action;
|
|
149
148
|
const tapPrefix = truthy(label) ? `${fs_(verb)}[${fs_(label)}]` : fs_(verb);
|
|
150
|
-
if (action.startsWith('swipe')) { return
|
|
149
|
+
if (action.startsWith('swipe')) { return `${fs_(verb)},切换到 {page}`; }
|
|
151
150
|
if (inList(kind, _MODAL_KINDS) || inList(kind, _PAGE_KINDS)) { return tapPrefix + _arrive(kind, '{page}'); }
|
|
152
151
|
return `${tapPrefix} → {page}`;
|
|
153
152
|
}
|
|
@@ -158,12 +157,12 @@ export function _guardHint(guard) {
|
|
|
158
157
|
const gk = g(guard, 'kind') || '';
|
|
159
158
|
const gt = g(guard, 'text') || '';
|
|
160
159
|
const detail = truthy(gt) ? gt : gk;
|
|
161
|
-
if (gk === 'login' && g(guard, 'polarity') === 'logged-out') { return
|
|
160
|
+
if (gk === 'login' && g(guard, 'polarity') === 'logged-out') { return `(仅未登录时:${fs_(detail)})`; }
|
|
162
161
|
const redirect = gk === 'login' ? g(guard, 'redirect_when_unmet') : null;
|
|
163
|
-
const unmet = truthy(redirect) ?
|
|
164
|
-
return truthy(detail) ?
|
|
162
|
+
const unmet = truthy(redirect) ? `;未登录时改跳到 ${fs_(String(redirect).replace(/^compose-route:/, ''))}` : '';
|
|
163
|
+
return truthy(detail) ? `(需满足前置条件:${fs_(detail)}${unmet})` : `(需满足前置条件${unmet})`;
|
|
165
164
|
}
|
|
166
|
-
return
|
|
165
|
+
return `(需满足前置条件:${fs_(guard)}${''})`;
|
|
167
166
|
}
|
|
168
167
|
|
|
169
168
|
export function _renderPathText(steps, nodes) {
|
|
@@ -172,7 +171,7 @@ export function _renderPathText(steps, nodes) {
|
|
|
172
171
|
const act = g(s, 'action', 'tap');
|
|
173
172
|
const page = _pageName(s.target_id, nodes);
|
|
174
173
|
const kind = truthy(g(s, 'target_kind', '')) ? g(s, 'target_kind', '') : g(g(nodes, s.target_id, {}), 'kind', '');
|
|
175
|
-
if (act === 'launch') { parts.push(
|
|
174
|
+
if (act === 'launch') { parts.push(`启动应用,进入首页(${fs_(page)})`); continue; }
|
|
176
175
|
if (truthy(g(s, 'instruction'))) { parts.push(s.instruction + _guardHint(g(s, 'guard'))); continue; }
|
|
177
176
|
if (act === 'default') {
|
|
178
177
|
const tgt = g(nodes, s.target_id, {});
|
|
@@ -183,17 +182,17 @@ export function _renderPathText(steps, nodes) {
|
|
|
183
182
|
if (pyEq(g(s, 'gesture'), 'open-drawer')) {
|
|
184
183
|
const grav = or_(g(s, 'drawer_gravity'), 'start');
|
|
185
184
|
const drawer = inList(grav, ['start', 'left'])
|
|
186
|
-
?
|
|
187
|
-
:
|
|
185
|
+
? `从屏幕左侧边缘向内滑动(或点击标题栏抽屉按钮),打开 ${fs_(page)}`
|
|
186
|
+
: `从屏幕右侧边缘向内滑动(或点击标题栏抽屉按钮),打开 ${fs_(page)}`;
|
|
188
187
|
parts.push(drawer + _guardHint(g(s, 'guard')));
|
|
189
188
|
continue;
|
|
190
189
|
}
|
|
191
190
|
if (truthy(g(s, 'non_gesture'))) {
|
|
192
|
-
parts.push(
|
|
191
|
+
parts.push(`自动跳转${_arrive(kind, fs_(page))}` + _guardHint(g(s, 'guard')));
|
|
193
192
|
continue;
|
|
194
193
|
}
|
|
195
194
|
if (truthy(g(s, 'needs_trigger')) && !truthy(g(s, 'label'))) {
|
|
196
|
-
parts.push(
|
|
195
|
+
parts.push(`需操作页面内控件(控件未能从代码静态确定)${_arrive(kind, fs_(page))}` +
|
|
197
196
|
_guardHint(g(s, 'guard')));
|
|
198
197
|
continue;
|
|
199
198
|
}
|
|
@@ -590,7 +589,7 @@ export function main(argv = process.argv.slice(2)) {
|
|
|
590
589
|
const base = truthy(existing) ? existing : hostPath;
|
|
591
590
|
paths.set(nid, mergeDict(base, [['embedded', true], ['embedded_in', hostId],
|
|
592
591
|
['kind', g(n, 'kind', '')],
|
|
593
|
-
['path_text', hostPath.path_text +
|
|
592
|
+
['path_text', hostPath.path_text + `(内嵌于 ${fs_(hostId)} 的同屏子区域)`]]));
|
|
594
593
|
}
|
|
595
594
|
|
|
596
595
|
const unreachable = [...nodes.keys()].filter((nid) => !paths.has(nid));
|