@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
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// group_pack's evidence handoff: a legacy `screen.png` must still reach the agent, and a
|
|
2
|
+
// scrolling page with no frames must say so instead of presenting one viewport as the whole page.
|
|
3
|
+
import { test } from 'node:test';
|
|
4
|
+
import assert from 'node:assert/strict';
|
|
5
|
+
import * as fs from 'node:fs';
|
|
6
|
+
import * as os from 'node:os';
|
|
7
|
+
import * as path from 'node:path';
|
|
8
|
+
|
|
9
|
+
import { referenceEvidence, renderEvidence } from '../group_pack.mjs';
|
|
10
|
+
|
|
11
|
+
function write(p, text) { fs.mkdirSync(path.dirname(p), { recursive: true }); fs.writeFileSync(p, text, 'utf8'); }
|
|
12
|
+
function tmp() { return fs.mkdtempSync(path.join(os.tmpdir(), 'gp-ev-')); }
|
|
13
|
+
|
|
14
|
+
test('a legacy screen.png is paired with view.xml, and the scroll gap is announced', () => {
|
|
15
|
+
const ui = tmp();
|
|
16
|
+
try {
|
|
17
|
+
const d = path.join(ui, 'page_0001_Home');
|
|
18
|
+
write(path.join(d, 'meta.json'), JSON.stringify({
|
|
19
|
+
page_id: 'page_0001_Home', static_node: 'fragment:Home', label: 'Home',
|
|
20
|
+
screenshot: 'page_0001_Home/screen.png', screenshots: ['page_0001_Home/screen.png'],
|
|
21
|
+
view_xml: 'page_0001_Home/view.xml', view_xmls: ['page_0001_Home/view.xml'],
|
|
22
|
+
}));
|
|
23
|
+
write(path.join(d, 'screen.png'), 'not-a-real-png');
|
|
24
|
+
write(path.join(d, 'view.xml'),
|
|
25
|
+
'<hierarchy><node class="android.webkit.WebView" scrollable="true" package="p" bounds="[0,0][1080,2148]"/></hierarchy>');
|
|
26
|
+
const group = { id: 'G1', page_dirs: ['page_0001_Home'], tier: 'captured',
|
|
27
|
+
members: [{ node: 'fragment:Home', relation: 'anchor' }] };
|
|
28
|
+
const ev = referenceEvidence(group, ui);
|
|
29
|
+
const e = ev.entries[0];
|
|
30
|
+
assert.equal(path.basename(e.frames[0].screenshot), 'screen.png');
|
|
31
|
+
assert.equal(e.scroll.gap, true);
|
|
32
|
+
assert.equal(e.scroll.scrollers, 1);
|
|
33
|
+
const md = renderEvidence(ev).join('\n');
|
|
34
|
+
assert.match(md, /SINGLE VIEWPORT — BELOW-FOLD UNVERIFIED/);
|
|
35
|
+
assert.match(md, /screenshot .*screen\.png/);
|
|
36
|
+
} finally { fs.rmSync(ui, { recursive: true, force: true }); }
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
test('a capture whose declared screenshot is missing is listed as MISSING, not silently dropped', () => {
|
|
40
|
+
const ui = tmp();
|
|
41
|
+
try {
|
|
42
|
+
const d = path.join(ui, 'page_0001_Home');
|
|
43
|
+
write(path.join(d, 'meta.json'), JSON.stringify({
|
|
44
|
+
page_id: 'page_0001_Home', static_node: 'fragment:Home', label: 'Home',
|
|
45
|
+
screenshot: 'page_0001_Home/screenshot.png', screenshots: ['page_0001_Home/screenshot.png'],
|
|
46
|
+
view_xml: 'page_0001_Home/view.xml', view_xmls: ['page_0001_Home/view.xml'],
|
|
47
|
+
}));
|
|
48
|
+
write(path.join(d, 'view.xml'),
|
|
49
|
+
'<hierarchy><node class="android.view.View" scrollable="false" package="p" bounds="[0,0][1080,2148]"/></hierarchy>');
|
|
50
|
+
const group = { id: 'G1', page_dirs: ['page_0001_Home'], tier: 'captured',
|
|
51
|
+
members: [{ node: 'fragment:Home', relation: 'anchor' }] };
|
|
52
|
+
const ev = referenceEvidence(group, ui);
|
|
53
|
+
assert.ok(ev.entries[0].missing.some((m) => m.includes('screenshot.png')));
|
|
54
|
+
// A declared-but-missing file is not the same as "no screenshot declared"; saying both
|
|
55
|
+
// would hide which contract was broken.
|
|
56
|
+
assert.equal(ev.entries[0].missing.some((m) => m.includes('no screenshot declared')), false);
|
|
57
|
+
} finally { fs.rmSync(ui, { recursive: true, force: true }); }
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
test('a bare-list pages.json is accepted (both capture shapes are legal)', () => {
|
|
61
|
+
const ui = tmp();
|
|
62
|
+
try {
|
|
63
|
+
const d = path.join(ui, 'page_0001_Home');
|
|
64
|
+
write(path.join(d, 'meta.json'), JSON.stringify({
|
|
65
|
+
page_id: 'page_0001_Home', static_node: 'fragment:Home', label: 'Home',
|
|
66
|
+
screenshot: 'page_0001_Home/screenshot.png', screenshots: ['page_0001_Home/screenshot.png'],
|
|
67
|
+
view_xml: 'page_0001_Home/view.xml', view_xmls: ['page_0001_Home/view.xml'],
|
|
68
|
+
}));
|
|
69
|
+
write(path.join(d, 'screenshot.png'), 'x');
|
|
70
|
+
write(path.join(d, 'view.xml'), '<hierarchy/>');
|
|
71
|
+
write(path.join(ui, 'pages.json'), JSON.stringify([{ page_dir: 'page_0001_Home',
|
|
72
|
+
attached_nodes: [{ id: 'panel:Sort', kind: 'panel', label: 'Sort' }] }]));
|
|
73
|
+
const group = { id: 'G1', page_dirs: ['page_0001_Home'], tier: 'captured',
|
|
74
|
+
members: [{ node: 'fragment:Home', relation: 'anchor' }] };
|
|
75
|
+
const ev = referenceEvidence(group, ui);
|
|
76
|
+
assert.ok(ev.uncaptured.some((u) => u.node === 'panel:Sort'));
|
|
77
|
+
} finally { fs.rmSync(ui, { recursive: true, force: true }); }
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
test('a capture with no screenshot declared says so explicitly', () => {
|
|
81
|
+
const ui = tmp();
|
|
82
|
+
try {
|
|
83
|
+
const d = path.join(ui, 'page_0001_Home');
|
|
84
|
+
write(path.join(d, 'meta.json'), JSON.stringify({
|
|
85
|
+
page_id: 'page_0001_Home', static_node: 'fragment:Home', label: 'Home',
|
|
86
|
+
view_xml: 'page_0001_Home/view.xml', view_xmls: ['page_0001_Home/view.xml'],
|
|
87
|
+
}));
|
|
88
|
+
write(path.join(d, 'view.xml'),
|
|
89
|
+
'<hierarchy><node class="android.view.View" scrollable="false" package="p" bounds="[0,0][1080,2148]"/></hierarchy>');
|
|
90
|
+
const group = { id: 'G1', page_dirs: ['page_0001_Home'], tier: 'captured',
|
|
91
|
+
members: [{ node: 'fragment:Home', relation: 'anchor' }] };
|
|
92
|
+
const ev = referenceEvidence(group, ui);
|
|
93
|
+
assert.ok(ev.entries[0].missing.some((m) => m.includes('no screenshot declared')));
|
|
94
|
+
} finally { fs.rmSync(ui, { recursive: true, force: true }); }
|
|
95
|
+
});
|
|
@@ -64,6 +64,35 @@ describe('Queue', () => {
|
|
|
64
64
|
|
|
65
65
|
const load = () => gq.loadState(hp);
|
|
66
66
|
const init = (kw = {}) => gq.init(hp, { prompts, width: 3, stall_min: 15, batch_groups: 3, batch_pages: 8, ...kw });
|
|
67
|
+
|
|
68
|
+
test('another run\'s batch_progress.json never marks this plan\'s pages done, and init refuses it', () => {
|
|
69
|
+
const pf = path.join(hp, '.hometrans', 'batch_progress.json');
|
|
70
|
+
const progress = (v) => fs.writeFileSync(pf, JSON.stringify({ ui_module: 'entry', pages: { p2: { status: 'done' } }, ...v }), 'utf8');
|
|
71
|
+
const planOf = (v) => fs.writeFileSync(csPath(), JSON.stringify({ plan: { groups, ...v } }), 'utf8');
|
|
72
|
+
|
|
73
|
+
// same identity: the done page is honoured
|
|
74
|
+
planOf({ mode: 'incremental', scope_id: 'inc-1-aaaaaaaaaaaa' });
|
|
75
|
+
progress({ mode: 'incremental', scope_id: 'inc-1-aaaaaaaaaaaa' });
|
|
76
|
+
assert.equal(gq.progressMismatch(hp), '');
|
|
77
|
+
assert.equal(gq.initState(hp, prompts).groups.G002.state, 'skipped');
|
|
78
|
+
|
|
79
|
+
// another scope's file (progress_identity.mjs resume was skipped)
|
|
80
|
+
progress({ mode: 'incremental', scope_id: 'inc-1-bbbbbbbbbbbb' });
|
|
81
|
+
assert.match(gq.progressMismatch(hp), /scope_id/);
|
|
82
|
+
assert.equal(gq._progressDone(hp, groups[1]), false);
|
|
83
|
+
assert.throws(() => gq.initState(hp, prompts), /belongs to another run/);
|
|
84
|
+
|
|
85
|
+
// a full run's file under an incremental plan, and the reverse
|
|
86
|
+
progress({});
|
|
87
|
+
assert.match(gq.progressMismatch(hp), /mode full .* vs incremental/);
|
|
88
|
+
planOf({});
|
|
89
|
+
progress({ mode: 'incremental', scope_id: 'inc-1-aaaaaaaaaaaa' });
|
|
90
|
+
assert.throws(() => gq.initState(hp, prompts), /mode incremental .* vs full/);
|
|
91
|
+
|
|
92
|
+
// a legacy full file under a full plan matches
|
|
93
|
+
progress({});
|
|
94
|
+
assert.equal(gq.initState(hp, prompts).groups.G002.state, 'skipped');
|
|
95
|
+
});
|
|
67
96
|
/** What a finished agent leaves on disk: its predicted files and its report file. */
|
|
68
97
|
function finish(gid, { files = true, report = true } = {}) {
|
|
69
98
|
const g = groups.find((x) => x.id === gid);
|
|
@@ -113,6 +142,18 @@ describe('Queue', () => {
|
|
|
113
142
|
assert.deepEqual(gq.ready(st, plan), ['G001', 'G004']);
|
|
114
143
|
});
|
|
115
144
|
|
|
145
|
+
// !192 review: the runtime theme state (entry group) and a lower-stage overlay owner are imported files;
|
|
146
|
+
// waits_for keeps those waits that overlap_entry and the stage-2 filter would drop.
|
|
147
|
+
test('waits_for holds a group back past overlap_entry and the stage-2 filter', () => {
|
|
148
|
+
shellContract();
|
|
149
|
+
plan.G002.waits_for = ['G001'];
|
|
150
|
+
const st = state({});
|
|
151
|
+
assert.deepEqual(gq.ready(st, plan), ['G001', 'G004']); // G002 waits for the entry group now
|
|
152
|
+
assert.ok(gq._deps(st, plan, 'G002').includes('G001'));
|
|
153
|
+
st.groups.G001.state = 'returned';
|
|
154
|
+
assert.ok(gq.ready(st, plan).includes('G002'));
|
|
155
|
+
});
|
|
156
|
+
|
|
116
157
|
test('entry lane member never runs beside entry', () => {
|
|
117
158
|
shellContract();
|
|
118
159
|
plan.G002.lane = 'entry';
|
|
@@ -488,6 +529,8 @@ describe('Queue', () => {
|
|
|
488
529
|
assert.ok(batch.includes('group_watch.mjs" dispatch "'));
|
|
489
530
|
assert.ok(batch.includes(gq._reportPath(hp, 'G003')));
|
|
490
531
|
assert.ok(batch.includes('DONE G002 G003'));
|
|
532
|
+
// contract item 8 reaches every group, leader or not (step5-convert.md 5.2)
|
|
533
|
+
assert.ok(one.includes(gq.SHARED_MODULE_RULE) && batch.includes(gq.SHARED_MODULE_RULE));
|
|
491
534
|
});
|
|
492
535
|
|
|
493
536
|
test('wait returns on a report, a job exit or complete answers, else times out', async () => {
|
|
@@ -585,12 +628,122 @@ describe('Queue', () => {
|
|
|
585
628
|
assert.deepEqual(gq.liveCampaign(hp, load()).filter((w) => w.startsWith('G001')), []);
|
|
586
629
|
});
|
|
587
630
|
|
|
631
|
+
// H2: a crashed parent's leftovers must not refuse its successor for 20 minutes
|
|
632
|
+
const ageActivity = (secondsAgo) => {
|
|
633
|
+
const sp = path.join(hp, '.hometrans', 'queue_state.json');
|
|
634
|
+
const st = load();
|
|
635
|
+
const at = Date.now() / 1000 - secondsAgo;
|
|
636
|
+
for (const g of Object.values(st.groups)) if (g.state === 'running') g.started_at = g.attempt_at = at;
|
|
637
|
+
gq._save(sp, st);
|
|
638
|
+
const lf = path.join(hp, '.hometrans', 'dispatch_log.json');
|
|
639
|
+
const log = JSON.parse(fs.readFileSync(lf, 'utf8'));
|
|
640
|
+
for (const d of log.dispatches) d.at = at;
|
|
641
|
+
fs.writeFileSync(lf, JSON.stringify(log));
|
|
642
|
+
};
|
|
643
|
+
const beat = (secondsAgo) => fs.writeFileSync(path.join(hp, '.hometrans', 'queue_parent.json'),
|
|
644
|
+
JSON.stringify({ at: Date.now() / 1000 - secondsAgo, pid: 1 }));
|
|
645
|
+
|
|
646
|
+
test('a parent whose heartbeat went stale with no activity after it has crashed: init resumes without takeover', () => {
|
|
647
|
+
init();
|
|
648
|
+
gq.lease(hp);
|
|
649
|
+
gq.bind(hp, 'G001', 'ses_1');
|
|
650
|
+
ageActivity(16 * 60); // within the 20-minute window: refused before H2
|
|
651
|
+
beat(15 * 60); // the parent's last beat, after that activity
|
|
652
|
+
const r = init();
|
|
653
|
+
assert.equal(r.initialized, true);
|
|
654
|
+
assert.equal(load().groups.G001.state, 'queued');
|
|
655
|
+
});
|
|
656
|
+
|
|
657
|
+
test('a live parent (fresh heartbeat) still refuses a second session, with a retry hint', () => {
|
|
658
|
+
init();
|
|
659
|
+
gq.lease(hp);
|
|
660
|
+
beat(30);
|
|
661
|
+
assert.throws(() => init(), (e) => /another parent session may still be driving/.test(e.message)
|
|
662
|
+
&& /retry_after_s=\d+/.test(e.message));
|
|
663
|
+
});
|
|
664
|
+
|
|
665
|
+
test('activity newer than a stale heartbeat means the parent is alive', () => {
|
|
666
|
+
init();
|
|
667
|
+
gq.lease(hp);
|
|
668
|
+
beat(15 * 60);
|
|
669
|
+
ageActivity(60); // a sub-agent wrote a minute ago: its parent cannot be gone
|
|
670
|
+
assert.throws(() => init(), /another parent session may still be driving/);
|
|
671
|
+
});
|
|
672
|
+
|
|
673
|
+
test("a crashed parent's background job is adopted, not refused", () => {
|
|
674
|
+
init();
|
|
675
|
+
const jd = path.join(hp, '.hometrans', 'jobs');
|
|
676
|
+
fs.mkdirSync(jd, { recursive: true });
|
|
677
|
+
fs.writeFileSync(path.join(jd, 'run_cycle.json'), JSON.stringify({
|
|
678
|
+
name: 'run_cycle', state: 'running', pid: process.pid, started_at: Date.now() / 1000 - process.uptime() }));
|
|
679
|
+
beat(30);
|
|
680
|
+
assert.throws(() => init(), /background job run_cycle still running/);
|
|
681
|
+
beat(15 * 60);
|
|
682
|
+
const r = init();
|
|
683
|
+
assert.deepEqual(r.adopt_jobs, ['run_cycle']);
|
|
684
|
+
});
|
|
685
|
+
|
|
686
|
+
// M6: the resource / wiring / verify agents are followed through their report file
|
|
687
|
+
test('wait returns agent when a bound skill agent writes its report, agent-silent when it never does', async () => {
|
|
688
|
+
init();
|
|
689
|
+
gq.lease(hp); // fill the free slots: otherwise wait returns at once with 'slots'
|
|
690
|
+
const report = path.join(hp, '.hometrans', 'work', 'resources.report.md');
|
|
691
|
+
fs.mkdirSync(path.dirname(report), { recursive: true });
|
|
692
|
+
gq.reviewBind(hp, 'resources', { answers: report, kind: 'skill-agent' });
|
|
693
|
+
const waiting = gq.wait(hp, { timeoutS: 2, pollS: 0.02 });
|
|
694
|
+
await new Promise((resolve) => setTimeout(resolve, 60));
|
|
695
|
+
fs.writeFileSync(report, '# resources\nDONE\n');
|
|
696
|
+
const r = await waiting;
|
|
697
|
+
assert.ok(r.reasons.includes('agent'), JSON.stringify(r.reasons));
|
|
698
|
+
assert.deepEqual(r.agents_done, ['resources']);
|
|
699
|
+
|
|
700
|
+
const verify = path.join(hp, '.hometrans', 'work', 'verify.report.md');
|
|
701
|
+
gq.reviewBind(hp, 'verify', { answers: verify, kind: 'skill-agent' });
|
|
702
|
+
const rp = gq._reviewersPath(hp);
|
|
703
|
+
const doc = JSON.parse(fs.readFileSync(rp, 'utf8'));
|
|
704
|
+
doc.verify.bound_at = Date.now() / 1000 - 6 * 3600;
|
|
705
|
+
fs.writeFileSync(rp, JSON.stringify(doc));
|
|
706
|
+
const s = await gq.wait(hp, { timeoutS: 0.2, pollS: 0.02 });
|
|
707
|
+
assert.ok(s.reasons.includes('agent-silent'), JSON.stringify(s.reasons));
|
|
708
|
+
assert.deepEqual(s.agents_silent, ['verify']);
|
|
709
|
+
});
|
|
710
|
+
|
|
711
|
+
// T5: review parts the explorer waits on that no reviewer was bound to are news
|
|
712
|
+
test('wait returns reviews when capture_pending lists an unbound, unanswered part', async () => {
|
|
713
|
+
init();
|
|
714
|
+
gq.lease(hp);
|
|
715
|
+
const campaign = path.join(hp, '.hometrans', 'utg_explore');
|
|
716
|
+
fs.mkdirSync(campaign, { recursive: true });
|
|
717
|
+
fs.writeFileSync(path.join(hp, '.hometrans', 'ui_info', 'export_manifest.json'), JSON.stringify({ campaign }));
|
|
718
|
+
const cp = path.join(campaign, 'capture_pending.json');
|
|
719
|
+
const part = path.join(campaign, 'b_answers.part0.json');
|
|
720
|
+
fs.writeFileSync(cp, JSON.stringify({ pending: [], reviews: [] }));
|
|
721
|
+
const waiting = gq.wait(hp, { timeoutS: 2, pollS: 0.02 });
|
|
722
|
+
await new Promise((resolve) => setTimeout(resolve, 60));
|
|
723
|
+
fs.writeFileSync(cp, JSON.stringify({ pending: [], reviews: [part] }));
|
|
724
|
+
const r = await waiting;
|
|
725
|
+
assert.ok(r.reasons.includes('reviews'), JSON.stringify(r.reasons));
|
|
726
|
+
assert.deepEqual(r.reviews_to_dispatch, [path.resolve(part)]);
|
|
727
|
+
gq.reviewBind(hp, 'b_part0', { answers: part });
|
|
728
|
+
const q = await gq.wait(hp, { timeoutS: 0.1, pollS: 0.02 });
|
|
729
|
+
assert.ok(!q.reasons.includes('reviews'), 'a bound part is not news again');
|
|
730
|
+
});
|
|
731
|
+
|
|
732
|
+
test('wait beats the heartbeat on every poll', async () => {
|
|
733
|
+
init();
|
|
734
|
+
const f = path.join(hp, '.hometrans', 'queue_parent.json');
|
|
735
|
+
fs.rmSync(f, { force: true });
|
|
736
|
+
await gq.wait(hp, { timeoutS: 0.1, pollS: 0.05 });
|
|
737
|
+
assert.ok(Date.now() / 1000 - JSON.parse(fs.readFileSync(f, 'utf8')).at < 5);
|
|
738
|
+
});
|
|
739
|
+
|
|
588
740
|
test('a running --service job (fixture server) is not another parent; a plain job is', () => {
|
|
589
741
|
init();
|
|
590
742
|
const jd = path.join(hp, '.hometrans', 'jobs');
|
|
591
743
|
fs.mkdirSync(jd, { recursive: true });
|
|
592
744
|
const job = (name, extra) => fs.writeFileSync(path.join(jd, `${name}.json`), JSON.stringify({
|
|
593
|
-
|
|
745
|
+
// the job is this test process: it started when the process did (detach status checks ownership)
|
|
746
|
+
name, state: 'running', pid: process.pid, started_at: Date.now() / 1000 - process.uptime(), ...extra }));
|
|
594
747
|
job('fixture_server', { service: true });
|
|
595
748
|
assert.deepEqual(gq.liveCampaign(hp, load()).filter((w) => w.includes('background job')), []);
|
|
596
749
|
job('run_cycle', {});
|
|
@@ -1626,3 +1779,4 @@ gq.release(hp, unit);
|
|
|
1626
1779
|
assert.deepEqual(rows.slice(1).map((x) => x.next), ['queued', 'queued']);
|
|
1627
1780
|
});
|
|
1628
1781
|
});
|
|
1782
|
+
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
// Regression: a reference icon was dropped because the screenshot was captured mid-animation (weather search sheet,
|
|
2
|
+
// page_0002, 81px drift) and the sub-agent read `ink 0.0%` at view.xml bounds as "white-on-white, invisible".
|
|
3
|
+
// layer 1 — measure_pack detects the drift and samples icons at their registered position;
|
|
4
|
+
// layer 3 — phase5 [icons] blocks a visible reference icon with no ICON marker, and refuses ICON-OMIT for it.
|
|
5
|
+
// Run from scripts/: node --test tests/icon_coverage.test.mjs
|
|
6
|
+
import { test } from 'node:test';
|
|
7
|
+
import assert from 'node:assert/strict';
|
|
8
|
+
import { spawnSync } from 'node:child_process';
|
|
9
|
+
import * as fs from 'node:fs';
|
|
10
|
+
import * as os from 'node:os';
|
|
11
|
+
import * as path from 'node:path';
|
|
12
|
+
import * as zlib from 'node:zlib';
|
|
13
|
+
import { fileURLToPath } from 'node:url';
|
|
14
|
+
|
|
15
|
+
import { iconCoverage, scanMarkers } from '../icon_coverage.mjs';
|
|
16
|
+
|
|
17
|
+
const HERE = path.dirname(fileURLToPath(import.meta.url));
|
|
18
|
+
const SCRIPT = path.join(HERE, '..', 'measure_pack.ts');
|
|
19
|
+
const FIX = path.join(HERE, 'fixtures', 'icon_drift_search_sheet');
|
|
20
|
+
const PAGE = 'page_0002_SearchMenuFragment';
|
|
21
|
+
|
|
22
|
+
function crc32(buf) {
|
|
23
|
+
let c; const t = [];
|
|
24
|
+
for (let n = 0; n < 256; n++) { c = n; for (let k = 0; k < 8; k++) c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1; t[n] = c >>> 0; }
|
|
25
|
+
let crc = 0xffffffff;
|
|
26
|
+
for (const b of buf) crc = t[(crc ^ b) & 0xff] ^ (crc >>> 8);
|
|
27
|
+
return (crc ^ 0xffffffff) >>> 0;
|
|
28
|
+
}
|
|
29
|
+
function chunk(type, data) {
|
|
30
|
+
const len = Buffer.alloc(4); len.writeUInt32BE(data.length);
|
|
31
|
+
const td = Buffer.concat([Buffer.from(type, 'ascii'), data]);
|
|
32
|
+
const crc = Buffer.alloc(4); crc.writeUInt32BE(crc32(td));
|
|
33
|
+
return Buffer.concat([len, td, crc]);
|
|
34
|
+
}
|
|
35
|
+
function png(w, h, fill) {
|
|
36
|
+
const raw = Buffer.alloc((w * 4 + 1) * h);
|
|
37
|
+
for (let y = 0; y < h; y++) {
|
|
38
|
+
raw[y * (w * 4 + 1)] = 0;
|
|
39
|
+
for (let x = 0; x < w; x++) {
|
|
40
|
+
const [r, g, b] = fill(x, y); const o = y * (w * 4 + 1) + 1 + x * 4;
|
|
41
|
+
raw[o] = r; raw[o + 1] = g; raw[o + 2] = b; raw[o + 3] = 255;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const ihdr = Buffer.alloc(13);
|
|
45
|
+
ihdr.writeUInt32BE(w, 0); ihdr.writeUInt32BE(h, 4); ihdr[8] = 8; ihdr[9] = 6;
|
|
46
|
+
return Buffer.concat([Buffer.from([137, 80, 78, 71, 13, 10, 26, 10]), chunk('IHDR', ihdr),
|
|
47
|
+
chunk('IDAT', zlib.deflateSync(raw)), chunk('IEND', Buffer.alloc(0))]);
|
|
48
|
+
}
|
|
49
|
+
const node = (b, cls, rid, kids = '') => `<node index="0" text="" resource-id="${rid}" class="${cls}" package="p" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="${b}"${kids ? `>${kids}</node>` : ' />'}`;
|
|
50
|
+
|
|
51
|
+
/** 400x800 purple screen, white bar declared at [20,200][380,260] with a dark 24px icon; drawn `dy` px off. */
|
|
52
|
+
function synthPage(dy) {
|
|
53
|
+
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'icov-'));
|
|
54
|
+
fs.writeFileSync(path.join(dir, 'screenshot.png'), png(400, 800, (x, y) => {
|
|
55
|
+
const yy = y - dy;
|
|
56
|
+
if (x >= 30 && x < 54 && yy >= 218 && yy < 242 && (x + yy) % 2 === 0) return [73, 69, 79];
|
|
57
|
+
if (x >= 20 && x < 380 && yy >= 200 && yy < 260) return [255, 255, 255];
|
|
58
|
+
return [188, 169, 222];
|
|
59
|
+
}));
|
|
60
|
+
fs.writeFileSync(path.join(dir, 'view.xml'), `<?xml version="1.0"?><hierarchy rotation="0">${
|
|
61
|
+
node('[0,0][400,800]', 'android.widget.FrameLayout', '',
|
|
62
|
+
node('[20,200][380,260]', 'android.widget.LinearLayout', 'p:id/search_plate',
|
|
63
|
+
node('[24,212][60,248]', 'android.widget.ImageView', 'p:id/search_mag_icon')))}</hierarchy>`);
|
|
64
|
+
fs.writeFileSync(path.join(dir, 'meta.json'), JSON.stringify({ page_id: 'p', device_info: { density: 1, width_px: 400, height_px: 800 } }));
|
|
65
|
+
return dir;
|
|
66
|
+
}
|
|
67
|
+
function measure(dir) {
|
|
68
|
+
const out = path.join(dir, 'measure_pack.json');
|
|
69
|
+
const r = spawnSync(process.execPath, [SCRIPT, '--ui-info', dir, '--out', out, '--quiet'], { encoding: 'utf8' });
|
|
70
|
+
assert.equal(r.status, 0, r.stderr);
|
|
71
|
+
return { pack: JSON.parse(fs.readFileSync(out, 'utf8')), stderr: r.stderr };
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
test('layer1: no drift → registration ok, icon visible at declared bounds', () => {
|
|
75
|
+
const dir = synthPage(0);
|
|
76
|
+
try {
|
|
77
|
+
const { pack } = measure(dir);
|
|
78
|
+
assert.equal(pack.registration.ok, true);
|
|
79
|
+
const ic = pack.icon_inventory.find((i) => i.key === 'search_mag_icon');
|
|
80
|
+
assert.ok(ic && ic.visible && ic.dy === 0, JSON.stringify(ic));
|
|
81
|
+
} finally { fs.rmSync(dir, { recursive: true, force: true }); }
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
test('layer1: mid-animation drift → DRIFT flagged, icon sampled at shifted position and still visible', () => {
|
|
85
|
+
const dir = synthPage(-60);
|
|
86
|
+
try {
|
|
87
|
+
const { pack, stderr } = measure(dir);
|
|
88
|
+
assert.equal(pack.registration.ok, false);
|
|
89
|
+
assert.equal(pack.registration.dy, -60);
|
|
90
|
+
assert.match(stderr, /drifts from view\.xml/);
|
|
91
|
+
const ic = pack.icon_inventory.find((i) => i.key === 'search_mag_icon');
|
|
92
|
+
assert.equal(ic.dy, -60);
|
|
93
|
+
assert.equal(ic.visible, true);
|
|
94
|
+
} finally { fs.rmSync(dir, { recursive: true, force: true }); }
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
test('layer1: --probe at view.xml bounds warns about drift and thin ink', () => {
|
|
98
|
+
const dir = synthPage(-60);
|
|
99
|
+
try {
|
|
100
|
+
measure(dir);
|
|
101
|
+
const r = spawnSync(process.execPath, [SCRIPT, '--probe', path.join(dir, 'screenshot.png'), '--rect', '20,200,380,260'], { encoding: 'utf8' });
|
|
102
|
+
assert.match(r.stdout, /registration DRIFT/);
|
|
103
|
+
assert.ok(r.stdout.includes('search_plate declared [20,200][380,260] dy=-60px'), r.stdout);
|
|
104
|
+
} finally { fs.rmSync(dir, { recursive: true, force: true }); }
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
/** Real page_0002 capture → measure_pack into a temp ui_info copy. */
|
|
108
|
+
function realUiInfo() {
|
|
109
|
+
const ui = fs.mkdtempSync(path.join(os.tmpdir(), 'icov-real-'));
|
|
110
|
+
fs.cpSync(path.join(FIX, PAGE), path.join(ui, PAGE), { recursive: true });
|
|
111
|
+
measure(path.join(ui, PAGE));
|
|
112
|
+
return ui;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
test('layer1 real capture: page_0002 drift -81px, search_mag_icon visible #49454F', () => {
|
|
116
|
+
const ui = realUiInfo();
|
|
117
|
+
try {
|
|
118
|
+
const pack = JSON.parse(fs.readFileSync(path.join(ui, PAGE, 'measure_pack.json'), 'utf8'));
|
|
119
|
+
assert.equal(pack.registration.ok, false);
|
|
120
|
+
assert.ok(Math.abs(pack.registration.dy + 81) <= 2, `dy ${pack.registration.dy}`);
|
|
121
|
+
const ic = pack.icon_inventory.find((i) => i.key === 'search_mag_icon');
|
|
122
|
+
assert.equal(ic.visible, true);
|
|
123
|
+
assert.equal(ic.ink, '#49454F');
|
|
124
|
+
} finally { fs.rmSync(ui, { recursive: true, force: true }); }
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
test('layer3 real regression: the shipped SearchMenuDialog.ets (icon dropped) is blocked', () => {
|
|
128
|
+
const ui = realUiInfo();
|
|
129
|
+
try {
|
|
130
|
+
const src = fs.readFileSync(path.join(FIX, 'SearchMenuDialog.buggy.ets'), 'utf8');
|
|
131
|
+
const r = iconCoverage({ uiInfo: ui, pageDirs: [PAGE], files: new Map([['SearchMenuDialog.ets', src]]) });
|
|
132
|
+
assert.equal(r.gate.length, 1, r.gate.join('\n'));
|
|
133
|
+
assert.match(r.gate[0], /^icon-uncovered .*search_mag_icon/);
|
|
134
|
+
assert.equal(r.drift.length, 1);
|
|
135
|
+
} finally { fs.rmSync(ui, { recursive: true, force: true }); }
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
test('layer3 real: ICON-OMIT "white-on-white" is refused by the pixels', () => {
|
|
139
|
+
const ui = realUiInfo();
|
|
140
|
+
try {
|
|
141
|
+
const src = fs.readFileSync(path.join(FIX, 'SearchMenuDialog.buggy.ets'), 'utf8') +
|
|
142
|
+
'\n// ICON-OMIT: search_mag_icon — CustomSearchView.java:43 tints it white over the white bar\n';
|
|
143
|
+
const r = iconCoverage({ uiInfo: ui, pageDirs: [PAGE], files: new Map([['SearchMenuDialog.ets', src]]) });
|
|
144
|
+
assert.equal(r.gate.length, 1);
|
|
145
|
+
assert.match(r.gate[0], /^icon-omit-refused .*search_mag_icon/);
|
|
146
|
+
} finally { fs.rmSync(ui, { recursive: true, force: true }); }
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
test('layer3 real: the fixed dialog (Image + ICON marker) passes', () => {
|
|
150
|
+
const ui = realUiInfo();
|
|
151
|
+
try {
|
|
152
|
+
const src = fs.readFileSync(path.join(FIX, 'SearchMenuDialog.buggy.ets'), 'utf8').replace(
|
|
153
|
+
/ Column\(\) \{\r?\n TextInput\(/,
|
|
154
|
+
' Column() {\n Stack({ alignContent: Alignment.Start }) {\n' +
|
|
155
|
+
' // ICON: search_mag_icon\n' +
|
|
156
|
+
" Image($r('app.media.ic_search')).width(24).height(24).margin({ left: 12 })\n" +
|
|
157
|
+
' TextInput(');
|
|
158
|
+
assert.notEqual(src, fs.readFileSync(path.join(FIX, 'SearchMenuDialog.buggy.ets'), 'utf8'), 'fixture anchor moved');
|
|
159
|
+
const r = iconCoverage({ uiInfo: ui, pageDirs: [PAGE], files: new Map([['SearchMenuDialog.ets', src]]) });
|
|
160
|
+
assert.deepEqual(r.gate, []);
|
|
161
|
+
assert.equal(r.checked, 1);
|
|
162
|
+
} finally { fs.rmSync(ui, { recursive: true, force: true }); }
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
test('layer3: a marker with no image call nearby does not count', () => {
|
|
166
|
+
const s = scanMarkers('// ICON: a\nText("x")\nText("y")\nText("z")\nImage($r("app.media.a"))\n');
|
|
167
|
+
assert.equal(s.marks.get('a')[0].attached, false);
|
|
168
|
+
const ok = scanMarkers('Row() {\n // ICON: a, b\n HeaderIcon({ icon: $r("app.media.a") })\n}');
|
|
169
|
+
assert.equal(ok.marks.get('a')[0].attached, true);
|
|
170
|
+
assert.equal(ok.marks.get('b')[0].attached, true);
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
test('layer3: stale pack without icon_inventory is a CAND, not a silent pass', () => {
|
|
174
|
+
const ui = fs.mkdtempSync(path.join(os.tmpdir(), 'icov-stale-'));
|
|
175
|
+
try {
|
|
176
|
+
fs.mkdirSync(path.join(ui, 'p'));
|
|
177
|
+
fs.writeFileSync(path.join(ui, 'p', 'meta.json'), JSON.stringify({ screenshot: 'p/screenshot.png' }));
|
|
178
|
+
fs.writeFileSync(path.join(ui, 'p', 'measure_pack.json'), JSON.stringify({ regions: [] }));
|
|
179
|
+
const r = iconCoverage({ uiInfo: ui, pageDirs: ['p'], files: new Map() });
|
|
180
|
+
assert.equal(r.gate.length, 0);
|
|
181
|
+
assert.match(r.cand[0], /icon-inventory-missing/);
|
|
182
|
+
} finally { fs.rmSync(ui, { recursive: true, force: true }); }
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
// ---- review !173 regressions ----
|
|
186
|
+
|
|
187
|
+
/** Build a page from `blocks` ([x1,y1,x2,y2,rgb,dy]) and a view tree string; density 1, 400x800, purple page. */
|
|
188
|
+
function synthTree(blocks, tree) {
|
|
189
|
+
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'icov-r-'));
|
|
190
|
+
fs.writeFileSync(path.join(dir, 'screenshot.png'), png(400, 800, (x, y) => {
|
|
191
|
+
for (const [x1, y1, x2, y2, rgb, dy] of blocks) {
|
|
192
|
+
const yy = y - dy;
|
|
193
|
+
if (x >= x1 && x < x2 && yy >= y1 && yy < y2) return rgb;
|
|
194
|
+
}
|
|
195
|
+
return [188, 169, 222];
|
|
196
|
+
}));
|
|
197
|
+
fs.writeFileSync(path.join(dir, 'view.xml'), `<?xml version="1.0"?><hierarchy rotation="0">${tree}</hierarchy>`);
|
|
198
|
+
fs.writeFileSync(path.join(dir, 'meta.json'), JSON.stringify({ page_id: 'p', device_info: { density: 1, width_px: 400, height_px: 800 } }));
|
|
199
|
+
return dir;
|
|
200
|
+
}
|
|
201
|
+
const W = [255, 255, 255];
|
|
202
|
+
const INK = [73, 69, 79];
|
|
203
|
+
const FL = 'android.widget.FrameLayout';
|
|
204
|
+
const IV = 'android.widget.ImageView';
|
|
205
|
+
|
|
206
|
+
test('review#1: a drifting sheet with fewer anchors than the static page still shifts its icons', () => {
|
|
207
|
+
// two static bars (dy 0) outvote one sheet card (dy 60); the icon sits in the card
|
|
208
|
+
const dir = synthTree([
|
|
209
|
+
[40, 340, 60, 360, INK, 60],
|
|
210
|
+
[20, 100, 380, 160, W, 0], [20, 180, 380, 240, W, 0], [20, 320, 380, 380, W, 60],
|
|
211
|
+
], node('[0,0][400,800]', FL, '',
|
|
212
|
+
node('[20,100][380,160]', FL, 'p:id/bar1') + node('[20,180][380,240]', FL, 'p:id/bar2') +
|
|
213
|
+
node('[0,300][400,800]', FL, 'p:id/sheet',
|
|
214
|
+
node('[20,320][380,380]', FL, 'p:id/card1', node('[30,330][70,370]', IV, 'p:id/search_mag_icon')))));
|
|
215
|
+
try {
|
|
216
|
+
const { pack } = measure(dir);
|
|
217
|
+
assert.equal(pack.registration.ok, false, JSON.stringify(pack.registration.anchors));
|
|
218
|
+
const ic = pack.icon_inventory.find((i) => i.key === 'search_mag_icon');
|
|
219
|
+
assert.equal(ic.dy, 60, JSON.stringify(ic));
|
|
220
|
+
assert.equal(ic.visible, true);
|
|
221
|
+
} finally { fs.rmSync(dir, { recursive: true, force: true }); }
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
test('review#2: an icon outside the drifting subtree is not shifted by it', () => {
|
|
225
|
+
const dir = synthTree([
|
|
226
|
+
[30, 50, 50, 70, INK, 0],
|
|
227
|
+
[20, 320, 380, 380, W, 60], [20, 520, 380, 580, W, 60],
|
|
228
|
+
], node('[0,0][400,800]', FL, '',
|
|
229
|
+
node('[0,0][400,90]', FL, 'p:id/header', node('[20,40][60,80]', IV, 'p:id/back_icon')) +
|
|
230
|
+
node('[0,300][400,800]', FL, 'p:id/sheet',
|
|
231
|
+
node('[20,320][380,380]', FL, 'p:id/card1') + node('[20,520][380,580]', FL, 'p:id/card2'))));
|
|
232
|
+
try {
|
|
233
|
+
const { pack } = measure(dir);
|
|
234
|
+
assert.equal(pack.registration.ok, false);
|
|
235
|
+
const ic = pack.icon_inventory.find((i) => i.key === 'back_icon');
|
|
236
|
+
assert.equal(ic.dy, 0, JSON.stringify(ic));
|
|
237
|
+
assert.equal(ic.visible, true);
|
|
238
|
+
} finally { fs.rmSync(dir, { recursive: true, force: true }); }
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
test('review: a background gap as tall as the card is not taken for the drifted card', () => {
|
|
242
|
+
// static bar [240,300]; card1 declared [300,360] drawn 60 lower, so its declared box shows a 60px purple gap
|
|
243
|
+
const dir = synthTree([[20, 240, 380, 300, W, 0], [20, 300, 380, 360, W, 60], [20, 420, 380, 480, W, 60]],
|
|
244
|
+
node('[0,0][400,800]', FL, '', node('[20,240][380,300]', FL, 'p:id/bar') +
|
|
245
|
+
node('[0,290][400,800]', FL, 'p:id/sheet', node('[20,300][380,360]', FL, 'p:id/card1') + node('[20,420][380,480]', FL, 'p:id/card2'))));
|
|
246
|
+
try {
|
|
247
|
+
const { pack } = measure(dir);
|
|
248
|
+
const c1 = pack.registration.anchors.find((x) => x.rid === 'p:id/card1');
|
|
249
|
+
assert.ok(!c1 || c1.dy === 60, JSON.stringify(pack.registration.anchors));
|
|
250
|
+
assert.equal(pack.registration.ok, false);
|
|
251
|
+
} finally { fs.rmSync(dir, { recursive: true, force: true }); }
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
/** ui_info with one captured page whose pack holds `icons`. */
|
|
255
|
+
function packWith(icons, registration = { ok: true, anchors: [] }) {
|
|
256
|
+
const ui = fs.mkdtempSync(path.join(os.tmpdir(), 'icov-p-'));
|
|
257
|
+
fs.mkdirSync(path.join(ui, 'p'));
|
|
258
|
+
fs.writeFileSync(path.join(ui, 'p', 'meta.json'), JSON.stringify({ screenshot: 'p/screenshot.png' }));
|
|
259
|
+
fs.writeFileSync(path.join(ui, 'p', 'measure_pack.json'), JSON.stringify({ registration, icon_inventory: icons }));
|
|
260
|
+
return ui;
|
|
261
|
+
}
|
|
262
|
+
const row = (key, visible, extra = {}) => ({ key, node: 1, rid: `p:id/${key}`, declaredPx: '[0,0][1,1]', sampledPx: '[0,0][1,1]',
|
|
263
|
+
dy: 0, ink: '#000000', bg: '#FFFFFF', inkShare: visible ? 0.1 : 0, bgUniform: true, visible, ...extra });
|
|
264
|
+
|
|
265
|
+
test('review#4: repeated resource-id (list rows) is visible when any row is', () => {
|
|
266
|
+
const ui = packWith([row('imgWeatherIcon', false), row('imgWeatherIcon', true)]);
|
|
267
|
+
try {
|
|
268
|
+
const r = iconCoverage({ uiInfo: ui, pageDirs: ['p'], files: new Map() });
|
|
269
|
+
assert.equal(r.gate.length, 1, r.gate.join('\n') + r.cand.join('\n'));
|
|
270
|
+
assert.match(r.gate[0], /^icon-uncovered .*imgWeatherIcon/);
|
|
271
|
+
} finally { fs.rmSync(ui, { recursive: true, force: true }); }
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
test('review#6: a trailing note after the key list is not split into keys', () => {
|
|
275
|
+
const s = scanMarkers("// ICON: search_mag_icon - magnifier\nImage($r('app.media.ic_search'))");
|
|
276
|
+
assert.deepEqual([...s.marks.keys()], ['search_mag_icon']);
|
|
277
|
+
const t = scanMarkers("// ICON: a, b.c\nImage($r('app.media.a'))");
|
|
278
|
+
assert.deepEqual([...t.marks.keys()], ['a', 'b.c']);
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
test('review#7: a detached marker reports detached only, not also uncovered', () => {
|
|
282
|
+
const ui = packWith([row('a', true)]);
|
|
283
|
+
try {
|
|
284
|
+
const r = iconCoverage({ uiInfo: ui, pageDirs: ['p'], files: new Map([['x.ets', '// ICON: a\nText("x")\nText("y")\nText("z")\nText("w")\n']]) });
|
|
285
|
+
assert.equal(r.gate.length, 1, r.gate.join('\n'));
|
|
286
|
+
assert.match(r.gate[0], /^icon-marker-detached/);
|
|
287
|
+
} finally { fs.rmSync(ui, { recursive: true, force: true }); }
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
test('review#5: an ImageView without an id is keyed by content-desc, else node<idx>', () => {
|
|
291
|
+
const dir = synthTree([[40, 40, 60, 60, INK, 0]],
|
|
292
|
+
node('[0,0][400,800]', FL, '', node('[30,30][70,70]', IV, '').replace('content-desc=""', 'content-desc="Back button"') +
|
|
293
|
+
node('[100,30][140,70]', IV, '')));
|
|
294
|
+
try {
|
|
295
|
+
const { pack } = measure(dir);
|
|
296
|
+
const keys = pack.icon_inventory.map((i) => i.key);
|
|
297
|
+
assert.ok(keys.includes('Back_button'), keys.join(','));
|
|
298
|
+
assert.ok(keys.some((k) => /^node\d+$/.test(k)), keys.join(','));
|
|
299
|
+
} finally { fs.rmSync(dir, { recursive: true, force: true }); }
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
// N4: the host's chrome icons are drawn by a shared component outside the group
|
|
303
|
+
test('an attached ICON marker elsewhere in the ets root covers a shared chrome icon', () => {
|
|
304
|
+
const ui = packWith([row('toolbar_back', true), row('page_icon', true)]);
|
|
305
|
+
try {
|
|
306
|
+
const shared = [['components/TitleBar.ets', "// ICON: toolbar_back\nImage($r('app.media.ic_back'))\n"]];
|
|
307
|
+
const r = iconCoverage({ uiInfo: ui, pageDirs: ['p'], files: new Map(), shared });
|
|
308
|
+
assert.equal(r.gate.length, 1, r.gate.join('\n'));
|
|
309
|
+
assert.match(r.gate[0], /^icon-uncovered .*page_icon/, 'the page\'s own icon still needs its marker');
|
|
310
|
+
const detachedOnly = iconCoverage({ uiInfo: ui, pageDirs: ['p'], files: new Map(),
|
|
311
|
+
shared: [['components/TitleBar.ets', '// ICON: toolbar_back\nText("x")\nText("y")\nText("z")\nText("w")\n']] });
|
|
312
|
+
assert.ok(detachedOnly.gate.some((g) => /toolbar_back/.test(g)), 'a detached shared marker covers nothing');
|
|
313
|
+
} finally { fs.rmSync(ui, { recursive: true, force: true }); }
|
|
314
|
+
});
|