@buaa_smat/hometrans 26.0.7 → 26.0.8-devecocli.1

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 (181) hide show
  1. package/agents/a2h-executor.md +37 -0
  2. package/devecocli-plugin/common.ts +2370 -0
  3. package/devecocli-plugin/content-resolver.ts +363 -0
  4. package/devecocli-plugin/install.ts +72 -0
  5. package/devecocli-plugin/uninstall.ts +26 -0
  6. package/devecocli-plugin/update.ts +77 -0
  7. package/i18n/platforms/codebuddy/skills/a2h-app-migrate/SKILL.unique.md +2 -2
  8. package/i18n/platforms/deveco/skills/a2h-app-migrate/SKILL.unique.md +1 -1
  9. package/i18n/platforms/opencode/skills/a2h-app-migrate/SKILL.unique.md +13 -6
  10. package/i18n/skills/a2h-app-migrate/SKILL.md +2 -2
  11. package/i18n/skills/a2h-app-migrate/references/workflow.yaml +27 -4
  12. package/i18n/skills/a2h-app-migrate/scripts/opencode_depth.mjs +418 -0
  13. package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -0
  14. package/i18n/skills/a2h-batch-ui-align/SKILL.md +7 -7
  15. package/i18n/skills/a2h-batch-ui-align/references/cards/alignment.md +1 -1
  16. package/i18n/skills/a2h-batch-ui-align/references/cards/state.md +20 -2
  17. package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +2 -2
  18. package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +3 -3
  19. package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +3 -1
  20. package/i18n/skills/a2h-batch-ui-align/references/incremental-scope.md +2 -2
  21. package/i18n/skills/a2h-batch-ui-align/references/step3-capture.md +10 -6
  22. package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +13 -9
  23. package/i18n/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +59 -7
  24. package/i18n/skills/a2h-batch-ui-align/scripts/group_pack.mjs +3 -0
  25. package/i18n/skills/a2h-batch-ui-align/scripts/interactions.mjs +186 -0
  26. package/i18n/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +33 -7
  27. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +83 -22
  28. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +39 -5
  29. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_scroll_padding_raster.test.mjs +25 -1
  30. package/i18n/skills/a2h-page-specgen/SKILL.md +1 -1
  31. package/i18n/skills/a2h-page-specgen/references/gates.md +3 -1
  32. package/i18n/skills/a2h-page-specgen/references/scenario-authoring.md +11 -11
  33. package/i18n/skills/a2h-page-specgen/references/spec-template.md +3 -3
  34. package/i18n/skills/a2h-page-specgen/scripts/contract-calls.mjs +40 -3
  35. package/i18n/skills/a2h-page-specgen/scripts/entry-evidence.mjs +73 -5
  36. package/i18n/skills/a2h-page-specgen/scripts/gate.mjs +144 -0
  37. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +11 -11
  38. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +11 -11
  39. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +11 -11
  40. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +11 -11
  41. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +10 -10
  42. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +1 -1
  43. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +11 -11
  44. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +11 -11
  45. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +11 -11
  46. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +11 -11
  47. package/i18n/skills/a2h-page-specgen/scripts/test/contract-calls.test.mjs +45 -1
  48. package/i18n/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +100 -0
  49. package/i18n/skills/a2h-page-specgen/scripts/test/gate.test.mjs +132 -3
  50. package/i18n/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +36 -1
  51. package/i18n/skills/a2h-spec-design-pipeline/SKILL.md +1 -1
  52. package/i18n/skills/a2h-spec-design-pipeline/references/coding-loop.md +16 -0
  53. package/i18n/skills/a2h-utg-static/SKILL.md +2 -0
  54. package/index.js +1741 -0
  55. package/package.json +8 -8
  56. package/platforms/atomcode/agents/a2h-executor.frontmatter.md +6 -0
  57. package/platforms/codebuddy/agents/a2h-executor.frontmatter.md +5 -0
  58. package/platforms/codebuddy/skills/a2h-app-migrate/SKILL.unique.md +2 -2
  59. package/platforms/deveco/agents/a2h-executor.frontmatter.md +7 -0
  60. package/platforms/deveco/agents/build-fixer.frontmatter.md +0 -2
  61. package/platforms/deveco/agents/code-reviewer.frontmatter.md +0 -2
  62. package/platforms/deveco/agents/model-render-worker.frontmatter.md +0 -2
  63. package/platforms/deveco/agents/model-worker.frontmatter.md +0 -2
  64. package/platforms/deveco/agents/specgen-worker.frontmatter.md +0 -2
  65. package/platforms/deveco/skills/a2h-app-migrate/SKILL.unique.md +1 -1
  66. package/platforms/opencode/agents/a2h-executor.frontmatter.md +7 -0
  67. package/platforms/opencode/agents/build-fixer.frontmatter.md +0 -2
  68. package/platforms/opencode/agents/code-reviewer.frontmatter.md +0 -2
  69. package/platforms/opencode/agents/model-render-worker.frontmatter.md +0 -2
  70. package/platforms/opencode/agents/model-worker.frontmatter.md +0 -2
  71. package/platforms/opencode/agents/specgen-worker.frontmatter.md +0 -2
  72. package/platforms/opencode/skills/a2h-app-migrate/SKILL.unique.md +13 -6
  73. package/plugin.jsonc +12 -0
  74. package/skills/a2h-app-migrate/SKILL.md +29 -3
  75. package/skills/a2h-app-migrate/references/host-rules.md +33 -0
  76. package/skills/a2h-app-migrate/references/workflow.yaml +24 -4
  77. package/skills/a2h-app-migrate/scripts/opencode_depth.mjs +418 -0
  78. package/skills/a2h-app-migrate/test/test_executor_header_sync.mjs +78 -0
  79. package/skills/a2h-app-migrate/test/test_opencode_depth.mjs +312 -0
  80. package/skills/a2h-app-migrate/tools/dag.mjs +267 -0
  81. package/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -0
  82. package/skills/a2h-batch-ui-align/SKILL.md +7 -7
  83. package/skills/a2h-batch-ui-align/references/cards/alignment.md +1 -1
  84. package/skills/a2h-batch-ui-align/references/cards/state.md +20 -2
  85. package/skills/a2h-batch-ui-align/references/cards/widgets.md +2 -2
  86. package/skills/a2h-batch-ui-align/references/checker-rules.md +3 -3
  87. package/skills/a2h-batch-ui-align/references/conversion-procedure.md +3 -1
  88. package/skills/a2h-batch-ui-align/references/host-dispatch.md +5 -5
  89. package/skills/a2h-batch-ui-align/references/incremental-scope.md +2 -2
  90. package/skills/a2h-batch-ui-align/references/step3-capture.md +10 -6
  91. package/skills/a2h-batch-ui-align/references/step5-convert.md +13 -9
  92. package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +59 -7
  93. package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +3 -0
  94. package/skills/a2h-batch-ui-align/scripts/group_pass.mjs +3 -2
  95. package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +139 -23
  96. package/skills/a2h-batch-ui-align/scripts/host_env.mjs +32 -8
  97. package/skills/a2h-batch-ui-align/scripts/interactions.mjs +186 -0
  98. package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +33 -7
  99. package/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +83 -22
  100. package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +39 -5
  101. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_hit_test.test.mjs +82 -0
  102. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_scroll_padding_raster.test.mjs +25 -1
  103. package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +184 -2
  104. package/skills/a2h-batch-ui-align/scripts/tests/host_env.test.mjs +33 -0
  105. package/skills/a2h-batch-ui-align/scripts/tests/interactions.test.mjs +258 -0
  106. package/skills/a2h-page-specgen/SKILL.md +1 -1
  107. package/skills/a2h-page-specgen/references/evidence.md +15 -0
  108. package/skills/a2h-page-specgen/references/gates.md +3 -1
  109. package/skills/a2h-page-specgen/references/scenario-authoring.md +10 -10
  110. package/skills/a2h-page-specgen/references/spec-template.md +2 -2
  111. package/skills/a2h-page-specgen/scripts/contract-calls.mjs +40 -3
  112. package/skills/a2h-page-specgen/scripts/entry-evidence.mjs +73 -5
  113. package/skills/a2h-page-specgen/scripts/gate.mjs +141 -0
  114. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +10 -10
  115. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +10 -10
  116. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +10 -10
  117. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +10 -10
  118. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +10 -10
  119. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +1 -1
  120. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +10 -10
  121. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +10 -10
  122. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +10 -10
  123. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +10 -10
  124. package/skills/a2h-page-specgen/scripts/test/contract-calls.test.mjs +45 -1
  125. package/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +100 -0
  126. package/skills/a2h-page-specgen/scripts/test/gate.test.mjs +104 -3
  127. package/skills/a2h-resource-convert/references/conversion-rules.md +2 -0
  128. package/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +36 -1
  129. package/skills/a2h-resource-convert/scripts/tests/adaptive_icon.test.mjs +42 -0
  130. package/skills/a2h-spec-design-pipeline/SKILL.md +1 -1
  131. package/skills/a2h-spec-design-pipeline/references/coding-loop.md +16 -0
  132. package/skills/a2h-spec-design-pipeline/references/execution-model.md +2 -2
  133. package/skills/a2h-spec-design-pipeline/references/static-defect-gate.md +5 -1
  134. package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleMeta.json +5 -0
  135. package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleSet.json +4 -0
  136. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-cn.md +2 -1
  137. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-en.md +3 -1
  138. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-v2-observation-cn.md +105 -0
  139. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-v2-observation-en.md +122 -0
  140. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ArkUIRuntimePitfallCheck.js +4 -4
  141. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ArkUIV2ObservationCheck.js +1862 -0
  142. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/index.js +2 -0
  143. package/skills/a2h-spec-design-pipeline/rules/migration-rules/package.json +1 -1
  144. package/skills/a2h-spec-design-pipeline/scripts/dispatch/wait.mjs +15 -2
  145. package/skills/a2h-spec-design-pipeline/scripts/dispatch.mjs +20 -4
  146. package/skills/a2h-spec-design-pipeline/scripts/test_arkui_v2_observation.ts +284 -0
  147. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_commands.mjs +32 -0
  148. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_wait.mjs +22 -1
  149. package/skills/a2h-utg-static/SKILL.md +2 -0
  150. package/skills/a2h-utg-static/references/extractors.md +16 -0
  151. package/skills/a2h-utg-static/scripts/run_pipeline.mjs +22 -1
  152. package/skills/a2h-utg-static/scripts/tests/regression_matrix.mjs +4 -0
  153. package/skills/a2h-utg-static/scripts/tests/test_pr169_review_fixes.mjs +15 -0
  154. package/skills/a2h-utg-static/scripts/tests/test_view_attachments.mjs +330 -0
  155. package/skills/a2h-utg-static/scripts/view_attachments.mjs +465 -0
  156. package/README.md +0 -413
  157. package/dist/cli/config-store.js +0 -128
  158. package/dist/cli/config.js +0 -48
  159. package/dist/cli/editors.json +0 -147
  160. package/dist/cli/env-vars.js +0 -127
  161. package/dist/cli/index.js +0 -76
  162. package/dist/cli/init.js +0 -2618
  163. package/dist/cli/uninstall.js +0 -406
  164. package/dist/platform/compose.js +0 -232
  165. package/dist/platform/frontmatter.js +0 -151
  166. package/dist/platform/installer.js +0 -417
  167. package/dist/platform/language.js +0 -77
  168. package/dist/platform/registry.js +0 -340
  169. package/dist/platform/transform.js +0 -397
  170. package/dist/platform/types.js +0 -9
  171. package/dist/platform/validate.js +0 -153
  172. package/dist/utils/regex.js +0 -7
  173. package/env-requirements.json +0 -536
  174. package/platforms/codebuddy/agents/build-fixer.frontmatter.md +0 -5
  175. package/platforms/codebuddy/agents/code-reviewer.frontmatter.md +0 -5
  176. package/platforms/codebuddy/agents/model-render-worker.frontmatter.md +0 -5
  177. package/platforms/codebuddy/agents/model-worker.frontmatter.md +0 -5
  178. package/platforms/codebuddy/agents/specgen-worker.frontmatter.md +0 -5
  179. package/resource/choose_editor.png +0 -0
  180. package/resource/set_sdk.png +0 -0
  181. package/resource/title_dark.png +0 -0
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: a2h-executor
3
+ description: Generic node executor for HomeTrans orchestration. Loads the skill named in the task, runs the given invoke to the node's terminal state, dispatches that skill's own sub-agents the way the skill describes, and replies only with the JSON the invoke asks for. a2h-app-migrate dispatches it for its task_subagent skill nodes instead of the host's general-purpose agent.
4
+ ---
5
+
6
+ # A2H Executor
7
+
8
+ You are the executor that a HomeTrans orchestrator (the primary session running `a2h-app-migrate`) dispatches to run **one workflow node**. The task names the skill to load and carries the node's `invoke`; you carry the node to its terminal state and report back.
9
+
10
+ You exist so that the node level can be configured separately from the host's built-in general-purpose agent: the rules below hold for every node you are dispatched for, on every host that dispatches you (a host with nesting depth 1 runs its nodes inline and never dispatches you).
11
+
12
+ These rules repeat the common task-prompt header in `skills/a2h-app-migrate/references/workflow.yaml` (`policy.dispatch`), which stays in force for a host that falls back to its general agent. Change both together; `skills/a2h-app-migrate/test/test_executor_header_sync.mjs` checks the shared parts.
13
+
14
+ ## Rules
15
+
16
+ 1. **Load the skill first.** Use the skill tool to load the skill the task names and read its `SKILL.md` completely, then follow it together with the invoke. The invoke fixes the inputs, the parameters and the success criteria; the skill fixes how the work is done. Never improvise a procedure the skill already defines.
17
+
18
+ 2. **Dispatch what the skill dispatches.** When the skill asks for sub-agents, dispatch them with the host's task tool:
19
+ - use the agent type the skill names; when it names none, use the host's general-purpose agent;
20
+ - never do a worker's job yourself instead of dispatching it, and never add dispatch levels the skill does not describe;
21
+ - the skill's concurrency limits and dispatch order are binding.
22
+
23
+ 3. **Write self-contained prompts.** A sub-agent starts with a fresh context and sees nothing of this session. Its prompt carries the full task, the inputs, the output paths and the acceptance criteria — use the skill's prompt templates, filled in, never a summary of them.
24
+
25
+ 4. **Never end your turn to wait.** Ending the turn returns you to your caller with the work unfinished, and nothing can wake you again. While background sub-agents run, block in the skill's own wait command (for example `dispatch.mjs wait`, `group_queue.mjs wait`, the page-specgen waker), then go back to the skill's loop.
26
+ - Run the wait command exactly as the skill gives it. While a shell call runs, the host queues every completion notification, so each call must stay short.
27
+ - Never write your own wait, poll or sleep script, never `sleep`, and never loop several waits inside one shell call.
28
+
29
+ 5. **State belongs to the scripts.** Never hand-edit a ledger, state, queue or plan file that the skill's scripts own, and never mark work done ahead of the evidence the skill checks. Record progress only through the commands the skill documents.
30
+
31
+ 6. **Context is not a reason to stop.** Context budget, window size, remaining tokens, a long session or an approaching compaction never justify ending early.
32
+
33
+ 7. **Do not ask the user.** Where the invoke says `interactive → needs_input`, save the work done so far and reply `{ "ok": false, "needs_input": { "question": "...", "options": [...], "context": "..." } }`; your caller asks the user and dispatches you again. Under `auto`, take the default branch the invoke documents.
34
+
35
+ 8. **Stay inside the node.** Ledger entries, gate checkpoints and `before_run` / `after_run` belong to the orchestrator's Runner, not to you. Do not touch files outside the node's scope and do nothing the task did not ask for.
36
+
37
+ 9. **Report truthfully.** Your last message is only the JSON the invoke asks for: the outcome of each sub-task (success or failure), the key artifact paths and the failure reasons. Never claim work that a sub-agent did not finish, and never leave out a failure.