@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
|
@@ -52,9 +52,10 @@ import { createHash } from 'node:crypto';
|
|
|
52
52
|
import * as fs from 'node:fs';
|
|
53
53
|
import * as path from 'node:path';
|
|
54
54
|
import { pathToFileURL } from 'node:url';
|
|
55
|
-
import { _replace } from './group_watch.mjs';
|
|
55
|
+
import { _replace, _uiModule } from './group_watch.mjs';
|
|
56
56
|
import { scrollableContainers, sourceDeclaresScroll, sourceFileFor } from './capture_audit.mjs';
|
|
57
57
|
import { scrollVerdict } from './scroll_verdict.mjs';
|
|
58
|
+
import * as mp from './module_placement.mjs';
|
|
58
59
|
|
|
59
60
|
// ---------------------------------------------------------------- Python compatibility layer
|
|
60
61
|
// These outputs are a contract read by other scripts and the agent and must match the original Python version byte for byte:
|
|
@@ -726,6 +727,62 @@ export function layoutFiles(node) {
|
|
|
726
727
|
return files;
|
|
727
728
|
}
|
|
728
729
|
|
|
730
|
+
/** Source files that can declare a Compose @Composable. */
|
|
731
|
+
const COMPOSE_SRC = /\.kt$/;
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* Without the source to read, a composable is taken as shared only when its file is named after it
|
|
735
|
+
* (`CaptureScaffold.kt`) or sits in a component-ish directory. A private `Item` the static stage resolved into
|
|
736
|
+
* another screen's file (`HomeScreen.kt`) is then not taken for a family of 7 pages.
|
|
737
|
+
*/
|
|
738
|
+
export function shareableByPath(file, via) {
|
|
739
|
+
const base = path.basename(file).replace(/\.kt$/, '');
|
|
740
|
+
return base === via || /[\\/](component|components|common|widget|widgets|designsystem|ui[\\/]theme)[\\/]/i.test(file);
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
/**
|
|
744
|
+
* `(file, via) → shareable?` for Compose shared-composable families. With the Android root it reads the file:
|
|
745
|
+
* a `private fun <via>(` cannot be called from another file, so pages that list it were resolved to the wrong
|
|
746
|
+
* declaration (each screen's own private `Item`). Unreadable files fall back to `shareableByPath`.
|
|
747
|
+
*/
|
|
748
|
+
export function composeShareable(sourceRoot) {
|
|
749
|
+
const cache = new Map();
|
|
750
|
+
return (file, via) => {
|
|
751
|
+
const k = `${file}#${via}`;
|
|
752
|
+
if (cache.has(k)) { return cache.get(k); }
|
|
753
|
+
let text = null;
|
|
754
|
+
if (sourceRoot) {
|
|
755
|
+
try { text = fs.readFileSync(path.join(sourceRoot, file), 'utf8'); } catch { text = null; }
|
|
756
|
+
}
|
|
757
|
+
const esc = via.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
758
|
+
const ok = text === null ? shareableByPath(file, via)
|
|
759
|
+
: new RegExp(`\\bfun\\s+(?:<[^>]*>\\s*)?${esc}\\s*\\(`).test(text)
|
|
760
|
+
&& !new RegExp(`\\bprivate\\s+(?:[A-Za-z@]+\\s+)*fun\\s+(?:<[^>]*>\\s*)?${esc}\\s*\\(`).test(text);
|
|
761
|
+
cache.set(k, ok);
|
|
762
|
+
return ok;
|
|
763
|
+
};
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* Compose shared composables a page is drawn through: a widget's `via` names the @Composable and `at` the file it
|
|
768
|
+
* is declared in (a2h-utg-static compose_widgets). Compose pages have no layout XML and no base class, so without
|
|
769
|
+
* this key eight CaptureScreens that all wrap `CaptureScaffold` became eight self-contained groups, each
|
|
770
|
+
* re-translating the scaffold on its own: three opened the settings sheet full-height, five half-height.
|
|
771
|
+
* A key held by one page only is dropped later (`holders < 2`); the page's own Screen composable is that case.
|
|
772
|
+
*/
|
|
773
|
+
export function composeKeys(node, shareable = shareableByPath) {
|
|
774
|
+
const keys = [];
|
|
775
|
+
for (const w of or(get(node, 'widgets'), [])) {
|
|
776
|
+
const via = get(w, 'via');
|
|
777
|
+
const f = stripLine(get(w, 'at'));
|
|
778
|
+
if (!truthy(via) || !f || !COMPOSE_SRC.test(f) || !/^[A-Z][A-Za-z0-9_]*$/.test(pyStr(via))) { continue; }
|
|
779
|
+
const key = `${f.replace(/\\/g, '/')}#${via}`;
|
|
780
|
+
if (keys.includes(key) || !shareable(f, pyStr(via))) { continue; }
|
|
781
|
+
keys.push(key);
|
|
782
|
+
}
|
|
783
|
+
return keys;
|
|
784
|
+
}
|
|
785
|
+
|
|
729
786
|
export function shortName(nodeId) {
|
|
730
787
|
const parts = nodeId.split(':');
|
|
731
788
|
const at = parts[parts.length - 1].split('@');
|
|
@@ -820,10 +877,11 @@ export function resolveRoles(g) {
|
|
|
820
877
|
return res;
|
|
821
878
|
}
|
|
822
879
|
|
|
823
|
-
export function templateKeys(node) {
|
|
880
|
+
export function templateKeys(node, shareable = shareableByPath) {
|
|
824
881
|
const keys = [];
|
|
825
882
|
if (truthy(get(node, 'extends_base'))) { keys.push(['base', node.extends_base]); }
|
|
826
883
|
for (const f of layoutFiles(node)) { keys.push(['layout', f]); }
|
|
884
|
+
for (const c of composeKeys(node, shareable)) { keys.push(['compose', c]); }
|
|
827
885
|
if (node.id.startsWith('pref-dialog:')) { keys.push(['family', 'pref-dialog']); }
|
|
828
886
|
// `fragment;base:ItemFilterDialog` names a real shared base; `base:Fragment`
|
|
829
887
|
// names the framework class every page shares, which is no template at all.
|
|
@@ -835,7 +893,25 @@ export function templateKeys(node) {
|
|
|
835
893
|
const tkey = (k) => pyRepr(k[0]) + '\u0000' + pyRepr(k[1]);
|
|
836
894
|
|
|
837
895
|
export function edgeView(e, end) {
|
|
838
|
-
|
|
896
|
+
const v = { [end]: e[end], mechanism: get(e, 'mechanism'), trigger: get(e, 'trigger') };
|
|
897
|
+
// What opening / dismissing an overlay also does to its host (a2h-utg-static `args.host_effects`:
|
|
898
|
+
// `{open: [{id, stmt, at, resolved}], dismiss: [...]}`). Absent on an older UTG.
|
|
899
|
+
const fx = get(get(e, 'args', {}) ?? {}, 'host_effects');
|
|
900
|
+
if (hasHostEffects(fx)) { v.host_effects = fx; }
|
|
901
|
+
return v;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
/** host_effects with at least one open / dismiss entry. */
|
|
905
|
+
export function hasHostEffects(fx) {
|
|
906
|
+
return !!fx && typeof fx === 'object' && ['open', 'dismiss'].some((k) => Array.isArray(fx[k]) && fx[k].length > 0);
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
/** Edges touching nid that carry host effects, viewed from nid (`source` / `target` names the other end). */
|
|
910
|
+
export function overlayEffectsOf(g, nid) {
|
|
911
|
+
const out = [];
|
|
912
|
+
for (const e of g.inbound.get(nid) ?? []) { if (hasHostEffects(get(get(e, 'args', {}) ?? {}, 'host_effects'))) { out.push({ ...edgeView(e, 'source'), target: nid }); } }
|
|
913
|
+
for (const e of g.outbound.get(nid) ?? []) { if (hasHostEffects(get(get(e, 'args', {}) ?? {}, 'host_effects'))) { out.push({ source: nid, ...edgeView(e, 'target') }); } }
|
|
914
|
+
return out;
|
|
839
915
|
}
|
|
840
916
|
|
|
841
917
|
const isEmptyish = (v) => v === null || v === undefined || (Array.isArray(v) && v.length === 0) ||
|
|
@@ -915,7 +991,59 @@ export function isEmbed(e) {
|
|
|
915
991
|
* roles: Map nid → role row; rows: Map nid → conversion_set node row;
|
|
916
992
|
* pageOrder: Map page-dir name → pages.json index; ranked: click-path order.
|
|
917
993
|
*/
|
|
918
|
-
|
|
994
|
+
/** The Harmony project above a ui_info / static workspace: the parent of the first `.hometrans` on the way up. */
|
|
995
|
+
export function projectOf(...dirs) {
|
|
996
|
+
for (const d of dirs) {
|
|
997
|
+
if (!truthy(d)) { continue; }
|
|
998
|
+
let p = path.resolve(String(d));
|
|
999
|
+
for (;;) {
|
|
1000
|
+
if (path.basename(p) === '.hometrans') { return path.dirname(p); }
|
|
1001
|
+
const up = path.dirname(p);
|
|
1002
|
+
if (up === p) { break; }
|
|
1003
|
+
p = up;
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
return null;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
/** module_placement.json (module_placement.mjs) as { file, ui_module, groups }, or null when absent / unreadable. */
|
|
1010
|
+
export function loadPlacement(hp) {
|
|
1011
|
+
if (!truthy(hp)) { return null; }
|
|
1012
|
+
const file = mp.placementPath(hp);
|
|
1013
|
+
const doc = readJson(file, null);
|
|
1014
|
+
if (!doc || typeof doc !== 'object' || Array.isArray(doc)) { return null; }
|
|
1015
|
+
const groups = doc.groups && typeof doc.groups === 'object' ? doc.groups : {};
|
|
1016
|
+
// without ui_module every placed write would carry a prefix, entry's included, while an unplaced group writes
|
|
1017
|
+
// the bare ETS path: the same file under two names, which shared-write detection would miss
|
|
1018
|
+
const uiModule = typeof doc.ui_module === 'string' && doc.ui_module.trim() ? normModule(doc.ui_module)
|
|
1019
|
+
: normModule(_uiModule(hp, readJson(path.join(hp, '.hometrans', 'batch_progress.json'), {}) ?? {}));
|
|
1020
|
+
return { file, ui_module: uiModule, groups };
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
const normModule = (s) => String(s).trim().replace(/\\/g, '/').replace(/^\.\//, '').replace(/\/+$/, '');
|
|
1024
|
+
|
|
1025
|
+
/** A group's placed module and its members placed elsewhere ({ module, members }), or null when unplaced. */
|
|
1026
|
+
function placementOf(placement, anc, mem) {
|
|
1027
|
+
const row = placement.groups[anc];
|
|
1028
|
+
if (!row || typeof row.module !== 'string' || !row.module.trim()) { return null; }
|
|
1029
|
+
const module = normModule(row.module);
|
|
1030
|
+
const members = {};
|
|
1031
|
+
for (const [n, v] of Object.entries(row.members ?? {})) {
|
|
1032
|
+
const m = typeof v === 'string' ? v : (v ?? {}).module;
|
|
1033
|
+
if (n !== anc && mem.includes(n) && typeof m === 'string' && m.trim() && normModule(m) !== module) {
|
|
1034
|
+
members[n] = normModule(m);
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
return { module, members };
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
/** An ETS-relative write in `mod`: unchanged in the UI module, project-relative with its module otherwise. */
|
|
1041
|
+
export function modulePath(uiModule, mod, w) {
|
|
1042
|
+
return !mod || mod === uiModule ? w : `${mod}/src/main/ets/${w}`;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
export function planGroups(g, roles, rows, pageOrder, ranked, entryOverride = null, prevIds = null, fullRoles = null,
|
|
1046
|
+
placement = null) {
|
|
919
1047
|
const roleOf = (nid) => (roles.get(nid) ?? {}).role; // roles.get(nid, {}).get("role")
|
|
920
1048
|
const pageIds = [...roles].filter(([, r]) => r.role === 'page').map(([nid]) => nid);
|
|
921
1049
|
|
|
@@ -1118,10 +1246,30 @@ export function planGroups(g, roles, rows, pageOrder, ranked, entryOverride = nu
|
|
|
1118
1246
|
// null), making every group an entry hit and the whole plan one serial lane.
|
|
1119
1247
|
const entryHit = truthy(entry) &&
|
|
1120
1248
|
(mem.includes(entry) || mem.some((n) => mountedOn.has(n) && mountedOn.get(n) === entry));
|
|
1249
|
+
// module_placement.json: the architecture's module for this group, and for a member it puts elsewhere.
|
|
1250
|
+
const placed = placement ? placementOf(placement, anc, mem) : null;
|
|
1251
|
+
if (placed) {
|
|
1252
|
+
const modOf = (w) => {
|
|
1253
|
+
for (const n of mem) {
|
|
1254
|
+
if (n === anc) { continue; }
|
|
1255
|
+
if (w === `components/${pageBase(n)}${isOverlay(g.nodes.get(n)) ? 'Dialog' : 'Component'}.ets`) {
|
|
1256
|
+
return placed.members[n] ?? placed.module;
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
return placed.module;
|
|
1260
|
+
};
|
|
1261
|
+
const moved = [...writes].map((w) => modulePath(placement.ui_module, modOf(w), w));
|
|
1262
|
+
writes.clear();
|
|
1263
|
+
for (const w of moved) { writes.add(w); }
|
|
1264
|
+
for (const [k, v] of Object.entries(legacy)) {
|
|
1265
|
+
delete legacy[k];
|
|
1266
|
+
legacy[modulePath(placement.ui_module, modOf(k), k)] = modulePath(placement.ui_module, modOf(k), v);
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1121
1269
|
if (entryHit) { writes.add('ENTRY_PAGE'); }
|
|
1122
1270
|
const fam = new Set();
|
|
1123
1271
|
for (const n of mem) {
|
|
1124
|
-
for (const k of templateKeys(g.nodes.get(n))) { fam.add(`${pyStr(k[0])}:${pyStr(k[1])}`); }
|
|
1272
|
+
for (const k of templateKeys(g.nodes.get(n), g.composeShareable)) { fam.add(`${pyStr(k[0])}:${pyStr(k[1])}`); }
|
|
1125
1273
|
}
|
|
1126
1274
|
groups.push({
|
|
1127
1275
|
anchor: anc,
|
|
@@ -1129,6 +1277,8 @@ export function planGroups(g, roles, rows, pageOrder, ranked, entryOverride = nu
|
|
|
1129
1277
|
page_dirs: mem.flatMap((n) => get(rows.get(n), 'page_dirs', [])),
|
|
1130
1278
|
tier: tiers.has('captured') ? 'captured' : 'source-only',
|
|
1131
1279
|
mixed_tier: tiers.size > 1,
|
|
1280
|
+
...(placed ? { module: placed.module } : {}),
|
|
1281
|
+
...(placed && Object.keys(placed.members).length ? { member_modules: placed.members } : {}),
|
|
1132
1282
|
predicted_writes: sortedBy([...writes]),
|
|
1133
1283
|
...(Object.keys(legacy).length ? { legacy_writes: legacy } : {}),
|
|
1134
1284
|
_fam: fam, _entry: entryHit, _is_entry: mem.includes(entry),
|
|
@@ -1244,6 +1394,17 @@ export function planGroups(g, roles, rows, pageOrder, ranked, entryOverride = nu
|
|
|
1244
1394
|
}
|
|
1245
1395
|
gr.reuse_from = reuse;
|
|
1246
1396
|
gr.after = after;
|
|
1397
|
+
// A family whose holders live in different modules cannot be written into the leader's own feature module:
|
|
1398
|
+
// the other modules would have to depend on a feature HAR. The leader is told to put it into common/.
|
|
1399
|
+
const leads = [...leader].filter(([, l]) => l === gr).map(([f]) => f);
|
|
1400
|
+
if (leads.length) {
|
|
1401
|
+
const shared = [];
|
|
1402
|
+
for (const f of leads) {
|
|
1403
|
+
const mods = sortedBy([...new Set(groups.filter((o) => o._fam.has(f)).map((o) => o.module).filter(truthy))]);
|
|
1404
|
+
if (mods.length > 1) { shared.push({ family: f, modules: mods }); }
|
|
1405
|
+
}
|
|
1406
|
+
if (shared.length) { gr.shared_families = shared; }
|
|
1407
|
+
}
|
|
1247
1408
|
if (gr.members.length > MAX_GROUP) {
|
|
1248
1409
|
gr.warning = `${gr.members.length} members > ${MAX_GROUP}: review in Step 4.2, split routed-looking members`;
|
|
1249
1410
|
}
|
|
@@ -1266,7 +1427,9 @@ export function planGroups(g, roles, rows, pageOrder, ranked, entryOverride = nu
|
|
|
1266
1427
|
// the overlay's own file (same naming as the writes above), not the owner group's first component:
|
|
1267
1428
|
// an owner anchored on a page writes several components
|
|
1268
1429
|
const own = og.anchor === t ? `components/${base(t)}Dialog.ets` : `components/${pageBase(t)}Dialog.ets`;
|
|
1269
|
-
|
|
1430
|
+
// the owner's write may carry its module prefix (module_placement): match on the ETS-relative path and
|
|
1431
|
+
// hand the host the path as the owner writes it
|
|
1432
|
+
owned.set(t, { node: t, group: og.id, file: og.predicted_writes.find((w) => etsRel(w) === own) ?? null });
|
|
1270
1433
|
}
|
|
1271
1434
|
}
|
|
1272
1435
|
if (owned.size) { gr.overlays_owned_elsewhere = sortedBy([...owned.values()], (o) => o.node); }
|
|
@@ -1481,17 +1644,44 @@ export function applySupplement(plan, scopeDoc) {
|
|
|
1481
1644
|
}
|
|
1482
1645
|
}
|
|
1483
1646
|
|
|
1484
|
-
/**
|
|
1485
|
-
|
|
1486
|
-
|
|
1647
|
+
/**
|
|
1648
|
+
* A path as `<module>|<ETS-relative path>`. A bare ETS-relative path (a UI-module write, or an
|
|
1649
|
+
* existing.json `existing` entry, which names no module) belongs to `uiModule`.
|
|
1650
|
+
*/
|
|
1651
|
+
export function moduleKey(p, uiModule) {
|
|
1652
|
+
const s = pyStr(p).replace(/\\/g, '/').replace(/^\.\//, '');
|
|
1653
|
+
const i = s.lastIndexOf('/src/main/ets/');
|
|
1654
|
+
if (i >= 0) { return `${s.slice(0, i)}|${s.slice(i + '/src/main/ets/'.length)}`; }
|
|
1655
|
+
return `${uiModule}|${s.startsWith('src/main/ets/') ? s.slice('src/main/ets/'.length) : s}`;
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
/**
|
|
1659
|
+
* The existing files of an existing.json as module-qualified paths: its `files` rows
|
|
1660
|
+
* (`{module, path}`, list_existing.mjs) when present, else its bare `existing` list.
|
|
1661
|
+
*/
|
|
1662
|
+
export function readExisting(p) {
|
|
1663
|
+
const v = readJson(p, null);
|
|
1664
|
+
const rows = Array.isArray(get(v, 'files')) ? v.files.filter((f) => truthy(get(f, 'module')) && truthy(get(f, 'path'))) : [];
|
|
1665
|
+
if (rows.length) { return rows.map((f) => `${f.module}/src/main/ets/${f.path}`); }
|
|
1666
|
+
return readList(p, ['existing']);
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
/**
|
|
1670
|
+
* Incremental: mark groups that write existing files, and make sure one group goes first.
|
|
1671
|
+
* A write matches an existing file of its own module only: a group placed in features/x does not
|
|
1672
|
+
* "edit" pages/X.ets because the UI module has one (a previous run's misplacement).
|
|
1673
|
+
*/
|
|
1674
|
+
export function applyIncremental(plan, existing, uiModule = 'entry') {
|
|
1675
|
+
const have = new Set([...existing].map((x) => moduleKey(x, uiModule)));
|
|
1676
|
+
const exists = (w) => have.has(moduleKey(w, uiModule));
|
|
1487
1677
|
for (const gr of plan.groups) {
|
|
1488
1678
|
// A per-instance write that does not exist yet, while the shared name it replaced does: the project
|
|
1489
1679
|
// was converted before the split, so the group edits that file (and shares it, serialised, with the
|
|
1490
1680
|
// other instances) instead of creating a parallel one next to it.
|
|
1491
1681
|
const legacy = gr.legacy_writes ?? {};
|
|
1492
1682
|
gr.predicted_writes = sortedBy([...new Set(gr.predicted_writes.map((w) =>
|
|
1493
|
-
(!
|
|
1494
|
-
const hits = gr.predicted_writes.filter((w) =>
|
|
1683
|
+
(!exists(w) && legacy[w] !== undefined && exists(legacy[w]) ? legacy[w] : w)))]);
|
|
1684
|
+
const hits = gr.predicted_writes.filter((w) => exists(w));
|
|
1495
1685
|
if (!hits.length) { continue; }
|
|
1496
1686
|
gr.existing_writes = hits;
|
|
1497
1687
|
if (gr.class === 'host-chain') { continue; }
|
|
@@ -1660,6 +1850,11 @@ export function pageScroll(uiInfo, dirs, source = null) {
|
|
|
1660
1850
|
export function build(ws, uiInfo, entry = null, renumber = false, exploring = false,
|
|
1661
1851
|
{ scope = null, existing = null, source = null } = {}) {
|
|
1662
1852
|
const g = new Graph(readJson(path.join(ws, 'utg.json')));
|
|
1853
|
+
// Compose shared-composable families read the Android source to drop private composables; the static stage
|
|
1854
|
+
// records the project root in pipeline_summary.json, so --source is only an override.
|
|
1855
|
+
g.composeShareable = composeShareable(source
|
|
1856
|
+
?? (() => { const r = get(or(readJson(path.join(ws, 'pipeline_summary.json'), {}), {}), 'project');
|
|
1857
|
+
return truthy(r) && isDir(pyStr(r)) ? pyStr(r) : null; })());
|
|
1663
1858
|
const prevSet = or(readJson(path.join(uiInfo, 'conversion_set.json'), {}), {});
|
|
1664
1859
|
const rawPaths = get(or(readJson(path.join(ws, 'click_paths.json'), {}), {}), 'paths', {});
|
|
1665
1860
|
// Map, not a plain object: node ids are keys and insertion order is the contract.
|
|
@@ -1695,7 +1890,7 @@ export function build(ws, uiInfo, entry = null, renumber = false, exploring = fa
|
|
|
1695
1890
|
const tmplIndex = new Map();
|
|
1696
1891
|
for (const [nid, dirs] of captured) {
|
|
1697
1892
|
if (g.nodes.has(nid)) {
|
|
1698
|
-
for (const k of templateKeys(g.nodes.get(nid))) { setdefault(tmplIndex, tkey(k), []).push(...dirs); }
|
|
1893
|
+
for (const k of templateKeys(g.nodes.get(nid), g.composeShareable)) { setdefault(tmplIndex, tkey(k), []).push(...dirs); }
|
|
1699
1894
|
}
|
|
1700
1895
|
}
|
|
1701
1896
|
|
|
@@ -1818,7 +2013,7 @@ export function build(ws, uiInfo, entry = null, renumber = false, exploring = fa
|
|
|
1818
2013
|
const pdir = path.join(uiInfo, slug);
|
|
1819
2014
|
fs.mkdirSync(pdir, { recursive: true });
|
|
1820
2015
|
const templates = [];
|
|
1821
|
-
for (const k of templateKeys(node)) {
|
|
2016
|
+
for (const k of templateKeys(node, g.composeShareable)) {
|
|
1822
2017
|
for (const d of tmplIndex.get(tkey(k)) ?? []) {
|
|
1823
2018
|
if (!pyIn(d, templates)) { templates.push(d); }
|
|
1824
2019
|
}
|
|
@@ -1910,6 +2105,16 @@ export function build(ws, uiInfo, entry = null, renumber = false, exploring = fa
|
|
|
1910
2105
|
for (const [nid, dirs] of captured) {
|
|
1911
2106
|
if (get(roles.get(nid), 'role') !== 'page') { continue; }
|
|
1912
2107
|
for (const d of dirs ?? []) { writeDemotion(d, demoted.get(nid) ?? null); }
|
|
2108
|
+
// A captured meta.json has no reached_from / navigates_to: the overlay edges that carry host effects
|
|
2109
|
+
// go in as overlay_effects, the same edge views a source-only page lists.
|
|
2110
|
+
const fx = g.nodes.has(nid) ? overlayEffectsOf(g, nid) : [];
|
|
2111
|
+
for (const d of dirs ?? []) {
|
|
2112
|
+
const file = path.join(uiInfo, pathName(String(d)), 'meta.json');
|
|
2113
|
+
const meta = or(readJson(file), null);
|
|
2114
|
+
if (!meta) { continue; }
|
|
2115
|
+
if (fx.length) { meta.overlay_effects = fx; } else if (meta.overlay_effects !== undefined) { delete meta.overlay_effects; } else { continue; }
|
|
2116
|
+
writeJson(file, meta);
|
|
2117
|
+
}
|
|
1913
2118
|
}
|
|
1914
2119
|
// pages.json rows feed Step 4.1 and group_queue: a demoted page must not read "captured" there.
|
|
1915
2120
|
if (demoted.size) {
|
|
@@ -1956,8 +2161,15 @@ export function build(ws, uiInfo, entry = null, renumber = false, exploring = fa
|
|
|
1956
2161
|
const fullOrder = new Map(old.map((p, i) => [pathName(p.page_dir), i]));
|
|
1957
2162
|
entry = planGroups(g, fullRoles, full, fullOrder, ranked, null, null).entry_node;
|
|
1958
2163
|
}
|
|
2164
|
+
// The architecture's module per group (module_placement.mjs); without the file every group writes the UI module.
|
|
2165
|
+
const placement = loadPlacement(projectOf(uiInfo, ws));
|
|
1959
2166
|
const plan = planGroups(g, roles, new Map(nodesOut.map((r) => [r.node, r])), pageOrder, ranked, entry, prevIds,
|
|
1960
|
-
scopeIds ? fullRoles : null);
|
|
2167
|
+
scopeIds ? fullRoles : null, placement);
|
|
2168
|
+
if (placement) {
|
|
2169
|
+
plan.placement = { file: pathStr(placement.file), ui_module: placement.ui_module,
|
|
2170
|
+
unplaced: plan.groups.filter((gr) => !gr.module).map((gr) => gr.anchor) };
|
|
2171
|
+
}
|
|
2172
|
+
summary.placement = !placement ? 'missing' : (plan.placement.unplaced.length ? 'incomplete' : 'complete');
|
|
1961
2173
|
const gs = plan.groups;
|
|
1962
2174
|
// Carry the hard scroll gap (fake completion) onto the group so group_queue can hold it; a
|
|
1963
2175
|
// degraded sweep is listed as scroll_degraded (group_pack's SINGLE VIEWPORT banner), not held.
|
|
@@ -1990,7 +2202,10 @@ export function build(ws, uiInfo, entry = null, renumber = false, exploring = fa
|
|
|
1990
2202
|
// Exploration still running: captured groups may start, source-only ones
|
|
1991
2203
|
// are held -- their tier is not final until the explorer settles.
|
|
1992
2204
|
if (scopeIds) {
|
|
1993
|
-
|
|
2205
|
+
const hp = projectOf(uiInfo, ws);
|
|
2206
|
+
const uiModule = placement?.ui_module
|
|
2207
|
+
?? (hp ? normModule(_uiModule(hp, readJson(path.join(hp, '.hometrans', 'batch_progress.json'), {}) ?? {})) : 'entry');
|
|
2208
|
+
applyIncremental(plan, truthy(existing) ? readExisting(existing) : [], uiModule);
|
|
1994
2209
|
applySupplement(plan, scopeDoc.doc);
|
|
1995
2210
|
plan.mode = 'incremental';
|
|
1996
2211
|
plan.scope = sortedBy([...new Set(scopeIds)]);
|
|
@@ -2023,7 +2238,15 @@ export function build(ws, uiInfo, entry = null, renumber = false, exploring = fa
|
|
|
2023
2238
|
} else {
|
|
2024
2239
|
fs.rmSync(path.join(uiInfo, 'pages_captured.json'), { force: true }); // pages.json holds them all again
|
|
2025
2240
|
}
|
|
2026
|
-
|
|
2241
|
+
// Every edge with host effects, for the Phase 5 / Step 5.5 effect check (phase5_check overlay-effect-uncovered).
|
|
2242
|
+
const overlayEffects = [];
|
|
2243
|
+
for (const nid of sortedBy([...g.nodes.keys()])) {
|
|
2244
|
+
for (const e of g.outbound.get(nid) ?? []) {
|
|
2245
|
+
if (hasHostEffects(get(get(e, 'args', {}) ?? {}, 'host_effects'))) { overlayEffects.push({ source: nid, ...edgeView(e, 'target') }); }
|
|
2246
|
+
}
|
|
2247
|
+
}
|
|
2248
|
+
writeJson(path.join(uiInfo, 'conversion_set.json'),
|
|
2249
|
+
{ summary, nodes: nodesOut, plan, ...(overlayEffects.length ? { overlay_effects: overlayEffects } : {}) });
|
|
2027
2250
|
return summary;
|
|
2028
2251
|
}
|
|
2029
2252
|
|
|
@@ -94,9 +94,14 @@ export function select(hp, gid) {
|
|
|
94
94
|
};
|
|
95
95
|
// its own report names unpredicted files it wrote: they are ours, not up for grabs
|
|
96
96
|
for (const f of named(gid)) own.add(key(f));
|
|
97
|
+
// a verified group whose checkpoint commit failed (group_pass: queue_logs/commit_pending.json) still
|
|
98
|
+
// waits for its own commit: its files are held, or the next group's commit would take them
|
|
99
|
+
let pending = {};
|
|
100
|
+
try { pending = JSON.parse(fs.readFileSync(path.join(meta, 'queue_logs', 'commit_pending.json'), 'utf8')) ?? {}; } catch { pending = {}; }
|
|
97
101
|
for (const [o, g] of plan) {
|
|
98
102
|
if (o === gid || ac.truthy(ac.get(g, 'verify_only'))) continue;
|
|
99
|
-
|
|
103
|
+
const waiting = Object.hasOwn(pending, o);
|
|
104
|
+
if (!waiting && (SETTLED.has(ac.get(ac.get(states, o, {}), 'state')) || gq._progressDone(hp, g))) continue;
|
|
100
105
|
// an unsettled group's files, predicted or named in its report, wait for its own commit
|
|
101
106
|
for (const f of [...predicted(hp, ets, g), ...named(o)]) if (!own.has(key(f))) hold.add(key(f));
|
|
102
107
|
}
|
|
@@ -37,6 +37,7 @@ import * as path from 'node:path';
|
|
|
37
37
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
38
38
|
import { scrollableContainers } from './capture_audit.mjs';
|
|
39
39
|
import { scrollVerdict } from './scroll_verdict.mjs';
|
|
40
|
+
import { edgesInScope, loadEffects, renderEffectsSection } from './overlay_effects.mjs';
|
|
40
41
|
|
|
41
42
|
/** A doc heading / evidence name quoted the way the docs quote it: 「name」 in zh, "name" in en. */
|
|
42
43
|
const quoteName = (s) => (`「${s}」`);
|
|
@@ -1621,6 +1622,11 @@ export function render(group, pack, idx, hres, android, uiInfo = null, { inline
|
|
|
1621
1622
|
''];
|
|
1622
1623
|
lines.push(...renderExistingWrites(group));
|
|
1623
1624
|
lines.push(...renderSupplement(group));
|
|
1625
|
+
// What opening / dismissing an overlay of this group also does to its host (overlay_effects.mjs)
|
|
1626
|
+
if (uiInfo !== null) {
|
|
1627
|
+
const members = new Set(pyIter(or(dget(group, 'members'), [])).map((m) => pyStr(dget(m, 'node'))));
|
|
1628
|
+
lines.push(...renderEffectsSection(edgesInScope(loadEffects(uiInfo), { members })));
|
|
1629
|
+
}
|
|
1624
1630
|
if (uiInfo !== null) { lines.push(...renderEvidence(referenceEvidence(group, uiInfo))); }
|
|
1625
1631
|
lines.push(...renderCards([...pack.files.values()].map(([p]) => pathStr(p))));
|
|
1626
1632
|
const idxRows = uiInfo !== null ? mappingIndex(usedNames(pack, uiInfo, group)) : [];
|