@buaa_smat/hometrans 26.0.3 → 26.0.4-devecocli.1
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/agents/code-reviewer.md +91 -21
- package/devecocli-plugin/common.ts +2271 -0
- package/devecocli-plugin/content-resolver.ts +363 -0
- package/devecocli-plugin/install.ts +72 -0
- package/devecocli-plugin/uninstall.ts +26 -0
- package/devecocli-plugin/update.ts +77 -0
- 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/index.js +1643 -0
- package/package.json +10 -13
- package/plugin.jsonc +12 -0
- 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/README.md +0 -440
- package/dist/cli/config-store.js +0 -128
- package/dist/cli/config.js +0 -48
- package/dist/cli/editors.json +0 -114
- package/dist/cli/env-vars.js +0 -127
- package/dist/cli/index.js +0 -76
- package/dist/cli/init.js +0 -2618
- package/dist/cli/uninstall.js +0 -406
- package/dist/platform/compose.js +0 -228
- package/dist/platform/frontmatter.js +0 -151
- package/dist/platform/installer.js +0 -417
- package/dist/platform/language.js +0 -77
- package/dist/platform/registry.js +0 -337
- package/dist/platform/transform.js +0 -363
- package/dist/platform/types.js +0 -9
- package/dist/platform/validate.js +0 -152
- package/dist/utils/regex.js +0 -7
- package/env-requirements.json +0 -536
- package/resource/choose_editor.png +0 -0
- package/resource/convert_pipeline_process.svg +0 -114
- package/resource/project_architecture.svg +0 -120
- package/resource/set_environment.png +0 -0
- package/resource/set_multimodel.png +0 -0
- package/resource/set_sdk.png +0 -0
- package/resource/title_dark.png +0 -0
- 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
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
// arkts_static_check: API-semantics rules the compiler accepts — overlay-string-color, image-source-typed-array,
|
|
2
|
+
// swiper-index-unbound, dialog-backboard-default, relative-container-unsized-in-scroll.
|
|
3
|
+
// Run from scripts/: node --test tests/arkts_static_check_runtime_api.test.mjs
|
|
4
|
+
import { test } from 'node:test';
|
|
5
|
+
import assert from 'node:assert/strict';
|
|
6
|
+
import { spawnSync } from 'node:child_process';
|
|
7
|
+
import * as fs from 'node:fs';
|
|
8
|
+
import * as os from 'node:os';
|
|
9
|
+
import * as path from 'node:path';
|
|
10
|
+
import { fileURLToPath } from 'node:url';
|
|
11
|
+
|
|
12
|
+
const CHECKER = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', 'arkts_static_check.ts');
|
|
13
|
+
|
|
14
|
+
/** files: { 'pages/X.ets': src } -> stdout */
|
|
15
|
+
function run(files) {
|
|
16
|
+
const proj = fs.mkdtempSync(path.join(os.tmpdir(), 'asc-api-'));
|
|
17
|
+
const ets = path.join(proj, 'entry/src/main/ets');
|
|
18
|
+
try {
|
|
19
|
+
for (const [rel, src] of Object.entries(files)) {
|
|
20
|
+
fs.mkdirSync(path.dirname(path.join(ets, rel)), { recursive: true });
|
|
21
|
+
fs.writeFileSync(path.join(ets, rel), src, 'utf8');
|
|
22
|
+
}
|
|
23
|
+
return spawnSync(process.execPath, [CHECKER, '--ets', ets], { encoding: 'utf8' }).stdout;
|
|
24
|
+
} finally {
|
|
25
|
+
fs.rmSync(proj, { recursive: true, force: true });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** [file:line, ...] of one rule's GATE hits */
|
|
30
|
+
function hits(out, rule) {
|
|
31
|
+
const gateAt = out.indexOf('[GATE]');
|
|
32
|
+
const candAt = out.indexOf('[CANDIDATES]');
|
|
33
|
+
if (gateAt < 0) { return []; }
|
|
34
|
+
const body = out.slice(gateAt, candAt > gateAt ? candAt : undefined);
|
|
35
|
+
const re = new RegExp(`^\\s+${rule}\\s+(\\S+)`, 'gm');
|
|
36
|
+
return [...body.matchAll(re)].map((m) => m[1]);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// ---------------------------------------------------------------- overlay-string-color
|
|
40
|
+
|
|
41
|
+
// CoolMall CouponModalDialog.ets:149 / :503 (shape kept)
|
|
42
|
+
const COUPON = (overlay) => `@ComponentV2
|
|
43
|
+
export struct CouponItem {
|
|
44
|
+
private maskColor: string = '#66FFFFFF';
|
|
45
|
+
isUnavailable(): boolean { return true; }
|
|
46
|
+
build() {
|
|
47
|
+
Column() {
|
|
48
|
+
Text('coupon')
|
|
49
|
+
}
|
|
50
|
+
.width('100%')
|
|
51
|
+
${overlay}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
|
|
56
|
+
test('overlay_conditional_with_member_and_transparent_is_gate', () => {
|
|
57
|
+
const out = run({ 'components/Coupon.ets': COUPON(" .overlay(this.isUnavailable() ? this.maskColor : 'transparent')") });
|
|
58
|
+
assert.deepEqual(hits(out, 'overlay-string-color'), ['components/Coupon.ets:10']);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
test('overlay_hex_and_rgba_literals_are_gate', () => {
|
|
62
|
+
assert.deepEqual(hits(run({ 'components/Coupon.ets': COUPON(" .overlay('#661B1B1B')") }), 'overlay-string-color'),
|
|
63
|
+
['components/Coupon.ets:10']);
|
|
64
|
+
assert.deepEqual(hits(run({ 'components/Coupon.ets': COUPON(" .overlay('rgba(0, 0, 0, 0.4)')") }), 'overlay-string-color'),
|
|
65
|
+
['components/Coupon.ets:10']);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
test('overlay_text_builder_and_member_text_are_clean', () => {
|
|
69
|
+
assert.deepEqual(hits(run({ 'components/Coupon.ets': COUPON(" .overlay('已领取', { align: Alignment.TopEnd })") }), 'overlay-string-color'), []);
|
|
70
|
+
assert.deepEqual(hits(run({ 'components/Coupon.ets': COUPON(' .overlay(this.maskBuilder())') }), 'overlay-string-color'), []);
|
|
71
|
+
// a member that holds text, not a colour
|
|
72
|
+
const textMember = COUPON(' .overlay(this.label)').replace("private maskColor: string = '#66FFFFFF';", "private label: string = 'NEW';");
|
|
73
|
+
assert.deepEqual(hits(run({ 'components/Coupon.ets': textMember }), 'overlay-string-color'), []);
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
// ---------------------------------------------------------------- image-source-typed-array
|
|
77
|
+
|
|
78
|
+
// CoolMall ImageCaptchaDialog.ets:27-31 (shape kept)
|
|
79
|
+
const CAPTCHA = (body) => `import { image } from '@kit.ImageKit';
|
|
80
|
+
import { util } from '@kit.ArkTS';
|
|
81
|
+
|
|
82
|
+
async function decode(pure: string): Promise<image.PixelMap | null> {
|
|
83
|
+
try {
|
|
84
|
+
${body}
|
|
85
|
+
return await source.createPixelMap();
|
|
86
|
+
} catch (e) {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
`;
|
|
91
|
+
|
|
92
|
+
test('image_source_from_decoded_bytes_is_gate', () => {
|
|
93
|
+
const out = run({ 'components/Captcha.ets': CAPTCHA(` const bytes: Uint8Array = new util.Base64Helper().decodeSync(pure);
|
|
94
|
+
const source: image.ImageSource = image.createImageSource(bytes);`) });
|
|
95
|
+
assert.deepEqual(hits(out, 'image-source-typed-array'), ['components/Captcha.ets:7']);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
test('image_source_inline_decode_is_gate', () => {
|
|
99
|
+
const out = run({ 'components/Captcha.ets': CAPTCHA(
|
|
100
|
+
' const source: image.ImageSource = image.createImageSource(new util.Base64Helper().decodeSync(pure));') });
|
|
101
|
+
assert.deepEqual(hits(out, 'image-source-typed-array'), ['components/Captcha.ets:6']);
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
test('image_source_from_array_buffer_or_uri_is_clean', () => {
|
|
105
|
+
const buf = run({ 'components/Captcha.ets': CAPTCHA(` const bytes: Uint8Array = new util.Base64Helper().decodeSync(pure);
|
|
106
|
+
const source: image.ImageSource = image.createImageSource(bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength));`) });
|
|
107
|
+
assert.deepEqual(hits(buf, 'image-source-typed-array'), []);
|
|
108
|
+
const uri = run({ 'components/Captcha.ets': CAPTCHA(" const source: image.ImageSource = image.createImageSource('/data/x.png');") });
|
|
109
|
+
assert.deepEqual(hits(uri, 'image-source-typed-array'), []);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
// ---------------------------------------------------------------- swiper-index-unbound
|
|
113
|
+
|
|
114
|
+
// CoolMall OrderRoutes_ListPage.ets:95-99 / :124-134 (shape kept)
|
|
115
|
+
const ORDERS = (swiperAttrs) => `@Entry
|
|
116
|
+
@ComponentV2
|
|
117
|
+
struct OrderListPage {
|
|
118
|
+
private swiperController: SwiperController = new SwiperController();
|
|
119
|
+
@Local selected: number = 0;
|
|
120
|
+
|
|
121
|
+
aboutToAppear(): void {
|
|
122
|
+
const tabIndex: number = 2;
|
|
123
|
+
if (tabIndex >= 0) {
|
|
124
|
+
this.selected = tabIndex;
|
|
125
|
+
this.swiperController.changeIndex(tabIndex, false);
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
build() {
|
|
131
|
+
Swiper(this.swiperController) {
|
|
132
|
+
ForEach([0, 1, 2], (tab: number) => {
|
|
133
|
+
Text(tab.toString())
|
|
134
|
+
}, (tab: number) => \`pager_\${tab}\`)
|
|
135
|
+
}
|
|
136
|
+
.loop(false)
|
|
137
|
+
${swiperAttrs}
|
|
138
|
+
.onChange((index: number) => { this.selected = index; })
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
`;
|
|
142
|
+
|
|
143
|
+
test('change_index_in_about_to_appear_without_index_is_gate', () => {
|
|
144
|
+
assert.deepEqual(hits(run({ 'pages/Orders.ets': ORDERS(' .indicator(false)') }), 'swiper-index-unbound'), ['pages/Orders.ets:11']);
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
test('swiper_with_index_binding_is_clean', () => {
|
|
148
|
+
assert.deepEqual(hits(run({ 'pages/Orders.ets': ORDERS(' .index(this.selected)') }), 'swiper-index-unbound'), []);
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
test('change_index_outside_about_to_appear_is_clean', () => {
|
|
152
|
+
const src = ORDERS(' .indicator(false)')
|
|
153
|
+
.replace(' this.swiperController.changeIndex(tabIndex, false);\n', '')
|
|
154
|
+
.replace(' build() {', ' goTo(i: number): void {\n this.swiperController.changeIndex(i, true);\n }\n\n build() {');
|
|
155
|
+
assert.deepEqual(hits(run({ 'pages/Orders.ets': src }), 'swiper-index-unbound'), []);
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
// ---------------------------------------------------------------- dialog-backboard-default
|
|
159
|
+
|
|
160
|
+
// Weather MainSettingsPage.ets:160-170 (shape kept)
|
|
161
|
+
const SETTINGS = (opts) => `import { promptAction } from '@kit.ArkUI';
|
|
162
|
+
|
|
163
|
+
@ComponentV2
|
|
164
|
+
export struct SettingsPage {
|
|
165
|
+
@Builder prefsDialogBuilder() {
|
|
166
|
+
Column() { Text('Units') }.width('100%').backgroundColor(Color.White)
|
|
167
|
+
}
|
|
168
|
+
open(): void {
|
|
169
|
+
const options: promptAction.CustomDialogOptions = {
|
|
170
|
+
builder: (): void => {
|
|
171
|
+
this.prefsDialogBuilder();
|
|
172
|
+
},
|
|
173
|
+
${opts}
|
|
174
|
+
};
|
|
175
|
+
this.getUIContext().getPromptAction().openCustomDialog(options);
|
|
176
|
+
}
|
|
177
|
+
build() { Column() { Text('x') } }
|
|
178
|
+
}
|
|
179
|
+
`;
|
|
180
|
+
|
|
181
|
+
test('custom_dialog_options_with_width_only_is_gate', () => {
|
|
182
|
+
const out = run({ 'pages/Settings.ets': SETTINGS(" alignment: DialogAlignment.Center,\n width: '95%'") });
|
|
183
|
+
assert.deepEqual(hits(out, 'dialog-backboard-default'), ['pages/Settings.ets:16']);
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
test('custom_dialog_options_styling_the_backboard_are_clean', () => {
|
|
187
|
+
const out = run({ 'pages/Settings.ets': SETTINGS(
|
|
188
|
+
" width: '87%',\n backgroundBlurStyle: BlurStyle.NONE,\n backgroundColor: Color.White,\n cornerRadius: 2") });
|
|
189
|
+
assert.deepEqual(hits(out, 'dialog-backboard-default'), []);
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
test('controller_with_custom_style_is_clean_and_without_is_gate', () => {
|
|
193
|
+
const ctl = (extra) => `@CustomDialog
|
|
194
|
+
struct Body {
|
|
195
|
+
controller?: CustomDialogController;
|
|
196
|
+
build() { Column() { Text('x') } }
|
|
197
|
+
}
|
|
198
|
+
@Entry
|
|
199
|
+
@Component
|
|
200
|
+
struct P {
|
|
201
|
+
dlg: CustomDialogController = new CustomDialogController({
|
|
202
|
+
builder: Body(),
|
|
203
|
+
${extra}
|
|
204
|
+
});
|
|
205
|
+
build() { Column() { Text('x') } }
|
|
206
|
+
}
|
|
207
|
+
`;
|
|
208
|
+
assert.deepEqual(hits(run({ 'pages/P.ets': ctl(' customStyle: true') }), 'dialog-backboard-default'), []);
|
|
209
|
+
assert.deepEqual(hits(run({ 'pages/P.ets': ctl(' autoCancel: true') }), 'dialog-backboard-default'), ['pages/P.ets:9']);
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
test('component_content_without_options_is_gate_with_hidden_options_clean', () => {
|
|
213
|
+
const src = (call) => `import { ComponentContent } from '@kit.ArkUI';
|
|
214
|
+
@Builder function body() { Column() { Text('x') } }
|
|
215
|
+
@ComponentV2
|
|
216
|
+
struct P {
|
|
217
|
+
open(): void {
|
|
218
|
+
const node = new ComponentContent(this.getUIContext(), wrapBuilder(body));
|
|
219
|
+
${call}
|
|
220
|
+
}
|
|
221
|
+
build() { Column() { Text('x') } }
|
|
222
|
+
}
|
|
223
|
+
`;
|
|
224
|
+
assert.deepEqual(hits(run({ 'pages/P.ets': src('this.getUIContext().getPromptAction().openCustomDialog(node);') }),
|
|
225
|
+
'dialog-backboard-default'), ['pages/P.ets:7']);
|
|
226
|
+
// options built elsewhere (a parameter): not visible, not reported
|
|
227
|
+
assert.deepEqual(hits(run({ 'pages/P.ets': src('this.getUIContext().getPromptAction().openCustomDialog(node, this.opts);') }),
|
|
228
|
+
'dialog-backboard-default'), []);
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
// ---------------------------------------------------------------- relative-container-unsized-in-scroll
|
|
232
|
+
|
|
233
|
+
// Weather TodayWeatherFragment.ets:549-600 (shape kept: card struct, called from a Row inside a Scroll)
|
|
234
|
+
const WEATHER = (cardAttrs, iconRules) => `@ComponentV2
|
|
235
|
+
struct InfoCard {
|
|
236
|
+
@Param title: string = '';
|
|
237
|
+
build() {
|
|
238
|
+
RelativeContainer() {
|
|
239
|
+
Image($r('app.media.icon'))
|
|
240
|
+
.width(28)
|
|
241
|
+
.height(28)
|
|
242
|
+
.id('cardIcon')
|
|
243
|
+
.alignRules({
|
|
244
|
+
${iconRules}
|
|
245
|
+
start: { anchor: '__container__', align: HorizontalAlign.Start }
|
|
246
|
+
})
|
|
247
|
+
Text(this.title)
|
|
248
|
+
.id('cardTitle')
|
|
249
|
+
.alignRules({
|
|
250
|
+
top: { anchor: 'cardIcon', align: VerticalAlign.Top },
|
|
251
|
+
start: { anchor: 'cardIcon', align: HorizontalAlign.End }
|
|
252
|
+
})
|
|
253
|
+
}
|
|
254
|
+
${cardAttrs}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
@Entry
|
|
259
|
+
@ComponentV2
|
|
260
|
+
struct Home {
|
|
261
|
+
build() {
|
|
262
|
+
Scroll() {
|
|
263
|
+
Column() {
|
|
264
|
+
Row() {
|
|
265
|
+
InfoCard({ title: 'Wind' })
|
|
266
|
+
.layoutWeight(1)
|
|
267
|
+
InfoCard({ title: 'Rain' })
|
|
268
|
+
.layoutWeight(1)
|
|
269
|
+
}
|
|
270
|
+
.width('100%')
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
`;
|
|
276
|
+
const BOTH_TO_CONTAINER = " top: { anchor: '__container__', align: VerticalAlign.Top },\n" +
|
|
277
|
+
" bottom: { anchor: '__container__', align: VerticalAlign.Bottom },";
|
|
278
|
+
|
|
279
|
+
test('unsized_relative_container_anchoring_container_in_scroll_is_gate', () => {
|
|
280
|
+
const out = run({ 'pages/Home.ets': WEATHER(" .width('100%')\n .padding(10)", BOTH_TO_CONTAINER) });
|
|
281
|
+
assert.deepEqual(hits(out, 'relative-container-unsized-in-scroll'), ['pages/Home.ets:5']);
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
test('auto_height_does_not_help_when_children_anchor_the_container', () => {
|
|
285
|
+
const out = run({ 'pages/Home.ets': WEATHER(" .width('100%')\n .height('auto')", BOTH_TO_CONTAINER) });
|
|
286
|
+
assert.deepEqual(hits(out, 'relative-container-unsized-in-scroll'), ['pages/Home.ets:5']);
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
test('definite_height_or_sibling_only_vertical_anchors_are_clean', () => {
|
|
290
|
+
assert.deepEqual(hits(run({ 'pages/Home.ets': WEATHER(" .width('100%')\n .height(59)", BOTH_TO_CONTAINER) }),
|
|
291
|
+
'relative-container-unsized-in-scroll'), []);
|
|
292
|
+
// only horizontal container anchors (icon pinned to start): the container can size to its children
|
|
293
|
+
assert.deepEqual(hits(run({ 'pages/Home.ets': WEATHER(" .width('100%')\n .height('auto')", '') }),
|
|
294
|
+
'relative-container-unsized-in-scroll'), []);
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
test('relative_container_outside_a_scroller_is_clean', () => {
|
|
298
|
+
const src = WEATHER(" .width('100%')", BOTH_TO_CONTAINER).replace(' Scroll() {\n', ' Column() {\n');
|
|
299
|
+
assert.deepEqual(hits(run({ 'pages/Home.ets': src }), 'relative-container-unsized-in-scroll'), []);
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
// ---- review round 1 (!192)
|
|
303
|
+
|
|
304
|
+
test('image_source_same_name_in_another_function_is_out_of_scope', () => {
|
|
305
|
+
const src = `import { image } from '@kit.ImageKit';
|
|
306
|
+
import { util } from '@kit.ArkTS';
|
|
307
|
+
function logIt(s: string): void {
|
|
308
|
+
const bytes: Uint8Array = new util.Base64Helper().decodeSync(s);
|
|
309
|
+
console.info(bytes.length.toString());
|
|
310
|
+
}
|
|
311
|
+
async function load(buf: ArrayBuffer): Promise<void> {
|
|
312
|
+
const bytes: ArrayBuffer = buf;
|
|
313
|
+
const source: image.ImageSource = image.createImageSource(bytes);
|
|
314
|
+
}
|
|
315
|
+
`;
|
|
316
|
+
assert.deepEqual(hits(run({ 'components/Img.ets': src }), 'image-source-typed-array'), []);
|
|
317
|
+
// a parameter typed Uint8Array is still caught
|
|
318
|
+
const param = `import { image } from '@kit.ImageKit';
|
|
319
|
+
function load(bytes: Uint8Array): void {
|
|
320
|
+
const source: image.ImageSource = image.createImageSource(bytes);
|
|
321
|
+
}
|
|
322
|
+
`;
|
|
323
|
+
assert.deepEqual(hits(run({ 'components/Img.ets': param }), 'image-source-typed-array'), ['components/Img.ets:3']);
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
test('swiper_index_every_struct_and_its_own_swiper', () => {
|
|
327
|
+
const src = `@ComponentV2
|
|
328
|
+
struct Header {
|
|
329
|
+
aboutToAppear(): void { console.info('h'); }
|
|
330
|
+
build() { Text('h') }
|
|
331
|
+
}
|
|
332
|
+
@Entry
|
|
333
|
+
@ComponentV2
|
|
334
|
+
struct Orders {
|
|
335
|
+
private swiperController: SwiperController = new SwiperController();
|
|
336
|
+
aboutToAppear(): void {
|
|
337
|
+
this.swiperController.changeIndex(2, false);
|
|
338
|
+
}
|
|
339
|
+
build() {
|
|
340
|
+
Swiper(this.swiperController) { Text('a') }
|
|
341
|
+
.loop(false)
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
`;
|
|
345
|
+
assert.deepEqual(hits(run({ 'pages/Orders.ets': src }), 'swiper-index-unbound'), ['pages/Orders.ets:11']);
|
|
346
|
+
});
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// arkts_static_check: theme-runtime-color-static fires only when the shell contract lists runtime_slots
|
|
2
|
+
// (CoolMall 11-19: the four tab pages used $r('app.color.primary') and never followed the user's colour).
|
|
3
|
+
// Run from scripts/: node --test tests/arkts_static_check_theme_runtime.test.mjs
|
|
4
|
+
import { test } from 'node:test';
|
|
5
|
+
import assert from 'node:assert/strict';
|
|
6
|
+
import { spawnSync } from 'node:child_process';
|
|
7
|
+
import * as fs from 'node:fs';
|
|
8
|
+
import * as os from 'node:os';
|
|
9
|
+
import * as path from 'node:path';
|
|
10
|
+
import { fileURLToPath } from 'node:url';
|
|
11
|
+
|
|
12
|
+
const CHECKER = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', 'arkts_static_check.ts');
|
|
13
|
+
const MODULE = 'entry/src/main/ets/common/ThemeState.ets';
|
|
14
|
+
|
|
15
|
+
const STATE = `@ObservedV2
|
|
16
|
+
export class ThemeState {
|
|
17
|
+
@Trace primary: string = '#465CFF';
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
const ADAPTER = `import { ThemeState } from './ThemeState';
|
|
21
|
+
export class ThemeStore {
|
|
22
|
+
get primaryColor(): string { return '' }
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
const SECOND = `@ObservedV2
|
|
26
|
+
export class AppThemeStore {
|
|
27
|
+
@Trace primary: string = '#465CFF';
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
const PAGE = `@Entry
|
|
31
|
+
@ComponentV2
|
|
32
|
+
struct Home {
|
|
33
|
+
build() {
|
|
34
|
+
Column() {
|
|
35
|
+
Text('a').fontColor($r('app.color.primary'))
|
|
36
|
+
// THEME-STATIC: SplashScreen.kt:40 the logo keeps the brand colour
|
|
37
|
+
Image($r('app.media.logo')).fillColor($r('app.color.primary'))
|
|
38
|
+
Text('b').fontColor($r('app.color.text_primary'))
|
|
39
|
+
Button('c')
|
|
40
|
+
.backgroundColor(
|
|
41
|
+
$r('app.color.primary'))
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
46
|
+
|
|
47
|
+
/** contract: theme object or null -> stdout */
|
|
48
|
+
function run(theme, extra = {}) {
|
|
49
|
+
const proj = fs.mkdtempSync(path.join(os.tmpdir(), 'asc-theme-rt-'));
|
|
50
|
+
const ets = path.join(proj, 'entry/src/main/ets');
|
|
51
|
+
try {
|
|
52
|
+
const files = { 'pages/Home.ets': PAGE, 'common/ThemeState.ets': STATE, ...extra };
|
|
53
|
+
for (const [rel, src] of Object.entries(files)) {
|
|
54
|
+
fs.mkdirSync(path.dirname(path.join(ets, rel)), { recursive: true });
|
|
55
|
+
fs.writeFileSync(path.join(ets, rel), src, 'utf8');
|
|
56
|
+
}
|
|
57
|
+
fs.mkdirSync(path.join(proj, '.hometrans'), { recursive: true });
|
|
58
|
+
if (theme !== null) {
|
|
59
|
+
fs.writeFileSync(path.join(proj, '.hometrans/shell_contract.json'), JSON.stringify({ theme }), 'utf8');
|
|
60
|
+
}
|
|
61
|
+
return spawnSync(process.execPath, [CHECKER, '--ets', ets], { encoding: 'utf8' }).stdout;
|
|
62
|
+
} finally {
|
|
63
|
+
fs.rmSync(proj, { recursive: true, force: true });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function hits(out, rule, section) {
|
|
68
|
+
const gateAt = out.indexOf('[GATE]');
|
|
69
|
+
const candAt = out.indexOf('[CANDIDATES]');
|
|
70
|
+
const body = section === 'GATE'
|
|
71
|
+
? (gateAt < 0 ? '' : out.slice(gateAt, candAt > gateAt ? candAt : undefined))
|
|
72
|
+
: (candAt < 0 ? '' : out.slice(candAt));
|
|
73
|
+
return [...body.matchAll(new RegExp(`^\\s+${rule}\\s+(\\S+)`, 'gm'))].map((m) => m[1]);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const RUNTIME = { mode: 'light-dark+runtime-color', hits_dark: [], hits_runtime: [{}], runtime_slots: ['primary'], state_module: MODULE };
|
|
77
|
+
|
|
78
|
+
test('runtime_slot_resource_in_colour_slot_is_gate_and_theme_static_is_cand', () => {
|
|
79
|
+
const out = run(RUNTIME);
|
|
80
|
+
assert.deepEqual(hits(out, 'theme-runtime-color-static', 'GATE'), ['pages/Home.ets:6', 'pages/Home.ets:12']);
|
|
81
|
+
assert.deepEqual(hits(out, 'theme-runtime-color-static', 'CANDIDATES'), ['pages/Home.ets:8']);
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
test('no_runtime_slots_means_no_report', () => {
|
|
85
|
+
const out = run({ mode: 'light-dark', hits_dark: [{}], hits_runtime: [] });
|
|
86
|
+
assert.deepEqual(hits(out, 'theme-runtime-color-static', 'GATE'), []);
|
|
87
|
+
assert.deepEqual(hits(run(null), 'theme-runtime-color-static', 'GATE'), []);
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
test('second_theme_store_is_gate_an_adapter_importing_the_module_is_not', () => {
|
|
91
|
+
const out = run(RUNTIME, { 'theme/AppThemeStore.ets': SECOND, 'common/ThemeStore.ets': ADAPTER });
|
|
92
|
+
const gate = hits(out, 'theme-runtime-color-static', 'GATE');
|
|
93
|
+
assert.ok(gate.includes('theme/AppThemeStore.ets:2'), gate.join(' '));
|
|
94
|
+
assert.ok(!gate.some((h) => h.startsWith('common/')), gate.join(' '));
|
|
95
|
+
});
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// branch_coverage.mjs: state-branch list rows of a group report.
|
|
2
|
+
// Run from scripts/: node --test tests/branch_coverage.test.mjs
|
|
3
|
+
import { test } from 'node:test';
|
|
4
|
+
import assert from 'node:assert/strict';
|
|
5
|
+
import { branchCoverage, branchRows } from '../branch_coverage.mjs';
|
|
6
|
+
|
|
7
|
+
const TABLE = `### 2. 过渡实现证据
|
|
8
|
+
|
|
9
|
+
状态分支清单:
|
|
10
|
+
|
|
11
|
+
| 状态 → 条件 | 分支构建(源侧) | 捕获 | 鸿蒙侧 |
|
|
12
|
+
|---|---|---|---|
|
|
13
|
+
| 有地址 → AddressCard.kt:69 | 省市区 + 联系人 | 已捕获 | LogisticsPage.ets:30-60 |
|
|
14
|
+
| address=null → AddressCard.kt:141-173 | 选择地址布局 | 未捕获 | 未实现 null 分支:空串渲染 |
|
|
15
|
+
| status=null → LogisticsSteps.kt:97 | status 行不渲染 | 未捕获 | LogisticsPage.ets:304-311 |
|
|
16
|
+
| time=null → LogisticsSteps.kt:108 | time 行不渲染 | 未捕获 | LogisticsPage.ets:900 |
|
|
17
|
+
| isPressed | 死状态 | 未捕获 | 不适用:源侧零读取 |
|
|
18
|
+
| 骨架屏 | Skeleton | 未捕获 | Skeleton() builder |
|
|
19
|
+
| 错误态 | EmptyNetwork | 未捕获 | Missing.ets:10 |
|
|
20
|
+
|
|
21
|
+
### 3. 下一节
|
|
22
|
+
| 状态 | 条件 | 捕获 | 鸿蒙侧 |
|
|
23
|
+
| x | y | 未捕获 | 未实现 |
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
const ETS = [['pages/LogisticsPage.ets', 'x\n'.repeat(400)]];
|
|
27
|
+
|
|
28
|
+
test('rows are read from the table under the list heading only', () => {
|
|
29
|
+
const rows = branchRows(TABLE);
|
|
30
|
+
assert.equal(rows.length, 7);
|
|
31
|
+
assert.equal(rows[1].captured, '未捕获');
|
|
32
|
+
assert.match(rows[1].harmony, /^未实现/);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
test('a missing branch, a missing file and a line past the end block; a symbol-only row is advisory', () => {
|
|
36
|
+
const r = branchCoverage({ reportText: TABLE, etsTexts: ETS });
|
|
37
|
+
assert.equal(r.checked, 6);
|
|
38
|
+
assert.equal(r.failed.length, 3);
|
|
39
|
+
assert.match(r.failed[0], /^report:8 .*branch is missing/);
|
|
40
|
+
assert.match(r.failed[1], /^report:10 .*LogisticsPage\.ets:900 is past the end/);
|
|
41
|
+
assert.match(r.failed[2], /^report:13 .*Missing\.ets does not exist/);
|
|
42
|
+
assert.deepEqual(r.unlocated.map((x) => x.split(' ')[0]), ['report:12']);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
test('list items split on arrows, the last segment being the Harmony side', () => {
|
|
46
|
+
const text = `状态分支清单(每行:状态 → 源侧条件 → 分支构建 → 快照 → 鸿蒙侧):
|
|
47
|
+
|
|
48
|
+
- Loading → BaseNetWorkView.kt:55 → Skeleton → 未捕获(无快照)→ CategoryRoutePage.ets:593-640
|
|
49
|
+
- Error → BaseNetWorkView.kt:63 → EmptyNetwork → 未捕获 → not implemented yet
|
|
50
|
+
`;
|
|
51
|
+
const r = branchCoverage({ reportText: text, projectLines: new Map([['CategoryRoutePage.ets', 700]]) });
|
|
52
|
+
assert.equal(r.checked, 2);
|
|
53
|
+
assert.equal(r.failed.length, 1);
|
|
54
|
+
assert.match(r.failed[0], /^report:4 /);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
test('file names resolve across dotted and prefixed spellings; ambiguous ones are not checked', () => {
|
|
58
|
+
const text = `state-branch list:
|
|
59
|
+
|
|
60
|
+
| State | Source | Captured | Harmony |
|
|
61
|
+
|---|---|---|---|
|
|
62
|
+
| a | x.kt:1 | not-captured | OrderRoutes.DetailPage.ets:880-899 |
|
|
63
|
+
| b | x.kt:2 | not-captured | DetailPage.ets:5 |
|
|
64
|
+
| c | x.kt:3 | not-captured | Page.ets:5 |
|
|
65
|
+
`;
|
|
66
|
+
const projectLines = new Map([['OrderRoutesDetailPage.ets', 1000], ['GoodsDetailPage.ets', 10], ['OtherPage.ets', 10]]);
|
|
67
|
+
const r = branchCoverage({ reportText: text, projectLines });
|
|
68
|
+
assert.deepEqual(r.failed, []);
|
|
69
|
+
assert.equal(r.checked, 3);
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
test('a name shared by files of different lengths is not checked, unless the group owns one of them', () => {
|
|
73
|
+
const text = `状态分支清单:
|
|
74
|
+
|
|
75
|
+
| 状态 | 条件 | 捕获 | 鸿蒙侧 |
|
|
76
|
+
|---|---|---|---|
|
|
77
|
+
| a | x.kt:1 | 未捕获 | MainPage.ets:300 |
|
|
78
|
+
| b | x.kt:2 | 未捕获 | Index.ets:300 |
|
|
79
|
+
`;
|
|
80
|
+
const projectLines = new Map([['MainPage.ets', [200, 400]], ['Index.ets', [120, 120]]]);
|
|
81
|
+
const r = branchCoverage({ reportText: text, projectLines });
|
|
82
|
+
assert.equal(r.failed.length, 1);
|
|
83
|
+
assert.match(r.failed[0], /Index\.ets:300 is past the end of the file \(120 lines\)/);
|
|
84
|
+
const own = branchCoverage({ reportText: text, projectLines, etsTexts: [['pages/MainPage.ets', 'x\n'.repeat(250)]] });
|
|
85
|
+
assert.equal(own.failed.length, 2);
|
|
86
|
+
assert.match(own.failed[0], /MainPage\.ets:300 is past the end of the file \(251 lines\)/);
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
test('"not implemented" next to a Harmony line is a description, checked by its line', () => {
|
|
90
|
+
const text = `状态分支清单:
|
|
91
|
+
|
|
92
|
+
| 状态 | 条件 | 捕获 | 鸿蒙侧 |
|
|
93
|
+
|---|---|---|---|
|
|
94
|
+
| 空态 | x.kt:1 | 未捕获 | 未做处理时显示空态 → Foo.ets:120 |
|
|
95
|
+
| 骨架 | x.kt:2 | 未捕获 | 未做骨架屏 |
|
|
96
|
+
| 列表 | x.kt:3 | 未捕获 | notimplementedYet() builder |
|
|
97
|
+
`;
|
|
98
|
+
const r = branchCoverage({ reportText: text, projectLines: new Map([['Foo.ets', 200]]) });
|
|
99
|
+
assert.equal(r.failed.length, 1);
|
|
100
|
+
assert.match(r.failed[0], /^report:6 .*branch is missing/);
|
|
101
|
+
assert.equal(r.unlocated.length, 1);
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
test('no list, no findings', () => {
|
|
105
|
+
assert.deepEqual(branchCoverage({ reportText: '## REPORT G001\n| a | 未捕获 | 未实现 |\n' }), { failed: [], unlocated: [], checked: 0 });
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
test('a supplement-only page waives the branches outside its supplement as 不适用(SUP 范围外)', () => {
|
|
109
|
+
const head = '状态分支清单:\n\n| 状态 | 条件 | 捕获 | 鸿蒙侧 |\n|---|---|---|---|\n';
|
|
110
|
+
for (const waiver of ['不适用(SUP 范围外)', 'n/a (outside the SUP scope)']) {
|
|
111
|
+
const r = branchCoverage({ reportText: `${head}| 空态 | Foo.kt:12 | 未捕获 | ${waiver} |\n`, etsTexts: ETS });
|
|
112
|
+
assert.deepEqual([r.failed, r.unlocated, r.checked], [[], [], 1], waiver);
|
|
113
|
+
}
|
|
114
|
+
const r = branchCoverage({ reportText: `${head}| 空态 | Foo.kt:12 | 未捕获 | 未实现(SUP 范围外) |\n`, etsTexts: ETS });
|
|
115
|
+
assert.equal(r.failed.length, 1, 'saying the branch is missing still blocks');
|
|
116
|
+
});
|