@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.
- package/README.md +249 -279
- package/agents/code-reviewer.md +1 -1
- package/dist/cli/editors.json +20 -0
- package/dist/platform/registry.js +1 -0
- package/dist/platform/validate.js +2 -1
- package/i18n/agents/code-reviewer.md +1 -1
- package/i18n/platforms/atomcode/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/platforms/claude-code/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/platforms/codebuddy/skills/a2h-app-migrate/SKILL.unique.md +8 -0
- package/i18n/platforms/codex/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/platforms/cursor/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/platforms/deveco/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/platforms/opencode/skills/a2h-app-migrate/SKILL.unique.md +10 -0
- package/i18n/platforms/qoder/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/platforms/qoder-cn/skills/a2h-app-migrate/SKILL.unique.md +8 -0
- package/i18n/platforms/trae/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/platforms/trae-cn/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/skills/a2h-app-migrate/SKILL.md +32 -15
- package/i18n/skills/a2h-app-migrate/references/stage-map.md +4 -2
- package/i18n/skills/a2h-app-migrate/references/workflow.yaml +148 -89
- package/i18n/skills/a2h-app-migrate/scripts/env_preflight.mjs +1 -1
- package/i18n/skills/a2h-app-migrate/scripts/validate_workflow.mjs +51 -2
- package/i18n/skills/a2h-app-migrate/test/test_build_fixer_contract.mjs +1 -1
- package/i18n/skills/a2h-app-migrate/test/test_interaction.mjs +0 -2
- package/i18n/skills/a2h-app-migrate/test/test_resume_plan.mjs +1 -1
- package/i18n/skills/a2h-app-migrate/test/test_skill_doc.mjs +1 -1
- package/i18n/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +1 -1
- package/i18n/skills/a2h-app-migrate/test/test_utg_static_done.mjs +9 -3
- package/i18n/skills/a2h-app-migrate/test/test_validate_workflow_bilingual.mjs +4 -2
- package/i18n/skills/a2h-arkts-logic-coder/SKILL.md +8 -7
- package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -2
- package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +33 -12
- package/i18n/skills/a2h-batch-ui-align/SKILL.md +14 -12
- package/i18n/skills/a2h-batch-ui-align/references/cards/alignment.md +1 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/canvas.md +1 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/dynamics.md +32 -1
- package/i18n/skills/a2h-batch-ui-align/references/cards/geometry.md +3 -2
- package/i18n/skills/a2h-batch-ui-align/references/cards/interaction.md +4 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/resources.md +19 -1
- package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +13 -1
- package/i18n/skills/a2h-batch-ui-align/references/cards/window.md +2 -2
- package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +205 -7
- package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +10 -17
- package/i18n/skills/a2h-batch-ui-align/references/incremental-scope.md +3 -4
- package/i18n/skills/a2h-batch-ui-align/references/lottie-integration.md +47 -2
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +52 -328
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +1 -138
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +2 -11
- package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_paradigm-selection.md +1 -1
- package/i18n/skills/a2h-batch-ui-align/references/step3-capture.md +8 -23
- package/i18n/skills/a2h-batch-ui-align/references/step4-prepare.md +2 -1
- package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +17 -9
- package/i18n/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +239 -16
- package/i18n/skills/a2h-batch-ui-align/scripts/group_pack.mjs +6 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +6 -3
- package/i18n/skills/a2h-batch-ui-align/scripts/measure_pack.ts +170 -10
- package/i18n/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +42 -1
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/main.ts +20 -1
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +81 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/click_handler.ts +140 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/collapsing_toolbar.ts +124 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/compose_semantics.ts +287 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/flowitem_width.ts +78 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +194 -8
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/inset_stacked.ts +138 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/int_division.ts +181 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +62 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_path.ts +77 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_ready.ts +109 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +88 -18
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_cycle.ts +140 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +2 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/see_through_overlay.ts +149 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_builder.ts +139 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_show_close.ts +53 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/space_between_optional.ts +115 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +7 -1
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/width_fill.ts +160 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_inset_stacked.test.mjs +155 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +60 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +38 -0
- package/i18n/skills/a2h-module-semantic-docs/SKILL.md +3 -2
- package/i18n/skills/a2h-page-specgen/SKILL.md +36 -5
- package/i18n/skills/a2h-page-specgen/references/behavior-ledger.md +89 -21
- package/i18n/skills/a2h-page-specgen/references/gates.md +33 -7
- package/i18n/skills/a2h-page-specgen/references/scenario-authoring.md +67 -13
- package/i18n/skills/a2h-page-specgen/references/spec-example.md +166 -32
- package/i18n/skills/a2h-page-specgen/references/spec-template.md +8 -5
- package/i18n/skills/a2h-page-specgen/scripts/behavior-audit.mjs +37 -1
- package/i18n/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +241 -22
- package/i18n/skills/a2h-page-specgen/scripts/behavior-model.mjs +29 -2
- package/i18n/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +32 -0
- package/i18n/skills/a2h-page-specgen/scripts/contract-calls.mjs +715 -0
- package/i18n/skills/a2h-page-specgen/scripts/footprint.mjs +129 -2
- package/i18n/skills/a2h-page-specgen/scripts/gate.mjs +19 -10
- package/i18n/skills/a2h-page-specgen/scripts/lib/contracts.mjs +62 -3
- package/i18n/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +27 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/hg.mjs +116 -6
- package/i18n/skills/a2h-page-specgen/scripts/operation-evidence.mjs +270 -29
- package/i18n/skills/a2h-page-specgen/scripts/prepare.mjs +26 -14
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +118 -25
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +104 -19
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +118 -25
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +104 -19
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +216 -216
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +1 -1
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +2 -2
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +118 -25
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +100 -15
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +118 -25
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +104 -19
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +155 -3
- package/i18n/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +529 -1
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +27 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +158 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +11 -13
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +97 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/contract-calls.test.mjs +737 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +75 -3
- package/i18n/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +24 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +124 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +6 -2
- package/i18n/skills/a2h-page-specgen/scripts/test/gate.test.mjs +106 -1
- package/i18n/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +32 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/hg.test.mjs +12 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +6 -1
- package/i18n/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +11 -3
- package/i18n/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +1 -1
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +1 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/submit.test.mjs +159 -27
- package/i18n/skills/a2h-resource-convert/SKILL.md +1 -1
- package/i18n/skills/a2h-resource-convert/references/lottie-conversion-rules.md +2 -2
- package/i18n/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +124 -8
- package/i18n/skills/a2h-resource-convert/scripts/sync-framework-strings.mjs +147 -0
- package/i18n/skills/a2h-resource-convert/scripts/tests/framework_strings.test.mjs +131 -0
- package/i18n/skills/a2h-spec-design-pipeline/SKILL.md +15 -12
- package/i18n/skills/a2h-spec-design-pipeline/references/coding-loop.md +38 -10
- package/i18n/skills/a2h-spec-design-pipeline/references/initialization.md +2 -2
- package/i18n/skills/a2h-spec-design-pipeline/references/post-loop.md +2 -2
- package/i18n/skills/a2h-spec-design-pipeline/references/reply-recovery.md +172 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/review-loop.md +2 -2
- package/i18n/skills/a2h-spec-design-pipeline/references/scripts.md +5 -3
- package/i18n/skills/a2h-spec-design-pipeline/references/state-and-resume.md +7 -1
- package/i18n/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +1 -1
- package/i18n/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +2 -0
- package/i18n/skills/a2h-spec-generate/references/input-formats.md +1 -1
- package/i18n/skills/a2h-utg-explorer/SKILL.md +11 -5
- package/i18n/skills/a2h-utg-explorer/references/architecture.md +37 -19
- package/i18n/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +48 -3
- package/i18n/skills/a2h-utg-explorer/scripts/final_utg.mjs +21 -0
- package/i18n/skills/a2h-utg-explorer/scripts/recover_d.mjs +67 -8
- package/i18n/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +32 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/dialog_own_layout.test.mjs +40 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +63 -2
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +143 -14
- package/i18n/skills/a2h-utg-static/SKILL.md +3 -3
- package/i18n/skills/a2h-utg-static/references/ui-elements-static-utg-schema.md +4 -3
- package/i18n/skills/a2h-utg-static/scripts/click_paths.mjs +1 -1
- package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +25 -0
- package/i18n/skills/a2h-utg-static/tools/convert_static_utg_to_ui_elements.ts +1 -0
- package/package.json +2 -1
- package/platforms/atomcode/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/platforms/claude-code/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/platforms/codebuddy/agents/build-fixer.frontmatter.md +5 -0
- package/platforms/codebuddy/agents/code-reviewer.frontmatter.md +5 -0
- package/platforms/codebuddy/agents/model-render-worker.frontmatter.md +5 -0
- package/platforms/codebuddy/agents/model-worker.frontmatter.md +5 -0
- package/platforms/codebuddy/agents/specgen-worker.frontmatter.md +5 -0
- package/platforms/codebuddy/skills/a2h-app-migrate/SKILL.unique.md +8 -0
- package/platforms/codex/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/platforms/cursor/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/platforms/deveco/agents/build-fixer.frontmatter.md +2 -0
- package/platforms/deveco/agents/code-reviewer.frontmatter.md +2 -0
- package/platforms/deveco/agents/model-render-worker.frontmatter.md +2 -0
- package/platforms/deveco/agents/model-worker.frontmatter.md +2 -0
- package/platforms/deveco/agents/specgen-worker.frontmatter.md +2 -0
- package/platforms/deveco/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/platforms/opencode/agents/build-fixer.frontmatter.md +2 -0
- package/platforms/opencode/agents/code-reviewer.frontmatter.md +2 -0
- package/platforms/opencode/agents/model-render-worker.frontmatter.md +2 -0
- package/platforms/opencode/agents/model-worker.frontmatter.md +2 -0
- package/platforms/opencode/agents/specgen-worker.frontmatter.md +2 -0
- package/platforms/opencode/skills/a2h-app-migrate/SKILL.unique.md +10 -0
- package/platforms/qoder/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/platforms/qoder-cn/skills/a2h-app-migrate/SKILL.unique.md +8 -0
- package/platforms/trae/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/platforms/trae-cn/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/skills/a2h-app-migrate/SKILL.md +31 -14
- package/skills/a2h-app-migrate/references/stage-map.md +4 -2
- package/skills/a2h-app-migrate/references/workflow.yaml +152 -89
- package/skills/a2h-app-migrate/scripts/assert_dag_complete.mjs +1 -1
- package/skills/a2h-app-migrate/scripts/check_ui_batch_done.mjs +28 -11
- package/skills/a2h-app-migrate/scripts/dag_action_catalog.mjs +76 -0
- package/skills/a2h-app-migrate/scripts/dag_production_executor.mjs +60 -5
- package/skills/a2h-app-migrate/scripts/dag_runner.mjs +184 -4
- package/skills/a2h-app-migrate/scripts/env_preflight.mjs +1 -1
- package/skills/a2h-app-migrate/scripts/ledger.mjs +2 -2
- package/skills/a2h-app-migrate/scripts/resume_plan.mjs +3 -3
- package/skills/a2h-app-migrate/scripts/validate_workflow.mjs +51 -2
- package/skills/a2h-app-migrate/test/test_dag_blocked_guard.mjs +291 -0
- package/skills/a2h-app-migrate/test/test_dag_production.mjs +40 -0
- package/skills/a2h-app-migrate/test/test_dag_runner.mjs +4 -3
- package/skills/a2h-app-migrate/test/test_i18n_engine_mirror.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_interaction.mjs +0 -2
- package/skills/a2h-app-migrate/test/test_resume_plan.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_skill_doc.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_spec_engine_contract.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_ui_batch_done.mjs +36 -0
- package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +19 -6
- package/skills/a2h-app-migrate/test/test_validate_workflow_bilingual.mjs +4 -2
- package/skills/a2h-arkts-logic-coder/SKILL.md +8 -7
- package/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -2
- package/skills/a2h-arkts-logic-coder/references/code-generation.md +33 -12
- package/skills/a2h-batch-ui-align/SKILL.md +14 -12
- package/skills/a2h-batch-ui-align/references/cards/alignment.md +1 -0
- package/skills/a2h-batch-ui-align/references/cards/canvas.md +1 -0
- package/skills/a2h-batch-ui-align/references/cards/dynamics.md +32 -1
- package/skills/a2h-batch-ui-align/references/cards/geometry.md +3 -2
- package/skills/a2h-batch-ui-align/references/cards/interaction.md +4 -0
- package/skills/a2h-batch-ui-align/references/cards/resources.md +19 -1
- package/skills/a2h-batch-ui-align/references/cards/widgets.md +13 -1
- package/skills/a2h-batch-ui-align/references/cards/window.md +2 -2
- package/skills/a2h-batch-ui-align/references/checker-rules.md +205 -7
- package/skills/a2h-batch-ui-align/references/conversion-procedure.md +10 -17
- package/skills/a2h-batch-ui-align/references/incremental-scope.md +3 -4
- package/skills/a2h-batch-ui-align/references/lottie-integration.md +47 -2
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +52 -328
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +1 -138
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +2 -11
- 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
- package/skills/a2h-batch-ui-align/references/step3-capture.md +8 -23
- package/skills/a2h-batch-ui-align/references/step4-prepare.md +2 -1
- package/skills/a2h-batch-ui-align/references/step5-convert.md +17 -9
- package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +239 -16
- package/skills/a2h-batch-ui-align/scripts/group_commit.mjs +6 -1
- package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +6 -0
- package/skills/a2h-batch-ui-align/scripts/group_pass.mjs +270 -0
- package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +134 -16
- package/skills/a2h-batch-ui-align/scripts/group_watch.mjs +39 -8
- package/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +6 -3
- package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +170 -10
- package/skills/a2h-batch-ui-align/scripts/module_placement.mjs +189 -0
- package/skills/a2h-batch-ui-align/scripts/overlay_effects.mjs +205 -0
- package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +42 -1
- package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +20 -1
- package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +28 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +81 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/click_handler.ts +140 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/collapsing_toolbar.ts +124 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/compose_semantics.ts +287 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/flowitem_width.ts +78 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +194 -8
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/inset_stacked.ts +138 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/int_division.ts +181 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +62 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_path.ts +77 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_ready.ts +109 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +88 -18
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_cycle.ts +140 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +2 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/see_through_overlay.ts +149 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_builder.ts +139 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_show_close.ts +53 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/space_between_optional.ts +115 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +7 -1
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/width_fill.ts +160 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/scan_file.ts +28 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_chrome_defaults.test.mjs +328 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_click_handler.test.mjs +127 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_compose_semantics.test.mjs +150 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_hit_test.test.mjs +117 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_inset_stacked.test.mjs +155 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +60 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rule_smoke.test.mjs +413 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_runtime_api.test.mjs +159 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_sheet_builder.test.mjs +192 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_theme.test.mjs +4 -2
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +38 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set_compose.test.mjs +106 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_commit.test.mjs +15 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_pass.test.mjs +150 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +125 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_watch.test.mjs +56 -0
- package/skills/a2h-batch-ui-align/scripts/tests/measure_pack_icon_leaf.test.mjs +143 -0
- package/skills/a2h-batch-ui-align/scripts/tests/module_placement.test.mjs +248 -0
- package/skills/a2h-batch-ui-align/scripts/tests/overlay_effects.test.mjs +214 -0
- package/skills/a2h-fix-build-errors/references/known-patterns.md +5 -5
- package/skills/a2h-module-semantic-docs/SKILL.md +3 -2
- package/skills/a2h-module-semantic-docs/scripts/commit_module_state.mjs +10 -0
- package/skills/a2h-module-semantic-docs/scripts/design_baseline.mjs +158 -0
- package/skills/a2h-module-semantic-docs/test/test_design_baseline.mjs +128 -0
- package/skills/a2h-page-specgen/SKILL.md +36 -5
- package/skills/a2h-page-specgen/references/behavior-ledger.md +88 -21
- package/skills/a2h-page-specgen/references/evidence.md +2 -1
- package/skills/a2h-page-specgen/references/execution-model.md +13 -5
- package/skills/a2h-page-specgen/references/gates.md +33 -7
- package/skills/a2h-page-specgen/references/scenario-authoring.md +67 -13
- package/skills/a2h-page-specgen/references/spec-example.md +166 -32
- package/skills/a2h-page-specgen/references/spec-template.md +8 -5
- package/skills/a2h-page-specgen/scripts/behavior-audit.mjs +40 -2
- package/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +241 -22
- package/skills/a2h-page-specgen/scripts/behavior-model.mjs +29 -2
- package/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +35 -2
- package/skills/a2h-page-specgen/scripts/contract-calls.mjs +715 -0
- package/skills/a2h-page-specgen/scripts/finalize.mjs +55 -2
- package/skills/a2h-page-specgen/scripts/footprint.mjs +129 -2
- package/skills/a2h-page-specgen/scripts/gate.mjs +20 -11
- package/skills/a2h-page-specgen/scripts/lib/contracts.mjs +56 -3
- package/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +27 -0
- package/skills/a2h-page-specgen/scripts/lib/hg.mjs +114 -5
- package/skills/a2h-page-specgen/scripts/lib/ledger.mjs +20 -3
- package/skills/a2h-page-specgen/scripts/operation-evidence.mjs +270 -29
- package/skills/a2h-page-specgen/scripts/prepare.mjs +25 -14
- package/skills/a2h-page-specgen/scripts/report.mjs +26 -5
- package/skills/a2h-page-specgen/scripts/submission.mjs +69 -2
- package/skills/a2h-page-specgen/scripts/submit.mjs +105 -4
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +110 -18
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +97 -12
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +110 -18
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +97 -12
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +224 -224
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +1 -1
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +2 -2
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +110 -18
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +97 -12
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +110 -18
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +97 -12
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +153 -3
- package/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +529 -1
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +27 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +158 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +11 -13
- package/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +97 -0
- package/skills/a2h-page-specgen/scripts/test/contract-calls.test.mjs +737 -0
- package/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +82 -3
- package/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +24 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +11 -0
- package/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +6 -2
- package/skills/a2h-page-specgen/scripts/test/gate.test.mjs +94 -1
- package/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +32 -0
- package/skills/a2h-page-specgen/scripts/test/hg.test.mjs +14 -0
- package/skills/a2h-page-specgen/scripts/test/ledger.test.mjs +49 -1
- package/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +6 -1
- package/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +12 -4
- package/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +1 -1
- package/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +1 -0
- package/skills/a2h-page-specgen/scripts/test/report.test.mjs +80 -1
- package/skills/a2h-page-specgen/scripts/test/submit.test.mjs +159 -27
- package/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +23 -0
- package/skills/a2h-page-specgen/scripts/waker.mjs +8 -1
- package/skills/a2h-resource-convert/SKILL.md +1 -1
- package/skills/a2h-resource-convert/data/framework-strings/NOTICE +10 -0
- package/skills/a2h-resource-convert/data/framework-strings/manifest.json +90 -0
- package/skills/a2h-resource-convert/data/framework-strings/strings.json +382 -0
- package/skills/a2h-resource-convert/references/conversion-rules.md +7 -1
- package/skills/a2h-resource-convert/references/lottie-conversion-rules.md +2 -2
- package/skills/a2h-resource-convert/references/step5-reference-resolution.md +16 -0
- package/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +124 -8
- package/skills/a2h-resource-convert/scripts/sync-framework-strings.mjs +147 -0
- package/skills/a2h-resource-convert/scripts/tests/framework_strings.test.mjs +131 -0
- package/skills/a2h-spec-design-pipeline/SKILL.md +14 -11
- package/skills/a2h-spec-design-pipeline/references/coding-loop.md +38 -10
- package/skills/a2h-spec-design-pipeline/references/execution-model.md +3 -0
- package/skills/a2h-spec-design-pipeline/references/final-report-template.md +6 -3
- package/skills/a2h-spec-design-pipeline/references/initialization.md +2 -2
- package/skills/a2h-spec-design-pipeline/references/post-loop.md +2 -2
- package/skills/a2h-spec-design-pipeline/references/reply-recovery.md +172 -0
- package/skills/a2h-spec-design-pipeline/references/review-loop.md +2 -2
- package/skills/a2h-spec-design-pipeline/references/scripts.md +4 -3
- package/skills/a2h-spec-design-pipeline/references/shared-layer.md +24 -19
- package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +7 -1
- package/skills/a2h-spec-design-pipeline/references/static-defect-gate.md +12 -5
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleMeta.json +5 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleSet.json +4 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/README.md +27 -3
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-param-contract.json +46 -1
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-permission-map.json +2511 -295
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-cn.md +27 -72
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-en.md +39 -83
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-cn.md +132 -101
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-en.md +158 -115
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-cn.md +60 -93
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-en.md +73 -100
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/route-page-side-effect-import-cn.md +52 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/route-page-side-effect-import-en.md +59 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ApiPermissionDeclaredCheck.js +57 -8
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ArkUIRuntimePitfallCheck.js +475 -18
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/PlatformApiContractCheck.js +472 -4
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/RoutePageSideEffectImportCheck.js +570 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/arkui/RouteParamCarrierSubCheck.js +1053 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/sql/SqlIdentifierAnalysis.js +427 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/index.js +7 -1
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/package.json +1 -1
- package/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +1 -1
- package/skills/a2h-spec-design-pipeline/scripts/settle.ts +785 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_api_permission_declared.ts +286 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_arkui_runtime_pitfall.ts +166 -2
- package/skills/a2h-spec-design-pipeline/scripts/test_docs_refresh_contract.ts +40 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +2 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_platform_api_contract.ts +350 -7
- package/skills/a2h-spec-design-pipeline/scripts/test_route_page_side_effect_import.ts +185 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_route_param_carrier.ts +341 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_settle.ts +593 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_docs.ts +92 -1
- package/skills/a2h-spec-design-pipeline/scripts/test_sql_identifier_analysis.ts +137 -0
- package/skills/a2h-spec-generate/references/input-formats.md +1 -1
- package/skills/a2h-utg-explorer/SKILL.md +11 -5
- package/skills/a2h-utg-explorer/references/architecture.md +37 -19
- package/skills/a2h-utg-explorer/scripts/audit.mjs +6 -2
- package/skills/a2h-utg-explorer/scripts/close_phases.mjs +8 -5
- package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +95 -19
- package/skills/a2h-utg-explorer/scripts/d_prereqs.mjs +192 -4
- package/skills/a2h-utg-explorer/scripts/final_utg.mjs +21 -0
- package/skills/a2h-utg-explorer/scripts/panel_routes.mjs +1 -1
- package/skills/a2h-utg-explorer/scripts/plan.mjs +16 -1
- package/skills/a2h-utg-explorer/scripts/predicates.mjs +270 -0
- package/skills/a2h-utg-explorer/scripts/promote_dynamic.mjs +2 -0
- package/skills/a2h-utg-explorer/scripts/recover.mjs +4 -3
- package/skills/a2h-utg-explorer/scripts/recover_d.mjs +67 -8
- package/skills/a2h-utg-explorer/scripts/rejudge.mjs +4 -3
- package/skills/a2h-utg-explorer/scripts/report.mjs +32 -2
- package/skills/a2h-utg-explorer/scripts/run_cycle.mjs +103 -36
- package/skills/a2h-utg-explorer/scripts/run_device.mjs +3 -8
- package/skills/a2h-utg-explorer/scripts/schedule_states.mjs +189 -0
- package/skills/a2h-utg-explorer/scripts/tests/calendar_round_fixes.test.mjs +9 -0
- package/skills/a2h-utg-explorer/scripts/tests/coverage_rules.test.mjs +11 -0
- package/skills/a2h-utg-explorer/scripts/tests/d_prereqs.test.mjs +31 -2
- package/skills/a2h-utg-explorer/scripts/tests/device_lock_retry.test.mjs +1 -1
- package/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +32 -0
- package/skills/a2h-utg-explorer/scripts/tests/dialog_own_layout.test.mjs +40 -0
- package/skills/a2h-utg-explorer/scripts/tests/explorer_review_fixes.test.mjs +4 -1
- package/skills/a2h-utg-explorer/scripts/tests/hybrid_route.test.mjs +6 -28
- package/skills/a2h-utg-explorer/scripts/tests/in_route_surface.test.mjs +125 -0
- package/skills/a2h-utg-explorer/scripts/tests/list_probe_target_wait.test.mjs +86 -0
- package/skills/a2h-utg-explorer/scripts/tests/multi_host.test.mjs +167 -0
- package/skills/a2h-utg-explorer/scripts/tests/nested_list.test.mjs +58 -0
- package/skills/a2h-utg-explorer/scripts/tests/overlay_opener.test.mjs +100 -0
- package/skills/a2h-utg-explorer/scripts/tests/pipeline.test.mjs +8 -1
- package/skills/a2h-utg-explorer/scripts/tests/pr169_review_fixes.test.mjs +1 -0
- package/skills/a2h-utg-explorer/scripts/tests/pr191_review_fixes.test.mjs +2 -31
- package/skills/a2h-utg-explorer/scripts/tests/review_fixes.test.mjs +1 -1
- package/skills/a2h-utg-explorer/scripts/tests/run_cycle.test.mjs +56 -7
- package/skills/a2h-utg-explorer/scripts/tests/snapshot_integrity.test.mjs +117 -6
- package/skills/a2h-utg-explorer/scripts/tests/state_inventory.test.mjs +414 -0
- package/skills/a2h-utg-explorer/scripts/tests/tree_unreliable.test.mjs +197 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/adapters.mjs +196 -30
- package/skills/a2h-utg-explorer/scripts/utg_explorer/hosts.mjs +146 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +63 -2
- package/skills/a2h-utg-explorer/scripts/utg_explorer/states.mjs +286 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +197 -19
- package/skills/a2h-utg-static/SKILL.md +3 -3
- package/skills/a2h-utg-static/references/extractors.md +7 -0
- package/skills/a2h-utg-static/references/ui-elements-static-utg-schema.md +4 -3
- package/skills/a2h-utg-static/scripts/click_paths.mjs +1 -1
- package/skills/a2h-utg-static/scripts/compose_overlay.mjs +642 -22
- package/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +25 -0
- package/skills/a2h-utg-static/scripts/tests/test_in_route_surface.mjs +123 -0
- package/skills/a2h-utg-static/scripts/tests/test_overlay_host_effects.mjs +239 -0
- package/skills/a2h-utg-static/scripts/tests/test_shared_host_depths.mjs +48 -0
- package/skills/a2h-utg-static/scripts/utg_html.mjs +2 -0
- package/skills/a2h-utg-static/tools/convert_static_utg_to_ui_elements.ts +1 -0
- package/i18n/skills/a2h-app-migrate/references/specs.example.json +0 -19
- package/i18n/skills/a2h-batch-ui-align/scripts/databinding_analyzer_design.md +0 -79
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +0 -47
- package/resource/convert_pipeline_process.svg +0 -114
- package/resource/project_architecture.svg +0 -120
- package/resource/set_environment.png +0 -0
- package/resource/set_multimodel.png +0 -0
- package/skills/a2h-app-migrate/references/specs.example.json +0 -19
- package/skills/a2h-batch-ui-align/scripts/databinding_analyzer_design.md +0 -79
- package/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +0 -47
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# Reply recovery — host-independent, no session resume
|
|
2
|
+
|
|
3
|
+
Apply this file to every **foreground stage** dispatch: F0
|
|
4
|
+
(`references/shared-layer.md`), B3 (`SKILL.md` → B3), the B4 round rebuild
|
|
5
|
+
(`references/review-loop.md`), the build breaker (`references/coding-loop.md`),
|
|
6
|
+
and the post-Homecheck build-fixer (`references/post-loop.md`). **Not the
|
|
7
|
+
Homecheck gate itself**: that agent is idempotent and owns a `summary.json` +
|
|
8
|
+
`runId` fallback (`references/post-loop.md`). Background chunk and resolver
|
|
9
|
+
dispatches are covered by the dispatch ledger, not this file.
|
|
10
|
+
|
|
11
|
+
Stages: `f0`, `b3`, `b4-rebuild`, `build-breaker`, `homecheck-build`
|
|
12
|
+
(`review-rebuild` is normalized to `b4-rebuild`; the baseline filename uses the
|
|
13
|
+
normalized stage).
|
|
14
|
+
|
|
15
|
+
## Why
|
|
16
|
+
|
|
17
|
+
A foreground sub-agent call returns at the agent's **first idle**. A
|
|
18
|
+
prose/status-line reply ("后台任务完成后我会恢复" / "will resume when the
|
|
19
|
+
background task finishes"), prose, or a truncated object means it went idle
|
|
20
|
+
mid-run and may still be writing `<HMOS>` — typically behind its own background
|
|
21
|
+
build. Two rules are absolute:
|
|
22
|
+
|
|
23
|
+
- **Never dispatch a second agent of the same kind beside it.** Two writers on
|
|
24
|
+
the main tree, or two `devecocli build` runs sharing the hvigor daemon and
|
|
25
|
+
the same `output_path`, are a corruption source, not a retry.
|
|
26
|
+
- **Never resume a session.** Some hosts cannot; recovery must be identical on
|
|
27
|
+
every host. Disk evidence is the only contract.
|
|
28
|
+
|
|
29
|
+
Absence of change is **not** completion. A cold `devecocli build` is quiet for
|
|
30
|
+
minutes (`agents/build-fixer.md`: a cold first build can take a few minutes),
|
|
31
|
+
a missing artifact has no mtime, and a pre-dispatch file must not make the tree
|
|
32
|
+
look settled. Freshness is anchored at the dispatch instant, never at
|
|
33
|
+
"whatever happened to be on disk".
|
|
34
|
+
|
|
35
|
+
## Constants
|
|
36
|
+
|
|
37
|
+
| knob | value | why |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| `POLL_MS` | 15000 | cheap; the probe must not be the resolution limit |
|
|
40
|
+
| `QUIET_MS` | 660000 (all stages) | F0 may run a cold `devecocli docs` index and build stages a 600000 ms build; the quiet window must exceed the longest silent work with margin |
|
|
41
|
+
| `SLICE_MS` | 300000 per call | a slice ≤ the host's per-call cap; the probe returns `pending` at the boundary and the caller re-runs it |
|
|
42
|
+
| `WAIT_MS` | 1800000 total | the stage's whole recovery budget; `--max-ms` is an alias (never pass both) |
|
|
43
|
+
| `SCAN_BUDGET` (`--scan-budget`) | 200000 entries per activity root | a truncated scan is fail-closed: it can never produce `settled_empty`; a dirty list above the same cap is fail-closed too |
|
|
44
|
+
|
|
45
|
+
`DISPATCH_AT` = the instant the stage agent was dispatched (ISO). The baseline
|
|
46
|
+
records it before the call; every freshness check is relative to it, so a
|
|
47
|
+
stale manifest/report from an earlier attempt can never be this round's result.
|
|
48
|
+
|
|
49
|
+
A root that exceeds `SCAN_BUDGET` on every sample is fail-closed: it can end in
|
|
50
|
+
`settled_timeout` (manual stop), never `settled_empty`. Raise `--scan-budget`
|
|
51
|
+
or accept the stop; never weaken the evidence bar to make it quiet.
|
|
52
|
+
|
|
53
|
+
## Steps
|
|
54
|
+
|
|
55
|
+
0. **Before the dispatch**, after recording `PRE_HEAD = git rev-parse HEAD`,
|
|
56
|
+
write the baseline (the script's only write):
|
|
57
|
+
`node <skill-dir>/scripts/settle.ts <HMOS> --init --stage <stage> --wave <K>
|
|
58
|
+
--dispatch-at <DISPATCH_AT> [--output <abs output_path>]
|
|
59
|
+
[--campaign-id <id>] [--base <PRE_F0>] [--pre-head <PRE_HEAD>] [--force]`
|
|
60
|
+
It stores `dispatch_at`, `pre_head`, `campaign_id`, `base`, `stage`,
|
|
61
|
+
`wave`, `output`, `targets` and each target's `{mtime,size}` (or `absent`)
|
|
62
|
+
in `<HMOS>/.hometrans/wave_<K>/reply_recovery_<stage>.json` (one baseline
|
|
63
|
+
per stage; `--baseline` overrides the path). F0 **requires**
|
|
64
|
+
`--campaign-id` and `--base`; a fresh F0 baseline without them is refused.
|
|
65
|
+
`--init` refuses to overwrite an existing baseline unless `--force` is
|
|
66
|
+
passed — use `--force` only after confirming the old agent is gone.
|
|
67
|
+
`--output` is required
|
|
68
|
+
for every stage except F0; F0's target is
|
|
69
|
+
`<HMOS>/.hometrans/wave_<K>/shared_manifest.json`, the build stages' are
|
|
70
|
+
`<output_path>/build-fix-report.md` + `<output_path>/build-fix-commit-info.md`.
|
|
71
|
+
Use absolute paths (relative `--baseline`/`--artifact` resolve under
|
|
72
|
+
`<HMOS>/.hometrans`).
|
|
73
|
+
1. A **parseable** reply goes to the stage's normal validation. The reply
|
|
74
|
+
itself is the evidence; the freshness gate below is for the disk fallback.
|
|
75
|
+
2. An **unparseable** reply → run the read-only probe in slices inside this
|
|
76
|
+
turn, until it returns a terminal verdict:
|
|
77
|
+
`node <skill-dir>/scripts/settle.ts <HMOS> --stage <stage> --wave <K>`
|
|
78
|
+
(or `--baseline <HMOS>/.hometrans/wave_<K>/reply_recovery_<stage>.json`).
|
|
79
|
+
The baseline supplies `dispatch_at`, `targets`, `campaign_id`, `base` and
|
|
80
|
+
`pre_head`; nothing needs to be repeated. **`b4-rebuild` is the exception:
|
|
81
|
+
it must pass its round-specific `--baseline` every time** (the default
|
|
82
|
+
`--stage --wave` path cannot identify the review round; the script rejects
|
|
83
|
+
it). Each
|
|
84
|
+
call runs for up to `SLICE_MS` and returns `pending` at the boundary —
|
|
85
|
+
re-run it until `artifact_fresh` / `settled_empty` / `settled_timeout`.
|
|
86
|
+
Do **not** pass `--once` in production: it returns after one sample and
|
|
87
|
+
defeats the slice (it exists for tests/debugging). Set the host shell
|
|
88
|
+
timeout to at least `SLICE_MS` + a margin. Exit 0 is only
|
|
89
|
+
`artifact_fresh`; `3` is anything else; `2` is usage/unreadable baseline.
|
|
90
|
+
**The probe never redefines evidence.** `--artifact`, `--dispatch-at`,
|
|
91
|
+
`--campaign-id`, `--base` and `--pre-head` must match the baseline (or be
|
|
92
|
+
omitted); an `--artifact` list must be a superset of the baseline targets.
|
|
93
|
+
Only `--init` sets them.
|
|
94
|
+
3. **Only `artifact_fresh` ends the recovery.** Fresh = every target exists,
|
|
95
|
+
`mtime > DISPATCH_AT`, `mtime <= now + 60s` (a future mtime is
|
|
96
|
+
`invalid:future-mtime`), differs from the baseline, and the stage's
|
|
97
|
+
ownership check passes:
|
|
98
|
+
- F0: `manifest.campaign_id` and `manifest.base` must both be present in the
|
|
99
|
+
baseline and match (`ownership-unchecked` is `invalid`, never fresh);
|
|
100
|
+
- build stages: a report **line/list item/table cell** carries `Build Status`
|
|
101
|
+
(markdown emphasis such as `**Build Status**: SUCCESS` and table forms are
|
|
102
|
+
accepted; prose that merely mentions it is not), and the
|
|
103
|
+
commit-info is `commit_id: none` **only while `HEAD == PRE_HEAD` and the
|
|
104
|
+
tree is clean** (`none-but-head-moved`, `none-but-dirty-tree`), or a real
|
|
105
|
+
commit that resolves to a full OID (`resolveOid` compares OIDs, so a
|
|
106
|
+
short/uppercase sha of `PRE_HEAD` cannot pass as a new commit), differs
|
|
107
|
+
from `PRE_HEAD` (`not-a-new-commit`), passes
|
|
108
|
+
`git merge-base --is-ancestor PRE_HEAD <commit>`, and is reachable from
|
|
109
|
+
the current `HEAD` (`git merge-base --is-ancestor <commit> HEAD`;
|
|
110
|
+
`commit-not-on-head`).
|
|
111
|
+
Then validate as the stage normally does (F0:
|
|
112
|
+
`validate_shared_manifest.ts` + status branch; B3: the report +
|
|
113
|
+
`ensure_index.ts --sync` under `b3-fix`).
|
|
114
|
+
4. `settled_empty` — the tree has been quiet for `QUIET_MS` with no fresh
|
|
115
|
+
artifact. An artifact reported `invalid` (wrong campaign/base, unreadable
|
|
116
|
+
manifest, empty report, missing/non-descendant commit) is a failed
|
|
117
|
+
recovery, never fresh. Apply the stage's existing fail-soft:
|
|
118
|
+
- F0: `HEAD == PRE_F0` and the tree clean → write a skipped manifest
|
|
119
|
+
`reason:"failed:settle_empty"`, restore the wiring snapshot, continue to
|
|
120
|
+
W0 (nothing to roll back). `HEAD != PRE_F0` with no validated manifest →
|
|
121
|
+
the existing **unowned-history anomaly**: record
|
|
122
|
+
`failed:post_agent_commit`, restore the snapshot, **stop for manual
|
|
123
|
+
recovery, never reset or delete those commits**. A dirty tree → the W0
|
|
124
|
+
dirty-tree rule stops the run.
|
|
125
|
+
- build stages: run the stage's existing inline build once, in the
|
|
126
|
+
foreground (B3 step 3; `600000 ms` timeout) and record its outcome.
|
|
127
|
+
`660000 ms` of quiet covers one full build timeout; a live fixer that is
|
|
128
|
+
between builds writes again, and a truncated scan is fail-closed — the
|
|
129
|
+
ladder does not claim to observe the process itself. A deleted tracked
|
|
130
|
+
path counts as activity; `git status` uses `-uall` so a file rewritten
|
|
131
|
+
inside a new untracked directory is visible (a directory mtime does not
|
|
132
|
+
change on in-place file rewrites).
|
|
133
|
+
5. `settled_timeout` — activity continued to `WAIT_MS` without going quiet. A
|
|
134
|
+
live writer may still own the main tree: **stop for manual recovery**. Do
|
|
135
|
+
not reset, clean, continue W0, continue B4–C, or run an inline build. For a
|
|
136
|
+
build stage record `build: "FAILED"` with
|
|
137
|
+
`note: "reply-recovery: settled_timeout"` first; `C`'s `git add -A` must
|
|
138
|
+
never run on a tree a live agent may still be writing.
|
|
139
|
+
6. Record `reply_recovery: {verdict, polls, waitedMs, lastActivityAt, head,
|
|
140
|
+
statusKnown, statusError, activityTruncated, clockSkew, dirty, artifacts}`
|
|
141
|
+
in the wave log and the final report
|
|
142
|
+
(`references/final-report-template.md`, `Reply recovery:` line). The
|
|
143
|
+
`settle.ts` output is the source; never self-assess.
|
|
144
|
+
7. The reset helper still runs only after the last sub-agent call has
|
|
145
|
+
returned — this ladder **never widens the two recorded rollback cases**
|
|
146
|
+
(`references/shared-layer.md` → Ownership-guarded rollback).
|
|
147
|
+
|
|
148
|
+
## Missing or old baseline
|
|
149
|
+
|
|
150
|
+
A probe without a readable baseline exits 2. Do **not** run `--init` again
|
|
151
|
+
while a live agent may still exist (it would move `DISPATCH_AT` past that
|
|
152
|
+
agent's output; `--init` refuses to overwrite without `--force`). Use the
|
|
153
|
+
stage's existing on-disk fallback or stop for manual recovery and say so in
|
|
154
|
+
the final report. On a genuine resume (the agent is gone), a fresh `--init
|
|
155
|
+
--force` is the correct new dispatch baseline.
|
|
156
|
+
|
|
157
|
+
If a stage runs more than once in the same wave (B4 review rounds, a B3
|
|
158
|
+
retry), give each attempt its own baseline path — e.g.
|
|
159
|
+
`wave_<K>/review_round_<r>/reply_recovery_b4-rebuild.json` — rather than
|
|
160
|
+
overwriting the previous round's evidence. A caller that re-dispatches the
|
|
161
|
+
same stage/wave without a distinct path must pass `--force` after confirming
|
|
162
|
+
the old agent is gone.
|
|
163
|
+
|
|
164
|
+
## Scope of the "no foreground wait" rule
|
|
165
|
+
|
|
166
|
+
`references/coding-loop.md` forbids sitting in a foreground wait/sleep **while
|
|
167
|
+
a ledger unit is active** — a blocked turn cannot receive its completion
|
|
168
|
+
notification. This ladder is not that case: F0 runs before `init` (no ledger
|
|
169
|
+
unit), and B3 / B4 rebuild / breaker / post-gate fixer run after the wave
|
|
170
|
+
barrier with `dispatch/waker.stop` already written (no active unit). Under
|
|
171
|
+
`WAIT_MODE=foreground` blocking is the only legal shape. Keep each call within
|
|
172
|
+
`SLICE_MS` so a nested node agent never looks stalled to its caller.
|
|
@@ -42,5 +42,5 @@ Loop rounds `r = 1 .. MAX_ROUNDS_REVIEW` (default `2`):
|
|
|
42
42
|
|
|
43
43
|
After each fixer returns: append its `commit` to `review.fix_commits` when not `none`, and set `review.carry_over` to its `review-fix-report.md`; then run `node <skill-dir>/scripts/ensure_index.ts <HMOS> --sync` (trigger `b4-fix`; skip when `ENGINE_MODE=off`; record the JSON line — a degraded refresh never blocks the round). A fixer that errors → retry once; a second failure → record it, the group stays open, dispatch the next fixer.
|
|
44
44
|
|
|
45
|
-
When every fixer has returned,
|
|
46
|
-
6. **Last round.** After `r = MAX_ROUNDS_REVIEW`'s fixes, re-review the fixed groups once (step 1–3 rules, `review-round_<r+1>`, no fixer); that verdict is final. Groups still open are listed in the final report with their open scenarios and last `review-fix-report.md` as manual follow-up.
|
|
45
|
+
When every fixer has returned, write the reply-recovery baseline for **this round** (`node <skill-dir>/scripts/settle.ts <HMOS> --init --stage b4-rebuild --wave <K> --dispatch-at <DISPATCH_AT> --output <HMOS>/.hometrans/wave_<K>/review_round_<r>/build --pre-head <PRE_HEAD> --baseline <HMOS>/.hometrans/wave_<K>/review_round_<r>/reply_recovery_b4-rebuild.json`), then dispatch **one** `build-fixer` (B3's fields, the same `output_path`) and validate its reply exactly as in B3 using the same `--baseline` (`references/reply-recovery.md`; `settled_empty` runs the inline build, `settled_timeout` stops for manual recovery and never starts the next round); its fix commit, when any, counts as a previous-round commit for step 1(c). After that round rebuild, run `node <skill-dir>/scripts/ensure_index.ts <HMOS> --sync` (trigger `b4-rebuild`; skip when `ENGINE_MODE=off`; record the JSON line). Then the next round.
|
|
46
|
+
6. **Last round.** After `r = MAX_ROUNDS_REVIEW`'s fixes, re-review the fixed groups once (step 1–3 rules, `review-round_<r+1>`, no fixer); that verdict is final. Groups still open are listed in the final report with their open scenarios and last `review-fix-report.md` as manual follow-up. That verdict is a **review-time snapshot**, not a terminal state: for an early-wave group it was judged before later waves merged, and a later group may have already closed an open item (e.g. the cross-group data layer a fixer could not build). The verdict recorded in state is never rewritten here — at Finalization every open item is re-verified against the merged trunk before it enters the report (rule in `references/final-report-template.md`); items a later wave resolved are reported as resolved there, not as manual follow-up.
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
- `scripts/scan_shared.ts` — F0's deterministic candidate scan (read-only except the atomic candidates file): resolves the semantic docs (`lib/shared_docs.ts`), reads the plan/state/wave plan, classifies the doc rows into the three shared classes (`lib/shared_classes.ts`; EVERY declaration row is classified — invalid roots are recorded in `skipped[]` with accurate reasons, deduped by `(id, reason)`, even when valid roots remain), gates on members ≥ 2, scopes the prior-work inventory to strictly earlier waves' done manifests **of the current `campaign_id`** (the current wave's own output is never evidence; a manifest from another campaign satisfies nothing), takes module roots **only** from `build-profile.json5` `modules[].srcPath` (`.hometrans/module_understanding/` is never a registration source), resolves the database table list as `database_design` → `project_design` → the wave's merged-spec union (an empty database doc does not suppress the later sources; `doc_source`/`declared_by` record the source actually used and `multi_database_doc` only reflects the database doc itself), scans each candidate module root for satisfied markers in tracked `.ets`/`.ts` sources only (comments blanked and single/double-quoted string contents plus template-literal TEXT and regular-expression-literal bodies masked by a small lexer, so `${...}` interpolation code stays visible, a template nested inside an interpolation is masked recursively, and `{`/`}` inside a regex never unbalance an interpolation; regex bodies are recognized only where an expression may start — file/statement start, after `( [ { , : ; = ! & | ? + - * % < > ~ ^`, after `return`/`typeof`/`case`/`in`/`of`/`new`/`delete`/`void`/`instanceof`/`do`/`else`/`yield`/`await`, or after `=>` — everything else is division; markers identifier-bounded; `network.transport` needs a marker on an executable-export line — `export [default] function/class/const/let/var` or a non-type `export { ... }`, interface/type/type-only exports do not count — or an explicit `export [default] class …(Http|Api|Network|Request|Transport)…` client class, which satisfies without an accompaniment word; table satisfaction needs real DDL/schema evidence — a `CREATE TABLE` naming the table (DDL may live in a string), or a quoted/backticked table name within ±3 lines of a TABLE/SCHEMA/DDL/COLUMN keyword **in the masked code text** (so prose like `const warning = "TABLE was not created"` is not schema evidence), never a bare occurrence; a partially-built database root sets `partial:true` → `mode:"complete"` for unsatisfied candidates only — any satisfied root wins and a satisfied candidate stays `create`), fills `lexicon_hits` with the per-consumer matched doc keywords, and writes `wave_<K>/shared_candidates.json`; the skip verdict (`members<2 | no-candidates | insufficient_evidence | all-satisfied`) is JSON, never an exit code — exit 2 = malformed/missing input (deterministic; has tests).
|
|
30
30
|
- `scripts/validate_shared_manifest.ts` — F0's deterministic done-manifest gate: `campaign_id`, `schema`/`wave` identity (`spec_shared_manifest/v1` / `spec_shared_candidates/v1` / `manifest.wave == --wave`), `base`, `status:"done"` with non-empty `modules`, the per-module candidate/mode/`files`-under-`path`/`api`/barrel checks (the barrel is parsed after masking string/template literals, so export text inside a literal never counts; named exports grepped; the barrel entry never resolves outside its module; a re-export from a bare/foreign specifier fails that symbol; `export *` is not proof), the `base..commit` diff allowlist `files[] ∪ wiring[]` with the page/VM and `build-profile.json5`/`hvigorfile.ts`/foreign `oh-package.json5` vetoes (`wiring[]` entries outside `state.config.wiring_files` are allowed only as the module barrel, the module's own root-level `oh-package.json5`, or a recognized wiring category **under that module's root** — `module.json5`, `main_pages.json`, `route_map.json`, `resources/**/element/*.json`, `Routes.ets`, or a `getRdbStore` registration file under the module root; a foreign path that merely matches a category is rejected), the database single-writer rule (multiple `database` module entries are allowed; at most **one** entry may contain `getRdbStore`/schema), `mode:"complete"` only for `database`, `placement_fallback` never true, the exactly-one-commit gate (`commit` has exactly one parent == `base`; `base..commit` holds exactly one commit), the canonical commit subjects (`infra(wave K): shared layer` on the commit, `docs(wave K): refresh semantic docs after shared layer` on a recorded `docs_commit`; with `--resume`, any unrecorded F0-subject commit in `<commit>..HEAD` fails as `unrecorded F0 commit: <sha>`), the clean tree (`--porcelain --untracked-files=all`, so `status.showUntrackedFiles=no` hides nothing), `HEAD == docs_commit ?? commit` — or, with `--resume` (the resume re-validation call), a descendant HEAD with a warning — and the optional `docs_commit` (parent = the infra commit, touches only `.hometrans/`); evidence source paths are warnings only. Prints exactly one compact JSON line `{ ok, errors, warnings }`; exit 0 ok / 1 validation error / 2 usage-input (deterministic; has tests).
|
|
31
31
|
- `scripts/deps_ready.ts` — dispatch-hold verdicts for a wave's pending members: `ready`/`held` per group-level deps (cycle edges ignored + recorded) plus the `released` (no-dispatch-yet) subset; a `mode: "flat"` wave yields `ready` for every pending member; read-only over plan + state + wave plan (deterministic; has tests).
|
|
32
|
+
- `scripts/settle.ts` — host-independent reply recovery for foreground stages (`f0` / `b3` / `b4-rebuild` / `build-breaker` / `homecheck-build`): `--init` records `dispatch_at`, `pre_head`, `campaign_id`, `base`, `stage`, `wave`, `output`, `targets` and each target's `{mtime,size}` in `wave_<K>/reply_recovery_<stage>.json`; the read-only probe reads that baseline by default and returns `artifact_fresh` (all targets newer than `dispatch_at`, different from the baseline, F0 campaign/base or a real commit descended from `pre_head` and reachable from `HEAD`), `settled_empty` (quiet ≥ `QUIET_MS`: 660000 for all stages), `settled_timeout` (activity to `WAIT_MS`, default 1800000) or `pending` (this `SLICE_MS` slice ended; re-run) from git + artifact + build-root mtimes; `git status -uall` (a rewritten file inside a new untracked dir counts), deletions count as activity, a dirty list above `--scan-budget` (default 200000) or a truncated scan is fail-closed, and a future mtime is `invalid:future-mtime`/`clockSkew`, never fresh. `--init` refuses to overwrite without `--force`; the probe rejects an `--artifact` list that omits a baseline target and any ownership override that differs from the baseline. Never a session resume; the caller applies its existing fail-soft, and `settled_timeout` is a stop (deterministic; has tests).
|
|
32
33
|
- `scripts/check_design_map.ts` — Finalization step 3: checks `design_map.md` against the state — one row per done/failed group, `Scenarios` an integer, a done group's `Start`/`End` real timestamps with Start ≤ End (not `进行中`), every named design file present in the design dir; JSON `{ ok, problems }`, exit 1 lists problems for the report (a placeholder-filled map no longer passes as complete; has tests).
|
|
33
34
|
- `scripts/branch_landed.ts` — the read-only resume "merged" predicate: landed ⇔ a `--no-ff` merge on main's first-parent line has the branch tip as its second parent (a zero-commit branch is never landed, unlike `merge-base --is-ancestor`); takes `[--wt-gen <n>] [--branch <name>]` (the generation branch `specpipe/g<G>r<n>`; `--branch` wins) and returns the landing's B4 range `PRE..M` (has tests). The predicate itself lives in `scripts/dispatch/landing.mjs` so `dispatch.mjs group-merge` uses exactly one implementation.
|
|
34
35
|
- `scripts/resolver_prompt.ts` — the deterministic B2 hop-a conflict-resolver prompt: derives the involved groups from each landed group's `<merge>^1..<merge>` net-change range intersected with the conflicted files, and renders `references/resolver-prompt.md` with every involved group's ORIGINAL SPEC + chunk SPECs + design docs, the worktree-only rule, the compact wiring list (derived from `state.config.wiring_files`, `wiring_compact` as fallback), the always-present HomeGraph rule (read-only CLI on the shared indexes interpolated as real absolute paths; `<HMOS>` always, `<ANDROID>` only when `--android` is given; never a worktree index), the absolute `resolver/attempt_<n>/issues.md` + `notes.md` paths (the notes file is outside the worktree, so it never trips the release gate or pollutes the merge commit), the strict-JSON return, and an empty-conflict `{resolver_needed:false}` (phantom) path. A non-dry-run render requires a claimed resolver (claim-first). Output is one strict-JSON line carrying `hmos_project_path` / `android_project_path` (`null` when absent) / `notes_file`; `--groups` overrides derivation, `--android <abs>` adds the Android source index to the rule (absent or empty → the rule names `<HMOS>` only), `--worktree <abs>` overrides the ledger worktree (never `<hmos>`), and `--dry-run` (operator-only) prints the markdown. Read-only; no `--out`/`--intent`/`--attempt`/prompt hash (has tests).
|
|
35
36
|
- `scripts/audit_claims.ts` — actual-write audit when B1⇄B2 finish (B2 step 0), on recorded per-group coder pairs, with each group's generation read from the dispatch ledger (`--wt-gen` is the no-ledger fallback, `--branch` overrides) for the fallback range: wiring-surface violations, resolver hand-edit violations, empty diffs, same-wave cross-group overlaps (deterministic; has tests).
|
|
36
37
|
- `scripts/check_permissions.ts` — B2's deterministic permission completeness check for the wiring step (`<HMOS> --wave <K>`): sweeps this wave's `merged_spec.md` + chunk SPEC/design docs for every `ohos.permission.*` name (consent ids included), reads the entry module's `module.json5` `requestPermissions`, F0's per-wave `shared_manifest.json` `notes` and `references/permission-index.json`, and classifies each name — `toAdd[]` only when the index says `restricted: false` **and** `level: normal`; `held[]` for a restricted / ACL / non-`normal` / picker / notification name and for one F0 already judged (`<name> | skip | <documentId> | restricted|picker|none`), never re-added and never re-counted as missing; `unknown[]` for a name outside the index (report-only); `unused[]` for a declared name no merged/done group's spec and no F0 note mentions (campaign-wide reverse check, never this wave alone); `declaredForbidden[]` for a restricted name already declared (final-report follow-up, never auto-removed); plus the coder-side `requestPermissionsFromUser` call sites (`consent.callSites`) (deterministic; has tests).
|
|
37
38
|
- `scripts/check_review_evidence.ts` — the reviewer's mechanical `## HomeGraph evidence` gate: reads the report, parses that section only (`parseHomeGraphEvidence` from `dispatch/evidence.mjs`) and passes when it carries file:line anchors or a `degraded:`/`fallback:`/`not-applicable:` record. One JSON line (`ok/mode/path/present/anchors/degraded/notApplicable/warning`, plus `skipped:true` for `off`); `--engine-mode auto|off|required` (`ENGINE_MODE` is the default; `off` skips without reading the file, `required` turns a missing section into a contract failure). Exit 0 pass/skip, 1 contract failure, 2 usage; read-only (deterministic; has tests).
|
|
38
|
-
- `scripts/test_arkui_runtime_pitfall.ts`, `scripts/test_platform_api_contract.ts`, `scripts/test_api_permission_declared.ts` — the migration rule package's tests: every `@hometrans` checker's detection and per-issue severity (pitfall: text-level sub-codes over a temp project; platform-api-contract: statement-event selectors plus a fake CFG whose `ArkIfStmt` text spans the block and whose closure bodies must not be attributed to the outer statement; api-permission: Kit import vs `module.json5` declarations). Run with `node --test <file>`; no installed HomeCheck is needed (a stub stands in for the `homecheck` module), so the rule logic is covered in plain CI — a real-scene A/B scan still needs an installed HomeCheck/ArkAnalyzer.
|
|
39
39
|
- `scripts/homecheck_scan.ts` — post-loop Homecheck scan: generates the project/rule configs for the two fixed rule sets plus the skill's `rules/migration-rules` set (`plugin:@hometrans/all`, installed by Homecheck's ext-rule loader into an OS-temp sandbox), runs the installed CLI, and writes `findings.json` with every `error` plus the custom set's `warnings[]` (advisory for the gate — only this set's warnings are judged; every other set's warnings are dropped as out of scope; a previous `findings.json` is deleted before any probe, so a killed run never leaves a stale clean result). A scan whose log does not prove the custom set and every one of its rules loaded, or that aborted checker callbacks, is recorded as `scan_error` — never as a clean pass. Reports are English by default (`--language cn` on demand) so the messages and the rule docs behind `docPath` match the English gate contract (deterministic; has tests).
|
|
40
40
|
- `scripts/dispatch.mjs` — the dispatch CLI and the **only writer** of `<HMOS>/.hometrans/dispatch/ledger.jsonl`: `init` (plan per wave; `--new-run` starts a new `runId`), `group-worktree`, `claim` / `intent` / `confirm` / `start` / `beat` / `submit` / `abandon` / `orphan` / `reject` / `retry` / `release` / `accept` / `close` / `artifact`, `group-reset` / `group-reopen` / `group-merge --landed` / `group-fail` / `queue-merge` / `dequeue-merge`, and the read/projection commands `reconcile [--check]`, `next` (this pass's ordered actions and loop exit, from the reconcile projection), `wait`, `waker`, `probe`, `status`, `progress`, `evidence` (read-only per-attempt gate; exit 0 = completed). `group-merge` is a landing gate (`landed-required` / `landed-unknown` / `landed-mismatch` / `merge-in-progress` / `group-failed` / `chunks-incomplete`; an explicit no-op for a zero-commit queued branch; duplicate/legacy answers append nothing and a legacy row with unlanded branch commits reports `unlanded:true`). `queue-merge` applies the same predicate (every planned chunk `done`/`accepted`) before any `git merge` (`chunks-incomplete`), and `group-reopen` is the sanctioned repair for a premature landing (new generation; finished chunks kept, the rest and the resolver reopened, the group re-admitted to the plan; `--wt-gen` must equal the next generation and an unrecorded landing is verified first). It is the CAS + lock layer (claimGen/token identity, stale events ignored), prints compact JSON, and is the only command the runbook uses for dispatch state (has tests).
|
|
41
41
|
- `scripts/dispatch/ledger.mjs` — ledger file paths, the atomic `{pid,host,boot,nonce,at}` lock (boot/nonce-aware stale-owner takeover, nonce-owned release, orphan-temp pruning), tail repair, fatal corrupt detection, append/fsync, `foldLedger` + the `dispatch/state.json` cache writer, and the `runId`/token/claimGen generators.
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
- `scripts/dispatch/timeouts.mjs` — `nextDeadline` over claimed/dispatched/live/orphaned/submitted and `buildDerived` for the next timeout projection.
|
|
56
56
|
- `scripts/lib/io.mjs` — shared plumbing: atomic JSON/file writes (temp + fsync + rename), BOM-tolerant JSON reads, `ensureDir`, and junction/case-safe `isMain`.
|
|
57
57
|
- `scripts/atomic_write.ts` — crash-safe file replacement (temp + fsync + rename, optional `.bak`) shared by the `.ts` scripts above.
|
|
58
|
-
- `scripts/test_plan_groups.ts`, `scripts/test_resolve_wiring.ts`, `scripts/test_wiring.ts`, `scripts/test_resolver_prompt.ts`, `scripts/test_git_baseline.ts`, `scripts/test_stage_design_inputs.ts`, `scripts/test_ensure_index.ts`, `scripts/test_ensure_index_real.ts`, `scripts/test_homegraph_docs.ts`, `scripts/test_branch_landed.ts`, `scripts/test_plan_waves.ts`, `scripts/test_deps_ready.ts`, `scripts/test_audit_claims.ts`, `scripts/test_atomic_write.ts`, `scripts/test_homecheck_scan.ts` — unit tests (run with `node --test <file>`).
|
|
59
|
-
- `scripts/test_shared_classes.ts`, `scripts/test_shared_docs.ts`, `scripts/test_scan_shared.ts`, `scripts/test_validate_shared_manifest.ts`, `scripts/test_shared_layer_docs.ts`, `scripts/test_shared_layer_e2e.ts`, `scripts/test_permission_index.ts`, `scripts/test_check_permissions.ts` — the shared-layer (F0) tests: class-config defaults/overrides and the shared-root hard-deny, doc resolution and row classification, the candidate scan (members gate, strictly-earlier-wave inventory, partial database mode), done-manifest validation (base/campaign_id/dirty/page vetoes), the SKILL + references doc contracts, and the scan → manifest → validate end-to-end mini-campaign, and the permission index's snapshot contract (schema, provenance, sorted unique names, a `desc` long enough for offline matching) with the index generator's fixture round-trip and `--check` drift detection, plus the docs-driven lookup, evidence-line and restricted/picker discipline asserted over `shared-layer.md` (run with `node --test <file>`).
|
|
58
|
+
- `scripts/test_plan_groups.ts`, `scripts/test_resolve_wiring.ts`, `scripts/test_wiring.ts`, `scripts/test_resolver_prompt.ts`, `scripts/test_git_baseline.ts`, `scripts/test_stage_design_inputs.ts`, `scripts/test_ensure_index.ts`, `scripts/test_ensure_index_real.ts`, `scripts/test_homegraph_docs.ts`, `scripts/test_branch_landed.ts`, `scripts/test_plan_waves.ts`, `scripts/test_deps_ready.ts`, `scripts/test_settle.ts`, `scripts/test_audit_claims.ts`, `scripts/test_atomic_write.ts`, `scripts/test_homecheck_scan.ts` — unit tests (run with `node --test <file>`).
|
|
59
|
+
- `scripts/test_shared_classes.ts`, `scripts/test_shared_docs.ts`, `scripts/test_scan_shared.ts`, `scripts/test_validate_shared_manifest.ts`, `scripts/test_shared_layer_docs.ts`, `scripts/test_docs_refresh_contract.ts`, `scripts/test_shared_layer_e2e.ts`, `scripts/test_permission_index.ts`, `scripts/test_check_permissions.ts` — the shared-layer (F0) tests: class-config defaults/overrides and the shared-root hard-deny, doc resolution and row classification, the candidate scan (members gate, strictly-earlier-wave inventory, partial database mode), done-manifest validation (base/campaign_id/dirty/page vetoes), the SKILL + references doc contracts (including the docs-refresh reply contract's single definition and its three dispatch sites), and the scan → manifest → validate end-to-end mini-campaign, and the permission index's snapshot contract (schema, provenance, sorted unique names, a `desc` long enough for offline matching) with the index generator's fixture round-trip and `--check` drift detection, plus the docs-driven lookup, evidence-line and restricted/picker discipline asserted over `shared-layer.md` (run with `node --test <file>`).
|
|
60
60
|
- `scripts/test_dispatch_commands.mjs`, `scripts/test_dispatch_e2e.mjs`, `scripts/test_dispatch_evidence.mjs`, `scripts/test_dispatch_fold.mjs`, `scripts/test_dispatch_landing.mjs`, `scripts/test_dispatch_ledger.mjs`, `scripts/test_dispatch_plan.mjs`, `scripts/test_dispatch_progress.mjs`, `scripts/test_dispatch_reconcile.mjs`, `scripts/test_dispatch_wait.mjs`, `scripts/test_dispatch_waker.mjs`, `scripts/test_dispatch_worktree.mjs` — the dispatch ledger's unit and end-to-end tests: lock/CAS, fold, plan, evidence, the group-merge landing gate, reconcile, wait/waker, progress, worktree generations, and the mini-wave harness (run with `node --test <file>`).
|
|
61
61
|
- `references/specs.example.json` — example of the specs.json input format (the format is owned by the producing skill, a2h-spec-generate 的 publish-specs).
|
|
62
62
|
- `references/initialization.md` — I1–I4 verbatim (steps 1–12): input validation, the `plan_groups.ts` + `resolve_wiring.ts` precompute, environment prerequisites, one-time setup (git baseline, docs baseline), announcement.
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
- `references/execution-model.md` — the dispatch ledger contract: files, events, identity/CAS, the state machine, timeouts/`runId`, commands, reconcile output, `wait`/waker discipline, ledger integrity.
|
|
69
69
|
- `references/post-loop.md` — after the wave loop verbatim: the Homecheck step, the runtime smoke gate and Finalization (steps 0–5), with the `post_homecheck` / `post_smoke` / `finalization` markers.
|
|
70
70
|
- `references/static-defect-gate.md` — the post-loop Homecheck check before the smoke gate: fixed plus migration rule sets, scan/fix rounds, mandatory error repair + advisory custom-warning judgement, the closing verification scan, the per-campaign `runId`, build-before-smoke rule, summary schema, and resume behavior.
|
|
71
|
+
- `references/reply-recovery.md` — the host-independent reply-recovery ladder for F0 / B3 / B4 rebuild / build breaker / post-gate build-fixer: baseline v2, freshness/ownership checks, `settled_empty` vs `settled_timeout`, and the no-session-resume rule. The Homecheck gate itself keeps its own `summary.json` + `runId` fallback.
|
|
71
72
|
- `references/legacy-cleanup.md` — the one-time runtime cleanup of retired `.hometrans` dispatch files on resume (exact filenames; runtime artifacts only).
|
|
72
73
|
- `references/final-report-template.md` — the Finalization summary report template (every section mandatory).
|
|
73
74
|
- `references/scripts.md` — this file.
|
|
@@ -73,6 +73,11 @@ sub-agent** (not background, not in the dispatch ledger; same protocol as B3).
|
|
|
73
73
|
questions. If you need more evidence, read files; do not stop to ask.
|
|
74
74
|
9. A `requires_user_input` state from the semantic-docs step is not yours: the
|
|
75
75
|
orchestrator records it and continues.
|
|
76
|
+
10. **Finish in one turn.** Run every command in the foreground — never
|
|
77
|
+
`background: true`, `&`, `Start-Process`, or a detached build. A background
|
|
78
|
+
command wakes you later, but the orchestrator has already returned with
|
|
79
|
+
whatever you said before going idle. End the turn only with the final JSON
|
|
80
|
+
of rule 8; never with a status line.
|
|
76
81
|
|
|
77
82
|
## Permissions (wave-scoped)
|
|
78
83
|
|
|
@@ -259,23 +264,24 @@ also restores `state.config.wiring_files` and
|
|
|
259
264
|
`state.config.wiring_compact` from the `shared_inflight.json` snapshot before
|
|
260
265
|
continuing.
|
|
261
266
|
|
|
262
|
-
## Reply recovery
|
|
267
|
+
## Reply recovery
|
|
263
268
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
(e.g. "后台任务完成后我会恢复") means it went idle mid-run and may still be
|
|
267
|
-
editing the main tree:
|
|
269
|
+
Apply **`references/reply-recovery.md` verbatim** with `stage: f0` and this
|
|
270
|
+
wave's `wave_<K>/shared_manifest.json` as the target. The F0 branch table:
|
|
268
271
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
272
|
+
- `artifact_fresh` → the manifest goes through the normal validation
|
|
273
|
+
(`## Resume / rollback` and the status branch below).
|
|
274
|
+
- `settled_empty` → `HEAD == PRE_F0` and the tree clean → write a skipped
|
|
275
|
+
manifest `reason:"failed:settle_empty"`, restore the wiring snapshot,
|
|
276
|
+
continue W0 (nothing to roll back); `HEAD != PRE_F0` → the unowned-history
|
|
277
|
+
anomaly: record `failed:post_agent_commit`, restore the snapshot, **stop for
|
|
278
|
+
manual recovery, never reset or delete those commits**; a dirty tree → the
|
|
279
|
+
W0 dirty-tree rule stops the run.
|
|
280
|
+
- `settled_timeout` → stop for manual recovery; never reset, clean, or continue
|
|
281
|
+
W0 while a live writer may still own the main tree.
|
|
282
|
+
|
|
283
|
+
The reset helper still runs only **after the last sub-agent call has
|
|
284
|
+
returned** — never race a running agent for the main tree.
|
|
279
285
|
|
|
280
286
|
## Resume / rollback
|
|
281
287
|
|
|
@@ -343,12 +349,11 @@ refresh/commit entirely (nothing may dirty the tree), leave `docs_refreshed`
|
|
|
343
349
|
false, and record the manual follow-up note instead.
|
|
344
350
|
|
|
345
351
|
1. If `database_design` / `preferences_design` resolved to a root-only file
|
|
346
|
-
and `.hometrans/<name>.md` is missing, copy it verbatim into `.hometrans
|
|
347
|
-
|
|
348
|
-
2. If `DOCS_MODE != off`, run
|
|
352
|
+
and `.hometrans/<name>.md` is missing, copy it verbatim into `.hometrans/`.
|
|
353
|
+
2. Run
|
|
349
354
|
`/a2h-module-semantic-docs <HMOS> --engine-mode <ENGINE_MODE>
|
|
350
355
|
--homegraph-index <ready|missing> --incremental preserve --scope project-source`
|
|
351
|
-
**via a sub-agent** (sub-skill text never enters the orchestrator's context),
|
|
356
|
+
**via a sub-agent** (sub-skill text never enters the orchestrator's context), requiring the docs-refresh reply contract in SKILL.md I5.
|
|
352
357
|
Pass `--homegraph-index ready` only when this round's `<HMOS>` index is usable; otherwise pass
|
|
353
358
|
`missing`. Never omit the flag from a pipeline call — the skill's `auto` default is for standalone
|
|
354
359
|
callers and would let the sub-agent probe/init/sync the shared index. This is an incremental
|
|
@@ -134,6 +134,12 @@ commit as `wiring`; any other dirt stops the run.
|
|
|
134
134
|
|
|
135
135
|
## State persistence & resume
|
|
136
136
|
|
|
137
|
+
**Foreground-stage reply-recovery baselines are per-dispatch evidence, not campaign state.** Each
|
|
138
|
+
foreground stage writes `<HMOS>/.hometrans/wave_<K>/reply_recovery_<stage>.json` (or a round/attempt-specific
|
|
139
|
+
path) before dispatch. On a resume/re-dispatch, after confirming the old agent is gone, write a new baseline
|
|
140
|
+
with `settle.ts --init --force`; the probe never overwrites it and never accepts ownership overrides. See
|
|
141
|
+
`references/reply-recovery.md`.
|
|
142
|
+
|
|
137
143
|
`<HMOS>/.hometrans/spec_pipeline_state.json` (schema `spec_pipeline_state/v2`, gitignored) is written by
|
|
138
144
|
`plan_groups.ts --emit-state`, updated by `plan_waves.ts` (wave assignment), and updated by the
|
|
139
145
|
orchestrator after every stage — including the B1⇄B2 bookkeeping: chunk statuses (`pending` →
|
|
@@ -238,7 +244,7 @@ seeded with `config.evidence_version >= 1` (plan_groups `--emit-state` sets it).
|
|
|
238
244
|
left its output on disk, which a skipped step cannot have:
|
|
239
245
|
|
|
240
246
|
- **B4** — every done group has `review.round >= 1` and a non-empty `spec_group_<G>/review-round_1/`.
|
|
241
|
-
- **B5** — every wave with a done group has `wave_<K>/docs_refresh.json` (`{wave,
|
|
247
|
+
- **B5** — every wave with a done group has `wave_<K>/docs_refresh.json` (`{wave, result, at}`).
|
|
242
248
|
- **C** — every done group has its `commit`, and no `specpipe/g<G>r*` branch is left.
|
|
243
249
|
- **Homecheck** — `finalization.homecheck` holds the gate's result (a fail-soft result counts; absent or
|
|
244
250
|
`not_run` does not).
|
|
@@ -20,11 +20,13 @@ not modify the group/spec state machine.
|
|
|
20
20
|
documented argument/return contract the type system does not enforce: a typed array where an
|
|
21
21
|
`ArrayBuffer` is required, a nullable return dereferenced without a guard, and an empty `extraData`
|
|
22
22
|
that NetStack rejects with 401), `@hometrans/api-permission-declared` (Kit import without the matching
|
|
23
|
-
`module.json5` `requestPermissions` entry),
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
`module.json5` `requestPermissions` entry), `@hometrans/arkui-runtime-pitfall` (ArkUI
|
|
24
|
+
runtime-contract and cross-page carrier defects; see
|
|
25
|
+
`document/checker/hometrans/arkui-runtime-pitfall-<language>.md` in the package), and
|
|
26
|
+
`@hometrans/route-page-side-effect-import` (a HAR/HSP `@Entry({routeName})` page with no
|
|
27
|
+
side-effect import in a consuming HAP — tree-shaken out of `ets/modules.abc`, so
|
|
28
|
+
`pushNamedRoute`/`replaceNamedRoute` throws 100004; see
|
|
29
|
+
`document/checker/hometrans/route-page-side-effect-import-<language>.md`).
|
|
28
30
|
- The check always runs in gate mode, with at most 2 scan-and-fix rounds.
|
|
29
31
|
- Both ETS SDK paths must resolve before scanning: explicit `--ohos-sdk-path` / `--hms-sdk-path` win;
|
|
30
32
|
otherwise each auto-discovers under `DEVECO_SDK_HOME` / `DEVECO_HOME` / `DEVECO_CLI_STUDIO_PATH`
|
|
@@ -129,6 +131,11 @@ For each `warnings[]` finding, decide first, then act — a warning is a suggest
|
|
|
129
131
|
`system_only` permission this project must not declare, or intentional behavior already documented in
|
|
130
132
|
the code. Leaving is an explicit decision, not a silent skip: record ruleId, file, line, verdict
|
|
131
133
|
`left`, and the evidence/reason in the round's `homecheck-fix-report.md`.
|
|
134
|
+
- When a `@hometrans/api-permission-declared` finding is `restricted` (ACL), first check whether a
|
|
135
|
+
permission-free route (Picker / security component) can cover the use case. If the capability is
|
|
136
|
+
genuinely needed, declaring it in `module.json5` is only half the fix: the permission must also be in
|
|
137
|
+
the signing profile's ACL list, otherwise the install drops it or fails (the warning states this). If
|
|
138
|
+
AGC approval is unavailable, leave the finding and use the permission-free alternative instead.
|
|
132
139
|
- Do **not** add `homecheck-disable` comments just to clear a warning — suppression hides it from every
|
|
133
140
|
future scan. An unfixed warning stays in `warningsAfter` and is reported; that is the judgement's
|
|
134
141
|
expected outcome.
|
|
@@ -24,18 +24,42 @@ Runtime data for `@hometrans/api-permission-declared`. This file is the **source
|
|
|
24
24
|
| Field | Meaning |
|
|
25
25
|
|---|---|
|
|
26
26
|
| `id` | Stable identifier (kebab/lower form of `module`). |
|
|
27
|
-
| `module` | Exact import specifier to match (`@kit.*` or `@
|
|
27
|
+
| `module` | Exact import specifier to match (`@kit.*`, `@ohos.*`, `@hms.*` or `@system.*`). |
|
|
28
28
|
| `aliases` | Other import specifiers that mean the same capability; both spellings are matched. |
|
|
29
29
|
| `permissions[].name` | Full `ohos.permission.*` name required by the import. |
|
|
30
30
|
| `permissions[].since` | Starting API level; `null` if the docs do not specify one. |
|
|
31
31
|
| `permissions[].level` | HarmonyOS permission level: `normal` or `system_basic`. |
|
|
32
32
|
| `permissions[].grant` | `system_grant`, `user_grant`, `restricted`, or `system_only`. |
|
|
33
|
-
| `permissions[].restricted` | `true` when ACL approval is needed. |
|
|
33
|
+
| `permissions[].restricted` | `true` when ACL approval (and an ACL entry in the signing profile) is needed. |
|
|
34
|
+
|
|
35
|
+
## 收录口径
|
|
36
|
+
|
|
37
|
+
- 基础 Kit 不进入映射:`@kit.AbilityKit`、`@kit.ArkUI`、`@kit.ArkData`、`@kit.BasicServicesKit`、`@ohos.app.*`、`@ohos.arkui.*`、`@ohos.window`、`@ohos.display`、`@ohos.deviceInfo`、`@ohos.data.relationalStore`、`@ohos.data.preferences`。这些模块几乎每个文件都会 import,Kit 级权限会变成成片误报。
|
|
38
|
+
- 已知取舍:因此 `import { request } from '@kit.BasicServicesKit'` 的上传下载不会再提示 `INTERNET`(`@ohos.request` 这种写法仍会提示,它有自己的表项)。这里优先避免基础 Kit 的成片误报;以后可在检查器里按具名导入(`request`)细分。
|
|
39
|
+
- enterprise / MDM 模块不进入映射。
|
|
40
|
+
- 只收录 `normal/*` 与 `…/ACL` 行,并剔除 `system_basic` / `system_core` + `system_grant` 的可选 ACL 能力(不该由一次 import 触发);手工保留的 `system_only` 条目见下一条。
|
|
41
|
+
- 剔除跨域的敏感权限:Kit 级大表会把定位、后台定位、相机、麦克风、蓝牙、WiFi、NFC、分布式同步等行挂到并不使用它们的模块上,而一次 import 不能证明调用点用到这些能力。已按模块收窄,括号内为保留项:
|
|
42
|
+
- `@kit.NetworkKit`、`@ohos.net.connection`:`INTERNET`、`GET_NETWORK_INFO`
|
|
43
|
+
- `@kit.ArkWeb`、`@ohos.web.webview`:`INTERNET`、`GET_NETWORK_INFO`
|
|
44
|
+
- `@kit.MediaKit`、`@ohos.multimedia.media`:`INTERNET`(AVPlayer 联网播放;相机、麦克风与已废弃的 `READ_MEDIA` 不计)
|
|
45
|
+
- `@kit.AudioKit`、`@ohos.multimedia.audio`:`MICROPHONE`(`VIBRATE`、`USE_BLUETOOTH`、`ACCESS_NOTIFICATION_POLICY` 属于其它域)
|
|
46
|
+
- `@kit.BackgroundTasksKit`:`KEEP_BACKGROUND_RUNNING`、`PUBLISH_AGENT_REMINDER`、`BACKGROUND_MANAGER_POWER_SAVE_MODE`(不含 `LOCATION_IN_BACKGROUND`)
|
|
47
|
+
- `@kit.ConnectivityKit`:`ACCESS_BLUETOOTH`、`DISCOVER_BLUETOOTH`、`USE_BLUETOOTH`、`ACCESS_NEARLINK`(定位、WiFi、NFC 交给各自的 `@ohos.*` 条目;`DISCOVER_BLUETOOTH` / `USE_BLUETOOTH` 是 API 10 前的写法,暂保留,待按项目 targetAPI 再评估)
|
|
48
|
+
- `@ohos.bluetooth.ble`、`@ohos.bluetooth.socket`:各自独立成条目,只含 `ACCESS_BLUETOOTH`(不再作为 ConnectivityKit 的别名继承 `ACCESS_NEARLINK` 与旧蓝牙权限)
|
|
49
|
+
- `@kit.CoreFileKit`、`@ohos.file.fs`:不进入映射(沙箱读写不需要权限;公共目录权限只在 PC/2in1 上有效,不该被最常见的文件 import 继承)
|
|
50
|
+
- `@ohos.file.environment`:`READ_WRITE_DOCUMENTS_DIRECTORY`、`READ_WRITE_DOWNLOAD_DIRECTORY`(PC/2in1 公共目录的唯一入口;`DISTRIBUTED_DATASYNC`、`FILE_ACCESS_PERSIST`、`READ_WRITE_DESKTOP_DIRECTORY` 不计)
|
|
51
|
+
- `@kit.CalendarKit`、`@ohos.calendarManager`:`READ_CALENDAR`、`WRITE_CALENDAR`(`READ_WHOLE_CALENDAR` / `WRITE_WHOLE_CALENDAR` 是 system_basic ACL,不随普通日历 import 上报)
|
|
52
|
+
- `@ohos.commonEventManager`(别名 `@ohos.commonEvent`):`COMMONEVENT_STICKY`(定位、蓝牙、WiFi、音量加密状态等行只对应具体系统事件,不是订阅公共事件本身的要求)
|
|
53
|
+
- `@kit.TelephonyKit`:`GET_NETWORK_INFO`(联系人 ACL 行属于 `@kit.ContactsKit` / `@ohos.telephony.vcard`)
|
|
54
|
+
- `@kit.PushKit`:不进入映射(唯一一行是后台定位,属于 `@hms.core.push.RemoteLocationExtensionAbility`)
|
|
55
|
+
- 取舍:`@kit.AudioKit` / `@ohos.multimedia.audio` 保留 `MICROPHONE`,`@kit.CameraKit` / `@ohos.multimedia.camera` 保留 `MICROPHONE`,因为 Kit 同时覆盖录制 / 录像;只播放或只拍照时这是「可能需要」的提示,gate 应按调用点判定为 `left`。
|
|
56
|
+
- 手工保留的 `system_only` 条目(`@ohos.telephony.call` → `PLACE_CALL`、`@ohos.telephony.sms` → `SEND_MESSAGES`)是有意例外:它们从旧映射沿用,用来提示调用方改用免权限方案;按全表重新生成映射时不要删掉,否则 `system_only` 提示只剩测试夹具在覆盖。
|
|
57
|
+
- ACL 行 `restricted: true`;`grant` 以 `references/permission-index.json` 为准,缺失时回退到表的 `SG`/`UG` 列。告警会同时提示优先使用 Picker / 安全控件,避免把 gate 直接引向申请 ACL。
|
|
34
58
|
|
|
35
59
|
## Adding a Kit / permission (new API level)
|
|
36
60
|
|
|
37
61
|
1. Append one entry to `entries`, or extend an existing entry's `permissions` array.
|
|
38
|
-
2. Keep entries sorted by `module` so the file stays reviewable.
|
|
62
|
+
2. Keep entries sorted by `module` and permissions sorted by `name` so the file stays reviewable.
|
|
39
63
|
3. Use the exact import specifier as written in source code. If a Kit can be imported through both `@kit.XxxKit` and `@ohos.xxx`, put one in `module` and the other in `aliases`.
|
|
40
64
|
4. Copy `since` / `level` / `grant` / `restricted` from the official permission list (`devecocli docs read` → 应用权限列表). For system-application-only permissions, use `grant: "system_only"`, `level: "system_basic"`, `since: null`, `restricted: true`.
|
|
41
65
|
5. Bump `version` and commit the JSON.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
|
-
"_comment": "Platform API argument/return contracts that the type system does not enforce. Keys are API method names (version-robust, matched on the last path segment of the callee signature). `receiver` gates the callee to its real owner so a project-local wrapper with the same name never fires; `allowText` lists the textual forms that are already the correct argument; `rejectText` lists the origins that produce the wrong buffer type.",
|
|
3
|
+
"_comment": "Platform API argument/return contracts that the type system does not enforce. Keys are API method names (version-robust, matched on the last path segment of the callee signature). `receiver` gates the callee to its real owner so a project-local wrapper with the same name never fires; `allowText` lists the textual forms that are already the correct argument; `rejectText` lists the origins that produce the wrong buffer type. `argKind: \"encoded\"` flips the polarity to a whitelist: the argument (or a local it is assigned from) must be produced by one of `encoders`, otherwise the finding is raised; `acceptWhen` lists alternative call forms that make the encoded argument unnecessary (a literal value for `equalsLiteral`, or a non-empty literal for `nonEmpty`).",
|
|
4
4
|
"argContracts": {
|
|
5
5
|
"createImageSource": {
|
|
6
6
|
"argIndex": 0,
|
|
@@ -20,6 +20,33 @@
|
|
|
20
20
|
".buffer.subarray(",
|
|
21
21
|
"as ArrayBuffer"
|
|
22
22
|
]
|
|
23
|
+
},
|
|
24
|
+
"loadData": {
|
|
25
|
+
"argIndex": 0,
|
|
26
|
+
"argKind": "encoded",
|
|
27
|
+
"expect": "Base64 或 URL 编码后的字符串(或 baseUrl/historyUrl 传非空)",
|
|
28
|
+
"receiver": "WebviewController\\.loadData",
|
|
29
|
+
"encoders": [
|
|
30
|
+
".encodeToStringSync(",
|
|
31
|
+
".encodeSync(",
|
|
32
|
+
"encodeURIComponent(",
|
|
33
|
+
"encodeURI("
|
|
34
|
+
],
|
|
35
|
+
"acceptWhen": [
|
|
36
|
+
{
|
|
37
|
+
"arg": 2,
|
|
38
|
+
"equalsLiteral": "base64"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"arg": 3,
|
|
42
|
+
"nonEmpty": true
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"arg": 4,
|
|
46
|
+
"nonEmpty": true
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"allowText": []
|
|
23
50
|
}
|
|
24
51
|
},
|
|
25
52
|
"nullableReturns": {
|
|
@@ -27,5 +54,23 @@
|
|
|
27
54
|
"type": "ImageSource",
|
|
28
55
|
"receiver": "multimedia\\.image|@kit\\.ImageKit|(?:^|[^.\\w$])image[.:]"
|
|
29
56
|
}
|
|
57
|
+
},
|
|
58
|
+
"sqlCapabilities": {
|
|
59
|
+
"_comment": "Compile-time SQLite features of the TARGET platform (resolved from the project's build-profile.json5 runtimeOS). `true`/`false` per module and tokenizer; a platform, module or tokenizer with no entry is silent. Only `false` produces a finding.",
|
|
60
|
+
"platformResolver": "build-profile.json5:app.products[0].runtimeOS",
|
|
61
|
+
"platforms": {
|
|
62
|
+
"HarmonyOS": {
|
|
63
|
+
"modules": {
|
|
64
|
+
"fts5": true
|
|
65
|
+
},
|
|
66
|
+
"tokenizers": {
|
|
67
|
+
"unicode61": true,
|
|
68
|
+
"ascii": true,
|
|
69
|
+
"porter": true,
|
|
70
|
+
"trigram": true,
|
|
71
|
+
"icu": false
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
30
75
|
}
|
|
31
76
|
}
|