@buaa_smat/hometrans 26.0.3 → 26.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/agents/code-reviewer.md +91 -21
- package/env-requirements.json +1 -1
- package/i18n/agents/code-reviewer.md +93 -21
- package/i18n/skills/a2h-app-migrate/SKILL.md +19 -11
- package/i18n/skills/a2h-app-migrate/references/feature-scope.md +121 -0
- package/i18n/skills/a2h-app-migrate/references/stage-map.md +2 -2
- package/i18n/skills/a2h-app-migrate/references/workflow.yaml +320 -73
- package/i18n/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +78 -5
- package/i18n/skills/a2h-app-migrate/scripts/env_preflight.mjs +79 -11
- package/i18n/skills/a2h-app-migrate/scripts/human_review_gate.mjs +75 -4
- package/i18n/skills/a2h-app-migrate/test/test_android_index.mjs +12 -0
- package/i18n/skills/a2h-app-migrate/test/test_env_requirements.mjs +25 -10
- package/i18n/skills/a2h-app-migrate/test/test_finalize.mjs +35 -7
- package/i18n/skills/a2h-app-migrate/test/test_resume_plan.mjs +52 -0
- package/i18n/skills/a2h-app-migrate/test/test_resume_summary.mjs +26 -0
- package/i18n/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +36 -0
- package/i18n/skills/a2h-app-migrate/test/test_run_dir.mjs +71 -7
- package/i18n/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +117 -0
- package/i18n/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +7 -3
- package/i18n/skills/a2h-app-migrate/test/test_utg_static_done.mjs +38 -2
- package/i18n/skills/a2h-arch-generate/SKILL.md +20 -17
- package/i18n/skills/a2h-arch-generate/references/database-schema-recovery.md +2 -2
- package/i18n/skills/a2h-arch-generate/references/harmony-project-inspection.md +8 -8
- package/i18n/skills/a2h-arch-generate/references/homegraph-workflow.md +25 -14
- package/i18n/skills/a2h-arch-generate/references/source-baseline.md +4 -4
- package/i18n/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +3 -3
- package/i18n/skills/a2h-arkts-logic-coder/SKILL.md +304 -0
- package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -1
- package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +59 -2
- package/i18n/skills/a2h-arkts-logic-coder/references/spec-design.md +52 -11
- package/i18n/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +328 -38
- package/i18n/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +245 -0
- package/i18n/skills/a2h-batch-ui-align/SKILL.md +70 -21
- package/i18n/skills/a2h-batch-ui-align/references/cards/alignment.md +5 -1
- package/i18n/skills/a2h-batch-ui-align/references/cards/geometry.md +5 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/interaction.md +2 -1
- package/i18n/skills/a2h-batch-ui-align/references/cards/resources.md +6 -4
- package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +5 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/window.md +2 -1
- package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +236 -11
- package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +8 -5
- package/i18n/skills/a2h-batch-ui-align/references/incremental-scope.md +28 -9
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +7 -4
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +28 -1
- package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_decorator-quickref.md +31 -0
- package/i18n/skills/a2h-batch-ui-align/references/step3-capture.md +22 -6
- package/i18n/skills/a2h-batch-ui-align/references/step4-prepare.md +3 -0
- package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +26 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/branch_coverage.mjs +155 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +386 -16
- package/i18n/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +19 -1
- package/i18n/skills/a2h-batch-ui-align/scripts/group_pack.mjs +134 -11
- package/i18n/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +147 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/measure_pack.ts +231 -5
- package/i18n/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +82 -8
- package/i18n/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +21 -7
- package/i18n/skills/a2h-batch-ui-align/scripts/state_doc.mjs +9 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/main.ts +48 -5
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +3 -17
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +1 -19
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/dialog_backboard.ts +91 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/event_default_click.ts +179 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +339 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/image_source.ts +84 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/input_traps.ts +249 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +234 -5
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_host.ts +145 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +45 -11
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_binds.ts +56 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_string.ts +96 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +60 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +3 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +102 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +54 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/runtime_traps.ts +440 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -23
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/swiper_index.ts +65 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +63 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/waterflow_sections.ts +231 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +4 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_input_runtime.test.mjs +514 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +224 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_overlay_lottie.test.mjs +199 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/branch_coverage.test.mjs +116 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +133 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +5 -3
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +33 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +12 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +8 -0
- package/i18n/skills/a2h-coldstart-smoke-gate/SKILL.md +7 -4
- package/i18n/skills/a2h-dashboard-render/scripts/device_capture.mjs +11 -9
- package/i18n/skills/a2h-module-semantic-docs/SKILL.md +51 -13
- package/i18n/skills/a2h-page-specgen/SKILL.md +123 -20
- package/i18n/skills/a2h-page-specgen/references/behavior-ledger.md +1174 -0
- package/i18n/skills/a2h-page-specgen/references/body-language.md +11 -9
- package/i18n/skills/a2h-page-specgen/references/gates.md +119 -52
- package/i18n/skills/a2h-page-specgen/references/page-inventory.md +69 -22
- package/i18n/skills/a2h-page-specgen/references/scenario-authoring.md +274 -0
- package/i18n/skills/a2h-page-specgen/references/spec-example.md +312 -0
- package/i18n/skills/a2h-page-specgen/references/spec-template.md +113 -110
- package/i18n/skills/a2h-page-specgen/scripts/behavior-audit.mjs +2436 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +1833 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-model.mjs +181 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +1205 -0
- package/i18n/skills/a2h-page-specgen/scripts/entry-evidence.mjs +1123 -0
- package/i18n/skills/a2h-page-specgen/scripts/facts-build.mjs +171 -62
- package/i18n/skills/a2h-page-specgen/scripts/footprint.mjs +314 -192
- package/i18n/skills/a2h-page-specgen/scripts/gate.mjs +364 -76
- package/i18n/skills/a2h-page-specgen/scripts/interactions.mjs +216 -8
- package/i18n/skills/a2h-page-specgen/scripts/inventory.mjs +371 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/contracts.mjs +116 -223
- package/i18n/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +235 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/hg.mjs +521 -13
- package/i18n/skills/a2h-page-specgen/scripts/lib/homegraph-process.mjs +102 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/homegraph-query.mjs +161 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/operation-reviews.mjs +913 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/prose.mjs +12 -8
- package/i18n/skills/a2h-page-specgen/scripts/lib/semantic-detail.mjs +353 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/source-text.mjs +497 -0
- package/i18n/skills/a2h-page-specgen/scripts/operation-evidence.mjs +1542 -0
- package/i18n/skills/a2h-page-specgen/scripts/prepare.mjs +483 -125
- package/i18n/skills/a2h-page-specgen/scripts/render.mjs +10 -33
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +288 -7
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.json +25 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.json +47 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +2694 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +726 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +108 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.review.md +65 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +267 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.json +57 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/branch-checklist.md +32 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/gate-results.json +22 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/manifest.json +111 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/portability.test.mjs +141 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/review.md +22 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +553 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/android-entry-evidence.test.mjs +585 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +755 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-group.test.mjs +546 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-post.test.mjs +655 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +1234 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-component-gate.test.mjs +520 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +1516 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-finalize.test.mjs +759 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +630 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-model.test.mjs +118 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +798 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-regression.test.mjs +886 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +134 -163
- package/i18n/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +475 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/facts.test.mjs +40 -1
- package/i18n/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +206 -9
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/App.vue +1 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-conflict-record.json +17 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-record.json +17 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/manifest.json +3 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages/list/index.vue +80 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages.json +14 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/source-record.json +15 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/components/RefreshPanel.vue +15 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/composables/useRefresh.ts +50 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/pages/help/index.vue +9 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/state/store.ts +4 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +459 -188
- package/i18n/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +89 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/gate.test.mjs +862 -12
- package/i18n/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +332 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/helpers.mjs +139 -5
- package/i18n/skills/a2h-page-specgen/scripts/test/hg.test.mjs +378 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/homegraph-process-fixture.mjs +130 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/homegraph-query.test.mjs +288 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/integration.test.mjs +69 -2
- package/i18n/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +267 -2
- package/i18n/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +111 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/keys.test.mjs +10 -8
- package/i18n/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +1002 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +143 -51
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-homegraph-reproduction.mjs +365 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-homegraph.test.mjs +569 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-pipeline.test.mjs +326 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +166 -3
- package/i18n/skills/a2h-page-specgen/scripts/test/prose.test.mjs +13 -5
- package/i18n/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +531 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +102 -7
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +1308 -72
- package/i18n/skills/a2h-page-specgen/scripts/test/render.test.mjs +69 -44
- package/i18n/skills/a2h-page-specgen/scripts/test/review-followup.test.mjs +467 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/semantic-detail.test.mjs +949 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/submit.test.mjs +658 -120
- package/i18n/skills/a2h-page-specgen/scripts/test/uniapp-operation-evidence.test.mjs +639 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/utg-footprint-contract.test.mjs +274 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +101 -65
- package/i18n/skills/a2h-resource-convert/SKILL.md +9 -1
- package/i18n/skills/a2h-resource-convert/references/code-vector-icon-rules.md +2 -1
- package/i18n/skills/a2h-resource-convert/references/incremental-page-migration.md +23 -2
- package/i18n/skills/a2h-resource-convert/references/lottie-conversion-rules.md +7 -0
- package/i18n/skills/a2h-resource-convert/references/step4-resource-types.md +2 -0
- package/i18n/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +67 -3
- package/i18n/skills/a2h-resource-convert/scripts/lottie_hosts.ts +415 -0
- package/i18n/skills/a2h-resource-convert/scripts/tests/lottie_hosts.test.mjs +222 -0
- package/i18n/skills/a2h-spec-design-pipeline/SKILL.md +69 -109
- package/i18n/skills/a2h-spec-design-pipeline/references/coding-loop.md +135 -37
- package/i18n/skills/a2h-spec-design-pipeline/references/homegraph-cli.md +307 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/initialization.md +103 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/merge-queue.md +126 -23
- package/i18n/skills/a2h-spec-design-pipeline/references/post-loop.md +23 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/review-loop.md +71 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/scripts.md +24 -13
- package/i18n/skills/a2h-spec-design-pipeline/references/state-and-resume.md +246 -0
- package/i18n/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +170 -7
- package/i18n/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +155 -0
- package/i18n/skills/a2h-spec-generate/SKILL.md +2 -2
- package/i18n/skills/a2h-utg-explorer/SKILL.md +9 -3
- package/i18n/skills/a2h-utg-explorer/references/architecture.md +3 -0
- package/i18n/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +74 -84
- package/i18n/skills/a2h-utg-explorer/scripts/hybrid_route_cdp.mjs +376 -0
- package/i18n/skills/a2h-utg-explorer/scripts/recover_d.mjs +288 -21
- package/i18n/skills/a2h-utg-explorer/scripts/seed_recipes.mjs +426 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +252 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/hybrid_route_identity.test.mjs +146 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +122 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +15 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/seed_recipes.test.mjs +261 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/diagnostics.mjs +196 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/hybrid_route.mjs +140 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +211 -61
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +47 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +724 -47
- package/i18n/skills/a2h-utg-static/SKILL.md +6 -2
- package/i18n/skills/a2h-utg-static/scripts/assemble.mjs +82 -12
- package/i18n/skills/a2h-utg-static/scripts/click_paths.mjs +116 -5
- package/i18n/skills/a2h-utg-static/scripts/compose_body_text.mjs +3 -3
- package/i18n/skills/a2h-utg-static/scripts/compose_titles.mjs +5 -5
- package/i18n/skills/a2h-utg-static/scripts/compose_widgets.mjs +4 -4
- package/i18n/skills/a2h-utg-static/scripts/data_model.mjs +590 -0
- package/i18n/skills/a2h-utg-static/scripts/data_producers.mjs +431 -0
- package/i18n/skills/a2h-utg-static/scripts/hybrid_scope.mjs +50 -5
- package/i18n/skills/a2h-utg-static/scripts/label_resolve.mjs +49 -4
- package/i18n/skills/a2h-utg-static/scripts/lib/hybrid-provenance.mjs +201 -0
- package/i18n/skills/a2h-utg-static/scripts/lib/uniapp-routes.mjs +195 -0
- package/i18n/skills/a2h-utg-static/scripts/nl_hints.mjs +32 -4
- package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +17 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_data_model.mjs +120 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_data_producers.mjs +113 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_provenance.mjs +150 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +181 -17
- package/i18n/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +35 -1
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_routes.mjs +161 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +118 -19
- package/i18n/skills/a2h-utg-static/scripts/tests/test_utg_specgen_boundary.mjs +45 -0
- package/i18n/skills/a2h-utg-static/scripts/uniapp_nav.mjs +113 -70
- package/package.json +3 -6
- package/skills/a2h-app-migrate/SKILL.md +19 -11
- package/skills/a2h-app-migrate/references/feature-scope.md +121 -0
- package/skills/a2h-app-migrate/references/stage-map.md +2 -2
- package/skills/a2h-app-migrate/references/workflow.yaml +307 -74
- package/skills/a2h-app-migrate/scripts/android_index.mjs +35 -8
- package/skills/a2h-app-migrate/scripts/check_module_docs_done.mjs +39 -1
- package/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +78 -5
- package/skills/a2h-app-migrate/scripts/check_spec_pipeline_done.mjs +144 -9
- package/skills/a2h-app-migrate/scripts/check_ui_batch_done.mjs +14 -1
- package/skills/a2h-app-migrate/scripts/check_utg_static_done.mjs +46 -5
- package/skills/a2h-app-migrate/scripts/diagnose.mjs +162 -0
- package/skills/a2h-app-migrate/scripts/env_preflight.mjs +79 -11
- package/skills/a2h-app-migrate/scripts/feature_scope.mjs +347 -0
- package/skills/a2h-app-migrate/scripts/human_review_gate.mjs +75 -4
- package/skills/a2h-app-migrate/scripts/infer_android_root.mjs +17 -1
- package/skills/a2h-app-migrate/scripts/ledger.mjs +64 -6
- package/skills/a2h-app-migrate/scripts/migration_manifest.mjs +351 -0
- package/skills/a2h-app-migrate/scripts/paths_preflight.mjs +9 -23
- package/skills/a2h-app-migrate/scripts/resume_plan.mjs +33 -9
- package/skills/a2h-app-migrate/scripts/reuse_static_utg.mjs +33 -1
- package/skills/a2h-app-migrate/scripts/run_dir.mjs +27 -17
- package/skills/a2h-app-migrate/scripts/scope_model.mjs +255 -0
- package/skills/a2h-app-migrate/scripts/scope_report.mjs +128 -0
- package/skills/a2h-app-migrate/scripts/source_fp.mjs +120 -0
- package/skills/a2h-app-migrate/test/test_android_index.mjs +12 -0
- package/skills/a2h-app-migrate/test/test_env_requirements.mjs +25 -10
- package/skills/a2h-app-migrate/test/test_feature_scope.mjs +217 -0
- package/skills/a2h-app-migrate/test/test_finalize.mjs +35 -7
- package/skills/a2h-app-migrate/test/test_hmos_fingerprint.mjs +7 -7
- package/skills/a2h-app-migrate/test/test_incremental_acceptance.mjs +145 -0
- package/skills/a2h-app-migrate/test/test_incremental_phase2.mjs +223 -0
- package/skills/a2h-app-migrate/test/test_incremental_phase2_acceptance.mjs +157 -0
- package/skills/a2h-app-migrate/test/test_incremental_profile.mjs +84 -0
- package/skills/a2h-app-migrate/test/test_infer_android_root.mjs +10 -0
- package/skills/a2h-app-migrate/test/test_json_io.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_leaf_questions.mjs +39 -0
- package/skills/a2h-app-migrate/test/test_migration_manifest.mjs +225 -0
- package/skills/a2h-app-migrate/test/test_module_docs_done.mjs +33 -0
- package/skills/a2h-app-migrate/test/test_resume_plan.mjs +52 -0
- package/skills/a2h-app-migrate/test/test_resume_summary.mjs +26 -0
- package/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +36 -0
- package/skills/a2h-app-migrate/test/test_run_dir.mjs +71 -7
- package/skills/a2h-app-migrate/test/test_scope_model.mjs +172 -0
- package/skills/a2h-app-migrate/test/test_spec_engine_contract.mjs +13 -5
- package/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +117 -0
- package/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +7 -3
- package/skills/a2h-app-migrate/test/test_spec_pipeline_done.mjs +170 -3
- package/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_ui_batch_capture_audit.mjs +106 -0
- package/skills/a2h-app-migrate/test/test_ui_batch_done.mjs +12 -0
- package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +38 -2
- package/skills/a2h-arch-generate/SKILL.md +20 -17
- package/skills/a2h-arch-generate/references/homegraph-workflow.md +10 -8
- package/skills/a2h-arch-generate/references/source-baseline.md +2 -2
- package/skills/a2h-arch-generate/scripts/cleanup_intermediates.mjs +34 -3
- package/skills/a2h-arch-generate/scripts/create_project.mjs +24 -1
- package/skills/a2h-arch-generate/scripts/inspect_and_route.mjs +29 -5
- package/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +3 -3
- package/skills/a2h-arch-generate/scripts/tests/test_cleanup.mjs +17 -0
- package/skills/a2h-arch-generate/scripts/tests/test_router.mjs +26 -0
- package/skills/a2h-arch-generate/scripts/validate_incremental_docs.mjs +4 -2
- package/skills/a2h-arkts-logic-coder/SKILL.md +146 -17
- package/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -1
- package/skills/a2h-arkts-logic-coder/references/code-generation.md +59 -2
- package/skills/a2h-arkts-logic-coder/references/spec-design.md +42 -11
- package/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +328 -38
- package/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +244 -0
- package/skills/a2h-batch-ui-align/SKILL.md +72 -22
- package/skills/a2h-batch-ui-align/assets/ColorUtils.ets +16 -2
- package/skills/a2h-batch-ui-align/references/cards/alignment.md +5 -1
- package/skills/a2h-batch-ui-align/references/cards/geometry.md +5 -0
- package/skills/a2h-batch-ui-align/references/cards/interaction.md +2 -1
- package/skills/a2h-batch-ui-align/references/cards/resources.md +6 -4
- package/skills/a2h-batch-ui-align/references/cards/widgets.md +5 -0
- package/skills/a2h-batch-ui-align/references/cards/window.md +2 -1
- package/skills/a2h-batch-ui-align/references/checker-rules.md +236 -11
- package/skills/a2h-batch-ui-align/references/conversion-procedure.md +8 -5
- package/skills/a2h-batch-ui-align/references/host-dispatch.md +2 -0
- package/skills/a2h-batch-ui-align/references/incremental-scope.md +28 -9
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +7 -4
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +28 -1
- package/skills/a2h-batch-ui-align/references/state-mgmt/_/350/243/205/351/245/260/345/231/250/351/200/237/346/237/245.md +30 -0
- package/skills/a2h-batch-ui-align/references/step3-capture.md +25 -6
- package/skills/a2h-batch-ui-align/references/step4-prepare.md +3 -0
- package/skills/a2h-batch-ui-align/references/step5-convert.md +26 -4
- package/skills/a2h-batch-ui-align/scripts/branch_coverage.mjs +155 -0
- package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +380 -16
- package/skills/a2h-batch-ui-align/scripts/capture_audit.mjs +474 -0
- package/skills/a2h-batch-ui-align/scripts/capture_fast.mjs +665 -0
- package/skills/a2h-batch-ui-align/scripts/capture_verify.mjs +552 -0
- package/skills/a2h-batch-ui-align/scripts/detach.mjs +5 -2
- package/skills/a2h-batch-ui-align/scripts/evidence_gate.mjs +39 -5
- package/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +19 -1
- package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +134 -11
- package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +213 -30
- package/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +147 -0
- package/skills/a2h-batch-ui-align/scripts/list_existing.mjs +141 -0
- package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +231 -5
- package/skills/a2h-batch-ui-align/scripts/page_gap.mjs +210 -0
- package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +82 -8
- package/skills/a2h-batch-ui-align/scripts/progress_identity.mjs +208 -0
- package/skills/a2h-batch-ui-align/scripts/scroll_verdict.mjs +62 -0
- package/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +21 -7
- package/skills/a2h-batch-ui-align/scripts/shell_requests.mjs +273 -0
- package/skills/a2h-batch-ui-align/scripts/state_doc.mjs +9 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/core/baseline.ts +79 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/core/parse.ts +90 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/core/scan.ts +44 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +48 -5
- package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +24 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +3 -17
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +1 -19
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/dialog_backboard.ts +91 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/event_default_click.ts +179 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +339 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/image_source.ts +84 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/input_traps.ts +249 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +234 -5
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_host.ts +145 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +45 -11
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_binds.ts +56 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_string.ts +96 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +60 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +3 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +102 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +54 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/runtime_traps.ts +440 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -23
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/swiper_index.ts +65 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +63 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/waterflow_sections.ts +231 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +4 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/scan_file.ts +24 -2
- package/skills/a2h-batch-ui-align/scripts/tests/agent_cli.test.mjs +14 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_baseline.test.mjs +129 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_coolmall_runtime2.test.mjs +697 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_hit_test.test.mjs +298 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_input_runtime.test.mjs +514 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +224 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_overlay_lottie.test.mjs +199 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rule_smoke.test.mjs +41 -7
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_runtime_api.test.mjs +346 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_theme_runtime.test.mjs +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/branch_coverage.test.mjs +116 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +126 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set_scope.test.mjs +1 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_audit.test.mjs +179 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_fast.test.mjs +56 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_gate.test.mjs +197 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_review_fixes.test.mjs +322 -0
- package/skills/a2h-batch-ui-align/scripts/tests/color_utils_asset.test.mjs +19 -0
- package/skills/a2h-batch-ui-align/scripts/tests/evidence_gate.test.mjs +15 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/SearchMenuDialog.buggy.ets +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/meta.json +21 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/screenshot.png +0 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/view.xml +35 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_pack_evidence.test.mjs +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +155 -1
- package/skills/a2h-batch-ui-align/scripts/tests/icon_coverage.test.mjs +314 -0
- package/skills/a2h-batch-ui-align/scripts/tests/list_existing.test.mjs +157 -0
- package/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +5 -3
- package/skills/a2h-batch-ui-align/scripts/tests/page_gap.test.mjs +115 -0
- package/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +33 -2
- package/skills/a2h-batch-ui-align/scripts/tests/progress_identity.test.mjs +174 -0
- package/skills/a2h-batch-ui-align/scripts/tests/shell_contract.test.mjs +5 -0
- package/skills/a2h-batch-ui-align/scripts/tests/shell_requests.test.mjs +158 -0
- package/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +12 -0
- package/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +8 -0
- package/skills/a2h-coldstart-smoke-gate/SKILL.md +7 -4
- package/skills/a2h-dashboard-render/test/test_device_locale_dialogs.mjs +17 -0
- package/skills/a2h-module-semantic-docs/SKILL.md +51 -13
- package/skills/a2h-module-semantic-docs/scripts/scan_modules.mjs +66 -11
- package/skills/a2h-module-semantic-docs/test/test_incremental_fingerprint.mjs +94 -0
- package/skills/a2h-page-specgen/SKILL.md +124 -20
- package/skills/a2h-page-specgen/references/behavior-ledger.md +1170 -0
- package/skills/a2h-page-specgen/references/body-language.md +11 -9
- package/skills/a2h-page-specgen/references/evidence.md +35 -0
- package/skills/a2h-page-specgen/references/execution-model.md +135 -26
- package/skills/a2h-page-specgen/references/footprint-and-grouping.md +20 -15
- package/skills/a2h-page-specgen/references/gates.md +120 -52
- package/skills/a2h-page-specgen/references/page-inventory.md +69 -22
- package/skills/a2h-page-specgen/references/scenario-authoring.md +272 -0
- package/skills/a2h-page-specgen/references/spec-example.md +312 -0
- package/skills/a2h-page-specgen/references/spec-template.md +112 -109
- package/skills/a2h-page-specgen/scripts/behavior-audit.mjs +2436 -0
- package/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +1833 -0
- package/skills/a2h-page-specgen/scripts/behavior-model.mjs +181 -0
- package/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +1205 -0
- package/skills/a2h-page-specgen/scripts/dispatch.mjs +8 -5
- package/skills/a2h-page-specgen/scripts/entry-evidence.mjs +1123 -0
- package/skills/a2h-page-specgen/scripts/facts-build.mjs +170 -61
- package/skills/a2h-page-specgen/scripts/finalize.mjs +466 -63
- package/skills/a2h-page-specgen/scripts/footprint.mjs +302 -180
- package/skills/a2h-page-specgen/scripts/gate.mjs +372 -82
- package/skills/a2h-page-specgen/scripts/interactions.mjs +215 -8
- package/skills/a2h-page-specgen/scripts/inventory.mjs +102 -0
- package/skills/a2h-page-specgen/scripts/lib/contracts.mjs +116 -216
- package/skills/a2h-page-specgen/scripts/lib/draft-store.mjs +105 -13
- package/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +235 -0
- package/skills/a2h-page-specgen/scripts/lib/hg.mjs +520 -12
- package/skills/a2h-page-specgen/scripts/lib/homegraph-process.mjs +102 -0
- package/skills/a2h-page-specgen/scripts/lib/homegraph-query.mjs +161 -0
- package/skills/a2h-page-specgen/scripts/lib/ledger.mjs +129 -6
- package/skills/a2h-page-specgen/scripts/lib/main-module.mjs +24 -0
- package/skills/a2h-page-specgen/scripts/lib/operation-reviews.mjs +913 -0
- package/skills/a2h-page-specgen/scripts/lib/prose.mjs +12 -8
- package/skills/a2h-page-specgen/scripts/lib/recovery-policy.mjs +28 -0
- package/skills/a2h-page-specgen/scripts/lib/scope.mjs +355 -0
- package/skills/a2h-page-specgen/scripts/lib/semantic-detail.mjs +353 -0
- package/skills/a2h-page-specgen/scripts/lib/source-text.mjs +106 -0
- package/skills/a2h-page-specgen/scripts/operation-evidence.mjs +1542 -0
- package/skills/a2h-page-specgen/scripts/prepare.mjs +470 -122
- package/skills/a2h-page-specgen/scripts/render.mjs +11 -34
- package/skills/a2h-page-specgen/scripts/report.mjs +339 -6
- package/skills/a2h-page-specgen/scripts/submission.mjs +253 -88
- package/skills/a2h-page-specgen/scripts/submit.mjs +12 -6
- package/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +288 -7
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.java +15 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.json +26 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.java +36 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.json +43 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +2694 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +726 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +108 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.review.md +65 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +265 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.java +47 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.json +54 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/branch-checklist.md +32 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/gate-results.json +22 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/manifest.json +111 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/portability.test.mjs +141 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/review.md +22 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +515 -0
- package/skills/a2h-page-specgen/scripts/test/android-entry-evidence.test.mjs +585 -0
- package/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +755 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-group.test.mjs +543 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-post.test.mjs +652 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +1231 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-component-gate.test.mjs +494 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +1513 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-finalize.test.mjs +758 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +623 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-model.test.mjs +116 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +795 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-regression.test.mjs +883 -0
- package/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +135 -137
- package/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +475 -0
- package/skills/a2h-page-specgen/scripts/test/facts.test.mjs +40 -1
- package/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +178 -9
- package/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +19 -1
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanels.java +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanels.kt +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanelsKotlinForms.kt +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ChildContent.java +6 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ComposeLifecycle.kt +26 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/LifecycleCallAndOverride.java +10 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/LifecycleHooks.kt +31 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ManyLifecycleHooks.kt +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/RefreshOnResume.java +7 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/RefreshResultNoise.kt +36 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/SelectionView.java +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ShowPage.vue +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ThirdPartyLifecycle.kt +25 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/fragment_detail.xml +1 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/App.vue +1 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-conflict-record.json +17 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-record.json +17 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/manifest.json +3 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages/list/index.vue +80 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages.json +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/source-record.json +15 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/components/RefreshPanel.vue +15 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/composables/useRefresh.ts +50 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/pages/help/index.vue +9 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/state/store.ts +4 -0
- package/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +459 -188
- package/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +89 -0
- package/skills/a2h-page-specgen/scripts/test/gate.test.mjs +869 -13
- package/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +332 -0
- package/skills/a2h-page-specgen/scripts/test/helpers.mjs +139 -5
- package/skills/a2h-page-specgen/scripts/test/hg.test.mjs +378 -0
- package/skills/a2h-page-specgen/scripts/test/homegraph-process-fixture.mjs +130 -0
- package/skills/a2h-page-specgen/scripts/test/homegraph-query.test.mjs +288 -0
- package/skills/a2h-page-specgen/scripts/test/integration.test.mjs +69 -2
- package/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +267 -2
- package/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +111 -0
- package/skills/a2h-page-specgen/scripts/test/keys.test.mjs +10 -8
- package/skills/a2h-page-specgen/scripts/test/ledger-lock.test.mjs +77 -0
- package/skills/a2h-page-specgen/scripts/test/ledger.test.mjs +1 -1
- package/skills/a2h-page-specgen/scripts/test/main-module.test.mjs +43 -0
- package/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +1002 -0
- package/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +143 -51
- package/skills/a2h-page-specgen/scripts/test/prepare-homegraph-reproduction.mjs +365 -0
- package/skills/a2h-page-specgen/scripts/test/prepare-homegraph.test.mjs +569 -0
- package/skills/a2h-page-specgen/scripts/test/prepare-index.test.mjs +42 -2
- package/skills/a2h-page-specgen/scripts/test/prepare-pipeline.test.mjs +326 -0
- package/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +171 -3
- package/skills/a2h-page-specgen/scripts/test/prose.test.mjs +13 -5
- package/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +365 -1
- package/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +102 -7
- package/skills/a2h-page-specgen/scripts/test/recovery-policy.test.mjs +14 -0
- package/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +1308 -72
- package/skills/a2h-page-specgen/scripts/test/render.test.mjs +85 -42
- package/skills/a2h-page-specgen/scripts/test/report.test.mjs +296 -0
- package/skills/a2h-page-specgen/scripts/test/review-followup.test.mjs +467 -0
- package/skills/a2h-page-specgen/scripts/test/scope.test.mjs +292 -0
- package/skills/a2h-page-specgen/scripts/test/semantic-detail.test.mjs +949 -0
- package/skills/a2h-page-specgen/scripts/test/submit.test.mjs +645 -115
- package/skills/a2h-page-specgen/scripts/test/uniapp-operation-evidence.test.mjs +639 -0
- package/skills/a2h-page-specgen/scripts/test/utg-footprint-contract.test.mjs +274 -0
- package/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +101 -65
- package/skills/a2h-page-specgen/scripts/test/waker.test.mjs +88 -74
- package/skills/a2h-page-specgen/scripts/test/watchdog.test.mjs +30 -1
- package/skills/a2h-page-specgen/scripts/waker.mjs +79 -12
- package/skills/a2h-page-specgen/scripts/watchdog.mjs +18 -17
- package/skills/a2h-resource-convert/SKILL.md +9 -1
- package/skills/a2h-resource-convert/references/code-vector-icon-rules.md +2 -1
- package/skills/a2h-resource-convert/references/incremental-page-migration.md +23 -2
- package/skills/a2h-resource-convert/references/lottie-conversion-rules.md +7 -0
- package/skills/a2h-resource-convert/references/step4-resource-types.md +2 -0
- package/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +67 -3
- package/skills/a2h-resource-convert/scripts/a2h_resource_incremental.ts +68 -0
- package/skills/a2h-resource-convert/scripts/code_vector_icons.ts +45 -3
- package/skills/a2h-resource-convert/scripts/extract_page_resources.ts +42 -5
- package/skills/a2h-resource-convert/scripts/lottie_hosts.ts +415 -0
- package/skills/a2h-resource-convert/scripts/lottie_refs.ts +398 -0
- package/skills/a2h-resource-convert/scripts/merge_mapping.ts +316 -0
- package/skills/a2h-resource-convert/scripts/svg_fidelity_check.ts +2 -1
- package/skills/a2h-resource-convert/scripts/tests/code_vector_guard.test.mjs +75 -0
- package/skills/a2h-resource-convert/scripts/tests/lottie_hosts.test.mjs +222 -0
- package/skills/a2h-resource-convert/scripts/tests/lottie_incremental.test.mjs +178 -0
- package/skills/a2h-resource-convert/scripts/tests/merge_mapping.test.mjs +201 -0
- package/skills/a2h-spec-design-pipeline/SKILL.md +48 -72
- package/skills/a2h-spec-design-pipeline/references/coding-loop.md +123 -37
- package/skills/a2h-spec-design-pipeline/references/execution-model.md +40 -8
- package/skills/a2h-spec-design-pipeline/references/final-report-template.md +5 -4
- package/skills/a2h-spec-design-pipeline/references/homegraph-cli.md +229 -0
- package/skills/a2h-spec-design-pipeline/references/initialization.md +37 -5
- package/skills/a2h-spec-design-pipeline/references/merge-queue.md +126 -23
- package/skills/a2h-spec-design-pipeline/references/permission-index.json +206 -0
- package/skills/a2h-spec-design-pipeline/references/post-loop.md +23 -0
- package/skills/a2h-spec-design-pipeline/references/resolver-prompt.md +7 -1
- package/skills/a2h-spec-design-pipeline/references/review-loop.md +46 -0
- package/skills/a2h-spec-design-pipeline/references/scripts.md +38 -14
- package/skills/a2h-spec-design-pipeline/references/shared-layer.md +127 -4
- package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +90 -24
- package/skills/a2h-spec-design-pipeline/references/static-defect-gate.md +65 -34
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleMeta.json +11 -1
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleSet.json +10 -2
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/README.md +47 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-param-contract.json +31 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-permission-map.json +698 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-cn.md +96 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-en.md +103 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-cn.md +124 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-en.md +138 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-cn.md +106 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-en.md +113 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ApiPermissionDeclaredCheck.js +705 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ArkUIRuntimePitfallCheck.js +1063 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/PlatformApiContractCheck.js +473 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/{HttpExtraDataEmptyStringCheck.js → platform/ExtraDataSubCheck.js} +27 -30
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/index.js +4 -2
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/package.json +3 -2
- package/skills/a2h-spec-design-pipeline/scripts/check_design_map.ts +108 -0
- package/skills/a2h-spec-design-pipeline/scripts/check_permissions.ts +420 -0
- package/skills/a2h-spec-design-pipeline/scripts/check_review_evidence.ts +45 -0
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/evidence.mjs +55 -2
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/fold.mjs +138 -7
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/landing.mjs +10 -13
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/progress.mjs +21 -2
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/reconcile.mjs +63 -4
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/wait.mjs +32 -2
- package/skills/a2h-spec-design-pipeline/scripts/dispatch.mjs +109 -13
- package/skills/a2h-spec-design-pipeline/scripts/ensure_index.ts +866 -0
- package/skills/a2h-spec-design-pipeline/scripts/fixtures/homecheck-stub.cjs +47 -0
- package/skills/a2h-spec-design-pipeline/scripts/homecheck_scan.ts +12 -17
- package/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +172 -7
- package/skills/a2h-spec-design-pipeline/scripts/resolver_prompt.ts +36 -16
- package/skills/a2h-spec-design-pipeline/scripts/sync_permission_index.ts +340 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_api_permission_declared.ts +281 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_arkui_runtime_pitfall.ts +690 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_check_design_map.ts +46 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_check_permissions.ts +201 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_commands.mjs +27 -3
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_e2e.mjs +20 -7
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_evidence.mjs +143 -13
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_fold.mjs +168 -7
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_landing.mjs +139 -2
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_progress.mjs +25 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_reconcile.mjs +92 -4
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_wait.mjs +37 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_index.ts +572 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_index_real.ts +56 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_homecheck_scan.ts +4 -5
- package/skills/a2h-spec-design-pipeline/scripts/test_homegraph_docs.ts +217 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_permission_index.ts +214 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +155 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_platform_api_contract.ts +308 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_resolver_prompt.ts +59 -8
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_docs.ts +44 -0
- package/skills/a2h-spec-generate/SKILL.md +2 -2
- package/skills/a2h-spec-generate/references/specs.schema.json +24 -11
- package/skills/a2h-spec-generate/scripts/ensure-index.mjs +1 -2
- package/skills/a2h-spec-generate/test/ensure-index.test.mjs +1 -2
- package/skills/a2h-utg-explorer/SKILL.md +9 -3
- package/skills/a2h-utg-explorer/references/architecture.md +3 -0
- package/skills/a2h-utg-explorer/scripts/audit.mjs +8 -2
- package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +56 -5
- package/skills/a2h-utg-explorer/scripts/direct_launch.mjs +47 -2
- package/skills/a2h-utg-explorer/scripts/hybrid_route_cdp.mjs +376 -0
- package/skills/a2h-utg-explorer/scripts/plan.mjs +8 -0
- package/skills/a2h-utg-explorer/scripts/recover_d.mjs +288 -21
- package/skills/a2h-utg-explorer/scripts/report.mjs +89 -0
- package/skills/a2h-utg-explorer/scripts/run_cycle.mjs +67 -10
- package/skills/a2h-utg-explorer/scripts/run_device.mjs +10 -2
- package/skills/a2h-utg-explorer/scripts/seed_recipes.mjs +426 -0
- package/skills/a2h-utg-explorer/scripts/tests/blank_wait.test.mjs +126 -0
- package/skills/a2h-utg-explorer/scripts/tests/default_override.test.mjs +109 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_locale_dialogs.test.mjs +29 -0
- package/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +254 -0
- package/skills/a2h-utg-explorer/scripts/tests/foreground_spelling.test.mjs +155 -0
- package/skills/a2h-utg-explorer/scripts/tests/hybrid_route.test.mjs +120 -0
- package/skills/a2h-utg-explorer/scripts/tests/hybrid_route_identity.test.mjs +146 -0
- package/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +122 -0
- package/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +15 -0
- package/skills/a2h-utg-explorer/scripts/tests/pr169_review_fixes.test.mjs +218 -0
- package/skills/a2h-utg-explorer/scripts/tests/pr191_review_fixes.test.mjs +292 -0
- package/skills/a2h-utg-explorer/scripts/tests/recover_d_grounding.test.mjs +164 -0
- package/skills/a2h-utg-explorer/scripts/tests/replay_reroute.test.mjs +143 -0
- package/skills/a2h-utg-explorer/scripts/tests/run_cycle.test.mjs +6 -2
- package/skills/a2h-utg-explorer/scripts/tests/run_cycle_follow.test.mjs +35 -0
- package/skills/a2h-utg-explorer/scripts/tests/seed_recipes.test.mjs +261 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/adapters.mjs +122 -4
- package/skills/a2h-utg-explorer/scripts/utg_explorer/diagnostics.mjs +196 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/hybrid_route.mjs +140 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +138 -4
- package/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +47 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/strings.mjs +22 -13
- package/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +718 -42
- package/skills/a2h-utg-explorer/scripts/variant.mjs +57 -11
- package/skills/a2h-utg-static/SKILL.md +6 -2
- package/skills/a2h-utg-static/scripts/assemble.mjs +65 -0
- package/skills/a2h-utg-static/scripts/click_paths.mjs +116 -5
- package/skills/a2h-utg-static/scripts/compose_body_text.mjs +3 -3
- package/skills/a2h-utg-static/scripts/compose_overlay.mjs +8 -1
- package/skills/a2h-utg-static/scripts/compose_titles.mjs +5 -5
- package/skills/a2h-utg-static/scripts/compose_widgets.mjs +4 -4
- package/skills/a2h-utg-static/scripts/data_model.mjs +590 -0
- package/skills/a2h-utg-static/scripts/data_producers.mjs +431 -0
- package/skills/a2h-utg-static/scripts/hybrid_scope.mjs +46 -1
- package/skills/a2h-utg-static/scripts/label_resolve.mjs +49 -4
- package/skills/a2h-utg-static/scripts/lib/hybrid-provenance.mjs +201 -0
- package/skills/a2h-utg-static/scripts/lib/uniapp-routes.mjs +195 -0
- package/skills/a2h-utg-static/scripts/menu_nav.mjs +1 -1
- package/skills/a2h-utg-static/scripts/nl_hints.mjs +32 -4
- package/skills/a2h-utg-static/scripts/run_pipeline.mjs +86 -4
- package/skills/a2h-utg-static/scripts/tests/test_carry_answers.mjs +30 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +18 -0
- package/skills/a2h-utg-static/scripts/tests/test_data_model.mjs +120 -0
- package/skills/a2h-utg-static/scripts/tests/test_data_producers.mjs +114 -0
- package/skills/a2h-utg-static/scripts/tests/test_guard_kinds_locale.mjs +12 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_provenance.mjs +150 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +165 -1
- package/skills/a2h-utg-static/scripts/tests/test_library_activity.mjs +45 -0
- package/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +35 -1
- package/skills/a2h-utg-static/scripts/tests/test_nl_hints_default_override.mjs +50 -0
- package/skills/a2h-utg-static/scripts/tests/test_pipeline_llm_phases.mjs +21 -0
- package/skills/a2h-utg-static/scripts/tests/test_pr169_review_fixes.mjs +172 -0
- package/skills/a2h-utg-static/scripts/tests/test_redirect_path_cost.mjs +136 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_route_jump.mjs +175 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_routes.mjs +161 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +99 -0
- package/skills/a2h-utg-static/scripts/tests/test_utg_specgen_boundary.mjs +45 -0
- package/skills/a2h-utg-static/scripts/tests/test_vm_nav_helper_navigate.mjs +21 -0
- package/skills/a2h-utg-static/scripts/uniapp_nav.mjs +112 -69
- package/skills/a2h-utg-static/scripts/vm_nav.mjs +9 -1
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-cn.md +0 -55
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-en.md +0 -60
- package/skills/a2h-spec-design-pipeline/scripts/ensure_wt_index.ts +0 -948
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_wt_index.ts +0 -1014
|
@@ -6,21 +6,23 @@
|
|
|
6
6
|
* occludedIndices, treePackage, resolvePage, _SCREEN_KINDS, _shareRowContainer,
|
|
7
7
|
* _hostCompatible, _toolbarTitleCandidates, _selectedTabCandidates,
|
|
8
8
|
* _ownWidgetCandidates, _overlayLeadTitleCandidates, OVERLAY_KINDS, androidUnescape, androidValue, decodeAndroidString,
|
|
9
|
-
* panelHost, observationMatchesStatic
|
|
9
|
+
* panelHost, observationMatchesStatic, _hybridRouteOf, _hybridRouteResolution, _hybridModalOpen
|
|
10
10
|
*
|
|
11
11
|
* Python sets become JS Sets in insertion order. Where Python iterated a set of strings to
|
|
12
12
|
* build an ordered result (only `_toolbarTitleCandidates`, whose order Python leaves to the
|
|
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,17 +36,11 @@ 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
|
/**
|
|
46
42
|
* aapt's backslash escapes in an (already entity-decoded) strings.xml value: `\n`, `\t`, `\'`, `\"`,
|
|
47
|
-
* `\@`, `\uXXXX`. Only `\'` was undone before, so a title such as
|
|
43
|
+
* `\@`, `\uXXXX`. Only `\'` was undone before, so a title such as `你好,\n欢迎注册青商城` ("Hello,\nWelcome to Qing Mall") kept a literal
|
|
48
44
|
* backslash-n and never equalled the rendered two-line text.
|
|
49
45
|
*/
|
|
50
46
|
export function androidUnescape(value) {
|
|
@@ -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 "青商城" (Qing Mall) rendered "CoolMall", login
|
|
90
|
+
* "验证码登录" (code login) 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;
|
|
@@ -204,12 +169,19 @@ export function buildCatalog(graph, project = null, locale = 'en') {
|
|
|
204
169
|
component: truthy(g(expected, 'component')) ? g(expected, 'component') : g(expected, 'activity'),
|
|
205
170
|
basis: [], entry_labels: [] };
|
|
206
171
|
item.component = component;
|
|
172
|
+
// uni-app page: its route is what the runtime's page WebView reports as its text (_hybridRouteOf).
|
|
173
|
+
if (item.kind === 'hybrid-page') {
|
|
174
|
+
item.route = truthy(g(n, 'route')) ? S(n.route) : null;
|
|
175
|
+
item.appid = truthy(g(n, 'appid')) ? S(n.appid) : null;
|
|
176
|
+
}
|
|
207
177
|
const links = g(graph, 'links', g(graph, 'edges', []));
|
|
208
178
|
item.hosts_static_pages = links.some((e) => g(e, 'source') === ident && g(e, 'target') !== ident
|
|
209
179
|
&& !S(g(e, 'target', '')).startsWith('activity:'));
|
|
210
180
|
// Static openers: the pages with an edge into this one (used to tell layout twins apart).
|
|
211
181
|
item.opened_from = sortedStr(new Set(links.filter((e) => g(e, 'target') === ident && truthy(g(e, 'source'))
|
|
212
182
|
&& g(e, 'source') !== ident).map((e) => S(g(e, 'source')))));
|
|
183
|
+
// the parameterized template an instance node was made from (a2h-utg-static compose_overlay)
|
|
184
|
+
if (truthy(g(n, 'template_of'))) { item.template_of = S(g(n, 'template_of')); }
|
|
213
185
|
item.default_children = sortedStr(new Set(links.filter((e) => g(e, 'source') === ident && g(e, 'target') !== ident
|
|
214
186
|
&& !S(g(e, 'target', '')).startsWith('activity:')
|
|
215
187
|
&& (g(g(e, 'args') || {}, 'action') === 'default' || g(e, 'mechanism') === 'fragment-embed')
|
|
@@ -357,6 +329,15 @@ export function buildCatalog(graph, project = null, locale = 'en') {
|
|
|
357
329
|
}
|
|
358
330
|
}
|
|
359
331
|
}
|
|
332
|
+
// Static titles / hint titles / body texts in the device locale too (before the shared-title and
|
|
333
|
+
// unique-claim passes below, so a translation is claimed like its source text).
|
|
334
|
+
const deviceTexts = deviceTextsOf(project, locale);
|
|
335
|
+
const plus = (xs, norm) => [...new Set([...xs, ...xs.flatMap((t) => deviceTexts(t).map(norm))])];
|
|
336
|
+
for (const item of Object.values(catalog)) {
|
|
337
|
+
item.titles = plus(item.titles, (x) => x);
|
|
338
|
+
item.hint_titles = plus(item.hint_titles, (x) => x);
|
|
339
|
+
item.body_titles = plus(item.body_titles, normalized);
|
|
340
|
+
}
|
|
360
341
|
}
|
|
361
342
|
// Shared titles: a title / hint title / own body text that 2+ screens render (twins built on one
|
|
362
343
|
// scaffold: every feature's "Bookmarks" page). Not an anchor by itself -- resolvePage offers the
|
|
@@ -414,6 +395,8 @@ export function buildCatalog(graph, project = null, locale = 'en') {
|
|
|
414
395
|
}
|
|
415
396
|
}
|
|
416
397
|
for (const item of Object.values(catalog)) {
|
|
398
|
+
// every own source text, before the app-wide unique filter: _twinContrast compares twins on it
|
|
399
|
+
item.source_texts = sortedStr(new Set([...item.body_titles, ...item.titles.map(normalized), ...item.hint_titles.map(normalized)]));
|
|
417
400
|
item.body_titles = item.body_titles.filter((t) => claims.get(t) === 1 && !item.titles.map(normalized).includes(t));
|
|
418
401
|
}
|
|
419
402
|
// A prefix is an anchor only when no text or prefix of another page starts with it.
|
|
@@ -656,7 +639,8 @@ const textSet = (nodes, pred) => {
|
|
|
656
639
|
// resolvePage(obs, catalog, identity, 'pkg') (positional), or resolvePage(obs, catalog, {configured_identity, app_package}).
|
|
657
640
|
export function resolvePage(observation, catalog, configuredIdentity = null, opts = null) {
|
|
658
641
|
let appPackage = null;
|
|
659
|
-
|
|
642
|
+
let skipHybrid = false;
|
|
643
|
+
if (typeof opts === 'string') { appPackage = opts; } else if (opts && typeof opts === 'object') { appPackage = opts.app_package ?? null; skipHybrid = opts._skip_hybrid === true; }
|
|
660
644
|
if (configuredIdentity && typeof configuredIdentity === 'object' && !Array.isArray(configuredIdentity)
|
|
661
645
|
&& ('configured_identity' in configuredIdentity || 'app_package' in configuredIdentity)) {
|
|
662
646
|
appPackage = configuredIdentity.app_package ?? appPackage;
|
|
@@ -669,6 +653,24 @@ export function resolvePage(observation, catalog, configuredIdentity = null, opt
|
|
|
669
653
|
if (truthy(appPackage) && truthy(pkg) && pkg !== appPackage) {
|
|
670
654
|
return { status: 'foreign-package', candidates: [], package: pkg };
|
|
671
655
|
}
|
|
656
|
+
// A uni-app page names itself: the runtime's page WebView carries its route as text. It runs before
|
|
657
|
+
// the configured anchors, which read every stacked page WebView (the hidden tab pages too).
|
|
658
|
+
const hybrid = skipHybrid ? null : _hybridRouteResolution(g(observation, 'nodes', []), catalog);
|
|
659
|
+
if (hybrid) {
|
|
660
|
+
// A native dialog over the WebViews (showModal, an action sheet, a permission prompt): the route
|
|
661
|
+
// names the page behind it, not the screen. The other tiers may name the overlay, but never a page
|
|
662
|
+
// (they would read the hidden tab WebViews too). The same route in several bundles (a host app and
|
|
663
|
+
// a UniMP; the WebView text carries no appid): the other tiers may pick among the route's owners.
|
|
664
|
+
const modal = _hybridModalOpen(observation);
|
|
665
|
+
if (!modal && hybrid.status !== 'ambiguous') { return hybrid; }
|
|
666
|
+
const owners = hybrid.status === 'ambiguous' ? hybrid.candidates.map((c) => c.static_id) : [];
|
|
667
|
+
const accept = (id) => (modal ? OVERLAY_KINDS.includes(g(g(catalog, id, {}), 'kind')) : owners.includes(id));
|
|
668
|
+
const rest = resolvePage(observation, catalog, ci, { app_package: appPackage, _skip_hybrid: true });
|
|
669
|
+
if (g(rest, 'status') === 'verified' && accept(rest.static_id)) {
|
|
670
|
+
return { ...rest, reason: 'hybrid-webview-route+' + rest.reason, webview_route: hybrid.webview_route };
|
|
671
|
+
}
|
|
672
|
+
return modal ? { status: 'unmapped', candidates: [], webview_route: hybrid.webview_route, overlay_open: true } : hybrid;
|
|
673
|
+
}
|
|
672
674
|
if (g(ci, 'status') === 'verified' && Object.hasOwn(catalog, configuredId)) {
|
|
673
675
|
return { status: 'verified', static_id: configuredId, reason: 'configured-positive-anchor', anchors: [...g(ci, 'basis', [])] };
|
|
674
676
|
}
|
|
@@ -684,9 +686,117 @@ export function resolvePage(observation, catalog, configuredIdentity = null, opt
|
|
|
684
686
|
return { status: 'verified', static_id: learned[0], reason: 'learned-rule:' + rule.id,
|
|
685
687
|
anchors: rule.all.map((s) => Object.values(s)[0]) };
|
|
686
688
|
}
|
|
687
|
-
|
|
688
|
-
|
|
689
|
+
// Several learned rules at once decide nothing: the source tiers below still may. Measured
|
|
690
|
+
// (coolmall): UserAgreement / PrivacyPolicy rules ("User Agreement" / "Privacy Policy") both hit the
|
|
691
|
+
// consent line of every login and register page, and returning here left 14 captures ambiguous.
|
|
692
|
+
const learnedTie = learned.length > 1 ? learned.map((i) => ({ static_id: i, reason: 'learned-rule' })) : null;
|
|
693
|
+
const verdict = _resolveBySource(observation, nodes, catalog);
|
|
694
|
+
if (learnedTie && verdict.status !== 'verified' && !(verdict.status === 'ambiguous' && verdict.candidates.length)) {
|
|
695
|
+
return { status: 'ambiguous', candidates: learnedTie };
|
|
696
|
+
}
|
|
697
|
+
return verdict;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
// A uni-app page WebView's text: `<route>[<webview id>]` (pages/mine/mine[4],
|
|
701
|
+
// team/baseTeam/pages/enterprise/enterprise-index[2]).
|
|
702
|
+
const HYBRID_ROUTE = /^([A-Za-z0-9_.@-]+(?:\/[A-Za-z0-9_.@-]+)+)\[\d+\]$/;
|
|
703
|
+
|
|
704
|
+
/**
|
|
705
|
+
* _hybridRouteOf(nodes) -> the route of the uni-app page shown, or null. The runtime stacks one
|
|
706
|
+
* WebView per open page (tab pages stay loaded behind the current one) and reports every one as
|
|
707
|
+
* visible. The page on top is the one whose branch draws last where the branches part: the higher
|
|
708
|
+
* `drawing-order` of the two ancestors below their common one. Dump order does not tell it.
|
|
709
|
+
* Measured (app_uni_harmony): a 我的收藏 (My Favorites) capture dumped collect-category[4] first, under a
|
|
710
|
+
* ViewGroup drawn 5th, then the tab pages customIndex[2] / mine[3] under a FrameLayout drawn 4th;
|
|
711
|
+
* the screenshot showed 我的收藏 (My Favorites). Without drawing orders, the later in dump order wins.
|
|
712
|
+
*/
|
|
713
|
+
export function _hybridRouteOf(nodes) {
|
|
714
|
+
// Every visible WebView with an area takes part in the stacking, routed or not: a pushed page still
|
|
715
|
+
// loading (empty text) is on top, and the routed tab page below it is not the screen.
|
|
716
|
+
const routes = [];
|
|
717
|
+
nodes.forEach((n, i) => {
|
|
718
|
+
if (!S(g(n, 'class', '')).endsWith('WebView') || !vis(n)) { return; }
|
|
719
|
+
const b = g(n, 'bounds', null);
|
|
720
|
+
if (Array.isArray(b) && b.length === 4 && (b[2] <= b[0] || b[3] <= b[1])) { return; }
|
|
721
|
+
const m = HYBRID_ROUTE.exec(S(g(n, 'text', '')).trim());
|
|
722
|
+
routes.push([i, m ? m[1] : null]);
|
|
723
|
+
});
|
|
724
|
+
if (!routes.some(([, r]) => r !== null)) { return null; }
|
|
725
|
+
const chain = (i) => {
|
|
726
|
+
const out = [];
|
|
727
|
+
for (let k = i, guard = 0; inRange(k, nodes) && guard < 256; k = parentOf(nodes[k]), guard++) { out.unshift(k); }
|
|
728
|
+
return out;
|
|
729
|
+
};
|
|
730
|
+
const order = (k) => {
|
|
731
|
+
const v = Number.parseInt(S(g(nodes[k], 'drawing-order', g(nodes[k], 'drawing_order', ''))), 10);
|
|
732
|
+
return Number.isFinite(v) ? v : null;
|
|
733
|
+
};
|
|
734
|
+
// b above a?
|
|
735
|
+
const above = (a, b) => {
|
|
736
|
+
const ca = chain(a); const cb = chain(b);
|
|
737
|
+
let d = 0;
|
|
738
|
+
while (d < ca.length && d < cb.length && ca[d] === cb[d]) { d++; }
|
|
739
|
+
const oa = d < ca.length ? order(ca[d]) : null;
|
|
740
|
+
const ob = d < cb.length ? order(cb[d]) : null;
|
|
741
|
+
return oa !== null && ob !== null && oa !== ob ? ob > oa : b > a;
|
|
742
|
+
};
|
|
743
|
+
// A WebView drawn inside a routed page WebView's subtree (a <web-view> component) belongs to that page.
|
|
744
|
+
const routed = routes.filter(([, r]) => r !== null);
|
|
745
|
+
const owner = (i) => routed.find(([j]) => j !== i && chain(i).includes(j));
|
|
746
|
+
const pages = routes.filter(([i, r]) => r !== null || owner(i) === undefined);
|
|
747
|
+
let top = pages[0];
|
|
748
|
+
for (const r of pages.slice(1)) { if (above(top[0], r[0])) { top = r; } }
|
|
749
|
+
// Top WebView without a route (still loading): this tier does not decide.
|
|
750
|
+
return top[1];
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
/**
|
|
754
|
+
* A native modal window shown over the page WebViews: uni.showModal / showActionSheet, a permission
|
|
755
|
+
* prompt. Its dump still lists the page WebViews as visible, so the route would name the page behind
|
|
756
|
+
* it. Read from visible nodes only: the modal ids _ownWidgetCandidates reads, plus an id that starts
|
|
757
|
+
* with `dialog` / `alert` (dialog_title, alert_message), not one that only mentions it (btn_dialog_close).
|
|
758
|
+
*/
|
|
759
|
+
const _MODAL_IDS = ['alertTitle', 'parentPanel', 'design_bottom_sheet', 'permission_message'];
|
|
760
|
+
export function _hybridModalOpen(observation) {
|
|
761
|
+
const nodes = g(observation, 'nodes', []);
|
|
762
|
+
// Ancestors of the page WebViews (a host `dialog_container` holding them) are page chrome, not a modal.
|
|
763
|
+
const hosts = new Set();
|
|
764
|
+
nodes.forEach((n, i) => {
|
|
765
|
+
if (!S(g(n, 'class', '')).endsWith('WebView')) { return; }
|
|
766
|
+
for (let k = i, guard = 0; inRange(k, nodes) && guard < 256; k = parentOf(nodes[k]), guard++) { hosts.add(k); }
|
|
767
|
+
});
|
|
768
|
+
return g(observation, 'window') === 'dialog' || nodes.some((n, i) => {
|
|
769
|
+
if (!vis(n)) { return false; }
|
|
770
|
+
const id = tail(S(g(n, 'resource_id', '')));
|
|
771
|
+
return _MODAL_IDS.includes(id) || (/^(?:dialog|alert)(?:_|$)/i.test(id) && !hosts.has(i));
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* _hybridRouteResolution(nodes, catalog) -> a resolution from the shown uni-app route, or null when
|
|
777
|
+
* the catalog has no hybrid page or no page WebView names a route. A route no catalog page owns is
|
|
778
|
+
* unmapped: the other tiers would read the stacked pages behind it.
|
|
779
|
+
*/
|
|
780
|
+
export function _hybridRouteResolution(nodes, catalog) {
|
|
781
|
+
const pages = Object.entries(catalog).filter(([, p]) => g(p, 'kind') === 'hybrid-page');
|
|
782
|
+
if (!pages.length) { return null; }
|
|
783
|
+
const route = _hybridRouteOf(nodes);
|
|
784
|
+
if (!route) { return null; }
|
|
785
|
+
const owners = pages.filter(([ident, p]) => (truthy(g(p, 'route'))
|
|
786
|
+
? S(p.route).replace(/^\/+/, '') === route : ident.replace(/^hybrid-page:[^/]+\//, '') === route)).map(([ident]) => ident);
|
|
787
|
+
const anchors = ['webview-route:' + route];
|
|
788
|
+
if (owners.length === 1) {
|
|
789
|
+
return { status: 'verified', static_id: owners[0], reason: 'hybrid-webview-route', anchors, webview_route: route };
|
|
790
|
+
}
|
|
791
|
+
if (owners.length > 1) {
|
|
792
|
+
return { status: 'ambiguous', webview_route: route,
|
|
793
|
+
candidates: sortedStr(owners).map((static_id) => ({ static_id, reason: 'hybrid-webview-route', anchors })) };
|
|
689
794
|
}
|
|
795
|
+
return { status: 'unmapped', candidates: [], webview_route: route };
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/** resolvePage's source-anchor tiers (after configured and learned rules). */
|
|
799
|
+
function _resolveBySource(observation, nodes, catalog) {
|
|
690
800
|
const rid = (n) => S(g(n, 'resource_id', ''));
|
|
691
801
|
const modalTitles = textSet(nodes, (n) => ['alertTitle', 'dialog_title'].includes(tail(rid(n))));
|
|
692
802
|
const frameworkRows = textSet(nodes, (n) => tail(rid(n)) === 'title' && rid(n).endsWith(':id/title'));
|
|
@@ -761,7 +871,7 @@ export function resolvePage(observation, catalog, configuredIdentity = null, opt
|
|
|
761
871
|
const twins = _sharedTitleCandidates(nodes, catalog, observation);
|
|
762
872
|
const ids = new Set(twins.map((c) => c.static_id));
|
|
763
873
|
if (twins.length >= 2 && !(weakBody || []).some((c) => ids.has(g(c, 'static_id')))) {
|
|
764
|
-
return { status: 'ambiguous', candidates: twins };
|
|
874
|
+
return _twinContrast(nodes, twins, catalog) ?? { status: 'ambiguous', candidates: twins };
|
|
765
875
|
}
|
|
766
876
|
}
|
|
767
877
|
if (candidates.length === 1) { return { status: 'verified', ...candidates[0] }; }
|
|
@@ -859,6 +969,36 @@ export function _sharedTitleCandidates(nodes, catalog, observation) {
|
|
|
859
969
|
.map((i) => ({ static_id: i, reason: 'shared-title-twin', anchors }));
|
|
860
970
|
}
|
|
861
971
|
|
|
972
|
+
/** Texts on screen that tell shared-title twins apart: at least this many, or one this long. */
|
|
973
|
+
export const TWIN_CONTRAST_MIN = 2;
|
|
974
|
+
|
|
975
|
+
/**
|
|
976
|
+
* Shared-title twins told apart among THEMSELVES. The app-wide unique filter drops a text every
|
|
977
|
+
* feature's index page renders ("Favorites List", "Read More"), so it never anchored the index -- yet among
|
|
978
|
+
* one feature's twins (index / read / show built on one shared panel) only the index renders it.
|
|
979
|
+
* Measured (jingmo): 7 groups (Idioms, Lyrics, Poems, Proverbs, Sentences, Famous Lines, Poetry) stayed ambiguous this way.
|
|
980
|
+
* A twin is chosen only when TWIN_CONTRAST_MIN shown texts (or one of BODY_ANCHOR_MIN_CHARS) are in its
|
|
981
|
+
* source and in no other candidate's, and no other candidate qualifies the same way.
|
|
982
|
+
* Null when that does not single one out: the opener rule then decides.
|
|
983
|
+
*/
|
|
984
|
+
export function _twinContrast(nodes, twins, catalog) {
|
|
985
|
+
const shown = new Set();
|
|
986
|
+
for (const n of nodes) {
|
|
987
|
+
if (!vis(n)) { continue; }
|
|
988
|
+
for (const k of ['text', 'content_desc']) { if (truthy(g(n, k))) { shown.add(normalized(n[k])); } }
|
|
989
|
+
}
|
|
990
|
+
const texts = new Map(twins.map((c) => [c.static_id, new Set(g(g(catalog, c.static_id, {}), 'source_texts', []) || [])]));
|
|
991
|
+
const fits = [];
|
|
992
|
+
for (const c of twins) {
|
|
993
|
+
const own = [...shown].filter((t) => texts.get(c.static_id).has(t)
|
|
994
|
+
&& twins.every((o) => o.static_id === c.static_id || !texts.get(o.static_id).has(t)));
|
|
995
|
+
if (own.length >= TWIN_CONTRAST_MIN || own.some((t) => [...t].length >= BODY_ANCHOR_MIN_CHARS)) {
|
|
996
|
+
fits.push({ ...c, reason: 'twin-contrast', anchors: sortedStr(new Set([...(g(c, 'anchors', []) || []), ...own])) });
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
return fits.length === 1 ? { status: 'verified', ...fits[0] } : null;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
862
1002
|
/** Bar titles on screen: a TextView in a Toolbar (3 levels) or a Compose top bar title. */
|
|
863
1003
|
function _barTitles(nodes) {
|
|
864
1004
|
const inToolbar = (n) => {
|
|
@@ -1038,7 +1178,7 @@ export function _bottomTabRow(nodes) {
|
|
|
1038
1178
|
* NavigationBar, which inNavBar (View classes) cannot see. Measured (CoolMall 11-07): its "Cart"
|
|
1039
1179
|
* label counted as body text of GoodsRoutes.Detail, so the reached Category tab verified as the goods
|
|
1040
1180
|
* page and neither exact-page nor attestedArrival held. A goods page's own bottom bar
|
|
1041
|
-
* (Cart / Add to
|
|
1181
|
+
* (Cart / Add to Cart / Buy Now) shares at most one tab label and stays body text.
|
|
1042
1182
|
*/
|
|
1043
1183
|
export function _composeTabBarNodes(nodes, catalog) {
|
|
1044
1184
|
const labels = new Set(Object.values(catalog).map((p) => g(p, 'tab_label')).filter((t) => truthy(t)).map(normalized));
|
|
@@ -1154,9 +1294,19 @@ export function resolveTwinByOpener(resolution, prior, catalog) {
|
|
|
1154
1294
|
const weak = g(resolution, 'status') === 'unmapped' ? (g(resolution, 'weak_candidates') || []) : [];
|
|
1155
1295
|
if (weak.length) { return _weakByOpener(resolution, weak, prior, catalog); }
|
|
1156
1296
|
const cands = truthy(g(resolution, 'candidates')) ? resolution.candidates : [];
|
|
1157
|
-
|
|
1297
|
+
let kind = cands.length ? g(cands[0], 'reason') : null;
|
|
1298
|
+
// Instances of one template (`template_of`) that show one title (a cancel-reason sheet opened from
|
|
1299
|
+
// three pages): matched alike by any rule, they are twins when each has its own openers, none shared.
|
|
1300
|
+
// Measured (coolmall 2026-11-16): `overlay-lead-title-alone` on all three left the sheet unmapped.
|
|
1301
|
+
if (g(resolution, 'status') === 'ambiguous' && cands.length >= 2 && !['layout-twin', 'shared-title-twin'].includes(kind)
|
|
1302
|
+
&& cands.every((c) => g(c, 'reason') === kind)) {
|
|
1303
|
+
const tpl = new Set(cands.map((c) => g(g(catalog, g(c, 'static_id'), {}), 'template_of') ?? null));
|
|
1304
|
+
const ops = cands.map((c) => new Set(g(g(catalog, g(c, 'static_id'), {}), 'opened_from', []) || []));
|
|
1305
|
+
const disjoint = ops.every((s) => s.size) && ops.every((s, i) => ops.every((t, j) => i === j || ![...s].some((x) => t.has(x))));
|
|
1306
|
+
if (tpl.size === 1 && !tpl.has(null) && disjoint) { kind = 'layout-twin'; }
|
|
1307
|
+
}
|
|
1158
1308
|
if (g(resolution, 'status') !== 'ambiguous' || cands.length < 2 || !['layout-twin', 'shared-title-twin'].includes(kind)
|
|
1159
|
-
|| !cands.every((c) => g(c, 'reason') ===
|
|
1309
|
+
|| !cands.every((c) => g(c, 'reason') === cands[0].reason)) {
|
|
1160
1310
|
return resolution;
|
|
1161
1311
|
}
|
|
1162
1312
|
const pr = g(prior || {}, 'static_resolution', {});
|
|
@@ -1165,7 +1315,7 @@ export function resolveTwinByOpener(resolution, prior, catalog) {
|
|
|
1165
1315
|
// A shared-title twin captured again (content loaded, scrolled) is still the twin verified before
|
|
1166
1316
|
// -- unless another twin is opened FROM it: then "stayed" and "navigated to the child" look the
|
|
1167
1317
|
// same (measured, jingmo: riddle index and riddle read share only the title "Riddles"; after tapping
|
|
1168
|
-
// "Read
|
|
1318
|
+
// "Read More" the read page was kept as the index). Leave that ambiguous rather than guess.
|
|
1169
1319
|
const childOfPrior = (c) => g(c, 'static_id') !== p
|
|
1170
1320
|
&& (g(g(catalog, g(c, 'static_id'), {}), 'opened_from', []) || []).includes(p);
|
|
1171
1321
|
if (kind === 'shared-title-twin' && cands.some((c) => g(c, 'static_id') === p)) {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* state_phase.mjs — best-effort execution of a state phase that has no fixture/probe.
|
|
3
|
+
*
|
|
4
|
+
* A static plan puts pages behind login/content/data guards. When the campaign config carries no
|
|
5
|
+
* fixture and no probe for that state, the phase blocks: D (recover_d.mjs) then proposes a recipe
|
|
6
|
+
* for it and close_phases.mjs reports it. For a uni-app / hybrid app the fallback instead runs the
|
|
7
|
+
* phase's tasks against the current, verified device state and records that no probe was used.
|
|
8
|
+
*
|
|
9
|
+
* The fallback is on by default only for hybrid apps (isHybridApp). A native app keeps the
|
|
10
|
+
* blocking default: a best-effort run there would spend the task's only attempt
|
|
11
|
+
* (max_task_attempts=1) and settle the phase, so D would never produce its recipe. An explicit
|
|
12
|
+
* `state_phase_fallback: true|false` overrides the default either way.
|
|
13
|
+
*/
|
|
14
|
+
import { get, truthy, pyStr } from './_py.mjs';
|
|
15
|
+
import { isHybridPageNode } from './hybrid_route.mjs';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* A uni-app / hybrid app: its launcher is a hybrid page, or every page in the denominator is one
|
|
19
|
+
* (a pre-bundled APK whose native host activity is denominator:false). A native app that merely
|
|
20
|
+
* embeds some hybrid pages is not one.
|
|
21
|
+
*/
|
|
22
|
+
export function isHybridApp(doc) {
|
|
23
|
+
const nodes = Array.isArray(get(doc, 'nodes')) ? doc.nodes : [];
|
|
24
|
+
if (nodes.some((n) => isHybridPageNode(n) && (truthy(get(n, 'is_launcher')) || truthy(get(n, 'entry'))))) { return true; }
|
|
25
|
+
const pages = nodes.filter((n) => get(n, 'denominator') !== false && !truthy(get(n, 'out_of_scope')));
|
|
26
|
+
return pages.length > 0 && pages.every(isHybridPageNode);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** config.state_phase_fallback when set; otherwise on for a hybrid app (doc) and off for a native one. */
|
|
30
|
+
export function statePhaseFallbackEnabled(config, doc = null) {
|
|
31
|
+
const v = get(config, 'state_phase_fallback');
|
|
32
|
+
if (v !== undefined && v !== null) { return v !== false; }
|
|
33
|
+
return isHybridApp(doc);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Whether a phase with `requires` but no configured probes may run against the current device
|
|
38
|
+
* state. Returns null when it must still block, else the scope string recorded in the
|
|
39
|
+
* environment_verified event.
|
|
40
|
+
*/
|
|
41
|
+
export function fallbackScope(config, phase, probes, doc = null) {
|
|
42
|
+
if (!truthy(get(phase, 'requires'))) { return 'existing state, no guard assumed'; }
|
|
43
|
+
if (truthy(probes)) { return null; }
|
|
44
|
+
if (!statePhaseFallbackEnabled(config, doc)) { return null; }
|
|
45
|
+
return 'best-effort: no state probe configured; current device state (' +
|
|
46
|
+
(get(phase, 'requires', []) || []).map(pyStr).join(', ') + ')';
|
|
47
|
+
}
|