@buaa_smat/hometrans 26.0.5 → 26.0.6

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.
Files changed (472) hide show
  1. package/README.md +249 -279
  2. package/agents/code-reviewer.md +1 -1
  3. package/dist/cli/editors.json +20 -0
  4. package/dist/platform/registry.js +1 -0
  5. package/dist/platform/validate.js +2 -1
  6. package/i18n/agents/code-reviewer.md +1 -1
  7. package/i18n/platforms/atomcode/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  8. package/i18n/platforms/claude-code/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  9. package/i18n/platforms/codebuddy/skills/a2h-app-migrate/SKILL.unique.md +8 -0
  10. package/i18n/platforms/codex/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  11. package/i18n/platforms/cursor/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  12. package/i18n/platforms/deveco/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  13. package/i18n/platforms/opencode/skills/a2h-app-migrate/SKILL.unique.md +10 -0
  14. package/i18n/platforms/qoder/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  15. package/i18n/platforms/qoder-cn/skills/a2h-app-migrate/SKILL.unique.md +8 -0
  16. package/i18n/platforms/trae/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  17. package/i18n/platforms/trae-cn/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  18. package/i18n/skills/a2h-app-migrate/SKILL.md +32 -15
  19. package/i18n/skills/a2h-app-migrate/references/stage-map.md +4 -2
  20. package/i18n/skills/a2h-app-migrate/references/workflow.yaml +148 -89
  21. package/i18n/skills/a2h-app-migrate/scripts/env_preflight.mjs +1 -1
  22. package/i18n/skills/a2h-app-migrate/scripts/validate_workflow.mjs +51 -2
  23. package/i18n/skills/a2h-app-migrate/test/test_build_fixer_contract.mjs +1 -1
  24. package/i18n/skills/a2h-app-migrate/test/test_interaction.mjs +0 -2
  25. package/i18n/skills/a2h-app-migrate/test/test_resume_plan.mjs +1 -1
  26. package/i18n/skills/a2h-app-migrate/test/test_skill_doc.mjs +1 -1
  27. package/i18n/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +1 -1
  28. package/i18n/skills/a2h-app-migrate/test/test_utg_static_done.mjs +9 -3
  29. package/i18n/skills/a2h-app-migrate/test/test_validate_workflow_bilingual.mjs +4 -2
  30. package/i18n/skills/a2h-arkts-logic-coder/SKILL.md +8 -7
  31. package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -2
  32. package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +33 -12
  33. package/i18n/skills/a2h-batch-ui-align/SKILL.md +14 -12
  34. package/i18n/skills/a2h-batch-ui-align/references/cards/alignment.md +1 -0
  35. package/i18n/skills/a2h-batch-ui-align/references/cards/canvas.md +1 -0
  36. package/i18n/skills/a2h-batch-ui-align/references/cards/dynamics.md +32 -1
  37. package/i18n/skills/a2h-batch-ui-align/references/cards/geometry.md +3 -2
  38. package/i18n/skills/a2h-batch-ui-align/references/cards/interaction.md +4 -0
  39. package/i18n/skills/a2h-batch-ui-align/references/cards/resources.md +19 -1
  40. package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +13 -1
  41. package/i18n/skills/a2h-batch-ui-align/references/cards/window.md +2 -2
  42. package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +205 -7
  43. package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +10 -17
  44. package/i18n/skills/a2h-batch-ui-align/references/incremental-scope.md +3 -4
  45. package/i18n/skills/a2h-batch-ui-align/references/lottie-integration.md +47 -2
  46. package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +52 -328
  47. package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +1 -138
  48. package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +2 -11
  49. package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_paradigm-selection.md +1 -1
  50. package/i18n/skills/a2h-batch-ui-align/references/step3-capture.md +8 -23
  51. package/i18n/skills/a2h-batch-ui-align/references/step4-prepare.md +2 -1
  52. package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +17 -9
  53. package/i18n/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +239 -16
  54. package/i18n/skills/a2h-batch-ui-align/scripts/group_pack.mjs +6 -0
  55. package/i18n/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +6 -3
  56. package/i18n/skills/a2h-batch-ui-align/scripts/measure_pack.ts +170 -10
  57. package/i18n/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +42 -1
  58. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/main.ts +20 -1
  59. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +81 -0
  60. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/click_handler.ts +140 -0
  61. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/collapsing_toolbar.ts +124 -0
  62. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/compose_semantics.ts +287 -0
  63. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/flowitem_width.ts +78 -0
  64. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +194 -8
  65. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/inset_stacked.ts +138 -0
  66. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/int_division.ts +181 -0
  67. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +62 -2
  68. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_path.ts +77 -0
  69. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_ready.ts +109 -0
  70. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +88 -18
  71. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_cycle.ts +140 -0
  72. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +2 -2
  73. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/see_through_overlay.ts +149 -0
  74. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_builder.ts +139 -0
  75. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_show_close.ts +53 -0
  76. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/space_between_optional.ts +115 -0
  77. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +7 -1
  78. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/width_fill.ts +160 -0
  79. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_inset_stacked.test.mjs +155 -0
  80. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +60 -0
  81. package/i18n/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +38 -0
  82. package/i18n/skills/a2h-module-semantic-docs/SKILL.md +3 -2
  83. package/i18n/skills/a2h-page-specgen/SKILL.md +36 -5
  84. package/i18n/skills/a2h-page-specgen/references/behavior-ledger.md +89 -21
  85. package/i18n/skills/a2h-page-specgen/references/gates.md +33 -7
  86. package/i18n/skills/a2h-page-specgen/references/scenario-authoring.md +67 -13
  87. package/i18n/skills/a2h-page-specgen/references/spec-example.md +166 -32
  88. package/i18n/skills/a2h-page-specgen/references/spec-template.md +8 -5
  89. package/i18n/skills/a2h-page-specgen/scripts/behavior-audit.mjs +37 -1
  90. package/i18n/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +241 -22
  91. package/i18n/skills/a2h-page-specgen/scripts/behavior-model.mjs +29 -2
  92. package/i18n/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +32 -0
  93. package/i18n/skills/a2h-page-specgen/scripts/contract-calls.mjs +715 -0
  94. package/i18n/skills/a2h-page-specgen/scripts/footprint.mjs +129 -2
  95. package/i18n/skills/a2h-page-specgen/scripts/gate.mjs +19 -10
  96. package/i18n/skills/a2h-page-specgen/scripts/lib/contracts.mjs +62 -3
  97. package/i18n/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +27 -0
  98. package/i18n/skills/a2h-page-specgen/scripts/lib/hg.mjs +116 -6
  99. package/i18n/skills/a2h-page-specgen/scripts/operation-evidence.mjs +270 -29
  100. package/i18n/skills/a2h-page-specgen/scripts/prepare.mjs +26 -14
  101. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +118 -25
  102. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +104 -19
  103. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +118 -25
  104. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +104 -19
  105. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +216 -216
  106. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +1 -1
  107. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +2 -2
  108. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +118 -25
  109. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +100 -15
  110. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +118 -25
  111. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +104 -19
  112. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +155 -3
  113. package/i18n/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +529 -1
  114. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +27 -0
  115. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +158 -0
  116. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +11 -13
  117. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +97 -0
  118. package/i18n/skills/a2h-page-specgen/scripts/test/contract-calls.test.mjs +737 -0
  119. package/i18n/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +75 -3
  120. package/i18n/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +24 -0
  121. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +124 -0
  122. package/i18n/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +6 -2
  123. package/i18n/skills/a2h-page-specgen/scripts/test/gate.test.mjs +106 -1
  124. package/i18n/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +32 -0
  125. package/i18n/skills/a2h-page-specgen/scripts/test/hg.test.mjs +12 -0
  126. package/i18n/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +6 -1
  127. package/i18n/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +11 -3
  128. package/i18n/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +1 -1
  129. package/i18n/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +1 -0
  130. package/i18n/skills/a2h-page-specgen/scripts/test/submit.test.mjs +159 -27
  131. package/i18n/skills/a2h-resource-convert/SKILL.md +1 -1
  132. package/i18n/skills/a2h-resource-convert/references/lottie-conversion-rules.md +2 -2
  133. package/i18n/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +124 -8
  134. package/i18n/skills/a2h-resource-convert/scripts/sync-framework-strings.mjs +147 -0
  135. package/i18n/skills/a2h-resource-convert/scripts/tests/framework_strings.test.mjs +131 -0
  136. package/i18n/skills/a2h-spec-design-pipeline/SKILL.md +15 -12
  137. package/i18n/skills/a2h-spec-design-pipeline/references/coding-loop.md +38 -10
  138. package/i18n/skills/a2h-spec-design-pipeline/references/initialization.md +2 -2
  139. package/i18n/skills/a2h-spec-design-pipeline/references/post-loop.md +2 -2
  140. package/i18n/skills/a2h-spec-design-pipeline/references/reply-recovery.md +172 -0
  141. package/i18n/skills/a2h-spec-design-pipeline/references/review-loop.md +2 -2
  142. package/i18n/skills/a2h-spec-design-pipeline/references/scripts.md +5 -3
  143. package/i18n/skills/a2h-spec-design-pipeline/references/state-and-resume.md +7 -1
  144. package/i18n/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +1 -1
  145. package/i18n/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +2 -0
  146. package/i18n/skills/a2h-spec-generate/references/input-formats.md +1 -1
  147. package/i18n/skills/a2h-utg-explorer/SKILL.md +11 -5
  148. package/i18n/skills/a2h-utg-explorer/references/architecture.md +37 -19
  149. package/i18n/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +48 -3
  150. package/i18n/skills/a2h-utg-explorer/scripts/final_utg.mjs +21 -0
  151. package/i18n/skills/a2h-utg-explorer/scripts/recover_d.mjs +67 -8
  152. package/i18n/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +32 -0
  153. package/i18n/skills/a2h-utg-explorer/scripts/tests/dialog_own_layout.test.mjs +40 -0
  154. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +63 -2
  155. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +143 -14
  156. package/i18n/skills/a2h-utg-static/SKILL.md +3 -3
  157. package/i18n/skills/a2h-utg-static/references/ui-elements-static-utg-schema.md +4 -3
  158. package/i18n/skills/a2h-utg-static/scripts/click_paths.mjs +1 -1
  159. package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +25 -0
  160. package/i18n/skills/a2h-utg-static/tools/convert_static_utg_to_ui_elements.ts +1 -0
  161. package/package.json +2 -1
  162. package/platforms/atomcode/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  163. package/platforms/claude-code/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  164. package/platforms/codebuddy/agents/build-fixer.frontmatter.md +5 -0
  165. package/platforms/codebuddy/agents/code-reviewer.frontmatter.md +5 -0
  166. package/platforms/codebuddy/agents/model-render-worker.frontmatter.md +5 -0
  167. package/platforms/codebuddy/agents/model-worker.frontmatter.md +5 -0
  168. package/platforms/codebuddy/agents/specgen-worker.frontmatter.md +5 -0
  169. package/platforms/codebuddy/skills/a2h-app-migrate/SKILL.unique.md +8 -0
  170. package/platforms/codex/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  171. package/platforms/cursor/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  172. package/platforms/deveco/agents/build-fixer.frontmatter.md +2 -0
  173. package/platforms/deveco/agents/code-reviewer.frontmatter.md +2 -0
  174. package/platforms/deveco/agents/model-render-worker.frontmatter.md +2 -0
  175. package/platforms/deveco/agents/model-worker.frontmatter.md +2 -0
  176. package/platforms/deveco/agents/specgen-worker.frontmatter.md +2 -0
  177. package/platforms/deveco/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  178. package/platforms/opencode/agents/build-fixer.frontmatter.md +2 -0
  179. package/platforms/opencode/agents/code-reviewer.frontmatter.md +2 -0
  180. package/platforms/opencode/agents/model-render-worker.frontmatter.md +2 -0
  181. package/platforms/opencode/agents/model-worker.frontmatter.md +2 -0
  182. package/platforms/opencode/agents/specgen-worker.frontmatter.md +2 -0
  183. package/platforms/opencode/skills/a2h-app-migrate/SKILL.unique.md +10 -0
  184. package/platforms/qoder/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  185. package/platforms/qoder-cn/skills/a2h-app-migrate/SKILL.unique.md +8 -0
  186. package/platforms/trae/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  187. package/platforms/trae-cn/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  188. package/skills/a2h-app-migrate/SKILL.md +31 -14
  189. package/skills/a2h-app-migrate/references/stage-map.md +4 -2
  190. package/skills/a2h-app-migrate/references/workflow.yaml +152 -89
  191. package/skills/a2h-app-migrate/scripts/assert_dag_complete.mjs +1 -1
  192. package/skills/a2h-app-migrate/scripts/check_ui_batch_done.mjs +28 -11
  193. package/skills/a2h-app-migrate/scripts/dag_action_catalog.mjs +76 -0
  194. package/skills/a2h-app-migrate/scripts/dag_production_executor.mjs +60 -5
  195. package/skills/a2h-app-migrate/scripts/dag_runner.mjs +184 -4
  196. package/skills/a2h-app-migrate/scripts/env_preflight.mjs +1 -1
  197. package/skills/a2h-app-migrate/scripts/ledger.mjs +2 -2
  198. package/skills/a2h-app-migrate/scripts/resume_plan.mjs +3 -3
  199. package/skills/a2h-app-migrate/scripts/validate_workflow.mjs +51 -2
  200. package/skills/a2h-app-migrate/test/test_dag_blocked_guard.mjs +291 -0
  201. package/skills/a2h-app-migrate/test/test_dag_production.mjs +40 -0
  202. package/skills/a2h-app-migrate/test/test_dag_runner.mjs +4 -3
  203. package/skills/a2h-app-migrate/test/test_i18n_engine_mirror.mjs +1 -1
  204. package/skills/a2h-app-migrate/test/test_interaction.mjs +0 -2
  205. package/skills/a2h-app-migrate/test/test_resume_plan.mjs +1 -1
  206. package/skills/a2h-app-migrate/test/test_skill_doc.mjs +1 -1
  207. package/skills/a2h-app-migrate/test/test_spec_engine_contract.mjs +1 -1
  208. package/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +1 -1
  209. package/skills/a2h-app-migrate/test/test_ui_batch_done.mjs +36 -0
  210. package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +19 -6
  211. package/skills/a2h-app-migrate/test/test_validate_workflow_bilingual.mjs +4 -2
  212. package/skills/a2h-arkts-logic-coder/SKILL.md +8 -7
  213. package/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -2
  214. package/skills/a2h-arkts-logic-coder/references/code-generation.md +33 -12
  215. package/skills/a2h-batch-ui-align/SKILL.md +14 -12
  216. package/skills/a2h-batch-ui-align/references/cards/alignment.md +1 -0
  217. package/skills/a2h-batch-ui-align/references/cards/canvas.md +1 -0
  218. package/skills/a2h-batch-ui-align/references/cards/dynamics.md +32 -1
  219. package/skills/a2h-batch-ui-align/references/cards/geometry.md +3 -2
  220. package/skills/a2h-batch-ui-align/references/cards/interaction.md +4 -0
  221. package/skills/a2h-batch-ui-align/references/cards/resources.md +19 -1
  222. package/skills/a2h-batch-ui-align/references/cards/widgets.md +13 -1
  223. package/skills/a2h-batch-ui-align/references/cards/window.md +2 -2
  224. package/skills/a2h-batch-ui-align/references/checker-rules.md +205 -7
  225. package/skills/a2h-batch-ui-align/references/conversion-procedure.md +10 -17
  226. package/skills/a2h-batch-ui-align/references/incremental-scope.md +3 -4
  227. package/skills/a2h-batch-ui-align/references/lottie-integration.md +47 -2
  228. package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +52 -328
  229. package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +1 -138
  230. package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +2 -11
  231. package/skills/a2h-batch-ui-align/references/state-mgmt/_/350/214/203/345/274/217/351/200/211/346/213/251/350/257/264/346/230/216.md +1 -1
  232. package/skills/a2h-batch-ui-align/references/step3-capture.md +8 -23
  233. package/skills/a2h-batch-ui-align/references/step4-prepare.md +2 -1
  234. package/skills/a2h-batch-ui-align/references/step5-convert.md +17 -9
  235. package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +239 -16
  236. package/skills/a2h-batch-ui-align/scripts/group_commit.mjs +6 -1
  237. package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +6 -0
  238. package/skills/a2h-batch-ui-align/scripts/group_pass.mjs +270 -0
  239. package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +134 -16
  240. package/skills/a2h-batch-ui-align/scripts/group_watch.mjs +39 -8
  241. package/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +6 -3
  242. package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +170 -10
  243. package/skills/a2h-batch-ui-align/scripts/module_placement.mjs +189 -0
  244. package/skills/a2h-batch-ui-align/scripts/overlay_effects.mjs +205 -0
  245. package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +42 -1
  246. package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +20 -1
  247. package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +28 -0
  248. package/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +81 -0
  249. package/skills/a2h-batch-ui-align/scripts/static_check/rules/click_handler.ts +140 -0
  250. package/skills/a2h-batch-ui-align/scripts/static_check/rules/collapsing_toolbar.ts +124 -0
  251. package/skills/a2h-batch-ui-align/scripts/static_check/rules/compose_semantics.ts +287 -0
  252. package/skills/a2h-batch-ui-align/scripts/static_check/rules/flowitem_width.ts +78 -0
  253. package/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +194 -8
  254. package/skills/a2h-batch-ui-align/scripts/static_check/rules/inset_stacked.ts +138 -0
  255. package/skills/a2h-batch-ui-align/scripts/static_check/rules/int_division.ts +181 -0
  256. package/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +62 -2
  257. package/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_path.ts +77 -0
  258. package/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_ready.ts +109 -0
  259. package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +88 -18
  260. package/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_cycle.ts +140 -0
  261. package/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +2 -2
  262. package/skills/a2h-batch-ui-align/scripts/static_check/rules/see_through_overlay.ts +149 -0
  263. package/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_builder.ts +139 -0
  264. package/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_show_close.ts +53 -0
  265. package/skills/a2h-batch-ui-align/scripts/static_check/rules/space_between_optional.ts +115 -0
  266. package/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +7 -1
  267. package/skills/a2h-batch-ui-align/scripts/static_check/rules/width_fill.ts +160 -0
  268. package/skills/a2h-batch-ui-align/scripts/static_check/scan_file.ts +28 -0
  269. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_chrome_defaults.test.mjs +328 -0
  270. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_click_handler.test.mjs +127 -0
  271. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_compose_semantics.test.mjs +150 -0
  272. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_hit_test.test.mjs +117 -0
  273. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_inset_stacked.test.mjs +155 -0
  274. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +60 -0
  275. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rule_smoke.test.mjs +413 -0
  276. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_runtime_api.test.mjs +159 -0
  277. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_sheet_builder.test.mjs +192 -0
  278. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_theme.test.mjs +4 -2
  279. package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +38 -0
  280. package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set_compose.test.mjs +106 -0
  281. package/skills/a2h-batch-ui-align/scripts/tests/group_commit.test.mjs +15 -0
  282. package/skills/a2h-batch-ui-align/scripts/tests/group_pass.test.mjs +150 -0
  283. package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +125 -0
  284. package/skills/a2h-batch-ui-align/scripts/tests/group_watch.test.mjs +56 -0
  285. package/skills/a2h-batch-ui-align/scripts/tests/measure_pack_icon_leaf.test.mjs +143 -0
  286. package/skills/a2h-batch-ui-align/scripts/tests/module_placement.test.mjs +248 -0
  287. package/skills/a2h-batch-ui-align/scripts/tests/overlay_effects.test.mjs +214 -0
  288. package/skills/a2h-fix-build-errors/references/known-patterns.md +5 -5
  289. package/skills/a2h-module-semantic-docs/SKILL.md +3 -2
  290. package/skills/a2h-module-semantic-docs/scripts/commit_module_state.mjs +10 -0
  291. package/skills/a2h-module-semantic-docs/scripts/design_baseline.mjs +158 -0
  292. package/skills/a2h-module-semantic-docs/test/test_design_baseline.mjs +128 -0
  293. package/skills/a2h-page-specgen/SKILL.md +36 -5
  294. package/skills/a2h-page-specgen/references/behavior-ledger.md +88 -21
  295. package/skills/a2h-page-specgen/references/evidence.md +2 -1
  296. package/skills/a2h-page-specgen/references/execution-model.md +13 -5
  297. package/skills/a2h-page-specgen/references/gates.md +33 -7
  298. package/skills/a2h-page-specgen/references/scenario-authoring.md +67 -13
  299. package/skills/a2h-page-specgen/references/spec-example.md +166 -32
  300. package/skills/a2h-page-specgen/references/spec-template.md +8 -5
  301. package/skills/a2h-page-specgen/scripts/behavior-audit.mjs +40 -2
  302. package/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +241 -22
  303. package/skills/a2h-page-specgen/scripts/behavior-model.mjs +29 -2
  304. package/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +35 -2
  305. package/skills/a2h-page-specgen/scripts/contract-calls.mjs +715 -0
  306. package/skills/a2h-page-specgen/scripts/finalize.mjs +55 -2
  307. package/skills/a2h-page-specgen/scripts/footprint.mjs +129 -2
  308. package/skills/a2h-page-specgen/scripts/gate.mjs +20 -11
  309. package/skills/a2h-page-specgen/scripts/lib/contracts.mjs +56 -3
  310. package/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +27 -0
  311. package/skills/a2h-page-specgen/scripts/lib/hg.mjs +114 -5
  312. package/skills/a2h-page-specgen/scripts/lib/ledger.mjs +20 -3
  313. package/skills/a2h-page-specgen/scripts/operation-evidence.mjs +270 -29
  314. package/skills/a2h-page-specgen/scripts/prepare.mjs +25 -14
  315. package/skills/a2h-page-specgen/scripts/report.mjs +26 -5
  316. package/skills/a2h-page-specgen/scripts/submission.mjs +69 -2
  317. package/skills/a2h-page-specgen/scripts/submit.mjs +105 -4
  318. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +110 -18
  319. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +97 -12
  320. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +110 -18
  321. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +97 -12
  322. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +224 -224
  323. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +1 -1
  324. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +2 -2
  325. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +110 -18
  326. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +97 -12
  327. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +110 -18
  328. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +97 -12
  329. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +153 -3
  330. package/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +529 -1
  331. package/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +27 -0
  332. package/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +158 -0
  333. package/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +11 -13
  334. package/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +97 -0
  335. package/skills/a2h-page-specgen/scripts/test/contract-calls.test.mjs +737 -0
  336. package/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +82 -3
  337. package/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +24 -0
  338. package/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +11 -0
  339. package/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +6 -2
  340. package/skills/a2h-page-specgen/scripts/test/gate.test.mjs +94 -1
  341. package/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +32 -0
  342. package/skills/a2h-page-specgen/scripts/test/hg.test.mjs +14 -0
  343. package/skills/a2h-page-specgen/scripts/test/ledger.test.mjs +49 -1
  344. package/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +6 -1
  345. package/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +12 -4
  346. package/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +1 -1
  347. package/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +1 -0
  348. package/skills/a2h-page-specgen/scripts/test/report.test.mjs +80 -1
  349. package/skills/a2h-page-specgen/scripts/test/submit.test.mjs +159 -27
  350. package/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +23 -0
  351. package/skills/a2h-page-specgen/scripts/waker.mjs +8 -1
  352. package/skills/a2h-resource-convert/SKILL.md +1 -1
  353. package/skills/a2h-resource-convert/data/framework-strings/NOTICE +10 -0
  354. package/skills/a2h-resource-convert/data/framework-strings/manifest.json +90 -0
  355. package/skills/a2h-resource-convert/data/framework-strings/strings.json +382 -0
  356. package/skills/a2h-resource-convert/references/conversion-rules.md +7 -1
  357. package/skills/a2h-resource-convert/references/lottie-conversion-rules.md +2 -2
  358. package/skills/a2h-resource-convert/references/step5-reference-resolution.md +16 -0
  359. package/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +124 -8
  360. package/skills/a2h-resource-convert/scripts/sync-framework-strings.mjs +147 -0
  361. package/skills/a2h-resource-convert/scripts/tests/framework_strings.test.mjs +131 -0
  362. package/skills/a2h-spec-design-pipeline/SKILL.md +14 -11
  363. package/skills/a2h-spec-design-pipeline/references/coding-loop.md +38 -10
  364. package/skills/a2h-spec-design-pipeline/references/execution-model.md +3 -0
  365. package/skills/a2h-spec-design-pipeline/references/final-report-template.md +6 -3
  366. package/skills/a2h-spec-design-pipeline/references/initialization.md +2 -2
  367. package/skills/a2h-spec-design-pipeline/references/post-loop.md +2 -2
  368. package/skills/a2h-spec-design-pipeline/references/reply-recovery.md +172 -0
  369. package/skills/a2h-spec-design-pipeline/references/review-loop.md +2 -2
  370. package/skills/a2h-spec-design-pipeline/references/scripts.md +4 -3
  371. package/skills/a2h-spec-design-pipeline/references/shared-layer.md +24 -19
  372. package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +7 -1
  373. package/skills/a2h-spec-design-pipeline/references/static-defect-gate.md +12 -5
  374. package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleMeta.json +5 -0
  375. package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleSet.json +4 -0
  376. package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/README.md +27 -3
  377. package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-param-contract.json +46 -1
  378. package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-permission-map.json +2511 -295
  379. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-cn.md +27 -72
  380. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-en.md +39 -83
  381. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-cn.md +132 -101
  382. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-en.md +158 -115
  383. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-cn.md +60 -93
  384. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-en.md +73 -100
  385. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/route-page-side-effect-import-cn.md +52 -0
  386. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/route-page-side-effect-import-en.md +59 -0
  387. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ApiPermissionDeclaredCheck.js +57 -8
  388. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ArkUIRuntimePitfallCheck.js +475 -18
  389. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/PlatformApiContractCheck.js +472 -4
  390. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/RoutePageSideEffectImportCheck.js +570 -0
  391. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/arkui/RouteParamCarrierSubCheck.js +1053 -0
  392. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/sql/SqlIdentifierAnalysis.js +427 -0
  393. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/index.js +7 -1
  394. package/skills/a2h-spec-design-pipeline/rules/migration-rules/package.json +1 -1
  395. package/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +1 -1
  396. package/skills/a2h-spec-design-pipeline/scripts/settle.ts +785 -0
  397. package/skills/a2h-spec-design-pipeline/scripts/test_api_permission_declared.ts +286 -0
  398. package/skills/a2h-spec-design-pipeline/scripts/test_arkui_runtime_pitfall.ts +166 -2
  399. package/skills/a2h-spec-design-pipeline/scripts/test_docs_refresh_contract.ts +40 -0
  400. package/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +2 -0
  401. package/skills/a2h-spec-design-pipeline/scripts/test_platform_api_contract.ts +350 -7
  402. package/skills/a2h-spec-design-pipeline/scripts/test_route_page_side_effect_import.ts +185 -0
  403. package/skills/a2h-spec-design-pipeline/scripts/test_route_param_carrier.ts +341 -0
  404. package/skills/a2h-spec-design-pipeline/scripts/test_settle.ts +593 -0
  405. package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_docs.ts +92 -1
  406. package/skills/a2h-spec-design-pipeline/scripts/test_sql_identifier_analysis.ts +137 -0
  407. package/skills/a2h-spec-generate/references/input-formats.md +1 -1
  408. package/skills/a2h-utg-explorer/SKILL.md +11 -5
  409. package/skills/a2h-utg-explorer/references/architecture.md +37 -19
  410. package/skills/a2h-utg-explorer/scripts/audit.mjs +6 -2
  411. package/skills/a2h-utg-explorer/scripts/close_phases.mjs +8 -5
  412. package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +95 -19
  413. package/skills/a2h-utg-explorer/scripts/d_prereqs.mjs +192 -4
  414. package/skills/a2h-utg-explorer/scripts/final_utg.mjs +21 -0
  415. package/skills/a2h-utg-explorer/scripts/panel_routes.mjs +1 -1
  416. package/skills/a2h-utg-explorer/scripts/plan.mjs +16 -1
  417. package/skills/a2h-utg-explorer/scripts/predicates.mjs +270 -0
  418. package/skills/a2h-utg-explorer/scripts/promote_dynamic.mjs +2 -0
  419. package/skills/a2h-utg-explorer/scripts/recover.mjs +4 -3
  420. package/skills/a2h-utg-explorer/scripts/recover_d.mjs +67 -8
  421. package/skills/a2h-utg-explorer/scripts/rejudge.mjs +4 -3
  422. package/skills/a2h-utg-explorer/scripts/report.mjs +32 -2
  423. package/skills/a2h-utg-explorer/scripts/run_cycle.mjs +103 -36
  424. package/skills/a2h-utg-explorer/scripts/run_device.mjs +3 -8
  425. package/skills/a2h-utg-explorer/scripts/schedule_states.mjs +189 -0
  426. package/skills/a2h-utg-explorer/scripts/tests/calendar_round_fixes.test.mjs +9 -0
  427. package/skills/a2h-utg-explorer/scripts/tests/coverage_rules.test.mjs +11 -0
  428. package/skills/a2h-utg-explorer/scripts/tests/d_prereqs.test.mjs +31 -2
  429. package/skills/a2h-utg-explorer/scripts/tests/device_lock_retry.test.mjs +1 -1
  430. package/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +32 -0
  431. package/skills/a2h-utg-explorer/scripts/tests/dialog_own_layout.test.mjs +40 -0
  432. package/skills/a2h-utg-explorer/scripts/tests/explorer_review_fixes.test.mjs +4 -1
  433. package/skills/a2h-utg-explorer/scripts/tests/hybrid_route.test.mjs +6 -28
  434. package/skills/a2h-utg-explorer/scripts/tests/in_route_surface.test.mjs +125 -0
  435. package/skills/a2h-utg-explorer/scripts/tests/list_probe_target_wait.test.mjs +86 -0
  436. package/skills/a2h-utg-explorer/scripts/tests/multi_host.test.mjs +167 -0
  437. package/skills/a2h-utg-explorer/scripts/tests/nested_list.test.mjs +58 -0
  438. package/skills/a2h-utg-explorer/scripts/tests/overlay_opener.test.mjs +100 -0
  439. package/skills/a2h-utg-explorer/scripts/tests/pipeline.test.mjs +8 -1
  440. package/skills/a2h-utg-explorer/scripts/tests/pr169_review_fixes.test.mjs +1 -0
  441. package/skills/a2h-utg-explorer/scripts/tests/pr191_review_fixes.test.mjs +2 -31
  442. package/skills/a2h-utg-explorer/scripts/tests/review_fixes.test.mjs +1 -1
  443. package/skills/a2h-utg-explorer/scripts/tests/run_cycle.test.mjs +56 -7
  444. package/skills/a2h-utg-explorer/scripts/tests/snapshot_integrity.test.mjs +117 -6
  445. package/skills/a2h-utg-explorer/scripts/tests/state_inventory.test.mjs +414 -0
  446. package/skills/a2h-utg-explorer/scripts/tests/tree_unreliable.test.mjs +197 -0
  447. package/skills/a2h-utg-explorer/scripts/utg_explorer/adapters.mjs +196 -30
  448. package/skills/a2h-utg-explorer/scripts/utg_explorer/hosts.mjs +146 -0
  449. package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +63 -2
  450. package/skills/a2h-utg-explorer/scripts/utg_explorer/states.mjs +286 -0
  451. package/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +197 -19
  452. package/skills/a2h-utg-static/SKILL.md +3 -3
  453. package/skills/a2h-utg-static/references/extractors.md +7 -0
  454. package/skills/a2h-utg-static/references/ui-elements-static-utg-schema.md +4 -3
  455. package/skills/a2h-utg-static/scripts/click_paths.mjs +1 -1
  456. package/skills/a2h-utg-static/scripts/compose_overlay.mjs +642 -22
  457. package/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +25 -0
  458. package/skills/a2h-utg-static/scripts/tests/test_in_route_surface.mjs +123 -0
  459. package/skills/a2h-utg-static/scripts/tests/test_overlay_host_effects.mjs +239 -0
  460. package/skills/a2h-utg-static/scripts/tests/test_shared_host_depths.mjs +48 -0
  461. package/skills/a2h-utg-static/scripts/utg_html.mjs +2 -0
  462. package/skills/a2h-utg-static/tools/convert_static_utg_to_ui_elements.ts +1 -0
  463. package/i18n/skills/a2h-app-migrate/references/specs.example.json +0 -19
  464. package/i18n/skills/a2h-batch-ui-align/scripts/databinding_analyzer_design.md +0 -79
  465. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +0 -47
  466. package/resource/convert_pipeline_process.svg +0 -114
  467. package/resource/project_architecture.svg +0 -120
  468. package/resource/set_environment.png +0 -0
  469. package/resource/set_multimodel.png +0 -0
  470. package/skills/a2h-app-migrate/references/specs.example.json +0 -19
  471. package/skills/a2h-batch-ui-align/scripts/databinding_analyzer_design.md +0 -79
  472. package/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +0 -47
