@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
|
@@ -5,6 +5,7 @@ import * as fs from 'fs';
|
|
|
5
5
|
import * as path from 'path';
|
|
6
6
|
import { argOf, argsOf, moduleLabels, resolveRoots, walkEts } from './core/cli.ts';
|
|
7
7
|
import { findings } from './core/findings.ts';
|
|
8
|
+
import { readBaseline, splitByBaseline, writeBaseline } from './core/baseline.ts';
|
|
8
9
|
import { EN, quoteName } from './core/i18n.ts';
|
|
9
10
|
import type { Finding } from './core/findings.ts';
|
|
10
11
|
import type { FileScan, MediaIndex } from './core/scan.ts';
|
|
@@ -18,13 +19,14 @@ import { checkFixedSizeExpandSafeArea } from './rules/fixed_size_safe_area.ts';
|
|
|
18
19
|
import { checkFormatStringWithoutArgs } from './rules/format_string.ts';
|
|
19
20
|
import { checkFrameworkDialogAppearance } from './rules/framework_dialog.ts';
|
|
20
21
|
import { checkFrameworkPickerAppearance } from './rules/framework_picker.ts';
|
|
21
|
-
import { checkPctAutoRoots } from './rules/layout_placement.ts';
|
|
22
|
+
import { checkPctAutoRoots, checkStackCustomKids } from './rules/layout_placement.ts';
|
|
22
23
|
import { checkMediaContentUsable } from './rules/media_content.ts';
|
|
23
24
|
import { checkFullViewportTint, checkRasterTint, checkSvgTintChannel } from './rules/media_tint.ts';
|
|
24
25
|
import { checkOffsetInScrollContent } from './rules/offset_in_scroll.ts';
|
|
25
26
|
import { checkOrphanComponents } from './rules/orphan_component.ts';
|
|
26
27
|
import { checkPageReachability } from './rules/page_reachability.ts';
|
|
27
28
|
import { checkPercentHeightInScroll } from './rules/percent_height_in_scroll.ts';
|
|
29
|
+
import { checkRelativeContainerInScroll } from './rules/relative_container_height.ts';
|
|
28
30
|
import { checkPopupMenuBound, checkPopupMenuDefaultLook } from './rules/popup_menu.ts';
|
|
29
31
|
import { checkRequestPermissions } from './rules/request_permission.ts';
|
|
30
32
|
import { checkRootWeightWrapped } from './rules/root_weight.ts';
|
|
@@ -32,9 +34,14 @@ import { checkSafeAreaInClippingAncestor } from './rules/safe_area_clipping.ts';
|
|
|
32
34
|
import { checkSharedChromePlacement } from './rules/shared_chrome.ts';
|
|
33
35
|
import { checkShellContent } from './rules/shell_content.ts';
|
|
34
36
|
import { checkStackOccludingSibling, loadColors } from './rules/stack_occluding.ts';
|
|
37
|
+
import { checkHitTest } from './rules/hit_test.ts';
|
|
38
|
+
import { checkEventDefaultClick } from './rules/event_default_click.ts';
|
|
39
|
+
import { checkWaterFlowSectionGaps } from './rules/waterflow_sections.ts';
|
|
40
|
+
import { checkLottieHost } from './rules/lottie_host.ts';
|
|
35
41
|
import { checkStringResources } from './rules/string_quote_leak.ts';
|
|
36
42
|
import { checkSurfaceStroke } from './rules/surface_stroke.ts';
|
|
37
|
-
import { checkThemeColors } from './rules/theme_color.ts';
|
|
43
|
+
import { checkRuntimeThemeColors, checkThemeColors } from './rules/theme_color.ts';
|
|
44
|
+
import { checkArrowInlineComponents, checkDialogControllerV2, checkStorageKeyTypes, checkThemeModeClosure } from './rules/runtime_traps.ts';
|
|
38
45
|
import { checkWideConstantWidth } from './rules/wide_constant_width.ts';
|
|
39
46
|
import { checkWindowMode } from './rules/window_mode.ts';
|
|
40
47
|
import { checkFile } from './scan_file.ts';
|
|
@@ -48,7 +55,7 @@ export function main(): void {
|
|
|
48
55
|
if (etsPatterns.length === 0) {
|
|
49
56
|
console.error('Usage: node arkts_static_check.ts --ets <.../<module>/src/main/ets> [--ets ...] \\');
|
|
50
57
|
console.error(' [--resources <.../<module>/src/main/resources> [--resources ...]] \\');
|
|
51
|
-
console.error(' [--android <android_project_dir>]');
|
|
58
|
+
console.error(' [--android <android_project_dir>] [--write-baseline <file> | --baseline <file>]');
|
|
52
59
|
console.error(' --ets/--resources may be repeated and accept wildcard segments, e.g. --ets "<proj>/features/*/src/main/ets"');
|
|
53
60
|
process.exit(2);
|
|
54
61
|
}
|
|
@@ -60,6 +67,18 @@ export function main(): void {
|
|
|
60
67
|
process.exit(2);
|
|
61
68
|
}
|
|
62
69
|
const resRoots: string[] = resolveRoots(resPatterns);
|
|
70
|
+
// Incremental mode (core/baseline.ts): --write-baseline records the project's findings before the run
|
|
71
|
+
// writes anything; --baseline sets them apart so only findings this run introduced gate.
|
|
72
|
+
const writeBaselineTo: string = argOf('--write-baseline');
|
|
73
|
+
const baselineFrom: string = argOf('--baseline');
|
|
74
|
+
if (writeBaselineTo !== '' && baselineFrom !== '') {
|
|
75
|
+
console.error('--write-baseline and --baseline are exclusive');
|
|
76
|
+
process.exit(2);
|
|
77
|
+
}
|
|
78
|
+
let baseline: ReturnType<typeof readBaseline> | null = null;
|
|
79
|
+
if (baselineFrom !== '') {
|
|
80
|
+
try { baseline = readBaseline(baselineFrom); } catch (e) { console.error((e as Error).message); process.exit(2); }
|
|
81
|
+
}
|
|
63
82
|
|
|
64
83
|
const etsLabels: string[] = moduleLabels(etsRoots);
|
|
65
84
|
const scans: FileScan[] = [];
|
|
@@ -108,16 +127,26 @@ export function main(): void {
|
|
|
108
127
|
checkFrameworkDialogAppearance(scans, androidDir);
|
|
109
128
|
checkBlurMirrored(scans, androidDir);
|
|
110
129
|
checkSurfaceStroke(scans, androidDir);
|
|
130
|
+
checkLottieHost(scans, androidDir);
|
|
111
131
|
}
|
|
112
132
|
checkEntryRootBuiltin(scans);
|
|
133
|
+
checkDialogControllerV2(scans);
|
|
134
|
+
checkArrowInlineComponents(scans);
|
|
135
|
+
checkThemeModeClosure(scans);
|
|
136
|
+
checkStorageKeyTypes(scans);
|
|
113
137
|
checkRootWeightWrapped(scans);
|
|
114
138
|
checkPctAutoRoots(scans);
|
|
139
|
+
checkStackCustomKids(scans);
|
|
115
140
|
checkSharedChromePlacement(scans);
|
|
116
141
|
checkPercentHeightInScroll(scans);
|
|
142
|
+
checkRelativeContainerInScroll(scans);
|
|
117
143
|
checkSafeAreaInClippingAncestor(scans);
|
|
118
144
|
checkFixedSizeExpandSafeArea(scans);
|
|
119
145
|
checkWideConstantWidth(scans);
|
|
120
146
|
checkStackOccludingSibling(scans, loadColors(resRoots));
|
|
147
|
+
checkHitTest(scans);
|
|
148
|
+
checkEventDefaultClick(scans);
|
|
149
|
+
checkWaterFlowSectionGaps(scans, androidDir);
|
|
121
150
|
checkOffsetInScrollContent(scans);
|
|
122
151
|
checkEntryRoute(scans, etsRoots);
|
|
123
152
|
checkRequestPermissions(etsRoots, argOf('--sdk') || process.env.DEVECO_SDK_HOME || '');
|
|
@@ -129,12 +158,15 @@ export function main(): void {
|
|
|
129
158
|
: path.join(path.resolve(etsRoots[0], '..', '..', '..', '..'), '.hometrans');
|
|
130
159
|
checkShellContent(scans, hometransDir);
|
|
131
160
|
checkThemeColors(scans, hometransDir);
|
|
161
|
+
checkRuntimeThemeColors(scans, hometransDir);
|
|
132
162
|
checkOrphanComponents(scans);
|
|
133
163
|
|
|
134
164
|
checkPageReachability(scans);
|
|
135
165
|
|
|
136
|
-
|
|
137
|
-
const
|
|
166
|
+
// a baseline-known finding is reported apart and never counts, GATE or CAND
|
|
167
|
+
const split = baseline ? splitByBaseline(findings, baseline) : { known: [] as Finding[], fresh: findings };
|
|
168
|
+
const gate: Finding[] = split.fresh.filter((f) => f.sev === 'GATE');
|
|
169
|
+
const cand: Finding[] = split.fresh.filter((f) => f.sev === 'CAND');
|
|
138
170
|
|
|
139
171
|
// Print the modules actually scanned — the easiest failure with a wrong wildcard is "only one module scanned",
|
|
140
172
|
// and in that case the output looks exactly like all passing; only this line reveals it.
|
|
@@ -168,6 +200,17 @@ export function main(): void {
|
|
|
168
200
|
console.log(` ${EN ? 'and ' : ''}${win}; do not change code just because this section has output.`);
|
|
169
201
|
}
|
|
170
202
|
|
|
203
|
+
if (baseline) {
|
|
204
|
+
console.log('\n' + `[BASELINE] 运行前已存在,不计入退出码 —— ${split.known.length} 条`);
|
|
205
|
+
for (const f of split.known) console.log(` ${f.sev.padEnd(4)} ${f.rule.padEnd(21)} ${f.file}:${f.line}`);
|
|
206
|
+
}
|
|
207
|
+
if (writeBaselineTo !== '') {
|
|
208
|
+
writeBaseline(writeBaselineTo, findings, etsRoots);
|
|
209
|
+
console.log('\n' + `[BASELINE] 已记录 ${findings.length} 条现有问题到 ${writeBaselineTo}`);
|
|
210
|
+
// recording is not gating: the project's own findings are the point of the file
|
|
211
|
+
process.exit(0);
|
|
212
|
+
}
|
|
213
|
+
|
|
171
214
|
process.exit(gate.length > 0 ? 1 : 0);
|
|
172
215
|
}
|
|
173
216
|
|
|
@@ -23,11 +23,15 @@ import { meta as formatString } from './rules/format_string.ts';
|
|
|
23
23
|
import { meta as frameworkDialog } from './rules/framework_dialog.ts';
|
|
24
24
|
import { meta as frameworkPicker } from './rules/framework_picker.ts';
|
|
25
25
|
import { meta as layoutPlacement } from './rules/layout_placement.ts';
|
|
26
|
+
import { meta as lottieHost } from './rules/lottie_host.ts';
|
|
26
27
|
import { meta as mediaContent } from './rules/media_content.ts';
|
|
27
28
|
import { meta as mediaTint } from './rules/media_tint.ts';
|
|
28
29
|
import { meta as offsetInScroll } from './rules/offset_in_scroll.ts';
|
|
30
|
+
import { meta as overlayBinds } from './rules/overlay_binds.ts';
|
|
29
31
|
import { meta as orphanComponent } from './rules/orphan_component.ts';
|
|
30
32
|
import { meta as paddingInSize } from './rules/padding_in_size.ts';
|
|
33
|
+
import { meta as inputTraps } from './rules/input_traps.ts';
|
|
34
|
+
import { meta as runtimeTraps } from './rules/runtime_traps.ts';
|
|
31
35
|
import { meta as pageReachability } from './rules/page_reachability.ts';
|
|
32
36
|
import { meta as pathCommandsVp } from './rules/path_commands_vp.ts';
|
|
33
37
|
import { meta as percentHeightInScroll } from './rules/percent_height_in_scroll.ts';
|
|
@@ -44,6 +48,9 @@ import { meta as sharedChrome } from './rules/shared_chrome.ts';
|
|
|
44
48
|
import { meta as sheetBlur } from './rules/sheet_blur.ts';
|
|
45
49
|
import { meta as shellContent } from './rules/shell_content.ts';
|
|
46
50
|
import { meta as stackOccluding } from './rules/stack_occluding.ts';
|
|
51
|
+
import { meta as hitTest } from './rules/hit_test.ts';
|
|
52
|
+
import { meta as eventDefaultClick } from './rules/event_default_click.ts';
|
|
53
|
+
import { meta as waterflowSections } from './rules/waterflow_sections.ts';
|
|
47
54
|
import { meta as stateDecorators } from './rules/state_decorators.ts';
|
|
48
55
|
import { meta as stateNameShadows } from './rules/state_name_shadows.ts';
|
|
49
56
|
import { meta as stringQuoteLeak } from './rules/string_quote_leak.ts';
|
|
@@ -51,6 +58,11 @@ import { meta as surfaceStroke } from './rules/surface_stroke.ts';
|
|
|
51
58
|
import { meta as themeColor } from './rules/theme_color.ts';
|
|
52
59
|
import { meta as trackGetter } from './rules/track_getter.ts';
|
|
53
60
|
import { meta as wideConstantWidth } from './rules/wide_constant_width.ts';
|
|
61
|
+
import { meta as dialogBackboard } from './rules/dialog_backboard.ts';
|
|
62
|
+
import { meta as imageSource } from './rules/image_source.ts';
|
|
63
|
+
import { meta as overlayString } from './rules/overlay_string.ts';
|
|
64
|
+
import { meta as relativeContainerHeight } from './rules/relative_container_height.ts';
|
|
65
|
+
import { meta as swiperIndex } from './rules/swiper_index.ts';
|
|
54
66
|
import { meta as windowMode } from './rules/window_mode.ts';
|
|
55
67
|
|
|
56
68
|
/** Rule module (path relative to static_check/) → its meta. */
|
|
@@ -74,11 +86,15 @@ export const MODULE_META: { module: string; meta: RuleMeta[] }[] = [
|
|
|
74
86
|
{ module: 'rules/framework_dialog.ts', meta: frameworkDialog },
|
|
75
87
|
{ module: 'rules/framework_picker.ts', meta: frameworkPicker },
|
|
76
88
|
{ module: 'rules/layout_placement.ts', meta: layoutPlacement },
|
|
89
|
+
{ module: 'rules/lottie_host.ts', meta: lottieHost },
|
|
77
90
|
{ module: 'rules/media_content.ts', meta: mediaContent },
|
|
78
91
|
{ module: 'rules/media_tint.ts', meta: mediaTint },
|
|
79
92
|
{ module: 'rules/offset_in_scroll.ts', meta: offsetInScroll },
|
|
93
|
+
{ module: 'rules/overlay_binds.ts', meta: overlayBinds },
|
|
80
94
|
{ module: 'rules/orphan_component.ts', meta: orphanComponent },
|
|
81
95
|
{ module: 'rules/padding_in_size.ts', meta: paddingInSize },
|
|
96
|
+
{ module: 'rules/input_traps.ts', meta: inputTraps },
|
|
97
|
+
{ module: 'rules/runtime_traps.ts', meta: runtimeTraps },
|
|
82
98
|
{ module: 'rules/page_reachability.ts', meta: pageReachability },
|
|
83
99
|
{ module: 'rules/path_commands_vp.ts', meta: pathCommandsVp },
|
|
84
100
|
{ module: 'rules/percent_height_in_scroll.ts', meta: percentHeightInScroll },
|
|
@@ -95,6 +111,9 @@ export const MODULE_META: { module: string; meta: RuleMeta[] }[] = [
|
|
|
95
111
|
{ module: 'rules/sheet_blur.ts', meta: sheetBlur },
|
|
96
112
|
{ module: 'rules/shell_content.ts', meta: shellContent },
|
|
97
113
|
{ module: 'rules/stack_occluding.ts', meta: stackOccluding },
|
|
114
|
+
{ module: 'rules/hit_test.ts', meta: hitTest },
|
|
115
|
+
{ module: 'rules/event_default_click.ts', meta: eventDefaultClick },
|
|
116
|
+
{ module: 'rules/waterflow_sections.ts', meta: waterflowSections },
|
|
98
117
|
{ module: 'rules/state_decorators.ts', meta: stateDecorators },
|
|
99
118
|
{ module: 'rules/state_name_shadows.ts', meta: stateNameShadows },
|
|
100
119
|
{ module: 'rules/string_quote_leak.ts', meta: stringQuoteLeak },
|
|
@@ -102,6 +121,11 @@ export const MODULE_META: { module: string; meta: RuleMeta[] }[] = [
|
|
|
102
121
|
{ module: 'rules/theme_color.ts', meta: themeColor },
|
|
103
122
|
{ module: 'rules/track_getter.ts', meta: trackGetter },
|
|
104
123
|
{ module: 'rules/wide_constant_width.ts', meta: wideConstantWidth },
|
|
124
|
+
{ module: 'rules/dialog_backboard.ts', meta: dialogBackboard },
|
|
125
|
+
{ module: 'rules/image_source.ts', meta: imageSource },
|
|
126
|
+
{ module: 'rules/overlay_string.ts', meta: overlayString },
|
|
127
|
+
{ module: 'rules/relative_container_height.ts', meta: relativeContainerHeight },
|
|
128
|
+
{ module: 'rules/swiper_index.ts', meta: swiperIndex },
|
|
105
129
|
{ module: 'rules/window_mode.ts', meta: windowMode },
|
|
106
130
|
];
|
|
107
131
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// static_check/rules/a11y.ts — split out of arkts_static_check.ts (logic unchanged).
|
|
2
2
|
|
|
3
3
|
import { report } from '../core/findings.ts';
|
|
4
|
-
import { BACKTICK, CONTROL_ROOTS, attrChainFrom, attrsWithArgs, hasAttr, lineOfIndex, matchBracket,
|
|
4
|
+
import { BACKTICK, CONTROL_ROOTS, attrChainFrom, attrsWithArgs, hasAttr, lineOfIndex, matchBracket, styleDecls } from '../core/parse.ts';
|
|
5
5
|
import type { UiAttr } from '../core/parse.ts';
|
|
6
6
|
import { ancestorsOf, builderCallSites, maskedOf, structCallSites } from '../core/scan.ts';
|
|
7
7
|
import type { CallSite, FileScan } from '../core/scan.ts';
|
|
@@ -436,22 +436,8 @@ export type A11yStyleDecl = { name: string; desc: boolean; scope: [number, numbe
|
|
|
436
436
|
* within its struct, and different structs may each have one with the same name, so they are recorded separately by scope (PR !97 re-review N1).
|
|
437
437
|
*/
|
|
438
438
|
export function a11yStyleDecls(code: string, masked: string): A11yStyleDecl[] {
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
let d: RegExpExecArray | null;
|
|
442
|
-
while ((d = re.exec(masked)) !== null) {
|
|
443
|
-
const pc: number = matchBracket(code, d.index + d[0].length - 1);
|
|
444
|
-
if (pc < 0) { continue; }
|
|
445
|
-
let k: number = pc + 1;
|
|
446
|
-
while (k < code.length && /\s/.test(code[k])) { k++; }
|
|
447
|
-
if (code[k] !== '{') { continue; }
|
|
448
|
-
const bc: number = matchBracket(code, k);
|
|
449
|
-
if (bc < 0) { continue; }
|
|
450
|
-
const member: boolean = d[1] === undefined && d[2] === undefined; // in-component @Styles does not write function
|
|
451
|
-
out.push({ name: d[3], desc: /\.accessibilityDescription\s*\(/.test(code.slice(k, bc)),
|
|
452
|
-
scope: member ? structBodyAt(code, masked, d.index) : null });
|
|
453
|
-
}
|
|
454
|
-
return out;
|
|
439
|
+
return styleDecls(code, masked).map((d) => ({ name: d.name, scope: d.scope,
|
|
440
|
+
desc: /\.accessibilityDescription\s*\(/.test(code.slice(d.body[0], d.body[1])) }));
|
|
455
441
|
}
|
|
456
442
|
|
|
457
443
|
/** If attribute name on the chain at pos is a @Styles / @Extend: whether it sets description. In-component same-name takes precedence over global. */
|
|
@@ -19,18 +19,8 @@ export const meta: RuleMeta[] = [
|
|
|
19
19
|
escape: null,
|
|
20
20
|
cases: [],
|
|
21
21
|
},
|
|
22
|
-
{
|
|
23
|
-
id: "fullsize-container",
|
|
24
|
-
levels: ["CAND"],
|
|
25
|
-
invariant: "interaction",
|
|
26
|
-
card: "interaction",
|
|
27
|
-
needs: [],
|
|
28
|
-
summary: "属性链同时有 `.width('100%')` 与 `.height('100%')`,却没有 `hitTestBehavior`。",
|
|
29
|
-
fix: "- `[CANDIDATES]` 段**不是缺陷**,只是把人工核对范围缩小。它列出的撑满容器与常量坐标是否正确,取决于 Android 源侧的锚定方向与层叠次序 —— 词法分析判不了。请把它当作「位置锚点证据」「交互可达性证据」「窗口模式证据」三项的待核对清单,逐条标注来源;**不要因为被列出就直接改代码**,撑满容器多数是合法的。",
|
|
30
|
-
escape: null,
|
|
31
|
-
cases: [],
|
|
32
|
-
},
|
|
33
22
|
];
|
|
23
|
+
// fullsize-container moved to rules/hit_test.ts: it is judged on the layer structure, not on one chain.
|
|
34
24
|
|
|
35
25
|
|
|
36
26
|
|
|
@@ -55,13 +45,5 @@ export function checkAttrChains(fctx: FileCtx): void {
|
|
|
55
45
|
report('GATE', 'pct-width-with-hmargin', rel, ch.start,
|
|
56
46
|
"width('100%') combined with left/right margin → 100% does not subtract the element's own margin, so it is wider than its parent and overflows on the right");
|
|
57
47
|
}
|
|
58
|
-
|
|
59
|
-
// ---- CAND R7: fills the container without declaring hitTestBehavior
|
|
60
|
-
// It is a real defect only when "also the last child in the stacking order" and "there are clickable elements below it";
|
|
61
|
-
// lexical analysis cannot decide those two points — so it is only a candidate.
|
|
62
|
-
if (RE_PCT_WIDTH.test(blob) && RE_PCT_HEIGHT.test(blob) && blob.indexOf('hitTestBehavior') < 0) {
|
|
63
|
-
report('CAND', 'fullsize-container', rel, ch.start,
|
|
64
|
-
'full-size container without hitTestBehavior: if it is the last child of the stack, it swallows taps on the elements below it');
|
|
65
|
-
}
|
|
66
48
|
}
|
|
67
49
|
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// static_check/rules/dialog_backboard.ts — GATE dialog-backboard-default.
|
|
2
|
+
|
|
3
|
+
import { report } from '../core/findings.ts';
|
|
4
|
+
import { lineOfIndex, matchBracket, maskStrings, splitTopLevel } from '../core/parse.ts';
|
|
5
|
+
import type { FileCtx } from '../core/scan.ts';
|
|
6
|
+
import type { RuleMeta } from '../core/meta.ts';
|
|
7
|
+
|
|
8
|
+
/** Rule metadata (rendered by scripts/gen_rule_docs.mjs). */
|
|
9
|
+
export const meta: RuleMeta[] = [
|
|
10
|
+
{
|
|
11
|
+
id: "dialog-backboard-default",
|
|
12
|
+
levels: ["GATE"],
|
|
13
|
+
invariant: "appearance",
|
|
14
|
+
card: "widgets",
|
|
15
|
+
needs: [],
|
|
16
|
+
summary: "`openCustomDialog(…)` / `new CustomDialogController({…})` 的选项(字面量,或同文件里用字面量初始化的变量)没有同时写 `backgroundBlurStyle` 和 `cornerRadius`(`CustomDialogController` 写了 `customStyle: true` 时不报)。",
|
|
17
|
+
fix: "弹窗背板有自己的默认外观:`cornerRadius` 默认 32vp;`backgroundBlurStyle` 在 API 26.0.0 之前默认 `COMPONENT_ULTRA_THICK`、之后为 `NONE`(promptAction / CustomDialog 文档),同一份代码在不同设备上外观不同。按 widgets 卡「对话框」段,背板就是 Android 的面板:选项里写 `backgroundBlurStyle: BlurStyle.NONE`、`backgroundColor: <面板色>`、`cornerRadius: <面板圆角>`、`width: '<面板占屏宽>%'`,builder 根节点不再加 padding / 背景 / 圆角;Android window 与 panel 之间的 inset 是透明的,不译成容器。",
|
|
18
|
+
escape: null,
|
|
19
|
+
cases: [
|
|
20
|
+
"实测(天气设置页单选对话框,glm53 11-19):`openCustomDialog({ width: '95%' })` 只写宽度,measure_pack 的配方把 Android 透明的 16dp window inset 译成 builder 根节点 `padding(16)`,白色面板外面多出一圈背板;用户反馈「方框之外还包着一层背景」。",
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
/** The object literal `{…}` an expression stands for: itself, or the initialiser of an identifier declared in this file. */
|
|
26
|
+
function optionObject(code: string, masked: string, expr: string): string | null {
|
|
27
|
+
const e: string = expr.trim();
|
|
28
|
+
if (e.startsWith('{') && e.endsWith('}')) { return e; }
|
|
29
|
+
const id: RegExpExecArray | null = /^(?:this\.)?([A-Za-z_$][\w$]*)$/.exec(e);
|
|
30
|
+
if (id === null) { return null; }
|
|
31
|
+
const decl: RegExpExecArray | null = new RegExp(`\\b${id[1]}\\s*(?::[^=;{]+)?=\\s*\\{`).exec(masked);
|
|
32
|
+
if (decl === null) { return null; }
|
|
33
|
+
const open: number = decl.index + decl[0].length - 1;
|
|
34
|
+
const close: number = matchBracket(code, open);
|
|
35
|
+
return close < 0 ? null : code.slice(open, close + 1);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** `new ComponentContent(…)` inline, or an identifier initialised with one in this file. */
|
|
39
|
+
function isComponentContent(masked: string, expr: string): boolean {
|
|
40
|
+
const e: string = expr.trim();
|
|
41
|
+
if (/^new\s+ComponentContent\b/.test(e)) { return true; }
|
|
42
|
+
const id: RegExpExecArray | null = /^(?:this\.)?([A-Za-z_$][\w$]*)$/.exec(e);
|
|
43
|
+
return id !== null && new RegExp(`\\b${id[1]}\\s*(?::[^=;]+)?=\\s*new\\s+ComponentContent\\b`).test(masked);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Top-level keys of an object literal `{ a: …, b, … }`. */
|
|
47
|
+
function keysOf(obj: string): Set<string> {
|
|
48
|
+
const out: Set<string> = new Set();
|
|
49
|
+
for (const e of splitTopLevel(obj.slice(1, -1))) {
|
|
50
|
+
const k: RegExpExecArray | null = /^\s*([A-Za-z_$][\w$]*)\s*(?::|,|$)/.exec(e);
|
|
51
|
+
if (k !== null) { out.add(k[1]); }
|
|
52
|
+
}
|
|
53
|
+
return out;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* GATE dialog-backboard-default: a custom dialog whose backboard keeps its defaults. The backboard has a 32vp default
|
|
58
|
+
* corner radius and a default blur that changed with API 26.0.0 (COMPONENT_ULTRA_THICK before, NONE after), so an
|
|
59
|
+
* unstyled backboard both adds a layer the source has none of and looks different per device. Options are judged
|
|
60
|
+
* when they are visible: an object literal, or an identifier initialised with one in this file.
|
|
61
|
+
*/
|
|
62
|
+
export function checkDialogBackboardDefault(fctx: FileCtx): void {
|
|
63
|
+
const masked: string = maskStrings(fctx.code);
|
|
64
|
+
const re: RegExp = /\bopenCustomDialog\s*\(|\bnew\s+CustomDialogController\s*\(/g;
|
|
65
|
+
let m: RegExpExecArray | null;
|
|
66
|
+
while ((m = re.exec(masked)) !== null) {
|
|
67
|
+
const open: number = m.index + m[0].length - 1;
|
|
68
|
+
const close: number = matchBracket(fctx.code, open);
|
|
69
|
+
if (close < 0) { continue; }
|
|
70
|
+
const args: string[] = splitTopLevel(fctx.code.slice(open + 1, close));
|
|
71
|
+
const controller: boolean = /CustomDialogController/.test(m[0]);
|
|
72
|
+
// openCustomDialog(options) | openCustomDialog(ComponentContent, options?) | new CustomDialogController(options)
|
|
73
|
+
let opt: string | null = null;
|
|
74
|
+
for (const a of controller ? args.slice(0, 1) : args.slice(0, 2).reverse()) {
|
|
75
|
+
opt = optionObject(fctx.code, masked, a);
|
|
76
|
+
if (opt !== null) { break; }
|
|
77
|
+
}
|
|
78
|
+
// openCustomDialog(<ComponentContent>) with no options keeps every default; other unresolved options are not visible.
|
|
79
|
+
const bareContent: boolean = !controller && args.length === 1 && isComponentContent(masked, args[0]);
|
|
80
|
+
if (opt === null && !bareContent) { continue; }
|
|
81
|
+
const keys: Set<string> = opt === null ? new Set() : keysOf(opt);
|
|
82
|
+
if (controller && opt !== null && /\bcustomStyle\s*:\s*true\b/.test(opt)) { continue; }
|
|
83
|
+
const missing: string[] = ['backgroundBlurStyle', 'cornerRadius'].filter((k) => !keys.has(k));
|
|
84
|
+
if (missing.length === 0) { continue; }
|
|
85
|
+
report('GATE', 'dialog-backboard-default', fctx.rel, lineOfIndex(fctx.code, m.index),
|
|
86
|
+
`${controller ? 'CustomDialogController' : 'openCustomDialog'} options leave ${missing.join(' and ')} at the backboard default ` +
|
|
87
|
+
'(cornerRadius 32vp; blur COMPONENT_ULTRA_THICK before API 26.0.0, NONE after): the backboard becomes an extra layer around the panel ' +
|
|
88
|
+
'and looks different per device. Make the backboard the Android panel: backgroundBlurStyle: BlurStyle.NONE, backgroundColor <panel>, ' +
|
|
89
|
+
"cornerRadius <panel radius>, width '<panel % of screen>'; no padding / background on the builder root (the Android window inset is transparent)");
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
// static_check/rules/event_default_click.ts — a component that always binds .onClick to an event parameter the caller
|
|
2
|
+
// may leave out (empty-function default, or optional / undefined default), used without that event inside a clickable
|
|
3
|
+
// ancestor: the child takes the tap and the ancestor's onClick never fires.
|
|
4
|
+
|
|
5
|
+
import * as path from 'path';
|
|
6
|
+
import { report } from '../core/findings.ts';
|
|
7
|
+
import { attrsWithArgs, lineOfIndex, markedAbove, matchBracket } from '../core/parse.ts';
|
|
8
|
+
import type { UiAttr } from '../core/parse.ts';
|
|
9
|
+
import { maskedOf, structCallSites, structDeclFor, walkUp } from '../core/scan.ts';
|
|
10
|
+
import type { FileScan } from '../core/scan.ts';
|
|
11
|
+
import type { RuleMeta } from '../core/meta.ts';
|
|
12
|
+
|
|
13
|
+
/** Rule metadata (rendered by scripts/gen_rule_docs.mjs). */
|
|
14
|
+
export const meta: RuleMeta[] = [
|
|
15
|
+
{
|
|
16
|
+
id: "event-default-click-swallows-parent",
|
|
17
|
+
levels: ["GATE"],
|
|
18
|
+
invariant: "interaction",
|
|
19
|
+
card: "interaction",
|
|
20
|
+
needs: [],
|
|
21
|
+
summary: "组件 build() 里无条件 `.onClick(…)` 只调用 `this.X()` / `this.X?.()`(箭头可带参数,如 `(e) => this.X(e)`),X 是调用方可以不传的 `@Event` / 回调参数(默认空函数,或可空 / 默认 undefined);该绑定没有随 X 是否传入切换的 `hitTestBehavior`(写死 `HitTestMode.Default` 等常量不算),也不在 `if (this.X …)` 分支里;某个调用处没传 X,而它的祖先节点(含跨文件调用链)写了 `.onClick`。多个模块有同名组件时,调用处按 import / 所在模块对应到具体那份声明。",
|
|
22
|
+
fix: "ArkUI 的点击事件由命中的最内层节点响应,子节点绑了 onClick(哪怕回调是空函数)就会收走点击,祖先的 onClick 不再触发。Compose 的 `onClick: (() -> Unit)? = null` 只在非空时才加 `clickable`,不能翻译成「默认空函数 + 无条件绑定」。两步都要做:把参数声明成可空 `@Event X: (() => void) | undefined = undefined`,并让没传时不参与命中:`.onClick(() => { this.X?.() })` 加 `.hitTestBehavior(this.X === undefined ? HitTestMode.None : HitTestMode.Default)`;只改默认值不加 hitTestBehavior,节点照样收走点击。调用处不需要点击时也可以改用不带点击的组件。确认该调用处本来就不该触发祖先点击时,在调用处上方写 `// CLICK-OWNER: <依据>` 关闭本条。",
|
|
23
|
+
escape: "// CLICK-OWNER:",
|
|
24
|
+
cases: [
|
|
25
|
+
"实测(CoolMall 我的订单页):共享 AppText 无条件 .onClick(() => { this.onTap() }),onTap 默认空函数(Android Text.kt onClick: (() -> Unit)? = null,只在非空时 clickable);页签 Stack.onClick 里的文字是未传 onTap 的 AppText,点页签文字被 AppText 收走,页签无法点击,只能左右滑动切换。",
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* `.onClick(() => { this.X() })` / `.onClick((e: ClickEvent) => this.X(e))` / `.onClick(() => this.X?.())` /
|
|
32
|
+
* `.onClick(this.X)` → X. The arrow may take parameters and pass them on; its body is that one call.
|
|
33
|
+
*/
|
|
34
|
+
export function clickTarget(args: string): string | null {
|
|
35
|
+
const call: string = String.raw`this\.([A-Za-z_$][\w$]*)\s*(?:\?\.)?\s*\([^()]*\)`;
|
|
36
|
+
const m: RegExpMatchArray | null = args.match(new RegExp(
|
|
37
|
+
String.raw`^\s*(?:(?:\([^()]*\)|[A-Za-z_$][\w$]*)\s*(?::\s*void\s*)?=>\s*(?:\{\s*${call}\s*;?\s*\}|${call})|this\.([A-Za-z_$][\w$]*))\s*$`));
|
|
38
|
+
return m === null ? null : (m[1] ?? m[2] ?? m[3]);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
type LeaveOut = 'empty' | 'optional';
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Event-like members of the struct body a caller may leave out, and how: `empty` — the default is an empty function
|
|
45
|
+
* (`@Event x: () => void = () => {}`); `optional` — the member is optional or defaults to undefined
|
|
46
|
+
* (`x: (() => void) | undefined = undefined`, `x?: () => void`). With an unconditional `.onClick` both keep the node
|
|
47
|
+
* in hit testing: the optional form only stops the call, not the hit.
|
|
48
|
+
*/
|
|
49
|
+
export function leaveOutEvents(body: string): Map<string, LeaveOut> {
|
|
50
|
+
const out: Map<string, LeaveOut> = new Map();
|
|
51
|
+
const head: string = String.raw`(?:@(?:Event|BuilderParam|Param|Prop)\s+|^\s*)(?:(?:private|public|protected)\s+)?([A-Za-z_$][\w$]*)`;
|
|
52
|
+
const fn: string = String.raw`\([^()]*\)\s*=>\s*void`;
|
|
53
|
+
const empty: RegExp = new RegExp(head + String.raw`\s*:\s*${fn}\s*=\s*\([^()]*\)\s*(?::\s*void\s*)?=>\s*\{\s*\}`, 'gm');
|
|
54
|
+
for (const m of body.matchAll(empty)) { out.set(m[1], 'empty'); }
|
|
55
|
+
const optional: RegExp = new RegExp(head + String.raw`\s*(?:\?\s*:\s*\(?\s*${fn}\s*\)?(?:\s*\|\s*undefined)?|` +
|
|
56
|
+
String.raw`:\s*\(\s*${fn}\s*\)\s*\|\s*undefined)(?:\s*=\s*undefined)?\s*;?\s*$`, 'gm');
|
|
57
|
+
for (const m of body.matchAll(optional)) { if (!out.has(m[1])) { out.set(m[1], 'optional'); } }
|
|
58
|
+
return out;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** Whether `.hitTestBehavior(args)` keeps the node out of hit testing when ev is not passed. */
|
|
62
|
+
function hitTestTracksEvent(args: string, ev: string): boolean {
|
|
63
|
+
if (/^\s*HitTestMode\.None\s*$/.test(args)) { return true; } // never hit: its own click is dead, but nothing is swallowed
|
|
64
|
+
return new RegExp(String.raw`\bthis\.${ev.replace(/\$/g, '\\$')}\b`).test(args) && /\bHitTestMode\.None\b/.test(args);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** Whether the `.onClick` at dot sits inside an `if (…this.ev…) { … }` block of build(): bound only when passed. */
|
|
68
|
+
function insideEventBranch(masked: string, from: number, dot: number, ev: string): boolean {
|
|
69
|
+
const evRe: RegExp = new RegExp(String.raw`\bthis\.${ev.replace(/\$/g, '\\$')}\b`);
|
|
70
|
+
let depth: number = 0;
|
|
71
|
+
for (let i = dot - 1; i > from; i--) {
|
|
72
|
+
const c: string = masked[i];
|
|
73
|
+
if (c === '}' || c === ')' || c === ']') { depth++; continue; }
|
|
74
|
+
if (c !== '{' && c !== '(' && c !== '[') { continue; }
|
|
75
|
+
if (depth > 0) { depth--; continue; }
|
|
76
|
+
if (c !== '{') { continue; }
|
|
77
|
+
const head: RegExpMatchArray | null = masked.slice(Math.max(from, i - 200), i).match(/\bif\s*\(([^{}]*)\)\s*$/);
|
|
78
|
+
if (head !== null && evRe.test(head[1])) { return true; }
|
|
79
|
+
}
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** build() of the struct `name` declared in s itself (not the first same-name struct of any file). */
|
|
84
|
+
function ownBuild(s: FileScan, masked: string, name: string): { bodyOpen: number; open: number; close: number } | null {
|
|
85
|
+
const sm: RegExpExecArray | null = new RegExp(String.raw`\bstruct\s+${name.replace(/\$/g, '\\$')}\b[^{]*\{`).exec(masked);
|
|
86
|
+
if (sm === null) { return null; }
|
|
87
|
+
const bodyOpen: number = sm.index + sm[0].length - 1;
|
|
88
|
+
const bodyClose: number = matchBracket(masked, bodyOpen);
|
|
89
|
+
const re: RegExp = /\bbuild\s*\(\s*\)\s*(?::\s*void\s*)?\{/g;
|
|
90
|
+
re.lastIndex = bodyOpen;
|
|
91
|
+
const bm: RegExpExecArray | null = re.exec(masked);
|
|
92
|
+
if (bm === null || bodyClose < 0 || bm.index > bodyClose) { return null; }
|
|
93
|
+
const open: number = bm.index + bm[0].length - 1;
|
|
94
|
+
const close: number = matchBracket(masked, open);
|
|
95
|
+
return close > open ? { bodyOpen, open, close } : null;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function checkEventDefaultClick(scans: FileScan[]): void {
|
|
99
|
+
const declCount: Map<string, number> = new Map();
|
|
100
|
+
for (const s of scans) { for (const n of s.declaredStructs) { declCount.set(n, (declCount.get(n) || 0) + 1); } }
|
|
101
|
+
for (const s of scans) {
|
|
102
|
+
const masked: string = maskedOf(s);
|
|
103
|
+
for (const name of s.declaredStructs) {
|
|
104
|
+
const b = ownBuild(s, masked, name);
|
|
105
|
+
if (b === null) { continue; }
|
|
106
|
+
const events: Map<string, LeaveOut> = leaveOutEvents(s.code.slice(b.bodyOpen + 1, b.open));
|
|
107
|
+
if (events.size === 0) { continue; }
|
|
108
|
+
// Every `.onClick(` in build() bound to one of those events, outside an `if (this.X …)` branch, on a chain whose
|
|
109
|
+
// hitTestBehavior (if any) does not drop the node when the event is missing.
|
|
110
|
+
const bound: Map<string, number> = new Map();
|
|
111
|
+
for (const m of masked.slice(b.open, b.close).matchAll(/\.onClick\s*\(/g)) {
|
|
112
|
+
const dot: number = b.open + (m.index ?? 0);
|
|
113
|
+
const paren: number = dot + m[0].length - 1;
|
|
114
|
+
const close: number = matchBracket(masked, paren);
|
|
115
|
+
if (close < 0) { continue; }
|
|
116
|
+
const target: string | null = clickTarget(s.code.slice(paren + 1, close));
|
|
117
|
+
if (target === null || !events.has(target) || bound.has(target)) { continue; }
|
|
118
|
+
const ownerAttrs: UiAttr[] = ownerChain(s.code, masked, b.open, dot);
|
|
119
|
+
if (ownerAttrs.some((a) => a.name === 'hitTestBehavior' && hitTestTracksEvent(a.args, target))) { continue; }
|
|
120
|
+
if (insideEventBranch(masked, b.open, dot, target)) { continue; }
|
|
121
|
+
bound.set(target, dot);
|
|
122
|
+
}
|
|
123
|
+
for (const [ev, at] of bound) {
|
|
124
|
+
checkCallSites(scans, s, name, ev, events.get(ev) as LeaveOut, at, (declCount.get(name) || 0) > 1);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/** Attributes of the component statement that owns the `.onClick` at dot (searched back within build()). */
|
|
131
|
+
function ownerChain(code: string, masked: string, from: number, dot: number): UiAttr[] {
|
|
132
|
+
const re: RegExp = /(?<![\w$.])([A-Z][\w$]*)\s*\(/g;
|
|
133
|
+
re.lastIndex = from;
|
|
134
|
+
let best: UiAttr[] = [];
|
|
135
|
+
let m: RegExpExecArray | null;
|
|
136
|
+
while ((m = re.exec(masked)) !== null && m.index < dot) {
|
|
137
|
+
const attrs: UiAttr[] = attrsWithArgs(code, m.index + m[0].length - 1);
|
|
138
|
+
if (attrs.some((a) => a.index === dot)) { best = attrs; }
|
|
139
|
+
}
|
|
140
|
+
return best;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* One finding per (component, event), at the unconditional `.onClick` in the declaration: the fix belongs there, and
|
|
145
|
+
* a shared text component used under clickable rows would otherwise print one row per call site. With same-name
|
|
146
|
+
* structs in several files only the call sites that resolve to this declaration count (structDeclFor).
|
|
147
|
+
*/
|
|
148
|
+
function checkCallSites(scans: FileScan[], decl: FileScan, name: string, ev: string, kind: LeaveOut,
|
|
149
|
+
at: number, ambiguous: boolean): void {
|
|
150
|
+
const evRe: RegExp = new RegExp(`(?:^|[{,\\s])${ev.replace(/\$/g, '\\$')}\\s*:`);
|
|
151
|
+
const declAbs: string = path.resolve(decl.abs);
|
|
152
|
+
const swallowed: string[] = [];
|
|
153
|
+
for (const site of structCallSites(scans, name)) {
|
|
154
|
+
if (ambiguous && structDeclFor(scans, site.scan, name) !== declAbs) { continue; }
|
|
155
|
+
const close: number = matchBracket(maskedOf(site.scan), site.paren);
|
|
156
|
+
if (close < 0) { continue; }
|
|
157
|
+
if (evRe.test(site.scan.code.slice(site.paren + 1, close))) { continue; }
|
|
158
|
+
if (attrsWithArgs(site.scan.code, site.paren).some((a) => a.name === 'onClick' ||
|
|
159
|
+
(a.name === 'hitTestBehavior' && /^\s*HitTestMode\.None\s*$/.test(a.args)))) { continue; }
|
|
160
|
+
const line: number = lineOfIndex(site.scan.code, site.index);
|
|
161
|
+
if (markedAbove(site.scan.src.split(/\r?\n/), line, 'CLICK-OWNER')) { continue; }
|
|
162
|
+
const hits: string[][] = [];
|
|
163
|
+
walkUp(scans, site.scan, site.index,
|
|
164
|
+
(a) => (a.attrs.some((x) => x.name === 'onClick') ? 'hit' : 'continue'), [], hits, new Set([name]));
|
|
165
|
+
if (hits.length === 0) { continue; }
|
|
166
|
+
swallowed.push(`${site.scan.rel}:${line} (under ${hits[0][hits[0].length - 1]}.onClick)`);
|
|
167
|
+
}
|
|
168
|
+
if (swallowed.length === 0) { return; }
|
|
169
|
+
const what: string = kind === 'empty'
|
|
170
|
+
? `${name} always binds .onClick to this.${ev}(), and ${ev} defaults to an empty function`
|
|
171
|
+
: `${name} declares ${ev} optional but binds .onClick to it unconditionally, so the node stays in hit testing when ${ev} is not passed`;
|
|
172
|
+
report('GATE', 'event-default-click-swallows-parent', decl.rel, lineOfIndex(decl.code, at),
|
|
173
|
+
`${what}; ${swallowed.length} call site(s) pass no ${ev} inside a clickable ancestor, e.g. ` +
|
|
174
|
+
`${swallowed.slice(0, 3).join(', ')}${swallowed.length > 3 ? ', …' : ''}: the tap lands on ${name} and the ancestor's ` +
|
|
175
|
+
`onClick never fires. ` +
|
|
176
|
+
(kind === 'empty' ? `Declare ${ev} as (() => void) | undefined, call this.${ev}?.(), and keep` : 'Keep') +
|
|
177
|
+
` ${name} out of hit testing when it is undefined ` +
|
|
178
|
+
`(.hitTestBehavior(this.${ev} === undefined ? HitTestMode.None : HitTestMode.Default))`);
|
|
179
|
+
}
|