@buaa_smat/hometrans 0.1.20 → 26.0.0-devecocli.2
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/agents/build-fixer.md +406 -0
- package/agents/code-reviewer.md +461 -496
- package/agents/model-render-worker.md +34 -0
- package/agents/model-worker.md +23 -0
- package/agents/specgen-worker.md +18 -0
- package/commands/hometrans.md +17 -0
- package/devecocli-plugin/common.ts +2203 -0
- package/devecocli-plugin/install.ts +61 -0
- package/devecocli-plugin/uninstall.ts +26 -0
- package/devecocli-plugin/update.ts +66 -0
- package/index.js +1418 -0
- package/package.json +81 -64
- package/platforms/atomcode/agents/build-fixer.frontmatter.md +6 -0
- package/platforms/atomcode/agents/code-reviewer.frontmatter.md +6 -0
- package/platforms/atomcode/agents/model-render-worker.frontmatter.md +6 -0
- package/platforms/atomcode/agents/model-worker.frontmatter.md +6 -0
- package/platforms/atomcode/agents/specgen-worker.frontmatter.md +6 -0
- package/platforms/deveco/agents/build-fixer.frontmatter.md +5 -0
- package/platforms/deveco/agents/code-reviewer.frontmatter.md +5 -0
- package/platforms/deveco/agents/model-render-worker.frontmatter.md +5 -0
- package/platforms/deveco/agents/model-worker.frontmatter.md +5 -0
- package/platforms/deveco/agents/specgen-worker.frontmatter.md +5 -0
- package/platforms/opencode/agents/build-fixer.frontmatter.md +5 -0
- package/platforms/opencode/agents/code-reviewer.frontmatter.md +5 -0
- package/platforms/opencode/agents/model-render-worker.frontmatter.md +5 -0
- package/platforms/opencode/agents/model-worker.frontmatter.md +5 -0
- package/platforms/opencode/agents/specgen-worker.frontmatter.md +5 -0
- package/plugin.jsonc +12 -0
- package/skills/a2h-app-migrate/SKILL.md +181 -0
- package/skills/a2h-app-migrate/references/config.example.json +27 -0
- package/skills/a2h-app-migrate/references/specs.example.json +19 -0
- package/skills/a2h-app-migrate/references/stage-map.md +33 -0
- package/skills/a2h-app-migrate/references/workflow.yaml +1600 -0
- package/skills/a2h-app-migrate/scripts/android_index.mjs +109 -0
- package/skills/a2h-app-migrate/scripts/check_arch_done.mjs +80 -0
- package/skills/a2h-app-migrate/scripts/check_module_docs_done.mjs +95 -0
- package/skills/a2h-app-migrate/scripts/check_signing.mjs +152 -0
- package/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +114 -0
- package/skills/a2h-app-migrate/scripts/check_spec_pipeline_done.mjs +277 -0
- package/skills/a2h-app-migrate/scripts/check_ui_batch_done.mjs +77 -0
- package/skills/a2h-app-migrate/scripts/check_utg_static_done.mjs +147 -0
- package/skills/a2h-app-migrate/scripts/cli_values.mjs +32 -0
- package/skills/a2h-app-migrate/scripts/env_preflight.mjs +1388 -0
- package/skills/a2h-app-migrate/scripts/human_review_gate.mjs +651 -0
- package/skills/a2h-app-migrate/scripts/infer_android_root.mjs +53 -0
- package/skills/a2h-app-migrate/scripts/json_io.mjs +35 -0
- package/skills/a2h-app-migrate/scripts/ledger.mjs +104 -0
- package/skills/a2h-app-migrate/scripts/lib-yaml-lite.mjs +288 -0
- package/skills/a2h-app-migrate/scripts/paths_preflight.mjs +713 -0
- package/skills/a2h-app-migrate/scripts/resume_plan.mjs +205 -0
- package/skills/a2h-app-migrate/scripts/reuse_static_utg.mjs +121 -0
- package/skills/a2h-app-migrate/scripts/run_dir.mjs +212 -0
- package/skills/a2h-app-migrate/scripts/spec_layout.mjs +30 -0
- package/skills/a2h-app-migrate/scripts/validate_workflow.mjs +455 -0
- package/skills/a2h-app-migrate/test/test_android_index.mjs +80 -0
- package/skills/a2h-app-migrate/test/test_apk_preflight.mjs +63 -0
- package/skills/a2h-app-migrate/test/test_arch_done.mjs +54 -0
- package/skills/a2h-app-migrate/test/test_build_fixer_contract.mjs +92 -0
- package/skills/a2h-app-migrate/test/test_config_example.mjs +42 -0
- package/skills/a2h-app-migrate/test/test_entry_guards.mjs +93 -0
- package/skills/a2h-app-migrate/test/test_env_requirements.mjs +505 -0
- package/skills/a2h-app-migrate/test/test_finalize.mjs +89 -0
- package/skills/a2h-app-migrate/test/test_gate_checkpoint.mjs +146 -0
- package/skills/a2h-app-migrate/test/test_hmos_fingerprint.mjs +68 -0
- package/skills/a2h-app-migrate/test/test_infer_android_root.mjs +91 -0
- package/skills/a2h-app-migrate/test/test_interaction.mjs +122 -0
- package/skills/a2h-app-migrate/test/test_json_io.mjs +32 -0
- package/skills/a2h-app-migrate/test/test_leaf_questions.mjs +109 -0
- package/skills/a2h-app-migrate/test/test_module_docs_done.mjs +53 -0
- package/skills/a2h-app-migrate/test/test_parse_args.mjs +69 -0
- package/skills/a2h-app-migrate/test/test_preflight_report.mjs +83 -0
- package/skills/a2h-app-migrate/test/test_resume_plan.mjs +144 -0
- package/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +100 -0
- package/skills/a2h-app-migrate/test/test_run_dir.mjs +315 -0
- package/skills/a2h-app-migrate/test/test_skill_doc.mjs +133 -0
- package/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +133 -0
- package/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +158 -0
- package/skills/a2h-app-migrate/test/test_spec_pipeline_done.mjs +181 -0
- package/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +76 -0
- package/skills/a2h-app-migrate/test/test_ui_batch_done.mjs +53 -0
- package/skills/a2h-app-migrate/test/test_ui_batch_gate.mjs +226 -0
- package/skills/a2h-app-migrate/test/test_utg_dirs.mjs +39 -0
- package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +168 -0
- package/skills/a2h-app-migrate/test/test_validate_races.mjs +50 -0
- package/skills/a2h-arch-generate/SKILL.md +375 -0
- package/skills/a2h-arch-generate/examples/reconcile-existing-project.md +107 -0
- package/skills/a2h-arch-generate/examples/simple-conversion-android.md +103 -0
- package/skills/a2h-arch-generate/examples/simple-conversion-backend.md +70 -0
- package/skills/a2h-arch-generate/examples/simple-conversion-uniapp.md +106 -0
- package/skills/a2h-arch-generate/references/artifact-contracts.generate.md +120 -0
- package/skills/a2h-arch-generate/references/artifact-contracts.reconcile.md +123 -0
- package/skills/a2h-arch-generate/references/bpta-layered-architecture-design.md +88 -0
- package/skills/a2h-arch-generate/references/clustering-guidance.md +33 -0
- package/skills/a2h-arch-generate/references/database-schema-recovery.md +107 -0
- package/skills/a2h-arch-generate/references/existing-target-annotation.md +68 -0
- package/skills/a2h-arch-generate/references/harmony-project-inspection.md +150 -0
- package/skills/a2h-arch-generate/references/harmony-target-architecture.md +94 -0
- package/skills/a2h-arch-generate/references/homegraph-workflow.md +120 -0
- package/skills/a2h-arch-generate/references/module-evidence-subagent.md +45 -0
- package/skills/a2h-arch-generate/references/reconciliation-model.md +204 -0
- package/skills/a2h-arch-generate/references/scope-policy.md +28 -0
- package/skills/a2h-arch-generate/references/semantic-review.md +65 -0
- package/skills/a2h-arch-generate/references/source-baseline.md +93 -0
- package/skills/a2h-arch-generate/references/source-ecosystems.md +54 -0
- package/skills/a2h-arch-generate/references/transformation-model.md +78 -0
- package/skills/a2h-arch-generate/scripts/check_module_staleness.mjs +284 -0
- package/skills/a2h-arch-generate/scripts/cleanup_intermediates.mjs +260 -0
- package/skills/a2h-arch-generate/scripts/compute_processing_order.mjs +325 -0
- package/skills/a2h-arch-generate/scripts/create_project.mjs +149 -0
- package/skills/a2h-arch-generate/scripts/dump_core_facts.mjs +151 -0
- package/skills/a2h-arch-generate/scripts/extract_core_components.mjs +167 -0
- package/skills/a2h-arch-generate/scripts/generate_source_baseline.mjs +363 -0
- package/skills/a2h-arch-generate/scripts/generate_state.mjs +60 -0
- package/skills/a2h-arch-generate/scripts/inspect_and_route.mjs +326 -0
- package/skills/a2h-arch-generate/scripts/inspect_android_project.mjs +3739 -0
- package/skills/a2h-arch-generate/scripts/inspect_harmony_target.mjs +800 -0
- package/skills/a2h-arch-generate/scripts/inspect_project.mjs +251 -0
- package/skills/a2h-arch-generate/scripts/inspect_uniapp_project.mjs +809 -0
- package/skills/a2h-arch-generate/scripts/lib/py_compat.mjs +1454 -0
- package/skills/a2h-arch-generate/scripts/module_create/create.mjs +136 -0
- package/skills/a2h-arch-generate/scripts/module_create/generate.mjs +636 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/build-profile.json5 +33 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/hvigorfile.ts +6 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/obfuscation-rules.txt +23 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/oh-package.json5 +10 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/ets/applicationability/ApplicationAbility.ets +43 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/ets/pages/Index.ets +23 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/module.json5 +26 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/element/color.json +8 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/element/float.json +8 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/element/string.json +16 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/media/background.png +0 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/media/foreground.png +0 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/media/layered_image.json +7 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/media/startIcon.png +0 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/profile/main_pages.json +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/mock/mock-config.json5 +2 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/ohosTest/ets/test/Ability.test.ets +35 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/ohosTest/ets/test/List.test.ets +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/ohosTest/module.json5 +11 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/test/List.test.ets +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/test/LocalUnit.test.ets +33 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/Index.ets +1 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/build-profile.json5 +36 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/hvigorfile.ts +6 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/obfuscation-rules.txt +23 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/oh-package.json5 +9 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/main/ets/components/MainPage.ets +19 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/main/module.json5 +9 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/main/resources/base/element/float.json +8 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/main/resources/base/element/string.json +8 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/ohosTest/ets/test/Ability.test.ets +35 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/ohosTest/ets/test/List.test.ets +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/ohosTest/module.json5 +11 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/test/List.test.ets +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/test/LocalUnit.test.ets +33 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/Index.ets +1 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/build-profile.json5 +36 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/consumer-rules.txt +0 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/hvigorfile.ts +6 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/obfuscation-rules.txt +23 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/oh-package.json5 +10 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/main/ets/pages/Index.ets +20 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/main/ets/utils/Calc.ets +3 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/main/module.json5 +12 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/main/resources/base/element/float.json +8 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/main/resources/base/element/string.json +8 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/main/resources/base/profile/main_pages.json +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/ohosTest/ets/test/Ability.test.ets +35 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/ohosTest/ets/test/List.test.ets +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/ohosTest/module.json5 +11 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/test/List.test.ets +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/test/LocalUnit.test.ets +33 -0
- package/skills/a2h-arch-generate/scripts/module_create/testdata/reconcile-layer-PROJECT_DESIGN.md +47 -0
- package/skills/a2h-arch-generate/scripts/module_create/testdata/single-entry-PROJECT_DESIGN.md +15 -0
- package/skills/a2h-arch-generate/scripts/module_create/testdata/three-layer-PROJECT_DESIGN.md +36 -0
- package/skills/a2h-arch-generate/scripts/module_create/testdata/verification-report.md +150 -0
- package/skills/a2h-arch-generate/scripts/resolve_android_stores.mjs +529 -0
- package/skills/a2h-arch-generate/scripts/scaffold_project.mjs +230 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/app/build.gradle +11 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/app/src/main/AndroidManifest.xml +12 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/app/src/main/java/com/example/notes/MainActivity.kt +8 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/app/src/main/java/com/example/notes/NotesStore.kt +17 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/build.gradle +3 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/settings.gradle +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/AppScope/app.json5 +8 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/build-profile.json5 +14 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/common/utils/build-profile.json5 +7 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/common/utils/oh-package.json5 +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/common/utils/src/main/ets/utils/Format.ets +3 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/home/build-profile.json5 +7 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/home/oh-package.json5 +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/home/src/main/ets/pages/Home.ets +3 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/sync/build-profile.json5 +7 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/sync/oh-package.json5 +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/sync/src/main/ets/engine/SyncEngine.ets +3 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/hvigorfile.ts +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/oh-package.json5 +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/products/app/build-profile.json5 +7 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/products/app/oh-package.json5 +9 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/products/app/src/main/ets/pages/Index.ets +7 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/App.vue +10 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/manifest.json +6 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/pages/index/index.vue +16 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/pages.json +5 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/run_e2e.mjs +548 -0
- package/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +1122 -0
- package/skills/a2h-arch-generate/scripts/tests/test_cleanup.mjs +191 -0
- package/skills/a2h-arch-generate/scripts/tests/test_console_encoding.mjs +52 -0
- package/skills/a2h-arch-generate/scripts/tests/test_git_root.mjs +34 -0
- package/skills/a2h-arch-generate/scripts/tests/test_router.mjs +138 -0
- package/skills/a2h-arch-generate/scripts/validate_architecture_docs.mjs +829 -0
- package/skills/a2h-arch-generate/scripts/validate_data_docs.mjs +937 -0
- package/skills/a2h-arch-generate/scripts/validate_homegraph_artifacts.mjs +542 -0
- package/skills/a2h-arch-generate/scripts/validate_incremental_docs.mjs +415 -0
- package/skills/a2h-arkts-logic-coder/SKILL.md +125 -0
- package/skills/a2h-arkts-logic-coder/references/ISSUES.md +6 -0
- package/skills/a2h-arkts-logic-coder/references/code-generation.md +124 -0
- package/skills/a2h-arkts-logic-coder/scripts/check_module_scope.ts +224 -0
- package/skills/a2h-arkts-logic-coder/scripts/check_mvvm.ts +377 -0
- package/skills/a2h-arkts-logic-coder/scripts/stop_check_hook.ts +443 -0
- package/skills/a2h-arkts-logic-coder/scripts/test_check_scripts.ts +211 -0
- package/skills/a2h-arkts-logic-coder/scripts/test_worktree_compat.ts +81 -0
- package/skills/a2h-batch-ui-align/SKILL.md +309 -0
- package/skills/a2h-batch-ui-align/assets/ColorUtils.ets +81 -0
- package/skills/a2h-batch-ui-align/flowchart.html +271 -0
- package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/conversion-procedure.md +523 -661
- package/skills/a2h-batch-ui-align/references/incremental-scope.md +139 -0
- package/skills/a2h-batch-ui-align/references/lottie-integration.md +43 -0
- package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +8 -8
- package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +3 -0
- package/skills/a2h-batch-ui-align/references/source-only-tier.md +32 -0
- package/skills/a2h-batch-ui-align/references/step3-capture.md +211 -0
- package/skills/a2h-batch-ui-align/references/step4-prepare.md +192 -0
- package/skills/a2h-batch-ui-align/references/step5-convert.md +202 -0
- package/skills/a2h-batch-ui-align/scripts/agent_cli.mjs +572 -0
- package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/scripts/android_parse_fast.ts +246 -39
- package/skills/a2h-batch-ui-align/scripts/answers_check.mjs +86 -0
- package/skills/a2h-batch-ui-align/scripts/arkts_static_check.ts +2689 -0
- package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +1656 -0
- package/skills/a2h-batch-ui-align/scripts/databinding_analyzer_design.md +79 -0
- package/skills/a2h-batch-ui-align/scripts/detach.mjs +258 -0
- package/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +1524 -0
- package/skills/a2h-batch-ui-align/scripts/generate_pages_json.mjs +612 -0
- package/skills/a2h-batch-ui-align/scripts/group_commit.mjs +166 -0
- package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +1437 -0
- package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +1869 -0
- package/skills/a2h-batch-ui-align/scripts/group_watch.mjs +696 -0
- package/skills/a2h-batch-ui-align/scripts/harmony_index.mjs +218 -0
- package/skills/a2h-batch-ui-align/scripts/host_env.mjs +208 -0
- package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +1229 -0
- package/skills/a2h-batch-ui-align/scripts/occlusion.mjs +141 -0
- package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +1124 -0
- package/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +996 -0
- package/skills/a2h-batch-ui-align/scripts/tests/agent_cli.test.mjs +217 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_align_tint.test.mjs +253 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rules.test.mjs +365 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_shell.test.mjs +72 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_weight_color.test.mjs +353 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +345 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set_scope.test.mjs +290 -0
- package/skills/a2h-batch-ui-align/scripts/tests/color_utils_asset.test.mjs +74 -0
- package/skills/a2h-batch-ui-align/scripts/tests/export_ui_info.test.mjs +507 -0
- package/skills/a2h-batch-ui-align/scripts/tests/generate_pages_json.test.mjs +123 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_commit.test.mjs +126 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_pack.test.mjs +189 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +1451 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_watch.test.mjs +215 -0
- package/skills/a2h-batch-ui-align/scripts/tests/harmony_index.test.mjs +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/host_env.test.mjs +115 -0
- package/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +170 -0
- package/skills/a2h-batch-ui-align/scripts/tests/occlusion.test.mjs +102 -0
- package/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +244 -0
- package/skills/a2h-batch-ui-align/scripts/tests/shell_contract.test.mjs +130 -0
- package/skills/a2h-batch-ui-align/scripts/tests/test_bfs_exit.ts +49 -0
- package/skills/a2h-coldstart-smoke-gate/SKILL.md +57 -0
- package/skills/a2h-dashboard-render/SKILL.md +65 -0
- package/skills/a2h-dashboard-render/references/artifact-contract.jsonc +147 -0
- package/skills/a2h-dashboard-render/references/artifact-registry-spec.md +67 -0
- package/skills/a2h-dashboard-render/references/dashboard.config.example.json +19 -0
- package/skills/a2h-dashboard-render/references//347/234/213/346/235/277/350/257/264/346/230/216.md +83 -0
- package/skills/a2h-dashboard-render/scripts/artifact_contract.mjs +138 -0
- package/skills/a2h-dashboard-render/scripts/check-registry.mjs +87 -0
- package/skills/a2h-dashboard-render/scripts/dashboard.mjs +3215 -0
- package/skills/a2h-dashboard-render/scripts/device_capture.mjs +2010 -0
- package/skills/a2h-dashboard-render/scripts/page_capture.mjs +828 -0
- package/skills/a2h-dashboard-render/scripts/usage_readers.mjs +459 -0
- package/skills/a2h-dashboard-render/scripts/usage_worker.mjs +13 -0
- package/skills/a2h-dashboard-render/test/fixtures/page_capture/broken.xml +1 -0
- package/skills/a2h-dashboard-render/test/fixtures/page_capture/expected.json +156 -0
- package/skills/a2h-dashboard-render/test/fixtures/page_capture/hmos.json +1 -0
- package/skills/a2h-dashboard-render/test/fixtures/page_capture/list.xml +1 -0
- package/skills/a2h-dashboard-render/test/fixtures/page_capture/nested_scroll.xml +1 -0
- package/skills/a2h-dashboard-render/test/test_artifact_contract.mjs +170 -0
- package/skills/a2h-dashboard-render/test/test_cli_check_registry.mjs +99 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_architecture.mjs +182 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_build.mjs +64 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_node.mjs +1172 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_spec_pipeline.mjs +251 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_ui_pipeline.mjs +81 -0
- package/skills/a2h-dashboard-render/test/test_device_capture_env.mjs +115 -0
- package/skills/a2h-dashboard-render/test/test_device_capture_policy.mjs +303 -0
- package/skills/a2h-dashboard-render/test/test_page_capture.mjs +147 -0
- package/skills/a2h-dashboard-render/test/test_usage_readers.mjs +444 -0
- package/skills/{hmos-fix-build-errors → a2h-fix-build-errors}/SKILL.md +305 -293
- package/skills/a2h-module-semantic-docs/SKILL.md +227 -0
- package/skills/a2h-module-semantic-docs/scripts/commit_module_state.mjs +168 -0
- package/skills/a2h-module-semantic-docs/scripts/lib/py_compat.mjs +688 -0
- package/skills/a2h-module-semantic-docs/scripts/scan_modules.mjs +1021 -0
- package/skills/a2h-module-semantic-docs/test/golden/module_structure.json +187 -0
- package/skills/a2h-module-semantic-docs/test/golden/module_understanding.json +351 -0
- package/skills/a2h-module-semantic-docs/test/golden/module_update_plan.json +495 -0
- package/skills/a2h-module-semantic-docs/test/golden/project_directory_structure.json +157 -0
- package/skills/a2h-module-semantic-docs/test/test_scan_and_commit.mjs +388 -0
- package/skills/a2h-resource-convert/SKILL.md +369 -0
- package/skills/{hmos-resources-convert → a2h-resource-convert}/references/code-vector-icon-rules.md +4 -4
- package/skills/{hmos-resources-convert → a2h-resource-convert}/references/conversion-rules.md +16 -5
- package/skills/a2h-resource-convert/references/incremental-page-migration.md +251 -0
- package/skills/{hmos-resources-convert → a2h-resource-convert}/references/lottie-conversion-rules.md +17 -17
- package/skills/{hmos-resources-convert → a2h-resource-convert}/references/resource-mapping-rules.md +15 -4
- package/skills/a2h-resource-convert/references/step3_5-dependency-filter.md +54 -0
- package/skills/a2h-resource-convert/references/step4-qualifiers-and-values.md +142 -0
- package/skills/a2h-resource-convert/references/step4-resource-types.md +249 -0
- package/skills/a2h-resource-convert/references/step5-reference-resolution.md +154 -0
- package/skills/a2h-resource-convert/references/step7-report-template.md +217 -0
- package/skills/{hmos-resources-convert → a2h-resource-convert}/references/xml-drawable-to-svg-rules.md +38 -0
- package/skills/{hmos-resources-convert → a2h-resource-convert}/scripts/a2h_resource_convert.ts +456 -90
- package/skills/a2h-resource-convert/scripts/a2h_resource_incremental.ts +1072 -0
- package/skills/a2h-resource-convert/scripts/app_identity.ts +947 -0
- package/skills/{hmos-resources-convert → a2h-resource-convert}/scripts/code_vector_icons.ts +19 -3
- package/skills/a2h-resource-convert/scripts/extract_page_resources.ts +989 -0
- package/skills/a2h-resource-convert/scripts/extract_project_resources.ts +1464 -0
- package/skills/a2h-resource-convert/scripts/tests/adaptive_icon.test.mjs +182 -0
- package/skills/a2h-resource-convert/scripts/tests/app_identity.test.mjs +206 -0
- package/skills/a2h-spec-design/SKILL.md +336 -0
- package/skills/a2h-spec-design/scripts/inspect_spec_design_inputs.mjs +146 -0
- package/skills/a2h-spec-design/scripts/lib/py_compat.mjs +481 -0
- package/skills/a2h-spec-design/scripts/move_spec_technical_reference.mjs +159 -0
- package/skills/a2h-spec-design/scripts/resolve_module_design.mjs +102 -0
- package/skills/a2h-spec-design/scripts/validate_spec_design_output.mjs +285 -0
- package/skills/a2h-spec-design/test/golden/inspect_happy.json +20 -0
- package/skills/a2h-spec-design/test/golden/move_design.md +18 -0
- package/skills/a2h-spec-design/test/golden/move_design_crlf.md +18 -0
- package/skills/a2h-spec-design/test/golden/move_spec.md +7 -0
- package/skills/a2h-spec-design/test/golden/resolve_cases.json +36 -0
- package/skills/a2h-spec-design/test/golden/validate_issue_file.md +12 -0
- package/skills/a2h-spec-design/test/golden/validate_issues.json +57 -0
- package/skills/a2h-spec-design/test/test_spec_design_scripts.mjs +381 -0
- package/skills/a2h-spec-design-pipeline/SKILL.md +228 -0
- package/skills/a2h-spec-design-pipeline/package.json +4 -0
- package/skills/a2h-spec-design-pipeline/references/coding-loop.md +63 -0
- package/skills/a2h-spec-design-pipeline/references/execution-model.md +69 -0
- package/skills/a2h-spec-design-pipeline/references/final-report-template.md +24 -0
- package/skills/a2h-spec-design-pipeline/references/initialization.md +57 -0
- package/skills/a2h-spec-design-pipeline/references/merge-queue.md +21 -0
- package/skills/a2h-spec-design-pipeline/references/scripts.md +27 -0
- package/skills/a2h-spec-design-pipeline/references/specs.example.json +19 -0
- package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +21 -0
- package/skills/a2h-spec-design-pipeline/scripts/atomic_write.ts +42 -0
- package/skills/a2h-spec-design-pipeline/scripts/audit_claims.ts +252 -0
- package/skills/a2h-spec-design-pipeline/scripts/branch_landed.ts +77 -0
- package/skills/a2h-spec-design-pipeline/scripts/deps_ready.ts +195 -0
- package/skills/a2h-spec-design-pipeline/scripts/ensure_wt_index.ts +651 -0
- package/skills/a2h-spec-design-pipeline/scripts/git_baseline.ts +124 -0
- package/skills/a2h-spec-design-pipeline/scripts/inflight.mjs +944 -0
- package/skills/a2h-spec-design-pipeline/scripts/lib/bgcli.mjs +95 -0
- package/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +502 -0
- package/skills/a2h-spec-design-pipeline/scripts/plan_waves.ts +475 -0
- package/skills/a2h-spec-design-pipeline/scripts/reconcile.mjs +218 -0
- package/skills/a2h-spec-design-pipeline/scripts/resolve_wiring.ts +164 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_atomic_write.ts +44 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_audit_claims.ts +301 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_bgcli.mjs +64 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_branch_landed.ts +87 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_deps_ready.ts +265 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_wt_index.ts +675 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_git_baseline.ts +105 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_inflight.mjs +452 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +375 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_plan_waves.ts +561 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_reconcile.mjs +182 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_resolve_wiring.ts +138 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_watchdog.mjs +289 -0
- package/skills/a2h-spec-design-pipeline/scripts/watchdog.mjs +441 -0
- package/skills/a2h-spec-generate/SKILL.md +285 -0
- package/skills/a2h-spec-generate/package.json +9 -0
- package/skills/a2h-spec-generate/references/batch-mode.md +151 -0
- package/skills/a2h-spec-generate/references/delete-blast-radius.md +3 -0
- package/skills/a2h-spec-generate/references/fusion-task-contract.md +114 -0
- package/skills/a2h-spec-generate/references/input-formats.md +27 -0
- package/skills/a2h-spec-generate/references/library-evidence.md +3 -0
- package/skills/a2h-spec-generate/references/method-discipline.md +64 -0
- package/skills/a2h-spec-generate/references/optional-gates.json +45 -0
- package/skills/a2h-spec-generate/references/recall-guide.md +83 -0
- package/skills/a2h-spec-generate/references/recall-terse.md +3 -0
- package/skills/a2h-spec-generate/references/recall-uniapp.md +10 -0
- package/skills/a2h-spec-generate/references/requirement-scope.md +122 -0
- package/skills/a2h-spec-generate/references/review-checklist.md +21 -0
- package/skills/a2h-spec-generate/references/spec-sample-complex.md +80 -0
- package/skills/a2h-spec-generate/references/spec-sample-transfer.md +43 -0
- package/skills/a2h-spec-generate/references/spec-samples.md +65 -0
- package/skills/a2h-spec-generate/references/specs.schema.json +79 -0
- package/skills/a2h-spec-generate/references/synthesis-rules.md +143 -0
- package/skills/a2h-spec-generate/references/transfer-file.md +5 -0
- package/skills/a2h-spec-generate/references/transfer-socket.md +5 -0
- package/skills/a2h-spec-generate/references/worker-rules.md +126 -0
- package/skills/a2h-spec-generate/scripts/check-fused-spec.mjs +514 -0
- package/skills/a2h-spec-generate/scripts/check_spec.ts +361 -0
- package/skills/a2h-spec-generate/scripts/collect-specs.mjs +470 -0
- package/skills/a2h-spec-generate/scripts/detect-project.mjs +271 -0
- package/skills/a2h-spec-generate/scripts/ensure-index.mjs +188 -0
- package/skills/a2h-spec-generate/scripts/feature-stem.mjs +150 -0
- package/skills/a2h-spec-generate/scripts/inspect-uniapp.mjs +733 -0
- package/skills/{hmos-spec-generate → a2h-spec-generate}/scripts/parse_requirements.ts +1 -1
- package/skills/a2h-spec-generate/scripts/prepare-facts.mjs +307 -0
- package/skills/a2h-spec-generate/scripts/publication-verdict.mjs +171 -0
- package/skills/a2h-spec-generate/scripts/publish-specs.mjs +280 -0
- package/skills/a2h-spec-generate/scripts/render-tasks.mjs +399 -0
- package/skills/a2h-spec-generate/scripts/report.mjs +132 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/dashboard.html +149 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-api.js +49 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-code-view.js +140 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-format.js +16 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-handoff.js +42 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-splitters.js +78 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-state.js +47 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-tree.js +194 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-virtual-list.js +118 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz.css +245 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz.html +99 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz.js +220 -0
- package/skills/a2h-spec-generate/scripts/reqgen/package-lock.json +47 -0
- package/skills/a2h-spec-generate/scripts/reqgen/package.json +23 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/agent-render/serve.ts +95 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/callback-call-sites.ts +82 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/area-ownership.ts +496 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/build.ts +2217 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/callback-flow.ts +386 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/component-variants.ts +845 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/index.ts +24 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/index.ts +22 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/policy.ts +572 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/traceability.ts +580 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/req-model/build.ts +1270 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/req-model/index.ts +10 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/req-model/projection.ts +804 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/req-model/render-projection.ts +51 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/source-facts/android-interaction-registry.ts +286 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/source-facts/builder.ts +453 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/source-facts/compose-api-registry.ts +526 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/source-facts/index.ts +15 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/connector/index.ts +1 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/connector/utg-inbound.ts +763 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/area-graph.ts +383 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/artifact.ts +68 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/common.ts +88 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/diagnostic.ts +64 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/gap-audit.ts +113 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/index.ts +12 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/name-traceability.ts +108 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/raw-fact.ts +377 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/req-model.ts +238 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/run.ts +134 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/semantic-completeness.ts +35 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/source-facts.ts +48 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/utg.ts +133 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/core/output-guard.ts +42 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/core/stable-id.ts +118 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/cross-area-tally-cli.ts +179 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/dashboard-cli.ts +188 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/dump/dump.ts +1184 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/dump/index.ts +1 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/dump-cli.ts +373 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/area-facts.ts +1014 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/area-output.ts +32 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/schema.ts +142 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/selfcheck.ts +312 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/spec-bindings.ts +310 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/task-contract.ts +685 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/graph/paths.ts +575 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/homegraph-cli.ts +50 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/android-resource-resolver.ts +391 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/androidx-preference-contracts.ts +44 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/contracts.ts +640 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/cross-area.ts +207 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/finalizer.ts +1297 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/identity.ts +186 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/index.ts +16 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/planner.ts +312 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/preference-enrichment.ts +793 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/raw-facts.ts +355 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/rules.ts +271 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/scanner.ts +666 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/schema.ts +365 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/stable-key.ts +144 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/task-contract.ts +301 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/tree-sitter-adapter.ts +923 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/uniapp-utg-adapter.ts +543 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/xml-adapter.ts +262 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/assemble.ts +2079 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/contracts.ts +157 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/finalize.ts +809 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/index.ts +17 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/io.ts +165 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/prepare.ts +806 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/query.ts +360 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/seeds.ts +218 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/spec-bindings-sidecar.ts +240 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/task.ts +359 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model-cli.ts +500 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/pipeline/index.ts +7 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/pipeline/output.ts +307 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/requirement-scope.ts +172 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/source-cov/index.ts +1 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/source-cov/source-cov.ts +176 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/source-index/homegraph.ts +1039 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/validation/area-graph.ts +490 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/validation/index.ts +23 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/validation/req-model.ts +957 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/validation/req-text.ts +248 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/validation/semantic-area-graph.ts +1600 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/validation/types.ts +10 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/artifact-data.ts +201 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-api.ts +74 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-code-view.ts +180 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-format.ts +18 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-handoff.ts +55 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-splitters.ts +78 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-state.ts +66 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-tree.ts +232 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-virtual-list.ts +179 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz.ts +240 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/contracts.d.ts +86 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/index.ts +3 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/server.ts +239 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/source-project.ts +316 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz-cli.ts +200 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/control-fact-join.test.ts +50 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/control-name-uniapp.test.ts +75 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/cross-area-anchor.test.ts +256 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-area-facts.test.ts +576 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-contract.test.ts +290 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-finalize.test.ts +1323 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-prepare.test.ts +574 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-scope.test.ts +339 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-selfcheck.test.ts +831 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-spec.test.ts +548 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/model-cli-blockers.test.ts +117 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/model-scope.test.ts +396 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/model-seeds.test.ts +175 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/model-task-contract.test.ts +298 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/model-v4.test.ts +1061 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/specgen-completeness.test.ts +286 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/stagem-stored-path.test.ts +25 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/uniapp-scanner.test.ts +159 -0
- package/skills/a2h-spec-generate/scripts/reqgen/tsconfig.json +16 -0
- package/skills/a2h-spec-generate/scripts/reqgen/tsconfig.viz-client.json +12 -0
- package/skills/a2h-spec-generate/test/check-fused-spec.test.mjs +632 -0
- package/skills/a2h-spec-generate/test/check-spec.test.ts +200 -0
- package/skills/a2h-spec-generate/test/collect-specs.test.mjs +538 -0
- package/skills/a2h-spec-generate/test/detect-project.test.mjs +37 -0
- package/skills/a2h-spec-generate/test/ensure-index.test.mjs +45 -0
- package/skills/a2h-spec-generate/test/feature-stem.test.mjs +147 -0
- package/skills/a2h-spec-generate/test/fixtures/android/app/src/main/AndroidManifest.xml +3 -0
- package/skills/a2h-spec-generate/test/fixtures/android/build.gradle +3 -0
- package/skills/a2h-spec-generate/test/fixtures/android/settings.gradle +3 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/package.json +9 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/App.vue +8 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/components/MyCard.vue +9 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/feature/editor/index.vue +1 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/main.ts +6 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/manifest.json +4 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/detail/index.vue +1 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/home/index.vue +33 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/settings/index.vue +1 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages.json +23 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/services/items.ts +3 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/tsconfig.json +8 -0
- package/skills/a2h-spec-generate/test/fixtures/unknown/README.txt +1 -0
- package/skills/a2h-spec-generate/test/inspect-uniapp.test.mjs +54 -0
- package/skills/a2h-spec-generate/test/publication-verdict.test.mjs +157 -0
- package/skills/a2h-spec-generate/test/publish-specs.test.mjs +282 -0
- package/skills/a2h-spec-generate/test/render-tasks.test.mjs +593 -0
- package/skills/a2h-utg-explorer/SKILL.md +120 -0
- package/skills/a2h-utg-explorer/assets/final_viewer.html +64 -0
- package/skills/a2h-utg-explorer/assets/u2.LICENSE +21 -0
- package/skills/a2h-utg-explorer/assets/u2.NOTICE +25 -0
- package/skills/a2h-utg-explorer/assets/u2.jar +0 -0
- package/skills/a2h-utg-explorer/references/architecture.md +270 -0
- package/skills/a2h-utg-explorer/references/protocol.md +9 -0
- package/skills/a2h-utg-explorer/scripts/app_settings.mjs +143 -0
- package/skills/a2h-utg-explorer/scripts/audit.mjs +167 -0
- package/skills/a2h-utg-explorer/scripts/close_phases.mjs +66 -0
- package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +749 -0
- package/skills/a2h-utg-explorer/scripts/d_prereqs.mjs +597 -0
- package/skills/a2h-utg-explorer/scripts/device_health.mjs +227 -0
- package/skills/a2h-utg-explorer/scripts/direct_launch.mjs +276 -0
- package/skills/a2h-utg-explorer/scripts/evidence.mjs +108 -0
- package/skills/a2h-utg-explorer/scripts/final_utg.mjs +376 -0
- package/skills/a2h-utg-explorer/scripts/hint_check.mjs +89 -0
- package/skills/a2h-utg-explorer/scripts/plan.mjs +258 -0
- package/skills/a2h-utg-explorer/scripts/promote_dynamic.mjs +170 -0
- package/skills/a2h-utg-explorer/scripts/recover.mjs +467 -0
- package/skills/a2h-utg-explorer/scripts/recover_b.mjs +542 -0
- package/skills/a2h-utg-explorer/scripts/recover_d.mjs +302 -0
- package/skills/a2h-utg-explorer/scripts/rejudge.mjs +203 -0
- package/skills/a2h-utg-explorer/scripts/report.mjs +143 -0
- package/skills/a2h-utg-explorer/scripts/run_cycle.mjs +831 -0
- package/skills/a2h-utg-explorer/scripts/run_device.mjs +137 -0
- package/skills/a2h-utg-explorer/scripts/tests/attest.test.mjs +66 -0
- package/skills/a2h-utg-explorer/scripts/tests/chain.test.mjs +45 -0
- package/skills/a2h-utg-explorer/scripts/tests/compose_identity.test.mjs +207 -0
- package/skills/a2h-utg-explorer/scripts/tests/coverage_rules.test.mjs +104 -0
- package/skills/a2h-utg-explorer/scripts/tests/d_prereqs.test.mjs +223 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_health.test.mjs +88 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_lock_retry.test.mjs +187 -0
- package/skills/a2h-utg-explorer/scripts/tests/direct_launch.test.mjs +130 -0
- package/skills/a2h-utg-explorer/scripts/tests/explorer_review_fixes.test.mjs +136 -0
- package/skills/a2h-utg-explorer/scripts/tests/final_utg.test.mjs +135 -0
- package/skills/a2h-utg-explorer/scripts/tests/first_round_phases.test.mjs +16 -0
- package/skills/a2h-utg-explorer/scripts/tests/generalization_fixes.test.mjs +251 -0
- package/skills/a2h-utg-explorer/scripts/tests/hint_check.test.mjs +42 -0
- package/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +162 -0
- package/skills/a2h-utg-explorer/scripts/tests/node_coverage.test.mjs +193 -0
- package/skills/a2h-utg-explorer/scripts/tests/overflow_prefix.test.mjs +204 -0
- package/skills/a2h-utg-explorer/scripts/tests/page_identity_tiers.test.mjs +355 -0
- package/skills/a2h-utg-explorer/scripts/tests/pipeline.test.mjs +240 -0
- package/skills/a2h-utg-explorer/scripts/tests/recover.test.mjs +212 -0
- package/skills/a2h-utg-explorer/scripts/tests/recover_b.test.mjs +173 -0
- package/skills/a2h-utg-explorer/scripts/tests/recover_d.test.mjs +207 -0
- package/skills/a2h-utg-explorer/scripts/tests/review_fixes.test.mjs +213 -0
- package/skills/a2h-utg-explorer/scripts/tests/robustness_fixes.test.mjs +345 -0
- package/skills/a2h-utg-explorer/scripts/tests/run_cycle.test.mjs +453 -0
- package/skills/a2h-utg-explorer/scripts/tests/runner_capabilities.test.mjs +131 -0
- package/skills/a2h-utg-explorer/scripts/tests/scope.test.mjs +229 -0
- package/skills/a2h-utg-explorer/scripts/tests/scroll_sweep.test.mjs +321 -0
- package/skills/a2h-utg-explorer/scripts/tests/semantics.test.mjs +102 -0
- package/skills/a2h-utg-explorer/scripts/tests/twin_opener.test.mjs +119 -0
- package/skills/a2h-utg-explorer/scripts/tests/u2_backend.test.mjs +346 -0
- package/skills/a2h-utg-explorer/scripts/tests/ui_state_anchors.test.mjs +112 -0
- package/skills/a2h-utg-explorer/scripts/tests/variant_strings.test.mjs +63 -0
- package/skills/a2h-utg-explorer/scripts/tests/worklist_parts.test.mjs +24 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/_device_io.mjs +244 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/_py.mjs +2097 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/adapters.mjs +1213 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/attest.mjs +63 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/chain.mjs +63 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/coverage.mjs +89 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/device_lock.mjs +46 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +1136 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +1513 -0
- package/skills/a2h-utg-explorer/scripts/variant.mjs +75 -0
- package/skills/a2h-utg-explorer/scripts/worklist_parts.mjs +122 -0
- package/skills/a2h-utg-static/SKILL.md +361 -0
- package/skills/a2h-utg-static/config.json +19 -0
- package/skills/a2h-utg-static/references/extractors.md +217 -0
- package/skills/a2h-utg-static/references/ui-elements-static-utg-schema.md +248 -0
- package/skills/a2h-utg-static/references/view-interactions.md +215 -0
- package/skills/a2h-utg-static/scripts/_graph.mjs +361 -0
- package/skills/a2h-utg-static/scripts/_py.mjs +2177 -0
- package/skills/a2h-utg-static/scripts/_spawn.mjs +45 -0
- package/skills/a2h-utg-static/scripts/activity_nav.mjs +738 -0
- package/skills/a2h-utg-static/scripts/activity_widgets.mjs +254 -0
- package/skills/a2h-utg-static/scripts/adapter_nav.mjs +229 -0
- package/skills/a2h-utg-static/scripts/androidfragment_nav.mjs +208 -0
- package/skills/a2h-utg-static/scripts/assemble.mjs +2065 -0
- package/skills/a2h-utg-static/scripts/audit.mjs +268 -0
- package/skills/a2h-utg-static/scripts/carry_answers.mjs +201 -0
- package/skills/a2h-utg-static/scripts/click_paths.mjs +594 -0
- package/skills/a2h-utg-static/scripts/compose_body_text.mjs +172 -0
- package/skills/a2h-utg-static/scripts/compose_merge.mjs +263 -0
- package/skills/a2h-utg-static/scripts/compose_nav.mjs +1216 -0
- package/skills/a2h-utg-static/scripts/compose_navbar_nav.mjs +238 -0
- package/skills/a2h-utg-static/scripts/compose_overlay.mjs +2760 -0
- package/skills/a2h-utg-static/scripts/compose_titles.mjs +365 -0
- package/skills/a2h-utg-static/scripts/compose_widgets.mjs +498 -0
- package/skills/a2h-utg-static/scripts/dialog_listener_nav.mjs +237 -0
- package/skills/a2h-utg-static/scripts/dialogshow_nav.mjs +308 -0
- package/skills/a2h-utg-static/scripts/fragfactory_nav.mjs +170 -0
- package/skills/a2h-utg-static/scripts/fragment_nav.mjs +1136 -0
- package/skills/a2h-utg-static/scripts/guard_subjects.mjs +162 -0
- package/skills/a2h-utg-static/scripts/hg_query.mjs +137 -0
- package/skills/a2h-utg-static/scripts/host_resolve.mjs +393 -0
- package/skills/a2h-utg-static/scripts/hybrid_bundle.mjs +165 -0
- package/skills/a2h-utg-static/scripts/hybrid_pages.mjs +713 -0
- package/skills/a2h-utg-static/scripts/hybrid_scope.mjs +660 -0
- package/skills/a2h-utg-static/scripts/interaction_sites.mjs +267 -0
- package/skills/a2h-utg-static/scripts/io_utils.mjs +59 -0
- package/skills/a2h-utg-static/scripts/label_resolve.mjs +864 -0
- package/skills/a2h-utg-static/scripts/launch_extras.mjs +91 -0
- package/skills/a2h-utg-static/scripts/layout_resolve.mjs +148 -0
- package/skills/a2h-utg-static/scripts/manifest.mjs +483 -0
- package/skills/a2h-utg-static/scripts/measure/measure_corpus.mjs +297 -0
- package/skills/a2h-utg-static/scripts/measure/measure_guards.mjs +98 -0
- package/skills/a2h-utg-static/scripts/media_browse_nav.mjs +356 -0
- package/skills/a2h-utg-static/scripts/menu_nav.mjs +603 -0
- package/skills/a2h-utg-static/scripts/navactions_nav.mjs +255 -0
- package/skills/a2h-utg-static/scripts/nl_hints.mjs +453 -0
- package/skills/a2h-utg-static/scripts/orphan_overlay_nav.mjs +89 -0
- package/skills/a2h-utg-static/scripts/phase_plan.mjs +108 -0
- package/skills/a2h-utg-static/scripts/phase_planner.mjs +119 -0
- package/skills/a2h-utg-static/scripts/plaindialog_nav.mjs +411 -0
- package/skills/a2h-utg-static/scripts/preference_nav.mjs +761 -0
- package/skills/a2h-utg-static/scripts/preference_widgets.mjs +142 -0
- package/skills/a2h-utg-static/scripts/presenter_nav.mjs +490 -0
- package/skills/a2h-utg-static/scripts/registry_nav.mjs +288 -0
- package/skills/a2h-utg-static/scripts/run_pipeline.mjs +870 -0
- package/skills/a2h-utg-static/scripts/scope_utils.mjs +430 -0
- package/skills/a2h-utg-static/scripts/screen_merge.mjs +287 -0
- package/skills/a2h-utg-static/scripts/screen_nav.mjs +279 -0
- package/skills/a2h-utg-static/scripts/single_host_nav.mjs +291 -0
- package/skills/a2h-utg-static/scripts/starter_nav.mjs +198 -0
- package/skills/a2h-utg-static/scripts/state_guard.mjs +579 -0
- package/skills/a2h-utg-static/scripts/static_prior.mjs +904 -0
- package/skills/a2h-utg-static/scripts/tests/_zipw.mjs +28 -0
- package/skills/a2h-utg-static/scripts/tests/probe_autoload.mjs +108 -0
- package/skills/a2h-utg-static/scripts/tests/probe_layout_fragments.mjs +90 -0
- package/skills/a2h-utg-static/scripts/tests/probe_unknown_scope.mjs +61 -0
- package/skills/a2h-utg-static/scripts/tests/regression_matrix.mjs +1261 -0
- package/skills/a2h-utg-static/scripts/tests/test_activity_alias_launcher.mjs +90 -0
- package/skills/a2h-utg-static/scripts/tests/test_activity_supertype_chain.mjs +106 -0
- package/skills/a2h-utg-static/scripts/tests/test_bottom_sheet_container.mjs +58 -0
- package/skills/a2h-utg-static/scripts/tests/test_branch_guard.mjs +19 -0
- package/skills/a2h-utg-static/scripts/tests/test_callee_string_default.mjs +30 -0
- package/skills/a2h-utg-static/scripts/tests/test_carry_answers.mjs +103 -0
- package/skills/a2h-utg-static/scripts/tests/test_chrome_tokens.mjs +60 -0
- package/skills/a2h-utg-static/scripts/tests/test_commented_out_trigger.mjs +111 -0
- package/skills/a2h-utg-static/scripts/tests/test_commit_scope.mjs +113 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_file_private_route.mjs +117 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_nested_graph.mjs +166 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_route_holder_collision.mjs +112 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_vm_nav.mjs +267 -0
- package/skills/a2h-utg-static/scripts/tests/test_custom_source_root.mjs +71 -0
- package/skills/a2h-utg-static/scripts/tests/test_defensive_null_guard.mjs +77 -0
- package/skills/a2h-utg-static/scripts/tests/test_dialog_orphan_entries.mjs +99 -0
- package/skills/a2h-utg-static/scripts/tests/test_dialog_page_owner.mjs +69 -0
- package/skills/a2h-utg-static/scripts/tests/test_dialogshow_builder_forms.mjs +96 -0
- package/skills/a2h-utg-static/scripts/tests/test_dialogshow_java_factory.mjs +37 -0
- package/skills/a2h-utg-static/scripts/tests/test_disabled_guard.mjs +42 -0
- package/skills/a2h-utg-static/scripts/tests/test_drawer_panel_gesture.mjs +140 -0
- package/skills/a2h-utg-static/scripts/tests/test_edge_dedupe_by_gesture.mjs +111 -0
- package/skills/a2h-utg-static/scripts/tests/test_edge_provenance_lint.mjs +70 -0
- package/skills/a2h-utg-static/scripts/tests/test_enclosing_gesture.mjs +69 -0
- package/skills/a2h-utg-static/scripts/tests/test_external_surface_roots.mjs +43 -0
- package/skills/a2h-utg-static/scripts/tests/test_find_package_indirect.mjs +67 -0
- package/skills/a2h-utg-static/scripts/tests/test_forwarding_wrapper.mjs +38 -0
- package/skills/a2h-utg-static/scripts/tests/test_fragment_containment.mjs +85 -0
- package/skills/a2h-utg-static/scripts/tests/test_fragment_helper_trigger.mjs +92 -0
- package/skills/a2h-utg-static/scripts/tests/test_graph.mjs +55 -0
- package/skills/a2h-utg-static/scripts/tests/test_guard_clause.mjs +86 -0
- package/skills/a2h-utg-static/scripts/tests/test_hint_language.mjs +119 -0
- package/skills/a2h-utg-static/scripts/tests/test_host_kind_by_chain.mjs +68 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_bundle_attribution.mjs +74 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_bundled_pages.mjs +181 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +293 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_title_renders.mjs +118 -0
- package/skills/a2h-utg-static/scripts/tests/test_interaction_sites.mjs +272 -0
- package/skills/a2h-utg-static/scripts/tests/test_item_data_instance.mjs +51 -0
- package/skills/a2h-utg-static/scripts/tests/test_kotlin_fn_spans.mjs +69 -0
- package/skills/a2h-utg-static/scripts/tests/test_label_accessor_forms.mjs +187 -0
- package/skills/a2h-utg-static/scripts/tests/test_label_source.mjs +70 -0
- package/skills/a2h-utg-static/scripts/tests/test_launch_intent_guard.mjs +67 -0
- package/skills/a2h-utg-static/scripts/tests/test_layout_declared_fragment.mjs +103 -0
- package/skills/a2h-utg-static/scripts/tests/test_listener_call_forms.mjs +79 -0
- package/skills/a2h-utg-static/scripts/tests/test_listener_receiver_binding.mjs +47 -0
- package/skills/a2h-utg-static/scripts/tests/test_manifest_exported_default.mjs +40 -0
- package/skills/a2h-utg-static/scripts/tests/test_manifest_filters_modules.mjs +84 -0
- package/skills/a2h-utg-static/scripts/tests/test_manifest_srcfile.mjs +68 -0
- package/skills/a2h-utg-static/scripts/tests/test_mode_and_cb_param.mjs +172 -0
- package/skills/a2h-utg-static/scripts/tests/test_module_namespace.mjs +33 -0
- package/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +44 -0
- package/skills/a2h-utg-static/scripts/tests/test_multiple_entry_contracts.mjs +80 -0
- package/skills/a2h-utg-static/scripts/tests/test_nav_graph_xml.mjs +35 -0
- package/skills/a2h-utg-static/scripts/tests/test_nl_hint_grammar.mjs +42 -0
- package/skills/a2h-utg-static/scripts/tests/test_nl_hints_gate.mjs +85 -0
- package/skills/a2h-utg-static/scripts/tests/test_node_id_collision.mjs +57 -0
- package/skills/a2h-utg-static/scripts/tests/test_non_gesture_step_flag.mjs +62 -0
- package/skills/a2h-utg-static/scripts/tests/test_out_of_scope_and_settings.mjs +72 -0
- package/skills/a2h-utg-static/scripts/tests/test_overload_and_climb.mjs +86 -0
- package/skills/a2h-utg-static/scripts/tests/test_pager_page_source.mjs +78 -0
- package/skills/a2h-utg-static/scripts/tests/test_pager_position_zero.mjs +65 -0
- package/skills/a2h-utg-static/scripts/tests/test_pager_variant_guard.mjs +172 -0
- package/skills/a2h-utg-static/scripts/tests/test_pipeline_llm_phases.mjs +107 -0
- package/skills/a2h-utg-static/scripts/tests/test_plain_dialog_nodes.mjs +167 -0
- package/skills/a2h-utg-static/scripts/tests/test_plaindialog_shared_anchor.mjs +117 -0
- package/skills/a2h-utg-static/scripts/tests/test_preference_click_nav.mjs +98 -0
- package/skills/a2h-utg-static/scripts/tests/test_preference_host_binding.mjs +87 -0
- package/skills/a2h-utg-static/scripts/tests/test_preference_nesting.mjs +183 -0
- package/skills/a2h-utg-static/scripts/tests/test_preference_widgets.mjs +48 -0
- package/skills/a2h-utg-static/scripts/tests/test_read_text_crlf.mjs +41 -0
- package/skills/a2h-utg-static/scripts/tests/test_resolver_tier_parity.mjs +126 -0
- package/skills/a2h-utg-static/scripts/tests/test_result_launcher.mjs +142 -0
- package/skills/a2h-utg-static/scripts/tests/test_review_fixes.mjs +135 -0
- package/skills/a2h-utg-static/scripts/tests/test_route_token_words.mjs +66 -0
- package/skills/a2h-utg-static/scripts/tests/test_same_name_decl_scope.mjs +236 -0
- package/skills/a2h-utg-static/scripts/tests/test_scope_utils.mjs +85 -0
- package/skills/a2h-utg-static/scripts/tests/test_sealed_dialog_state.mjs +148 -0
- package/skills/a2h-utg-static/scripts/tests/test_shared_overlay_split.mjs +63 -0
- package/skills/a2h-utg-static/scripts/tests/test_slug_parity.mjs +58 -0
- package/skills/a2h-utg-static/scripts/tests/test_starter_node_id.mjs +41 -0
- package/skills/a2h-utg-static/scripts/tests/test_state_guard_arity.mjs +109 -0
- package/skills/a2h-utg-static/scripts/tests/test_state_guard_commented_candidates.mjs +68 -0
- package/skills/a2h-utg-static/scripts/tests/test_state_guard_model_gates.mjs +127 -0
- package/skills/a2h-utg-static/scripts/tests/test_state_specific_hop.mjs +130 -0
- package/skills/a2h-utg-static/scripts/tests/test_synthetic_label_identity.mjs +51 -0
- package/skills/a2h-utg-static/scripts/tests/test_template_method_layout.mjs +81 -0
- package/skills/a2h-utg-static/scripts/tests/test_template_title.mjs +58 -0
- package/skills/a2h-utg-static/scripts/tests/test_trigger_id_spelling.mjs +68 -0
- package/skills/a2h-utg-static/scripts/tests/test_ui_elements_action_override.mjs +91 -0
- package/skills/a2h-utg-static/scripts/tests/test_ui_elements_flow_filter.mjs +110 -0
- package/skills/a2h-utg-static/scripts/tests/test_ui_elements_nl_hint_key.mjs +89 -0
- package/skills/a2h-utg-static/scripts/tests/test_uiless_host_fold.mjs +98 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +231 -0
- package/skills/a2h-utg-static/scripts/tests/test_view_click_refs.mjs +104 -0
- package/skills/a2h-utg-static/scripts/tests/test_view_id_label.mjs +69 -0
- package/skills/a2h-utg-static/scripts/tests/test_view_interactions.mjs +346 -0
- package/skills/a2h-utg-static/scripts/tests/test_viewpage_nav.mjs +273 -0
- package/skills/a2h-utg-static/scripts/tests/test_vm_nav_helper_navigate.mjs +98 -0
- package/skills/a2h-utg-static/scripts/tests/test_widget_class_scope.mjs +92 -0
- package/skills/a2h-utg-static/scripts/tests/test_window_nav_kotlin.mjs +158 -0
- package/skills/a2h-utg-static/scripts/tests/test_worklist_parts.mjs +65 -0
- package/skills/a2h-utg-static/scripts/uniapp_nav.mjs +1119 -0
- package/skills/a2h-utg-static/scripts/uniapp_widgets.mjs +244 -0
- package/skills/a2h-utg-static/scripts/utg_html.mjs +721 -0
- package/skills/a2h-utg-static/scripts/view_interactions.mjs +799 -0
- package/skills/a2h-utg-static/scripts/view_widgets.mjs +512 -0
- package/skills/a2h-utg-static/scripts/viewpage_nav.mjs +485 -0
- package/skills/a2h-utg-static/scripts/vm_nav.mjs +422 -0
- package/skills/a2h-utg-static/scripts/window_nav.mjs +240 -0
- package/skills/a2h-utg-static/scripts/worklist_parts.mjs +154 -0
- package/skills/a2h-utg-static/tools/convert_static_utg_to_ui_elements.ts +769 -0
- package/skills/a2h-utg-static/tools/package.json +3 -0
- package/README.md +0 -445
- package/agents/logic-coder.md +0 -224
- package/agents/logic-context-builder.md +0 -212
- package/agents/scripts/hmos-precheck/backends/arkts.mjs +0 -567
- package/agents/scripts/hmos-precheck/backends/arkts_diff.mjs +0 -159
- package/agents/scripts/hmos-precheck/backends/arkts_project_rules.mjs +0 -398
- package/agents/scripts/hmos-precheck/backends/codelinter.mjs +0 -250
- package/agents/scripts/hmos-precheck/backends/project_integrity.mjs +0 -321
- package/agents/scripts/hmos-precheck/backends/static_precheck.mjs +0 -247
- package/agents/scripts/hmos-precheck/core/config.mjs +0 -184
- package/agents/scripts/hmos-precheck/core/diagnostic_scope.mjs +0 -20
- package/agents/scripts/hmos-precheck/core/process_adapter.mjs +0 -47
- package/agents/scripts/hmos-precheck/core/project_catalog.mjs +0 -50
- package/agents/scripts/hmos-precheck/core/result_projection.mjs +0 -147
- package/agents/scripts/hmos-precheck/core/scope_plan.mjs +0 -131
- package/agents/scripts/hmos-precheck/core/sdk_context.mjs +0 -67
- package/agents/scripts/hmos-precheck/docs/architecture.md +0 -37
- package/agents/scripts/hmos-precheck/docs/performance-optimization.md +0 -28
- package/agents/scripts/hmos-precheck/docs/upstream-reference.json +0 -19
- package/agents/scripts/hmos-precheck/docs/validation.md +0 -50
- package/agents/scripts/hmos-precheck/index.mjs +0 -17
- package/agents/scripts/hmos-precheck/invocation.mjs +0 -231
- package/agents/scripts/hmos-precheck/rules/rule_case_matrix.csv +0 -32
- package/agents/scripts/hmos-precheck/rules/rule_inventory.csv +0 -64
- package/agents/scripts/hmos-precheck/rules/rule_inventory.mjs +0 -59
- package/agents/scripts/hmos-precheck/rules/rule_policy.mjs +0 -54
- package/agents/scripts/platform_query.mjs +0 -626
- package/agents/scripts/platform_query.test.mjs +0 -422
- package/agents/self-test-fixer.md +0 -298
- package/agents/self-tester.md +0 -55
- package/agents/test-case-generation-generator.md +0 -317
- package/agents/test-case-generation-validator.md +0 -231
- package/dist/cli/config-store.js +0 -310
- package/dist/cli/config.js +0 -44
- package/dist/cli/env-vars.js +0 -127
- package/dist/cli/index.js +0 -56
- package/dist/cli/init.js +0 -1187
- package/dist/cli/uninstall.js +0 -427
- package/dist/utils/regex.js +0 -8
- package/env-requirements.json +0 -179
- package/resource/choose_editor.png +0 -0
- package/resource/convert_pipeline_process.svg +0 -103
- package/resource/project_architecture.svg +0 -122
- package/resource/set_environment.png +0 -0
- package/resource/set_multimodel.png +0 -0
- package/resource/set_sdk.png +0 -0
- package/resource/title_dark.png +0 -0
- package/skills/hmos-batch-ui-align/SKILL.md +0 -413
- package/skills/hmos-batch-ui-align/scripts/arkts_static_check.ts +0 -1592
- package/skills/hmos-batch-ui-align/scripts/measure_pack.ts +0 -752
- package/skills/hmos-convert-pipeline/SKILL.md +0 -486
- package/skills/hmos-incremental-ui-align/README.md +0 -251
- package/skills/hmos-incremental-ui-align/SKILL.md +0 -375
- package/skills/hmos-incremental-ui-align/diff_analysis.md +0 -53
- package/skills/hmos-incremental-ui-align/page_align.md +0 -62
- package/skills/hmos-incremental-ui-align/references/Comparison_Template.md +0 -38
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Link/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/217/214/345/220/221/345/220/214/346/255/245.md +0 -648
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Observed/350/243/205/351/245/260/345/231/250/345/222/214@ObjectLink/350/243/205/351/245/260/345/231/250/357/274/232/345/265/214/345/245/227/347/261/273/345/257/271/350/261/241/345/261/236/346/200/247/345/217/230/345/214/226.md +0 -2089
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Prop/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/215/225/345/220/221/345/220/214/346/255/245.md +0 -1033
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Provide/350/243/205/351/245/260/345/231/250/345/222/214@Consume/350/243/205/351/245/260/345/231/250/357/274/232/344/270/216/345/220/216/344/273/243/347/273/204/344/273/266/345/217/214/345/220/221/345/220/214/346/255/245.md +0 -1183
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@State/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/347/212/266/346/200/201.md +0 -576
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Track/350/243/205/351/245/260/345/231/250/357/274/232class/345/257/271/350/261/241/345/261/236/346/200/247/347/272/247/346/233/264/346/226/260.md +0 -297
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Watch/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/346/233/264/346/224/271/351/200/232/347/237/245.md +0 -395
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/AppStorage/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200/347/232/204UI/347/212/266/346/200/201/345/255/230/345/202/250.md +0 -903
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/Environment/357/274/232/350/256/276/345/244/207/347/216/257/345/242/203/346/237/245/350/257/242.md +0 -106
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/LocalStorage/357/274/232/351/241/265/351/235/242/347/272/247UI/347/212/266/346/200/201/345/255/230/345/202/250.md +0 -1178
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/MVVM/346/250/241/345/274/217V1.md +0 -911
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/PersistentStorage/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md +0 -355
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243//347/256/241/347/220/206/345/272/224/347/224/250/346/213/245/346/234/211/347/232/204/347/212/266/346/200/201/346/246/202/350/277/260.md +0 -11
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/!!/350/257/255/346/263/225/357/274/232/345/217/214/345/220/221/347/273/221/345/256/232.md +0 -206
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Computed/350/243/205/351/245/260/345/231/250/357/274/232/350/256/241/347/256/227/345/261/236/346/200/247.md +0 -373
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Event/350/243/205/351/245/260/345/231/250/357/274/232/350/247/204/350/214/203/347/273/204/344/273/266/350/276/223/345/207/272.md +0 -158
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Local/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/351/203/250/347/212/266/346/200/201.md +0 -750
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Monitor/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/344/277/256/346/224/271/345/274/202/346/255/245/347/233/221/345/220/254.md +0 -1704
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@ObservedV2/350/243/205/351/245/260/345/231/250/345/222/214@Trace/350/243/205/351/245/260/345/231/250/357/274/232/347/261/273/345/261/236/346/200/247/345/217/230/345/214/226/350/247/202/346/265/213.md +0 -1012
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Once/350/243/205/351/245/260/345/231/250/357/274/232/345/210/235/345/247/213/345/214/226/345/220/214/346/255/245/344/270/200/346/254/241.md +0 -164
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Param/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/244/226/351/203/250/350/276/223/345/205/245.md +0 -840
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Provider/350/243/205/351/245/260/345/231/250/345/222/214@Consumer/350/243/205/351/245/260/345/231/250/357/274/232/350/267/250/347/273/204/344/273/266/345/261/202/347/272/247/345/217/214/345/220/221/345/220/214/346/255/245.md +0 -856
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Type/350/243/205/351/245/260/345/231/250/357/274/232/346/240/207/350/256/260/347/261/273/345/261/236/346/200/247/347/232/204/347/261/273/345/236/213.md +0 -83
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/AppStorageV2/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200UI/347/212/266/346/200/201/345/255/230/345/202/250.md +0 -294
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/PersistenceV2/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md +0 -1220
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/_/350/214/203/345/274/217/351/200/211/346/213/251/350/257/264/346/230/216.md +0 -47
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2//347/212/266/346/200/201/347/256/241/347/220/206V1/345/220/221V2/350/277/201/347/247/273/344/270/216/346/267/267/347/224/250/346/214/207/345/257/274.md +0 -840
- package/skills/hmos-incremental-ui-align/references/State_Model_Template.md +0 -74
- package/skills/hmos-incremental-ui-align/references/UI_Analysis_Template.md +0 -34
- package/skills/hmos-incremental-ui-align/references/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +0 -2533
- package/skills/hmos-incremental-ui-align/references/android-to-harmonyOS-ui-interaction-mapping-reference.md +0 -555
- package/skills/hmos-incremental-ui-align/references/android-to-harmonyOS-ui-layout-mapping-reference.md +0 -117
- package/skills/hmos-incremental-ui-align/scripts/app_feature_verify.ts +0 -937
- package/skills/hmos-incremental-ui-align/scripts/extract_checklist.ts +0 -343
- package/skills/hmos-incremental-ui-align/scripts/navigation-capure.md +0 -76
- package/skills/hmos-incremental-ui-align/scripts/page_capture.ts +0 -977
- package/skills/hmos-incremental-ui-align/scripts/page_capture_burst.ts +0 -188
- package/skills/hmos-integration-test/README.md +0 -341
- package/skills/hmos-integration-test/SKILL.md +0 -464
- package/skills/hmos-integration-test/scripts/report-tool.ts +0 -791
- package/skills/hmos-integration-test/scripts/resolve-metadata-tool.ts +0 -125
- package/skills/hmos-integration-test/scripts/self-test-runner.ts +0 -756
- package/skills/hmos-integration-test/scripts/testcases-tool.ts +0 -239
- package/skills/hmos-resources-convert/SKILL.md +0 -891
- package/skills/hmos-spec-generate/SKILL.md +0 -404
- package/skills/hmos-test-case-generation/README.md +0 -241
- package/skills/hmos-test-case-generation/SKILL.md +0 -324
- package/skills/hmos-test-case-generation/references/contract.md +0 -315
- package/skills/hmos-test-case-generation/references/review-notes-template.md +0 -84
- package/skills/hmos-test-case-generation/references/ui-elements-schema.md +0 -142
- package/skills/hmos-test-case-generation/tools/convert_to_ui_elements.ts +0 -550
- package/skills/hmos-test-case-generation/tools/validate.ts +0 -1312
- package/tools/bfs-crawl/README.md +0 -73
- package/tools/bfs-crawl/android_viewtree_bfs_crawler.ts +0 -1662
- /package/skills/{hmos-batch-ui-align/references/mvvm-v2/MVVM/346/250/241/345/274/217/357/274/210V2/357/274/211.md" → a2h-arch-generate/references/arkts-mvvm-v2.md} +0 -0
- /package/{README.en.md → skills/a2h-arch-generate/scripts/module_create/har/consumer-rules.txt} +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/@Link/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/217/214/345/220/221/345/220/214/346/255/245.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/@Observed/350/243/205/351/245/260/345/231/250/345/222/214@ObjectLink/350/243/205/351/245/260/345/231/250/357/274/232/345/265/214/345/245/227/347/261/273/345/257/271/350/261/241/345/261/236/346/200/247/345/217/230/345/214/226.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/@Prop/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/215/225/345/220/221/345/220/214/346/255/245.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/@Provide/350/243/205/351/245/260/345/231/250/345/222/214@Consume/350/243/205/351/245/260/345/231/250/357/274/232/344/270/216/345/220/216/344/273/243/347/273/204/344/273/266/345/217/214/345/220/221/345/220/214/346/255/245.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/@State/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/347/212/266/346/200/201.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/@Track/350/243/205/351/245/260/345/231/250/357/274/232class/345/257/271/350/261/241/345/261/236/346/200/247/347/272/247/346/233/264/346/226/260.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/@Watch/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/346/233/264/346/224/271/351/200/232/347/237/245.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/AppStorage/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200/347/232/204UI/347/212/266/346/200/201/345/255/230/345/202/250.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/Environment/357/274/232/350/256/276/345/244/207/347/216/257/345/242/203/346/237/245/350/257/242.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/LocalStorage/357/274/232/351/241/265/351/235/242/347/272/247UI/347/212/266/346/200/201/345/255/230/345/202/250.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/MVVM/346/250/241/345/274/217/357/274/210V1/357/274/211.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/PersistentStorage/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm//347/256/241/347/220/206/345/272/224/347/224/250/346/213/245/346/234/211/347/232/204/347/212/266/346/200/201/346/246/202/350/277/260.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/!!/350/257/255/346/263/225/357/274/232/345/217/214/345/220/221/347/273/221/345/256/232.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Computed/350/243/205/351/245/260/345/231/250/357/274/232/350/256/241/347/256/227/345/261/236/346/200/247.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Event/350/243/205/351/245/260/345/231/250/357/274/232/350/247/204/350/214/203/347/273/204/344/273/266/350/276/223/345/207/272.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Local/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/351/203/250/347/212/266/346/200/201.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Monitor/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/344/277/256/346/224/271/345/274/202/346/255/245/347/233/221/345/220/254.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@ObservedV2/350/243/205/351/245/260/345/231/250/345/222/214@Trace/350/243/205/351/245/260/345/231/250/357/274/232/347/261/273/345/261/236/346/200/247/345/217/230/345/214/226/350/247/202/346/265/213.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Once/350/243/205/351/245/260/345/231/250/357/274/232/345/210/235/345/247/213/345/214/226/345/220/214/346/255/245/344/270/200/346/254/241.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Param/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/244/226/351/203/250/350/276/223/345/205/245.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Provider/350/243/205/351/245/260/345/231/250/345/222/214@Consumer/350/243/205/351/245/260/345/231/250/357/274/232/350/267/250/347/273/204/344/273/266/345/261/202/347/272/247/345/217/214/345/220/221/345/220/214/346/255/245.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Type/350/243/205/351/245/260/345/231/250/357/274/232/346/240/207/350/256/260/347/261/273/345/261/236/346/200/247/347/232/204/347/261/273/345/236/213.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/AppStorageV2/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200UI/347/212/266/346/200/201/345/255/230/345/202/250.md" +0 -0
- /package/skills/{hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2 → a2h-batch-ui-align/references/mvvm-v2}/MVVM/346/250/241/345/274/217/357/274/210V2/357/274/211.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/PersistenceV2/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/_/350/214/203/345/274/217/351/200/211/346/213/251/350/257/264/346/230/216.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/_/350/243/205/351/245/260/345/231/250/351/200/237/346/237/245.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2//347/212/266/346/200/201/347/256/241/347/220/206V1/345/220/221V2/350/277/201/347/247/273/344/270/216/346/267/267/347/224/250/346/214/207/345/257/274.md" +0 -0
- /package/skills/{hmos-fix-build-errors → a2h-fix-build-errors}/references/arkts-strict-patterns.md +0 -0
- /package/skills/{hmos-fix-build-errors → a2h-fix-build-errors}/references/known-patterns.md +0 -0
- /package/skills/{hmos-fix-build-errors → a2h-fix-build-errors}/references/rdb-entity-pattern.md +0 -0
- /package/skills/{hmos-resources-convert → a2h-resource-convert}/references/dependency-analysis-rules.md +0 -0
- /package/skills/{hmos-resources-convert → a2h-resource-convert}/scripts/svg_fidelity_check.ts +0 -0
- /package/skills/{hmos-spec-generate → a2h-spec-generate}/template/REQ.txt +0 -0
- /package/skills/{hmos-spec-generate → a2h-spec-generate}/template/REQ.xlsx +0 -0
|
@@ -0,0 +1,870 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* run_pipeline.mjs — port of run_pipeline.py: detect an Android app's architecture and run
|
|
4
|
+
* every extractor it warrants.
|
|
5
|
+
*
|
|
6
|
+
* run_pipeline.mjs <project> [--package P] [--workspace W] [--only STAGE,...]
|
|
7
|
+
* [--skip STAGE,...] [--dry-run] [--resume] [--skip-llm] ...
|
|
8
|
+
*
|
|
9
|
+
* Every stage is spawned as `node <name>.mjs` (_spawn.stageArgv); the ui_elements converter
|
|
10
|
+
* is the same Node tool the Python driver runs (_spawn.nodeConverterArgv).
|
|
11
|
+
*
|
|
12
|
+
* Exports: HERE SKIP_DIRS walkSources _resDirs _buildFilesText _APP_PLUGIN_RE
|
|
13
|
+
* _appPluginIndirections _appliesAppPlugin findPackage _hasAndroidHost
|
|
14
|
+
* findUniappPackage _SIG _uniappEvidence detect plan _run ASK_STAGES PENDING PREV_DIR
|
|
15
|
+
* PARTS_INDEX PART_SIZE _worklistCount _autoanswerEmpty _pendingState _writePending
|
|
16
|
+
* _incompleteAnswers _answerFilled _resumeGate main
|
|
17
|
+
* (_appPluginIndirections returns [Set aliases, Set conventions]; walkSources -> Map path->text;
|
|
18
|
+
* detect -> plain object in Python insertion order; plan -> [[name, argv, why, redirect]])
|
|
19
|
+
*/
|
|
20
|
+
import * as fs from 'node:fs';
|
|
21
|
+
import * as path from 'node:path';
|
|
22
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
23
|
+
import { spawnSync as spawnSyncImpl } from 'node:child_process';
|
|
24
|
+
import {
|
|
25
|
+
IS_WIN, jsonLoads, jsonDumps, readText, writeText, appendText, decodeReplace, pyRe, reSearch,
|
|
26
|
+
sortedBy, sortedStr, pyRepr, pyStr, errStr, get, truthy, pyStrip, splitlines, ArgumentParser,
|
|
27
|
+
pyPrintBuf, runMain, SystemExit, toInt, osRelpath, gettempdir, PyKeyError, PyTypeError,
|
|
28
|
+
} from './_py.mjs';
|
|
29
|
+
import * as _spawn from './_spawn.mjs';
|
|
30
|
+
import * as carryAnswers from './carry_answers.mjs';
|
|
31
|
+
import * as worklistParts from './worklist_parts.mjs';
|
|
32
|
+
import { _osWalk } from './layout_resolve.mjs';
|
|
33
|
+
import { findProjects, _appidOf } from './uniapp_nav.mjs';
|
|
34
|
+
|
|
35
|
+
export const HERE = path.dirname(fileURLToPath(import.meta.url));
|
|
36
|
+
export const SKIP_DIRS = new Set(['build', '.git', '.gradle', '.idea', 'node_modules',
|
|
37
|
+
'test', 'androidTest', 'androidUnitTest', 'commonTest']);
|
|
38
|
+
|
|
39
|
+
const SEP = IS_WIN ? '\\' : '/';
|
|
40
|
+
/** os.path.join(a, *parts) for already-plain segments. */
|
|
41
|
+
function osJoin(a, ...parts) {
|
|
42
|
+
let out = String(a);
|
|
43
|
+
for (const p of parts) {
|
|
44
|
+
const s = String(p);
|
|
45
|
+
if (IS_WIN ? /^[\\/]|^[A-Za-z]:/.test(s) : s.startsWith('/')) { out = s; continue; }
|
|
46
|
+
out = (out === '' || out.endsWith('/') || (IS_WIN && out.endsWith('\\')) || (IS_WIN && /^[A-Za-z]:$/.test(out))) ? out + s : out + SEP + s;
|
|
47
|
+
}
|
|
48
|
+
return out;
|
|
49
|
+
}
|
|
50
|
+
/** os.path.basename. */
|
|
51
|
+
function osBasename(p) {
|
|
52
|
+
const s = String(p);
|
|
53
|
+
const i = IS_WIN ? Math.max(s.lastIndexOf('/'), s.lastIndexOf('\\')) : s.lastIndexOf('/');
|
|
54
|
+
let r = s.slice(i + 1);
|
|
55
|
+
if (IS_WIN && i < 0 && /^[A-Za-z]:/.test(r)) { r = r.slice(2); }
|
|
56
|
+
return r;
|
|
57
|
+
}
|
|
58
|
+
/** os.path.abspath. */
|
|
59
|
+
function osAbspath(p) { return (IS_WIN ? path.win32 : path.posix).resolve(String(p)); }
|
|
60
|
+
/** open(p, encoding='utf-8', errors='replace').read() */
|
|
61
|
+
function readLax(p) { return readText(p, { encoding: 'utf-8', errors: 'replace' }); }
|
|
62
|
+
/** Python `isinstance(x, dict)` for parsed JSON. */
|
|
63
|
+
const isDict = (x) => x !== null && typeof x === 'object' && !Array.isArray(x) && !(x instanceof Map) && !(x instanceof Set);
|
|
64
|
+
const pruneDirs = (dirs) => { const k = dirs.filter((d) => !SKIP_DIRS.has(d)); dirs.length = 0; dirs.push(...k); };
|
|
65
|
+
|
|
66
|
+
// ── project scan ─────────────────────────────────────────────────────────────
|
|
67
|
+
|
|
68
|
+
/** (path, text) for every shipping .kt/.java file, read once (Map in os.walk order). */
|
|
69
|
+
export function walkSources(project) {
|
|
70
|
+
const out = new Map();
|
|
71
|
+
for (const [dirpath, dirs, files] of _osWalk(project)) {
|
|
72
|
+
pruneDirs(dirs);
|
|
73
|
+
for (const fn of files) {
|
|
74
|
+
if (!(fn.endsWith('.kt') || fn.endsWith('.java'))) { continue; }
|
|
75
|
+
const p = osJoin(dirpath, fn);
|
|
76
|
+
try { out.set(p, readLax(p)); } catch { continue; }
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return out;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function _resDirs(project, leaf) {
|
|
83
|
+
const hits = [];
|
|
84
|
+
for (const [dirpath, dirs] of _osWalk(project)) {
|
|
85
|
+
pruneDirs(dirs);
|
|
86
|
+
if (osBasename(dirpath) === leaf && dirpath.split(SEP).includes('res')) { hits.push(dirpath); }
|
|
87
|
+
}
|
|
88
|
+
return hits;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** Concatenated Gradle/TOML text — where dependency COORDINATES live. */
|
|
92
|
+
export function _buildFilesText(project) {
|
|
93
|
+
const parts = [];
|
|
94
|
+
for (const [dirpath, dirs, files] of _osWalk(project)) {
|
|
95
|
+
pruneDirs(dirs);
|
|
96
|
+
for (const fn of files) {
|
|
97
|
+
if (['.gradle', '.gradle.kts', '.toml', '.properties'].some((x) => fn.endsWith(x))) {
|
|
98
|
+
try { parts.push(readLax(osJoin(dirpath, fn))); } catch { /* OSError */ }
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return parts.join('\n');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export const _APP_PLUGIN_RE = pyRe(String.raw`com\.android\.application|['"]android-application['"]|` +
|
|
106
|
+
String.raw`\bandroidApplication\b|alias\([\w.]*android\.application\)`);
|
|
107
|
+
|
|
108
|
+
const _TOML_ALIAS_RE = pyRe(String.raw`^\s*([\w.-]+)\s*=\s*\{[^}\n]*\bid\s*=\s*` +
|
|
109
|
+
String.raw`["']com\.android\.application["']`, 'gm');
|
|
110
|
+
const _PLUGIN_CLASS_RE = pyRe(String.raw`class\s+(\w+)\s*:\s*Plugin<Project>`);
|
|
111
|
+
const _APPLY_APP_RE = pyRe(String.raw`apply\s*\(\s*["']com\.android\.application["']`);
|
|
112
|
+
const _REGISTER_RE = pyRe(String.raw`id\s*=\s*["']([\w.-]+)["'][^}]*?` +
|
|
113
|
+
String.raw`implementationClass\s*=\s*["'][\w.]*?(\w+)["']`, 'gs');
|
|
114
|
+
|
|
115
|
+
/** [catalog aliases, convention plugin ids] (Sets) that stand for the app plugin. */
|
|
116
|
+
export function _appPluginIndirections(project) {
|
|
117
|
+
const read = (p) => { try { return readLax(p); } catch { return ''; } };
|
|
118
|
+
const aliases = new Set(); const conventions = new Set(); const classes = new Set();
|
|
119
|
+
for (const [dirpath, dirs, files] of _osWalk(project)) {
|
|
120
|
+
pruneDirs(dirs);
|
|
121
|
+
for (const fn of files) {
|
|
122
|
+
const p = osJoin(dirpath, fn);
|
|
123
|
+
if (fn.endsWith('.versions.toml')) {
|
|
124
|
+
for (const m of read(p).matchAll(new RegExp(_TOML_ALIAS_RE))) { aliases.add(m[1].replace(/[-_]/g, '.')); }
|
|
125
|
+
} else if (fn.endsWith('.gradle.kts') || fn.endsWith('.gradle')) {
|
|
126
|
+
if (dirpath.replace(/\\/g, '/').split('/').includes('src') && reSearch(_APP_PLUGIN_RE, read(p))) {
|
|
127
|
+
conventions.add(fn.replace(/\.gradle(\.kts)?$/, ''));
|
|
128
|
+
}
|
|
129
|
+
} else if (fn.endsWith('.kt')) {
|
|
130
|
+
const text = read(p);
|
|
131
|
+
const cls = reSearch(_PLUGIN_CLASS_RE, text);
|
|
132
|
+
if (cls && reSearch(_APPLY_APP_RE, text)) { classes.add(cls[1]); }
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
if (classes.size) {
|
|
137
|
+
for (const [dirpath, dirs, files] of _osWalk(project)) {
|
|
138
|
+
pruneDirs(dirs);
|
|
139
|
+
for (const fn of files) {
|
|
140
|
+
if (!fn.startsWith('build.gradle')) { continue; }
|
|
141
|
+
const text = read(osJoin(dirpath, fn));
|
|
142
|
+
for (const m of text.matchAll(new RegExp(_REGISTER_RE))) {
|
|
143
|
+
if (classes.has(m[2])) { conventions.add(m[1]); }
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return [aliases, conventions];
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
const _ALIAS_USE_RE = pyRe(String.raw`alias\(\s*libs\.plugins\.([\w.]+)\s*\)`, 'g');
|
|
152
|
+
const _ID_USE_RE = pyRe(String.raw`\bid\s*\(?\s*["']([\w.-]+)["']`, 'g');
|
|
153
|
+
|
|
154
|
+
export function _appliesAppPlugin(text, aliases = [], conventions = []) {
|
|
155
|
+
if (reSearch(_APP_PLUGIN_RE, text)) { return true; }
|
|
156
|
+
const A = new Set(aliases); const C = new Set(conventions);
|
|
157
|
+
for (const m of text.matchAll(new RegExp(_ALIAS_USE_RE))) { if (A.has(m[1])) { return true; } }
|
|
158
|
+
for (const m of text.matchAll(new RegExp(_ID_USE_RE))) { if (C.has(m[1])) { return true; } }
|
|
159
|
+
return false;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const _MANIFEST_PKG_RE = pyRe(String.raw`<manifest[^>]*\bpackage\s*=\s*["']([\w.]+)["']`);
|
|
163
|
+
const _APP_ID_RE = pyRe(String.raw`applicationId(?:\s*=)?\s*["']([\w.]+)["']`);
|
|
164
|
+
const _NAMESPACE_RE = pyRe(String.raw`namespace(?:\s*=)?\s*["']([\w.]+)["']`);
|
|
165
|
+
|
|
166
|
+
/** The app's package, as an APK would report it (applicationId > namespace > manifest package). */
|
|
167
|
+
export function findPackage(project) {
|
|
168
|
+
project = String(project);
|
|
169
|
+
const builds = []; const manifestPkgs = [];
|
|
170
|
+
for (const [dirpath, dirs, files] of _osWalk(project)) {
|
|
171
|
+
pruneDirs(dirs);
|
|
172
|
+
const depth = dirpath.slice(project.length).split(SEP).length - 1;
|
|
173
|
+
for (const fn of files) {
|
|
174
|
+
if (fn === 'AndroidManifest.xml') {
|
|
175
|
+
let head;
|
|
176
|
+
try { head = [...readLax(osJoin(dirpath, fn))].slice(0, 4000).join(''); } catch { continue; }
|
|
177
|
+
const m = reSearch(_MANIFEST_PKG_RE, head);
|
|
178
|
+
if (m) { manifestPkgs.push([depth, m[1]]); }
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
if (!fn.startsWith('build.gradle')) { continue; }
|
|
182
|
+
try { builds.push([depth, readLax(osJoin(dirpath, fn))]); } catch { continue; }
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
const ids = (modules) => {
|
|
186
|
+
const appIds = []; const namespaces = [];
|
|
187
|
+
for (const [depth, text] of modules) {
|
|
188
|
+
let m = reSearch(_APP_ID_RE, text);
|
|
189
|
+
if (m) { appIds.push([depth, m[1]]); }
|
|
190
|
+
m = reSearch(_NAMESPACE_RE, text);
|
|
191
|
+
if (m) { namespaces.push([depth, m[1]]); }
|
|
192
|
+
}
|
|
193
|
+
return [appIds, namespaces];
|
|
194
|
+
};
|
|
195
|
+
const direct = builds.filter(([, t]) => reSearch(_APP_PLUGIN_RE, t));
|
|
196
|
+
let tiers = ids(direct);
|
|
197
|
+
if (!tiers.some((t) => t.length)) {
|
|
198
|
+
const [aliases, conventions] = _appPluginIndirections(project);
|
|
199
|
+
tiers = ids(builds.filter(([, t]) => _appliesAppPlugin(t, aliases, conventions)));
|
|
200
|
+
}
|
|
201
|
+
for (const tier of [...tiers, manifestPkgs]) {
|
|
202
|
+
if (tier.length) { return sortedBy(tier)[0][1]; }
|
|
203
|
+
}
|
|
204
|
+
return null;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/** True when the project also ships a NATIVE Android app (a Manifest under a src/ tree). */
|
|
208
|
+
export function _hasAndroidHost(project) {
|
|
209
|
+
for (const [dirpath, dirs, files] of _osWalk(project)) {
|
|
210
|
+
pruneDirs(dirs);
|
|
211
|
+
if (files.includes('AndroidManifest.xml') && dirpath.replace(/\\/g, '/').split('/').includes('src')) { return true; }
|
|
212
|
+
}
|
|
213
|
+
return false;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/** The appid of a uni-app SOURCE project, or null. */
|
|
217
|
+
export function findUniappPackage(project) {
|
|
218
|
+
const apps = findProjects(project);
|
|
219
|
+
if (!apps.length) { return null; }
|
|
220
|
+
const [appRoot] = sortedBy(apps)[0];
|
|
221
|
+
return _appidOf(appRoot, osBasename(appRoot));
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// ── architecture detection ───────────────────────────────────────────────────
|
|
225
|
+
|
|
226
|
+
/** Every signal is a framework fact (see run_pipeline.py for the per-signal rationale). */
|
|
227
|
+
export const _SIG = {
|
|
228
|
+
compose_ui: pyRe(String.raw`@Composable\b`),
|
|
229
|
+
compose_routes: pyRe(String.raw`\bcomposable\s*[<(]`),
|
|
230
|
+
navhost: pyRe(String.raw`\bNavHost(?:Controller)?\s*\(`),
|
|
231
|
+
voyager_dep: pyRe(String.raw`cafe\.adriel\.voyager`),
|
|
232
|
+
voyager_decl: pyRe(
|
|
233
|
+
String.raw`^(?:(?:data|sealed|abstract|internal|private|public|open|final)\s+)*` +
|
|
234
|
+
String.raw`(?:object|class)\s+\w+[^:={\n]*:\s*[\w.]*(?:Screen|Tab)\b`, 'm'),
|
|
235
|
+
fragment: pyRe(String.raw`(?:extends\s+\w*Fragment\w*\b|:\s*\w*Fragment\w*\s*\()`),
|
|
236
|
+
androidfragment: pyRe(String.raw`\bAndroidFragment\s*<`),
|
|
237
|
+
preference: pyRe('PreferenceFragmentCompat'),
|
|
238
|
+
menu_inflate: pyRe('(?:inflateMenu|onCreateOptionsMenu|MenuInflater|setSupportActionBar)'),
|
|
239
|
+
registry: pyRe(String.raw`(?:switch\s*\(|\bwhen\s*\()`),
|
|
240
|
+
presenter: pyRe(String.raw`\bclass\s+\w+(?:Presenter|Controller)\b`),
|
|
241
|
+
media_browse: pyRe(String.raw`\b(?:MediaBrowserServiceCompat|MediaLibraryService|MediaBrowserService)\b`),
|
|
242
|
+
navactions: pyRe(String.raw`\bclass\s+\w*Nav(?:igation)?Actions?\b`),
|
|
243
|
+
navbar: pyRe(String.raw`\b(?:NavigationBar|BottomNavigation|NavigationBarItem|TabRow)\s*\(`),
|
|
244
|
+
dialog_show: pyRe(String.raw`\.show\s*\(\s*(?:parentFragmentManager|childFragmentManager|supportFragmentManager|fragmentManager)`),
|
|
245
|
+
plain_dialog: pyRe(String.raw`(?:extends\s+\w*Dialog\b|:\s*\w*Dialog\s*[(<])`),
|
|
246
|
+
adapterview_empty: pyRe(String.raw`\bsetEmptyView\s*\(`),
|
|
247
|
+
hybrid_host: pyRe(String.raw`\b(?:DCUniMPSDK|openUniMP|ReactRootView|ReactActivityDelegate|` +
|
|
248
|
+
String.raw`ReactInstanceManager|FlutterActivity|FlutterFragment|FlutterEngine|` +
|
|
249
|
+
String.raw`CordovaActivity|CordovaWebView)\b`),
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
/** A uni-app SOURCE project's route-table evidence (first 3 pages.json paths), or null. */
|
|
253
|
+
export function _uniappEvidence(project) {
|
|
254
|
+
const apps = findProjects(project);
|
|
255
|
+
if (!apps.length) { return null; }
|
|
256
|
+
return sortedStr(apps.map(([, p]) => osRelpath(p, project).replace(/\\/g, '/'))).slice(0, 3).join(', ');
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/** {signal: evidence} — one entry per signal that FIRED (Python insertion order). */
|
|
260
|
+
export function detect(project, sources = null) {
|
|
261
|
+
const src = sources !== null ? sources : walkSources(project);
|
|
262
|
+
const builds = _buildFilesText(project);
|
|
263
|
+
const ev = {};
|
|
264
|
+
for (const [name, rx] of Object.entries(_SIG)) {
|
|
265
|
+
if (name.endsWith('_dep')) { continue; }
|
|
266
|
+
for (const [p, text] of src) {
|
|
267
|
+
const m = reSearch(rx, text);
|
|
268
|
+
if (m) {
|
|
269
|
+
let nl = 0;
|
|
270
|
+
for (let i = text.indexOf('\n'); i >= 0 && i < m.index; i = text.indexOf('\n', i + 1)) { nl++; }
|
|
271
|
+
ev[name] = `${osRelpath(p, project)}:${nl + 1}`;
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
if (reSearch(_SIG.voyager_dep, builds)) { ev.voyager_dep = 'dependency: cafe.adriel.voyager'; }
|
|
277
|
+
if (reSearch('navigation[-.]compose', builds)) { ev.navcompose_dep = 'dependency: navigation-compose'; }
|
|
278
|
+
for (const [leaf, key] of [['menu', 'menu_xml'], ['navigation', 'nav_graph_xml'], ['xml', 'res_xml']]) {
|
|
279
|
+
const hits = _resDirs(project, leaf);
|
|
280
|
+
if (hits.length) { ev[key] = `${hits.length} res/${leaf} dir(s)`; }
|
|
281
|
+
}
|
|
282
|
+
if ('res_xml' in ev) {
|
|
283
|
+
let found = null;
|
|
284
|
+
for (const d of _resDirs(project, 'xml')) {
|
|
285
|
+
for (const fn of fs.readdirSync(d)) {
|
|
286
|
+
if (!fn.endsWith('.xml')) { continue; }
|
|
287
|
+
try {
|
|
288
|
+
if (readLax(osJoin(d, fn)).includes('PreferenceScreen')) { found = osRelpath(osJoin(d, fn), project); break; }
|
|
289
|
+
} catch { /* OSError */ }
|
|
290
|
+
}
|
|
291
|
+
if (found) { break; }
|
|
292
|
+
}
|
|
293
|
+
delete ev.res_xml;
|
|
294
|
+
if (found) { ev.preference_xml = found; }
|
|
295
|
+
}
|
|
296
|
+
const uni = _uniappEvidence(project);
|
|
297
|
+
if (uni) { ev.uniapp_source = uni; }
|
|
298
|
+
return ev;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* [[stage, argv, why, redirect]] in dependency order, with a `_halt` sentinel splitting
|
|
303
|
+
* phase A (extract) from phase B (apply + consumers). See run_pipeline.py for the ordering rules.
|
|
304
|
+
*/
|
|
305
|
+
export function plan(project, ws, packageName, ev, opts = {}) {
|
|
306
|
+
const wgt = opts.wgt ?? [];
|
|
307
|
+
const dispatchEdges = opts.dispatch_edges ?? false;
|
|
308
|
+
const locale = opts.locale ?? 'en';
|
|
309
|
+
const s = (name, ...args) => [name, _spawn.stageArgv(name, ...args)];
|
|
310
|
+
const sub = (name, cmd, ...args) => [`${name}-${cmd}`, _spawn.stageArgv(name, cmd, ...args)];
|
|
311
|
+
const has = (k) => Object.hasOwn(ev, k);
|
|
312
|
+
const routes = ['compose_routes', 'navhost', 'navcompose_dep'].some(has);
|
|
313
|
+
const voyager = ['voyager_dep', 'voyager_decl'].some(has);
|
|
314
|
+
const composeUi = has('compose_ui') || routes || voyager;
|
|
315
|
+
const fragment = has('fragment');
|
|
316
|
+
const uniapp = has('uniapp_source');
|
|
317
|
+
const native = !uniapp || _hasAndroidHost(project);
|
|
318
|
+
const out = [];
|
|
319
|
+
const add = (stage, why, redirect = null) => { out.push([stage[0], stage[1], why, redirect]); };
|
|
320
|
+
const J = (f) => osJoin(ws, f);
|
|
321
|
+
|
|
322
|
+
if (native) {
|
|
323
|
+
add(s('manifest', project, packageName, '--workspace', ws, '--append'), 'always (bootstrap)');
|
|
324
|
+
} else {
|
|
325
|
+
add(['_uniapp_bootstrap', null],
|
|
326
|
+
`uni-app SOURCE project @ ${ev.uniapp_source} — no AndroidManifest, so the native bootstrap is replaced by empty workspace files`);
|
|
327
|
+
}
|
|
328
|
+
if (uniapp) {
|
|
329
|
+
add(s('uniapp_nav', project, '--workspace', ws, '--append', ...(dispatchEdges ? ['--dispatch-edges'] : [])),
|
|
330
|
+
`uni-app route table @ ${ev.uniapp_source}` + (dispatchEdges ? ' (+config-driven dispatch branches, guarded)' : ''));
|
|
331
|
+
}
|
|
332
|
+
// ---- node layers (append to nodes.jsonl)
|
|
333
|
+
if (fragment) {
|
|
334
|
+
add(s('fragment_nav', project, '--workspace', ws, '--append'), `fragment base class @ ${ev.fragment}`);
|
|
335
|
+
add(s('fragfactory_nav', project, '--workspace', ws, '--append'), 'fragment app: base-typed factory targets');
|
|
336
|
+
}
|
|
337
|
+
if (fragment || has('dialog_show')) {
|
|
338
|
+
add(s('dialogshow_nav', project, '--workspace', ws, '--append'),
|
|
339
|
+
has('dialog_show') ? `DialogFragment.show @ ${ev.dialog_show}` : 'fragment app: DialogFragment factory/show scan');
|
|
340
|
+
}
|
|
341
|
+
if (has('plain_dialog')) {
|
|
342
|
+
add(s('plaindialog_nav', project, '--workspace', ws, '--append'), `android.app.Dialog subclass @ ${ev.plain_dialog}`);
|
|
343
|
+
}
|
|
344
|
+
if (fragment || has('dialog_show') || has('plain_dialog')) {
|
|
345
|
+
add(s('dialog_listener_nav', project, '--package', packageName, '--workspace', ws, '--append'),
|
|
346
|
+
'dialog listener callback edges');
|
|
347
|
+
}
|
|
348
|
+
if (native) {
|
|
349
|
+
add(s('adapter_nav', project, '--package', packageName, '--workspace', ws, '--append'), 'adapter item click edges');
|
|
350
|
+
}
|
|
351
|
+
if (has('hybrid_host')) {
|
|
352
|
+
const wgtArgs = (wgt || []).flatMap((p) => ['--wgt', p]);
|
|
353
|
+
add(s('hybrid_scope', project, '--workspace', ws, '--append', ...wgtArgs),
|
|
354
|
+
`embedded non-native UI stack @ ${ev.hybrid_host}` + (wgt && wgt.length ? ` (+${wgt.length} supplied package(s))` : ''));
|
|
355
|
+
}
|
|
356
|
+
if (has('androidfragment')) {
|
|
357
|
+
add(s('androidfragment_nav', project, '--workspace', ws, '--append'), `AndroidFragment<T> @ ${ev.androidfragment}`);
|
|
358
|
+
}
|
|
359
|
+
if (has('preference_xml')) {
|
|
360
|
+
add(s('preference_nav', project, '--workspace', ws, '--append'), `PreferenceScreen @ ${ev.preference_xml}`);
|
|
361
|
+
}
|
|
362
|
+
if (has('menu_xml') && has('menu_inflate')) {
|
|
363
|
+
add(s('menu_nav', project, '--workspace', ws, '--append'), `${ev.menu_xml} + inflate @ ${ev.menu_inflate}`);
|
|
364
|
+
}
|
|
365
|
+
if (fragment || has('menu_xml')) {
|
|
366
|
+
add(s('window_nav', project, '--workspace', ws, '--append'),
|
|
367
|
+
'view app: imperative window surfaces (PopupWindow/ListPopupWindow/BottomSheetDialog/WindowManager.addView)');
|
|
368
|
+
}
|
|
369
|
+
if (has('registry') && fragment) {
|
|
370
|
+
add(s('registry_nav', project, '--workspace', ws, '--append'), 'dispatch table over page constants');
|
|
371
|
+
}
|
|
372
|
+
if (has('registry') && native) {
|
|
373
|
+
// A `when`/`switch` that mounts code-built page classes into a host: the single-Activity
|
|
374
|
+
// View app with no Fragment, Compose or layout XML. Reads manifest nodes only.
|
|
375
|
+
add(s('viewpage_nav', project, '--workspace', ws, '--append'), `view-swap dispatch table @ ${ev.registry}`);
|
|
376
|
+
}
|
|
377
|
+
if (has('presenter')) {
|
|
378
|
+
add(s('presenter_nav', project, '--workspace', ws, '--append'), `presenter/controller @ ${ev.presenter}`);
|
|
379
|
+
}
|
|
380
|
+
if (has('media_browse')) {
|
|
381
|
+
add(s('media_browse_nav', project, '--workspace', ws, '--append'), `media browse service @ ${ev.media_browse}`);
|
|
382
|
+
}
|
|
383
|
+
// ---- compose / voyager route layers
|
|
384
|
+
if (composeUi) {
|
|
385
|
+
add(s('compose_nav', project), 'compose UI (route scan)', J('compose_nav.out.json'));
|
|
386
|
+
add(s('compose_overlay', project), `compose UI @ ${get(ev, 'compose_ui', 'routes')}`, J('compose_overlay.out.json'));
|
|
387
|
+
add(['_copy_overlay', null], 'activity_nav reads overlay.jsonl');
|
|
388
|
+
add(s('compose_merge', project, ws, J('compose_nav.out.json'), J('compose_overlay.out.json')),
|
|
389
|
+
'mandatory merge of the two streams above');
|
|
390
|
+
}
|
|
391
|
+
if (routes) {
|
|
392
|
+
add(s('navactions_nav', project, '--nav-out', J('compose_nav.out.json'), '--workspace', ws, '--append'),
|
|
393
|
+
'navigation-compose app (wrapper class)');
|
|
394
|
+
if (has('navbar')) {
|
|
395
|
+
add(s('compose_navbar_nav', project, '--nav-out', J('compose_nav.out.json'), '--workspace', ws, '--append'),
|
|
396
|
+
`nav bar @ ${ev.navbar}`);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
if (voyager) {
|
|
400
|
+
add(s('screen_nav', project), `voyager (${truthy(get(ev, 'voyager_dep')) ? ev.voyager_dep : pyStr(get(ev, 'voyager_decl'))})`,
|
|
401
|
+
J('screen_nav.out.json'));
|
|
402
|
+
add(s('screen_merge', project, ws, J('screen_nav.out.json')), 'mandatory merge of the voyager stream');
|
|
403
|
+
}
|
|
404
|
+
// ---- activity edges
|
|
405
|
+
if (native) {
|
|
406
|
+
add(s('activity_nav', project, ws), 'always (>1 Activity)', J('activity_edges.jsonl'));
|
|
407
|
+
add(['_cat_activity_edges', null], 'activity_nav writes to stdout');
|
|
408
|
+
add(s('starter_nav', project, '--workspace', ws, '--append'), 'always when starters.jsonl is non-empty');
|
|
409
|
+
}
|
|
410
|
+
if (fragment) {
|
|
411
|
+
add(s('single_host_nav', project, ws, '--append'), 'fragment app: generic host Activity');
|
|
412
|
+
}
|
|
413
|
+
// ---- titles, assemble, enrichment
|
|
414
|
+
if (composeUi) { add(s('compose_titles', ws, '--project', project, '--append'), 'compose UI, BEFORE assemble'); }
|
|
415
|
+
add(s('assemble', ws, '--project', project), 'always');
|
|
416
|
+
if (composeUi) { add(s('compose_widgets', ws, '--project', project, '--append'), 'compose UI, AFTER assemble'); }
|
|
417
|
+
if (fragment || has('menu_xml')) {
|
|
418
|
+
add(s('view_widgets', ws, '--project', project, '--append'), 'view/fragment app, AFTER assemble');
|
|
419
|
+
}
|
|
420
|
+
add(s('preference_widgets', ws, '--project', project, '--locale', locale, '--append'),
|
|
421
|
+
'Preference XML pages, AFTER assemble');
|
|
422
|
+
if (native) {
|
|
423
|
+
add(s('activity_widgets', ws, '--project', project, '--append'),
|
|
424
|
+
'always (Activity nodes are invisible to both widget extractors)');
|
|
425
|
+
}
|
|
426
|
+
if (uniapp) {
|
|
427
|
+
add(s('uniapp_widgets', ws, '--project', project, '--append'), "uni-app app: controls from each page's own <template>");
|
|
428
|
+
}
|
|
429
|
+
if (has('adapterview_empty') || fragment) {
|
|
430
|
+
add(s('state_guard', ws, '--project', project, '--append'), 'view app: framework empty-state contract');
|
|
431
|
+
}
|
|
432
|
+
add(s('assemble', ws, '--project', project), 'refresh utg.json with the post-assemble stamps above');
|
|
433
|
+
add(sub('view_interactions', 'extract', ws, project), 'inventory View click bindings, including in-place UI changes');
|
|
434
|
+
add(s('audit', ws), 'mandatory');
|
|
435
|
+
add(s('click_paths', ws), 'always, BEFORE nl_hints');
|
|
436
|
+
// ---- the two ASKING stages: extract half
|
|
437
|
+
add(sub('state_guard', 'extract', ws, project), 'model-assisted pass 2: pages phase 1 left undecided');
|
|
438
|
+
add(sub('nl_hints', 'extract', ws, project), 'steps whose label is a code name / gesture is unclear');
|
|
439
|
+
add(['_halt', null], 'await answers; continue with --resume');
|
|
440
|
+
// ---- phase B: apply half + everything that consumes it
|
|
441
|
+
add(sub('view_interactions', 'apply', ws), 'merge reviewed custom panels and UI-state transitions');
|
|
442
|
+
add(sub('state_guard', 'apply', ws), 'merge guard verdicts into nodes.jsonl (gated)');
|
|
443
|
+
add(s('assemble', ws, '--project', project), 'refresh utg.json with the applied required_state');
|
|
444
|
+
add(s('audit', ws), 'audit refreshed graph and unresolved interactions');
|
|
445
|
+
add(s('click_paths', ws), 'regenerate from refreshed utg.json, BEFORE hints');
|
|
446
|
+
add(sub('nl_hints', 'apply', ws), 'merge hints/overrides into click_paths.json');
|
|
447
|
+
add(['_veto_reroute', null], 're-run click_paths + apply iff vetoes written');
|
|
448
|
+
add(s('phase_plan', ws), 'handoff (reads required_state)');
|
|
449
|
+
add(['_ui_elements', null], 'test-case generation handoff (Node converter)');
|
|
450
|
+
add(s('utg_html', ws), 'visualization');
|
|
451
|
+
return out;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
// ── execution ────────────────────────────────────────────────────────────────
|
|
455
|
+
|
|
456
|
+
let _tmpSeq = 0;
|
|
457
|
+
/** subprocess.run text decode: utf-8 errors='replace' + universal newlines. */
|
|
458
|
+
const _decode = (buf) => (buf && buf.length ? decodeReplace(buf).replace(/\r\n?/g, '\n') : '');
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* subprocess.run(argv, ...) as run_pipeline.py does it:
|
|
462
|
+
* redirect: stdout -> that file (truncated), stderr -> captured text
|
|
463
|
+
* no redirect: stdout and stderr merged into ONE stream (stderr=STDOUT), captured as text
|
|
464
|
+
* -> {returncode, stdout, stderr} (str; the unused one is null, as in Python).
|
|
465
|
+
*/
|
|
466
|
+
export function _run(argv, redirect, ws, env) { // eslint-disable-line no-unused-vars
|
|
467
|
+
const [cmd, ...rest] = argv.map(String);
|
|
468
|
+
const spawnOpts = { env, maxBuffer: 1 << 30, windowsHide: true };
|
|
469
|
+
if (redirect) {
|
|
470
|
+
const fd = fs.openSync(String(redirect), 'w');
|
|
471
|
+
let r;
|
|
472
|
+
try { r = _spawnChecked(cmd, rest, { ...spawnOpts, stdio: ['inherit', fd, 'pipe'] }); } finally { fs.closeSync(fd); }
|
|
473
|
+
return { returncode: r.status ?? 1, stdout: null, stderr: _decode(r.stderr) };
|
|
474
|
+
}
|
|
475
|
+
// One shared descriptor for both streams keeps their interleaving exactly as a merged pipe would.
|
|
476
|
+
const tmp = path.join(gettempdir(), `run_pipeline_${process.pid}_${++_tmpSeq}.out`);
|
|
477
|
+
const fd = fs.openSync(tmp, 'w+');
|
|
478
|
+
let r;
|
|
479
|
+
try { r = _spawnChecked(cmd, rest, { ...spawnOpts, stdio: ['inherit', fd, fd] }); } finally { fs.closeSync(fd); }
|
|
480
|
+
const out = fs.readFileSync(tmp);
|
|
481
|
+
try { fs.unlinkSync(tmp); } catch { /* best effort */ }
|
|
482
|
+
return { returncode: r.status ?? 1, stdout: _decode(out), stderr: null };
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
function _spawnChecked(cmd, args, opts) {
|
|
486
|
+
const r = spawnSyncImpl(cmd, args, opts);
|
|
487
|
+
if (r.error) {
|
|
488
|
+
if (r.error.code === 'ENOENT') {
|
|
489
|
+
const e = new Error(IS_WIN ? '[WinError 2] The system cannot find the file specified'
|
|
490
|
+
: `[Errno 2] No such file or directory: ${pyRepr(cmd)}`);
|
|
491
|
+
e.code = 'ENOENT'; e.name = 'FileNotFoundError'; throw e;
|
|
492
|
+
}
|
|
493
|
+
throw r.error;
|
|
494
|
+
}
|
|
495
|
+
return r;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/** The two-plus ASKING stages, in the order phase B applies them. */
|
|
499
|
+
export const ASK_STAGES = [
|
|
500
|
+
{ stage: 'view_interactions', worklist: 'view_interactions_worklist.json', answers: 'view_interactions_answers.json' },
|
|
501
|
+
{ stage: 'state_guard', worklist: 'state_guard_worklist.json', answers: 'state_guard_answers.json' },
|
|
502
|
+
{ stage: 'nl_hints', worklist: 'nl_hints_worklist.json', answers: 'nl_hints_answers.json' },
|
|
503
|
+
];
|
|
504
|
+
|
|
505
|
+
export const PENDING = 'llm_pending.json';
|
|
506
|
+
export const PREV_DIR = '_prev_answers';
|
|
507
|
+
export const PARTS_INDEX = worklistParts.INDEX;
|
|
508
|
+
/** Items per review part (see run_pipeline.py). */
|
|
509
|
+
export const PART_SIZE = 40;
|
|
510
|
+
|
|
511
|
+
const _exists = (p) => fs.existsSync(String(p));
|
|
512
|
+
const _loadJson = (p) => jsonLoads(readText(p, { encoding: 'utf-8' }));
|
|
513
|
+
const _attrErr = (v, attr) => new PyTypeError(`'${v === null ? 'NoneType' : Array.isArray(v) ? 'list' : typeof v === 'string' ? 'str' : typeof v === 'number' ? (Number.isInteger(v) ? 'int' : 'float') : typeof v === 'boolean' ? 'bool' : 'object'}' object has no attribute '${attr}'`);
|
|
514
|
+
/** dict.get on a value that must be a dict (AttributeError otherwise). */
|
|
515
|
+
const _dget = (d, k, dflt = null) => { if (!isDict(d)) { const e = _attrErr(d, 'get'); e.name = 'AttributeError'; throw e; } return get(d, k, dflt); };
|
|
516
|
+
|
|
517
|
+
/** Item count in a worklist, or null if it is missing/unreadable (0 and null stay distinct). */
|
|
518
|
+
export function _worklistCount(p) {
|
|
519
|
+
let wl;
|
|
520
|
+
try { wl = _loadJson(p); } catch (e) {
|
|
521
|
+
if (e && (e.code !== undefined || e.name === 'JSONDecodeError' || e.name === 'ValueError')) { return null; }
|
|
522
|
+
throw e;
|
|
523
|
+
}
|
|
524
|
+
const items = _dget(wl, 'items');
|
|
525
|
+
return Array.isArray(items) ? items.length : null;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
/** Write an empty answers file for every worklist that EXISTS and asked nothing. */
|
|
529
|
+
export function _autoanswerEmpty(ws) {
|
|
530
|
+
const done = [];
|
|
531
|
+
for (const spec of ASK_STAGES) {
|
|
532
|
+
const wl = osJoin(ws, spec.worklist);
|
|
533
|
+
const ans = osJoin(ws, spec.answers);
|
|
534
|
+
if (_worklistCount(wl) !== 0 || _exists(ans)) { continue; }
|
|
535
|
+
writeText(ans, jsonDumps({ items: [], generated_by: 'run_pipeline:no-op', note: 'worklist was empty; nothing to answer' },
|
|
536
|
+
{ ensure_ascii: false, indent: 2 }));
|
|
537
|
+
done.push(spec.stage);
|
|
538
|
+
}
|
|
539
|
+
return done;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
/** [[spec, count, hasAnswers]] for the asking stages. */
|
|
543
|
+
export function _pendingState(ws) {
|
|
544
|
+
return ASK_STAGES.map((spec) => [spec, _worklistCount(osJoin(ws, spec.worklist)), _exists(osJoin(ws, spec.answers))]);
|
|
545
|
+
}
|
|
546
|
+
/** Record what phase B is waiting on (llm_pending.json) and print the instruction. */
|
|
547
|
+
export function _writePending(ws, partSize = PART_SIZE) {
|
|
548
|
+
const state = _pendingState(ws);
|
|
549
|
+
const waiting = state.filter(([, c, has]) => truthy(c) && !has).map(([s, c]) => [s, c]);
|
|
550
|
+
const rec = {
|
|
551
|
+
phase: waiting.length ? 'awaiting_answers' : 'ready',
|
|
552
|
+
stages: state.map(([s, c, has]) => ({ stage: s.stage, worklist: s.worklist, answers: s.answers, count: c, answered: has })),
|
|
553
|
+
};
|
|
554
|
+
const pend = osJoin(ws, PENDING);
|
|
555
|
+
writeText(pend, jsonDumps(rec, { ensure_ascii: false, indent: 2 }));
|
|
556
|
+
if (!waiting.length) { return false; }
|
|
557
|
+
const parts = partSize ? worklistParts.split(ws, partSize) : [];
|
|
558
|
+
rec.parts = parts.length ? PARTS_INDEX : null;
|
|
559
|
+
writeText(pend, jsonDumps(rec, { ensure_ascii: false, indent: 2 }));
|
|
560
|
+
const P = pyPrintBuf;
|
|
561
|
+
P('');
|
|
562
|
+
P('[halt] phase A complete. Review stages ASK questions that only a model can answer:');
|
|
563
|
+
for (const [spec, count] of waiting) {
|
|
564
|
+
P(`[halt] ${spec.stage.padEnd(12)} ${count} item(s)`);
|
|
565
|
+
P(`[halt] read ${osJoin(ws, spec.worklist)}`);
|
|
566
|
+
P(`[halt] write ${osJoin(ws, spec.answers)}`);
|
|
567
|
+
}
|
|
568
|
+
if (parts.length) {
|
|
569
|
+
P(`[halt] ${parts.length} self-contained part(s) of <= ${partSize} item(s): give each to its OWN reviewer, all in PARALLEL:`);
|
|
570
|
+
for (const p of parts) {
|
|
571
|
+
P(`[halt] ${p.stage.padEnd(18)} ${String(p.items).padStart(3)} ${p.worklist} -> ${p.answers}`);
|
|
572
|
+
}
|
|
573
|
+
P(`[halt] then: worklist_parts.mjs merge ${ws}`);
|
|
574
|
+
}
|
|
575
|
+
P('[halt] Answer every item (view_interactions: category=unresolved; other stages: abstain=true when uncertain), then continue:');
|
|
576
|
+
P(`[halt] run_pipeline.mjs <project> --workspace ${ws} --resume`);
|
|
577
|
+
P('[halt] Nothing downstream has run yet: no phase_plan, no ui_elements.json, no utg.html.');
|
|
578
|
+
return true;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
const _keyOf = (i) => { const k = _dget(i, 'key'); return truthy(k) ? k : _dget(i, 'node_id'); };
|
|
582
|
+
|
|
583
|
+
/** [[stage, why]] for answers files that exist but do not answer their own worklist. */
|
|
584
|
+
export function _incompleteAnswers(ws) {
|
|
585
|
+
const out = [];
|
|
586
|
+
for (const [spec, count, has] of _pendingState(ws)) {
|
|
587
|
+
if (!truthy(count) || !has) { continue; }
|
|
588
|
+
let keys; let doc;
|
|
589
|
+
try {
|
|
590
|
+
const wl = _loadJson(osJoin(ws, spec.worklist));
|
|
591
|
+
if (!isDict(wl)) { const e = new PyTypeError('list indices must be integers or slices, not str'); throw e; }
|
|
592
|
+
if (!Object.hasOwn(wl, 'items')) { throw new PyKeyError('items'); }
|
|
593
|
+
keys = new Set();
|
|
594
|
+
for (const i of wl.items) { keys.add(_keyOf(i)); }
|
|
595
|
+
doc = _loadJson(osJoin(ws, spec.answers));
|
|
596
|
+
} catch (e) {
|
|
597
|
+
out.push([spec.stage, `unreadable: ${errStr(e)}`]);
|
|
598
|
+
continue;
|
|
599
|
+
}
|
|
600
|
+
let items = isDict(doc) ? get(doc, 'items', []) : doc;
|
|
601
|
+
items = [...items].filter((a) => isDict(a));
|
|
602
|
+
const answered = new Set(items.map((a) => (truthy(get(a, 'key')) ? get(a, 'key') : get(a, 'node_id'))));
|
|
603
|
+
const miss = [...keys].filter((k) => !answered.has(k));
|
|
604
|
+
if (miss.length) {
|
|
605
|
+
out.push([spec.stage, `${miss.length} of ${keys.size} key(s) unanswered, e.g. ${pyRepr(sortedBy(miss).slice(0, 3))}`]);
|
|
606
|
+
} else if (!items.some((a) => _answerFilled(spec.stage, a))) {
|
|
607
|
+
out.push([spec.stage, `all ${items.length} answer(s) are blank (no verdict and no abstain)`]);
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
return out;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
/** True when an answer says SOMETHING; abstaining counts. */
|
|
614
|
+
export function _answerFilled(stage, a) {
|
|
615
|
+
if (stage === 'view_interactions') { return truthy(get(a, 'category')); }
|
|
616
|
+
if (stage === 'state_guard') { return truthy(get(a, 'abstain')) || truthy(get(a, 'guard_kind')); }
|
|
617
|
+
const st = (v) => (truthy(v) ? pyStrip(v) : '');
|
|
618
|
+
return truthy(st(get(a, 'nl_hint'))) || truthy(st(get(a, 'action_override'))) ||
|
|
619
|
+
truthy(get(a, 'not_clickable')) || truthy(get(a, 'abstain'));
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/** Refuse to enter phase B while an asked question is unanswered (SystemExit). */
|
|
623
|
+
export function _resumeGate(ws) {
|
|
624
|
+
const missing = _pendingState(ws).filter(([, c, has]) => truthy(c) && !has);
|
|
625
|
+
if (!missing.length) {
|
|
626
|
+
const incomplete = _incompleteAnswers(ws);
|
|
627
|
+
if (incomplete.length) {
|
|
628
|
+
throw new SystemExit(['cannot resume: an answers file does not answer its worklist.',
|
|
629
|
+
...incomplete.map(([st, why]) => ` ${st}: ${why}`),
|
|
630
|
+
' Answer every key (abstain=true / category=unresolved when unsure). `--skip-llm` is the only declared way to run without them.',
|
|
631
|
+
].join('\n'));
|
|
632
|
+
}
|
|
633
|
+
return;
|
|
634
|
+
}
|
|
635
|
+
const lines = missing.map(([s, c]) => ` ${s.stage}: ${c} item(s) unanswered — write ${osJoin(ws, s.answers)}`);
|
|
636
|
+
throw new SystemExit(['cannot resume: phase A asked questions that were never answered.', ...lines,
|
|
637
|
+
' (`--skip-llm` runs phase B without them, and records that it did.)'].join('\n'));
|
|
638
|
+
}
|
|
639
|
+
let summaryLang;
|
|
640
|
+
function _dumpSummary(ws, obj) {
|
|
641
|
+
const payload = obj.lang !== undefined || summaryLang === undefined ? obj : { ...obj, lang: summaryLang };
|
|
642
|
+
writeText(osJoin(ws, 'pipeline_summary.json'), jsonDumps(payload, { indent: 2 }));
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
export function main(argv = process.argv.slice(2)) {
|
|
646
|
+
const ap = new ArgumentParser({ prog: 'run_pipeline.mjs' });
|
|
647
|
+
ap.add_argument('project');
|
|
648
|
+
ap.add_argument('--package');
|
|
649
|
+
ap.add_argument('--workspace');
|
|
650
|
+
ap.add_argument('--only', { help: 'comma-separated stage names to run' });
|
|
651
|
+
ap.add_argument('--skip', { help: 'comma-separated stage names to skip' });
|
|
652
|
+
ap.add_argument('--dry-run', { action: 'store_true' });
|
|
653
|
+
ap.add_argument('--resume', { action: 'store_true',
|
|
654
|
+
help: 'run phase B (the `apply` half) using the answer files written since the halt' });
|
|
655
|
+
ap.add_argument('--skip-llm', { action: 'store_true',
|
|
656
|
+
help: 'run both phases without the model stages; recorded in pipeline_summary.json as a degraded run' });
|
|
657
|
+
ap.add_argument('--lang', { default: process.env.UTG_LANG ?? 'en' });
|
|
658
|
+
ap.add_argument('--dispatch-edges', { action: 'store_true',
|
|
659
|
+
help: 'uni-app apps only: also emit navigation found behind a config-driven dispatch table (a component ' +
|
|
660
|
+
'whose children are gated on `v-if="x === \'literal\'"`), each edge carrying that branch\'s own condition ' +
|
|
661
|
+
'as its guard. Off by default because which branch renders comes from server config the repository does ' +
|
|
662
|
+
'not contain. See uniapp_nav.py --dispatch-edges.' });
|
|
663
|
+
ap.add_argument('--wgt', { action: 'append', default: [], metavar: 'PATH',
|
|
664
|
+
help: 'a uni-app/hybrid package that is NOT in the repository, i.e. one the app downloads at runtime. ' +
|
|
665
|
+
'Repeatable. Its pages become real nodes instead of one opaque boundary node. Pull it off a device with ' +
|
|
666
|
+
'`adb exec-out run-as <pkg> cat cache/<appid>.wgt > x.wgt` — exec-out, not shell, which corrupts binaries ' +
|
|
667
|
+
'on a CRLF host. The pipeline itself never touches a device or a network; it only reads the file you give it.' });
|
|
668
|
+
ap.add_argument('--carry-from', { metavar: 'WS',
|
|
669
|
+
help: `previous workspace to carry unchanged answers from (default: <ws>/${PREV_DIR}, the last run's answers)` });
|
|
670
|
+
ap.add_argument('--no-carry', { action: 'store_true', help: 'answer every question afresh' });
|
|
671
|
+
ap.add_argument('--part-size', { type: toInt, default: PART_SIZE,
|
|
672
|
+
help: `items per parallel review part (default ${PART_SIZE}; 0 = no split)` });
|
|
673
|
+
const args = ap.parse_args(argv);
|
|
674
|
+
summaryLang = args.lang;
|
|
675
|
+
if (args.part_size < 0) { ap.error(`--part-size must be >= 0 (0 = no split), got ${args.part_size}`); }
|
|
676
|
+
if (args.resume && args.skip_llm) {
|
|
677
|
+
throw new SystemExit('--resume and --skip-llm are mutually exclusive: --skip-llm never halts, so there is nothing to resume');
|
|
678
|
+
}
|
|
679
|
+
const P = pyPrintBuf;
|
|
680
|
+
const project = osAbspath(args.project);
|
|
681
|
+
const ws = truthy(args.workspace) ? args.workspace : osJoin(project, 'utg_static_output');
|
|
682
|
+
let packageName = truthy(args.package) ? args.package : findPackage(project);
|
|
683
|
+
if (!truthy(packageName)) {
|
|
684
|
+
packageName = findUniappPackage(project);
|
|
685
|
+
if (truthy(packageName)) { P(`[detect] no applicationId; using uni-app appid ${packageName}`); }
|
|
686
|
+
}
|
|
687
|
+
if (!truthy(packageName)) { throw new SystemExit(`no applicationId found under ${project}; pass --package`); }
|
|
688
|
+
fs.mkdirSync(ws, { recursive: true });
|
|
689
|
+
|
|
690
|
+
const ev = detect(project);
|
|
691
|
+
P(`[detect] package=${packageName}`);
|
|
692
|
+
for (const k of sortedStr(Object.keys(ev))) { P(`[detect] ${k}: ${ev[k]}`); }
|
|
693
|
+
|
|
694
|
+
const planOpts = { wgt: args.wgt, dispatch_edges: args.dispatch_edges, locale: args.lang };
|
|
695
|
+
let steps = plan(project, ws, packageName, ev, planOpts);
|
|
696
|
+
const only = new Set((args.only || '').split(',').filter((x) => x));
|
|
697
|
+
const skip = new Set((args.skip || '').split(',').filter((x) => x));
|
|
698
|
+
|
|
699
|
+
const cutAt = steps.findIndex((s) => s[0] === '_halt');
|
|
700
|
+
const cut = cutAt < 0 ? null : cutAt;
|
|
701
|
+
if (cut === null) {
|
|
702
|
+
// no asking stages left in plan
|
|
703
|
+
} else if (args.skip_llm) {
|
|
704
|
+
const tail = steps.findIndex((s) => s[0] === '_veto_reroute');
|
|
705
|
+
steps = [...steps.slice(0, cut).filter((s) => !s[0].endsWith('-extract') || s[0] === 'view_interactions-extract'),
|
|
706
|
+
...steps.slice(tail + 1)];
|
|
707
|
+
P('[skip-llm] SKIP: semantic review, nl_hints and state_guard pass 2 are NOT running. Click-path instructions ' +
|
|
708
|
+
'keep their code-name labels and no model-judged precondition is stamped. Recorded in pipeline_summary.json.');
|
|
709
|
+
} else if (args.resume) {
|
|
710
|
+
steps = steps.slice(cut + 1);
|
|
711
|
+
} else {
|
|
712
|
+
steps = steps.slice(0, cut + 1);
|
|
713
|
+
}
|
|
714
|
+
if (only.size) { steps = steps.filter((s) => only.has(s[0])); }
|
|
715
|
+
steps = steps.filter((s) => !skip.has(s[0]));
|
|
716
|
+
|
|
717
|
+
if (args.dry_run) {
|
|
718
|
+
for (const [name, , why, redirect] of steps) {
|
|
719
|
+
const tail = redirect ? ` > ${osBasename(redirect)}` : '';
|
|
720
|
+
P(`[plan] ${name.padEnd(22)} ${why}${tail}`);
|
|
721
|
+
}
|
|
722
|
+
return;
|
|
723
|
+
}
|
|
724
|
+
if (args.resume) { _resumeGate(ws); }
|
|
725
|
+
|
|
726
|
+
if (!only.size && !args.resume) {
|
|
727
|
+
for (const fn of ['nodes.jsonl', 'edges.jsonl', 'manifest.jsonl', 'starters.jsonl', 'activity_edges.jsonl', 'overlay.jsonl']) {
|
|
728
|
+
const p = osJoin(ws, fn);
|
|
729
|
+
if (_exists(p)) { fs.unlinkSync(p); }
|
|
730
|
+
}
|
|
731
|
+
const old = ASK_STAGES.flatMap((spec) => [spec.answers, spec.worklist]).filter((fn) => _exists(osJoin(ws, fn)));
|
|
732
|
+
if (old.some((fn) => fn.endsWith('_answers.json'))) {
|
|
733
|
+
const prev = osJoin(ws, PREV_DIR);
|
|
734
|
+
try { fs.rmSync(prev, { recursive: true, force: true }); } catch { /* ignore_errors */ }
|
|
735
|
+
fs.mkdirSync(prev);
|
|
736
|
+
for (const fn of old) { fs.renameSync(osJoin(ws, fn), osJoin(prev, fn)); }
|
|
737
|
+
}
|
|
738
|
+
for (const fn of old) {
|
|
739
|
+
const p = osJoin(ws, fn);
|
|
740
|
+
if (_exists(p)) { fs.unlinkSync(p); }
|
|
741
|
+
}
|
|
742
|
+
for (const fn of fs.readdirSync(ws)) {
|
|
743
|
+
if (/^.+_(?:worklist|answers)\.(?:part\d+|carried)\.json$/s.test(fn) || fn === PARTS_INDEX || fn === carryAnswers.REPORT) {
|
|
744
|
+
fs.unlinkSync(osJoin(ws, fn));
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
for (const fn of [PENDING, 'nl_hints_vetoes.json', 'interaction_audit.json']) {
|
|
748
|
+
const p = osJoin(ws, fn);
|
|
749
|
+
if (_exists(p)) { fs.unlinkSync(p); }
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
const env = { ...process.env, PYTHONUTF8: '1', PYTHONIOENCODING: 'utf-8', UTG_LANG: args.lang };
|
|
754
|
+
const summary = [];
|
|
755
|
+
const seenStages = new Map();
|
|
756
|
+
const ctx = { project, ws, packageName, ev, args, env, summary, only, skip, cut, planOpts };
|
|
757
|
+
for (let si = 0; si < steps.length; si++) {
|
|
758
|
+
const [name, argv2, why, redirect] = steps[si];
|
|
759
|
+
if (_specialStep(name, why, ctx, steps) === 'return') { return; }
|
|
760
|
+
if (name.startsWith('_')) { continue; }
|
|
761
|
+
const p = _run(argv2, redirect, ws, env);
|
|
762
|
+
seenStages.set(name, (seenStages.get(name) ?? 0) + 1);
|
|
763
|
+
const suffix = seenStages.get(name) === 1 ? '' : `.${seenStages.get(name)}`;
|
|
764
|
+
const log = osJoin(ws, `${name}${suffix}.log`);
|
|
765
|
+
const text = (redirect ? p.stderr : p.stdout) || '';
|
|
766
|
+
writeText(log, text);
|
|
767
|
+
const keep = splitlines(text).filter((ln) => /^(?:\[|appended|SANITY|LINT|# )/.test(ln));
|
|
768
|
+
const status = p.returncode === 0 ? 'ok' : `exit=${p.returncode}`;
|
|
769
|
+
P(`[run] ${name.padEnd(22)} ${status}`);
|
|
770
|
+
for (const ln of keep.slice(-14)) { P(` ${ln}`); }
|
|
771
|
+
summary.push({ stage: name, returncode: p.returncode, why, signals: keep });
|
|
772
|
+
if (p.returncode) {
|
|
773
|
+
_dumpSummary(ws, { project, package: packageName, signals: ev, phase: 'failed', failed_stage: name, stages: summary });
|
|
774
|
+
throw new SystemExit(`stage failed: ${name}; see ${log}`);
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
_dumpSummary(ws, { project, package: packageName, signals: ev, stages: summary, phase: 'complete',
|
|
778
|
+
llm_stages: args.skip_llm ? 'skipped' : 'applied' });
|
|
779
|
+
P(`[done] ${ws}`);
|
|
780
|
+
if (args.skip_llm) {
|
|
781
|
+
P('[done] llm_stages=skipped — nl_hints and state_guard pass 2 did not run; see pipeline_summary.json');
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
/** The `_`-named plan steps (not stage scripts). Returns 'return' when main must return. */
|
|
785
|
+
function _specialStep(name, why, ctx, steps) {
|
|
786
|
+
const { ws, env, summary, args } = ctx;
|
|
787
|
+
const P = pyPrintBuf;
|
|
788
|
+
if (name === '_uniapp_bootstrap') {
|
|
789
|
+
for (const fn of ['nodes.jsonl', 'edges.jsonl', 'starters.jsonl', 'manifest.jsonl']) {
|
|
790
|
+
const p = osJoin(ws, fn);
|
|
791
|
+
if (!_exists(p)) { fs.closeSync(fs.openSync(p, 'w')); }
|
|
792
|
+
}
|
|
793
|
+
P(`[${name}] created empty bootstrap files (no AndroidManifest)`);
|
|
794
|
+
summary.push({ stage: name, rc: 0, why });
|
|
795
|
+
return null;
|
|
796
|
+
}
|
|
797
|
+
if (name === '_copy_overlay') {
|
|
798
|
+
const src = osJoin(ws, 'compose_overlay.out.json');
|
|
799
|
+
if (_exists(src)) { writeText(osJoin(ws, 'overlay.jsonl'), readText(src, { encoding: 'utf-8' })); }
|
|
800
|
+
return null;
|
|
801
|
+
}
|
|
802
|
+
if (name === '_cat_activity_edges') {
|
|
803
|
+
const src = osJoin(ws, 'activity_edges.jsonl');
|
|
804
|
+
if (_exists(src)) { appendText(osJoin(ws, 'edges.jsonl'), readText(src, { encoding: 'utf-8' })); }
|
|
805
|
+
return null;
|
|
806
|
+
}
|
|
807
|
+
if (name === '_halt') {
|
|
808
|
+
const noop = _autoanswerEmpty(ws);
|
|
809
|
+
const src = truthy(args.carry_from) ? args.carry_from : osJoin(ws, PREV_DIR);
|
|
810
|
+
let isDir = false;
|
|
811
|
+
try { isDir = fs.statSync(String(src)).isDirectory(); } catch { isDir = false; }
|
|
812
|
+
if (!args.no_carry && isDir) {
|
|
813
|
+
const rep = carryAnswers.carry(ws, src);
|
|
814
|
+
for (const [st, r] of Object.entries(rep.stages)) {
|
|
815
|
+
P(`[carry] ${st.padEnd(18)} carried=${r.carried} remaining=${r.remaining} from ${src}`);
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
for (const stage of noop) { P(`[halt] ${stage}: worklist empty, nothing to ask (auto-answered)`); }
|
|
819
|
+
if (_writePending(ws, args.part_size)) {
|
|
820
|
+
_dumpSummary(ws, { project: ctx.project, package: ctx.packageName, signals: ctx.ev, phase: 'awaiting_answers', stages: summary });
|
|
821
|
+
return 'return';
|
|
822
|
+
}
|
|
823
|
+
P('[halt] no questions were asked; continuing into phase B');
|
|
824
|
+
const more = plan(ctx.project, ws, ctx.packageName, ctx.ev, ctx.planOpts).slice(ctx.cut + 1)
|
|
825
|
+
.filter((s) => (!ctx.only.size || ctx.only.has(s[0])) && !ctx.skip.has(s[0]));
|
|
826
|
+
steps.push(...more);
|
|
827
|
+
return null;
|
|
828
|
+
}
|
|
829
|
+
if (name === '_veto_reroute') {
|
|
830
|
+
if (!_exists(osJoin(ws, 'nl_hints_vetoes.json'))) { return null; }
|
|
831
|
+
P('[run] _veto_reroute vetoes present: re-running click_paths + nl_hints apply');
|
|
832
|
+
for (const [label, argv2] of [['click_paths', _spawn.stageArgv('click_paths', ws)],
|
|
833
|
+
['nl_hints-apply', _spawn.stageArgv('nl_hints', 'apply', ws)]]) {
|
|
834
|
+
const p2 = _run(argv2, null, ws, env);
|
|
835
|
+
const status = p2.returncode === 0 ? 'ok' : `exit=${p2.returncode}`;
|
|
836
|
+
P(` ${label.padEnd(16)} ${status}`);
|
|
837
|
+
summary.push({ stage: `_veto_reroute:${label}`, returncode: p2.returncode, why, signals: [] });
|
|
838
|
+
if (p2.returncode) {
|
|
839
|
+
// phase_plan / ui_elements would be built from a stale or half-written click_paths.json
|
|
840
|
+
const log = osJoin(ws, `veto_reroute.${label}.log`);
|
|
841
|
+
writeText(log, (p2.stdout || '') + (p2.stderr || ''));
|
|
842
|
+
_dumpSummary(ws, { project: ctx.project, package: ctx.packageName, signals: ctx.ev, phase: 'failed',
|
|
843
|
+
failed_stage: `_veto_reroute:${label}`, stages: summary });
|
|
844
|
+
throw new SystemExit(`stage failed: _veto_reroute:${label}; see ${log}`);
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
return null;
|
|
848
|
+
}
|
|
849
|
+
if (name === '_ui_elements') {
|
|
850
|
+
for (const [src, alias] of [['compose_overlay.log', 'e2.log'], ['activity_nav.log', 'e3.log']]) {
|
|
851
|
+
const sp = osJoin(ws, src);
|
|
852
|
+
if (_exists(sp)) { writeText(osJoin(ws, alias), readLax(sp)); }
|
|
853
|
+
}
|
|
854
|
+
const p = _run(_spawn.nodeConverterArgv('--input', ws, '--out', osJoin(ws, 'ui_elements.json')), null, ws, env);
|
|
855
|
+
P(`[run] ${name.padEnd(22)} ${p.returncode === 0 ? 'ok' : `exit=${p.returncode}`}`);
|
|
856
|
+
for (const ln of splitlines(p.stdout || '').slice(-8)) { P(` ${ln}`); }
|
|
857
|
+
summary.push({ stage: name, returncode: p.returncode, why, signals: [] });
|
|
858
|
+
if (p.returncode) {
|
|
859
|
+
const log = osJoin(ws, `${name.slice(1)}.log`);
|
|
860
|
+
writeText(log, (p.stdout || '') + (p.stderr || ''));
|
|
861
|
+
_dumpSummary(ws, { project: ctx.project, package: ctx.packageName, signals: ctx.ev, phase: 'failed',
|
|
862
|
+
failed_stage: name, stages: summary });
|
|
863
|
+
throw new SystemExit(`stage failed: ${name}; see ${log}`);
|
|
864
|
+
}
|
|
865
|
+
return null;
|
|
866
|
+
}
|
|
867
|
+
return null;
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
if (process.argv[1] && import.meta.url === pathToFileURL(path.resolve(process.argv[1])).href) { runMain(main); }
|