@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,35 @@
|
|
|
1
|
+
// T5: --follow-min keeps a blocked cycle polling its review answers instead of leaving the device idle
|
|
2
|
+
import { test } from 'node:test';
|
|
3
|
+
import assert from 'node:assert/strict';
|
|
4
|
+
import * as fs from 'node:fs';
|
|
5
|
+
import * as os from 'node:os';
|
|
6
|
+
import * as path from 'node:path';
|
|
7
|
+
import { followAnswers } from '../run_cycle.mjs';
|
|
8
|
+
|
|
9
|
+
function campaign() {
|
|
10
|
+
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'follow-'));
|
|
11
|
+
const parts = [path.join(root, 'b_answers.part0.json'), path.join(root, 'b_answers.part1.json')];
|
|
12
|
+
const state = { waiting: [{ worklist: path.join(root, 'b_worklist.json'), parts: parts.map((a) => ({ answers: a })) }] };
|
|
13
|
+
return { root, parts, state };
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
test('returns true as soon as every waiting part is answered', () => {
|
|
17
|
+
const { root, parts, state } = campaign();
|
|
18
|
+
let t = 0; let polls = 0;
|
|
19
|
+
const ok = followAnswers(root, { follow_min: 30 }, state, {
|
|
20
|
+
now: () => t,
|
|
21
|
+
sleepMs: (ms) => { t += ms; polls += 1; if (polls === 2) for (const p of parts) fs.writeFileSync(p, '[]'); },
|
|
22
|
+
});
|
|
23
|
+
assert.equal(ok, true);
|
|
24
|
+
assert.equal(polls, 2);
|
|
25
|
+
const log = fs.readFileSync(path.join(root, 'cycle_progress.jsonl'), 'utf8');
|
|
26
|
+
assert.match(log, /follow-ready/);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
test('gives up after --follow-min, and is off by default', () => {
|
|
30
|
+
const { root, state } = campaign();
|
|
31
|
+
let t = 0;
|
|
32
|
+
assert.equal(followAnswers(root, { follow_min: 1 }, state, { now: () => t, sleepMs: (ms) => { t += ms; } }), false);
|
|
33
|
+
assert.ok(t >= 60_000);
|
|
34
|
+
assert.equal(followAnswers(root, { follow_min: 0 }, state, { now: () => 0, sleepMs: () => { throw new Error('no wait'); } }), false);
|
|
35
|
+
});
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
// seed_recipes: a create producer (a2h-utg-static data_producers) turned into a gated recipe phase
|
|
2
|
+
// that makes one record in its initial state and verifies it on the entity's empty list page.
|
|
3
|
+
import { test } from 'node:test';
|
|
4
|
+
import assert from 'node:assert/strict';
|
|
5
|
+
import { buildRecipes, initialRecord, preconditions, unlockedBy } from '../seed_recipes.mjs';
|
|
6
|
+
|
|
7
|
+
const MODEL = { entities: { order: { fields: { status: { values: { 0: 'unpaid' }, initial: '0' } },
|
|
8
|
+
producers: [{ kind: 'create', page: 'r:Confirm', control_text: 'Place order', vm_fn: 'onSubmit', endpoint: 'POST order/create', checks: ['addressId == null'] }] } } };
|
|
9
|
+
const need = (op, values) => [{ entity: 'order', states: { status: { op, values } } }];
|
|
10
|
+
const obs = (id, sid, texts, env = 'recD-cart') => ({ kind: 'observation', environment_id: env, payload: { observation_id: id, activity: 'A',
|
|
11
|
+
static_resolution: { status: 'verified', static_id: sid }, nodes: texts.map((text) => ({ text, visible: true })) } });
|
|
12
|
+
const DOC = {
|
|
13
|
+
nodes: [
|
|
14
|
+
{ id: 'r:Confirm', data_needs: [{ entity: 'goods', states: {} }] },
|
|
15
|
+
{ id: 'r:Goods', data_needs: [{ entity: 'goods', states: {} }] },
|
|
16
|
+
{ id: 'r:OrderList' }, { id: 'r:AddressList' },
|
|
17
|
+
{ id: 'r:CancelDialog', data_needs: need('in', ['0', '2']) },
|
|
18
|
+
{ id: 'r:Track', data_needs: need('in', ['2', '3']) },
|
|
19
|
+
{ id: 'r:Rebuy', data_needs: need('not-in', ['0', '2']) },
|
|
20
|
+
{ id: 'r:Empty', body_text: [{ text: 'No data', at: 'ui/component/empty/EmptyData.kt:3' }, { text: 'Nothing here', at: 'ui/component/empty/EmptyData.kt:4' }] },
|
|
21
|
+
],
|
|
22
|
+
page_catalog: { 'r:OrderList': { titles: ['Orders'] } },
|
|
23
|
+
tasks: [
|
|
24
|
+
{ task_id: 'buy', status: 'compiled', target_static: 'r:Confirm', replay: [{ type: 'click_candidates', selectors: [{ text: 'Buy' }], target_id: 'r:Goods' }],
|
|
25
|
+
action: { type: 'click_candidates', selectors: [{ text: 'Checkout' }] } },
|
|
26
|
+
{ task_id: 'cancel', status: 'compiled', target_static: 'r:CancelDialog', replay: [{ type: 'click_candidates', selectors: [{ text: 'My orders' }], target_id: 'r:OrderList' }],
|
|
27
|
+
action: { type: 'click_candidates', selectors: [{ text: 'Cancel order' }] } },
|
|
28
|
+
{ task_id: 'track', status: 'compiled', target_static: 'r:Track', replay: [], action: { type: 'click_candidates', selectors: [{ text: 'Track' }] } },
|
|
29
|
+
],
|
|
30
|
+
events: [
|
|
31
|
+
{ kind: 'task_result', environment_id: 'recD-cart', payload: { task_id: 'buy@recD-cart', outcome: 'confirmed' } },
|
|
32
|
+
{ kind: 'task_result', environment_id: 'recD-cart', payload: { task_id: 'buy', outcome: 'confirmed' } },
|
|
33
|
+
{ kind: 'mapping', environment_id: 'recD-cart', payload: { static_id: 'r:Confirm', observation_id: 'o1' } },
|
|
34
|
+
{ kind: 'mapping', environment_id: 'recD-cart', payload: { static_id: 'r:Goods', observation_id: 'o2' } },
|
|
35
|
+
{ kind: 'mapping', environment_id: 'recD-login', payload: { static_id: 'r:OrderList', observation_id: 'o3' } },
|
|
36
|
+
obs('o3', 'r:OrderList', ['Orders', 'No data', 'Nothing here'], 'recD-login'),
|
|
37
|
+
obs('o4', 'r:AddressList', ['Addresses', 'No data', 'Nothing here'], 'recD-login'),
|
|
38
|
+
],
|
|
39
|
+
};
|
|
40
|
+
const CONFIG = { snapshot_dir: '/snap', fixtures: { 'recD-cart': [{ type: 'restore_app_data', archive: '/snap/login.tar' }, { type: 'launch', component: 'p/A' }, { type: 'snapshot_app_data', archive: '/snap/recD-cart.tar' }, { type: 'launch', component: 'p/A' }] } };
|
|
41
|
+
const PLAN = { empty_pages: [{ page: 'r:OrderList', kind: 'data', shown: 'No data / Nothing here' }] };
|
|
42
|
+
|
|
43
|
+
test('a new record starts in its fields\' data-class defaults and unlocks only the pages that state satisfies', () => {
|
|
44
|
+
assert.deepEqual(initialRecord(MODEL, 'order'), { status: '0' });
|
|
45
|
+
const byId = new Map(DOC.nodes.map((n) => [n.id, n]));
|
|
46
|
+
assert.deepEqual(unlockedBy(['r:CancelDialog', 'r:Track', 'r:Rebuy'], byId, 'order', { status: '0' }, new Set()), ['r:CancelDialog']);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
test('a producer check naming an entity whose list was seen empty is an unmet precondition', () => {
|
|
50
|
+
const p = preconditions(MODEL.entities.order.producers[0], DOC);
|
|
51
|
+
assert.deepEqual(p, [{ check: 'addressId == null', entity: 'address', list_seen_empty: ['r:AddressList'], unmet: true }]);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
test('a check\'s entities come from the static model (check_entities), never guessed again here', () => {
|
|
55
|
+
// the static layer read 「addressid」 as address (Address is a record class); the explorer takes its word
|
|
56
|
+
const producer = { checks: ['addressid == null'], check_entities: [{ check: 'addressid == null', entities: ['address'] }] };
|
|
57
|
+
assert.equal(preconditions(producer, DOC)[0].entity, 'address');
|
|
58
|
+
// and an id word it did not take (「isvalid」) is no entity here either
|
|
59
|
+
assert.equal(preconditions({ checks: ['!isvalid'], check_entities: [{ check: '!isvalid', entities: [] }] }, DOC)[0].entity, null);
|
|
60
|
+
// a model from before the field: the camelCase / snake suffix only
|
|
61
|
+
assert.equal(preconditions({ checks: ['addressid == null'] }, DOC)[0].entity, null);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
test('the recipe: base fixtures, the path to the producer page, one tap, a snapshot, the list page, a no-empty-state probe', () => {
|
|
65
|
+
const { recipes, skipped } = buildRecipes(DOC, CONFIG, MODEL, PLAN);
|
|
66
|
+
assert.deepEqual(skipped, []);
|
|
67
|
+
const r = recipes[0];
|
|
68
|
+
assert.equal(r.id, 'recS-order-status-0');
|
|
69
|
+
assert.equal(r.base, 'recD-cart');
|
|
70
|
+
assert.deepEqual(r.unlocks, ['r:CancelDialog']);
|
|
71
|
+
assert.deepEqual(r.task_ids, ['cancel']);
|
|
72
|
+
const types = r.fixtures.map((s) => s.type + (s.selectors ? `:${s.selectors[0].text}` : ''));
|
|
73
|
+
assert.deepEqual(types, ['restore_app_data', 'launch', 'launch', 'wait', 'click_candidates:My orders', 'wait', 'skip_unless',
|
|
74
|
+
'launch', 'wait', 'click_candidates:Buy', 'click_candidates:Checkout', 'click_candidates:Place order',
|
|
75
|
+
'wait', 'snapshot_app_data', 'launch', 'wait', 'click_candidates:My orders', 'wait']);
|
|
76
|
+
const g = r.fixtures.find((s) => s.type === 'skip_unless');
|
|
77
|
+
assert.deepEqual(g.rule, { any: [{ text: 'No data' }, { text: 'Nothing here' }] }, 'the record is made only while its list is empty');
|
|
78
|
+
assert.equal(g.count, 6);
|
|
79
|
+
assert.equal(r.fixtures.filter((s) => s.type === 'snapshot_app_data').length, 1, 'the base phase\'s own snapshot is replaced');
|
|
80
|
+
assert.deepEqual(r.probes, [{ any: [{ text: 'Orders' }], none: [{ text: 'No data' }, { text: 'Nothing here' }] }]);
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
// ---- step 3: preconditions made first through their own producer's form ----
|
|
84
|
+
import { exampleFor, formSteps } from '../seed_recipes.mjs';
|
|
85
|
+
import { Runner } from '../utg_explorer/task_runner.mjs';
|
|
86
|
+
|
|
87
|
+
test('a value the app\'s own pattern accepts', () => {
|
|
88
|
+
for (const p of [String.raw`^1[3-9]\d{9}$`, String.raw`^[a-z]+@[a-z]+\.com$`, String.raw`^(?:\+86)?1\d{10}$`, String.raw`^[A-Z]{2}\d{3,5}$`]) {
|
|
89
|
+
assert.ok(new RegExp(p).test(exampleFor(p)), p);
|
|
90
|
+
}
|
|
91
|
+
assert.equal(exampleFor('^(a|b'), null);
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
test('form steps: typed fields, a picker through its overlay, the switch the consumer check names', () => {
|
|
95
|
+
const form = [
|
|
96
|
+
{ label: 'Contact', kind: 'text', neighbors: [null, 'Phone'] },
|
|
97
|
+
{ label: 'Phone', kind: 'text', keyboard: 'Phone', pattern: String.raw`^1\d{3}$`, neighbors: ['Contact', 'Region'] },
|
|
98
|
+
{ label: 'Region', kind: 'picker', at: 'a/F.kt:20', neighbors: ['Phone', 'Street'] },
|
|
99
|
+
{ label: 'Use first for orders', key: 'default_address_tip', kind: 'switch', neighbors: ['Street', null] },
|
|
100
|
+
{ label: 'Notify me', key: 'push_tip', kind: 'switch', neighbors: [null, null] },
|
|
101
|
+
];
|
|
102
|
+
const doc = { edges: [{ source: 'r:Form', target: 'overlay:Picker', mechanism: 'open-overlay', trigger: 'onClick@a/F.kt:31' }],
|
|
103
|
+
page_catalog: { 'overlay:Picker': { titles: ['Pick a region'] } } };
|
|
104
|
+
const s = formSteps(form, doc, 'r:Form', new Set(['default']));
|
|
105
|
+
const sig = s.map((x) => x.type + (x.value ? `=${x.value}` : '') + (x.label ? `:${x.label}` : '') + (x.selectors ? `:${x.selectors[0].text}` : ''));
|
|
106
|
+
assert.deepEqual(sig.filter((x) => !x.startsWith('wait')), ['click_candidates:Contact', 'input=Test', 'click_candidates:Phone', 'input=1000',
|
|
107
|
+
'click_candidates:Region', 'click_list_item', 'click_list_item', 'click_list_item', 'click_list_item', 'toggle_on:Use first for orders']);
|
|
108
|
+
assert.deepEqual(s.find((x) => x.type === 'click_list_item').when, { any: [{ text: 'Pick a region' }] });
|
|
109
|
+
assert.deepEqual(s[0].neighbors, [null, 'Phone']);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
const node = (text, b, extra = {}) => ({ text, class: 'android.widget.TextView', visible: true, enabled: true, clickable: false, bounds: b, ...extra });
|
|
113
|
+
test('a field the screen shows only as a text-less clickable is tapped between its neighbours', () => {
|
|
114
|
+
const r = Object.create(Runner.prototype);
|
|
115
|
+
r.current = { nodes: [node('Phone', [100, 600, 300, 650]), node('', [64, 820, 1016, 990], { class: 'android.view.View', clickable: true }), node('Street', [100, 1080, 300, 1130])] };
|
|
116
|
+
assert.deepEqual(r.betweenNeighbors({ neighbors: ['Phone', 'Street'] }).type, 'click_point');
|
|
117
|
+
assert.equal(r.betweenNeighbors({ neighbors: ['Phone', 'Street'] }).y, 905);
|
|
118
|
+
assert.equal(r.betweenNeighbors({}), null, 'no neighbours named: no guessing');
|
|
119
|
+
r.current.nodes.push(node('', [64, 700, 1016, 800], { class: 'android.view.View', clickable: true }));
|
|
120
|
+
assert.equal(r.betweenNeighbors({ neighbors: ['Phone', 'Street'] }), null, 'two candidates: no guessing');
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
test('a column of same-shaped clickable rows is a list even when not flagged scrollable', async () => {
|
|
124
|
+
const { rowGroups } = await import('../utg_explorer/task_runner.mjs');
|
|
125
|
+
const v = (p, b, extra = {}) => ({ class: 'android.view.View', parent_index: p, visible: true, enabled: true, clickable: false, bounds: b, ...extra });
|
|
126
|
+
const nodes = [v(null, [0, 0, 1080, 2400]), v(0, [42, 1376, 190, 1502], { clickable: true }), v(0, [42, 1500, 1038, 2400])];
|
|
127
|
+
for (let k = 0; k < 5; k++) { nodes.push(v(2, [42, 1513 + k * 137, 1038, 1649 + k * 137], { clickable: true })); }
|
|
128
|
+
nodes.push(v(2, [42, 2198, 1038, 2260], { clickable: true }));
|
|
129
|
+
assert.deepEqual(rowGroups(nodes), [2]);
|
|
130
|
+
assert.deepEqual(rowGroups(nodes.slice(0, 5)), [], 'two rows are no list');
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
test('a one-row picker level is a list; a tab strip, a drag handle and a scrim are not', async () => {
|
|
134
|
+
const { rowGroups } = await import('../utg_explorer/task_runner.mjs');
|
|
135
|
+
const v = (p, b, extra = {}) => ({ class: 'android.view.View', text: '', parent_index: p, visible: true, enabled: true, clickable: false, bounds: b, ...extra });
|
|
136
|
+
const t = (p, text) => ({ class: 'android.widget.TextView', text, parent_index: p, visible: true, enabled: true, clickable: false, bounds: [0, 0, 10, 10] });
|
|
137
|
+
const nodes = [v(null, [0, 0, 1080, 2400]),
|
|
138
|
+
v(0, [0, 0, 1080, 1840], { clickable: true }), v(0, [0, 1855, 1080, 2400]), // 1 scrim, 2 sheet
|
|
139
|
+
v(2, [0, 1855, 1080, 1950]), v(3, [0, 1840, 1080, 1966], { clickable: true }), // 3/4 drag handle (no text)
|
|
140
|
+
v(2, [42, 1950, 1038, 2160]), v(5, [42, 2031, 190, 2157], { clickable: true }), t(6, 'Beijing'), // 5 tabs: narrow
|
|
141
|
+
v(5, [211, 2031, 359, 2157], { clickable: true }), t(8, 'Pick'),
|
|
142
|
+
v(2, [42, 2168, 1038, 2305]), v(10, [42, 2168, 1038, 2304], { clickable: true }), t(11, 'Beijing')]; // 10 the one-row list
|
|
143
|
+
assert.deepEqual(rowGroups(nodes), [10]);
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
test('a precondition record is created only while its list page shows the empty state', () => {
|
|
147
|
+
const MODEL2 = { entities: { ...MODEL.entities, address: { fields: {}, producers: [{ kind: 'create', page: 'r:AddrForm', control_text: 'Save',
|
|
148
|
+
form: [{ label: 'Contact', kind: 'text', neighbors: [null, null] }] }] } } };
|
|
149
|
+
const doc = structuredClone(DOC);
|
|
150
|
+
doc.nodes.push({ id: 'r:AddrForm' });
|
|
151
|
+
doc.tasks.push({ task_id: 'addr', status: 'compiled', target_static: 'r:AddrPicker',
|
|
152
|
+
replay: [{ type: 'click_candidates', selectors: [{ text: 'Addresses' }], target_id: 'r:AddressList' }, { type: 'click_candidates', selectors: [{ text: 'New' }], target_id: 'r:AddrForm' }],
|
|
153
|
+
action: { type: 'click_candidates', selectors: [{ text: 'Region' }] } });
|
|
154
|
+
doc.events.push({ kind: 'mapping', environment_id: 'recD-login', payload: { static_id: 'r:AddrForm', observation_id: 'o5' } });
|
|
155
|
+
const { recipes } = buildRecipes(doc, CONFIG, MODEL2, PLAN);
|
|
156
|
+
const f = recipes[0].fixtures;
|
|
157
|
+
const g = f.findIndex((s, i) => s.type === 'skip_unless' && i > f.findIndex((x) => x.type === 'skip_unless'));
|
|
158
|
+
assert.ok(g > 0, 'the precondition guard sits inside the record guard');
|
|
159
|
+
assert.deepEqual(f[g - 2].selectors[0], { text: 'Addresses' }, 'the guard stands on the list page');
|
|
160
|
+
assert.deepEqual(f[g].rule, { any: [{ text: 'No data' }, { text: 'Nothing here' }] });
|
|
161
|
+
const guarded = f.slice(g + 1, g + 1 + f[g].count).map((s) => s.selectors?.[0]?.text ?? s.type);
|
|
162
|
+
assert.deepEqual(guarded, ['New', 'wait', 'Contact', 'input', 'Save', 'wait']);
|
|
163
|
+
assert.deepEqual(recipes[0].made_first.map((m) => m.made), [true]);
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
test('a scheduled task\'s taps are adapted to the record the recipe makes', async () => {
|
|
167
|
+
const { adaptTask } = await import('../seed_recipes.mjs');
|
|
168
|
+
const node = { data_requirements: [
|
|
169
|
+
{ entity: 'order', kind: 'state', field: 'status', op: 'in', values: ['4'], step: 4, via: 'tap 「Completed」 at step 4' },
|
|
170
|
+
{ entity: 'order', kind: 'state', field: 'status', op: 'in', values: ['0'], step: 5, via: 'tap 「Cancel」 at step 5' },
|
|
171
|
+
{ entity: 'order', kind: 'state', field: 'status', op: 'in', values: ['2'], step: 5, via: 'tap 「Received」 at step 5' }] };
|
|
172
|
+
const model = { entities: { order: { fields: { status: { values: { 0: 'Unpaid', 4: 'Completed' } } } } } };
|
|
173
|
+
const t = { replay: [{ type: 'click_candidates', selectors: [{ text: 'Orders' }], static_label: 'Orders' },
|
|
174
|
+
{ type: 'click_candidates', selectors: [{ text: 'Completed' }], static_label: 'Completed' }],
|
|
175
|
+
action: { type: 'click_candidates', selectors: [{ text: 'Received' }], static_label: 'Received' } };
|
|
176
|
+
const ov = adaptTask(t, node, 'order', { status: '0' }, model);
|
|
177
|
+
assert.deepEqual(ov.replay.map((s) => s.static_label), ['Orders', 'Unpaid'], 'the card is opened by the label of the record\'s state');
|
|
178
|
+
assert.equal(ov.action.static_label, 'Cancel', 'the alternative the record satisfies');
|
|
179
|
+
const model2 = { entities: { order: { fields: { status: { values: { 0: 'Unpaid', 2: 'Shipped', 4: 'Completed' } } } } } };
|
|
180
|
+
const ov2 = adaptTask(t, node, 'order', { status: '2' }, model2);
|
|
181
|
+
assert.equal(ov2.replay[1].static_label, 'Shipped');
|
|
182
|
+
assert.equal(ov2.action, t.action, 'a control the record already shows is kept');
|
|
183
|
+
assert.equal(adaptTask(t, node, 'order', { status: '2' }, model), null, 'no label for the state and no alternative: left as compiled');
|
|
184
|
+
assert.equal(adaptTask({ replay: [], action: { static_label: 'Cancel' } }, node, 'order', { status: '0' }, model), null, 'nothing to change');
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
test('instances of one template matched alike are settled by their opener', async () => {
|
|
188
|
+
const { buildCatalog, resolveTwinByOpener } = await import('../utg_explorer/semantics.mjs');
|
|
189
|
+
const graph = { nodes: [{ id: 'r:List', kind: 'compose-route' }, { id: 'r:Detail', kind: 'compose-route' },
|
|
190
|
+
{ id: 'overlay:Pick@a:1', kind: 'sheet', template_of: 'overlay:Pick' }, { id: 'overlay:Pick@b:2', kind: 'sheet', template_of: 'overlay:Pick' }],
|
|
191
|
+
links: [{ source: 'r:List', target: 'overlay:Pick@a:1' }, { source: 'r:Detail', target: 'overlay:Pick@b:2' }] };
|
|
192
|
+
const cat = buildCatalog(graph);
|
|
193
|
+
const amb = { status: 'ambiguous', candidates: [{ static_id: 'overlay:Pick@a:1', reason: 'overlay-lead-title-alone' },
|
|
194
|
+
{ static_id: 'overlay:Pick@b:2', reason: 'overlay-lead-title-alone' }] };
|
|
195
|
+
const r = resolveTwinByOpener(amb, { static_resolution: { status: 'verified', static_id: 'r:Detail' } }, cat);
|
|
196
|
+
assert.equal(r.status, 'verified'); assert.equal(r.static_id, 'overlay:Pick@b:2');
|
|
197
|
+
const g2 = structuredClone(graph); delete g2.nodes[3].template_of;
|
|
198
|
+
assert.equal(resolveTwinByOpener(amb, { static_resolution: { status: 'verified', static_id: 'r:Detail' } }, buildCatalog(g2)).status, 'ambiguous', 'not one template: untouched');
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
test('a precondition whose path skips its list page is guarded by visiting that page first', () => {
|
|
202
|
+
const MODEL2 = { entities: { ...MODEL.entities, address: { fields: {}, producers: [{ kind: 'create', page: 'r:AddrForm', control_text: 'Save',
|
|
203
|
+
form: [{ label: 'Contact', kind: 'text', neighbors: [null, null] }] }] } } };
|
|
204
|
+
const doc = structuredClone(DOC);
|
|
205
|
+
doc.nodes.push({ id: 'r:AddrForm' });
|
|
206
|
+
// the form is reached straight from Me, never through the address list
|
|
207
|
+
doc.tasks.push({ task_id: 'addr', status: 'compiled', target_static: 'r:AddrForm', replay: [{ type: 'click_candidates', selectors: [{ text: 'Me' }], target_id: 'r:Me' }],
|
|
208
|
+
action: { type: 'click_candidates', selectors: [{ text: 'New address' }] } });
|
|
209
|
+
doc.tasks.push({ task_id: 'alist', status: 'compiled', target_static: 'r:AddressList', replay: [], action: { type: 'click_candidates', selectors: [{ text: 'Addresses' }] } });
|
|
210
|
+
doc.events.push({ kind: 'task_result', environment_id: 'recD-login', payload: { task_id: 'addr', outcome: 'confirmed' } },
|
|
211
|
+
{ kind: 'task_result', environment_id: 'recD-login', payload: { task_id: 'alist', outcome: 'confirmed' } });
|
|
212
|
+
const { recipes } = buildRecipes(doc, CONFIG, MODEL2, PLAN);
|
|
213
|
+
const f = recipes[0].fixtures;
|
|
214
|
+
const guards = f.map((s, i) => [s, i]).filter(([s]) => s.type === 'skip_unless').map(([, i]) => i);
|
|
215
|
+
assert.equal(guards.length, 2, 'the record guard and the precondition guard');
|
|
216
|
+
const g = guards[1];
|
|
217
|
+
assert.deepEqual(f[g - 2].selectors[0], { text: 'Addresses' }, 'the precondition guard stands on the address list');
|
|
218
|
+
const guarded = f.slice(g + 1, g + 1 + f[g].count).map((s) => s.selectors?.[0]?.text ?? s.type);
|
|
219
|
+
assert.ok(guarded.includes('Save'), 'the address is created only inside the guard');
|
|
220
|
+
assert.deepEqual(recipes[0].made_first.map((m) => m.made), [true]);
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
test('a precondition with no reachable list page is not created (a rerun could not tell it was made)', () => {
|
|
224
|
+
const MODEL2 = { entities: { ...MODEL.entities, address: { fields: {}, producers: [{ kind: 'create', page: 'r:AddrForm', control_text: 'Save', form: [] }] } } };
|
|
225
|
+
const doc = structuredClone(DOC);
|
|
226
|
+
doc.nodes.push({ id: 'r:AddrForm' });
|
|
227
|
+
doc.tasks.push({ task_id: 'addr', status: 'compiled', target_static: 'r:AddrForm', replay: [], action: { type: 'click_candidates', selectors: [{ text: 'New address' }] } });
|
|
228
|
+
doc.events.push({ kind: 'task_result', environment_id: 'recD-login', payload: { task_id: 'addr', outcome: 'confirmed' } });
|
|
229
|
+
const { recipes } = buildRecipes(doc, CONFIG, MODEL2, PLAN);
|
|
230
|
+
assert.equal(recipes[0].fixtures.filter((s) => s.selectors?.[0]?.text === 'Save').length, 0);
|
|
231
|
+
assert.match(recipes[0].made_first[0].why, /no reachable list page of address/);
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
test('apply refreshes an already scheduled recipe phase: guarded fixtures, probes and the writes_data flag', async () => {
|
|
235
|
+
const fs = await import('node:fs'); const os = await import('node:os'); const path = await import('node:path');
|
|
236
|
+
const { apply } = await import('../seed_recipes.mjs');
|
|
237
|
+
const td = fs.mkdtempSync(path.join(os.tmpdir(), 'seedrefresh-'));
|
|
238
|
+
try {
|
|
239
|
+
fs.mkdirSync(path.join(td, 'static'));
|
|
240
|
+
const doc = { ...structuredClone(DOC), static_utg: path.join(td, 'static', 'utg.json'), phases: [{ id: 'recS-order-status-0', status: 'done' }] };
|
|
241
|
+
fs.writeFileSync(path.join(td, 'campaign.json'), JSON.stringify(doc));
|
|
242
|
+
fs.writeFileSync(path.join(td, 'static', 'data_model.json'), JSON.stringify(MODEL));
|
|
243
|
+
fs.writeFileSync(path.join(td, 'data_seed_plan.json'), JSON.stringify(PLAN));
|
|
244
|
+
// the old, unguarded fixtures an earlier version scheduled
|
|
245
|
+
fs.writeFileSync(path.join(td, 'config.json'), JSON.stringify({ ...CONFIG, allow_data_writes: true,
|
|
246
|
+
fixtures: { ...CONFIG.fixtures, 'recS-order-status-0': [{ type: 'launch' }, { type: 'click_candidates', selectors: [{ text: 'Place order' }] }] } }));
|
|
247
|
+
const [phases, report] = apply(td, path.join(td, 'config.json'));
|
|
248
|
+
assert.deepEqual(phases, ['recS-order-status-0']);
|
|
249
|
+
assert.equal(report.recipes[0].refreshed, true);
|
|
250
|
+
const cfg = JSON.parse(fs.readFileSync(path.join(td, 'config.json'), 'utf8'));
|
|
251
|
+
assert.ok(cfg.fixtures['recS-order-status-0'].some((s) => s.type === 'skip_unless'), 'the guarded fixtures replace the old ones');
|
|
252
|
+
assert.ok(cfg.phase_probes['recS-order-status-0'].length);
|
|
253
|
+
const camp = JSON.parse(fs.readFileSync(path.join(td, 'campaign.json'), 'utf8'));
|
|
254
|
+
assert.equal(camp.phases[0].writes_data, true);
|
|
255
|
+
// the phase's tasks follow the recipe: the page it unlocks now gets its task, and the phase runs again
|
|
256
|
+
assert.deepEqual(camp.tasks.filter((t) => t.phase === 'recS-order-status-0').map((t) => t.task_id), ['cancel@recS-order-status-0']);
|
|
257
|
+
assert.equal(report.recipes[0].tasks_added, 1);
|
|
258
|
+
assert.equal(camp.phases[0].status, 'pending');
|
|
259
|
+
assert.equal(camp.phases[0].task_count, 1);
|
|
260
|
+
} finally { fs.rmSync(td, { recursive: true, force: true }); }
|
|
261
|
+
});
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* 300 s), and a timeout is a `device-timeout` (device recovery), not a parse failure.
|
|
23
23
|
*/
|
|
24
24
|
import * as fs from 'node:fs';
|
|
25
|
+
import * as os from 'node:os';
|
|
25
26
|
import { fileURLToPath } from 'node:url';
|
|
26
27
|
import { spawnSync } from 'node:child_process';
|
|
27
28
|
import {
|
|
@@ -266,6 +267,33 @@ export function ruleMatches(observation, rule) {
|
|
|
266
267
|
const CHECK_CLS = ['Switch', 'SwitchCompat', 'SwitchMaterial', 'CheckBox'];
|
|
267
268
|
|
|
268
269
|
/** row_state(nodes, title): checked state of the two-state control in the row titled `title`, or null. */
|
|
270
|
+
/** rowToggle(nodes, title): index of the one two-state control in the row titled `title`, or null. */
|
|
271
|
+
export function rowToggle(nodes, title) {
|
|
272
|
+
const hits = [];
|
|
273
|
+
nodes.forEach((n, i) => { if (truthy(get(n, 'visible', true)) && pyEq(get(n, 'text'), title)) { hits.push(i); } });
|
|
274
|
+
if (hits.length !== 1) { return null; }
|
|
275
|
+
const kids = new Map();
|
|
276
|
+
nodes.forEach((n, i) => { const p = get(n, 'parent_index'); if (!kids.has(p)) { kids.set(p, []); } kids.get(p).push(i); });
|
|
277
|
+
const checkables = (root) => {
|
|
278
|
+
const out = []; const stack = [root];
|
|
279
|
+
while (stack.length) {
|
|
280
|
+
const j = stack.pop(); const n = nodes[j];
|
|
281
|
+
if (pyIn(get(n, 'checkable'), [true, 'true']) || CHECK_CLS.some((c) => pyStr(get(n, 'class', '')).endsWith(c))) { out.push(j); }
|
|
282
|
+
stack.push(...(kids.get(j) ?? []));
|
|
283
|
+
}
|
|
284
|
+
return out;
|
|
285
|
+
};
|
|
286
|
+
let idx = get(nodes[hits[0]], 'parent_index');
|
|
287
|
+
for (let k = 0; k < 3; k++) {
|
|
288
|
+
if (idx === null || !(idx >= 0 && idx < nodes.length)) { return null; }
|
|
289
|
+
const found = checkables(idx);
|
|
290
|
+
if (found.length === 1) { return found[0]; }
|
|
291
|
+
if (found.length > 1) { return null; }
|
|
292
|
+
idx = get(nodes[idx], 'parent_index');
|
|
293
|
+
}
|
|
294
|
+
return null;
|
|
295
|
+
}
|
|
296
|
+
|
|
269
297
|
export function rowState(nodes, title) {
|
|
270
298
|
const hits = [];
|
|
271
299
|
nodes.forEach((n, i) => { if (truthy(get(n, 'visible', true)) && pyEq(get(n, 'text'), title)) { hits.push(i); } });
|
|
@@ -718,6 +746,19 @@ const RE = {
|
|
|
718
746
|
focus: pyRe('mCurrentFocus=.*?\\s([\\w.]+/[\\w.$]+)'),
|
|
719
747
|
resumed: pyRe('(?:mResumedActivity|topResumedActivity|ResumedActivity):.*?\\s([\\w.]+/[\\w.$]+)'),
|
|
720
748
|
};
|
|
749
|
+
/**
|
|
750
|
+
* canonicalComponent(c): `pkg/.Cls` -> `pkg/pkg.Cls`, any other string unchanged. dumpsys spells the
|
|
751
|
+
* same activity both ways: the resumed-activity fallback (mCurrentFocus=null under a cold launch's
|
|
752
|
+
* starting window) gives `com.yd.weather/.MainActivity`, the focused window a moment later
|
|
753
|
+
* `com.yd.weather/com.yd.weather.MainActivity` (measured yd-weather 11-14: every recD launch threw
|
|
754
|
+
* "Foreground changed during capture" on that alone). Compare components only through this.
|
|
755
|
+
*/
|
|
756
|
+
export function canonicalComponent(component) {
|
|
757
|
+
const c = pyStr(component ?? '');
|
|
758
|
+
const slash = c.indexOf('/');
|
|
759
|
+
if (slash <= 0 || c[slash + 1] !== '.') { return c; }
|
|
760
|
+
return c.slice(0, slash + 1) + c.slice(0, slash) + c.slice(slash + 1);
|
|
761
|
+
}
|
|
721
762
|
const f0 = (x) => fmtFixed(x, 0);
|
|
722
763
|
const floorDiv = (a, b) => Math.floor(a / b);
|
|
723
764
|
const PNG_MAGIC = Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);
|
|
@@ -919,7 +960,7 @@ export class DeviceAdapter {
|
|
|
919
960
|
if (settle) { time.sleep(Math.min(settle * (2 ** attempt), 8.0)); }
|
|
920
961
|
try {
|
|
921
962
|
const [current] = this._foreground();
|
|
922
|
-
if (current !== expected) { last = new AdapterError('ui-dump-foreground-transition: ' + current); }
|
|
963
|
+
if (canonicalComponent(current) !== canonicalComponent(expected)) { last = new AdapterError('ui-dump-foreground-transition: ' + current); }
|
|
923
964
|
} catch (e) {
|
|
924
965
|
if (!(e instanceof AdapterError)) { throw e; }
|
|
925
966
|
last = new AdapterError('ui-dump-foreground-unavailable: ' + e.message);
|
|
@@ -1069,9 +1110,20 @@ export class DeviceAdapter {
|
|
|
1069
1110
|
this._shell('input', 'keyevent', 'KEYCODE_BACK');
|
|
1070
1111
|
time.sleep(Math.max(0.0, toFloat(get(this.config, 'settle_seconds', 0.3))) + 0.5);
|
|
1071
1112
|
[component, focus] = this._foreground();
|
|
1072
|
-
imeSwitcherDismissed = component === under ? 'closed' : 'navigated';
|
|
1113
|
+
imeSwitcherDismissed = canonicalComponent(component) === canonicalComponent(under) ? 'closed' : 'navigated';
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
// mCurrentFocus=null: a window is still coming up (a cold launch's starting window, an activity
|
|
1117
|
+
// transition) and the component is the resumed-activity fallback. Give focus a moment to land
|
|
1118
|
+
// before dumping, so the capture shows the window rather than the gap before it.
|
|
1119
|
+
if (currentFocus(focus) === null) {
|
|
1120
|
+
const until = time.monotonic() + Math.max(0.0, toFloat(get(this.config, 'focus_settle_seconds', 2)));
|
|
1121
|
+
while (currentFocus(focus) === null && time.monotonic() < until) {
|
|
1122
|
+
time.sleep(0.25);
|
|
1123
|
+
[component, focus] = this._foreground();
|
|
1073
1124
|
}
|
|
1074
1125
|
}
|
|
1126
|
+
const unfocused = currentFocus(focus) === null;
|
|
1075
1127
|
const slash = component.indexOf('/');
|
|
1076
1128
|
const pkg = component.slice(0, slash);
|
|
1077
1129
|
let activity = component.slice(slash + 1);
|
|
@@ -1091,8 +1143,10 @@ export class DeviceAdapter {
|
|
|
1091
1143
|
const png = this._screenshot();
|
|
1092
1144
|
if (!(png.length >= 8 && png.subarray(0, 8).equals(PNG_MAGIC))) { throw new AdapterError('Device returned an invalid PNG'); }
|
|
1093
1145
|
fs.writeFileSync(screenshot, png);
|
|
1094
|
-
const [finalComponent] = this._foreground();
|
|
1095
|
-
|
|
1146
|
+
const [finalComponent, finalFocus] = this._foreground();
|
|
1147
|
+
// Spelling aside (canonicalComponent), focus landing or leaving mid-capture is a change too: the
|
|
1148
|
+
// dump may show the window before the switch and the screenshot the one after it.
|
|
1149
|
+
if (canonicalComponent(component) !== canonicalComponent(finalComponent) || unfocused !== (currentFocus(finalFocus) === null)) { throw new AdapterError('Foreground changed during capture; retry observation'); }
|
|
1096
1150
|
writeText(pJoin(capture, 'window.txt'), focus);
|
|
1097
1151
|
const shown = or(treePackage(nodes), pkg);
|
|
1098
1152
|
const result = { observation_id: pName(capture), package: shown, activity,
|
|
@@ -1168,6 +1222,57 @@ export class DeviceAdapter {
|
|
|
1168
1222
|
const x = toInt(mget(action, 'x')); const y = toInt(mget(action, 'y'));
|
|
1169
1223
|
if (kind === 'long_click_point') { this._shell('input', 'swipe', x, y, x, y, toInt(get(action, 'duration_ms', 700))); }
|
|
1170
1224
|
else { this._shell('input', 'tap', x, y); }
|
|
1225
|
+
} else if (kind === 'route' || kind === 'route_launch') {
|
|
1226
|
+
// uni-app / hybrid: every page is a route inside one WebView host, so there is no per-page
|
|
1227
|
+
// Activity to start. Jump through the page WebView's DevTools socket (uni.reLaunch /
|
|
1228
|
+
// switchTab / navigateTo); the next capture still verifies the page by its route token.
|
|
1229
|
+
if (get(this.config, 'hybrid_route_capture', true) === false) {
|
|
1230
|
+
throw new AdapterError('hybrid-route-capture disabled (config.hybrid_route_capture=false)');
|
|
1231
|
+
}
|
|
1232
|
+
const url = get(action, 'url') ?? get(action, 'route');
|
|
1233
|
+
if (!truthy(url)) { throw new AdapterError('route action needs a url'); }
|
|
1234
|
+
const helper = fileURLToPath(new URL('../hybrid_route_cdp.mjs', import.meta.url));
|
|
1235
|
+
// The helper's own deadline is --timeout-ms (it keeps a reserve inside it to remove its adb
|
|
1236
|
+
// forward); the kill below comes 5 s later, so a helper is killed only when it is wedged.
|
|
1237
|
+
const helperMs = Math.max(5000, toInt(get(this.config, 'route_jump_timeout_ms', 25000)));
|
|
1238
|
+
const fwdFile = pJoin(os.tmpdir(), `utg-route-fwd-${process.pid}-${uuid4Hex().slice(0, 8)}.json`);
|
|
1239
|
+
let r;
|
|
1240
|
+
try {
|
|
1241
|
+
r = subprocessRun([process.execPath, helper,
|
|
1242
|
+
'--serial', this.serial,
|
|
1243
|
+
'--adb', pyStr(this.adb[0]),
|
|
1244
|
+
'--package', pyStr(get(this.config, 'package', '')),
|
|
1245
|
+
'--url', pyStr(url),
|
|
1246
|
+
'--wait-ms', String(Math.max(0, toInt(get(this.config, 'route_jump_wait_ms', 8000)))),
|
|
1247
|
+
'--timeout-ms', String(helperMs),
|
|
1248
|
+
'--forward-file', fwdFile],
|
|
1249
|
+
{ timeout: helperMs / 1000 + 5 });
|
|
1250
|
+
} catch (e) {
|
|
1251
|
+
if (!(e instanceof TimeoutExpired)) { throw e; }
|
|
1252
|
+
r = null;
|
|
1253
|
+
} finally {
|
|
1254
|
+
// A killed helper could not remove its forward: it left the port in --forward-file.
|
|
1255
|
+
let left = null;
|
|
1256
|
+
try { left = jsonLoads(readText(fwdFile, { encoding: 'utf-8' })); } catch { left = null; }
|
|
1257
|
+
const port = toInt(get(left || {}, 'port', 0));
|
|
1258
|
+
if (port > 0) {
|
|
1259
|
+
try { spawnSync(this.adb[0], [...this.adb.slice(1), 'forward', '--remove', `tcp:${port}`], { timeout: 5000, windowsHide: true }); } catch { /* best effort */ }
|
|
1260
|
+
}
|
|
1261
|
+
try { fs.rmSync(fwdFile, { force: true }); } catch { /* ignore */ }
|
|
1262
|
+
// The helper adds/drops its own entry in $UTG_FORWARDS_FILE; rewrite it from this process's list.
|
|
1263
|
+
recordForwards();
|
|
1264
|
+
}
|
|
1265
|
+
if (r === null) {
|
|
1266
|
+
throw new AdapterError(`hybrid-route[cdp-transient]: helper killed after ${helperMs / 1000 + 5} s`);
|
|
1267
|
+
}
|
|
1268
|
+
const line = decodeReplace(r.stdout).trim().split(/\r?\n/).filter(Boolean).pop() || '';
|
|
1269
|
+
let res = {};
|
|
1270
|
+
try { res = JSON.parse(line); } catch { res = {}; }
|
|
1271
|
+
if (r.returncode !== 0 || !truthy(get(res, 'ok'))) {
|
|
1272
|
+
// `hybrid-route[<code>]: <error>`: Runner.runRoute reads the code (hybrid_route_cdp.mjs header).
|
|
1273
|
+
const code = pyStr(get(res, 'code') || 'cdp-transient');
|
|
1274
|
+
throw new AdapterError(`hybrid-route[${code}]: ` + (get(res, 'error') || line || failureText(r.stderr, r.stdout)));
|
|
1275
|
+
}
|
|
1171
1276
|
} else if (kind === 'snapshot_app_data') {
|
|
1172
1277
|
const pkg = get(this.config, 'package');
|
|
1173
1278
|
const snapDir = this._snapDir();
|
|
@@ -1223,6 +1328,19 @@ export class DeviceAdapter {
|
|
|
1223
1328
|
if (proc.returncode) { throw new AdapterError('restore_app_data failed: ' + strTail(decodeReplace(proc.stderr), 600)); }
|
|
1224
1329
|
} else if (kind === 'back') {
|
|
1225
1330
|
this._shell('input', 'keyevent', 'KEYCODE_BACK');
|
|
1331
|
+
} else if (kind === 'hide_ime') {
|
|
1332
|
+
// Back closes only the soft keyboard when one is shown; with none shown nothing is pressed
|
|
1333
|
+
// (a Back then would leave the page). "Shown" must be the window's keyboard, not a stale
|
|
1334
|
+
// input-method flag: measured (coolmall 2026-11-16), `mInputShown=true` stayed set on an
|
|
1335
|
+
// order list with no text field, and the Back left the page for the one before it.
|
|
1336
|
+
const focusedEdit = (get(before, 'nodes', []) || []).some((n) => truthy(get(n, 'focused'))
|
|
1337
|
+
&& /EditText|TextField|AutoComplete/.test(pyStr(get(n, 'class', ''))));
|
|
1338
|
+
const anyEdit = (get(before, 'nodes', []) || []).some((n) => /EditText|TextField|AutoComplete/.test(pyStr(get(n, 'class', ''))));
|
|
1339
|
+
if (this._imeShown() && (focusedEdit || anyEdit)) {
|
|
1340
|
+
this._shell('input', 'keyevent', 'KEYCODE_BACK');
|
|
1341
|
+
const step = Math.max(0.05, toFloat(get(this.config, 'settle_seconds', 0.3)));
|
|
1342
|
+
for (let t = 0; t < Math.max(step, toFloat(get(this.config, 'ime_wait_seconds', 2))) && this._imeShown(); t += step) { time.sleep(step); }
|
|
1343
|
+
}
|
|
1226
1344
|
} else if (kind === 'key') {
|
|
1227
1345
|
const key = pyStr(get(action, 'key', '')).toUpperCase();
|
|
1228
1346
|
if (!['ENTER', 'SEARCH', 'TAB', 'DEL'].includes(key)) { throw new AdapterError('Key not allowed: ' + key); }
|