@buaa_smat/hometrans 0.1.16 → 0.1.19
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 +162 -54
- package/agents/code-reviewer.md +321 -65
- package/agents/logic-coder.md +113 -88
- package/agents/logic-context-builder.md +47 -29
- package/agents/scripts/hmos-precheck/backends/arkts.mjs +567 -0
- package/agents/scripts/hmos-precheck/backends/arkts_diff.mjs +159 -0
- package/agents/scripts/hmos-precheck/backends/arkts_project_rules.mjs +398 -0
- package/agents/scripts/hmos-precheck/backends/codelinter.mjs +250 -0
- package/agents/scripts/hmos-precheck/backends/project_integrity.mjs +321 -0
- package/agents/scripts/hmos-precheck/backends/static_precheck.mjs +247 -0
- package/agents/scripts/hmos-precheck/core/config.mjs +184 -0
- package/agents/scripts/hmos-precheck/core/diagnostic_scope.mjs +20 -0
- package/agents/scripts/hmos-precheck/core/process_adapter.mjs +47 -0
- package/agents/scripts/hmos-precheck/core/project_catalog.mjs +50 -0
- package/agents/scripts/hmos-precheck/core/result_projection.mjs +147 -0
- package/agents/scripts/hmos-precheck/core/scope_plan.mjs +131 -0
- package/agents/scripts/hmos-precheck/core/sdk_context.mjs +67 -0
- package/agents/scripts/hmos-precheck/docs/architecture.md +37 -0
- package/agents/scripts/hmos-precheck/docs/performance-optimization.md +28 -0
- package/agents/scripts/hmos-precheck/docs/upstream-reference.json +19 -0
- package/agents/scripts/hmos-precheck/docs/validation.md +50 -0
- package/agents/scripts/hmos-precheck/index.mjs +17 -0
- package/agents/scripts/hmos-precheck/invocation.mjs +231 -0
- package/agents/scripts/hmos-precheck/rules/rule_case_matrix.csv +32 -0
- package/agents/scripts/hmos-precheck/rules/rule_inventory.csv +64 -0
- package/agents/scripts/hmos-precheck/rules/rule_inventory.mjs +59 -0
- package/agents/scripts/hmos-precheck/rules/rule_policy.mjs +54 -0
- package/agents/scripts/platform_query.mjs +626 -0
- package/agents/scripts/platform_query.test.mjs +422 -0
- package/agents/self-test-fixer.md +36 -34
- package/agents/self-tester.md +123 -143
- package/agents/test-case-generation-generator.md +317 -0
- package/agents/test-case-generation-validator.md +231 -0
- package/dist/cli/config-store.js +16 -63
- package/dist/cli/env-vars.js +1 -3
- package/dist/cli/index.js +0 -11
- package/dist/cli/init.js +127 -144
- package/dist/cli/uninstall.js +76 -110
- package/dist/utils/regex.js +8 -0
- package/env-requirements.json +55 -54
- package/package.json +6 -6
- package/resource/convert_pipeline_process.svg +103 -0
- package/resource/project_architecture.svg +122 -0
- package/resource/title_dark.png +0 -0
- package/skills/hmos-batch-ui-align/SKILL.md +345 -41
- package/skills/hmos-batch-ui-align/references/conversion-procedure.md +661 -180
- package/skills/hmos-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +2533 -2533
- package/skills/hmos-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +555 -555
- package/skills/hmos-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +117 -117
- package/skills/hmos-batch-ui-align/references/mvvm/@Link/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/217/214/345/220/221/345/220/214/346/255/245.md +648 -648
- package/skills/hmos-batch-ui-align/references/mvvm/@Observed/350/243/205/351/245/260/345/231/250/345/222/214@ObjectLink/350/243/205/351/245/260/345/231/250/357/274/232/345/265/214/345/245/227/347/261/273/345/257/271/350/261/241/345/261/236/346/200/247/345/217/230/345/214/226.md +2088 -2088
- package/skills/hmos-batch-ui-align/references/mvvm/@Prop/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/215/225/345/220/221/345/220/214/346/255/245.md +1033 -1033
- package/skills/hmos-batch-ui-align/references/mvvm/@Provide/350/243/205/351/245/260/345/231/250/345/222/214@Consume/350/243/205/351/245/260/345/231/250/357/274/232/344/270/216/345/220/216/344/273/243/347/273/204/344/273/266/345/217/214/345/220/221/345/220/214/346/255/245.md +1183 -1183
- package/skills/hmos-batch-ui-align/references/mvvm/@State/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/347/212/266/346/200/201.md +576 -576
- package/skills/hmos-batch-ui-align/references/mvvm/@Track/350/243/205/351/245/260/345/231/250/357/274/232class/345/257/271/350/261/241/345/261/236/346/200/247/347/272/247/346/233/264/346/226/260.md +297 -297
- package/skills/hmos-batch-ui-align/references/mvvm/@Watch/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/346/233/264/346/224/271/351/200/232/347/237/245.md +395 -395
- package/skills/hmos-batch-ui-align/references/mvvm/AppStorage/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200/347/232/204UI/347/212/266/346/200/201/345/255/230/345/202/250.md +902 -902
- package/skills/hmos-batch-ui-align/references/mvvm/Environment/357/274/232/350/256/276/345/244/207/347/216/257/345/242/203/346/237/245/350/257/242.md +106 -106
- package/skills/hmos-batch-ui-align/references/mvvm/LocalStorage/357/274/232/351/241/265/351/235/242/347/272/247UI/347/212/266/346/200/201/345/255/230/345/202/250.md +1178 -1178
- package/skills/hmos-batch-ui-align/references/mvvm/MVVM/346/250/241/345/274/217/357/274/210V1/357/274/211.md +911 -911
- package/skills/hmos-batch-ui-align/references/mvvm/PersistentStorage/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md +354 -354
- package/skills/hmos-batch-ui-align/references/mvvm//347/256/241/347/220/206/345/272/224/347/224/250/346/213/245/346/234/211/347/232/204/347/212/266/346/200/201/346/246/202/350/277/260.md +11 -11
- package/skills/hmos-batch-ui-align/references/mvvm-v2/!!/350/257/255/346/263/225/357/274/232/345/217/214/345/220/221/347/273/221/345/256/232.md +206 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/@Computed/350/243/205/351/245/260/345/231/250/357/274/232/350/256/241/347/256/227/345/261/236/346/200/247.md +373 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/@Event/350/243/205/351/245/260/345/231/250/357/274/232/350/247/204/350/214/203/347/273/204/344/273/266/350/276/223/345/207/272.md +158 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/@Local/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/351/203/250/347/212/266/346/200/201.md +750 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/@Monitor/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/344/277/256/346/224/271/345/274/202/346/255/245/347/233/221/345/220/254.md +1704 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/@ObservedV2/350/243/205/351/245/260/345/231/250/345/222/214@Trace/350/243/205/351/245/260/345/231/250/357/274/232/347/261/273/345/261/236/346/200/247/345/217/230/345/214/226/350/247/202/346/265/213.md +1012 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/@Once/350/243/205/351/245/260/345/231/250/357/274/232/345/210/235/345/247/213/345/214/226/345/220/214/346/255/245/344/270/200/346/254/241.md +164 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/@Param/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/244/226/351/203/250/350/276/223/345/205/245.md +840 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/@Provider/350/243/205/351/245/260/345/231/250/345/222/214@Consumer/350/243/205/351/245/260/345/231/250/357/274/232/350/267/250/347/273/204/344/273/266/345/261/202/347/272/247/345/217/214/345/220/221/345/220/214/346/255/245.md +856 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/@Type/350/243/205/351/245/260/345/231/250/357/274/232/346/240/207/350/256/260/347/261/273/345/261/236/346/200/247/347/232/204/347/261/273/345/236/213.md +83 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/AppStorageV2/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200UI/347/212/266/346/200/201/345/255/230/345/202/250.md +294 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/MVVM/346/250/241/345/274/217/357/274/210V2/357/274/211.md +1407 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/PersistenceV2/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md +1220 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/_/350/214/203/345/274/217/351/200/211/346/213/251/350/257/264/346/230/216.md +47 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/_/350/243/205/351/245/260/345/231/250/351/200/237/346/237/245.md +133 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2//347/212/266/346/200/201/347/256/241/347/220/206V1/345/220/221V2/350/277/201/347/247/273/344/270/216/346/267/267/347/224/250/346/214/207/345/257/274.md +840 -0
- package/skills/hmos-batch-ui-align/scripts/android_parse_fast.ts +1798 -0
- package/skills/hmos-batch-ui-align/scripts/arkts_static_check.ts +1592 -0
- package/skills/hmos-batch-ui-align/scripts/measure_pack.ts +752 -0
- package/skills/hmos-convert-pipeline/SKILL.md +168 -121
- package/skills/hmos-fix-build-errors/SKILL.md +87 -67
- package/skills/hmos-fix-build-errors/references/arkts-strict-patterns.md +219 -219
- package/skills/hmos-fix-build-errors/references/known-patterns.md +157 -157
- package/skills/hmos-fix-build-errors/references/rdb-entity-pattern.md +131 -131
- package/skills/hmos-incremental-ui-align/README.md +53 -36
- package/skills/hmos-incremental-ui-align/SKILL.md +179 -23
- package/skills/hmos-incremental-ui-align/diff_analysis.md +52 -52
- package/skills/hmos-incremental-ui-align/page_align.md +62 -62
- package/skills/hmos-incremental-ui-align/references/Comparison_Template.md +38 -2
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Link/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/217/214/345/220/221/345/220/214/346/255/245.md +648 -648
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Observed/350/243/205/351/245/260/345/231/250/345/222/214@ObjectLink/350/243/205/351/245/260/345/231/250/357/274/232/345/265/214/345/245/227/347/261/273/345/257/271/350/261/241/345/261/236/346/200/247/345/217/230/345/214/226.md +2088 -2088
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Prop/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/215/225/345/220/221/345/220/214/346/255/245.md +1033 -1033
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Provide/350/243/205/351/245/260/345/231/250/345/222/214@Consume/350/243/205/351/245/260/345/231/250/357/274/232/344/270/216/345/220/216/344/273/243/347/273/204/344/273/266/345/217/214/345/220/221/345/220/214/346/255/245.md +1183 -1183
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@State/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/347/212/266/346/200/201.md +576 -576
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Track/350/243/205/351/245/260/345/231/250/357/274/232class/345/257/271/350/261/241/345/261/236/346/200/247/347/272/247/346/233/264/346/226/260.md +297 -297
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Watch/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/346/233/264/346/224/271/351/200/232/347/237/245.md +395 -395
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/AppStorage/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200/347/232/204UI/347/212/266/346/200/201/345/255/230/345/202/250.md +902 -902
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/Environment/357/274/232/350/256/276/345/244/207/347/216/257/345/242/203/346/237/245/350/257/242.md +106 -106
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/LocalStorage/357/274/232/351/241/265/351/235/242/347/272/247UI/347/212/266/346/200/201/345/255/230/345/202/250.md +1178 -1178
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/MVVM/346/250/241/345/274/217V1.md +911 -911
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/PersistentStorage/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md +354 -354
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243//347/256/241/347/220/206/345/272/224/347/224/250/346/213/245/346/234/211/347/232/204/347/212/266/346/200/201/346/246/202/350/277/260.md +11 -11
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/!!/350/257/255/346/263/225/357/274/232/345/217/214/345/220/221/347/273/221/345/256/232.md +206 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Computed/350/243/205/351/245/260/345/231/250/357/274/232/350/256/241/347/256/227/345/261/236/346/200/247.md +373 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Event/350/243/205/351/245/260/345/231/250/357/274/232/350/247/204/350/214/203/347/273/204/344/273/266/350/276/223/345/207/272.md +158 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Local/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/351/203/250/347/212/266/346/200/201.md +750 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Monitor/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/344/277/256/346/224/271/345/274/202/346/255/245/347/233/221/345/220/254.md +1704 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@ObservedV2/350/243/205/351/245/260/345/231/250/345/222/214@Trace/350/243/205/351/245/260/345/231/250/357/274/232/347/261/273/345/261/236/346/200/247/345/217/230/345/214/226/350/247/202/346/265/213.md +1012 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Once/350/243/205/351/245/260/345/231/250/357/274/232/345/210/235/345/247/213/345/214/226/345/220/214/346/255/245/344/270/200/346/254/241.md +164 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Param/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/244/226/351/203/250/350/276/223/345/205/245.md +840 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Provider/350/243/205/351/245/260/345/231/250/345/222/214@Consumer/350/243/205/351/245/260/345/231/250/357/274/232/350/267/250/347/273/204/344/273/266/345/261/202/347/272/247/345/217/214/345/220/221/345/220/214/346/255/245.md +856 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Type/350/243/205/351/245/260/345/231/250/357/274/232/346/240/207/350/256/260/347/261/273/345/261/236/346/200/247/347/232/204/347/261/273/345/236/213.md +83 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/AppStorageV2/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200UI/347/212/266/346/200/201/345/255/230/345/202/250.md +294 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/MVVM/346/250/241/345/274/217/357/274/210V2/357/274/211.md +1407 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/PersistenceV2/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md +1220 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/_/350/214/203/345/274/217/351/200/211/346/213/251/350/257/264/346/230/216.md +47 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2//347/212/266/346/200/201/347/256/241/347/220/206V1/345/220/221V2/350/277/201/347/247/273/344/270/216/346/267/267/347/224/250/346/214/207/345/257/274.md +840 -0
- package/skills/hmos-incremental-ui-align/references/State_Model_Template.md +74 -0
- package/skills/hmos-incremental-ui-align/references/UI_Analysis_Template.md +34 -4
- package/skills/hmos-incremental-ui-align/references/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +2533 -2533
- package/skills/hmos-incremental-ui-align/references/android-to-harmonyOS-ui-interaction-mapping-reference.md +555 -555
- package/skills/hmos-incremental-ui-align/references/android-to-harmonyOS-ui-layout-mapping-reference.md +117 -117
- package/skills/hmos-incremental-ui-align/scripts/app_feature_verify.ts +937 -0
- package/skills/hmos-incremental-ui-align/scripts/extract_checklist.ts +343 -0
- package/skills/hmos-incremental-ui-align/scripts/navigation-capure.md +44 -5
- package/skills/hmos-incremental-ui-align/scripts/page_capture.ts +977 -0
- package/skills/hmos-incremental-ui-align/scripts/page_capture_burst.ts +188 -0
- package/skills/hmos-integration-test/README.md +61 -70
- package/skills/hmos-integration-test/SKILL.md +128 -111
- package/skills/hmos-resources-convert/SKILL.md +334 -66
- package/skills/hmos-resources-convert/references/code-vector-icon-rules.md +335 -0
- package/skills/hmos-resources-convert/references/conversion-rules.md +676 -663
- package/skills/hmos-resources-convert/references/dependency-analysis-rules.md +410 -388
- package/skills/hmos-resources-convert/references/lottie-conversion-rules.md +219 -0
- package/skills/hmos-resources-convert/references/resource-mapping-rules.md +482 -457
- package/skills/hmos-resources-convert/references/xml-drawable-to-svg-rules.md +592 -513
- package/skills/hmos-resources-convert/scripts/a2h_resource_convert.ts +2163 -0
- package/skills/hmos-resources-convert/scripts/code_vector_icons.ts +591 -0
- package/skills/hmos-resources-convert/scripts/svg_fidelity_check.ts +632 -0
- package/skills/hmos-spec-generate/SKILL.md +293 -214
- package/skills/hmos-spec-generate/scripts/parse_requirements.ts +515 -0
- package/skills/hmos-spec-generate/template/REQ.txt +22 -0
- package/skills/hmos-spec-generate/template/REQ.xlsx +0 -0
- package/skills/hmos-test-case-generation/README.md +241 -0
- package/skills/hmos-test-case-generation/SKILL.md +324 -0
- package/skills/hmos-test-case-generation/references/contract.md +315 -0
- package/skills/hmos-test-case-generation/references/review-notes-template.md +84 -0
- package/skills/hmos-test-case-generation/references/ui-elements-schema.md +142 -0
- package/skills/hmos-test-case-generation/tools/convert_to_ui_elements.ts +550 -0
- package/skills/hmos-test-case-generation/tools/validate.ts +1312 -0
- package/tools/bfs-crawl/README.md +73 -0
- package/tools/bfs-crawl/android_viewtree_bfs_crawler.ts +1662 -0
- package/tools/test-tools/autotest/config.ts +175 -0
- package/tools/test-tools/autotest/deps/autotest-agent-0.1.1.tgz +0 -0
- package/tools/test-tools/autotest/docs/README.md +266 -0
- package/tools/test-tools/autotest/{testcases_schema.md → docs/testcases_schema.md} +1 -1
- package/tools/test-tools/autotest/engine/batch-launcher.ts +327 -0
- package/tools/test-tools/autotest/engine/report-tool.ts +773 -0
- package/tools/test-tools/autotest/engine/self-test-runner.ts +961 -0
- package/tools/test-tools/autotest/engine/testcases-tool.ts +246 -0
- package/tools/test-tools/autotest/paths.ts +41 -0
- package/tools/test-tools/autotest/resolve-metadata-tool.ts +143 -0
- package/tools/test-tools/autotest/runner/logger.ts +45 -0
- package/tools/test-tools/autotest/runner/process-utils.ts +41 -0
- package/tools/test-tools/autotest/validate.ts +167 -0
- package/agents/build-fixer.md +0 -385
- package/agents/logic-coder/scripts/platform_context_query.py +0 -568
- package/agents/review-fixer.md +0 -405
- package/agents/spec-generator.md +0 -541
- package/dist/cli/mcp-setup.js +0 -258
- package/dist/cli/mcp.js +0 -94
- package/dist/context/index.js +0 -694
- package/resource/migration_process.svg +0 -94
- package/resource/migration_process_transparent.svg +0 -93
- package/skills/hmos-batch-ui-align/scripts/android_parse_fast.py +0 -1606
- package/skills/hmos-incremental-ui-align/scripts/__pycache__/app_feature_verify.cpython-314.pyc +0 -0
- package/skills/hmos-incremental-ui-align/scripts/app_feature_verify.py +0 -542
- package/skills/hmos-incremental-ui-align/scripts/page_capture.py +0 -597
- package/skills/hmos-resources-convert/evals/evals.json +0 -171
- package/skills/hmos-resources-convert/template/AppScope/app.json5 +0 -10
- package/skills/hmos-resources-convert/template/AppScope/resources/base/element/string.json +0 -8
- package/skills/hmos-resources-convert/template/AppScope/resources/base/media/background.png +0 -0
- package/skills/hmos-resources-convert/template/AppScope/resources/base/media/foreground.png +0 -0
- package/skills/hmos-resources-convert/template/AppScope/resources/base/media/layered_image.json +0 -7
- package/skills/hmos-resources-convert/template/build-profile.json5 +0 -42
- package/skills/hmos-resources-convert/template/code-linter.json5 +0 -32
- package/skills/hmos-resources-convert/template/entry/build-profile.json5 +0 -33
- package/skills/hmos-resources-convert/template/entry/hvigorfile.ts +0 -6
- package/skills/hmos-resources-convert/template/entry/obfuscation-rules.txt +0 -23
- package/skills/hmos-resources-convert/template/entry/oh-package.json5 +0 -10
- package/skills/hmos-resources-convert/template/entry/src/main/ets/entryability/EntryAbility.ets +0 -48
- package/skills/hmos-resources-convert/template/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets +0 -16
- package/skills/hmos-resources-convert/template/entry/src/main/ets/pages/Index.ets +0 -23
- package/skills/hmos-resources-convert/template/entry/src/main/module.json5 +0 -55
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/element/color.json +0 -8
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/element/float.json +0 -8
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/element/string.json +0 -16
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/media/background.png +0 -0
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/media/foreground.png +0 -0
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/media/layered_image.json +0 -7
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/media/startIcon.png +0 -0
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/profile/backup_config.json +0 -3
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/profile/main_pages.json +0 -5
- package/skills/hmos-resources-convert/template/entry/src/main/resources/dark/element/color.json +0 -8
- package/skills/hmos-resources-convert/template/entry/src/mock/mock-config.json5 +0 -2
- package/skills/hmos-resources-convert/template/entry/src/ohosTest/ets/test/Ability.test.ets +0 -35
- package/skills/hmos-resources-convert/template/entry/src/ohosTest/ets/test/List.test.ets +0 -5
- package/skills/hmos-resources-convert/template/entry/src/ohosTest/module.json5 +0 -16
- package/skills/hmos-resources-convert/template/entry/src/test/List.test.ets +0 -5
- package/skills/hmos-resources-convert/template/entry/src/test/LocalUnit.test.ets +0 -33
- package/skills/hmos-resources-convert/template/hvigor/hvigor-config.json5 +0 -23
- package/skills/hmos-resources-convert/template/hvigorfile.ts +0 -6
- package/skills/hmos-resources-convert/template/oh-package-lock.json5 +0 -28
- package/skills/hmos-resources-convert/template/oh-package.json5 +0 -10
- package/skills/hmos-resources-convert/tools/apktool.bat +0 -85
- package/skills/hmos-resources-convert/tools/apktool_3.0.1.jar +0 -0
- package/skills/hmos-spec-generate/references/android-platform-tokens.md +0 -105
- package/skills/hmos-spec-generate/references/spec-sample-1.md +0 -78
- package/skills/hmos-spec-generate/references/spec-sample-2.md +0 -58
- package/skills/hmos-spec-generate/references/spec-sample-3.md +0 -116
- package/skills/hmos-spec-generate/references/step4-report-template.md +0 -33
- package/tools/test-tools/autotest/README.md +0 -238
- package/tools/test-tools/autotest/pyproject.toml +0 -26
- package/tools/test-tools/autotest/report_tool.py +0 -759
- package/tools/test-tools/autotest/self_test_runner.py +0 -895
- package/tools/test-tools/autotest/testcases_tool.py +0 -215
- package/tools/test-tools/autotest/uv.lock +0 -3156
- package/tools/test-tools/harmony_autotest-0.1.0-py3-none-any.whl +0 -0
- package/tools/test-tools/hypium-6.1.0.210-py3-none-any.whl +0 -0
- package/tools/test-tools/hypium_mcp-0.6.5-py3-none-any.whl +0 -0
- package/tools/test-tools/xdevice-6.1.0.210-py3-none-any.whl +0 -0
- package/tools/test-tools/xdevice_devicetest-6.1.0.210-py3-none-any.whl +0 -0
- package/tools/test-tools/xdevice_ohos-6.1.0.210-py3-none-any.whl +0 -0
package/dist/cli/uninstall.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `ht uninstall` — remove all skills
|
|
3
|
-
*
|
|
2
|
+
* `ht uninstall` — remove all skills and agents that `ht init` installed into
|
|
3
|
+
* the configured editors.
|
|
4
4
|
*
|
|
5
5
|
* Determines what to remove by matching bundled skill/agent names against
|
|
6
|
-
* each editor's target directories.
|
|
7
|
-
* config files (JSONC key removal or TOML section removal).
|
|
6
|
+
* each editor's target directories.
|
|
8
7
|
*
|
|
9
8
|
* Shows a plan and prompts for confirmation before proceeding.
|
|
10
9
|
*/
|
|
@@ -15,13 +14,18 @@ import { execFile } from 'node:child_process';
|
|
|
15
14
|
import { promisify } from 'node:util';
|
|
16
15
|
import chalk from 'chalk';
|
|
17
16
|
import inquirer from 'inquirer';
|
|
18
|
-
import { modify, applyEdits } from 'jsonc-parser';
|
|
19
17
|
import { expandHome, getConfigDir, loadHomeTransConfig, } from './config-store.js';
|
|
20
18
|
import { dirExists, isPromptAbort, prettyHome, MACHINE_ENV_KEYS } from './init.js';
|
|
21
19
|
import { removeEnvVars } from './env-vars.js';
|
|
22
20
|
const execFileAsync = promisify(execFile);
|
|
23
21
|
const __filename = fileURLToPath(import.meta.url);
|
|
24
22
|
const __dirname = path.dirname(__filename);
|
|
23
|
+
/**
|
|
24
|
+
* Global Node CLIs that `ht init` installs as a pair (`npm install -g homegraph
|
|
25
|
+
* arkanalyzer`). `ht uninstall` removes the same pair so the two commands stay
|
|
26
|
+
* symmetric.
|
|
27
|
+
*/
|
|
28
|
+
const NODE_DEPS = ['homegraph', 'arkanalyzer'];
|
|
25
29
|
/**
|
|
26
30
|
* Machine env var names that `ht init` may have set and that have a non-empty
|
|
27
31
|
* value in config.env: the SDK paths / tool dir plus the mirrored unified model
|
|
@@ -72,60 +76,55 @@ async function listBundledAgentEntries(agentsRoot) {
|
|
|
72
76
|
}
|
|
73
77
|
}
|
|
74
78
|
/* ------------------------------------------------------------------ */
|
|
75
|
-
/*
|
|
79
|
+
/* Global npm dependency removal */
|
|
76
80
|
/* ------------------------------------------------------------------ */
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
return { tabSize: 1, insertSpaces: false };
|
|
83
|
-
return { tabSize: firstIndented[1].length, insertSpaces: true };
|
|
84
|
-
}
|
|
85
|
-
async function tryRemoveJsoncKey(filePath, keyPath) {
|
|
86
|
-
let raw;
|
|
81
|
+
/**
|
|
82
|
+
* Is `npm` runnable? On Windows the global npm bin is a `.cmd` shim, so the
|
|
83
|
+
* command must run through the shell there (same as init's homegraphVersion()).
|
|
84
|
+
*/
|
|
85
|
+
async function npmAvailable() {
|
|
87
86
|
try {
|
|
88
|
-
|
|
87
|
+
await execFileAsync('npm', ['--version'], {
|
|
88
|
+
timeout: 15000,
|
|
89
|
+
shell: process.platform === 'win32',
|
|
90
|
+
});
|
|
91
|
+
return true;
|
|
89
92
|
}
|
|
90
93
|
catch {
|
|
91
|
-
return
|
|
94
|
+
return false;
|
|
92
95
|
}
|
|
93
|
-
const formattingOptions = detectIndentation(raw);
|
|
94
|
-
const edits = modify(raw, keyPath, undefined, { formattingOptions });
|
|
95
|
-
if (edits.length === 0)
|
|
96
|
-
return null;
|
|
97
|
-
return { oldContent: raw, newContent: applyEdits(raw, edits) };
|
|
98
96
|
}
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
/**
|
|
98
|
+
* Does `homegraph --version` return normally (exit 0)? Used as the presence
|
|
99
|
+
* probe for the homegraph/arkanalyzer pair — the symmetric counterpart to
|
|
100
|
+
* init's idempotency check, which skips the install when homegraph is already
|
|
101
|
+
* present.
|
|
102
|
+
*/
|
|
103
|
+
async function homegraphInstalled() {
|
|
101
104
|
try {
|
|
102
|
-
|
|
105
|
+
await execFileAsync('homegraph', ['--version'], {
|
|
106
|
+
timeout: 15000,
|
|
107
|
+
shell: process.platform === 'win32',
|
|
108
|
+
});
|
|
109
|
+
return true;
|
|
103
110
|
}
|
|
104
111
|
catch {
|
|
105
|
-
return
|
|
106
|
-
}
|
|
107
|
-
const sectionTag = `[${sectionHeader}]`;
|
|
108
|
-
if (!raw.includes(sectionTag))
|
|
109
|
-
return null;
|
|
110
|
-
const lines = raw.split('\n');
|
|
111
|
-
const result = [];
|
|
112
|
-
let inSection = false;
|
|
113
|
-
for (const line of lines) {
|
|
114
|
-
if (line.trim() === sectionTag) {
|
|
115
|
-
inSection = true;
|
|
116
|
-
continue;
|
|
117
|
-
}
|
|
118
|
-
if (inSection && line.trim().startsWith('[')) {
|
|
119
|
-
inSection = false;
|
|
120
|
-
}
|
|
121
|
-
if (!inSection) {
|
|
122
|
-
result.push(line);
|
|
123
|
-
}
|
|
112
|
+
return false;
|
|
124
113
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Decide which global npm packages to remove. Returns the homegraph/arkanalyzer
|
|
117
|
+
* pair when homegraph is detected on the machine (mirroring init, which installs
|
|
118
|
+
* them together), or an empty list when npm is unavailable or homegraph is not
|
|
119
|
+
* present — so a machine that never ran `ht init`'s dependency install shows
|
|
120
|
+
* nothing to remove here.
|
|
121
|
+
*/
|
|
122
|
+
async function detectNodeDepsToRemove() {
|
|
123
|
+
if (!(await npmAvailable()))
|
|
124
|
+
return [];
|
|
125
|
+
if (!(await homegraphInstalled()))
|
|
126
|
+
return [];
|
|
127
|
+
return [...NODE_DEPS];
|
|
129
128
|
}
|
|
130
129
|
/* ------------------------------------------------------------------ */
|
|
131
130
|
/* Plan building */
|
|
@@ -167,61 +166,6 @@ async function buildPlanForEditor(editor, skillNames, agentEntries, plan) {
|
|
|
167
166
|
});
|
|
168
167
|
}
|
|
169
168
|
}
|
|
170
|
-
const { mcp } = editor;
|
|
171
|
-
switch (mcp.format) {
|
|
172
|
-
case 'jsonc-object':
|
|
173
|
-
case 'jsonc-command-array': {
|
|
174
|
-
if (!mcp.path || !mcp.keyPath)
|
|
175
|
-
break;
|
|
176
|
-
const configPath = expandHome(mcp.path);
|
|
177
|
-
const change = await tryRemoveJsoncKey(configPath, mcp.keyPath);
|
|
178
|
-
if (change !== null) {
|
|
179
|
-
plan.modifications.push({
|
|
180
|
-
display: `${editor.name}: ${prettyHome(configPath)}`,
|
|
181
|
-
absPath: configPath,
|
|
182
|
-
reason: 'Remove hometrans MCP entry',
|
|
183
|
-
oldContent: change.oldContent,
|
|
184
|
-
newContent: change.newContent,
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
break;
|
|
188
|
-
}
|
|
189
|
-
case 'codex-cli': {
|
|
190
|
-
plan.codexRemove = true;
|
|
191
|
-
if (mcp.path && mcp.section) {
|
|
192
|
-
const configPath = expandHome(mcp.path);
|
|
193
|
-
const change = await tryRemoveTomlSection(configPath, mcp.section);
|
|
194
|
-
if (change !== null) {
|
|
195
|
-
plan.modifications.push({
|
|
196
|
-
display: `${editor.name}: ${prettyHome(configPath)}`,
|
|
197
|
-
absPath: configPath,
|
|
198
|
-
reason: 'Remove hometrans MCP section',
|
|
199
|
-
oldContent: change.oldContent,
|
|
200
|
-
newContent: change.newContent,
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
break;
|
|
205
|
-
}
|
|
206
|
-
case 'toml-section': {
|
|
207
|
-
if (!mcp.path || !mcp.section)
|
|
208
|
-
break;
|
|
209
|
-
const configPath = expandHome(mcp.path);
|
|
210
|
-
const change = await tryRemoveTomlSection(configPath, mcp.section);
|
|
211
|
-
if (change !== null) {
|
|
212
|
-
plan.modifications.push({
|
|
213
|
-
display: `${editor.name}: ${prettyHome(configPath)}`,
|
|
214
|
-
absPath: configPath,
|
|
215
|
-
reason: 'Remove hometrans MCP section',
|
|
216
|
-
oldContent: change.oldContent,
|
|
217
|
-
newContent: change.newContent,
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
break;
|
|
221
|
-
}
|
|
222
|
-
case 'none':
|
|
223
|
-
break;
|
|
224
|
-
}
|
|
225
169
|
}
|
|
226
170
|
/** Line-based diff via an LCS table. Files here are small config files. */
|
|
227
171
|
function diffLines(oldLines, newLines) {
|
|
@@ -303,6 +247,7 @@ function renderDiff(oldContent, newContent, context = 3) {
|
|
|
303
247
|
function isPlanEmpty(plan) {
|
|
304
248
|
return (plan.deletions.length === 0 &&
|
|
305
249
|
plan.modifications.length === 0 &&
|
|
250
|
+
plan.npmDeps.length === 0 &&
|
|
306
251
|
plan.envVars.length === 0 &&
|
|
307
252
|
plan.configDir === null);
|
|
308
253
|
}
|
|
@@ -329,6 +274,14 @@ function renderPlan(plan) {
|
|
|
329
274
|
console.log('');
|
|
330
275
|
}
|
|
331
276
|
}
|
|
277
|
+
if (plan.npmDeps.length > 0) {
|
|
278
|
+
console.log(chalk.red.bold(` Global npm packages to remove (${plan.npmDeps.length}):`));
|
|
279
|
+
console.log(chalk.gray(` (will run: npm uninstall -g ${plan.npmDeps.join(' ')})`));
|
|
280
|
+
for (const dep of plan.npmDeps) {
|
|
281
|
+
console.log(` ${chalk.red('-')} ${dep}`);
|
|
282
|
+
}
|
|
283
|
+
console.log('');
|
|
284
|
+
}
|
|
332
285
|
if (plan.envVars.length > 0) {
|
|
333
286
|
console.log(chalk.red.bold(` Environment variables to remove (${plan.envVars.length}):`));
|
|
334
287
|
console.log(chalk.gray(process.platform === 'win32'
|
|
@@ -351,19 +304,26 @@ function renderPlan(plan) {
|
|
|
351
304
|
async function executePlan(plan) {
|
|
352
305
|
let deleted = 0;
|
|
353
306
|
let modified = 0;
|
|
307
|
+
let npmNote = null;
|
|
354
308
|
let envNote = null;
|
|
355
309
|
for (const mod of plan.modifications) {
|
|
356
310
|
await fs.writeFile(mod.absPath, mod.newContent, 'utf-8');
|
|
357
311
|
modified++;
|
|
358
312
|
}
|
|
359
|
-
|
|
313
|
+
// Remove the global npm CLIs installed by `ht init` (homegraph + arkanalyzer).
|
|
314
|
+
// Best-effort: a failure is reported in the note but never aborts the rest of
|
|
315
|
+
// the uninstall.
|
|
316
|
+
if (plan.npmDeps.length > 0) {
|
|
317
|
+
console.log(chalk.gray(` Running: npm uninstall -g ${plan.npmDeps.join(' ')} ...`));
|
|
360
318
|
try {
|
|
361
|
-
await execFileAsync('
|
|
319
|
+
await execFileAsync('npm', ['uninstall', '-g', ...plan.npmDeps], {
|
|
320
|
+
timeout: 5 * 60 * 1000,
|
|
362
321
|
shell: process.platform === 'win32',
|
|
363
322
|
});
|
|
323
|
+
npmNote = `removed ${plan.npmDeps.join(', ')}`;
|
|
364
324
|
}
|
|
365
|
-
catch {
|
|
366
|
-
|
|
325
|
+
catch (err) {
|
|
326
|
+
npmNote = `failed (${err.message}) — remove manually: npm uninstall -g ${plan.npmDeps.join(' ')}`;
|
|
367
327
|
}
|
|
368
328
|
}
|
|
369
329
|
for (const del of plan.deletions) {
|
|
@@ -388,7 +348,7 @@ async function executePlan(plan) {
|
|
|
388
348
|
// best-effort
|
|
389
349
|
}
|
|
390
350
|
}
|
|
391
|
-
return { deleted, modified, envNote };
|
|
351
|
+
return { deleted, modified, npmNote, envNote };
|
|
392
352
|
}
|
|
393
353
|
/* ------------------------------------------------------------------ */
|
|
394
354
|
/* Entry point */
|
|
@@ -407,13 +367,16 @@ export async function uninstallCommand() {
|
|
|
407
367
|
const plan = {
|
|
408
368
|
deletions: [],
|
|
409
369
|
modifications: [],
|
|
410
|
-
|
|
370
|
+
npmDeps: [],
|
|
411
371
|
envVars: [],
|
|
412
372
|
configDir: null,
|
|
413
373
|
};
|
|
414
374
|
for (const editor of editors) {
|
|
415
375
|
await buildPlanForEditor(editor, skillNames, agentEntries, plan);
|
|
416
376
|
}
|
|
377
|
+
// Global npm CLIs installed by `ht init` (homegraph + arkanalyzer) — detected
|
|
378
|
+
// the same way init decides whether to (re)install them.
|
|
379
|
+
plan.npmDeps = await detectNodeDepsToRemove();
|
|
417
380
|
// Env vars to remove come from config.json (`env` + the unified model
|
|
418
381
|
// fields); the ~/.hometrans dir (which holds config.json) is deleted last.
|
|
419
382
|
plan.envVars = plannedEnvVarNames(config);
|
|
@@ -451,6 +414,9 @@ export async function uninstallCommand() {
|
|
|
451
414
|
const summary = await executePlan(plan);
|
|
452
415
|
console.log('');
|
|
453
416
|
console.log(chalk.green(` Uninstalled: ${summary.deleted} entries deleted, ${summary.modified} files modified.`));
|
|
417
|
+
if (summary.npmNote) {
|
|
418
|
+
console.log(chalk.green(` Global npm packages: ${summary.npmNote}`));
|
|
419
|
+
}
|
|
454
420
|
if (summary.envNote) {
|
|
455
421
|
console.log(chalk.green(` Environment variables: ${summary.envNote}`));
|
|
456
422
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Small regex helpers shared across the CLI and the AutoTest tools.
|
|
3
|
+
* Dependency-free so the autotest tools stay zero-dep.
|
|
4
|
+
*/
|
|
5
|
+
/** Escape all regex metacharacters in `s` so it can be embedded in a `RegExp` literal. */
|
|
6
|
+
export function escapeRegExp(s) {
|
|
7
|
+
return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
8
|
+
}
|
package/env-requirements.json
CHANGED
|
@@ -47,131 +47,132 @@
|
|
|
47
47
|
"fallback": { "base": "DEVECO_SDK_HOME", "segments": ["default", "openharmony", "toolchains"], "exe": "hdc" },
|
|
48
48
|
"hint": "ships with DevEco: <sdk>/default/openharmony/toolchains"
|
|
49
49
|
},
|
|
50
|
-
"
|
|
50
|
+
"node": {
|
|
51
51
|
"source": "path",
|
|
52
|
-
"aliases": ["
|
|
52
|
+
"aliases": ["node"],
|
|
53
53
|
"verify": ["--version"],
|
|
54
|
-
"versionRegex": "(\\d+\\.\\d+(?:\\.\\d+)?)",
|
|
55
|
-
"hint": "
|
|
54
|
+
"versionRegex": "v?(\\d+\\.\\d+(?:\\.\\d+)?)",
|
|
55
|
+
"hint": "Node.js 22+ required for TypeScript scripts that run through native type stripping"
|
|
56
56
|
},
|
|
57
|
-
"
|
|
58
|
-
"source": "path",
|
|
59
|
-
"aliases": ["java"],
|
|
60
|
-
"verify": ["-version"],
|
|
61
|
-
"versionStream": "stderr",
|
|
62
|
-
"versionRegex": "(\\d+(?:\\.\\d+){1,2})",
|
|
63
|
-
"fallback": { "base": "DEVECO_HOME", "segments": ["jbr", "bin"], "exe": "java" },
|
|
64
|
-
"hint": "any JDK 17+, or reuse DevEco jbr: <deveco>/jbr/bin"
|
|
65
|
-
},
|
|
66
|
-
"homegraph": {
|
|
57
|
+
"git": {
|
|
67
58
|
"source": "path",
|
|
68
|
-
"aliases": ["
|
|
59
|
+
"aliases": ["git"],
|
|
69
60
|
"verify": ["--version"],
|
|
70
|
-
"versionRegex": "(\\d+\\.\\d+(?:\\.\\d+)?)",
|
|
71
|
-
"hint": "
|
|
61
|
+
"versionRegex": "git version (\\d+\\.\\d+(?:\\.\\d+)?)",
|
|
62
|
+
"hint": "Git is required for diff-based agent precheck runs"
|
|
72
63
|
}
|
|
73
64
|
},
|
|
74
65
|
|
|
75
66
|
"requirements": [
|
|
76
67
|
{
|
|
77
|
-
"name": "hmos-
|
|
68
|
+
"name": "hmos-resources-convert",
|
|
78
69
|
"kind": "skill",
|
|
79
|
-
"dependencies": [{ "tool": "
|
|
70
|
+
"dependencies": [{ "tool": "node", "level": "required" }],
|
|
71
|
+
"note": "decodes apk_path with a2h-resource (pure Node) via npx"
|
|
80
72
|
},
|
|
81
73
|
{
|
|
82
|
-
"name": "hmos-
|
|
74
|
+
"name": "hmos-batch-ui-align",
|
|
83
75
|
"kind": "skill",
|
|
84
|
-
"dependencies": [
|
|
85
|
-
|
|
76
|
+
"dependencies": [
|
|
77
|
+
{ "tool": "deveco", "level": "required" },
|
|
78
|
+
{ "tool": "adb", "level": "optional" }
|
|
79
|
+
],
|
|
80
|
+
"note": "Step 0 resolves DEVECO_HOME and Step 6 invokes hmos-fix-build-errors; adb only for page exploration"
|
|
86
81
|
},
|
|
87
82
|
{
|
|
88
|
-
"name": "hmos-
|
|
83
|
+
"name": "hmos-test-case-generation",
|
|
89
84
|
"kind": "skill",
|
|
90
85
|
"dependencies": [
|
|
91
|
-
{ "tool": "
|
|
86
|
+
{ "tool": "node", "level": "required", "version": { "min": "22.18.0" } },
|
|
92
87
|
{ "tool": "adb", "level": "optional" }
|
|
93
88
|
],
|
|
94
|
-
"note": "
|
|
89
|
+
"note": "validate.ts, convert_to_ui_elements.ts, and android_viewtree_bfs_crawler.ts run via `node`; adb only when producing ui_elements.json from an installed Android app"
|
|
95
90
|
},
|
|
96
91
|
{
|
|
97
92
|
"name": "hmos-incremental-ui-align",
|
|
98
93
|
"kind": "skill",
|
|
99
94
|
"dependencies": [
|
|
100
95
|
{ "tool": "deveco", "level": "required" },
|
|
101
|
-
{ "tool": "uv", "level": "required" },
|
|
102
96
|
{ "tool": "hdc", "level": "required" },
|
|
103
97
|
{ "tool": "adb", "level": "required" }
|
|
104
|
-
]
|
|
105
|
-
"note": "app_feature_verify.py / page_capture.py run via `uv run` (PEP 723 inline deps; uv provides Python)"
|
|
98
|
+
]
|
|
106
99
|
},
|
|
107
100
|
{
|
|
108
101
|
"name": "hmos-integration-test",
|
|
109
102
|
"kind": "skill",
|
|
110
103
|
"dependencies": [
|
|
111
104
|
{ "tool": "deveco", "level": "required" },
|
|
112
|
-
{ "tool": "
|
|
113
|
-
{ "tool": "
|
|
105
|
+
{ "tool": "hdc", "level": "required" },
|
|
106
|
+
{ "tool": "node", "level": "required", "version": { "min": "22.18.0" } }
|
|
114
107
|
],
|
|
115
|
-
"note": "
|
|
108
|
+
"note": "self-tester agent runs tools via node \"$TOOL_DIR/engine/self-test-runner.ts\" (TOOL_DIR resolved from npm global root); TS scripts use Node native type stripping"
|
|
116
109
|
},
|
|
117
110
|
{
|
|
118
111
|
"name": "hmos-fix-build-errors",
|
|
119
112
|
"kind": "skill",
|
|
120
113
|
"dependencies": [{ "tool": "deveco", "level": "required" }]
|
|
121
114
|
},
|
|
115
|
+
{
|
|
116
|
+
"name": "hmos-spec-generate",
|
|
117
|
+
"kind": "skill",
|
|
118
|
+
"dependencies": [
|
|
119
|
+
{ "tool": "node", "level": "required", "version": { "min": "22.18.0" } }
|
|
120
|
+
],
|
|
121
|
+
"note": "homegraph code queries run via `npx --yes homegraph`; every requirement file (.txt and Excel/CSV alike) is split into individual requirements by scripts/parse_requirements.ts, which runs via `node` (native type stripping, no third-party deps)"
|
|
122
|
+
},
|
|
122
123
|
{
|
|
123
124
|
"name": "hmos-convert-pipeline",
|
|
124
125
|
"kind": "skill",
|
|
125
126
|
"dependencies": [
|
|
126
127
|
{ "tool": "deveco", "level": "required" },
|
|
127
|
-
{ "tool": "uv", "level": "optional" },
|
|
128
128
|
{ "tool": "hdc", "level": "optional" }
|
|
129
129
|
],
|
|
130
|
-
"note": "test stage skippable via skip_test; when run it needs
|
|
130
|
+
"note": "test stage skippable via skip_test; when run it needs hdc"
|
|
131
131
|
},
|
|
132
132
|
{
|
|
133
133
|
"name": "logic-context-builder",
|
|
134
134
|
"kind": "agent",
|
|
135
|
-
"dependencies": [{ "tool": "
|
|
135
|
+
"dependencies": [{ "tool": "node", "level": "required" }],
|
|
136
|
+
"note": "uses agents/scripts/platform_query.mjs; network access may still be needed when platform verification triggers"
|
|
136
137
|
},
|
|
137
138
|
{
|
|
138
139
|
"name": "logic-coder",
|
|
139
140
|
"kind": "agent",
|
|
140
|
-
"dependencies": [
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
"
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"name": "build-fixer",
|
|
149
|
-
"kind": "agent",
|
|
150
|
-
"dependencies": [{ "tool": "deveco", "level": "required" }]
|
|
141
|
+
"dependencies": [
|
|
142
|
+
{ "tool": "node", "level": "required" },
|
|
143
|
+
{ "tool": "git", "level": "required" },
|
|
144
|
+
{ "tool": "deveco", "level": "optional" }
|
|
145
|
+
],
|
|
146
|
+
"note": "uses agents/scripts/platform_query.mjs and agents/scripts/hmos-precheck/index.mjs; DevEco toolchain is needed for full ArkTS/codelinter validation when .ets files change"
|
|
151
147
|
},
|
|
152
148
|
{
|
|
153
149
|
"name": "code-reviewer",
|
|
154
150
|
"kind": "agent",
|
|
155
|
-
"dependencies": [
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
"
|
|
151
|
+
"dependencies": [
|
|
152
|
+
{ "tool": "node", "level": "required" },
|
|
153
|
+
{ "tool": "deveco", "level": "optional" },
|
|
154
|
+
{ "tool": "git", "level": "optional" }
|
|
155
|
+
],
|
|
156
|
+
"note": "Step 0b runs `npx arkanalysis` and the fix strategies run `npx devecocli docs` (node); Step 6 build gate uses the DevEco toolchain; Step 8 commits but degrades gracefully outside a git repo, and Step 0a reviews holistically when there is no commit to scope to"
|
|
161
157
|
},
|
|
162
158
|
{
|
|
163
159
|
"name": "self-tester",
|
|
164
160
|
"kind": "agent",
|
|
165
161
|
"dependencies": [
|
|
166
|
-
{ "tool": "
|
|
162
|
+
{ "tool": "node", "level": "required", "version": { "min": "22.18.0" } },
|
|
167
163
|
{ "tool": "hdc", "level": "required" }
|
|
168
164
|
],
|
|
169
|
-
"note": "
|
|
165
|
+
"note": "resolves TOOL_DIR via npm root -g, then runs node \"$TOOL_DIR/engine/self-test-runner.ts\" run/status/kill (TS via Node native type stripping)"
|
|
170
166
|
},
|
|
171
167
|
{
|
|
172
168
|
"name": "self-test-fixer",
|
|
173
169
|
"kind": "agent",
|
|
174
|
-
"dependencies": [
|
|
170
|
+
"dependencies": [
|
|
171
|
+
{ "tool": "node", "level": "required" },
|
|
172
|
+
{ "tool": "deveco", "level": "required" },
|
|
173
|
+
{ "tool": "git", "level": "optional" }
|
|
174
|
+
],
|
|
175
|
+
"note": "3c invokes hmos-fix-build-errors to verify compilation (DevEco toolchain); 3.5 commits the fix but degrades gracefully when the project is not a git repo"
|
|
175
176
|
}
|
|
176
177
|
]
|
|
177
178
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buaa_smat/hometrans",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "HomeTrans (Android-to-HarmonyOS) skill + agent installer. Run `ht init` to distribute conversion skills and subagents into AI editors.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
"build": "node scripts/build.js",
|
|
25
25
|
"dev": "tsx src/cli/index.ts",
|
|
26
26
|
"prepare": "node scripts/build.js",
|
|
27
|
-
"prepack": "node scripts/build.js"
|
|
27
|
+
"prepack": "node scripts/build.js",
|
|
28
|
+
"prepublishOnly": "npm run build"
|
|
28
29
|
},
|
|
29
30
|
"dependencies": {
|
|
31
|
+
"@autotest/agent": "file:tools/test-tools/autotest/deps/autotest-agent-0.1.1.tgz",
|
|
30
32
|
"@modelcontextprotocol/sdk": "^1.0.4",
|
|
31
|
-
"arkanalyzer": "^1.0.19",
|
|
32
33
|
"chalk": "^5.6.2",
|
|
33
34
|
"commander": "^14.0.0",
|
|
34
35
|
"figlet": "^1.11.0",
|
|
35
36
|
"fs-extra": "11.3.0",
|
|
36
37
|
"inquirer": "^14.0.0",
|
|
37
|
-
"jsonc-parser": "^3.3.1"
|
|
38
|
-
"simple-git": "^3.25.0"
|
|
38
|
+
"jsonc-parser": "^3.3.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/figlet": "^1.7.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"engines": {
|
|
53
|
-
"node": ">=18.0
|
|
53
|
+
"node": ">=22.18.0"
|
|
54
54
|
},
|
|
55
55
|
"keywords": [
|
|
56
56
|
"hometrans",
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 880 890" width="880" height="890">
|
|
2
|
+
<style>
|
|
3
|
+
text { font-family: 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Microsoft YaHei', 'Microsoft JhengHei', 'SimHei', sans-serif; }
|
|
4
|
+
.title { font-size: 20px; font-weight: 600; fill: #111827; }
|
|
5
|
+
.grp { font-size: 13px; font-weight: 600; fill: #4b5563; }
|
|
6
|
+
.grpx { font-size: 14px; font-weight: 700; fill: #334155; }
|
|
7
|
+
.nt { font-size: 14px; font-weight: 600; fill: #111827; }
|
|
8
|
+
.ds { font-size: 12px; fill: #6b7280; }
|
|
9
|
+
.loop { font-size: 11px; font-weight: 600; fill: #7c3aed; }
|
|
10
|
+
.badge { font-size: 13px; font-weight: 700; fill: #7c3aed; }
|
|
11
|
+
.lg { font-size: 12px; fill: #374151; }
|
|
12
|
+
</style>
|
|
13
|
+
<defs>
|
|
14
|
+
<marker id="arrow" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
|
|
15
|
+
<polygon points="0 0, 10 3.5, 0 7" fill="#2563eb"/>
|
|
16
|
+
</marker>
|
|
17
|
+
<marker id="arrowp" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
|
|
18
|
+
<polygon points="0 0, 10 3.5, 0 7" fill="#7c3aed"/>
|
|
19
|
+
</marker>
|
|
20
|
+
</defs>
|
|
21
|
+
<rect width="880" height="890" fill="#ffffff"/>
|
|
22
|
+
|
|
23
|
+
<text x="40" y="48" class="title">Android → HarmonyOS 迁移流程</text>
|
|
24
|
+
|
|
25
|
+
<!-- ===== 起点 ===== -->
|
|
26
|
+
<rect x="182" y="92" width="480" height="48" rx="24" fill="#f0fdf4" stroke="#16a34a" stroke-width="1.6"/>
|
|
27
|
+
<text x="422" y="121" text-anchor="middle" class="nt">开始:准备 Android 源项目 + 鸿蒙目标项目</text>
|
|
28
|
+
|
|
29
|
+
<path d="M 422,140 V 162 H 232 V 182" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
30
|
+
<path d="M 422,140 V 162 H 612 V 182" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
31
|
+
|
|
32
|
+
<!-- ===== 分支 A:UI 迁移 ===== -->
|
|
33
|
+
<rect x="52" y="184" width="360" height="178" rx="12" fill="#fbfdff" stroke="#93c5fd" stroke-width="1.4" stroke-dasharray="8,5"/>
|
|
34
|
+
<text x="232" y="206" text-anchor="middle" class="grp">UI 迁移</text>
|
|
35
|
+
<rect x="76" y="220" width="312" height="58" rx="9" fill="#eff6ff" stroke="#2563eb" stroke-width="1.6"/>
|
|
36
|
+
<text x="232" y="243" text-anchor="middle" class="nt">hmos-batch-ui-align</text>
|
|
37
|
+
<text x="232" y="263" text-anchor="middle" class="ds">批量迁移 Android 页面为 ArkTS 并转换资源</text>
|
|
38
|
+
<path d="M 232,278 V 296" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
39
|
+
<rect x="76" y="298" width="312" height="58" rx="9" fill="#f5f9ff" stroke="#2563eb" stroke-width="1.6" stroke-dasharray="6,4"/>
|
|
40
|
+
<text x="232" y="321" text-anchor="middle" class="nt">hmos-incremental-ui-align</text>
|
|
41
|
+
<text x="232" y="341" text-anchor="middle" class="ds">双端截图对比,增量修复 UI 差异(按需)</text>
|
|
42
|
+
|
|
43
|
+
<!-- ===== 分支 B:需求分析 ===== -->
|
|
44
|
+
<rect x="432" y="184" width="360" height="178" rx="12" fill="#fffdfa" stroke="#fcd9b6" stroke-width="1.4" stroke-dasharray="8,5"/>
|
|
45
|
+
<text x="612" y="206" text-anchor="middle" class="grp">需求分析</text>
|
|
46
|
+
<rect x="456" y="220" width="312" height="58" rx="9" fill="#fff7ed" stroke="#ea580c" stroke-width="1.6"/>
|
|
47
|
+
<text x="612" y="243" text-anchor="middle" class="nt">编写 REQ.txt(人工)</text>
|
|
48
|
+
<text x="612" y="263" text-anchor="middle" class="ds">自然语言描述需求,空行分隔多个需求</text>
|
|
49
|
+
<path d="M 612,278 V 296" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
50
|
+
<rect x="456" y="298" width="312" height="58" rx="9" fill="#eff6ff" stroke="#2563eb" stroke-width="1.6"/>
|
|
51
|
+
<text x="612" y="321" text-anchor="middle" class="nt">hmos-spec-generate</text>
|
|
52
|
+
<text x="612" y="341" text-anchor="middle" class="ds">将 REQ.txt 拆解为原子场景 SPEC 文档</text>
|
|
53
|
+
|
|
54
|
+
<!-- ===== 汇合点 ===== -->
|
|
55
|
+
<path d="M 232,362 V 378 H 422 V 392" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
56
|
+
<path d="M 612,362 V 378 H 422 V 392" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
57
|
+
<rect x="182" y="394" width="480" height="48" rx="24" fill="#f0fdf4" stroke="#16a34a" stroke-width="1.6"/>
|
|
58
|
+
<text x="422" y="423" text-anchor="middle" class="nt">鸿蒙项目(UI 迁移完毕) + SPEC 文档集</text>
|
|
59
|
+
|
|
60
|
+
<path d="M 422,442 V 476" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
61
|
+
|
|
62
|
+
<!-- ===== 循环容器:逐个 SPEC ===== -->
|
|
63
|
+
<rect x="72" y="478" width="700" height="210" rx="14" fill="#fdfcff" stroke="#c4b5fd" stroke-width="1.6" stroke-dasharray="9,6"/>
|
|
64
|
+
<text x="422" y="505" text-anchor="middle" class="grpx">逐个 SPEC 循环 —— 每份 <feature>-SPEC.md 完整走一遍下列步骤</text>
|
|
65
|
+
<text x="748" y="505" text-anchor="end" class="badge">× N</text>
|
|
66
|
+
|
|
67
|
+
<rect x="152" y="524" width="540" height="58" rx="9" fill="#f5f9ff" stroke="#2563eb" stroke-width="1.6" stroke-dasharray="6,4"/>
|
|
68
|
+
<text x="422" y="547" text-anchor="middle" class="nt">hmos-test-case-generation</text>
|
|
69
|
+
<text x="422" y="567" text-anchor="middle" class="ds">由 SPEC 生成 test_case.md / pre_test_case.md(skip_test=true 可跳过)</text>
|
|
70
|
+
|
|
71
|
+
<path d="M 422,582 V 604" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
72
|
+
|
|
73
|
+
<rect x="152" y="606" width="540" height="58" rx="9" fill="#eff6ff" stroke="#2563eb" stroke-width="1.6"/>
|
|
74
|
+
<text x="422" y="629" text-anchor="middle" class="nt">hmos-convert-pipeline</text>
|
|
75
|
+
<text x="422" y="649" text-anchor="middle" class="ds">逻辑编码 → 构建 → 代码评审 → 集成自测,产出已签名 HAP</text>
|
|
76
|
+
|
|
77
|
+
<!-- 回边:下一份 SPEC -->
|
|
78
|
+
<path d="M 152,635 H 102 V 553 H 150" fill="none" stroke="#7c3aed" stroke-width="1.6" stroke-dasharray="7,4" marker-end="url(#arrowp)"/>
|
|
79
|
+
<text transform="translate(92,594) rotate(-90)" text-anchor="middle" class="loop">下一份 SPEC</text>
|
|
80
|
+
|
|
81
|
+
<path d="M 422,688 V 720" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
82
|
+
|
|
83
|
+
<!-- ===== 终点 ===== -->
|
|
84
|
+
<rect x="182" y="722" width="480" height="48" rx="24" fill="#f0fdf4" stroke="#16a34a" stroke-width="1.6"/>
|
|
85
|
+
<text x="422" y="751" text-anchor="middle" class="nt">产物:已签名 HAP + pipeline-manifest.md</text>
|
|
86
|
+
|
|
87
|
+
<!-- ===== 图例 ===== -->
|
|
88
|
+
<line x1="72" y1="814" x2="104" y2="814" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
89
|
+
<text x="114" y="818" class="lg">执行顺序</text>
|
|
90
|
+
<line x1="200" y1="814" x2="232" y2="814" stroke="#7c3aed" stroke-width="1.6" stroke-dasharray="7,4" marker-end="url(#arrowp)"/>
|
|
91
|
+
<text x="242" y="818" class="lg">循环回边</text>
|
|
92
|
+
<rect x="330" y="806" width="26" height="16" rx="4" fill="#eff6ff" stroke="#2563eb" stroke-width="1.4"/>
|
|
93
|
+
<text x="366" y="818" class="lg">自动化(skill)</text>
|
|
94
|
+
<rect x="480" y="806" width="26" height="16" rx="4" fill="#f5f9ff" stroke="#2563eb" stroke-width="1.4" stroke-dasharray="5,3"/>
|
|
95
|
+
<text x="516" y="818" class="lg">可选 / 可跳过</text>
|
|
96
|
+
|
|
97
|
+
<rect x="72" y="844" width="26" height="16" rx="4" fill="#fff7ed" stroke="#ea580c" stroke-width="1.4"/>
|
|
98
|
+
<text x="108" y="856" class="lg">人工介入</text>
|
|
99
|
+
<rect x="200" y="844" width="26" height="16" rx="4" fill="#f0fdf4" stroke="#16a34a" stroke-width="1.4"/>
|
|
100
|
+
<text x="236" y="856" class="lg">起点 / 汇合 / 产物</text>
|
|
101
|
+
<rect x="380" y="844" width="26" height="16" rx="4" fill="#fdfcff" stroke="#c4b5fd" stroke-width="1.4" stroke-dasharray="6,4"/>
|
|
102
|
+
<text x="416" y="856" class="lg">循环容器</text>
|
|
103
|
+
</svg>
|