@buaa_smat/hometrans 0.1.17 → 0.1.20
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 +138 -56
- 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 +35 -376
- package/agents/test-case-generation-generator.md +317 -0
- package/agents/test-case-generation-validator.md +231 -0
- package/dist/cli/config-store.js +19 -146
- package/dist/cli/config.js +6 -8
- package/dist/cli/env-vars.js +1 -3
- package/dist/cli/index.js +0 -11
- package/dist/cli/init.js +147 -235
- package/dist/cli/uninstall.js +5 -129
- package/dist/utils/regex.js +8 -0
- package/env-requirements.json +57 -55
- package/package.json +6 -8
- 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 -43
- 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 +188 -131
- 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 +57 -40
- package/skills/hmos-incremental-ui-align/SKILL.md +180 -24
- 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 +111 -79
- package/skills/hmos-integration-test/SKILL.md +216 -132
- package/skills/hmos-integration-test/scripts/report-tool.ts +791 -0
- package/skills/hmos-integration-test/scripts/resolve-metadata-tool.ts +125 -0
- package/skills/hmos-integration-test/scripts/self-test-runner.ts +756 -0
- package/skills/hmos-integration-test/scripts/testcases-tool.ts +239 -0
- 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/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_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_schema.md +0 -143
- 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,7 +14,6 @@ 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';
|
|
@@ -30,8 +28,8 @@ const __dirname = path.dirname(__filename);
|
|
|
30
28
|
const NODE_DEPS = ['homegraph', 'arkanalyzer'];
|
|
31
29
|
/**
|
|
32
30
|
* Machine env var names that `ht init` may have set and that have a non-empty
|
|
33
|
-
* value in config.env: the SDK paths / tool dir plus the
|
|
34
|
-
*
|
|
31
|
+
* value in config.env: the SDK paths / tool dir plus the model fields
|
|
32
|
+
* (HOMETRANS_MODEL_*).
|
|
35
33
|
*/
|
|
36
34
|
function plannedEnvVarNames(config) {
|
|
37
35
|
return MACHINE_ENV_KEYS.filter((k) => (config.env[k] ?? '').trim().length > 0);
|
|
@@ -129,62 +127,6 @@ async function detectNodeDepsToRemove() {
|
|
|
129
127
|
return [...NODE_DEPS];
|
|
130
128
|
}
|
|
131
129
|
/* ------------------------------------------------------------------ */
|
|
132
|
-
/* MCP config removal helpers */
|
|
133
|
-
/* ------------------------------------------------------------------ */
|
|
134
|
-
function detectIndentation(raw) {
|
|
135
|
-
const firstIndented = raw.match(/^( +|\t)/m);
|
|
136
|
-
if (!firstIndented)
|
|
137
|
-
return { tabSize: 2, insertSpaces: true };
|
|
138
|
-
if (firstIndented[1] === '\t')
|
|
139
|
-
return { tabSize: 1, insertSpaces: false };
|
|
140
|
-
return { tabSize: firstIndented[1].length, insertSpaces: true };
|
|
141
|
-
}
|
|
142
|
-
async function tryRemoveJsoncKey(filePath, keyPath) {
|
|
143
|
-
let raw;
|
|
144
|
-
try {
|
|
145
|
-
raw = await fs.readFile(filePath, 'utf-8');
|
|
146
|
-
}
|
|
147
|
-
catch {
|
|
148
|
-
return null;
|
|
149
|
-
}
|
|
150
|
-
const formattingOptions = detectIndentation(raw);
|
|
151
|
-
const edits = modify(raw, keyPath, undefined, { formattingOptions });
|
|
152
|
-
if (edits.length === 0)
|
|
153
|
-
return null;
|
|
154
|
-
return { oldContent: raw, newContent: applyEdits(raw, edits) };
|
|
155
|
-
}
|
|
156
|
-
async function tryRemoveTomlSection(filePath, sectionHeader) {
|
|
157
|
-
let raw;
|
|
158
|
-
try {
|
|
159
|
-
raw = await fs.readFile(filePath, 'utf-8');
|
|
160
|
-
}
|
|
161
|
-
catch {
|
|
162
|
-
return null;
|
|
163
|
-
}
|
|
164
|
-
const sectionTag = `[${sectionHeader}]`;
|
|
165
|
-
if (!raw.includes(sectionTag))
|
|
166
|
-
return null;
|
|
167
|
-
const lines = raw.split('\n');
|
|
168
|
-
const result = [];
|
|
169
|
-
let inSection = false;
|
|
170
|
-
for (const line of lines) {
|
|
171
|
-
if (line.trim() === sectionTag) {
|
|
172
|
-
inSection = true;
|
|
173
|
-
continue;
|
|
174
|
-
}
|
|
175
|
-
if (inSection && line.trim().startsWith('[')) {
|
|
176
|
-
inSection = false;
|
|
177
|
-
}
|
|
178
|
-
if (!inSection) {
|
|
179
|
-
result.push(line);
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
let content = result.join('\n').replace(/\n{3,}/g, '\n\n').trimEnd();
|
|
183
|
-
if (content.length > 0)
|
|
184
|
-
content += '\n';
|
|
185
|
-
return { oldContent: raw, newContent: content };
|
|
186
|
-
}
|
|
187
|
-
/* ------------------------------------------------------------------ */
|
|
188
130
|
/* Plan building */
|
|
189
131
|
/* ------------------------------------------------------------------ */
|
|
190
132
|
async function buildPlanForEditor(editor, skillNames, agentEntries, plan) {
|
|
@@ -224,61 +166,6 @@ async function buildPlanForEditor(editor, skillNames, agentEntries, plan) {
|
|
|
224
166
|
});
|
|
225
167
|
}
|
|
226
168
|
}
|
|
227
|
-
const { mcp } = editor;
|
|
228
|
-
switch (mcp.format) {
|
|
229
|
-
case 'jsonc-object':
|
|
230
|
-
case 'jsonc-command-array': {
|
|
231
|
-
if (!mcp.path || !mcp.keyPath)
|
|
232
|
-
break;
|
|
233
|
-
const configPath = expandHome(mcp.path);
|
|
234
|
-
const change = await tryRemoveJsoncKey(configPath, mcp.keyPath);
|
|
235
|
-
if (change !== null) {
|
|
236
|
-
plan.modifications.push({
|
|
237
|
-
display: `${editor.name}: ${prettyHome(configPath)}`,
|
|
238
|
-
absPath: configPath,
|
|
239
|
-
reason: 'Remove hometrans MCP entry',
|
|
240
|
-
oldContent: change.oldContent,
|
|
241
|
-
newContent: change.newContent,
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
break;
|
|
245
|
-
}
|
|
246
|
-
case 'codex-cli': {
|
|
247
|
-
plan.codexRemove = true;
|
|
248
|
-
if (mcp.path && mcp.section) {
|
|
249
|
-
const configPath = expandHome(mcp.path);
|
|
250
|
-
const change = await tryRemoveTomlSection(configPath, mcp.section);
|
|
251
|
-
if (change !== null) {
|
|
252
|
-
plan.modifications.push({
|
|
253
|
-
display: `${editor.name}: ${prettyHome(configPath)}`,
|
|
254
|
-
absPath: configPath,
|
|
255
|
-
reason: 'Remove hometrans MCP section',
|
|
256
|
-
oldContent: change.oldContent,
|
|
257
|
-
newContent: change.newContent,
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
break;
|
|
262
|
-
}
|
|
263
|
-
case 'toml-section': {
|
|
264
|
-
if (!mcp.path || !mcp.section)
|
|
265
|
-
break;
|
|
266
|
-
const configPath = expandHome(mcp.path);
|
|
267
|
-
const change = await tryRemoveTomlSection(configPath, mcp.section);
|
|
268
|
-
if (change !== null) {
|
|
269
|
-
plan.modifications.push({
|
|
270
|
-
display: `${editor.name}: ${prettyHome(configPath)}`,
|
|
271
|
-
absPath: configPath,
|
|
272
|
-
reason: 'Remove hometrans MCP section',
|
|
273
|
-
oldContent: change.oldContent,
|
|
274
|
-
newContent: change.newContent,
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
break;
|
|
278
|
-
}
|
|
279
|
-
case 'none':
|
|
280
|
-
break;
|
|
281
|
-
}
|
|
282
169
|
}
|
|
283
170
|
/** Line-based diff via an LCS table. Files here are small config files. */
|
|
284
171
|
function diffLines(oldLines, newLines) {
|
|
@@ -423,16 +310,6 @@ async function executePlan(plan) {
|
|
|
423
310
|
await fs.writeFile(mod.absPath, mod.newContent, 'utf-8');
|
|
424
311
|
modified++;
|
|
425
312
|
}
|
|
426
|
-
if (plan.codexRemove) {
|
|
427
|
-
try {
|
|
428
|
-
await execFileAsync('codex', ['mcp', 'remove', 'hometrans'], {
|
|
429
|
-
shell: process.platform === 'win32',
|
|
430
|
-
});
|
|
431
|
-
}
|
|
432
|
-
catch {
|
|
433
|
-
// codex CLI unavailable or failed — TOML path already handled above
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
313
|
// Remove the global npm CLIs installed by `ht init` (homegraph + arkanalyzer).
|
|
437
314
|
// Best-effort: a failure is reported in the note but never aborts the rest of
|
|
438
315
|
// the uninstall.
|
|
@@ -490,7 +367,6 @@ export async function uninstallCommand() {
|
|
|
490
367
|
const plan = {
|
|
491
368
|
deletions: [],
|
|
492
369
|
modifications: [],
|
|
493
|
-
codexRemove: false,
|
|
494
370
|
npmDeps: [],
|
|
495
371
|
envVars: [],
|
|
496
372
|
configDir: null,
|
|
@@ -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,133 @@
|
|
|
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": "the skill runs its bundled tools directly via node \"$SKILL_SCRIPTS/<script>.ts\" where SKILL_SCRIPTS is the skill's own scripts/ directory; batch_runner.js is resolved from @autotest/agent (walk-up from script dir + global npm root fallback + auto-install if missing). Tools are .ts source files run directly via Node type stripping (zero external deps)"
|
|
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": "
|
|
167
|
-
{ "tool": "hdc", "level": "required" }
|
|
162
|
+
{ "tool": "deveco", "level": "optional" },
|
|
163
|
+
{ "tool": "hdc", "level": "required" },
|
|
164
|
+
{ "tool": "node", "level": "required", "version": { "min": "22.18.0" } }
|
|
168
165
|
],
|
|
169
|
-
"note": "
|
|
166
|
+
"note": "thin wrapper that loads the hmos-integration-test skill and runs its procedure (parse test_case.md → install HAP → run AutoTest batch → produce self-test-report.md); the skill's self-test-runner.ts resolves @autotest/agent's batch_runner.js itself (walk-up + global npm root fallback + auto-install if missing — Step 0b); tools are .ts source run via Node type stripping (zero external deps); reports the terminal status (COMPLETED/CRASHED/TIMEOUT/FAILED/NOT_STARTED) + self-test-report.md path back to the caller. No setup param; install/uninstall always runs (real installable HAP required)."
|
|
170
167
|
},
|
|
171
168
|
{
|
|
172
169
|
"name": "self-test-fixer",
|
|
173
170
|
"kind": "agent",
|
|
174
|
-
"dependencies": [
|
|
171
|
+
"dependencies": [
|
|
172
|
+
{ "tool": "node", "level": "required" },
|
|
173
|
+
{ "tool": "deveco", "level": "required" },
|
|
174
|
+
{ "tool": "git", "level": "optional" }
|
|
175
|
+
],
|
|
176
|
+
"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
177
|
}
|
|
176
178
|
]
|
|
177
179
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buaa_smat/hometrans",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
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,16 @@
|
|
|
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": "0.0.3",
|
|
30
32
|
"@modelcontextprotocol/sdk": "^1.0.4",
|
|
31
|
-
"arkanalyzer": "^1.0.19",
|
|
32
33
|
"chalk": "^5.6.2",
|
|
33
|
-
"commander": "^14.0.0",
|
|
34
34
|
"figlet": "^1.11.0",
|
|
35
35
|
"fs-extra": "11.3.0",
|
|
36
|
-
"inquirer": "^14.0.0"
|
|
37
|
-
"jsonc-parser": "^3.3.1",
|
|
38
|
-
"simple-git": "^3.25.0"
|
|
36
|
+
"inquirer": "^14.0.0"
|
|
39
37
|
},
|
|
40
38
|
"devDependencies": {
|
|
41
39
|
"@types/figlet": "^1.7.0",
|
|
@@ -50,7 +48,7 @@
|
|
|
50
48
|
"access": "public"
|
|
51
49
|
},
|
|
52
50
|
"engines": {
|
|
53
|
-
"node": ">=18.0
|
|
51
|
+
"node": ">=22.18.0"
|
|
54
52
|
},
|
|
55
53
|
"keywords": [
|
|
56
54
|
"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>
|