@@ -11,6 +11,7 @@ import { canonicalDraftPath, createRecoveryBatch, readDraftWithHash, scanAttempt
11
11
  import {
12
12
  commitSubmission,
13
13
  loadCanonicalDrafts,
14
+ precheckDrafts,
14
15
  readSubmissionSnapshot,
15
16
  submitDrafts,
16
17
  validateSubmission,
@@ -384,22 +385,65 @@ test("a retry cannot rewrite an already-published part of a partial submission",
384
385
  assert.equal(fs.readFileSync(path.join(d, "ledger.jsonl"), "utf8"), ledgerBefore);
385
386
  });
386
387
 
387
- test("different content cannot write canonical or ledger after precheck failure", () => {
388
+ test("a corrected draft submits after a precheck failure without an abandon", () => {
388
389
  const d = seededPlan(["p1"]);
389
390
  const { token } = claim(d, "g1");
390
391
  const bad = path.join(d, "bad-terminal.json");
391
392
  writeJsonAtomic(bad, { ...compliantDraft("p1", "p1"), summary: "太短" });
392
- submitDrafts(d, "g1", { mode: "explicit", token, drafts: [{ path: bad }] });
393
- const canonical = canonicalDraftPath(d, 1, "p1");
394
- const canonicalBefore = fs.existsSync(canonical) ? fs.readFileSync(canonical, "utf8") : null;
395
- const ledgerBefore = fs.readFileSync(path.join(d, "ledger.jsonl"), "utf8");
396
- const changed = writeInputDraft(d, "good-after-failed.json", "p1", "p1");
393
+ const failed = submitDrafts(d, "g1", { mode: "explicit", token, drafts: [{ path: bad }] });
394
+ assert.equal(failed.precheckFailed, true);
395
+ assert.equal(failed.retryable, true);
396
+ assert.equal(fold(d).groups.get("g1").state, "live");
397
+ assert.equal(fs.existsSync(canonicalDraftPath(d, 1, "p1")), false);
397
398
 
398
- const retry = submitDrafts(d, "g1", { mode: "explicit", token, drafts: [{ path: changed }] });
399
+ const good = writeInputDraft(d, "good-after-precheck.json", "p1", "p1");
400
+ const retry = submitDrafts(d, "g1", { mode: "explicit", token, drafts: [{ path: good }] });
399
401
 
400
- assert.deepEqual(retry.accepted, []);
401
- assert.equal(fs.existsSync(canonical) ? fs.readFileSync(canonical, "utf8") : null, canonicalBefore);
402
- assert.equal(fs.readFileSync(path.join(d, "ledger.jsonl"), "utf8"), ledgerBefore);
402
+ assert.deepEqual(retry.accepted, ["p1"]);
403
+ assert.equal(fold(d).groups.get("g1").state, "submitted");
404
+ assert.equal(fs.existsSync(canonicalDraftPath(d, 1, "p1")), true);
405
+ });
406
+
407
+ test("a dry-run precheck reports failures without writing the ledger", () => {
408
+ const d = seededPlan(["p1"]);
409
+ const { token } = claim(d, "g1");
410
+ const bad = path.join(d, "dry-bad.json");
411
+ writeJsonAtomic(bad, { ...compliantDraft("p1", "p1"), summary: "太短" });
412
+ const before = fs.readFileSync(path.join(d, "ledger.jsonl"), "utf8");
413
+
414
+ const result = precheckDrafts(d, "g1", { token, drafts: [{ path: bad }] });
415
+
416
+ assert.equal(result.ok, false);
417
+ assert.equal(result.attempt, 1);
418
+ assert.ok(result.failures.some(failure => failure.gate === "G6"));
419
+ assert.equal(fs.readFileSync(path.join(d, "ledger.jsonl"), "utf8"), before);
420
+ assert.equal(fold(d).groups.get("g1").state, "claimed");
421
+ });
422
+
423
+ test("a dry-run precheck passes a compliant draft without writing the ledger", () => {
424
+ const d = seededPlan(["p1"]);
425
+ const { token } = claim(d, "g1");
426
+ const good = writeInputDraft(d, "dry-good.json", "p1", "p1");
427
+ const before = fs.readFileSync(path.join(d, "ledger.jsonl"), "utf8");
428
+
429
+ const result = precheckDrafts(d, "g1", { token, drafts: [{ path: good }] });
430
+
431
+ assert.equal(result.ok, true);
432
+ assert.deepEqual(result.failures, []);
433
+ assert.equal(fs.readFileSync(path.join(d, "ledger.jsonl"), "utf8"), before);
434
+ });
435
+
436
+ test("a dry-run precheck allows a valid partial group just like submit", () => {
437
+ const d = seededPlan(["p1", "p2"]);
438
+ const { token } = claim(d, "g1");
439
+ const partial = writeInputDraft(d, "dry-partial.json", "p1", "p1");
440
+ const before = fs.readFileSync(path.join(d, "ledger.jsonl"), "utf8");
441
+
442
+ const result = precheckDrafts(d, "g1", { token, drafts: [{ path: partial }] });
443
+
444
+ assert.equal(result.ok, true);
445
+ assert.equal(result.complete, false);
446
+ assert.equal(fs.readFileSync(path.join(d, "ledger.jsonl"), "utf8"), before);
403
447
  });
404
448
 
405
449
  test("split page parts use distinct canonical stems and complete only together", () => {
@@ -442,7 +486,7 @@ test("one bad input does not fail a valid partial submission", () => {
442
486
  assert.equal(events(d).some(e => e.ev === "abandon"), false);
443
487
  });
444
488
 
445
- test("real content failure abandons precheck instead of blaming a missing sibling", () => {
489
+ test("a content precheck failure keeps the attempt alive and records a budget event", () => {
446
490
  const d = seededPlan(["p1", "p2"]);
447
491
  const { token } = claim(d, "g1");
448
492
  const badDraft = compliantDraft("p1", "p1");
@@ -450,18 +494,47 @@ test("real content failure abandons precheck instead of blaming a missing siblin
450
494
  const bad = path.join(d, "bad-content.json");
451
495
  writeJsonAtomic(bad, badDraft);
452
496
 
453
- submitDrafts(d, "g1", { mode: "explicit", token, drafts: [{ path: bad }] });
497
+ const result = submitDrafts(d, "g1", { mode: "explicit", token, drafts: [{ path: bad }] });
454
498
 
499
+ assert.equal(result.precheckFailed, true);
500
+ assert.equal(result.retryable, true);
501
+ assert.equal(result.precheckFailures, 1);
455
502
  const ledger = events(d);
456
503
  assert.equal(ledger.some(e => e.ev === "submit"), false);
457
- const abandons = ledger.filter(e => e.ev === "abandon");
504
+ assert.equal(ledger.some(e => e.ev === "abandon"), false);
505
+ assert.equal(ledger.filter(e => e.ev === "precheck-failed").length, 1);
506
+ assert.match(ledger.find(e => e.ev === "precheck-failed").failure_reason, /G6/);
507
+ const group = fold(d).groups.get("g1");
508
+ assert.equal(group.state, "live");
509
+ assert.equal(group.precheckFailures, 1);
510
+ });
511
+
512
+ test("the attempt abandons only after the precheck failure budget is exhausted", () => {
513
+ const d = seededPlan(["p1"]);
514
+ const { token } = claim(d, "g1");
515
+ const bad = path.join(d, "bad-budget.json");
516
+ writeJsonAtomic(bad, { ...compliantDraft("p1", "p1"), summary: "太短" });
517
+
518
+ for (let i = 1; i <= 3; i += 1) {
519
+ const result = submitDrafts(d, "g1", { mode: "explicit", token, drafts: [{ path: bad }] });
520
+ assert.equal(result.precheckFailures, i);
521
+ assert.equal(result.retryable, true);
522
+ assert.equal(fold(d).groups.get("g1").state, "live");
523
+ }
524
+ assert.equal(events(d).filter(e => e.ev === "precheck-failed").length, 3);
525
+ assert.equal(events(d).some(e => e.ev === "abandon"), false);
526
+
527
+ const exhausted = submitDrafts(d, "g1", { mode: "explicit", token, drafts: [{ path: bad }] });
528
+ assert.equal(exhausted.precheckFailed, true);
529
+ assert.equal(exhausted.exhausted, true);
530
+ const abandons = events(d).filter(e => e.ev === "abandon");
458
531
  assert.equal(abandons.length, 1);
459
532
  assert.equal(abandons[0].reason, "precheck-failed");
460
533
  assert.match(abandons[0].failure_reason, /G6/);
461
534
  assert.equal(fold(d).groups.get("g1").state, "failed");
462
535
  });
463
536
 
464
- test("the submit CLI exits nonzero and reports precheck failure without a success message", () => {
537
+ test("the submit CLI reports a precheck failure with the remaining budget and no abandon", () => {
465
538
  const d = seededPlan(["p1"]);
466
539
  const { token } = claim(d, "g1");
467
540
  const bad = path.join(d, "cli-bad-content.json");
@@ -475,11 +548,67 @@ test("the submit CLI exits nonzero and reports precheck failure without a succes
475
548
  assert.notEqual(result.status, 0);
476
549
  assert.doesNotMatch(`${result.stdout}\n${result.stderr}`, /Submitted:/);
477
550
  assert.match(`${result.stdout}\n${result.stderr}`, /precheck|G6|summary/i);
551
+ assert.match(`${result.stdout}\n${result.stderr}`, /1\/3/);
552
+ assert.equal(fold(d).groups.get("g1").state, "live");
553
+ assert.equal(events(d).filter(event => event.ev === "precheck-failed").length, 1);
554
+ assert.equal(events(d).some(event => event.ev === "abandon"), false);
555
+ });
556
+
557
+ test("the submit CLI never reports success for an abandoned attempt", () => {
558
+ const d = seededPlan(["p1"]);
559
+ const { token } = claim(d, "g1");
560
+ appendEvent(d, { ev: "abandon", group: "g1", attempt: 1, reason: "dispatch-error" });
561
+ const input = writeInputDraft(d, "cli-terminal.json", "p1", "p1");
562
+ const cli = fileURLToPath(new URL("../submit.mjs", import.meta.url));
563
+ const before = events(d).filter(event => event.ev === "submit").length;
564
+
565
+ const result = spawnSync(process.execPath, [
566
+ cli, d, "g1", "--token", token, "--draft", input,
567
+ ], { encoding: "utf8", timeout: 5000 });
568
+
569
+ const output = `${result.stdout}\n${result.stderr}`;
570
+ assert.notEqual(result.status, 0, output);
571
+ assert.doesNotMatch(output, /Submitted:/);
572
+ assert.equal(events(d).filter(event => event.ev === "submit").length, before);
478
573
  assert.equal(fold(d).groups.get("g1").state, "failed");
479
- const abandons = events(d).filter(event => event.ev === "abandon");
480
- assert.equal(abandons.length, 1);
481
- assert.equal(abandons[0].reason, "precheck-failed");
482
- assert.match(abandons[0].failure_reason, /G6/);
574
+ });
575
+
576
+ test("the submit CLI dry-run reports gate failures without touching the ledger", () => {
577
+ const d = seededPlan(["p1"]);
578
+ const { token } = claim(d, "g1");
579
+ const bad = path.join(d, "cli-dry-run.json");
580
+ writeJsonAtomic(bad, { ...compliantDraft("p1", "p1"), summary: "太短" });
581
+ const cli = fileURLToPath(new URL("../submit.mjs", import.meta.url));
582
+ const before = fs.readFileSync(path.join(d, "ledger.jsonl"), "utf8");
583
+
584
+ const result = spawnSync(process.execPath, [
585
+ cli, d, "g1", "--token", token, "--dry-run", "--draft", bad,
586
+ ], { encoding: "utf8", timeout: 5000 });
587
+
588
+ assert.notEqual(result.status, 0);
589
+ assert.match(`${result.stdout}\n${result.stderr}`, /Precheck failed/i);
590
+ assert.match(`${result.stdout}\n${result.stderr}`, /G6/);
591
+ assert.equal(fs.readFileSync(path.join(d, "ledger.jsonl"), "utf8"), before);
592
+ assert.equal(fold(d).groups.get("g1").state, "claimed");
593
+ });
594
+
595
+ test("a stale token explains the abandon and tells the worker to stop", () => {
596
+ const d = seededPlan(["p1"]);
597
+ const { token: staleToken } = claim(d, "g1");
598
+ appendEvent(d, { ev: "abandon", group: "g1", attempt: 1, reason: "dispatch-error" });
599
+ appendEvent(d, { ev: "retry", group: "g1", attempt: 1, force: false });
600
+ claim(d, "g1");
601
+ const input = writeInputDraft(d, "cli-stale.json", "p1", "p1");
602
+ const cli = fileURLToPath(new URL("../submit.mjs", import.meta.url));
603
+
604
+ const result = spawnSync(process.execPath, [
605
+ cli, d, "g1", "--token", staleToken, "--draft", input,
606
+ ], { encoding: "utf8", timeout: 5000 });
607
+
608
+ assert.equal(result.status, 2);
609
+ assert.match(`${result.stdout}\n${result.stderr}`, /Token mismatch/i);
610
+ assert.match(`${result.stdout}\n${result.stderr}`, /abandoned/i);
611
+ assert.match(`${result.stdout}\n${result.stderr}`, /Stop editing drafts\/attempt-1/i);
483
612
  });
484
613
 
485
614
  test("commit rejects a canonical hash change without submit or abandon", () => {
@@ -544,7 +673,7 @@ test("commit rejects an identity change before publishing", () => {
544
673
  assert.equal(fs.readFileSync(path.join(d, "ledger.jsonl"), "utf8"), before);
545
674
  });
546
675
 
547
- test("same token retry after precheck failure is terminal without more events", () => {
676
+ test("repeated identical precheck failures consume the budget without writing canonical", () => {
548
677
  const d = seededPlan(["p1"]);
549
678
  const { token } = claim(d, "g1");
550
679
  const badDraft = compliantDraft("p1", "p1");
@@ -552,14 +681,17 @@ test("same token retry after precheck failure is terminal without more events",
552
681
  const bad = path.join(d, "bad-content.json");
553
682
  writeJsonAtomic(bad, badDraft);
554
683
  submitDrafts(d, "g1", { mode: "explicit", token, drafts: [{ path: bad }] });
555
- assert.equal(fold(d).groups.get("g1").state, "failed");
556
- const before = fs.readFileSync(path.join(d, "ledger.jsonl"), "utf8");
684
+ assert.equal(fold(d).groups.get("g1").state, "live");
685
+ const before = events(d).filter(event => event.ev === "precheck-failed").length;
557
686
 
558
687
  const result = submitDrafts(d, "g1", { mode: "explicit", token, drafts: [{ path: bad }] });
559
688
 
560
- assert.deepEqual(result, { accepted: [], rejected: [], terminal: true });
561
- assert.equal(fs.readFileSync(path.join(d, "ledger.jsonl"), "utf8"), before);
562
- assert.equal(fold(d).groups.get("g1").state, "failed");
689
+ assert.equal(result.precheckFailed, true);
690
+ assert.equal(result.retryable, true);
691
+ assert.equal(result.precheckFailures, before + 1);
692
+ assert.equal(events(d).filter(event => event.ev === "precheck-failed").length, before + 1);
693
+ assert.equal(fold(d).groups.get("g1").state, "live");
694
+ assert.equal(fs.existsSync(canonicalDraftPath(d, 1, "p1")), false);
563
695
  });
564
696
 
565
697
  test("commit rejects an abandon after validation without stale events", () => {
@@ -1041,9 +1173,9 @@ test("a missing assertion link fails precheck and never submits", () => {
1041
1173
  assert.deepEqual(result.accepted, []);
1042
1174
  assert.match(result.failureReason, /G4/);
1043
1175
  assert.equal(events(d).some(event => event.ev === "submit"), false);
1044
- const abandons = events(d).filter(event => event.ev === "abandon");
1045
- assert.equal(abandons.length, 1);
1046
- assert.equal(abandons[0].reason, "precheck-failed");
1176
+ assert.equal(events(d).filter(event => event.ev === "precheck-failed").length, 1);
1177
+ assert.equal(events(d).some(event => event.ev === "abandon"), false);
1178
+ assert.equal(fold(d).groups.get("g1").state, "live");
1047
1179
  assert.equal(fs.existsSync(canonicalDraftPath(d, 1, "page:Alpha")), false);
1048
1180
  });
1049
1181
 
@@ -403,6 +403,29 @@ test("healthy empty rounds emit only relay at max(600, 2 * interval)", () => {
403
403
  assert.equal(pendingEvents(outDir).length, 1);
404
404
  });
405
405
 
406
+ test("relayCap (--max-wait) brings the relay forward for the foreground wait mode", () => {
407
+ const outDir = seededPlan(["p1"]);
408
+ let now = 0;
409
+ const result = runWaker(outDir, {
410
+ interval: 30,
411
+ poll: 1,
412
+ relayCap: 90,
413
+ now: () => now,
414
+ waitFn: (_outDir, { maxWait }) => {
415
+ now += maxWait * 1000;
416
+ return { code: 5 };
417
+ },
418
+ reconcile: current => {
419
+ writeState(current, 1);
420
+ return running();
421
+ },
422
+ });
423
+ assert.equal(result.code, 0);
424
+ assert.equal(result.event.kind, "relay");
425
+ assert.equal(now, 90_000);
426
+ assert.throws(() => runWaker(seededPlan(["p1"]), { relayCap: 0 }), /max-wait must be positive/);
427
+ });
428
+
406
429
  test("stop exits through the event protocol, blocks automatic arm, and requires manual rearm", () => {
407
430
  const outDir = seededPlan(["p1"]);
408
431
  stopWaker(outDir, PLAN_VERSION, { now: 0 });
@@ -824,6 +824,7 @@ function stateBytes(outDir) {
824
824
  export function runWaker(outDir, {
825
825
  interval = 30,
826
826
  poll = 5,
827
+ relayCap = null,
827
828
  now = defaultNow,
828
829
  sleep = realSleep,
829
830
  reconcile: reconcileFn = reconcile,
@@ -833,9 +834,14 @@ export function runWaker(outDir, {
833
834
  } = {}) {
834
835
  seconds(interval, "interval", { positive: true });
835
836
  seconds(poll, "poll", { positive: true });
837
+ if (relayCap !== null && relayCap !== undefined) seconds(relayCap, "max-wait", { positive: true });
836
838
  // N10: a healthy relay every minute woke the parent with nothing to do; deadlines and real
837
839
  // transitions already wake it, so the relay only proves the waker is alive.
838
- const relayAfter = Math.max(600, 2 * interval);
840
+ // --max-wait caps that relay for the foreground wait mode: the orchestrator runs the waker as a
841
+ // blocking shell call, which must return before the host's per-call shell timeout.
842
+ const relayAfter = relayCap === null || relayCap === undefined
843
+ ? Math.max(600, 2 * interval)
844
+ : relayCap;
839
845
  const lockTtl = Math.max(90, 3 * interval, 6 * poll);
840
846
  let owner = null;
841
847
 
@@ -1279,6 +1285,7 @@ export function runWakerCli(argv = process.argv.slice(2)) {
1279
1285
  } else {
1280
1286
  if (flag === "--interval") options.interval = Number(value);
1281
1287
  else if (flag === "--poll") options.poll = Number(value);
1288
+ else if (flag === "--max-wait") options.relayCap = Number(value);
1282
1289
  else throw new Error(`unknown option: ${flag}`);
1283
1290
  }
1284
1291
  }
@@ -247,7 +247,7 @@ The checks are:
247
247
  b. For any referenced but missing media resource, **create a placeholder SVG** file: a simple 24x24 SVG with a colored rectangle and the resource name as text, placed in `base/media/`. This ensures the project compiles.
248
248
  c. Log all placeholder-created resources prominently in the conversion report under a dedicated "Placeholder Resources Created" section, so the developer knows these need to be replaced with real assets
249
249
  d. Also scan for `$r('app.string.xxx')`, `$r('app.color.xxx')`, `$r('app.float.xxx')` references and verify those exist in the corresponding element JSON files
250
- e. For any `lottie.loadAnimation({ path: 'lottie/xxx.json' })` (or equivalent `@ohos/lottie` call) found in `.ets` files, verify that `xxx.json` exists at `rawfile/lottie/xxx.json`. If missing, do NOT create a placeholder — Lottie animations have no meaningful placeholder — instead log it as an unresolved Lottie reference in the report so the developer can drop in the correct JSON or fix the path.
250
+ e. For any Lottie JSON reference found in `.ets` files (`getRawFileContentSync('lottie/xxx.json')` feeding `animationData`, or a legacy `lottie.loadAnimation({ path: 'lottie/xxx.json' })`), verify that `xxx.json` exists at `rawfile/lottie/xxx.json`. If missing, do NOT create a placeholder — Lottie animations have no meaningful placeholder — instead log it as an unresolved Lottie reference in the report so the developer can drop in the correct JSON or fix the path.
251
251
  9. Before finishing verification, ensure every Android resource inventory row and every mapping row has the required metadata fields from `references/resource-mapping-rules.md`. If some fields cannot be proven, populate them with the rule-defined fallback labels (`Unknown`, `Common`, `Global`, `N/A`) rather than leaving them blank.
252
252
  10. **Vector content fidelity (static, required)**: steps 1-9 above all check *existence* — that a file or key is present. **A file that exists and parses can still be visually wrong**, and existence checks cannot detect a dropped `clip-path` or a `fill` injected onto a stroke-only path. Run the bundled checker:
253
253
 
@@ -0,0 +1,10 @@
1
+ Framework strings bundled with a2h-resource-convert
2
+
3
+ The JSON files under strings/ carry localized values of Android framework resources
4
+ (android.R.string.*) used by framework widgets (dialogs, preference dialogs, action bars,
5
+ text selection). Those values originate from the Android Open Source Project
6
+ (frameworks/base/core/res/res/values*), licensed under the Apache License, Version 2.0:
7
+ https://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Generated by scripts/sync-framework-strings.mjs. Do not copy values out of a vendor SDK
10
+ build; regenerate from the AOSP tag recorded in manifest.json (aospTag).
@@ -0,0 +1,90 @@
1
+ {
2
+ "source": "Android framework resource table (aapt2 dump resources)",
3
+ "aospTag": null,
4
+ "apiLevel": "36",
5
+ "note": "Values are Android Open Source Project strings (Apache-2.0). Regenerate from an AOSP tag before redistribution and record it in aospTag.",
6
+ "languages": [
7
+ "en",
8
+ "ru",
9
+ "zh_CN",
10
+ "zh_TW",
11
+ "ja",
12
+ "ko",
13
+ "fr",
14
+ "de",
15
+ "es",
16
+ "pt",
17
+ "it",
18
+ "ar",
19
+ "hi",
20
+ "th",
21
+ "vi",
22
+ "id",
23
+ "tr",
24
+ "nl",
25
+ "pl",
26
+ "uk"
27
+ ],
28
+ "keys": [
29
+ "ok",
30
+ "cancel",
31
+ "yes",
32
+ "no",
33
+ "copy",
34
+ "cut",
35
+ "paste",
36
+ "selectAll",
37
+ "search_go",
38
+ "delete",
39
+ "undo",
40
+ "redo",
41
+ "action_menu_overflow_description",
42
+ "toolbar_collapse_description",
43
+ "capital_on",
44
+ "capital_off",
45
+ "unknownName"
46
+ ],
47
+ "requestedKeys": [
48
+ "ok",
49
+ "cancel",
50
+ "yes",
51
+ "no",
52
+ "copy",
53
+ "cut",
54
+ "paste",
55
+ "selectAll",
56
+ "search_go",
57
+ "delete",
58
+ "undo",
59
+ "redo",
60
+ "action_menu_overflow_description",
61
+ "toolbar_collapse_description",
62
+ "capital_on",
63
+ "capital_off",
64
+ "unknownName"
65
+ ],
66
+ "missingByLanguage": {
67
+ "en": 0,
68
+ "ru": 0,
69
+ "zh_CN": 0,
70
+ "zh_TW": 0,
71
+ "ja": 0,
72
+ "ko": 0,
73
+ "fr": 0,
74
+ "de": 0,
75
+ "es": 0,
76
+ "pt": 0,
77
+ "it": 0,
78
+ "ar": 0,
79
+ "hi": 0,
80
+ "th": 0,
81
+ "vi": 0,
82
+ "id": 0,
83
+ "tr": 0,
84
+ "nl": 0,
85
+ "pl": 0,
86
+ "uk": 0
87
+ },
88
+ "generatedAt": "2026-11-30",
89
+ "sha256": "59d368edcec7669e5244b8e1ce4efc6e840a4976569f6bf0a48663c640b4beab"
90
+ }